iss-library-form-designer 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,7 +15,7 @@ e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.
15
15
  */
16
16
  var o=n(16),r=n(17),i=n(18);function a(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=l.prototype:(null===e&&(e=new l(t)),e.length=t),e}function l(e,t,n){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return d(this,e)}return c(this,e,t,n)}function c(e,t,n,o){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,o){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(o||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===o?new Uint8Array(t):void 0===o?new Uint8Array(t,n):new Uint8Array(t,n,o),l.TYPED_ARRAY_SUPPORT?(e=t).__proto__=l.prototype:e=f(e,t),e}(e,t,n,o):"string"==typeof t?function(e,t,n){if("string"==typeof n&&""!==n||(n="utf8"),!l.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var o=0|p(t,n),r=(e=s(e,o)).write(t,n);return r!==o&&(e=e.slice(0,r)),e}(e,t,n):function(e,t){if(l.isBuffer(t)){var n=0|m(t.length);return 0===(e=s(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(o=t.length)!=o?s(e,0):f(e,t);if("Buffer"===t.type&&i(t.data))return f(e,t.data)}var o;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function d(e,t){if(u(t),e=s(e,t<0?0:0|m(t)),!l.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function f(e,t){var n=t.length<0?0:0|m(t.length);e=s(e,n);for(var o=0;o<n;o+=1)e[o]=255&t[o];return e}function m(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function p(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return N(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return V(e).length;default:if(o)return N(e).length;t=(""+t).toLowerCase(),o=!0}}function h(e,t,n){var o=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return D(this,t,n);case"utf8":case"utf-8":return k(this,t,n);case"ascii":return E(this,t,n);case"latin1":case"binary":return T(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,n);default:if(o)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),o=!0}}function g(e,t,n){var o=e[t];e[t]=e[n],e[n]=o}function v(e,t,n,o,r){if(0===e.length)return-1;if("string"==typeof n?(o=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=r?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(r)return-1;n=e.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof t&&(t=l.from(t,o)),l.isBuffer(t))return 0===t.length?-1:b(e,t,n,o,r);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,o,r);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,o,r){var i,a=1,s=e.length,l=t.length;if(void 0!==o&&("ucs2"===(o=String(o).toLowerCase())||"ucs-2"===o||"utf16le"===o||"utf-16le"===o)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(r){var u=-1;for(i=n;i<s;i++)if(c(e,i)===c(t,-1===u?0:i-u)){if(-1===u&&(u=i),i-u+1===l)return u*a}else-1!==u&&(i-=i-u),u=-1}else for(n+l>s&&(n=s-l),i=n;i>=0;i--){for(var d=!0,f=0;f<l;f++)if(c(e,i+f)!==c(t,f)){d=!1;break}if(d)return i}return-1}function y(e,t,n,o){n=Number(n)||0;var r=e.length-n;o?(o=Number(o))>r&&(o=r):o=r;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");o>i/2&&(o=i/2);for(var a=0;a<o;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function _(e,t,n,o){return H(N(t,e.length-n),e,n,o)}function w(e,t,n,o){return H(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,o)}function x(e,t,n,o){return w(e,t,n,o)}function C(e,t,n,o){return H(V(t),e,n,o)}function O(e,t,n,o){return H(function(e,t){for(var n,o,r,i=[],a=0;a<e.length&&!((t-=2)<0);++a)o=(n=e.charCodeAt(a))>>8,r=n%256,i.push(r),i.push(o);return i}(t,e.length-n),e,n,o)}function S(e,t,n){return 0===t&&n===e.length?o.fromByteArray(e):o.fromByteArray(e.slice(t,n))}function k(e,t,n){n=Math.min(e.length,n);for(var o=[],r=t;r<n;){var i,a,s,l,c=e[r],u=null,d=c>239?4:c>223?3:c>191?2:1;if(r+d<=n)switch(d){case 1:c<128&&(u=c);break;case 2:128==(192&(i=e[r+1]))&&(l=(31&c)<<6|63&i)>127&&(u=l);break;case 3:i=e[r+1],a=e[r+2],128==(192&i)&&128==(192&a)&&(l=(15&c)<<12|(63&i)<<6|63&a)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:i=e[r+1],a=e[r+2],s=e[r+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(l=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,d=1):u>65535&&(u-=65536,o.push(u>>>10&1023|55296),u=56320|1023&u),o.push(u),r+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var n="",o=0;o<t;)n+=String.fromCharCode.apply(String,e.slice(o,o+=4096));return n}(o)}function E(e,t,n){var o="";n=Math.min(e.length,n);for(var r=t;r<n;++r)o+=String.fromCharCode(127&e[r]);return o}function T(e,t,n){var o="";n=Math.min(e.length,n);for(var r=t;r<n;++r)o+=String.fromCharCode(e[r]);return o}function D(e,t,n){var o=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>o)&&(n=o);for(var r="",i=t;i<n;++i)r+=B(e[i]);return r}function A(e,t,n){for(var o=e.slice(t,n),r="",i=0;i<o.length;i+=2)r+=String.fromCharCode(o[i]+256*o[i+1]);return r}function M(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,n,o,r,i){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||t<i)throw new RangeError('"value" argument is out of bounds');if(n+o>e.length)throw new RangeError("Index out of range")}function P(e,t,n,o){t<0&&(t=65535+t+1);for(var r=0,i=Math.min(e.length-n,2);r<i;++r)e[n+r]=(t&255<<8*(o?r:1-r))>>>8*(o?r:1-r)}function I(e,t,n,o){t<0&&(t=4294967295+t+1);for(var r=0,i=Math.min(e.length-n,4);r<i;++r)e[n+r]=t>>>8*(o?r:3-r)&255}function L(e,t,n,o,r,i){if(n+o>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function j(e,t,n,o,i){return i||L(e,0,n,4),r.write(e,t,n,o,23,4),n+4}function z(e,t,n,o,i){return i||L(e,0,n,8),r.write(e,t,n,o,52,8),n+8}t.Buffer=l,t.SlowBuffer=function(e){return+e!=e&&(e=0),l.alloc(+e)},t.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=a(),l.poolSize=8192,l._augment=function(e){return e.__proto__=l.prototype,e},l.from=function(e,t,n){return c(null,e,t,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(e,t,n){return function(e,t,n,o){return u(t),t<=0?s(e,t):void 0!==n?"string"==typeof o?s(e,t).fill(n,o):s(e,t).fill(n):s(e,t)}(null,e,t,n)},l.allocUnsafe=function(e){return d(null,e)},l.allocUnsafeSlow=function(e){return d(null,e)},l.isBuffer=function(e){return!(null==e||!e._isBuffer)},l.compare=function(e,t){if(!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,o=t.length,r=0,i=Math.min(n,o);r<i;++r)if(e[r]!==t[r]){n=e[r],o=t[r];break}return n<o?-1:o<n?1:0},l.isEncoding=function(e){switch(String(e).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(e,t){if(!i(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var o=l.allocUnsafe(t),r=0;for(n=0;n<e.length;++n){var a=e[n];if(!l.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(o,r),r+=a.length}return o},l.byteLength=p,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},l.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},l.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},l.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?k(this,0,e):h.apply(this,arguments)},l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},l.prototype.compare=function(e,t,n,o,r){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===o&&(o=0),void 0===r&&(r=this.length),t<0||n>e.length||o<0||r>this.length)throw new RangeError("out of range index");if(o>=r&&t>=n)return 0;if(o>=r)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(r>>>=0)-(o>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(i,a),c=this.slice(o,r),u=e.slice(t,n),d=0;d<s;++d)if(c[d]!==u[d]){i=c[d],a=u[d];break}return i<a?-1:a<i?1:0},l.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},l.prototype.indexOf=function(e,t,n){return v(this,e,t,n,!0)},l.prototype.lastIndexOf=function(e,t,n){return v(this,e,t,n,!1)},l.prototype.write=function(e,t,n,o){if(void 0===t)o="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)o=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===o&&(o="utf8")):(o=n,n=void 0)}var r=this.length-t;if((void 0===n||n>r)&&(n=r),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");for(var i=!1;;)switch(o){case"hex":return y(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return x(this,e,t,n);case"base64":return C(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),i=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},l.prototype.slice=function(e,t){var n,o=this.length;if((e=~~e)<0?(e+=o)<0&&(e=0):e>o&&(e=o),(t=void 0===t?o:~~t)<0?(t+=o)<0&&(t=0):t>o&&(t=o),t<e&&(t=e),l.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=l.prototype;else{var r=t-e;n=new l(r,void 0);for(var i=0;i<r;++i)n[i]=this[i+e]}return n},l.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var o=this[e],r=1,i=0;++i<t&&(r*=256);)o+=this[e+i]*r;return o},l.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var o=this[e+--t],r=1;t>0&&(r*=256);)o+=this[e+--t]*r;return o},l.prototype.readUInt8=function(e,t){return t||M(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||M(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||M(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var o=this[e],r=1,i=0;++i<t&&(r*=256);)o+=this[e+i]*r;return o>=(r*=128)&&(o-=Math.pow(2,8*t)),o},l.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var o=t,r=1,i=this[e+--o];o>0&&(r*=256);)i+=this[e+--o]*r;return i>=(r*=128)&&(i-=Math.pow(2,8*t)),i},l.prototype.readInt8=function(e,t){return t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||M(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){t||M(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||M(e,4,this.length),r.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||M(e,4,this.length),r.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||M(e,8,this.length),r.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||M(e,8,this.length),r.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,n,o){e=+e,t|=0,n|=0,o||R(this,e,t,n,Math.pow(2,8*n)-1,0);var r=1,i=0;for(this[t]=255&e;++i<n&&(r*=256);)this[t+i]=e/r&255;return t+n},l.prototype.writeUIntBE=function(e,t,n,o){e=+e,t|=0,n|=0,o||R(this,e,t,n,Math.pow(2,8*n)-1,0);var r=n-1,i=1;for(this[t+r]=255&e;--r>=0&&(i*=256);)this[t+r]=e/i&255;return t+n},l.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):I(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):I(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,n,o){if(e=+e,t|=0,!o){var r=Math.pow(2,8*n-1);R(this,e,t,n,r-1,-r)}var i=0,a=1,s=0;for(this[t]=255&e;++i<n&&(a*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},l.prototype.writeIntBE=function(e,t,n,o){if(e=+e,t|=0,!o){var r=Math.pow(2,8*n-1);R(this,e,t,n,r-1,-r)}var i=n-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):I(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):I(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,n){return j(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return j(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return z(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return z(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,o){if(n||(n=0),o||0===o||(o=this.length),t>=e.length&&(t=e.length),t||(t=0),o>0&&o<n&&(o=n),o===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),e.length-t<o-n&&(o=e.length-t+n);var r,i=o-n;if(this===e&&n<t&&t<o)for(r=i-1;r>=0;--r)e[r+t]=this[r+n];else if(i<1e3||!l.TYPED_ARRAY_SUPPORT)for(r=0;r<i;++r)e[r+t]=this[r+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+i),t);return i},l.prototype.fill=function(e,t,n,o){if("string"==typeof e){if("string"==typeof t?(o=t,t=0,n=this.length):"string"==typeof n&&(o=n,n=this.length),1===e.length){var r=e.charCodeAt(0);r<256&&(e=r)}if(void 0!==o&&"string"!=typeof o)throw new TypeError("encoding must be a string");if("string"==typeof o&&!l.isEncoding(o))throw new TypeError("Unknown encoding: "+o)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{var a=l.isBuffer(e)?e:N(new l(e,o).toString()),s=a.length;for(i=0;i<n-t;++i)this[i+t]=a[i%s]}return this};var F=/[^+\/0-9A-Za-z-_]/g;function B(e){return e<16?"0"+e.toString(16):e.toString(16)}function N(e,t){var n;t=t||1/0;for(var o=e.length,r=null,i=[],a=0;a<o;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!r){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===o){(t-=3)>-1&&i.push(239,191,189);continue}r=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(t-=3)>-1&&i.push(239,191,189);if(r=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=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((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function V(e){return o.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function H(e,t,n,o){for(var r=0;r<o&&!(r+n>=t.length||r>=e.length);++r)t[r+n]=e[r];return r}}).call(this,n(8))},function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],o=t[1];return 3*(n+o)/4-o},t.toByteArray=function(e){var t,n,o=c(e),a=o[0],s=o[1],l=new i(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),u=0,d=s>0?a-4:a;for(n=0;n<d;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],l[u++]=t>>16&255,l[u++]=t>>8&255,l[u++]=255&t;return 2===s&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,l[u++]=255&t),1===s&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t),l},t.fromByteArray=function(e){for(var t,n=e.length,r=n%3,i=[],a=0,s=n-r;a<s;a+=16383)i.push(u(e,a,a+16383>s?s:a+16383));return 1===r?(t=e[n-1],i.push(o[t>>2]+o[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],i.push(o[t>>10]+o[t>>4&63]+o[t<<2&63]+"=")),i.join("")};for(var o=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=a.length;s<l;++s)o[s]=a[s],r[a.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,n){for(var r,i,a=[],s=t;s<n;s+=3)r=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(o[(i=r)>>18&63]+o[i>>12&63]+o[i>>6&63]+o[63&i]);return a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},function(e,t){
17
17
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
18
- t.read=function(e,t,n,o,r){var i,a,s=8*r-o-1,l=(1<<s)-1,c=l>>1,u=-7,d=n?r-1:0,f=n?-1:1,m=e[t+d];for(d+=f,i=m&(1<<-u)-1,m>>=-u,u+=s;u>0;i=256*i+e[t+d],d+=f,u-=8);for(a=i&(1<<-u)-1,i>>=-u,u+=o;u>0;a=256*a+e[t+d],d+=f,u-=8);if(0===i)i=1-c;else{if(i===l)return a?NaN:1/0*(m?-1:1);a+=Math.pow(2,o),i-=c}return(m?-1:1)*a*Math.pow(2,i-o)},t.write=function(e,t,n,o,r,i){var a,s,l,c=8*i-r-1,u=(1<<c)-1,d=u>>1,f=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,m=o?0:i-1,p=o?1:-1,h=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+d>=1?f/l:f*Math.pow(2,1-d))*l>=2&&(a++,l/=2),a+d>=u?(s=0,a=u):a+d>=1?(s=(t*l-1)*Math.pow(2,r),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,r),a=0));r>=8;e[n+m]=255&s,m+=p,s/=256,r-=8);for(a=a<<r|s,c+=r;c>0;e[n+m]=255&a,m+=p,a/=256,c-=8);e[n+m-p]|=128*h}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){var n,o,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{o="function"==typeof clearTimeout?clearTimeout:a}catch(e){o=a}}();var l,c=[],u=!1,d=-1;function f(){u&&l&&(u=!1,l.length?c=l.concat(c):d=-1,c.length&&m())}function m(){if(!u){var e=s(f);u=!0;for(var t=c.length;t;){for(l=c,c=[];++d<t;)l&&l[d].run();d=-1,t=c.length}l=null,u=!1,function(e){if(o===clearTimeout)return clearTimeout(e);if((o===a||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(e);try{o(e)}catch(t){try{return o.call(null,e)}catch(t){return o.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function h(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new p(e,t)),1!==c.length||u||s(m)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=h,r.addListener=h,r.once=h,r.off=h,r.removeListener=h,r.removeAllListeners=h,r.emit=h,r.prependListener=h,r.prependOnceListener=h,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(e,t,n){"use strict";n.r(t);var o=n(6),r=n.n(o),i=n(3),a=n.n(i);function s(e){return""===e?e:"true"===e||"1"==e}var l=function(e,t){return new Promise((function(t,n){var o=new XMLHttpRequest;o.responseType="blob",o.onload=function(){var e=new FileReader;e.onloadend=function(){t(e.result)},e.readAsArrayBuffer(o.response)},o.open("GET",e),o.send()}))},c=n(9),u=function(e,t,n,o,r,i,a,s){var l,c="function"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=[],c._compiled=!0),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(e,t){return l.call(t),u(e,t)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:e,options:c}}({props:{text:{type:String,required:!0},qid:{type:String},correctLevel:{type:Number,default:1},size:{type:Number,default:200},margin:{type:Number,default:20},colorDark:{type:String,default:"#000000"},colorLight:{type:String,default:"#FFFFFF"},bgSrc:{type:String,default:void 0},background:{type:String,default:"rgba(0,0,0,0)"},backgroundDimming:{type:String,default:"rgba(0,0,0,0)"},logoSrc:{type:String,default:void 0},logoBackgroundColor:{type:String,default:"rgba(255,255,255,1)"},gifBgSrc:{type:String,default:void 0},logoScale:{type:Number,default:.2},logoMargin:{type:Number,default:0},logoCornerRadius:{type:Number,default:8},whiteMargin:{type:[Boolean,String],default:!0},dotScale:{type:Number,default:1},autoColor:{type:[Boolean,String],default:!0},binarize:{type:[Boolean,String],default:!1},binarizeThreshold:{type:Number,default:128},callback:{type:Function,default:function(){}},bindElement:{type:Boolean,default:!0},backgroundColor:{type:String,default:"#FFFFFF"},components:{default:function(){return{data:{scale:1},timing:{scale:1,protectors:!1},alignment:{scale:1,protectors:!1},cornerAlignment:{scale:1,protectors:!0}}}}},name:"vue-qr",data:function(){return{imgUrl:""}},watch:{$props:{deep:!0,handler:function(){this.main()}}},mounted:function(){this.main()},methods:{main:function(){var e=this;return r()(a.a.mark((function t(){var n,o,r,i;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.gifBgSrc){t.next=7;break}return t.next=3,l(e.gifBgSrc);case 3:return n=t.sent,o=e.logoSrc,e.render(void 0,o,n),t.abrupt("return");case 7:r=e.bgSrc,i=e.logoSrc,e.render(r,i);case 10:case"end":return t.stop()}}),t)})))()},render:function(e,t,n){var o=this;return r()(a.a.mark((function r(){var i;return a.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:i=o,new c.a({gifBackground:n,text:i.text,size:i.size,margin:i.margin,colorDark:i.colorDark,colorLight:i.colorLight,backgroundColor:i.backgroundColor,backgroundImage:e,backgroundDimming:i.backgroundDimming,logoImage:t,logoScale:i.logoScale,logoBackgroundColor:i.logoBackgroundColor,correctLevel:i.correctLevel,logoMargin:i.logoMargin,logoCornerRadius:i.logoCornerRadius,whiteMargin:s(i.whiteMargin),dotScale:i.dotScale,autoColor:s(i.autoColor),binarize:s(i.binarize),binarizeThreshold:i.binarizeThreshold,components:i.components}).draw().then((function(e){o.imgUrl=e,i.callback&&i.callback(e,i.qid)}));case 2:case"end":return r.stop()}}),r)})))()}}},(function(){var e=this.$createElement,t=this._self._c||e;return this.bindElement?t("img",{staticStyle:{display:"inline-block"},attrs:{src:this.imgUrl}}):this._e()})).exports;u.install=function(e){return e.component(u.name,u)};var d=u,f=[d];"undefined"!=typeof window&&window.Vue&&function(e){f.map((function(t){e.component(t.name,t)}))}(window.Vue),t.default=d}])},"65d8":function(e,t,n){},"65f0":function(e,t,n){var o=n("0b42");e.exports=function(e,t){return new(o(e))(0===t?0:t)}},"68ee":function(e,t,n){var o=n("e330"),r=n("d039"),i=n("1626"),a=n("f5df"),s=n("d066"),l=n("8925"),c=function(){},u=[],d=s("Reflect","construct"),f=/^\s*(?:class|function)\b/,m=o(f.exec),p=!f.exec(c),h=function(e){if(!i(e))return!1;try{return d(c,u,e),!0}catch(e){return!1}},g=function(e){if(!i(e))return!1;switch(a(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return p||!!m(f,l(e))}catch(e){return!0}};g.sham=!0,e.exports=!d||r((function(){var e;return h(h.call)||!h(Object)||!h((function(){e=!0}))||e}))?g:h},6964:function(e,t,n){var o=n("cb2d");e.exports=function(e,t,n){for(var r in t)o(e,r,t[r],n);return e}},"69f3":function(e,t,n){var o,r,i,a=n("7f9a"),s=n("da84"),l=n("e330"),c=n("861d"),u=n("9112"),d=n("1a2d"),f=n("c6cd"),m=n("f772"),p=n("d012"),h=s.TypeError,g=s.WeakMap;if(a||f.state){var v=f.state||(f.state=new g),b=l(v.get),y=l(v.has),_=l(v.set);o=function(e,t){if(y(v,e))throw new h("Object already initialized");return t.facade=e,_(v,e,t),t},r=function(e){return b(v,e)||{}},i=function(e){return y(v,e)}}else{var w=m("state");p[w]=!0,o=function(e,t){if(d(e,w))throw new h("Object already initialized");return t.facade=e,u(e,w,t),t},r=function(e){return d(e,w)?e[w]:{}},i=function(e){return d(e,w)}}e.exports={set:o,get:r,has:i,enforce:function(e){return i(e)?r(e):o(e,{})},getterFor:function(e){return function(t){var n;if(!c(t)||(n=r(t)).type!==e)throw h("Incompatible receiver, "+e+" required");return n}}}},"6b75":function(e,t,n){"use strict";function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}n.d(t,"a",(function(){return o}))},"6ba6":function(e,t,n){"use strict";function o(){return{list:[],config:{labelWidth:100,labelPosition:"right",size:"small",customClass:"",ui:"element",layout:"horizontal",labelCol:3,width:"100%",hideLabel:!1,hideErrorMessage:!1,theme:"default",themeTitle:"",themeSubTitle:"",themeTitleAlign:"left",submitHiddenArea:!1},version:1}}n.d(t,"a",(function(){return o}))},"6d18":function(e,t,n){"use strict";n("7f98")},"6d61":function(e,t,n){"use strict";var o=n("23e7"),r=n("da84"),i=n("e330"),a=n("94ca"),s=n("cb2d"),l=n("f183"),c=n("2266"),u=n("19aa"),d=n("1626"),f=n("861d"),m=n("d039"),p=n("1c7e"),h=n("d44e"),g=n("7156");e.exports=function(e,t,n){var v=-1!==e.indexOf("Map"),b=-1!==e.indexOf("Weak"),y=v?"set":"add",_=r[e],w=_&&_.prototype,x=_,C={},O=function(e){var t=i(w[e]);s(w,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(b&&!f(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return b&&!f(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(b&&!f(e))&&t(this,0===e?0:e)}:function(e,n){return t(this,0===e?0:e,n),this})};if(a(e,!d(_)||!(b||w.forEach&&!m((function(){(new _).entries().next()})))))x=n.getConstructor(t,e,v,y),l.enable();else if(a(e,!0)){var S=new x,k=S[y](b?{}:-0,1)!=S,E=m((function(){S.has(1)})),T=p((function(e){new _(e)})),D=!b&&m((function(){for(var e=new _,t=5;t--;)e[y](t,t);return!e.has(-0)}));T||((x=t((function(e,t){u(e,w);var n=g(new _,e,x);return null!=t&&c(t,n[y],{that:n,AS_ENTRIES:v}),n}))).prototype=w,w.constructor=x),(E||D)&&(O("delete"),O("has"),v&&O("get")),(D||k)&&O(y),b&&w.clear&&delete w.clear}return C[e]=x,o({global:!0,constructor:!0,forced:x!=_},C),h(x,e),b||n.setStrong(x,e,v),x}},"6d9f":function(e,t,n){},"6e14":function(e,t,n){"use strict";n("d1d2")},"6e53":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mod10=function(e){for(var t=0,n=0;n<e.length;n++){var o=parseInt(e[n]);(n+e.length)%2==0?t+=o:t+=2*o%10+Math.floor(2*o/10)}return(10-t%10)%10},t.mod11=function(e){for(var t=0,n=[2,3,4,5,6,7],o=0;o<e.length;o++){var r=parseInt(e[e.length-1-o]);t+=n[o%n.length]*r}return(11-t%11)%11}},"6f24":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i(n("4b23")),r=i(n("bb5d"));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var s=function(e){function t(e,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),/^[\x00-\x7F\xC8-\xD3]+$/.test(e))var o=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,(0,r.default)(e),n));else o=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return a(o)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(o.default);t.default=s},"6f53":function(e,t,n){var o=n("83ab"),r=n("e330"),i=n("df75"),a=n("fc6a"),s=r(n("d1e7").f),l=r([].push),c=function(e){return function(t){for(var n,r=a(t),c=i(r),u=c.length,d=0,f=[];u>d;)n=c[d++],o&&!s(r,n)||l(f,e?[n,r[n]]:r[n]);return f}};e.exports={entries:c(!0),values:c(!1)}},"6fba":function(e,t,n){"use strict";n("c2f4")},"70b0":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n("4b23"),a=(o=i)&&o.__esModule?o:{default:o},s=n("f08e");var l=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,s.B_START_CHAR+e,n))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"valid",value:function(){return new RegExp("^"+s.B_CHARS+"+$").test(this.data)}}]),t}(a.default);t.default=l},7149:function(e,t,n){"use strict";var o=n("23e7"),r=n("d066"),i=n("c430"),a=n("d256"),s=n("4738").CONSTRUCTOR,l=n("cdf9"),c=r("Promise"),u=i&&!s;o({target:"Promise",stat:!0,forced:i||s},{resolve:function(e){return l(u&&this===c?a:this,e)}})},7156:function(e,t,n){var o=n("1626"),r=n("861d"),i=n("d2bb");e.exports=function(e,t,n){var a,s;return i&&o(a=t.constructor)&&a!==n&&r(s=a.prototype)&&s!==n.prototype&&i(e,s),e}},7170:function(e,t,n){"use strict";n.r(t);n("e260"),n("d3b7"),n("e6cf"),n("3ca3"),n("ddb0");var o={computed:{componentShow:function(){return!this.printRead||"button"!==this.element.type&&"inline"!==this.element.type}}},r={name:"Card",mixins:[o],components:{BaseElementItem:function(){return Promise.resolve().then(n.bind(null,"7170"))}},props:["element","models","rules","remote","displayFields","edit","remoteOptionSource","platform","preview","containerKey","dataSourceValue","eventFunction","printRead"],data:function(){return{dataModels:this.models}},watch:{models:{deep:!0,handler:function(e){this.dataModels=e}}}},i=n("2877"),a=Object(i.a)(r,(function(){var e,t=this,n=t.$createElement,o=t._self._c||n;return t.displayFields[t.element.model]?o("el-card",{staticClass:"renderer-card",class:(e={},e[t.element.options&&t.element.options.customClass]=t.element.options&&t.element.options.customClass,e),attrs:{shadow:t.element.options.shadow}},[t.element.options&&t.element.options.showHeader?o("div",{attrs:{slot:"header"},slot:"header"},[t._v(t._s(t.element.name))]):t._e(),t._l(t.element.children,(function(e){return[t.componentShow?o("base-element-item",{key:e.key,attrs:{id:e.model,"container-key":t.containerKey,"data-source-value":t.dataSourceValue,"display-fields":t.displayFields,edit:t.edit,"event-function":t.eventFunction,models:t.dataModels,platform:t.platform,preview:t.preview,"print-read":t.printRead,remote:t.remote,"remote-option-source":t.remoteOptionSource,rules:t.rules,element:e}}):t._e()]}))],2):t._e()}),[],!1,null,null,null).exports,s={name:"Grid",mixins:[o],components:{BaseElementItem:function(){return Promise.resolve().then(n.bind(null,"7170"))}},props:["element","models","rules","remote","displayFields","edit","remoteOptionSource","platform","preview","containerKey","dataSourceValue","eventFunction","printRead"],data:function(){return{dataModels:this.models}},watch:{models:{deep:!0,handler:function(e){this.dataModels=e}}},methods:{getColSpan:function(e){return"pc"===this.platform?24/e:"pad"===this.platform?e>1?12:24:"mobile"===this.platform?24:void 0}}},l=Object(i.a)(s,(function(){var e,t=this,n=t.$createElement,o=t._self._c||n;return t.displayFields[t.element.model]?o("el-row",{staticClass:"renderer-grid-row",class:(e={},e[t.element.options&&t.element.options.customClass]=t.element.options&&t.element.options.customClass,e),attrs:{align:t.element.options.align,gutter:t.element.options.gutter||0,justify:t.element.options.justify,type:"flex"}},t._l(t.element.children,(function(e,n){var r;return o("el-col",{key:n,class:(r={},r[e.options&&e.options.customClass]=e.options&&e.options.customClass,r),attrs:{offset:e.options?e.options.offset:0,pull:e.options?e.options.pull:0,push:e.options?e.options.push:0,span:t.getColSpan(t.element.children.length||1)}},[t._l(e.children,(function(e){return[t.componentShow?o("base-element-item",{key:e.key,attrs:{"container-key":t.containerKey,"data-source-value":t.dataSourceValue,"display-fields":t.displayFields,edit:t.edit,"event-function":t.eventFunction,models:t.dataModels,platform:t.platform,preview:t.preview,"print-read":t.printRead,remote:t.remote,"remote-option-source":t.remoteOptionSource,rules:t.rules,element:e}}):t._e()]}))],2)})),1):t._e()}),[],!1,null,null,null).exports,c={name:"Report",mixins:[o],components:{BaseElementItem:function(){return Promise.resolve().then(n.bind(null,"7170"))}},props:["element","models","rules","remote","displayFields","edit","remoteOptionSource","platform","preview","containerKey","dataSourceValue","eventFunction","printRead"],data:function(){return{dataModels:this.models}},watch:{models:{deep:!0,handler:function(e){this.dataModels=this.models}}}},u=Object(i.a)(c,(function(){var e,t=this,n=t.$createElement,o=t._self._c||n;return t.displayFields[t.element.model]?o("table",{staticClass:"renderer-report",class:(e={},e[t.element.options&&t.element.options.customClass]=t.element.options&&t.element.options.customClass,e),style:{"border-top-width":t.element.options.borderWidth+"px","border-top-color":t.element.options.borderColor,"border-left-width":t.element.options.borderWidth+"px","border-left-color":t.element.options.borderColor,width:t.element.options.width||"100%"}},t._l(t.element.children,(function(e,n){return o("tr",{key:n},t._l(e.children,(function(e,r){var i;return e.options.invisible?t._e():o("td",{key:n+"-"+r,staticClass:"report-container-td",class:(i={},i[e.options.customClass]=e.options.customClass,i),style:{"border-right-width":t.element.options.borderWidth+"px","border-right-color":t.element.options.borderColor,"border-bottom-width":t.element.options.borderWidth+"px","border-bottom-color":t.element.options.borderColor,width:e.options.width,height:e.options.height},attrs:{colspan:e.options.colspan,rowspan:e.options.rowspan,valign:"top"}},[t._l(e.children,(function(e){return[t.componentShow?o("base-element-item",{key:e.key,attrs:{"container-key":t.containerKey,"data-source-value":t.dataSourceValue,"display-fields":t.displayFields,edit:t.edit,"event-function":t.eventFunction,models:t.dataModels,platform:t.platform,preview:t.preview,"print-read":t.printRead,remote:t.remote,"remote-option-source":t.remoteOptionSource,rules:t.rules,element:e}}):t._e()]}))],2)})),0)})),0):t._e()}),[],!1,null,null,null).exports,d=(n("b0c0"),{name:"tab",mixins:[o],components:{BaseElementItem:function(){return Promise.resolve().then(n.bind(null,"7170"))}},props:["element","models","rules","remote","displayFields","edit","remoteOptionSource","platform","preview","containerKey","dataSourceValue","eventFunction","printRead"],data:function(){return{dataModels:this.models,tabActive:this.element.children.length?this.element.children[0].name:""}},watch:{models:{deep:!0,handler:function(e){this.dataModels=this.models}}}}),f={name:"collapse",components:{BaseElementItem:function(){return Promise.resolve().then(n.bind(null,"7170"))}},props:["element","models","rules","remote","displayFields","edit","remoteOptionSource","platform","preview","containerKey","dataSourceValue","eventFunction","printRead"],data:function(){return{dataModels:this.models,collapseActive:this.element.children.length?this.element.children[0].name:""}},watch:{models:{deep:!0,handler:function(e){this.dataModels=this.models}}}},m={name:"Inline",components:{BaseElementItem:function(){return Promise.resolve().then(n.bind(null,"7170"))}},props:["element","models","rules","remote","displayFields","edit","remoteOptionSource","platform","preview","containerKey","dataSourceValue","eventFunction","printRead"],data:function(){return{dataModels:this.models}},watch:{models:{deep:!0,handler:function(e){this.dataModels=e}}}},p={card:a,grid:l,report:u,tabs:Object(i.a)(d,(function(){var e,t=this,n=t.$createElement,o=t._self._c||n;return t.displayFields[t.element.model]?o("el-tabs",{class:(e={},e[t.element.options.customClass]=t.element.options.customClass,e),staticStyle:{"margin-bottom":"18px"},attrs:{"tab-position":t.element.options.tabPosition,type:t.element.options.type},model:{value:t.tabActive,callback:function(e){t.tabActive=e},expression:"tabActive"}},t._l(t.element.children,(function(e){return o("el-tab-pane",{key:e.name,attrs:{label:e.name,name:e.name}},[t._l(e.children,(function(e){return[t.componentShow?o("base-element-item",{key:e.key,attrs:{"container-key":t.containerKey,"data-source-value":t.dataSourceValue,"display-fields":t.displayFields,edit:t.edit,"event-function":t.eventFunction,models:t.dataModels,platform:t.platform,preview:t.preview,"print-read":t.printRead,remote:t.remote,"remote-option-source":t.remoteOptionSource,rules:t.rules,element:e}}):t._e()]}))],2)})),1):t._e()}),[],!1,null,null,null).exports,collapse:Object(i.a)(f,(function(){var e,t=this,n=t.$createElement,o=t._self._c||n;return t.displayFields[t.element.model]?o("el-collapse",{staticClass:"renderer-collapse",class:(e={},e[t.element.options.customClass]=t.element.options.customClass,e),attrs:{accordion:t.element.options.accordion},model:{value:t.collapseActive,callback:function(e){t.collapseActive=e},expression:"collapseActive"}},t._l(t.element.children,(function(e){return o("el-collapse-item",{key:e.name,attrs:{name:e.name}},[o("div",{staticClass:"el-collapse-header-title",attrs:{slot:"title",title:e.name},slot:"title"},[t._v(t._s(e.name))]),t._l(e.children,(function(e){return[o("base-element-item",{key:e.key,attrs:{"container-key":t.containerKey,"data-source-value":t.dataSourceValue,"display-fields":t.displayFields,edit:t.edit,"event-function":t.eventFunction,models:t.dataModels,platform:t.platform,preview:t.preview,"print-read":t.printRead,remote:t.remote,"remote-option-source":t.remoteOptionSource,rules:t.rules,element:e}})]}))],2)})),1):t._e()}),[],!1,null,null,null).exports,inline:Object(i.a)(m,(function(){var e,t=this,n=t.$createElement,o=t._self._c||n;return t.displayFields[t.element.model]?o("div",{staticClass:"renderer-inline",class:(e={},e[t.element.options&&t.element.options.customClass]=t.element.options&&t.element.options.customClass,e),attrs:{shadow:t.element.options.shadow}},t._l(t.element.children,(function(e){return o("base-element-item",{key:e.key,staticClass:"item",attrs:{id:e.model,"container-key":t.containerKey,"data-source-value":t.dataSourceValue,"display-fields":t.displayFields,edit:t.edit,"event-function":t.eventFunction,models:t.dataModels,platform:t.platform,preview:t.preview,"print-read":t.printRead,remote:t.remote,"remote-option-source":t.remoteOptionSource,rules:t.rules,element:e}})})),1):t._e()}),[],!1,null,null,null).exports},h=n("5530"),g=n("1da1"),v=(n("96cf"),n("d9e2"),n("d81d"),n("b64b"),n("7db0"),n("a9e3"),{value:{type:[Number,String,Array,Object,Boolean],default:void 0},element:{type:Object,default:function(){}},models:{type:Object,default:function(){}},platform:{type:String,default:""},preview:{type:Boolean,default:!1},printRead:{type:Boolean,default:!1},edit:{type:Boolean,default:!1},remote:{type:Object,default:function(){}},remoteOptionSource:{type:Object,default:function(){return{}}},dataSourceValue:{type:Array,default:function(){return[]}},rules:{type:Object,default:function(){return{}}},eventFunction:{type:Object,default:function(){return{}}},isTable:{type:Boolean,default:!1},tableName:{type:String,default:""},isInTable:{type:Boolean,default:!1},rowIndex:{type:Number,default:0}}),b=n("5c9a"),y=n("8907"),_=(n("caad"),n("2532"),function e(t,n){return t&&t.length?t.map((function(t){return e(t[n.children],n).length?{value:t[n.value],label:t[n.label],children:e(t[n.children],n)}:{value:t[n.value],label:t[n.label]}})):[]}),w=function(e,t){return t.map((function(t){return e.options.props.children&&e.options.props.children.length&&Object.keys(t).includes(e.options.props.children)?{value:t[e.options.props.value],label:t[e.options.props.label],children:_(t[e.options.props.children],e.options.props)}:{value:t[e.options.props.value],label:t[e.options.props.label]}}))},x=function(e,t,n,o){return C.apply(this,arguments)};function C(){return(C=Object(g.a)(regeneratorRuntime.mark((function e(t,n,o,r){var i,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=[],t.options.remote===b.a.FUNCTIONS&&n[t.options.remoteFunc]&&n[t.options.remoteFunc]((function(e){i=w(t,e)})),t.options.remote===b.a.OPTION&&o[t.options.remoteOptionSource]&&(i=w(t,o[t.options.remoteOptionSource])),t.options.remote===b.a.API_DATA&&r&&(a=r.find((function(e){return e.key===t.options.remoteDataSource})),i=w(t,a.value)),e.abrupt("return",{remoteOptions:i});case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var O,S={name:"plugin",props:Object(h.a)({},v),inject:["variable","formValue","currentFormId","data"],data:function(){return{dataModel:this.value,dataModels:this.models,optionLoading:!1,optionLoadFailed:!1}},watch:{value:function(e){this.dataModel=e},dataModel:function(e){this.$emit("input",e)},remoteOptionSource:{deep:!0,handler:function(){Object.keys(this.remoteOptionSource).indexOf(this.element.options.remoteOptionSource)>=0&&this.element.options.remote!==b.a.STATIC_DATA&&"option"===this.element.options.remoteType&&(this.element.options.remoteOptions=w(this.element,this.remoteOptionSource[this.element.options.remoteOptionSource]))}},dataSourceValue:{deep:!0,handler:function(){var e=this;if(this.dataSourceValue){var t=this.dataSourceValue.find((function(t){return t.key===e.element.options.remoteDataSource}));this.element.options.remoteOptions=w(this.element,t.value)}}}},computed:{disabled:function(){return this.printRead||!this.edit||this.element.options.disabled},pluginWidth:function(){return this.isInTable?"100%":this.element.options.isWidgetWidth?"".concat(this.element.options.width,"%"):"100%"},isRemote:function(){return this.element.options.remote!==b.a.STATIC_DATA},widgetForm:function(){return this.data()}},methods:{handleOnFocus:function(){if(this.element.events&&this.element.events.onFocus){var e=this.element.events.onFocus;this.isTable&&this.tableName?this.eventFunction[e]&&this.eventFunction[e]({field:this.element.model,table:this.tableName,rowIndex:this.rowIndex}):this.eventFunction[e]&&this.eventFunction[e]({field:this.element.model})}},handleOnBlur:function(){if(this.element.events&&this.element.events.onBlur){var e=this.element.events.onBlur;this.isTable&&this.tableName?this.eventFunction[e]&&this.eventFunction[e]({field:this.element.model,table:this.tableName,rowIndex:this.rowIndex}):this.eventFunction[e]&&this.eventFunction[e]({field:this.element.model})}},getParentCode:function(e){return this.element.options.isInitNode&&this.element.options.initNode&&this.element.options.initNode.length?this.element.options.initNode[0][e]:"code"===e?this.variable.USER_REGION_CODE:this.variable.USER_REGION},handleLoadDictOptions:function(){var e=this;return Object(g.a)(regeneratorRuntime.mark((function t(){var n,o,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e.element.options.remoteOptions&&e.element.options.remoteOptions.length||e.optionLoading)){t.next=2;break}return t.abrupt("return");case 2:return e.optionLoading=!0,e.optionLoadFailed=!1,n=e.element.options.remoteOption.remoteDict,o="",r={},"dict"===n.dictDataType?o="#":"dictItem"===n.dictDataType&&(o=n.dictOptionId),t.next=10,Object(y.a)(e,{dictId:n.dictId,parentId:o});case 10:(r=t.sent).data?e.element.options.remoteOptions=r.data:e.optionLoadFailed=!0,e.optionLoading=!1;case 13:case"end":return t.stop()}}),t)})))()},onUploadSuccess:function(){if(this.element.events&&this.element.events.onUploadSuccess){var e=this.element.events.onUploadSuccess;this.eventFunction[e]&&this.eventFunction[e]()}},onUploadFileRemoved:function(e){if(this.element.events&&this.element.events.onRemoveUploadFile){var t=this.element.events.onRemoveUploadFile;this.eventFunction[t]&&this.eventFunction[t]({removedFile:e})}}}},k=S,E=Object(i.a)(k,(function(){var e=this.$createElement;return(this._self._c||e)("div")}),[],!1,null,null,null),T=E.exports,D=n("7694"),A=n("60bb"),M=n.n(A),R=n("a16a"),P={name:"renderer-input",extends:T,mixins:[R.a],methods:{queryColumns:function(e,t){var n=this;return Object(g.a)(regeneratorRuntime.mark((function o(){var r,i,a;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return r=[],i=n.element.options.relatedFormInfo.targetColumn,o.next=4,Object(D.h)({size:50,current:1,formId:n.element.options.relatedFormInfo.formId,data:[{columnName:i,operateType:"CONTAIN",value:e,valueType:"FIXED",widgetType:"input"}]});case 4:if((a=o.sent).data&&a.data.code&&"0000"===a.data.code){o.next=7;break}throw new Error(a&&a.data&&a.data.message?a.data.message:"获取表单数据列表失败");case 7:if(!a.data.data.records.length){o.next=12;break}if(!n.columnList||0!==n.columnList.length){o.next=11;break}return o.next=11,n.getColumnList(n.element.options.relatedFormInfo.formId);case 11:r=a.data.data.records.map((function(e){return Object(h.a)({value:null!==e[i]?n.getOptionLabel(e,i).substring(0,100):""},e)}));case 12:t(r);case 13:case"end":return o.stop()}}),o)})))()},selectData:function(e){if(0!==this.element.options.relatedFormInfo.dataFillRules.length){var t={value:{},fillingRules:[],selectedItem:{label:e[this.element.options.relatedFormInfo.targetColumn],value:e.ID,widgetModel:this.element.model,type:"input"}};t.fillingRules=this.element.options.relatedFormInfo.dataFillRules;var n=M.a.cloneDeep(e);this.$delete(n,"value"),t.value=n,this.fillingColumns(t)}}}},I=P,L=(n("7fbf"),Object(i.a)(I,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e.printRead?[n("div",{staticClass:"custom-input-section"},[e._v(" "+e._s(e.element.options.showPassword?"*********":e.dataModel)+" ")])]:[e.element.options.relatedFormEnabled?[e.element.options.dataTypeCheck&&"number"===e.element.options.dataType?n("el-autocomplete",{ref:"icd-form-"+e.element.model,style:{width:e.pluginWidth},attrs:{disabled:e.disabled,placeholder:e.element.options.placeholder,"show-password":e.element.options.showPassword,"fetch-suggestions":e.queryColumns,debounce:0,type:"number",maxlength:100},on:{blur:function(t){return t.stopPropagation(),e.handleOnBlur.apply(null,arguments)},focus:function(t){return t.stopPropagation(),e.handleOnFocus.apply(null,arguments)},select:e.selectData},model:{value:e.dataModel,callback:function(t){e.dataModel=e._n(t)},expression:"dataModel"}}):n("el-autocomplete",{ref:"icd-form-"+e.element.model,staticClass:"renderer-input-word-limit",style:{width:e.pluginWidth},attrs:{disabled:e.disabled,placeholder:e.element.options.placeholder,"show-password":e.element.options.showPassword,"fetch-suggestions":e.queryColumns,debounce:0,type:e.element.options.dataTypeCheck?e.element.options.dataType:"text","show-word-limit":"",maxlength:100},on:{blur:function(t){return t.stopPropagation(),e.handleOnBlur.apply(null,arguments)},focus:function(t){return t.stopPropagation(),e.handleOnFocus.apply(null,arguments)},select:e.selectData},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}})]:[e.element.options.dataTypeCheck&&"number"===e.element.options.dataType?n("el-input",{ref:"icd-form-"+e.element.model,style:{width:e.pluginWidth},attrs:{disabled:e.disabled,placeholder:e.element.options.placeholder,"show-password":e.element.options.showPassword,type:"number"},on:{blur:e.handleOnBlur,focus:e.handleOnFocus},model:{value:e.dataModel,callback:function(t){e.dataModel=e._n(t)},expression:"dataModel"}}):n("el-input",{ref:"icd-form-"+e.element.model,staticClass:"renderer-input-word-limit",style:{width:e.pluginWidth},attrs:{disabled:e.disabled,placeholder:e.element.options.placeholder,"show-password":e.element.options.showPassword,type:e.element.options.dataTypeCheck?e.element.options.dataType:"text",maxlength:"50","show-word-limit":""},on:{blur:e.handleOnBlur,focus:e.handleOnFocus},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}})]]],2)}),[],!1,null,null,null)),j=L.exports,z={name:"renderer-textarea",extends:T},F=z,B=Object(i.a)(F,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.printRead?n("div",{staticClass:"custom-textarea-section"},[e._v(" "+e._s(e.dataModel)+" ")]):n("el-input",{ref:"icd-form-"+e.element.model,style:{width:e.pluginWidth},attrs:{autosize:!!e.element.options.autosize&&{minRows:e.element.options.rows},disabled:e.disabled,placeholder:e.element.options.placeholder,rows:e.element.options.rows,type:"textarea"},on:{blur:e.handleOnBlur,focus:e.handleOnFocus},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}})}),[],!1,null,null,null),N=B.exports,V=(n("b680"),{name:"renderer-number",extends:T,computed:{digitalValue:function(){var e="",t=this.element.options.showSuffix?this.element.options.suffix:"";return isNaN(Number(this.dataModel))||(e=this.element.options.closePrecision?Number(this.dataModel)+t:Number(this.dataModel).toFixed(this.element.options.precision)+t),e},widthDisplay:function(){return this.element.options.isWidgetWidth?{width:this.element.options.width+"%"}:this.isInTable?{flex:1}:{width:"auto"}}}}),H=V,$=(n("0eba"),Object(i.a)(H,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.printRead?n("div",[e._v(" "+e._s(e.digitalValue)+" ")]):n("div",{staticClass:"number-display"},[n("el-input-number",{ref:"icd-form-"+e.element.model,style:e.widthDisplay,attrs:{controls:!e.printRead&&e.element.options.controls,"controls-position":e.element.options.controlsPosition,disabled:e.disabled,max:e.element.options.max,min:e.element.options.min,precision:e.element.options.closePrecision?void 0:e.element.options.precision,step:e.element.options.step},on:{blur:e.handleOnBlur,focus:e.handleOnFocus},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}}),e.element.options.showSuffix?n("span",{staticClass:"iss-number-unit"},[e._v(" "+e._s(e.element.options.suffix)+" ")]):e._e()],1)}),[],!1,null,null,null)),U=$.exports,W={name:"renderer-radio",extends:T,computed:{showDataModelInfo:function(){var e=this,t=this.dataModel;if(this.isRemote&&this.element.options.remoteOptions){var n=this.element.options.remoteOptions.find((function(t){return t.value===e.dataModel}));t=n?n.label:""}return t||""}},created:function(){var e=this;return Object(g.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.element.options.remote!==b.a.DICT_DATA){t.next=6;break}if(!e.element.options.remoteOption||!e.element.options.remoteOption.remoteDict){t.next=4;break}return t.next=4,e.handleLoadDictOptions();case 4:t.next=7;break;case 6:e.element.options.remoteOptions=x(e.element,e.remote,e.remoteOptionSource,e.dataSourceValue,e.edit);case 7:case"end":return t.stop()}}),t)})))()}},q=W,K=Object(i.a)(q,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.printRead?n("div",[e._v(" "+e._s(e.showDataModelInfo)+" ")]):n("div",[e.optionLoading?[n("i",{staticClass:"el-icon-loading"}),e._v(" 正在加载选项... ")]:e._e(),e.optionLoadFailed?n("div",{staticClass:"form-option-load-failed"},[n("base-icon",{attrs:{"icon-class":"information-line"}}),e._v(" 选项加载失败 "),n("el-button",{attrs:{size:"mini",type:"text"},on:{click:e.handleLoadDictOptions}},[n("base-icon",{attrs:{"icon-class":"refresh-line"}}),e._v(" 重试 ")],1)],1):e._e(),n("el-radio-group",{ref:"icd-form-"+e.element.model,style:{width:e.pluginWidth},attrs:{disabled:!e.edit||e.element.options.disabled},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}},["button"===e.element.options.optionStyle?e._l(e.isRemote?e.element.options.remoteOptions:e.element.options.options,(function(t,o){return n("el-radio-button",{key:t.value+o,style:{display:"inline-block"},attrs:{label:t.value}},[e._v(" "+e._s(t.label)+" ")])})):e._l(e.isRemote?e.element.options.remoteOptions:e.element.options.options,(function(t,o){return n("el-radio",{key:t.value+o,style:{display:"mobile"===e.platform&&"border"===e.element.options.optionStyle?"block":e.element.options.inline?"inline-block":"block"},attrs:{border:"border"===e.element.options.optionStyle,label:t.value}},[e._v(" "+e._s(t.label)+" ")])}))],2)],2)}),[],!1,null,null,null),G=K.exports,Y={name:"renderer-checkbox",extends:T,created:function(){var e=this;return Object(g.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.element.options.remote!==b.a.DICT_DATA){t.next=6;break}if(!e.element.options.remoteOption||!e.element.options.remoteOption.remoteDict){t.next=4;break}return t.next=4,e.handleLoadDictOptions();case 4:t.next=7;break;case 6:e.element.options.remoteOptions=x(e.element,e.remote,e.remoteOptionSource,e.dataSourceValue,e.edit);case 7:"checkbox"!==e.element.type||e.dataModel||(e.dataModel=[]);case 8:case"end":return t.stop()}}),t)})))()}},X=Y,J=Object(i.a)(X,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.printRead?n("div",[e.isRemote?[e._v(" "+e._s(e.dataModel&&e.dataModel.map((function(t){return e.element.options.remoteOptions.find((function(e){return e.value===t}))&&e.element.options.remoteOptions.find((function(e){return e.value===t})).label})).join("、")||"")+" ")]:[e._v(" "+e._s(e.dataModel&&e.dataModel.map((function(t){return e.element.options.options.find((function(e){return e.value===t}))&&e.element.options.options.find((function(e){return e.value===t})).label})).join("、")||"")+" ")]],2):n("div",[e.optionLoading?[n("i",{staticClass:"el-icon-loading"}),e._v(" 正在加载选项... ")]:e._e(),e.optionLoadFailed?n("div",{staticClass:"form-option-load-failed"},[n("base-icon",{attrs:{"icon-class":"information-line"}}),e._v(" 选项加载失败 "),n("el-button",{attrs:{size:"mini",type:"text"},on:{click:e.handleLoadDictOptions}},[n("base-icon",{attrs:{"icon-class":"refresh-line"}}),e._v(" 重试 ")],1)],1):e._e(),n("el-checkbox-group",{ref:"icd-form-"+e.element.model,style:{width:e.pluginWidth},attrs:{disabled:!e.edit||e.element.options.disabled},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}},["button"===e.element.options.optionStyle?e._l(e.isRemote?e.element.options.remoteOptions:e.element.options.options,(function(t,o){return n("el-checkbox-button",{key:t.value+o,style:{display:"inline-block"},attrs:{label:t.value}},[e._v(" "+e._s(t.label)+" ")])})):e._l(e.isRemote?e.element.options.remoteOptions:e.element.options.options,(function(t,o){return n("el-checkbox",{key:t.value+o,style:{display:"mobile"===e.platform&&"border"===e.element.options.optionStyle?"block":e.element.options.inline?"inline-block":"block"},attrs:{border:"border"===e.element.options.optionStyle,label:t.value}},[e._v(" "+e._s(t.label)+" ")])}))],2)],2)}),[],!1,null,null,null),Q=J.exports,Z={name:"renderer-time",extends:T},ee=Z,te=Object(i.a)(ee,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.printRead?n("div",[e._v(" "+e._s(e.dataModel)+" ")]):n("div",[n("el-time-picker",{ref:"icd-form-"+e.element.model,style:{width:e.pluginWidth},attrs:{arrowControl:e.element.options.arrowControl,clearable:e.element.options.clearable,disabled:!e.edit||e.element.options.disabled,editable:e.element.options.editable,"end-placeholder":e.element.options.endPlaceholder,"is-range":e.element.options.isRange,placeholder:e.element.options.placeholder,readonly:e.element.options.readonly,"start-placeholder":e.element.options.startPlaceholder,"value-format":e.element.options.format},on:{blur:e.handleOnBlur,focus:e.handleOnFocus},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}})],1)}),[],!1,null,null,null),ne=te.exports,oe=(n("ac1f"),n("5319"),n("c740"),n("c32d")),re=n.n(oe),ie={props:{platform:{type:String,default:"mobile"},value:{type:[String,Number],default:""},format:{type:String,default:""},type:{type:String,default:""},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},filterable:{type:Boolean,default:!1},placeholder:{type:String,default:""},printRead:{default:!1}},data:function(){return{show:!1,currentDate:new Date,minDate:new Date("/1920/01/01"),maxDate:new Date("/2120/11/01"),defaultIndex:0,currentYear:(new Date).getFullYear()+""}},computed:{formatValue:function(){if(this.value){var e=this.format.replace("yyyy","YYYY").replace("dd","DD");return re()(this.value).format(e)}return""},modelValue:{get:function(){return this.value},set:function(e){this.$emit("input",e)}},yearList:function(){for(var e=[],t=this.minDate.getFullYear(),n=this.maxDate.getFullYear(),o=t;o<n+1;o++)e.push(o+"");return e}},methods:{openPopup:function(){var e=this;if(!this.disabled){if("year"===this.type)if(this.value){var t=new Date(this.value).getFullYear(),n=this.yearList.findIndex((function(e){return e===t+""}));this.defaultIndex=-1!==n?n:0}else{var o=this.yearList.findIndex((function(t){return t===e.currentYear}));this.defaultIndex=-1!==o?o:0}else this.currentDate=this.value?new Date(this.value):new Date;this.show=!0}},clearValue:function(){this.currentDate=new Date,this.modelValue=""},handleOnBlur:function(){this.$emit("blur")},handleOnFocus:function(){this.$emit("focus")},formatter:function(e,t){return"year"===e?"".concat(t,"年"):"month"===e?"".concat(t,"月"):"day"===e?"".concat(t,"日"):"hour"===e?"".concat(t,"时"):"minute"===e?"".concat(t,"分"):t},onFinish:function(e){"year"===this.type?this.modelValue=new Date(e,0,1,0,0,0,0).getTime():this.modelValue=e.getTime(),this.show=!1}}},ae=ie,se=Object(i.a)(ae,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e.printRead?[e._v(e._s(e.formatValue))]:[n("div",{on:{click:e.openPopup}},[n("el-input",{attrs:{placeholder:e.placeholder,readonly:"",clearable:""},on:{blur:e.handleOnBlur,focus:e.handleOnFocus},model:{value:e.formatValue,callback:function(t){e.formatValue=t},expression:"formatValue"}},[e.clearable&&e.formatValue?n("i",{staticClass:"el-icon-circle-close",attrs:{slot:"suffix"},on:{click:function(t){return t.stopPropagation(),t.preventDefault(),e.clearValue.apply(null,arguments)}},slot:"suffix"}):e._e()])],1)],n("van-popup",{attrs:{round:"",position:"bottom"},model:{value:e.show,callback:function(t){e.show=t},expression:"show"}},["year"!==e.type?n("van-datetime-picker",{attrs:{type:"month"===e.type?"year-month":e.type,title:"请选择",formatter:e.formatter,minDate:e.minDate,maxDate:e.maxDate},on:{confirm:e.onFinish,cancel:function(t){e.show=!1}},model:{value:e.currentDate,callback:function(t){e.currentDate=t},expression:"currentDate"}}):n("van-picker",{attrs:{title:"请选择","show-toolbar":"",columns:e.yearList,"default-index":e.defaultIndex,teleport:"body"},on:{confirm:e.onFinish,cancel:function(t){e.show=!1}}})],1)],2)}),[],!1,null,"7dc69ab5",null),le=se.exports,ce={name:"renderer-date",extends:T,components:{CustomMobileDate:le},mounted:function(){!this.element.options.useDynamicValue||this.element.options.hidden||this.printRead||this.dataModel||(this.dataModel=(new Date).getTime())}},ue=ce,de=Object(i.a)(ue,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return"mobile"===e.platform?n("custom-mobile-date",{attrs:{"print-read":e.printRead,disabled:e.printRead||!e.edit||e.element.options.disabled,clearable:e.element.options.clearable,placeholder:e.element.options.placeholder,format:"custom"===e.element.options.format?e.element.options.customFormat:e.element.options.format,type:e.element.options.type},on:{blur:e.handleOnBlur,focus:e.handleOnFocus},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}}):n("el-date-picker",{ref:"icd-form-"+e.element.model,style:{width:e.pluginWidth},attrs:{clearable:e.element.options.clearable,disabled:e.disabled,editable:e.element.options.editable,"end-placeholder":e.element.options.endPlaceholder,format:"custom"===e.element.options.format?e.element.options.customFormat:e.element.options.format,placeholder:e.element.options.placeholder,readonly:e.element.options.readonly,"start-placeholder":e.element.options.startPlaceholder,type:e.element.options.type,"value-format":"timestamp"},on:{blur:e.handleOnBlur,focus:e.handleOnFocus},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}})}),[],!1,null,null,null),fe=de.exports,me={name:"renderer-rate",extends:T},pe=me,he=Object(i.a)(pe,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("el-rate",{ref:"icd-form-"+e.element.model,style:e.element.options.clearable?"float:left":"",attrs:{"allow-half":e.element.options.allowHalf,disabled:e.disabled,"icon-classes":["ri-star-fill","ri-star-fill","ri-star-fill"],max:e.element.options.max,"score-template":"{value}"+e.element.options.suffix,"show-score":e.element.options.showScore,"disabled-void-icon-class":"ri-star-fill","void-icon-class":"ri-star-line"},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}}),e.element.options.clearable?n("el-link",{staticStyle:{float:"left","margin-left":"1rem"},attrs:{underline:!1,type:"primary"},on:{click:function(t){e.dataModel=0}}},[e._v("清空")]):e._e()],1)}),[],!1,null,null,null),ge=he.exports,ve=n("f73f"),be=n("d9c2"),ye={name:"renderer-select",extends:T,components:{CustomSelectComponent:ve.a,CustomMobileSelect:be.a},created:function(){var e=this;return Object(g.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.element.options.remote!==b.a.DICT_DATA){t.next=6;break}if(!e.element.options.remoteOption||!e.element.options.remoteOption.remoteDict){t.next=4;break}return t.next=4,e.handleLoadDictOptions();case 4:t.next=7;break;case 6:e.element.options.remoteOptions=x(e.element,e.remote,e.remoteOptionSource,e.dataSourceValue,e.edit);case 7:case"end":return t.stop()}}),t)})))()}},_e=ye,we=Object(i.a)(_e,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.printRead?n("div",[e.isRemote?[e._v(" "+e._s(("object"==typeof e.dataModel&&e.dataModel?e.dataModel.map((function(t){return e.element.options.remoteOptions.find((function(e){return e.value===t}))&&e.element.options.remoteOptions.find((function(e){return e.value===t})).label})).join("、"):e.element.options.remoteOptions.find((function(t){return t.value===e.dataModel}))&&e.element.options.remoteOptions.find((function(t){return t.value===e.dataModel})).label)||"")+" ")]:[e._v(" "+e._s(("object"==typeof e.dataModel&&e.dataModel?e.dataModel.map((function(t){return e.element.options.options.find((function(e){return e.value===t}))&&e.element.options.options.find((function(e){return e.value===t})).label})).join("、"):e.element.options.options.find((function(t){return t.value===e.dataModel}))&&e.element.options.options.find((function(t){return t.value===e.dataModel})).label)||"")+" ")]],2):n("div",["mobile"===e.platform?n("custom-mobile-select",{ref:"icd-form-"+e.element.model,attrs:{multiple:e.element.options.multiple,options:e.isRemote?e.element.options.remoteOptions:e.element.options.options,disabled:!e.edit||e.element.options.disabled,clearable:e.element.options.clearable,filterable:e.element.options.filterable,"is-show-label-val":!0},on:{blur:e.handleOnBlur,focus:e.handleOnFocus},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}}):n("custom-select-component",{ref:"icd-form-"+e.element.model,style:{width:e.pluginWidth},attrs:{clearable:e.element.options.clearable,"custom-multiple":e.element.options.multiple,disabled:!e.edit||e.element.options.disabled,filterable:e.element.options.filterable,loading:e.optionLoading,placeholder:e.element.options.placeholder,"loading-text":"正在加载选项",multiple:""},on:{blur:e.handleOnBlur,focus:e.handleOnFocus},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}},e._l(e.isRemote?e.element.options.remoteOptions:e.element.options.options,(function(e,t){return n("el-option",{key:e.id||e.value+t,attrs:{label:e.label,value:e.value}})})),1),e.optionLoadFailed?n("div",{staticClass:"form-option-load-failed"},[n("base-icon",{attrs:{"icon-class":"information-line"}}),e._v(" 选项加载失败 "),n("el-button",{attrs:{size:"mini",type:"text"},on:{click:e.handleLoadDictOptions}},[n("base-icon",{attrs:{"icon-class":"refresh-line"}}),e._v(" 重试 ")],1)],1):e._e()],1)}),[],!1,null,null,null),xe=we.exports,Ce={name:"renderer-switches",extends:T},Oe=Ce,Se=Object(i.a)(Oe,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.printRead?n("div",[e._v(" "+e._s(!0===e.dataModel?e.element.options.activeText||"是":!1===e.dataModel?e.element.options.inactiveText||"否":"")+" ")]):n("div",[n("el-switch",{ref:"icd-form-"+e.element.model,attrs:{"active-text":e.element.options.activeText,disabled:!e.edit||e.element.options.disabled,"inactive-text":e.element.options.inactiveText},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}})],1)}),[],!1,null,null,null),ke=Se.exports,Ee={name:"renderer-slider",extends:T},Te=Ee,De=Object(i.a)(Te,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.printRead?n("div",[e._v(" "+e._s(e.dataModel+e.element.options.suffix)+" ")]):n("el-slider",{ref:"icd-form-"+e.element.model,style:{width:e.pluginWidth},attrs:{disabled:e.disabled,"format-tooltip":function(t){return t+e.element.options.suffix},max:e.element.options.max,min:e.element.options.min,range:e.element.options.range,"show-input":e.element.options.showInput,step:e.element.options.step},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}})}),[],!1,null,null,null),Ae=De.exports,Me={name:"renderer-editor",extends:T,components:{RichEditor:n("0a4d").a}},Re=Object(i.a)(Me,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("rich-editor",{ref:"icd-form-"+e.element.model,attrs:{"custom-style":{width:e.pluginWidth,cursor:!e.edit||e.element.options.disabled?"no-drop":"",backgroundColor:!e.edit||e.element.options.disabled?"#F5F7FA":""},disabled:e.disabled,placeholder:e.element.options.placeholder,readonly:!0},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}})}),[],!1,null,null,null).exports,Pe={name:"renderer-organization",extends:T,components:{OrganizationSelector:n("9a01").a}},Ie=Object(i.a)(Pe,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.printRead?n("div",[e._v(" "+e._s(e.dataModel&&e.dataModel.map((function(e){return e.name})).join("、")||"")+" ")]):n("div",[n("organization-selector",{ref:"icd-form-"+e.element.model,attrs:{"dialog-title":"选择"+("ORGAN"===e.element.options.optionScopeType?"组织机构":"人员"),"custom-style":{width:e.pluginWidth},disabled:e.disabled,multiple:e.element.options.multiple,"parent-code":e.getParentCode("code"),"parent-name":e.getParentCode("name"),"option-scope-type":e.element.options.optionScopeType,placeholder:e.element.options.placeholder,platform:e.platform},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}})],1)}),[],!1,null,null,null).exports,Le={name:"renderer-member",extends:Ie},je=Object(i.a)(Le,void 0,void 0,!1,null,null,null).exports,ze=(n("99af"),n("a15b"),n("e2e6")),Fe={name:"renderer-cascader",extends:T,inject:["formValue"],components:{},computed:{showText:function(){return this.formValue["".concat(this.element.model,"_").concat(ze.a)]||this.showSelectLabel||""}},watch:{printRead:{deep:!0,immediate:!0,handler:(O=Object(g.a)(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=4;break}this.getCascaderPrintValue(),e.next=11;break;case 4:if(this.element.options.remote!==b.a.DICT_DATA||!this.element.options.remoteOption||!this.element.options.remoteOption.remoteDict){e.next=11;break}if(!this.edit){e.next=11;break}return e.next=8,this.handleLoadDictOptions();case 8:return this.options=this.element.options.remoteOptions,e.next=11,this.loadCascaderOptions();case 11:case"end":return e.stop()}}),e,this)}))),function(e){return O.apply(this,arguments)})}},data:function(){return{selectionTypeSuffix:ze.a,DATASOURCE_TYPE:b.a,printValue:"",options:[],optionLoading:!1,optionLoadFailed:!1,showSelectLabel:""}},created:function(){var e=this;return Object(g.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.element.options.remote!==b.a.DICT_DATA||!e.element.options.remoteOption||!e.element.options.remoteOption.remoteDict){t.next=7;break}if(!e.edit){t.next=7;break}return t.next=4,e.handleLoadDictOptions();case 4:return e.options=e.element.options.remoteOptions,t.next=7,e.loadCascaderOptions();case 7:case"end":return t.stop()}}),t)})))()},methods:{loadCascaderOptions:function(){var e=this;return Object(g.a)(regeneratorRuntime.mark((function t(){var n,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e.dataModel&&e.dataModel.length&&e.options&&e.options.length)){t.next=6;break}return n=e.options.findIndex((function(t){return t.value===e.dataModel[0]})),t.next=4,e.getChildren(e.options[n],1,e.dataModel);case 4:(o=t.sent)&&o.length?e.$set(e.options[n],"children",o):e.$set(e.options[n],"leaf",!0);case 6:case"end":return t.stop()}}),t)})))()},getChildren:function(e,t,n){var o=this;return Object(g.a)(regeneratorRuntime.mark((function r(){var i,a;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,o.loadDictOption(e);case 2:if(!((i=r.sent)&&i.length&&t<n.length)){r.next=11;break}return a=i.findIndex((function(e){return e.value===n[t]})),r.t0=o,r.t1=i[a],r.next=9,o.getChildren(i[a],t+1,n);case 9:r.t2=r.sent,r.t0.$set.call(r.t0,r.t1,"children",r.t2);case 11:return r.abrupt("return",i);case 12:case"end":return r.stop()}}),r)})))()},loadDictOption:function(e){var t=this;return Object(g.a)(regeneratorRuntime.mark((function n(){var o;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t.loading=!0,n.prev=1,n.next=4,Object(y.a)(t,{dictId:e.dictId,parentId:e.id});case 4:return(o=n.sent).data&&o.data.length&&(o.data=o.data.map((function(e){return Object(h.a)(Object(h.a)({},e),{},{leaf:"0"===e.hasChild})}))),n.abrupt("return",o.data);case 9:return n.prev=9,n.t0=n.catch(1),t.$message.error(n.t0),n.abrupt("return",null);case 13:return n.prev=13,t.loading=!1,n.finish(13);case 16:case"end":return n.stop()}}),n,null,[[1,9,13,16]])})))()},cascaderLazyLoad:function(e,t){var n=this;return Object(g.a)(regeneratorRuntime.mark((function o(){var r;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(!e.root){o.next=3;break}return t(),o.abrupt("return");case 3:return o.next=5,Object(y.a)(n,{dictId:e.data.dictId,parentId:e.data.id});case 5:(r=o.sent).data?t(r.data):n.optionLoadFailed=!0;case 7:case"end":return o.stop()}}),o)})))()},onCascaderChange:function(e){var t=this;e&&this.$nextTick((function(){var e=t.$refs["icd-form-".concat(t.element.model)];t.showSelectLabel=e?e.presentText:"",t.$parent&&t.$parent.clearValidate&&t.$parent.clearValidate(),t.$parent&&t.$parent.$parent&&t.$parent.$parent.$refs.BaseElementItem&&t.$parent.$parent.$refs.BaseElementItem.clearValidate()}))},getCascaderPrintValue:function(){if(this.isInTable){if(this.formValue[this.tableName]){var e=this.formValue[this.tableName][this.rowIndex];this.printValue=(e["".concat(this.element.model,"_").concat(ze.a)]||[]).join(" / ")}}else if(void 0!==this.formValue["".concat(this.element.model,"_").concat(ze.a)])this.printValue=(this.formValue["".concat(this.element.model,"_").concat(ze.a)]||[]).join(" / ");else if(this.$refs["icd-form-".concat(this.element.model)]){var t=this.$refs["icd-form-".concat(this.element.model)].getCheckedNodes(),n=t&&t.length?t[0].pathLabels:[];this.printValue=this.isRemote?n.join(" / "):this.dataModel.join(" / ")}}}},Be=Object(i.a)(Fe,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.printRead?n("div",[e._v(e._s(e.printValue))]):n("div",[n("el-cascader",{ref:"icd-form-"+e.element.model,style:{width:e.element.options.isWidgetWidth?e.element.options.width+"%":"100%"},attrs:{clearable:e.element.options.clearable,disabled:e.disabled,filterable:e.element.options.filterable,loading:e.optionLoading,options:e.isRemote?e.options:e.element.options.options,placeholder:e.element.options.placeholder,props:{lazy:e.isRemote,lazyLoad:e.cascaderLazyLoad,checkStrictly:e.element.options.checkStrictly},"collapse-tags":"","loading-text":"正在加载选项"},on:{blur:e.handleOnBlur,change:e.onCascaderChange,focus:e.handleOnFocus},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}}),e.optionLoadFailed?n("div",{staticClass:"form-option-load-failed"},[n("base-icon",{attrs:{"icon-class":"information-line"}}),e._v(" 选项加载失败 "),n("el-button",{attrs:{size:"mini",type:"text"},on:{click:e.handleLoadDictOptions}},[n("base-icon",{attrs:{"icon-class":"refresh-line"}}),e._v(" 重试 ")],1)],1):e._e()],1)}),[],!1,null,null,null).exports,Ne={name:"renderer-upload",extends:T,components:{UploadComponent:n("c1ea").a}},Ve=Object(i.a)(Ne,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("upload-component",{ref:"icd-form-"+e.element.model,style:{width:e.pluginWidth},attrs:{disabled:!e.edit||e.element.options.disabled,limit:e.element.options.limit,multiple:e.element.options.multiple,"print-read":e.printRead,size:e.element.options.size,tip:e.element.options.tip,"is-batch-download":e.element.options.isBatchDownload,searchable:e.element.options.searchable},on:{onSuccess:e.onUploadSuccess,onRemove:e.onUploadFileRemoved},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}})}),[],!1,null,null,null).exports,He={name:"renderer-imageUpload",extends:T,components:{UploadImageComponent:n("7afc").a}},$e=Object(i.a)(He,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("upload-image-component",{ref:"icd-form-"+e.element.model,style:{width:e.pluginWidth},attrs:{disabled:!e.edit||e.element.options.disabled,limit:e.element.options.limit,multiple:e.element.options.multiple,"print-read":e.printRead,size:e.element.options.size,tip:e.element.options.tip},on:{onSuccess:e.onUploadSuccess,onRemove:e.onUploadFileRemoved},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}})}),[],!1,null,null,null).exports,Ue={name:"renderer-uuid",extends:T,components:{UuidComponent:n("b3da").a}},We=Object(i.a)(Ue,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("uuid-component",{ref:"icd-form-"+e.element.model,attrs:{"custom-style":{width:e.pluginWidth},"print-read":e.printRead},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}})}),[],!1,null,null,null).exports,qe={name:"renderer-sequence",extends:T},Ke=Object(i.a)(qe,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.currentFormId&&e.currentFormId.length?n("div",{ref:"icd-form-"+e.element.model},[e.printRead?[e._v(e._s(e.dataModel))]:n("el-input",{attrs:{value:e.dataModel&&e.dataModel.length?e.dataModel.toString():"仅限编辑和详情页面展示",disabled:""}})],2):n("div",[e._v("仅限编辑和详情页面展示")])}),[],!1,null,null,null).exports,Ge={name:"renderer-address",extends:T,components:{AddressComponent:n("ce9d").a}},Ye=Object(i.a)(Ge,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("address-component",{ref:"icd-form-"+e.element.model,attrs:{disabled:e.element.options.disabled||!e.edit,"is-address-detail":e.element.options.isAddressDetail,"print-read":e.printRead,platform:e.platform},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}})}),[],!1,null,null,null).exports,Xe={name:"renderer-relatedForm",extends:T,components:{RelatedForm:n("40e3").a}},Je=Object(i.a)(Xe,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("related-form",{ref:"icd-form-"+e.element.model,attrs:{clearable:e.element.options.clearable,disabled:e.disabled,models:e.dataModels,placeholder:e.element.options.placeholder,"print-read":e.printRead,widget:e.element,platform:e.platform},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}})}),[],!1,null,null,null).exports,Qe=n("2909"),Ze=(n("159b"),n("2b3d"),n("9861"),n("4de4"),n("a434"),n("fb6a"),n("ec26")),et=n("7461"),tt={add:{label:"新增",value:"add",icon:"add-line"},remove:{label:"删除",value:"remove",icon:"delete-bin-4-fill"},removeList:{label:"批量删除",value:"removeList",icon:"delete-bin-4-fill"},copy:{label:"复制",value:"copy",icon:"file-copy-fill"},upload:{label:"导入",value:"upload",icon:"download-2-line"},download:{label:"导出",value:"download",icon:"upload-2-line"},moveUp:{label:"上移",value:"moveUp",icon:"arrow-up-line"},moveDown:{label:"下移",value:"moveDown",icon:"arrow-down-line"},cancel:{label:"取消",value:"cancel",icon:"close-circle-fill"}},nt={name:"TableItem",props:["element","value","models","remote","isTable","isInTable","disabled","edit","remoteOptionSource","rules","platform","preview","dataSourceValue","eventFunction","rowIndex","tableName","printRead","scopeRowData"],data:function(){return{Elements:zt,dataModel:this.value}},watch:{value:function(e){this.dataModel=e},dataModel:function(e){this.$emit("input",e),this.isTable&&this.tableName&&this.$emit("on-table-change",{value:e,field:this.element.model,table:this.tableName,rowIndex:this.rowIndex,haveEvent:this.element.events&&this.element.events.onChange})}}},ot=Object(i.a)(nt,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:{"print-read-mode":e.printRead}},[n(e.Elements[e.element.type],{tag:"component",attrs:{element:e.element,platform:e.platform,preview:e.preview,"print-read":e.printRead,edit:e.edit,"row-index":e.rowIndex,"table-name":e.tableName,isInTable:e.isInTable,isTable:e.isTable,scopeRowData:e.scopeRowData,remote:e.remote,"remote-option-source":e.remoteOptionSource,rules:e.rules},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}})],1)}),[],!1,null,null,null).exports,rt={name:"StepOne",components:{BaseIcon:et.a},inject:{currentFormId:{default:""},formPublishVersionId:{default:""}},props:{widgetKey:{type:String,default:""},widgetName:{type:String,default:null}},data:function(){return{loading:!1,fileList:[],result:{state:!1,message:"处理失败"},fileName:""}},methods:{handleChange:function(e,t){this.$refs.upload.clearFiles(),this.fileList=t},handleUpload:function(){var e=this;return Object(g.a)(regeneratorRuntime.mark((function t(){var n,o,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((n=e.fileList[0].raw).size/1024/1024<1){t.next=4;break}return e.$message.error("上传文件大小不能超过 1MB!"),t.abrupt("return");case 4:return e.loading=!0,e.$emit("onUpload"),(o=new FormData).append("file",n),o.append("formId",e.currentFormId),t.prev=9,t.next=12,Object(D.q)(o);case 12:if("0000"!==(r=t.sent).data.code){t.next=20;break}return e.fileName=r.data.data,t.next=17,e.handleImport();case 17:e.$emit("onNext",e.result),t.next=22;break;case 20:e.$message.error(r.data.message);case 22:t.next=27;break;case 24:t.prev=24,t.t0=t.catch(9),e.$message.error(t.t0.message);case 27:return t.prev=27,e.loading=!1,e.$emit("onUploadEnd"),e.fileList=[],t.finish(27);case 32:case"end":return t.stop()}}),t,null,[[9,24,27,32]])})))()},handleImport:function(){var e=this;return Object(g.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.processing=!0,t.prev=1,t.next=4,Object(D.b)({fileName:e.fileName,formId:e.currentFormId,previewFlag:!0,tableWidgetKey:e.widgetKey,versionId:e.formPublishVersionId}).then((function(t){e.result.state="0000"===t.data.code,e.result.message=t.data.message||("0000"===t.data.code?"处理成功":"处理失败"),e.result.data=t.data.data})).catch((function(t){e.result.state=!1,e.result.message=t.message||t.data.message}));case 4:t.next=10;break;case 6:t.prev=6,t.t0=t.catch(1),e.result.state=!1,e.result.message=t.t0.message;case 10:return t.prev=10,e.processing=!1,t.finish(10);case 13:case"end":return t.stop()}}),t,null,[[1,6,10,13]])})))()},downloadModel:function(){var e=this;return Object(g.a)(regeneratorRuntime.mark((function t(){var n,o,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.$emit("onUpload"),e.loading=!0,t.prev=2,t.next=5,Object(D.d)({formId:e.currentFormId,tableWidgetKey:e.widgetKey});case 5:(n=t.sent).data?(o=window.URL.createObjectURL(new Blob([n.data],{type:"application/vnd.ms-excel"})),(r=document.createElement("a")).href=o,r.setAttribute("download","".concat(e.widgetName?e.widgetName:"","_").concat(e.widgetKey,"_导入模板.xlsx")),document.body.appendChild(r),r.click()):e.$message.error(n.data.message||"下载子表单导出模板失败"),t.next=13;break;case 9:t.prev=9,t.t0=t.catch(2),e.$message.error(t.t0);case 13:return t.prev=13,e.loading=!1,e.$emit("onUploadEnd"),t.finish(13);case 17:case"end":return t.stop()}}),t,null,[[2,9,13,17]])})))()}}},it=(n("9ee4"),Object(i.a)(rt,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"step-one-container"},[n("div",{staticClass:"row-item opt-top-bar"},[e._v(" 为了保证数据导入顺利,推荐您下载使用导入模版,并按照规范示例录入数据 "),n("el-button",{attrs:{size:"mini",type:"primary"},on:{click:e.downloadModel}},[e._v("下载导入模板")])],1),n("div",{staticClass:"row-item upload-bar"},[n("el-upload",{ref:"upload",staticClass:"upload-excel",attrs:{"http-request":e.handleUpload,multiple:!1,"on-change":e.handleChange,"show-file-list":!1,accept:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel,.xlsx,.xls",action:"",drag:""}},[n("base-icon",{staticClass:"el-icon-upload",attrs:{"icon-class":"upload-2-line"}}),n("div",{staticClass:"el-upload__text"},[e._v(" 将文件拖到此处,或 "),n("em",[e._v("点击上传")])])],1)],1),e._m(0)])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row-item note-bar"},[t("ul",{staticClass:"upload-info"},[t("li",[this._v("支持 1MB 以内的xlsx格式文件")]),t("li",[this._v("导入文件第一、第二行表头(默认隐藏)不允许修改或删除")]),t("li",[this._v("导入文件中,数据不可存在空行")]),t("li",[this._v("导入文件中,如某项数据不符合设定表单中组件的校验规则,则存入系统值为空。如:必填项,长度,字典选项等")])])])}],!1,null,"d9d74232",null).exports),at={name:"StepTwo",props:{displayData:{type:Object,default:null}},data:function(){return{status:"success",statusMap:{success:"导入成功",warning:"部分导入成功",error:"导入失败"}}},mounted:function(){this.status=this.displayData&&this.displayData.state?"success":"error"}},st={name:"DataImport",components:{StepTwo:Object(i.a)(at,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"step-two-container"},[n("el-result",{attrs:{icon:e.status,title:e.statusMap[e.status]}},["success"!==e.status?n("template",{slot:"subTitle"},[e._v(" "+e._s(e.displayData&&e.displayData.message)+" ")]):n("template",{slot:"subTitle"},[e._v(" 成功导入数据 : "+e._s(e.displayData&&e.displayData.data&&e.displayData.data.successCount)+"条 ")])],2)],1)}),[],!1,null,null,null).exports,StepOne:it},inject:["currentFormId"],props:{isDisplay:{type:Boolean,default:!1},widgetKey:{type:String,default:""},widgetName:{type:String,default:null}},model:{prop:"isDisplay",event:"change"},data:function(){return{loading:!1,activeStep:0,uploadResData:null}},methods:{onNext:function(e){this.activeStep+=1,this.uploadResData=e,this.loading=!1}}},lt=(n("b8b3"),Object(i.a)(st,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-dialog",{attrs:{"close-on-click-modal":!1,"close-on-press-escape":!1,visible:e.isDisplay,"append-to-body":"","custom-class":"data-import-container",title:"批量导入"},on:{close:function(t){return e.$emit("onClose")}}},[n("div",{staticClass:"header"},[n("el-steps",{attrs:{active:e.activeStep,"align-center":"","finish-status":"success"}},[n("el-step",{attrs:{title:"数据上传"}}),n("el-step",{attrs:{title:"完成"}})],1)],1),n("div",{staticClass:"body"},[0===e.activeStep?n("step-one",{attrs:{"widget-key":e.widgetKey,"widget-name":e.widgetName},on:{onNext:e.onNext,onUpload:function(t){e.loading=!0},onUploadEnd:function(t){e.loading=!1}}}):e._e(),1===e.activeStep?n("step-two",{attrs:{"display-data":e.uploadResData}}):e._e()],1),n("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:function(t){return e.$emit("onClose")}}},[e._v("取消")]),e.activeStep>0?n("el-button",{on:{click:function(t){e.activeStep-=1}}},[e._v("上一步")]):e._e(),1===e.activeStep?n("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.$emit("onComplete",e.uploadResData)}}},[e._v("完成")]):e._e()],1)])}),[],!1,null,null,null).exports),ct={name:"TableLayout"},ut=Object(i.a)(ct,(function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"table-layout-container"},[t("div",{staticClass:"absolute-header"},[this._t("absoluteHeader")],2),t("div",{staticClass:"table-layout-container-item header"},[t("div",{staticClass:"header-item left"},[this._t("headerLeft")],2),t("div",{staticClass:"header-item right"},[this._t("headerRight")],2)]),t("div",{staticClass:"table-layout-container-item body"},[this._t("body")],2),t("div",{staticClass:"table-layout-container-item col-footer"},[this._t("colFooter")],2),t("div",{staticClass:"table-layout-container-item footer"},[t("div",{staticClass:"footer-item left"},[this._t("footerLeft")],2),t("div",{staticClass:"footer-item right"},[this._t("footerRight")],2)])])}),[],!1,null,null,null).exports,dt=(n("e9c4"),{name:"HeaderRightOptBar",inject:["currentFormId"],components:{BaseIcon:et.a},props:{size:{default:"mini"},enableCreateBtn:{default:!1},element:{type:Object,default:function(){return{}}},editable:{default:!0},printable:{default:!1},platformValue:{default:"pc"}},computed:{edit:function(){return this.editable},printRead:function(){return this.printable},platform:function(){return this.platformValue}},data:function(){return{TABLE_COMP_OPT_VALUE_MAP:tt,currentOptType:null,isConfirmMode:!1,showOptList:!1,moreOptList:[]}},created:function(){this.initMoreOptList()},methods:{initMoreOptList:function(){this.element&&this.element.options&&this.element.options.dataImport&&!this.printRead&&(this.currentFormId&&this.currentFormId.length&&this.moreOptList.push({name:tt.upload.label,value:tt.upload.value}),this.moreOptList.push({name:tt.removeList.label,value:tt.removeList.value})),this.element&&this.element.options&&this.element.options.dataImport&&this.edit&&this.printRead&&this.moreOptList.push({name:tt.download.label,value:tt.download.value})},onMoreOptSelect:function(e){e.value===tt.removeList.value?this.openMode(e.value):this.onOpt(e.value)},openMode:function(e){this.showOptList=!1,this.currentOptType=e,[tt.download.value,tt.removeList.value].indexOf(this.currentOptType)>-1&&(this.isConfirmMode=!0),this.$emit("openMode",e)},onOpt:function(e){this.showOptList=!1,this.$emit("onOpt",e)}},watch:{printRead:{immediate:!0,handler:function(e){}},edit:{immediate:!0,handler:function(e){}}}}),ft=Object(i.a)(dt,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"header-right-opt-bar-container"},[e.isConfirmMode?[n("el-button",{attrs:{size:e.size},on:{click:function(t){return e.onOpt(e.TABLE_COMP_OPT_VALUE_MAP.cancel.value)}}},[e._v(" "+e._s(e.TABLE_COMP_OPT_VALUE_MAP.cancel.label)+" ")]),e.currentOptType===e.TABLE_COMP_OPT_VALUE_MAP.removeList.value?n("el-button",{attrs:{size:e.size,type:"danger",plain:""},on:{click:function(t){return e.onOpt(e.TABLE_COMP_OPT_VALUE_MAP.removeList.value)}}},[n("base-icon",{attrs:{"icon-class":"delete-bin-4-fill"}}),e._v(" 确认删除 ")],1):e._e(),e.currentOptType===e.TABLE_COMP_OPT_VALUE_MAP.download.value?n("el-button",{attrs:{size:e.size,type:"primary",plain:""},on:{click:function(t){return e.onOpt(e.TABLE_COMP_OPT_VALUE_MAP.download.value)}}},[n("base-icon",{attrs:{"icon-class":"delete-bin-4-fill"}}),e._v(" "+e._s("确认"+e.TABLE_COMP_OPT_VALUE_MAP.download.label)+" ")],1):e._e()]:[e.enableCreateBtn&&!e.printRead?n("el-button",{attrs:{type:"primary",size:e.size},on:{click:function(t){return e.onOpt(e.TABLE_COMP_OPT_VALUE_MAP.add.value)}}},[n("base-icon",{attrs:{"icon-class":"add-line"}}),e._v(" "+e._s(e.TABLE_COMP_OPT_VALUE_MAP.add.label)+" ")],1):e._e(),"mobile"===e.platform?[e.edit?[e.printRead?e._e():n("el-button",{attrs:{size:e.size},on:{click:function(t){e.showOptList=!0}}},[n("base-icon",{attrs:{"icon-class":"more-fill"}})],1),e.element&&e.element.options&&e.element.options.enableExport&&e.printRead?n("el-button",{attrs:{type:"primary",size:e.size,disabled:!e.currentFormId||!e.currentFormId.length},on:{click:function(t){return e.onOpt(e.TABLE_COMP_OPT_VALUE_MAP.download.value)}}},[n("base-icon",{attrs:{"icon-class":"upload-2-line"}}),e._v(" "+e._s(e.TABLE_COMP_OPT_VALUE_MAP.download.label)+" ")],1):e._e()]:e._e()]:[e.element&&e.element.options&&e.element.options.dataImport&&!e.printRead?n("el-button",{attrs:{type:"primary",size:e.size,disabled:!e.currentFormId||!e.currentFormId.length},on:{click:function(t){return e.onOpt(e.TABLE_COMP_OPT_VALUE_MAP.upload.value)}}},[n("base-icon",{attrs:{"icon-class":"download-2-line"}}),e._v(" "+e._s(e.TABLE_COMP_OPT_VALUE_MAP.upload.label)+" ")],1):e._e(),e.element&&e.element.options&&e.element.options.enableExport&&e.edit&&e.printRead?n("el-button",{attrs:{type:"primary",size:e.size,disabled:!e.currentFormId||!e.currentFormId.length},on:{click:function(t){return e.onOpt(e.TABLE_COMP_OPT_VALUE_MAP.download.value)}}},[n("base-icon",{attrs:{"icon-class":"upload-2-line"}}),e._v(" "+e._s(e.TABLE_COMP_OPT_VALUE_MAP.download.label)+" ")],1):e._e(),e.element&&e.element.options&&e.element.options.batchDelete&&!e.printRead?n("el-button",{attrs:{size:e.size},on:{click:function(t){return e.openMode(e.TABLE_COMP_OPT_VALUE_MAP.removeList.value)}}},[n("base-icon",{attrs:{"icon-class":"delete-bin-4-fill"}}),e._v(" "+e._s(e.TABLE_COMP_OPT_VALUE_MAP.removeList.label)+" ")],1):e._e()]],!e.printRead&&e.showOptList?n("van-action-sheet",{attrs:{actions:e.moreOptList,"cancel-text":"取消","close-on-click-action":""},on:{cancel:function(t){e.showOptList=!1},select:e.onMoreOptSelect},model:{value:e.showOptList,callback:function(t){e.showOptList=t},expression:"showOptList"}}):e._e()],2)}),[],!1,null,null,null).exports,mt={name:"FooterLeftOptBar",components:{BaseIcon:et.a},props:{size:{default:"small"},enableCreateBtn:{default:!1},enableRemoveBtn:{default:!1},enableCopyBtn:{default:!1},activeRowData:{default:null},element:{type:Object,default:null},platformValue:{default:"pc"}},computed:{activeRow:function(){return this.activeRowData},platform:function(){return this.platformValue}},data:function(){return{TABLE_COMP_OPT_VALUE_MAP:tt}},methods:{onOpt:function(e){this.$emit("onOpt",e,M.a.cloneDeep(this.activeRow))}}},pt=Object(i.a)(mt,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"footer-left-opt-bar-container",class:{mobile:"mobile"===e.platform}},[e.enableCreateBtn?n("el-link",{staticClass:"container-item",attrs:{type:"primary",underline:!1,size:e.size},on:{click:function(t){return e.onOpt(e.TABLE_COMP_OPT_VALUE_MAP.add.value)}}},[n("base-icon",{attrs:{"icon-class":e.TABLE_COMP_OPT_VALUE_MAP.add.icon}}),e._v(" "+e._s(e.TABLE_COMP_OPT_VALUE_MAP.add.label)+" ")],1):e._e(),e.enableRemoveBtn?n("el-link",{staticClass:"container-item",attrs:{underline:!1,size:e.size},on:{click:function(t){return e.onOpt(e.TABLE_COMP_OPT_VALUE_MAP.remove.value)}}},[n("base-icon",{attrs:{"icon-class":e.TABLE_COMP_OPT_VALUE_MAP.remove.icon}}),e._v(" "+e._s(e.TABLE_COMP_OPT_VALUE_MAP.remove.label)+" ")],1):e._e(),e.enableCopyBtn?n("el-link",{staticClass:"container-item",attrs:{underline:!1,size:e.size},on:{click:function(t){return e.onOpt(e.TABLE_COMP_OPT_VALUE_MAP.copy.value)}}},[n("base-icon",{attrs:{"icon-class":e.TABLE_COMP_OPT_VALUE_MAP.copy.icon}}),e._v(" "+e._s(e.TABLE_COMP_OPT_VALUE_MAP.copy.label)+" ")],1):e._e(),e.element&&e.element.options&&e.element.options.rowMove?[n("el-link",{staticClass:"container-item",attrs:{underline:!1,size:e.size,disabled:!e.activeRow},on:{click:function(t){return e.onOpt(e.TABLE_COMP_OPT_VALUE_MAP.moveUp.value)}}},[n("base-icon",{attrs:{"icon-class":e.TABLE_COMP_OPT_VALUE_MAP.moveUp.icon}}),e._v(" "+e._s(e.TABLE_COMP_OPT_VALUE_MAP.moveUp.label)+" ")],1),n("el-link",{staticClass:"container-item",attrs:{underline:!1,size:e.size,disabled:!e.activeRow},on:{click:function(t){return e.onOpt(e.TABLE_COMP_OPT_VALUE_MAP.moveDown.value)}}},[n("base-icon",{attrs:{"icon-class":e.TABLE_COMP_OPT_VALUE_MAP.moveDown.icon}}),e._v(" "+e._s(e.TABLE_COMP_OPT_VALUE_MAP.moveDown.label)+" ")],1)]:e._e()],2)}),[],!1,null,null,null).exports,ht={name:"NoteBar",props:{text:{default:""}}},gt=Object(i.a)(ht,(function(){var e=this.$createElement;return(this._self._c||e)("div",{staticClass:"note-bar-container"},[this._v(this._s(this.text))])}),[],!1,null,null,null).exports,vt={name:"PagingBar",props:["tableDataValue","currentPageValue","pageSize","layout"],computed:{tableData:function(){return this.tableDataValue},currentPage:function(){return this.currentPageValue||1}},methods:{handlePageChange:function(e){this.$emit("handlePageChange",e)}}},bt=Object(i.a)(vt,(function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"paging-bar-container"},[t("el-pagination",{staticClass:"pagination-data",attrs:{background:"","current-page":this.currentPage,"page-size":this.pageSize,"pager-count":5,total:this.tableData.length,layout:this.layout?this.layout:"total, prev, pager, next"},on:{"current-change":this.handlePageChange}})],1)}),[],!1,null,null,null).exports,yt=n("b860"),_t={name:"Table",components:{BaseIcon:et.a,RendererTableItem:ot,DataImport:lt,TableLayout:ut,HeaderRightOptBar:ft,FooterLeftOptBar:pt,NoteBar:gt,PagingBar:bt},inject:["variable","currentFormId","dataId"],props:["columns","value","models","remote","disabledData","rules","name","remoteOptionSource","preview","platform","dataSourceValue","eventFunction","element","printRead","paging","pageSize","edit"],data:function(){return{pagingConfig:yt.a,tableData:this.value,displayFields:{},changeItem:{},pagingData:[],currentPage:1,currentActive:[],displayDataImport:!1,visible:!0,optionLoading:!1,optionLoadFailed:!1,selectedRows:[],isSelectedAll:!1,orderTypes:["input","textarea","number","date"],activeRow:null,tableSelectionMode:!1}},computed:{mode:function(){return"pc"===this.platform?"section"===this.element.options.displayMode?"section":"table":"section"},isNotMaxRow:function(){return!this.element.options.maxLimit||this.tableData&&this.tableData.length<(this.element.options.maxRows||1e3)}},created:function(){for(var e=0;e<this.columns.length;e++)this.displayFields[this.columns[e].model]=!this.columns[e].options.hidden;this.loadPagingData()},mounted:function(){var e=this;this.tableData.forEach((function(t){t._uuid=Object(Ze.a)(),"section"===e.mode&&(t.checked=!1),delete t.SYS_DATA_SORT})),this.visible=!1,this.columns&&this.columns.length&&this.columns.map(function(){var t=Object(g.a)(regeneratorRuntime.mark((function t(n){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n.options.remote!==b.a.DICT_DATA||!n.options.remoteOption||!n.options.remoteOption.remoteDict||"cascader"===n.type){t.next=4;break}return t.next=3,e.handleLoadDictOptions(n);case 3:n=t.sent;case 4:return t.abrupt("return",n);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),this.$nextTick((function(){e.visible=!0}))},methods:{clearActiveRow:function(){this.activeRow=null,this.selectedRows=[],this.$refs.dataTable&&(this.$refs.dataTable.setCurrentRow&&this.$refs.dataTable.setCurrentRow(this.activeRow),this.$refs.dataTable.clearSelection&&this.$refs.dataTable.clearSelection())},handleCurrentChange:function(e){this.activeRow=M.a.cloneDeep(e)},openMode:function(e){var t=this;switch(e){case tt.download.value:case tt.removeList.value:this.visible=!1,this.tableSelectionMode=!0,this.$nextTick((function(){t.visible=!0}))}},onOpt:function(e,t){var n=this;switch(e){case tt.add.value:if(this.element.options.maxLimit&&this.tableData.length>=this.element.options.maxRows)this.$message.error("已达上限,无法继续添加");else{var o=this.activeRow?this.tableData.findIndex((function(e){return e._uuid===n.activeRow._uuid})):void 0;this.activeRow&&void 0!==o?this.handleAddRow(o,this.activeRow):this.handleAddRow()}break;case tt.moveUp.value:this.rowMove(t._uuid,"up");break;case tt.moveDown.value:this.rowMove(t._uuid,"down");break;case tt.upload.value:this.displayDataImport=!0;break;case tt.download.value:this.exportData();break;case tt.remove.value:var r=M.a.cloneDeep(this.paging?this.pagingData:this.tableData).findIndex((function(e){return e._uuid===t._uuid}));this.handleRemove(r);break;case tt.removeList.value:this.batchDelete();break;case tt.copy.value:this.handleCopy(t);break;case tt.cancel.value:this.visible=!1,this.resetConfirmMode()}},exportData:function(){var e=this;return Object(g.a)(regeneratorRuntime.mark((function t(){var n,o,r,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(D.c)({formId:e.currentFormId,dataIds:[e.dataId],current:1,size:9999999,orderBy:null,data:[],exportColumns:[e.name]});case 3:n=t.sent,"application/json"===(n&&n.headers&&n.headers["content-type"])?e.$message.error("导出失败"):(o=new Blob([n.data],{type:"application/vnd.ms-excel"}),r=document.createElement("a"),i=URL.createObjectURL(o),r.href=i,r.download="".concat(e.element.name,"_").concat(e.name,"_").concat(re()().format("YYYY_MM_DD_HH_mm_ss"),".xlsx"),document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(i)),t.next=12;break;case 8:t.prev=8,t.t0=t.catch(0),e.$message.error("导出失败:".concat(t.t0.message||t.t0));case 12:case"end":return t.stop()}}),t,null,[[0,8]])})))()},resetConfirmMode:function(){var e=this;this.isSelectedAll=!1,this.selectedAll(!1),this.$refs.headerRightOptBar&&(this.$set(this.$refs.headerRightOptBar,"currentOptType",null),this.$set(this.$refs.headerRightOptBar,"isConfirmMode",!1)),this.tableSelectionMode=!1,this.$nextTick((function(){e.visible=!0}))},selectedAll:function(e){this.selectedRows=e?M.a.cloneDeep(this.paging?this.pagingData:this.tableData):[],(this.paging?this.pagingData:this.tableData).forEach((function(t){t.checked=e}))},handleCardSelectionChange:function(e,t){e?this.selectedRows.push(t):this.selectedRows=this.selectedRows.filter((function(e){return e._uuid!==t._uuid}))},rowMove:function(e,t){this.activeRow=null;var n=this.tableData.findIndex((function(t){return t._uuid===e}));if("up"===t){var o=this.tableData[n-1];o&&(this.tableData.splice(n-1,1),this.tableData.splice(n,0,o)),this.handleCurrentChange(this.tableData[o?n-1:0])}else{var r=this.tableData[n+1];r&&(this.tableData.splice(n+1,1),this.tableData.splice(n,0,r)),this.handleCurrentChange(this.tableData[r?n+1:n])}this.tableData.forEach((function(e,t){e.SYS_DATA_SORT=t})),this.loadPagingData()},batchDelete:function(){var e=this;this.selectedRows.length?this.$confirm("是否确认批量删除选中数据?","提示",{confirmButtonText:"确认"}).then((function(){e.visible=!1,e.handleCurrentChange(null),e.selectedRows.length&&e.selectedRows.forEach((function(t){var n=e.tableData.findIndex((function(e){return e._uuid===t._uuid}));e.tableData.splice(n,1)})),e.paging&&(e.currentPage=1,e.loadPagingData(),e.selectedRows=[]),e.resetConfirmMode(),e.isSelectedAll=!1})).catch((function(){})):this.$message.warning("请选择需要删除的数据")},handleSelectionChange:function(e){this.selectedRows=e},handleLoadDictOptions:function(e){var t=this;return Object(g.a)(regeneratorRuntime.mark((function n(){var o,r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(t.optionLoading=!0,t.optionLoadFailed=!1,o={},"dict"!==(r=e.options.remoteOption.remoteDict).dictDataType){n.next=10;break}return n.next=7,Object(y.a)(t,{dictId:r.dictId,parentId:"#"});case 7:o=n.sent,n.next=14;break;case 10:if("dictItem"!==r.dictDataType){n.next=14;break}return n.next=13,Object(y.a)(t,{dictId:r.dictId,parentId:r.dictOptionId});case 13:o=n.sent;case 14:return o.data?e.options.remoteOptions=o.data:t.optionLoadFailed=!0,t.optionLoading=!1,n.abrupt("return",e);case 17:case"end":return n.stop()}}),n)})))()},onDataImportComplete:function(e){var t=this;if(this.displayDataImport=!1,this.visible=!1,e.data&&e.data.dataList)if(this.element.options.maxLimit)if(this.tableData.length>=this.element.options.maxRows)this.$message.error("已超出最大数据限制,无法继续导入数据");else{var n=this.element.options.maxRows-this.tableData.length;n>=0?(this.models[this.element.model]=[].concat(Object(Qe.a)(e.data.dataList.slice(0,n).map((function(e){return Object(h.a)(Object(h.a)({},e),{},{_uuid:Object(Ze.a)()})}))),Object(Qe.a)(this.tableData)),n<e.data.dataList.length&&this.$message.info("最大数据上限为".concat(this.element.options.maxRows,"条,本次有效导入数据").concat(n,"条"))):this.$message.error("当前数据已超出最大数据量,无法继续导入")}else this.models[this.element.model]=[].concat(Object(Qe.a)(e.data.dataList),Object(Qe.a)(this.tableData));this.loadPagingData(),this.$nextTick((function(){t.visible=!0}))},handleAddRow:function(e,t,n){var o=this,r={};if(n)r=M.a.cloneDeep(t);else for(var i=0;i<this.columns.length;i++)if(this.columns[i].options.isVariableDefaultValue){var a="未初始化变量数据";this.variable&&(a=this.variable[this.columns[i].options.defaultVariable]||""),r[this.columns[i].model]=a}else r[this.columns[i].model]=this.columns[i].options.defaultValue;if(r._uuid=Object(Ze.a)(),t?this.tableData.splice(e+1,0,M.a.cloneDeep(r)):this.tableData.push(M.a.cloneDeep(r)),this.element&&this.element.events&&this.element.events.onRowAdd){var s=this.element.events.onRowAdd;this.eventFunction[s]&&this.eventFunction[s]({rowIndex:this.tableData.length-1,field:this.element.model})}this.changeItem={},this.paging&&this.$nextTick((function(){o.tableData.length>o.currentPage*o.pageSize&&!t&&(o.currentPage=parseInt((o.tableData.length-1)/o.pageSize)+1),o.loadPagingData()}));try{this.currentActive.push((this.paging?this.pageSize*(this.currentPage-1):0)+(this.tableData.length-1))}catch(e){}},handleCopy:function(e){if(this.element.options.maxLimit&&this.tableData.length>=this.element.options.maxRows)this.$message.error("已达上限,无法复制");else{var t=this.tableData.findIndex((function(t){return e._uuid===t._uuid}));t>-1&&this.handleAddRow(t,e,!0)}},handleRemove:function(e){var t=this;this.$confirm("是否删除该行数据?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var n=t.tableData[e];if(t.activeRow&&t.activeRow._uuid===n._uuid&&t.handleCurrentChange(e-1>0?t.tableData[e-1]:null),t.tableData.splice(e,1),t.element&&t.element.events&&t.element.events.onRowRemove){var o=t.element.events.onRowRemove;t.eventFunction[o]&&t.eventFunction[o]({removeIndex:e,field:t.element.model})}t.changeItem={},t.pagingData=[],t.paging&&t.$nextTick((function(){t.tableData.length%t.pageSize==0&&t.currentPage>parseInt(t.tableData.length/t.pageSize)&&(t.currentPage=parseInt(t.tableData.length/t.pageSize)),t.loadPagingData()}))})).catch((function(){}))},hide:function(e){var t=this;Object.keys(this.displayFields).forEach((function(n){e.indexOf(n)>=0&&t.$set(t.displayFields,n,!1)})),this.displayFields=Object(h.a)({},this.displayFields)},display:function(e){var t=this;Object.keys(this.displayFields).forEach((function(n){e.indexOf(n)>=0&&t.$set(t.displayFields,n,!0)})),this.displayFields=Object(h.a)({},this.displayFields)},disabled:function(e,t){for(var n=0;n<this.columns.length;n++)e.indexOf(this.columns[n].model)>=0&&this.$set(this.columns[n].options,"disabled",t)},setDisabled:function(e,t){for(var n=0;n<this.columns.length;n++)e.indexOf(this.columns[n].model)>=0&&this.$set(this.columns[n].options,"disabled",t)},setReadOnly:function(e,t){for(var n=0;n<this.columns.length;n++)e.indexOf(this.columns[n].model)>=0&&this.$set(this.columns[n].options,"readonly",t)},sortChange:function(e){if(this.paging){var t="descending"===e.order?"desc":"asc";this.tableData=M.a.orderBy(this.tableData,[e.prop],[t])}},handleTableChange:function(e){this.changeItem=e},handlePageChange:function(e){var t=this;"section"===this.mode&&(this.selectedRows=[],(this.paging?this.pagingData:this.tableData).forEach((function(e){e.checked=!1})),this.isSelectedAll=!1),this.currentPage=e,this.pagingData=[],this.$nextTick((function(){t.loadPagingData(),t.$refs[t.name+"-item"].forEach((function(e){e.clearValidate()}))}))},loadPagingData:function(){var e=(this.currentPage-1)*this.pageSize,t=e+this.pageSize;this.pagingData=this.tableData.slice(e,t)}},watch:{value:function(e){Array.isArray(e)?this.tableData=e:(this.tableData=[],Function("console.error('子表单:请设置正确Array格式的数据,当前为".concat(e,"');"))())},tableData:{deep:!0,immediate:!0,handler:function(){this.loadPagingData(),this.changeItem.haveEvent&&this.eventFunction[this.changeItem.haveEvent](this.changeItem)}},printRead:{immediate:!0,handler:function(e){this.clearActiveRow(),this.onOpt(tt.cancel.value),e&&!this.edit&&(this.$set(this.element.options,"paging",!1),this.currentActive=this.tableData.map((function(e,t){return t})))}},edit:{handler:function(){this.clearActiveRow(),this.onOpt(tt.cancel.value)}}}},wt={name:"renderer-table",extends:T,components:{GenerateTable:Object(i.a)(_t,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{directives:[{name:"loading",rawName:"v-loading",value:e.optionLoading,expression:"optionLoading"}],staticClass:"renderer-table",class:{"is-disabled":e.disabledData}},["mobile"===e.platform?[n("table-layout",{scopedSlots:e._u([e.edit&&!e.element.options.disabled?{key:"absoluteHeader",fn:function(){return[n("header-right-opt-bar",{ref:"headerRightOptBar",attrs:{element:e.element,editable:e.edit,printable:e.printRead,"enable-create-btn":!0,"platform-value":e.platform},on:{openMode:e.openMode,onOpt:e.onOpt}})]},proxy:!0}:null,e.edit&&!e.element.options.disabled?{key:"headerLeft",fn:function(){return[e.tableSelectionMode?n("el-checkbox",{ref:"selectedAllBtn",staticClass:"select-all-btn header-sub-item",attrs:{size:"mini"},on:{change:e.selectedAll},model:{value:e.isSelectedAll,callback:function(t){e.isSelectedAll=t},expression:"isSelectedAll"}},[e._v(" 全选 ")]):e._e()]},proxy:!0}:null,{key:"body",fn:function(){return[n("el-collapse",{staticClass:"renderer-table-mobile",class:{mobile:"mobile"===e.platform},model:{value:e.currentActive,callback:function(t){e.currentActive=t},expression:"currentActive"}},e._l(e.paging?e.pagingData:e.tableData,(function(t,o){return n("el-collapse-item",{key:(e.paging?e.pageSize*(e.currentPage-1):0)+o,staticClass:"renderer-table-mobile-item",attrs:{name:(e.paging?e.pageSize*(e.currentPage-1):0)+o}},[n("div",{staticClass:"renderer-table-mobile-item-top",attrs:{slot:"title"},slot:"title"},[e.tableSelectionMode?n("el-checkbox",{staticClass:"renderer-table-mobile-checkbox",on:{change:function(n){return e.handleCardSelectionChange(n,t)}},model:{value:t.checked,callback:function(n){e.$set(t,"checked",n)},expression:"t.checked"}}):e._e(),e.element.options.enableDynamicTableTitle&&e.element.options.relatedField?n("span",{staticClass:"renderer-table-mobile-title"},[e._v(" "+e._s(e.tableData[(e.paging?e.pageSize*(e.currentPage-1):0)+o][e.element.options.relatedField])+" ")]):n("span",{staticClass:"renderer-table-mobile-title"},[e._v(" "+e._s((e.paging?e.pageSize*(e.currentPage-1):0)+o+1)+" ")])],1),n("div",{staticClass:"renderer-table-mobile-item-content"},e._l(e.columns,(function(t){return n("el-form-item",{key:t.key,ref:e.name+"-item",refInFor:!0,attrs:{label:t.options.hideLabel?"":t.name,"label-width":t.options.hideLabel?"0px":t.options.isLabelWidth?t.options.labelWidth+"px":"",prop:e.name+"."+((e.paging?e.pageSize*(e.currentPage-1):0)+o)+"."+t.model,rules:e.rules[e.name+"."+t.model]}},[e.displayFields[t.model]?n("renderer-table-item",{attrs:{"data-source-value":e.dataSourceValue,edit:!e.disabledData,"event-function":e.eventFunction,"is-in-table":!0,"is-table":!0,models:e.tableData[(e.paging?e.pageSize*(e.currentPage-1):0)+o],platform:e.platform,"print-read":e.printRead||t.options.readonly,remote:e.remote,"remote-option-source":e.remoteOptionSource,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+o,"table-name":e.name,element:t,"scope-row-data":e.tableData[(e.paging?e.pageSize*(e.currentPage-1):0)+o]},on:{"on-table-change":e.handleTableChange},model:{value:e.tableData[(e.paging?e.pageSize*(e.currentPage-1):0)+o][t.model],callback:function(n){e.$set(e.tableData[(e.paging?e.pageSize*(e.currentPage-1):0)+o],t.model,n)},expression:"tableData[(paging ? pageSize * (currentPage - 1) : 0) + index][column.model]"}}):e._e()],1)})),1),e.printRead||!e.edit||e.element.options.disabled?e._e():n("div",{staticClass:"renderer-table-mobile-item-footer"},[n("footer-left-opt-bar",{attrs:{element:e.element,"enable-copy-btn":!0,"enable-remove-btn":!0,"active-row-data":t,"platform-value":e.platform},on:{onOpt:e.onOpt}})],1)])})),1)]},proxy:!0},{key:"colFooter",fn:function(){return[e.element.options.maxLimit&&!e.printRead&&e.edit&&!e.element.options.disabled?n("note-bar",{staticClass:"col-footer-item",attrs:{text:"最多可填写 "+e.element.options.maxRows+" 条数据,当前已填写 "+(e.tableData&&e.tableData.length)+" 条"}}):e._e(),e.paging&&e.edit&&!e.element.options.disabled?n("paging-bar",{staticClass:"col-footer-item",attrs:{paging:e.paging,"page-size":e.pageSize,"table-data-value":e.tableData,layout:e.pagingConfig.pageMobileLayout,"current-page-value":e.currentPage},on:{handlePageChange:e.handlePageChange}}):e._e()]},proxy:!0}],null,!0)})]:["table"===e.mode?[n("table-layout",{scopedSlots:e._u([e.edit&&!e.element.options.disabled?{key:"headerLeft",fn:function(){return[e.currentFormId&&e.currentFormId.length?e._e():n("el-tag",{attrs:{size:"small",type:"warning"}},[e._v("预览状态暂不支持导入、导出功能")])]},proxy:!0}:null,e.edit&&!e.element.options.disabled?{key:"headerRight",fn:function(){return[n("header-right-opt-bar",{ref:"headerRightOptBar",attrs:{element:e.element,editable:e.edit,printable:e.printRead},on:{openMode:e.openMode,onOpt:e.onOpt}})]},proxy:!0}:null,{key:"body",fn:function(){return[e.visible?n("el-table",{ref:"dataTable",staticClass:"renderer-table-pc",attrs:{data:e.edit?e.paging?e.pagingData:e.tableData:e.printRead?e.tableData:e.paging?e.pagingData:e.tableData,border:"",size:"small",stripe:e.edit&&!e.printRead,"highlight-current-row":""},on:{"current-change":e.handleCurrentChange,"sort-change":e.sortChange,"selection-change":e.handleSelectionChange}},[!e.printRead&&e.tableSelectionMode?n("el-table-column",{attrs:{type:"selection",align:"center",width:"80"}}):e._e(),e.tableSelectionMode?e._e():n("el-table-column",{attrs:{"header-align":"center",align:"center",fixed:"",label:"序号",width:"80"},scopedSlots:e._u([{key:"default",fn:function(t){return[e.edit&&!e.element.options.disabled?[n("div",{staticClass:"scope-index"},[n("span",[e._v(e._s((e.paging?e.pageSize*(e.currentPage-1):0)+t.$index+1))])]),n("div",{staticClass:"scope-action"},[e.printRead?e._e():n("el-button",{staticClass:"renderer-table-delete",attrs:{disabled:e.disabledData,size:"small",type:"text"},on:{click:function(n){e.handleRemove((e.paging?e.pageSize*(e.currentPage-1):0)+t.$index)}}},[n("base-icon",{attrs:{"icon-class":"delete-bin-4-fill"}})],1),e.printRead?e._e():n("el-button",{staticClass:"renderer-table-row-add",attrs:{disabled:e.disabledData,size:"small",type:"text"},on:{click:function(n){return e.handleCopy(t.row)}}},[n("base-icon",{attrs:{"icon-class":"file-copy-fill"}})],1),e.printRead?n("span",[e._v(e._s((e.paging?e.pageSize*(e.currentPage-1):0)+t.$index+1))]):e._e()],1)]:[n("span",[e._v(e._s((e.paging?e.pageSize*(e.currentPage-1):0)+t.$index+1))])]]}}],null,!1,2334635528)}),0===e.columns.length?n("el-table-column"):e._l(e.columns,(function(t){return n("el-table-column",{key:t.key,attrs:{prop:t.model,sortable:(e.printRead||!e.edit)&&e.orderTypes.includes(t.type),"sort-orders":["ascending","descending"],"header-align":"center",label:t.options.hideLabel?"":t.name,align:"number"===t.type?"right":"center","label-class-name":t.options.required?"required":"","min-width":t.options.isWidgetWidth?2*t.options.width+"px":"200px"},scopedSlots:e._u([{key:"default",fn:function(o){return[e.displayFields[t.model]?n("el-form-item",{ref:e.name+"-item",refInFor:!0,attrs:{prop:e.name+"."+((e.paging?e.pageSize*(e.currentPage-1):0)+o.$index)+"."+t.model,rules:e.rules[e.name+"."+t.model]}},[n("renderer-table-item",{attrs:{"data-source-value":e.dataSourceValue,edit:!e.disabledData,"event-function":e.eventFunction,"is-in-table":!0,"is-table":!0,models:e.tableData[(e.paging?e.pageSize*(e.currentPage-1):0)+o.$index],platform:e.platform,"print-read":e.printRead||t.options.readonly,remote:e.remote,"remote-option-source":e.remoteOptionSource,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+o.$index,"table-name":e.name,element:t,"scope-row-data":o.row},on:{"on-table-change":e.handleTableChange},model:{value:o.row[t.model],callback:function(n){e.$set(o.row,t.model,n)},expression:"scope.row[column.model]"}})],1):e._e()]}}],null,!0)})}))],2):e._e()]},proxy:!0},!e.edit||e.printRead||e.element.options.disabled?null:{key:"footerLeft",fn:function(){return[n("footer-left-opt-bar",{attrs:{element:e.element,"enable-create-btn":!0,"active-row-data":e.activeRow},on:{onOpt:e.onOpt}})]},proxy:!0},{key:"footerRight",fn:function(){return[!e.element.options.maxLimit||e.printRead||e.element.options.disabled?e._e():n("note-bar",{attrs:{text:"最多可填写 "+e.element.options.maxRows+" 条数据,当前已填写 "+(e.tableData&&e.tableData.length)+" 条"}}),e.paging&&e.edit?n("paging-bar",{attrs:{paging:e.paging,"page-size":e.pageSize,"table-data-value":e.tableData,"current-page-value":e.currentPage},on:{handlePageChange:e.handlePageChange}}):e._e()]},proxy:!0}],null,!0)})]:[n("table-layout",{scopedSlots:e._u([e.element.options.disabled?null:{key:"headerLeft",fn:function(){return[e.tableSelectionMode?n("el-checkbox",{ref:"selectedAllBtn",staticClass:"select-all-btn header-sub-item",attrs:{size:"mini"},on:{change:e.selectedAll},model:{value:e.isSelectedAll,callback:function(t){e.isSelectedAll=t},expression:"isSelectedAll"}},[e._v(" 全选 ")]):e._e(),e.currentFormId&&e.currentFormId.length?e._e():n("el-tag",{staticClass:"header-sub-item",attrs:{size:"small",type:"warning"}},[e._v("预览状态暂不支持导入、导出功能")])]},proxy:!0},e.element.options.disabled?null:{key:"headerRight",fn:function(){return[n("header-right-opt-bar",{ref:"headerRightOptBar",attrs:{element:e.element,editable:e.edit,printable:e.printRead,"enable-create-btn":!0},on:{openMode:e.openMode,onOpt:e.onOpt}})]},proxy:!0},{key:"body",fn:function(){return[n("el-collapse",{staticClass:"renderer-table-mobile",model:{value:e.currentActive,callback:function(t){e.currentActive=t},expression:"currentActive"}},e._l(e.paging?e.pagingData:e.tableData,(function(t,o){return n("el-collapse-item",{key:(e.paging?e.pageSize*(e.currentPage-1):0)+o,staticClass:"renderer-table-mobile-item",attrs:{name:(e.paging?e.pageSize*(e.currentPage-1):0)+o}},[n("div",{staticClass:"renderer-table-mobile-item-top",attrs:{slot:"title"},slot:"title"},[e.tableSelectionMode?n("el-checkbox",{staticClass:"renderer-table-mobile-checkbox",on:{change:function(n){return e.handleCardSelectionChange(n,t)}},model:{value:t.checked,callback:function(n){e.$set(t,"checked",n)},expression:"t.checked"}}):e._e(),e.element.options.enableDynamicTableTitle&&e.element.options.relatedField?n("span",{staticClass:"renderer-table-mobile-title"},[e._v(" "+e._s(e.tableData[(e.paging?e.pageSize*(e.currentPage-1):0)+o][e.element.options.relatedField])+" ")]):n("span",{staticClass:"renderer-table-mobile-title"},[e._v(" "+e._s((e.paging?e.pageSize*(e.currentPage-1):0)+o+1)+" ")])],1),n("div",{staticClass:"renderer-table-mobile-item-content"},e._l(e.columns,(function(t){return n("el-form-item",{key:t.key,ref:e.name+"-item",refInFor:!0,attrs:{label:t.options.hideLabel?"":t.name,"label-width":t.options.hideLabel?"0px":t.options.isLabelWidth?t.options.labelWidth+"px":"",prop:e.name+"."+((e.paging?e.pageSize*(e.currentPage-1):0)+o)+"."+t.model,rules:e.rules[e.name+"."+t.model]}},[e.displayFields[t.model]?n("renderer-table-item",{attrs:{"data-source-value":e.dataSourceValue,edit:!e.disabledData,"event-function":e.eventFunction,"is-in-table":!0,"is-table":!0,models:e.tableData[(e.paging?e.pageSize*(e.currentPage-1):0)+o],platform:e.platform,"print-read":e.printRead||t.options.readonly,remote:e.remote,"remote-option-source":e.remoteOptionSource,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+o,"table-name":e.name,element:t,"scope-row-data":e.tableData[(e.paging?e.pageSize*(e.currentPage-1):0)+o]},on:{"on-table-change":e.handleTableChange},model:{value:e.tableData[(e.paging?e.pageSize*(e.currentPage-1):0)+o][t.model],callback:function(n){e.$set(e.tableData[(e.paging?e.pageSize*(e.currentPage-1):0)+o],t.model,n)},expression:"tableData[(paging ? pageSize * (currentPage - 1) : 0) + index][column.model]"}}):e._e()],1)})),1),e.printRead||!e.edit||e.element.options.disabled?e._e():n("div",{staticClass:"renderer-table-mobile-item-footer"},[n("footer-left-opt-bar",{attrs:{element:e.element,"enable-copy-btn":!0,"enable-remove-btn":!0,"active-row-data":t},on:{onOpt:e.onOpt}})],1)])})),1)]},proxy:!0},e.element.options.maxLimit&&!e.printRead?{key:"footerLeft",fn:function(){return[n("note-bar",{attrs:{text:"最多可填写 "+e.element.options.maxRows+" 条数据,当前已填写 "+(e.tableData&&e.tableData.length)+" 条"}})]},proxy:!0}:null,e.paging&&e.edit?{key:"footerRight",fn:function(){return[n("paging-bar",{attrs:{paging:e.paging,"page-size":e.pageSize,"table-data-value":e.tableData,"current-page-value":e.currentPage},on:{handlePageChange:e.handlePageChange}})]},proxy:!0}:null],null,!0)})]],e.displayDataImport?n("data-import",{attrs:{"widget-key":e.element.key,"widget-name":e.element.name},on:{onClose:function(t){e.displayDataImport=!1},onComplete:e.onDataImportComplete},model:{value:e.displayDataImport,callback:function(t){e.displayDataImport=t},expression:"displayDataImport"}}):e._e()],2)}),[],!1,null,null,null).exports}},xt=Object(i.a)(wt,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("generate-table",{ref:"icd-form-"+e.element.model,attrs:{columns:e.element.children,"data-source-value":e.dataSourceValue,"disabled-data":e.disabled,"event-function":e.eventFunction,models:e.dataModels,name:e.element.model,"page-size":e.element.options.pageSize,paging:e.element.options.paging,platform:e.platform,preview:e.preview,"print-read":e.printRead,remote:e.remote,"remote-option-source":e.remoteOptionSource,rules:e.rules,value:e.dataModel,element:e.element,widget:e.element,edit:e.edit}})}),[],!1,null,null,null).exports,Ct={name:"renderer-qrCode",extends:T,components:{QrCodeComponent:n("bfce").a}},Ot=Object(i.a)(Ct,(function(){var e=this.$createElement;return(this._self._c||e)("qr-code-component",{ref:"icd-form-"+this.element.model,attrs:{options:this.element.options,"data-models":this.dataModels}})}),[],!1,null,null,null).exports,St=n("7b30"),kt={name:"renderer-button",extends:T,components:{TextComponent:St.a},methods:{handleOnClick:function(){if(this.element.events&&this.element.events.onClick){var e=this.element.events.onClick;this.eventFunction[e]&&this.eventFunction[e]({field:this.element.model})}}}},Et=Object(i.a)(kt,(function(){var e,t=this,n=t.$createElement,o=t._self._c||n;return o("text-component",{attrs:{align:t.element.options.contentPosition}},[t.element.options.showInPrintRead||!t.printRead?o("el-button",{ref:"icd-form-"+t.element.model,class:(e={},e[t.element.options&&t.element.options.customClass]=t.element.options&&t.element.options.customClass,e),style:t.element.options.customWidth?{width:t.element.options.width+"%"}:"",attrs:{circle:t.element.options.buttonCircle,disabled:!t.edit||t.element.options.disabled,plain:t.element.options.buttonPlain,round:t.element.options.buttonRound,size:t.element.options.buttonSize,type:t.element.options.buttonType},on:{click:t.handleOnClick}},[t._v(" "+t._s(t.element.options.buttonName)+" ")]):t._e()],1)}),[],!1,null,null,null).exports,Tt={name:"renderer-divider",extends:T},Dt=Object(i.a)(Tt,(function(){var e,t=this,n=t.$createElement,o=t._self._c||n;return o("div",{class:(e={},e[t.element.options&&t.element.options.customClass]=t.element.options&&t.element.options.customClass,e),style:{paddingTop:t.element.options.paddingTop+"px",paddingBottom:t.element.options.paddingBottom+"px"}},[o("el-divider",{ref:"icd-form-"+t.element.model,attrs:{"content-position":t.element.options.contentPosition}},[t._v(" "+t._s(t.element.options.text)+" ")])],1)}),[],!1,null,null,null).exports,At={name:"renderer-iframe",extends:T},Mt=Object(i.a)(At,(function(){var e,t=this,n=t.$createElement,o=t._self._c||n;return t.element.options.href?o("iframe",{ref:"icd-form-"+t.element.model,staticClass:"iss-iframe",class:(e={},e[t.element.options&&t.element.options.customClass]=t.element.options&&t.element.options.customClass,e),style:{width:t.element.options.width+"%",height:t.element.options.height+"px"},attrs:{src:t.element.options.href}}):o("div",{staticClass:"iss-image-load-failed",style:{width:t.element.options.width+"%",height:t.element.options.height+"px"}},[o("div",{staticClass:"iss-empty-image"}),o("span",[t._v("请配置网页URL地址")])])}),[],!1,null,null,null).exports,Rt={name:"renderer-image",extends:T,methods:{handleOnClick:function(){if(this.element.events&&this.element.events.onClick){var e=this.element.events.onClick;this.eventFunction[e]&&this.eventFunction[e]({field:this.element.model})}}}},Pt=Object(i.a)(Rt,(function(){var e,t=this,n=t.$createElement,o=t._self._c||n;return o("el-image",{ref:"icd-form-"+t.element.model,class:(e={},e[t.element.options&&t.element.options.customClass]=t.element.options&&t.element.options.customClass,e),style:{width:t.element.options.width+"%",height:t.element.options.autoHeight?"auto":t.element.options.height+"px"},attrs:{alt:t.element.name,fit:t.element.options.autoHeight?"fill":t.element.options.fit,src:t.element.options.src},nativeOn:{click:function(e){return t.handleOnClick.apply(null,arguments)}}},[o("div",{staticClass:"iss-image-load-failed",attrs:{slot:"error"},slot:"error"},[o("div",{staticClass:"iss-empty-image"}),t.element.options.src?o("span",[t._v("图片加载失败,请配置正确的图片链接地址或上传图片")]):o("span",[t._v("请上传图片或配置图片链接地址")])])])}),[],!1,null,null,null).exports,It={name:"renderer-link",extends:T,components:{TextComponent:St.a},methods:{handleOnClick:function(){if(this.element.events&&this.element.events.onClick){var e=this.element.events.onClick;this.eventFunction[e]&&this.eventFunction[e]({field:this.element.model})}}}},Lt=Object(i.a)(It,(function(){var e,t=this,n=t.$createElement,o=t._self._c||n;return o("text-component",{attrs:{align:t.element.options.contentPosition}},[o("el-link",{ref:"icd-form-"+t.element.model,class:(e={},e[t.element.options&&t.element.options.customClass]=t.element.options&&t.element.options.customClass,e),attrs:{disabled:t.element.options.disabled,href:t.element.options.href,type:t.element.options.linkType,underline:t.element.options.underline,target:"_blank"},on:{click:t.handleOnClick}},[t._v(" "+t._s(t.element.options.text)+" ")])],1)}),[],!1,null,null,null).exports,jt={name:"renderer-text",extends:T,components:{TextComponent:St.a}},zt={input:j,textarea:N,number:U,radio:G,checkbox:Q,time:ne,date:fe,rate:ge,select:xe,switches:ke,slider:Ae,editor:Re,member:je,organization:Ie,cascader:Be,upload:Ve,imageUpload:$e,uuid:We,sequence:Ke,address:Ye,relatedForm:Je,table:xt,qrCode:Ot,button:Et,divider:Dt,iframe:Mt,image:Pt,link:Lt,text:Object(i.a)(jt,(function(){var e,t=this,n=t.$createElement;return(t._self._c||n)("text-component",{ref:"icd-form-"+t.element.model,class:(e={},e[t.element.options&&t.element.options.customClass]=t.element.options&&t.element.options.customClass,e),attrs:{align:t.element.options.contentPosition,"font-color":t.element.options.fontColor,"font-family":t.element.options.fontFamily,"font-size":t.element.options.fontSize,"font-style":t.element.options.fontStyle,"font-weight":t.element.options.fontWeight,"margin-bottom":t.element.options.marginBottom,"margin-top":t.element.options.marginTop}},[t._v(" "+t._s(t.element.options.text)+" ")])}),[],!1,null,null,null).exports},Ft=n("0f01"),Bt=n("522e"),Nt={name:"BaseElementItem",props:["element","models","rules","remote","edit","remoteOptionSource","platform","preview","containerKey","dataSourceValue","eventFunction","printRead","displayFields"],computed:{isContainer:function(){return Bt.a[this.element.type]&&Bt.a[this.element.type].isContainer&&"table"!==this.element.type},pluginLabelWidth:function(){return this.element.options.hideLabel?"0px":this.element.options.isLabelWidth?this.element.options.labelWidth+"px":""},conponentShow:function(){return!this.printRead||"button"!==this.element.type&&"inline"!==this.element.type}},data:function(){return{Containers:p,RenderElements:zt,dataModel:this.models[this.element.model],dataModels:this.models,componentConfig:Bt.a}},watch:{dataModel:{deep:!0,handler:function(e){if(Ft.a.$emit("on-change-"+this.containerKey,e,this.element.model,this.containerKey),this.element.events&&this.element.events.onChange){var t=this.element.events.onChange;this.eventFunction[t]&&this.eventFunction[t]({value:e,field:this.element.model})}}},models:{deep:!0,handler:function(e){this.dataModels=e,this.dataModel=e[this.element.model]}}}},Vt=Object(i.a)(Nt,(function(){var e,t=this,n=t.$createElement,o=t._self._c||n;return t.element.key&&t.displayFields[t.element.model]?o("div",{staticClass:"iss-form-renderer-form-item",attrs:{"data-id":t.element.model}},[t.isContainer?o(t.Containers[t.element.type],{key:t.element.key,tag:"component",attrs:{id:t.element.model,"container-key":t.containerKey,"data-source-value":t.dataSourceValue,"display-fields":t.displayFields,edit:t.edit,element:t.element,"event-function":t.eventFunction,models:t.dataModels,platform:t.platform,preview:t.preview,"print-read":t.printRead,remote:t.remote,"remote-option-source":t.remoteOptionSource,rules:t.rules}}):t.conponentShow?o("el-form-item",{staticClass:"renderer-form-item",class:(e={},e[t.element.options&&t.element.options.customClass]=t.element.options&&t.element.options.customClass,e["no-label-form-item"]=t.element.options.isLabelWidth&&0===t.element.options.labelWidth,e["print-read-mode"]=t.printRead,e["no-form-label"]=!t.element.options.labelWidth,e),attrs:{label:t.element.options.hideLabel||!t.element.options.labelWidth?"":t.element.name,"label-width":t.pluginLabelWidth,prop:t.element.model,required:t.element.options.required,"status-icon":!0}},[o(t.RenderElements[t.element.type],{tag:"component",attrs:{"data-source-value":t.dataSourceValue,models:t.dataModels,element:t.element,platform:t.platform,"is-table":!1,"event-function":t.eventFunction,preview:t.preview,"print-read":t.printRead||t.element.options.readonly,edit:t.edit,remote:t.remote,"remote-option-source":t.remoteOptionSource,rules:t.rules},model:{value:t.dataModel,callback:function(e){t.dataModel=e},expression:"dataModel"}})],1):t._e()],1):t._e()}),[],!1,null,null,null);t.default=Vt.exports},7193:function(e,t,n){n("ae68")},"71f6":function(e,t,n){"use strict";n.r(t);n("ac1f"),n("00b4"),n("a434"),n("e260"),n("d3b7"),n("e6cf"),n("3ca3"),n("ddb0");var o=n("b76a"),r=n.n(o),i=n("2909"),a=n("5530"),s=n("0f01"),l=n("e42e"),c=n("f859"),u=n("4260"),d=n("1503"),f=n("60bb"),m=n.n(f),p={data:function(){return{selectWidget:this.select||{}}},methods:{handlePut:function(e,t,n){return Object(l.a)(n.getAttribute("type"),this.currentType)},handlePluginUpdate:function(){var e=this;this.$nextTick((function(){s.a.$emit("on-history-add-"+e.formKey)}))},handlePluginAdd:function(e,t,n){var o=this,r=e.newIndex,l=[];switch(this.element.type){case d.a.LAYOUT_CARD:case d.a.LAYOUT_INLINE:l=this.element.children,Object(u.b)(l,r);break;case d.a.LAYOUT_GRID:case d.a.LAYOUT_TAB:case d.a.LAYOUT_COLLAPSE:l=this.element.children[t].children,Object(u.b)(l,r);break;case d.a.LAYOUT_REPORT:l=this.element.children[n].children[t].children,Object(u.b)(l,r);break;default:l=this.element}this.$set(l,r,m.a.cloneDeep(l[r]));var f=Object(c.a)(),p=l[r],h=Object(a.a)(Object(a.a)({},p),{},{options:Object(a.a)(Object(a.a)({},p.options),{},{remoteFunc:p.options.remoteFunc||"func_"+f,remoteOptionSource:p.options.remoteOptionSource||"option_"+f,tableColumn:!1}),key:p.key||f,model:p.model||p.type+"_"+f,rules:p.rules?Object(i.a)(p.rules):[]});this.$set(l,r,h),this.selectWidget=h,this.$nextTick((function(){s.a.$emit("on-history-add-"+o.formKey)}))},handleSelectChange:function(e){var t=this;setTimeout((function(){t.selectWidget=e>=0?t.children[e]:t.element}))}},watch:{select:function(e){this.selectWidget=e},selectWidget:{deep:!0,handler:function(e){this.$emit("update:select",e)}}}},h={name:"widget-card",mixins:[p],components:{Draggable:r.a,BaseElementItem:function(){return Promise.resolve().then(n.bind(null,"71f6"))}},props:["element","select","index","children","platform","formKey"],data:function(){return{currentType:"card"}}},g=h,v=n("2877"),b=Object(v.a)(g,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-card",{staticClass:"widget-card",class:{"is-empty":0===e.element.children.length},attrs:{shadow:e.element.options.shadow}},[e.element.options&&e.element.options.showHeader?n("div",{attrs:{slot:"header"},slot:"header"},[e._v(e._s(e.element.name))]):e._e(),n("draggable",{staticClass:"widget-col-list",attrs:{animation:200,group:{name:"icdDesigner",put:e.handlePut},"no-transition-on-drag":!0,ghostClass:"ghost",handle:".widget-view-drag"},on:{add:function(t){return e.handlePluginAdd(t,e.element)},update:e.handlePluginUpdate},model:{value:e.element.children,callback:function(t){e.$set(e.element,"children",t)},expression:"element.children"}},[e._l(e.element.children,(function(t,o){return[t&&t.key?n("base-element-item",{key:t.key,attrs:{children:e.element.children,element:t,"form-key":e.formKey,index:o,platform:e.platform,select:e.selectWidget},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t)}}}):e._e()]}))],2)],1)}),[],!1,null,null,null),y=b.exports,_=(n("159b"),n("b0c0"),{name:"Grid",mixins:[p],components:{Draggable:r.a,BaseElementItem:function(){return Promise.resolve().then(n.bind(null,"71f6"))}},props:["element","select","index","children","platform","formKey"],data:function(){return{currentType:"grid",selectWidget:this.select||{},selectIndex:-1}},methods:{getColSpan:function(e){return"pc"===this.platform?24/e:"pad"===this.platform?e>1?12:24:"mobile"===this.platform?24:void 0},handleSelectChange:function(e,t){var n=this;setTimeout((function(){n.selectWidget=e>=0?t.children[e]:{}}))},handleColumnAdd:function(){for(var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,n=arguments.length>1?arguments[1]:void 0,o=0;o<t;o++)this.children.push({name:"栅格列".concat(n),model:"grid_".concat(Object(c.a)()),type:"col",options:{customClass:""},children:[],key:Object(c.a)()}),this.$nextTick((function(){s.a.$emit("on-history-add-"+e.formKey)}))},handleColumnDelete:function(e,t){var n=this;this.children.splice(e,t),this.children.forEach((function(e,t){e.name="栅格列".concat(t+1)})),setTimeout((function(){s.a.$emit("on-history-add-"+n.formKey)}),20)},handleColumnChange:function(e){var t=e-this.element.children.length;t>0?this.handleColumnAdd(t,e):t<0&&this.handleColumnDelete(e-1,Math.abs(t))}},watch:{select:function(e){this.selectWidget=e},selectWidget:{deep:!0,handler:function(e){this.$emit("update:select",e)}}}}),w=_,x=Object(v.a)(w,(function(){var e,t=this,n=t.$createElement,o=t._self._c||n;return o("div",{staticClass:"widget-grid"},[o("el-row",{staticClass:"widget-grid-row",class:(e={},e[t.element.options&&t.element.options.customClass]=t.element.options&&t.element.options.customClass,e),attrs:{align:t.element.options.align,gutter:t.element.options.gutter||0,justify:t.element.options.justify,type:"flex"}},t._l(t.element.children,(function(e,n){var r;return o("el-col",{key:e.key,staticClass:"widget-grid-item",class:(r={active:t.selectWidget.key&&t.selectWidget.key===e.key},r[e.options&&e.options.customClass]=e.options&&e.options.customClass,r["is-empty"]=0===e.children.length,r),attrs:{offset:e.options?e.options.offset:0,pull:e.options?e.options.pull:0,push:e.options?e.options.push:0,span:t.getColSpan(t.element.children.length||1)}},[o("draggable",{staticClass:"widget-col-list",class:{"is-empty":0===e.children.length},attrs:{animation:200,group:{name:"icdDesigner",put:t.handlePut},"no-transition-on-drag":!0,ghostClass:"ghost",handle:".widget-view-drag"},on:{add:function(e){return t.handlePluginAdd(e,n)},update:t.handlePluginUpdate},model:{value:e.children,callback:function(n){t.$set(e,"children",n)},expression:"item.children"}},[t._l(e.children,(function(n,r){return[n&&n.key?o("base-element-item",{key:n.key,attrs:{children:e.children,element:n,"form-key":t.formKey,platform:t.platform,index:r,select:t.selectWidget},on:{"update:select":function(e){t.selectWidget=e},"select-change":function(n){return t.handleSelectChange(n,e)}}}):t._e()]}))],2)],1)})),1),t.selectWidget.key===t.element.key?o("div",{staticClass:"widget-view-action widget-extra-action"},[o("el-dropdown",{attrs:{size:"small",trigger:"click"}},[o("span",{staticClass:"el-dropdown-link"},[o("base-icon",{attrs:{"icon-class":"list-settings-fill",title:"列设置"}})],1),o("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[o("el-dropdown-item",{nativeOn:{click:function(e){return e.stopPropagation(),t.handleColumnChange(1)}}},[o("base-icon",{attrs:{"icon-class":"layout-column-fill"}}),t._v(" 一列 ")],1),o("el-dropdown-item",{nativeOn:{click:function(e){return e.stopPropagation(),t.handleColumnChange(2)}}},[o("base-icon",{attrs:{"icon-class":"layout-column-fill"}}),t._v(" 两列 ")],1),o("el-dropdown-item",{nativeOn:{click:function(e){return e.stopPropagation(),t.handleColumnChange(3)}}},[o("base-icon",{attrs:{"icon-class":"layout-column-fill"}}),t._v(" 三列 ")],1),o("el-dropdown-item",{nativeOn:{click:function(e){return e.stopPropagation(),t.handleColumnChange(4)}}},[o("base-icon",{attrs:{"icon-class":"layout-column-fill"}}),t._v(" 四列 ")],1)],1)],1)],1):t._e()],1)}),[],!1,null,null,null),C=x.exports,O={name:"widget-collapse-item",mixins:[p],components:{Draggable:r.a,BaseElementItem:function(){return Promise.resolve().then(n.bind(null,"71f6"))}},props:["element","select","index","children","platform","formKey"],data:function(){return{currentType:"collapse",collapseActive:this.element.children[0].name}},methods:{handleSelectChange:function(e,t){var n=this;setTimeout((function(){n.selectWidget=e>=0?t.children[e]:n.element}))}}},S=O,k=Object(v.a)(S,(function(){var e,t=this,n=t.$createElement,o=t._self._c||n;return o("el-collapse",{staticClass:"widget-collapse",class:(e={},e[t.element.options&&t.element.options.customClass]=t.element.options.customClass,e),attrs:{accordion:t.element.options.accordion},model:{value:t.collapseActive,callback:function(e){t.collapseActive=e},expression:"collapseActive"}},t._l(t.element.children,(function(e,n){return o("el-collapse-item",{key:e.name,staticClass:"widget-collapse-item",class:{"is-empty":0===e.children.length},attrs:{name:e.name}},[o("div",{staticClass:"el-collapse-header-title",attrs:{slot:"title",title:e.name},slot:"title"},[t._v(t._s(e.name))]),o("draggable",{staticClass:"widget-col-list",attrs:{animation:200,group:{name:"icdDesigner",put:t.handlePut},"no-transition-on-drag":!0,ghostClass:"ghost",handle:".widget-view-drag"},on:{add:function(e){return t.handlePluginAdd(e,n)},update:t.handlePluginUpdate},model:{value:e.children,callback:function(n){t.$set(e,"children",n)},expression:"item.children"}},[t._l(e.children,(function(n,r){return[n&&n.key?o("base-element-item",{key:n.key,attrs:{children:e.children,element:n,"form-key":t.formKey,index:r,platform:t.platform,select:t.selectWidget},on:{"update:select":function(e){t.selectWidget=e},"select-change":function(n){return t.handleSelectChange(n,e)}}}):t._e()]}))],2)],1)})),1)}),[],!1,null,null,null),E=k.exports,T=(n("a630"),n("99af"),{name:"widget-report",mixins:[p],components:{Draggable:r.a,BaseElementItem:function(){return Promise.resolve().then(n.bind(null,"71f6"))}},props:["element","select","index","children","platform","formKey"],data:function(){return{currentType:"report",selectWidget:this.select||{},selectR:-1,selectC:-1}},computed:{showRight:function(){var e=this.element.children[this.selectR].children[this.selectC].options.rowspan,t=this.element.children[this.selectR].children[this.selectC].options.colspan;if(this.selectC+t<this.element.children[this.selectR].children.length){var n=this.element.children[this.selectR].children[t+this.selectC];if(!n.options.invisible&&e===n.options.rowspan)return!0}return!1},showBottom:function(){var e=this.element.children[this.selectR].children[this.selectC].options.rowspan,t=this.element.children[this.selectR].children[this.selectC].options.colspan;if(e+this.selectR<this.element.children.length){var n=this.element.children[e+this.selectR].children[this.selectC];if(!n.options.invisible&&t===n.options.colspan)return!0}return!1},showRemoveRow:function(){if(this.element.children.length>1){var e=this.element.children[this.selectR].children[this.selectC].options.rowspan;if(1===e)return!0;for(var t=0;t<this.element.children[this.selectR].children.length;t++)if(e!==this.element.children[this.selectR].children[t].options.rowspan||this.element.children[this.selectR].children[t].options.invisible)return!1;if(this.element.children[this.selectR].children.length===t)return!0}return!1},showRemoveColumn:function(){if(this.element.children[this.selectR].children.length>1){var e=this.element.children[this.selectR].children[this.selectC].options.colspan;if(1===e)return!0;for(var t=0;t<this.element.children.length;t++)if(e!==this.element.children[t].children[this.selectC].options.colspan||this.element.children[t].children[this.selectC].options.invisible)return!1;if(this.element.children.length===t)return!0}return!1},showSplitColumn:function(){return this.element.children[this.selectR].children[this.selectC].options.colspan>1},showSplitRow:function(){return this.element.children[this.selectR].children[this.selectC].options.rowspan>1}},methods:{handlePut:function(e,t,n){return Object(l.a)(n.getAttribute("type"),this.currentType)},handleSelectItemWidget:function(e,t){this.selectWidget=this.children[e].children[t],this.selectR=e,this.selectC=t},handleWidgetItemUpdate:function(){s.a.$emit("on-history-add-"+this.formKey)},handleAddRow:function(){var e=this,t=this.children[0].children.length;this.children.push({name:"网格行",model:"report_".concat(Object(c.a)()),type:"tr",children:Array.from({length:t},(function(e){return{type:"td",model:"report_".concat(Object(c.a)()),children:[],options:{customClass:"",colspan:1,rowspan:1,align:"left",valign:"top",width:"",height:""},key:Object(c.a)()}}))}),this.resetChildrenName(),this.$nextTick((function(){s.a.$emit("on-history-add-"+e.formKey)}))},resetChildrenName:function(){this.element.children.forEach((function(e,t){e.name="网格行".concat(t+1),e.children.forEach((function(e,t){e.name="网格列".concat(t+1)}))}))},handleAddColumns:function(){var e=this;this.children.forEach((function(e){e.children.push({type:"td",model:"report_".concat(Object(c.a)()),children:[],options:{customClass:"",colspan:1,rowspan:1,align:"left",valign:"top",width:"",height:""},key:Object(c.a)()})})),this.resetChildrenName(),this.$nextTick((function(){s.a.$emit("on-history-add-"+e.formKey)}))},insertColumns:function(e){for(var t=0;t<this.element.children.length;t++){var n=this.findPrevColIndex(t,e);if(n!==e&&this.element.children[t].children[e].options.invisible){this.element.children[t].children.splice(e,0,{type:"td",model:"report_".concat(Object(c.a)()),children:[],options:{customClass:"",colspan:1,rowspan:1,align:"left",valign:"top",width:"",height:"",invisible:!0},key:Object(c.a)()});var o=this.element.children[t].children[n].options.colspan;this.element.children[t].children[n].options.colspan=o+1;for(var r=0;r<o+1;r++)this.element.children[t].children[n+r].options.markCol=r}else this.element.children[t].children.splice(e,0,{type:"td",model:"report_".concat(Object(c.a)()),children:[],options:{customClass:"",colspan:1,rowspan:1,align:"left",valign:"top",width:"",height:""},key:Object(c.a)()})}this.resetChildrenName()},insertRow:function(e){for(var t=this,n=[],o=0;o<this.element.children[0].children.length;o++){var r=this.findPrevRowIndex(e,o);r!==e&&this.element.children[e].children[o].options.invisible?(n.push({model:"report_".concat(Object(c.a)()),type:"td",children:[],options:{customClass:"",colspan:1,rowspan:1,align:"left",valign:"top",width:"",height:"",invisible:!0},key:Object(c.a)()}),this.element.children[r].children[o].options.rowspan=this.element.children[r].children[o].options.rowspan+1):n.push({model:"report_".concat(Object(c.a)()),type:"td",children:[],options:{customClass:"",colspan:1,rowspan:1,align:"left",valign:"top",width:"",height:""},key:Object(c.a)()})}this.element.children.splice(e,0,{model:"report_".concat(Object(c.a)()),children:n,type:"tr"}),this.resetChildrenName(),this.$nextTick((function(){for(var n=0;n<t.element.children[e].children.length;n++)if(t.element.children[e].children[n].options.invisible){var o=t.findPrevRowIndex(e-1,n);t.element.children[o].children[n].options.invisible||t.markTableItem(o,n)}}))},handleInsertLeft:function(){var e=this,t=this.selectC;this.insertColumns(t),this.selectC=this.selectC++,this.$nextTick((function(){s.a.$emit("on-history-add-"+e.formKey)}))},handleInsertRight:function(){var e=this,t=this.element.children[this.selectR].children[this.selectC].options.colspan>1?this.findNextColIndex(this.selectR,this.selectC+1):this.selectC+1;this.insertColumns(t),this.$nextTick((function(){s.a.$emit("on-history-add-"+e.formKey)}))},handleInserBefore:function(){var e=this,t=this.selectR;this.insertRow(t),this.selectR=this.selectR++,this.$nextTick((function(){s.a.$emit("on-history-add-"+e.formKey)}))},handleInserAfter:function(){var e=this,t=this.element.children[this.selectR].children[this.selectC].options.rowspan>1?this.findNextRowIndex(this.selectR+1,this.selectC):this.selectR+1;this.insertRow(t),this.$nextTick((function(){s.a.$emit("on-history-add-"+e.formKey)}))},markTableItem:function(e,t){for(var n=this.element.children[e].children[t].options.colspan,o=this.element.children[e].children[t].options.rowspan,r=0;r<o;r++)for(var i=0;i<n;i++)this.element.children[e+r].children[t+i].options.markCol=i,this.element.children[e+r].children[t+i].options.markRow=r},handleRight:function(e){var t=this,n=e.options.colspan,o=this.selectC+n,r=this.element.children[this.selectR].children[o].options.colspan;this.$set(e.options,"colspan",n+r),this.element.children[this.selectR].children[o].options.invisible=!0;var a=Object(i.a)(this.element.children[this.selectR].children[o].children);this.element.children[this.selectR].children[o].children=[],e.children=e.children.concat(a),this.markTableItem(this.selectR,this.selectC),this.$nextTick((function(){s.a.$emit("on-history-add-"+t.formKey)}))},handleBottom:function(e){var t=this,n=e.options.rowspan,o=this.selectR+n,r=this.element.children[o].children[this.selectC].options.rowspan;this.$set(e.options,"rowspan",n+r),this.element.children[o].children[this.selectC].options.invisible=!0;var a=Object(i.a)(this.element.children[o].children[this.selectC].children);this.element.children[o].children[this.selectC].children=[],e.children=e.children.concat(a),this.markTableItem(this.selectR,this.selectC),this.$nextTick((function(){s.a.$emit("on-history-add-"+t.formKey)}))},handleSplitColumn:function(){for(var e=this,t=this.element.children[this.selectR].children[this.selectC].options.colspan,n=this.element.children[this.selectR].children[this.selectC].options.rowspan,o=0;o<t;o++)this.element.children[this.selectR].children[this.selectC+o].options.invisible=!1,this.element.children[this.selectR].children[this.selectC+o].options.colspan=1,this.element.children[this.selectR].children[this.selectC+o].options.rowspan=n,this.markTableItem(this.selectR,this.selectC+o);this.$nextTick((function(){s.a.$emit("on-history-add-"+e.formKey)}))},handleSplitRow:function(){for(var e=this,t=this.element.children[this.selectR].children[this.selectC].options.colspan,n=this.element.children[this.selectR].children[this.selectC].options.rowspan,o=0;o<n;o++)this.element.children[this.selectR+o].children[this.selectC].options.invisible=!1,this.element.children[this.selectR+o].children[this.selectC].options.rowspan=1,this.element.children[this.selectR+o].children[this.selectC].options.colspan=t,this.markTableItem(this.selectR,this.selectC+o);this.$nextTick((function(){s.a.$emit("on-history-add-"+e.formKey)}))},findPrevRowIndex:function(e,t){return e>=this.element.children.length||!this.element.children[e].children[t].options.markRow?e:this.findPrevRowIndex(e-1,t)},findPrevColIndex:function(e,t){return t>=this.element.children[e].children.length||!this.element.children[e].children[t].options.markCol?t:this.findPrevColIndex(e,t-1)},findNextColIndex:function(e,t){return t>=this.element.children[e].children.length||!this.element.children[e].children[t].options.markCol?t:this.findNextColIndex(e,t+1)},findNextRowIndex:function(e,t){return e>=this.element.children.length||!this.element.children[e].children[t].options.markRow?e:this.findNextRowIndex(e+1,t)},handleRemoveRow:function(){for(var e=this,t=0;t<this.element.children[this.selectR].children.length;t++){var n=this.element.children[this.selectR].children[t].options.rowspan,o=this.element.children[this.selectR].children[t].options.colspan;if(this.element.children[this.selectR].children[t].options.invisible){var r=this.findPrevRowIndex(this.selectR,t);r!==this.selectR&&this.element.children[r].children[t].options.rowspan>1&&(this.element.children[r].children[t].options.rowspan=this.element.children[r].children[t].options.rowspan-1)}else n>1&&(this.element.children[this.selectR+1].children[t].children=Object(i.a)(this.element.children[this.selectR].children[t].children),this.element.children[this.selectR+1].children[t].options.invisible=!1,this.element.children[this.selectR+1].children[t].options.rowspan=n-1,this.element.children[this.selectR+1].children[t].options.colspan=o,this.markTableItem(this.selectR+1,t))}this.element.children.splice(this.selectR,1),this.$nextTick((function(){s.a.$emit("on-history-add-"+e.formKey)}))},handleRemoveColumn:function(){for(var e=this,t=0;t<this.element.children.length;t++){var n=this.element.children[t].children[this.selectC].options.colspan,o=this.element.children[t].children[this.selectC].options.rowspan;if(this.element.children[t].children[this.selectC].options.invisible){var r=this.findPrevColIndex(t,this.selectC);r!==this.selectC&&this.element.children[t].children[r].options.colspan>1&&(this.element.children[t].children[r].options.colspan=this.element.children[t].children[r].options.colspan-1)}else n>1&&(this.element.children[t].children[this.selectC+1].children=Object(i.a)(this.element.children[t].children[this.selectC].children),this.element.children[t].children[this.selectC+1].options.invisible=!1,this.element.children[t].children[this.selectC+1].options.colspan=n-1,this.element.children[t].children[this.selectC+1].options.rowspan=o,this.markTableItem(t,this.selectC+1));this.element.children[t].children.splice(this.selectC,1)}this.$nextTick((function(){s.a.$emit("on-history-add-"+e.formKey)}))},handleSelectChange:function(e,t){var n=this;setTimeout((function(){n.selectWidget=e>=0?t.children[e]:n.children.children[n.index]}))}},watch:{select:function(e){this.selectWidget=e},selectWidget:{deep:!0,handler:function(e){this.$emit("update:select",e)}}}}),D=T,A=Object(v.a)(D,(function(){var e,t=this,n=t.$createElement,o=t._self._c||n;return o("div",{staticClass:"widget-report"},[o("table",{staticClass:"report-container",class:(e={},e[t.element.options&&t.element.options.customClass]=t.element.options.customClass,e),style:{"border-top-width":t.element.options.borderWidth+"px","border-top-color":t.element.options.borderColor,"border-left-width":t.element.options.borderWidth+"px","border-left-color":t.element.options.borderColor,width:t.element.options.width||"100%"}},t._l(t.element.children,(function(e,n){return o("tr",{key:n},t._l(e.children,(function(e,r){var i;return e.options.invisible?t._e():o("td",{key:n+"-"+r,staticClass:"widget-report-item report-container-td",class:(i={active:t.selectWidget.key&&t.selectWidget.key===e.key},i[e.options.customClass]=e.options.customClass,i["is-empty"]=0===e.children.length,i),style:{"border-right-width":t.element.options.borderWidth+"px","border-right-color":t.element.options.borderColor,"border-bottom-width":t.element.options.borderWidth+"px","border-bottom-color":t.element.options.borderColor,height:e.options.height},attrs:{colspan:e.options.colspan,rowspan:e.options.rowspan,valign:"top"},on:{click:function(e){return e.stopPropagation(),t.handleSelectItemWidget(n,r)}}},[o("draggable",{staticClass:"widget-col-list",attrs:{animation:200,group:{name:"icdDesigner",put:t.handlePut},"no-transition-on-drag":!0,ghostClass:"ghost",handle:".widget-view-drag"},on:{add:function(e){return t.handlePluginAdd(e,r,n)},update:t.handleWidgetItemUpdate},model:{value:e.children,callback:function(n){t.$set(e,"children",n)},expression:"column.children"}},[t._l(e.children,(function(n,r){return[n&&n.key?o("base-element-item",{key:n.key,attrs:{platform:t.platform,children:e.children,element:n,"form-key":t.formKey,index:r,select:t.selectWidget},on:{"update:select":function(e){t.selectWidget=e},"select-change":function(n){return t.handleSelectChange(n,e)}}}):t._e()]}))],2),t.selectWidget.key===e.key?o("div",{staticClass:"widget-view-action widget-col-action"},[o("el-dropdown",{attrs:{size:"small",trigger:"click"}},[o("span",{staticClass:"el-dropdown-link"},[o("base-icon",{attrs:{"icon-class":"list-settings-fill",title:"单元格设置"}})],1),o("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[o("el-dropdown-item",{nativeOn:{click:function(e){return e.stopPropagation(),t.handleInsertLeft.apply(null,arguments)}}},[t._v(" 左侧插入列 ")]),o("el-dropdown-item",{nativeOn:{click:function(e){return e.stopPropagation(),t.handleInsertRight.apply(null,arguments)}}},[t._v(" 右侧插入列 ")]),o("el-dropdown-item",{nativeOn:{click:function(e){return e.stopPropagation(),t.handleInserBefore.apply(null,arguments)}}},[t._v(" 上方插入行 ")]),o("el-dropdown-item",{nativeOn:{click:function(e){return e.stopPropagation(),t.handleInserAfter.apply(null,arguments)}}},[t._v(" 下方插入行 ")]),o("el-dropdown-item",{attrs:{disabled:!t.showRight,divided:""},nativeOn:{click:function(n){return n.stopPropagation(),t.handleRight(e)}}},[t._v(" 向右合并 ")]),o("el-dropdown-item",{attrs:{disabled:!t.showBottom},nativeOn:{click:function(n){return n.stopPropagation(),t.handleBottom(e)}}},[t._v(" 向下合并 ")]),o("el-dropdown-item",{attrs:{disabled:!t.showSplitColumn,divided:""},nativeOn:{click:function(e){return e.stopPropagation(),t.handleSplitColumn.apply(null,arguments)}}},[t._v(" 拆分成列 ")]),o("el-dropdown-item",{attrs:{disabled:!t.showSplitRow},nativeOn:{click:function(e){return e.stopPropagation(),t.handleSplitRow.apply(null,arguments)}}},[t._v(" 拆分成行 ")]),o("el-dropdown-item",{attrs:{disabled:!t.showRemoveColumn,divided:""},nativeOn:{click:function(e){return e.stopPropagation(),t.handleRemoveColumn.apply(null,arguments)}}},[t._v(" 删除列 ")]),o("el-dropdown-item",{attrs:{disabled:!t.showRemoveRow},nativeOn:{click:function(e){return e.stopPropagation(),t.handleRemoveRow.apply(null,arguments)}}},[t._v(" 删除行 ")])],1)],1)],1):t._e()],1)})),0)})),0),t.selectWidget.key===t.element.key?o("div",{staticClass:"widget-view-action widget-extra-action"},[o("base-help-icon",{attrs:{content:"网格布局暂不支持多端自动适配,有移动端使用场景时请避免使用此布局"}}),o("base-icon",{attrs:{"icon-class":"insert-row-top",title:"添加行"},on:{click:function(e){return e.stopPropagation(),t.handleAddRow()}}}),o("base-icon",{attrs:{"icon-class":"insert-column-left",title:"添加列"},on:{click:function(e){return e.stopPropagation(),t.handleAddColumns()}}})],1):t._e()])}),[],!1,null,null,null),M=A.exports,R={name:"widget-tab-item",mixins:[p],components:{Draggable:r.a,BaseElementItem:function(){return Promise.resolve().then(n.bind(null,"71f6"))}},props:["element","select","index","children","platform","formKey"],data:function(){return{currentType:"tabs",tabActive:this.element.children[0].name}},methods:{handleSelectChange:function(e,t){var n=this;setTimeout((function(){n.selectWidget=e>=0?t.children[e]:{}}))}}},P=R,I=Object(v.a)(P,(function(){var e,t=this,n=t.$createElement,o=t._self._c||n;return o("el-tabs",{staticClass:"widget-tab",class:(e={},e[t.element.options&&t.element.options.customClass]=t.element.options.customClass,e),attrs:{"tab-position":t.element.options.tabPosition,type:t.element.options.type},model:{value:t.tabActive,callback:function(e){t.tabActive=e},expression:"tabActive"}},t._l(t.element.children,(function(e,n){return o("el-tab-pane",{key:e.name,staticClass:"widget-tab-pane",class:{"is-empty":0===e.children.length},attrs:{label:e.name,name:e.name}},[o("draggable",{staticClass:"widget-col-list",attrs:{animation:200,group:{name:"icdDesigner",put:t.handlePut},"no-transition-on-drag":!0,ghostClass:"ghost",handle:".widget-view-drag"},on:{add:function(e){return t.handlePluginAdd(e,n)},update:t.handlePluginUpdate},model:{value:e.children,callback:function(n){t.$set(e,"children",n)},expression:"item.children"}},[t._l(e.children,(function(n,r){return[n&&n.key?o("base-element-item",{key:n.key,attrs:{children:e.children,element:n,"form-key":t.formKey,index:r,platform:t.platform,select:t.selectWidget},on:{"update:select":function(e){t.selectWidget=e},"select-change":function(n){return t.handleSelectChange(n,e)}}}):t._e()]}))],2)],1)})),1)}),[],!1,null,null,null),L=I.exports,j=(n("d81d"),n("a15b"),/^(?!_)(?![0-9])[a-zA-Z0-9_]{2,50}$/),z=n("1da1"),F=(n("96cf"),{element:{type:Object,default:function(){}},platform:{type:String,default:""},isInTable:{type:Boolean,default:!1}}),B=n("5c9a"),N=n("f016"),V=n("ec26"),H=n("8907"),$={name:"plugin",props:Object(a.a)({},F),computed:{model:{get:function(){return this.element.options.defaultValue},set:function(e){this.element.options.defaultValue=e}},isRemote:function(){return("radio"===this.element.type||"checkbox"===this.element.type)&&this.element.options.remote!==B.a.STATIC_DATA&&this.element.options.remoteOption.remoteDict},disabled:function(){return this.element.options.disabled},placeholder:function(){return this.element.options.placeholder}},data:function(){return{DATASOURCE_TYPE:B.a,variableMap:N.b,key:Object(c.a)(),elementKey:Object(c.a)(),remoteOptions:[],optionLoading:!1,optionLoadFailed:!1}},methods:{v4:V.a,handleLoadDictOptions:function(){var e=this;return Object(z.a)(regeneratorRuntime.mark((function t(){var n,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.optionLoading){t.next=2;break}return t.abrupt("return");case 2:if(e.optionLoading=!0,e.optionLoadFailed=!1,n={},"dict"!==(o=e.element.options.remoteOption.remoteDict).dictDataType){t.next=12;break}return t.next=9,Object(H.a)(e,{dictId:o.dictId,parentId:"#"});case 9:n=t.sent,t.next=16;break;case 12:if("dictItem"!==o.dictDataType){t.next=16;break}return t.next=15,Object(H.a)(e,{dictId:o.dictId,parentId:o.dictOptionId});case 15:n=t.sent;case 16:n.data&&n.data.length?e.remoteOptions=n.data:e.optionLoadFailed=!0,e.optionLoading=!1;case 18:case"end":return t.stop()}}),t)})))()}},watch:{isRemote:{immediate:!0,handler:function(e){e&&this.handleLoadDictOptions()}},"element.options.remoteOption.remoteDict":{deep:!0,handler:function(e){e&&this.isRemote&&this.handleLoadDictOptions()}},"element.options.defaultValue":function(){this.elementKey=Object(c.a)()}}},U=$,W=Object(v.a)(U,(function(){var e=this.$createElement;return(this._self._c||e)("div")}),[],!1,null,"cd6b81b2",null),q=W.exports,K={name:"designer-input",extends:q},G=Object(v.a)(K,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e.element.options.isVariableDefaultValue?n("el-input",{style:{width:e.isInTable?"100%":e.element.options.isWidgetWidth?e.element.options.width+"%":"100%"},attrs:{disabled:e.disabled,placeholder:e.placeholder,"show-password":e.element.options.showPassword,value:"{{"+(e.element.options.defaultVariable?e.variableMap[e.element.options.defaultVariable]:"未选择")+"}}",maxlength:"50"}}):n("el-input",{style:{width:e.isInTable?"100%":e.element.options.isWidgetWidth?e.element.options.width+"%":"100%"},attrs:{disabled:e.disabled,placeholder:e.placeholder,"show-password":e.element.options.showPassword,maxlength:"50"},model:{value:e.model,callback:function(t){e.model=t},expression:"model"}})],1)}),[],!1,null,"cac0a572",null).exports,Y={name:"designer-textarea",extends:q},X=Object(v.a)(Y,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e.element.options.isVariableDefaultValue?n("el-input",{style:{width:e.isInTable?"100%":e.element.options.isWidgetWidth?e.element.options.width+"%":"100%"},attrs:{autosize:!!e.element.options.autosize&&{minRows:e.element.options.rows},disabled:e.disabled,placeholder:e.placeholder,rows:e.element.options.rows,value:"{{"+(e.element.options.defaultVariable?e.variableMap[e.element.options.defaultVariable]:"未选择")+"}}",type:"textarea"}}):n("el-input",{style:{width:e.isInTable?"100%":e.element.options.isWidgetWidth?e.element.options.width+"%":"100%"},attrs:{autosize:!!e.element.options.autosize&&{minRows:e.element.options.rows},disabled:e.disabled,placeholder:e.placeholder,rows:e.element.options.rows,type:"textarea"},model:{value:e.model,callback:function(t){e.model=t},expression:"model"}})],1)}),[],!1,null,"3121d737",null).exports,J={name:"designer-number",extends:q,computed:{widthDisplay:function(){return this.element.options.isWidgetWidth?{width:this.element.options.width+"%"}:this.isInTable?{flex:1}:{width:"auto"}}}},Q=(n("cc0c"),Object(v.a)(J,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"number-display"},[n("el-input-number",{style:e.widthDisplay,attrs:{controls:e.element.options.controls,"controls-position":e.element.options.controlsPosition,disabled:e.disabled,precision:e.element.options.closePrecision?void 0:e.element.options.precision},model:{value:e.model,callback:function(t){e.model=t},expression:"model"}}),e.element.options.showSuffix?n("span",{staticClass:"iss-number-unit"},[e._v(" "+e._s(e.element.options.suffix))]):e._e()],1)}),[],!1,null,null,null).exports),Z={name:"designer-radio",extends:q},ee=Object(v.a)(Z,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("el-radio-group",{style:{width:e.isInTable?"100%":e.element.options.isWidgetWidth?e.element.options.width+"%":"100%"},attrs:{disabled:e.disabled},model:{value:e.model,callback:function(t){e.model=t},expression:"model"}},["button"===e.element.options.optionStyle?e._l(e.isRemote?e.remoteOptions:e.element.options.options,(function(t,o){return n("el-radio-button",{key:t.value+o,style:{display:"inline-block"},attrs:{label:t.value}},[e._v(" "+e._s(t.label)+" ")])})):e._l(e.isRemote?e.remoteOptions:e.element.options.options,(function(t,o){return n("el-radio",{key:t.value+o,style:{display:"mobile"===e.platform&&"border"===e.element.options.optionStyle?"block":e.element.options.inline?"inline-block":"block"},attrs:{border:"border"===e.element.options.optionStyle,label:t.value}},[e._v(" "+e._s(t.label)+" ")])}))],2),e.isRemote?[e.optionLoading?[n("i",{staticClass:"el-icon-loading"}),e._v(" 正在加载选项... ")]:e._e(),e.optionLoadFailed?n("div",{staticClass:"form-option-load-failed"},[n("base-icon",{attrs:{"icon-class":"information-line"}}),e._v(" 选项加载失败,请检查选项配置 "),n("el-button",{attrs:{size:"mini",type:"text"},on:{click:e.handleLoadDictOptions}},[n("base-icon",{attrs:{"icon-class":"refresh-line"}}),e._v(" 重试 ")],1)],1):e._e()]:e._e()],2)}),[],!1,null,"6c94b07f",null).exports,te={name:"designer-checkbox",extends:q},ne=Object(v.a)(te,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("el-checkbox-group",{style:{width:e.isInTable?"100%":e.element.options.isWidgetWidth?e.element.options.width+"%":"100%"},attrs:{disabled:e.disabled},model:{value:e.model,callback:function(t){e.model=t},expression:"model"}},["button"===e.element.options.optionStyle?e._l(e.isRemote?e.remoteOptions:e.element.options.options,(function(t,o){return n("el-checkbox-button",{key:t.value+o,style:{display:"inline-block"},attrs:{label:t.value}},[e._v(" "+e._s(t.label)+" ")])})):e._l(e.isRemote?e.remoteOptions:e.element.options.options,(function(t,o){return n("el-checkbox",{key:t.value+o,style:{display:"mobile"===e.platform&&"border"===e.element.options.optionStyle?"block":e.element.options.inline?"inline-block":"block"},attrs:{border:"border"===e.element.options.optionStyle,label:t.value}},[e._v(" "+e._s(t.label)+" ")])}))],2),e.isRemote?[e.optionLoading?[n("i",{staticClass:"el-icon-loading"}),e._v(" 正在加载选项... ")]:e._e(),e.optionLoadFailed?n("div",{staticClass:"form-option-load-failed"},[n("base-icon",{attrs:{"icon-class":"information-line"}}),e._v(" 选项加载失败,请检查选项配置 "),n("el-button",{attrs:{size:"mini",type:"text"},on:{click:e.handleLoadDictOptions}},[n("base-icon",{attrs:{"icon-class":"refresh-line"}}),e._v(" 重试 ")],1)],1):e._e()]:e._e()],2)}),[],!1,null,"ea41cdd6",null).exports,oe={name:"designer-time",extends:q},re=Object(v.a)(oe,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e.element.options.useDynamicValue?n("el-input",{attrs:{value:"{{动态时间}}"}}):n("el-time-picker",{key:e.elementKey,style:{width:e.isInTable?"100%":e.element.options.isWidgetWidth?e.element.options.width+"%":"100%"},attrs:{clearable:e.element.options.clearable,"default-value":e.model,disabled:e.disabled,editable:e.element.options.editable,placeholder:e.placeholder,readonly:e.element.options.readonly,"value-format":e.element.options.format},model:{value:e.model,callback:function(t){e.model=t},expression:"model"}})],1)}),[],!1,null,"3a1eb939",null).exports,ie={name:"designer-date",extends:q},ae=Object(v.a)(ie,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e.element.options.useDynamicValue?n("el-input",{attrs:{value:"{{动态日期时间}}"}}):n("el-date-picker",{key:e.elementKey,style:{width:e.isInTable?"100%":e.element.options.isWidgetWidth?e.element.options.width+"%":"100%"},attrs:{clearable:e.element.options.clearable,disabled:e.disabled,editable:e.element.options.editable,placeholder:e.placeholder,readonly:e.element.options.readonly,type:e.element.options.type,format:"custom"===e.element.options.format?e.element.options.customFormat:e.element.options.format,"value-format":"timestamp"},model:{value:e.model,callback:function(t){e.model=t},expression:"model"}})],1)}),[],!1,null,"4fd6be4b",null).exports,se={name:"designer-rate",extends:q},le=Object(v.a)(se,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("el-rate",{style:e.element.options.clearable?"float:left":"",attrs:{"allow-half":e.element.options.allowHalf,disabled:e.disabled,"icon-classes":["ri-star-fill","ri-star-fill","ri-star-fill"],"void-icon-class":"ri-star-line","disabled-void-icon-class":"ri-star-fill",max:e.element.options.max,"show-score":e.element.options.showScore,"score-template":"{value}"+e.element.options.suffix},model:{value:e.model,callback:function(t){e.model=t},expression:"model"}}),e.element.options.clearable?n("el-link",{staticStyle:{float:"left","margin-left":"1rem"},attrs:{type:"primary",underline:!1}},[e._v("清空")]):e._e()],1)}),[],!1,null,"45548834",null).exports,ce={name:"designer-select",extends:q,components:{CustomSelectComponent:n("f73f").a}},ue=Object(v.a)(ce,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("custom-select-component",{style:{width:e.isInTable?"100%":e.element.options.isWidgetWidth?e.element.options.width+"%":"100%"},attrs:{clearable:e.element.options.clearable,disabled:e.disabled,placeholder:e.placeholder,"custom-multiple":e.element.options.multiple,multiple:""},model:{value:e.model,callback:function(t){e.model=t},expression:"model"}},e._l(e.element.options.options,(function(e,t){return n("el-option",{key:e.value+t,attrs:{label:e.label,value:e.label}})})),1)],1)}),[],!1,null,"13eb5dc4",null).exports,de={name:"render-switches",extends:q},fe=Object(v.a)(de,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("el-switch",{attrs:{disabled:e.disabled,"active-text":e.element.options.activeText,"inactive-text":e.element.options.inactiveText},model:{value:e.model,callback:function(t){e.model=t},expression:"model"}})}),[],!1,null,null,null).exports,me={name:"render-slider",extends:q},pe=Object(v.a)(me,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("el-slider",{style:{width:e.isInTable?"100%":e.element.options.isWidgetWidth?e.element.options.width+"%":"100%"},attrs:{disabled:e.disabled,max:e.element.options.max,min:e.element.options.min,range:e.element.options.range,"show-input":e.element.options.showInput,step:e.element.options.step,"format-tooltip":function(t){return t+e.element.options.suffix}},model:{value:e.model,callback:function(t){e.model=t},expression:"model"}})}),[],!1,null,null,null).exports,he={name:"render-editor",extends:q,components:{RichEditor:n("0a4d").a}},ge=Object(v.a)(he,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("rich-editor",{attrs:{disabled:e.disabled,placeholder:e.placeholder},model:{value:e.model,callback:function(t){e.model=t},expression:"model"}})}),[],!1,null,null,null).exports,ve={name:"render-organization",extends:q,components:{OrganizationSelector:n("9a01").a}},be=Object(v.a)(ve,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("organization-selector",{attrs:{"custom-style":{width:e.isInTable?"100%":e.element.options.isWidgetWidth?e.element.options.width+"%":"100%"},disabled:e.disabled,multiple:e.element.options.multiple,placeholder:e.placeholder,"option-scope-type":e.element.options.optionScopeType,readonly:!0},model:{value:e.model,callback:function(t){e.model=t},expression:"model"}})}),[],!1,null,null,null).exports,ye={name:"render-member",extends:be},_e=Object(v.a)(ye,void 0,void 0,!1,null,null,null).exports,we={name:"render-cascader",extends:q},xe=Object(v.a)(we,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("el-cascader",{style:{width:e.isInTable?"100%":e.element.options.isWidgetWidth?e.element.options.width+"%":"100%"},attrs:{clearable:e.element.options.clearable,disabled:e.disabled,options:e.element.options.remote!==e.DATASOURCE_TYPE.STATIC_DATA?[]:e.element.options.options,placeholder:e.placeholder,props:{multiple:e.element.options.multiple,checkStrictly:e.element.options.checkStrictly}},model:{value:e.model,callback:function(t){e.model=t},expression:"model"}})}),[],!1,null,null,null).exports,Ce={name:"render-upload",extends:q,components:{UploadComponent:n("c1ea").a}},Oe=Object(v.a)(Ce,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("upload-component",{style:{width:e.isInTable?"100%":e.element.options.isWidgetWidth?e.element.options.width+"%":"100%"},attrs:{disabled:e.disabled,limit:e.element.options.limit,multiple:e.element.options.multiple,size:e.element.options.size,accept:e.element.options.accept,tip:e.element.options.tip},model:{value:e.model,callback:function(t){e.model=t},expression:"model"}})}),[],!1,null,null,null).exports,Se={name:"render-imageUpload",extends:q,components:{UploadImageComponent:n("7afc").a}},ke=Object(v.a)(Se,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("upload-image-component",{style:{width:e.isInTable?"100%":e.element.options.isWidgetWidth?e.element.options.width+"%":"100%"},attrs:{disabled:e.disabled,limit:e.element.options.limit,multiple:e.element.options.multiple,size:e.element.options.size,tip:e.element.options.tip},model:{value:e.model,callback:function(t){e.model=t},expression:"model"}})}),[],!1,null,null,null).exports,Ee={name:"render-uuid",extends:q,components:{UuidComponent:n("b3da").a}},Te=Object(v.a)(Ee,(function(){var e=this.$createElement;return(this._self._c||e)("uuid-component",{attrs:{"custom-style":{width:this.isInTable?"100%":this.element.options.isWidgetWidth?this.element.options.width+"%":"100%"},value:this.v4()}})}),[],!1,null,null,null).exports,De={name:"render-sequence",extends:q},Ae=Object(v.a)(De,(function(){var e=this.$createElement;return(this._self._c||e)("el-input",{attrs:{value:this.element.options.previewValue,resize:"none",disabled:""}})}),[],!1,null,null,null).exports,Me={name:"render-address",extends:q,components:{AddressComponent:n("ce9d").a}},Re=Object(v.a)(Me,(function(){var e=this.$createElement;return(this._self._c||e)("address-component",{attrs:{disabled:this.disabled,"is-address-detail":this.element.options.isAddressDetail}})}),[],!1,null,null,null).exports,Pe={name:"render-relatedForm",extends:q,components:{RelatedForm:n("40e3").a}},Ie=Object(v.a)(Pe,(function(){var e=this.$createElement;return(this._self._c||e)("related-form",{attrs:{placeholder:this.placeholder}})}),[],!1,null,null,null).exports,Le={name:"render-qrCode",extends:q,components:{QrCodeComponent:n("bfce").a}},je=Object(v.a)(Le,(function(){var e=this.$createElement;return(this._self._c||e)("qr-code-component",{attrs:{options:this.element.options}})}),[],!1,null,null,null).exports,ze=n("7b30"),Fe={name:"designer-divider",extends:q,components:{TextComponent:ze.a}},Be=Object(v.a)(Fe,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("text-component",{attrs:{align:e.element.options.contentPosition}},[n("el-button",{style:e.element.options.customWidth?{width:e.element.options.width+"%"}:"",attrs:{circle:e.element.options.buttonCircle,disabled:e.element.options.disabled,plain:e.element.options.buttonPlain,round:e.element.options.buttonRound,size:e.element.options.buttonSize,type:e.element.options.buttonType}},[e._v(" "+e._s(e.element.options.buttonName)+" ")])],1)}),[],!1,null,"3fd3aae6",null).exports,Ne={name:"designer-divider",extends:q},Ve=Object(v.a)(Ne,(function(){var e=this.$createElement,t=this._self._c||e;return t("div",{style:{paddingTop:this.element.options.paddingTop+"px",paddingBottom:this.element.options.paddingBottom+"px"}},[t("el-divider",{attrs:{"content-position":this.element.options.contentPosition}},[this._v(" "+this._s(this.element.options.text)+" ")])],1)}),[],!1,null,"7be55188",null).exports,He={name:"designer-divider",extends:q},$e=Object(v.a)(He,(function(){var e=this.$createElement,t=this._self._c||e;return this.element.options.href?t("iframe",{staticClass:"iss-iframe",style:{width:this.element.options.width+"%",height:this.element.options.height+"px"},attrs:{src:this.element.options.href}}):t("div",{staticClass:"iss-image-load-failed",style:{width:this.element.options.width+"%",height:this.element.options.height+"px"}},[t("div",{staticClass:"iss-empty-image"}),t("span",[this._v("请配置网页URL地址")])])}),[],!1,null,"4fcc39c5",null).exports,Ue={name:"designer-divider",extends:q},We=Object(v.a)(Ue,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-image",{style:{width:e.element.options.width+"%",height:e.element.options.autoHeight?"auto":e.element.options.height+"px"},attrs:{alt:e.element.name,fit:e.element.options.autoHeight?"fill":e.element.options.fit,src:e.element.options.src,lazy:""}},[n("div",{staticClass:"iss-image-load-failed",attrs:{slot:"error"},slot:"error"},[n("div",{staticClass:"iss-empty-image"}),e.element.options.src?n("span",[e._v(" 图片加载失败,请配置正确的图片链接地址或上传图片 ")]):n("span",[e._v("请上传图片或配置图片链接地址")])])])}),[],!1,null,"073fe560",null).exports,qe={name:"designer-divider",extends:q,components:{TextComponent:ze.a}},Ke=Object(v.a)(qe,(function(){var e=this.$createElement,t=this._self._c||e;return t("text-component",{attrs:{align:this.element.options.contentPosition}},[t("el-link",{attrs:{disabled:this.element.options.disabled,type:this.element.options.linkType,underline:this.element.options.underline}},[this._v(" "+this._s(this.element.options.text)+" ")])],1)}),[],!1,null,"fb52e7b0",null).exports,Ge={name:"designer-text",extends:q,components:{TextComponent:ze.a}},Ye={input:G,textarea:X,number:Q,radio:ee,checkbox:ne,time:re,date:ae,rate:le,select:ue,switches:fe,slider:pe,editor:ge,member:_e,organization:be,cascader:xe,upload:Oe,imageUpload:ke,uuid:Te,sequence:Ae,address:Re,relatedForm:Ie,qrCode:je,button:Be,divider:Ve,iframe:$e,image:We,link:Ke,text:Object(v.a)(Ge,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("text-component",{attrs:{align:e.element.options.contentPosition,"font-color":e.element.options.fontColor,"font-size":e.element.options.fontSize,"font-style":e.element.options.fontStyle,"font-weight":e.element.options.fontWeight,"font-family":e.element.options.fontFamily,"margin-top":e.element.options.marginTop,"margin-bottom":e.element.options.marginBottom}},[e._v(" "+e._s(e.element.options.text)+" ")])}),[],!1,null,"3c24829f",null).exports},Xe={props:["element","select","index","data","platform","formKey","mode"],data:function(){return{Elements:Ye,currentType:"table-item",selectWidget:this.select||{}}},created:function(){this.element.options.isInTable=!0},computed:{isModelValidate:function(){return j.test(this.element.model)}},methods:{handleSelectWidget:function(e){this.selectWidget=this.data[e]},handleWidgetDelete:function(e){var t=this;1===this.data.length?this.$emit("select-change",-1):this.data.length-1===e?this.$emit("select-change",e-1):this.$emit("select-change",e),this.$nextTick((function(){t.data.splice(e,1),setTimeout((function(){s.a.$emit("on-history-add-"+t.formKey)}),20)}))},handleWidgetClone:function(e){var t=this,n=Object(c.a)(),o=Object(a.a)(Object(a.a)({},m.a.cloneDeep(this.data[e])),{},{key:n,model:this.data[e].type+"_"+n});this.data.splice(e+1,0,o),this.$nextTick((function(){t.selectWidget=t.data[e+1],t.$nextTick((function(){s.a.$emit("on-history-add-"+t.formKey)}))}))}},watch:{select:function(e){this.selectWidget=e},selectWidget:{handler:function(e){this.$emit("update:select",e)},deep:!0}}},Je=Object(v.a)(Xe,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.element&&e.element.key?n("div",{staticClass:"widget-table-view",class:{active:e.selectWidget.key===e.element.key,"is-required":e.element.options.required,"is-hidden":e.element.options.hidden,"has-error":!e.isModelValidate,mobile:"section"===e.mode},style:{width:"table"===e.mode?e.element.options.isWidgetWidth?2*e.element.options.width+"px":"200px":""},attrs:{type:e.currentType},on:{click:function(t){return t.stopPropagation(),e.handleSelectWidget(e.index)}}},["table"===e.mode?n("el-table",{attrs:{data:[{}],"row-class-name":"widget-table-row"}},[n("el-table-column",{attrs:{"header-align":"center",label:e.element.options.hideLabel?"":e.element.name,"label-class-name":e.element.options.required?"required":""}},[n(e.Elements[e.element.type],{tag:"component",attrs:{element:e.element,platform:e.platform,isInTable:!0}})],1)],1):e._e(),"section"===e.mode?[n(e.Elements[e.element.type],{tag:"component",attrs:{element:e.element,platform:e.platform,isInTable:!1}})]:e._e(),e.isModelValidate?e._e():n("div",{staticClass:"error-tip",attrs:{title:"请输入由英文、数字及'_'组成,以英文开头,长度为2-50的字符"}},[n("base-icon",{attrs:{"icon-class":"error-warning-fill"}}),e._v(' 组件ID错误:请输入由英文、数字及"_"组成,以英文开头,长度为2-50的字符 ')],1),e.selectWidget.key===e.element.key?n("div",{staticClass:"widget-view-action"},[n("base-icon",{attrs:{"icon-class":"file-copy-line",title:"复制"},on:{click:function(t){return t.stopPropagation(),e.handleWidgetClone(e.index)}}}),n("base-icon",{attrs:{"icon-class":"delete-bin-2-line",title:"删除"},on:{click:function(t){return t.stopPropagation(),e.handleWidgetDelete(e.index)}}})],1):e._e(),e.selectWidget.key===e.element.key?n("div",{staticClass:"widget-view-drag"},[n("base-icon",{attrs:{"icon-class":"drag-move-fill"}})],1):e._e()],2):e._e()}),[],!1,null,null,null).exports,Qe=function e(t){var n=Object(c.a)();return t.children?Object(a.a)(Object(a.a)({},t),{},{key:n,model:t.type+"_"+n,children:t.children.map((function(t){return t.children?Object(a.a)(Object(a.a)({},t),{},{children:t.children.map((function(t){return e(t)})),key:Object(c.a)(),model:t.type+"_"+Object(c.a)()}):e(t)}))}):Object(a.a)(Object(a.a)({},t),{},{key:n,model:t.type+"_"+n})},Ze={components:{Draggable:r.a,TableItem:Je},props:["element","select","index","data","platform","formKey"],data:function(){return{currentType:"table",selectWidget:this.select||{},columnsWidthStyle:"200px"}},computed:{mode:function(){return"pc"===this.platform?"section"===this.element.options.displayMode?"section":"table":"section"}},mounted:function(){this.calcTableColumnsWidth()},methods:{handleSelectWidget:function(e){this.selectWidget=this.data.list[e]},handleWidgetDelete:function(e){var t=this;1===this.data.list.length?this.$emit("select-change",-1):this.data.list.length-1===e?this.$emit("select-change",e-1):this.$emit("select-change",e),this.data.list.splice(e,1),setTimeout((function(){s.a.$emit("on-history-add-"+t.formKey)}),20)},handleTableClone:function(e){var t=this,n=m.a.cloneDeep(this.data.list[e]);this.data.list.splice(e+1,0,Qe(n)),this.$nextTick((function(){t.selectWidget=t.data.list[e+1],t.$nextTick((function(){s.a.$emit("on-history-add-"+t.formKey)}))}))},handleWidgetTableUpdate:function(e){var t=this;this.$nextTick((function(){s.a.$emit("on-history-add-"+t.formKey)}))},calcTableColumnsWidth:function(){this.columnsWidthStyle="calc(400px)";var e=this.element.children.map((function(e){return e.options.isWidgetWidth?"".concat(2*e.options.width,"px"):"200px"}));e.length&&(this.columnsWidthStyle="calc(400px + ".concat(e.join(" + "),")"))},handlePut:function(e,t,n){return Object(l.b)(n.getAttribute("type"),this.currentType)},handleWidgetTableAdd:function(e,t){var n=this,o=e.newIndex,r=Object(c.a)();this.$set(t.children,o,m.a.cloneDeep(t.children[o])),this.$set(t.children,o,Object(a.a)(Object(a.a)({},t.children[o]),{},{options:Object(a.a)(Object(a.a)({},t.children[o].options),{},{remoteFunc:t.children[o].options.remoteFunc||"func_"+r,remoteOptionSource:t.children[o].options.remoteOptionSource||"option_"+r,tableColumn:!0}),key:t.children[o].key?t.children[o].key:r,model:t.children[o].model?t.children[o].model:t.children[o].type+"_"+r,rules:t.children[o].rules?Object(i.a)(t.children[o].rules):[]})),this.selectWidget=t.children[o],this.$nextTick((function(){s.a.$emit("on-history-add-"+n.formKey)}))},handleSelectChange:function(e,t){var n=this;setTimeout((function(){n.selectWidget=e>=0?n.element.children[e]:n.data.list[n.index]}))}},watch:{select:function(e){this.selectWidget=e},selectWidget:{deep:!0,handler:function(e){this.$emit("update:select",e)}},element:{deep:!0,handler:function(e){this.calcTableColumnsWidth()}}}},et=Object(v.a)(Ze,(function(){var e,t=this,n=t.$createElement,o=t._self._c||n;return o("div",{staticClass:"widget-table"},[o("el-form-item",{class:(e={},e[t.element.options&&t.element.options.customClass]=t.element.options.customClass,e),attrs:{label:t.element.options.hideLabel?"":t.element.name,"label-width":t.element.options.hideLabel?"0px":t.element.options.isLabelWidth?t.element.options.labelWidth+"px":""}},[o("div",{staticClass:"widget-table-wrapper",class:{mobile:"section"===t.mode}},["table"===t.mode?o("el-table",{staticClass:"widget-table-left",attrs:{data:[{}],"row-class-name":"widget-table-row"}},[o("el-table-column",{attrs:{align:"center",label:"序号",type:"index",width:"50"}})],1):o("div",{staticClass:"widget-table-top"},[t.element.options.enableDynamicTableTitle&&t.element.options.relatedField?o("span",{staticClass:"renderer-table-mobile-title"},[t._v(" "+t._s(t.element.children.find((function(e){return e.model===t.element.options.relatedField}))?t.element.children.find((function(e){return e.model===t.element.options.relatedField})).name:"未配置")+" ")]):o("el-link",[t._v(t._s("{{编号}}"))])],1),o("div",{staticClass:"widget-table-content",class:{mobile:"section"===t.mode}},[0===t.element.children.length?o("div",{staticClass:"table-empty"},[t._v("拖拽组件到这里")]):t._e(),o("draggable",{staticClass:"widget-col-list",attrs:{animation:200,direction:"table"===t.mode?"horizontal":"vertical",group:{name:"icdTableDesigner",put:t.handlePut},"no-transition-on-drag":!0,ghostClass:"ghost",handle:".widget-view-drag"},on:{add:function(e){return t.handleWidgetTableAdd(e,t.element)},update:t.handleWidgetTableUpdate},model:{value:t.element.children,callback:function(e){t.$set(t.element,"children",e)},expression:"element.children"}},[o("transition-group",{staticClass:"widget-table-col",style:{width:"table"===t.mode?t.columnsWidthStyle:"100%"},attrs:{name:"fade",tag:"div"}},t._l(t.element.children,(function(e,n){return e.key?o("table-item",{key:e.key,attrs:{data:t.element.children,element:e,"form-key":t.formKey,index:n,mode:t.mode,platform:t.platform,select:t.selectWidget,tableElement:t.element},on:{"update:select":function(e){t.selectWidget=e},"select-change":function(n){return t.handleSelectChange(n,e)}}}):t._e()})),1)],1)],1)],1),t.element.options.maxLimit?o("span",{staticClass:"max-limit-tip"},[t._v("最多可填写 "+t._s(t.element.options.maxRows)+" 条数据,当前已填写 0 条")]):t._e()])],1)}),[],!1,null,null,null).exports,tt={name:"widget-inline",mixins:[p],components:{Draggable:r.a,BaseElementItem:function(){return Promise.resolve().then(n.bind(null,"71f6"))}},props:["element","select","index","children","platform","formKey"],data:function(){return{currentType:"inline"}}},nt={card:y,grid:C,collapse:E,report:M,tabs:L,table:et,inline:Object(v.a)(tt,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-inline",class:{"is-empty":0===e.element.children.length},attrs:{shadow:e.element.options.shadow}},[n("draggable",{staticClass:"widget-col-list",attrs:{animation:200,group:{name:"icdDesigner",put:e.handlePut},"no-transition-on-drag":!0,ghostClass:"ghost",handle:".widget-view-drag"},on:{add:function(t){return e.handlePluginAdd(t,e.element)},update:e.handlePluginUpdate},model:{value:e.element.children,callback:function(t){e.$set(e.element,"children",t)},expression:"element.children"}},[e._l(e.element.children,(function(t,o){return[t&&t.key?n("base-element-item",{key:t.key,attrs:{children:e.element.children,element:t,"form-key":e.formKey,index:o,platform:e.platform,select:e.selectWidget},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t)}}}):e._e()]}))],2)],1)}),[],!1,null,null,null).exports},ot=n("522e"),rt=n("fee3"),it={props:["element","select","index","children","formKey","platform","isInTable"],name:"BaseElementItem",data:function(){return{plugins:Ye,Containers:nt,selectWidget:this.select||{},componentConfig:ot.a,errorMessage:""}},computed:{isContainer:function(){return ot.a[this.element.type]&&ot.a[this.element.type].isContainer},isModelValidate:function(){var e=!0;return(rt.d[this.element.type]||"input"===this.element.type&&this.element.options.relatedFormEnabled)&&(e=this.element.options.relatedFormInfo.formId.length>0,this.updateErrorMessage("请选择关联表单"),e&&(e=this.element.options.relatedFormInfo.targetColumn.length>0,this.updateErrorMessage("请选择关联字段"))),e&&(e=j.test(this.element.model),this.updateErrorMessage('组件ID错误:请输入由英文、数字及"_"组成,以英文开头,长度为2-50的字符')),e},pluginLabelWidth:function(){return this.element.options.hideLabel?"0px":this.element.options.isLabelWidth?this.element.options.labelWidth+"px":""}},methods:{updateErrorMessage:function(e){this.errorMessage=e},handleSelectWidget:function(e){this.selectWidget=this.children[e]},handleWidgetDelete:function(e){var t=this;1===this.children.length?this.$emit("select-change",-1):this.children.length-1===e?this.$emit("select-change",e-1):this.$emit("select-change",e),this.$nextTick((function(){t.children.splice(e,1),setTimeout((function(){s.a.$emit("on-history-add-"+t.formKey)}),20)}))},handleWidgetClone:function(e){var t=this,n=m.a.cloneDeep(this.children[e]);this.children.splice(e+1,0,Qe(n)),this.$nextTick((function(){t.selectWidget=t.children[e+1],t.$nextTick((function(){s.a.$emit("on-history-add-"+t.formKey)}))}))},handleSelectChange:function(e){var t=this;setTimeout((function(){t.selectWidget=e>=0?t.widgetForm.list[e]:{}}))}},watch:{select:function(e){this.selectWidget=e},selectWidget:{handler:function(e){this.$emit("update:select",e)},deep:!0}}},at=Object(v.a)(it,(function(){var e,t=this,n=t.$createElement,o=t._self._c||n;return o("div",{staticClass:"widget-view",class:{active:t.selectWidget.key===t.element.key,"is-required":t.element.options.required,"is-hidden":t.element.options.hidden,"is-container":t.isContainer,"has-error":!t.isModelValidate},attrs:{type:t.element.type},on:{click:function(e){return e.stopPropagation(),t.handleSelectWidget(t.index)}}},[t.element&&t.element.key?[t.isContainer?o(t.Containers[t.element.type],{tag:"component",attrs:{children:t.element.children,element:t.element,index:t.index,formKey:t.formKey,platform:t.platform,select:t.selectWidget},on:{"update:select":function(e){t.selectWidget=e},"select-change":t.handleSelectChange}}):o("el-form-item",{class:(e={"no-form-label":!t.element.options.labelWidth},e[t.element.options&&t.element.options.customClass]=t.element.options.customClass,e),attrs:{label:t.element.options.hideLabel||!t.element.options.labelWidth?"":t.element.name,"label-width":t.pluginLabelWidth}},[o(t.plugins[t.element.type],{tag:"component",attrs:{element:t.element,platform:t.platform,isInTable:!1}})],1)]:t._e(),t.isModelValidate?t._e():o("div",{staticClass:"error-tip",attrs:{title:t.errorMessage}},[o("base-icon",{attrs:{"icon-class":"error-warning-fill"}}),t._v(" "+t._s("组件错误: "+t.errorMessage)+" ")],1),t.selectWidget.key===t.element.key?[o("div",{staticClass:"widget-view-action"},[t._t("default"),o("base-icon",{attrs:{"icon-class":"file-copy-line",title:"复制"},on:{click:function(e){return e.stopPropagation(),t.handleWidgetClone(t.index)}}}),o("base-icon",{attrs:{"icon-class":"delete-bin-2-line",title:"删除"},on:{click:function(e){return e.stopPropagation(),t.handleWidgetDelete(t.index)}}})],2),o("div",{staticClass:"widget-view-drag"},[o("base-icon",{attrs:{"icon-class":"drag-move-fill"}})],1)]:t._e()],2)}),[],!1,null,null,null);t.default=at.exports},"721a":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n("fd7c"),a=(o=i)&&o.__esModule?o:{default:o},s=n("ab5b");var l=function(){function e(t,n,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.canvas=t,this.encodings=n,this.options=o}return r(e,[{key:"render",value:function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var e=0;e<this.encodings.length;e++){var t=(0,a.default)(this.options,this.encodings[e].options);this.drawCanvasBarcode(t,this.encodings[e]),this.drawCanvasText(t,this.encodings[e]),this.moveCanvasDrawing(this.encodings[e])}this.restoreCanvas()}},{key:"prepareCanvas",value:function(){var e=this.canvas.getContext("2d");e.save(),(0,s.calculateEncodingAttributes)(this.encodings,this.options,e);var t=(0,s.getTotalWidthOfEncodings)(this.encodings),n=(0,s.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=t+this.options.marginLeft+this.options.marginRight,this.canvas.height=n,e.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(e.fillStyle=this.options.background,e.fillRect(0,0,this.canvas.width,this.canvas.height)),e.translate(this.options.marginLeft,0)}},{key:"drawCanvasBarcode",value:function(e,t){var n,o=this.canvas.getContext("2d"),r=t.data;n="top"==e.textPosition?e.marginTop+e.fontSize+e.textMargin:e.marginTop,o.fillStyle=e.lineColor;for(var i=0;i<r.length;i++){var a=i*e.width+t.barcodePadding;"1"===r[i]?o.fillRect(a,n,e.width,e.height):r[i]&&o.fillRect(a,n,e.width,e.height*r[i])}}},{key:"drawCanvasText",value:function(e,t){var n,o,r=this.canvas.getContext("2d"),i=e.fontOptions+" "+e.fontSize+"px "+e.font;e.displayValue&&(o="top"==e.textPosition?e.marginTop+e.fontSize-e.textMargin:e.height+e.textMargin+e.marginTop+e.fontSize,r.font=i,"left"==e.textAlign||t.barcodePadding>0?(n=0,r.textAlign="left"):"right"==e.textAlign?(n=t.width-1,r.textAlign="right"):(n=t.width/2,r.textAlign="center"),r.fillText(t.text,n,o))}},{key:"moveCanvasDrawing",value:function(e){this.canvas.getContext("2d").translate(e.width,0)}},{key:"restoreCanvas",value:function(){this.canvas.getContext("2d").restore()}}]),e}();t.default=l},7418:function(e,t){t.f=Object.getOwnPropertySymbols},7461:function(e,t,n){"use strict";var o={name:"BaseIcon",props:{iconClass:String}},r=(n("b3f1"),n("2877")),i=Object(r.a)(o,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("i",{staticClass:"base-icon",class:"ri-"+e.iconClass,on:{click:function(t){return e.$emit("click",t)}}})}),[],!1,null,"3e34b48e",null);t.a=i.exports},"746f":function(e,t,n){var o=n("428f"),r=n("1a2d"),i=n("e538"),a=n("9bf2").f;e.exports=function(e){var t=o.Symbol||(o.Symbol={});r(t,e)||a(t,e,{value:i.f(e)})}},"752b":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=a(n("721a")),r=a(n("be5e")),i=a(n("4ced"));function a(e){return e&&e.__esModule?e:{default:e}}t.default={CanvasRenderer:o.default,SVGRenderer:r.default,ObjectRenderer:i.default}},7694:function(e,t,n){"use strict";n.d(t,"m",(function(){return y})),n.d(t,"f",(function(){return _})),n.d(t,"g",(function(){return w})),n.d(t,"n",(function(){return x})),n.d(t,"l",(function(){return C})),n.d(t,"o",(function(){return O})),n.d(t,"j",(function(){return S})),n.d(t,"i",(function(){return k})),n.d(t,"e",(function(){return E})),n.d(t,"h",(function(){return T})),n.d(t,"k",(function(){return D})),n.d(t,"p",(function(){return A})),n.d(t,"d",(function(){return M})),n.d(t,"q",(function(){return R})),n.d(t,"b",(function(){return P})),n.d(t,"a",(function(){return I})),n.d(t,"c",(function(){return L}));n("d9e2");var o=null,r=null,i=null,a=null,s=null,l=null,c=null,u=null,d=null,f=null,m=null,p=null,h=null,g=null,v=null,b=null,y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o=e.getDictItemsByParentId,r=e.getDictListByPage,i=e.ossServiceInfo,e.fileDownload,a=e.getUserList,s=e.searchUser,l=e.getOrgTree,c=e.getFormInfoListByPage,u=e.getColumnList,d=e.getFormDataListByPage,f=e.getThirdApiListByPage,m=e.triggerThirdApi,p=e.exportFormModel2Excel,h=e.uploadExcel,g=e.excelData2Table,v=e.batchDownload,b=e.exportFormData},_=function(e){return o?o(e):new Error("adapter must use after initialization!")},w=function(e){return r?r(e):new Error("adapter must use after initialization!")},x=function(e){return i?i(e):new Error("adapter must use after initialization!")},C=function(e){return a?a(e):new Error("adapter must use after initialization!")},O=function(e){return s?s(e):new Error("adapter must use after initialization!")},S=function(e){return l?l(e):new Error("adapter must use after initialization!")},k=function(e){return c?c(e):new Error("adapter must use after initialization!")},E=function(e){return u?u(e):new Error("adapter must use after initialization!")},T=function(e){return d?d(e):new Error("adapter must use after initialization!")},D=function(e){return f?f(e):new Error("adapter must use after initialization!")},A=function(e){return m?m(e):new Error("adapter must use after initialization!")},M=function(e){return p?p(e):new Error("adapter must use after initialization!")},R=function(e){return h?h(e):new Error("adapter must use after initialization!")},P=function(e){return g?g(e):new Error("adapter must use after initialization!")},I=function(e){return v?v(e):new Error("adapter must use after initialization!")},L=function(e){return b?b(e):new Error("adapter must use after initialization!")}},7839:function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"785a":function(e,t,n){var o=n("cc12")("span").classList,r=o&&o.constructor&&o.constructor.prototype;e.exports=r===Object.prototype?void 0:r},"79f1":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.marginTop=e.marginTop||e.margin,e.marginBottom=e.marginBottom||e.margin,e.marginRight=e.marginRight||e.margin,e.marginLeft=e.marginLeft||e.margin,e}},"7a77":function(e,t,n){"use strict";function o(e){this.message=e}o.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},o.prototype.__CANCEL__=!0,e.exports=o},"7aac":function(e,t,n){"use strict";var o=n("c532");e.exports=o.isStandardBrowserEnv()?{write:function(e,t,n,r,i,a){var s=[];s.push(e+"="+encodeURIComponent(t)),o.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),o.isString(r)&&s.push("path="+r),o.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},"7afc":function(e,t,n){"use strict";n("a9e3"),n("d81d"),n("d3b7"),n("159b"),n("b0c0"),n("a434"),n("c740"),n("99af"),n("4de4");var o=n("7694"),r=n("5530"),i=(n("b64b"),n("07ac"),n("b680"),n("8bbf")),a=n.n(i);const s=a.a.prototype.$isServer,l=/([\:\-\_]+(.))/g,c=/^moz([A-Z])/,u=s?0:Number(document.documentMode),d=function(e){return e.replace(l,(function(e,t,n,o){return o?n.toUpperCase():n})).replace(c,"Moz$1")},f=!s&&document.addEventListener?function(e,t,n){e&&t&&n&&e.addEventListener(t,n,!1)}:function(e,t,n){e&&t&&n&&e.attachEvent("on"+t,n)},m=!s&&document.removeEventListener?function(e,t,n){e&&t&&e.removeEventListener(t,n,!1)}:function(e,t,n){e&&t&&e.detachEvent("on"+t,n)};function p(e,t){if(!e||!t)return!1;if(-1!==t.indexOf(" "))throw new Error("className should not contain space.");return e.classList?e.classList.contains(t):(" "+e.className+" ").indexOf(" "+t+" ")>-1}function h(e,t){if(e){for(var n=e.className,o=(t||"").split(" "),r=0,i=o.length;r<i;r++){var a=o[r];a&&(e.classList?e.classList.add(a):p(e,a)||(n+=" "+a))}e.classList||e.setAttribute("class",n)}}function g(e,t){if(e&&t){for(var n=t.split(" "),o=" "+e.className+" ",r=0,i=n.length;r<i;r++){var a=n[r];a&&(e.classList?e.classList.remove(a):p(e,a)&&(o=o.replace(" "+a+" "," ")))}e.classList||e.setAttribute("class",(o||"").replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g,""))}}const v=u<9?function(e,t){if(!s){if(!e||!t)return null;"float"===(t=d(t))&&(t="styleFloat");try{switch(t){case"opacity":try{return e.filters.item("alpha").opacity/100}catch(e){return 1}default:return e.style[t]||e.currentStyle?e.currentStyle[t]:null}}catch(n){return e.style[t]}}}:function(e,t){if(!s){if(!e||!t)return null;"float"===(t=d(t))&&(t="cssFloat");try{var n=document.defaultView.getComputedStyle(e,"");return e.style[t]||n?n[t]:null}catch(n){return e.style[t]}}};let b=e=>e&&"[object Function]"==={}.toString.call(e);"object"==typeof Int8Array||!a.a.prototype.$isServer&&document.childNodes;Object.prototype.hasOwnProperty;function y(e){let t=!1;return function(...n){t||(t=!0,window.requestAnimationFrame(o=>{e.apply(this,n),t=!1}))}}let _,w=!1,x=!1;const C=function(){if(a.a.prototype.$isServer)return;let e=S.modalDom;return e?w=!0:(w=!1,e=document.createElement("div"),S.modalDom=e,e.addEventListener("touchmove",(function(e){e.preventDefault(),e.stopPropagation()})),e.addEventListener("click",(function(){S.doOnModalClick&&S.doOnModalClick()}))),e},O={},S={modalFade:!0,getInstance:function(e){return O[e]},register:function(e,t){e&&t&&(O[e]=t)},deregister:function(e){e&&(O[e]=null,delete O[e])},nextZIndex:function(){return S.zIndex++},modalStack:[],doOnModalClick:function(){const e=S.modalStack[S.modalStack.length-1];if(!e)return;const t=S.getInstance(e.id);t&&t.closeOnClickModal&&t.close()},openModal:function(e,t,n,o,r){if(a.a.prototype.$isServer)return;if(!e||void 0===t)return;this.modalFade=r;const i=this.modalStack;for(let t=0,n=i.length;t<n;t++){if(i[t].id===e)return}const s=C();if(h(s,"v-modal"),this.modalFade&&!w&&h(s,"v-modal-enter"),o){o.trim().split(/\s+/).forEach(e=>h(s,e))}setTimeout(()=>{g(s,"v-modal-enter")},200),n&&n.parentNode&&11!==n.parentNode.nodeType?n.parentNode.appendChild(s):document.body.appendChild(s),t&&(s.style.zIndex=t),s.tabIndex=0,s.style.display="",this.modalStack.push({id:e,zIndex:t,modalClass:o})},closeModal:function(e){const t=this.modalStack,n=C();if(t.length>0){const o=t[t.length-1];if(o.id===e){if(o.modalClass){o.modalClass.trim().split(/\s+/).forEach(e=>g(n,e))}t.pop(),t.length>0&&(n.style.zIndex=t[t.length-1].zIndex)}else for(let n=t.length-1;n>=0;n--)if(t[n].id===e){t.splice(n,1);break}}0===t.length&&(this.modalFade&&h(n,"v-modal-leave"),setTimeout(()=>{0===t.length&&(n.parentNode&&n.parentNode.removeChild(n),n.style.display="none",S.modalDom=void 0),g(n,"v-modal-leave")},200))}};Object.defineProperty(S,"zIndex",{configurable:!0,get:()=>(x||(_=_||(a.a.prototype.$ELEMENT||{}).zIndex||2e3,x=!0),_),set(e){_=e}});a.a.prototype.$isServer||window.addEventListener("keydown",(function(e){if(27===e.keyCode){const e=function(){if(!a.a.prototype.$isServer&&S.modalStack.length>0){const e=S.modalStack[S.modalStack.length-1];if(!e)return;return S.getInstance(e.id)}}();e&&e.closeOnPressEscape&&(e.handleClose?e.handleClose():e.handleAction?e.handleAction("cancel"):e.close())}}));var k=S;let E;let T,D=1;Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;var A={CONTAIN:{name:"contain",icon:"el-icon-full-screen"},ORIGINAL:{name:"original",icon:"el-icon-c-scale-to-original"}},M=!a.a.prototype.$isServer&&window.navigator.userAgent.match(/firefox/i)?"DOMMouseScroll":"mousewheel",R={name:"elImageViewer",props:{urlList:{type:Array,default:function(){return[]}},zIndex:{type:Number,default:2e3},onSwitch:{type:Function,default:function(){}},onClose:{type:Function,default:function(){}},initialIndex:{type:Number,default:0},appendToBody:{type:Boolean,default:!0},maskClosable:{type:Boolean,default:!0}},data:function(){return{index:this.initialIndex,isShow:!1,infinite:!0,loading:!1,mode:A.CONTAIN,transform:{scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}}},computed:{isSingle:function(){return this.urlList.length<=1},isFirst:function(){return 0===this.index},isLast:function(){return this.index===this.urlList.length-1},currentImg:function(){return this.urlList[this.index]},imgStyle:function(){var e=this.transform,t=e.scale,n=e.deg,o=e.offsetX,r=e.offsetY,i=e.enableTransition,a={transform:"scale(".concat(t,") rotate(").concat(n,"deg)"),transition:i?"transform .3s":"","margin-left":"".concat(o,"px"),"margin-top":"".concat(r,"px")};return this.mode===A.CONTAIN&&(a.maxWidth=a.maxHeight="100%"),a},viewerZIndex:function(){var e=k.nextZIndex();return this.zIndex>e?this.zIndex:e}},watch:{index:{handler:function(e){this.reset(),this.onSwitch(e)}},currentImg:function(e){var t=this;this.$nextTick((function(e){t.$refs.img[0].complete||(t.loading=!0)}))}},methods:{hide:function(){this.deviceSupportUninstall(),this.onClose()},deviceSupportInstall:function(){var e=this;this._keyDownHandler=function(t){switch(t.stopPropagation(),t.keyCode){case 27:e.hide();break;case 32:e.toggleMode();break;case 37:e.prev();break;case 38:e.handleActions("zoomIn");break;case 39:e.next();break;case 40:e.handleActions("zoomOut")}},this._mouseWheelHandler=y((function(t){(t.wheelDelta?t.wheelDelta:-t.detail)>0?e.handleActions("zoomIn",{zoomRate:.015,enableTransition:!1}):e.handleActions("zoomOut",{zoomRate:.015,enableTransition:!1})})),f(document,"keydown",this._keyDownHandler),f(document,M,this._mouseWheelHandler)},deviceSupportUninstall:function(){m(document,"keydown",this._keyDownHandler),m(document,M,this._mouseWheelHandler),this._keyDownHandler=null,this._mouseWheelHandler=null},handleImgLoad:function(e){this.loading=!1},handleImgError:function(e){this.loading=!1,e.target.alt="加载失败"},handleMouseDown:function(e){var t=this;if(!this.loading&&0===e.button){var n=this.transform,o=n.offsetX,r=n.offsetY,i=e.pageX,a=e.pageY;this._dragHandler=y((function(e){t.transform.offsetX=o+e.pageX-i,t.transform.offsetY=r+e.pageY-a})),f(document,"mousemove",this._dragHandler),f(document,"mouseup",(function(e){m(document,"mousemove",t._dragHandler)})),e.preventDefault()}},handleMaskClick:function(){this.maskClosable&&this.hide()},reset:function(){this.transform={scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}},toggleMode:function(){if(!this.loading){var e=Object.keys(A),t=(Object.values(A).indexOf(this.mode)+1)%e.length;this.mode=A[e[t]],this.reset()}},prev:function(){if(!this.isFirst||this.infinite){var e=this.urlList.length;this.index=(this.index-1+e)%e}},next:function(){if(!this.isLast||this.infinite){var e=this.urlList.length;this.index=(this.index+1)%e}},handleActions:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.loading){var n=Object(r.a)({zoomRate:.2,rotateDeg:90,enableTransition:!0},t),o=n.zoomRate,i=n.rotateDeg,a=n.enableTransition,s=this.transform;switch(e){case"zoomOut":s.scale>.2&&(s.scale=parseFloat((s.scale-o).toFixed(3)));break;case"zoomIn":s.scale=parseFloat((s.scale+o).toFixed(3));break;case"clocelise":s.deg+=i;break;case"anticlocelise":s.deg-=i}s.enableTransition=a}}},mounted:function(){this.deviceSupportInstall(),this.appendToBody&&document.body.appendChild(this.$el),this.$refs["el-image-viewer__wrapper"].focus()},destroyed:function(){this.appendToBody&&this.$el&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el)}},P=n("2877"),I={name:"UploadImageComponent",components:{ImagePreviewer:Object(P.a)(R,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:"viewer-fade"}},[n("div",{ref:"el-image-viewer__wrapper",staticClass:"el-image-viewer__wrapper",style:{"z-index":e.viewerZIndex},attrs:{tabindex:"-1"}},[n("div",{staticClass:"el-image-viewer__mask",on:{click:function(t){return t.target!==t.currentTarget?null:e.handleMaskClick.apply(null,arguments)}}}),n("span",{staticClass:"el-image-viewer__btn el-image-viewer__close",on:{click:e.hide}},[n("i",{staticClass:"el-icon-close"})]),e.isSingle?e._e():[n("span",{staticClass:"el-image-viewer__btn el-image-viewer__prev",class:{"is-disabled":!e.infinite&&e.isFirst},on:{click:e.prev}},[n("i",{staticClass:"el-icon-arrow-left"})]),n("span",{staticClass:"el-image-viewer__btn el-image-viewer__next",class:{"is-disabled":!e.infinite&&e.isLast},on:{click:e.next}},[n("i",{staticClass:"el-icon-arrow-right"})])],n("div",{staticClass:"el-image-viewer__btn el-image-viewer__actions"},[n("div",{staticClass:"el-image-viewer__actions__inner"},[n("i",{staticClass:"el-icon-zoom-out",on:{click:function(t){return e.handleActions("zoomOut")}}}),n("i",{staticClass:"el-icon-zoom-in",on:{click:function(t){return e.handleActions("zoomIn")}}}),n("i",{staticClass:"el-image-viewer__actions__divider"}),n("i",{class:e.mode.icon,on:{click:e.toggleMode}}),n("i",{staticClass:"el-image-viewer__actions__divider"}),n("i",{staticClass:"el-icon-refresh-left",on:{click:function(t){return e.handleActions("anticlocelise")}}}),n("i",{staticClass:"el-icon-refresh-right",on:{click:function(t){return e.handleActions("clocelise")}}})])]),n("div",{staticClass:"el-image-viewer__canvas"},e._l(e.urlList,(function(t,o){return o===e.index?n("img",{key:t,ref:"img",refInFor:!0,staticClass:"el-image-viewer__img",style:e.imgStyle,attrs:{src:e.currentImg},on:{load:e.handleImgLoad,error:e.handleImgError,mousedown:e.handleMouseDown}}):e._e()})),0)],2)])}),[],!1,null,null,null).exports},props:{value:{type:Array,default:function(){return[]}},multiple:{type:Boolean,default:!1},limit:{type:Number,default:9},size:{type:Number,default:50},disabled:{type:Boolean,default:!1},tip:{type:String,default:""},printRead:{type:Boolean,default:!1}},model:{prop:"value",event:"change"},data:function(){return{fileList:[],serverInfo:Object(o.n)(),dialogImageUrl:"",dialogVisible:!1}},created:function(){this.fileList=(this.value||[]).map((function(e){return e.status="success",e})),this.handleEmitChange()},methods:{handleRemove:function(e,t){this.fileList=t,this.$emit("onRemove",e),this.handleEmitChange()},handlePreview:function(e){this.dialogImageUrl=e.url,this.dialogVisible=!0},handleClosePreview:function(){this.dialogImageUrl="",this.dialogVisible=!1},handleSuccess:function(e,t,n){if("0000"!==e.code){this.$message.error("文件上传失败!");var o=0;return n.forEach((function(e,n){e.name===t.name&&(o=n)})),void n.splice(o,1)}this.$emit("onSuccess");var r=n.findIndex((function(e){return e.uid===t.uid}));r>=0&&(n[r]={status:"success",name:t.name,url:"".concat(this.serverInfo.baseUrl).concat(e.data&&e.data.length&&e.data[0])},this.fileList=n,this.handleEmitChange())},handleExceed:function(e,t){this.$message.warning("本次选择了 ".concat(e.length," 个图片,共选择了 ").concat(e.length+t.length," 个图片,已超出当前限制 ").concat(this.limit," 个图片"))},handleDownload:function(e){},handleBeforeUpload:function(e){if(e.size>1024*this.size*1024)return this.$message.error("".concat(e.name," 图片大小已大于 ").concat(this.size," MB ,上传失败!")),!1},handleEmitChange:function(){var e=this.fileList.filter((function(e){return"success"===e.status})).map((function(e){return{name:e.name,url:e.url}}));this.$emit("change",e)}}},L=(n("073a"),Object(P.a)(I,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-upload",{staticClass:"iss-upload-file",class:{"print-read":e.printRead},attrs:{action:e.serverInfo.action,"before-upload":e.handleBeforeUpload,disabled:e.disabled||e.printRead,"file-list":e.fileList,headers:e.serverInfo.headers,limit:e.limit,multiple:e.multiple,"on-exceed":e.handleExceed,"on-preview":e.handlePreview,"on-remove":e.handleRemove,"on-success":e.handleSuccess,accept:"image/*","list-type":"picture-card"}},[n("div",{staticClass:"iss-upload-button",attrs:{size:"mini",type:"primary"}},[n("base-icon",{attrs:{"icon-class":"image-add-fill"}})],1),n("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[e._v(" 1.限制上传 "+e._s(e.multiple?e.limit:"1")+" 个图片,且每个附件不超过 "+e._s(e.size)+" MB "),n("br"),e._v("2.只能上传图片类型文件 "),e.tip?[n("br"),e._v("3."+e._s(e.tip))]:e._e(),e.dialogVisible?n("image-previewer",{attrs:{"on-close":e.handleClosePreview,"url-list":[e.dialogImageUrl],"z-index":1e4,"append-to-body":"","mask-closable":""}}):e._e()],2)])}),[],!1,null,null,null));t.a=L.exports},"7b0b":function(e,t,n){var o=n("da84"),r=n("1d80"),i=o.Object;e.exports=function(e){return i(r(e))}},"7b30":function(e,t,n){"use strict";n("a9e3");var o={name:"TextComponent",props:{align:{type:String,default:"left"},fontSize:{type:String,default:"14px"},fontColor:{type:String,default:"#3E464C"},fontWeight:{type:String,default:"normal"},fontStyle:{type:String,default:"normal"},fontFamily:{type:String,default:"inherit"},marginTop:Number,marginBottom:Number}},r=(n("404a"),n("2877")),i=Object(r.a)(o,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",{staticClass:"text-component",style:{textAlign:e.align,color:e.fontColor,fontSize:e.fontSize,fontStyle:e.fontStyle,fontWeight:e.fontWeight,fontFamily:e.fontFamily,marginTop:e.marginTop+"px",marginBottom:e.marginBottom+"px"}},[e._t("default")],2)}),[],!1,null,"71ca9a5c",null);t.a=i.exports},"7c4f":function(e,t){!function(){"use strict";var e,t,n,o,r,i=function(e){var t=e;return{get:function(){return t},set:function(e){t=e}}},a=tinymce.util.Tools.resolve("tinymce.PluginManager"),s=(e="array",function(t){return o=typeof(n=t),(null===n?"null":"object"===o&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"===o&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":o)===e;var n,o}),l=function(e){return!function(e){return null==e}(e)},c=function(e){return function(t){return typeof t===e}}("function"),u=function(){},d=function(e){return function(){return e}},f=function(e){return e},m=d(!1),p=d(!0),h=function(){return g},g={fold:function(e,t){return e()},isSome:m,isNone:p,getOr:n=f,getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:d(null),getOrUndefined:d(void 0),or:n,orThunk:t,map:h,each:u,bind:h,exists:m,forall:p,filter:function(){return h()},toArray:function(){return[]},toString:d("none()")},v=function(e){var t=d(e),n=function(){return r},o=function(t){return t(e)},r={fold:function(t,n){return n(e)},isSome:p,isNone:m,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:n,orThunk:n,map:function(t){return v(t(e))},each:function(t){t(e)},bind:o,exists:o,forall:o,filter:function(t){return t(e)?r:g},toArray:function(){return[e]},toString:function(){return"some("+e+")"}};return r},b={some:v,none:h,from:function(e){return null==e?g:v(e)}},y=Array.prototype.slice,_=Array.prototype.push,w=function(e,t){for(var n=0,o=e.length;n<o;n++){if(t(e[n],n))return!0}return!1},x=function(e,t){for(var n=e.length,o=new Array(n),r=0;r<n;r++){var i=e[r];o[r]=t(i,r)}return o},C=function(e,t){for(var n=0,o=e.length;n<o;n++){t(e[n],n)}},O=function(e,t){return function(e){for(var t=[],n=0,o=e.length;n<o;++n){if(!s(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);_.apply(t,e[n])}return t}(x(e,t))},S=c(Array.from)?Array.from:function(e){return y.call(e)},k=function(){return(k=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},E=function(){var e=function(e){var t=i(b.none()),n=function(){return t.get().each(e)};return{clear:function(){n(),t.set(b.none())},isSet:function(){return t.get().isSome()},get:function(){return t.get()},set:function(e){n(),t.set(b.some(e))}}}(u);return k(k({},e),{on:function(t){return e.get().each(t)}})},T=function(e,t,n){return""===t||e.length>=t.length&&e.substr(n,n+t.length)===t},D=tinymce.util.Tools.resolve("tinymce.Env"),A=tinymce.util.Tools.resolve("tinymce.util.Delay"),M=tinymce.util.Tools.resolve("tinymce.util.Promise"),R=tinymce.util.Tools.resolve("tinymce.util.VK"),P=function(e,t){return e.fire("PastePlainTextToggle",{state:t})},I=tinymce.util.Tools.resolve("tinymce.util.Tools"),L=function(e){return e.getParam("paste_data_images",!1)},j=function(e){return e.getParam("paste_merge_formats",!0)},z=function(e){return e.getParam("paste_retain_style_properties")},F=function(e){return e.getParam("validate")},B=function(e){return e.getParam("allow_html_data_urls",!1,"boolean")},N=function(e){return e.getParam("paste_data_images",!1,"boolean")},V=function(e){return I.explode(e.getParam("images_file_types","jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp","string"))},H=function(e){return-1!==e.indexOf("\x3c!-- x-tinymce/html --\x3e")},$=d("x-tinymce/html"),U=Object.hasOwnProperty,W=function(e,t){return U.call(e,t)},q=tinymce.util.Tools.resolve("tinymce.html.Entities"),K=function(e,t,n){var o=e.split(/\n\n/),r=function(e,t){var n=[],o="<"+e;if("object"==typeof t){for(var r in t)W(t,r)&&n.push(r+'="'+q.encodeAllRaw(t[r])+'"');n.length&&(o+=" "+n.join(" "))}return o+">"}(t,n),i="</"+t+">",a=I.map(o,(function(e){return e.split(/\n/).join("<br />")}));return 1===a.length?a[0]:I.map(a,(function(e){return r+e+i})).join("")},G=tinymce.util.Tools.resolve("tinymce.html.DomParser"),Y=tinymce.util.Tools.resolve("tinymce.html.Serializer"),X=tinymce.util.Tools.resolve("tinymce.html.Node"),J=tinymce.util.Tools.resolve("tinymce.html.Schema"),Q=function(e,t){return I.each(t,(function(t){e=t.constructor===RegExp?e.replace(t,""):e.replace(t[0],t[1])})),e},Z=function(e){return e=Q(e,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,function(e,t,n){return t||n?" ":" "}],/<br class="Apple-interchange-newline">/g,/<br>$/i])},ee=function(e){return/<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^']*\bmso-|w:WordDocument/i.test(e)||/class="OutlineElement/.test(e)||/id="?docs\-internal\-guid\-/.test(e)},te=function(e){var t=!1;return e=e.replace(/^[\u00a0 ]+/,""),I.each([/^[IVXLMCD]+\.[ \u00a0]/,/^[ivxlmcd]+\.[ \u00a0]/,/^[a-z]{1,2}[\.\)][ \u00a0]/,/^[A-Z]{1,2}[\.\)][ \u00a0]/,/^[0-9]+\.[ \u00a0]/,/^[\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+\.[ \u00a0]/,/^[\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d\u62fe]+\.[ \u00a0]/],(function(n){if(n.test(e))return t=!0,!1})),t},ne=function(e,t,n,o){var r={},i=e.dom.parseStyle(o);I.each(i,(function(i,a){switch(a){case"mso-list":var s=/\w+ \w+([0-9]+)/i.exec(o);s&&(n._listLevel=parseInt(s[1],10)),/Ignore/i.test(i)&&n.firstChild&&(n._listIgnore=!0,n.firstChild._listIgnore=!0);break;case"horiz-align":a="text-align";break;case"vert-align":a="vertical-align";break;case"font-color":case"mso-foreground":a="color";break;case"mso-background":case"mso-highlight":a="background";break;case"font-weight":case"font-style":return void("normal"!==i&&(r[a]=i));case"mso-element":if(/^(comment|comment-list)$/i.test(i))return void n.remove()}0!==a.indexOf("mso-comment")?0!==a.indexOf("mso-")&&("all"===z(e)||t&&t[a])&&(r[a]=i):n.remove()})),/(bold)/i.test(r["font-weight"])&&(delete r["font-weight"],n.wrap(new X("b",1))),/(italic)/i.test(r["font-style"])&&(delete r["font-style"],n.wrap(new X("i",1)));var a=e.dom.serializeStyle(r,n.name);return a||null},oe=function(e,t){var n,o=z(e);o&&(n=I.makeMap(o.split(/[, ]/))),t=Q(t,[/<br class="?Apple-interchange-newline"?>/gi,/<b[^>]+id="?docs-internal-[^>]*>/gi,/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/&nbsp;/gi," "],[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(e,t){return t.length>0?t.replace(/./," ").slice(Math.floor(t.length/2)).split("").join(" "):""}]]);var r=function(e){return e.getParam("paste_word_valid_elements","-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody")}(e),i=J({valid_elements:r,valid_children:"-li[p]"});I.each(i.elements,(function(e){e.attributes.class||(e.attributes.class={},e.attributesOrder.push("class")),e.attributes.style||(e.attributes.style={},e.attributesOrder.push("style"))}));var a=G({},i);a.addAttributeFilter("style",(function(t){for(var o,r=t.length;r--;)(o=t[r]).attr("style",ne(e,n,o,o.attr("style"))),"span"===o.name&&o.parent&&!o.attributes.length&&o.unwrap()})),a.addAttributeFilter("class",(function(e){for(var t,n,o=e.length;o--;)n=(t=e[o]).attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(n)&&t.remove(),t.attr("class",null)})),a.addNodeFilter("del",(function(e){for(var t=e.length;t--;)e[t].remove()})),a.addNodeFilter("a",(function(e){for(var t,n,o,r=e.length;r--;)if(n=(t=e[r]).attr("href"),o=t.attr("name"),n&&-1!==n.indexOf("#_msocom_"))t.remove();else if(n&&0===n.indexOf("file://")&&(n=n.split("#")[1])&&(n="#"+n),n||o){if(o&&!/^_?(?:toc|edn|ftn)/i.test(o)){t.unwrap();continue}t.attr({href:n,name:o})}else t.unwrap()}));var s=a.parse(t);return function(e){return e.getParam("paste_convert_word_fake_lists",!0)}(e)&&function(e){for(var t,n,o=1,r=function(e){var t="";if(3===e.type)return e.value;if(e=e.firstChild)do{t+=r(e)}while(e=e.next);return t},i=function(e,t){if(3===e.type&&t.test(e.value))return e.value=e.value.replace(t,""),!1;if(e=e.firstChild)do{if(!i(e,t))return!1}while(e=e.next);return!0},a=function(e){if(e._listIgnore)e.remove();else if(e=e.firstChild)do{a(e)}while(e=e.next)},s=function(e,r,s){var l=e._listLevel||o;l!==o&&(l<o?t&&(t=t.parent.parent):(n=t,t=null)),t&&t.name===r?t.append(e):(n=n||t,t=new X(r,1),s>1&&t.attr("start",""+s),e.wrap(t)),e.name="li",l>o&&n&&n.lastChild.append(t),o=l,a(e),i(e,/^\u00a0+/),i(e,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),i(e,/^\u00a0+/)},l=[],c=e.firstChild;null!=c;)if(l.push(c),null!==(c=c.walk()))for(;void 0!==c&&c.parent!==e;)c=c.walk();for(var u=0;u<l.length;u++)if("p"===(e=l[u]).name&&e.firstChild){var d=r(e);if(/^[\s\u00a0]*[\u2022\u00b7\u00a7\u25CF]\s*/.test(d)){s(e,"ul");continue}if(te(d)){var f=/([0-9]+)\./.exec(d),m=1;f&&(m=parseInt(f[1],10)),s(e,"ol",m);continue}if(e._listLevel){s(e,"ul",1);continue}t=null}else n=t,t=null}(s),t=Y({validate:F(e)},i).serialize(s)},re=function(e,t){return{content:e,cancelled:t}},ie=function(e,t,n,o){var r=function(e,t,n,o){return e.fire("PastePreProcess",{content:t,internal:n,wordContent:o})}(e,t,n,o),i=function(e,t){var n=G({},e.schema);n.addNodeFilter("meta",(function(e){I.each(e,(function(e){e.remove()}))}));var o=n.parse(t,{forced_root_block:!1,isRootContent:!0});return Y({validate:F(e)},e.schema).serialize(o)}(e,r.content);return e.hasEventListeners("PastePostProcess")&&!r.isDefaultPrevented()?function(e,t,n,o){var r=e.dom.create("div",{style:"display:none"},t),i=function(e,t,n,o){return e.fire("PastePostProcess",{node:t,internal:n,wordContent:o})}(e,r,n,o);return re(i.node.innerHTML,i.isDefaultPrevented())}(e,i,n,o):re(i,r.isDefaultPrevented())},ae=function(e,t,n){var o=ee(t),r=o?function(e,t){return function(e){return e.getParam("paste_enable_default_filters",!0)}(e)?oe(e,t):t}(e,t):t;return ie(e,r,n,o)},se=function(e,t){return e.insertContent(t,{merge:j(e),paste:!0}),!0},le=function(e){return/^https?:\/\/[\w\?\-\/+=.&%@~#]+$/i.test(e)},ce=function(e,t){return le(t)&&w(V(e),(function(e){return n=t.toLowerCase(),o="."+e.toLowerCase(),T(n,o,n.length-o.length);var n,o}))},ue=function(e,t,n){return!(!1!==e.selection.isCollapsed()||!le(t))&&function(e,t,n){return e.undoManager.extra((function(){n(e,t)}),(function(){e.execCommand("mceInsertLink",!1,t)})),!0}(e,t,n)},de=function(e,t,n){return!!ce(e,t)&&function(e,t,n){return e.undoManager.extra((function(){n(e,t)}),(function(){e.insertContent('<img src="'+t+'">')})),!0}(e,t,n)},fe=function(e,t,n){n||!1===function(e){return e.getParam("smart_paste",!0)}(e)?se(e,t):function(e,t){I.each([ue,de,se],(function(n){return!0!==n(e,t,se)}))}(e,t)},me=function(e){return"\n"===e||"\r"===e},pe=function(e,t){var n,o,r=(n=" ",(o=function(e){return e.getParam("paste_tab_spaces",4,"number")}(e))<=0?"":new Array(o+1).join(n)),i=t.replace(/\t/g,r);return function(e,t,n){return C(e,(function(e,o){n=t(n,e,o)})),n}(i,(function(e,t){return function(e){return-1!==" \f\t\v".indexOf(e)}(t)||" "===t?e.pcIsSpace||""===e.str||e.str.length===i.length-1||function(e,t){return t<e.length&&t>=0&&me(e[t])}(i,e.str.length+1)?{pcIsSpace:!1,str:e.str+" "}:{pcIsSpace:!0,str:e.str+" "}:{pcIsSpace:me(t),str:e.str+t}}),{pcIsSpace:!1,str:""}).str},he=function(e,t,n,o){var r=ae(e,t,n);!1===r.cancelled&&fe(e,r.content,o)},ge=function(e,t,n){var o=n||H(t);he(e,function(e){return e.replace("\x3c!-- x-tinymce/html --\x3e","")}(t),o,!1)},ve=function(e,t){var n=e.dom.encode(t).replace(/\r\n/g,"\n"),o=function(e,t,n){return t?K(e,!0===t?"p":t,n):function(e){return e.replace(/\r?\n/g,"<br>")}(e)}(pe(e,n),function(e){return e.getParam("forced_root_block")}(e),function(e){return e.getParam("forced_root_block_attrs")}(e));he(e,o,!1,!0)},be=function(e){var t={};if(e){if(e.getData){var n=e.getData("Text");n&&n.length>0&&-1===n.indexOf("data:text/mce-internal,")&&(t["text/plain"]=n)}if(e.types)for(var o=0;o<e.types.length;o++){var r=e.types[o];try{t[r]=e.getData(r)}catch(e){t[r]=""}}}return t},ye=function(e,t){return t in e&&e[t].length>0},_e=function(e){return ye(e,"text/html")||ye(e,"text/plain")},we=(o="mceclip",r=0,function(){return o+r++}),xe=function(e,t){var n,o,r=(n=t.uri,(o=/data:([^;]+);base64,([a-z0-9\+\/=]+)/i.exec(n))?{type:o[1],data:decodeURIComponent(o[2])}:{type:null,data:null}),i=r.data,a=r.type,s=we(),c=t.blob,u=new Image;if(u.src=t.uri,function(e,t){var n=function(e){return e.getParam("images_dataimg_filter")}(e);return!n||n(t)}(e,u)){var d=e.editorUpload.blobCache,f=void 0,m=d.getByData(i,a);if(m)f=m;else{var p=function(e){return e.getParam("images_reuse_filename")}(e)&&l(c.name),h=p?function(e,t){var n=t.match(/([\s\S]+?)(?:\.[a-z0-9.]+)$/i);return l(n)?e.dom.encode(n[1]):null}(e,c.name):s,g=p?c.name:void 0;f=d.create(s,c,i,h,g),d.add(f)}ge(e,'<img src="'+f.blobUri()+'">',!1)}else ge(e,'<img src="'+t.uri+'">',!1)},Ce=function(e){return M.all(x(e,(function(e){return new M((function(t){var n=function(e){return l(e.getAsFile)}(e)?e.getAsFile():e,o=new window.FileReader;o.onload=function(){t({blob:n,uri:o.result})},o.readAsDataURL(n)}))})))},Oe=function(e){var t=V(e);return function(e){return function(e,t){return T(e,t,0)}(e.type,"image/")&&w(t,(function(t){return n=t.toLowerCase(),o={jpg:"jpeg",jpe:"jpeg",jfi:"jpeg",jif:"jpeg",jfif:"jpeg",pjpeg:"jpeg",pjp:"jpeg",svg:"svg+xml"},(I.hasOwn(o,n)?"image/"+o[n]:"image/"+n)===e.type;var n,o}))}},Se=function(e,t,n){var o="paste"===t.type?t.clipboardData:t.dataTransfer;if(N(e)&&o){var r=function(e,t){var n=t.items?O(S(t.items),(function(e){return"file"===e.kind?[e.getAsFile()]:[]})):[],o=t.files?S(t.files):[];return function(e,t){for(var n=[],o=0,r=e.length;o<r;o++){var i=e[o];t(i,o)&&n.push(i)}return n}(n.length>0?n:o,Oe(e))}(e,o);if(r.length>0)return t.preventDefault(),Ce(r).then((function(t){n&&e.selection.setRng(n),C(t,(function(t){xe(e,t)}))})),!0}return!1},ke=function(e){return R.metaKeyPressed(e)&&86===e.keyCode||e.shiftKey&&45===e.keyCode},Ee=function(e,t,n){var o,r=E(),i=E();e.on("keyup",i.clear),e.on("keydown",(function(n){var a=function(e){ke(e)&&!e.isDefaultPrevented()&&t.remove()};if(ke(n)&&!n.isDefaultPrevented()){if((o=n.shiftKey&&86===n.keyCode)&&D.webkit&&-1!==navigator.userAgent.indexOf("Version/"))return;if(n.stopImmediatePropagation(),r.set(n),i.set(!0),D.ie&&o)return n.preventDefault(),void function(e,t){e.fire("paste",{ieFake:t})}(e,!0);t.remove(),t.create(),e.once("keyup",a),e.once("paste",(function(){e.off("keyup",a)}))}}));var a=function(e,n,o,r,i){var a;ye(n,"text/html")?a=n["text/html"]:(a=t.getHtml(),i=i||H(a),t.isDefaultContent(a)&&(r=!0)),a=Z(a),t.remove();var s=!1===i&&!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(a),l=le(a);(!a.length||s&&!l)&&(r=!0),(r||l)&&(a=ye(n,"text/plain")&&s?n["text/plain"]:function(e){var t=J(),n=G({},t),o="",r=t.getShortEndedElements(),i=I.makeMap("script noscript style textarea video audio iframe object"," "),a=t.getBlockElements(),s=function(e){var t=e.name,n=e;if("br"!==t){if("wbr"!==t)if(r[t]&&(o+=" "),i[t])o+=" ";else{if(3===e.type&&(o+=e.value),!e.shortEnded&&(e=e.firstChild))do{s(e)}while(e=e.next);a[t]&&n.next&&(o+="\n","p"===t&&(o+="\n"))}}else o+="\n"};return e=Q(e,[/<!\[[^\]]+\]>/g]),s(n.parse(e)),o}(a)),t.isDefaultContent(a)?o||e.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents."):r?ve(e,a):ge(e,a,i)};e.on("paste",(function(s){var l=r.isSet()||i.isSet();l&&r.clear();var c=function(e,t){return be(t.clipboardData||e.getDoc().dataTransfer)}(e,s),u="text"===n.get()||o,d=ye(c,$());o=!1,s.isDefaultPrevented()||function(e){var t=e.clipboardData;return-1!==navigator.userAgent.indexOf("Android")&&t&&t.items&&0===t.items.length}(s)?t.remove():_e(c)||!Se(e,s,t.getLastRng()||e.selection.getRng())?(l||s.preventDefault(),!D.ie||l&&!s.ieFake||ye(c,"text/html")||(t.create(),e.dom.bind(t.getEl(),"paste",(function(e){e.stopPropagation()})),e.getDoc().execCommand("Paste",!1,null),c["text/html"]=t.getHtml()),ye(c,"text/html")?(s.preventDefault(),d||(d=H(c["text/html"])),a(e,c,l,u,d)):A.setEditorTimeout(e,(function(){a(e,c,l,u,d)}),0)):t.remove()}))},Te=function(e){return D.ie&&e.inline?document.body:e.getBody()},De=function(e,t,n){(function(e){return Te(e)!==e.getBody()})(e)&&e.dom.bind(t,"paste keyup",(function(t){Re(e,n)||e.fire("paste")}))},Ae=function(e){return e.dom.get("mcepastebin")},Me=function(e,t){return t===e},Re=function(e,t){var n,o=Ae(e);return(n=o)&&"mcepastebin"===n.id&&Me(t,o.innerHTML)},Pe=function(e){var t=i(null);return{create:function(){return function(e,t,n){var o=e.dom,r=e.getBody();t.set(e.selection.getRng());var i=e.dom.add(Te(e),"div",{id:"mcepastebin",class:"mce-pastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: fixed; top: 50%; width: 10px; height: 10px; overflow: hidden; opacity: 0"},n);(D.ie||D.gecko)&&o.setStyle(i,"left","rtl"===o.getStyle(r,"direction",!0)?65535:-65535),o.bind(i,"beforedeactivate focusin focusout",(function(e){e.stopPropagation()})),De(e,i,n),i.focus(),e.selection.select(i,!0)}(e,t,"%MCEPASTEBIN%")},remove:function(){return function(e,t){if(Ae(e)){for(var n=void 0,o=t.get();n=e.dom.get("mcepastebin");)e.dom.remove(n),e.dom.unbind(n);o&&e.selection.setRng(o)}t.set(null)}(e,t)},getEl:function(){return Ae(e)},getHtml:function(){return function(e){var t=function(t,n){t.appendChild(n),e.dom.remove(n,!0)},n=I.grep(Te(e).childNodes,(function(e){return"mcepastebin"===e.id})),o=n.shift();I.each(n,(function(e){t(o,e)}));for(var r=e.dom.select("div[id=mcepastebin]",o),i=r.length-1;i>=0;i--){var a=e.dom.create("div");o.insertBefore(a,r[i]),t(a,r[i])}return o?o.innerHTML:""}(e)},getLastRng:t.get,isDefault:function(){return Re(e,"%MCEPASTEBIN%")},isDefaultContent:function(e){return Me("%MCEPASTEBIN%",e)}}},Ie=function(e,t){var n=Pe(e);return e.on("PreInit",(function(){return function(e,t,n){var o;Ee(e,t,n),e.parser.addNodeFilter("img",(function(t,n,r){var i=function(e){e.attr("data-mce-object")||o===D.transparentSrc||e.remove()},a=function(e){return 0===e.indexOf("webkit-fake-url")},s=function(e){return 0===e.indexOf("data:")};if(!N(e)&&function(e){return e.data&&!0===e.data.paste}(r))for(var l=t.length;l--;)(o=t[l].attr("src"))&&(a(o)||!B(e)&&s(o))&&i(t[l])}))}(e,n,t)})),{pasteFormat:t,pasteHtml:function(t,n){return ge(e,t,n)},pasteText:function(t){return ve(e,t)},pasteImageData:function(t,n){return Se(e,t,n)},getDataTransferItems:be,hasHtmlOrText:_e,hasContentType:ye}},Le=function(e,t){e.addCommand("mceTogglePlainTextPaste",(function(){!function(e,t){"text"===t.pasteFormat.get()?(t.pasteFormat.set("html"),P(e,!1)):(t.pasteFormat.set("text"),P(e,!0)),e.focus()}(e,t)})),e.addCommand("mceInsertClipboardContent",(function(e,n){n.content&&t.pasteHtml(n.content,n.internal),n.text&&t.pasteText(n.text)}))},je=function(e,t,n){if(!function(e){return!1===D.iOS&&"function"==typeof(null==e?void 0:e.setData)}(e))return!1;try{return e.clearData(),e.setData("text/html",t),e.setData("text/plain",n),e.setData($(),t),!0}catch(e){return!1}},ze=function(e,t,n,o){je(e.clipboardData,t.html,t.text)?(e.preventDefault(),o()):n(t.html,o)},Fe=function(e){return function(t,n){var o=function(e){return"\x3c!-- x-tinymce/html --\x3e"+e}(t),r=e.dom.create("div",{contenteditable:"false","data-mce-bogus":"all"}),i=e.dom.create("div",{contenteditable:"true"},o);e.dom.setStyles(r,{position:"fixed",top:"0",left:"-3000px",width:"1000px",overflow:"hidden"}),r.appendChild(i),e.dom.add(e.getBody(),r);var a=e.selection.getRng();i.focus();var s=e.dom.createRng();s.selectNodeContents(i),e.selection.setRng(s),A.setTimeout((function(){e.selection.setRng(a),r.parentNode.removeChild(r),n()}),0)}},Be=function(e){return{html:e.selection.getContent({contextual:!0}),text:e.selection.getContent({format:"text"})}},Ne=function(e){return!e.selection.isCollapsed()||function(e){return!!e.dom.getParent(e.selection.getStart(),"td[data-mce-selected],th[data-mce-selected]",e.getBody())}(e)},Ve=function(e){e.on("cut",function(e){return function(t){Ne(e)&&ze(t,Be(e),Fe(e),(function(){if(D.browser.isChrome()||D.browser.isFirefox()){var t=e.selection.getRng();A.setEditorTimeout(e,(function(){e.selection.setRng(t),e.execCommand("Delete")}),0)}else e.execCommand("Delete")}))}}(e)),e.on("copy",function(e){return function(t){Ne(e)&&ze(t,Be(e),Fe(e),u)}}(e))},He=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),$e=function(e,t){return He.getCaretRangeFromPoint(t.clientX,t.clientY,e.getDoc())},Ue=function(e,t){e.focus(),e.selection.setRng(t)},We=function(e,t){e.on("PastePreProcess",(function(n){n.content=t(e,n.content,n.internal,n.wordContent)}))},qe=function(e,t){if(!ee(t))return t;var n=[];I.each(e.schema.getBlockElements(),(function(e,t){n.push(t)}));var o=new RegExp("(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*(<\\/?("+n.join("|")+")[^>]*>)(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*","g");return t=Q(t,[[o,"$1"]]),t=Q(t,[[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])},Ke=function(e,t,n,o){if(o||n)return t;var r,i=function(e){return e.getParam("paste_webkit_styles")}(e);if(!1===function(e){return e.getParam("paste_remove_styles_if_webkit",!0)}(e)||"all"===i)return t;if(i&&(r=i.split(/[, ]/)),r){var a=e.dom,s=e.selection.getNode();t=t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,(function(e,t,n,o){var i=a.parseStyle(a.decode(n)),l={};if("none"===r)return t+o;for(var c=0;c<r.length;c++){var u=i[r[c]],d=a.getStyle(s,r[c],!0);/color/.test(r[c])&&(u=a.toHex(u),d=a.toHex(d)),d!==u&&(l[r[c]]=u)}var f=a.serializeStyle(l,"span");return f?t+' style="'+f+'"'+o:t+o}))}else t=t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return t=t.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,(function(e,t,n,o){return t+' style="'+n+'"'+o}))},Ge=function(e,t){e.$("a",t).find("font,u").each((function(t,n){e.dom.remove(n,!0)}))},Ye=function(e,t){return function(n){n.setActive("text"===t.pasteFormat.get());var o=function(e){return n.setActive(e.state)};return e.on("PastePlainTextToggle",o),function(){return e.off("PastePlainTextToggle",o)}}};a.add("paste",(function(e){if(!1===function(e){return!!e.hasPlugin("powerpaste",!0)&&(void 0!==window.console&&window.console.log&&window.console.log("PowerPaste is incompatible with Paste plugin! Remove 'paste' from the 'plugins' option."),!0)}(e)){var t=i(!1),n=i(function(e){return e.getParam("paste_as_text",!1)}(e)?"text":"html"),o=Ie(e,n);return function(e){D.webkit&&We(e,Ke),D.ie&&(We(e,qe),function(e,t){e.on("PastePostProcess",(function(n){t(e,n.node)}))}(e,Ge))}(e),function(e,t){var n=function(){return e.execCommand("mceTogglePlainTextPaste")};e.ui.registry.addToggleButton("pastetext",{active:!1,icon:"paste-text",tooltip:"Paste as text",onAction:n,onSetup:Ye(e,t)}),e.ui.registry.addToggleMenuItem("pastetext",{text:"Paste as text",icon:"paste-text",onAction:n,onSetup:Ye(e,t)})}(e,o),Le(e,o),function(e){var t=e.plugins.paste,n=function(e){return e.getParam("paste_preprocess")}(e);n&&e.on("PastePreProcess",(function(e){n.call(t,t,e)}));var o=function(e){return e.getParam("paste_postprocess")}(e);o&&e.on("PastePostProcess",(function(e){o.call(t,t,e)}))}(e),Ve(e),function(e,t,n){(function(e){return e.getParam("paste_block_drop",!1)})(e)&&e.on("dragend dragover draggesture dragdrop drop drag",(function(e){e.preventDefault(),e.stopPropagation()})),L(e)||e.on("drop",(function(e){var t=e.dataTransfer;t&&t.files&&t.files.length>0&&e.preventDefault()})),e.on("drop",(function(o){var r=$e(e,o);if(!o.isDefaultPrevented()&&!n.get()){var i,a=t.getDataTransferItems(o.dataTransfer),s=t.hasContentType(a,$());if((t.hasHtmlOrText(a)&&(!(i=a["text/plain"])||0!==i.indexOf("file://"))||!t.pasteImageData(o,r))&&r&&function(e){return e.getParam("paste_filter_drop",!0)}(e)){var l=a["mce-internal"]||a["text/html"]||a["text/plain"];l&&(o.preventDefault(),A.setEditorTimeout(e,(function(){e.undoManager.transact((function(){a["mce-internal"]&&e.execCommand("Delete"),Ue(e,r),l=Z(l),a["text/html"]?t.pasteHtml(l,s):t.pasteText(l)}))})))}}})),e.on("dragstart",(function(e){n.set(!0)})),e.on("dragover dragend",(function(t){L(e)&&!1===n.get()&&(t.preventDefault(),Ue(e,$e(e,t))),"dragend"===t.type&&n.set(!1)}))}(e,o,t),function(e){return{clipboard:e}}(o)}}))}()},"7c73":function(e,t,n){var o,r=n("825a"),i=n("37e8"),a=n("7839"),s=n("d012"),l=n("1be4"),c=n("cc12"),u=n("f772"),d=u("IE_PROTO"),f=function(){},m=function(e){return"<script>"+e+"<\/script>"},p=function(e){e.write(m("")),e.close();var t=e.parentWindow.Object;return e=null,t},h=function(){try{o=new ActiveXObject("htmlfile")}catch(e){}var e,t;h="undefined"!=typeof document?document.domain&&o?p(o):((t=c("iframe")).style.display="none",l.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(m("document.F=Object")),e.close(),e.F):p(o);for(var n=a.length;n--;)delete h.prototype[a[n]];return h()};s[d]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(f.prototype=r(e),n=new f,f.prototype=null,n[d]=e):n=h(),void 0===t?n:i.f(n,t)}},"7cb9":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pharmacode=void 0;var o,r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n("e762");var a=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return o.number=parseInt(e,10),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"encode",value:function(){for(var e=this.number,t="";!isNaN(e)&&0!=e;)e%2==0?(t="11100"+t,e=(e-2)/2):(t="100"+t,e=(e-1)/2);return{data:t=t.slice(0,-2),text:this.text}}},{key:"valid",value:function(){return this.number>=3&&this.number<=131070}}]),t}(((o=i)&&o.__esModule?o:{default:o}).default);t.pharmacode=a},"7db0":function(e,t,n){"use strict";var o=n("23e7"),r=n("b727").find,i=n("44d2"),a=!0;"find"in[]&&Array(1).find((function(){a=!1})),o({target:"Array",proto:!0,forced:a},{find:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),i("find")},"7dd0":function(e,t,n){"use strict";var o=n("23e7"),r=n("c65b"),i=n("c430"),a=n("5e77"),s=n("1626"),l=n("9ed3"),c=n("e163"),u=n("d2bb"),d=n("d44e"),f=n("9112"),m=n("cb2d"),p=n("b622"),h=n("3f8c"),g=n("ae93"),v=a.PROPER,b=a.CONFIGURABLE,y=g.IteratorPrototype,_=g.BUGGY_SAFARI_ITERATORS,w=p("iterator"),x=function(){return this};e.exports=function(e,t,n,a,p,g,C){l(n,t,a);var O,S,k,E=function(e){if(e===p&&R)return R;if(!_&&e in A)return A[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},T=t+" Iterator",D=!1,A=e.prototype,M=A[w]||A["@@iterator"]||p&&A[p],R=!_&&M||E(p),P="Array"==t&&A.entries||M;if(P&&(O=c(P.call(new e)))!==Object.prototype&&O.next&&(i||c(O)===y||(u?u(O,y):s(O[w])||m(O,w,x)),d(O,T,!0,!0),i&&(h[T]=x)),v&&"values"==p&&M&&"values"!==M.name&&(!i&&b?f(A,"name","values"):(D=!0,R=function(){return r(M,this)})),p)if(S={values:E("values"),keys:g?R:E("keys"),entries:E("entries")},C)for(k in S)(_||D||!(k in A))&&m(A,k,S[k]);else o({target:t,proto:!0,forced:_||D},S);return i&&!C||A[w]===R||m(A,w,R,{name:p}),h[t]=R,S}},"7f5d":function(e,t,n){"use strict";n("38f4")},"7f98":function(e,t,n){},"7f9a":function(e,t,n){var o=n("da84"),r=n("1626"),i=n("8925"),a=o.WeakMap;e.exports=r(a)&&/native code/.test(i(a))},"7fbf":function(e,t,n){"use strict";n("b3a3")},"805f":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=n("124f"),i=(o=r)&&o.__esModule?o:{default:o},a=n("6e53");var s=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e+=(0,a.mod11)(e),e+=(0,a.mod10)(e),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(i.default);t.default=s},"825a":function(e,t,n){var o=n("da84"),r=n("861d"),i=o.String,a=o.TypeError;e.exports=function(e){if(r(e))return e;throw a(i(e)+" is not an object")}},"83ab":function(e,t,n){var o=n("d039");e.exports=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},8418:function(e,t,n){"use strict";var o=n("a04b"),r=n("9bf2"),i=n("5c6c");e.exports=function(e,t,n){var a=o(t);a in e?r.f(e,a,i(0,n)):e[a]=n}},"841c":function(e,t,n){"use strict";var o=n("c65b"),r=n("d784"),i=n("825a"),a=n("1d80"),s=n("129f"),l=n("577e"),c=n("dc4a"),u=n("14c3");r("search",(function(e,t,n){return[function(t){var n=a(this),r=null==t?void 0:c(t,e);return r?o(r,t,n):new RegExp(t)[e](l(n))},function(e){var o=i(this),r=l(e),a=n(t,o,r);if(a.done)return a.value;var c=o.lastIndex;s(c,0)||(o.lastIndex=0);var d=u(o,r);return s(o.lastIndex,c)||(o.lastIndex=c),null===d?-1:d.index}]}))},"84ec":function(e,t,n){n("2401")},"84f3":function(e,t,n){"use strict";n("e145")},"861d":function(e,t,n){var o=n("1626");e.exports=function(e){return"object"==typeof e?null!==e:o(e)}},8861:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=n("124f"),i=(o=r)&&o.__esModule?o:{default:o},a=n("6e53");var s=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e+=(0,a.mod10)(e),e+=(0,a.mod10)(e),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(i.default);t.default=s},8863:function(e,t,n){n("9dd9")},8875:function(e,t,n){var o,r,i;"undefined"!=typeof self&&self,r=[],void 0===(i="function"==typeof(o=function(){return function e(){var t=Object.getOwnPropertyDescriptor(document,"currentScript");if(!t&&"currentScript"in document&&document.currentScript)return document.currentScript;if(t&&t.get!==e&&document.currentScript)return document.currentScript;try{throw new Error}catch(e){var n,o,r,i=/.*at [^(]*\((.*):(.+):(.+)\)$/gi.exec(e.stack)||/@([^@]*):(\d+):(\d+)\s*$/gi.exec(e.stack),a=i&&i[1]||!1,s=i&&i[2]||!1,l=document.location.href.replace(document.location.hash,""),c=document.getElementsByTagName("script");a===l&&(n=document.documentElement.outerHTML,o=new RegExp("(?:[^\\n]+?\\n){0,"+(s-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),r=n.replace(o,"$1").trim());for(var u=0;u<c.length;u++){if("interactive"===c[u].readyState)return c[u];if(c[u].src===a)return c[u];if(a===l&&c[u].innerHTML&&c[u].innerHTML.trim()===r)return c[u]}return null}}})?o.apply(t,r):o)||(e.exports=i)},8907:function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return l}));var o=n("5530"),r=n("1da1"),i=(n("96cf"),n("d81d"),n("b0c0"),n("d3b7"),n("159b"),n("7694"));function a(e,t){return s.apply(this,arguments)}function s(){return(s=Object(r.a)(regeneratorRuntime.mark((function e(t,n){var r,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={total:0,data:[]},e.prev=1,e.next=4,Object(i.g)(n);case 4:"0000"===(a=e.sent).data.code?(r.data=a.data.data.records.map((function(e){return Object(o.a)(Object(o.a)({},e),{},{dataType:"dict",id:e.id,label:e.name,value:e.itemCode})})),r.total=a.data.data.length):t.$message.error("加载字典失败 : ".concat(a.data.message)),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),t.$message.error("加载字典失败 : ".concat(e.t0.message));case 11:return e.abrupt("return",r);case 12:case"end":return e.stop()}}),e,null,[[1,8]])})))).apply(this,arguments)}function l(e,t){return c.apply(this,arguments)}function c(){return(c=Object(r.a)(regeneratorRuntime.mark((function e(t,n){var r,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={total:0,data:[]},e.prev=1,e.next=4,Object(i.f)(n);case 4:if("0000"===(a=e.sent).data.code){e.next=8;break}return t.$message.error("加载字典选项失败 : ".concat(a.data.message)),e.abrupt("return",r);case 8:return a.data.data.forEach((function(e){r.data.push(Object(o.a)(Object(o.a)({},e),{},{dataType:"dictItem",id:e.id,label:e.itemName,value:e.itemCode}))})),r.total=a.data.data.length,e.abrupt("return",r);case 13:return e.prev=13,e.t0=e.catch(1),t.$message.error("加载字典选项失败 : ".concat(e.t0.message)),e.abrupt("return",r);case 17:case"end":return e.stop()}}),e,null,[[1,13]])})))).apply(this,arguments)}},8925:function(e,t,n){var o=n("e330"),r=n("1626"),i=n("c6cd"),a=o(Function.toString);r(i.inspectSource)||(i.inspectSource=function(e){return a(e)}),e.exports=i.inspectSource},"89a2":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(o):void 0},a=n("c243"),s=n("bdfe"),l=(o=s)&&o.__esModule?o:{default:o};var c=function(e){return(10-e.substr(0,12).split("").map((function(e){return+e})).reduce((function(e,t,n){return n%2?e+3*t:e+t}),0)%10)%10},u=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),-1!==e.search(/^[0-9]{12}$/)&&(e+=c(e));var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return o.lastChar=n.lastChar,o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{13}$/)&&+this.data[12]===c(this.data)}},{key:"leftText",value:function(){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"leftText",this).call(this,1,6)}},{key:"leftEncode",value:function(){var e=this.data.substr(1,6),n=a.EAN13_STRUCTURE[this.data[0]];return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"leftEncode",this).call(this,e,n)}},{key:"rightText",value:function(){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"rightText",this).call(this,7,6)}},{key:"rightEncode",value:function(){var e=this.data.substr(7,6);return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"rightEncode",this).call(this,e,"RRRRRR")}},{key:"encodeGuarded",value:function(){var e=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"encodeGuarded",this).call(this);return this.options.displayValue&&(e.unshift({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),this.options.lastChar&&(e.push({data:"00"}),e.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}}))),e}}]),t}(l.default);t.default=u},"8a7b":function(e,t,n){"use strict";n("d0d4")},"8aa5":function(e,t,n){"use strict";var o=n("6547").charAt;e.exports=function(e,t,n){return t+(n?o(e,t).length:1)}},"8ba4":function(e,t,n){n("23e7")({target:"Number",stat:!0},{isInteger:n("eac5")})},"8bbf":function(e,t){e.exports=require("vue")},"8bfd":function(e,t,n){},"8df4":function(e,t,n){"use strict";var o=n("7a77");function r(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new o(e),t(n.reason))}))}r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var e;return{token:new r((function(t){e=t})),cancel:e}},e.exports=r},"8e51":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MSI1110=t.MSI1010=t.MSI11=t.MSI10=t.MSI=void 0;var o=l(n("124f")),r=l(n("4727")),i=l(n("4461")),a=l(n("8861")),s=l(n("805f"));function l(e){return e&&e.__esModule?e:{default:e}}t.MSI=o.default,t.MSI10=r.default,t.MSI11=i.default,t.MSI1010=a.default,t.MSI1110=s.default},"905a":function(e,t){e.exports=require("@tinymce/tinymce-vue")},"90d8":function(e,t,n){var o=n("c65b"),r=n("1a2d"),i=n("3a9b"),a=n("ad6d"),s=RegExp.prototype;e.exports=function(e){var t=e.flags;return void 0!==t||"flags"in s||r(e,"flags")||!i(s,e)?t:o(a,e)}},"90e3":function(e,t,n){var o=n("e330"),r=0,i=Math.random(),a=o(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++r+i,36)}},9112:function(e,t,n){var o=n("83ab"),r=n("9bf2"),i=n("5c6c");e.exports=o?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},9224:function(e){e.exports=JSON.parse('{"a":"2.0.1"}')},9240:function(e,t,n){},9263:function(e,t,n){"use strict";var o,r,i=n("c65b"),a=n("e330"),s=n("577e"),l=n("ad6d"),c=n("9f7f"),u=n("5692"),d=n("7c73"),f=n("69f3").get,m=n("fce3"),p=n("107c"),h=u("native-string-replace",String.prototype.replace),g=RegExp.prototype.exec,v=g,b=a("".charAt),y=a("".indexOf),_=a("".replace),w=a("".slice),x=(r=/b*/g,i(g,o=/a/,"a"),i(g,r,"a"),0!==o.lastIndex||0!==r.lastIndex),C=c.BROKEN_CARET,O=void 0!==/()??/.exec("")[1];(x||O||C||m||p)&&(v=function(e){var t,n,o,r,a,c,u,m=this,p=f(m),S=s(e),k=p.raw;if(k)return k.lastIndex=m.lastIndex,t=i(v,k,S),m.lastIndex=k.lastIndex,t;var E=p.groups,T=C&&m.sticky,D=i(l,m),A=m.source,M=0,R=S;if(T&&(D=_(D,"y",""),-1===y(D,"g")&&(D+="g"),R=w(S,m.lastIndex),m.lastIndex>0&&(!m.multiline||m.multiline&&"\n"!==b(S,m.lastIndex-1))&&(A="(?: "+A+")",R=" "+R,M++),n=new RegExp("^(?:"+A+")",D)),O&&(n=new RegExp("^"+A+"$(?!\\s)",D)),x&&(o=m.lastIndex),r=i(g,T?n:m,R),T?r?(r.input=w(r.input,M),r[0]=w(r[0],M),r.index=m.lastIndex,m.lastIndex+=r[0].length):m.lastIndex=0:x&&r&&(m.lastIndex=m.global?r.index+r[0].length:o),O&&r&&r.length>1&&i(h,r[0],n,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(r[a]=void 0)})),r&&E)for(r.groups=c=d(null),a=0;a<E.length;a++)c[(u=E[a])[0]]=r[u[1]];return r}),e.exports=v},"94ca":function(e,t,n){var o=n("d039"),r=n("1626"),i=/#|\.prototype\./,a=function(e,t){var n=l[s(e)];return n==u||n!=c&&(r(t)?o(t):!!t)},s=a.normalize=function(e){return String(e).replace(i,".").toLowerCase()},l=a.data={},c=a.NATIVE="N",u=a.POLYFILL="P";e.exports=a},"94ce":function(e,t){!function(){"use strict";var e=function(e){return function(t){return o=typeof(n=t),(null===n?"null":"object"===o&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"===o&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":o)===e;var n,o}},t=function(e){return function(t){return typeof t===e}},n=function(e){return function(t){return e===t}},o=e("string"),r=e("object"),i=e("array"),a=n(null),s=t("boolean"),l=n(void 0),c=function(e){return!function(e){return null==e}(e)},u=t("function"),d=t("number"),f=function(){},m=function(e){return function(){return e}},p=function(e){return e},h=function(e,t){return e===t};function g(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var r=t.concat(n);return e.apply(null,r)}}var v,b,y=function(e){return function(t){return!e(t)}},_=m(!1),w=m(!0),x=function(){return C},C={fold:function(e,t){return e()},isSome:_,isNone:w,getOr:b=p,getOrThunk:v=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:m(null),getOrUndefined:m(void 0),or:b,orThunk:v,map:x,each:f,bind:x,exists:_,forall:w,filter:function(){return x()},toArray:function(){return[]},toString:m("none()")},O=function(e){var t=m(e),n=function(){return r},o=function(t){return t(e)},r={fold:function(t,n){return n(e)},isSome:w,isNone:_,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:n,orThunk:n,map:function(t){return O(t(e))},each:function(t){t(e)},bind:o,exists:o,forall:o,filter:function(t){return t(e)?r:C},toArray:function(){return[e]},toString:function(){return"some("+e+")"}};return r},S={some:O,none:x,from:function(e){return null==e?C:O(e)}},k=Array.prototype.slice,E=Array.prototype.indexOf,T=Array.prototype.push,D=function(e,t){return n=e,o=t,E.call(n,o)>-1;var n,o},A=function(e,t){for(var n=0,o=e.length;n<o;n++){if(t(e[n],n))return!0}return!1},M=function(e,t){for(var n=[],o=0;o<e;o++)n.push(t(o));return n},R=function(e,t){for(var n=e.length,o=new Array(n),r=0;r<n;r++){var i=e[r];o[r]=t(i,r)}return o},P=function(e,t){for(var n=0,o=e.length;n<o;n++){t(e[n],n)}},I=function(e,t){for(var n=[],o=[],r=0,i=e.length;r<i;r++){var a=e[r];(t(a,r)?n:o).push(a)}return{pass:n,fail:o}},L=function(e,t){for(var n=[],o=0,r=e.length;o<r;o++){var i=e[o];t(i,o)&&n.push(i)}return n},j=function(e,t,n){return function(e,t){for(var n=e.length-1;n>=0;n--){t(e[n],n)}}(e,(function(e,o){n=t(n,e,o)})),n},z=function(e,t,n){return P(e,(function(e,o){n=t(n,e,o)})),n},F=function(e,t){return function(e,t,n){for(var o=0,r=e.length;o<r;o++){var i=e[o];if(t(i,o))return S.some(i);if(n(i,o))break}return S.none()}(e,t,_)},B=function(e,t){for(var n=0,o=e.length;n<o;n++){if(t(e[n],n))return S.some(n)}return S.none()},N=function(e){for(var t=[],n=0,o=e.length;n<o;++n){if(!i(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);T.apply(t,e[n])}return t},V=function(e,t){return N(R(e,t))},H=function(e,t){for(var n=0,o=e.length;n<o;++n){if(!0!==t(e[n],n))return!1}return!0},$=function(e,t){for(var n={},o=0,r=e.length;o<r;o++){var i=e[o];n[String(i)]=t(i,o)}return n},U=function(e){return[e]},W=function(e,t){return t>=0&&t<e.length?S.some(e[t]):S.none()},q=function(e){return W(e,0)},K=function(e){return W(e,e.length-1)},G=function(e,t){for(var n=0;n<e.length;n++){var o=t(e[n],n);if(o.isSome())return o}return S.none()},Y=function(){return(Y=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function X(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var J=function(e){var t,n=!1;return function(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];return n||(n=!0,t=e.apply(null,o)),t}},Q=function(){return Z(0,0)},Z=function(e,t){return{major:e,minor:t}},ee={nu:Z,detect:function(e,t){var n=String(t).toLowerCase();return 0===e.length?Q():function(e,t){var n=function(e,t){for(var n=0;n<e.length;n++){var o=e[n];if(o.test(t))return o}}(e,t);if(!n)return{major:0,minor:0};var o=function(e){return Number(t.replace(n,"$"+e))};return Z(o(1),o(2))}(e,n)},unknown:Q},te=function(e,t){var n=String(t).toLowerCase();return F(e,(function(e){return e.search(n)}))},ne=function(e,t,n){return""===t||e.length>=t.length&&e.substr(n,n+t.length)===t},oe=function(e,t){return-1!==e.indexOf(t)},re=function(e,t){return ne(e,t,0)},ie=function(e,t){return ne(e,t,e.length-t.length)},ae=function(e){return function(t){return t.replace(e,"")}}(/^\s+|\s+$/g),se=function(e){return e.length>0},le=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,ce=function(e){return function(t){return oe(t,e)}},ue=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return oe(e,"edge/")&&oe(e,"chrome")&&oe(e,"safari")&&oe(e,"applewebkit")}},{name:"Chrome",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,le],search:function(e){return oe(e,"chrome")&&!oe(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return oe(e,"msie")||oe(e,"trident")}},{name:"Opera",versionRegexes:[le,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:ce("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:ce("firefox")},{name:"Safari",versionRegexes:[le,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(oe(e,"safari")||oe(e,"mobile/"))&&oe(e,"applewebkit")}}],de=[{name:"Windows",search:ce("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return oe(e,"iphone")||oe(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:ce("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:ce("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:ce("linux"),versionRegexes:[]},{name:"Solaris",search:ce("sunos"),versionRegexes:[]},{name:"FreeBSD",search:ce("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:ce("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],fe={browsers:m(ue),oses:m(de)},me=function(e){var t=e.current,n=e.version,o=function(e){return function(){return t===e}};return{current:t,version:n,isEdge:o("Edge"),isChrome:o("Chrome"),isIE:o("IE"),isOpera:o("Opera"),isFirefox:o("Firefox"),isSafari:o("Safari")}},pe={unknown:function(){return me({current:void 0,version:ee.unknown()})},nu:me,edge:m("Edge"),chrome:m("Chrome"),ie:m("IE"),opera:m("Opera"),firefox:m("Firefox"),safari:m("Safari")},he=function(e){var t=e.current,n=e.version,o=function(e){return function(){return t===e}};return{current:t,version:n,isWindows:o("Windows"),isiOS:o("iOS"),isAndroid:o("Android"),isOSX:o("OSX"),isLinux:o("Linux"),isSolaris:o("Solaris"),isFreeBSD:o("FreeBSD"),isChromeOS:o("ChromeOS")}},ge={unknown:function(){return he({current:void 0,version:ee.unknown()})},nu:he,windows:m("Windows"),ios:m("iOS"),android:m("Android"),linux:m("Linux"),osx:m("OSX"),solaris:m("Solaris"),freebsd:m("FreeBSD"),chromeos:m("ChromeOS")},ve=function(e,t,n){var o=fe.browsers(),r=fe.oses(),i=t.bind((function(e){return function(e,t){return G(t.brands,(function(t){var n=t.brand.toLowerCase();return F(e,(function(e){var t;return n===(null===(t=e.brand)||void 0===t?void 0:t.toLowerCase())})).map((function(e){return{current:e.name,version:ee.nu(parseInt(t.version,10),0)}}))}))}(o,e)})).orThunk((function(){return function(e,t){return te(e,t).map((function(e){var n=ee.detect(e.versionRegexes,t);return{current:e.name,version:n}}))}(o,e)})).fold(pe.unknown,pe.nu),a=function(e,t){return te(e,t).map((function(e){var n=ee.detect(e.versionRegexes,t);return{current:e.name,version:n}}))}(r,e).fold(ge.unknown,ge.nu),s=function(e,t,n,o){var r=e.isiOS()&&!0===/ipad/i.test(n),i=e.isiOS()&&!r,a=e.isiOS()||e.isAndroid(),s=a||o("(pointer:coarse)"),l=r||!i&&a&&o("(min-device-width:768px)"),c=i||a&&!l,u=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(n),d=!c&&!l&&!u;return{isiPad:m(r),isiPhone:m(i),isTablet:m(l),isPhone:m(c),isTouch:m(s),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:m(u),isDesktop:m(d)}}(a,i,e,n);return{browser:i,os:a,deviceType:s}},be=function(e){return window.matchMedia(e).matches},ye=J((function(){return ve(navigator.userAgent,S.from(navigator.userAgentData),be)})),_e=function(){return ye()},we=function(e){if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},xe={fromHtml:function(e,t){var n=(t||document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||n.childNodes.length>1)throw new Error("HTML must have a single root node");return we(n.childNodes[0])},fromTag:function(e,t){var n=(t||document).createElement(e);return we(n)},fromText:function(e,t){var n=(t||document).createTextNode(e);return we(n)},fromDom:we,fromPoint:function(e,t,n){return S.from(e.dom.elementFromPoint(t,n)).map(we)}},Ce=function(e,t){var n=e.dom;if(1!==n.nodeType)return!1;var o=n;if(void 0!==o.matches)return o.matches(t);if(void 0!==o.msMatchesSelector)return o.msMatchesSelector(t);if(void 0!==o.webkitMatchesSelector)return o.webkitMatchesSelector(t);if(void 0!==o.mozMatchesSelector)return o.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},Oe=function(e){return 1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType||0===e.childElementCount},Se=function(e,t){var n=void 0===t?document:t.dom;return Oe(n)?S.none():S.from(n.querySelector(e)).map(xe.fromDom)},ke=function(e,t){return e.dom===t.dom},Ee=function(e,t){return n=e.dom,o=t.dom,function(e,t,n){return 0!=(e.compareDocumentPosition(t)&n)}(n,o,Node.DOCUMENT_POSITION_CONTAINED_BY);var n,o},Te=function(e,t){return _e().browser.isIE()?Ee(e,t):function(e,t){var n=e.dom,o=t.dom;return n!==o&&n.contains(o)}(e,t)},De=Ce,Ae=Object.keys,Me=Object.hasOwnProperty,Re=function(e,t){for(var n=Ae(e),o=0,r=n.length;o<r;o++){var i=n[o];t(e[i],i)}},Pe=function(e,t){return Ie(e,(function(e,n){return{k:n,v:t(e,n)}}))},Ie=function(e,t){var n={};return Re(e,(function(e,o){var r=t(e,o);n[r.k]=r.v})),n},Le=function(e,t){var n={};return function(e,t,n,o){Re(e,(function(e,r){(t(e,r)?n:o)(e,r)}))}(e,t,function(e){return function(t,n){e[n]=t}}(n),f),n},je=function(e,t){var n=[];return Re(e,(function(e,o){n.push(t(e,o))})),n},ze=function(e){return je(e,p)},Fe=function(e){return Ae(e).length},Be=function(e,t){return Ne(e,t)?S.from(e[t]):S.none()},Ne=function(e,t){return Me.call(e,t)},Ve=function(e,t){return Ne(e,t)&&void 0!==e[t]&&null!==e[t]},He=["tfoot","thead","tbody","colgroup"],$e=function(e,t,n){return{element:e,rowspan:t,colspan:n}},Ue=function(e,t,n){return{element:e,cells:t,section:n}},We=function(e,t,n){return{element:e,isNew:t,isLocked:n}},qe=function(e,t,n,o){return{element:e,cells:t,section:n,isNew:o}};"undefined"!=typeof window?window:Function("return this;")();var Ke=function(e){return e.dom.nodeName.toLowerCase()},Ge=function(e){return e.dom.nodeType},Ye=function(e){return function(t){return Ge(t)===e}},Xe=function(e){return 8===Ge(e)||"#comment"===Ke(e)},Je=Ye(1),Qe=Ye(3),Ze=Ye(9),et=Ye(11),tt=function(e){return function(t){return Je(t)&&Ke(t)===e}},nt=function(e){return xe.fromDom(e.dom.ownerDocument)},ot=function(e){return Ze(e)?e:nt(e)},rt=function(e){return S.from(e.dom.parentNode).map(xe.fromDom)},it=function(e,t){for(var n=u(t)?t:_,o=e.dom,r=[];null!==o.parentNode&&void 0!==o.parentNode;){var i=o.parentNode,a=xe.fromDom(i);if(r.push(a),!0===n(a))break;o=i}return r},at=function(e){return S.from(e.dom.previousSibling).map(xe.fromDom)},st=function(e){return S.from(e.dom.nextSibling).map(xe.fromDom)},lt=function(e){return R(e.dom.childNodes,xe.fromDom)},ct=function(e,t){var n=e.dom.childNodes;return S.from(n[t]).map(xe.fromDom)},ut=u(Element.prototype.attachShadow)&&u(Node.prototype.getRootNode),dt=m(ut),ft=ut?function(e){return xe.fromDom(e.dom.getRootNode())}:ot,mt=function(e){var t,n=ft(e);return et(t=n)&&c(t.dom.host)?S.some(n):S.none()},pt=function(e){return xe.fromDom(e.dom.host)},ht=function(e){return c(e.dom.shadowRoot)},gt=function(e){var t=Qe(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;var n,o,r=t.ownerDocument;return mt(xe.fromDom(t)).fold((function(){return r.body.contains(t)}),(n=gt,o=pt,function(e){return n(o(e))}))},vt=function(e){var t=e.dom.body;if(null==t)throw new Error("Body is not available yet");return xe.fromDom(t)},bt=function(e,t){var n=[];return P(lt(e),(function(e){t(e)&&(n=n.concat([e])),n=n.concat(bt(e,t))})),n},yt=function(e,t,n){return function(e,t,n){return L(it(e,n),t)}(e,(function(e){return Ce(e,t)}),n)},_t=function(e,t){return function(e,t){return L(lt(e),t)}(e,(function(e){return Ce(e,t)}))},wt=function(e,t){return function(e,t){var n=void 0===t?document:t.dom;return Oe(n)?[]:R(n.querySelectorAll(e),xe.fromDom)}(t,e)};function xt(e,t,n,o,r){return e(n,o)?S.some(n):u(r)&&r(n)?S.none():t(n,o,r)}var Ct=function(e,t,n){for(var o=e.dom,r=u(n)?n:_;o.parentNode;){o=o.parentNode;var i=xe.fromDom(o);if(t(i))return S.some(i);if(r(i))break}return S.none()},Ot=function(e,t,n){return Ct(e,(function(e){return Ce(e,t)}),n)},St=function(e,t){return function(e,t){return F(e.dom.childNodes,(function(e){return t(xe.fromDom(e))})).map(xe.fromDom)}(e,(function(e){return Ce(e,t)}))},kt=function(e,t){return Se(t,e)},Et=function(e,t,n){return xt((function(e,t){return Ce(e,t)}),Ot,e,t,n)},Tt=function(e,t,n){if(!(o(n)||s(n)||d(n)))throw new Error("Attribute value was not simple");e.setAttribute(t,n+"")},Dt=function(e,t,n){Tt(e.dom,t,n)},At=function(e,t){var n=e.dom;Re(t,(function(e,t){Tt(n,t,e)}))},Mt=function(e,t){var n=e.dom.getAttribute(t);return null===n?void 0:n},Rt=function(e,t){return S.from(Mt(e,t))},Pt=function(e,t){e.dom.removeAttribute(t)},It=function(e){return z(e.dom.attributes,(function(e,t){return e[t.name]=t.value,e}),{})},Lt=function(e,t,n){return void 0===n&&(n=h),e.exists((function(e){return n(e,t)}))},jt=function(e){for(var t=[],n=function(e){t.push(e)},o=0;o<e.length;o++)e[o].each(n);return t},zt=function(e,t,n){return e.isSome()&&t.isSome()?S.some(n(e.getOrDie(),t.getOrDie())):S.none()},Ft=function(e,t){return e?S.some(t):S.none()},Bt=function(e){return void 0!==e.style&&u(e.style.getPropertyValue)},Nt=function(e,t,n){if(!o(n))throw new Error("CSS value must be a string: "+n);Bt(e)&&e.style.setProperty(t,n)},Vt=function(e,t,n){var o=e.dom;Nt(o,t,n)},Ht=function(e,t){var n=e.dom;Re(t,(function(e,t){Nt(n,t,e)}))},$t=function(e,t){var n=e.dom,o=window.getComputedStyle(n).getPropertyValue(t);return""!==o||gt(e)?o:Ut(n,t)},Ut=function(e,t){return Bt(e)?e.style.getPropertyValue(t):""},Wt=function(e,t){var n=e.dom,o=Ut(n,t);return S.from(o).filter((function(e){return e.length>0}))},qt=function(e,t){!function(e,t){Bt(e)&&e.style.removeProperty(t)}(e.dom,t),Lt(Rt(e,"style").map(ae),"")&&Pt(e,"style")},Kt=function(e,t,n){return void 0===n&&(n=0),Rt(e,t).map((function(e){return parseInt(e,10)})).getOr(n)},Gt=function(e,t){return Kt(e,t,1)},Yt=function(e){return tt("col")(e)?Kt(e,"span",1)>1:Gt(e,"colspan")>1},Xt=function(e){return Gt(e,"rowspan")>1},Jt=function(e,t){return parseInt($t(e,t),10)},Qt=m(10),Zt=m(10),en=function(e,t){return tn(e,t,w)},tn=function(e,t,n){return V(lt(e),(function(e){return Ce(e,t)?n(e)?[e]:[]:tn(e,t,n)}))},nn=function(e,t){return function(e,t,n){if(void 0===n&&(n=_),n(t))return S.none();if(D(e,Ke(t)))return S.some(t);return Ot(t,e.join(","),(function(e){return Ce(e,"table")||n(e)}))}(["td","th"],e,t)},on=function(e){return en(e,"th,td")},rn=function(e){return Ce(e,"colgroup")?_t(e,"col"):V(ln(e),(function(e){return _t(e,"col")}))},an=function(e,t){return Et(e,"table",t)},sn=function(e){return en(e,"tr")},ln=function(e){return an(e).fold(m([]),(function(e){return _t(e,"colgroup")}))},cn=function(e,t){return R(e,(function(e){if("colgroup"===Ke(e)){var n=R(rn(e),(function(e){var t=Kt(e,"span",1);return $e(e,1,t)}));return Ue(e,n,"colgroup")}n=R(on(e),(function(e){var t=Kt(e,"rowspan",1),n=Kt(e,"colspan",1);return $e(e,t,n)}));return Ue(e,n,t(e))}))},un=function(e){return rt(e).map((function(e){var t=Ke(e);return function(e){return D(He,e)}(t)?t:"tbody"})).getOr("tbody")},dn=function(e){var t=sn(e),n=X(X([],ln(e),!0),t,!0);return cn(n,un)},fn=function(e,t,n){var o=e.cells,r=o.slice(0,t),i=o.slice(t),a=r.concat(n).concat(i);return hn(e,a)},mn=function(e,t,n){return fn(e,t,[n])},pn=function(e,t,n){e.cells[t]=n},hn=function(e,t){return qe(e.element,t,e.section,e.isNew)},gn=function(e,t){return e.cells[t]},vn=function(e,t){return gn(e,t).element},bn=function(e){return e.cells.length},yn=function(e){var t=I(e,(function(e){return"colgroup"===e.section}));return{rows:t.fail,cols:t.pass}},_n=function(e,t,n){var o=R(e.cells,n);return qe(t(e.element),o,e.section,!0)},wn="data-snooker-locked-cols",xn=function(e){return Rt(e,wn).bind((function(e){return S.from(e.match(/\d+/g))})).map((function(e){return $(e,w)}))},Cn=function(e){var t=z(yn(e).rows,(function(e,t){return P(t.cells,(function(t,n){t.isLocked&&(e[n]=!0)})),e}),{});return function(e,t){var n=k.call(e,0);return n.sort(t),n}(je(t,(function(e,t){return parseInt(t,10)})))},On=function(e,t){return e+","+t},Sn=function(e,t){var n=V(e.all,(function(e){return e.cells}));return L(n,t)},kn=function(e){var t={},n=[],o=q(e).map((function(e){return e.element})).bind(an).bind(xn).getOr({}),r=0,i=0,a=0,s=I(e,(function(e){return"colgroup"===e.section})),l=s.pass,c=s.fail;P(c,(function(e){var s=[];P(e.cells,(function(e){for(var n=0;void 0!==t[On(a,n)];)n++;for(var r=Ve(o,n.toString()),l=function(e,t,n,o,r,i){return{element:e,rowspan:t,colspan:n,row:o,column:r,isLocked:i}}(e.element,e.rowspan,e.colspan,a,n,r),c=0;c<e.colspan;c++)for(var u=0;u<e.rowspan;u++){var d=n+c,f=On(a+u,d);t[f]=l,i=Math.max(i,d+1)}s.push(l)})),r++,n.push(Ue(e.element,s,e.section)),a++}));var u=K(l).map((function(e){var t=function(e){var t={},n=0;return P(e.cells,(function(e){var o=e.colspan;M(o,(function(r){var i=n+r;t[i]=function(e,t,n){return{element:e,colspan:t,column:n}}(e.element,o,i)})),n+=o})),t}(e);return{colgroups:[function(e,t){return{element:e,columns:t}}(e.element,ze(t))],columns:t}})).getOrThunk((function(){return{colgroups:[],columns:{}}})),d=u.columns,f=u.colgroups;return{grid:function(e,t){return{rows:e,columns:t}}(r,i),access:t,all:n,columns:d,colgroups:f}},En={fromTable:function(e){var t=dn(e);return kn(t)},generate:kn,getAt:function(e,t,n){return S.from(e.access[On(t,n)])},findItem:function(e,t,n){var o=Sn(e,(function(e){return n(t,e.element)}));return o.length>0?S.some(o[0]):S.none()},filterItems:Sn,justCells:function(e){return V(e.all,(function(e){return e.cells}))},justColumns:function(e){return ze(e.columns)},hasColumns:function(e){return Ae(e.columns).length>0},getColumnAt:function(e,t){return S.from(e.columns[t])}},Tn=function(e,t){var n=t.column,o=t.column+t.colspan-1,r=t.row,i=t.row+t.rowspan-1;return n<=e.finishCol&&o>=e.startCol&&r<=e.finishRow&&i>=e.startRow},Dn=function(e,t){return t.column>=e.startCol&&t.column+t.colspan-1<=e.finishCol&&t.row>=e.startRow&&t.row+t.rowspan-1<=e.finishRow},An=function(e,t,n){var o=En.findItem(e,t,ke),r=En.findItem(e,n,ke);return o.bind((function(e){return r.map((function(t){return n=e,o=t,r=Math.min(n.row,o.row),i=Math.min(n.column,o.column),a=Math.max(n.row+n.rowspan-1,o.row+o.rowspan-1),s=Math.max(n.column+n.colspan-1,o.column+o.colspan-1),{startRow:r,startCol:i,finishRow:a,finishCol:s};var n,o,r,i,a,s}))}))},Mn=function(e,t,n){return An(e,t,n).bind((function(t){return function(e,t){for(var n=!0,o=g(Dn,t),r=t.startRow;r<=t.finishRow;r++)for(var i=t.startCol;i<=t.finishCol;i++)n=n&&En.getAt(e,r,i).exists(o);return n?S.some(t):S.none()}(e,t)}))},Rn=function(e,t,n){return An(e,t,n).map((function(t){var n=En.filterItems(e,g(Tn,t));return R(n,(function(e){return e.element}))}))},Pn=function(e,t){return En.findItem(e,t,(function(e,t){return Te(t,e)})).map((function(e){return e.element}))},In=function(e,t,n){return an(e).bind((function(o){return function(e,t,n,o){return En.findItem(e,t,ke).bind((function(t){var r=n>0?t.row+t.rowspan-1:t.row,i=o>0?t.column+t.colspan-1:t.column;return En.getAt(e,r+n,i+o).map((function(e){return e.element}))}))}(zn(o),e,t,n)}))},Ln=function(e,t,n){var o=zn(e);return Rn(o,t,n)},jn=function(e,t,n,o,r){var i=zn(e),a=ke(e,n)?S.some(t):Pn(i,t),s=ke(e,r)?S.some(o):Pn(i,o);return a.bind((function(e){return s.bind((function(t){return Rn(i,e,t)}))}))},zn=En.fromTable,Fn=function(e,t){rt(e).each((function(n){n.dom.insertBefore(t.dom,e.dom)}))},Bn=function(e,t){st(e).fold((function(){rt(e).each((function(e){Vn(e,t)}))}),(function(e){Fn(e,t)}))},Nn=function(e,t){(function(e){return ct(e,0)})(e).fold((function(){Vn(e,t)}),(function(n){e.dom.insertBefore(t.dom,n.dom)}))},Vn=function(e,t){e.dom.appendChild(t.dom)},Hn=function(e,t){Fn(e,t),Vn(t,e)},$n=function(e,t){P(t,(function(n,o){var r=0===o?e:t[o-1];Bn(r,n)}))},Un=function(e,t){P(t,(function(t){Vn(e,t)}))},Wn=function(e){e.dom.textContent="",P(lt(e),(function(e){qn(e)}))},qn=function(e){var t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},Kn=function(e){var t,n=lt(e);n.length>0&&(t=e,P(n,(function(e){Fn(t,e)}))),qn(e)},Gn=function(e,t){var n=function(t){return e(t)?S.from(t.dom.nodeValue):S.none()};return{get:function(o){if(!e(o))throw new Error("Can only get "+t+" value of a "+t+" node");return n(o).getOr("")},getOption:n,set:function(n,o){if(!e(n))throw new Error("Can only set raw "+t+" value of a "+t+" node");n.dom.nodeValue=o}}}(Qe,"text"),Yn=function(e){return Gn.get(e)},Xn=function(e){return Gn.getOption(e)},Jn=function(e,t){return Gn.set(e,t)},Qn=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","li","table","thead","tbody","tfoot","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"];function Zn(){return{up:m({selector:Ot,closest:Et,predicate:Ct,all:it}),down:m({selector:wt,predicate:bt}),styles:m({get:$t,getRaw:Wt,set:Vt,remove:qt}),attrs:m({get:Mt,set:Dt,remove:Pt,copyTo:function(e,t){var n=It(e);At(t,n)}}),insert:m({before:Fn,after:Bn,afterAll:$n,append:Vn,appendAll:Un,prepend:Nn,wrap:Hn}),remove:m({unwrap:Kn,remove:qn}),create:m({nu:xe.fromTag,clone:function(e){return xe.fromDom(e.dom.cloneNode(!1))},text:xe.fromText}),query:m({comparePosition:function(e,t){return e.dom.compareDocumentPosition(t.dom)},prevSibling:at,nextSibling:st}),property:m({children:lt,name:Ke,parent:rt,document:function(e){return ot(e).dom},isText:Qe,isComment:Xe,isElement:Je,isSpecial:function(e){var t=Ke(e);return D(["script","noscript","iframe","noframes","noembed","title","style","textarea","xmp"],t)},getLanguage:function(e){return Je(e)?Rt(e,"lang"):S.none()},getText:Yn,setText:Jn,isBoundary:function(e){return!!Je(e)&&("body"===Ke(e)||D(Qn,Ke(e)))},isEmptyTag:function(e){return!!Je(e)&&D(["br","img","hr","input"],Ke(e))},isNonEditable:function(e){return Je(e)&&"false"===Mt(e,"contenteditable")}}),eq:ke,is:De}}var eo,to,no=function(e,t,n,o){var r=t(e,n);return j(o,(function(n,o){var r=t(e,o);return oo(e,n,r)}),r)},oo=function(e,t,n){return t.bind((function(t){return n.filter(g(e.eq,t))}))},ro=function(e,t,n){return n.length>0?function(e,t,n,o){return o(e,t,n[0],n.slice(1))}(e,t,n,no):S.none()},io=function(e,t,n,o){void 0===o&&(o=_);var r=[t].concat(e.up().all(t)),i=[n].concat(e.up().all(n)),a=function(e){return B(e,o).fold((function(){return e}),(function(t){return e.slice(0,t+1)}))},s=a(r),l=a(i),c=F(s,(function(t){return A(l,function(e,t){return g(e.eq,t)}(e,t))}));return{firstpath:s,secondpath:l,shared:c}},ao=Zn(),so=function(e,t){return ro(ao,(function(t,n){return e(n)}),t)},lo=function(e){return Ot(e,"table")},co=function(e,t,n){var o=function(e){return function(t){return void 0!==n&&n(t)||ke(t,e)}};return ke(e,t)?S.some({boxes:S.some([e]),start:e,finish:t}):lo(e).bind((function(r){return lo(t).bind((function(i){if(ke(r,i))return S.some({boxes:Ln(r,e,t),start:e,finish:t});if(Te(r,i)){var a=(s=yt(t,"td,th",o(r))).length>0?s[s.length-1]:t;return S.some({boxes:jn(r,e,r,t,i),start:e,finish:a})}if(Te(i,r)){var s,l=(s=yt(e,"td,th",o(i))).length>0?s[s.length-1]:e;return S.some({boxes:jn(i,e,r,t,i),start:e,finish:l})}return function(e,t,n){return io(ao,e,t,n)}(e,t).shared.bind((function(a){return Et(a,"table",n).bind((function(n){var a=yt(t,"td,th",o(n)),s=a.length>0?a[a.length-1]:t,l=yt(e,"td,th",o(n)),c=l.length>0?l[l.length-1]:e;return S.some({boxes:jn(n,e,r,t,i),start:c,finish:s})}))}))}))}))},uo=function(e,t){var n=wt(e,t);return n.length>0?S.some(n):S.none()},fo=function(e,t,n){return kt(e,t).bind((function(t){return kt(e,n).bind((function(e){return so(lo,[t,e]).map((function(n){return{first:t,last:e,table:n}}))}))}))},mo=function(e,t,n,o,r){return function(e,t){return F(e,(function(e){return Ce(e,t)}))}(e,r).bind((function(e){return In(e,t,n).bind((function(e){return function(e,t){return Ot(e,"table").bind((function(n){return kt(n,t).bind((function(t){return co(t,e).bind((function(e){return e.boxes.map((function(t){return{boxes:t,start:e.start,finish:e.finish}}))}))}))}))}(e,o)}))}))},po=function(e,t){return uo(e,t)},ho=function(e,t,n){return fo(e,t,n).bind((function(t){var n=function(t){return ke(e,t)},o=Ot(t.first,"thead,tfoot,tbody,table",n),r=Ot(t.last,"thead,tfoot,tbody,table",n);return o.bind((function(e){return r.bind((function(n){return ke(e,n)?function(e,t,n){var o=zn(e);return Mn(o,t,n)}(t.table,t.first,t.last):S.none()}))}))}))},go=function(e){if(!i(e))throw new Error("cases must be an array");if(0===e.length)throw new Error("there must be at least one case");var t=[],n={};return P(e,(function(o,r){var a=Ae(o);if(1!==a.length)throw new Error("one and only one name per case");var s=a[0],l=o[s];if(void 0!==n[s])throw new Error("duplicate key detected:"+s);if("cata"===s)throw new Error("cannot have a case named cata (sorry)");if(!i(l))throw new Error("case arguments must be an array");t.push(s),n[s]=function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var i=n.length;if(i!==l.length)throw new Error("Wrong number of arguments to case "+s+". Expected "+l.length+" ("+l+"), got "+i);var a=function(e){var o=Ae(e);if(t.length!==o.length)throw new Error("Wrong number of arguments to match. Expected: "+t.join(",")+"\nActual: "+o.join(","));if(!H(t,(function(e){return D(o,e)})))throw new Error("Not all branches were specified when using match. Specified: "+o.join(", ")+"\nRequired: "+t.join(", "));return e[s].apply(null,n)};return{fold:function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];if(t.length!==e.length)throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+t.length);var i=t[r];return i.apply(null,n)},match:a,log:function(e){}}}})),n},vo=go([{none:[]},{multiple:["elements"]},{single:["element"]}]),bo=function(e,t,n,o){return e.fold(t,n,o)},yo=vo.none,_o=vo.multiple,wo=vo.single,xo=tinymce.util.Tools.resolve("tinymce.PluginManager"),Co=function(e,t){return xe.fromDom(e.dom.cloneNode(t))},Oo=function(e){return Co(e,!1)},So=function(e){return Co(e,!0)},ko=function(e,t){var n=xe.fromTag(t),o=It(e);return At(n,o),n},Eo=function(e,t){var n=function(n){var o=t(n);if(o<=0||null===o){var r=$t(n,e);return parseFloat(r)||0}return o},o=function(e,t){return z(t,(function(t,n){var o=$t(e,n),r=void 0===o?0:parseInt(o,10);return isNaN(r)?t:t+r}),0)};return{set:function(t,n){if(!d(n)&&!n.match(/^[0-9]+$/))throw new Error(e+".set accepts only positive integer values. Value was "+n);var o=t.dom;Bt(o)&&(o.style[e]=n+"px")},get:n,getOuter:n,aggregate:o,max:function(e,t,n){var r=o(e,n);return t>r?t-r:0}}},To=function(){var e=_e().browser;return e.isIE()||e.isEdge()},Do=function(e,t){return function(e){var t=parseFloat(e);return isNaN(t)?S.none():S.some(t)}(e).getOr(t)},Ao=function(e,t,n){return Do($t(e,t),n)},Mo=function(e){return $t(e,"box-sizing")},Ro=function(e,t,n,o){return t-Ao(e,"padding-"+n,0)-Ao(e,"padding-"+o,0)-Ao(e,"border-"+n+"-width",0)-Ao(e,"border-"+o+"-width",0)},Po=function(e,t){var n=e.dom,o=n.getBoundingClientRect().width||n.offsetWidth;return"border-box"===t?o:Ro(e,o,"left","right")},Io=Eo("width",(function(e){return e.dom.offsetWidth})),Lo=function(e){return Io.get(e)},jo=function(e){return Io.getOuter(e)},zo=function(e){return Po(e,"content-box")},Fo=function(e){return To()?Po(e,Mo(e)):Ao(e,"width",e.dom.offsetWidth)},Bo=function(e,t){void 0===t&&(t=w);var n=e.grid,o=M(n.columns,p),r=M(n.rows,p);return R(o,(function(n){return No((function(){return V(r,(function(t){return En.getAt(e,t,n).filter((function(e){return e.column===n})).toArray()}))}),(function(e){return 1===e.colspan&&t(e.element)}),(function(){return En.getAt(e,0,n)}))}))},No=function(e,t,n){var o=e();return F(o,t).orThunk((function(){return S.from(o[0]).orThunk(n)})).map((function(e){return e.element}))},Vo=function(e){var t=e.grid,n=M(t.rows,p),o=M(t.columns,p);return R(n,(function(t){return No((function(){return V(o,(function(n){return En.getAt(e,t,n).filter((function(e){return e.row===t})).fold(m([]),(function(e){return[e]}))}))}),(function(e){return 1===e.rowspan}),(function(){return En.getAt(e,t,0)}))}))},Ho=function(e,t){if(t<0||t>=e.length-1)return S.none();var n=e[t].fold((function(){var n=function(e){var t=k.call(e,0);return t.reverse(),t}(e.slice(0,t));return G(n,(function(e,t){return e.map((function(e){return{value:e,delta:t+1}}))}))}),(function(e){return S.some({value:e,delta:0})})),o=e[t+1].fold((function(){var n=e.slice(t+1);return G(n,(function(e,t){return e.map((function(e){return{value:e,delta:t+1}}))}))}),(function(e){return S.some({value:e,delta:1})}));return n.bind((function(e){return o.map((function(t){var n=t.delta+e.delta;return Math.abs(t.value-e.value)/n}))}))},$o=function(e,t){return function(n){return"rtl"===Uo(n)?t:e}},Uo=function(e){return"rtl"===$t(e,"direction")?"rtl":"ltr"},Wo=Eo("height",(function(e){var t=e.dom;return gt(e)?t.getBoundingClientRect().height:t.offsetHeight})),qo=function(e){return Wo.get(e)},Ko=function(e){return Wo.getOuter(e)},Go=function(e){return To()?function(e,t){var n=e.dom,o=n.getBoundingClientRect().height||n.offsetHeight;return"border-box"===t?o:Ro(e,o,"top","bottom")}(e,Mo(e)):Ao(e,"height",e.dom.offsetHeight)},Yo=function(e,t){return{left:e,top:t,translate:function(n,o){return Yo(e+n,t+o)}}},Xo=Yo,Jo=function(e,t){return void 0!==e?e:void 0!==t?t:0},Qo=function(e){var t=e.dom.ownerDocument,n=t.body,o=t.defaultView,r=t.documentElement;if(n===e.dom)return Xo(n.offsetLeft,n.offsetTop);var i=Jo(null==o?void 0:o.pageYOffset,r.scrollTop),a=Jo(null==o?void 0:o.pageXOffset,r.scrollLeft),s=Jo(r.clientTop,n.clientTop),l=Jo(r.clientLeft,n.clientLeft);return Zo(e).translate(a-l,i-s)},Zo=function(e){var t=e.dom,n=t.ownerDocument.body;return n===t?Xo(n.offsetLeft,n.offsetTop):gt(e)?function(e){var t=e.getBoundingClientRect();return Xo(t.left,t.top)}(t):Xo(0,0)},er=function(e,t){return{row:e,y:t}},tr=function(e,t){return{col:e,x:t}},nr=function(e){return Qo(e).left+jo(e)},or=function(e){return Qo(e).left},rr=function(e,t){return tr(e,or(t))},ir=function(e,t){return tr(e,nr(t))},ar=function(e){return Qo(e).top},sr=function(e,t){return er(e,ar(t))},lr=function(e,t){return er(e,ar(t)+Ko(t))},cr=function(e,t,n){if(0===n.length)return[];var o=R(n.slice(1),(function(t,n){return t.map((function(t){return e(n,t)}))})),r=n[n.length-1].map((function(e){return t(n.length-1,e)}));return o.concat([r])},ur={delta:p,positions:function(e){return cr(sr,lr,e)},edge:ar},dr={delta:p,edge:or,positions:function(e){return cr(rr,ir,e)}},fr={delta:function(e){return-e},edge:nr,positions:function(e){return cr(ir,rr,e)}},mr=$o(dr,fr),pr={delta:function(e,t){return mr(t).delta(e,t)},positions:function(e,t){return mr(t).positions(e,t)},edge:function(e){return mr(e).edge(e)}},hr={unsupportedLength:["em","ex","cap","ch","ic","rem","lh","rlh","vw","vh","vi","vb","vmin","vmax","cm","mm","Q","in","pc","pt","px"],fixed:["px","pt"],relative:["%"],empty:[""]},gr=(eo=function(e){return"(?:"+e+")?"},to=["Infinity","[0-9]+\\."+eo("[0-9]+")+eo("[eE][+-]?[0-9]+"),"\\.[0-9]+"+eo("[eE][+-]?[0-9]+"),"[0-9]+"+eo("[eE][+-]?[0-9]+")].join("|"),new RegExp("^([+-]?(?:"+to+"))(.*)$")),vr=function(e,t){return S.from(gr.exec(e)).bind((function(e){var n=Number(e[1]),o=e[2];return function(e,t){return A(t,(function(t){return A(hr[t],(function(t){return e===t}))}))}(o,t)?S.some({value:n,unit:o}):S.none()}))},br=/(\d+(\.\d+)?)%/,yr=/(\d+(\.\d+)?)px|em/,_r=tt("col"),wr=function(e,t,n){var o,r=(o=e,S.from(o.dom.parentElement).map(xe.fromDom)).getOrThunk((function(){return vt(nt(e))}));return t(e)/n(r)*100},xr=function(e,t){Vt(e,"width",t+"px")},Cr=function(e,t){Vt(e,"width",t+"%")},Or=function(e,t){Vt(e,"height",t+"px")},Sr=function(e,t,n,o){var r=parseFloat(e);return ie(e,"%")&&"table"!==Ke(t)?function(e,t,n,o){var r=an(e).map((function(e){var o=n(e);return Math.floor(t/100*o)})).getOr(t);return o(e,r),r}(t,r,n,o):r},kr=function(e){var t=function(e){return Go(e)+"px"}(e);return t?Sr(t,e,qo,Or):qo(e)},Er=function(e,t){return Wt(e,t).orThunk((function(){return Rt(e,t).map((function(e){return e+"px"}))}))},Tr=function(e){return Er(e,"width")},Dr=function(e){return wr(e,Lo,zo)},Ar=function(e){return _r(e)?Lo(e):Fo(e)},Mr=function(e){return function(e,t,n){return n(e)/Gt(e,t)}(e,"rowspan",kr)},Rr=function(e,t,n){Vt(e,"width",t+n)},Pr=function(e){return wr(e,Lo,zo)+"%"},Ir=m(br),Lr=tt("col"),jr=function(e){return Tr(e).getOrThunk((function(){return Ar(e)+"px"}))},zr=function(e){return(t=e,Er(t,"height")).getOrThunk((function(){return Mr(e)+"px"}));var t},Fr=function(e,t,n,o,r,i){return e.filter(o).fold((function(){return i(Ho(n,t))}),(function(e){return r(e)}))},Br=function(e,t,n,o){var r=Bo(e),i=En.hasColumns(e)?function(e){return R(En.justColumns(e),(function(e){return S.from(e.element)}))}(e):r,a=[S.some(pr.edge(t))].concat(R(pr.positions(r,t),(function(e){return e.map((function(e){return e.x}))}))),s=y(Yt);return R(i,(function(e,t){return Fr(e,t,a,s,(function(e){if(function(e){var t=_e().browser,n=t.isChrome()||t.isFirefox();return!Lr(e)||n}(e))return n(e);var i,l,c=(i=r[t],l=p,null!=i?l(i):S.none());return Fr(c,t,a,s,(function(e){return o(S.some(Lo(e)))}),o)}),o)}))},Nr=function(e){return e.map((function(e){return e+"px"})).getOr("")},Vr=function(e,t,n){return Br(e,t,Ar,(function(e){return e.getOrThunk(n.minCellWidth)}))},Hr=function(e,t,n,o,r){var i=Vo(e),a=[S.some(n.edge(t))].concat(R(n.positions(i,t),(function(e){return e.map((function(e){return e.y}))})));return R(i,(function(e,t){return Fr(e,t,a,y(Xt),o,r)}))},$r=function(e,t){return function(){return gt(e)?t(e):parseFloat(Wt(e,"width").getOr("0"))}},Ur=function(e){var t=$r(e,Lo),n=m(0);return{width:t,pixelWidth:t,getWidths:function(t,n){return Vr(t,e,n)},getCellDelta:n,singleColumnWidth:m([0]),minCellWidth:n,setElementWidth:f,adjustTableWidth:f,isRelative:!0,label:"none"}},Wr=function(e){var t=$r(e,(function(e){return parseFloat(Pr(e))})),n=$r(e,Lo);return{width:t,pixelWidth:n,getWidths:function(t,n){return function(e,t,n){return Br(e,t,Dr,(function(e){return e.fold((function(){return n.minCellWidth()}),(function(e){return e/n.pixelWidth()*100}))}))}(t,e,n)},getCellDelta:function(e){return e/n()*100},singleColumnWidth:function(e,t){return[100-e]},minCellWidth:function(){return Qt()/n()*100},setElementWidth:Cr,adjustTableWidth:function(n){var o=t();Cr(e,o+n/100*o)},isRelative:!0,label:"percent"}},qr=function(e){var t=$r(e,Lo);return{width:t,pixelWidth:t,getWidths:function(t,n){return Vr(t,e,n)},getCellDelta:p,singleColumnWidth:function(e,t){return[Math.max(Qt(),e+t)-e]},minCellWidth:Qt,setElementWidth:xr,adjustTableWidth:function(n){var o=t()+n;xr(e,o)},isRelative:!1,label:"pixel"}},Kr=function(e){return Tr(e).fold((function(){return Ur(e)}),(function(t){return function(e,t){return null!==Ir().exec(t)?Wr(e):qr(e)}(e,t)}))},Gr=qr,Yr=Wr,Xr=function(e,t,n){var o=e[n].element,r=xe.fromTag("td");Vn(r,xe.fromTag("br")),(t?Vn:Nn)(o,r)},Jr=function(e,t){var n=function(e){return Ce(e.element,t)},o=So(e),r=dn(o),i=Kr(e),a=En.generate(r),s=function(e,t){var n=e.grid.columns,o=e.grid.rows,r=n,i=0,a=0,s=[],l=[];return Re(e.access,(function(e){if(s.push(e),t(e)){l.push(e);var n=e.row,c=n+e.rowspan-1,u=e.column,d=u+e.colspan-1;n<o?o=n:c>i&&(i=c),u<r?r=u:d>a&&(a=d)}})),function(e,t,n,o,r,i){return{minRow:e,minCol:t,maxRow:n,maxCol:o,allCells:r,selectedCells:i}}(o,r,i,a,s,l)}(a,n),l="th:not("+t+"),td:not("+t+")",c=tn(o,"th,td",(function(e){return Ce(e,l)}));return P(c,qn),function(e,t,n,o){for(var r=t.grid.columns,i=t.grid.rows,a=0;a<i;a++)for(var s=!1,l=0;l<r;l++){if(!(a<n.minRow||a>n.maxRow||l<n.minCol||l>n.maxCol))En.getAt(t,a,l).filter(o).isNone()?Xr(e,s,a):s=!0}}(r,a,s,n),function(e,t,n,o){Re(n.columns,(function(e){(e.column<t.minCol||e.column>t.maxCol)&&qn(e.element)}));var r=L(en(e,"tr"),(function(e){return 0===e.dom.childElementCount}));P(r,qn),t.minCol!==t.maxCol&&t.minRow!==t.maxRow||P(en(e,"th,td"),(function(e){Pt(e,"rowspan"),Pt(e,"colspan")})),Pt(e,wn),Pt(e,"data-snooker-col-series"),Kr(e).adjustTableWidth(o)}(o,s,a,function(e,t,n,o){if(0===o.minCol&&t.grid.columns===o.maxCol+1)return 0;var r=Vr(t,e,n),i=z(r,(function(e,t){return e+t}),0),a=z(r.slice(o.minCol,o.maxCol+1),(function(e,t){return e+t}),0)/i*n.pixelWidth()-n.pixelWidth();return n.getCellDelta(a)}(e,En.fromTable(e),i,s)),o},Qr=function(e){return"img"===Ke(e)?1:Xn(e).fold((function(){return lt(e).length}),(function(e){return e.length}))},Zr=["img","br"],ei=function(e){return Xn(e).filter((function(e){return 0!==e.trim().length||e.indexOf(" ")>-1})).isSome()||D(Zr,Ke(e))},ti=function(e){return t=ei,(n=function(e){for(var o=0;o<e.childNodes.length;o++){var r=xe.fromDom(e.childNodes[o]);if(t(r))return S.some(r);var i=n(e.childNodes[o]);if(i.isSome())return i}return S.none()})(e.dom);var t,n},ni=function(e){return oi(e,ei)},oi=function(e,t){var n=function(e){for(var o=lt(e),r=o.length-1;r>=0;r--){var i=o[r];if(t(i))return S.some(i);var a=n(i);if(a.isSome())return a}return S.none()};return n(e)},ri={scope:["row","col"]},ii=function(e){return function(){var t=xe.fromTag("td",e.dom);return Vn(t,xe.fromTag("br",e.dom)),t}},ai=function(e){return function(){return xe.fromTag("col",e.dom)}},si=function(e){return function(){return xe.fromTag("colgroup",e.dom)}},li=function(e){return function(){return xe.fromTag("tr",e.dom)}},ci=function(e,t,n){var o=function(e,t){var n=ko(e,t),o=lt(So(e));return Un(n,o),n}(e,t);return Re(n,(function(e,t){null===e?Pt(o,t):Dt(o,t,e)})),o},ui=function(e){return e},di=function(e,t,n){var o=function(e,t){var n,o,r,i;n=e.element,o=t,r=n.dom,i=o.dom,Bt(r)&&Bt(i)&&(i.style.cssText=r.style.cssText),qt(t,"height"),1!==e.colspan&&qt(t,"width")};return{col:function(n){var r=xe.fromTag(Ke(n.element),t.dom);return o(n,r),e(n.element,r),r},colgroup:si(t),row:li(t),cell:function(r){var i=xe.fromTag(Ke(r.element),t.dom),a=n.getOr(["strong","em","b","i","span","font","h1","h2","h3","h4","h5","h6","p","div"]),s=a.length>0?function(e,t,n){return ti(e).map((function(o){var r=n.join(","),i=yt(o,r,(function(t){return ke(t,e)}));return j(i,(function(e,t){var n=Oo(t);return Pt(n,"contenteditable"),Vn(e,n),n}),t)})).getOr(t)}(r.element,i,a):i;return Vn(s,xe.fromTag("br")),o(r,i),function(e,t){Re(ri,(function(n,o){return Rt(e,o).filter((function(e){return D(n,e)})).each((function(e){return Dt(t,o,e)}))}))}(r.element,i),e(r.element,i),i},replace:ci,colGap:ai(t),gap:ii(t)}},fi=function(e){return{col:ai(e),colgroup:si(e),row:li(e),cell:ii(e),replace:ui,colGap:ai(e),gap:ii(e)}},mi=function(e){return R(e,xe.fromDom)},pi=function(e){return xe.fromDom(e.getBody())},hi=function(e){return e.getBoundingClientRect().width},gi=function(e){return e.getBoundingClientRect().height},vi=function(e){return function(t){return ke(t,pi(e))}},bi=function(e){return/^\d+(\.\d+)?$/.test(e)?e+"px":e},yi=function(e){Pt(e,"data-mce-style");var t=function(e){return Pt(e,"data-mce-style")};P(on(e),t),P(rn(e),t),P(sn(e),t)},_i=function(e){return xe.fromDom(e.selection.getStart())},wi=function(e){return bo(e.get(),m([]),p,U)},xi=function(e){var t=function(e,t){return Rt(e,t).exists((function(e){return parseInt(e,10)>1}))},n=wi(e);return n.length>0&&H(n,(function(e){return t(e,"rowspan")||t(e,"colspan")}))?S.some(n):S.none()},Ci=function(e,t,n){return bo(t.get(),S.none,(function(t){return t.length<=1?S.none():ho(e,n.firstSelectedSelector,n.lastSelectedSelector).map((function(e){return{bounds:e,cells:t}}))}),S.none)},Oi={selected:"data-mce-selected",selectedSelector:"td[data-mce-selected],th[data-mce-selected]",firstSelected:"data-mce-first-selected",firstSelectedSelector:"td[data-mce-first-selected],th[data-mce-first-selected]",lastSelected:"data-mce-last-selected",lastSelectedSelector:"td[data-mce-last-selected],th[data-mce-last-selected]"},Si=function(e,t,n){return{element:n,mergable:Ci(t,e,Oi),unmergable:xi(e),selection:wi(e)}},ki=function(e){return function(t,n){var o,r=Ke(t),i="col"===r||"colgroup"===r?an(o=t).bind((function(e){return po(e,Oi.firstSelectedSelector)})).fold(m(o),(function(e){return e[0]})):t;return Et(i,e,n)}},Ei=ki("th,td,caption"),Ti=ki("th,td"),Di=function(e){return wi(e)},Ai=function(e,t,n){e.on("BeforeGetContent",(function(n){!0===n.selection&&bo(t.get(),f,(function(t){n.preventDefault(),function(e){return an(e[0]).map((function(e){var t=Jr(e,"[data-mce-selected]");return yi(t),[t]}))}(t).each((function(t){n.content="text"===n.format?function(e){return R(e,(function(e){return e.dom.innerText})).join("")}(t):function(e,t){return R(t,(function(t){return e.selection.serializer.serialize(t.dom,{})})).join("")}(e,t)}))}),f)})),e.on("BeforeSetContent",(function(o){if(!0===o.selection&&!0===o.paste){var r=Di(t);q(r).each((function(t){an(t).each((function(r){var i,a,s,l=L((i=o.content,(s=(a||document).createElement("div")).innerHTML=i,lt(xe.fromDom(s))),(function(e){return"meta"!==Ke(e)})),c=tt("table");if(1===l.length&&c(l[0])){o.preventDefault();var u=xe.fromDom(e.getDoc()),d=fi(u),f=function(e,t,n){return{element:e,clipboard:t,generators:n}}(t,l[0],d);n.pasteCells(r,f).each((function(){e.focus()}))}}))}))}}))},Mi=go([{none:[]},{only:["index"]},{left:["index","next"]},{middle:["prev","index","next"]},{right:["prev","index"]}]),Ri=Y({},Mi),Pi=function(e,t,n,o,r){var i=e.slice(0),a=function(e,t){return 0===e.length?Ri.none():1===e.length?Ri.only(0):0===t?Ri.left(0,1):t===e.length-1?Ri.right(t-1,t):t>0&&t<e.length-1?Ri.middle(t-1,t,t+1):Ri.none()}(e,t),s=m(R(i,m(0)));return a.fold(s,(function(e){return o.singleColumnWidth(i[e],n)}),(function(e,t){return r.calcLeftEdgeDeltas(i,e,t,n,o.minCellWidth(),o.isRelative)}),(function(e,t,a){return r.calcMiddleDeltas(i,e,t,a,n,o.minCellWidth(),o.isRelative)}),(function(e,t){return r.calcRightEdgeDeltas(i,e,t,n,o.minCellWidth(),o.isRelative)}))},Ii=function(e,t,n){for(var o=0,r=e;r<t;r++)o+=void 0!==n[r]?n[r]:0;return o},Li=function(e,t){var n=En.justCells(e);return R(n,(function(e){var n=Ii(e.row,e.row+e.rowspan,t);return{element:e.element,height:n,rowspan:e.rowspan}}))},ji=function(e,t){return En.hasColumns(e)?function(e,t){var n=En.justColumns(e);return R(n,(function(e,n){return{element:e.element,width:t[n],colspan:e.colspan}}))}(e,t):function(e,t){var n=En.justCells(e);return R(n,(function(e){var n=Ii(e.column,e.column+e.colspan,t);return{element:e.element,width:n,colspan:e.colspan}}))}(e,t)},zi=function(e,t,n){var o=ji(e,t);P(o,(function(e){n.setElementWidth(e.element,e.width)}))},Fi=function(e,t,n,o,r){var i=En.fromTable(e),a=r.getCellDelta(t),s=r.getWidths(i,r),l=n===i.grid.columns-1,c=o.clampTableDelta(s,n,a,r.minCellWidth(),l),u=Pi(s,n,c,r,o),d=R(u,(function(e,t){return e+s[t]}));zi(i,d,r),o.resizeTable(r.adjustTableWidth,c,l)},Bi=function(e,t,n,o){var r=En.fromTable(e),i=function(e,t,n){return Hr(e,t,n,Mr,(function(e){return e.getOrThunk(Zt)}))}(r,e,o),a=R(i,(function(e,o){return n===o?Math.max(t+e,Zt()):e})),s=Li(r,a),l=function(e,t){return R(e.all,(function(e,n){return{element:e.element,height:t[n]}}))}(r,a);P(l,(function(e){Or(e.element,e.height)})),P(s,(function(e){Or(e.element,e.height)}));var c=j(a,(function(e,t){return e+t}),0);Or(e,c)},Ni=function(e){return R(e,m(0))},Vi=function(e,t,n,o,r){return r(e.slice(0,t)).concat(o).concat(r(e.slice(n)))},Hi=function(e){return function(t,n,o,r){if(e(o)){var i=Math.max(r,t[n]-Math.abs(o)),a=Math.abs(i-t[n]);return o>=0?a:-a}return o}},$i=Hi((function(e){return e<0})),Ui=Hi(w),Wi=function(){var e=function(e,t,n,o){var r=(100+n)/100,i=Math.max(o,(e[t]+n)/r);return R(e,(function(e,n){return(n===t?i:e/r)-e}))},t=function(t,n,o,r,i,a){return a?e(t,n,r,i):function(e,t,n,o,r){var i=$i(e,t,o,r);return Vi(e,t,n+1,[i,0],Ni)}(t,n,o,r,i)};return{resizeTable:function(e,t){return e(t)},clampTableDelta:$i,calcLeftEdgeDeltas:t,calcMiddleDeltas:function(e,n,o,r,i,a,s){return t(e,o,r,i,a,s)},calcRightEdgeDeltas:function(t,n,o,r,i,a){if(a)return e(t,o,r,i);var s=$i(t,o,r,i);return Ni(t.slice(0,o)).concat([s])},calcRedestributedWidths:function(e,t,n,o){if(o){var r=(t+n)/t,i=R(e,(function(e){return e/r}));return{delta:100*r-100,newSizes:i}}return{delta:n,newSizes:e}}}},qi=function(){var e=function(e,t,n,o,r){var i=Ui(e,o>=0?n:t,o,r);return Vi(e,t,n+1,[i,-i],Ni)};return{resizeTable:function(e,t,n){n&&e(t)},clampTableDelta:function(e,t,n,o,r){if(r){if(n>=0)return n;var i=z(e,(function(e,t){return e+t-o}),0);return Math.max(-i,n)}return $i(e,t,n,o)},calcLeftEdgeDeltas:e,calcMiddleDeltas:function(t,n,o,r,i,a){return e(t,o,r,i,a)},calcRightEdgeDeltas:function(e,t,n,o,r,i){if(i)return Ni(e);var a=o/e.length;return R(e,m(a))},calcRedestributedWidths:function(e,t,n,o){return{delta:0,newSizes:e}}}},Ki=function(e,t){var n=S.from(e.dom.documentElement).map(xe.fromDom).getOr(e);return{parent:m(n),view:m(e),origin:m(Xo(0,0)),isResizable:t}},Gi=function(e,t,n){return{parent:m(t),view:m(e),origin:m(Xo(0,0)),isResizable:n}},Yi=go([{invalid:["raw"]},{pixels:["value"]},{percent:["value"]}]),Xi=function(e,t,n){var o=n.substring(0,n.length-e.length),r=parseFloat(o);return o===r.toString()?t(r):Yi.invalid(n)},Ji=Y(Y({},Yi),{from:function(e){return ie(e,"%")?Xi("%",Yi.percent,e):ie(e,"px")?Xi("px",Yi.pixels,e):Yi.invalid(e)}}),Qi=function(e,t,n){return e.fold((function(){return t}),(function(e){return function(e,t,n){var o=n/t;return R(e,(function(e){return Ji.from(e).fold((function(){return e}),(function(e){return e*o+"px"}),(function(e){return e/100*n+"px"}))}))}(t,n,e)}),(function(e){return function(e,t){return R(e,(function(e){return Ji.from(e).fold((function(){return e}),(function(e){return e/t*100+"%"}),(function(e){return e+"%"}))}))}(t,n)}))},Zi=function(e,t,n){var o=Ji.from(n),r=H(e,(function(e){return"0px"===e}))?function(e,t){var n=e.fold((function(){return m("")}),(function(e){return m(e/t+"px")}),(function(){return m(100/t+"%")}));return M(t,n)}(o,e.length):Qi(o,e,t);return na(r)},ea=function(e,t){return 0===e.length?t:j(e,(function(e,t){return Ji.from(t).fold(m(0),p,p)+e}),0)},ta=function(e,t){return Ji.from(e).fold(m(e),(function(e){return e+t+"px"}),(function(e){return e+t+"%"}))},na=function(e){if(0===e.length)return e;var t=j(e,(function(e,t){var n=Ji.from(t).fold((function(){return{value:t,remainder:0}}),(function(e){return function(e,t){var n=Math.floor(e);return{value:n+t,remainder:e-n}}(e,"px")}),(function(e){return{value:e+"%",remainder:0}}));return{output:[n.value].concat(e.output),remainder:e.remainder+n.remainder}}),{output:[],remainder:0}),n=t.output;return n.slice(0,n.length-1).concat([ta(n[n.length-1],Math.round(t.remainder))])},oa=Ji.from,ra=function(e){return oa(e).fold(m("px"),m("px"),m("%"))},ia=function(e,t,n){var o=En.fromTable(e),r=o.all,i=En.justCells(o),a=En.justColumns(o);t.each((function(t){var n=ra(t),r=Lo(e),s=function(e,t){return Br(e,t,jr,Nr)}(o,e),l=Zi(s,r,t);En.hasColumns(o)?function(e,t,n){P(t,(function(t,o){var r=ea([e[o]],Qt());Vt(t.element,"width",r+n)}))}(l,a,n):function(e,t,n){P(t,(function(t){var o=e.slice(t.column,t.colspan+t.column),r=ea(o,Qt());Vt(t.element,"width",r+n)}))}(l,i,n),Vt(e,"width",t)})),n.each((function(t){var n=ra(t),a=qo(e),s=function(e,t,n){return Hr(e,t,n,zr,Nr)}(o,e,ur);!function(e,t,n,o){P(n,(function(t){var n=e.slice(t.row,t.rowspan+t.row),r=ea(n,Zt());Vt(t.element,"height",r+o)})),P(t,(function(t,n){Vt(t.element,"height",e[n])}))}(Zi(s,a,t),r,i,n),Vt(e,"height",t)}))},aa=function(e){return Tr(e).exists((function(e){return br.test(e)}))},sa=function(e){return Tr(e).exists((function(e){return yr.test(e)}))},la=function(e){return Tr(e).isNone()},ca=function(e){return En.fromTable(e).grid},ua=function(e){var t=[];return{bind:function(e){if(void 0===e)throw new Error("Event bind error: undefined handler");t.push(e)},unbind:function(e){t=L(t,(function(t){return t!==e}))},trigger:function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var r={};P(e,(function(e,t){r[e]=n[t]})),P(t,(function(e){e(r)}))}}},da=function(e){return{registry:Pe(e,(function(e){return{bind:e.bind,unbind:e.unbind}})),trigger:Pe(e,(function(e){return e.trigger}))}},fa=function(e){return e.slice(0).sort()},ma=function(e,t,n){if(0===t.length)throw new Error("You must specify at least one required field.");var r;return function(e,t){if(!i(t))throw new Error("The "+e+" fields must be an array. Was: "+t+".");P(t,(function(t){if(!o(t))throw new Error("The value "+t+" in the "+e+" fields was not a string.")}))}("required",t),r=fa(t),F(r,(function(e,t){return t<r.length-1&&e===r[t+1]})).each((function(e){throw new Error("The field: "+e+" occurs more than once in the combined fields: ["+r.join(", ")+"].")})),function(o){var r=Ae(o);H(t,(function(e){return D(r,e)}))||function(e,t){throw new Error("All required keys ("+fa(e).join(", ")+") were not specified. Specified keys were: "+fa(t).join(", ")+".")}(t,r),e(t,r);var i=L(t,(function(e){return!n.validate(o[e],e)}));return i.length>0&&function(e,t){throw new Error("All values need to be of type: "+t+". Keys ("+fa(e).join(", ")+") were not.")}(i,n.label),o}},pa=function(e,t){var n=L(t,(function(t){return!D(e,t)}));n.length>0&&function(e){throw new Error("Unsupported keys for object: "+fa(e).join(", "))}(n)},ha=function(e){return function(e,t){return ma(e,t,{validate:u,label:"function"})}(pa,e)},ga=ha(["compare","extract","mutate","sink"]),va=ha(["element","start","stop","destroy"]),ba=ha(["forceDrop","drop","move","delayDrop"]),ya=function(){var e=S.none(),t=da({move:ua(["info"])});return{onEvent:function(n,o){o.extract(n).each((function(n){(function(t,n){var o=e.map((function(e){return t.compare(e,n)}));return e=S.some(n),o})(o,n).each((function(e){t.trigger.move(e)}))}))},reset:function(){e=S.none()},events:t.registry}},_a=function(){var e,t=(e=da({move:ua(["info"])}),{onEvent:f,reset:f,events:e.registry}),n=ya(),o=t;return{on:function(){o.reset(),o=n},off:function(){o.reset(),o=t},isOn:function(){return o===n},onEvent:function(e,t){o.onEvent(e,t)},events:n.events}},wa=function(e,t,n){var o,r,i,s,l=!1,c=da({start:ua([]),stop:ua([])}),u=_a(),d=function(){p.stop(),u.isOn()&&(u.off(),c.trigger.stop())},f=(o=d,r=200,i=null,{cancel:s=function(){a(i)||(clearTimeout(i),i=null)},throttle:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];s(),i=setTimeout((function(){i=null,o.apply(null,e)}),r)}});u.events.move.bind((function(n){t.mutate(e,n.info)}));var m=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];l&&e.apply(null,t)}},p=t.sink(ba({forceDrop:d,drop:m(d),move:m((function(e){f.cancel(),u.onEvent(e,t)})),delayDrop:m(f.throttle)}),n);return{element:p.element,go:function(e){p.start(e),u.on(),c.trigger.start()},on:function(){l=!0},off:function(){l=!1},destroy:function(){p.destroy()},events:c.registry}},xa=function(e){var t,n,o=xe.fromDom(function(e){if(dt()&&c(e.target)){var t=xe.fromDom(e.target);if(Je(t)&&ht(t)&&e.composed&&e.composedPath){var n=e.composedPath();if(n)return q(n)}}return S.from(e.target)}(e).getOr(e.target)),r=function(){return e.stopPropagation()},i=function(){return e.preventDefault()},a=(t=i,n=r,function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];return t(n.apply(null,e))});return function(e,t,n,o,r,i,a){return{target:e,x:t,y:n,stop:o,prevent:r,kill:i,raw:a}}(o,e.clientX,e.clientY,r,i,a,e)},Ca=function(e,t,n,o,r){var i=function(e,t){return function(n){e(n)&&t(xa(n))}}(n,o);return e.dom.addEventListener(t,i,r),{unbind:g(Oa,e,t,i,r)}},Oa=function(e,t,n,o){e.dom.removeEventListener(t,n,o)},Sa=w,ka=function(e,t,n){return function(e,t,n,o){return Ca(e,t,n,o,!1)}(e,t,Sa,n)},Ea=xa,Ta=function(e,t){var n=Mt(e,t);return void 0===n||""===n?[]:n.split(" ")},Da=function(e){return void 0!==e.dom.classList},Aa=function(e,t){return function(e,t,n){var o=Ta(e,t).concat([n]);return Dt(e,t,o.join(" ")),!0}(e,"class",t)},Ma=function(e,t){Da(e)?e.dom.classList.add(t):Aa(e,t)},Ra=function(e,t){return Da(e)&&e.dom.classList.contains(t)},Pa=function(e){var t=e.replace(/\./g,"-");return{resolve:function(e){return t+"-"+e}}},Ia=Pa("ephox-dragster"),La=Ia.resolve,ja=ga({compare:function(e,t){return Xo(t.left-e.left,t.top-e.top)},extract:function(e){return S.some(Xo(e.x,e.y))},sink:function(e,t){var n=function(e){var t=Y({layerClass:La("blocker")},e),n=xe.fromTag("div");Dt(n,"role","presentation"),Ht(n,{position:"fixed",left:"0px",top:"0px",width:"100%",height:"100%"}),Ma(n,La("blocker")),Ma(n,t.layerClass);return{element:m(n),destroy:function(){qn(n)}}}(t),o=ka(n.element(),"mousedown",e.forceDrop),r=ka(n.element(),"mouseup",e.drop),i=ka(n.element(),"mousemove",e.move),a=ka(n.element(),"mouseout",e.delayDrop);return va({element:n.element,start:function(e){Vn(e,n.element())},stop:function(){qn(n.element())},destroy:function(){n.destroy(),r.unbind(),i.unbind(),a.unbind(),o.unbind()}})},mutate:function(e,t){e.mutate(t.left,t.top)}}),za=function(e){return Et(e,"[contenteditable]")},Fa=function(e,t){return void 0===t&&(t=!1),!_e().browser.isIE()&&gt(e)?e.dom.isContentEditable:za(e).fold(m(t),(function(e){return"true"===Ba(e)}))},Ba=function(e){return e.dom.contentEditable},Na=Pa("ephox-snooker"),Va=Na.resolve,Ha=function(){var e=da({drag:ua(["xDelta","yDelta","target"])}),t=S.none(),n=function(){var e=da({drag:ua(["xDelta","yDelta"])});return{mutate:function(t,n){e.trigger.drag(t,n)},events:e.registry}}();n.events.drag.bind((function(n){t.each((function(t){e.trigger.drag(n.xDelta,n.yDelta,t)}))}));return{assign:function(e){t=S.some(e)},get:function(){return t},mutate:n.mutate,events:e.registry}},$a=Va("resizer-bar"),Ua=Va("resizer-rows"),Wa=Va("resizer-cols"),qa=function(e){var t=wt(e.parent(),"."+$a);P(t,qn)},Ka=function(e,t,n){var o=e.origin();P(t,(function(t){t.each((function(t){var r=n(o,t);Ma(r,$a),Vn(e.parent(),r)}))}))},Ga=function(e,t,n,o){Ka(e,t,(function(e,t){var r,i,a,s,l,c,u=(r=t.col,i=t.x-e.left,a=n.top-e.top,s=7,l=o,c=xe.fromTag("div"),Ht(c,{position:"absolute",left:i-s/2+"px",top:a+"px",height:l+"px",width:s+"px"}),At(c,{"data-column":r,role:"presentation"}),c);return Ma(u,Wa),u}))},Ya=function(e,t,n,o){Ka(e,t,(function(e,t){var r=function(e,t,n,o,r){var i=xe.fromTag("div");return Ht(i,{position:"absolute",left:t+"px",top:n-r/2+"px",height:r+"px",width:o+"px"}),At(i,{"data-row":e,role:"presentation"}),i}(t.row,n.left-e.left,t.y-e.top,o,7);return Ma(r,Ua),r}))},Xa=function(e,t,n,o,r){var i=Qo(n),a=t.isResizable,s=o.length>0?ur.positions(o,n):[],l=s.length>0?function(e,t){return V(e.all,(function(e,n){return t(e.element)?[n]:[]}))}(e,a):[],c=L(s,(function(e,t){return A(l,(function(e){return t===e}))}));Ya(t,c,i,jo(n));var u=r.length>0?pr.positions(r,n):[],d=u.length>0?function(e,t){var n=[];return M(e.grid.columns,(function(o){En.getColumnAt(e,o).map((function(e){return e.element})).forall(t)&&n.push(o)})),L(n,(function(n){var o=En.filterItems(e,(function(e){return e.column===n}));return H(o,(function(e){return t(e.element)}))}))}(e,a):[],f=L(u,(function(e,t){return A(d,(function(e){return t===e}))}));Ga(t,f,i,Ko(n))},Ja=function(e,t){if(qa(e),e.isResizable(t)){var n=En.fromTable(t),o=Vo(n),r=Bo(n);Xa(n,e,t,o,r)}},Qa=function(e,t){var n=wt(e.parent(),"."+$a);P(n,t)},Za=function(e){Qa(e,(function(e){Vt(e,"display","none")}))},es=function(e){Qa(e,(function(e){Vt(e,"display","block")}))},ts=Va("resizer-bar-dragging"),ns=function(e){var t=Ha(),n=function(e,t){void 0===t&&(t={});var n=void 0!==t.mode?t.mode:ja;return wa(e,n,t)}(t,{}),o=S.none(),r=function(e,t){return S.from(Mt(e,t))};t.events.drag.bind((function(e){r(e.target,"data-row").each((function(t){var n=Jt(e.target,"top");Vt(e.target,"top",n+e.yDelta+"px")})),r(e.target,"data-column").each((function(t){var n=Jt(e.target,"left");Vt(e.target,"left",n+e.xDelta+"px")}))}));var i=function(e,t){return Jt(e,t)-Kt(e,"data-initial-"+t,0)};n.events.stop.bind((function(){t.get().each((function(t){o.each((function(n){r(t,"data-row").each((function(e){var o=i(t,"top");Pt(t,"data-initial-top"),u.trigger.adjustHeight(n,o,parseInt(e,10))})),r(t,"data-column").each((function(e){var o=i(t,"left");Pt(t,"data-initial-left"),u.trigger.adjustWidth(n,o,parseInt(e,10))})),Ja(e,n)}))}))}));var a=function(o,r){u.trigger.startAdjust(),t.assign(o),Dt(o,"data-initial-"+r,Jt(o,r)),Ma(o,ts),Vt(o,"opacity","0.2"),n.go(e.parent())},s=ka(e.parent(),"mousedown",(function(e){var t;t=e.target,Ra(t,Ua)&&a(e.target,"top"),function(e){return Ra(e,Wa)}(e.target)&&a(e.target,"left")})),l=function(t){return ke(t,e.view())},c=ka(e.view(),"mouseover",(function(t){var n;(n=t.target,Et(n,"table",l).filter(Fa)).fold((function(){gt(t.target)&&qa(e)}),(function(t){o=S.some(t),Ja(e,t)}))})),u=da({adjustHeight:ua(["table","delta","row"]),adjustWidth:ua(["table","delta","column"]),startAdjust:ua([])});return{destroy:function(){s.unbind(),c.unbind(),n.destroy(),qa(e)},refresh:function(t){Ja(e,t)},on:n.on,off:n.off,hideBars:g(Za,e),showBars:g(es,e),events:u.registry}},os=function(e,t,n){var o=ur,r=pr,i=ns(e),a=da({beforeResize:ua(["table","type"]),afterResize:ua(["table","type"]),startDrag:ua([])});return i.events.adjustHeight.bind((function(e){var t=e.table;a.trigger.beforeResize(t,"row");var n=o.delta(e.delta,t);Bi(t,n,e.row,o),a.trigger.afterResize(t,"row")})),i.events.startAdjust.bind((function(e){a.trigger.startDrag()})),i.events.adjustWidth.bind((function(e){var o=e.table;a.trigger.beforeResize(o,"col");var i=r.delta(e.delta,o),s=n(o);Fi(o,i,e.column,t,s),a.trigger.afterResize(o,"col")})),{on:i.on,off:i.off,hideBars:i.hideBars,showBars:i.showBars,destroy:i.destroy,events:a.registry}},rs=function(e,t){return e.fire("newrow",{node:t})},is=function(e,t){return e.fire("newcell",{node:t})},as=function(e,t,n){e.fire("TableModified",Y(Y({},n),{table:t}))},ss={structure:!1,style:!0},ls={structure:!0,style:!1},cs={structure:!0,style:!0},us={"border-collapse":"collapse",width:"100%"},ds=M(5,(function(e){var t=e+1+"px";return{title:t,value:t}})),fs=R(["Solid","Dotted","Dashed","Double","Groove","Ridge","Inset","Outset","None","Hidden"],(function(e){return{title:e,value:e.toLowerCase()}})),ms={border:"1"},ps=function(e){return e.getParam("table_sizing_mode","auto")},hs=function(e){return e.getParam("table_responsive_width")},gs=function(e){return e.getParam("table_border_widths",ds,"array")},vs=function(e){return e.getParam("table_border_styles",fs,"array")},bs=function(e){return e.getParam("table_default_attributes",ms,"object")},ys=function(e){return e.getParam("table_default_styles",function(e){var t;if(Es(e)){var n=e.dom,o=null!==(t=n.getParent(e.selection.getStart(),n.isBlock))&&void 0!==t?t:e.getBody(),r=zo(xe.fromDom(o));return Y(Y({},us),{width:r+"px"})}return Ts(e)?Le(us,(function(e,t){return"width"!==t})):us}(e),"object")},_s=function(e){return e.getParam("table_cell_advtab",!0,"boolean")},ws=function(e){return e.getParam("table_row_advtab",!0,"boolean")},xs=function(e){return e.getParam("table_advtab",!0,"boolean")},Cs=function(e){return e.getParam("table_style_by_css",!1,"boolean")},Os=function(e){return e.getParam("table_cell_class_list",[],"array")},Ss=function(e){return e.getParam("table_class_list",[],"array")},ks=function(e){return"relative"===ps(e)||!0===hs(e)},Es=function(e){return"fixed"===ps(e)||!1===hs(e)},Ts=function(e){return"responsive"===ps(e)},Ds=function(e){return e.getParam("table_use_colgroups",!1,"boolean")},As=function(e){var t=e.getParam("table_header_type","section","string");return D(["section","cells","sectionCells","auto"],t)?t:"section"},Ms=function(e){var t=e.getParam("table_column_resizing","preservetable","string");return F(["preservetable","resizetable"],(function(e){return e===t})).getOr("preservetable")},Rs=function(e){return"preservetable"===Ms(e)},Ps=function(e){return"resizetable"===Ms(e)},Is=function(e){var t=e.getParam("table_clone_elements");return o(t)?S.some(t.split(/[ ,]/)):Array.isArray(t)?S.some(t):S.none()},Ls=function(e){return e.getParam("table_background_color_map",[],"array")},js=function(e){return e.getParam("table_border_color_map",[],"array")},zs=function(e,t){return ks(e)?Yr(t):Es(e)?Gr(t):Kr(t)},Fs=function(e){Pt(e,"width")},Bs=function(e){var t=Pr(e);ia(e,S.some(t),S.none()),Fs(e)},Ns=function(e){var t=function(e){return Lo(e)+"px"}(e);ia(e,S.some(t),S.none()),Fs(e)},Vs=function(e){qt(e,"width");var t=rn(e),n=t.length>0?t:on(e);P(n,(function(e){qt(e,"width"),Fs(e)})),Fs(e)},Hs=function(){var e=xe.fromTag("div");return Ht(e,{position:"static",height:"0",width:"0",padding:"0",margin:"0",border:"0"}),Vn(vt(xe.fromDom(document)),e),e},$s=function(e){return"false"!==Mt(e,"data-mce-resize")},Us=function(e){var t,n,r=S.none(),i=S.none(),a=S.none(),s=function(e){return"TABLE"===e.nodeName},l=function(){return i},c=function(t){return zs(e,t)},u=function(){return Rs(e)?qi():Wi()},d=function(o,r,i){var a=ie(r,"e");if(""===n&&Bs(o),i!==t&&""!==n){Vt(o,"width",n);var s=u(),l=c(o),d=Rs(e)||a?function(e){return ca(e).columns}(o)-1:0;Fi(o,i-t,d,s,l)}else if(function(e){return/^(\d+(\.\d+)?)%$/.test(e)}(n)){var f=parseFloat(n.replace("%",""));Vt(o,"width",i*f/t+"%")}(function(e){return/^(\d+(\.\d+)?)px$/.test(e)})(n)&&function(e){var t=En.fromTable(e);En.hasColumns(t)||P(on(e),(function(e){var t=$t(e,"width");Vt(e,"width",t),Pt(e,"width")}))}(o)};return e.on("init",(function(){var t=function(e,t){return e.inline?Gi(pi(e),Hs(),t):Ki(xe.fromDom(e.getDoc()),t)}(e,$s);if(a=S.some(t),function(e){var t=e.getParam("object_resizing",!0);return o(t)?"table"===t:t}(e)&&function(e){return e.getParam("table_resize_bars",!0,"boolean")}(e)){var n=u(),s=os(t,n,c);s.on(),s.events.startDrag.bind((function(t){r=S.some(e.selection.getRng())})),s.events.beforeResize.bind((function(t){var n=t.table.dom;!function(e,t,n,o,r){e.fire("ObjectResizeStart",{target:t,width:n,height:o,origin:r})}(e,n,hi(n),gi(n),"bar-"+t.type)})),s.events.afterResize.bind((function(t){var n=t.table,o=n.dom;yi(n),r.each((function(t){e.selection.setRng(t),e.focus()})),function(e,t,n,o,r){e.fire("ObjectResized",{target:t,width:n,height:o,origin:r})}(e,o,hi(o),gi(o),"bar-"+t.type),e.undoManager.add()})),i=S.some(s)}})),e.on("ObjectResizeStart",(function(o){var r=o.target;if(s(r)){var i=xe.fromDom(r);P(e.dom.select(".mce-clonedresizable"),(function(t){e.dom.addClass(t,"mce-"+Ms(e)+"-columns")})),!sa(i)&&Es(e)?Ns(i):!aa(i)&&ks(e)&&Bs(i),la(i)&&re(o.origin,"bar-")&&Bs(i),t=o.width,n=Ts(e)?"":function(e,t){var n=e.dom.getStyle(t,"width")||e.dom.getAttrib(t,"width");return S.from(n).filter(se)}(e,r).getOr("")}})),e.on("ObjectResized",(function(t){var n=t.target;if(s(n)){var o=xe.fromDom(n),r=t.origin;re(r,"corner-")&&d(o,r,t.width),yi(o),as(e,o.dom,ss)}})),e.on("SwitchMode",(function(){l().each((function(t){e.mode.isReadOnly()?t.hideBars():t.showBars()}))})),{lazyResize:l,lazyWire:function(){return a.getOr(Ki(xe.fromDom(e.getBody()),$s))},destroy:function(){i.each((function(e){e.destroy()})),a.each((function(t){!function(e,t){e.inline&&qn(t.parent())}(e,t)}))}}},Ws=function(e,t){return{element:e,offset:t}},qs=function(e,t,n){return e.property().isText(t)&&0===e.property().getText(t).trim().length||e.property().isComment(t)?n(t).bind((function(t){return qs(e,t,n).orThunk((function(){return S.some(t)}))})):S.none()},Ks=function(e,t){return e.property().isText(t)?e.property().getText(t).length:e.property().children(t).length},Gs=function(e,t){var n=qs(e,t,e.query().prevSibling).getOr(t);if(e.property().isText(n))return Ws(n,Ks(e,n));var o=e.property().children(n);return o.length>0?Gs(e,o[o.length-1]):Ws(n,Ks(e,n))},Ys=Gs,Xs=Zn(),Js=function(e,t){1===Gt(e,"colspan")&&function(e){return Tr(e).bind((function(e){return vr(e,["fixed","relative","empty"])}))}(e).each((function(n){var o=n.value/2;Rr(e,o,n.unit),Rr(t,o,n.unit)}))},Qs=tt("th"),Zs=function(e){return H(e,(function(e){return Qs(e.element)}))},el=function(e,t){return e&&t?"sectionCells":e?"section":"cells"},tl=function(e){var t="thead"===e.section,n=Lt(nl(e.cells),"th");return t||n?{type:"header",subType:el(t,n)}:"tfoot"===e.section?{type:"footer"}:{type:"body"}},nl=function(e){var t=L(e,(function(e){return Qs(e.element)}));return 0===t.length?S.some("td"):t.length===e.length?S.some("th"):S.none()},ol=function(e,t,n){return We(n(e.element,t),!0,e.isLocked)},rl=function(e,t){return e.section!==t?qe(e.element,e.cells,t,e.isNew):e},il=function(){return{transformRow:rl,transformCell:function(e,t,n){var o=n(e.element,t),r="td"!==Ke(o)?function(e,t){var n=ko(e,t);Fn(e,n);var o=lt(e);return Un(n,o),qn(e),n}(o,"td"):o;return We(r,e.isNew,e.isLocked)}}},al=function(){return{transformRow:rl,transformCell:ol}},sl=function(){return{transformRow:function(e,t){return rl(e,"thead"===t?"tbody":t)},transformCell:ol}},ll=function(e,t){switch(function(e){return G(e.all,(function(e){var t=tl(e);return"header"===t.type?S.from(t.subType):S.none()}))}(En.fromTable(e)).getOr(t)){case"section":return il();case"sectionCells":return al();case"cells":return sl()}},cl=il,ul=al,dl=sl,fl=function(){return{transformRow:p,transformCell:ol}},ml=function(e,t,n,o){n===o?Pt(e,t):Dt(e,t,n)},pl=function(e,t,n){K(_t(e,t)).fold((function(){return Nn(e,n)}),(function(e){return Bn(e,n)}))},hl=function(e,t){var n=[],o=[],r=function(e){return R(e,(function(e){e.isNew&&n.push(e.element);var t=e.element;return Wn(t),P(e.cells,(function(e){e.isNew&&o.push(e.element),ml(e.element,"colspan",e.colspan,1),ml(e.element,"rowspan",e.rowspan,1),Vn(t,e.element)})),t}))},i=function(e){return V(e,(function(e){return R(e.cells,(function(e){return ml(e.element,"span",e.colspan,1),e.element}))}))},a=function(t,n){var o=function(e,t){var n=St(e,t).getOrThunk((function(){var n=xe.fromTag(t,nt(e).dom);return"thead"===t?pl(e,"caption,colgroup",n):"colgroup"===t?pl(e,"caption",n):Vn(e,n),n}));return Wn(n),n}(e,n),a=("colgroup"===n?i:r)(t);Un(o,a)},s=function(t,n){t.length>0?a(t,n):function(t){St(e,t).each(qn)}(n)},l=[],c=[],u=[],d=[];return P(t,(function(e){switch(e.section){case"thead":l.push(e);break;case"tbody":c.push(e);break;case"tfoot":u.push(e);break;case"colgroup":d.push(e)}})),s(d,"colgroup"),s(l,"thead"),s(c,"tbody"),s(u,"tfoot"),{newRows:n,newCells:o}},gl=function(e,t){if(0===e.length)return 0;var n=e[0];return B(e,(function(e){return!t(n.element,e.element)})).getOr(e.length)},vl=function(e,t,n,o){var r=function(e,t){return e[t]}(e,t),i="colgroup"===r.section;return{colspan:gl(r.cells.slice(n),o),rowspan:i?1:gl(function(e,t){return R(e,(function(e){return gn(e,t)}))}(e.slice(t),n),o)}},bl=function(e,t){var n=R(e,(function(e){return R(e.cells,_)}));return R(e,(function(o,r){var i=V(o.cells,(function(o,i){if(!1===n[r][i]){var a=vl(e,r,i,t);return function(e,t,o,r){for(var i=e;i<e+o;i++)for(var a=t;a<t+r;a++)n[i][a]=!0}(r,i,a.rowspan,a.colspan),[(s=o.element,l=a.rowspan,c=a.colspan,u=o.isNew,{element:s,rowspan:l,colspan:c,isNew:u})]}return[];var s,l,c,u}));return function(e,t,n,o){return{element:e,cells:t,section:n,isNew:o}}(o.element,i,o.section,o.isNew)}))},yl=function(e,t,n){var o=[];P(e.colgroups,(function(r){for(var i=[],a=0;a<e.grid.columns;a++){var s=En.getColumnAt(e,a).map((function(e){return We(e.element,n,!1)})).getOrThunk((function(){return We(t.colGap(),!0,!1)}));i.push(s)}o.push(qe(r.element,i,"colgroup",n))}));for(var r=0;r<e.grid.rows;r++){for(var i=[],a=0;a<e.grid.columns;a++){var s=En.getAt(e,r,a).map((function(e){return We(e.element,n,e.isLocked)})).getOrThunk((function(){return We(t.gap(),!0,!1)}));i.push(s)}var l=e.all[r],c=qe(l.element,i,l.section,n);o.push(c)}return o},_l=function(e){return bl(e,ke)},wl=function(e,t){return G(e.all,(function(e){return F(e.cells,(function(e){return ke(t,e.element)}))}))},xl=function(e,t,n){var o=R(t.selection,(function(t){return nn(t).bind((function(t){return wl(e,t)})).filter(n)})),r=jt(o);return Ft(r.length>0,r)},Cl=function(e,t,n,o,r){return function(i,a,s,l,c){var u=En.fromTable(a),d=S.from(null==c?void 0:c.section).getOrThunk(fl);return t(u,s).map((function(t){var n=function(e,t){return yl(e,t,!1)}(u,l),o=e(n,t,ke,r(l),d),i=Cn(o.grid);return{info:t,grid:_l(o.grid),cursor:o.cursor,lockedColumns:i}})).bind((function(e){var t=hl(a,e.grid),r=S.from(null==c?void 0:c.sizing).getOrThunk((function(){return Kr(a)})),s=S.from(null==c?void 0:c.resize).getOrThunk(qi);return n(a,e.grid,e.info,{sizing:r,resize:s,section:d}),o(a),Ja(i,a),Pt(a,wn),e.lockedColumns.length>0&&Dt(a,wn,e.lockedColumns.join(",")),S.some({cursor:e.cursor,newRows:t.newRows,newCells:t.newCells})}))}},Ol=function(e,t){return xl(e,t,w).map((function(e){return{cells:e,generators:t.generators,clipboard:t.clipboard}}))},Sl=function(e,t){return xl(e,t,w)},kl=function(e,t){return xl(e,t,(function(e){return!e.isLocked}))},El=function(e,t){return H(t,(function(t){return function(e,t){return wl(e,t).exists((function(e){return!e.isLocked}))}(e,t)}))},Tl=function(e,t){return function(e,t){return t.mergable}(0,t).filter((function(t){return El(e,t.cells)}))},Dl=function(e,t){return function(e,t){return t.unmergable}(0,t).filter((function(t){return El(e,t)}))},Al=function(e,t,n,o){for(var r=yn(e).rows,i=!0,a=0;a<r.length;a++)for(var s=0;s<bn(r[0]);s++){var l=r[a],c=gn(l,s),u=n(c.element,t);!0===u&&!1===i?pn(l,s,We(o(),!0,c.isLocked)):!0===u&&(i=!1)}return e},Ml=function(e,t,n,o){var r=yn(e).rows;if(t>0&&t<r.length){var i=function(e,t){return z(e,(function(e,n){return A(e,(function(e){return t(e.element,n.element)}))?e:e.concat([n])}),[])}(r[t-1].cells,n);P(i,(function(e){for(var i=S.none(),a=t;a<r.length;a++)for(var s=function(t){var s=r[a],l=gn(s,t);n(l.element,e.element)&&(i.isNone()&&(i=S.some(o())),i.each((function(e){pn(s,t,We(e,!0,l.isLocked))})))},l=0;l<bn(r[0]);l++)s(l)}))}return e},Rl=function(e){return{isValue:w,isError:_,getOr:m(e),getOrThunk:m(e),getOrDie:m(e),or:function(t){return Rl(e)},orThunk:function(t){return Rl(e)},fold:function(t,n){return n(e)},map:function(t){return Rl(t(e))},mapError:function(t){return Rl(e)},each:function(t){t(e)},bind:function(t){return t(e)},exists:function(t){return t(e)},forall:function(t){return t(e)},toOptional:function(){return S.some(e)}}},Pl=function(e){return{isValue:_,isError:w,getOr:p,getOrThunk:function(e){return e()},getOrDie:function(){return(t=String(e),function(){throw new Error(t)})();var t},or:p,orThunk:function(e){return e()},fold:function(t,n){return t(e)},map:function(t){return Pl(e)},mapError:function(t){return Pl(t(e))},each:f,bind:function(t){return Pl(e)},exists:_,forall:w,toOptional:S.none}},Il={value:Rl,error:Pl,fromOption:function(e,t){return e.fold((function(){return Pl(t)}),Rl)}},Ll=function(e,t){return{rowDelta:0,colDelta:bn(e[0])-bn(t[0])}},jl=function(e,t){return{rowDelta:e.length-t.length,colDelta:0}},zl=function(e,t,n,o){var r="colgroup"===t.section?n.col:n.cell;return M(e,(function(e){return We(r(),!0,o(e))}))},Fl=function(e,t,n,o){var r=e[e.length-1];return e.concat(M(t,(function(){var e="colgroup"===r.section?n.colgroup:n.row,t=_n(r,e,p),i=zl(t.cells.length,t,n,(function(e){return Ne(o,e.toString())}));return hn(t,i)})))},Bl=function(e,t,n,o){return R(e,(function(e){var r=zl(t,e,n,_);return fn(e,o,r)}))},Nl=function(e,t,n){var o=t.colDelta<0?Bl:p,r=t.rowDelta<0?Fl:p,i=Cn(e),a=bn(e[0]),s=A(i,(function(e){return e===a-1})),l=o(e,Math.abs(t.colDelta),n,s?a-1:a),c=Cn(l);return r(l,Math.abs(t.rowDelta),n,$(c,w))},Vl=function(e,t,n,o){var r=g(o,gn(e[t],n).element),i=e[t];return e.length>1&&bn(i)>1&&(n>0&&r(vn(i,n-1))||n<i.cells.length-1&&r(vn(i,n+1))||t>0&&r(vn(e[t-1],n))||t<e.length-1&&r(vn(e[t+1],n)))},Hl=function(e,t,n){return L(n,(function(n){return n>=e.column&&n<=bn(t[0])+e.column}))},$l=function(e,t,n,o,r){var i=Cn(t),a=function(e,t,n){var o=bn(t[0]),r=yn(t).cols.length+e.row,i=M(o-e.column,(function(t){return t+e.column}));return{row:r,column:F(i,(function(e){return H(n,(function(t){return t!==e}))})).getOr(o-1)}}(e,t,i),s=yn(n).rows,l=Hl(a,s,i);return function(e,t,n){if(e.row>=t.length||e.column>bn(t[0]))return Il.error("invalid start address out of table bounds, row: "+e.row+", column: "+e.column);var o=t.slice(e.row),r=o[0].cells.slice(e.column),i=bn(n[0]),a=n.length;return Il.value({rowDelta:o.length-a,colDelta:r.length-i})}(a,t,s).map((function(e){var n=Y(Y({},e),{colDelta:e.colDelta-l.length}),i=Nl(t,n,o),c=Cn(i),u=Hl(a,s,c);return function(e,t,n,o,r,i){for(var a=e.row,s=e.column,l=a+n.length,c=s+bn(n[0])+i.length,u=$(i,w),d=a;d<l;d++)for(var f=0,m=s;m<c;m++)if(u[m])f++;else{Vl(t,d,m,r)&&Al(t,vn(t[d],m),r,o.cell);var p=m-s-f,h=gn(n[d-a],p),g=h.element,v=o.replace(g);pn(t[d],m,We(v,!0,h.isLocked))}return t}(a,i,s,o,r,u)}))},Ul=function(e,t,n,o,r){!function(e,t,n,o){t>0&&t<e[0].cells.length&&P(e,(function(e){var r=e.cells[t-1],i=e.cells[t];n(i.element,r.element)&&pn(e,t,We(o(),!0,i.isLocked))}))}(t,e,r,o.cell);var i=jl(n,t),a=Nl(n,i,o),s=jl(t,a),l=Nl(t,s,o);return R(l,(function(t,n){return fn(t,e,a[n].cells)}))},Wl=function(e,t,n,o,r){Ml(t,e,r,o.cell);var i=Cn(t),a=Ll(t,n),s=Y(Y({},a),{colDelta:a.colDelta-i.length}),l=Nl(t,s,o),c=yn(l),u=c.cols,d=c.rows,f=Cn(l),m=Ll(n,t),p=Y(Y({},m),{colDelta:m.colDelta+f.length}),h=function(e,t,n){return R(e,(function(e){return z(n,(function(n,o){var r=zl(1,e,t,w)[0];return mn(n,o,r)}),e)}))}(n,o,f),g=Nl(h,p,o);return u.concat(d.slice(0,e)).concat(g).concat(d.slice(e,d.length))},ql=function(e,t,n,o,r){var i=yn(e),a=i.rows,s=i.cols,l=a.slice(0,t),c=a.slice(t),u=function(e,t,n,o){return _n(e,(function(e){return o(e,n)}),t)}(a[n],(function(e,n){return t>0&&t<a.length&&o(vn(a[t-1],n),vn(a[t],n))?gn(a[t],n):We(r(e.element,o),!0,e.isLocked)}),o,r);return s.concat(l).concat([u]).concat(c)},Kl=function(e,t,n,o,r){return R(e,(function(e){var i=t>0&&t<bn(e)&&o(vn(e,t-1),vn(e,t)),a=function(e,t,n,o,r,i,a){if("colgroup"!==n&&o)return gn(e,t);var s=gn(e,r);return We(a(s.element,i),!0,!1)}(e,t,e.section,i,n,o,r);return mn(e,t,a)}))},Gl=function(e,t,n,o){return function(e,t,n,o){return void 0!==vn(e[t],n)&&t>0&&o(vn(e[t-1],n),vn(e[t],n))}(e,t,n,o)||function(e,t,n){return t>0&&n(vn(e,t-1),vn(e,t))}(e[t],n,o)},Yl=function(e,t,n,o){var r=function(e){return function(e){return"row"===e?Xt(t):Yt(t)}(e)?e+"group":e};return e?Qs(t)?r(n):null:o&&Qs(t)?r("row"===n?"col":"row"):null},Xl=function(e,t,n){return We(n(e.element,t),!0,e.isLocked)},Jl=function(e,t,n,o,r,i,a){return R(e,(function(e,s){return function(e,t){var n=e.cells,o=R(n,t);return qe(e.element,o,e.section,e.isNew)}(e,(function(e,l){if(function(e){return A(t,(function(t){return n(e.element,t.element)}))}(e)){var c=a(e,s,l)?r(e,n,o):e;return i(c,s,l).each((function(e){var t,n;t=c.element,n={scope:S.from(e)},Re(n,(function(e,n){e.fold((function(){Pt(t,n)}),(function(e){Tt(t.dom,n,e)}))}))})),c}return e}))}))},Ql=function(e,t,n){return V(e,(function(o,r){return Gl(e,r,t,n)?[]:[gn(o,t)]}))},Zl=function(e,t,n,o,r){var i=yn(e).rows,a=V(t,(function(e){return Ql(i,e,o)})),s=R(e,(function(e){return Zs(e.cells)})),l=function(e,t){return H(t,p)&&Zs(e)?w:function(e,n,o){return!("th"===Ke(e.element)&&t[n])}}(a,s),c=function(e,t){return function(n,o){return S.some(Yl(e,n.element,"row",t[o]))}}(n,s);return Jl(e,a,o,r,Xl,c,l)},ec=function(e,t,n,o,r,i,a){var s=yn(e),l=s.cols,c=s.rows,u=c[t[0]],d=V(t,(function(e){return function(e,t,n){var o=e[t];return V(o.cells,(function(o,r){return Gl(e,t,r,n)?[]:[o]}))}(c,e,r)})),f=R(u.cells,(function(e,t){return Zs(Ql(c,t,r))})),m=X([],c,!0);P(t,(function(e){m[e]=a.transformRow(c[e],n)}));var h=l.concat(m),g=function(e,t){return H(t,p)&&Zs(e.cells)?w:function(e,n,o){return!("th"===Ke(e.element)&&t[o])}}(u,f),v=function(e,t){return function(n,o,r){return S.some(Yl(e,n.element,"col",t[r]))}}(o,f);return Jl(h,d,r,i,a.transformCell,v,g)},tc=function(e,t,n,o){var r=yn(e).rows,i=R(t,(function(e){return gn(r[e.row],e.column)}));return Jl(e,i,n,o,Xl,S.none,w)},nc=function(e){return z(e,(function(e,t){return A(e,(function(e){return e.column===t.column}))?e:e.concat([t])}),[]).sort((function(e,t){return e.column-t.column}))},oc=tt("col"),rc=tt("colgroup"),ic=function(e){return"tr"===Ke(e)||rc(e)},ac=function(e){return{element:e,colspan:Kt(e,"colspan",1),rowspan:Kt(e,"rowspan",1)}},sc=function(e){return Rt(e,"scope").map((function(e){return e.substr(0,3)}))},lc=function(e,t){void 0===t&&(t=ac);var n=function(n){if(ic(n))return rc((r={element:n}).element)?e.colgroup(r):e.row(r);var r,i=function(t){return oc(t.element)?e.col(t):e.cell(t)}(t(n));return o=S.some({item:n,replacement:i}),i},o=S.none();return{getOrInit:function(e,t){return o.fold((function(){return n(e)}),(function(o){return t(e,o.item)?o.replacement:n(e)}))}}},cc=function(e){return function(t){var n=[],o=function(o){var r="td"===e?{scope:null}:{},i=t.replace(o,e,r);return n.push({item:o,sub:i}),i};return{replaceOrInit:function(e,t){return ic(e)||oc(e)?e:function(e,t){return F(n,(function(n){return t(n.item,e)}))}(e,t).fold((function(){return o(e)}),(function(n){return t(e,n.item)?n.sub:o(e)}))}}}},uc=function(e){return{unmerge:function(t){var n=sc(t);return n.each((function(e){return Dt(t,"scope",e)})),function(){var o=e.cell({element:t,colspan:1,rowspan:1});return qt(o,"width"),qt(t,"width"),n.each((function(e){return Dt(o,"scope",e)})),o}},merge:function(e){return qt(e[0],"width"),function(){var t=jt(R(e,sc));if(0===t.length)return S.none();var n=t[0],o=["row","col"];return A(t,(function(e){return e!==n&&D(o,e)}))?S.none():S.from(n)}().fold((function(){return Pt(e[0],"scope")}),(function(t){return Dt(e[0],"scope",t+"group")})),m(e[0])}}},dc=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","table","thead","tfoot","tbody","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"],fc=Zn(),mc=function(e){return function(e,t){var n=e.property().name(t);return D(dc,n)}(fc,e)},pc=function(e){return function(e,t){var n=e.property().name(t);return D(["ol","ul"],n)}(fc,e)},hc=function(e){return function(e,t){return D(["br","img","hr","input"],e.property().name(t))}(fc,e)},gc=function(e){var t,n=function(e){return"br"===Ke(e)},o=function(e){return ni(e).bind((function(t){var o=st(t).map((function(e){return!!mc(e)||!!hc(e)&&"img"!==Ke(e)})).getOr(!1);return rt(t).map((function(r){return!0===o||function(e){return"li"===Ke(e)||Ct(e,pc).isSome()}(r)||n(t)||mc(r)&&!ke(e,r)?[]:[xe.fromTag("br")]}))})).getOr([])},r=0===(t=V(e,(function(e){var t=lt(e);return function(e){return H(e,(function(e){return n(e)||Qe(e)&&0===Yn(e).trim().length}))}(t)?[]:t.concat(o(e))}))).length?[xe.fromTag("br")]:t;Wn(e[0]),Un(e[0],r)},vc=function(e){return Fa(e,!0)},bc=function(e){0===on(e).length&&qn(e)},yc=function(e,t){return{grid:e,cursor:t}},_c=function(e,t,n){var o,r,i=yn(e).rows;return S.from(null===(r=null===(o=i[t])||void 0===o?void 0:o.cells[n])||void 0===r?void 0:r.element).filter(vc).orThunk((function(){return function(e){return G(e,(function(e){return G(e.cells,(function(e){var t=e.element;return Ft(vc(t),t)}))}))}(i)}))},wc=function(e,t,n){var o=_c(e,t,n);return yc(e,o)},xc=function(e){return z(e,(function(e,t){return A(e,(function(e){return e.row===t.row}))?e:e.concat([t])}),[]).sort((function(e,t){return e.row-t.row}))},Cc=function(e,t){return function(n,o,r,i,a){var s=xc(o),l=R(s,(function(e){return e.row})),c=ec(n,l,e,t,r,i.replaceOrInit,a);return wc(c,o[0].row,o[0].column)}},Oc=Cc("thead",!0),Sc=Cc("tbody",!1),kc=Cc("tfoot",!1),Ec=function(e,t,n){var o=function(e,t){return cn(e,(function(){return t}))}(e,n.section),r=En.generate(o);return yl(r,t,!0)},Tc=function(e,t,n,o){return function(e,t,n,o){var r=En.generate(t),i=o.getWidths(r,o);zi(r,i,o)}(0,t,0,o.sizing)},Dc=function(e,t,n,o){return function(e,t,n,o,r){var i=En.generate(t),a=o.getWidths(i,o),s=o.pixelWidth(),l=r.calcRedestributedWidths(a,s,n.pixelDelta,o.isRelative),c=l.newSizes,u=l.delta;zi(i,c,o),o.adjustTableWidth(u)}(0,t,n,o.sizing,o.resize)},Ac=function(e,t){return A(t,(function(e){return 0===e.column&&e.isLocked}))},Mc=function(e,t){return A(t,(function(t){return t.column+t.colspan>=e.grid.columns&&t.isLocked}))},Rc=function(e,t){var n=Bo(e),o=nc(t);return z(o,(function(e,t){return e+n[t.column].map(jo).getOr(0)}),0)},Pc=function(e){return function(t,n){return Sl(t,n).filter((function(n){return!(e?Ac:Mc)(t,n)})).map((function(e){return{details:e,pixelDelta:Rc(t,e)}}))}},Ic=function(e){return function(t,n){return Ol(t,n).filter((function(n){return!(e?Ac:Mc)(t,n.cells)}))}},Lc=cc("th"),jc=cc("td"),zc=Cl((function(e,t,n,o){var r=t[0].row,i=xc(t),a=j(i,(function(e,t){return{grid:ql(e.grid,r,t.row+e.delta,n,o.getOrInit),delta:e.delta+1}}),{grid:e,delta:0}).grid;return wc(a,r,t[0].column)}),Sl,f,f,lc),Fc=Cl((function(e,t,n,o){var r=xc(t),i=r[r.length-1],a=i.row+i.rowspan,s=j(r,(function(e,t){return ql(e,a,t.row,n,o.getOrInit)}),e);return wc(s,a,t[0].column)}),Sl,f,f,lc),Bc=Cl((function(e,t,n,o){var r=t.details,i=nc(r),a=i[0].column,s=j(i,(function(e,t){return{grid:Kl(e.grid,a,t.column+e.delta,n,o.getOrInit),delta:e.delta+1}}),{grid:e,delta:0}).grid;return wc(s,r[0].row,a)}),Pc(!0),Dc,f,lc),Nc=Cl((function(e,t,n,o){var r=t.details,i=r[r.length-1],a=i.column+i.colspan,s=nc(r),l=j(s,(function(e,t){return Kl(e,a,t.column,n,o.getOrInit)}),e);return wc(l,r[0].row,a)}),Pc(!1),Dc,f,lc),Vc=Cl((function(e,t,n,o){var r=nc(t.details),i=function(e,t){return V(e,(function(e){var n=e.cells,o=j(t,(function(e,t){return t>=0&&t<e.length?e.slice(0,t).concat(e.slice(t+1)):e}),n);return o.length>0?[qe(e.element,o,e.section,e.isNew)]:[]}))}(e,R(r,(function(e){return e.column}))),a=i.length>0?i[0].cells.length-1:0;return wc(i,r[0].row,Math.min(r[0].column,a))}),(function(e,t){return kl(e,t).map((function(t){return{details:t,pixelDelta:-Rc(e,t)}}))}),Dc,bc,lc),Hc=Cl((function(e,t,n,o){var r=xc(t),i=function(e,t,n){var o=yn(e),r=o.rows;return o.cols.concat(r.slice(0,t)).concat(r.slice(n+1))}(e,r[0].row,r[r.length-1].row),a=i.length>0?i.length-1:0;return wc(i,Math.min(t[0].row,a),t[0].column)}),Sl,f,bc,lc),$c=Cl((function(e,t,n,o){var r=nc(t),i=R(r,(function(e){return e.column})),a=Zl(e,i,!0,n,o.replaceOrInit);return wc(a,t[0].row,t[0].column)}),kl,f,f,Lc),Uc=Cl((function(e,t,n,o){var r=nc(t),i=R(r,(function(e){return e.column})),a=Zl(e,i,!1,n,o.replaceOrInit);return wc(a,t[0].row,t[0].column)}),kl,f,f,jc),Wc=Cl(Oc,kl,f,f,Lc),qc=Cl(Sc,kl,f,f,jc),Kc=Cl(kc,kl,f,f,jc),Gc=Cl((function(e,t,n,o){var r=tc(e,t,n,o.replaceOrInit);return wc(r,t[0].row,t[0].column)}),kl,f,f,Lc),Yc=Cl((function(e,t,n,o){var r=tc(e,t,n,o.replaceOrInit);return wc(r,t[0].row,t[0].column)}),kl,f,f,jc),Xc=Cl((function(e,t,n,o){var r=t.cells;gc(r);var i=function(e,t,n,o){var r=yn(e).rows;if(0===r.length)return e;for(var i=t.startRow;i<=t.finishRow;i++)for(var a=t.startCol;a<=t.finishCol;a++){var s=r[i],l=gn(s,a).isLocked;pn(s,a,We(o(),!1,l))}return e}(e,t.bounds,0,o.merge(r));return yc(i,S.from(r[0]))}),Tl,Tc,f,uc),Jc=Cl((function(e,t,n,o){var r=j(t,(function(e,t){return Al(e,t,n,o.unmerge(t))}),e);return yc(r,S.from(t[0]))}),Dl,Tc,f,uc),Qc=Cl((function(e,t,n,o){var r=function(e,t){var n=En.fromTable(e);return yl(n,t,!0)}(t.clipboard,t.generators),i=function(e,t){return{row:e,column:t}}(t.row,t.column);return $l(i,e,r,t.generators,n).fold((function(){return yc(e,S.some(t.element))}),(function(e){return wc(e,t.row,t.column)}))}),(function(e,t){return nn(t.element).bind((function(n){return wl(e,n).map((function(e){return Y(Y({},e),{generators:t.generators,clipboard:t.clipboard})}))}))}),Tc,f,lc),Zc=Cl((function(e,t,n,o){var r=yn(e).rows,i=t.cells[0].column,a=r[t.cells[0].row],s=Ec(t.clipboard,t.generators,a),l=Ul(i,e,s,t.generators,n);return wc(l,t.cells[0].row,t.cells[0].column)}),Ic(!0),f,f,lc),eu=Cl((function(e,t,n,o){var r=yn(e).rows,i=t.cells[t.cells.length-1].column+t.cells[t.cells.length-1].colspan,a=r[t.cells[0].row],s=Ec(t.clipboard,t.generators,a),l=Ul(i,e,s,t.generators,n);return wc(l,t.cells[0].row,t.cells[0].column)}),Ic(!1),f,f,lc),tu=Cl((function(e,t,n,o){var r=yn(e).rows,i=t.cells[0].row,a=r[i],s=Ec(t.clipboard,t.generators,a),l=Wl(i,e,s,t.generators,n);return wc(l,t.cells[0].row,t.cells[0].column)}),Ol,f,f,lc),nu=Cl((function(e,t,n,o){var r=yn(e).rows,i=t.cells[t.cells.length-1].row+t.cells[t.cells.length-1].rowspan,a=r[t.cells[0].row],s=Ec(t.clipboard,t.generators,a),l=Wl(i,e,s,t.generators,n);return wc(l,t.cells[0].row,t.cells[0].column)}),Ol,f,f,lc),ou=function(e,t){var n=En.fromTable(e);return Sl(n,t).bind((function(e){var t=e[e.length-1],o=e[0].column,r=t.column+t.colspan,i=N(R(n.all,(function(e){return L(e.cells,(function(e){return e.column>=o&&e.column<r}))})));return nl(i)})).getOr("")},ru=function(e,t){var n=En.fromTable(e);return Sl(n,t).bind(nl).getOr("")},iu=function(e,t){var n=En.fromTable(e);return Sl(n,t).bind((function(e){var t=e[e.length-1],o=e[0].row,r=t.row+t.rowspan;return function(e){var t=R(e,(function(e){return tl(e).type})),n=D(t,"header"),o=D(t,"footer");if(n||o){var r=D(t,"body");return!n||r||o?n||r||!o?S.none():S.some("footer"):S.some("header")}return S.some("body")}(n.all.slice(o,r))})).getOr("")},au=function(e,t,n){var o=function(e){return"table"===Ke(pi(e))},r=Is(e),i=Ps(e)?f:Js,a=function(t){switch(As(e)){case"section":return cl();case"sectionCells":return ul();case"cells":return dl();default:return ll(t,"section")}},s=function(n,o){return o.cursor.fold((function(){var o=on(n);return q(o).filter(gt).map((function(o){t.clear(n);var r=e.dom.createRng();return r.selectNode(o.dom),e.selection.setRng(r),Dt(o,"data-mce-selected","1"),r}))}),(function(o){var r=Ys(Xs,o),i=e.dom.createRng();return i.setStart(r.element.dom,r.offset),i.setEnd(r.element.dom,r.offset),e.selection.setRng(i),t.clear(n),S.some(i)}))},l=function(t,n,o,i,l){return function(c,u,d){void 0===d&&(d=!1),yi(c);var f=i(),m=xe.fromDom(e.getDoc()),p=di(o,m,r),h={sizing:zs(e,c),resize:Ps(e)?Wi():qi(),section:a(c)};return n(c)?t(f,c,u,p,h).bind((function(t){P(t.newRows,(function(t){rs(e,t.dom)})),P(t.newCells,(function(t){is(e,t.dom)}));var n=s(c,t);return gt(c)&&(yi(c),d||as(e,c.dom,l)),n.map((function(e){return{rng:e,effect:l}}))})):S.none()}};return{deleteRow:l(Hc,(function(t){return!1===o(e)||ca(t).rows>1}),f,n,ls),deleteColumn:l(Vc,(function(t){return!1===o(e)||ca(t).columns>1}),f,n,ls),insertRowsBefore:l(zc,w,f,n,ls),insertRowsAfter:l(Fc,w,f,n,ls),insertColumnsBefore:l(Bc,w,i,n,ls),insertColumnsAfter:l(Nc,w,i,n,ls),mergeCells:l(Xc,w,f,n,ls),unmergeCells:l(Jc,w,f,n,ls),pasteColsBefore:l(Zc,w,f,n,ls),pasteColsAfter:l(eu,w,f,n,ls),pasteRowsBefore:l(tu,w,f,n,ls),pasteRowsAfter:l(nu,w,f,n,ls),pasteCells:l(Qc,w,f,n,cs),makeCellsHeader:l(Gc,w,f,n,ls),unmakeCellsHeader:l(Yc,w,f,n,ls),makeColumnsHeader:l($c,w,f,n,ls),unmakeColumnsHeader:l(Uc,w,f,n,ls),makeRowsHeader:l(Wc,w,f,n,ls),makeRowsBody:l(qc,w,f,n,ls),makeRowsFooter:l(Kc,w,f,n,ls),getTableRowType:iu,getTableCellType:ru,getTableColType:ou}},su={styles:{"border-collapse":"collapse",width:"100%"},attributes:{border:"1"},colGroups:!1},lu=function(e){var t=xe.fromTag("colgroup");return M(e,(function(){return Vn(t,xe.fromTag("col"))})),t},cu=function(e,t,n,o){return M(e,(function(e){return function(e,t,n,o){for(var r=xe.fromTag("tr"),i=0;i<e;i++){var a=o<t||i<n?xe.fromTag("th"):xe.fromTag("td");i<n&&Dt(a,"scope","row"),o<t&&Dt(a,"scope","col"),Vn(a,xe.fromTag("br")),Vn(r,a)}return r}(t,n,o,e)}))},uu=function(e,t){e.selection.select(t.dom,!0),e.selection.collapse(!0)},du=function(e,t,n,r,i){var a=ys(e),s={styles:a,attributes:bs(e),colGroups:Ds(e)};return e.undoManager.ignore((function(){var o=function(e,t,n,o,r,i){void 0===i&&(i=su);var a=xe.fromTag("table"),s="cells"!==r;Ht(a,i.styles),At(a,i.attributes),i.colGroups&&Vn(a,lu(t));var l=Math.min(e,n);if(s&&n>0){var c=xe.fromTag("thead");Vn(a,c);var u=cu(n,t,"sectionCells"===r?l:0,o);Un(c,u)}var d=xe.fromTag("tbody");Vn(a,d);var f=cu(s?e-l:e,t,s?0:n,o);return Un(d,f),a}(n,t,i,r,As(e),s);Dt(o,"data-mce-id","__mce");var a=function(e){var t=xe.fromTag("div"),n=xe.fromDom(e.dom.cloneNode(!0));return Vn(t,n),function(e){return e.dom.innerHTML}(t)}(o);e.insertContent(a),e.addVisual()})),kt(pi(e),'table[data-mce-id="__mce"]').map((function(t){return Es(e)?Ns(t):Ts(e)?Vs(t):(ks(e)||function(e){return o(e)&&-1!==e.indexOf("%")}(a.width))&&Bs(t),yi(t),Pt(t,"data-mce-id"),function(e,t){P(wt(t,"tr"),(function(t){rs(e,t.dom),P(wt(t,"th,td"),(function(t){is(e,t.dom)}))}))}(e,t),function(e,t){kt(t,"td,th").each(g(uu,e))}(e,t),t.dom})).getOr(null)},fu=function(e,t,n,o,r){void 0===o&&(o={});var i=function(e){return d(e)&&e>0};if(i(t)&&i(n)){var a=o.headerRows||0,s=o.headerColumns||0;return du(e,n,t,s,a)}return null},mu=function(e){return function(){return e().fold((function(){return[]}),(function(e){return R(e,(function(e){return e.dom}))}))}},pu=function(e){return function(t){var n=t.length>0?S.some(mi(t)):S.none();e(n)}},hu=function(e){return function(t,n,o){void 0===o&&(o={});var r=fu(e,n,t,o);return e.undoManager.add(),r}},gu=function(e,t,n){var o=Kt(e,t,1);1===n||o<=1?Pt(e,t):Dt(e,t,Math.min(n,o))},vu=function(e,t){var n=En.fromTable(e);return kl(n,t).map((function(e){var t=e[e.length-1],o=e[0].column,r=t.column+t.colspan,i=function(e,t,n){if(En.hasColumns(e)){var o=L(En.justColumns(e),(function(e){return e.column>=t&&e.column<n})),r=R(o,(function(e){var o=So(e.element);return gu(o,"span",n-t),o})),i=xe.fromTag("colgroup");return Un(i,r),[i]}return[]}(n,o,r),a=function(e,t,n){return R(e.all,(function(e){var o=L(e.cells,(function(e){return e.column>=t&&e.column<n})),r=R(o,(function(e){var o=So(e.element);return gu(o,"colspan",n-t),o})),i=xe.fromTag("tr");return Un(i,r),i}))}(n,o,r);return X(X([],i,!0),a,!0)}))},bu=function(e,t,n){var o=En.fromTable(e);return Sl(o,t).bind((function(e){var t=yl(o,n,!1),r=yn(t).rows.slice(e[0].row,e[e.length-1].row+e[e.length-1].rowspan),i=V(r,(function(e){var t=L(e.cells,(function(e){return!e.isLocked}));return t.length>0?[Y(Y({},e),{cells:t})]:[]})),a=_l(i);return Ft(a.length>0,a)})).map((function(e){return function(e){return R(e,(function(e){var t=Oo(e.element);return P(e.cells,(function(e){var n=So(e.element);ml(n,"colspan",e.colspan,1),ml(n,"rowspan",e.rowspan,1),Vn(t,n)})),t}))}(e)}))},yu=tinymce.util.Tools.resolve("tinymce.util.Tools"),_u=function(e,t,n){return function(t,o){for(var r=0;r<o.length;r++){var i=e.getStyle(o[r],n);if(void 0===t&&(t=i),t!==i)return""}return t}(void 0,e.select("td,th",t))},wu=function(e,t,n){n&&e.formatter.apply("align"+n,{},t)},xu=function(e,t){yu.each("left center right".split(" "),(function(n){e.formatter.remove("align"+n,{},t)}))},Cu=[{text:"None",value:""},{text:"Top",value:"top"},{text:"Middle",value:"middle"},{text:"Bottom",value:"bottom"}],Ou=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,Su=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,ku=function(e){return(t=e,n="#",re(t,n)?function(e,t){return e.substring(t)}(t,n.length):t).toUpperCase();var t,n},Eu=function(e){return function(e){return Ou.test(e)||Su.test(e)}(e)?S.some({value:ku(e)}):S.none()},Tu=function(e){var t=e.toString(16);return(1===t.length?"0"+t:t).toUpperCase()},Du=function(e){return function(e){return{value:e}}(Tu(e.red)+Tu(e.green)+Tu(e.blue))},Au=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)/,Mu=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d?(?:\.\d+)?)\)/,Ru=function(e,t,n,o){return{red:e,green:t,blue:n,alpha:o}},Pu=function(e,t,n,o){var r=parseInt(e,10),i=parseInt(t,10),a=parseInt(n,10),s=parseFloat(o);return Ru(r,i,a,s)},Iu=function(e){return Eu(e).orThunk((function(){return function(e){if("transparent"===e)return S.some(Ru(0,0,0,0));var t=Au.exec(e);if(null!==t)return S.some(Pu(t[1],t[2],t[3],"1"));var n=Mu.exec(e);return null!==n?S.some(Pu(n[1],n[2],n[3],n[4])):S.none()}(e).map(Du)})).getOrThunk((function(){var t=document.createElement("canvas");t.height=1,t.width=1;var n=t.getContext("2d");n.clearRect(0,0,t.width,t.height),n.fillStyle="#FFFFFF",n.fillStyle=e,n.fillRect(0,0,1,1);var o=n.getImageData(0,0,1,1).data,r=o[0],i=o[1],a=o[2],s=o[3];return Du(Ru(r,i,a,s))}))},Lu=function(e){var t=e;return{get:function(){return t},set:function(e){t=e}}},ju=function(e){var t=Lu(S.none()),n=function(){return t.get().each(e)};return{clear:function(){n(),t.set(S.none())},isSet:function(){return t.get().isSome()},get:function(){return t.get()},set:function(e){n(),t.set(S.some(e))}}},zu=function(){var e=ju(f);return Y(Y({},e),{on:function(t){return e.get().each(t)}})},Fu=function(e,t,n,o){return function(r){var i=ju((function(e){return e.unbind()})),a=!se(o),s=function(){var s=Di(t),l=function(t){return e.formatter.match(n,{value:o},t.dom,a)};a?(r.setActive(!A(s,l)),i.set(e.formatter.formatChanged(n,(function(e){return r.setActive(!e)}),!0))):(r.setActive(H(s,l)),i.set(e.formatter.formatChanged(n,r.setActive,!1,{value:o})))};return e.initialized?s():e.on("init",s),i.clear}},Bu=function(e){return Ve(e,"menu")},Nu=function(e){return R(e,(function(e){var t=e.text||e.title;return Bu(e)?{text:t,items:Nu(e.menu)}:{text:t,value:e.value}}))},Vu=function(e,t,n,o,r){return R(n,(function(n){var i=n.text||n.title;return Bu(n)?{type:"nestedmenuitem",text:i,getSubmenuItems:function(){return Vu(e,t,n.menu,o,r)}}:{text:i,type:"togglemenuitem",onAction:function(){return r(n.value)},onSetup:Fu(e,t,o,n.value)}}))},Hu=function(e,t){return function(n){var o;e.execCommand("mceTableApplyCellStyle",!1,((o={})[t]=n,o))}},$u=function(e){return V(e,(function(e){return Bu(e)?[Y(Y({},e),{menu:$u(e.menu)})]:se(e.value)?[e]:[]}))},Uu=function(e,t,n,o,r){return function(i){return i(Vu(e,t,n,o,r))}},Wu=function(e,t,n){var o=R(t,(function(e){return{text:e.title,value:"#"+Iu(e.value).value,type:"choiceitem"}}));return[{type:"fancymenuitem",fancytype:"colorswatch",initData:{colors:o.length>0?o:void 0,allowCustomColors:!1},onAction:function(t){var o,r="remove"===t.value?"":t.value;e.execCommand("mceTableApplyCellStyle",!1,((o={})[n]=r,o))}}]},qu=function(e){return function(){var t="header"===e.queryCommandValue("mceTableRowType")?"body":"header";e.execCommand("mceTableRowType",!1,{type:t})}},Ku=function(e){return function(){var t="th"===e.queryCommandValue("mceTableColType")?"td":"th";e.execCommand("mceTableColType",!1,{type:t})}},Gu=[{name:"width",type:"input",label:"Width"},{name:"height",type:"input",label:"Height"},{name:"celltype",type:"listbox",label:"Cell type",items:[{text:"Cell",value:"td"},{text:"Header cell",value:"th"}]},{name:"scope",type:"listbox",label:"Scope",items:[{text:"None",value:""},{text:"Row",value:"row"},{text:"Column",value:"col"},{text:"Row group",value:"rowgroup"},{text:"Column group",value:"colgroup"}]},{name:"halign",type:"listbox",label:"Horizontal align",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{name:"valign",type:"listbox",label:"Vertical align",items:Cu}],Yu=function(e){return Gu.concat(function(e){var t=Nu(Os(e));return t.length>0?S.some({name:"class",type:"listbox",label:"Class",items:t}):S.none()}(e).toArray())},Xu=function(e,t){var n=[{name:"borderstyle",type:"listbox",label:"Border style",items:[{text:"Select...",value:""}].concat(Nu(vs(e)))},{name:"bordercolor",type:"colorinput",label:"Border color"},{name:"backgroundcolor",type:"colorinput",label:"Background color"}];return{title:"Advanced",name:"advanced",items:"cell"===t?[{name:"borderwidth",type:"input",label:"Border width"}].concat(n):n}},Ju=function(e){return function(t,n){var o=t.dom;return{setAttrib:function(t,r){e&&!r||o.setAttrib(n,t,r)},setStyle:function(t,r){e&&!r||o.setStyle(n,t,r)},setFormat:function(o,r){e&&!r||(""===r?t.formatter.remove(o,{value:null},n,!0):t.formatter.apply(o,{value:r},n))}}}},Qu={normal:Ju(!1),ifTruthy:Ju(!0)},Zu=function(e){return function(t){return re(t,"rgb")?e.toHex(t):t}},ed=function(e,t){var n=xe.fromDom(t);return{borderwidth:Wt(n,"border-width").getOr(""),borderstyle:Wt(n,"border-style").getOr(""),bordercolor:Wt(n,"border-color").map(Zu(e)).getOr(""),backgroundcolor:Wt(n,"background-color").map(Zu(e)).getOr("")}},td=function(e){var t=e[0],n=e.slice(1);return P(n,(function(e){P(Ae(t),(function(n){Re(e,(function(e,o){var r=t[n];""!==r&&n===o&&r!==e&&(t[n]="")}))}))})),t},nd=function(e,t,n,o){return F(e,(function(e){return!l(n.formatter.matchNode(o,t+e))})).getOr("")},od=g(nd,["left","center","right"],"align"),rd=g(nd,["top","middle","bottom"],"valign"),id=function(e){return an(xe.fromDom(e)).map((function(t){var n={selection:mi(e.cells)};return iu(t,n)})).getOr("")},ad=function(e,t){var n=En.fromTable(e),o=En.justCells(n),r=L(o,(function(e){return A(t,(function(t){return ke(e.element,t)}))}));return R(r,(function(e){return{element:e.element.dom,column:En.getColumnAt(n,e.column).map((function(e){return e.element.dom}))}}))},sd=function(e,t,n){var o=1===t.length;P(t,(function(t){var r=t.element,i=o?Qu.normal(e,r):Qu.ifTruthy(e,r);!function(e,t,n){e.setAttrib("scope",n.scope),e.setAttrib("class",n.class),e.setStyle("height",bi(n.height)),t.setStyle("width",bi(n.width))}(i,t.column.map((function(t){return o?Qu.normal(e,t):Qu.ifTruthy(e,t)})).getOr(i),n),_s(e)&&function(e,t){e.setFormat("tablecellbackgroundcolor",t.backgroundcolor),e.setFormat("tablecellbordercolor",t.bordercolor),e.setFormat("tablecellborderstyle",t.borderstyle),e.setFormat("tablecellborderwidth",bi(t.borderwidth))}(i,n),o&&(xu(e,r),function(e,t){yu.each("top middle bottom".split(" "),(function(n){e.formatter.remove("valign"+n,{},t)}))}(e,r)),n.halign&&wu(e,r,n.halign),n.valign&&function(e,t,n){n&&e.formatter.apply("valign"+n,{},t)}(e,r,n.valign)}))},ld=function(e,t,n,o){var r=o.getData();o.close(),e.undoManager.transact((function(){!function(e,t,n,o){var r=Le(o,(function(e,t){return n[t]!==e}));Fe(r)>0&&t.length>=1&&an(t[0]).each((function(n){var i=ad(n,t),a=Fe(Le(r,(function(e,t){return"scope"!==t&&"celltype"!==t})))>0,s=Ne(r,"celltype");(a||Ne(r,"scope"))&&sd(e,i,o),s&&function(e,t){e.execCommand("mceTableCellType",!1,{type:t.celltype,no_events:!0})}(e,o),as(e,n.dom,{structure:s,style:a})}))}(e,t,n,r),e.focus()}))},cd=function(e,t){var n=an(t[0]).map((function(n){return R(ad(n,t),(function(t){return function(e,t,n,o){var r,i=e.dom,a=o.getOr(t),s=function(e,t){return i.getStyle(e,t)||i.getAttrib(e,t)};return Y({width:s(a,"width"),height:s(t,"height"),scope:i.getAttrib(t,"scope"),celltype:(r=t,r.nodeName.toLowerCase()),class:i.getAttrib(t,"class",""),halign:od(e,t),valign:rd(e,t)},n?ed(i,t):{})}(e,t.element,_s(e),t.column)}))}));return td(n.getOrDie())},ud=function(e,t){var n=Di(t);if(0!==n.length){var o=cd(e,n),r={type:"tabpanel",tabs:[{title:"General",name:"general",items:Yu(e)},Xu(e,"cell")]},i={type:"panel",items:[{type:"grid",columns:2,items:Yu(e)}]};e.windowManager.open({title:"Cell Properties",size:"normal",body:_s(e)?r:i,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:o,onSubmit:g(ld,e,n,o)})}},dd=[{type:"listbox",name:"type",label:"Row type",items:[{text:"Header",value:"header"},{text:"Body",value:"body"},{text:"Footer",value:"footer"}]},{type:"listbox",name:"align",label:"Alignment",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"Height",name:"height",type:"input"}],fd=function(e){return dd.concat(function(e){var t=Nu(function(e){return e.getParam("table_row_class_list",[],"array")}(e));return t.length>0?S.some({name:"class",type:"listbox",label:"Class",items:t}):S.none()}(e).toArray())},md=function(e,t,n,o){var r=1===t.length;P(t,(function(t){var i=r?Qu.normal(e,t):Qu.ifTruthy(e,t);!function(e,t){e.setAttrib("class",t.class),e.setStyle("height",bi(t.height))}(i,n),ws(e)&&function(e,t){e.setStyle("background-color",t.backgroundcolor),e.setStyle("border-color",t.bordercolor),e.setStyle("border-style",t.borderstyle)}(i,n),n.align!==o.align&&(xu(e,t),wu(e,t,n.align))}))},pd=function(e,t,n,o){var r=o.getData();o.close(),e.undoManager.transact((function(){!function(e,t,n,o){var r=Le(o,(function(e,t){return n[t]!==e}));if(Fe(r)>0){var i=Ne(r,"type"),a=!i||Fe(r)>1;a&&md(e,t,o,n),i&&function(e,t){e.execCommand("mceTableRowType",!1,{type:t.type,no_events:!0})}(e,o),an(xe.fromDom(t[0])).each((function(t){return as(e,t.dom,{structure:i,style:a})}))}}(e,t,n,r),e.focus()}))},hd=function(e){var t,n,o,r,i=(t=_i(e),n=Oi.selected,o=Ti(t),r=o.bind((function(e){return an(e)})).map((function(e){return sn(e)})),zt(o,r,(function(e,t){return L(t,(function(t){return A(mi(t.dom.cells),(function(t){return"1"===Mt(t,n)||ke(t,e)}))}))})).getOr([]));if(0!==i.length){var a=R(i,(function(t){return function(e,t,n){var o=e.dom;return Y({height:o.getStyle(t,"height")||o.getAttrib(t,"height"),class:o.getAttrib(t,"class",""),type:id(t),align:od(e,t)},n?ed(o,t):{})}(e,t.dom,ws(e))})),s=td(a),l={type:"tabpanel",tabs:[{title:"General",name:"general",items:fd(e)},Xu(e,"row")]},c={type:"panel",items:[{type:"grid",columns:2,items:fd(e)}]};e.windowManager.open({title:"Row Properties",size:"normal",body:ws(e)?l:c,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:s,onSubmit:g(pd,e,R(i,(function(e){return e.dom})),s)})}},gd=function(e,t,n){var o=n?[{type:"input",name:"cols",label:"Cols",inputMode:"numeric"},{type:"input",name:"rows",label:"Rows",inputMode:"numeric"}]:[],r=function(e){return e.getParam("table_appearance_options",!0,"boolean")}(e)?[{type:"input",name:"cellspacing",label:"Cell spacing",inputMode:"numeric"},{type:"input",name:"cellpadding",label:"Cell padding",inputMode:"numeric"},{type:"input",name:"border",label:"Border width"},{type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]}]:[],i=t.length>0?[{type:"listbox",name:"class",label:"Class",items:t}]:[];return o.concat([{type:"input",name:"width",label:"Width"},{type:"input",name:"height",label:"Height"}]).concat(r).concat([{type:"listbox",name:"align",label:"Alignment",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]}]).concat(i)},vd=function(e,t,n,r){if("TD"===t.tagName||"TH"===t.tagName)o(n)?e.setStyle(t,n,r):e.setStyle(t,n);else if(t.children)for(var i=0;i<t.children.length;i++)vd(e,t.children[i],n,r)},bd=function(e,t,n,o){var r=e.dom,i=o.getData(),a=Le(i,(function(e,t){return n[t]!==e}));o.close(),""===i.class&&delete i.class,e.undoManager.transact((function(){if(!t){var n=parseInt(i.cols,10)||1,o=parseInt(i.rows,10)||1;t=du(e,n,o,0,0)}if(Fe(a)>0){!function(e,t,n){var o=e.dom,r={},i={};if(r.class=n.class,i.height=bi(n.height),o.getAttrib(t,"width")&&!Cs(e)?r.width=function(e){return e?e.replace(/px$/,""):""}(n.width):i.width=bi(n.width),Cs(e)?(i["border-width"]=bi(n.border),i["border-spacing"]=bi(n.cellspacing)):(r.border=n.border,r.cellpadding=n.cellpadding,r.cellspacing=n.cellspacing),Cs(e)&&t.children)for(var a=0;a<t.children.length;a++)vd(o,t.children[a],{"border-width":bi(n.border),padding:bi(n.cellpadding)}),xs(e)&&vd(o,t.children[a],{"border-color":n.bordercolor});xs(e)&&(i["background-color"]=n.backgroundcolor,i["border-color"]=n.bordercolor,i["border-style"]=n.borderstyle),r.style=o.serializeStyle(Y(Y({},ys(e)),i)),o.setAttribs(t,Y(Y({},bs(e)),r))}(e,t,i);var s=r.select("caption",t)[0];(s&&!i.caption||!s&&i.caption)&&e.execCommand("mceTableToggleCaption"),""===i.align?xu(e,t):wu(e,t,i.align)}if(e.focus(),e.addVisual(),Fe(a)>0){var l=Ne(a,"caption"),c=!l||Fe(a)>1;as(e,t,{structure:l,style:c})}}))},yd=function(e,t){var n,o=e.dom,r=function(e,t){var n,o,r,i,a=ys(e),s=bs(e),l=t?(n=e.dom,{borderstyle:Be(a,"border-style").getOr(""),bordercolor:Zu(n)(Be(a,"border-color").getOr("")),backgroundcolor:Zu(n)(Be(a,"background-color").getOr(""))}):{};return Y(Y(Y(Y(Y(Y({},{height:"",width:"100%",cellspacing:"",cellpadding:"",caption:!1,class:"",align:"",border:""}),a),s),l),(i=a["border-width"],Cs(e)&&i?{border:i}:Be(s,"border").fold((function(){return{}}),(function(e){return{border:e}})))),(o=Be(a,"border-spacing").or(Be(s,"cellspacing")).fold((function(){return{}}),(function(e){return{cellspacing:e}})),r=Be(a,"border-padding").or(Be(s,"cellpadding")).fold((function(){return{}}),(function(e){return{cellpadding:e}})),Y(Y({},o),r)))}(e,xs(e));!1===t?(n=o.getParent(e.selection.getStart(),"table",e.getBody()))?r=function(e,t,n){var o=e.dom,r=Cs(e)?o.getStyle(t,"border-spacing")||o.getAttrib(t,"cellspacing"):o.getAttrib(t,"cellspacing")||o.getStyle(t,"border-spacing"),i=Cs(e)?_u(o,t,"padding")||o.getAttrib(t,"cellpadding"):o.getAttrib(t,"cellpadding")||_u(o,t,"padding");return Y({width:o.getStyle(t,"width")||o.getAttrib(t,"width"),height:o.getStyle(t,"height")||o.getAttrib(t,"height"),cellspacing:r,cellpadding:i,border:function(t,n){var o=Wt(xe.fromDom(n),"border-width");return Cs(e)&&o.isSome()?o.getOr(""):t.getAttrib(n,"border")||_u(e.dom,n,"border-width")||_u(e.dom,n,"border")}(o,t),caption:!!o.select("caption",t)[0],class:o.getAttrib(t,"class",""),align:od(e,t)},n?ed(o,t):{})}(e,n,xs(e)):xs(e)&&(r.borderstyle="",r.bordercolor="",r.backgroundcolor=""):(r.cols="1",r.rows="1",xs(e)&&(r.borderstyle="",r.bordercolor="",r.backgroundcolor=""));var i=Nu(Ss(e));i.length>0&&r.class&&(r.class=r.class.replace(/\s*mce\-item\-table\s*/g,""));var a={type:"grid",columns:2,items:gd(e,i,t)},s=xs(e)?{type:"tabpanel",tabs:[{title:"General",name:"general",items:[a]},Xu(e,"table")]}:{type:"panel",items:[a]};e.windowManager.open({title:"Table Properties",size:"normal",body:s,onSubmit:g(bd,e,n,r),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:r})},_d=function(e){return Ei(_i(e),vi(e))},wd=function(e,t,n,i,a){var s=vi(e),l=function(e){return an(e,s)},c=function(t){return function(e){return Ti(_i(e),vi(e))}(e).bind((function(e){return l(e).map((function(n){return t(n,e)}))}))},u=function(t){e.focus()},d=function(e,t){return void 0===t&&(t=!1),c((function(n,o){var r=Si(i,n,o);e(n,r,t).each(u)}))},m=function(){return c((function(t,n){var o=Si(i,t,n),r=di(f,xe.fromDom(e.getDoc()),S.none());return bu(t,o,r)}))},p=function(){return c((function(e,t){var n=Si(i,e,t);return vu(e,n)}))},h=function(t,n){return n().each((function(n){var o=R(n,(function(e){return So(e)}));c((function(n,r){var a=fi(xe.fromDom(e.getDoc())),s=function(e,t,n,o){return{selection:wi(e),clipboard:n,generators:o}}(i,0,o,a);t(n,s).each(u)}))}))},v=function(e){return function(t,n){return Be(n,"type").each((function(t){d(e(t),n.no_events)}))}};Re({mceTableSplitCells:function(){return d(t.unmergeCells)},mceTableMergeCells:function(){return d(t.mergeCells)},mceTableInsertRowBefore:function(){return d(t.insertRowsBefore)},mceTableInsertRowAfter:function(){return d(t.insertRowsAfter)},mceTableInsertColBefore:function(){return d(t.insertColumnsBefore)},mceTableInsertColAfter:function(){return d(t.insertColumnsAfter)},mceTableDeleteCol:function(){return d(t.deleteColumn)},mceTableDeleteRow:function(){return d(t.deleteRow)},mceTableCutCol:function(){return p().each((function(e){a.setColumns(e),d(t.deleteColumn)}))},mceTableCutRow:function(){return m().each((function(e){a.setRows(e),d(t.deleteRow)}))},mceTableCopyCol:function(){return p().each((function(e){return a.setColumns(e)}))},mceTableCopyRow:function(){return m().each((function(e){return a.setRows(e)}))},mceTablePasteColBefore:function(){return h(t.pasteColsBefore,a.getColumns)},mceTablePasteColAfter:function(){return h(t.pasteColsAfter,a.getColumns)},mceTablePasteRowBefore:function(){return h(t.pasteRowsBefore,a.getRows)},mceTablePasteRowAfter:function(){return h(t.pasteRowsAfter,a.getRows)},mceTableDelete:function(){return _d(e).each((function(t){an(t,s).filter(y(s)).each((function(t){var n=xe.fromText("");if(Bn(t,n),qn(t),e.dom.isEmpty(e.getBody()))e.setContent(""),e.selection.setCursorLocation();else{var o=e.dom.createRng();o.setStart(n.dom,0),o.setEnd(n.dom,0),e.selection.setRng(o),e.nodeChanged()}}))}))},mceTableCellToggleClass:function(t,n){c((function(t){var o=Di(i),r=H(o,(function(t){return e.formatter.match("tablecellclass",{value:n},t.dom)}))?e.formatter.remove:e.formatter.apply;P(o,(function(e){return r("tablecellclass",{value:n},e.dom)})),as(e,t.dom,ss)}))},mceTableToggleClass:function(t,n){c((function(t){e.formatter.toggle("tableclass",{value:n},t.dom),as(e,t.dom,ss)}))},mceTableToggleCaption:function(){_d(e).each((function(t){an(t,s).each((function(n){St(n,"caption").fold((function(){var t=xe.fromTag("caption");Vn(t,xe.fromText("Caption")),function(e,t,n){ct(e,n).fold((function(){Vn(e,t)}),(function(e){Fn(e,t)}))}(n,t,0),e.selection.setCursorLocation(t.dom,0)}),(function(o){tt("caption")(t)&&Se("td",n).each((function(t){return e.selection.setCursorLocation(t.dom,0)})),qn(o)})),as(e,n.dom,ls)}))}))},mceTableSizingMode:function(t,n){return function(t){return _d(e).each((function(n){Ts(e)||Es(e)||ks(e)||an(n,s).each((function(n){"relative"!==t||aa(n)?"fixed"!==t||sa(n)?"responsive"!==t||la(n)||Vs(n):Ns(n):Bs(n),yi(n),as(e,n.dom,ls)}))}))}(n)},mceTableCellType:v((function(e){return"th"===e?t.makeCellsHeader:t.unmakeCellsHeader})),mceTableColType:v((function(e){return"th"===e?t.makeColumnsHeader:t.unmakeColumnsHeader})),mceTableRowType:v((function(e){switch(e){case"header":return t.makeRowsHeader;case"footer":return t.makeRowsFooter;default:return t.makeRowsBody}}))},(function(t,n){return e.addCommand(n,t)})),Re({mceTableProps:g(yd,e,!1),mceTableRowProps:g(hd,e),mceTableCellProps:g(ud,e,i)},(function(t,n){return e.addCommand(n,(function(){return t()}))})),e.addCommand("mceInsertTable",(function(t,n){r(n)&&Ae(n).length>0?fu(e,n.rows,n.columns,n.options):yd(e,!0)})),e.addCommand("mceTableApplyCellStyle",(function(t,n){var a=function(e){return"tablecell"+e.toLowerCase().replace("-","")};if(r(n)){var s=Di(i);if(0!==s.length){var c=Le(n,(function(t,n){return e.formatter.has(a(n))&&o(t)}));(function(e){for(var t in e)if(Me.call(e,t))return!1;return!0})(c)||(Re(c,(function(t,n){P(s,(function(o){Qu.normal(e,o.dom).setFormat(a(n),t)}))})),l(s[0]).each((function(t){return as(e,t.dom,ss)})))}}}))},xd={remove_similar:!0,inherit:!1},Cd=Y({selector:"td,th"},xd),Od={tablecellbackgroundcolor:Y({styles:{backgroundColor:"%value"}},Cd),tablecellverticalalign:Y({styles:{"vertical-align":"%value"}},Cd),tablecellbordercolor:Y({styles:{borderColor:"%value"}},Cd),tablecellclass:Y({classes:["%value"]},Cd),tableclass:Y({selector:"table",classes:["%value"]},xd),tablecellborderstyle:Y({styles:{borderStyle:"%value"}},Cd),tablecellborderwidth:Y({styles:{borderWidth:"%value"}},Cd)},Sd=go([{none:["current"]},{first:["current"]},{middle:["current","target"]},{last:["current"]}]),kd=Y(Y({},Sd),{none:function(e){return void 0===e&&(e=void 0),Sd.none(e)}}),Ed=function(e,t,n,o,r){void 0===r&&(r=w);var i=1===o;if(!i&&n<=0)return kd.first(e[0]);if(i&&n>=e.length-1)return kd.last(e[e.length-1]);var a=n+o,s=e[a];return r(s)?kd.middle(t,s):Ed(e,t,a,o,r)},Td=function(e,t){return an(e,t).bind((function(t){var n=on(t);return B(n,(function(t){return ke(e,t)})).map((function(e){return{index:e,all:n}}))}))},Dd=function(e,t,n,o){return{start:e,soffset:t,finish:n,foffset:o}},Ad=go([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Md={before:Ad.before,on:Ad.on,after:Ad.after,cata:function(e,t,n,o){return e.fold(t,n,o)},getStart:function(e){return e.fold(p,p,p)}},Rd=go([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Pd={domRange:Rd.domRange,relative:Rd.relative,exact:Rd.exact,exactFromRange:function(e){return Rd.exact(e.start,e.soffset,e.finish,e.foffset)},getWin:function(e){var t,n=function(e){return e.match({domRange:function(e){return xe.fromDom(e.startContainer)},relative:function(e,t){return Md.getStart(e)},exact:function(e,t,n,o){return e}})}(e);return t=n,xe.fromDom(ot(t).dom.defaultView)},range:Dd},Id=function(e,t){var n=e.document.createRange();return n.selectNode(t.dom),n},Ld=function(e,t){var n=e.document.createRange();return jd(n,t),n},jd=function(e,t){return e.selectNodeContents(t.dom)},zd=function(e,t,n){var o,r=e.document.createRange();return o=r,t.fold((function(e){o.setStartBefore(e.dom)}),(function(e,t){o.setStart(e.dom,t)}),(function(e){o.setStartAfter(e.dom)})),function(e,t){t.fold((function(t){e.setEndBefore(t.dom)}),(function(t,n){e.setEnd(t.dom,n)}),(function(t){e.setEndAfter(t.dom)}))}(r,n),r},Fd=function(e,t,n,o,r){var i=e.document.createRange();return i.setStart(t.dom,n),i.setEnd(o.dom,r),i},Bd=function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}},Nd=go([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),Vd=function(e,t,n){return t(xe.fromDom(n.startContainer),n.startOffset,xe.fromDom(n.endContainer),n.endOffset)},Hd=function(e,t){return function(e,t){var n=t.ltr();return n.collapsed?t.rtl().filter((function(e){return!1===e.collapsed})).map((function(e){return Nd.rtl(xe.fromDom(e.endContainer),e.endOffset,xe.fromDom(e.startContainer),e.startOffset)})).getOrThunk((function(){return Vd(0,Nd.ltr,n)})):Vd(0,Nd.ltr,n)}(0,function(e,t){return t.match({domRange:function(e){return{ltr:m(e),rtl:S.none}},relative:function(t,n){return{ltr:J((function(){return zd(e,t,n)})),rtl:J((function(){return S.some(zd(e,n,t))}))}},exact:function(t,n,o,r){return{ltr:J((function(){return Fd(e,t,n,o,r)})),rtl:J((function(){return S.some(Fd(e,o,r,t,n))}))}}})}(e,t))},$d=function(e,t){return Hd(e,t).match({ltr:function(t,n,o,r){var i=e.document.createRange();return i.setStart(t.dom,n),i.setEnd(o.dom,r),i},rtl:function(t,n,o,r){var i=e.document.createRange();return i.setStart(o.dom,r),i.setEnd(t.dom,n),i}})};Nd.ltr,Nd.rtl;var Ud=function(e,t,n){return t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom},Wd=function(e,t,n,o,r){var i=function(n){var o=e.dom.createRange();return o.setStart(t.dom,n),o.collapse(!0),o},a=Yn(t).length,s=function(e,t,n,o,r){if(0===r)return 0;if(t===o)return r-1;for(var i=o,a=1;a<r;a++){var s=e(a),l=Math.abs(t-s.left);if(n<=s.bottom){if(n<s.top||l>i)return a-1;i=l}}return 0}((function(e){return i(e).getBoundingClientRect()}),n,o,r.right,a);return i(s)},qd=function(e,t,n,o){return Qe(t)?function(e,t,n,o){var r=e.dom.createRange();r.selectNode(t.dom);var i=r.getClientRects();return G(i,(function(e){return Ud(e,n,o)?S.some(e):S.none()})).map((function(r){return Wd(e,t,n,o,r)}))}(e,t,n,o):function(e,t,n,o){var r=e.dom.createRange(),i=lt(t);return G(i,(function(t){return r.selectNode(t.dom),Ud(r.getBoundingClientRect(),n,o)?qd(e,t,n,o):S.none()}))}(e,t,n,o)},Kd=function(e,t){return t-e.left<e.right-t},Gd=function(e,t,n){var o=e.dom.createRange();return o.selectNode(t.dom),o.collapse(n),o},Yd=function(e,t,n){var o=e.dom.createRange();o.selectNode(t.dom);var r=o.getBoundingClientRect(),i=Kd(r,n);return(!0===i?ti:ni)(t).map((function(t){return Gd(e,t,i)}))},Xd=function(e,t,n){var o=t.dom.getBoundingClientRect(),r=Kd(o,n);return S.some(Gd(e,t,r))},Jd=function(e,t,n){var o,r;return S.from(null===(r=(o=e.dom).caretPositionFromPoint)||void 0===r?void 0:r.call(o,t,n)).bind((function(t){if(null===t.offsetNode)return S.none();var n=e.dom.createRange();return n.setStart(t.offsetNode,t.offset),n.collapse(),S.some(n)}))},Qd=function(e,t,n){var o,r;return S.from(null===(r=(o=e.dom).caretRangeFromPoint)||void 0===r?void 0:r.call(o,t,n))},Zd=function(e,t,n,o){var r=e.dom.createRange();r.selectNode(t.dom);var i=r.getBoundingClientRect();return function(e,t,n,o){var r=e.dom.createRange();r.selectNode(t.dom);var i=r.getBoundingClientRect(),a=Math.max(i.left,Math.min(i.right,n)),s=Math.max(i.top,Math.min(i.bottom,o));return qd(e,t,a,s)}(e,t,Math.max(i.left,Math.min(i.right,n)),Math.max(i.top,Math.min(i.bottom,o)))},ef=function(e,t,n){return xe.fromPoint(e,t,n).bind((function(o){var r=function(){return function(e,t,n){return(0===lt(t).length?Xd:Yd)(e,t,n)}(e,o,t)};return 0===lt(o).length?r():Zd(e,o,t,n).orThunk(r)}))},tf=document.caretPositionFromPoint?Jd:document.caretRangeFromPoint?Qd:ef,nf=function(e,t){var n=Ke(e);return"input"===n?Md.after(e):D(["br","img"],n)?0===t?Md.before(e):Md.after(e):Md.on(e,t)},of=function(e,t){var n=e.fold(Md.before,nf,Md.after),o=t.fold(Md.before,nf,Md.after);return Pd.relative(n,o)},rf=function(e,t,n,o){var r=nf(e,t),i=nf(n,o);return Pd.relative(r,i)},af=function(e,t,n,o){var r=function(e,t,n,o){var r=nt(e).dom.createRange();return r.setStart(e.dom,t),r.setEnd(n.dom,o),r}(e,t,n,o),i=ke(e,n)&&t===o;return r.collapsed&&!i},sf=function(e){return S.from(e.getSelection())},lf=function(e,t){sf(e).each((function(e){e.removeAllRanges(),e.addRange(t)}))},cf=function(e,t,n,o,r){var i=Fd(e,t,n,o,r);lf(e,i)},uf=function(e,t){return Hd(e,t).match({ltr:function(t,n,o,r){cf(e,t,n,o,r)},rtl:function(t,n,o,r){sf(e).each((function(i){if(i.setBaseAndExtent)i.setBaseAndExtent(t.dom,n,o.dom,r);else if(i.extend)try{!function(e,t,n,o,r,i){t.collapse(n.dom,o),t.extend(r.dom,i)}(0,i,t,n,o,r)}catch(i){cf(e,o,r,t,n)}else cf(e,o,r,t,n)}))}})},df=function(e,t,n,o,r){var i=rf(t,n,o,r);uf(e,i)},ff=function(e,t,n){var o=of(t,n);uf(e,o)},mf=function(e){var t=Pd.getWin(e).dom,n=function(e,n,o,r){return Fd(t,e,n,o,r)},o=function(e){return e.match({domRange:function(e){var t=xe.fromDom(e.startContainer),n=xe.fromDom(e.endContainer);return rf(t,e.startOffset,n,e.endOffset)},relative:of,exact:rf})}(e);return Hd(t,o).match({ltr:n,rtl:n})},pf=function(e){if(e.rangeCount>0){var t=e.getRangeAt(0),n=e.getRangeAt(e.rangeCount-1);return S.some(Dd(xe.fromDom(t.startContainer),t.startOffset,xe.fromDom(n.endContainer),n.endOffset))}return S.none()},hf=function(e){if(null===e.anchorNode||null===e.focusNode)return pf(e);var t=xe.fromDom(e.anchorNode),n=xe.fromDom(e.focusNode);return af(t,e.anchorOffset,n,e.focusOffset)?S.some(Dd(t,e.anchorOffset,n,e.focusOffset)):pf(e)},gf=function(e,t,n){void 0===n&&(n=!0);var o=(n?Ld:Id)(e,t);lf(e,o)},vf=function(e){return function(e){return sf(e).filter((function(e){return e.rangeCount>0})).bind(hf)}(e).map((function(e){return Pd.exact(e.start,e.soffset,e.finish,e.foffset)}))},bf=function(e,t){return function(e){var t=e.getClientRects(),n=t.length>0?t[0]:e.getBoundingClientRect();return n.width>0||n.height>0?S.some(n).map(Bd):S.none()}($d(e,t))},yf=function(e,t,n){return function(e,t,n){var o=xe.fromDom(e.document);return tf(o,t,n).map((function(e){return Dd(xe.fromDom(e.startContainer),e.startOffset,xe.fromDom(e.endContainer),e.endOffset)}))}(e,t,n)},_f=tinymce.util.Tools.resolve("tinymce.util.VK"),wf=function(e,t,n){return Cf(e,t,function(e,t,n){return Td(e,n).fold((function(){return kd.none(e)}),(function(n){return Ed(n.all,e,n.index,1,t)}))}(n,Fa))},xf=function(e,t,n){return Cf(e,t,function(e,t,n){return Td(e,n).fold((function(){return kd.none()}),(function(n){return Ed(n.all,e,n.index,-1,t)}))}(n,Fa))},Cf=function(e,t,n){return n.fold(S.none,S.none,(function(e,t){return ti(t).map((function(e){return function(e,t){var n=Pd.exact(t,0,t,0);return mf(n)}(0,e)}))}),(function(n){return e.execCommand("mceTableInsertRowAfter"),wf(e,t,n)}))},Of=["table","li","dl"],Sf=function(e,t){return{selection:e,kill:t}},kf=function(e,t,n,o){return{start:Md.on(e,t),finish:Md.on(n,o)}},Ef=function(e,t){var n=$d(e,t);return Dd(xe.fromDom(n.startContainer),n.startOffset,xe.fromDom(n.endContainer),n.endOffset)},Tf=kf,Df=function(e,t,n,o,r){return ke(n,o)?S.none():co(n,o,t).bind((function(t){var o=t.boxes.getOr([]);return o.length>1?(r(e,o,t.start,t.finish),S.some(Sf(S.some(Tf(n,0,n,Qr(n))),!0))):S.none()}))},Af=function(e,t){return{item:e,mode:t}},Mf=function(e,t,n,o){return void 0===o&&(o=Rf),e.property().parent(t).map((function(e){return Af(e,o)}))},Rf=function(e,t,n,o){return void 0===o&&(o=Pf),n.sibling(e,t).map((function(e){return Af(e,o)}))},Pf=function(e,t,n,o){void 0===o&&(o=Pf);var r=e.property().children(t);return n.first(r).map((function(e){return Af(e,o)}))},If=[{current:Mf,next:Rf,fallback:S.none()},{current:Rf,next:Pf,fallback:S.some(Mf)},{current:Pf,next:Pf,fallback:S.some(Rf)}],Lf=function(e,t,n,o,r){return void 0===r&&(r=If),F(r,(function(e){return e.current===n})).bind((function(n){return n.current(e,t,o,n.next).orThunk((function(){return n.fallback.bind((function(n){return Lf(e,t,n,o)}))}))}))},jf=function(){return{sibling:function(e,t){return e.query().prevSibling(t)},first:function(e){return e.length>0?S.some(e[e.length-1]):S.none()}}},zf=function(){return{sibling:function(e,t){return e.query().nextSibling(t)},first:function(e){return e.length>0?S.some(e[0]):S.none()}}},Ff=function(e,t,n,o,r,i){return Lf(e,t,o,r).bind((function(t){return i(t.item)?S.none():n(t.item)?S.some(t.item):Ff(e,t.item,n,t.mode,r,i)}))},Bf=function(e){return function(t){return 0===e.property().children(t).length}},Nf=function(e,t,n,o){return Ff(e,t,n,Rf,jf(),o)},Vf=function(e,t,n,o){return Ff(e,t,n,Rf,zf(),o)},Hf=Zn(),$f=function(e,t){return function(e,t,n){return Nf(e,t,Bf(e),n)}(Hf,e,t)},Uf=function(e,t){return function(e,t,n){return Vf(e,t,Bf(e),n)}(Hf,e,t)},Wf=go([{none:["message"]},{success:[]},{failedUp:["cell"]},{failedDown:["cell"]}]),qf=function(e){return Et(e,"tr")},Kf=Y(Y({},Wf),{verify:function(e,t,n,o,r,i,a){return Et(o,"td,th",a).bind((function(n){return Et(t,"td,th",a).map((function(t){return ke(n,t)?ke(o,n)&&Qr(n)===r?i(t):Wf.none("in same cell"):so(qf,[n,t]).fold((function(){return function(e,t,n){var o=e.getRect(t),r=e.getRect(n);return r.right>o.left&&r.left<o.right}(e,t,n)?Wf.success():i(t)}),(function(e){return i(t)}))}))})).getOr(Wf.none("default"))},cata:function(e,t,n,o,r){return e.fold(t,n,o,r)}}),Gf=function(e,t){return B(e,g(ke,t))},Yf=function(e){return"br"===Ke(e)},Xf=function(e,t,n){return t(e,n).bind((function(e){return Qe(e)&&0===Yn(e).trim().length?Xf(e,t,n):S.some(e)}))},Jf=function(e,t,n,o){return function(e,t){return ct(e,t).filter(Yf).orThunk((function(){return ct(e,t-1).filter(Yf)}))}(t,n).bind((function(t){return o.traverse(t).fold((function(){return Xf(t,o.gather,e).map(o.relative)}),(function(e){return function(e){return rt(e).bind((function(t){var n=lt(t);return Gf(n,e).map((function(o){return function(e,t,n,o){return{parent:e,children:t,element:n,index:o}}(t,n,e,o)}))}))}(e).map((function(e){return Md.on(e.parent,e.index)}))}))}))},Qf=function(e,t,n,o){return(Yf(t)?function(e,t,n){return n.traverse(t).orThunk((function(){return Xf(t,n.gather,e)})).map(n.relative)}(e,t,o):Jf(e,t,n,o)).map((function(e){return{start:e,finish:e}}))},Zf=function(e,t){return{left:e.left,top:e.top+t,right:e.right,bottom:e.bottom+t}},em=function(e,t){return{left:e.left,top:e.top-t,right:e.right,bottom:e.bottom-t}},tm=function(e,t,n){return{left:e.left+t,top:e.top+n,right:e.right+t,bottom:e.bottom+n}},nm=function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}},om=function(e,t){return S.some(e.getRect(t))},rm=function(e,t,n){return Je(t)?om(e,t).map(nm):Qe(t)?function(e,t,n){return n>=0&&n<Qr(t)?e.getRangedRect(t,n,t,n+1):n>0?e.getRangedRect(t,n-1,t,n):S.none()}(e,t,n).map(nm):S.none()},im=function(e,t){return Je(t)?om(e,t).map(nm):Qe(t)?e.getRangedRect(t,0,t,Qr(t)).map(nm):S.none()},am=go([{none:[]},{retry:["caret"]}]),sm=function(e,t,n){return(o=t,r=mc,xt((function(e,t){return t(e)}),Ct,o,r,i)).fold(_,(function(t){return im(e,t).exists((function(e){return function(e,t){return e.left<t.left||Math.abs(t.right-e.left)<1||e.left>t.right}(n,e)}))}));var o,r,i},lm={point:function(e){return e.bottom},adjuster:function(e,t,n,o,r){var i=Zf(r,5);return Math.abs(n.bottom-o.bottom)<1||n.top>r.bottom?am.retry(i):n.top===r.bottom?am.retry(Zf(r,1)):sm(e,t,r)?am.retry(tm(i,5,0)):am.none()},move:Zf,gather:Uf},cm=function(e,t,n,o,r){return 0===r?S.some(o):function(e,t,n){return e.elementFromPoint(t,n).filter((function(e){return"table"===Ke(e)})).isSome()}(e,o.left,t.point(o))?function(e,t,n,o,r){return cm(e,t,n,t.move(o,5),r)}(e,t,n,o,r-1):e.situsFromPoint(o.left,t.point(o)).bind((function(i){return i.start.fold(S.none,(function(i){return im(e,i).bind((function(a){return t.adjuster(e,i,a,n,o).fold(S.none,(function(o){return cm(e,t,n,o,r-1)}))})).orThunk((function(){return S.some(o)}))}),S.none)}))},um=function(e,t,n){var o=e.move(n,5),r=cm(t,e,n,o,100).getOr(o);return function(e,t,n){return e.point(t)>n.getInnerHeight()?S.some(e.point(t)-n.getInnerHeight()):e.point(t)<0?S.some(-e.point(t)):S.none()}(e,r,t).fold((function(){return t.situsFromPoint(r.left,e.point(r))}),(function(n){return t.scrollBy(0,n),t.situsFromPoint(r.left,e.point(r)-n)}))},dm={tryUp:g(um,{point:function(e){return e.top},adjuster:function(e,t,n,o,r){var i=em(r,5);return Math.abs(n.top-o.top)<1||n.bottom<r.top?am.retry(i):n.bottom===r.top?am.retry(em(r,1)):sm(e,t,r)?am.retry(tm(i,5,0)):am.none()},move:em,gather:$f}),tryDown:g(um,lm),ieTryUp:function(e,t){return e.situsFromPoint(t.left,t.top-5)},ieTryDown:function(e,t){return e.situsFromPoint(t.left,t.bottom+5)},getJumpSize:m(5)},fm=function(e,t,n){return e.getSelection().bind((function(o){return Qf(t,o.finish,o.foffset,n).fold((function(){return S.some(Ws(o.finish,o.foffset))}),(function(r){var i=e.fromSitus(r);return function(e){return Kf.cata(e,(function(e){return S.none()}),(function(){return S.none()}),(function(e){return S.some(Ws(e,0))}),(function(e){return S.some(Ws(e,Qr(e)))}))}(Kf.verify(e,o.finish,o.foffset,i.finish,i.foffset,n.failure,t))}))}))},mm=function(e,t,n,o,r,i){return 0===i?S.none():gm(e,t,n,o,r).bind((function(a){var s=e.fromSitus(a),l=Kf.verify(e,n,o,s.finish,s.foffset,r.failure,t);return Kf.cata(l,(function(){return S.none()}),(function(){return S.some(a)}),(function(a){return ke(n,a)&&0===o?pm(e,n,o,em,r):mm(e,t,a,0,r,i-1)}),(function(a){return ke(n,a)&&o===Qr(a)?pm(e,n,o,Zf,r):mm(e,t,a,Qr(a),r,i-1)}))}))},pm=function(e,t,n,o,r){return rm(e,t,n).bind((function(t){return hm(e,r,o(t,dm.getJumpSize()))}))},hm=function(e,t,n){var o=_e().browser;return o.isChrome()||o.isSafari()||o.isFirefox()||o.isEdge()?t.otherRetry(e,n):o.isIE()?t.ieRetry(e,n):S.none()},gm=function(e,t,n,o,r){return rm(e,n,o).bind((function(t){return hm(e,r,t)}))},vm=function(e,t){return Ct(e,(function(e){return rt(e).exists((function(e){return ke(e,t)}))}),n).isSome();var n},bm=function(e,t,n,o,r){return Et(o,"td,th",t).bind((function(o){return Et(o,"table",t).bind((function(i){return vm(r,i)?function(e,t,n){return fm(e,t,n).bind((function(o){return mm(e,t,o.element,o.offset,n,20).map(e.fromSitus)}))}(e,t,n).bind((function(e){return Et(e.finish,"td,th",t).map((function(t){return{start:o,finish:t,range:e}}))})):S.none()}))}))},ym=function(e,t,n,o,r,i){return _e().browser.isIE()?S.none():i(o,t).orThunk((function(){return bm(e,t,n,o,r).map((function(e){var t=e.range;return Sf(S.some(Tf(t.start,t.soffset,t.finish,t.foffset)),!0)}))}))},_m=function(e,t){return Et(e,"tr",t).bind((function(e){return Et(e,"table",t).bind((function(n){var o=wt(n,"tr");return ke(e,o[0])?function(e,t,n){return Nf(Hf,e,t,n)}(n,(function(e){return ni(e).isSome()}),t).map((function(e){var t=Qr(e);return Sf(S.some(Tf(e,t,e,t)),!0)})):S.none()}))}))},wm=function(e,t){return Et(e,"tr",t).bind((function(e){return Et(e,"table",t).bind((function(n){var o=wt(n,"tr");return ke(e,o[o.length-1])?function(e,t,n){return Vf(Hf,e,t,n)}(n,(function(e){return ti(e).isSome()}),t).map((function(e){return Sf(S.some(Tf(e,0,e,0)),!0)})):S.none()}))}))},xm=function(e,t,n,o,r,i,a){return bm(e,n,o,r,i).bind((function(e){return Df(t,n,e.start,e.finish,a)}))},Cm=function(e,t){return Et(e,"td,th",t)},Om={traverse:st,gather:Uf,relative:Md.before,otherRetry:dm.tryDown,ieRetry:dm.ieTryDown,failure:Kf.failedDown},Sm={traverse:at,gather:$f,relative:Md.before,otherRetry:dm.tryUp,ieRetry:dm.ieTryUp,failure:Kf.failedUp},km=function(e){return function(t){return t===e}},Em=km(38),Tm=km(40),Dm=function(e){return e>=37&&e<=40},Am={isBackward:km(37),isForward:km(39)},Mm={isBackward:km(39),isForward:km(37)},Rm=function(e){return{elementFromPoint:function(t,n){return xe.fromPoint(xe.fromDom(e.document),t,n)},getRect:function(e){return e.dom.getBoundingClientRect()},getRangedRect:function(t,n,o,r){var i=Pd.exact(t,n,o,r);return bf(e,i)},getSelection:function(){return vf(e).map((function(t){return Ef(e,t)}))},fromSitus:function(t){var n=Pd.relative(t.start,t.finish);return Ef(e,n)},situsFromPoint:function(t,n){return yf(e,t,n).map((function(e){return kf(e.start,e.soffset,e.finish,e.foffset)}))},clearSelection:function(){!function(e){sf(e).each((function(e){return e.removeAllRanges()}))}(e)},collapseSelection:function(t){void 0===t&&(t=!1),vf(e).each((function(n){return n.fold((function(e){return e.collapse(t)}),(function(n,o){var r=t?n:o;ff(e,r,r)}),(function(n,o,r,i){var a=t?n:r,s=t?o:i;df(e,a,s,a,s)}))}))},setSelection:function(t){df(e,t.start,t.soffset,t.finish,t.foffset)},setRelativeSelection:function(t,n){ff(e,t,n)},selectNode:function(t){gf(e,t,!1)},selectContents:function(t){gf(e,t)},getInnerHeight:function(){return e.innerHeight},getScrollY:function(){var t,n,o,r;return(t=xe.fromDom(e.document),n=void 0!==t?t.dom:document,o=n.body.scrollLeft||n.documentElement.scrollLeft,r=n.body.scrollTop||n.documentElement.scrollTop,Xo(o,r)).top},scrollBy:function(t,n){!function(e,t,n){var o=(void 0!==n?n.dom:document).defaultView;o&&o.scrollBy(e,t)}(t,n,xe.fromDom(e.document))}}},Pm=function(e,t){return{rows:e,cols:t}},Im=function(e,t,n,o){var r=function(e,t,n,o){var r=zu(),i=r.clear,a=function(i){r.on((function(r){o.clearBeforeUpdate(t),Cm(i.target,n).each((function(a){co(r,a,n).each((function(n){var r=n.boxes.getOr([]);if(1===r.length){var s=r[0],l="false"===Ba(s),c=Lt(za(i.target),s,ke);l&&c&&(o.selectRange(t,r,s,s),e.selectContents(s))}else r.length>1&&(o.selectRange(t,r,n.start,n.finish),e.selectContents(a))}))}))}))};return{clearstate:i,mousedown:function(e){o.clear(t),Cm(e.target,n).each(r.set)},mouseover:function(e){a(e)},mouseup:function(e){a(e),i()}}}(Rm(e),t,n,o);return{clearstate:r.clearstate,mousedown:r.mousedown,mouseover:r.mouseover,mouseup:r.mouseup}},Lm=function(e,t,n,o){var r=Rm(e),i=function(){return o.clear(t),S.none()};return{keydown:function(e,a,s,l,c,u){var d=e.raw,f=d.which,m=!0===d.shiftKey;return uo(t,o.selectedSelector).fold((function(){return Dm(f)&&!m&&o.clearBeforeUpdate(t),Tm(f)&&m?g(xm,r,t,n,Om,l,a,o.selectRange):Em(f)&&m?g(xm,r,t,n,Sm,l,a,o.selectRange):Tm(f)?g(ym,r,n,Om,l,a,wm):Em(f)?g(ym,r,n,Sm,l,a,_m):S.none}),(function(e){var n=function(n){return function(){return G(n,(function(n){return function(e,t,n,o,r){return mo(o,e,t,r.firstSelectedSelector,r.lastSelectedSelector).map((function(e){return r.clearBeforeUpdate(n),r.selectRange(n,e.boxes,e.start,e.finish),e.boxes}))}(n.rows,n.cols,t,e,o)})).fold((function(){return fo(t,o.firstSelectedSelector,o.lastSelectedSelector).map((function(e){var n=Tm(f)||u.isForward(f)?Md.after:Md.before;return r.setRelativeSelection(Md.on(e.first,0),n(e.table)),o.clear(t),Sf(S.none(),!0)}))}),(function(e){return S.some(Sf(S.none(),!0))}))}};return Tm(f)&&m?n([Pm(1,0)]):Em(f)&&m?n([Pm(-1,0)]):u.isBackward(f)&&m?n([Pm(0,-1),Pm(-1,0)]):u.isForward(f)&&m?n([Pm(0,1),Pm(1,0)]):Dm(f)&&!m?i:S.none}))()},keyup:function(e,r,i,a,s){return uo(t,o.selectedSelector).fold((function(){var l=e.raw,c=l.which;return!0===l.shiftKey&&Dm(c)?function(e,t,n,o,r,i,a){return ke(n,r)&&o===i?S.none():Et(n,"td,th",t).bind((function(n){return Et(r,"td,th",t).bind((function(o){return Df(e,t,n,o,a)}))}))}(t,n,r,i,a,s,o.selectRange):S.none()}),S.none)}}},jm=function(e,t,n){var o=function(t){Pt(t,e.selected),Pt(t,e.firstSelected),Pt(t,e.lastSelected)},r=function(t){Dt(t,e.selected,"1")},i=function(e){a(e),n()},a=function(t){var n=wt(t,e.selectedSelector+","+e.firstSelectedSelector+","+e.lastSelectedSelector);P(n,o)};return{clearBeforeUpdate:a,clear:i,selectRange:function(n,o,a,s){i(n),P(o,r),Dt(a,e.firstSelected,"1"),Dt(s,e.lastSelected,"1"),t(o,a,s)},selectedSelector:e.selectedSelector,firstSelectedSelector:e.firstSelectedSelector,lastSelectedSelector:e.lastSelectedSelector}},zm=function(e,t,n){var o=En.fromTable(e);return Sl(o,t).map((function(e){var t=yl(o,n,!1);return{upOrLeftCells:function(e,t){var n=e.slice(0,t[t.length-1].row+1),o=_l(n);return V(o,(function(e){var n=e.cells.slice(0,t[t.length-1].column+1);return R(n,(function(e){return e.element}))}))}(t,e),downOrRightCells:function(e,t){var n=e.slice(t[0].row+t[0].rowspan-1,e.length),o=_l(n);return V(o,(function(e){var n=e.cells.slice(t[0].column+t[0].colspan-1,e.cells.length);return R(n,(function(e){return e.element}))}))}(t,e)}}))},Fm=tinymce.util.Tools.resolve("tinymce.Env"),Bm=function(e){return!1===Ra(xe.fromDom(e.target),"ephox-snooker-resizer-bar")};function Nm(e,t,n){var o=jm(Oi,(function(t,o,r){n.targets().each((function(n){an(o).each((function(i){var a=Is(e),s=di(f,xe.fromDom(e.getDoc()),a),l=zm(i,n,s);!function(e,t,n,o,r){e.fire("TableSelectionChange",{cells:t,start:n,finish:o,otherCells:r})}(e,t,o,r,l)}))}))}),(function(){return function(e){e.fire("TableSelectionClear")}(e)}));return e.on("init",(function(n){var r=e.getWin(),i=pi(e),a=vi(e),s=Im(r,i,a,o),l=Lm(r,i,a,o),c=function(e,t,n,o){var r=Rm(e);return function(e,i){o.clearBeforeUpdate(t),co(e,i,n).each((function(e){var n=e.boxes.getOr([]);o.selectRange(t,n,e.start,e.finish),r.selectContents(i),r.collapseSelection()}))}}(r,i,a,o);e.on("TableSelectorChange",(function(e){return c(e.start,e.finish)}));var u,d,m=function(t,n){(function(e){return!0===e.raw.shiftKey})(t)&&(n.kill&&t.kill(),n.selection.each((function(t){var n=Pd.relative(t.start,t.finish),o=$d(r,n);e.selection.setRng(o)})))},p=function(e){return 0===e.button},h=(u=Lu(xe.fromDom(i)),d=Lu(0),{touchEnd:function(e){var t=xe.fromDom(e.target);if("td"===Ke(t)||"th"===Ke(t)){var n=u.get(),o=d.get();ke(n,t)&&e.timeStamp-o<300&&(e.preventDefault(),c(t,t))}u.set(t),d.set(e.timeStamp)}});e.on("dragstart",(function(e){s.clearstate()})),e.on("mousedown",(function(e){p(e)&&Bm(e)&&s.mousedown(Ea(e))})),e.on("mouseover",(function(e){var t;(void 0===(t=e).buttons||Fm.browser.isEdge()&&0===t.buttons||0!=(1&t.buttons))&&Bm(e)&&s.mouseover(Ea(e))})),e.on("mouseup",(function(e){p(e)&&Bm(e)&&s.mouseup(Ea(e))})),e.on("touchend",h.touchEnd),e.on("keyup",(function(t){var n=Ea(t);if(n.raw.shiftKey&&Dm(n.raw.which)){var o=e.selection.getRng(),r=xe.fromDom(o.startContainer),i=xe.fromDom(o.endContainer);l.keyup(n,r,o.startOffset,i,o.endOffset).each((function(e){m(n,e)}))}})),e.on("keydown",(function(n){var o=Ea(n);t().each((function(e){return e.hideBars()}));var r=e.selection.getRng(),i=xe.fromDom(r.startContainer),a=xe.fromDom(r.endContainer),s=$o(Am,Mm)(xe.fromDom(e.selection.getStart()));l.keydown(o,i,r.startOffset,a,r.endOffset,s).each((function(e){m(o,e)})),t().each((function(e){return e.showBars()}))})),e.on("NodeChange",(function(){var t=e.selection,n=xe.fromDom(t.getStart()),r=xe.fromDom(t.getEnd());so(an,[n,r]).fold((function(){return o.clear(i)}),f)}))})),{clear:o.clear}}var Vm=function(e,t){var n=Lu(S.none()),o=Lu([]),r=S.none(),i=tt("caption"),a=function(e){return r.forall((function(t){return!t[e]}))},s=function(){return Ei(function(e){return xe.fromDom(e.selection.getEnd())}(e),vi(e))},l=function(){return Ei(_i(e),vi(e)).bind((function(e){return zt(an(e),s().bind(an),(function(n,o){return ke(n,o)?i(e)?S.some(function(e){return{element:e,mergable:S.none(),unmergable:S.none(),selection:[e]}}(e)):S.some(Si(t,n,e)):S.none()})).bind(p)}))},c=function(e){return an(e.element).map((function(t){var n=En.fromTable(t),o=Sl(n,e).getOr([]),r=z(o,(function(e,t){return t.isLocked&&(e.onAny=!0,0===t.column?e.onFirst=!0:t.column+t.colspan>=n.grid.columns&&(e.onLast=!0)),e}),{onAny:!1,onFirst:!1,onLast:!1});return{mergeable:Tl(n,e).isSome(),unmergeable:Dl(n,e).isSome(),locked:r}}))},u=function(){n.set(J(l)()),r=n.get().bind(c),P(o.get(),(function(e){return e()}))},d=function(e){return e(),o.set(o.get().concat([e])),function(){o.set(L(o.get(),(function(t){return t!==e})))}},f=function(e,t){return d((function(){return n.get().fold((function(){e.setDisabled(!0)}),(function(n){e.setDisabled(t(n))}))}))},m=function(e,t,o){return d((function(){return n.get().fold((function(){e.setDisabled(!0),e.setActive(!1)}),(function(n){e.setDisabled(t(n)),e.setActive(o(n))}))}))},h=function(e){return r.exists((function(t){return t.locked[e]}))},g=function(t,n){return function(o){return m(o,(function(e){return i(e.element)}),(function(){return e.queryCommandValue(t)===n}))}},v=g("mceTableRowType","header"),b=g("mceTableColType","th");return e.on("NodeChange ExecCommand TableSelectorChange",u),{onSetupTable:function(e){return f(e,(function(e){return!1}))},onSetupCellOrRow:function(e){return f(e,(function(e){return i(e.element)}))},onSetupColumn:function(e){return function(t){return f(t,(function(t){return i(t.element)||h(e)}))}},onSetupPasteable:function(e){return function(t){return f(t,(function(t){return i(t.element)||e().isNone()}))}},onSetupPasteableColumn:function(e,t){return function(n){return f(n,(function(n){return i(n.element)||e().isNone()||h(t)}))}},onSetupMergeable:function(e){return f(e,(function(e){return a("mergeable")}))},onSetupUnmergeable:function(e){return f(e,(function(e){return a("unmergeable")}))},resetTargets:u,onSetupTableWithCaption:function(t){return m(t,_,(function(t){return an(t.element,vi(e)).exists((function(e){return St(e,"caption").isSome()}))}))},onSetupTableRowHeaders:v,onSetupTableColumnHeaders:b,targets:n.get}},Hm=function(e){var t=function(e,t,n){return{get:function(){return po(e(),n).fold((function(){return t().fold(yo,wo)}),(function(e){return _o(e)}))}}}((function(){return pi(e)}),(function(){return Ti(_i(e),vi(e))}),Oi.selectedSelector),n=Vm(e,t),o=Us(e),r=Nm(e,o.lazyResize,n),i=au(e,r,o.lazyWire),a=function(){var e=zu(),t=zu();return{getRows:e.get,setRows:function(n){n.fold(e.clear,e.set),t.clear()},clearRows:e.clear,getColumns:t.get,setColumns:function(n){n.fold(t.clear,t.set),e.clear()},clearColumns:t.clear}}();return wd(e,i,0,t,a),function(e,t,n){var o=vi(e),r=function(t){return Ti(_i(e)).bind((function(e){return an(e,o).map((function(o){var r=Si(n,o,e);return t(o,r)}))})).getOr("")};Re({mceTableRowType:function(){return r(t.getTableRowType)},mceTableCellType:function(){return r(t.getTableCellType)},mceTableColType:function(){return r(t.getTableColType)}},(function(t,n){return e.addQueryValueHandler(n,t)}))}(e,i,t),Ai(e,t,i),function(e,t,n,o){var r=function(t){return function(){return e.execCommand(t)}},i=function(t){e.execCommand("mceInsertTable",!1,{rows:t.numRows,columns:t.numColumns})},a={text:"Table properties",onSetup:n.onSetupTable,onAction:r("mceTableProps")},s={text:"Delete table",icon:"table-delete-table",onSetup:n.onSetupTable,onAction:r("mceTableDelete")};e.ui.registry.addMenuItem("tableinsertrowbefore",{text:"Insert row before",icon:"table-insert-row-above",onAction:r("mceTableInsertRowBefore"),onSetup:n.onSetupCellOrRow}),e.ui.registry.addMenuItem("tableinsertrowafter",{text:"Insert row after",icon:"table-insert-row-after",onAction:r("mceTableInsertRowAfter"),onSetup:n.onSetupCellOrRow}),e.ui.registry.addMenuItem("tabledeleterow",{text:"Delete row",icon:"table-delete-row",onAction:r("mceTableDeleteRow"),onSetup:n.onSetupCellOrRow}),e.ui.registry.addMenuItem("tablerowprops",{text:"Row properties",icon:"table-row-properties",onAction:r("mceTableRowProps"),onSetup:n.onSetupCellOrRow}),e.ui.registry.addMenuItem("tablecutrow",{text:"Cut row",icon:"cut-row",onAction:r("mceTableCutRow"),onSetup:n.onSetupCellOrRow}),e.ui.registry.addMenuItem("tablecopyrow",{text:"Copy row",icon:"duplicate-row",onAction:r("mceTableCopyRow"),onSetup:n.onSetupCellOrRow}),e.ui.registry.addMenuItem("tablepasterowbefore",{text:"Paste row before",icon:"paste-row-before",onAction:r("mceTablePasteRowBefore"),onSetup:n.onSetupPasteable(o.getRows)}),e.ui.registry.addMenuItem("tablepasterowafter",{text:"Paste row after",icon:"paste-row-after",onAction:r("mceTablePasteRowAfter"),onSetup:n.onSetupPasteable(o.getRows)});var l={type:"nestedmenuitem",text:"Row",getSubmenuItems:m("tableinsertrowbefore tableinsertrowafter tabledeleterow tablerowprops | tablecutrow tablecopyrow tablepasterowbefore tablepasterowafter")};e.ui.registry.addMenuItem("tableinsertcolumnbefore",{text:"Insert column before",icon:"table-insert-column-before",onAction:r("mceTableInsertColBefore"),onSetup:n.onSetupColumn("onFirst")}),e.ui.registry.addMenuItem("tableinsertcolumnafter",{text:"Insert column after",icon:"table-insert-column-after",onAction:r("mceTableInsertColAfter"),onSetup:n.onSetupColumn("onLast")}),e.ui.registry.addMenuItem("tabledeletecolumn",{text:"Delete column",icon:"table-delete-column",onAction:r("mceTableDeleteCol"),onSetup:n.onSetupColumn("onAny")}),e.ui.registry.addMenuItem("tablecutcolumn",{text:"Cut column",icon:"cut-column",onAction:r("mceTableCutCol"),onSetup:n.onSetupColumn("onAny")}),e.ui.registry.addMenuItem("tablecopycolumn",{text:"Copy column",icon:"duplicate-column",onAction:r("mceTableCopyCol"),onSetup:n.onSetupColumn("onAny")}),e.ui.registry.addMenuItem("tablepastecolumnbefore",{text:"Paste column before",icon:"paste-column-before",onAction:r("mceTablePasteColBefore"),onSetup:n.onSetupPasteableColumn(o.getColumns,"onFirst")}),e.ui.registry.addMenuItem("tablepastecolumnafter",{text:"Paste column after",icon:"paste-column-after",onAction:r("mceTablePasteColAfter"),onSetup:n.onSetupPasteableColumn(o.getColumns,"onLast")});var c={type:"nestedmenuitem",text:"Column",getSubmenuItems:m("tableinsertcolumnbefore tableinsertcolumnafter tabledeletecolumn | tablecutcolumn tablecopycolumn tablepastecolumnbefore tablepastecolumnafter")};e.ui.registry.addMenuItem("tablecellprops",{text:"Cell properties",icon:"table-cell-properties",onAction:r("mceTableCellProps"),onSetup:n.onSetupCellOrRow}),e.ui.registry.addMenuItem("tablemergecells",{text:"Merge cells",icon:"table-merge-cells",onAction:r("mceTableMergeCells"),onSetup:n.onSetupMergeable}),e.ui.registry.addMenuItem("tablesplitcells",{text:"Split cell",icon:"table-split-cells",onAction:r("mceTableSplitCells"),onSetup:n.onSetupUnmergeable});var u={type:"nestedmenuitem",text:"Cell",getSubmenuItems:m("tablecellprops tablemergecells tablesplitcells")};!1===function(e){return e.getParam("table_grid",!0,"boolean")}(e)?e.ui.registry.addMenuItem("inserttable",{text:"Table",icon:"table",onAction:r("mceInsertTable")}):e.ui.registry.addNestedMenuItem("inserttable",{text:"Table",icon:"table",getSubmenuItems:function(){return[{type:"fancymenuitem",fancytype:"inserttable",onAction:i}]}}),e.ui.registry.addMenuItem("inserttabledialog",{text:"Insert table",icon:"table",onAction:r("mceInsertTable")}),e.ui.registry.addMenuItem("tableprops",a),e.ui.registry.addMenuItem("deletetable",s),e.ui.registry.addNestedMenuItem("row",l),e.ui.registry.addNestedMenuItem("column",c),e.ui.registry.addNestedMenuItem("cell",u),e.ui.registry.addContextMenu("table",{update:function(){return n.resetTargets(),n.targets().fold(m(""),(function(e){return"caption"===Ke(e.element)?"tableprops deletetable":"cell row column | advtablesort | tableprops deletetable"}))}});var d=$u(Ss(e));0!==d.length&&e.ui.registry.addNestedMenuItem("tableclass",{icon:"table-classes",text:"Table styles",getSubmenuItems:function(){return Vu(e,t,d,"tableclass",(function(t){return e.execCommand("mceTableToggleClass",!1,t)}))},onSetup:n.onSetupTable});var f=$u(Os(e));0!==f.length&&e.ui.registry.addNestedMenuItem("tablecellclass",{icon:"table-cell-classes",text:"Cell styles",getSubmenuItems:function(){return Vu(e,t,f,"tablecellclass",(function(t){return e.execCommand("mceTableCellToggleClass",!1,t)}))},onSetup:n.onSetupCellOrRow}),e.ui.registry.addNestedMenuItem("tablecellvalign",{icon:"vertical-align",text:"Vertical align",getSubmenuItems:function(){return Vu(e,t,Cu,"tablecellverticalalign",Hu(e,"vertical-align"))},onSetup:n.onSetupCellOrRow}),e.ui.registry.addNestedMenuItem("tablecellborderwidth",{icon:"border-width",text:"Border width",getSubmenuItems:function(){return Vu(e,t,gs(e),"tablecellborderwidth",Hu(e,"border-width"))},onSetup:n.onSetupCellOrRow}),e.ui.registry.addNestedMenuItem("tablecellborderstyle",{icon:"border-style",text:"Border style",getSubmenuItems:function(){return Vu(e,t,vs(e),"tablecellborderstyle",Hu(e,"border-style"))},onSetup:n.onSetupCellOrRow}),e.ui.registry.addToggleMenuItem("tablecaption",{icon:"table-caption",text:"Table caption",onAction:r("mceTableToggleCaption"),onSetup:n.onSetupTableWithCaption}),e.ui.registry.addNestedMenuItem("tablecellbackgroundcolor",{icon:"cell-background-color",text:"Background color",getSubmenuItems:function(){return Wu(e,Ls(e),"background-color")},onSetup:n.onSetupCellOrRow}),e.ui.registry.addNestedMenuItem("tablecellbordercolor",{icon:"cell-border-color",text:"Border color",getSubmenuItems:function(){return Wu(e,js(e),"border-color")},onSetup:n.onSetupCellOrRow}),e.ui.registry.addToggleMenuItem("tablerowheader",{text:"Row header",icon:"table-top-header",onAction:qu(e),onSetup:n.onSetupTableRowHeaders}),e.ui.registry.addToggleMenuItem("tablecolheader",{text:"Column header",icon:"table-left-header",onAction:Ku(e),onSetup:n.onSetupTableColumnHeaders})}(e,t,n,a),function(e,t,n,o){e.ui.registry.addMenuButton("table",{tooltip:"Table",icon:"table",fetch:function(e){return e("inserttable | cell row column | advtablesort | tableprops deletetable")}});var r=function(t){return function(){return e.execCommand(t)}};e.ui.registry.addButton("tableprops",{tooltip:"Table properties",onAction:r("mceTableProps"),icon:"table",onSetup:n.onSetupTable}),e.ui.registry.addButton("tabledelete",{tooltip:"Delete table",onAction:r("mceTableDelete"),icon:"table-delete-table",onSetup:n.onSetupTable}),e.ui.registry.addButton("tablecellprops",{tooltip:"Cell properties",onAction:r("mceTableCellProps"),icon:"table-cell-properties",onSetup:n.onSetupCellOrRow}),e.ui.registry.addButton("tablemergecells",{tooltip:"Merge cells",onAction:r("mceTableMergeCells"),icon:"table-merge-cells",onSetup:n.onSetupMergeable}),e.ui.registry.addButton("tablesplitcells",{tooltip:"Split cell",onAction:r("mceTableSplitCells"),icon:"table-split-cells",onSetup:n.onSetupUnmergeable}),e.ui.registry.addButton("tableinsertrowbefore",{tooltip:"Insert row before",onAction:r("mceTableInsertRowBefore"),icon:"table-insert-row-above",onSetup:n.onSetupCellOrRow}),e.ui.registry.addButton("tableinsertrowafter",{tooltip:"Insert row after",onAction:r("mceTableInsertRowAfter"),icon:"table-insert-row-after",onSetup:n.onSetupCellOrRow}),e.ui.registry.addButton("tabledeleterow",{tooltip:"Delete row",onAction:r("mceTableDeleteRow"),icon:"table-delete-row",onSetup:n.onSetupCellOrRow}),e.ui.registry.addButton("tablerowprops",{tooltip:"Row properties",onAction:r("mceTableRowProps"),icon:"table-row-properties",onSetup:n.onSetupCellOrRow}),e.ui.registry.addButton("tableinsertcolbefore",{tooltip:"Insert column before",onAction:r("mceTableInsertColBefore"),icon:"table-insert-column-before",onSetup:n.onSetupColumn("onFirst")}),e.ui.registry.addButton("tableinsertcolafter",{tooltip:"Insert column after",onAction:r("mceTableInsertColAfter"),icon:"table-insert-column-after",onSetup:n.onSetupColumn("onLast")}),e.ui.registry.addButton("tabledeletecol",{tooltip:"Delete column",onAction:r("mceTableDeleteCol"),icon:"table-delete-column",onSetup:n.onSetupColumn("onAny")}),e.ui.registry.addButton("tablecutrow",{tooltip:"Cut row",icon:"cut-row",onAction:r("mceTableCutRow"),onSetup:n.onSetupCellOrRow}),e.ui.registry.addButton("tablecopyrow",{tooltip:"Copy row",icon:"duplicate-row",onAction:r("mceTableCopyRow"),onSetup:n.onSetupCellOrRow}),e.ui.registry.addButton("tablepasterowbefore",{tooltip:"Paste row before",icon:"paste-row-before",onAction:r("mceTablePasteRowBefore"),onSetup:n.onSetupPasteable(o.getRows)}),e.ui.registry.addButton("tablepasterowafter",{tooltip:"Paste row after",icon:"paste-row-after",onAction:r("mceTablePasteRowAfter"),onSetup:n.onSetupPasteable(o.getRows)}),e.ui.registry.addButton("tablecutcol",{tooltip:"Cut column",icon:"cut-column",onAction:r("mceTableCutCol"),onSetup:n.onSetupColumn("onAny")}),e.ui.registry.addButton("tablecopycol",{tooltip:"Copy column",icon:"duplicate-column",onAction:r("mceTableCopyCol"),onSetup:n.onSetupColumn("onAny")}),e.ui.registry.addButton("tablepastecolbefore",{tooltip:"Paste column before",icon:"paste-column-before",onAction:r("mceTablePasteColBefore"),onSetup:n.onSetupPasteableColumn(o.getColumns,"onFirst")}),e.ui.registry.addButton("tablepastecolafter",{tooltip:"Paste column after",icon:"paste-column-after",onAction:r("mceTablePasteColAfter"),onSetup:n.onSetupPasteableColumn(o.getColumns,"onLast")}),e.ui.registry.addButton("tableinsertdialog",{tooltip:"Insert table",onAction:r("mceInsertTable"),icon:"table"});var i=$u(Ss(e));0!==i.length&&e.ui.registry.addMenuButton("tableclass",{icon:"table-classes",tooltip:"Table styles",fetch:Uu(e,t,i,"tableclass",(function(t){return e.execCommand("mceTableToggleClass",!1,t)})),onSetup:n.onSetupTable});var a=$u(Os(e));0!==a.length&&e.ui.registry.addMenuButton("tablecellclass",{icon:"table-cell-classes",tooltip:"Cell styles",fetch:Uu(e,t,a,"tablecellclass",(function(t){return e.execCommand("mceTableCellToggleClass",!1,t)})),onSetup:n.onSetupCellOrRow}),e.ui.registry.addMenuButton("tablecellvalign",{icon:"vertical-align",tooltip:"Vertical align",fetch:Uu(e,t,Cu,"tablecellverticalalign",Hu(e,"vertical-align")),onSetup:n.onSetupCellOrRow}),e.ui.registry.addMenuButton("tablecellborderwidth",{icon:"border-width",tooltip:"Border width",fetch:Uu(e,t,gs(e),"tablecellborderwidth",Hu(e,"border-width")),onSetup:n.onSetupCellOrRow}),e.ui.registry.addMenuButton("tablecellborderstyle",{icon:"border-style",tooltip:"Border style",fetch:Uu(e,t,vs(e),"tablecellborderstyle",Hu(e,"border-style")),onSetup:n.onSetupCellOrRow}),e.ui.registry.addToggleButton("tablecaption",{tooltip:"Table caption",onAction:r("mceTableToggleCaption"),icon:"table-caption",onSetup:n.onSetupTableWithCaption}),e.ui.registry.addMenuButton("tablecellbackgroundcolor",{icon:"cell-background-color",tooltip:"Background color",fetch:function(t){return t(Wu(e,Ls(e),"background-color"))},onSetup:n.onSetupCellOrRow}),e.ui.registry.addMenuButton("tablecellbordercolor",{icon:"cell-border-color",tooltip:"Border color",fetch:function(t){return t(Wu(e,js(e),"border-color"))},onSetup:n.onSetupCellOrRow}),e.ui.registry.addToggleButton("tablerowheader",{tooltip:"Row header",icon:"table-top-header",onAction:qu(e),onSetup:n.onSetupTableRowHeaders}),e.ui.registry.addToggleButton("tablecolheader",{tooltip:"Column header",icon:"table-left-header",onAction:Ku(e),onSetup:n.onSetupTableColumnHeaders})}(e,t,n,a),function(e){var t=function(e){return e.getParam("table_toolbar","tableprops tabledelete | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol")}(e);t.length>0&&e.ui.registry.addContextToolbar("table",{predicate:function(t){return e.dom.is(t,"table")&&e.getBody().contains(t)},items:t,scope:"node",position:"node"})}(e),e.on("PreInit",(function(){e.serializer.addTempAttr(Oi.firstSelected),e.serializer.addTempAttr(Oi.lastSelected),function(e){e.formatter.register(Od)}(e)})),function(e){return e.getParam("table_tab_navigation",!0,"boolean")}(e)&&e.on("keydown",(function(t){!function(e,t,n){if(e.keyCode===_f.TAB){var o=pi(t),r=function(e){var t=Ke(e);return ke(e,o)||D(Of,t)},i=t.selection.getRng(),a=xe.fromDom(e.shiftKey?i.startContainer:i.endContainer);nn(a,r).each((function(o){e.preventDefault(),an(o,r).each(n.clear),t.selection.collapse(e.shiftKey),(e.shiftKey?xf:wf)(t,r,o).each((function(e){t.selection.setRng(e)}))}))}}(t,e,r)})),e.on("remove",(function(){o.destroy()})),function(e,t,n,o){return{insertTable:hu(e),setClipboardRows:pu(t.setRows),getClipboardRows:mu(t.getRows),setClipboardCols:pu(t.setColumns),getClipboardCols:mu(t.getColumns),resizeHandler:n,selectionTargets:o}}(e,a,o,n)};xo.add("table",Hm)}()},"96cf":function(e,t){!function(t){"use strict";var n=Object.prototype,o=n.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag",l="object"==typeof e,c=t.regeneratorRuntime;if(c)l&&(e.exports=c);else{(c=t.regeneratorRuntime=l?e.exports:{}).wrap=h;var u={},d={};d[i]=function(){return this};var f=Object.getPrototypeOf,m=f&&f(f(k([])));m&&m!==n&&o.call(m,i)&&(d=m);var p=y.prototype=v.prototype=Object.create(d);b.prototype=p.constructor=y,y.constructor=b,y[s]=b.displayName="GeneratorFunction",c.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},c.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s in e||(e[s]="GeneratorFunction")),e.prototype=Object.create(p),e},c.awrap=function(e){return{__await:e}},_(w.prototype),w.prototype[a]=function(){return this},c.AsyncIterator=w,c.async=function(e,t,n,o){var r=new w(h(e,t,n,o));return c.isGeneratorFunction(t)?r:r.next().then((function(e){return e.done?e.value:r.next()}))},_(p),p[s]="Generator",p[i]=function(){return this},p.toString=function(){return"[object Generator]"},c.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var o=t.pop();if(o in e)return n.value=o,n.done=!1,n}return n.done=!0,n}},c.values=k,S.prototype={constructor:S,reset:function(e){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),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,o){return a.type="throw",a.arg=e,t.next=n,o&&(t.method="next",t.arg=void 0),!!o}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=o.call(i,"catchLoc"),l=o.call(i,"finallyLoc");if(s&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,u):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var r=o.arg;O(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:k(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}}}function h(e,t,n,o){var r=t&&t.prototype instanceof v?t:v,i=Object.create(r.prototype),a=new S(o||[]);return i._invoke=function(e,t,n){var o="suspendedStart";return function(r,i){if("executing"===o)throw new Error("Generator is already running");if("completed"===o){if("throw"===r)throw i;return E()}for(n.method=r,n.arg=i;;){var a=n.delegate;if(a){var s=x(a,n);if(s){if(s===u)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===o)throw o="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o="executing";var l=g(e,t,n);if("normal"===l.type){if(o=n.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o="completed",n.method="throw",n.arg=l.arg)}}}(e,n,a),i}function g(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function v(){}function b(){}function y(){}function _(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function w(e){var t;this._invoke=function(n,r){function i(){return new Promise((function(t,i){!function t(n,r,i,a){var s=g(e[n],e,r);if("throw"!==s.type){var l=s.arg,c=l.value;return c&&"object"==typeof c&&o.call(c,"__await")?Promise.resolve(c.__await).then((function(e){t("next",e,i,a)}),(function(e){t("throw",e,i,a)})):Promise.resolve(c).then((function(e){l.value=e,i(l)}),a)}a(s.arg)}(n,r,t,i)}))}return t=t?t.then(i,i):i()}}function x(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var o=g(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,u;var r=o.arg;return r?r.done?(t[e.resultName]=r.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):r:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function k(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(o.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:E}}function E(){return{value:void 0,done:!0}}}(function(){return this}()||Function("return this")())},9861:function(e,t,n){n("5352")},"98fc":function(e,t,n){var o,r,i;!function(n,a){"use strict";r=[],void 0===(i="function"==typeof(o=function(e){return function(t){(t=t||{}).arrayAccessForm=t.arrayAccessForm||"none",t.emptyNodeForm=t.emptyNodeForm||"text",t.jsAttributeFilter=t.jsAttributeFilter,t.jsAttributeConverter=t.jsAttributeConverter,t.attributeConverters=t.attributeConverters||[],t.datetimeAccessFormPaths=t.datetimeAccessFormPaths||[],t.arrayAccessFormPaths=t.arrayAccessFormPaths||[],t.xmldomOptions=t.xmldomOptions||{},void 0===t.enableToStringFunc&&(t.enableToStringFunc=!0),void 0===t.skipEmptyTextNodesForObj&&(t.skipEmptyTextNodesForObj=!0),void 0===t.stripWhitespaces&&(t.stripWhitespaces=!0),void 0===t.useDoubleQuotes&&(t.useDoubleQuotes=!0),void 0===t.ignoreRoot&&(t.ignoreRoot=!1),void 0===t.escapeMode&&(t.escapeMode=!0),void 0===t.attributePrefix&&(t.attributePrefix="_"),void 0===t.selfClosingElements&&(t.selfClosingElements=!0),void 0===t.keepCData&&(t.keepCData=!1),void 0===t.keepText&&(t.keepText=!1),void 0===t.jsDateUTC&&(t.jsDateUTC=!1),function(){function e(e){var t=String(e);return 1===t.length&&(t="0"+t),t}"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|^\n+|(\s|\n)+$/g,"")}),"function"!=typeof Date.prototype.toISOString&&(Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+e(this.getUTCMonth()+1)+"-"+e(this.getUTCDate())+"T"+e(this.getUTCHours())+":"+e(this.getUTCMinutes())+":"+e(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"})}();var n=1,o=3,r=4,i=8,a=9;function s(e){var t=e.localName;return null==t&&(t=e.baseName),null!=t&&""!==t||(t=e.nodeName),t}function l(e){return"string"==typeof e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;"):e}function c(e,n,o){switch(t.arrayAccessForm){case"property":e[n]instanceof Array?e[n+"_asArray"]=e[n]:e[n+"_asArray"]=[e[n]]}if(!(e[n]instanceof Array)&&t.arrayAccessFormPaths.length>0){for(var r=!1,i=0;i<t.arrayAccessFormPaths.length;i++){var a=t.arrayAccessFormPaths[i];if("string"==typeof a){if(a===o){r=!0;break}}else if(a instanceof RegExp){if(a.test(o)){r=!0;break}}else if("function"==typeof a&&a(n,o)){r=!0;break}}r&&(e[n]=[e[n]])}}function u(e){var t=e.split(/[-T:+Z]/g),n=new Date(t[0],t[1]-1,t[2]),o=t[5].split(".");if(n.setHours(t[3],t[4],o[0]),o.length>1&&n.setMilliseconds(o[1]),t[6]&&t[7]){var r=60*t[6]+Number(t[7]);r=0+("-"===(/\d\d-\d\d:\d\d$/.test(e)?"-":"+")?-1*r:r),n.setMinutes(n.getMinutes()-r-n.getTimezoneOffset())}else-1!==e.indexOf("Z",e.length-1)&&(n=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())));return n}function d(e,n){for(var o={__cnt:0},r=e.childNodes,a=0;a<r.length;a++){var l=r.item(a),d=s(l);l.nodeType!==i&&(o.__cnt++,null==o[d]?(o[d]=f(l,n+"."+d),c(o,d,n+"."+d)):(o[d]instanceof Array||(o[d]=[o[d]],c(o,d,n+"."+d)),o[d][o[d].length]=f(l,n+"."+d)))}for(var m=0;m<e.attributes.length;m++){var p=e.attributes.item(m);o.__cnt++;for(var h=p.value,g=0;g<t.attributeConverters.length;g++){var v=t.attributeConverters[g];v.test.call(null,p.name,p.value)&&(h=v.convert.call(null,p.name,p.value))}o[t.attributePrefix+p.name]=h}var b=e.prefix;return b&&(o.__cnt++,o.__prefix=b),o["#text"]&&(o.__text=o["#text"],o.__text instanceof Array&&(o.__text=o.__text.join("\n")),t.escapeMode&&(o.__text=o.__text.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#x27;/g,"'").replace(/&amp;/g,"&")),t.stripWhitespaces&&(o.__text=o.__text.trim()),delete o["#text"],"property"===t.arrayAccessForm&&delete o["#text_asArray"],o.__text=function(e,n,o){if(t.datetimeAccessFormPaths.length>0)for(var r=o.split(".#")[0],i=0;i<t.datetimeAccessFormPaths.length;i++){var a=t.datetimeAccessFormPaths[i];if("string"==typeof a){if(a===r)return u(e)}else if(a instanceof RegExp){if(a.test(r))return u(e)}else if("function"==typeof a&&a(r))return u(e)}return e}(o.__text,0,n+".#text")),o.hasOwnProperty("#cdata-section")&&(o.__cdata=o["#cdata-section"],delete o["#cdata-section"],"property"===t.arrayAccessForm&&delete o["#cdata-section_asArray"]),1===o.__cnt&&o.__text&&!t.keepText?o=o.__text:0===o.__cnt&&"text"===t.emptyNodeForm?o="":o.__cnt>1&&void 0!==o.__text&&t.skipEmptyTextNodesForObj&&(t.stripWhitespaces&&""===o.__text||""===o.__text.trim())&&delete o.__text,delete o.__cnt,t.keepCData||o.hasOwnProperty("__text")||!o.hasOwnProperty("__cdata")||1!==Object.keys(o).length?(t.enableToStringFunc&&(o.__text||o.__cdata)&&(o.toString=function(){return(this.__text?this.__text:"")+(this.__cdata?this.__cdata:"")}),o):o.__cdata?o.__cdata:""}function f(e,i){return e.nodeType===a?function(e){for(var o={},r=e.childNodes,i=0;i<r.length;i++){var a=r.item(i);if(a.nodeType===n){var l=s(a);t.ignoreRoot?o=f(a,l):o[l]=f(a,l)}}return o}(e):e.nodeType===n?d(e,i):e.nodeType===o||e.nodeType===r?e.nodeValue:null}function m(e,n,o,r){var i="<"+(e&&e.__prefix?e.__prefix+":":"")+n;if(o)for(var a=0;a<o.length;a++){var s=o[a],c=e[s];t.escapeMode&&(c=l(c)),i+=" "+s.substr(t.attributePrefix.length)+"=",t.useDoubleQuotes?i+='"'+c+'"':i+="'"+c+"'"}return i+=r?" />":">"}function p(e,t){return"</"+(e&&e.__prefix?e.__prefix+":":"")+t+">"}function h(e,n){return"property"===t.arrayAccessForm&&(o=n.toString(),r="_asArray",-1!==o.indexOf(r,o.length-r.length))||0===n.toString().indexOf(t.attributePrefix)||0===n.toString().indexOf("__")||e[n]instanceof Function;var o,r}function g(e){var t=0;if(e instanceof Object)for(var n in e)h(e,n)||t++;return t}function v(e){var n=[];if(e instanceof Object)for(var o in e)-1===o.toString().indexOf("__")&&0===o.toString().indexOf(t.attributePrefix)&&n.push(o);return n}function b(e){var n="";return e instanceof Object?n+=function(e){var n="";return e.__cdata&&(n+="<![CDATA["+e.__cdata+"]]>"),(e.__text||"number"==typeof e.__text||"boolean"==typeof e.__text)&&(t.escapeMode?n+=l(e.__text):n+=e.__text),n}(e):null!==e&&(t.escapeMode?n+=l(e):n+=e),n}function y(e,n,o){var r="";if(t.jsAttributeFilter&&t.jsAttributeFilter.call(null,n,e))return r;if(t.jsAttributeConverter&&(e=t.jsAttributeConverter.call(null,n,e)),null!=e&&""!==e||!t.selfClosingElements)if("object"==typeof e)if("[object Array]"===Object.prototype.toString.call(e))r+=function(e,t,n){var o="";if(0===e.length)o+=m(e,t,n,!0);else for(var r=0;r<e.length;r++)o+=y(e[r],t,v(e[r]));return o}(e,n,o);else if(e instanceof Date)r+=m(e,n,o,!1),r+=t.jsDateUTC?e.toUTCString():e.toISOString(),r+=p(e,n);else{g(e)>0||"number"==typeof e.__text||"boolean"==typeof e.__text||e.__text||e.__cdata?(r+=m(e,n,o,!1),r+=_(e),r+=p(e,n)):t.selfClosingElements?r+=m(e,n,o,!0):(r+=m(e,n,o,!1),r+=p(e,n))}else r+=m(e,n,o,!1),r+=b(e),r+=p(e,n);else r+=m(e,n,o,!0);return r}function _(e){var t="";if(g(e)>0)for(var n in e)if(!h(e,n)){var o=e[n];t+=y(o,n,v(o))}return t+=b(e)}function w(n){if(void 0===n)return null;if("string"!=typeof n)return null;var o=null,r=null;if(e)r=(o=new e(t.xmldomOptions)).parseFromString(n,"text/xml");else if(window&&window.DOMParser){o=new window.DOMParser;var i=null;if(!(window.ActiveXObject||"ActiveXObject"in window)&&document.all&&!document.addEventListener)try{i=o.parseFromString("INVALID","text/xml").childNodes[0].namespaceURI}catch(e){i=null}try{r=o.parseFromString(n,"text/xml"),null!==i&&r.getElementsByTagNameNS(i,"parsererror").length>0&&(r=null)}catch(e){r=null}}else 0===n.indexOf("<?")&&(n=n.substr(n.indexOf("?>")+2)),(r=new ActiveXObject("Microsoft.XMLDOM")).async="false",r.loadXML(n);return r}this.asArray=function(e){return null==e?[]:e instanceof Array?e:[e]},this.toXmlDateTime=function(e){return e instanceof Date?e.toISOString():"number"==typeof e?new Date(e).toISOString():null},this.asDateTime=function(e){return"string"==typeof e?u(e):e},this.xml2dom=function(e){return w(e)},this.dom2js=function(e){return f(e,null)},this.js2dom=function(e){return w(this.js2xml(e))},this.xml2js=function(e){var t=w(e);return null!=t?this.dom2js(t):null},this.js2xml=function(e){return _(e)},this.getVersion=function(){return"3.4.0"}}})?o.apply(t,r):o)||(e.exports=i)}()},"99af":function(e,t,n){"use strict";var o=n("23e7"),r=n("da84"),i=n("d039"),a=n("e8b5"),s=n("861d"),l=n("7b0b"),c=n("07fa"),u=n("8418"),d=n("65f0"),f=n("1dde"),m=n("b622"),p=n("2d00"),h=m("isConcatSpreadable"),g=r.TypeError,v=p>=51||!i((function(){var e=[];return e[h]=!1,e.concat()[0]!==e})),b=f("concat"),y=function(e){if(!s(e))return!1;var t=e[h];return void 0!==t?!!t:a(e)};o({target:"Array",proto:!0,arity:1,forced:!v||!b},{concat:function(e){var t,n,o,r,i,a=l(this),s=d(a,0),f=0;for(t=-1,o=arguments.length;t<o;t++)if(y(i=-1===t?a:arguments[t])){if(f+(r=c(i))>9007199254740991)throw g("Maximum allowed index exceeded");for(n=0;n<r;n++,f++)n in i&&u(s,f,i[n])}else{if(f>=9007199254740991)throw g("Maximum allowed index exceeded");u(s,f++,i)}return s.length=f,s}})},"9a01":function(e,t,n){"use strict";var o=n("5530"),r=n("1da1"),i=n("2909"),a=(n("96cf"),n("498a"),n("c740"),n("a434"),n("99af"),n("d81d"),n("b0c0"),n("d9e2"),n("4de4"),n("d3b7"),{name:"MemberOrgTreeItem",props:{isActive:{default:!1,type:Boolean},data:{default:{}},isSelected:{default:!1,type:Boolean},showAppend:{default:!0,type:Boolean},canSelect:{default:!0,type:Boolean}},computed:{isDisabled(){return this.data.isDisabled||!this.canSelect}},model:{value:"isSelected",event:"change"},methods:{handleSwitch(e){"user"!==this.data.type&&this.$emit("click",this.data,e)},handleClick(e){this.$emit(e?"select":"unselect",this.data)}}}),s=n("2877"),l=Object(s.a)(a,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("li",{staticClass:"member-org-detail-item",class:{"is-active":e.isActive},attrs:{title:e.data.name}},[n("el-checkbox",{staticClass:"member-org-manage-check",attrs:{disabled:e.isDisabled,value:e.isSelected},on:{change:e.handleClick}}),n("div",{staticClass:"member-org-detail-item-wrapper item-org",on:{click:e.handleSwitch}},[n("div",{staticClass:"member-org-detail-icon"},["region"===e.data.type||"root"===e.data.type?n("base-icon",{attrs:{"icon-class":"government-line"}}):e._e(),"organ"===e.data.type?n("base-icon",{attrs:{"icon-class":"organization-chart"}}):e._e(),"user"===e.data.type?n("base-icon",{attrs:{"icon-class":"user-3-line"}}):e._e(),"role"===e.data.type?n("base-icon",{attrs:{"icon-class":"shield-user-line"}}):e._e()],1),n("span",{staticClass:"member-org-detail-title"},[e._v(" "+e._s(e.data.name)+" "),"user"===e.data.type&&e.data.account?n("small",[e._v(e._s(e.data.account))]):n("small",[e._v(e._s(e.data.code))])]),n("div",{staticClass:"member-org-spacing"}),e.showAppend?n("span",{staticClass:"member-org-detail-append"},[n("base-icon",{attrs:{"icon-class":"arrow-right-s-line"}})],1):e._e()])],1)}),[],!1,null,null,null).exports,c=n("7694"),u=n("60bb"),d=n.n(u),f={name:"OrganizationSelector",components:{MemberOrgTreeItem:l},computed:{total:function(){return this.data.length},searchTotal:function(){return this.searchData.length},_elFormItemSize:function(){return(this.elFormItem||{}).elFormItemSize},componentSize:function(){return this.size||this._elFormItemSize||(this.$ELEMENT||{}).size},collapseTagSize:function(){return["small","mini"].indexOf(this.componentSize)>-1?"mini":"small"}},model:{prop:"selected",event:"change"},inject:{elForm:{default:""},elFormItem:{default:""}},props:{getOrgTree:{type:Function,default:c.j},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},parentCode:{type:String,default:"000000000000"},platform:{type:String,default:"pc"},text:{type:String,default:"选择"},customStyle:{type:Object,default:function(){return{}}},placeholder:{type:String,default:""},parentName:{type:String,default:"全国"},selected:{default:function(){return[]}},optionScopeType:{type:String,default:"ORGAN"},dialogTitle:{type:String,default:"选择组织机构"}},mounted:function(){null===this.selected&&(this.selected=[]),this.$emit("change",this.selected),this.selected.length&&this.$refs.nodeTree&&this.$refs.nodeTree.setCheckedKeys(Object(i.a)(d.a.cloneDeep(this.selected))),this.debounce=d.a.debounce(this.onSearch,50)},watch:{keyword:function(e){e.trim()?(this.isSearching=!0,this.debounce&&this.debounce()):this.isSearching=!1}},data:function(){return{data:[],isSearchLoading:!1,isSearching:!1,keyword:"",searchData:[],visible:!1,stack:[],currentDept:{},dataLoading:!0,debounce:!1}},methods:{onDialogClose:function(){this.data=[],this.isSearchLoading=!1,this.isSearching=!1,this.keyword="",this.searchData=[],this.visible=!1,this.stack=[],this.currentDept={},this.dataLoading=!1},onSearch:function(){var e=this;return Object(r.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.searchData=[],"PERSON"!==e.optionScopeType){t.next=7;break}return t.next=4,e.searchUser();case 4:e.searchData=t.sent,t.next=7;break;case 7:case"end":return t.stop()}}),t)})))()},onCheckedTreeNodeChange:function(e,t){if(t)this.multiple||(this.$refs.nodeTree.setCheckedKeys([e.code]),this.selected.pop()),this.selected.push(e);else{var n=this.selected.findIndex((function(t){return t.code===e.code}));n>-1&&this.selected.splice(n,1)}},loadTreeNode:function(e,t){var n=this;return Object(r.a)(regeneratorRuntime.mark((function o(){var r,a;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(0!==e.level){o.next=5;break}return r={code:n.parentCode,name:n.parentName,label:n.parentName,type:"root",children:[],disabled:"ORGAN"!==n.optionScopeType},o.abrupt("return",t([r]));case 5:return a=[],o.t0=[],o.t1=Object(i.a)(a),o.t2=i.a,o.next=11,n.getOrgByParentCode(e.data.code);case 11:if(o.t3=o.sent,o.t4=(0,o.t2)(o.t3),a=o.t0.concat.call(o.t0,o.t1,o.t4),!(["root","organ","region"].indexOf(e.data.type)>-1&&"PERSON"===n.optionScopeType)){o.next=23;break}return o.t5=[],o.t6=Object(i.a)(a),o.t7=i.a,o.next=20,n.getUserListByParentNode(e.data);case 20:o.t8=o.sent,o.t9=(0,o.t7)(o.t8),a=o.t5.concat.call(o.t5,o.t6,o.t9);case 23:return o.abrupt("return",t(a));case 24:case"end":return o.stop()}}),o)})))()},searchUser:function(){var e=this;return Object(r.a)(regeneratorRuntime.mark((function t(){var n,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.keyword&&!(e.keyword.length<1)){t.next=2;break}return t.abrupt("return");case 2:return e.isSearchLoading=!0,n=[],t.prev=4,t.next=7,Object(c.o)({condition:{name:e.keyword},limit:1e3,page:1});case 7:1===(r=t.sent).data.code&&(n=(n=r.data.data.data).map((function(e){return Object(o.a)(Object(o.a)({},e),{},{name:e.name,label:e.name,code:e.id,type:"user",isLeaf:!0})}))),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(4),e.$message.error(t.t0.message);case 14:return t.prev=14,e.isSearchLoading=!1,t.finish(14);case 17:return t.abrupt("return",n);case 18:case"end":return t.stop()}}),t,null,[[4,11,14,17]])})))()},getUserListByParentNode:function(e){var t=this;return Object(r.a)(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,Object(c.l)({condition:{regionCode:e.regionCode||e.code,orgCode:e.code},limit:"1000",page:"1"});case 3:return r=n.sent,n.abrupt("return",r.data.data.data.length?r.data.data.data.map((function(e){return Object(o.a)(Object(o.a)({},e),{},{name:e.name,label:e.name,code:e.id,type:"user",isLeaf:!0,disabled:"PERSON"!==t.optionScopeType})})):[]);case 7:return n.prev=7,n.t0=n.catch(0),t.$message.error(n.t0),n.abrupt("return",[]);case 11:case"end":return n.stop()}}),n,null,[[0,7]])})))()},getOrgByParentCode:function(e){var t=this;return Object(r.a)(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,Object(c.j)({code:e});case 3:if(1===(r=n.sent).data.code){n.next=6;break}throw new Error(r.data.message||"根据父级部门ID加载子集部门节点失败");case 6:return n.abrupt("return",r.data.data.length?r.data.data.map((function(e){return Object(o.a)(Object(o.a)({},e),{},{name:e.name,label:e.name,code:e.code,type:e.type,disabled:"ORGAN"!==t.optionScopeType})})):[]);case 9:return n.prev=9,n.t0=n.catch(0),t.$message.error(n.t0),n.abrupt("return",[]);case 13:case"end":return n.stop()}}),n,null,[[0,9]])})))()},handleSelect:function(){this.disabled||this.readonly||(this.visible=!0)},handleConfirm:function(){this.$emit("change",this.selected),this.onDialogClose()},handleCancel:function(){this.visible=!1},handleCloseTag:function(e){var t=this.selected.findIndex((function(t){return t.code===e.code}));t>-1&&this.selected.splice(t,1)},handleSelectItem:function(e){this.multiple||this.selected.pop(),this.selected.push(e)},handleUnSelectItem:function(e){var t=this.selected.findIndex((function(t){return t.code===e.code}));if(t>-1&&this.selected.splice(t,1),this.$refs.nodeTree){var n=this.$refs.nodeTree.getCheckedKeys();n=n.filter((function(t){return t!==e.code})),this.$refs.nodeTree.setCheckedKeys(n)}},handleClick:function(e){this.isSearching=!1,this.stack.push(e)}}},m=Object(s.a)(f,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"organization-selector el-select",class:[e.componentSize?"el-select--"+e.componentSize:""]},[e.visible?n("el-dialog",{class:"mobile"===e.platform?"organization-selector-mobile":"organization-selector-pc",attrs:{"close-on-click-modal":!1,"close-on-press-escape":!1,disabled:e.disabled,title:e.dialogTitle,visible:e.visible,"append-to-body":"","custom-class":"organization-selector-dialog",placement:"bottom-start",width:"800px"},on:{"update:visible":function(t){e.visible=t},close:e.onDialogClose}},[n("div",{staticClass:"tree-select-section-left"},[n("div",{staticClass:"member-org-detail-list-container"},["PERSON"===e.optionScopeType?n("div",{staticClass:"member-org-detail-title-bar"},[n("el-input",{attrs:{clearable:"",maxLength:"20",placeholder:"请输入关键词","prefix-icon":"el-icon-search",size:"small"},model:{value:e.keyword,callback:function(t){e.keyword=t},expression:"keyword"}})],1):e._e(),e.isSearching?n("div",{directives:[{name:"loading",rawName:"v-loading",value:e.isSearchLoading,expression:"isSearchLoading"}],staticClass:"b-scroll"},[e.searchTotal?n("div",{staticClass:"member-org-detail-list-item-container"},e._l(e.searchData,(function(t){return n("member-org-tree-item",{key:t.code,attrs:{data:t,"is-selected":e.selected.some((function(e){return e.code===t.code})),"show-append":!1},on:{select:e.handleSelectItem,unselect:e.handleUnSelectItem}})})),1):n("el-empty")],1):n("div",{staticClass:"b-scroll"},[n("div",{staticClass:"member-org-detail-list-item-container"},[n("el-tree",{ref:"nodeTree",staticClass:"organization-tree",attrs:{"default-checked-keys":e.selected.map((function(e){return e.code})),indent:8,load:e.loadTreeNode,props:{label:"name",children:"children",isLeaf:"isLeaf"},"check-strictly":"",lazy:"","node-key":"code","show-checkbox":""},on:{"check-change":e.onCheckedTreeNodeChange},scopedSlots:e._u([{key:"default",fn:function(t){t.node;var o=t.data;return n("div",{staticClass:"custom-tree-node",attrs:{title:o.name+" : "+(o.type&&"user"===o.type?o.account:o.code)}},[n("div",{staticClass:"custom-tree-node-icon"},["region"===o.type||"root"===o.type?n("base-icon",{attrs:{"icon-class":"government-line"}}):e._e(),"organ"===o.type?n("base-icon",{attrs:{"icon-class":"organization-chart"}}):e._e(),"user"===o.type?n("base-icon",{attrs:{"icon-class":"user-3-line"}}):e._e(),"role"===o.type?n("base-icon",{attrs:{"icon-class":"shield-user-line"}}):e._e()],1),n("div",{staticClass:"custom-tree-node-name"},[e._v(" "+e._s(o.name)+" "),n("small",[e._v(e._s(o.type&&"user"===o.type?o.account:o.code))])])])}}],null,!1,3974469761)})],1)])])]),n("div",{staticClass:"tree-select-section-right"},[e.selected.length?n("div",{staticClass:"b-scroll"},[n("div",{staticClass:"member-org-detail-list-item-container"},e._l(e.selected,(function(t){return n("member-org-tree-item",{key:t.code,attrs:{data:t,"is-selected":!0,"show-append":!1},on:{unselect:e.handleUnSelectItem}})})),1)]):n("el-empty")],1),n("div",{staticClass:"tree-select-section-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{attrs:{disabled:!e.selected.length,type:"primary"},on:{click:e.handleConfirm}},[e._v("确定")])],1)]):e._e(),n("div",{staticClass:"organization-selector-container",class:{"is-disabled":e.disabled},style:e.customStyle,on:{click:e.handleSelect}},[n("div",{staticClass:"organization-selector-wrapper el-select__tags"},[e.selected&&e.selected.length?n("span",{staticClass:"select-tag"},[n("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:e.selected[0].name,disabled:e.selected[0].name.length<11,placement:"top"}},[n("el-tag",{attrs:{closable:!e.disabled,size:e.collapseTagSize,type:"info"},on:{close:function(t){return e.handleCloseTag(e.selected[0])}}},["region"===e.selected[0].type?n("base-icon",{attrs:{"icon-class":"government-line"}}):e._e(),"organ"===e.selected[0].type?n("base-icon",{attrs:{"icon-class":"organization-chart"}}):e._e(),"user"===e.selected[0].type?n("base-icon",{attrs:{"icon-class":"user-3-line"}}):e._e(),"role"===e.selected[0].type?n("base-icon",{attrs:{"icon-class":"shield-user-line"}}):e._e(),n("span",{staticClass:"tag-name"},[e._v(e._s(""+(e.selected[0].name.length>11?e.selected[0].name.substr(0,11)+"...":e.selected[0].name)))])],1)],1),e.selected.length>1?n("el-tag",{attrs:{closable:!1,size:e.collapseTagSize,"disable-transitions":"",type:"info"}},[n("span",{staticClass:"el-select__tags-text"},[e._v("+ "+e._s(e.selected.length-1))])]):e._e()],1):e._e()]),n("el-input",{ref:"reference",class:{"is-focus":e.visible},attrs:{disabled:e.disabled,placeholder:e.selected&&e.selected.length?"":e.placeholder,readonly:"mobile"===e.platform||e.readonly,size:e.componentSize,"validate-event":!1,type:"text"}},[n("template",{slot:"prefix"},["ORGAN"===e.optionScopeType?n("base-icon",{attrs:{"icon-class":"organization-chart"}}):e._e(),"PERSON"===e.optionScopeType?n("base-icon",{attrs:{"icon-class":"user-3-line"}}):e._e(),"ROLE"===e.optionScopeType?n("base-icon",{attrs:{"icon-class":"shield-user-line"}}):e._e()],1)],2)],1)],1)}),[],!1,null,null,null);t.a=m.exports},"9a1f":function(e,t,n){var o=n("da84"),r=n("c65b"),i=n("59ed"),a=n("825a"),s=n("0d51"),l=n("35a1"),c=o.TypeError;e.exports=function(e,t){var n=arguments.length<2?l(e):t;if(i(n))return a(r(n,e));throw c(s(e)+" is not iterable")}},"9b1d":function(e,t,n){},"9bdd":function(e,t,n){var o=n("825a"),r=n("2a62");e.exports=function(e,t,n,i){try{return i?t(o(n)[0],n[1]):t(n)}catch(t){r(e,"throw",t)}}},"9bf2":function(e,t,n){var o=n("da84"),r=n("83ab"),i=n("0cfb"),a=n("aed9"),s=n("825a"),l=n("a04b"),c=o.TypeError,u=Object.defineProperty,d=Object.getOwnPropertyDescriptor;t.f=r?a?function(e,t,n){if(s(e),t=l(t),s(n),"function"==typeof e&&"prototype"===t&&"value"in n&&"writable"in n&&!n.writable){var o=d(e,t);o&&o.writable&&(e[t]=n.value,n={configurable:"configurable"in n?n.configurable:o.configurable,enumerable:"enumerable"in n?n.enumerable:o.enumerable,writable:!1})}return u(e,t,n)}:u:function(e,t,n){if(s(e),t=l(t),s(n),i)try{return u(e,t,n)}catch(e){}if("get"in n||"set"in n)throw c("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},"9d55":function(e,t,n){},"9dd9":function(e,t,n){(function(e){!function(){"use strict";var t,n,o,r=function(e){var t=e;return{get:function(){return t},set:function(e){t=e}}},i=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=tinymce.util.Tools.resolve("tinymce.util.Tools"),s=(t="array",function(e){return o=typeof(n=e),(null===n?"null":"object"===o&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"===o&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":o)===t;var n,o}),l=function(e){return!function(e){return null==e}(e)},c=function(e){return function(t){return typeof t===e}}("function"),u=function(){},d=function(e){return function(){return e}},f=function(e){return e},m=d(!1),p=d(!0),h=function(){return g},g={fold:function(e,t){return e()},isSome:m,isNone:p,getOr:o=f,getOrThunk:n=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:d(null),getOrUndefined:d(void 0),or:o,orThunk:n,map:h,each:u,bind:h,exists:m,forall:p,filter:function(){return h()},toArray:function(){return[]},toString:d("none()")},v=function(e){var t=d(e),n=function(){return r},o=function(t){return t(e)},r={fold:function(t,n){return n(e)},isSome:p,isNone:m,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:n,orThunk:n,map:function(t){return v(t(e))},each:function(t){t(e)},bind:o,exists:o,forall:o,filter:function(t){return t(e)?r:g},toArray:function(){return[e]},toString:function(){return"some("+e+")"}};return r},b={some:v,none:h,from:function(e){return null==e?g:v(e)}},y={},_={exports:y};!function(t,n,o,r){!function(e,r){"object"==typeof n&&void 0!==o?o.exports=r():"function"==typeof t&&t.amd?t(r):(e="undefined"!=typeof globalThis?globalThis:e||self).EphoxContactWrapper=r()}(this,(function(){var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},n={exports:{}};!function(e){!function(t){var n=setTimeout;function o(){}function r(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],u(e,this)}function i(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,r._immediateFn((function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var o;try{o=n(e._value)}catch(e){return void s(t.promise,e)}a(t.promise,o)}else(1===e._state?a:s)(t.promise,e._value)}))):e._deferreds.push(t)}function a(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if(t instanceof r)return e._state=3,e._value=t,void l(e);if("function"==typeof n)return void u((o=n,i=t,function(){o.apply(i,arguments)}),e)}e._state=1,e._value=t,l(e)}catch(t){s(e,t)}var o,i}function s(e,t){e._state=2,e._value=t,l(e)}function l(e){2===e._state&&0===e._deferreds.length&&r._immediateFn((function(){e._handled||r._unhandledRejectionFn(e._value)}));for(var t=0,n=e._deferreds.length;t<n;t++)i(e,e._deferreds[t]);e._deferreds=null}function c(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function u(e,t){var n=!1;try{e((function(e){n||(n=!0,a(t,e))}),(function(e){n||(n=!0,s(t,e))}))}catch(e){if(n)return;n=!0,s(t,e)}}r.prototype.catch=function(e){return this.then(null,e)},r.prototype.then=function(e,t){var n=new this.constructor(o);return i(this,new c(e,t,n)),n},r.all=function(e){var t=Array.prototype.slice.call(e);return new r((function(e,n){if(0===t.length)return e([]);var o=t.length;function r(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(e){r(i,e)}),n)}t[i]=a,0==--o&&e(t)}catch(e){n(e)}}for(var i=0;i<t.length;i++)r(i,t[i])}))},r.resolve=function(e){return e&&"object"==typeof e&&e.constructor===r?e:new r((function(t){t(e)}))},r.reject=function(e){return new r((function(t,n){n(e)}))},r.race=function(e){return new r((function(t,n){for(var o=0,r=e.length;o<r;o++)e[o].then(t,n)}))},r._immediateFn="function"==typeof setImmediate?function(e){setImmediate(e)}:function(e){n(e,0)},r._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console},r._setImmediateFn=function(e){r._immediateFn=e},r._setUnhandledRejectionFn=function(e){r._unhandledRejectionFn=e},e.exports?e.exports=r:t.Promise||(t.Promise=r)}(t)}(n);var o=n.exports;return{boltExport:("undefined"!=typeof window?window:Function("return this;")()).Promise||o}}))}(void 0,y,_);var w=_.exports.boltExport,x=function(e,t){return S(document.createElement("canvas"),e,t)},C=function(e){var t=x(e.width,e.height);return O(t).drawImage(e,0,0),t},O=function(e){return e.getContext("2d")},S=function(e,t,n){return e.width=t,e.height=n,e},k=function(e){return new w((function(t,n){var o=URL.createObjectURL(e),r=new Image,i=function(){r.removeEventListener("load",a),r.removeEventListener("error",s)},a=function(){i(),t(r)},s=function(){i(),n("Unable to load data of type "+e.type+": "+o)};r.addEventListener("load",a),r.addEventListener("error",s),r.src=o,r.complete&&setTimeout(a,0)}))},E=function(e){return new w((function(t,n){var o=new XMLHttpRequest;o.open("GET",e,!0),o.responseType="blob",o.onload=function(){200===this.status&&t(this.response)},o.onerror=function(){var e,t=this;n(0===this.status?((e=new Error("No access to download image")).code=18,e.name="SecurityError",e):new Error("Error "+t.status+" downloading image"))},o.send()}))},T=function(e){return new w((function(t,n){(function(e){var t=e.split(","),n=/data:([^;]+)/.exec(t[0]);if(!n)return b.none();for(var o=n[1],r=t[1],i=atob(r),a=i.length,s=Math.ceil(a/1024),l=new Array(s),c=0;c<s;++c){for(var u=1024*c,d=Math.min(u+1024,a),f=new Array(d-u),m=u,p=0;m<d;++p,++m)f[p]=i[m].charCodeAt(0);l[c]=new Uint8Array(f)}return b.some(new Blob(l,{type:o}))})(e).fold((function(){n("uri is not base64: "+e)}),t)}))},D=function(e,t,n){return t=t||"image/png",c(HTMLCanvasElement.prototype.toBlob)?new w((function(o,r){e.toBlob((function(e){e?o(e):r()}),t,n)})):T(e.toDataURL(t,n))},A=function(e){URL.revokeObjectURL(e.src)},M=function(e){return function(e){var t=e.src;return 0===t.indexOf("data:")?T(t):E(t)}(e)},R=Array.prototype.indexOf,P=function(e,t){return n=e,o=t,R.call(n,o)>-1;var n,o},I=function(e,t){for(var n=0,o=e.length;n<o;n++){t(e[n],n)}},L=function(e,t){return function(e,t,n){for(var o=0,r=e.length;o<r;o++){var i=e[o];if(t(i,o))return b.some(i);if(n(i,o))break}return b.none()}(e,t,m)},j=function(e,t){for(var n=0,o=e.length;n<o;++n){if(!0!==t(e[n],n))return!1}return!0},z=Object.keys;(function(e){if(!s(e))throw new Error("cases must be an array");if(0===e.length)throw new Error("there must be at least one case");var t=[],n={};I(e,(function(o,r){var i=z(o);if(1!==i.length)throw new Error("one and only one name per case");var a=i[0],l=o[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(!s(l))throw new Error("case arguments must be an array");t.push(a),n[a]=function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var i=n.length;if(i!==l.length)throw new Error("Wrong number of arguments to case "+a+". Expected "+l.length+" ("+l+"), got "+i);var s=function(e){var o=z(e);if(t.length!==o.length)throw new Error("Wrong number of arguments to match. Expected: "+t.join(",")+"\nActual: "+o.join(","));if(!j(t,(function(e){return P(o,e)})))throw new Error("Not all branches were specified when using match. Specified: "+o.join(", ")+"\nRequired: "+t.join(", "));return e[a].apply(null,n)};return{fold:function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];if(t.length!==e.length)throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+t.length);var i=t[r];return i.apply(null,n)},match:s,log:function(e){}}}}))})([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);var F=function(e,t,n){var o=t.type,r=d(o),i=d(n),a=function(t,n){return e.then((function(e){return function(e,t,n){return t=t||"image/png",e.toDataURL(t,n)}(e,t,n)}))};return{getType:r,toBlob:function(){return w.resolve(t)},toDataURL:i,toBase64:function(){return n.split(",")[1]},toAdjustedBlob:function(t,n){return e.then((function(e){return D(e,t,n)}))},toAdjustedDataURL:a,toAdjustedBase64:function(e,t){return a(e,t).then((function(e){return e.split(",")[1]}))},toCanvas:function(){return e.then(C)}}},B=function(e){return function(e){return new w((function(t){var n=new FileReader;n.onloadend=function(){t(n.result)},n.readAsDataURL(e)}))}(e).then((function(t){return F(function(e){return k(e).then((function(e){A(e);var t=x(function(e){return e.naturalWidth||e.width}(e),function(e){return e.naturalHeight||e.height}(e));return O(t).drawImage(e,0,0),t}))}(e),e,t)}))},N=function(e,t){return D(e,t).then((function(t){return F(w.resolve(e),t,e.toDataURL())}))},V=function(e,t){void 0===t&&(t=2);var n=Math.pow(10,t),o=Math.round(e*n);return Math.ceil(o/n)},H=function(e,t,n){var o=(n<0?360+n:n)*Math.PI/180,r=e.width,i=e.height,a=Math.sin(o),s=Math.cos(o),l=V(Math.abs(r*s)+Math.abs(i*a)),c=V(Math.abs(r*a)+Math.abs(i*s)),u=x(l,c),d=O(u);return d.translate(l/2,c/2),d.rotate(o),d.drawImage(e,-r/2,-i/2),N(u,t)},$=function(e,t,n){var o=x(e.width,e.height),r=O(o);return"v"===n?(r.scale(1,-1),r.drawImage(e,0,-o.height)):(r.scale(-1,1),r.drawImage(e,-o.width,0)),N(o,t)},U=function(e,t){return function(e,t){return e.toCanvas().then((function(n){return $(n,e.getType(),t)}))}(e,t)},W=function(e,t){return function(e,t){return e.toCanvas().then((function(n){return H(n,e.getType(),t)}))}(e,t)},q=function(e,t,n){return void 0===n&&(n=!1),new w((function(o){var r=new XMLHttpRequest;r.onreadystatechange=function(){4===r.readyState&&o({status:r.status,blob:r.response})},r.open("GET",e,!0),r.withCredentials=n,function(e,t){for(var n=z(e),o=0,r=n.length;o<r;o++){var i=n[o];t(e[i],i)}}(t,(function(e,t){r.setRequestHeader(t,e)})),r.responseType="blob",r.send()}))},K=[{code:404,message:"Could not find Image Proxy"},{code:403,message:"Rejected request"},{code:0,message:"Incorrect Image Proxy URL"}],G=[{type:"not_found",message:"Failed to load image."},{type:"key_missing",message:"The request did not include an api key."},{type:"key_not_found",message:"The provided api key could not be found."},{type:"domain_not_trusted",message:"The api key is not valid for the request origins."}],Y=function(e,t){var n,o,r=(n=function(e,t){return l(e)?e[t]:void 0},o=e,I(t,(function(e,t){o=n(o,e,t)})),o);return b.from(r)},X=function(e){var t=function(e){return"ImageProxy HTTP error: "+L(K,(function(t){return e===t.code})).fold(d("Unknown ImageProxy error"),(function(e){return e.message}))}(e);return w.reject(t)},J=function(e){return L(G,(function(t){return t.type===e})).fold(d("Unknown service error"),(function(e){return e.message}))},Q=function(e){return"ImageProxy Service error: "+function(e){try{return b.some(JSON.parse(e))}catch(e){return b.none()}}(e).bind((function(e){return Y(e,["error","type"]).map(J)})).getOr("Invalid JSON in service error message")},Z=function(e){return function(e){return new w((function(t,n){var o=new FileReader;o.onload=function(){t(o.result)},o.onerror=function(e){n(e)},o.readAsText(e)}))}(e).then((function(e){var t=Q(e);return w.reject(t)}))},ee=function(e){return e<200||e>=300},te=function(e,t){var n={"Content-Type":"application/json;charset=UTF-8","tiny-api-key":t};return q(function(e,t){var n=-1===e.indexOf("?")?"?":"&";return/[?&]apiKey=/.test(e)?e:e+n+"apiKey="+encodeURIComponent(t)}(e,t),n).then((function(e){return ee(e.status)?(t=e.status,n=e.blob,function(e,t){return"application/json"===(null==t?void 0:t.type)&&(400===e||403===e||404===e||500===e)}(t,n)?Z(n):X(t)):w.resolve(e.blob);var t,n}))},ne=function(e,t,n){return void 0===n&&(n=!1),t?te(e,t):function(e,t){return q(e,{},t).then((function(e){return ee(e.status)?X(e.status):w.resolve(e.blob)}))}(e,n)},oe=function(e){return B(e)},re=function(e){if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},ie={fromHtml:function(e,t){var n=(t||document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||n.childNodes.length>1)throw new Error("HTML must have a single root node");return re(n.childNodes[0])},fromTag:function(e,t){var n=(t||document).createElement(e);return re(n)},fromText:function(e,t){var n=(t||document).createTextNode(e);return re(n)},fromDom:re,fromPoint:function(e,t,n){return b.from(e.dom.elementFromPoint(t,n)).map(re)}};"undefined"!=typeof window?window:Function("return this;")();var ae=function(e,t){return function(e,t){return L(e.dom.childNodes,(function(e){return t(ie.fromDom(e))})).map(ie.fromDom)}(e,(function(e){return function(e,t){var n=e.dom;if(1!==n.nodeType)return!1;var o=n;if(void 0!==o.matches)return o.matches(t);if(void 0!==o.msMatchesSelector)return o.msMatchesSelector(t);if(void 0!==o.webkitMatchesSelector)return o.webkitMatchesSelector(t);if(void 0!==o.mozMatchesSelector)return o.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}(e,t)}))},se=tinymce.util.Tools.resolve("tinymce.util.Delay"),le=tinymce.util.Tools.resolve("tinymce.util.Promise"),ce=tinymce.util.Tools.resolve("tinymce.util.URI"),ue=function(e){return e.getParam("imagetools_toolbar","rotateleft rotateright flipv fliph editimage imageoptions")},de=function(e){return e.getParam("imagetools_proxy")},fe=function(e){var t,n,o=function(e){return/^[0-9\.]+px$/.test(e)};return t=e.style.width,n=e.style.height,t||n?o(t)&&o(n)?{w:parseInt(t,10),h:parseInt(n,10)}:null:(t=e.width,n=e.height,t&&n?{w:parseInt(t,10),h:parseInt(n,10)}:null)},me=function(e){return{w:e.naturalWidth,h:e.naturalHeight}},pe=0,he=function(e){return ae(ie.fromDom(e),"img")},ge=function(e,t){return e.dom.is(t,"figure")},ve=function(e,t){return e.dom.is(t,"img:not([data-mce-object],[data-mce-placeholder])")},be=function(e,t){var n=function(t){return ve(e,t)&&(xe(e,t)||Ce(e,t)||l(de(e)))};return ge(e,t)?he(t).bind((function(e){return n(e.dom)?b.some(e.dom):b.none()})):n(t)?b.some(t):b.none()},ye=function(e,t){e.notificationManager.open({text:t,type:"error"})},_e=function(e){var t=e.selection.getNode(),n=e.dom.getParent(t,"figure.image");return null!==n&&ge(e,n)?he(n):ve(e,t)?b.some(ie.fromDom(t)):b.none()},we=function(e,t,n){var o=t.match(/(?:\/|^)(([^\/\?]+)\.(?:[a-z0-9.]+))(?:\?|$)/i);return l(o)?e.dom.encode(o[n]):null},xe=function(e,t){var n=t.src;return 0===n.indexOf("data:")||0===n.indexOf("blob:")||new ce(n).host===e.documentBaseURI.host},Ce=function(e,t){return-1!==a.inArray(function(e){return e.getParam("imagetools_cors_hosts",[],"string[]")}(e),new ce(t.src).host)},Oe=function(e,t){if(Ce(e,t))return ne(t.src,null,function(e,t){return-1!==a.inArray(function(e){return e.getParam("imagetools_credentials_hosts",[],"string[]")}(e),new ce(t.src).host)}(e,t));if(!xe(e,t)){var n=de(e),o=n+(-1===n.indexOf("?")?"?":"&")+"url="+encodeURIComponent(t.src),r=function(e){return e.getParam("api_key",e.getParam("imagetools_api_key","","string"),"string")}(e);return ne(o,r,!1)}return M(t)},Se=function(e,t){return function(e){return b.from(e.getParam("imagetools_fetch_image",null,"function"))}(e).fold((function(){return Oe(e,t)}),(function(e){return e(t)}))},ke=function(e,t){var n=e.editorUpload.blobCache.getByUri(t.src);return n?le.resolve(n.blob()):Se(e,t)},Ee=function(e){se.clearTimeout(e.get())},Te=function(e,t,n,o,r,i,a){return n.toBlob().then((function(s){var c,u,d,f,m=e.editorUpload.blobCache;c=i.src;var p=t.type===s.type;return function(e){return e.getParam("images_reuse_filename",!1,"boolean")}(e)&&(f=m.getByUri(c),l(f)?(c=f.uri(),u=f.name(),d=f.filename()):(u=we(e,c,2),d=we(e,c,1))),f=m.create({id:"imagetools"+pe++,blob:s,base64:n.toBase64(),uri:c,name:u,filename:p?d:void 0}),m.add(f),e.undoManager.transact((function(){var t=function(){e.$(i).off("load",t),e.nodeChanged(),o?e.editorUpload.uploadImagesAuto():(Ee(r),function(e,t){var n=se.setEditorTimeout(e,(function(){e.editorUpload.uploadImagesAuto()}),function(e){return e.getParam("images_upload_timeout",3e4,"number")}(e));t.set(n)}(e,r))};e.$(i).on("load",t),a&&e.$(i).attr({width:a.w,height:a.h}),e.$(i).attr({src:f.blobUri()}).removeAttr("data-mce-src")})),f}))},De=function(e,t,n,o){return function(){return _e(e).fold((function(){ye(e,"Could not find selected image")}),(function(r){return e._scanForImages().then((function(){return ke(e,r.dom)})).then((function(i){return oe(i).then(n).then((function(n){return Te(e,i,n,!1,t,r.dom,o)}))})).catch((function(t){ye(e,t)}))}))}},Ae=function(e,t,n){return function(){var o=_e(e).map((function(e){var t=fe(e.dom);return t?{w:t.h,h:t.w}:null})).getOrNull();return De(e,t,(function(e){return W(e,n)}),o)()}},Me=function(e,t,n){return function(){return De(e,t,(function(e){return U(e,n)}))()}},Re=function(e,t,n,o,r){return function(e){return k(e)}(r).then((function(e){var t=me(e);return o.w===t.w&&o.h===t.h||fe(n)&&function(e,t){var n,o;t&&(n=e.style.width,o=e.style.height,(n||o)&&(e.style.width=t.w+"px",e.style.height=t.h+"px",e.removeAttribute("data-mce-style")),n=e.width,o=e.height,(n||o)&&(e.setAttribute("width",String(t.w)),e.setAttribute("height",String(t.h))))}(n,t),URL.revokeObjectURL(e.src),r})).then(oe).then((function(o){return Te(e,r,o,!0,t,n)}))},Pe=function(e,t){return function(){var n=_e(e),o=n.map((function(e){return me(e.dom)}));n.each((function(r){be(e,r.dom).each((function(i){ke(e,r.dom).then((function(r){var i=function(e){return{blob:e,url:URL.createObjectURL(e)}}(r);e.windowManager.open({title:"Edit Image",size:"large",body:{type:"panel",items:[{type:"imagetools",name:"imagetools",label:"Edit Image",currentState:i}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0,disabled:!0}],onSubmit:function(r){var i=r.getData().imagetools.blob;n.each((function(n){o.each((function(o){Re(e,t,n.dom,o,i)}))})),r.close()},onCancel:u,onAction:function(e,t){switch(t.name){case"save-state":t.value?e.enable("save"):e.disable("save");break;case"disable":e.disable("save"),e.disable("cancel");break;case"enable":e.enable("cancel")}}})}))}))}))}};i.add("imagetools",(function(e){var t=r(0),n=r(null);!function(e,t){a.each({mceImageRotateLeft:Ae(e,t,-90),mceImageRotateRight:Ae(e,t,90),mceImageFlipVertical:Me(e,t,"v"),mceImageFlipHorizontal:Me(e,t,"h"),mceEditImage:Pe(e,t)},(function(t,n){e.addCommand(n,t)}))}(e,t),function(e){var t=[],n=function(t){return function(){return e.execCommand(t)}},o=function(){return _e(e).exists((function(t){return be(e,t.dom).isSome()}))},r=function(e){var n=function(t){return e.setDisabled(!t)};return n(o()),t=t.concat([n]),function(){t=function(e,t){for(var n=[],o=0,r=e.length;o<r;o++){var i=e[o];t(i,o)&&n.push(i)}return n}(t,(function(e){return e!==n}))}};e.on("NodeChange",(function(){var e=o();I(t,(function(t){return t(e)}))})),e.ui.registry.addButton("rotateleft",{tooltip:"Rotate counterclockwise",icon:"rotate-left",onAction:n("mceImageRotateLeft"),onSetup:r}),e.ui.registry.addButton("rotateright",{tooltip:"Rotate clockwise",icon:"rotate-right",onAction:n("mceImageRotateRight"),onSetup:r}),e.ui.registry.addButton("flipv",{tooltip:"Flip vertically",icon:"flip-vertically",onAction:n("mceImageFlipVertical"),onSetup:r}),e.ui.registry.addButton("fliph",{tooltip:"Flip horizontally",icon:"flip-horizontally",onAction:n("mceImageFlipHorizontal"),onSetup:r}),e.ui.registry.addButton("editimage",{tooltip:"Edit image",icon:"edit-image",onAction:n("mceEditImage"),onSetup:r}),e.ui.registry.addButton("imageoptions",{tooltip:"Image options",icon:"image",onAction:n("mceImage")}),e.ui.registry.addContextMenu("imagetools",{update:function(t){return be(e,t).map((function(e){return{text:"Edit image",icon:"edit-image",onAction:n("mceEditImage")}})).toArray()}})}(e),function(e){e.ui.registry.addContextToolbar("imagetools",{items:ue(e),predicate:function(t){return be(e,t).isSome()},position:"node",scope:"node"})}(e),function(e,t,n){e.on("NodeChange",(function(o){var r=n.get(),i=be(e,o.element);r&&!i.exists((function(e){return r.src===e.src}))&&(Ee(t),e.editorUpload.uploadImagesAuto(),n.set(null)),i.each(n.set)}))}(e,t,n)}))}()}).call(this,n("c8ba"))},"9ed3":function(e,t,n){"use strict";var o=n("ae93").IteratorPrototype,r=n("7c73"),i=n("5c6c"),a=n("d44e"),s=n("3f8c"),l=function(){return this};e.exports=function(e,t,n,c){var u=t+" Iterator";return e.prototype=r(o,{next:i(+!c,n)}),a(e,u,!1,!0),s[u]=l,e}},"9ee4":function(e,t,n){"use strict";n("ffaa")},"9f7f":function(e,t,n){var o=n("d039"),r=n("da84").RegExp,i=o((function(){var e=r("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),a=i||o((function(){return!r("a","y").sticky})),s=i||o((function(){var e=r("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));e.exports={BROKEN_CARET:s,MISSED_STICKY:a,UNSUPPORTED_Y:i}},"9ffa":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ITF14=t.ITF=void 0;var o=i(n("3c7c")),r=i(n("07df"));function i(e){return e&&e.__esModule?e:{default:e}}t.ITF=o.default,t.ITF14=r.default},a023:function(e,t,n){},a04b:function(e,t,n){var o=n("c04e"),r=n("d9b5");e.exports=function(e){var t=o(e,"string");return r(t)?t:t+""}},a0a4:function(e,t,n){"use strict";n("1209")},a15b:function(e,t,n){"use strict";var o=n("23e7"),r=n("e330"),i=n("44ad"),a=n("fc6a"),s=n("a640"),l=r([].join),c=i!=Object,u=s("join",",");o({target:"Array",proto:!0,forced:c||!u},{join:function(e){return l(a(this),void 0===e?",":e)}})},a16a:function(e,t,n){"use strict";var o=n("1da1"),r=(n("96cf"),n("c740"),n("99af"),n("b64b"),n("d3b7"),n("159b"),n("4de4"),n("d81d"),n("7db0"),n("25f0"),n("b0c0"),n("e2e6")),i=n("eb5f"),a=n("7694");t.a={data:function(){return{columnList:[]}},methods:{fillingColumns:function(e){var t=this;if(e.selectedItem){var n=e.selectedItem.widgetModel,o=this.widgetForm.list.findIndex((function(e){return e.model===n&&"relatedForm"===e.type}));n&&o>=0&&(this.$set(this.widgetForm.list[o].options.selectedMap,"label",e.selectedItem.label),this.$set(this.widgetForm.list[o].options.selectedMap,"value",e.selectedItem.value)),e.selectedItem.type&&"input"===e.selectedItem.type||(this.$set(this.models,n,e.selectedItem.value||""),this.$set(this.models,"".concat(n,"_").concat(r.a),e.selectedItem.label||""))}e.fillingRules&&e.fillingRules.length&&(e.value&&Object.keys(e.value).length?e.fillingRules.forEach((function(n){t.$set(t.models,n.toColumnName,e.value[n.fromColumnName])})):e.fillingRules.forEach((function(e){var n=t.widgetForm.list.map((function(t){if(t.model===e.toColumnName)return t.options.defaultValue})).filter((function(e){return null!=e}));n.length&&t.$set(t.models,e.toColumnName,n[0])})))},getOptionLabel:function(e,t){var n=this.columnList.find((function(e){return e.columnName===t})),o=null===e[t]||void 0===e[t]?"":e[t].toString();return"date"===n.widgetType&&(o=Object(i.f)(e[t],n.rawOptions)),"address"===n.widgetType&&(o="".concat(e[t].province||"").concat(e[t].city||"").concat(e[t].district||"").concat(e[t].details||"")),"organization"===n.widgetType&&(o="",e[t]&&Array.isArray(e[t])&&e[t].length&&e[t].forEach((function(n,r){o+="".concat(n.name).concat(r!==e[t].length-1?" > ":"")}))),"member"===n.widgetType&&(o="",e[t]&&Array.isArray(e[t])&&e[t].length&&e[t].forEach((function(n,r){o+="".concat(n.name).concat(r!==e[t].length-1?",":"")}))),o},getColumnList:function(e){var t=this;return Object(o.a)(regeneratorRuntime.mark((function n(){var o;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t.loading=!0,n.prev=1,n.next=4,Object(a.e)({formId:e});case 4:"0000"!==(o=n.sent).data.code?t.$message.error(o.data.message||"获取表单数据列表失败"):t.columnList=o.data.data,n.next=12;break;case 8:n.prev=8,n.t0=n.catch(1),t.$message.error(n.t0);case 12:return n.prev=12,t.loading=!1,n.finish(12);case 15:case"end":return n.stop()}}),n,null,[[1,8,12,15]])})))()}}}},a2b0:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=[];return function e(n){if(Array.isArray(n))for(var o=0;o<n.length;o++)e(n[o]);else n.text=n.text||"",n.data=n.data||"",t.push(n)}(e),t}},a3ea:function(e,t,n){"use strict";n("d24a")},a434:function(e,t,n){"use strict";var o=n("23e7"),r=n("da84"),i=n("23cb"),a=n("5926"),s=n("07fa"),l=n("7b0b"),c=n("65f0"),u=n("8418"),d=n("1dde")("splice"),f=r.TypeError,m=Math.max,p=Math.min;o({target:"Array",proto:!0,forced:!d},{splice:function(e,t){var n,o,r,d,h,g,v=l(this),b=s(v),y=i(e,b),_=arguments.length;if(0===_?n=o=0:1===_?(n=0,o=b-y):(n=_-2,o=p(m(a(t),0),b-y)),b+n-o>9007199254740991)throw f("Maximum allowed length exceeded");for(r=c(v,o),d=0;d<o;d++)(h=y+d)in v&&u(r,d,v[h]);if(r.length=o,n<o){for(d=y;d<b-o;d++)g=d+n,(h=d+o)in v?v[g]=v[h]:delete v[g];for(d=b;d>b-o+n;d--)delete v[d-1]}else if(n>o)for(d=b-o;d>y;d--)g=d+n-1,(h=d+o-1)in v?v[g]=v[h]:delete v[g];for(d=0;d<n;d++)v[d+y]=arguments[d+2];return v.length=b-o+n,r}})},a4b4:function(e,t,n){var o=n("342f");e.exports=/web0s(?!.*chrome)/i.test(o)},a4d3:function(e,t,n){n("d9f5"),n("b4f8"),n("c513"),n("e9c4"),n("5a47")},a5d2:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n("c243"),i=a(n("5726"));function a(e){return e&&e.__esModule?e:{default:e}}var s=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{2}$/)}},{key:"encode",value:function(){var e=r.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,i.default)(this.data,e,"01"),text:this.text}}}]),t}(a(n("e762")).default);t.default=s},a630:function(e,t,n){var o=n("23e7"),r=n("4df4");o({target:"Array",stat:!0,forced:!n("1c7e")((function(e){Array.from(e)}))},{from:r})},a640:function(e,t,n){"use strict";var o=n("d039");e.exports=function(e,t){var n=[][e];return!!n&&o((function(){n.call(null,t||function(){return 1},1)}))}},a7d7:function(e,t,n){},a87c:function(e,t,n){"use strict";n("a96f")},a91f:function(e,t,n){},a92d:function(e,t,n){},a96f:function(e,t,n){},a9e3:function(e,t,n){"use strict";var o=n("83ab"),r=n("da84"),i=n("e330"),a=n("94ca"),s=n("cb2d"),l=n("1a2d"),c=n("7156"),u=n("3a9b"),d=n("d9b5"),f=n("c04e"),m=n("d039"),p=n("241c").f,h=n("06cf").f,g=n("9bf2").f,v=n("408a"),b=n("58a8").trim,y=r.Number,_=y.prototype,w=r.TypeError,x=i("".slice),C=i("".charCodeAt),O=function(e){var t=f(e,"number");return"bigint"==typeof t?t:S(t)},S=function(e){var t,n,o,r,i,a,s,l,c=f(e,"number");if(d(c))throw w("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=b(c),43===(t=C(c,0))||45===t){if(88===(n=C(c,2))||120===n)return NaN}else if(48===t){switch(C(c,1)){case 66:case 98:o=2,r=49;break;case 79:case 111:o=8,r=55;break;default:return+c}for(a=(i=x(c,2)).length,s=0;s<a;s++)if((l=C(i,s))<48||l>r)return NaN;return parseInt(i,o)}return+c};if(a("Number",!y(" 0o1")||!y("0b1")||y("+0x1"))){for(var k,E=function(e){var t=arguments.length<1?0:y(O(e)),n=this;return u(_,n)&&m((function(){v(n)}))?c(Object(t),n,E):t},T=o?p(y):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),D=0;T.length>D;D++)l(y,k=T[D])&&!l(E,k)&&g(E,k,h(y,k));E.prototype=_,_.constructor=E,s(r,"Number",E,{constructor:!0})}},aa47:function(e,t,n){"use strict";
18
+ t.read=function(e,t,n,o,r){var i,a,s=8*r-o-1,l=(1<<s)-1,c=l>>1,u=-7,d=n?r-1:0,f=n?-1:1,m=e[t+d];for(d+=f,i=m&(1<<-u)-1,m>>=-u,u+=s;u>0;i=256*i+e[t+d],d+=f,u-=8);for(a=i&(1<<-u)-1,i>>=-u,u+=o;u>0;a=256*a+e[t+d],d+=f,u-=8);if(0===i)i=1-c;else{if(i===l)return a?NaN:1/0*(m?-1:1);a+=Math.pow(2,o),i-=c}return(m?-1:1)*a*Math.pow(2,i-o)},t.write=function(e,t,n,o,r,i){var a,s,l,c=8*i-r-1,u=(1<<c)-1,d=u>>1,f=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,m=o?0:i-1,p=o?1:-1,h=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+d>=1?f/l:f*Math.pow(2,1-d))*l>=2&&(a++,l/=2),a+d>=u?(s=0,a=u):a+d>=1?(s=(t*l-1)*Math.pow(2,r),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,r),a=0));r>=8;e[n+m]=255&s,m+=p,s/=256,r-=8);for(a=a<<r|s,c+=r;c>0;e[n+m]=255&a,m+=p,a/=256,c-=8);e[n+m-p]|=128*h}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){var n,o,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{o="function"==typeof clearTimeout?clearTimeout:a}catch(e){o=a}}();var l,c=[],u=!1,d=-1;function f(){u&&l&&(u=!1,l.length?c=l.concat(c):d=-1,c.length&&m())}function m(){if(!u){var e=s(f);u=!0;for(var t=c.length;t;){for(l=c,c=[];++d<t;)l&&l[d].run();d=-1,t=c.length}l=null,u=!1,function(e){if(o===clearTimeout)return clearTimeout(e);if((o===a||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(e);try{o(e)}catch(t){try{return o.call(null,e)}catch(t){return o.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function h(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new p(e,t)),1!==c.length||u||s(m)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=h,r.addListener=h,r.once=h,r.off=h,r.removeListener=h,r.removeAllListeners=h,r.emit=h,r.prependListener=h,r.prependOnceListener=h,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(e,t,n){"use strict";n.r(t);var o=n(6),r=n.n(o),i=n(3),a=n.n(i);function s(e){return""===e?e:"true"===e||"1"==e}var l=function(e,t){return new Promise((function(t,n){var o=new XMLHttpRequest;o.responseType="blob",o.onload=function(){var e=new FileReader;e.onloadend=function(){t(e.result)},e.readAsArrayBuffer(o.response)},o.open("GET",e),o.send()}))},c=n(9),u=function(e,t,n,o,r,i,a,s){var l,c="function"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=[],c._compiled=!0),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(e,t){return l.call(t),u(e,t)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:e,options:c}}({props:{text:{type:String,required:!0},qid:{type:String},correctLevel:{type:Number,default:1},size:{type:Number,default:200},margin:{type:Number,default:20},colorDark:{type:String,default:"#000000"},colorLight:{type:String,default:"#FFFFFF"},bgSrc:{type:String,default:void 0},background:{type:String,default:"rgba(0,0,0,0)"},backgroundDimming:{type:String,default:"rgba(0,0,0,0)"},logoSrc:{type:String,default:void 0},logoBackgroundColor:{type:String,default:"rgba(255,255,255,1)"},gifBgSrc:{type:String,default:void 0},logoScale:{type:Number,default:.2},logoMargin:{type:Number,default:0},logoCornerRadius:{type:Number,default:8},whiteMargin:{type:[Boolean,String],default:!0},dotScale:{type:Number,default:1},autoColor:{type:[Boolean,String],default:!0},binarize:{type:[Boolean,String],default:!1},binarizeThreshold:{type:Number,default:128},callback:{type:Function,default:function(){}},bindElement:{type:Boolean,default:!0},backgroundColor:{type:String,default:"#FFFFFF"},components:{default:function(){return{data:{scale:1},timing:{scale:1,protectors:!1},alignment:{scale:1,protectors:!1},cornerAlignment:{scale:1,protectors:!0}}}}},name:"vue-qr",data:function(){return{imgUrl:""}},watch:{$props:{deep:!0,handler:function(){this.main()}}},mounted:function(){this.main()},methods:{main:function(){var e=this;return r()(a.a.mark((function t(){var n,o,r,i;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.gifBgSrc){t.next=7;break}return t.next=3,l(e.gifBgSrc);case 3:return n=t.sent,o=e.logoSrc,e.render(void 0,o,n),t.abrupt("return");case 7:r=e.bgSrc,i=e.logoSrc,e.render(r,i);case 10:case"end":return t.stop()}}),t)})))()},render:function(e,t,n){var o=this;return r()(a.a.mark((function r(){var i;return a.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:i=o,new c.a({gifBackground:n,text:i.text,size:i.size,margin:i.margin,colorDark:i.colorDark,colorLight:i.colorLight,backgroundColor:i.backgroundColor,backgroundImage:e,backgroundDimming:i.backgroundDimming,logoImage:t,logoScale:i.logoScale,logoBackgroundColor:i.logoBackgroundColor,correctLevel:i.correctLevel,logoMargin:i.logoMargin,logoCornerRadius:i.logoCornerRadius,whiteMargin:s(i.whiteMargin),dotScale:i.dotScale,autoColor:s(i.autoColor),binarize:s(i.binarize),binarizeThreshold:i.binarizeThreshold,components:i.components}).draw().then((function(e){o.imgUrl=e,i.callback&&i.callback(e,i.qid)}));case 2:case"end":return r.stop()}}),r)})))()}}},(function(){var e=this.$createElement,t=this._self._c||e;return this.bindElement?t("img",{staticStyle:{display:"inline-block"},attrs:{src:this.imgUrl}}):this._e()})).exports;u.install=function(e){return e.component(u.name,u)};var d=u,f=[d];"undefined"!=typeof window&&window.Vue&&function(e){f.map((function(t){e.component(t.name,t)}))}(window.Vue),t.default=d}])},"65d8":function(e,t,n){},"65f0":function(e,t,n){var o=n("0b42");e.exports=function(e,t){return new(o(e))(0===t?0:t)}},"68ee":function(e,t,n){var o=n("e330"),r=n("d039"),i=n("1626"),a=n("f5df"),s=n("d066"),l=n("8925"),c=function(){},u=[],d=s("Reflect","construct"),f=/^\s*(?:class|function)\b/,m=o(f.exec),p=!f.exec(c),h=function(e){if(!i(e))return!1;try{return d(c,u,e),!0}catch(e){return!1}},g=function(e){if(!i(e))return!1;switch(a(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return p||!!m(f,l(e))}catch(e){return!0}};g.sham=!0,e.exports=!d||r((function(){var e;return h(h.call)||!h(Object)||!h((function(){e=!0}))||e}))?g:h},6964:function(e,t,n){var o=n("cb2d");e.exports=function(e,t,n){for(var r in t)o(e,r,t[r],n);return e}},"69f3":function(e,t,n){var o,r,i,a=n("7f9a"),s=n("da84"),l=n("e330"),c=n("861d"),u=n("9112"),d=n("1a2d"),f=n("c6cd"),m=n("f772"),p=n("d012"),h=s.TypeError,g=s.WeakMap;if(a||f.state){var v=f.state||(f.state=new g),b=l(v.get),y=l(v.has),_=l(v.set);o=function(e,t){if(y(v,e))throw new h("Object already initialized");return t.facade=e,_(v,e,t),t},r=function(e){return b(v,e)||{}},i=function(e){return y(v,e)}}else{var w=m("state");p[w]=!0,o=function(e,t){if(d(e,w))throw new h("Object already initialized");return t.facade=e,u(e,w,t),t},r=function(e){return d(e,w)?e[w]:{}},i=function(e){return d(e,w)}}e.exports={set:o,get:r,has:i,enforce:function(e){return i(e)?r(e):o(e,{})},getterFor:function(e){return function(t){var n;if(!c(t)||(n=r(t)).type!==e)throw h("Incompatible receiver, "+e+" required");return n}}}},"6b75":function(e,t,n){"use strict";function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}n.d(t,"a",(function(){return o}))},"6ba6":function(e,t,n){"use strict";function o(){return{list:[],config:{labelWidth:100,labelPosition:"right",size:"small",customClass:"",ui:"element",layout:"horizontal",labelCol:3,width:"100%",hideLabel:!1,hideErrorMessage:!1,theme:"default",themeTitle:"",themeSubTitle:"",themeTitleAlign:"left",submitHiddenArea:!1},version:1}}n.d(t,"a",(function(){return o}))},"6d18":function(e,t,n){"use strict";n("7f98")},"6d61":function(e,t,n){"use strict";var o=n("23e7"),r=n("da84"),i=n("e330"),a=n("94ca"),s=n("cb2d"),l=n("f183"),c=n("2266"),u=n("19aa"),d=n("1626"),f=n("861d"),m=n("d039"),p=n("1c7e"),h=n("d44e"),g=n("7156");e.exports=function(e,t,n){var v=-1!==e.indexOf("Map"),b=-1!==e.indexOf("Weak"),y=v?"set":"add",_=r[e],w=_&&_.prototype,x=_,C={},O=function(e){var t=i(w[e]);s(w,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(b&&!f(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return b&&!f(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(b&&!f(e))&&t(this,0===e?0:e)}:function(e,n){return t(this,0===e?0:e,n),this})};if(a(e,!d(_)||!(b||w.forEach&&!m((function(){(new _).entries().next()})))))x=n.getConstructor(t,e,v,y),l.enable();else if(a(e,!0)){var S=new x,k=S[y](b?{}:-0,1)!=S,E=m((function(){S.has(1)})),T=p((function(e){new _(e)})),D=!b&&m((function(){for(var e=new _,t=5;t--;)e[y](t,t);return!e.has(-0)}));T||((x=t((function(e,t){u(e,w);var n=g(new _,e,x);return null!=t&&c(t,n[y],{that:n,AS_ENTRIES:v}),n}))).prototype=w,w.constructor=x),(E||D)&&(O("delete"),O("has"),v&&O("get")),(D||k)&&O(y),b&&w.clear&&delete w.clear}return C[e]=x,o({global:!0,constructor:!0,forced:x!=_},C),h(x,e),b||n.setStrong(x,e,v),x}},"6d9f":function(e,t,n){},"6e14":function(e,t,n){"use strict";n("d1d2")},"6e53":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mod10=function(e){for(var t=0,n=0;n<e.length;n++){var o=parseInt(e[n]);(n+e.length)%2==0?t+=o:t+=2*o%10+Math.floor(2*o/10)}return(10-t%10)%10},t.mod11=function(e){for(var t=0,n=[2,3,4,5,6,7],o=0;o<e.length;o++){var r=parseInt(e[e.length-1-o]);t+=n[o%n.length]*r}return(11-t%11)%11}},"6f24":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i(n("4b23")),r=i(n("bb5d"));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var s=function(e){function t(e,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),/^[\x00-\x7F\xC8-\xD3]+$/.test(e))var o=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,(0,r.default)(e),n));else o=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return a(o)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(o.default);t.default=s},"6f53":function(e,t,n){var o=n("83ab"),r=n("e330"),i=n("df75"),a=n("fc6a"),s=r(n("d1e7").f),l=r([].push),c=function(e){return function(t){for(var n,r=a(t),c=i(r),u=c.length,d=0,f=[];u>d;)n=c[d++],o&&!s(r,n)||l(f,e?[n,r[n]]:r[n]);return f}};e.exports={entries:c(!0),values:c(!1)}},"6fba":function(e,t,n){"use strict";n("c2f4")},"70b0":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n("4b23"),a=(o=i)&&o.__esModule?o:{default:o},s=n("f08e");var l=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,s.B_START_CHAR+e,n))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"valid",value:function(){return new RegExp("^"+s.B_CHARS+"+$").test(this.data)}}]),t}(a.default);t.default=l},7149:function(e,t,n){"use strict";var o=n("23e7"),r=n("d066"),i=n("c430"),a=n("d256"),s=n("4738").CONSTRUCTOR,l=n("cdf9"),c=r("Promise"),u=i&&!s;o({target:"Promise",stat:!0,forced:i||s},{resolve:function(e){return l(u&&this===c?a:this,e)}})},7156:function(e,t,n){var o=n("1626"),r=n("861d"),i=n("d2bb");e.exports=function(e,t,n){var a,s;return i&&o(a=t.constructor)&&a!==n&&r(s=a.prototype)&&s!==n.prototype&&i(e,s),e}},7170:function(e,t,n){"use strict";n.r(t);n("e260"),n("d3b7"),n("e6cf"),n("3ca3"),n("ddb0");var o={computed:{componentShow:function(){return!this.printRead||"button"!==this.element.type&&"inline"!==this.element.type}}},r={name:"Card",mixins:[o],components:{BaseElementItem:function(){return Promise.resolve().then(n.bind(null,"7170"))}},props:["element","models","rules","remote","displayFields","edit","remoteOptionSource","platform","preview","containerKey","dataSourceValue","eventFunction","printRead"],data:function(){return{dataModels:this.models}},watch:{models:{deep:!0,handler:function(e){this.dataModels=e}}}},i=n("2877"),a=Object(i.a)(r,(function(){var e,t=this,n=t.$createElement,o=t._self._c||n;return t.displayFields[t.element.model]?o("el-card",{staticClass:"renderer-card",class:(e={},e[t.element.options&&t.element.options.customClass]=t.element.options&&t.element.options.customClass,e),attrs:{shadow:t.element.options.shadow}},[t.element.options&&t.element.options.showHeader?o("div",{attrs:{slot:"header"},slot:"header"},[t._v(t._s(t.element.name))]):t._e(),t._l(t.element.children,(function(e){return[t.componentShow?o("base-element-item",{key:e.key,attrs:{id:e.model,"container-key":t.containerKey,"data-source-value":t.dataSourceValue,"display-fields":t.displayFields,edit:t.edit,"event-function":t.eventFunction,models:t.dataModels,platform:t.platform,preview:t.preview,"print-read":t.printRead,remote:t.remote,"remote-option-source":t.remoteOptionSource,rules:t.rules,element:e}}):t._e()]}))],2):t._e()}),[],!1,null,null,null).exports,s={name:"Grid",mixins:[o],components:{BaseElementItem:function(){return Promise.resolve().then(n.bind(null,"7170"))}},props:["element","models","rules","remote","displayFields","edit","remoteOptionSource","platform","preview","containerKey","dataSourceValue","eventFunction","printRead"],data:function(){return{dataModels:this.models}},watch:{models:{deep:!0,handler:function(e){this.dataModels=e}}},methods:{getColSpan:function(e){return"pc"===this.platform?24/e:"pad"===this.platform?e>1?12:24:"mobile"===this.platform?24:void 0}}},l=Object(i.a)(s,(function(){var e,t=this,n=t.$createElement,o=t._self._c||n;return t.displayFields[t.element.model]?o("el-row",{staticClass:"renderer-grid-row",class:(e={},e[t.element.options&&t.element.options.customClass]=t.element.options&&t.element.options.customClass,e),attrs:{align:t.element.options.align,gutter:t.element.options.gutter||0,justify:t.element.options.justify,type:"flex"}},t._l(t.element.children,(function(e,n){var r;return o("el-col",{key:n,class:(r={},r[e.options&&e.options.customClass]=e.options&&e.options.customClass,r),attrs:{offset:e.options?e.options.offset:0,pull:e.options?e.options.pull:0,push:e.options?e.options.push:0,span:t.getColSpan(t.element.children.length||1)}},[t._l(e.children,(function(e){return[t.componentShow?o("base-element-item",{key:e.key,attrs:{"container-key":t.containerKey,"data-source-value":t.dataSourceValue,"display-fields":t.displayFields,edit:t.edit,"event-function":t.eventFunction,models:t.dataModels,platform:t.platform,preview:t.preview,"print-read":t.printRead,remote:t.remote,"remote-option-source":t.remoteOptionSource,rules:t.rules,element:e}}):t._e()]}))],2)})),1):t._e()}),[],!1,null,null,null).exports,c={name:"Report",mixins:[o],components:{BaseElementItem:function(){return Promise.resolve().then(n.bind(null,"7170"))}},props:["element","models","rules","remote","displayFields","edit","remoteOptionSource","platform","preview","containerKey","dataSourceValue","eventFunction","printRead"],data:function(){return{dataModels:this.models}},watch:{models:{deep:!0,handler:function(e){this.dataModels=this.models}}}},u=Object(i.a)(c,(function(){var e,t=this,n=t.$createElement,o=t._self._c||n;return t.displayFields[t.element.model]?o("table",{staticClass:"renderer-report",class:(e={},e[t.element.options&&t.element.options.customClass]=t.element.options&&t.element.options.customClass,e),style:{"border-top-width":t.element.options.borderWidth+"px","border-top-color":t.element.options.borderColor,"border-left-width":t.element.options.borderWidth+"px","border-left-color":t.element.options.borderColor,width:t.element.options.width||"100%"}},t._l(t.element.children,(function(e,n){return o("tr",{key:n},t._l(e.children,(function(e,r){var i;return e.options.invisible?t._e():o("td",{key:n+"-"+r,staticClass:"report-container-td",class:(i={},i[e.options.customClass]=e.options.customClass,i),style:{"border-right-width":t.element.options.borderWidth+"px","border-right-color":t.element.options.borderColor,"border-bottom-width":t.element.options.borderWidth+"px","border-bottom-color":t.element.options.borderColor,width:e.options.width,height:e.options.height},attrs:{colspan:e.options.colspan,rowspan:e.options.rowspan,valign:"top"}},[t._l(e.children,(function(e){return[t.componentShow?o("base-element-item",{key:e.key,attrs:{"container-key":t.containerKey,"data-source-value":t.dataSourceValue,"display-fields":t.displayFields,edit:t.edit,"event-function":t.eventFunction,models:t.dataModels,platform:t.platform,preview:t.preview,"print-read":t.printRead,remote:t.remote,"remote-option-source":t.remoteOptionSource,rules:t.rules,element:e}}):t._e()]}))],2)})),0)})),0):t._e()}),[],!1,null,null,null).exports,d=(n("b0c0"),{name:"tab",mixins:[o],components:{BaseElementItem:function(){return Promise.resolve().then(n.bind(null,"7170"))}},props:["element","models","rules","remote","displayFields","edit","remoteOptionSource","platform","preview","containerKey","dataSourceValue","eventFunction","printRead"],data:function(){return{dataModels:this.models,tabActive:this.element.children.length?this.element.children[0].name:""}},watch:{models:{deep:!0,handler:function(e){this.dataModels=this.models}}}}),f={name:"collapse",components:{BaseElementItem:function(){return Promise.resolve().then(n.bind(null,"7170"))}},props:["element","models","rules","remote","displayFields","edit","remoteOptionSource","platform","preview","containerKey","dataSourceValue","eventFunction","printRead"],data:function(){return{dataModels:this.models,collapseActive:this.element.children.length?this.element.children[0].name:""}},watch:{models:{deep:!0,handler:function(e){this.dataModels=this.models}}}},m={name:"Inline",components:{BaseElementItem:function(){return Promise.resolve().then(n.bind(null,"7170"))}},props:["element","models","rules","remote","displayFields","edit","remoteOptionSource","platform","preview","containerKey","dataSourceValue","eventFunction","printRead"],data:function(){return{dataModels:this.models}},watch:{models:{deep:!0,handler:function(e){this.dataModels=e}}}},p={card:a,grid:l,report:u,tabs:Object(i.a)(d,(function(){var e,t=this,n=t.$createElement,o=t._self._c||n;return t.displayFields[t.element.model]?o("el-tabs",{class:(e={},e[t.element.options.customClass]=t.element.options.customClass,e),staticStyle:{"margin-bottom":"18px"},attrs:{"tab-position":t.element.options.tabPosition,type:t.element.options.type},model:{value:t.tabActive,callback:function(e){t.tabActive=e},expression:"tabActive"}},t._l(t.element.children,(function(e){return o("el-tab-pane",{key:e.name,attrs:{label:e.name,name:e.name}},[t._l(e.children,(function(e){return[t.componentShow?o("base-element-item",{key:e.key,attrs:{"container-key":t.containerKey,"data-source-value":t.dataSourceValue,"display-fields":t.displayFields,edit:t.edit,"event-function":t.eventFunction,models:t.dataModels,platform:t.platform,preview:t.preview,"print-read":t.printRead,remote:t.remote,"remote-option-source":t.remoteOptionSource,rules:t.rules,element:e}}):t._e()]}))],2)})),1):t._e()}),[],!1,null,null,null).exports,collapse:Object(i.a)(f,(function(){var e,t=this,n=t.$createElement,o=t._self._c||n;return t.displayFields[t.element.model]?o("el-collapse",{staticClass:"renderer-collapse",class:(e={},e[t.element.options.customClass]=t.element.options.customClass,e),attrs:{accordion:t.element.options.accordion},model:{value:t.collapseActive,callback:function(e){t.collapseActive=e},expression:"collapseActive"}},t._l(t.element.children,(function(e){return o("el-collapse-item",{key:e.name,attrs:{name:e.name}},[o("div",{staticClass:"el-collapse-header-title",attrs:{slot:"title",title:e.name},slot:"title"},[t._v(t._s(e.name))]),t._l(e.children,(function(e){return[o("base-element-item",{key:e.key,attrs:{"container-key":t.containerKey,"data-source-value":t.dataSourceValue,"display-fields":t.displayFields,edit:t.edit,"event-function":t.eventFunction,models:t.dataModels,platform:t.platform,preview:t.preview,"print-read":t.printRead,remote:t.remote,"remote-option-source":t.remoteOptionSource,rules:t.rules,element:e}})]}))],2)})),1):t._e()}),[],!1,null,null,null).exports,inline:Object(i.a)(m,(function(){var e,t=this,n=t.$createElement,o=t._self._c||n;return t.displayFields[t.element.model]?o("div",{staticClass:"renderer-inline",class:(e={},e[t.element.options&&t.element.options.customClass]=t.element.options&&t.element.options.customClass,e),attrs:{shadow:t.element.options.shadow}},t._l(t.element.children,(function(e){return o("base-element-item",{key:e.key,staticClass:"item",attrs:{id:e.model,"container-key":t.containerKey,"data-source-value":t.dataSourceValue,"display-fields":t.displayFields,edit:t.edit,"event-function":t.eventFunction,models:t.dataModels,platform:t.platform,preview:t.preview,"print-read":t.printRead,remote:t.remote,"remote-option-source":t.remoteOptionSource,rules:t.rules,element:e}})})),1):t._e()}),[],!1,null,null,null).exports},h=n("5530"),g=n("1da1"),v=(n("96cf"),n("d9e2"),n("d81d"),n("b64b"),n("7db0"),n("a9e3"),{value:{type:[Number,String,Array,Object,Boolean],default:void 0},element:{type:Object,default:function(){}},models:{type:Object,default:function(){}},platform:{type:String,default:""},preview:{type:Boolean,default:!1},printRead:{type:Boolean,default:!1},edit:{type:Boolean,default:!1},remote:{type:Object,default:function(){}},remoteOptionSource:{type:Object,default:function(){return{}}},dataSourceValue:{type:Array,default:function(){return[]}},rules:{type:Object,default:function(){return{}}},eventFunction:{type:Object,default:function(){return{}}},isTable:{type:Boolean,default:!1},tableName:{type:String,default:""},isInTable:{type:Boolean,default:!1},rowIndex:{type:Number,default:0}}),b=n("5c9a"),y=n("8907"),_=(n("caad"),n("2532"),function e(t,n){return t&&t.length?t.map((function(t){return e(t[n.children],n).length?{value:t[n.value],label:t[n.label],children:e(t[n.children],n)}:{value:t[n.value],label:t[n.label]}})):[]}),w=function(e,t){return t.map((function(t){return e.options.props.children&&e.options.props.children.length&&Object.keys(t).includes(e.options.props.children)?{value:t[e.options.props.value],label:t[e.options.props.label],children:_(t[e.options.props.children],e.options.props)}:{value:t[e.options.props.value],label:t[e.options.props.label]}}))},x=function(e,t,n,o){return C.apply(this,arguments)};function C(){return(C=Object(g.a)(regeneratorRuntime.mark((function e(t,n,o,r){var i,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=[],t.options.remote===b.a.FUNCTIONS&&n[t.options.remoteFunc]&&n[t.options.remoteFunc]((function(e){i=w(t,e)})),t.options.remote===b.a.OPTION&&o[t.options.remoteOptionSource]&&(i=w(t,o[t.options.remoteOptionSource])),t.options.remote===b.a.API_DATA&&r&&(a=r.find((function(e){return e.key===t.options.remoteDataSource})),i=w(t,a.value)),e.abrupt("return",{remoteOptions:i});case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var O,S={name:"plugin",props:Object(h.a)({},v),inject:["variable","formValue","currentFormId","data"],data:function(){return{dataModel:this.value,dataModels:this.models,optionLoading:!1,optionLoadFailed:!1}},watch:{value:function(e){this.dataModel=e},dataModel:function(e){this.$emit("input",e)},remoteOptionSource:{deep:!0,handler:function(){Object.keys(this.remoteOptionSource).indexOf(this.element.options.remoteOptionSource)>=0&&this.element.options.remote!==b.a.STATIC_DATA&&"option"===this.element.options.remoteType&&(this.element.options.remoteOptions=w(this.element,this.remoteOptionSource[this.element.options.remoteOptionSource]))}},dataSourceValue:{deep:!0,handler:function(){var e=this;if(this.dataSourceValue){var t=this.dataSourceValue.find((function(t){return t.key===e.element.options.remoteDataSource}));this.element.options.remoteOptions=w(this.element,t.value)}}}},computed:{disabled:function(){return this.printRead||!this.edit||this.element.options.disabled},pluginWidth:function(){return this.isInTable?"100%":this.element.options.isWidgetWidth?"".concat(this.element.options.width,"%"):"100%"},isRemote:function(){return this.element.options.remote!==b.a.STATIC_DATA},widgetForm:function(){return this.data()}},methods:{handleOnFocus:function(){if(this.element.events&&this.element.events.onFocus){var e=this.element.events.onFocus;this.isTable&&this.tableName?this.eventFunction[e]&&this.eventFunction[e]({field:this.element.model,table:this.tableName,rowIndex:this.rowIndex}):this.eventFunction[e]&&this.eventFunction[e]({field:this.element.model})}},handleOnBlur:function(){if(this.element.events&&this.element.events.onBlur){var e=this.element.events.onBlur;this.isTable&&this.tableName?this.eventFunction[e]&&this.eventFunction[e]({field:this.element.model,table:this.tableName,rowIndex:this.rowIndex}):this.eventFunction[e]&&this.eventFunction[e]({field:this.element.model})}},getParentCode:function(e){return this.element.options.isInitNode&&this.element.options.initNode&&this.element.options.initNode.length?this.element.options.initNode[0][e]:"code"===e?this.variable.USER_REGION_CODE:this.variable.USER_REGION},handleLoadDictOptions:function(){var e=this;return Object(g.a)(regeneratorRuntime.mark((function t(){var n,o,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e.element.options.remoteOptions&&e.element.options.remoteOptions.length||e.optionLoading)){t.next=2;break}return t.abrupt("return");case 2:return e.optionLoading=!0,e.optionLoadFailed=!1,n=e.element.options.remoteOption.remoteDict,o="",r={},"dict"===n.dictDataType?o="#":"dictItem"===n.dictDataType&&(o=n.dictOptionId),t.next=10,Object(y.a)(e,{dictId:n.dictId,parentId:o});case 10:(r=t.sent).data?e.element.options.remoteOptions=r.data:e.optionLoadFailed=!0,e.optionLoading=!1;case 13:case"end":return t.stop()}}),t)})))()},onUploadSuccess:function(){if(this.element.events&&this.element.events.onUploadSuccess){var e=this.element.events.onUploadSuccess;this.eventFunction[e]&&this.eventFunction[e]()}},onUploadFileRemoved:function(e){if(this.element.events&&this.element.events.onRemoveUploadFile){var t=this.element.events.onRemoveUploadFile;this.eventFunction[t]&&this.eventFunction[t]({removedFile:e})}}}},k=S,E=Object(i.a)(k,(function(){var e=this.$createElement;return(this._self._c||e)("div")}),[],!1,null,null,null),T=E.exports,D=n("7694"),A=n("60bb"),M=n.n(A),R=n("a16a"),P={name:"renderer-input",extends:T,mixins:[R.a],methods:{queryColumns:function(e,t){var n=this;return Object(g.a)(regeneratorRuntime.mark((function o(){var r,i,a;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return r=[],i=n.element.options.relatedFormInfo.targetColumn,o.next=4,Object(D.h)({size:50,current:1,formId:n.element.options.relatedFormInfo.formId,data:[{columnName:i,operateType:"CONTAIN",value:e,valueType:"FIXED",widgetType:"input"}]});case 4:if((a=o.sent).data&&a.data.code&&"0000"===a.data.code){o.next=7;break}throw new Error(a&&a.data&&a.data.message?a.data.message:"获取表单数据列表失败");case 7:if(!a.data.data.records.length){o.next=12;break}if(!n.columnList||0!==n.columnList.length){o.next=11;break}return o.next=11,n.getColumnList(n.element.options.relatedFormInfo.formId);case 11:r=a.data.data.records.map((function(e){return Object(h.a)({value:null!==e[i]?n.getOptionLabel(e,i).substring(0,100):""},e)}));case 12:t(r);case 13:case"end":return o.stop()}}),o)})))()},selectData:function(e){if(0!==this.element.options.relatedFormInfo.dataFillRules.length){var t={value:{},fillingRules:[],selectedItem:{label:e[this.element.options.relatedFormInfo.targetColumn],value:e.ID,widgetModel:this.element.model,type:"input"}};t.fillingRules=this.element.options.relatedFormInfo.dataFillRules;var n=M.a.cloneDeep(e);this.$delete(n,"value"),t.value=n,this.fillingColumns(t)}}}},I=P,L=(n("7fbf"),Object(i.a)(I,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e.printRead?[n("div",{staticClass:"custom-input-section"},[e._v(" "+e._s(e.element.options.showPassword?"*********":e.dataModel)+" ")])]:[e.element.options.relatedFormEnabled?[e.element.options.dataTypeCheck&&"number"===e.element.options.dataType?n("el-autocomplete",{ref:"icd-form-"+e.element.model,style:{width:e.pluginWidth},attrs:{disabled:e.disabled,placeholder:e.element.options.placeholder,"show-password":e.element.options.showPassword,"fetch-suggestions":e.queryColumns,debounce:0,type:"number",maxlength:100},on:{blur:function(t){return t.stopPropagation(),e.handleOnBlur.apply(null,arguments)},focus:function(t){return t.stopPropagation(),e.handleOnFocus.apply(null,arguments)},select:e.selectData},model:{value:e.dataModel,callback:function(t){e.dataModel=e._n(t)},expression:"dataModel"}}):n("el-autocomplete",{ref:"icd-form-"+e.element.model,staticClass:"renderer-input-word-limit",style:{width:e.pluginWidth},attrs:{disabled:e.disabled,placeholder:e.element.options.placeholder,"show-password":e.element.options.showPassword,"fetch-suggestions":e.queryColumns,debounce:0,type:e.element.options.dataTypeCheck?e.element.options.dataType:"text","show-word-limit":"",maxlength:100},on:{blur:function(t){return t.stopPropagation(),e.handleOnBlur.apply(null,arguments)},focus:function(t){return t.stopPropagation(),e.handleOnFocus.apply(null,arguments)},select:e.selectData},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}})]:[e.element.options.dataTypeCheck&&"number"===e.element.options.dataType?n("el-input",{ref:"icd-form-"+e.element.model,style:{width:e.pluginWidth},attrs:{disabled:e.disabled,placeholder:e.element.options.placeholder,"show-password":e.element.options.showPassword,type:"number"},on:{blur:e.handleOnBlur,focus:e.handleOnFocus},model:{value:e.dataModel,callback:function(t){e.dataModel=e._n(t)},expression:"dataModel"}}):n("el-input",{ref:"icd-form-"+e.element.model,staticClass:"renderer-input-word-limit",style:{width:e.pluginWidth},attrs:{disabled:e.disabled,placeholder:e.element.options.placeholder,"show-password":e.element.options.showPassword,type:e.element.options.dataTypeCheck?e.element.options.dataType:"text",maxlength:"50","show-word-limit":""},on:{blur:e.handleOnBlur,focus:e.handleOnFocus},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}})]]],2)}),[],!1,null,null,null)),j=L.exports,z={name:"renderer-textarea",extends:T},F=z,B=Object(i.a)(F,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.printRead?n("div",{staticClass:"custom-textarea-section"},[e._v(" "+e._s(e.dataModel)+" ")]):n("el-input",{ref:"icd-form-"+e.element.model,style:{width:e.pluginWidth},attrs:{autosize:!!e.element.options.autosize&&{minRows:e.element.options.rows},disabled:e.disabled,placeholder:e.element.options.placeholder,rows:e.element.options.rows,type:"textarea"},on:{blur:e.handleOnBlur,focus:e.handleOnFocus},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}})}),[],!1,null,null,null),N=B.exports,V=(n("b680"),{name:"renderer-number",extends:T,computed:{digitalValue:function(){var e="",t=this.element.options.showSuffix?this.element.options.suffix:"";return isNaN(Number(this.dataModel))||(e=this.element.options.closePrecision?Number(this.dataModel)+t:Number(this.dataModel).toFixed(this.element.options.precision)+t),e},widthDisplay:function(){return this.element.options.isWidgetWidth?{width:this.element.options.width+"%"}:this.isInTable?{flex:1}:{width:"auto"}}}}),H=V,$=(n("0eba"),Object(i.a)(H,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.printRead?n("div",[e._v(" "+e._s(e.digitalValue)+" ")]):n("div",{staticClass:"number-display"},[n("el-input-number",{ref:"icd-form-"+e.element.model,style:e.widthDisplay,attrs:{controls:!e.printRead&&e.element.options.controls,"controls-position":e.element.options.controlsPosition,disabled:e.disabled,max:e.element.options.max,min:e.element.options.min,precision:e.element.options.closePrecision?void 0:e.element.options.precision,step:e.element.options.step},on:{blur:e.handleOnBlur,focus:e.handleOnFocus},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}}),e.element.options.showSuffix?n("span",{staticClass:"iss-number-unit"},[e._v(" "+e._s(e.element.options.suffix)+" ")]):e._e()],1)}),[],!1,null,null,null)),U=$.exports,W={name:"renderer-radio",extends:T,computed:{showDataModelInfo:function(){var e=this,t=this.dataModel;if(this.isRemote&&this.element.options.remoteOptions){var n=this.element.options.remoteOptions.find((function(t){return t.value===e.dataModel}));t=n?n.label:""}return t||""}},created:function(){var e=this;return Object(g.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.element.options.remote!==b.a.DICT_DATA){t.next=6;break}if(!e.element.options.remoteOption||!e.element.options.remoteOption.remoteDict){t.next=4;break}return t.next=4,e.handleLoadDictOptions();case 4:t.next=7;break;case 6:e.element.options.remoteOptions=x(e.element,e.remote,e.remoteOptionSource,e.dataSourceValue,e.edit);case 7:case"end":return t.stop()}}),t)})))()}},q=W,K=Object(i.a)(q,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.printRead?n("div",[e._v(" "+e._s(e.showDataModelInfo)+" ")]):n("div",[e.optionLoading?[n("i",{staticClass:"el-icon-loading"}),e._v(" 正在加载选项... ")]:e._e(),e.optionLoadFailed?n("div",{staticClass:"form-option-load-failed"},[n("base-icon",{attrs:{"icon-class":"information-line"}}),e._v(" 选项加载失败 "),n("el-button",{attrs:{size:"mini",type:"text"},on:{click:e.handleLoadDictOptions}},[n("base-icon",{attrs:{"icon-class":"refresh-line"}}),e._v(" 重试 ")],1)],1):e._e(),n("el-radio-group",{ref:"icd-form-"+e.element.model,style:{width:e.pluginWidth},attrs:{disabled:!e.edit||e.element.options.disabled},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}},["button"===e.element.options.optionStyle?e._l(e.isRemote?e.element.options.remoteOptions:e.element.options.options,(function(t,o){return n("el-radio-button",{key:t.value+o,style:{display:"inline-block"},attrs:{label:t.value}},[e._v(" "+e._s(t.label)+" ")])})):e._l(e.isRemote?e.element.options.remoteOptions:e.element.options.options,(function(t,o){return n("el-radio",{key:t.value+o,style:{display:"mobile"===e.platform&&"border"===e.element.options.optionStyle?"block":e.element.options.inline?"inline-block":"block"},attrs:{border:"border"===e.element.options.optionStyle,label:t.value}},[e._v(" "+e._s(t.label)+" ")])}))],2)],2)}),[],!1,null,null,null),G=K.exports,Y={name:"renderer-checkbox",extends:T,created:function(){var e=this;return Object(g.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.element.options.remote!==b.a.DICT_DATA){t.next=6;break}if(!e.element.options.remoteOption||!e.element.options.remoteOption.remoteDict){t.next=4;break}return t.next=4,e.handleLoadDictOptions();case 4:t.next=7;break;case 6:e.element.options.remoteOptions=x(e.element,e.remote,e.remoteOptionSource,e.dataSourceValue,e.edit);case 7:"checkbox"!==e.element.type||e.dataModel||(e.dataModel=[]);case 8:case"end":return t.stop()}}),t)})))()}},X=Y,J=Object(i.a)(X,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.printRead?n("div",[e.isRemote?[e._v(" "+e._s(e.dataModel&&e.dataModel.map((function(t){return e.element.options.remoteOptions.find((function(e){return e.value===t}))&&e.element.options.remoteOptions.find((function(e){return e.value===t})).label})).join("、")||"")+" ")]:[e._v(" "+e._s(e.dataModel&&e.dataModel.map((function(t){return e.element.options.options.find((function(e){return e.value===t}))&&e.element.options.options.find((function(e){return e.value===t})).label})).join("、")||"")+" ")]],2):n("div",[e.optionLoading?[n("i",{staticClass:"el-icon-loading"}),e._v(" 正在加载选项... ")]:e._e(),e.optionLoadFailed?n("div",{staticClass:"form-option-load-failed"},[n("base-icon",{attrs:{"icon-class":"information-line"}}),e._v(" 选项加载失败 "),n("el-button",{attrs:{size:"mini",type:"text"},on:{click:e.handleLoadDictOptions}},[n("base-icon",{attrs:{"icon-class":"refresh-line"}}),e._v(" 重试 ")],1)],1):e._e(),n("el-checkbox-group",{ref:"icd-form-"+e.element.model,style:{width:e.pluginWidth},attrs:{disabled:!e.edit||e.element.options.disabled},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}},["button"===e.element.options.optionStyle?e._l(e.isRemote?e.element.options.remoteOptions:e.element.options.options,(function(t,o){return n("el-checkbox-button",{key:t.value+o,style:{display:"inline-block"},attrs:{label:t.value}},[e._v(" "+e._s(t.label)+" ")])})):e._l(e.isRemote?e.element.options.remoteOptions:e.element.options.options,(function(t,o){return n("el-checkbox",{key:t.value+o,style:{display:"mobile"===e.platform&&"border"===e.element.options.optionStyle?"block":e.element.options.inline?"inline-block":"block"},attrs:{border:"border"===e.element.options.optionStyle,label:t.value}},[e._v(" "+e._s(t.label)+" ")])}))],2)],2)}),[],!1,null,null,null),Q=J.exports,Z={name:"renderer-time",extends:T},ee=Z,te=Object(i.a)(ee,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.printRead?n("div",[e._v(" "+e._s(e.dataModel)+" ")]):n("div",[n("el-time-picker",{ref:"icd-form-"+e.element.model,style:{width:e.pluginWidth},attrs:{arrowControl:e.element.options.arrowControl,clearable:e.element.options.clearable,disabled:!e.edit||e.element.options.disabled,editable:e.element.options.editable,"end-placeholder":e.element.options.endPlaceholder,"is-range":e.element.options.isRange,placeholder:e.element.options.placeholder,readonly:e.element.options.readonly,"start-placeholder":e.element.options.startPlaceholder,"value-format":e.element.options.format},on:{blur:e.handleOnBlur,focus:e.handleOnFocus},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}})],1)}),[],!1,null,null,null),ne=te.exports,oe=(n("ac1f"),n("5319"),n("c740"),n("c32d")),re=n.n(oe),ie={props:{platform:{type:String,default:"mobile"},value:{type:[String,Number],default:""},format:{type:String,default:""},type:{type:String,default:""},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},filterable:{type:Boolean,default:!1},placeholder:{type:String,default:""},printRead:{default:!1}},data:function(){return{show:!1,currentDate:new Date,minDate:new Date("/1920/01/01"),maxDate:new Date("/2120/11/01"),defaultIndex:0,currentYear:(new Date).getFullYear()+""}},computed:{formatValue:function(){if(this.value){var e=this.format.replace("yyyy","YYYY").replace("dd","DD");return re()(this.value).format(e)}return""},modelValue:{get:function(){return this.value},set:function(e){this.$emit("input",e)}},yearList:function(){for(var e=[],t=this.minDate.getFullYear(),n=this.maxDate.getFullYear(),o=t;o<n+1;o++)e.push(o+"");return e}},methods:{openPopup:function(){var e=this;if(!this.disabled){if("year"===this.type)if(this.value){var t=new Date(this.value).getFullYear(),n=this.yearList.findIndex((function(e){return e===t+""}));this.defaultIndex=-1!==n?n:0}else{var o=this.yearList.findIndex((function(t){return t===e.currentYear}));this.defaultIndex=-1!==o?o:0}else this.currentDate=this.value?new Date(this.value):new Date;this.show=!0}},clearValue:function(){this.currentDate=new Date,this.modelValue=""},handleOnBlur:function(){this.$emit("blur")},handleOnFocus:function(){this.$emit("focus")},formatter:function(e,t){return"year"===e?"".concat(t,"年"):"month"===e?"".concat(t,"月"):"day"===e?"".concat(t,"日"):"hour"===e?"".concat(t,"时"):"minute"===e?"".concat(t,"分"):t},onFinish:function(e){"year"===this.type?this.modelValue=new Date(e,0,1,0,0,0,0).getTime():this.modelValue=e.getTime(),this.show=!1}}},ae=ie,se=Object(i.a)(ae,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e.printRead?[e._v(e._s(e.formatValue))]:[n("div",{on:{click:e.openPopup}},[n("el-input",{attrs:{placeholder:e.placeholder,readonly:"",clearable:""},on:{blur:e.handleOnBlur,focus:e.handleOnFocus},model:{value:e.formatValue,callback:function(t){e.formatValue=t},expression:"formatValue"}},[e.clearable&&e.formatValue?n("i",{staticClass:"el-icon-circle-close",attrs:{slot:"suffix"},on:{click:function(t){return t.stopPropagation(),t.preventDefault(),e.clearValue.apply(null,arguments)}},slot:"suffix"}):e._e()])],1)],n("van-popup",{attrs:{round:"",position:"bottom"},model:{value:e.show,callback:function(t){e.show=t},expression:"show"}},["year"!==e.type?n("van-datetime-picker",{attrs:{type:"month"===e.type?"year-month":e.type,title:"请选择",formatter:e.formatter,minDate:e.minDate,maxDate:e.maxDate},on:{confirm:e.onFinish,cancel:function(t){e.show=!1}},model:{value:e.currentDate,callback:function(t){e.currentDate=t},expression:"currentDate"}}):n("van-picker",{attrs:{title:"请选择","show-toolbar":"",columns:e.yearList,"default-index":e.defaultIndex,teleport:"body"},on:{confirm:e.onFinish,cancel:function(t){e.show=!1}}})],1)],2)}),[],!1,null,"7dc69ab5",null),le=se.exports,ce={name:"renderer-date",extends:T,components:{CustomMobileDate:le},mounted:function(){!this.element.options.useDynamicValue||this.element.options.hidden||this.printRead||this.dataModel||(this.dataModel=(new Date).getTime())}},ue=ce,de=Object(i.a)(ue,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return"mobile"===e.platform?n("custom-mobile-date",{attrs:{"print-read":e.printRead,disabled:e.printRead||!e.edit||e.element.options.disabled,clearable:e.element.options.clearable,placeholder:e.element.options.placeholder,format:"custom"===e.element.options.format?e.element.options.customFormat:e.element.options.format,type:e.element.options.type},on:{blur:e.handleOnBlur,focus:e.handleOnFocus},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}}):n("el-date-picker",{ref:"icd-form-"+e.element.model,style:{width:e.pluginWidth},attrs:{clearable:e.element.options.clearable,disabled:e.disabled,editable:e.element.options.editable,"end-placeholder":e.element.options.endPlaceholder,format:"custom"===e.element.options.format?e.element.options.customFormat:e.element.options.format,placeholder:e.element.options.placeholder,readonly:e.element.options.readonly,"start-placeholder":e.element.options.startPlaceholder,type:e.element.options.type,"value-format":"timestamp"},on:{blur:e.handleOnBlur,focus:e.handleOnFocus},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}})}),[],!1,null,null,null),fe=de.exports,me={name:"renderer-rate",extends:T},pe=me,he=Object(i.a)(pe,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("el-rate",{ref:"icd-form-"+e.element.model,style:e.element.options.clearable?"float:left":"",attrs:{"allow-half":e.element.options.allowHalf,disabled:e.disabled,"icon-classes":["ri-star-fill","ri-star-fill","ri-star-fill"],max:e.element.options.max,"score-template":"{value}"+e.element.options.suffix,"show-score":e.element.options.showScore,"disabled-void-icon-class":"ri-star-fill","void-icon-class":"ri-star-line"},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}}),e.element.options.clearable?n("el-link",{staticStyle:{float:"left","margin-left":"1rem"},attrs:{underline:!1,type:"primary"},on:{click:function(t){e.dataModel=0}}},[e._v("清空")]):e._e()],1)}),[],!1,null,null,null),ge=he.exports,ve=n("f73f"),be=n("d9c2"),ye={name:"renderer-select",extends:T,components:{CustomSelectComponent:ve.a,CustomMobileSelect:be.a},created:function(){var e=this;return Object(g.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.element.options.remote!==b.a.DICT_DATA){t.next=6;break}if(!e.element.options.remoteOption||!e.element.options.remoteOption.remoteDict){t.next=4;break}return t.next=4,e.handleLoadDictOptions();case 4:t.next=7;break;case 6:e.element.options.remoteOptions=x(e.element,e.remote,e.remoteOptionSource,e.dataSourceValue,e.edit);case 7:case"end":return t.stop()}}),t)})))()}},_e=ye,we=Object(i.a)(_e,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.printRead?n("div",[e.isRemote?[e._v(" "+e._s(("object"==typeof e.dataModel&&e.dataModel?e.dataModel.map((function(t){return e.element.options.remoteOptions.find((function(e){return e.value===t}))&&e.element.options.remoteOptions.find((function(e){return e.value===t})).label})).join("、"):e.element.options.remoteOptions.find((function(t){return t.value===e.dataModel}))&&e.element.options.remoteOptions.find((function(t){return t.value===e.dataModel})).label)||"")+" ")]:[e._v(" "+e._s(("object"==typeof e.dataModel&&e.dataModel?e.dataModel.map((function(t){return e.element.options.options.find((function(e){return e.value===t}))&&e.element.options.options.find((function(e){return e.value===t})).label})).join("、"):e.element.options.options.find((function(t){return t.value===e.dataModel}))&&e.element.options.options.find((function(t){return t.value===e.dataModel})).label)||"")+" ")]],2):n("div",["mobile"===e.platform?n("custom-mobile-select",{ref:"icd-form-"+e.element.model,attrs:{multiple:e.element.options.multiple,options:e.isRemote?e.element.options.remoteOptions:e.element.options.options,disabled:!e.edit||e.element.options.disabled,clearable:e.element.options.clearable,filterable:e.element.options.filterable,"is-show-label-val":!0},on:{blur:e.handleOnBlur,focus:e.handleOnFocus},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}}):n("custom-select-component",{ref:"icd-form-"+e.element.model,style:{width:e.pluginWidth},attrs:{clearable:e.element.options.clearable,"custom-multiple":e.element.options.multiple,disabled:!e.edit||e.element.options.disabled,filterable:e.element.options.filterable,loading:e.optionLoading,placeholder:e.element.options.placeholder,"loading-text":"正在加载选项",multiple:""},on:{blur:e.handleOnBlur,focus:e.handleOnFocus},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}},e._l(e.isRemote?e.element.options.remoteOptions:e.element.options.options,(function(e,t){return n("el-option",{key:e.id||e.value+t,attrs:{label:e.label,value:e.value}})})),1),e.optionLoadFailed?n("div",{staticClass:"form-option-load-failed"},[n("base-icon",{attrs:{"icon-class":"information-line"}}),e._v(" 选项加载失败 "),n("el-button",{attrs:{size:"mini",type:"text"},on:{click:e.handleLoadDictOptions}},[n("base-icon",{attrs:{"icon-class":"refresh-line"}}),e._v(" 重试 ")],1)],1):e._e()],1)}),[],!1,null,null,null),xe=we.exports,Ce={name:"renderer-switches",extends:T},Oe=Ce,Se=Object(i.a)(Oe,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.printRead?n("div",[e._v(" "+e._s(!0===e.dataModel?e.element.options.activeText||"是":!1===e.dataModel?e.element.options.inactiveText||"否":"")+" ")]):n("div",[n("el-switch",{ref:"icd-form-"+e.element.model,attrs:{"active-text":e.element.options.activeText,disabled:!e.edit||e.element.options.disabled,"inactive-text":e.element.options.inactiveText},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}})],1)}),[],!1,null,null,null),ke=Se.exports,Ee={name:"renderer-slider",extends:T},Te=Ee,De=Object(i.a)(Te,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.printRead?n("div",[e._v(" "+e._s(e.dataModel+e.element.options.suffix)+" ")]):n("el-slider",{ref:"icd-form-"+e.element.model,style:{width:e.pluginWidth},attrs:{disabled:e.disabled,"format-tooltip":function(t){return t+e.element.options.suffix},max:e.element.options.max,min:e.element.options.min,range:e.element.options.range,"show-input":e.element.options.showInput,step:e.element.options.step},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}})}),[],!1,null,null,null),Ae=De.exports,Me={name:"renderer-editor",extends:T,components:{RichEditor:n("0a4d").a}},Re=Object(i.a)(Me,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("rich-editor",{ref:"icd-form-"+e.element.model,attrs:{"custom-style":{width:e.pluginWidth,cursor:!e.edit||e.element.options.disabled?"no-drop":"",backgroundColor:!e.edit||e.element.options.disabled?"#F5F7FA":""},disabled:e.disabled,placeholder:e.element.options.placeholder,readonly:!0},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}})}),[],!1,null,null,null).exports,Pe={name:"renderer-organization",extends:T,components:{OrganizationSelector:n("9a01").a}},Ie=Object(i.a)(Pe,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.printRead?n("div",[e._v(" "+e._s(e.dataModel&&e.dataModel.map((function(e){return e.name})).join("、")||"")+" ")]):n("div",[n("organization-selector",{ref:"icd-form-"+e.element.model,attrs:{"dialog-title":"选择"+("ORGAN"===e.element.options.optionScopeType?"组织机构":"人员"),"custom-style":{width:e.pluginWidth},disabled:e.disabled,multiple:e.element.options.multiple,"parent-code":e.getParentCode("code"),"parent-name":e.getParentCode("name"),"option-scope-type":e.element.options.optionScopeType,placeholder:e.element.options.placeholder,platform:e.platform},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}})],1)}),[],!1,null,null,null).exports,Le={name:"renderer-member",extends:Ie},je=Object(i.a)(Le,void 0,void 0,!1,null,null,null).exports,ze=(n("99af"),n("a15b"),n("e2e6")),Fe={name:"renderer-cascader",extends:T,inject:["formValue"],components:{},computed:{showText:function(){return this.formValue["".concat(this.element.model,"_").concat(ze.a)]||this.showSelectLabel||""}},watch:{printRead:{deep:!0,immediate:!0,handler:(O=Object(g.a)(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=4;break}this.getCascaderPrintValue(),e.next=11;break;case 4:if(this.element.options.remote!==b.a.DICT_DATA||!this.element.options.remoteOption||!this.element.options.remoteOption.remoteDict){e.next=11;break}if(!this.edit){e.next=11;break}return e.next=8,this.handleLoadDictOptions();case 8:return this.options=this.element.options.remoteOptions,e.next=11,this.loadCascaderOptions();case 11:case"end":return e.stop()}}),e,this)}))),function(e){return O.apply(this,arguments)})}},data:function(){return{selectionTypeSuffix:ze.a,DATASOURCE_TYPE:b.a,printValue:"",options:[],optionLoading:!1,optionLoadFailed:!1,showSelectLabel:""}},created:function(){var e=this;return Object(g.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.element.options.remote!==b.a.DICT_DATA||!e.element.options.remoteOption||!e.element.options.remoteOption.remoteDict){t.next=7;break}if(!e.edit){t.next=7;break}return t.next=4,e.handleLoadDictOptions();case 4:return e.options=e.element.options.remoteOptions,t.next=7,e.loadCascaderOptions();case 7:case"end":return t.stop()}}),t)})))()},methods:{loadCascaderOptions:function(){var e=this;return Object(g.a)(regeneratorRuntime.mark((function t(){var n,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e.dataModel&&e.dataModel.length&&e.options&&e.options.length)){t.next=6;break}return n=e.options.findIndex((function(t){return t.value===e.dataModel[0]})),t.next=4,e.getChildren(e.options[n],1,e.dataModel);case 4:(o=t.sent)&&o.length?e.$set(e.options[n],"children",o):e.$set(e.options[n],"leaf",!0);case 6:case"end":return t.stop()}}),t)})))()},getChildren:function(e,t,n){var o=this;return Object(g.a)(regeneratorRuntime.mark((function r(){var i,a;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,o.loadDictOption(e);case 2:if(!((i=r.sent)&&i.length&&t<n.length)){r.next=11;break}return a=i.findIndex((function(e){return e.value===n[t]})),r.t0=o,r.t1=i[a],r.next=9,o.getChildren(i[a],t+1,n);case 9:r.t2=r.sent,r.t0.$set.call(r.t0,r.t1,"children",r.t2);case 11:return r.abrupt("return",i);case 12:case"end":return r.stop()}}),r)})))()},loadDictOption:function(e){var t=this;return Object(g.a)(regeneratorRuntime.mark((function n(){var o;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t.loading=!0,n.prev=1,n.next=4,Object(y.a)(t,{dictId:e.dictId,parentId:e.id});case 4:return(o=n.sent).data&&o.data.length&&(o.data=o.data.map((function(e){return Object(h.a)(Object(h.a)({},e),{},{leaf:"0"===e.hasChild})}))),n.abrupt("return",o.data);case 9:return n.prev=9,n.t0=n.catch(1),t.$message.error(n.t0),n.abrupt("return",null);case 13:return n.prev=13,t.loading=!1,n.finish(13);case 16:case"end":return n.stop()}}),n,null,[[1,9,13,16]])})))()},cascaderLazyLoad:function(e,t){var n=this;return Object(g.a)(regeneratorRuntime.mark((function o(){var r;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(!e.root){o.next=3;break}return t(),o.abrupt("return");case 3:return o.next=5,Object(y.a)(n,{dictId:e.data.dictId,parentId:e.data.id});case 5:(r=o.sent).data?t(r.data):n.optionLoadFailed=!0;case 7:case"end":return o.stop()}}),o)})))()},onCascaderChange:function(e){var t=this;e&&this.$nextTick((function(){var e=t.$refs["icd-form-".concat(t.element.model)];t.showSelectLabel=e?e.presentText:"",t.$parent&&t.$parent.clearValidate&&t.$parent.clearValidate(),t.$parent&&t.$parent.$parent&&t.$parent.$parent.$refs.BaseElementItem&&t.$parent.$parent.$refs.BaseElementItem.clearValidate()}))},getCascaderPrintValue:function(){if(this.isInTable){if(this.formValue[this.tableName]){var e=this.formValue[this.tableName][this.rowIndex];this.printValue=(e["".concat(this.element.model,"_").concat(ze.a)]||[]).join(" / ")}}else if(void 0!==this.formValue["".concat(this.element.model,"_").concat(ze.a)])this.printValue=(this.formValue["".concat(this.element.model,"_").concat(ze.a)]||[]).join(" / ");else if(this.$refs["icd-form-".concat(this.element.model)]){var t=this.$refs["icd-form-".concat(this.element.model)].getCheckedNodes(),n=t&&t.length?t[0].pathLabels:[];this.printValue=this.isRemote?n.join(" / "):this.dataModel.join(" / ")}}}},Be=Object(i.a)(Fe,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.printRead?n("div",[e._v(e._s(e.printValue))]):n("div",[n("el-cascader",{ref:"icd-form-"+e.element.model,style:{width:e.element.options.isWidgetWidth?e.element.options.width+"%":"100%"},attrs:{clearable:e.element.options.clearable,disabled:e.disabled,filterable:e.element.options.filterable,loading:e.optionLoading,options:e.isRemote?e.options:e.element.options.options,placeholder:e.element.options.placeholder,props:{lazy:e.isRemote,lazyLoad:e.cascaderLazyLoad,checkStrictly:e.element.options.checkStrictly},"collapse-tags":"","loading-text":"正在加载选项"},on:{blur:e.handleOnBlur,change:e.onCascaderChange,focus:e.handleOnFocus},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}}),e.optionLoadFailed?n("div",{staticClass:"form-option-load-failed"},[n("base-icon",{attrs:{"icon-class":"information-line"}}),e._v(" 选项加载失败 "),n("el-button",{attrs:{size:"mini",type:"text"},on:{click:e.handleLoadDictOptions}},[n("base-icon",{attrs:{"icon-class":"refresh-line"}}),e._v(" 重试 ")],1)],1):e._e()],1)}),[],!1,null,null,null).exports,Ne={name:"renderer-upload",extends:T,components:{UploadComponent:n("c1ea").a}},Ve=Object(i.a)(Ne,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("upload-component",{ref:"icd-form-"+e.element.model,style:{width:e.pluginWidth},attrs:{disabled:!e.edit||e.element.options.disabled,limit:e.element.options.limit,multiple:e.element.options.multiple,"print-read":e.printRead,size:e.element.options.size,tip:e.element.options.tip,"is-batch-download":e.element.options.isBatchDownload,searchable:e.element.options.searchable},on:{onSuccess:e.onUploadSuccess,onRemove:e.onUploadFileRemoved},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}})}),[],!1,null,null,null).exports,He={name:"renderer-imageUpload",extends:T,components:{UploadImageComponent:n("7afc").a}},$e=Object(i.a)(He,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("upload-image-component",{ref:"icd-form-"+e.element.model,style:{width:e.pluginWidth},attrs:{disabled:!e.edit||e.element.options.disabled,limit:e.element.options.limit,multiple:e.element.options.multiple,"print-read":e.printRead,size:e.element.options.size,tip:e.element.options.tip},on:{onSuccess:e.onUploadSuccess,onRemove:e.onUploadFileRemoved},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}})}),[],!1,null,null,null).exports,Ue={name:"renderer-uuid",extends:T,components:{UuidComponent:n("b3da").a}},We=Object(i.a)(Ue,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("uuid-component",{ref:"icd-form-"+e.element.model,attrs:{"custom-style":{width:e.pluginWidth},"print-read":e.printRead},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}})}),[],!1,null,null,null).exports,qe={name:"renderer-sequence",extends:T},Ke=Object(i.a)(qe,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.currentFormId&&e.currentFormId.length?n("div",{ref:"icd-form-"+e.element.model},[e.printRead?[e._v(e._s(e.dataModel))]:n("el-input",{attrs:{value:e.dataModel&&e.dataModel.length?e.dataModel.toString():"仅限编辑和详情页面展示",disabled:""}})],2):n("div",[e._v("仅限编辑和详情页面展示")])}),[],!1,null,null,null).exports,Ge={name:"renderer-address",extends:T,components:{AddressComponent:n("ce9d").a}},Ye=Object(i.a)(Ge,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("address-component",{ref:"icd-form-"+e.element.model,attrs:{disabled:e.element.options.disabled||!e.edit,"is-address-detail":e.element.options.isAddressDetail,"print-read":e.printRead,platform:e.platform},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}})}),[],!1,null,null,null).exports,Xe={name:"renderer-relatedForm",extends:T,components:{RelatedForm:n("40e3").a}},Je=Object(i.a)(Xe,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("related-form",{ref:"icd-form-"+e.element.model,attrs:{clearable:e.element.options.clearable,disabled:e.disabled,models:e.dataModels,placeholder:e.element.options.placeholder,"print-read":e.printRead,widget:e.element,platform:e.platform},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}})}),[],!1,null,null,null).exports,Qe=n("2909"),Ze=(n("159b"),n("2b3d"),n("9861"),n("4de4"),n("a434"),n("fb6a"),n("ec26")),et=n("7461"),tt={add:{label:"新增",value:"add",icon:"add-line"},remove:{label:"删除",value:"remove",icon:"delete-bin-4-fill"},removeList:{label:"批量删除",value:"removeList",icon:"delete-bin-4-fill"},copy:{label:"复制",value:"copy",icon:"file-copy-fill"},upload:{label:"导入",value:"upload",icon:"download-2-line"},download:{label:"导出",value:"download",icon:"upload-2-line"},moveUp:{label:"上移",value:"moveUp",icon:"arrow-up-line"},moveDown:{label:"下移",value:"moveDown",icon:"arrow-down-line"},cancel:{label:"取消",value:"cancel",icon:"close-circle-fill"}},nt={name:"TableItem",props:["element","value","models","remote","isTable","isInTable","disabled","edit","remoteOptionSource","rules","platform","preview","dataSourceValue","eventFunction","rowIndex","tableName","printRead","scopeRowData"],data:function(){return{Elements:zt,dataModel:this.value}},watch:{value:function(e){this.dataModel=e},dataModel:function(e){this.$emit("input",e),this.isTable&&this.tableName&&this.$emit("on-table-change",{value:e,field:this.element.model,table:this.tableName,rowIndex:this.rowIndex,haveEvent:this.element.events&&this.element.events.onChange})}}},ot=Object(i.a)(nt,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:{"print-read-mode":e.printRead}},[n(e.Elements[e.element.type],{tag:"component",attrs:{element:e.element,platform:e.platform,preview:e.preview,"print-read":e.printRead,edit:e.edit,"row-index":e.rowIndex,"table-name":e.tableName,isInTable:e.isInTable,isTable:e.isTable,scopeRowData:e.scopeRowData,remote:e.remote,"remote-option-source":e.remoteOptionSource,rules:e.rules},model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}})],1)}),[],!1,null,null,null).exports,rt={name:"StepOne",components:{BaseIcon:et.a},inject:{currentFormId:{default:""},formPublishVersionId:{default:""}},props:{widgetKey:{type:String,default:""},widgetName:{type:String,default:null}},data:function(){return{loading:!1,fileList:[],result:{state:!1,message:"处理失败"},fileName:""}},methods:{handleChange:function(e,t){this.$refs.upload.clearFiles(),this.fileList=t},handleUpload:function(){var e=this;return Object(g.a)(regeneratorRuntime.mark((function t(){var n,o,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((n=e.fileList[0].raw).size/1024/1024<1){t.next=4;break}return e.$message.error("上传文件大小不能超过 1MB!"),t.abrupt("return");case 4:return e.loading=!0,e.$emit("onUpload"),(o=new FormData).append("file",n),o.append("formId",e.currentFormId),t.prev=9,t.next=12,Object(D.q)(o);case 12:if("0000"!==(r=t.sent).data.code){t.next=20;break}return e.fileName=r.data.data,t.next=17,e.handleImport();case 17:e.$emit("onNext",e.result),t.next=22;break;case 20:e.$message.error(r.data.message);case 22:t.next=27;break;case 24:t.prev=24,t.t0=t.catch(9),e.$message.error(t.t0.message);case 27:return t.prev=27,e.loading=!1,e.$emit("onUploadEnd"),e.fileList=[],t.finish(27);case 32:case"end":return t.stop()}}),t,null,[[9,24,27,32]])})))()},handleImport:function(){var e=this;return Object(g.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.processing=!0,t.prev=1,t.next=4,Object(D.b)({fileName:e.fileName,formId:e.currentFormId,previewFlag:!0,tableWidgetKey:e.widgetKey,versionId:e.formPublishVersionId}).then((function(t){e.result.state="0000"===t.data.code,e.result.message=t.data.message||("0000"===t.data.code?"处理成功":"处理失败"),e.result.data=t.data.data})).catch((function(t){e.result.state=!1,e.result.message=t.message||t.data.message}));case 4:t.next=10;break;case 6:t.prev=6,t.t0=t.catch(1),e.result.state=!1,e.result.message=t.t0.message;case 10:return t.prev=10,e.processing=!1,t.finish(10);case 13:case"end":return t.stop()}}),t,null,[[1,6,10,13]])})))()},downloadModel:function(){var e=this;return Object(g.a)(regeneratorRuntime.mark((function t(){var n,o,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.$emit("onUpload"),e.loading=!0,t.prev=2,t.next=5,Object(D.d)({formId:e.currentFormId,tableWidgetKey:e.widgetKey});case 5:(n=t.sent).data?(o=window.URL.createObjectURL(new Blob([n.data],{type:"application/vnd.ms-excel"})),(r=document.createElement("a")).href=o,r.setAttribute("download","".concat(e.widgetName?e.widgetName:"","_").concat(e.widgetKey,"_导入模板.xlsx")),document.body.appendChild(r),r.click()):e.$message.error(n.data.message||"下载子表单导出模板失败"),t.next=13;break;case 9:t.prev=9,t.t0=t.catch(2),e.$message.error(t.t0);case 13:return t.prev=13,e.loading=!1,e.$emit("onUploadEnd"),t.finish(13);case 17:case"end":return t.stop()}}),t,null,[[2,9,13,17]])})))()}}},it=(n("9ee4"),Object(i.a)(rt,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"step-one-container"},[n("div",{staticClass:"row-item opt-top-bar"},[e._v(" 为了保证数据导入顺利,推荐您下载使用导入模版,并按照规范示例录入数据 "),n("el-button",{attrs:{size:"mini",type:"primary"},on:{click:e.downloadModel}},[e._v("下载导入模板")])],1),n("div",{staticClass:"row-item upload-bar"},[n("el-upload",{ref:"upload",staticClass:"upload-excel",attrs:{"http-request":e.handleUpload,multiple:!1,"on-change":e.handleChange,"show-file-list":!1,accept:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel,.xlsx,.xls",action:"",drag:""}},[n("base-icon",{staticClass:"el-icon-upload",attrs:{"icon-class":"upload-2-line"}}),n("div",{staticClass:"el-upload__text"},[e._v(" 将文件拖到此处,或 "),n("em",[e._v("点击上传")])])],1)],1),e._m(0)])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row-item note-bar"},[t("ul",{staticClass:"upload-info"},[t("li",[this._v("支持 1MB 以内的xlsx格式文件")]),t("li",[this._v("导入文件第一、第二行表头(默认隐藏)不允许修改或删除")]),t("li",[this._v("导入文件中,数据不可存在空行")]),t("li",[this._v("导入文件中,如某项数据不符合设定表单中组件的校验规则,则存入系统值为空。如:必填项,长度,字典选项等")])])])}],!1,null,"d9d74232",null).exports),at={name:"StepTwo",props:{displayData:{type:Object,default:null}},data:function(){return{status:"success",statusMap:{success:"导入成功",warning:"部分导入成功",error:"导入失败"}}},mounted:function(){this.status=this.displayData&&this.displayData.state?"success":"error"}},st={name:"DataImport",components:{StepTwo:Object(i.a)(at,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"step-two-container"},[n("el-result",{attrs:{icon:e.status,title:e.statusMap[e.status]}},["success"!==e.status?n("template",{slot:"subTitle"},[e._v(" "+e._s(e.displayData&&e.displayData.message)+" ")]):n("template",{slot:"subTitle"},[e._v(" 成功导入数据 : "+e._s(e.displayData&&e.displayData.data&&e.displayData.data.successCount)+"条 ")])],2)],1)}),[],!1,null,null,null).exports,StepOne:it},inject:["currentFormId"],props:{isDisplay:{type:Boolean,default:!1},widgetKey:{type:String,default:""},widgetName:{type:String,default:null}},model:{prop:"isDisplay",event:"change"},data:function(){return{loading:!1,activeStep:0,uploadResData:null}},methods:{onNext:function(e){this.activeStep+=1,this.uploadResData=e,this.loading=!1}}},lt=(n("b8b3"),Object(i.a)(st,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-dialog",{attrs:{"close-on-click-modal":!1,"close-on-press-escape":!1,visible:e.isDisplay,"append-to-body":"","custom-class":"data-import-container",title:"批量导入"},on:{close:function(t){return e.$emit("onClose")}}},[n("div",{staticClass:"header"},[n("el-steps",{attrs:{active:e.activeStep,"align-center":"","finish-status":"success"}},[n("el-step",{attrs:{title:"数据上传"}}),n("el-step",{attrs:{title:"完成"}})],1)],1),n("div",{staticClass:"body"},[0===e.activeStep?n("step-one",{attrs:{"widget-key":e.widgetKey,"widget-name":e.widgetName},on:{onNext:e.onNext,onUpload:function(t){e.loading=!0},onUploadEnd:function(t){e.loading=!1}}}):e._e(),1===e.activeStep?n("step-two",{attrs:{"display-data":e.uploadResData}}):e._e()],1),n("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:function(t){return e.$emit("onClose")}}},[e._v("取消")]),e.activeStep>0?n("el-button",{on:{click:function(t){e.activeStep-=1}}},[e._v("上一步")]):e._e(),1===e.activeStep?n("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.$emit("onComplete",e.uploadResData)}}},[e._v("完成")]):e._e()],1)])}),[],!1,null,null,null).exports),ct={name:"TableLayout"},ut=Object(i.a)(ct,(function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"table-layout-container"},[t("div",{staticClass:"absolute-header"},[this._t("absoluteHeader")],2),t("div",{staticClass:"table-layout-container-item header"},[t("div",{staticClass:"header-item left"},[this._t("headerLeft")],2),t("div",{staticClass:"header-item right"},[this._t("headerRight")],2)]),t("div",{staticClass:"table-layout-container-item body"},[this._t("body")],2),t("div",{staticClass:"table-layout-container-item col-footer"},[this._t("colFooter")],2),t("div",{staticClass:"table-layout-container-item footer"},[t("div",{staticClass:"footer-item left"},[this._t("footerLeft")],2),t("div",{staticClass:"footer-item right"},[this._t("footerRight")],2)])])}),[],!1,null,null,null).exports,dt=(n("e9c4"),{name:"HeaderRightOptBar",inject:["currentFormId"],components:{BaseIcon:et.a},props:{size:{default:"mini"},enableCreateBtn:{default:!1},element:{type:Object,default:function(){return{}}},editable:{default:!0},printable:{default:!1},platformValue:{default:"pc"}},computed:{edit:function(){return this.editable},printRead:function(){return this.printable},platform:function(){return this.platformValue}},data:function(){return{TABLE_COMP_OPT_VALUE_MAP:tt,currentOptType:null,isConfirmMode:!1,showOptList:!1,moreOptList:[]}},created:function(){this.initMoreOptList()},methods:{initMoreOptList:function(){this.element&&this.element.options&&this.element.options.dataImport&&!this.printRead&&(this.currentFormId&&this.currentFormId.length&&this.moreOptList.push({name:tt.upload.label,value:tt.upload.value}),this.moreOptList.push({name:tt.removeList.label,value:tt.removeList.value})),this.element&&this.element.options&&this.element.options.dataImport&&this.edit&&this.printRead&&this.moreOptList.push({name:tt.download.label,value:tt.download.value})},onMoreOptSelect:function(e){e.value===tt.removeList.value?this.openMode(e.value):this.onOpt(e.value)},openMode:function(e){this.showOptList=!1,this.currentOptType=e,[tt.download.value,tt.removeList.value].indexOf(this.currentOptType)>-1&&(this.isConfirmMode=!0),this.$emit("openMode",e)},onOpt:function(e){this.showOptList=!1,this.$emit("onOpt",e)}},watch:{printRead:{immediate:!0,handler:function(e){}},edit:{immediate:!0,handler:function(e){}}}}),ft=Object(i.a)(dt,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"header-right-opt-bar-container"},[e.isConfirmMode?[n("el-button",{attrs:{size:e.size},on:{click:function(t){return e.onOpt(e.TABLE_COMP_OPT_VALUE_MAP.cancel.value)}}},[e._v(" "+e._s(e.TABLE_COMP_OPT_VALUE_MAP.cancel.label)+" ")]),e.currentOptType===e.TABLE_COMP_OPT_VALUE_MAP.removeList.value?n("el-button",{attrs:{size:e.size,type:"danger",plain:""},on:{click:function(t){return e.onOpt(e.TABLE_COMP_OPT_VALUE_MAP.removeList.value)}}},[n("base-icon",{attrs:{"icon-class":"delete-bin-4-fill"}}),e._v(" 确认删除 ")],1):e._e(),e.currentOptType===e.TABLE_COMP_OPT_VALUE_MAP.download.value?n("el-button",{attrs:{size:e.size,type:"primary",plain:""},on:{click:function(t){return e.onOpt(e.TABLE_COMP_OPT_VALUE_MAP.download.value)}}},[n("base-icon",{attrs:{"icon-class":"delete-bin-4-fill"}}),e._v(" "+e._s("确认"+e.TABLE_COMP_OPT_VALUE_MAP.download.label)+" ")],1):e._e()]:[e.enableCreateBtn&&!e.printRead?n("el-button",{attrs:{type:"primary",size:e.size},on:{click:function(t){return e.onOpt(e.TABLE_COMP_OPT_VALUE_MAP.add.value)}}},[n("base-icon",{attrs:{"icon-class":"add-line"}}),e._v(" "+e._s(e.TABLE_COMP_OPT_VALUE_MAP.add.label)+" ")],1):e._e(),"mobile"===e.platform?[e.edit?[e.printRead?e._e():n("el-button",{attrs:{size:e.size},on:{click:function(t){e.showOptList=!0}}},[n("base-icon",{attrs:{"icon-class":"more-fill"}})],1),e.element&&e.element.options&&e.element.options.enableExport&&e.printRead?n("el-button",{attrs:{type:"primary",size:e.size,disabled:!e.currentFormId||!e.currentFormId.length},on:{click:function(t){return e.onOpt(e.TABLE_COMP_OPT_VALUE_MAP.download.value)}}},[n("base-icon",{attrs:{"icon-class":"upload-2-line"}}),e._v(" "+e._s(e.TABLE_COMP_OPT_VALUE_MAP.download.label)+" ")],1):e._e()]:e._e()]:[e.element&&e.element.options&&e.element.options.dataImport&&!e.printRead?n("el-button",{attrs:{type:"primary",size:e.size,disabled:!e.currentFormId||!e.currentFormId.length},on:{click:function(t){return e.onOpt(e.TABLE_COMP_OPT_VALUE_MAP.upload.value)}}},[n("base-icon",{attrs:{"icon-class":"download-2-line"}}),e._v(" "+e._s(e.TABLE_COMP_OPT_VALUE_MAP.upload.label)+" ")],1):e._e(),e.element&&e.element.options&&e.element.options.enableExport&&e.edit&&e.printRead?n("el-button",{attrs:{type:"primary",size:e.size,disabled:!e.currentFormId||!e.currentFormId.length},on:{click:function(t){return e.onOpt(e.TABLE_COMP_OPT_VALUE_MAP.download.value)}}},[n("base-icon",{attrs:{"icon-class":"upload-2-line"}}),e._v(" "+e._s(e.TABLE_COMP_OPT_VALUE_MAP.download.label)+" ")],1):e._e(),e.element&&e.element.options&&e.element.options.batchDelete&&!e.printRead?n("el-button",{attrs:{size:e.size},on:{click:function(t){return e.openMode(e.TABLE_COMP_OPT_VALUE_MAP.removeList.value)}}},[n("base-icon",{attrs:{"icon-class":"delete-bin-4-fill"}}),e._v(" "+e._s(e.TABLE_COMP_OPT_VALUE_MAP.removeList.label)+" ")],1):e._e()]],!e.printRead&&e.showOptList?n("van-action-sheet",{attrs:{actions:e.moreOptList,"cancel-text":"取消","close-on-click-action":""},on:{cancel:function(t){e.showOptList=!1},select:e.onMoreOptSelect},model:{value:e.showOptList,callback:function(t){e.showOptList=t},expression:"showOptList"}}):e._e()],2)}),[],!1,null,null,null).exports,mt={name:"FooterLeftOptBar",components:{BaseIcon:et.a},props:{size:{default:"small"},enableCreateBtn:{default:!1},enableRemoveBtn:{default:!1},enableCopyBtn:{default:!1},activeRowData:{default:null},element:{type:Object,default:null},platformValue:{default:"pc"}},computed:{activeRow:function(){return this.activeRowData},platform:function(){return this.platformValue}},data:function(){return{TABLE_COMP_OPT_VALUE_MAP:tt}},methods:{onOpt:function(e){this.$emit("onOpt",e,M.a.cloneDeep(this.activeRow))}}},pt=Object(i.a)(mt,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"footer-left-opt-bar-container",class:{mobile:"mobile"===e.platform}},[e.enableCreateBtn?n("el-link",{staticClass:"container-item",attrs:{type:"primary",underline:!1,size:e.size},on:{click:function(t){return e.onOpt(e.TABLE_COMP_OPT_VALUE_MAP.add.value)}}},[n("base-icon",{attrs:{"icon-class":e.TABLE_COMP_OPT_VALUE_MAP.add.icon}}),e._v(" "+e._s(e.TABLE_COMP_OPT_VALUE_MAP.add.label)+" ")],1):e._e(),e.enableRemoveBtn?n("el-link",{staticClass:"container-item",attrs:{underline:!1,size:e.size},on:{click:function(t){return e.onOpt(e.TABLE_COMP_OPT_VALUE_MAP.remove.value)}}},[n("base-icon",{attrs:{"icon-class":e.TABLE_COMP_OPT_VALUE_MAP.remove.icon}}),e._v(" "+e._s(e.TABLE_COMP_OPT_VALUE_MAP.remove.label)+" ")],1):e._e(),e.enableCopyBtn?n("el-link",{staticClass:"container-item",attrs:{underline:!1,size:e.size},on:{click:function(t){return e.onOpt(e.TABLE_COMP_OPT_VALUE_MAP.copy.value)}}},[n("base-icon",{attrs:{"icon-class":e.TABLE_COMP_OPT_VALUE_MAP.copy.icon}}),e._v(" "+e._s(e.TABLE_COMP_OPT_VALUE_MAP.copy.label)+" ")],1):e._e(),e.element&&e.element.options&&e.element.options.rowMove?[n("el-link",{staticClass:"container-item",attrs:{underline:!1,size:e.size,disabled:!e.activeRow},on:{click:function(t){return e.onOpt(e.TABLE_COMP_OPT_VALUE_MAP.moveUp.value)}}},[n("base-icon",{attrs:{"icon-class":e.TABLE_COMP_OPT_VALUE_MAP.moveUp.icon}}),e._v(" "+e._s(e.TABLE_COMP_OPT_VALUE_MAP.moveUp.label)+" ")],1),n("el-link",{staticClass:"container-item",attrs:{underline:!1,size:e.size,disabled:!e.activeRow},on:{click:function(t){return e.onOpt(e.TABLE_COMP_OPT_VALUE_MAP.moveDown.value)}}},[n("base-icon",{attrs:{"icon-class":e.TABLE_COMP_OPT_VALUE_MAP.moveDown.icon}}),e._v(" "+e._s(e.TABLE_COMP_OPT_VALUE_MAP.moveDown.label)+" ")],1)]:e._e()],2)}),[],!1,null,null,null).exports,ht={name:"NoteBar",props:{text:{default:""}}},gt=Object(i.a)(ht,(function(){var e=this.$createElement;return(this._self._c||e)("div",{staticClass:"note-bar-container"},[this._v(this._s(this.text))])}),[],!1,null,null,null).exports,vt={name:"PagingBar",props:["tableDataValue","currentPageValue","pageSize","layout"],computed:{tableData:function(){return this.tableDataValue},currentPage:function(){return this.currentPageValue||1}},methods:{handlePageChange:function(e){this.$emit("handlePageChange",e)}}},bt=Object(i.a)(vt,(function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"paging-bar-container"},[t("el-pagination",{staticClass:"pagination-data",attrs:{background:"","current-page":this.currentPage,"page-size":this.pageSize,"pager-count":5,total:this.tableData.length,layout:this.layout?this.layout:"total, prev, pager, next"},on:{"current-change":this.handlePageChange}})],1)}),[],!1,null,null,null).exports,yt=n("b860"),_t={name:"Table",components:{BaseIcon:et.a,RendererTableItem:ot,DataImport:lt,TableLayout:ut,HeaderRightOptBar:ft,FooterLeftOptBar:pt,NoteBar:gt,PagingBar:bt},inject:["variable","currentFormId","dataId"],props:["columns","value","models","remote","disabledData","rules","name","remoteOptionSource","preview","platform","dataSourceValue","eventFunction","element","printRead","paging","pageSize","edit"],data:function(){return{pagingConfig:yt.a,tableData:this.value,displayFields:{},changeItem:{},pagingData:[],currentPage:1,currentActive:[],displayDataImport:!1,visible:!0,optionLoading:!1,optionLoadFailed:!1,selectedRows:[],isSelectedAll:!1,orderTypes:["input","textarea","number","date"],activeRow:null,tableSelectionMode:!1}},computed:{mode:function(){return"pc"===this.platform?"section"===this.element.options.displayMode?"section":"table":"section"},isNotMaxRow:function(){return!this.element.options.maxLimit||this.tableData&&this.tableData.length<(this.element.options.maxRows||1e3)}},created:function(){for(var e=0;e<this.columns.length;e++)this.displayFields[this.columns[e].model]=!this.columns[e].options.hidden;this.loadPagingData()},mounted:function(){var e=this;this.tableData.forEach((function(t){t._uuid=Object(Ze.a)(),"section"===e.mode&&(t.checked=!1),delete t.SYS_DATA_SORT})),this.visible=!1,this.columns&&this.columns.length&&this.columns.map(function(){var t=Object(g.a)(regeneratorRuntime.mark((function t(n){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n.options.remote!==b.a.DICT_DATA||!n.options.remoteOption||!n.options.remoteOption.remoteDict||"cascader"===n.type){t.next=4;break}return t.next=3,e.handleLoadDictOptions(n);case 3:n=t.sent;case 4:return t.abrupt("return",n);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),this.$nextTick((function(){e.visible=!0}))},methods:{clearActiveRow:function(){this.activeRow=null,this.selectedRows=[],this.$refs.dataTable&&(this.$refs.dataTable.setCurrentRow&&this.$refs.dataTable.setCurrentRow(this.activeRow),this.$refs.dataTable.clearSelection&&this.$refs.dataTable.clearSelection())},handleCurrentChange:function(e){this.activeRow=M.a.cloneDeep(e)},openMode:function(e){var t=this;switch(e){case tt.download.value:case tt.removeList.value:this.visible=!1,this.tableSelectionMode=!0,this.$nextTick((function(){t.visible=!0}))}},onOpt:function(e,t){var n=this;switch(e){case tt.add.value:if(this.element.options.maxLimit&&this.tableData.length>=this.element.options.maxRows)this.$message.error("已达上限,无法继续添加");else{var o=this.activeRow?this.tableData.findIndex((function(e){return e._uuid===n.activeRow._uuid})):void 0;this.activeRow&&void 0!==o?this.handleAddRow(o,this.activeRow):this.handleAddRow()}break;case tt.moveUp.value:this.rowMove(t._uuid,"up");break;case tt.moveDown.value:this.rowMove(t._uuid,"down");break;case tt.upload.value:this.displayDataImport=!0;break;case tt.download.value:this.exportData();break;case tt.remove.value:var r=M.a.cloneDeep(this.paging?this.pagingData:this.tableData).findIndex((function(e){return e._uuid===t._uuid}));this.handleRemove(r);break;case tt.removeList.value:this.batchDelete();break;case tt.copy.value:this.handleCopy(t);break;case tt.cancel.value:this.visible=!1,this.resetConfirmMode()}},exportData:function(){var e=this;return Object(g.a)(regeneratorRuntime.mark((function t(){var n,o,r,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(D.c)({formId:e.currentFormId,dataIds:[e.dataId],current:1,size:9999999,orderBy:null,data:[],exportColumns:[e.name]});case 3:n=t.sent,"application/json"===(n&&n.headers&&n.headers["content-type"])?e.$message.error("导出失败"):(o=new Blob([n.data],{type:"application/vnd.ms-excel"}),r=document.createElement("a"),i=URL.createObjectURL(o),r.href=i,r.download="".concat(e.element.name,"_").concat(e.name,"_").concat(re()().format("YYYY_MM_DD_HH_mm_ss"),".xlsx"),document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(i)),t.next=12;break;case 8:t.prev=8,t.t0=t.catch(0),e.$message.error("导出失败:".concat(t.t0.message||t.t0));case 12:case"end":return t.stop()}}),t,null,[[0,8]])})))()},resetConfirmMode:function(){var e=this;this.isSelectedAll=!1,this.selectedAll(!1),this.$refs.headerRightOptBar&&(this.$set(this.$refs.headerRightOptBar,"currentOptType",null),this.$set(this.$refs.headerRightOptBar,"isConfirmMode",!1)),this.tableSelectionMode=!1,this.$nextTick((function(){e.visible=!0}))},selectedAll:function(e){this.selectedRows=e?M.a.cloneDeep(this.paging?this.pagingData:this.tableData):[],(this.paging?this.pagingData:this.tableData).forEach((function(t){t.checked=e}))},handleCardSelectionChange:function(e,t){e?this.selectedRows.push(t):this.selectedRows=this.selectedRows.filter((function(e){return e._uuid!==t._uuid}))},rowMove:function(e,t){this.activeRow=null;var n=this.tableData.findIndex((function(t){return t._uuid===e}));if("up"===t){var o=this.tableData[n-1];o&&(this.tableData.splice(n-1,1),this.tableData.splice(n,0,o)),this.handleCurrentChange(this.tableData[o?n-1:0])}else{var r=this.tableData[n+1];r&&(this.tableData.splice(n+1,1),this.tableData.splice(n,0,r)),this.handleCurrentChange(this.tableData[r?n+1:n])}this.tableData.forEach((function(e,t){e.SYS_DATA_SORT=t})),this.loadPagingData()},batchDelete:function(){var e=this;this.selectedRows.length?this.$confirm("是否确认批量删除选中数据?","提示",{confirmButtonText:"确认"}).then((function(){e.visible=!1,e.handleCurrentChange(null),e.selectedRows.length&&e.selectedRows.forEach((function(t){var n=e.tableData.findIndex((function(e){return e._uuid===t._uuid}));e.tableData.splice(n,1)})),e.paging&&(e.currentPage=1,e.loadPagingData(),e.selectedRows=[]),e.resetConfirmMode(),e.isSelectedAll=!1})).catch((function(){})):this.$message.warning("请选择需要删除的数据")},handleSelectionChange:function(e){this.selectedRows=e},handleLoadDictOptions:function(e){var t=this;return Object(g.a)(regeneratorRuntime.mark((function n(){var o,r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(t.optionLoading=!0,t.optionLoadFailed=!1,o={},"dict"!==(r=e.options.remoteOption.remoteDict).dictDataType){n.next=10;break}return n.next=7,Object(y.a)(t,{dictId:r.dictId,parentId:"#"});case 7:o=n.sent,n.next=14;break;case 10:if("dictItem"!==r.dictDataType){n.next=14;break}return n.next=13,Object(y.a)(t,{dictId:r.dictId,parentId:r.dictOptionId});case 13:o=n.sent;case 14:return o.data?e.options.remoteOptions=o.data:t.optionLoadFailed=!0,t.optionLoading=!1,n.abrupt("return",e);case 17:case"end":return n.stop()}}),n)})))()},onDataImportComplete:function(e){var t=this;if(this.displayDataImport=!1,this.visible=!1,e.data&&e.data.dataList)if(this.element.options.maxLimit)if(this.tableData.length>=this.element.options.maxRows)this.$message.error("已超出最大数据限制,无法继续导入数据");else{var n=this.element.options.maxRows-this.tableData.length;n>=0?(this.models[this.element.model]=[].concat(Object(Qe.a)(e.data.dataList.slice(0,n).map((function(e){return Object(h.a)(Object(h.a)({},e),{},{_uuid:Object(Ze.a)()})}))),Object(Qe.a)(this.tableData)),n<e.data.dataList.length&&this.$message.info("最大数据上限为".concat(this.element.options.maxRows,"条,本次有效导入数据").concat(n,"条"))):this.$message.error("当前数据已超出最大数据量,无法继续导入")}else this.models[this.element.model]=[].concat(Object(Qe.a)(e.data.dataList),Object(Qe.a)(this.tableData));this.loadPagingData(),this.$nextTick((function(){t.visible=!0}))},handleAddRow:function(e,t,n){var o=this,r={};if(n)r=M.a.cloneDeep(t);else for(var i=0;i<this.columns.length;i++)if(this.columns[i].options.isVariableDefaultValue){var a="未初始化变量数据";this.variable&&(a=this.variable[this.columns[i].options.defaultVariable]||""),r[this.columns[i].model]=a}else r[this.columns[i].model]=this.columns[i].options.defaultValue;if(r._uuid=Object(Ze.a)(),t?this.tableData.splice(e+1,0,M.a.cloneDeep(r)):this.tableData.push(M.a.cloneDeep(r)),this.element&&this.element.events&&this.element.events.onRowAdd){var s=this.element.events.onRowAdd;this.eventFunction[s]&&this.eventFunction[s]({rowIndex:this.tableData.length-1,field:this.element.model})}this.changeItem={},this.paging&&this.$nextTick((function(){o.tableData.length>o.currentPage*o.pageSize&&!t&&(o.currentPage=parseInt((o.tableData.length-1)/o.pageSize)+1),o.loadPagingData()}));try{this.currentActive.push((this.paging?this.pageSize*(this.currentPage-1):0)+(this.tableData.length-1))}catch(e){}},handleCopy:function(e){if(this.element.options.maxLimit&&this.tableData.length>=this.element.options.maxRows)this.$message.error("已达上限,无法复制");else{var t=this.tableData.findIndex((function(t){return e._uuid===t._uuid}));t>-1&&this.handleAddRow(t,e,!0)}},handleRemove:function(e){var t=this;this.$confirm("是否删除该行数据?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var n=t.tableData[e];if(t.activeRow&&t.activeRow._uuid===n._uuid&&t.handleCurrentChange(e-1>0?t.tableData[e-1]:null),t.tableData.splice(e,1),t.element&&t.element.events&&t.element.events.onRowRemove){var o=t.element.events.onRowRemove;t.eventFunction[o]&&t.eventFunction[o]({removeIndex:e,field:t.element.model})}t.changeItem={},t.pagingData=[],t.paging&&t.$nextTick((function(){t.tableData.length%t.pageSize==0&&t.currentPage>parseInt(t.tableData.length/t.pageSize)&&(t.currentPage=parseInt(t.tableData.length/t.pageSize)),t.loadPagingData()}))})).catch((function(){}))},hide:function(e){var t=this;Object.keys(this.displayFields).forEach((function(n){e.indexOf(n)>=0&&t.$set(t.displayFields,n,!1)})),this.displayFields=Object(h.a)({},this.displayFields)},display:function(e){var t=this;Object.keys(this.displayFields).forEach((function(n){e.indexOf(n)>=0&&t.$set(t.displayFields,n,!0)})),this.displayFields=Object(h.a)({},this.displayFields)},disabled:function(e,t){for(var n=0;n<this.columns.length;n++)e.indexOf(this.columns[n].model)>=0&&this.$set(this.columns[n].options,"disabled",t)},setDisabled:function(e,t){for(var n=0;n<this.columns.length;n++)e.indexOf(this.columns[n].model)>=0&&this.$set(this.columns[n].options,"disabled",t)},setReadOnly:function(e,t){for(var n=0;n<this.columns.length;n++)e.indexOf(this.columns[n].model)>=0&&this.$set(this.columns[n].options,"readonly",t)},sortChange:function(e){if(this.paging){var t="descending"===e.order?"desc":"asc";this.tableData=M.a.orderBy(this.tableData,[e.prop],[t])}},handleTableChange:function(e){this.changeItem=e},handlePageChange:function(e){var t=this;"section"===this.mode&&(this.selectedRows=[],(this.paging?this.pagingData:this.tableData).forEach((function(e){e.checked=!1})),this.isSelectedAll=!1),this.currentPage=e,this.pagingData=[],this.$nextTick((function(){t.loadPagingData(),t.$refs[t.name+"-item"].forEach((function(e){e.clearValidate()}))}))},loadPagingData:function(){var e=(this.currentPage-1)*this.pageSize,t=e+this.pageSize;this.pagingData=this.tableData.slice(e,t)}},watch:{value:function(e){Array.isArray(e)?this.tableData=e:(this.tableData=[],Function("console.error('子表单:请设置正确Array格式的数据,当前为".concat(e,"');"))())},tableData:{deep:!0,immediate:!0,handler:function(){this.loadPagingData(),this.changeItem.haveEvent&&this.eventFunction[this.changeItem.haveEvent](this.changeItem)}},printRead:{immediate:!0,handler:function(e){this.clearActiveRow(),this.onOpt(tt.cancel.value),e&&!this.edit&&(this.$set(this.element.options,"paging",!1),this.currentActive=this.tableData.map((function(e,t){return t})))}},edit:{handler:function(){this.clearActiveRow(),this.onOpt(tt.cancel.value)}}}},wt={name:"renderer-table",extends:T,components:{GenerateTable:Object(i.a)(_t,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{directives:[{name:"loading",rawName:"v-loading",value:e.optionLoading,expression:"optionLoading"}],staticClass:"renderer-table",class:{"is-disabled":e.disabledData}},["mobile"===e.platform?[n("table-layout",{scopedSlots:e._u([!e.edit||e.element.options.disabled||e.element.options.hideLabel?null:{key:"absoluteHeader",fn:function(){return[n("header-right-opt-bar",{ref:"headerRightOptBar",attrs:{element:e.element,editable:e.edit,printable:e.printRead,"enable-create-btn":!0,"platform-value":e.platform},on:{openMode:e.openMode,onOpt:e.onOpt}})]},proxy:!0},e.edit&&!e.element.options.disabled&&e.element.options.hideLabel?{key:"headerRight",fn:function(){return[n("header-right-opt-bar",{ref:"headerRightOptBar",attrs:{element:e.element,editable:e.edit,printable:e.printRead,"enable-create-btn":!0,"platform-value":e.platform},on:{openMode:e.openMode,onOpt:e.onOpt}})]},proxy:!0}:null,e.edit&&!e.element.options.disabled?{key:"headerLeft",fn:function(){return[e.tableSelectionMode?n("el-checkbox",{ref:"selectedAllBtn",staticClass:"select-all-btn header-sub-item",attrs:{size:"mini"},on:{change:e.selectedAll},model:{value:e.isSelectedAll,callback:function(t){e.isSelectedAll=t},expression:"isSelectedAll"}},[e._v(" 全选 ")]):e._e()]},proxy:!0}:null,{key:"body",fn:function(){return[n("el-collapse",{staticClass:"renderer-table-mobile",class:{mobile:"mobile"===e.platform},model:{value:e.currentActive,callback:function(t){e.currentActive=t},expression:"currentActive"}},e._l(e.paging?e.pagingData:e.tableData,(function(t,o){return n("el-collapse-item",{key:(e.paging?e.pageSize*(e.currentPage-1):0)+o,staticClass:"renderer-table-mobile-item",attrs:{name:(e.paging?e.pageSize*(e.currentPage-1):0)+o}},[n("div",{staticClass:"renderer-table-mobile-item-top",attrs:{slot:"title"},slot:"title"},[e.tableSelectionMode?n("el-checkbox",{staticClass:"renderer-table-mobile-checkbox",on:{change:function(n){return e.handleCardSelectionChange(n,t)}},model:{value:t.checked,callback:function(n){e.$set(t,"checked",n)},expression:"t.checked"}}):e._e(),e.element.options.enableDynamicTableTitle&&e.element.options.relatedField?n("span",{staticClass:"renderer-table-mobile-title"},[e._v(" "+e._s(e.tableData[(e.paging?e.pageSize*(e.currentPage-1):0)+o][e.element.options.relatedField])+" ")]):n("span",{staticClass:"renderer-table-mobile-title"},[e._v(" "+e._s((e.paging?e.pageSize*(e.currentPage-1):0)+o+1)+" ")])],1),n("div",{staticClass:"renderer-table-mobile-item-content"},e._l(e.columns,(function(t){return n("el-form-item",{key:t.key,ref:e.name+"-item",refInFor:!0,attrs:{label:t.options.hideLabel?"":t.name,"label-width":t.options.hideLabel?"0px":t.options.isLabelWidth?t.options.labelWidth+"px":"",prop:e.name+"."+((e.paging?e.pageSize*(e.currentPage-1):0)+o)+"."+t.model,rules:e.rules[e.name+"."+t.model]}},[e.displayFields[t.model]?n("renderer-table-item",{attrs:{"data-source-value":e.dataSourceValue,edit:!e.disabledData,"event-function":e.eventFunction,"is-in-table":!0,"is-table":!0,models:e.tableData[(e.paging?e.pageSize*(e.currentPage-1):0)+o],platform:e.platform,"print-read":e.printRead||t.options.readonly,remote:e.remote,"remote-option-source":e.remoteOptionSource,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+o,"table-name":e.name,element:t,"scope-row-data":e.tableData[(e.paging?e.pageSize*(e.currentPage-1):0)+o]},on:{"on-table-change":e.handleTableChange},model:{value:e.tableData[(e.paging?e.pageSize*(e.currentPage-1):0)+o][t.model],callback:function(n){e.$set(e.tableData[(e.paging?e.pageSize*(e.currentPage-1):0)+o],t.model,n)},expression:"tableData[(paging ? pageSize * (currentPage - 1) : 0) + index][column.model]"}}):e._e()],1)})),1),e.printRead||!e.edit||e.element.options.disabled?e._e():n("div",{staticClass:"renderer-table-mobile-item-footer"},[n("footer-left-opt-bar",{attrs:{element:e.element,"enable-copy-btn":!0,"enable-remove-btn":!0,"active-row-data":t,"platform-value":e.platform},on:{onOpt:e.onOpt}})],1)])})),1)]},proxy:!0},{key:"colFooter",fn:function(){return[e.element.options.maxLimit&&!e.printRead&&e.edit&&!e.element.options.disabled?n("note-bar",{staticClass:"col-footer-item",attrs:{text:"最多可填写 "+e.element.options.maxRows+" 条数据,当前已填写 "+(e.tableData&&e.tableData.length)+" 条"}}):e._e(),e.paging&&e.edit&&!e.element.options.disabled?n("paging-bar",{staticClass:"col-footer-item",attrs:{paging:e.paging,"page-size":e.pageSize,"table-data-value":e.tableData,layout:e.pagingConfig.pageMobileLayout,"current-page-value":e.currentPage},on:{handlePageChange:e.handlePageChange}}):e._e()]},proxy:!0}],null,!0)})]:["table"===e.mode?[n("table-layout",{scopedSlots:e._u([e.edit&&!e.element.options.disabled?{key:"headerLeft",fn:function(){return[e.currentFormId&&e.currentFormId.length?e._e():n("el-tag",{attrs:{size:"small",type:"warning"}},[e._v("预览状态暂不支持导入、导出功能")])]},proxy:!0}:null,e.edit&&!e.element.options.disabled?{key:"headerRight",fn:function(){return[n("header-right-opt-bar",{ref:"headerRightOptBar",attrs:{element:e.element,editable:e.edit,printable:e.printRead},on:{openMode:e.openMode,onOpt:e.onOpt}})]},proxy:!0}:null,{key:"body",fn:function(){return[e.visible?n("el-table",{ref:"dataTable",staticClass:"renderer-table-pc",attrs:{data:e.edit?e.paging?e.pagingData:e.tableData:e.printRead?e.tableData:e.paging?e.pagingData:e.tableData,border:"",size:"small",stripe:e.edit&&!e.printRead,"highlight-current-row":""},on:{"current-change":e.handleCurrentChange,"sort-change":e.sortChange,"selection-change":e.handleSelectionChange}},[!e.printRead&&e.tableSelectionMode?n("el-table-column",{attrs:{type:"selection",align:"center",width:"80"}}):e._e(),e.tableSelectionMode?e._e():n("el-table-column",{attrs:{"header-align":"center",align:"center",fixed:"",label:"序号",width:"80"},scopedSlots:e._u([{key:"default",fn:function(t){return[e.edit&&!e.element.options.disabled?[n("div",{staticClass:"scope-index"},[n("span",[e._v(e._s((e.paging?e.pageSize*(e.currentPage-1):0)+t.$index+1))])]),n("div",{staticClass:"scope-action"},[e.printRead?e._e():n("el-button",{staticClass:"renderer-table-delete",attrs:{disabled:e.disabledData,size:"small",type:"text"},on:{click:function(n){e.handleRemove((e.paging?e.pageSize*(e.currentPage-1):0)+t.$index)}}},[n("base-icon",{attrs:{"icon-class":"delete-bin-4-fill"}})],1),e.printRead?e._e():n("el-button",{staticClass:"renderer-table-row-add",attrs:{disabled:e.disabledData,size:"small",type:"text"},on:{click:function(n){return e.handleCopy(t.row)}}},[n("base-icon",{attrs:{"icon-class":"file-copy-fill"}})],1),e.printRead?n("span",[e._v(e._s((e.paging?e.pageSize*(e.currentPage-1):0)+t.$index+1))]):e._e()],1)]:[n("span",[e._v(e._s((e.paging?e.pageSize*(e.currentPage-1):0)+t.$index+1))])]]}}],null,!1,2334635528)}),0===e.columns.length?n("el-table-column"):e._l(e.columns,(function(t){return n("el-table-column",{key:t.key,attrs:{prop:t.model,sortable:(e.printRead||!e.edit)&&e.orderTypes.includes(t.type),"sort-orders":["ascending","descending"],"header-align":"center",label:t.options.hideLabel?"":t.name,align:"number"===t.type?"right":"center","label-class-name":t.options.required?"required":"","min-width":t.options.isWidgetWidth?2*t.options.width+"px":"200px"},scopedSlots:e._u([{key:"default",fn:function(o){return[e.displayFields[t.model]?n("el-form-item",{ref:e.name+"-item",refInFor:!0,attrs:{prop:e.name+"."+((e.paging?e.pageSize*(e.currentPage-1):0)+o.$index)+"."+t.model,rules:e.rules[e.name+"."+t.model]}},[n("renderer-table-item",{attrs:{"data-source-value":e.dataSourceValue,edit:!e.disabledData,"event-function":e.eventFunction,"is-in-table":!0,"is-table":!0,models:e.tableData[(e.paging?e.pageSize*(e.currentPage-1):0)+o.$index],platform:e.platform,"print-read":e.printRead||t.options.readonly,remote:e.remote,"remote-option-source":e.remoteOptionSource,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+o.$index,"table-name":e.name,element:t,"scope-row-data":o.row},on:{"on-table-change":e.handleTableChange},model:{value:o.row[t.model],callback:function(n){e.$set(o.row,t.model,n)},expression:"scope.row[column.model]"}})],1):e._e()]}}],null,!0)})}))],2):e._e()]},proxy:!0},!e.edit||e.printRead||e.element.options.disabled?null:{key:"footerLeft",fn:function(){return[n("footer-left-opt-bar",{attrs:{element:e.element,"enable-create-btn":!0,"active-row-data":e.activeRow},on:{onOpt:e.onOpt}})]},proxy:!0},{key:"footerRight",fn:function(){return[!e.element.options.maxLimit||e.printRead||e.element.options.disabled?e._e():n("note-bar",{attrs:{text:"最多可填写 "+e.element.options.maxRows+" 条数据,当前已填写 "+(e.tableData&&e.tableData.length)+" 条"}}),e.paging&&e.edit?n("paging-bar",{attrs:{paging:e.paging,"page-size":e.pageSize,"table-data-value":e.tableData,"current-page-value":e.currentPage},on:{handlePageChange:e.handlePageChange}}):e._e()]},proxy:!0}],null,!0)})]:[n("table-layout",{scopedSlots:e._u([e.element.options.disabled?null:{key:"headerLeft",fn:function(){return[e.tableSelectionMode?n("el-checkbox",{ref:"selectedAllBtn",staticClass:"select-all-btn header-sub-item",attrs:{size:"mini"},on:{change:e.selectedAll},model:{value:e.isSelectedAll,callback:function(t){e.isSelectedAll=t},expression:"isSelectedAll"}},[e._v(" 全选 ")]):e._e(),e.currentFormId&&e.currentFormId.length?e._e():n("el-tag",{staticClass:"header-sub-item",attrs:{size:"small",type:"warning"}},[e._v("预览状态暂不支持导入、导出功能")])]},proxy:!0},e.element.options.disabled?null:{key:"headerRight",fn:function(){return[n("header-right-opt-bar",{ref:"headerRightOptBar",attrs:{element:e.element,editable:e.edit,printable:e.printRead,"enable-create-btn":!0},on:{openMode:e.openMode,onOpt:e.onOpt}})]},proxy:!0},{key:"body",fn:function(){return[n("el-collapse",{staticClass:"renderer-table-mobile",model:{value:e.currentActive,callback:function(t){e.currentActive=t},expression:"currentActive"}},e._l(e.paging?e.pagingData:e.tableData,(function(t,o){return n("el-collapse-item",{key:(e.paging?e.pageSize*(e.currentPage-1):0)+o,staticClass:"renderer-table-mobile-item",attrs:{name:(e.paging?e.pageSize*(e.currentPage-1):0)+o}},[n("div",{staticClass:"renderer-table-mobile-item-top",attrs:{slot:"title"},slot:"title"},[e.tableSelectionMode?n("el-checkbox",{staticClass:"renderer-table-mobile-checkbox",on:{change:function(n){return e.handleCardSelectionChange(n,t)}},model:{value:t.checked,callback:function(n){e.$set(t,"checked",n)},expression:"t.checked"}}):e._e(),e.element.options.enableDynamicTableTitle&&e.element.options.relatedField?n("span",{staticClass:"renderer-table-mobile-title"},[e._v(" "+e._s(e.tableData[(e.paging?e.pageSize*(e.currentPage-1):0)+o][e.element.options.relatedField])+" ")]):n("span",{staticClass:"renderer-table-mobile-title"},[e._v(" "+e._s((e.paging?e.pageSize*(e.currentPage-1):0)+o+1)+" ")])],1),n("div",{staticClass:"renderer-table-mobile-item-content"},e._l(e.columns,(function(t){return n("el-form-item",{key:t.key,ref:e.name+"-item",refInFor:!0,attrs:{label:t.options.hideLabel?"":t.name,"label-width":t.options.hideLabel?"0px":t.options.isLabelWidth?t.options.labelWidth+"px":"",prop:e.name+"."+((e.paging?e.pageSize*(e.currentPage-1):0)+o)+"."+t.model,rules:e.rules[e.name+"."+t.model]}},[e.displayFields[t.model]?n("renderer-table-item",{attrs:{"data-source-value":e.dataSourceValue,edit:!e.disabledData,"event-function":e.eventFunction,"is-in-table":!0,"is-table":!0,models:e.tableData[(e.paging?e.pageSize*(e.currentPage-1):0)+o],platform:e.platform,"print-read":e.printRead||t.options.readonly,remote:e.remote,"remote-option-source":e.remoteOptionSource,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+o,"table-name":e.name,element:t,"scope-row-data":e.tableData[(e.paging?e.pageSize*(e.currentPage-1):0)+o]},on:{"on-table-change":e.handleTableChange},model:{value:e.tableData[(e.paging?e.pageSize*(e.currentPage-1):0)+o][t.model],callback:function(n){e.$set(e.tableData[(e.paging?e.pageSize*(e.currentPage-1):0)+o],t.model,n)},expression:"tableData[(paging ? pageSize * (currentPage - 1) : 0) + index][column.model]"}}):e._e()],1)})),1),e.printRead||!e.edit||e.element.options.disabled?e._e():n("div",{staticClass:"renderer-table-mobile-item-footer"},[n("footer-left-opt-bar",{attrs:{element:e.element,"enable-copy-btn":!0,"enable-remove-btn":!0,"active-row-data":t},on:{onOpt:e.onOpt}})],1)])})),1)]},proxy:!0},e.element.options.maxLimit&&!e.printRead?{key:"footerLeft",fn:function(){return[n("note-bar",{attrs:{text:"最多可填写 "+e.element.options.maxRows+" 条数据,当前已填写 "+(e.tableData&&e.tableData.length)+" 条"}})]},proxy:!0}:null,e.paging&&e.edit?{key:"footerRight",fn:function(){return[n("paging-bar",{attrs:{paging:e.paging,"page-size":e.pageSize,"table-data-value":e.tableData,"current-page-value":e.currentPage},on:{handlePageChange:e.handlePageChange}})]},proxy:!0}:null],null,!0)})]],e.displayDataImport?n("data-import",{attrs:{"widget-key":e.element.key,"widget-name":e.element.name},on:{onClose:function(t){e.displayDataImport=!1},onComplete:e.onDataImportComplete},model:{value:e.displayDataImport,callback:function(t){e.displayDataImport=t},expression:"displayDataImport"}}):e._e()],2)}),[],!1,null,null,null).exports}},xt=Object(i.a)(wt,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("generate-table",{ref:"icd-form-"+e.element.model,attrs:{columns:e.element.children,"data-source-value":e.dataSourceValue,"disabled-data":e.disabled,"event-function":e.eventFunction,models:e.dataModels,name:e.element.model,"page-size":e.element.options.pageSize,paging:e.element.options.paging,platform:e.platform,preview:e.preview,"print-read":e.printRead,remote:e.remote,"remote-option-source":e.remoteOptionSource,rules:e.rules,value:e.dataModel,element:e.element,widget:e.element,edit:e.edit}})}),[],!1,null,null,null).exports,Ct={name:"renderer-qrCode",extends:T,components:{QrCodeComponent:n("bfce").a}},Ot=Object(i.a)(Ct,(function(){var e=this.$createElement;return(this._self._c||e)("qr-code-component",{ref:"icd-form-"+this.element.model,attrs:{options:this.element.options,"data-models":this.dataModels}})}),[],!1,null,null,null).exports,St=n("7b30"),kt={name:"renderer-button",extends:T,components:{TextComponent:St.a},methods:{handleOnClick:function(){if(this.element.events&&this.element.events.onClick){var e=this.element.events.onClick;this.eventFunction[e]&&this.eventFunction[e]({field:this.element.model})}}}},Et=Object(i.a)(kt,(function(){var e,t=this,n=t.$createElement,o=t._self._c||n;return o("text-component",{attrs:{align:t.element.options.contentPosition}},[t.element.options.showInPrintRead||!t.printRead?o("el-button",{ref:"icd-form-"+t.element.model,class:(e={},e[t.element.options&&t.element.options.customClass]=t.element.options&&t.element.options.customClass,e),style:t.element.options.customWidth?{width:t.element.options.width+"%"}:"",attrs:{circle:t.element.options.buttonCircle,disabled:!t.edit||t.element.options.disabled,plain:t.element.options.buttonPlain,round:t.element.options.buttonRound,size:t.element.options.buttonSize,type:t.element.options.buttonType},on:{click:t.handleOnClick}},[t._v(" "+t._s(t.element.options.buttonName)+" ")]):t._e()],1)}),[],!1,null,null,null).exports,Tt={name:"renderer-divider",extends:T},Dt=Object(i.a)(Tt,(function(){var e,t=this,n=t.$createElement,o=t._self._c||n;return o("div",{class:(e={},e[t.element.options&&t.element.options.customClass]=t.element.options&&t.element.options.customClass,e),style:{paddingTop:t.element.options.paddingTop+"px",paddingBottom:t.element.options.paddingBottom+"px"}},[o("el-divider",{ref:"icd-form-"+t.element.model,attrs:{"content-position":t.element.options.contentPosition}},[t._v(" "+t._s(t.element.options.text)+" ")])],1)}),[],!1,null,null,null).exports,At={name:"renderer-iframe",extends:T},Mt=Object(i.a)(At,(function(){var e,t=this,n=t.$createElement,o=t._self._c||n;return t.element.options.href?o("iframe",{ref:"icd-form-"+t.element.model,staticClass:"iss-iframe",class:(e={},e[t.element.options&&t.element.options.customClass]=t.element.options&&t.element.options.customClass,e),style:{width:t.element.options.width+"%",height:t.element.options.height+"px"},attrs:{src:t.element.options.href}}):o("div",{staticClass:"iss-image-load-failed",style:{width:t.element.options.width+"%",height:t.element.options.height+"px"}},[o("div",{staticClass:"iss-empty-image"}),o("span",[t._v("请配置网页URL地址")])])}),[],!1,null,null,null).exports,Rt={name:"renderer-image",extends:T,methods:{handleOnClick:function(){if(this.element.events&&this.element.events.onClick){var e=this.element.events.onClick;this.eventFunction[e]&&this.eventFunction[e]({field:this.element.model})}}}},Pt=Object(i.a)(Rt,(function(){var e,t=this,n=t.$createElement,o=t._self._c||n;return o("el-image",{ref:"icd-form-"+t.element.model,class:(e={},e[t.element.options&&t.element.options.customClass]=t.element.options&&t.element.options.customClass,e),style:{width:t.element.options.width+"%",height:t.element.options.autoHeight?"auto":t.element.options.height+"px"},attrs:{alt:t.element.name,fit:t.element.options.autoHeight?"fill":t.element.options.fit,src:t.element.options.src},nativeOn:{click:function(e){return t.handleOnClick.apply(null,arguments)}}},[o("div",{staticClass:"iss-image-load-failed",attrs:{slot:"error"},slot:"error"},[o("div",{staticClass:"iss-empty-image"}),t.element.options.src?o("span",[t._v("图片加载失败,请配置正确的图片链接地址或上传图片")]):o("span",[t._v("请上传图片或配置图片链接地址")])])])}),[],!1,null,null,null).exports,It={name:"renderer-link",extends:T,components:{TextComponent:St.a},methods:{handleOnClick:function(){if(this.element.events&&this.element.events.onClick){var e=this.element.events.onClick;this.eventFunction[e]&&this.eventFunction[e]({field:this.element.model})}}}},Lt=Object(i.a)(It,(function(){var e,t=this,n=t.$createElement,o=t._self._c||n;return o("text-component",{attrs:{align:t.element.options.contentPosition}},[o("el-link",{ref:"icd-form-"+t.element.model,class:(e={},e[t.element.options&&t.element.options.customClass]=t.element.options&&t.element.options.customClass,e),attrs:{disabled:t.element.options.disabled,href:t.element.options.href,type:t.element.options.linkType,underline:t.element.options.underline,target:"_blank"},on:{click:t.handleOnClick}},[t._v(" "+t._s(t.element.options.text)+" ")])],1)}),[],!1,null,null,null).exports,jt={name:"renderer-text",extends:T,components:{TextComponent:St.a}},zt={input:j,textarea:N,number:U,radio:G,checkbox:Q,time:ne,date:fe,rate:ge,select:xe,switches:ke,slider:Ae,editor:Re,member:je,organization:Ie,cascader:Be,upload:Ve,imageUpload:$e,uuid:We,sequence:Ke,address:Ye,relatedForm:Je,table:xt,qrCode:Ot,button:Et,divider:Dt,iframe:Mt,image:Pt,link:Lt,text:Object(i.a)(jt,(function(){var e,t=this,n=t.$createElement;return(t._self._c||n)("text-component",{ref:"icd-form-"+t.element.model,class:(e={},e[t.element.options&&t.element.options.customClass]=t.element.options&&t.element.options.customClass,e),attrs:{align:t.element.options.contentPosition,"font-color":t.element.options.fontColor,"font-family":t.element.options.fontFamily,"font-size":t.element.options.fontSize,"font-style":t.element.options.fontStyle,"font-weight":t.element.options.fontWeight,"margin-bottom":t.element.options.marginBottom,"margin-top":t.element.options.marginTop}},[t._v(" "+t._s(t.element.options.text)+" ")])}),[],!1,null,null,null).exports},Ft=n("0f01"),Bt=n("522e"),Nt={name:"BaseElementItem",props:["element","models","rules","remote","edit","remoteOptionSource","platform","preview","containerKey","dataSourceValue","eventFunction","printRead","displayFields"],computed:{isContainer:function(){return Bt.a[this.element.type]&&Bt.a[this.element.type].isContainer&&"table"!==this.element.type},pluginLabelWidth:function(){return this.element.options.hideLabel?"0px":this.element.options.isLabelWidth?this.element.options.labelWidth+"px":""},conponentShow:function(){return!this.printRead||"button"!==this.element.type&&"inline"!==this.element.type}},data:function(){return{Containers:p,RenderElements:zt,dataModel:this.models[this.element.model],dataModels:this.models,componentConfig:Bt.a}},watch:{dataModel:{deep:!0,handler:function(e){if(Ft.a.$emit("on-change-"+this.containerKey,e,this.element.model,this.containerKey),this.element.events&&this.element.events.onChange){var t=this.element.events.onChange;this.eventFunction[t]&&this.eventFunction[t]({value:e,field:this.element.model})}}},models:{deep:!0,handler:function(e){this.dataModels=e,this.dataModel=e[this.element.model]}}}},Vt=Object(i.a)(Nt,(function(){var e,t=this,n=t.$createElement,o=t._self._c||n;return t.element.key&&t.displayFields[t.element.model]?o("div",{staticClass:"iss-form-renderer-form-item",attrs:{"data-id":t.element.model}},[t.isContainer?o(t.Containers[t.element.type],{key:t.element.key,tag:"component",attrs:{id:t.element.model,"container-key":t.containerKey,"data-source-value":t.dataSourceValue,"display-fields":t.displayFields,edit:t.edit,element:t.element,"event-function":t.eventFunction,models:t.dataModels,platform:t.platform,preview:t.preview,"print-read":t.printRead,remote:t.remote,"remote-option-source":t.remoteOptionSource,rules:t.rules}}):t.conponentShow?o("el-form-item",{staticClass:"renderer-form-item",class:(e={},e[t.element.options&&t.element.options.customClass]=t.element.options&&t.element.options.customClass,e["no-label-form-item"]=t.element.options.isLabelWidth&&0===t.element.options.labelWidth,e["print-read-mode"]=t.printRead,e["no-form-label"]=!t.element.options.labelWidth,e),attrs:{label:t.element.options.hideLabel||!t.element.options.labelWidth?"":t.element.name,"label-width":t.pluginLabelWidth,prop:t.element.model,required:t.element.options.required,"status-icon":!0}},[o(t.RenderElements[t.element.type],{tag:"component",attrs:{"data-source-value":t.dataSourceValue,models:t.dataModels,element:t.element,platform:t.platform,"is-table":!1,"event-function":t.eventFunction,preview:t.preview,"print-read":t.printRead||t.element.options.readonly,edit:t.edit,remote:t.remote,"remote-option-source":t.remoteOptionSource,rules:t.rules},model:{value:t.dataModel,callback:function(e){t.dataModel=e},expression:"dataModel"}})],1):t._e()],1):t._e()}),[],!1,null,null,null);t.default=Vt.exports},7193:function(e,t,n){n("ae68")},"71f6":function(e,t,n){"use strict";n.r(t);n("ac1f"),n("00b4"),n("a434"),n("e260"),n("d3b7"),n("e6cf"),n("3ca3"),n("ddb0");var o=n("b76a"),r=n.n(o),i=n("2909"),a=n("5530"),s=n("0f01"),l=n("e42e"),c=n("f859"),u=n("4260"),d=n("1503"),f=n("60bb"),m=n.n(f),p={data:function(){return{selectWidget:this.select||{}}},methods:{handlePut:function(e,t,n){return Object(l.a)(n.getAttribute("type"),this.currentType)},handlePluginUpdate:function(){var e=this;this.$nextTick((function(){s.a.$emit("on-history-add-"+e.formKey)}))},handlePluginAdd:function(e,t,n){var o=this,r=e.newIndex,l=[];switch(this.element.type){case d.a.LAYOUT_CARD:case d.a.LAYOUT_INLINE:l=this.element.children,Object(u.b)(l,r);break;case d.a.LAYOUT_GRID:case d.a.LAYOUT_TAB:case d.a.LAYOUT_COLLAPSE:l=this.element.children[t].children,Object(u.b)(l,r);break;case d.a.LAYOUT_REPORT:l=this.element.children[n].children[t].children,Object(u.b)(l,r);break;default:l=this.element}this.$set(l,r,m.a.cloneDeep(l[r]));var f=Object(c.a)(),p=l[r];p.children&&(p.children=Object(u.c)(p.children));var h=Object(a.a)(Object(a.a)({},p),{},{options:Object(a.a)(Object(a.a)({},p.options),{},{remoteFunc:p.options.remoteFunc||"func_"+f,remoteOptionSource:p.options.remoteOptionSource||"option_"+f,tableColumn:!1}),key:p.key||f,model:p.model||p.type+"_"+f,rules:p.rules?Object(i.a)(p.rules):[]});this.$set(l,r,h),this.selectWidget=h,this.$nextTick((function(){s.a.$emit("on-history-add-"+o.formKey)}))},handleSelectChange:function(e){var t=this;setTimeout((function(){t.selectWidget=e>=0?t.children[e]:t.element}))}},watch:{select:function(e){this.selectWidget=e},selectWidget:{deep:!0,handler:function(e){this.$emit("update:select",e)}}}},h={name:"widget-card",mixins:[p],components:{Draggable:r.a,BaseElementItem:function(){return Promise.resolve().then(n.bind(null,"71f6"))}},props:["element","select","index","children","platform","formKey"],data:function(){return{currentType:"card"}}},g=h,v=n("2877"),b=Object(v.a)(g,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-card",{staticClass:"widget-card",class:{"is-empty":0===e.element.children.length},attrs:{shadow:e.element.options.shadow}},[e.element.options&&e.element.options.showHeader?n("div",{attrs:{slot:"header"},slot:"header"},[e._v(e._s(e.element.name))]):e._e(),n("draggable",{staticClass:"widget-col-list",attrs:{animation:200,group:{name:"icdDesigner",put:e.handlePut},"no-transition-on-drag":!0,ghostClass:"ghost",handle:".widget-view-drag"},on:{add:function(t){return e.handlePluginAdd(t,e.element)},update:e.handlePluginUpdate},model:{value:e.element.children,callback:function(t){e.$set(e.element,"children",t)},expression:"element.children"}},[e._l(e.element.children,(function(t,o){return[t&&t.key?n("base-element-item",{key:t.key,attrs:{children:e.element.children,element:t,"form-key":e.formKey,index:o,platform:e.platform,select:e.selectWidget},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t)}}}):e._e()]}))],2)],1)}),[],!1,null,null,null),y=b.exports,_=(n("159b"),n("b0c0"),{name:"Grid",mixins:[p],components:{Draggable:r.a,BaseElementItem:function(){return Promise.resolve().then(n.bind(null,"71f6"))}},props:["element","select","index","children","platform","formKey"],data:function(){return{currentType:"grid",selectWidget:this.select||{},selectIndex:-1}},methods:{getColSpan:function(e){return"pc"===this.platform?24/e:"pad"===this.platform?e>1?12:24:"mobile"===this.platform?24:void 0},handleSelectChange:function(e,t){var n=this;setTimeout((function(){n.selectWidget=e>=0?t.children[e]:{}}))},handleColumnAdd:function(){for(var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,n=arguments.length>1?arguments[1]:void 0,o=0;o<t;o++)this.children.push({name:"栅格列".concat(n),model:"grid_".concat(Object(c.a)()),type:"col",options:{customClass:""},children:[],key:Object(c.a)()}),this.$nextTick((function(){s.a.$emit("on-history-add-"+e.formKey)}))},handleColumnDelete:function(e,t){var n=this;this.children.splice(e,t),this.children.forEach((function(e,t){e.name="栅格列".concat(t+1)})),setTimeout((function(){s.a.$emit("on-history-add-"+n.formKey)}),20)},handleColumnChange:function(e){var t=e-this.element.children.length;t>0?this.handleColumnAdd(t,e):t<0&&this.handleColumnDelete(e-1,Math.abs(t))}},watch:{select:function(e){this.selectWidget=e},selectWidget:{deep:!0,handler:function(e){this.$emit("update:select",e)}}}}),w=_,x=Object(v.a)(w,(function(){var e,t=this,n=t.$createElement,o=t._self._c||n;return o("div",{staticClass:"widget-grid"},[o("el-row",{staticClass:"widget-grid-row",class:(e={},e[t.element.options&&t.element.options.customClass]=t.element.options&&t.element.options.customClass,e),attrs:{align:t.element.options.align,gutter:t.element.options.gutter||0,justify:t.element.options.justify,type:"flex"}},t._l(t.element.children,(function(e,n){var r;return o("el-col",{key:e.key,staticClass:"widget-grid-item",class:(r={active:t.selectWidget.key&&t.selectWidget.key===e.key},r[e.options&&e.options.customClass]=e.options&&e.options.customClass,r["is-empty"]=0===e.children.length,r),attrs:{offset:e.options?e.options.offset:0,pull:e.options?e.options.pull:0,push:e.options?e.options.push:0,span:t.getColSpan(t.element.children.length||1)}},[o("draggable",{staticClass:"widget-col-list",class:{"is-empty":0===e.children.length},attrs:{animation:200,group:{name:"icdDesigner",put:t.handlePut},"no-transition-on-drag":!0,ghostClass:"ghost",handle:".widget-view-drag"},on:{add:function(e){return t.handlePluginAdd(e,n)},update:t.handlePluginUpdate},model:{value:e.children,callback:function(n){t.$set(e,"children",n)},expression:"item.children"}},[t._l(e.children,(function(n,r){return[n&&n.key?o("base-element-item",{key:n.key,attrs:{children:e.children,element:n,"form-key":t.formKey,platform:t.platform,index:r,select:t.selectWidget},on:{"update:select":function(e){t.selectWidget=e},"select-change":function(n){return t.handleSelectChange(n,e)}}}):t._e()]}))],2)],1)})),1),t.selectWidget.key===t.element.key?o("div",{staticClass:"widget-view-action widget-extra-action"},[o("el-dropdown",{attrs:{size:"small",trigger:"click"}},[o("span",{staticClass:"el-dropdown-link"},[o("base-icon",{attrs:{"icon-class":"list-settings-fill",title:"列设置"}})],1),o("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[o("el-dropdown-item",{nativeOn:{click:function(e){return e.stopPropagation(),t.handleColumnChange(1)}}},[o("base-icon",{attrs:{"icon-class":"layout-column-fill"}}),t._v(" 一列 ")],1),o("el-dropdown-item",{nativeOn:{click:function(e){return e.stopPropagation(),t.handleColumnChange(2)}}},[o("base-icon",{attrs:{"icon-class":"layout-column-fill"}}),t._v(" 两列 ")],1),o("el-dropdown-item",{nativeOn:{click:function(e){return e.stopPropagation(),t.handleColumnChange(3)}}},[o("base-icon",{attrs:{"icon-class":"layout-column-fill"}}),t._v(" 三列 ")],1),o("el-dropdown-item",{nativeOn:{click:function(e){return e.stopPropagation(),t.handleColumnChange(4)}}},[o("base-icon",{attrs:{"icon-class":"layout-column-fill"}}),t._v(" 四列 ")],1)],1)],1)],1):t._e()],1)}),[],!1,null,null,null),C=x.exports,O={name:"widget-collapse-item",mixins:[p],components:{Draggable:r.a,BaseElementItem:function(){return Promise.resolve().then(n.bind(null,"71f6"))}},props:["element","select","index","children","platform","formKey"],data:function(){return{currentType:"collapse",collapseActive:this.element.children[0].name}},methods:{handleSelectChange:function(e,t){var n=this;setTimeout((function(){n.selectWidget=e>=0?t.children[e]:n.element}))}}},S=O,k=Object(v.a)(S,(function(){var e,t=this,n=t.$createElement,o=t._self._c||n;return o("el-collapse",{staticClass:"widget-collapse",class:(e={},e[t.element.options&&t.element.options.customClass]=t.element.options.customClass,e),attrs:{accordion:t.element.options.accordion},model:{value:t.collapseActive,callback:function(e){t.collapseActive=e},expression:"collapseActive"}},t._l(t.element.children,(function(e,n){return o("el-collapse-item",{key:e.name,staticClass:"widget-collapse-item",class:{"is-empty":0===e.children.length},attrs:{name:e.name}},[o("div",{staticClass:"el-collapse-header-title",attrs:{slot:"title",title:e.name},slot:"title"},[t._v(t._s(e.name))]),o("draggable",{staticClass:"widget-col-list",attrs:{animation:200,group:{name:"icdDesigner",put:t.handlePut},"no-transition-on-drag":!0,ghostClass:"ghost",handle:".widget-view-drag"},on:{add:function(e){return t.handlePluginAdd(e,n)},update:t.handlePluginUpdate},model:{value:e.children,callback:function(n){t.$set(e,"children",n)},expression:"item.children"}},[t._l(e.children,(function(n,r){return[n&&n.key?o("base-element-item",{key:n.key,attrs:{children:e.children,element:n,"form-key":t.formKey,index:r,platform:t.platform,select:t.selectWidget},on:{"update:select":function(e){t.selectWidget=e},"select-change":function(n){return t.handleSelectChange(n,e)}}}):t._e()]}))],2)],1)})),1)}),[],!1,null,null,null),E=k.exports,T=(n("a630"),n("99af"),{name:"widget-report",mixins:[p],components:{Draggable:r.a,BaseElementItem:function(){return Promise.resolve().then(n.bind(null,"71f6"))}},props:["element","select","index","children","platform","formKey"],data:function(){return{currentType:"report",selectWidget:this.select||{},selectR:-1,selectC:-1}},computed:{showRight:function(){var e=this.element.children[this.selectR].children[this.selectC].options.rowspan,t=this.element.children[this.selectR].children[this.selectC].options.colspan;if(this.selectC+t<this.element.children[this.selectR].children.length){var n=this.element.children[this.selectR].children[t+this.selectC];if(!n.options.invisible&&e===n.options.rowspan)return!0}return!1},showBottom:function(){var e=this.element.children[this.selectR].children[this.selectC].options.rowspan,t=this.element.children[this.selectR].children[this.selectC].options.colspan;if(e+this.selectR<this.element.children.length){var n=this.element.children[e+this.selectR].children[this.selectC];if(!n.options.invisible&&t===n.options.colspan)return!0}return!1},showRemoveRow:function(){if(this.element.children.length>1){var e=this.element.children[this.selectR].children[this.selectC].options.rowspan;if(1===e)return!0;for(var t=0;t<this.element.children[this.selectR].children.length;t++)if(e!==this.element.children[this.selectR].children[t].options.rowspan||this.element.children[this.selectR].children[t].options.invisible)return!1;if(this.element.children[this.selectR].children.length===t)return!0}return!1},showRemoveColumn:function(){if(this.element.children[this.selectR].children.length>1){var e=this.element.children[this.selectR].children[this.selectC].options.colspan;if(1===e)return!0;for(var t=0;t<this.element.children.length;t++)if(e!==this.element.children[t].children[this.selectC].options.colspan||this.element.children[t].children[this.selectC].options.invisible)return!1;if(this.element.children.length===t)return!0}return!1},showSplitColumn:function(){return this.element.children[this.selectR].children[this.selectC].options.colspan>1},showSplitRow:function(){return this.element.children[this.selectR].children[this.selectC].options.rowspan>1}},methods:{handlePut:function(e,t,n){return Object(l.a)(n.getAttribute("type"),this.currentType)},handleSelectItemWidget:function(e,t){this.selectWidget=this.children[e].children[t],this.selectR=e,this.selectC=t},handleWidgetItemUpdate:function(){s.a.$emit("on-history-add-"+this.formKey)},handleAddRow:function(){var e=this,t=this.children[0].children.length;this.children.push({name:"网格行",model:"report_".concat(Object(c.a)()),type:"tr",children:Array.from({length:t},(function(e){return{type:"td",model:"report_".concat(Object(c.a)()),children:[],options:{customClass:"",colspan:1,rowspan:1,align:"left",valign:"top",width:"",height:""},key:Object(c.a)()}}))}),this.resetChildrenName(),this.$nextTick((function(){s.a.$emit("on-history-add-"+e.formKey)}))},resetChildrenName:function(){this.element.children.forEach((function(e,t){e.name="网格行".concat(t+1),e.children.forEach((function(e,t){e.name="网格列".concat(t+1)}))}))},handleAddColumns:function(){var e=this;this.children.forEach((function(e){e.children.push({type:"td",model:"report_".concat(Object(c.a)()),children:[],options:{customClass:"",colspan:1,rowspan:1,align:"left",valign:"top",width:"",height:""},key:Object(c.a)()})})),this.resetChildrenName(),this.$nextTick((function(){s.a.$emit("on-history-add-"+e.formKey)}))},insertColumns:function(e){for(var t=0;t<this.element.children.length;t++){var n=this.findPrevColIndex(t,e);if(n!==e&&this.element.children[t].children[e].options.invisible){this.element.children[t].children.splice(e,0,{type:"td",model:"report_".concat(Object(c.a)()),children:[],options:{customClass:"",colspan:1,rowspan:1,align:"left",valign:"top",width:"",height:"",invisible:!0},key:Object(c.a)()});var o=this.element.children[t].children[n].options.colspan;this.element.children[t].children[n].options.colspan=o+1;for(var r=0;r<o+1;r++)this.element.children[t].children[n+r].options.markCol=r}else this.element.children[t].children.splice(e,0,{type:"td",model:"report_".concat(Object(c.a)()),children:[],options:{customClass:"",colspan:1,rowspan:1,align:"left",valign:"top",width:"",height:""},key:Object(c.a)()})}this.resetChildrenName()},insertRow:function(e){for(var t=this,n=[],o=0;o<this.element.children[0].children.length;o++){var r=this.findPrevRowIndex(e,o);r!==e&&this.element.children[e].children[o].options.invisible?(n.push({model:"report_".concat(Object(c.a)()),type:"td",children:[],options:{customClass:"",colspan:1,rowspan:1,align:"left",valign:"top",width:"",height:"",invisible:!0},key:Object(c.a)()}),this.element.children[r].children[o].options.rowspan=this.element.children[r].children[o].options.rowspan+1):n.push({model:"report_".concat(Object(c.a)()),type:"td",children:[],options:{customClass:"",colspan:1,rowspan:1,align:"left",valign:"top",width:"",height:""},key:Object(c.a)()})}this.element.children.splice(e,0,{model:"report_".concat(Object(c.a)()),children:n,type:"tr"}),this.resetChildrenName(),this.$nextTick((function(){for(var n=0;n<t.element.children[e].children.length;n++)if(t.element.children[e].children[n].options.invisible){var o=t.findPrevRowIndex(e-1,n);t.element.children[o].children[n].options.invisible||t.markTableItem(o,n)}}))},handleInsertLeft:function(){var e=this,t=this.selectC;this.insertColumns(t),this.selectC=this.selectC++,this.$nextTick((function(){s.a.$emit("on-history-add-"+e.formKey)}))},handleInsertRight:function(){var e=this,t=this.element.children[this.selectR].children[this.selectC].options.colspan>1?this.findNextColIndex(this.selectR,this.selectC+1):this.selectC+1;this.insertColumns(t),this.$nextTick((function(){s.a.$emit("on-history-add-"+e.formKey)}))},handleInserBefore:function(){var e=this,t=this.selectR;this.insertRow(t),this.selectR=this.selectR++,this.$nextTick((function(){s.a.$emit("on-history-add-"+e.formKey)}))},handleInserAfter:function(){var e=this,t=this.element.children[this.selectR].children[this.selectC].options.rowspan>1?this.findNextRowIndex(this.selectR+1,this.selectC):this.selectR+1;this.insertRow(t),this.$nextTick((function(){s.a.$emit("on-history-add-"+e.formKey)}))},markTableItem:function(e,t){for(var n=this.element.children[e].children[t].options.colspan,o=this.element.children[e].children[t].options.rowspan,r=0;r<o;r++)for(var i=0;i<n;i++)this.element.children[e+r].children[t+i].options.markCol=i,this.element.children[e+r].children[t+i].options.markRow=r},handleRight:function(e){var t=this,n=e.options.colspan,o=this.selectC+n,r=this.element.children[this.selectR].children[o].options.colspan;this.$set(e.options,"colspan",n+r),this.element.children[this.selectR].children[o].options.invisible=!0;var a=Object(i.a)(this.element.children[this.selectR].children[o].children);this.element.children[this.selectR].children[o].children=[],e.children=e.children.concat(a),this.markTableItem(this.selectR,this.selectC),this.$nextTick((function(){s.a.$emit("on-history-add-"+t.formKey)}))},handleBottom:function(e){var t=this,n=e.options.rowspan,o=this.selectR+n,r=this.element.children[o].children[this.selectC].options.rowspan;this.$set(e.options,"rowspan",n+r),this.element.children[o].children[this.selectC].options.invisible=!0;var a=Object(i.a)(this.element.children[o].children[this.selectC].children);this.element.children[o].children[this.selectC].children=[],e.children=e.children.concat(a),this.markTableItem(this.selectR,this.selectC),this.$nextTick((function(){s.a.$emit("on-history-add-"+t.formKey)}))},handleSplitColumn:function(){for(var e=this,t=this.element.children[this.selectR].children[this.selectC].options.colspan,n=this.element.children[this.selectR].children[this.selectC].options.rowspan,o=0;o<t;o++)this.element.children[this.selectR].children[this.selectC+o].options.invisible=!1,this.element.children[this.selectR].children[this.selectC+o].options.colspan=1,this.element.children[this.selectR].children[this.selectC+o].options.rowspan=n,this.markTableItem(this.selectR,this.selectC+o);this.$nextTick((function(){s.a.$emit("on-history-add-"+e.formKey)}))},handleSplitRow:function(){for(var e=this,t=this.element.children[this.selectR].children[this.selectC].options.colspan,n=this.element.children[this.selectR].children[this.selectC].options.rowspan,o=0;o<n;o++)this.element.children[this.selectR+o].children[this.selectC].options.invisible=!1,this.element.children[this.selectR+o].children[this.selectC].options.rowspan=1,this.element.children[this.selectR+o].children[this.selectC].options.colspan=t,this.markTableItem(this.selectR,this.selectC+o);this.$nextTick((function(){s.a.$emit("on-history-add-"+e.formKey)}))},findPrevRowIndex:function(e,t){return e>=this.element.children.length||!this.element.children[e].children[t].options.markRow?e:this.findPrevRowIndex(e-1,t)},findPrevColIndex:function(e,t){return t>=this.element.children[e].children.length||!this.element.children[e].children[t].options.markCol?t:this.findPrevColIndex(e,t-1)},findNextColIndex:function(e,t){return t>=this.element.children[e].children.length||!this.element.children[e].children[t].options.markCol?t:this.findNextColIndex(e,t+1)},findNextRowIndex:function(e,t){return e>=this.element.children.length||!this.element.children[e].children[t].options.markRow?e:this.findNextRowIndex(e+1,t)},handleRemoveRow:function(){for(var e=this,t=0;t<this.element.children[this.selectR].children.length;t++){var n=this.element.children[this.selectR].children[t].options.rowspan,o=this.element.children[this.selectR].children[t].options.colspan;if(this.element.children[this.selectR].children[t].options.invisible){var r=this.findPrevRowIndex(this.selectR,t);r!==this.selectR&&this.element.children[r].children[t].options.rowspan>1&&(this.element.children[r].children[t].options.rowspan=this.element.children[r].children[t].options.rowspan-1)}else n>1&&(this.element.children[this.selectR+1].children[t].children=Object(i.a)(this.element.children[this.selectR].children[t].children),this.element.children[this.selectR+1].children[t].options.invisible=!1,this.element.children[this.selectR+1].children[t].options.rowspan=n-1,this.element.children[this.selectR+1].children[t].options.colspan=o,this.markTableItem(this.selectR+1,t))}this.element.children.splice(this.selectR,1),this.$nextTick((function(){s.a.$emit("on-history-add-"+e.formKey)}))},handleRemoveColumn:function(){for(var e=this,t=0;t<this.element.children.length;t++){var n=this.element.children[t].children[this.selectC].options.colspan,o=this.element.children[t].children[this.selectC].options.rowspan;if(this.element.children[t].children[this.selectC].options.invisible){var r=this.findPrevColIndex(t,this.selectC);r!==this.selectC&&this.element.children[t].children[r].options.colspan>1&&(this.element.children[t].children[r].options.colspan=this.element.children[t].children[r].options.colspan-1)}else n>1&&(this.element.children[t].children[this.selectC+1].children=Object(i.a)(this.element.children[t].children[this.selectC].children),this.element.children[t].children[this.selectC+1].options.invisible=!1,this.element.children[t].children[this.selectC+1].options.colspan=n-1,this.element.children[t].children[this.selectC+1].options.rowspan=o,this.markTableItem(t,this.selectC+1));this.element.children[t].children.splice(this.selectC,1)}this.$nextTick((function(){s.a.$emit("on-history-add-"+e.formKey)}))},handleSelectChange:function(e,t){var n=this;setTimeout((function(){n.selectWidget=e>=0?t.children[e]:n.children.children[n.index]}))}},watch:{select:function(e){this.selectWidget=e},selectWidget:{deep:!0,handler:function(e){this.$emit("update:select",e)}}}}),D=T,A=Object(v.a)(D,(function(){var e,t=this,n=t.$createElement,o=t._self._c||n;return o("div",{staticClass:"widget-report"},[o("table",{staticClass:"report-container",class:(e={},e[t.element.options&&t.element.options.customClass]=t.element.options.customClass,e),style:{"border-top-width":t.element.options.borderWidth+"px","border-top-color":t.element.options.borderColor,"border-left-width":t.element.options.borderWidth+"px","border-left-color":t.element.options.borderColor,width:t.element.options.width||"100%"}},t._l(t.element.children,(function(e,n){return o("tr",{key:n},t._l(e.children,(function(e,r){var i;return e.options.invisible?t._e():o("td",{key:n+"-"+r,staticClass:"widget-report-item report-container-td",class:(i={active:t.selectWidget.key&&t.selectWidget.key===e.key},i[e.options.customClass]=e.options.customClass,i["is-empty"]=0===e.children.length,i),style:{"border-right-width":t.element.options.borderWidth+"px","border-right-color":t.element.options.borderColor,"border-bottom-width":t.element.options.borderWidth+"px","border-bottom-color":t.element.options.borderColor,height:e.options.height},attrs:{colspan:e.options.colspan,rowspan:e.options.rowspan,valign:"top"},on:{click:function(e){return e.stopPropagation(),t.handleSelectItemWidget(n,r)}}},[o("draggable",{staticClass:"widget-col-list",attrs:{animation:200,group:{name:"icdDesigner",put:t.handlePut},"no-transition-on-drag":!0,ghostClass:"ghost",handle:".widget-view-drag"},on:{add:function(e){return t.handlePluginAdd(e,r,n)},update:t.handleWidgetItemUpdate},model:{value:e.children,callback:function(n){t.$set(e,"children",n)},expression:"column.children"}},[t._l(e.children,(function(n,r){return[n&&n.key?o("base-element-item",{key:n.key,attrs:{platform:t.platform,children:e.children,element:n,"form-key":t.formKey,index:r,select:t.selectWidget},on:{"update:select":function(e){t.selectWidget=e},"select-change":function(n){return t.handleSelectChange(n,e)}}}):t._e()]}))],2),t.selectWidget.key===e.key?o("div",{staticClass:"widget-view-action widget-col-action"},[o("el-dropdown",{attrs:{size:"small",trigger:"click"}},[o("span",{staticClass:"el-dropdown-link"},[o("base-icon",{attrs:{"icon-class":"list-settings-fill",title:"单元格设置"}})],1),o("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[o("el-dropdown-item",{nativeOn:{click:function(e){return e.stopPropagation(),t.handleInsertLeft.apply(null,arguments)}}},[t._v(" 左侧插入列 ")]),o("el-dropdown-item",{nativeOn:{click:function(e){return e.stopPropagation(),t.handleInsertRight.apply(null,arguments)}}},[t._v(" 右侧插入列 ")]),o("el-dropdown-item",{nativeOn:{click:function(e){return e.stopPropagation(),t.handleInserBefore.apply(null,arguments)}}},[t._v(" 上方插入行 ")]),o("el-dropdown-item",{nativeOn:{click:function(e){return e.stopPropagation(),t.handleInserAfter.apply(null,arguments)}}},[t._v(" 下方插入行 ")]),o("el-dropdown-item",{attrs:{disabled:!t.showRight,divided:""},nativeOn:{click:function(n){return n.stopPropagation(),t.handleRight(e)}}},[t._v(" 向右合并 ")]),o("el-dropdown-item",{attrs:{disabled:!t.showBottom},nativeOn:{click:function(n){return n.stopPropagation(),t.handleBottom(e)}}},[t._v(" 向下合并 ")]),o("el-dropdown-item",{attrs:{disabled:!t.showSplitColumn,divided:""},nativeOn:{click:function(e){return e.stopPropagation(),t.handleSplitColumn.apply(null,arguments)}}},[t._v(" 拆分成列 ")]),o("el-dropdown-item",{attrs:{disabled:!t.showSplitRow},nativeOn:{click:function(e){return e.stopPropagation(),t.handleSplitRow.apply(null,arguments)}}},[t._v(" 拆分成行 ")]),o("el-dropdown-item",{attrs:{disabled:!t.showRemoveColumn,divided:""},nativeOn:{click:function(e){return e.stopPropagation(),t.handleRemoveColumn.apply(null,arguments)}}},[t._v(" 删除列 ")]),o("el-dropdown-item",{attrs:{disabled:!t.showRemoveRow},nativeOn:{click:function(e){return e.stopPropagation(),t.handleRemoveRow.apply(null,arguments)}}},[t._v(" 删除行 ")])],1)],1)],1):t._e()],1)})),0)})),0),t.selectWidget.key===t.element.key?o("div",{staticClass:"widget-view-action widget-extra-action"},[o("base-help-icon",{attrs:{content:"网格布局暂不支持多端自动适配,有移动端使用场景时请避免使用此布局"}}),o("base-icon",{attrs:{"icon-class":"insert-row-top",title:"添加行"},on:{click:function(e){return e.stopPropagation(),t.handleAddRow()}}}),o("base-icon",{attrs:{"icon-class":"insert-column-left",title:"添加列"},on:{click:function(e){return e.stopPropagation(),t.handleAddColumns()}}})],1):t._e()])}),[],!1,null,null,null),M=A.exports,R={name:"widget-tab-item",mixins:[p],components:{Draggable:r.a,BaseElementItem:function(){return Promise.resolve().then(n.bind(null,"71f6"))}},props:["element","select","index","children","platform","formKey"],data:function(){return{currentType:"tabs",tabActive:this.element.children[0].name}},methods:{handleSelectChange:function(e,t){var n=this;setTimeout((function(){n.selectWidget=e>=0?t.children[e]:{}}))}}},P=R,I=Object(v.a)(P,(function(){var e,t=this,n=t.$createElement,o=t._self._c||n;return o("el-tabs",{staticClass:"widget-tab",class:(e={},e[t.element.options&&t.element.options.customClass]=t.element.options.customClass,e),attrs:{"tab-position":t.element.options.tabPosition,type:t.element.options.type},model:{value:t.tabActive,callback:function(e){t.tabActive=e},expression:"tabActive"}},t._l(t.element.children,(function(e,n){return o("el-tab-pane",{key:e.name,staticClass:"widget-tab-pane",class:{"is-empty":0===e.children.length},attrs:{label:e.name,name:e.name}},[o("draggable",{staticClass:"widget-col-list",attrs:{animation:200,group:{name:"icdDesigner",put:t.handlePut},"no-transition-on-drag":!0,ghostClass:"ghost",handle:".widget-view-drag"},on:{add:function(e){return t.handlePluginAdd(e,n)},update:t.handlePluginUpdate},model:{value:e.children,callback:function(n){t.$set(e,"children",n)},expression:"item.children"}},[t._l(e.children,(function(n,r){return[n&&n.key?o("base-element-item",{key:n.key,attrs:{children:e.children,element:n,"form-key":t.formKey,index:r,platform:t.platform,select:t.selectWidget},on:{"update:select":function(e){t.selectWidget=e},"select-change":function(n){return t.handleSelectChange(n,e)}}}):t._e()]}))],2)],1)})),1)}),[],!1,null,null,null),L=I.exports,j=(n("d81d"),n("a15b"),/^(?!_)(?![0-9])[a-zA-Z0-9_]{2,50}$/),z=n("1da1"),F=(n("96cf"),{element:{type:Object,default:function(){}},platform:{type:String,default:""},isInTable:{type:Boolean,default:!1}}),B=n("5c9a"),N=n("f016"),V=n("ec26"),H=n("8907"),$={name:"plugin",props:Object(a.a)({},F),computed:{model:{get:function(){return this.element.options.defaultValue},set:function(e){this.element.options.defaultValue=e}},isRemote:function(){return("radio"===this.element.type||"checkbox"===this.element.type)&&this.element.options.remote!==B.a.STATIC_DATA&&this.element.options.remoteOption.remoteDict},disabled:function(){return this.element.options.disabled},placeholder:function(){return this.element.options.placeholder}},data:function(){return{DATASOURCE_TYPE:B.a,variableMap:N.b,key:Object(c.a)(),elementKey:Object(c.a)(),remoteOptions:[],optionLoading:!1,optionLoadFailed:!1}},methods:{v4:V.a,handleLoadDictOptions:function(){var e=this;return Object(z.a)(regeneratorRuntime.mark((function t(){var n,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.optionLoading){t.next=2;break}return t.abrupt("return");case 2:if(e.optionLoading=!0,e.optionLoadFailed=!1,n={},"dict"!==(o=e.element.options.remoteOption.remoteDict).dictDataType){t.next=12;break}return t.next=9,Object(H.a)(e,{dictId:o.dictId,parentId:"#"});case 9:n=t.sent,t.next=16;break;case 12:if("dictItem"!==o.dictDataType){t.next=16;break}return t.next=15,Object(H.a)(e,{dictId:o.dictId,parentId:o.dictOptionId});case 15:n=t.sent;case 16:n.data&&n.data.length?e.remoteOptions=n.data:e.optionLoadFailed=!0,e.optionLoading=!1;case 18:case"end":return t.stop()}}),t)})))()}},watch:{isRemote:{immediate:!0,handler:function(e){e&&this.handleLoadDictOptions()}},"element.options.remoteOption.remoteDict":{deep:!0,handler:function(e){e&&this.isRemote&&this.handleLoadDictOptions()}},"element.options.defaultValue":function(){this.elementKey=Object(c.a)()}}},U=$,W=Object(v.a)(U,(function(){var e=this.$createElement;return(this._self._c||e)("div")}),[],!1,null,"cd6b81b2",null),q=W.exports,K={name:"designer-input",extends:q},G=Object(v.a)(K,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e.element.options.isVariableDefaultValue?n("el-input",{style:{width:e.isInTable?"100%":e.element.options.isWidgetWidth?e.element.options.width+"%":"100%"},attrs:{disabled:e.disabled,placeholder:e.placeholder,"show-password":e.element.options.showPassword,value:"{{"+(e.element.options.defaultVariable?e.variableMap[e.element.options.defaultVariable]:"未选择")+"}}",maxlength:"50"}}):n("el-input",{style:{width:e.isInTable?"100%":e.element.options.isWidgetWidth?e.element.options.width+"%":"100%"},attrs:{disabled:e.disabled,placeholder:e.placeholder,"show-password":e.element.options.showPassword,maxlength:"50"},model:{value:e.model,callback:function(t){e.model=t},expression:"model"}})],1)}),[],!1,null,"cac0a572",null).exports,Y={name:"designer-textarea",extends:q},X=Object(v.a)(Y,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e.element.options.isVariableDefaultValue?n("el-input",{style:{width:e.isInTable?"100%":e.element.options.isWidgetWidth?e.element.options.width+"%":"100%"},attrs:{autosize:!!e.element.options.autosize&&{minRows:e.element.options.rows},disabled:e.disabled,placeholder:e.placeholder,rows:e.element.options.rows,value:"{{"+(e.element.options.defaultVariable?e.variableMap[e.element.options.defaultVariable]:"未选择")+"}}",type:"textarea"}}):n("el-input",{style:{width:e.isInTable?"100%":e.element.options.isWidgetWidth?e.element.options.width+"%":"100%"},attrs:{autosize:!!e.element.options.autosize&&{minRows:e.element.options.rows},disabled:e.disabled,placeholder:e.placeholder,rows:e.element.options.rows,type:"textarea"},model:{value:e.model,callback:function(t){e.model=t},expression:"model"}})],1)}),[],!1,null,"3121d737",null).exports,J={name:"designer-number",extends:q,computed:{widthDisplay:function(){return this.element.options.isWidgetWidth?{width:this.element.options.width+"%"}:this.isInTable?{flex:1}:{width:"auto"}}}},Q=(n("cc0c"),Object(v.a)(J,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"number-display"},[n("el-input-number",{style:e.widthDisplay,attrs:{controls:e.element.options.controls,"controls-position":e.element.options.controlsPosition,disabled:e.disabled,precision:e.element.options.closePrecision?void 0:e.element.options.precision},model:{value:e.model,callback:function(t){e.model=t},expression:"model"}}),e.element.options.showSuffix?n("span",{staticClass:"iss-number-unit"},[e._v(" "+e._s(e.element.options.suffix))]):e._e()],1)}),[],!1,null,null,null).exports),Z={name:"designer-radio",extends:q},ee=Object(v.a)(Z,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("el-radio-group",{style:{width:e.isInTable?"100%":e.element.options.isWidgetWidth?e.element.options.width+"%":"100%"},attrs:{disabled:e.disabled},model:{value:e.model,callback:function(t){e.model=t},expression:"model"}},["button"===e.element.options.optionStyle?e._l(e.isRemote?e.remoteOptions:e.element.options.options,(function(t,o){return n("el-radio-button",{key:t.value+o,style:{display:"inline-block"},attrs:{label:t.value}},[e._v(" "+e._s(t.label)+" ")])})):e._l(e.isRemote?e.remoteOptions:e.element.options.options,(function(t,o){return n("el-radio",{key:t.value+o,style:{display:"mobile"===e.platform&&"border"===e.element.options.optionStyle?"block":e.element.options.inline?"inline-block":"block"},attrs:{border:"border"===e.element.options.optionStyle,label:t.value}},[e._v(" "+e._s(t.label)+" ")])}))],2),e.isRemote?[e.optionLoading?[n("i",{staticClass:"el-icon-loading"}),e._v(" 正在加载选项... ")]:e._e(),e.optionLoadFailed?n("div",{staticClass:"form-option-load-failed"},[n("base-icon",{attrs:{"icon-class":"information-line"}}),e._v(" 选项加载失败,请检查选项配置 "),n("el-button",{attrs:{size:"mini",type:"text"},on:{click:e.handleLoadDictOptions}},[n("base-icon",{attrs:{"icon-class":"refresh-line"}}),e._v(" 重试 ")],1)],1):e._e()]:e._e()],2)}),[],!1,null,"6c94b07f",null).exports,te={name:"designer-checkbox",extends:q},ne=Object(v.a)(te,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("el-checkbox-group",{style:{width:e.isInTable?"100%":e.element.options.isWidgetWidth?e.element.options.width+"%":"100%"},attrs:{disabled:e.disabled},model:{value:e.model,callback:function(t){e.model=t},expression:"model"}},["button"===e.element.options.optionStyle?e._l(e.isRemote?e.remoteOptions:e.element.options.options,(function(t,o){return n("el-checkbox-button",{key:t.value+o,style:{display:"inline-block"},attrs:{label:t.value}},[e._v(" "+e._s(t.label)+" ")])})):e._l(e.isRemote?e.remoteOptions:e.element.options.options,(function(t,o){return n("el-checkbox",{key:t.value+o,style:{display:"mobile"===e.platform&&"border"===e.element.options.optionStyle?"block":e.element.options.inline?"inline-block":"block"},attrs:{border:"border"===e.element.options.optionStyle,label:t.value}},[e._v(" "+e._s(t.label)+" ")])}))],2),e.isRemote?[e.optionLoading?[n("i",{staticClass:"el-icon-loading"}),e._v(" 正在加载选项... ")]:e._e(),e.optionLoadFailed?n("div",{staticClass:"form-option-load-failed"},[n("base-icon",{attrs:{"icon-class":"information-line"}}),e._v(" 选项加载失败,请检查选项配置 "),n("el-button",{attrs:{size:"mini",type:"text"},on:{click:e.handleLoadDictOptions}},[n("base-icon",{attrs:{"icon-class":"refresh-line"}}),e._v(" 重试 ")],1)],1):e._e()]:e._e()],2)}),[],!1,null,"ea41cdd6",null).exports,oe={name:"designer-time",extends:q},re=Object(v.a)(oe,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e.element.options.useDynamicValue?n("el-input",{attrs:{value:"{{动态时间}}"}}):n("el-time-picker",{key:e.elementKey,style:{width:e.isInTable?"100%":e.element.options.isWidgetWidth?e.element.options.width+"%":"100%"},attrs:{clearable:e.element.options.clearable,"default-value":e.model,disabled:e.disabled,editable:e.element.options.editable,placeholder:e.placeholder,readonly:e.element.options.readonly,"value-format":e.element.options.format},model:{value:e.model,callback:function(t){e.model=t},expression:"model"}})],1)}),[],!1,null,"3a1eb939",null).exports,ie={name:"designer-date",extends:q},ae=Object(v.a)(ie,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e.element.options.useDynamicValue?n("el-input",{attrs:{value:"{{动态日期时间}}"}}):n("el-date-picker",{key:e.elementKey,style:{width:e.isInTable?"100%":e.element.options.isWidgetWidth?e.element.options.width+"%":"100%"},attrs:{clearable:e.element.options.clearable,disabled:e.disabled,editable:e.element.options.editable,placeholder:e.placeholder,readonly:e.element.options.readonly,type:e.element.options.type,format:"custom"===e.element.options.format?e.element.options.customFormat:e.element.options.format,"value-format":"timestamp"},model:{value:e.model,callback:function(t){e.model=t},expression:"model"}})],1)}),[],!1,null,"4fd6be4b",null).exports,se={name:"designer-rate",extends:q},le=Object(v.a)(se,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("el-rate",{style:e.element.options.clearable?"float:left":"",attrs:{"allow-half":e.element.options.allowHalf,disabled:e.disabled,"icon-classes":["ri-star-fill","ri-star-fill","ri-star-fill"],"void-icon-class":"ri-star-line","disabled-void-icon-class":"ri-star-fill",max:e.element.options.max,"show-score":e.element.options.showScore,"score-template":"{value}"+e.element.options.suffix},model:{value:e.model,callback:function(t){e.model=t},expression:"model"}}),e.element.options.clearable?n("el-link",{staticStyle:{float:"left","margin-left":"1rem"},attrs:{type:"primary",underline:!1}},[e._v("清空")]):e._e()],1)}),[],!1,null,"45548834",null).exports,ce={name:"designer-select",extends:q,components:{CustomSelectComponent:n("f73f").a}},ue=Object(v.a)(ce,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("custom-select-component",{style:{width:e.isInTable?"100%":e.element.options.isWidgetWidth?e.element.options.width+"%":"100%"},attrs:{clearable:e.element.options.clearable,disabled:e.disabled,placeholder:e.placeholder,"custom-multiple":e.element.options.multiple,multiple:""},model:{value:e.model,callback:function(t){e.model=t},expression:"model"}},e._l(e.element.options.options,(function(e,t){return n("el-option",{key:e.value+t,attrs:{label:e.label,value:e.label}})})),1)],1)}),[],!1,null,"13eb5dc4",null).exports,de={name:"render-switches",extends:q},fe=Object(v.a)(de,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("el-switch",{attrs:{disabled:e.disabled,"active-text":e.element.options.activeText,"inactive-text":e.element.options.inactiveText},model:{value:e.model,callback:function(t){e.model=t},expression:"model"}})}),[],!1,null,null,null).exports,me={name:"render-slider",extends:q},pe=Object(v.a)(me,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("el-slider",{style:{width:e.isInTable?"100%":e.element.options.isWidgetWidth?e.element.options.width+"%":"100%"},attrs:{disabled:e.disabled,max:e.element.options.max,min:e.element.options.min,range:e.element.options.range,"show-input":e.element.options.showInput,step:e.element.options.step,"format-tooltip":function(t){return t+e.element.options.suffix}},model:{value:e.model,callback:function(t){e.model=t},expression:"model"}})}),[],!1,null,null,null).exports,he={name:"render-editor",extends:q,components:{RichEditor:n("0a4d").a}},ge=Object(v.a)(he,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("rich-editor",{attrs:{disabled:e.disabled,placeholder:e.placeholder},model:{value:e.model,callback:function(t){e.model=t},expression:"model"}})}),[],!1,null,null,null).exports,ve={name:"render-organization",extends:q,components:{OrganizationSelector:n("9a01").a}},be=Object(v.a)(ve,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("organization-selector",{attrs:{"custom-style":{width:e.isInTable?"100%":e.element.options.isWidgetWidth?e.element.options.width+"%":"100%"},disabled:e.disabled,multiple:e.element.options.multiple,placeholder:e.placeholder,"option-scope-type":e.element.options.optionScopeType,readonly:!0},model:{value:e.model,callback:function(t){e.model=t},expression:"model"}})}),[],!1,null,null,null).exports,ye={name:"render-member",extends:be},_e=Object(v.a)(ye,void 0,void 0,!1,null,null,null).exports,we={name:"render-cascader",extends:q},xe=Object(v.a)(we,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("el-cascader",{style:{width:e.isInTable?"100%":e.element.options.isWidgetWidth?e.element.options.width+"%":"100%"},attrs:{clearable:e.element.options.clearable,disabled:e.disabled,options:e.element.options.remote!==e.DATASOURCE_TYPE.STATIC_DATA?[]:e.element.options.options,placeholder:e.placeholder,props:{multiple:e.element.options.multiple,checkStrictly:e.element.options.checkStrictly}},model:{value:e.model,callback:function(t){e.model=t},expression:"model"}})}),[],!1,null,null,null).exports,Ce={name:"render-upload",extends:q,components:{UploadComponent:n("c1ea").a}},Oe=Object(v.a)(Ce,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("upload-component",{style:{width:e.isInTable?"100%":e.element.options.isWidgetWidth?e.element.options.width+"%":"100%"},attrs:{disabled:e.disabled,limit:e.element.options.limit,multiple:e.element.options.multiple,size:e.element.options.size,accept:e.element.options.accept,tip:e.element.options.tip},model:{value:e.model,callback:function(t){e.model=t},expression:"model"}})}),[],!1,null,null,null).exports,Se={name:"render-imageUpload",extends:q,components:{UploadImageComponent:n("7afc").a}},ke=Object(v.a)(Se,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("upload-image-component",{style:{width:e.isInTable?"100%":e.element.options.isWidgetWidth?e.element.options.width+"%":"100%"},attrs:{disabled:e.disabled,limit:e.element.options.limit,multiple:e.element.options.multiple,size:e.element.options.size,tip:e.element.options.tip},model:{value:e.model,callback:function(t){e.model=t},expression:"model"}})}),[],!1,null,null,null).exports,Ee={name:"render-uuid",extends:q,components:{UuidComponent:n("b3da").a}},Te=Object(v.a)(Ee,(function(){var e=this.$createElement;return(this._self._c||e)("uuid-component",{attrs:{"custom-style":{width:this.isInTable?"100%":this.element.options.isWidgetWidth?this.element.options.width+"%":"100%"},value:this.v4()}})}),[],!1,null,null,null).exports,De={name:"render-sequence",extends:q},Ae=Object(v.a)(De,(function(){var e=this.$createElement;return(this._self._c||e)("el-input",{attrs:{value:this.element.options.previewValue,resize:"none",disabled:""}})}),[],!1,null,null,null).exports,Me={name:"render-address",extends:q,components:{AddressComponent:n("ce9d").a}},Re=Object(v.a)(Me,(function(){var e=this.$createElement;return(this._self._c||e)("address-component",{attrs:{disabled:this.disabled,"is-address-detail":this.element.options.isAddressDetail}})}),[],!1,null,null,null).exports,Pe={name:"render-relatedForm",extends:q,components:{RelatedForm:n("40e3").a}},Ie=Object(v.a)(Pe,(function(){var e=this.$createElement;return(this._self._c||e)("related-form",{attrs:{placeholder:this.placeholder}})}),[],!1,null,null,null).exports,Le={name:"render-qrCode",extends:q,components:{QrCodeComponent:n("bfce").a}},je=Object(v.a)(Le,(function(){var e=this.$createElement;return(this._self._c||e)("qr-code-component",{attrs:{options:this.element.options}})}),[],!1,null,null,null).exports,ze=n("7b30"),Fe={name:"designer-divider",extends:q,components:{TextComponent:ze.a}},Be=Object(v.a)(Fe,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("text-component",{attrs:{align:e.element.options.contentPosition}},[n("el-button",{style:e.element.options.customWidth?{width:e.element.options.width+"%"}:"",attrs:{circle:e.element.options.buttonCircle,disabled:e.element.options.disabled,plain:e.element.options.buttonPlain,round:e.element.options.buttonRound,size:e.element.options.buttonSize,type:e.element.options.buttonType}},[e._v(" "+e._s(e.element.options.buttonName)+" ")])],1)}),[],!1,null,"3fd3aae6",null).exports,Ne={name:"designer-divider",extends:q},Ve=Object(v.a)(Ne,(function(){var e=this.$createElement,t=this._self._c||e;return t("div",{style:{paddingTop:this.element.options.paddingTop+"px",paddingBottom:this.element.options.paddingBottom+"px"}},[t("el-divider",{attrs:{"content-position":this.element.options.contentPosition}},[this._v(" "+this._s(this.element.options.text)+" ")])],1)}),[],!1,null,"7be55188",null).exports,He={name:"designer-divider",extends:q},$e=Object(v.a)(He,(function(){var e=this.$createElement,t=this._self._c||e;return this.element.options.href?t("iframe",{staticClass:"iss-iframe",style:{width:this.element.options.width+"%",height:this.element.options.height+"px"},attrs:{src:this.element.options.href}}):t("div",{staticClass:"iss-image-load-failed",style:{width:this.element.options.width+"%",height:this.element.options.height+"px"}},[t("div",{staticClass:"iss-empty-image"}),t("span",[this._v("请配置网页URL地址")])])}),[],!1,null,"4fcc39c5",null).exports,Ue={name:"designer-divider",extends:q},We=Object(v.a)(Ue,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-image",{style:{width:e.element.options.width+"%",height:e.element.options.autoHeight?"auto":e.element.options.height+"px"},attrs:{alt:e.element.name,fit:e.element.options.autoHeight?"fill":e.element.options.fit,src:e.element.options.src,lazy:""}},[n("div",{staticClass:"iss-image-load-failed",attrs:{slot:"error"},slot:"error"},[n("div",{staticClass:"iss-empty-image"}),e.element.options.src?n("span",[e._v(" 图片加载失败,请配置正确的图片链接地址或上传图片 ")]):n("span",[e._v("请上传图片或配置图片链接地址")])])])}),[],!1,null,"073fe560",null).exports,qe={name:"designer-divider",extends:q,components:{TextComponent:ze.a}},Ke=Object(v.a)(qe,(function(){var e=this.$createElement,t=this._self._c||e;return t("text-component",{attrs:{align:this.element.options.contentPosition}},[t("el-link",{attrs:{disabled:this.element.options.disabled,type:this.element.options.linkType,underline:this.element.options.underline}},[this._v(" "+this._s(this.element.options.text)+" ")])],1)}),[],!1,null,"fb52e7b0",null).exports,Ge={name:"designer-text",extends:q,components:{TextComponent:ze.a}},Ye={input:G,textarea:X,number:Q,radio:ee,checkbox:ne,time:re,date:ae,rate:le,select:ue,switches:fe,slider:pe,editor:ge,member:_e,organization:be,cascader:xe,upload:Oe,imageUpload:ke,uuid:Te,sequence:Ae,address:Re,relatedForm:Ie,qrCode:je,button:Be,divider:Ve,iframe:$e,image:We,link:Ke,text:Object(v.a)(Ge,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("text-component",{attrs:{align:e.element.options.contentPosition,"font-color":e.element.options.fontColor,"font-size":e.element.options.fontSize,"font-style":e.element.options.fontStyle,"font-weight":e.element.options.fontWeight,"font-family":e.element.options.fontFamily,"margin-top":e.element.options.marginTop,"margin-bottom":e.element.options.marginBottom}},[e._v(" "+e._s(e.element.options.text)+" ")])}),[],!1,null,"3c24829f",null).exports},Xe={props:["element","select","index","data","platform","formKey","mode"],data:function(){return{Elements:Ye,currentType:"table-item",selectWidget:this.select||{}}},created:function(){this.element.options.isInTable=!0},computed:{isModelValidate:function(){return j.test(this.element.model)}},methods:{handleSelectWidget:function(e){this.selectWidget=this.data[e]},handleWidgetDelete:function(e){var t=this;1===this.data.length?this.$emit("select-change",-1):this.data.length-1===e?this.$emit("select-change",e-1):this.$emit("select-change",e),this.$nextTick((function(){t.data.splice(e,1),setTimeout((function(){s.a.$emit("on-history-add-"+t.formKey)}),20)}))},handleWidgetClone:function(e){var t=this,n=Object(c.a)(),o=Object(a.a)(Object(a.a)({},m.a.cloneDeep(this.data[e])),{},{key:n,model:this.data[e].type+"_"+n});this.data.splice(e+1,0,o),this.$nextTick((function(){t.selectWidget=t.data[e+1],t.$nextTick((function(){s.a.$emit("on-history-add-"+t.formKey)}))}))}},watch:{select:function(e){this.selectWidget=e},selectWidget:{handler:function(e){this.$emit("update:select",e)},deep:!0}}},Je=Object(v.a)(Xe,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.element&&e.element.key?n("div",{staticClass:"widget-table-view",class:{active:e.selectWidget.key===e.element.key,"is-required":e.element.options.required,"is-hidden":e.element.options.hidden,"has-error":!e.isModelValidate,mobile:"section"===e.mode},style:{width:"table"===e.mode?e.element.options.isWidgetWidth?2*e.element.options.width+"px":"200px":""},attrs:{type:e.currentType},on:{click:function(t){return t.stopPropagation(),e.handleSelectWidget(e.index)}}},["table"===e.mode?n("el-table",{attrs:{data:[{}],"row-class-name":"widget-table-row"}},[n("el-table-column",{attrs:{"header-align":"center",label:e.element.options.hideLabel?"":e.element.name,"label-class-name":e.element.options.required?"required":""}},[n(e.Elements[e.element.type],{tag:"component",attrs:{element:e.element,platform:e.platform,isInTable:!0}})],1)],1):e._e(),"section"===e.mode?[n(e.Elements[e.element.type],{tag:"component",attrs:{element:e.element,platform:e.platform,isInTable:!1}})]:e._e(),e.isModelValidate?e._e():n("div",{staticClass:"error-tip",attrs:{title:"请输入由英文、数字及'_'组成,以英文开头,长度为2-50的字符"}},[n("base-icon",{attrs:{"icon-class":"error-warning-fill"}}),e._v(' 组件ID错误:请输入由英文、数字及"_"组成,以英文开头,长度为2-50的字符 ')],1),e.selectWidget.key===e.element.key?n("div",{staticClass:"widget-view-action"},[n("base-icon",{attrs:{"icon-class":"file-copy-line",title:"复制"},on:{click:function(t){return t.stopPropagation(),e.handleWidgetClone(e.index)}}}),n("base-icon",{attrs:{"icon-class":"delete-bin-2-line",title:"删除"},on:{click:function(t){return t.stopPropagation(),e.handleWidgetDelete(e.index)}}})],1):e._e(),e.selectWidget.key===e.element.key?n("div",{staticClass:"widget-view-drag"},[n("base-icon",{attrs:{"icon-class":"drag-move-fill"}})],1):e._e()],2):e._e()}),[],!1,null,null,null).exports,Qe=function e(t){var n=Object(c.a)();return t.children?Object(a.a)(Object(a.a)({},t),{},{key:n,model:t.type+"_"+n,children:t.children.map((function(t){return t.children?Object(a.a)(Object(a.a)({},t),{},{children:t.children.map((function(t){return e(t)})),key:Object(c.a)(),model:t.type+"_"+Object(c.a)()}):e(t)}))}):Object(a.a)(Object(a.a)({},t),{},{key:n,model:t.type+"_"+n})},Ze={components:{Draggable:r.a,TableItem:Je},props:["element","select","index","data","platform","formKey"],data:function(){return{currentType:"table",selectWidget:this.select||{},columnsWidthStyle:"200px"}},computed:{mode:function(){return"pc"===this.platform?"section"===this.element.options.displayMode?"section":"table":"section"}},mounted:function(){this.calcTableColumnsWidth()},methods:{handleSelectWidget:function(e){this.selectWidget=this.data.list[e]},handleWidgetDelete:function(e){var t=this;1===this.data.list.length?this.$emit("select-change",-1):this.data.list.length-1===e?this.$emit("select-change",e-1):this.$emit("select-change",e),this.data.list.splice(e,1),setTimeout((function(){s.a.$emit("on-history-add-"+t.formKey)}),20)},handleTableClone:function(e){var t=this,n=m.a.cloneDeep(this.data.list[e]);this.data.list.splice(e+1,0,Qe(n)),this.$nextTick((function(){t.selectWidget=t.data.list[e+1],t.$nextTick((function(){s.a.$emit("on-history-add-"+t.formKey)}))}))},handleWidgetTableUpdate:function(e){var t=this;this.$nextTick((function(){s.a.$emit("on-history-add-"+t.formKey)}))},calcTableColumnsWidth:function(){this.columnsWidthStyle="calc(400px)";var e=this.element.children.map((function(e){return e.options.isWidgetWidth?"".concat(2*e.options.width,"px"):"200px"}));e.length&&(this.columnsWidthStyle="calc(400px + ".concat(e.join(" + "),")"))},handlePut:function(e,t,n){return Object(l.b)(n.getAttribute("type"),this.currentType)},handleWidgetTableAdd:function(e,t){var n=this,o=e.newIndex,r=Object(c.a)();this.$set(t.children,o,m.a.cloneDeep(t.children[o])),this.$set(t.children,o,Object(a.a)(Object(a.a)({},t.children[o]),{},{options:Object(a.a)(Object(a.a)({},t.children[o].options),{},{remoteFunc:t.children[o].options.remoteFunc||"func_"+r,remoteOptionSource:t.children[o].options.remoteOptionSource||"option_"+r,tableColumn:!0}),key:t.children[o].key?t.children[o].key:r,model:t.children[o].model?t.children[o].model:t.children[o].type+"_"+r,rules:t.children[o].rules?Object(i.a)(t.children[o].rules):[]})),this.selectWidget=t.children[o],this.$nextTick((function(){s.a.$emit("on-history-add-"+n.formKey)}))},handleSelectChange:function(e,t){var n=this;setTimeout((function(){n.selectWidget=e>=0?n.element.children[e]:n.data.list[n.index]}))}},watch:{select:function(e){this.selectWidget=e},selectWidget:{deep:!0,handler:function(e){this.$emit("update:select",e)}},element:{deep:!0,handler:function(e){this.calcTableColumnsWidth()}}}},et=Object(v.a)(Ze,(function(){var e,t=this,n=t.$createElement,o=t._self._c||n;return o("div",{staticClass:"widget-table"},[o("el-form-item",{class:(e={},e[t.element.options&&t.element.options.customClass]=t.element.options.customClass,e),attrs:{label:t.element.options.hideLabel?"":t.element.name,"label-width":t.element.options.hideLabel?"0px":t.element.options.isLabelWidth?t.element.options.labelWidth+"px":""}},[o("div",{staticClass:"widget-table-wrapper",class:{mobile:"section"===t.mode}},["table"===t.mode?o("el-table",{staticClass:"widget-table-left",attrs:{data:[{}],"row-class-name":"widget-table-row"}},[o("el-table-column",{attrs:{align:"center",label:"序号",type:"index",width:"50"}})],1):o("div",{staticClass:"widget-table-top"},[t.element.options.enableDynamicTableTitle&&t.element.options.relatedField?o("span",{staticClass:"renderer-table-mobile-title"},[t._v(" "+t._s(t.element.children.find((function(e){return e.model===t.element.options.relatedField}))?t.element.children.find((function(e){return e.model===t.element.options.relatedField})).name:"未配置")+" ")]):o("el-link",[t._v(t._s("{{编号}}"))])],1),o("div",{staticClass:"widget-table-content",class:{mobile:"section"===t.mode}},[0===t.element.children.length?o("div",{staticClass:"table-empty"},[t._v("拖拽组件到这里")]):t._e(),o("draggable",{staticClass:"widget-col-list",attrs:{animation:200,direction:"table"===t.mode?"horizontal":"vertical",group:{name:"icdTableDesigner",put:t.handlePut},"no-transition-on-drag":!0,ghostClass:"ghost",handle:".widget-view-drag"},on:{add:function(e){return t.handleWidgetTableAdd(e,t.element)},update:t.handleWidgetTableUpdate},model:{value:t.element.children,callback:function(e){t.$set(t.element,"children",e)},expression:"element.children"}},[o("transition-group",{staticClass:"widget-table-col",style:{width:"table"===t.mode?t.columnsWidthStyle:"100%"},attrs:{name:"fade",tag:"div"}},t._l(t.element.children,(function(e,n){return e.key?o("table-item",{key:e.key,attrs:{data:t.element.children,element:e,"form-key":t.formKey,index:n,mode:t.mode,platform:t.platform,select:t.selectWidget,tableElement:t.element},on:{"update:select":function(e){t.selectWidget=e},"select-change":function(n){return t.handleSelectChange(n,e)}}}):t._e()})),1)],1)],1)],1),t.element.options.maxLimit?o("span",{staticClass:"max-limit-tip"},[t._v("最多可填写 "+t._s(t.element.options.maxRows)+" 条数据,当前已填写 0 条")]):t._e()])],1)}),[],!1,null,null,null).exports,tt={name:"widget-inline",mixins:[p],components:{Draggable:r.a,BaseElementItem:function(){return Promise.resolve().then(n.bind(null,"71f6"))}},props:["element","select","index","children","platform","formKey"],data:function(){return{currentType:"inline"}}},nt={card:y,grid:C,collapse:E,report:M,tabs:L,table:et,inline:Object(v.a)(tt,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"widget-inline",class:{"is-empty":0===e.element.children.length},attrs:{shadow:e.element.options.shadow}},[n("draggable",{staticClass:"widget-col-list",attrs:{animation:200,group:{name:"icdDesigner",put:e.handlePut},"no-transition-on-drag":!0,ghostClass:"ghost",handle:".widget-view-drag"},on:{add:function(t){return e.handlePluginAdd(t,e.element)},update:e.handlePluginUpdate},model:{value:e.element.children,callback:function(t){e.$set(e.element,"children",t)},expression:"element.children"}},[e._l(e.element.children,(function(t,o){return[t&&t.key?n("base-element-item",{key:t.key,attrs:{children:e.element.children,element:t,"form-key":e.formKey,index:o,platform:e.platform,select:e.selectWidget},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t)}}}):e._e()]}))],2)],1)}),[],!1,null,null,null).exports},ot=n("522e"),rt=n("fee3"),it={props:["element","select","index","children","formKey","platform","isInTable"],name:"BaseElementItem",data:function(){return{plugins:Ye,Containers:nt,selectWidget:this.select||{},componentConfig:ot.a,errorMessage:""}},computed:{isContainer:function(){return ot.a[this.element.type]&&ot.a[this.element.type].isContainer},isModelValidate:function(){var e=!0;return(rt.d[this.element.type]||"input"===this.element.type&&this.element.options.relatedFormEnabled)&&(e=this.element.options.relatedFormInfo.formId.length>0,this.updateErrorMessage("请选择关联表单"),e&&(e=this.element.options.relatedFormInfo.targetColumn.length>0,this.updateErrorMessage("请选择关联字段"))),e&&(e=j.test(this.element.model),this.updateErrorMessage('组件ID错误:请输入由英文、数字及"_"组成,以英文开头,长度为2-50的字符')),e},pluginLabelWidth:function(){return this.element.options.hideLabel?"0px":this.element.options.isLabelWidth?this.element.options.labelWidth+"px":""}},methods:{updateErrorMessage:function(e){this.errorMessage=e},handleSelectWidget:function(e){this.selectWidget=this.children[e]},handleWidgetDelete:function(e){var t=this;1===this.children.length?this.$emit("select-change",-1):this.children.length-1===e?this.$emit("select-change",e-1):this.$emit("select-change",e),this.$nextTick((function(){t.children.splice(e,1),setTimeout((function(){s.a.$emit("on-history-add-"+t.formKey)}),20)}))},handleWidgetClone:function(e){var t=this,n=m.a.cloneDeep(this.children[e]);this.children.splice(e+1,0,Qe(n)),this.$nextTick((function(){t.selectWidget=t.children[e+1],t.$nextTick((function(){s.a.$emit("on-history-add-"+t.formKey)}))}))},handleSelectChange:function(e){var t=this;setTimeout((function(){t.selectWidget=e>=0?t.widgetForm.list[e]:{}}))}},watch:{select:function(e){this.selectWidget=e},selectWidget:{handler:function(e){this.$emit("update:select",e)},deep:!0}}},at=Object(v.a)(it,(function(){var e,t=this,n=t.$createElement,o=t._self._c||n;return o("div",{staticClass:"widget-view",class:{active:t.selectWidget.key===t.element.key,"is-required":t.element.options.required,"is-hidden":t.element.options.hidden,"is-container":t.isContainer,"has-error":!t.isModelValidate},attrs:{type:t.element.type},on:{click:function(e){return e.stopPropagation(),t.handleSelectWidget(t.index)}}},[t.element&&t.element.key?[t.isContainer?o(t.Containers[t.element.type],{tag:"component",attrs:{children:t.element.children,element:t.element,index:t.index,formKey:t.formKey,platform:t.platform,select:t.selectWidget},on:{"update:select":function(e){t.selectWidget=e},"select-change":t.handleSelectChange}}):o("el-form-item",{class:(e={"no-form-label":!t.element.options.labelWidth},e[t.element.options&&t.element.options.customClass]=t.element.options.customClass,e),attrs:{label:t.element.options.hideLabel||!t.element.options.labelWidth?"":t.element.name,"label-width":t.pluginLabelWidth}},[o(t.plugins[t.element.type],{tag:"component",attrs:{element:t.element,platform:t.platform,isInTable:!1}})],1)]:t._e(),t.isModelValidate?t._e():o("div",{staticClass:"error-tip",attrs:{title:t.errorMessage}},[o("base-icon",{attrs:{"icon-class":"error-warning-fill"}}),t._v(" "+t._s("组件错误: "+t.errorMessage)+" ")],1),t.selectWidget.key===t.element.key?[o("div",{staticClass:"widget-view-action"},[t._t("default"),o("base-icon",{attrs:{"icon-class":"file-copy-line",title:"复制"},on:{click:function(e){return e.stopPropagation(),t.handleWidgetClone(t.index)}}}),o("base-icon",{attrs:{"icon-class":"delete-bin-2-line",title:"删除"},on:{click:function(e){return e.stopPropagation(),t.handleWidgetDelete(t.index)}}})],2),o("div",{staticClass:"widget-view-drag"},[o("base-icon",{attrs:{"icon-class":"drag-move-fill"}})],1)]:t._e()],2)}),[],!1,null,null,null);t.default=at.exports},"721a":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n("fd7c"),a=(o=i)&&o.__esModule?o:{default:o},s=n("ab5b");var l=function(){function e(t,n,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.canvas=t,this.encodings=n,this.options=o}return r(e,[{key:"render",value:function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var e=0;e<this.encodings.length;e++){var t=(0,a.default)(this.options,this.encodings[e].options);this.drawCanvasBarcode(t,this.encodings[e]),this.drawCanvasText(t,this.encodings[e]),this.moveCanvasDrawing(this.encodings[e])}this.restoreCanvas()}},{key:"prepareCanvas",value:function(){var e=this.canvas.getContext("2d");e.save(),(0,s.calculateEncodingAttributes)(this.encodings,this.options,e);var t=(0,s.getTotalWidthOfEncodings)(this.encodings),n=(0,s.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=t+this.options.marginLeft+this.options.marginRight,this.canvas.height=n,e.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(e.fillStyle=this.options.background,e.fillRect(0,0,this.canvas.width,this.canvas.height)),e.translate(this.options.marginLeft,0)}},{key:"drawCanvasBarcode",value:function(e,t){var n,o=this.canvas.getContext("2d"),r=t.data;n="top"==e.textPosition?e.marginTop+e.fontSize+e.textMargin:e.marginTop,o.fillStyle=e.lineColor;for(var i=0;i<r.length;i++){var a=i*e.width+t.barcodePadding;"1"===r[i]?o.fillRect(a,n,e.width,e.height):r[i]&&o.fillRect(a,n,e.width,e.height*r[i])}}},{key:"drawCanvasText",value:function(e,t){var n,o,r=this.canvas.getContext("2d"),i=e.fontOptions+" "+e.fontSize+"px "+e.font;e.displayValue&&(o="top"==e.textPosition?e.marginTop+e.fontSize-e.textMargin:e.height+e.textMargin+e.marginTop+e.fontSize,r.font=i,"left"==e.textAlign||t.barcodePadding>0?(n=0,r.textAlign="left"):"right"==e.textAlign?(n=t.width-1,r.textAlign="right"):(n=t.width/2,r.textAlign="center"),r.fillText(t.text,n,o))}},{key:"moveCanvasDrawing",value:function(e){this.canvas.getContext("2d").translate(e.width,0)}},{key:"restoreCanvas",value:function(){this.canvas.getContext("2d").restore()}}]),e}();t.default=l},7418:function(e,t){t.f=Object.getOwnPropertySymbols},7461:function(e,t,n){"use strict";var o={name:"BaseIcon",props:{iconClass:String}},r=(n("b3f1"),n("2877")),i=Object(r.a)(o,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("i",{staticClass:"base-icon",class:"ri-"+e.iconClass,on:{click:function(t){return e.$emit("click",t)}}})}),[],!1,null,"3e34b48e",null);t.a=i.exports},"746f":function(e,t,n){var o=n("428f"),r=n("1a2d"),i=n("e538"),a=n("9bf2").f;e.exports=function(e){var t=o.Symbol||(o.Symbol={});r(t,e)||a(t,e,{value:i.f(e)})}},"752b":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=a(n("721a")),r=a(n("be5e")),i=a(n("4ced"));function a(e){return e&&e.__esModule?e:{default:e}}t.default={CanvasRenderer:o.default,SVGRenderer:r.default,ObjectRenderer:i.default}},7694:function(e,t,n){"use strict";n.d(t,"m",(function(){return y})),n.d(t,"f",(function(){return _})),n.d(t,"g",(function(){return w})),n.d(t,"n",(function(){return x})),n.d(t,"l",(function(){return C})),n.d(t,"o",(function(){return O})),n.d(t,"j",(function(){return S})),n.d(t,"i",(function(){return k})),n.d(t,"e",(function(){return E})),n.d(t,"h",(function(){return T})),n.d(t,"k",(function(){return D})),n.d(t,"p",(function(){return A})),n.d(t,"d",(function(){return M})),n.d(t,"q",(function(){return R})),n.d(t,"b",(function(){return P})),n.d(t,"a",(function(){return I})),n.d(t,"c",(function(){return L}));n("d9e2");var o=null,r=null,i=null,a=null,s=null,l=null,c=null,u=null,d=null,f=null,m=null,p=null,h=null,g=null,v=null,b=null,y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o=e.getDictItemsByParentId,r=e.getDictListByPage,i=e.ossServiceInfo,e.fileDownload,a=e.getUserList,s=e.searchUser,l=e.getOrgTree,c=e.getFormInfoListByPage,u=e.getColumnList,d=e.getFormDataListByPage,f=e.getThirdApiListByPage,m=e.triggerThirdApi,p=e.exportFormModel2Excel,h=e.uploadExcel,g=e.excelData2Table,v=e.batchDownload,b=e.exportFormData},_=function(e){return o?o(e):new Error("adapter must use after initialization!")},w=function(e){return r?r(e):new Error("adapter must use after initialization!")},x=function(e){return i?i(e):new Error("adapter must use after initialization!")},C=function(e){return a?a(e):new Error("adapter must use after initialization!")},O=function(e){return s?s(e):new Error("adapter must use after initialization!")},S=function(e){return l?l(e):new Error("adapter must use after initialization!")},k=function(e){return c?c(e):new Error("adapter must use after initialization!")},E=function(e){return u?u(e):new Error("adapter must use after initialization!")},T=function(e){return d?d(e):new Error("adapter must use after initialization!")},D=function(e){return f?f(e):new Error("adapter must use after initialization!")},A=function(e){return m?m(e):new Error("adapter must use after initialization!")},M=function(e){return p?p(e):new Error("adapter must use after initialization!")},R=function(e){return h?h(e):new Error("adapter must use after initialization!")},P=function(e){return g?g(e):new Error("adapter must use after initialization!")},I=function(e){return v?v(e):new Error("adapter must use after initialization!")},L=function(e){return b?b(e):new Error("adapter must use after initialization!")}},7839:function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"785a":function(e,t,n){var o=n("cc12")("span").classList,r=o&&o.constructor&&o.constructor.prototype;e.exports=r===Object.prototype?void 0:r},"79f1":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.marginTop=e.marginTop||e.margin,e.marginBottom=e.marginBottom||e.margin,e.marginRight=e.marginRight||e.margin,e.marginLeft=e.marginLeft||e.margin,e}},"7a77":function(e,t,n){"use strict";function o(e){this.message=e}o.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},o.prototype.__CANCEL__=!0,e.exports=o},"7aac":function(e,t,n){"use strict";var o=n("c532");e.exports=o.isStandardBrowserEnv()?{write:function(e,t,n,r,i,a){var s=[];s.push(e+"="+encodeURIComponent(t)),o.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),o.isString(r)&&s.push("path="+r),o.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},"7afc":function(e,t,n){"use strict";n("a9e3"),n("d81d"),n("d3b7"),n("159b"),n("b0c0"),n("a434"),n("c740"),n("99af"),n("4de4");var o=n("7694"),r=n("5530"),i=(n("b64b"),n("07ac"),n("b680"),n("8bbf")),a=n.n(i);const s=a.a.prototype.$isServer,l=/([\:\-\_]+(.))/g,c=/^moz([A-Z])/,u=s?0:Number(document.documentMode),d=function(e){return e.replace(l,(function(e,t,n,o){return o?n.toUpperCase():n})).replace(c,"Moz$1")},f=!s&&document.addEventListener?function(e,t,n){e&&t&&n&&e.addEventListener(t,n,!1)}:function(e,t,n){e&&t&&n&&e.attachEvent("on"+t,n)},m=!s&&document.removeEventListener?function(e,t,n){e&&t&&e.removeEventListener(t,n,!1)}:function(e,t,n){e&&t&&e.detachEvent("on"+t,n)};function p(e,t){if(!e||!t)return!1;if(-1!==t.indexOf(" "))throw new Error("className should not contain space.");return e.classList?e.classList.contains(t):(" "+e.className+" ").indexOf(" "+t+" ")>-1}function h(e,t){if(e){for(var n=e.className,o=(t||"").split(" "),r=0,i=o.length;r<i;r++){var a=o[r];a&&(e.classList?e.classList.add(a):p(e,a)||(n+=" "+a))}e.classList||e.setAttribute("class",n)}}function g(e,t){if(e&&t){for(var n=t.split(" "),o=" "+e.className+" ",r=0,i=n.length;r<i;r++){var a=n[r];a&&(e.classList?e.classList.remove(a):p(e,a)&&(o=o.replace(" "+a+" "," ")))}e.classList||e.setAttribute("class",(o||"").replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g,""))}}const v=u<9?function(e,t){if(!s){if(!e||!t)return null;"float"===(t=d(t))&&(t="styleFloat");try{switch(t){case"opacity":try{return e.filters.item("alpha").opacity/100}catch(e){return 1}default:return e.style[t]||e.currentStyle?e.currentStyle[t]:null}}catch(n){return e.style[t]}}}:function(e,t){if(!s){if(!e||!t)return null;"float"===(t=d(t))&&(t="cssFloat");try{var n=document.defaultView.getComputedStyle(e,"");return e.style[t]||n?n[t]:null}catch(n){return e.style[t]}}};let b=e=>e&&"[object Function]"==={}.toString.call(e);"object"==typeof Int8Array||!a.a.prototype.$isServer&&document.childNodes;Object.prototype.hasOwnProperty;function y(e){let t=!1;return function(...n){t||(t=!0,window.requestAnimationFrame(o=>{e.apply(this,n),t=!1}))}}let _,w=!1,x=!1;const C=function(){if(a.a.prototype.$isServer)return;let e=S.modalDom;return e?w=!0:(w=!1,e=document.createElement("div"),S.modalDom=e,e.addEventListener("touchmove",(function(e){e.preventDefault(),e.stopPropagation()})),e.addEventListener("click",(function(){S.doOnModalClick&&S.doOnModalClick()}))),e},O={},S={modalFade:!0,getInstance:function(e){return O[e]},register:function(e,t){e&&t&&(O[e]=t)},deregister:function(e){e&&(O[e]=null,delete O[e])},nextZIndex:function(){return S.zIndex++},modalStack:[],doOnModalClick:function(){const e=S.modalStack[S.modalStack.length-1];if(!e)return;const t=S.getInstance(e.id);t&&t.closeOnClickModal&&t.close()},openModal:function(e,t,n,o,r){if(a.a.prototype.$isServer)return;if(!e||void 0===t)return;this.modalFade=r;const i=this.modalStack;for(let t=0,n=i.length;t<n;t++){if(i[t].id===e)return}const s=C();if(h(s,"v-modal"),this.modalFade&&!w&&h(s,"v-modal-enter"),o){o.trim().split(/\s+/).forEach(e=>h(s,e))}setTimeout(()=>{g(s,"v-modal-enter")},200),n&&n.parentNode&&11!==n.parentNode.nodeType?n.parentNode.appendChild(s):document.body.appendChild(s),t&&(s.style.zIndex=t),s.tabIndex=0,s.style.display="",this.modalStack.push({id:e,zIndex:t,modalClass:o})},closeModal:function(e){const t=this.modalStack,n=C();if(t.length>0){const o=t[t.length-1];if(o.id===e){if(o.modalClass){o.modalClass.trim().split(/\s+/).forEach(e=>g(n,e))}t.pop(),t.length>0&&(n.style.zIndex=t[t.length-1].zIndex)}else for(let n=t.length-1;n>=0;n--)if(t[n].id===e){t.splice(n,1);break}}0===t.length&&(this.modalFade&&h(n,"v-modal-leave"),setTimeout(()=>{0===t.length&&(n.parentNode&&n.parentNode.removeChild(n),n.style.display="none",S.modalDom=void 0),g(n,"v-modal-leave")},200))}};Object.defineProperty(S,"zIndex",{configurable:!0,get:()=>(x||(_=_||(a.a.prototype.$ELEMENT||{}).zIndex||2e3,x=!0),_),set(e){_=e}});a.a.prototype.$isServer||window.addEventListener("keydown",(function(e){if(27===e.keyCode){const e=function(){if(!a.a.prototype.$isServer&&S.modalStack.length>0){const e=S.modalStack[S.modalStack.length-1];if(!e)return;return S.getInstance(e.id)}}();e&&e.closeOnPressEscape&&(e.handleClose?e.handleClose():e.handleAction?e.handleAction("cancel"):e.close())}}));var k=S;let E;let T,D=1;Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;var A={CONTAIN:{name:"contain",icon:"el-icon-full-screen"},ORIGINAL:{name:"original",icon:"el-icon-c-scale-to-original"}},M=!a.a.prototype.$isServer&&window.navigator.userAgent.match(/firefox/i)?"DOMMouseScroll":"mousewheel",R={name:"elImageViewer",props:{urlList:{type:Array,default:function(){return[]}},zIndex:{type:Number,default:2e3},onSwitch:{type:Function,default:function(){}},onClose:{type:Function,default:function(){}},initialIndex:{type:Number,default:0},appendToBody:{type:Boolean,default:!0},maskClosable:{type:Boolean,default:!0}},data:function(){return{index:this.initialIndex,isShow:!1,infinite:!0,loading:!1,mode:A.CONTAIN,transform:{scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}}},computed:{isSingle:function(){return this.urlList.length<=1},isFirst:function(){return 0===this.index},isLast:function(){return this.index===this.urlList.length-1},currentImg:function(){return this.urlList[this.index]},imgStyle:function(){var e=this.transform,t=e.scale,n=e.deg,o=e.offsetX,r=e.offsetY,i=e.enableTransition,a={transform:"scale(".concat(t,") rotate(").concat(n,"deg)"),transition:i?"transform .3s":"","margin-left":"".concat(o,"px"),"margin-top":"".concat(r,"px")};return this.mode===A.CONTAIN&&(a.maxWidth=a.maxHeight="100%"),a},viewerZIndex:function(){var e=k.nextZIndex();return this.zIndex>e?this.zIndex:e}},watch:{index:{handler:function(e){this.reset(),this.onSwitch(e)}},currentImg:function(e){var t=this;this.$nextTick((function(e){t.$refs.img[0].complete||(t.loading=!0)}))}},methods:{hide:function(){this.deviceSupportUninstall(),this.onClose()},deviceSupportInstall:function(){var e=this;this._keyDownHandler=function(t){switch(t.stopPropagation(),t.keyCode){case 27:e.hide();break;case 32:e.toggleMode();break;case 37:e.prev();break;case 38:e.handleActions("zoomIn");break;case 39:e.next();break;case 40:e.handleActions("zoomOut")}},this._mouseWheelHandler=y((function(t){(t.wheelDelta?t.wheelDelta:-t.detail)>0?e.handleActions("zoomIn",{zoomRate:.015,enableTransition:!1}):e.handleActions("zoomOut",{zoomRate:.015,enableTransition:!1})})),f(document,"keydown",this._keyDownHandler),f(document,M,this._mouseWheelHandler)},deviceSupportUninstall:function(){m(document,"keydown",this._keyDownHandler),m(document,M,this._mouseWheelHandler),this._keyDownHandler=null,this._mouseWheelHandler=null},handleImgLoad:function(e){this.loading=!1},handleImgError:function(e){this.loading=!1,e.target.alt="加载失败"},handleMouseDown:function(e){var t=this;if(!this.loading&&0===e.button){var n=this.transform,o=n.offsetX,r=n.offsetY,i=e.pageX,a=e.pageY;this._dragHandler=y((function(e){t.transform.offsetX=o+e.pageX-i,t.transform.offsetY=r+e.pageY-a})),f(document,"mousemove",this._dragHandler),f(document,"mouseup",(function(e){m(document,"mousemove",t._dragHandler)})),e.preventDefault()}},handleMaskClick:function(){this.maskClosable&&this.hide()},reset:function(){this.transform={scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}},toggleMode:function(){if(!this.loading){var e=Object.keys(A),t=(Object.values(A).indexOf(this.mode)+1)%e.length;this.mode=A[e[t]],this.reset()}},prev:function(){if(!this.isFirst||this.infinite){var e=this.urlList.length;this.index=(this.index-1+e)%e}},next:function(){if(!this.isLast||this.infinite){var e=this.urlList.length;this.index=(this.index+1)%e}},handleActions:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.loading){var n=Object(r.a)({zoomRate:.2,rotateDeg:90,enableTransition:!0},t),o=n.zoomRate,i=n.rotateDeg,a=n.enableTransition,s=this.transform;switch(e){case"zoomOut":s.scale>.2&&(s.scale=parseFloat((s.scale-o).toFixed(3)));break;case"zoomIn":s.scale=parseFloat((s.scale+o).toFixed(3));break;case"clocelise":s.deg+=i;break;case"anticlocelise":s.deg-=i}s.enableTransition=a}}},mounted:function(){this.deviceSupportInstall(),this.appendToBody&&document.body.appendChild(this.$el),this.$refs["el-image-viewer__wrapper"].focus()},destroyed:function(){this.appendToBody&&this.$el&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el)}},P=n("2877"),I={name:"UploadImageComponent",components:{ImagePreviewer:Object(P.a)(R,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:"viewer-fade"}},[n("div",{ref:"el-image-viewer__wrapper",staticClass:"el-image-viewer__wrapper",style:{"z-index":e.viewerZIndex},attrs:{tabindex:"-1"}},[n("div",{staticClass:"el-image-viewer__mask",on:{click:function(t){return t.target!==t.currentTarget?null:e.handleMaskClick.apply(null,arguments)}}}),n("span",{staticClass:"el-image-viewer__btn el-image-viewer__close",on:{click:e.hide}},[n("i",{staticClass:"el-icon-close"})]),e.isSingle?e._e():[n("span",{staticClass:"el-image-viewer__btn el-image-viewer__prev",class:{"is-disabled":!e.infinite&&e.isFirst},on:{click:e.prev}},[n("i",{staticClass:"el-icon-arrow-left"})]),n("span",{staticClass:"el-image-viewer__btn el-image-viewer__next",class:{"is-disabled":!e.infinite&&e.isLast},on:{click:e.next}},[n("i",{staticClass:"el-icon-arrow-right"})])],n("div",{staticClass:"el-image-viewer__btn el-image-viewer__actions"},[n("div",{staticClass:"el-image-viewer__actions__inner"},[n("i",{staticClass:"el-icon-zoom-out",on:{click:function(t){return e.handleActions("zoomOut")}}}),n("i",{staticClass:"el-icon-zoom-in",on:{click:function(t){return e.handleActions("zoomIn")}}}),n("i",{staticClass:"el-image-viewer__actions__divider"}),n("i",{class:e.mode.icon,on:{click:e.toggleMode}}),n("i",{staticClass:"el-image-viewer__actions__divider"}),n("i",{staticClass:"el-icon-refresh-left",on:{click:function(t){return e.handleActions("anticlocelise")}}}),n("i",{staticClass:"el-icon-refresh-right",on:{click:function(t){return e.handleActions("clocelise")}}})])]),n("div",{staticClass:"el-image-viewer__canvas"},e._l(e.urlList,(function(t,o){return o===e.index?n("img",{key:t,ref:"img",refInFor:!0,staticClass:"el-image-viewer__img",style:e.imgStyle,attrs:{src:e.currentImg},on:{load:e.handleImgLoad,error:e.handleImgError,mousedown:e.handleMouseDown}}):e._e()})),0)],2)])}),[],!1,null,null,null).exports},props:{value:{type:Array,default:function(){return[]}},multiple:{type:Boolean,default:!1},limit:{type:Number,default:9},size:{type:Number,default:50},disabled:{type:Boolean,default:!1},tip:{type:String,default:""},printRead:{type:Boolean,default:!1}},model:{prop:"value",event:"change"},data:function(){return{fileList:[],serverInfo:Object(o.n)(),dialogImageUrl:"",dialogVisible:!1}},created:function(){this.fileList=(this.value||[]).map((function(e){return e.status="success",e})),this.handleEmitChange()},methods:{handleRemove:function(e,t){this.fileList=t,this.$emit("onRemove",e),this.handleEmitChange()},handlePreview:function(e){this.dialogImageUrl=e.url,this.dialogVisible=!0},handleClosePreview:function(){this.dialogImageUrl="",this.dialogVisible=!1},handleSuccess:function(e,t,n){if("0000"!==e.code){this.$message.error("文件上传失败!");var o=0;return n.forEach((function(e,n){e.name===t.name&&(o=n)})),void n.splice(o,1)}this.$emit("onSuccess");var r=n.findIndex((function(e){return e.uid===t.uid}));r>=0&&(n[r]={status:"success",name:t.name,url:"".concat(this.serverInfo.baseUrl).concat(e.data&&e.data.length&&e.data[0])},this.fileList=n,this.handleEmitChange())},handleExceed:function(e,t){this.$message.warning("本次选择了 ".concat(e.length," 个图片,共选择了 ").concat(e.length+t.length," 个图片,已超出当前限制 ").concat(this.limit," 个图片"))},handleDownload:function(e){},handleBeforeUpload:function(e){if(e.size>1024*this.size*1024)return this.$message.error("".concat(e.name," 图片大小已大于 ").concat(this.size," MB ,上传失败!")),!1},handleEmitChange:function(){var e=this.fileList.filter((function(e){return"success"===e.status})).map((function(e){return{name:e.name,url:e.url}}));this.$emit("change",e)}}},L=(n("073a"),Object(P.a)(I,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-upload",{staticClass:"iss-upload-file",class:{"print-read":e.printRead},attrs:{action:e.serverInfo.action,"before-upload":e.handleBeforeUpload,disabled:e.disabled||e.printRead,"file-list":e.fileList,headers:e.serverInfo.headers,limit:e.limit,multiple:e.multiple,"on-exceed":e.handleExceed,"on-preview":e.handlePreview,"on-remove":e.handleRemove,"on-success":e.handleSuccess,accept:"image/*","list-type":"picture-card"}},[n("div",{staticClass:"iss-upload-button",attrs:{size:"mini",type:"primary"}},[n("base-icon",{attrs:{"icon-class":"image-add-fill"}})],1),n("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[e._v(" 1.限制上传 "+e._s(e.multiple?e.limit:"1")+" 个图片,且每个附件不超过 "+e._s(e.size)+" MB "),n("br"),e._v("2.只能上传图片类型文件 "),e.tip?[n("br"),e._v("3."+e._s(e.tip))]:e._e(),e.dialogVisible?n("image-previewer",{attrs:{"on-close":e.handleClosePreview,"url-list":[e.dialogImageUrl],"z-index":1e4,"append-to-body":"","mask-closable":""}}):e._e()],2)])}),[],!1,null,null,null));t.a=L.exports},"7b0b":function(e,t,n){var o=n("da84"),r=n("1d80"),i=o.Object;e.exports=function(e){return i(r(e))}},"7b30":function(e,t,n){"use strict";n("a9e3");var o={name:"TextComponent",props:{align:{type:String,default:"left"},fontSize:{type:String,default:"14px"},fontColor:{type:String,default:"#3E464C"},fontWeight:{type:String,default:"normal"},fontStyle:{type:String,default:"normal"},fontFamily:{type:String,default:"inherit"},marginTop:Number,marginBottom:Number}},r=(n("404a"),n("2877")),i=Object(r.a)(o,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",{staticClass:"text-component",style:{textAlign:e.align,color:e.fontColor,fontSize:e.fontSize,fontStyle:e.fontStyle,fontWeight:e.fontWeight,fontFamily:e.fontFamily,marginTop:e.marginTop+"px",marginBottom:e.marginBottom+"px"}},[e._t("default")],2)}),[],!1,null,"71ca9a5c",null);t.a=i.exports},"7c4f":function(e,t){!function(){"use strict";var e,t,n,o,r,i=function(e){var t=e;return{get:function(){return t},set:function(e){t=e}}},a=tinymce.util.Tools.resolve("tinymce.PluginManager"),s=(e="array",function(t){return o=typeof(n=t),(null===n?"null":"object"===o&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"===o&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":o)===e;var n,o}),l=function(e){return!function(e){return null==e}(e)},c=function(e){return function(t){return typeof t===e}}("function"),u=function(){},d=function(e){return function(){return e}},f=function(e){return e},m=d(!1),p=d(!0),h=function(){return g},g={fold:function(e,t){return e()},isSome:m,isNone:p,getOr:n=f,getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:d(null),getOrUndefined:d(void 0),or:n,orThunk:t,map:h,each:u,bind:h,exists:m,forall:p,filter:function(){return h()},toArray:function(){return[]},toString:d("none()")},v=function(e){var t=d(e),n=function(){return r},o=function(t){return t(e)},r={fold:function(t,n){return n(e)},isSome:p,isNone:m,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:n,orThunk:n,map:function(t){return v(t(e))},each:function(t){t(e)},bind:o,exists:o,forall:o,filter:function(t){return t(e)?r:g},toArray:function(){return[e]},toString:function(){return"some("+e+")"}};return r},b={some:v,none:h,from:function(e){return null==e?g:v(e)}},y=Array.prototype.slice,_=Array.prototype.push,w=function(e,t){for(var n=0,o=e.length;n<o;n++){if(t(e[n],n))return!0}return!1},x=function(e,t){for(var n=e.length,o=new Array(n),r=0;r<n;r++){var i=e[r];o[r]=t(i,r)}return o},C=function(e,t){for(var n=0,o=e.length;n<o;n++){t(e[n],n)}},O=function(e,t){return function(e){for(var t=[],n=0,o=e.length;n<o;++n){if(!s(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);_.apply(t,e[n])}return t}(x(e,t))},S=c(Array.from)?Array.from:function(e){return y.call(e)},k=function(){return(k=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},E=function(){var e=function(e){var t=i(b.none()),n=function(){return t.get().each(e)};return{clear:function(){n(),t.set(b.none())},isSet:function(){return t.get().isSome()},get:function(){return t.get()},set:function(e){n(),t.set(b.some(e))}}}(u);return k(k({},e),{on:function(t){return e.get().each(t)}})},T=function(e,t,n){return""===t||e.length>=t.length&&e.substr(n,n+t.length)===t},D=tinymce.util.Tools.resolve("tinymce.Env"),A=tinymce.util.Tools.resolve("tinymce.util.Delay"),M=tinymce.util.Tools.resolve("tinymce.util.Promise"),R=tinymce.util.Tools.resolve("tinymce.util.VK"),P=function(e,t){return e.fire("PastePlainTextToggle",{state:t})},I=tinymce.util.Tools.resolve("tinymce.util.Tools"),L=function(e){return e.getParam("paste_data_images",!1)},j=function(e){return e.getParam("paste_merge_formats",!0)},z=function(e){return e.getParam("paste_retain_style_properties")},F=function(e){return e.getParam("validate")},B=function(e){return e.getParam("allow_html_data_urls",!1,"boolean")},N=function(e){return e.getParam("paste_data_images",!1,"boolean")},V=function(e){return I.explode(e.getParam("images_file_types","jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp","string"))},H=function(e){return-1!==e.indexOf("\x3c!-- x-tinymce/html --\x3e")},$=d("x-tinymce/html"),U=Object.hasOwnProperty,W=function(e,t){return U.call(e,t)},q=tinymce.util.Tools.resolve("tinymce.html.Entities"),K=function(e,t,n){var o=e.split(/\n\n/),r=function(e,t){var n=[],o="<"+e;if("object"==typeof t){for(var r in t)W(t,r)&&n.push(r+'="'+q.encodeAllRaw(t[r])+'"');n.length&&(o+=" "+n.join(" "))}return o+">"}(t,n),i="</"+t+">",a=I.map(o,(function(e){return e.split(/\n/).join("<br />")}));return 1===a.length?a[0]:I.map(a,(function(e){return r+e+i})).join("")},G=tinymce.util.Tools.resolve("tinymce.html.DomParser"),Y=tinymce.util.Tools.resolve("tinymce.html.Serializer"),X=tinymce.util.Tools.resolve("tinymce.html.Node"),J=tinymce.util.Tools.resolve("tinymce.html.Schema"),Q=function(e,t){return I.each(t,(function(t){e=t.constructor===RegExp?e.replace(t,""):e.replace(t[0],t[1])})),e},Z=function(e){return e=Q(e,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,function(e,t,n){return t||n?" ":" "}],/<br class="Apple-interchange-newline">/g,/<br>$/i])},ee=function(e){return/<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^']*\bmso-|w:WordDocument/i.test(e)||/class="OutlineElement/.test(e)||/id="?docs\-internal\-guid\-/.test(e)},te=function(e){var t=!1;return e=e.replace(/^[\u00a0 ]+/,""),I.each([/^[IVXLMCD]+\.[ \u00a0]/,/^[ivxlmcd]+\.[ \u00a0]/,/^[a-z]{1,2}[\.\)][ \u00a0]/,/^[A-Z]{1,2}[\.\)][ \u00a0]/,/^[0-9]+\.[ \u00a0]/,/^[\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+\.[ \u00a0]/,/^[\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d\u62fe]+\.[ \u00a0]/],(function(n){if(n.test(e))return t=!0,!1})),t},ne=function(e,t,n,o){var r={},i=e.dom.parseStyle(o);I.each(i,(function(i,a){switch(a){case"mso-list":var s=/\w+ \w+([0-9]+)/i.exec(o);s&&(n._listLevel=parseInt(s[1],10)),/Ignore/i.test(i)&&n.firstChild&&(n._listIgnore=!0,n.firstChild._listIgnore=!0);break;case"horiz-align":a="text-align";break;case"vert-align":a="vertical-align";break;case"font-color":case"mso-foreground":a="color";break;case"mso-background":case"mso-highlight":a="background";break;case"font-weight":case"font-style":return void("normal"!==i&&(r[a]=i));case"mso-element":if(/^(comment|comment-list)$/i.test(i))return void n.remove()}0!==a.indexOf("mso-comment")?0!==a.indexOf("mso-")&&("all"===z(e)||t&&t[a])&&(r[a]=i):n.remove()})),/(bold)/i.test(r["font-weight"])&&(delete r["font-weight"],n.wrap(new X("b",1))),/(italic)/i.test(r["font-style"])&&(delete r["font-style"],n.wrap(new X("i",1)));var a=e.dom.serializeStyle(r,n.name);return a||null},oe=function(e,t){var n,o=z(e);o&&(n=I.makeMap(o.split(/[, ]/))),t=Q(t,[/<br class="?Apple-interchange-newline"?>/gi,/<b[^>]+id="?docs-internal-[^>]*>/gi,/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/&nbsp;/gi," "],[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(e,t){return t.length>0?t.replace(/./," ").slice(Math.floor(t.length/2)).split("").join(" "):""}]]);var r=function(e){return e.getParam("paste_word_valid_elements","-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody")}(e),i=J({valid_elements:r,valid_children:"-li[p]"});I.each(i.elements,(function(e){e.attributes.class||(e.attributes.class={},e.attributesOrder.push("class")),e.attributes.style||(e.attributes.style={},e.attributesOrder.push("style"))}));var a=G({},i);a.addAttributeFilter("style",(function(t){for(var o,r=t.length;r--;)(o=t[r]).attr("style",ne(e,n,o,o.attr("style"))),"span"===o.name&&o.parent&&!o.attributes.length&&o.unwrap()})),a.addAttributeFilter("class",(function(e){for(var t,n,o=e.length;o--;)n=(t=e[o]).attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(n)&&t.remove(),t.attr("class",null)})),a.addNodeFilter("del",(function(e){for(var t=e.length;t--;)e[t].remove()})),a.addNodeFilter("a",(function(e){for(var t,n,o,r=e.length;r--;)if(n=(t=e[r]).attr("href"),o=t.attr("name"),n&&-1!==n.indexOf("#_msocom_"))t.remove();else if(n&&0===n.indexOf("file://")&&(n=n.split("#")[1])&&(n="#"+n),n||o){if(o&&!/^_?(?:toc|edn|ftn)/i.test(o)){t.unwrap();continue}t.attr({href:n,name:o})}else t.unwrap()}));var s=a.parse(t);return function(e){return e.getParam("paste_convert_word_fake_lists",!0)}(e)&&function(e){for(var t,n,o=1,r=function(e){var t="";if(3===e.type)return e.value;if(e=e.firstChild)do{t+=r(e)}while(e=e.next);return t},i=function(e,t){if(3===e.type&&t.test(e.value))return e.value=e.value.replace(t,""),!1;if(e=e.firstChild)do{if(!i(e,t))return!1}while(e=e.next);return!0},a=function(e){if(e._listIgnore)e.remove();else if(e=e.firstChild)do{a(e)}while(e=e.next)},s=function(e,r,s){var l=e._listLevel||o;l!==o&&(l<o?t&&(t=t.parent.parent):(n=t,t=null)),t&&t.name===r?t.append(e):(n=n||t,t=new X(r,1),s>1&&t.attr("start",""+s),e.wrap(t)),e.name="li",l>o&&n&&n.lastChild.append(t),o=l,a(e),i(e,/^\u00a0+/),i(e,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),i(e,/^\u00a0+/)},l=[],c=e.firstChild;null!=c;)if(l.push(c),null!==(c=c.walk()))for(;void 0!==c&&c.parent!==e;)c=c.walk();for(var u=0;u<l.length;u++)if("p"===(e=l[u]).name&&e.firstChild){var d=r(e);if(/^[\s\u00a0]*[\u2022\u00b7\u00a7\u25CF]\s*/.test(d)){s(e,"ul");continue}if(te(d)){var f=/([0-9]+)\./.exec(d),m=1;f&&(m=parseInt(f[1],10)),s(e,"ol",m);continue}if(e._listLevel){s(e,"ul",1);continue}t=null}else n=t,t=null}(s),t=Y({validate:F(e)},i).serialize(s)},re=function(e,t){return{content:e,cancelled:t}},ie=function(e,t,n,o){var r=function(e,t,n,o){return e.fire("PastePreProcess",{content:t,internal:n,wordContent:o})}(e,t,n,o),i=function(e,t){var n=G({},e.schema);n.addNodeFilter("meta",(function(e){I.each(e,(function(e){e.remove()}))}));var o=n.parse(t,{forced_root_block:!1,isRootContent:!0});return Y({validate:F(e)},e.schema).serialize(o)}(e,r.content);return e.hasEventListeners("PastePostProcess")&&!r.isDefaultPrevented()?function(e,t,n,o){var r=e.dom.create("div",{style:"display:none"},t),i=function(e,t,n,o){return e.fire("PastePostProcess",{node:t,internal:n,wordContent:o})}(e,r,n,o);return re(i.node.innerHTML,i.isDefaultPrevented())}(e,i,n,o):re(i,r.isDefaultPrevented())},ae=function(e,t,n){var o=ee(t),r=o?function(e,t){return function(e){return e.getParam("paste_enable_default_filters",!0)}(e)?oe(e,t):t}(e,t):t;return ie(e,r,n,o)},se=function(e,t){return e.insertContent(t,{merge:j(e),paste:!0}),!0},le=function(e){return/^https?:\/\/[\w\?\-\/+=.&%@~#]+$/i.test(e)},ce=function(e,t){return le(t)&&w(V(e),(function(e){return n=t.toLowerCase(),o="."+e.toLowerCase(),T(n,o,n.length-o.length);var n,o}))},ue=function(e,t,n){return!(!1!==e.selection.isCollapsed()||!le(t))&&function(e,t,n){return e.undoManager.extra((function(){n(e,t)}),(function(){e.execCommand("mceInsertLink",!1,t)})),!0}(e,t,n)},de=function(e,t,n){return!!ce(e,t)&&function(e,t,n){return e.undoManager.extra((function(){n(e,t)}),(function(){e.insertContent('<img src="'+t+'">')})),!0}(e,t,n)},fe=function(e,t,n){n||!1===function(e){return e.getParam("smart_paste",!0)}(e)?se(e,t):function(e,t){I.each([ue,de,se],(function(n){return!0!==n(e,t,se)}))}(e,t)},me=function(e){return"\n"===e||"\r"===e},pe=function(e,t){var n,o,r=(n=" ",(o=function(e){return e.getParam("paste_tab_spaces",4,"number")}(e))<=0?"":new Array(o+1).join(n)),i=t.replace(/\t/g,r);return function(e,t,n){return C(e,(function(e,o){n=t(n,e,o)})),n}(i,(function(e,t){return function(e){return-1!==" \f\t\v".indexOf(e)}(t)||" "===t?e.pcIsSpace||""===e.str||e.str.length===i.length-1||function(e,t){return t<e.length&&t>=0&&me(e[t])}(i,e.str.length+1)?{pcIsSpace:!1,str:e.str+" "}:{pcIsSpace:!0,str:e.str+" "}:{pcIsSpace:me(t),str:e.str+t}}),{pcIsSpace:!1,str:""}).str},he=function(e,t,n,o){var r=ae(e,t,n);!1===r.cancelled&&fe(e,r.content,o)},ge=function(e,t,n){var o=n||H(t);he(e,function(e){return e.replace("\x3c!-- x-tinymce/html --\x3e","")}(t),o,!1)},ve=function(e,t){var n=e.dom.encode(t).replace(/\r\n/g,"\n"),o=function(e,t,n){return t?K(e,!0===t?"p":t,n):function(e){return e.replace(/\r?\n/g,"<br>")}(e)}(pe(e,n),function(e){return e.getParam("forced_root_block")}(e),function(e){return e.getParam("forced_root_block_attrs")}(e));he(e,o,!1,!0)},be=function(e){var t={};if(e){if(e.getData){var n=e.getData("Text");n&&n.length>0&&-1===n.indexOf("data:text/mce-internal,")&&(t["text/plain"]=n)}if(e.types)for(var o=0;o<e.types.length;o++){var r=e.types[o];try{t[r]=e.getData(r)}catch(e){t[r]=""}}}return t},ye=function(e,t){return t in e&&e[t].length>0},_e=function(e){return ye(e,"text/html")||ye(e,"text/plain")},we=(o="mceclip",r=0,function(){return o+r++}),xe=function(e,t){var n,o,r=(n=t.uri,(o=/data:([^;]+);base64,([a-z0-9\+\/=]+)/i.exec(n))?{type:o[1],data:decodeURIComponent(o[2])}:{type:null,data:null}),i=r.data,a=r.type,s=we(),c=t.blob,u=new Image;if(u.src=t.uri,function(e,t){var n=function(e){return e.getParam("images_dataimg_filter")}(e);return!n||n(t)}(e,u)){var d=e.editorUpload.blobCache,f=void 0,m=d.getByData(i,a);if(m)f=m;else{var p=function(e){return e.getParam("images_reuse_filename")}(e)&&l(c.name),h=p?function(e,t){var n=t.match(/([\s\S]+?)(?:\.[a-z0-9.]+)$/i);return l(n)?e.dom.encode(n[1]):null}(e,c.name):s,g=p?c.name:void 0;f=d.create(s,c,i,h,g),d.add(f)}ge(e,'<img src="'+f.blobUri()+'">',!1)}else ge(e,'<img src="'+t.uri+'">',!1)},Ce=function(e){return M.all(x(e,(function(e){return new M((function(t){var n=function(e){return l(e.getAsFile)}(e)?e.getAsFile():e,o=new window.FileReader;o.onload=function(){t({blob:n,uri:o.result})},o.readAsDataURL(n)}))})))},Oe=function(e){var t=V(e);return function(e){return function(e,t){return T(e,t,0)}(e.type,"image/")&&w(t,(function(t){return n=t.toLowerCase(),o={jpg:"jpeg",jpe:"jpeg",jfi:"jpeg",jif:"jpeg",jfif:"jpeg",pjpeg:"jpeg",pjp:"jpeg",svg:"svg+xml"},(I.hasOwn(o,n)?"image/"+o[n]:"image/"+n)===e.type;var n,o}))}},Se=function(e,t,n){var o="paste"===t.type?t.clipboardData:t.dataTransfer;if(N(e)&&o){var r=function(e,t){var n=t.items?O(S(t.items),(function(e){return"file"===e.kind?[e.getAsFile()]:[]})):[],o=t.files?S(t.files):[];return function(e,t){for(var n=[],o=0,r=e.length;o<r;o++){var i=e[o];t(i,o)&&n.push(i)}return n}(n.length>0?n:o,Oe(e))}(e,o);if(r.length>0)return t.preventDefault(),Ce(r).then((function(t){n&&e.selection.setRng(n),C(t,(function(t){xe(e,t)}))})),!0}return!1},ke=function(e){return R.metaKeyPressed(e)&&86===e.keyCode||e.shiftKey&&45===e.keyCode},Ee=function(e,t,n){var o,r=E(),i=E();e.on("keyup",i.clear),e.on("keydown",(function(n){var a=function(e){ke(e)&&!e.isDefaultPrevented()&&t.remove()};if(ke(n)&&!n.isDefaultPrevented()){if((o=n.shiftKey&&86===n.keyCode)&&D.webkit&&-1!==navigator.userAgent.indexOf("Version/"))return;if(n.stopImmediatePropagation(),r.set(n),i.set(!0),D.ie&&o)return n.preventDefault(),void function(e,t){e.fire("paste",{ieFake:t})}(e,!0);t.remove(),t.create(),e.once("keyup",a),e.once("paste",(function(){e.off("keyup",a)}))}}));var a=function(e,n,o,r,i){var a;ye(n,"text/html")?a=n["text/html"]:(a=t.getHtml(),i=i||H(a),t.isDefaultContent(a)&&(r=!0)),a=Z(a),t.remove();var s=!1===i&&!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(a),l=le(a);(!a.length||s&&!l)&&(r=!0),(r||l)&&(a=ye(n,"text/plain")&&s?n["text/plain"]:function(e){var t=J(),n=G({},t),o="",r=t.getShortEndedElements(),i=I.makeMap("script noscript style textarea video audio iframe object"," "),a=t.getBlockElements(),s=function(e){var t=e.name,n=e;if("br"!==t){if("wbr"!==t)if(r[t]&&(o+=" "),i[t])o+=" ";else{if(3===e.type&&(o+=e.value),!e.shortEnded&&(e=e.firstChild))do{s(e)}while(e=e.next);a[t]&&n.next&&(o+="\n","p"===t&&(o+="\n"))}}else o+="\n"};return e=Q(e,[/<!\[[^\]]+\]>/g]),s(n.parse(e)),o}(a)),t.isDefaultContent(a)?o||e.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents."):r?ve(e,a):ge(e,a,i)};e.on("paste",(function(s){var l=r.isSet()||i.isSet();l&&r.clear();var c=function(e,t){return be(t.clipboardData||e.getDoc().dataTransfer)}(e,s),u="text"===n.get()||o,d=ye(c,$());o=!1,s.isDefaultPrevented()||function(e){var t=e.clipboardData;return-1!==navigator.userAgent.indexOf("Android")&&t&&t.items&&0===t.items.length}(s)?t.remove():_e(c)||!Se(e,s,t.getLastRng()||e.selection.getRng())?(l||s.preventDefault(),!D.ie||l&&!s.ieFake||ye(c,"text/html")||(t.create(),e.dom.bind(t.getEl(),"paste",(function(e){e.stopPropagation()})),e.getDoc().execCommand("Paste",!1,null),c["text/html"]=t.getHtml()),ye(c,"text/html")?(s.preventDefault(),d||(d=H(c["text/html"])),a(e,c,l,u,d)):A.setEditorTimeout(e,(function(){a(e,c,l,u,d)}),0)):t.remove()}))},Te=function(e){return D.ie&&e.inline?document.body:e.getBody()},De=function(e,t,n){(function(e){return Te(e)!==e.getBody()})(e)&&e.dom.bind(t,"paste keyup",(function(t){Re(e,n)||e.fire("paste")}))},Ae=function(e){return e.dom.get("mcepastebin")},Me=function(e,t){return t===e},Re=function(e,t){var n,o=Ae(e);return(n=o)&&"mcepastebin"===n.id&&Me(t,o.innerHTML)},Pe=function(e){var t=i(null);return{create:function(){return function(e,t,n){var o=e.dom,r=e.getBody();t.set(e.selection.getRng());var i=e.dom.add(Te(e),"div",{id:"mcepastebin",class:"mce-pastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: fixed; top: 50%; width: 10px; height: 10px; overflow: hidden; opacity: 0"},n);(D.ie||D.gecko)&&o.setStyle(i,"left","rtl"===o.getStyle(r,"direction",!0)?65535:-65535),o.bind(i,"beforedeactivate focusin focusout",(function(e){e.stopPropagation()})),De(e,i,n),i.focus(),e.selection.select(i,!0)}(e,t,"%MCEPASTEBIN%")},remove:function(){return function(e,t){if(Ae(e)){for(var n=void 0,o=t.get();n=e.dom.get("mcepastebin");)e.dom.remove(n),e.dom.unbind(n);o&&e.selection.setRng(o)}t.set(null)}(e,t)},getEl:function(){return Ae(e)},getHtml:function(){return function(e){var t=function(t,n){t.appendChild(n),e.dom.remove(n,!0)},n=I.grep(Te(e).childNodes,(function(e){return"mcepastebin"===e.id})),o=n.shift();I.each(n,(function(e){t(o,e)}));for(var r=e.dom.select("div[id=mcepastebin]",o),i=r.length-1;i>=0;i--){var a=e.dom.create("div");o.insertBefore(a,r[i]),t(a,r[i])}return o?o.innerHTML:""}(e)},getLastRng:t.get,isDefault:function(){return Re(e,"%MCEPASTEBIN%")},isDefaultContent:function(e){return Me("%MCEPASTEBIN%",e)}}},Ie=function(e,t){var n=Pe(e);return e.on("PreInit",(function(){return function(e,t,n){var o;Ee(e,t,n),e.parser.addNodeFilter("img",(function(t,n,r){var i=function(e){e.attr("data-mce-object")||o===D.transparentSrc||e.remove()},a=function(e){return 0===e.indexOf("webkit-fake-url")},s=function(e){return 0===e.indexOf("data:")};if(!N(e)&&function(e){return e.data&&!0===e.data.paste}(r))for(var l=t.length;l--;)(o=t[l].attr("src"))&&(a(o)||!B(e)&&s(o))&&i(t[l])}))}(e,n,t)})),{pasteFormat:t,pasteHtml:function(t,n){return ge(e,t,n)},pasteText:function(t){return ve(e,t)},pasteImageData:function(t,n){return Se(e,t,n)},getDataTransferItems:be,hasHtmlOrText:_e,hasContentType:ye}},Le=function(e,t){e.addCommand("mceTogglePlainTextPaste",(function(){!function(e,t){"text"===t.pasteFormat.get()?(t.pasteFormat.set("html"),P(e,!1)):(t.pasteFormat.set("text"),P(e,!0)),e.focus()}(e,t)})),e.addCommand("mceInsertClipboardContent",(function(e,n){n.content&&t.pasteHtml(n.content,n.internal),n.text&&t.pasteText(n.text)}))},je=function(e,t,n){if(!function(e){return!1===D.iOS&&"function"==typeof(null==e?void 0:e.setData)}(e))return!1;try{return e.clearData(),e.setData("text/html",t),e.setData("text/plain",n),e.setData($(),t),!0}catch(e){return!1}},ze=function(e,t,n,o){je(e.clipboardData,t.html,t.text)?(e.preventDefault(),o()):n(t.html,o)},Fe=function(e){return function(t,n){var o=function(e){return"\x3c!-- x-tinymce/html --\x3e"+e}(t),r=e.dom.create("div",{contenteditable:"false","data-mce-bogus":"all"}),i=e.dom.create("div",{contenteditable:"true"},o);e.dom.setStyles(r,{position:"fixed",top:"0",left:"-3000px",width:"1000px",overflow:"hidden"}),r.appendChild(i),e.dom.add(e.getBody(),r);var a=e.selection.getRng();i.focus();var s=e.dom.createRng();s.selectNodeContents(i),e.selection.setRng(s),A.setTimeout((function(){e.selection.setRng(a),r.parentNode.removeChild(r),n()}),0)}},Be=function(e){return{html:e.selection.getContent({contextual:!0}),text:e.selection.getContent({format:"text"})}},Ne=function(e){return!e.selection.isCollapsed()||function(e){return!!e.dom.getParent(e.selection.getStart(),"td[data-mce-selected],th[data-mce-selected]",e.getBody())}(e)},Ve=function(e){e.on("cut",function(e){return function(t){Ne(e)&&ze(t,Be(e),Fe(e),(function(){if(D.browser.isChrome()||D.browser.isFirefox()){var t=e.selection.getRng();A.setEditorTimeout(e,(function(){e.selection.setRng(t),e.execCommand("Delete")}),0)}else e.execCommand("Delete")}))}}(e)),e.on("copy",function(e){return function(t){Ne(e)&&ze(t,Be(e),Fe(e),u)}}(e))},He=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),$e=function(e,t){return He.getCaretRangeFromPoint(t.clientX,t.clientY,e.getDoc())},Ue=function(e,t){e.focus(),e.selection.setRng(t)},We=function(e,t){e.on("PastePreProcess",(function(n){n.content=t(e,n.content,n.internal,n.wordContent)}))},qe=function(e,t){if(!ee(t))return t;var n=[];I.each(e.schema.getBlockElements(),(function(e,t){n.push(t)}));var o=new RegExp("(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*(<\\/?("+n.join("|")+")[^>]*>)(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*","g");return t=Q(t,[[o,"$1"]]),t=Q(t,[[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])},Ke=function(e,t,n,o){if(o||n)return t;var r,i=function(e){return e.getParam("paste_webkit_styles")}(e);if(!1===function(e){return e.getParam("paste_remove_styles_if_webkit",!0)}(e)||"all"===i)return t;if(i&&(r=i.split(/[, ]/)),r){var a=e.dom,s=e.selection.getNode();t=t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,(function(e,t,n,o){var i=a.parseStyle(a.decode(n)),l={};if("none"===r)return t+o;for(var c=0;c<r.length;c++){var u=i[r[c]],d=a.getStyle(s,r[c],!0);/color/.test(r[c])&&(u=a.toHex(u),d=a.toHex(d)),d!==u&&(l[r[c]]=u)}var f=a.serializeStyle(l,"span");return f?t+' style="'+f+'"'+o:t+o}))}else t=t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return t=t.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,(function(e,t,n,o){return t+' style="'+n+'"'+o}))},Ge=function(e,t){e.$("a",t).find("font,u").each((function(t,n){e.dom.remove(n,!0)}))},Ye=function(e,t){return function(n){n.setActive("text"===t.pasteFormat.get());var o=function(e){return n.setActive(e.state)};return e.on("PastePlainTextToggle",o),function(){return e.off("PastePlainTextToggle",o)}}};a.add("paste",(function(e){if(!1===function(e){return!!e.hasPlugin("powerpaste",!0)&&(void 0!==window.console&&window.console.log&&window.console.log("PowerPaste is incompatible with Paste plugin! Remove 'paste' from the 'plugins' option."),!0)}(e)){var t=i(!1),n=i(function(e){return e.getParam("paste_as_text",!1)}(e)?"text":"html"),o=Ie(e,n);return function(e){D.webkit&&We(e,Ke),D.ie&&(We(e,qe),function(e,t){e.on("PastePostProcess",(function(n){t(e,n.node)}))}(e,Ge))}(e),function(e,t){var n=function(){return e.execCommand("mceTogglePlainTextPaste")};e.ui.registry.addToggleButton("pastetext",{active:!1,icon:"paste-text",tooltip:"Paste as text",onAction:n,onSetup:Ye(e,t)}),e.ui.registry.addToggleMenuItem("pastetext",{text:"Paste as text",icon:"paste-text",onAction:n,onSetup:Ye(e,t)})}(e,o),Le(e,o),function(e){var t=e.plugins.paste,n=function(e){return e.getParam("paste_preprocess")}(e);n&&e.on("PastePreProcess",(function(e){n.call(t,t,e)}));var o=function(e){return e.getParam("paste_postprocess")}(e);o&&e.on("PastePostProcess",(function(e){o.call(t,t,e)}))}(e),Ve(e),function(e,t,n){(function(e){return e.getParam("paste_block_drop",!1)})(e)&&e.on("dragend dragover draggesture dragdrop drop drag",(function(e){e.preventDefault(),e.stopPropagation()})),L(e)||e.on("drop",(function(e){var t=e.dataTransfer;t&&t.files&&t.files.length>0&&e.preventDefault()})),e.on("drop",(function(o){var r=$e(e,o);if(!o.isDefaultPrevented()&&!n.get()){var i,a=t.getDataTransferItems(o.dataTransfer),s=t.hasContentType(a,$());if((t.hasHtmlOrText(a)&&(!(i=a["text/plain"])||0!==i.indexOf("file://"))||!t.pasteImageData(o,r))&&r&&function(e){return e.getParam("paste_filter_drop",!0)}(e)){var l=a["mce-internal"]||a["text/html"]||a["text/plain"];l&&(o.preventDefault(),A.setEditorTimeout(e,(function(){e.undoManager.transact((function(){a["mce-internal"]&&e.execCommand("Delete"),Ue(e,r),l=Z(l),a["text/html"]?t.pasteHtml(l,s):t.pasteText(l)}))})))}}})),e.on("dragstart",(function(e){n.set(!0)})),e.on("dragover dragend",(function(t){L(e)&&!1===n.get()&&(t.preventDefault(),Ue(e,$e(e,t))),"dragend"===t.type&&n.set(!1)}))}(e,o,t),function(e){return{clipboard:e}}(o)}}))}()},"7c73":function(e,t,n){var o,r=n("825a"),i=n("37e8"),a=n("7839"),s=n("d012"),l=n("1be4"),c=n("cc12"),u=n("f772"),d=u("IE_PROTO"),f=function(){},m=function(e){return"<script>"+e+"<\/script>"},p=function(e){e.write(m("")),e.close();var t=e.parentWindow.Object;return e=null,t},h=function(){try{o=new ActiveXObject("htmlfile")}catch(e){}var e,t;h="undefined"!=typeof document?document.domain&&o?p(o):((t=c("iframe")).style.display="none",l.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(m("document.F=Object")),e.close(),e.F):p(o);for(var n=a.length;n--;)delete h.prototype[a[n]];return h()};s[d]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(f.prototype=r(e),n=new f,f.prototype=null,n[d]=e):n=h(),void 0===t?n:i.f(n,t)}},"7cb9":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pharmacode=void 0;var o,r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n("e762");var a=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return o.number=parseInt(e,10),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"encode",value:function(){for(var e=this.number,t="";!isNaN(e)&&0!=e;)e%2==0?(t="11100"+t,e=(e-2)/2):(t="100"+t,e=(e-1)/2);return{data:t=t.slice(0,-2),text:this.text}}},{key:"valid",value:function(){return this.number>=3&&this.number<=131070}}]),t}(((o=i)&&o.__esModule?o:{default:o}).default);t.pharmacode=a},"7db0":function(e,t,n){"use strict";var o=n("23e7"),r=n("b727").find,i=n("44d2"),a=!0;"find"in[]&&Array(1).find((function(){a=!1})),o({target:"Array",proto:!0,forced:a},{find:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),i("find")},"7dd0":function(e,t,n){"use strict";var o=n("23e7"),r=n("c65b"),i=n("c430"),a=n("5e77"),s=n("1626"),l=n("9ed3"),c=n("e163"),u=n("d2bb"),d=n("d44e"),f=n("9112"),m=n("cb2d"),p=n("b622"),h=n("3f8c"),g=n("ae93"),v=a.PROPER,b=a.CONFIGURABLE,y=g.IteratorPrototype,_=g.BUGGY_SAFARI_ITERATORS,w=p("iterator"),x=function(){return this};e.exports=function(e,t,n,a,p,g,C){l(n,t,a);var O,S,k,E=function(e){if(e===p&&R)return R;if(!_&&e in A)return A[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},T=t+" Iterator",D=!1,A=e.prototype,M=A[w]||A["@@iterator"]||p&&A[p],R=!_&&M||E(p),P="Array"==t&&A.entries||M;if(P&&(O=c(P.call(new e)))!==Object.prototype&&O.next&&(i||c(O)===y||(u?u(O,y):s(O[w])||m(O,w,x)),d(O,T,!0,!0),i&&(h[T]=x)),v&&"values"==p&&M&&"values"!==M.name&&(!i&&b?f(A,"name","values"):(D=!0,R=function(){return r(M,this)})),p)if(S={values:E("values"),keys:g?R:E("keys"),entries:E("entries")},C)for(k in S)(_||D||!(k in A))&&m(A,k,S[k]);else o({target:t,proto:!0,forced:_||D},S);return i&&!C||A[w]===R||m(A,w,R,{name:p}),h[t]=R,S}},"7f5d":function(e,t,n){"use strict";n("38f4")},"7f98":function(e,t,n){},"7f9a":function(e,t,n){var o=n("da84"),r=n("1626"),i=n("8925"),a=o.WeakMap;e.exports=r(a)&&/native code/.test(i(a))},"7fbf":function(e,t,n){"use strict";n("b3a3")},"805f":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=n("124f"),i=(o=r)&&o.__esModule?o:{default:o},a=n("6e53");var s=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e+=(0,a.mod11)(e),e+=(0,a.mod10)(e),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(i.default);t.default=s},"825a":function(e,t,n){var o=n("da84"),r=n("861d"),i=o.String,a=o.TypeError;e.exports=function(e){if(r(e))return e;throw a(i(e)+" is not an object")}},"83ab":function(e,t,n){var o=n("d039");e.exports=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},8418:function(e,t,n){"use strict";var o=n("a04b"),r=n("9bf2"),i=n("5c6c");e.exports=function(e,t,n){var a=o(t);a in e?r.f(e,a,i(0,n)):e[a]=n}},"841c":function(e,t,n){"use strict";var o=n("c65b"),r=n("d784"),i=n("825a"),a=n("1d80"),s=n("129f"),l=n("577e"),c=n("dc4a"),u=n("14c3");r("search",(function(e,t,n){return[function(t){var n=a(this),r=null==t?void 0:c(t,e);return r?o(r,t,n):new RegExp(t)[e](l(n))},function(e){var o=i(this),r=l(e),a=n(t,o,r);if(a.done)return a.value;var c=o.lastIndex;s(c,0)||(o.lastIndex=0);var d=u(o,r);return s(o.lastIndex,c)||(o.lastIndex=c),null===d?-1:d.index}]}))},"84ec":function(e,t,n){n("2401")},"84f3":function(e,t,n){"use strict";n("e145")},"861d":function(e,t,n){var o=n("1626");e.exports=function(e){return"object"==typeof e?null!==e:o(e)}},8861:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=n("124f"),i=(o=r)&&o.__esModule?o:{default:o},a=n("6e53");var s=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e+=(0,a.mod10)(e),e+=(0,a.mod10)(e),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(i.default);t.default=s},8863:function(e,t,n){n("9dd9")},8875:function(e,t,n){var o,r,i;"undefined"!=typeof self&&self,r=[],void 0===(i="function"==typeof(o=function(){return function e(){var t=Object.getOwnPropertyDescriptor(document,"currentScript");if(!t&&"currentScript"in document&&document.currentScript)return document.currentScript;if(t&&t.get!==e&&document.currentScript)return document.currentScript;try{throw new Error}catch(e){var n,o,r,i=/.*at [^(]*\((.*):(.+):(.+)\)$/gi.exec(e.stack)||/@([^@]*):(\d+):(\d+)\s*$/gi.exec(e.stack),a=i&&i[1]||!1,s=i&&i[2]||!1,l=document.location.href.replace(document.location.hash,""),c=document.getElementsByTagName("script");a===l&&(n=document.documentElement.outerHTML,o=new RegExp("(?:[^\\n]+?\\n){0,"+(s-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),r=n.replace(o,"$1").trim());for(var u=0;u<c.length;u++){if("interactive"===c[u].readyState)return c[u];if(c[u].src===a)return c[u];if(a===l&&c[u].innerHTML&&c[u].innerHTML.trim()===r)return c[u]}return null}}})?o.apply(t,r):o)||(e.exports=i)},8907:function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return l}));var o=n("5530"),r=n("1da1"),i=(n("96cf"),n("d81d"),n("b0c0"),n("d3b7"),n("159b"),n("7694"));function a(e,t){return s.apply(this,arguments)}function s(){return(s=Object(r.a)(regeneratorRuntime.mark((function e(t,n){var r,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={total:0,data:[]},e.prev=1,e.next=4,Object(i.g)(n);case 4:"0000"===(a=e.sent).data.code?(r.data=a.data.data.records.map((function(e){return Object(o.a)(Object(o.a)({},e),{},{dataType:"dict",id:e.id,label:e.name,value:e.itemCode})})),r.total=a.data.data.length):t.$message.error("加载字典失败 : ".concat(a.data.message)),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),t.$message.error("加载字典失败 : ".concat(e.t0.message));case 11:return e.abrupt("return",r);case 12:case"end":return e.stop()}}),e,null,[[1,8]])})))).apply(this,arguments)}function l(e,t){return c.apply(this,arguments)}function c(){return(c=Object(r.a)(regeneratorRuntime.mark((function e(t,n){var r,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={total:0,data:[]},e.prev=1,e.next=4,Object(i.f)(n);case 4:if("0000"===(a=e.sent).data.code){e.next=8;break}return t.$message.error("加载字典选项失败 : ".concat(a.data.message)),e.abrupt("return",r);case 8:return a.data.data.forEach((function(e){r.data.push(Object(o.a)(Object(o.a)({},e),{},{dataType:"dictItem",id:e.id,label:e.itemName,value:e.itemCode}))})),r.total=a.data.data.length,e.abrupt("return",r);case 13:return e.prev=13,e.t0=e.catch(1),t.$message.error("加载字典选项失败 : ".concat(e.t0.message)),e.abrupt("return",r);case 17:case"end":return e.stop()}}),e,null,[[1,13]])})))).apply(this,arguments)}},8925:function(e,t,n){var o=n("e330"),r=n("1626"),i=n("c6cd"),a=o(Function.toString);r(i.inspectSource)||(i.inspectSource=function(e){return a(e)}),e.exports=i.inspectSource},"89a2":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(o):void 0},a=n("c243"),s=n("bdfe"),l=(o=s)&&o.__esModule?o:{default:o};var c=function(e){return(10-e.substr(0,12).split("").map((function(e){return+e})).reduce((function(e,t,n){return n%2?e+3*t:e+t}),0)%10)%10},u=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),-1!==e.search(/^[0-9]{12}$/)&&(e+=c(e));var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return o.lastChar=n.lastChar,o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{13}$/)&&+this.data[12]===c(this.data)}},{key:"leftText",value:function(){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"leftText",this).call(this,1,6)}},{key:"leftEncode",value:function(){var e=this.data.substr(1,6),n=a.EAN13_STRUCTURE[this.data[0]];return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"leftEncode",this).call(this,e,n)}},{key:"rightText",value:function(){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"rightText",this).call(this,7,6)}},{key:"rightEncode",value:function(){var e=this.data.substr(7,6);return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"rightEncode",this).call(this,e,"RRRRRR")}},{key:"encodeGuarded",value:function(){var e=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"encodeGuarded",this).call(this);return this.options.displayValue&&(e.unshift({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),this.options.lastChar&&(e.push({data:"00"}),e.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}}))),e}}]),t}(l.default);t.default=u},"8a7b":function(e,t,n){"use strict";n("d0d4")},"8aa5":function(e,t,n){"use strict";var o=n("6547").charAt;e.exports=function(e,t,n){return t+(n?o(e,t).length:1)}},"8ba4":function(e,t,n){n("23e7")({target:"Number",stat:!0},{isInteger:n("eac5")})},"8bbf":function(e,t){e.exports=require("vue")},"8bfd":function(e,t,n){},"8df4":function(e,t,n){"use strict";var o=n("7a77");function r(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new o(e),t(n.reason))}))}r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var e;return{token:new r((function(t){e=t})),cancel:e}},e.exports=r},"8e51":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MSI1110=t.MSI1010=t.MSI11=t.MSI10=t.MSI=void 0;var o=l(n("124f")),r=l(n("4727")),i=l(n("4461")),a=l(n("8861")),s=l(n("805f"));function l(e){return e&&e.__esModule?e:{default:e}}t.MSI=o.default,t.MSI10=r.default,t.MSI11=i.default,t.MSI1010=a.default,t.MSI1110=s.default},"905a":function(e,t){e.exports=require("@tinymce/tinymce-vue")},"90d8":function(e,t,n){var o=n("c65b"),r=n("1a2d"),i=n("3a9b"),a=n("ad6d"),s=RegExp.prototype;e.exports=function(e){var t=e.flags;return void 0!==t||"flags"in s||r(e,"flags")||!i(s,e)?t:o(a,e)}},"90e3":function(e,t,n){var o=n("e330"),r=0,i=Math.random(),a=o(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++r+i,36)}},9112:function(e,t,n){var o=n("83ab"),r=n("9bf2"),i=n("5c6c");e.exports=o?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},9224:function(e){e.exports=JSON.parse('{"a":"2.0.2"}')},9240:function(e,t,n){},9263:function(e,t,n){"use strict";var o,r,i=n("c65b"),a=n("e330"),s=n("577e"),l=n("ad6d"),c=n("9f7f"),u=n("5692"),d=n("7c73"),f=n("69f3").get,m=n("fce3"),p=n("107c"),h=u("native-string-replace",String.prototype.replace),g=RegExp.prototype.exec,v=g,b=a("".charAt),y=a("".indexOf),_=a("".replace),w=a("".slice),x=(r=/b*/g,i(g,o=/a/,"a"),i(g,r,"a"),0!==o.lastIndex||0!==r.lastIndex),C=c.BROKEN_CARET,O=void 0!==/()??/.exec("")[1];(x||O||C||m||p)&&(v=function(e){var t,n,o,r,a,c,u,m=this,p=f(m),S=s(e),k=p.raw;if(k)return k.lastIndex=m.lastIndex,t=i(v,k,S),m.lastIndex=k.lastIndex,t;var E=p.groups,T=C&&m.sticky,D=i(l,m),A=m.source,M=0,R=S;if(T&&(D=_(D,"y",""),-1===y(D,"g")&&(D+="g"),R=w(S,m.lastIndex),m.lastIndex>0&&(!m.multiline||m.multiline&&"\n"!==b(S,m.lastIndex-1))&&(A="(?: "+A+")",R=" "+R,M++),n=new RegExp("^(?:"+A+")",D)),O&&(n=new RegExp("^"+A+"$(?!\\s)",D)),x&&(o=m.lastIndex),r=i(g,T?n:m,R),T?r?(r.input=w(r.input,M),r[0]=w(r[0],M),r.index=m.lastIndex,m.lastIndex+=r[0].length):m.lastIndex=0:x&&r&&(m.lastIndex=m.global?r.index+r[0].length:o),O&&r&&r.length>1&&i(h,r[0],n,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(r[a]=void 0)})),r&&E)for(r.groups=c=d(null),a=0;a<E.length;a++)c[(u=E[a])[0]]=r[u[1]];return r}),e.exports=v},"94ca":function(e,t,n){var o=n("d039"),r=n("1626"),i=/#|\.prototype\./,a=function(e,t){var n=l[s(e)];return n==u||n!=c&&(r(t)?o(t):!!t)},s=a.normalize=function(e){return String(e).replace(i,".").toLowerCase()},l=a.data={},c=a.NATIVE="N",u=a.POLYFILL="P";e.exports=a},"94ce":function(e,t){!function(){"use strict";var e=function(e){return function(t){return o=typeof(n=t),(null===n?"null":"object"===o&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"===o&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":o)===e;var n,o}},t=function(e){return function(t){return typeof t===e}},n=function(e){return function(t){return e===t}},o=e("string"),r=e("object"),i=e("array"),a=n(null),s=t("boolean"),l=n(void 0),c=function(e){return!function(e){return null==e}(e)},u=t("function"),d=t("number"),f=function(){},m=function(e){return function(){return e}},p=function(e){return e},h=function(e,t){return e===t};function g(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var r=t.concat(n);return e.apply(null,r)}}var v,b,y=function(e){return function(t){return!e(t)}},_=m(!1),w=m(!0),x=function(){return C},C={fold:function(e,t){return e()},isSome:_,isNone:w,getOr:b=p,getOrThunk:v=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:m(null),getOrUndefined:m(void 0),or:b,orThunk:v,map:x,each:f,bind:x,exists:_,forall:w,filter:function(){return x()},toArray:function(){return[]},toString:m("none()")},O=function(e){var t=m(e),n=function(){return r},o=function(t){return t(e)},r={fold:function(t,n){return n(e)},isSome:w,isNone:_,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:n,orThunk:n,map:function(t){return O(t(e))},each:function(t){t(e)},bind:o,exists:o,forall:o,filter:function(t){return t(e)?r:C},toArray:function(){return[e]},toString:function(){return"some("+e+")"}};return r},S={some:O,none:x,from:function(e){return null==e?C:O(e)}},k=Array.prototype.slice,E=Array.prototype.indexOf,T=Array.prototype.push,D=function(e,t){return n=e,o=t,E.call(n,o)>-1;var n,o},A=function(e,t){for(var n=0,o=e.length;n<o;n++){if(t(e[n],n))return!0}return!1},M=function(e,t){for(var n=[],o=0;o<e;o++)n.push(t(o));return n},R=function(e,t){for(var n=e.length,o=new Array(n),r=0;r<n;r++){var i=e[r];o[r]=t(i,r)}return o},P=function(e,t){for(var n=0,o=e.length;n<o;n++){t(e[n],n)}},I=function(e,t){for(var n=[],o=[],r=0,i=e.length;r<i;r++){var a=e[r];(t(a,r)?n:o).push(a)}return{pass:n,fail:o}},L=function(e,t){for(var n=[],o=0,r=e.length;o<r;o++){var i=e[o];t(i,o)&&n.push(i)}return n},j=function(e,t,n){return function(e,t){for(var n=e.length-1;n>=0;n--){t(e[n],n)}}(e,(function(e,o){n=t(n,e,o)})),n},z=function(e,t,n){return P(e,(function(e,o){n=t(n,e,o)})),n},F=function(e,t){return function(e,t,n){for(var o=0,r=e.length;o<r;o++){var i=e[o];if(t(i,o))return S.some(i);if(n(i,o))break}return S.none()}(e,t,_)},B=function(e,t){for(var n=0,o=e.length;n<o;n++){if(t(e[n],n))return S.some(n)}return S.none()},N=function(e){for(var t=[],n=0,o=e.length;n<o;++n){if(!i(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);T.apply(t,e[n])}return t},V=function(e,t){return N(R(e,t))},H=function(e,t){for(var n=0,o=e.length;n<o;++n){if(!0!==t(e[n],n))return!1}return!0},$=function(e,t){for(var n={},o=0,r=e.length;o<r;o++){var i=e[o];n[String(i)]=t(i,o)}return n},U=function(e){return[e]},W=function(e,t){return t>=0&&t<e.length?S.some(e[t]):S.none()},q=function(e){return W(e,0)},K=function(e){return W(e,e.length-1)},G=function(e,t){for(var n=0;n<e.length;n++){var o=t(e[n],n);if(o.isSome())return o}return S.none()},Y=function(){return(Y=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function X(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var J=function(e){var t,n=!1;return function(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];return n||(n=!0,t=e.apply(null,o)),t}},Q=function(){return Z(0,0)},Z=function(e,t){return{major:e,minor:t}},ee={nu:Z,detect:function(e,t){var n=String(t).toLowerCase();return 0===e.length?Q():function(e,t){var n=function(e,t){for(var n=0;n<e.length;n++){var o=e[n];if(o.test(t))return o}}(e,t);if(!n)return{major:0,minor:0};var o=function(e){return Number(t.replace(n,"$"+e))};return Z(o(1),o(2))}(e,n)},unknown:Q},te=function(e,t){var n=String(t).toLowerCase();return F(e,(function(e){return e.search(n)}))},ne=function(e,t,n){return""===t||e.length>=t.length&&e.substr(n,n+t.length)===t},oe=function(e,t){return-1!==e.indexOf(t)},re=function(e,t){return ne(e,t,0)},ie=function(e,t){return ne(e,t,e.length-t.length)},ae=function(e){return function(t){return t.replace(e,"")}}(/^\s+|\s+$/g),se=function(e){return e.length>0},le=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,ce=function(e){return function(t){return oe(t,e)}},ue=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return oe(e,"edge/")&&oe(e,"chrome")&&oe(e,"safari")&&oe(e,"applewebkit")}},{name:"Chrome",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,le],search:function(e){return oe(e,"chrome")&&!oe(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return oe(e,"msie")||oe(e,"trident")}},{name:"Opera",versionRegexes:[le,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:ce("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:ce("firefox")},{name:"Safari",versionRegexes:[le,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(oe(e,"safari")||oe(e,"mobile/"))&&oe(e,"applewebkit")}}],de=[{name:"Windows",search:ce("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return oe(e,"iphone")||oe(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:ce("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:ce("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:ce("linux"),versionRegexes:[]},{name:"Solaris",search:ce("sunos"),versionRegexes:[]},{name:"FreeBSD",search:ce("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:ce("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],fe={browsers:m(ue),oses:m(de)},me=function(e){var t=e.current,n=e.version,o=function(e){return function(){return t===e}};return{current:t,version:n,isEdge:o("Edge"),isChrome:o("Chrome"),isIE:o("IE"),isOpera:o("Opera"),isFirefox:o("Firefox"),isSafari:o("Safari")}},pe={unknown:function(){return me({current:void 0,version:ee.unknown()})},nu:me,edge:m("Edge"),chrome:m("Chrome"),ie:m("IE"),opera:m("Opera"),firefox:m("Firefox"),safari:m("Safari")},he=function(e){var t=e.current,n=e.version,o=function(e){return function(){return t===e}};return{current:t,version:n,isWindows:o("Windows"),isiOS:o("iOS"),isAndroid:o("Android"),isOSX:o("OSX"),isLinux:o("Linux"),isSolaris:o("Solaris"),isFreeBSD:o("FreeBSD"),isChromeOS:o("ChromeOS")}},ge={unknown:function(){return he({current:void 0,version:ee.unknown()})},nu:he,windows:m("Windows"),ios:m("iOS"),android:m("Android"),linux:m("Linux"),osx:m("OSX"),solaris:m("Solaris"),freebsd:m("FreeBSD"),chromeos:m("ChromeOS")},ve=function(e,t,n){var o=fe.browsers(),r=fe.oses(),i=t.bind((function(e){return function(e,t){return G(t.brands,(function(t){var n=t.brand.toLowerCase();return F(e,(function(e){var t;return n===(null===(t=e.brand)||void 0===t?void 0:t.toLowerCase())})).map((function(e){return{current:e.name,version:ee.nu(parseInt(t.version,10),0)}}))}))}(o,e)})).orThunk((function(){return function(e,t){return te(e,t).map((function(e){var n=ee.detect(e.versionRegexes,t);return{current:e.name,version:n}}))}(o,e)})).fold(pe.unknown,pe.nu),a=function(e,t){return te(e,t).map((function(e){var n=ee.detect(e.versionRegexes,t);return{current:e.name,version:n}}))}(r,e).fold(ge.unknown,ge.nu),s=function(e,t,n,o){var r=e.isiOS()&&!0===/ipad/i.test(n),i=e.isiOS()&&!r,a=e.isiOS()||e.isAndroid(),s=a||o("(pointer:coarse)"),l=r||!i&&a&&o("(min-device-width:768px)"),c=i||a&&!l,u=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(n),d=!c&&!l&&!u;return{isiPad:m(r),isiPhone:m(i),isTablet:m(l),isPhone:m(c),isTouch:m(s),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:m(u),isDesktop:m(d)}}(a,i,e,n);return{browser:i,os:a,deviceType:s}},be=function(e){return window.matchMedia(e).matches},ye=J((function(){return ve(navigator.userAgent,S.from(navigator.userAgentData),be)})),_e=function(){return ye()},we=function(e){if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},xe={fromHtml:function(e,t){var n=(t||document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||n.childNodes.length>1)throw new Error("HTML must have a single root node");return we(n.childNodes[0])},fromTag:function(e,t){var n=(t||document).createElement(e);return we(n)},fromText:function(e,t){var n=(t||document).createTextNode(e);return we(n)},fromDom:we,fromPoint:function(e,t,n){return S.from(e.dom.elementFromPoint(t,n)).map(we)}},Ce=function(e,t){var n=e.dom;if(1!==n.nodeType)return!1;var o=n;if(void 0!==o.matches)return o.matches(t);if(void 0!==o.msMatchesSelector)return o.msMatchesSelector(t);if(void 0!==o.webkitMatchesSelector)return o.webkitMatchesSelector(t);if(void 0!==o.mozMatchesSelector)return o.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},Oe=function(e){return 1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType||0===e.childElementCount},Se=function(e,t){var n=void 0===t?document:t.dom;return Oe(n)?S.none():S.from(n.querySelector(e)).map(xe.fromDom)},ke=function(e,t){return e.dom===t.dom},Ee=function(e,t){return n=e.dom,o=t.dom,function(e,t,n){return 0!=(e.compareDocumentPosition(t)&n)}(n,o,Node.DOCUMENT_POSITION_CONTAINED_BY);var n,o},Te=function(e,t){return _e().browser.isIE()?Ee(e,t):function(e,t){var n=e.dom,o=t.dom;return n!==o&&n.contains(o)}(e,t)},De=Ce,Ae=Object.keys,Me=Object.hasOwnProperty,Re=function(e,t){for(var n=Ae(e),o=0,r=n.length;o<r;o++){var i=n[o];t(e[i],i)}},Pe=function(e,t){return Ie(e,(function(e,n){return{k:n,v:t(e,n)}}))},Ie=function(e,t){var n={};return Re(e,(function(e,o){var r=t(e,o);n[r.k]=r.v})),n},Le=function(e,t){var n={};return function(e,t,n,o){Re(e,(function(e,r){(t(e,r)?n:o)(e,r)}))}(e,t,function(e){return function(t,n){e[n]=t}}(n),f),n},je=function(e,t){var n=[];return Re(e,(function(e,o){n.push(t(e,o))})),n},ze=function(e){return je(e,p)},Fe=function(e){return Ae(e).length},Be=function(e,t){return Ne(e,t)?S.from(e[t]):S.none()},Ne=function(e,t){return Me.call(e,t)},Ve=function(e,t){return Ne(e,t)&&void 0!==e[t]&&null!==e[t]},He=["tfoot","thead","tbody","colgroup"],$e=function(e,t,n){return{element:e,rowspan:t,colspan:n}},Ue=function(e,t,n){return{element:e,cells:t,section:n}},We=function(e,t,n){return{element:e,isNew:t,isLocked:n}},qe=function(e,t,n,o){return{element:e,cells:t,section:n,isNew:o}};"undefined"!=typeof window?window:Function("return this;")();var Ke=function(e){return e.dom.nodeName.toLowerCase()},Ge=function(e){return e.dom.nodeType},Ye=function(e){return function(t){return Ge(t)===e}},Xe=function(e){return 8===Ge(e)||"#comment"===Ke(e)},Je=Ye(1),Qe=Ye(3),Ze=Ye(9),et=Ye(11),tt=function(e){return function(t){return Je(t)&&Ke(t)===e}},nt=function(e){return xe.fromDom(e.dom.ownerDocument)},ot=function(e){return Ze(e)?e:nt(e)},rt=function(e){return S.from(e.dom.parentNode).map(xe.fromDom)},it=function(e,t){for(var n=u(t)?t:_,o=e.dom,r=[];null!==o.parentNode&&void 0!==o.parentNode;){var i=o.parentNode,a=xe.fromDom(i);if(r.push(a),!0===n(a))break;o=i}return r},at=function(e){return S.from(e.dom.previousSibling).map(xe.fromDom)},st=function(e){return S.from(e.dom.nextSibling).map(xe.fromDom)},lt=function(e){return R(e.dom.childNodes,xe.fromDom)},ct=function(e,t){var n=e.dom.childNodes;return S.from(n[t]).map(xe.fromDom)},ut=u(Element.prototype.attachShadow)&&u(Node.prototype.getRootNode),dt=m(ut),ft=ut?function(e){return xe.fromDom(e.dom.getRootNode())}:ot,mt=function(e){var t,n=ft(e);return et(t=n)&&c(t.dom.host)?S.some(n):S.none()},pt=function(e){return xe.fromDom(e.dom.host)},ht=function(e){return c(e.dom.shadowRoot)},gt=function(e){var t=Qe(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;var n,o,r=t.ownerDocument;return mt(xe.fromDom(t)).fold((function(){return r.body.contains(t)}),(n=gt,o=pt,function(e){return n(o(e))}))},vt=function(e){var t=e.dom.body;if(null==t)throw new Error("Body is not available yet");return xe.fromDom(t)},bt=function(e,t){var n=[];return P(lt(e),(function(e){t(e)&&(n=n.concat([e])),n=n.concat(bt(e,t))})),n},yt=function(e,t,n){return function(e,t,n){return L(it(e,n),t)}(e,(function(e){return Ce(e,t)}),n)},_t=function(e,t){return function(e,t){return L(lt(e),t)}(e,(function(e){return Ce(e,t)}))},wt=function(e,t){return function(e,t){var n=void 0===t?document:t.dom;return Oe(n)?[]:R(n.querySelectorAll(e),xe.fromDom)}(t,e)};function xt(e,t,n,o,r){return e(n,o)?S.some(n):u(r)&&r(n)?S.none():t(n,o,r)}var Ct=function(e,t,n){for(var o=e.dom,r=u(n)?n:_;o.parentNode;){o=o.parentNode;var i=xe.fromDom(o);if(t(i))return S.some(i);if(r(i))break}return S.none()},Ot=function(e,t,n){return Ct(e,(function(e){return Ce(e,t)}),n)},St=function(e,t){return function(e,t){return F(e.dom.childNodes,(function(e){return t(xe.fromDom(e))})).map(xe.fromDom)}(e,(function(e){return Ce(e,t)}))},kt=function(e,t){return Se(t,e)},Et=function(e,t,n){return xt((function(e,t){return Ce(e,t)}),Ot,e,t,n)},Tt=function(e,t,n){if(!(o(n)||s(n)||d(n)))throw new Error("Attribute value was not simple");e.setAttribute(t,n+"")},Dt=function(e,t,n){Tt(e.dom,t,n)},At=function(e,t){var n=e.dom;Re(t,(function(e,t){Tt(n,t,e)}))},Mt=function(e,t){var n=e.dom.getAttribute(t);return null===n?void 0:n},Rt=function(e,t){return S.from(Mt(e,t))},Pt=function(e,t){e.dom.removeAttribute(t)},It=function(e){return z(e.dom.attributes,(function(e,t){return e[t.name]=t.value,e}),{})},Lt=function(e,t,n){return void 0===n&&(n=h),e.exists((function(e){return n(e,t)}))},jt=function(e){for(var t=[],n=function(e){t.push(e)},o=0;o<e.length;o++)e[o].each(n);return t},zt=function(e,t,n){return e.isSome()&&t.isSome()?S.some(n(e.getOrDie(),t.getOrDie())):S.none()},Ft=function(e,t){return e?S.some(t):S.none()},Bt=function(e){return void 0!==e.style&&u(e.style.getPropertyValue)},Nt=function(e,t,n){if(!o(n))throw new Error("CSS value must be a string: "+n);Bt(e)&&e.style.setProperty(t,n)},Vt=function(e,t,n){var o=e.dom;Nt(o,t,n)},Ht=function(e,t){var n=e.dom;Re(t,(function(e,t){Nt(n,t,e)}))},$t=function(e,t){var n=e.dom,o=window.getComputedStyle(n).getPropertyValue(t);return""!==o||gt(e)?o:Ut(n,t)},Ut=function(e,t){return Bt(e)?e.style.getPropertyValue(t):""},Wt=function(e,t){var n=e.dom,o=Ut(n,t);return S.from(o).filter((function(e){return e.length>0}))},qt=function(e,t){!function(e,t){Bt(e)&&e.style.removeProperty(t)}(e.dom,t),Lt(Rt(e,"style").map(ae),"")&&Pt(e,"style")},Kt=function(e,t,n){return void 0===n&&(n=0),Rt(e,t).map((function(e){return parseInt(e,10)})).getOr(n)},Gt=function(e,t){return Kt(e,t,1)},Yt=function(e){return tt("col")(e)?Kt(e,"span",1)>1:Gt(e,"colspan")>1},Xt=function(e){return Gt(e,"rowspan")>1},Jt=function(e,t){return parseInt($t(e,t),10)},Qt=m(10),Zt=m(10),en=function(e,t){return tn(e,t,w)},tn=function(e,t,n){return V(lt(e),(function(e){return Ce(e,t)?n(e)?[e]:[]:tn(e,t,n)}))},nn=function(e,t){return function(e,t,n){if(void 0===n&&(n=_),n(t))return S.none();if(D(e,Ke(t)))return S.some(t);return Ot(t,e.join(","),(function(e){return Ce(e,"table")||n(e)}))}(["td","th"],e,t)},on=function(e){return en(e,"th,td")},rn=function(e){return Ce(e,"colgroup")?_t(e,"col"):V(ln(e),(function(e){return _t(e,"col")}))},an=function(e,t){return Et(e,"table",t)},sn=function(e){return en(e,"tr")},ln=function(e){return an(e).fold(m([]),(function(e){return _t(e,"colgroup")}))},cn=function(e,t){return R(e,(function(e){if("colgroup"===Ke(e)){var n=R(rn(e),(function(e){var t=Kt(e,"span",1);return $e(e,1,t)}));return Ue(e,n,"colgroup")}n=R(on(e),(function(e){var t=Kt(e,"rowspan",1),n=Kt(e,"colspan",1);return $e(e,t,n)}));return Ue(e,n,t(e))}))},un=function(e){return rt(e).map((function(e){var t=Ke(e);return function(e){return D(He,e)}(t)?t:"tbody"})).getOr("tbody")},dn=function(e){var t=sn(e),n=X(X([],ln(e),!0),t,!0);return cn(n,un)},fn=function(e,t,n){var o=e.cells,r=o.slice(0,t),i=o.slice(t),a=r.concat(n).concat(i);return hn(e,a)},mn=function(e,t,n){return fn(e,t,[n])},pn=function(e,t,n){e.cells[t]=n},hn=function(e,t){return qe(e.element,t,e.section,e.isNew)},gn=function(e,t){return e.cells[t]},vn=function(e,t){return gn(e,t).element},bn=function(e){return e.cells.length},yn=function(e){var t=I(e,(function(e){return"colgroup"===e.section}));return{rows:t.fail,cols:t.pass}},_n=function(e,t,n){var o=R(e.cells,n);return qe(t(e.element),o,e.section,!0)},wn="data-snooker-locked-cols",xn=function(e){return Rt(e,wn).bind((function(e){return S.from(e.match(/\d+/g))})).map((function(e){return $(e,w)}))},Cn=function(e){var t=z(yn(e).rows,(function(e,t){return P(t.cells,(function(t,n){t.isLocked&&(e[n]=!0)})),e}),{});return function(e,t){var n=k.call(e,0);return n.sort(t),n}(je(t,(function(e,t){return parseInt(t,10)})))},On=function(e,t){return e+","+t},Sn=function(e,t){var n=V(e.all,(function(e){return e.cells}));return L(n,t)},kn=function(e){var t={},n=[],o=q(e).map((function(e){return e.element})).bind(an).bind(xn).getOr({}),r=0,i=0,a=0,s=I(e,(function(e){return"colgroup"===e.section})),l=s.pass,c=s.fail;P(c,(function(e){var s=[];P(e.cells,(function(e){for(var n=0;void 0!==t[On(a,n)];)n++;for(var r=Ve(o,n.toString()),l=function(e,t,n,o,r,i){return{element:e,rowspan:t,colspan:n,row:o,column:r,isLocked:i}}(e.element,e.rowspan,e.colspan,a,n,r),c=0;c<e.colspan;c++)for(var u=0;u<e.rowspan;u++){var d=n+c,f=On(a+u,d);t[f]=l,i=Math.max(i,d+1)}s.push(l)})),r++,n.push(Ue(e.element,s,e.section)),a++}));var u=K(l).map((function(e){var t=function(e){var t={},n=0;return P(e.cells,(function(e){var o=e.colspan;M(o,(function(r){var i=n+r;t[i]=function(e,t,n){return{element:e,colspan:t,column:n}}(e.element,o,i)})),n+=o})),t}(e);return{colgroups:[function(e,t){return{element:e,columns:t}}(e.element,ze(t))],columns:t}})).getOrThunk((function(){return{colgroups:[],columns:{}}})),d=u.columns,f=u.colgroups;return{grid:function(e,t){return{rows:e,columns:t}}(r,i),access:t,all:n,columns:d,colgroups:f}},En={fromTable:function(e){var t=dn(e);return kn(t)},generate:kn,getAt:function(e,t,n){return S.from(e.access[On(t,n)])},findItem:function(e,t,n){var o=Sn(e,(function(e){return n(t,e.element)}));return o.length>0?S.some(o[0]):S.none()},filterItems:Sn,justCells:function(e){return V(e.all,(function(e){return e.cells}))},justColumns:function(e){return ze(e.columns)},hasColumns:function(e){return Ae(e.columns).length>0},getColumnAt:function(e,t){return S.from(e.columns[t])}},Tn=function(e,t){var n=t.column,o=t.column+t.colspan-1,r=t.row,i=t.row+t.rowspan-1;return n<=e.finishCol&&o>=e.startCol&&r<=e.finishRow&&i>=e.startRow},Dn=function(e,t){return t.column>=e.startCol&&t.column+t.colspan-1<=e.finishCol&&t.row>=e.startRow&&t.row+t.rowspan-1<=e.finishRow},An=function(e,t,n){var o=En.findItem(e,t,ke),r=En.findItem(e,n,ke);return o.bind((function(e){return r.map((function(t){return n=e,o=t,r=Math.min(n.row,o.row),i=Math.min(n.column,o.column),a=Math.max(n.row+n.rowspan-1,o.row+o.rowspan-1),s=Math.max(n.column+n.colspan-1,o.column+o.colspan-1),{startRow:r,startCol:i,finishRow:a,finishCol:s};var n,o,r,i,a,s}))}))},Mn=function(e,t,n){return An(e,t,n).bind((function(t){return function(e,t){for(var n=!0,o=g(Dn,t),r=t.startRow;r<=t.finishRow;r++)for(var i=t.startCol;i<=t.finishCol;i++)n=n&&En.getAt(e,r,i).exists(o);return n?S.some(t):S.none()}(e,t)}))},Rn=function(e,t,n){return An(e,t,n).map((function(t){var n=En.filterItems(e,g(Tn,t));return R(n,(function(e){return e.element}))}))},Pn=function(e,t){return En.findItem(e,t,(function(e,t){return Te(t,e)})).map((function(e){return e.element}))},In=function(e,t,n){return an(e).bind((function(o){return function(e,t,n,o){return En.findItem(e,t,ke).bind((function(t){var r=n>0?t.row+t.rowspan-1:t.row,i=o>0?t.column+t.colspan-1:t.column;return En.getAt(e,r+n,i+o).map((function(e){return e.element}))}))}(zn(o),e,t,n)}))},Ln=function(e,t,n){var o=zn(e);return Rn(o,t,n)},jn=function(e,t,n,o,r){var i=zn(e),a=ke(e,n)?S.some(t):Pn(i,t),s=ke(e,r)?S.some(o):Pn(i,o);return a.bind((function(e){return s.bind((function(t){return Rn(i,e,t)}))}))},zn=En.fromTable,Fn=function(e,t){rt(e).each((function(n){n.dom.insertBefore(t.dom,e.dom)}))},Bn=function(e,t){st(e).fold((function(){rt(e).each((function(e){Vn(e,t)}))}),(function(e){Fn(e,t)}))},Nn=function(e,t){(function(e){return ct(e,0)})(e).fold((function(){Vn(e,t)}),(function(n){e.dom.insertBefore(t.dom,n.dom)}))},Vn=function(e,t){e.dom.appendChild(t.dom)},Hn=function(e,t){Fn(e,t),Vn(t,e)},$n=function(e,t){P(t,(function(n,o){var r=0===o?e:t[o-1];Bn(r,n)}))},Un=function(e,t){P(t,(function(t){Vn(e,t)}))},Wn=function(e){e.dom.textContent="",P(lt(e),(function(e){qn(e)}))},qn=function(e){var t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},Kn=function(e){var t,n=lt(e);n.length>0&&(t=e,P(n,(function(e){Fn(t,e)}))),qn(e)},Gn=function(e,t){var n=function(t){return e(t)?S.from(t.dom.nodeValue):S.none()};return{get:function(o){if(!e(o))throw new Error("Can only get "+t+" value of a "+t+" node");return n(o).getOr("")},getOption:n,set:function(n,o){if(!e(n))throw new Error("Can only set raw "+t+" value of a "+t+" node");n.dom.nodeValue=o}}}(Qe,"text"),Yn=function(e){return Gn.get(e)},Xn=function(e){return Gn.getOption(e)},Jn=function(e,t){return Gn.set(e,t)},Qn=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","li","table","thead","tbody","tfoot","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"];function Zn(){return{up:m({selector:Ot,closest:Et,predicate:Ct,all:it}),down:m({selector:wt,predicate:bt}),styles:m({get:$t,getRaw:Wt,set:Vt,remove:qt}),attrs:m({get:Mt,set:Dt,remove:Pt,copyTo:function(e,t){var n=It(e);At(t,n)}}),insert:m({before:Fn,after:Bn,afterAll:$n,append:Vn,appendAll:Un,prepend:Nn,wrap:Hn}),remove:m({unwrap:Kn,remove:qn}),create:m({nu:xe.fromTag,clone:function(e){return xe.fromDom(e.dom.cloneNode(!1))},text:xe.fromText}),query:m({comparePosition:function(e,t){return e.dom.compareDocumentPosition(t.dom)},prevSibling:at,nextSibling:st}),property:m({children:lt,name:Ke,parent:rt,document:function(e){return ot(e).dom},isText:Qe,isComment:Xe,isElement:Je,isSpecial:function(e){var t=Ke(e);return D(["script","noscript","iframe","noframes","noembed","title","style","textarea","xmp"],t)},getLanguage:function(e){return Je(e)?Rt(e,"lang"):S.none()},getText:Yn,setText:Jn,isBoundary:function(e){return!!Je(e)&&("body"===Ke(e)||D(Qn,Ke(e)))},isEmptyTag:function(e){return!!Je(e)&&D(["br","img","hr","input"],Ke(e))},isNonEditable:function(e){return Je(e)&&"false"===Mt(e,"contenteditable")}}),eq:ke,is:De}}var eo,to,no=function(e,t,n,o){var r=t(e,n);return j(o,(function(n,o){var r=t(e,o);return oo(e,n,r)}),r)},oo=function(e,t,n){return t.bind((function(t){return n.filter(g(e.eq,t))}))},ro=function(e,t,n){return n.length>0?function(e,t,n,o){return o(e,t,n[0],n.slice(1))}(e,t,n,no):S.none()},io=function(e,t,n,o){void 0===o&&(o=_);var r=[t].concat(e.up().all(t)),i=[n].concat(e.up().all(n)),a=function(e){return B(e,o).fold((function(){return e}),(function(t){return e.slice(0,t+1)}))},s=a(r),l=a(i),c=F(s,(function(t){return A(l,function(e,t){return g(e.eq,t)}(e,t))}));return{firstpath:s,secondpath:l,shared:c}},ao=Zn(),so=function(e,t){return ro(ao,(function(t,n){return e(n)}),t)},lo=function(e){return Ot(e,"table")},co=function(e,t,n){var o=function(e){return function(t){return void 0!==n&&n(t)||ke(t,e)}};return ke(e,t)?S.some({boxes:S.some([e]),start:e,finish:t}):lo(e).bind((function(r){return lo(t).bind((function(i){if(ke(r,i))return S.some({boxes:Ln(r,e,t),start:e,finish:t});if(Te(r,i)){var a=(s=yt(t,"td,th",o(r))).length>0?s[s.length-1]:t;return S.some({boxes:jn(r,e,r,t,i),start:e,finish:a})}if(Te(i,r)){var s,l=(s=yt(e,"td,th",o(i))).length>0?s[s.length-1]:e;return S.some({boxes:jn(i,e,r,t,i),start:e,finish:l})}return function(e,t,n){return io(ao,e,t,n)}(e,t).shared.bind((function(a){return Et(a,"table",n).bind((function(n){var a=yt(t,"td,th",o(n)),s=a.length>0?a[a.length-1]:t,l=yt(e,"td,th",o(n)),c=l.length>0?l[l.length-1]:e;return S.some({boxes:jn(n,e,r,t,i),start:c,finish:s})}))}))}))}))},uo=function(e,t){var n=wt(e,t);return n.length>0?S.some(n):S.none()},fo=function(e,t,n){return kt(e,t).bind((function(t){return kt(e,n).bind((function(e){return so(lo,[t,e]).map((function(n){return{first:t,last:e,table:n}}))}))}))},mo=function(e,t,n,o,r){return function(e,t){return F(e,(function(e){return Ce(e,t)}))}(e,r).bind((function(e){return In(e,t,n).bind((function(e){return function(e,t){return Ot(e,"table").bind((function(n){return kt(n,t).bind((function(t){return co(t,e).bind((function(e){return e.boxes.map((function(t){return{boxes:t,start:e.start,finish:e.finish}}))}))}))}))}(e,o)}))}))},po=function(e,t){return uo(e,t)},ho=function(e,t,n){return fo(e,t,n).bind((function(t){var n=function(t){return ke(e,t)},o=Ot(t.first,"thead,tfoot,tbody,table",n),r=Ot(t.last,"thead,tfoot,tbody,table",n);return o.bind((function(e){return r.bind((function(n){return ke(e,n)?function(e,t,n){var o=zn(e);return Mn(o,t,n)}(t.table,t.first,t.last):S.none()}))}))}))},go=function(e){if(!i(e))throw new Error("cases must be an array");if(0===e.length)throw new Error("there must be at least one case");var t=[],n={};return P(e,(function(o,r){var a=Ae(o);if(1!==a.length)throw new Error("one and only one name per case");var s=a[0],l=o[s];if(void 0!==n[s])throw new Error("duplicate key detected:"+s);if("cata"===s)throw new Error("cannot have a case named cata (sorry)");if(!i(l))throw new Error("case arguments must be an array");t.push(s),n[s]=function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var i=n.length;if(i!==l.length)throw new Error("Wrong number of arguments to case "+s+". Expected "+l.length+" ("+l+"), got "+i);var a=function(e){var o=Ae(e);if(t.length!==o.length)throw new Error("Wrong number of arguments to match. Expected: "+t.join(",")+"\nActual: "+o.join(","));if(!H(t,(function(e){return D(o,e)})))throw new Error("Not all branches were specified when using match. Specified: "+o.join(", ")+"\nRequired: "+t.join(", "));return e[s].apply(null,n)};return{fold:function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];if(t.length!==e.length)throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+t.length);var i=t[r];return i.apply(null,n)},match:a,log:function(e){}}}})),n},vo=go([{none:[]},{multiple:["elements"]},{single:["element"]}]),bo=function(e,t,n,o){return e.fold(t,n,o)},yo=vo.none,_o=vo.multiple,wo=vo.single,xo=tinymce.util.Tools.resolve("tinymce.PluginManager"),Co=function(e,t){return xe.fromDom(e.dom.cloneNode(t))},Oo=function(e){return Co(e,!1)},So=function(e){return Co(e,!0)},ko=function(e,t){var n=xe.fromTag(t),o=It(e);return At(n,o),n},Eo=function(e,t){var n=function(n){var o=t(n);if(o<=0||null===o){var r=$t(n,e);return parseFloat(r)||0}return o},o=function(e,t){return z(t,(function(t,n){var o=$t(e,n),r=void 0===o?0:parseInt(o,10);return isNaN(r)?t:t+r}),0)};return{set:function(t,n){if(!d(n)&&!n.match(/^[0-9]+$/))throw new Error(e+".set accepts only positive integer values. Value was "+n);var o=t.dom;Bt(o)&&(o.style[e]=n+"px")},get:n,getOuter:n,aggregate:o,max:function(e,t,n){var r=o(e,n);return t>r?t-r:0}}},To=function(){var e=_e().browser;return e.isIE()||e.isEdge()},Do=function(e,t){return function(e){var t=parseFloat(e);return isNaN(t)?S.none():S.some(t)}(e).getOr(t)},Ao=function(e,t,n){return Do($t(e,t),n)},Mo=function(e){return $t(e,"box-sizing")},Ro=function(e,t,n,o){return t-Ao(e,"padding-"+n,0)-Ao(e,"padding-"+o,0)-Ao(e,"border-"+n+"-width",0)-Ao(e,"border-"+o+"-width",0)},Po=function(e,t){var n=e.dom,o=n.getBoundingClientRect().width||n.offsetWidth;return"border-box"===t?o:Ro(e,o,"left","right")},Io=Eo("width",(function(e){return e.dom.offsetWidth})),Lo=function(e){return Io.get(e)},jo=function(e){return Io.getOuter(e)},zo=function(e){return Po(e,"content-box")},Fo=function(e){return To()?Po(e,Mo(e)):Ao(e,"width",e.dom.offsetWidth)},Bo=function(e,t){void 0===t&&(t=w);var n=e.grid,o=M(n.columns,p),r=M(n.rows,p);return R(o,(function(n){return No((function(){return V(r,(function(t){return En.getAt(e,t,n).filter((function(e){return e.column===n})).toArray()}))}),(function(e){return 1===e.colspan&&t(e.element)}),(function(){return En.getAt(e,0,n)}))}))},No=function(e,t,n){var o=e();return F(o,t).orThunk((function(){return S.from(o[0]).orThunk(n)})).map((function(e){return e.element}))},Vo=function(e){var t=e.grid,n=M(t.rows,p),o=M(t.columns,p);return R(n,(function(t){return No((function(){return V(o,(function(n){return En.getAt(e,t,n).filter((function(e){return e.row===t})).fold(m([]),(function(e){return[e]}))}))}),(function(e){return 1===e.rowspan}),(function(){return En.getAt(e,t,0)}))}))},Ho=function(e,t){if(t<0||t>=e.length-1)return S.none();var n=e[t].fold((function(){var n=function(e){var t=k.call(e,0);return t.reverse(),t}(e.slice(0,t));return G(n,(function(e,t){return e.map((function(e){return{value:e,delta:t+1}}))}))}),(function(e){return S.some({value:e,delta:0})})),o=e[t+1].fold((function(){var n=e.slice(t+1);return G(n,(function(e,t){return e.map((function(e){return{value:e,delta:t+1}}))}))}),(function(e){return S.some({value:e,delta:1})}));return n.bind((function(e){return o.map((function(t){var n=t.delta+e.delta;return Math.abs(t.value-e.value)/n}))}))},$o=function(e,t){return function(n){return"rtl"===Uo(n)?t:e}},Uo=function(e){return"rtl"===$t(e,"direction")?"rtl":"ltr"},Wo=Eo("height",(function(e){var t=e.dom;return gt(e)?t.getBoundingClientRect().height:t.offsetHeight})),qo=function(e){return Wo.get(e)},Ko=function(e){return Wo.getOuter(e)},Go=function(e){return To()?function(e,t){var n=e.dom,o=n.getBoundingClientRect().height||n.offsetHeight;return"border-box"===t?o:Ro(e,o,"top","bottom")}(e,Mo(e)):Ao(e,"height",e.dom.offsetHeight)},Yo=function(e,t){return{left:e,top:t,translate:function(n,o){return Yo(e+n,t+o)}}},Xo=Yo,Jo=function(e,t){return void 0!==e?e:void 0!==t?t:0},Qo=function(e){var t=e.dom.ownerDocument,n=t.body,o=t.defaultView,r=t.documentElement;if(n===e.dom)return Xo(n.offsetLeft,n.offsetTop);var i=Jo(null==o?void 0:o.pageYOffset,r.scrollTop),a=Jo(null==o?void 0:o.pageXOffset,r.scrollLeft),s=Jo(r.clientTop,n.clientTop),l=Jo(r.clientLeft,n.clientLeft);return Zo(e).translate(a-l,i-s)},Zo=function(e){var t=e.dom,n=t.ownerDocument.body;return n===t?Xo(n.offsetLeft,n.offsetTop):gt(e)?function(e){var t=e.getBoundingClientRect();return Xo(t.left,t.top)}(t):Xo(0,0)},er=function(e,t){return{row:e,y:t}},tr=function(e,t){return{col:e,x:t}},nr=function(e){return Qo(e).left+jo(e)},or=function(e){return Qo(e).left},rr=function(e,t){return tr(e,or(t))},ir=function(e,t){return tr(e,nr(t))},ar=function(e){return Qo(e).top},sr=function(e,t){return er(e,ar(t))},lr=function(e,t){return er(e,ar(t)+Ko(t))},cr=function(e,t,n){if(0===n.length)return[];var o=R(n.slice(1),(function(t,n){return t.map((function(t){return e(n,t)}))})),r=n[n.length-1].map((function(e){return t(n.length-1,e)}));return o.concat([r])},ur={delta:p,positions:function(e){return cr(sr,lr,e)},edge:ar},dr={delta:p,edge:or,positions:function(e){return cr(rr,ir,e)}},fr={delta:function(e){return-e},edge:nr,positions:function(e){return cr(ir,rr,e)}},mr=$o(dr,fr),pr={delta:function(e,t){return mr(t).delta(e,t)},positions:function(e,t){return mr(t).positions(e,t)},edge:function(e){return mr(e).edge(e)}},hr={unsupportedLength:["em","ex","cap","ch","ic","rem","lh","rlh","vw","vh","vi","vb","vmin","vmax","cm","mm","Q","in","pc","pt","px"],fixed:["px","pt"],relative:["%"],empty:[""]},gr=(eo=function(e){return"(?:"+e+")?"},to=["Infinity","[0-9]+\\."+eo("[0-9]+")+eo("[eE][+-]?[0-9]+"),"\\.[0-9]+"+eo("[eE][+-]?[0-9]+"),"[0-9]+"+eo("[eE][+-]?[0-9]+")].join("|"),new RegExp("^([+-]?(?:"+to+"))(.*)$")),vr=function(e,t){return S.from(gr.exec(e)).bind((function(e){var n=Number(e[1]),o=e[2];return function(e,t){return A(t,(function(t){return A(hr[t],(function(t){return e===t}))}))}(o,t)?S.some({value:n,unit:o}):S.none()}))},br=/(\d+(\.\d+)?)%/,yr=/(\d+(\.\d+)?)px|em/,_r=tt("col"),wr=function(e,t,n){var o,r=(o=e,S.from(o.dom.parentElement).map(xe.fromDom)).getOrThunk((function(){return vt(nt(e))}));return t(e)/n(r)*100},xr=function(e,t){Vt(e,"width",t+"px")},Cr=function(e,t){Vt(e,"width",t+"%")},Or=function(e,t){Vt(e,"height",t+"px")},Sr=function(e,t,n,o){var r=parseFloat(e);return ie(e,"%")&&"table"!==Ke(t)?function(e,t,n,o){var r=an(e).map((function(e){var o=n(e);return Math.floor(t/100*o)})).getOr(t);return o(e,r),r}(t,r,n,o):r},kr=function(e){var t=function(e){return Go(e)+"px"}(e);return t?Sr(t,e,qo,Or):qo(e)},Er=function(e,t){return Wt(e,t).orThunk((function(){return Rt(e,t).map((function(e){return e+"px"}))}))},Tr=function(e){return Er(e,"width")},Dr=function(e){return wr(e,Lo,zo)},Ar=function(e){return _r(e)?Lo(e):Fo(e)},Mr=function(e){return function(e,t,n){return n(e)/Gt(e,t)}(e,"rowspan",kr)},Rr=function(e,t,n){Vt(e,"width",t+n)},Pr=function(e){return wr(e,Lo,zo)+"%"},Ir=m(br),Lr=tt("col"),jr=function(e){return Tr(e).getOrThunk((function(){return Ar(e)+"px"}))},zr=function(e){return(t=e,Er(t,"height")).getOrThunk((function(){return Mr(e)+"px"}));var t},Fr=function(e,t,n,o,r,i){return e.filter(o).fold((function(){return i(Ho(n,t))}),(function(e){return r(e)}))},Br=function(e,t,n,o){var r=Bo(e),i=En.hasColumns(e)?function(e){return R(En.justColumns(e),(function(e){return S.from(e.element)}))}(e):r,a=[S.some(pr.edge(t))].concat(R(pr.positions(r,t),(function(e){return e.map((function(e){return e.x}))}))),s=y(Yt);return R(i,(function(e,t){return Fr(e,t,a,s,(function(e){if(function(e){var t=_e().browser,n=t.isChrome()||t.isFirefox();return!Lr(e)||n}(e))return n(e);var i,l,c=(i=r[t],l=p,null!=i?l(i):S.none());return Fr(c,t,a,s,(function(e){return o(S.some(Lo(e)))}),o)}),o)}))},Nr=function(e){return e.map((function(e){return e+"px"})).getOr("")},Vr=function(e,t,n){return Br(e,t,Ar,(function(e){return e.getOrThunk(n.minCellWidth)}))},Hr=function(e,t,n,o,r){var i=Vo(e),a=[S.some(n.edge(t))].concat(R(n.positions(i,t),(function(e){return e.map((function(e){return e.y}))})));return R(i,(function(e,t){return Fr(e,t,a,y(Xt),o,r)}))},$r=function(e,t){return function(){return gt(e)?t(e):parseFloat(Wt(e,"width").getOr("0"))}},Ur=function(e){var t=$r(e,Lo),n=m(0);return{width:t,pixelWidth:t,getWidths:function(t,n){return Vr(t,e,n)},getCellDelta:n,singleColumnWidth:m([0]),minCellWidth:n,setElementWidth:f,adjustTableWidth:f,isRelative:!0,label:"none"}},Wr=function(e){var t=$r(e,(function(e){return parseFloat(Pr(e))})),n=$r(e,Lo);return{width:t,pixelWidth:n,getWidths:function(t,n){return function(e,t,n){return Br(e,t,Dr,(function(e){return e.fold((function(){return n.minCellWidth()}),(function(e){return e/n.pixelWidth()*100}))}))}(t,e,n)},getCellDelta:function(e){return e/n()*100},singleColumnWidth:function(e,t){return[100-e]},minCellWidth:function(){return Qt()/n()*100},setElementWidth:Cr,adjustTableWidth:function(n){var o=t();Cr(e,o+n/100*o)},isRelative:!0,label:"percent"}},qr=function(e){var t=$r(e,Lo);return{width:t,pixelWidth:t,getWidths:function(t,n){return Vr(t,e,n)},getCellDelta:p,singleColumnWidth:function(e,t){return[Math.max(Qt(),e+t)-e]},minCellWidth:Qt,setElementWidth:xr,adjustTableWidth:function(n){var o=t()+n;xr(e,o)},isRelative:!1,label:"pixel"}},Kr=function(e){return Tr(e).fold((function(){return Ur(e)}),(function(t){return function(e,t){return null!==Ir().exec(t)?Wr(e):qr(e)}(e,t)}))},Gr=qr,Yr=Wr,Xr=function(e,t,n){var o=e[n].element,r=xe.fromTag("td");Vn(r,xe.fromTag("br")),(t?Vn:Nn)(o,r)},Jr=function(e,t){var n=function(e){return Ce(e.element,t)},o=So(e),r=dn(o),i=Kr(e),a=En.generate(r),s=function(e,t){var n=e.grid.columns,o=e.grid.rows,r=n,i=0,a=0,s=[],l=[];return Re(e.access,(function(e){if(s.push(e),t(e)){l.push(e);var n=e.row,c=n+e.rowspan-1,u=e.column,d=u+e.colspan-1;n<o?o=n:c>i&&(i=c),u<r?r=u:d>a&&(a=d)}})),function(e,t,n,o,r,i){return{minRow:e,minCol:t,maxRow:n,maxCol:o,allCells:r,selectedCells:i}}(o,r,i,a,s,l)}(a,n),l="th:not("+t+"),td:not("+t+")",c=tn(o,"th,td",(function(e){return Ce(e,l)}));return P(c,qn),function(e,t,n,o){for(var r=t.grid.columns,i=t.grid.rows,a=0;a<i;a++)for(var s=!1,l=0;l<r;l++){if(!(a<n.minRow||a>n.maxRow||l<n.minCol||l>n.maxCol))En.getAt(t,a,l).filter(o).isNone()?Xr(e,s,a):s=!0}}(r,a,s,n),function(e,t,n,o){Re(n.columns,(function(e){(e.column<t.minCol||e.column>t.maxCol)&&qn(e.element)}));var r=L(en(e,"tr"),(function(e){return 0===e.dom.childElementCount}));P(r,qn),t.minCol!==t.maxCol&&t.minRow!==t.maxRow||P(en(e,"th,td"),(function(e){Pt(e,"rowspan"),Pt(e,"colspan")})),Pt(e,wn),Pt(e,"data-snooker-col-series"),Kr(e).adjustTableWidth(o)}(o,s,a,function(e,t,n,o){if(0===o.minCol&&t.grid.columns===o.maxCol+1)return 0;var r=Vr(t,e,n),i=z(r,(function(e,t){return e+t}),0),a=z(r.slice(o.minCol,o.maxCol+1),(function(e,t){return e+t}),0)/i*n.pixelWidth()-n.pixelWidth();return n.getCellDelta(a)}(e,En.fromTable(e),i,s)),o},Qr=function(e){return"img"===Ke(e)?1:Xn(e).fold((function(){return lt(e).length}),(function(e){return e.length}))},Zr=["img","br"],ei=function(e){return Xn(e).filter((function(e){return 0!==e.trim().length||e.indexOf(" ")>-1})).isSome()||D(Zr,Ke(e))},ti=function(e){return t=ei,(n=function(e){for(var o=0;o<e.childNodes.length;o++){var r=xe.fromDom(e.childNodes[o]);if(t(r))return S.some(r);var i=n(e.childNodes[o]);if(i.isSome())return i}return S.none()})(e.dom);var t,n},ni=function(e){return oi(e,ei)},oi=function(e,t){var n=function(e){for(var o=lt(e),r=o.length-1;r>=0;r--){var i=o[r];if(t(i))return S.some(i);var a=n(i);if(a.isSome())return a}return S.none()};return n(e)},ri={scope:["row","col"]},ii=function(e){return function(){var t=xe.fromTag("td",e.dom);return Vn(t,xe.fromTag("br",e.dom)),t}},ai=function(e){return function(){return xe.fromTag("col",e.dom)}},si=function(e){return function(){return xe.fromTag("colgroup",e.dom)}},li=function(e){return function(){return xe.fromTag("tr",e.dom)}},ci=function(e,t,n){var o=function(e,t){var n=ko(e,t),o=lt(So(e));return Un(n,o),n}(e,t);return Re(n,(function(e,t){null===e?Pt(o,t):Dt(o,t,e)})),o},ui=function(e){return e},di=function(e,t,n){var o=function(e,t){var n,o,r,i;n=e.element,o=t,r=n.dom,i=o.dom,Bt(r)&&Bt(i)&&(i.style.cssText=r.style.cssText),qt(t,"height"),1!==e.colspan&&qt(t,"width")};return{col:function(n){var r=xe.fromTag(Ke(n.element),t.dom);return o(n,r),e(n.element,r),r},colgroup:si(t),row:li(t),cell:function(r){var i=xe.fromTag(Ke(r.element),t.dom),a=n.getOr(["strong","em","b","i","span","font","h1","h2","h3","h4","h5","h6","p","div"]),s=a.length>0?function(e,t,n){return ti(e).map((function(o){var r=n.join(","),i=yt(o,r,(function(t){return ke(t,e)}));return j(i,(function(e,t){var n=Oo(t);return Pt(n,"contenteditable"),Vn(e,n),n}),t)})).getOr(t)}(r.element,i,a):i;return Vn(s,xe.fromTag("br")),o(r,i),function(e,t){Re(ri,(function(n,o){return Rt(e,o).filter((function(e){return D(n,e)})).each((function(e){return Dt(t,o,e)}))}))}(r.element,i),e(r.element,i),i},replace:ci,colGap:ai(t),gap:ii(t)}},fi=function(e){return{col:ai(e),colgroup:si(e),row:li(e),cell:ii(e),replace:ui,colGap:ai(e),gap:ii(e)}},mi=function(e){return R(e,xe.fromDom)},pi=function(e){return xe.fromDom(e.getBody())},hi=function(e){return e.getBoundingClientRect().width},gi=function(e){return e.getBoundingClientRect().height},vi=function(e){return function(t){return ke(t,pi(e))}},bi=function(e){return/^\d+(\.\d+)?$/.test(e)?e+"px":e},yi=function(e){Pt(e,"data-mce-style");var t=function(e){return Pt(e,"data-mce-style")};P(on(e),t),P(rn(e),t),P(sn(e),t)},_i=function(e){return xe.fromDom(e.selection.getStart())},wi=function(e){return bo(e.get(),m([]),p,U)},xi=function(e){var t=function(e,t){return Rt(e,t).exists((function(e){return parseInt(e,10)>1}))},n=wi(e);return n.length>0&&H(n,(function(e){return t(e,"rowspan")||t(e,"colspan")}))?S.some(n):S.none()},Ci=function(e,t,n){return bo(t.get(),S.none,(function(t){return t.length<=1?S.none():ho(e,n.firstSelectedSelector,n.lastSelectedSelector).map((function(e){return{bounds:e,cells:t}}))}),S.none)},Oi={selected:"data-mce-selected",selectedSelector:"td[data-mce-selected],th[data-mce-selected]",firstSelected:"data-mce-first-selected",firstSelectedSelector:"td[data-mce-first-selected],th[data-mce-first-selected]",lastSelected:"data-mce-last-selected",lastSelectedSelector:"td[data-mce-last-selected],th[data-mce-last-selected]"},Si=function(e,t,n){return{element:n,mergable:Ci(t,e,Oi),unmergable:xi(e),selection:wi(e)}},ki=function(e){return function(t,n){var o,r=Ke(t),i="col"===r||"colgroup"===r?an(o=t).bind((function(e){return po(e,Oi.firstSelectedSelector)})).fold(m(o),(function(e){return e[0]})):t;return Et(i,e,n)}},Ei=ki("th,td,caption"),Ti=ki("th,td"),Di=function(e){return wi(e)},Ai=function(e,t,n){e.on("BeforeGetContent",(function(n){!0===n.selection&&bo(t.get(),f,(function(t){n.preventDefault(),function(e){return an(e[0]).map((function(e){var t=Jr(e,"[data-mce-selected]");return yi(t),[t]}))}(t).each((function(t){n.content="text"===n.format?function(e){return R(e,(function(e){return e.dom.innerText})).join("")}(t):function(e,t){return R(t,(function(t){return e.selection.serializer.serialize(t.dom,{})})).join("")}(e,t)}))}),f)})),e.on("BeforeSetContent",(function(o){if(!0===o.selection&&!0===o.paste){var r=Di(t);q(r).each((function(t){an(t).each((function(r){var i,a,s,l=L((i=o.content,(s=(a||document).createElement("div")).innerHTML=i,lt(xe.fromDom(s))),(function(e){return"meta"!==Ke(e)})),c=tt("table");if(1===l.length&&c(l[0])){o.preventDefault();var u=xe.fromDom(e.getDoc()),d=fi(u),f=function(e,t,n){return{element:e,clipboard:t,generators:n}}(t,l[0],d);n.pasteCells(r,f).each((function(){e.focus()}))}}))}))}}))},Mi=go([{none:[]},{only:["index"]},{left:["index","next"]},{middle:["prev","index","next"]},{right:["prev","index"]}]),Ri=Y({},Mi),Pi=function(e,t,n,o,r){var i=e.slice(0),a=function(e,t){return 0===e.length?Ri.none():1===e.length?Ri.only(0):0===t?Ri.left(0,1):t===e.length-1?Ri.right(t-1,t):t>0&&t<e.length-1?Ri.middle(t-1,t,t+1):Ri.none()}(e,t),s=m(R(i,m(0)));return a.fold(s,(function(e){return o.singleColumnWidth(i[e],n)}),(function(e,t){return r.calcLeftEdgeDeltas(i,e,t,n,o.minCellWidth(),o.isRelative)}),(function(e,t,a){return r.calcMiddleDeltas(i,e,t,a,n,o.minCellWidth(),o.isRelative)}),(function(e,t){return r.calcRightEdgeDeltas(i,e,t,n,o.minCellWidth(),o.isRelative)}))},Ii=function(e,t,n){for(var o=0,r=e;r<t;r++)o+=void 0!==n[r]?n[r]:0;return o},Li=function(e,t){var n=En.justCells(e);return R(n,(function(e){var n=Ii(e.row,e.row+e.rowspan,t);return{element:e.element,height:n,rowspan:e.rowspan}}))},ji=function(e,t){return En.hasColumns(e)?function(e,t){var n=En.justColumns(e);return R(n,(function(e,n){return{element:e.element,width:t[n],colspan:e.colspan}}))}(e,t):function(e,t){var n=En.justCells(e);return R(n,(function(e){var n=Ii(e.column,e.column+e.colspan,t);return{element:e.element,width:n,colspan:e.colspan}}))}(e,t)},zi=function(e,t,n){var o=ji(e,t);P(o,(function(e){n.setElementWidth(e.element,e.width)}))},Fi=function(e,t,n,o,r){var i=En.fromTable(e),a=r.getCellDelta(t),s=r.getWidths(i,r),l=n===i.grid.columns-1,c=o.clampTableDelta(s,n,a,r.minCellWidth(),l),u=Pi(s,n,c,r,o),d=R(u,(function(e,t){return e+s[t]}));zi(i,d,r),o.resizeTable(r.adjustTableWidth,c,l)},Bi=function(e,t,n,o){var r=En.fromTable(e),i=function(e,t,n){return Hr(e,t,n,Mr,(function(e){return e.getOrThunk(Zt)}))}(r,e,o),a=R(i,(function(e,o){return n===o?Math.max(t+e,Zt()):e})),s=Li(r,a),l=function(e,t){return R(e.all,(function(e,n){return{element:e.element,height:t[n]}}))}(r,a);P(l,(function(e){Or(e.element,e.height)})),P(s,(function(e){Or(e.element,e.height)}));var c=j(a,(function(e,t){return e+t}),0);Or(e,c)},Ni=function(e){return R(e,m(0))},Vi=function(e,t,n,o,r){return r(e.slice(0,t)).concat(o).concat(r(e.slice(n)))},Hi=function(e){return function(t,n,o,r){if(e(o)){var i=Math.max(r,t[n]-Math.abs(o)),a=Math.abs(i-t[n]);return o>=0?a:-a}return o}},$i=Hi((function(e){return e<0})),Ui=Hi(w),Wi=function(){var e=function(e,t,n,o){var r=(100+n)/100,i=Math.max(o,(e[t]+n)/r);return R(e,(function(e,n){return(n===t?i:e/r)-e}))},t=function(t,n,o,r,i,a){return a?e(t,n,r,i):function(e,t,n,o,r){var i=$i(e,t,o,r);return Vi(e,t,n+1,[i,0],Ni)}(t,n,o,r,i)};return{resizeTable:function(e,t){return e(t)},clampTableDelta:$i,calcLeftEdgeDeltas:t,calcMiddleDeltas:function(e,n,o,r,i,a,s){return t(e,o,r,i,a,s)},calcRightEdgeDeltas:function(t,n,o,r,i,a){if(a)return e(t,o,r,i);var s=$i(t,o,r,i);return Ni(t.slice(0,o)).concat([s])},calcRedestributedWidths:function(e,t,n,o){if(o){var r=(t+n)/t,i=R(e,(function(e){return e/r}));return{delta:100*r-100,newSizes:i}}return{delta:n,newSizes:e}}}},qi=function(){var e=function(e,t,n,o,r){var i=Ui(e,o>=0?n:t,o,r);return Vi(e,t,n+1,[i,-i],Ni)};return{resizeTable:function(e,t,n){n&&e(t)},clampTableDelta:function(e,t,n,o,r){if(r){if(n>=0)return n;var i=z(e,(function(e,t){return e+t-o}),0);return Math.max(-i,n)}return $i(e,t,n,o)},calcLeftEdgeDeltas:e,calcMiddleDeltas:function(t,n,o,r,i,a){return e(t,o,r,i,a)},calcRightEdgeDeltas:function(e,t,n,o,r,i){if(i)return Ni(e);var a=o/e.length;return R(e,m(a))},calcRedestributedWidths:function(e,t,n,o){return{delta:0,newSizes:e}}}},Ki=function(e,t){var n=S.from(e.dom.documentElement).map(xe.fromDom).getOr(e);return{parent:m(n),view:m(e),origin:m(Xo(0,0)),isResizable:t}},Gi=function(e,t,n){return{parent:m(t),view:m(e),origin:m(Xo(0,0)),isResizable:n}},Yi=go([{invalid:["raw"]},{pixels:["value"]},{percent:["value"]}]),Xi=function(e,t,n){var o=n.substring(0,n.length-e.length),r=parseFloat(o);return o===r.toString()?t(r):Yi.invalid(n)},Ji=Y(Y({},Yi),{from:function(e){return ie(e,"%")?Xi("%",Yi.percent,e):ie(e,"px")?Xi("px",Yi.pixels,e):Yi.invalid(e)}}),Qi=function(e,t,n){return e.fold((function(){return t}),(function(e){return function(e,t,n){var o=n/t;return R(e,(function(e){return Ji.from(e).fold((function(){return e}),(function(e){return e*o+"px"}),(function(e){return e/100*n+"px"}))}))}(t,n,e)}),(function(e){return function(e,t){return R(e,(function(e){return Ji.from(e).fold((function(){return e}),(function(e){return e/t*100+"%"}),(function(e){return e+"%"}))}))}(t,n)}))},Zi=function(e,t,n){var o=Ji.from(n),r=H(e,(function(e){return"0px"===e}))?function(e,t){var n=e.fold((function(){return m("")}),(function(e){return m(e/t+"px")}),(function(){return m(100/t+"%")}));return M(t,n)}(o,e.length):Qi(o,e,t);return na(r)},ea=function(e,t){return 0===e.length?t:j(e,(function(e,t){return Ji.from(t).fold(m(0),p,p)+e}),0)},ta=function(e,t){return Ji.from(e).fold(m(e),(function(e){return e+t+"px"}),(function(e){return e+t+"%"}))},na=function(e){if(0===e.length)return e;var t=j(e,(function(e,t){var n=Ji.from(t).fold((function(){return{value:t,remainder:0}}),(function(e){return function(e,t){var n=Math.floor(e);return{value:n+t,remainder:e-n}}(e,"px")}),(function(e){return{value:e+"%",remainder:0}}));return{output:[n.value].concat(e.output),remainder:e.remainder+n.remainder}}),{output:[],remainder:0}),n=t.output;return n.slice(0,n.length-1).concat([ta(n[n.length-1],Math.round(t.remainder))])},oa=Ji.from,ra=function(e){return oa(e).fold(m("px"),m("px"),m("%"))},ia=function(e,t,n){var o=En.fromTable(e),r=o.all,i=En.justCells(o),a=En.justColumns(o);t.each((function(t){var n=ra(t),r=Lo(e),s=function(e,t){return Br(e,t,jr,Nr)}(o,e),l=Zi(s,r,t);En.hasColumns(o)?function(e,t,n){P(t,(function(t,o){var r=ea([e[o]],Qt());Vt(t.element,"width",r+n)}))}(l,a,n):function(e,t,n){P(t,(function(t){var o=e.slice(t.column,t.colspan+t.column),r=ea(o,Qt());Vt(t.element,"width",r+n)}))}(l,i,n),Vt(e,"width",t)})),n.each((function(t){var n=ra(t),a=qo(e),s=function(e,t,n){return Hr(e,t,n,zr,Nr)}(o,e,ur);!function(e,t,n,o){P(n,(function(t){var n=e.slice(t.row,t.rowspan+t.row),r=ea(n,Zt());Vt(t.element,"height",r+o)})),P(t,(function(t,n){Vt(t.element,"height",e[n])}))}(Zi(s,a,t),r,i,n),Vt(e,"height",t)}))},aa=function(e){return Tr(e).exists((function(e){return br.test(e)}))},sa=function(e){return Tr(e).exists((function(e){return yr.test(e)}))},la=function(e){return Tr(e).isNone()},ca=function(e){return En.fromTable(e).grid},ua=function(e){var t=[];return{bind:function(e){if(void 0===e)throw new Error("Event bind error: undefined handler");t.push(e)},unbind:function(e){t=L(t,(function(t){return t!==e}))},trigger:function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var r={};P(e,(function(e,t){r[e]=n[t]})),P(t,(function(e){e(r)}))}}},da=function(e){return{registry:Pe(e,(function(e){return{bind:e.bind,unbind:e.unbind}})),trigger:Pe(e,(function(e){return e.trigger}))}},fa=function(e){return e.slice(0).sort()},ma=function(e,t,n){if(0===t.length)throw new Error("You must specify at least one required field.");var r;return function(e,t){if(!i(t))throw new Error("The "+e+" fields must be an array. Was: "+t+".");P(t,(function(t){if(!o(t))throw new Error("The value "+t+" in the "+e+" fields was not a string.")}))}("required",t),r=fa(t),F(r,(function(e,t){return t<r.length-1&&e===r[t+1]})).each((function(e){throw new Error("The field: "+e+" occurs more than once in the combined fields: ["+r.join(", ")+"].")})),function(o){var r=Ae(o);H(t,(function(e){return D(r,e)}))||function(e,t){throw new Error("All required keys ("+fa(e).join(", ")+") were not specified. Specified keys were: "+fa(t).join(", ")+".")}(t,r),e(t,r);var i=L(t,(function(e){return!n.validate(o[e],e)}));return i.length>0&&function(e,t){throw new Error("All values need to be of type: "+t+". Keys ("+fa(e).join(", ")+") were not.")}(i,n.label),o}},pa=function(e,t){var n=L(t,(function(t){return!D(e,t)}));n.length>0&&function(e){throw new Error("Unsupported keys for object: "+fa(e).join(", "))}(n)},ha=function(e){return function(e,t){return ma(e,t,{validate:u,label:"function"})}(pa,e)},ga=ha(["compare","extract","mutate","sink"]),va=ha(["element","start","stop","destroy"]),ba=ha(["forceDrop","drop","move","delayDrop"]),ya=function(){var e=S.none(),t=da({move:ua(["info"])});return{onEvent:function(n,o){o.extract(n).each((function(n){(function(t,n){var o=e.map((function(e){return t.compare(e,n)}));return e=S.some(n),o})(o,n).each((function(e){t.trigger.move(e)}))}))},reset:function(){e=S.none()},events:t.registry}},_a=function(){var e,t=(e=da({move:ua(["info"])}),{onEvent:f,reset:f,events:e.registry}),n=ya(),o=t;return{on:function(){o.reset(),o=n},off:function(){o.reset(),o=t},isOn:function(){return o===n},onEvent:function(e,t){o.onEvent(e,t)},events:n.events}},wa=function(e,t,n){var o,r,i,s,l=!1,c=da({start:ua([]),stop:ua([])}),u=_a(),d=function(){p.stop(),u.isOn()&&(u.off(),c.trigger.stop())},f=(o=d,r=200,i=null,{cancel:s=function(){a(i)||(clearTimeout(i),i=null)},throttle:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];s(),i=setTimeout((function(){i=null,o.apply(null,e)}),r)}});u.events.move.bind((function(n){t.mutate(e,n.info)}));var m=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];l&&e.apply(null,t)}},p=t.sink(ba({forceDrop:d,drop:m(d),move:m((function(e){f.cancel(),u.onEvent(e,t)})),delayDrop:m(f.throttle)}),n);return{element:p.element,go:function(e){p.start(e),u.on(),c.trigger.start()},on:function(){l=!0},off:function(){l=!1},destroy:function(){p.destroy()},events:c.registry}},xa=function(e){var t,n,o=xe.fromDom(function(e){if(dt()&&c(e.target)){var t=xe.fromDom(e.target);if(Je(t)&&ht(t)&&e.composed&&e.composedPath){var n=e.composedPath();if(n)return q(n)}}return S.from(e.target)}(e).getOr(e.target)),r=function(){return e.stopPropagation()},i=function(){return e.preventDefault()},a=(t=i,n=r,function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];return t(n.apply(null,e))});return function(e,t,n,o,r,i,a){return{target:e,x:t,y:n,stop:o,prevent:r,kill:i,raw:a}}(o,e.clientX,e.clientY,r,i,a,e)},Ca=function(e,t,n,o,r){var i=function(e,t){return function(n){e(n)&&t(xa(n))}}(n,o);return e.dom.addEventListener(t,i,r),{unbind:g(Oa,e,t,i,r)}},Oa=function(e,t,n,o){e.dom.removeEventListener(t,n,o)},Sa=w,ka=function(e,t,n){return function(e,t,n,o){return Ca(e,t,n,o,!1)}(e,t,Sa,n)},Ea=xa,Ta=function(e,t){var n=Mt(e,t);return void 0===n||""===n?[]:n.split(" ")},Da=function(e){return void 0!==e.dom.classList},Aa=function(e,t){return function(e,t,n){var o=Ta(e,t).concat([n]);return Dt(e,t,o.join(" ")),!0}(e,"class",t)},Ma=function(e,t){Da(e)?e.dom.classList.add(t):Aa(e,t)},Ra=function(e,t){return Da(e)&&e.dom.classList.contains(t)},Pa=function(e){var t=e.replace(/\./g,"-");return{resolve:function(e){return t+"-"+e}}},Ia=Pa("ephox-dragster"),La=Ia.resolve,ja=ga({compare:function(e,t){return Xo(t.left-e.left,t.top-e.top)},extract:function(e){return S.some(Xo(e.x,e.y))},sink:function(e,t){var n=function(e){var t=Y({layerClass:La("blocker")},e),n=xe.fromTag("div");Dt(n,"role","presentation"),Ht(n,{position:"fixed",left:"0px",top:"0px",width:"100%",height:"100%"}),Ma(n,La("blocker")),Ma(n,t.layerClass);return{element:m(n),destroy:function(){qn(n)}}}(t),o=ka(n.element(),"mousedown",e.forceDrop),r=ka(n.element(),"mouseup",e.drop),i=ka(n.element(),"mousemove",e.move),a=ka(n.element(),"mouseout",e.delayDrop);return va({element:n.element,start:function(e){Vn(e,n.element())},stop:function(){qn(n.element())},destroy:function(){n.destroy(),r.unbind(),i.unbind(),a.unbind(),o.unbind()}})},mutate:function(e,t){e.mutate(t.left,t.top)}}),za=function(e){return Et(e,"[contenteditable]")},Fa=function(e,t){return void 0===t&&(t=!1),!_e().browser.isIE()&&gt(e)?e.dom.isContentEditable:za(e).fold(m(t),(function(e){return"true"===Ba(e)}))},Ba=function(e){return e.dom.contentEditable},Na=Pa("ephox-snooker"),Va=Na.resolve,Ha=function(){var e=da({drag:ua(["xDelta","yDelta","target"])}),t=S.none(),n=function(){var e=da({drag:ua(["xDelta","yDelta"])});return{mutate:function(t,n){e.trigger.drag(t,n)},events:e.registry}}();n.events.drag.bind((function(n){t.each((function(t){e.trigger.drag(n.xDelta,n.yDelta,t)}))}));return{assign:function(e){t=S.some(e)},get:function(){return t},mutate:n.mutate,events:e.registry}},$a=Va("resizer-bar"),Ua=Va("resizer-rows"),Wa=Va("resizer-cols"),qa=function(e){var t=wt(e.parent(),"."+$a);P(t,qn)},Ka=function(e,t,n){var o=e.origin();P(t,(function(t){t.each((function(t){var r=n(o,t);Ma(r,$a),Vn(e.parent(),r)}))}))},Ga=function(e,t,n,o){Ka(e,t,(function(e,t){var r,i,a,s,l,c,u=(r=t.col,i=t.x-e.left,a=n.top-e.top,s=7,l=o,c=xe.fromTag("div"),Ht(c,{position:"absolute",left:i-s/2+"px",top:a+"px",height:l+"px",width:s+"px"}),At(c,{"data-column":r,role:"presentation"}),c);return Ma(u,Wa),u}))},Ya=function(e,t,n,o){Ka(e,t,(function(e,t){var r=function(e,t,n,o,r){var i=xe.fromTag("div");return Ht(i,{position:"absolute",left:t+"px",top:n-r/2+"px",height:r+"px",width:o+"px"}),At(i,{"data-row":e,role:"presentation"}),i}(t.row,n.left-e.left,t.y-e.top,o,7);return Ma(r,Ua),r}))},Xa=function(e,t,n,o,r){var i=Qo(n),a=t.isResizable,s=o.length>0?ur.positions(o,n):[],l=s.length>0?function(e,t){return V(e.all,(function(e,n){return t(e.element)?[n]:[]}))}(e,a):[],c=L(s,(function(e,t){return A(l,(function(e){return t===e}))}));Ya(t,c,i,jo(n));var u=r.length>0?pr.positions(r,n):[],d=u.length>0?function(e,t){var n=[];return M(e.grid.columns,(function(o){En.getColumnAt(e,o).map((function(e){return e.element})).forall(t)&&n.push(o)})),L(n,(function(n){var o=En.filterItems(e,(function(e){return e.column===n}));return H(o,(function(e){return t(e.element)}))}))}(e,a):[],f=L(u,(function(e,t){return A(d,(function(e){return t===e}))}));Ga(t,f,i,Ko(n))},Ja=function(e,t){if(qa(e),e.isResizable(t)){var n=En.fromTable(t),o=Vo(n),r=Bo(n);Xa(n,e,t,o,r)}},Qa=function(e,t){var n=wt(e.parent(),"."+$a);P(n,t)},Za=function(e){Qa(e,(function(e){Vt(e,"display","none")}))},es=function(e){Qa(e,(function(e){Vt(e,"display","block")}))},ts=Va("resizer-bar-dragging"),ns=function(e){var t=Ha(),n=function(e,t){void 0===t&&(t={});var n=void 0!==t.mode?t.mode:ja;return wa(e,n,t)}(t,{}),o=S.none(),r=function(e,t){return S.from(Mt(e,t))};t.events.drag.bind((function(e){r(e.target,"data-row").each((function(t){var n=Jt(e.target,"top");Vt(e.target,"top",n+e.yDelta+"px")})),r(e.target,"data-column").each((function(t){var n=Jt(e.target,"left");Vt(e.target,"left",n+e.xDelta+"px")}))}));var i=function(e,t){return Jt(e,t)-Kt(e,"data-initial-"+t,0)};n.events.stop.bind((function(){t.get().each((function(t){o.each((function(n){r(t,"data-row").each((function(e){var o=i(t,"top");Pt(t,"data-initial-top"),u.trigger.adjustHeight(n,o,parseInt(e,10))})),r(t,"data-column").each((function(e){var o=i(t,"left");Pt(t,"data-initial-left"),u.trigger.adjustWidth(n,o,parseInt(e,10))})),Ja(e,n)}))}))}));var a=function(o,r){u.trigger.startAdjust(),t.assign(o),Dt(o,"data-initial-"+r,Jt(o,r)),Ma(o,ts),Vt(o,"opacity","0.2"),n.go(e.parent())},s=ka(e.parent(),"mousedown",(function(e){var t;t=e.target,Ra(t,Ua)&&a(e.target,"top"),function(e){return Ra(e,Wa)}(e.target)&&a(e.target,"left")})),l=function(t){return ke(t,e.view())},c=ka(e.view(),"mouseover",(function(t){var n;(n=t.target,Et(n,"table",l).filter(Fa)).fold((function(){gt(t.target)&&qa(e)}),(function(t){o=S.some(t),Ja(e,t)}))})),u=da({adjustHeight:ua(["table","delta","row"]),adjustWidth:ua(["table","delta","column"]),startAdjust:ua([])});return{destroy:function(){s.unbind(),c.unbind(),n.destroy(),qa(e)},refresh:function(t){Ja(e,t)},on:n.on,off:n.off,hideBars:g(Za,e),showBars:g(es,e),events:u.registry}},os=function(e,t,n){var o=ur,r=pr,i=ns(e),a=da({beforeResize:ua(["table","type"]),afterResize:ua(["table","type"]),startDrag:ua([])});return i.events.adjustHeight.bind((function(e){var t=e.table;a.trigger.beforeResize(t,"row");var n=o.delta(e.delta,t);Bi(t,n,e.row,o),a.trigger.afterResize(t,"row")})),i.events.startAdjust.bind((function(e){a.trigger.startDrag()})),i.events.adjustWidth.bind((function(e){var o=e.table;a.trigger.beforeResize(o,"col");var i=r.delta(e.delta,o),s=n(o);Fi(o,i,e.column,t,s),a.trigger.afterResize(o,"col")})),{on:i.on,off:i.off,hideBars:i.hideBars,showBars:i.showBars,destroy:i.destroy,events:a.registry}},rs=function(e,t){return e.fire("newrow",{node:t})},is=function(e,t){return e.fire("newcell",{node:t})},as=function(e,t,n){e.fire("TableModified",Y(Y({},n),{table:t}))},ss={structure:!1,style:!0},ls={structure:!0,style:!1},cs={structure:!0,style:!0},us={"border-collapse":"collapse",width:"100%"},ds=M(5,(function(e){var t=e+1+"px";return{title:t,value:t}})),fs=R(["Solid","Dotted","Dashed","Double","Groove","Ridge","Inset","Outset","None","Hidden"],(function(e){return{title:e,value:e.toLowerCase()}})),ms={border:"1"},ps=function(e){return e.getParam("table_sizing_mode","auto")},hs=function(e){return e.getParam("table_responsive_width")},gs=function(e){return e.getParam("table_border_widths",ds,"array")},vs=function(e){return e.getParam("table_border_styles",fs,"array")},bs=function(e){return e.getParam("table_default_attributes",ms,"object")},ys=function(e){return e.getParam("table_default_styles",function(e){var t;if(Es(e)){var n=e.dom,o=null!==(t=n.getParent(e.selection.getStart(),n.isBlock))&&void 0!==t?t:e.getBody(),r=zo(xe.fromDom(o));return Y(Y({},us),{width:r+"px"})}return Ts(e)?Le(us,(function(e,t){return"width"!==t})):us}(e),"object")},_s=function(e){return e.getParam("table_cell_advtab",!0,"boolean")},ws=function(e){return e.getParam("table_row_advtab",!0,"boolean")},xs=function(e){return e.getParam("table_advtab",!0,"boolean")},Cs=function(e){return e.getParam("table_style_by_css",!1,"boolean")},Os=function(e){return e.getParam("table_cell_class_list",[],"array")},Ss=function(e){return e.getParam("table_class_list",[],"array")},ks=function(e){return"relative"===ps(e)||!0===hs(e)},Es=function(e){return"fixed"===ps(e)||!1===hs(e)},Ts=function(e){return"responsive"===ps(e)},Ds=function(e){return e.getParam("table_use_colgroups",!1,"boolean")},As=function(e){var t=e.getParam("table_header_type","section","string");return D(["section","cells","sectionCells","auto"],t)?t:"section"},Ms=function(e){var t=e.getParam("table_column_resizing","preservetable","string");return F(["preservetable","resizetable"],(function(e){return e===t})).getOr("preservetable")},Rs=function(e){return"preservetable"===Ms(e)},Ps=function(e){return"resizetable"===Ms(e)},Is=function(e){var t=e.getParam("table_clone_elements");return o(t)?S.some(t.split(/[ ,]/)):Array.isArray(t)?S.some(t):S.none()},Ls=function(e){return e.getParam("table_background_color_map",[],"array")},js=function(e){return e.getParam("table_border_color_map",[],"array")},zs=function(e,t){return ks(e)?Yr(t):Es(e)?Gr(t):Kr(t)},Fs=function(e){Pt(e,"width")},Bs=function(e){var t=Pr(e);ia(e,S.some(t),S.none()),Fs(e)},Ns=function(e){var t=function(e){return Lo(e)+"px"}(e);ia(e,S.some(t),S.none()),Fs(e)},Vs=function(e){qt(e,"width");var t=rn(e),n=t.length>0?t:on(e);P(n,(function(e){qt(e,"width"),Fs(e)})),Fs(e)},Hs=function(){var e=xe.fromTag("div");return Ht(e,{position:"static",height:"0",width:"0",padding:"0",margin:"0",border:"0"}),Vn(vt(xe.fromDom(document)),e),e},$s=function(e){return"false"!==Mt(e,"data-mce-resize")},Us=function(e){var t,n,r=S.none(),i=S.none(),a=S.none(),s=function(e){return"TABLE"===e.nodeName},l=function(){return i},c=function(t){return zs(e,t)},u=function(){return Rs(e)?qi():Wi()},d=function(o,r,i){var a=ie(r,"e");if(""===n&&Bs(o),i!==t&&""!==n){Vt(o,"width",n);var s=u(),l=c(o),d=Rs(e)||a?function(e){return ca(e).columns}(o)-1:0;Fi(o,i-t,d,s,l)}else if(function(e){return/^(\d+(\.\d+)?)%$/.test(e)}(n)){var f=parseFloat(n.replace("%",""));Vt(o,"width",i*f/t+"%")}(function(e){return/^(\d+(\.\d+)?)px$/.test(e)})(n)&&function(e){var t=En.fromTable(e);En.hasColumns(t)||P(on(e),(function(e){var t=$t(e,"width");Vt(e,"width",t),Pt(e,"width")}))}(o)};return e.on("init",(function(){var t=function(e,t){return e.inline?Gi(pi(e),Hs(),t):Ki(xe.fromDom(e.getDoc()),t)}(e,$s);if(a=S.some(t),function(e){var t=e.getParam("object_resizing",!0);return o(t)?"table"===t:t}(e)&&function(e){return e.getParam("table_resize_bars",!0,"boolean")}(e)){var n=u(),s=os(t,n,c);s.on(),s.events.startDrag.bind((function(t){r=S.some(e.selection.getRng())})),s.events.beforeResize.bind((function(t){var n=t.table.dom;!function(e,t,n,o,r){e.fire("ObjectResizeStart",{target:t,width:n,height:o,origin:r})}(e,n,hi(n),gi(n),"bar-"+t.type)})),s.events.afterResize.bind((function(t){var n=t.table,o=n.dom;yi(n),r.each((function(t){e.selection.setRng(t),e.focus()})),function(e,t,n,o,r){e.fire("ObjectResized",{target:t,width:n,height:o,origin:r})}(e,o,hi(o),gi(o),"bar-"+t.type),e.undoManager.add()})),i=S.some(s)}})),e.on("ObjectResizeStart",(function(o){var r=o.target;if(s(r)){var i=xe.fromDom(r);P(e.dom.select(".mce-clonedresizable"),(function(t){e.dom.addClass(t,"mce-"+Ms(e)+"-columns")})),!sa(i)&&Es(e)?Ns(i):!aa(i)&&ks(e)&&Bs(i),la(i)&&re(o.origin,"bar-")&&Bs(i),t=o.width,n=Ts(e)?"":function(e,t){var n=e.dom.getStyle(t,"width")||e.dom.getAttrib(t,"width");return S.from(n).filter(se)}(e,r).getOr("")}})),e.on("ObjectResized",(function(t){var n=t.target;if(s(n)){var o=xe.fromDom(n),r=t.origin;re(r,"corner-")&&d(o,r,t.width),yi(o),as(e,o.dom,ss)}})),e.on("SwitchMode",(function(){l().each((function(t){e.mode.isReadOnly()?t.hideBars():t.showBars()}))})),{lazyResize:l,lazyWire:function(){return a.getOr(Ki(xe.fromDom(e.getBody()),$s))},destroy:function(){i.each((function(e){e.destroy()})),a.each((function(t){!function(e,t){e.inline&&qn(t.parent())}(e,t)}))}}},Ws=function(e,t){return{element:e,offset:t}},qs=function(e,t,n){return e.property().isText(t)&&0===e.property().getText(t).trim().length||e.property().isComment(t)?n(t).bind((function(t){return qs(e,t,n).orThunk((function(){return S.some(t)}))})):S.none()},Ks=function(e,t){return e.property().isText(t)?e.property().getText(t).length:e.property().children(t).length},Gs=function(e,t){var n=qs(e,t,e.query().prevSibling).getOr(t);if(e.property().isText(n))return Ws(n,Ks(e,n));var o=e.property().children(n);return o.length>0?Gs(e,o[o.length-1]):Ws(n,Ks(e,n))},Ys=Gs,Xs=Zn(),Js=function(e,t){1===Gt(e,"colspan")&&function(e){return Tr(e).bind((function(e){return vr(e,["fixed","relative","empty"])}))}(e).each((function(n){var o=n.value/2;Rr(e,o,n.unit),Rr(t,o,n.unit)}))},Qs=tt("th"),Zs=function(e){return H(e,(function(e){return Qs(e.element)}))},el=function(e,t){return e&&t?"sectionCells":e?"section":"cells"},tl=function(e){var t="thead"===e.section,n=Lt(nl(e.cells),"th");return t||n?{type:"header",subType:el(t,n)}:"tfoot"===e.section?{type:"footer"}:{type:"body"}},nl=function(e){var t=L(e,(function(e){return Qs(e.element)}));return 0===t.length?S.some("td"):t.length===e.length?S.some("th"):S.none()},ol=function(e,t,n){return We(n(e.element,t),!0,e.isLocked)},rl=function(e,t){return e.section!==t?qe(e.element,e.cells,t,e.isNew):e},il=function(){return{transformRow:rl,transformCell:function(e,t,n){var o=n(e.element,t),r="td"!==Ke(o)?function(e,t){var n=ko(e,t);Fn(e,n);var o=lt(e);return Un(n,o),qn(e),n}(o,"td"):o;return We(r,e.isNew,e.isLocked)}}},al=function(){return{transformRow:rl,transformCell:ol}},sl=function(){return{transformRow:function(e,t){return rl(e,"thead"===t?"tbody":t)},transformCell:ol}},ll=function(e,t){switch(function(e){return G(e.all,(function(e){var t=tl(e);return"header"===t.type?S.from(t.subType):S.none()}))}(En.fromTable(e)).getOr(t)){case"section":return il();case"sectionCells":return al();case"cells":return sl()}},cl=il,ul=al,dl=sl,fl=function(){return{transformRow:p,transformCell:ol}},ml=function(e,t,n,o){n===o?Pt(e,t):Dt(e,t,n)},pl=function(e,t,n){K(_t(e,t)).fold((function(){return Nn(e,n)}),(function(e){return Bn(e,n)}))},hl=function(e,t){var n=[],o=[],r=function(e){return R(e,(function(e){e.isNew&&n.push(e.element);var t=e.element;return Wn(t),P(e.cells,(function(e){e.isNew&&o.push(e.element),ml(e.element,"colspan",e.colspan,1),ml(e.element,"rowspan",e.rowspan,1),Vn(t,e.element)})),t}))},i=function(e){return V(e,(function(e){return R(e.cells,(function(e){return ml(e.element,"span",e.colspan,1),e.element}))}))},a=function(t,n){var o=function(e,t){var n=St(e,t).getOrThunk((function(){var n=xe.fromTag(t,nt(e).dom);return"thead"===t?pl(e,"caption,colgroup",n):"colgroup"===t?pl(e,"caption",n):Vn(e,n),n}));return Wn(n),n}(e,n),a=("colgroup"===n?i:r)(t);Un(o,a)},s=function(t,n){t.length>0?a(t,n):function(t){St(e,t).each(qn)}(n)},l=[],c=[],u=[],d=[];return P(t,(function(e){switch(e.section){case"thead":l.push(e);break;case"tbody":c.push(e);break;case"tfoot":u.push(e);break;case"colgroup":d.push(e)}})),s(d,"colgroup"),s(l,"thead"),s(c,"tbody"),s(u,"tfoot"),{newRows:n,newCells:o}},gl=function(e,t){if(0===e.length)return 0;var n=e[0];return B(e,(function(e){return!t(n.element,e.element)})).getOr(e.length)},vl=function(e,t,n,o){var r=function(e,t){return e[t]}(e,t),i="colgroup"===r.section;return{colspan:gl(r.cells.slice(n),o),rowspan:i?1:gl(function(e,t){return R(e,(function(e){return gn(e,t)}))}(e.slice(t),n),o)}},bl=function(e,t){var n=R(e,(function(e){return R(e.cells,_)}));return R(e,(function(o,r){var i=V(o.cells,(function(o,i){if(!1===n[r][i]){var a=vl(e,r,i,t);return function(e,t,o,r){for(var i=e;i<e+o;i++)for(var a=t;a<t+r;a++)n[i][a]=!0}(r,i,a.rowspan,a.colspan),[(s=o.element,l=a.rowspan,c=a.colspan,u=o.isNew,{element:s,rowspan:l,colspan:c,isNew:u})]}return[];var s,l,c,u}));return function(e,t,n,o){return{element:e,cells:t,section:n,isNew:o}}(o.element,i,o.section,o.isNew)}))},yl=function(e,t,n){var o=[];P(e.colgroups,(function(r){for(var i=[],a=0;a<e.grid.columns;a++){var s=En.getColumnAt(e,a).map((function(e){return We(e.element,n,!1)})).getOrThunk((function(){return We(t.colGap(),!0,!1)}));i.push(s)}o.push(qe(r.element,i,"colgroup",n))}));for(var r=0;r<e.grid.rows;r++){for(var i=[],a=0;a<e.grid.columns;a++){var s=En.getAt(e,r,a).map((function(e){return We(e.element,n,e.isLocked)})).getOrThunk((function(){return We(t.gap(),!0,!1)}));i.push(s)}var l=e.all[r],c=qe(l.element,i,l.section,n);o.push(c)}return o},_l=function(e){return bl(e,ke)},wl=function(e,t){return G(e.all,(function(e){return F(e.cells,(function(e){return ke(t,e.element)}))}))},xl=function(e,t,n){var o=R(t.selection,(function(t){return nn(t).bind((function(t){return wl(e,t)})).filter(n)})),r=jt(o);return Ft(r.length>0,r)},Cl=function(e,t,n,o,r){return function(i,a,s,l,c){var u=En.fromTable(a),d=S.from(null==c?void 0:c.section).getOrThunk(fl);return t(u,s).map((function(t){var n=function(e,t){return yl(e,t,!1)}(u,l),o=e(n,t,ke,r(l),d),i=Cn(o.grid);return{info:t,grid:_l(o.grid),cursor:o.cursor,lockedColumns:i}})).bind((function(e){var t=hl(a,e.grid),r=S.from(null==c?void 0:c.sizing).getOrThunk((function(){return Kr(a)})),s=S.from(null==c?void 0:c.resize).getOrThunk(qi);return n(a,e.grid,e.info,{sizing:r,resize:s,section:d}),o(a),Ja(i,a),Pt(a,wn),e.lockedColumns.length>0&&Dt(a,wn,e.lockedColumns.join(",")),S.some({cursor:e.cursor,newRows:t.newRows,newCells:t.newCells})}))}},Ol=function(e,t){return xl(e,t,w).map((function(e){return{cells:e,generators:t.generators,clipboard:t.clipboard}}))},Sl=function(e,t){return xl(e,t,w)},kl=function(e,t){return xl(e,t,(function(e){return!e.isLocked}))},El=function(e,t){return H(t,(function(t){return function(e,t){return wl(e,t).exists((function(e){return!e.isLocked}))}(e,t)}))},Tl=function(e,t){return function(e,t){return t.mergable}(0,t).filter((function(t){return El(e,t.cells)}))},Dl=function(e,t){return function(e,t){return t.unmergable}(0,t).filter((function(t){return El(e,t)}))},Al=function(e,t,n,o){for(var r=yn(e).rows,i=!0,a=0;a<r.length;a++)for(var s=0;s<bn(r[0]);s++){var l=r[a],c=gn(l,s),u=n(c.element,t);!0===u&&!1===i?pn(l,s,We(o(),!0,c.isLocked)):!0===u&&(i=!1)}return e},Ml=function(e,t,n,o){var r=yn(e).rows;if(t>0&&t<r.length){var i=function(e,t){return z(e,(function(e,n){return A(e,(function(e){return t(e.element,n.element)}))?e:e.concat([n])}),[])}(r[t-1].cells,n);P(i,(function(e){for(var i=S.none(),a=t;a<r.length;a++)for(var s=function(t){var s=r[a],l=gn(s,t);n(l.element,e.element)&&(i.isNone()&&(i=S.some(o())),i.each((function(e){pn(s,t,We(e,!0,l.isLocked))})))},l=0;l<bn(r[0]);l++)s(l)}))}return e},Rl=function(e){return{isValue:w,isError:_,getOr:m(e),getOrThunk:m(e),getOrDie:m(e),or:function(t){return Rl(e)},orThunk:function(t){return Rl(e)},fold:function(t,n){return n(e)},map:function(t){return Rl(t(e))},mapError:function(t){return Rl(e)},each:function(t){t(e)},bind:function(t){return t(e)},exists:function(t){return t(e)},forall:function(t){return t(e)},toOptional:function(){return S.some(e)}}},Pl=function(e){return{isValue:_,isError:w,getOr:p,getOrThunk:function(e){return e()},getOrDie:function(){return(t=String(e),function(){throw new Error(t)})();var t},or:p,orThunk:function(e){return e()},fold:function(t,n){return t(e)},map:function(t){return Pl(e)},mapError:function(t){return Pl(t(e))},each:f,bind:function(t){return Pl(e)},exists:_,forall:w,toOptional:S.none}},Il={value:Rl,error:Pl,fromOption:function(e,t){return e.fold((function(){return Pl(t)}),Rl)}},Ll=function(e,t){return{rowDelta:0,colDelta:bn(e[0])-bn(t[0])}},jl=function(e,t){return{rowDelta:e.length-t.length,colDelta:0}},zl=function(e,t,n,o){var r="colgroup"===t.section?n.col:n.cell;return M(e,(function(e){return We(r(),!0,o(e))}))},Fl=function(e,t,n,o){var r=e[e.length-1];return e.concat(M(t,(function(){var e="colgroup"===r.section?n.colgroup:n.row,t=_n(r,e,p),i=zl(t.cells.length,t,n,(function(e){return Ne(o,e.toString())}));return hn(t,i)})))},Bl=function(e,t,n,o){return R(e,(function(e){var r=zl(t,e,n,_);return fn(e,o,r)}))},Nl=function(e,t,n){var o=t.colDelta<0?Bl:p,r=t.rowDelta<0?Fl:p,i=Cn(e),a=bn(e[0]),s=A(i,(function(e){return e===a-1})),l=o(e,Math.abs(t.colDelta),n,s?a-1:a),c=Cn(l);return r(l,Math.abs(t.rowDelta),n,$(c,w))},Vl=function(e,t,n,o){var r=g(o,gn(e[t],n).element),i=e[t];return e.length>1&&bn(i)>1&&(n>0&&r(vn(i,n-1))||n<i.cells.length-1&&r(vn(i,n+1))||t>0&&r(vn(e[t-1],n))||t<e.length-1&&r(vn(e[t+1],n)))},Hl=function(e,t,n){return L(n,(function(n){return n>=e.column&&n<=bn(t[0])+e.column}))},$l=function(e,t,n,o,r){var i=Cn(t),a=function(e,t,n){var o=bn(t[0]),r=yn(t).cols.length+e.row,i=M(o-e.column,(function(t){return t+e.column}));return{row:r,column:F(i,(function(e){return H(n,(function(t){return t!==e}))})).getOr(o-1)}}(e,t,i),s=yn(n).rows,l=Hl(a,s,i);return function(e,t,n){if(e.row>=t.length||e.column>bn(t[0]))return Il.error("invalid start address out of table bounds, row: "+e.row+", column: "+e.column);var o=t.slice(e.row),r=o[0].cells.slice(e.column),i=bn(n[0]),a=n.length;return Il.value({rowDelta:o.length-a,colDelta:r.length-i})}(a,t,s).map((function(e){var n=Y(Y({},e),{colDelta:e.colDelta-l.length}),i=Nl(t,n,o),c=Cn(i),u=Hl(a,s,c);return function(e,t,n,o,r,i){for(var a=e.row,s=e.column,l=a+n.length,c=s+bn(n[0])+i.length,u=$(i,w),d=a;d<l;d++)for(var f=0,m=s;m<c;m++)if(u[m])f++;else{Vl(t,d,m,r)&&Al(t,vn(t[d],m),r,o.cell);var p=m-s-f,h=gn(n[d-a],p),g=h.element,v=o.replace(g);pn(t[d],m,We(v,!0,h.isLocked))}return t}(a,i,s,o,r,u)}))},Ul=function(e,t,n,o,r){!function(e,t,n,o){t>0&&t<e[0].cells.length&&P(e,(function(e){var r=e.cells[t-1],i=e.cells[t];n(i.element,r.element)&&pn(e,t,We(o(),!0,i.isLocked))}))}(t,e,r,o.cell);var i=jl(n,t),a=Nl(n,i,o),s=jl(t,a),l=Nl(t,s,o);return R(l,(function(t,n){return fn(t,e,a[n].cells)}))},Wl=function(e,t,n,o,r){Ml(t,e,r,o.cell);var i=Cn(t),a=Ll(t,n),s=Y(Y({},a),{colDelta:a.colDelta-i.length}),l=Nl(t,s,o),c=yn(l),u=c.cols,d=c.rows,f=Cn(l),m=Ll(n,t),p=Y(Y({},m),{colDelta:m.colDelta+f.length}),h=function(e,t,n){return R(e,(function(e){return z(n,(function(n,o){var r=zl(1,e,t,w)[0];return mn(n,o,r)}),e)}))}(n,o,f),g=Nl(h,p,o);return u.concat(d.slice(0,e)).concat(g).concat(d.slice(e,d.length))},ql=function(e,t,n,o,r){var i=yn(e),a=i.rows,s=i.cols,l=a.slice(0,t),c=a.slice(t),u=function(e,t,n,o){return _n(e,(function(e){return o(e,n)}),t)}(a[n],(function(e,n){return t>0&&t<a.length&&o(vn(a[t-1],n),vn(a[t],n))?gn(a[t],n):We(r(e.element,o),!0,e.isLocked)}),o,r);return s.concat(l).concat([u]).concat(c)},Kl=function(e,t,n,o,r){return R(e,(function(e){var i=t>0&&t<bn(e)&&o(vn(e,t-1),vn(e,t)),a=function(e,t,n,o,r,i,a){if("colgroup"!==n&&o)return gn(e,t);var s=gn(e,r);return We(a(s.element,i),!0,!1)}(e,t,e.section,i,n,o,r);return mn(e,t,a)}))},Gl=function(e,t,n,o){return function(e,t,n,o){return void 0!==vn(e[t],n)&&t>0&&o(vn(e[t-1],n),vn(e[t],n))}(e,t,n,o)||function(e,t,n){return t>0&&n(vn(e,t-1),vn(e,t))}(e[t],n,o)},Yl=function(e,t,n,o){var r=function(e){return function(e){return"row"===e?Xt(t):Yt(t)}(e)?e+"group":e};return e?Qs(t)?r(n):null:o&&Qs(t)?r("row"===n?"col":"row"):null},Xl=function(e,t,n){return We(n(e.element,t),!0,e.isLocked)},Jl=function(e,t,n,o,r,i,a){return R(e,(function(e,s){return function(e,t){var n=e.cells,o=R(n,t);return qe(e.element,o,e.section,e.isNew)}(e,(function(e,l){if(function(e){return A(t,(function(t){return n(e.element,t.element)}))}(e)){var c=a(e,s,l)?r(e,n,o):e;return i(c,s,l).each((function(e){var t,n;t=c.element,n={scope:S.from(e)},Re(n,(function(e,n){e.fold((function(){Pt(t,n)}),(function(e){Tt(t.dom,n,e)}))}))})),c}return e}))}))},Ql=function(e,t,n){return V(e,(function(o,r){return Gl(e,r,t,n)?[]:[gn(o,t)]}))},Zl=function(e,t,n,o,r){var i=yn(e).rows,a=V(t,(function(e){return Ql(i,e,o)})),s=R(e,(function(e){return Zs(e.cells)})),l=function(e,t){return H(t,p)&&Zs(e)?w:function(e,n,o){return!("th"===Ke(e.element)&&t[n])}}(a,s),c=function(e,t){return function(n,o){return S.some(Yl(e,n.element,"row",t[o]))}}(n,s);return Jl(e,a,o,r,Xl,c,l)},ec=function(e,t,n,o,r,i,a){var s=yn(e),l=s.cols,c=s.rows,u=c[t[0]],d=V(t,(function(e){return function(e,t,n){var o=e[t];return V(o.cells,(function(o,r){return Gl(e,t,r,n)?[]:[o]}))}(c,e,r)})),f=R(u.cells,(function(e,t){return Zs(Ql(c,t,r))})),m=X([],c,!0);P(t,(function(e){m[e]=a.transformRow(c[e],n)}));var h=l.concat(m),g=function(e,t){return H(t,p)&&Zs(e.cells)?w:function(e,n,o){return!("th"===Ke(e.element)&&t[o])}}(u,f),v=function(e,t){return function(n,o,r){return S.some(Yl(e,n.element,"col",t[r]))}}(o,f);return Jl(h,d,r,i,a.transformCell,v,g)},tc=function(e,t,n,o){var r=yn(e).rows,i=R(t,(function(e){return gn(r[e.row],e.column)}));return Jl(e,i,n,o,Xl,S.none,w)},nc=function(e){return z(e,(function(e,t){return A(e,(function(e){return e.column===t.column}))?e:e.concat([t])}),[]).sort((function(e,t){return e.column-t.column}))},oc=tt("col"),rc=tt("colgroup"),ic=function(e){return"tr"===Ke(e)||rc(e)},ac=function(e){return{element:e,colspan:Kt(e,"colspan",1),rowspan:Kt(e,"rowspan",1)}},sc=function(e){return Rt(e,"scope").map((function(e){return e.substr(0,3)}))},lc=function(e,t){void 0===t&&(t=ac);var n=function(n){if(ic(n))return rc((r={element:n}).element)?e.colgroup(r):e.row(r);var r,i=function(t){return oc(t.element)?e.col(t):e.cell(t)}(t(n));return o=S.some({item:n,replacement:i}),i},o=S.none();return{getOrInit:function(e,t){return o.fold((function(){return n(e)}),(function(o){return t(e,o.item)?o.replacement:n(e)}))}}},cc=function(e){return function(t){var n=[],o=function(o){var r="td"===e?{scope:null}:{},i=t.replace(o,e,r);return n.push({item:o,sub:i}),i};return{replaceOrInit:function(e,t){return ic(e)||oc(e)?e:function(e,t){return F(n,(function(n){return t(n.item,e)}))}(e,t).fold((function(){return o(e)}),(function(n){return t(e,n.item)?n.sub:o(e)}))}}}},uc=function(e){return{unmerge:function(t){var n=sc(t);return n.each((function(e){return Dt(t,"scope",e)})),function(){var o=e.cell({element:t,colspan:1,rowspan:1});return qt(o,"width"),qt(t,"width"),n.each((function(e){return Dt(o,"scope",e)})),o}},merge:function(e){return qt(e[0],"width"),function(){var t=jt(R(e,sc));if(0===t.length)return S.none();var n=t[0],o=["row","col"];return A(t,(function(e){return e!==n&&D(o,e)}))?S.none():S.from(n)}().fold((function(){return Pt(e[0],"scope")}),(function(t){return Dt(e[0],"scope",t+"group")})),m(e[0])}}},dc=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","table","thead","tfoot","tbody","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"],fc=Zn(),mc=function(e){return function(e,t){var n=e.property().name(t);return D(dc,n)}(fc,e)},pc=function(e){return function(e,t){var n=e.property().name(t);return D(["ol","ul"],n)}(fc,e)},hc=function(e){return function(e,t){return D(["br","img","hr","input"],e.property().name(t))}(fc,e)},gc=function(e){var t,n=function(e){return"br"===Ke(e)},o=function(e){return ni(e).bind((function(t){var o=st(t).map((function(e){return!!mc(e)||!!hc(e)&&"img"!==Ke(e)})).getOr(!1);return rt(t).map((function(r){return!0===o||function(e){return"li"===Ke(e)||Ct(e,pc).isSome()}(r)||n(t)||mc(r)&&!ke(e,r)?[]:[xe.fromTag("br")]}))})).getOr([])},r=0===(t=V(e,(function(e){var t=lt(e);return function(e){return H(e,(function(e){return n(e)||Qe(e)&&0===Yn(e).trim().length}))}(t)?[]:t.concat(o(e))}))).length?[xe.fromTag("br")]:t;Wn(e[0]),Un(e[0],r)},vc=function(e){return Fa(e,!0)},bc=function(e){0===on(e).length&&qn(e)},yc=function(e,t){return{grid:e,cursor:t}},_c=function(e,t,n){var o,r,i=yn(e).rows;return S.from(null===(r=null===(o=i[t])||void 0===o?void 0:o.cells[n])||void 0===r?void 0:r.element).filter(vc).orThunk((function(){return function(e){return G(e,(function(e){return G(e.cells,(function(e){var t=e.element;return Ft(vc(t),t)}))}))}(i)}))},wc=function(e,t,n){var o=_c(e,t,n);return yc(e,o)},xc=function(e){return z(e,(function(e,t){return A(e,(function(e){return e.row===t.row}))?e:e.concat([t])}),[]).sort((function(e,t){return e.row-t.row}))},Cc=function(e,t){return function(n,o,r,i,a){var s=xc(o),l=R(s,(function(e){return e.row})),c=ec(n,l,e,t,r,i.replaceOrInit,a);return wc(c,o[0].row,o[0].column)}},Oc=Cc("thead",!0),Sc=Cc("tbody",!1),kc=Cc("tfoot",!1),Ec=function(e,t,n){var o=function(e,t){return cn(e,(function(){return t}))}(e,n.section),r=En.generate(o);return yl(r,t,!0)},Tc=function(e,t,n,o){return function(e,t,n,o){var r=En.generate(t),i=o.getWidths(r,o);zi(r,i,o)}(0,t,0,o.sizing)},Dc=function(e,t,n,o){return function(e,t,n,o,r){var i=En.generate(t),a=o.getWidths(i,o),s=o.pixelWidth(),l=r.calcRedestributedWidths(a,s,n.pixelDelta,o.isRelative),c=l.newSizes,u=l.delta;zi(i,c,o),o.adjustTableWidth(u)}(0,t,n,o.sizing,o.resize)},Ac=function(e,t){return A(t,(function(e){return 0===e.column&&e.isLocked}))},Mc=function(e,t){return A(t,(function(t){return t.column+t.colspan>=e.grid.columns&&t.isLocked}))},Rc=function(e,t){var n=Bo(e),o=nc(t);return z(o,(function(e,t){return e+n[t.column].map(jo).getOr(0)}),0)},Pc=function(e){return function(t,n){return Sl(t,n).filter((function(n){return!(e?Ac:Mc)(t,n)})).map((function(e){return{details:e,pixelDelta:Rc(t,e)}}))}},Ic=function(e){return function(t,n){return Ol(t,n).filter((function(n){return!(e?Ac:Mc)(t,n.cells)}))}},Lc=cc("th"),jc=cc("td"),zc=Cl((function(e,t,n,o){var r=t[0].row,i=xc(t),a=j(i,(function(e,t){return{grid:ql(e.grid,r,t.row+e.delta,n,o.getOrInit),delta:e.delta+1}}),{grid:e,delta:0}).grid;return wc(a,r,t[0].column)}),Sl,f,f,lc),Fc=Cl((function(e,t,n,o){var r=xc(t),i=r[r.length-1],a=i.row+i.rowspan,s=j(r,(function(e,t){return ql(e,a,t.row,n,o.getOrInit)}),e);return wc(s,a,t[0].column)}),Sl,f,f,lc),Bc=Cl((function(e,t,n,o){var r=t.details,i=nc(r),a=i[0].column,s=j(i,(function(e,t){return{grid:Kl(e.grid,a,t.column+e.delta,n,o.getOrInit),delta:e.delta+1}}),{grid:e,delta:0}).grid;return wc(s,r[0].row,a)}),Pc(!0),Dc,f,lc),Nc=Cl((function(e,t,n,o){var r=t.details,i=r[r.length-1],a=i.column+i.colspan,s=nc(r),l=j(s,(function(e,t){return Kl(e,a,t.column,n,o.getOrInit)}),e);return wc(l,r[0].row,a)}),Pc(!1),Dc,f,lc),Vc=Cl((function(e,t,n,o){var r=nc(t.details),i=function(e,t){return V(e,(function(e){var n=e.cells,o=j(t,(function(e,t){return t>=0&&t<e.length?e.slice(0,t).concat(e.slice(t+1)):e}),n);return o.length>0?[qe(e.element,o,e.section,e.isNew)]:[]}))}(e,R(r,(function(e){return e.column}))),a=i.length>0?i[0].cells.length-1:0;return wc(i,r[0].row,Math.min(r[0].column,a))}),(function(e,t){return kl(e,t).map((function(t){return{details:t,pixelDelta:-Rc(e,t)}}))}),Dc,bc,lc),Hc=Cl((function(e,t,n,o){var r=xc(t),i=function(e,t,n){var o=yn(e),r=o.rows;return o.cols.concat(r.slice(0,t)).concat(r.slice(n+1))}(e,r[0].row,r[r.length-1].row),a=i.length>0?i.length-1:0;return wc(i,Math.min(t[0].row,a),t[0].column)}),Sl,f,bc,lc),$c=Cl((function(e,t,n,o){var r=nc(t),i=R(r,(function(e){return e.column})),a=Zl(e,i,!0,n,o.replaceOrInit);return wc(a,t[0].row,t[0].column)}),kl,f,f,Lc),Uc=Cl((function(e,t,n,o){var r=nc(t),i=R(r,(function(e){return e.column})),a=Zl(e,i,!1,n,o.replaceOrInit);return wc(a,t[0].row,t[0].column)}),kl,f,f,jc),Wc=Cl(Oc,kl,f,f,Lc),qc=Cl(Sc,kl,f,f,jc),Kc=Cl(kc,kl,f,f,jc),Gc=Cl((function(e,t,n,o){var r=tc(e,t,n,o.replaceOrInit);return wc(r,t[0].row,t[0].column)}),kl,f,f,Lc),Yc=Cl((function(e,t,n,o){var r=tc(e,t,n,o.replaceOrInit);return wc(r,t[0].row,t[0].column)}),kl,f,f,jc),Xc=Cl((function(e,t,n,o){var r=t.cells;gc(r);var i=function(e,t,n,o){var r=yn(e).rows;if(0===r.length)return e;for(var i=t.startRow;i<=t.finishRow;i++)for(var a=t.startCol;a<=t.finishCol;a++){var s=r[i],l=gn(s,a).isLocked;pn(s,a,We(o(),!1,l))}return e}(e,t.bounds,0,o.merge(r));return yc(i,S.from(r[0]))}),Tl,Tc,f,uc),Jc=Cl((function(e,t,n,o){var r=j(t,(function(e,t){return Al(e,t,n,o.unmerge(t))}),e);return yc(r,S.from(t[0]))}),Dl,Tc,f,uc),Qc=Cl((function(e,t,n,o){var r=function(e,t){var n=En.fromTable(e);return yl(n,t,!0)}(t.clipboard,t.generators),i=function(e,t){return{row:e,column:t}}(t.row,t.column);return $l(i,e,r,t.generators,n).fold((function(){return yc(e,S.some(t.element))}),(function(e){return wc(e,t.row,t.column)}))}),(function(e,t){return nn(t.element).bind((function(n){return wl(e,n).map((function(e){return Y(Y({},e),{generators:t.generators,clipboard:t.clipboard})}))}))}),Tc,f,lc),Zc=Cl((function(e,t,n,o){var r=yn(e).rows,i=t.cells[0].column,a=r[t.cells[0].row],s=Ec(t.clipboard,t.generators,a),l=Ul(i,e,s,t.generators,n);return wc(l,t.cells[0].row,t.cells[0].column)}),Ic(!0),f,f,lc),eu=Cl((function(e,t,n,o){var r=yn(e).rows,i=t.cells[t.cells.length-1].column+t.cells[t.cells.length-1].colspan,a=r[t.cells[0].row],s=Ec(t.clipboard,t.generators,a),l=Ul(i,e,s,t.generators,n);return wc(l,t.cells[0].row,t.cells[0].column)}),Ic(!1),f,f,lc),tu=Cl((function(e,t,n,o){var r=yn(e).rows,i=t.cells[0].row,a=r[i],s=Ec(t.clipboard,t.generators,a),l=Wl(i,e,s,t.generators,n);return wc(l,t.cells[0].row,t.cells[0].column)}),Ol,f,f,lc),nu=Cl((function(e,t,n,o){var r=yn(e).rows,i=t.cells[t.cells.length-1].row+t.cells[t.cells.length-1].rowspan,a=r[t.cells[0].row],s=Ec(t.clipboard,t.generators,a),l=Wl(i,e,s,t.generators,n);return wc(l,t.cells[0].row,t.cells[0].column)}),Ol,f,f,lc),ou=function(e,t){var n=En.fromTable(e);return Sl(n,t).bind((function(e){var t=e[e.length-1],o=e[0].column,r=t.column+t.colspan,i=N(R(n.all,(function(e){return L(e.cells,(function(e){return e.column>=o&&e.column<r}))})));return nl(i)})).getOr("")},ru=function(e,t){var n=En.fromTable(e);return Sl(n,t).bind(nl).getOr("")},iu=function(e,t){var n=En.fromTable(e);return Sl(n,t).bind((function(e){var t=e[e.length-1],o=e[0].row,r=t.row+t.rowspan;return function(e){var t=R(e,(function(e){return tl(e).type})),n=D(t,"header"),o=D(t,"footer");if(n||o){var r=D(t,"body");return!n||r||o?n||r||!o?S.none():S.some("footer"):S.some("header")}return S.some("body")}(n.all.slice(o,r))})).getOr("")},au=function(e,t,n){var o=function(e){return"table"===Ke(pi(e))},r=Is(e),i=Ps(e)?f:Js,a=function(t){switch(As(e)){case"section":return cl();case"sectionCells":return ul();case"cells":return dl();default:return ll(t,"section")}},s=function(n,o){return o.cursor.fold((function(){var o=on(n);return q(o).filter(gt).map((function(o){t.clear(n);var r=e.dom.createRng();return r.selectNode(o.dom),e.selection.setRng(r),Dt(o,"data-mce-selected","1"),r}))}),(function(o){var r=Ys(Xs,o),i=e.dom.createRng();return i.setStart(r.element.dom,r.offset),i.setEnd(r.element.dom,r.offset),e.selection.setRng(i),t.clear(n),S.some(i)}))},l=function(t,n,o,i,l){return function(c,u,d){void 0===d&&(d=!1),yi(c);var f=i(),m=xe.fromDom(e.getDoc()),p=di(o,m,r),h={sizing:zs(e,c),resize:Ps(e)?Wi():qi(),section:a(c)};return n(c)?t(f,c,u,p,h).bind((function(t){P(t.newRows,(function(t){rs(e,t.dom)})),P(t.newCells,(function(t){is(e,t.dom)}));var n=s(c,t);return gt(c)&&(yi(c),d||as(e,c.dom,l)),n.map((function(e){return{rng:e,effect:l}}))})):S.none()}};return{deleteRow:l(Hc,(function(t){return!1===o(e)||ca(t).rows>1}),f,n,ls),deleteColumn:l(Vc,(function(t){return!1===o(e)||ca(t).columns>1}),f,n,ls),insertRowsBefore:l(zc,w,f,n,ls),insertRowsAfter:l(Fc,w,f,n,ls),insertColumnsBefore:l(Bc,w,i,n,ls),insertColumnsAfter:l(Nc,w,i,n,ls),mergeCells:l(Xc,w,f,n,ls),unmergeCells:l(Jc,w,f,n,ls),pasteColsBefore:l(Zc,w,f,n,ls),pasteColsAfter:l(eu,w,f,n,ls),pasteRowsBefore:l(tu,w,f,n,ls),pasteRowsAfter:l(nu,w,f,n,ls),pasteCells:l(Qc,w,f,n,cs),makeCellsHeader:l(Gc,w,f,n,ls),unmakeCellsHeader:l(Yc,w,f,n,ls),makeColumnsHeader:l($c,w,f,n,ls),unmakeColumnsHeader:l(Uc,w,f,n,ls),makeRowsHeader:l(Wc,w,f,n,ls),makeRowsBody:l(qc,w,f,n,ls),makeRowsFooter:l(Kc,w,f,n,ls),getTableRowType:iu,getTableCellType:ru,getTableColType:ou}},su={styles:{"border-collapse":"collapse",width:"100%"},attributes:{border:"1"},colGroups:!1},lu=function(e){var t=xe.fromTag("colgroup");return M(e,(function(){return Vn(t,xe.fromTag("col"))})),t},cu=function(e,t,n,o){return M(e,(function(e){return function(e,t,n,o){for(var r=xe.fromTag("tr"),i=0;i<e;i++){var a=o<t||i<n?xe.fromTag("th"):xe.fromTag("td");i<n&&Dt(a,"scope","row"),o<t&&Dt(a,"scope","col"),Vn(a,xe.fromTag("br")),Vn(r,a)}return r}(t,n,o,e)}))},uu=function(e,t){e.selection.select(t.dom,!0),e.selection.collapse(!0)},du=function(e,t,n,r,i){var a=ys(e),s={styles:a,attributes:bs(e),colGroups:Ds(e)};return e.undoManager.ignore((function(){var o=function(e,t,n,o,r,i){void 0===i&&(i=su);var a=xe.fromTag("table"),s="cells"!==r;Ht(a,i.styles),At(a,i.attributes),i.colGroups&&Vn(a,lu(t));var l=Math.min(e,n);if(s&&n>0){var c=xe.fromTag("thead");Vn(a,c);var u=cu(n,t,"sectionCells"===r?l:0,o);Un(c,u)}var d=xe.fromTag("tbody");Vn(a,d);var f=cu(s?e-l:e,t,s?0:n,o);return Un(d,f),a}(n,t,i,r,As(e),s);Dt(o,"data-mce-id","__mce");var a=function(e){var t=xe.fromTag("div"),n=xe.fromDom(e.dom.cloneNode(!0));return Vn(t,n),function(e){return e.dom.innerHTML}(t)}(o);e.insertContent(a),e.addVisual()})),kt(pi(e),'table[data-mce-id="__mce"]').map((function(t){return Es(e)?Ns(t):Ts(e)?Vs(t):(ks(e)||function(e){return o(e)&&-1!==e.indexOf("%")}(a.width))&&Bs(t),yi(t),Pt(t,"data-mce-id"),function(e,t){P(wt(t,"tr"),(function(t){rs(e,t.dom),P(wt(t,"th,td"),(function(t){is(e,t.dom)}))}))}(e,t),function(e,t){kt(t,"td,th").each(g(uu,e))}(e,t),t.dom})).getOr(null)},fu=function(e,t,n,o,r){void 0===o&&(o={});var i=function(e){return d(e)&&e>0};if(i(t)&&i(n)){var a=o.headerRows||0,s=o.headerColumns||0;return du(e,n,t,s,a)}return null},mu=function(e){return function(){return e().fold((function(){return[]}),(function(e){return R(e,(function(e){return e.dom}))}))}},pu=function(e){return function(t){var n=t.length>0?S.some(mi(t)):S.none();e(n)}},hu=function(e){return function(t,n,o){void 0===o&&(o={});var r=fu(e,n,t,o);return e.undoManager.add(),r}},gu=function(e,t,n){var o=Kt(e,t,1);1===n||o<=1?Pt(e,t):Dt(e,t,Math.min(n,o))},vu=function(e,t){var n=En.fromTable(e);return kl(n,t).map((function(e){var t=e[e.length-1],o=e[0].column,r=t.column+t.colspan,i=function(e,t,n){if(En.hasColumns(e)){var o=L(En.justColumns(e),(function(e){return e.column>=t&&e.column<n})),r=R(o,(function(e){var o=So(e.element);return gu(o,"span",n-t),o})),i=xe.fromTag("colgroup");return Un(i,r),[i]}return[]}(n,o,r),a=function(e,t,n){return R(e.all,(function(e){var o=L(e.cells,(function(e){return e.column>=t&&e.column<n})),r=R(o,(function(e){var o=So(e.element);return gu(o,"colspan",n-t),o})),i=xe.fromTag("tr");return Un(i,r),i}))}(n,o,r);return X(X([],i,!0),a,!0)}))},bu=function(e,t,n){var o=En.fromTable(e);return Sl(o,t).bind((function(e){var t=yl(o,n,!1),r=yn(t).rows.slice(e[0].row,e[e.length-1].row+e[e.length-1].rowspan),i=V(r,(function(e){var t=L(e.cells,(function(e){return!e.isLocked}));return t.length>0?[Y(Y({},e),{cells:t})]:[]})),a=_l(i);return Ft(a.length>0,a)})).map((function(e){return function(e){return R(e,(function(e){var t=Oo(e.element);return P(e.cells,(function(e){var n=So(e.element);ml(n,"colspan",e.colspan,1),ml(n,"rowspan",e.rowspan,1),Vn(t,n)})),t}))}(e)}))},yu=tinymce.util.Tools.resolve("tinymce.util.Tools"),_u=function(e,t,n){return function(t,o){for(var r=0;r<o.length;r++){var i=e.getStyle(o[r],n);if(void 0===t&&(t=i),t!==i)return""}return t}(void 0,e.select("td,th",t))},wu=function(e,t,n){n&&e.formatter.apply("align"+n,{},t)},xu=function(e,t){yu.each("left center right".split(" "),(function(n){e.formatter.remove("align"+n,{},t)}))},Cu=[{text:"None",value:""},{text:"Top",value:"top"},{text:"Middle",value:"middle"},{text:"Bottom",value:"bottom"}],Ou=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,Su=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,ku=function(e){return(t=e,n="#",re(t,n)?function(e,t){return e.substring(t)}(t,n.length):t).toUpperCase();var t,n},Eu=function(e){return function(e){return Ou.test(e)||Su.test(e)}(e)?S.some({value:ku(e)}):S.none()},Tu=function(e){var t=e.toString(16);return(1===t.length?"0"+t:t).toUpperCase()},Du=function(e){return function(e){return{value:e}}(Tu(e.red)+Tu(e.green)+Tu(e.blue))},Au=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)/,Mu=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d?(?:\.\d+)?)\)/,Ru=function(e,t,n,o){return{red:e,green:t,blue:n,alpha:o}},Pu=function(e,t,n,o){var r=parseInt(e,10),i=parseInt(t,10),a=parseInt(n,10),s=parseFloat(o);return Ru(r,i,a,s)},Iu=function(e){return Eu(e).orThunk((function(){return function(e){if("transparent"===e)return S.some(Ru(0,0,0,0));var t=Au.exec(e);if(null!==t)return S.some(Pu(t[1],t[2],t[3],"1"));var n=Mu.exec(e);return null!==n?S.some(Pu(n[1],n[2],n[3],n[4])):S.none()}(e).map(Du)})).getOrThunk((function(){var t=document.createElement("canvas");t.height=1,t.width=1;var n=t.getContext("2d");n.clearRect(0,0,t.width,t.height),n.fillStyle="#FFFFFF",n.fillStyle=e,n.fillRect(0,0,1,1);var o=n.getImageData(0,0,1,1).data,r=o[0],i=o[1],a=o[2],s=o[3];return Du(Ru(r,i,a,s))}))},Lu=function(e){var t=e;return{get:function(){return t},set:function(e){t=e}}},ju=function(e){var t=Lu(S.none()),n=function(){return t.get().each(e)};return{clear:function(){n(),t.set(S.none())},isSet:function(){return t.get().isSome()},get:function(){return t.get()},set:function(e){n(),t.set(S.some(e))}}},zu=function(){var e=ju(f);return Y(Y({},e),{on:function(t){return e.get().each(t)}})},Fu=function(e,t,n,o){return function(r){var i=ju((function(e){return e.unbind()})),a=!se(o),s=function(){var s=Di(t),l=function(t){return e.formatter.match(n,{value:o},t.dom,a)};a?(r.setActive(!A(s,l)),i.set(e.formatter.formatChanged(n,(function(e){return r.setActive(!e)}),!0))):(r.setActive(H(s,l)),i.set(e.formatter.formatChanged(n,r.setActive,!1,{value:o})))};return e.initialized?s():e.on("init",s),i.clear}},Bu=function(e){return Ve(e,"menu")},Nu=function(e){return R(e,(function(e){var t=e.text||e.title;return Bu(e)?{text:t,items:Nu(e.menu)}:{text:t,value:e.value}}))},Vu=function(e,t,n,o,r){return R(n,(function(n){var i=n.text||n.title;return Bu(n)?{type:"nestedmenuitem",text:i,getSubmenuItems:function(){return Vu(e,t,n.menu,o,r)}}:{text:i,type:"togglemenuitem",onAction:function(){return r(n.value)},onSetup:Fu(e,t,o,n.value)}}))},Hu=function(e,t){return function(n){var o;e.execCommand("mceTableApplyCellStyle",!1,((o={})[t]=n,o))}},$u=function(e){return V(e,(function(e){return Bu(e)?[Y(Y({},e),{menu:$u(e.menu)})]:se(e.value)?[e]:[]}))},Uu=function(e,t,n,o,r){return function(i){return i(Vu(e,t,n,o,r))}},Wu=function(e,t,n){var o=R(t,(function(e){return{text:e.title,value:"#"+Iu(e.value).value,type:"choiceitem"}}));return[{type:"fancymenuitem",fancytype:"colorswatch",initData:{colors:o.length>0?o:void 0,allowCustomColors:!1},onAction:function(t){var o,r="remove"===t.value?"":t.value;e.execCommand("mceTableApplyCellStyle",!1,((o={})[n]=r,o))}}]},qu=function(e){return function(){var t="header"===e.queryCommandValue("mceTableRowType")?"body":"header";e.execCommand("mceTableRowType",!1,{type:t})}},Ku=function(e){return function(){var t="th"===e.queryCommandValue("mceTableColType")?"td":"th";e.execCommand("mceTableColType",!1,{type:t})}},Gu=[{name:"width",type:"input",label:"Width"},{name:"height",type:"input",label:"Height"},{name:"celltype",type:"listbox",label:"Cell type",items:[{text:"Cell",value:"td"},{text:"Header cell",value:"th"}]},{name:"scope",type:"listbox",label:"Scope",items:[{text:"None",value:""},{text:"Row",value:"row"},{text:"Column",value:"col"},{text:"Row group",value:"rowgroup"},{text:"Column group",value:"colgroup"}]},{name:"halign",type:"listbox",label:"Horizontal align",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{name:"valign",type:"listbox",label:"Vertical align",items:Cu}],Yu=function(e){return Gu.concat(function(e){var t=Nu(Os(e));return t.length>0?S.some({name:"class",type:"listbox",label:"Class",items:t}):S.none()}(e).toArray())},Xu=function(e,t){var n=[{name:"borderstyle",type:"listbox",label:"Border style",items:[{text:"Select...",value:""}].concat(Nu(vs(e)))},{name:"bordercolor",type:"colorinput",label:"Border color"},{name:"backgroundcolor",type:"colorinput",label:"Background color"}];return{title:"Advanced",name:"advanced",items:"cell"===t?[{name:"borderwidth",type:"input",label:"Border width"}].concat(n):n}},Ju=function(e){return function(t,n){var o=t.dom;return{setAttrib:function(t,r){e&&!r||o.setAttrib(n,t,r)},setStyle:function(t,r){e&&!r||o.setStyle(n,t,r)},setFormat:function(o,r){e&&!r||(""===r?t.formatter.remove(o,{value:null},n,!0):t.formatter.apply(o,{value:r},n))}}}},Qu={normal:Ju(!1),ifTruthy:Ju(!0)},Zu=function(e){return function(t){return re(t,"rgb")?e.toHex(t):t}},ed=function(e,t){var n=xe.fromDom(t);return{borderwidth:Wt(n,"border-width").getOr(""),borderstyle:Wt(n,"border-style").getOr(""),bordercolor:Wt(n,"border-color").map(Zu(e)).getOr(""),backgroundcolor:Wt(n,"background-color").map(Zu(e)).getOr("")}},td=function(e){var t=e[0],n=e.slice(1);return P(n,(function(e){P(Ae(t),(function(n){Re(e,(function(e,o){var r=t[n];""!==r&&n===o&&r!==e&&(t[n]="")}))}))})),t},nd=function(e,t,n,o){return F(e,(function(e){return!l(n.formatter.matchNode(o,t+e))})).getOr("")},od=g(nd,["left","center","right"],"align"),rd=g(nd,["top","middle","bottom"],"valign"),id=function(e){return an(xe.fromDom(e)).map((function(t){var n={selection:mi(e.cells)};return iu(t,n)})).getOr("")},ad=function(e,t){var n=En.fromTable(e),o=En.justCells(n),r=L(o,(function(e){return A(t,(function(t){return ke(e.element,t)}))}));return R(r,(function(e){return{element:e.element.dom,column:En.getColumnAt(n,e.column).map((function(e){return e.element.dom}))}}))},sd=function(e,t,n){var o=1===t.length;P(t,(function(t){var r=t.element,i=o?Qu.normal(e,r):Qu.ifTruthy(e,r);!function(e,t,n){e.setAttrib("scope",n.scope),e.setAttrib("class",n.class),e.setStyle("height",bi(n.height)),t.setStyle("width",bi(n.width))}(i,t.column.map((function(t){return o?Qu.normal(e,t):Qu.ifTruthy(e,t)})).getOr(i),n),_s(e)&&function(e,t){e.setFormat("tablecellbackgroundcolor",t.backgroundcolor),e.setFormat("tablecellbordercolor",t.bordercolor),e.setFormat("tablecellborderstyle",t.borderstyle),e.setFormat("tablecellborderwidth",bi(t.borderwidth))}(i,n),o&&(xu(e,r),function(e,t){yu.each("top middle bottom".split(" "),(function(n){e.formatter.remove("valign"+n,{},t)}))}(e,r)),n.halign&&wu(e,r,n.halign),n.valign&&function(e,t,n){n&&e.formatter.apply("valign"+n,{},t)}(e,r,n.valign)}))},ld=function(e,t,n,o){var r=o.getData();o.close(),e.undoManager.transact((function(){!function(e,t,n,o){var r=Le(o,(function(e,t){return n[t]!==e}));Fe(r)>0&&t.length>=1&&an(t[0]).each((function(n){var i=ad(n,t),a=Fe(Le(r,(function(e,t){return"scope"!==t&&"celltype"!==t})))>0,s=Ne(r,"celltype");(a||Ne(r,"scope"))&&sd(e,i,o),s&&function(e,t){e.execCommand("mceTableCellType",!1,{type:t.celltype,no_events:!0})}(e,o),as(e,n.dom,{structure:s,style:a})}))}(e,t,n,r),e.focus()}))},cd=function(e,t){var n=an(t[0]).map((function(n){return R(ad(n,t),(function(t){return function(e,t,n,o){var r,i=e.dom,a=o.getOr(t),s=function(e,t){return i.getStyle(e,t)||i.getAttrib(e,t)};return Y({width:s(a,"width"),height:s(t,"height"),scope:i.getAttrib(t,"scope"),celltype:(r=t,r.nodeName.toLowerCase()),class:i.getAttrib(t,"class",""),halign:od(e,t),valign:rd(e,t)},n?ed(i,t):{})}(e,t.element,_s(e),t.column)}))}));return td(n.getOrDie())},ud=function(e,t){var n=Di(t);if(0!==n.length){var o=cd(e,n),r={type:"tabpanel",tabs:[{title:"General",name:"general",items:Yu(e)},Xu(e,"cell")]},i={type:"panel",items:[{type:"grid",columns:2,items:Yu(e)}]};e.windowManager.open({title:"Cell Properties",size:"normal",body:_s(e)?r:i,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:o,onSubmit:g(ld,e,n,o)})}},dd=[{type:"listbox",name:"type",label:"Row type",items:[{text:"Header",value:"header"},{text:"Body",value:"body"},{text:"Footer",value:"footer"}]},{type:"listbox",name:"align",label:"Alignment",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"Height",name:"height",type:"input"}],fd=function(e){return dd.concat(function(e){var t=Nu(function(e){return e.getParam("table_row_class_list",[],"array")}(e));return t.length>0?S.some({name:"class",type:"listbox",label:"Class",items:t}):S.none()}(e).toArray())},md=function(e,t,n,o){var r=1===t.length;P(t,(function(t){var i=r?Qu.normal(e,t):Qu.ifTruthy(e,t);!function(e,t){e.setAttrib("class",t.class),e.setStyle("height",bi(t.height))}(i,n),ws(e)&&function(e,t){e.setStyle("background-color",t.backgroundcolor),e.setStyle("border-color",t.bordercolor),e.setStyle("border-style",t.borderstyle)}(i,n),n.align!==o.align&&(xu(e,t),wu(e,t,n.align))}))},pd=function(e,t,n,o){var r=o.getData();o.close(),e.undoManager.transact((function(){!function(e,t,n,o){var r=Le(o,(function(e,t){return n[t]!==e}));if(Fe(r)>0){var i=Ne(r,"type"),a=!i||Fe(r)>1;a&&md(e,t,o,n),i&&function(e,t){e.execCommand("mceTableRowType",!1,{type:t.type,no_events:!0})}(e,o),an(xe.fromDom(t[0])).each((function(t){return as(e,t.dom,{structure:i,style:a})}))}}(e,t,n,r),e.focus()}))},hd=function(e){var t,n,o,r,i=(t=_i(e),n=Oi.selected,o=Ti(t),r=o.bind((function(e){return an(e)})).map((function(e){return sn(e)})),zt(o,r,(function(e,t){return L(t,(function(t){return A(mi(t.dom.cells),(function(t){return"1"===Mt(t,n)||ke(t,e)}))}))})).getOr([]));if(0!==i.length){var a=R(i,(function(t){return function(e,t,n){var o=e.dom;return Y({height:o.getStyle(t,"height")||o.getAttrib(t,"height"),class:o.getAttrib(t,"class",""),type:id(t),align:od(e,t)},n?ed(o,t):{})}(e,t.dom,ws(e))})),s=td(a),l={type:"tabpanel",tabs:[{title:"General",name:"general",items:fd(e)},Xu(e,"row")]},c={type:"panel",items:[{type:"grid",columns:2,items:fd(e)}]};e.windowManager.open({title:"Row Properties",size:"normal",body:ws(e)?l:c,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:s,onSubmit:g(pd,e,R(i,(function(e){return e.dom})),s)})}},gd=function(e,t,n){var o=n?[{type:"input",name:"cols",label:"Cols",inputMode:"numeric"},{type:"input",name:"rows",label:"Rows",inputMode:"numeric"}]:[],r=function(e){return e.getParam("table_appearance_options",!0,"boolean")}(e)?[{type:"input",name:"cellspacing",label:"Cell spacing",inputMode:"numeric"},{type:"input",name:"cellpadding",label:"Cell padding",inputMode:"numeric"},{type:"input",name:"border",label:"Border width"},{type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]}]:[],i=t.length>0?[{type:"listbox",name:"class",label:"Class",items:t}]:[];return o.concat([{type:"input",name:"width",label:"Width"},{type:"input",name:"height",label:"Height"}]).concat(r).concat([{type:"listbox",name:"align",label:"Alignment",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]}]).concat(i)},vd=function(e,t,n,r){if("TD"===t.tagName||"TH"===t.tagName)o(n)?e.setStyle(t,n,r):e.setStyle(t,n);else if(t.children)for(var i=0;i<t.children.length;i++)vd(e,t.children[i],n,r)},bd=function(e,t,n,o){var r=e.dom,i=o.getData(),a=Le(i,(function(e,t){return n[t]!==e}));o.close(),""===i.class&&delete i.class,e.undoManager.transact((function(){if(!t){var n=parseInt(i.cols,10)||1,o=parseInt(i.rows,10)||1;t=du(e,n,o,0,0)}if(Fe(a)>0){!function(e,t,n){var o=e.dom,r={},i={};if(r.class=n.class,i.height=bi(n.height),o.getAttrib(t,"width")&&!Cs(e)?r.width=function(e){return e?e.replace(/px$/,""):""}(n.width):i.width=bi(n.width),Cs(e)?(i["border-width"]=bi(n.border),i["border-spacing"]=bi(n.cellspacing)):(r.border=n.border,r.cellpadding=n.cellpadding,r.cellspacing=n.cellspacing),Cs(e)&&t.children)for(var a=0;a<t.children.length;a++)vd(o,t.children[a],{"border-width":bi(n.border),padding:bi(n.cellpadding)}),xs(e)&&vd(o,t.children[a],{"border-color":n.bordercolor});xs(e)&&(i["background-color"]=n.backgroundcolor,i["border-color"]=n.bordercolor,i["border-style"]=n.borderstyle),r.style=o.serializeStyle(Y(Y({},ys(e)),i)),o.setAttribs(t,Y(Y({},bs(e)),r))}(e,t,i);var s=r.select("caption",t)[0];(s&&!i.caption||!s&&i.caption)&&e.execCommand("mceTableToggleCaption"),""===i.align?xu(e,t):wu(e,t,i.align)}if(e.focus(),e.addVisual(),Fe(a)>0){var l=Ne(a,"caption"),c=!l||Fe(a)>1;as(e,t,{structure:l,style:c})}}))},yd=function(e,t){var n,o=e.dom,r=function(e,t){var n,o,r,i,a=ys(e),s=bs(e),l=t?(n=e.dom,{borderstyle:Be(a,"border-style").getOr(""),bordercolor:Zu(n)(Be(a,"border-color").getOr("")),backgroundcolor:Zu(n)(Be(a,"background-color").getOr(""))}):{};return Y(Y(Y(Y(Y(Y({},{height:"",width:"100%",cellspacing:"",cellpadding:"",caption:!1,class:"",align:"",border:""}),a),s),l),(i=a["border-width"],Cs(e)&&i?{border:i}:Be(s,"border").fold((function(){return{}}),(function(e){return{border:e}})))),(o=Be(a,"border-spacing").or(Be(s,"cellspacing")).fold((function(){return{}}),(function(e){return{cellspacing:e}})),r=Be(a,"border-padding").or(Be(s,"cellpadding")).fold((function(){return{}}),(function(e){return{cellpadding:e}})),Y(Y({},o),r)))}(e,xs(e));!1===t?(n=o.getParent(e.selection.getStart(),"table",e.getBody()))?r=function(e,t,n){var o=e.dom,r=Cs(e)?o.getStyle(t,"border-spacing")||o.getAttrib(t,"cellspacing"):o.getAttrib(t,"cellspacing")||o.getStyle(t,"border-spacing"),i=Cs(e)?_u(o,t,"padding")||o.getAttrib(t,"cellpadding"):o.getAttrib(t,"cellpadding")||_u(o,t,"padding");return Y({width:o.getStyle(t,"width")||o.getAttrib(t,"width"),height:o.getStyle(t,"height")||o.getAttrib(t,"height"),cellspacing:r,cellpadding:i,border:function(t,n){var o=Wt(xe.fromDom(n),"border-width");return Cs(e)&&o.isSome()?o.getOr(""):t.getAttrib(n,"border")||_u(e.dom,n,"border-width")||_u(e.dom,n,"border")}(o,t),caption:!!o.select("caption",t)[0],class:o.getAttrib(t,"class",""),align:od(e,t)},n?ed(o,t):{})}(e,n,xs(e)):xs(e)&&(r.borderstyle="",r.bordercolor="",r.backgroundcolor=""):(r.cols="1",r.rows="1",xs(e)&&(r.borderstyle="",r.bordercolor="",r.backgroundcolor=""));var i=Nu(Ss(e));i.length>0&&r.class&&(r.class=r.class.replace(/\s*mce\-item\-table\s*/g,""));var a={type:"grid",columns:2,items:gd(e,i,t)},s=xs(e)?{type:"tabpanel",tabs:[{title:"General",name:"general",items:[a]},Xu(e,"table")]}:{type:"panel",items:[a]};e.windowManager.open({title:"Table Properties",size:"normal",body:s,onSubmit:g(bd,e,n,r),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:r})},_d=function(e){return Ei(_i(e),vi(e))},wd=function(e,t,n,i,a){var s=vi(e),l=function(e){return an(e,s)},c=function(t){return function(e){return Ti(_i(e),vi(e))}(e).bind((function(e){return l(e).map((function(n){return t(n,e)}))}))},u=function(t){e.focus()},d=function(e,t){return void 0===t&&(t=!1),c((function(n,o){var r=Si(i,n,o);e(n,r,t).each(u)}))},m=function(){return c((function(t,n){var o=Si(i,t,n),r=di(f,xe.fromDom(e.getDoc()),S.none());return bu(t,o,r)}))},p=function(){return c((function(e,t){var n=Si(i,e,t);return vu(e,n)}))},h=function(t,n){return n().each((function(n){var o=R(n,(function(e){return So(e)}));c((function(n,r){var a=fi(xe.fromDom(e.getDoc())),s=function(e,t,n,o){return{selection:wi(e),clipboard:n,generators:o}}(i,0,o,a);t(n,s).each(u)}))}))},v=function(e){return function(t,n){return Be(n,"type").each((function(t){d(e(t),n.no_events)}))}};Re({mceTableSplitCells:function(){return d(t.unmergeCells)},mceTableMergeCells:function(){return d(t.mergeCells)},mceTableInsertRowBefore:function(){return d(t.insertRowsBefore)},mceTableInsertRowAfter:function(){return d(t.insertRowsAfter)},mceTableInsertColBefore:function(){return d(t.insertColumnsBefore)},mceTableInsertColAfter:function(){return d(t.insertColumnsAfter)},mceTableDeleteCol:function(){return d(t.deleteColumn)},mceTableDeleteRow:function(){return d(t.deleteRow)},mceTableCutCol:function(){return p().each((function(e){a.setColumns(e),d(t.deleteColumn)}))},mceTableCutRow:function(){return m().each((function(e){a.setRows(e),d(t.deleteRow)}))},mceTableCopyCol:function(){return p().each((function(e){return a.setColumns(e)}))},mceTableCopyRow:function(){return m().each((function(e){return a.setRows(e)}))},mceTablePasteColBefore:function(){return h(t.pasteColsBefore,a.getColumns)},mceTablePasteColAfter:function(){return h(t.pasteColsAfter,a.getColumns)},mceTablePasteRowBefore:function(){return h(t.pasteRowsBefore,a.getRows)},mceTablePasteRowAfter:function(){return h(t.pasteRowsAfter,a.getRows)},mceTableDelete:function(){return _d(e).each((function(t){an(t,s).filter(y(s)).each((function(t){var n=xe.fromText("");if(Bn(t,n),qn(t),e.dom.isEmpty(e.getBody()))e.setContent(""),e.selection.setCursorLocation();else{var o=e.dom.createRng();o.setStart(n.dom,0),o.setEnd(n.dom,0),e.selection.setRng(o),e.nodeChanged()}}))}))},mceTableCellToggleClass:function(t,n){c((function(t){var o=Di(i),r=H(o,(function(t){return e.formatter.match("tablecellclass",{value:n},t.dom)}))?e.formatter.remove:e.formatter.apply;P(o,(function(e){return r("tablecellclass",{value:n},e.dom)})),as(e,t.dom,ss)}))},mceTableToggleClass:function(t,n){c((function(t){e.formatter.toggle("tableclass",{value:n},t.dom),as(e,t.dom,ss)}))},mceTableToggleCaption:function(){_d(e).each((function(t){an(t,s).each((function(n){St(n,"caption").fold((function(){var t=xe.fromTag("caption");Vn(t,xe.fromText("Caption")),function(e,t,n){ct(e,n).fold((function(){Vn(e,t)}),(function(e){Fn(e,t)}))}(n,t,0),e.selection.setCursorLocation(t.dom,0)}),(function(o){tt("caption")(t)&&Se("td",n).each((function(t){return e.selection.setCursorLocation(t.dom,0)})),qn(o)})),as(e,n.dom,ls)}))}))},mceTableSizingMode:function(t,n){return function(t){return _d(e).each((function(n){Ts(e)||Es(e)||ks(e)||an(n,s).each((function(n){"relative"!==t||aa(n)?"fixed"!==t||sa(n)?"responsive"!==t||la(n)||Vs(n):Ns(n):Bs(n),yi(n),as(e,n.dom,ls)}))}))}(n)},mceTableCellType:v((function(e){return"th"===e?t.makeCellsHeader:t.unmakeCellsHeader})),mceTableColType:v((function(e){return"th"===e?t.makeColumnsHeader:t.unmakeColumnsHeader})),mceTableRowType:v((function(e){switch(e){case"header":return t.makeRowsHeader;case"footer":return t.makeRowsFooter;default:return t.makeRowsBody}}))},(function(t,n){return e.addCommand(n,t)})),Re({mceTableProps:g(yd,e,!1),mceTableRowProps:g(hd,e),mceTableCellProps:g(ud,e,i)},(function(t,n){return e.addCommand(n,(function(){return t()}))})),e.addCommand("mceInsertTable",(function(t,n){r(n)&&Ae(n).length>0?fu(e,n.rows,n.columns,n.options):yd(e,!0)})),e.addCommand("mceTableApplyCellStyle",(function(t,n){var a=function(e){return"tablecell"+e.toLowerCase().replace("-","")};if(r(n)){var s=Di(i);if(0!==s.length){var c=Le(n,(function(t,n){return e.formatter.has(a(n))&&o(t)}));(function(e){for(var t in e)if(Me.call(e,t))return!1;return!0})(c)||(Re(c,(function(t,n){P(s,(function(o){Qu.normal(e,o.dom).setFormat(a(n),t)}))})),l(s[0]).each((function(t){return as(e,t.dom,ss)})))}}}))},xd={remove_similar:!0,inherit:!1},Cd=Y({selector:"td,th"},xd),Od={tablecellbackgroundcolor:Y({styles:{backgroundColor:"%value"}},Cd),tablecellverticalalign:Y({styles:{"vertical-align":"%value"}},Cd),tablecellbordercolor:Y({styles:{borderColor:"%value"}},Cd),tablecellclass:Y({classes:["%value"]},Cd),tableclass:Y({selector:"table",classes:["%value"]},xd),tablecellborderstyle:Y({styles:{borderStyle:"%value"}},Cd),tablecellborderwidth:Y({styles:{borderWidth:"%value"}},Cd)},Sd=go([{none:["current"]},{first:["current"]},{middle:["current","target"]},{last:["current"]}]),kd=Y(Y({},Sd),{none:function(e){return void 0===e&&(e=void 0),Sd.none(e)}}),Ed=function(e,t,n,o,r){void 0===r&&(r=w);var i=1===o;if(!i&&n<=0)return kd.first(e[0]);if(i&&n>=e.length-1)return kd.last(e[e.length-1]);var a=n+o,s=e[a];return r(s)?kd.middle(t,s):Ed(e,t,a,o,r)},Td=function(e,t){return an(e,t).bind((function(t){var n=on(t);return B(n,(function(t){return ke(e,t)})).map((function(e){return{index:e,all:n}}))}))},Dd=function(e,t,n,o){return{start:e,soffset:t,finish:n,foffset:o}},Ad=go([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Md={before:Ad.before,on:Ad.on,after:Ad.after,cata:function(e,t,n,o){return e.fold(t,n,o)},getStart:function(e){return e.fold(p,p,p)}},Rd=go([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Pd={domRange:Rd.domRange,relative:Rd.relative,exact:Rd.exact,exactFromRange:function(e){return Rd.exact(e.start,e.soffset,e.finish,e.foffset)},getWin:function(e){var t,n=function(e){return e.match({domRange:function(e){return xe.fromDom(e.startContainer)},relative:function(e,t){return Md.getStart(e)},exact:function(e,t,n,o){return e}})}(e);return t=n,xe.fromDom(ot(t).dom.defaultView)},range:Dd},Id=function(e,t){var n=e.document.createRange();return n.selectNode(t.dom),n},Ld=function(e,t){var n=e.document.createRange();return jd(n,t),n},jd=function(e,t){return e.selectNodeContents(t.dom)},zd=function(e,t,n){var o,r=e.document.createRange();return o=r,t.fold((function(e){o.setStartBefore(e.dom)}),(function(e,t){o.setStart(e.dom,t)}),(function(e){o.setStartAfter(e.dom)})),function(e,t){t.fold((function(t){e.setEndBefore(t.dom)}),(function(t,n){e.setEnd(t.dom,n)}),(function(t){e.setEndAfter(t.dom)}))}(r,n),r},Fd=function(e,t,n,o,r){var i=e.document.createRange();return i.setStart(t.dom,n),i.setEnd(o.dom,r),i},Bd=function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}},Nd=go([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),Vd=function(e,t,n){return t(xe.fromDom(n.startContainer),n.startOffset,xe.fromDom(n.endContainer),n.endOffset)},Hd=function(e,t){return function(e,t){var n=t.ltr();return n.collapsed?t.rtl().filter((function(e){return!1===e.collapsed})).map((function(e){return Nd.rtl(xe.fromDom(e.endContainer),e.endOffset,xe.fromDom(e.startContainer),e.startOffset)})).getOrThunk((function(){return Vd(0,Nd.ltr,n)})):Vd(0,Nd.ltr,n)}(0,function(e,t){return t.match({domRange:function(e){return{ltr:m(e),rtl:S.none}},relative:function(t,n){return{ltr:J((function(){return zd(e,t,n)})),rtl:J((function(){return S.some(zd(e,n,t))}))}},exact:function(t,n,o,r){return{ltr:J((function(){return Fd(e,t,n,o,r)})),rtl:J((function(){return S.some(Fd(e,o,r,t,n))}))}}})}(e,t))},$d=function(e,t){return Hd(e,t).match({ltr:function(t,n,o,r){var i=e.document.createRange();return i.setStart(t.dom,n),i.setEnd(o.dom,r),i},rtl:function(t,n,o,r){var i=e.document.createRange();return i.setStart(o.dom,r),i.setEnd(t.dom,n),i}})};Nd.ltr,Nd.rtl;var Ud=function(e,t,n){return t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom},Wd=function(e,t,n,o,r){var i=function(n){var o=e.dom.createRange();return o.setStart(t.dom,n),o.collapse(!0),o},a=Yn(t).length,s=function(e,t,n,o,r){if(0===r)return 0;if(t===o)return r-1;for(var i=o,a=1;a<r;a++){var s=e(a),l=Math.abs(t-s.left);if(n<=s.bottom){if(n<s.top||l>i)return a-1;i=l}}return 0}((function(e){return i(e).getBoundingClientRect()}),n,o,r.right,a);return i(s)},qd=function(e,t,n,o){return Qe(t)?function(e,t,n,o){var r=e.dom.createRange();r.selectNode(t.dom);var i=r.getClientRects();return G(i,(function(e){return Ud(e,n,o)?S.some(e):S.none()})).map((function(r){return Wd(e,t,n,o,r)}))}(e,t,n,o):function(e,t,n,o){var r=e.dom.createRange(),i=lt(t);return G(i,(function(t){return r.selectNode(t.dom),Ud(r.getBoundingClientRect(),n,o)?qd(e,t,n,o):S.none()}))}(e,t,n,o)},Kd=function(e,t){return t-e.left<e.right-t},Gd=function(e,t,n){var o=e.dom.createRange();return o.selectNode(t.dom),o.collapse(n),o},Yd=function(e,t,n){var o=e.dom.createRange();o.selectNode(t.dom);var r=o.getBoundingClientRect(),i=Kd(r,n);return(!0===i?ti:ni)(t).map((function(t){return Gd(e,t,i)}))},Xd=function(e,t,n){var o=t.dom.getBoundingClientRect(),r=Kd(o,n);return S.some(Gd(e,t,r))},Jd=function(e,t,n){var o,r;return S.from(null===(r=(o=e.dom).caretPositionFromPoint)||void 0===r?void 0:r.call(o,t,n)).bind((function(t){if(null===t.offsetNode)return S.none();var n=e.dom.createRange();return n.setStart(t.offsetNode,t.offset),n.collapse(),S.some(n)}))},Qd=function(e,t,n){var o,r;return S.from(null===(r=(o=e.dom).caretRangeFromPoint)||void 0===r?void 0:r.call(o,t,n))},Zd=function(e,t,n,o){var r=e.dom.createRange();r.selectNode(t.dom);var i=r.getBoundingClientRect();return function(e,t,n,o){var r=e.dom.createRange();r.selectNode(t.dom);var i=r.getBoundingClientRect(),a=Math.max(i.left,Math.min(i.right,n)),s=Math.max(i.top,Math.min(i.bottom,o));return qd(e,t,a,s)}(e,t,Math.max(i.left,Math.min(i.right,n)),Math.max(i.top,Math.min(i.bottom,o)))},ef=function(e,t,n){return xe.fromPoint(e,t,n).bind((function(o){var r=function(){return function(e,t,n){return(0===lt(t).length?Xd:Yd)(e,t,n)}(e,o,t)};return 0===lt(o).length?r():Zd(e,o,t,n).orThunk(r)}))},tf=document.caretPositionFromPoint?Jd:document.caretRangeFromPoint?Qd:ef,nf=function(e,t){var n=Ke(e);return"input"===n?Md.after(e):D(["br","img"],n)?0===t?Md.before(e):Md.after(e):Md.on(e,t)},of=function(e,t){var n=e.fold(Md.before,nf,Md.after),o=t.fold(Md.before,nf,Md.after);return Pd.relative(n,o)},rf=function(e,t,n,o){var r=nf(e,t),i=nf(n,o);return Pd.relative(r,i)},af=function(e,t,n,o){var r=function(e,t,n,o){var r=nt(e).dom.createRange();return r.setStart(e.dom,t),r.setEnd(n.dom,o),r}(e,t,n,o),i=ke(e,n)&&t===o;return r.collapsed&&!i},sf=function(e){return S.from(e.getSelection())},lf=function(e,t){sf(e).each((function(e){e.removeAllRanges(),e.addRange(t)}))},cf=function(e,t,n,o,r){var i=Fd(e,t,n,o,r);lf(e,i)},uf=function(e,t){return Hd(e,t).match({ltr:function(t,n,o,r){cf(e,t,n,o,r)},rtl:function(t,n,o,r){sf(e).each((function(i){if(i.setBaseAndExtent)i.setBaseAndExtent(t.dom,n,o.dom,r);else if(i.extend)try{!function(e,t,n,o,r,i){t.collapse(n.dom,o),t.extend(r.dom,i)}(0,i,t,n,o,r)}catch(i){cf(e,o,r,t,n)}else cf(e,o,r,t,n)}))}})},df=function(e,t,n,o,r){var i=rf(t,n,o,r);uf(e,i)},ff=function(e,t,n){var o=of(t,n);uf(e,o)},mf=function(e){var t=Pd.getWin(e).dom,n=function(e,n,o,r){return Fd(t,e,n,o,r)},o=function(e){return e.match({domRange:function(e){var t=xe.fromDom(e.startContainer),n=xe.fromDom(e.endContainer);return rf(t,e.startOffset,n,e.endOffset)},relative:of,exact:rf})}(e);return Hd(t,o).match({ltr:n,rtl:n})},pf=function(e){if(e.rangeCount>0){var t=e.getRangeAt(0),n=e.getRangeAt(e.rangeCount-1);return S.some(Dd(xe.fromDom(t.startContainer),t.startOffset,xe.fromDom(n.endContainer),n.endOffset))}return S.none()},hf=function(e){if(null===e.anchorNode||null===e.focusNode)return pf(e);var t=xe.fromDom(e.anchorNode),n=xe.fromDom(e.focusNode);return af(t,e.anchorOffset,n,e.focusOffset)?S.some(Dd(t,e.anchorOffset,n,e.focusOffset)):pf(e)},gf=function(e,t,n){void 0===n&&(n=!0);var o=(n?Ld:Id)(e,t);lf(e,o)},vf=function(e){return function(e){return sf(e).filter((function(e){return e.rangeCount>0})).bind(hf)}(e).map((function(e){return Pd.exact(e.start,e.soffset,e.finish,e.foffset)}))},bf=function(e,t){return function(e){var t=e.getClientRects(),n=t.length>0?t[0]:e.getBoundingClientRect();return n.width>0||n.height>0?S.some(n).map(Bd):S.none()}($d(e,t))},yf=function(e,t,n){return function(e,t,n){var o=xe.fromDom(e.document);return tf(o,t,n).map((function(e){return Dd(xe.fromDom(e.startContainer),e.startOffset,xe.fromDom(e.endContainer),e.endOffset)}))}(e,t,n)},_f=tinymce.util.Tools.resolve("tinymce.util.VK"),wf=function(e,t,n){return Cf(e,t,function(e,t,n){return Td(e,n).fold((function(){return kd.none(e)}),(function(n){return Ed(n.all,e,n.index,1,t)}))}(n,Fa))},xf=function(e,t,n){return Cf(e,t,function(e,t,n){return Td(e,n).fold((function(){return kd.none()}),(function(n){return Ed(n.all,e,n.index,-1,t)}))}(n,Fa))},Cf=function(e,t,n){return n.fold(S.none,S.none,(function(e,t){return ti(t).map((function(e){return function(e,t){var n=Pd.exact(t,0,t,0);return mf(n)}(0,e)}))}),(function(n){return e.execCommand("mceTableInsertRowAfter"),wf(e,t,n)}))},Of=["table","li","dl"],Sf=function(e,t){return{selection:e,kill:t}},kf=function(e,t,n,o){return{start:Md.on(e,t),finish:Md.on(n,o)}},Ef=function(e,t){var n=$d(e,t);return Dd(xe.fromDom(n.startContainer),n.startOffset,xe.fromDom(n.endContainer),n.endOffset)},Tf=kf,Df=function(e,t,n,o,r){return ke(n,o)?S.none():co(n,o,t).bind((function(t){var o=t.boxes.getOr([]);return o.length>1?(r(e,o,t.start,t.finish),S.some(Sf(S.some(Tf(n,0,n,Qr(n))),!0))):S.none()}))},Af=function(e,t){return{item:e,mode:t}},Mf=function(e,t,n,o){return void 0===o&&(o=Rf),e.property().parent(t).map((function(e){return Af(e,o)}))},Rf=function(e,t,n,o){return void 0===o&&(o=Pf),n.sibling(e,t).map((function(e){return Af(e,o)}))},Pf=function(e,t,n,o){void 0===o&&(o=Pf);var r=e.property().children(t);return n.first(r).map((function(e){return Af(e,o)}))},If=[{current:Mf,next:Rf,fallback:S.none()},{current:Rf,next:Pf,fallback:S.some(Mf)},{current:Pf,next:Pf,fallback:S.some(Rf)}],Lf=function(e,t,n,o,r){return void 0===r&&(r=If),F(r,(function(e){return e.current===n})).bind((function(n){return n.current(e,t,o,n.next).orThunk((function(){return n.fallback.bind((function(n){return Lf(e,t,n,o)}))}))}))},jf=function(){return{sibling:function(e,t){return e.query().prevSibling(t)},first:function(e){return e.length>0?S.some(e[e.length-1]):S.none()}}},zf=function(){return{sibling:function(e,t){return e.query().nextSibling(t)},first:function(e){return e.length>0?S.some(e[0]):S.none()}}},Ff=function(e,t,n,o,r,i){return Lf(e,t,o,r).bind((function(t){return i(t.item)?S.none():n(t.item)?S.some(t.item):Ff(e,t.item,n,t.mode,r,i)}))},Bf=function(e){return function(t){return 0===e.property().children(t).length}},Nf=function(e,t,n,o){return Ff(e,t,n,Rf,jf(),o)},Vf=function(e,t,n,o){return Ff(e,t,n,Rf,zf(),o)},Hf=Zn(),$f=function(e,t){return function(e,t,n){return Nf(e,t,Bf(e),n)}(Hf,e,t)},Uf=function(e,t){return function(e,t,n){return Vf(e,t,Bf(e),n)}(Hf,e,t)},Wf=go([{none:["message"]},{success:[]},{failedUp:["cell"]},{failedDown:["cell"]}]),qf=function(e){return Et(e,"tr")},Kf=Y(Y({},Wf),{verify:function(e,t,n,o,r,i,a){return Et(o,"td,th",a).bind((function(n){return Et(t,"td,th",a).map((function(t){return ke(n,t)?ke(o,n)&&Qr(n)===r?i(t):Wf.none("in same cell"):so(qf,[n,t]).fold((function(){return function(e,t,n){var o=e.getRect(t),r=e.getRect(n);return r.right>o.left&&r.left<o.right}(e,t,n)?Wf.success():i(t)}),(function(e){return i(t)}))}))})).getOr(Wf.none("default"))},cata:function(e,t,n,o,r){return e.fold(t,n,o,r)}}),Gf=function(e,t){return B(e,g(ke,t))},Yf=function(e){return"br"===Ke(e)},Xf=function(e,t,n){return t(e,n).bind((function(e){return Qe(e)&&0===Yn(e).trim().length?Xf(e,t,n):S.some(e)}))},Jf=function(e,t,n,o){return function(e,t){return ct(e,t).filter(Yf).orThunk((function(){return ct(e,t-1).filter(Yf)}))}(t,n).bind((function(t){return o.traverse(t).fold((function(){return Xf(t,o.gather,e).map(o.relative)}),(function(e){return function(e){return rt(e).bind((function(t){var n=lt(t);return Gf(n,e).map((function(o){return function(e,t,n,o){return{parent:e,children:t,element:n,index:o}}(t,n,e,o)}))}))}(e).map((function(e){return Md.on(e.parent,e.index)}))}))}))},Qf=function(e,t,n,o){return(Yf(t)?function(e,t,n){return n.traverse(t).orThunk((function(){return Xf(t,n.gather,e)})).map(n.relative)}(e,t,o):Jf(e,t,n,o)).map((function(e){return{start:e,finish:e}}))},Zf=function(e,t){return{left:e.left,top:e.top+t,right:e.right,bottom:e.bottom+t}},em=function(e,t){return{left:e.left,top:e.top-t,right:e.right,bottom:e.bottom-t}},tm=function(e,t,n){return{left:e.left+t,top:e.top+n,right:e.right+t,bottom:e.bottom+n}},nm=function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}},om=function(e,t){return S.some(e.getRect(t))},rm=function(e,t,n){return Je(t)?om(e,t).map(nm):Qe(t)?function(e,t,n){return n>=0&&n<Qr(t)?e.getRangedRect(t,n,t,n+1):n>0?e.getRangedRect(t,n-1,t,n):S.none()}(e,t,n).map(nm):S.none()},im=function(e,t){return Je(t)?om(e,t).map(nm):Qe(t)?e.getRangedRect(t,0,t,Qr(t)).map(nm):S.none()},am=go([{none:[]},{retry:["caret"]}]),sm=function(e,t,n){return(o=t,r=mc,xt((function(e,t){return t(e)}),Ct,o,r,i)).fold(_,(function(t){return im(e,t).exists((function(e){return function(e,t){return e.left<t.left||Math.abs(t.right-e.left)<1||e.left>t.right}(n,e)}))}));var o,r,i},lm={point:function(e){return e.bottom},adjuster:function(e,t,n,o,r){var i=Zf(r,5);return Math.abs(n.bottom-o.bottom)<1||n.top>r.bottom?am.retry(i):n.top===r.bottom?am.retry(Zf(r,1)):sm(e,t,r)?am.retry(tm(i,5,0)):am.none()},move:Zf,gather:Uf},cm=function(e,t,n,o,r){return 0===r?S.some(o):function(e,t,n){return e.elementFromPoint(t,n).filter((function(e){return"table"===Ke(e)})).isSome()}(e,o.left,t.point(o))?function(e,t,n,o,r){return cm(e,t,n,t.move(o,5),r)}(e,t,n,o,r-1):e.situsFromPoint(o.left,t.point(o)).bind((function(i){return i.start.fold(S.none,(function(i){return im(e,i).bind((function(a){return t.adjuster(e,i,a,n,o).fold(S.none,(function(o){return cm(e,t,n,o,r-1)}))})).orThunk((function(){return S.some(o)}))}),S.none)}))},um=function(e,t,n){var o=e.move(n,5),r=cm(t,e,n,o,100).getOr(o);return function(e,t,n){return e.point(t)>n.getInnerHeight()?S.some(e.point(t)-n.getInnerHeight()):e.point(t)<0?S.some(-e.point(t)):S.none()}(e,r,t).fold((function(){return t.situsFromPoint(r.left,e.point(r))}),(function(n){return t.scrollBy(0,n),t.situsFromPoint(r.left,e.point(r)-n)}))},dm={tryUp:g(um,{point:function(e){return e.top},adjuster:function(e,t,n,o,r){var i=em(r,5);return Math.abs(n.top-o.top)<1||n.bottom<r.top?am.retry(i):n.bottom===r.top?am.retry(em(r,1)):sm(e,t,r)?am.retry(tm(i,5,0)):am.none()},move:em,gather:$f}),tryDown:g(um,lm),ieTryUp:function(e,t){return e.situsFromPoint(t.left,t.top-5)},ieTryDown:function(e,t){return e.situsFromPoint(t.left,t.bottom+5)},getJumpSize:m(5)},fm=function(e,t,n){return e.getSelection().bind((function(o){return Qf(t,o.finish,o.foffset,n).fold((function(){return S.some(Ws(o.finish,o.foffset))}),(function(r){var i=e.fromSitus(r);return function(e){return Kf.cata(e,(function(e){return S.none()}),(function(){return S.none()}),(function(e){return S.some(Ws(e,0))}),(function(e){return S.some(Ws(e,Qr(e)))}))}(Kf.verify(e,o.finish,o.foffset,i.finish,i.foffset,n.failure,t))}))}))},mm=function(e,t,n,o,r,i){return 0===i?S.none():gm(e,t,n,o,r).bind((function(a){var s=e.fromSitus(a),l=Kf.verify(e,n,o,s.finish,s.foffset,r.failure,t);return Kf.cata(l,(function(){return S.none()}),(function(){return S.some(a)}),(function(a){return ke(n,a)&&0===o?pm(e,n,o,em,r):mm(e,t,a,0,r,i-1)}),(function(a){return ke(n,a)&&o===Qr(a)?pm(e,n,o,Zf,r):mm(e,t,a,Qr(a),r,i-1)}))}))},pm=function(e,t,n,o,r){return rm(e,t,n).bind((function(t){return hm(e,r,o(t,dm.getJumpSize()))}))},hm=function(e,t,n){var o=_e().browser;return o.isChrome()||o.isSafari()||o.isFirefox()||o.isEdge()?t.otherRetry(e,n):o.isIE()?t.ieRetry(e,n):S.none()},gm=function(e,t,n,o,r){return rm(e,n,o).bind((function(t){return hm(e,r,t)}))},vm=function(e,t){return Ct(e,(function(e){return rt(e).exists((function(e){return ke(e,t)}))}),n).isSome();var n},bm=function(e,t,n,o,r){return Et(o,"td,th",t).bind((function(o){return Et(o,"table",t).bind((function(i){return vm(r,i)?function(e,t,n){return fm(e,t,n).bind((function(o){return mm(e,t,o.element,o.offset,n,20).map(e.fromSitus)}))}(e,t,n).bind((function(e){return Et(e.finish,"td,th",t).map((function(t){return{start:o,finish:t,range:e}}))})):S.none()}))}))},ym=function(e,t,n,o,r,i){return _e().browser.isIE()?S.none():i(o,t).orThunk((function(){return bm(e,t,n,o,r).map((function(e){var t=e.range;return Sf(S.some(Tf(t.start,t.soffset,t.finish,t.foffset)),!0)}))}))},_m=function(e,t){return Et(e,"tr",t).bind((function(e){return Et(e,"table",t).bind((function(n){var o=wt(n,"tr");return ke(e,o[0])?function(e,t,n){return Nf(Hf,e,t,n)}(n,(function(e){return ni(e).isSome()}),t).map((function(e){var t=Qr(e);return Sf(S.some(Tf(e,t,e,t)),!0)})):S.none()}))}))},wm=function(e,t){return Et(e,"tr",t).bind((function(e){return Et(e,"table",t).bind((function(n){var o=wt(n,"tr");return ke(e,o[o.length-1])?function(e,t,n){return Vf(Hf,e,t,n)}(n,(function(e){return ti(e).isSome()}),t).map((function(e){return Sf(S.some(Tf(e,0,e,0)),!0)})):S.none()}))}))},xm=function(e,t,n,o,r,i,a){return bm(e,n,o,r,i).bind((function(e){return Df(t,n,e.start,e.finish,a)}))},Cm=function(e,t){return Et(e,"td,th",t)},Om={traverse:st,gather:Uf,relative:Md.before,otherRetry:dm.tryDown,ieRetry:dm.ieTryDown,failure:Kf.failedDown},Sm={traverse:at,gather:$f,relative:Md.before,otherRetry:dm.tryUp,ieRetry:dm.ieTryUp,failure:Kf.failedUp},km=function(e){return function(t){return t===e}},Em=km(38),Tm=km(40),Dm=function(e){return e>=37&&e<=40},Am={isBackward:km(37),isForward:km(39)},Mm={isBackward:km(39),isForward:km(37)},Rm=function(e){return{elementFromPoint:function(t,n){return xe.fromPoint(xe.fromDom(e.document),t,n)},getRect:function(e){return e.dom.getBoundingClientRect()},getRangedRect:function(t,n,o,r){var i=Pd.exact(t,n,o,r);return bf(e,i)},getSelection:function(){return vf(e).map((function(t){return Ef(e,t)}))},fromSitus:function(t){var n=Pd.relative(t.start,t.finish);return Ef(e,n)},situsFromPoint:function(t,n){return yf(e,t,n).map((function(e){return kf(e.start,e.soffset,e.finish,e.foffset)}))},clearSelection:function(){!function(e){sf(e).each((function(e){return e.removeAllRanges()}))}(e)},collapseSelection:function(t){void 0===t&&(t=!1),vf(e).each((function(n){return n.fold((function(e){return e.collapse(t)}),(function(n,o){var r=t?n:o;ff(e,r,r)}),(function(n,o,r,i){var a=t?n:r,s=t?o:i;df(e,a,s,a,s)}))}))},setSelection:function(t){df(e,t.start,t.soffset,t.finish,t.foffset)},setRelativeSelection:function(t,n){ff(e,t,n)},selectNode:function(t){gf(e,t,!1)},selectContents:function(t){gf(e,t)},getInnerHeight:function(){return e.innerHeight},getScrollY:function(){var t,n,o,r;return(t=xe.fromDom(e.document),n=void 0!==t?t.dom:document,o=n.body.scrollLeft||n.documentElement.scrollLeft,r=n.body.scrollTop||n.documentElement.scrollTop,Xo(o,r)).top},scrollBy:function(t,n){!function(e,t,n){var o=(void 0!==n?n.dom:document).defaultView;o&&o.scrollBy(e,t)}(t,n,xe.fromDom(e.document))}}},Pm=function(e,t){return{rows:e,cols:t}},Im=function(e,t,n,o){var r=function(e,t,n,o){var r=zu(),i=r.clear,a=function(i){r.on((function(r){o.clearBeforeUpdate(t),Cm(i.target,n).each((function(a){co(r,a,n).each((function(n){var r=n.boxes.getOr([]);if(1===r.length){var s=r[0],l="false"===Ba(s),c=Lt(za(i.target),s,ke);l&&c&&(o.selectRange(t,r,s,s),e.selectContents(s))}else r.length>1&&(o.selectRange(t,r,n.start,n.finish),e.selectContents(a))}))}))}))};return{clearstate:i,mousedown:function(e){o.clear(t),Cm(e.target,n).each(r.set)},mouseover:function(e){a(e)},mouseup:function(e){a(e),i()}}}(Rm(e),t,n,o);return{clearstate:r.clearstate,mousedown:r.mousedown,mouseover:r.mouseover,mouseup:r.mouseup}},Lm=function(e,t,n,o){var r=Rm(e),i=function(){return o.clear(t),S.none()};return{keydown:function(e,a,s,l,c,u){var d=e.raw,f=d.which,m=!0===d.shiftKey;return uo(t,o.selectedSelector).fold((function(){return Dm(f)&&!m&&o.clearBeforeUpdate(t),Tm(f)&&m?g(xm,r,t,n,Om,l,a,o.selectRange):Em(f)&&m?g(xm,r,t,n,Sm,l,a,o.selectRange):Tm(f)?g(ym,r,n,Om,l,a,wm):Em(f)?g(ym,r,n,Sm,l,a,_m):S.none}),(function(e){var n=function(n){return function(){return G(n,(function(n){return function(e,t,n,o,r){return mo(o,e,t,r.firstSelectedSelector,r.lastSelectedSelector).map((function(e){return r.clearBeforeUpdate(n),r.selectRange(n,e.boxes,e.start,e.finish),e.boxes}))}(n.rows,n.cols,t,e,o)})).fold((function(){return fo(t,o.firstSelectedSelector,o.lastSelectedSelector).map((function(e){var n=Tm(f)||u.isForward(f)?Md.after:Md.before;return r.setRelativeSelection(Md.on(e.first,0),n(e.table)),o.clear(t),Sf(S.none(),!0)}))}),(function(e){return S.some(Sf(S.none(),!0))}))}};return Tm(f)&&m?n([Pm(1,0)]):Em(f)&&m?n([Pm(-1,0)]):u.isBackward(f)&&m?n([Pm(0,-1),Pm(-1,0)]):u.isForward(f)&&m?n([Pm(0,1),Pm(1,0)]):Dm(f)&&!m?i:S.none}))()},keyup:function(e,r,i,a,s){return uo(t,o.selectedSelector).fold((function(){var l=e.raw,c=l.which;return!0===l.shiftKey&&Dm(c)?function(e,t,n,o,r,i,a){return ke(n,r)&&o===i?S.none():Et(n,"td,th",t).bind((function(n){return Et(r,"td,th",t).bind((function(o){return Df(e,t,n,o,a)}))}))}(t,n,r,i,a,s,o.selectRange):S.none()}),S.none)}}},jm=function(e,t,n){var o=function(t){Pt(t,e.selected),Pt(t,e.firstSelected),Pt(t,e.lastSelected)},r=function(t){Dt(t,e.selected,"1")},i=function(e){a(e),n()},a=function(t){var n=wt(t,e.selectedSelector+","+e.firstSelectedSelector+","+e.lastSelectedSelector);P(n,o)};return{clearBeforeUpdate:a,clear:i,selectRange:function(n,o,a,s){i(n),P(o,r),Dt(a,e.firstSelected,"1"),Dt(s,e.lastSelected,"1"),t(o,a,s)},selectedSelector:e.selectedSelector,firstSelectedSelector:e.firstSelectedSelector,lastSelectedSelector:e.lastSelectedSelector}},zm=function(e,t,n){var o=En.fromTable(e);return Sl(o,t).map((function(e){var t=yl(o,n,!1);return{upOrLeftCells:function(e,t){var n=e.slice(0,t[t.length-1].row+1),o=_l(n);return V(o,(function(e){var n=e.cells.slice(0,t[t.length-1].column+1);return R(n,(function(e){return e.element}))}))}(t,e),downOrRightCells:function(e,t){var n=e.slice(t[0].row+t[0].rowspan-1,e.length),o=_l(n);return V(o,(function(e){var n=e.cells.slice(t[0].column+t[0].colspan-1,e.cells.length);return R(n,(function(e){return e.element}))}))}(t,e)}}))},Fm=tinymce.util.Tools.resolve("tinymce.Env"),Bm=function(e){return!1===Ra(xe.fromDom(e.target),"ephox-snooker-resizer-bar")};function Nm(e,t,n){var o=jm(Oi,(function(t,o,r){n.targets().each((function(n){an(o).each((function(i){var a=Is(e),s=di(f,xe.fromDom(e.getDoc()),a),l=zm(i,n,s);!function(e,t,n,o,r){e.fire("TableSelectionChange",{cells:t,start:n,finish:o,otherCells:r})}(e,t,o,r,l)}))}))}),(function(){return function(e){e.fire("TableSelectionClear")}(e)}));return e.on("init",(function(n){var r=e.getWin(),i=pi(e),a=vi(e),s=Im(r,i,a,o),l=Lm(r,i,a,o),c=function(e,t,n,o){var r=Rm(e);return function(e,i){o.clearBeforeUpdate(t),co(e,i,n).each((function(e){var n=e.boxes.getOr([]);o.selectRange(t,n,e.start,e.finish),r.selectContents(i),r.collapseSelection()}))}}(r,i,a,o);e.on("TableSelectorChange",(function(e){return c(e.start,e.finish)}));var u,d,m=function(t,n){(function(e){return!0===e.raw.shiftKey})(t)&&(n.kill&&t.kill(),n.selection.each((function(t){var n=Pd.relative(t.start,t.finish),o=$d(r,n);e.selection.setRng(o)})))},p=function(e){return 0===e.button},h=(u=Lu(xe.fromDom(i)),d=Lu(0),{touchEnd:function(e){var t=xe.fromDom(e.target);if("td"===Ke(t)||"th"===Ke(t)){var n=u.get(),o=d.get();ke(n,t)&&e.timeStamp-o<300&&(e.preventDefault(),c(t,t))}u.set(t),d.set(e.timeStamp)}});e.on("dragstart",(function(e){s.clearstate()})),e.on("mousedown",(function(e){p(e)&&Bm(e)&&s.mousedown(Ea(e))})),e.on("mouseover",(function(e){var t;(void 0===(t=e).buttons||Fm.browser.isEdge()&&0===t.buttons||0!=(1&t.buttons))&&Bm(e)&&s.mouseover(Ea(e))})),e.on("mouseup",(function(e){p(e)&&Bm(e)&&s.mouseup(Ea(e))})),e.on("touchend",h.touchEnd),e.on("keyup",(function(t){var n=Ea(t);if(n.raw.shiftKey&&Dm(n.raw.which)){var o=e.selection.getRng(),r=xe.fromDom(o.startContainer),i=xe.fromDom(o.endContainer);l.keyup(n,r,o.startOffset,i,o.endOffset).each((function(e){m(n,e)}))}})),e.on("keydown",(function(n){var o=Ea(n);t().each((function(e){return e.hideBars()}));var r=e.selection.getRng(),i=xe.fromDom(r.startContainer),a=xe.fromDom(r.endContainer),s=$o(Am,Mm)(xe.fromDom(e.selection.getStart()));l.keydown(o,i,r.startOffset,a,r.endOffset,s).each((function(e){m(o,e)})),t().each((function(e){return e.showBars()}))})),e.on("NodeChange",(function(){var t=e.selection,n=xe.fromDom(t.getStart()),r=xe.fromDom(t.getEnd());so(an,[n,r]).fold((function(){return o.clear(i)}),f)}))})),{clear:o.clear}}var Vm=function(e,t){var n=Lu(S.none()),o=Lu([]),r=S.none(),i=tt("caption"),a=function(e){return r.forall((function(t){return!t[e]}))},s=function(){return Ei(function(e){return xe.fromDom(e.selection.getEnd())}(e),vi(e))},l=function(){return Ei(_i(e),vi(e)).bind((function(e){return zt(an(e),s().bind(an),(function(n,o){return ke(n,o)?i(e)?S.some(function(e){return{element:e,mergable:S.none(),unmergable:S.none(),selection:[e]}}(e)):S.some(Si(t,n,e)):S.none()})).bind(p)}))},c=function(e){return an(e.element).map((function(t){var n=En.fromTable(t),o=Sl(n,e).getOr([]),r=z(o,(function(e,t){return t.isLocked&&(e.onAny=!0,0===t.column?e.onFirst=!0:t.column+t.colspan>=n.grid.columns&&(e.onLast=!0)),e}),{onAny:!1,onFirst:!1,onLast:!1});return{mergeable:Tl(n,e).isSome(),unmergeable:Dl(n,e).isSome(),locked:r}}))},u=function(){n.set(J(l)()),r=n.get().bind(c),P(o.get(),(function(e){return e()}))},d=function(e){return e(),o.set(o.get().concat([e])),function(){o.set(L(o.get(),(function(t){return t!==e})))}},f=function(e,t){return d((function(){return n.get().fold((function(){e.setDisabled(!0)}),(function(n){e.setDisabled(t(n))}))}))},m=function(e,t,o){return d((function(){return n.get().fold((function(){e.setDisabled(!0),e.setActive(!1)}),(function(n){e.setDisabled(t(n)),e.setActive(o(n))}))}))},h=function(e){return r.exists((function(t){return t.locked[e]}))},g=function(t,n){return function(o){return m(o,(function(e){return i(e.element)}),(function(){return e.queryCommandValue(t)===n}))}},v=g("mceTableRowType","header"),b=g("mceTableColType","th");return e.on("NodeChange ExecCommand TableSelectorChange",u),{onSetupTable:function(e){return f(e,(function(e){return!1}))},onSetupCellOrRow:function(e){return f(e,(function(e){return i(e.element)}))},onSetupColumn:function(e){return function(t){return f(t,(function(t){return i(t.element)||h(e)}))}},onSetupPasteable:function(e){return function(t){return f(t,(function(t){return i(t.element)||e().isNone()}))}},onSetupPasteableColumn:function(e,t){return function(n){return f(n,(function(n){return i(n.element)||e().isNone()||h(t)}))}},onSetupMergeable:function(e){return f(e,(function(e){return a("mergeable")}))},onSetupUnmergeable:function(e){return f(e,(function(e){return a("unmergeable")}))},resetTargets:u,onSetupTableWithCaption:function(t){return m(t,_,(function(t){return an(t.element,vi(e)).exists((function(e){return St(e,"caption").isSome()}))}))},onSetupTableRowHeaders:v,onSetupTableColumnHeaders:b,targets:n.get}},Hm=function(e){var t=function(e,t,n){return{get:function(){return po(e(),n).fold((function(){return t().fold(yo,wo)}),(function(e){return _o(e)}))}}}((function(){return pi(e)}),(function(){return Ti(_i(e),vi(e))}),Oi.selectedSelector),n=Vm(e,t),o=Us(e),r=Nm(e,o.lazyResize,n),i=au(e,r,o.lazyWire),a=function(){var e=zu(),t=zu();return{getRows:e.get,setRows:function(n){n.fold(e.clear,e.set),t.clear()},clearRows:e.clear,getColumns:t.get,setColumns:function(n){n.fold(t.clear,t.set),e.clear()},clearColumns:t.clear}}();return wd(e,i,0,t,a),function(e,t,n){var o=vi(e),r=function(t){return Ti(_i(e)).bind((function(e){return an(e,o).map((function(o){var r=Si(n,o,e);return t(o,r)}))})).getOr("")};Re({mceTableRowType:function(){return r(t.getTableRowType)},mceTableCellType:function(){return r(t.getTableCellType)},mceTableColType:function(){return r(t.getTableColType)}},(function(t,n){return e.addQueryValueHandler(n,t)}))}(e,i,t),Ai(e,t,i),function(e,t,n,o){var r=function(t){return function(){return e.execCommand(t)}},i=function(t){e.execCommand("mceInsertTable",!1,{rows:t.numRows,columns:t.numColumns})},a={text:"Table properties",onSetup:n.onSetupTable,onAction:r("mceTableProps")},s={text:"Delete table",icon:"table-delete-table",onSetup:n.onSetupTable,onAction:r("mceTableDelete")};e.ui.registry.addMenuItem("tableinsertrowbefore",{text:"Insert row before",icon:"table-insert-row-above",onAction:r("mceTableInsertRowBefore"),onSetup:n.onSetupCellOrRow}),e.ui.registry.addMenuItem("tableinsertrowafter",{text:"Insert row after",icon:"table-insert-row-after",onAction:r("mceTableInsertRowAfter"),onSetup:n.onSetupCellOrRow}),e.ui.registry.addMenuItem("tabledeleterow",{text:"Delete row",icon:"table-delete-row",onAction:r("mceTableDeleteRow"),onSetup:n.onSetupCellOrRow}),e.ui.registry.addMenuItem("tablerowprops",{text:"Row properties",icon:"table-row-properties",onAction:r("mceTableRowProps"),onSetup:n.onSetupCellOrRow}),e.ui.registry.addMenuItem("tablecutrow",{text:"Cut row",icon:"cut-row",onAction:r("mceTableCutRow"),onSetup:n.onSetupCellOrRow}),e.ui.registry.addMenuItem("tablecopyrow",{text:"Copy row",icon:"duplicate-row",onAction:r("mceTableCopyRow"),onSetup:n.onSetupCellOrRow}),e.ui.registry.addMenuItem("tablepasterowbefore",{text:"Paste row before",icon:"paste-row-before",onAction:r("mceTablePasteRowBefore"),onSetup:n.onSetupPasteable(o.getRows)}),e.ui.registry.addMenuItem("tablepasterowafter",{text:"Paste row after",icon:"paste-row-after",onAction:r("mceTablePasteRowAfter"),onSetup:n.onSetupPasteable(o.getRows)});var l={type:"nestedmenuitem",text:"Row",getSubmenuItems:m("tableinsertrowbefore tableinsertrowafter tabledeleterow tablerowprops | tablecutrow tablecopyrow tablepasterowbefore tablepasterowafter")};e.ui.registry.addMenuItem("tableinsertcolumnbefore",{text:"Insert column before",icon:"table-insert-column-before",onAction:r("mceTableInsertColBefore"),onSetup:n.onSetupColumn("onFirst")}),e.ui.registry.addMenuItem("tableinsertcolumnafter",{text:"Insert column after",icon:"table-insert-column-after",onAction:r("mceTableInsertColAfter"),onSetup:n.onSetupColumn("onLast")}),e.ui.registry.addMenuItem("tabledeletecolumn",{text:"Delete column",icon:"table-delete-column",onAction:r("mceTableDeleteCol"),onSetup:n.onSetupColumn("onAny")}),e.ui.registry.addMenuItem("tablecutcolumn",{text:"Cut column",icon:"cut-column",onAction:r("mceTableCutCol"),onSetup:n.onSetupColumn("onAny")}),e.ui.registry.addMenuItem("tablecopycolumn",{text:"Copy column",icon:"duplicate-column",onAction:r("mceTableCopyCol"),onSetup:n.onSetupColumn("onAny")}),e.ui.registry.addMenuItem("tablepastecolumnbefore",{text:"Paste column before",icon:"paste-column-before",onAction:r("mceTablePasteColBefore"),onSetup:n.onSetupPasteableColumn(o.getColumns,"onFirst")}),e.ui.registry.addMenuItem("tablepastecolumnafter",{text:"Paste column after",icon:"paste-column-after",onAction:r("mceTablePasteColAfter"),onSetup:n.onSetupPasteableColumn(o.getColumns,"onLast")});var c={type:"nestedmenuitem",text:"Column",getSubmenuItems:m("tableinsertcolumnbefore tableinsertcolumnafter tabledeletecolumn | tablecutcolumn tablecopycolumn tablepastecolumnbefore tablepastecolumnafter")};e.ui.registry.addMenuItem("tablecellprops",{text:"Cell properties",icon:"table-cell-properties",onAction:r("mceTableCellProps"),onSetup:n.onSetupCellOrRow}),e.ui.registry.addMenuItem("tablemergecells",{text:"Merge cells",icon:"table-merge-cells",onAction:r("mceTableMergeCells"),onSetup:n.onSetupMergeable}),e.ui.registry.addMenuItem("tablesplitcells",{text:"Split cell",icon:"table-split-cells",onAction:r("mceTableSplitCells"),onSetup:n.onSetupUnmergeable});var u={type:"nestedmenuitem",text:"Cell",getSubmenuItems:m("tablecellprops tablemergecells tablesplitcells")};!1===function(e){return e.getParam("table_grid",!0,"boolean")}(e)?e.ui.registry.addMenuItem("inserttable",{text:"Table",icon:"table",onAction:r("mceInsertTable")}):e.ui.registry.addNestedMenuItem("inserttable",{text:"Table",icon:"table",getSubmenuItems:function(){return[{type:"fancymenuitem",fancytype:"inserttable",onAction:i}]}}),e.ui.registry.addMenuItem("inserttabledialog",{text:"Insert table",icon:"table",onAction:r("mceInsertTable")}),e.ui.registry.addMenuItem("tableprops",a),e.ui.registry.addMenuItem("deletetable",s),e.ui.registry.addNestedMenuItem("row",l),e.ui.registry.addNestedMenuItem("column",c),e.ui.registry.addNestedMenuItem("cell",u),e.ui.registry.addContextMenu("table",{update:function(){return n.resetTargets(),n.targets().fold(m(""),(function(e){return"caption"===Ke(e.element)?"tableprops deletetable":"cell row column | advtablesort | tableprops deletetable"}))}});var d=$u(Ss(e));0!==d.length&&e.ui.registry.addNestedMenuItem("tableclass",{icon:"table-classes",text:"Table styles",getSubmenuItems:function(){return Vu(e,t,d,"tableclass",(function(t){return e.execCommand("mceTableToggleClass",!1,t)}))},onSetup:n.onSetupTable});var f=$u(Os(e));0!==f.length&&e.ui.registry.addNestedMenuItem("tablecellclass",{icon:"table-cell-classes",text:"Cell styles",getSubmenuItems:function(){return Vu(e,t,f,"tablecellclass",(function(t){return e.execCommand("mceTableCellToggleClass",!1,t)}))},onSetup:n.onSetupCellOrRow}),e.ui.registry.addNestedMenuItem("tablecellvalign",{icon:"vertical-align",text:"Vertical align",getSubmenuItems:function(){return Vu(e,t,Cu,"tablecellverticalalign",Hu(e,"vertical-align"))},onSetup:n.onSetupCellOrRow}),e.ui.registry.addNestedMenuItem("tablecellborderwidth",{icon:"border-width",text:"Border width",getSubmenuItems:function(){return Vu(e,t,gs(e),"tablecellborderwidth",Hu(e,"border-width"))},onSetup:n.onSetupCellOrRow}),e.ui.registry.addNestedMenuItem("tablecellborderstyle",{icon:"border-style",text:"Border style",getSubmenuItems:function(){return Vu(e,t,vs(e),"tablecellborderstyle",Hu(e,"border-style"))},onSetup:n.onSetupCellOrRow}),e.ui.registry.addToggleMenuItem("tablecaption",{icon:"table-caption",text:"Table caption",onAction:r("mceTableToggleCaption"),onSetup:n.onSetupTableWithCaption}),e.ui.registry.addNestedMenuItem("tablecellbackgroundcolor",{icon:"cell-background-color",text:"Background color",getSubmenuItems:function(){return Wu(e,Ls(e),"background-color")},onSetup:n.onSetupCellOrRow}),e.ui.registry.addNestedMenuItem("tablecellbordercolor",{icon:"cell-border-color",text:"Border color",getSubmenuItems:function(){return Wu(e,js(e),"border-color")},onSetup:n.onSetupCellOrRow}),e.ui.registry.addToggleMenuItem("tablerowheader",{text:"Row header",icon:"table-top-header",onAction:qu(e),onSetup:n.onSetupTableRowHeaders}),e.ui.registry.addToggleMenuItem("tablecolheader",{text:"Column header",icon:"table-left-header",onAction:Ku(e),onSetup:n.onSetupTableColumnHeaders})}(e,t,n,a),function(e,t,n,o){e.ui.registry.addMenuButton("table",{tooltip:"Table",icon:"table",fetch:function(e){return e("inserttable | cell row column | advtablesort | tableprops deletetable")}});var r=function(t){return function(){return e.execCommand(t)}};e.ui.registry.addButton("tableprops",{tooltip:"Table properties",onAction:r("mceTableProps"),icon:"table",onSetup:n.onSetupTable}),e.ui.registry.addButton("tabledelete",{tooltip:"Delete table",onAction:r("mceTableDelete"),icon:"table-delete-table",onSetup:n.onSetupTable}),e.ui.registry.addButton("tablecellprops",{tooltip:"Cell properties",onAction:r("mceTableCellProps"),icon:"table-cell-properties",onSetup:n.onSetupCellOrRow}),e.ui.registry.addButton("tablemergecells",{tooltip:"Merge cells",onAction:r("mceTableMergeCells"),icon:"table-merge-cells",onSetup:n.onSetupMergeable}),e.ui.registry.addButton("tablesplitcells",{tooltip:"Split cell",onAction:r("mceTableSplitCells"),icon:"table-split-cells",onSetup:n.onSetupUnmergeable}),e.ui.registry.addButton("tableinsertrowbefore",{tooltip:"Insert row before",onAction:r("mceTableInsertRowBefore"),icon:"table-insert-row-above",onSetup:n.onSetupCellOrRow}),e.ui.registry.addButton("tableinsertrowafter",{tooltip:"Insert row after",onAction:r("mceTableInsertRowAfter"),icon:"table-insert-row-after",onSetup:n.onSetupCellOrRow}),e.ui.registry.addButton("tabledeleterow",{tooltip:"Delete row",onAction:r("mceTableDeleteRow"),icon:"table-delete-row",onSetup:n.onSetupCellOrRow}),e.ui.registry.addButton("tablerowprops",{tooltip:"Row properties",onAction:r("mceTableRowProps"),icon:"table-row-properties",onSetup:n.onSetupCellOrRow}),e.ui.registry.addButton("tableinsertcolbefore",{tooltip:"Insert column before",onAction:r("mceTableInsertColBefore"),icon:"table-insert-column-before",onSetup:n.onSetupColumn("onFirst")}),e.ui.registry.addButton("tableinsertcolafter",{tooltip:"Insert column after",onAction:r("mceTableInsertColAfter"),icon:"table-insert-column-after",onSetup:n.onSetupColumn("onLast")}),e.ui.registry.addButton("tabledeletecol",{tooltip:"Delete column",onAction:r("mceTableDeleteCol"),icon:"table-delete-column",onSetup:n.onSetupColumn("onAny")}),e.ui.registry.addButton("tablecutrow",{tooltip:"Cut row",icon:"cut-row",onAction:r("mceTableCutRow"),onSetup:n.onSetupCellOrRow}),e.ui.registry.addButton("tablecopyrow",{tooltip:"Copy row",icon:"duplicate-row",onAction:r("mceTableCopyRow"),onSetup:n.onSetupCellOrRow}),e.ui.registry.addButton("tablepasterowbefore",{tooltip:"Paste row before",icon:"paste-row-before",onAction:r("mceTablePasteRowBefore"),onSetup:n.onSetupPasteable(o.getRows)}),e.ui.registry.addButton("tablepasterowafter",{tooltip:"Paste row after",icon:"paste-row-after",onAction:r("mceTablePasteRowAfter"),onSetup:n.onSetupPasteable(o.getRows)}),e.ui.registry.addButton("tablecutcol",{tooltip:"Cut column",icon:"cut-column",onAction:r("mceTableCutCol"),onSetup:n.onSetupColumn("onAny")}),e.ui.registry.addButton("tablecopycol",{tooltip:"Copy column",icon:"duplicate-column",onAction:r("mceTableCopyCol"),onSetup:n.onSetupColumn("onAny")}),e.ui.registry.addButton("tablepastecolbefore",{tooltip:"Paste column before",icon:"paste-column-before",onAction:r("mceTablePasteColBefore"),onSetup:n.onSetupPasteableColumn(o.getColumns,"onFirst")}),e.ui.registry.addButton("tablepastecolafter",{tooltip:"Paste column after",icon:"paste-column-after",onAction:r("mceTablePasteColAfter"),onSetup:n.onSetupPasteableColumn(o.getColumns,"onLast")}),e.ui.registry.addButton("tableinsertdialog",{tooltip:"Insert table",onAction:r("mceInsertTable"),icon:"table"});var i=$u(Ss(e));0!==i.length&&e.ui.registry.addMenuButton("tableclass",{icon:"table-classes",tooltip:"Table styles",fetch:Uu(e,t,i,"tableclass",(function(t){return e.execCommand("mceTableToggleClass",!1,t)})),onSetup:n.onSetupTable});var a=$u(Os(e));0!==a.length&&e.ui.registry.addMenuButton("tablecellclass",{icon:"table-cell-classes",tooltip:"Cell styles",fetch:Uu(e,t,a,"tablecellclass",(function(t){return e.execCommand("mceTableCellToggleClass",!1,t)})),onSetup:n.onSetupCellOrRow}),e.ui.registry.addMenuButton("tablecellvalign",{icon:"vertical-align",tooltip:"Vertical align",fetch:Uu(e,t,Cu,"tablecellverticalalign",Hu(e,"vertical-align")),onSetup:n.onSetupCellOrRow}),e.ui.registry.addMenuButton("tablecellborderwidth",{icon:"border-width",tooltip:"Border width",fetch:Uu(e,t,gs(e),"tablecellborderwidth",Hu(e,"border-width")),onSetup:n.onSetupCellOrRow}),e.ui.registry.addMenuButton("tablecellborderstyle",{icon:"border-style",tooltip:"Border style",fetch:Uu(e,t,vs(e),"tablecellborderstyle",Hu(e,"border-style")),onSetup:n.onSetupCellOrRow}),e.ui.registry.addToggleButton("tablecaption",{tooltip:"Table caption",onAction:r("mceTableToggleCaption"),icon:"table-caption",onSetup:n.onSetupTableWithCaption}),e.ui.registry.addMenuButton("tablecellbackgroundcolor",{icon:"cell-background-color",tooltip:"Background color",fetch:function(t){return t(Wu(e,Ls(e),"background-color"))},onSetup:n.onSetupCellOrRow}),e.ui.registry.addMenuButton("tablecellbordercolor",{icon:"cell-border-color",tooltip:"Border color",fetch:function(t){return t(Wu(e,js(e),"border-color"))},onSetup:n.onSetupCellOrRow}),e.ui.registry.addToggleButton("tablerowheader",{tooltip:"Row header",icon:"table-top-header",onAction:qu(e),onSetup:n.onSetupTableRowHeaders}),e.ui.registry.addToggleButton("tablecolheader",{tooltip:"Column header",icon:"table-left-header",onAction:Ku(e),onSetup:n.onSetupTableColumnHeaders})}(e,t,n,a),function(e){var t=function(e){return e.getParam("table_toolbar","tableprops tabledelete | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol")}(e);t.length>0&&e.ui.registry.addContextToolbar("table",{predicate:function(t){return e.dom.is(t,"table")&&e.getBody().contains(t)},items:t,scope:"node",position:"node"})}(e),e.on("PreInit",(function(){e.serializer.addTempAttr(Oi.firstSelected),e.serializer.addTempAttr(Oi.lastSelected),function(e){e.formatter.register(Od)}(e)})),function(e){return e.getParam("table_tab_navigation",!0,"boolean")}(e)&&e.on("keydown",(function(t){!function(e,t,n){if(e.keyCode===_f.TAB){var o=pi(t),r=function(e){var t=Ke(e);return ke(e,o)||D(Of,t)},i=t.selection.getRng(),a=xe.fromDom(e.shiftKey?i.startContainer:i.endContainer);nn(a,r).each((function(o){e.preventDefault(),an(o,r).each(n.clear),t.selection.collapse(e.shiftKey),(e.shiftKey?xf:wf)(t,r,o).each((function(e){t.selection.setRng(e)}))}))}}(t,e,r)})),e.on("remove",(function(){o.destroy()})),function(e,t,n,o){return{insertTable:hu(e),setClipboardRows:pu(t.setRows),getClipboardRows:mu(t.getRows),setClipboardCols:pu(t.setColumns),getClipboardCols:mu(t.getColumns),resizeHandler:n,selectionTargets:o}}(e,a,o,n)};xo.add("table",Hm)}()},"96cf":function(e,t){!function(t){"use strict";var n=Object.prototype,o=n.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag",l="object"==typeof e,c=t.regeneratorRuntime;if(c)l&&(e.exports=c);else{(c=t.regeneratorRuntime=l?e.exports:{}).wrap=h;var u={},d={};d[i]=function(){return this};var f=Object.getPrototypeOf,m=f&&f(f(k([])));m&&m!==n&&o.call(m,i)&&(d=m);var p=y.prototype=v.prototype=Object.create(d);b.prototype=p.constructor=y,y.constructor=b,y[s]=b.displayName="GeneratorFunction",c.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},c.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s in e||(e[s]="GeneratorFunction")),e.prototype=Object.create(p),e},c.awrap=function(e){return{__await:e}},_(w.prototype),w.prototype[a]=function(){return this},c.AsyncIterator=w,c.async=function(e,t,n,o){var r=new w(h(e,t,n,o));return c.isGeneratorFunction(t)?r:r.next().then((function(e){return e.done?e.value:r.next()}))},_(p),p[s]="Generator",p[i]=function(){return this},p.toString=function(){return"[object Generator]"},c.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var o=t.pop();if(o in e)return n.value=o,n.done=!1,n}return n.done=!0,n}},c.values=k,S.prototype={constructor:S,reset:function(e){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),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,o){return a.type="throw",a.arg=e,t.next=n,o&&(t.method="next",t.arg=void 0),!!o}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=o.call(i,"catchLoc"),l=o.call(i,"finallyLoc");if(s&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,u):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var r=o.arg;O(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:k(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}}}function h(e,t,n,o){var r=t&&t.prototype instanceof v?t:v,i=Object.create(r.prototype),a=new S(o||[]);return i._invoke=function(e,t,n){var o="suspendedStart";return function(r,i){if("executing"===o)throw new Error("Generator is already running");if("completed"===o){if("throw"===r)throw i;return E()}for(n.method=r,n.arg=i;;){var a=n.delegate;if(a){var s=x(a,n);if(s){if(s===u)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===o)throw o="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o="executing";var l=g(e,t,n);if("normal"===l.type){if(o=n.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o="completed",n.method="throw",n.arg=l.arg)}}}(e,n,a),i}function g(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function v(){}function b(){}function y(){}function _(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function w(e){var t;this._invoke=function(n,r){function i(){return new Promise((function(t,i){!function t(n,r,i,a){var s=g(e[n],e,r);if("throw"!==s.type){var l=s.arg,c=l.value;return c&&"object"==typeof c&&o.call(c,"__await")?Promise.resolve(c.__await).then((function(e){t("next",e,i,a)}),(function(e){t("throw",e,i,a)})):Promise.resolve(c).then((function(e){l.value=e,i(l)}),a)}a(s.arg)}(n,r,t,i)}))}return t=t?t.then(i,i):i()}}function x(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var o=g(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,u;var r=o.arg;return r?r.done?(t[e.resultName]=r.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):r:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function k(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(o.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:E}}function E(){return{value:void 0,done:!0}}}(function(){return this}()||Function("return this")())},9861:function(e,t,n){n("5352")},"98fc":function(e,t,n){var o,r,i;!function(n,a){"use strict";r=[],void 0===(i="function"==typeof(o=function(e){return function(t){(t=t||{}).arrayAccessForm=t.arrayAccessForm||"none",t.emptyNodeForm=t.emptyNodeForm||"text",t.jsAttributeFilter=t.jsAttributeFilter,t.jsAttributeConverter=t.jsAttributeConverter,t.attributeConverters=t.attributeConverters||[],t.datetimeAccessFormPaths=t.datetimeAccessFormPaths||[],t.arrayAccessFormPaths=t.arrayAccessFormPaths||[],t.xmldomOptions=t.xmldomOptions||{},void 0===t.enableToStringFunc&&(t.enableToStringFunc=!0),void 0===t.skipEmptyTextNodesForObj&&(t.skipEmptyTextNodesForObj=!0),void 0===t.stripWhitespaces&&(t.stripWhitespaces=!0),void 0===t.useDoubleQuotes&&(t.useDoubleQuotes=!0),void 0===t.ignoreRoot&&(t.ignoreRoot=!1),void 0===t.escapeMode&&(t.escapeMode=!0),void 0===t.attributePrefix&&(t.attributePrefix="_"),void 0===t.selfClosingElements&&(t.selfClosingElements=!0),void 0===t.keepCData&&(t.keepCData=!1),void 0===t.keepText&&(t.keepText=!1),void 0===t.jsDateUTC&&(t.jsDateUTC=!1),function(){function e(e){var t=String(e);return 1===t.length&&(t="0"+t),t}"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|^\n+|(\s|\n)+$/g,"")}),"function"!=typeof Date.prototype.toISOString&&(Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+e(this.getUTCMonth()+1)+"-"+e(this.getUTCDate())+"T"+e(this.getUTCHours())+":"+e(this.getUTCMinutes())+":"+e(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"})}();var n=1,o=3,r=4,i=8,a=9;function s(e){var t=e.localName;return null==t&&(t=e.baseName),null!=t&&""!==t||(t=e.nodeName),t}function l(e){return"string"==typeof e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;"):e}function c(e,n,o){switch(t.arrayAccessForm){case"property":e[n]instanceof Array?e[n+"_asArray"]=e[n]:e[n+"_asArray"]=[e[n]]}if(!(e[n]instanceof Array)&&t.arrayAccessFormPaths.length>0){for(var r=!1,i=0;i<t.arrayAccessFormPaths.length;i++){var a=t.arrayAccessFormPaths[i];if("string"==typeof a){if(a===o){r=!0;break}}else if(a instanceof RegExp){if(a.test(o)){r=!0;break}}else if("function"==typeof a&&a(n,o)){r=!0;break}}r&&(e[n]=[e[n]])}}function u(e){var t=e.split(/[-T:+Z]/g),n=new Date(t[0],t[1]-1,t[2]),o=t[5].split(".");if(n.setHours(t[3],t[4],o[0]),o.length>1&&n.setMilliseconds(o[1]),t[6]&&t[7]){var r=60*t[6]+Number(t[7]);r=0+("-"===(/\d\d-\d\d:\d\d$/.test(e)?"-":"+")?-1*r:r),n.setMinutes(n.getMinutes()-r-n.getTimezoneOffset())}else-1!==e.indexOf("Z",e.length-1)&&(n=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())));return n}function d(e,n){for(var o={__cnt:0},r=e.childNodes,a=0;a<r.length;a++){var l=r.item(a),d=s(l);l.nodeType!==i&&(o.__cnt++,null==o[d]?(o[d]=f(l,n+"."+d),c(o,d,n+"."+d)):(o[d]instanceof Array||(o[d]=[o[d]],c(o,d,n+"."+d)),o[d][o[d].length]=f(l,n+"."+d)))}for(var m=0;m<e.attributes.length;m++){var p=e.attributes.item(m);o.__cnt++;for(var h=p.value,g=0;g<t.attributeConverters.length;g++){var v=t.attributeConverters[g];v.test.call(null,p.name,p.value)&&(h=v.convert.call(null,p.name,p.value))}o[t.attributePrefix+p.name]=h}var b=e.prefix;return b&&(o.__cnt++,o.__prefix=b),o["#text"]&&(o.__text=o["#text"],o.__text instanceof Array&&(o.__text=o.__text.join("\n")),t.escapeMode&&(o.__text=o.__text.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#x27;/g,"'").replace(/&amp;/g,"&")),t.stripWhitespaces&&(o.__text=o.__text.trim()),delete o["#text"],"property"===t.arrayAccessForm&&delete o["#text_asArray"],o.__text=function(e,n,o){if(t.datetimeAccessFormPaths.length>0)for(var r=o.split(".#")[0],i=0;i<t.datetimeAccessFormPaths.length;i++){var a=t.datetimeAccessFormPaths[i];if("string"==typeof a){if(a===r)return u(e)}else if(a instanceof RegExp){if(a.test(r))return u(e)}else if("function"==typeof a&&a(r))return u(e)}return e}(o.__text,0,n+".#text")),o.hasOwnProperty("#cdata-section")&&(o.__cdata=o["#cdata-section"],delete o["#cdata-section"],"property"===t.arrayAccessForm&&delete o["#cdata-section_asArray"]),1===o.__cnt&&o.__text&&!t.keepText?o=o.__text:0===o.__cnt&&"text"===t.emptyNodeForm?o="":o.__cnt>1&&void 0!==o.__text&&t.skipEmptyTextNodesForObj&&(t.stripWhitespaces&&""===o.__text||""===o.__text.trim())&&delete o.__text,delete o.__cnt,t.keepCData||o.hasOwnProperty("__text")||!o.hasOwnProperty("__cdata")||1!==Object.keys(o).length?(t.enableToStringFunc&&(o.__text||o.__cdata)&&(o.toString=function(){return(this.__text?this.__text:"")+(this.__cdata?this.__cdata:"")}),o):o.__cdata?o.__cdata:""}function f(e,i){return e.nodeType===a?function(e){for(var o={},r=e.childNodes,i=0;i<r.length;i++){var a=r.item(i);if(a.nodeType===n){var l=s(a);t.ignoreRoot?o=f(a,l):o[l]=f(a,l)}}return o}(e):e.nodeType===n?d(e,i):e.nodeType===o||e.nodeType===r?e.nodeValue:null}function m(e,n,o,r){var i="<"+(e&&e.__prefix?e.__prefix+":":"")+n;if(o)for(var a=0;a<o.length;a++){var s=o[a],c=e[s];t.escapeMode&&(c=l(c)),i+=" "+s.substr(t.attributePrefix.length)+"=",t.useDoubleQuotes?i+='"'+c+'"':i+="'"+c+"'"}return i+=r?" />":">"}function p(e,t){return"</"+(e&&e.__prefix?e.__prefix+":":"")+t+">"}function h(e,n){return"property"===t.arrayAccessForm&&(o=n.toString(),r="_asArray",-1!==o.indexOf(r,o.length-r.length))||0===n.toString().indexOf(t.attributePrefix)||0===n.toString().indexOf("__")||e[n]instanceof Function;var o,r}function g(e){var t=0;if(e instanceof Object)for(var n in e)h(e,n)||t++;return t}function v(e){var n=[];if(e instanceof Object)for(var o in e)-1===o.toString().indexOf("__")&&0===o.toString().indexOf(t.attributePrefix)&&n.push(o);return n}function b(e){var n="";return e instanceof Object?n+=function(e){var n="";return e.__cdata&&(n+="<![CDATA["+e.__cdata+"]]>"),(e.__text||"number"==typeof e.__text||"boolean"==typeof e.__text)&&(t.escapeMode?n+=l(e.__text):n+=e.__text),n}(e):null!==e&&(t.escapeMode?n+=l(e):n+=e),n}function y(e,n,o){var r="";if(t.jsAttributeFilter&&t.jsAttributeFilter.call(null,n,e))return r;if(t.jsAttributeConverter&&(e=t.jsAttributeConverter.call(null,n,e)),null!=e&&""!==e||!t.selfClosingElements)if("object"==typeof e)if("[object Array]"===Object.prototype.toString.call(e))r+=function(e,t,n){var o="";if(0===e.length)o+=m(e,t,n,!0);else for(var r=0;r<e.length;r++)o+=y(e[r],t,v(e[r]));return o}(e,n,o);else if(e instanceof Date)r+=m(e,n,o,!1),r+=t.jsDateUTC?e.toUTCString():e.toISOString(),r+=p(e,n);else{g(e)>0||"number"==typeof e.__text||"boolean"==typeof e.__text||e.__text||e.__cdata?(r+=m(e,n,o,!1),r+=_(e),r+=p(e,n)):t.selfClosingElements?r+=m(e,n,o,!0):(r+=m(e,n,o,!1),r+=p(e,n))}else r+=m(e,n,o,!1),r+=b(e),r+=p(e,n);else r+=m(e,n,o,!0);return r}function _(e){var t="";if(g(e)>0)for(var n in e)if(!h(e,n)){var o=e[n];t+=y(o,n,v(o))}return t+=b(e)}function w(n){if(void 0===n)return null;if("string"!=typeof n)return null;var o=null,r=null;if(e)r=(o=new e(t.xmldomOptions)).parseFromString(n,"text/xml");else if(window&&window.DOMParser){o=new window.DOMParser;var i=null;if(!(window.ActiveXObject||"ActiveXObject"in window)&&document.all&&!document.addEventListener)try{i=o.parseFromString("INVALID","text/xml").childNodes[0].namespaceURI}catch(e){i=null}try{r=o.parseFromString(n,"text/xml"),null!==i&&r.getElementsByTagNameNS(i,"parsererror").length>0&&(r=null)}catch(e){r=null}}else 0===n.indexOf("<?")&&(n=n.substr(n.indexOf("?>")+2)),(r=new ActiveXObject("Microsoft.XMLDOM")).async="false",r.loadXML(n);return r}this.asArray=function(e){return null==e?[]:e instanceof Array?e:[e]},this.toXmlDateTime=function(e){return e instanceof Date?e.toISOString():"number"==typeof e?new Date(e).toISOString():null},this.asDateTime=function(e){return"string"==typeof e?u(e):e},this.xml2dom=function(e){return w(e)},this.dom2js=function(e){return f(e,null)},this.js2dom=function(e){return w(this.js2xml(e))},this.xml2js=function(e){var t=w(e);return null!=t?this.dom2js(t):null},this.js2xml=function(e){return _(e)},this.getVersion=function(){return"3.4.0"}}})?o.apply(t,r):o)||(e.exports=i)}()},"99af":function(e,t,n){"use strict";var o=n("23e7"),r=n("da84"),i=n("d039"),a=n("e8b5"),s=n("861d"),l=n("7b0b"),c=n("07fa"),u=n("8418"),d=n("65f0"),f=n("1dde"),m=n("b622"),p=n("2d00"),h=m("isConcatSpreadable"),g=r.TypeError,v=p>=51||!i((function(){var e=[];return e[h]=!1,e.concat()[0]!==e})),b=f("concat"),y=function(e){if(!s(e))return!1;var t=e[h];return void 0!==t?!!t:a(e)};o({target:"Array",proto:!0,arity:1,forced:!v||!b},{concat:function(e){var t,n,o,r,i,a=l(this),s=d(a,0),f=0;for(t=-1,o=arguments.length;t<o;t++)if(y(i=-1===t?a:arguments[t])){if(f+(r=c(i))>9007199254740991)throw g("Maximum allowed index exceeded");for(n=0;n<r;n++,f++)n in i&&u(s,f,i[n])}else{if(f>=9007199254740991)throw g("Maximum allowed index exceeded");u(s,f++,i)}return s.length=f,s}})},"9a01":function(e,t,n){"use strict";var o=n("5530"),r=n("1da1"),i=n("2909"),a=(n("96cf"),n("498a"),n("c740"),n("a434"),n("99af"),n("d81d"),n("b0c0"),n("d9e2"),n("4de4"),n("d3b7"),{name:"MemberOrgTreeItem",props:{isActive:{default:!1,type:Boolean},data:{default:{}},isSelected:{default:!1,type:Boolean},showAppend:{default:!0,type:Boolean},canSelect:{default:!0,type:Boolean}},computed:{isDisabled(){return this.data.isDisabled||!this.canSelect}},model:{value:"isSelected",event:"change"},methods:{handleSwitch(e){"user"!==this.data.type&&this.$emit("click",this.data,e)},handleClick(e){this.$emit(e?"select":"unselect",this.data)}}}),s=n("2877"),l=Object(s.a)(a,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("li",{staticClass:"member-org-detail-item",class:{"is-active":e.isActive},attrs:{title:e.data.name}},[n("el-checkbox",{staticClass:"member-org-manage-check",attrs:{disabled:e.isDisabled,value:e.isSelected},on:{change:e.handleClick}}),n("div",{staticClass:"member-org-detail-item-wrapper item-org",on:{click:e.handleSwitch}},[n("div",{staticClass:"member-org-detail-icon"},["region"===e.data.type||"root"===e.data.type?n("base-icon",{attrs:{"icon-class":"government-line"}}):e._e(),"organ"===e.data.type?n("base-icon",{attrs:{"icon-class":"organization-chart"}}):e._e(),"user"===e.data.type?n("base-icon",{attrs:{"icon-class":"user-3-line"}}):e._e(),"role"===e.data.type?n("base-icon",{attrs:{"icon-class":"shield-user-line"}}):e._e()],1),n("span",{staticClass:"member-org-detail-title"},[e._v(" "+e._s(e.data.name)+" "),"user"===e.data.type&&e.data.account?n("small",[e._v(e._s(e.data.account))]):n("small",[e._v(e._s(e.data.code))])]),n("div",{staticClass:"member-org-spacing"}),e.showAppend?n("span",{staticClass:"member-org-detail-append"},[n("base-icon",{attrs:{"icon-class":"arrow-right-s-line"}})],1):e._e()])],1)}),[],!1,null,null,null).exports,c=n("7694"),u=n("60bb"),d=n.n(u),f={name:"OrganizationSelector",components:{MemberOrgTreeItem:l},computed:{total:function(){return this.data.length},searchTotal:function(){return this.searchData.length},_elFormItemSize:function(){return(this.elFormItem||{}).elFormItemSize},componentSize:function(){return this.size||this._elFormItemSize||(this.$ELEMENT||{}).size},collapseTagSize:function(){return["small","mini"].indexOf(this.componentSize)>-1?"mini":"small"}},model:{prop:"selected",event:"change"},inject:{elForm:{default:""},elFormItem:{default:""}},props:{getOrgTree:{type:Function,default:c.j},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},parentCode:{type:String,default:"000000000000"},platform:{type:String,default:"pc"},text:{type:String,default:"选择"},customStyle:{type:Object,default:function(){return{}}},placeholder:{type:String,default:""},parentName:{type:String,default:"全国"},selected:{default:function(){return[]}},optionScopeType:{type:String,default:"ORGAN"},dialogTitle:{type:String,default:"选择组织机构"}},mounted:function(){null===this.selected&&(this.selected=[]),this.$emit("change",this.selected),this.selected.length&&this.$refs.nodeTree&&this.$refs.nodeTree.setCheckedKeys(Object(i.a)(d.a.cloneDeep(this.selected))),this.debounce=d.a.debounce(this.onSearch,50)},watch:{keyword:function(e){e.trim()?(this.isSearching=!0,this.debounce&&this.debounce()):this.isSearching=!1}},data:function(){return{data:[],isSearchLoading:!1,isSearching:!1,keyword:"",searchData:[],visible:!1,stack:[],currentDept:{},dataLoading:!0,debounce:!1}},methods:{onDialogClose:function(){this.data=[],this.isSearchLoading=!1,this.isSearching=!1,this.keyword="",this.searchData=[],this.visible=!1,this.stack=[],this.currentDept={},this.dataLoading=!1},onSearch:function(){var e=this;return Object(r.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.searchData=[],"PERSON"!==e.optionScopeType){t.next=7;break}return t.next=4,e.searchUser();case 4:e.searchData=t.sent,t.next=7;break;case 7:case"end":return t.stop()}}),t)})))()},onCheckedTreeNodeChange:function(e,t){if(t)this.multiple||(this.$refs.nodeTree.setCheckedKeys([e.code]),this.selected.pop()),this.selected.push(e);else{var n=this.selected.findIndex((function(t){return t.code===e.code}));n>-1&&this.selected.splice(n,1)}},loadTreeNode:function(e,t){var n=this;return Object(r.a)(regeneratorRuntime.mark((function o(){var r,a;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(0!==e.level){o.next=5;break}return r={code:n.parentCode,name:n.parentName,label:n.parentName,type:"root",children:[],disabled:"ORGAN"!==n.optionScopeType},o.abrupt("return",t([r]));case 5:return a=[],o.t0=[],o.t1=Object(i.a)(a),o.t2=i.a,o.next=11,n.getOrgByParentCode(e.data.code);case 11:if(o.t3=o.sent,o.t4=(0,o.t2)(o.t3),a=o.t0.concat.call(o.t0,o.t1,o.t4),!(["root","organ","region"].indexOf(e.data.type)>-1&&"PERSON"===n.optionScopeType)){o.next=23;break}return o.t5=[],o.t6=Object(i.a)(a),o.t7=i.a,o.next=20,n.getUserListByParentNode(e.data);case 20:o.t8=o.sent,o.t9=(0,o.t7)(o.t8),a=o.t5.concat.call(o.t5,o.t6,o.t9);case 23:return o.abrupt("return",t(a));case 24:case"end":return o.stop()}}),o)})))()},searchUser:function(){var e=this;return Object(r.a)(regeneratorRuntime.mark((function t(){var n,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.keyword&&!(e.keyword.length<1)){t.next=2;break}return t.abrupt("return");case 2:return e.isSearchLoading=!0,n=[],t.prev=4,t.next=7,Object(c.o)({condition:{name:e.keyword},limit:1e3,page:1});case 7:1===(r=t.sent).data.code&&(n=(n=r.data.data.data).map((function(e){return Object(o.a)(Object(o.a)({},e),{},{name:e.name,label:e.name,code:e.id,type:"user",isLeaf:!0})}))),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(4),e.$message.error(t.t0.message);case 14:return t.prev=14,e.isSearchLoading=!1,t.finish(14);case 17:return t.abrupt("return",n);case 18:case"end":return t.stop()}}),t,null,[[4,11,14,17]])})))()},getUserListByParentNode:function(e){var t=this;return Object(r.a)(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,Object(c.l)({condition:{regionCode:e.regionCode||e.code,orgCode:e.code},limit:"1000",page:"1"});case 3:return r=n.sent,n.abrupt("return",r.data.data.data.length?r.data.data.data.map((function(e){return Object(o.a)(Object(o.a)({},e),{},{name:e.name,label:e.name,code:e.id,type:"user",isLeaf:!0,disabled:"PERSON"!==t.optionScopeType})})):[]);case 7:return n.prev=7,n.t0=n.catch(0),t.$message.error(n.t0),n.abrupt("return",[]);case 11:case"end":return n.stop()}}),n,null,[[0,7]])})))()},getOrgByParentCode:function(e){var t=this;return Object(r.a)(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,Object(c.j)({code:e});case 3:if(1===(r=n.sent).data.code){n.next=6;break}throw new Error(r.data.message||"根据父级部门ID加载子集部门节点失败");case 6:return n.abrupt("return",r.data.data.length?r.data.data.map((function(e){return Object(o.a)(Object(o.a)({},e),{},{name:e.name,label:e.name,code:e.code,type:e.type,disabled:"ORGAN"!==t.optionScopeType})})):[]);case 9:return n.prev=9,n.t0=n.catch(0),t.$message.error(n.t0),n.abrupt("return",[]);case 13:case"end":return n.stop()}}),n,null,[[0,9]])})))()},handleSelect:function(){this.disabled||this.readonly||(this.visible=!0)},handleConfirm:function(){this.$emit("change",this.selected),this.onDialogClose()},handleCancel:function(){this.visible=!1},handleCloseTag:function(e){var t=this.selected.findIndex((function(t){return t.code===e.code}));t>-1&&this.selected.splice(t,1)},handleSelectItem:function(e){this.multiple||this.selected.pop(),this.selected.push(e)},handleUnSelectItem:function(e){var t=this.selected.findIndex((function(t){return t.code===e.code}));if(t>-1&&this.selected.splice(t,1),this.$refs.nodeTree){var n=this.$refs.nodeTree.getCheckedKeys();n=n.filter((function(t){return t!==e.code})),this.$refs.nodeTree.setCheckedKeys(n)}},handleClick:function(e){this.isSearching=!1,this.stack.push(e)}}},m=Object(s.a)(f,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"organization-selector el-select",class:[e.componentSize?"el-select--"+e.componentSize:""]},[e.visible?n("el-dialog",{class:"mobile"===e.platform?"organization-selector-mobile":"organization-selector-pc",attrs:{"close-on-click-modal":!1,"close-on-press-escape":!1,disabled:e.disabled,title:e.dialogTitle,visible:e.visible,"append-to-body":"","custom-class":"organization-selector-dialog",placement:"bottom-start",width:"800px"},on:{"update:visible":function(t){e.visible=t},close:e.onDialogClose}},[n("div",{staticClass:"tree-select-section-left"},[n("div",{staticClass:"member-org-detail-list-container"},["PERSON"===e.optionScopeType?n("div",{staticClass:"member-org-detail-title-bar"},[n("el-input",{attrs:{clearable:"",maxLength:"20",placeholder:"请输入关键词","prefix-icon":"el-icon-search",size:"small"},model:{value:e.keyword,callback:function(t){e.keyword=t},expression:"keyword"}})],1):e._e(),e.isSearching?n("div",{directives:[{name:"loading",rawName:"v-loading",value:e.isSearchLoading,expression:"isSearchLoading"}],staticClass:"b-scroll"},[e.searchTotal?n("div",{staticClass:"member-org-detail-list-item-container"},e._l(e.searchData,(function(t){return n("member-org-tree-item",{key:t.code,attrs:{data:t,"is-selected":e.selected.some((function(e){return e.code===t.code})),"show-append":!1},on:{select:e.handleSelectItem,unselect:e.handleUnSelectItem}})})),1):n("el-empty")],1):n("div",{staticClass:"b-scroll"},[n("div",{staticClass:"member-org-detail-list-item-container"},[n("el-tree",{ref:"nodeTree",staticClass:"organization-tree",attrs:{"default-checked-keys":e.selected.map((function(e){return e.code})),indent:8,load:e.loadTreeNode,props:{label:"name",children:"children",isLeaf:"isLeaf"},"check-strictly":"",lazy:"","node-key":"code","show-checkbox":""},on:{"check-change":e.onCheckedTreeNodeChange},scopedSlots:e._u([{key:"default",fn:function(t){t.node;var o=t.data;return n("div",{staticClass:"custom-tree-node",attrs:{title:o.name+" : "+(o.type&&"user"===o.type?o.account:o.code)}},[n("div",{staticClass:"custom-tree-node-icon"},["region"===o.type||"root"===o.type?n("base-icon",{attrs:{"icon-class":"government-line"}}):e._e(),"organ"===o.type?n("base-icon",{attrs:{"icon-class":"organization-chart"}}):e._e(),"user"===o.type?n("base-icon",{attrs:{"icon-class":"user-3-line"}}):e._e(),"role"===o.type?n("base-icon",{attrs:{"icon-class":"shield-user-line"}}):e._e()],1),n("div",{staticClass:"custom-tree-node-name"},[e._v(" "+e._s(o.name)+" "),n("small",[e._v(e._s(o.type&&"user"===o.type?o.account:o.code))])])])}}],null,!1,3974469761)})],1)])])]),n("div",{staticClass:"tree-select-section-right"},[e.selected.length?n("div",{staticClass:"b-scroll"},[n("div",{staticClass:"member-org-detail-list-item-container"},e._l(e.selected,(function(t){return n("member-org-tree-item",{key:t.code,attrs:{data:t,"is-selected":!0,"show-append":!1},on:{unselect:e.handleUnSelectItem}})})),1)]):n("el-empty")],1),n("div",{staticClass:"tree-select-section-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{attrs:{disabled:!e.selected.length,type:"primary"},on:{click:e.handleConfirm}},[e._v("确定")])],1)]):e._e(),n("div",{staticClass:"organization-selector-container",class:{"is-disabled":e.disabled},style:e.customStyle,on:{click:e.handleSelect}},[n("div",{staticClass:"organization-selector-wrapper el-select__tags"},[e.selected&&e.selected.length?n("span",{staticClass:"select-tag"},[n("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:e.selected[0].name,disabled:e.selected[0].name.length<11,placement:"top"}},[n("el-tag",{attrs:{closable:!e.disabled,size:e.collapseTagSize,type:"info"},on:{close:function(t){return e.handleCloseTag(e.selected[0])}}},["region"===e.selected[0].type?n("base-icon",{attrs:{"icon-class":"government-line"}}):e._e(),"organ"===e.selected[0].type?n("base-icon",{attrs:{"icon-class":"organization-chart"}}):e._e(),"user"===e.selected[0].type?n("base-icon",{attrs:{"icon-class":"user-3-line"}}):e._e(),"role"===e.selected[0].type?n("base-icon",{attrs:{"icon-class":"shield-user-line"}}):e._e(),n("span",{staticClass:"tag-name"},[e._v(e._s(""+(e.selected[0].name.length>11?e.selected[0].name.substr(0,11)+"...":e.selected[0].name)))])],1)],1),e.selected.length>1?n("el-tag",{attrs:{closable:!1,size:e.collapseTagSize,"disable-transitions":"",type:"info"}},[n("span",{staticClass:"el-select__tags-text"},[e._v("+ "+e._s(e.selected.length-1))])]):e._e()],1):e._e()]),n("el-input",{ref:"reference",class:{"is-focus":e.visible},attrs:{disabled:e.disabled,placeholder:e.selected&&e.selected.length?"":e.placeholder,readonly:"mobile"===e.platform||e.readonly,size:e.componentSize,"validate-event":!1,type:"text"}},[n("template",{slot:"prefix"},["ORGAN"===e.optionScopeType?n("base-icon",{attrs:{"icon-class":"organization-chart"}}):e._e(),"PERSON"===e.optionScopeType?n("base-icon",{attrs:{"icon-class":"user-3-line"}}):e._e(),"ROLE"===e.optionScopeType?n("base-icon",{attrs:{"icon-class":"shield-user-line"}}):e._e()],1)],2)],1)],1)}),[],!1,null,null,null);t.a=m.exports},"9a1f":function(e,t,n){var o=n("da84"),r=n("c65b"),i=n("59ed"),a=n("825a"),s=n("0d51"),l=n("35a1"),c=o.TypeError;e.exports=function(e,t){var n=arguments.length<2?l(e):t;if(i(n))return a(r(n,e));throw c(s(e)+" is not iterable")}},"9b1d":function(e,t,n){},"9bdd":function(e,t,n){var o=n("825a"),r=n("2a62");e.exports=function(e,t,n,i){try{return i?t(o(n)[0],n[1]):t(n)}catch(t){r(e,"throw",t)}}},"9bf2":function(e,t,n){var o=n("da84"),r=n("83ab"),i=n("0cfb"),a=n("aed9"),s=n("825a"),l=n("a04b"),c=o.TypeError,u=Object.defineProperty,d=Object.getOwnPropertyDescriptor;t.f=r?a?function(e,t,n){if(s(e),t=l(t),s(n),"function"==typeof e&&"prototype"===t&&"value"in n&&"writable"in n&&!n.writable){var o=d(e,t);o&&o.writable&&(e[t]=n.value,n={configurable:"configurable"in n?n.configurable:o.configurable,enumerable:"enumerable"in n?n.enumerable:o.enumerable,writable:!1})}return u(e,t,n)}:u:function(e,t,n){if(s(e),t=l(t),s(n),i)try{return u(e,t,n)}catch(e){}if("get"in n||"set"in n)throw c("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},"9d55":function(e,t,n){},"9dd9":function(e,t,n){(function(e){!function(){"use strict";var t,n,o,r=function(e){var t=e;return{get:function(){return t},set:function(e){t=e}}},i=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=tinymce.util.Tools.resolve("tinymce.util.Tools"),s=(t="array",function(e){return o=typeof(n=e),(null===n?"null":"object"===o&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"===o&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":o)===t;var n,o}),l=function(e){return!function(e){return null==e}(e)},c=function(e){return function(t){return typeof t===e}}("function"),u=function(){},d=function(e){return function(){return e}},f=function(e){return e},m=d(!1),p=d(!0),h=function(){return g},g={fold:function(e,t){return e()},isSome:m,isNone:p,getOr:o=f,getOrThunk:n=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:d(null),getOrUndefined:d(void 0),or:o,orThunk:n,map:h,each:u,bind:h,exists:m,forall:p,filter:function(){return h()},toArray:function(){return[]},toString:d("none()")},v=function(e){var t=d(e),n=function(){return r},o=function(t){return t(e)},r={fold:function(t,n){return n(e)},isSome:p,isNone:m,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:n,orThunk:n,map:function(t){return v(t(e))},each:function(t){t(e)},bind:o,exists:o,forall:o,filter:function(t){return t(e)?r:g},toArray:function(){return[e]},toString:function(){return"some("+e+")"}};return r},b={some:v,none:h,from:function(e){return null==e?g:v(e)}},y={},_={exports:y};!function(t,n,o,r){!function(e,r){"object"==typeof n&&void 0!==o?o.exports=r():"function"==typeof t&&t.amd?t(r):(e="undefined"!=typeof globalThis?globalThis:e||self).EphoxContactWrapper=r()}(this,(function(){var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},n={exports:{}};!function(e){!function(t){var n=setTimeout;function o(){}function r(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],u(e,this)}function i(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,r._immediateFn((function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var o;try{o=n(e._value)}catch(e){return void s(t.promise,e)}a(t.promise,o)}else(1===e._state?a:s)(t.promise,e._value)}))):e._deferreds.push(t)}function a(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if(t instanceof r)return e._state=3,e._value=t,void l(e);if("function"==typeof n)return void u((o=n,i=t,function(){o.apply(i,arguments)}),e)}e._state=1,e._value=t,l(e)}catch(t){s(e,t)}var o,i}function s(e,t){e._state=2,e._value=t,l(e)}function l(e){2===e._state&&0===e._deferreds.length&&r._immediateFn((function(){e._handled||r._unhandledRejectionFn(e._value)}));for(var t=0,n=e._deferreds.length;t<n;t++)i(e,e._deferreds[t]);e._deferreds=null}function c(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function u(e,t){var n=!1;try{e((function(e){n||(n=!0,a(t,e))}),(function(e){n||(n=!0,s(t,e))}))}catch(e){if(n)return;n=!0,s(t,e)}}r.prototype.catch=function(e){return this.then(null,e)},r.prototype.then=function(e,t){var n=new this.constructor(o);return i(this,new c(e,t,n)),n},r.all=function(e){var t=Array.prototype.slice.call(e);return new r((function(e,n){if(0===t.length)return e([]);var o=t.length;function r(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(e){r(i,e)}),n)}t[i]=a,0==--o&&e(t)}catch(e){n(e)}}for(var i=0;i<t.length;i++)r(i,t[i])}))},r.resolve=function(e){return e&&"object"==typeof e&&e.constructor===r?e:new r((function(t){t(e)}))},r.reject=function(e){return new r((function(t,n){n(e)}))},r.race=function(e){return new r((function(t,n){for(var o=0,r=e.length;o<r;o++)e[o].then(t,n)}))},r._immediateFn="function"==typeof setImmediate?function(e){setImmediate(e)}:function(e){n(e,0)},r._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console},r._setImmediateFn=function(e){r._immediateFn=e},r._setUnhandledRejectionFn=function(e){r._unhandledRejectionFn=e},e.exports?e.exports=r:t.Promise||(t.Promise=r)}(t)}(n);var o=n.exports;return{boltExport:("undefined"!=typeof window?window:Function("return this;")()).Promise||o}}))}(void 0,y,_);var w=_.exports.boltExport,x=function(e,t){return S(document.createElement("canvas"),e,t)},C=function(e){var t=x(e.width,e.height);return O(t).drawImage(e,0,0),t},O=function(e){return e.getContext("2d")},S=function(e,t,n){return e.width=t,e.height=n,e},k=function(e){return new w((function(t,n){var o=URL.createObjectURL(e),r=new Image,i=function(){r.removeEventListener("load",a),r.removeEventListener("error",s)},a=function(){i(),t(r)},s=function(){i(),n("Unable to load data of type "+e.type+": "+o)};r.addEventListener("load",a),r.addEventListener("error",s),r.src=o,r.complete&&setTimeout(a,0)}))},E=function(e){return new w((function(t,n){var o=new XMLHttpRequest;o.open("GET",e,!0),o.responseType="blob",o.onload=function(){200===this.status&&t(this.response)},o.onerror=function(){var e,t=this;n(0===this.status?((e=new Error("No access to download image")).code=18,e.name="SecurityError",e):new Error("Error "+t.status+" downloading image"))},o.send()}))},T=function(e){return new w((function(t,n){(function(e){var t=e.split(","),n=/data:([^;]+)/.exec(t[0]);if(!n)return b.none();for(var o=n[1],r=t[1],i=atob(r),a=i.length,s=Math.ceil(a/1024),l=new Array(s),c=0;c<s;++c){for(var u=1024*c,d=Math.min(u+1024,a),f=new Array(d-u),m=u,p=0;m<d;++p,++m)f[p]=i[m].charCodeAt(0);l[c]=new Uint8Array(f)}return b.some(new Blob(l,{type:o}))})(e).fold((function(){n("uri is not base64: "+e)}),t)}))},D=function(e,t,n){return t=t||"image/png",c(HTMLCanvasElement.prototype.toBlob)?new w((function(o,r){e.toBlob((function(e){e?o(e):r()}),t,n)})):T(e.toDataURL(t,n))},A=function(e){URL.revokeObjectURL(e.src)},M=function(e){return function(e){var t=e.src;return 0===t.indexOf("data:")?T(t):E(t)}(e)},R=Array.prototype.indexOf,P=function(e,t){return n=e,o=t,R.call(n,o)>-1;var n,o},I=function(e,t){for(var n=0,o=e.length;n<o;n++){t(e[n],n)}},L=function(e,t){return function(e,t,n){for(var o=0,r=e.length;o<r;o++){var i=e[o];if(t(i,o))return b.some(i);if(n(i,o))break}return b.none()}(e,t,m)},j=function(e,t){for(var n=0,o=e.length;n<o;++n){if(!0!==t(e[n],n))return!1}return!0},z=Object.keys;(function(e){if(!s(e))throw new Error("cases must be an array");if(0===e.length)throw new Error("there must be at least one case");var t=[],n={};I(e,(function(o,r){var i=z(o);if(1!==i.length)throw new Error("one and only one name per case");var a=i[0],l=o[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(!s(l))throw new Error("case arguments must be an array");t.push(a),n[a]=function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var i=n.length;if(i!==l.length)throw new Error("Wrong number of arguments to case "+a+". Expected "+l.length+" ("+l+"), got "+i);var s=function(e){var o=z(e);if(t.length!==o.length)throw new Error("Wrong number of arguments to match. Expected: "+t.join(",")+"\nActual: "+o.join(","));if(!j(t,(function(e){return P(o,e)})))throw new Error("Not all branches were specified when using match. Specified: "+o.join(", ")+"\nRequired: "+t.join(", "));return e[a].apply(null,n)};return{fold:function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];if(t.length!==e.length)throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+t.length);var i=t[r];return i.apply(null,n)},match:s,log:function(e){}}}}))})([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);var F=function(e,t,n){var o=t.type,r=d(o),i=d(n),a=function(t,n){return e.then((function(e){return function(e,t,n){return t=t||"image/png",e.toDataURL(t,n)}(e,t,n)}))};return{getType:r,toBlob:function(){return w.resolve(t)},toDataURL:i,toBase64:function(){return n.split(",")[1]},toAdjustedBlob:function(t,n){return e.then((function(e){return D(e,t,n)}))},toAdjustedDataURL:a,toAdjustedBase64:function(e,t){return a(e,t).then((function(e){return e.split(",")[1]}))},toCanvas:function(){return e.then(C)}}},B=function(e){return function(e){return new w((function(t){var n=new FileReader;n.onloadend=function(){t(n.result)},n.readAsDataURL(e)}))}(e).then((function(t){return F(function(e){return k(e).then((function(e){A(e);var t=x(function(e){return e.naturalWidth||e.width}(e),function(e){return e.naturalHeight||e.height}(e));return O(t).drawImage(e,0,0),t}))}(e),e,t)}))},N=function(e,t){return D(e,t).then((function(t){return F(w.resolve(e),t,e.toDataURL())}))},V=function(e,t){void 0===t&&(t=2);var n=Math.pow(10,t),o=Math.round(e*n);return Math.ceil(o/n)},H=function(e,t,n){var o=(n<0?360+n:n)*Math.PI/180,r=e.width,i=e.height,a=Math.sin(o),s=Math.cos(o),l=V(Math.abs(r*s)+Math.abs(i*a)),c=V(Math.abs(r*a)+Math.abs(i*s)),u=x(l,c),d=O(u);return d.translate(l/2,c/2),d.rotate(o),d.drawImage(e,-r/2,-i/2),N(u,t)},$=function(e,t,n){var o=x(e.width,e.height),r=O(o);return"v"===n?(r.scale(1,-1),r.drawImage(e,0,-o.height)):(r.scale(-1,1),r.drawImage(e,-o.width,0)),N(o,t)},U=function(e,t){return function(e,t){return e.toCanvas().then((function(n){return $(n,e.getType(),t)}))}(e,t)},W=function(e,t){return function(e,t){return e.toCanvas().then((function(n){return H(n,e.getType(),t)}))}(e,t)},q=function(e,t,n){return void 0===n&&(n=!1),new w((function(o){var r=new XMLHttpRequest;r.onreadystatechange=function(){4===r.readyState&&o({status:r.status,blob:r.response})},r.open("GET",e,!0),r.withCredentials=n,function(e,t){for(var n=z(e),o=0,r=n.length;o<r;o++){var i=n[o];t(e[i],i)}}(t,(function(e,t){r.setRequestHeader(t,e)})),r.responseType="blob",r.send()}))},K=[{code:404,message:"Could not find Image Proxy"},{code:403,message:"Rejected request"},{code:0,message:"Incorrect Image Proxy URL"}],G=[{type:"not_found",message:"Failed to load image."},{type:"key_missing",message:"The request did not include an api key."},{type:"key_not_found",message:"The provided api key could not be found."},{type:"domain_not_trusted",message:"The api key is not valid for the request origins."}],Y=function(e,t){var n,o,r=(n=function(e,t){return l(e)?e[t]:void 0},o=e,I(t,(function(e,t){o=n(o,e,t)})),o);return b.from(r)},X=function(e){var t=function(e){return"ImageProxy HTTP error: "+L(K,(function(t){return e===t.code})).fold(d("Unknown ImageProxy error"),(function(e){return e.message}))}(e);return w.reject(t)},J=function(e){return L(G,(function(t){return t.type===e})).fold(d("Unknown service error"),(function(e){return e.message}))},Q=function(e){return"ImageProxy Service error: "+function(e){try{return b.some(JSON.parse(e))}catch(e){return b.none()}}(e).bind((function(e){return Y(e,["error","type"]).map(J)})).getOr("Invalid JSON in service error message")},Z=function(e){return function(e){return new w((function(t,n){var o=new FileReader;o.onload=function(){t(o.result)},o.onerror=function(e){n(e)},o.readAsText(e)}))}(e).then((function(e){var t=Q(e);return w.reject(t)}))},ee=function(e){return e<200||e>=300},te=function(e,t){var n={"Content-Type":"application/json;charset=UTF-8","tiny-api-key":t};return q(function(e,t){var n=-1===e.indexOf("?")?"?":"&";return/[?&]apiKey=/.test(e)?e:e+n+"apiKey="+encodeURIComponent(t)}(e,t),n).then((function(e){return ee(e.status)?(t=e.status,n=e.blob,function(e,t){return"application/json"===(null==t?void 0:t.type)&&(400===e||403===e||404===e||500===e)}(t,n)?Z(n):X(t)):w.resolve(e.blob);var t,n}))},ne=function(e,t,n){return void 0===n&&(n=!1),t?te(e,t):function(e,t){return q(e,{},t).then((function(e){return ee(e.status)?X(e.status):w.resolve(e.blob)}))}(e,n)},oe=function(e){return B(e)},re=function(e){if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},ie={fromHtml:function(e,t){var n=(t||document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||n.childNodes.length>1)throw new Error("HTML must have a single root node");return re(n.childNodes[0])},fromTag:function(e,t){var n=(t||document).createElement(e);return re(n)},fromText:function(e,t){var n=(t||document).createTextNode(e);return re(n)},fromDom:re,fromPoint:function(e,t,n){return b.from(e.dom.elementFromPoint(t,n)).map(re)}};"undefined"!=typeof window?window:Function("return this;")();var ae=function(e,t){return function(e,t){return L(e.dom.childNodes,(function(e){return t(ie.fromDom(e))})).map(ie.fromDom)}(e,(function(e){return function(e,t){var n=e.dom;if(1!==n.nodeType)return!1;var o=n;if(void 0!==o.matches)return o.matches(t);if(void 0!==o.msMatchesSelector)return o.msMatchesSelector(t);if(void 0!==o.webkitMatchesSelector)return o.webkitMatchesSelector(t);if(void 0!==o.mozMatchesSelector)return o.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}(e,t)}))},se=tinymce.util.Tools.resolve("tinymce.util.Delay"),le=tinymce.util.Tools.resolve("tinymce.util.Promise"),ce=tinymce.util.Tools.resolve("tinymce.util.URI"),ue=function(e){return e.getParam("imagetools_toolbar","rotateleft rotateright flipv fliph editimage imageoptions")},de=function(e){return e.getParam("imagetools_proxy")},fe=function(e){var t,n,o=function(e){return/^[0-9\.]+px$/.test(e)};return t=e.style.width,n=e.style.height,t||n?o(t)&&o(n)?{w:parseInt(t,10),h:parseInt(n,10)}:null:(t=e.width,n=e.height,t&&n?{w:parseInt(t,10),h:parseInt(n,10)}:null)},me=function(e){return{w:e.naturalWidth,h:e.naturalHeight}},pe=0,he=function(e){return ae(ie.fromDom(e),"img")},ge=function(e,t){return e.dom.is(t,"figure")},ve=function(e,t){return e.dom.is(t,"img:not([data-mce-object],[data-mce-placeholder])")},be=function(e,t){var n=function(t){return ve(e,t)&&(xe(e,t)||Ce(e,t)||l(de(e)))};return ge(e,t)?he(t).bind((function(e){return n(e.dom)?b.some(e.dom):b.none()})):n(t)?b.some(t):b.none()},ye=function(e,t){e.notificationManager.open({text:t,type:"error"})},_e=function(e){var t=e.selection.getNode(),n=e.dom.getParent(t,"figure.image");return null!==n&&ge(e,n)?he(n):ve(e,t)?b.some(ie.fromDom(t)):b.none()},we=function(e,t,n){var o=t.match(/(?:\/|^)(([^\/\?]+)\.(?:[a-z0-9.]+))(?:\?|$)/i);return l(o)?e.dom.encode(o[n]):null},xe=function(e,t){var n=t.src;return 0===n.indexOf("data:")||0===n.indexOf("blob:")||new ce(n).host===e.documentBaseURI.host},Ce=function(e,t){return-1!==a.inArray(function(e){return e.getParam("imagetools_cors_hosts",[],"string[]")}(e),new ce(t.src).host)},Oe=function(e,t){if(Ce(e,t))return ne(t.src,null,function(e,t){return-1!==a.inArray(function(e){return e.getParam("imagetools_credentials_hosts",[],"string[]")}(e),new ce(t.src).host)}(e,t));if(!xe(e,t)){var n=de(e),o=n+(-1===n.indexOf("?")?"?":"&")+"url="+encodeURIComponent(t.src),r=function(e){return e.getParam("api_key",e.getParam("imagetools_api_key","","string"),"string")}(e);return ne(o,r,!1)}return M(t)},Se=function(e,t){return function(e){return b.from(e.getParam("imagetools_fetch_image",null,"function"))}(e).fold((function(){return Oe(e,t)}),(function(e){return e(t)}))},ke=function(e,t){var n=e.editorUpload.blobCache.getByUri(t.src);return n?le.resolve(n.blob()):Se(e,t)},Ee=function(e){se.clearTimeout(e.get())},Te=function(e,t,n,o,r,i,a){return n.toBlob().then((function(s){var c,u,d,f,m=e.editorUpload.blobCache;c=i.src;var p=t.type===s.type;return function(e){return e.getParam("images_reuse_filename",!1,"boolean")}(e)&&(f=m.getByUri(c),l(f)?(c=f.uri(),u=f.name(),d=f.filename()):(u=we(e,c,2),d=we(e,c,1))),f=m.create({id:"imagetools"+pe++,blob:s,base64:n.toBase64(),uri:c,name:u,filename:p?d:void 0}),m.add(f),e.undoManager.transact((function(){var t=function(){e.$(i).off("load",t),e.nodeChanged(),o?e.editorUpload.uploadImagesAuto():(Ee(r),function(e,t){var n=se.setEditorTimeout(e,(function(){e.editorUpload.uploadImagesAuto()}),function(e){return e.getParam("images_upload_timeout",3e4,"number")}(e));t.set(n)}(e,r))};e.$(i).on("load",t),a&&e.$(i).attr({width:a.w,height:a.h}),e.$(i).attr({src:f.blobUri()}).removeAttr("data-mce-src")})),f}))},De=function(e,t,n,o){return function(){return _e(e).fold((function(){ye(e,"Could not find selected image")}),(function(r){return e._scanForImages().then((function(){return ke(e,r.dom)})).then((function(i){return oe(i).then(n).then((function(n){return Te(e,i,n,!1,t,r.dom,o)}))})).catch((function(t){ye(e,t)}))}))}},Ae=function(e,t,n){return function(){var o=_e(e).map((function(e){var t=fe(e.dom);return t?{w:t.h,h:t.w}:null})).getOrNull();return De(e,t,(function(e){return W(e,n)}),o)()}},Me=function(e,t,n){return function(){return De(e,t,(function(e){return U(e,n)}))()}},Re=function(e,t,n,o,r){return function(e){return k(e)}(r).then((function(e){var t=me(e);return o.w===t.w&&o.h===t.h||fe(n)&&function(e,t){var n,o;t&&(n=e.style.width,o=e.style.height,(n||o)&&(e.style.width=t.w+"px",e.style.height=t.h+"px",e.removeAttribute("data-mce-style")),n=e.width,o=e.height,(n||o)&&(e.setAttribute("width",String(t.w)),e.setAttribute("height",String(t.h))))}(n,t),URL.revokeObjectURL(e.src),r})).then(oe).then((function(o){return Te(e,r,o,!0,t,n)}))},Pe=function(e,t){return function(){var n=_e(e),o=n.map((function(e){return me(e.dom)}));n.each((function(r){be(e,r.dom).each((function(i){ke(e,r.dom).then((function(r){var i=function(e){return{blob:e,url:URL.createObjectURL(e)}}(r);e.windowManager.open({title:"Edit Image",size:"large",body:{type:"panel",items:[{type:"imagetools",name:"imagetools",label:"Edit Image",currentState:i}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0,disabled:!0}],onSubmit:function(r){var i=r.getData().imagetools.blob;n.each((function(n){o.each((function(o){Re(e,t,n.dom,o,i)}))})),r.close()},onCancel:u,onAction:function(e,t){switch(t.name){case"save-state":t.value?e.enable("save"):e.disable("save");break;case"disable":e.disable("save"),e.disable("cancel");break;case"enable":e.enable("cancel")}}})}))}))}))}};i.add("imagetools",(function(e){var t=r(0),n=r(null);!function(e,t){a.each({mceImageRotateLeft:Ae(e,t,-90),mceImageRotateRight:Ae(e,t,90),mceImageFlipVertical:Me(e,t,"v"),mceImageFlipHorizontal:Me(e,t,"h"),mceEditImage:Pe(e,t)},(function(t,n){e.addCommand(n,t)}))}(e,t),function(e){var t=[],n=function(t){return function(){return e.execCommand(t)}},o=function(){return _e(e).exists((function(t){return be(e,t.dom).isSome()}))},r=function(e){var n=function(t){return e.setDisabled(!t)};return n(o()),t=t.concat([n]),function(){t=function(e,t){for(var n=[],o=0,r=e.length;o<r;o++){var i=e[o];t(i,o)&&n.push(i)}return n}(t,(function(e){return e!==n}))}};e.on("NodeChange",(function(){var e=o();I(t,(function(t){return t(e)}))})),e.ui.registry.addButton("rotateleft",{tooltip:"Rotate counterclockwise",icon:"rotate-left",onAction:n("mceImageRotateLeft"),onSetup:r}),e.ui.registry.addButton("rotateright",{tooltip:"Rotate clockwise",icon:"rotate-right",onAction:n("mceImageRotateRight"),onSetup:r}),e.ui.registry.addButton("flipv",{tooltip:"Flip vertically",icon:"flip-vertically",onAction:n("mceImageFlipVertical"),onSetup:r}),e.ui.registry.addButton("fliph",{tooltip:"Flip horizontally",icon:"flip-horizontally",onAction:n("mceImageFlipHorizontal"),onSetup:r}),e.ui.registry.addButton("editimage",{tooltip:"Edit image",icon:"edit-image",onAction:n("mceEditImage"),onSetup:r}),e.ui.registry.addButton("imageoptions",{tooltip:"Image options",icon:"image",onAction:n("mceImage")}),e.ui.registry.addContextMenu("imagetools",{update:function(t){return be(e,t).map((function(e){return{text:"Edit image",icon:"edit-image",onAction:n("mceEditImage")}})).toArray()}})}(e),function(e){e.ui.registry.addContextToolbar("imagetools",{items:ue(e),predicate:function(t){return be(e,t).isSome()},position:"node",scope:"node"})}(e),function(e,t,n){e.on("NodeChange",(function(o){var r=n.get(),i=be(e,o.element);r&&!i.exists((function(e){return r.src===e.src}))&&(Ee(t),e.editorUpload.uploadImagesAuto(),n.set(null)),i.each(n.set)}))}(e,t,n)}))}()}).call(this,n("c8ba"))},"9ed3":function(e,t,n){"use strict";var o=n("ae93").IteratorPrototype,r=n("7c73"),i=n("5c6c"),a=n("d44e"),s=n("3f8c"),l=function(){return this};e.exports=function(e,t,n,c){var u=t+" Iterator";return e.prototype=r(o,{next:i(+!c,n)}),a(e,u,!1,!0),s[u]=l,e}},"9ee4":function(e,t,n){"use strict";n("ffaa")},"9f7f":function(e,t,n){var o=n("d039"),r=n("da84").RegExp,i=o((function(){var e=r("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),a=i||o((function(){return!r("a","y").sticky})),s=i||o((function(){var e=r("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));e.exports={BROKEN_CARET:s,MISSED_STICKY:a,UNSUPPORTED_Y:i}},"9ffa":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ITF14=t.ITF=void 0;var o=i(n("3c7c")),r=i(n("07df"));function i(e){return e&&e.__esModule?e:{default:e}}t.ITF=o.default,t.ITF14=r.default},a023:function(e,t,n){},a04b:function(e,t,n){var o=n("c04e"),r=n("d9b5");e.exports=function(e){var t=o(e,"string");return r(t)?t:t+""}},a0a4:function(e,t,n){"use strict";n("1209")},a15b:function(e,t,n){"use strict";var o=n("23e7"),r=n("e330"),i=n("44ad"),a=n("fc6a"),s=n("a640"),l=r([].join),c=i!=Object,u=s("join",",");o({target:"Array",proto:!0,forced:c||!u},{join:function(e){return l(a(this),void 0===e?",":e)}})},a16a:function(e,t,n){"use strict";var o=n("1da1"),r=(n("96cf"),n("c740"),n("99af"),n("b64b"),n("d3b7"),n("159b"),n("4de4"),n("d81d"),n("7db0"),n("25f0"),n("b0c0"),n("e2e6")),i=n("eb5f"),a=n("7694");t.a={data:function(){return{columnList:[]}},methods:{fillingColumns:function(e){var t=this;if(e.selectedItem){var n=e.selectedItem.widgetModel,o=this.widgetForm.list.findIndex((function(e){return e.model===n&&"relatedForm"===e.type}));n&&o>=0&&(this.$set(this.widgetForm.list[o].options.selectedMap,"label",e.selectedItem.label),this.$set(this.widgetForm.list[o].options.selectedMap,"value",e.selectedItem.value)),e.selectedItem.type&&"input"===e.selectedItem.type||(this.$set(this.models,n,e.selectedItem.value||""),this.$set(this.models,"".concat(n,"_").concat(r.a),e.selectedItem.label||""))}e.fillingRules&&e.fillingRules.length&&(e.value&&Object.keys(e.value).length?e.fillingRules.forEach((function(n){t.$set(t.models,n.toColumnName,e.value[n.fromColumnName])})):e.fillingRules.forEach((function(e){var n=t.widgetForm.list.map((function(t){if(t.model===e.toColumnName)return t.options.defaultValue})).filter((function(e){return null!=e}));n.length&&t.$set(t.models,e.toColumnName,n[0])})))},getOptionLabel:function(e,t){var n=this.columnList.find((function(e){return e.columnName===t})),o=null===e[t]||void 0===e[t]?"":e[t].toString();return"date"===n.widgetType&&(o=Object(i.f)(e[t],n.rawOptions)),"address"===n.widgetType&&(o="".concat(e[t].province||"").concat(e[t].city||"").concat(e[t].district||"").concat(e[t].details||"")),"organization"===n.widgetType&&(o="",e[t]&&Array.isArray(e[t])&&e[t].length&&e[t].forEach((function(n,r){o+="".concat(n.name).concat(r!==e[t].length-1?" > ":"")}))),"member"===n.widgetType&&(o="",e[t]&&Array.isArray(e[t])&&e[t].length&&e[t].forEach((function(n,r){o+="".concat(n.name).concat(r!==e[t].length-1?",":"")}))),o},getColumnList:function(e){var t=this;return Object(o.a)(regeneratorRuntime.mark((function n(){var o;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t.loading=!0,n.prev=1,n.next=4,Object(a.e)({formId:e});case 4:"0000"!==(o=n.sent).data.code?t.$message.error(o.data.message||"获取表单数据列表失败"):t.columnList=o.data.data,n.next=12;break;case 8:n.prev=8,n.t0=n.catch(1),t.$message.error(n.t0);case 12:return n.prev=12,t.loading=!1,n.finish(12);case 15:case"end":return n.stop()}}),n,null,[[1,8,12,15]])})))()}}}},a2b0:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=[];return function e(n){if(Array.isArray(n))for(var o=0;o<n.length;o++)e(n[o]);else n.text=n.text||"",n.data=n.data||"",t.push(n)}(e),t}},a3ea:function(e,t,n){"use strict";n("d24a")},a434:function(e,t,n){"use strict";var o=n("23e7"),r=n("da84"),i=n("23cb"),a=n("5926"),s=n("07fa"),l=n("7b0b"),c=n("65f0"),u=n("8418"),d=n("1dde")("splice"),f=r.TypeError,m=Math.max,p=Math.min;o({target:"Array",proto:!0,forced:!d},{splice:function(e,t){var n,o,r,d,h,g,v=l(this),b=s(v),y=i(e,b),_=arguments.length;if(0===_?n=o=0:1===_?(n=0,o=b-y):(n=_-2,o=p(m(a(t),0),b-y)),b+n-o>9007199254740991)throw f("Maximum allowed length exceeded");for(r=c(v,o),d=0;d<o;d++)(h=y+d)in v&&u(r,d,v[h]);if(r.length=o,n<o){for(d=y;d<b-o;d++)g=d+n,(h=d+o)in v?v[g]=v[h]:delete v[g];for(d=b;d>b-o+n;d--)delete v[d-1]}else if(n>o)for(d=b-o;d>y;d--)g=d+n-1,(h=d+o-1)in v?v[g]=v[h]:delete v[g];for(d=0;d<n;d++)v[d+y]=arguments[d+2];return v.length=b-o+n,r}})},a4b4:function(e,t,n){var o=n("342f");e.exports=/web0s(?!.*chrome)/i.test(o)},a4d3:function(e,t,n){n("d9f5"),n("b4f8"),n("c513"),n("e9c4"),n("5a47")},a5d2:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n("c243"),i=a(n("5726"));function a(e){return e&&e.__esModule?e:{default:e}}var s=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{2}$/)}},{key:"encode",value:function(){var e=r.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,i.default)(this.data,e,"01"),text:this.text}}}]),t}(a(n("e762")).default);t.default=s},a630:function(e,t,n){var o=n("23e7"),r=n("4df4");o({target:"Array",stat:!0,forced:!n("1c7e")((function(e){Array.from(e)}))},{from:r})},a640:function(e,t,n){"use strict";var o=n("d039");e.exports=function(e,t){var n=[][e];return!!n&&o((function(){n.call(null,t||function(){return 1},1)}))}},a7d7:function(e,t,n){},a87c:function(e,t,n){"use strict";n("a96f")},a91f:function(e,t,n){},a92d:function(e,t,n){},a96f:function(e,t,n){},a9e3:function(e,t,n){"use strict";var o=n("83ab"),r=n("da84"),i=n("e330"),a=n("94ca"),s=n("cb2d"),l=n("1a2d"),c=n("7156"),u=n("3a9b"),d=n("d9b5"),f=n("c04e"),m=n("d039"),p=n("241c").f,h=n("06cf").f,g=n("9bf2").f,v=n("408a"),b=n("58a8").trim,y=r.Number,_=y.prototype,w=r.TypeError,x=i("".slice),C=i("".charCodeAt),O=function(e){var t=f(e,"number");return"bigint"==typeof t?t:S(t)},S=function(e){var t,n,o,r,i,a,s,l,c=f(e,"number");if(d(c))throw w("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=b(c),43===(t=C(c,0))||45===t){if(88===(n=C(c,2))||120===n)return NaN}else if(48===t){switch(C(c,1)){case 66:case 98:o=2,r=49;break;case 79:case 111:o=8,r=55;break;default:return+c}for(a=(i=x(c,2)).length,s=0;s<a;s++)if((l=C(i,s))<48||l>r)return NaN;return parseInt(i,o)}return+c};if(a("Number",!y(" 0o1")||!y("0b1")||y("+0x1"))){for(var k,E=function(e){var t=arguments.length<1?0:y(O(e)),n=this;return u(_,n)&&m((function(){v(n)}))?c(Object(t),n,E):t},T=o?p(y):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),D=0;T.length>D;D++)l(y,k=T[D])&&!l(E,k)&&g(E,k,h(y,k));E.prototype=_,_.constructor=E,s(r,"Number",E,{constructor:!0})}},aa47:function(e,t,n){"use strict";
19
19
  /**!
20
20
  * Sortable 1.10.2
21
21
  * @author RubaXa <trash@rubaxa.org>