mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-10 09:56:00 +00:00
2 lines
1.0 MiB
Vendored
2 lines
1.0 MiB
Vendored
/*! For license information please see 492.js.LICENSE.txt */
|
||
(self.webpackChunkDooTask=self.webpackChunkDooTask||[]).push([[492,27],{8251:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r="ontouchend"in document;const o={bind:function(t,e){var n=500,o=e.value;if($A.isJson(e.value)&&(n=e.value.delay||500,o=e.value.callback),"function"!=typeof o)throw"callback must be a function";if(!r)return t.__longpressContextmenu__=function(e){e.preventDefault(),e.stopPropagation(),o(e,t)},void t.addEventListener("contextmenu",t.__longpressContextmenu__);var i=null,a=!1;t.__longpressStart__=function(e){"click"===e.type&&0!==e.button||(a=!1,null===i&&(i=setTimeout((function(){a=!0,o(e.touches[0],t)}),n)))},t.__longpressCancel__=function(t){null!==i&&(clearTimeout(i),i=null)},t.__longpressClick__=function(e){a&&(e.preventDefault(),e.stopPropagation()),t.__longpressCancel__(e)},t.addEventListener("touchstart",t.__longpressStart__),t.addEventListener("click",t.__longpressClick__),t.addEventListener("touchmove",t.__longpressCancel__),t.addEventListener("touchend",t.__longpressCancel__),t.addEventListener("touchcancel",t.__longpressCancel__)},unbind:function(t){if(!r)return t.removeEventListener("contextmenu",t.__longpressContextmenu__),void delete t.__longpressContextmenu__;t.removeEventListener("touchstart",t.__longpressStart__),t.removeEventListener("click",t.__longpressClick__),t.removeEventListener("touchmove",t.__longpressCancel__),t.removeEventListener("touchend",t.__longpressCancel__),t.removeEventListener("touchcancel",t.__longpressCancel__),delete t.__longpressStart__,delete t.__longpressClick__,delete t.__longpressCancel__}}},79742:(t,e)=>{"use strict";e.byteLength=function(t){var e=l(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,i=l(t),a=i[0],s=i[1],u=new o(function(t,e,n){return 3*(e+n)/4-n}(0,a,s)),c=0,d=s>0?a-4:a;for(n=0;n<d;n+=4)e=r[t.charCodeAt(n)]<<18|r[t.charCodeAt(n+1)]<<12|r[t.charCodeAt(n+2)]<<6|r[t.charCodeAt(n+3)],u[c++]=e>>16&255,u[c++]=e>>8&255,u[c++]=255&e;2===s&&(e=r[t.charCodeAt(n)]<<2|r[t.charCodeAt(n+1)]>>4,u[c++]=255&e);1===s&&(e=r[t.charCodeAt(n)]<<10|r[t.charCodeAt(n+1)]<<4|r[t.charCodeAt(n+2)]>>2,u[c++]=e>>8&255,u[c++]=255&e);return u},e.fromByteArray=function(t){for(var e,r=t.length,o=r%3,i=[],a=16383,s=0,l=r-o;s<l;s+=a)i.push(u(t,s,s+a>l?l:s+a));1===o?(e=t[r-1],i.push(n[e>>2]+n[e<<4&63]+"==")):2===o&&(e=(t[r-2]<<8)+t[r-1],i.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=i.length;a<s;++a)n[a]=i[a],r[i.charCodeAt(a)]=a;function l(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function u(t,e,r){for(var o,i,a=[],s=e;s<r;s+=3)o=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),a.push(n[(i=o)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},48764:(t,e,n)=>{"use strict";var r=n(79742),o=n(80645),i=n(5826);function a(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()<e)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=l.prototype:(null===t&&(t=new l(e)),t.length=e),t}function l(t,e,n){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return d(this,t)}return u(this,t,e,n)}function u(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);l.TYPED_ARRAY_SUPPORT?(t=e).__proto__=l.prototype:t=f(t,e);return t}(t,e,n,r):"string"==typeof e?function(t,e,n){"string"==typeof n&&""!==n||(n="utf8");if(!l.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(e,n),o=(t=s(t,r)).write(e,n);o!==r&&(t=t.slice(0,o));return t}(t,e,n):function(t,e){if(l.isBuffer(e)){var n=0|h(e.length);return 0===(t=s(t,n)).length||e.copy(t,0,0,n),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(r=e.length)!=r?s(t,0):f(t,e);if("Buffer"===e.type&&i(e.data))return f(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function c(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function d(t,e){if(c(e),t=s(t,e<0?0:0|h(e)),!l.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function f(t,e){var n=e.length<0?0:0|h(e.length);t=s(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function h(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function p(t,e){if(l.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return U(t).length;default:if(r)return F(t).length;e=(""+e).toLowerCase(),r=!0}}function m(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return A(this,e,n);case"utf8":case"utf-8":return O(this,e,n);case"ascii":return D(this,e,n);case"latin1":case"binary":return L(this,e,n);case"base64":return S(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function g(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function v(t,e,n,r,o){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(o)return-1;n=t.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof e&&(e=l.from(e,r)),l.isBuffer(e))return 0===e.length?-1:y(t,e,n,r,o);if("number"==typeof e)return e&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):y(t,[e],n,r,o);throw new TypeError("val must be string, number or Buffer")}function y(t,e,n,r,o){var i,a=1,s=t.length,l=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,s/=2,l/=2,n/=2}function u(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(o){var c=-1;for(i=n;i<s;i++)if(u(t,i)===u(e,-1===c?0:i-c)){if(-1===c&&(c=i),i-c+1===l)return c*a}else-1!==c&&(i-=i-c),c=-1}else for(n+l>s&&(n=s-l),i=n;i>=0;i--){for(var d=!0,f=0;f<l;f++)if(u(t,i+f)!==u(e,f)){d=!1;break}if(d)return i}return-1}function b(t,e,n,r){n=Number(n)||0;var o=t.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a<r;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[n+a]=s}return a}function _(t,e,n,r){return z(F(e,t.length-n),t,n,r)}function w(t,e,n,r){return z(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function k(t,e,n,r){return w(t,e,n,r)}function C(t,e,n,r){return z(U(e),t,n,r)}function x(t,e,n,r){return z(function(t,e){for(var n,r,o,i=[],a=0;a<t.length&&!((e-=2)<0);++a)r=(n=t.charCodeAt(a))>>8,o=n%256,i.push(o),i.push(r);return i}(e,t.length-n),t,n,r)}function S(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function O(t,e,n){n=Math.min(t.length,n);for(var r=[],o=e;o<n;){var i,a,s,l,u=t[o],c=null,d=u>239?4:u>223?3:u>191?2:1;if(o+d<=n)switch(d){case 1:u<128&&(c=u);break;case 2:128==(192&(i=t[o+1]))&&(l=(31&u)<<6|63&i)>127&&(c=l);break;case 3:i=t[o+1],a=t[o+2],128==(192&i)&&128==(192&a)&&(l=(15&u)<<12|(63&i)<<6|63&a)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:i=t[o+1],a=t[o+2],s=t[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(l=(15&u)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(c=l)}null===c?(c=65533,d=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),o+=d}return function(t){var e=t.length;if(e<=E)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=E));return n}(r)}e.lW=l,e.h2=50,l.TYPED_ARRAY_SUPPORT=void 0!==n.g.TYPED_ARRAY_SUPPORT?n.g.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),a(),l.poolSize=8192,l._augment=function(t){return t.__proto__=l.prototype,t},l.from=function(t,e,n){return u(null,t,e,n)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(t,e,n){return function(t,e,n,r){return c(e),e<=0?s(t,e):void 0!==n?"string"==typeof r?s(t,e).fill(n,r):s(t,e).fill(n):s(t,e)}(null,t,e,n)},l.allocUnsafe=function(t){return d(null,t)},l.allocUnsafeSlow=function(t){return d(null,t)},l.isBuffer=function(t){return!(null==t||!t._isBuffer)},l.compare=function(t,e){if(!l.isBuffer(t)||!l.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,o=0,i=Math.min(n,r);o<i;++o)if(t[o]!==e[o]){n=t[o],r=e[o];break}return n<r?-1:r<n?1:0},l.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(t,e){if(!i(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return l.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=l.allocUnsafe(e),o=0;for(n=0;n<t.length;++n){var a=t[n];if(!l.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,o),o+=a.length}return r},l.byteLength=p,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)g(this,e,e+1);return this},l.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},l.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},l.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?O(this,0,t):m.apply(this,arguments)},l.prototype.equals=function(t){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===l.compare(this,t)},l.prototype.inspect=function(){var t="",n=e.h2;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},l.prototype.compare=function(t,e,n,r,o){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),e<0||n>t.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&e>=n)return 0;if(r>=o)return-1;if(e>=n)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0),s=Math.min(i,a),u=this.slice(r,o),c=t.slice(e,n),d=0;d<s;++d)if(u[d]!==c[d]){i=u[d],a=c[d];break}return i<a?-1:a<i?1:0},l.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},l.prototype.indexOf=function(t,e,n){return v(this,t,e,n,!0)},l.prototype.lastIndexOf=function(t,e,n){return v(this,t,e,n,!1)},l.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-e;if((void 0===n||n>o)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return b(this,t,e,n);case"utf8":case"utf-8":return _(this,t,e,n);case"ascii":return w(this,t,e,n);case"latin1":case"binary":return k(this,t,e,n);case"base64":return C(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var E=4096;function D(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;o<n;++o)r+=String.fromCharCode(127&t[o]);return r}function L(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;o<n;++o)r+=String.fromCharCode(t[o]);return r}function A(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=e;i<n;++i)o+=q(t[i]);return o}function T(t,e,n){for(var r=t.slice(e,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function N(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function $(t,e,n,r,o,i){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function I(t,e,n,r){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-n,2);o<i;++o)t[n+o]=(e&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function P(t,e,n,r){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-n,4);o<i;++o)t[n+o]=e>>>8*(r?o:3-o)&255}function j(t,e,n,r,o,i){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function M(t,e,n,r,i){return i||j(t,0,n,4),o.write(t,e,n,r,23,4),n+4}function R(t,e,n,r,i){return i||j(t,0,n,8),o.write(t,e,n,r,52,8),n+8}l.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),l.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=l.prototype;else{var o=e-t;n=new l(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+t]}return n},l.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||N(t,e,this.length);for(var r=this[t],o=1,i=0;++i<e&&(o*=256);)r+=this[t+i]*o;return r},l.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||N(t,e,this.length);for(var r=this[t+--e],o=1;e>0&&(o*=256);)r+=this[t+--e]*o;return r},l.prototype.readUInt8=function(t,e){return e||N(t,1,this.length),this[t]},l.prototype.readUInt16LE=function(t,e){return e||N(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUInt16BE=function(t,e){return e||N(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUInt32LE=function(t,e){return e||N(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUInt32BE=function(t,e){return e||N(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||N(t,e,this.length);for(var r=this[t],o=1,i=0;++i<e&&(o*=256);)r+=this[t+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*e)),r},l.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||N(t,e,this.length);for(var r=e,o=1,i=this[t+--r];r>0&&(o*=256);)i+=this[t+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},l.prototype.readInt8=function(t,e){return e||N(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){e||N(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(t,e){e||N(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(t,e){return e||N(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return e||N(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readFloatLE=function(t,e){return e||N(t,4,this.length),o.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return e||N(t,4,this.length),o.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return e||N(t,8,this.length),o.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return e||N(t,8,this.length),o.read(this,t,!1,52,8)},l.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||$(this,t,e,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[e]=255&t;++i<n&&(o*=256);)this[e+i]=t/o&255;return e+n},l.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||$(this,t,e,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+n},l.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||$(this,t,e,1,255,0),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},l.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||$(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},l.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||$(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},l.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||$(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):P(this,t,e,!0),e+4},l.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||$(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):P(this,t,e,!1),e+4},l.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);$(this,t,e,n,o-1,-o)}var i=0,a=1,s=0;for(this[e]=255&t;++i<n&&(a*=256);)t<0&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/a>>0)-s&255;return e+n},l.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);$(this,t,e,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[e+i]=255&t;--i>=0&&(a*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/a>>0)-s&255;return e+n},l.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||$(this,t,e,1,127,-128),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},l.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||$(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},l.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||$(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},l.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||$(this,t,e,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):P(this,t,e,!0),e+4},l.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||$(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):P(this,t,e,!1),e+4},l.prototype.writeFloatLE=function(t,e,n){return M(this,t,e,!0,n)},l.prototype.writeFloatBE=function(t,e,n){return M(this,t,e,!1,n)},l.prototype.writeDoubleLE=function(t,e,n){return R(this,t,e,!0,n)},l.prototype.writeDoubleBE=function(t,e,n){return R(this,t,e,!1,n)},l.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var o,i=r-n;if(this===t&&n<e&&e<r)for(o=i-1;o>=0;--o)t[o+e]=this[o+n];else if(i<1e3||!l.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)t[o+e]=this[o+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+i),e);return i},l.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var o=t.charCodeAt(0);o<256&&(t=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!l.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var i;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(i=e;i<n;++i)this[i]=t;else{var a=l.isBuffer(t)?t:F(new l(t,r).toString()),s=a.length;for(i=0;i<n-e;++i)this[i+e]=a[i%s]}return this};var B=/[^+\/0-9A-Za-z-_]/g;function q(t){return t<16?"0"+t.toString(16):t.toString(16)}function F(t,e){var n;e=e||1/0;for(var r=t.length,o=null,i=[],a=0;a<r;++a){if((n=t.charCodeAt(a))>55295&&n<57344){if(!o){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(e-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((e-=1)<0)break;i.push(n)}else if(n<2048){if((e-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function U(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(B,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(t,e,n,r){for(var o=0;o<r&&!(o+n>=e.length||o>=t.length);++o)e[o+n]=t[o];return o}},80645:(t,e)=>{e.read=function(t,e,n,r,o){var i,a,s=8*o-r-1,l=(1<<s)-1,u=l>>1,c=-7,d=n?o-1:0,f=n?-1:1,h=t[e+d];for(d+=f,i=h&(1<<-c)-1,h>>=-c,c+=s;c>0;i=256*i+t[e+d],d+=f,c-=8);for(a=i&(1<<-c)-1,i>>=-c,c+=r;c>0;a=256*a+t[e+d],d+=f,c-=8);if(0===i)i=1-u;else{if(i===l)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),i-=u}return(h?-1:1)*a*Math.pow(2,i-r)},e.write=function(t,e,n,r,o,i){var a,s,l,u=8*i-o-1,c=(1<<u)-1,d=c>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,p=r?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+d>=1?f/l:f*Math.pow(2,1-d))*l>=2&&(a++,l/=2),a+d>=c?(s=0,a=c):a+d>=1?(s=(e*l-1)*Math.pow(2,o),a+=d):(s=e*Math.pow(2,d-1)*Math.pow(2,o),a=0));o>=8;t[n+h]=255&s,h+=p,s/=256,o-=8);for(a=a<<o|s,u+=o;u>0;t[n+h]=255&a,h+=p,a/=256,u-=8);t[n+h-p]|=128*m}},5826:t=>{var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},92307:(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-5a37a7e8]{cursor:col-resize}@media (max-width:768px){.component-resize-line[data-v-5a37a7e8]{display:none}}.component-resize-line.resizing[data-v-5a37a7e8]:after{bottom:0;content:"";cursor:col-resize;left:0;position:fixed;right:0;top:0;z-index:99999}.component-resize-line.bottom[data-v-5a37a7e8],.component-resize-line.bottom[data-v-5a37a7e8]:after{cursor:row-resize}',""]);const i=o},78536:(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,".checkin-export-quick-select>span{margin-right:4px}.checkin-export-quick-select>em{color:#2b85e4;cursor:pointer;font-style:normal;margin-right:4px}.checkin-export-quick-select>em:hover{text-decoration:underline}",""]);const i=o},98234:(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,"body .ivu-modal-wrap.dialog-modal{overflow:hidden;position:absolute}body .ivu-modal-wrap.dialog-modal .ivu-modal{margin:0;padding:0}body .ivu-modal-wrap.dialog-modal .ivu-modal .ivu-modal-content{background:transparent}body .ivu-modal-wrap.dialog-modal .ivu-modal .ivu-modal-content .ivu-modal-close{display:none}body .ivu-modal-wrap.dialog-modal .ivu-modal .ivu-modal-content .ivu-modal-body{display:flex;flex-direction:column;overflow:hidden;padding:0}",""]);const i=o},79165:(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,".checkin-export-quick-select>span{margin-right:4px}.checkin-export-quick-select>em{color:#2b85e4;cursor:pointer;font-style:normal;margin-right:4px}.checkin-export-quick-select>em:hover{text-decoration:underline}",""]);const i=o},75651:(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,"body .ivu-modal-wrap.task-modal{display:flex;flex-direction:column}",""]);const i=o},76095:function(t,e,n){var r,o=n(48764).lW;"undefined"!=typeof self&&self,r=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=109)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(17),o=n(18),i=n(19),a=n(45),s=n(46),l=n(47),u=n(48),c=n(49),d=n(12),f=n(32),h=n(33),p=n(31),m=n(1),g={Scope:m.Scope,create:m.create,find:m.find,query:m.query,register:m.register,Container:r.default,Format:o.default,Leaf:i.default,Embed:u.default,Scroll:a.default,Block:l.default,Inline:s.default,Text:c.default,Attributor:{Attribute:d.default,Class:f.default,Style:h.default,Store:p.default}};e.default=g},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){function e(e){var n=this;return e="[Parchment] "+e,(n=t.call(this,e)||this).message=e,n.name=n.constructor.name,n}return o(e,t),e}(Error);e.ParchmentError=i;var a,s={},l={},u={},c={};function d(t,e){var n;if(void 0===e&&(e=a.ANY),"string"==typeof t)n=c[t]||s[t];else if(t instanceof Text||t.nodeType===Node.TEXT_NODE)n=c.text;else if("number"==typeof t)t&a.LEVEL&a.BLOCK?n=c.block:t&a.LEVEL&a.INLINE&&(n=c.inline);else if(t instanceof HTMLElement){var r=(t.getAttribute("class")||"").split(/\s+/);for(var o in r)if(n=l[r[o]])break;n=n||u[t.tagName]}return null==n?null:e&a.LEVEL&n.scope&&e&a.TYPE&n.scope?n:null}e.DATA_KEY="__blot",function(t){t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY"}(a=e.Scope||(e.Scope={})),e.create=function(t,e){var n=d(t);if(null==n)throw new i("Unable to create "+t+" blot");var r=n,o=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:r.create(e);return new r(o,e)},e.find=function t(n,r){return void 0===r&&(r=!1),null==n?null:null!=n[e.DATA_KEY]?n[e.DATA_KEY].blot:r?t(n.parentNode,r):null},e.query=d,e.register=function t(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(e.length>1)return e.map((function(e){return t(e)}));var r=e[0];if("string"!=typeof r.blotName&&"string"!=typeof r.attrName)throw new i("Invalid definition");if("abstract"===r.blotName)throw new i("Cannot register abstract class");if(c[r.blotName||r.attrName]=r,"string"==typeof r.keyName)s[r.keyName]=r;else if(null!=r.className&&(l[r.className]=r),null!=r.tagName){Array.isArray(r.tagName)?r.tagName=r.tagName.map((function(t){return t.toUpperCase()})):r.tagName=r.tagName.toUpperCase();var o=Array.isArray(r.tagName)?r.tagName:[r.tagName];o.forEach((function(t){null!=u[t]&&null!=r.className||(u[t]=r)}))}return r}},function(t,e,n){var r=n(51),o=n(11),i=n(3),a=n(20),s=String.fromCharCode(0),l=function(t){Array.isArray(t)?this.ops=t:null!=t&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]};l.prototype.insert=function(t,e){var n={};return 0===t.length?this:(n.insert=t,null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n))},l.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},l.prototype.retain=function(t,e){if(t<=0)return this;var n={retain:t};return null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n)},l.prototype.push=function(t){var e=this.ops.length,n=this.ops[e-1];if(t=i(!0,{},t),"object"==typeof n){if("number"==typeof t.delete&&"number"==typeof n.delete)return this.ops[e-1]={delete:n.delete+t.delete},this;if("number"==typeof n.delete&&null!=t.insert&&(e-=1,"object"!=typeof(n=this.ops[e-1])))return this.ops.unshift(t),this;if(o(t.attributes,n.attributes)){if("string"==typeof t.insert&&"string"==typeof n.insert)return this.ops[e-1]={insert:n.insert+t.insert},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this;if("number"==typeof t.retain&&"number"==typeof n.retain)return this.ops[e-1]={retain:n.retain+t.retain},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this}}return e===this.ops.length?this.ops.push(t):this.ops.splice(e,0,t),this},l.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},l.prototype.filter=function(t){return this.ops.filter(t)},l.prototype.forEach=function(t){this.ops.forEach(t)},l.prototype.map=function(t){return this.ops.map(t)},l.prototype.partition=function(t){var e=[],n=[];return this.forEach((function(r){(t(r)?e:n).push(r)})),[e,n]},l.prototype.reduce=function(t,e){return this.ops.reduce(t,e)},l.prototype.changeLength=function(){return this.reduce((function(t,e){return e.insert?t+a.length(e):e.delete?t-e.delete:t}),0)},l.prototype.length=function(){return this.reduce((function(t,e){return t+a.length(e)}),0)},l.prototype.slice=function(t,e){t=t||0,"number"!=typeof e&&(e=1/0);for(var n=[],r=a.iterator(this.ops),o=0;o<e&&r.hasNext();){var i;o<t?i=r.next(t-o):(i=r.next(e-o),n.push(i)),o+=a.length(i)}return new l(n)},l.prototype.compose=function(t){var e=a.iterator(this.ops),n=a.iterator(t.ops),r=[],i=n.peek();if(null!=i&&"number"==typeof i.retain&&null==i.attributes){for(var s=i.retain;"insert"===e.peekType()&&e.peekLength()<=s;)s-=e.peekLength(),r.push(e.next());i.retain-s>0&&n.next(i.retain-s)}for(var u=new l(r);e.hasNext()||n.hasNext();)if("insert"===n.peekType())u.push(n.next());else if("delete"===e.peekType())u.push(e.next());else{var c=Math.min(e.peekLength(),n.peekLength()),d=e.next(c),f=n.next(c);if("number"==typeof f.retain){var h={};"number"==typeof d.retain?h.retain=c:h.insert=d.insert;var p=a.attributes.compose(d.attributes,f.attributes,"number"==typeof d.retain);if(p&&(h.attributes=p),u.push(h),!n.hasNext()&&o(u.ops[u.ops.length-1],h)){var m=new l(e.rest());return u.concat(m).chop()}}else"number"==typeof f.delete&&"number"==typeof d.retain&&u.push(f)}return u.chop()},l.prototype.concat=function(t){var e=new l(this.ops.slice());return t.ops.length>0&&(e.push(t.ops[0]),e.ops=e.ops.concat(t.ops.slice(1))),e},l.prototype.diff=function(t,e){if(this.ops===t.ops)return new l;var n=[this,t].map((function(e){return e.map((function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:s;throw new Error("diff() called "+(e===t?"on":"with")+" non-document")})).join("")})),i=new l,u=r(n[0],n[1],e),c=a.iterator(this.ops),d=a.iterator(t.ops);return u.forEach((function(t){for(var e=t[1].length;e>0;){var n=0;switch(t[0]){case r.INSERT:n=Math.min(d.peekLength(),e),i.push(d.next(n));break;case r.DELETE:n=Math.min(e,c.peekLength()),c.next(n),i.delete(n);break;case r.EQUAL:n=Math.min(c.peekLength(),d.peekLength(),e);var s=c.next(n),l=d.next(n);o(s.insert,l.insert)?i.retain(n,a.attributes.diff(s.attributes,l.attributes)):i.push(l).delete(n)}e-=n}})),i.chop()},l.prototype.eachLine=function(t,e){e=e||"\n";for(var n=a.iterator(this.ops),r=new l,o=0;n.hasNext();){if("insert"!==n.peekType())return;var i=n.peek(),s=a.length(i)-n.peekLength(),u="string"==typeof i.insert?i.insert.indexOf(e,s)-s:-1;if(u<0)r.push(n.next());else if(u>0)r.push(n.next(u));else{if(!1===t(r,n.next(1).attributes||{},o))return;o+=1,r=new l}}r.length()>0&&t(r,{},o)},l.prototype.transform=function(t,e){if(e=!!e,"number"==typeof t)return this.transformPosition(t,e);for(var n=a.iterator(this.ops),r=a.iterator(t.ops),o=new l;n.hasNext()||r.hasNext();)if("insert"!==n.peekType()||!e&&"insert"===r.peekType())if("insert"===r.peekType())o.push(r.next());else{var i=Math.min(n.peekLength(),r.peekLength()),s=n.next(i),u=r.next(i);if(s.delete)continue;u.delete?o.push(u):o.retain(i,a.attributes.transform(s.attributes,u.attributes,e))}else o.retain(a.length(n.next()));return o.chop()},l.prototype.transformPosition=function(t,e){e=!!e;for(var n=a.iterator(this.ops),r=0;n.hasNext()&&r<=t;){var o=n.peekLength(),i=n.peekType();n.next(),"delete"!==i?("insert"===i&&(r<t||!e)&&(t+=o),r+=o):t-=Math.min(o,t-r)}return t},t.exports=l},function(t,e){"use strict";var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,o=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=function(t){return"function"==typeof Array.isArray?Array.isArray(t):"[object Array]"===r.call(t)},s=function(t){if(!t||"[object Object]"!==r.call(t))return!1;var e,o=n.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!o&&!i)return!1;for(e in t);return void 0===e||n.call(t,e)},l=function(t,e){o&&"__proto__"===e.name?o(t,e.name,{enumerable:!0,configurable:!0,value:e.newValue,writable:!0}):t[e.name]=e.newValue},u=function(t,e){if("__proto__"===e){if(!n.call(t,e))return;if(i)return i(t,e).value}return t[e]};t.exports=function t(){var e,n,r,o,i,c,d=arguments[0],f=1,h=arguments.length,p=!1;for("boolean"==typeof d&&(p=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<h;++f)if(null!=(e=arguments[f]))for(n in e)r=u(d,n),d!==(o=u(e,n))&&(p&&o&&(s(o)||(i=a(o)))?(i?(i=!1,c=r&&a(r)?r:[]):c=r&&s(r)?r:{},l(d,{name:n,newValue:t(p,c,o)})):void 0!==o&&l(d,{name:n,newValue:o}));return d}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BlockEmbed=e.bubbleFormats=void 0;var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},i=d(n(3)),a=d(n(2)),s=d(n(0)),l=d(n(16)),u=d(n(6)),c=d(n(7));function d(t){return t&&t.__esModule?t:{default:t}}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function p(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var m=function(t){function e(){return f(this,e),h(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return p(e,t),r(e,[{key:"attach",value:function(){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"attach",this).call(this),this.attributes=new s.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return(new a.default).insert(this.value(),(0,i.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(t,e){var n=s.default.query(t,s.default.Scope.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,e)}},{key:"formatAt",value:function(t,e,n,r){this.format(n,r)}},{key:"insertAt",value:function(t,n,r){if("string"==typeof n&&n.endsWith("\n")){var i=s.default.create(g.blotName);this.parent.insertBefore(i,0===t?this:this.next),i.insertAt(0,n.slice(0,-1))}else o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,r)}}]),e}(s.default.Embed);m.scope=s.default.Scope.BLOCK_BLOT;var g=function(t){function e(t){f(this,e);var n=h(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.cache={},n}return p(e,t),r(e,[{key:"delta",value:function(){return null==this.cache.delta&&(this.cache.delta=this.descendants(s.default.Leaf).reduce((function(t,e){return 0===e.length()?t:t.insert(e.value(),v(e))}),new a.default).insert("\n",v(this))),this.cache.delta}},{key:"deleteAt",value:function(t,n){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"deleteAt",this).call(this,t,n),this.cache={}}},{key:"formatAt",value:function(t,n,r,i){n<=0||(s.default.query(r,s.default.Scope.BLOCK)?t+n===this.length()&&this.format(r,i):o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,Math.min(n,this.length()-t-1),r,i),this.cache={})}},{key:"insertAt",value:function(t,n,r){if(null!=r)return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,r);if(0!==n.length){var i=n.split("\n"),a=i.shift();a.length>0&&(t<this.length()-1||null==this.children.tail?o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,Math.min(t,this.length()-1),a):this.children.tail.insertAt(this.children.tail.length(),a),this.cache={});var s=this;i.reduce((function(t,e){return(s=s.split(t,!0)).insertAt(0,e),e.length}),t+a.length)}}},{key:"insertBefore",value:function(t,n){var r=this.children.head;o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n),r instanceof l.default&&r.remove(),this.cache={}}},{key:"length",value:function(){return null==this.cache.length&&(this.cache.length=o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"length",this).call(this)+1),this.cache.length}},{key:"moveChildren",value:function(t,n){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"moveChildren",this).call(this,t,n),this.cache={}}},{key:"optimize",value:function(t){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),this.cache={}}},{key:"path",value:function(t){return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t,!0)}},{key:"removeChild",value:function(t){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"removeChild",this).call(this,t),this.cache={}}},{key:"split",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===t||t>=this.length()-1)){var r=this.clone();return 0===t?(this.parent.insertBefore(r,this),this):(this.parent.insertBefore(r,this.next),r)}var i=o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"split",this).call(this,t,n);return this.cache={},i}}]),e}(s.default.Block);function v(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==t?e:("function"==typeof t.formats&&(e=(0,i.default)(e,t.formats())),null==t.parent||"scroll"==t.parent.blotName||t.parent.statics.scope!==t.statics.scope?e:v(t.parent,e))}g.blotName="block",g.tagName="P",g.defaultChild="break",g.allowedChildren=[u.default,s.default.Embed,c.default],e.bubbleFormats=v,e.BlockEmbed=m,e.default=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.overload=e.expandConfig=void 0;var 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},o=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();n(50);var a=g(n(2)),s=g(n(14)),l=g(n(8)),u=g(n(9)),c=g(n(0)),d=n(15),f=g(d),h=g(n(3)),p=g(n(10)),m=g(n(34));function g(t){return t&&t.__esModule?t:{default:t}}function v(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var b=(0,p.default)("quill"),_=function(){function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(y(this,t),this.options=w(e,r),this.container=this.options.container,null==this.container)return b.error("Invalid Quill container",e);this.options.debug&&t.debug(this.options.debug);var o=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new l.default,this.scroll=c.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new s.default(this.scroll),this.selection=new f.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(l.default.events.EDITOR_CHANGE,(function(t){t===l.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())})),this.emitter.on(l.default.events.SCROLL_UPDATE,(function(t,e){var r=n.selection.lastRange,o=r&&0===r.length?r.index:void 0;k.call(n,(function(){return n.editor.update(null,e,o)}),t)}));var i=this.clipboard.convert("<div class='ql-editor' style=\"white-space: normal;\">"+o+"<p><br></p></div>");this.setContents(i),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return i(t,null,[{key:"debug",value:function(t){!0===t&&(t="log"),p.default.level(t)}},{key:"find",value:function(t){return t.__quill||c.default.find(t)}},{key:"import",value:function(t){return null==this.imports[t]&&b.error("Cannot import "+t+". Are you sure it was registered?"),this.imports[t]}},{key:"register",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof t){var o=t.attrName||t.blotName;"string"==typeof o?this.register("formats/"+o,t,e):Object.keys(t).forEach((function(r){n.register(r,t[r],e)}))}else null==this.imports[t]||r||b.warn("Overwriting "+t+" with",e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&"abstract"!==e.blotName?c.default.register(e):t.startsWith("modules")&&"function"==typeof e.register&&e.register()}}]),i(t,[{key:"addContainer",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof t){var n=t;(t=document.createElement("div")).classList.add(n)}return this.container.insertBefore(t,e),t}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(t,e,n){var r=this,i=C(t,e,n),a=o(i,4);return t=a[0],e=a[1],n=a[3],k.call(this,(function(){return r.editor.deleteText(t,e)}),n,t,-1*e)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}},{key:"focus",value:function(){var t=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=t,this.scrollIntoView()}},{key:"format",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;return k.call(this,(function(){var r=n.getSelection(!0),o=new a.default;if(null==r)return o;if(c.default.query(t,c.default.Scope.BLOCK))o=n.editor.formatLine(r.index,r.length,v({},t,e));else{if(0===r.length)return n.selection.format(t,e),o;o=n.editor.formatText(r.index,r.length,v({},t,e))}return n.setSelection(r,l.default.sources.SILENT),o}),r)}},{key:"formatLine",value:function(t,e,n,r,i){var a,s=this,l=C(t,e,n,r,i),u=o(l,4);return t=u[0],e=u[1],a=u[2],i=u[3],k.call(this,(function(){return s.editor.formatLine(t,e,a)}),i,t,0)}},{key:"formatText",value:function(t,e,n,r,i){var a,s=this,l=C(t,e,n,r,i),u=o(l,4);return t=u[0],e=u[1],a=u[2],i=u[3],k.call(this,(function(){return s.editor.formatText(t,e,a)}),i,t,0)}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=void 0;n="number"==typeof t?this.selection.getBounds(t,e):this.selection.getBounds(t.index,t.length);var r=this.container.getBoundingClientRect();return{bottom:n.bottom-r.top,height:n.height,left:n.left-r.left,right:n.right-r.left,top:n.top-r.top,width:n.width}}},{key:"getContents",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=C(t,e),r=o(n,2);return t=r[0],e=r[1],this.editor.getContents(t,e)}},{key:"getFormat",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof t?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}},{key:"getIndex",value:function(t){return t.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(t){return this.scroll.leaf(t)}},{key:"getLine",value:function(t){return this.scroll.line(t)}},{key:"getLines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof t?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}},{key:"getModule",value:function(t){return this.theme.modules[t]}},{key:"getSelection",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=C(t,e),r=o(n,2);return t=r[0],e=r[1],this.editor.getText(t,e)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(e,n,r){var o=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.sources.API;return k.call(this,(function(){return o.editor.insertEmbed(e,n,r)}),i,e)}},{key:"insertText",value:function(t,e,n,r,i){var a,s=this,l=C(t,0,n,r,i),u=o(l,4);return t=u[0],a=u[2],i=u[3],k.call(this,(function(){return s.editor.insertText(t,e,a)}),i,t,e.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(t,e,n){this.clipboard.dangerouslyPasteHTML(t,e,n)}},{key:"removeFormat",value:function(t,e,n){var r=this,i=C(t,e,n),a=o(i,4);return t=a[0],e=a[1],n=a[3],k.call(this,(function(){return r.editor.removeFormat(t,e)}),n,t)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API;return k.call(this,(function(){t=new a.default(t);var n=e.getLength(),r=e.editor.deleteText(0,n),o=e.editor.applyDelta(t),i=o.ops[o.ops.length-1];return null!=i&&"string"==typeof i.insert&&"\n"===i.insert[i.insert.length-1]&&(e.editor.deleteText(e.getLength()-1,1),o.delete(1)),r.compose(o)}),n)}},{key:"setSelection",value:function(e,n,r){if(null==e)this.selection.setRange(null,n||t.sources.API);else{var i=C(e,n,r),a=o(i,4);e=a[0],n=a[1],r=a[3],this.selection.setRange(new d.Range(e,n),r),r!==l.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API,n=(new a.default).insert(t);return this.setContents(n,e)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.default.sources.USER,e=this.scroll.update(t);return this.selection.update(t),e}},{key:"updateContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API;return k.call(this,(function(){return t=new a.default(t),e.editor.applyDelta(t,n)}),n,!0)}}]),t}();function w(t,e){if((e=(0,h.default)(!0,{container:t,modules:{clipboard:!0,keyboard:!0,history:!0}},e)).theme&&e.theme!==_.DEFAULTS.theme){if(e.theme=_.import("themes/"+e.theme),null==e.theme)throw new Error("Invalid theme "+e.theme+". Did you register it?")}else e.theme=m.default;var n=(0,h.default)(!0,{},e.theme.DEFAULTS);[n,e].forEach((function(t){t.modules=t.modules||{},Object.keys(t.modules).forEach((function(e){!0===t.modules[e]&&(t.modules[e]={})}))}));var r=Object.keys(n.modules).concat(Object.keys(e.modules)).reduce((function(t,e){var n=_.import("modules/"+e);return null==n?b.error("Cannot load "+e+" module. Are you sure you registered it?"):t[e]=n.DEFAULTS||{},t}),{});return null!=e.modules&&e.modules.toolbar&&e.modules.toolbar.constructor!==Object&&(e.modules.toolbar={container:e.modules.toolbar}),e=(0,h.default)(!0,{},_.DEFAULTS,{modules:r},n,e),["bounds","container","scrollingContainer"].forEach((function(t){"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))})),e.modules=Object.keys(e.modules).reduce((function(t,n){return e.modules[n]&&(t[n]=e.modules[n]),t}),{}),e}function k(t,e,n,r){if(this.options.strict&&!this.isEnabled()&&e===l.default.sources.USER)return new a.default;var o=null==n?null:this.getSelection(),i=this.editor.delta,s=t();if(null!=o&&(!0===n&&(n=o.index),null==r?o=x(o,s,e):0!==r&&(o=x(o,n,r,e)),this.setSelection(o,l.default.sources.SILENT)),s.length()>0){var u,c,d=[l.default.events.TEXT_CHANGE,s,i,e];(u=this.emitter).emit.apply(u,[l.default.events.EDITOR_CHANGE].concat(d)),e!==l.default.sources.SILENT&&(c=this.emitter).emit.apply(c,d)}return s}function C(t,e,n,o,i){var a={};return"number"==typeof t.index&&"number"==typeof t.length?"number"!=typeof e?(i=o,o=n,n=e,e=t.length,t=t.index):(e=t.length,t=t.index):"number"!=typeof e&&(i=o,o=n,n=e,e=0),"object"===(void 0===n?"undefined":r(n))?(a=n,i=o):"string"==typeof n&&(null!=o?a[n]=o:i=n),[t,e,a,i=i||l.default.sources.API]}function x(t,e,n,r){if(null==t)return null;var i=void 0,s=void 0;if(e instanceof a.default){var u=[t.index,t.index+t.length].map((function(t){return e.transformPosition(t,r!==l.default.sources.USER)})),c=o(u,2);i=c[0],s=c[1]}else{var f=[t.index,t.index+t.length].map((function(t){return t<e||t===e&&r===l.default.sources.USER?t:n>=0?t+n:Math.max(e,t+n)})),h=o(f,2);i=h[0],s=h[1]}return new d.Range(i,s-i)}_.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},_.events=l.default.events,_.sources=l.default.sources,_.version="1.3.7",_.imports={delta:a.default,parchment:c.default,"core/module":u.default,"core/theme":m.default},e.expandConfig=w,e.overload=C,e.default=_},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},i=s(n(7)),a=s(n(0));function s(t){return t&&t.__esModule?t:{default:t}}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var c=function(t){function e(){return l(this,e),u(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"formatAt",value:function(t,n,r,i){if(e.compare(this.statics.blotName,r)<0&&a.default.query(r,a.default.Scope.BLOT)){var s=this.isolate(t,n);i&&s.wrap(r,i)}else o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,r,i)}},{key:"optimize",value:function(t){if(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),this.parent instanceof e&&e.compare(this.statics.blotName,this.parent.statics.blotName)>0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(t,n){var r=e.order.indexOf(t),o=e.order.indexOf(n);return r>=0||o>=0?r-o:t===n?0:t<n?-1:1}}]),e}(a.default.Inline);c.allowedChildren=[c,a.default.Embed,i.default],c.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(0);function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var s=function(t){function e(){return i(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(((r=o)&&r.__esModule?r:{default:r}).default.Text);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},i=a(n(54));function a(t){return t&&t.__esModule?t:{default:t}}var s=(0,a(n(10)).default)("quill:events");["selectionchange","mousedown","mouseup","click"].forEach((function(t){document.addEventListener(t,(function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];[].slice.call(document.querySelectorAll(".ql-container")).forEach((function(t){var n;t.__quill&&t.__quill.emitter&&(n=t.__quill.emitter).handleDOM.apply(n,e)}))}))}));var l=function(t){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var t=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.listeners={},t.on("error",s.error),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"emit",value:function(){s.log.apply(s,arguments),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];(this.listeners[t.type]||[]).forEach((function(e){var r=e.node,o=e.handler;(t.target===r||r.contains(t.target))&&o.apply(void 0,[t].concat(n))}))}},{key:"listenDOM",value:function(t,e,n){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push({node:e,handler:n})}}]),e}(i.default);l.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},l.sources={API:"api",SILENT:"silent",USER:"user"},e.default=l},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r(this,t),this.quill=e,this.options=n};o.DEFAULTS={},e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=["error","warn","log","info"],o="warn";function i(t){if(r.indexOf(t)<=r.indexOf(o)){for(var e,n=arguments.length,i=Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];(e=console)[t].apply(e,i)}}function a(t){return r.reduce((function(e,n){return e[n]=i.bind(console,n,t),e}),{})}i.level=a.level=function(t){o=t},e.default=a},function(t,e,n){var r=Array.prototype.slice,o=n(52),i=n(53),a=t.exports=function(t,e,n){return n||(n={}),t===e||(t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():!t||!e||"object"!=typeof t&&"object"!=typeof e?n.strict?t===e:t==e:function(t,e,n){var u,c;if(s(t)||s(e))return!1;if(t.prototype!==e.prototype)return!1;if(i(t))return!!i(e)&&(t=r.call(t),e=r.call(e),a(t,e,n));if(l(t)){if(!l(e))return!1;if(t.length!==e.length)return!1;for(u=0;u<t.length;u++)if(t[u]!==e[u])return!1;return!0}try{var d=o(t),f=o(e)}catch(t){return!1}if(d.length!=f.length)return!1;for(d.sort(),f.sort(),u=d.length-1;u>=0;u--)if(d[u]!=f[u])return!1;for(u=d.length-1;u>=0;u--)if(c=d[u],!a(t[c],e[c],n))return!1;return typeof t==typeof e}(t,e,n))};function s(t){return null==t}function l(t){return!(!t||"object"!=typeof t||"number"!=typeof t.length||"function"!=typeof t.copy||"function"!=typeof t.slice||t.length>0&&"number"!=typeof t[0])}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),o=function(){function t(t,e,n){void 0===n&&(n={}),this.attrName=t,this.keyName=e;var o=r.Scope.TYPE&r.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&r.Scope.LEVEL|o:this.scope=r.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return t.keys=function(t){return[].map.call(t.attributes,(function(t){return t.name}))},t.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.setAttribute(this.keyName,e),!0)},t.prototype.canAdd=function(t,e){return null!=r.query(t,r.Scope.BLOT&(this.scope|r.Scope.TYPE))&&(null==this.whitelist||("string"==typeof e?this.whitelist.indexOf(e.replace(/["']/g,""))>-1:this.whitelist.indexOf(e)>-1))},t.prototype.remove=function(t){t.removeAttribute(this.keyName)},t.prototype.value=function(t){var e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""},t}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Code=void 0;var r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},a=d(n(2)),s=d(n(0)),l=d(n(4)),u=d(n(6)),c=d(n(7));function d(t){return t&&t.__esModule?t:{default:t}}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function p(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var m=function(t){function e(){return f(this,e),h(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return p(e,t),e}(u.default);m.blotName="code",m.tagName="CODE";var g=function(t){function e(){return f(this,e),h(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return p(e,t),o(e,[{key:"delta",value:function(){var t=this,e=this.domNode.textContent;return e.endsWith("\n")&&(e=e.slice(0,-1)),e.split("\n").reduce((function(e,n){return e.insert(n).insert("\n",t.formats())}),new a.default)}},{key:"format",value:function(t,n){if(t!==this.statics.blotName||!n){var o=this.descendant(c.default,this.length()-1),a=r(o,1)[0];null!=a&&a.deleteAt(a.length()-1,1),i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}},{key:"formatAt",value:function(t,n,r,o){if(0!==n&&null!=s.default.query(r,s.default.Scope.BLOCK)&&(r!==this.statics.blotName||o!==this.statics.formats(this.domNode))){var i=this.newlineIndex(t);if(!(i<0||i>=t+n)){var a=this.newlineIndex(t,!0)+1,l=i-a+1,u=this.isolate(a,l),c=u.next;u.format(r,o),c instanceof e&&c.formatAt(0,t-a+n-l,r,o)}}}},{key:"insertAt",value:function(t,e,n){if(null==n){var o=this.descendant(c.default,t),i=r(o,2),a=i[0],s=i[1];a.insertAt(s,e)}}},{key:"length",value:function(){var t=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?t:t+1}},{key:"newlineIndex",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e)return this.domNode.textContent.slice(0,t).lastIndexOf("\n");var n=this.domNode.textContent.slice(t).indexOf("\n");return n>-1?t+n:-1}},{key:"optimize",value:function(t){this.domNode.textContent.endsWith("\n")||this.appendChild(s.default.create("text","\n")),i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===n.statics.formats(n.domNode)&&(n.optimize(t),n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t),[].slice.call(this.domNode.querySelectorAll("*")).forEach((function(t){var e=s.default.find(t);null==e?t.parentNode.removeChild(t):e instanceof s.default.Embed?e.remove():e.unwrap()}))}}],[{key:"create",value:function(t){var n=i(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),e}(l.default);g.blotName="code-block",g.tagName="PRE",g.TAB=" ",e.Code=m,e.default=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var 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},o=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=v(n(2)),s=v(n(20)),l=v(n(0)),u=v(n(13)),c=v(n(24)),d=n(4),f=v(d),h=v(n(16)),p=v(n(21)),m=v(n(11)),g=v(n(3));function v(t){return t&&t.__esModule?t:{default:t}}var y=/^[ -~]*$/,b=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.scroll=e,this.delta=this.getDelta()}return i(t,[{key:"applyDelta",value:function(t){var e=this,n=!1;this.scroll.update();var i=this.scroll.length();return this.scroll.batchStart(),(t=function(t){return t.reduce((function(t,e){if(1===e.insert){var n=(0,p.default)(e.attributes);return delete n.image,t.insert({image:e.attributes.image},n)}if(null==e.attributes||!0!==e.attributes.list&&!0!==e.attributes.bullet||((e=(0,p.default)(e)).attributes.list?e.attributes.list="ordered":(e.attributes.list="bullet",delete e.attributes.bullet)),"string"==typeof e.insert){var r=e.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return t.insert(r,e.attributes)}return t.push(e)}),new a.default)}(t)).reduce((function(t,a){var u=a.retain||a.delete||a.insert.length||1,c=a.attributes||{};if(null!=a.insert){if("string"==typeof a.insert){var h=a.insert;h.endsWith("\n")&&n&&(n=!1,h=h.slice(0,-1)),t>=i&&!h.endsWith("\n")&&(n=!0),e.scroll.insertAt(t,h);var p=e.scroll.line(t),m=o(p,2),v=m[0],y=m[1],b=(0,g.default)({},(0,d.bubbleFormats)(v));if(v instanceof f.default){var _=v.descendant(l.default.Leaf,y),w=o(_,1)[0];b=(0,g.default)(b,(0,d.bubbleFormats)(w))}c=s.default.attributes.diff(b,c)||{}}else if("object"===r(a.insert)){var k=Object.keys(a.insert)[0];if(null==k)return t;e.scroll.insertAt(t,k,a.insert[k])}i+=u}return Object.keys(c).forEach((function(n){e.scroll.formatAt(t,u,n,c[n])})),t+u}),0),t.reduce((function(t,n){return"number"==typeof n.delete?(e.scroll.deleteAt(t,n.delete),t):t+(n.retain||n.insert.length||1)}),0),this.scroll.batchEnd(),this.update(t)}},{key:"deleteText",value:function(t,e){return this.scroll.deleteAt(t,e),this.update((new a.default).retain(t).delete(e))}},{key:"formatLine",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(r).forEach((function(o){if(null==n.scroll.whitelist||n.scroll.whitelist[o]){var i=n.scroll.lines(t,Math.max(e,1)),a=e;i.forEach((function(e){var i=e.length();if(e instanceof u.default){var s=t-e.offset(n.scroll),l=e.newlineIndex(s+a)-s+1;e.formatAt(s,l,o,r[o])}else e.format(o,r[o]);a-=i}))}})),this.scroll.optimize(),this.update((new a.default).retain(t).retain(e,(0,p.default)(r)))}},{key:"formatText",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(r).forEach((function(o){n.scroll.formatAt(t,e,o,r[o])})),this.update((new a.default).retain(t).retain(e,(0,p.default)(r)))}},{key:"getContents",value:function(t,e){return this.delta.slice(t,t+e)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce((function(t,e){return t.concat(e.delta())}),new a.default)}},{key:"getFormat",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=[];0===e?this.scroll.path(t).forEach((function(t){var e=o(t,1)[0];e instanceof f.default?n.push(e):e instanceof l.default.Leaf&&r.push(e)})):(n=this.scroll.lines(t,e),r=this.scroll.descendants(l.default.Leaf,t,e));var i=[n,r].map((function(t){if(0===t.length)return{};for(var e=(0,d.bubbleFormats)(t.shift());Object.keys(e).length>0;){var n=t.shift();if(null==n)return e;e=_((0,d.bubbleFormats)(n),e)}return e}));return g.default.apply(g.default,i)}},{key:"getText",value:function(t,e){return this.getContents(t,e).filter((function(t){return"string"==typeof t.insert})).map((function(t){return t.insert})).join("")}},{key:"insertEmbed",value:function(t,e,n){return this.scroll.insertAt(t,e,n),this.update((new a.default).retain(t).insert(function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},e,n)))}},{key:"insertText",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(t,e),Object.keys(r).forEach((function(o){n.scroll.formatAt(t,e.length,o,r[o])})),this.update((new a.default).retain(t).insert(e,(0,p.default)(r)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var t=this.scroll.children.head;return t.statics.blotName===f.default.blotName&&!(t.children.length>1)&&t.children.head instanceof h.default}},{key:"removeFormat",value:function(t,e){var n=this.getText(t,e),r=this.scroll.line(t+e),i=o(r,2),s=i[0],l=i[1],c=0,d=new a.default;null!=s&&(c=s instanceof u.default?s.newlineIndex(l)-l+1:s.length()-l,d=s.delta().slice(l,l+c-1).insert("\n"));var f=this.getContents(t,e+c).diff((new a.default).insert(n).concat(d)),h=(new a.default).retain(t).concat(f);return this.applyDelta(h)}},{key:"update",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=this.delta;if(1===e.length&&"characterData"===e[0].type&&e[0].target.data.match(y)&&l.default.find(e[0].target)){var o=l.default.find(e[0].target),i=(0,d.bubbleFormats)(o),s=o.offset(this.scroll),u=e[0].oldValue.replace(c.default.CONTENTS,""),f=(new a.default).insert(u),h=(new a.default).insert(o.value()),p=(new a.default).retain(s).concat(f.diff(h,n));t=p.reduce((function(t,e){return e.insert?t.insert(e.insert,i):t.push(e)}),new a.default),this.delta=r.compose(t)}else this.delta=this.getDelta(),t&&(0,m.default)(r.compose(t),this.delta)||(t=r.diff(this.delta,n));return t}}]),t}();function _(t,e){return Object.keys(e).reduce((function(n,r){return null==t[r]||(e[r]===t[r]?n[r]=e[r]:Array.isArray(e[r])?e[r].indexOf(t[r])<0&&(n[r]=e[r].concat([t[r]])):n[r]=[e[r],t[r]]),n}),{})}e.default=b},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Range=void 0;var r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=u(n(0)),a=u(n(21)),s=u(n(11)),l=u(n(8));function u(t){return t&&t.__esModule?t:{default:t}}function c(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var f=(0,u(n(10)).default)("quill:selection"),h=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;d(this,t),this.index=e,this.length=n},p=function(){function t(e,n){var r=this;d(this,t),this.emitter=n,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=i.default.create("cursor",this),this.lastRange=this.savedRange=new h(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,(function(){r.mouseDown||setTimeout(r.update.bind(r,l.default.sources.USER),1)})),this.emitter.on(l.default.events.EDITOR_CHANGE,(function(t,e){t===l.default.events.TEXT_CHANGE&&e.length()>0&&r.update(l.default.sources.SILENT)})),this.emitter.on(l.default.events.SCROLL_BEFORE_UPDATE,(function(){if(r.hasFocus()){var t=r.getNativeRange();null!=t&&t.start.node!==r.cursor.textNode&&r.emitter.once(l.default.events.SCROLL_UPDATE,(function(){try{r.setNativeRange(t.start.node,t.start.offset,t.end.node,t.end.offset)}catch(t){}}))}})),this.emitter.on(l.default.events.SCROLL_OPTIMIZE,(function(t,e){if(e.range){var n=e.range,o=n.startNode,i=n.startOffset,a=n.endNode,s=n.endOffset;r.setNativeRange(o,i,a,s)}})),this.update(l.default.sources.SILENT)}return o(t,[{key:"handleComposition",value:function(){var t=this;this.root.addEventListener("compositionstart",(function(){t.composing=!0})),this.root.addEventListener("compositionend",(function(){if(t.composing=!1,t.cursor.parent){var e=t.cursor.restore();if(!e)return;setTimeout((function(){t.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)}),1)}}))}},{key:"handleDragging",value:function(){var t=this;this.emitter.listenDOM("mousedown",document.body,(function(){t.mouseDown=!0})),this.emitter.listenDOM("mouseup",document.body,(function(){t.mouseDown=!1,t.update(l.default.sources.USER)}))}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(t,e){if(null==this.scroll.whitelist||this.scroll.whitelist[t]){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!i.default.query(t,i.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var r=i.default.find(n.start.node,!1);if(null==r)return;if(r instanceof i.default.Leaf){var o=r.split(n.start.offset);r.parent.insertBefore(this.cursor,o)}else r.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(t,e),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.scroll.length();t=Math.min(t,n-1),e=Math.min(t+e,n-1)-t;var o=void 0,i=this.scroll.leaf(t),a=r(i,2),s=a[0],l=a[1];if(null==s)return null;var u=s.position(l,!0),c=r(u,2);o=c[0],l=c[1];var d=document.createRange();if(e>0){d.setStart(o,l);var f=this.scroll.leaf(t+e),h=r(f,2);if(s=h[0],l=h[1],null==s)return null;var p=s.position(l,!0),m=r(p,2);return o=m[0],l=m[1],d.setEnd(o,l),d.getBoundingClientRect()}var g="left",v=void 0;return o instanceof Text?(l<o.data.length?(d.setStart(o,l),d.setEnd(o,l+1)):(d.setStart(o,l-1),d.setEnd(o,l),g="right"),v=d.getBoundingClientRect()):(v=s.domNode.getBoundingClientRect(),l>0&&(g="right")),{bottom:v.top+v.height,height:v.height,left:v[g],right:v[g],top:v.top,width:0}}},{key:"getNativeRange",value:function(){var t=document.getSelection();if(null==t||t.rangeCount<=0)return null;var e=t.getRangeAt(0);if(null==e)return null;var n=this.normalizeNative(e);return f.info("getNativeRange",n),n}},{key:"getRange",value:function(){var t=this.getNativeRange();return null==t?[null,null]:[this.normalizedToRange(t),t]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(t){var e=this,n=[[t.start.node,t.start.offset]];t.native.collapsed||n.push([t.end.node,t.end.offset]);var o=n.map((function(t){var n=r(t,2),o=n[0],a=n[1],s=i.default.find(o,!0),l=s.offset(e.scroll);return 0===a?l:s instanceof i.default.Container?l+s.length():l+s.index(o,a)})),a=Math.min(Math.max.apply(Math,c(o)),this.scroll.length()-1),s=Math.min.apply(Math,[a].concat(c(o)));return new h(s,a-s)}},{key:"normalizeNative",value:function(t){if(!m(this.root,t.startContainer)||!t.collapsed&&!m(this.root,t.endContainer))return null;var e={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[e.start,e.end].forEach((function(t){for(var e=t.node,n=t.offset;!(e instanceof Text)&&e.childNodes.length>0;)if(e.childNodes.length>n)e=e.childNodes[n],n=0;else{if(e.childNodes.length!==n)break;n=(e=e.lastChild)instanceof Text?e.data.length:e.childNodes.length+1}t.node=e,t.offset=n})),e}},{key:"rangeToNative",value:function(t){var e=this,n=t.collapsed?[t.index]:[t.index,t.index+t.length],o=[],i=this.scroll.length();return n.forEach((function(t,n){t=Math.min(i-1,t);var a,s=e.scroll.leaf(t),l=r(s,2),u=l[0],c=l[1],d=u.position(c,0!==n),f=r(d,2);a=f[0],c=f[1],o.push(a,c)})),o.length<2&&(o=o.concat(o)),o}},{key:"scrollIntoView",value:function(t){var e=this.lastRange;if(null!=e){var n=this.getBounds(e.index,e.length);if(null!=n){var o=this.scroll.length()-1,i=this.scroll.line(Math.min(e.index,o)),a=r(i,1)[0],s=a;if(e.length>0){var l=this.scroll.line(Math.min(e.index+e.length,o));s=r(l,1)[0]}if(null!=a&&null!=s){var u=t.getBoundingClientRect();n.top<u.top?t.scrollTop-=u.top-n.top:n.bottom>u.bottom&&(t.scrollTop+=n.bottom-u.bottom)}}}}},{key:"setNativeRange",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(f.info("setNativeRange",t,e,n,r),null==t||null!=this.root.parentNode&&null!=t.parentNode&&null!=n.parentNode){var i=document.getSelection();if(null!=i)if(null!=t){this.hasFocus()||this.root.focus();var a=(this.getNativeRange()||{}).native;if(null==a||o||t!==a.startContainer||e!==a.startOffset||n!==a.endContainer||r!==a.endOffset){"BR"==t.tagName&&(e=[].indexOf.call(t.parentNode.childNodes,t),t=t.parentNode),"BR"==n.tagName&&(r=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var s=document.createRange();s.setStart(t,e),s.setEnd(n,r),i.removeAllRanges(),i.addRange(s)}}else i.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;if("string"==typeof e&&(n=e,e=!1),f.info("setRange",t),null!=t){var r=this.rangeToNative(t);this.setNativeRange.apply(this,c(r).concat([e]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.default.sources.USER,e=this.lastRange,n=this.getRange(),o=r(n,2),i=o[0],u=o[1];if(this.lastRange=i,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,s.default)(e,this.lastRange)){var c;!this.composing&&null!=u&&u.native.collapsed&&u.start.node!==this.cursor.textNode&&this.cursor.restore();var d,f=[l.default.events.SELECTION_CHANGE,(0,a.default)(this.lastRange),(0,a.default)(e),t];(c=this.emitter).emit.apply(c,[l.default.events.EDITOR_CHANGE].concat(f)),t!==l.default.sources.SILENT&&(d=this.emitter).emit.apply(d,f)}}}]),t}();function m(t,e){try{e.parentNode}catch(t){return!1}return e instanceof Text&&(e=e.parentNode),t.contains(e)}e.Range=h,e.default=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},a=n(0);function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var u=function(t){function e(){return s(this,e),l(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"insertInto",value:function(t,n){0===t.children.length?i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertInto",this).call(this,t,n):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),e}(((r=a)&&r.__esModule?r:{default:r}).default.Embed);u.blotName="break",u.tagName="BR",e.default=u},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(44),a=n(30),s=n(1),l=function(t){function e(e){var n=t.call(this,e)||this;return n.build(),n}return o(e,t),e.prototype.appendChild=function(t){this.insertBefore(t)},e.prototype.attach=function(){t.prototype.attach.call(this),this.children.forEach((function(t){t.attach()}))},e.prototype.build=function(){var t=this;this.children=new i.default,[].slice.call(this.domNode.childNodes).reverse().forEach((function(e){try{var n=u(e);t.insertBefore(n,t.children.head||void 0)}catch(t){if(t instanceof s.ParchmentError)return;throw t}}))},e.prototype.deleteAt=function(t,e){if(0===t&&e===this.length())return this.remove();this.children.forEachAt(t,e,(function(t,e,n){t.deleteAt(e,n)}))},e.prototype.descendant=function(t,n){var r=this.children.find(n),o=r[0],i=r[1];return null==t.blotName&&t(o)||null!=t.blotName&&o instanceof t?[o,i]:o instanceof e?o.descendant(t,i):[null,-1]},e.prototype.descendants=function(t,n,r){void 0===n&&(n=0),void 0===r&&(r=Number.MAX_VALUE);var o=[],i=r;return this.children.forEachAt(n,r,(function(n,r,a){(null==t.blotName&&t(n)||null!=t.blotName&&n instanceof t)&&o.push(n),n instanceof e&&(o=o.concat(n.descendants(t,r,i))),i-=a})),o},e.prototype.detach=function(){this.children.forEach((function(t){t.detach()})),t.prototype.detach.call(this)},e.prototype.formatAt=function(t,e,n,r){this.children.forEachAt(t,e,(function(t,e,o){t.formatAt(e,o,n,r)}))},e.prototype.insertAt=function(t,e,n){var r=this.children.find(t),o=r[0],i=r[1];if(o)o.insertAt(i,e,n);else{var a=null==n?s.create("text",e):s.create(e,n);this.appendChild(a)}},e.prototype.insertBefore=function(t,e){if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some((function(e){return t instanceof e})))throw new s.ParchmentError("Cannot insert "+t.statics.blotName+" into "+this.statics.blotName);t.insertInto(this,e)},e.prototype.length=function(){return this.children.reduce((function(t,e){return t+e.length()}),0)},e.prototype.moveChildren=function(t,e){this.children.forEach((function(n){t.insertBefore(n,e)}))},e.prototype.optimize=function(e){if(t.prototype.optimize.call(this,e),0===this.children.length)if(null!=this.statics.defaultChild){var n=s.create(this.statics.defaultChild);this.appendChild(n),n.optimize(e)}else this.remove()},e.prototype.path=function(t,n){void 0===n&&(n=!1);var r=this.children.find(t,n),o=r[0],i=r[1],a=[[this,t]];return o instanceof e?a.concat(o.path(i,n)):(null!=o&&a.push([o,i]),a)},e.prototype.removeChild=function(t){this.children.remove(t)},e.prototype.replace=function(n){n instanceof e&&n.moveChildren(this),t.prototype.replace.call(this,n)},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=this.clone();return this.parent.insertBefore(n,this.next),this.children.forEachAt(t,this.length(),(function(t,r,o){t=t.split(r,e),n.appendChild(t)})),n},e.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},e.prototype.update=function(t,e){var n=this,r=[],o=[];t.forEach((function(t){t.target===n.domNode&&"childList"===t.type&&(r.push.apply(r,t.addedNodes),o.push.apply(o,t.removedNodes))})),o.forEach((function(t){if(!(null!=t.parentNode&&"IFRAME"!==t.tagName&&document.body.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var e=s.find(t);null!=e&&(null!=e.domNode.parentNode&&e.domNode.parentNode!==n.domNode||e.detach())}})),r.filter((function(t){return t.parentNode==n.domNode})).sort((function(t,e){return t===e?0:t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1})).forEach((function(t){var e=null;null!=t.nextSibling&&(e=s.find(t.nextSibling));var r=u(t);r.next==e&&null!=r.next||(null!=r.parent&&r.parent.removeChild(n),n.insertBefore(r,e||void 0))}))},e}(a.default);function u(t){var e=s.find(t);if(null==e)try{e=s.create(t)}catch(n){e=s.create(s.Scope.INLINE),[].slice.call(t.childNodes).forEach((function(t){e.domNode.appendChild(t)})),t.parentNode&&t.parentNode.replaceChild(e.domNode,t),e.attach()}return e}e.default=l},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(12),a=n(31),s=n(17),l=n(1),u=function(t){function e(e){var n=t.call(this,e)||this;return n.attributes=new a.default(n.domNode),n}return o(e,t),e.formats=function(t){return"string"==typeof this.tagName||(Array.isArray(this.tagName)?t.tagName.toLowerCase():void 0)},e.prototype.format=function(t,e){var n=l.query(t);n instanceof i.default?this.attributes.attribute(n,e):e&&(null==n||t===this.statics.blotName&&this.formats()[t]===e||this.replaceWith(t,e))},e.prototype.formats=function(){var t=this.attributes.values(),e=this.statics.formats(this.domNode);return null!=e&&(t[this.statics.blotName]=e),t},e.prototype.replaceWith=function(e,n){var r=t.prototype.replaceWith.call(this,e,n);return this.attributes.copy(r),r},e.prototype.update=function(e,n){var r=this;t.prototype.update.call(this,e,n),e.some((function(t){return t.target===r.domNode&&"attributes"===t.type}))&&this.attributes.build()},e.prototype.wrap=function(n,r){var o=t.prototype.wrap.call(this,n,r);return o instanceof e&&o.statics.scope===this.statics.scope&&this.attributes.move(o),o},e}(s.default);e.default=u},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(30),a=n(1),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.value=function(t){return!0},e.prototype.index=function(t,e){return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(e,1):-1},e.prototype.position=function(t,e){var n=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return t>0&&(n+=1),[this.parent.domNode,n]},e.prototype.value=function(){var t;return(t={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,t},e.scope=a.Scope.INLINE_BLOT,e}(i.default);e.default=s},function(t,e,n){var r=n(11),o=n(3),i={attributes:{compose:function(t,e,n){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var r=o(!0,{},e);for(var i in n||(r=Object.keys(r).reduce((function(t,e){return null!=r[e]&&(t[e]=r[e]),t}),{})),t)void 0!==t[i]&&void 0===e[i]&&(r[i]=t[i]);return Object.keys(r).length>0?r:void 0},diff:function(t,e){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var n=Object.keys(t).concat(Object.keys(e)).reduce((function(n,o){return r(t[o],e[o])||(n[o]=void 0===e[o]?null:e[o]),n}),{});return Object.keys(n).length>0?n:void 0},transform:function(t,e,n){if("object"!=typeof t)return e;if("object"==typeof e){if(!n)return e;var r=Object.keys(e).reduce((function(n,r){return void 0===t[r]&&(n[r]=e[r]),n}),{});return Object.keys(r).length>0?r:void 0}}},iterator:function(t){return new a(t)},length:function(t){return"number"==typeof t.delete?t.delete:"number"==typeof t.retain?t.retain:"string"==typeof t.insert?t.insert.length:1}};function a(t){this.ops=t,this.index=0,this.offset=0}a.prototype.hasNext=function(){return this.peekLength()<1/0},a.prototype.next=function(t){t||(t=1/0);var e=this.ops[this.index];if(e){var n=this.offset,r=i.length(e);if(t>=r-n?(t=r-n,this.index+=1,this.offset=0):this.offset+=t,"number"==typeof e.delete)return{delete:t};var o={};return e.attributes&&(o.attributes=e.attributes),"number"==typeof e.retain?o.retain=t:"string"==typeof e.insert?o.insert=e.insert.substr(n,t):o.insert=e.insert,o}return{retain:1/0}},a.prototype.peek=function(){return this.ops[this.index]},a.prototype.peekLength=function(){return this.ops[this.index]?i.length(this.ops[this.index])-this.offset:1/0},a.prototype.peekType=function(){return this.ops[this.index]?"number"==typeof this.ops[this.index].delete?"delete":"number"==typeof this.ops[this.index].retain?"retain":"insert":"retain"},a.prototype.rest=function(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);var t=this.offset,e=this.index,n=this.next(),r=this.ops.slice(this.index);return this.offset=t,this.index=e,[n].concat(r)}return[]},t.exports=i},function(t,e){var n=function(){"use strict";function t(t,e){return null!=e&&t instanceof e}var e,n,r;try{e=Map}catch(t){e=function(){}}try{n=Set}catch(t){n=function(){}}try{r=Promise}catch(t){r=function(){}}function i(a,l,u,c,d){"object"==typeof l&&(u=l.depth,c=l.prototype,d=l.includeNonEnumerable,l=l.circular);var f=[],h=[],p=void 0!==o;return void 0===l&&(l=!0),void 0===u&&(u=1/0),function a(u,m){if(null===u)return null;if(0===m)return u;var g,v;if("object"!=typeof u)return u;if(t(u,e))g=new e;else if(t(u,n))g=new n;else if(t(u,r))g=new r((function(t,e){u.then((function(e){t(a(e,m-1))}),(function(t){e(a(t,m-1))}))}));else if(i.__isArray(u))g=[];else if(i.__isRegExp(u))g=new RegExp(u.source,s(u)),u.lastIndex&&(g.lastIndex=u.lastIndex);else if(i.__isDate(u))g=new Date(u.getTime());else{if(p&&o.isBuffer(u))return g=o.allocUnsafe?o.allocUnsafe(u.length):new o(u.length),u.copy(g),g;t(u,Error)?g=Object.create(u):void 0===c?(v=Object.getPrototypeOf(u),g=Object.create(v)):(g=Object.create(c),v=c)}if(l){var y=f.indexOf(u);if(-1!=y)return h[y];f.push(u),h.push(g)}for(var b in t(u,e)&&u.forEach((function(t,e){var n=a(e,m-1),r=a(t,m-1);g.set(n,r)})),t(u,n)&&u.forEach((function(t){var e=a(t,m-1);g.add(e)})),u){var _;v&&(_=Object.getOwnPropertyDescriptor(v,b)),_&&null==_.set||(g[b]=a(u[b],m-1))}if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(u);for(b=0;b<w.length;b++){var k=w[b];(!(x=Object.getOwnPropertyDescriptor(u,k))||x.enumerable||d)&&(g[k]=a(u[k],m-1),x.enumerable||Object.defineProperty(g,k,{enumerable:!1}))}}if(d){var C=Object.getOwnPropertyNames(u);for(b=0;b<C.length;b++){var x,S=C[b];(x=Object.getOwnPropertyDescriptor(u,S))&&x.enumerable||(g[S]=a(u[S],m-1),Object.defineProperty(g,S,{enumerable:!1}))}}return g}(a,u)}function a(t){return Object.prototype.toString.call(t)}function s(t){var e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),e}return i.clonePrototype=function(t){if(null===t)return null;var e=function(){};return e.prototype=t,new e},i.__objToStr=a,i.__isDate=function(t){return"object"==typeof t&&"[object Date]"===a(t)},i.__isArray=function(t){return"object"==typeof t&&"[object Array]"===a(t)},i.__isRegExp=function(t){return"object"==typeof t&&"[object RegExp]"===a(t)},i.__getRegExpFlags=s,i}();"object"==typeof t&&t.exports&&(t.exports=n)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},a=h(n(0)),s=h(n(8)),l=n(4),u=h(l),c=h(n(16)),d=h(n(13)),f=h(n(25));function h(t){return t&&t.__esModule?t:{default:t}}function p(t){return t instanceof u.default||t instanceof l.BlockEmbed}var m=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.emitter=n.emitter,Array.isArray(n.whitelist)&&(r.whitelist=n.whitelist.reduce((function(t,e){return t[e]=!0,t}),{})),r.domNode.addEventListener("DOMNodeInserted",(function(){})),r.optimize(),r.enable(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(t,n){var o=this.line(t),a=r(o,2),s=a[0],u=a[1],f=this.line(t+n),h=r(f,1)[0];if(i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"deleteAt",this).call(this,t,n),null!=h&&s!==h&&u>0){if(s instanceof l.BlockEmbed||h instanceof l.BlockEmbed)return void this.optimize();if(s instanceof d.default){var p=s.newlineIndex(s.length(),!0);if(p>-1&&(s=s.split(p+1))===h)return void this.optimize()}else if(h instanceof d.default){var m=h.newlineIndex(0);m>-1&&h.split(m+1)}var g=h.children.head instanceof c.default?null:h.children.head;s.moveChildren(h,g),s.remove()}this.optimize()}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",t)}},{key:"formatAt",value:function(t,n,r,o){(null==this.whitelist||this.whitelist[r])&&(i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,r,o),this.optimize())}},{key:"insertAt",value:function(t,n,r){if(null==r||null==this.whitelist||this.whitelist[n]){if(t>=this.length())if(null==r||null==a.default.query(n,a.default.Scope.BLOCK)){var o=a.default.create(this.statics.defaultChild);this.appendChild(o),null==r&&n.endsWith("\n")&&(n=n.slice(0,-1)),o.insertAt(0,n,r)}else{var s=a.default.create(n,r);this.appendChild(s)}else i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,r);this.optimize()}}},{key:"insertBefore",value:function(t,n){if(t.statics.scope===a.default.Scope.INLINE_BLOT){var r=a.default.create(this.statics.defaultChild);r.appendChild(t),t=r}i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n)}},{key:"leaf",value:function(t){return this.path(t).pop()||[null,-1]}},{key:"line",value:function(t){return t===this.length()?this.line(t-1):this.descendant(p,t)}},{key:"lines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,n=function t(e,n,r){var o=[],i=r;return e.children.forEachAt(n,r,(function(e,n,r){p(e)?o.push(e):e instanceof a.default.Container&&(o=o.concat(t(e,n,i))),i-=r})),o};return n(this,t,e)}},{key:"optimize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t,n),t.length>0&&this.emitter.emit(s.default.events.SCROLL_OPTIMIZE,t,n))}},{key:"path",value:function(t){return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t).slice(1)}},{key:"update",value:function(t){if(!0!==this.batch){var n=s.default.sources.USER;"string"==typeof t&&(n=t),Array.isArray(t)||(t=this.observer.takeRecords()),t.length>0&&this.emitter.emit(s.default.events.SCROLL_BEFORE_UPDATE,n,t),i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"update",this).call(this,t.concat([])),t.length>0&&this.emitter.emit(s.default.events.SCROLL_UPDATE,n,t)}}}]),e}(a.default.Scroll);m.blotName="scroll",m.className="ql-editor",m.tagName="DIV",m.defaultChild="block",m.allowedChildren=[u.default,l.BlockEmbed,f.default],e.default=m},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SHORTKEY=e.default=void 0;var 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},o=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=m(n(21)),s=m(n(11)),l=m(n(3)),u=m(n(2)),c=m(n(20)),d=m(n(0)),f=m(n(5)),h=m(n(10)),p=m(n(9));function m(t){return t&&t.__esModule?t:{default:t}}function g(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var v=(0,h.default)("quill:keyboard"),y=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",b=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.bindings={},Object.keys(r.options.bindings).forEach((function(e){("list autofill"!==e||null==t.scroll.whitelist||t.scroll.whitelist.list)&&r.options.bindings[e]&&r.addBinding(r.options.bindings[e])})),r.addBinding({key:e.keys.ENTER,shiftKey:null},x),r.addBinding({key:e.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},(function(){})),/Firefox/i.test(navigator.userAgent)?(r.addBinding({key:e.keys.BACKSPACE},{collapsed:!0},w),r.addBinding({key:e.keys.DELETE},{collapsed:!0},k)):(r.addBinding({key:e.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},w),r.addBinding({key:e.keys.DELETE},{collapsed:!0,suffix:/^.?$/},k)),r.addBinding({key:e.keys.BACKSPACE},{collapsed:!1},C),r.addBinding({key:e.keys.DELETE},{collapsed:!1},C),r.addBinding({key:e.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},w),r.listen(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,null,[{key:"match",value:function(t,e){return e=E(e),!["altKey","ctrlKey","metaKey","shiftKey"].some((function(n){return!!e[n]!==t[n]&&null!==e[n]}))&&e.key===(t.which||t.keyCode)}}]),i(e,[{key:"addBinding",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=E(t);if(null==r||null==r.key)return v.warn("Attempted to add invalid keyboard binding",r);"function"==typeof e&&(e={handler:e}),"function"==typeof n&&(n={handler:n}),r=(0,l.default)(r,e,n),this.bindings[r.key]=this.bindings[r.key]||[],this.bindings[r.key].push(r)}},{key:"listen",value:function(){var t=this;this.quill.root.addEventListener("keydown",(function(n){if(!n.defaultPrevented){var i=n.which||n.keyCode,a=(t.bindings[i]||[]).filter((function(t){return e.match(n,t)}));if(0!==a.length){var l=t.quill.getSelection();if(null!=l&&t.quill.hasFocus()){var u=t.quill.getLine(l.index),c=o(u,2),f=c[0],h=c[1],p=t.quill.getLeaf(l.index),m=o(p,2),g=m[0],v=m[1],y=0===l.length?[g,v]:t.quill.getLeaf(l.index+l.length),b=o(y,2),_=b[0],w=b[1],k=g instanceof d.default.Text?g.value().slice(0,v):"",C=_ instanceof d.default.Text?_.value().slice(w):"",x={collapsed:0===l.length,empty:0===l.length&&f.length()<=1,format:t.quill.getFormat(l),offset:h,prefix:k,suffix:C};a.some((function(e){if(null!=e.collapsed&&e.collapsed!==x.collapsed)return!1;if(null!=e.empty&&e.empty!==x.empty)return!1;if(null!=e.offset&&e.offset!==x.offset)return!1;if(Array.isArray(e.format)){if(e.format.every((function(t){return null==x.format[t]})))return!1}else if("object"===r(e.format)&&!Object.keys(e.format).every((function(t){return!0===e.format[t]?null!=x.format[t]:!1===e.format[t]?null==x.format[t]:(0,s.default)(e.format[t],x.format[t])})))return!1;return!(null!=e.prefix&&!e.prefix.test(x.prefix)||null!=e.suffix&&!e.suffix.test(x.suffix)||!0===e.handler.call(t,l,x))}))&&n.preventDefault()}}}}))}}]),e}(p.default);function _(t,e){var n,r=t===b.keys.LEFT?"prefix":"suffix";return g(n={key:t,shiftKey:e,altKey:null},r,/^$/),g(n,"handler",(function(n){var r=n.index;t===b.keys.RIGHT&&(r+=n.length+1);var i=this.quill.getLeaf(r);return!(o(i,1)[0]instanceof d.default.Embed&&(t===b.keys.LEFT?e?this.quill.setSelection(n.index-1,n.length+1,f.default.sources.USER):this.quill.setSelection(n.index-1,f.default.sources.USER):e?this.quill.setSelection(n.index,n.length+1,f.default.sources.USER):this.quill.setSelection(n.index+n.length+1,f.default.sources.USER),1))})),n}function w(t,e){if(!(0===t.index||this.quill.getLength()<=1)){var n=this.quill.getLine(t.index),r=o(n,1)[0],i={};if(0===e.offset){var a=this.quill.getLine(t.index-1),s=o(a,1)[0];if(null!=s&&s.length()>1){var l=r.formats(),u=this.quill.getFormat(t.index-1,1);i=c.default.attributes.diff(l,u)||{}}}var d=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;this.quill.deleteText(t.index-d,d,f.default.sources.USER),Object.keys(i).length>0&&this.quill.formatLine(t.index-d,d,i,f.default.sources.USER),this.quill.focus()}}function k(t,e){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(!(t.index>=this.quill.getLength()-n)){var r={},i=0,a=this.quill.getLine(t.index),s=o(a,1)[0];if(e.offset>=s.length()-1){var l=this.quill.getLine(t.index+1),u=o(l,1)[0];if(u){var d=s.formats(),h=this.quill.getFormat(t.index,1);r=c.default.attributes.diff(d,h)||{},i=u.length()}}this.quill.deleteText(t.index,n,f.default.sources.USER),Object.keys(r).length>0&&this.quill.formatLine(t.index+i-1,n,r,f.default.sources.USER)}}function C(t){var e=this.quill.getLines(t),n={};if(e.length>1){var r=e[0].formats(),o=e[e.length-1].formats();n=c.default.attributes.diff(o,r)||{}}this.quill.deleteText(t,f.default.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(t.index,1,n,f.default.sources.USER),this.quill.setSelection(t.index,f.default.sources.SILENT),this.quill.focus()}function x(t,e){var n=this;t.length>0&&this.quill.scroll.deleteAt(t.index,t.length);var r=Object.keys(e.format).reduce((function(t,n){return d.default.query(n,d.default.Scope.BLOCK)&&!Array.isArray(e.format[n])&&(t[n]=e.format[n]),t}),{});this.quill.insertText(t.index,"\n",r,f.default.sources.USER),this.quill.setSelection(t.index+1,f.default.sources.SILENT),this.quill.focus(),Object.keys(e.format).forEach((function(t){null==r[t]&&(Array.isArray(e.format[t])||"link"!==t&&n.quill.format(t,e.format[t],f.default.sources.USER))}))}function S(t){return{key:b.keys.TAB,shiftKey:!t,format:{"code-block":!0},handler:function(e){var n=d.default.query("code-block"),r=e.index,i=e.length,a=this.quill.scroll.descendant(n,r),s=o(a,2),l=s[0],u=s[1];if(null!=l){var c=this.quill.getIndex(l),h=l.newlineIndex(u,!0)+1,p=l.newlineIndex(c+u+i),m=l.domNode.textContent.slice(h,p).split("\n");u=0,m.forEach((function(e,o){t?(l.insertAt(h+u,n.TAB),u+=n.TAB.length,0===o?r+=n.TAB.length:i+=n.TAB.length):e.startsWith(n.TAB)&&(l.deleteAt(h+u,n.TAB.length),u-=n.TAB.length,0===o?r-=n.TAB.length:i-=n.TAB.length),u+=e.length+1})),this.quill.update(f.default.sources.USER),this.quill.setSelection(r,i,f.default.sources.SILENT)}}}}function O(t){return{key:t[0].toUpperCase(),shortKey:!0,handler:function(e,n){this.quill.format(t,!n.format[t],f.default.sources.USER)}}}function E(t){if("string"==typeof t||"number"==typeof t)return E({key:t});if("object"===(void 0===t?"undefined":r(t))&&(t=(0,a.default)(t,!1)),"string"==typeof t.key)if(null!=b.keys[t.key.toUpperCase()])t.key=b.keys[t.key.toUpperCase()];else{if(1!==t.key.length)return null;t.key=t.key.toUpperCase().charCodeAt(0)}return t.shortKey&&(t[y]=t.shortKey,delete t.shortKey),t}b.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},b.DEFAULTS={bindings:{bold:O("bold"),italic:O("italic"),underline:O("underline"),indent:{key:b.keys.TAB,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","+1",f.default.sources.USER)}},outdent:{key:b.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","-1",f.default.sources.USER)}},"outdent backspace":{key:b.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(t,e){null!=e.format.indent?this.quill.format("indent","-1",f.default.sources.USER):null!=e.format.list&&this.quill.format("list",!1,f.default.sources.USER)}},"indent code-block":S(!0),"outdent code-block":S(!1),"remove tab":{key:b.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(t){this.quill.deleteText(t.index-1,1,f.default.sources.USER)}},tab:{key:b.keys.TAB,handler:function(t){this.quill.history.cutoff();var e=(new u.default).retain(t.index).delete(t.length).insert("\t");this.quill.updateContents(e,f.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index+1,f.default.sources.SILENT)}},"list empty enter":{key:b.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(t,e){this.quill.format("list",!1,f.default.sources.USER),e.format.indent&&this.quill.format("indent",!1,f.default.sources.USER)}},"checklist enter":{key:b.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(t){var e=this.quill.getLine(t.index),n=o(e,2),r=n[0],i=n[1],a=(0,l.default)({},r.formats(),{list:"checked"}),s=(new u.default).retain(t.index).insert("\n",a).retain(r.length()-i-1).retain(1,{list:"unchecked"});this.quill.updateContents(s,f.default.sources.USER),this.quill.setSelection(t.index+1,f.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:b.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(t,e){var n=this.quill.getLine(t.index),r=o(n,2),i=r[0],a=r[1],s=(new u.default).retain(t.index).insert("\n",e.format).retain(i.length()-a-1).retain(1,{header:null});this.quill.updateContents(s,f.default.sources.USER),this.quill.setSelection(t.index+1,f.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(t,e){var n=e.prefix.length,r=this.quill.getLine(t.index),i=o(r,2),a=i[0],s=i[1];if(s>n)return!0;var l=void 0;switch(e.prefix.trim()){case"[]":case"[ ]":l="unchecked";break;case"[x]":l="checked";break;case"-":case"*":l="bullet";break;default:l="ordered"}this.quill.insertText(t.index," ",f.default.sources.USER),this.quill.history.cutoff();var c=(new u.default).retain(t.index-s).delete(n+1).retain(a.length()-2-s).retain(1,{list:l});this.quill.updateContents(c,f.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index-n,f.default.sources.SILENT)}},"code exit":{key:b.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(t){var e=this.quill.getLine(t.index),n=o(e,2),r=n[0],i=n[1],a=(new u.default).retain(t.index+r.length()-i-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(a,f.default.sources.USER)}},"embed left":_(b.keys.LEFT,!1),"embed left shift":_(b.keys.LEFT,!0),"embed right":_(b.keys.RIGHT,!1),"embed right shift":_(b.keys.RIGHT,!0)}},e.default=b,e.SHORTKEY=y},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=l(n(0)),s=l(n(7));function l(t){return t&&t.__esModule?t:{default:t}}var u=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.selection=n,r.textNode=document.createTextNode(e.CONTENTS),r.domNode.appendChild(r.textNode),r._length=0,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,null,[{key:"value",value:function(){}}]),i(e,[{key:"detach",value:function(){null!=this.parent&&this.parent.removeChild(this)}},{key:"format",value:function(t,n){if(0!==this._length)return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n);for(var r=this,i=0;null!=r&&r.statics.scope!==a.default.Scope.BLOCK_BLOT;)i+=r.offset(r.parent),r=r.parent;null!=r&&(this._length=e.CONTENTS.length,r.optimize(),r.formatAt(i,e.CONTENTS.length,t,n),this._length=0)}},{key:"index",value:function(t,n){return t===this.textNode?0:o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"index",this).call(this,t,n)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!this.selection.composing&&null!=this.parent){var t=this.textNode,n=this.selection.getNativeRange(),o=void 0,i=void 0,l=void 0;if(null!=n&&n.start.node===t&&n.end.node===t){var u=[t,n.start.offset,n.end.offset];o=u[0],i=u[1],l=u[2]}for(;null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==e.CONTENTS){var c=this.textNode.data.split(e.CONTENTS).join("");this.next instanceof s.default?(o=this.next.domNode,this.next.insertAt(0,c),this.textNode.data=e.CONTENTS):(this.textNode.data=c,this.parent.insertBefore(a.default.create(this.textNode),this),this.textNode=document.createTextNode(e.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),null!=i){var d=[i,l].map((function(t){return Math.max(0,Math.min(o.data.length,t-1))})),f=r(d,2);return i=f[0],l=f[1],{startNode:o,startOffset:i,endNode:o,endOffset:l}}}}},{key:"update",value:function(t,e){var n=this;if(t.some((function(t){return"characterData"===t.type&&t.target===n.textNode}))){var r=this.restore();r&&(e.range=r)}}},{key:"value",value:function(){return""}}]),e}(a.default.Embed);u.blotName="cursor",u.className="ql-cursor",u.tagName="span",u.CONTENTS="\ufeff",e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a(n(0)),o=n(4),i=a(o);function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var u=function(t){function e(){return s(this,e),l(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(r.default.Container);u.allowedChildren=[i.default,o.BlockEmbed,u],e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorStyle=e.ColorClass=e.ColorAttributor=void 0;var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},a=n(0),s=(r=a)&&r.__esModule?r:{default:r};function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var c=function(t){function e(){return l(this,e),u(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"value",value:function(t){var n=i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t);return n.startsWith("rgb(")?(n=n.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+n.split(",").map((function(t){return("00"+parseInt(t).toString(16)).slice(-2)})).join("")):n}}]),e}(s.default.Attributor.Style),d=new s.default.Attributor.Class("color","ql-color",{scope:s.default.Scope.INLINE}),f=new c("color","color",{scope:s.default.Scope.INLINE});e.ColorAttributor=c,e.ColorClass=d,e.ColorStyle=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sanitize=e.default=void 0;var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},a=n(6);function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var u=function(t){function e(){return s(this,e),l(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"format",value:function(t,n){if(t!==this.statics.blotName||!n)return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n);n=this.constructor.sanitize(n),this.domNode.setAttribute("href",n)}}],[{key:"create",value:function(t){var n=i(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return t=this.sanitize(t),n.setAttribute("href",t),n.setAttribute("rel","noopener noreferrer"),n.setAttribute("target","_blank"),n}},{key:"formats",value:function(t){return t.getAttribute("href")}},{key:"sanitize",value:function(t){return c(t,this.PROTOCOL_WHITELIST)?t:this.SANITIZED_URL}}]),e}(((r=a)&&r.__esModule?r:{default:r}).default);function c(t,e){var n=document.createElement("a");n.href=t;var r=n.href.slice(0,n.href.indexOf(":"));return e.indexOf(r)>-1}u.blotName="link",u.tagName="A",u.SANITIZED_URL="about:blank",u.PROTOCOL_WHITELIST=["http","https","mailto","tel"],e.default=u,e.sanitize=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var 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},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=s(n(23)),a=s(n(107));function s(t){return t&&t.__esModule?t:{default:t}}var l=0;function u(t,e){t.setAttribute(e,!("true"===t.getAttribute(e)))}var c=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.select=e,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",(function(){n.togglePicker()})),this.label.addEventListener("keydown",(function(t){switch(t.keyCode){case i.default.keys.ENTER:n.togglePicker();break;case i.default.keys.ESCAPE:n.escape(),t.preventDefault()}})),this.select.addEventListener("change",this.update.bind(this))}return o(t,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),u(this.label,"aria-expanded"),u(this.options,"aria-hidden")}},{key:"buildItem",value:function(t){var e=this,n=document.createElement("span");return n.tabIndex="0",n.setAttribute("role","button"),n.classList.add("ql-picker-item"),t.hasAttribute("value")&&n.setAttribute("data-value",t.getAttribute("value")),t.textContent&&n.setAttribute("data-label",t.textContent),n.addEventListener("click",(function(){e.selectItem(n,!0)})),n.addEventListener("keydown",(function(t){switch(t.keyCode){case i.default.keys.ENTER:e.selectItem(n,!0),t.preventDefault();break;case i.default.keys.ESCAPE:e.escape(),t.preventDefault()}})),n}},{key:"buildLabel",value:function(){var t=document.createElement("span");return t.classList.add("ql-picker-label"),t.innerHTML=a.default,t.tabIndex="0",t.setAttribute("role","button"),t.setAttribute("aria-expanded","false"),this.container.appendChild(t),t}},{key:"buildOptions",value:function(){var t=this,e=document.createElement("span");e.classList.add("ql-picker-options"),e.setAttribute("aria-hidden","true"),e.tabIndex="-1",e.id="ql-picker-options-"+l,l+=1,this.label.setAttribute("aria-controls",e.id),this.options=e,[].slice.call(this.select.options).forEach((function(n){var r=t.buildItem(n);e.appendChild(r),!0===n.selected&&t.selectItem(r)})),this.container.appendChild(e)}},{key:"buildPicker",value:function(){var t=this;[].slice.call(this.select.attributes).forEach((function(e){t.container.setAttribute(e.name,e.value)})),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var t=this;this.close(),setTimeout((function(){return t.label.focus()}),1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.container.querySelector(".ql-selected");if(t!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=t&&(t.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(t.parentNode.children,t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),e))){if("function"==typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"===("undefined"==typeof Event?"undefined":r(Event))){var o=document.createEvent("Event");o.initEvent("change",!0,!0),this.select.dispatchEvent(o)}this.close()}}},{key:"update",value:function(){var t=void 0;if(this.select.selectedIndex>-1){var e=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(e)}else this.selectItem(null);var n=null!=t&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),t}();e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=v(n(0)),o=v(n(5)),i=n(4),a=v(i),s=v(n(16)),l=v(n(25)),u=v(n(24)),c=v(n(35)),d=v(n(6)),f=v(n(22)),h=v(n(7)),p=v(n(55)),m=v(n(42)),g=v(n(23));function v(t){return t&&t.__esModule?t:{default:t}}o.default.register({"blots/block":a.default,"blots/block/embed":i.BlockEmbed,"blots/break":s.default,"blots/container":l.default,"blots/cursor":u.default,"blots/embed":c.default,"blots/inline":d.default,"blots/scroll":f.default,"blots/text":h.default,"modules/clipboard":p.default,"modules/history":m.default,"modules/keyboard":g.default}),r.default.register(a.default,s.default,u.default,d.default,f.default,h.default),e.default=o.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),o=function(){function t(t){this.domNode=t,this.domNode[r.DATA_KEY]={blot:this}}return Object.defineProperty(t.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),t.create=function(t){if(null==this.tagName)throw new r.ParchmentError("Blot definition missing tagName");var e;return Array.isArray(this.tagName)?("string"==typeof t&&(t=t.toUpperCase(),parseInt(t).toString()===t&&(t=parseInt(t))),e="number"==typeof t?document.createElement(this.tagName[t-1]):this.tagName.indexOf(t)>-1?document.createElement(t):document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e},t.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},t.prototype.clone=function(){var t=this.domNode.cloneNode(!1);return r.create(t)},t.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[r.DATA_KEY]},t.prototype.deleteAt=function(t,e){this.isolate(t,e).remove()},t.prototype.formatAt=function(t,e,n,o){var i=this.isolate(t,e);if(null!=r.query(n,r.Scope.BLOT)&&o)i.wrap(n,o);else if(null!=r.query(n,r.Scope.ATTRIBUTE)){var a=r.create(this.statics.scope);i.wrap(a),a.format(n,o)}},t.prototype.insertAt=function(t,e,n){var o=null==n?r.create("text",e):r.create(e,n),i=this.split(t);this.parent.insertBefore(o,i)},t.prototype.insertInto=function(t,e){void 0===e&&(e=null),null!=this.parent&&this.parent.children.remove(this);var n=null;t.children.insertBefore(this,e),null!=e&&(n=e.domNode),this.domNode.parentNode==t.domNode&&this.domNode.nextSibling==n||t.domNode.insertBefore(this.domNode,n),this.parent=t,this.attach()},t.prototype.isolate=function(t,e){var n=this.split(t);return n.split(e),n},t.prototype.length=function(){return 1},t.prototype.offset=function(t){return void 0===t&&(t=this.parent),null==this.parent||this==t?0:this.parent.children.offset(this)+this.parent.offset(t)},t.prototype.optimize=function(t){null!=this.domNode[r.DATA_KEY]&&delete this.domNode[r.DATA_KEY].mutations},t.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},t.prototype.replace=function(t){null!=t.parent&&(t.parent.insertBefore(this,t.next),t.remove())},t.prototype.replaceWith=function(t,e){var n="string"==typeof t?r.create(t,e):t;return n.replace(this),n},t.prototype.split=function(t,e){return 0===t?this:this.next},t.prototype.update=function(t,e){},t.prototype.wrap=function(t,e){var n="string"==typeof t?r.create(t,e):t;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},t.blotName="abstract",t}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(12),o=n(32),i=n(33),a=n(1),s=function(){function t(t){this.attributes={},this.domNode=t,this.build()}return t.prototype.attribute=function(t,e){e?t.add(this.domNode,e)&&(null!=t.value(this.domNode)?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])},t.prototype.build=function(){var t=this;this.attributes={};var e=r.default.keys(this.domNode),n=o.default.keys(this.domNode),s=i.default.keys(this.domNode);e.concat(n).concat(s).forEach((function(e){var n=a.query(e,a.Scope.ATTRIBUTE);n instanceof r.default&&(t.attributes[n.attrName]=n)}))},t.prototype.copy=function(t){var e=this;Object.keys(this.attributes).forEach((function(n){var r=e.attributes[n].value(e.domNode);t.format(n,r)}))},t.prototype.move=function(t){var e=this;this.copy(t),Object.keys(this.attributes).forEach((function(t){e.attributes[t].remove(e.domNode)})),this.attributes={}},t.prototype.values=function(){var t=this;return Object.keys(this.attributes).reduce((function(e,n){return e[n]=t.attributes[n].value(t.domNode),e}),{})},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function i(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter((function(t){return 0===t.indexOf(e+"-")}))}Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.keys=function(t){return(t.getAttribute("class")||"").split(/\s+/).map((function(t){return t.split("-").slice(0,-1).join("-")}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(this.remove(t),t.classList.add(this.keyName+"-"+e),!0)},e.prototype.remove=function(t){i(t,this.keyName).forEach((function(e){t.classList.remove(e)})),0===t.classList.length&&t.removeAttribute("class")},e.prototype.value=function(t){var e=(i(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=a},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function i(t){var e=t.split("-"),n=e.slice(1).map((function(t){return t[0].toUpperCase()+t.slice(1)})).join("");return e[0]+n}Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.keys=function(t){return(t.getAttribute("style")||"").split(";").map((function(t){return t.split(":")[0].trim()}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.style[i(this.keyName)]=e,!0)},e.prototype.remove=function(t){t.style[i(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")},e.prototype.value=function(t){var e=t.style[i(this.keyName)];return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.quill=e,this.options=n,this.modules={}}return r(t,[{key:"init",value:function(){var t=this;Object.keys(this.options.modules).forEach((function(e){null==t.modules[e]&&t.addModule(e)}))}},{key:"addModule",value:function(t){var e=this.quill.constructor.import("modules/"+t);return this.modules[t]=new e(this.quill,this.options.modules[t]||{}),this.modules[t]}}]),t}();o.DEFAULTS={modules:{}},o.themes={default:o},e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},i=s(n(0)),a=s(n(7));function s(t){return t&&t.__esModule?t:{default:t}}var l="\ufeff",u=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.contentNode=document.createElement("span"),n.contentNode.setAttribute("contenteditable",!1),[].slice.call(n.domNode.childNodes).forEach((function(t){n.contentNode.appendChild(t)})),n.leftGuard=document.createTextNode(l),n.rightGuard=document.createTextNode(l),n.domNode.appendChild(n.leftGuard),n.domNode.appendChild(n.contentNode),n.domNode.appendChild(n.rightGuard),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"index",value:function(t,n){return t===this.leftGuard?0:t===this.rightGuard?1:o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"index",this).call(this,t,n)}},{key:"restore",value:function(t){var e=void 0,n=void 0,r=t.data.split(l).join("");if(t===this.leftGuard)if(this.prev instanceof a.default){var o=this.prev.length();this.prev.insertAt(o,r),e={startNode:this.prev.domNode,startOffset:o+r.length}}else n=document.createTextNode(r),this.parent.insertBefore(i.default.create(n),this),e={startNode:n,startOffset:r.length};else t===this.rightGuard&&(this.next instanceof a.default?(this.next.insertAt(0,r),e={startNode:this.next.domNode,startOffset:r.length}):(n=document.createTextNode(r),this.parent.insertBefore(i.default.create(n),this.next),e={startNode:n,startOffset:r.length}));return t.data=l,e}},{key:"update",value:function(t,e){var n=this;t.forEach((function(t){if("characterData"===t.type&&(t.target===n.leftGuard||t.target===n.rightGuard)){var r=n.restore(t.target);r&&(e.range=r)}}))}}]),e}(i.default.Embed);e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AlignStyle=e.AlignClass=e.AlignAttribute=void 0;var r,o=n(0),i=(r=o)&&r.__esModule?r:{default:r},a={scope:i.default.Scope.BLOCK,whitelist:["right","center","justify"]},s=new i.default.Attributor.Attribute("align","align",a),l=new i.default.Attributor.Class("align","ql-align",a),u=new i.default.Attributor.Style("align","text-align",a);e.AlignAttribute=s,e.AlignClass=l,e.AlignStyle=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BackgroundStyle=e.BackgroundClass=void 0;var r,o=n(0),i=(r=o)&&r.__esModule?r:{default:r},a=n(26),s=new i.default.Attributor.Class("background","ql-bg",{scope:i.default.Scope.INLINE}),l=new a.ColorAttributor("background","background-color",{scope:i.default.Scope.INLINE});e.BackgroundClass=s,e.BackgroundStyle=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DirectionStyle=e.DirectionClass=e.DirectionAttribute=void 0;var r,o=n(0),i=(r=o)&&r.__esModule?r:{default:r},a={scope:i.default.Scope.BLOCK,whitelist:["rtl"]},s=new i.default.Attributor.Attribute("direction","dir",a),l=new i.default.Attributor.Class("direction","ql-direction",a),u=new i.default.Attributor.Style("direction","direction",a);e.DirectionAttribute=s,e.DirectionClass=l,e.DirectionStyle=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FontClass=e.FontStyle=void 0;var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},a=n(0),s=(r=a)&&r.__esModule?r:{default:r};function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var c={scope:s.default.Scope.INLINE,whitelist:["serif","monospace"]},d=new s.default.Attributor.Class("font","ql-font",c),f=function(t){function e(){return l(this,e),u(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"value",value:function(t){return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t).replace(/["']/g,"")}}]),e}(s.default.Attributor.Style),h=new f("font","font-family",c);e.FontStyle=h,e.FontClass=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SizeStyle=e.SizeClass=void 0;var r,o=n(0),i=(r=o)&&r.__esModule?r:{default:r},a=new i.default.Attributor.Class("size","ql-size",{scope:i.default.Scope.INLINE,whitelist:["small","large","huge"]}),s=new i.default.Attributor.Style("size","font-size",{scope:i.default.Scope.INLINE,whitelist:["10px","18px","32px"]});e.SizeClass=a,e.SizeStyle=s},function(t,e,n){"use strict";t.exports={align:{"":n(76),center:n(77),right:n(78),justify:n(79)},background:n(80),blockquote:n(81),bold:n(82),clean:n(83),code:n(58),"code-block":n(58),color:n(84),direction:{"":n(85),rtl:n(86)},float:{center:n(87),full:n(88),left:n(89),right:n(90)},formula:n(91),header:{1:n(92),2:n(93)},italic:n(94),image:n(95),indent:{"+1":n(96),"-1":n(97)},link:n(98),list:{ordered:n(99),bullet:n(100),check:n(101)},script:{sub:n(102),super:n(103)},strike:n(104),underline:n(105),video:n(106)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLastChangeIndex=e.default=void 0;var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=a(n(0)),i=a(n(5));function a(t){return t&&t.__esModule?t:{default:t}}var s=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.lastRecorded=0,r.ignoreChange=!1,r.clear(),r.quill.on(i.default.events.EDITOR_CHANGE,(function(t,e,n,o){t!==i.default.events.TEXT_CHANGE||r.ignoreChange||(r.options.userOnly&&o!==i.default.sources.USER?r.transform(e):r.record(e,n))})),r.quill.keyboard.addBinding({key:"Z",shortKey:!0},r.undo.bind(r)),r.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},r.redo.bind(r)),/Win/i.test(navigator.platform)&&r.quill.keyboard.addBinding({key:"Y",shortKey:!0},r.redo.bind(r)),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"change",value:function(t,e){if(0!==this.stack[t].length){var n=this.stack[t].pop();this.stack[e].push(n),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n[t],i.default.sources.USER),this.ignoreChange=!1;var r=l(n[t]);this.quill.setSelection(r)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(t,e){if(0!==t.ops.length){this.stack.redo=[];var n=this.quill.getContents().diff(e),r=Date.now();if(this.lastRecorded+this.options.delay>r&&this.stack.undo.length>0){var o=this.stack.undo.pop();n=n.compose(o.undo),t=o.redo.compose(t)}else this.lastRecorded=r;this.stack.undo.push({redo:t,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(t){this.stack.undo.forEach((function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)})),this.stack.redo.forEach((function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)}))}},{key:"undo",value:function(){this.change("undo","redo")}}]),e}(a(n(9)).default);function l(t){var e=t.reduce((function(t,e){return t+=e.delete||0}),0),n=t.length()-e;return function(t){var e=t.ops[t.ops.length-1];return null!=e&&(null!=e.insert?"string"==typeof e.insert&&e.insert.endsWith("\n"):null!=e.attributes&&Object.keys(e.attributes).some((function(t){return null!=o.default.query(t,o.default.Scope.BLOCK)})))}(t)&&(n-=1),n}s.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},e.default=s,e.getLastChangeIndex=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BaseTooltip=void 0;var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},i=p(n(3)),a=p(n(2)),s=p(n(8)),l=p(n(23)),u=p(n(34)),c=p(n(59)),d=p(n(60)),f=p(n(28)),h=p(n(61));function p(t){return t&&t.__esModule?t:{default:t}}function m(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function g(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function v(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var y=[!1,"center","right","justify"],b=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],_=[!1,"serif","monospace"],w=["1","2","3",!1],k=["small",!1,"large","huge"],C=function(t){function e(t,n){m(this,e);var r=g(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return t.emitter.listenDOM("click",document.body,(function e(n){if(!document.body.contains(t.root))return document.body.removeEventListener("click",e);null==r.tooltip||r.tooltip.root.contains(n.target)||document.activeElement===r.tooltip.textbox||r.quill.hasFocus()||r.tooltip.hide(),null!=r.pickers&&r.pickers.forEach((function(t){t.container.contains(n.target)||t.close()}))})),r}return v(e,t),r(e,[{key:"addModule",value:function(t){var n=o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"addModule",this).call(this,t);return"toolbar"===t&&this.extendToolbar(n),n}},{key:"buildButtons",value:function(t,e){t.forEach((function(t){(t.getAttribute("class")||"").split(/\s+/).forEach((function(n){if(n.startsWith("ql-")&&(n=n.slice("ql-".length),null!=e[n]))if("direction"===n)t.innerHTML=e[n][""]+e[n].rtl;else if("string"==typeof e[n])t.innerHTML=e[n];else{var r=t.value||"";null!=r&&e[n][r]&&(t.innerHTML=e[n][r])}}))}))}},{key:"buildPickers",value:function(t,e){var n=this;this.pickers=t.map((function(t){if(t.classList.contains("ql-align"))return null==t.querySelector("option")&&S(t,y),new d.default(t,e.align);if(t.classList.contains("ql-background")||t.classList.contains("ql-color")){var n=t.classList.contains("ql-background")?"background":"color";return null==t.querySelector("option")&&S(t,b,"background"===n?"#ffffff":"#000000"),new c.default(t,e[n])}return null==t.querySelector("option")&&(t.classList.contains("ql-font")?S(t,_):t.classList.contains("ql-header")?S(t,w):t.classList.contains("ql-size")&&S(t,k)),new f.default(t)})),this.quill.on(s.default.events.EDITOR_CHANGE,(function(){n.pickers.forEach((function(t){t.update()}))}))}}]),e}(u.default);C.DEFAULTS=(0,i.default)(!0,{},u.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var t=this,e=this.container.querySelector("input.ql-image[type=file]");null==e&&((e=document.createElement("input")).setAttribute("type","file"),e.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),e.classList.add("ql-image"),e.addEventListener("change",(function(){if(null!=e.files&&null!=e.files[0]){var n=new FileReader;n.onload=function(n){var r=t.quill.getSelection(!0);t.quill.updateContents((new a.default).retain(r.index).delete(r.length).insert({image:n.target.result}),s.default.sources.USER),t.quill.setSelection(r.index+1,s.default.sources.SILENT),e.value=""},n.readAsDataURL(e.files[0])}})),this.container.appendChild(e)),e.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var x=function(t){function e(t,n){m(this,e);var r=g(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.textbox=r.root.querySelector('input[type="text"]'),r.listen(),r}return v(e,t),r(e,[{key:"listen",value:function(){var t=this;this.textbox.addEventListener("keydown",(function(e){l.default.match(e,"enter")?(t.save(),e.preventDefault()):l.default.match(e,"escape")&&(t.cancel(),e.preventDefault())}))}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"link",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=e?this.textbox.value=e:t!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+t)||""),this.root.setAttribute("data-mode",t)}},{key:"restoreFocus",value:function(){var t=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=t}},{key:"save",value:function(){var t,e,n=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var r=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",n,s.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",n,s.default.sources.USER)),this.quill.root.scrollTop=r;break;case"video":e=(t=n).match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/),n=e?(e[1]||"https")+"://www.youtube.com/embed/"+e[2]+"?showinfo=0":(e=t.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(e[1]||"https")+"://player.vimeo.com/video/"+e[2]+"/":t;case"formula":if(!n)break;var o=this.quill.getSelection(!0);if(null!=o){var i=o.index+o.length;this.quill.insertEmbed(i,this.root.getAttribute("data-mode"),n,s.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(i+1," ",s.default.sources.USER),this.quill.setSelection(i+2,s.default.sources.USER)}}this.textbox.value="",this.hide()}}]),e}(h.default);function S(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e.forEach((function(e){var r=document.createElement("option");e===n?r.setAttribute("selected","selected"):r.setAttribute("value",e),t.appendChild(r)}))}e.BaseTooltip=x,e.default=C},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){this.head=this.tail=null,this.length=0}return t.prototype.append=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.insertBefore(t[0],null),t.length>1&&this.append.apply(this,t.slice(1))},t.prototype.contains=function(t){for(var e,n=this.iterator();e=n();)if(e===t)return!0;return!1},t.prototype.insertBefore=function(t,e){t&&(t.next=e,null!=e?(t.prev=e.prev,null!=e.prev&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):null!=this.tail?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)},t.prototype.offset=function(t){for(var e=0,n=this.head;null!=n;){if(n===t)return e;e+=n.length(),n=n.next}return-1},t.prototype.remove=function(t){this.contains(t)&&(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)},t.prototype.iterator=function(t){return void 0===t&&(t=this.head),function(){var e=t;return null!=t&&(t=t.next),e}},t.prototype.find=function(t,e){void 0===e&&(e=!1);for(var n,r=this.iterator();n=r();){var o=n.length();if(t<o||e&&t===o&&(null==n.next||0!==n.next.length()))return[n,t];t-=o}return[null,0]},t.prototype.forEach=function(t){for(var e,n=this.iterator();e=n();)t(e)},t.prototype.forEachAt=function(t,e,n){if(!(e<=0))for(var r,o=this.find(t),i=o[0],a=t-o[1],s=this.iterator(i);(r=s())&&a<t+e;){var l=r.length();t>a?n(r,t-a,Math.min(e,a+l-t)):n(r,0,Math.min(l,t+e-a)),a+=l}},t.prototype.map=function(t){return this.reduce((function(e,n){return e.push(t(n)),e}),[])},t.prototype.reduce=function(t,e){for(var n,r=this.iterator();n=r();)e=t(e,n);return e},t}();e.default=r},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(17),a=n(1),s={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},l=function(t){function e(e){var n=t.call(this,e)||this;return n.scroll=n,n.observer=new MutationObserver((function(t){n.update(t)})),n.observer.observe(n.domNode,s),n.attach(),n}return o(e,t),e.prototype.detach=function(){t.prototype.detach.call(this),this.observer.disconnect()},e.prototype.deleteAt=function(e,n){this.update(),0===e&&n===this.length()?this.children.forEach((function(t){t.remove()})):t.prototype.deleteAt.call(this,e,n)},e.prototype.formatAt=function(e,n,r,o){this.update(),t.prototype.formatAt.call(this,e,n,r,o)},e.prototype.insertAt=function(e,n,r){this.update(),t.prototype.insertAt.call(this,e,n,r)},e.prototype.optimize=function(e,n){var r=this;void 0===e&&(e=[]),void 0===n&&(n={}),t.prototype.optimize.call(this,n);for(var o=[].slice.call(this.observer.takeRecords());o.length>0;)e.push(o.pop());for(var s=function(t,e){void 0===e&&(e=!0),null!=t&&t!==r&&null!=t.domNode.parentNode&&(null==t.domNode[a.DATA_KEY].mutations&&(t.domNode[a.DATA_KEY].mutations=[]),e&&s(t.parent))},l=function(t){null!=t.domNode[a.DATA_KEY]&&null!=t.domNode[a.DATA_KEY].mutations&&(t instanceof i.default&&t.children.forEach(l),t.optimize(n))},u=e,c=0;u.length>0;c+=1){if(c>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(u.forEach((function(t){var e=a.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(s(a.find(t.previousSibling,!1)),[].forEach.call(t.addedNodes,(function(t){var e=a.find(t,!1);s(e,!1),e instanceof i.default&&e.children.forEach((function(t){s(t,!1)}))}))):"attributes"===t.type&&s(e.prev)),s(e))})),this.children.forEach(l),o=(u=[].slice.call(this.observer.takeRecords())).slice();o.length>0;)e.push(o.pop())}},e.prototype.update=function(e,n){var r=this;void 0===n&&(n={}),(e=e||this.observer.takeRecords()).map((function(t){var e=a.find(t.target,!0);return null==e?null:null==e.domNode[a.DATA_KEY].mutations?(e.domNode[a.DATA_KEY].mutations=[t],e):(e.domNode[a.DATA_KEY].mutations.push(t),null)})).forEach((function(t){null!=t&&t!==r&&null!=t.domNode[a.DATA_KEY]&&t.update(t.domNode[a.DATA_KEY].mutations||[],n)})),null!=this.domNode[a.DATA_KEY].mutations&&t.prototype.update.call(this,this.domNode[a.DATA_KEY].mutations,n),this.optimize(e,n)},e.blotName="scroll",e.defaultChild="block",e.scope=a.Scope.BLOCK_BLOT,e.tagName="DIV",e}(i.default);e.default=l},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(18),a=n(1),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.formats=function(n){if(n.tagName!==e.tagName)return t.formats.call(this,n)},e.prototype.format=function(n,r){var o=this;n!==this.statics.blotName||r?t.prototype.format.call(this,n,r):(this.children.forEach((function(t){t instanceof i.default||(t=t.wrap(e.blotName,!0)),o.attributes.copy(t)})),this.unwrap())},e.prototype.formatAt=function(e,n,r,o){null!=this.formats()[r]||a.query(r,a.Scope.ATTRIBUTE)?this.isolate(e,n).format(r,o):t.prototype.formatAt.call(this,e,n,r,o)},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n);var r=this.formats();if(0===Object.keys(r).length)return this.unwrap();var o=this.next;o instanceof e&&o.prev===this&&function(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(t[n]!==e[n])return!1;return!0}(r,o.formats())&&(o.moveChildren(this),o.remove())},e.blotName="inline",e.scope=a.Scope.INLINE_BLOT,e.tagName="SPAN",e}(i.default);e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(18),a=n(1),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.formats=function(n){var r=a.query(e.blotName).tagName;if(n.tagName!==r)return t.formats.call(this,n)},e.prototype.format=function(n,r){null!=a.query(n,a.Scope.BLOCK)&&(n!==this.statics.blotName||r?t.prototype.format.call(this,n,r):this.replaceWith(e.blotName))},e.prototype.formatAt=function(e,n,r,o){null!=a.query(r,a.Scope.BLOCK)?this.format(r,o):t.prototype.formatAt.call(this,e,n,r,o)},e.prototype.insertAt=function(e,n,r){if(null==r||null!=a.query(n,a.Scope.INLINE))t.prototype.insertAt.call(this,e,n,r);else{var o=this.split(e),i=a.create(n,r);o.parent.insertBefore(i,o)}},e.prototype.update=function(e,n){navigator.userAgent.match(/Trident/)?this.build():t.prototype.update.call(this,e,n)},e.blotName="block",e.scope=a.Scope.BLOCK_BLOT,e.tagName="P",e}(i.default);e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.formats=function(t){},e.prototype.format=function(e,n){t.prototype.formatAt.call(this,0,this.length(),e,n)},e.prototype.formatAt=function(e,n,r,o){0===e&&n===this.length()?this.format(r,o):t.prototype.formatAt.call(this,e,n,r,o)},e.prototype.formats=function(){return this.statics.formats(this.domNode)},e}(n(19).default);e.default=i},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(19),a=n(1),s=function(t){function e(e){var n=t.call(this,e)||this;return n.text=n.statics.value(n.domNode),n}return o(e,t),e.create=function(t){return document.createTextNode(t)},e.value=function(t){var e=t.data;return e.normalize&&(e=e.normalize()),e},e.prototype.deleteAt=function(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)},e.prototype.index=function(t,e){return this.domNode===t?e:-1},e.prototype.insertAt=function(e,n,r){null==r?(this.text=this.text.slice(0,e)+n+this.text.slice(e),this.domNode.data=this.text):t.prototype.insertAt.call(this,e,n,r)},e.prototype.length=function(){return this.text.length},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof e&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},e.prototype.position=function(t,e){return void 0===e&&(e=!1),[this.domNode,t]},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=a.create(this.domNode.splitText(t));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},e.prototype.update=function(t,e){var n=this;t.some((function(t){return"characterData"===t.type&&t.target===n.domNode}))&&(this.text=this.statics.value(this.domNode))},e.prototype.value=function(){return this.text},e.blotName="text",e.scope=a.Scope.INLINE_BLOT,e}(i.default);e.default=s},function(t,e,n){"use strict";var r=document.createElement("div");if(r.classList.toggle("test-class",!1),r.classList.contains("test-class")){var o=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return arguments.length>1&&!this.contains(t)==!e?e:o.call(this,t)}}String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t}),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var n=this.toString();("number"!=typeof e||!isFinite(e)||Math.floor(e)!==e||e>n.length)&&(e=n.length),e-=t.length;var r=n.indexOf(t,e);return-1!==r&&r===e}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var e,n=Object(this),r=n.length>>>0,o=arguments[1],i=0;i<r;i++)if(e=n[i],t.call(o,e,i,n))return e}}),document.addEventListener("DOMContentLoaded",(function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)}))},function(t,e){var n=-1;function r(t,e,l){if(t==e)return t?[[0,t]]:[];(l<0||t.length<l)&&(l=null);var c=i(t,e),d=t.substring(0,c);c=a(t=t.substring(c),e=e.substring(c));var f=t.substring(t.length-c),h=function(t,e){var s;if(!t)return[[1,e]];if(!e)return[[n,t]];var l=t.length>e.length?t:e,u=t.length>e.length?e:t,c=l.indexOf(u);if(-1!=c)return s=[[1,l.substring(0,c)],[0,u],[1,l.substring(c+u.length)]],t.length>e.length&&(s[0][0]=s[2][0]=n),s;if(1==u.length)return[[n,t],[1,e]];var d=function(t,e){var n=t.length>e.length?t:e,r=t.length>e.length?e:t;if(n.length<4||2*r.length<n.length)return null;function o(t,e,n){for(var r,o,s,l,u=t.substring(n,n+Math.floor(t.length/4)),c=-1,d="";-1!=(c=e.indexOf(u,c+1));){var f=i(t.substring(n),e.substring(c)),h=a(t.substring(0,n),e.substring(0,c));d.length<h+f&&(d=e.substring(c-h,c)+e.substring(c,c+f),r=t.substring(0,n-h),o=t.substring(n+f),s=e.substring(0,c-h),l=e.substring(c+f))}return 2*d.length>=t.length?[r,o,s,l,d]:null}var s,l,u,c,d,f=o(n,r,Math.ceil(n.length/4)),h=o(n,r,Math.ceil(n.length/2));if(!f&&!h)return null;s=h?f&&f[4].length>h[4].length?f:h:f,t.length>e.length?(l=s[0],u=s[1],c=s[2],d=s[3]):(c=s[0],d=s[1],l=s[2],u=s[3]);var p=s[4];return[l,u,c,d,p]}(t,e);if(d){var f=d[0],h=d[1],p=d[2],m=d[3],g=d[4],v=r(f,p),y=r(h,m);return v.concat([[0,g]],y)}return function(t,e){for(var r=t.length,i=e.length,a=Math.ceil((r+i)/2),s=a,l=2*a,u=new Array(l),c=new Array(l),d=0;d<l;d++)u[d]=-1,c[d]=-1;u[s+1]=0,c[s+1]=0;for(var f=r-i,h=f%2!=0,p=0,m=0,g=0,v=0,y=0;y<a;y++){for(var b=-y+p;b<=y-m;b+=2){for(var _=s+b,w=(O=b==-y||b!=y&&u[_-1]<u[_+1]?u[_+1]:u[_-1]+1)-b;O<r&&w<i&&t.charAt(O)==e.charAt(w);)O++,w++;if(u[_]=O,O>r)m+=2;else if(w>i)p+=2;else if(h&&(x=s+f-b)>=0&&x<l&&-1!=c[x]&&O>=(C=r-c[x]))return o(t,e,O,w)}for(var k=-y+g;k<=y-v;k+=2){for(var C,x=s+k,S=(C=k==-y||k!=y&&c[x-1]<c[x+1]?c[x+1]:c[x-1]+1)-k;C<r&&S<i&&t.charAt(r-C-1)==e.charAt(i-S-1);)C++,S++;if(c[x]=C,C>r)v+=2;else if(S>i)g+=2;else if(!h){var O;if((_=s+f-k)>=0&&_<l&&-1!=u[_])if(w=s+(O=u[_])-_,O>=(C=r-C))return o(t,e,O,w)}}}return[[n,t],[1,e]]}(t,e)}(t=t.substring(0,t.length-c),e=e.substring(0,e.length-c));return d&&h.unshift([0,d]),f&&h.push([0,f]),s(h),null!=l&&(h=function(t,e){var r=function(t,e){if(0===e)return[0,t];for(var r=0,o=0;o<t.length;o++){var i=t[o];if(i[0]===n||0===i[0]){var a=r+i[1].length;if(e===a)return[o+1,t];if(e<a){t=t.slice();var s=e-r,l=[i[0],i[1].slice(0,s)],u=[i[0],i[1].slice(s)];return t.splice(o,1,l,u),[o+1,t]}r=a}}throw new Error("cursor_pos is out of bounds!")}(t,e),o=r[1],i=r[0],a=o[i],s=o[i+1];if(null==a)return t;if(0!==a[0])return t;if(null!=s&&a[1]+s[1]===s[1]+a[1])return o.splice(i,2,s,a),u(o,i,2);if(null!=s&&0===s[1].indexOf(a[1])){o.splice(i,2,[s[0],a[1]],[0,a[1]]);var l=s[1].slice(a[1].length);return l.length>0&&o.splice(i+2,0,[s[0],l]),u(o,i,3)}return t}(h,l)),h=function(t){for(var e=!1,r=function(t){return t.charCodeAt(0)>=56320&&t.charCodeAt(0)<=57343},o=function(t){return t.charCodeAt(t.length-1)>=55296&&t.charCodeAt(t.length-1)<=56319},i=2;i<t.length;i+=1)0===t[i-2][0]&&o(t[i-2][1])&&t[i-1][0]===n&&r(t[i-1][1])&&1===t[i][0]&&r(t[i][1])&&(e=!0,t[i-1][1]=t[i-2][1].slice(-1)+t[i-1][1],t[i][1]=t[i-2][1].slice(-1)+t[i][1],t[i-2][1]=t[i-2][1].slice(0,-1));if(!e)return t;var a=[];for(i=0;i<t.length;i+=1)t[i][1].length>0&&a.push(t[i]);return a}(h)}function o(t,e,n,o){var i=t.substring(0,n),a=e.substring(0,o),s=t.substring(n),l=e.substring(o),u=r(i,a),c=r(s,l);return u.concat(c)}function i(t,e){if(!t||!e||t.charAt(0)!=e.charAt(0))return 0;for(var n=0,r=Math.min(t.length,e.length),o=r,i=0;n<o;)t.substring(i,o)==e.substring(i,o)?i=n=o:r=o,o=Math.floor((r-n)/2+n);return o}function a(t,e){if(!t||!e||t.charAt(t.length-1)!=e.charAt(e.length-1))return 0;for(var n=0,r=Math.min(t.length,e.length),o=r,i=0;n<o;)t.substring(t.length-o,t.length-i)==e.substring(e.length-o,e.length-i)?i=n=o:r=o,o=Math.floor((r-n)/2+n);return o}function s(t){t.push([0,""]);for(var e,r=0,o=0,l=0,u="",c="";r<t.length;)switch(t[r][0]){case 1:l++,c+=t[r][1],r++;break;case n:o++,u+=t[r][1],r++;break;case 0:o+l>1?(0!==o&&0!==l&&(0!==(e=i(c,u))&&(r-o-l>0&&0==t[r-o-l-1][0]?t[r-o-l-1][1]+=c.substring(0,e):(t.splice(0,0,[0,c.substring(0,e)]),r++),c=c.substring(e),u=u.substring(e)),0!==(e=a(c,u))&&(t[r][1]=c.substring(c.length-e)+t[r][1],c=c.substring(0,c.length-e),u=u.substring(0,u.length-e))),0===o?t.splice(r-l,o+l,[1,c]):0===l?t.splice(r-o,o+l,[n,u]):t.splice(r-o-l,o+l,[n,u],[1,c]),r=r-o-l+(o?1:0)+(l?1:0)+1):0!==r&&0==t[r-1][0]?(t[r-1][1]+=t[r][1],t.splice(r,1)):r++,l=0,o=0,u="",c=""}""===t[t.length-1][1]&&t.pop();var d=!1;for(r=1;r<t.length-1;)0==t[r-1][0]&&0==t[r+1][0]&&(t[r][1].substring(t[r][1].length-t[r-1][1].length)==t[r-1][1]?(t[r][1]=t[r-1][1]+t[r][1].substring(0,t[r][1].length-t[r-1][1].length),t[r+1][1]=t[r-1][1]+t[r+1][1],t.splice(r-1,1),d=!0):t[r][1].substring(0,t[r+1][1].length)==t[r+1][1]&&(t[r-1][1]+=t[r+1][1],t[r][1]=t[r][1].substring(t[r+1][1].length)+t[r+1][1],t.splice(r+1,1),d=!0)),r++;d&&s(t)}var l=r;function u(t,e,n){for(var r=e+n-1;r>=0&&r>=e-1;r--)if(r+1<t.length){var o=t[r],i=t[r+1];o[0]===i[1]&&t.splice(r,2,[o[0],o[1]+i[1]])}return t}l.INSERT=1,l.DELETE=n,l.EQUAL=0,t.exports=l},function(t,e){function n(t){var e=[];for(var n in t)e.push(n);return e}(t.exports="function"==typeof Object.keys?Object.keys:n).shim=n},function(t,e){var n="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();function r(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function o(t){return t&&"object"==typeof t&&"number"==typeof t.length&&Object.prototype.hasOwnProperty.call(t,"callee")&&!Object.prototype.propertyIsEnumerable.call(t,"callee")||!1}(e=t.exports=n?r:o).supported=r,e.unsupported=o},function(t,e){"use strict";var n=Object.prototype.hasOwnProperty,r="~";function o(){}function i(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function a(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(r=!1)),a.prototype.eventNames=function(){var t,e,o=[];if(0===this._eventsCount)return o;for(e in t=this._events)n.call(t,e)&&o.push(r?e.slice(1):e);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(t)):o},a.prototype.listeners=function(t,e){var n=r?r+t:t,o=this._events[n];if(e)return!!o;if(!o)return[];if(o.fn)return[o.fn];for(var i=0,a=o.length,s=new Array(a);i<a;i++)s[i]=o[i].fn;return s},a.prototype.emit=function(t,e,n,o,i,a){var s=r?r+t:t;if(!this._events[s])return!1;var l,u,c=this._events[s],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),d){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,n),!0;case 4:return c.fn.call(c.context,e,n,o),!0;case 5:return c.fn.call(c.context,e,n,o,i),!0;case 6:return c.fn.call(c.context,e,n,o,i,a),!0}for(u=1,l=new Array(d-1);u<d;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var f,h=c.length;for(u=0;u<h;u++)switch(c[u].once&&this.removeListener(t,c[u].fn,void 0,!0),d){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,e);break;case 3:c[u].fn.call(c[u].context,e,n);break;case 4:c[u].fn.call(c[u].context,e,n,o);break;default:if(!l)for(f=1,l=new Array(d-1);f<d;f++)l[f-1]=arguments[f];c[u].fn.apply(c[u].context,l)}}return!0},a.prototype.on=function(t,e,n){var o=new i(e,n||this),a=r?r+t:t;return this._events[a]?this._events[a].fn?this._events[a]=[this._events[a],o]:this._events[a].push(o):(this._events[a]=o,this._eventsCount++),this},a.prototype.once=function(t,e,n){var o=new i(e,n||this,!0),a=r?r+t:t;return this._events[a]?this._events[a].fn?this._events[a]=[this._events[a],o]:this._events[a].push(o):(this._events[a]=o,this._eventsCount++),this},a.prototype.removeListener=function(t,e,n,i){var a=r?r+t:t;if(!this._events[a])return this;if(!e)return 0==--this._eventsCount?this._events=new o:delete this._events[a],this;var s=this._events[a];if(s.fn)s.fn!==e||i&&!s.once||n&&s.context!==n||(0==--this._eventsCount?this._events=new o:delete this._events[a]);else{for(var l=0,u=[],c=s.length;l<c;l++)(s[l].fn!==e||i&&!s[l].once||n&&s[l].context!==n)&&u.push(s[l]);u.length?this._events[a]=1===u.length?u[0]:u:0==--this._eventsCount?this._events=new o:delete this._events[a]}return this},a.prototype.removeAllListeners=function(t){var e;return t?(e=r?r+t:t,this._events[e]&&(0==--this._eventsCount?this._events=new o:delete this._events[e])):(this._events=new o,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prototype.setMaxListeners=function(){return this},a.prefixed=r,a.EventEmitter=a,void 0!==t&&(t.exports=a)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.matchText=e.matchSpacing=e.matchNewline=e.matchBlot=e.matchAttributor=e.default=void 0;var 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},o=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=b(n(3)),s=b(n(2)),l=b(n(0)),u=b(n(5)),c=b(n(10)),d=b(n(9)),f=n(36),h=n(37),p=b(n(13)),m=n(26),g=n(38),v=n(39),y=n(40);function b(t){return t&&t.__esModule?t:{default:t}}function _(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var w=(0,c.default)("quill:clipboard"),k="__ql-matcher",C=[[Node.TEXT_NODE,M],[Node.TEXT_NODE,P],["br",function(t,e){return L(e,"\n")||e.insert("\n"),e}],[Node.ELEMENT_NODE,P],[Node.ELEMENT_NODE,I],[Node.ELEMENT_NODE,j],[Node.ELEMENT_NODE,$],[Node.ELEMENT_NODE,function(t,e){var n={},r=t.style||{};return r.fontStyle&&"italic"===D(t).fontStyle&&(n.italic=!0),r.fontWeight&&(D(t).fontWeight.startsWith("bold")||parseInt(D(t).fontWeight)>=700)&&(n.bold=!0),Object.keys(n).length>0&&(e=E(e,n)),parseFloat(r.textIndent||0)>0&&(e=(new s.default).insert("\t").concat(e)),e}],["li",function(t,e){var n=l.default.query(t);if(null==n||"list-item"!==n.blotName||!L(e,"\n"))return e;for(var r=-1,o=t.parentNode;!o.classList.contains("ql-clipboard");)"list"===(l.default.query(o)||{}).blotName&&(r+=1),o=o.parentNode;return r<=0?e:e.compose((new s.default).retain(e.length()-1).retain(1,{indent:r}))}],["b",N.bind(N,"bold")],["i",N.bind(N,"italic")],["style",function(){return new s.default}]],x=[f.AlignAttribute,g.DirectionAttribute].reduce((function(t,e){return t[e.keyName]=e,t}),{}),S=[f.AlignStyle,h.BackgroundStyle,m.ColorStyle,g.DirectionStyle,v.FontStyle,y.SizeStyle].reduce((function(t,e){return t[e.keyName]=e,t}),{}),O=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.quill.root.addEventListener("paste",r.onPaste.bind(r)),r.container=r.quill.addContainer("ql-clipboard"),r.container.setAttribute("contenteditable",!0),r.container.setAttribute("tabindex",-1),r.matchers=[],C.concat(r.options.matchers).forEach((function(t){var e=o(t,2),i=e[0],a=e[1];(n.matchVisual||a!==j)&&r.addMatcher(i,a)})),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"addMatcher",value:function(t,e){this.matchers.push([t,e])}},{key:"convert",value:function(t){if("string"==typeof t)return this.container.innerHTML=t.replace(/\>\r?\n +\</g,"><"),this.convert();var e=this.quill.getFormat(this.quill.selection.savedRange.index);if(e[p.default.blotName]){var n=this.container.innerText;return this.container.innerHTML="",(new s.default).insert(n,_({},p.default.blotName,e[p.default.blotName]))}var r=this.prepareMatching(),i=o(r,2),a=i[0],l=i[1],u=T(this.container,a,l);return L(u,"\n")&&null==u.ops[u.ops.length-1].attributes&&(u=u.compose((new s.default).retain(u.length()-1).delete(1))),w.log("convert",this.container.innerHTML,u),this.container.innerHTML="",u}},{key:"dangerouslyPasteHTML",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.default.sources.API;if("string"==typeof t)this.quill.setContents(this.convert(t),e),this.quill.setSelection(0,u.default.sources.SILENT);else{var r=this.convert(e);this.quill.updateContents((new s.default).retain(t).concat(r),n),this.quill.setSelection(t+r.length(),u.default.sources.SILENT)}}},{key:"onPaste",value:function(t){var e=this;if(!t.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),r=(new s.default).retain(n.index),o=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(u.default.sources.SILENT),setTimeout((function(){r=r.concat(e.convert()).delete(n.length),e.quill.updateContents(r,u.default.sources.USER),e.quill.setSelection(r.length()-n.length,u.default.sources.SILENT),e.quill.scrollingContainer.scrollTop=o,e.quill.focus()}),1)}}},{key:"prepareMatching",value:function(){var t=this,e=[],n=[];return this.matchers.forEach((function(r){var i=o(r,2),a=i[0],s=i[1];switch(a){case Node.TEXT_NODE:n.push(s);break;case Node.ELEMENT_NODE:e.push(s);break;default:[].forEach.call(t.container.querySelectorAll(a),(function(t){t[k]=t[k]||[],t[k].push(s)}))}})),[e,n]}}]),e}(d.default);function E(t,e,n){return"object"===(void 0===e?"undefined":r(e))?Object.keys(e).reduce((function(t,n){return E(t,n,e[n])}),t):t.reduce((function(t,r){return r.attributes&&r.attributes[e]?t.push(r):t.insert(r.insert,(0,a.default)({},_({},e,n),r.attributes))}),new s.default)}function D(t){if(t.nodeType!==Node.ELEMENT_NODE)return{};var e="__ql-computed-style";return t[e]||(t[e]=window.getComputedStyle(t))}function L(t,e){for(var n="",r=t.ops.length-1;r>=0&&n.length<e.length;--r){var o=t.ops[r];if("string"!=typeof o.insert)break;n=o.insert+n}return n.slice(-1*e.length)===e}function A(t){if(0===t.childNodes.length)return!1;var e=D(t);return["block","list-item"].indexOf(e.display)>-1}function T(t,e,n){return t.nodeType===t.TEXT_NODE?n.reduce((function(e,n){return n(t,e)}),new s.default):t.nodeType===t.ELEMENT_NODE?[].reduce.call(t.childNodes||[],(function(r,o){var i=T(o,e,n);return o.nodeType===t.ELEMENT_NODE&&(i=e.reduce((function(t,e){return e(o,t)}),i),i=(o[k]||[]).reduce((function(t,e){return e(o,t)}),i)),r.concat(i)}),new s.default):new s.default}function N(t,e,n){return E(n,t,!0)}function $(t,e){var n=l.default.Attributor.Attribute.keys(t),r=l.default.Attributor.Class.keys(t),o=l.default.Attributor.Style.keys(t),i={};return n.concat(r).concat(o).forEach((function(e){var n=l.default.query(e,l.default.Scope.ATTRIBUTE);null!=n&&(i[n.attrName]=n.value(t),i[n.attrName])||(null==(n=x[e])||n.attrName!==e&&n.keyName!==e||(i[n.attrName]=n.value(t)||void 0),null==(n=S[e])||n.attrName!==e&&n.keyName!==e||(n=S[e],i[n.attrName]=n.value(t)||void 0))})),Object.keys(i).length>0&&(e=E(e,i)),e}function I(t,e){var n=l.default.query(t);if(null==n)return e;if(n.prototype instanceof l.default.Embed){var r={},o=n.value(t);null!=o&&(r[n.blotName]=o,e=(new s.default).insert(r,n.formats(t)))}else"function"==typeof n.formats&&(e=E(e,n.blotName,n.formats(t)));return e}function P(t,e){return L(e,"\n")||(A(t)||e.length()>0&&t.nextSibling&&A(t.nextSibling))&&e.insert("\n"),e}function j(t,e){if(A(t)&&null!=t.nextElementSibling&&!L(e,"\n\n")){var n=t.offsetHeight+parseFloat(D(t).marginTop)+parseFloat(D(t).marginBottom);t.nextElementSibling.offsetTop>t.offsetTop+1.5*n&&e.insert("\n")}return e}function M(t,e){var n=t.data;if("O:P"===t.parentNode.tagName)return e.insert(n.trim());if(0===n.trim().length&&t.parentNode.classList.contains("ql-clipboard"))return e;if(!D(t.parentNode).whiteSpace.startsWith("pre")){var r=function(t,e){return(e=e.replace(/[^\u00a0]/g,"")).length<1&&t?" ":e};n=(n=n.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,r.bind(r,!0)),(null==t.previousSibling&&A(t.parentNode)||null!=t.previousSibling&&A(t.previousSibling))&&(n=n.replace(/^\s+/,r.bind(r,!1))),(null==t.nextSibling&&A(t.parentNode)||null!=t.nextSibling&&A(t.nextSibling))&&(n=n.replace(/\s+$/,r.bind(r,!1)))}return e.insert(n)}O.DEFAULTS={matchers:[],matchVisual:!0},e.default=O,e.matchAttributor=$,e.matchBlot=I,e.matchNewline=P,e.matchSpacing=j,e.matchText=M},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},a=n(6);function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var u=function(t){function e(){return s(this,e),l(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"optimize",value:function(t){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return i(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),e}(((r=a)&&r.__esModule?r:{default:r}).default);u.blotName="bold",u.tagName=["STRONG","B"],e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addControls=e.default=void 0;var r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=c(n(2)),a=c(n(0)),s=c(n(5)),l=c(n(10)),u=c(n(9));function c(t){return t&&t.__esModule?t:{default:t}}function d(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var f=(0,l.default)("quill:toolbar"),h=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o,i=d(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if(Array.isArray(i.options.container)){var a=document.createElement("div");m(a,i.options.container),t.container.parentNode.insertBefore(a,t.container),i.container=a}else"string"==typeof i.options.container?i.container=document.querySelector(i.options.container):i.container=i.options.container;return i.container instanceof HTMLElement?(i.container.classList.add("ql-toolbar"),i.controls=[],i.handlers={},Object.keys(i.options.handlers).forEach((function(t){i.addHandler(t,i.options.handlers[t])})),[].forEach.call(i.container.querySelectorAll("button, select"),(function(t){i.attach(t)})),i.quill.on(s.default.events.EDITOR_CHANGE,(function(t,e){t===s.default.events.SELECTION_CHANGE&&i.update(e)})),i.quill.on(s.default.events.SCROLL_OPTIMIZE,(function(){var t=i.quill.selection.getRange(),e=r(t,1)[0];i.update(e)})),i):(o=f.error("Container required for toolbar",i.options),d(i,o))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"addHandler",value:function(t,e){this.handlers[t]=e}},{key:"attach",value:function(t){var e=this,n=[].find.call(t.classList,(function(t){return 0===t.indexOf("ql-")}));if(n){if(n=n.slice("ql-".length),"BUTTON"===t.tagName&&t.setAttribute("type","button"),null==this.handlers[n]){if(null!=this.quill.scroll.whitelist&&null==this.quill.scroll.whitelist[n])return void f.warn("ignoring attaching to disabled format",n,t);if(null==a.default.query(n))return void f.warn("ignoring attaching to nonexistent format",n,t)}var o="SELECT"===t.tagName?"change":"click";t.addEventListener(o,(function(o){var l=void 0;if("SELECT"===t.tagName){if(t.selectedIndex<0)return;var u=t.options[t.selectedIndex];l=!u.hasAttribute("selected")&&(u.value||!1)}else l=!t.classList.contains("ql-active")&&(t.value||!t.hasAttribute("value")),o.preventDefault();e.quill.focus();var c=e.quill.selection.getRange(),d=r(c,1)[0];if(null!=e.handlers[n])e.handlers[n].call(e,l);else if(a.default.query(n).prototype instanceof a.default.Embed){if(!(l=prompt("Enter "+n)))return;e.quill.updateContents((new i.default).retain(d.index).delete(d.length).insert(function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},n,l)),s.default.sources.USER)}else e.quill.format(n,l,s.default.sources.USER);e.update(d)})),this.controls.push([n,t])}}},{key:"update",value:function(t){var e=null==t?{}:this.quill.getFormat(t);this.controls.forEach((function(n){var o=r(n,2),i=o[0],a=o[1];if("SELECT"===a.tagName){var s=void 0;if(null==t)s=null;else if(null==e[i])s=a.querySelector("option[selected]");else if(!Array.isArray(e[i])){var l=e[i];"string"==typeof l&&(l=l.replace(/\"/g,'\\"')),s=a.querySelector('option[value="'+l+'"]')}null==s?(a.value="",a.selectedIndex=-1):s.selected=!0}else if(null==t)a.classList.remove("ql-active");else if(a.hasAttribute("value")){var u=e[i]===a.getAttribute("value")||null!=e[i]&&e[i].toString()===a.getAttribute("value")||null==e[i]&&!a.getAttribute("value");a.classList.toggle("ql-active",u)}else a.classList.toggle("ql-active",null!=e[i])}))}}]),e}(u.default);function p(t,e,n){var r=document.createElement("button");r.setAttribute("type","button"),r.classList.add("ql-"+e),null!=n&&(r.value=n),t.appendChild(r)}function m(t,e){Array.isArray(e[0])||(e=[e]),e.forEach((function(e){var n=document.createElement("span");n.classList.add("ql-formats"),e.forEach((function(t){if("string"==typeof t)p(n,t);else{var e=Object.keys(t)[0],r=t[e];Array.isArray(r)?function(t,e,n){var r=document.createElement("select");r.classList.add("ql-"+e),n.forEach((function(t){var e=document.createElement("option");!1!==t?e.setAttribute("value",t):e.setAttribute("selected","selected"),r.appendChild(e)})),t.appendChild(r)}(n,e,r):p(n,e,r)}})),t.appendChild(n)}))}h.DEFAULTS={},h.DEFAULTS={container:null,handlers:{clean:function(){var t=this,e=this.quill.getSelection();if(null!=e)if(0==e.length){var n=this.quill.getFormat();Object.keys(n).forEach((function(e){null!=a.default.query(e,a.default.Scope.INLINE)&&t.quill.format(e,!1)}))}else this.quill.removeFormat(e,s.default.sources.USER)},direction:function(t){var e=this.quill.getFormat().align;"rtl"===t&&null==e?this.quill.format("align","right",s.default.sources.USER):t||"right"!==e||this.quill.format("align",!1,s.default.sources.USER),this.quill.format("direction",t,s.default.sources.USER)},indent:function(t){var e=this.quill.getSelection(),n=this.quill.getFormat(e),r=parseInt(n.indent||0);if("+1"===t||"-1"===t){var o="+1"===t?1:-1;"rtl"===n.direction&&(o*=-1),this.quill.format("indent",r+o,s.default.sources.USER)}},link:function(t){!0===t&&(t=prompt("Enter link URL:")),this.quill.format("link",t,s.default.sources.USER)},list:function(t){var e=this.quill.getSelection(),n=this.quill.getFormat(e);"check"===t?"checked"===n.list||"unchecked"===n.list?this.quill.format("list",!1,s.default.sources.USER):this.quill.format("list","unchecked",s.default.sources.USER):this.quill.format("list",t,s.default.sources.USER)}}},e.default=h,e.addControls=m},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},a=n(28),s=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.label.innerHTML=n,r.container.classList.add("ql-color-picker"),[].slice.call(r.container.querySelectorAll(".ql-picker-item"),0,7).forEach((function(t){t.classList.add("ql-primary")})),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"buildItem",value:function(t){var n=i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"buildItem",this).call(this,t);return n.style.backgroundColor=t.getAttribute("value")||"",n}},{key:"selectItem",value:function(t,n){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"selectItem",this).call(this,t,n);var r=this.label.querySelector(".ql-color-label"),o=t&&t.getAttribute("data-value")||"";r&&("line"===r.tagName?r.style.stroke=o:r.style.fill=o)}}]),e}(((r=a)&&r.__esModule?r:{default:r}).default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},a=n(28),s=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.container.classList.add("ql-icon-picker"),[].forEach.call(r.container.querySelectorAll(".ql-picker-item"),(function(t){t.innerHTML=n[t.getAttribute("data-value")||""]})),r.defaultItem=r.container.querySelector(".ql-selected"),r.selectItem(r.defaultItem),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"selectItem",value:function(t,n){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"selectItem",this).call(this,t,n),t=t||this.defaultItem,this.label.innerHTML=t.innerHTML}}]),e}(((r=a)&&r.__esModule?r:{default:r}).default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function t(e,n){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.quill=e,this.boundsContainer=n||document.body,this.root=e.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",(function(){r.root.style.marginTop=-1*r.quill.root.scrollTop+"px"})),this.hide()}return r(t,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(t){var e=t.left+t.width/2-this.root.offsetWidth/2,n=t.bottom+this.quill.root.scrollTop;this.root.style.left=e+"px",this.root.style.top=n+"px",this.root.classList.remove("ql-flip");var r=this.boundsContainer.getBoundingClientRect(),o=this.root.getBoundingClientRect(),i=0;if(o.right>r.right&&(i=r.right-o.right,this.root.style.left=e+i+"px"),o.left<r.left&&(i=r.left-o.left,this.root.style.left=e+i+"px"),o.bottom>r.bottom){var a=o.bottom-o.top,s=t.bottom-t.top+a;this.root.style.top=n-s+"px",this.root.classList.add("ql-flip")}return i}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),t}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=h(n(3)),s=h(n(8)),l=n(43),u=h(l),c=h(n(27)),d=n(15),f=h(n(41));function h(t){return t&&t.__esModule?t:{default:t}}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function g(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var v=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],y=function(t){function e(t,n){p(this,e),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=v);var r=m(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.quill.container.classList.add("ql-snow"),r}return g(e,t),i(e,[{key:"extendToolbar",value:function(t){t.container.classList.add("ql-snow"),this.buildButtons([].slice.call(t.container.querySelectorAll("button")),f.default),this.buildPickers([].slice.call(t.container.querySelectorAll("select")),f.default),this.tooltip=new b(this.quill,this.options.bounds),t.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},(function(e,n){t.handlers.link.call(t,!n.format.link)}))}}]),e}(u.default);y.DEFAULTS=(0,a.default)(!0,{},u.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(t){if(t){var e=this.quill.getSelection();if(null==e||0==e.length)return;var n=this.quill.getText(e);/^\S+@\S+\.\S+$/.test(n)&&0!==n.indexOf("mailto:")&&(n="mailto:"+n),this.quill.theme.tooltip.edit("link",n)}else this.quill.format("link",!1)}}}}});var b=function(t){function e(t,n){p(this,e);var r=m(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.preview=r.root.querySelector("a.ql-preview"),r}return g(e,t),i(e,[{key:"listen",value:function(){var t=this;o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",(function(e){t.root.classList.contains("ql-editing")?t.save():t.edit("link",t.preview.textContent),e.preventDefault()})),this.root.querySelector("a.ql-remove").addEventListener("click",(function(e){if(null!=t.linkRange){var n=t.linkRange;t.restoreFocus(),t.quill.formatText(n,"link",!1,s.default.sources.USER),delete t.linkRange}e.preventDefault(),t.hide()})),this.quill.on(s.default.events.SELECTION_CHANGE,(function(e,n,o){if(null!=e){if(0===e.length&&o===s.default.sources.USER){var i=t.quill.scroll.descendant(c.default,e.index),a=r(i,2),l=a[0],u=a[1];if(null!=l){t.linkRange=new d.Range(e.index-u,l.length());var f=c.default.formats(l.domNode);return t.preview.textContent=f,t.preview.setAttribute("href",f),t.show(),void t.position(t.quill.getBounds(t.linkRange))}}else delete t.linkRange;t.hide()}}))}},{key:"show",value:function(){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),e}(l.BaseTooltip);b.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),e.default=y},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=P(n(29)),o=n(36),i=n(38),a=n(64),s=P(n(65)),l=P(n(66)),u=n(67),c=P(u),d=n(37),f=n(26),h=n(39),p=n(40),m=P(n(56)),g=P(n(68)),v=P(n(27)),y=P(n(69)),b=P(n(70)),_=P(n(71)),w=P(n(72)),k=P(n(73)),C=n(13),x=P(C),S=P(n(74)),O=P(n(75)),E=P(n(57)),D=P(n(41)),L=P(n(28)),A=P(n(59)),T=P(n(60)),N=P(n(61)),$=P(n(108)),I=P(n(62));function P(t){return t&&t.__esModule?t:{default:t}}r.default.register({"attributors/attribute/direction":i.DirectionAttribute,"attributors/class/align":o.AlignClass,"attributors/class/background":d.BackgroundClass,"attributors/class/color":f.ColorClass,"attributors/class/direction":i.DirectionClass,"attributors/class/font":h.FontClass,"attributors/class/size":p.SizeClass,"attributors/style/align":o.AlignStyle,"attributors/style/background":d.BackgroundStyle,"attributors/style/color":f.ColorStyle,"attributors/style/direction":i.DirectionStyle,"attributors/style/font":h.FontStyle,"attributors/style/size":p.SizeStyle},!0),r.default.register({"formats/align":o.AlignClass,"formats/direction":i.DirectionClass,"formats/indent":a.IndentClass,"formats/background":d.BackgroundStyle,"formats/color":f.ColorStyle,"formats/font":h.FontClass,"formats/size":p.SizeClass,"formats/blockquote":s.default,"formats/code-block":x.default,"formats/header":l.default,"formats/list":c.default,"formats/bold":m.default,"formats/code":C.Code,"formats/italic":g.default,"formats/link":v.default,"formats/script":y.default,"formats/strike":b.default,"formats/underline":_.default,"formats/image":w.default,"formats/video":k.default,"formats/list/item":u.ListItem,"modules/formula":S.default,"modules/syntax":O.default,"modules/toolbar":E.default,"themes/bubble":$.default,"themes/snow":I.default,"ui/icons":D.default,"ui/picker":L.default,"ui/icon-picker":T.default,"ui/color-picker":A.default,"ui/tooltip":N.default},!0),e.default=r.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentClass=void 0;var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},a=n(0),s=(r=a)&&r.__esModule?r:{default:r};function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var c=function(t){function e(){return l(this,e),u(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"add",value:function(t,n){if("+1"===n||"-1"===n){var r=this.value(t)||0;n="+1"===n?r+1:r-1}return 0===n?(this.remove(t),!0):i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"add",this).call(this,t,n)}},{key:"canAdd",value:function(t,n){return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"canAdd",this).call(this,t,n)||i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"canAdd",this).call(this,t,parseInt(n))}},{key:"value",value:function(t){return parseInt(i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t))||void 0}}]),e}(s.default.Attributor.Class),d=new c("indent","ql-indent",{scope:s.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});e.IndentClass=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(4);function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var s=function(t){function e(){return i(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(((r=o)&&r.__esModule?r:{default:r}).default);s.blotName="blockquote",s.tagName="blockquote",e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(4);function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var l=function(t){function e(){return a(this,e),s(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,null,[{key:"formats",value:function(t){return this.tagName.indexOf(t.tagName)+1}}]),e}(((r=i)&&r.__esModule?r:{default:r}).default);l.blotName="header",l.tagName=["H1","H2","H3","H4","H5","H6"],e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.ListItem=void 0;var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},i=l(n(0)),a=l(n(4)),s=l(n(25));function l(t){return t&&t.__esModule?t:{default:t}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function d(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var f=function(t){function e(){return u(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return d(e,t),r(e,[{key:"format",value:function(t,n){t!==h.blotName||n?o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n):this.replaceWith(i.default.create(this.statics.scope))}},{key:"remove",value:function(){null==this.prev&&null==this.next?this.parent.remove():o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(t,n){return this.parent.isolate(this.offset(this.parent),this.length()),t===this.parent.statics.blotName?(this.parent.replaceWith(t,n),this):(this.parent.unwrap(),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replaceWith",this).call(this,t,n))}}],[{key:"formats",value:function(t){return t.tagName===this.tagName?void 0:o(e.__proto__||Object.getPrototypeOf(e),"formats",this).call(this,t)}}]),e}(a.default);f.blotName="list-item",f.tagName="LI";var h=function(t){function e(t){u(this,e);var n=c(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t)),r=function(e){if(e.target.parentNode===t){var r=n.statics.formats(t),o=i.default.find(e.target);"checked"===r?o.format("list","unchecked"):"unchecked"===r&&o.format("list","checked")}};return t.addEventListener("touchstart",r),t.addEventListener("mousedown",r),n}return d(e,t),r(e,null,[{key:"create",value:function(t){var n="ordered"===t?"OL":"UL",r=o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,n);return"checked"!==t&&"unchecked"!==t||r.setAttribute("data-checked","checked"===t),r}},{key:"formats",value:function(t){return"OL"===t.tagName?"ordered":"UL"===t.tagName?t.hasAttribute("data-checked")?"true"===t.getAttribute("data-checked")?"checked":"unchecked":"bullet":void 0}}]),r(e,[{key:"format",value:function(t,e){this.children.length>0&&this.children.tail.format(t,e)}},{key:"formats",value:function(){return t={},e=this.statics.blotName,n=this.statics.formats(this.domNode),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t;var t,e,n}},{key:"insertBefore",value:function(t,n){if(t instanceof f)o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n);else{var r=null==n?this.length():n.offset(this),i=this.split(r);i.parent.insertBefore(t,i)}}},{key:"optimize",value:function(t){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&n.domNode.tagName===this.domNode.tagName&&n.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){if(t.statics.blotName!==this.statics.blotName){var n=i.default.create(this.statics.defaultChild);t.moveChildren(n),this.appendChild(n)}o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t)}}]),e}(s.default);h.blotName="list",h.scope=i.default.Scope.BLOCK_BLOT,h.tagName=["OL","UL"],h.defaultChild="list-item",h.allowedChildren=[f],e.ListItem=f,e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(56);function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var s=function(t){function e(){return i(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(((r=o)&&r.__esModule?r:{default:r}).default);s.blotName="italic",s.tagName=["EM","I"],e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},a=n(6);function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var u=function(t){function e(){return s(this,e),l(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,null,[{key:"create",value:function(t){return"super"===t?document.createElement("sup"):"sub"===t?document.createElement("sub"):i(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t)}},{key:"formats",value:function(t){return"SUB"===t.tagName?"sub":"SUP"===t.tagName?"super":void 0}}]),e}(((r=a)&&r.__esModule?r:{default:r}).default);u.blotName="script",u.tagName=["SUB","SUP"],e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(6);function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var s=function(t){function e(){return i(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(((r=o)&&r.__esModule?r:{default:r}).default);s.blotName="strike",s.tagName="S",e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(6);function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var s=function(t){function e(){return i(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(((r=o)&&r.__esModule?r:{default:r}).default);s.blotName="underline",s.tagName="U",e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},a=n(0),s=(r=a)&&r.__esModule?r:{default:r},l=n(27);function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var d=["alt","height","width"],f=function(t){function e(){return u(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"format",value:function(t,n){d.indexOf(t)>-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=i(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return"string"==typeof t&&n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return d.reduce((function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e}),{})}},{key:"match",value:function(t){return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}},{key:"sanitize",value:function(t){return(0,l.sanitize)(t,["http","https","data"])?t:"//:0"}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}(s.default.Embed);f.blotName="image",f.tagName="IMG",e.default=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},a=n(4),s=n(27),l=(r=s)&&r.__esModule?r:{default:r};function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var d=["height","width"],f=function(t){function e(){return u(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"format",value:function(t,n){d.indexOf(t)>-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=i(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return d.reduce((function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e}),{})}},{key:"sanitize",value:function(t){return l.default.sanitize(t)}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}(a.BlockEmbed);f.blotName="video",f.className="ql-video",f.tagName="IFRAME",e.default=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.FormulaBlot=void 0;var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},i=l(n(35)),a=l(n(5)),s=l(n(9));function l(t){return t&&t.__esModule?t:{default:t}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function d(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var f=function(t){function e(){return u(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return d(e,t),r(e,null,[{key:"create",value:function(t){var n=o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return"string"==typeof t&&(window.katex.render(t,n,{throwOnError:!1,errorColor:"#f00"}),n.setAttribute("data-value",t)),n}},{key:"value",value:function(t){return t.getAttribute("data-value")}}]),e}(i.default);f.blotName="formula",f.className="ql-formula",f.tagName="SPAN";var h=function(t){function e(){u(this,e);var t=c(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));if(null==window.katex)throw new Error("Formula module requires KaTeX.");return t}return d(e,t),r(e,null,[{key:"register",value:function(){a.default.register(f,!0)}}]),e}(s.default);e.FormulaBlot=f,e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CodeToken=e.CodeBlock=void 0;var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},i=l(n(0)),a=l(n(5)),s=l(n(9));function l(t){return t&&t.__esModule?t:{default:t}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function d(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var f=function(t){function e(){return u(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return d(e,t),r(e,[{key:"replaceWith",value:function(t){this.domNode.textContent=this.domNode.textContent,this.attach(),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replaceWith",this).call(this,t)}},{key:"highlight",value:function(t){var e=this.domNode.textContent;this.cachedText!==e&&((e.trim().length>0||null==this.cachedText)&&(this.domNode.innerHTML=t(e),this.domNode.normalize(),this.attach()),this.cachedText=e)}}]),e}(l(n(13)).default);f.className="ql-syntax";var h=new i.default.Attributor.Class("token","hljs",{scope:i.default.Scope.INLINE}),p=function(t){function e(t,n){u(this,e);var r=c(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if("function"!=typeof r.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var o=null;return r.quill.on(a.default.events.SCROLL_OPTIMIZE,(function(){clearTimeout(o),o=setTimeout((function(){r.highlight(),o=null}),r.options.interval)})),r.highlight(),r}return d(e,t),r(e,null,[{key:"register",value:function(){a.default.register(h,!0),a.default.register(f,!0)}}]),r(e,[{key:"highlight",value:function(){var t=this;if(!this.quill.selection.composing){this.quill.update(a.default.sources.USER);var e=this.quill.getSelection();this.quill.scroll.descendants(f).forEach((function(e){e.highlight(t.options.highlight)})),this.quill.update(a.default.sources.SILENT),null!=e&&this.quill.setSelection(e,a.default.sources.SILENT)}}}]),e}(s.default);p.DEFAULTS={highlight:null==window.hljs?null:function(t){return window.hljs.highlightAuto(t).value},interval:1e3},e.CodeBlock=f,e.CodeToken=h,e.default=p},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(t,e){t.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(t,e){t.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(t,e){t.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(t,e){t.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BubbleTooltip=void 0;var r=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=d(n(3)),a=d(n(8)),s=n(43),l=d(s),u=n(15),c=d(n(41));function d(t){return t&&t.__esModule?t:{default:t}}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function p(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var m=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],g=function(t){function e(t,n){f(this,e),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=m);var r=h(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.quill.container.classList.add("ql-bubble"),r}return p(e,t),o(e,[{key:"extendToolbar",value:function(t){this.tooltip=new v(this.quill,this.options.bounds),this.tooltip.root.appendChild(t.container),this.buildButtons([].slice.call(t.container.querySelectorAll("button")),c.default),this.buildPickers([].slice.call(t.container.querySelectorAll("select")),c.default)}}]),e}(l.default);g.DEFAULTS=(0,i.default)(!0,{},l.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(t){t?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var v=function(t){function e(t,n){f(this,e);var r=h(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.quill.on(a.default.events.EDITOR_CHANGE,(function(t,e,n,o){if(t===a.default.events.SELECTION_CHANGE)if(null!=e&&e.length>0&&o===a.default.sources.USER){r.show(),r.root.style.left="0px",r.root.style.width="",r.root.style.width=r.root.offsetWidth+"px";var i=r.quill.getLines(e.index,e.length);if(1===i.length)r.position(r.quill.getBounds(e));else{var s=i[i.length-1],l=r.quill.getIndex(s),c=Math.min(s.length()-1,e.index+e.length-l),d=r.quill.getBounds(new u.Range(l,c));r.position(d)}}else document.activeElement!==r.textbox&&r.quill.hasFocus()&&r.hide()})),r}return p(e,t),o(e,[{key:"listen",value:function(){var t=this;r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",(function(){t.root.classList.remove("ql-editing")})),this.quill.on(a.default.events.SCROLL_OPTIMIZE,(function(){setTimeout((function(){if(!t.root.classList.contains("ql-hidden")){var e=t.quill.getSelection();null!=e&&t.position(t.quill.getBounds(e))}}),1)}))}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(t){var n=r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"position",this).call(this,t),o=this.root.querySelector(".ql-tooltip-arrow");if(o.style.marginLeft="",0===n)return n;o.style.marginLeft=-1*n-o.offsetWidth/2+"px"}}]),e}(s.BaseTooltip);v.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),e.BubbleTooltip=v,e.default=g},function(t,e,n){t.exports=n(63)}]).default},t.exports=r()},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<r;o++)if(!t.eq(e[o],n[o]))return!1;return!0}))},a=function(t,e){return function(t,e){return r((function(n,r){return t.eq(e(n),e(r))}))}(i(t),(function(t){return function(t,e){return Array.prototype.slice.call(t).sort(e)}(t,e)}))},s=function(t){return r((function(e,n){var r=Object.keys(e),i=Object.keys(n);if(!a(o).eq(r,i))return!1;for(var s=r.length,l=0;l<s;l++){var u=r[l];if(!t.eq(e[u],n[u]))return!1}return!0}))},l=r((function(t,n){if(t===n)return!0;var r=e(t);return r===e(n)&&(function(t){return-1!==["undefined","boolean","number","string","function","xml","null"].indexOf(t)}(r)?t===n:"array"===r?i(l).eq(t,n):"object"===r&&s(l).eq(t,n))})),u=function(t){return function(e){return r=typeof(n=e),(null===n?"null":"object"===r&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"===r&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":r)===t;var n,r}},c=function(t){return function(e){return typeof e===t}},d=function(t){return function(e){return t===e}},f=u("string"),h=u("object"),p=u("array"),m=d(null),g=c("boolean"),v=d(void 0),y=function(t){return null==t},b=function(t){return!y(t)},_=c("function"),w=c("number"),k=function(){},C=function(t,e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return t(e.apply(null,n))}},x=function(t,e){return function(n){return t(e(n))}},S=function(t){return function(){return t}},O=function(t){return t},E=function(t,e){return t===e};function D(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.concat(n);return t.apply(null,o)}}var L=function(t){return function(e){return!t(e)}},A=function(t){return t()},T=function(t){t()},N=S(!1),$=S(!0),I=function(){return P},P=function(){var t=function(t){return t()},e=O;return{fold:function(t,e){return t()},isSome:N,isNone:$,getOr:e,getOrThunk:t,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:S(null),getOrUndefined:S(void 0),or:e,orThunk:t,map:I,each:k,bind:I,exists:N,forall:$,filter:function(){return I()},toArray:function(){return[]},toString:S("none()")}}(),j=function(t){var e=S(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},isSome:$,isNone:N,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return j(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:P},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},M={some:j,none:I,from:function(t){return null==t?P:j(t)}},R=Array.prototype.slice,B=Array.prototype.indexOf,q=Array.prototype.push,F=function(t,e){return B.call(t,e)},U=function(t,e){return F(t,e)>-1},z=function(t,e){for(var n=0,r=t.length;n<r;n++){if(e(t[n],n))return!0}return!1},H=function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var i=t[o];r[o]=e(i,o)}return r},V=function(t,e){for(var n=0,r=t.length;n<r;n++){e(t[n],n)}},W=function(t,e){for(var n=t.length-1;n>=0;n--){e(t[n],n)}},K=function(t,e){for(var n=[],r=[],o=0,i=t.length;o<i;o++){var a=t[o];(e(a,o)?n:r).push(a)}return{pass:n,fail:r}},Y=function(t,e){for(var n=[],r=0,o=t.length;r<o;r++){var i=t[r];e(i,r)&&n.push(i)}return n},Z=function(t,e,n){return W(t,(function(t,r){n=e(n,t,r)})),n},G=function(t,e,n){return V(t,(function(t,r){n=e(n,t,r)})),n},X=function(t,e,n){for(var r=0,o=t.length;r<o;r++){var i=t[r];if(e(i,r))return M.some(i);if(n(i,r))break}return M.none()},Q=function(t,e){return X(t,e,N)},J=function(t,e){for(var n=0,r=t.length;n<r;n++){if(e(t[n],n))return M.some(n)}return M.none()},tt=function(t,e){return function(t){for(var e=[],n=0,r=t.length;n<r;++n){if(!p(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);q.apply(e,t[n])}return e}(H(t,e))},et=function(t,e){for(var n=0,r=t.length;n<r;++n){if(!0!==e(t[n],n))return!1}return!0},nt=function(t){var e=R.call(t,0);return e.reverse(),e},rt=function(t,e){return Y(t,(function(t){return!U(e,t)}))},ot=function(t,e){var n=R.call(t,0);return n.sort(e),n},it=function(t,e){return e>=0&&e<t.length?M.some(t[e]):M.none()},at=function(t){return it(t,0)},st=function(t){return it(t,t.length-1)},lt=_(Array.from)?Array.from:function(t){return R.call(t)},ut=function(t,e){for(var n=0;n<t.length;n++){var r=e(t[n],n);if(r.isSome())return r}return M.none()},ct=Object.keys,dt=Object.hasOwnProperty,ft=function(t,e){for(var n=ct(t),r=0,o=n.length;r<o;r++){var i=n[r];e(t[i],i)}},ht=function(t,e){return pt(t,(function(t,n){return{k:n,v:e(t,n)}}))},pt=function(t,e){var n={};return ft(t,(function(t,r){var o=e(t,r);n[o.k]=o.v})),n},mt=function(t){return function(e,n){t[n]=e}},gt=function(t,e,n,r){return ft(t,(function(t,o){(e(t,o)?n:r)(t,o)})),{}},vt=function(t,e){var n={};return gt(t,e,mt(n),k),n},yt=function(t){return function(t,e){var n=[];return ft(t,(function(t,r){n.push(e(t,r))})),n}(t,O)},bt=function(t,e){return _t(t,e)?M.from(t[e]):M.none()},_t=function(t,e){return dt.call(t,e)},wt=function(t,e){return _t(t,e)&&void 0!==t[e]&&null!==t[e]},kt=Array.isArray,Ct=function(t,e,n){var r,o;if(!t)return!1;if(n=n||t,void 0!==t.length){for(r=0,o=t.length;r<o;r++)if(!1===e.call(n,t[r],r,t))return!1}else for(r in t)if(_t(t,r)&&!1===e.call(n,t[r],r,t))return!1;return!0},xt=function(t,e){var n=[];return Ct(t,(function(r,o){n.push(e(r,o,t))})),n},St=function(t,e){var n=[];return Ct(t,(function(r,o){e&&!e(r,o,t)||n.push(r)})),n},Ot=function(t,e){if(t)for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1},Et=function(t,e,n,r){for(var o=v(n)?t[0]:n,i=0;i<t.length;i++)o=e.call(r,o,t[i],i);return o},Dt=function(t,e,n){var r,o;for(r=0,o=t.length;r<o;r++)if(e.call(n,t[r],r,t))return r;return-1},Lt=function(t){return t[t.length-1]},At=function(){return At=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},At.apply(this,arguments)};function Tt(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}var Nt=function(t){var e,n=!1;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return n||(n=!0,e=t.apply(null,r)),e}},$t=function(){return It(0,0)},It=function(t,e){return{major:t,minor:e}},Pt={nu:It,detect:function(t,e){var n=String(e).toLowerCase();return 0===t.length?$t():function(t,e){var n=function(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(r.test(e))return r}}(t,e);if(!n)return{major:0,minor:0};var r=function(t){return Number(e.replace(n,"$"+t))};return It(r(1),r(2))}(t,n)},unknown:$t},jt=function(t,e){var n=String(e).toLowerCase();return Q(t,(function(t){return t.search(n)}))},Mt=function(t,e){return-1!==t.indexOf(e)},Rt=function(t,e){return function(t,e,n){return""===e||t.length>=e.length&&t.substr(n,n+e.length)===e}(t,e,0)},Bt=function(t){return function(e){return e.replace(t,"")}},qt=Bt(/^\s+|\s+$/g),Ft=Bt(/^\s+/g),Ut=Bt(/\s+$/g),zt=function(t){return t.length>0},Ht=function(t){return!zt(t)},Vt=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Wt=function(t){return function(e){return Mt(e,t)}},Kt=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(t){return Mt(t,"edge/")&&Mt(t,"chrome")&&Mt(t,"safari")&&Mt(t,"applewebkit")}},{name:"Chrome",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Vt],search:function(t){return Mt(t,"chrome")&&!Mt(t,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(t){return Mt(t,"msie")||Mt(t,"trident")}},{name:"Opera",versionRegexes:[Vt,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Wt("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Wt("firefox")},{name:"Safari",versionRegexes:[Vt,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(t){return(Mt(t,"safari")||Mt(t,"mobile/"))&&Mt(t,"applewebkit")}}],Yt=[{name:"Windows",search:Wt("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(t){return Mt(t,"iphone")||Mt(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]+).*/]}],Zt={browsers:S(Kt),oses:S(Yt)},Gt="Edge",Xt="Chrome",Qt="Opera",Jt="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(Xt),isIE:r("IE"),isOpera:r(Qt),isFirefox:r(Jt),isSafari:r(te)}},ne={unknown:function(){return ee({current:void 0,version:Pt.unknown()})},nu:ee,edge:S(Gt),chrome:S(Xt),ie:S("IE"),opera:S(Qt),firefox:S(Jt),safari:S(te)},re="Windows",oe="Android",ie="Linux",ae="Solaris",se="FreeBSD",le="ChromeOS",ue=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(le)}},ce={unknown:function(){return ue({current:void 0,version:Pt.unknown()})},nu:ue,windows:S(re),ios:S("iOS"),android:S(oe),linux:S(ie),osx:S("OSX"),solaris:S(ae),freebsd:S(se),chromeos:S(le)},de=function(t,e,n){var r=Zt.browsers(),o=Zt.oses(),i=e.bind((function(t){return function(t,e){return ut(e.brands,(function(e){var n=e.brand.toLowerCase();return Q(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(ce.unknown,ce.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)"),l=o||!i&&a&&r("(min-device-width:768px)"),u=i||a&&!l,c=e.isSafari()&&t.isiOS()&&!1===/safari/i.test(n),d=!u&&!l&&!c;return{isiPad:S(o),isiPhone:S(i),isTablet:S(l),isPhone:S(u),isTouch:S(s),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:S(c),isDesktop:S(d)}}(a,i,t,n);return{browser:i,os:a,deviceType:s}},fe=function(t){return window.matchMedia(t).matches},he=Nt((function(){return de(navigator.userAgent,M.from(navigator.userAgentData),fe)})),pe=function(){return he()},me=navigator.userAgent,ge=pe(),ve=ge.browser,ye=ge.os,be=ge.deviceType,_e=/WebKit/.test(me)&&!ve.isEdge(),we="FormData"in window&&"FileReader"in window&&"URL"in window&&!!URL.createObjectURL,ke=-1!==me.indexOf("Windows Phone"),Ce={opera:ve.isOpera(),webkit:_e,ie:!(!ve.isIE()&&!ve.isEdge())&&ve.version.major,gecko:ve.isFirefox(),mac:ye.isOSX()||ye.isiOS(),iOS:be.isiPad()||be.isiPhone(),android:ye.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:be.isDesktop(),windowsPhone:ke,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:ye.current,version:ye.version,isAndroid:ye.isAndroid,isChromeOS:ye.isChromeOS,isFreeBSD:ye.isFreeBSD,isiOS:ye.isiOS,isLinux:ye.isLinux,isOSX:ye.isOSX,isSolaris:ye.isSolaris,isWindows:ye.isWindows},deviceType:{isDesktop:be.isDesktop,isiPad:be.isiPad,isiPhone:be.isiPhone,isPhone:be.isPhone,isTablet:be.isTablet,isTouch:be.isTouch,isWebView:be.isWebView}},xe=/^\s*|\s*$/g,Se=function(t){return null==t?"":(""+t).replace(xe,"")},Oe=function(t,e){return e?!("array"!==e||!kt(t))||typeof t===e:void 0!==t},Ee=function(t,e,n,r){r=r||this,t&&(n&&(t=t[n]),Ct(t,(function(t,o){if(!1===e.call(r,t,o,n))return!1;Ee(t,e,n,r)})))},De={trim:Se,isArray:kt,is:Oe,toArray:function(t){if(kt(t))return t;for(var e=[],n=0,r=t.length;n<r;n++)e[n]=t[n];return e},makeMap:function(t,e,n){var r;for(e=e||",","string"==typeof(t=t||[])&&(t=t.split(e)),n=n||{},r=t.length;r--;)n[t[r]]={};return n},each:Ct,map:xt,grep:St,inArray:Ot,hasOwn:_t,extend:function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r++){var o=e[r];for(var i in o)if(_t(o,i)){var a=o[i];void 0!==a&&(t[i]=a)}}return t},create:function(t,e,n){var r,o,i,a=this,s=0,l=(t=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(t))[3].match(/(^|\.)(\w+)$/i)[2],u=a.createNS(t[3].replace(/\.\w+$/,""),n);if(!u[l]){if("static"===t[2])return u[l]=e,void(this.onCreate&&this.onCreate(t[2],t[3],u[l]));e[l]||(e[l]=function(){},s=1),u[l]=e[l],a.extend(u[l].prototype,e),t[5]&&(r=a.resolve(t[5]).prototype,o=t[5].match(/\.(\w+)$/i)[1],i=u[l],u[l]=s?function(){return r[o].apply(this,arguments)}:function(){return this.parent=r[o],i.apply(this,arguments)},u[l].prototype[l]=u[l],a.each(r,(function(t,e){u[l].prototype[e]=r[e]})),a.each(e,(function(t,e){r[e]?u[l].prototype[e]=function(){return this.parent=r[e],t.apply(this,arguments)}:e!==l&&(u[l].prototype[e]=t)}))),a.each(e.static,(function(t,e){u[l][e]=t}))}},walk:Ee,createNS:function(t,e){var n,r;for(e=e||window,t=t.split("."),n=0;n<t.length;n++)e[r=t[n]]||(e[r]={}),e=e[r];return e},resolve:function(t,e){var n,r;for(e=e||window,n=0,r=(t=t.split(".")).length;n<r&&(e=e[t[n]]);n++);return e},explode:function(t,e){return!t||Oe(t,"array")?t:xt(t.split(e||","),Se)},_addCacheSuffix:function(t){var e=Ce.cacheSuffix;return e&&(t+=(-1===t.indexOf("?")?"?":"&")+e),t}},Le=function(t){if(null==t)throw new Error("Node cannot be null or undefined");return{dom:t}},Ae={fromHtml:function(t,e){var n=(e||document).createElement("div");if(n.innerHTML=t,!n.hasChildNodes()||n.childNodes.length>1)throw console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return Le(n.childNodes[0])},fromTag:function(t,e){var n=(e||document).createElement(t);return Le(n)},fromText:function(t,e){var n=(e||document).createTextNode(t);return Le(n)},fromDom:Le,fromPoint:function(t,e,n){return M.from(t.dom.elementFromPoint(e,n)).map(Le)}},Te=function(t,e){var n=[],r=function(t){return n.push(t),e(t)},o=e(t);do{o=o.bind(r)}while(o.isSome());return n},Ne=function(t,e){var n=t.dom;if(1!==n.nodeType)return!1;var r=n;if(void 0!==r.matches)return r.matches(e);if(void 0!==r.msMatchesSelector)return r.msMatchesSelector(e);if(void 0!==r.webkitMatchesSelector)return r.webkitMatchesSelector(e);if(void 0!==r.mozMatchesSelector)return r.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")},$e=function(t){return 1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType||0===t.childElementCount},Ie=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 Me=function(t){return t.dom.nodeName.toLowerCase()},Re=function(t){return t.dom.nodeType},Be=function(t){return function(e){return Re(e)===t}},qe=Be(1),Fe=Be(3),Ue=Be(9),ze=Be(11),He=function(t){return Ae.fromDom(t.dom.ownerDocument)},Ve=function(t){return Ue(t)?t:He(t)},We=function(t){return Ae.fromDom(Ve(t).dom.defaultView)},Ke=function(t){return M.from(t.dom.parentNode).map(Ae.fromDom)},Ye=function(t){return M.from(t.dom.previousSibling).map(Ae.fromDom)},Ze=function(t){return M.from(t.dom.nextSibling).map(Ae.fromDom)},Ge=function(t){return nt(Te(t,Ye))},Xe=function(t){return Te(t,Ze)},Qe=function(t){return H(t.dom.childNodes,Ae.fromDom)},Je=function(t,e){var n=t.dom.childNodes;return M.from(n[e]).map(Ae.fromDom)},tn=function(t){return Je(t,0)},en=function(t){return Je(t,t.dom.childNodes.length-1)},nn=function(t){return t.dom.childNodes.length},rn=function(t){return ze(t)&&b(t.dom.host)},on=_(Element.prototype.attachShadow)&&_(Node.prototype.getRootNode),an=S(on),sn=on?function(t){return Ae.fromDom(t.dom.getRootNode())}:Ve,ln=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)}(Ve(t))},un=function(t){return Ae.fromDom(t.dom.host)},cn=function(t){return b(t.dom.shadowRoot)},dn=function(t,e){Ke(t).each((function(n){n.dom.insertBefore(e.dom,t.dom)}))},fn=function(t,e){Ze(t).fold((function(){Ke(t).each((function(t){pn(t,e)}))}),(function(t){dn(t,e)}))},hn=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)},mn=function(t,e){V(e,(function(e){pn(t,e)}))},gn=function(t){t.dom.textContent="",V(Qe(t),(function(t){vn(t)}))},vn=function(t){var e=t.dom;null!==e.parentNode&&e.parentNode.removeChild(e)},yn=function(t){var e,n=Qe(t);n.length>0&&(e=t,V(n,(function(t){dn(e,t)}))),vn(t)},bn=function(t){var e=Fe(t)?t.dom.parentNode:t.dom;if(null==e||null===e.ownerDocument)return!1;var n=e.ownerDocument;return function(t){var e=sn(t);return rn(e)?M.some(e):M.none()}(Ae.fromDom(e)).fold((function(){return n.body.contains(e)}),x(bn,un))},_n=function(t,e){return{left:t,top:e,translate:function(n,r){return _n(t+n,e+r)}}},wn=_n,kn=function(t,e){return void 0!==t?t:void 0!==e?e:0},Cn=function(t){var e=t.dom,n=e.ownerDocument.body;return n===e?wn(n.offsetLeft,n.offsetTop):bn(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)},On=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}},Dn=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()?M.none():M.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)}))},Ln=function(t){return function(e){return!!e&&e.nodeType===t}},An=function(t){return!!t&&!Object.getPrototypeOf(t)},Tn=Ln(1),Nn=function(t){var e=t.map((function(t){return t.toLowerCase()}));return function(t){if(t&&t.nodeName){var n=t.nodeName.toLowerCase();return U(e,n)}return!1}},$n=function(t,e){var n=e.toLowerCase().split(" ");return function(e){if(Tn(e))for(var r=0;r<n.length;r++){var o=e.ownerDocument.defaultView.getComputedStyle(e,null);if((o?o.getPropertyValue(t):null)===n[r])return!0}return!1}},In=function(t){return function(e){return Tn(e)&&e.hasAttribute(t)}},Pn=function(t){return Tn(t)&&t.hasAttribute("data-mce-bogus")},jn=function(t){return Tn(t)&&"TABLE"===t.tagName},Mn=function(t){return function(e){if(Tn(e)){if(e.contentEditable===t)return!0;if(e.getAttribute("data-mce-contenteditable")===t)return!0}return!1}},Rn=Nn(["textarea","input"]),Bn=Ln(3),qn=Ln(8),Fn=Ln(9),Un=Ln(11),zn=Nn(["br"]),Hn=Nn(["img"]),Vn=Mn("true"),Wn=Mn("false"),Kn=Nn(["td","th"]),Yn=Nn(["video","audio","object","embed"]),Zn=function(t,e,n){return void 0===n&&(n=E),t.exists((function(t){return n(t,e)}))},Gn=function(t,e,n){return t.isSome()&&e.isSome()?M.some(n(t.getOrDie(),e.getOrDie())):M.none()},Xn=function(t){return void 0!==t.style&&_(t.style.getPropertyValue)},Qn=function(t,e,n){if(!(f(n)||g(n)||w(n)))throw console.error("Invalid call to Attribute.set. Key ",e,":: Value ",n,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(e,n+"")},Jn=function(t,e,n){Qn(t.dom,e,n)},tr=function(t,e){var n=t.dom;ft(e,(function(t,e){Qn(n,e,t)}))},er=function(t,e){var n=t.dom.getAttribute(e);return null===n?void 0:n},nr=function(t,e){return M.from(er(t,e))},rr=function(t,e){t.dom.removeAttribute(e)},or=function(t,e){var n=t.dom;ft(e,(function(t,e){!function(t,e,n){if(!f(n))throw console.error("Invalid call to CSS.set. Property ",e,":: Value ",n,":: Element ",t),new Error("CSS value must be a string: "+n);Xn(t)&&t.style.setProperty(e,n)}(n,e,t)}))},ir=function(t,e){var n=t.dom,r=window.getComputedStyle(n).getPropertyValue(e);return""!==r||bn(t)?r:ar(n,e)},ar=function(t,e){return Xn(t)?t.style.getPropertyValue(e):""},sr=function(t,e){var n=t.dom,r=ar(n,e);return M.from(r).filter((function(t){return t.length>0}))},lr=function(t){var e={},n=t.dom;if(Xn(n))for(var r=0;r<n.style.length;r++){var o=n.style.item(r);e[o]=n.style[o]}return e},ur=pe().browser,cr=function(t){return Q(t,qe)},dr=function(t,e){return t.children&&U(t.children,e)},fr=function(t,e,n){var r=0,o=0,i=t.ownerDocument;if(n=n||t,e){if(n===t&&e.getBoundingClientRect&&"static"===ir(Ae.fromDom(t),"position")){var a=e.getBoundingClientRect();return{x:r=a.left+(i.documentElement.scrollLeft||t.scrollLeft)-i.documentElement.clientLeft,y:o=a.top+(i.documentElement.scrollTop||t.scrollTop)-i.documentElement.clientTop}}for(var s=e;s&&s!==n&&s.nodeType&&!dr(s,n);){var l=s;r+=l.offsetLeft||0,o+=l.offsetTop||0,s=l.offsetParent}for(s=e.parentNode;s&&s!==n&&s.nodeType&&!dr(s,n);)r-=s.scrollLeft||0,o-=s.scrollTop||0,s=s.parentNode;o+=function(t){return ur.isFirefox()&&"table"===Me(t)?cr(Qe(t)).filter((function(t){return"caption"===Me(t)})).bind((function(t){return cr(Xe(t)).map((function(e){var n=e.dom.offsetTop,r=t.dom.offsetTop,o=t.dom.offsetHeight;return n<=r?-o:0}))})).getOr(0):0}(Ae.fromDom(e))}return{x:r,y:o}},hr={},pr={exports:hr};!function(t,e,r,o){var i,a;i=this,a=function(){var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{},e={exports:{}};!function(e){!function(t){var n=setTimeout;function r(){}function o(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],c(t,this)}function i(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,o._immediateFn((function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var r;try{r=n(t._value)}catch(t){return void s(e.promise,t)}a(e.promise,r)}else(1===t._state?a:s)(e.promise,t._value)}))):t._deferreds.push(e)}function a(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof o)return t._state=3,t._value=e,void l(t);if("function"==typeof n)return void c((r=n,i=e,function(){r.apply(i,arguments)}),t)}t._state=1,t._value=e,l(t)}catch(e){s(t,e)}var r,i}function s(t,e){t._state=2,t._value=e,l(t)}function l(t){2===t._state&&0===t._deferreds.length&&o._immediateFn((function(){t._handled||o._unhandledRejectionFn(t._value)}));for(var e=0,n=t._deferreds.length;e<n;e++)i(t,t._deferreds[e]);t._deferreds=null}function u(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function c(t,e){var n=!1;try{t((function(t){n||(n=!0,a(e,t))}),(function(t){n||(n=!0,s(e,t))}))}catch(t){if(n)return;n=!0,s(e,t)}}o.prototype.catch=function(t){return this.then(null,t)},o.prototype.then=function(t,e){var n=new this.constructor(r);return i(this,new u(t,e,n)),n},o.all=function(t){var e=Array.prototype.slice.call(t);return new o((function(t,n){if(0===e.length)return t([]);var r=e.length;function o(i,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var s=a.then;if("function"==typeof s)return void s.call(a,(function(t){o(i,t)}),n)}e[i]=a,0==--r&&t(e)}catch(t){n(t)}}for(var i=0;i<e.length;i++)o(i,e[i])}))},o.resolve=function(t){return t&&"object"==typeof t&&t.constructor===o?t:new o((function(e){e(t)}))},o.reject=function(t){return new o((function(e,n){n(t)}))},o.race=function(t){return new o((function(e,n){for(var r=0,o=t.length;r<o;r++)t[r].then(e,n)}))},o._immediateFn="function"==typeof setImmediate?function(t){setImmediate(t)}:function(t){n(t,0)},o._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)},o._setImmediateFn=function(t){o._immediateFn=t},o._setUnhandledRejectionFn=function(t){o._unhandledRejectionFn=t},e.exports?e.exports=o:t.Promise||(t.Promise=o)}(t)}(e);var r=e.exports;return{boltExport:("undefined"!=typeof window?window:Function("return this;")()).Promise||r}},"object"==typeof e&&void 0!==r?r.exports=a():"function"==typeof t&&t.amd?t(a):(i="undefined"!=typeof globalThis?globalThis:i||self).EphoxContactWrapper=a()}(void 0,hr,pr);var mr=pr.exports.boltExport,gr=function(t){var e=M.none(),n=[],r=function(t){o()?a(t):n.push(t)},o=function(){return e.isSome()},i=function(t){V(t,a)},a=function(t){e.each((function(e){setTimeout((function(){t(e)}),0)}))};return t((function(t){o()||(e=M.some(t),i(n),n=[])})),{get:r,map:function(t){return gr((function(e){r((function(n){e(t(n))}))}))},isReady:o}},vr={nu:gr,pure:function(t){return gr((function(e){e(t)}))}},yr=function(t){setTimeout((function(){throw t}),0)},br=function(t){var e=function(e){t().then(e,yr)};return{map:function(e){return br((function(){return t().then(e)}))},bind:function(e){return br((function(){return t().then((function(t){return e(t).toPromise()}))}))},anonBind:function(e){return br((function(){return t().then((function(){return e.toPromise()}))}))},toLazy:function(){return vr.nu(e)},toCached:function(){var e=null;return br((function(){return null===e&&(e=t()),e}))},toPromise:t,get:e}},_r=function(t){return br((function(){return new mr(t)}))},wr=function(t,e){return e((function(e){var n=[],r=0;0===t.length?e([]):V(t,(function(o,i){o.get(function(o){return function(i){n[o]=i,++r>=t.length&&e(n)}}(i))}))}))},kr=function(t){return{isValue:$,isError:N,getOr:S(t),getOrThunk:S(t),getOrDie:S(t),or:function(e){return kr(t)},orThunk:function(e){return kr(t)},fold:function(e,n){return n(t)},map:function(e){return kr(e(t))},mapError:function(e){return kr(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 M.some(t)}}},Cr=function(t){return{isValue:N,isError:$,getOr:O,getOrThunk:function(t){return t()},getOrDie:function(){return(e=String(t),function(){throw new Error(e)})();var e},or:O,orThunk:function(t){return t()},fold:function(e,n){return e(t)},map:function(e){return Cr(t)},mapError:function(e){return Cr(e(t))},each:k,bind:function(e){return Cr(t)},exists:N,forall:$,toOptional:M.none}},xr={value:kr,error:Cr,fromOption:function(t,e){return t.fold((function(){return Cr(e)}),kr)}},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 V(t,(function(r,o){var i=ct(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;r<arguments.length;r++)n[r]=arguments[r];var i=n.length;if(i!==s.length)throw new Error("Wrong number of arguments to case "+a+". Expected "+s.length+" ("+s+"), got "+i);var l=function(t){var r=ct(t);if(e.length!==r.length)throw new Error("Wrong number of arguments to match. Expected: "+e.join(",")+"\nActual: "+r.join(","));if(!et(e,(function(t){return U(r,t)})))throw new Error("Not all branches were specified when using match. Specified: "+r.join(", ")+"\nRequired: "+e.join(", "));return t[a].apply(null,n)};return{fold:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(e.length!==t.length)throw new Error("Wrong number of arguments to fold. Expected "+t.length+", got "+e.length);var i=e[o];return i.apply(null,n)},match:l,log:function(t){console.log(t,{constructors:e,constructor:a,params:n})}}}})),n};Sr([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);var Or=function(t){return t.fold(O,O)};function Er(t,e,n,r,o){return t(n,r)?M.some(n):_(o)&&o(n)?M.none():e(n,r,o)}var Dr,Lr,Ar,Tr,Nr,$r,Ir,Pr,jr,Mr,Rr,Br,qr,Fr,Ur,zr,Hr,Vr,Wr,Kr,Yr=function(t,e,n){for(var r=t.dom,o=_(n)?n:N;r.parentNode;){r=r.parentNode;var i=Ae.fromDom(r);if(e(i))return M.some(i);if(o(i))break}return M.none()},Zr=function(t,e,n){return Er((function(t,e){return e(t)}),Yr,t,e,n)},Gr=function(t,e){return Q(t.dom.childNodes,(function(t){return e(Ae.fromDom(t))})).map(Ae.fromDom)},Xr=function(t,e,n){return Yr(t,(function(t){return Ne(t,e)}),n)},Qr=function(t,e){return function(t,e){var n=void 0===e?document:e.dom;return $e(n)?M.none():M.from(n.querySelector(t)).map(Ae.fromDom)}(e,t)},Jr=function(t,e,n){return Er((function(t,e){return Ne(t,e)}),Xr,t,e,n)},to=window.Promise?window.Promise:mr,eo=function(t,e){return"number"!=typeof e&&(e=0),setTimeout(t,e)},no=function(t,e){return"number"!=typeof e&&(e=1),setInterval(t,e)},ro=function(t,e){var n,r=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];clearTimeout(n),n=eo((function(){t.apply(this,r)}),e)};return r.stop=function(){clearTimeout(n)},r},oo={requestAnimationFrame:function(t,e){Dr?Dr.then(t):Dr=new to((function(t){e||(e=document.body),function(t,e){for(var n=window.requestAnimationFrame,r=["ms","moz","webkit"],o=0;o<r.length&&!n;o++)n=window[r[o]+"RequestAnimationFrame"];n||(n=function(t){window.setTimeout(t,0)}),n(t,e)}(t,e)})).then(t)},setTimeout:eo,setInterval:no,setEditorTimeout:function(t,e,n){return eo((function(){t.removed||e()}),n)},setEditorInterval:function(t,e,n){var r=no((function(){t.removed?clearInterval(r):e()}),n);return r},debounce:ro,throttle:ro,clearInterval:function(t){return clearInterval(t)},clearTimeout:function(t){return clearTimeout(t)}},io=function(t,e){void 0===e&&(e={});var n=0,r={},o=Ae.fromDom(t),i=Ve(o),a=e.maxLoadTime||5e3,s=function(s,l,u){var c,d=De._addCacheSuffix(s),f=function(t){return bt(r,t).getOrThunk((function(){return{id:"mce-u"+n++,passed:[],failed:[],count:0}}))}(d);r[d]=f,f.count++;var h=function(t,e){for(var n=t.length;n--;)t[n]();f.status=e,f.passed=[],f.failed=[],c&&(c.onload=null,c.onerror=null,c=null)},p=function(){return h(f.passed,2)},m=function(){return h(f.failed,3)},g=function(){var e,n;e=function(){for(var e=t.styleSheets,n=e.length;n--;){var r=e[n].ownerNode;if(r&&r.id===c.id)return p(),!0}return!1},n=g,e()||(Date.now()-b<a?oo.setTimeout(n):m())};if(l&&f.passed.push(l),u&&f.failed.push(u),1!==f.status)if(2!==f.status)if(3!==f.status){f.status=1;var v=Ae.fromTag("link",i.dom);tr(v,{rel:"stylesheet",type:"text/css",id:f.id});var y,b=Date.now();e.contentCssCors&&Jn(v,"crossOrigin","anonymous"),e.referrerPolicy&&Jn(v,"referrerpolicy",e.referrerPolicy),(c=v.dom).onload=g,c.onerror=m,y=v,pn(ln(o),y),Jn(v,"href",d)}else m();else p()},l=function(t){return _r((function(e){s(t,C(e,S(xr.value(t))),C(e,S(xr.error(t))))}))},u=function(t){var e=De._addCacheSuffix(t);bt(r,e).each((function(t){var n,i;0===--t.count&&(delete r[e],n=t.id,i=ln(o),Qr(i,"#"+n).each(vn))}))};return{load:s,loadAll:function(t,e,n){var r;(r=H(t,l),wr(r,_r)).get((function(t){var r=K(t,(function(t){return t.isValue()}));r.fail.length>0?n(r.fail.map(Or)):e(r.pass.map(Or))}))},unload:u,unloadAll:function(t){V(t,(function(t){u(t)}))},_setReferrerPolicy:function(t){e.referrerPolicy=t}}},ao=function(){var t=new WeakMap;return{forElement:function(e,n){var r=sn(e).dom;return M.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}(),lo=function(t){var e;return function(n){return e=e||function(t,e){for(var n={},r=0,o=t.length;r<o;r++){var i=t[r];n[String(i)]=e(i,r)}return n}(t,$),_t(e,Me(n))}},uo=lo(["h1","h2","h3","h4","h5","h6"]),co=lo(["article","aside","details","div","dt","figcaption","footer","form","fieldset","header","hgroup","html","main","nav","section","summary","body","p","dl","multicol","dd","figure","address","center","blockquote","h1","h2","h3","h4","h5","h6","listing","xmp","pre","plaintext","menu","dir","ul","ol","li","hr","table","tbody","thead","tfoot","th","tr","td","caption"]),fo=function(t){return qe(t)&&!co(t)},ho=function(t){return qe(t)&&"br"===Me(t)},po=lo(["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"]),mo=lo(["ul","ol","dl"]),go=lo(["li","dd","dt"]),vo=lo(["thead","tbody","tfoot"]),yo=lo(["td","th"]),bo=lo(["pre","script","textarea","style"]),_o=" ",wo="\ufeff",ko=function(t){return"\ufeff"===t},Co=function(t){return t.replace(/\uFEFF/g,"")},xo=Tn,So=Bn,Oo=function(t){return So(t)&&(t=t.parentNode),xo(t)&&t.hasAttribute("data-mce-caret")},Eo=function(t){return So(t)&&ko(t.data)},Do=function(t){return Oo(t)||Eo(t)},Lo=function(t){return t.firstChild!==t.lastChild||!zn(t.firstChild)},Ao=function(t){var e=t.container();return!!Bn(e)&&(e.data.charAt(t.offset())===wo||t.isAtStart()&&Eo(e.previousSibling))},To=function(t){var e=t.container();return!!Bn(e)&&(e.data.charAt(t.offset()-1)===wo||t.isAtEnd()&&Eo(e.nextSibling))},No=function(t,e,n){var r,o=e.ownerDocument.createElement(t);o.setAttribute("data-mce-caret",n?"before":"after"),o.setAttribute("data-mce-bogus","all"),o.appendChild(((r=document.createElement("br")).setAttribute("data-mce-bogus","1"),r));var i=e.parentNode;return n?i.insertBefore(o,e):e.nextSibling?i.insertBefore(o,e.nextSibling):i.appendChild(o),o},$o=function(t){return So(t)&&t.data[0]===wo},Io=function(t){return So(t)&&t.data[t.data.length-1]===wo},Po=function(t){return t&&t.hasAttribute("data-mce-caret")?(e=t.getElementsByTagName("br"),n=e[e.length-1],Pn(n)&&n.parentNode.removeChild(n),t.removeAttribute("data-mce-caret"),t.removeAttribute("data-mce-bogus"),t.removeAttribute("style"),t.removeAttribute("_moz_abspos"),t):null;var e,n},jo=function(t){return Oo(t.startContainer)},Mo=Vn,Ro=Wn,Bo=zn,qo=Bn,Fo=Nn(["script","style","textarea"]),Uo=Nn(["img","input","textarea","hr","iframe","video","audio","object","embed"]),zo=Nn(["table"]),Ho=Do,Vo=function(t){return!Ho(t)&&(qo(t)?!Fo(t.parentNode):Uo(t)||Bo(t)||zo(t)||Wo(t))},Wo=function(t){return!1===function(t){return Tn(t)&&"true"===t.getAttribute("unselectable")}(t)&&Ro(t)},Ko=function(t,e){return Vo(t)&&function(t,e){for(t=t.parentNode;t&&t!==e;t=t.parentNode){if(Wo(t))return!1;if(Mo(t))return!0}return!0}(t,e)},Yo=/^[ \t\r\n]*$/,Zo=function(t){return Yo.test(t)},Go=function(t,e){var n,r,o,i=Ae.fromDom(e),a=Ae.fromDom(t);return n=a,r="pre,code",o=D(Ie,i),Xr(n,r,o).isSome()},Xo=function(t,e){return Vo(t)&&!1===function(t,e){return Bn(t)&&Zo(t.data)&&!1===Go(t,e)}(t,e)||function(t){return Tn(t)&&"A"===t.nodeName&&!t.hasAttribute("href")&&(t.hasAttribute("name")||t.hasAttribute("id"))}(t)||Qo(t)},Qo=In("data-mce-bookmark"),Jo=In("data-mce-bogus"),ti=(Lr="data-mce-bogus",Ar="all",function(t){return Tn(t)&&t.getAttribute(Lr)===Ar}),ei=function(t,e){return void 0===e&&(e=!0),function(t,e){var n=0;if(Xo(t,t))return!1;var r=t.firstChild;if(!r)return!0;var o=new so(r,t);do{if(e){if(ti(r)){r=o.next(!0);continue}if(Jo(r)){r=o.next();continue}}if(zn(r))n++,r=o.next();else{if(Xo(r,t))return!1;r=o.next()}}while(r);return n<=1}(t.dom,e)},ni=function(t,e){return b(t)&&(Xo(t,e)||fo(Ae.fromDom(t)))},ri=function(t){return function(t){return"span"===t.nodeName.toLowerCase()}(t)&&"bookmark"===t.getAttribute("data-mce-type")},oi=function(t,e){return Bn(t)&&t.data.length>0&&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(Tn(e)&&ri(e))return e;for(var o=e.childNodes,i=o.length-1;i>=0;i--)ii(t,o[i],r);if(Tn(e)){var a=e.childNodes;1===a.length&&ri(a[0])&&e.parentNode.insertBefore(a[0],e)}return function(t){return Un(t)||Fn(t)}(e)||Xo(e,r)||function(t){return!!Tn(t)&&t.childNodes.length>0}(e)||oi(e,r)||t.remove(e),e},ai=De.makeMap,si=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,li=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,ui=/[<>&\"\']/g,ci=/&#([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={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},hi={"<":"<",">":">","&":"&",""":'"',"'":"'"},pi=function(t,e){var n,r,o,i={};if(t){for(t=t.split(","),e=e||10,n=0;n<t.length;n+=2)r=String.fromCharCode(parseInt(t[n],e)),fi[r]||(o="&"+t[n+1]+";",i[r]=o,i[o]=r);return i}},mi=pi("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32),gi=function(t,e){return t.replace(e?si:li,(function(t){return fi[t]||t}))},vi=function(t,e){return t.replace(e?si:li,(function(t){return t.length>1?"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";":fi[t]||"&#"+t.charCodeAt(0)+";"}))},yi=function(t,e,n){return n=n||mi,t.replace(e?si:li,(function(t){return fi[t]||n[t]||t}))},bi={encodeRaw:gi,encodeAllRaw:function(t){return(""+t).replace(ui,(function(t){return fi[t]||t}))},encodeNumeric:vi,encodeNamed:yi,getEncodeFunc:function(t,e){var n=pi(e)||mi,r=ai(t.replace(/\+/g,","));return r.named&&r.numeric?function(t,e){return t.replace(e?si:li,(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 yi(t,e,n)}:yi:r.numeric?vi:gi},decode:function(t){return t.replace(ci,(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):hi[t]||mi[t]||function(t){var e=Ae.fromTag("div").dom;return e.innerHTML=t,e.textContent||e.innerText||t}(t)}))}},_i={},wi={},ki=De.makeMap,Ci=De.each,xi=De.extend,Si=De.explode,Oi=De.inArray,Ei=function(t,e){return(t=De.trim(t))?t.split(e||" "):[]},Di=function(t,e){var n=ki(t," ",ki(t.toUpperCase()," "));return xi(n,e)},Li=function(t){return Di("td th li dt dd figcaption caption details summary",t.getTextBlockElements())},Ai=function(t,e){var n;return t&&(n={},"string"==typeof t&&(t={"*":t}),Ci(t,(function(t,r){n[r]=n[r.toUpperCase()]="map"===e?ki(t,/[, ]/):Si(t,/[, ]/)}))),n},Ti=function(t){var e={},n={},r=[],o={},i={},a=function(e,n,r){var o=t[e];return o?o=ki(o,/[, ]/,ki(o.toUpperCase(),/[, ]/)):(o=_i[e])||(o=Di(n,r),_i[e]=o),o},s=function(t){var e,n,r,o,i,a,s={},l=function(t,n,r){var o,i,a,l=function(t,e){var n,r,o={};for(n=0,r=t.length;n<r;n++)o[t[n]]=e||{};return o};n=n||"","string"==typeof(r=r||[])&&(r=Ei(r));var u=Ei(t);for(o=u.length;o--;)a={attributes:l(i=Ei([e,n].join(" "))),attributesOrder:i,children:l(r,wi)},s[u[o]]=a},u=function(t,e){var n,r,o,i,a=Ei(t);n=a.length;for(var l=Ei(e);n--;)for(r=s[a[n]],o=0,i=l.length;o<i;o++)r.attributes[l[o]]={},r.attributesOrder.push(l[o])};return _i[t]?_i[t]:(e="id accesskey class dir lang style tabindex title role",n="address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul",r="a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment","html4"!==t&&(e+=" contenteditable contextmenu draggable dropzone hidden spellcheck translate",n+=" article aside details dialog figure main header footer hgroup section nav",r+=" audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen"),"html5-strict"!==t&&(e+=" xml:lang",r=[r,a="acronym applet basefont big font strike tt"].join(" "),Ci(Ei(a),(function(t){l(t,"",r)})),n=[n,i="center dir isindex noframes"].join(" "),o=[n,r].join(" "),Ci(Ei(i),(function(t){l(t,"",o)}))),o=o||[n,r].join(" "),l("html","manifest","head body"),l("head","","base command link meta noscript script style title"),l("title hr noscript br"),l("base","href target"),l("link","href rel media hreflang type sizes hreflang"),l("meta","name http-equiv content charset"),l("style","media type scoped"),l("script","src async defer type charset"),l("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",o),l("address dt dd div caption","",o),l("h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn","",r),l("blockquote","cite",o),l("ol","reversed start type","li"),l("ul","","li"),l("li","value",o),l("dl","","dt dd"),l("a","href target rel media hreflang type",r),l("q","cite",r),l("ins del","cite datetime",o),l("img","src sizes srcset alt usemap ismap width height"),l("iframe","src name width height",o),l("embed","src type width height"),l("object","data type typemustmatch name usemap form width height",[o,"param"].join(" ")),l("param","name value"),l("map","name",[o,"area"].join(" ")),l("area","alt coords shape href target rel media hreflang type"),l("table","border","caption colgroup thead tfoot tbody tr"+("html4"===t?" col":"")),l("colgroup","span","col"),l("col","span"),l("tbody thead tfoot","","tr"),l("tr","","td th"),l("td","colspan rowspan headers",o),l("th","colspan rowspan headers scope abbr",o),l("form","accept-charset action autocomplete enctype method name novalidate target",o),l("fieldset","disabled form name",[o,"legend"].join(" ")),l("label","form for",r),l("input","accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width"),l("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"===t?o:r),l("select","disabled form multiple name required size","option optgroup"),l("optgroup","disabled label","option"),l("option","disabled label selected value"),l("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),l("menu","type label",[o,"li"].join(" ")),l("noscript","",o),"html4"!==t&&(l("wbr"),l("ruby","",[r,"rt rp"].join(" ")),l("figcaption","",o),l("mark rt rp summary bdi","",r),l("canvas","width height",o),l("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",[o,"track source"].join(" ")),l("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[o,"track source"].join(" ")),l("picture","","img source"),l("source","src srcset type media sizes"),l("track","kind src srclang label default"),l("datalist","",[r,"option"].join(" ")),l("article section nav aside main header footer","",o),l("hgroup","","h1 h2 h3 h4 h5 h6"),l("figure","",[o,"figcaption"].join(" ")),l("time","datetime",r),l("dialog","open",o),l("command","type label icon disabled checked radiogroup command"),l("output","for form name",r),l("progress","value max",r),l("meter","value min max low high optimum",r),l("details","open",[o,"summary"].join(" ")),l("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!==t&&(u("script","language xml:space"),u("style","xml:space"),u("object","declare classid code codebase codetype archive standby align border hspace vspace"),u("embed","align name hspace vspace"),u("param","valuetype type"),u("a","charset name rev shape coords"),u("br","clear"),u("applet","codebase archive code object alt name width height align hspace vspace"),u("img","name longdesc align border hspace vspace"),u("iframe","longdesc frameborder marginwidth marginheight scrolling align"),u("font basefont","size color face"),u("input","usemap align"),u("select"),u("textarea"),u("h1 h2 h3 h4 h5 h6 div p legend caption","align"),u("ul","type compact"),u("li","type"),u("ol dl menu dir","compact"),u("pre","width xml:space"),u("hr","align noshade size width"),u("isindex","prompt"),u("table","summary width frame rules cellspacing cellpadding align bgcolor"),u("col","width align char charoff valign"),u("colgroup","width align char charoff valign"),u("thead","align char charoff valign"),u("tr","align char charoff valign bgcolor"),u("th","axis align char charoff valign nowrap bgcolor width height"),u("form","accept"),u("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),u("tfoot","align char charoff valign"),u("tbody","align char charoff valign"),u("area","nohref"),u("body","background bgcolor text link vlink alink")),"html4"!==t&&(u("input button select textarea","autofocus"),u("input textarea","placeholder"),u("a","download"),u("link script img","crossorigin"),u("img","loading"),u("iframe","sandbox seamless allowfullscreen loading")),Ci(Ei("a form meter progress dfn"),(function(t){s[t]&&delete s[t].children[t]})),delete s.caption.children.table,delete s.script,_i[t]=s,s)}((t=t||{}).schema);!1===t.verify_html&&(t.valid_elements="*[*]");var l=Ai(t.valid_styles),u=Ai(t.invalid_styles,"map"),c=Ai(t.valid_classes,"map"),d=a("whitespace_elements","pre script noscript style textarea video audio iframe object code"),f=a("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),h=a("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),p=a("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),m="td th iframe video audio object script code",g=a("non_empty_elements",m+" pre",h),v=a("move_caret_before_on_enter_elements",m+" table",h),y=a("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside main nav figure"),b=a("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup figcaption details summary",y),_=a("text_inline_elements","span strong b em i font s strike u var cite dfn code mark q sup sub samp");Ci((t.special||"script noscript iframe noframes noembed title style textarea xmp").split(" "),(function(t){i[t]=new RegExp("</"+t+"[^>]*>","gi")}));var w=function(t){return new RegExp("^"+t.replace(/([?+*])/g,".$1")+"$")},k=function(t){var n,o,i,a,s,l,u,c,d,f,h,p,m,g,v,y,b,_,k=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)])?$/,C=/^([!\-])?(\w+[\\:]:\w+|[^=:<]+)?(?:([=:<])(.*))?$/,x=/[*?+]/;if(t){var S=Ei(t,",");for(e["@"]&&(y=e["@"].attributes,b=e["@"].attributesOrder),n=0,o=S.length;n<o;n++)if(s=k.exec(S[n])){if(g=s[1],d=s[2],v=s[3],c=s[5],l={attributes:p={},attributesOrder:m=[]},"#"===g&&(l.paddEmpty=!0),"-"===g&&(l.removeEmpty=!0),"!"===s[4]&&(l.removeEmptyAttrs=!0),y&&(ft(y,(function(t,e){p[e]=t})),m.push.apply(m,b)),c)for(i=0,a=(c=Ei(c,"|")).length;i<a;i++)if(s=C.exec(c[i])){if(u={},h=s[1],f=s[2].replace(/[\\:]:/g,":"),g=s[3],_=s[4],"!"===h&&(l.attributesRequired=l.attributesRequired||[],l.attributesRequired.push(f),u.required=!0),"-"===h){delete p[f],m.splice(Oi(m,f),1);continue}g&&("="===g&&(l.attributesDefault=l.attributesDefault||[],l.attributesDefault.push({name:f,value:_}),u.defaultValue=_),":"===g&&(l.attributesForced=l.attributesForced||[],l.attributesForced.push({name:f,value:_}),u.forcedValue=_),"<"===g&&(u.validValues=ki(_,"?"))),x.test(f)?(l.attributePatterns=l.attributePatterns||[],u.pattern=w(f),l.attributePatterns.push(u)):(p[f]||m.push(f),p[f]=u)}y||"@"!==d||(y=p,b=m),v&&(l.outputName=d,e[v]=l),x.test(d)?(l.pattern=w(d),r.push(l)):e[d]=l}}},C=function(t){e={},r=[],k(t),Ci(s,(function(t,e){n[e]=t.children}))},x=function(t){var r=/^(~)?(.+)$/;t&&(_i.text_block_elements=_i.block_elements=null,Ci(Ei(t,","),(function(t){var i=r.exec(t),a="~"===i[1],s=a?"span":"div",l=i[2];if(n[l]=n[s],o[l]=s,a||(b[l.toUpperCase()]={},b[l]={}),!e[l]){var u=e[s];delete(u=xi({},u)).removeEmptyAttrs,delete u.removeEmpty,e[l]=u}Ci(n,(function(t,e){t[s]&&(n[e]=t=xi({},n[e]),t[l]=t[s])}))})))},O=function(e){var r=/^([+\-]?)([A-Za-z0-9_\-.\u00b7\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u037d\u037f-\u1fff\u200c-\u200d\u203f-\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]+)\[([^\]]+)]$/;_i[t.schema]=null,e&&Ci(Ei(e,","),(function(t){var e,o,i=r.exec(t);i&&(o=i[1],e=o?n[i[2]]:n[i[2]]={"#comment":{}},e=n[i[2]],Ci(Ei(i[3],"|"),(function(t){"-"===o?delete e[t]:e[t]={}})))}))},E=function(t){var n,o=e[t];if(o)return o;for(n=r.length;n--;)if((o=r[n]).pattern.test(t))return o};t.valid_elements?C(t.valid_elements):(Ci(s,(function(t,r){e[r]={attributes:t.attributes,attributesOrder:t.attributesOrder},n[r]=t.children})),"html5"!==t.schema&&Ci(Ei("strong/b em/i"),(function(t){var n=Ei(t,"/");e[n[1]].outputName=n[0]})),Ci(_,(function(n,r){e[r]&&(t.padd_empty_block_inline_children&&(e[r].paddInEmptyBlock=!0),e[r].removeEmpty=!0)})),Ci(Ei("ol ul blockquote a table tbody"),(function(t){e[t]&&(e[t].removeEmpty=!0)})),Ci(Ei("p h1 h2 h3 h4 h5 h6 th td pre div address caption li"),(function(t){e[t].paddEmpty=!0})),Ci(Ei("span"),(function(t){e[t].removeEmptyAttrs=!0}))),x(t.custom_elements),O(t.valid_children),k(t.extended_valid_elements),O("+ol[ul|ol],+ul[ul|ol]"),Ci({dd:"dl",dt:"dl",li:"ul ol",td:"tr",th:"tr",tr:"tbody thead tfoot",tbody:"table",thead:"table",tfoot:"table",legend:"fieldset",area:"map",param:"video audio object"},(function(t,n){e[n]&&(e[n].parentsRequired=Ei(t))})),t.invalid_elements&&Ci(Si(t.invalid_elements),(function(t){e[t]&&delete e[t]})),E("span")||k("span[!data-mce-type|*]");var D=S(l),L=S(u),A=S(c),T=S(p),N=S(b),$=S(y),I=S(_),P=S(h),j=S(f),M=S(g),R=S(v),B=S(d),q=S(i),F=S(o);return{children:n,elements:e,getValidStyles:D,getValidClasses:A,getBlockElements:N,getInvalidStyles:L,getShortEndedElements:P,getTextBlockElements:$,getTextInlineElements:I,getBoolAttrs:T,getElementRule:E,getSelfClosingElements:j,getNonEmptyElements:M,getMoveCaretBeforeOnEnterElements:R,getWhiteSpaceElements:B,getSpecialElements:q,isValidChild:function(t,e){var r=n[t.toLowerCase()];return!(!r||!r[e.toLowerCase()])},isValid:function(t,e){var n,r,o=E(t);if(o){if(!e)return!0;if(o.attributes[e])return!0;if(n=o.attributePatterns)for(r=n.length;r--;)if(n[r].pattern.test(t))return!0}return!1},getCustomElements:F,addValidElements:k,setValidElements:C,addCustomElements:x,addValidChildren:O}},Ni=function(t,e,n,r){var o=function(t){return(t=parseInt(t,10).toString(16)).length>1?t:"0"+t};return"#"+o(e)+o(n)+o(r)},$i=function(t,e){var n,r,o,i=this,a=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,s=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,l=/\s*([^:]+):\s*([^;]+);?/g,u=/\s+$/,c={},d="\ufeff";t=t||{},e&&(r=e.getValidStyles(),o=e.getInvalidStyles());var f="\\\" \\' \\; \\: ; : \ufeff".split(" ");for(n=0;n<f.length;n++)c[f[n]]=d+n,c[d+n]=f[n];return{toHex:function(t){return t.replace(a,Ni)},parse:function(e){var r,o,f,h,p,m,g,v,y={},b=t.url_converter,_=t.url_converter_scope||i,w=function(t,e,r){var o=y[t+"-top"+e];if(o){var i=y[t+"-right"+e];if(i){var a=y[t+"-bottom"+e];if(a){var s=y[t+"-left"+e];if(s){var l=[o,i,a,s];for(n=l.length-1;n--&&l[n]===l[n+1];);n>-1&&r||(y[t+e]=-1===n?l[0]:l.join(" "),delete y[t+"-top"+e],delete y[t+"-right"+e],delete y[t+"-bottom"+e],delete y[t+"-left"+e])}}}}},k=function(t){var e,n=y[t];if(n){for(e=(n=n.split(" ")).length;e--;)if(n[e]!==n[0])return!1;return y[t]=n[0],!0}},C=function(t){return h=!0,c[t]},x=function(t,e){return h&&(t=t.replace(/\uFEFF[0-9]/g,(function(t){return c[t]}))),e||(t=t.replace(/\\([\'\";:])/g,"$1")),t},S=function(t){return String.fromCharCode(parseInt(t.slice(1),16))},O=function(t){return t.replace(/\\[0-9a-f]+/gi,S)},E=function(e,n,r,o,i,a){if(i=i||a)return"'"+(i=x(i)).replace(/\'/g,"\\'")+"'";if(n=x(n||r||o),!t.allow_script_urls){var s=n.replace(/[\s\r\n]+/g,"");if(/(java|vb)script:/i.test(s))return"";if(!t.allow_svg_data_urls&&/^data:image\/svg/i.test(s))return""}return b&&(n=b.call(_,n,"style")),"url('"+n.replace(/\'/g,"\\'")+"')"};if(e){for(e=(e=e.replace(/[\u0000-\u001F]/g,"")).replace(/\\[\"\';:\uFEFF]/g,C).replace(/\"[^\"]+\"|\'[^\']+\'/g,(function(t){return t.replace(/[;:]/g,C)}));r=l.exec(e);)if(l.lastIndex=r.index+r[0].length,o=r[1].replace(u,"").toLowerCase(),f=r[2].replace(u,""),o&&f){if(o=O(o),f=O(f),-1!==o.indexOf(d)||-1!==o.indexOf('"'))continue;if(!t.allow_script_urls&&("behavior"===o||/expression\s*\(|\/\*|\*\//.test(f)))continue;"font-weight"===o&&"700"===f?f="bold":"color"!==o&&"background-color"!==o||(f=f.toLowerCase()),f=(f=f.replace(a,Ni)).replace(s,E),y[o]=h?x(f,!0):f}w("border","",!0),w("border","-width"),w("border","-color"),w("border","-style"),w("padding",""),w("margin",""),p="border",g="border-style",v="border-color",k(m="border-width")&&k(g)&&k(v)&&(y[p]=y[m]+" "+y[g]+" "+y[v],delete y[m],delete y[g],delete y[v]),"medium none"===y.border&&delete y.border,"none"===y["border-image"]&&delete y["border-image"]}return y},serialize:function(t,e){var n="",i=function(e){var o,i=r[e];if(i)for(var a=0,s=i.length;a<s;a++)e=i[a],(o=t[e])&&(n+=(n.length>0?" ":"")+e+": "+o+";")};return e&&r?(i("*"),i(e)):ft(t,(function(t,r){!t||o&&!function(t,e){var n=o["*"];return!(n&&n[t]||(n=o[e])&&n[t])}(r,e)||(n+=(n.length>0?" ":"")+r+": "+t+";")})),n}}},Ii={keyLocation:!0,layerX:!0,layerY:!0,returnValue:!0,webkitMovementX:!0,webkitMovementY:!0,keyIdentifier:!0,mozPressure:!0},Pi=function(t){return t instanceof Event||_(t.initEvent)},ji=function(t,e,n,r){var o,i=function(t,e){var n=null!=e?e:{};for(var r in t)_t(Ii,r)||(n[r]=t[r]);return b(n.composedPath)&&(n.composedPath=function(){return t.composedPath()}),n}(e,r);return i.type=t,y(i.target)&&(i.target=null!==(o=i.srcElement)&&void 0!==o?o:n),function(t){return y(t.preventDefault)||Pi(t)}(e)&&(i.preventDefault=function(){i.defaultPrevented=!0,i.isDefaultPrevented=$,_(e.preventDefault)?e.preventDefault():Pi(e)&&(e.returnValue=!1)},i.stopPropagation=function(){i.cancelBubble=!0,i.isPropagationStopped=$,_(e.stopPropagation)?e.stopPropagation():Pi(e)&&(e.cancelBubble=!0)},i.stopImmediatePropagation=function(){i.isImmediatePropagationStopped=$,i.stopPropagation()},function(t){return t.isDefaultPrevented===$||t.isDefaultPrevented===N}(i)||(i.isDefaultPrevented=!0===i.defaultPrevented?$:N,i.isPropagationStopped=!0===i.cancelBubble?$:N,i.isImmediatePropagationStopped=N)),i},Mi=/^(?:mouse|contextmenu)|click/,Ri=function(t,e,n,r){t.addEventListener?t.addEventListener(e,n,r||!1):t.attachEvent&&t.attachEvent("on"+e,n)},Bi=function(t,e,n,r){t.removeEventListener?t.removeEventListener(e,n,r||!1):t.detachEvent&&t.detachEvent("on"+e,n)},qi=function(t,e){var n=ji(t.type,t,document,e);if(function(t){return b(t)&&Mi.test(t.type)}(t)&&v(t.pageX)&&!v(t.clientX)){var r=n.target.ownerDocument||document,o=r.documentElement,i=r.body,a=n;a.pageX=t.clientX+(o&&o.scrollLeft||i&&i.scrollLeft||0)-(o&&o.clientLeft||i&&i.clientLeft||0),a.pageY=t.clientY+(o&&o.scrollTop||i&&i.scrollTop||0)-(o&&o.clientTop||i&&i.clientTop||0)}return v(n.metaKey)&&(n.metaKey=!1),n},Fi=function(t,e,n){var r=t.document,o={type:"ready"};if(n.domLoaded)e(o);else{var i=function(){Bi(t,"DOMContentLoaded",i),Bi(t,"load",i),n.domLoaded||(n.domLoaded=!0,e(o)),t=null};"complete"===r.readyState||"interactive"===r.readyState&&r.body?i():Ri(t,"DOMContentLoaded",i),n.domLoaded||Ri(t,"load",i)}},Ui=function(){function t(){this.domLoaded=!1,this.events={},this.count=1,this.expando="mce-data-"+(+new Date).toString(32),this.hasMouseEnterLeave="onmouseenter"in document.documentElement,this.hasFocusIn="onfocusin"in document.documentElement,this.count=1}return t.prototype.bind=function(t,e,n,r){var o,i,a,s,l,u,c,d=this,f=window,h=function(t){d.executeHandlers(qi(t||f.event),o)};if(t&&3!==t.nodeType&&8!==t.nodeType){t[d.expando]?o=t[d.expando]:(o=d.count++,t[d.expando]=o,d.events[o]={}),r=r||t;var p=e.split(" ");for(a=p.length;a--;)u=h,l=c=!1,"DOMContentLoaded"===(s=p[a])&&(s="ready"),d.domLoaded&&"ready"===s&&"complete"===t.readyState?n.call(r,qi({type:s})):(d.hasMouseEnterLeave||(l=d.mouseEnterLeave[s])&&(u=function(t){var e=t.currentTarget,n=t.relatedTarget;if(n&&e.contains)n=e.contains(n);else for(;n&&n!==e;)n=n.parentNode;n||((t=qi(t||f.event)).type="mouseout"===t.type?"mouseleave":"mouseenter",t.target=e,d.executeHandlers(t,o))}),d.hasFocusIn||"focusin"!==s&&"focusout"!==s||(c=!0,l="focusin"===s?"focus":"blur",u=function(t){(t=qi(t||f.event)).type="focus"===t.type?"focusin":"focusout",d.executeHandlers(t,o)}),(i=d.events[o][s])?"ready"===s&&d.domLoaded?n(qi({type:s})):i.push({func:n,scope:r}):(d.events[o][s]=i=[{func:n,scope:r}],i.fakeName=l,i.capture=c,i.nativeHandler=u,"ready"===s?Fi(t,u,d):Ri(t,l||s,u,c)));return t=i=null,n}},t.prototype.unbind=function(t,e,n){var r,o,i,a,s;if(!t||3===t.nodeType||8===t.nodeType)return this;var l=t[this.expando];if(l){if(s=this.events[l],e){var u=e.split(" ");for(o=u.length;o--;)if(r=s[a=u[o]]){if(n)for(i=r.length;i--;)if(r[i].func===n){var c=r.nativeHandler,d=r.fakeName,f=r.capture;(r=r.slice(0,i).concat(r.slice(i+1))).nativeHandler=c,r.fakeName=d,r.capture=f,s[a]=r}n&&0!==r.length||(delete s[a],Bi(t,r.fakeName||a,r.nativeHandler,r.capture))}}else ft(s,(function(e,n){Bi(t,e.fakeName||n,e.nativeHandler,e.capture)})),s={};for(a in s)if(_t(s,a))return this;delete this.events[l];try{delete t[this.expando]}catch(e){t[this.expando]=null}}return this},t.prototype.fire=function(t,e,n){var r;if(!t||3===t.nodeType||8===t.nodeType)return this;var o=qi({type:e,target:t},n);do{(r=t[this.expando])&&this.executeHandlers(o,r),t=t.parentNode||t.ownerDocument||t.defaultView||t.parentWindow}while(t&&!o.isPropagationStopped());return this},t.prototype.clean=function(t){var e,n;if(!t||3===t.nodeType||8===t.nodeType)return this;if(t[this.expando]&&this.unbind(t),t.getElementsByTagName||(t=t.document),t&&t.getElementsByTagName)for(this.unbind(t),e=(n=t.getElementsByTagName("*")).length;e--;)(t=n[e])[this.expando]&&this.unbind(t);return this},t.prototype.destroy=function(){this.events={}},t.prototype.cancel=function(t){return t&&(t.preventDefault(),t.stopImmediatePropagation()),!1},t.prototype.executeHandlers=function(t,e){var n=this.events[e],r=n&&n[t.type];if(r)for(var o=0,i=r.length;o<i;o++){var a=r[o];if(a&&!1===a.func.call(a.scope,t)&&t.preventDefault(),t.isImmediatePropagationStopped())return}},t.Event=new t,t}(),zi="sizzle"+-new Date,Hi=window.document,Vi=0,Wi=0,Ki=Oa(),Yi=Oa(),Zi=Oa(),Gi=function(t,e){return t===e&&(qr=!0),0},Xi="undefined",Qi=1<<31,Ji={}.hasOwnProperty,ta=[],ea=ta.pop,na=ta.push,ra=ta.push,oa=ta.slice,ia=ta.indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(this[e]===t)return e;return-1},aa="[\\x20\\t\\r\\n\\f]",sa="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",la="\\[[\\x20\\t\\r\\n\\f]*("+sa+")(?:"+aa+"*([*^$|!~]?=)"+aa+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+sa+"))|)"+aa+"*\\]",ua=":("+sa+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+la+")*)|.*)\\)|)",ca=new RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g"),da=new RegExp("^[\\x20\\t\\r\\n\\f]*,[\\x20\\t\\r\\n\\f]*"),fa=new RegExp("^[\\x20\\t\\r\\n\\f]*([>+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*"),ha=new RegExp("=[\\x20\\t\\r\\n\\f]*([^\\]'\"]*?)[\\x20\\t\\r\\n\\f]*\\]","g"),pa=new RegExp(ua),ma=new RegExp("^"+sa+"$"),ga={ID:new RegExp("^#("+sa+")"),CLASS:new RegExp("^\\.("+sa+")"),TAG:new RegExp("^("+sa+"|[*])"),ATTR:new RegExp("^"+la),PSEUDO:new RegExp("^"+ua),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)","i"),bool:new RegExp("^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$","i"),needsContext:new RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)","i")},va=/^(?:input|select|textarea|button)$/i,ya=/^h\d$/i,ba=/^[^{]+\{\s*\[native \w/,_a=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,wa=/[+~]/,ka=/'|\\/g,Ca=new RegExp("\\\\([\\da-f]{1,6}[\\x20\\t\\r\\n\\f]?|([\\x20\\t\\r\\n\\f])|.)","ig"),xa=function(t,e,n){var r="0x"+e-65536;return r!=r||n?e:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{ra.apply(ta=oa.call(Hi.childNodes),Hi.childNodes),ta[Hi.childNodes.length].nodeType}catch(t){ra={apply:ta.length?function(t,e){na.apply(t,oa.call(e))}:function(t,e){for(var n=t.length,r=0;t[n++]=e[r++];);t.length=n-1}}}var Sa=function(t,e,n,r){var o,i,a,s,l,u,c,d,f,h;if((e?e.ownerDocument||e:Hi)!==Ur&&Fr(e),n=n||[],!t||"string"!=typeof t)return n;if(1!==(s=(e=e||Ur).nodeType)&&9!==s)return[];if(Hr&&!r){if(o=_a.exec(t))if(a=o[1]){if(9===s){if(!(i=e.getElementById(a))||!i.parentNode)return n;if(i.id===a)return n.push(i),n}else if(e.ownerDocument&&(i=e.ownerDocument.getElementById(a))&&Kr(e,i)&&i.id===a)return n.push(i),n}else{if(o[2])return ra.apply(n,e.getElementsByTagName(t)),n;if((a=o[3])&&Tr.getElementsByClassName)return ra.apply(n,e.getElementsByClassName(a)),n}if(Tr.qsa&&(!Vr||!Vr.test(t))){if(d=c=zi,f=e,h=9===s&&t,1===s&&"object"!==e.nodeName.toLowerCase()){for(u=Pr(t),(c=e.getAttribute("id"))?d=c.replace(ka,"\\$&"):e.setAttribute("id",d),d="[id='"+d+"'] ",l=u.length;l--;)u[l]=d+Na(u[l]);f=wa.test(t)&&Aa(e.parentNode)||e,h=u.join(",")}if(h)try{return ra.apply(n,f.querySelectorAll(h)),n}catch(t){}finally{c||e.removeAttribute("id")}}}return Mr(t.replace(ca,"$1"),e,n,r)};function Oa(){var t=[];return function e(n,r){return t.push(n+" ")>Nr.cacheLength&&delete e[t.shift()],e[n+" "]=r}}function Ea(t){return t[zi]=!0,t}function Da(t,e){var n=e&&t,r=n&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||Qi)-(~t.sourceIndex||Qi);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function La(t){return Ea((function(e){return e=+e,Ea((function(n,r){for(var o,i=t([],n.length,e),a=i.length;a--;)n[o=i[a]]&&(n[o]=!(r[o]=n[o]))}))}))}function Aa(t){return t&&typeof t.getElementsByTagName!==Xi&&t}function Ta(){}function Na(t){for(var e=0,n=t.length,r="";e<n;e++)r+=t[e].value;return r}function $a(t,e,n){var r=e.dir,o=n&&"parentNode"===r,i=Wi++;return e.first?function(e,n,i){for(;e=e[r];)if(1===e.nodeType||o)return t(e,n,i)}:function(e,n,a){var s,l,u=[Vi,i];if(a){for(;e=e[r];)if((1===e.nodeType||o)&&t(e,n,a))return!0}else for(;e=e[r];)if(1===e.nodeType||o){if((s=(l=e[zi]||(e[zi]={}))[r])&&s[0]===Vi&&s[1]===i)return u[2]=s[2];if(l[r]=u,u[2]=t(e,n,a))return!0}}}function Ia(t){return t.length>1?function(e,n,r){for(var o=t.length;o--;)if(!t[o](e,n,r))return!1;return!0}:t[0]}function Pa(t,e,n,r,o){for(var i,a=[],s=0,l=t.length,u=null!=e;s<l;s++)(i=t[s])&&(n&&!n(i,r,o)||(a.push(i),u&&e.push(s)));return a}function ja(t,e,n,r,o,i){return r&&!r[zi]&&(r=ja(r)),o&&!o[zi]&&(o=ja(o,i)),Ea((function(i,a,s,l){var u,c,d,f=[],h=[],p=a.length,m=i||function(t,e,n){for(var r=0,o=e.length;r<o;r++)Sa(t,e[r],n);return n}(e||"*",s.nodeType?[s]:s,[]),g=!t||!i&&e?m:Pa(m,f,t,s,l),v=n?o||(i?t:p||r)?[]:a:g;if(n&&n(g,v,s,l),r)for(u=Pa(v,h),r(u,[],s,l),c=u.length;c--;)(d=u[c])&&(v[h[c]]=!(g[h[c]]=d));if(i){if(o||t){if(o){for(u=[],c=v.length;c--;)(d=v[c])&&u.push(g[c]=d);o(null,v=[],u,l)}for(c=v.length;c--;)(d=v[c])&&(u=o?ia.call(i,d):f[c])>-1&&(i[u]=!(a[u]=d))}}else v=Pa(v===a?v.splice(p,v.length):v),o?o(null,a,v,l):ra.apply(a,v)}))}function Ma(t){for(var e,n,r,o=t.length,i=Nr.relative[t[0].type],a=i||Nr.relative[" "],s=i?1:0,l=$a((function(t){return t===e}),a,!0),u=$a((function(t){return ia.call(e,t)>-1}),a,!0),c=[function(t,n,r){var o=!i&&(r||n!==Rr)||((e=n).nodeType?l(t,n,r):u(t,n,r));return e=null,o}];s<o;s++)if(n=Nr.relative[t[s].type])c=[$a(Ia(c),n)];else{if((n=Nr.filter[t[s].type].apply(null,t[s].matches))[zi]){for(r=++s;r<o&&!Nr.relative[t[r].type];r++);return ja(s>1&&Ia(c),s>1&&Na(t.slice(0,s-1).concat({value:" "===t[s-2].type?"*":""})).replace(ca,"$1"),n,s<r&&Ma(t.slice(s,r)),r<o&&Ma(t=t.slice(r)),r<o&&Na(t))}c.push(n)}return Ia(c)}Tr=Sa.support={},Ir=Sa.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},Fr=Sa.setDocument=function(t){var e,n=t?t.ownerDocument||t:Hi,r=n.defaultView;return n!==Ur&&9===n.nodeType&&n.documentElement?(Ur=n,zr=n.documentElement,Hr=!Ir(n),r&&r!==function(t){try{return t.top}catch(t){}return null}(r)&&(r.addEventListener?r.addEventListener("unload",(function(){Fr()}),!1):r.attachEvent&&r.attachEvent("onunload",(function(){Fr()}))),Tr.attributes=!0,Tr.getElementsByTagName=!0,Tr.getElementsByClassName=ba.test(n.getElementsByClassName),Tr.getById=!0,Nr.find.ID=function(t,e){if(typeof e.getElementById!==Xi&&Hr){var n=e.getElementById(t);return n&&n.parentNode?[n]:[]}},Nr.filter.ID=function(t){var e=t.replace(Ca,xa);return function(t){return t.getAttribute("id")===e}},Nr.find.TAG=Tr.getElementsByTagName?function(t,e){if(typeof e.getElementsByTagName!==Xi)return e.getElementsByTagName(t)}:function(t,e){var n,r=[],o=0,i=e.getElementsByTagName(t);if("*"===t){for(;n=i[o++];)1===n.nodeType&&r.push(n);return r}return i},Nr.find.CLASS=Tr.getElementsByClassName&&function(t,e){if(Hr)return e.getElementsByClassName(t)},Wr=[],Vr=[],Tr.disconnectedMatch=!0,Vr=Vr.length&&new RegExp(Vr.join("|")),Wr=Wr.length&&new RegExp(Wr.join("|")),e=ba.test(zr.compareDocumentPosition),Kr=e||ba.test(zr.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,r=e&&e.parentNode;return t===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):t.compareDocumentPosition&&16&t.compareDocumentPosition(r)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},Gi=e?function(t,e){if(t===e)return qr=!0,0;var r=!t.compareDocumentPosition-!e.compareDocumentPosition;return r||(1&(r=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!Tr.sortDetached&&e.compareDocumentPosition(t)===r?t===n||t.ownerDocument===Hi&&Kr(Hi,t)?-1:e===n||e.ownerDocument===Hi&&Kr(Hi,e)?1:Br?ia.call(Br,t)-ia.call(Br,e):0:4&r?-1:1)}:function(t,e){if(t===e)return qr=!0,0;var r,o=0,i=t.parentNode,a=e.parentNode,s=[t],l=[e];if(!i||!a)return t===n?-1:e===n?1:i?-1:a?1:Br?ia.call(Br,t)-ia.call(Br,e):0;if(i===a)return Da(t,e);for(r=t;r=r.parentNode;)s.unshift(r);for(r=e;r=r.parentNode;)l.unshift(r);for(;s[o]===l[o];)o++;return o?Da(s[o],l[o]):s[o]===Hi?-1:l[o]===Hi?1:0},n):Ur},Sa.matches=function(t,e){return Sa(t,null,null,e)},Sa.matchesSelector=function(t,e){if((t.ownerDocument||t)!==Ur&&Fr(t),e=e.replace(ha,"='$1']"),Tr.matchesSelector&&Hr&&(!Wr||!Wr.test(e))&&(!Vr||!Vr.test(e)))try{var n=undefined.call(t,e);if(n||Tr.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(t){}return Sa(e,Ur,null,[t]).length>0},Sa.contains=function(t,e){return(t.ownerDocument||t)!==Ur&&Fr(t),Kr(t,e)},Sa.attr=function(t,e){(t.ownerDocument||t)!==Ur&&Fr(t);var n=Nr.attrHandle[e.toLowerCase()],r=n&&Ji.call(Nr.attrHandle,e.toLowerCase())?n(t,e,!Hr):void 0;return void 0!==r?r:Tr.attributes||!Hr?t.getAttribute(e):(r=t.getAttributeNode(e))&&r.specified?r.value:null},Sa.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},Sa.uniqueSort=function(t){var e,n=[],r=0,o=0;if(qr=!Tr.detectDuplicates,Br=!Tr.sortStable&&t.slice(0),t.sort(Gi),qr){for(;e=t[o++];)e===t[o]&&(r=n.push(o));for(;r--;)t.splice(n[r],1)}return Br=null,t},$r=Sa.getText=function(t){var e,n="",r=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=$r(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[r++];)n+=$r(e);return n},Nr=Sa.selectors={cacheLength:50,createPseudo:Ea,match:ga,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(Ca,xa),t[3]=(t[3]||t[4]||t[5]||"").replace(Ca,xa),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||Sa.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&Sa.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return ga.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&pa.test(n)&&(e=Pr(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(Ca,xa).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=Ki[t+" "];return e||(e=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+t+"("+aa+"|$)"))&&Ki(t,(function(t){return e.test("string"==typeof t.className&&t.className||typeof t.getAttribute!==Xi&&t.getAttribute("class")||"")}))},ATTR:function(t,e,n){return function(r){var o=Sa.attr(r,t);return null==o?"!="===e:!e||(o+="","="===e?o===n:"!="===e?o!==n:"^="===e?n&&0===o.indexOf(n):"*="===e?n&&o.indexOf(n)>-1:"$="===e?n&&o.slice(-n.length)===n:"~="===e?(" "+o+" ").indexOf(n)>-1:"|="===e&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,r,o){var i="nth"!==t.slice(0,3),a="last"!==t.slice(-4),s="of-type"===e;return 1===r&&0===o?function(t){return!!t.parentNode}:function(e,n,l){var u,c,d,f,h,p,m=i!==a?"nextSibling":"previousSibling",g=e.parentNode,v=s&&e.nodeName.toLowerCase(),y=!l&&!s;if(g){if(i){for(;m;){for(d=e;d=d[m];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;p=m="only"===t&&!p&&"nextSibling"}return!0}if(p=[a?g.firstChild:g.lastChild],a&&y){for(h=(u=(c=g[zi]||(g[zi]={}))[t]||[])[0]===Vi&&u[1],f=u[0]===Vi&&u[2],d=h&&g.childNodes[h];d=++h&&d&&d[m]||(f=h=0)||p.pop();)if(1===d.nodeType&&++f&&d===e){c[t]=[Vi,h,f];break}}else if(y&&(u=(e[zi]||(e[zi]={}))[t])&&u[0]===Vi)f=u[1];else for(;(d=++h&&d&&d[m]||(f=h=0)||p.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++f||(y&&((d[zi]||(d[zi]={}))[t]=[Vi,f]),d!==e)););return(f-=o)===r||f%r==0&&f/r>=0}}},PSEUDO:function(t,e){var n,r=Nr.pseudos[t]||Nr.setFilters[t.toLowerCase()]||Sa.error("unsupported pseudo: "+t);return r[zi]?r(e):r.length>1?(n=[t,t,"",e],Nr.setFilters.hasOwnProperty(t.toLowerCase())?Ea((function(t,n){for(var o,i=r(t,e),a=i.length;a--;)t[o=ia.call(t,i[a])]=!(n[o]=i[a])})):function(t){return r(t,0,n)}):r}},pseudos:{not:Ea((function(t){var e=[],n=[],r=jr(t.replace(ca,"$1"));return r[zi]?Ea((function(t,e,n,o){for(var i,a=r(t,null,o,[]),s=t.length;s--;)(i=a[s])&&(t[s]=!(e[s]=i))})):function(t,o,i){return e[0]=t,r(e,null,i,n),e[0]=null,!n.pop()}})),has:Ea((function(t){return function(e){return Sa(t,e).length>0}})),contains:Ea((function(t){return t=t.replace(Ca,xa),function(e){return(e.textContent||e.innerText||$r(e)).indexOf(t)>-1}})),lang:Ea((function(t){return ma.test(t||"")||Sa.error("unsupported lang: "+t),t=t.replace(Ca,xa).toLowerCase(),function(e){var n;do{if(n=Hr?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(t){var e=window.location&&window.location.hash;return e&&e.slice(1)===t.id},root:function(t){return t===zr},focus:function(t){return t===Ur.activeElement&&(!Ur.hasFocus||Ur.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return!1===t.disabled},disabled:function(t){return!0===t.disabled},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!Nr.pseudos.empty(t)},header:function(t){return ya.test(t.nodeName)},input:function(t){return va.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:La((function(){return[0]})),last:La((function(t,e){return[e-1]})),eq:La((function(t,e,n){return[n<0?n+e:n]})),even:La((function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t})),odd:La((function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t})),lt:La((function(t,e,n){for(var r=n<0?n+e:n;--r>=0;)t.push(r);return t})),gt:La((function(t,e,n){for(var r=n<0?n+e:n;++r<e;)t.push(r);return t}))}},Nr.pseudos.nth=Nr.pseudos.eq,V(["radio","checkbox","file","password","image"],(function(t){Nr.pseudos[t]=function(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}(t)})),V(["submit","reset"],(function(t){Nr.pseudos[t]=function(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}(t)})),Ta.prototype=Nr.filters=Nr.pseudos,Nr.setFilters=new Ta,Pr=Sa.tokenize=function(t,e){var n,r,o,i,a,s,l,u=Yi[t+" "];if(u)return e?0:u.slice(0);for(a=t,s=[],l=Nr.preFilter;a;){for(i in n&&!(r=da.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(o=[])),n=!1,(r=fa.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace(ca," ")}),a=a.slice(n.length)),Nr.filter)Nr.filter.hasOwnProperty(i)&&(!(r=ga[i].exec(a))||l[i]&&!(r=l[i](r))||(n=r.shift(),o.push({value:n,type:i,matches:r}),a=a.slice(n.length)));if(!n)break}return e?a.length:a?Sa.error(t):Yi(t,s).slice(0)},jr=Sa.compile=function(t,e){var n,r=[],o=[],i=Zi[t+" "];if(!i){for(e||(e=Pr(t)),n=e.length;n--;)(i=Ma(e[n]))[zi]?r.push(i):o.push(i);i=Zi(t,function(t,e){var n=e.length>0,r=t.length>0,o=function(o,i,a,s,l){var u,c,d,f=0,h="0",p=o&&[],m=[],g=Rr,v=o||r&&Nr.find.TAG("*",l),y=Vi+=null==g?1:Math.random()||.1,b=v.length;for(l&&(Rr=i!==Ur&&i);h!==b&&null!=(u=v[h]);h++){if(r&&u){for(c=0;d=t[c++];)if(d(u,i,a)){s.push(u);break}l&&(Vi=y)}n&&((u=!d&&u)&&f--,o&&p.push(u))}if(f+=h,n&&h!==f){for(c=0;d=e[c++];)d(p,m,i,a);if(o){if(f>0)for(;h--;)p[h]||m[h]||(m[h]=ea.call(s));m=Pa(m)}ra.apply(s,m),l&&!o&&m.length>0&&f+e.length>1&&Sa.uniqueSort(s)}return l&&(Vi=y,Rr=g),p};return n?Ea(o):o}(o,r)),i.selector=t}return i},Mr=Sa.select=function(t,e,n,r){var o,i,a,s,l,u="function"==typeof t&&t,c=!r&&Pr(t=u.selector||t);if(n=n||[],1===c.length){if((i=c[0]=c[0].slice(0)).length>2&&"ID"===(a=i[0]).type&&Tr.getById&&9===e.nodeType&&Hr&&Nr.relative[i[1].type]){if(!(e=(Nr.find.ID(a.matches[0].replace(Ca,xa),e)||[])[0]))return n;u&&(e=e.parentNode),t=t.slice(i.shift().value.length)}for(o=ga.needsContext.test(t)?0:i.length;o--&&(a=i[o],!Nr.relative[s=a.type]);)if((l=Nr.find[s])&&(r=l(a.matches[0].replace(Ca,xa),wa.test(i[0].type)&&Aa(e.parentNode)||e))){if(i.splice(o,1),!(t=r.length&&Na(i)))return ra.apply(n,r),n;break}}return(u||jr(t,c))(r,e,!Hr,n,wa.test(t)&&Aa(e.parentNode)||e),n},Tr.sortStable=zi.split("").sort(Gi).join("")===zi,Tr.detectDuplicates=!!qr,Fr(),Tr.sortDetached=!0;var Ra=document,Ba=Array.prototype.push,qa=Array.prototype.slice,Fa=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,Ua=Ui.Event,za=De.makeMap("children,contents,next,prev"),Ha=function(t){return void 0!==t},Va=function(t){return"string"==typeof t},Wa=function(t,e){var n,r=(e=e||Ra).createElement("div"),o=e.createDocumentFragment();for(r.innerHTML=t;n=r.firstChild;)o.appendChild(n);return o},Ka=function(t,e,n,r){var o;if(Va(e))e=Wa(e,ss(t[0]));else if(e.length&&!e.nodeType){if(e=ds.makeArray(e),r)for(o=e.length-1;o>=0;o--)Ka(t,e[o],n,r);else for(o=0;o<e.length;o++)Ka(t,e[o],n,r);return t}if(e.nodeType)for(o=t.length;o--;)n.call(t[o],e);return t},Ya=function(t,e){return t&&e&&-1!==(" "+t.className+" ").indexOf(" "+e+" ")},Za=function(t,e,n){var r,o;return e=ds(e)[0],t.each((function(){var t=this;n&&r===t.parentNode||(r=t.parentNode,o=e.cloneNode(!1),t.parentNode.insertBefore(o,t)),o.appendChild(t)})),t},Ga=De.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," "),Xa=De.makeMap("checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected"," "),Qa={for:"htmlFor",class:"className",readonly:"readOnly"},Ja={float:"cssFloat"},ts={},es={},ns=function(t,e){return new ds.fn.init(t,e)},rs=/^\s*|\s*$/g,os=function(t){return null==t?"":(""+t).replace(rs,"")},is=function(t,e){var n,r,o,i;if(t)if(void 0===(n=t.length)){for(r in t)if(t.hasOwnProperty(r)&&(i=t[r],!1===e.call(i,r,i)))break}else for(o=0;o<n&&(i=t[o],!1!==e.call(i,o,i));o++);return t},as=function(t,e){var n=[];return is(t,(function(t,r){e(r,t)&&n.push(r)})),n},ss=function(t){return t?9===t.nodeType?t:t.ownerDocument:Ra};ns.fn=ns.prototype={constructor:ns,selector:"",context:null,length:0,init:function(t,e){var n,r,o=this;if(!t)return o;if(t.nodeType)return o.context=o[0]=t,o.length=1,o;if(e&&e.nodeType)o.context=e;else{if(e)return ds(t).attr(e);o.context=e=document}if(Va(t)){if(o.selector=t,!(n="<"===t.charAt(0)&&">"===t.charAt(t.length-1)&&t.length>=3?[null,t,null]:Fa.exec(t)))return ds(e).find(t);if(n[1])for(r=Wa(t,ss(e)).firstChild;r;)Ba.call(o,r),r=r.nextSibling;else{if(!(r=ss(e).getElementById(n[2])))return o;if(r.id!==n[2])return o.find(t);o.length=1,o[0]=r}}else this.add(t,!1);return o},toArray:function(){return De.toArray(this)},add:function(t,e){var n,r,o=this;if(Va(t))return o.add(ds(t));if(!1!==e)for(n=ds.unique(o.toArray().concat(ds.makeArray(t))),o.length=n.length,r=0;r<n.length;r++)o[r]=n[r];else Ba.apply(o,ds.makeArray(t));return o},attr:function(t,e){var n,r=this;if("object"==typeof t)is(t,(function(t,e){r.attr(t,e)}));else{if(!Ha(e)){if(r[0]&&1===r[0].nodeType){if((n=ts[t])&&n.get)return n.get(r[0],t);if(Xa[t])return r.prop(t)?t:void 0;null===(e=r[0].getAttribute(t,2))&&(e=void 0)}return e}this.each((function(){var n;if(1===this.nodeType){if((n=ts[t])&&n.set)return void n.set(this,e);null===e?this.removeAttribute(t,2):this.setAttribute(t,e,2)}}))}return r},removeAttr:function(t){return this.attr(t,null)},prop:function(t,e){var n=this;if("object"==typeof(t=Qa[t]||t))is(t,(function(t,e){n.prop(t,e)}));else{if(!Ha(e))return n[0]&&n[0].nodeType&&t in n[0]?n[0][t]:e;this.each((function(){1===this.nodeType&&(this[t]=e)}))}return n},css:function(t,e){var n,r,o=this,i=function(t){return t.replace(/-(\D)/g,(function(t,e){return e.toUpperCase()}))},a=function(t){return t.replace(/[A-Z]/g,(function(t){return"-"+t}))};if("object"==typeof t)is(t,(function(t,e){o.css(t,e)}));else if(Ha(e))t=i(t),"number"!=typeof e||Ga[t]||(e=e.toString()+"px"),o.each((function(){var n=this.style;if((r=es[t])&&r.set)r.set(this,e);else{try{this.style[Ja[t]||t]=e}catch(t){}null!==e&&""!==e||(n.removeProperty?n.removeProperty(a(t)):n.removeAttribute(t))}}));else{if(n=o[0],(r=es[t])&&r.get)return r.get(n);if(!n.ownerDocument.defaultView)return n.currentStyle?n.currentStyle[i(t)]:"";try{return n.ownerDocument.defaultView.getComputedStyle(n,null).getPropertyValue(a(t))}catch(t){return}}return o},remove:function(){for(var t,e=this.length;e--;)t=this[e],Ua.clean(t),t.parentNode&&t.parentNode.removeChild(t);return this},empty:function(){for(var t,e=this.length;e--;)for(t=this[e];t.firstChild;)t.removeChild(t.firstChild);return this},html:function(t){var e,n=this;if(Ha(t)){e=n.length;try{for(;e--;)n[e].innerHTML=t}catch(r){ds(n[e]).empty().append(t)}return n}return n[0]?n[0].innerHTML:""},text:function(t){var e,n=this;if(Ha(t)){for(e=n.length;e--;)"innerText"in n[e]?n[e].innerText=t:n[0].textContent=t;return n}return n[0]?n[0].innerText||n[0].textContent:""},append:function(){return Ka(this,arguments,(function(t){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.appendChild(t)}))},prepend:function(){return Ka(this,arguments,(function(t){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.insertBefore(t,this.firstChild)}),!0)},before:function(){var t=this;return t[0]&&t[0].parentNode?Ka(t,arguments,(function(t){this.parentNode.insertBefore(t,this)})):t},after:function(){var t=this;return t[0]&&t[0].parentNode?Ka(t,arguments,(function(t){this.parentNode.insertBefore(t,this.nextSibling)}),!0):t},appendTo:function(t){return ds(t).append(this),this},prependTo:function(t){return ds(t).prepend(this),this},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){return Za(this,t)},wrapAll:function(t){return Za(this,t,!0)},wrapInner:function(t){return this.each((function(){ds(this).contents().wrapAll(t)})),this},unwrap:function(){return this.parent().each((function(){ds(this).replaceWith(this.childNodes)}))},clone:function(){var t=[];return this.each((function(){t.push(this.cloneNode(!0))})),ds(t)},addClass:function(t){return this.toggleClass(t,!0)},removeClass:function(t){return this.toggleClass(t,!1)},toggleClass:function(t,e){var n=this;return"string"!=typeof t||(-1!==t.indexOf(" ")?is(t.split(" "),(function(){n.toggleClass(this,e)})):n.each((function(n,r){var o=Ya(r,t);if(o!==e){var i=r.className;o?r.className=os((" "+i+" ").replace(" "+t+" "," ")):r.className+=i?" "+t:t}}))),n},hasClass:function(t){return Ya(this[0],t)},each:function(t){return is(this,t)},on:function(t,e){return this.each((function(){Ua.bind(this,t,e)}))},off:function(t,e){return this.each((function(){Ua.unbind(this,t,e)}))},trigger:function(t){return this.each((function(){"object"==typeof t?Ua.fire(this,t.type,t):Ua.fire(this,t)}))},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},slice:function(){return ds(qa.apply(this,arguments))},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},find:function(t){var e,n,r=[];for(e=0,n=this.length;e<n;e++)ds.find(t,this[e],r);return ds(r)},filter:function(t){return ds("function"==typeof t?as(this.toArray(),(function(e,n){return t(n,e)})):ds.filter(t,this.toArray()))},closest:function(t){var e=[];return t instanceof ds&&(t=t[0]),this.each((function(n,r){for(;r;){if("string"==typeof t&&ds(r).is(t)){e.push(r);break}if(r===t){e.push(r);break}r=r.parentNode}})),ds(e)},offset:function(t){var e,n,r,o,i=0,a=0;return t?this.css(t):((e=this[0])&&(r=(n=e.ownerDocument).documentElement,e.getBoundingClientRect&&(i=(o=e.getBoundingClientRect()).left+(r.scrollLeft||n.body.scrollLeft)-r.clientLeft,a=o.top+(r.scrollTop||n.body.scrollTop)-r.clientTop)),{left:i,top:a})},push:Ba,sort:Array.prototype.sort,splice:Array.prototype.splice},De.extend(ns,{extend:De.extend,makeArray:function(t){return(e=t)&&e===e.window||t.nodeType?[t]:De.toArray(t);var e},inArray:function(t,e){var n;if(e.indexOf)return e.indexOf(t);for(n=e.length;n--;)if(e[n]===t)return n;return-1},isArray:De.isArray,each:is,trim:os,grep:as,find:Sa,expr:Sa.selectors,unique:Sa.uniqueSort,text:Sa.getText,contains:Sa.contains,filter:function(t,e,n){var r=e.length;for(n&&(t=":not("+t+")");r--;)1!==e[r].nodeType&&e.splice(r,1);return e=1===e.length?ds.find.matchesSelector(e[0],t)?[e[0]]:[]:ds.find.matches(t,e)}});var ls=function(t,e,n){var r=[],o=t[e];for("string"!=typeof n&&n instanceof ds&&(n=n[0]);o&&9!==o.nodeType;){if(void 0!==n){if(o===n)break;if("string"==typeof n&&ds(o).is(n))break}1===o.nodeType&&r.push(o),o=o[e]}return r},us=function(t,e,n,r){var o=[];for(r instanceof ds&&(r=r[0]);t;t=t[e])if(!n||t.nodeType===n){if(void 0!==r){if(t===r)break;if("string"==typeof r&&ds(t).is(r))break}o.push(t)}return o},cs=function(t,e,n){for(t=t[e];t;t=t[e])if(t.nodeType===n)return t;return null};is({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return ls(t,"parentNode")},next:function(t){return cs(t,"nextSibling",1)},prev:function(t){return cs(t,"previousSibling",1)},children:function(t){return us(t.firstChild,"nextSibling",1)},contents:function(t){return De.toArray(("iframe"===t.nodeName?t.contentDocument||t.contentWindow.document:t).childNodes)}},(function(t,e){ns.fn[t]=function(n){var r=[];this.each((function(){var t=e.call(r,this,n,r);t&&(ds.isArray(t)?r.push.apply(r,t):r.push(t))})),this.length>1&&(za[t]||(r=ds.unique(r)),0===t.indexOf("parents")&&(r=r.reverse()));var o=ds(r);return n?o.filter(n):o}})),is({parentsUntil:function(t,e){return ls(t,"parentNode",e)},nextUntil:function(t,e){return us(t,"nextSibling",1,e).slice(1)},prevUntil:function(t,e){return us(t,"previousSibling",1,e).slice(1)}},(function(t,e){ns.fn[t]=function(n,r){var o=[];this.each((function(){var t=e.call(o,this,n,o);t&&(ds.isArray(t)?o.push.apply(o,t):o.push(t))})),this.length>1&&(o=ds.unique(o),0!==t.indexOf("parents")&&"prevUntil"!==t||(o=o.reverse()));var i=ds(o);return r?i.filter(r):i}})),ns.fn.is=function(t){return!!t&&this.filter(t).length>0},ns.fn.init.prototype=ns.fn,ns.overrideDefaults=function(t){var e,n=function(r,o){return e=e||t(),0===arguments.length&&(r=e.element),o||(o=e.context),new n.fn.init(r,o)};return ds.extend(n,this),n},ns.attrHooks=ts,ns.cssHooks=es;var ds=ns,fs=De.each,hs=De.grep,ps=Ce.ie,ms=/^([a-z0-9],?)+$/i,gs=function(t,e){var n=e.attr("style"),r=t.serialize(t.parse(n),e[0].nodeName);r||(r=null),e.attr("data-mce-style",r)},vs=function(t,e){var n,r,o=0;if(t)for(n=t.nodeType,t=t.previousSibling;t;t=t.previousSibling)r=t.nodeType,(!e||3!==r||r!==n&&t.nodeValue.length)&&(o++,n=r);return o},ys=function(t,e){void 0===e&&(e={});var n={},r=window,o={},i=0,a=ao.forElement(Ae.fromDom(t),{contentCssCors:e.contentCssCors,referrerPolicy:e.referrerPolicy}),s=[],l=e.schema?e.schema:Ti({}),u=$i({url_converter:e.url_converter,url_converter_scope:e.url_converter_scope},e.schema),c=e.ownEvents?new Ui:Ui.Event,d=l.getBlockElements(),h=ds.overrideDefaults((function(){return{context:t,element:z.getRoot()}})),p=function(e){return e&&t&&f(e)?t.getElementById(e):e},m=function(t){return h("string"==typeof t?p(t):t)},g=function(t,e,n){var r,o,i=m(t);return i.length&&(o=(r=H[e])&&r.get?r.get(i,e):i.attr(e)),void 0===o&&(o=n||""),o},v=function(t){var e=p(t);return e?e.attributes:[]},b=function(t,n,r){""===r&&(r=null);var o=m(t),i=o.attr(n);if(o.length){var a=H[n];a&&a.set?a.set(o,r,n):o.attr(n,r),i!==r&&e.onSetAttrib&&e.onSetAttrib({attrElm:o,attrName:n,attrValue:r})}},_=function(){return e.root_element||t.body},w=function(e,n){return fr(t.body,p(e),n)},C=function(t,e,n){var r=m(t);return n?r.css(e):("float"===(e=e.replace(/-(\D)/g,(function(t,e){return e.toUpperCase()})))&&(e=Ce.browser.isIE()?"styleFloat":"cssFloat"),r[0]&&r[0].style?r[0].style[e]:void 0)},x=function(t){var e,n;return t=p(t),e=C(t,"width"),n=C(t,"height"),-1===e.indexOf("px")&&(e=0),-1===n.indexOf("px")&&(n=0),{w:parseInt(e,10)||t.offsetWidth||t.clientWidth,h:parseInt(n,10)||t.offsetHeight||t.clientHeight}},O=function(t,e){var n;if(!t)return!1;if(!Array.isArray(t)){if("*"===e)return 1===t.nodeType;if(ms.test(e)){var r=e.toLowerCase().split(/,/),o=t.nodeName.toLowerCase();for(n=r.length-1;n>=0;n--)if(r[n]===o)return!0;return!1}if(t.nodeType&&1!==t.nodeType)return!1}var i=Array.isArray(t)?t:[t];return Sa(e,i[0].ownerDocument||i[0],null,i).length>0},E=function(t,e,n,r){var o,i=[],a=p(t);for(r=void 0===r,n=n||("BODY"!==_().nodeName?_().parentNode:null),De.is(e,"string")&&(o=e,e="*"===e?function(t){return 1===t.nodeType}:function(t){return O(t,o)});a&&!(a===n||y(a.nodeType)||Fn(a)||Un(a));){if(!e||"function"==typeof e&&e(a)){if(!r)return[a];i.push(a)}a=a.parentNode}return r?i:null},D=function(t,e,n){var r=e;if(t)for("string"==typeof e&&(r=function(t){return O(t,e)}),t=t[n];t;t=t[n])if("function"==typeof r&&r(t))return t;return null},L=function(t,e,n){var r,o="string"==typeof t?p(t):t;if(!o)return!1;if(De.isArray(o)&&(o.length||0===o.length))return r=[],fs(o,(function(t,o){t&&r.push(e.call(n,"string"==typeof t?p(t):t,o))})),r;var i=n||this;return e.call(i,o)},A=function(t,e){m(t).each((function(t,n){fs(e,(function(t,e){b(n,e,t)}))}))},T=function(t,e){var n=m(t);ps?n.each((function(t,n){if(!1!==n.canHaveHTML){for(;n.firstChild;)n.removeChild(n.firstChild);try{n.innerHTML="<br>"+e,n.removeChild(n.firstChild)}catch(t){ds("<div></div>").html("<br>"+e).contents().slice(1).appendTo(n)}return e}})):n.html(e)},N=function(e,n,r,o,i){return L(e,(function(e){var a="string"==typeof n?t.createElement(n):n;return A(a,r),o&&("string"!=typeof o&&o.nodeType?a.appendChild(o):"string"==typeof o&&T(a,o)),i?a:e.appendChild(a)}))},$=function(e,n,r){return N(t.createElement(e),e,n,r,!0)},I=bi.encodeAllRaw,P=function(t,e){var n=m(t);return e?n.each((function(){for(var t;t=this.firstChild;)3===t.nodeType&&0===t.data.length?this.removeChild(t):this.parentNode.insertBefore(t,this)})).remove():n.remove(),n.length>1?n.toArray():n[0]},j=function(t,e,n){m(t).toggleClass(e,n).each((function(){""===this.className&&ds(this).attr("class",null)}))},M=function(t,e,n){return L(e,(function(e){return De.is(e,"array")&&(t=t.cloneNode(!0)),n&&fs(hs(e.childNodes),(function(e){t.appendChild(e)})),e.parentNode.replaceChild(t,e)}))},R=function(t){if(Tn(t)){var e="a"===t.nodeName.toLowerCase()&&!g(t,"href")&&g(t,"id");if(g(t,"name")||g(t,"data-mce-bookmark")||e)return!0}return!1},B=function(){return t.createRange()},q=function(n,o,i,a){if(De.isArray(n)){for(var l=n.length,u=[];l--;)u[l]=q(n[l],o,i,a);return u}return!e.collect||n!==t&&n!==r||s.push([n,o,i,a]),c.bind(n,o,i,a||z)},F=function(e,n,o){if(De.isArray(e)){for(var i=e.length,a=[];i--;)a[i]=F(e[i],n,o);return a}if(s.length>0&&(e===t||e===r))for(i=s.length;i--;){var l=s[i];e!==l[0]||n&&n!==l[1]||o&&o!==l[2]||c.unbind(l[0],l[1],l[2])}return c.unbind(e,n,o)},U=function(t){if(t&&Tn(t)){var e=t.getAttribute("data-mce-contenteditable");return e&&"inherit"!==e?e:"inherit"!==t.contentEditable?t.contentEditable:null}return null},z={doc:t,settings:e,win:r,files:o,stdMode:!0,boxModel:!0,styleSheetLoader:a,boundEvents:s,styles:u,schema:l,events:c,isBlock:function(t){if("string"==typeof t)return!!d[t];if(t){var e=t.nodeType;if(e)return!(1!==e||!d[t.nodeName])}return!1},$:h,$$:m,root:null,clone:function(e,n){if(!ps||1!==e.nodeType||n)return e.cloneNode(n);var r=t.createElement(e.nodeName);return fs(v(e),(function(t){b(r,t.nodeName,g(e,t.nodeName))})),r},getRoot:_,getViewPort:function(t){var e=Dn(t);return{x:e.x,y:e.y,w:e.width,h:e.height}},getRect:function(t){t=p(t);var e=w(t),n=x(t);return{x:e.x,y:e.y,w:n.w,h:n.h}},getSize:x,getParent:function(t,e,n){var r=E(t,e,n,!1);return r&&r.length>0?r[0]:null},getParents:E,get:p,getNext:function(t,e){return D(t,e,"nextSibling")},getPrev:function(t,e){return D(t,e,"previousSibling")},select:function(n,r){return Sa(n,p(r)||e.root_element||t,[])},is:O,add:N,create:$,createHTML:function(t,e,n){var r,o="";for(r in o+="<"+t,e)wt(e,r)&&(o+=" "+r+'="'+I(e[r])+'"');return void 0!==n?o+">"+n+"</"+t+">":o+" />"},createFragment:function(e){var n,r=t.createElement("div"),o=t.createDocumentFragment();for(o.appendChild(r),e&&(r.innerHTML=e);n=r.firstChild;)o.appendChild(n);return o.removeChild(r),o},remove:P,setStyle:function(t,n,r){var o=f(n)?m(t).css(n,r):m(t).css(n);e.update_styles&&gs(u,o)},getStyle:C,setStyles:function(t,n){var r=m(t).css(n);e.update_styles&&gs(u,r)},removeAllAttribs:function(t){return L(t,(function(t){var e,n=t.attributes;for(e=n.length-1;e>=0;e--)t.removeAttributeNode(n.item(e))}))},setAttrib:b,setAttribs:A,getAttrib:g,getPos:w,parseStyle:function(t){return u.parse(t)},serializeStyle:function(t,e){return u.serialize(t,e)},addStyle:function(e){var r,o;if(z!==ys.DOM&&t===document){if(n[e])return;n[e]=!0}(o=t.getElementById("mceDefaultStyles"))||((o=t.createElement("style")).id="mceDefaultStyles",o.type="text/css",(r=t.getElementsByTagName("head")[0]).firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o)),o.styleSheet?o.styleSheet.cssText+=e:o.appendChild(t.createTextNode(e))},loadCSS:function(t){t||(t=""),V(t.split(","),(function(t){o[t]=!0,a.load(t,k)}))},addClass:function(t,e){m(t).addClass(e)},removeClass:function(t,e){j(t,e,!1)},hasClass:function(t,e){return m(t).hasClass(e)},toggleClass:j,show:function(t){m(t).show()},hide:function(t){m(t).hide()},isHidden:function(t){return"none"===m(t).css("display")},uniqueId:function(t){return(t||"mce_")+i++},setHTML:T,getOuterHTML:function(t){var e="string"==typeof t?p(t):t;return Tn(e)?e.outerHTML:ds("<div></div>").append(ds(e).clone()).html()},setOuterHTML:function(t,e){m(t).each((function(){try{if("outerHTML"in this)return void(this.outerHTML=e)}catch(t){}P(ds(this).html(e),!0)}))},decode:bi.decode,encode:I,insertAfter:function(t,e){var n=p(e);return L(t,(function(t){var e=n.parentNode,r=n.nextSibling;return r?e.insertBefore(t,r):e.appendChild(t),t}))},replace:M,rename:function(t,e){var n;return t.nodeName!==e.toUpperCase()&&(n=$(e),fs(v(t),(function(e){b(n,e.nodeName,g(t,e.nodeName))})),M(n,t,!0)),n||t},findCommonAncestor:function(t,e){for(var n,r=t;r;){for(n=e;n&&r!==n;)n=n.parentNode;if(r===n)break;r=r.parentNode}return!r&&t.ownerDocument?t.ownerDocument.documentElement:r},toHex:function(t){return u.toHex(De.trim(t))},run:L,getAttribs:v,isEmpty:function(t,e){var n,r,o=0;if(R(t))return!1;if(t=t.firstChild){var i=new so(t,t.parentNode),a=l?l.getWhiteSpaceElements():{};e=e||(l?l.getNonEmptyElements():null);do{if(n=t.nodeType,Tn(t)){var s=t.getAttribute("data-mce-bogus");if(s){t=i.next("all"===s);continue}if(r=t.nodeName.toLowerCase(),e&&e[r]){if("br"===r){o++,t=i.next();continue}return!1}if(R(t))return!1}if(8===n)return!1;if(3===n&&!Zo(t.nodeValue))return!1;if(3===n&&t.parentNode&&a[t.parentNode.nodeName]&&Zo(t.nodeValue))return!1;t=i.next()}while(t)}return o<=1},createRng:B,nodeIndex:vs,split:function(t,e,n){var r,o,i,a=B();if(t&&e)return a.setStart(t.parentNode,vs(t)),a.setEnd(e.parentNode,vs(e)),r=a.extractContents(),(a=B()).setStart(e.parentNode,vs(e)+1),a.setEnd(t.parentNode,vs(t)+1),o=a.extractContents(),(i=t.parentNode).insertBefore(ii(z,r),t),n?i.insertBefore(n,t):i.insertBefore(e,t),i.insertBefore(ii(z,o),t),P(t),n||e},bind:q,unbind:F,fire:function(t,e,n){return c.fire(t,e,n)},getContentEditable:U,getContentEditableParent:function(t){for(var e=_(),n=null;t&&t!==e&&null===(n=U(t));t=t.parentNode);return n},destroy:function(){if(s.length>0)for(var t=s.length;t--;){var e=s[t];c.unbind(e[0],e[1],e[2])}ft(o,(function(t,e){a.unload(e),delete o[e]})),Sa.setDocument&&Sa.setDocument()},isChildOf:function(t,e){if(ps){for(;t;){if(e===t)return!0;t=t.parentNode}return!1}return t===e||e.contains(t)},dumpRng:function(t){return"startContainer: "+t.startContainer.nodeName+", startOffset: "+t.startOffset+", endContainer: "+t.endContainer.nodeName+", endOffset: "+t.endOffset}},H=function(t,e,n){var r=e.keep_values,o={set:function(t,r,o){e.url_converter&&null!==r&&(r=e.url_converter.call(e.url_converter_scope||n(),r,o,t[0])),t.attr("data-mce-"+o,r).attr(o,r)},get:function(t,e){return t.attr("data-mce-"+e)||t.attr(e)}},i={style:{set:function(e,n){null===n||"object"!=typeof n?(r&&e.attr("data-mce-style",n),null!==n&&"string"==typeof n?(e.removeAttr("style"),e.css(t.parse(n))):e.attr("style",n)):e.css(n)},get:function(e){var n=e.attr("data-mce-style")||e.attr("style");return t.serialize(t.parse(n),e[0].nodeName)}}};return r&&(i.href=i.src=o),i}(u,e,S(z));return z};ys.DOM=ys(document),ys.nodeIndex=vs;var bs=ys.DOM,_s=De.each,ws=De.grep,ks=function(){function t(t){void 0===t&&(t={}),this.states={},this.queue=[],this.scriptLoadedCallbacks={},this.queueLoadedCallbacks=[],this.loading=0,this.settings=t}return t.prototype._setReferrerPolicy=function(t){this.settings.referrerPolicy=t},t.prototype.loadScript=function(t,e,n){var r,o=bs,i=function(){o.remove(a),r&&(r.onerror=r.onload=r=null)},a=o.uniqueId();(r=document.createElement("script")).id=a,r.type="text/javascript",r.src=De._addCacheSuffix(t),this.settings.referrerPolicy&&o.setAttrib(r,"referrerpolicy",this.settings.referrerPolicy),r.onload=function(){i(),e()},r.onerror=function(){i(),_(n)?n():"undefined"!=typeof console&&console.log&&console.log("Failed to load script: "+t)},(document.getElementsByTagName("head")[0]||document.body).appendChild(r)},t.prototype.isDone=function(t){return 2===this.states[t]},t.prototype.markDone=function(t){this.states[t]=2},t.prototype.add=function(t,e,n,r){var o=this.states[t];this.queue.push(t),void 0===o&&(this.states[t]=0),e&&(this.scriptLoadedCallbacks[t]||(this.scriptLoadedCallbacks[t]=[]),this.scriptLoadedCallbacks[t].push({success:e,failure:r,scope:n||this}))},t.prototype.load=function(t,e,n,r){return this.add(t,e,n,r)},t.prototype.remove=function(t){delete this.states[t],delete this.scriptLoadedCallbacks[t]},t.prototype.loadQueue=function(t,e,n){this.loadScripts(this.queue,t,e,n)},t.prototype.loadScripts=function(t,e,n,r){var o=this,i=[],a=function(t,e){_s(o.scriptLoadedCallbacks[e],(function(e){_(e[t])&&e[t].call(e.scope)})),o.scriptLoadedCallbacks[e]=void 0};o.queueLoadedCallbacks.push({success:e,failure:r,scope:n||this});var s=function(){var e=ws(t);if(t.length=0,_s(e,(function(t){2!==o.states[t]?3!==o.states[t]?1!==o.states[t]&&(o.states[t]=1,o.loading++,o.loadScript(t,(function(){o.states[t]=2,o.loading--,a("success",t),s()}),(function(){o.states[t]=3,o.loading--,i.push(t),a("failure",t),s()}))):a("failure",t):a("success",t)})),!o.loading){var n=o.queueLoadedCallbacks.slice(0);o.queueLoadedCallbacks.length=0,_s(n,(function(t){0===i.length?_(t.success)&&t.success.call(t.scope):_(t.failure)&&t.failure.call(t.scope,i)}))}};s()},t.ScriptLoader=new t,t}(),Cs=function(t){var e=t;return{get:function(){return e},set:function(t){e=t}}},xs={},Ss=Cs("en"),Os=function(){return bt(xs,Ss.get())},Es={getData:function(){return ht(xs,(function(t){return At({},t)}))},setCode:function(t){t&&Ss.set(t)},getCode:function(){return Ss.get()},add:function(t,e){var n=xs[t];n||(xs[t]=n={}),ft(e,(function(t,e){n[e.toLowerCase()]=t}))},translate:function(t){var e,n=Os().getOr({}),r=function(t){return _(t)?Object.prototype.toString.call(t):o(t)?"":""+t},o=function(t){return""===t||null==t},i=function(t){var e=r(t);return bt(n,e.toLowerCase()).map(r).getOr(e)},a=function(t){return t.replace(/{context:\w+}$/,"")};if(o(t))return"";if(h(e=t)&&_t(e,"raw"))return r(t.raw);if(function(t){return p(t)&&t.length>1}(t)){var s=t.slice(1);return a(i(t[0]).replace(/\{([0-9]+)\}/g,(function(t,e){return _t(s,e)?r(s[e]):t})))}return a(i(t))},isRtl:function(){return Os().bind((function(t){return bt(t,"_dir")})).exists((function(t){return"rtl"===t}))},hasCode:function(t){return _t(xs,t)}},Ds=function(){var t=[],e={},n={},r=[],o=function(t,e){var n=Y(r,(function(n){return n.name===t&&n.state===e}));V(n,(function(t){return t.callback()}))},i=function(t){var e;return n[t]&&(e=n[t].dependencies),e||[]},a=function(t,e){return"object"==typeof e?e:"string"==typeof t?{prefix:"",resource:e,suffix:""}:{prefix:t.prefix,resource:e,suffix:t.suffix}},s=function(t,r,l,u,c){if(!e[t]){var d="string"==typeof r?r:r.prefix+r.resource+r.suffix;0!==d.indexOf("/")&&-1===d.indexOf("://")&&(d=Ds.baseURL+"/"+d),e[t]=d.substring(0,d.lastIndexOf("/"));var f=function(){o(t,"loaded"),function(t,e,n,r){var o=i(t);V(o,(function(t){var n=a(e,t);s(n.resource,n,void 0,void 0)})),n&&(r?n.call(r):n.call(ks))}(t,r,l,u)};n[t]?f():ks.ScriptLoader.add(d,f,u,c)}},l=function(t,o,i){void 0===i&&(i="added"),_t(n,t)&&"added"===i||_t(e,t)&&"loaded"===i?o():r.push({name:t,state:i,callback:o})};return{items:t,urls:e,lookup:n,_listeners:r,get:function(t){if(n[t])return n[t].instance},dependencies:i,requireLangPack:function(t,n){!1!==Ds.languageLoad&&l(t,(function(){var r=Es.getCode();!r||n&&-1===(","+(n||"")+",").indexOf(","+r+",")||ks.ScriptLoader.add(e[t]+"/langs/"+r+".js")}),"loaded")},add:function(e,r,i){var a=r;return t.push(a),n[e]={instance:a,dependencies:i},o(e,"added"),a},remove:function(t){delete e[t],delete n[t]},createUrl:a,addComponents:function(t,n){var r=e[t];V(n,(function(t){ks.ScriptLoader.add(r+"/"+t)}))},load:s,waitFor:l}};Ds.languageLoad=!0,Ds.baseURL="",Ds.PluginManager=Ds(),Ds.ThemeManager=Ds();var Ls=function(){var t=function(t){var e=Cs(M.none()),n=function(){return e.get().each(t)};return{clear:function(){n(),e.set(M.none())},isSet:function(){return e.get().isSome()},get:function(){return e.get()},set:function(t){n(),e.set(M.some(t))}}}(k);return At(At({},t),{on:function(e){return t.get().each(e)}})},As=function(t,e){var n=null;return{cancel:function(){m(n)||(clearTimeout(n),n=null)},throttle:function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];m(n)&&(n=setTimeout((function(){n=null,t.apply(null,r)}),e))}}},Ts=function(t,e){var n=null,r=function(){m(n)||(clearTimeout(n),n=null)};return{cancel:r,throttle:function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];r(),n=setTimeout((function(){n=null,t.apply(null,o)}),e)}}},Ns=function(t,e){var n=er(t,e);return void 0===n||""===n?[]:n.split(" ")},$s=function(t){return void 0!==t.dom.classList},Is=function(t,e){return function(t,e,n){var r=Ns(t,e).concat([n]);return Jn(t,e,r.join(" ")),!0}(t,"class",e)},Ps=function(t,e){return function(t,e,n){var r=Y(Ns(t,e),(function(t){return t!==n}));return r.length>0?Jn(t,e,r.join(" ")):rr(t,e),!1}(t,"class",e)},js=function(t,e){$s(t)?t.dom.classList.add(e):Is(t,e)},Ms=function(t){var e=$s(t)?t.dom.classList:function(t){return Ns(t,"class")}(t);0===e.length&&rr(t,"class")},Rs=function(t,e){return $s(t)&&t.dom.classList.contains(e)},Bs=function(t,e){var n=[];return V(Qe(t),(function(t){e(t)&&(n=n.concat([t])),n=n.concat(Bs(t,e))})),n},qs=function(t,e){return function(t,e){var n=void 0===e?document:e.dom;return $e(n)?[]:H(n.querySelectorAll(t),Ae.fromDom)}(e,t)},Fs=S("mce-annotation"),Us=S("data-mce-annotation"),zs=S("data-mce-annotation-uid"),Hs=function(t,e){var n=t.selection.getRng(),r=Ae.fromDom(n.startContainer),o=Ae.fromDom(t.getBody()),i=e.fold((function(){return"."+Fs()}),(function(t){return"["+Us()+'="'+t+'"]'})),a=Je(r,n.startOffset).getOr(r),s=Jr(a,i,(function(t){return Ie(t,o)})),l=function(t,e){return function(t,e){var n=t.dom;return!(!n||!n.hasAttribute)&&n.hasAttribute(e)}(t,e)?M.some(er(t,e)):M.none()};return s.bind((function(e){return l(e,""+zs()).bind((function(n){return l(e,""+Us()).map((function(e){var r=Vs(t,n);return{uid:n,name:e,elements:r}}))}))}))},Vs=function(t,e){var n=Ae.fromDom(t.getBody());return qs(n,"["+zs()+'="'+e+'"]')},Ws=function(t,e){var n=Cs({}),r=function(){return{listeners:[],previous:Ls()}},o=function(t,e){i(t,(function(t){return e(t),t}))},i=function(t,e){var o=n.get(),i=e(bt(o,t).getOrThunk(r));o[t]=i,n.set(o)},a=Ts((function(){var e=n.get(),r=ot(ct(e));V(r,(function(e){i(e,(function(n){var r=n.previous.get();return Hs(t,M.some(e)).fold((function(){r.isSome()&&(!function(t){o(t,(function(e){V(e.listeners,(function(e){return e(!1,t)}))}))}(e),n.previous.clear())}),(function(t){var e=t.uid,i=t.name,a=t.elements;Zn(r,e)||(!function(t,e,n){o(t,(function(r){V(r.listeners,(function(r){return r(!0,t,{uid:e,nodes:H(n,(function(t){return t.dom}))})}))}))}(i,e,a),n.previous.set(e))})),{previous:n.previous,listeners:n.listeners}}))}))}),30);t.on("remove",(function(){a.cancel()})),t.on("NodeChange",(function(){a.throttle()}));return{addListener:function(t,e){i(t,(function(t){return{previous:t.previous,listeners:t.listeners.concat([e])}}))}}},Ks=function(t,e){t.on("init",(function(){t.serializer.addNodeFilter("span",(function(t){V(t,(function(t){(function(t){return M.from(t.attr(Us())).bind(e.lookup)})(t).each((function(e){!1===e.persistent&&t.unwrap()}))}))}))}))},Ys=0,Zs=function(t){var e=(new Date).getTime();return t+"_"+Math.floor(1e9*Math.random())+ ++Ys+String(e)},Gs=function(t,e){var n,r,o=He(t).dom,i=Ae.fromDom(o.createDocumentFragment()),a=(n=e,(r=(o||document).createElement("div")).innerHTML=n,Qe(Ae.fromDom(r)));mn(i,a),gn(t),pn(t,i)},Xs=function(t,e){return Ae.fromDom(t.dom.cloneNode(e))},Qs=function(t){return Xs(t,!1)},Js=function(t){return Xs(t,!0)},tl=function(t,e,n){void 0===n&&(n=N);var r=new so(t,e),o=function(t){var e;do{e=r[t]()}while(e&&!Bn(e)&&!n(e));return M.from(e).filter(Bn)};return{current:function(){return M.from(r.current()).filter(Bn)},next:function(){return o("next")},prev:function(){return o("prev")},prev2:function(){return o("prev2")}}},el=function(t,e){var n=e||function(e){return t.isBlock(e)||zn(e)||Wn(e)},r=function(t,e,n,o){if(Bn(t)){var i=o(t,e,t.data);if(-1!==i)return M.some({container:t,offset:i})}return n().bind((function(t){return r(t.container,t.offset,n,o)}))};return{backwards:function(t,e,o,i){var a=tl(t,i,n);return r(t,e,(function(){return a.prev().map((function(t){return{container:t,offset:t.length}}))}),o).getOrNull()},forwards:function(t,e,o,i){var a=tl(t,i,n);return r(t,e,(function(){return a.next().map((function(t){return{container:t,offset:0}}))}),o).getOrNull()}}},nl=Math.round,rl=function(t){return t?{left:nl(t.left),top:nl(t.top),bottom:nl(t.bottom),right:nl(t.right),width:nl(t.width),height:nl(t.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0}},ol=function(t,e){return t=rl(t),e||(t.left=t.left+t.width),t.right=t.left,t.width=0,t},il=function(t,e,n){return t>=0&&t<=Math.min(e.height,n.height)/2},al=function(t,e){var n=Math.min(e.height/2,t.height/2);return t.bottom-n<e.top||!(t.top>e.bottom)&&il(e.top-t.bottom,t,e)},sl=function(t,e){return t.top>e.bottom||!(t.bottom<e.top)&&il(e.bottom-t.top,t,e)},ll=function(t,e,n){return e>=t.left&&e<=t.right&&n>=t.top&&n<=t.bottom},ul=function(t){var e=t.startContainer,n=t.startOffset;return e.hasChildNodes()&&t.endOffset===n+1?e.childNodes[n]:null},cl=function(t,e){if(Tn(t)&&t.hasChildNodes()){var n=t.childNodes,r=function(t,e,n){return Math.min(Math.max(t,e),n)}(e,0,n.length-1);return n[r]}return t},dl=new RegExp("[̀-ͯ҃-҇҈-҉֑-ֽֿׁ-ׂׄ-ׇׅؐ-ًؚ-ٰٟۖ-ۜ۟-ۤۧ-۪ۨ-ܑۭܰ-݊ަ-ް߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣣ-ंऺ़ु-ै्॑-ॗॢ-ॣঁ়াু-ৄ্ৗৢ-ৣਁ-ਂ਼ੁ-ੂੇ-ੈੋ-੍ੑੰ-ੱੵઁ-ં઼ુ-ૅે-ૈ્ૢ-ૣଁ଼ାିୁ-ୄ୍ୖୗୢ-ୣஂாீ்ௗఀా-ీె-ైొ-్ౕ-ౖౢ-ౣಁ಼ಿೂೆೌ-್ೕ-ೖೢ-ೣഁാു-ൄ്ൗൢ-ൣ්ාි-ුූෟัิ-ฺ็-๎ັິ-ູົ-ຼ່-ໍ༘-ཱ༹༙༵༷-ཾྀ-྄྆-྇ྍ-ྗྙ-ྼ࿆ိ-ူဲ-့္-်ွ-ှၘ-ၙၞ-ၠၱ-ၴႂႅ-ႆႍႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒ-ᝓᝲ-ᝳ឴-឵ិ-ួំ៉-៓៝᠋-᠍ᢩᤠ-ᤢᤧ-ᤨᤲ᤹-᤻ᨗ-ᨘᨛᩖᩘ-ᩞ᩠ᩢᩥ-ᩬᩳ-᩿᩼᪰-᪽᪾ᬀ-ᬃ᬴ᬶ-ᬺᬼᭂ᭫-᭳ᮀ-ᮁᮢ-ᮥᮨ-ᮩ᮫-ᮭ᯦ᯨ-ᯩᯭᯯ-ᯱᰬ-ᰳᰶ-᰷᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸-᳹᷀-᷵᷼-᷿-⃐-⃜⃝-⃠⃡⃢-⃤⃥-⃰⳯-⵿⳱ⷠ-〪ⷿ-〭〮-゙〯-゚꙯꙰-꙲ꙴ-꙽ꚞ-ꚟ꛰-꛱ꠂ꠆ꠋꠥ-ꠦ꣄꣠-꣱ꤦ-꤭ꥇ-ꥑꦀ-ꦂ꦳ꦶ-ꦹꦼꧥꨩ-ꨮꨱ-ꨲꨵ-ꨶꩃꩌꩼꪰꪲ-ꪴꪷ-ꪸꪾ-꪿꫁ꫬ-ꫭ꫶ꯥꯨ꯭ﬞ︀-️︠-゙︯-゚]"),fl=function(t){return"string"==typeof t&&t.charCodeAt(0)>=768&&dl.test(t)},hl=Tn,pl=Vo,ml=$n("display","block table"),gl=$n("float","left right"),vl=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){for(var n=0;n<t.length;n++)if(!t[n](e))return!1;return!0}}(hl,pl,L(gl)),yl=L($n("white-space","pre pre-line pre-wrap")),bl=Bn,_l=zn,wl=ys.nodeIndex,kl=function(t,e){return e<0&&Tn(t)&&t.hasChildNodes()?void 0:cl(t,e)},Cl=function(t){return"createRange"in t?t.createRange():ys.DOM.createRng()},xl=function(t){return t&&/[\r\n\t ]/.test(t)},Sl=function(t){return!!t.setStart&&!!t.setEnd},Ol=function(t){var e=t.startContainer,n=t.startOffset;if(xl(t.toString())&&yl(e.parentNode)&&Bn(e)){var r=e.data;if(xl(r[n-1])||xl(r[n+1]))return!0}return!1},El=function(t){return 0===t.left&&0===t.right&&0===t.top&&0===t.bottom},Dl=function(t){var e,n=t.getClientRects();return e=n.length>0?rl(n[0]):rl(t.getBoundingClientRect()),!Sl(t)&&_l(t)&&El(e)?function(t){var e=t.ownerDocument,n=Cl(e),r=e.createTextNode(_o),o=t.parentNode;o.insertBefore(r,t),n.setStart(r,0),n.setEnd(r,1);var i=rl(n.getBoundingClientRect());return o.removeChild(r),i}(t):El(e)&&Sl(t)?function(t){var e=t.startContainer,n=t.endContainer,r=t.startOffset,o=t.endOffset;if(e===n&&Bn(n)&&0===r&&1===o){var i=t.cloneRange();return i.setEndAfter(n),Dl(i)}return null}(t):e},Ll=function(t,e){var n=ol(t,e);return n.width=1,n.right=n.left+1,n},Al=function(t){var e=[],n=function(t){var n,r;0!==t.height&&(e.length>0&&(n=t,r=e[e.length-1],n.left===r.left&&n.top===r.top&&n.bottom===r.bottom&&n.right===r.right)||e.push(t))},r=function(t,r){var o=Cl(t.ownerDocument);if(r<t.data.length){if(fl(t.data[r]))return e;if(fl(t.data[r-1])&&(o.setStart(t,r),o.setEnd(t,r+1),!Ol(o)))return n(Ll(Dl(o),!1)),e}r>0&&(o.setStart(t,r-1),o.setEnd(t,r),Ol(o)||n(Ll(Dl(o),!1))),r<t.data.length&&(o.setStart(t,r),o.setEnd(t,r+1),Ol(o)||n(Ll(Dl(o),!0)))},o=t.container(),i=t.offset();if(bl(o))return r(o,i),e;if(hl(o))if(t.isAtEnd()){var a=kl(o,i);bl(a)&&r(a,a.data.length),vl(a)&&!_l(a)&&n(Ll(Dl(a),!1))}else{a=kl(o,i);if(bl(a)&&r(a,0),vl(a)&&t.isAtEnd())return n(Ll(Dl(a),!1)),e;var s=kl(t.container(),t.offset()-1);vl(s)&&!_l(s)&&(ml(s)||ml(a)||!vl(a))&&n(Ll(Dl(s),!1)),vl(a)&&n(Ll(Dl(a),!0))}return e},Tl=function(t,e,n){var r=function(){return n||(n=Al(Tl(t,e))),n};return{container:S(t),offset:S(e),toRange:function(){var n=Cl(t.ownerDocument);return n.setStart(t,e),n.setEnd(t,e),n},getClientRects:r,isVisible:function(){return r().length>0},isAtStart:function(){return bl(t),0===e},isAtEnd:function(){return bl(t)?e>=t.data.length:e>=t.childNodes.length},isEqual:function(n){return n&&t===n.container()&&e===n.offset()},getNode:function(n){return kl(t,n?e-1:e)}}};Tl.fromRangeStart=function(t){return Tl(t.startContainer,t.startOffset)},Tl.fromRangeEnd=function(t){return Tl(t.endContainer,t.endOffset)},Tl.after=function(t){return Tl(t.parentNode,wl(t)+1)},Tl.before=function(t){return Tl(t.parentNode,wl(t))},Tl.isAbove=function(t,e){return Gn(at(e.getClientRects()),st(t.getClientRects()),al).getOr(!1)},Tl.isBelow=function(t,e){return Gn(st(e.getClientRects()),at(t.getClientRects()),sl).getOr(!1)},Tl.isAtStart=function(t){return!!t&&t.isAtStart()},Tl.isAtEnd=function(t){return!!t&&t.isAtEnd()},Tl.isTextPosition=function(t){return!!t&&Bn(t.container())},Tl.isElementPosition=function(t){return!1===Tl.isTextPosition(t)};var Nl,$l=function(t,e){Bn(e)&&0===e.data.length&&t.remove(e)},Il=function(t,e,n){Un(n)?function(t,e,n){var r=M.from(n.firstChild),o=M.from(n.lastChild);e.insertNode(n),r.each((function(e){return $l(t,e.previousSibling)})),o.each((function(e){return $l(t,e.nextSibling)}))}(t,e,n):function(t,e,n){e.insertNode(n),$l(t,n.previousSibling),$l(t,n.nextSibling)}(t,e,n)},Pl=Bn,jl=Pn,Ml=ys.nodeIndex,Rl=function(t){var e=t.parentNode;return jl(e)?Rl(e):e},Bl=function(t){return t?Et(t.childNodes,(function(t,e){return jl(e)&&"BR"!==e.nodeName?t=t.concat(Bl(e)):t.push(e),t}),[]):[]},ql=function(t){return function(e){return t===e}},Fl=function(t){return(Pl(t)?"text()":t.nodeName.toLowerCase())+"["+function(t){var e,n;e=Bl(Rl(t)),n=Dt(e,ql(t),t),e=e.slice(0,n+1);var r=Et(e,(function(t,n,r){return Pl(n)&&Pl(e[r-1])&&t++,t}),0);return e=St(e,Nn([t.nodeName])),(n=Dt(e,ql(t),t))-r}(t)+"]"},Ul=function(t,e){var n,r,o,i,a,s=[];return n=e.container(),r=e.offset(),Pl(n)?o=function(t,e){for(;(t=t.previousSibling)&&Pl(t);)e+=t.data.length;return e}(n,r):(r>=(i=n.childNodes).length?(o="after",r=i.length-1):o="before",n=i[r]),s.push(Fl(n)),a=function(t,e,n){var r=[];for(e=e.parentNode;!(e===t||n&&n(e));e=e.parentNode)r.push(e);return r}(t,n),a=St(a,L(Pn)),(s=s.concat(xt(a,(function(t){return Fl(t)})))).reverse().join("/")+","+o},zl=function(t,e){var n;if(!e)return null;var r=e.split(","),o=r[0].split("/");n=r.length>1?r[1]:"before";var i=Et(o,(function(t,e){var n=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(e);return n?("text()"===n[1]&&(n[1]="#text"),function(t,e,n){var r=Bl(t);return r=St(r,(function(t,e){return!Pl(t)||!Pl(r[e-1])})),(r=St(r,Nn([e])))[n]}(t,n[1],parseInt(n[2],10))):null}),t);return i?Pl(i)?function(t,e){for(var n,r=t,o=0;Pl(r);){if(n=r.data.length,e>=o&&e<=o+n){t=r,e-=o;break}if(!Pl(r.nextSibling)){t=r,e=n;break}o+=n,r=r.nextSibling}return Pl(t)&&e>t.data.length&&(e=t.data.length),Tl(t,e)}(i,parseInt(n,10)):(n="after"===n?Ml(i)+1:Ml(i),Tl(i.parentNode,n)):null},Hl=Wn,Vl=function(t,e,n,r,o){var i,a=r[o?"startContainer":"endContainer"],s=r[o?"startOffset":"endOffset"],l=[],u=0,c=t.getRoot();for(Bn(a)?l.push(n?function(t,e,n){var r,o;for(o=t(e.data.slice(0,n)).length,r=e.previousSibling;r&&Bn(r);r=r.previousSibling)o+=t(r.data).length;return o}(e,a,s):s):(s>=(i=a.childNodes).length&&i.length&&(u=1,s=Math.max(0,i.length-1)),l.push(t.nodeIndex(i[s],n)+u));a&&a!==c;a=a.parentNode)l.push(t.nodeIndex(a,n));return l},Wl=function(t,e,n){var r=0;return De.each(t.select(e),(function(t){if("all"!==t.getAttribute("data-mce-bogus"))return t!==n&&void r++})),r},Kl=function(t,e){var n,r,o,i=e?"start":"end";n=t[i+"Container"],r=t[i+"Offset"],Tn(n)&&"TR"===n.nodeName&&(n=(o=n.childNodes)[Math.min(e?r:r-1,o.length-1)])&&(r=e?0:n.childNodes.length,t["set"+(e?"Start":"End")](n,r))},Yl=function(t){return Kl(t,!0),Kl(t,!1),t},Zl=function(t,e){var n;if(Tn(t)&&(t=cl(t,e),Hl(t)))return t;if(Do(t)){if(Bn(t)&&Oo(t)&&(t=t.parentNode),n=t.previousSibling,Hl(n))return n;if(n=t.nextSibling,Hl(n))return n}},Gl=function(t,e,n){var r=n.getNode(),o=r?r.nodeName:null,i=n.getRng();if(Hl(r)||"IMG"===o)return{name:o,index:Wl(n.dom,o,r)};var a=function(t){return Zl(t.startContainer,t.startOffset)||Zl(t.endContainer,t.endOffset)}(i);return a?{name:o=a.tagName,index:Wl(n.dom,o,a)}:function(t,e,n,r){var o=e.dom,i={};return i.start=Vl(o,t,n,r,!0),e.isCollapsed()||(i.end=Vl(o,t,n,r,!1)),jo(r)&&(i.isFakeCaret=!0),i}(t,n,e,i)},Xl=function(t,e,n){var r={"data-mce-type":"bookmark",id:e,style:"overflow:hidden;line-height:0px"};return n?t.create("span",r,""):t.create("span",r)},Ql=function(t,e){var n=t.dom,r=t.getRng(),o=n.uniqueId(),i=t.isCollapsed(),a=t.getNode(),s=a.nodeName;if("IMG"===s)return{name:s,index:Wl(n,s,a)};var l=Yl(r.cloneRange());if(!i){l.collapse(!1);var u=Xl(n,o+"_end",e);Il(n,l,u)}(r=Yl(r)).collapse(!0);var c=Xl(n,o+"_start",e);return Il(n,r,c),t.moveToBookmark({id:o,keep:!0}),{id:o}},Jl=function(t,e,n){return 2===e?Gl(Co,n,t):3===e?function(t){var e=t.getRng();return{start:Ul(t.dom.getRoot(),Tl.fromRangeStart(e)),end:Ul(t.dom.getRoot(),Tl.fromRangeEnd(e))}}(t):e?function(t){return{rng:t.getRng()}}(t):Ql(t,!1)},tu=D(Gl,O,!0),eu=ys.DOM,nu=function(t,e,n){var r=t.getParam(e,n);if(-1!==r.indexOf("=")){var o=t.getParam(e,"","hash");return bt(o,t.id).getOr(n)}return r},ru=function(t){return t.getParam("content_security_policy","")},ou=function(t){if(t.getParam("force_p_newlines",!1))return"p";var e=t.getParam("forced_root_block","p");return!1===e?"":!0===e?"p":e},iu=function(t){return t.getParam("forced_root_block_attrs",{})},au=function(t){return t.getParam("automatic_uploads",!0,"boolean")},su=function(t){return t.getParam("images_reuse_filename",!1,"boolean")},lu=function(t){return t.getParam("icons","","string")},uu=function(t){return t.getParam("images_upload_url","","string")},cu=function(t){return t.getParam("images_upload_base_path","","string")},du=function(t){return t.getParam("images_upload_credentials",!1,"boolean")},fu=function(t){return t.getParam("images_upload_handler",null,"function")},hu=function(t){return t.getParam("content_css_cors",!1,"boolean")},pu=function(t){return t.getParam("referrer_policy","","string")},mu=function(t){return t.getParam("language","en","string")},gu=function(t){return t.getParam("indent_use_margin",!1)},vu=function(t){var e=t.getParam("font_css",[]);return p(e)?e:H(e.split(","),qt)},yu=function(t){var e=t.getParam("object_resizing");return!1!==e&&!Ce.iOS&&(f(e)?e:"table,img,figure.image,div,video,iframe")},bu=function(t){return t.getParam("event_root")},_u=function(t){return t.getParam("theme")},wu=function(t){return t.getParam("validate")},ku=function(t){return!1!==t.getParam("inline_boundaries")},Cu=function(t){return t.getParam("content_css_cors")},xu=function(t){return t.getParam("plugins","","string")},Su=Tn,Ou=Bn,Eu=function(t){var e=t.parentNode;e&&e.removeChild(t)},Du=function(t){var e=Co(t);return{count:t.length-e.length,text:e}},Lu=function(t){for(var e;-1!==(e=t.data.lastIndexOf(wo));)t.deleteData(e,1)},Au=function(t,e){return Iu(t),e},Tu=function(t,e){var n=e.container(),r=function(t,e){var n=F(t,e);return-1===n?M.none():M.some(n)}(lt(n.childNodes),t).map((function(t){return t<e.offset()?Tl(n,e.offset()-1):e})).getOr(e);return Iu(t),r},Nu=function(t,e){return Ou(t)&&e.container()===t?function(t,e){var n=Du(t.data.substr(0,e.offset())),r=Du(t.data.substr(e.offset()));return(n.text+r.text).length>0?(Lu(t),Tl(t,e.offset()-n.count)):e}(t,e):Au(t,e)},$u=function(t,e){return Tl.isTextPosition(e)?Nu(t,e):function(t,e){return e.container()===t.parentNode?Tu(t,e):Au(t,e)}(t,e)},Iu=function(t){Su(t)&&Do(t)&&(Lo(t)?t.removeAttribute("data-mce-caret"):Eu(t)),Ou(t)&&(Lu(t),0===t.data.length&&Eu(t))},Pu=pe().browser,ju=Wn,Mu=Yn,Ru=Kn,Bu=function(t,e,n){var r,o,i=ol(e.getBoundingClientRect(),n);if("BODY"===t.tagName){var a=t.ownerDocument.documentElement;r=t.scrollLeft||a.scrollLeft,o=t.scrollTop||a.scrollTop}else{var s=t.getBoundingClientRect();r=t.scrollLeft-s.left,o=t.scrollTop-s.top}i.left+=r,i.right+=r,i.top+=o,i.bottom+=o,i.width=1;var l=e.offsetWidth-e.clientWidth;return l>0&&(n&&(l*=-1),i.left+=l,i.right+=l),i},qu=function(t,e,n,r){var o,i,a=Ls(),s=ou(t),l=s.length>0?s:"p",u=function(){!function(t){for(var e=qs(Ae.fromDom(t),"*[contentEditable=false],video,audio,embed,object"),n=0;n<e.length;n++){var r,o=e[n].dom,i=o.previousSibling;Io(i)&&(1===(r=i.data).length?i.parentNode.removeChild(i):i.deleteData(r.length-1,1)),i=o.nextSibling,$o(i)&&(1===(r=i.data).length?i.parentNode.removeChild(i):i.deleteData(0,1))}}(e),i&&(Iu(i),i=null),a.on((function(t){ds(t.caret).remove(),a.clear()})),o&&(oo.clearInterval(o),o=void 0)},c=function(){o=oo.setInterval((function(){r()?ds("div.mce-visual-caret",e).toggleClass("mce-visual-caret-hidden"):ds("div.mce-visual-caret",e).addClass("mce-visual-caret-hidden")}),500)};return{show:function(t,r){var o;if(u(),Ru(r))return null;if(!n(r))return i=function(t,e){var n=t.ownerDocument.createTextNode(wo),r=t.parentNode;if(e){if(o=t.previousSibling,So(o)){if(Do(o))return o;if(Io(o))return o.splitText(o.data.length-1)}r.insertBefore(n,t)}else{var o=t.nextSibling;if(So(o)){if(Do(o))return o;if($o(o))return o.splitText(1),o}t.nextSibling?r.insertBefore(n,t.nextSibling):r.appendChild(n)}return n}(r,t),o=r.ownerDocument.createRange(),Uu(i.nextSibling)?(o.setStart(i,0),o.setEnd(i,0)):(o.setStart(i,1),o.setEnd(i,1)),o;i=No(l,r,t);var s=Bu(e,r,t);ds(i).css("top",s.top);var d=ds('<div class="mce-visual-caret" data-mce-bogus="all"></div>').css(At({},s)).appendTo(e)[0];return a.set({caret:d,element:r,before:t}),t&&ds(d).addClass("mce-visual-caret-before"),c(),(o=r.ownerDocument.createRange()).setStart(i,0),o.setEnd(i,0),o},hide:u,getCss:function(){return".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}"},reposition:function(){a.on((function(t){var n=Bu(e,t.element,t.before);ds(t.caret).css(At({},n))}))},destroy:function(){return oo.clearInterval(o)}}},Fu=function(){return Pu.isIE()||Pu.isEdge()||Pu.isFirefox()},Uu=function(t){return ju(t)||Mu(t)},zu=function(t){return Uu(t)||jn(t)&&Fu()},Hu=Wn,Vu=Yn,Wu=$n("display","block table table-cell table-caption list-item"),Ku=Do,Yu=Oo,Zu=Tn,Gu=Vo,Xu=function(t){return t>0},Qu=function(t){return t<0},Ju=function(t,e){for(var n;n=t(e);)if(!Yu(n))return n;return null},tc=function(t,e,n,r,o){var i=new so(t,r),a=Hu(t)||Yu(t);if(Qu(e)){if(a&&n(t=Ju(i.prev.bind(i),!0)))return t;for(;t=Ju(i.prev.bind(i),o);)if(n(t))return t}if(Xu(e)){if(a&&n(t=Ju(i.next.bind(i),!0)))return t;for(;t=Ju(i.next.bind(i),o);)if(n(t))return t}return null},ec=function(t,e){for(;t&&t!==e;){if(Wu(t))return t;t=t.parentNode}return null},nc=function(t,e,n){return ec(t.container(),n)===ec(e.container(),n)},rc=function(t,e){if(!e)return null;var n=e.container(),r=e.offset();return Zu(n)?n.childNodes[r+t]:null},oc=function(t,e){var n=e.ownerDocument.createRange();return t?(n.setStartBefore(e),n.setEndBefore(e)):(n.setStartAfter(e),n.setEndAfter(e)),n},ic=function(t,e,n){return ec(e,t)===ec(n,t)},ac=function(t,e,n){for(var r=t?"previousSibling":"nextSibling";n&&n!==e;){var o=n[r];if(Ku(o)&&(o=o[r]),Hu(o)||Vu(o)){if(ic(e,o,n))return o;break}if(Gu(o))break;n=n.parentNode}return null},sc=D(oc,!0),lc=D(oc,!1),uc=function(t,e,n){var r,o=D(ac,!0,e),i=D(ac,!1,e),a=n.startContainer,s=n.startOffset;if(Oo(a)){Zu(a)||(a=a.parentNode);var l=a.getAttribute("data-mce-caret");if("before"===l&&(r=a.nextSibling,zu(r)))return sc(r);if("after"===l&&(r=a.previousSibling,zu(r)))return lc(r)}if(!n.collapsed)return n;if(Bn(a)){if(Ku(a)){if(1===t){if(r=i(a))return sc(r);if(r=o(a))return lc(r)}if(-1===t){if(r=o(a))return lc(r);if(r=i(a))return sc(r)}return n}if(Io(a)&&s>=a.data.length-1)return 1===t&&(r=i(a))?sc(r):n;if($o(a)&&s<=1)return-1===t&&(r=o(a))?lc(r):n;if(s===a.data.length)return(r=i(a))?sc(r):n;if(0===s)return(r=o(a))?lc(r):n}return n},cc=function(t,e){return M.from(rc(t?0:-1,e)).filter(Hu)},dc=function(t,e,n){var r=uc(t,e,n);return-1===t?Tl.fromRangeStart(r):Tl.fromRangeEnd(r)},fc=function(t){return M.from(t.getNode()).map(Ae.fromDom)},hc=function(t,e){for(;e=t(e);)if(e.isVisible())return e;return e},pc=function(t,e){var n=nc(t,e);return!(n||!zn(t.getNode()))||n};!function(t){t[t.Backwards=-1]="Backwards",t[t.Forwards=1]="Forwards"}(Nl||(Nl={}));var mc,gc=Wn,vc=Bn,yc=Tn,bc=zn,_c=Vo,wc=function(t){return Uo(t)||function(t){return!!Wo(t)&&!0!==G(lt(t.getElementsByTagName("*")),(function(t,e){return t||Mo(e)}),!1)}(t)},kc=Ko,Cc=function(t,e){return t.hasChildNodes()&&e<t.childNodes.length?t.childNodes[e]:null},xc=function(t,e){if(Xu(t)){if(_c(e.previousSibling)&&!vc(e.previousSibling))return Tl.before(e);if(vc(e))return Tl(e,0)}if(Qu(t)){if(_c(e.nextSibling)&&!vc(e.nextSibling))return Tl.after(e);if(vc(e))return Tl(e,e.data.length)}return Qu(t)?bc(e)?Tl.before(e):Tl.after(e):Tl.before(e)},Sc=function(t,e,n){var r,o,i,a;if(!yc(n)||!e)return null;if(e.isEqual(Tl.after(n))&&n.lastChild){if(a=Tl.after(n.lastChild),Qu(t)&&_c(n.lastChild)&&yc(n.lastChild))return bc(n.lastChild)?Tl.before(n.lastChild):a}else a=e;var s=a.container(),l=a.offset();if(vc(s)){if(Qu(t)&&l>0)return Tl(s,--l);if(Xu(t)&&l<s.length)return Tl(s,++l);r=s}else{if(Qu(t)&&l>0&&(o=Cc(s,l-1),_c(o)))return!wc(o)&&(i=tc(o,t,kc,o))?vc(i)?Tl(i,i.data.length):Tl.after(i):vc(o)?Tl(o,o.data.length):Tl.before(o);if(Xu(t)&&l<s.childNodes.length&&(o=Cc(s,l),_c(o)))return bc(o)?function(t,e){var n=e.nextSibling;return n&&_c(n)?vc(n)?Tl(n,0):Tl.before(n):Sc(Nl.Forwards,Tl.after(e),t)}(n,o):!wc(o)&&(i=tc(o,t,kc,o))?vc(i)?Tl(i,0):Tl.before(i):vc(o)?Tl(o,0):Tl.after(o);r=o||a.getNode()}if((Xu(t)&&a.isAtEnd()||Qu(t)&&a.isAtStart())&&(r=tc(r,t,$,n,!0),kc(r,n)))return xc(t,r);o=tc(r,t,kc,n);var u=Lt(Y(function(t,e){for(var n=[];t&&t!==e;)n.push(t),t=t.parentNode;return n}(s,n),gc));return!u||o&&u.contains(o)?o?xc(t,o):null:a=Xu(t)?Tl.after(u):Tl.before(u)},Oc=function(t){return{next:function(e){return Sc(Nl.Forwards,e,t)},prev:function(e){return Sc(Nl.Backwards,e,t)}}},Ec=function(t){return Tl.isTextPosition(t)?0===t.offset():Vo(t.getNode())},Dc=function(t){if(Tl.isTextPosition(t)){var e=t.container();return t.offset()===e.data.length}return Vo(t.getNode(!0))},Lc=function(t,e){return!Tl.isTextPosition(t)&&!Tl.isTextPosition(e)&&t.getNode()===e.getNode(!0)},Ac=function(t,e,n){return t?!Lc(e,n)&&(r=e,!(!Tl.isTextPosition(r)&&zn(r.getNode())))&&Dc(e)&&Ec(n):!Lc(n,e)&&Ec(e)&&Dc(n);var r},Tc=function(t,e,n){var r=Oc(e);return M.from(t?r.next(n):r.prev(n))},Nc=function(t,e,n){return Tc(t,e,n).bind((function(r){return nc(n,r,e)&&Ac(t,n,r)?Tc(t,e,r):M.some(r)}))},$c=function(t,e,n,r){return Nc(t,e,n).bind((function(n){return r(n)?$c(t,e,n,r):M.some(n)}))},Ic=function(t,e){var n,r=t?e.firstChild:e.lastChild;return Bn(r)?M.some(Tl(r,t?0:r.data.length)):r?Vo(r)?M.some(t?Tl.before(r):zn(n=r)?Tl.before(n):Tl.after(n)):function(t,e,n){var r=t?Tl.before(n):Tl.after(n);return Tc(t,e,r)}(t,e,r):M.none()},Pc=D(Tc,!0),jc=D(Tc,!1),Mc=D(Ic,!0),Rc=D(Ic,!1),Bc="_mce_caret",qc=function(t){return Tn(t)&&t.id===Bc},Fc=function(t,e){for(;e&&e!==t;){if(e.id===Bc)return e;e=e.parentNode}return null},Uc=function(t){return De.isArray(t.start)},zc=function(t,e){return Tn(e)&&t.isBlock(e)&&!e.innerHTML&&!Ce.ie&&(e.innerHTML='<br data-mce-bogus="1" />'),e},Hc=function(t,e){return Rc(t).fold(N,(function(t){return e.setStart(t.container(),t.offset()),e.setEnd(t.container(),t.offset()),!0}))},Vc=function(t,e,n){return!(!function(t){return!1===t.hasChildNodes()}(e)||!Fc(t,e))&&(function(t,e){var n=t.ownerDocument.createTextNode(wo);t.appendChild(n),e.setStart(n,0),e.setEnd(n,0)}(e,n),!0)},Wc=function(t,e,n,r){var o,i,a,s,l=n[e?"start":"end"],u=t.getRoot();if(l){for(a=l[0],i=u,o=l.length-1;o>=1;o--){if(s=i.childNodes,Vc(u,i,r))return!0;if(l[o]>s.length-1)return!!Vc(u,i,r)||Hc(i,r);i=s[l[o]]}3===i.nodeType&&(a=Math.min(l[0],i.nodeValue.length)),1===i.nodeType&&(a=Math.min(l[0],i.childNodes.length)),e?r.setStart(i,a):r.setEnd(i,a)}return!0},Kc=function(t){return Bn(t)&&t.data.length>0},Yc=function(t,e,n){var r,o,i,a,s,l,u=t.get(n.id+"_"+e),c=n.keep;if(u){if(r=u.parentNode,"start"===e?(c?u.hasChildNodes()?(r=u.firstChild,o=1):Kc(u.nextSibling)?(r=u.nextSibling,o=0):Kc(u.previousSibling)?(r=u.previousSibling,o=u.previousSibling.data.length):(r=u.parentNode,o=t.nodeIndex(u)+1):o=t.nodeIndex(u),s=r,l=o):(c?u.hasChildNodes()?(r=u.firstChild,o=1):Kc(u.previousSibling)?(r=u.previousSibling,o=u.previousSibling.data.length):(r=u.parentNode,o=t.nodeIndex(u)):o=t.nodeIndex(u),s=r,l=o),!c){for(a=u.previousSibling,i=u.nextSibling,De.each(De.grep(u.childNodes),(function(t){Bn(t)&&(t.nodeValue=t.nodeValue.replace(/\uFEFF/g,""))}));u=t.get(n.id+"_"+e);)t.remove(u,!0);a&&i&&a.nodeType===i.nodeType&&Bn(a)&&!Ce.opera&&(o=a.nodeValue.length,a.appendData(i.nodeValue),t.remove(i),s=a,l=o)}return M.some(Tl(s,l))}return M.none()},Zc=function(t,e){var n=t.dom;if(e){if(Uc(e))return function(t,e){var n=t.createRng();return Wc(t,!0,e,n)&&Wc(t,!1,e,n)?M.some(n):M.none()}(n,e);if(function(t){return f(t.start)}(e))return M.some(function(t,e){var n,r=t.createRng();return n=zl(t.getRoot(),e.start),r.setStart(n.container(),n.offset()),n=zl(t.getRoot(),e.end),r.setEnd(n.container(),n.offset()),r}(n,e));if(function(t){return _t(t,"id")}(e))return function(t,e){var n=Yc(t,"start",e),r=Yc(t,"end",e);return Gn(n,r.or(n),(function(e,n){var r=t.createRng();return r.setStart(zc(t,e.container()),e.offset()),r.setEnd(zc(t,n.container()),n.offset()),r}))}(n,e);if(function(t){return _t(t,"name")}(e))return function(t,e){return M.from(t.select(e.name)[e.index]).map((function(e){var n=t.createRng();return n.selectNode(e),n}))}(n,e);if(function(t){return _t(t,"rng")}(e))return M.some(e.rng)}return M.none()},Gc=function(t,e,n){return Jl(t,e,n)},Xc=function(t,e){Zc(t,e).each((function(e){t.setRng(e)}))},Qc=function(t){return Tn(t)&&"SPAN"===t.tagName&&"bookmark"===t.getAttribute("data-mce-type")},Jc=(mc=_o,function(t){return mc===t}),td=function(t){return""!==t&&-1!==" \f\n\r\t\v".indexOf(t)},ed=function(t){return!td(t)&&!Jc(t)},nd=function(t){return!!t.nodeType},rd=function(t,e,n){var r=n.startOffset,o=n.startContainer;if((o!==n.endContainer||!function(t){return t&&/^(IMG)$/.test(t.nodeName)}(o.childNodes[r]))&&Tn(o)){var i=o.childNodes,a=void 0;r<i.length?(o=i[r],a=new so(o,t.getParent(o,t.isBlock))):(o=i[i.length-1],(a=new so(o,t.getParent(o,t.isBlock))).next(!0));for(var s=a.current();s;s=a.next())if(Bn(s)&&!sd(s))return n.setStart(s,0),void e.setRng(n)}},od=function(t,e,n){if(t){var r=e?"nextSibling":"previousSibling";for(t=n?t:t[r];t;t=t[r])if(Tn(t)||!sd(t))return t}},id=function(t,e){return nd(e)&&(e=e.nodeName),!!t.schema.getTextBlockElements()[e.toLowerCase()]},ad=function(t,e,n){return t.schema.isValidChild(e,n)},sd=function(t,e){if(void 0===e&&(e=!1),b(t)&&Bn(t)){var n=e?t.data.replace(/ /g," "):t.data;return Zo(n)}return!1},ld=function(t,e){return _(t)?t=t(e):b(e)&&(t=t.replace(/%(\w+)/g,(function(t,n){return e[n]||t}))),t},ud=function(t,e){return e=e||"",t=""+((t=t||"").nodeName||t),e=""+(e.nodeName||e),t.toLowerCase()===e.toLowerCase()},cd=function(t,e,n){return"color"!==n&&"backgroundColor"!==n||(e=t.toHex(e)),"fontWeight"===n&&700===e&&(e="bold"),"fontFamily"===n&&(e=e.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),""+e},dd=function(t,e,n){return cd(t,t.getStyle(e,n),n)},fd=function(t,e){var n;return t.getParent(e,(function(e){return(n=t.getStyle(e,"text-decoration"))&&"none"!==n})),n},hd=function(t,e,n){return t.getParents(e,n,t.getRoot())},pd=function(t,e,n){var r=["inline","block","selector","attributes","styles","classes"],o=function(t){return vt(t,(function(t,e){return z(r,(function(t){return t===e}))}))};return z(t.formatter.get(e),(function(e){var r=o(e);return z(t.formatter.get(n),(function(t){var e=o(t);return function(t,e,n){return void 0===n&&(n=l),s(n).eq(t,e)}(r,e)}))}))},md=function(t){return wt(t,"block")},gd=function(t){return wt(t,"selector")},vd=function(t){return wt(t,"inline")},yd=function(t){return gd(t)&&!1!==t.expand&&!vd(t)},bd=Qc,_d=hd,wd=sd,kd=id,Cd=function(t,e){for(var n=e;n;){if(Tn(n)&&t.getContentEditable(n))return"false"===t.getContentEditable(n)?n:e;n=n.parentNode}return e},xd=function(t,e,n,r){for(var o=e.data,i=n;t?i>=0:i<o.length;t?i--:i++)if(r(o.charAt(i)))return t?i+1:i;return-1},Sd=function(t,e,n){return xd(t,e,n,(function(t){return Jc(t)||td(t)}))},Od=function(t,e,n){return xd(t,e,n,ed)},Ed=function(t,e,n,r,o,i){var a,s=t.getParent(n,t.isBlock)||e,l=function(e,n,r){var i=el(t),l=o?i.backwards:i.forwards;return M.from(l(e,n,(function(t,e){return bd(t.parentNode)?-1:(a=t,r(o,t,e))}),s))};return l(n,r,Sd).bind((function(t){return i?l(t.container,t.offset+(o?-1:0),Od):M.some(t)})).orThunk((function(){return a?M.some({container:a,offset:o?0:a.length}):M.none()}))},Dd=function(t,e,n,r,o){Bn(r)&&Ht(r.data)&&r[o]&&(r=r[o]);for(var i=_d(t,r),a=0;a<i.length;a++)for(var s=0;s<e.length;s++){var l=e[s];if((!b(l.collapsed)||l.collapsed===n.collapsed)&&(gd(l)&&t.is(i[a],l.selector)))return i[a]}return r},Ld=function(t,e,n,r){var o=n,i=t.dom,a=i.getRoot(),s=e[0];if(md(s)&&(o=s.wrapper?null:i.getParent(n,s.block,a)),!o){var l=i.getParent(n,"LI,TD,TH");o=i.getParent(Bn(n)?n.parentNode:n,(function(e){return e!==a&&kd(t,e)}),l)}if(o&&md(s)&&s.wrapper&&(o=_d(i,o,"ul,ol").reverse()[0]||o),!o)for(o=n;o[r]&&!i.isBlock(o[r])&&(o=o[r],!ud(o,"br")););return o||n},Ad=function(t,e,n,r){var o=n.parentNode;return!b(n[r])&&(!(o!==e&&!y(o)&&!t.isBlock(o))||Ad(t,e,o,r))},Td=function(t,e,n,r,o){var i,a=n,s=o?"previousSibling":"nextSibling",l=t.getRoot();if(Bn(n)&&!wd(n)&&(o?r>0:r<n.data.length))return n;for(;;){if(!e[0].block_expand&&t.isBlock(a))return a;for(var u=a[s];u;u=u[s]){var c=Bn(u)&&!Ad(t,l,u,s);if(!bd(u)&&(!zn(i=u)||!i.getAttribute("data-mce-bogus")||i.nextSibling)&&!wd(u,c))return a}if(a===l||a.parentNode===l){n=a;break}a=a.parentNode}return n},Nd=function(t){return bd(t.parentNode)||bd(t)},$d=function(t,e,n,r){void 0===r&&(r=!1);var o=e.startContainer,i=e.startOffset,a=e.endContainer,s=e.endOffset,l=t.dom,u=n[0];(Tn(o)&&o.hasChildNodes()&&(o=cl(o,i),Bn(o)&&(i=0)),Tn(a)&&a.hasChildNodes()&&(a=cl(a,e.collapsed?s:s-1),Bn(a)&&(s=a.nodeValue.length)),o=Cd(l,o),a=Cd(l,a),Nd(o)&&(o=bd(o)?o:o.parentNode,o=e.collapsed?o.previousSibling||o:o.nextSibling||o,Bn(o)&&(i=e.collapsed?o.length:0)),Nd(a)&&(a=bd(a)?a:a.parentNode,a=e.collapsed?a.nextSibling||a:a.previousSibling||a,Bn(a)&&(s=e.collapsed?0:a.length)),e.collapsed)&&(Ed(l,t.getBody(),o,i,!0,r).each((function(t){var e=t.container,n=t.offset;o=e,i=n})),Ed(l,t.getBody(),a,s,!1,r).each((function(t){var e=t.container,n=t.offset;a=e,s=n})));return(vd(u)||u.block_expand)&&(vd(u)&&Bn(o)&&0!==i||(o=Td(l,n,o,i,!0)),vd(u)&&Bn(a)&&s!==a.nodeValue.length||(a=Td(l,n,a,s,!1))),yd(u)&&(o=Dd(l,n,e,o,"previousSibling"),a=Dd(l,n,e,a,"nextSibling")),(md(u)||gd(u))&&(o=Ld(t,n,o,"previousSibling"),a=Ld(t,n,a,"nextSibling"),md(u)&&(l.isBlock(o)||(o=Td(l,n,o,i,!0)),l.isBlock(a)||(a=Td(l,n,a,s,!1)))),Tn(o)&&(i=l.nodeIndex(o),o=o.parentNode),Tn(a)&&(s=l.nodeIndex(a)+1,a=a.parentNode),{startContainer:o,startOffset:i,endContainer:a,endOffset:s}},Id=function(t,e,n){var r=e.startOffset,o=cl(e.startContainer,r),i=e.endOffset,a=cl(e.endContainer,i-1),s=function(t){var e=t[0];Bn(e)&&e===o&&r>=e.data.length&&t.splice(0,1);var n=t[t.length-1];return 0===i&&t.length>0&&n===a&&Bn(n)&&t.splice(t.length-1,1),t},l=function(t,e,n){for(var r=[];t&&t!==n;t=t[e])r.push(t);return r},u=function(e,n){return t.getParent(e,(function(t){return t.parentNode===n}),n)},c=function(t,e,r){for(var o=r?"nextSibling":"previousSibling",i=t,a=i.parentNode;i&&i!==e;i=a){a=i.parentNode;var u=l(i===t?i:i[o],o);u.length&&(r||u.reverse(),n(s(u)))}};if(o===a)return n(s([o]));var d=t.findCommonAncestor(o,a);if(t.isChildOf(o,a))return c(o,d,!0);if(t.isChildOf(a,o))return c(a,d);var f=u(o,d)||o,h=u(a,d)||a;c(o,f,!0);var p=l(f===o?f:f.nextSibling,"nextSibling",h===a?h.nextSibling:h);p.length&&n(s(p)),c(a,h)},Pd=function(t){var e=[];if(t)for(var n=0;n<t.rangeCount;n++)e.push(t.getRangeAt(n));return e},jd=function(t){return Y(function(t){return tt(t,(function(t){var e=ul(t);return e?[Ae.fromDom(e)]:[]}))}(t),yo)},Md=function(t,e){var n=qs(e,"td[data-mce-selected],th[data-mce-selected]");return n.length>0?n:jd(t)},Rd=function(t){return Md(Pd(t.selection.getSel()),Ae.fromDom(t.getBody()))},Bd=function(t,e){return Xr(t,"table",e)},qd=function(t){return tn(t).fold(S([t]),(function(e){return[t].concat(qd(e))}))},Fd=function(t){return en(t).fold(S([t]),(function(e){return"br"===Me(e)?Ye(e).map((function(e){return[t].concat(Fd(e))})).getOr([]):[t].concat(Fd(e))}))},Ud=function(t,e){return Gn(function(t){var e=t.startContainer,n=t.startOffset;return Bn(e)?0===n?M.some(Ae.fromDom(e)):M.none():M.from(e.childNodes[n]).map(Ae.fromDom)}(e),function(t){var e=t.endContainer,n=t.endOffset;return Bn(e)?n===e.data.length?M.some(Ae.fromDom(e)):M.none():M.from(e.childNodes[n-1]).map(Ae.fromDom)}(e),(function(e,n){var r=Q(qd(t),D(Ie,e)),o=Q(Fd(t),D(Ie,n));return r.isSome()&&o.isSome()})).getOr(!1)},zd=function(t,e,n,r){var o=n,i=new so(n,o),a=vt(t.schema.getMoveCaretBeforeOnEnterElements(),(function(t,e){return!U(["td","th","table"],e.toLowerCase())}));do{if(Bn(n)&&0!==De.trim(n.nodeValue).length)return void(r?e.setStart(n,0):e.setEnd(n,n.nodeValue.length));if(a[n.nodeName])return void(r?e.setStartBefore(n):"BR"===n.nodeName?e.setEndBefore(n):e.setEndAfter(n))}while(n=r?i.next():i.prev());"BODY"===o.nodeName&&(r?e.setStart(o,0):e.setEnd(o,o.childNodes.length))},Hd=function(t){var e=t.selection.getSel();return e&&e.rangeCount>0},Vd=function(t,e){var n=Rd(t);n.length>0?V(n,(function(n){var r=n.dom,o=t.dom.createRng();o.setStartBefore(r),o.setEndAfter(r),e(o,!0)})):e(t.selection.getRng(),!1)},Wd=function(t,e,n){var r=Ql(t,e);n(r),t.moveToBookmark(r)},Kd=function(t,e){var n=function(e){return t(e)?M.from(e.dom.nodeValue):M.none()};return{get:function(r){if(!t(r))throw new Error("Can only get "+e+" value of a "+e+" node");return n(r).getOr("")},getOption:n,set:function(n,r){if(!t(n))throw new Error("Can only set raw "+e+" value of a "+e+" node");n.dom.nodeValue=r}}}(Fe,"text"),Yd=function(t){return Kd.get(t)},Zd=function(t,e,n,r){return Ke(e).fold((function(){return"skipping"}),(function(o){return"br"===r||function(t){return Fe(t)&&Yd(t)===wo}(e)?"valid":function(t){return qe(t)&&Rs(t,Fs())}(e)?"existing":qc(e.dom)?"caret":ad(t,n,r)&&ad(t,Me(o),n)?"valid":"invalid-child"}))},Gd=function(t,e,n,r){var o=e.uid,i=void 0===o?Zs("mce-annotation"):o,a=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}(e,["uid"]),s=Ae.fromTag("span",t);js(s,Fs()),Jn(s,""+zs(),i),Jn(s,""+Us(),n);var l=r(i,a),u=l.attributes,c=void 0===u?{}:u,d=l.classes,f=void 0===d?[]:d;return tr(s,c),function(t,e){V(e,(function(e){js(t,e)}))}(s,f),s},Xd=function(t,e,n,r,o){var i=[],a=Gd(t.getDoc(),o,n,r),s=Ls(),l=function(){s.clear()},u=function(t){V(t,c)},c=function(e){switch(Zd(t,e,"span",Me(e))){case"invalid-child":l();var n=Qe(e);u(n),l();break;case"valid":var r=s.get().getOrThunk((function(){var t=Qs(a);return i.push(t),s.set(t),t}));!function(t,e){dn(t,e),pn(e,t)}(e,r)}};return Id(t.dom,e,(function(t){l(),function(t){var e=H(t,Ae.fromDom);u(e)}(t)})),i},Qd=function(t,e,n,r){t.undoManager.transact((function(){var o=t.selection,i=o.getRng(),a=Rd(t).length>0;if(i.collapsed&&!a&&function(t,e){var n=$d(t,e,[{inline:"span"}]);e.setStart(n.startContainer,n.startOffset),e.setEnd(n.endContainer,n.endOffset),t.selection.setRng(e)}(t,i),o.getRng().collapsed&&!a){var s=Gd(t.getDoc(),r,e,n.decorate);Gs(s,_o),o.getRng().insertNode(s.dom),o.select(s.dom)}else Wd(o,!1,(function(){Vd(t,(function(o){Xd(t,o,e,n.decorate,r)}))}))}))},Jd=function(t){var e,n=(e={},{register:function(t,n){e[t]={name:t,settings:n}},lookup:function(t){return bt(e,t).map((function(t){return t.settings}))}});Ks(t,n);var r=Ws(t);return{register:function(t,e){n.register(t,e)},annotate:function(e,r){n.lookup(e).each((function(n){Qd(t,e,n,r)}))},annotationChanged:function(t,e){r.addListener(t,e)},remove:function(e){Hs(t,M.some(e)).each((function(t){var e=t.elements;V(e,yn)}))},getAll:function(e){var n=function(t,e){var n=Ae.fromDom(t.getBody()),r=qs(n,"["+Us()+'="'+e+'"]'),o={};return V(r,(function(t){var e=er(t,zs()),n=bt(o,e).getOr([]);o[e]=n.concat([t])})),o}(t,e);return ht(n,(function(t){return H(t,(function(t){return t.dom}))}))}}},tf=function(t){return{getBookmark:D(Gc,t),moveToBookmark:D(Xc,t)}};tf.isBookmarkNode=Qc;var ef=function(t,e){for(;e&&e!==t;){if(Vn(e)||Wn(e))return e;e=e.parentNode}return null},nf=function(t,e,n){if(n.collapsed)return!1;if(Ce.browser.isIE()&&n.startOffset===n.endOffset-1&&n.startContainer===n.endContainer){var r=n.startContainer.childNodes[n.startOffset];if(Tn(r))return z(r.getClientRects(),(function(n){return ll(n,t,e)}))}return z(n.getClientRects(),(function(n){return ll(n,t,e)}))},rf=function(t,e,n){return t.fire(e,n)},of=function(t,e,n,r){return t.fire("FormatApply",{format:e,node:n,vars:r})},af=function(t,e,n,r){return t.fire("FormatRemove",{format:e,node:n,vars:r})},sf={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,ESC:27,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,modifierPressed:function(t){return t.shiftKey||t.ctrlKey||t.altKey||sf.metaKeyPressed(t)},metaKeyPressed:function(t){return Ce.mac?t.metaKey:t.ctrlKey&&!t.altKey}},lf=Wn,uf=function(t,e){var n,r,o,i,a,s,l,u,c,d,f,h,p,m,g,v="data-mce-selected",y=e.dom,_=De.each,w=e.getDoc(),k=document,C=Math.abs,x=Math.round,S=e.getBody(),O={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]},E=function(t){return t&&("IMG"===t.nodeName||e.dom.is(t,"figure.image"))},D=function(t){return Yn(t)||y.hasClass(t,"mce-preview-object")},L=function(t){var n=t.target;(function(t,e){if("longpress"===t.type||0===t.type.indexOf("touch")){var n=t.touches[0];return E(t.target)&&!nf(n.clientX,n.clientY,e)}return E(t.target)&&!nf(t.clientX,t.clientY,e)})(t,e.selection.getRng())&&!t.isDefaultPrevented()&&e.selection.select(n)},A=function(t){return y.is(t,"figure.image")?[t.querySelector("img")]:y.hasClass(t,"mce-preview-object")&&b(t.firstElementChild)?[t,t.firstElementChild]:[t]},T=function(t){var n=yu(e);return!!n&&("false"!==t.getAttribute("data-mce-resize")&&(t!==e.getBody()&&(y.hasClass(t,"mce-preview-object")?Ne(Ae.fromDom(t.firstElementChild),n):Ne(Ae.fromDom(t),n))))},N=function(t,n,r){if(b(r)){var o=A(t);V(o,(function(t){t.style[n]||!e.schema.isValid(t.nodeName.toLowerCase(),n)?y.setStyle(t,n,r):y.setAttrib(t,n,""+r)}))}},$=function(t,e,n){N(t,"width",e),N(t,"height",n)},I=function(t){var a,v,b,_,w;a=t.screenX-s,v=t.screenY-l,h=a*i[2]+u,p=v*i[3]+c,h=h<5?5:h,p=p<5?5:p,b=(E(n)||D(n))&&!1!==function(t){return t.getParam("resize_img_proportional",!0,"boolean")}(e)?!sf.modifierPressed(t):sf.modifierPressed(t),b&&(C(a)>C(v)?(p=x(h*d),h=x(p/d)):(h=x(p/d),p=x(h*d))),$(r,h,p),_=(_=i.startPos.x+a)>0?_:0,w=(w=i.startPos.y+v)>0?w:0,y.setStyles(o,{left:_,top:w,display:"block"}),o.innerHTML=h+" × "+p,i[2]<0&&r.clientWidth<=h&&y.setStyle(r,"left",undefined+(u-h)),i[3]<0&&r.clientHeight<=p&&y.setStyle(r,"top",undefined+(c-p)),(a=S.scrollWidth-m)+(v=S.scrollHeight-g)!==0&&y.setStyles(o,{left:_-a,top:w-v}),f||(!function(t,e,n,r,o){t.fire("ObjectResizeStart",{target:e,width:n,height:r,origin:o})}(e,n,u,c,"corner-"+i.name),f=!0)},P=function(){var t=f;f=!1,t&&(N(n,"width",h),N(n,"height",p)),y.unbind(w,"mousemove",I),y.unbind(w,"mouseup",P),k!==w&&(y.unbind(k,"mousemove",I),y.unbind(k,"mouseup",P)),y.remove(r),y.remove(o),y.remove(a),j(n),t&&(!function(t,e,n,r,o){t.fire("ObjectResized",{target:e,width:n,height:r,origin:o})}(e,n,h,p,"corner-"+i.name),y.setAttrib(n,"style",y.getAttrib(n,"style"))),e.nodeChanged()},j=function(t){q();var f=y.getPos(t,S),b=f.x,C=f.y,x=t.getBoundingClientRect(),E=x.width||x.right-x.left,L=x.height||x.bottom-x.top;n!==t&&(M(),n=t,h=p=0);var N=e.fire("ObjectSelected",{target:t}),j=y.getAttrib(n,v,"1");T(t)&&!N.isDefaultPrevented()?_(O,(function(t,e){var f,h=function(f){var h,p=A(n)[0];s=f.screenX,l=f.screenY,u=p.clientWidth,c=p.clientHeight,d=c/u,(i=t).name=e,i.startPos={x:E*t[0]+b,y:L*t[1]+C},m=S.scrollWidth,g=S.scrollHeight,a=y.add(S,"div",{class:"mce-resize-backdrop","data-mce-bogus":"all"}),y.setStyles(a,{position:"fixed",left:"0",top:"0",width:"100%",height:"100%"}),r=D(h=n)?y.create("img",{src:Ce.transparentSrc}):h.cloneNode(!0),y.addClass(r,"mce-clonedresizable"),y.setAttrib(r,"data-mce-bogus","all"),r.contentEditable="false",y.setStyles(r,{left:b,top:C,margin:0}),$(r,E,L),r.removeAttribute(v),S.appendChild(r),y.bind(w,"mousemove",I),y.bind(w,"mouseup",P),k!==w&&(y.bind(k,"mousemove",I),y.bind(k,"mouseup",P)),o=y.add(S,"div",{class:"mce-resize-helper","data-mce-bogus":"all"},u+" × "+c)};(f=y.get("mceResizeHandle"+e))&&y.remove(f),f=y.add(S,"div",{id:"mceResizeHandle"+e,"data-mce-bogus":"all",class:"mce-resizehandle",unselectable:!0,style:"cursor:"+e+"-resize; margin:0; padding:0"}),11===Ce.ie&&(f.contentEditable=!1),y.bind(f,"mousedown",(function(t){t.stopImmediatePropagation(),t.preventDefault(),h(t)})),t.elm=f,y.setStyles(f,{left:E*t[0]+b-f.offsetWidth/2,top:L*t[1]+C-f.offsetHeight/2})})):M(),y.getAttrib(n,v)||n.setAttribute(v,j)},M=function(){q(),n&&n.removeAttribute(v),ft(O,(function(t,e){var n=y.get("mceResizeHandle"+e);n&&(y.unbind(n),y.remove(n))}))},R=function(n){var r,o=function(t,e){if(t)do{if(t===e)return!0}while(t=t.parentNode)};f||e.removed||(_(y.select("img[data-mce-selected],hr[data-mce-selected]"),(function(t){t.removeAttribute(v)})),r="mousedown"===n.type?n.target:t.getNode(),o(r=y.$(r).closest("table,img,figure.image,hr,video,span.mce-preview-object")[0],S)&&(F(),o(t.getStart(!0),r)&&o(t.getEnd(!0),r))?j(r):M())},B=function(t){return lf(ef(e.getBody(),t))},q=function(){ft(O,(function(t){t.elm&&(y.unbind(t.elm),delete t.elm)}))},F=function(){try{e.getDoc().execCommand("enableObjectResizing",!1,"false")}catch(t){}};e.on("init",(function(){if(F(),Ce.browser.isIE()||Ce.browser.isEdge()){e.on("mousedown click",(function(t){var n=t.target,r=n.nodeName;f||!/^(TABLE|IMG|HR)$/.test(r)||B(n)||(2!==t.button&&e.selection.select(n,"TABLE"===r),"mousedown"===t.type&&e.nodeChanged())}));var t=function(t){var n=function(t){oo.setEditorTimeout(e,(function(){return e.selection.select(t)}))};if(B(t.target)||Yn(t.target))return t.preventDefault(),void n(t.target);/^(TABLE|IMG|HR)$/.test(t.target.nodeName)&&(t.preventDefault(),"IMG"===t.target.tagName&&n(t.target))};y.bind(S,"mscontrolselect",t),e.on("remove",(function(){return y.unbind(S,"mscontrolselect",t)}))}var r=oo.throttle((function(t){e.composing||R(t)}));e.on("NodeChange ResizeEditor ResizeWindow ResizeContent drop",r),e.on("keyup compositionend",(function(t){n&&"TABLE"===n.nodeName&&r(t)})),e.on("hide blur",M),e.on("contextmenu longpress",L,!0)})),e.on("remove",q);return{isResizable:T,showResizeRect:j,hideResizeRect:M,updateResizeRect:R,destroy:function(){n=r=a=null}}},cf=function(t){return Vn(t)||Wn(t)},df=function(t,e,n){var r,o,i=n;if(i.caretPositionFromPoint)(o=i.caretPositionFromPoint(t,e))&&((r=n.createRange()).setStart(o.offsetNode,o.offset),r.collapse(!0));else if(i.caretRangeFromPoint)r=i.caretRangeFromPoint(t,e);else if(i.body.createTextRange){r=i.body.createTextRange();try{r.moveToPoint(t,e),r.collapse(!0)}catch(o){r=function(t,e,n){var r,o=n.elementFromPoint(t,e),i=n.body.createTextRange();if(o&&"HTML"!==o.tagName||(o=n.body),i.moveToElementText(o),(r=(r=De.toArray(i.getClientRects())).sort((function(t,n){return(t=Math.abs(Math.max(t.top-e,t.bottom-e)))-Math.abs(Math.max(n.top-e,n.bottom-e))}))).length>0){e=(r[0].bottom+r[0].top)/2;try{return i.moveToPoint(t,e),i.collapse(!0),i}catch(t){}}return null}(t,e,n)}return function(t,e){var n=t&&t.parentElement?t.parentElement():null;return Wn(function(t,e,n){for(;t&&t!==e;){if(n(t))return t;t=t.parentNode}return null}(n,e,cf))?null:t}(r,n.body)}return r},ff=function(t,e){return t&&e&&t.startContainer===e.startContainer&&t.startOffset===e.startOffset&&t.endContainer===e.endContainer&&t.endOffset===e.endOffset},hf=function(t,e,n){return null!==function(t,e,n){for(;t&&t!==e;){if(n(t))return t;t=t.parentNode}return null}(t,e,n)},pf=function(t,e,n){return hf(t,e,(function(t){return t.nodeName===n}))},mf=function(t){return t&&"TABLE"===t.nodeName},gf=function(t){return t&&/^(TD|TH|CAPTION)$/.test(t.nodeName)},vf=function(t,e){return Do(t)&&!1===hf(t,e,qc)},yf=function(t,e,n){for(var r=new so(e,t.getParent(e.parentNode,t.isBlock)||t.getRoot());e=r[n?"prev":"next"]();)if(zn(e))return!0},bf=function(t,e,n,r,o){var i,a,s=t.getRoot(),l=t.schema.getNonEmptyElements(),u=t.getParent(o.parentNode,t.isBlock)||s;if(r&&zn(o)&&e&&t.isEmpty(u))return M.some(Tl(o.parentNode,t.nodeIndex(o)));for(var c=new so(o,u);a=c[r?"prev":"next"]();){if("false"===t.getContentEditableParent(a)||vf(a,s))return M.none();if(Bn(a)&&a.nodeValue.length>0)return!1===pf(a,s,"A")?M.some(Tl(a,r?a.nodeValue.length:0)):M.none();if(t.isBlock(a)||l[a.nodeName.toLowerCase()])return M.none();i=a}return n&&i?M.some(Tl(i,0)):M.none()},_f=function(t,e,n,r){var o,i,a,s,l=t.getRoot(),u=!1;o=r[(n?"start":"end")+"Container"],i=r[(n?"start":"end")+"Offset"];var c=Tn(o)&&i===o.childNodes.length,d=t.schema.getNonEmptyElements();if(s=n,Do(o))return M.none();if(Tn(o)&&i>o.childNodes.length-1&&(s=!1),Fn(o)&&(o=l,i=0),o===l){if(s&&(a=o.childNodes[i>0?i-1:0])){if(Do(a))return M.none();if(d[a.nodeName]||mf(a))return M.none()}if(o.hasChildNodes()){if(i=Math.min(!s&&i>0?i-1:i,o.childNodes.length-1),o=o.childNodes[i],i=Bn(o)&&c?o.data.length:0,!e&&o===l.lastChild&&mf(o))return M.none();if(function(t,e){for(;e&&e!==t;){if(Wn(e))return!0;e=e.parentNode}return!1}(l,o)||Do(o))return M.none();if(o.hasChildNodes()&&!1===mf(o)){a=o;var f=new so(o,l);do{if(Wn(a)||Do(a)){u=!1;break}if(Bn(a)&&a.nodeValue.length>0){i=s?0:a.nodeValue.length,o=a,u=!0;break}if(d[a.nodeName.toLowerCase()]&&!gf(a)){i=t.nodeIndex(a),o=a.parentNode,s||i++,u=!0;break}}while(a=s?f.next():f.prev())}}}return e&&(Bn(o)&&0===i&&bf(t,c,e,!0,o).each((function(t){o=t.container(),i=t.offset(),u=!0})),Tn(o)&&((a=o.childNodes[i])||(a=o.childNodes[i-1]),!a||!zn(a)||function(t,e){return t.previousSibling&&t.previousSibling.nodeName===e}(a,"A")||yf(t,a,!1)||yf(t,a,!0)||bf(t,c,e,!0,a).each((function(t){o=t.container(),i=t.offset(),u=!0})))),s&&!e&&Bn(o)&&i===o.nodeValue.length&&bf(t,c,e,!1,o).each((function(t){o=t.container(),i=t.offset(),u=!0})),u?M.some(Tl(o,i)):M.none()},wf=function(t,e){var n=e.collapsed,r=e.cloneRange(),o=Tl.fromRangeStart(e);return _f(t,n,!0,r).each((function(t){n&&Tl.isAbove(o,t)||r.setStart(t.container(),t.offset())})),n||_f(t,n,!1,r).each((function(t){r.setEnd(t.container(),t.offset())})),n&&r.collapse(!0),ff(e,r)?M.none():M.some(r)},kf=function(t,e){return t.splitText(e)},Cf=function(t){var e=t.startContainer,n=t.startOffset,r=t.endContainer,o=t.endOffset;return e===r&&Bn(e)?n>0&&n<e.nodeValue.length&&(e=(r=kf(e,n)).previousSibling,o>n?(e=r=kf(r,o-=n).previousSibling,o=r.nodeValue.length,n=0):o=0):(Bn(e)&&n>0&&n<e.nodeValue.length&&(e=kf(e,n),n=0),Bn(r)&&o>0&&o<r.nodeValue.length&&(o=(r=kf(r,o).previousSibling).nodeValue.length)),{startContainer:e,startOffset:n,endContainer:r,endOffset:o}},xf=function(t){return{walk:function(e,n){return Id(t,e,n)},split:Cf,normalize:function(e){return wf(t,e).fold(N,(function(t){return e.setStart(t.startContainer,t.startOffset),e.setEnd(t.endContainer,t.endOffset),!0}))}}};xf.compareRanges=ff,xf.getCaretRangeFromPoint=df,xf.getSelectedNode=ul,xf.getNode=cl;var Sf,Of=function(t,e){var n=function(n){var r=e(n);if(r<=0||null===r){var o=ir(n,t);return parseFloat(o)||0}return r},r=function(t,e){return G(e,(function(e,n){var r=ir(t,n),o=void 0===r?0:parseInt(r,10);return isNaN(o)?e:e+o}),0)};return{set:function(e,n){if(!w(n)&&!n.match(/^[0-9]+$/))throw new Error(t+".set accepts only positive integer values. Value was "+n);var r=e.dom;Xn(r)&&(r.style[t]=n+"px")},get:n,getOuter:n,aggregate:r,max:function(t,e,n){var o=r(t,n);return e>o?e-o:0}}}("height",(function(t){var e=t.dom;return bn(t)?e.getBoundingClientRect().height:e.offsetHeight})),Ef=function(t,e){return t.view(e).fold(S([]),(function(e){var n=t.owner(e),r=Ef(t,n);return[e].concat(r)}))},Df=Object.freeze({__proto__:null,view:function(t){var e;return(t.dom===document?M.none():M.from(null===(e=t.dom.defaultView)||void 0===e?void 0:e.frameElement)).map(Ae.fromDom)},owner:function(t){return Ve(t)}}),Lf=function(t){var e=Ae.fromDom(document),n=xn(e),r=function(t,e){var n=e.owner(t);return Ef(e,n)}(t,Df),o=Cn(t),i=Z(r,(function(t,e){var n=Cn(e);return{left:t.left+n.left,top:t.top+n.top}}),{left:0,top:0});return wn(i.left+o.left+n.left,i.top+o.top+n.top)},Af=function(t){return"textarea"===Me(t)},Tf=function(t,e){var n=function(t){var e=t.dom.ownerDocument,n=e.body,r=e.defaultView,o=e.documentElement;if(n===t.dom)return wn(n.offsetLeft,n.offsetTop);var i=kn(null==r?void 0:r.pageYOffset,o.scrollTop),a=kn(null==r?void 0:r.pageXOffset,o.scrollLeft),s=kn(o.clientTop,n.clientTop),l=kn(o.clientLeft,n.clientLeft);return Cn(t).translate(a-l,i-s)}(t),r=function(t){return Of.get(t)}(t);return{element:t,bottom:n.top+r,height:r,pos:n,cleanup:e}},Nf=function(t,e){var n=function(t,e){var n=Qe(t);if(0===n.length||Af(t))return{element:t,offset:e};if(e<n.length&&!Af(n[e]))return{element:n[e],offset:0};var r=n[n.length-1];return Af(r)?{element:t,offset:e}:"img"===Me(r)?{element:r,offset:1}:Fe(r)?{element:r,offset:Yd(r).length}:{element:r,offset:Qe(r).length}}(t,e),r=Ae.fromHtml('<span data-mce-bogus="all" style="display: inline-block;">\ufeff</span>');return dn(n.element,r),Tf(r,(function(){return vn(r)}))},$f=function(t,e,n,r){Mf(t,(function(o,i){return Pf(t,e,n,r)}),n)},If=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))},Pf=function(t,e,n,r){var o=Ae.fromDom(t.getBody()),i=Ae.fromDom(t.getDoc());o.dom.offsetWidth;var a=Nf(Ae.fromDom(n.startContainer),n.startOffset);If(t,i,e,a,r),a.cleanup()},jf=function(t,e,n,r){var o=Ae.fromDom(t.getDoc());If(t,o,n,function(t){return Tf(Ae.fromDom(t),k)}(e),r)},Mf=function(t,e,n){var r=n.startContainer,o=n.startOffset,i=n.endContainer,a=n.endOffset;e(Ae.fromDom(r),Ae.fromDom(i));var s=t.dom.createRng();s.setStart(r,o),s.setEnd(i,a),t.selection.setRng(n)},Rf=function(t,e,n,r){var o=t.pos;if(n)Sn(o.left,o.top,r);else{var i=o.top-e+t.height;Sn(o.left,i,r)}},Bf=function(t,e,n,r,o){var i=n+e,a=r.pos.top,s=r.bottom,l=s-a>=n;if(a<e)Rf(r,n,!1!==o,t);else if(a>i){Rf(r,n,l?!1!==o:!0===o,t)}else s>i&&!l&&Rf(r,n,!0===o,t)},qf=function(t,e,n,r){var o=t.dom.defaultView.innerHeight;Bf(t,e,o,n,r)},Ff=function(t,e,n,r){var o=t.dom.defaultView.innerHeight;Bf(t,e,o,n,r);var i=Lf(n.element),a=Dn(window);i.top<a.y?On(n.element,!1!==r):i.top>a.bottom&&On(n.element,!0===r)},Uf=function(t,e,n){return $f(t,qf,e,n)},zf=function(t,e,n){return jf(t,e,qf,n)},Hf=function(t,e,n){return $f(t,Ff,e,n)},Vf=function(t,e,n){return jf(t,e,Ff,n)},Wf=function(t,e,n){(t.inline?Uf:Hf)(t,e,n)},Kf=function(t){var e=sn(t).dom;return t.dom===e.activeElement},Yf=function(t){return void 0===t&&(t=Ae.fromDom(document)),M.from(t.dom.activeElement).map(Ae.fromDom)},Zf=function(t,e,n,r){return{start:t,soffset:e,finish:n,foffset:r}},Gf=Sr([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Xf=(Gf.before,Gf.on,Gf.after,function(t){return t.fold(O,O,O)}),Qf=Sr([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Jf={domRange:Qf.domRange,relative:Qf.relative,exact:Qf.exact,exactFromRange:function(t){return Qf.exact(t.start,t.soffset,t.finish,t.foffset)},getWin:function(t){var e=function(t){return t.match({domRange:function(t){return Ae.fromDom(t.startContainer)},relative:function(t,e){return Xf(t)},exact:function(t,e,n,r){return t}})}(t);return We(e)},range:Zf},th=pe().browser,eh=function(t,e){var n=Fe(e)?Yd(e).length:Qe(e).length+1;return t>n?n:t<0?0:t},nh=function(t){return Jf.range(t.start,eh(t.soffset,t.start),t.finish,eh(t.foffset,t.finish))},rh=function(t,e){return!An(e.dom)&&(je(t,e)||Ie(t,e))},oh=function(t){return function(e){return rh(t,e.start)&&rh(t,e.finish)}},ih=function(t){return!0===t.inline||th.isIE()},ah=function(t){return Jf.range(Ae.fromDom(t.startContainer),t.startOffset,Ae.fromDom(t.endContainer),t.endOffset)},sh=function(t){return function(t){var e=t.getSelection();return(e&&0!==e.rangeCount?M.from(e.getRangeAt(0)):M.none()).map(ah)}(We(t).dom).filter(oh(t))},lh=function(t){var e=document.createRange();try{return e.setStart(t.start.dom,t.soffset),e.setEnd(t.finish.dom,t.foffset),M.some(e)}catch(t){return M.none()}},uh=function(t){var e=ih(t)?sh(Ae.fromDom(t.getBody())):M.none();t.bookmark=e.isSome()?e:t.bookmark},ch=function(t){return(t.bookmark?t.bookmark:M.none()).bind((function(e){return function(t,e){return M.from(e).filter(oh(t)).map(nh)}(Ae.fromDom(t.getBody()),e)})).bind(lh)},dh={isEditorUIElement:function(t){var e=t.className.toString();return-1!==e.indexOf("tox-")||-1!==e.indexOf("mce-")}},fh=function(t,e){pe().browser.isIE()?function(t){t.on("focusout",(function(){uh(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)||uh(t)}))},hh=function(t){var e=As((function(){uh(t)}),0);t.on("init",(function(){t.inline&&function(t,e){var n=function(){e.throttle()};ys.DOM.bind(document,"mouseup",n),t.on("remove",(function(){ys.DOM.unbind(document,"mouseup",n)}))}(t,e),fh(t,e)})),t.on("remove",(function(){e.cancel()}))},ph=ys.DOM,mh=function(t,e){var n=function(t){return t.getParam("custom_ui_selector","","string")}(t),r=ph.getParent(e,(function(e){return function(t){return dh.isEditorUIElement(t)}(e)||!!n&&t.dom.is(e,n)}));return null!==r},gh=function(t,e){var n=e.editor;hh(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;mh(n,function(t){try{var e=sn(Ae.fromDom(t.getElement()));return Yf(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)}))})),Sf||(Sf=function(e){var n=t.activeEditor;n&&function(t){if(an()&&b(t.target)){var e=Ae.fromDom(t.target);if(qe(e)&&cn(e)&&t.composed&&t.composedPath){var n=t.composedPath();if(n)return at(n)}}return M.from(t.target)}(e).each((function(e){e.ownerDocument===document&&(e===document.body||mh(n,e)||t.focusedEditor!==n||(n.fire("blur",{focusedEditor:null}),t.focusedEditor=null))}))},ph.bind(document,"focusin",Sf))},vh=function(t,e){t.focusedEditor===e.editor&&(t.focusedEditor=null),t.activeEditor||(ph.unbind(document,"focusin",Sf),Sf=null)},yh=function(t,e){return function(t){return t.collapsed?M.from(cl(t.startContainer,t.startOffset)).map(Ae.fromDom):M.none()}(e).bind((function(e){return vo(e)?M.some(e):!1===je(t,e)?M.some(t):M.none()}))},bh=function(t,e){yh(Ae.fromDom(t.getBody()),e).bind((function(t){return Mc(t.dom)})).fold((function(){t.selection.normalize()}),(function(e){return t.selection.setRng(e.toRange())}))},_h=function(t){if(t.setActive)try{t.setActive()}catch(e){t.focus()}else t.focus()},wh=function(t){return Kf(t)||(e=t,Yf(sn(e)).filter((function(t){return e.dom.contains(t.dom)}))).isSome();var e},kh=function(t){return t.inline?function(t){var e=t.getBody();return e&&wh(Ae.fromDom(e))}(t):function(t){return t.iframeElement&&Kf(Ae.fromDom(t.iframeElement))}(t)},Ch=function(t){return kh(t)||function(t){var e=sn(Ae.fromDom(t.getElement()));return Yf(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")))&&mh(t,e.dom);var n})).isSome()}(t)},xh=function(t){return t.editorManager.setActive(t)},Sh=function(t,e){t.removed||(e?xh(t):function(t){var e=t.selection,n=t.getBody(),r=e.getRng();t.quirks.refreshContentEditable(),void 0!==t.bookmark&&!1===kh(t)&&ch(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 _h(o),bh(t,r),void xh(t);t.inline||(Ce.opera||_h(n),t.getWin().focus()),(Ce.gecko||t.inline)&&(_h(n),bh(t,r)),xh(t)}(t))},Oh=function(t,e,n,r,o){var i=n?e.startContainer:e.endContainer,a=n?e.startOffset:e.endOffset;return M.from(i).map(Ae.fromDom).map((function(t){return r&&e.collapsed?t:Je(t,o(t,a)).getOr(t)})).bind((function(t){return qe(t)?M.some(t):Ke(t).filter(qe)})).map((function(t){return t.dom})).getOr(t)},Eh=function(t,e,n){return Oh(t,e,!0,n,(function(t,e){return Math.min(nn(t),e)}))},Dh=function(t,e,n){return Oh(t,e,!1,n,(function(t,e){return e>0?e-1:e}))},Lh=function(t,e){for(var n=t;t&&Bn(t)&&0===t.length;)t=e?t.nextSibling:t.previousSibling;return t||n},Ah=function(t,e){return H(e,(function(e){var n=t.fire("GetSelectionRange",{range:e});return n.range!==e?n.range:e}))},Th={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11},Nh=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}},$h=function(t){if(!Zo(t.value))return!1;var e=t.parent;return!e||"span"===e.name&&!e.attr("style")||!/^[ ]+$/.test(t.value)},Ih=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},Ph=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,Th[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<a;i++){var s=e[i];"id"!==s.name&&(o[o.length]={name:s.name,value:s.value},o.map[s.name]=s.value)}r.attributes=o}return r.value=n.value,r.shortEnded=n.shortEnded,r},t.prototype.wrap=function(t){var e=this;return e.parent.insert(t,e),t.append(e),e},t.prototype.unwrap=function(){for(var t=this,e=t.firstChild;e;){var n=e.next;t.insert(e,t,!0),e=n}t.remove()},t.prototype.remove=function(){var t=this,e=t.parent,n=t.next,r=t.prev;return e&&(e.firstChild===t?(e.firstChild=n,n&&(n.prev=null)):r.next=n,e.lastChild===t?(e.lastChild=r,r&&(r.next=null)):n.prev=r,t.parent=t.next=t.prev=null),t},t.prototype.append=function(t){var e=this;t.parent&&t.remove();var n=e.lastChild;return n?(n.next=t,t.prev=n,e.lastChild=t):e.lastChild=e.firstChild=t,t.parent=e,t},t.prototype.insert=function(t,e,n){t.parent&&t.remove();var r=e.parent||this;return n?(e===r.firstChild?r.firstChild=t:e.prev.next=t,t.prev=e.prev,t.next=e,e.prev=t):(e===r.lastChild?r.lastChild=t:e.next.prev=t,t.next=e.next,t.prev=e,e.next=t),t.parent=r,t},t.prototype.getAll=function(t){for(var e=[],n=this.firstChild;n;n=Nh(n,this))n.name===t&&e.push(n);return e},t.prototype.children=function(){for(var t=[],e=this.firstChild;e;e=e.next)t.push(e);return t},t.prototype.empty=function(){var t=this;if(t.firstChild){for(var e=[],n=t.firstChild;n;n=Nh(n,t))e.push(n);for(var r=e.length;r--;){(n=e[r]).parent=n.firstChild=n.lastChild=n.next=n.prev=null}}return t.firstChild=t.lastChild=null,t},t.prototype.isEmpty=function(t,e,n){void 0===e&&(e={});var r=this,o=r.firstChild;if(Ih(r))return!1;if(o)do{if(1===o.type){if(o.attr("data-mce-bogus"))continue;if(t[o.name])return!1;if(Ih(o))return!1}if(8===o.type)return!1;if(3===o.type&&!$h(o))return!1;if(3===o.type&&o.parent&&e[o.parent.name]&&Zo(o.value))return!1;if(n&&n(o))return!1}while(o=Nh(o,r));return!0},t.prototype.walk=function(t){return Nh(this,null,t)},t}(),jh=function(t,e){return t.replace(e.re,(function(t){return bt(e.uris,t).getOr(t)}))},Mh=De.each,Rh=De.trim,Bh="source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),qh={ftp:21,http:80,https:443,mailto:25},Fh=["img","video"],Uh=function(t,e,n){return!t.allow_html_data_urls&&(/^data:image\//i.test(e)?function(t,e){return b(t)?!t:!b(e)||!U(Fh,e)}(t.allow_svg_data_urls,n)&&/^data:image\/svg\+xml/i.test(e):/^data:/i.test(e))},zh=function(){function t(e,n){e=Rh(e),this.settings=n||{};var r=this.settings.base_uri,o=this;if(/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e))o.source=e;else{var i=0===e.indexOf("//");if(0!==e.indexOf("/")||i||(e=(r&&r.protocol||"http")+"://mce_host"+e),!/^[\w\-]*:?\/\//.test(e)){var a=this.settings.base_uri?this.settings.base_uri.path:new t(document.location.href).directory;if(this.settings.base_uri&&""==this.settings.base_uri.protocol)e="//mce_host"+o.toAbsPath(a,e);else{var s=/([^#?]*)([#?]?.*)/.exec(e);e=(r&&r.protocol||"http")+"://mce_host"+o.toAbsPath(a,s[1])+s[2]}}e=e.replace(/@@/g,"(mce_at)");var l=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?(\[[a-zA-Z0-9:.%]+\]|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e);Mh(Bh,(function(t,e){var n=l[e];n&&(n=n.replace(/\(mce_at\)/g,"@@")),o[t]=n})),r&&(o.protocol||(o.protocol=r.protocol),o.userInfo||(o.userInfo=r.userInfo),o.port||"mce_host"!==o.host||(o.port=r.port),o.host&&"mce_host"!==o.host||(o.host=r.host),o.source=""),i&&(o.protocol="")}}return t.parseDataUri=function(t){var e,n=decodeURIComponent(t).split(","),r=/data:([^;]+)/.exec(n[0]);return r&&(e=r[1]),{type:e,data:n[1]}},t.isDomSafe=function(t,e,n){if(void 0===n&&(n={}),n.allow_script_urls)return!0;var r=bi.decode(t).replace(/[\s\u0000-\u001F]+/g,"");try{r=decodeURIComponent(r)}catch(t){r=unescape(r)}return!/((java|vb)script|mhtml):/i.test(r)&&!Uh(n,r,e)},t.getDocumentBaseUrl=function(t){var e;return e=0!==t.protocol.indexOf("http")&&"file:"!==t.protocol?t.href:t.protocol+"//"+t.host+t.pathname,/^[^:]+:\/\/\/?[^\/]+\//.test(e)&&(e=e.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(e)||(e+="/")),e},t.prototype.setPath=function(t){var e=/^(.*?)\/?(\w+)?$/.exec(t);this.path=e[0],this.directory=e[1],this.file=e[2],this.source="",this.getURI()},t.prototype.toRelative=function(e){var n;if("./"===e)return e;var r=new t(e,{base_uri:this});if("mce_host"!==r.host&&this.host!==r.host&&r.host||this.port!==r.port||this.protocol!==r.protocol&&""!==r.protocol)return r.getURI();var o=this.getURI(),i=r.getURI();return o===i||"/"===o.charAt(o.length-1)&&o.substr(0,o.length-1)===i?o:(n=this.toRelPath(this.path,r.path),r.query&&(n+="?"+r.query),r.anchor&&(n+="#"+r.anchor),n)},t.prototype.toAbsolute=function(e,n){var r=new t(e,{base_uri:this});return r.getURI(n&&this.isSameOrigin(r))},t.prototype.isSameOrigin=function(t){if(this.host==t.host&&this.protocol==t.protocol){if(this.port==t.port)return!0;var e=qh[this.protocol];if(e&&(this.port||e)==(t.port||e))return!0}return!1},t.prototype.toRelPath=function(t,e){var n,r,o=0,i="",a=t.substring(0,t.lastIndexOf("/")).split("/"),s=e.split("/");if(a.length>=s.length)for(n=0,r=a.length;n<r;n++)if(n>=s.length||a[n]!==s[n]){o=n+1;break}if(a.length<s.length)for(n=0,r=s.length;n<r;n++)if(n>=a.length||a[n]!==s[n]){o=n+1;break}if(1===o)return e;for(n=0,r=a.length-(o-1);n<r;n++)i+="../";for(n=o-1,r=s.length;n<r;n++)i+=n!==o-1?"/"+s[n]:s[n];return i},t.prototype.toAbsPath=function(t,e){var n,r,o=0,i=[],a=/\/$/.test(e)?"/":"",s=t.split("/"),l=e.split("/");for(Mh(s,(function(t){t&&i.push(t)})),s=i,n=l.length-1,i=[];n>=0;n--)0!==l[n].length&&"."!==l[n]&&(".."!==l[n]?o>0?o--:i.push(l[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}(),Hh=De.makeMap("button,fieldset,form,iframe,img,image,input,object,output,select,textarea"),Vh=Nt((function(){return document.implementation.createHTMLDocument("parser")})),Wh=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 l=r.exec(e);if(null===l)return s;if("!"===l[1]){s=Rt(l[2],"--")?Kh(e,!1,l.index+"!--".length):Kh(e,!0,l.index+1);break}o.lastIndex=r.lastIndex;var u=o.exec(e);if(!m(u)&&u.index===r.lastIndex){"/"===l[1]?a-=1:_t(i,l[2])||(a+=1),s=r.lastIndex+u[0].length;break}}return s},Kh=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]+\]>.*<!\[endif\](--!?)?>/.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},Yh=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},Zh=function(t,e){void 0===e&&(e=Ti()),t=t||{};var n=Vh(),r=n.createElement("form");!1!==t.fix_self_closing&&(t.fix_self_closing=!0);var o=t.comment?t.comment:k,i=t.cdata?t.cdata:k,a=t.text?t.text:k,s=t.start?t.start:k,l=t.end?t.end:k,u=t.pi?t.pi:k,c=t.doctype?t.doctype:k,d=function(d,f){void 0===f&&(f="html");for(var h,p,m,g,v,y,b,_,w,k,C,x,S,O,E,D,L,A,T,N=d.html,$=0,I=[],P=0,j=bi.decode,M=De.makeMap("src,href,data,background,action,formaction,poster,xlink:href"),R="html"===f?0:1,B=function(t){var e,n;for(e=I.length;e--&&I[e].name!==t;);if(e>=0){for(n=I.length-1;n>=e;n--)(t=I[n]).valid&&l(t.name);I.length=e}},q=function(t,e){return a(jh(t,d),e)},F=function(e){""!==e&&(">"===e.charAt(0)&&(e=" "+e),t.allow_conditional_comments||"[if"!==e.substr(0,3).toLowerCase()||(e=" "+e),o(jh(e,d)))},U=function(t,e){var n=t||"",r=!Rt(n,"--"),o=Kh(N,r,e);return t=N.substr(e,o-e),F(r?n+t:t),o+1},z=function(e,o,i,a,s){if(i=function(t){return jh(t,d)}((o=o.toLowerCase())in Y?o:j(i||a||s||"")),Z&&!_&&!1===function(t){return 0===t.indexOf("data-")||0===t.indexOf("aria-")}(o)){var l=O[o];if(!l&&E){for(var u=E.length;u--&&!(l=E[u]).pattern.test(o););-1===u&&(l=null)}if(!l)return;if(l.validValues&&!(i in l.validValues))return}("name"===o||"id"===o)&&e in Hh&&(i in n||i in r)||M[o]&&!zh.isDomSafe(i,e,t)||_&&(o in M||0===o.indexOf("on"))||(g.map[o]=i,g.push({name:o,value:i}))},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"),V=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,W=e.getShortEndedElements(),K=t.self_closing_elements||e.getSelfClosingElements(),Y=e.getBoolAttrs(),Z=t.validate,G=t.remove_internals,X=t.fix_self_closing,Q=e.getSpecialElements(),J=N+">";h=H.exec(J);){var tt=h[0];if($<h.index&&q(j(N.substr($,h.index-$))),p=h[7])":"===(p=p.toLowerCase()).charAt(0)&&(p=p.substr(1)),B(p);else if(p=h[8]){if(h.index+tt.length>N.length){q(j(N.substr(h.index))),$=h.index+tt.length;continue}":"===(p=p.toLowerCase()).charAt(0)&&(p=p.substr(1)),w=p in W,X&&K[p]&&I.length>0&&I[I.length-1].name===p&&B(p);var et=Yh(V,h[9]);if(null!==et){if("all"===et){$=Wh(e,N,H.lastIndex),H.lastIndex=$;continue}C=!1}if(!Z||(k=e.getElementRule(p))){if(C=!0,Z&&(O=k.attributes,E=k.attributePatterns),(S=h[9])?((_=-1!==S.indexOf("data-mce-type"))&&G&&(C=!1),(g=[]).map={},S.replace(V,(function(t,e,n,r,o){return z(p,e,n,r,o),""}))):(g=[]).map={},Z&&!_){if(D=k.attributesRequired,L=k.attributesDefault,A=k.attributesForced,k.removeEmptyAttrs&&!g.length&&(C=!1),A)for(v=A.length;v--;)b=(x=A[v]).name,"{$uid}"===(T=x.value)&&(T="mce_"+P++),g.map[b]=T,g.push({name:b,value:T});if(L)for(v=L.length;v--;)(b=(x=L[v]).name)in g.map||("{$uid}"===(T=x.value)&&(T="mce_"+P++),g.map[b]=T,g.push({name:b,value:T}));if(D){for(v=D.length;v--&&!(D[v]in g.map););-1===v&&(C=!1)}if(x=g.map["data-mce-bogus"]){if("all"===x){$=Wh(e,N,H.lastIndex),H.lastIndex=$;continue}C=!1}}C&&s(p,g,w)}else C=!1;if(m=Q[p]){m.lastIndex=$=h.index+tt.length,(h=m.exec(N))?(C&&(y=N.substr($,h.index-$)),$=h.index+h[0].length):(y=N.substr($),$=N.length),C&&(y.length>0&&q(y,!0),l(p)),H.lastIndex=$;continue}w||(S&&S.indexOf("/")===S.length-1?C&&l(p):I.push({name:p,valid:C}))}else if(p=h[1])F(p);else if(p=h[2]){if(!(1===R||t.preserve_cdata||I.length>0&&e.isValidChild(I[I.length-1].name,"#cdata"))){$=U("",h.index+2),H.lastIndex=$;continue}i(p)}else if(p=h[3])c(p);else{if((p=h[4])||"<!"===tt){$=U(p,h.index+tt.length),H.lastIndex=$;continue}if(p=h[5]){if(1!==R){$=U("?",h.index+2),H.lastIndex=$;continue}u(p,h[6])}}$=h.index+tt.length}for($<N.length&&q(j(N.substr($))),v=I.length-1;v>=0;v--)(p=I[v]).valid&&l(p.name)};return{parse:function(t,e){void 0===e&&(e="html"),d(function(t){for(var e,n=/data:[^;<"'\s]+;base64,([a-z0-9\+\/=\s]+)/gi,r=[],o={},i=Zs("img"),a=0,s=0;e=n.exec(t);){var l=e[0],u=i+"_"+s++;o[u]=l,a<e.index&&r.push(t.substr(a,e.index-a)),r.push(u),a=e.index+l.length}var c=new RegExp(i+"_[0-9]+","g");return 0===a?{prefix:i,uris:o,html:t,re:c}:(a<t.length&&r.push(t.substr(a)),{prefix:i,uris:o,html:r.join(""),re:c})}(t),e)}}};Zh.findEndTag=Wh;var Gh=function(t,e){for(var n,r=/<(\w+) [^>]*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,l=n[0].length,u=void 0;u=a[n[1]]?s:Zh.findEndTag(o,i,s),i=i.substring(0,s-l)+i.substring(u),r.lastIndex=s-l}return Co(i)},Xh=Gh,Qh=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?De.trim(Xh(t.serializer,r.innerHTML)):"text"===a.format?t.dom.isEmpty(r)?"":Co(r.innerText||r.textContent):"tree"===a.format?t.serializer.serialize(r,a):function(t,e){var n=ou(t),r=new RegExp("^(<"+n+"[^>]*>( | |\\s| |<br \\/>|)<\\/"+n+">[\r\n]*|<br \\/>[\r\n]*)$");return e.replace(r,"")}(t,t.serializer.serialize(r,a)),U(["text","tree"],a.format)||bo(Ae.fromDom(r))?a.content=o:a.content=De.trim(o),a.no_events?a.content:t.fire("GetContent",a).content},Jh=De.each,tp=function(t){return{compare:function(e,n){if(e.nodeName!==n.nodeName)return!1;var r=function(e){var n={};return Jh(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")))&&(!Qc(e)&&!Qc(n)))}}},ep=De.makeMap,np=function(t){var e=[],n=(t=t||{}).indent,r=ep(t.indent_before||""),o=ep(t.indent_after||""),i=bi.getEncodeFunc(t.entity_encoding||"raw",t.entities),a="html"===t.element_format;return{start:function(t,s,l){var u,c,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(u=0,c=s.length;u<c;u++)d=s[u],e.push(" ",d.name,'="',i(d.value,!0),'"');e[e.length]=!l||a?">":" />",l&&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("</",t,">"),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("<![CDATA[",t,"]]>")},comment:function(t){e.push("\x3c!--",t,"--\x3e")},pi:function(t,r){r?e.push("<?",t," ",i(r),"?>"):e.push("<?",t,"?>"),n&&e.push("\n")},doctype:function(t){e.push("<!DOCTYPE",t,">",n?"\n":"")},reset:function(){e.length=0},getContent:function(){return e.join("").replace(/\n$/,"")}}},rp=function(t,e){void 0===e&&(e=Ti());var n=np(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,l=t.shortEnded,u=t.attributes;if(o&&u&&u.length>1){var c=[];c.map={};var d=e.getElementRule(t.name);if(d){for(var f=0,h=d.attributesOrder.length;f<h;f++){if((m=d.attributesOrder[f])in u.map){var p=u.map[m];c.map[m]=p,c.push({name:m,value:p})}}for(f=0,h=u.length;f<h;f++){var m;if(!((m=u[f].name)in c.map)){p=u.map[m];c.map[m]=p,c.push({name:m,value:p})}}u=c}}if(n.start(t.name,u,l),!l){if(t=t.firstChild)do{a(t)}while(t=t.next);n.end(s)}}};return 1!==r.type||t.inner?i[11](r):a(r),n.getContent()}}},op=new Set;V(["margin","margin-left","margin-right","margin-top","margin-bottom","padding","padding-left","padding-right","padding-top","padding-bottom","border","border-width","border-style","border-color","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","float","position","left","right","top","bottom","z-index","display","transform","width","max-width","min-width","height","max-height","min-height","overflow","overflow-x","overflow-y","text-overflow","vertical-align","transition","transition-delay","transition-duration","transition-property","transition-timing-function"],(function(t){op.add(t)}));var ip=["font","text-decoration","text-emphasis"],ap=function(t,e){return ct(t.parseStyle(t.getAttrib(e,"style")))},sp=function(t,e){return et(ap(t,e),(function(t){return!function(t){return op.has(t)}(t)}))},lp=function(t,e,n){var r=ap(t,e),o=ap(t,n),i=function(r){var o=t.getStyle(e,r),i=t.getStyle(n,r);return zt(o)&&zt(i)&&o!==i};return z(r,(function(t){var e=function(e){return z(e,(function(e){return e===t}))};if(!e(o)&&e(ip)){var n=Y(o,(function(t){return z(ip,(function(e){return Rt(t,e)}))}));return z(n,i)}return i(t)}))},up=function(t,e,n){return M.from(n.container()).filter(Bn).exists((function(r){var o=t?0:-1;return e(r.data.charAt(n.offset()+o))}))},cp=D(up,!0,td),dp=D(up,!1,td),fp=function(t){var e=t.container();return Bn(e)&&(0===e.data.length||ko(e.data)&&tf.isBookmarkNode(e.parentNode))},hp=function(t,e){return function(n){return M.from(rc(t?0:-1,n)).filter(e).isSome()}},pp=function(t){return Hn(t)&&"block"===ir(Ae.fromDom(t),"display")},mp=function(t){return Wn(t)&&!function(t){return Tn(t)&&"all"===t.getAttribute("data-mce-bogus")}(t)},gp=hp(!0,pp),vp=hp(!1,pp),yp=hp(!0,Yn),bp=hp(!1,Yn),_p=hp(!0,jn),wp=hp(!1,jn),kp=hp(!0,mp),Cp=hp(!1,mp),xp=function(t){var e=qs(t,"br"),n=Y(function(t){for(var e=[],n=t.dom;n;)e.push(Ae.fromDom(n)),n=n.lastChild;return e}(t).slice(-1),ho);e.length===n.length&&V(n,vn)},Sp=function(t){gn(t),pn(t,Ae.fromHtml('<br data-mce-bogus="1">'))},Op=function(t){en(t).each((function(e){Ye(e).each((function(n){co(t)&&ho(e)&&co(n)&&vn(e)}))}))},Ep=function(t,e,n){return je(e,t)?(r=function(t,e){for(var n=_(e)?e:N,r=t.dom,o=[];null!==r.parentNode&&void 0!==r.parentNode;){var i=r.parentNode,a=Ae.fromDom(i);if(o.push(a),!0===n(a))break;r=i}return o}(t,(function(t){return n(t)||Ie(t,e)})),r.slice(0,-1)):[];var r},Dp=function(t,e){return Ep(t,e,N)},Lp=function(t,e){return[t].concat(Dp(t,e))},Ap=function(t,e,n){return $c(t,e,n,fp)},Tp=function(t,e){return Q(Lp(Ae.fromDom(e.container()),t),co)},Np=function(t,e,n){return Ap(t,e.dom,n).forall((function(t){return Tp(e,n).fold((function(){return!1===nc(t,n,e.dom)}),(function(r){return!1===nc(t,n,e.dom)&&je(r,Ae.fromDom(t.container()))}))}))},$p=function(t,e,n){return Tp(e,n).fold((function(){return Ap(t,e.dom,n).forall((function(t){return!1===nc(t,n,e.dom)}))}),(function(e){return Ap(t,e.dom,n).isNone()}))},Ip=D($p,!1),Pp=D($p,!0),jp=D(Np,!1),Mp=D(Np,!0),Rp=function(t){return fc(t).exists(ho)},Bp=function(t,e,n){var r=Y(Lp(Ae.fromDom(n.container()),e),co),o=at(r).getOr(e);return Tc(t,o.dom,n).filter(Rp)},qp=function(t,e){return fc(e).exists(ho)||Bp(!0,t,e).isSome()},Fp=function(t,e){return function(t){return M.from(t.getNode(!0)).map(Ae.fromDom)}(e).exists(ho)||Bp(!1,t,e).isSome()},Up=D(Bp,!1),zp=D(Bp,!0),Hp=function(t){return Tl.isTextPosition(t)&&!t.isAtStart()&&!t.isAtEnd()},Vp=function(t,e){var n=Y(Lp(Ae.fromDom(e.container()),t),co);return at(n).getOr(t)},Wp=function(t,e){return Hp(e)?dp(e):dp(e)||jc(Vp(t,e).dom,e).exists(dp)},Kp=function(t,e){return Hp(e)?cp(e):cp(e)||Pc(Vp(t,e).dom,e).exists(cp)},Yp=function(t){return fc(t).bind((function(t){return Zr(t,qe)})).exists((function(t){return function(t){return U(["pre","pre-wrap"],t)}(ir(t,"white-space"))}))},Zp=function(t,e){return function(t,e){return jc(t.dom,e).isNone()}(t,e)||function(t,e){return Pc(t.dom,e).isNone()}(t,e)||Ip(t,e)||Pp(t,e)||Fp(t,e)||qp(t,e)},Gp=function(t,e){return!Yp(e)&&(Ip(t,e)||jp(t,e)||Fp(t,e)||Wp(t,e))},Xp=function(t,e){return!Yp(e)&&(Pp(t,e)||Mp(t,e)||qp(t,e)||Kp(t,e))},Qp=function(t,e){return Gp(t,e)||Xp(t,function(t){var e=t.container(),n=t.offset();return Bn(e)&&n<e.data.length?Tl(e,n+1):t}(e))},Jp=function(t,e){return Jc(t.charAt(e))},tm=function(t){var e=t.container();return Bn(e)&&Mt(e.data,_o)},em=function(t){var e=t.data,n=function(t){var e=t.split("");return H(e,(function(t,n){return Jc(t)&&n>0&&n<e.length-1&&ed(e[n-1])&&ed(e[n+1])?" ":t})).join("")}(e);return n!==e&&(t.data=n,!0)},nm=function(t,e){return M.some(e).filter(tm).bind((function(e){var n=e.container(),r=function(t,e){var n=e.data,r=Tl(e,0);return!(!Jp(n,0)||Qp(t,r)||(e.data=" "+n.slice(1),0))}(t,n)||em(n)||function(t,e){var n=e.data,r=Tl(e,n.length-1);return!(!Jp(n,n.length-1)||Qp(t,r)||(e.data=n.slice(0,-1)+" ",0))}(t,n);return r?M.some(e):M.none()}))},rm=function(t){var e=Ae.fromDom(t.getBody());t.selection.isCollapsed()&&nm(e,Tl.fromRangeStart(t.selection.getRng())).each((function(e){t.selection.setRng(e.toRange())}))},om=function(t,e,n){if(0!==n){var r=Ae.fromDom(t),o=Yr(r,co).getOr(r),i=t.data.slice(e,e+n),a=e+n>=t.data.length&&Xp(o,Tl(t,t.data.length)),s=0===e&&Gp(o,Tl(t,0));t.replaceData(e,n,function(t,e,n){return G(t,(function(r,o){return td(o)||Jc(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))}},im=function(t,e){var n=t.data.slice(e),r=n.length-Ft(n).length;om(t,e,r)},am=function(t,e){var n=t.data.slice(0,e),r=n.length-Ut(n).length;om(t,e-r,r)},sm=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&&im(i,o),i},lm=function(t,e){return function(t,e){var n=t.container(),r=t.offset();return!1===Tl.isTextPosition(t)&&n===e.parentNode&&r>Tl.before(e).offset()}(e,t)?Tl(e.container(),e.offset()-1):e},um=function(t){return Vo(t.previousSibling)?M.some((e=t.previousSibling,Bn(e)?Tl(e,e.data.length):Tl.after(e))):t.previousSibling?Rc(t.previousSibling):M.none();var e},cm=function(t){return Vo(t.nextSibling)?M.some((e=t.nextSibling,Bn(e)?Tl(e,0):Tl.before(e))):t.nextSibling?Mc(t.nextSibling):M.none();var e},dm=function(t,e){return um(e).orThunk((function(){return cm(e)})).orThunk((function(){return function(t,e){var n=Tl.before(e.previousSibling?e.previousSibling:e.parentNode);return jc(t,n).fold((function(){return Pc(t,Tl.after(e))}),M.some)}(t,e)}))},fm=function(t,e){return cm(e).orThunk((function(){return um(e)})).orThunk((function(){return function(t,e){return Pc(t,Tl.after(e)).fold((function(){return jc(t,Tl.before(e))}),M.some)}(t,e)}))},hm=function(t,e,n){return function(t,e,n){return t?fm(e,n):dm(e,n)}(t,e,n).map(D(lm,n))},pm=function(t,e,n){n.fold((function(){t.focus()}),(function(n){t.selection.setRng(n.toRange(),e)}))},mm=function(t,e){return e&&_t(t.schema.getBlockElements(),Me(e))},gm=function(t){if(ei(t)){var e=Ae.fromHtml('<br data-mce-bogus="1">');return gn(t),pn(t,e),M.some(Tl.before(e.dom))}return M.none()},vm=function(t,e,n){var r,o,i,a,s=Ye(t).filter(Fe),l=Ze(t).filter(Fe);return vn(t),(r=s,o=l,i=e,a=function(t,e,r){var o=t.dom,i=e.dom,a=o.data.length;return sm(o,i,n),r.container()===i?Tl(o,a):r},r.isSome()&&o.isSome()&&i.isSome()?M.some(a(r.getOrDie(),o.getOrDie(),i.getOrDie())):M.none()).orThunk((function(){return n&&(s.each((function(t){return am(t.dom,t.dom.length)})),l.each((function(t){return im(t.dom,0)}))),e}))},ym=function(t,e,n,r){void 0===r&&(r=!0);var o,i=hm(e,t.getBody(),n.dom),a=Yr(n,D(mm,t),(o=t.getBody(),function(t){return t.dom===o})),s=vm(n,i,function(t,e){return _t(t.schema.getTextInlineElements(),Me(e))}(t,n));t.dom.isEmpty(t.getBody())?(t.setContent(""),t.selection.setCursorLocation()):a.bind(gm).fold((function(){r&&pm(t,e,s)}),(function(n){r&&pm(t,e,M.some(n))}))},bm=function(t){return qs(t,"td,th")},_m=function(t,e){return{start:t,end:e}},wm=Sr([{singleCellTable:["rng","cell"]},{fullTable:["table"]},{partialTable:["cells","outsideDetails"]},{multiTable:["startTableCells","endTableCells","betweenRng"]}]),km=function(t,e){return Jr(Ae.fromDom(t),"td,th",e)},Cm=function(t){return!Ie(t.start,t.end)},xm=function(t,e){return Bd(t.start,e).bind((function(n){return Bd(t.end,e).bind((function(t){return e=Ie(n,t),r=n,e?M.some(r):M.none();var e,r}))}))},Sm=function(t){return function(e){return xm(e,t).map((function(t){return function(t,e,n){return{rng:t,table:e,cells:n}}(e,t,bm(t))}))}},Om=function(t,e,n,r){if(n.collapsed||!t.forall(Cm))return M.none();if(e.isSameTable){var o=t.bind(Sm(r));return M.some({start:o,end:o})}var i=km(n.startContainer,r),a=km(n.endContainer,r),s=i.bind(function(t){return function(e){return Bd(e,t).bind((function(t){return st(bm(t)).map((function(t){return _m(e,t)}))}))}}(r)).bind(Sm(r)),l=a.bind(function(t){return function(e){return Bd(e,t).bind((function(t){return at(bm(t)).map((function(t){return _m(t,e)}))}))}}(r)).bind(Sm(r));return M.some({start:s,end:l})},Em=function(t,e){return J(t,(function(t){return Ie(t,e)}))},Dm=function(t){return Gn(Em(t.cells,t.rng.start),Em(t.cells,t.rng.end),(function(e,n){return t.cells.slice(e,n+1)}))},Lm=function(t,e,n){return t.exists((function(t){return function(t,e){return!Cm(t)&&xm(t,e).exists((function(t){var e=t.dom.rows;return 1===e.length&&1===e[0].cells.length}))}(t,n)&&Ud(t.start,e)}))},Am=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},Tm=function(t,e){var n=function(t){return function(e){return Ie(t,e)}}(t),r=function(t,e){var n=km(t.startContainer,e),r=km(t.endContainer,e);return Gn(n,r,_m)}(e,n),o=function(t,e){var n=function(t){return Bd(Ae.fromDom(t),e)},r=n(t.startContainer),o=n(t.endContainer),i=r.isSome(),a=o.isSome(),s=Gn(r,o,Ie).getOr(!1);return{startTable:r,endTable:o,isStartInTable:i,isEndInTable:a,isSameTable:s,isMultiTable:!s&&i&&a}}(e,n);return Lm(r,e,n)?r.map((function(t){return wm.singleCellTable(e,t.start)})):o.isMultiTable?function(t,e,n,r){return Om(t,e,n,r).bind((function(t){var r=t.start,o=t.end,i=r.bind(Dm).getOr([]),a=o.bind(Dm).getOr([]);if(i.length>0&&a.length>0){var s=Am(n,e);return M.some(wm.multiTable(i,a,s))}return M.none()}))}(r,o,e,n):function(t,e,n,r){return Om(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=Dm(t).getOr([]);if(r&&t.cells.length===o.length)return M.some(wm.fullTable(t.table));if(o.length>0){if(r)return M.some(wm.partialTable(o,M.none()));var i=Am(n,e);return M.some(wm.partialTable(o,M.some(At(At({},e),{rng:i}))))}return M.none()}))}(r,o,e,n)},Nm=function(t){var e;return(8===Re(e=t)||"#comment"===Me(e)?Ye(t):en(t)).bind(Nm).orThunk((function(){return M.some(t)}))},$m=function(t){return V(t,(function(t){rr(t,"contenteditable"),Sp(t)}))},Im=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)),Rm(t,o,e,!1)},Pm=function(t){var e=Rd(t),n=Ae.fromDom(t.selection.getNode());Kn(n.dom)&&ei(n)?t.selection.setCursorLocation(n.dom,0):t.selection.collapse(!0),e.length>1&&z(e,(function(t){return Ie(t,n)}))&&Jn(n,"data-mce-selected","1")},jm=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 M.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):(Sp(n),t.selection.setCursorLocation(n.dom,0))}))}(t,i,a.filter(ei));var s=i?e[0]:e[e.length-1];return Im(t,s,r,i),ei(s)?M.none():M.some(i?e.slice(1):e.slice(0,-1))})).getOr(e);return $m(o),Pm(t),!0},Mm=function(t,e,n,r){var o=t.selection.getRng(),i=e[0],a=n[n.length-1];Im(t,i,o,!0),Im(t,a,o,!1);var s=ei(i)?e:e.slice(1),l=ei(a)?n:n.slice(0,-1);return $m(s.concat(l)),r.deleteContents(),Pm(t),!0},Rm=function(t,e,n,r){void 0===r&&(r=!0),e.deleteContents();var o,i=Nm(n).getOr(n),a=Ae.fromDom(t.dom.getParent(i.dom,t.dom.isBlock));if(ei(a)&&(Sp(a),r&&t.selection.setCursorLocation(a.dom,0)),!Ie(n,a)){var s=Zn(Ke(a),n)?[]:Ke(o=a).map(Qe).map((function(t){return Y(t,(function(t){return!Ie(o,t)}))})).getOr([]);V(s.concat(Qe(n)),(function(t){Ie(t,a)||je(t,a)||!ei(t)||vn(t)}))}return!0},Bm=function(t,e){return ym(t,!1,e),!0},qm=function(t,e,n,r){return Um(e,r).fold((function(){return function(t,e,n){return Tm(e,n).map((function(e){return e.fold(D(Rm,t),D(Bm,t),D(jm,t),D(Mm,t))}))}(t,e,n)}),(function(e){return function(t,e){return zm(t,e)}(t,e)})).getOr(!1)},Fm=function(t,e){return Q(Lp(e,t),yo)},Um=function(t,e){return Q(Lp(e,t),(n="caption",function(t){return qe(t)&&Me(t)===n}));var n},zm=function(t,e){return Sp(e),t.selection.setCursorLocation(e.dom,0),M.some(!0)},Hm=function(t,e,n,r,o){return Nc(n,t.getBody(),o).bind((function(i){return function(t,e,n,r){return Mc(t.dom).bind((function(o){return Rc(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 zm(t,e)}(t,r):function(t,e,n){return Um(t,Ae.fromDom(n.getNode())).map((function(t){return!1===Ie(t,e)}))}(e,r,i)})).or(M.some(!0))},Vm=function(t,e,n,r){var o=Tl.fromRangeStart(t.selection.getRng());return Fm(n,r).bind((function(r){return ei(r)?zm(t,r):function(t,e,n,r,o){return Nc(n,t.getBody(),o).bind((function(t){return Fm(e,Ae.fromDom(t.getNode())).map((function(t){return!1===Ie(t,r)}))}))}(t,n,e,r,o)})).getOr(!1)},Wm=function(t,e){return t?_p(e):wp(e)},Km=function(t,e,n){var r=Ae.fromDom(t.getBody());return Um(r,n).fold((function(){return Vm(t,e,r,n)||function(t,e){var n=Tl.fromRangeStart(t.selection.getRng());return Wm(e,n)||Tc(e,t.getBody(),n).exists((function(t){return Wm(e,t)}))}(t,e)}),(function(n){return function(t,e,n,r){var o=Tl.fromRangeStart(t.selection.getRng());return ei(r)?zm(t,r):Hm(t,n,e,r,o)}(t,e,r,n).getOr(!1)}))},Ym=function(t,e){var n=Ae.fromDom(t.selection.getStart(!0)),r=Rd(t);return t.selection.isCollapsed()&&0===r.length?Km(t,e,n):function(t,e,n){var r=Ae.fromDom(t.getBody()),o=t.selection.getRng();return 0!==n.length?jm(t,n,M.none()):qm(t,r,o,e)}(t,n,r)},Zm=function(t){var e=Tl.fromRangeStart(t),n=Tl.fromRangeEnd(t),r=t.commonAncestorContainer;return Tc(!1,r,n).map((function(o){return!nc(e,n,r)&&nc(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)},Gm=function(t){return t.collapsed?t:Zm(t)},Xm=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)},Qm=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)||Xm(t,e))}(t,r)&&(r=r.prev),!(!n||n!==r)&&("ul"===n.name||"ol"===n.name)},Jm=function(t){return t&&t.firstChild&&t.firstChild===t.lastChild&&function(t){return t.data===_o||zn(t)}(t.firstChild)},tg=function(t){return t.length>0&&(!(e=t[t.length-1]).firstChild||Jm(e))?t.slice(0,-1):t;var e},eg=function(t,e){var n=t.getParent(e,t.isBlock);return n&&"LI"===n.nodeName?n:null},ng=function(t,e){var n=Tl.after(t),r=Oc(e).prev(n);return r?r.toRange():null},rg=function(t,e,n){var r=t.parentNode;return De.each(e,(function(e){r.insertBefore(e,t)})),function(t,e){var n=Tl.before(t),r=Oc(e).next(n);return r?r.toRange():null}(t,n)},og=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=eg(e,n.startContainer),s=tg((o=i.firstChild,Y(o.childNodes,(function(t){return"LI"===t.nodeName})))),l=e.getRoot(),u=function(t){var r=Tl.fromRangeStart(n),o=Oc(e.getRoot()),i=1===t?o.prev(r):o.next(r);return!i||eg(e,i.getNode())!==a};return u(1)?rg(a,s,l):u(2)?function(t,e,n,r){return r.insertAfter(e.reverse(),t),ng(e[0],n)}(a,s,l,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),De.each(e,(function(e){i.insertBefore(e,t)})),i.insertBefore(o[1],t),i.removeChild(t),ng(e[e.length-1],n)}(a,s,l,n)},ig=Kn,ag=function(t){var e=t.dom,n=Gm(t.selection.getRng());t.selection.setRng(n);var r=e.getParent(n.startContainer,ig);!function(t,e,n){return null!==n&&n===t.getParent(e.endContainer,ig)&&Ud(Ae.fromDom(n),e)}(e,n,r)?t.getDoc().execCommand("Delete",!1,null):Rm(t,n,Ae.fromDom(r))},sg=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=Gp(r,Tl.fromRangeStart(e))?n.replace(/^ /," "):n.replace(/^ /," "),Xp(r,Tl.fromRangeEnd(e))?n.replace(/( | )(<br( \/)>)?$/," "):n.replace(/ (<br( \/)?>)?$/," ")}(s,a.getRng(),e));var l=t.parser,u=n.merge,c=rp({validate:wu(t)},t.schema),d='<span id="mce_marker" data-mce-type="bookmark"></span>',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 h=(o=a.getRng()).startContainer||(o.parentElement?o.parentElement():null),p=t.getBody();h===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()||ag(t);var m,g={context:(r=a.getNode()).nodeName.toLowerCase(),data:n.data,insert:!0},v=l.parse(e,g);if(!0===n.paste&&Qm(t.schema,v)&&function(t,e){return!!eg(t,e)}(s,r))return o=og(c,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 y=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(y,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=c.serialize(l.parse(e.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,(function(){return c.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=c.serialize(v),r);!function(t,e){var n=t.schema.getTextInlineElements(),r=t.dom;if(e){var o=t.getBody(),i=tp(r);De.each(r.select("*[data-mce-fragment]"),(function(t){if(b(n[t.nodeName.toLowerCase()])&&sp(r,t))for(var e=t.parentNode;b(e)&&e!==o&&!lp(r,t,e);e=e.parentNode)if(i.compare(e,t)){r.remove(t,!0);break}}))}}(t,u),function(t,e){var n,r=t.dom,o=t.selection;if(e){o.scrollIntoView(e);var i=ef(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),!Ce.ie){var l=e.nextSibling;Bn(l)&&(s.appendData(l.data),l.parentNode.removeChild(l))}}else a.setStartBefore(e),a.setEndBefore(e);var u=r.getParent(e,r.isBlock);r.remove(e),u&&r.isEmpty(u)&&(t.$(u).empty(),a.setStart(u,0),a.setEnd(u,0),ig(u)||function(t){return!!t.getAttribute("data-mce-fragment")}(u)||!(n=function(e){var n=Tl.fromRangeStart(e);if(n=Oc(t.getBody()).next(n))return n.toRange()}(a))?r.add(u,r.create("br",{"data-mce-bogus":"1"})):(a=n,r.remove(u))),o.setRng(a)}}(t,s.get("mce_marker")),m=t.getBody(),De.each(m.getElementsByTagName("*"),(function(t){t.removeAttribute("data-mce-fragment")})),function(t,e){M.from(t.getParent(e,"td,th")).map(Ae.fromDom).each(Op)}(s,a.getStart()),t.fire("SetContent",f),t.addVisual()}},lg=function(t,e){e(t),t.firstChild&&lg(t.firstChild,e),t.next&&lg(t.next,e)},ug=function(t,e,n){var r=function(t,e,n){var r={},o={},i=[];for(var a in n.firstChild&&lg(n.firstChild,(function(n){V(t,(function(t){t.name===n.name&&(r[t.name]?r[t.name].nodes.push(n):r[t.name]={filter:t,nodes:[n]})})),V(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);V(r,(function(t){V(t.filter.callbacks,(function(e){e(t.nodes,t.filter.name,{})}))}))},cg=function(t){return t instanceof Ph},dg=function(t,e,n){t.dom.setHTML(t.getBody(),e),!0!==n&&function(t){kh(t)&&Mc(t.getBody()).each((function(e){var n=e.getNode(),r=jn(n)?Mc(n).getOr(e):e;t.selection.setRng(r.toRange())}))}(t)},fg=function(t,e,n){var r=function(t,e){return At(At({format:"html"},t),{set:!0,content:cg(e)?"":e})}(n,e),o=n.no_events?r:t.fire("BeforeSetContent",r);return cg(e)||(e=o.content),M.from(t.getBody()).fold(S(e),(function(n){return cg(e)?function(t,e,n,r){ug(t.parser.getNodeFilters(),t.parser.getAttributeFilters(),n);var o=rp({validate:t.validate},t.schema).serialize(n);return r.content=bo(Ae.fromDom(e))?o:De.trim(o),dg(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='<br data-mce-bogus="1">';"TABLE"===e.nodeName?n="<tr><td>"+o+"</td></tr>":/^(UL|OL)$/.test(e.nodeName)&&(n="<li>"+o+"</li>");var i=ou(t);i&&t.schema.isValidChild(e.nodeName.toLowerCase(),i.toLowerCase())?(n=o,n=t.dom.createHTML(i,iu(t),n)):n||(n='<br data-mce-bogus="1">'),dg(t,n,r.no_selection),t.fire("SetContent",r)}else"raw"!==r.format&&(n=rp({validate:t.validate},t.schema).serialize(t.parser.parse(n,{isRootContent:!0,insert:!0}))),r.content=bo(Ae.fromDom(e))?n:De.trim(n),dg(t,r.content,r.no_selection),r.no_events||t.fire("SetContent",r);return r.content}(t,n,e,o)}))},hg=function(t,e){return function(t,e){var n=t.dom;return n.parentNode?Gr(Ae.fromDom(n.parentNode),(function(n){return!Ie(t,n)&&e(n)})):M.none()}(t,e).isSome()},pg=function(t){return _(t)?t:N},mg=function(t,e,n){var r=e(t),o=pg(n);return r.orThunk((function(){return o(t)?M.none():function(t,e,n){for(var r=t.dom,o=pg(n);r.parentNode;){r=r.parentNode;var i=Ae.fromDom(r),a=e(i);if(a.isSome())return a;if(o(i))break}return M.none()}(t,e,o)}))},gg=ud,vg=function(t,e,n){var r=t.formatter.get(n);if(r)for(var o=0;o<r.length;o++){var i=r[o];if(gd(i)&&!1===i.inherit&&t.dom.is(e,i.selector))return!0}return!1},yg=function(t,e,n,r,o){var i=t.dom.getRoot();return e!==i&&(e=t.dom.getParent(e,(function(e){return!!vg(t,e,n)||(e.parentNode===i||!!wg(t,e,n,r,!0))})),!!wg(t,e,n,r,o))},bg=function(t,e,n){return!!gg(e,n.inline)||(!!gg(e,n.block)||(n.selector?1===e.nodeType&&t.is(e,n.selector):void 0))},_g=function(t,e,n,r,o,i){var a=n[r];if(_(n.onmatch))return n.onmatch(e,n,r);if(a)if(v(a.length)){for(var s in a)if(_t(a,s)){var l="attributes"===r?t.getAttrib(e,s):dd(t,e,s),u=ld(a[s],i),c=y(l)||Ht(l);if(c&&y(u))continue;if(o&&c&&!n.exact)return!1;if((!o||n.exact)&&!gg(l,cd(t,u,s)))return!1}}else for(var d=0;d<a.length;d++)if("attributes"===r?t.getAttrib(e,a[d]):dd(t,e,a[d]))return!0;return!0},wg=function(t,e,n,r,o){var i=t.formatter.get(n),a=t.dom;if(i&&e)for(var s=0;s<i.length;s++){var l=i[s];if(bg(t.dom,e,l)&&_g(a,e,l,"attributes",o,r)&&_g(a,e,l,"styles",o,r)){var u=l.classes;if(u)for(var c=0;c<u.length;c++)if(!t.dom.hasClass(e,ld(u[c],r)))return;return l}}},kg=function(t,e,n,r,o){if(r)return yg(t,r,e,n,o);if(r=t.selection.getNode(),yg(t,r,e,n,o))return!0;var i=t.selection.getStart();return!(i===r||!yg(t,i,e,n,o))},Cg=function(t,e){var n=function(e){return Ie(e,Ae.fromDom(t.getBody()))};return M.from(t.selection.getStart(!0)).bind((function(r){return mg(Ae.fromDom(r),(function(n){return ut(e,(function(e){return function(e,n){return wg(t,e.dom,n)?M.some(n):M.none()}(n,e)}))}),n)})).getOrNull()},xg=function(t,e,n){return G(n,(function(n,r){var o=function(t,e){return z(t.formatter.get(e),(function(t){var e=function(t){return t.length>1&&"%"===t.charAt(0)};return z(["styles","attributes"],(function(n){return bt(t,n).exists((function(t){var n=p(t)?t:yt(t);return z(n,e)}))}))}))}(t,r);return t.formatter.matchNode(e,r,{},o)?n.concat([r]):n}),[])},Sg=wo,Og="_mce_caret",Eg=function(t){return function(t){for(var e=[];t;){if(3===t.nodeType&&t.nodeValue!==Sg||t.childNodes.length>1)return[];1===t.nodeType&&e.push(t),t=t.firstChild}return e}(t).length>0},Dg=function(t){if(t){var e=new so(t,t);for(t=e.current();t;t=e.next())if(Bn(t))return t}return null},Lg=function(t){var e=Ae.fromTag("span");return tr(e,{id:Og,"data-mce-bogus":"1","data-mce-type":"format-caret"}),t&&pn(e,Ae.fromText(Sg)),e},Ag=function(t,e,n){void 0===n&&(n=!0);var r=t.dom,o=t.selection;if(Eg(e))ym(t,!1,Ae.fromDom(e),n);else{var i=o.getRng(),a=r.getParent(e,r.isBlock),s=i.startContainer,l=i.startOffset,u=i.endContainer,c=i.endOffset,d=function(t){var e=Dg(t);return e&&e.nodeValue.charAt(0)===Sg&&e.deleteData(0,1),e}(e);r.remove(e,!0),s===d&&l>0&&i.setStart(d,l-1),u===d&&c>0&&i.setEnd(d,c-1),a&&r.isEmpty(a)&&Sp(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)Ag(t,e,n);else if(!(e=Fc(t.getBody(),o.getStart())))for(;e=r.get(Og);)Ag(t,e,!1)},Ng=function(t,e){return t.appendChild(e),e},$g=function(t,e){var n=Z(t,(function(t,e){return Ng(t,e.cloneNode(!1))}),e);return Ng(n,n.ownerDocument.createTextNode(Sg))},Ig=function(t,e,n,r){var o,i,a,s=t.dom,l=t.selection,u=[],c=l.getRng(),d=c.startContainer,f=c.startOffset;for(i=d,3===d.nodeType&&(f!==d.nodeValue.length&&(o=!0),i=i.parentNode);i;){if(wg(t,i,e,n,r)){a=i;break}i.nextSibling&&(o=!0),u.push(i),i=i.parentNode}if(a)if(o){var h=l.getBookmark();c.collapse(!0);var p=$d(t,c,t.formatter.get(e),!0);p=Cf(p),t.formatter.remove(e,n,p,r),l.moveToBookmark(h)}else{var m=Fc(t.getBody(),a),g=Lg(!1).dom;!function(t,e,n){var r=t.dom,o=r.getParent(n,D(id,t));o&&r.isEmpty(o)?n.parentNode.replaceChild(e,n):(xp(Ae.fromDom(n)),r.isEmpty(n)?n.parentNode.replaceChild(e,n):r.insertAfter(e,n))}(t,g,null!==m?m:a);var v=function(t,e,n,r,o,i){var a=t.formatter,s=t.dom,l=Y(ct(a.get()),(function(t){return t!==r&&!Mt(t,"removeformat")})),u=xg(t,n,l);if(Y(u,(function(e){return!pd(t,e,r)})).length>0){var c=n.cloneNode(!1);return s.add(e,c),a.remove(r,o,c,i),s.remove(c),M.some(c)}return M.none()}(t,g,a,e,n,r),y=$g(u.concat(v.toArray()),g);Ag(t,m,!1),l.setCursorLocation(y,1),s.isEmpty(a)&&s.remove(a)}},Pg=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!==Sg||Tg(t,Fc(r,n.getStart())),37!==e&&39!==e||Tg(t,Fc(r,n.getStart()))}(t,e.keyCode)}))},jg=function(t,e){var n=t.schema.getTextInlineElements();return _t(n,Me(e))&&!qc(e.dom)&&!Pn(e.dom)},Mg={},Rg=St,Bg=Ct;!function(t,e){Mg[t]||(Mg[t]=[]),Mg[t].push(e)}("pre",(function(t){var e,n=t.selection.getRng(),r=Nn(["pre"]);n.collapsed||(e=t.selection.getSelectedBlocks(),Bg(Rg(Rg(e,r),(function(t){return r(t.previousSibling)&&-1!==Ot(e,t.previousSibling)})),(function(t){var e,n;e=t.previousSibling,ds(n=t).remove(),ds(e).append("<br><br>").append(n.childNodes)})))}));var qg=De.each,Fg=function(t){return Tn(t)&&!Qc(t)&&!qc(t)&&!Pn(t)},Ug=function(t,e){for(var n=t;n;n=n[e]){if(Bn(n)&&zt(n.data))return t;if(Tn(n)&&!Qc(n))return n}return t},zg=function(t,e,n){var r=tp(t);if(e&&n&&(e=Ug(e,"previousSibling"),n=Ug(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),De.each(De.grep(n.childNodes),(function(t){e.appendChild(t)})),e}return n},Hg=function(t,e,n,r){if(r&&!1!==e.merge_siblings){var o=zg(t,od(r),r);zg(t,o,od(o,!0))}},Vg=function(t,e,n){qg(t.childNodes,(function(t){Fg(t)&&(e(t)&&n(t),t.hasChildNodes()&&Vg(t,e,n))}))},Wg=function(t,e){return function(n){return!(!n||!dd(t,n,e))}},Kg=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)}},Yg=Sr([{keep:[]},{rename:["name"]},{removed:[]}]),Zg=/^(src|href|style)$/,Gg=De.each,Xg=ud,Qg=function(t,e,n){return t.isChildOf(e,n)&&e!==n&&!t.isBlock(n)},Jg=function(t,e,n){var r=e[n?"startContainer":"endContainer"],o=e[n?"startOffset":"endOffset"];if(Tn(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},tv=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},ev=function(t,e,n,r){var o=t.create(n,r);return e.parentNode.insertBefore(o,e),o.appendChild(e),o},nv=function(t,e,n,r,o){var i=Ae.fromDom(e),a=Ae.fromDom(t.create(r,o)),s=n?Xe(i):Ge(i);return mn(a,s),n?(dn(i,a),hn(a,i)):(fn(i,a),pn(a,i)),a.dom},rv=function(t,e,n,r){var o=od(e,n,r);return y(o)||"BR"===o.nodeName||t.isBlock(o)},ov=function(t,e,n){var r,o=e.parentNode,i=t.dom,a=ou(t);md(n)&&(a?o===i.getRoot()&&(n.list_block&&Xg(e,n.list_block)||V(lt(e.childNodes),(function(e){ad(t,a,e.nodeName.toLowerCase())?r?r.appendChild(e):(r=ev(i,e,a),i.setAttribs(r,t.settings.forced_root_block_attrs)):r=null}))):i.isBlock(e)&&!i.isBlock(o)&&(rv(i,e,!1)||rv(i,e.firstChild,!0,!0)||e.insertBefore(i.create("br"),e.firstChild),rv(i,e,!0)||rv(i,e.lastChild,!1,!0)||e.appendChild(i.create("br")))),function(t){return gd(t)&&vd(t)&&Zn(bt(t,"mixed"),!0)}(n)&&!Xg(n.inline,e)||i.remove(e,!0)},iv=function(t,e,n,r,o){var i,a=t.dom;if(!function(t,e,n){return!(!vd(n)||!Xg(e,n.inline))||!(!md(n)||!Xg(e,n.block))||(gd(n)?Tn(e)&&t.is(e,n.selector):void 0)}(a,r,e)&&!function(t,e){return e.links&&"A"===t.nodeName}(r,e))return Yg.keep();var s=r;if(vd(e)&&"all"===e.remove&&p(e.preserve_attributes)){var l=Y(a.getAttribs(s),(function(t){return U(e.preserve_attributes,t.name.toLowerCase())}));if(a.removeAllAttribs(s),V(l,(function(t){return a.setAttrib(s,t.name,t.value)})),l.length>0)return Yg.rename("span")}if("all"!==e.remove){Gg(e.styles,(function(t,r){t=cd(a,ld(t,n),r+""),w(r)&&(r=t,o=null),(e.remove_similar||!o||Xg(dd(a,o,r),t))&&a.setStyle(s,r,""),i=!0})),i&&""===a.getAttrib(s,"style")&&(s.removeAttribute("style"),s.removeAttribute("data-mce-style")),Gg(e.attributes,(function(t,r){var i;if(t=ld(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="",V(t.split(/\s+/),(function(t){/mce\-\w+/.test(t)&&(i+=(i?" ":"")+t)})),i))return void a.setAttrib(s,r,i);if(Zg.test(r)&&s.removeAttribute("data-mce-"+r),"style"===r&&Nn(["li"])(s)&&"none"===a.getStyle(s,"list-style-type"))return s.removeAttribute(r),void a.setStyle(s,"list-style-type","none");"class"===r&&s.removeAttribute("className"),s.removeAttribute(r)}})),Gg(e.classes,(function(t){t=ld(t,n),o&&!a.hasClass(o,t)||a.removeClass(s,t)}));for(var u=a.getAttribs(s),c=0;c<u.length;c++){var d=u[c].nodeName;if(0!==d.indexOf("_")&&0!==d.indexOf("data-"))return Yg.keep()}}return"none"!==e.remove?(ov(t,s,e),Yg.removed()):Yg.keep()},av=function(t,e,n,r,o){return iv(t,e,n,r,o).fold(N,(function(e){return t.dom.rename(r,e),!0}),$)},sv=function(t,e,n,r){return iv(t,e,n,r,r).fold(S(r),(function(e){return t.dom.createFragment().appendChild(r),t.dom.rename(r,e)}),S(null))},lv=function(t,e,n,r,o){var i=t.formatter.get(e),a=i[0],s=!0,l=t.dom,u=t.selection,c=function(r){var s=function(t,e,n,r,o){var i;return V(hd(t.dom,e.parentNode).reverse(),(function(e){if(!i&&"_start"!==e.id&&"_end"!==e.id){var a=wg(t,e,n,r,o);a&&!1!==a.split&&(i=e)}})),i}(t,r,e,n,o);return function(t,e,n,r,o,i,a,s){var l,u,c,d=t.dom;if(n){for(var f=n.parentNode,h=r.parentNode;h&&h!==f;h=h.parentNode){l=d.clone(h,!1);for(var p=0;p<e.length&&null!==(l=sv(t,e[p],s,l));p++);l&&(u&&l.appendChild(u),c||(c=l),u=l)}!i||a.mixed&&d.isBlock(n)||(r=d.split(n,r)),u&&(o.parentNode.insertBefore(u,o),c.appendChild(o),vd(a)&&Hg(d,a,0,u))}return r}(t,i,s,r,r,!0,a,n)},d=function(e){return z(i,(function(r){return av(t,r,n,e,e)}))},f=function(e){var n=!0,r=!1;Tn(e)&&l.getContentEditable(e)&&(n=s,s="true"===l.getContentEditable(e),r=!0);var o=lt(e.childNodes);if(s&&!r){var u=d(e)||z(i,(function(t){return bg(l,e,t)})),c=e.parentNode;!u&&b(c)&&yd(a)&&d(c)}if(a.deep&&o.length){for(var h=0;h<o.length;h++)f(o[h]);r&&(s=n)}V(["underline","line-through","overline"],(function(n){Tn(e)&&t.dom.getStyle(e,"text-decoration")===n&&e.parentNode&&fd(l,e.parentNode)===n&&av(t,{deep:!1,exact:!0,inline:"span",styles:{textDecoration:n}},null,e)}))},h=function(t){var e=l.get(t?"_start":"_end"),n=e[t?"firstChild":"lastChild"];return function(t){return Qc(t)&&Tn(t)&&("_start"===t.id||"_end"===t.id)}(n)&&(n=n[t?"firstChild":"lastChild"]),Bn(n)&&0===n.data.length&&(n=t?e.previousSibling||e.nextSibling:e.nextSibling||e.previousSibling),l.remove(e,!0),n},p=function(e){var n,r,o=$d(t,e,i,e.collapsed);if(a.split){if(o=Cf(o),(n=Jg(t,o,!0))!==(r=Jg(t,o))){if(n=tv(n,!0),r=tv(r,!1),Qg(l,n,r)){var s=M.from(n.firstChild).getOr(n);return c(nv(l,s,!0,"span",{id:"_start","data-mce-type":"bookmark"})),void h(!0)}if(Qg(l,r,n)){s=M.from(r.lastChild).getOr(r);return c(nv(l,s,!1,"span",{id:"_end","data-mce-type":"bookmark"})),void h(!1)}n=ev(l,n,"span",{id:"_start","data-mce-type":"bookmark"}),r=ev(l,r,"span",{id:"_end","data-mce-type":"bookmark"});var u=l.createRng();u.setStartAfter(n),u.setEndBefore(r),Id(l,u,(function(t){V(t,(function(t){Qc(t)||Qc(t.parentNode)||c(t)}))})),c(n),c(r),n=h(!0),r=h()}else n=r=c(n);o.startContainer=n.parentNode?n.parentNode:n,o.startOffset=l.nodeIndex(n),o.endContainer=r.parentNode?r.parentNode:r,o.endOffset=l.nodeIndex(r)+1}Id(l,o,(function(t){V(t,f)}))};if(r){if(nd(r)){var m=l.createRng();m.setStartBefore(r),m.setEndAfter(r),p(m)}else p(r);af(t,e,r,n)}else if("false"!==l.getContentEditable(u.getNode()))u.isCollapsed()&&vd(a)&&!Rd(t).length?Ig(t,e,n,o):(Wd(u,!0,(function(){Vd(t,p)})),vd(a)&&kg(t,e,n,u.getStart())&&rd(l,u,u.getRng()),t.nodeChanged()),af(t,e,r,n);else{r=u.getNode();for(var g=0;g<i.length&&(!i[g].ceFalseOverride||!av(t,i[g],n,r,r));g++);af(t,e,r,n)}},uv=De.each,cv=function(t,e,n,r){uv(e,(function(e){vd(e)&&uv(t.dom.select(e.inline,r),(function(r){Fg(r)&&av(t,e,n,r,e.exact?r:null)})),function(t,e,n){if(e.clear_child_styles){var r=e.links?"*:not(a)":"*";qg(t.select(r,n),(function(n){Fg(n)&&qg(e.styles,(function(e,r){t.setStyle(n,r,"")}))}))}}(t.dom,e,r)}))},dv=De.each,fv=function(t){return Tn(t)&&!Qc(t)&&!qc(t)&&!Pn(t)},hv=function(t,e,n,r){var o=t.formatter.get(e),i=o[0],a=!r&&t.selection.isCollapsed(),s=t.dom,l=t.selection,u=function(t,e){if(void 0===e&&(e=i),_(e.onformat)&&e.onformat(t,e,n,r),dv(e.styles,(function(e,r){s.setStyle(t,r,ld(e,n))})),e.styles){var o=s.getAttrib(t,"style");o&&s.setAttrib(t,"data-mce-style",o)}dv(e.attributes,(function(e,r){s.setAttrib(t,r,ld(e,n))})),dv(e.classes,(function(e){e=ld(e,n),s.hasClass(t,e)||s.addClass(t,e)}))},c=function(t,e){var n=!1;return dv(t,(function(t){return!!gd(t)&&(b(t.collapsed)&&t.collapsed!==a?void 0:s.is(e,t.selector)&&!qc(e)?(u(e,t),n=!0,!1):void 0)})),n},d=function(t){if(f(t)){var e=s.create(t);return u(e),e}return null},h=function(r,a,s){var l=[],f=!0,h=i.inline||i.block,p=d(h);Id(r,a,(function(a){var d,m=function(a){var g=!1,v=f,y=a.nodeName.toLowerCase(),_=a.parentNode,w=_.nodeName.toLowerCase();if(Tn(a)&&r.getContentEditable(a)&&(v=f,f="true"===r.getContentEditable(a),g=!0),zn(a)&&!function(t,e,n,r){if(function(t){return t.getParam("format_empty_lines",!1,"boolean")}(t)&&vd(e)){var o=Li(t.schema),i=hg(Ae.fromDom(n),(function(t){return qc(t.dom)}));return wt(o,r)&&ei(Ae.fromDom(n.parentNode),!1)&&!i}return!1}(t,i,a,w))return d=null,void(md(i)&&r.remove(a));if(md(i)&&i.wrapper&&wg(t,a,e,n))d=null;else{if(f&&!g&&md(i)&&!i.wrapper&&id(t,y)&&ad(t,w,h)){var k=r.rename(a,h);return u(k),l.push(k),void(d=null)}if(gd(i)){var C=c(o,a);if(!C&&b(_)&&yd(i)&&(C=c(o,_)),!vd(i)||C)return void(d=null)}!f||g||!ad(t,h,y)||!ad(t,w,h)||!s&&Bn(a)&&ko(a.data)||qc(a)||vd(i)&&r.isBlock(a)?(d=null,V(lt(a.childNodes),m),g&&(f=v),d=null):(d||(d=r.clone(p,!1),a.parentNode.insertBefore(d,a),l.push(d)),d.appendChild(a))}};V(a,m)})),!0===i.links&&V(l,(function(t){var e=function(t){"A"===t.nodeName&&u(t,i),V(lt(t.childNodes),e)};e(t)})),V(l,(function(a){var s=function(t){var e=0;return V(t.childNodes,(function(t){(function(t){return b(t)&&Bn(t)&&0===t.length})(t)||Qc(t)||e++})),e}(a);!(l.length>1)&&r.isBlock(a)||0!==s?(vd(i)||md(i)&&i.wrapper)&&(i.exact||1!==s||(a=function(t){var e=Q(t.childNodes,fv).filter((function(t){return bg(r,t,i)}));return e.map((function(e){var n=r.clone(e,!1);return u(n),r.replace(n,t,!0),r.remove(e,!0),n})).getOr(t)}(a)),cv(t,o,n,a),function(t,e,n,r,o){wg(t,o.parentNode,n,r)&&av(t,e,r,o)||e.merge_with_parents&&t.dom.getParent(o.parentNode,(function(i){if(wg(t,i,n,r))return av(t,e,r,o),!0}))}(t,i,e,n,a),function(t,e,n,r){e.styles&&e.styles.backgroundColor&&Vg(r,Wg(t,"fontSize"),Kg(t,"backgroundColor",ld(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=fd(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)&&(De.walk(r,o,"childNodes"),o(r))}(r,i,0,a),function(t,e,n,r){!vd(e)||"sub"!==e.inline&&"sup"!==e.inline||(Vg(r,Wg(t,"fontSize"),Kg(t,"fontSize","")),t.remove(t.select("sup"===e.inline?"sub":"sup",r),!0))}(r,i,0,a),Hg(r,i,0,a)):r.remove(a,!0)}))};if("false"!==s.getContentEditable(l.getNode())){if(i){if(r)if(nd(r)){if(!c(o,r)){var p=s.createRng();p.setStartBefore(r),p.setEndAfter(r),h(s,$d(t,p,o),!0)}}else h(s,r,!0);else if(a&&vd(i)&&!Rd(t).length)!function(t,e,n){var r,o,i=t.selection,a=i.getRng(),s=a.startOffset,l=a.startContainer.nodeValue;(r=Fc(t.getBody(),i.getStart()))&&(o=Dg(r));var u,c,d=/[^\s\u00a0\u00ad\u200b\ufeff]/;if(l&&s>0&&s<l.length&&d.test(l.charAt(s))&&d.test(l.charAt(s-1))){var f=i.getBookmark();a.collapse(!0);var h=$d(t,a,t.formatter.get(e));h=Cf(h),t.formatter.apply(e,n,h),i.moveToBookmark(f)}else r&&o.nodeValue===Sg||(u=t.getDoc(),c=Lg(!0).dom,o=(r=u.importNode(c,!0)).firstChild,a.insertNode(r),s=1),t.formatter.apply(e,n,r),i.setCursorLocation(o,s)}(t,e,n);else{var m=l.getNode(),g=o[0];t.settings.forced_root_block||!g.defaultBlock||s.getParent(m,s.isBlock)||hv(t,g.defaultBlock),l.setRng(Gm(l.getRng())),Wd(l,!0,(function(){Vd(t,(function(e,n){var r=n?e:$d(t,e,o);h(s,r,!1)}))})),rd(s,l,l.getRng()),t.nodeChanged()}!function(t,e){Bg(Mg[t],(function(t){t(e)}))}(e,t)}of(t,e,r,n)}else{r=l.getNode();for(var v=0,y=o.length;v<y;v++){var w=o[v];if(w.ceFalseOverride&&gd(w)&&s.is(r,w.selector)){u(r,w);break}}of(t,e,r,n)}},pv=function(t){return _t(t,"vars")},mv=function(t){return t.selection.getStart()},gv=function(t,e,n,r,o){return X(e,(function(e){var i=t.formatter.matchNode(e,n,null!=o?o:{},r);return!v(i)}),(function(e){return!!vg(t,e,n)||!r&&b(t.formatter.matchNode(e,n,o,!0))}))},vv=function(t,e){var n=null!=e?e:mv(t);return Y(hd(t.dom,n),(function(t){return Tn(t)&&!Pn(t)}))},yv=function(t,e,n){var r=vv(t,e);ft(n,(function(n,o){var i=function(n){var i=gv(t,r,o,n.similar,pv(n)?n.vars:void 0),a=i.isSome();if(n.state.get()!==a){n.state.set(a);var s=i.getOr(e);pv(n)?n.callback(a,{node:s,format:o,parents:r}):V(n.callbacks,(function(t){return t(a,{node:s,format:o,parents:r})}))}};V([n.withSimilar,n.withoutSimilar],i),V(n.withVars,i)}))},bv=function(t,e,n,r,o,i){return null===e.get()&&function(t,e){t.set({}),e.on("NodeChange",(function(n){yv(e,n.element,t.get())})),e.on("FormatApply FormatRemove",(function(n){var r=M.from(n.node).map((function(t){return nd(t)?t:t.startContainer})).bind((function(t){return Tn(t)?M.some(t):M.from(t.parentElement)})).getOrThunk((function(){return mv(e)}));yv(e,r,t.get())}))}(e,t),function(t,e,n,r,o,i){var a=e.get();V(n.split(","),(function(e){var n=bt(a,e).getOrThunk((function(){var t={withSimilar:{state:Cs(!1),similar:!0,callbacks:[]},withoutSimilar:{state:Cs(!1),similar:!1,callbacks:[]},withVars:[]};return a[e]=t,t})),s=function(){var n=vv(t);return gv(t,n,e,o,i).isSome()};if(v(i)){var l=o?n.withSimilar:n.withoutSimilar;l.callbacks.push(r),1===l.callbacks.length&&l.state.set(s())}else n.withVars.push({state:Cs(s()),similar:o,vars:i,callback:r})})),e.set(a)}(t,e,n,r,o,i),{unbind:function(){return function(t,e,n){var r=t.get();V(e.split(","),(function(t){return bt(r,t).each((function(e){r[t]={withSimilar:At(At({},e.withSimilar),{callbacks:Y(e.withSimilar.callbacks,(function(t){return t!==n}))}),withoutSimilar:At(At({},e.withoutSimilar),{callbacks:Y(e.withoutSimilar.callbacks,(function(t){return t!==n}))}),withVars:Y(e.withVars,(function(t){return t.callback!==n}))}}))})),t.set(r)}(e,n,r)}}},_v=function(t,e){var n=(e||document).createDocumentFragment();return V(t,(function(t){n.appendChild(t.dom)})),Ae.fromDom(n)},wv=function(t,e,n){return{element:t,width:e,rows:n}},kv=function(t,e){return{element:t,cells:e}},Cv=function(t,e){return{x:t,y:e}},xv=function(t,e){var n=parseInt(er(t,e),10);return isNaN(n)?1:n},Sv=function(t,e,n){var r=t.rows;return!!(r[n]?r[n].cells:[])[e]},Ov=function(t){return G(t,(function(t,e){return e.cells.length>t?e.cells.length:t}),0)},Ev=function(t,e){for(var n=t.rows,r=0;r<n.length;r++)for(var o=n[r].cells,i=0;i<o.length;i++)if(Ie(o[i],e))return M.some(Cv(i,r));return M.none()},Dv=function(t,e,n,r,o){for(var i=[],a=t.rows,s=n;s<=o;s++){var l=a[s].cells,u=e<r?l.slice(e,r+1):l.slice(r,e+1);i.push(kv(a[s].element,u))}return i},Lv=function(t){var e=wv(Qs(t),0,[]);return V(qs(t,"tr"),(function(t,n){V(qs(t,"td,th"),(function(r,o){!function(t,e,n,r,o){for(var i=xv(o,"rowspan"),a=xv(o,"colspan"),s=t.rows,l=n;l<n+i;l++){s[l]||(s[l]=kv(Js(r),[]));for(var u=e;u<e+a;u++)s[l].cells[u]=l===n&&u===e?o:Qs(o)}}(e,function(t,e,n){for(;Sv(t,e,n);)e++;return e}(e,o,n),n,t,r)}))})),wv(e.element,Ov(e.rows),e.rows)},Av=function(t){return function(t,e){var n=Qs(t.element),r=Ae.fromTag("tbody");return mn(r,e),pn(n,r),n}(t,function(t){return H(t.rows,(function(t){var e=H(t.cells,(function(t){var e=Js(t);return rr(e,"colspan"),rr(e,"rowspan"),e})),n=Qs(t.element);return mn(n,e),n}))}(t))},Tv=function(t,e,n){return Ev(t,e).bind((function(e){return Ev(t,n).map((function(n){return function(t,e,n){var r=e.x,o=e.y,i=n.x,a=n.y,s=o<a?Dv(t,r,o,i,a):Dv(t,r,a,i,o);return wv(t.element,Ov(s),s)}(t,e,n)}))}))},Nv=function(t,e){return Q(t,(function(t){return"li"===Me(t)&&Ud(t,e)})).fold(S([]),(function(e){return function(t){return Q(t,(function(t){return"ul"===Me(t)||"ol"===Me(t)}))}(t).map((function(t){var e=Ae.fromTag(Me(t)),n=vt(lr(t),(function(t,e){return Rt(e,"list-style")}));return or(e,n),[Ae.fromTag("li"),e]})).getOr([])}))},$v=function(t,e){var n=Ae.fromDom(e.commonAncestorContainer),r=Lp(n,t),o=Y(r,(function(t){return fo(t)||uo(t)})),i=Nv(r,e),a=o.concat(i.length?i:function(t){return go(t)?Ke(t).filter(mo).fold(S([]),(function(e){return[t,e]})):mo(t)?[t]:[]}(n));return H(a,Qs)},Iv=function(){return _v([])},Pv=function(t,e){return n=Ae.fromDom(e.cloneContents()),r=$v(t,e),o=G(r,(function(t,e){return pn(e,t),e}),n),r.length>0?_v([o]):o;var n,r,o},jv=function(t,e){return(n=t,r=e[0],Xr(r,"table",D(Ie,n))).bind((function(t){var n=e[0],r=e[e.length-1],o=Lv(t);return Tv(o,n,r).map((function(t){return _v([Av(t)])}))})).getOrThunk(Iv);var n,r},Mv=function(t,e){var n=Md(e,t);return n.length>0?jv(t,n):function(t,e){return e.length>0&&e[0].collapsed?Iv():Pv(t,e[0])}(t,e)},Rv=function(t,e){return e>=0&&e<t.length&&td(t.charAt(e))},Bv=function(t,e){var n=Co(t.innerText);return e?function(t){return t.replace(/^[ \f\n\r\t\v]+/,"")}(n):n},qv=function(t,e,n){void 0===n&&(n={});var r=function(t,e){return At(At({},t),{format:e,get:!0,selection:!0})}(n,e),o=t.fire("BeforeGetContent",r);if(o.isDefaultPrevented())return t.fire("GetContent",o),o.content;if("text"===o.format)return function(t){return M.from(t.selection.getRng()).map((function(e){var n=M.from(t.dom.getParent(e.commonAncestorContainer,t.dom.isBlock)),r=t.getBody(),o=function(t){return t.map((function(t){return t.nodeName})).getOr("div").toLowerCase()}(n),i=Ce.browser.isIE()&&"pre"!==o,a=t.dom.add(r,o,{"data-mce-bogus":"all",style:"overflow: hidden; opacity: 0;"},e.cloneContents()),s=Bv(a,i),l=Co(a.textContent);if(t.dom.remove(a),Rv(l,0)||Rv(l,l.length-1)){var u=n.getOr(r),c=Bv(u,i),d=c.indexOf(s);return-1===d?s:(Rv(c,d-1)?" ":"")+s+(Rv(c,d+s.length)?" ":"")}return s})).getOr("")}(t);o.getInner=!0;var i=function(t,e){var n=t.selection.getRng(),r=t.dom.create("body"),o=t.selection.getSel(),i=Ah(t,Pd(o)),a=e.contextual?Mv(Ae.fromDom(t.getBody()),i).dom:n.cloneContents();return a&&r.appendChild(a),t.selection.serializer.serialize(r,e)}(t,o);return"tree"===o.format?i:(o.content=t.selection.isCollapsed()?"":i,t.fire("GetContent",o),o.content)},Fv=function(t){return Tn(t)?t.outerHTML:Bn(t)?bi.encodeRaw(t.data,!1):qn(t)?"\x3c!--"+t.data+"--\x3e":""},Uv=function(t,e,n){var r=function(t){var e,n=document.createElement("div"),r=document.createDocumentFragment();for(t&&(n.innerHTML=t);e=n.firstChild;)r.appendChild(e);return r}(e);if(t.hasChildNodes()&&n<t.childNodes.length){var o=t.childNodes[n];o.parentNode.insertBefore(r,o)}else t.appendChild(r)},zv=function(t,e){var n,r,o,i,a,s,l,u,c,d=H(lt(e.childNodes),Fv);return function(t,e){var n=0;V(t,(function(t){0===t[0]?n++:1===t[0]?(Uv(e,t[1],n),n++):2===t[0]&&function(t,e){if(t.hasChildNodes()&&e<t.childNodes.length){var n=t.childNodes[e];n.parentNode.removeChild(n)}}(e,n)}))}((r=t,o=(n=d).length+r.length+2,i=new Array(o),a=new Array(o),s=function(t,e,o,i,a){var l=u(t,e,o,i);if(null===l||l.start===e&&l.diag===e-i||l.end===t&&l.diag===t-o)for(var c=t,d=o;c<e||d<i;)c<e&&d<i&&n[c]===r[d]?(a.push([0,n[c]]),++c,++d):e-t>i-o?(a.push([2,n[c]]),++c):(a.push([1,r[d]]),++d);else{s(t,l.start,o,l.start-l.diag,a);for(var f=l.start;f<l.end;++f)a.push([0,n[f]]);s(l.end,e,l.end-l.diag,i,a)}},l=function(t,e,o,i){for(var a=t;a-e<i&&a<o&&n[a]===r[a-e];)++a;return function(t,e,n){return{start:t,end:e,diag:n}}(t,a,e)},u=function(t,e,o,s){var u=e-t,c=s-o;if(0===u||0===c)return null;var d,f,h,p,m,g=u-c,v=c+u,y=(v%2==0?v:v+1)/2;for(i[1+y]=t,a[1+y]=e+1,d=0;d<=y;++d){for(f=-d;f<=d;f+=2){for(h=f+y,f===-d||f!==d&&i[h-1]<i[h+1]?i[h]=i[h+1]:i[h]=i[h-1]+1,m=(p=i[h])-t+o-f;p<e&&m<s&&n[p]===r[m];)i[h]=++p,++m;if(g%2!=0&&g-d<=f&&f<=g+d&&a[h-g]<=i[h])return l(a[h-g],f+t-o,e,s)}for(f=g-d;f<=g+d;f+=2){for(h=f+y-g,f===g-d||f!==g+d&&a[h+1]<=a[h-1]?a[h]=a[h+1]-1:a[h]=a[h-1],m=(p=a[h]-1)-t+o-f;p>=t&&m>=o&&n[p]===r[m];)a[h]=p--,m--;if(g%2==0&&-d<=f&&f<=d&&a[h]<=i[h+g])return l(a[h],f+t-o,e,s)}}},c=[],s(0,n.length,0,r.length,c),c),e),e},Hv=Nt((function(){return document.implementation.createHTMLDocument("undo")})),Vv=function(t){var e,n=(e=t.getBody(),Y(H(lt(e.childNodes),Fv),(function(t){return t.length>0}))),r=tt(n,(function(e){var n=Gh(t.serializer,e);return n.length>0?[n]:[]})),o=r.join("");return-1!==o.indexOf("</iframe>")?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)},Wv=function(t,e,n){var r=n?e.beforeBookmark:e.bookmark;"fragmented"===e.type?zv(e.fragments,t.getBody()):t.setContent(e.content,{format:"raw",no_selection:!b(r)||!Uc(r)||!r.isFakeCaret}),t.selection.moveToBookmark(r)},Kv=function(t){return"fragmented"===t.type?t.fragments.join(""):t.content},Yv=function(t){var e=Ae.fromTag("body",Hv());return Gs(e,Kv(t)),V(qs(e,"*[data-mce-bogus]"),yn),e.dom.innerHTML},Zv=function(t,e){return!(!t||!e)&&(!!function(t,e){return Kv(t)===Kv(e)}(t,e)||function(t,e){return Yv(t)===Yv(e)}(t,e))},Gv=function(t){return 0===t.get()},Xv=function(t,e,n){Gv(n)&&(t.typing=e)},Qv=function(t,e){t.typing&&(Xv(t,!1,e),t.add())},Jv=function(t){return{undoManager:{beforeChange:function(e,n){return function(t,e,n){Gv(e)&&n.set(tu(t.selection))}(t,e,n)},add:function(e,n,r,o,i,a){return function(t,e,n,r,o,i,a){var s=Vv(t);if(i=i||{},i=De.extend(i,s),!1===Gv(r)||t.removed)return null;var l=e.data[n.get()];if(t.fire("BeforeAddUndo",{level:i,lastLevel:l,originalEvent:a}).isDefaultPrevented())return null;if(l&&Zv(l,i))return null;e.data[n.get()]&&o.get().each((function(t){e.data[n.get()].beforeBookmark=t}));var u=function(t){return t.getParam("custom_undo_redo_levels",0,"number")}(t);if(u&&e.data.length>u){for(var c=0;c<e.data.length-1;c++)e.data[c]=e.data[c+1];e.data.length--,n.set(e.data.length)}i.bookmark=tu(t.selection),n.get()<e.data.length-1&&(e.data.length=n.get()+1),e.data.push(i),n.set(e.data.length-1);var d={level:i,lastLevel:l,originalEvent:a};return n.get()>0?(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()],Wv(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()<n.length-1&&(e.set(e.get()+1),r=n[e.get()],Wv(t,r,!1),t.setDirty(!0),t.fire("Redo",{level:r})),r}(t,e,n)},clear:function(e,n){return function(t,e,n){e.data=[],n.set(0),e.typing=!1,t.fire("ClearUndos")}(t,e,n)},reset:function(t){return function(t){t.clear(),t.add()}(t)},hasUndo:function(e,n){return function(t,e,n){return n.get()>0||e.typing&&e.data[0]&&!Zv(Vv(t),e.data[0])}(t,e,n)},hasRedo:function(t,e){return function(t,e){return e.get()<t.data.length-1&&!t.typing}(t,e)},transact:function(t,e,n){return function(t,e,n){return Qv(t,e),t.beforeChange(),t.ignore(n),t.add()}(t,e,n)},ignore:function(t,e){return function(t,e){try{t.set(t.get()+1),e()}finally{t.set(t.get()-1)}}(t,e)},extra:function(e,n,r,o){return function(t,e,n,r,o){if(e.transact(r)){var i=e.data[n.get()].bookmark,a=e.data[n.get()-1];Wv(t,a,!0),e.transact(o)&&(e.data[n.get()-1].beforeBookmark=i)}}(t,e,n,r,o)}},formatter:{match:function(e,n,r,o){return kg(t,e,n,r,o)},matchAll:function(e,n){return function(t,e,n){var r=[],o={},i=t.selection.getStart();return t.dom.getParent(i,(function(i){for(var a=0;a<e.length;a++){var s=e[a];!o[s]&&wg(t,i,s,n)&&(o[s]=!0,r.push(s))}}),t.dom.getRoot()),r}(t,e,n)},matchNode:function(e,n,r,o){return wg(t,e,n,r,o)},canApply:function(e){return function(t,e){var n=t.formatter.get(e),r=t.dom;if(n)for(var o=t.selection.getStart(),i=hd(r,o),a=n.length-1;a>=0;a--){var s=n[a];if(!gd(s)||b(s.defaultBlock))return!0;for(var l=i.length-1;l>=0;l--)if(r.is(i[l],s.selector))return!0}return!1}(t,e)},closest:function(e){return Cg(t,e)},apply:function(e,n,r){return hv(t,e,n,r)},remove:function(e,n,r,o){return lv(t,e,n,r,o)},toggle:function(e,n,r){return function(t,e,n,r){var o=t.formatter.get(e);!kg(t,e,n,r)||"toggle"in o[0]&&!o[0].toggle?hv(t,e,n,r):lv(t,e,n,r)}(t,e,n,r)},formatChanged:function(e,n,r,o,i){return bv(t,e,n,r,o,i)}},editor:{getContent:function(e,n){return function(t,e,n){return M.from(t.getBody()).fold(S("tree"===e.format?new Ph("body",11):""),(function(r){return Qh(t,e,n,r)}))}(t,e,n)},setContent:function(e,n){return fg(t,e,n)},insertContent:function(e,n){return sg(t,e,n)},addVisual:function(e){return function(t,e){var n=t.dom,r=b(e)?e:t.getBody();v(t.hasVisual)&&(t.hasVisual=function(t){return t.getParam("visual",!0,"boolean")}(t)),V(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 qv(t,e,n)}},raw:{getModel:function(){return M.none()}}}},ty=function(t){return _t(t.plugins,"rtc")},ey=function(t){var e=t;return function(t){return bt(t.plugins,"rtc").bind((function(t){return M.from(t.setup)}))}(t).fold((function(){return e.rtcInstance=Jv(t),M.none()}),(function(t){return e.rtcInstance=function(){var t=S(null),e=S("");return{undoManager:{beforeChange:k,add:t,undo:t,redo:t,clear:k,reset:k,hasUndo:N,hasRedo:N,transact:t,ignore:k,extra:k},formatter:{match:N,matchAll:S([]),matchNode:S(void 0),canApply:N,closest:e,apply:k,remove:k,toggle:k,formatChanged:S({unbind:k})},editor:{getContent:e,setContent:e,insertContent:k,addVisual:k},selection:{getContent:e},raw:{getModel:S(M.none())}}}(),M.some((function(){return t().then((function(t){return e.rtcInstance=function(t){var e=function(t){return h(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 M.some(a.getRawModel())}}}}(t),t.rtc.isRemote}))}))}))},ny=function(t){return t.rtcInstance?t.rtcInstance:Jv(t)},ry=function(t){var e=t.rtcInstance;if(e)return e;throw new Error("Failed to get RTC instance not yet initialized.")},oy=function(t,e){return void 0===e&&(e={}),function(t,e,n){return ry(t).selection.getContent(e,n)}(t,e.format?e.format:"html",e)},iy=function(t){return 0===t.dom.length?(vn(t),M.none()):M.some(t)},ay=function(t,e,n,r){t.bind((function(t){return(r?am:im)(t.dom,r?t.dom.length:0),e.filter(Fe).map((function(e){return function(t,e,n,r){var o=t.dom,i=e.dom,a=r?o.length:i.length;r?(sm(o,i,!1,!r),n.setStart(i,a)):(sm(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 tf.isBookmarkNode(t.dom)})).bind(e?Ze:Ye)}(e,r).or(e).filter(Fe);return t.map((function(t){return function(t,e){Ke(t).each((function(n){var r=t.dom;e&&Gp(n,Tl(r,0))?im(r,0):!e&&Xp(n,Tl(r,r.length))&&am(r,r.length)}))}(t,r)}))}))},sy=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 rp({validate:t.validate},t.schema).serialize(i)}return e.content}(t,o);var a=t.selection.getRng();!function(t,e){var n=M.from(e.firstChild).map(Ae.fromDom),r=M.from(e.lastChild).map(Ae.fromDom);t.deleteContents(),t.insertNode(e);var o=n.bind(Ye).filter(Fe).bind(iy),i=r.bind(Ze).filter(Fe).bind(iy);ay(o,n,t,!0),ay(i,r,t,!1),t.collapse(!1)}(a,a.createContextualFragment(o.content)),t.selection.setRng(a),Wf(t,a),o.no_events||t.fire("SetContent",o)},ly=function(t,e,n){if(t&&_t(t,e)){var r=Y(t[e],(function(t){return t!==n}));0===r.length?delete t[e]:t[e]=r}};var uy,cy,dy=function(t){return!!t.select},fy=function(t){return!(!t||!t.ownerDocument)&&je(Ae.fromDom(t.ownerDocument),Ae.fromDom(t))},hy=function(t,e,n,r){var o,i,a=function(t,e){var n,r,o=function(e,n){return Q(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={};De.each(n,(function(t,e){o(e,a).each((function(n){r[e]||(V(t,(function(t){t(!0,{node:n,selector:e,parents:a})})),r[e]=t),s[e]=t}))})),De.each(r,(function(t,n){s[n]||(delete r[n],De.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(){ly(n,t,a),ly(r,t,a)}}}}}(t,r).selectorChangedWithUnbind,s=function(t,e){return sy(r,t,e)},l=function(t){var e=c();e.collapse(!!t),d(e)},u=function(){return e.getSelection?e.getSelection():e.document.selection},c=function(){var n,a,s,l=function(t,e,n){try{return e.compareBoundaryPoints(t,n)}catch(t){return-1}},c=e.document;if(void 0!==r.bookmark&&!1===kh(r)){var d=ch(r);if(d.isSome())return d.map((function(t){return Ah(r,[t])[0]})).getOr(c.createRange())}try{(n=u())&&!An(n.anchorNode)&&(a=n.rangeCount>0?n.getRangeAt(0):n.createRange?n.createRange():c.createRange(),a=Ah(r,[a])[0])}catch(t){}return a||(a=c.createRange?c.createRange():c.body.createTextRange()),a.setStart&&9===a.startContainer.nodeType&&a.collapsed&&(s=t.getRoot(),a.setStart(s,0),a.setEnd(s,0)),o&&i&&(0===l(a.START_TO_START,a,o)&&0===l(a.END_TO_END,a,o)?a=i:(o=null,i=null)),a},d=function(t,e){var n;if(function(t){return!!t&&(!!dy(t)||fy(t.startContainer)&&fy(t.endContainer))}(t)){var a=dy(t)?t:null;if(a){i=null;try{a.select()}catch(t){}}else{var s=u();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||Ce.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=u(),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},h={bookmarkManager:null,controlSelection:null,dom:t,win:e,serializer:n,editor:r,collapse:l,setCursorLocation:function(e,n){var o=t.createRng();b(e)&&b(n)?(o.setStart(e,n),o.setEnd(e,n),d(o),l(!1)):(zd(t,o,r.getBody(),!0),d(o))},getContent:function(t){return oy(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 M.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=c(),e=u();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?Lh(r.nextSibling,!0):r.parentNode,o=0===a?Lh(o.previousSibling,!1):o.parentNode,r&&r===o))?r:n&&3===n.nodeType?n.parentNode:n}(r.getBody(),c())},getSel:u,setRng:d,getRng:c,getStart:function(t){return Eh(r.getBody(),c(),t)},getEnd:function(t){return Dh(r.getBody(),c(),t)},getSelectedBlocks:function(e,n){return function(t,e,n,r){var o,i=[],a=t.getRoot();if(n=t.getParent(n||Eh(a,e,e.collapsed),t.isBlock),r=t.getParent(r||Dh(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,c(),e,n)},normalize:function(){var e=c(),n=u();if(!(Pd(n).length>1)&&Hd(r)){var o=wf(t,e);return o.each((function(t){d(t,f())})),o.getOr(e)}return e},selectorChanged:function(t,e){return a(t,e),h},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){b(t)?function(t,e,n){(t.inline?zf:Vf)(t,e,n)}(r,t,e):Wf(r,c(),e)},placeCaretAt:function(t,e){return d(df(t,e,r.getDoc()))},getBoundingClientRect:function(){var t=c();return t.collapsed?Tl.fromRangeStart(t).getClientRects()[0]:t.getBoundingClientRect()},destroy:function(){e=o=i=null,m.destroy()}},p=tf(h),m=uf(h,r);return h.bookmarkManager=p,h.controlSelection=m,h},py=function(t,e,n){t.addNodeFilter("font",(function(t){V(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){V(e,(function(e){t.attr(e,null)}))}(t,["color","face","size"])}))}))},my=function(t,e){var n=$i();e.convert_fonts_to_spans&&py(t,n,De.explode(e.font_size_legacy_values)),function(t,e){t.addNodeFilter("strike",(function(t){V(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)},gy=function(t){var e,n=decodeURIComponent(t).split(","),r=/data:([^;]+)/.exec(n[0]);return r&&(e=r[1]),{type:e,data:n[1]}},vy=function(t,e){var n;try{n=atob(e)}catch(t){return M.none()}for(var r=new Uint8Array(n.length),o=0;o<r.length;o++)r[o]=n.charCodeAt(o);return M.some(new Blob([r],{type:t}))},yy=function(t){return 0===t.indexOf("blob:")?function(t){return new to((function(e,n){var r=function(){n("Cannot convert "+t+" to Blob. Resource might not exist or is inaccessible.")};try{var o=new XMLHttpRequest;o.open("GET",t,!0),o.responseType="blob",o.onload=function(){200===o.status?e(o.response):r()},o.onerror=r,o.send()}catch(t){r()}}))}(t):0===t.indexOf("data:")?(e=t,new to((function(t){var n=gy(e),r=n.type,o=n.data;vy(r,o).fold((function(){return t(new Blob([]))}),t)}))):null;var e},by=0,_y=function(t){return(t||"blobid")+by++},wy=function(t,e,n,r){var o,i;if(0!==e.src.indexOf("blob:")){var a=gy(e.src),s=a.data,l=a.type;o=s,(i=t.getByData(o,l))?n({image:e,blobInfo:i}):yy(e.src).then((function(r){i=t.create(_y(),r,o),t.add(i),n({image:e,blobInfo:i})}),(function(t){r(t)}))}else(i=t.getByUri(e.src))?n({image:e,blobInfo:i}):yy(e.src).then((function(r){(function(t){return new to((function(e){var n=new FileReader;n.onloadend=function(){e(n.result)},n.readAsDataURL(t)}))})(r).then((function(a){o=gy(a).data,i=t.create(_y(),r,o),t.add(i),n({image:e,blobInfo:i})}))}),(function(t){r(t)}))},ky=function(t,e){var n={};return{findAll:function(r,o){o||(o=$);var i=Y(function(t){return t?lt(t.getElementsByTagName("img")):[]}(r),(function(e){var n=e.src;return!!Ce.fileApi&&(!e.hasAttribute("data-mce-bogus")&&(!e.hasAttribute("data-mce-placeholder")&&(!(!n||n===Ce.transparentSrc)&&(0===n.indexOf("blob:")?!t.isUploaded(n)&&o(e):0===n.indexOf("data:")&&o(e)))))})),a=H(i,(function(t){if(void 0!==n[t.src])return new to((function(e){n[t.src].then((function(n){if("string"==typeof n)return n;e({image:t,blobInfo:n.blobInfo})}))}));var r=new to((function(n,r){wy(e,t,n,r)})).then((function(t){return delete n[t.image.src],t})).catch((function(e){return delete n[t.src],e}));return n[t.src]=r,r}));return to.all(a)}}},Cy=function(t,e,n,r){(t.padd_empty_with_br||e.insert)&&n[r.name]?r.empty().append(new Ph("br",1)).shortEnded=!0:r.empty().append(new Ph("#text",3)).value=_o},xy=function(t,e){return t&&t.firstChild&&t.firstChild===t.lastChild&&t.firstChild.name===e},Sy=function(t,e,n,r){return r.isEmpty(e,n,(function(e){return function(t,e){var n=t.getElementRule(e.name);return n&&n.paddEmpty}(t,e)}))},Oy=function(t,e){var n=e.blob_cache,r=function(t){var r=t.attr("src");(function(t){return t.attr("src")===Ce.transparentSrc||b(t.attr("data-mce-placeholder"))})(t)||function(t){return b(t.attr("data-mce-bogus"))}(t)||function(t){var e=/data:([^;]+);base64,([a-z0-9\+\/=\s]+)/i.exec(t);return e?M.some({type:e[1],data:decodeURIComponent(e[2])}):M.none()}(r).filter((function(){return function(t,e){if(e.images_dataimg_filter){var n=new Image;return n.src=t.attr("src"),ft(t.attributes.map,(function(t,e){n.setAttribute(e,t)})),e.images_dataimg_filter(n)}return!0}(t,e)})).bind((function(t){var e=t.type,r=t.data;return M.from(n.getByData(r,e)).orThunk((function(){return vy(e,r).map((function(t){var e=n.create(_y(),t,r);return n.add(e),e}))}))})).each((function(e){t.attr("src",e.blobUri())}))};n&&t.addAttributeFilter("src",(function(t){return V(t,r)}))},Ey=De.makeMap,Dy=De.each,Ly=De.explode,Ay=De.extend,Ty=function(t,e){void 0===e&&(e=Ti());var n={},r=[],o={},i={};(t=t||{}).validate=!("validate"in t)||t.validate,t.root_name=t.root_name||"body";var a=function(t){var e=t.name;e in n&&((s=o[e])?s.push(t):o[e]=[t]);for(var a=r.length;a--;){var s,l=r[a].name;if(l in t.attributes.map)(s=i[l])?s.push(t):i[l]=[t]}return t},s={schema:e,addAttributeFilter:function(t,e){Dy(Ly(t),(function(t){var n;for(n=0;n<r.length;n++)if(r[n].name===t)return void r[n].callbacks.push(e);r.push({name:t,callbacks:[e]})}))},getAttributeFilters:function(){return[].concat(r)},addNodeFilter:function(t,e){Dy(Ly(t),(function(t){var r=n[t];r||(n[t]=r=[]),r.push(e)}))},getNodeFilters:function(){var t=[];for(var e in n)_t(n,e)&&t.push({name:e,callbacks:n[e]});return t},filterNode:a,parse:function(s,l){var u,c,d,f,h,p,m,g,v=[];l=l||{},o={},i={};var y=Ay(Ey("script,style,head,html,body,title,meta,param"),e.getBlockElements()),_=Li(e),w=e.getNonEmptyElements(),k=e.children,C=t.validate,x=function(t){return!1===t?"":!0===t?"p":t}("forced_root_block"in l?l.forced_root_block:t.forced_root_block),S=e.getWhiteSpaceElements(),O=/^[ \t\r\n]+/,E=/[ \t\r\n]+$/,D=/[ \t\r\n]+/g,L=/^[ \t\r\n]+$/,A=_t(S,l.context)||_t(S,t.root_name),T=function(t,e){var r,i=new Ph(t,e);return t in n&&((r=o[t])?r.push(i):o[t]=[i]),i},N=function(t){for(var n=e.getBlockElements(),r=t.prev;r&&3===r.type;){var o=r.value.replace(E,"");if(o.length>0)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}},$=Zh({validate:C,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(T("#cdata",4)).value=t},text:function(t,e){var n;A||(t=t.replace(D," "),function(t,e){return t&&(_t(e,t.name)||"br"===t.name)}(g.lastChild,y)&&(t=t.replace(O,""))),0!==t.length&&((n=T("#text",3)).raw=!!e,g.append(n).value=t)},comment:function(t){g.append(T("#comment",8)).value=t},pi:function(t,e){g.append(T(t,7)).value=e,N(g)},doctype:function(t){g.append(T("#doctype",10)).value=t,N(g)},start:function(t,n,o){var a=C?e.getElementRule(t):{};if(a){var s=T(a.outputName||t,1);s.attributes=n,s.shortEnded=o,g.append(s);var l=k[g.name];l&&k[s.name]&&!l[s.name]&&v.push(s);for(var u=r.length;u--;){var c=r[u].name;c in n.map&&((p=i[c])?p.push(s):i[c]=[s])}y[t]&&N(s),o||(g=s),!A&&S[t]&&(A=!0)}},end:function(n){var r,o,i,a=C?e.getElementRule(n):{};if(a){if(y[n]&&!A){if((r=g.firstChild)&&3===r.type)if((o=r.value.replace(O,"")).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||L.test(o))&&(r.remove(),r=i),r=i;if((r=g.lastChild)&&3===r.type)if((o=r.value.replace(E,"")).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||L.test(o))&&(r.remove(),r=i),r=i}A&&S[n]&&(A=!1);var s=Sy(e,w,S,g),u=g.parent;a.paddInEmptyBlock&&s&&function(t){for(var n=t;b(n);){if(n.name in _)return Sy(e,w,S,n);n=n.parent}return!1}(g)?Cy(t,l,y,g):a.removeEmpty&&s?y[g.name]?g.empty().remove():g.unwrap():a.paddEmpty&&(function(t){return xy(t,"#text")&&t.firstChild.value===_o}(g)||s)&&Cy(t,l,y,g),g=u}}},e),I=g=new Ph(l.context||t.root_name,11);if($.parse(s,l.format),C&&v.length&&(l.context?l.invalid=!0:function(t){for(var n=Ey("tr,td,th,tbody,thead,tfoot,table"),r=e.getNonEmptyElements(),o=e.getWhiteSpaceElements(),i=e.getTextBlockElements(),s=e.getSpecialElements(),l=function(t,n){if(void 0===n&&(n=t.parent),s[t.name])t.empty().remove();else{for(var r=0,o=t.children();r<o.length;r++){var i=o[r];e.isValidChild(n.name,i.name)||l(i,n)}t.unwrap()}},u=0;u<t.length;u++){var c=t[u],d=void 0,f=void 0,h=void 0;if(c.parent&&!c.fixed)if(i[c.name]&&"li"===c.parent.name){for(var p=c.next;p&&i[p.name];)p.name="li",p.fixed=!0,c.parent.insert(p,c.parent),p=p.next;c.unwrap()}else{var m=[c];for(d=c.parent;d&&!e.isValidChild(d.name,c.name)&&!n[d.name];d=d.parent)m.push(d);if(d&&m.length>1)if(e.isValidChild(d.name,c.name)){m.reverse();for(var g=f=a(m[0].clone()),v=0;v<m.length-1;v++){e.isValidChild(g.name,m[v].name)?(h=a(m[v].clone()),g.append(h)):h=g;for(var y=m[v].firstChild;y&&y!==m[v+1];){var b=y.next;h.append(y),y=b}g=h}Sy(e,r,o,f)?d.insert(c,m[0],!0):(d.insert(f,m[0],!0),d.insert(c,f)),d=m[0],(Sy(e,r,o,d)||xy(d,"br"))&&d.empty().remove()}else l(c);else if(c.parent){if("li"===c.name){if((p=c.prev)&&("ul"===p.name||"ol"===p.name)){p.append(c);continue}if((p=c.next)&&("ul"===p.name||"ol"===p.name)){p.insert(c,p.firstChild,!0);continue}c.wrap(a(new Ph("ul",1)));continue}e.isValidChild(c.parent.name,"div")&&e.isValidChild("div",c.name)?c.wrap(a(new Ph("div",1))):l(c)}}}}(v)),x&&("body"===I.name||l.isRootContent)&&function(){var n=I.firstChild,r=null,o=function(t){t&&((n=t.firstChild)&&3===n.type&&(n.value=n.value.replace(O,"")),(n=t.lastChild)&&3===n.type&&(n.value=n.value.replace(E,"")))};if(e.isValidChild(I.name,x.toLowerCase())){for(;n;){var i=n.next;3===n.type||1===n.type&&"p"!==n.name&&!y[n.name]&&!n.attr("data-mce-type")?(r||((r=T(x,1)).attr(t.forced_root_block_attrs),I.insert(r,n)),r.append(n)):(o(r),r=null),n=i}o(r)}}(),!l.invalid){for(m in o)if(_t(o,m)){for(p=n[m],f=(u=o[m]).length;f--;)u[f].parent||u.splice(f,1);for(c=0,d=p.length;c<d;c++)p[c](u,m,l)}for(c=0,d=r.length;c<d;c++)if((p=r[c]).name in i){for(f=(u=i[p.name]).length;f--;)u[f].parent||u.splice(f,1);for(f=0,h=p.callbacks.length;f<h;f++)p.callbacks[f](u,p.name,l)}}return I}};return function(t,e){var n=t.schema;e.remove_trailing_brs&&t.addNodeFilter("br",(function(t,r,o){var i,a,s,l,u,c,d,f,h=t.length,p=De.extend({},n.getBlockElements()),m=n.getNonEmptyElements(),g=n.getWhiteSpaceElements();for(p.body=1,i=0;i<h;i++)if(s=(a=t[i]).parent,p[a.parent.name]&&a===s.lastChild){for(u=a.prev;u;){if("span"!==(c=u.name)||"bookmark"!==u.attr("data-mce-type")){"br"===c&&(a=null);break}u=u.prev}a&&(a.remove(),Sy(n,m,g,s)&&(d=n.getElementRule(s.name))&&(d.removeEmpty?s.remove():d.paddEmpty&&Cy(e,o,p,s)))}else{for(l=a;s&&s.firstChild===l&&s.lastChild===l&&(l=s,!p[s.name]);)s=s.parent;l===s&&!0!==e.padd_empty_with_br&&((f=new Ph("#text",3)).value=_o,a.replace(f))}})),t.addAttributeFilter("href",(function(t){var n,r,o=t.length;if(!e.allow_unsafe_link_target)for(;o--;){var i=t[o];"a"===i.name&&"_blank"===i.attr("target")&&i.attr("rel",(r=void 0,r=(n=i.attr("rel"))?De.trim(n):"",/\b(noopener)\b/g.test(r)?r:function(t){return t.split(" ").filter((function(t){return t.length>0})).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 Ph("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;s<i.length;s++){var l=i[s],u=!1,c=e["*"];c&&c[l]&&(u=!0),c=e[o.name],!u&&c&&c[l]&&(u=!0),u&&(a&&(a+=" "),a+=l)}a.length||(a=null),o.attr("class",a)}})),Oy(t,e)}(s,t),function(t,e){e.inline_styles&&my(t,e)}(s,t),s},Ny=function(t,e,n){return function(t,e){return t&&t.hasEventListeners("PreProcess")&&!e.no_events}(t,n)?function(t,e,n){var r,o=t.dom,i=e.cloneNode(!0),a=document.implementation;if(a.createHTMLDocument){var s=a.createHTMLDocument("");De.each("BODY"===i.nodeName?i.childNodes:[i],(function(t){s.body.appendChild(s.importNode(t,!0))})),i="BODY"!==i.nodeName?s.body.firstChild:s.body,r=o.doc,o.doc=s}return function(t,e){t.fire("PreProcess",e)}(t,At(At({},n),{node:i})),r&&(o.doc=r),i}(t,e,n):e},$y=function(t,e,n){-1===De.inArray(e,n)&&(t.addAttributeFilter(n,(function(t,e){for(var n=t.length;n--;)t[n].attr(e,null)})),e.push(n))},Iy=function(t,e,n,r,o){var i=function(t,e,n){return rp(t,e).serialize(n)}(e,n,r);return function(t,e,n){if(!e.no_events&&t){var r=function(t,e){return t.fire("PostProcess",e)}(t,At(At({},e),{content:n}));return r.content}return n}(t,o,i)},Py=function(t,e){var n=["data-mce-selected"],r=e&&e.dom?e.dom:ys.DOM,o=e&&e.schema?e.schema:Ti(t);t.entity_encoding=t.entity_encoding||"named",t.remove_trailing_brs=!("remove_trailing_brs"in t)||t.remove_trailing_brs;var i=Ty(t,o);!function(t,e,n){t.addAttributeFilter("data-mce-tabindex",(function(t,e){for(var n=t.length;n--;){var r=t[n];r.attr("tabindex",r.attr("data-mce-tabindex")),r.attr(e,null)}})),t.addAttributeFilter("src,href,style",(function(t,r){for(var o="data-mce-"+r,i=e.url_converter,a=e.url_converter_scope,s=t.length;s--;){var l=t[s],u=l.attr(o);void 0!==u?(l.attr(r,u.length>0?u:null),l.attr(o,null)):(u=l.attr(r),"style"===r?u=n.serializeStyle(n.parseStyle(u),l.name):i&&(u=i.call(a,u,r,l.name)),l.attr(r,u.length>0?u: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=M.from(o.firstChild).exists((function(t){return!ko(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=bi.decode(n.value))}})),t.addNodeFilter("script,style",(function(t,n){for(var r=function(t){return t.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\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="// <![CDATA[\n"+r(a)+"\n// ]]>")}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){V(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),l=Ny(e,n,s),u=function(t,e,n){var r=Co(n.getInner?e.innerHTML:t.getOuterHTML(e));return n.selection||bo(Ae.fromDom(e))?r:De.trim(r)}(r,l,s),c=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,u,s);return"tree"===s.format?c:Iy(e,t,o,c,s)},addRules:o.addValidElements,setRules:o.setValidElements,addTempAttr:D($y,i,n),getTempAttrs:S(n),getNodeFilters:i.getNodeFilters,getAttributeFilters:i.getAttributeFilters}},jy=function(t,e){var n=Py(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}},My=function(t,e){return void 0===e&&(e={}),function(t,e,n){return ny(t).editor.getContent(e,n)}(t,e,e.format?e.format:"html")},Ry=function(t,e,n){return void 0===n&&(n={}),function(t,e,n){return ny(t).editor.setContent(e,n)}(t,e,n)},By=ys.DOM,qy=function(t){return M.from(t).each((function(t){return t.destroy()}))},Fy=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&&By.remove(o.nextSibling),function(t){t.fire("remove")}(t),t.editorManager.remove(t),!t.inline&&r&&function(t){By.setStyle(t.id,"display",t.orgDisplay)}(t),function(t){t.fire("detach")}(t),By.remove(t.getContainer()),qy(e),qy(n),t.destroy()}},Uy=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(),qy(n),qy(r)),function(t){var e=t.formElement;e&&(e._mceOldSubmit&&(e.submit=e._mceOldSubmit,e._mceOldSubmit=null),By.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())},zy=(uy=function(t,e){return h(t)&&h(e)?zy(t,e):e},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(0===t.length)throw new Error("Can't merge zero objects");for(var n={},r=0;r<t.length;r++){var o=t[r];for(var i in o)_t(o,i)&&(n[i]=uy(n[i],o[i]))}return n}),Hy="autoresize_on_init,content_editable_state,convert_fonts_to_spans,inline_styles,padd_empty_with_br,block_elements,boolean_attributes,editor_deselector,editor_selector,elements,file_browser_callback_types,filepicker_validator_handler,force_hex_style_colors,force_p_newlines,gecko_spellcheck,images_dataimg_filter,media_scripts,mode,move_caret_before_on_enter_elements,non_empty_elements,self_closing_elements,short_ended_elements,special,spellchecker_select_languages,spellchecker_whitelist,tab_focus,table_responsive_width,text_block_elements,text_inline_elements,toolbar_drawer,types,validate,whitespace_elements,paste_word_valid_elements,paste_retain_style_properties,paste_convert_word_fake_lists".split(","),Vy="bbcode,colorpicker,contextmenu,fullpage,legacyoutput,spellchecker,textcolor".split(","),Wy="imagetools,toc".split(","),Ky=function(t){var e=Y(Hy,(function(e){return _t(t,e)})),n=t.forced_root_block;return!1!==n&&""!==n||e.push("forced_root_block (false only)"),ot(e)},Yy=function(t){var e=De.makeMap(t.plugins," "),n=function(t){return _t(e,t)},r=Tt(Tt([],Y(Vy,n),!0),tt(Wy,(function(t){return n(t)?[t+" (moving to premium)"]:[]})),!0);return ot(r)},Zy=pe().deviceType,Gy=Zy.isTouch(),Xy=Zy.isPhone(),Qy=Zy.isTablet(),Jy=["lists","autolink","autosave"],tb={table_grid:!1,object_resizing:!1,resize:!1},eb=function(t){var e=p(t)?t.join(" "):t,n=H(f(e)?e.split(" "):[],qt);return Y(n,(function(t){return t.length>0}))},nb=function(t,e){var n,r,o=(r={},gt(e,(function(e,n){return U(t,n)}),mt(n={}),mt(r)),{t:n,f:r});return function(t,e){return{sections:S(t),settings:S(e)}}(o.t,o.f)},rb=function(t,e){return _t(t.sections(),e)},ob=function(t,e){return bt(t,"toolbar_mode").orThunk((function(){return bt(t,"toolbar_drawer").map((function(t){return!1===t?"wrap":t}))})).getOr(e)},ib=function(t,e){var n={resize:!1,toolbar_mode:ob(t,"scrolling"),toolbar_sticky:!1};return At(At(At({},tb),n),e?{menubar:!1}:{})},ab=function(t,e){var n=e.external_plugins?e.external_plugins:{};return t&&t.external_plugins?De.extend({},t.external_plugins,n):n},sb=function(t,e,n,r){return t&&function(t,e,n){var r=t.sections();return rb(t,e)&&r[e].theme===n}(e,"mobile","mobile")?Y(r,D(U,Jy)):t&&rb(e,"mobile")?r:n},lb=function(t,e,n,r){var o=eb(n.forced_plugins),i=eb(r.plugins),a=function(t,e){return rb(t,e)?t.sections()[e]:{}}(e,"mobile"),s=a.plugins?eb(a.plugins):i,l=function(t,e){return[].concat(eb(t)).concat(eb(e))}(o,sb(t,e,i,s));if(Ce.browser.isIE()&&U(l,"rtc"))throw new Error("RTC plugin is not supported on IE 11.");return De.extend(r,{plugins:l.join(" ")})},ub=function(t,e,n,r,o){var i=t?{mobile:ib(o.mobile||{},e)}:{},a=nb(["mobile"],zy(i,o)),s=De.extend(n,r,a.settings(),function(t,e){return t&&rb(e,"mobile")}(t,a)?function(t,e,n){void 0===n&&(n={});var r=t.sections(),o=bt(r,e).getOr({});return De.extend({},n,o)}(a,"mobile"):{},{validate:!0,external_plugins:ab(r,a.settings())});return lb(t,a,r,s)},cb=function(t,e,n,r,o){var i=function(t,e,n,r,o){var i={id:e,theme:"silver",toolbar_mode:ob(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:"<!DOCTYPE html>",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?tb:{})}(o,e,n,Gy,t),a=ub(Xy||Qy,Xy,i,r,o);return!1!==a.deprecation_warnings&&function(t,e){var n=Ky(t),r=Yy(e),o=r.length>0,i=n.length>0,a="mobile"===e.theme;if(o||i||a){var s="\n- ",l=a?"\n\nThemes:\n- mobile":"",u=o?"\n\nPlugins:\n- "+r.join(s):"",c=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."+l+u+c)}}(o,a),a},db=function(t,e,n){return M.from(e.settings[n]).filter(t)},fb=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?V(t.indexOf("=")>0?t.split(/[;,](?![^=;,]*(?:[;,]|$))/):t.split(","),(function(t){var n=t.split("=");n.length>1?e[De.trim(n[0])]=De.trim(n[1]):e[De.trim(n[0])]=De.trim(n[0])})):e=t,e}(i):"string"===r?db(f,t,e).getOr(n):"number"===r?db(w,t,e).getOr(n):"boolean"===r?db(g,t,e).getOr(n):"object"===r?db(h,t,e).getOr(n):"array"===r?db(p,t,e).getOr(n):"string[]"===r?db((o=f,function(t){return p(t)&&et(t,o)}),t,e).getOr(n):"function"===r?db(_,t,e).getOr(n):i},hb=(cy={},{add:function(t,e){cy[t]=e},get:function(t){return cy[t]?cy[t]:{icons:{}}},has:function(t){return _t(cy,t)}}),pb=function(t,e){return e.dom[t]},mb=function(t,e){return parseInt(ir(e,t),10)},gb=D(pb,"clientWidth"),vb=D(pb,"clientHeight"),yb=D(mb,"margin-top"),bb=D(mb,"margin-left"),_b=function(t,e,n){var r,o=Ae.fromDom(t.getBody()),i=t.inline?o:(r=o,Ae.fromDom(Ve(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+bb(e):0),y:r-(t?o.top+e.dom.clientTop+yb(e):0)}}(t.inline,i,e,n);return function(t,e,n){var r=gb(t),o=vb(t);return e>=0&&n>=0&&e<=r&&n<=o}(i,a.x,a.y)},wb=function(t){var e,n=t.inline?t.getBody():t.getContentAreaContainer();return(e=n,M.from(e).map(Ae.fromDom)).map(bn).getOr(!1)},kb=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 M.from(e[0])},o=function(){e.length>0&&n().reposition(e)},i=function(t){J(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&&wb(t))return s&&t.fire("BeforeOpenNotification",{notification:a}),Q(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(){V(e.slice(),(function(t){n().close(t)}))}))}(t),{open:a,close:function(){r().each((function(t){n().close(t),i(t),o()}))},getNotifications:s}},Cb=Ds.PluginManager,xb=Ds.ThemeManager;var Sb=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<arguments.length;r++)n[r]=arguments[r];return e?e.apply(t,n):void 0}},o=function(n){e.push(n),function(e){t.fire("OpenWindow",{dialog:e})}(n)},i=function(n){!function(e){t.fire("CloseWindow",{dialog:e})}(n),0===(e=Y(e,(function(t){return t!==n}))).length&&t.focus()},a=function(e){t.editorManager.setActive(t),uh(t);var n=e();return o(n),n};return t.on("remove",(function(){V(e,(function(t){n().close(t)}))})),{open:function(t,e){return a((function(){return n().open(t,e,i)}))},openUrl:function(t){return a((function(){return n().openUrl(t,i)}))},alert:function(t,e,o){var i=n();i.alert(t,r(o||i,e))},confirm:function(t,e,o){var i=n();i.confirm(t,r(o||i,e))},close:function(){M.from(e[e.length-1]).each((function(t){n().close(t),i(t)}))}}},Ob=function(t,e){t.notificationManager.open({type:"error",text:e})},Eb=function(t,e){t._skinLoaded?Ob(t,e):t.on("SkinLoaded",(function(){Ob(t,e)}))},Db=function(t,e,n){rf(t,e,{message:n}),console.error(n)},Lb=function(t,e,n){return n?"Failed to load "+t+": "+n+" from url "+e:"Failed to load "+t+" url: "+e},Ab=function(t,e,n){Db(t,"PluginLoadError",Lb("plugin",e,n))},Tb=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=window.console;r&&(r.error?r.error.apply(r,Tt([t],e,!1)):r.log.apply(r,Tt([t],e,!1)))},Nb=function(t){return $b(t,function(t){var e=t.getParam("content_css");return f(e)?H(e.split(","),qt):p(e)?e:!1===e||t.inline?[]:["default"]}(t))},$b=function(t,e){var n=t.editorManager.baseURL+"/skins/content",r="content"+t.editorManager.suffix+".css",o=!0===t.inline;return H(e,(function(e){return function(t){return/^[a-z0-9\-]+$/i.test(t)}(e)&&!o?n+"/"+e+"/"+r:t.documentBaseURI.toAbsolute(e)}))},Ib=function(t){t.contentCSS=t.contentCSS.concat(Nb(t),function(t){return $b(t,vu(t))}(t))},Pb=function(){var t={},e=function(t,e){return{status:t,resultUri:e}},n=function(e){return e in t};return{hasBlobUri:n,getResultUri:function(e){var n=t[e];return n?n.resultUri:null},isPending:function(e){return!!n(e)&&1===t[e].status},isUploaded:function(e){return!!n(e)&&2===t[e].status},markPending:function(n){t[n]=e(1,null)},markUploaded:function(n,r){t[n]=e(2,r)},removeFailed:function(e){delete t[e]},destroy:function(){t={}}}},jb=0,Mb=function(t){return t+jb+++(e=function(){return Math.round(4294967295*Math.random()).toString(36)},"s"+(new Date).getTime().toString(36)+e()+e()+e());var e},Rb=function(t,e){var n={},r=function(t,n,r,o){var i=new XMLHttpRequest;i.open("POST",e.url),i.withCredentials=e.credentials,i.upload.onprogress=function(t){o(t.loaded/t.total*100)},i.onerror=function(){r("Image upload failed due to a XHR Transport error. Code: "+i.status)},i.onload=function(){if(i.status<200||i.status>=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){De.each(n[t],(function(t){t(e)})),delete n[t]},s=function(r,s){return r=De.grep(r,(function(e){return!t.isUploaded(e.blobUri())})),to.all(De.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 l;try{var u=function(){l&&l.close()};n(e,(function(n){u(),t.markUploaded(e.blobUri(),n),a(e.blobUri(),o(e,n)),s(o(e,n))}),(function(n,r){var o=r||{};u(),t.removeFailed(e.blobUri()),a(e.blobUri(),i(e,n,o)),s(i(e,n,o))}),(function(t){t<0||t>100||M.from(l).orThunk((function(){return M.from(r).map(A)})).each((function(e){l=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([])}))}}},Bb=function(t){return function(){return t.notificationManager.open({text:t.translate("Image uploading..."),type:"info",timeout:-1,progressBar:!0})}},qb=function(t,e){return Rb(e,{url:uu(t),basePath:cu(t),credentials:du(t),handler:fu(t)})},Fb=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||Mb("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 Q(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(h(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(){V(t,(function(t){URL.revokeObjectURL(t.blobUri())})),t=[]}}}(),o=Pb(),i=[],a=function(t){var e=Cs(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!Zv(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):[]}},l=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},u=function(t,e,n){var r='src="'+n+'"'+(n===Ce.transparentSrc?' data-mce-placeholder="1"':"");return t=l(t,'src="'+e+'"',r),t=l(t,'data-mce-src="'+e+'"','data-mce-src="'+n+'"')},c=function(e,n){V(t.undoManager.data,(function(t){"fragmented"===t.type?t.fragments=H(t.fragments,(function(t){return u(t,e,n)})):t.content=u(t.content,e,n)}))},d=function(n){return e||(e=qb(t,o)),g().then(s((function(o){var i=H(o,(function(t){return t.blobInfo}));return e.upload(i,Bb(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),ty(t)||function(e,n){var r,o=t.convertURL(n,"src");c(e.src,n),t.$(e).attr({src:su(t)?(r=n,r+(-1===r.indexOf("?")?"?":"&")+(new Date).getTime()):n,"data-mce-src":o})}(s,e.url)):e.error&&(e.error.options.remove&&(c(s.getAttribute("src"),Ce.transparentSrc),i.push(s)),function(t,e){Eb(t,Es.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&&(ty(t)?console.error("Removing images on failed uploads is currently unsupported for RTC"):t.undoManager.transact((function(){V(i,(function(e){t.dom.remove(e),r.removeByUri(e.src)}))}))),n&&n(s),s})))})))},p=function(e){if(au(t))return d(e)},m=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=ky(o,r)),n.findAll(t.getBody(),m).then(s((function(e){return e=Y(e,(function(e){return"string"!=typeof e||(Eb(t,e),!1)})),ty(t)||V(e,(function(t){c(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(){au(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){V(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}}},Ub=function(t){var e={},n=function(t,r){t&&(f(t)?(p(r)||(r=[r]),V(r,(function(t){v(t.deep)&&(t.deep=!gd(t)),v(t.split)&&(t.split=!gd(t)||vd(t)),v(t.remove)&&gd(t)&&!vd(t)&&(t.remove="none"),gd(t)&&vd(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 Tn(t)&&t.hasAttribute("href")},onformat:function(e,n,r){De.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 De.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 b(t)?e[t]:e},has:function(t){return _t(e,t)},register:n,unregister:function(t){return t&&e[t]&&delete e[t],e}}},zb=De.each,Hb=ys.DOM,Vb=function(t,e){var n,r,o,i=e&&e.schema||Ti({}),a=function(t){r="string"==typeof t?{name:t,classes:[],attrs:{}}:t;var e=Hb.create(r.name);return function(t,e){e.classes.length&&Hb.addClass(t,e.classes.join(" ")),Hb.setAttribs(t,e.attrs)}(e,r),e},s=function(t,e,n){var r,o,l=e.length>0&&e[0],u=l&&l.name,c=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!==De.inArray(o,e)?e:o[0])}(t,u);if(c)u===c?(o=e[0],e=e.slice(1)):o=c;else if(l)o=e[0],e=e.slice(1);else if(!n)return t;return o&&(r=a(o)).appendChild(t),n&&(r||(r=Hb.create("div")).appendChild(t),De.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=Hb.create("div")).appendChild(s(n,t.slice(1),r.siblings)),o):""},Wb=function(t){var e,n={classes:[],attrs:{}};return"*"!==(t=n.selector=De.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!==De.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},Kb=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 l=bt(e,"preview");if(Zn(l,!1))return"";a=l.getOr(a)}n=e.block||e.inline||"span";var u,c=(u=e.selector)&&"string"==typeof u?(u=(u=u.split(/\s*,\s*/)[0]).replace(/\s*(~\+|~|\+|>)\s*/g,"$1"),De.map(u.split(/(?:>|\s+(?![^\[\]]+\]))/),(function(t){var e=De.map(t.split(/(?:~\+|~|\+)/),Wb),n=e.pop();return e.length&&(n.siblings=e),n})).reverse()):[];c.length?(c[0].name||(c[0].name=n),n=e.selector,r=Vb(c,t)):r=Vb([n],t);var d=Hb.select(n,r)[0]||r.firstChild;return zb(e.styles,(function(t,e){var n=s(t);n&&Hb.setStyle(d,e,n)})),zb(e.attributes,(function(t,e){var n=s(t);n&&Hb.setAttrib(d,e,n)})),zb(e.classes,(function(t){var e=s(t);Hb.hasClass(d,e)||Hb.addClass(d,e)})),t.fire("PreviewFormats"),Hb.setStyles(r,{position:"absolute",left:-65535}),t.getBody().appendChild(r),o=Hb.getStyle(t.getBody(),"fontSize",!0),o=/px$/.test(o)?parseInt(o,10):0,zb(a.split(" "),(function(e){var n=Hb.getStyle(d,e,!0);if(!("background-color"===e&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(n)&&(n=Hb.getStyle(t.getBody(),e,!0),"#ffffff"===Hb.toHex(n).toLowerCase())||"color"===e&&"#000000"===Hb.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"),Hb.remove(r),i},Yb=function(t){var e=Ub(t),n=Cs(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),Pg(t),{get:e.get,has:e.has,register:e.register,unregister:e.unregister,apply:function(e,n,r){!function(t,e,n,r){ry(t).formatter.apply(e,n,r)}(t,e,n,r)},remove:function(e,n,r,o){!function(t,e,n,r,o){ry(t).formatter.remove(e,n,r,o)}(t,e,n,r,o)},toggle:function(e,n,r){!function(t,e,n,r){ry(t).formatter.toggle(e,n,r)}(t,e,n,r)},match:function(e,n,r,o){return function(t,e,n,r,o){return ry(t).formatter.match(e,n,r,o)}(t,e,n,r,o)},closest:function(e){return function(t,e){return ry(t).formatter.closest(e)}(t,e)},matchAll:function(e,n){return function(t,e,n){return ry(t).formatter.matchAll(e,n)}(t,e,n)},matchNode:function(e,n,r,o){return function(t,e,n,r,o){return ry(t).formatter.matchNode(e,n,r,o)}(t,e,n,r,o)},canApply:function(e){return function(t,e){return ry(t).formatter.canApply(e)}(t,e)},formatChanged:function(e,r,o,i){return function(t,e,n,r,o,i){return ry(t).formatter.formatChanged(e,n,r,o,i)}(t,n,e,r,o,i)},getCssText:D(Kb,t)}},Zb=function(t){switch(t.toLowerCase()){case"undo":case"redo":case"mcerepaint":case"mcefocus":return!0;default:return!1}},Gb=function(t){var e=Ls(),n=Cs(0),r=Cs(0),o={data:[],typing:!1,beforeChange:function(){!function(t,e,n){ry(t).undoManager.beforeChange(e,n)}(t,n,e)},add:function(i,a){return function(t,e,n,r,o,i,a){return ry(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 ry(t).undoManager.undo(e,n,r)}(t,o,n,r)},redo:function(){return function(t,e,n){return ry(t).undoManager.redo(e,n)}(t,r,o.data)},clear:function(){!function(t,e,n){ry(t).undoManager.clear(e,n)}(t,o,r)},reset:function(){!function(t,e){ry(t).undoManager.reset(e)}(t,o)},hasUndo:function(){return function(t,e,n){return ry(t).undoManager.hasUndo(e,n)}(t,o,r)},hasRedo:function(){return function(t,e,n){return ry(t).undoManager.hasRedo(e,n)}(t,o,r)},transact:function(e){return function(t,e,n,r){return ry(t).undoManager.transact(e,n,r)}(t,o,n,e)},ignore:function(e){!function(t,e,n){ry(t).undoManager.ignore(e,n)}(t,n,e)},extra:function(e,n){!function(t,e,n,r,o){ry(t).undoManager.extra(e,n,r,o)}(t,o,r,e,n)}};return ty(t)||function(t,e,n){var r=Cs(!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;Zb(r)||(Qv(e,n),e.beforeChange())})),t.on("ExecCommand",(function(t){var e=t.command;Zb(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===Zv(Vv(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){t.inputType&&(function(t){return"insertReplacementText"===t.inputType}(t)||function(t){return"insertText"===t.inputType&&null===t.data}(t)||function(t){return"insertFromPaste"===t.inputType||"insertFromDrop"===t.inputType}(t))&&o(t)})),t.on("AddUndo Undo Redo ClearUndos",(function(e){e.isDefaultPrevented()||t.nodeChanged()}))}(t,o,n),function(t){t.addShortcut("meta+z","","Undo"),t.addShortcut("meta+y,meta+shift+z","","Redo")}(t),o},Xb=[9,27,sf.HOME,sf.END,19,20,44,144,145,33,34,45,16,17,18,91,92,93,sf.DOWN,sf.UP,sf.LEFT,sf.RIGHT].concat(Ce.browser.isFirefox()?[224]:[]),Qb="data-mce-placeholder",Jb=function(t){return"keydown"===t.type||"keyup"===t.type},t_=function(t){var e=t.keyCode;return e===sf.BACKSPACE||e===sf.DELETE},e_=function(t){var e=t.dom,n=ou(t),r=function(t){return t.getParam("placeholder",eu.getAttrib(t.getElement(),"placeholder"),"string")}(t),o=function(i,a){if(!function(t){if(Jb(t)){var e=t.keyCode;return!t_(t)&&(sf.metaKeyPressed(t)||t.altKey||e>=112&&e<=123||U(Xb,e))}return!1}(i)){var s=t.getBody(),l=!function(t){return Jb(t)&&!(t_(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,Qb)!==l||a)&&(e.setAttrib(s,Qb,l?r:null),e.setAttrib(s,"aria-placeholder",l?r:null),function(t,e){t.fire("PlaceholderToggle",{state:e})}(t,l),t.on(l?"keydown":"keyup",o),t.off(l?"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)}))}))}))},n_=/[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/,r_=function(t,e){return Ne(Ae.fromDom(e),function(t){return t.getParam("inline_boundaries_selector","a[href],code,.mce-annotation","string")}(t))},o_=function(t){return"rtl"===ys.DOM.getStyle(t,"direction",!0)||(e=t.textContent,n_.test(e));var e},i_=function(t,e,n){var r=function(t,e,n){return Y(ys.DOM.getParents(n.container(),"*",e),t)}(t,e,n);return M.from(r[r.length-1])},a_=function(t,e){if(!e)return e;var n=e.container(),r=e.offset();return t?Eo(n)?Bn(n.nextSibling)?Tl(n.nextSibling,0):Tl.after(n):Ao(e)?Tl(n,r+1):e:Eo(n)?Bn(n.previousSibling)?Tl(n.previousSibling,n.previousSibling.data.length):Tl.before(n):To(e)?Tl(n,r-1):e},s_=D(a_,!0),l_=D(a_,!1),u_=function(t){return po(t)||go(t)},c_=function(t,e){return je(t,e)?Zr(e,u_,function(t){return function(e){return Ie(t,Ae.fromDom(e.dom.parentNode))}}(t)):M.none()},d_=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))},f_=function(t,e){return{from:t,to:e}},h_=function(t,e){var n=Ae.fromDom(t),r=Ae.fromDom(e.container());return c_(n,r).map((function(t){return function(t,e){return{block:t,position:e}}(t,e)}))},p_=function(t,e,n){var r=h_(t,Tl.fromRangeStart(n)),o=r.bind((function(n){return Tc(e,t,n.position).bind((function(n){return h_(t,n).map((function(n){return function(t,e,n){return zn(n.position.getNode())&&!1===ei(n.block)?Ic(!1,n.block.dom).bind((function(r){return r.isEqual(n.position)?Tc(e,t,r).bind((function(e){return h_(t,e)})):M.some(n)})).getOr(n):n}(t,e,n)}))}))}));return Gn(r,o,f_).filter((function(t){return function(t){return!1===Ie(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 Ie(e,t)}))})).isSome()}(t)&&function(t){return!1===Wn(t.from.block.dom)&&!1===Wn(t.to.block.dom)}(t)}))},m_=function(t){var e=Qe(t);return J(e,co).fold(S(e),(function(t){return e.slice(0,t)}))},g_=function(t){var e=m_(t);return V(e,vn),e},v_=function(t,e){var n=Lp(e,t);return Q(n.reverse(),(function(t){return ei(t)})).each(vn)},y_=function(t,e,n,r){if(ei(n))return Sp(n),Mc(n.dom);0===Y(Ge(r),(function(t){return!ei(t)})).length&&ei(e)&&dn(r,Ae.fromTag("br"));var o=jc(n.dom,Tl.before(r.dom));return V(g_(e),(function(t){dn(r,t)})),v_(t,e),o},b_=function(t,e,n){if(ei(n))return vn(n),ei(e)&&Sp(e),Mc(e.dom);var r=Rc(n.dom);return V(g_(e),(function(t){pn(n,t)})),v_(t,e),r},__=function(t,e){return je(e,t)?function(t,e){var n=Lp(e,t);return M.from(n[n.length-1])}(e,t):M.none()},w_=function(t,e){Ic(t,e.dom).map((function(t){return t.getNode()})).map(Ae.fromDom).filter(ho).each(vn)},k_=function(t,e,n){return w_(!0,e),w_(!1,n),__(e,n).fold(D(b_,t,e,n),D(y_,t,e,n))},C_=function(t,e,n,r){return e?k_(t,r,n):k_(t,n,r)},x_=function(t,e){var n=Ae.fromDom(t.getBody()),r=function(t,e,n){return n.collapsed?p_(t,e,n):M.none()}(n.dom,e,t.selection.getRng()).bind((function(t){return C_(n,e,t.from.block,t.to.block)}));return r.each((function(e){t.selection.setRng(e.toRange())})),r.isSome()},S_=function(t,e){var n=Ae.fromDom(e),r=D(Ie,t);return Yr(n,yo,r).isSome()},O_=function(t,e){var n=jc(t.dom,Tl.fromRangeStart(e)).isNone(),r=Pc(t.dom,Tl.fromRangeEnd(e)).isNone();return!function(t,e){return S_(t,e.startContainer)||S_(t,e.endContainer)}(t,e)&&n&&r},E_=function(t){var e=Ae.fromDom(t.getBody()),n=t.selection.getRng();return O_(e,n)?function(t){return t.setContent(""),t.selection.setCursorLocation(),!0}(t):function(t,e){var n=e.getRng();return Gn(c_(t,Ae.fromDom(n.startContainer)),c_(t,Ae.fromDom(n.endContainer)),(function(r,o){return!1===Ie(r,o)&&(n.deleteContents(),C_(t,!0,r,o).each((function(t){e.setRng(t.toRange())})),!0)})).getOr(!1)}(e,t.selection)},D_=function(t,e){return!t.selection.isCollapsed()&&E_(t)},L_=Vn,A_=Wn,T_=function(t,e,n,r,o){return M.from(e._selectionOverrides.showCaret(t,n,r,o))},N_=function(t,e){return t.fire("BeforeObjectSelected",{target:e}).isDefaultPrevented()?M.none():M.some(function(t){var e=t.ownerDocument.createRange();return e.selectNode(t),e}(e))},$_=function(t,e,n){var r=uc(1,t.getBody(),e),o=Tl.fromRangeStart(r),i=o.getNode();if(Uu(i))return T_(1,t,i,!o.isAtEnd(),!1);var a=o.getNode(!0);if(Uu(a))return T_(1,t,a,!1,!1);var s=t.dom.getParent(o.getNode(),(function(t){return A_(t)||L_(t)}));return Uu(s)?T_(1,t,s,!1,n):M.none()},I_=function(t,e,n){return e.collapsed?$_(t,e,n).getOr(e):e},P_=function(t){return kp(t)||yp(t)},j_=function(t){return Cp(t)||bp(t)},M_=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},R_=function(t,e){return function(t,e){var n=t.selection.getRng();if(!Bn(n.commonAncestorContainer))return!1;var r=e?Nl.Forwards:Nl.Backwards,o=Oc(t.getBody()),i=D(hc,e?o.next:o.prev),a=e?P_:j_,s=dc(r,t.getBody(),n),l=a_(e,i(s));if(!l||!pc(s,l))return!1;if(a(l))return M_(t,n,s.getNode(),r,e,l);var u=i(l);return!!(u&&a(u)&&pc(l,u))&&M_(t,n,s.getNode(),r,e,u)}(t,e)},B_=Sr([{remove:["element"]},{moveToElement:["element"]},{moveToPosition:["position"]}]),q_=function(t,e,n,r){var o=r.getNode(!1===e);return c_(Ae.fromDom(t),Ae.fromDom(n.getNode())).map((function(t){return ei(t)?B_.remove(t.dom):B_.moveToElement(o)})).orThunk((function(){return M.some(B_.moveToElement(o))}))},F_=function(t,e,n){return Tc(e,t,n).bind((function(r){return o=r.getNode(),yo(Ae.fromDom(o))||go(Ae.fromDom(o))||function(t,e,n,r){var o=function(e){return fo(Ae.fromDom(e))&&!nc(n,r,t)};return cc(!e,n).fold((function(){return cc(e,r).fold(N,o)}),o)}(t,e,n,r)?M.none():e&&Wn(r.getNode())||!1===e&&Wn(r.getNode(!0))?q_(t,e,n,r):e&&Cp(n)||!1===e&&kp(n)?M.some(B_.moveToPosition(r)):M.none();var o}))},U_=function(t,e,n){return function(t,e){var n=e.getNode(!1===t),r=t?"after":"before";return Tn(n)&&n.getAttribute("data-mce-caret")===r}(e,n)?function(t,e){return t&&Wn(e.nextSibling)?M.some(B_.moveToElement(e.nextSibling)):!1===t&&Wn(e.previousSibling)?M.some(B_.moveToElement(e.previousSibling)):M.none()}(e,n.getNode(!1===e)).fold((function(){return F_(t,e,n)}),M.some):F_(t,e,n).bind((function(e){return function(t,e,n){return n.fold((function(t){return M.some(B_.remove(t))}),(function(t){return M.some(B_.moveToElement(t))}),(function(n){return nc(e,n,t)?M.none():M.some(B_.moveToPosition(n))}))}(t,n,e)}))},z_=function(t,e){return M.from(ef(t.getBody(),e))},H_=function(t,e){var n=t.selection.getNode();return z_(t,n).filter(Wn).fold((function(){return function(t,e,n){var r=uc(e?1:-1,t,n),o=Tl.fromRangeStart(r),i=Ae.fromDom(t);return!1===e&&Cp(o)?M.some(B_.remove(o.getNode(!0))):e&&kp(o)?M.some(B_.remove(o.getNode())):!1===e&&kp(o)&&Fp(i,o)?Up(i,o).map((function(t){return B_.remove(t.getNode())})):e&&Cp(o)&&qp(i,o)?zp(i,o).map((function(t){return B_.remove(t.getNode())})):U_(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(),ym(t,e,Ae.fromDom(n)),!0}}(t,e),function(t,e){return function(n){var r=e?Tl.before(n):Tl.after(n);return t.selection.setRng(r.toRange()),!0}}(t,e),function(t){return function(e){return t.selection.setRng(e.toRange()),!0}}(t))}))}),$)},V_=function(t,e){var n=t.selection.getNode();return!(!Wn(n)||Kn(n))&&z_(t,n.parentNode).filter(Wn).fold((function(){var n;return n=Ae.fromDom(t.getBody()),V(qs(n,".mce-offscreen-selection"),vn),ym(t,e,Ae.fromDom(t.selection.getNode())),d_(t),!0}),$)},W_=function(t){var e=t.dom,n=t.selection,r=ef(t.getBody(),n.getNode());if(Vn(r)&&e.isBlock(r)&&e.isEmpty(r)){var o=e.create("br",{"data-mce-bogus":"1"});e.setHTML(r,""),r.appendChild(o),n.setRng(Tl.before(o).toRange())}return!0},K_=function(t,e){return t.selection.isCollapsed()?H_(t,e):V_(t,e)},Y_=function(t,e){return!!t.selection.isCollapsed()&&function(t,e){var n=Tl.fromRangeStart(t.selection.getRng());return Tc(e,t.getBody(),n).filter((function(t){return e?gp(t):vp(t)})).bind((function(t){return M.from(rc(e?0:-1,t))})).exists((function(e){return t.selection.select(e),!0}))}(t,e)},Z_=Bn,G_=function(t){return Z_(t)&&t.data[0]===wo},X_=function(t){return Z_(t)&&t.data[t.data.length-1]===wo},Q_=function(t){return t.ownerDocument.createTextNode(wo)},J_=function(t,e){return t?function(t){if(Z_(t.previousSibling))return X_(t.previousSibling)||t.previousSibling.appendData(wo),t.previousSibling;if(Z_(t))return G_(t)||t.insertData(0,wo),t;var e=Q_(t);return t.parentNode.insertBefore(e,t),e}(e):function(t){if(Z_(t.nextSibling))return G_(t.nextSibling)||t.nextSibling.insertData(0,wo),t.nextSibling;if(Z_(t))return X_(t)||t.appendData(wo),t;var e=Q_(t);return t.nextSibling?t.parentNode.insertBefore(e,t.nextSibling):t.parentNode.appendChild(e),e}(e)},tw=D(J_,!0),ew=D(J_,!1),nw=function(t,e){return Bn(t.container())?J_(e,t.container()):J_(e,t.getNode())},rw=function(t,e){var n=e.get();return n&&t.container()===n&&Eo(n)},ow=function(t,e){return e.fold((function(e){Iu(t.get());var n=tw(e);return t.set(n),M.some(Tl(n,n.length-1))}),(function(e){return Mc(e).map((function(e){if(rw(e,t))return Tl(t.get(),1);Iu(t.get());var n=nw(e,!0);return t.set(n),Tl(n,1)}))}),(function(e){return Rc(e).map((function(e){if(rw(e,t))return Tl(t.get(),t.get().length-1);Iu(t.get());var n=nw(e,!1);return t.set(n),Tl(n,n.length-1)}))}),(function(e){Iu(t.get());var n=ew(e);return t.set(n),M.some(Tl(n,1))}))},iw=function(t,e){for(var n=0;n<t.length;n++){var r=t[n].apply(null,e);if(r.isSome())return r}return M.none()},aw=Sr([{before:["element"]},{start:["element"]},{end:["element"]},{after:["element"]}]),sw=function(t,e){var n=ec(e,t);return n||t},lw=function(t,e,n){var r=s_(n),o=sw(e,r.container());return i_(t,o,r).fold((function(){return Pc(o,r).bind(D(i_,t,o)).map((function(t){return aw.before(t)}))}),M.none)},uw=function(t,e){return null===Fc(t,e)},cw=function(t,e,n){return i_(t,e,n).filter(D(uw,e))},dw=function(t,e,n){var r=l_(n);return cw(t,e,r).bind((function(t){return jc(t,r).isNone()?M.some(aw.start(t)):M.none()}))},fw=function(t,e,n){var r=s_(n);return cw(t,e,r).bind((function(t){return Pc(t,r).isNone()?M.some(aw.end(t)):M.none()}))},hw=function(t,e,n){var r=l_(n),o=sw(e,r.container());return i_(t,o,r).fold((function(){return jc(o,r).bind(D(i_,t,o)).map((function(t){return aw.after(t)}))}),M.none)},pw=function(t){return!1===o_(gw(t))},mw=function(t,e,n){return iw([lw,dw,fw,hw],[t,e,n]).filter(pw)},gw=function(t){return t.fold(O,O,O,O)},vw=function(t){return t.fold(S("before"),S("start"),S("end"),S("after"))},yw=function(t){return t.fold(aw.before,aw.before,aw.after,aw.after)},bw=function(t){return t.fold(aw.start,aw.start,aw.end,aw.end)},_w=function(t,e,n,r,o,i){return Gn(i_(e,n,r),i_(e,n,o),(function(e,r){return e!==r&&function(t,e,n){var r=ec(e,t),o=ec(n,t);return r&&r===o}(n,e,r)?aw.after(t?e:r):i})).getOr(i)},ww=function(t,e){return t.fold($,(function(t){return r=e,!(vw(n=t)===vw(r)&&gw(n)===gw(r));var n,r}))},kw=function(t,e){return t?e.fold(C(M.some,aw.start),M.none,C(M.some,aw.after),M.none):e.fold(M.none,C(M.some,aw.before),M.none,C(M.some,aw.end))},Cw=function(t,e,n,r){var o=a_(t,r),i=mw(e,n,o);return mw(e,n,o).bind(D(kw,t)).orThunk((function(){return function(t,e,n,r,o){var i=a_(t,o);return Tc(t,n,i).map(D(a_,t)).fold((function(){return r.map(yw)}),(function(o){return mw(e,n,o).map(D(_w,t,e,n,i,o)).filter(D(ww,r))})).filter(pw)}(t,e,n,i,r)}))};D(Cw,!1),D(Cw,!0);var xw,Sw=function(t,e,n){var r=t?1:-1;return e.setRng(Tl(n.container(),n.offset()+r).toRange()),e.getSel().modify("move",t?"forward":"backward","word"),!0},Ow=function(t,e){var n=e.selection.getRng(),r=t?Tl.fromRangeEnd(n):Tl.fromRangeStart(n);return!!function(t){return _(t.selection.getSel().modify)}(e)&&(t&&Ao(r)?Sw(!0,e.selection,r):!(t||!To(r))&&Sw(!1,e.selection,r))};!function(t){t[t.Br=0]="Br",t[t.Block=1]="Block",t[t.Wrap=2]="Wrap",t[t.Eol=3]="Eol"}(xw||(xw={}));var Ew,Dw=function(t,e){return t===Nl.Backwards?nt(e):e},Lw=function(t,e,n){return t===Nl.Forwards?e.next(n):e.prev(n)},Aw=function(t,e,n,r){return zn(r.getNode(e===Nl.Forwards))?xw.Br:!1===nc(n,r)?xw.Block:xw.Wrap},Tw=function(t,e,n,r){for(var o=Oc(n),i=r,a=[];i;){var s=Lw(e,o,i);if(!s)break;if(zn(s.getNode(!1)))return e===Nl.Forwards?{positions:Dw(e,a).concat([s]),breakType:xw.Br,breakAt:M.some(s)}:{positions:Dw(e,a),breakType:xw.Br,breakAt:M.some(s)};if(s.isVisible()){if(t(i,s)){var l=Aw(0,e,i,s);return{positions:Dw(e,a),breakType:l,breakAt:M.some(s)}}a.push(s),i=s}else i=s}return{positions:Dw(e,a),breakType:xw.Eol,breakAt:M.none()}},Nw=function(t,e,n,r){return e(n,r).breakAt.map((function(r){var o=e(n,r).positions;return t===Nl.Backwards?o.concat(r):[r].concat(o)})).getOr([])},$w=function(t,e){return G(t,(function(t,n){return t.fold((function(){return M.some(n)}),(function(r){return Gn(at(r.getClientRects()),at(n.getClientRects()),(function(t,o){var i=Math.abs(e-t.left);return Math.abs(e-o.left)<=i?n:r})).or(t)}))}),M.none())},Iw=function(t,e){return at(e.getClientRects()).bind((function(e){return $w(t,e.left)}))},Pw=D(Tw,Tl.isAbove,-1),jw=D(Tw,Tl.isBelow,1),Mw=D(Nw,-1,Pw),Rw=D(Nw,1,jw),Bw=function(t){var e=function(e){return H(e,(function(e){var n=rl(e);return n.node=t,n}))};if(Tn(t))return e(t.getClientRects());if(Bn(t)){var n=t.ownerDocument.createRange();return n.setStart(t,0),n.setEnd(t,t.data.length),e(n.getClientRects())}},qw=function(t){return tt(t,Bw)};!function(t){t[t.Up=-1]="Up",t[t.Down=1]="Down"}(Ew||(Ew={}));var Fw,Uw,zw=function(t,e,n,r,o,i){var a=0,s=[],l=function(r){var i=qw([r]);-1===t&&(i=i.reverse());for(var l=0;l<i.length;l++){var c=i[l];if(!n(c,u)){if(s.length>0&&e(c,Lt(s))&&a++,c.line=a,o(c))return!0;s.push(c)}}},u=Lt(i.getClientRects());if(!u)return s;var c=i.getNode();return l(c),function(t,e,n,r){for(;r=tc(r,t,Ko,e);)if(n(r))return}(t,r,l,c),s},Hw=D(zw,Ew.Up,al,sl),Vw=D(zw,Ew.Down,sl,al),Ww=function(t){return function(e){return function(t,e){return e.line>t}(t,e)}},Kw=function(t){return function(e){return function(t,e){return e.line===t}(t,e)}},Yw=Wn,Zw=tc,Gw=function(t,e){return Math.abs(t.left-e)},Xw=function(t,e){return Math.abs(t.right-e)},Qw=function(t,e){return t>=e.left&&t<=e.right},Jw=function(t,e){return t>=e.top&&t<=e.bottom},tk=function(t,e,n){return void 0===n&&(n=$),Et(t,(function(t,r){if(Qw(e,r))return n(r)?r:t;if(Qw(e,t))return n(t)?t:r;var o=Math.min(Gw(t,e),Xw(t,e)),i=Math.min(Gw(r,e),Xw(r,e));return i===o&&wt(r,"node")&&Yw(r.node)||i<o?r:t}))},ek=function(t,e,n,r,o){var i=Zw(r,t,Ko,e,!o);do{if(!i||n(i))return}while(i=Zw(i,t,Ko,e))},nk=function(t,e,n){var r=qw(function(t){return Y(lt(t.getElementsByTagName("*")),zu)}(t)),o=Y(r,D(Jw,n)),i=function(t){return!jn(t.node)&&!Yn(t.node)},a=tk(o,e,i);if(a){var s=i(a);if(a=tk(function(t,e,n){void 0===n&&(n=!0);var r=[],o=function(t,n){var o=Y(qw([n]),(function(n){return!t(n,e)}));return r=r.concat(o),0===o.length};return r.push(e),ek(Ew.Up,t,D(o,al),e.node,n),ek(Ew.Down,t,D(o,sl),e.node,n),r}(t,a,s),e,i),a&&zu(a.node))return function(t,e){return{node:t.node,before:Gw(t,e)<Xw(t,e)}}(a,e)}return null},rk=function(t,e){t.selection.setRng(e),Wf(t,t.selection.getRng())},ok=function(t,e,n){return M.some(I_(t,e,n))},ik=function(t,e,n,r,o,i){var a=e===Nl.Forwards,s=Oc(t.getBody()),l=D(hc,a?s.next:s.prev),u=a?r:o;if(!n.collapsed){var c=ul(n);if(i(c))return T_(e,t,c,e===Nl.Backwards,!1)}var d=dc(e,t.getBody(),n);if(u(d))return N_(t,d.getNode(!a));var f=a_(a,l(d)),h=jo(n);if(!f)return h?M.some(n):M.none();if(u(f))return T_(e,t,f.getNode(!a),a,!1);var p=l(f);return p&&u(p)&&pc(f,p)?T_(e,t,p.getNode(!a),a,!1):h?ok(t,f.toRange(),!1):M.none()},ak=function(t,e,n,r,o,i){var a=dc(e,t.getBody(),n),s=Lt(a.getClientRects()),l=e===Ew.Down;if(!s)return M.none();var u,c=(l?Vw:Hw)(t.getBody(),Ww(1),a),d=Y(c,Kw(1)),f=s.left,h=tk(d,f);if(h&&i(h.node)){var p=Math.abs(f-h.left),m=Math.abs(f-h.right);return T_(e,t,h.node,p<m,!1)}if(u=r(a)?a.getNode():o(a)?a.getNode(!0):ul(n)){var g=function(t,e,n,r){var o,i,a,s,l=Oc(e),u=[],c=0,d=function(t){return Lt(t.getClientRects())};1===t?(o=l.next,i=sl,a=al,s=Tl.after(r)):(o=l.prev,i=al,a=sl,s=Tl.before(r));var f=d(s);do{if(s.isVisible()){var h=d(s);if(!a(h,f)){u.length>0&&i(h,Lt(u))&&c++;var p=rl(h);if(p.position=s,p.line=c,n(p))return u;u.push(p)}}}while(s=o(s));return u}(e,t.getBody(),Ww(1),u),v=tk(Y(g,Kw(1)),f);if(v)return ok(t,v.position.toRange(),!1);if(v=Lt(Y(g,Kw(0))))return ok(t,v.position.toRange(),!1)}return 0===d.length?sk(t,l).filter(l?o:r).map((function(e){return I_(t,e.toRange(),!1)})):M.none()},sk=function(t,e){var n=t.selection.getRng(),r=t.getBody();if(e){var o=Tl.fromRangeEnd(n),i=jw(r,o);return st(i.positions)}o=Tl.fromRangeStart(n),i=Pw(r,o);return at(i.positions)},lk=function(t,e,n){return sk(t,e).filter(n).exists((function(e){return t.selection.setRng(e.toRange()),!0}))},uk=function(t,e){var n=t.dom.createRng();n.setStart(e.container(),e.offset()),n.setEnd(e.container(),e.offset()),t.selection.setRng(n)},ck=function(t,e){t?e.setAttribute("data-mce-selected","inline-boundary"):e.removeAttribute("data-mce-selected")},dk=function(t,e,n){return ow(e,n).map((function(e){return uk(t,e),n}))},fk=function(t,e){if(t.selection.isCollapsed()&&!0!==t.composing&&e.get()){var n=Tl.fromRangeStart(t.selection.getRng());Tl.isTextPosition(n)&&!1===function(t){return Ao(t)||To(t)}(n)&&(uk(t,$u(e.get(),n)),e.set(null))}},hk=function(t,e,n){return!!ku(t)&&function(t,e,n){var r=t.getBody(),o=Tl.fromRangeStart(t.selection.getRng()),i=D(r_,t);return Cw(n,i,r,o).bind((function(n){return dk(t,e,n)}))}(t,e,n).isSome()},pk=function(t,e,n){return!!ku(e)&&Ow(t,e)},mk=function(t){var e=Cs(null),n=D(r_,t);return t.on("NodeChange",(function(r){!ku(t)||Ce.browser.isIE()&&r.initial||(function(t,e,n){var r=H(qs(Ae.fromDom(e.getRoot()),'*[data-mce-selected="inline-boundary"]'),(function(t){return t.dom})),o=Y(r,t),i=Y(n,t);V(rt(o,i),D(ck,!1)),V(rt(i,o),D(ck,!0))}(n,t.dom,r.parents),fk(t,e),function(t,e,n,r){if(e.selection.isCollapsed()){var o=Y(r,t);V(o,(function(r){var o=Tl.fromRangeStart(e.selection.getRng());mw(t,e.getBody(),o).bind((function(t){return dk(e,n,t)}))}))}}(n,t,e,r.parents))})),e},gk=D(pk,!0),vk=D(pk,!1),yk=function(t,e,n){if(ku(t)){var r=sk(t,e).getOrThunk((function(){var n=t.selection.getRng();return e?Tl.fromRangeEnd(n):Tl.fromRangeStart(n)}));return mw(D(r_,t),t.getBody(),r).exists((function(e){var r=yw(e);return ow(n,r).exists((function(e){return uk(t,e),!0}))}))}return!1},bk=function(t,e){return function(n){return ow(e,n).exists((function(e){return uk(t,e),!0}))}},_k=function(t,e,n,r){var o=t.getBody(),i=D(r_,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"),mw(i,o,Tl.fromRangeStart(t.selection.getRng())).map(bw).map(bk(t,e))})),t.nodeChanged()},wk=function(t,e,n,r){var o=function(t,e){return ec(e,t)||t}(t.getBody(),r.container()),i=D(r_,t),a=mw(i,o,r);return a.bind((function(t){return n?t.fold(S(M.some(bw(t))),M.none,S(M.some(yw(t))),M.none):t.fold(M.none,S(M.some(yw(t))),M.none,S(M.some(bw(t))))})).map(bk(t,e)).getOrThunk((function(){var s=Nc(n,o,r),l=s.bind((function(t){return mw(i,o,t)}));return Gn(a,l,(function(){return i_(i,o,r).exists((function(e){return!!function(t){return Gn(Mc(t),Rc(t),(function(e,n){var r=a_(!0,e),o=a_(!1,n);return Pc(t,r).forall((function(t){return t.isEqual(o)}))})).getOr(!0)}(e)&&(ym(t,n,Ae.fromDom(e)),!0)}))})).orThunk((function(){return l.bind((function(o){return s.map((function(o){return n?_k(t,e,r,o):_k(t,e,o,r),!0}))}))})).getOr(!1)}))},kk=function(t,e,n){if(t.selection.isCollapsed()&&ku(t)){var r=Tl.fromRangeStart(t.selection.getRng());return wk(t,e,n,r)}return!1},Ck=function(t){return 1===nn(t)},xk=function(t,e,n,r){var o=D(jg,e),i=H(Y(r,o),(function(t){return t.dom}));if(0===i.length)ym(e,t,n);else{var a=function(t,e){var n=Lg(!1),r=$g(e,n.dom);return dn(Ae.fromDom(t),n),vn(Ae.fromDom(t)),Tl(r,0)}(n.dom,i);e.selection.setRng(a.toRange())}},Sk=function(t,e){var n=Ae.fromDom(t.getBody()),r=Ae.fromDom(t.selection.getStart()),o=Y(function(t,e){var n=Lp(e,t);return J(n,co).fold(S(n),(function(t){return n.slice(0,t)}))}(n,r),Ck);return st(o).exists((function(n){var r,i=Tl.fromRangeStart(t.selection.getRng());return!(!function(t,e,n){return Gn(Mc(n),Rc(n),(function(r,o){var i=a_(!0,r),a=a_(!1,o),s=a_(!1,e);return t?Pc(n,s).exists((function(t){return t.isEqual(a)&&e.isEqual(i)})):jc(n,s).exists((function(t){return t.isEqual(i)&&e.isEqual(a)}))})).getOr(!0)}(e,i,n.dom)||(r=n,qc(r.dom)&&Eg(r.dom)))&&(xk(e,t,n,o),!0)}))},Ok=function(t,e){return!!t.selection.isCollapsed()&&Sk(t,e)},Ek=function(t,e,n){return t._selectionOverrides.hideFakeCaret(),ym(t,e,Ae.fromDom(n)),!0},Dk=function(t,e){return t.selection.isCollapsed()?function(t,e){var n=e?yp:bp,r=e?Nl.Forwards:Nl.Backwards,o=dc(r,t.getBody(),t.selection.getRng());return n(o)?Ek(t,e,o.getNode(!e)):M.from(a_(e,o)).filter((function(t){return n(t)&&pc(o,t)})).exists((function(n){return Ek(t,e,n.getNode(!e))}))}(t,e):function(t,e){var n=t.selection.getNode();return!!Yn(n)&&Ek(t,e,n)}(t,e)},Lk=function(t){var e=parseInt(t,10);return isNaN(e)?0:e},Ak=function(t,e){return(t||"table"===Me(e)?"margin":"padding")+("rtl"===ir(e,"direction")?"-right":"-left")},Tk=function(t){var e=$k(t);return!t.mode.isReadOnly()&&(e.length>1||function(t,e){return et(e,(function(e){var n=Ak(gu(t),e),r=sr(e,n).map(Lk).getOr(0);return"false"!==t.dom.getContentEditable(e.dom)&&r>0}))}(t,e))},Nk=function(t){return mo(t)||go(t)},$k=function(t){return Y((e=t.selection.getSelectedBlocks(),H(e,Ae.fromDom)),(function(t){return!Nk(t)&&!function(t){return Ke(t).exists(Nk)}(t)&&Zr(t,(function(t){return Vn(t.dom)||Wn(t.dom)})).exists((function(t){return Vn(t.dom)}))}));var e},Ik=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),l=gu(t),u=ou(t);t.queryCommandState("InsertUnorderedList")||t.queryCommandState("InsertOrderedList")||""!==u||n.getParent(r.getNode(),n.isBlock)||o.apply("div"),V($k(t),(function(t){!function(t,e,n,r,o,i){var a=Ak(n,Ae.fromDom(i));if("outdent"===e){var s=Math.max(0,Lk(i.style[a])-r);t.setStyle(i,a,s?s+o:"")}else s=Lk(i.style[a])+r+o,t.setStyle(i,a,s)}(n,e,l,s,a,t.dom)}))},Pk=function(t,e){if(t.selection.isCollapsed()&&Tk(t)){var n=t.dom,r=t.selection.getRng(),o=Tl.fromRangeStart(r),i=n.getParent(r.startContainer,n.isBlock);if(null!==i&&Ip(Ae.fromDom(i),o))return Ik(t,"outdent"),!0}return!1},jk=function(t,e){t.getDoc().execCommand(e,!1,null)},Mk=function(t,e){t.addCommand("delete",(function(){!function(t,e){Pk(t)||K_(t,!1)||R_(t,!1)||kk(t,e,!1)||x_(t,!1)||Ym(t)||Y_(t,!1)||Dk(t,!1)||D_(t)||Ok(t,!1)||(jk(t,"Delete"),d_(t))}(t,e)})),t.addCommand("forwardDelete",(function(){!function(t,e){K_(t,!0)||R_(t,!0)||kk(t,e,!0)||x_(t,!0)||Ym(t)||Y_(t,!0)||Dk(t,!0)||D_(t)||Ok(t,!0)||jk(t,"ForwardDelete")}(t,e)}))},Rk=function(t){return void 0===t.touches||1!==t.touches.length?M.none():M.some(t.touches[0])},Bk=function(t){var e=Ls(),n=Cs(!1),r=Ts((function(e){t.fire("longpress",At(At({},e),{type:"longpress"})),n.set(!0)}),400);t.on("touchstart",(function(t){Rk(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(),Rk(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)},qk=function(t,e){return _t(t,e.nodeName)},Fk=function(t,e){return!!Bn(e)||!!Tn(e)&&(!qk(t,e)&&!Qc(e))},Uk=function(t,e){if(Bn(e)){if(0===e.nodeValue.length)return!0;if(/^\s+$/.test(e.nodeValue)&&(!e.nextSibling||qk(t,e.nextSibling)))return!0}return!1},zk=function(t){var e,n,r,o=t.dom,i=t.selection,a=t.schema,s=a.getBlockElements(),l=i.getStart(),u=t.getBody(),c=ou(t);if(l&&Tn(l)&&c){var d=u.nodeName.toLowerCase();if(a.isValidChild(d,c.toLowerCase())&&!function(t,e,n){return z(Dp(Ae.fromDom(n),Ae.fromDom(e)),(function(e){return qk(t,e.dom)}))}(s,u,l)){var f=i.getRng(),h=f.startContainer,p=f.startOffset,m=f.endContainer,g=f.endOffset,v=kh(t);for(l=u.firstChild;l;)if(Fk(s,l)){if(Uk(s,l)){n=l,l=l.nextSibling,o.remove(n);continue}e||(e=o.create(c,iu(t)),l.parentNode.insertBefore(e,l),r=!0),n=l,l=l.nextSibling,e.appendChild(n)}else e=null,l=l.nextSibling;r&&v&&(f.setStart(h,p),f.setEnd(m,g),i.setRng(f),t.nodeChanged())}}},Hk=function(t,e){e.hasAttribute("data-mce-caret")&&(Po(e),function(t){t.selection.setRng(t.selection.getRng())}(t),t.selection.scrollIntoView(e))},Vk=function(t,e){var n=function(t){return Qr(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 Hk(t,n)):void(Lo(n)&&(Hk(t,n),t.undoManager.add()))},Wk=Wn,Kk=function(t,e,n){var r=Oc(t.getBody()),o=D(hc,1===e?r.next:r.prev);if(n.collapsed&&function(t){return""!==ou(t)}(t)){var i=t.dom.getParent(n.startContainer,"PRE");if(!i)return;if(!o(Tl.fromRangeStart(n))){var a=function(t){var e=t.dom.create(ou(t));return(!Ce.ie||Ce.ie>=11)&&(e.innerHTML='<br data-mce-bogus="1">'),e}(t);1===e?t.$(i).after(a):t.$(i).before(a),t.selection.select(a,!0),t.selection.collapse()}}},Yk=function(t,e){var n=e?Nl.Forwards:Nl.Backwards,r=t.selection.getRng();return function(t,e,n){return ik(e,t,n,kp,Cp,Wk)}(n,t,r).orThunk((function(){return Kk(t,n,r),M.none()}))},Zk=function(t,e){var n=e?1:-1,r=t.selection.getRng();return function(t,e,n){return ak(e,t,n,(function(t){return kp(t)||_p(t)}),(function(t){return Cp(t)||wp(t)}),Wk)}(n,t,r).orThunk((function(){return Kk(t,n,r),M.none()}))},Gk=function(t,e){return Yk(t,e).exists((function(e){return rk(t,e),!0}))},Xk=function(t,e){return Zk(t,e).exists((function(e){return rk(t,e),!0}))},Qk=function(t,e){return lk(t,e,e?Cp:kp)},Jk=function(t){return U(["figcaption"],Me(t))},tC=function(t){var e=document.createRange();return e.setStartBefore(t.dom),e.setEndBefore(t.dom),e},eC=function(t,e,n){n?pn(t,e):hn(t,e)},nC=function(t,e,n,r){return""===e?function(t,e){var n=Ae.fromTag("br");return eC(t,n,e),tC(n)}(t,r):function(t,e,n,r){var o=Ae.fromTag(n),i=Ae.fromTag("br");return tr(o,r),pn(o,i),eC(t,o,e),tC(i)}(t,r,e,n)},rC=function(t,e,n){return e?function(t,e){return jw(t,e).breakAt.isNone()}(t.dom,n):function(t,e){return Pw(t,e).breakAt.isNone()}(t.dom,n)},oC=function(t,e){var n=Ae.fromDom(t.getBody()),r=Tl.fromRangeStart(t.selection.getRng()),o=ou(t),i=iu(t);return function(t,e){var n=D(Ie,e);return Zr(Ae.fromDom(t.container()),co,n).filter(Jk)}(r,n).exists((function(){if(rC(n,e,r)){var a=nC(n,o,i,e);return t.selection.setRng(a),!0}return!1}))},iC=function(t,e){return!!t.selection.isCollapsed()&&oC(t,e)},aC=function(t,e){return tt(function(t){return H(t,(function(t){return At({shiftKey:!1,altKey:!1,ctrlKey:!1,metaKey:!1,keyCode:0,action:k},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]:[]}))},sC=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return function(){return t.apply(null,e)}},lC=function(t,e){return Q(aC(t,e),(function(t){return t.action()}))},uC=function(t,e){var n=e?Nl.Forwards:Nl.Backwards,r=t.selection.getRng();return ik(t,n,r,yp,bp,Yn).exists((function(e){return rk(t,e),!0}))},cC=function(t,e){var n=e?1:-1,r=t.selection.getRng();return ak(t,n,r,yp,bp,Yn).exists((function(e){return rk(t,e),!0}))},dC=function(t,e){return lk(t,e,e?bp:yp)},fC=function(t,e,n,r,o){var i=qs(Ae.fromDom(n),"td,th,caption").map((function(t){return t.dom})),a=Y(function(t,e){return tt(e,(function(e){var n=function(t,e){return{left:t.left-e,top:t.top-e,right:t.right+2*e,bottom:t.bottom+2*e,width:t.width+e,height:t.height+e}}(rl(e.getBoundingClientRect()),-1);return[{x:n.left,y:t(n),cell:e},{x:n.right,y:t(n),cell:e}]}))}(t,i),(function(t){return e(t,o)}));return function(t,e,n){return G(t,(function(t,r){return t.fold((function(){return M.some(r)}),(function(t){var o=Math.sqrt(Math.abs(t.x-e)+Math.abs(t.y-n)),i=Math.sqrt(Math.abs(r.x-e)+Math.abs(r.y-n));return M.some(i<o?r:t)}))}),M.none())}(a,r,o).map((function(t){return t.cell}))},hC=D(fC,(function(t){return t.bottom}),(function(t,e){return t.y<e})),pC=D(fC,(function(t){return t.top}),(function(t,e){return t.y>e})),mC=function(t,e){return at(e.getClientRects()).bind((function(e){return hC(t,e.left,e.top)})).bind((function(t){return Iw(Rc(n=t).map((function(t){return Pw(n,t).positions.concat(t)})).getOr([]),e);var n}))},gC=function(t,e){return st(e.getClientRects()).bind((function(e){return pC(t,e.left,e.top)})).bind((function(t){return Iw(Mc(n=t).map((function(t){return[t].concat(jw(n,t).positions)})).getOr([]),e);var n}))},vC=function(t,e,n){var r=t(e,n);return function(t){return t.breakType===xw.Wrap&&0===t.positions.length}(r)||!zn(n.getNode())&&function(t){return t.breakType===xw.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()},yC=D(vC,Pw),bC=D(vC,jw),_C=function(t,e,n,r){var o=t.selection.getRng(),i=e?1:-1;return!(!Fu()||!function(t,e,n){var r=Tl.fromRangeStart(e);return Ic(!t,n).exists((function(t){return t.isEqual(r)}))}(e,o,n))&&(T_(i,t,n,!e,!1).each((function(e){rk(t,e)})),!0)},wC=function(t,e){var n=e.getNode(t);return Tn(n)&&"TABLE"===n.nodeName?M.some(n):M.none()},kC=function(t,e,n){var r=wC(!!e,n),o=!1===e;r.fold((function(){return rk(t,n.toRange())}),(function(r){return Ic(o,t.getBody()).filter((function(t){return t.isEqual(n)})).fold((function(){return rk(t,n.toRange())}),(function(o){return function(t,e,n,r){var o=ou(e);o?e.undoManager.transact((function(){var r=Ae.fromTag(o);tr(r,iu(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),rk(e,i)})):rk(e,r.toRange())}(e,t,r,n)}))}))},CC=function(t,e,n,r){var o=t.selection.getRng(),i=Tl.fromRangeStart(o),a=t.getBody();if(!e&&yC(r,i)){var s=function(t,e,n){return mC(e,n).orThunk((function(){return at(n.getClientRects()).bind((function(n){return $w(Mw(t,Tl.before(e)),n.left)}))})).getOr(Tl.before(e))}(a,n,i);return kC(t,e,s),!0}if(e&&bC(r,i)){s=function(t,e,n){return gC(e,n).orThunk((function(){return at(n.getClientRects()).bind((function(n){return $w(Rw(t,Tl.after(e)),n.left)}))})).getOr(Tl.after(e))}(a,n,i);return kC(t,e,s),!0}return!1},xC=function(t,e,n){return M.from(t.dom.getParent(t.selection.getNode(),"td,th")).bind((function(r){return M.from(t.dom.getParent(r,"table")).map((function(o){return n(t,e,o,r)}))})).getOr(!1)},SC=function(t,e){return xC(t,e,_C)},OC=function(t,e){return xC(t,e,CC)},EC=function(t,e){t.on("keydown",(function(n){!1===n.isDefaultPrevented()&&function(t,e,n){var r=pe().os;lC([{keyCode:sf.RIGHT,action:sC(Gk,t,!0)},{keyCode:sf.LEFT,action:sC(Gk,t,!1)},{keyCode:sf.UP,action:sC(Xk,t,!1)},{keyCode:sf.DOWN,action:sC(Xk,t,!0)},{keyCode:sf.RIGHT,action:sC(SC,t,!0)},{keyCode:sf.LEFT,action:sC(SC,t,!1)},{keyCode:sf.UP,action:sC(OC,t,!1)},{keyCode:sf.DOWN,action:sC(OC,t,!0)},{keyCode:sf.RIGHT,action:sC(uC,t,!0)},{keyCode:sf.LEFT,action:sC(uC,t,!1)},{keyCode:sf.UP,action:sC(cC,t,!1)},{keyCode:sf.DOWN,action:sC(cC,t,!0)},{keyCode:sf.RIGHT,action:sC(hk,t,e,!0)},{keyCode:sf.LEFT,action:sC(hk,t,e,!1)},{keyCode:sf.RIGHT,ctrlKey:!r.isOSX(),altKey:r.isOSX(),action:sC(gk,t,e)},{keyCode:sf.LEFT,ctrlKey:!r.isOSX(),altKey:r.isOSX(),action:sC(vk,t,e)},{keyCode:sf.UP,action:sC(iC,t,!1)},{keyCode:sf.DOWN,action:sC(iC,t,!0)}],n).each((function(t){n.preventDefault()}))}(t,e,n)}))},DC=function(t,e){t.on("keydown",(function(n){!1===n.isDefaultPrevented()&&function(t,e,n){lC([{keyCode:sf.BACKSPACE,action:sC(Pk,t,!1)},{keyCode:sf.BACKSPACE,action:sC(K_,t,!1)},{keyCode:sf.DELETE,action:sC(K_,t,!0)},{keyCode:sf.BACKSPACE,action:sC(R_,t,!1)},{keyCode:sf.DELETE,action:sC(R_,t,!0)},{keyCode:sf.BACKSPACE,action:sC(kk,t,e,!1)},{keyCode:sf.DELETE,action:sC(kk,t,e,!0)},{keyCode:sf.BACKSPACE,action:sC(Ym,t,!1)},{keyCode:sf.DELETE,action:sC(Ym,t,!0)},{keyCode:sf.BACKSPACE,action:sC(Y_,t,!1)},{keyCode:sf.DELETE,action:sC(Y_,t,!0)},{keyCode:sf.BACKSPACE,action:sC(Dk,t,!1)},{keyCode:sf.DELETE,action:sC(Dk,t,!0)},{keyCode:sf.BACKSPACE,action:sC(D_,t,!1)},{keyCode:sf.DELETE,action:sC(D_,t,!0)},{keyCode:sf.BACKSPACE,action:sC(x_,t,!1)},{keyCode:sf.DELETE,action:sC(x_,t,!0)},{keyCode:sf.BACKSPACE,action:sC(Ok,t,!1)},{keyCode:sf.DELETE,action:sC(Ok,t,!0)}],n).each((function(t){n.preventDefault()}))}(t,e,n)})),t.on("keyup",(function(e){!1===e.isDefaultPrevented()&&function(t,e){lC([{keyCode:sf.BACKSPACE,action:sC(W_,t)},{keyCode:sf.DELETE,action:sC(W_,t)}],e)}(t,e)}))},LC=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 l=new so(e,e);n=l.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=l.next()}n||(s.setStart(r,0),s.setEnd(r,0))}else zn(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),Wf(t,s)}},AC=function(t){return M.from(t.dom.getParent(t.selection.getStart(!0),t.dom.isBlock))},TC=function(t,e){return t&&t.parentNode&&t.parentNode.nodeName===e},NC=function(t){return t&&/^(OL|UL|LI)$/.test(t.nodeName)},$C=function(t){var e=t.parentNode;return/^(LI|DT|DD)$/.test(e.nodeName)?e:t},IC=function(t,e,n){for(var r=t[n?"firstChild":"lastChild"];r&&!Tn(r);)r=r[n?"nextSibling":"previousSibling"];return r===e},PC=function(t,e,n,r,o){var i=t.dom,a=t.selection.getRng();if(n!==t.getBody()){var s;NC(s=n)&&NC(s.parentNode)&&(o="LI");var l=o?e(o):i.create("BR");if(IC(n,r,!0)&&IC(n,r,!1))if(TC(n,"LI")){var u=$C(n);i.insertAfter(l,u),!function(t){var e;return(null===(e=t.parentNode)||void 0===e?void 0:e.firstChild)===t}(n)?i.remove(n):i.remove(u)}else i.replace(l,n);else if(IC(n,r,!0))TC(n,"LI")?(i.insertAfter(l,$C(n)),l.appendChild(i.doc.createTextNode(" ")),l.appendChild(n)):n.parentNode.insertBefore(l,n),i.remove(r);else if(IC(n,r,!1))i.insertAfter(l,$C(n)),i.remove(r);else{n=$C(n);var c=a.cloneRange();c.setStartAfter(r),c.setEndAfter(n);var d=c.extractContents();"LI"===o&&function(t,e){return t.firstChild&&t.firstChild.nodeName===e}(d,"LI")?(l=d.firstChild,i.insertAfter(d,n)):(i.insertAfter(d,n),i.insertAfter(l,n)),i.remove(r)}LC(t,l)}},jC=function(t,e){return e&&"A"===e.nodeName&&t.isEmpty(e)},MC=function(t){t.innerHTML='<br data-mce-bogus="1">'},RC=function(t,e){return t.nodeName===e||t.previousSibling&&t.previousSibling.nodeName===e},BC=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)},qC=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},FC=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},UC=function(t,e){var n=ou(t);n&&n.toLowerCase()===e.tagName.toLowerCase()&&function(t,e,n){var r=t.dom;M.from(n.style).map(r.parseStyle).each((function(t){var n=lr(Ae.fromDom(e)),o=At(At({},n),t);r.setStyles(e,o)}));var o=M.from(n.class).map((function(t){return t.split(/\s+/)})),i=M.from(e.className).map((function(t){return Y(t.split(/\s+/),(function(t){return""!==t}))}));Gn(o,i,(function(t,n){var o=Y(n,(function(e){return!U(t,e)})),i=Tt(Tt([],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,iu(t))},zC=function(t,e){var n,r,o,i,a,s,l,u,c,d,f=t.dom,h=t.schema,p=h.getNonEmptyElements(),m=t.selection.getRng(),g=function(e){var n,o,a,s=r,l=h.getTextInlineElements();if(a=n=e||"TABLE"===u||"HR"===u?f.create(e||c):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(l[s.nodeName]){if(qc(s)||Qc(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 UC(t,n),MC(a),n},v=function(t){var e,n,a=qC(t,r,o);if(Bn(r)&&(t?a>0:a<r.nodeValue.length))return!1;if(r.parentNode===i&&d&&!t)return!0;if(t&&Tn(r)&&r===i.firstChild)return!0;if(RC(r,"TABLE")||RC(r,"HR"))return d&&!t||!d&&t;var s=new so(r,i);for(Bn(r)&&(t&&0===a?s.prev():t||a!==r.nodeValue.length||s.next());e=s.current();){if(Tn(e)){if(!e.getAttribute("data-mce-bogus")&&(n=e.nodeName.toLowerCase(),p[n]&&"br"!==n))return!1}else if(Bn(e)&&!Zo(e.nodeValue))return!1;t?s.prev():s.next()}return!0},y=function(){a=/^(H[1-6]|PRE|FIGURE)$/.test(u)&&"HGROUP"!==k?g(c):g(),function(t){return t.getParam("end_container_on_empty_block",!1)}(t)&&BC(f,l)&&f.isEmpty(i)?a=f.split(l,i):f.insertAfter(a,i),LC(t,a)};wf(f,m).each((function(t){m.setStart(t.startContainer,t.startOffset),m.setEnd(t.endContainer,t.endOffset)})),r=m.startContainer,o=m.startOffset,c=ou(t);var b=!(!e||!e.shiftKey),_=!(!e||!e.ctrlKey);Tn(r)&&r.hasChildNodes()&&(d=o>r.childNodes.length-1,r=r.childNodes[Math.min(o,r.childNodes.length-1)]||r,o=d&&Bn(r)?r.nodeValue.length:0);var w=FC(f,r);if(w){(c&&!b||!c&&b)&&(r=function(t,e,n,r,o){var i,a,s,l,u,c,d=e||"P",f=t.dom,h=FC(f,r);if(!(a=f.getParent(r,f.isBlock))||!BC(f,a)){if(c=(a=a||h)===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),UC(t,i),a.appendChild(i),n.setStart(i,0),n.setEnd(i,0),i;for(l=r;l.parentNode!==a;)l=l.parentNode;for(;l&&!f.isBlock(l);)s=l,l=l.previousSibling;if(s&&t.schema.isValidChild(c,d.toLowerCase())){for(i=f.create(d),UC(t,i),s.parentNode.insertBefore(i,s),l=s;l&&!f.isBlock(l);)u=l.nextSibling,i.appendChild(l),l=u;n.setStart(r,o),n.setEnd(r,o)}}return r}(t,c,m,r,o)),i=f.getParent(r,f.isBlock),l=i?f.getParent(i.parentNode,f.isBlock):null,u=i?i.nodeName.toUpperCase():"";var k=l?l.nodeName.toUpperCase():"";"LI"!==k||_||(i=l,l=l.parentNode,u=k),/^(LI|DT|DD)$/.test(u)&&f.isEmpty(i)?PC(t,g,l,i,c):c&&i===t.getBody()||(c=c||"P",Oo(i)?(a=Po(i),f.isEmpty(i)&&MC(i),UC(t,a),LC(t,a)):v()?y():v(!0)?(a=i.parentNode.insertBefore(g(),i),LC(t,RC(i,"HR")?a:i)):(n=function(t){var e=t.cloneRange();return e.setStart(t.startContainer,qC(!0,t.startContainer,t.startOffset)),e.setEnd(t.endContainer,qC(!1,t.endContainer,t.endOffset)),e}(m).cloneRange(),n.setEndAfter(i),function(t){V(Bs(Ae.fromDom(t),Fe),(function(t){var e=t.dom;e.nodeValue=Co(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;Tn(o)&&!e[o.nodeName.toLowerCase()]&&i.push(o)}for(r=i.length;r--;)(!(o=i[r]).hasChildNodes()||o.firstChild===o.lastChild&&""===o.firstChild.nodeValue||jC(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)&&MC(i),a.normalize(),f.isEmpty(a)?(f.remove(a),y()):(UC(t,a),LC(t,a))),f.setAttrib(a,"id",""),t.fire("NewBlock",{newBlock:a}))}},HC=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),Wf(t,r)},VC=function(t,e){var n,r,o=t.selection,i=t.dom,a=o.getRng();wf(i,a).each((function(t){a.setStart(t.startContainer,t.startOffset),a.setEnd(t.endContainer,t.endOffset)}));var s=a.startOffset,l=a.startContainer;if(1===l.nodeType&&l.hasChildNodes()){var u=s>l.childNodes.length-1;l=l.childNodes[Math.min(s,l.childNodes.length-1)]||l,s=u&&3===l.nodeType?l.nodeValue.length:0}var c=i.getParent(l,i.isBlock),d=c?i.getParent(c.parentNode,i.isBlock):null,f=d?d.nodeName.toUpperCase():"",h=!(!e||!e.ctrlKey);"LI"!==f||h||(c=d),l&&3===l.nodeType&&s>=l.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,l,c)||(n=i.create("br"),a.insertNode(n),a.setStartAfter(n),a.setEndAfter(n),r=!0)),n=i.create("br"),Il(i,a,n),HC(t,n,r),t.undoManager.add()},WC=function(t,e){var n=Ae.fromTag("br");dn(Ae.fromDom(e),n),t.undoManager.add()},KC=function(t,e){YC(t.getBody(),e)||fn(Ae.fromDom(e),Ae.fromTag("br"));var n=Ae.fromTag("br");fn(Ae.fromDom(e),n),HC(t,n.dom,!1),t.undoManager.add()},YC=function(t,e){return n=Tl.after(e),!!zn(n.getNode())||Pc(t,Tl.after(e)).map((function(t){return zn(t.getNode())})).getOr(!1);var n},ZC=function(t){return t&&"A"===t.nodeName&&"href"in t},GC=function(t){return t.fold(N,ZC,ZC,N)},XC=function(t,e){e.fold(k,D(WC,t),D(KC,t),k)},QC=function(t,e){var n=function(t){var e=D(r_,t),n=Tl.fromRangeStart(t.selection.getRng());return mw(e,t.getBody(),n).filter(GC)}(t);n.isSome()?n.each(D(XC,t)):VC(t,e)},JC=function(t,e){return AC(t).filter((function(t){return e.length>0&&Ne(Ae.fromDom(t),e)})).isSome()},tx=Sr([{br:[]},{block:[]},{none:[]}]),ex=function(t,e){return function(t){return JC(t,function(t){return t.getParam("no_newline_selector","")}(t))}(t)},nx=function(t){return function(e,n){return""===ou(e)===t}},rx=function(t){return function(e,n){return function(t){return AC(t).filter((function(t){return go(Ae.fromDom(t))})).isSome()}(e)===t}},ox=function(t,e){return function(n,r){var o=function(t){return AC(t).fold(S(""),(function(t){return t.nodeName.toUpperCase()}))}(n)===t.toUpperCase();return o===e}},ix=function(t){return ox("pre",t)},ax=function(t){return function(e,n){return function(t){return t.getParam("br_in_pre",!0)}(e)===t}},sx=function(t,e){return function(t){return JC(t,function(t){return t.getParam("br_newline_selector",".mce-toc h2,figcaption,caption")}(t))}(t)},lx=function(t,e){return e},ux=function(t){var e=ou(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")},cx=function(t,e){return function(n,r){return G(t,(function(t,e){return t&&e(n,r)}),!0)?M.some(e):M.none()}},dx=function(t,e){(function(t,e){return iw([cx([ex],tx.none()),cx([ox("summary",!0)],tx.br()),cx([ix(!0),ax(!1),lx],tx.br()),cx([ix(!0),ax(!1)],tx.block()),cx([ix(!0),ax(!0),lx],tx.block()),cx([ix(!0),ax(!0)],tx.br()),cx([rx(!0),lx],tx.br()),cx([rx(!0)],tx.block()),cx([nx(!0),lx,ux],tx.block()),cx([nx(!0)],tx.br()),cx([sx],tx.br()),cx([nx(!1),lx],tx.br()),cx([ux],tx.block())],[t,!(!e||!e.shiftKey)]).getOr(tx.none())})(t,e).fold((function(){QC(t,e)}),(function(){zC(t,e)}),k)},fx=function(t){t.on("keydown",(function(e){e.keyCode===sf.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"),dx(t,e)})))}(t,e)}))},hx=function(t,e){t.on("keydown",(function(n){!1===n.isDefaultPrevented()&&function(t,e,n){lC([{keyCode:sf.END,action:sC(Qk,t,!0)},{keyCode:sf.HOME,action:sC(Qk,t,!1)},{keyCode:sf.END,action:sC(dC,t,!0)},{keyCode:sf.HOME,action:sC(dC,t,!1)},{keyCode:sf.END,action:sC(yk,t,!0,e)},{keyCode:sf.HOME,action:sC(yk,t,!1,e)}],n).each((function(t){n.preventDefault()}))}(t,e,n)}))},px=pe().browser,mx=function(t){!function(t){var e=As((function(){t.composing||rm(t)}),0);px.isIE()&&(t.on("keypress",(function(t){e.throttle()})),t.on("remove",(function(t){e.cancel()})))}(t),t.on("input",(function(e){!1===e.isComposing&&rm(t)}))},gx=pe(),vx=function(t){return t.stopImmediatePropagation()},yx=function(t){return t.keyCode===sf.PAGE_UP||t.keyCode===sf.PAGE_DOWN},bx=function(t,e,n){n&&!t.get()?e.on("NodeChange",vx,!0):!n&&t.get()&&e.off("NodeChange",vx),t.set(n)},_x=function(t,e){if(!gx.os.isOSX()){var n=Cs(!1);t.on("keydown",(function(e){yx(e)&&bx(n,t,!0)})),t.on("keyup",(function(r){!1===r.isDefaultPrevented()&&function(t,e,n){lC([{keyCode:sf.PAGE_UP,action:sC(yk,t,!1,e)},{keyCode:sf.PAGE_DOWN,action:sC(yk,t,!0,e)}],n)}(t,e,r),yx(r)&&n.get()&&(bx(n,t,!1),t.nodeChanged())}))}},wx=function(t,e){var n=e.container(),r=e.offset();return Bn(n)?(n.insertData(r,t),M.some(Tl(n,r+t.length))):fc(e).map((function(n){var r=Ae.fromText(t);return e.isAtEnd()?fn(n,r):dn(n,r),Tl(r.dom,t.length)}))},kx=D(wx,_o),Cx=D(wx," "),xx=function(t,e){return function(n){return function(t,e){return!Yp(e)&&(Zp(t,e)||Wp(t,e)||Kp(t,e))}(t,n)?kx(e):Cx(e)}},Sx=function(t){var e=Tl.fromRangeStart(t.selection.getRng()),n=Ae.fromDom(t.getBody());if(t.selection.isCollapsed()){var r=D(r_,t),o=Tl.fromRangeStart(t.selection.getRng());return mw(r,t.getBody(),o).bind(function(t){return function(e){return e.fold((function(e){return jc(t.dom,Tl.before(e))}),(function(t){return Mc(t)}),(function(t){return Rc(t)}),(function(e){return Pc(t.dom,Tl.after(e))}))}}(n)).bind(xx(n,e)).exists(function(t){return function(e){return t.selection.setRng(e.toRange()),t.nodeChanged(),!0}}(t))}return!1},Ox=function(t){t.on("keydown",(function(e){!1===e.isDefaultPrevented()&&function(t,e){lC([{keyCode:sf.SPACEBAR,action:sC(Sx,t)}],e).each((function(t){e.preventDefault()}))}(t,e)}))},Ex=function(t){var e=mk(t);return function(t){t.on("keyup compositionstart",D(Vk,t))}(t),EC(t,e),DC(t,e),fx(t),Ox(t),mx(t),hx(t,e),_x(t,e),e},Dx=function(){function t(t){var e;this.lastPath=[],this.editor=t;var n=this;"onselectionchange"in t.getDoc()||t.on("NodeChange click mouseup keyup focus",(function(n){var r=t.selection.getRng(),o={startContainer:r.startContainer,startOffset:r.startOffset,endContainer:r.endContainer,endOffset:r.endOffset};"nodechange"!==n.type&&ff(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||!Ce.range&&t.selection.isCollapsed()||Hd(t)&&!n.isSameElementPath(e)&&t.dom.isChildOf(e,t.getBody())&&t.nodeChanged({selectionChange:!0})})),t.on("mouseup",(function(e){!e.isDefaultPrevented()&&Hd(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}(),Lx=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){V(t,(function(t){t.attr("data-mce-open",t.attr("open")),t.attr("open","open")}))})),t.serializer.addNodeFilter("details",(function(t){V(t,(function(t){var e=t.attr("data-mce-open");t.attr("open",f(e)?e:null),t.attr("data-mce-open",null)}))}))}(t)},Ax=function(t){return Tn(t)&&po(Ae.fromDom(t))},Tx=function(t){t.on("click",(function(e){e.detail>=3&&function(t){var e=t.selection.getRng(),n=Tl.fromRangeStart(e),r=Tl.fromRangeEnd(e);if(Tl.isElementPosition(n)){var o=n.container();Ax(o)&&Mc(o).each((function(t){return e.setStart(t.container(),t.offset())}))}Tl.isElementPosition(r)&&(o=n.container(),Ax(o)&&Rc(o).each((function(t){return e.setEnd(t.container(),t.offset())})));t.selection.setRng(Gm(e))}(t)}))},Nx=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}},$x=function(t,e){return n=function(t){return t.inline?Nx(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=Nx(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},Ix=Wn,Px=Vn,jx=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},Mx=function(t){t&&t.parentNode&&t.parentNode.removeChild(t)},Rx=function(t,e){return function(n){if(function(t){return 0===t.button}(n)){var r=Q(e.dom.getParents(n.target),function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){for(var n=0;n<t.length;n++)if(t[n](e))return!0;return!1}}(Ix,Px)).getOr(null);if(s=e.getBody(),Ix(l=r)&&l!==s){var o=e.dom.getPos(r),i=e.getBody(),a=e.getDoc().documentElement;t.set({element:r,dragging:!1,screenX:n.screenX,screenY:n.screenY,maxX:(e.inline?i.scrollWidth:a.offsetWidth)-2,maxY:(e.inline?i.scrollHeight:a.offsetHeight)-2,relX:n.pageX-o.x,relY:n.pageY-o.y,width:r.offsetWidth,height:r.offsetHeight,ghost:jx(e,r,r.offsetWidth,r.offsetHeight)})}}var s,l}},Bx=function(t,e){return function(n){t.on((function(t){if(t.dragging){if(function(t,e,n){return e!==n&&!t.dom.isChildOf(e,n)&&!Ix(e)}(e,(a=e.selection,3===(s=a.getSel().getRangeAt(0).startContainer).nodeType?s.parentNode:s),t.element)){var r=(o=t.element,(i=o.cloneNode(!0)).removeAttribute("data-mce-selected"),i);e.fire("drop",{clientX:n.clientX,clientY:n.clientY}).isDefaultPrevented()||e.undoManager.transact((function(){Mx(t.element),e.insertContent(e.dom.getOuterHTML(r)),e._selectionOverrides.hideFakeCaret()}))}e.fire("dragend")}var o,i,a,s})),qx(t)}},qx=function(t){t.on((function(t){Mx(t.ghost)})),t.clear()},Fx=function(t){var e=Ls(),n=ys.DOM,r=document,o=Rx(e,t),i=function(t,e){var n=oo.throttle((function(t,n){e._selectionOverrides.hideFakeCaret(),e.selection.placeCaretAt(t,n)}),0);return e.on("remove",n.stop),function(r){return t.on((function(t){var o,i,a=Math.max(Math.abs(r.screenX-t.screenX),Math.abs(r.screenY-t.screenY));if(!t.dragging&&a>10){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,$x(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=Bx(e,t),s=function(t,e){return function(){t.on((function(t){t.dragging&&e.fire("dragend")})),qx(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===sf.ESC&&s()}))},Ux=function(t){Fx(t),function(t){t.on("drop",(function(e){var n=void 0!==e.clientX?t.getDoc().elementFromPoint(e.clientX,e.clientY):null;(Ix(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&&Eb(t,"Dropped file type is not supported"))}},n=function(n){mh(t,n.target)&&e(n)},r=function(){var r=ys.DOM,o=t.dom,i=document,a=t.inline?t.getBody():t.getDoc(),s=["drop","dragover"];V(s,(function(t){r.bind(i,t,n),o.bind(a,t,e)})),t.on("remove",(function(){V(s,(function(t){r.unbind(i,t,n),o.unbind(a,t,e)}))}))};t.on("init",(function(){oo.setEditorTimeout(t,r,0)}))}(t)},zx=Vn,Hx=Wn,Vx=function(t,e){return ef(t.getBody(),e)},Wx=function(t){var e,n=t.selection,r=t.dom,o=r.isBlock,i=t.getBody(),a=qu(t,i,o,(function(){return kh(t)})),s="sel-"+r.uniqueId(),l="data-mce-selected",u=function(t){return t!==i&&(Hx(t)||Yn(t))&&r.isChildOf(t,i)},c=function(t){return kp(t)||Cp(t)||yp(t)||bp(t)},d=function(t){t&&n.setRng(t)},f=n.getRng,h=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 Do(t)||$o(t)||Io(t)},m=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,l=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===l?o.setEndBefore(s):o.setEndAfter(s):o.setEnd(s,l),o},v=function(o){var i=o.cloneNode(!0),a=t.fire("ObjectSelected",{target:o,targetClone:i});if(a.isDefaultPrevented())return null;var u=function(e,o,i){var a=t.$,l=Qr(Ae.fromDom(t.getBody()),"#"+s).fold((function(){return a([])}),(function(t){return a([t.dom])}));0===l.length&&(l=a('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>').attr("id",s)).appendTo(t.getBody());var u=r.createRng();o===i&&Ce.ie?(l.empty().append('<p style="font-size: 0" data-mce-bogus="all"> </p>').append(o),u.setStartAfter(l[0].firstChild.firstChild),u.setEndAfter(o)):(l.empty().append(_o).append(o).append(_o),u.setStart(l[0].firstChild,1),u.setEnd(l[0].lastChild,0)),l.css({top:r.getPos(e,t.getBody()).y}),l[0].focus();var c=n.getSel();return c.removeAllRanges(),c.addRange(u),u}(o,a.targetClone,i),c=Ae.fromDom(o);return V(qs(Ae.fromDom(t.getBody()),"*[data-mce-selected]"),(function(t){Ie(c,t)||rr(t,l)})),r.getAttrib(o,l)||o.setAttribute(l,"1"),e=o,w(),u},b=function(t,e){if(!t)return null;if(t.collapsed){if(!m(t)){var n=e?1:-1,o=dc(n,i,t),a=o.getNode(!e);if(zu(a))return h(n,a,!!e&&!o.isAtEnd(),!1);var s=o.getNode(e);if(zu(s))return h(n,s,!e&&!o.isAtEnd(),!1)}return null}var l=t.startContainer,c=t.startOffset,d=t.endOffset;if(3===l.nodeType&&0===c&&Hx(l.parentNode)&&(l=l.parentNode,c=r.nodeIndex(l),l=l.parentNode),1!==l.nodeType)return null;if(d===c+1&&l===t.endContainer){var f=l.childNodes[c];if(u(f))return v(f)}return null},_=function(){e&&e.removeAttribute(l),Qr(Ae.fromDom(t.getBody()),"#"+s).each(vn),e=null},w=function(){a.hide()};return Ce.ceFalse&&!ty(t)&&function(){t.on("mouseup",(function(e){var n=f();n.collapsed&&_b(t,e.clientX,e.clientY)&&$_(t,n,!1).each(d)})),t.on("click",(function(e){var o=Vx(t,e.target);o&&(Hx(o)&&(e.preventDefault(),t.focus()),zx(o)&&r.isChildOf(o,n.getNode())&&_())})),t.on("blur NewBlock",_),t.on("ResizeWindow FullscreenStateChanged",a.reposition);var l=function(e,n){var i,a,s=r.getParent(e,o),l=r.getParent(n,o);return!y(s)&&(!(e===l||!r.isChildOf(s,l)||!1!==Hx(Vx(t,s)))||!r.isChildOf(l,s)&&(i=s,a=l,!(r.getParent(i,o)===r.getParent(a,o)))&&function(t){var e=t.firstChild;if(y(e))return!1;var n=Tl.before(e);if(zn(n.getNode())&&1===t.childNodes.length)return!c(n);var r=Oc(t).next(n);return r&&!c(r)}(s))};t.on("tap",(function(e){var n=e.target,r=Vx(t,n);Hx(r)?(e.preventDefault(),N_(t,r).each(b)):u(n)&&N_(t,n).each(b)}),!0),t.on("mousedown",(function(e){var o=e.target;if((o===i||"HTML"===o.nodeName||r.isChildOf(o,i))&&!1!==_b(t,e.clientX,e.clientY)){var a=Vx(t,o);if(a)Hx(a)?(e.preventDefault(),N_(t,a).each(b)):(_(),zx(a)&&e.shiftKey||nf(e.clientX,e.clientY,n.getRng())||(w(),n.placeCaretAt(e.clientX,e.clientY)));else if(u(o))N_(t,o).each(b);else if(!1===zu(o)){_(),w();var s=nk(i,e.clientX,e.clientY);if(s&&!l(o,s.node)){e.preventDefault();var c=h(1,s.node,s.before,!1);d(c),t.getBody().focus()}}}})),t.on("keypress",(function(t){sf.modifierPressed(t)||Hx(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=b(t.range,t.forward);e&&(t.range=e)})),t.on("AfterSetSelectionRange",(function(t){var e,n=t.range,o=n.startContainer.parentNode;m(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&&!Ce.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))}})),Ux(t),function(t){var e=As((function(){if(!t.removed&&t.getBody().contains(document.activeElement)){var e=t.selection.getRng();if(e.collapsed){var n=I_(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=ef(t.getBody(),n),o=Wn(r)?r:n;t.selection.getNode()!==o&&N_(t,o).each((function(e){return t.selection.setRng(e)}))}}))}))}(t)}(),{showCaret:h,showBlockCaretContainer:function(t){t.hasAttribute("data-mce-caret")&&(Po(t),d(f()),n.scrollIntoView(t))},hideFakeCaret:w,destroy:function(){a.destroy(),e=null}}},Kx=function(t){var e,n,r=De.each,o=sf.BACKSPACE,i=sf.DELETE,a=t.dom,s=t.selection,l=t.parser,u=Ce.gecko,c=Ce.ie,d=Ce.webkit,f="data:text/mce-internal,",h=c?"Text":"URL",p=function(e,n){try{t.getDoc().execCommand(e,!1,n)}catch(t){}},m=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,l=n.keyCode;if(!m(n)&&(l===i||l===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")},y=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(Do(n.startContainer))return;s.placeCaretAt(e.clientX,e.clientY)}else s.setRng(n)}))},b=function(){Range.prototype.getClientRects||t.on("mousedown",(function(e){if(!m(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(!m(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}}))},C=function(){(function(t){return t.getParam("readonly")})(t)||t.on("BeforeExecCommand mousedown",(function(){p("StyleWithCSS",!1),p("enableInlineTableEditing",!1),yu(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}")},O=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(Ce.ie>11)return void t.getBody().focus();n=t.selection.getRng(),t.getBody().focus(),t.selection.setRng(n),t.selection.normalize(),t.nodeChanged()}})))},D=function(){Ce.mac&&t.on("keydown",(function(e){!sf.metaKeyPressed(e)||e.shiftKey||37!==e.keyCode&&39!==e.keyCode||(e.preventDefault(),t.selection.getSel().modify("move",37===e.keyCode?"backward":"forward","lineboundary"))}))},L=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()}))}))},T=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(h,r)))}(e)})),t.on("drop",(function(e){if(!m(e)){var n=function(t){var e;return t.dataTransfer&&(e=t.dataTransfer.getData(h))&&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=df(e.x,e.y,t.getDoc());s.setRng(r),o=n.html,i=!0,t.queryCommandSupported("mceInsertClipboardContent")?t.execCommand("mceInsertClipboardContent",!1,{content:o,internal:i}):t.execCommand("mceInsertContent",!1,o)}}var o,i}))},N=k;return ty(t)?(d&&(y(),_(),A(),v(),Ce.iOS&&(O(),E(),L())),u&&(b(),C(),S(),D())):(t.on("keydown",(function(e){var n,r;if(!m(e)&&e.keyCode===sf.BACKSPACE){var o=(n=s.getRng()).startContainer,i=n.startOffset,l=a.getRoot();if(r=o,n.collapsed&&0===i){for(;r&&r.parentNode&&r.parentNode.firstChild===r&&r.parentNode!==l;)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(),Ce.windowsPhone||t.on("keyup focusin mouseup",(function(t){sf.modifierPressed(t)||s.normalize()}),!0),d&&(y(),_(),ou(t)&&t.on("init",(function(){p("DefaultParagraphSeparator",ou(t))})),A(),w(),l.addNodeFilter("br",(function(t){for(var e=t.length;e--;)"Apple-interchange-newline"===t[e].attr("class")&&t[e].remove()})),Ce.iOS?(O(),E(),L()):v()),Ce.ie>=11&&(E(),w()),Ce.ie&&(v(),p("AutoUrlDetect",!1),T()),u&&(t.on("keydown",(function(e){if(!m(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())}}})),b(),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(!m(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;!m(r)&&n()&&(o=e(),oo.setEditorTimeout(t,(function(){o()})))})),C(),x(),S(),D(),w())),{refreshContentEditable:N,isHidden:function(){if(!u||t.removed)return!1;var e=t.selection.getSel();return!e||!e.rangeCount||0===e.rangeCount}}},Yx=ys.DOM,Zx=function(t){return t.inline?t.getElement().nodeName.toLowerCase():void 0},Gx=function(t){return vt(t,(function(t){return!1===v(t)}))},Xx=function(t){var e=t.settings;return Gx({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,padd_empty_block_inline_children:e.format_empty_lines})},Qx=function(t){var e=t.settings,n=t.editorUpload.blobCache;return Gx({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:Zx(t),validate:!0,blob_cache:n,document:t.getDoc(),images_dataimg_filter:e.images_dataimg_filter})},Jx=function(t){var e=t.dom.getRoot();t.inline||Hd(t)&&t.selection.getStart(!0)!==e||Mc(e).each((function(e){var n=e.getNode(),r=jn(n)?Mc(n).getOr(e):e;Ce.browser.isIE()?function(t,e){var n=Ae.fromDom(t.getBody()),r=(ih(t)?M.from(e):M.none()).map(ah).filter(oh(n));t.bookmark=r.isSome()?r:t.bookmark}(t,r.toRange()):t.selection.setRng(r.toRange())}))},tS=function(t){t.bindPendingEventDelegates(),t.initialized=!0,function(t){t.fire("Init")}(t),t.focus(!0),Jx(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)},eS=function(t){return t.inline?t.ui.styleSheetLoader:t.dom.styleSheetLoader},nS=function(t){var e=eS(t),n=vu(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="";De.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 eS(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=ln(sn(n)),o=Ae.fromTag("style");Jn(o,"type","text/css"),pn(o,Ae.fromText(e)),pn(r,o),t.on("remove",(function(){vn(o)}))}(t,t.settings.content_style),s},rS=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,Yx.setAttrib(r,"spellcheck","false")),t.quirks=Kx(t),function(t){t.fire("PostRender")}(t);var o=function(t){return t.getParam("directionality",Es.isRtl()?"rtl":void 0)}(t);void 0!==o&&(r.dir=o),e.protect&&t.on("BeforeSetContent",(function(t){De.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}))},oS=function(t){!0!==t.removed&&(!function(t){ty(t)||t.load({initial:!0,format:"html"}),t.startContent=t.getContent({format:"raw"})}(t),tS(t))},iS=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&&(Yx.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"===Yx.getStyle(i,"position",!0)&&(i.style.position="relative"),i.contentEditable=t.getParam("content_editable_state",!0)),i.disabled=!1,t.editorUpload=Fb(t),t.schema=Ti(Xx(t)),t.dom=ys(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:hu(t),referrerPolicy:pu(t),onSetAttrib:function(e){t.fire("SetAttrib",e)}}),t.parser=function(t){var e=Ty(Qx(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 Ph("br",1)).shortEnded=!0)}})),e}(t),t.serializer=jy(function(t){var e=t.settings;return At(At(At({},Qx(t)),Xx(t)),Gx({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}))}(t),t),t.selection=hy(t.dom,t.getWin(),t.serializer,t),t.annotator=Jd(t),t.formatter=Yb(t),t.undoManager=Gb(t),t._nodeChangeDispatcher=new Dx(t),t._selectionOverrides=Wx(t),Bk(t),Lx(t),ty(t)||Tx(t);var a=function(t){return ty(t)?Cs(null):Ex(t)}(t);Mk(t,a),function(t){ou(t)&&t.on("NodeChange",D(zk,t))}(t),e_(t);var s=ey(t);rS(t),s.fold((function(){nS(t).then((function(){return oS(t)}))}),(function(e){t.setProgressState(!0),nS(t).then((function(){e().then((function(e){t.setProgressState(!1),oS(t)}),(function(e){t.notificationManager.open({type:"error",text:String(e)}),oS(t)}))}))}))},aS=ys.DOM,sS=function(t){var e=function(t){return t.getParam("doctype","<!DOCTYPE html>")}(t)+"<html><head>";(function(t){return t.getParam("document_base_url","")})(t)!==t.documentBaseUrl&&(e+='<base href="'+t.documentBaseURI.getURI()+'" />'),e+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';var n=function(t){return nu(t,"body_id","tinymce")}(t),r=function(t){return nu(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 ru(t)&&(e+='<meta http-equiv="Content-Security-Policy" content="'+ru(t)+'" />'),e+='</head><body id="'+n+'" class="mce-content-body '+r+'" data-id="'+t.id+'" aria-label="'+o+'"><br></body></html>'},lS=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}),js(i,"tox-edit-area__iframe"),i).dom;s.onload=function(){s.onload=null,t.fire("load")};var l=function(t,e){if(document.domain!==window.location.hostname&&Ce.browser.isIE()){var n=Mb("mce");t[n]=function(){iS(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 aS.setAttrib(e,"src",r),!0}return!1}(t,s);return t.contentAreaContainer=e.iframeContainer,t.iframeElement=s,t.iframeHTML=sS(t),aS.add(e.iframeContainer,s),l},uS=ys.DOM,cS=function(t,e,n){var r=Cb.get(n),o=Cb.urls[n]||t.documentBaseUrl.replace(/\/$/,"");if(n=De.trim(n),r&&-1===De.inArray(e,n)){if(De.each(Cb.dependencies(n),(function(n){cS(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=Es.translate(["Failed to initialize plugin: {0}",e]);rf(t,"PluginLoadError",{message:r}),Tb(r,n),Eb(t,r)}(t,n,e)}}},dS=function(t){return t.replace(/^\-/,"")},fS=function(t){return{editorContainer:t,iframeContainer:t,api:{}}},hS=function(t){var e=t.getElement();return t.inline?fS(null):function(t){var e=uS.create("div");return uS.insertAfter(e,t),fS(e)}(e)},pS=function(t){var e=t.getElement();return t.orgDisplay=e.style.display,f(_u(t))?function(t){return t.theme.renderUI()}(t):_(_u(t))?function(t){var e=t.getElement(),n=_u(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):hS(t)},mS=function(t){t.fire("ScriptsLoaded"),function(t){var e=De.trim(lu(t)),n=t.ui.registry.getAll().icons,r=At(At({},hb.get("default").icons),hb.get(e).icons);ft(r,(function(e,r){_t(n,r)||t.ui.registry.addIcon(r,e)}))}(t),function(t){var e=_u(t);if(f(e)){t.settings.theme=dS(e);var n=xb.get(e);t.theme=new n(t,xb.urls[e]),t.theme.init&&t.theme.init(t,xb.urls[e]||t.documentBaseUrl.replace(/\/$/,""),t.$)}else t.theme={}}(t),function(t){var e=[];De.each(xu(t).split(/[ ,]/),(function(n){cS(t,e,dS(n))}))}(t);var e=pS(t);!function(t,e){var n={show:M.from(e.show).getOr(k),hide:M.from(e.hide).getOr(k),disable:M.from(e.disable).getOr(k),isDisabled:M.from(e.isDisabled).getOr(N),enable:function(){t.mode.isReadOnly()||M.from(e.enable).map(T)}};t.ui=At(At({},t.ui),n)}(t,M.from(e.api).getOr({}));var n={editorContainer:e.editorContainer,iframeContainer:e.iframeContainer};return t.editorContainer=n.editorContainer?n.editorContainer:null,Ib(t),t.inline?iS(t):function(t,e){var n=lS(t,e);e.editorContainer&&(aS.get(e.editorContainer).style.display=t.orgDisplay,t.hidden=aS.isHidden(e.editorContainer)),t.getElement().style.display="none",aS.setAttrib(t.id,"aria-hidden","true"),n||iS(t)}(t,n)},gS=ys.DOM,vS=function(t){return"-"===t.charAt(0)},yS=function(t,e){var n=mu(e),r=function(t){return t.getParam("language_url","","string")}(e);if(!1===Es.hasCode(n)&&"en"!==n){var o=""!==r?r:e.editorManager.baseURL+"/langs/"+n+".js";t.add(o,k,void 0,(function(){!function(t,e,n){Db(t,"LanguageLoadError",Lb("language",e,n))}(e,o,n)}))}},bS=function(t,e,n){return M.from(e).filter((function(t){return t.length>0&&!hb.has(t)})).map((function(e){return{url:t.editorManager.baseURL+"/icons/"+e+"/icons"+n+".js",name:M.some(e)}}))},_S=function(t,e,n){var r=bS(e,"default",n),o=function(t){return M.from(function(t){return t.getParam("icons_url","","string")}(t)).filter((function(t){return t.length>0})).map((function(t){return{url:t,name:M.none()}}))}(e).orThunk((function(){return bS(e,lu(e),"")}));V(function(t){for(var e=[],n=function(t){e.push(t)},r=0;r<t.length;r++)t[r].each(n);return e}([r,o]),(function(n){t.add(n.url,k,void 0,(function(){!function(t,e,n){Db(t,"IconsLoadError",Lb("icons",e,n))}(e,n.url,n.name.getOrUndefined())}))}))},wS=function(t,e){var n=ks.ScriptLoader;!function(t,e,n,r){var o=_u(e);if(f(o)){if(!vS(o)&&!_t(xb.urls,o)){var i=function(t){return t.getParam("theme_url")}(e);i?xb.load(o,e.documentBaseURI.toAbsolute(i)):xb.load(o,"themes/"+o+"/theme"+n+".js")}t.loadQueue((function(){xb.waitFor(o,r)}))}else r()}(n,t,e,(function(){yS(n,t),_S(n,t,e),function(t,e){De.each(function(t){return t.getParam("external_plugins")}(t),(function(e,n){Cb.load(n,e,k,void 0,(function(){Ab(t,e,n)})),t.settings.plugins+=" "+n})),De.each(xu(t).split(/[ ,]/),(function(n){if((n=De.trim(n))&&!Cb.urls[n])if(vS(n)){n=n.substr(1,n.length);var r=Cb.dependencies(n);De.each(r,(function(n){var r={prefix:"plugins/",resource:n,suffix:"/plugin"+e+".js"},o=Cb.createUrl(r,n);Cb.load(o.resource,o,k,void 0,(function(){Ab(t,o.prefix+o.resource+o.suffix,o.resource)}))}))}else{var o={prefix:"plugins/",resource:n,suffix:"/plugin"+e+".js"};Cb.load(n,o,k,void 0,(function(){Ab(t,o.prefix+o.resource+o.suffix,n)}))}}))}(t,e),n.loadQueue((function(){t.removed||mS(t)}),t,(function(){t.removed||mS(t)}))}))},kS=function(t){var e=t.id;Es.setCode(mu(t));var n=function(){gS.unbind(window,"ready",n),t.render()};if(Ui.Event.domLoaded){if(t.getElement()&&Ce.contentEditable){var r=Ae.fromDom(t.getElement()),o=function(t){return G(t.dom.attributes,(function(t,e){return t[e.name]=e.value,t}),{})}(r);t.on("remove",(function(){W(r.dom.attributes,(function(t){return rr(r,t.name)})),tr(r,o)})),t.ui.styleSheetLoader=function(t,e){return ao.forElement(t,{contentCssCors:Cu(e),referrerPolicy:pu(e)})}(r,t),!function(t){return t.getParam("inline")}(t)?(t.orgVisibility=t.getElement().style.visibility,t.getElement().style.visibility="hidden"):t.inline=!0;var i=t.getElement().form||gS.getParent(e,"form");i&&(t.formElement=i,function(t){return t.getParam("hidden_input")}(t)&&!Rn(t.getElement())&&(gS.insertAfter(gS.create("input",{type:"hidden",name:e}),e),t.hasHiddenInput=!0),t.formEventDelegate=function(e){t.fire(e.type,e)},gS.bind(i,"submit reset",t.formEventDelegate),t.on("reset",(function(){t.resetContent()})),!function(t){return t.getParam("submit_patch")}(t)||i.submit.nodeType||i.submit.length||i._mceOldSubmit||(i._mceOldSubmit=i.submit,i.submit=function(){return t.editorManager.triggerSave(),t.setDirty(!1),i._mceOldSubmit(i)})),t.windowManager=Sb(t),t.notificationManager=kb(t),function(t){return"xml"===t.getParam("encoding")}(t)&&t.on("GetContent",(function(t){t.save&&(t.content=gS.encode(t.content))})),function(t){return t.getParam("add_form_submit_trigger")}(t)&&t.on("submit",(function(){t.initialized&&t.save()})),function(t){return t.getParam("add_unload_trigger")}(t)&&(t._beforeUnload=function(){!t.initialized||t.destroyed||t.isHidden()||t.save({format:"raw",no_events:!0,set_dirty:!1})},t.editorManager.on("BeforeUnload",t._beforeUnload)),t.editorManager.add(t),wS(t,t.suffix)}}else gS.bind(window,"ready",n)},CS=function(t,e){return function(t,e){return ry(t).editor.addVisual(e)}(t,e)},xS={"font-size":"size","font-family":"face"},SS=function(t,e,n){return mg(Ae.fromDom(n),(function(e){return function(e){return sr(e,t).orThunk((function(){return"font"===Me(e)?bt(xS,t).bind((function(t){return nr(e,t)})):M.none()}))}(e)}),(function(t){return Ie(Ae.fromDom(e),t)}))},OS=function(t){return function(e,n){return M.from(n).map(Ae.fromDom).filter(qe).bind((function(n){return SS(t,e,n.dom).or(function(t,e){return M.from(ys.DOM.getStyle(e,t,!0))}(t,n.dom))})).getOr("")}},ES=OS("font-size"),DS=C((function(t){return t.replace(/[\'\"\\]/g,"").replace(/,\s+/g,",")}),OS("font-family")),LS=function(t){return Mc(t.getBody()).map((function(t){var e=t.container();return Bn(e)?e.parentNode:e}))},AS=function(t,e){return function(t){return M.from(t.selection.getRng()).bind((function(e){var n=t.getBody();return e.startContainer===n&&0===e.startOffset?M.none():M.from(t.selection.getStart(!0))}))}(t).orThunk(D(LS,t)).map(Ae.fromDom).filter(qe).bind(e)},TS=function(t,e){return AS(t,x(M.some,e))},NS=function(t,e){if(/^[0-9.]+$/.test(e)){var n=parseInt(e,10);if(n>=1&&n<=7){var r=function(t){return De.explode(t.getParam("font_size_style_values","xx-small,x-small,small,medium,large,x-large,xx-large"))}(t),o=function(t){return De.explode(t.getParam("font_size_classes",""))}(t);return o?o[n-1]||e:r[n-1]||e}return e}return e},$S=function(t){var e=t.split(/\s*,\s*/);return H(e,(function(t){return-1===t.indexOf(" ")||Rt(t,'"')||Rt(t,"'")?t:"'"+t+"'"})).join(",")},IS=function(t,e){var n=function(t){if("string"!=typeof t){var e=De.extend({paste:t.paste,data:{paste:t.paste}},t);return{content:t.content,details:e}}return{content:t,details:{}}}(e);!function(t,e,n){ny(t).editor.insertContent(e,n)}(t,n.content,n.details)},PS=De.each,jS=De.map,MS=De.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,ch(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 l=t.toLowerCase();if(o=a.commands.exec[l])return o(l,e,n),a.editor.fire("ExecCommand",{command:t,ui:e,value:n}),!0;if(PS(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;PS(t,(function(t,r){PS(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":k,"mceEndUndoLevel,mceAddUndoLevel":function(){t.undoManager.add()},mceFocus:function(e,n,r){Sh(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.");Ce.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"),PS("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:$S(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){IS(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){dx(t,r)},mceToggleFormat:function(t,n,r){e.toggleFormat(r)},mceSetContent:function(e,n,r){t.setContent(r)},"Indent,Outdent":function(e){Ik(t,e)},mceRepaint:k,InsertHorizontalRule:function(){t.execCommand("mceInsertContent",!1,"<hr />")},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(),Vn);if(e){var n=t.dom.createRng();n.selectNodeContents(e),t.selection.setRng(n)}},mceNewDocument:function(){t.setContent("")},InsertLineBreak:function(e,n,r){return QC(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=jS(r,(function(n){return!!t.formatter.matchNode(n,e)}));return-1!==MS(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 Tk(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 TS(t,(function(e){return DS(t.getBody(),e.dom)})).getOr("")}(t)}),this),e.addQueryValueHandler("FontSize",(function(){return function(t){return TS(t,(function(e){return ES(t.getBody(),e.dom)})).getOr("")}(t)}),this),e.addQueryValueHandler("LineHeight",(function(){return function(t){return TS(t,(function(e){var n=Ae.fromDom(t.getBody()),r=mg(e,(function(t){return sr(t,"line-height")}),D(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}(),BS="data-mce-contenteditable",qS=function(t,e,n){var r,o;Rs(t,e)&&!1===n?(o=e,$s(r=t)?r.dom.classList.remove(o):Ps(r,o),Ms(r)):n&&js(t,e)},FS=function(t,e,n){try{t.getDoc().execCommand(e,!1,String(n))}catch(t){}},US=function(t,e){t.dom.contentEditable=e?"true":"false"},zS=function(t,e){var n=Ae.fromDom(t.getBody());qS(n,"mce-content-readonly",e),e?(t.selection.controlSelection.hideResizeRect(),t._selectionOverrides.hideFakeCaret(),function(t){M.from(t.selection.getNode()).each((function(t){t.removeAttribute("data-mce-selected")}))}(t),t.readonly=!0,US(n,!1),V(qs(n,'*[contenteditable="true"]'),(function(t){Jn(t,BS,"true"),US(t,!1)}))):(t.readonly=!1,US(n,!0),function(t){V(qs(t,'*[data-mce-contenteditable="true"]'),(function(t){rr(t,BS),US(t,!0)}))}(n),FS(t,"StyleWithCSS",!1),FS(t,"enableInlineTableEditing",!1),FS(t,"enableObjectResizing",!1),Ch(t)&&t.focus(),function(t){t.selection.setRng(t.selection.getRng())}(t),t.nodeChanged())},HS=function(t){return t.readonly},VS=function(t){t.parser.addAttributeFilter("contenteditable",(function(e){HS(t)&&V(e,(function(t){t.attr(BS,t.attr("contenteditable")),t.attr("contenteditable","false")}))})),t.serializer.addAttributeFilter(BS,(function(e){HS(t)&&V(e,(function(t){t.attr("contenteditable",t.attr(BS))}))})),t.serializer.addTempAttr(BS)},WS=function(t,e){if(function(t){return"click"===t.type}(e)&&!sf.metaKeyPressed(e)){var n=Ae.fromDom(e.target);(function(t,e){return Jr(e,"a",(function(e){return Ie(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="'+((Rt(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}))}},KS=De.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"," "),YS=function(){function t(t){this.bindings={},this.settings=t||{},this.scope=this.settings.scope||this,this.toggleEvent=this.settings.toggleEvent||N}return t.isNative=function(t){return!!KS[t.toLowerCase()]},t.prototype.fire=function(t,e){var n=t.toLowerCase(),r=ji(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<a;i++){var s=o[i];if(!s.removed){if(s.once&&this.off(n,s.func),r.isImmediatePropagationStopped())return r;if(!1===s.func.call(this.scope,r))return r.preventDefault(),r}}return r},t.prototype.on=function(t,e,n,r){if(!1===e&&(e=N),e){var o={func:e,removed:!1};r&&De.extend(o,r);for(var i=t.toLowerCase().split(" "),a=i.length;a--;){var s=i[a],l=this.bindings[s];l||(l=[],this.toggleEvent(s,!0)),l=n?Tt([o],l,!0):Tt(Tt([],l,!0),[o],!1),this.bindings[s]=l}}return this},t.prototype.off=function(t,e){var n=this;if(t)for(var r=t.toLowerCase().split(" "),o=r.length;o--;){var i=r[o],a=this.bindings[i];if(!i)return ft(this.bindings,(function(t,e){n.toggleEvent(e,!1),delete n.bindings[e]})),this;if(a){if(e){var s=K(a,(function(t){return t.func===e}));a=s.fail,this.bindings[i]=a,V(s.pass,(function(t){t.removed=!0}))}else a.length=0;a.length||(this.toggleEvent(t,!1),delete this.bindings[i])}}else ft(this.bindings,(function(t,e){n.toggleEvent(e,!1)})),this.bindings={};return this},t.prototype.once=function(t,e,n){return this.on(t,e,n,{once:!0})},t.prototype.has=function(t){return t=t.toLowerCase(),!(!this.bindings[t]||0===this.bindings[t].length)},t}(),ZS=function(t){return t._eventDispatcher||(t._eventDispatcher=new YS({scope:t,toggleEvent:function(e,n){YS.isNative(e)&&t.toggleNativeEvent&&t.toggleNativeEvent(e,n)}})),t._eventDispatcher},GS={fire:function(t,e,n){var r=this;if(r.removed&&"remove"!==t&&"detach"!==t)return e;var o=ZS(r).fire(t,e);if(!1!==n&&r.parent)for(var i=r.parent();i&&!o.isPropagationStopped();)i.fire(t,o,!1),i=i.parent();return o},on:function(t,e,n){return ZS(this).on(t,e,n)},off:function(t,e){return ZS(this).off(t,e)},once:function(t,e){return ZS(this).once(t,e)},hasEventListeners:function(t){return ZS(this).has(t)}},XS=ys.DOM,QS=function(t,e){if("selectionchange"===e)return t.getDoc();if(!t.inline&&/^mouse|touch|click|contextmenu|drop|dragover|dragend/.test(e))return t.getDoc().documentElement;var n=bu(t);return n?(t.eventRoot||(t.eventRoot=XS.select(n)[0]),t.eventRoot):t.getBody()},JS=function(t,e,n){!function(t){return!t.hidden&&!HS(t)}(t)?HS(t)&&WS(t,n):t.fire(e,n)},tO=function(t,e){var n;if(t.delegates||(t.delegates={}),!t.delegates[e]&&!t.removed){var r=QS(t,e);if(bu(t)){if(Fw||(Fw={},t.editorManager.on("removeEditor",(function(){t.editorManager.activeEditor||Fw&&(ft(Fw,(function(e,n){t.dom.unbind(QS(t,n))})),Fw=null)}))),Fw[e])return;n=function(n){for(var r=n.target,o=t.editorManager.get(),i=o.length;i--;){var a=o[i].getBody();(a===r||XS.isChildOf(r,a))&&JS(o[i],e,n)}},Fw[e]=n,XS.bind(r,e,n)}else n=function(n){JS(t,e,n)},XS.bind(r,e,n),t.delegates[e]=n}},eO=At(At({},GS),{bindPendingEventDelegates:function(){var t=this;De.each(t._pendingNativeEvents,(function(e){tO(t,e)}))},toggleNativeEvent:function(t,e){var n=this;"focus"!==t&&"blur"!==t&&(n.removed||(e?n.initialized?tO(n,t):n._pendingNativeEvents?n._pendingNativeEvents.push(t):n._pendingNativeEvents=[t]:n.initialized&&(n.dom.unbind(QS(n,t),t,n.delegates[t]),delete n.delegates[t])))},unbindAllNativeEvents:function(){var t=this,e=t.getBody(),n=t.dom;t.delegates&&(ft(t.delegates,(function(e,n){t.dom.unbind(QS(t,n),n,e)})),delete t.delegates),!t.inline&&e&&n&&(e.onload=null,n.unbind(t.getWin()),n.unbind(t.getDoc())),n&&(n.unbind(e),n.unbind(t.getContainer()))}}),nO=["design","readonly"],rO=function(t,e,n,r){var o=n[e.get()],i=n[r];try{i.activate()}catch(t){return void console.error("problem while activating editor mode "+r+":",t)}o.deactivate(),o.editorReadOnly!==i.editorReadOnly&&zS(t,i.editorReadOnly),e.set(r),function(t,e){t.fire("SwitchMode",{mode:e})}(t,r)},oO=function(t){var e=Cs("design"),n=Cs({design:{activate:k,deactivate:k,editorReadOnly:!1},readonly:{activate:k,deactivate:k,editorReadOnly:!0}});return function(t){t.serializer?VS(t):t.on("PreInit",(function(){VS(t)}))}(t),function(t){t.on("ShowCaret",(function(e){HS(t)&&e.preventDefault()})),t.on("ObjectSelected",(function(e){HS(t)&&e.preventDefault()}))}(t),{isReadOnly:function(){return HS(t)},set:function(r){return function(t,e,n,r){if(r!==n.get()){if(!_t(e,r))throw new Error("Editor mode '"+r+"' is invalid");t.initialized?rO(t,n,e,r):t.on("init",(function(){return rO(t,n,e,r)}))}}(t,n.get(),e,r)},get:function(){return e.get()},register:function(t,e){n.set(function(t,e,n){var r;if(U(nO,e))throw new Error("Cannot override default mode "+e);return At(At({},t),((r={})[e]=At(At({},n),{deactivate:function(){try{n.deactivate()}catch(t){console.error("problem while deactivating editor mode "+e+":",t)}}}),r))}(n.get(),t,e))}}},iO=De.each,aO=De.explode,sO={f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123},lO=De.makeMap("alt,ctrl,shift,meta,access"),uO=function(t){var e,n={};iO(aO(t.toLowerCase(),"+"),(function(t){t in lO?n[t]=!0:/^[0-9]{2,}$/.test(t)?n.keyCode=parseInt(t,10):(n.charCode=t.charCodeAt(0),n.keyCode=sO[t]||t.toUpperCase().charCodeAt(0))}));var r=[n.keyCode];for(e in lO)n[e]?r.push(e):n[e]=!1;return n.id=r.join(","),n.access&&(n.alt=!0,Ce.mac?n.ctrl=!0:n.shift=!0),n.meta&&(Ce.mac?n.meta=!0:(n.ctrl=!0,n.meta=!1)),n},cO=function(){function t(t){this.shortcuts={},this.pendingPatterns=[],this.editor=t;var e=this;t.on("keyup keypress keydown",(function(t){!e.hasModifier(t)&&!e.isFunctionKey(t)||t.isDefaultPrevented()||(iO(e.shortcuts,(function(n){if(e.matchShortcut(t,n))return e.pendingPatterns=n.subpatterns.slice(0),"keydown"===t.type&&e.executeShortcutAction(n),!0})),e.matchShortcut(t,e.pendingPatterns[0])&&(1===e.pendingPatterns.length&&"keydown"===t.type&&e.executeShortcutAction(e.pendingPatterns[0]),e.pendingPatterns.shift()))}))}return t.prototype.add=function(t,e,n,r){var o=this,i=o.normalizeCommandFunc(n);return iO(aO(De.trim(t)),(function(t){var n=o.createShortcut(t,e,i,r);o.shortcuts[n.id]=n})),!0},t.prototype.remove=function(t){var e=this.createShortcut(t);return!!this.shortcuts[e.id]&&(delete this.shortcuts[e.id],!0)},t.prototype.normalizeCommandFunc=function(t){var e=this,n=t;return"string"==typeof n?function(){e.editor.execCommand(n,!1,null)}:De.isArray(n)?function(){e.editor.execCommand(n[0],n[1],n[2])}:n},t.prototype.createShortcut=function(t,e,n,r){var o=De.map(aO(t,">"),uO);return o[o.length-1]=De.extend(o[o.length-1],{func:n,scope:r||this.editor}),De.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}(),dO=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}},fO=ys.DOM,hO=De.extend,pO=De.each,mO=De.resolve,gO=Ce.ie,vO=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,hO(this,eO),this.settings=cb(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&&(ks.ScriptLoader._setReferrerPolicy(this.settings.referrer_policy),ys.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 zh(this.settings.document_base_url,{base_uri:this.baseUri}),this.baseURI=this.baseUri,this.inline=!!this.settings.inline,this.shortcuts=new cO(this),this.editorCommands=new RS(this),this.settings.cache_suffix&&(Ce.cacheSuffix=this.settings.cache_suffix.replace(/^[\?\&]+/,"")),this.ui={registry:dO(),styleSheetLoader:void 0,show:k,hide:k,enable:k,disable:k,isDisabled:N};var o=oO(this);this.mode=o,this.setMode=o.set,n.fire("SetupEditor",{editor:this}),this.execCallback("setup",this),this.$=ds.overrideDefaults((function(){return{context:r.inline?r.getBody():r.getDoc(),element:r.getBody()}}))}return t.prototype.render=function(){kS(this)},t.prototype.focus=function(t){this.execCommand("mceFocus",!1,t)},t.prototype.hasFocus=function(){return kh(this)},t.prototype.execCallback=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r,o=this,i=o.settings[t];if(i)return o.callbackLookup&&(r=o.callbackLookup[t])&&(i=r.func,r=r.scope),"string"==typeof i&&(r=(r=i.replace(/\.\w+$/,""))?mO(r):0,i=mO(i),o.callbackLookup=o.callbackLookup||{},o.callbackLookup[t]={func:i,scope:r}),i.apply(r||o,e)},t.prototype.translate=function(t){return Es.translate(t)},t.prototype.getParam=function(t,e,n){return fb(this,t,e,n)},t.prototype.hasPlugin=function(t,e){return!!U(xu(this).split(/[ ,]/),t)&&(!e||void 0!==Cb.get(t))},t.prototype.nodeChanged=function(t){this._nodeChangeDispatcher.nodeChanged(t)},t.prototype.addCommand=function(t,e,n){this.editorCommands.addCommand(t,e,n)},t.prototype.addQueryStateHandler=function(t,e,n){this.editorCommands.addQueryStateHandler(t,e,n)},t.prototype.addQueryValueHandler=function(t,e,n){this.editorCommands.addQueryValueHandler(t,e,n)},t.prototype.addShortcut=function(t,e,n,r){this.shortcuts.add(t,e,n,r)},t.prototype.execCommand=function(t,e,n,r){return this.editorCommands.execCommand(t,e,n,r)},t.prototype.queryCommandState=function(t){return this.editorCommands.queryCommandState(t)},t.prototype.queryCommandValue=function(t){return this.editorCommands.queryCommandValue(t)},t.prototype.queryCommandSupported=function(t){return this.editorCommands.queryCommandSupported(t)},t.prototype.show=function(){var t=this;t.hidden&&(t.hidden=!1,t.inline?t.getBody().contentEditable="true":(fO.show(t.getContainer()),fO.hide(t.id)),t.load(),t.fire("show"))},t.prototype.hide=function(){var t=this,e=t.getDoc();t.hidden||(gO&&e&&!t.inline&&e.execCommand("SelectAll"),t.save(),t.inline?(t.getBody().contentEditable="false",t===t.editorManager.focusedEditor&&(t.editorManager.focusedEditor=null)):(fO.hide(t.getContainer()),fO.setStyle(t.id,"display",t.orgDisplay)),t.hidden=!0,t.fire("hide"))},t.prototype.isHidden=function(){return!!this.hidden},t.prototype.setProgressState=function(t,e){this.fire("ProgressState",{state:t,time:e})},t.prototype.load=function(t){var e,n=this,r=n.getElement();if(n.removed)return"";if(r){(t=t||{}).load=!0;var o=Rn(r)?r.value:r.innerHTML;return e=n.setContent(o,t),t.element=r,t.no_events||n.fire("LoadContent",t),t.element=r=null,e}},t.prototype.save=function(t){var e,n,r=this,o=r.getElement();if(o&&r.initialized&&!r.removed)return(t=t||{}).save=!0,t.element=o,t.content=r.getContent(t),t.no_events||r.fire("SaveContent",t),"raw"===t.format&&r.fire("RawSaveContent",t),e=t.content,Rn(o)?o.value=e:(!t.is_removing&&r.inline||(o.innerHTML=e),(n=fO.getParent(r.id,"form"))&&pO(n.elements,(function(t){if(t.name===r.id)return t.value=e,!1}))),t.element=o=null,!1!==t.set_dirty&&r.setDirty(!1),e},t.prototype.setContent=function(t,e){return Ry(this,t,e)},t.prototype.getContent=function(t){return My(this,t)},t.prototype.insertContent=function(t,e){e&&(t=hO({content:t},e)),this.execCommand("mceInsertContent",!1,t)},t.prototype.resetContent=function(t){void 0===t?Ry(this,this.startContent,{format:"raw"}):Ry(this,t),this.undoManager.reset(),this.setDirty(!1),this.nodeChanged()},t.prototype.isDirty=function(){return!this.isNotDirty},t.prototype.setDirty=function(t){var e=!this.isNotDirty;this.isNotDirty=!t,t&&t!==e&&this.fire("dirty")},t.prototype.getContainer=function(){var t=this;return t.container||(t.container=fO.get(t.editorContainer||t.id+"_parent")),t.container},t.prototype.getContentAreaContainer=function(){return this.contentAreaContainer},t.prototype.getElement=function(){return this.targetElm||(this.targetElm=fO.get(this.id)),this.targetElm},t.prototype.getWin=function(){var t,e=this;return e.contentWindow||(t=e.iframeElement)&&(e.contentWindow=t.contentWindow),e.contentWindow},t.prototype.getDoc=function(){var t,e=this;return e.contentDocument||(t=e.getWin())&&(e.contentDocument=t.document),e.contentDocument},t.prototype.getBody=function(){var t=this.getDoc();return this.bodyElement||(t?t.body:null)},t.prototype.convertURL=function(t,e,n){var r=this,o=r.settings;return o.urlconverter_callback?r.execCallback("urlconverter_callback",t,n,!0,e):!o.convert_urls||n&&"LINK"===n.nodeName||0===t.indexOf("file:")||0===t.length?t:o.relative_urls?r.documentBaseURI.toRelative(t):t=r.documentBaseURI.toAbsolute(t,o.remove_script_host)},t.prototype.addVisual=function(t){CS(this,t)},t.prototype.remove=function(){Fy(this)},t.prototype.destroy=function(t){Uy(this,t)},t.prototype.uploadImages=function(t){return this.editorUpload.uploadImages(t)},t.prototype._scanForImages=function(){return this.editorUpload.scanForImages()},t.prototype.addButton=function(){throw new Error("editor.addButton has been removed in tinymce 5x, use editor.ui.registry.addButton or editor.ui.registry.addToggleButton or editor.ui.registry.addSplitButton instead")},t.prototype.addSidebar=function(){throw new Error("editor.addSidebar has been removed in tinymce 5x, use editor.ui.registry.addSidebar instead")},t.prototype.addMenuItem=function(){throw new Error("editor.addMenuItem has been removed in tinymce 5x, use editor.ui.registry.addMenuItem instead")},t.prototype.addContextToolbar=function(){throw new Error("editor.addContextToolbar has been removed in tinymce 5x, use editor.ui.registry.addContextToolbar instead")},t}(),yO=ys.DOM,bO=De.explode,_O=De.each,wO=De.extend,kO=0,CO=!1,xO=[],SO=[],OO=function(t){var e=t.type;_O(AO.get(),(function(n){switch(e){case"scroll":n.fire("ScrollWindow",t);break;case"resize":n.fire("ResizeWindow",t)}}))},EO=function(t){t!==CO&&(t?ds(window).on("resize scroll",OO):ds(window).off("resize scroll",OO),CO=t)},DO=function(t){var e=SO;delete xO[t.id];for(var n=0;n<xO.length;n++)if(xO[n]===t){xO.splice(n,1);break}return SO=Y(SO,(function(e){return t!==e})),AO.activeEditor===t&&(AO.activeEditor=SO.length>0?SO[0]:null),AO.focusedEditor===t&&(AO.focusedEditor=null),e.length!==SO.length},LO="CSS1Compat"!==document.compatMode,AO=At(At({},GS),{baseURI:null,baseURL:null,defaultSettings:{},documentBaseURL:null,suffix:null,$:ds,majorVersion:"5",minorVersion:"10.6",releaseDate:"2022-10-19",editors:xO,i18n:Es,activeEditor:null,focusedEditor:null,settings:{},setup:function(){var t,e,n=this,r="";e=zh.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;s<a.length;s++){var l;if(""!==(l=a[s].src||"")){var u=l.substring(l.lastIndexOf("/"));if(/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(l)){-1!==u.indexOf(".min")&&(r=".min"),t=l.substring(0,l.lastIndexOf("/"));break}}}if(!t&&document.currentScript)-1!==(l=document.currentScript.src).indexOf(".min")&&(r=".min"),t=l.substring(0,l.lastIndexOf("/"))}n.baseURL=new zh(e).toAbsolute(t),n.documentBaseURL=e,n.baseURI=new zh(n.baseURL),n.suffix=r,(o=n).on("AddEditor",D(gh,o)),o.on("RemoveEditor",D(vh,o))},overrideDefaults:function(t){var e=t.base_url;e&&this._setBaseUrl(e);var n=t.suffix;t.suffix&&(this.suffix=n),this.defaultSettings=t;var r=t.plugin_base_urls;void 0!==r&&ft(r,(function(t,e){Ds.PluginManager.urls[e]=t}))},init:function(t){var e,n=this,r=De.makeMap("area base basefont br col frame hr img input isindex link meta param embed source wbr track colgroup option table tbody tfoot thead tr th td script noscript style textarea video audio iframe object menu"," "),o=function(t){var e=t.id;return e||(e=bt(t,"name").filter((function(t){return!yO.get(t)})).getOrThunk(yO.uniqueId),t.setAttribute("id",e)),e},i=function(t,e){return e.constructor===RegExp?e.test(t.className):yO.hasClass(t,e)},a=function(t){e=t},s=function(){var e,l=0,u=[],c=function(t,r,o){var i=new vO(t,r,n);u.push(i),i.on("init",(function(){++l===e.length&&a(u)})),i.targetElm=i.targetElm||o,i.render()};yO.unbind(window,"ready",s),function(e){var r=t[e];if(r)r.apply(n,[])}("onpageload"),e=ds.unique(function(t){var e=[];if(Ce.browser.isIE()&&Ce.browser.version.major<11)return Tb("TinyMCE does not support the browser you are using. For a list of supported browsers please see: https://www.tinymce.com/docs/get-started/system-requirements/"),[];if(LO)return Tb("Failed to initialize the editor as the document is not in standards mode. TinyMCE requires standards mode."),[];if(t.types)return _O(t.types,(function(t){e=e.concat(yO.select(t.selector))})),e;if(t.selector)return yO.select(t.selector);if(t.target)return[t.target];switch(t.mode){case"exact":var n=t.elements||"";n.length>0&&_O(bO(n),(function(t){var n=yO.get(t);n?e.push(n):_O(document.forms,(function(n){_O(n.elements,(function(n){n.name===t&&(t="mce_editor_"+kO++,yO.setAttrib(n,"id",t),e.push(n))}))}))}));break;case"textareas":case"specific_textareas":_O(yO.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?_O(t.types,(function(n){De.each(e,(function(e){return!yO.is(e,n.selector)||(c(o(e),wO({},t,n),e),!1)}))})):(De.each(e,(function(t){var e;(e=n.get(t.id))&&e.initialized&&!(e.getContainer()||e.getBody()).parentNode&&(DO(e),e.unbindAllNativeEvents(),e.destroy(!0),e.removed=!0,e=null)})),0===(e=De.grep(e,(function(t){return!n.get(t.id)}))).length?a([]):_O(e,(function(e){!function(t,e){return t.inline&&e.tagName.toLowerCase()in r}(t,e)?c(o(e),t,e):Tb("Could not initialize inline editor on invalid inline target element",e)})))};return n.settings=t,yO.bind(window,"ready",s),new to((function(t){e?t(e):a=function(e){t(e)}}))},get:function(t){return 0===arguments.length?SO.slice(0):f(t)?Q(SO,(function(e){return e.id===t})).getOr(null):w(t)&&SO[t]?SO[t]:null},add:function(t){var e=this;return xO[t.id]===t||(null===e.get(t.id)&&("length"!==t.id&&(xO[t.id]=t),xO.push(t),SO.push(t)),EO(!0),e.activeEditor=t,e.fire("AddEditor",{editor:t}),Uw||(Uw=function(t){var n=e.fire("BeforeUnload");if(n.returnValue)return t.preventDefault(),t.returnValue=n.returnValue,n.returnValue},window.addEventListener("beforeunload",Uw))),t},createEditor:function(t,e){return this.add(new vO(t,e,this))},remove:function(t){var e,n,r=this;if(t){if(!f(t))return n=t,m(r.get(n.id))?null:(DO(n)&&r.fire("RemoveEditor",{editor:n}),0===SO.length&&window.removeEventListener("beforeunload",Uw),n.remove(),EO(SO.length>0),n);_O(yO.select(t),(function(t){(n=r.get(t.id))&&r.remove(n)}))}else for(e=SO.length-1;e>=0;e--)r.remove(SO[e])},execCommand:function(t,e,n){var r=this,o=r.get(n);switch(t){case"mceAddEditor":return r.get(n)||new vO(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(){_O(SO,(function(t){t.save()}))},addI18n:function(t,e){Es.add(t,e)},translate:function(t){return Es.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 zh(this.documentBaseURL).toAbsolute(t.replace(/\/+$/,"")),this.baseURI=new zh(this.baseURL)}});AO.setup();var TO,NO,$O,IO,PO=Math.min,jO=Math.max,MO=Math.round,RO=function(t,e,n){var r=e.x,o=e.y,i=t.w,a=t.h,s=e.w,l=e.h,u=(n||"").split("");return"b"===u[0]&&(o+=l),"r"===u[1]&&(r+=s),"c"===u[0]&&(o+=MO(l/2)),"c"===u[1]&&(r+=MO(s/2)),"b"===u[3]&&(o-=a),"r"===u[4]&&(r-=i),"c"===u[3]&&(o-=MO(a/2)),"c"===u[4]&&(r-=MO(i/2)),BO(r,o,i,a)},BO=function(t,e,n,r){return{x:t,y:e,w:n,h:r}},qO={inflate:function(t,e,n){return BO(t.x-e,t.y-n,t.w+2*e,t.h+2*n)},relativePosition:RO,findBestRelativePosition:function(t,e,n,r){var o,i;for(i=0;i<r.length;i++)if((o=RO(t,e,r[i])).x>=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=jO(t.x,e.x),r=jO(t.y,e.y),o=PO(t.x+t.w,e.x+e.w),i=PO(t.y+t.h,e.y+e.h);return o-n<0||i-r<0?null:BO(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,l=e.y+e.h,u=jO(0,e.x-r),c=jO(0,e.y-o),d=jO(0,i-s),f=jO(0,a-l);return r+=u,o+=c,n&&(i+=u,a+=c,r-=d,o-=f),BO(r,o,(i-=d)-r,(a-=f)-o)},create:BO,fromClientRect:function(t){return BO(t.left,t.top,t.width,t.height)}},FO=(TO={},NO={},{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!==TO[t])return TO[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;n<arguments.length;n++)e[n]=arguments[n];r||(r=!0,null!==o&&(clearTimeout(o),o=null),t.apply(null,e))}},a=i(t),s=i(e);return{start:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];r||null!==o||(o=setTimeout((function(){return s.apply(null,t)}),n))},resolve:a,reject:s}}(o,i);NO[t]=a.resolve,ks.ScriptLoader.loadScript(e,(function(){return a.start(r)}),(function(){return a.reject(n)}))}));return TO[t]=o,o},add:function(t,e){void 0!==NO[t]&&(NO[t](e),delete NO[t]),TO[t]=to.resolve(e)}}),UO=De.each,zO=De.extend,HO=function(){};HO.extend=$O=function(t){var e=this.prototype,n=function(){var t,e,n,r=this;if(!IO&&(r.init&&r.init.apply(r,arguments),e=r.Mixins))for(t=e.length;t--;)(n=e[t]).init&&n.init.apply(r,arguments)},r=function(){return this};IO=!0;var o=new this;return IO=!1,t.Mixins&&(UO(t.Mixins,(function(e){for(var n in e)"init"!==n&&(t[n]=e[n])})),e.Mixins&&(t.Mixins=e.Mixins.concat(t.Mixins))),t.Methods&&UO(t.Methods.split(","),(function(e){t[e]=r})),t.Properties&&UO(t.Properties.split(","),(function(e){var n="_"+e;t[e]=function(t){var e=this;return void 0!==t?(e[n]=t,e):e[n]}})),t.Statics&&UO(t.Statics,(function(t,e){n[e]=t})),t.Defaults&&e.Defaults&&(t.Defaults=zO({},e.Defaults,t.Defaults)),ft(t,(function(t,n){"function"==typeof t&&e[n]?o[n]=function(t,n){return function(){var r=this,o=r._super;r._super=e[t];var i=n.apply(r,arguments);return r._super=o,i}}(n,t):o[n]=t})),n.prototype=o,n.constructor=n,n.extend=$O,n};var VO,WO=Math.min,KO=Math.max,YO=Math.round,ZO={serialize:function(t){var e=JSON.stringify(t);return f(e)?e.replace(/[\u0080-\uFFFF]/g,(function(t){var e=t.charCodeAt(0).toString(16);return"\\u"+"0000".substring(e.length)+e})):e},parse:function(t){try{return JSON.parse(t)}catch(t){}}},GO={callbacks:{},count:0,send:function(t){var e=this,n=ys.DOM,r=void 0!==t.count?t.count:e.count,o="tinymce_jsonp_"+r;e.callbacks[r]=function(i){n.remove(o),delete e.callbacks[r],t.callback(i)},n.add(n.doc.body,"script",{id:o,src:t.url,type:"text/javascript"}),e.count++}},XO=At(At({},GS),{send:function(t){var e,n=0,r=function(){!t.async||4===e.readyState||n++>1e4?(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||"",XO.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&&De.each(t.requestheaders,(function(t){e.setRequestHeader(t.key,t.value)})),e.setRequestHeader("X-Requested-With","XMLHttpRequest"),(e=XO.fire("beforeSend",{xhr:e,settings:t}).xhr).send(t.data),!t.async)return r();oo.setTimeout(r,10)}}),QO=De.extend,JO=function(){function t(t){this.settings=QO({},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=QO(this.settings,t);r.success=function(t,o){void 0===(t=ZO.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=ZO.serialize({id:t.id||"c"+this.count++,method:t.method,params:t.params}),r.content_type="application/json",XO.send(r)},t}();try{var tE="__storage_test__";(VO=window.localStorage).setItem(tE,tE),VO.removeItem(tE)}catch(t){VO=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 eE={geom:{Rect:qO},util:{Promise:to,Delay:oo,Tools:De,VK:sf,URI:zh,Class:HO,EventDispatcher:YS,Observable:GS,I18n:Es,XHR:XO,JSON:ZO,JSONRequest:JO,JSONP:GO,LocalStorage:VO,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=KO(0,WO(e,1)),i=KO(0,WO(i,1)),0!==e){var a=t/60,s=i*e,l=s*(1-Math.abs(a%2-1)),u=i-s;switch(Math.floor(a)){case 0:n=s,r=l,o=0;break;case 1:n=l,r=s,o=0;break;case 2:n=0,r=s,o=l;break;case 3:n=0,r=l,o=s;break;case 4:n=l,r=0,o=s;break;case 5:n=s,r=0,o=l;break;default:n=r=o=0}n=YO(255*(n+u)),r=YO(255*(r+u)),o=YO(255*(o+u))}else n=r=o=YO(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=WO(t/=255,WO(e/=255,n/=255)),a=KO(t,KO(e,n));return i===a?{h:0,s:0,v:100*(o=i)}:(r=(a-i)/a,o=a,{h:YO(60*((t===i?3:n===i?1:5)-(t===i?e-n:n===i?t-e:n-t)/(a-i))),s:YO(100*r),v:YO(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=Pb(),n=qb(t,e);return{upload:function(e,r){return void 0===r&&(r=!0),n.upload(e,r?Bb(t):void 0)}}}},dom:{EventUtils:Ui,Sizzle:Sa,DomQuery:ds,TreeWalker:so,TextSeeker:el,DOMUtils:ys,ScriptLoader:ks,RangeUtils:xf,Serializer:jy,StyleSheetLoader:io,ControlSelection:uf,BookmarkManager:tf,Selection:hy,Event:Ui.Event},html:{Styles:$i,Entities:bi,Node:Ph,Schema:Ti,SaxParser:Zh,DomParser:Ty,Writer:np,Serializer:rp},Env:Ce,AddOnManager:Ds,Annotator:Jd,Formatter:Yb,UndoManager:Gb,EditorCommands:RS,WindowManager:Sb,NotificationManager:kb,EditorObservable:eO,Shortcuts:cO,Editor:vO,FocusManager:dh,EditorManager:AO,DOM:ys.DOM,ScriptLoader:ks.ScriptLoader,PluginManager:Cb,ThemeManager:xb,IconManager:hb,Resource:FO,trim:De.trim,isArray:De.isArray,is:De.is,toArray:De.toArray,makeMap:De.makeMap,each:De.each,map:De.map,grep:De.grep,inArray:De.inArray,extend:De.extend,create:De.create,walk:De.walk,createNS:De.createNS,resolve:De.resolve,explode:De.explode,_addCacheSuffix:De._addCacheSuffix,isOpera:Ce.opera,isWebKit:Ce.webkit,isIE:Ce.ie,isGecko:Ce.gecko,isMac:Ce.mac},nE=De.extend(AO,eE);!function(t){window.tinymce=t,window.tinyMCE=t}(nE),function(e){try{t.exports=e}catch(t){}}(nE)}()},81034:(t,e,n)=>{"use strict";n.d(e,{Z:()=>d});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},beforeResize:Function},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){var e=this;if(this.beforeResize){var n=this.beforeResize();n&&n.then?n.then((function(n){e.handleDown(t)})):this.handleDown(t)}else this.handleDown(t)},handleDown: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&&(this.resizing=!1,this.tmpSize=void 0,this.$emit("on-change",{event:"up"}))}}};var o=n(93379),i=n.n(o),a=n(92307),s={insert:"head",singleton:!1};i()(a.Z,s);a.Z.locals;var l=n(51900);const u={name:"DrawerOverlayView",components:{ResizeLine:(0,l.Z)(r,(function(){var t=this;return(0,t._self._c)("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,"5a37a7e8",null).exports},props:{placement:{validator:function(t){return["right","bottom"].includes(t)},default:"bottom"},size:{type:[Number,String],default:"100%"},minSize:{type:Number,default:300},resize:{type:Boolean,default:!0}},data:function(){return{dynamicSize:0}},computed:{bodyStyle:function(){var t=this.dynamicSize;return t="".concat(t,t<=100?"%":"px"),"right"==this.placement?{width:t,height:"100%"}:{width:"100%",height:t}}},watch:{size:{handler:function(t){this.dynamicSize=parseInt(t)},immediate:!0}},methods:{onClose:function(){this.$emit("on-close")},beforeResize:function(){var t=this;return new Promise((function(e){t.dynamicSize<=100&&t.updateSize(),e()}))},onChangeResize:function(t){"up"===t.event&&this.updateSize()},updateSize:function(){"bottom"===this.placement?this.dynamicSize=this.$refs.body.clientHeight:this.dynamicSize=this.$refs.body.clientWidth}}};const c={name:"DrawerOverlay",components:{DrawerOverlayView:(0,l.Z)(u,(function(){var t=this,e=t._self._c;return e("div",{ref:"body",staticClass:"overlay-body",style:t.bodyStyle},[e("div",{staticClass:"overlay-close"},[e("a",{attrs:{href:"javascript:void(0)"},on:{click:function(e){return e.stopPropagation(),t.onClose.apply(null,arguments)}}},[e("svg",{staticClass:"icon fill-current",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 26 26",fill:"none",role:"img"}},[e("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?e("ResizeLine",{staticClass:"overlay-resize",attrs:{placement:t.placement,min:t.minSize,max:0,reverse:!0,beforeResize:t.beforeResize},on:{"on-change":t.onChangeResize},model:{value:t.dynamicSize,callback:function(e){t.dynamicSize=e},expression:"dynamicSize"}}):t._e(),t._v(" "),e("div",{staticClass:"overlay-content"},[t._t("default")],2)],1)}),[],!1,null,null,null).exports},props:{value:{type:Boolean,default:!1},maskClosable:{type:Boolean,default:!0},escClosable:{type:Boolean,default:!0},placement:{validator:function(t){return["right","bottom"].includes(t)},default:"bottom"},size:{type:[Number,String],default:"100%"},minSize:{type:Number,default:300},resize:{type:Boolean,default:!0},className:{type:String},beforeClose:Function},data:function(){return{show:this.value}},watch:{value:function(t){this.show=t},show:function(t){this.value!==t&&this.$emit("input",t)}},computed:{modalClass:function(){return this.className?"common-drawer-overlay ".concat(this.className," ").concat(this.placement):"common-drawer-overlay ".concat(this.placement)}},methods:{onClose:function(){this.$refs.modal.close()}}};const d=(0,l.Z)(c,(function(){var t=this,e=t._self._c;return e("Modal",{ref:"modal",attrs:{closable:t.escClosable,"mask-closable":t.maskClosable,"footer-hide":!0,"transition-names":[t.$A.isAndroid()?"":"drawer-slide-".concat(t.placement),""],beforeClose:t.beforeClose,fullscreen:"","class-name":t.modalClass},model:{value:t.show,callback:function(e){t.show=e},expression:"show"}},[e("DrawerOverlayView",{attrs:{placement:t.placement,size:t.size,minSize:t.minSize,resize:t.resize},on:{"on-close":t.onClose}},[t._t("default")],2)],1)}),[],!1,null,null,null).exports},76787:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});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)}const o={name:"ImgUpload",props:{value:{},num:{},width:{},height:{},whcut:{},type:{},http:{type:Boolean,default:!1},otherParams:{type:Object,default:function(){return{}}},uploadIng:{type:Number,default:0}},data:function(){return{actionUrl:$A.apiUrl("system/imgupload"),multiple:this.num>1,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:{uploadHeaders:function(){return{fd:$A.getSessionStorageString("userWsFd"),token:this.userToken}},uploadParams:function(){var t={width:this.width,height:this.height,whcut:this.whcut};return Object.keys(this.otherParams).length>0?Object.assign(t,this.otherParams):t}},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"===r(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<this.maxNum;return t||1!=this.uploadList.length||(this.handleRemove(this.uploadList[0]),t=this.uploadList.length<this.maxNum),t||$A.noticeWarning(this.$L("最多只能上传 "+this.maxNum+" 张图片。")),t},handleClick:function(){this.handleBeforeUpload()&&this.$refs.upload.handleClick()},handleManual:function(t){this.handleBeforeUpload()&&this.$refs.upload.upload(t)},browsePicture:function(t){var e=this;this.browseVisible=!0,this.browseList=[],this.browseListNext=[],this.isLoading=!0,this.$store.dispatch("call",{url:"system/imgview",data:{path:t||""}}).then((function(t){for(var n=t.data,r=n.dirs,o=0;o<r.length;o++)e.browseList.push(r[o]);e.browsePictureFor(n.files)})).catch((function(t){var n=t.msg;e.browseVisible=!1,$A.noticeWarning(n)})).finally((function(t){e.isLoading=!1}))},browsePictureFor:function(t){for(var e=0;e<t.length;e++){for(var n=0;n<this.uploadList.length;n++)if(this.uploadList[n].url===t[e].url||this.uploadList[n].url===t[e].path){t[e].active=!0;break}e<100?this.browseList.push(t[e]):this.browseListNext.push(t[e])}},browseItem:function(t){if("dir"===t.type)this.browsePicture(t.path);else if("file"===t.type){if(t.active){var e=this.$refs.upload.fileList;this.$refs.upload.fileList.splice(e.indexOf(t),1),t.active=!1}else{if(1===this.maxNum){for(var n=0;n<this.browseList.length;n++)this.browseList[n].active=!1;this.$refs.upload.fileList=[],this.uploadList=this.$refs.upload.fileList}if(!(this.uploadList.length<this.maxNum))return void $A.noticeWarning(this.$L("最多只能选择 "+this.maxNum+" 张图片。"));t.active=!0,t.status="finished",this.$refs.upload.fileList.push(t),this.uploadList=this.$refs.upload.fileList}this.$emit("input",this.$refs.upload.fileList)}},__thumb:function(t){return $A.strExists(t,"?",!1)?t+"&__thumb=true":t+"?__thumb=true"},httpEnter:function(){this.$emit("input",this.initItems(this.httpValue)),this.browseVisible=!1}}};const i=(0,n(51900).Z)(o,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"common-img-update"},[t._l(t.uploadList,(function(n){return"callback"!==t.type?e("div",{staticClass:"imgcomp-upload-list"},["finished"===n.status?[e("div",{staticClass:"imgcomp-upload-img",style:{"background-image":"url("+t.__thumb(n.thumb)+")"}}),t._v(" "),e("div",{staticClass:"imgcomp-upload-list-cover"},[e("Icon",{attrs:{type:"ios-eye-outline"},nativeOn:{click:function(e){return t.handleView(n)}}}),t._v(" "),e("Icon",{attrs:{type:"ios-trash-outline"},nativeOn:{click:function(e){return t.handleRemove(n)}}})],1)]:[n.showProgress?e("Progress",{attrs:{percent:n.percentage,"hide-info":""}}):t._e()]],2):t._e()})),t._v(" "),e("div",{staticClass:"add-box",class:{"callback-add-box":"callback"===t.type}},[e("div",{staticClass:"add-box-icon"},[e("Icon",{attrs:{type:"md-add",size:"32"}})],1),t._v(" "),e("div",{staticClass:"add-box-upload"},[e("div",{staticClass:"add-box-item",on:{click:t.browsePicture}},[e("span",[t._v(t._s(t.$L("浏览"))),"callback"===t.type?e("em",[t._v(t._s(t.$L("图片")))]):t._e()])]),t._v(" "),e("div",{staticClass:"add-box-item"},[e("Upload",{ref:"upload",attrs:{name:"image",accept:"image/*",action:t.actionUrl,headers:t.uploadHeaders,data:t.uploadParams,"show-upload-list":!1,"max-size":t.maxSize,format:["jpg","jpeg","gif","png"],"default-file-list":t.defaultList,"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,multiple:t.multiple}},[e("span",[t._v(t._s(t.$L("上传"))),"callback"===t.type?e("em",[t._v(t._s(t.$L("图片")))]):t._e()])])],1)])]),t._v(" "),e("Modal",{staticClass:"img-upload-modal",attrs:{title:t.$L("浏览图片空间"),width:"710"},model:{value:t.browseVisible,callback:function(e){t.browseVisible=e},expression:"browseVisible"}},[t.isLoading?e("div",{staticClass:"browse-load"},[t._v(t._s(t.$L("加载中...")))]):t._e(),t._v(" "),e("div",{ref:"browselistbox",staticClass:"browse-list",class:"input"===t.httpType?"browse-list-disabled":""},[t.browseList.length<=0?e("div",[t._v(t._s(t.$L("无内容")))]):t._l(t.browseList,(function(n){return e("div",{staticClass:"browse-item",on:{click:function(e){return t.browseItem(n)}}},[n.active?e("Icon",{staticClass:"browse-icon",attrs:{type:"ios-checkmark-circle"}}):t._e(),t._v(" "),e("div",{staticClass:"browse-img",style:{"background-image":"url("+n.thumb+")"}}),t._v(" "),e("div",{staticClass:"browse-title"},[t._v(t._s(n.title))])],1)}))],2),t._v(" "),e("div",{staticClass:"img-upload-foot",attrs:{slot:"footer"},slot:"footer"},["callback"!==t.type&&t.http&&""===t.httpType?e("div",{staticClass:"img-upload-foot-input",on:{click:function(e){t.httpType="input"}}},[e("Icon",{attrs:{type:"ios-image",size:"22"}}),t._v(" "),e("div",{staticClass:"img-upload-foot-httptitle"},[t._v(t._s(t.$L("自定义图片地址")))])],1):t._e(),t._v(" "),"callback"!==t.type&&t.http&&"input"===t.httpType?e("div",{staticClass:"img-upload-foot-input"},[e("Input",{attrs:{placeholder:t.$L("以 http:// 或 https:// 开头"),search:"","enter-button":t.$L("确定")},on:{"on-search":t.httpEnter},model:{value:t.httpValue,callback:function(e){t.httpValue=e},expression:"httpValue"}},[e("span",{staticStyle:{cursor:"pointer"},attrs:{slot:"prepend"},on:{click:function(e){t.httpType=""}},slot:"prepend"},[t._v(t._s(t.$L("自定义地址"))+": ")])])],1):t._e(),t._v(" "),""===t.httpType?e("Button",{on:{click:function(e){t.browseVisible=!1}}},[t._v(t._s(t.$L("关闭")))]):t._e(),t._v(" "),""===t.httpType?e("Button",{attrs:{type:"primary"},on:{click:function(e){return t.handleCallback(!0)}}},[t._v(t._s(t.$L("完成")))]):t._e()],1)]),t._v(" "),e("Modal",{staticClass:"img-upload-modal",attrs:{title:t.$L("查看图片"),draggable:""},model:{value:t.visible,callback:function(e){t.visible=e},expression:"visible"}},[e("div",{staticStyle:{"max-height":"480px",overflow:"auto"}},[e("a",{attrs:{href:t.imgVisible,target:"_blank"}},[t.visible?e("img",{staticStyle:{"max-width":"100%","max-height":"900px",display:"block",margin:"0 auto"},attrs:{src:t.imgVisible}}):t._e()])])])],2)}),[],!1,null,null,null).exports},69027:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>f});var r=n(47575),o=n.n(r),i=n(76787),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 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 u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?l(Object(n),!0).forEach((function(e){c(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function c(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:"TEditor",components:{ImgUpload:i.Z},props:{id:{type:String,default:function(){return"tinymce_"+Math.round(1e4*Math.random())}},value:{default:""},height:{default:360},minHeight:{type:Number,default:0},htmlClass:{default:"",type:String},plugins:{type:Array,default:function(){return["advlist autolink lists link image charmap print preview hr anchor pagebreak","searchreplace visualblocks visualchars code","insertdatetime media nonbreaking save table directionality","emoticons paste codesample"]}},toolbar:{type:String,default:" undo redo | styleselect | uploadImages | uploadFiles | bold italic underline forecolor backcolor | alignleft aligncenter alignright | bullist numlist outdent indent | link image emoticons media codesample | preview screenload"},options:{type:Object,default:function(){return{}}},optionFull:{type:Object,default:function(){return{}}},inline:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},autoSize:{type:Boolean,default:!1},placeholder:{type:String,default:""},placeholderFull:{type:String,default:""}},data:function(){return{content:"",editor:null,editorT:null,cTinyMce:null,checkerTimeout:null,isTyping:!1,spinShow:!0,transfer:!1,uploadIng:0,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"],actionUrl:$A.apiUrl("system/fileupload"),maxSize:10240}},mounted:function(){this.content=this.value,this.init()},beforeDestroy:function(){null!==this.editor&&(this.editor.destroy(),this.editor=null),this.spinShow=!0,$A(this.$refs.myTextarea).show()},activated:function(){this.content=this.value,this.init()},deactivated:function(){null!==this.editor&&(this.editor.destroy(),this.editor=null),this.spinShow=!0,$A(this.$refs.myTextarea).show()},computed:u(u({},(0,a.rn)(["themeIsDark"])),{},{headers:function(){return{fd:$A.getSessionStorageString("userWsFd"),token:this.userToken}}}),watch:{value:function(t){null==t&&(t=""),this.isTyping||this.setContent(t)},readOnly:function(t){null!==this.editor&&(t?this.editor.setMode("readonly"):this.editor.setMode("design"))}},methods:{init:function(){var t=this;this.$nextTick((function(){o().init(t.concatAssciativeArrays(t.option(!1),t.options))}))},initTransfer:function(){var t=this;this.$nextTick((function(){o().init(t.concatAssciativeArrays(t.option(!0),t.optionFull))}))},plugin:function(t){return t?this.plugins.filter((function(t){return"autoresize"!=t})):this.plugins},option:function(t){var e=this,n={inline:!t&&this.inline,selector:(t?"#T_":"#")+this.id,base_url:$A.originUrl("js/tinymce"),language:"zh_CN",toolbar:this.toolbar,plugins:this.plugin(t),placeholder:t&&this.placeholderFull?this.placeholderFull:this.placeholder,save_onsavecallback:function(t){e.$emit("editorSave",t)},paste_data_images:!0,menu:{view:{title:"View",items:"code | visualaid visualchars visualblocks | spellchecker | preview fullscreen screenload | showcomments"},insert:{title:"Insert",items:"image link media addcomment pageembed template codesample inserttable | charmap emoticons hr | pagebreak nonbreaking anchor toc | insertdatetime | uploadImages | uploadFiles"}},codesample_languages:[{text:"HTML/VUE/XML",value:"markup"},{text:"JavaScript",value:"javascript"},{text:"CSS",value:"css"},{text:"PHP",value:"php"},{text:"Ruby",value:"ruby"},{text:"Python",value:"python"},{text:"Java",value:"java"},{text:"C",value:"c"},{text:"C#",value:"csharp"},{text:"C++",value:"cpp"}],height:t?"100%":$A.rightExists(this.height,"%")?this.height:$A.runNum(this.height)||360,resize:!t,convert_urls:!1,toolbar_mode:"sliding",content_css:this.themeIsDark?"dark":"default",setup:function(n){n.ui.registry.addMenuButton("uploadImages",{text:e.$L("图片"),tooltip:e.$L("上传/浏览 图片"),fetch:function(t){t([{type:"menuitem",text:e.$L("上传本地图片"),onAction:function(){e.$refs.myUpload.handleClick()}},{type:"menuitem",text:e.$L("浏览已上传图片"),onAction:function(){e.$refs.myUpload.browsePicture()}}])}}),n.ui.registry.addNestedMenuItem("uploadImages",{icon:"image",text:e.$L("上传图片"),getSubmenuItems:function(){return[{type:"menuitem",text:e.$L("上传本地图片"),onAction:function(){e.$refs.myUpload.handleClick()}},{type:"menuitem",text:e.$L("浏览已上传图片"),onAction:function(){e.$refs.myUpload.browsePicture()}}]}}),n.ui.registry.addMenuItem("imagePreview",{text:e.$L("预览图片"),onAction:function(){var t=e.getValueImages();if(0!==t.length){var r=0,o=n.selection.getNode();o&&"IMG"===o.nodeName&&(r=t.findIndex((function(t){return t.src===o.getAttribute("src")}))),e.$store.state.previewImageIndex=r,e.$store.state.previewImageList=t}else $A.messageWarning("没有可预览的图片")}}),n.ui.registry.addButton("uploadFiles",{text:e.$L("文件"),tooltip:e.$L("上传文件"),onAction:function(){e.handleBeforeUpload()&&e.$refs.fileUpload.handleClick()}}),n.ui.registry.addMenuItem("uploadFiles",{text:e.$L("上传文件"),onAction:function(){e.handleBeforeUpload()&&e.$refs.fileUpload.handleClick()}}),t?(n.ui.registry.addButton("screenload",{icon:"fullscreen",tooltip:e.$L("退出全屏"),onAction:function(){e.closeFull()}}),n.ui.registry.addMenuItem("screenload",{text:e.$L("退出全屏"),onAction:function(){e.closeFull()}}),n.on("Init",(function(t){e.editorT=n,e.editorT.setContent(e.content),e.readOnly?e.editorT.setMode("readonly"):e.editorT.setMode("design")}))):(n.ui.registry.addButton("screenload",{icon:"fullscreen",tooltip:e.$L("全屏"),onAction:function(){e.content=n.getContent(),e.transfer=!0,e.initTransfer()}}),n.ui.registry.addMenuItem("screenload",{text:e.$L("全屏"),onAction:function(){e.content=n.getContent(),e.transfer=!0,e.initTransfer()}}),n.on("Init",(function(t){e.spinShow=!1,e.editor=n,e.editor.setContent(e.content),e.readOnly?e.editor.setMode("readonly"):e.editor.setMode("design"),e.$emit("editorInit",e.editor)})),n.on("KeyUp",(function(t){null!==e.editor&&e.submitNewContent()})),n.on("KeyDown",(function(t){(t.metaKey||t.ctrlKey)&&83===t.keyCode&&(t.preventDefault(),e.$emit("editorSave",t))})),n.on("Change",(function(t){null!==e.editor&&(e.getContent()!==e.value&&e.submitNewContent(),e.$emit("editorChange",t))})),n.on("focus",(function(){e.$emit("on-focus")})),n.on("blur",(function(){e.$emit("on-blur")})))}};return this.autoSize&&n.plugins.push("autoresize"),this.minHeight>0&&(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('<img src="'+t+'">')},editorImage:function(t){for(var e=0;e<t.length;e++){var n=t[e];"object"===s(n)&&"string"==typeof n.url&&this.insertImage(n.url)}},getValueImages:function(){var t=[],e=new RegExp("src=([\"'])([^'\"]*)\\1"),n=new RegExp('original-width="(\\d+)"'),r=new RegExp('original-height="(\\d+)"'),o=(this.getContent()+"").match(/<img.*?(?:>|\/>)/gi);if(o)for(var i=0;i<o.length;i++){var a=o[i].match(e),s=o[i].match(n),l=o[i].match(r);a&&t.push({src:a[2],width:s?s[1]:-1,height:l?l[1]:-1})}return t},handleProgress:function(t,e){void 0===e._uploadIng&&(e._uploadIng=!0,this.uploadIng++)},handleSuccess:function(t,e){this.uploadIng--,1===t.ret?this.insertContent('<a href="'.concat(t.data.url,'" target="_blank">').concat(t.data.name," (").concat($A.bytesToSize(1024*t.data.size),")</a>")):$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._self._c;return e("div",{staticClass:"teditor-wrapper"},[e("div",{staticClass:"teditor-box",class:[!t.inline&&t.spinShow?"teditor-loadstyle":"teditor-loadedstyle"]},[t.inline?[e("div",{ref:"myTextarea",attrs:{id:t.id},domProps:{innerHTML:t._s(t.spinShow?"":t.content)}}),t._v(" "),t.spinShow?e("Icon",{staticClass:"icon-loading icon-inline",attrs:{type:"ios-loading",size:18}}):t._e()]:[e("textarea",{ref:"myTextarea",attrs:{id:t.id}},[t._v(t._s(t.content))]),t._v(" "),t.spinShow?e("Spin",{attrs:{fix:""}},[e("Icon",{staticClass:"icon-loading",attrs:{type:"ios-loading",size:18}}),t._v(" "),e("div",[t._v(t._s(t.$L("加载组件中...")))])],1):t._e()],t._v(" "),e("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(" "),e("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?e("Spin",{attrs:{fix:""}},[e("Icon",{staticClass:"icon-loading",attrs:{type:"ios-loading"}}),t._v(" "),e("div",[t._v(t._s(t.$L("正在上传文件...")))])],1):t._e(),t._v(" "),e("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"}},[e("div",{attrs:{slot:"close"},slot:"close"},[e("Button",{attrs:{type:"primary",size:"small"}},[t._v(t._s(t.$L("完成")))])],1),t._v(" "),e("div",{staticClass:"teditor-transfer-body"},[e("textarea",{attrs:{id:"T_"+t.id}},[t._v(t._s(t.content))])]),t._v(" "),t.uploadIng>0?e("Spin",{attrs:{fix:""}},[e("Icon",{staticClass:"icon-loading",attrs:{type:"ios-loading"}}),t._v(" "),e("div",[t._v(t._s(t.$L("正在上传文件...")))])],1):t._e()],1)],1)}),[],!1,null,null,null).exports},60935:(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},maxHiddenSelect:{type:Boolean,default:!1},projectId:{type:Number,default:0},noProjectId:{type:Number,default:0},dialogId:{type:Number,default:0},showBot:{type:Boolean,default:!1}},data:function(){return{loadIng:0,selects:[],list:[],multipleCheck:!1,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),this.maxHiddenSelect&&t.length>=this.maxHiddenSelect&&this.$refs.select&&this.$refs.select.hideMenu(),this.calcMultipleSelect()}},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,this.calcMultipleSelect()),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,dialog_id:e.dialogId,bot:e.showBot?2:0},take:50}}).then((function(n){var r=n.data;e.list=r,e.calcMultipleSelect();var o=e.searchHistory.findIndex((function(e){return e.key==t})),i={key:t,data:r,time:$A.Time()};o>-1?e.searchHistory.splice(o,1,i):e.searchHistory.push(i)})).catch((function(t){var n=t.msg;e.list=[],e.calcMultipleSelect(),$A.messageWarning(n)})).finally((function(t){n||e.loadIng--})):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),this.calcMultipleSelect()},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.calcMultipleSelect(),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)},calcMultipleSelect:function(){var t=this;this.multipleMax&&this.list.length>0?(this.calcMultipleTime&&clearTimeout(this.calcMultipleTime),this.calcMultipleTime=setTimeout((function(e){var n=!0;t.$refs.select.selectOptions.some((function(e){var r=e.componentInstance;t.selects.includes(r.value)||(n=!1)})),t.multipleCheck=n}),10)):this.multipleCheck=!1},onMultipleChange:function(t){var e=this;if(t){var n=this.multipleMax-this.selects.length;this.$refs.select.selectOptions.some((function(t){var r=t.componentInstance;if(e.multipleMax&&n<=0)return e.$nextTick((function(t){$A.messageWarning("已超过最大选择数量"),e.multipleCheck=!1})),!0;e.selects.includes(r.value)||(r.select(),n--)}))}else this.selects=[]}}};const i=(0,n(51900).Z)(o,(function(){var t=this,e=t._self._c;return e("div",{class:["common-user",t.maxHiddenClass]},[e("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?e("div",{staticClass:"user-drop-prepend",attrs:{slot:"drop-prepend"},slot:"drop-prepend"},[e("div",{staticClass:"user-drop-text"},[t._v("\n "+t._s(t.$L("最多只能选择"+t.multipleMax+"个"))+"\n "),t.selects.length?e("em",[t._v("("+t._s(t.$L("已选".concat(t.selects.length,"个")))+")")]):t._e()]),t._v(" "),e("Checkbox",{staticClass:"user-drop-check",on:{"on-change":t.onMultipleChange},model:{value:t.multipleCheck,callback:function(e){t.multipleCheck=e},expression:"multipleCheck"}})],1):t._e(),t._v(" "),t._t("option-prepend"),t._v(" "),t._l(t.list,(function(n,r){return e("Option",{key:r,attrs:{value:n.userid,"key-value":n.email,label:n.nickname,avatar:n.userimg,disabled:t.isDisabled(n.userid)}},[e("div",{staticClass:"user-input-option"},[e("div",{staticClass:"user-input-avatar"},[e("EAvatar",{staticClass:"avatar",attrs:{src:n.userimg}})],1),t._v(" "),n.bot?e("div",{staticClass:"taskfont user-input-bot"},[t._v("")]):t._e(),t._v(" "),e("div",{staticClass:"user-input-nickname"},[t._v(t._s(n.nickname))]),t._v(" "),e("div",{staticClass:"user-input-userid"},[t._v("ID: "+t._s(n.userid))])])])}))],2),t._v(" "),t.loadIng>0?e("div",{staticClass:"common-user-loading"},[e("Loading")],1):t._e()],1)}),[],!1,null,null,null).exports},19492:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>Mt});var r=n(20629);const o={name:"ProjectArchived",data:function(){var t=this;return{loadIng:0,keys:{},keyIs:!1,columns:[{title:"ID",key:"id",width:80,render:function(t,e){var n=e.row;return t("TableAction",{props:{column:e.column,align:"left"}},[t("div",n.id)])}},{title:this.$L("项目名称"),key:"name",minWidth:200,render:function(t,e){return t("AutoTip",e.row.name)}},{title:this.$L("归档时间"),key:"archived_at",width:168},{title:this.$L("归档人员"),key:"archived_userid",minWidth:80,render:function(e,n){var r=n.row;return r.archived_userid?e("UserAvatar",{props:{userid:r.archived_userid,size:24,showName:!0}}):e("Tag",t.$L("系统自动"))}},{title:this.$L("负责人"),minWidth:80,render:function(t,e){return t("UserAvatar",{props:{showName:!0,size:22,userid:e.row.owner_userid}})}},{title:this.$L("操作"),align:"center",width:100,render:function(e,n){var r=[e("Poptip",{props:{title:t.$L("你确定要还原归档吗?"),confirm:!0,transfer:!0,placement:"left"},style:{fontSize:"13px",cursor:"pointer",color:"#84C56A"},on:{"on-ok":function(){t.recovery(n.row)}}},t.$L("还原")),e("Poptip",{props:{title:t.$L("你确定要删除项目吗?"),confirm:!0,transfer:!0,placement:"left"},style:{marginLeft:"8px",fontSize:"13px",cursor:"pointer",color:"#f00"},on:{"on-ok":function(){t.delete(n.row)}}},t.$L("删除"))];return e("TableAction",{props:{column:n.column}},r)}}],list:[],page:1,pageSize:20,total:0,noText:""}},mounted:function(){this.getLists()},watch:{keyIs:function(t){t||(this.keys={},this.setPage(1))}},methods:{onSearch:function(){this.page=1,this.getLists()},getLists:function(){var t=this;this.loadIng++,this.keyIs=""!=$A.objImplode(this.keys),this.$store.dispatch("call",{url:"project/lists",data:{keys:this.keys,archived:"yes",page:Math.max(this.page,1),pagesize:Math.max($A.runNum(this.pageSize),10)}}).then((function(e){var n=e.data;t.page=n.current_page,t.total=n.total,t.list=n.data,t.noText="没有相关的数据"})).catch((function(){t.noText="数据加载失败"})).finally((function(e){t.loadIng--}))},setPage:function(t){this.page=t,this.getLists()},setPageSize:function(t){this.page=1,this.pageSize=t,this.getLists()},recovery:function(t){var e=this;this.list=this.list.filter((function(e){return e.id!=t.id})),this.loadIng++,this.$store.dispatch("call",{url:"project/archived",data:{project_id:t.id,type:"recovery"}}).then((function(){e.getLists(),e.$store.dispatch("getProjectOne",t.id).catch((function(){}))})).catch((function(t){var n=t.msg;$A.modalError(n),e.getLists()})).finally((function(t){e.loadIng--}))},delete:function(t){var e=this;this.list=this.list.filter((function(e){return e.id!=t.id})),this.loadIng++,this.$store.dispatch("removeProject",t.id).then((function(t){var n=t.msg;$A.messageSuccess(n),e.getLists()})).catch((function(t){var n=t.msg;$A.modalError(n),e.getLists()})).finally((function(t){e.loadIng--}))}}};var i=n(51900);const a=(0,i.Z)(o,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"project-archived"},[e("div",{staticClass:"archived-title"},[t._v("\n "+t._s(t.$L("归档的项目"))+"\n "),e("div",{staticClass:"title-icon"},[t.loadIng>0?e("Loading"):t._e()],1)]),t._v(" "),e("div",{staticClass:"search-container lr"},[e("ul",[e("li",[e("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("项目名"))+"\n ")]),t._v(" "),e("div",{staticClass:"search-content"},[e("Input",{attrs:{clearable:""},model:{value:t.keys.name,callback:function(e){t.$set(t.keys,"name",e)},expression:"keys.name"}})],1)]),t._v(" "),e("li",{staticClass:"search-button"},[e("Tooltip",{attrs:{theme:"light",placement:"right","transfer-class-name":"search-button-clear",transfer:""}},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary",icon:"ios-search"},on:{click:t.onSearch}},[t._v(t._s(t.$L("搜索")))]),t._v(" "),e("div",{attrs:{slot:"content"},slot:"content"},[t.keyIs?e("Button",{attrs:{type:"text"},on:{click:function(e){t.keyIs=!1}}},[t._v(t._s(t.$L("取消筛选")))]):e("Button",{attrs:{loading:t.loadIng>0,type:"text"},on:{click:t.getLists}},[t._v(t._s(t.$L("刷新")))])],1)],1)],1)])]),t._v(" "),e("div",{staticClass:"table-page-box"},[e("Table",{attrs:{columns:t.columns,data:t.list,loading:t.loadIng>0,"no-data-text":t.$L(t.noText),stripe:""}}),t._v(" "),e("Page",{attrs:{total:t.total,current:t.page,"page-size":t.pageSize,disabled:t.loadIng>0,simple:t.windowSmall,"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 s=n(97752);const l={name:"ProjectManagement",data:function(){var t=this;return{loadIng:0,keys:{},keyIs:!1,columns:[{title:"ID",key:"id",width:80,render:function(t,e){var n=e.row;return t("TableAction",{props:{column:e.column,align:"left"}},[t("div",n.id)])}},{title:this.$L("项目名称"),key:"name",minWidth:100,render:function(e,n){var r=n.row,o=[e("AutoTip",r.name)];return r.archived_at&&o.push(e("Tag",{props:{color:"error"}},t.$L("已归档"))),e("div",{class:"project-name"},o)}},{title:this.$L("项目进度"),minWidth:100,render:function(t,e){var n=e.row,r=[t("AutoTip",n.task_complete+"/"+n.task_num),t("Progress",{props:{percent:n.task_percent,strokeWidth:5}})];return t("div",{class:"project-percent"},r)}},{title:this.$L("负责人"),minWidth:80,render:function(t,e){return t("UserAvatar",{props:{showName:!0,size:22,userid:e.row.owner_userid}})}},{title:this.$L("创建人"),minWidth:80,render:function(t,e){return t("UserAvatar",{props:{showName:!0,size:22,userid:e.row.userid}})}},{title:this.$L("创建时间"),key:"created_at",width:168}],list:[],page:1,pageSize:20,total:0,noText:""}},mounted:function(){this.getLists()},watch:{keyIs:function(t){t||(this.keys={},this.setPage(1))}},methods:{onSearch:function(){this.page=1,this.getLists()},getLists:function(){var t=this,e="team";"all"==this.keys.type?e="all":"personal"==this.keys.type&&(e="personal");var n="no";"all"==this.keys.status?n="all":"archived"==this.keys.status&&(n="yes"),this.loadIng++,this.keyIs=""!=$A.objImplode(this.keys),this.$store.dispatch("call",{url:"project/lists",data:{keys:this.keys,all:1,archived:n,type:e,page:Math.max(this.page,1),pagesize:Math.max($A.runNum(this.pageSize),10)}}).then((function(e){var n=e.data;t.page=n.current_page,t.total=n.total,t.list=n.data,t.noText="没有相关的数据"})).catch((function(){t.noText="数据加载失败"})).finally((function(e){t.loadIng--}))},setPage:function(t){this.page=t,this.getLists()},setPageSize:function(t){this.page=1,this.pageSize=t,this.getLists()}}};const u=(0,i.Z)(l,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"project-management"},[e("div",{staticClass:"management-title"},[t._v("\n "+t._s(t.$L("所有项目"))+"\n "),e("div",{staticClass:"title-icon"},[t.loadIng>0?e("Loading"):t._e()],1)]),t._v(" "),e("div",{staticClass:"search-container lr"},[e("ul",[e("li",[e("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("项目名"))+"\n ")]),t._v(" "),e("div",{staticClass:"search-content"},[e("Input",{attrs:{clearable:""},model:{value:t.keys.name,callback:function(e){t.$set(t.keys,"name",e)},expression:"keys.name"}})],1)]),t._v(" "),e("li",[e("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("项目类型"))+"\n ")]),t._v(" "),e("div",{staticClass:"search-content"},[e("Select",{attrs:{placeholder:t.$L("团队项目")},model:{value:t.keys.type,callback:function(e){t.$set(t.keys,"type",e)},expression:"keys.type"}},[e("Option",{attrs:{value:""}},[t._v(t._s(t.$L("团队项目")))]),t._v(" "),e("Option",{attrs:{value:"personal"}},[t._v(t._s(t.$L("个人项目")))]),t._v(" "),e("Option",{attrs:{value:"all"}},[t._v(t._s(t.$L("全部项目")))])],1)],1)]),t._v(" "),e("li",[e("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("项目状态"))+"\n ")]),t._v(" "),e("div",{staticClass:"search-content"},[e("Select",{attrs:{placeholder:t.$L("未归档")},model:{value:t.keys.status,callback:function(e){t.$set(t.keys,"status",e)},expression:"keys.status"}},[e("Option",{attrs:{value:""}},[t._v(t._s(t.$L("未归档")))]),t._v(" "),e("Option",{attrs:{value:"archived"}},[t._v(t._s(t.$L("已归档")))]),t._v(" "),e("Option",{attrs:{value:"all"}},[t._v(t._s(t.$L("全部")))])],1)],1)]),t._v(" "),e("li",{staticClass:"search-button"},[e("Tooltip",{attrs:{theme:"light",placement:"right","transfer-class-name":"search-button-clear",transfer:""}},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary",icon:"ios-search"},on:{click:t.onSearch}},[t._v(t._s(t.$L("搜索")))]),t._v(" "),e("div",{attrs:{slot:"content"},slot:"content"},[t.keyIs?e("Button",{attrs:{type:"text"},on:{click:function(e){t.keyIs=!1}}},[t._v(t._s(t.$L("取消筛选")))]):e("Button",{attrs:{loading:t.loadIng>0,type:"text"},on:{click:t.getLists}},[t._v(t._s(t.$L("刷新")))])],1)],1)],1)])]),t._v(" "),e("div",{staticClass:"table-page-box"},[e("Table",{attrs:{columns:t.columns,data:t.list,loading:t.loadIng>0,"no-data-text":t.$L(t.noText),stripe:""}}),t._v(" "),e("Page",{attrs:{total:t.total,current:t.page,"page-size":t.pageSize,disabled:t.loadIng>0,simple:t.windowSmall,"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 c=n(81034),d=n(80641);function f(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;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?f(Object(n),!0).forEach((function(e){p(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function p(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const m={name:"MobileTabbar",components:{NetworkException:n(65121).Z},data:function(){return{isMore:!1,navList:[{icon:"",name:"dashboard",label:"仪表盘"},{icon:"",name:"project",label:"项目"},{icon:"",name:"dialog",label:"消息"},{icon:"",name:"contacts",label:"通讯录"},{icon:"",name:"more",label:"更多"}],navMore:[[{icon:"",name:"calendar",label:"日历"},{icon:"",name:"file",label:"文件"},{icon:"",name:"setting",label:"设置"}],[{icon:"",name:"addProject",label:"创建项目"},{icon:"",name:"addTask",label:"添加任务"},{icon:"",name:"createMeeting",label:"新会议"},{icon:"",name:"joinMeeting",label:"加入会议"}]],scanLoginShow:!1,scanLoginLoad:!1,scanLoginCode:""}},created:function(){$A.isEEUiApp&&this.navMore[0].splice(2,0,{icon:"",name:"scan",label:"扫一扫"})},mounted:function(){},beforeDestroy:function(){},computed:h(h(h({},(0,r.rn)(["cacheDialogs"])),(0,r.Se)(["dashboardTask"])),{},{routeName:function(){return this.$route.name},msgUnreadMention:function(){var t=0,e=0;this.cacheDialogs.some((function(n){t+=$A.getDialogUnread(n,!1),e+=$A.getDialogMention(n)})),t>99&&(t="99+"),e>99&&(e="99+");var n=this.msgTodoTotal;return n?e?"@".concat(e,"·").concat(n):t?"".concat(t,"·").concat(n):n:t?e?"".concat(t,"·@").concat(e):String(t):""},msgAllUnread:function(){var t=0;return this.cacheDialogs.some((function(e){t+=$A.getDialogUnread(e,!1)})),t},msgTodoTotal:function(){var t=this.cacheDialogs.reduce((function(t,e){return t+(e.todo_num||0)}),0);return t>0?(t>99?t="99+":1===t&&(t=""),"".concat(this.$L("待办")).concat(t)):null},unreadAndOverdue:function(){return this.userId>0?this.msgAllUnread+this.dashboardTask.overdue_count:0},activeName:function(){return this.isMore||["manage-calendar","manage-file","manage-setting"].includes(this.routeName)?"more":"manage-dashboard"===this.routeName?"dashboard":"manage-project"!==this.routeName||/^\d+$/.test(this.$route.params.projectId)?"manage-messenger"===this.routeName?"contacts"===this.$route.params.dialogAction?"contacts":"dialog":"":"project"}}),watch:{windowActive:function(t){t||$A.eeuiAppSendMessage({action:"setBdageNotify",bdage:this.unreadAndOverdue})}},methods:{toggleRoute:function(t){var e;switch(this.$emit("on-click",t),"more"!=t&&(this.isMore=!1),t){case"more":return void(this.isMore=!this.isMore);case"scan":return void $A.eeuiAppScan(this.scanResult);case"addTask":case"addProject":return;case"createMeeting":d.Store.set("addMeeting",{type:"create",userids:[this.userId]});break;case"joinMeeting":d.Store.set("addMeeting",{type:"join"});break;case"project":e={name:"manage-project",params:{projectId:"all"}};break;case"dialog":e={name:"manage-messenger",params:{dialogAction:"dialog"}};break;case"contacts":e={name:"manage-messenger",params:{dialogAction:"contacts"}};break;default:e={name:"manage-"+t}}this.goForward(e)},scanResult:function(t){var e=(t+"").match(/^https*:\/\/(.*?)\/login\?qrcode=(.*?)$/);if(e)return this.scanLoginCode=e[2],void(this.scanLoginShow=!0);/^https*:\/\//i.test(t)&&$A.eeuiAppOpenPage({pageType:"app",pageTitle:" ",url:"web.js",params:{url:t,browser:!0,showProgress:!0}})},scanLoginSubmit:function(){var t=this;!0!==this.scanLoginLoad&&(this.scanLoginLoad=!0,this.$store.dispatch("call",{url:"users/login/qrcode",data:{type:"login",code:this.scanLoginCode}}).then((function(e){var n=e.msg;t.scanLoginShow=!1,$A.messageSuccess(n)})).catch((function(t){var e=t.msg;$A.messageError(e)})).finally((function(e){t.scanLoginLoad=!1})))}}};const g=(0,i.Z)(m,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"mobile-tabbar"},[t.windowSmall?e("NetworkException",{attrs:{type:"alert"}}):t._e(),t._v(" "),e("transition",{attrs:{name:"mobile-fade"}},[t.isMore?e("div",{staticClass:"more-mask",on:{click:function(e){return t.toggleRoute("more")}}}):t._e()]),t._v(" "),e("transition",{attrs:{name:"mobile-slide"}},[t.isMore?e("div",{staticClass:"more-box"},[e("div",{staticClass:"tabbar-more-title"},[t._v(t._s(t.$L("更多")))]),t._v(" "),t._l(t.navMore,(function(n){return e("ul",t._l(n,(function(n){return e("li",{class:{active:t.activeName===n.name},on:{click:function(e){return t.toggleRoute(n.name)}}},[e("div",{staticClass:"more-item"},[e("i",{staticClass:"taskfont",domProps:{innerHTML:t._s(n.icon)}}),t._v(" "),e("div",{staticClass:"tabbar-title"},[t._v(t._s(t.$L(n.label)))])])])})),0)}))],2):t._e()]),t._v(" "),e("ul",{staticClass:"tabbar-box"},t._l(t.navList,(function(n){return e("li",{class:{active:t.activeName===n.name},on:{click:function(e){return t.toggleRoute(n.name)}}},[e("i",{staticClass:"taskfont",domProps:{innerHTML:t._s(n.icon)}}),t._v(" "),e("div",{staticClass:"tabbar-title"},[t._v(t._s(t.$L(n.label)))]),t._v(" "),"dashboard"===n.name?[t.dashboardTask.overdue_count>0?e("Badge",{staticClass:"tabbar-badge",attrs:{type:"error","overflow-count":999,count:t.dashboardTask.overdue_count}}):t.dashboardTask.today_count>0?e("Badge",{staticClass:"tabbar-badge",attrs:{type:"info","overflow-count":999,count:t.dashboardTask.today_count}}):t.dashboardTask.all_count>0?e("Badge",{staticClass:"tabbar-badge",attrs:{type:"primary","overflow-count":999,count:t.dashboardTask.all_count}}):t._e()]:"dialog"===n.name?[e("Badge",{staticClass:"tabbar-badge",attrs:{"overflow-count":999,text:t.msgUnreadMention}})]:t._e()],2)})),0),t._v(" "),e("Modal",{attrs:{title:t.$L("扫码登录"),"mask-closable":!1},model:{value:t.scanLoginShow,callback:function(e){t.scanLoginShow=e},expression:"scanLoginShow"}},[e("div",{staticClass:"mobile-scan-login-box"},[e("div",{staticClass:"mobile-scan-login-title"},[t._v(t._s(t.$L("你好,扫码确认登录")))]),t._v(" "),e("div",{staticClass:"mobile-scan-login-subtitle"},[t._v("「"+t._s(t.$L("为确保帐号安全,请确认是本人操作"))+"」")])]),t._v(" "),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(e){t.scanLoginShow=!1}}},[t._v(t._s(t.$L("取消登录")))]),t._v(" "),e("Button",{attrs:{type:"primary",loading:t.scanLoginLoad},on:{click:t.scanLoginSubmit}},[t._v(t._s(t.$L("确认登录")))])],1)])],1)}),[],!1,null,null,null).exports;var v=n(69027),y=n(60935);function b(t){return b="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},b(t)}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;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_(Object(n),!0).forEach((function(e){k(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function k(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function C(){C=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function u(t,e,n,o){var i=e&&e.prototype instanceof f?e:f,a=Object.create(i.prototype),s=new E(o||[]);return r(a,"_invoke",{value:k(t,n,s)}),a}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var d={};function f(){}function h(){}function p(){}var m={};l(m,i,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(D([])));v&&v!==e&&n.call(v,i)&&(m=v);var y=p.prototype=f.prototype=Object.create(m);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function o(r,i,a,s){var l=c(t[r],t,i);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==b(d)&&n.call(d,"__await")?e.resolve(d.__await).then((function(t){o("next",t,a,s)}),(function(t){o("throw",t,a,s)})):e.resolve(d).then((function(t){u.value=t,a(u)}),(function(t){return o("throw",t,a,s)}))}s(l.arg)}var i;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}})}function k(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return L()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=x(a,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=c(t,e,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function x(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return d;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,d;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function D(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=p,r(y,"constructor",{value:p,configurable:!0}),r(p,"constructor",{value:h,configurable:!0}),h.displayName=l(p,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,l(t,s,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},_(w.prototype),l(w.prototype,a,(function(){return this})),t.AsyncIterator=w,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new w(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(y),l(y,s,"Generator"),l(y,i,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=D,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(s&&l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:D(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},t}function x(t,e,n,r,o,i,a){try{var s=t[i](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,o)}function S(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){x(i,r,o,a,s,"next",t)}function s(t){x(i,r,o,a,s,"throw",t)}a(void 0)}))}}const O={name:"TaskAdd",components:{UserInput:y.Z,TEditor:v.default},props:{value:{type:Boolean,default:!1}},data:function(){return{addData:{cascader:[],name:"",content:"",owner:[],add_assist:1,project_id:0,column_id:0,times:[],subtasks:[],p_level:0,p_name:"",p_color:""},cascaderShow:!1,cascaderData:[],cascaderValue:"",cascaderLoading:0,cascaderAlready:[],advanced:!1,subName:"",taskPlugins:["advlist autolink lists link image charmap print preview hr anchor pagebreak","searchreplace visualblocks visualchars code","insertdatetime media nonbreaking save table directionality","emoticons paste codesample","autoresize"],taskOptions:{statusbar:!1,menubar:!1,autoresize_bottom_margin:2,min_height:200,max_height:380,contextmenu:"bold italic underline forecolor backcolor | codesample | uploadImages imagePreview | preview screenload",valid_elements:"a[href|target=_blank],em,strong/b,div[align],span[style],a,br,p,img[src|alt|witdh|height],pre[class],code",toolbar:!1},taskOptionFull:{menubar:"file edit view",valid_elements:"a[href|target=_blank],em,strong/b,div[align],span[style],a,br,p,img[src|alt|witdh|height],pre[class],code",toolbar:"uploadImages | bold italic underline forecolor backcolor | codesample | preview screenload"},taskTimeOpen:!1,timeOptions:{shortcuts:$A.timeOptionShortcuts()},loadIng:0,isMounted:!1,beforeClose:[]}},mounted:function(){var t=this;return S(C().mark((function e(){return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.initCascaderData(),e.next=3,t.initProjectData();case 3:t.$nextTick((function(){return t.$refs.input.focus()})),t.isMounted=!0;case 5:case"end":return e.stop()}}),e)})))()},beforeDestroy:function(){this.beforeClose.some((function(t){"function"==typeof t&&t()})),this.beforeClose=[]},computed:w(w({},(0,r.rn)(["cacheProjects","projectId","cacheColumns","taskPriority"])),{},{taskDays:function(){var t=this.addData.times,e=$A.date2string(t,"Y-m-d H:i");if(e[0]&&e[1]){var n=Math.ceil(($A.Date(e[1],!0)-$A.Date(e[0],!0))/86400);if(n>0)return n}return 0},showAddAssist:function(){return!this.addData.owner.includes(this.userId)}}),watch:{"addData.project_id":function(t){t>0&&$A.IDBSave("cacheAddTaskProjectId",t)},"addData.column_id":function(t){t>0&&$A.IDBSave("cacheAddTaskColumnId",t);var e=this.addData.project_id;e&&t?this.$set(this.addData,"cascader",[e,t]):this.$set(this.addData,"cascader",[])}},methods:{initCascaderData:function(){var t=this,e=$A.cloneJSON(this.cacheProjects).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}));this.cascaderData=e.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;return S(C().mark((function e(){var n,r,o,i;return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$A.IDBInt("cacheAddTaskProjectId");case 2:if(n=e.sent,!(r=t.cacheProjects.find((function(e){return e.id==t.projectId}))||t.cacheProjects.find((function(t){return t.id==n}))||t.cacheProjects.find((function(t){return t.id>0})))){e.next=10;break}return e.next=7,$A.IDBInt("cacheAddTaskColumnId");case 7:o=e.sent,(i=t.cacheColumns.find((function(t){var e=t.project_id,n=t.id;return e==r.id&&n==o}))||t.cacheColumns.find((function(t){return t.project_id==r.id})))?(t.addData.project_id=i.project_id,t.addData.column_id=i.id):t.$store.dispatch("getColumns",r.id).then((function(){(i=t.cacheColumns.find((function(t){var e=t.project_id,n=t.id;return e==r.id&&n==o}))||t.cacheColumns.find((function(t){return t.project_id==r.id})))&&(t.addData.project_id=i.project_id,t.addData.column_id=i.id)})).catch((function(){}));case 10:t.taskPriority.length>0&&t.choosePriority(t.taskPriority[0]);case 11:case"end":return e.stop()}}),e)})))()},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")])},taskTimeOpenChange:function(t){this.taskTimeOpen=t},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)},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,"project_id",t[0]),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){var e=this;if(!this.isMounted)return this.__setData&&clearTimeout(this.__setData),void(this.__setData=setTimeout((function(n){return e.setData(t)}),10));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 E=(0,i.Z)(O,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"task-add"},[e("div",{staticClass:"head",class:{empty:0==t.addData.cascader.length,visible:t.cascaderShow}},[e("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(" "),e("div",{staticClass:"task-add-form"},[e("div",{staticClass:"title"},[e("Input",{ref:"input",attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:8},maxlength:255,placeholder:t.$L("任务描述"),enterkeyhint:"done"},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(" "),e("div",{staticClass:"desc"},[e("TEditor",{attrs:{plugins:t.taskPlugins,options:t.taskOptions,"option-full":t.taskOptionFull,placeholder:t.$L(t.windowLarge?"详细描述,选填...(点击右键使用工具栏)":"详细描述,选填..."),placeholderFull:t.$L("详细描述..."),inline:""},model:{value:t.addData.content,callback:function(e){t.$set(t.addData,"content",e)},expression:"addData.content"}})],1),t._v(" "),e("div",{staticClass:"advanced-option"},[e("Button",{class:{advanced:t.advanced},on:{click:function(e){t.advanced=!t.advanced}}},[t._v(t._s(t.$L("高级选项")))]),t._v(" "),e("ul",{staticClass:"advanced-priority"},t._l(t.taskPriority,(function(n,r){return e("li",{key:r},[e("ETooltip",{attrs:{disabled:t.windowSmall||t.$isEEUiApp,content:t.taskPriorityContent(n)}},[e("i",{staticClass:"taskfont",style:{color:n.color},domProps:{innerHTML:t._s(t.addData.p_name==n.name?"":"")},on:{click:function(e){return t.choosePriority(n)}}})])],1)})),0),t._v(" "),t.taskDays>0?e("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"}},[e("div",{staticClass:"advanced-time",on:{click:function(e){return t.taskTimeOpenChange(!t.taskTimeOpen)}}},[e("Icon",{attrs:{type:"ios-clock-outline"}}),t._v(" "),e("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?e("Form",{staticClass:"task-add-advanced",attrs:{"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{label:t.$L("计划时间")}},[e("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(" "),e("FormItem",{attrs:{label:t.$L("任务负责人")}},[e("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?e("div",{staticClass:"task-add-assist"},[e("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(" "),e("ETooltip",{attrs:{disabled:t.windowSmall||t.$isEEUiApp,content:t.$L("你不是任务负责人时建议加入任务协助人员列表")}},[e("Icon",{attrs:{type:"ios-alert-outline"}})],1)],1):t._e()],1),t._v(" "),e("div",{staticClass:"subtasks"},[t.addData.subtasks.length>0?e("div",{staticClass:"sublist"},[e("Row",[e("Col",{attrs:{span:"12"}},[t._v(t._s(t.$L("任务描述")))]),t._v(" "),e("Col",{attrs:{span:"6"}},[t._v(t._s(t.$L("计划时间")))]),t._v(" "),e("Col",{attrs:{span:"6"}},[t._v(t._s(t.$L("负责人")))])],1),t._v(" "),t._l(t.addData.subtasks,(function(n,r){return e("Row",{key:r},[e("Col",{attrs:{span:"12"}},[e("Input",{attrs:{maxlength:255,clearable:""},on:{"on-clear":function(e){return t.addData.subtasks.splice(r,1)}},model:{value:n.name,callback:function(e){t.$set(n,"name",e)},expression:"item.name"}})],1),t._v(" "),e("Col",{attrs:{span:"6"}},[e("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(n.times)}},model:{value:n.times,callback:function(e){t.$set(n,"times",e)},expression:"item.times"}})],1),t._v(" "),e("Col",{attrs:{span:"6"}},[e("UserInput",{attrs:{"multiple-max":1,placeholder:t.$L("选择负责人"),"project-id":t.addData.project_id,transfer:!1,"max-hidden-select":""},model:{value:n.owner,callback:function(e){t.$set(n,"owner",e)},expression:"item.owner"}})],1)],1)}))],2):t._e(),t._v(" "),e("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(" "),e("div",{staticClass:"ivu-modal-footer"},[e("div",{staticClass:"adaption"},[e("Button",{attrs:{type:"default"},on:{click:t.close}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("ButtonGroup",{staticClass:"page-manage-add-task-button-group"},[e("Button",{attrs:{type:"primary",loading:t.loadIng>0},on:{click:t.onAdd}},[t._v(t._s(t.$L("添加任务")))]),t._v(" "),e("Dropdown",{on:{"on-click":function(e){return t.onAdd(!0)}}},[e("Button",{attrs:{type:"primary"}},[e("Icon",{attrs:{type:"ios-arrow-down"}})],1),t._v(" "),e("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[e("DropdownItem",{attrs:{disabled:t.loadIng>0}},[t._v(t._s(t.$L("提交继续添加")))])],1)],1)],1)],1)])],1)}),[],!1,null,null,null).exports;var D=n(25943);const L={name:"ReportMy",data:function(){var t=this;return{loadIng:0,columns:[{title:this.$L("名称"),key:"title",minWidth:120},{title:this.$L("类型"),key:"type",align:"center",width:90},{title:this.$L("汇报时间"),key:"created_at",align:"center",width:180},{title:this.$L("汇报对象"),key:"receives",align:"center",width:90,render:function(t,e){var n=e.row;if(0===n.receives.length)return t("div","-");var r=[];return n.receives.length<=2?n.receives.some((function(e){r.push(t("UserAvatar",{props:{size:22,userid:e}}))})):(r.push(t("UserAvatar",{props:{size:22,userid:n.receives[0]}})),r.push(t("div",{class:"more-avatar"},"+".concat(n.receives.length-1)))),t("div",{class:"report-table-avatar"},r)}},{title:this.$L("操作"),align:"center",width:100,minWidth:100,render:function(e,n){var r=n.column,o=n.row;return o.id?e("TableAction",{props:{column:r,menu:[{icon:"md-create",action:"edit"},{icon:"md-eye",action:"view"}]},on:{action:function(e){"edit"===e?t.$emit("on-edit",o.id):"view"===e&&t.$emit("on-view",o)}}}):null}}],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()},watch:{keyIs:function(t){t||(this.keys={},this.setPage(1))}},methods:{onSearch:function(){this.listPage=1,this.getLists()},getLists:function(){var t=this;this.loadIng++,this.keyIs=""!=$A.objImplode(this.keys),this.$store.dispatch("call",{url:"report/my",data:{keys:this.keys,page:Math.max(this.listPage,1),pagesize:Math.max($A.runNum(this.listPageSize),10)}}).then((function(e){var n=e.data;t.lists=n.data,t.listTotal=n.total,t.noDataText="没有相关的数据"})).catch((function(e){var n=e.msg;$A.messageError(n),t.noDataText="数据加载失败"})).finally((function(){t.loadIng--}))},setPage:function(t){this.listPage=t,this.getLists()},setPageSize:function(t){Math.max($A.runNum(this.listPageSize),10)!==t&&(this.listPageSize=t,this.getLists())},addReport:function(){this.$emit("on-edit",0)}}};const A=(0,i.Z)(L,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"report-list-wrap"},[e("div",{staticClass:"search-expand"},[e("div",{staticClass:"search-container lr"},[e("ul",[e("li",[e("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("汇报类型"))+"\n ")]),t._v(" "),e("div",{staticClass:"search-content"},[e("Select",{attrs:{placeholder:t.$L("全部")},model:{value:t.keys.type,callback:function(e){t.$set(t.keys,"type",e)},expression:"keys.type"}},t._l(t.reportTypeList,(function(n){return e("Option",{key:n.value,attrs:{value:n.value}},[t._v(t._s(n.label))])})),1)],1)]),t._v(" "),e("li",[e("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("汇报时间"))+"\n ")]),t._v(" "),e("div",{staticClass:"search-content"},[e("DatePicker",{attrs:{type:"daterange","split-panels":"",placeholder:t.$L("请选择时间")},model:{value:t.keys.created_at,callback:function(e){t.$set(t.keys,"created_at",e)},expression:"keys.created_at"}})],1)]),t._v(" "),e("li",{staticClass:"search-button"},[e("Tooltip",{attrs:{theme:"light",placement:"right","transfer-class-name":"search-button-clear",transfer:""}},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary",icon:"ios-search"},on:{click:t.onSearch}},[t._v(t._s(t.$L("搜索")))]),t._v(" "),e("div",{attrs:{slot:"content"},slot:"content"},[t.keyIs?e("Button",{attrs:{type:"text"},on:{click:function(e){t.keyIs=!1}}},[t._v(t._s(t.$L("取消筛选")))]):e("Button",{attrs:{loading:t.loadIng>0,type:"text"},on:{click:t.getLists}},[t._v(t._s(t.$L("刷新")))])],1)],1)],1)])]),t._v(" "),e("div",{staticClass:"expand-button-group"},[e("Button",{attrs:{type:"primary",icon:"md-add"},on:{click:t.addReport}},[t._v(t._s(t.$L("新增报告")))])],1)]),t._v(" "),e("div",{staticClass:"table-page-box"},[e("Table",{attrs:{columns:t.columns,data:t.lists,loading:t.loadIng>0,"no-data-text":t.$L(t.noDataText),stripe:""}}),t._v(" "),e("Page",{attrs:{total:t.listTotal,current:t.listPage,"page-size":t.listPageSize,disabled:t.loadIng>0,simple:t.windowSmall,"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;const T={name:"ReportReceive",data:function(){var t=this;return{loadIng:0,columns:[{type:"selection",width:50,align:"right"},{title:this.$L("标题"),key:"title",sortable:!0,minWidth:120,render:function(e,n){var r=n.row,o=[],i=r.receives_user.find((function(e){return e.userid==t.userId}));return i&&0==i.pivot.read?o.push(e("Tag",{props:{color:"orange"}},t.$L("未读")),e("span",r.title)):o.push(e("span",r.title)),e("div",o)}},{title:this.$L("类型"),key:"type",sortable:!0,width:90},{title:this.$L("接收时间"),key:"receive_time",align:"center",sortable:!0,width:180},{title:this.$L("操作"),align:"center",width:90,minWidth:90,render:function(e,n){var r=n.column,o=n.row;return o.id?e("TableAction",{props:{column:r,menu:[{icon:"md-eye",action:"view"}]},on:{action:function(e){if("view"===e){t.$emit("on-view",o);var n=o.receives_user.find((function(e){return e.userid==t.userId}));n&&t.$set(n.pivot,"read",1)}}}}):null}}],lists:[],listPage:1,listTotal:0,listPageSize:20,noDataText:"数据加载中.....",keys:{},keyIs:!1,selectIds:[],selectAction:"",reportTypeList:[{value:"",label:this.$L("全部")},{value:"weekly",label:this.$L("周报")},{value:"daily",label:this.$L("日报")}]}},mounted:function(){this.getLists()},watch:{keyIs:function(t){t||(this.keys={},this.setPage(1))}},methods:{onSearch:function(){this.listPage=1,this.getLists()},getLists:function(){var t=this;this.loadIng++,this.keyIs=""!=$A.objImplode(this.keys),this.$store.dispatch("call",{url:"report/receive",data:{keys:this.keys,page:Math.max(this.listPage,1),pagesize:Math.max($A.runNum(this.listPageSize),10)}}).then((function(e){var n=e.data;t.lists=n.data,t.listTotal=n.total,t.noDataText="没有相关的数据"})).catch((function(e){var n=e.msg;$A.messageError(n),t.noDataText="数据加载失败"})).finally((function(){t.loadIng--}))},setPage:function(t){this.listPage=t,this.getLists()},setPageSize:function(t){Math.max($A.runNum(this.listPageSize),10)!==t&&(this.listPageSize=t,this.getLists())},selectChange:function(t){this.selectIds=t.map((function(t){return t.id}))},selectClick:function(){if(0!==this.selectIds.length)switch(this.selectAction){case"read":case"unread":this.readReport(this.selectIds,this.selectAction);break;default:$A.messageWarning("请选择执行方式")}else $A.messageWarning("请选择线路")},readReport:function(t,e){var n=this,r="read"===e?"标记已读":"标记未读";$A.modalConfirm({content:"你确定要【".concat(r,"】吗?"),cancelText:"取消",okText:"确定",loading:!0,onOk:function(){return new Promise((function(r,o){n.$store.dispatch("call",{url:"report/mark",data:{id:t,action:e}}).then((function(t){var e=t.msg;r(e),n.getLists(),n.$emit("on-read")})).catch((function(t){var e=t.msg;o(e)}))}))}})}}};const N=(0,i.Z)(T,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"report-list-wrap"},[e("div",{staticClass:"search-container lr"},[e("ul",[e("li",[e("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("关键词"))+"\n ")]),t._v(" "),e("div",{staticClass:"search-content"},[e("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(" "),e("li",[e("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("汇报类型"))+"\n ")]),t._v(" "),e("div",{staticClass:"search-content"},[e("Select",{attrs:{placeholder:t.$L("全部")},model:{value:t.keys.type,callback:function(e){t.$set(t.keys,"type",e)},expression:"keys.type"}},t._l(t.reportTypeList,(function(n){return e("Option",{key:n.value,attrs:{value:n.value}},[t._v(t._s(n.label))])})),1)],1)]),t._v(" "),e("li",[e("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("汇报时间"))+"\n ")]),t._v(" "),e("div",{staticClass:"search-content"},[e("DatePicker",{attrs:{type:"daterange","split-panels":"",placeholder:t.$L("请选择时间")},model:{value:t.keys.created_at,callback:function(e){t.$set(t.keys,"created_at",e)},expression:"keys.created_at"}})],1)]),t._v(" "),e("li",{staticClass:"search-button"},[e("Tooltip",{attrs:{theme:"light",placement:"right","transfer-class-name":"search-button-clear",transfer:""}},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary",icon:"ios-search"},on:{click:t.onSearch}},[t._v(t._s(t.$L("搜索")))]),t._v(" "),e("div",{attrs:{slot:"content"},slot:"content"},[t.keyIs?e("Button",{attrs:{type:"text"},on:{click:function(e){t.keyIs=!1}}},[t._v(t._s(t.$L("取消筛选")))]):e("Button",{attrs:{loading:t.loadIng>0,type:"text"},on:{click:t.getLists}},[t._v(t._s(t.$L("刷新")))])],1)],1)],1)])]),t._v(" "),e("div",{staticClass:"table-page-box"},[e("Table",{attrs:{columns:t.columns,data:t.lists,loading:t.loadIng>0,"no-data-text":t.$L(t.noDataText),stripe:""},on:{"on-selection-change":t.selectChange}}),t._v(" "),e("div",{staticClass:"table-attach"},[e("div",{staticClass:"select-box"},[e("Select",{attrs:{disabled:0==t.selectIds.length,placeholder:t.$L("请选择"),transfer:""},on:{"on-change":function(e){t.groupSelect=!0}},model:{value:t.selectAction,callback:function(e){t.selectAction=e},expression:"selectAction"}},[e("Option",{attrs:{value:"read"}},[t._v(t._s(t.$L("标记已读")))]),t._v(" "),e("Option",{attrs:{value:"unread"}},[t._v(t._s(t.$L("标记未读")))])],1),t._v(" "),e("Button",{attrs:{loading:t.loadIng>0,type:"primary",disabled:""==t.selectAction||0==t.selectIds.length},on:{click:t.selectClick}},[t._v(t._s(t.$L("执行")))])],1),t._v(" "),e("Page",{attrs:{total:t.listTotal,current:t.listPage,"page-size":t.listPageSize,disabled:t.loadIng>0,simple:t.windowSmall,"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)])}),[],!1,null,null,null).exports;var $=n(49483);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 P(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const j={name:"Report",components:{DrawerOverlay:c.Z,ReportEdit:D.Z,ReportMy:A,ReportReceive:N,ReportDetail:$.Z},props:{reportType:{default:"my"}},data:function(){return{reportTabs:"my",showDetailDrawer:!1,showEditDrawer:!1,detailData:{},reportId:0}},mounted:function(){var t=this;this.reportTabs=this.reportType,this.$isMainElectron&&(this.$Electron.removeMsgListener("reportSaveSuccess"),this.$Electron.registerMsgListener("reportSaveSuccess",(function(e){var n=e.data,r=e.msg;$A.messageSuccess(r),t.saveSuccess(n)})))},computed:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?I(Object(n),!0).forEach((function(e){P(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},(0,r.rn)(["reportUnreadNumber"])),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-detail-".concat(t.id),path:"/single/report/detail/".concat(t.id),force:!1,config:e})}else this.showDetailDrawer=!0},onRead:function(){this.$emit("on-read",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-edit-".concat(t),path:"/single/report/edit/".concat(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 M=(0,i.Z)(j,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"report"},[e("Tabs",{model:{value:t.reportTabs,callback:function(e){t.reportTabs=e},expression:"reportTabs"}},[e("TabPane",{attrs:{label:t.$L("我的汇报"),name:"my"}},["my"===t.reportTabs?e("ReportMy",{ref:"report",on:{"on-view":t.onView,"on-edit":t.onEditReport}}):t._e()],1),t._v(" "),e("TabPane",{attrs:{label:t.tabRebder(t.reportUnreadNumber),name:"receive"}},["receive"===t.reportTabs?e("ReportReceive",{on:{"on-view":t.onView,"on-read":t.onRead}}):t._e()],1)],1),t._v(" "),e("DrawerOverlay",{attrs:{placement:"right",size:950,transfer:""},model:{value:t.showDetailDrawer,callback:function(e){t.showDetailDrawer=e},expression:"showDetailDrawer"}},[t.showDetailDrawer?e("ReportDetail",{attrs:{data:t.detailData}}):t._e()],1),t._v(" "),e("DrawerOverlay",{attrs:{placement:"right",size:1e3,transfer:""},model:{value:t.showEditDrawer,callback:function(e){t.showEditDrawer=e},expression:"showEditDrawer"}},[t.showEditDrawer?e("ReportEdit",{attrs:{id:t.reportId},on:{saveSuccess:t.saveSuccess}}):t._e()],1)],1)}),[],!1,null,null,null).exports;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 B(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?R(Object(n),!0).forEach((function(e){q(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function q(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:"MobileBack",props:{showTabbar:{type:Boolean,default:!1}},data:function(){return{show:!1,x:0,y:0}},created:function(){this.appAndroidEvents()},mounted:function(){this.$refs.bar.addEventListener("touchmove",this.barListener),document.addEventListener("touchstart",this.touchstart),document.addEventListener("touchmove",this.touchmove),document.addEventListener("touchend",this.touchend)},beforeDestroy:function(){this.$refs.bar.removeEventListener("touchmove",this.barListener),document.removeEventListener("touchstart",this.touchstart),document.removeEventListener("touchmove",this.touchmove),document.removeEventListener("touchend",this.touchend)},computed:B(B({},(0,r.rn)(["fileLists"])),{},{style:function(){var t=Math.max(135,this.y)+this.windowScrollY,e=this.windowHeight-135;return{top:Math.min(t,e)+"px",left:this.x>20?0:"-50px"}},routeName:function(){return this.$route.name},fileFolderId:function(){var t=this.$route.params.folderId;return parseInt(/^\d+$/.test(t)?t:0)}}),watch:{show:function(t){t?document.body.classList.add("touch-back"):document.body.classList.remove("touch-back"),this.$store.state.touchBackInProgress=t}},methods:{getXY:function(t){var e=t.touches[0];this.x=e.clientX,this.y=e.clientY},barListener:function(t){t.preventDefault()},touchstart:function(t){this.getXY(t),this.show=this.canBack()&&this.x<20},touchmove:function(t){this.show&&this.getXY(t)},touchend:function(){this.x>90&&this.show&&this.onBack(),this.x=0,this.show=!1},canBack:function(){return!this.showTabbar||(this.$Modal.visibles().length>0||this.fileFolderId>0)},onBack:function(){var t=this;if(!this.$Modal.removeLast())if(this.fileFolderId>0){var e=this.fileLists.find((function(e){var n=e.id,r=e.permission;return n==t.fileFolderId&&r>-1}));if(e){var n=this.fileLists.find((function(t){var n=t.id,r=t.permission;return n==e.pid&&r>-1}));if(n)return void this.goForward({name:"manage-file",params:{folderId:n.id,fileId:null}})}this.goForward({name:"manage-file"})}else this.goBack()},appAndroidEvents:function(){var t=this;this.$isEEUiApp&&$A.isAndroid()&&$A.eeuiAppSetPageBackPressed({pageName:"firstPage"},(function(e){t.canBack()?t.onBack():$A.eeuiAppGoDesktop()}))}}};const U=(0,i.Z)(F,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"mobile-back"},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.windowScrollY>0,expression:"windowScrollY > 0"}],ref:"bar",staticClass:"back-bar"}),t._v(" "),t.show?e("div",{staticClass:"back-semicircle",style:t.style}):t._e()])}),[],!1,null,null,null).exports;const z={name:"MobileNotification",data:function(){return{userid:0,title:"",desc:"",duration:6e3,callback:null,show:!1,timer:null,startY:0}},beforeDestroy:function(){this.timer&&clearTimeout(this.timer),this.show=!1},methods:{open:function(t){$A.isJson(t)&&(this.userid=t.userid||0,this.title=t.title||"",this.desc=t.desc||"",this.duration="number"==typeof t.duration?t.duration:6e3,this.callback="function"==typeof t.callback?t.callback:null,this.show=!0,this.timer&&clearTimeout(this.timer),this.duration>0&&(this.timer=setTimeout(this.close,this.duration)),$A.eeuiAppSendMessage({action:"setVibrate"}))},close:function(){this.show=!1},onClick:function(){this.close(),"function"==typeof this.callback&&this.callback()},onTouchstart:function(t){this.startY=t.touches[0].clientY},onTouchmove:function(t){this.startY>0&&this.startY-t.touches[0].clientY>10&&(this.startY=0,this.close())}}};const H=(0,i.Z)(z,(function(){var t=this,e=t._self._c;return t.show&&t.userid>0?e("transition",{attrs:{name:"mobile-notify"}},[e("div",{staticClass:"mobile-notification",class:{show:t.show},on:{click:function(e){return e.stopPropagation(),t.onClick.apply(null,arguments)},touchstart:t.onTouchstart,touchmove:t.onTouchmove}},[e("UserAvatar",{attrs:{userid:t.userid,size:40,"show-name":"","name-text":t.title}}),t._v(" "),e("div",{staticClass:"notification-desc"},[t._v(t._s(t.desc))])],1)]):t._e()}),[],!1,null,null,null).exports;function V(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function W(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?V(Object(n),!0).forEach((function(e){K(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):V(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function K(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const Y={name:"MeetingPlayer",props:{id:{type:String,default:function(){return"meeting-player-"+Math.round(1e4*Math.random())}},player:{type:Object,default:function(){return{}}},isLocal:{type:Boolean,default:!1}},data:function(){return{timer:null}},mounted:function(){var t=this;this.timer=setInterval((function(e){t.audio&&!t.player.audioTrack.isPlaying&&t.play("audio"),t.video&&!t.player.videoTrack.isPlaying&&t.play("video")}),3e3)},beforeDestroy:function(){clearInterval(this.timer)},computed:W(W({},(0,r.rn)(["cacheUserBasic"])),{},{userid:function(){return this.player.uid?parseInt($A.getMiddle(this.player.uid,null,"-")):0},playerStyle:function(){var t=this,e=this.cacheUserBasic.find((function(e){return e.userid==t.userid}));return e?{backgroundImage:'url("'.concat(e.userimg,'")')}:null},audio:function(){return!!this.player.audioTrack},video:function(){return!!this.player.videoTrack}}),watch:{audio:{handler:function(t){!this.isLocal&&t&&this.play("audio")},immediate:!0},video:{handler:function(t){t&&this.play("video")},immediate:!0}},methods:{play:function(t){var e=this;this.$nextTick((function(n){try{"audio"===t?e.player.audioTrack.play():"video"===t&&e.player.videoTrack.play(e.id)}catch(t){console.log("Meeting Player Error",t)}}))}}};const Z=(0,i.Z)(Y,(function(){var t=this,e=t._self._c;return t.userid?e("div",{staticClass:"meeting-player"},[e("div",{staticClass:"player",style:t.playerStyle,attrs:{id:t.id}}),t._v(" "),e("UserAvatar",{attrs:{userid:t.userid,size:36,borderWitdh:2}}),t._v(" "),e("div",{staticClass:"player-state"},[t.audio?t._e():e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),t.video?t._e():e("i",{staticClass:"taskfont"},[t._v("")])])],1):t._e()}),[],!1,null,null,null).exports;const G={name:"DragBallComponent",props:{id:{type:String,default:""},distanceRight:{type:Number,default:0},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.left=t.clientWidth-t.floatDrag.offsetWidth-t.distanceRight,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.$nextTick(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)}}};function X(){X=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function u(t,e,n,o){var i=e&&e.prototype instanceof f?e:f,a=Object.create(i.prototype),s=new S(o||[]);return r(a,"_invoke",{value:w(t,n,s)}),a}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var d={};function f(){}function h(){}function p(){}var m={};l(m,i,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(O([])));v&&v!==e&&n.call(v,i)&&(m=v);var y=p.prototype=f.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function o(r,i,a,s){var l=c(t[r],t,i);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==tt(d)&&n.call(d,"__await")?e.resolve(d.__await).then((function(t){o("next",t,a,s)}),(function(t){o("throw",t,a,s)})):e.resolve(d).then((function(t){u.value=t,a(u)}),(function(t){return o("throw",t,a,s)}))}s(l.arg)}var i;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return E()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=k(a,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=c(t,e,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function k(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,k(t,e),"throw"===e.method))return d;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,d;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:E}}function E(){return{value:void 0,done:!0}}return h.prototype=p,r(y,"constructor",{value:p,configurable:!0}),r(p,"constructor",{value:h,configurable:!0}),h.displayName=l(p,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,l(t,s,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},b(_.prototype),l(_.prototype,a,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new _(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(y),l(y,s,"Generator"),l(y,i,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=O,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(s&&l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},t}function Q(t,e,n,r,o,i,a){try{var s=t[i](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,o)}function J(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Q(i,r,o,a,s,"next",t)}function s(t){Q(i,r,o,a,s,"throw",t)}a(void 0)}))}}function tt(t){return tt="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},tt(t)}const et={name:"MeetingManager",components:{DragBallComponent:(0,i.Z)(G,(function(){var t=this;return(0,t._self._c)("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,MeetingPlayer:Z,UserInput:y.Z},data:function(){return{loadIng:0,subscribe:null,addShow:!1,addData:{userids:[],tracks:["audio"]},invitationShow:!1,invitationLoad:!1,invitationData:{userids:[]},meetingShow:!1,meetingMini:!1,audioLoad:!1,videoLoad:!1,agoraClient:null,remoteUsers:[],localUser:{uid:null,audioTrack:null,videoTrack:null}}},mounted:function(){this.subscribe=d.Store.subscribe("addMeeting",this.onAdd)},beforeDestroy:function(){this.subscribe&&(this.subscribe.unsubscribe(),this.subscribe=null)},watch:{meetingShow:function(t){t?$A.eeuiAppKeepScreenOn():$A.eeuiAppKeepScreenOff()}},methods:{onAdd:function(t){var e=this;t=$A.isJson(t)?t:{},/^\d+$/.test(t.dialog_id)&&(this.loadIng++,this.$store.dispatch("call",{url:"dialog/user",data:{dialog_id:t.dialog_id}}).then((function(t){var n=t.data;e.$set(e.addData,"userids",n.map((function(t){return t.userid})))})).finally((function(t){e.loadIng--})),delete t.dialog_id),$A.isArray(t.userids)?t.userids.includes(this.userId)||t.userids.push(this.userId):t.userids=[this.userId],$A.isArray(t.tracks)?t.tracks.includes("audio")||t.tracks.push("audio"):t.tracks=["audio"],this.addData=t,this.addShow=!0},onSubmit:function(){var t=this;this.$refs.addForm.validate((function(e){e&&(t.loadIng++,t.$store.dispatch("call",{url:"users/meeting/open",data:t.addData}).then((function(e){var n=e.data;t.$set(t.addData,"name",n.name),t.$set(t.addData,"meetingid",n.meetingid),t.$store.dispatch("saveDialogMsg",n.msgs),t.$store.dispatch("updateDialogLastMsg",n.msgs),delete n.name,delete n.msgs,$A.loadScript("js/AgoraRTC_N-4.14.2.js",(function(e){null!==e||"object"!==("undefined"==typeof AgoraRTC?"undefined":tt(AgoraRTC))?$A.modalError("会议组件加载失败!"):t.join(n),t.loadIng--}))})).catch((function(e){var n=e.msg;t.loadIng--,$A.modalError(n)})))}))},onAudio:function(){this.localUser.audioTrack?this.closeAudio():this.openAudio()},onVideo:function(){this.localUser.videoTrack?this.closeVideo():this.openVideo()},onInvitation:function(t){var e=this;"open"===t?(this.invitationData={userids:[],meetingid:this.addData.meetingid},this.invitationShow=!0):"submit"===t&&(this.invitationLoad=!0,this.$store.dispatch("call",{url:"users/meeting/invitation",data:this.invitationData}).then((function(t){var n=t.data,r=t.msg;e.invitationShow=!1,e.$store.dispatch("saveDialogMsg",n.msgs),e.$store.dispatch("updateDialogLastMsg",n.msgs),$A.messageSuccess(r)})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(t){e.invitationLoad=!1})))},onClose:function(){var t=this;return new Promise((function(e){var n;$A.modalConfirm({content:"确定要离开会议吗?",cancelText:"继续",okText:"退出",onOk:(n=J(X().mark((function n(r){return X().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t.leave();case 2:e();case 3:case"end":return n.stop()}}),n)}))),function(t){return n.apply(this,arguments)})})}))},join:function(t){var e=this;return J(X().mark((function n(){var r;return X().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e.loadIng++,AgoraRTC.onMicrophoneChanged=function(){var t=J(X().mark((function t(n){var r;return X().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("ACTIVE"!==n.state){t.next=4;break}e.localUser.audioTrack.setDevice(n.device.deviceId),t.next=9;break;case 4:if(n.device.label!==e.localUser.audioTrack.getTrackLabel()){t.next=9;break}return t.next=7,AgoraRTC.getMicrophones();case 7:(r=t.sent)[0]&&e.localUser.audioTrack.setDevice(r[0].deviceId);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),AgoraRTC.onCameraChanged=function(){var t=J(X().mark((function t(n){var r;return X().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("ACTIVE"!==n.state){t.next=4;break}e.localUser.videoTrack.setDevice(n.device.deviceId),t.next=9;break;case 4:if(n.device.label!==e.localUser.videoTrack.getTrackLabel()){t.next=9;break}return t.next=7,AgoraRTC.getCameras();case 7:(r=t.sent)[0]&&e.localUser.videoTrack.setDevice(r[0].deviceId);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),AgoraRTC.onAutoplayFailed=function(){},e.agoraClient=AgoraRTC.createClient({mode:"rtc",codec:"vp8"}),e.agoraClient.on("user-joined",e.handleUserJoined),e.agoraClient.on("user-left",e.handleUserLeft),e.agoraClient.on("user-published",e.handleUserPublished),e.agoraClient.on("user-unpublished",e.handleUserUnpublished),r=[],n.next=12,e.agoraClient.join(t.appid,t.channel,t.token,t.uid);case 12:if(e.localUser.uid=n.sent,!e.addData.tracks.includes("audio")){n.next=19;break}return n.t0=r,n.next=17,AgoraRTC.createMicrophoneAudioTrack();case 17:n.t1=e.localUser.audioTrack=n.sent,n.t0.push.call(n.t0,n.t1);case 19:if(!e.addData.tracks.includes("video")){n.next=25;break}return n.t2=r,n.next=23,AgoraRTC.createCameraVideoTrack();case 23:n.t3=e.localUser.videoTrack=n.sent,n.t2.push.call(n.t2,n.t3);case 25:if(!(r.length>0)){n.next=28;break}return n.next=28,e.agoraClient.publish(r);case 28:e.loadIng--,e.addShow=!1,e.meetingShow=!0;case 31:case"end":return n.stop()}}),n)})))()},leave:function(){var t=this;return J(X().mark((function e(){return X().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.loadIng++,["audioTrack","videoTrack"].some((function(e){var n,r;null===(n=t.localUser[e])||void 0===n||n.stop(),null===(r=t.localUser[e])||void 0===r||r.close()})),t.localUser={uid:null,audioTrack:null,videoTrack:null},t.remoteUsers=[],e.next=6,t.agoraClient.leave();case 6:t.loadIng--,t.meetingShow=!1;case 8:case"end":return e.stop()}}),e)})))()},openAudio:function(){var t=this;return J(X().mark((function e(){return X().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.audioLoad&&!t.localUser.audioTrack){e.next=2;break}return e.abrupt("return");case 2:return t.audioLoad=!0,e.next=5,AgoraRTC.createMicrophoneAudioTrack();case 5:return t.localUser.audioTrack=e.sent,e.next=8,t.agoraClient.publish([t.localUser.audioTrack]);case 8:t.audioLoad=!1;case 9:case"end":return e.stop()}}),e)})))()},closeAudio:function(){var t=this;return J(X().mark((function e(){return X().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.audioLoad&&t.localUser.audioTrack){e.next=2;break}return e.abrupt("return");case 2:return t.audioLoad=!0,e.next=5,t.agoraClient.unpublish([t.localUser.audioTrack]);case 5:t.localUser.audioTrack.stop(),t.localUser.audioTrack.close(),t.localUser.audioTrack=null,t.audioLoad=!1;case 9:case"end":return e.stop()}}),e)})))()},openVideo:function(){var t=this;return J(X().mark((function e(){return X().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.videoLoad&&!t.localUser.videoTrack){e.next=2;break}return e.abrupt("return");case 2:return t.videoLoad=!0,e.next=5,AgoraRTC.createCameraVideoTrack();case 5:return t.localUser.videoTrack=e.sent,e.next=8,t.agoraClient.publish([t.localUser.videoTrack]);case 8:t.videoLoad=!1;case 9:case"end":return e.stop()}}),e)})))()},closeVideo:function(){var t=this;return J(X().mark((function e(){return X().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.videoLoad&&t.localUser.videoTrack){e.next=2;break}return e.abrupt("return");case 2:return t.videoLoad=!0,e.next=5,t.agoraClient.unpublish([t.localUser.videoTrack]);case 5:t.localUser.videoTrack.stop(),t.localUser.videoTrack.close(),t.localUser.videoTrack=null,t.videoLoad=!1;case 9:case"end":return e.stop()}}),e)})))()},handleUserJoined:function(t){var e=this;return J(X().mark((function n(){var r;return X().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:(r=e.remoteUsers.findIndex((function(e){return e.uid==t.uid})))>-1?e.remoteUsers.splice(r,1,t):e.remoteUsers.push(t);case 2:case"end":return n.stop()}}),n)})))()},handleUserLeft:function(t){var e=this;return J(X().mark((function n(){var r;return X().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:(r=e.remoteUsers.findIndex((function(e){return e.uid==t.uid})))>-1&&e.remoteUsers.splice(r,1);case 2:case"end":return n.stop()}}),n)})))()},handleUserPublished:function(t,e){var n=this;return J(X().mark((function r(){return X().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!n.remoteUsers.find((function(e){return e.uid==t.uid}))){r.next=4;break}return r.next=4,n.agoraClient.subscribe(t,e);case 4:case"end":return r.stop()}}),r)})))()},handleUserUnpublished:function(t,e){var n=this;return J(X().mark((function r(){return X().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!n.remoteUsers.find((function(e){return e.uid==t.uid}))){r.next=4;break}return r.next=4,n.agoraClient.unsubscribe(t,e);case 4:case"end":return r.stop()}}),r)})))()}}},nt=et;const rt=(0,i.Z)(nt,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"meeting-warp"},[e("Modal",{attrs:{title:t.$L("join"===t.addData.type?"加入会议":"新会议"),"mask-closable":!1},model:{value:t.addShow,callback:function(e){t.addShow=e},expression:"addShow"}},[e("Form",{ref:"addForm",attrs:{model:t.addData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},["join"===t.addData.type?[t.addData.name?e("FormItem",{attrs:{prop:"userids",label:t.$L("会议主题")}},[e("Input",{attrs:{disabled:""},model:{value:t.addData.name,callback:function(e){t.$set(t.addData,"name",e)},expression:"addData.name"}})],1):t._e(),t._v(" "),e("FormItem",{attrs:{prop:"meetingid",label:t.$L("会议频道ID")}},[e("Input",{attrs:{disabled:!0===t.addData.meetingdisabled,placeholder:t.$L("请输入会议频道ID")},model:{value:t.addData.meetingid,callback:function(e){t.$set(t.addData,"meetingid",e)},expression:"addData.meetingid"}})],1)]:[e("FormItem",{attrs:{prop:"name",label:t.$L("会议主题")}},[e("Input",{attrs:{maxlength:50,placeholder:t.$L("选填")},model:{value:t.addData.name,callback:function(e){t.$set(t.addData,"name",e)},expression:"addData.name"}})],1),t._v(" "),e("FormItem",{attrs:{prop:"userids",label:t.$L("邀请成员")}},[e("UserInput",{attrs:{uncancelable:[t.userId],"multiple-max":20,placeholder:t.$L("选择邀请成员")},model:{value:t.addData.userids,callback:function(e){t.$set(t.addData,"userids",e)},expression:"addData.userids"}})],1)],t._v(" "),e("FormItem",{attrs:{prop:"tracks"}},[e("CheckboxGroup",{model:{value:t.addData.tracks,callback:function(e){t.$set(t.addData,"tracks",e)},expression:"addData.tracks"}},[e("Checkbox",{attrs:{label:"audio"}},[e("span",[t._v(t._s(t.$L("麦克风")))])]),t._v(" "),e("Checkbox",{attrs:{label:"video"}},[e("span",[t._v(t._s(t.$L("摄像头")))])])],1)],1)],2),t._v(" "),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(e){t.addShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Button",{attrs:{type:"primary",loading:t.loadIng>0},on:{click:t.onSubmit}},[t._v(t._s(t.$L("join"===t.addData.type?"加入会议":"开始会议")))])],1)],1),t._v(" "),e("Modal",{attrs:{title:t.addData.name,mask:!1,"mask-closable":!1,closable:!1,"transition-names":["",""],beforeClose:t.onClose,"class-name":"meeting-manager".concat(t.meetingMini?" meeting-hidden":""),fullscreen:""},model:{value:t.meetingShow,callback:function(e){t.meetingShow=e},expression:"meetingShow"}},[e("ul",[t.localUser.uid?e("li",[e("MeetingPlayer",{attrs:{player:t.localUser,isLocal:""}})],1):t._e(),t._l(t.remoteUsers,(function(t){return e("li",[e("MeetingPlayer",{attrs:{player:t}})],1)}))],2),t._v(" "),e("div",{staticClass:"adaption meeting-button-group",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"primary",loading:t.audioLoad},on:{click:t.onAudio}},[e("i",{staticClass:"taskfont",domProps:{innerHTML:t._s(t.localUser.audioTrack?"":"")}})]),t._v(" "),e("Button",{attrs:{type:"primary",loading:t.videoLoad},on:{click:t.onVideo}},[e("i",{staticClass:"taskfont",domProps:{innerHTML:t._s(t.localUser.videoTrack?"":"")}})]),t._v(" "),t.windowSmall?[e("Button",{attrs:{type:"primary"},on:{click:function(e){return t.onInvitation("open")}}},[e("i",{staticClass:"taskfont"},[t._v("")])]),t._v(" "),e("Button",{attrs:{type:"primary"},on:{click:function(e){t.meetingMini=!0}}},[e("i",{staticClass:"taskfont"},[t._v("")])]),t._v(" "),e("Button",{attrs:{type:"warning",loading:t.loadIng>0},on:{click:t.onClose}},[e("i",{staticClass:"taskfont"},[t._v("")])])]:[e("Button",{attrs:{type:"primary"},on:{click:function(e){return t.onInvitation("open")}}},[t._v(t._s(t.$L("邀请")))]),t._v(" "),e("Button",{attrs:{type:"primary"},on:{click:function(e){t.meetingMini=!0}}},[t._v(t._s(t.$L("最小化")))]),t._v(" "),e("Button",{attrs:{type:"warning",loading:t.loadIng>0},on:{click:t.onClose}},[t._v(t._s(t.$L("离开会议")))])]],2)]),t._v(" "),t.meetingMini?e("DragBallComponent",{attrs:{id:"meetingDragBall","z-index":3e3},on:{"on-click":function(e){t.meetingMini=!1}}},[e("div",{staticClass:"meeting-drag-ball"},[e("i",{staticClass:"taskfont",domProps:{innerHTML:t._s(t.localUser.audioTrack?"":"")}}),t._v(" "),e("i",{staticClass:"taskfont",domProps:{innerHTML:t._s(t.localUser.videoTrack?"":"")}}),t._v(" "),e("em",[t._v(t._s(t.$L("会议中")))])])]):t._e(),t._v(" "),e("Modal",{attrs:{title:t.$L("邀请加入"),"mask-closable":!1},model:{value:t.invitationShow,callback:function(e){t.invitationShow=e},expression:"invitationShow"}},[e("Form",{ref:"invitationForm",attrs:{model:t.invitationData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{prop:"userids",label:t.$L("邀请成员")}},[e("UserInput",{attrs:{"multiple-max":20,placeholder:t.$L("选择邀请成员")},model:{value:t.invitationData.userids,callback:function(e){t.$set(t.invitationData,"userids",e)},expression:"invitationData.userids"}})],1)],1),t._v(" "),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(e){t.invitationShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Button",{attrs:{type:"primary",loading:t.invitationLoad},on:{click:function(e){return t.onInvitation("submit")}}},[t._v(t._s(t.$L("发送邀请")))])],1)],1)],1)}),[],!1,null,null,null).exports;var ot=n(8251);function it(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 at(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?it(Object(n),!0).forEach((function(e){st(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):it(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function st(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const lt={name:"DialogModal",components:{DialogWrapper:n(20614).Z},data:function(){return{timer:null,transition:$A.isIos()?"mobile-dialog":""}},computed:at(at({},(0,r.rn)(["dialogId"])),{},{visible:function(){return this.dialogId>0&&this.windowSmall}}),methods:{onBeforeClose:function(){var t=this;return new Promise((function(e){t.$store.dispatch("openDialog",0)}))}}};var ut=n(93379),ct=n.n(ut),dt=n(98234),ft={insert:"head",singleton:!1};ct()(dt.Z,ft);dt.Z.locals;const ht=(0,i.Z)(lt,(function(){var t=this,e=t._self._c;return e("Modal",{attrs:{value:t.visible,mask:!1,"mask-closable":!1,"footer-hide":!0,"transition-names":[t.transition,""],beforeClose:t.onBeforeClose,"class-name":"dialog-modal",fullscreen:""}},[t.windowSmall&&t.dialogId>0?e("DialogWrapper",{attrs:{dialogId:t.dialogId,beforeBack:t.onBeforeClose}}):t._e()],1)}),[],!1,null,null,null).exports;function pt(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 mt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?pt(Object(n),!0).forEach((function(e){gt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):pt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function gt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const vt={name:"TaskModal",components:{TaskDetail:n(1130).Z},computed:mt(mt(mt({},(0,r.rn)(["taskId"])),(0,r.Se)(["taskData"])),{},{show:function(){return this.taskId>0},styles:function(){return{width:"90%",maxWidth:this.taskData.dialog_id?"1200px":"700px"}}}),methods:{onBeforeClose:function(){var t=this;return new Promise((function(e){t.$store.dispatch("openTask",0)}))},checkUpdate:function(){if(this.show)return this.$refs.taskDetail.checkUpdate(!0),!0}}};var yt=n(75651),bt={insert:"head",singleton:!1};ct()(yt.Z,bt);yt.Z.locals;const _t=(0,i.Z)(vt,(function(){var t=this,e=t._self._c;return e("Modal",{attrs:{value:t.show,styles:t.styles,"mask-closable":!1,"footer-hide":!0,beforeClose:t.onBeforeClose,"class-name":"task-modal"}},[e("TaskDetail",{ref:"taskDetail",attrs:{"task-id":t.taskId,"open-task":t.taskData,modalMode:""}})],1)}),[],!1,null,null,null).exports;var wt=n(7820);const kt={name:"TaskExport",components:{UserInput:y.Z},props:{value:{type:Boolean,default:!1}},data:function(){return{show:this.value,loadIng:0,formData:{userid:[],time:[],type:"taskTime"}}},watch:{value:function(t){this.show=t},show:function(t){this.value!==t&&this.$emit("input",t)}},methods:{dateShortcuts:function(t){return"prev"===t?[$A.getSpecifyDate("上个月"),$A.getSpecifyDate("上个月结束")]:"this"===t?[$A.getSpecifyDate("本月"),$A.getSpecifyDate("本月结束")]:void 0},onExport:function(){var t=this;this.loadIng>0||(this.loadIng++,this.$store.dispatch("call",{url:"project/task/export",data:this.formData}).then((function(e){var n=e.data;t.show=!1,t.$store.dispatch("downUrl",{url:n.url})})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(e){t.loadIng--})))}}};var Ct=n(79165),xt={insert:"head",singleton:!1};ct()(Ct.Z,xt);Ct.Z.locals;const St=(0,i.Z)(kt,(function(){var t=this,e=t._self._c;return e("Modal",{attrs:{title:t.$L("导出任务统计"),"mask-closable":!1},model:{value:t.show,callback:function(e){t.show=e},expression:"show"}},[e("Form",{ref:"exportTask",attrs:{model:t.formData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{label:t.$L("导出成员")}},[e("UserInput",{attrs:{"multiple-max":100,placeholder:t.$L("请选择成员")},model:{value:t.formData.userid,callback:function(e){t.$set(t.formData,"userid",e)},expression:"formData.userid"}}),t._v(" "),e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("每次最多选择导出100个成员")))])],1),t._v(" "),e("FormItem",{attrs:{label:t.$L("时间范围")}},[e("DatePicker",{staticStyle:{width:"100%"},attrs:{type:"daterange",format:"yyyy/MM/dd",placeholder:t.$L("请选择时间")},model:{value:t.formData.time,callback:function(e){t.$set(t.formData,"time",e)},expression:"formData.time"}}),t._v(" "),e("div",{staticClass:"form-tip checkin-export-quick-select"},[e("span",[t._v(t._s(t.$L("快捷选择"))+":")]),t._v(" "),e("em",{on:{click:function(e){t.formData.time=t.dateShortcuts("prev")}}},[t._v(t._s(t.$L("上个月")))]),t._v(" "),e("em",{on:{click:function(e){t.formData.time=t.dateShortcuts("this")}}},[t._v(t._s(t.$L("这个月")))])])],1),t._v(" "),e("FormItem",{attrs:{prop:"type",label:t.$L("导出时间类型")}},[e("RadioGroup",{model:{value:t.formData.type,callback:function(e){t.$set(t.formData,"type",e)},expression:"formData.type"}},[e("Radio",{attrs:{label:"taskTime"}},[t._v(t._s(t.$L("任务时间")))]),t._v(" "),e("Radio",{attrs:{label:"createdTime"}},[t._v(t._s(t.$L("创建时间")))])],1)],1)],1),t._v(" "),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(e){t.show=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Button",{attrs:{type:"primary",loading:t.loadIng>0},on:{click:t.onExport}},[t._v(t._s(t.$L("导出")))])],1)],1)}),[],!1,null,null,null).exports,Ot=(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)),Et=(t,e,n)=>t.findIndex((t=>t[e]===n));const Dt=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(!Ot("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&&Ot("number",t)?this.timeout=t:this.timeout=5e3}notificationWatch(){this.notificationAll.push(this.notification),this.notification.requireInteraction?this.everyTimeout():this.autoClose(),this.watchClose()}everyTimeout(){Ot("number",this.timeout)&&(this.options.timeOut&&Ot("number",this.options.timeOut)?this.timeoutCloseFn(this.options.timeOut):this.timeoutCloseFn(this.timeout))}timeoutCloseFn(t){const e=this.notification.timestamp;setTimeout((()=>{const t=Et(this.notificationAll,"timestamp",e);-1!==t&&this.notificationAll[t].close()}),t)}watchClose(){const t=this.notification.timestamp;this.notification.addEventListener("close",(e=>{const n=Et(this.notificationAll,"timestamp",t);-1!==n&&this.notificationAll.splice(n,1)}))}autoClose(){const t=this.notification.timestamp;setTimeout((()=>{const e=Et(this.notificationAll,"timestamp",t);-1!==e&&this.notificationAll.splice(e,1)}),6e3)}notificationEvent(t){if(this.checkStatus("support")){if(!Ot("Object",t))return console.error("callObj必须为对象");for(const e in t)if(!Ot("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&&Ot("Object",t))for(const e in t)this.options[e]=t[e];else console.warn("updateOptions参数错误:options为必填对象")}replaceTitle(t){t&&Ot("String",t)?this.title=t:console.warn("replaceTitle: title(通知标题)为必填字符串")}replaceOptions(t){t&&Ot("Object",t)?this.options=t:console.warn("replaceOptions参数错误:options为必填对象")}checkStatus(t){if("support"===t){if(!this.support)return console.warn("用户浏览器不支持"),!1}else if("userAgreed"===t){if("granted"!==this.state)return!1;if(!this.checkStatus("support"))return!1}return!0}};function Lt(t){return Lt="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},Lt(t)}function At(){At=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function u(t,e,n,o){var i=e&&e.prototype instanceof f?e:f,a=Object.create(i.prototype),s=new S(o||[]);return r(a,"_invoke",{value:w(t,n,s)}),a}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var d={};function f(){}function h(){}function p(){}var m={};l(m,i,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(O([])));v&&v!==e&&n.call(v,i)&&(m=v);var y=p.prototype=f.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function o(r,i,a,s){var l=c(t[r],t,i);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==Lt(d)&&n.call(d,"__await")?e.resolve(d.__await).then((function(t){o("next",t,a,s)}),(function(t){o("throw",t,a,s)})):e.resolve(d).then((function(t){u.value=t,a(u)}),(function(t){return o("throw",t,a,s)}))}s(l.arg)}var i;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return E()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=k(a,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=c(t,e,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function k(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,k(t,e),"throw"===e.method))return d;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,d;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:E}}function E(){return{value:void 0,done:!0}}return h.prototype=p,r(y,"constructor",{value:p,configurable:!0}),r(p,"constructor",{value:h,configurable:!0}),h.displayName=l(p,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,l(t,s,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},b(_.prototype),l(_.prototype,a,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new _(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(y),l(y,s,"Generator"),l(y,i,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=O,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(s&&l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},t}function Tt(t,e,n,r,o,i,a){try{var s=t[i](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,o)}function Nt(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Tt(i,r,o,a,s,"next",t)}function s(t){Tt(i,r,o,a,s,"throw",t)}a(void 0)}))}}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 It(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?$t(Object(n),!0).forEach((function(e){Pt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$t(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Pt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const jt={components:{TaskExport:St,CheckinExport:wt.Z,TaskModal:_t,DialogModal:ht,MeetingManager:rt,MobileNotification:H,MobileBack:U,MobileTabbar:g,TaskAdd:E,Report:M,DrawerOverlay:c.Z,ProjectManagement:u,TeamManagement:s.Z,ProjectArchived:a},directives:{longpress:ot.Z},data:function(){return{loadIng:0,mateName:/macintosh|mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl",addShow:!1,addData:{name:"",columns:"",flow:"open"},addRule:{name:[{required:!0,message:this.$L("请填写项目名称!"),trigger:"change"},{type:"string",min:2,message:this.$L("项目名称至少2个字!"),trigger:"change"}]},addTaskShow:!1,addTaskSubscribe:null,exportTaskShow:!1,exportCheckinShow:!1,dialogMsgSubscribe:null,projectKeyValue:"",projectKeyLoading:0,projectSearchShow:!1,openMenu:{},visibleMenu:!1,show768Menu:!1,workReportShow:!1,allUserShow:!1,allProjectShow:!1,archivedProjectShow:!1,natificationReady:!1,notificationManage:null,reportTabs:"my",operateStyles:{},operateVisible:!1,operateItem:{}}},mounted:function(){this.chackClear(),this.notificationInit(),this.addTaskSubscribe=d.Store.subscribe("addTask",this.onAddTask),this.dialogMsgSubscribe=d.Store.subscribe("dialogMsgPush",this.addDialogMsg),document.addEventListener("keydown",this.shortcutEvent)},activated:function(){this.$store.dispatch("getUserInfo").catch((function(t){})),this.$store.dispatch("getTaskPriority").catch((function(t){})),this.$store.dispatch("getReportUnread",0)},beforeDestroy:function(){this.addTaskSubscribe&&(this.addTaskSubscribe.unsubscribe(),this.addTaskSubscribe=null),this.dialogMsgSubscribe&&(this.dialogMsgSubscribe.unsubscribe(),this.dialogMsgSubscribe=null),document.removeEventListener("keydown",this.shortcutEvent)},deactivated:function(){this.addShow=!1},computed:It(It(It({},(0,r.rn)(["userInfo","userIsAdmin","cacheUserBasic","cacheTasks","cacheDialogs","cacheProjects","projectTotal","wsOpenNum","columnTemplate","wsMsg","clientNewVersion","cacheTaskBrowse","dialogIns","reportUnreadNumber"])),(0,r.Se)(["dashboardTask"])),{},{routeName:function(){return this.$route.name},msgUnreadMention:function(){var t=0,e=0;this.cacheDialogs.some((function(n){t+=$A.getDialogUnread(n,!1),e+=$A.getDialogMention(n)})),t>999&&(t="999+"),e>999&&(e="999+");var n=this.msgTodoTotal;return n?e?"@".concat(e,"·").concat(n):t?"".concat(t,"·").concat(n):n:t?e?"".concat(t,"·@").concat(e):String(t):""},msgAllUnread:function(){var t=0;return this.cacheDialogs.some((function(e){t+=$A.getDialogUnread(e,!1)})),t},msgTodoTotal:function(){var t=this.cacheDialogs.reduce((function(t,e){return t+(e.todo_num||0)}),0);return t>0?(t>99?t="99+":1===t&&(t=""),"".concat(this.$L("待办")).concat(t)):null},unreadAndOverdue:function(){return this.userId>0?this.msgAllUnread+this.dashboardTask.overdue_count:0},menu:function(){return this.userIsAdmin?[{path:"taskBrowse",name:"最近打开的任务"},{path:"personal",name:"偏好设置",divided:!0},{path:"system",name:"系统设置"},{path:"clearCache",name:"清除缓存"},{path:"version",name:"更新版本",divided:!0,visible:!!this.clientNewVersion},{path:"allProject",name:"所有项目",divided:!0},{path:"archivedProject",name:"已归档的项目"},{path:"team",name:"团队管理",divided:!0},{path:"logout",name:"退出登录",style:{color:"#f40"},divided:!0}]:[{path:"taskBrowse",name:"最近打开的任务"},{path:"personal",name:"偏好设置",divided:!0},{path:"clearCache",name:"清除缓存"},{path:"version",name:"更新版本",divided:!0,visible:!!this.clientNewVersion},{path:"workReport",name:"工作报告",divided:!0},{path:"archivedProject",name:"已归档的项目"},{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 $A.strExists("".concat(e.name," ").concat(e.desc),t)})):n},listClassName:function(){return{"scrollbar-overlay":!0,"scrollbar-hidden":!0===this.operateVisible}},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}))||{}}))},showMobileTabbar:function(){return"manage-project"===this.routeName&&!/^\d+$/.test(this.$route.params.projectId)||["manage-dashboard","manage-calendar","manage-messenger","manage-file","manage-setting"].includes(this.routeName)}}),watch:{$route:function(){this.chackPass()},userInfo:function(){this.chackPass()},projectKeyValue:function(t){var e=this;""!=t&&setTimeout((function(){e.projectKeyValue==t&&e.searchProject()}),600)},wsOpenNum:function(t){t<=1||this.$store.dispatch("getBasicData",600)},workReportShow:function(t){t&&this.$store.dispatch("getReportUnread",0)},"cacheProjects.length":{handler:function(){var t=this;this.$nextTick((function(e){var n=t.$refs.menuProject,r=$A.last($A.getObject(n,"children.0.children"));if(r){var o=r.getBoundingClientRect(),i=n.getBoundingClientRect();if(o.top>i.top+i.height)return void(t.projectSearchShow=!0)}t.projectSearchShow=!1}))},immediate:!0},unreadAndOverdue:{handler:function(t){this.$Electron&&this.$Electron.sendMessage("setDockBadge",t)},immediate:!0},wsMsg:{handler:function(t){var e=t.type,n=t.action;if("report"===e)"unreadUpdate"==n&&this.$store.dispatch("getReportUnread",1e3)},deep:!0}},methods:{chackClear:function(){return Nt(At().mark((function t(){return At().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,$A.IDBString("clearCache");case 2:if(!t.sent){t.next=7;break}return t.next=6,$A.IDBRemove("clearCache");case 6:$A.messageSuccess("清除成功");case 7:case"end":return t.stop()}}),t)})))()},chackPass:function(){1===this.userInfo.changepass&&this.goForward({name:"manage-setting-password"})},toggleRoute:function(t,e){var n=this;return Nt(At().mark((function r(){var o,i;return At().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n.show768Menu=!1,o={name:"manage-"+t,params:e||{}},r.next=4,$A.IDBInt("fileFolderId");case 4:i=r.sent,"file"===t&&i>0&&(o.params.folderId=i),n.goForward(o);case 7:case"end":return r.stop()}}),r)})))()},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"exportOverdueTask":return void this.exportOverdueTask();case"exportCheckin":return void(this.exportCheckinShow=!0);case"workReport":return this.reportUnreadNumber>0&&(this.reportTabs="receive"),void(this.workReportShow=!0);case"version":return void d.Store.set("updateNotification",null);case"clearCache":return void this.$store.dispatch("handleClearCache",null).then(Nt(At().mark((function t(){return At().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,$A.IDBSet("clearCache",$A.randomString(6));case 2:$A.reloadUrl();case 3:case"end":return t.stop()}}),t)}))));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)},exportOverdueTask:function(){var t=this;$A.modalConfirm({title:"导出任务",content:"你确定要导出所有超期任务吗?",loading:!0,onOk:function(){return new Promise((function(e,n){t.$store.dispatch("call",{url:"project/task/exportoverdue"}).then((function(n){var r=n.data;e(),t.$store.dispatch("downUrl",{url:r.url})})).catch((function(t){var e=t.msg;n(e)}))}))}})},menuVisibleChange:function(t){this.visibleMenu=t},classNameRoute:function(t){return{active:this.routeName==="manage-".concat(t)}},classNameProject:function(t){return{active:"manage-project"===this.routeName&&this.$route.params.projectId==t.id,"open-menu":!0===this.openMenu[t.id],operate:t.id==this.operateItem.id&&this.operateVisible}},onAddMenu:function(t){switch(t){case"task":this.onAddTask(0);break;case"createMeeting":d.Store.set("addMeeting",{type:"create",userids:[this.userId]});break;case"joinMeeting":d.Store.set("addMeeting",{type:"join"})}},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.addShow=!1,t.$refs.addProject.resetFields(),t.$store.dispatch("saveProject",n),t.toggleRoute("project",{projectId:n.id})})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(e){t.loadIng--})))}))},searchProject:function(){var t=this;setTimeout((function(){t.projectKeyLoading++}),1e3),this.$store.dispatch("getProjects",{keys:{name:this.projectKeyValue}}).finally((function(e){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)&&(74===t.keyCode?(t.preventDefault(),this.onAddMenu("createMeeting")):75===t.keyCode||78===t.keyCode?(t.preventDefault(),this.onAddMenu("task")):83===t.keyCode&&this.$refs.taskModal.checkUpdate()&&t.preventDefault())},onAddTask:function(t){var e=this;this.addTaskShow=!0,this.$nextTick((function(n){var r={owner:[e.userId]};$A.isJson(t)?r=t:/^[1-9]\d*$/.test(t)&&(r.column_id=t),e.$refs.addTask.setData(r)}))},openTask:function(t){this.$store.dispatch("openTask",t)},addDialogMsg:function(t){var e,n=this;if((this.natificationReady||this.$isEEUiApp)&&(!this.windowActive||t.dialog_id!==(null===(e=$A.last(this.dialogIns))||void 0===e?void 0:e.dialog_id))){var r=t.id,o=t.dialog_id,i=t.dialog_type,a=t.type,s=t.msg,l=t.userid;if(l!=this.userId){var u;switch(a){case"text":u=$A.getMsgTextPreview(s.text);break;case"file":u="["+this.$L("img"==s.type?"图片信息":"文件信息")+"]";break;default:return}this.__notificationId=r;var c=function(t){if("group"===i){var e=n.cacheUserBasic.find((function(t){return t.userid==l}));e?d("".concat(t," (").concat(e.nickname,")")):n.$store.dispatch("call",{url:"users/basic",data:{userid:[l]},checkRole:!1}).then((function(n){var r=n.data;(e=r.find((function(t){return t.userid==l})))&&d("".concat(t," (").concat(e.nickname,")"))})).catch((function(e){d(t)}))}else d(t)},d=function(e){n.__notificationId===r&&(n.$isEEUiApp?n.$refs.mobileNotification.open({userid:l,title:e,desc:u,callback:function(){n.goForward({name:"manage-messenger"}),n.$store.dispatch("openDialog",o)}}):n.$Electron?n.$Electron.sendMessage("openNotification",{icon:$A.originUrl("images/logo.png"),title:e,body:u,data:t,tag:"dialog",hasReply:!0,replyPlaceholder:n.$L("回复消息")}):(n.notificationManage.replaceOptions({icon:$A.originUrl("images/logo.png"),body:u,data:t,tag:"dialog"}),n.notificationManage.replaceTitle(e),n.notificationManage.userAgreed()))},f=this.cacheDialogs.find((function(t){return t.id==o}));f?c(f.name):this.$store.dispatch("getDialogOne",o).then((function(t){var e=t.data;return c(e.name)})).catch((function(){}))}}},handleLongpress:function(t,e){var n=this,r=$A.getAttr(e,"data-id"),o=this.projectLists.find((function(t){return t.id==r}));o&&(this.operateVisible=!1,this.operateItem=$A.isJson(o)?o:{},this.$nextTick((function(){var r=e.getBoundingClientRect(),o=n.$refs.menuProject.getBoundingClientRect();n.operateStyles={left:"".concat(t.clientX-o.left,"px"),top:"".concat(r.top+n.windowScrollY,"px"),height:r.height+"px"},n.operateVisible=!0})))},handleTopClick:function(){var t=this;this.$store.dispatch("call",{url:"project/top",data:{project_id:this.operateItem.id}}).then((function(e){var n=e.data;t.$store.dispatch("saveProject",n),t.$nextTick((function(){var e=t.$refs.menuProject.querySelector(".active");e&&$A.scrollIntoViewIfNeeded(e)}))})).catch((function(t){var e=t.msg;$A.modalError(e)}))},onTabbarClick:function(t){switch(t){case"addTask":this.onAddTask(0);break;case"addProject":this.onAddShow()}},notificationInit:function(){var t=this;this.notificationManage=new Dt(this.$L("打开通知成功")),this.notificationManage.support&&(this.notificationManage.notificationEvent({onclick:function(e){var n=e.target;console.log("[Notification] A Click",n),t.notificationManage.close(),t.notificationClick(n),window.focus()}}),this.notificationPermission()),this.$Electron&&(this.$Electron.registerMsgListener("clickNotification",(function(e){console.log("[Notification] B Click",e),t.$Electron.sendMessage("mainWindowActive"),t.notificationClick(e)})),this.$Electron.registerMsgListener("replyNotification",(function(e){console.log("[Notification] B Reply",e),t.notificationReply(e)})))},notificationPermission:function(){var t=this;this.notificationManage.initNotification((function e(n){switch(n){case"already granted":case"granted":return t.natificationReady=!0;case"close":return t.notificationManage.initNotification(e);case"denied":case"already denied":"denied"===n?console.log("您刚刚拒绝显示通知 请在设置中更改设置"):console.log("您曾级拒绝显示通知 请在设置中更改设置")}}))},notificationClick:function(t){var e=this,n=t.tag,r=t.data;if("dialog"==n){if(!$A.isJson(r))return;this.goForward({name:"manage-messenger"}),this.$nextTick((function(t){e.$store.dispatch("openDialog",r.dialog_id)}))}},notificationReply:function(t){var e=this,n=t.tag,r=t.data,o=t.reply;"dialog"==n&&o&&this.$store.dispatch("call",{url:"dialog/msg/sendtext",data:{dialog_id:r.dialog_id,text:o},method:"post"}).then((function(t){var n=t.data;e.$store.dispatch("saveDialogMsg",n),e.$store.dispatch("increaseTaskMsgNum",n),e.$store.dispatch("increaseMsgReplyNum",n),e.$store.dispatch("updateDialogLastMsg",n)})).catch((function(t){var e=t.msg;$A.modalError(e)}))}}};const Mt=(0,i.Z)(jt,(function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"show",rawName:"v-show",value:t.userId>0,expression:"userId > 0"}],staticClass:"page-manage",class:{"show-tabbar":t.showMobileTabbar}},[e("div",{staticClass:"manage-box-menu",class:{"show768-menu":t.show768Menu}},[e("Dropdown",{staticClass:"page-manage-menu-dropdown",attrs:{trigger:"click"},on:{"on-click":t.settingRoute,"on-visible-change":t.menuVisibleChange}},[e("div",{class:["manage-box-title",t.visibleMenu?"menu-visible":""]},[e("div",{staticClass:"manage-box-avatar"},[e("UserAvatar",{attrs:{userid:t.userId,size:36,tooltipDisabled:""}})],1),t._v(" "),e("span",[t._v(t._s(t.userInfo.nickname))]),t._v(" "),t.reportUnreadNumber>0?e("Badge",{staticClass:"manage-box-top-report",attrs:{"overflow-count":999,count:t.reportUnreadNumber}}):t.clientNewVersion?e("Badge",{staticClass:"manage-box-top-report",attrs:{dot:""}}):t._e(),t._v(" "),e("div",{staticClass:"manage-box-arrow"},[e("Icon",{attrs:{type:"ios-arrow-up"}}),t._v(" "),e("Icon",{attrs:{type:"ios-arrow-down"}})],1)],1),t._v(" "),e("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[t._l(t.menu,(function(n){return["taskBrowse"===n.path?e("Dropdown",{attrs:{transfer:"","transfer-class-name":"page-manage-menu-dropdown",placement:"right-start"}},[e("DropdownItem",{attrs:{divided:!!n.divided}},[e("div",{staticClass:"manage-menu-flex"},[t._v("\n "+t._s(t.$L(n.name))+"\n "),e("Icon",{attrs:{type:"ios-arrow-forward"}})],1)]),t._v(" "),t.taskBrowseLists.length>0?e("DropdownMenu",{attrs:{slot:"list"},slot:"list"},t._l(t.taskBrowseLists,(function(n,r){return n.id>0&&r<10?e("DropdownItem",{key:r,staticClass:"task-title",attrs:{name:n.name},nativeOn:{click:function(e){return t.openTask(n)}}},[n.flow_item_name?e("span",{class:n.flow_item_status},[t._v(t._s(n.flow_item_name))]):t._e(),t._v(" "),e("div",{staticClass:"task-title-text"},[t._v(t._s(n.name))])]):t._e()})),1):e("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[e("DropdownItem",{staticStyle:{color:"darkgrey"}},[t._v(t._s(t.$L("暂无打开记录")))])],1)],1):"team"===n.path?e("Dropdown",{attrs:{transfer:"","transfer-class-name":"page-manage-menu-dropdown",placement:"right-start"}},[e("DropdownItem",{attrs:{divided:!!n.divided}},[e("div",{staticClass:"manage-menu-flex"},[t._v("\n "+t._s(t.$L(n.name))+"\n "),t.reportUnreadNumber>0?e("Badge",{staticClass:"manage-menu-report-badge",attrs:{"overflow-count":999,count:t.reportUnreadNumber}}):e("Icon",{attrs:{type:"ios-arrow-forward"}})],1)]),t._v(" "),e("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[e("DropdownItem",{attrs:{name:"allUser"}},[t._v(t._s(t.$L("团队管理")))]),t._v(" "),e("DropdownItem",{attrs:{name:"workReport"}},[e("div",{staticClass:"manage-menu-flex"},[t._v("\n "+t._s(t.$L("工作报告"))+"\n "),t.reportUnreadNumber>0?e("Badge",{staticClass:"manage-menu-report-badge",attrs:{"overflow-count":999,count:t.reportUnreadNumber}}):t._e()],1)]),t._v(" "),e("DropdownItem",{attrs:{name:"exportTask"}},[t._v(t._s(t.$L("导出任务统计")))]),t._v(" "),e("DropdownItem",{attrs:{name:"exportOverdueTask"}},[t._v(t._s(t.$L("导出超期任务")))]),t._v(" "),e("DropdownItem",{attrs:{name:"exportCheckin"}},[t._v(t._s(t.$L("导出签到数据")))])],1)],1):!1!==n.visible?e("DropdownItem",{style:n.style||{},attrs:{divided:!!n.divided,name:n.path}},[e("div",{staticClass:"manage-menu-flex"},[t._v("\n "+t._s(t.$L(n.name))+"\n "),"version"===n.path?e("Badge",{staticClass:"manage-menu-report-badge",attrs:{text:t.clientNewVersion}}):"workReport"===n.path&&t.reportUnreadNumber>0?e("Badge",{staticClass:"manage-menu-report-badge",attrs:{count:t.reportUnreadNumber}}):t._e()],1)]):t._e()]}))],2)],1),t._v(" "),e("ul",{class:t.listClassName,on:{scroll:function(e){t.operateVisible=!1}}},[e("li",{class:t.classNameRoute("dashboard"),on:{click:function(e){return t.toggleRoute("dashboard")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),e("div",{staticClass:"menu-title"},[t._v(t._s(t.$L("仪表盘")))]),t._v(" "),t.dashboardTask.overdue_count>0?e("Badge",{staticClass:"menu-badge",attrs:{type:"error","overflow-count":999,count:t.dashboardTask.overdue_count}}):t.dashboardTask.today_count>0?e("Badge",{staticClass:"menu-badge",attrs:{type:"info","overflow-count":999,count:t.dashboardTask.today_count}}):t.dashboardTask.all_count>0?e("Badge",{staticClass:"menu-badge",attrs:{type:"primary","overflow-count":999,count:t.dashboardTask.all_count}}):t._e()],1),t._v(" "),e("li",{class:t.classNameRoute("calendar"),on:{click:function(e){return t.toggleRoute("calendar")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),e("div",{staticClass:"menu-title"},[t._v(t._s(t.$L("日历")))])]),t._v(" "),e("li",{class:t.classNameRoute("messenger"),on:{click:function(e){return t.toggleRoute("messenger")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),e("div",{staticClass:"menu-title"},[t._v(t._s(t.$L("消息")))]),t._v(" "),e("Badge",{staticClass:"menu-badge",attrs:{"overflow-count":999,text:t.msgUnreadMention}})],1),t._v(" "),e("li",{class:t.classNameRoute("file"),on:{click:function(e){return t.toggleRoute("file")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),e("div",{staticClass:"menu-title"},[t._v(t._s(t.$L("文件")))])]),t._v(" "),e("li",{ref:"menuProject",staticClass:"menu-project"},[e("ul",{class:t.listClassName,on:{scroll:function(e){t.operateVisible=!1}}},[t._l(t.projectLists,(function(n,r){return e("li",{directives:[{name:"longpress",rawName:"v-longpress",value:t.handleLongpress,expression:"handleLongpress"}],key:r,ref:"project_".concat(n.id),refInFor:!0,class:t.classNameProject(n),attrs:{"data-id":n.id},on:{click:function(e){return t.toggleRoute("project",{projectId:n.id})}}},[e("div",{staticClass:"project-h1"},[e("em",{on:{click:function(e){return e.stopPropagation(),t.toggleOpenMenu(n.id)}}}),t._v(" "),e("div",{staticClass:"title"},[t._v(t._s(n.name))]),t._v(" "),n.top_at?e("div",{staticClass:"icon-top"}):t._e(),t._v(" "),n.task_my_num-n.task_my_complete>0?e("div",{staticClass:"num"},[t._v(t._s(n.task_my_num-n.task_my_complete))]):t._e()]),t._v(" "),e("div",{staticClass:"project-h2"},[e("p",[e("em",[t._v(t._s(t.$L("我的"))+":")]),t._v(" "),e("span",[t._v(t._s(n.task_my_complete)+"/"+t._s(n.task_my_num))]),t._v(" "),e("Progress",{attrs:{percent:n.task_my_percent,"stroke-width":6}})],1),t._v(" "),e("p",[e("em",[t._v(t._s(t.$L("全部"))+":")]),t._v(" "),e("span",[t._v(t._s(n.task_complete)+"/"+t._s(n.task_num))]),t._v(" "),e("Progress",{attrs:{percent:n.task_percent,"stroke-width":6}})],1)])])})),t._v(" "),t.projectKeyLoading>0?e("li",{staticClass:"loading"},[e("Loading")],1):t._e()],2)])]),t._v(" "),e("div",{staticClass:"operate-position",style:t.operateStyles},[e("Dropdown",{attrs:{trigger:"custom",placement:t.windowLarge?"bottom":"top",visible:t.operateVisible,transfer:""},on:{"on-clickoutside":function(e){t.operateVisible=!1}}},[e("div",{style:{userSelect:t.operateVisible?"none":"auto",height:t.operateStyles.height}}),t._v(" "),e("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[e("DropdownItem",{nativeOn:{click:function(e){return t.handleTopClick.apply(null,arguments)}}},[t._v("\n "+t._s(t.$L(t.operateItem.top_at?"取消置顶":"置顶该项目"))+"\n ")])],1)],1)],1),t._v(" "),(t.projectSearchShow||t.projectTotal>20)&&t.windowHeight>600?e("div",{staticClass:"manage-project-search"},[e("Input",{attrs:{placeholder:t.$L("共".concat(t.projectTotal||t.cacheProjects.length,"个项目,搜索...")),clearable:""},model:{value:t.projectKeyValue,callback:function(e){t.projectKeyValue=e},expression:"projectKeyValue"}},[e("div",{staticClass:"search-pre",attrs:{slot:"prefix"},slot:"prefix"},[t.projectKeyLoading>0?e("Loading"):e("Icon",{attrs:{type:"ios-search"}})],1)])],1):t._e(),t._v(" "),e("ButtonGroup",{staticClass:"manage-box-new-group"},[e("Button",{staticClass:"manage-box-new",attrs:{type:"primary",icon:"md-add"},on:{click:t.onAddShow}},[t._v(t._s(t.$L("新建项目")))]),t._v(" "),e("Dropdown",{attrs:{trigger:"click"},on:{"on-click":t.onAddMenu}},[e("Button",{attrs:{type:"primary"}},[e("Icon",{attrs:{type:"ios-arrow-down"}})],1),t._v(" "),e("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[e("DropdownItem",{attrs:{name:"task"}},[t._v(t._s(t.$L("新建任务"))+" ("+t._s(t.mateName)+"+K)")]),t._v(" "),e("DropdownItem",{attrs:{name:"createMeeting"}},[t._v(t._s(t.$L("新会议"))+" ("+t._s(t.mateName)+"+J)")]),t._v(" "),e("DropdownItem",{attrs:{name:"joinMeeting"}},[t._v(t._s(t.$L("加入会议")))])],1)],1)],1)],1),t._v(" "),e("div",{staticClass:"manage-box-main"},[e("keep-alive",[e("router-view",{staticClass:"manage-box-view"})],1)],1),t._v(" "),e("Modal",{attrs:{title:t.$L("新建项目"),"mask-closable":!1},model:{value:t.addShow,callback:function(e){t.addShow=e},expression:"addShow"}},[e("Form",{ref:"addProject",attrs:{model:t.addData,rules:t.addRule,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{prop:"name",label:t.$L("项目名称")}},[e("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?e("FormItem",{attrs:{label:t.$L("任务列表")}},[e("TagInput",{model:{value:t.addData.columns,callback:function(e){t.$set(t.addData,"columns",e)},expression:"addData.columns"}})],1):e("FormItem",{attrs:{label:t.$L("项目模板")}},[e("Select",{attrs:{value:0,placeholder:t.$L("请选择模板")},on:{"on-change":t.selectChange}},t._l(t.columns,(function(n,r){return e("Option",{key:r,attrs:{value:r}},[t._v(t._s(n.name))])})),1)],1),t._v(" "),e("FormItem",{attrs:{prop:"flow",label:t.$L("开启工作流")}},[e("RadioGroup",{model:{value:t.addData.flow,callback:function(e){t.$set(t.addData,"flow",e)},expression:"addData.flow"}},[e("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("开启")))]),t._v(" "),e("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("关闭")))])],1)],1)],1),t._v(" "),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(e){t.addShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Button",{attrs:{type:"primary",loading:t.loadIng>0},on:{click:t.onAddProject}},[t._v(t._s(t.$L("添加")))])],1)],1),t._v(" "),e("Modal",{attrs:{"mask-closable":!1,styles:{width:"90%",maxWidth:"640px"},"footer-hide":""},model:{value:t.addTaskShow,callback:function(e){t.addTaskShow=e},expression:"addTaskShow"}},[e("TaskAdd",{ref:"addTask",model:{value:t.addTaskShow,callback:function(e){t.addTaskShow=e},expression:"addTaskShow"}})],1),t._v(" "),e("TaskExport",{model:{value:t.exportTaskShow,callback:function(e){t.exportTaskShow=e},expression:"exportTaskShow"}}),t._v(" "),e("CheckinExport",{model:{value:t.exportCheckinShow,callback:function(e){t.exportCheckinShow=e},expression:"exportCheckinShow"}}),t._v(" "),e("TaskModal",{ref:"taskModal"}),t._v(" "),e("DialogModal",{ref:"dialogModal"}),t._v(" "),e("DrawerOverlay",{attrs:{placement:"right",size:1200},model:{value:t.workReportShow,callback:function(e){t.workReportShow=e},expression:"workReportShow"}},[t.workReportShow?e("Report",{attrs:{reportType:t.reportTabs},on:{"on-read":function(e){return t.$store.dispatch("getReportUnread",1e3)}}}):t._e()],1),t._v(" "),e("DrawerOverlay",{attrs:{placement:"right",size:1380},model:{value:t.allUserShow,callback:function(e){t.allUserShow=e},expression:"allUserShow"}},[t.allUserShow?e("TeamManagement"):t._e()],1),t._v(" "),e("DrawerOverlay",{attrs:{placement:"right",size:1200},model:{value:t.allProjectShow,callback:function(e){t.allProjectShow=e},expression:"allProjectShow"}},[t.allProjectShow?e("ProjectManagement"):t._e()],1),t._v(" "),e("DrawerOverlay",{attrs:{placement:"right",size:1200},model:{value:t.archivedProjectShow,callback:function(e){t.archivedProjectShow=e},expression:"archivedProjectShow"}},[t.archivedProjectShow?e("ProjectArchived"):t._e()],1),t._v(" "),e("MeetingManager"),t._v(" "),e("transition",{attrs:{name:"mobile-slide"}},[t.showMobileTabbar?e("MobileTabbar",{on:{"on-click":t.onTabbarClick}}):t._e()],1),t._v(" "),e("MobileBack",{attrs:{showTabbar:t.showMobileTabbar}}),t._v(" "),e("MobileNotification",{ref:"mobileNotification"})],1)}),[],!1,null,null,null).exports},47015:(t,e,n)=>{"use strict";n.d(e,{Z:()=>Z});var r=n(20629),o=n(76095),i=n.n(o);function a(t){return a="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},a(t)}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e,n){return e&&l(t.prototype,e),n&&l(t,n),t}function c(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function d(){return d=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},d.apply(this,arguments)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function h(t,e){return h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},h(t,e)}function p(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function m(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return p(t)}function g(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m(this,n)}}function v(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=f(t)););return t}function y(){return y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=v(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},y.apply(this,arguments)}function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function _(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return b(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}var w=9,k=13,C=27,x=38,S=40;function O(t,e,n){var r=t;return Object.keys(e).forEach((function(t){n.indexOf(t)>-1?r.dataset[t]=e[t]:delete r.dataset[t]})),r}var E=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}(n,t);var e=g(n);function n(t,r){var o;return s(this,n),c(p(o=e.call(this,t,r)),"hoverHandler",void 0),c(p(o),"hoverHandler",void 0),o.clickHandler=null,o.hoverHandler=null,o.mounted=!1,o}return u(n,[{key:"attach",value:function(){y(f(n.prototype),"attach",this).call(this),this.mounted||(this.mounted=!0,this.clickHandler=this.getClickHandler(),this.hoverHandler=this.getHoverHandler(),this.domNode.addEventListener("click",this.clickHandler,!1),this.domNode.addEventListener("mouseenter",this.hoverHandler,!1))}},{key:"detach",value:function(){y(f(n.prototype),"detach",this).call(this),this.mounted=!1,this.clickHandler&&(this.domNode.removeEventListener("click",this.clickHandler),this.clickHandler=null)}},{key:"getClickHandler",value:function(){var t=this;return function(e){var n=t.buildEvent("mention-clicked",e);window.dispatchEvent(n),e.preventDefault()}}},{key:"getHoverHandler",value:function(){var t=this;return function(e){var n=t.buildEvent("mention-hovered",e);window.dispatchEvent(n),e.preventDefault()}}},{key:"buildEvent",value:function(t,e){var n=new Event(t,{bubbles:!0,cancelable:!0});return n.value=d({},this.domNode.dataset),n.event=e,n}}],[{key:"create",value:function(t){var e=y(f(n),"create",this).call(this),r=document.createElement("span");return r.className="ql-mention-denotation-char",r.innerHTML=t.denotationChar,e.appendChild(r),e.innerHTML+=t.value,n.setDataValues(e,t)}},{key:"setDataValues",value:function(t,e){var n=t;return Object.keys(e).forEach((function(t){n.dataset[t]=e[t]})),n}},{key:"value",value:function(t){return t.dataset}}]),n}(i().import("blots/embed"));E.blotName="mention",E.tagName="span",E.className="mention",i().register(E);var D=function(){function t(e,n){var r=this;s(this,t),this.isOpen=!1,this.itemIndex=0,this.mentionCharPos=null,this.cursorPos=null,this.values=[],this.suspendMouseEnter=!1,this.existingSourceExecutionToken=null,this.quill=e,this.options={source:null,renderItem:function(t){return"".concat(t.value)},renderLoading:function(){return null},onSelect:function(t,e){e(t)},mentionDenotationChars:["@"],showDenotationChar:!0,allowedChars:/^[a-zA-Z0-9_]*$/,minChars:0,maxChars:31,offsetTop:2,offsetLeft:0,isolateCharacter:!1,fixMentionsToQuill:!1,positioningStrategy:"normal",defaultMenuOrientation:"bottom",blotName:"mention",dataAttributes:["id","value","denotationChar","link","target","disabled"],linkTarget:"_blank",onOpen:function(){return!0},onBeforeClose:function(){return!0},onClose:function(){return!0},listItemClass:"ql-mention-list-item",mentionContainerClass:"ql-mention-list-container",mentionListClass:"ql-mention-list",spaceAfterInsert:!0,selectKeys:[k]},d(this.options,n,{dataAttributes:Array.isArray(n.dataAttributes)?this.options.dataAttributes.concat(n.dataAttributes):this.options.dataAttributes}),this.mentionContainer=document.createElement("div"),this.mentionContainer.className=this.options.mentionContainerClass?this.options.mentionContainerClass:"",this.mentionContainer.style.cssText="display: none; position: absolute;",this.mentionContainer.onmousemove=this.onContainerMouseMove.bind(this),this.options.fixMentionsToQuill&&(this.mentionContainer.style.width="auto"),this.mentionList=document.createElement("ul"),this.mentionList.id="quill-mention-list",e.root.setAttribute("aria-owns","quill-mention-list"),this.mentionList.className=this.options.mentionListClass?this.options.mentionListClass:"",this.mentionContainer.appendChild(this.mentionList),e.on("text-change",this.onTextChange.bind(this)),e.on("selection-change",this.onSelectionChange.bind(this)),e.container.addEventListener("paste",(function(){setTimeout((function(){var t=e.getSelection();r.onSelectionChange(t)}))})),e.keyboard.addBinding({key:w},this.selectHandler.bind(this)),e.keyboard.bindings[w].unshift(e.keyboard.bindings[w].pop());var o,i=_(this.options.selectKeys);try{for(i.s();!(o=i.n()).done;){var a=o.value;e.keyboard.addBinding({key:a},this.selectHandler.bind(this))}}catch(t){i.e(t)}finally{i.f()}e.keyboard.bindings[k].unshift(e.keyboard.bindings[k].pop()),e.keyboard.addBinding({key:C},this.escapeHandler.bind(this)),e.keyboard.addBinding({key:x},this.upHandler.bind(this)),e.keyboard.addBinding({key:S},this.downHandler.bind(this))}return u(t,[{key:"selectHandler",value:function(){return!(this.isOpen&&!this.existingSourceExecutionToken)||(this.selectItem(),!1)}},{key:"escapeHandler",value:function(){return!this.isOpen||(this.existingSourceExecutionToken&&(this.existingSourceExecutionToken.abandoned=!0),this.hideMentionList(),!1)}},{key:"upHandler",value:function(){return!(this.isOpen&&!this.existingSourceExecutionToken)||(this.prevItem(),!1)}},{key:"downHandler",value:function(){return!(this.isOpen&&!this.existingSourceExecutionToken)||(this.nextItem(),!1)}},{key:"showMentionList",value:function(){"fixed"===this.options.positioningStrategy?document.body.appendChild(this.mentionContainer):this.quill.container.appendChild(this.mentionContainer),this.mentionContainer.style.visibility="hidden",this.mentionContainer.style.display="",this.mentionContainer.scrollTop=0,this.setMentionContainerPosition(),this.setIsOpen(!0)}},{key:"hideMentionList",value:function(){this.options.onBeforeClose(),this.mentionContainer.style.display="none",this.mentionContainer.remove(),this.setIsOpen(!1),this.quill.root.removeAttribute("aria-activedescendant")}},{key:"highlightItem",value:function(){for(var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=0;e<this.mentionList.childNodes.length;e+=1)this.mentionList.childNodes[e].classList.remove("selected");if(-1!==this.itemIndex&&"true"!==this.mentionList.childNodes[this.itemIndex].dataset.disabled&&(this.mentionList.childNodes[this.itemIndex].classList.add("selected"),this.quill.root.setAttribute("aria-activedescendant",this.mentionList.childNodes[this.itemIndex].id),t)){var n=this.mentionList.childNodes[this.itemIndex].offsetHeight,r=this.mentionList.childNodes[this.itemIndex].offsetTop,o=this.mentionContainer.scrollTop,i=o+this.mentionContainer.offsetHeight;r<o?this.mentionContainer.scrollTop=r:r>i-n&&(this.mentionContainer.scrollTop+=r-i+n)}}},{key:"getItemData",value:function(){var t=this.mentionList.childNodes[this.itemIndex].dataset.link,e=void 0!==t,n=this.mentionList.childNodes[this.itemIndex].dataset.target;return e&&(this.mentionList.childNodes[this.itemIndex].dataset.value='<a href="'.concat(t,'" target=').concat(n||this.options.linkTarget,">").concat(this.mentionList.childNodes[this.itemIndex].dataset.value)),this.mentionList.childNodes[this.itemIndex].dataset}},{key:"onContainerMouseMove",value:function(){this.suspendMouseEnter=!1}},{key:"selectItem",value:function(){var t=this;if(-1!==this.itemIndex){var e=this.getItemData();e.disabled||(this.options.onSelect(e,(function(e){t.insertItem(e)})),this.hideMentionList())}}},{key:"insertItem",value:function(t,e){var n,r=t;null!==r&&(this.options.showDenotationChar||(r.denotationChar=""),e?n=this.cursorPos:(n=this.mentionCharPos,this.quill.deleteText(this.mentionCharPos,this.cursorPos-this.mentionCharPos,i().sources.USER)),this.quill.insertEmbed(n,this.options.blotName,r,i().sources.USER),this.options.spaceAfterInsert?(this.quill.insertText(n+1," ",i().sources.USER),this.quill.setSelection(n+2,i().sources.USER)):this.quill.setSelection(n+1,i().sources.USER),this.hideMentionList())}},{key:"onItemMouseEnter",value:function(t){if(!this.suspendMouseEnter){var e=Number(t.target.dataset.index);Number.isNaN(e)||e===this.itemIndex||(this.itemIndex=e,this.highlightItem(!1))}}},{key:"onDisabledItemMouseEnter",value:function(t){this.suspendMouseEnter||(this.itemIndex=-1,this.highlightItem(!1))}},{key:"onItemClick",value:function(t){0===t.button&&(t.preventDefault(),t.stopImmediatePropagation(),this.itemIndex=t.currentTarget.dataset.index,this.highlightItem(),this.selectItem())}},{key:"onItemMouseDown",value:function(t){t.preventDefault(),t.stopImmediatePropagation()}},{key:"renderLoading",value:function(){if(this.options.renderLoading())if(this.mentionContainer.getElementsByClassName("ql-mention-loading").length>0)this.showMentionList();else{this.mentionList.innerHTML="";var t=document.createElement("div");t.className="ql-mention-loading",t.innerHTML=this.options.renderLoading(),this.mentionContainer.append(t),this.showMentionList()}}},{key:"removeLoading",value:function(){var t=this.mentionContainer.getElementsByClassName("ql-mention-loading");t.length>0&&t[0].remove()}},{key:"renderList",value:function(t,e,n){if(e&&e.length>0){this.removeLoading(),this.values=e,this.mentionList.innerHTML="";for(var r=-1,o=0;o<e.length;o+=1){var i=document.createElement("li");i.id="quill-mention-item-"+o,i.className=this.options.listItemClass?this.options.listItemClass:"",e[o].disabled?(i.className+=" disabled",i.setAttribute("aria-hidden","true")):-1===r&&(r=o),i.dataset.index=o,i.innerHTML=this.options.renderItem(e[o],n),e[o].disabled?i.onmouseenter=this.onDisabledItemMouseEnter.bind(this):(i.onmouseenter=this.onItemMouseEnter.bind(this),i.onmouseup=this.onItemClick.bind(this),i.onmousedown=this.onItemMouseDown.bind(this)),i.dataset.denotationChar=t,this.mentionList.appendChild(O(i,e[o],this.options.dataAttributes))}this.itemIndex=r,this.highlightItem(),this.showMentionList()}else this.hideMentionList()}},{key:"nextItem",value:function(){var t,e=0;do{e++,t=(this.itemIndex+e)%this.values.length;var n="true"===this.mentionList.childNodes[t].dataset.disabled;if(e===this.values.length+1){t=-1;break}}while(n);this.itemIndex=t,this.suspendMouseEnter=!0,this.highlightItem()}},{key:"prevItem",value:function(){var t,e=0;do{e++,t=(this.itemIndex+this.values.length-e)%this.values.length;var n="true"===this.mentionList.childNodes[t].dataset.disabled;if(e===this.values.length+1){t=-1;break}}while(n);this.itemIndex=t,this.suspendMouseEnter=!0,this.highlightItem()}},{key:"containerBottomIsNotVisible",value:function(t,e){return t+this.mentionContainer.offsetHeight+e.top>window.pageYOffset+window.innerHeight}},{key:"containerRightIsNotVisible",value:function(t,e){return!this.options.fixMentionsToQuill&&t+this.mentionContainer.offsetWidth+e.left>window.pageXOffset+document.documentElement.clientWidth}},{key:"setIsOpen",value:function(t){this.isOpen!==t&&(t?this.options.onOpen():this.options.onClose(),this.isOpen=t)}},{key:"setMentionContainerPosition",value:function(){"fixed"===this.options.positioningStrategy?this.setMentionContainerPosition_Fixed():this.setMentionContainerPosition_Normal()}},{key:"setMentionContainerPosition_Normal",value:function(){var t=this,e=this.quill.container.getBoundingClientRect(),n=this.quill.getBounds(this.mentionCharPos),r=this.mentionContainer.offsetHeight,o=this.options.offsetTop,i=this.options.offsetLeft;if(this.options.fixMentionsToQuill){this.mentionContainer.style.right="".concat(0,"px")}else i+=n.left;if(this.containerRightIsNotVisible(i,e)){var a=this.mentionContainer.offsetWidth+this.options.offsetLeft;i=e.width-a}if("top"===this.options.defaultMenuOrientation){if((o=this.options.fixMentionsToQuill?-1*(r+this.options.offsetTop):n.top-(r+this.options.offsetTop))+e.top<=0){var s=this.options.offsetTop;this.options.fixMentionsToQuill?s+=e.height:s+=n.bottom,o=s}}else if(this.options.fixMentionsToQuill?o+=e.height:o+=n.bottom,this.containerBottomIsNotVisible(o,e)){var l=-1*this.options.offsetTop;this.options.fixMentionsToQuill||(l+=n.top),o=l-r}o>=0?this.options.mentionContainerClass.split(" ").forEach((function(e){t.mentionContainer.classList.add("".concat(e,"-bottom")),t.mentionContainer.classList.remove("".concat(e,"-top"))})):this.options.mentionContainerClass.split(" ").forEach((function(e){t.mentionContainer.classList.add("".concat(e,"-top")),t.mentionContainer.classList.remove("".concat(e,"-bottom"))})),this.mentionContainer.style.top="".concat(o,"px"),this.mentionContainer.style.left="".concat(i,"px"),this.mentionContainer.style.visibility="visible"}},{key:"setMentionContainerPosition_Fixed",value:function(){var t=this;this.mentionContainer.style.position="fixed",this.mentionContainer.style.height=null;var e,n="object"!==a(e=this.quill.container.getBoundingClientRect())||null===e?e:JSON.parse(JSON.stringify(e));n.top+=window.scrollY;var r=this.quill.getBounds(this.mentionCharPos),o={left:n.left+r.left,top:n.top+r.top,width:0,height:r.height},i=this.options.fixMentionsToQuill?n:o,s=this.options.offsetTop,l=this.options.offsetLeft;if(this.options.fixMentionsToQuill){var u=i.right;this.mentionContainer.style.right="".concat(u,"px")}else(l+=i.left)+this.mentionContainer.offsetWidth>document.documentElement.clientWidth&&(l-=l+this.mentionContainer.offsetWidth-document.documentElement.clientWidth);var c=i.top,d=document.documentElement.clientHeight-(i.top+i.height),f=this.mentionContainer.offsetHeight<=d,h=this.mentionContainer.offsetHeight<=c;"bottom"===("top"===this.options.defaultMenuOrientation&&h?"top":"bottom"===this.options.defaultMenuOrientation&&f||d>c?"bottom":"top")?(s=i.top+i.height,f||(this.mentionContainer.style.height=d-3+"px"),this.options.mentionContainerClass.split(" ").forEach((function(e){t.mentionContainer.classList.add("".concat(e,"-bottom")),t.mentionContainer.classList.remove("".concat(e,"-top"))}))):(s=i.top-this.mentionContainer.offsetHeight,h||(this.mentionContainer.style.height=c-3+"px",s=3),this.options.mentionContainerClass.split(" ").forEach((function(e){t.mentionContainer.classList.add("".concat(e,"-top")),t.mentionContainer.classList.remove("".concat(e,"-bottom"))}))),this.mentionContainer.style.top="".concat(s,"px"),this.mentionContainer.style.left="".concat(l,"px"),this.mentionContainer.style.visibility="visible"}},{key:"getTextBeforeCursor",value:function(){var t=Math.max(0,this.cursorPos-this.options.maxChars);return this.quill.getText(t,this.cursorPos-t)}},{key:"onSomethingChange",value:function(){var t=this,e=this.quill.getSelection();if(null!=e){this.cursorPos=e.index;var n,r=this.getTextBeforeCursor(),o=(n=r,this.options.mentionDenotationChars.reduce((function(t,e){var r=n.lastIndexOf(e);return r>t.mentionCharIndex?{mentionChar:e,mentionCharIndex:r}:{mentionChar:t.mentionChar,mentionCharIndex:t.mentionCharIndex}}),{mentionChar:null,mentionCharIndex:-1})),i=o.mentionChar,a=o.mentionCharIndex;if(function(t,e,n){return t>-1&&!(n&&0!==t&&!e[t-1].match(/\s/g))}(a,r,this.options.isolateCharacter)){var s=this.cursorPos-(r.length-a);this.mentionCharPos=s;var l=r.substring(a+i.length);if(l.length>=this.options.minChars&&function(t,e){return e.test(t)}(l,this.getAllowedCharsRegex(i))){this.existingSourceExecutionToken&&(this.existingSourceExecutionToken.abandoned=!0),this.renderLoading();var u={abandoned:!1};this.existingSourceExecutionToken=u,this.options.source(l,(function(e,n){u.abandoned||(t.existingSourceExecutionToken=null,t.renderList(i,e,n))}),i)}else this.existingSourceExecutionToken&&(this.existingSourceExecutionToken.abandoned=!0),this.hideMentionList()}else this.existingSourceExecutionToken&&(this.existingSourceExecutionToken.abandoned=!0),this.hideMentionList()}}},{key:"getAllowedCharsRegex",value:function(t){return this.options.allowedChars instanceof RegExp?this.options.allowedChars:this.options.allowedChars(t)}},{key:"onTextChange",value:function(t,e,n){"user"===n&&this.onSomethingChange()}},{key:"onSelectionChange",value:function(t){t&&0===t.length?this.onSomethingChange():this.hideMentionList()}},{key:"openMenu",value:function(t){var e=this.quill.getSelection(!0);this.quill.insertText(e.index,t),this.quill.blur(),this.quill.focus()}}]),t}();i().register("modules/mention",D);function L(t,e){t=t.replace(/=/g,"");var n=[];switch(e.constructor){case String:case Number:case Boolean:n.push(encodeURIComponent(t)+"="+encodeURIComponent(e));break;case Array:e.forEach((function(e){n=n.concat(L(t+"[]=",e))}));break;case Object:Object.keys(e).forEach((function(r){var o=e[r];n=n.concat(L(t+"["+r+"]",o))}))}return n}function A(t){var e=[];return t.forEach((function(t){"string"==typeof t?e.push(t):e=e.concat(A(t))})),e}function T(t,e,n){if(void 0===e&&(e={}),"string"!=typeof t)throw new Error('[Vue-jsonp] Type of param "url" is not string.');if("object"!=typeof e||!e)throw new Error("[Vue-jsonp] Invalid params, should be an object.");return n="number"==typeof n?n:5e3,new Promise((function(r,o){var i="string"==typeof e.callbackQuery?e.callbackQuery:"callback",a="string"==typeof e.callbackName?e.callbackName:"jsonp_"+(Math.floor(1e5*Math.random())*Date.now()).toString(16);e[i]=a,delete e.callbackQuery,delete e.callbackName;var s=[];Object.keys(e).forEach((function(t){s=s.concat(L(t,e[t]))}));var l=A(s).join("&"),u=function(){c(),clearTimeout(f),o({status:400,statusText:"Bad Request"})},c=function(){h.removeEventListener("error",u)},d=function(){document.body.removeChild(h),delete window[a]},f=null;n>-1&&(f=setTimeout((function(){c(),d(),o({statusText:"Request Timeout",status:408})}),n)),window[a]=function(t){clearTimeout(f),c(),d(),r(t)};var h=document.createElement("script");h.addEventListener("error",u),h.src=t+(/\?/.test(t)?"&":"?")+l,document.body.appendChild(h)}))}const N={name:"ChatEmoji",props:{searchKey:{type:String,default:""}},data:function(){return{type:"emoji",emoticonPath:"",emosearchKey:"",emosearchCache:null,emosearchLoad:!1,emosearchTimer:null,emosearchList:[]}},mounted:function(){},watch:{type:function(){this.onEmosearch()},emosearchKey:function(){this.onEmosearch()},searchKey:{handler:function(t){this.emosearchKey=t},immediate:!0}},computed:{list:function(){var t=this;if("emoji"===this.type)return $A.isArray(window.emojiData)?window.emojiData.sort((function(t,e){return t.emoji_order-e.emoji_order})).map((function(t){return{type:"emoji",name:t.name,html:t.code_decimal}})):[];if("emosearch"===this.type)return this.emosearchList;if("emoticon"===this.type){var e=this.emoticonList.find((function(e){return e.path===t.emoticonPath}));if(e)return e.list}return[]},emoticonList:function(){if($A.isArray(window.emoticonData)){var t=$A.apiUrl("../images/emoticon");return window.emoticonData.map((function(e){return Object.assign(e,{src:"".concat(t,"/").concat(e.path,"/").concat(e.icon),list:e.list.map((function(n){return Object.assign(n,{type:"emoticon",asset:"images/emoticon/".concat(e.path,"/").concat(n.path),src:"".concat(t,"/").concat(e.path,"/").concat(n.path)})}))})}))}return[]}},methods:{onEmosearch:function(){var t=this;"emosearch"===this.type&&this.emosearchCache!==this.emosearchKey&&(this.emosearchCache=this.emosearchKey,this.emosearchLoad=!0,this.emosearchTimer&&clearTimeout(this.emosearchTimer),this.emosearchTimer=setTimeout((function(e){T("https://pic.sogou.com/napi/wap/pic",{query:t.emosearchKey+" 表情"}).then((function(e){if(t.emosearchList=[],0===e.status){var n=e.data.items;n.length>0&&(t.emosearchList=n.map((function(t){return{type:"emoticon",asset:"emosearch",name:t.title,src:t.thumbUrl,height:t.thumbHeight,width:t.thumbWidth}})))}0===t.emosearchList.length&&$A.noticeWarning("没有搜索到任何表情")})).catch((function(e){t.emosearchList=[],$A.noticeWarning("搜索结果为空")})).finally((function(e){t.emosearchLoad=!1}))}),300))},onEmoticon:function(t){this.type="emoticon",this.emoticonPath=t},onSelect:function(t,e){"emoji"===e.type?this.$emit("on-select",{type:"emoji",text:t.target.innerText}):this.$emit("on-select",e)}}};var $=n(51900);const I=(0,$.Z)(N,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"chat-emoji-wrapper"},[e("div",{staticClass:"chat-emoji-box"},["emosearch"===t.type?e("div",{staticClass:"chat-emoji-emosearch"},[e("Input",{attrs:{clearable:"",placeholder:t.$L("搜索表情")},model:{value:t.emosearchKey,callback:function(e){t.emosearchKey=e},expression:"emosearchKey"}},[e("Icon",{class:{"icon-loading":t.emosearchLoad},attrs:{slot:"prefix",type:t.emosearchLoad?"ios-loading":"ios-search"},slot:"prefix"})],1)],1):t._e(),t._v(" "),e("ul",{staticClass:"scrollbar-overlay",class:[t.type,"no-dark-content"]},t._l(t.list,(function(n){return e("li",{on:{click:function(e){return t.onSelect(e,n)}}},["emoticon"===n.type?e("img",{attrs:{src:n.src,title:n.name,alt:n.name}}):e("span",{attrs:{title:n.name},domProps:{innerHTML:t._s(n.html)}})])})),0)]),t._v(" "),e("ul",{staticClass:"chat-emoji-menu"},[e("li",{class:{active:"emosearch"===t.type},on:{click:function(e){t.type="emosearch"}}},[e("i",{staticClass:"taskfont"},[t._v("")])]),t._v(" "),e("li",{class:{active:"emoji"===t.type},on:{click:function(e){t.type="emoji"}}},[e("span",{staticClass:"no-dark-content"},[t._v("😀")])]),t._v(" "),t._l(t.emoticonList,(function(n){return e("li",{class:{active:"emoticon"===t.type&&t.emoticonPath==n.path},on:{click:function(e){return t.onEmoticon(n.path)}}},[e("img",{attrs:{title:n.name,alt:n.name,src:n.src}})])}))],2)])}),[],!1,null,null,null).exports;var P="ontouchend"in document;const j={bind:function(t,e){var n=!1;t.__touchMouseDown__=function(t){t.preventDefault(),n=!0,e.value("down",t)},t.__touchMouseMove__=function(t){n&&e.value("move",t)},t.__touchMouseUp__=function(t){n&&(n=!1,e.value("up"))},P?(t.addEventListener("touchstart",t.__touchMouseDown__),t.addEventListener("touchmove",t.__touchMouseMove__),t.addEventListener("touchend",t.__touchMouseUp__)):(t.addEventListener("mousedown",t.__touchMouseDown__),document.addEventListener("mousemove",t.__touchMouseMove__),document.addEventListener("mouseup",t.__touchMouseUp__))},update:function(){},unbind:function(t){P?(t.removeEventListener("touchstart",t.__touchMouseDown__),t.removeEventListener("touchmove",t.__touchMouseMove__),t.removeEventListener("touchend",t.__touchMouseUp__)):(t.removeEventListener("mousedown",t.__touchMouseDown__),document.removeEventListener("mousemove",t.__touchMouseMove__),document.removeEventListener("mouseup",t.__touchMouseUp__)),delete t.__touchMouseDown__,delete t.__touchMouseMove__,delete t.__touchMouseUp__}};function M(t){return void 0===t&&(t=document.body),!0===t?document.body:t instanceof window.Node?t:document.querySelector(t)}const R={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),M(r).appendChild(t),a=!0),t.__transferDomData||(t.__transferDomData={parentNode:o,home:i,target:M(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),M(n).appendChild(t),t.__transferDomData=Object.assign({},t.__transferDomData,{hasMovedOut:!0,target:M(n)})):a&&!1===n?(o.replaceChild(t,i),t.__transferDomData=Object.assign({},t.__transferDomData,{hasMovedOut:!1,target:M(n)})):n&&M(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 B=n(28456),q=n(80641);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)}function U(t){return function(t){if(Array.isArray(t))return z(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 z(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 z(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 z(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function H(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function V(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?H(Object(n),!0).forEach((function(e){W(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):H(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function W(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const K={name:"ChatInput",components:{ChatEmoji:I},directives:{touchmouse:j,TransferDom:R,clickoutside:B.Z},props:{value:{type:[String,Number],default:""},dialogId:{type:Number,default:0},taskId:{type:Number,default:0},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1},disabledRecord:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},enterSend:{type:[String,Boolean],default:null},emojiBottom:{type:Boolean,default:!1},options:{type:Object,default:function(){return{}}},maxlength:{type:Number},defaultMenuOrientation:{type:String,default:"top"},replyId:{type:Number,default:0}},data:function(){return{quill:null,isFocus:!1,rangeIndex:0,_content:"",_options:{},mentionMode:"",userList:null,userCache:null,taskList:null,fileList:{},showMore:!1,showEmoji:!1,emojiQuickTimer:null,emojiQuickShow:!1,emojiQuickKey:"",emojiQuickItems:[],observer:null,wrapperWidth:0,wrapperHeight:0,editorHeight:0,recordReady:!1,recordRec:null,recordBlob:null,recordWave:null,recordInter:null,recordState:"stop",recordDuration:0,touchStart:{},touchLimitX:!1,touchLimitY:!1,isSpecVersion:this.checkIOSVersion()}},mounted:function(){var t=this;this.init(),this.observer=new ResizeObserver((function(e){e.some((function(e){var n=e.target,r=e.contentRect;n===t.$el?(t.wrapperWidth=r.width,t.wrapperHeight=r.height):n===t.$refs.editor&&(t.editorHeight=r.height)}))})),this.observer.observe(this.$el),this.observer.observe(this.$refs.editor),this.recordInter=setInterval((function(e){"ing"===t.recordState&&(t.__recordDuration&&t.__recordDuration===t.recordDuration?(t.__recordDuration=null,t.stopRecord(!0),$A.messageWarning("录音失败,请重试")):t.__recordDuration=t.recordDuration)}),1e3),this.$isEEUiApp&&(window.__onPermissionRequest=function(e,n){console.log(e,n),"recordAudio"===e&&!1===n&&t.stopRecord(!0)})},beforeDestroy:function(){this.quill&&(this.quill=null),this.observer&&(this.observer.disconnect(),this.observer=null),this.recordInter&&clearInterval(this.recordInter)},computed:V(V({},(0,r.rn)(["dialogInputCache","cacheProjects","cacheTasks","cacheUserBasic","dialogMsgs","cacheDialogs"])),{},{isEnterSend:function(){return"boolean"==typeof this.enterSend?this.enterSend:this.$store.state.windowLarge},editorStyle:function(){var t=this.wrapperWidth,e=this.editorHeight;return t>0&&e>0&&(t<280||e>40)?{width:"100%"}:{}},recordTransferStyle:function(){var t=this.windowScrollY;return t>0?{marginTop:t/2+"px"}:null},boxClass:function(){var t=[];return["ready","ing"].includes(this.recordState)&&("ing"===this.recordState&&this.recordDuration>0?t.push("record-progress"):t.push("record-ready")),this.showMore&&t.push("show-more"),this.showEmoji&&t.push("show-emoji"),this.mentionMode&&t.push(this.mentionMode),t},sendClass:function(){return this.value?"sender":this.recordReady?"recorder":""},recordFormatDuration:function(){var t=this.recordDuration,e=Math.floor(t/6e4),n=Math.floor(t/1e3)%60,r=("00"+t%1e3).substr(-2);return e<10&&(e="0".concat(e)),n<10&&(n="0".concat(n)),"".concat(e,":").concat(n,"″").concat(r)},dialogData:function(){var t=this;return this.dialogId>0&&this.cacheDialogs.find((function(e){return e.id==t.dialogId}))||{}},replyData:function(){var t=this.replyId;return t>0?this.dialogMsgs.find((function(e){return e.id===t})):null},cacheKey:function(){return this.dialogId||"t_".concat(this.taskId)}}),watch:{value:function(t){this.quill&&(t&&t!==this._content?(this._content=t,this.setContent(t)):t||this.quill.setText("")),this.$store.dispatch("saveDialogInputCache",{key:this.cacheKey,cache:t})},disabled:function(t){this.quill&&this.quill.enable(!t)},dialogId:function(){this.userList=null,this.userCache=null,this.taskList=null,this.fileList={},this.$emit("input",this.getInputCache())},taskId:function(){this.userList=null,this.userCache=null,this.taskList=null,this.fileList={},this.$emit("input",this.getInputCache())},showEmoji:function(t){if(t){var e=this.value.replace(/ /g," ");if((e=e.replace(/<[^>]+>/g,""))&&-1===e.indexOf(" ")&&e.length>=1&&e.length<=4?this.emojiQuickKey=e:this.emojiQuickKey="",this.showMore=!1,this.emojiQuickShow=!1,this.quill){var n=this.quill.selection.savedRange;this.rangeIndex=n?n.index:0}}else this.rangeIndex>0&&this.quill.setSelection(this.rangeIndex);this.$emit("on-emoji-visible-change",t)},showMore:function(t){t&&(this.showEmoji=!1),this.$emit("on-more-visible-change",t)},isFocus:function(t){var e=this;this.timerScroll&&clearInterval(this.timerScroll),t?(this.$emit("on-focus"),this.hidePopover(),this.isSpecVersion||this.windowSmall&&(this.timerScroll=setInterval((function(){var t;null!==(t=e.quill)&&void 0!==t&&t.hasFocus()?e.windowScrollY>0&&$A.scrollIntoViewIfNeeded(e.$refs.editor):clearInterval(e.timerScroll)}),200))):this.$emit("on-blur")},recordState:function(t){this.$emit("on-record-state",t)},dialogInputCache:function(){this.isFocus||this.$emit("input",this.getInputCache())},wrapperHeight:function(t,e){this.$emit("on-height-change",{newVal:t,oldVal:e})}},methods:{init:function(){var t=this;this._options=Object.assign({theme:"bubble",readOnly:!1,placeholder:this.placeholder,modules:{toolbar:[["bold","strike","italic","underline",{list:"ordered"},{list:"bullet"},"blockquote","code-block"]],keyboard:{bindings:{"short enter":{key:13,shortKey:!0,handler:function(e){return!!t.isEnterSend||(t.onSend(),!1)}},enter:{key:13,shiftKey:!1,handler:function(e){return!t.isEnterSend||(t.onSend(),!1)}},esc:{key:27,shiftKey:!1,handler:function(e){return!t.emojiQuickShow||(t.emojiQuickShow=!1,!1)}}}},mention:{allowedChars:/^\S*$/,mentionDenotationChars:["@","#","~"],defaultMenuOrientation:this.defaultMenuOrientation,isolateCharacter:!0,positioningStrategy:"fixed",renderItem:function(t){if(!0===t.disabled)return'<div class="mention-item-disabled">'.concat(t.value,"</div>");if(0===t.id)return'<div class="mention-item-at">@</div><div class="mention-item-name">'.concat(t.value,'</div><div class="mention-item-tip">').concat(t.tip,"</div>");if(t.avatar){var e=t.bot?'<div class="taskfont mention-item-bot"></div>':"";return'<div class="mention-item-img'.concat(t.online?" online":"",'"><img src="').concat(t.avatar,'"/><em></em></div>').concat(e,'<div class="mention-item-name">').concat(t.value,"</div>")}return'<div class="mention-item-name" title="'.concat(t.value,'">').concat(t.value,"</div>")},renderLoading:function(){return"Loading..."},source:function(e,n,r){for(var o="@"==r?"user-mention":"#"==r?"task-mention":"file-mention",i=document.getElementsByClassName("ql-mention-list-container"),a=0;a<i.length;a++)i[a].classList.remove("user-mention"),i[a].classList.remove("task-mention"),i[a].classList.remove("file-mention"),i[a].classList.add(o),$A.scrollPreventThrough(i[a]);var s=null;t.getMentionSource(r,e,(function(t){var r=[];t.some((function(t){var n=t.list;e&&(n=n.filter((function(t){var n=t.value;return $A.strExists(n,e)}))),n.length>0&&(t.label&&r.push.apply(r,U(t.label)),r.push.apply(r,U(n)))})),$A.jsonStringify(r.map((function(t){return t.id})))!==s&&(s=$A.jsonStringify(r.map((function(t){return t.id}))),n(r,e))}))}}}},this.options),this.quill=new(i())(this.$refs.editor,this._options),this.quill.enable(!1),this.value?this.setContent(this.value):this.$emit("input",this.getInputCache()),this.disabled||this.quill.enable(!0),this.quill.on("selection-change",(function(e){if(!e){if(t.quill.hasFocus())return void t.quill.setSelection(0);if(document.activeElement&&"ql-clipboard"===document.activeElement.className)return void t.quill.setSelection(t.quill.getLength())}t.isFocus=!!e})),this.quill.on("text-change",(function(e){t.maxlength>0&&t.quill.getLength()>t.maxlength&&t.quill.deleteText(t.maxlength,t.quill.getLength());var n=t.$refs.editor.children[0].innerHTML;n=(n=n.replace(/^(<p>\s*<\/p>)+|(<p>\s*<\/p>)+$/gi,"")).replace(/^(<p><br\/*><\/p>)+|(<p><br\/*><\/p>)+$/gi,""),t.updateEmojiQuick(n),t._content=n,t.$emit("input",t._content),t.$nextTick((function(e){var n=t.quill.getSelection();if(n){var r=t.quill.getText(n.index);/^\n\n$/.test(r)&&t.quill.deleteText(n.index,1)}}))})),this.quill.clipboard.addMatcher(Node.ELEMENT_NODE,(function(t,e){return e.ops=e.ops.map((function(e){var n={attributes:{},insert:e.insert};try{"object"===F(n.insert.mention)&&t.innerHTML&&(n.insert=t.innerHTML.replace(/<[^>]+>/g,""))}catch(t){}return e.attributes&&["bold","strike","italic","underline","list","blockquote","link"].some((function(t){e.attributes[t]&&(n.attributes[t]=e.attributes[t])})),n})),e})),this.$emit("on-ready",this.quill),this.disabledRecord||$A.loadScriptS(["js/recorder/recorder.mp3.min.js","js/recorder/lib.fft.js","js/recorder/frequency.histogram.view.js"],(function(e){null===e&&"function"==typeof window.Recorder&&(t.recordRec=window.Recorder({type:"mp3",bitRate:32,sampleRate:16e3,onProcess:function(e,n,r,o,i,a){t.recordWave.input(e[e.length-1],n,o),t.recordDuration=r,r>=18e4&&t.stopRecord(!1)}}),window.Recorder.Support()&&(t.recordReady=!0,t.$nextTick((function(e){t.recordWave=window.Recorder.FrequencyHistogramView({elem:t.$refs.recwave,lineCount:90,position:0,minHeight:1,stripeEnable:!1})}))))}))},updateEmojiQuick:function(t){var e=this;this.isFocus&&t?(this.emojiQuickTimer&&clearTimeout(this.emojiQuickTimer),this.emojiQuickTimer=setTimeout((function(n){if((t=(t=t.replace(/ /g," ")).replace(/<[^>]+>/g,""))&&-1===t.indexOf(" ")&&t.length>=1&&t.length<=4&&$A.isArray(window.emoticonData)){e.emojiQuickItems=[];var r=$A.apiUrl("../images/emoticon");if(window.emoticonData.some((function(n){var o=n.list.find((function(e){return $A.strExists(e.name+(e.key?" ".concat(e.key):""),t)}));if(o&&(e.emojiQuickItems.push(Object.assign(o,{type:"emoticon",asset:"images/emoticon/".concat(n.path,"/").concat(o.path),src:"".concat(r,"/").concat(n.path,"/").concat(o.path)})),e.emojiQuickItems.length>=3))return!0})),e.emojiQuickItems.length>0)return void e.$nextTick((function(t){e.emojiQuickShow=!0,e.$refs.emojiQuickRef.updatePopper()}))}e.emojiQuickShow=!1}),100)):this.emojiQuickShow=!1},setText:function(t){this.quill&&this.quill.setText(t)},setContent:function(t){this.quill&&this.quill.setContents(this.quill.clipboard.convert(t))},getInputCache:function(){var t=this,e=this.dialogInputCache.find((function(e){return e.key==t.cacheKey}));return e?e.cache:""},onClickEditor:function(){this.updateEmojiQuick(this.value)},focus:function(){var t=this;this.$nextTick((function(){t.quill&&(t.quill.setSelection(t.quill.getLength()),t.quill.focus())}))},blur:function(){var t=this;this.$nextTick((function(){t.quill&&t.quill.blur()}))},clickSend:function(t,e){if(!this.loading)switch(t){case"down":if(this.touchLimitX=!1,this.touchLimitY=!1,this.touchStart="touchstart"===e.type?e.touches[0]:e,this.startRecord())return;break;case"move":var n="touchmove"===e.type?e.touches[0]:e;this.touchLimitX=(this.touchStart.clientX-n.clientX)/window.innerWidth>.1,this.touchLimitY=(this.touchStart.clientY-n.clientY)/window.innerHeight>.1;break;case"up":if(this.stopRecord(this.touchLimitY))return;if(this.touchLimitY||this.touchLimitX)return;this.onSend()}},onSend:function(){this.rangeIndex=0,this.$emit("on-send")},startRecord:function(){var t=this;return"recorder"===this.sendClass&&(q.Store.set("audioSubscribe",!0),this.recordDuration=0,this.recordState="ready",this.$nextTick((function(e){t.recordRec.open((function(e){"ready"===t.recordState?(t.recordState="ing",t.recordBlob=null,setTimeout((function(e){t.recordRec.start()}),300)):t.recordRec.close()}),(function(e){t.recordState="stop",$A.messageError(e||"打开录音失败")}))})),!0)},stopRecord:function(t){var e=this;switch(this.recordState){case"ing":return this.recordState="stop",this.recordRec.stop((function(n,r){e.recordRec.close(),!0!==t&&(r<600?$A.messageWarning("说话时间太短"):(e.recordBlob=n,e.uploadRecord(r)))}),(function(t){e.recordRec.close(),$A.messageError(t||"录音失败")})),!0;case"ready":return this.recordState="stop",!0;default:return this.recordState="stop",!1}},hidePopover:function(){this.showMore=!1,this.showEmoji=!1,this.emojiQuickShow=!1},onClickCover:function(){var t=this;this.hidePopover(),this.$nextTick((function(e){var n;null===(n=t.quill)||void 0===n||n.focus()}))},uploadRecord:function(t){var e=this;if(null!==this.recordBlob){var n=new FileReader;n.onloadend=function(){e.$emit("on-record",{type:e.recordBlob.type,base64:n.result,duration:t})},n.readAsDataURL(this.recordBlob)}},onEmojiQuick:function(t){"online"===t.type?(this.$emit("input",""),this.$emit("on-send",'<img src="'.concat(t.src,'"/>'))):(this.$emit("input",""),this.$emit("on-send",'<img class="emoticon" data-asset="'.concat(t.asset,'" data-name="').concat(t.name,'" src="').concat(t.src,'"/>'))),this.emojiQuickShow=!1,this.focus()},onSelectEmoji:function(t){this.quill&&("emoji"===t.type?(this.quill.insertText(this.rangeIndex,t.text),this.rangeIndex+=t.text.length,this.windowLarge&&(this.showEmoji=!1)):"emoticon"===t.type&&(this.$emit("on-send",'<img class="emoticon" data-asset="'.concat(t.asset,'" data-name="').concat(t.name,'" src="').concat(t.src,'"/>')),"emosearch"===t.asset&&this.$emit("input",""),this.windowLarge&&(this.showEmoji=!1)))},onCancelReply:function(){this.$emit("on-cancel-reply")},onToolbar:function(t){switch(this.hidePopover(),t){case"user":this.openMenu("@");break;case"task":this.openMenu("#");break;case"meeting":q.Store.set("addMeeting",{type:"create",dialog_id:this.dialogId,userids:[this.userId]});break;case"call":case"image":case"file":this.$emit("on-more",t)}},onMoreVisibleChange:function(t){this.showMore=t},openMenu:function(t){if(this.quill)if(0===this.value.length||this.value.endsWith("<p><br></p>"))this.quill.getModule("mention").openMenu(t);else{var e=this.value.replace(/<[^>]+>/g,"");0===e.length||e.endsWith(" ")?this.quill.getModule("mention").openMenu(t):this.quill.getModule("mention").openMenu(" ".concat(t))}},getProjectId:function(){var t=this,e=null;if(this.dialogId>0){if(e=this.cacheProjects.find((function(e){return e.dialog_id==t.dialogId})))return e.id;if(e=this.cacheTasks.find((function(e){return e.dialog_id==t.dialogId})))return e.project_id}else if(this.taskId>0&&(e=this.cacheTasks.find((function(e){return e.id==t.taskId}))))return e.project_id;return 0},getMentionSource:function(t,e,n){var r=this;switch(t){case"@":this.mentionMode="user-mention";var o=function(t){r.getMoreUser(e,t.map((function(t){return t.id}))).then((function(e){var o,i;(r.userList=t,r.userCache=[],e.length>0)?(t.length>2&&r.userCache.push({label:null,list:[{id:0,value:r.$L("所有人"),tip:r.$L("仅提示会话内成员")}]}),(o=r.userCache).push.apply(o,[{label:[{id:0,value:r.$L("会话内成员"),disabled:!0}],list:t},{label:[{id:0,value:r.$L("会话以外成员"),disabled:!0}],list:e}])):t.length>2?(i=r.userCache).push.apply(i,[{label:null,list:[{id:0,value:r.$L("所有人"),tip:r.$L("提示所有成员")}]},{label:[{id:0,value:r.$L("会话内成员"),disabled:!0}],list:t}]):r.userCache.push({label:null,list:t});n(r.userCache)}))};if(this.dialogData.people&&$A.arrayLength(this.userList)!==this.dialogData.people&&(this.userList=null,this.userCache=null),null!==this.userCache&&n(this.userCache),null!==this.userList)return void o(this.userList);var i=[];if(this.dialogId>0)this.$store.dispatch("call",{url:"dialog/user",data:{dialog_id:this.dialogId,getuser:1}}).then((function(t){var e=t.data;r.cacheDialogs.find((function(t){return t.id==r.dialogId}))&&r.$store.dispatch("saveDialog",{id:r.dialogId,people:e.length}),e.length>0&&i.push.apply(i,U(e.map((function(t){return{id:t.userid,value:t.nickname,avatar:t.userimg,online:t.online,bot:t.bot}})))),o(i)})).catch((function(t){o(i)}));else if(this.taskId>0){var a=this.cacheTasks.find((function(t){return t.id==r.taskId}));a&&$A.isArray(a.task_user)&&a.task_user.some((function(t){var e=r.cacheUserBasic.find((function(e){return e.userid==t.userid}));e&&i.push({id:e.userid,value:e.nickname,avatar:e.userimg,online:e.online,bot:e.bot})})),o(i)}break;case"#":if(this.mentionMode="task-mention",null!==this.taskList)return void n(this.taskList);var s=function(t){r.taskList=[],t.length>0&&(t=t.map((function(t){return{id:t.id,value:t.name}})),r.taskList.push({label:[{id:0,value:r.$L("项目未完成任务"),disabled:!0}],list:t}));var e=r.$store.getters.transforTasks(r.$store.getters.dashboardTask.all);e.length>0&&(e=e.sort((function(t,e){return $A.Date(t.end_at||"2099-12-31 23:59:59")-$A.Date(e.end_at||"2099-12-31 23:59:59")})),r.taskList.push({label:[{id:0,value:r.$L("我的待完成任务"),disabled:!0}],list:e.map((function(t){return{id:t.id,value:t.name}}))}));var o=r.$store.getters.assistTask;o.length>0&&(o=o.sort((function(t,e){return $A.Date(t.end_at||"2099-12-31 23:59:59")-$A.Date(e.end_at||"2099-12-31 23:59:59")})),r.taskList.push({label:[{id:0,value:r.$L("我协助的任务"),disabled:!0}],list:o.map((function(t){return{id:t.id,value:t.name}}))})),n(r.taskList)},l=this.getProjectId();if(l>0)return void this.$store.dispatch("getTaskForProject",l).then((function(t){var e=r.cacheTasks.filter((function(t){return!t.archived_at&&(t.project_id==l&&0===t.parent_id&&!t.archived_at&&!t.complete_at)}));e.length>0?s(e):s([])})).catch((function(t){s([])}));s([]);break;case"~":if(this.mentionMode="file-mention",$A.isArray(this.fileList[e]))return void n(this.fileList[e]);this.fileTimer&&clearTimeout(this.fileTimer),this.fileTimer=setTimeout((function(t){r.$store.dispatch("searchFiles",e).then((function(t){var o=t.data;r.fileList[e]=[{label:[{id:0,value:r.$L("文件分享查看"),disabled:!0}],list:o.filter((function(t){return"folder"!==t.type})).map((function(t){return{id:t.id,value:t.ext?"".concat(t.name,".").concat(t.ext):t.name}}))}],n(r.fileList[e])})).catch((function(){n([])}))}),300);break;default:n([])}},getMoreUser:function(t,e){var n=this;return new Promise((function(r){var o=n.dialogData,i=o.owner_id,a="group"===o.type&&[0,n.userId].includes(i);n.taskId>0||a?(n.__getMoreTimer&&clearTimeout(n.__getMoreTimer),n.__getMoreTimer=setTimeout((function(o){n.$store.dispatch("call",{url:"users/search",data:{keys:{key:t},state:1,take:30}}).then((function(t){var n=t.data.filter((function(t){return!e.includes(t.userid)}));r(n.map((function(t){return{id:t.userid,value:t.nickname,avatar:t.userimg,online:!!t.online}})))})).catch((function(t){r([])}))}),null===n.userCache?0:600)):r([])}))},checkIOSVersion:function(){var t=(window&&window.navigator&&window.navigator.userAgent).match(/OS ((\d+_?){2,3})\s/i),e=(t?t[1].replace(/_/g,"."):"unknown").split(".");return 11==+e[0]&&+e[1]>=0&&+e[1]<3},handlePaste:function(t){var e=Array.prototype.slice.call(t.clipboardData.files);e.filter((function(t){return!$A.leftExists(t.type,"image/")})).length>0?(t.preventDefault(),this.$emit("on-file",e)):this.pasteRtf(t)&&t.preventDefault()},pasteRtf:function(t){var e=this;if(t&&t.clipboardData&&t.clipboardData.items&&!(new DOMParser).parseFromString(t.clipboardData.getData("text/html")||"","text/html").querySelector("img")){var n=[],r=null;if(t.clipboardData.types&&-1!=[].indexOf.call(t.clipboardData.types,"text/rtf")||t.clipboardData.getData("text/rtf"))(r=t.clipboardData.items[0].getAsFile())&&n.push(r);else for(var o=0;o<t.clipboardData.items.length;o++)(r=t.clipboardData.items[o].getAsFile())&&n.push(r);if(n.length>0)return n.forEach((function(t){var n=new FileReader;n.onload=function(t){var n=t.target,r=e.quill.getSelection(!0).index;e.quill.insertEmbed(r,"image",n.result),e.quill.setSelection(r+1)},n.readAsDataURL(t)})),!0}return!1}}},Y=K;const Z=(0,$.Z)(Y,(function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:t.hidePopover,expression:"hidePopover"}],staticClass:"chat-input-box",class:t.boxClass},[e("div",{staticClass:"chat-input-quick-emoji"},[e("EPopover",{ref:"emojiQuickRef",attrs:{visibleArrow:!1,transition:"",placement:"top-end",popperClass:"chat-quick-emoji-popover"},model:{value:t.emojiQuickShow,callback:function(e){t.emojiQuickShow=e},expression:"emojiQuickShow"}},[e("div",{attrs:{slot:"reference"},slot:"reference"}),t._v(" "),e("ul",{staticClass:"chat-quick-emoji-wrapper"},t._l(t.emojiQuickItems,(function(n){return e("li",{on:{click:function(e){return t.onEmojiQuick(n)}}},[e("img",{attrs:{title:n.name,alt:n.name,src:n.src}})])})),0)])],1),t._v(" "),e("div",{staticClass:"chat-input-wrapper",on:{click:function(e){return e.stopPropagation(),t.focus.apply(null,arguments)}}},[t.replyData?e("div",{staticClass:"chat-reply"},[e("UserAvatar",{attrs:{userid:t.replyData.userid,"show-icon":!1,"show-name":!0,"tooltip-disabled":!0}}),t._v(" "),e("div",{staticClass:"reply-desc"},[t._v(t._s(t.$A.getMsgSimpleDesc(t.replyData)))]),t._v(" "),e("i",{staticClass:"taskfont",on:{click:function(e){return e.stopPropagation(),t.onCancelReply.apply(null,arguments)}}},[t._v("")])],1):t._e(),t._v(" "),e("div",{ref:"editor",staticClass:"no-dark-content",style:t.editorStyle,on:{click:function(e){return e.stopPropagation(),t.onClickEditor.apply(null,arguments)},paste:t.handlePaste}}),t._v(" "),e("ul",{staticClass:"chat-toolbar",on:{click:function(t){t.stopPropagation()}}},[e("li",[t.emojiBottom?e("ETooltip",{ref:"emojiTip",attrs:{disabled:t.windowSmall||t.$isEEUiApp||t.showEmoji,placement:"top",content:t.$L("表情")}},[e("i",{staticClass:"taskfont",on:{click:function(e){t.showEmoji=!t.showEmoji}}},[t._v("")])]):e("EPopover",{attrs:{visibleArrow:!1,placement:"top",popperClass:"chat-input-emoji-popover"},model:{value:t.showEmoji,callback:function(e){t.showEmoji=e},expression:"showEmoji"}},[e("ETooltip",{ref:"emojiTip",attrs:{slot:"reference",disabled:t.windowSmall||t.$isEEUiApp||t.showEmoji,placement:"top",content:t.$L("表情")},slot:"reference"},[e("i",{staticClass:"taskfont"},[t._v("")])]),t._v(" "),t.showEmoji?e("ChatEmoji",{attrs:{searchKey:t.emojiQuickKey},on:{"on-select":t.onSelectEmoji}}):t._e()],1)],1),t._v(" "),e("li",[e("ETooltip",{attrs:{placement:"top",disabled:t.windowSmall||t.$isEEUiApp,content:t.$L("选择成员")}},[e("i",{staticClass:"taskfont",on:{click:function(e){return t.onToolbar("user")}}},[t._v("")])])],1),t._v(" "),e("li",[e("ETooltip",{attrs:{placement:"top",disabled:t.windowSmall||t.$isEEUiApp,content:t.$L("选择任务")}},[e("i",{staticClass:"taskfont",on:{click:function(e){return t.onToolbar("task")}}},[t._v("")])])],1),t._v(" "),e("li",[e("EPopover",{attrs:{visibleArrow:!1,placement:"top",popperClass:"chat-input-more-popover"},model:{value:t.showMore,callback:function(e){t.showMore=e},expression:"showMore"}},[e("ETooltip",{ref:"moreTip",attrs:{slot:"reference",disabled:t.windowSmall||t.$isEEUiApp||t.showMore,placement:"top",content:t.$L("展开")},slot:"reference"},[e("i",{staticClass:"taskfont"},[t._v("")])]),t._v(" "),t.recordReady?e("div",{staticClass:"chat-input-popover-item",on:{click:function(e){return t.onToolbar("meeting")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v("\n "+t._s(t.$L("新会议"))+"\n ")]):t._e(),t._v(" "),"user"===t.dialogData.type&&t.$isEEUiApp?e("div",{staticClass:"chat-input-popover-item",on:{click:function(e){return t.onToolbar("call")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v("\n "+t._s(t.$L("拨打电话"))+"\n ")]):t._e(),t._v(" "),e("div",{staticClass:"chat-input-popover-item",on:{click:function(e){return t.onToolbar("image")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v("\n "+t._s(t.$L("发送图片"))+"\n ")]),t._v(" "),e("div",{staticClass:"chat-input-popover-item",on:{click:function(e){return t.onToolbar("file")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v("\n "+t._s(t.$L("上传文件"))+"\n ")])],1)],1),t._v(" "),e("li",{directives:[{name:"touchmouse",rawName:"v-touchmouse",value:t.clickSend,expression:"clickSend"}],staticClass:"chat-send",class:t.sendClass},[e("ETooltip",{attrs:{placement:"top",disabled:t.windowSmall||t.$isEEUiApp,content:t.$L("recorder"===t.sendClass?"长按录音":"发送")}},[t.loading?e("div",[e("div",{staticClass:"chat-load"},[e("Loading")],1)]):e("div",[e("transition",{attrs:{name:"mobile-send"}},["recorder"===t.sendClass?e("i",{staticClass:"taskfont"},[t._v("")]):t._e()]),t._v(" "),e("transition",{attrs:{name:"mobile-send"}},["recorder"!==t.sendClass?e("i",{staticClass:"taskfont"},[t._v("")]):t._e()])],1)])],1),t._v(" "),t.recordReady?e("li",{staticClass:"chat-record-recwave"},[e("div",{ref:"recwave"})]):t._e()]),t._v(" "),e("div",{staticClass:"chat-cover",on:{click:function(e){return e.stopPropagation(),t.onClickCover.apply(null,arguments)}}})]),t._v(" "),t.emojiBottom&&t.showEmoji?e("ChatEmoji",{attrs:{searchKey:t.emojiQuickKey},on:{"on-select":t.onSelectEmoji}}):t._e(),t._v(" "),e("transition",{attrs:{name:"fade"}},[["ready","ing"].includes(t.recordState)?e("div",{directives:[{name:"transfer-dom",rawName:"v-transfer-dom"}],staticClass:"chat-input-record-transfer",class:{cancel:t.touchLimitY},style:t.recordTransferStyle,attrs:{"data-transfer":!0},on:{click:t.stopRecord}},[t.recordDuration>0?e("div",{staticClass:"record-duration"},[t._v(t._s(t.recordFormatDuration))]):e("div",{staticClass:"record-loading"},[e("Loading")],1),t._v(" "),e("div",{staticClass:"record-cancel",on:{click:function(e){return e.stopPropagation(),t.stopRecord(!0)}}},[t._v(t._s(t.$L(t.touchLimitY?"松开取消":"向上滑动取消")))])]):t._e()])],1)}),[],!1,null,null,null).exports},7820:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});const r={name:"CheckinExport",components:{UserInput:n(60935).Z},props:{value:{type:Boolean,default:!1}},data:function(){return{show:this.value,loadIng:0,formData:{userid:[],date:[],time:[]}}},watch:{value:function(t){this.show=t},show:function(t){this.value!==t&&this.$emit("input",t)}},methods:{dateShortcuts:function(t){return"prev"===t?[$A.getSpecifyDate("上个月"),$A.getSpecifyDate("上个月结束")]:"this"===t?[$A.getSpecifyDate("本月"),$A.getSpecifyDate("本月结束")]:void 0},onExport:function(){var t=this;this.loadIng>0||(this.loadIng++,this.$store.dispatch("call",{url:"system/checkin/export",data:this.formData}).then((function(e){var n=e.data;t.show=!1,t.$store.dispatch("downUrl",{url:n.url})})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(e){t.loadIng--})))}}};var o=n(93379),i=n.n(o),a=n(78536),s={insert:"head",singleton:!1};i()(a.Z,s);a.Z.locals;const l=(0,n(51900).Z)(r,(function(){var t=this,e=t._self._c;return e("Modal",{attrs:{title:t.$L("导出签到数据"),"mask-closable":!1},model:{value:t.show,callback:function(e){t.show=e},expression:"show"}},[e("Form",{ref:"export",attrs:{model:t.formData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{label:t.$L("导出成员")}},[e("UserInput",{attrs:{"multiple-max":100,placeholder:t.$L("请选择成员")},model:{value:t.formData.userid,callback:function(e){t.$set(t.formData,"userid",e)},expression:"formData.userid"}}),t._v(" "),e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("每次最多选择导出100个成员")))])],1),t._v(" "),e("FormItem",{attrs:{label:t.$L("签到日期")}},[e("DatePicker",{staticStyle:{width:"100%"},attrs:{type:"daterange",format:"yyyy/MM/dd",placeholder:t.$L("请选择签到日期")},model:{value:t.formData.date,callback:function(e){t.$set(t.formData,"date",e)},expression:"formData.date"}}),t._v(" "),e("div",{staticClass:"form-tip checkin-export-quick-select"},[e("span",[t._v(t._s(t.$L("快捷选择"))+":")]),t._v(" "),e("em",{on:{click:function(e){t.formData.date=t.dateShortcuts("prev")}}},[t._v(t._s(t.$L("上个月")))]),t._v(" "),e("em",{on:{click:function(e){t.formData.date=t.dateShortcuts("this")}}},[t._v(t._s(t.$L("这个月")))])])],1),t._v(" "),e("FormItem",{attrs:{label:t.$L("班次时间")}},[e("TimePicker",{staticStyle:{width:"100%"},attrs:{type:"timerange",format:"HH:mm",placeholder:t.$L("请选择班次时间")},model:{value:t.formData.time,callback:function(e){t.$set(t.formData,"time",e)},expression:"formData.time"}}),t._v(" "),e("div",{staticClass:"form-tip checkin-export-quick-select"},[e("span",[t._v(t._s(t.$L("快捷选择"))+":")]),t._v(" "),e("em",{on:{click:function(e){t.formData.time=["8:30","18:00"]}}},[t._v("8:30-18:00")]),t._v(" "),e("em",{on:{click:function(e){t.formData.time=["9:00","18:00"]}}},[t._v("9:00-18:00")]),t._v(" "),e("em",{on:{click:function(e){t.formData.time=["9:30","18:00"]}}},[t._v("9:30-18:30")])])],1)],1),t._v(" "),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(e){t.show=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Button",{attrs:{type:"primary",loading:t.loadIng>0},on:{click:t.onExport}},[t._v(t._s(t.$L("导出")))])],1)],1)}),[],!1,null,null,null).exports},9994:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var r=n(60935),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;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){s(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const l={name:"DialogSelect",components:{UserInput:r.Z},props:{value:{type:Object,default:function(){return{}}}},computed:a(a({},(0,o.rn)(["cacheDialogs"])),{},{dialogList:function(){return this.cacheDialogs.filter((function(t){return!(void 0===t.name||1===t.dialog_delete)})).sort((function(t,e){return t.top_at||e.top_at?$A.Date(e.top_at)-$A.Date(t.top_at):t.todo_num>0||e.todo_num>0?e.todo_num-t.todo_num:$A.Date(e.last_at)-$A.Date(t.last_at)}))}})};const u=(0,n(51900).Z)(l,(function(){var t=this,e=t._self._c;return e("Form",{ref:"forwardForm",attrs:{model:t.value,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{prop:"dialogids",label:t.$L("最近聊天")}},[e("Select",{staticClass:"dialog-wrapper-dialogids",attrs:{placeholder:t.$L("选择转发最近聊天"),"multiple-max":20,multiple:"",filterable:"","transfer-class-name":"dialog-wrapper-forward"},model:{value:t.value.dialogids,callback:function(e){t.$set(t.value,"dialogids",e)},expression:"value.dialogids"}},[e("div",{staticClass:"forward-drop-prepend",attrs:{slot:"drop-prepend"},slot:"drop-prepend"},[t._v(t._s(t.$L("最多只能选择20个")))]),t._v(" "),t._l(t.dialogList,(function(n,r){return e("Option",{key:r,attrs:{value:n.id,"key-value":n.name,label:n.name}},[e("div",{staticClass:"forward-option"},[e("div",{staticClass:"forward-avatar"},["group"==n.type?["department"==n.group_type?e("i",{staticClass:"taskfont icon-avatar department"},[t._v("")]):"project"==n.group_type?e("i",{staticClass:"taskfont icon-avatar project"},[t._v("")]):"task"==n.group_type?e("i",{staticClass:"taskfont icon-avatar task"},[t._v("")]):e("Icon",{staticClass:"icon-avatar",attrs:{type:"ios-people"}})]:n.dialog_user?e("div",{staticClass:"user-avatar"},[e("UserAvatar",{attrs:{userid:n.dialog_user.userid,size:26}})],1):e("Icon",{staticClass:"icon-avatar",attrs:{type:"md-person"}})],2),t._v(" "),e("div",{staticClass:"forward-name"},[t._v(t._s(n.name))])])])}))],2)],1),t._v(" "),e("FormItem",{attrs:{prop:"userids",label:t.$L("指定成员")}},[e("UserInput",{attrs:{"multiple-max":20,placeholder:"(".concat(t.$L("或"),") ").concat(t.$L("选择转发指定成员"))},model:{value:t.value.userids,callback:function(e){t.$set(t.value,"userids",e)},expression:"value.userids"}})],1)],1)}),[],!1,null,null,null).exports},20614:(t,e,n)=>{"use strict";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}n.d(e,{Z:()=>B});var o=n(20629);const i={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,l=[this.point(t,e,r,a),this.point(t,e,n,a),this.point(t,e,n,s),this.point(t,e,r,s)],u=s-a>Math.PI?"1":"0";return"M ".concat(l[0][0]," ").concat(l[0][1]," L ").concat(l[1][0]," ").concat(l[1][1]," A ").concat(n," ").concat(n," 0 ").concat(u," 1 ").concat(l[2][0]," ").concat(l[2][1]," L ").concat(l[3][0]," ").concat(l[3][1]," A ").concat(r," ").concat(r," 0 ").concat(u," 0 ").concat(l[0][0]," ").concat(l[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,l=void 0===s?0:s,u=t.start,c=t.end,d=[Math.max(a,l),Math.min(a,l)];if(l=d[1],(a=d[0])<=0)return"";if(u!==+u||c!==+c)return this.full(n,o,a,l);if(Math.abs(u-c)<1e-6)return"";if(Math.abs(u-c)%360<1e-6)return this.full(n,o,a,l);var f=[u%360,c%360];return(u=f[0])>(c=f[1])&&(c+=360),this.part(n,o,a,l,u,c)}}};var a=n(51900);const s=(0,a.Z)(i,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"common-circle",style:t.style,attrs:{"data-id":t.percent}},[e("svg",{attrs:{viewBox:"0 0 28 28"}},[e("g",{attrs:{fill:"none","fill-rule":"evenodd"}},[e("path",{staticClass:"common-circle-path",attrs:{d:"M-500-100h997V48h-997z"}}),t._v(" "),e("g",{attrs:{"fill-rule":"nonzero"}},[e("path",{staticClass:"common-circle-g-path-ring",attrs:{"stroke-width":"3",d:"M14 25.5c6.351 0 11.5-5.149 11.5-11.5S20.351 2.5 14 2.5 2.5 7.649 2.5 14 7.649 25.5 14 25.5z"}}),t._v(" "),e("path",{staticClass:"common-circle-g-path-core",attrs:{d:t.arc(t.args)}})])])])])}),[],!1,null,null,null).exports;var l=n(80641);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;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){d(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}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:"DialogView",components:{WCircle:s},directives:{longpress:n(8251).Z},props:{msgData:{type:Object,default:function(){return{}}},dialogType:{type:String,default:""},hidePercentage:{type:Boolean,default:!1},hideReply:{type:Boolean,default:!1},operateVisible:{type:Boolean,default:!1},operateAction:{type:Boolean,default:!1},isRightMsg:{type:Boolean,default:!1}},data:function(){return{timeShow:!1,operateEnter:!1,percentageLoad:0,percentageShow:!1,percentageList:[],todoLoad:0,todoShow:!1,todoList:[]}},beforeDestroy:function(){l.Store.set("audioSubscribe",this.msgData.id)},computed:c(c(c({},(0,o.rn)(["loads","audioPlaying"])),(0,o.Se)(["isLoad"])),{},{isLoading:function(){return!this.msgData.created_at||this.isLoad("msg-".concat(this.msgData.id))},viewClass:function(){var t=this.msgData,e=this.operateAction,n=this.operateEnter,r=[];return t.type&&r.push(t.type),t.reply_data&&r.push("reply-view"),e&&(r.push("operate-action"),n&&r.push("operate-enter")),r},readList:function(){return this.percentageList.filter((function(t){return t.read_at}))},unreadList:function(){return this.percentageList.filter((function(t){return!t.read_at}))},todoDoneList:function(){return this.todoList.filter((function(t){return t.done_at}))},todoUndoneList:function(){return this.todoList.filter((function(t){return!t.done_at}))},headClass:function(){var t=this.msgData,e=t.reply_id,n=t.type,r=t.msg,o=t.emoji,i=[];return 0===e&&0===$A.arrayLength(o)&&"text"===n&&(/^<img\s+class="emoticon"[^>]*?>$/.test(r.text)||/^\s*<p>\s*([\uD800-\uDBFF][\uDC00-\uDFFF]){1,3}\s*<\/p>\s*$/.test(r.text))&&i.push("transparent"),i},contentClass:function(){var t=this.msgData,e=t.type,n=t.msg,r=[];return"text"===e&&(/^<img\s+class="emoticon"[^>]*?>$/.test(n.text)?r.push("an-emoticon"):/^\s*<p>\s*([\uD800-\uDBFF][\uDC00-\uDFFF]){3}\s*<\/p>\s*$/.test(n.text)?r.push("three-emoji"):/^\s*<p>\s*([\uD800-\uDBFF][\uDC00-\uDFFF]){2}\s*<\/p>\s*$/.test(n.text)?r.push("two-emoji"):/^\s*<p>\s*[\uD800-\uDBFF][\uDC00-\uDFFF]\s*<\/p>\s*$/.test(n.text)&&r.push("an-emoji")),r}}),watch:{operateAction:function(t){var e=this;this.operateEnter=!1,t&&setTimeout((function(t){return e.operateEnter=!0}),500)}},methods:{handleLongpress:function(t,e){this.$emit("on-longpress",{event:t,el:e,msgData:this.msgData})},openTodo:function(){var t=this;this.todoLoad>0||(this.todoShow?this.todoShow=!1:(this.todoLoad++,this.$store.dispatch("call",{url:"dialog/msg/todolist",data:{msg_id:this.msgData.id}}).then((function(e){var n=e.data;t.todoList=n})).catch((function(){t.todoList=[]})).finally((function(e){setTimeout((function(){t.todoLoad--,t.todoShow=!0}),100)}))))},openReadPercentage:function(){var t=this;this.percentageLoad>0||(this.percentageShow?this.percentageShow=!1:(this.percentageLoad++,this.$store.dispatch("call",{url:"dialog/msg/readlist",data:{msg_id:this.msgData.id}}).then((function(e){var n=e.data;t.percentageList=n})).catch((function(){t.percentageList=[]})).finally((function(e){setTimeout((function(){t.percentageLoad--,t.percentageShow=!0}),100)}))))},recordStyle:function(t){var e=t.duration;return{width:50+Math.min(180,Math.floor(e/150))+"px"}},recordDuration:function(t){var e=Math.floor(t/6e4),n=Math.floor(t/1e3)%60;return e>0?"".concat(e,":").concat(n,"″"):"".concat(Math.max(1,n),"″")},imageStyle:function(t){var e=t.width,n=t.height;if(e&&n){var r=e,o=n;return(e>220||n>220)&&(e>n?(r=220,o=n*(220/e)):(r=e*(220/n),o=220)),{width:r+"px",height:o+"px"}}return{}},playRecord:function(){this.operateVisible||l.Store.set("audioSubscribe",{id:this.msgData.id,src:this.msgData.msg.path})},openMeeting:function(){this.operateVisible||l.Store.set("addMeeting",{type:"join",name:this.msgData.msg.name,meetingid:this.msgData.msg.meetingid,meetingdisabled:!0})},viewReply:function(){this.$emit("on-view-reply",{msg_id:this.msgData.id,reply_id:this.msgData.reply_id})},viewText:function(t){this.$emit("on-view-text",t)},viewFile:function(){this.$emit("on-view-file",this.msgData)},downFile:function(){this.$emit("on-down-file",this.msgData)},replyList:function(){this.$emit("on-reply-list",{msg_id:this.msgData.id})},onError:function(){this.$emit("on-error",this.msgData)},onEmoji:function(t){this.$emit("on-emoji",{msg_id:this.msgData.id,symbol:t})},onShowEmojiUser:function(t){this.$emit("on-show-emoji-user",t)}}};function h(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<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?h(Object(n),!0).forEach((function(e){m(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function m(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:"DialogItem",components:{DialogView:(0,a.Z)(f,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"dialog-view",class:t.viewClass,attrs:{"data-id":t.msgData.id}},["group"===t.dialogType?e("div",{staticClass:"dialog-username"},[e("UserAvatar",{attrs:{userid:t.msgData.userid,"show-icon":!1,"show-name":!0,"click-open-dialog":""}})],1):t._e(),t._v(" "),e("div",{directives:[{name:"longpress",rawName:"v-longpress",value:{callback:t.handleLongpress,delay:300},expression:"{callback: handleLongpress, delay: 300}"}],staticClass:"dialog-head",class:t.headClass},[!t.hideReply&&t.msgData.reply_data?e("div",{staticClass:"dialog-reply no-dark-content",on:{click:t.viewReply}},[e("UserAvatar",{attrs:{userid:t.msgData.reply_data.userid,"show-icon":!1,"show-name":!0,"tooltip-disabled":!0}}),t._v(" "),e("div",{staticClass:"reply-desc"},[t._v(t._s(t.$A.getMsgSimpleDesc(t.msgData.reply_data)))])],1):t._e(),t._v(" "),e("div",{staticClass:"dialog-content",class:t.contentClass},["text"===t.msgData.type?e("div",{staticClass:"content-text no-dark-content"},[e("pre",{domProps:{innerHTML:t._s(t.$A.formatTextMsg(t.msgData.msg.text,t.userId))},on:{click:t.viewText}})]):"file"===t.msgData.type?e("div",{class:"content-file ".concat(t.msgData.msg.type)},[e("div",{staticClass:"dialog-file"},["img"===t.msgData.msg.type?e("img",{staticClass:"file-img",style:t.imageStyle(t.msgData.msg),attrs:{src:t.msgData.msg.thumb},on:{click:t.viewFile}}):e("div",{staticClass:"file-box",on:{click:t.downFile}},[e("img",{staticClass:"file-thumb",attrs:{src:t.msgData.msg.thumb}}),t._v(" "),e("div",{staticClass:"file-info"},[e("div",{staticClass:"file-name"},[t._v(t._s(t.msgData.msg.name))]),t._v(" "),e("div",{staticClass:"file-size"},[t._v(t._s(t.$A.bytesToSize(t.msgData.msg.size)))])])])])]):"record"===t.msgData.type?e("div",{staticClass:"content-record no-dark-content"},[e("div",{staticClass:"dialog-record",class:{playing:t.audioPlaying===t.msgData.msg.path},style:t.recordStyle(t.msgData.msg),on:{click:t.playRecord}},[e("div",{staticClass:"record-time"},[t._v(t._s(t.recordDuration(t.msgData.msg.duration)))]),t._v(" "),e("div",{staticClass:"record-icon taskfont"})])]):"meeting"===t.msgData.type?e("div",{staticClass:"content-meeting no-dark-content"},[e("ul",{staticClass:"dialog-meeting"},[e("li",[e("em",[t._v(t._s(t.$L("会议主题")))]),t._v("\n "+t._s(t.msgData.msg.name)+"\n ")]),t._v(" "),e("li",[e("em",[t._v(t._s(t.$L("会议创建人")))]),t._v(" "),e("UserAvatar",{attrs:{userid:t.msgData.msg.userid,"show-icon":!1,"show-name":!0,"tooltip-disabled":""}})],1),t._v(" "),e("li",[e("em",[t._v(t._s(t.$L("频道ID")))]),t._v("\n "+t._s(t.msgData.msg.meetingid.replace(/^(.{3})(.{3})(.*)$/,"$1 $2 $3"))+"\n ")]),t._v(" "),e("li",{staticClass:"meeting-operation",on:{click:t.openMeeting}},[t._v("\n "+t._s(t.$L("点击加入会议"))+"\n "),e("i",{staticClass:"taskfont"},[t._v("")])])])]):"loading"===t.msgData.type?e("div",{staticClass:"content-loading"},[!0===t.msgData.error?e("Icon",{attrs:{type:"ios-alert-outline"}}):e("Loading")],1):e("div",{staticClass:"content-unknown"},[t._v(t._s(t.$L("未知的消息类型")))])]),t._v(" "),t.$A.arrayLength(t.msgData.emoji)>0?e("ul",{staticClass:"dialog-emoji"},t._l(t.msgData.emoji,(function(n,r){return e("li",{key:r,class:{hasme:n.userids.includes(t.userId)},on:{click:function(e){return t.onEmoji(n.symbol)}}},[e("div",{staticClass:"emoji-symbol no-dark-content"},[t._v(t._s(n.symbol))]),t._v(" "),e("div",{staticClass:"emoji-users"},[e("ul",[t._l(n.userids,(function(r,o){return[o<5?e("li",{class:{bold:r==t.userId}},[e("UserAvatar",{attrs:{userid:r,"tooltip-disabled":"","show-name":"","show-icon":!1}})],1):5==o?e("li",{on:{click:function(e){return e.stopPropagation(),t.onShowEmojiUser(n)}}},[t._v("+"+t._s(n.userids.length-5)+"位")]):t._e()]}))],2)])])})),0):t._e()]),t._v(" "),e("div",{staticClass:"dialog-foot"},[!t.hideReply&&t.msgData.reply_num>0?e("div",{staticClass:"reply",on:{click:t.replyList}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v("\n "+t._s(t.msgData.reply_num)+"条回复\n ")]):t._e(),t._v(" "),t.msgData.tag?e("div",{staticClass:"tag"},[e("i",{staticClass:"taskfont"},[t._v("")])]):t._e(),t._v(" "),t.msgData.todo?e("div",{staticClass:"todo",on:{click:t.openTodo}},[e("EPopover",{ref:"todo",attrs:{"popper-class":"dialog-wrapper-read-poptip",placement:t.isRightMsg?"bottom-end":"bottom-start"},model:{value:t.todoShow,callback:function(e){t.todoShow=e},expression:"todoShow"}},[e("div",{staticClass:"read-poptip-content"},[e("ul",{staticClass:"read scrollbar-overlay"},[e("li",{staticClass:"read-title"},[e("em",[t._v(t._s(t.todoDoneList.length))]),t._v(t._s(t.$L("完成")))]),t._v(" "),t._l(t.todoDoneList,(function(t){return e("li",[e("UserAvatar",{attrs:{userid:t.userid,size:26,showName:"",tooltipDisabled:""}})],1)}))],2),t._v(" "),e("ul",{staticClass:"unread scrollbar-overlay"},[e("li",{staticClass:"read-title"},[e("em",[t._v(t._s(t.todoUndoneList.length))]),t._v(t._s(t.$L("待办")))]),t._v(" "),t._l(t.todoUndoneList,(function(t){return e("li",[e("UserAvatar",{attrs:{userid:t.userid,size:26,showName:"",tooltipDisabled:""}})],1)}))],2)]),t._v(" "),e("div",{staticClass:"popover-reference",attrs:{slot:"reference"},slot:"reference"})]),t._v(" "),t.todoLoad>0?e("Loading"):e("i",{staticClass:"taskfont"},[t._v("")])],1):t._e(),t._v(" "),t.msgData.modify?e("div",{staticClass:"modify"},[e("i",{staticClass:"taskfont"},[t._v("")])]):t._e(),t._v(" "),!0===t.msgData.error?e("div",{staticClass:"error",on:{click:t.onError}},[e("Icon",{attrs:{type:"ios-alert"}})],1):t.isLoading?e("Loading"):[t.timeShow?e("div",{staticClass:"time",on:{click:function(e){t.timeShow=!1}}},[t._v(t._s(t.msgData.created_at))]):e("div",{staticClass:"time",attrs:{title:t.msgData.created_at},on:{click:function(e){t.timeShow=!0}}},[t._v(t._s(t.$A.formatTime(t.msgData.created_at)))]),t._v(" "),t.hidePercentage?t._e():[t.msgData.send>1||"group"===t.dialogType?e("div",{staticClass:"percent",on:{click:t.openReadPercentage}},[e("EPopover",{ref:"percent",attrs:{"popper-class":"dialog-wrapper-read-poptip",placement:t.isRightMsg?"bottom-end":"bottom-start"},model:{value:t.percentageShow,callback:function(e){t.percentageShow=e},expression:"percentageShow"}},[e("div",{staticClass:"read-poptip-content"},[e("ul",{staticClass:"read scrollbar-overlay"},[e("li",{staticClass:"read-title"},[e("em",[t._v(t._s(t.readList.length))]),t._v(t._s(t.$L("已读")))]),t._v(" "),t._l(t.readList,(function(t){return e("li",[e("UserAvatar",{attrs:{userid:t.userid,size:26,showName:"",tooltipDisabled:""}})],1)}))],2),t._v(" "),e("ul",{staticClass:"unread scrollbar-overlay"},[e("li",{staticClass:"read-title"},[e("em",[t._v(t._s(t.unreadList.length))]),t._v(t._s(t.$L("未读")))]),t._v(" "),t._l(t.unreadList,(function(t){return e("li",[e("UserAvatar",{attrs:{userid:t.userid,size:26,showName:"",tooltipDisabled:""}})],1)}))],2)]),t._v(" "),e("div",{staticClass:"popover-reference",attrs:{slot:"reference"},slot:"reference"})]),t._v(" "),t.percentageLoad>0?e("Loading"):e("WCircle",{attrs:{percent:t.msgData.percentage,size:14}})],1):100===t.msgData.percentage?e("Icon",{staticClass:"done",attrs:{type:"md-done-all"}}):e("Icon",{staticClass:"done",attrs:{type:"md-checkmark"}})]]],2)])}),[],!1,null,null,null).exports},props:{source:{type:Object,default:function(){return{}}},dialogData:{type:Object,default:function(){return{}}},operateVisible:{type:Boolean,default:!1},operateItem:{type:Object,default:function(){return{}}},simpleView:{type:Boolean,default:!1},isMyDialog:{type:Boolean,default:!1},msgId:{type:Number,default:0}},data:function(){return{subscribe:null}},computed:p(p({},(0,o.rn)(["userId"])),{},{isRightMsg:function(){return this.source.userid==this.userId},isReply:function(){return this.simpleView||this.msgId===this.source.id},hidePercentage:function(){return this.simpleView||this.isMyDialog||this.isReply},hideReply:function(){return this.simpleView||this.msgId>0},classArray:function(){return{"dialog-item":!0,"reply-item":this.isReply,self:this.isRightMsg}}}),watch:{source:{handler:function(){this.msgRead()},immediate:!0},windowActive:function(t){t&&this.msgRead()}},methods:{msgRead:function(){this.windowActive&&this.$store.dispatch("dialogMsgRead",this.source)},formatTodoUser:function(t){if($A.isJson(t)){var e=t.userids;if(e)return e.split(",")}return[]},onViewTag:function(){this.onViewReply({msg_id:this.source.id,reply_id:this.source.msg.data.id})},onViewTodo:function(){this.onViewReply({msg_id:this.source.id,reply_id:this.source.msg.data.id})},onLongpress:function(t){this.dispatch("on-longpress",t)},onViewReply:function(t){this.dispatch("on-view-reply",t)},onViewText:function(t){this.dispatch("on-view-text",t)},onViewFile:function(t){this.dispatch("on-view-file",t)},onDownFile:function(t){this.dispatch("on-down-file",t)},onReplyList:function(t){this.dispatch("on-reply-list",t)},onError:function(t){this.dispatch("on-error",t)},onEmoji:function(t){this.dispatch("on-emoji",t)},onShowEmojiUser:function(t){this.dispatch("on-show-emoji-user",t)},dispatch:function(t,e){if(this.isReply)this.$emit(t,e);else{for(var n=this.$parent,r=n.$options.name;n&&(!r||"virtual-list"!==r);)(n=n.$parent)&&(r=n.$options.name);n&&n.$emit(t,e)}}}};const v=(0,a.Z)(g,(function(){var t=this,e=t._self._c;return e("div",{class:t.classArray},["tag"===t.source.type?e("div",{staticClass:"dialog-tag",on:{click:t.onViewTag}},[e("div",{staticClass:"tag-user"},[e("UserAvatar",{attrs:{userid:t.source.userid,tooltipDisabled:t.source.userid==t.userId,"show-name":!0,"show-icon":!1}})],1),t._v("\n "+t._s(t.$L("remove"===t.source.msg.action?"取消标注":"标注了"))+'\n "'+t._s(t.$A.getMsgSimpleDesc(t.source.msg.data))+'"\n ')]):"todo"===t.source.type?e("div",{staticClass:"dialog-todo",on:{click:t.onViewTodo}},[e("div",{staticClass:"todo-user"},[e("UserAvatar",{attrs:{userid:t.source.userid,tooltipDisabled:t.source.userid==t.userId,"show-name":!0,"show-icon":!1}})],1),t._v("\n "+t._s(t.$L("remove"===t.source.msg.action?"取消待办":"done"===t.source.msg.action?"完成":"设待办"))+'\n "'+t._s(t.$A.getMsgSimpleDesc(t.source.msg.data))+'"\n '),t.formatTodoUser(t.source.msg.data).length>0?e("div",{staticClass:"todo-users"},[e("span",[t._v(t._s(t.$L("给")))]),t._v(" "),t._l(t.formatTodoUser(t.source.msg.data),(function(n,r){return[r<3?e("div",{staticClass:"todo-user"},[e("UserAvatar",{attrs:{userid:n,tooltipDisabled:n==t.userId,"show-name":!0,"show-icon":!1}})],1):3==r?e("div",{staticClass:"todo-user"},[t._v("+"+t._s(t.formatTodoUser(t.source.msg.data).length-3))]):t._e()]}))],2):t._e()]):"notice"===t.source.type?e("div",{staticClass:"dialog-notice"},[t._v("\n "+t._s(t.source.msg.notice)+"\n ")]):[e("div",{staticClass:"dialog-avatar"},[e("UserAvatar",{attrs:{userid:t.source.userid,"tooltip-disabled":"","click-open-dialog":"group"==t.dialogData.type,size:30}})],1),t._v(" "),e("DialogView",{attrs:{"msg-data":t.source,"dialog-type":t.dialogData.type,"hide-percentage":t.hidePercentage,"hide-reply":t.hideReply,"operate-visible":t.operateVisible,"operate-action":t.operateVisible&&t.source.id===t.operateItem.id,"is-right-msg":t.isRightMsg},on:{"on-longpress":t.onLongpress,"on-view-reply":t.onViewReply,"on-view-text":t.onViewText,"on-view-file":t.onViewFile,"on-down-file":t.onDownFile,"on-reply-list":t.onReplyList,"on-error":t.onError,"on-emoji":t.onEmoji,"on-show-emoji-user":t.onShowEmojiUser}})]],2)}),[],!1,null,null,null).exports;const y={name:"DialogUpload",props:{dialogId:{type:Number,default:0},replyId:{type:Number,default:0},maxSize:{type:Number,default:1024e3}},data:function(){return{uploadFormat:[],actionUrl:$A.apiUrl("dialog/msg/sendfile")}},computed:{headers:function(){return{fd:$A.getSessionStorageString("userWsFd"),token:this.userToken}},params:function(){return{dialog_id:this.dialogId,reply_id:this.replyId}}},methods:{handleProgress:function(t,e){void 0===e.tempId&&(e.tempId=$A.randNum(1e9,9999999999),this.$emit("on-progress",e))},handleSuccess:function(t,e){1===t.ret?(e.data=t.data,this.$emit("on-success",e),t.data.task_id&&this.$store.dispatch("getTaskFiles",t.data.task_id)):($A.modalWarning({title:"发送失败",content:"文件 "+e.name+" 发送失败,"+t.msg}),this.$emit("on-error",e),this.$refs.upload.fileList.pop())},handleFormatError:function(t){$A.modalWarning({title:"文件格式不正确",content:"文件 "+t.name+" 格式不正确,仅支持发送:"+this.uploadFormat.join(",")})},handleMaxSize:function(t){$A.modalWarning({title:"超出文件大小限制",content:"文件 "+t.name+" 太大,不能发送超过"+$A.bytesToSize(1024*this.maxSize)+"。"})},handleClick:function(){this.$refs.upload.handleClick()},upload:function(t){this.$refs.upload.upload(t)}}};const b=(0,a.Z)(y,(function(){var t=this;return(0,t._self._c)("Upload",{ref:"upload",attrs:{name:"files",action:t.actionUrl,headers:t.headers,data:t.params,multiple:"",format:t.uploadFormat,"show-upload-list":!1,"max-size":t.maxSize,"on-progress":t.handleProgress,"on-success":t.handleSuccess,"on-format-error":t.handleFormatError,"on-exceeded-size":t.handleMaxSize}})}),[],!1,null,null,null).exports;var _=n(60935),w=n(81034);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 C(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?k(Object(n),!0).forEach((function(e){x(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}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 S={name:"DialogGroupInfo",components:{UserInput:_.Z},props:{dialogId:{type:Number,default:0}},data:function(){return{searchKey:"",loadIng:0,dialogUser:[],addShow:!1,addData:{},addLoad:0,openIng:!1}},computed:C(C({},(0,o.rn)(["cacheDialogs","cacheUserBasic"])),{},{dialogData:function(){var t=this;return this.cacheDialogs.find((function(e){return e.id==t.dialogId}))||{}},groupType:function(){var t=this.dialogData.group_type;return"department"===t?"部门群组":"project"===t?"项目群组":"task"===t?"任务群组":"user"===t?"个人群组":"all"===t?"全员群组":"未知"},userList:function(){var t=this.dialogUser,e=this.searchKey,n=this.cacheUserBasic,r=this.dialogData;return t.map((function(t){var e=n.find((function(e){return e.userid==t.userid}));return e&&(t.nickname=e.nickname,t.email=e.email),t})).filter((function(t){return!(e&&t.nickname&&!$A.strExists(t.nickname,e)&&!$A.strExists(t.email,e))})).sort((function(t,e){return t.userid===r.owner_id||e.userid===r.owner_id?(t.userid===r.owner_id?0:1)-(e.userid===r.owner_id?0:1):$A.Date(t.created_at)-$A.Date(e.created_at)}))}}),watch:{dialogId:{handler:function(){this.getDialogUser()},immediate:!0}},methods:{updateName:function(t,e){var n=this;t?this.$store.dispatch("call",{url:"dialog/group/edit",data:{dialog_id:this.dialogId,chat_name:t}}).then((function(t){var r=t.data;n.$store.dispatch("saveDialog",r),e()})).catch((function(t){var n=t.msg;$A.modalError(n),e()})):e()},getDialogUser:function(){var t=this;this.dialogId<=0||(this.loadIng++,this.$store.dispatch("call",{url:"dialog/user",data:{dialog_id:this.dialogId}}).then((function(e){var n=e.data;t.dialogUser=n,t.$store.dispatch("saveDialog",{id:t.dialogId,people:n.length})})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(e){t.loadIng--})))},openAdd:function(){this.addData={dialog_id:this.dialogId,userids:[],disabledChoice:this.dialogUser.map((function(t){return t.userid}))},this.addShow=!0},onAdd:function(){var t=this;this.addLoad++,this.$store.dispatch("call",{url:"dialog/group/adduser",data:this.addData}).then((function(e){var n=e.msg;$A.messageSuccess(n),t.addShow=!1,t.addData={},t.getDialogUser()})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(e){t.addLoad--}))},onExit:function(t){var e=this,n="你确定要退出群组吗?",r=[];$A.isJson(t)&&(n="你确定要将【".concat(t.nickname,"】移出群组吗?"),r=[t.userid]),$A.modalConfirm({content:n,loading:!0,onOk:function(){return new Promise((function(t,n){e.$store.dispatch("call",{url:"dialog/group/deluser",data:{dialog_id:e.dialogId,userids:r}}).then((function(n){var o=n.msg;t(o),r.length>0?e.getDialogUser():(e.$store.dispatch("forgetDialog",e.dialogId),e.goForward({name:"manage-messenger"}))})).catch((function(t){var e=t.msg;n(e)}))}))}})},openUser:function(t){var e=this;this.openIng||(this.openIng=!0,this.$store.dispatch("showSpinner",600),this.$store.dispatch("openDialogUserid",t).then((function(t){e.$emit("on-close")})).finally((function(t){e.openIng=!1,e.$store.dispatch("hiddenSpinner")})))}}};const O=(0,a.Z)(S,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"dialog-group-info"},[e("div",{staticClass:"group-info-title"},[t._v(t._s(t.$L("群名")))]),t._v(" "),e("div",{staticClass:"group-info-value"},[e("QuickEdit",{attrs:{value:t.dialogData.name,disabled:t.dialogData.owner_id!=t.userId},on:{"on-update":t.updateName}},[t._v(t._s(t.dialogData.name))])],1),t._v(" "),e("div",{staticClass:"group-info-title"},[t._v(t._s(t.$L("群类型")))]),t._v(" "),e("div",{staticClass:"group-info-value"},[t._v(t._s(t.$L(t.groupType)))]),t._v(" "),e("div",{staticClass:"group-info-search"},[e("Input",{attrs:{prefix:"ios-search",placeholder:t.$L("搜索成员"),clearable:""},model:{value:t.searchKey,callback:function(e){t.searchKey=e},expression:"searchKey"}})],1),t._v(" "),e("div",{staticClass:"group-info-user"},[e("ul",[t._l(t.userList,(function(n,r){return e("li",{key:r,on:{click:function(e){return t.openUser(n.userid)}}},[e("UserAvatar",{attrs:{userid:n.userid,size:32,showName:"",tooltipDisabled:""}}),t._v(" "),n.userid===t.dialogData.owner_id?e("div",{staticClass:"user-tag"},[t._v(t._s(t.$L("群主")))]):t.dialogData.owner_id==t.userId||n.inviter==t.userId?e("div",{staticClass:"user-exit",on:{click:function(e){return e.stopPropagation(),t.onExit(n)}}},[e("Icon",{attrs:{type:"md-exit"}})],1):t._e()],1)})),t._v(" "),0===t.userList.length?e("li",{staticClass:"no"},[t.loadIng>0?e("Loading"):e("span",[t._v(t._s(t.$L("没有符合条件的数据")))])],1):t._e()],2)]),t._v(" "),"all"!==t.dialogData.group_type?e("div",{staticClass:"group-info-button"},[t.dialogData.owner_id==t.userId||0==t.dialogData.owner_id?e("Button",{attrs:{type:"primary",icon:"md-add"},on:{click:t.openAdd}},[t._v(t._s(t.$L("添加成员")))]):t._e()],1):t._e(),t._v(" "),e("Modal",{attrs:{title:t.$L("添加群成员"),"mask-closable":!1},model:{value:t.addShow,callback:function(e){t.addShow=e},expression:"addShow"}},[e("Form",{attrs:{model:t.addData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{prop:"userids",label:t.$L("新增成员")}},[e("UserInput",{attrs:{disabledChoice:t.addData.disabledChoice,"multiple-max":100,"show-bot":"",placeholder:t.$L("选择成员")},model:{value:t.addData.userids,callback:function(e){t.$set(t.addData,"userids",e)},expression:"addData.userids"}}),t._v(" "),"department"===t.dialogData.group_type?e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("此操作仅加入群成员并不会加入部门")))]):"project"===t.dialogData.group_type?e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("此操作仅加入群成员并不会加入项目")))]):"task"===t.dialogData.group_type?e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("此操作仅加入群成员并不会加入任务负责人")))]):t._e()],1)],1),t._v(" "),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(e){t.addShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Button",{attrs:{type:"primary",loading:t.addLoad>0},on:{click:t.onAdd}},[t._v(t._s(t.$L("确定添加")))])],1)],1)],1)}),[],!1,null,null,null).exports;const E={name:"DialogRespond",props:{respondData:{type:Object,default:function(){return{}}}},data:function(){return{openIng:!1}},methods:{openUser:function(t){var e=this;this.openIng||(this.openIng=!0,this.$store.dispatch("showSpinner",600),this.$store.dispatch("openDialogUserid",t).then((function(t){e.$emit("on-close")})).finally((function(t){e.openIng=!1,e.$store.dispatch("hiddenSpinner")})))}}};const D=(0,a.Z)(E,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"dialog-respond"},[e("div",{staticClass:"respond-title"},[e("em",[t._v(t._s(t.respondData.symbol))]),t._v(t._s(t.$L("回应详情"))+" ("+t._s(t.respondData.userids.length)+")")]),t._v(" "),e("div",{staticClass:"respond-user"},[e("ul",t._l(t.respondData.userids,(function(n,r){return e("li",{key:r,on:{click:function(e){return t.openUser(n)}}},[e("UserAvatar",{attrs:{userid:n,size:32,showName:"",tooltipDisabled:""}})],1)})),0)])])}),[],!1,null,null,null).exports;var L=n(47015),A=n(85662),T=n.n(A);function N(t){return N="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},N(t)}function $(t){return function(t){if(Array.isArray(t))return I(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 I(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 I(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 I(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}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 j(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?P(Object(n),!0).forEach((function(e){M(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function M(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const R={name:"DialogWrapper",components:{DialogSelect:n(9994).Z,DialogRespond:D,DialogItem:v,VirtualList:T(),ChatInput:L.Z,DialogGroupInfo:O,DrawerOverlay:w.Z,UserInput:_.Z,DialogUpload:b},props:{dialogId:{type:Number,default:0},msgId:{type:Number,default:0},autoFocus:{type:Boolean,default:!1},beforeBack:Function},data:function(){return{msgItem:v,msgText:"",msgNew:0,msgType:"",allMsgs:[],tempMsgs:[],msgLoadIng:0,pasteShow:!1,pasteFile:[],pasteItem:[],createGroupShow:!1,createGroupData:{},createGroupLoad:0,forwardShow:!1,forwardLoad:!1,forwardData:{dialogids:[],userids:[]},openId:0,dialogDrag:!1,groupInfoShow:!1,groupTransferShow:!1,groupTransferLoad:0,groupTransferData:{userid:[],disabledChoice:[]},navStyle:{},operateVisible:!1,operateCopys:[],operateStyles:{},operateItem:{},operateEmojis:["👌","🤝","🎉","❤️","👍","🥰","🥳️","✅","❌","⭕️","❓","🚀","👀"],recordState:"",wrapperStart:{},scrollTail:0,preventMoreLoad:!1,preventToBottom:!1,replyActiveId:0,replyActiveIndex:-1,replyActiveUpdate:!1,replyListShow:!1,replyListId:0,respondShow:!1,respondData:{},todoSettingShow:!1,todoSettingLoad:0,todoSettingData:{type:"all",userids:[]},todoViewLoad:!1,todoViewPosLoad:!1,todoViewShow:!1,todoViewData:{},todoViewMid:0,todoViewId:0,scrollDisabled:!1,scrollDirection:null,scrollAction:0,scrollTmp:0,beforeLoad:!1}},beforeDestroy:function(){this.$store.dispatch("forgetInDialog",this._uid),this.$store.dispatch("closeDialog",this.dialogId)},computed:j(j(j({},(0,o.rn)(["userIsAdmin","taskId","dialogSearchMsgId","dialogMsgs","dialogTodos","dialogMsgTransfer","cacheDialogs","wsOpenNum","touchBackInProgress","dialogIns"])),(0,o.Se)(["isLoad"])),{},{isReady:function(){return this.dialogId>0&&this.dialogData.id>0},dialogData:function(){var t=this;return this.cacheDialogs.find((function(e){return e.id==t.dialogId}))||{}},dialogList:function(){return this.cacheDialogs.filter((function(t){return!(void 0===t.name||1===t.dialog_delete)})).sort((function(t,e){return t.top_at||e.top_at?$A.Date(e.top_at)-$A.Date(t.top_at):t.todo_num>0||e.todo_num>0?e.todo_num-t.todo_num:$A.Date(e.last_at)-$A.Date(t.last_at)}))},dialogMsgList:function(){var t=this;return this.isReady?this.dialogMsgs.filter((function(e){return e.dialog_id==t.dialogId})):[]},tempMsgList:function(){var t=this;return this.isReady?this.tempMsgs.filter((function(e){return e.dialog_id==t.dialogId})):[]},allMsgList:function(){var t=this,e=[];if(e.push.apply(e,$(this.dialogMsgList.filter((function(e){return t.msgFilter(e)})))),this.msgId>0){var n=this.dialogMsgs.find((function(e){return e.id==t.msgId}));n&&e.unshift(n)}if(this.tempMsgList.length>0){var r=e.map((function(t){return t.id})),o=this.tempMsgList.filter((function(e){return!r.includes(e.id)&&t.msgFilter(e)}));o.length>0&&e.push.apply(e,$(o))}return e.sort((function(t,e){return t.id-e.id}))},loadMsg:function(){return this.isLoad("msg::".concat(this.dialogId,"-").concat(this.msgId,"-").concat(this.msgType))},prevId:function(){return this.allMsgs.length>0?$A.runNum(this.allMsgs[0].prev_id):0},peopleNum:function(){return"group"===this.dialogData.type?$A.runNum(this.dialogData.people):0},pasteTitle:function(){var t=this.pasteItem,e=t.find((function(t){return"image"==t.type})),n=t.find((function(t){return"image"!=t.type}));return e&&n?"发送文件/图片":e?"发送图片":"发送文件"},msgTags:function(){var t=[{type:"",label:"消息"}];return this.dialogData.has_tag&&t.push({type:"tag",label:"标注"}),this.dialogData.has_image&&t.push({type:"image",label:"图片"}),this.dialogData.has_file&&t.push({type:"file",label:"文件"}),this.dialogData.has_link&&t.push({type:"link",label:"链接"}),"project"===this.dialogData.group_type&&t.push({type:"project",label:"打开项目"}),"task"===this.dialogData.group_type&&t.push({type:"task",label:"打开任务"}),t},todoList:function(){var t=this;return this.dialogData.todo_num?this.dialogTodos.filter((function(e){return!e.done_at&&e.dialog_id==t.dialogId})).sort((function(t,e){return e.id-t.id})):[]},todoShow:function(){return this.todoList.length>0&&0===this.windowScrollY&&0===this.replyId},wrapperClass:function(){return["ready","ing"].includes(this.recordState)?["record-ready"]:null},tagShow:function(){return this.msgTags.length>1&&0===this.windowScrollY},scrollerClass:function(){return!this.$slots.head&&this.tagShow?"default-header":null},pasteWrapperClass:function(){return this.pasteItem.find((function(t){return"image"!==t.type}))?["multiple"]:[]},footerClass:function(){return this.msgNew>0&&this.allMsgs.length>0?"newmsg":this.scrollTail>500?"goto":null},msgUnreadOnly:function(){var t=0;return this.cacheDialogs.some((function(e){t+=$A.getDialogUnread(e,!1)})),t<=0?"":(t>99&&(t="99+"),String(t))},isMyDialog:function(){var t=this.dialogData,e=this.userId;return t.dialog_user&&t.dialog_user.userid==e},isMute:function(){if("all"===this.dialogData.group_type){if("all"===this.dialogData.all_group_mute)return!0;if("user"===this.dialogData.all_group_mute&&!this.userIsAdmin)return!0}return!1},replyId:function(){return parseInt(this.msgId>0?this.msgId:this.replyActiveId)},replyItem:function(){var t=this;return this.replyId?this.allMsgs.find((function(e){return e.id===t.replyId})):null},todoViewMsg:function(){var t=this;if(this.todoViewMid){var e=this.allMsgs.find((function(e){return e.id==t.todoViewMid}));if(e)return e;if(this.todoViewData.id===this.todoViewMid)return this.todoViewData}return null},beforeUnread:function(){var t=this.dialogData,e=t.unread,n=t.first_umid;return e>0&&n>0&&this.allMsgs.length>0&&-1===this.allMsgs.findIndex((function(t){return t.id==n}))?e:0}}),watch:{dialogId:{handler:function(t,e){var n=this;t&&(this.msgNew=0,this.msgType="",this.replyActiveId=0,this.allMsgList.length>0&&(this.allMsgs=this.allMsgList,requestAnimationFrame(this.onToBottom)),this.getMsgs({dialog_id:t,msg_id:this.msgId,msg_type:this.msgType}).then((function(e){n.openId=t,setTimeout(n.onSearchMsgId,100)})).catch((function(t){})),this.$store.dispatch("saveInDialog",{uid:this._uid,dialog_id:t}),this.autoFocus&&this.inputFocus()),this.$store.dispatch("closeDialog",e)},immediate:!0},msgType:function(){this.getMsgs({dialog_id:this.dialogId,msg_id:this.msgId,msg_type:this.msgType,clear_before:!0}).catch((function(t){}))},dialogSearchMsgId:function(){this.onSearchMsgId()},dialogMsgTransfer:{handler:function(t){var e=this,n=t.time,r=t.msgFile,o=t.msgRecord,i=t.msgText;n>$A.Time()&&(this.$store.state.dialogMsgTransfer.time=0,this.$nextTick((function(){$A.isArray(r)&&r.length>0?e.sendFileMsg(r):$A.isJson(o)&&o.duration>0?e.sendRecord(o):i&&e.sendMsg(i)})))},immediate:!0},wsOpenNum:function(t){t<=1||this.getMsgs({dialog_id:this.dialogId,msg_id:this.msgId,msg_type:this.msgType}).catch((function(t){}))},allMsgList:function(t,e){var n=this.scrollInfo().tail;if(this.allMsgs=t,!this.windowActive||n>10&&e.length>0){var r=e[e.length-1]?e[e.length-1].id:0,o=t.filter((function(t){return t.id&&t.id>r}));this.msgNew+=o.length}else this.preventToBottom||this.$nextTick(this.onToBottom)},windowScrollY:function(t){if($A.isIos()){var e=this.scrollInfo().tail;this.navStyle={marginTop:t+"px"},e<=10&&requestAnimationFrame(this.onToBottom)}},windowActive:function(t){if(t&&this.autoFocus){var e=$A.last(this.dialogIns);e&&e.uid===this._uid&&this.inputFocus()}},dialogDrag:function(t){t&&(this.operateVisible=!1)},replyActiveIndex:function(t){var e=this;t>-1&&setTimeout((function(t){return e.replyActiveIndex=-1}),800)}},methods:{sendMsg:function(t){var e,n=this,r=!1;if("string"==typeof t&&t?e=t:(e=this.msgText,r=!0),""!=e){if(e=e.replace(/<\/span> <\/p>$/,"</span></p>"),this.replyActiveUpdate){e=e.replace(new RegExp("src=([\"'])".concat($A.apiUrl("../")),"g"),"src=$1{{RemoteURL}}");var o=this.replyId;this.$store.dispatch("setLoad",{key:"msg-".concat(o),delay:600}),this.replyActiveId=0,this.onActive(),this.$store.dispatch("call",{url:"dialog/msg/sendtext",data:{dialog_id:this.dialogId,update_id:o,text:e},method:"post",complete:function(t){return n.$store.dispatch("cancelLoad","msg-".concat(o))}}).then((function(t){var e=t.data;n.sendSuccess(e),n.onPositionId(o)})).catch((function(t){var e=t.msg;$A.modalError(e)}))}else{var i=$A.randNum(1e9,9999999999),a=$A.stringLength(e.replace(/<img[^>]*?>/g,""))>5e3,s={id:i,dialog_id:this.dialogData.id,reply_id:this.replyId,reply_data:this.replyItem,type:a?"loading":"text",userid:this.userId,msg:{text:a?"":e}};this.tempMsgs.push(s),this.msgType="",this.replyActiveId=0,this.onActive(),this.$nextTick(this.onToBottom),this.$store.dispatch("call",{url:"dialog/msg/sendtext",data:{dialog_id:s.dialog_id,reply_id:s.reply_id,text:e},method:"post"}).then((function(t){var e=t.data;n.tempMsgs=n.tempMsgs.filter((function(t){return t.id!=i})),n.sendSuccess(e)})).catch((function(t){n.$set(s,"error",!0),n.$set(s,"errorData",{type:"text",content:t.msg,msg:e})}))}r&&requestAnimationFrame((function(t){return n.msgText=""}))}else this.inputFocus()},sendRecord:function(t){var e=this,n=$A.randNum(1e9,9999999999),r={id:n,dialog_id:this.dialogData.id,reply_id:this.replyId,reply_data:this.replyItem,type:"loading",userid:this.userId,msg:t};this.tempMsgs.push(r),this.msgType="",this.replyActiveId=0,this.onActive(),this.$nextTick(this.onToBottom),this.$store.dispatch("call",{url:"dialog/msg/sendrecord",data:Object.assign(t,{dialog_id:this.dialogId,reply_id:this.replyId}),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(n){e.$set(r,"error",!0),e.$set(r,"errorData",{type:"record",content:n.msg,msg:t})}))},sendFileMsg:function(t){var e=this,n=$A.isArray(t)?t:[t];n.length>0&&(this.pasteFile=[],this.pasteItem=[],n.some((function(t){var n={type:$A.getMiddle(t.type,null,"/"),name:t.name,size:t.size,result:null};if("image"===n.type){var r=new FileReader;r.readAsDataURL(t),r.onload=function(r){var o=r.target;n.result=o.result,e.pasteFile.push(t),e.pasteItem.push(n),e.pasteShow=!0}}else e.pasteFile.push(t),e.pasteItem.push(n),e.pasteShow=!0})))},getMsgs:function(t){var e=this;return new Promise((function(n,r){setTimeout((function(t){return e.msgLoadIng++}),1200),e.$store.dispatch("getDialogMsgs",t).then(n).catch(r).finally((function(t){e.msgLoadIng--}))}))},msgFilter:function(t){if(this.msgType)if("tag"===this.msgType){if(!t.tag)return!1}else if("link"===this.msgType){if(!t.link)return!1}else if(this.msgType!==t.mtype)return!1;return!this.msgId||t.reply_id==this.msgId},onSearchMsgId:function(){this.dialogSearchMsgId>0&&this.openId===this.dialogId&&(this.onPositionId(this.dialogSearchMsgId),this.$store.state.dialogSearchMsgId=0)},onPositionId:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return new Promise((function(o,i){if(0===t)return $A.modalError("查看失败:参数错误"),void i();if(e.loadMsg||""!==e.msgType){if(e.msgType="",0===r)e.$store.dispatch("showSpinner",600);else if(r>20)return e.$store.dispatch("hiddenSpinner"),$A.modalError("查看失败:请求超时"),void i();return r++,void setTimeout((function(a){e.onPositionId(t,n,r).then(o).catch(i)}),Math.min(800,200*r))}r>0&&e.$store.dispatch("hiddenSpinner");var a=e.allMsgs.findIndex((function(e){return e.id===t})),s=e.prevId>0?0:-1;a>s?setTimeout((function(t){e.onToIndex(a),o()}),200):(n>0&&e.$store.dispatch("setLoad",{key:"msg-".concat(n),delay:600}),e.preventToBottom=!0,e.getMsgs({dialog_id:e.dialogId,msg_id:e.msgId,msg_type:e.msgType,position_id:t,spinner:2e3}).finally((function(r){var i=e.allMsgs.findIndex((function(e){return e.id===t}));i>-1&&(e.onToIndex(i),o()),n>0&&e.$store.dispatch("cancelLoad","msg-".concat(n)),e.preventToBottom=!1})))}))},onViewTodo:function(t){var e=this;if(!this.operateVisible){this.todoViewId=t.id,this.todoViewMid=t.msg_id,this.todoViewShow=!0;var n=this.allMsgs.findIndex((function(t){return t.id===e.todoViewMid}));-1===n&&this.$store.dispatch("call",{url:"dialog/msg/one",data:{msg_id:this.todoViewMid}}).then((function(t){var n=t.data;e.todoViewData=n}))}},onCloseTodo:function(){this.todoViewLoad=!1,this.todoViewShow=!1,this.todoViewData={},this.todoViewMid=0,this.todoViewId=0},onPosTodo:function(){var t=this;this.todoViewMid&&(this.todoViewPosLoad=!0,this.onPositionId(this.todoViewMid).then(this.onCloseTodo).finally((function(e){t.todoViewPosLoad=!1})))},onDoneTodo:function(){var t=this;this.todoViewId&&!this.todoViewLoad&&(this.todoViewLoad=!0,this.$store.dispatch("call",{url:"dialog/msg/done",data:{id:this.todoViewId}}).then((function(e){var n=e.data;t.$store.dispatch("saveDialogTodo",{id:t.todoViewId,done_at:$A.formatDate("Y-m-d H:i:s")}),t.$store.dispatch("saveDialog",{id:t.dialogId,todo_num:t.todoList.length}),n.add&&t.sendSuccess(n.add),0===t.todoList.length&&t.$store.dispatch("getDialogTodo",t.dialogId),t.onCloseTodo()})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(e){t.todoViewLoad=!1})))},itemClassAdd:function(t){return t===this.replyActiveIndex?"common-shake":""},inputFocus:function(){var t=this;this.$nextTick((function(e){t.$refs.input&&t.$refs.input.focus()}))},onRecordState:function(t){this.recordState=t},chatPasteDrag:function(t,e){this.dialogDrag=!1;var n="drag"===e?t.dataTransfer.files:t.clipboardData.files,r=Array.prototype.slice.call(n);r.length>0&&(t.preventDefault(),this.sendFileMsg(r))},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)},onTouchStart:function(t){this.wrapperStart=Object.assign(this.scrollInfo(),{clientY:t.touches[0].clientY,exclud:!this.$refs.scroller.$el.contains(t.target)})},onTouchMove:function(t){if(this.windowSmall&&this.windowScrollY>0){if(this.wrapperStart.exclud)return void t.preventDefault();this.wrapperStart.clientY>t.touches[0].clientY?0===this.wrapperStart.tail&&t.preventDefault():0===this.wrapperStart.offset&&t.preventDefault()}},pasteSend:function(){var t=this;this.pasteFile.some((function(e){t.$refs.chatUpload.upload(e)}))},chatFile:function(t,e){switch(t){case"progress":var n={id:e.tempId,dialog_id:this.dialogData.id,reply_id:this.replyId,type:"loading",userid:this.userId,msg:{}};this.tempMsgs.push(n),this.msgType="",this.replyActiveId=0,this.onActive(),this.$nextTick(this.onToBottom);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){$A.isArray(t)?t.some(this.sendSuccess):(this.$store.dispatch("saveDialogMsg",t),this.replyActiveUpdate||(this.$store.dispatch("increaseTaskMsgNum",t),this.$store.dispatch("increaseMsgReplyNum",t),this.$store.dispatch("updateDialogLastMsg",t)),this.onCancelReply(),this.onActive())},onEventFocus:function(){this.$emit("on-focus")},onEventBlur:function(){this.$emit("on-blur")},onEventMore:function(t){switch(t){case"call":this.onCallTel();break;case"image":case"file":this.$refs.chatUpload.handleClick()}},onCallTel:function(){var t=this;this.$store.dispatch("call",{url:"dialog/tel",data:{dialog_id:this.dialogId},spinner:600}).then((function(e){var n=e.data;n.tel&&$A.eeuiAppSendMessage({action:"callTel",tel:n.tel}),n.add&&(t.$store.dispatch("saveDialogMsg",n.add),t.$store.dispatch("updateDialogLastMsg",n.add),t.onActive())})).catch((function(t){var e=t.msg;$A.modalError(e)}))},onEventEmojiVisibleChange:function(t){t&&this.windowSmall&&this.onToBottom()},onHeightChange:function(t){var e=t.newVal-t.oldVal;if(0!==e){var n=this.scrollInfo(),r=n.offset;n.tail>0&&this.onToOffset(r+e)}},onActive:function(){this.$emit("on-active")},onToBottom:function(){this.msgNew=0;var t=this.$refs.scroller;t&&(t.scrollToBottom(),requestAnimationFrame((function(e){return t.scrollToBottom()})))},onToIndex:function(t){var e=this,n=this.$refs.scroller;n&&(n.stopToBottom(),n.scrollToIndex(t,-100),requestAnimationFrame((function(e){return n.scrollToIndex(t,-100)}))),requestAnimationFrame((function(n){return e.replyActiveIndex=t}))},onToOffset:function(t){var e=this.$refs.scroller;e&&(e.stopToBottom(),e.scrollToOffset(t),setTimeout((function(n){return e.scrollToOffset(t)}),10))},scrollInfo:function(){var t=this.$refs.scroller;return t?t.scrollInfo():{offset:0,scale:0,tail:0}},openProject:function(){this.dialogData.group_info&&(this.windowSmall&&this.$store.dispatch("openDialog",0),this.goForward({name:"manage-project",params:{projectId:this.dialogData.group_info.id}}))},openTask:function(){this.dialogData.group_info&&(this.taskId>0&&this.$store.dispatch("openDialog",0),this.$store.dispatch("openTask",this.dialogData.group_info.id))},onPrevPage:function(){var t=this;0!==this.prevId&&this.getMsgs({dialog_id:this.dialogId,msg_id:this.msgId,msg_type:this.msgType,prev_id:this.prevId,save_before:function(e){return t.scrollDisabled=!0}}).then((function(e){var n=e.data.list.map((function(t){return t.id}));t.$nextTick((function(){var e=t.$refs.scroller,r=n.reduce((function(t,n){return{size:("object"===N(t)?t.size:e.getSize(t))+e.getSize(n)}})),o=e.getOffset()+r.size;0===t.prevId&&(o-=36),t.onToOffset(o),t.scrollDisabled=!1}))})).catch((function(){}))},onDialogMenu:function(t){switch(t){case"openCreate":var e=[this.userId];this.dialogData.dialog_user&&this.userId!=this.dialogData.dialog_user.userid&&e.push(this.dialogData.dialog_user.userid),this.createGroupData={userids:e,uncancelable:[this.userId]},this.createGroupShow=!0;break;case"groupInfo":this.groupInfoShow=!0;break;case"transfer":this.groupTransferData={dialog_id:this.dialogId,userid:[],disabledChoice:[this.userId]},this.groupTransferShow=!0;break;case"transferConfirm":this.onTransferGroup();break;case"disband":this.onDisbandGroup();break;case"exit":this.onExitGroup()}},onTransferGroup:function(){var t=this;0!==this.groupTransferData.userid.length?(this.groupTransferLoad++,this.$store.dispatch("call",{url:"dialog/group/transfer",data:{dialog_id:this.dialogId,userid:this.groupTransferData.userid[0]}}).then((function(e){var n=e.data,r=e.msg;$A.messageSuccess(r),t.$store.dispatch("saveDialog",n)})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(e){t.groupTransferLoad--,t.groupTransferShow=!1}))):$A.messageError("请选择新的群主")},onDisbandGroup:function(){var t=this;$A.modalConfirm({content:"你确定要解散【".concat(this.dialogData.name,"】群组吗?"),loading:!0,okText:"解散",onOk:function(){return new Promise((function(e,n){t.$store.dispatch("call",{url:"dialog/group/disband",data:{dialog_id:t.dialogId}}).then((function(n){var r=n.msg;e(r),t.$store.dispatch("forgetDialog",t.dialogId),t.goForward({name:"manage-messenger"})})).catch((function(t){var e=t.msg;n(e)}))}))}})},onExitGroup:function(){var t=this;$A.modalConfirm({content:"你确定要退出群组吗?",loading:!0,onOk:function(){return new Promise((function(e,n){t.$store.dispatch("call",{url:"dialog/group/deluser",data:{dialog_id:t.dialogId}}).then((function(n){var r=n.msg;e(r),t.$store.dispatch("forgetDialog",t.dialogId),t.goForward({name:"manage-messenger"})})).catch((function(t){var e=t.msg;n(e)}))}))}})},onCreateGroup:function(){var t=this;this.createGroupLoad++,this.$store.dispatch("call",{url:"dialog/group/add",data:this.createGroupData}).then((function(e){var n=e.data,r=e.msg;$A.messageSuccess(r),t.createGroupShow=!1,t.createGroupData={},t.$store.dispatch("saveDialog",n),t.$store.dispatch("openDialog",n.id)})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(e){t.createGroupLoad--}))},onForward:function(t){var e=this;if("open"===t)this.forwardData={dialogids:[],userids:[],msg_id:this.operateItem.id},this.forwardShow=!0;else if("submit"===t){if(0===$A.arrayLength(this.forwardData.dialogids)&&0===$A.arrayLength(this.forwardData.userids))return void $A.messageWarning("请选择转发对话或成员");this.forwardLoad=!0,this.$store.dispatch("call",{url:"dialog/msg/forward",data:this.forwardData}).then((function(t){var n=t.data,r=t.msg;e.forwardShow=!1,e.$store.dispatch("saveDialogMsg",n.msgs),e.$store.dispatch("updateDialogLastMsg",n.msgs),$A.messageSuccess(r)})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(t){e.forwardLoad=!1}))}},onScroll:function(t){var e=this;this.operateVisible=!1;var n=this.scrollInfo().tail;this.scrollTail=n,this.scrollTail<=10&&(this.msgNew=0),this.scrollAction=t.target.scrollTop,this.scrollDirection=this.scrollTmp<=this.scrollAction?"down":"up",setTimeout((function(t){return e.scrollTmp=e.scrollAction}),0)},onRange:function(t){var e=this;if(!this.preventMoreLoad)for(var n="down"===this.scrollDirection?"next_id":"prev_id",r=t.start;r<=t.end;r++){var o=this.allMsgs[r][n];if(o){var i=this.allMsgs[r+("next_id"===n?1:-1)];i&&i.id!=o&&(this.preventMoreLoad=!0,this.getMsgs(M({dialog_id:this.dialogId,msg_id:this.msgId,msg_type:this.msgType},n,o)).finally((function(t){e.preventMoreLoad=!1})))}}},onBack:function(){var t=this;if(!this.beforeBack)return this.handleBack();var e=this.beforeBack();e&&e.then?e.then((function(){t.handleBack()})):this.handleBack()},handleBack:function(){var t=this.$store.state.routeHistoryLast,e=t.name,n=t.params;e===this.$route.name&&/^\d+$/.test(n.dialogId)?this.goForward({name:this.$route.name}):this.goBack()},onMsgType:function(t){switch(t){case"project":this.openProject();break;case"task":this.openTask();break;default:this.loadMsg?$A.messageWarning("正在加载,请稍后再试..."):this.msgType=t}},onLongpress:function(t){var e=this,n=t.event,r=t.el,o=t.msgData;this.operateVisible=this.operateItem.id===o.id,this.operateItem=$A.isJson(o)?o:{},this.operateCopys=[],"IMG"===n.target.nodeName&&this.$Electron?this.operateCopys.push({type:"image",icon:"",label:"复制图片",value:$A.rightDelete(n.target.currentSrc,"_thumb.jpg")}):"A"===n.target.nodeName&&this.operateCopys.push({type:"link",icon:"",label:"复制链接",value:n.target.href}),"text"===o.type&&("IMG"===n.target.nodeName&&this.operateCopys.push({type:"imagedown",icon:"",label:"下载图片",value:$A.rightDelete(n.target.currentSrc,"_thumb.jpg")}),o.msg.text.replace(/<[^>]+>/g,"").length>0&&this.operateCopys.push({type:"text",icon:"",label:this.operateCopys.length>0?"复制文本":"复制",value:""})),this.$nextTick((function(){var t=r.getBoundingClientRect(),o=e.$el.getBoundingClientRect();e.operateStyles={left:"".concat(n.clientX-o.left,"px"),top:"".concat(t.top+e.windowScrollY,"px"),height:t.height+"px"},e.operateVisible=!0}))},onOperate:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.operateVisible=!1,this.$nextTick((function(r){switch(t){case"reply":e.onReply();break;case"update":e.onUpdate();break;case"copy":e.onCopy(n);break;case"forward":e.onForward("open");break;case"withdraw":e.onWithdraw();break;case"view":e.onViewFile();break;case"down":e.onDownFile();break;case"tag":e.onTag();break;case"newTask":var o=$A.formatMsgBasic(e.operateItem.msg.text);o=o.replace(/<img[^>]*?src=(["'])(.*?)(_thumb\.jpg)*\1[^>]*?>/g,'<img src="$2">'),l.Store.set("addTask",{owner:[e.userId],content:o});break;case"todo":e.onTodo();break;case"pos":e.onPositionId(e.operateItem.id);break;case"emoji":e.onEmoji(n)}}))},onReply:function(){var t=this.scrollInfo().tail;this.replyActiveId=this.operateItem.id,this.replyActiveUpdate=!1,this.inputFocus(),t<=10&&requestAnimationFrame(this.onToBottom)},onUpdate:function(){if(this.onReply(),"text"===this.operateItem.type){this.replyActiveUpdate=!0;var t=this.operateItem.msg.text;t.indexOf("mention")>-1&&(t=(t=t.replace(/<a class="mention file" href="([^'"]*)"([^>]*)>~([^>]*)<\/a>/g,'<span class="mention" data-denotation-char="~" data-id="$1" data-value="$3"><span contenteditable="false"><span class="ql-mention-denotation-char">~</span>$3</span></span>')).replace(/<span class="mention ([^'"]*)" data-id="(\d+)">([@#])([^>]*)<\/span>/g,'<span class="mention" data-denotation-char="$3" data-id="$2" data-value="$4"><span contenteditable="false"><span class="ql-mention-denotation-char">$3</span>$4</span></span>')),this.msgText=$A.formatMsgBasic(t)}},onCopy:function(t){var e=this;if($A.isJson(t)){var n=t.type,r=t.value;switch(n){case"image":this.$Electron&&this.getBase64Image(r).then((function(t){e.$Electron.sendMessage("copyBase64Image",{base64:t})}));break;case"imagedown":this.$store.dispatch("downUrl",{url:r,token:!1});break;case"link":this.$copyText(r).then((function(t){return $A.messageSuccess("复制成功")})).catch((function(t){return $A.messageError("复制失败")}));break;case"text":var o=$A(this.$refs.scroller.$el).find('[data-id="'.concat(this.operateItem.id,'"]')).find(".dialog-content");if(o.length>0){var i=o[0].innerText.replace(/\n\n/g,"\n");this.$copyText(i).then((function(t){return $A.messageSuccess("复制成功")})).catch((function(t){return $A.messageError("复制失败")}))}else $A.messageWarning("不可复制的内容")}}},onCancelReply:function(){this.replyActiveUpdate&&(this.replyActiveUpdate=!1,this.msgText=""),this.replyActiveId=0},onWithdraw:function(){var t=this;$A.modalConfirm({content:"确定撤回此信息吗?",okText:"撤回",loading:!0,onOk:function(){return new Promise((function(e,n){t.$store.dispatch("call",{url:"dialog/msg/withdraw",data:{msg_id:t.operateItem.id}}).then((function(){e("消息已撤回"),t.$store.dispatch("forgetDialogMsg",t.operateItem.id)})).catch((function(t){var e=t.msg;n(e)}))}))}})},onViewReply:function(t){this.operateVisible||this.onPositionId(t.reply_id,t.msg_id)},onViewText:function(t){var e=t.target;if(!this.operateVisible)switch(e.nodeName){case"IMG":e.classList.contains("browse")?this.onViewPicture(e.currentSrc):(this.$store.state.previewImageIndex=0,this.$store.state.previewImageList=$A.getTextImagesInfo(e.outerHTML));break;case"SPAN":e.classList.contains("mention")&&e.classList.contains("task")&&this.$store.dispatch("openTask",$A.runNum(e.getAttribute("data-id")))}},onViewFile:function(t){if(!this.operateVisible){$A.isJson(t)||(t=this.operateItem);var e=t.msg;if(["jpg","jpeg","gif","png"].includes(e.ext))this.onViewPicture(e.path);else{var n="/single/file/msg/".concat(t.id);this.$Electron?this.$Electron.sendMessage("windowRouter",{name:"file-msg-".concat(t.id),path:n,userAgent:"/hideenOfficeTitle/",force:!1,config:{title:"".concat(e.name," (").concat($A.bytesToSize(e.size),")"),titleFixed:!0,parent:null,width:Math.min(window.screen.availWidth,1440),height:Math.min(window.screen.availHeight,900)},webPreferences:{nodeIntegrationInSubFrames:"drawio"===e.ext}}):this.$isEEUiApp?$A.eeuiAppOpenPage({pageType:"app",pageTitle:"".concat(e.name," (").concat($A.bytesToSize(e.size),")"),url:"web.js",params:{titleFixed:!0,url:$A.rightDelete(window.location.href,window.location.hash)+"#".concat(n)}}):window.open($A.apiUrl("..".concat(n)))}}},onViewPicture:function(t){var e=this.allMsgs.filter((function(t){return"file"===t.type?["jpg","jpeg","gif","png"].includes(t.msg.ext):"text"===t.type&&t.msg.text.match(/<img\s+class="browse"[^>]*?>/)})),n=[];e.some((function(t){var e=t.type,r=t.msg;"file"===e?n.push({src:r.path,width:r.width,height:r.height}):"text"===e&&n.push.apply(n,$($A.getTextImagesInfo(r.text)))}));var r=n.findIndex((function(e){return e.src===t}));r>-1?(this.$store.state.previewImageIndex=r,this.$store.state.previewImageList=n):(this.$store.state.previewImageIndex=0,this.$store.state.previewImageList=[t])},onDownFile:function(t){var e=this;this.operateVisible||($A.isJson(t)||(t=this.operateItem),$A.modalConfirm({title:"下载文件",content:"".concat(t.msg.name," (").concat($A.bytesToSize(t.msg.size),")"),okText:"立即下载",onOk:function(){e.$store.dispatch("downUrl",$A.apiUrl("dialog/msg/download?msg_id=".concat(t.id)))}}))},onReplyList:function(t){this.operateVisible||(this.replyListId=t.msg_id,this.replyListShow=!0)},onError:function(t){var e=this;if(!0===t.error){var n=t.errorData,r=n.type,o=n.content,i=n.msg,a={icon:"error",title:"发送失败",content:o,cancelText:"取消发送",onCancel:function(n){e.tempMsgs=e.tempMsgs.filter((function(e){return e.id!=t.id}))}};if("text"===r)a.okText="再次编辑",a.onOk=function(){e.tempMsgs=e.tempMsgs.filter((function(e){return e.id!=t.id})),e.msgText=i,e.inputFocus()};else{if("record"!==r)return;a.okText="重新发送",a.onOk=function(){e.tempMsgs=e.tempMsgs.filter((function(e){return e.id!=t.id})),e.sendRecord(i)}}$A.modalConfirm(a)}},onEmoji:function(t){var e=this;$A.isJson(t)||(t={msg_id:this.operateItem.id,symbol:t}),this.$store.dispatch("setLoad",{key:"msg-".concat(t.msg_id),delay:600}),this.$store.dispatch("call",{url:"dialog/msg/emoji",data:t}).then((function(t){var n=t.data;e.dialogMsgs.findIndex((function(t){return t.id==n.id}))>-1?e.$store.dispatch("saveDialogMsg",n):e.todoViewData.id===n.id&&(e.todoViewData=Object.assign(e.todoViewData,n))})).catch((function(t){var e=t.msg;$A.messageError(e)})).finally((function(n){e.$store.dispatch("cancelLoad","msg-".concat(t.msg_id))}))},onShowEmojiUser:function(t){this.operateVisible||(this.respondData=t,this.respondShow=!0)},onTag:function(){var t=this;if(!this.operateVisible){var e={msg_id:this.operateItem.id};this.$store.dispatch("setLoad",{key:"msg-".concat(e.msg_id),delay:600}),this.$store.dispatch("call",{url:"dialog/msg/tag",data:e}).then((function(e){var n=e.data;t.tagOrTodoSuccess(n)})).catch((function(t){var e=t.msg;$A.messageError(e)})).finally((function(n){t.$store.dispatch("cancelLoad","msg-".concat(e.msg_id))}))}},onTodo:function(t){var e=this;if(!this.operateVisible)if("submit"===t){var n=$A.cloneJSON(this.todoSettingData);if("my"===n.type)n.type="user",n.userids=[n.my_id];else if("you"===n.type)n.type="user",n.userids=[n.you_id];else if("user"===n.type&&0===$A.arrayLength(n.userids))return void $A.messageWarning("选择指定成员");this.todoSettingLoad++,this.onTodoSubmit(n).then((function(t){$A.messageSuccess(t),e.todoSettingShow=!1})).catch($A.messageError).finally((function(t){e.todoSettingLoad--}))}else{var r;this.todoSettingData={type:"all",userids:[],msg_id:this.operateItem.id,my_id:this.userId,you_id:null===(r=this.dialogData.dialog_user)||void 0===r?void 0:r.userid},this.operateItem.todo?$A.modalConfirm({content:"你确定取消待办吗?",cancelText:"取消",okText:"确定",loading:!0,onOk:function(){return e.onTodoSubmit(e.todoSettingData)}}):this.todoSettingShow=!0}},onTodoSubmit:function(t){var e=this;return new Promise((function(n,r){e.$store.dispatch("setLoad",{key:"msg-".concat(t.msg_id),delay:600}),e.$store.dispatch("call",{url:"dialog/msg/todo",data:t}).then((function(t){var r=t.data,o=t.msg;n(o),e.tagOrTodoSuccess(r),e.onActive()})).catch((function(t){var e=t.msg;r(e)})).finally((function(n){e.$store.dispatch("cancelLoad","msg-".concat(t.msg_id))}))}))},tagOrTodoSuccess:function(t){this.$store.dispatch("saveDialogMsg",t.update),t.add&&(this.$store.dispatch("saveDialogMsg",t.add),this.$store.dispatch("updateDialogLastMsg",t.add))},goBeforeUnread:function(){var t=this;if(0!==this.beforeUnread&&!this.beforeLoad){this.beforeLoad=!0;var e=this.dialogData.first_umid;this.$store.dispatch("dialogMsgMark",{dialog_id:this.dialogId,type:"read"}).then((function(n){t.onPositionId(e)})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(e){t.beforeLoad=!1}))}},getBase64Image:function(t){return new Promise((function(e){var n=document.createElement("CANVAS"),r=n.getContext("2d"),o=new Image;o.crossOrigin="Anonymous",o.onload=function(){n.height=o.height,n.width=o.width,r.drawImage(o,0,0);var i="png";$A.rightExists(t,"jpg")||$A.rightExists(t,"jpeg")?i="jpeg":$A.rightExists(t,"git")&&(i="git"),e(n.toDataURL("image/".concat(i))),n=null},o.src=t}))}}};const B=(0,a.Z)(R,(function(){var t=this,e=t._self._c;return t.isReady?e("div",{staticClass:"dialog-wrapper",class:t.wrapperClass,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)},touchstart:t.onTouchStart,touchmove:t.onTouchMove}},[e("div",{staticClass:"dialog-nav",style:t.navStyle},[t._t("head",(function(){return[e("div",{staticClass:"nav-wrapper",class:{completed:t.$A.dialogCompleted(t.dialogData)}},[e("div",{staticClass:"dialog-back",on:{click:t.onBack}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),t.msgUnreadOnly?e("div",{staticClass:"back-num"},[t._v(t._s(t.msgUnreadOnly))]):t._e()]),t._v(" "),e("div",{staticClass:"dialog-block"},[e("div",{staticClass:"dialog-avatar"},["group"==t.dialogData.type?["department"==t.dialogData.group_type?e("i",{staticClass:"taskfont icon-avatar department"},[t._v("")]):"project"==t.dialogData.group_type?e("i",{staticClass:"taskfont icon-avatar project"},[t._v("")]):"task"==t.dialogData.group_type?e("i",{staticClass:"taskfont icon-avatar task"},[t._v("")]):e("Icon",{staticClass:"icon-avatar",attrs:{type:"ios-people"}})]:t.dialogData.dialog_user?e("div",{staticClass:"user-avatar"},[e("UserAvatar",{attrs:{online:t.dialogData.online_state,userid:t.dialogData.dialog_user.userid,size:42},on:{"update:online":function(e){return t.$set(t.dialogData,"online_state",e)}}},["user"===t.dialogData.type&&!0!==t.dialogData.online_state?e("p",{attrs:{slot:"end"},slot:"end"},[t._v("\n "+t._s(t.$L(t.dialogData.online_state))+"\n ")]):t._e()])],1):e("Icon",{staticClass:"icon-avatar",attrs:{type:"md-person"}})],2),t._v(" "),e("div",{staticClass:"dialog-title"},[e("div",{staticClass:"main-title"},[t._l(t.$A.dialogTags(t.dialogData),(function(n){return"success"!=n.color?[e("Tag",{attrs:{color:n.color,fade:!1}},[t._v(t._s(t.$L(n.text)))])]:t._e()})),t._v(" "),e("h2",[t._v(t._s(t.dialogData.name))]),t._v(" "),t.peopleNum>0?e("em",[t._v("("+t._s(t.peopleNum)+")")]):t._e(),t._v(" "),t.dialogData.bot?e("Tag",{staticClass:"after",attrs:{fade:!1}},[t._v(t._s(t.$L("机器人")))]):t._e(),t._v(" "),"all"==t.dialogData.group_type?e("Tag",{staticClass:"after",attrs:{fade:!1}},[t._v(t._s(t.$L("全员")))]):"department"==t.dialogData.group_type?e("Tag",{staticClass:"after",attrs:{fade:!1}},[t._v(t._s(t.$L("部门")))]):t._e(),t._v(" "),t.msgLoadIng>0?e("div",{staticClass:"load"},[e("Loading")],1):t._e()],2),t._v(" "),e("ul",{staticClass:"title-desc"},["user"===t.dialogData.type?e("li",{class:[!0===t.dialogData.online_state?"online":"offline"]},[t._v("\n "+t._s(t.$L(!0===t.dialogData.online_state?"在线":t.dialogData.online_state))+"\n ")]):t._e()]),t._v(" "),t.tagShow?e("ul",{staticClass:"title-tags scrollbar-hidden"},t._l(t.msgTags,(function(n){var o;return e("li",{key:n.type,class:(o={},r(o,n.type||"msg",!0),r(o,"active",t.msgType===n.type),o),on:{click:function(e){return t.onMsgType(n.type)}}},[e("i",{staticClass:"no-dark-content"}),t._v(" "),e("span",[t._v(t._s(t.$L(n.label)))])])})),0):t._e()])]),t._v(" "),e("EDropdown",{staticClass:"dialog-menu",attrs:{trigger:"click"},on:{command:t.onDialogMenu}},[e("i",{staticClass:"taskfont dialog-menu-icon"},[t._v("")]),t._v(" "),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},["user"===t.dialogData.type?e("EDropdownItem",{attrs:{command:"openCreate"}},[e("div",[t._v(t._s(t.$L("创建群组")))])]):[e("EDropdownItem",{attrs:{command:"groupInfo"}},[e("div",[t._v(t._s(t.$L("群组设置")))])]),t._v(" "),t.dialogData.owner_id!=t.userId?e("EDropdownItem",{attrs:{command:"exit"}},[e("div",{staticStyle:{color:"#f00"}},[t._v(t._s(t.$L("退出群组")))])]):"user"===t.dialogData.group_type?[e("EDropdownItem",{attrs:{command:"transfer"}},[e("div",[t._v(t._s(t.$L("转让群主")))])]),t._v(" "),e("EDropdownItem",{attrs:{command:"disband"}},[e("div",{staticStyle:{color:"#f00"}},[t._v(t._s(t.$L("解散群组")))])])]:t._e()]],2)],1)],1)]}))],2),t._v(" "),t.beforeUnread>0?e("div",{staticClass:"dialog-top",class:{down:t.tagShow}},[e("div",{staticClass:"top-unread",on:{click:t.goBeforeUnread}},[t.beforeLoad?e("Icon",{staticClass:"icon-loading",attrs:{type:"ios-loading"}}):t._e(),t._v(" "),e("span",[t._v(t._s(t.$L("未读消息".concat(t.beforeUnread,"条"))))])],1)]):t._e(),t._v(" "),e("VirtualList",{ref:"scroller",staticClass:"dialog-scroller scrollbar-overlay",class:t.scrollerClass,attrs:{"data-key":"id","data-sources":t.allMsgs,"data-component":t.msgItem,"item-class-add":t.itemClassAdd,"extra-props":{dialogData:t.dialogData,operateVisible:t.operateVisible,operateItem:t.operateItem,isMyDialog:t.isMyDialog,msgId:t.msgId},"estimate-size":"group"==t.dialogData.type?105:77,keeps:50,disabled:t.scrollDisabled},on:{scroll:t.onScroll,range:t.onRange,totop:t.onPrevPage,"on-longpress":t.onLongpress,"on-view-reply":t.onViewReply,"on-view-text":t.onViewText,"on-view-file":t.onViewFile,"on-down-file":t.onDownFile,"on-reply-list":t.onReplyList,"on-error":t.onError,"on-emoji":t.onEmoji,"on-show-emoji-user":t.onShowEmojiUser}},[e("template",{slot:"header"},[0===t.allMsgs.length&&t.loadMsg||t.prevId>0?e("div",{staticClass:"dialog-item loading"},[e("Loading",{attrs:{type:"pure"}})],1):0===t.allMsgs.length?e("div",{staticClass:"dialog-item nothing"},[t._v(t._s(t.$L("暂无消息")))]):t._e()])],2),t._v(" "),e("div",{staticClass:"dialog-footer",class:t.footerClass,on:{click:t.onActive}},[e("div",{staticClass:"dialog-newmsg",on:{click:t.onToBottom}},[t._v(t._s(t.$L("有".concat(t.msgNew,"条新消息"))))]),t._v(" "),e("div",{staticClass:"dialog-goto",on:{click:t.onToBottom}},[e("i",{staticClass:"taskfont"},[t._v("")])]),t._v(" "),e("DialogUpload",{ref:"chatUpload",staticClass:"chat-upload",attrs:{"dialog-id":t.dialogId,"reply-id":t.replyId},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)}}}),t._v(" "),t.todoShow?e("div",{staticClass:"chat-todo"},[e("div",{staticClass:"todo-label"},[t._v(t._s(t.$L("待办"))+":")]),t._v(" "),e("ul",{staticClass:"scrollbar-hidden"},t._l(t.todoList,(function(n){return e("li",{on:{click:function(e){return e.stopPropagation(),t.onViewTodo(n)}}},[e("div",{staticClass:"todo-desc no-dark-content"},[t._v(t._s(t.$A.getMsgSimpleDesc(n.msg_data)))])])})),0)]):t._e(),t._v(" "),t.isMute?e("div",{staticClass:"chat-mute"},[t._v("\n "+t._s(t.$L("禁言发言"))+"\n ")]):e("ChatInput",{ref:"input",attrs:{"dialog-id":t.dialogId,"reply-id":t.replyActiveId,"emoji-bottom":t.windowSmall,maxlength:2e5,placeholder:t.$L("输入消息...")},on:{"on-focus":t.onEventFocus,"on-blur":t.onEventBlur,"on-more":t.onEventMore,"on-file":t.sendFileMsg,"on-send":t.sendMsg,"on-record":t.sendRecord,"on-record-state":t.onRecordState,"on-emoji-visible-change":t.onEventEmojiVisibleChange,"on-height-change":t.onHeightChange,"on-cancel-reply":t.onCancelReply},model:{value:t.msgText,callback:function(e){t.msgText=e},expression:"msgText"}})],1),t._v(" "),e("div",{staticClass:"operate-position",style:t.operateStyles},[e("Dropdown",{attrs:{trigger:"custom",placement:"top",visible:t.operateVisible,transferClassName:"dialog-wrapper-operate",transfer:""},on:{"on-clickoutside":function(e){t.operateVisible=!1}}},[e("div",{style:{userSelect:t.operateVisible?"none":"auto",height:t.operateStyles.height}}),t._v(" "),e("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[e("DropdownItem",{attrs:{name:"action"}},[e("ul",{staticClass:"operate-action"},[0===t.msgId?e("li",{on:{click:function(e){return t.onOperate("reply")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),e("span",[t._v(t._s(t.$L("回复")))])]):t._e(),t._v(" "),t.operateItem.userid==t.userId&&"text"===t.operateItem.type?e("li",{on:{click:function(e){return t.onOperate("update")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),e("span",[t._v(t._s(t.$L("编辑")))])]):t._e(),t._v(" "),t._l(t.operateCopys,(function(n){return e("li",{on:{click:function(e){return t.onOperate("copy",n)}}},[e("i",{staticClass:"taskfont",domProps:{innerHTML:t._s(n.icon)}}),t._v(" "),e("span",[t._v(t._s(t.$L(n.label)))])])})),t._v(" "),e("li",{on:{click:function(e){return t.onOperate("forward")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),e("span",[t._v(t._s(t.$L("转发")))])]),t._v(" "),t.operateItem.userid==t.userId?e("li",{on:{click:function(e){return t.onOperate("withdraw")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),e("span",[t._v(t._s(t.$L("撤回")))])]):t._e(),t._v(" "),"file"===t.operateItem.type?[e("li",{on:{click:function(e){return t.onOperate("view")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),e("span",[t._v(t._s(t.$L("查看")))])]),t._v(" "),e("li",{on:{click:function(e){return t.onOperate("down")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),e("span",[t._v(t._s(t.$L("下载")))])])]:t._e(),t._v(" "),e("li",{on:{click:function(e){return t.onOperate("tag")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),e("span",[t._v(t._s(t.$L(t.operateItem.tag?"取消标注":"标注")))])]),t._v(" "),"text"===t.operateItem.type?e("li",{on:{click:function(e){return t.onOperate("newTask")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),e("span",[t._v(t._s(t.$L("新任务")))])]):t._e(),t._v(" "),e("li",{on:{click:function(e){return t.onOperate("todo")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),e("span",[t._v(t._s(t.$L(t.operateItem.todo?"取消待办":"设待办")))])]),t._v(" "),""!==t.msgType?e("li",{on:{click:function(e){return t.onOperate("pos")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),e("span",[t._v(t._s(t.$L("完整对话")))])]):t._e()],2)]),t._v(" "),e("DropdownItem",{staticClass:"dropdown-emoji",attrs:{name:"emoji"}},[e("ul",{staticClass:"operate-emoji scrollbar-hidden"},t._l(t.operateEmojis,(function(n,r){return e("li",{key:r,staticClass:"no-dark-content",domProps:{innerHTML:t._s(n)},on:{click:function(e){return t.onOperate("emoji",n)}}})})),0)])],1)],1)],1),t._v(" "),t.dialogDrag?e("div",{staticClass:"drag-over",on:{click:function(e){t.dialogDrag=!1}}},[e("div",{staticClass:"drag-text"},[t._v(t._s(t.$L("拖动到这里发送")))])]):t._e(),t._v(" "),e("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"}},[e("ul",{staticClass:"dialog-wrapper-paste",class:t.pasteWrapperClass},t._l(t.pasteItem,(function(n){return e("li",["image"==n.type?e("img",{attrs:{src:n.result}}):e("div",[t._v(t._s(t.$L("文件"))+": "+t._s(n.name)+" ("+t._s(t.$A.bytesToSize(n.size))+")")])])})),0)]),t._v(" "),e("Modal",{attrs:{title:t.$L("创建群组"),"mask-closable":!1},model:{value:t.createGroupShow,callback:function(e){t.createGroupShow=e},expression:"createGroupShow"}},[e("Form",{attrs:{model:t.createGroupData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{prop:"userids",label:t.$L("群成员")}},[e("UserInput",{attrs:{uncancelable:t.createGroupData.uncancelable,"multiple-max":100,"show-bot":"",placeholder:t.$L("选择项目成员")},model:{value:t.createGroupData.userids,callback:function(e){t.$set(t.createGroupData,"userids",e)},expression:"createGroupData.userids"}})],1),t._v(" "),e("FormItem",{attrs:{prop:"chat_name",label:t.$L("群名称")}},[e("Input",{attrs:{placeholder:t.$L("输入群名称(选填)")},model:{value:t.createGroupData.chat_name,callback:function(e){t.$set(t.createGroupData,"chat_name",e)},expression:"createGroupData.chat_name"}})],1)],1),t._v(" "),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(e){t.createGroupShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Button",{attrs:{type:"primary",loading:t.createGroupLoad>0},on:{click:t.onCreateGroup}},[t._v(t._s(t.$L("创建")))])],1)],1),t._v(" "),e("Modal",{attrs:{title:t.$L("转发"),"mask-closable":!1},model:{value:t.forwardShow,callback:function(e){t.forwardShow=e},expression:"forwardShow"}},[e("DialogSelect",{model:{value:t.forwardData,callback:function(e){t.forwardData=e},expression:"forwardData"}}),t._v(" "),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(e){t.forwardShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Button",{attrs:{type:"primary",loading:t.forwardLoad},on:{click:function(e){return t.onForward("submit")}}},[t._v(t._s(t.$L("转发")))])],1)],1),t._v(" "),e("Modal",{attrs:{title:t.$L("设置待办"),"mask-closable":!1},model:{value:t.todoSettingShow,callback:function(e){t.todoSettingShow=e},expression:"todoSettingShow"}},[e("Form",{ref:"todoSettingForm",attrs:{model:t.todoSettingData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{prop:"type",label:t.$L("当前会话")}},[e("RadioGroup",{model:{value:t.todoSettingData.type,callback:function(e){t.$set(t.todoSettingData,"type",e)},expression:"todoSettingData.type"}},[e("Radio",{attrs:{label:"all"}},[t._v(t._s(t.$L("所有成员")))]),t._v(" "),t.todoSettingData.my_id?e("Radio",{attrs:{label:"my"}},[e("div",{staticStyle:{display:"inline-block"}},[e("UserAvatar",{attrs:{userid:t.todoSettingData.my_id,"show-icon":!1,"show-name":!0}})],1)]):t._e(),t._v(" "),t.todoSettingData.you_id?e("Radio",{attrs:{label:"you"}},[e("div",{staticStyle:{display:"inline-block"}},[e("UserAvatar",{attrs:{userid:t.todoSettingData.you_id,"show-icon":!1,"show-name":!0}})],1)]):t._e(),t._v(" "),e("Radio",{attrs:{label:"user"}},[t._v(t._s(t.$L("指定成员")))])],1)],1),t._v(" "),"user"===t.todoSettingData.type?e("FormItem",{attrs:{prop:"userids"}},[e("UserInput",{attrs:{"dialog-id":t.dialogId,placeholder:t.$L("选择指定成员")},model:{value:t.todoSettingData.userids,callback:function(e){t.$set(t.todoSettingData,"userids",e)},expression:"todoSettingData.userids"}})],1):t._e()],1),t._v(" "),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(e){t.todoSettingShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Button",{attrs:{type:"primary",loading:t.todoSettingLoad>0},on:{click:function(e){return t.onTodo("submit")}}},[t._v(t._s(t.$L("确定")))])],1)],1),t._v(" "),e("DrawerOverlay",{attrs:{placement:"right",size:400},model:{value:t.groupInfoShow,callback:function(e){t.groupInfoShow=e},expression:"groupInfoShow"}},[t.groupInfoShow?e("DialogGroupInfo",{attrs:{dialogId:t.dialogId},on:{"on-close":function(e){t.groupInfoShow=!1}}}):t._e()],1),t._v(" "),e("Modal",{attrs:{title:t.$L("转让群主身份"),"mask-closable":!1},model:{value:t.groupTransferShow,callback:function(e){t.groupTransferShow=e},expression:"groupTransferShow"}},[e("Form",{attrs:{model:t.groupTransferData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{prop:"userid",label:t.$L("新的群主")}},[e("UserInput",{attrs:{disabledChoice:t.groupTransferData.disabledChoice,"multiple-max":1,"max-hidden-select":"",placeholder:t.$L("选择新的群主")},model:{value:t.groupTransferData.userid,callback:function(e){t.$set(t.groupTransferData,"userid",e)},expression:"groupTransferData.userid"}})],1)],1),t._v(" "),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(e){t.groupTransferShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Button",{attrs:{type:"primary",loading:t.groupTransferLoad>0},on:{click:function(e){return t.onDialogMenu("transferConfirm")}}},[t._v(t._s(t.$L("确定转让")))])],1)],1),t._v(" "),e("DrawerOverlay",{attrs:{placement:"right","class-name":"dialog-wrapper-drawer-list",size:500},model:{value:t.replyListShow,callback:function(e){t.replyListShow=e},expression:"replyListShow"}},[t.replyListShow?e("DialogWrapper",{staticClass:"drawer-list",attrs:{dialogId:t.dialogId,msgId:t.replyListId}},[e("div",{staticClass:"drawer-title",attrs:{slot:"head"},slot:"head"},[t._v(t._s(t.$L("回复消息")))])]):t._e()],1),t._v(" "),e("DrawerOverlay",{attrs:{placement:"right",size:400},model:{value:t.respondShow,callback:function(e){t.respondShow=e},expression:"respondShow"}},[t.respondShow?e("DialogRespond",{attrs:{"respond-data":t.respondData},on:{"on-close":function(e){t.respondShow=!1}}}):t._e()],1),t._v(" "),e("DrawerOverlay",{attrs:{placement:"right","class-name":"dialog-wrapper-drawer-list",size:500},model:{value:t.todoViewShow,callback:function(e){t.todoViewShow=e},expression:"todoViewShow"}},[e("div",{staticClass:"dialog-wrapper drawer-list"},[e("div",{staticClass:"dialog-nav"},[e("div",{staticClass:"drawer-title"},[t._v(t._s(t.$L("待办消息")))])]),t._v(" "),e("div",{staticClass:"dialog-scroller scrollbar-overlay"},[t.todoViewMsg?e("DialogItem",{attrs:{source:t.todoViewMsg,simpleView:""},on:{"on-view-text":t.onViewText,"on-view-file":t.onViewFile,"on-down-file":t.onDownFile,"on-emoji":t.onEmoji}}):t._e(),t._v(" "),e("Button",{staticClass:"original-button",attrs:{icon:"md-exit",type:"text",loading:t.todoViewPosLoad},on:{click:t.onPosTodo}},[t._v(t._s(t.$L("回到原文")))])],1),t._v(" "),e("div",{staticClass:"todo-button"},[e("Button",{attrs:{type:"primary",size:"large",icon:"md-checkbox-outline",loading:t.todoViewLoad,long:""},on:{click:t.onDoneTodo}},[t._v(t._s(t.$L("完成")))])],1)])])],1):t._e()}),[],!1,null,null,null).exports},62202:(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);n<e;n++)r[n]=t[n];return r}const i={name:"ProjectLog",components:{ProjectLogDetail:{name:"ProjectLogDetail",functional:!0,props:{render:Function,item:Object},render:function(t,e){return e.props.render(t,e.props.item)}}},props:{projectId:{type:Number,default:0},taskId:{type:Number,default:0},showLoad:{type:Boolean,default:!0}},data:function(){return{loadIng:0,lists:[],listPage:1,listPageSize:20,hasMorePages:!1,totalNum:-1}},mounted:function(){this.getLists(!0)},computed:{},watch:{projectId:function(){this.lists=[],this.getLists(!0)},taskId:function(){this.lists=[],this.getLists(!0)},loadIng:function(t){this.$emit("on-load-change",t>0)}},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;!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<r.last_page,e.totalNum=r.total})).catch((function(){e.lists=[],e.hasMorePages=!1,e.totalNum=0})).finally((function(t){e.loadIng--}))},getMore:function(){this.hasMorePages&&(this.hasMorePages=!1,this.listPage++,this.getLists())},logDetail:function(t,e){var n=e.detail,o=e.record,i=[t("span",this.$L(n))];if($A.isJson(o)){if($A.isArray(o.change)){var a=r(o.change,2),s=a[0],l=a[1];i.push(t("span",": ")),s&&s!=l?(i.push(t("span",{class:"change-value"},"".concat(s||"-"))),i.push(t("span"," => ")),i.push(t("span",{class:"change-value"},"".concat(l||"-")))):i.push(t("span",{class:"change-value"},l||"-"))}if(o.userid){var u=$A.isArray(o.userid)?o.userid:[o.userid],c=[];u.some((function(e){/^\d+$/.test(e)?c.push(t("UserAvatar",{props:{size:18,userid:e}})):c.push(t("span",e))})),c.length>0&&i.push(t("div",{class:"detail-user"},[t("div",{class:"detail-user-wrap"},c)]))}}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(){return new Promise((function(n,r){e.$store.dispatch("call",{url:"project/task/resetfromlog",data:{id:t.id}}).then((function(t){var r=t.data,o=t.msg;n(o),e.$store.dispatch("saveTask",r),e.getLists(!0)})).catch((function(t){var e=t.msg;r(e)}))}))}})},openTask:function(t){this.$store.dispatch("openTask",t)}}};const a=(0,n(51900).Z)(i,(function(){var t=this,e=t._self._c;return e("div",{class:["project-log",0==t.taskId?"is-drawer":""]},[e("div",{staticClass:"log-title"},[t._v(t._s(t.$L("项目动态")))]),t._v(" "),e("ul",{staticClass:"logs-activity"},[t._l(t.lists,(function(n){return e("li",[e("div",{staticClass:"logs-date"},[t._v(t._s(t.logDate(n)))]),t._v(" "),e("div",{staticClass:"logs-section"},[e("Timeline",t._l(n.lists,(function(n,r){return e("TimelineItem",{key:r},[e("div",{staticClass:"logs-dot",attrs:{slot:"dot"},slot:"dot"},[n.userid?e("UserAvatar",{attrs:{userid:n.userid,size:18,showName:""}}):e("div",{staticClass:"avatar-wrapper common-avatar"},[e("EAvatar",{attrs:{size:18}},[t._v("A")]),t._v(" "),e("div",{staticClass:"avatar-name auto"},[t._v(t._s(t.$L("系统")))])],1)],1),t._v(" "),t._l(n.lists,(function(n){return[e("div",{staticClass:"log-summary"},[e("ProjectLogDetail",{attrs:{render:t.logDetail,item:n}}),t._v(" "),t.operationList(n).length>0?e("span",{staticClass:"log-operation"},t._l(t.operationList(n),(function(n,r){return e("Button",{key:r,attrs:{size:"small"},on:{click:function(e){return t.onOperation(n)}}},[t._v(t._s(n.button))])})),1):t._e(),t._v(" "),e("span",{staticClass:"log-time"},[t._v(t._s(n.time.ymd)+" "+t._s(n.time.segment)+" "+t._s(n.time.hi))])],1),t._v(" "),n.project_task?e("div",{staticClass:"log-task"},[e("em",{on:{click:function(e){return t.openTask(n.project_task)}}},[t._v(t._s(t.$L("关联任务"))+": "+t._s(n.project_task.name))])]):t._e()]}))],2)})),1)],1)])})),t._v(" "),t.loadIng>0&&t.showLoad?e("li",{staticClass:"logs-loading"},[e("Loading")],1):t.hasMorePages?e("li",{staticClass:"logs-more",on:{click:t.getMore}},[t._v(t._s(t.$L("加载更多")))]):0==t.totalNum?e("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},49483:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});const r={name:"ReportDetail",props:{data:{default:{}}},data:function(){return{loadIng:0}},watch:{"data.id":{handler:function(t){t>0&&this.sendRead()},immediate:!0}},methods:{sendRead:function(){var t=this;this.loadIng++,this.$store.dispatch("call",{url:"report/read",data:{ids:[this.data.id]}}).then((function(){})).catch((function(){})).finally((function(e){t.loadIng--}))}}};const o=(0,n(51900).Z)(r,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"report-detail"},[e("div",{staticClass:"report-title"},[t._v("\n "+t._s(t.data.title)+"\n "),t.loadIng>0?e("Icon",{staticClass:"icon-loading",attrs:{type:"ios-loading"}}):t._e()],1),t._v(" "),e("div",{staticClass:"report-detail-context"},[e("Form",{staticClass:"report-form",attrs:{"label-width":"auto",inline:""}},[e("FormItem",{attrs:{label:t.$L("汇报人")}},[e("UserAvatar",{attrs:{userid:t.data.userid,size:28}})],1),t._v(" "),e("FormItem",{attrs:{label:t.$L("提交时间")}},[t._v("\n "+t._s(t.data.created_at)+"\n ")]),t._v(" "),e("FormItem",{attrs:{label:t.$L("汇报对象")}},[0===t.data.receives_user.length?[t._v("-")]:t._l(t.data.receives_user,(function(t,n){return e("UserAvatar",{key:n,attrs:{userid:t.userid,size:28}})}))],2)],1),t._v(" "),e("Form",{staticClass:"report-form",attrs:{"label-width":"auto"}},[e("FormItem",{attrs:{label:t.$L("汇报内容")}},[e("div",{staticClass:"report-content",domProps:{innerHTML:t._s(t.data.content)}})])],1)],1)])}),[],!1,null,null,null).exports},25943:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});const r={name:"ReportEdit",components:{TEditor:function(){return n.e(27).then(n.bind(n,69027))},UserInput:n(60935).Z},props:{id:{default:0}},data:function(){return{loadIng:0,receiveLoad:0,reportData:{sign:"",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}},mounted:function(){},methods:{handleSubmit:function(){var t=this;0===this.id&&this.reportData.id>0?$A.modalConfirm({title:"覆盖提交",content:"你已提交过此日期的报告,是否覆盖提交?",onOk:function(){t.doSubmit()}}):this.doSubmit()},doSubmit:function(){var t=this;this.loadIng++,this.$store.dispatch("call",{url:"report/store",data:this.reportData,method:"post"}).then((function(e){var n=e.data,r=e.msg;t.reportData.offset=0,t.reportData.type="weekly",t.reportData.receive=[],t.getTemplate(),!t.$isSubElectron&&$A.messageSuccess(r),t.$emit("saveSuccess",{data:n,msg:r})})).catch((function(t){var e=t.msg;$A.messageError(e)})).finally((function(e){t.loadIng--}))},getTemplate:function(){var t=this;this.loadIng++,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.sign=n.sign,t.reportData.title=n.title,t.reportData.content=n.content)):(t.reportData.id=0,t.reportData.sign=n.sign,t.reportData.title=n.title,t.reportData.content=n.content)})).catch((function(t){var e=t.msg;$A.messageError(e)})).finally((function(e){t.loadIng--}))},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;setTimeout((function(e){t.receiveLoad++}),300),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)})).finally((function(e){t.receiveLoad--}))},reReportData:function(){this.reportData.title="",this.reportData.content="",this.reportData.receive=[],this.reportData.id=0}}};const o=(0,n(51900).Z)(r,(function(){var t=this,e=t._self._c;return e("Form",{staticClass:"report-edit",attrs:{"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{label:t.$L("汇报类型")}},[e("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"}},[e("Radio",{attrs:{label:"weekly",disabled:t.id>0&&"daily"==t.reportData.type}},[t._v(t._s(t.$L("周报")))]),t._v(" "),e("Radio",{attrs:{label:"daily",disabled:t.id>0&&"weekly"==t.reportData.type}},[t._v(t._s(t.$L("日报")))])],1),t._v(" "),0===t.id?e("ButtonGroup",{staticClass:"report-buttongroup"},[e("ETooltip",{attrs:{disabled:t.windowSmall||t.$isEEUiApp,content:t.prevCycleText,placement:"bottom"}},[e("Button",{attrs:{type:"primary"},on:{click:t.prevCycle}},[e("Icon",{attrs:{type:"ios-arrow-back"}})],1)],1),t._v(" "),e("div",{staticClass:"report-buttongroup-vertical"}),t._v(" "),e("ETooltip",{attrs:{disabled:t.windowSmall||t.$isEEUiApp||t.reportData.offset>=0,content:t.nextCycleText,placement:"bottom"}},[e("Button",{attrs:{type:"primary",disabled:t.reportData.offset>=0},on:{click:t.nextCycle}},[e("Icon",{attrs:{type:"ios-arrow-forward"}})],1)],1)],1):t._e()],1),t._v(" "),e("FormItem",{attrs:{label:t.$L("汇报名称")}},[e("Input",{attrs:{disabled:""},model:{value:t.reportData.title,callback:function(e){t.$set(t.reportData,"title",e)},expression:"reportData.title"}})],1),t._v(" "),e("FormItem",{attrs:{label:t.$L("汇报对象")}},[e("div",{staticClass:"report-users"},[e("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(" "),e("a",{staticClass:"report-user-link",attrs:{href:"javascript:void(0);"},on:{click:t.getLastSubmitter}},[t.receiveLoad>0?e("Icon",{staticClass:"icon-loading",attrs:{type:"ios-loading"}}):e("Icon",{attrs:{type:"ios-share-outline"}}),t._v("\n "+t._s(t.$L("使用我上次的汇报对象"))+"\n ")],1)],1)]),t._v(" "),e("FormItem",{staticClass:"report-content-editor",attrs:{label:t.$L("汇报内容")}},[e("TEditor",{attrs:{height:"100%"},model:{value:t.reportData.content,callback:function(e){t.$set(t.reportData,"content",e)},expression:"reportData.content"}})],1),t._v(" "),e("FormItem",{staticClass:"report-foot"},[e("Button",{staticClass:"report-bottom",attrs:{type:"primary",loading:t.loadIng>0},on:{click:t.handleSubmit}},[t._v(t._s(t.$L(t.id>0?"修改":"提交")))])],1)],1)}),[],!1,null,null,null).exports},1130:(t,e,n)=>{"use strict";n.d(e,{Z:()=>y});var r=n(20629),o=n(69027),i=n(58748),a=n(60935);const s={name:"TaskUpload",props:{maxSize:{type:Number,default:1024e3}},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 l=n(51900);const u=(0,l.Z)(s,(function(){var t=this;return(0,t._self._c)("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 c=n(20614),d=n(62202),f=n(80641),h=n(19102);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 m(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?p(Object(n),!0).forEach((function(e){g(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function g(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const v={name:"TaskDetail",components:{ChatInput:n(47015).Z,TaskMenu:h.Z,ProjectLog:d.Z,DialogWrapper:c.Z,TaskUpload:u,UserInput:a.Z,TaskPriority:i.Z,TEditor:o.default},props:{taskId:{type:Number,default:0},openTask:{type:Object,default:function(){return{}}},mainEndAt:{default:null},canUpdateBlur:{type:Boolean,default:!0},modalMode:{type:Boolean,default:!1}},data:function(){return{ready:!1,taskDetail:{},ownerData:{},ownerLoad:0,receiveShow:!1,assistForce:!1,assistData:{},assistLoad:0,addsubForce:!1,addsubShow:!1,addsubName:"",addsubLoad:0,timeForce:!1,timeOpen:!1,timeValue:[],timeOptions:{shortcuts:$A.timeOptionShortcuts()},loopForce:!1,nowTime:$A.Time(),nowInterval:null,msgText:"",msgFile:[],msgRecord:{},navActive:"dialog",logLoadIng:!1,sendLoad:0,openLoad:0,taskPlugins:["advlist autolink lists link image charmap print preview hr anchor pagebreak","searchreplace visualblocks visualchars code","insertdatetime media nonbreaking save table directionality","emoticons paste codesample","autoresize"],taskOptions:{statusbar:!1,menubar:!1,autoresize_bottom_margin:2,min_height:200,max_height:380,contextmenu:"bold italic underline forecolor backcolor | codesample | uploadImages imagePreview | preview screenload",valid_elements:"a[href|target=_blank],em,strong/b,div[align],span[style],a,br,p,img[src|alt|witdh|height],pre[class],code",toolbar:!1},taskOptionFull:{menubar:"file edit view",valid_elements:"a[href|target=_blank],em,strong/b,div[align],span[style],a,br,p,img[src|alt|witdh|height],pre[class],code",toolbar:"uploadImages | bold italic underline forecolor backcolor | codesample | preview screenload"},dialogDrag:!1,imageAttachment:!0,receiveTaskSubscribe:null,loops:[{key:"never",label:"从不"},{key:"day",label:"每天"},{key:"weekdays",label:"每个工作日"},{key:"week",label:"每周"},{key:"twoweeks",label:"每两周"},{key:"month",label:"每月"},{key:"year",label:"每年"},{key:"custom",label:"自定义"}]}},created:function(){var t=$A.getObject(this.$route.query,"navActive");["dialog","log"].includes(t)&&(this.navActive=t)},mounted:function(){var t=this;this.nowInterval=setInterval((function(){t.nowTime=$A.Time()}),1e3),this.receiveTaskSubscribe=f.Store.subscribe("receiveTask",(function(){t.receiveShow=!0}))},destroyed:function(){clearInterval(this.nowInterval),this.receiveTaskSubscribe&&(this.receiveTaskSubscribe.unsubscribe(),this.receiveTaskSubscribe=null)},computed:m(m({},(0,r.rn)(["cacheProjects","cacheColumns","cacheTasks","taskContents","taskFiles","taskPriority","dialogId"])),{},{projectName:function(){var t=this;if(!this.taskDetail.project_id)return"";if(this.taskDetail.project_name)return this.taskDetail.project_name;var e=this.cacheProjects.find((function(e){return e.id==t.taskDetail.project_id}));return e?e.name:""},columnName:function(){var t=this;if(!this.taskDetail.column_id)return"";if(this.taskDetail.column_name)return this.taskDetail.column_name;var e=this.cacheColumns.find((function(e){return e.id==t.taskDetail.column_id}));return e?e.name:""},taskContent:function(){var t=this;if(!this.taskId)return"";var e=this.taskContents.find((function(e){return e.task_id==t.taskId}));return e?e.content:""},fileList:function(){var t=this;return this.taskId?this.taskFiles.filter((function(e){return e.task_id==t.taskId})).sort((function(t,e){return e.id-t.id})):[]},subList:function(){var t=this;return this.taskId?this.cacheTasks.filter((function(e){return e.parent_id==t.taskId})).sort((function(t,e){return t.id-e.id})):[]},hasOpenDialog:function(){return this.taskDetail.dialog_id>0&&this.windowLarge},dialogStyle:function(){var t=this.windowHeight,e=this.hasOpenDialog,n=Math.min(1100,t);return n&&e?{minHeight:n-(n>900?200:70)-48+"px"}:{}},taskDetailStyle:function(){var t=this.modalMode,e=this.windowHeight,n=this.hasOpenDialog,r=Math.min(1100,e);return t&&n?{maxHeight:r-(r>900?200:70)-30+"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:"截止时间"}),t.loop&&"never"!=t.loop||e.push({command:"loop",icon:"",name:"重复周期"}),0==this.fileList.length&&e.push({command:"file",icon:"",name:"附件"}),0==this.subList.length&&e.push({command:"subtask",icon:"",name:"子任务"}),e},menuText:function(){var t=this,e=this.menuList,n="";return e.length>0&&e.forEach((function(e,r){r>0&&(n+=" / "),n+=t.$L(e.name)})),n}}),watch:{openTask:{handler:function(t){this.taskDetail=$A.cloneJSON(t),this.$refs.name&&(this.__openTask&&clearTimeout(this.__openTask),this.__openTask=setTimeout(this.$refs.name.resizeTextarea,100))},immediate:!0,deep:!0},taskId:{handler:function(t){t>0?this.ready=!0:(this.windowSmall&&$A.onBlur(),this.timeOpen=!1,this.timeForce=!1,this.loopForce=!1,this.assistForce=!1,this.addsubForce=!1,this.receiveShow=!1,this.$refs.owner&&this.$refs.owner.handleClose(),this.$refs.assist&&this.$refs.assist.handleClose(),this.$refs.chatInput&&this.$refs.chatInput.hidePopover())},immediate:!0},receiveShow:function(t){t&&(this.timeValue=this.taskDetail.end_at?[this.taskDetail.start_at,this.taskDetail.end_at]:[])}},methods:{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)<this.nowTime},loopLabel:function(t){var e=this.loops.find((function(e){return e.key===t}));return e?e.label:t?"每".concat(t,"天"):"从不"},onNameKeydown:function(t){13===t.keyCode&&(t.shiftKey||(t.preventDefault(),this.updateData("name")))},checkUpdate:function(t){var e=this,n=!1;if(this.openTask.name!=this.taskDetail.name){if(n=!0,!0!==t)return!1===t&&this.$refs.name.focus(),!0;this.updateData("name")}if(this.$refs.desc&&this.$refs.desc.getContent()!=this.taskContent){if(n=!0,!0!==t)return!1===t&&this.$refs.desc.focus(),!0;this.updateData("content")}if(this.addsubShow&&this.addsubName){if(n=!0,!0!==t)return!1===t&&this.$refs.addsub.focus(),!0;this.onAddsub()}return this.subList.some((function(r){var o=r.id;e.$refs["subTask_".concat(o)][0].checkUpdate(t)&&(n=!0)})),n},updateBlur:function(t,e){this.canUpdateBlur&&this.updateData(t,e)},updateData:function(t,e){var n=this,r=null;switch(t){case"priority":this.$set(this.taskDetail,"p_level",e.priority),this.$set(this.taskDetail,"p_name",e.name),this.$set(this.taskDetail,"p_color",e.color),t=["p_level","p_name","p_color"];break;case"times":if(this.taskDetail.start_at&&(Math.abs($A.Time(this.taskDetail.start_at)-$A.Time(e.start_at))>60||Math.abs($A.Time(this.taskDetail.end_at)-$A.Time(e.end_at))>60)&&void 0===e.desc)return void $A.modalInput({title:"修改任务时间",placeholder:"请输入修改备注",okText:"确定",onOk:function(t){return t?(n.updateData("times",Object.assign(e,{desc:t})),!1):"请输入修改备注"}});this.$set(this.taskDetail,"times",[e.start_at,e.end_at,e.desc]);break;case"loop":if("custom"===e)return void this.customLoop();this.$set(this.taskDetail,"loop",e);break;case"content":var o=this.$refs.desc.getContent();if(o==this.taskContent)return;this.$set(this.taskDetail,"content",o),r=function(){n.$store.dispatch("saveTaskContent",{task_id:n.taskId,content:o})}}var i={task_id:this.taskDetail.id};($A.isArray(t)?t:[t]).forEach((function(t){var e=n.taskDetail[t],r=n.openTask[t];$A.jsonStringify(e)!=$A.jsonStringify(r)&&(i[t]=e)})),Object.keys(i).length<=1||this.$store.dispatch("taskUpdate",i).then((function(t){var e=t.msg;$A.messageSuccess(e),"function"==typeof r&&r()})).catch((function(t){var e=t.msg;$A.modalError(e)}))},customLoop:function(){var t=this,e=this.taskDetail.loop||1;$A.Modal.confirm({render:function(n){return n("div",[n("div",{style:{fontSize:"16px",fontWeight:"500",marginBottom:"20px"}},t.$L("重复周期")),n("Input",{style:{width:"160px",margin:"0 auto"},props:{type:"number",value:e,maxlength:3},on:{input:function(t){e=$.runNum(t)}}},[n("span",{slot:"prepend"},t.$L("每")),n("span",{slot:"append"},t.$L("天"))])])},onOk:function(n){t.$Modal.remove(),e>0&&t.updateData("loop",e)},loading:!0,okText:this.$L("确定"),cancelText:this.$L("取消")})},openOwner:function(){var t=this.getOwner.map((function(t){return t.userid}));this.$set(this.taskDetail,"owner_userid",t),this.$set(this.ownerData,"owner_userid",t)},onOwner:function(t){var e=this,n={task_id:this.taskDetail.id,owner:this.ownerData.owner_userid};if(!0===t){if(this.getOwner.length>0)return this.receiveShow=!1,void $A.messageError("任务已被领取");var r=$A.date2string(this.timeValue,"Y-m-d H:i");if(!r[0]||!r[1])return void $A.messageError("请设置计划时间");$A.rightExists(r[0],"00:00")&&$A.rightExists(r[1],"00:00")&&(r[1]=r[1].replace("00:00","23:59")),n.times=r,n.owner=this.ownerData.owner_userid=[this.userId]}$A.jsonStringify(this.taskDetail.owner_userid)!==$A.jsonStringify(this.ownerData.owner_userid)&&(0==$A.count(n.owner)&&(n.owner=""),this.ownerLoad++,this.$store.dispatch("taskUpdate",n).then((function(t){var n=t.msg;$A.messageSuccess(n),e.ownerLoad--,e.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,e=this.getAssist.map((function(t){return t.userid}));this.$set(this.taskDetail,"assist_userid",e),this.$set(this.assistData,"assist_userid",e),this.$set(this.assistData,"disabled",this.getOwner.map((function(t){return t.userid})).filter((function(e){return e!=t.userId})))},onAssist:function(){var t=this;$A.jsonStringify(this.taskDetail.assist_userid)!==$A.jsonStringify(this.assistData.assist_userid)&&(this.getOwner.find((function(e){return e.userid===t.userId}))&&this.assistData.assist_userid.find((function(e){return e===t.userId}))?$A.modalConfirm({content:"你当前是负责人,确定要转为协助人员吗?",cancelText:"取消",okText:"确定",onOk:function(){t.onAssistConfirm()}}):this.onAssistConfirm())},onAssistConfirm:function(){var t=this,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"loop":this.loopForce=!0,this.$nextTick((function(){e.$refs.loop.show()}));break;case"file":this.onUploadClick(!0);break;case"subtask":this.addsubForce=!0,this.$nextTick((function(){e.addsubOpen()}))}},onEventMore:function(t){["image","file"].includes(t)&&this.onUploadClick(!1)},onUploadClick:function(t){this.imageAttachment=!!t,this.$refs.upload.handleClick()},msgDialog:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.sendLoad>0||this.openLoad>0||(!0===n?this.openLoad++:this.sendLoad++,this.$store.dispatch("call",{url:"project/task/dialog",data:{task_id:this.taskDetail.id}}).then((function(n){var r=n.data;t.$store.dispatch("saveTask",{id:r.id,dialog_id:r.dialog_id}),t.$store.dispatch("saveDialog",r.dialog_data),$A.isSubElectron?t.resizeDialog().then((function(){t.sendDialogMsg(e)})):t.$nextTick((function(){t.windowSmall?($A.onBlur(),t.$store.state.dialogMsgTransfer={time:$A.Time()+10,msgRecord:t.msgRecord,msgFile:t.msgFile,msgText:"string"==typeof e&&e?e:t.msgText},t.msgRecord={},t.msgFile=[],t.msgText="",t.dialogId>0&&t.$store.dispatch("openTask",0),t.$store.dispatch("openDialog",r.dialog_id)):t.sendDialogMsg(e)}))})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(e){!0===n?t.openLoad--:t.sendLoad--})))},sendDialogMsg:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.msgFile.length>0?this.$refs.dialog.sendFileMsg(this.msgFile.map((function(e){return Object.assign(e,{ajaxExtraData:{image_attachment:t.imageAttachment?1:0}})}))):this.msgText?this.$refs.dialog.sendMsg(this.msgText):"string"==typeof e&&e&&this.$refs.dialog.sendMsg(e),this.msgFile=[],this.msgText=""},taskPasteDrag:function(t,e){this.dialogDrag=!1;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())},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=$A.isArray(t)?t:[t],this.msgDialog()},onRecord:function(t){this.msgRecord=t,this.msgDialog()},onSend:function(t){this.$refs.chatInput&&this.$refs.chatInput.hidePopover(),"open"===t?this.msgDialog(null,!0):this.msgDialog(t)},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,e){var n=this.$refs["taskMenu_".concat(e.id)];n&&n.handleClick(t)},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-".concat(this.taskDetail.id),path:"/single/task/".concat(this.taskDetail.id,"?navActive=").concat(this.navActive),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,t.windowWidth),height:Math.max(720,t.windowHeight),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{src:t.path,width:t.width,height:t.height}}))):(this.$store.state.previewImageIndex=0,this.$store.state.previewImageList=[{src:t.path,width:t.width,height:t.height}])}else{var r="/single/file/task/".concat(t.id);this.$Electron?this.$Electron.sendMessage("windowRouter",{name:"file-task-".concat(t.id),path:r,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)},webPreferences:{nodeIntegrationInSubFrames:"drawio"===t.ext}}):this.$isEEUiApp?$A.eeuiAppOpenPage({pageType:"app",pageTitle:"".concat(t.name," (").concat($A.bytesToSize(t.size),")"),url:"web.js",params:{titleFixed:!0,url:$A.rightDelete(window.location.href,window.location.hash)+"#".concat(r)}}):window.open($A.apiUrl("..".concat(r)))}},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 y=(0,l.Z)(v,(function(){var t=this,e=t._self._c;return t.ready&&t.taskDetail.parent_id>0?e("li",[e("div",{staticClass:"subtask-icon"},[e("TaskMenu",{ref:"taskMenu_".concat(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?e("div",{staticClass:"subtask-flow"},[e("span",{class:t.taskDetail.flow_item_status,on:{click:function(e){return e.stopPropagation(),t.openMenu(e,t.taskDetail)}}},[t._v(t._s(t.taskDetail.flow_item_name))])]):t._e(),t._v(" "),e("div",{staticClass:"subtask-name"},[e("Input",{ref:"name",attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:8},maxlength:255,enterkeyhint:"done"},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(" "),e("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?e("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 ")]):e("Icon",{staticClass:"clock",attrs:{type:"ios-clock-outline"},on:{click:t.openTime}})],1),t._v(" "),e("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}},[e("div",{attrs:{slot:"content"},slot:"content"},[e("UserInput",{attrs:{"multiple-max":1,"project-id":t.taskDetail.project_id,placeholder:t.$L("选择任务负责人"),transfer:!1,"max-hidden-select":""},model:{value:t.ownerData.owner_userid,callback:function(e){t.$set(t.ownerData,"owner_userid",e)},expression:"ownerData.owner_userid"}}),t._v(" "),e("div",{staticClass:"task-detail-avatar-buttons"},[e("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 e("UserAvatar",{key:t.userid,attrs:{userid:t.userid,size:20,tooltipDisabled:""}})})):e("div",[t._v("--")])],2)],1):t.ready?e("div",{class:{"task-detail":!0,"open-dialog":t.hasOpenDialog,completed:t.taskDetail.complete_at},style:t.taskDetailStyle},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.taskDetail.id>0,expression:"taskDetail.id > 0"}],staticClass:"task-info"},[e("div",{staticClass:"head"},[e("TaskMenu",{ref:"taskMenu_".concat(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?e("div",{staticClass:"flow"},[e("span",{class:t.taskDetail.flow_item_status,on:{click:function(e){return e.stopPropagation(),t.openMenu(e,t.taskDetail)}}},[t._v(t._s(t.taskDetail.flow_item_name))])]):t._e(),t._v(" "),t.taskDetail.archived_at?e("div",{staticClass:"flow"},[e("span",{staticClass:"archived",on:{click:function(e){return e.stopPropagation(),t.openMenu(e,t.taskDetail)}}},[t._v(t._s(t.$L("已归档")))])]):t._e(),t._v(" "),e("div",{staticClass:"nav"},[t.projectName?e("p",[e("span",[t._v(t._s(t.projectName))])]):t._e(),t._v(" "),t.columnName?e("p",[e("span",[t._v(t._s(t.columnName))])]):t._e(),t._v(" "),t.taskDetail.id?e("p",[e("span",[t._v(t._s(t.taskDetail.id))])]):t._e()]),t._v(" "),e("div",{staticClass:"function"},[0===t.getOwner.length?e("EPopover",{attrs:{placement:"bottom"},model:{value:t.receiveShow,callback:function(e){t.receiveShow=e},expression:"receiveShow"}},[e("div",{staticClass:"task-detail-receive"},[e("div",{staticClass:"receive-title"},[e("Icon",{attrs:{type:"ios-help-circle"}}),t._v("\n "+t._s(t.$L("确认计划时间领取任务"))+"\n ")],1),t._v(" "),e("div",{staticClass:"receive-time"},[e("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(" "),e("div",{staticClass:"receive-bottom"},[e("Button",{attrs:{size:"small",type:"text"},on:{click:function(e){t.receiveShow=!1}}},[t._v("取消")]),t._v(" "),e("Button",{attrs:{loading:t.ownerLoad>0,size:"small",type:"primary"},on:{click:function(e){return t.onOwner(!0)}}},[t._v("确定")])],1)]),t._v(" "),e("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?e("ETooltip",{attrs:{disabled:t.windowSmall||t.$isEEUiApp,content:t.$L("新窗口打开")}},[e("i",{staticClass:"taskfont open",on:{click:t.openNewWin}},[t._v("")])]):t._e(),t._v(" "),e("div",{staticClass:"menu"},[e("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(" "),e("div",{staticClass:"scroller scrollbar-overlay"},[e("div",{staticClass:"title"},[e("Input",{ref:"name",attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:8},maxlength:255,enterkeyhint:"done"},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(" "),e("div",{staticClass:"desc"},[e("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(" "),e("Form",{staticClass:"items",attrs:{"label-position":"left","label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[t.taskDetail.p_name?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.$L("优先级"))+"\n ")]),t._v(" "),e("ul",{staticClass:"item-content"},[e("li",[e("EDropdown",{ref:"priority",attrs:{trigger:"click",placement:"bottom"},on:{command:function(e){return t.updateData("priority",e)}}},[e("TaskPriority",{attrs:{backgroundColor:t.taskDetail.p_color}},[t._v(t._s(t.taskDetail.p_name))]),t._v(" "),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.taskPriority,(function(n,r){return e("EDropdownItem",{key:r,attrs:{command:n}},[e("i",{staticClass:"taskfont",style:{color:n.color},domProps:{innerHTML:t._s(t.taskDetail.p_name==n.name?"":"")}}),t._v("\n "+t._s(n.name)+"\n ")])})),1)],1)],1)])]):t._e(),t._v(" "),t.getOwner.length>0?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.$L("负责人"))+"\n ")]),t._v(" "),e("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}},[e("div",{attrs:{slot:"content"},slot:"content"},[e("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(" "),e("div",{staticClass:"task-detail-avatar-buttons"},[e("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(" "),e("div",{staticClass:"user-list"},t._l(t.getOwner,(function(n){return e("UserAvatar",{key:n.userid,attrs:{userid:n.userid,size:28,showName:1===t.getOwner.length,tooltipDisabled:""}})})),1)])],1):t._e(),t._v(" "),t.getAssist.length>0||t.assistForce?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.$L("协助人员"))+"\n ")]),t._v(" "),e("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}},[e("div",{attrs:{slot:"content"},slot:"content"},[e("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(" "),e("div",{staticClass:"task-detail-avatar-buttons"},[e("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?e("div",{staticClass:"user-list"},t._l(t.getAssist,(function(n){return e("UserAvatar",{key:n.userid,attrs:{userid:n.userid,size:28,showName:1===t.getAssist.length,tooltipDisabled:""}})})),1):e("div",[t._v("--")])])],1):t._e(),t._v(" "),t.taskDetail.end_at||t.timeForce?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.$L("截止时间"))+"\n ")]),t._v(" "),e("ul",{staticClass:"item-content"},[e("li",[e("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"}},[e("div",{staticClass:"picker-time"},[e("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)?e("Tag",{attrs:{color:"blue"}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.expiresFormat(t.taskDetail.end_at)))]):t._e(),t._v(" "),t.isOverdue(t.taskDetail)?e("Tag",{attrs:{color:"red"}},[t._v(t._s(t.$L("超期未完成")))]):t._e()]:t._e()],2)])],1)])]):t._e(),t._v(" "),t.taskDetail.loop&&"never"!=t.taskDetail.loop||t.loopForce?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.$L("重复周期"))+"\n ")]),t._v(" "),e("ul",{staticClass:"item-content"},[e("li",[e("EDropdown",{ref:"loop",attrs:{trigger:"click",placement:"bottom"},on:{command:function(e){return t.updateData("loop",e)}}},[e("ETooltip",{attrs:{disabled:t.windowSmall||t.$isEEUiApp||!t.taskDetail.loop_at,content:"".concat(t.$L("下个周期"),": ").concat(t.taskDetail.loop_at),placement:"right"}},[e("span",[t._v(t._s(t.$L(t.loopLabel(t.taskDetail.loop))))])]),t._v(" "),e("EDropdownMenu",{staticClass:"task-detail-loop",attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.loops,(function(n){return e("EDropdownItem",{key:n.key,attrs:{command:n.key}},[t._v("\n "+t._s(t.$L(n.label))+"\n ")])})),1)],1)],1)])]):t._e(),t._v(" "),t.fileList.length>0?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.$L("附件"))+"\n ")]),t._v(" "),e("ul",{staticClass:"item-content file"},[t.taskDetail.file_num>50?e("li",{staticClass:"tip"},[t._v(t._s(t.$L("共".concat(t.taskDetail.file_num,"个文件,仅显示最新50个"))))]):t._e(),t._v(" "),t._l(t.fileList,(function(n){return e("li",[n.id?e("img",{staticClass:"file-ext",attrs:{src:n.thumb}}):e("Loading",{staticClass:"file-load"}),t._v(" "),e("div",{staticClass:"file-name"},[t._v(t._s(n.name))]),t._v(" "),e("div",{staticClass:"file-size"},[t._v(t._s(t.$A.bytesToSize(n.size)))]),t._v(" "),e("div",{staticClass:"file-menu",class:{show:n._show_menu}},[e("Icon",{attrs:{type:"md-eye"},on:{click:function(e){return t.viewFile(n)}}}),t._v(" "),e("Icon",{attrs:{type:"md-arrow-round-down"},on:{click:function(e){return t.downFile(n)}}}),t._v(" "),e("EPopover",{staticClass:"file-delete",model:{value:n._show_menu,callback:function(e){t.$set(n,"_show_menu",e)},expression:"file._show_menu"}},[e("div",{staticClass:"task-detail-delete-file-popover"},[e("p",[t._v(t._s(t.$L("你确定要删除这个文件吗?")))]),t._v(" "),e("div",{staticClass:"buttons"},[e("Button",{attrs:{size:"small",type:"text"},on:{click:function(t){n._show_menu=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.deleteFile(n)}}},[t._v(t._s(t.$L("确定")))])],1)]),t._v(" "),e("i",{staticClass:"taskfont del",attrs:{slot:"reference"},slot:"reference"},[t._v("")])])],1)],1)}))],2),t._v(" "),e("ul",{staticClass:"item-content"},[e("li",[e("div",{staticClass:"add-button",on:{click:function(e){return t.onUploadClick(!0)}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.$L("添加附件"))+"\n ")])])])]):t._e(),t._v(" "),t.subList.length>0||t.addsubForce?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.$L("子任务"))+"\n ")]),t._v(" "),e("ul",{staticClass:"item-content subtask"},t._l(t.subList,(function(n,r){return e("TaskDetail",{key:r,ref:"subTask_".concat(n.id),refInFor:!0,attrs:{"task-id":n.id,"open-task":n,"main-end-at":t.taskDetail.end_at,"can-update-blur":t.canUpdateBlur}})})),1),t._v(" "),e("ul",{class:["item-content",0===t.subList.length?"nosub":""]},[e("li",[t.addsubShow?e("Input",{ref:"addsub",staticClass:"add-input",class:{loading:t.addsubLoad>0},attrs:{placeholder:t.$L("+ 输入子任务,回车添加子任务"),icon:t.addsubLoad>0?"ios-loading":"",enterkeyhint:"done"},on:{"on-blur":t.addsubChackClose,"on-keydown":t.addsubKeydown},model:{value:t.addsubName,callback:function(e){t.addsubName=e},expression:"addsubName"}}):e("div",{staticClass:"add-button",on:{click:t.addsubOpen}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.$L("添加子任务"))+"\n ")])],1)])]):t._e()],1),t._v(" "),t.menuList.length>0?e("div",{staticClass:"add"},[e("EDropdown",{attrs:{trigger:"click",placement:"bottom"},on:{command:t.dropAdd}},[e("div",{staticClass:"add-button"},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v("\n "+t._s(t.$L("添加"))+"\n "),e("em",[t._v(t._s(t.menuText))])]),t._v(" "),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.menuList,(function(n,r){return e("EDropdownItem",{key:r,attrs:{command:n.command}},[e("div",{staticClass:"item"},[e("i",{staticClass:"taskfont",domProps:{innerHTML:t._s(n.icon)}}),t._v(t._s(t.$L(n.name))+"\n ")])])})),1)],1)],1):t._e()],1),t._v(" "),e("TaskUpload",{ref:"upload",staticClass:"upload",on:{"on-select-file":t.onSelectFile}})],1),t._v(" "),e("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?e("DialogWrapper",{ref:"dialog",attrs:{"dialog-id":t.taskDetail.dialog_id}},[e("div",{staticClass:"head",attrs:{slot:"head"},slot:"head"},[e("Icon",{staticClass:"icon",attrs:{type:"ios-chatbubbles-outline"}}),t._v(" "),e("div",{staticClass:"nav"},[e("p",{class:{active:"dialog"==t.navActive},on:{click:function(e){t.navActive="dialog"}}},[t._v(t._s(t.$L("聊天")))]),t._v(" "),e("p",{class:{active:"log"==t.navActive},on:{click:function(e){t.navActive="log"}}},[t._v(t._s(t.$L("动态")))]),t._v(" "),"log"==t.navActive?e("div",{staticClass:"refresh"},[t.logLoadIng?e("Loading"):e("Icon",{attrs:{type:"ios-refresh"},on:{click:t.getLogLists}})],1):t._e()])],1)]):t._e(),t._v(" "),"log"==t.navActive&&t.taskId>0?e("ProjectLog",{ref:"log",attrs:{"task-id":t.taskDetail.id},on:{"on-load-change":t.logLoadChange}}):t._e()]:e("div",[e("div",{staticClass:"head"},[e("Icon",{staticClass:"icon",attrs:{type:"ios-chatbubbles-outline"}}),t._v(" "),e("div",{staticClass:"nav"},[e("p",{class:{active:"dialog"==t.navActive},on:{click:function(e){t.navActive="dialog"}}},[t._v(t._s(t.$L("聊天")))]),t._v(" "),e("p",{class:{active:"log"==t.navActive},on:{click:function(e){t.navActive="log"}}},[t._v(t._s(t.$L("动态")))]),t._v(" "),"log"==t.navActive?e("div",{staticClass:"refresh"},[t.logLoadIng?e("Loading"):e("Icon",{attrs:{type:"ios-refresh"},on:{click:t.getLogLists}})],1):t._e()]),t._v(" "),e("div",{staticClass:"menu"},["dialog"==t.navActive&&t.taskDetail.msg_num>0?e("div",{staticClass:"menu-item",on:{click:function(e){return e.stopPropagation(),t.onSend("open")}}},[t.openLoad>0?e("div",{staticClass:"menu-load"},[e("Loading")],1):t._e(),t._v("\n "+t._s(t.$L("任务聊天"))+"\n "),e("em",[t._v("("+t._s(t.taskDetail.msg_num>99?"99+":t.taskDetail.msg_num)+")")]),t._v(" "),e("i",{staticClass:"taskfont"},[t._v("")])]):t._e()])],1),t._v(" "),"log"==t.navActive&&t.taskId>0?e("ProjectLog",{ref:"log",attrs:{"task-id":t.taskDetail.id,"show-load":!1},on:{"on-load-change":t.logLoadChange}}):e("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)}}},[e("div",{staticClass:"no-tip"},[t._v(t._s(t.$L("暂无消息")))]),t._v(" "),e("div",{staticClass:"no-input"},[e("ChatInput",{ref:"chatInput",attrs:{"task-id":t.taskId,loading:t.sendLoad>0,maxlength:2e5,placeholder:t.$L("输入消息...")},on:{"on-more":t.onEventMore,"on-file":t.onSelectFile,"on-record":t.onRecord,"on-send":t.onSend},model:{value:t.msgText,callback:function(e){t.msgText=e},expression:"msgText"}})],1),t._v(" "),t.dialogDrag?e("div",{staticClass:"drag-over",on:{click:function(e){t.dialogDrag=!1}}},[e("div",{staticClass:"drag-text"},[t._v(t._s(t.$L("拖动到这里发送")))])]):t._e()])],1)],2),t._v(" "),t.taskDetail.id?t._e():e("div",{staticClass:"task-load"},[e("Loading")],1)]):t._e()}),[],!1,null,null,null).exports},19102:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});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;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}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:"TaskMenu",props:{task:{type:Object,default:function(){return{}}},loadStatus:{type:Boolean,default:!1},colorShow:{type:Boolean,default:!0},updateBefore:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{type:String,default:"small"},icon:{type:String,default:"md-radio-button-off"},completedIcon:{type:String,default:"md-checkmark-circle"}},computed:i(i(i({},(0,r.rn)(["loads","taskFlows"])),(0,r.Se)(["isLoad"])),{},{loadIng:function(){return!!this.loadStatus||this.isLoad("task-".concat(this.task.id))}}),methods:{handleClick:function(t){var e=this;this.$store.state.taskOperation={event:t,task:this.task,loadStatus:this.loadStatus,colorShow:this.colorShow,updateBefore:this.updateBefore,disabled:this.disabled,size:this.size,onUpdate:function(t){e.$emit("on-update",t)}}},updateTask:function(t){var e=this;if(!this.loadIng){Object.keys(t).forEach((function(n){return e.$set(e.task,n,t[n])}));var n=Object.assign(t,{task_id:this.task.id});this.$store.dispatch("taskUpdate",n).then((function(t){var r=t.data,o=t.msg;$A.messageSuccess(o),e.$store.dispatch("saveTaskBrowse",n.task_id),e.$emit("on-update",r)})).catch((function(t){var r=t.msg;$A.modalError(r),e.$store.dispatch("getTaskOne",n.task_id).catch((function(){}))}))}}}};const l=(0,n(51900).Z)(s,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"task-menu-icon",on:{click:t.handleClick}},[t.loadIng?e("div",{staticClass:"loading"},[e("Loading")],1):[t.task.complete_at?e("Icon",{staticClass:"completed",attrs:{type:t.completedIcon}}):e("Icon",{staticClass:"uncomplete",attrs:{type:t.icon}})]],2)}),[],!1,null,null,null).exports},58748:(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<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}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 a={name:"TaskPriority",props:{color:{default:"#ffffff"},background:{default:"#7DBEEA"},backgroundColor:{default:"#7DBEEA"}},data:function(){return{}},computed:o(o({},(0,n(20629).rn)(["themeIsDark"])),{},{myStyle:function(){var t=this.color,e=this.background,n=this.backgroundColor;return this.themeIsDark?{color:n||e,borderColor:n||e,backgroundColor:"transparent"}:{color:t,borderColor:n||e,backgroundColor:n||e}}})};const s=(0,n(51900).Z)(a,(function(){var t=this;return(0,t._self._c)("div",{staticClass:"task-priority",style:t.myStyle},[t._t("default")],2)}),[],!1,null,null,null).exports},97752:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});const r={name:"TeamManagement",components:{UserInput:n(60935).Z},props:{checkinMac:{type:Boolean,default:!1}},data:function(){var t=this;return{loadIng:0,keys:{},keyIs:!1,columns:[{title:"ID",key:"userid",width:80,render:function(t,e){var n=e.row;return t("TableAction",{props:{column:e.column,align:"left"}},[t("div",n.userid)])}},{title:this.$L("邮箱"),key:"email",minWidth:100,render:function(e,n){var r=n.row,o=[e("AutoTip",r.email)],i=r.email_verity,a=r.identity,s=r.disable_at;return i&&o.push(e("Icon",{props:{type:"md-mail"}})),a.includes("ldap")&&o.push(e("Tag",{props:{color:"orange"}},t.$L("LDAP"))),a.includes("admin")&&o.push(e("Tag",{props:{color:"warning"}},t.$L("管理员"))),a.includes("disable")&&o.push(e("Tooltip",{props:{content:t.$L("离职时间")+": "+s}},[e("Tag",{props:{color:"error"}},t.$L("离职"))])),e("div",{class:"team-email"},o)}},{title:this.$L("电话"),key:"tel",minWidth:80,render:function(e,n){var r=n.row;return e("QuickEdit",{props:{value:r.tel},on:{"on-update":function(e,n){t.operationUser({userid:r.userid,tel:e},!0).finally(n)}}},[e("AutoTip",r.tel||"-")])}},{title:this.$L("昵称"),key:"nickname",minWidth:80,render:function(e,n){var r=n.row;return e("QuickEdit",{props:{value:r.nickname_original},on:{"on-update":function(e,n){t.operationUser({userid:r.userid,nickname:e},!0).finally(n)}}},[e("AutoTip",r.nickname_original||"-")])}},{title:this.$L("职位/职称"),key:"profession",minWidth:80,render:function(e,n){var r=n.row;return e("QuickEdit",{props:{value:r.profession},on:{"on-update":function(e,n){t.operationUser({userid:r.userid,profession:e},!0).finally(n)}}},[e("AutoTip",r.profession||"-")])}},{title:this.$L("部门"),key:"department",minWidth:80,render:function(e,n){var r=n.row,o=[];if(r.department.some((function(e){var n=t.departmentList.find((function(t){return t.id==e}));n&&o.push(n.name)})),0===o.length)return e("div",t.$L("默认部门"));var i=[];return i.push(e("span",{domProps:{title:o[0]}},o[0])),o.length>1&&(o=o.splice(1),i.push(e("ETooltip",[e("div",{slot:"content",domProps:{innerHTML:o.join("<br/>")}}),e("div",{class:"department-tag-num"}," +".concat(o.length))]))),e("div",{class:"team-table-department-warp"},i)}},{title:this.$L("最后在线"),key:"line_at",width:168},{title:this.$L("操作"),align:"center",width:100,render:function(e,n){var r=n.row.identity,o=[];r.includes("admin")?o.push(e("EDropdownItem",{props:{command:"clearadmin"}},[e("div",t.$L("取消管理员"))])):o.push(e("EDropdownItem",{props:{command:"setadmin"}},[e("div",t.$L("设为管理员"))])),o.push(e("EDropdownItem",{props:{command:"email"}},[e("div",t.$L("修改邮箱"))])),o.push(e("EDropdownItem",{props:{command:"password"}},[e("div",t.$L("修改密码"))])),t.checkinMac&&o.push(e("EDropdownItem",{props:{command:"checkin_mac"}},[e("div",t.$L("修改MAC"))])),o.push(e("EDropdownItem",{props:{command:"department"}},[e("div",t.$L("修改部门"))])),r.includes("disable")?o.push(e("EDropdownItem",{props:{command:"cleardisable"},style:{color:"#f90"}},[e("div",t.$L("恢复帐号(已离职)"))])):o.push(e("EDropdownItem",{props:{command:"setdisable"},style:{color:"#f90"}},[e("div",t.$L("操作离职"))])),o.push(e("EDropdownItem",{props:{command:"delete"},style:{color:"red"}},[e("div",t.$L("删除"))]));var i=e("EDropdown",{props:{size:"small",trigger:"click"},on:{command:function(e){t.dropUser(e,n.row)}}},[e("Button",{props:{type:"primary",size:"small"},style:{fontSize:"12px"}},t.$L("操作")),e("EDropdownMenu",{slot:"dropdown"},[o])]);return e("TableAction",{props:{column:n.column}},[i])}}],list:[],page:1,pageSize:20,total:0,noText:"",checkinMacEditShow:!1,checkinMacEditLoading:0,checkinMacEditData:{},departmentEditShow:!1,departmentEditLoading:0,departmentEditData:{},disableShow:!1,disableLoading:0,disableData:{},disableOptions:{shortcuts:[{text:this.$L("12:00"),value:function(){return $A.Date($A.formatDate("Y-m-d 12:00:00"))},onClick:function(t){t.handlePickSuccess()}},{text:this.$L("17:00"),value:function(){return $A.Date($A.formatDate("Y-m-d 17:00:00"))},onClick:function(t){t.handlePickSuccess()}},{text:this.$L("18:00"),value:function(){return $A.Date($A.formatDate("Y-m-d 18:00:00"))},onClick:function(t){t.handlePickSuccess()}},{text:this.$L("19:00"),value:function(){return $A.Date($A.formatDate("Y-m-d 19:00:00"))},onClick:function(t){t.handlePickSuccess()}},{text:this.$L("现在"),value:function(){return new Date},onClick:function(t){t.handlePickSuccess()}}]},departmentShow:!1,departmentLoading:0,departmentSelect:-1,departmentData:{id:0,name:"",parent_id:0,owner_userid:[],dialog_group:"new",dialog_useid:0},departmentList:[],dialogLoad:!1,dialogList:[],nullCheckinDatum:{mac:"",remark:""}}},created:function(){this.checkinMac&&this.columns.splice(5,0,{title:this.$L("MAC地址"),key:"checkin_mac",minWidth:80,render:function(t,e){var n=e.row,r=$A.cloneJSON(n.checkin_macs||[]);if(0===r.length)return t("div","-");var o=function(t){return t.remark?"".concat(t.mac," (").concat(t.remark,")"):t.mac},i=[];return i.push(t("AutoTip",o(r[0]))),r.length>1&&(r=r.splice(1),i.push(t("ETooltip",[t("div",{slot:"content",domProps:{innerHTML:r.map((function(t){return o(t)})).join("<br/>")}}),t("div",{class:"department-tag-num"}," +".concat(r.length))]))),t("div",{class:"team-table-department-warp"},i)}})},mounted:function(){this.getLists(),this.getDepartmentLists()},watch:{keyIs:function(t){t||(this.keys={},this.setPage(1))},departmentSelect:function(){this.setPage(1)}},computed:{departmentParentDisabled:function(){var t=this;return!!(this.departmentData.id>0&&this.departmentList.find((function(e){return e.parent_id==t.departmentData.id})))}},methods:{onSearch:function(){this.page=1,this.getLists()},getLists:function(){var t=this;this.loadIng++,this.keyIs=""!=$A.objImplode(this.keys);var e=$A.cloneJSON(this.keys);this.departmentSelect>-1&&(e=Object.assign(e,{department:this.departmentSelect})),this.$store.dispatch("call",{url:"users/lists",data:{keys:e,get_checkin_mac:this.checkinMac?1:0,page:Math.max(this.page,1),pagesize:Math.max($A.runNum(this.pageSize),10)}}).then((function(e){var n=e.data;t.page=n.current_page,t.total=n.total,t.list=n.data,t.noText="没有相关的成员"})).catch((function(){t.noText="数据加载失败"})).finally((function(e){t.loadIng--}))},setPage:function(t){this.page=t,this.getLists()},setPageSize:function(t){this.page=1,this.pageSize=t,this.getLists()},dropUser:function(t,e){var n=this;switch(t){case"email":$A.modalInput({title:"修改邮箱",placeholder:"请输入新的邮箱(".concat(e.email,")"),onOk:function(t){return t?n.operationUser({userid:e.userid,email:t}):"请输入新的邮箱地址"}});break;case"password":$A.modalInput({title:"修改密码",placeholder:"请输入新的密码",onOk:function(t){return t?n.operationUser({userid:e.userid,password:t}):"请输入新的密码"}});break;case"checkin_mac":this.checkinMacEditData={type:"checkin_macs",userid:e.userid,nickname:e.nickname,checkin_macs:e.checkin_macs},0===this.checkinMacEditData.checkin_macs.length&&this.addCheckinDatum(),this.checkinMacEditShow=!0;break;case"department":var r=[];e.department.some((function(t){var o=n.departmentList.find((function(e){return e.id==t}));o&&r.push(o.owner_userid===e.userid?"".concat(o.name," (").concat(n.$L("负责人"),")"):o.name)})),this.departmentEditData={type:"department",userid:e.userid,nickname:e.nickname,department:e.department.map((function(t){return parseInt(t)}))},this.departmentEditShow=!0;break;case"setdisable":this.disableData={type:"setdisable",userid:e.userid,nickname:e.nickname},this.disableShow=!0;break;case"cleardisable":$A.modalConfirm({content:"你确定恢复已离职帐号【ID:".concat(e.userid,",").concat(e.nickname,"】吗?(注:此操作仅恢复帐号状态,无法恢复操作离职时移交的数据)"),loading:!0,onOk:function(){return n.operationUser({userid:e.userid,type:t})}});break;case"delete":$A.modalInput({title:"删除帐号【ID:".concat(e.userid,",").concat(e.nickname,"】"),placeholder:"请输入删除原因",okText:"确定删除",onOk:function(r){return r?n.operationUser({userid:e.userid,type:t,delete_reason:r}):"删除原因不能为空"}});break;default:this.operationUser({userid:e.userid,type:t},!0)}},operationUser:function(t,e){var n=this;return new Promise((function(r,o){"checkin_macs"==t.type?n.checkinMacEditLoading++:"department"==t.type?n.departmentEditLoading++:"setdisable"==t.type?n.disableLoading++:n.loadIng++,n.$store.dispatch("call",{url:"users/operation",data:t}).then((function(e){var o=e.msg;$A.messageSuccess(o),n.getLists(),r(),"checkin_macs"==t.type?n.checkinMacEditShow=!1:"department"==t.type?n.departmentEditShow=!1:"setdisable"==t.type&&(n.disableShow=!1)})).catch((function(t){var r=t.msg;!0===e&&$A.modalError(r),n.getLists(),o(r)})).finally((function(e){"checkin_macs"==t.type?n.checkinMacEditLoading--:"department"==t.type?n.departmentEditLoading--:"setdisable"==t.type?n.disableLoading--:n.loadIng--}))}))},getDepartmentLists:function(){var t=this;this.departmentLoading++,this.$store.dispatch("call",{url:"users/department/list"}).then((function(e){var n=e.data;t.departmentList=[],t.generateDepartmentList(n,0,1)})).finally((function(e){t.departmentLoading--}))},generateDepartmentList:function(t,e,n){var r=this;t.some((function(o){o.parent_id==e&&(r.departmentList.push(Object.assign(o,{level:n+1})),r.generateDepartmentList(t,o.id,n+1))}))},onShowDepartment:function(t){this.departmentData=Object.assign({id:0,name:"",parent_id:0,owner_userid:[],dialog_group:"new"},t||{}),this.departmentShow=!0},onSaveDepartment:function(){var t=this;this.departmentLoading++,this.$store.dispatch("call",{url:"users/department/add",data:Object.assign(this.departmentData,{owner_userid:this.departmentData.owner_userid[0]})}).then((function(e){var n=e.msg;$A.messageSuccess(n),t.getDepartmentLists(),t.getLists(),t.departmentShow=!1})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(e){t.departmentLoading--}))},onSelectDepartment:function(t){this.departmentSelect!==t?this.departmentSelect=t:this.departmentSelect=-1},onOpDepartment:function(t){var e=this;if($A.leftExists(t,"add_"))this.onShowDepartment({parent_id:parseInt(t.substr(4))});else if($A.leftExists(t,"edit_")){var n=this.departmentList.find((function(e){return e.id===parseInt(t.substr(5))}));n&&this.onShowDepartment(n)}else if($A.leftExists(t,"del_")){var r=this.departmentList.find((function(e){return e.id===parseInt(t.substr(4))}));r&&$A.modalConfirm({title:this.$L("删除部门"),content:"<div>".concat(this.$L("你确定要删除【".concat(r.name,"】部门吗?")),'</div><div style="color:#f00;font-weight:600">').concat(this.$L("注意:此操作不可恢复,部门下的成员将移至默认部门。"),"</div>"),language:!1,loading:!0,onOk:function(){return new Promise((function(t,n){e.$store.dispatch("call",{url:"users/department/del",data:{id:r.id}}).then((function(n){var o=n.msg;r.id===e.departmentSelect&&(e.departmentSelect=-1),t(o),e.getDepartmentLists()})).catch((function(t){var e=t.msg;n(e)}))}))}})}},dialogRemote:function(t){var e=this;""!==t?(this.dialogLoad=!0,this.$store.dispatch("call",{url:"dialog/group/searchuser",data:{key:t}}).then((function(t){var n=t.data;e.dialogList=n.list})).finally((function(t){e.dialogLoad=!1}))):this.dialogList=[]},addCheckinDatum:function(){this.checkinMacEditData.checkin_macs.push($A.cloneJSON(this.nullCheckinDatum))},delCheckinDatum:function(t){this.checkinMacEditData.checkin_macs.splice(t,1),0===this.checkinMacEditData.checkin_macs.length&&this.addCheckinDatum()}}};const o=(0,n(51900).Z)(r,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"team-management"},[e("div",{staticClass:"management-title"},[t._v("\n "+t._s(t.$L("团队管理"))+"\n "),e("div",{staticClass:"title-icon"},[t.loadIng>0?e("Loading"):t._e()],1)]),t._v(" "),e("div",{staticClass:"management-box"},[e("div",{staticClass:"management-department"},[e("ul",[e("li",{class:["level-1",0===t.departmentSelect?"active":""],on:{click:function(e){return t.onSelectDepartment(0)}}},[e("i",{staticClass:"taskfont department-icon"},[t._v("")]),t._v(" "),e("div",{staticClass:"department-title"},[t._v(t._s(t.$L("默认部门")))]),t._v(" "),e("EDropdown",{attrs:{size:"medium",trigger:"click"},on:{command:t.onOpDepartment}},[e("i",{staticClass:"taskfont department-menu",on:{click:function(t){t.stopPropagation()}}},[t._v("")]),t._v(" "),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e("EDropdownItem",{attrs:{command:"add_0"}},[e("div",[t._v(t._s(t.$L("添加子部门")))])])],1)],1)],1),t._v(" "),t._l(t.departmentList,(function(n){return e("li",{key:n.id,class:["level-".concat(n.level),t.departmentSelect===n.id?"active":""],on:{click:function(e){return t.onSelectDepartment(n.id)}}},[e("UserAvatar",{staticClass:"department-icon",attrs:{userid:n.owner_userid,size:20}},[e("p",[e("strong",[t._v(t._s(t.$L("部门负责人")))])])]),t._v(" "),e("div",{staticClass:"department-title"},[t._v(t._s(n.name))]),t._v(" "),e("EDropdown",{attrs:{size:"medium",trigger:"click"},on:{command:t.onOpDepartment}},[e("i",{staticClass:"taskfont department-menu",on:{click:function(t){t.stopPropagation()}}},[t._v("")]),t._v(" "),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},[n.level<=2?e("EDropdownItem",{attrs:{command:"add_".concat(n.id)}},[e("div",[t._v(t._s(t.$L("添加子部门")))])]):t._e(),t._v(" "),e("EDropdownItem",{attrs:{command:"edit_".concat(n.id)}},[e("div",[t._v(t._s(t.$L("编辑")))])]),t._v(" "),e("EDropdownItem",{attrs:{command:"del_".concat(n.id)}},[e("div",{staticStyle:{color:"#f00"}},[t._v(t._s(t.$L("删除")))])])],1)],1)],1)}))],2),t._v(" "),e("div",{staticClass:"department-buttons"},[e("Button",{attrs:{type:"primary",icon:"md-add"},on:{click:function(e){return t.onShowDepartment(null)}}},[t._v(t._s(t.$L("新建部门")))])],1)]),t._v(" "),e("div",{staticClass:"management-user"},[e("div",{staticClass:"search-container lr"},[e("ul",[e("li",[e("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("关键词"))+"\n ")]),t._v(" "),e("div",{staticClass:"search-content"},[e("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(" "),e("li",[e("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("身份"))+"\n ")]),t._v(" "),e("div",{staticClass:"search-content"},[e("Select",{attrs:{placeholder:t.$L("全部")},model:{value:t.keys.identity,callback:function(e){t.$set(t.keys,"identity",e)},expression:"keys.identity"}},[e("Option",{attrs:{value:""}},[t._v(t._s(t.$L("全部")))]),t._v(" "),e("Option",{attrs:{value:"admin"}},[t._v(t._s(t.$L("管理员")))]),t._v(" "),e("Option",{attrs:{value:"noadmin"}},[t._v(t._s(t.$L("非管理员")))])],1)],1)]),t._v(" "),e("li",[e("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("在职状态"))+"\n ")]),t._v(" "),e("div",{staticClass:"search-content"},[e("Select",{attrs:{placeholder:t.$L("在职")},model:{value:t.keys.disable,callback:function(e){t.$set(t.keys,"disable",e)},expression:"keys.disable"}},[e("Option",{attrs:{value:""}},[t._v(t._s(t.$L("在职")))]),t._v(" "),e("Option",{attrs:{value:"yes"}},[t._v(t._s(t.$L("离职")))]),t._v(" "),e("Option",{attrs:{value:"all"}},[t._v(t._s(t.$L("全部")))])],1)],1)]),t._v(" "),t.checkinMac?e("li",[e("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("MAC地址"))+"\n ")]),t._v(" "),e("div",{staticClass:"search-content"},[e("Input",{attrs:{placeholder:t.$L("MAC地址"),clearable:""},model:{value:t.keys.checkin_mac,callback:function(e){t.$set(t.keys,"checkin_mac",e)},expression:"keys.checkin_mac"}})],1)]):e("li",[e("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("邮箱认证"))+"\n ")]),t._v(" "),e("div",{staticClass:"search-content"},[e("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"}},[e("Option",{attrs:{value:""}},[t._v(t._s(t.$L("全部")))]),t._v(" "),e("Option",{attrs:{value:"yes"}},[t._v(t._s(t.$L("已邮箱认证")))]),t._v(" "),e("Option",{attrs:{value:"no"}},[t._v(t._s(t.$L("未邮箱认证")))])],1)],1)]),t._v(" "),e("li",{staticClass:"search-button"},[e("Tooltip",{attrs:{theme:"light",placement:"bottom","transfer-class-name":"search-button-clear",transfer:""}},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary",icon:"ios-search"},on:{click:t.onSearch}},[t._v(t._s(t.$L("搜索")))]),t._v(" "),e("div",{attrs:{slot:"content"},slot:"content"},[t.keyIs?e("Button",{attrs:{type:"text"},on:{click:function(e){t.keyIs=!1}}},[t._v(t._s(t.$L("取消筛选")))]):e("Button",{attrs:{loading:t.loadIng>0,type:"text"},on:{click:t.getLists}},[t._v(t._s(t.$L("刷新")))])],1)],1)],1)])]),t._v(" "),e("div",{staticClass:"table-page-box"},[e("Table",{attrs:{columns:t.columns,data:t.list,loading:t.loadIng>0,"no-data-text":t.$L(t.noText),stripe:""}}),t._v(" "),e("Page",{attrs:{total:t.total,current:t.page,"page-size":t.pageSize,disabled:t.loadIng>0,simple:t.windowSmall,"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)])]),t._v(" "),e("Modal",{attrs:{title:t.$L(t.departmentData.id>0?"修改部门":"新建部门"),"mask-closable":!1},model:{value:t.departmentShow,callback:function(e){t.departmentShow=e},expression:"departmentShow"}},[e("Form",{ref:"addProject",attrs:{model:t.departmentData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{prop:"name",label:t.$L("部门名称")}},[e("Input",{attrs:{type:"text",placeholder:t.$L("请输入部门名称")},model:{value:t.departmentData.name,callback:function(e){t.$set(t.departmentData,"name",e)},expression:"departmentData.name"}})],1),t._v(" "),e("FormItem",{attrs:{prop:"parent_id",label:t.$L("上级部门")}},[e("Select",{attrs:{disabled:t.departmentParentDisabled,placeholder:t.$L("请选择上级部门")},model:{value:t.departmentData.parent_id,callback:function(e){t.$set(t.departmentData,"parent_id",e)},expression:"departmentData.parent_id"}},[e("Option",{attrs:{value:0}},[t._v(t._s(t.$L("默认部门")))]),t._v(" "),t._l(t.departmentList,(function(n,r){return 0==n.parent_id&&n.id!=t.departmentData.id?e("Option",{key:r,attrs:{value:n.id,label:n.name}},[t._v(" "+t._s(n.name))]):t._e()}))],2),t._v(" "),t.departmentParentDisabled?e("div",{staticClass:"form-tip",staticStyle:{"margin-bottom":"-16px"}},[t._v(t._s(t.$L("含有子部门无法修改上级部门")))]):t._e()],1),t._v(" "),e("FormItem",{attrs:{prop:"owner_userid",label:t.$L("部门负责人")}},[e("UserInput",{attrs:{"multiple-max":1,"max-hidden-select":"",placeholder:t.$L("请选择部门负责人")},model:{value:t.departmentData.owner_userid,callback:function(e){t.$set(t.departmentData,"owner_userid",e)},expression:"departmentData.owner_userid"}})],1),t._v(" "),0==t.departmentData.id?[e("Divider",{attrs:{orientation:"left"}},[t._v(t._s(t.$L("群组设置")))]),t._v(" "),e("FormItem",{attrs:{prop:"dialog_group",label:t.$L("部门群聊")}},[e("RadioGroup",{model:{value:t.departmentData.dialog_group,callback:function(e){t.$set(t.departmentData,"dialog_group",e)},expression:"departmentData.dialog_group"}},[e("Radio",{attrs:{label:"new"}},[t._v(t._s(t.$L("创建部门群")))]),t._v(" "),e("Radio",{attrs:{label:"use"}},[t._v(t._s(t.$L("使用现有群")))])],1)],1),t._v(" "),"use"===t.departmentData.dialog_group?e("FormItem",{attrs:{prop:"dialog_useid",label:t.$L("选择群组")}},[e("Select",{attrs:{filterable:"","remote-method":t.dialogRemote,placeholder:t.$L("输入关键词搜索群"),loading:t.dialogLoad},model:{value:t.departmentData.dialog_useid,callback:function(e){t.$set(t.departmentData,"dialog_useid",e)},expression:"departmentData.dialog_useid"}},t._l(t.dialogList,(function(n,r){return e("Option",{key:r,attrs:{value:n.id,label:n.name}},[e("div",{staticClass:"team-department-add-dialog-group"},[e("div",{staticClass:"dialog-name"},[t._v(t._s(n.name))]),t._v(" "),e("UserAvatar",{attrs:{userid:n.owner_id,size:20}})],1)])})),1),t._v(" "),e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("仅支持选择个人群转为部门群")))])],1):t._e()]:t._e()],2),t._v(" "),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(e){t.departmentShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Button",{attrs:{type:"primary",loading:t.departmentLoading>0},on:{click:t.onSaveDepartment}},[t._v(t._s(t.$L(t.departmentData.id>0?"保存":"新建")))])],1)],1),t._v(" "),e("Modal",{attrs:{title:t.$L("修改签到MAC地址")},model:{value:t.checkinMacEditShow,callback:function(e){t.checkinMacEditShow=e},expression:"checkinMacEditShow"}},[e("Form",{attrs:{model:t.checkinMacEditData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("Alert",{staticStyle:{"margin-bottom":"18px"},attrs:{type:"error"}},[t._v(t._s(t.$L("正在进行帐号【ID:".concat(t.checkinMacEditData.userid,",").concat(t.checkinMacEditData.nickname,"】MAC地址修改。"))))]),t._v(" "),e("Row",{staticClass:"team-department-checkin-item"},[e("Col",{attrs:{span:"12"}},[t._v(t._s(t.$L("设备MAC地址")))]),t._v(" "),e("Col",{attrs:{span:"12"}},[t._v(t._s(t.$L("备注")))])],1),t._v(" "),t._l(t.checkinMacEditData.checkin_macs,(function(n,r){return e("Row",{key:r,staticClass:"team-department-checkin-item"},[e("Col",{attrs:{span:"12"}},[e("Input",{attrs:{maxlength:20,placeholder:t.$L("请输入设备MAC地址"),clearable:""},on:{"on-clear":function(e){return t.delCheckinDatum(r)}},model:{value:n.mac,callback:function(e){t.$set(n,"mac",e)},expression:"item.mac"}})],1),t._v(" "),e("Col",{attrs:{span:"12"}},[e("Input",{attrs:{maxlength:100,placeholder:t.$L("备注")},model:{value:n.remark,callback:function(e){t.$set(n,"remark",e)},expression:"item.remark"}})],1)],1)})),t._v(" "),e("Button",{attrs:{type:"default",icon:"md-add"},on:{click:t.addCheckinDatum}},[t._v(t._s(t.$L("添加设备")))])],2),t._v(" "),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(e){t.checkinMacEditShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Button",{attrs:{type:"primary",loading:t.checkinMacEditLoading>0},on:{click:function(e){return t.operationUser(t.checkinMacEditData,!0)}}},[t._v(t._s(t.$L("确定修改")))])],1)],1),t._v(" "),e("Modal",{attrs:{title:t.$L("修改部门")},model:{value:t.departmentEditShow,callback:function(e){t.departmentEditShow=e},expression:"departmentEditShow"}},[e("Form",{attrs:{model:t.departmentEditData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("Alert",{staticStyle:{"margin-bottom":"18px"},attrs:{type:"error"}},[t._v(t._s(t.$L("正在进行帐号【ID:".concat(t.departmentEditData.userid,",").concat(t.departmentEditData.nickname,"】部门修改。"))))]),t._v(" "),e("FormItem",{attrs:{label:t.$L("修改部门")}},[e("Select",{attrs:{multiple:"","multiple-max":10,placeholder:t.$L("留空为默认部门")},model:{value:t.departmentEditData.department,callback:function(e){t.$set(t.departmentEditData,"department",e)},expression:"departmentEditData.department"}},t._l(t.departmentList,(function(n,r){return e("Option",{key:r,attrs:{value:n.id}},[t._v(t._s(n.name))])})),1)],1)],1),t._v(" "),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(e){t.departmentEditShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Button",{attrs:{type:"primary",loading:t.departmentEditLoading>0},on:{click:function(e){return t.operationUser(t.departmentEditData,!0)}}},[t._v(t._s(t.$L("确定修改")))])],1)],1),t._v(" "),e("Modal",{attrs:{title:t.$L("操作离职")},model:{value:t.disableShow,callback:function(e){t.disableShow=e},expression:"disableShow"}},[e("Form",{attrs:{model:t.disableData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("Alert",{staticStyle:{"margin-bottom":"18px"},attrs:{type:"error"}},[t._v(t._s(t.$L("正在进行帐号【ID:".concat(t.disableData.userid,",").concat(t.disableData.nickname,"】离职操作。"))))]),t._v(" "),e("FormItem",{attrs:{label:t.$L("离职时间")}},[e("DatePicker",{ref:"disableTime",staticStyle:{width:"100%"},attrs:{editable:!1,placeholder:t.$L("选择离职时间"),options:t.disableOptions,format:"yyyy/MM/dd HH:mm",type:"datetime"},model:{value:t.disableData.disable_time,callback:function(e){t.$set(t.disableData,"disable_time",e)},expression:"disableData.disable_time"}})],1),t._v(" "),e("FormItem",{attrs:{label:t.$L("交接人")}},[e("UserInput",{attrs:{"disabled-choice":[t.disableData.userid],"multiple-max":1,"max-hidden-select":"",placeholder:t.$L("选择交接人")},model:{value:t.disableData.transfer_userid,callback:function(e){t.$set(t.disableData,"transfer_userid",e)},expression:"disableData.transfer_userid"}}),t._v(" "),e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("".concat(t.disableData.nickname," 负责的部门、项目、任务和文件将移交给交接人;同时退出所有群(如果是群主则转让给交接人)"))))])],1)],1),t._v(" "),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(e){t.disableShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Poptip",{staticStyle:{"margin-left":"8px"},attrs:{confirm:"",placement:"bottom",transfer:""},on:{"on-ok":function(e){return t.operationUser(t.disableData,!0)}}},[e("div",{attrs:{slot:"title"},slot:"title"},[e("p",[t._v(t._s(t.$L("注意:离职操作不可逆!")))])]),t._v(" "),e("Button",{attrs:{type:"primary",loading:t.disableLoading>0}},[t._v(t._s(t.$L("确定离职")))])],1)],1)],1)],1)}),[],!1,null,null,null).exports},85662:function(t,e,n){t.exports=function(t){"use strict";function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function r(t,e,r){return e&&n(t.prototype,e),r&&n(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(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;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){o(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function s(t){return l(t)||u(t)||c(t)||f()}function l(t){if(Array.isArray(t))return d(t)}function u(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function c(t,e){if(t){if("string"==typeof t)return d(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(t,e):void 0}}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function f(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;var h={FRONT:"FRONT",BEHIND:"BEHIND"},p={INIT:"INIT",FIXED:"FIXED",DYNAMIC:"DYNAMIC"},m=0,g=function(){function t(n,r){e(this,t),this.init(n,r)}return r(t,[{key:"init",value:function(t,e){this.param=t,this.callUpdate=e,this.sizes=new Map,this.firstRangeTotalSize=0,this.firstRangeAverageSize=0,this.lastCalcIndex=0,this.fixedSizeValue=0,this.calcType=p.INIT,this.offset=0,this.direction="",this.range=Object.create(null),t&&this.checkRange(0,t.keeps-1)}},{key:"destroy",value:function(){this.init(null,null)}},{key:"getRange",value:function(){var t=Object.create(null);return t.start=this.range.start,t.end=this.range.end,t.padFront=this.range.padFront,t.padBehind=this.range.padBehind,t}},{key:"isBehind",value:function(){return this.direction===h.BEHIND}},{key:"isFront",value:function(){return this.direction===h.FRONT}},{key:"getOffset",value:function(t){return(t<1?0:this.getIndexOffset(t))+this.param.slotHeaderSize}},{key:"updateParam",value:function(t,e){var n=this;this.param&&t in this.param&&("uniqueIds"===t&&this.sizes.forEach((function(t,r){e.includes(r)||n.sizes.delete(r)})),this.param[t]=e)}},{key:"saveSize",value:function(t,e){this.sizes.set(t,e),this.calcType===p.INIT?(this.fixedSizeValue=e,this.calcType=p.FIXED):this.calcType===p.FIXED&&this.fixedSizeValue!==e&&(this.calcType=p.DYNAMIC,delete this.fixedSizeValue),this.calcType!==p.FIXED&&void 0!==this.firstRangeTotalSize&&(this.sizes.size<Math.min(this.param.keeps,this.param.uniqueIds.length)?(this.firstRangeTotalSize=s(this.sizes.values()).reduce((function(t,e){return t+e}),0),this.firstRangeAverageSize=Math.round(this.firstRangeTotalSize/this.sizes.size)):delete this.firstRangeTotalSize)}},{key:"handleDataSourcesChange",value:function(){var t=this.range.start;this.isFront()?t-=m:this.isBehind()&&(t+=m),t=Math.max(t,0),this.updateRange(this.range.start,this.getEndByStart(t))}},{key:"handleSlotSizeChange",value:function(){this.handleDataSourcesChange()}},{key:"handleScroll",value:function(t){this.direction=t<this.offset?h.FRONT:h.BEHIND,this.offset=t,this.param&&(this.direction===h.FRONT?this.handleFront():this.direction===h.BEHIND&&this.handleBehind())}},{key:"handleFront",value:function(){var t=this.getScrollOvers();if(!(t>this.range.start)){var e=Math.max(t-this.param.buffer,0);this.checkRange(e,this.getEndByStart(e))}}},{key:"handleBehind",value:function(){var t=this.getScrollOvers();t<this.range.start+this.param.buffer||this.checkRange(t,this.getEndByStart(t))}},{key:"getScrollOvers",value:function(){var t=this.offset-this.param.slotHeaderSize;if(t<=0)return 0;if(this.isFixedType())return Math.floor(t/this.fixedSizeValue);for(var e=0,n=0,r=0,o=this.param.uniqueIds.length;e<=o;){if(n=e+Math.floor((o-e)/2),(r=this.getIndexOffset(n))===t)return n;r<t?e=n+1:r>t&&(o=n-1)}return e>0?--e:0}},{key:"getIndexOffset",value:function(t){if(!t)return 0;for(var e=0,n=0,r=0;r<t;r++)e+="number"==typeof(n=this.sizes.get(this.param.uniqueIds[r]))?n:this.getEstimateSize();return this.lastCalcIndex=Math.max(this.lastCalcIndex,t-1),this.lastCalcIndex=Math.min(this.lastCalcIndex,this.getLastIndex()),e}},{key:"isFixedType",value:function(){return this.calcType===p.FIXED}},{key:"getLastIndex",value:function(){return this.param.uniqueIds.length-1}},{key:"checkRange",value:function(t,e){var n=this.param.keeps;this.param.uniqueIds.length<=n?(t=0,e=this.getLastIndex()):e-t<n-1&&(t=e-n+1),this.range.start!==t&&this.updateRange(t,e)}},{key:"updateRange",value:function(t,e){this.range.start=t,this.range.end=e,this.range.padFront=this.getPadFront(),this.range.padBehind=this.getPadBehind(),this.callUpdate(this.getRange())}},{key:"getEndByStart",value:function(t){var e=t+this.param.keeps-1;return Math.min(e,this.getLastIndex())}},{key:"getPadFront",value:function(){return this.isFixedType()?this.fixedSizeValue*this.range.start:this.getIndexOffset(this.range.start)}},{key:"getPadBehind",value:function(){var t=this.range.end,e=this.getLastIndex();return this.isFixedType()?(e-t)*this.fixedSizeValue:this.lastCalcIndex===e?this.getIndexOffset(e)-this.getIndexOffset(t):(e-t)*this.getEstimateSize()}},{key:"getEstimateSize",value:function(){return this.isFixedType()?this.fixedSizeValue:this.param.estimateSize||this.param.estimateSize}}]),t}(),v={dataKey:{type:[String,Function],required:!0},dataSources:{type:Array,required:!0},dataComponent:{type:[Object,Function],required:!0},keeps:{type:Number,default:30},extraProps:{type:Object},estimateSize:{type:Number,default:50},direction:{type:String,default:"vertical"},start:{type:Number,default:0},offset:{type:Number,default:0},topThreshold:{type:Number,default:0},bottomThreshold:{type:Number,default:0},pageMode:{type:Boolean,default:!1},rootTag:{type:String,default:"div"},wrapTag:{type:String,default:"div"},wrapClass:{type:String,default:""},wrapStyle:{type:Object},itemTag:{type:String,default:"div"},itemClass:{type:String,default:""},itemClassAdd:{type:Function},itemStyle:{type:Object},headerTag:{type:String,default:"div"},headerClass:{type:String,default:""},headerStyle:{type:Object},footerTag:{type:String,default:"div"},footerClass:{type:String,default:""},footerStyle:{type:Object},itemScopedSlots:{type:Object},disabled:{type:Boolean,default:!1}},y={index:{type:Number},event:{type:String},tag:{type:String},horizontal:{type:Boolean},source:{type:Object},component:{type:[Object,Function]},slotComponent:{type:Function},uniqueKey:{type:[String,Number]},extraProps:{type:Object},scopedSlots:{type:Object}},b={event:{type:String},uniqueKey:{type:String},tag:{type:String},horizontal:{type:Boolean}},_={created:function(){this.shapeKey=this.horizontal?"offsetWidth":"offsetHeight"},mounted:function(){var t=this;"undefined"!=typeof ResizeObserver&&(this.resizeObserver=new ResizeObserver((function(){t.dispatchSizeChange()})),this.resizeObserver.observe(this.$el))},updated:function(){this.dispatchSizeChange()},beforeDestroy:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)},methods:{getCurrentSize:function(){return this.$el?this.$el[this.shapeKey]:0},dispatchSizeChange:function(){this.$parent.$emit(this.event,this.uniqueKey,this.getCurrentSize(),this.hasInitial)}}},w=t.component("virtual-list-item",{mixins:[_],props:y,render:function(t){var e=this.tag,n=this.component,r=this.extraProps,o=void 0===r?{}:r,i=this.index,s=this.source,l=this.scopedSlots,u=void 0===l?{}:l,c=this.uniqueKey,d=this.slotComponent,f=a({},o,{source:s,index:i});return t(e,{key:c,attrs:{role:"listitem"}},[d?t("div",d({item:s,index:i,scope:f})):t(n,{props:f,scopedSlots:u})])}}),k=t.component("virtual-list-slot",{mixins:[_],props:b,render:function(t){var e=this.tag,n=this.uniqueKey;return t(e,{key:n,attrs:{role:n}},this.$slots.default)}}),C={ITEM:"item_resize",SLOT:"slot_resize"},x={HEADER:"thead",FOOTER:"tfoot"},S=t.component("virtual-list",{props:v,data:function(){return{range:null,toBottomTime:null}},watch:{"dataSources.length":function(){this.virtual.updateParam("uniqueIds",this.getUniqueIdFromDataSources()),this.virtual.handleDataSourcesChange()},keeps:function(t){this.virtual.updateParam("keeps",t),this.virtual.handleSlotSizeChange()},start:function(t){this.scrollToIndex(t)},offset:function(t){this.scrollToOffset(t)}},created:function(){this.isHorizontal="horizontal"===this.direction,this.directionKey=this.isHorizontal?"scrollLeft":"scrollTop",this.installVirtual(),this.$on(C.ITEM,this.onItemResized),(this.$slots.header||this.$slots.footer)&&this.$on(C.SLOT,this.onSlotResized)},activated:function(){this.scrollToOffset(this.virtual.offset),this.pageMode&&document.addEventListener("scroll",this.onScroll,{passive:!1})},deactivated:function(){this.pageMode&&document.removeEventListener("scroll",this.onScroll)},mounted:function(){this.start?this.scrollToIndex(this.start):this.offset&&this.scrollToOffset(this.offset),this.pageMode&&(this.updatePageModeFront(),document.addEventListener("scroll",this.onScroll,{passive:!1}))},beforeDestroy:function(){this.virtual.destroy(),this.pageMode&&document.removeEventListener("scroll",this.onScroll)},methods:{getSize:function(t){return this.virtual.sizes.get(t)},getSizes:function(){return this.virtual.sizes.size},getOffset:function(){if(this.pageMode)return document.documentElement[this.directionKey]||document.body[this.directionKey];var t=this.$refs.root;return t?Math.ceil(t[this.directionKey]):0},getClientSize:function(){var t=this.isHorizontal?"clientWidth":"clientHeight";if(this.pageMode)return document.documentElement[t]||document.body[t];var e=this.$refs.root;return e?Math.ceil(e[t]):0},getScrollSize:function(){var t=this.isHorizontal?"scrollWidth":"scrollHeight";if(this.pageMode)return document.documentElement[t]||document.body[t];var e=this.$refs.root;return e?Math.ceil(e[t]):0},scrollToOffset:function(t){if(this.pageMode)document.body[this.directionKey]=t,document.documentElement[this.directionKey]=t;else{var e=this.$refs.root;e&&(e[this.directionKey]=t)}},scrollToIndex:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(t>=this.dataSources.length-1)this.scrollToBottom();else{var n=this.virtual.getOffset(t);0!==e&&(n=Math.max(0,n+e)),this.scrollToOffset(n)}},scrollToBottom:function(){var t=this,e=this.$refs.shepherd;if(e){var n=e[this.isHorizontal?"offsetLeft":"offsetTop"];this.scrollToOffset(n),this.toBottomTime&&(clearTimeout(this.toBottomTime),this.toBottomTime=null),this.toBottomTime=setTimeout((function(){t.getOffset()+t.getClientSize()+1<t.getScrollSize()&&t.scrollToBottom()}),3)}},stopToBottom:function(){this.toBottomTime&&(clearTimeout(this.toBottomTime),this.toBottomTime=null)},scrollStop:function(){this.stopToBottom(),this.scrollToOffset(this.getOffset())},scrollInfo:function(){var t=this.getClientSize(),e=this.getOffset(),n=this.getScrollSize();return{offset:e,scale:e/(n-t),tail:n-t-e}},updatePageModeFront:function(){var t=this.$refs.root;if(t){var e=t.getBoundingClientRect(),n=t.ownerDocument.defaultView,r=this.isHorizontal?e.left+n.pageXOffset:e.top+n.pageYOffset;this.virtual.updateParam("slotHeaderSize",r)}},reset:function(){this.virtual.destroy(),this.scrollToOffset(0),this.installVirtual()},installVirtual:function(){this.virtual=new g({slotHeaderSize:0,slotFooterSize:0,keeps:this.keeps,estimateSize:this.estimateSize,buffer:Math.round(this.keeps/3),uniqueIds:this.getUniqueIdFromDataSources()},this.onRangeChanged),this.range=this.virtual.getRange(),this.$emit("range",this.range)},getUniqueIdFromDataSources:function(){var t=this.dataKey;return this.dataSources.map((function(e){return"function"==typeof t?t(e):e[t]}))},onItemResized:function(t,e){this.virtual.saveSize(t,e),this.$emit("resized",t,e)},onSlotResized:function(t,e,n){t===x.HEADER?this.virtual.updateParam("slotHeaderSize",e):t===x.FOOTER&&this.virtual.updateParam("slotFooterSize",e),n&&this.virtual.handleSlotSizeChange()},onRangeChanged:function(t){this.range=t,this.$emit("range",this.range)},onScroll:function(t){if(!this.disabled){var e=this.getOffset(),n=this.getClientSize(),r=this.getScrollSize();e<0||e+n>r+1||!r||(this.virtual.handleScroll(e),this.emitEvent(e,n,r,t))}},emitEvent:function(t,e,n,r){this.$emit("scroll",r,this.virtual.getRange()),this.virtual.isFront()&&this.dataSources.length&&t-this.topThreshold<=0?this.$emit("totop"):this.virtual.isBehind()&&t+e+this.bottomThreshold>=n&&this.$emit("tobottom")},getRenderSlots:function(t){for(var e=[],n=this.range,r=n.start,o=n.end,i=this.dataSources,a=this.dataKey,s=this.itemClass,l=this.itemTag,u=this.itemStyle,c=this.isHorizontal,d=this.extraProps,f=this.dataComponent,h=this.itemScopedSlots,p=this.$scopedSlots&&this.$scopedSlots.item,m=r;m<=o;m++){var g=i[m];if(g){var v="function"==typeof a?a(g):g[a];"string"==typeof v||"number"==typeof v?e.push(t(w,{props:{index:m,tag:l,event:C.ITEM,horizontal:c,uniqueKey:v,source:g,extraProps:d,component:f,slotComponent:p,scopedSlots:h},style:u,class:"".concat(s).concat(this.itemClassAdd?" "+this.itemClassAdd(m):"")})):console.warn("Cannot get the data-key '".concat(a,"' from data-sources."))}else console.warn("Cannot get the index '".concat(m,"' from data-sources."))}return e}},render:function(t){var e=this.$slots,n=e.header,r=e.footer,o=this.range,i=o.padFront,a=o.padBehind,s=this.isHorizontal,l=this.pageMode,u=this.rootTag,c=this.wrapTag,d=this.wrapClass,f=this.wrapStyle,h=this.headerTag,p=this.headerClass,m=this.headerStyle,g=this.footerTag,v=this.footerClass,y=this.footerStyle,b=this.disabled,_={padding:s?"0px ".concat(a,"px 0px ").concat(i,"px"):"".concat(i,"px 0px ").concat(a,"px")},w=f?Object.assign({},f,_):_;return t(u,{ref:"root",style:b?{overflow:"hidden"}:null,on:{"&scroll":!l&&this.onScroll}},[n?t(k,{class:p,style:m,props:{tag:h,event:C.SLOT,uniqueKey:x.HEADER}},n):null,t(c,{class:d,attrs:{role:"group"},style:w},this.getRenderSlots(t)),r?t(k,{class:v,style:y,props:{tag:g,event:C.SLOT,uniqueKey:x.FOOTER}},r):null,t("div",{ref:"shepherd",style:{width:s?"0px":"100%",height:s?"100%":"0px"}})])}});return S}(n(70538))}}]); |