13 lines
150 KiB
JavaScript
13 lines
150 KiB
JavaScript
/*!
|
||
* tui-editor
|
||
* @version 1.3.3
|
||
* @author NHN Ent. FE Development Lab <dl_javascript@nhnent.com> (https://nhnent.github.io/tui.editor/)
|
||
* @license MIT
|
||
*/
|
||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("jquery"),require("tui-code-snippet"),require("to-mark"),require("tui-chart"),require("markdown-it"),require("highlight.js"),require("tui-color-picker"),require("plantuml-encoder")):"function"==typeof define&&define.amd?define(["jquery","tui-code-snippet","to-mark","tui-chart","markdown-it","highlight.js","tui-color-picker","plantuml-encoder"],t):"object"==typeof exports?exports.Editor=t(require("jquery"),require("tui-code-snippet"),require("to-mark"),require("tui-chart"),require("markdown-it"),require("highlight.js"),require("tui-color-picker"),require("plantuml-encoder")):(e.tui=e.tui||{},e.tui.Editor=t(e.$,e.tui&&e.tui.util,e.toMark,e.tui&&e.tui.chart,e.markdownit,e.hljs,e.tui&&e.tui.colorPicker,e.plantumlEncoder))}("undefined"!=typeof self?self:this,function(e,t,n,r,o,a,i,l){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="dist/",t(t.s=27)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=void 0;try{r=n(!function(){var e=new Error('Cannot find module "../editor"');throw e.code="MODULE_NOT_FOUND",e}())}catch(e){}if(!r)try{r=n(16)}catch(e){}t.default=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){var r=(0,w.default)(e),o=r.attr("colspan"),a=r.attr("rowspan"),i=e.nodeName;if("TH"!==i&&"TD"!==i)return null;var l={nodeName:e.nodeName,colspan:o?parseInt(o,10):1,rowspan:a?parseInt(a,10):1,content:r.html(),elementIndex:{rowIndex:t,colIndex:n}};return"TH"===e.nodeName&&e.align&&(l.align=e.align),l}function a(e,t,n,r){var o=t.colspan,a=t.rowspan,i=t.nodeName,l=o>1,u=a>1;if(l||u){var s=n+a,c=r+o;E.default.range(n,s).forEach(function(t){e[t]=e[t]||[],E.default.range(r,c).forEach(function(o){var a={nodeName:i};t===n&&o===r||(l&&(a.colMergeWith=r),u&&(a.rowMergeWith=n),e[t][o]=a)})})}}function i(e){var t=[];return e.find("tr").each(function(e,n){var r=0;t[e]=t[e]||[],(0,w.default)(n).children().each(function(n,i){var l=o(i,e,n);if(l){for(var u=n+r;t[e][u];)u+=1,r+=1;t[e][u]=l,a(t,l,e,u)}})}),e[0].className&&(t.className=e[0].className),t}function l(e){var t=[];return e.forEach(function(e,n){var r=[];e.forEach(function(e,t){E.default.isUndefined(e.colMergeWith)&&E.default.isUndefined(e.rowMergeWith)&&r.push({rowIndex:n,colIndex:t})}),t.push(r)}),t}function u(e){var t=e[0];return t.map(function(e){return E.default.isExisty(e.colMergeWith)?t[e.colMergeWith].align:e.align})}function s(e,t){var n=u(e),r=t.map(function(t){return t.map(function(t){var r=t.rowIndex,o=t.colIndex;return E.default.extend({align:n[o]},e[r][o])})});return e.className&&(r.className=e.className),r}function c(e,t,n){return{nodeName:n||"TD",colspan:1,rowspan:1,content:k,elementIndex:{rowIndex:e,colIndex:t}}}function f(e){var t=e.closest("tr"),n=t.prevAll().length;return"TBODY"===t.parent()[0].nodeName&&(n+=1),n}function d(e){return e.closest("td, th").prevAll().length}function h(e,t){var n=f(t),r=d(t);return e[n][r]}function p(e,t,n){var r=e[t][n],o=t;return r.rowspan>1&&(o+=r.rowspan-1),o}function g(e,t,n){var r=e[t][n],o=n;return r.colspan>1&&(o+=r.colspan-1),o}function v(e,t,n){var r=e[t][n];return t=E.default.isExisty(r.rowMergeWith)?r.rowMergeWith:t,n=E.default.isExisty(r.colMergeWith)?r.colMergeWith:n,e[t][n].elementIndex}function m(e,t){e.forEach(function(e,n){var r=e.length;if(r){var o=e[0].nodeName;E.default.range(r,t).forEach(function(t){e.push(c(n,t,o))})}})}function b(e){var t=e[0],n=t.length,r=!0;if(!n&&e[1])E.default.range(0,e[1].length).forEach(function(e){t.push(c(0,e,"TH"))});else if("TH"!==e[0][0].nodeName){var o,a=E.default.range(0,n).map(function(e){return c(0,e,"TH")});(o=[]).concat.apply(o,e).forEach(function(e){e.elementIndex&&(e.elementIndex.rowIndex+=1)}),e.unshift(a)}else if(1===e.length){var i=E.default.range(0,n).map(function(e){return c(1,e,"TD")});e.push(i)}else r=!1;return r}Object.defineProperty(t,"__esModule",{value:!0}),t.createTableData=i,t.createCellIndexData=l;var y=n(0),w=r(y),_=n(1),E=r(_),k=E.default.browser.msie?"":"<br>";t.default={createTableData:i,createCellIndexData:l,createRenderData:s,findElementRowIndex:f,findElementColIndex:d,findCellIndex:h,createBasicCell:c,findRowMergedLastIndex:p,findColMergedLastIndex:g,findElementIndex:v,stuffCellsIntoIncompleteRow:m,addTbodyOrTheadIfNeed:b}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=e.colspan>1?' colspan="'+e.colspan+'"':"";return t+=e.rowspan>1?' rowspan="'+e.rowspan+'"':"",t+=e.align?' align="'+e.align+'"':"","<"+e.nodeName+t+">"+e.content+"</"+e.nodeName+">"}function a(e,t){var n="";return e.length&&(n=e.map(function(e){return"<tr>"+e.map(o).join("")+"</tr>"}).join(""),n="<"+t+">"+n+"</"+t+">"),n}function i(e){var t=[e[0]],n=e.slice(1),r=a(t,"THEAD"),o=a(n,"TBODY");return"<table"+(e.className?' class="'+e.className+'"':"")+">"+(r+o)+"</renderData>"}function l(e,t){var n=d.default.createCellIndexData(t),r=d.default.createRenderData(t,n),o=(0,c.default)(i(r));return e.replaceWith(o),o}function u(e,t,n){t.selectNodeContents(n),t.collapse(!0),e.setSelection(t)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),c=r(s),f=n(3),d=r(f);t.default={createTableHtml:i,replaceTable:l,focusToCell:u}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){var r=g.default.createCellIndexData(e),o=g.default.findCellIndex(r,t),a=g.default.findCellIndex(r,n),i=void 0,l=void 0,u=void 0,s=void 0;return o.rowIndex>a.rowIndex?(i=a.rowIndex,l=o.rowIndex):(i=o.rowIndex,l=a.rowIndex),o.colIndex>a.colIndex?(u=a.colIndex,s=o.colIndex):(u=o.colIndex,s=a.colIndex),{start:{rowIndex:i,colIndex:u},end:{rowIndex:l,colIndex:s}}}function a(e,t,n){var r=t[n].rowIndex,o=e[r];h.default.range(t.start.colIndex,t.end.colIndex+1).forEach(function(n){var a=o[n],i=a.rowMergeWith,l=-1;h.default.isExisty(i)?(i<t.start.rowIndex&&(t.start.rowIndex=i),l=i+e[i][n].rowspan-1):a.rowspan>1&&(l=r+a.rowspan-1),l>t.end.rowIndex&&(t.end.rowIndex=l)})}function i(e,t,n,r){var o=e[n],a=o[r],i=a.colMergeWith,l=-1;h.default.isExisty(i)?(i<t.start.colIndex&&(t.start.colIndex=i),l=i+o[i].colspan-1):a.colspan>1&&(l=r+a.colspan-1),l>t.end.colIndex&&(t.end.colIndex=l)}function l(e,t){for(var n="";n!==JSON.stringify(t);)n=JSON.stringify(t),a(e,t,"start"),a(e,t,"end"),h.default.range(t.start.rowIndex,t.end.rowIndex+1).forEach(function(n){i(e,t,n,t.start.colIndex),i(e,t,n,t.end.colIndex)});return t}function u(e,t,n){return l(e,o(e,t,n))}function s(e,t,n){var r=g.default.createCellIndexData(e),o={};if(t.length){var a=g.default.findCellIndex(r,t.first()),i=h.default.extend({},a);t.each(function(t,n){var o=g.default.findCellIndex(r,(0,f.default)(n)),a=e[o.rowIndex][o.colIndex],l=o.rowIndex+a.rowspan-1,u=o.colIndex+a.colspan-1;i.rowIndex=Math.max(i.rowIndex,l),i.colIndex=Math.max(i.colIndex,u)}),o.start=a,o.end=i}else{var l=g.default.findCellIndex(r,n);o.start=l,o.end=h.default.extend({},l)}return o}Object.defineProperty(t,"__esModule",{value:!0});var c=n(0),f=r(c),d=n(1),h=r(d),p=n(3),g=r(p);t.default={findSelectionRange:u,getTableSelectionRange:s}},function(e,t,n){"use strict";function r(e){if(!(this instanceof r))return new r(e);s.call(this,e),c.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",o)}function o(){this.allowHalfOpen||this._writableState.ended||i(a,this)}function a(e){e.end()}var i=n(11),l=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=r;var u=n(9);u.inherits=n(7);var s=n(20),c=n(15);u.inherits(r,s);for(var f=l(c.prototype),d=0;d<f.length;d++){var h=f[d];r.prototype[h]||(r.prototype[h]=c.prototype[h])}Object.defineProperty(r.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),r.prototype._destroy=function(e,t){this.push(null),this.end(),i(t,e)}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){(function(e){function n(e){return Array.isArray?Array.isArray(e):"[object Array]"===v(e)}function r(e){return"boolean"==typeof e}function o(e){return null===e}function a(e){return null==e}function i(e){return"number"==typeof e}function l(e){return"string"==typeof e}function u(e){return"symbol"==typeof e}function s(e){return void 0===e}function c(e){return"[object RegExp]"===v(e)}function f(e){return"object"==typeof e&&null!==e}function d(e){return"[object Date]"===v(e)}function h(e){return"[object Error]"===v(e)||e instanceof Error}function p(e){return"function"==typeof e}function g(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function v(e){return Object.prototype.toString.call(e)}t.isArray=n,t.isBoolean=r,t.isNull=o,t.isNullOrUndefined=a,t.isNumber=i,t.isString=l,t.isSymbol=u,t.isUndefined=s,t.isRegExp=c,t.isObject=f,t.isDate=d,t.isError=h,t.isFunction=p,t.isPrimitive=g,t.isBuffer=e.isBuffer}).call(t,n(23).Buffer)},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(e){if(c===setTimeout)return setTimeout(e,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function a(e){if(f===clearTimeout)return clearTimeout(e);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(e);try{return f(e)}catch(t){try{return f.call(null,e)}catch(t){return f.call(this,e)}}}function i(){g&&h&&(g=!1,h.length?p=h.concat(p):v=-1,p.length&&l())}function l(){if(!g){var e=o(i);g=!0;for(var t=p.length;t;){for(h=p,p=[];++v<t;)h&&h[v].run();v=-1,t=p.length}h=null,g=!1,a(e)}}function u(e,t){this.fun=e,this.array=t}function s(){}var c,f,d=e.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:n}catch(e){c=n}try{f="function"==typeof clearTimeout?clearTimeout:r}catch(e){f=r}}();var h,p=[],g=!1,v=-1;d.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];p.push(new u(e,t)),1!==p.length||g||o(l)},u.prototype.run=function(){this.fun.apply(null,this.array)},d.title="browser",d.browser=!0,d.env={},d.argv=[],d.version="",d.versions={},d.on=s,d.addListener=s,d.once=s,d.off=s,d.removeListener=s,d.removeAllListeners=s,d.emit=s,d.prependListener=s,d.prependOnceListener=s,d.listeners=function(e){return[]},d.binding=function(e){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(e){throw new Error("process.chdir is not supported")},d.umask=function(){return 0}},function(e,t,n){"use strict";(function(t){function n(e,n,r,o){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var a,i,l=arguments.length;switch(l){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick(function(){e.call(null,n)});case 3:return t.nextTick(function(){e.call(null,n,r)});case 4:return t.nextTick(function(){e.call(null,n,r,o)});default:for(a=new Array(l-1),i=0;i<a.length;)a[i++]=arguments[i];return t.nextTick(function(){e.apply(null,a)})}}!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports=n:e.exports=t.nextTick}).call(t,n(10))},function(e,t,n){function r(e,t){for(var n in e)t[n]=e[n]}function o(e,t,n){return i(e,t,n)}var a=n(23),i=a.Buffer;i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=a:(r(a,t),t.Buffer=o),r(i,o),o.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},o.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return a.SlowBuffer(e)}},function(e,t){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function o(e){return"number"==typeof e}function a(e){return"object"==typeof e&&null!==e}function i(e){return void 0===e}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!o(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,n,o,l,u,s;if(this._events||(this._events={}),"error"===e&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}if(n=this._events[e],i(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:l=Array.prototype.slice.call(arguments,1),n.apply(this,l)}else if(a(n))for(l=Array.prototype.slice.call(arguments,1),s=n.slice(),o=s.length,u=0;u<o;u++)s[u].apply(this,l);return!0},n.prototype.addListener=function(e,t){var o;if(!r(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,r(t.listener)?t.listener:t),this._events[e]?a(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,a(this._events[e])&&!this._events[e].warned&&(o=i(this._maxListeners)?n.defaultMaxListeners:this._maxListeners)&&o>0&&this._events[e].length>o&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function n(){this.removeListener(e,n),o||(o=!0,t.apply(this,arguments))}if(!r(t))throw TypeError("listener must be a function");var o=!1;return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var n,o,i,l;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],i=n.length,o=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(a(n)){for(l=i;l-- >0;)if(n[l]===t||n[l].listener&&n[l].listener===t){o=l;break}if(o<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(o,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],r(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t,n){t=e.exports=n(20),t.Stream=t,t.Readable=t,t.Writable=n(15),t.Duplex=n(6),t.Transform=n(26),t.PassThrough=n(58)},function(e,t,n){"use strict";(function(t,r,o){function a(e){var t=this;this.next=null,this.entry=null,this.finish=function(){T(t,e)}}function i(e){return P.from(e)}function l(e){return P.isBuffer(e)||e instanceof L}function u(){}function s(e,t){I=I||n(6),e=e||{},this.objectMode=!!e.objectMode,t instanceof I&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var r=e.highWaterMark,o=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:o,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=!1===e.decodeStrings;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){b(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function c(e){if(I=I||n(6),!(B.call(c,this)||this instanceof I))return new c(e);this._writableState=new s(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),N.call(this)}function f(e,t){var n=new Error("write after end");e.emit("error",n),S(t,n)}function d(e,t,n,r){var o=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),S(r,a),o=!1),o}function h(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=P.from(t,n)),t}function p(e,t,n,r,o,a){if(!n){var i=h(t,r,o);r!==i&&(n=!0,o="buffer",r=i)}var l=t.objectMode?1:r.length;t.length+=l;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var s=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:o,isBuf:n,callback:a,next:null},s?s.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else g(e,t,!1,l,r,o,a);return u}function g(e,t,n,r,o,a,i){t.writelen=r,t.writecb=i,t.writing=!0,t.sync=!0,n?e._writev(o,t.onwrite):e._write(o,a,t.onwrite),t.sync=!1}function v(e,t,n,r,o){--t.pendingcb,n?(S(o,r),S(C,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(o(r),e._writableState.errorEmitted=!0,e.emit("error",r),C(e,t))}function m(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function b(e,t){var n=e._writableState,r=n.sync,o=n.writecb;if(m(n),t)v(e,n,r,t,o);else{var a=E(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||_(e,n),r?R(y,e,n,a,o):y(e,n,a,o)}}function y(e,t,n,r){n||w(e,t),t.pendingcb--,r(),C(e,t)}function w(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function _(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,o=new Array(r),i=t.corkedRequestsFree;i.entry=n;for(var l=0,u=!0;n;)o[l]=n,n.isBuf||(u=!1),n=n.next,l+=1;o.allBuffers=u,g(e,t,!0,t.length,o,"",i.finish),t.pendingcb++,t.lastBufferedRequest=null,i.next?(t.corkedRequestsFree=i.next,i.next=null):t.corkedRequestsFree=new a(t)}else{for(;n;){var s=n.chunk,c=n.encoding,f=n.callback;if(g(e,t,!1,t.objectMode?1:s.length,s,c,f),n=n.next,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=n,t.bufferProcessing=!1}function E(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function k(e,t){e._final(function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),C(e,t)})}function x(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,S(k,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function C(e,t){var n=E(t);return n&&(x(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}function M(e,t,n){t.ending=!0,C(e,t),n&&(t.finished?S(n):e.once("finish",n)),t.ended=!0,e.writable=!1}function T(e,t,n){var r=e.entry;for(e.entry=null;r;){var o=r.callback;t.pendingcb--,o(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}var S=n(11);e.exports=c;var I,R=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?r:S;c.WritableState=s;var A=n(9);A.inherits=n(7);var O={deprecate:n(57)},N=n(22),P=n(12).Buffer,L=o.Uint8Array||function(){},D=n(24);A.inherits(c,N),s.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(s.prototype,"buffer",{get:O.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}();var B;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(B=Function.prototype[Symbol.hasInstance],Object.defineProperty(c,Symbol.hasInstance,{value:function(e){return!!B.call(this,e)||e&&e._writableState instanceof s}})):B=function(e){return e instanceof this},c.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},c.prototype.write=function(e,t,n){var r=this._writableState,o=!1,a=l(e)&&!r.objectMode;return a&&!P.isBuffer(e)&&(e=i(e)),"function"==typeof t&&(n=t,t=null),a?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=u),r.ended?f(this,n):(a||d(this,r,e,n))&&(r.pendingcb++,o=p(this,r,a,e,t,n)),o},c.prototype.cork=function(){this._writableState.corked++},c.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||_(this,e))},c.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},c.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},c.prototype._writev=null,c.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||M(this,r,n)},Object.defineProperty(c.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),c.prototype.destroy=D.destroy,c.prototype._undestroy=D.undestroy,c.prototype._destroy=function(e,t){this.end(),t(e)}}).call(t,n(10),n(55).setImmediate,n(8))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),l=r(i),u=n(1),s=r(u),c=n(30),f=r(c),d=n(33),h=r(d),p=n(34),g=r(p),v=n(37),m=r(v),b=n(38),y=r(b),w=n(49),_=r(w),E=n(18),k=r(E),x=function(){function e(t){var n=this;o(this,e),this.options=l.default.extend({useDefaultHTMLSanitizer:!0,codeBlockLanguages:E.CodeBlockManager.getHighlightJSLanguages(),customConvertor:null},t),this.eventManager=new h.default,this.commandManager=new g.default(this),this.options.customConvertor?this.convertor=new this.options.customConvertor(this.eventManager):this.convertor=new y.default(this.eventManager),this.toMarkOptions=null,this.options.useDefaultHTMLSanitizer&&this.convertor.initHtmlSanitizer(),this.options.hooks&&s.default.forEach(this.options.hooks,function(e,t){n.addHook(t,e)}),this.options.events&&s.default.forEach(this.options.events,function(e,t){n.on(t,e)}),this.preview=new f.default((0,l.default)(this.options.el),this.eventManager,this.convertor,!0),this.preview.$el.on("mousedown",l.default.proxy(this._toggleTask,this)),m.default.applyExtension(this,this.options.exts),this.setValue(this.options.initialValue),this.eventManager.emit("load",this)}return a(e,[{key:"_toggleTask",value:function(e){var t=e.offsetX<18&&e.offsetY>18;e.target.hasAttribute("data-te-task")&&!t&&((0,l.default)(e.target).toggleClass("checked"),this.eventManager.emit("change",{source:"viewer",data:e}))}},{key:"setMarkdown",value:function(e){this.markdownValue=e=e||"",this.preview.refresh(this.markdownValue),this.eventManager.emit("setMarkdownAfter",this.markdownValue)}},{key:"setValue",value:function(e){this.setMarkdown(e)}},{key:"on",value:function(e,t){this.eventManager.listen(e,t)}},{key:"off",value:function(e){this.eventManager.removeEventHandler(e)}},{key:"remove",value:function(){this.eventManager.emit("removeEditor"),this.preview.$el.off("mousedown",l.default.proxy(this._toggleTask,this)),this.preview.remove(),this.options=null,this.eventManager=null,this.commandManager=null,this.convertor=null,this.preview=null}},{key:"addHook",value:function(e,t){this.eventManager.removeEventHandler(e),this.eventManager.listen(e,t)}},{key:"isViewer",value:function(){return!0}},{key:"isMarkdownMode",value:function(){return!1}},{key:"isWysiwygMode",value:function(){return!1}}],[{key:"defineExtension",value:function(e,t){m.default.defineExtension(e,t)}}]),e}();x.isViewer=!0,x.domUtils=_.default,x.codeBlockManager=k.default,x.markdownitHighlight=y.default.getMarkdownitHighlightRenderer(),x.markdownit=y.default.getMarkdownitRenderer(),x.i18n=null,x.Button=null,x.WwCodeBlockManager=null,x.WwTableManager=null,x.WwTableSelectionManager=null,e.exports=x},function(e,t){e.exports=n},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){return e.replace(t?/&/g:/&(?!#?\w+;)/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}Object.defineProperty(t,"__esModule",{value:!0}),t.CodeBlockManager=void 0;var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(48),l=function(e){return e&&e.__esModule?e:{default:e}}(i),u=function(){function e(){r(this,e),this._replacers={}}return a(e,[{key:"setReplacer",value:function(e,t){this._replacers[e]=t}},{key:"getReplacer",value:function(e){return this._replacers[e]}},{key:"createCodeBlockHtml",value:function(e,t){var n=this.getReplacer(e);return n?n(t,e):l.default.getLanguage(e)?l.default.highlight(e,t).value:o(t,!1)}}],[{key:"getHighlightJSLanguages",value:function(){return l.default.listLanguages()}}]),e}();t.CodeBlockManager=u,t.default=new u},function(e,t,n){function r(){o.call(this)}e.exports=r;var o=n(13).EventEmitter;n(7)(r,o),r.Readable=n(14),r.Writable=n(59),r.Duplex=n(60),r.Transform=n(61),r.PassThrough=n(62),r.Stream=r,r.prototype.pipe=function(e,t){function n(t){e.writable&&!1===e.write(t)&&s.pause&&s.pause()}function r(){s.readable&&s.resume&&s.resume()}function a(){c||(c=!0,e.end())}function i(){c||(c=!0,"function"==typeof e.destroy&&e.destroy())}function l(e){if(u(),0===o.listenerCount(this,"error"))throw e}function u(){s.removeListener("data",n),e.removeListener("drain",r),s.removeListener("end",a),s.removeListener("close",i),s.removeListener("error",l),e.removeListener("error",l),s.removeListener("end",u),s.removeListener("close",u),e.removeListener("close",u)}var s=this;s.on("data",n),e.on("drain",r),e._isStdio||t&&!1===t.end||(s.on("end",a),s.on("close",i));var c=!1;return s.on("error",l),e.on("error",l),s.on("end",u),s.on("close",u),e.on("close",u),e.emit("pipe",s),e}},function(e,t,n){"use strict";(function(t,r){function o(e){return B.from(e)}function a(e){return B.isBuffer(e)||e instanceof U}function i(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?P(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}function l(e,t){N=N||n(6),e=e||{},this.objectMode=!!e.objectMode,t instanceof N&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,o=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new q,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(F||(F=n(25).StringDecoder),this.decoder=new F(e.encoding),this.encoding=e.encoding)}function u(e){if(N=N||n(6),!(this instanceof u))return new u(e);this._readableState=new l(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),D.call(this)}function s(e,t,n,r,a){var i=e._readableState;if(null===t)i.reading=!1,g(e,i);else{var l;a||(l=f(i,t)),l?e.emit("error",l):i.objectMode||t&&t.length>0?("string"==typeof t||i.objectMode||Object.getPrototypeOf(t)===B.prototype||(t=o(t)),r?i.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):c(e,i,t,!0):i.ended?e.emit("error",new Error("stream.push() after EOF")):(i.reading=!1,i.decoder&&!n?(t=i.decoder.write(t),i.objectMode||0!==t.length?c(e,i,t,!1):b(e,i)):c(e,i,t,!1))):r||(i.reading=!1)}return d(i)}function c(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&v(e)),b(e,t)}function f(e,t){var n;return a(t)||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function d(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}function h(e){return e>=$?e=$:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function p(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=h(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function g(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,v(e)}}function v(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(H("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?O(m,e):m(e))}function m(e){H("emit readable"),e.emit("readable"),x(e)}function b(e,t){t.readingMore||(t.readingMore=!0,O(y,e,t))}function y(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(H("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function w(e){return function(){var t=e._readableState;H("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&L(e,"data")&&(t.flowing=!0,x(e))}}function _(e){H("readable nexttick read 0"),e.read(0)}function E(e,t){t.resumeScheduled||(t.resumeScheduled=!0,O(k,e,t))}function k(e,t){t.reading||(H("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),x(e),t.flowing&&!t.reading&&e.read(0)}function x(e){var t=e._readableState;for(H("flow",t.flowing);t.flowing&&null!==e.read(););}function C(e,t){if(0===t.length)return null;var n;return t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=M(e,t.buffer,t.decoder),n}function M(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?T(e,t):S(e,t),r}function T(e,t){var n=t.head,r=1,o=n.data;for(e-=o.length;n=n.next;){var a=n.data,i=e>a.length?a.length:e;if(i===a.length?o+=a:o+=a.slice(0,e),0===(e-=i)){i===a.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(i));break}++r}return t.length-=r,o}function S(e,t){var n=B.allocUnsafe(e),r=t.head,o=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var a=r.data,i=e>a.length?a.length:e;if(a.copy(n,n.length-e,0,i),0===(e-=i)){i===a.length?(++o,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(i));break}++o}return t.length-=o,n}function I(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,O(R,t,e))}function R(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function A(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}var O=n(11);e.exports=u;var N,P=n(21);u.ReadableState=l;var L=(n(13).EventEmitter,function(e,t){return e.listeners(t).length}),D=n(22),B=n(12).Buffer,U=t.Uint8Array||function(){},j=n(9);j.inherits=n(7);var W=n(53),H=void 0;H=W&&W.debuglog?W.debuglog("stream"):function(){};var F,q=n(54),Y=n(24);j.inherits(u,D);var z=["error","close","destroy","pause","resume"];Object.defineProperty(u.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),u.prototype.destroy=Y.destroy,u.prototype._undestroy=Y.undestroy,u.prototype._destroy=function(e,t){this.push(null),t(e)},u.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=B.from(e,t),t=""),n=!0),s(this,e,t,!1,n)},u.prototype.unshift=function(e){return s(this,e,null,!0,!1)},u.prototype.isPaused=function(){return!1===this._readableState.flowing},u.prototype.setEncoding=function(e){return F||(F=n(25).StringDecoder),this._readableState.decoder=new F(e),this._readableState.encoding=e,this};var $=8388608;u.prototype.read=function(e){H("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return H("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?I(this):v(this),null;if(0===(e=p(e,t))&&t.ended)return 0===t.length&&I(this),null;var r=t.needReadable;H("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&(r=!0,H("length less than watermark",r)),t.ended||t.reading?(r=!1,H("reading or ended",r)):r&&(H("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=p(n,t)));var o;return o=e>0?C(e,t):null,null===o?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&I(this)),null!==o&&this.emit("data",o),o},u.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},u.prototype.pipe=function(e,t){function n(e,t){H("onunpipe"),e===d&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,a())}function o(){H("onend"),e.end()}function a(){H("cleanup"),e.removeListener("close",s),e.removeListener("finish",c),e.removeListener("drain",v),e.removeListener("error",u),e.removeListener("unpipe",n),d.removeListener("end",o),d.removeListener("end",f),d.removeListener("data",l),m=!0,!h.awaitDrain||e._writableState&&!e._writableState.needDrain||v()}function l(t){H("ondata"),b=!1,!1!==e.write(t)||b||((1===h.pipesCount&&h.pipes===e||h.pipesCount>1&&-1!==A(h.pipes,e))&&!m&&(H("false write response, pause",d._readableState.awaitDrain),d._readableState.awaitDrain++,b=!0),d.pause())}function u(t){H("onerror",t),f(),e.removeListener("error",u),0===L(e,"error")&&e.emit("error",t)}function s(){e.removeListener("finish",c),f()}function c(){H("onfinish"),e.removeListener("close",s),f()}function f(){H("unpipe"),d.unpipe(e)}var d=this,h=this._readableState;switch(h.pipesCount){case 0:h.pipes=e;break;case 1:h.pipes=[h.pipes,e];break;default:h.pipes.push(e)}h.pipesCount+=1,H("pipe count=%d opts=%j",h.pipesCount,t);var p=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr,g=p?o:f;h.endEmitted?O(g):d.once("end",g),e.on("unpipe",n);var v=w(d);e.on("drain",v);var m=!1,b=!1;return d.on("data",l),i(e,"error",u),e.once("close",s),e.once("finish",c),e.emit("pipe",d),h.flowing||(H("pipe resume"),d.resume()),e},u.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n),this);if(!e){var r=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<o;a++)r[a].emit("unpipe",this,n);return this}var i=A(t.pipes,e);return-1===i?this:(t.pipes.splice(i,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n),this)},u.prototype.on=function(e,t){var n=D.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&v(this):O(_,this))}return n},u.prototype.addListener=u.prototype.on,u.prototype.resume=function(){var e=this._readableState;return e.flowing||(H("resume"),e.flowing=!0,E(this,e)),this},u.prototype.pause=function(){return H("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(H("pause"),this._readableState.flowing=!1,this.emit("pause")),this},u.prototype.wrap=function(e){var t=this._readableState,n=!1,r=this;e.on("end",function(){if(H("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&r.push(e)}r.push(null)}),e.on("data",function(o){if(H("wrapped data"),t.decoder&&(o=t.decoder.write(o)),(!t.objectMode||null!==o&&void 0!==o)&&(t.objectMode||o&&o.length)){r.push(o)||(n=!0,e.pause())}});for(var o in e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var a=0;a<z.length;a++)e.on(z[a],r.emit.bind(r,z[a]));return r._read=function(t){H("wrapped _read",t),n&&(n=!1,e.resume())},r},u._fromList=C}).call(t,n(8),n(10))},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){e.exports=n(13).EventEmitter},function(e,t,n){"use strict";(function(e){function r(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e,t){if(r()<t)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=a.prototype):(null===e&&(e=new a(t)),e.length=t),e}function a(e,t,n){if(!(a.TYPED_ARRAY_SUPPORT||this instanceof a))return new a(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 s(this,e)}return i(this,e,t,n)}function i(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?d(e,t,n,r):"string"==typeof t?c(e,t,n):h(e,t)}function l(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 u(e,t,n,r){return l(t),t<=0?o(e,t):void 0!==n?"string"==typeof r?o(e,t).fill(n,r):o(e,t).fill(n):o(e,t)}function s(e,t){if(l(t),e=o(e,t<0?0:0|p(t)),!a.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function c(e,t,n){if("string"==typeof n&&""!==n||(n="utf8"),!a.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|v(t,n);e=o(e,r);var i=e.write(t,n);return i!==r&&(e=e.slice(0,i)),e}function f(e,t){var n=t.length<0?0:0|p(t.length);e=o(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function d(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),a.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=a.prototype):e=f(e,t),e}function h(e,t){if(a.isBuffer(t)){var n=0|p(t.length);return e=o(e,n),0===e.length?e:(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||X(t.length)?o(e,0):f(e,t);if("Buffer"===t.type&&Z(t.data))return f(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function p(e){if(e>=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|e}function g(e){return+e!=e&&(e=0),a.alloc(+e)}function v(e,t){if(a.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 r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return Y(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(r)return Y(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!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,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,n);case"utf8":case"utf-8":return S(this,t,n);case"ascii":return R(this,t,n);case"latin1":case"binary":return A(this,t,n);case"base64":return T(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function b(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=a.from(t,r)),a.isBuffer(t))return 0===t.length?-1:w(e,t,n,r,o);if("number"==typeof t)return t&=255,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):w(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function w(e,t,n,r,o){function a(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}var i=1,l=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;i=2,l/=2,u/=2,n/=2}var s;if(o){var c=-1;for(s=n;s<l;s++)if(a(e,s)===a(t,-1===c?0:s-c)){if(-1===c&&(c=s),s-c+1===u)return c*i}else-1!==c&&(s-=s-c),c=-1}else for(n+u>l&&(n=l-u),s=n;s>=0;s--){for(var f=!0,d=0;d<u;d++)if(a(e,s+d)!==a(t,d)){f=!1;break}if(f)return s}return-1}function _(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var i=0;i<r;++i){var l=parseInt(t.substr(2*i,2),16);if(isNaN(l))return i;e[n+i]=l}return i}function E(e,t,n,r){return G(Y(t,e.length-n),e,n,r)}function k(e,t,n,r){return G(z(t),e,n,r)}function x(e,t,n,r){return k(e,t,n,r)}function C(e,t,n,r){return G(V(t),e,n,r)}function M(e,t,n,r){return G($(t,e.length-n),e,n,r)}function T(e,t,n){return 0===t&&n===e.length?J.fromByteArray(e):J.fromByteArray(e.slice(t,n))}function S(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var a=e[o],i=null,l=a>239?4:a>223?3:a>191?2:1;if(o+l<=n){var u,s,c,f;switch(l){case 1:a<128&&(i=a);break;case 2:u=e[o+1],128==(192&u)&&(f=(31&a)<<6|63&u)>127&&(i=f);break;case 3:u=e[o+1],s=e[o+2],128==(192&u)&&128==(192&s)&&(f=(15&a)<<12|(63&u)<<6|63&s)>2047&&(f<55296||f>57343)&&(i=f);break;case 4:u=e[o+1],s=e[o+2],c=e[o+3],128==(192&u)&&128==(192&s)&&128==(192&c)&&(f=(15&a)<<18|(63&u)<<12|(63&s)<<6|63&c)>65535&&f<1114112&&(i=f)}}null===i?(i=65533,l=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|1023&i),r.push(i),o+=l}return I(r)}function I(e){var t=e.length;if(t<=Q)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Q));return n}function R(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function A(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function O(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var o="",a=t;a<n;++a)o+=q(e[a]);return o}function N(e,t,n){for(var r=e.slice(t,n),o="",a=0;a<r.length;a+=2)o+=String.fromCharCode(r[a]+256*r[a+1]);return o}function P(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 L(e,t,n,r,o,i){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function D(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,a=Math.min(e.length-n,2);o<a;++o)e[n+o]=(t&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function B(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,a=Math.min(e.length-n,4);o<a;++o)e[n+o]=t>>>8*(r?o:3-o)&255}function U(e,t,n,r,o,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function j(e,t,n,r,o){return o||U(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),K.write(e,t,n,r,23,4),n+4}function W(e,t,n,r,o){return o||U(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),K.write(e,t,n,r,52,8),n+8}function H(e){if(e=F(e).replace(ee,""),e.length<2)return"";for(;e.length%4!=0;)e+="=";return e}function F(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function q(e){return e<16?"0"+e.toString(16):e.toString(16)}function Y(e,t){t=t||1/0;for(var n,r=e.length,o=null,a=[],i=0;i<r;++i){if((n=e.charCodeAt(i))>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(i+1===r){(t-=3)>-1&&a.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&a.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.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;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function z(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function $(e,t){for(var n,r,o,a=[],i=0;i<e.length&&!((t-=2)<0);++i)n=e.charCodeAt(i),r=n>>8,o=n%256,a.push(o),a.push(r);return a}function V(e){return J.toByteArray(H(e))}function G(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function X(e){return e!==e}/*!
|
||
* The buffer module from node.js, for the browser.
|
||
*
|
||
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
||
* @license MIT
|
||
*/
|
||
var J=n(51),K=n(52),Z=n(21);t.Buffer=a,t.SlowBuffer=g,t.INSPECT_MAX_BYTES=50,a.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=r(),a.poolSize=8192,a._augment=function(e){return e.__proto__=a.prototype,e},a.from=function(e,t,n){return i(null,e,t,n)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(e,t,n){return u(null,e,t,n)},a.allocUnsafe=function(e){return s(null,e)},a.allocUnsafeSlow=function(e){return s(null,e)},a.isBuffer=function(e){return!(null==e||!e._isBuffer)},a.compare=function(e,t){if(!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},a.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}},a.concat=function(e,t){if(!Z(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=a.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var i=e[n];if(!a.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(r,o),o+=i.length}return r},a.byteLength=v,a.prototype._isBuffer=!0,a.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)b(this,t,t+1);return this},a.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)b(this,t,t+3),b(this,t+1,t+2);return this},a.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)b(this,t,t+7),b(this,t+1,t+6),b(this,t+2,t+5),b(this,t+3,t+4);return this},a.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?S(this,0,e):m.apply(this,arguments)},a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.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+">"},a.prototype.compare=function(e,t,n,r,o){if(!a.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===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,o>>>=0,this===e)return 0;for(var i=o-r,l=n-t,u=Math.min(i,l),s=this.slice(r,o),c=e.slice(t,n),f=0;f<u;++f)if(s[f]!==c[f]){i=s[f],l=c[f];break}return i<l?-1:l<i?1:0},a.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},a.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},a.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},a.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=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===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return _(this,e,t,n);case"utf8":case"utf-8":return E(this,e,t,n);case"ascii":return k(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 M(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;a.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);var r;if(a.TYPED_ARRAY_SUPPORT)r=this.subarray(e,t),r.__proto__=a.prototype;else{var o=t-e;r=new a(o,void 0);for(var i=0;i<o;++i)r[i]=this[i+e]}return r},a.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=this[e],o=1,a=0;++a<t&&(o*=256);)r+=this[e+a]*o;return r},a.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},a.prototype.readUInt8=function(e,t){return t||P(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return t||P(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return t||P(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){return t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=this[e],o=1,a=0;++a<t&&(o*=256);)r+=this[e+a]*o;return o*=128,r>=o&&(r-=Math.pow(2,8*t)),r},a.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=t,o=1,a=this[e+--r];r>0&&(o*=256);)a+=this[e+--r]*o;return o*=128,a>=o&&(a-=Math.pow(2,8*t)),a},a.prototype.readInt8=function(e,t){return t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){t||P(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(e,t){t||P(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(e,t){return t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return t||P(e,4,this.length),K.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return t||P(e,4,this.length),K.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return t||P(e,8,this.length),K.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return t||P(e,8,this.length),K.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t|=0,n|=0,!r){L(this,e,t,n,Math.pow(2,8*n)-1,0)}var o=1,a=0;for(this[t]=255&e;++a<n&&(o*=256);)this[t+a]=e/o&255;return t+n},a.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t|=0,n|=0,!r){L(this,e,t,n,Math.pow(2,8*n)-1,0)}var o=n-1,a=1;for(this[t+o]=255&e;--o>=0&&(a*=256);)this[t+o]=e/a&255;return t+n},a.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,1,255,0),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):D(this,e,t,!0),t+2},a.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):D(this,e,t,!1),t+2},a.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):B(this,e,t,!0),t+4},a.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):B(this,e,t,!1),t+4},a.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);L(this,e,t,n,o-1,-o)}var a=0,i=1,l=0;for(this[t]=255&e;++a<n&&(i*=256);)e<0&&0===l&&0!==this[t+a-1]&&(l=1),this[t+a]=(e/i>>0)-l&255;return t+n},a.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);L(this,e,t,n,o-1,-o)}var a=n-1,i=1,l=0;for(this[t+a]=255&e;--a>=0&&(i*=256);)e<0&&0===l&&0!==this[t+a+1]&&(l=1),this[t+a]=(e/i>>0)-l&255;return t+n},a.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,1,127,-128),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):D(this,e,t,!0),t+2},a.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):D(this,e,t,!1),t+2},a.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):B(this,e,t,!0),t+4},a.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):B(this,e,t,!1),t+4},a.prototype.writeFloatLE=function(e,t,n){return j(this,e,t,!0,n)},a.prototype.writeFloatBE=function(e,t,n){return j(this,e,t,!1,n)},a.prototype.writeDoubleLE=function(e,t,n){return W(this,e,t,!0,n)},a.prototype.writeDoubleBE=function(e,t,n){return W(this,e,t,!1,n)},a.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===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(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var o,i=r-n;if(this===e&&n<t&&t<r)for(o=i-1;o>=0;--o)e[o+t]=this[o+n];else if(i<1e3||!a.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+i),t);return i},a.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!a.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}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;t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var i;if("number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{var l=a.isBuffer(e)?e:Y(new a(e,r).toString()),u=l.length;for(i=0;i<n-t;++i)this[i+t]=l[i%u]}return this};var ee=/[^+\/0-9A-Za-z-_]/g}).call(t,n(8))},function(e,t,n){"use strict";function r(e,t){var n=this,r=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;if(r||o)return void(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||i(a,this,e));this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(i(a,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)})}function o(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function a(e,t){e.emit("error",t)}var i=n(11);e.exports={destroy:r,undestroy:o}},function(e,t,n){"use strict";function r(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function o(e){var t=r(e);if("string"!=typeof t&&(b.isEncoding===y||!y(e)))throw new Error("Unknown encoding: "+e);return t||e}function a(e){this.encoding=o(e);var t;switch(this.encoding){case"utf16le":this.text=d,this.end=h,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=p,this.end=g,t=3;break;default:return this.write=v,void(this.end=m)}this.lastNeed=0,this.lastTotal=0,this.lastChar=b.allocUnsafe(t)}function i(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:-1}function l(e,t,n){var r=t.length-1;if(r<n)return 0;var o=i(t[r]);return o>=0?(o>0&&(e.lastNeed=o-1),o):--r<n?0:(o=i(t[r]))>=0?(o>0&&(e.lastNeed=o-2),o):--r<n?0:(o=i(t[r]),o>=0?(o>0&&(2===o?o=0:e.lastNeed=o-3),o):0)}function u(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"<22>".repeat(n);if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"<22>".repeat(n+1);if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"<22>".repeat(n+2)}}function s(e){var t=this.lastTotal-this.lastNeed,n=u(this,e,t);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){var n=l(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"<22>".repeat(this.lastTotal-this.lastNeed):t}function d(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function h(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function p(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function g(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function v(e){return e.toString(this.encoding)}function m(e){return e&&e.length?this.write(e):""}var b=n(12).Buffer,y=b.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};t.StringDecoder=a,a.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},a.prototype.end=f,a.prototype.text=c,a.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,n){"use strict";function r(e){this.afterTransform=function(t,n){return o(e,t,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function o(e,t,n){var r=e._transformState;r.transforming=!1;var o=r.writecb;if(!o)return e.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!==n&&void 0!==n&&e.push(n),o(t);var a=e._readableState;a.reading=!1,(a.needReadable||a.length<a.highWaterMark)&&e._read(a.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);l.call(this,e),this._transformState=new r(this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.once("prefinish",function(){"function"==typeof this._flush?this._flush(function(e,n){i(t,e,n)}):i(t)})}function i(e,t,n){if(t)return e.emit("error",t);null!==n&&void 0!==n&&e.push(n);var r=e._writableState,o=e._transformState;if(r.length)throw new Error("Calling transform done when ws.length != 0");if(o.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}e.exports=a;var l=n(6),u=n(9);u.inherits=n(7),u.inherits(a,l),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,l.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},a.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var o=this._readableState;(r.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},a.prototype._destroy=function(e,t){var n=this;l.prototype._destroy.call(this,e,function(e){t(e),n.emit("close")})}},function(e,t,n){"use strict";n(28),n(64),n(79),n(81);var r=n(83);e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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}function i(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)}function l(e,t){e=p(e);var n=e.split(/\n{2,}/),r=n[0],o=n[1],a=h(r),i=a&&a.editorChart&&a.editorChart.url,l=void 0;if(S.default.isString(i)){var s=function(e){l=u(e,r),t(l)},c=function(){return t(null)};M.default.get(i).done(s).fail(c)}else l=u(r,o),t(l)}function u(e,t){return{data:f(e),options:h(t)}}function s(e){e=p(e);var t=e.split(U).slice(0,10).join("\n");return j.map(function(e){return{delimiter:e,delta:c(t,e)}}).sort(function(e,t){return e.delta-t.delta})[0].delimiter}function c(e,t){var n=void 0,r=void 0;try{if(P.default.COLUMN_SEPARATOR=t,n=P.default.parse(e),n[0].length<2)throw new Error("parser fail");r=n.map(function(e){return e.length}).reduce(function(e,t){return{deltaSum:e.deltaSum+Math.abs(e.length-t),length:t}},{deltaSum:0,length:n[0].length}).deltaSum}catch(e){r=1/0}return r}function f(e,t){e=p(e),P.default.COLUMN_SEPARATOR=t||s(e);var n=P.default.parse(e);n=n.map(function(e){return e.map(function(e){return e.trim()})});var r=n[0].filter(function(e,t){return t>0}).reduce(function(e,t){return e||!g(t)},!1),o=r?n.shift():[],a=n.slice(1).reduce(function(e,t){return e||!g(t[0])},!1),i=a?n.map(function(e){return e.shift()}):[];return a&&o.shift(),n=n[0].map(function(e,t){return n.map(function(e){return parseFloat(e[t])})}),{categories:i,series:n.map(function(e,t){return r?{name:o[t],data:e}:{data:e}})}}function d(e,t){var n=function(e){var n=f(e);t(n)},r=function(){return t(null)};M.default.get(e).done(n).fail(r)}function h(e){var t=["type","url"],n={};return S.default.isUndefined(e)?n:(e.split(U).forEach(function(e){var r=e.split(W),o=r[0],a=r.slice(1),i=a.join(W);if(o=o.trim(),0!==i.length){try{i=JSON.parse(i.trim())}catch(e){i=i.trim()}var l=o.split("."),u=l.slice(0),s=u[0];S.default.inArray(s,t)>=0?u.unshift("editorChart"):1===u.length?u.unshift("chart"):"x"!==s&&"y"!==s||(u[0]=s+"Axis");for(var c=n,f=0;f<u.length;f+=1){var d=u[f];c[d]=c[d]||(u.length-1===f?i:{}),c=c[d]}}}),n)}function p(e){return e.replace(/(^(\s*[\n\r])+)|([\n\r]+\s*$)/g,"")}function g(e){return!isNaN(e)&&isFinite(e)}function v(e,t,n){e=S.default.extend({editorChart:{},chart:{},chartExportMenu:{},usageStatistics:t.usageStatistics},e),t=S.default.extend(q,t);var r=e.chart,o=r.width,a=r.height,i=S.default.isUndefined(o),l=S.default.isUndefined(a);if(i||l){var u=n.getBoundingClientRect(),s=u.width;o=i?t.width:o,a=l?t.height:a,o="auto"===o?s:o,a="auto"===a?s:a}return o=Math.min(t.maxWidth,o),a=Math.min(t.maxHeight,a),e.chart.width=Math.max(t.minWidth,o),e.chart.height=Math.max(t.minHeight,a),e.editorChart.type=e.editorChart.type?e.editorChart.type+"Chart":"columnChart",e.chartExportMenu.visible=e.chartExportMenu.visible||!1,e}function m(e,t){var n="chart-"+Math.random().toString(36).substr(2,10),r='<div id="'+n+'" class="chart" />';return setTimeout(function(){var r=document.querySelector("#"+n);try{l(e,function(e){var n=e.data,o=e.options;o=v(o,t,r);var a=o.editorChart.type;H.indexOf(a)<0?r.innerHTML="invalid chart type. type: bar, column, line, area, pie":F.indexOf(a)>-1&&n.categories.length!==n.series[0].data.length?r.innerHTML="invalid chart data":R.default[a](r,n,o)})}catch(e){r.innerHTML="invalid chart data"}},0),r}function b(e){return e.reduce(function(e,t){var n=t.map(function(e){return!g(e)&&e.indexOf(" ")>=0&&(e='"'+e+'"'),e});return e.push(n.join("\t")),e},[])}function y(e){var t=e.wwEditor.componentManager;t.removeManager("codeblock"),t.addManager(function(e){function t(){return o(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),k(t,[{key:"convertNodesToText",value:function(e){if(1!==e.length||"TABLE"!==e[0].tagName)return x(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"convertNodesToText",this).call(this,e);var n=e.shift(),r="";return r+=b([].slice.call(n.rows).map(function(e){return[].slice.call(e.cells).map(function(e){return e.innerText.trim()})})).reduce(function(e,t){return e+(t+"\n")},[])}}]),t}(L))}function w(e,t,n){var r="markdown"===t&&e.getTokenAt(n.from).state.overlay.codeBlock;return r=r||"codeblock"===t,r=r&&"wysiwyg"!==t}function _(e,t){var n=t.source,r=t.data;if(w(e,n,r)){var o=r.text.join("\n");if(0===c(o,"\t")){P.default.COLUMN_SEPARATOR="\t";var a=b(P.default.parse(o));r.update(r.from,r.to,a)}}}function E(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.options.codeBlockLanguages;n&&n.indexOf(B)<0&&n.push(B),t=S.default.extend({usageStatistics:e.options.usageStatistics},t),D.setReplacer(B,function(e){return m(e,t)}),e.isViewer()||(y(e),e.eventManager.listen("pasteBefore",function(t){return _(e.mdEditor.cm,t)}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setDefaultOptions=t.detectDelimiter=t.parseDSV2ChartData=t.parseCode2ChartOption=t.parseURL2ChartData=t.parseCode2DataAndOptions=void 0;var k=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),x=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,r)}if("value"in o)return o.value;var i=o.get;if(void 0!==i)return i.call(r)},C=n(0),M=r(C),T=n(1),S=r(T),I=n(29),R=r(I),A=n(2),O=r(A),N=n(50),P=r(N),L=O.default.WwCodeBlockManager,D=O.default.codeBlockManager,B="chart";P.default.IGNORE_QUOTE_WHITESPACE=!1,P.default.IGNORE_RECORD_LENGTH=!0,P.default.DETECT_TYPES=!1;var U=/[\n\r]/,j=[",","\t",/\s+/],W=":",H=["barChart","columnChart","lineChart","areaChart","pieChart"],F=["lineChart","areaChart"],q={minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:1/0,height:"auto",width:"auto"};O.default.defineExtension("chart",E),t.parseCode2DataAndOptions=l,t.parseURL2ChartData=d,t.parseCode2ChartOption=h,t.parseDSV2ChartData=f,t.detectDelimiter=s,t.setDefaultOptions=v},function(e,t){e.exports=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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}function a(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)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,r)}if("value"in o)return o.value;var i=o.get;if(void 0!==i)return i.call(r)},u=n(31),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=function(e){function t(e,n,a,i){r(this,t);var l=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,a,i));return l._initEvent(),l}return a(t,e),i(t,[{key:"_initEvent",value:function(){var e=this,t="";this.eventManager.listen("contentChangedFromMarkdown",function(n){t=n.getValue(),e.isVisible()&&e.lazyRunner.run("refresh",t.replace(/<br>\n/g,"<br>"))}),this.eventManager.listen("previewNeedsRefresh",function(n){e.refresh(n||t)}),this.$el.on("scroll",function(t){e.eventManager.emit("scroll",{source:"preview",data:t})})}},{key:"render",value:function(e){l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"render",this).call(this,e),this.eventManager.emit("previewRenderAfter",this)}},{key:"remove",value:function(){this.$el.off("scroll"),this.$el=null}}]),t}(s.default);t.default=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),l=r(i),u=n(32),s=r(u),c=function(){function e(t,n,r,a){o(this,e),this.eventManager=n,this.convertor=r,this.$el=t,this.isViewer=!!a,this._initContentSection(),this.lazyRunner=new s.default,this.lazyRunner.registerLazyRunFunction("refresh",this.refresh,800,this)}return a(e,[{key:"_initContentSection",value:function(){this._$previewContent=(0,l.default)('<div class="tui-editor-contents" />'),this.$el.append(this._$previewContent)}},{key:"refresh",value:function(e){this.render(this.convertor.toHTMLWithCodeHightlight(e))}},{key:"getHTML",value:function(){return this._$previewContent.html()}},{key:"setHTML",value:function(e){this._$previewContent.html(e)}},{key:"render",value:function(e){var t=this._$previewContent;e=this.eventManager.emit("previewBeforeHook",e)||e,t.empty(),t.html(e)}},{key:"setHeight",value:function(e){this.$el.get(0).style.height=e+"px"}},{key:"setMinHeight",value:function(e){this.$el.get(0).style.minHeight=e+"px"}},{key:"isVisible",value:function(){return"none"!==this.$el.css("display")}}]),e}();t.default=c},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(a),l=function(){function e(){r(this,e),this.globalTOID=null,this.lazyRunFunctions={}}return o(e,[{key:"run",value:function(e,t,n,r){var o=void 0;return i.default.isString(e)?o=this._runRegisteredRun(e,t,n,r):(o=this._runSingleRun(e,t,n,r,this.globalTOID),this.globalTOID=o),o}},{key:"registerLazyRunFunction",value:function(e,t,n,r){r=r||this,this.lazyRunFunctions[e]={fn:t,delay:n,context:r,TOID:null}}},{key:"_runSingleRun",value:function(e,t,n,r,o){return this._clearTOIDIfNeed(o),o=setTimeout(function(){e.call(n,t)},r)}},{key:"_runRegisteredRun",value:function(e,t,n,r){var o=this.lazyRunFunctions[e],a=o.fn,i=o.TOID;return r=r||o.delay,n=n||o.context,i=this._runSingleRun(a,t,n,r,i),o.TOID=i,i}},{key:"_clearTOIDIfNeed",value:function(e){e&&clearTimeout(e)}}]),e}();t.default=l},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(a),l=["previewBeforeHook","previewRenderAfter","previewNeedsRefresh","addImageBlobHook","setMarkdownAfter","contentChangedFromWysiwyg","changeFromWysiwyg","contentChangedFromMarkdown","changeFromMarkdown","change","changeModeToWysiwyg","changeModeToMarkdown","changeModeBefore","changeMode","changePreviewStyle","changePreviewTabPreview","changePreviewTabWrite","openPopupAddLink","openPopupAddImage","openPopupAddTable","openPopupTableUtils","openHeadingSelect","openPopupCodeBlockLanguages","openPopupCodeBlockEditor","openDropdownToolbar","closePopupCodeBlockLanguages","closePopupCodeBlockEditor","closeAllPopup","command","addCommandBefore","htmlUpdate","markdownUpdate","renderedHtmlUpdated","removeEditor","convertorAfterMarkdownToHtmlConverted","convertorBeforeHtmlToMarkdownConverted","convertorAfterHtmlToMarkdownConverted","stateChange","wysiwygSetValueAfter","wysiwygSetValueBefore","wysiwygGetValueBefore","wysiwygProcessHTMLText","wysiwygRangeChangeAfter","wysiwygKeyEvent","scroll","click","mousedown","mouseover","mouseout","mouseup","contextmenu","keydown","keyup","keyMap","load","focus","blur","paste","pasteBefore","willPaste","copy","copyBefore","copyAfter","cut","cutAfter","drop","show","hide"],u=function(){function e(){r(this,e),this.events=new i.default.Map,this.TYPE=new i.default.Enum(l)}return o(e,[{key:"listen",value:function(e,t){var n=this._getTypeInfo(e),r=this.events.get(n.type)||[];if(!this._hasEventType(n.type))throw new Error("There is no event type "+n.type);n.namespace&&(t.namespace=n.namespace),r.push(t),this.events.set(n.type,r)}},{key:"emit",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.shift(),o=this._getTypeInfo(r),a=this.events.get(o.type),l=void 0;return a&&i.default.forEach(a,function(e){var n=e.apply(void 0,t);i.default.isUndefined(n)||(l=l||[],l.push(n))}),l}},{key:"emitReduce",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.shift(),o=this.events.get(r);return o&&i.default.forEach(o,function(e){var n=e.apply(void 0,t);i.default.isFalsy(n)||(t[0]=n)}),t[0]}},{key:"_getTypeInfo",value:function(e){var t=e.split(".");return{type:t[0],namespace:t[1]}}},{key:"_hasEventType",value:function(e){return!i.default.isUndefined(this.TYPE[this._getTypeInfo(e).type])}},{key:"addEventType",value:function(e){if(this._hasEventType(e))throw new Error("There is already have event type "+e);this.TYPE.set(e)}},{key:"removeEventHandler",value:function(e,t){var n=this,r=this._getTypeInfo(e),o=r.type,a=r.namespace;o&&t?this._removeEventHandlerWithHandler(o,t):o&&!a?this.events.delete(o):!o&&a?this.events.forEach(function(e,t){n._removeEventHandlerWithTypeInfo(t,a)}):o&&a&&this._removeEventHandlerWithTypeInfo(o,a)}},{key:"_removeEventHandlerWithHandler",value:function(e,t){var n=this.events.get(e)||[],r=n.indexOf(t);r>=0&&n.splice(r,1)}},{key:"_removeEventHandlerWithTypeInfo",value:function(e,t){var n=[],r=this.events.get(e);r&&(r.map(function(e){return e.namespace!==t&&n.push(e),null}),this.events.set(e,n))}}]),e}();t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),l=r(i),u=n(1),s=r(u),c=n(35),f=r(c),d=n(36),h=d.isMac?1:0,p=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,e),this._command=new s.default.Map,this._mdCommand=new s.default.Map,this._wwCommand=new s.default.Map,this._options=l.default.extend({useCommandShortcut:!0},n),this.base=t,this.keyMapCommand={},this._initEvent()}return a(e,[{key:"_addCommandBefore",value:function(e){var t={command:e};return this.base.eventManager.emit("addCommandBefore",t),t.command||e}},{key:"addCommand",value:function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];r.length&&(t=e.command.apply(e,[t].concat(r))),t=this._addCommandBefore(t);var a=t.getName(),i=void 0;return t.isMDType()?i=this._mdCommand:t.isWWType()?i=this._wwCommand:t.isGlobalType()&&(i=this._command),i.set(a,t),t.keyMap&&(this.keyMapCommand[t.keyMap[h]]=a),t}},{key:"_initEvent",value:function(){var e=this;this.base.eventManager.listen("command",function(){e.exec.apply(e,arguments)}),this.base.eventManager.listen("keyMap",function(t){if(e._options.useCommandShortcut){var n=e.keyMapCommand[t.keyMap];n&&(t.data.preventDefault(),e.exec(n))}})}},{key:"exec",value:function(e){var t=void 0,n=void 0,r=this.base;if(t=this._command.get(e),t||(this.base.isMarkdownMode()?(t=this._mdCommand.get(e),r=this.base.mdEditor):(t=this._wwCommand.get(e),r=this.base.wwEditor)),t){for(var o,a=arguments.length,i=Array(a>1?a-1:0),l=1;l<a;l++)i[l-1]=arguments[l];i.unshift(r),n=(o=t).exec.apply(o,i)}return n}}]),e}();p.command=function(e,t){var n=f.default.factory(e,t.name,t.keyMap);return s.default.extend(n,t),n},t.default=p},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(a),l=function(){function e(t,n,o){r(this,e),this.name=t,this.type=n,o&&this.setKeyMap(o)}return o(e,[{key:"getName",value:function(){return this.name}},{key:"getType",value:function(){return this.type}},{key:"isMDType",value:function(){return this.type===e.TYPE.MD}},{key:"isWWType",value:function(){return this.type===e.TYPE.WW}},{key:"isGlobalType",value:function(){return this.type===e.TYPE.GB}},{key:"setKeyMap",value:function(e,t){this.keyMap=[e,t]}}]),e}();l.factory=function(e,t){var n=void 0;"markdown"===e?n=l.TYPE.MD:"wysiwyg"===e?n=l.TYPE.WW:"global"===e&&(n=l.TYPE.GB);var r=new l(t.name,n);return i.default.extend(r,t),r},l.TYPE={MD:0,WW:1,GB:2},t.default=l},function(e,t,n){"use strict";var r=/Mac/.test(navigator.platform);e.exports={isMac:r}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(a),l=function(){function e(){r(this,e),this.exts=new i.default.Map}return o(e,[{key:"defineExtension",value:function(e,t){this.exts.set(e,t)}},{key:"applyExtension",value:function(e,t){var n=this;t&&t.forEach(function(t){var r=i.default.isObject(t),o=r?t.name:t;if(n.exts.has(o)){var a=n.exts.get(o);r?a(e,t):a(e)}})}}]),e}();t.default=new l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),l=r(i),u=n(1),s=r(u),c=n(39),f=r(c),d=n(17),h=r(d),p=n(40),g=r(p),v=n(41),m=r(v),b=n(42),y=r(b),w=n(43),_=r(w),E=n(44),k=r(E),x=n(45),C=r(x),M=n(46),T=r(M),S=n(47),I=r(S),R=n(18),A=r(R),O=new f.default({html:!0,breaks:!0,quotes:"“”‘’",langPrefix:"lang-",highlight:function(e,t){return A.default.createCodeBlockHtml(t,e)}}),N=new f.default({html:!0,breaks:!0,quotes:"“”‘’",langPrefix:"lang-"});O.block.ruler.at("code",_.default),O.block.ruler.at("table",C.default,{alt:["paragraph","reference"]}),O.block.ruler.at("blockquote",k.default,{alt:["paragraph","reference","blockquote","list"]}),O.block.ruler.at("html_block",T.default,{alt:["paragraph","reference","blockquote"]}),O.inline.ruler.at("backticks",I.default),O.use(m.default),O.use(y.default),N.block.ruler.at("code",_.default),N.block.ruler.at("table",C.default,{alt:["paragraph","reference"]}),N.block.ruler.at("blockquote",k.default,{alt:["paragraph","reference","blockquote","list"]}),N.block.ruler.at("html_block",T.default,{alt:["paragraph","reference","blockquote"]}),N.inline.ruler.at("backticks",I.default),N.use(m.default),N.use(y.default);var P=function(){function e(t){o(this,e),this.eventManager=t}return a(e,[{key:"_markdownToHtmlWithCodeHighlight",value:function(e){e=e.replace(/<br>/gi,"<br data-tomark-pass>");for(var t=/(<img[^>]*)(onerror\s*=\s*[\"']?[^\"']*[\"']?)(.*)/i;t.exec(e);)e=e.replace(t,"$1$3");var n=O.render(e);return n=this._removeBrToMarkPassAttributeInCode(n)}},{key:"_markdownToHtml",value:function(e){e=e.replace(/<br>/gi,"<br data-tomark-pass>");for(var t=/(<img[^>]*)(onerror\s*=\s*[\"']?[^\"']*[\"']?)(.*)/i;t.exec(e);)e=e.replace(t,"$1$3");var n=N.render(e);return n=this._removeBrToMarkPassAttributeInCode(n)}},{key:"_removeBrToMarkPassAttributeInCode",value:function(e){var t=(0,l.default)("<div />");return t.html(e),t.find("code, pre").each(function(e,t){var n=(0,l.default)(t);n.html(n.html().replace(/<br data-tomark-pass>/,"<br>"))}),e=t.html()}},{key:"toHTMLWithCodeHightlight",value:function(e){var t=this._markdownToHtmlWithCodeHighlight(e);return t=this.eventManager.emitReduce("convertorAfterMarkdownToHtmlConverted",t)}},{key:"toHTML",value:function(e){var t=this._markdownToHtml(e);return t=this.eventManager.emitReduce("convertorAfterMarkdownToHtmlConverted",t)}},{key:"initHtmlSanitizer",value:function(){this.eventManager.listen("convertorAfterMarkdownToHtmlConverted",function(e){return(0,g.default)(e,!0)})}},{key:"toMarkdown",value:function(e,t){var n=[];e=this.eventManager.emitReduce("convertorBeforeHtmlToMarkdownConverted",e);var r=(0,h.default)(this._appendAttributeForBrIfNeed(e),t);return r=this.eventManager.emitReduce("convertorAfterHtmlToMarkdownConverted",r),s.default.forEach(r.split("\n"),function(e,t){var r=/^\|[^|]*\|/gi;/`[^`]*<br>[^`]*`/gi.test(e)||r.test(e)||(e=e.replace(/<br>/gi,"<br>\n")),n[t]=e}),n.join("\n")}},{key:"_appendAttributeForBrIfNeed",value:function(e){var t=/<br>/gi,n=/<br \/><br \/>/gi,r=/<br data-tomark-pass \/><br \/>(.)/gi,o=/([^>]|<\/a>|<\/code>|<\/span>|<\/b>|<\/i>|<\/s>|<img [^>]*>)/,a=/<br data-tomark-pass \/><br data-tomark-pass \/>/,i=new RegExp(o.source+a.source,"g");e=e.replace(t,"<br />"),e=e.replace(n,"<br data-tomark-pass /><br data-tomark-pass />");var u=document.createElement("div"),s=(0,l.default)(u);return s.html(e),s.find("pre br,code br").each(function(e,t){t.hasAttribute("data-tomark-pass")&&t.removeAttribute("data-tomark-pass")}),e=s.html().replace(/<br data-tomark-pass="">/gi,"<br data-tomark-pass />"),e=e.replace(t,"<br />"),e=e.replace(r,"<br data-tomark-pass /><br data-tomark-pass />$1"),e=e.replace(i,"$1<br /><br />")}}],[{key:"getMarkdownitHighlightRenderer",value:function(){return O}},{key:"getMarkdownitRenderer",value:function(){return N}}]),e}();t.default=P},function(e,t){e.exports=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n=(0,s.default)("<div />");return e=e.replace(/<!--[\s\S]*?-->/g,""),n.append(e),a(n),i(n),l(n,t)}function a(e){e.find("script, iframe, textarea, form, button, select, meta, style, link, title").remove()}function i(e){e.find("*").each(function(e,t){var n=t.attributes,r=f.default.toArray(n).filter(function(e){var t=e.name.match(d),n=e.name.match(h);return!t&&!n});f.default.forEachArray(r,function(e){n.getNamedItem(e.name)&&n.removeNamedItem(e.name)})})}function l(e,t){var n=void 0;if(t)n=e[0].innerHTML;else{for(var r=document.createDocumentFragment(),o=f.default.toArray(e[0].childNodes),a=o.length,i=0;i<a;i+=1)r.appendChild(o[i]);n=r}return n}Object.defineProperty(t,"__esModule",{value:!0});var u=n(0),s=r(u),c=n(1),f=r(c),d=new RegExp("^(abbr|align|alt|axis|bgcolor|border|cellpadding|cellspacing|class|clear|color|cols|compact|coords|dir|face|headers|height|hreflang|hspace|ismap|lang|language|nohref|nowrap|rel|rev|rows|rules|scope|scrolling|shape|size|span|start|summary|tabindex|target|title|type|valign|value|vspace|width|checked|mathvariant|encoding|id|name|background|cite|href|longdesc|src|usemap|xlink:href|data-+|checked|style)","g"),h=new RegExp("^(accent-height|accumulate|additive|alphabetic|arabic-form|ascent|baseProfile|bbox|begin|by|calcMode|cap-height|class|color|color-rendering|content|cx|cy|d|dx|dy|descent|display|dur|end|fill|fill-rule|font-family|font-size|font-stretch|font-style|font-variant|font-weight|from|fx|fy|g1|g2|glyph-name|gradientUnits|hanging|height|horiz-adv-x|horiz-origin-x|ideographic|k|keyPoints|keySplines|keyTimes|lang|marker-end|marker-mid|marker-start|markerHeight|markerUnits|markerWidth|mathematical|max|min|offset|opacity|orient|origin|overline-position|overline-thickness|panose-1|path|pathLength|points|preserveAspectRatio|r|refX|refY|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|rotate|rx|ry|slope|stemh|stemv|stop-color|stop-opacity|strikethrough-position|strikethrough-thickness|stroke|stroke-dasharray|stroke-dashoffset|stroke-linecap|stroke-linejoin|stroke-miterlimit|stroke-opacity|stroke-width|systemLanguage|target|text-anchor|to|transform|type|u1|u2|underline-position|underline-thickness|unicode|unicode-range|units-per-em|values|version|viewBox|visibility|width|widths|x|x-height|x1|x2|xlink:actuate|xlink:arcrole|xlink:role|xlink:show|xlink:title|xlink:type|xml:base|xml:lang|xml:space|xmlns|xmlns:xlink|y|y1|y2|zoomAndPan)","g");t.default=o},function(e,t,n){"use strict";function r(e){e.content=e.content.slice(4),e.children[0].content=e.children[0].content.slice(4)}function o(e){var t=!1;return 0!==e.content.indexOf("[x]")&&0!==e.content.indexOf("[X]")||(t=!0),t}function a(e,t,n){var r=e.attrIndex(t),o=[t,n];r<0?e.attrPush(o):e.attrs[r]=o}function i(e,t){return"inline"===e[t].type&&"paragraph_open"===e[t-1].type&&"list_item_open"===e[t-2].type&&(0===e[t].content.indexOf("[ ]")||0===e[t].content.indexOf("[x]")||0===e[t].content.indexOf("[X]"))}var l=function(e){e.core.ruler.after("inline","tui-task-list",function(e){var t,n,l=e.tokens;for(n=2;n<l.length;n+=1)i(l,n)&&(t=o(l[n])?"task-list-item checked":"task-list-item",r(l[n]),a(l[n-2],"class",t),a(l[n-2],"data-te-task",""))})};e.exports=l},function(e,t,n){"use strict";function r(e,t,n){var r=e.attrIndex(t),o=[t,n];r<0?e.attrPush(o):e.attrs[r]=o}function o(e){return!0===e.block&&"code"===e.tag&&"fence"===e.type}function a(e,t){return e.replace(t?/&/g:/&(?!#?\w+;)/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}var i=function(e){e.core.ruler.after("block","tui-code-block",function(e){var t,n,i,l=e.tokens;for(n=0;n<l.length;n+=1)t=l[n],o(t)&&(i=t.markup.length,i>3&&r(t,"data-backticks",i),t.info&&r(t,"data-language",a(t.info.replace(" ",""),!0)))})};e.exports=i},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,o,a,i=/ {0,3}(?:-|\*|\d\.) /,l=e.src.split("\n"),u=l[t],s=0;if(u.match(i)||e.sCount[t]-e.blkIndent<4)return!1;for(o=r=t+1;r<n;)if(e.isEmpty(r)){if(++s>=2&&"list"===e.parentType)break;r++}else{if(s=0,!(e.sCount[r]-e.blkIndent>=4))break;r++,o=r}return e.line=o,a=e.push("code_block","code",0),a.content=e.getLines(t,o,4+e.blkIndent,!0),a.map=[t,e.line],!0}},function(e,t,n){"use strict";function r(e){switch(e){case 9:case 32:return!0}return!1}e.exports=function(e,t,n,o){var a,i,l,u,s,c,f,d,h,p,g,v,m,b,y,w,_,E,k,x,C=e.lineMax,M=e.bMarks[t]+e.tShift[t],T=e.eMarks[t],S=/(?:-|\*|\d+\.) {1,4}(?:> {0,3})[^>]*$/,I=e.src.split("\n"),R=I[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(62!==e.src.charCodeAt(M++))return!1;if(R.match(S))return!1;if(o)return!0;for(u=h=e.sCount[t]+M-(e.bMarks[t]+e.tShift[t]),32===e.src.charCodeAt(M)?(M++,u++,h++,a=!1,w=!0):9===e.src.charCodeAt(M)?(w=!0,(e.bsCount[t]+h)%4==3?(M++,u++,h++,a=!1):a=!0):w=!1,p=[e.bMarks[t]],e.bMarks[t]=M;M<T&&(i=e.src.charCodeAt(M),r(i));)9===i?h+=4-(h+e.bsCount[t]+(a?1:0))%4:h++,M++;for(g=[e.bsCount[t]],e.bsCount[t]=e.sCount[t]+1+(w?1:0),c=M>=T,b=[e.sCount[t]],e.sCount[t]=h-u,y=[e.tShift[t]],e.tShift[t]=M-e.bMarks[t],E=e.md.block.ruler.getRules("blockquote"),m=e.parentType,e.parentType="blockquote",x=!1,d=t+1;d<n&&(e.sCount[d]<e.blkIndent&&(x=!0),M=e.bMarks[d]+e.tShift[d],T=e.eMarks[d],!(M>=T));d++)if(62!==e.src.charCodeAt(M++)||x){if(c)break;for(_=!1,l=0,s=E.length;l<s;l++)if(E[l](e,d,n,!0)){_=!0;break}if(_){e.lineMax=d,0!==e.blkIndent&&(p.push(e.bMarks[d]),g.push(e.bsCount[d]),y.push(e.tShift[d]),b.push(e.sCount[d]),e.sCount[d]-=e.blkIndent);break}p.push(e.bMarks[d]),g.push(e.bsCount[d]),y.push(e.tShift[d]),b.push(e.sCount[d]),e.sCount[d]=-1}else{for(u=h=e.sCount[d]+M-(e.bMarks[d]+e.tShift[d]),32===e.src.charCodeAt(M)?(M++,u++,h++,a=!1,w=!0):9===e.src.charCodeAt(M)?(w=!0,(e.bsCount[d]+h)%4==3?(M++,u++,h++,a=!1):a=!0):w=!1,p.push(e.bMarks[d]),e.bMarks[d]=M;M<T&&(i=e.src.charCodeAt(M),r(i));)9===i?h+=4-(h+e.bsCount[d]+(a?1:0))%4:h++,M++;c=M>=T,g.push(e.bsCount[d]),e.bsCount[d]=e.sCount[d]+1+(w?1:0),b.push(e.sCount[d]),e.sCount[d]=h-u,y.push(e.tShift[d]),e.tShift[d]=M-e.bMarks[d]}for(v=e.blkIndent,e.blkIndent=0,k=e.push("blockquote_open","blockquote",1),k.markup=">",k.map=f=[t,0],e.md.block.tokenize(e,t,d),k=e.push("blockquote_close","blockquote",-1),k.markup=">",e.lineMax=C,e.parentType=m,f[1]=e.line,l=0;l<y.length;l++)e.bMarks[l+t]=p[l],e.tShift[l+t]=y[l],e.sCount[l+t]=b[l],e.bsCount[l+t]=g[l];return e.blkIndent=v,!0}},function(e,t,n){"use strict";function r(e,t){var n=e.bMarks[t]+e.blkIndent,r=e.eMarks[t];return e.src.substr(n,r-n)}function o(e){var t,n=[],r=0,o=e.length,a=0,i=0,l=!1,u=0;for(t=e.charCodeAt(r);r<o;)96===t&&a%2==0?(l=!l,u=r):124!==t||a%2!=0||l?92===t?a+=1:a=0:(n.push(e.substring(i,r)),i=r+1),r+=1,r===o&&l&&(l=!1,r=u+1),t=e.charCodeAt(r);return n.push(e.substring(i)),n}e.exports=function(e,t,n,a){var i,l,u,s,c,f,d,h,p,g,v,m,b;if(t+2>n)return!1;if(c=t+1,e.sCount[c]<e.blkIndent)return!1;if((u=e.bMarks[c]+e.tShift[c])>=e.eMarks[c])return!1;if(124!==(i=e.src.charCodeAt(u))&&45!==i&&58!==i)return!1;if(l=r(e,t+1),!/^[-:| ]+$/.test(l))return!1;for(f=l.split("|"),p=[],s=0;s<f.length;s+=1){if(!(v=f[s].trim())){if(0===s||s===f.length-1)continue;return!1}if(!/^:?-+:?$/.test(v))return!1;58===v.charCodeAt(v.length-1)?p.push(58===v.charCodeAt(0)?"center":"right"):58===v.charCodeAt(0)?p.push("left"):p.push("")}if(g=p.length,l=r(e,t).trim(),-1===l.indexOf("|"))return!1;if(f=o(l.replace(/^\||\|$/g,"")),(d=f.length)>g)return!1;if(d<g){for(s=0;s<g-d;s+=1)f.push("");d=f.length}if(a)return!0;for(h=e.push("table_open","table",1),h.map=m=[t,0],h=e.push("thead_open","thead",1),h.map=[t,t+1],h=e.push("tr_open","tr",1),h.map=[t,t+1],s=0;s<d;s+=1)h=e.push("th_open","th",1),h.map=[t,t+1],p[s]&&(h.attrs=[["align",p[s]]]),h=e.push("inline","",0),h.content=f[s].trim(),h.map=[t,t+1],h.children=[],h=e.push("th_close","th",-1);for(h=e.push("tr_close","tr",-1),h=e.push("thead_close","thead",-1),h=e.push("tbody_open","tbody",1),h.map=b=[t+2,0],c=t+2;c<n&&!(e.sCount[c]<e.blkIndent)&&(l=r(e,c),-1!==l.indexOf("|"));c+=1){for(f=o(l.replace(/^\||\|\s*$/g,"")),h=e.push("tr_open","tr",1),s=0;s<d;s+=1)h=e.push("td_open","td",1),p[s]&&(h.attrs=[["align",p[s]]]),h=e.push("inline","",0),h.content=f[s]?f[s].trim():"",h.children=[],h=e.push("td_close","td",-1);h=e.push("tr_close","tr",-1)}return h=e.push("tbody_close","tbody",-1),h=e.push("table_close","table",-1),m[1]=b[1]=c,e.line=c,!0}},function(e,t,n){"use strict";var r=["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],o=[[/^<(script|pre|style)(?=(\s|>|$))/i,/<\/(script|pre|style)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^<("+r.join("|")+")","i"),/^\/?>$/,!0],[new RegExp("^</?(address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|pre|section|source|title|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?=(\\s|/?>|$))","i"),/^$/,!0],[/^(?:<[A-Za-z][A-Za-z0-9\-]*(?:\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\s*=\s*(?:[^"'=<>`\x00-\x20]+|'[^']*'|"[^"]*"))?)*\s*\/?>|<\/[A-Za-z][A-Za-z0-9\-]*\s*>)\s*$/,/^$/,!1]];e.exports=function(e,t,n,r){var a,i,l,u,s=e.bMarks[t]+e.tShift[t],c=e.eMarks[t];if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(s))return!1;for(u=e.src.slice(s,c),a=0;a<o.length;a++)if(o[a][0].test(u)){if(5===a)return!1;break}if(a===o.length)return!1;if(r)return o[a][2];if(i=t+1,!o[a][1].test(u))for(;i<n&&!(e.sCount[i]<e.blkIndent);i++)if(s=e.bMarks[i]+e.tShift[i],c=e.eMarks[i],u=e.src.slice(s,c),o[a][1].test(u)){0!==u.length&&i++;break}return e.line=i,l=e.push("html_block","",0),l.map=[t,i],l.content=e.getLines(t,i,e.blkIndent,!0),!0}},function(e,t,n){"use strict";e.exports=function(e,t){var n,r,o,a,i,l,u=e.pos;if(96!==e.src.charCodeAt(u))return!1;for(n=u,u++,r=e.posMax;u<r&&96===e.src.charCodeAt(u);)u++;for(o=e.src.slice(n,u),a=i=u;-1!==(a=e.src.indexOf("`",i));){for(i=a+1;i<r&&96===e.src.charCodeAt(i);)i++;if(i-a===o.length)return t||(l=e.push("code_inline","code",0),l.markup=o,l.content=e.src.slice(u,a).replace(/[ \n]+/g," ").trim(),l.attrSet("data-backticks",l.markup.length)),e.pos=i,!0}return t||(e.pending+=o),e.pos+=o.length,!0}},function(e,t){e.exports=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=r(o),i=n(1),l=r(i),u=/\u200B/g,s=function(e){return e&&e.nodeType===Node.TEXT_NODE},c=function(e){return e&&e.nodeType===Node.ELEMENT_NODE},f=function(e){return/^(ADDRESS|ARTICLE|ASIDE|BLOCKQUOTE|DETAILS|DIALOG|DD|DIV|DL|DT|FIELDSET|FIGCAPTION|FIGURE|FOOTER|FORM|H[\d]|HEADER|HGROUP|HR|LI|MAIN|NAV|OL|P|PRE|SECTION|UL)$/gi.test(this.getNodeName(e))},d=function(e){return c(e)?e.tagName:"TEXT"},h=function(e){var t=void 0;return c(e)?t=e.textContent.replace(u,"").length:s(e)&&(t=e.nodeValue.replace(u,"").length),t},p=function(e){var t=void 0;return c(e)?t=e.childNodes.length:s(e)&&(t=e.nodeValue.replace(u,"").length),t},g=function(e){var t=e.parentNode.childNodes,n=void 0,r=void 0,o=void 0;for(n=0,r=t.length;n<r;n+=1)if(t[n]===e){o=n;break}return o},v=function(e,t){var n=void 0;return s(e)?n=e:e.childNodes.length&&t>=0&&(n=e.childNodes[t]),n},m=function(e,t,n){for(var r=e+"Sibling",o=void 0,a=void 0;t&&!t[r]&&(o=d(t.parentNode))!==n&&"BODY"!==o;)t=t.parentNode;return t[r]&&(a=t[r]),a},b=function(e,t,n){return t>0?v(e,t-1):m("previous",e,n)},y=function(e,t,n){for(var r=void 0;e.parentNode&&!t(e.parentNode)&&(e=e.parentNode,!n||!n(e.parentNode)););return t(e.parentNode)&&(r=e),r},w=function(e,t){return l.default.isString(t)?y(e,function(e){return t===d(e)}):y(e,function(e){return t===e})},_=function(e,t,n){var r=e+"Sibling",o=void 0;return t=w(t,n),t&&t[r]&&(o=t[r]),o},E=function(e,t){return _("previous",e,t)},k=function(e,t){return _("next",e,t)},x=function(e){return w(e,"BODY")},C=function(e){for(e=e.previousSibling||e.parentNode;!s(e)&&"BODY"!==d(e);)if(e.previousSibling)for(e=e.previousSibling;e.lastChild;)e=e.lastChild;else e=e.parentNode;return"BODY"===d(e)&&(e=null),e},M=function(e,t){for(var n=document.createTreeWalker(e,4,null,!1),r=e===t;!r&&n.nextNode();)r=n.currentNode===t;return r},T=function(e,t,n){var r=[],o="",a=0,i=void 0;if(!t.length)return r;for(var u=t.shift(),s=document.createTreeWalker(e,4,null,!1);s.nextNode();){for(o=s.currentNode.nodeValue||"",n&&(o=n(o)),i=a+o.length;i>=u;){if(r.push({container:s.currentNode,offsetInContainer:u-a,offset:u}),!t.length)return r;u=t.shift()}a=i}do{r.push({container:s.currentNode,offsetInContainer:o.length,offset:u}),u=t.shift()}while(!l.default.isUndefined(u));return r},S=function(e){var t={};t.tagName=e.nodeName,e.id&&(t.id=e.id);var n=e.className.trim();return n&&(t.className=n),t},I=function(e,t){for(var n=[];e&&e!==t;)c(e)&&n.unshift(S(e)),e=e.parentNode;return n},R=function(e,t){var n=!0;return l.default.isUndefined(t)||"next"!==t&&"previous"!==t?null:("previous"===t&&(n=!1),n?e.nextElementSibling:e.previousElementSibling)},A=function(e,t,n){var r=!0,o=null,i=void 0,u=void 0,s=void 0,c=void 0,f=void 0,h=void 0;return l.default.isUndefined(t)||"next"!==t&&"previous"!==t?null:("previous"===t&&(r=!1),e?(i=(0,a.default)(e),r?(s=i.parent().next(),c=i.parents("thead"),f=c[0]&&c.next(),h=f&&"TBODY"===d(f[0]),u=0):(s=i.parent().prev(),c=i.parents("tbody"),f=c[0]&&c.prev(),h=f&&"THEAD"===d(f[0]),u=e.parentNode.childNodes.length-1),!l.default.isUndefined(n)&&n||(u=g(e)),s[0]?o=s.children("td,th")[u]:c[0]&&h&&(o=f.find("td,th")[u]),o):null)},O=function(e){return/^(A|B|BR|CODE|DEL|EM|I|IMG|S|SPAN|STRONG)$/gi.test(e.nodeName)},N=function(e){return/^(A|ABBR|ACRONYM|B|BDI|BDO|BIG|CITE|CODE|DEL|DFN|EM|I|INS|KBD|MARK|Q|S|SAMP|SMALL|SPAN|STRONG|SUB|SUP|U|VAR)$/gi.test(e.nodeName)},P=function(e,t,n){var r=t;if(r&&e===r.parentNode)for(;r!==n;){var o=r.nextSibling;e.removeChild(r),r=o}},L=function(e,t,n){for(var r=t;r!==e;){var o=r.parentNode,a=r,i=a.nextSibling,l=a.previousSibling;!n&&i?P(o,i,null):n&&l&&P(o,o.childNodes[0],r),r=o}},D=function(e){for(var t=e;t.childNodes&&t.childNodes.length;){var n=t,r=n.firstChild;t=s(r)&&!h(r)?r.nextSibling||r:r}return t};t.default={getNodeName:d,isTextNode:s,isElemNode:c,isBlockNode:f,getTextLength:h,getOffsetLength:p,getPrevOffsetNodeUntil:b,getNodeOffsetOfParent:g,getChildNodeByOffset:v,containsNode:M,getTopPrevNodeUnder:E,getTopNextNodeUnder:k,getParentUntilBy:y,getParentUntil:w,getTopBlockNode:x,getPrevTextNode:C,findOffsetNode:T,getPath:I,getNodeInfo:S,getTableCellByDirection:R,getSiblingRowCellByDirection:A,isMDSupportInlineNode:O,isStyledNode:N,removeChildFromStartToEndNode:P,removeNodesByDirection:L,getLeafNode:D}},function(e,t,n){"use strict";"function"==typeof Symbol&&Symbol.iterator;!function(r){var o={};o.RELAXED=!1,o.IGNORE_RECORD_LENGTH=!1,o.IGNORE_QUOTES=!1,o.LINE_FEED_OK=!0,o.CARRIAGE_RETURN_OK=!0,o.DETECT_TYPES=!0,o.IGNORE_QUOTE_WHITESPACE=!0,o.DEBUG=!1,o.COLUMN_SEPARATOR=",",o.ERROR_EOF="UNEXPECTED_END_OF_FILE",o.ERROR_CHAR="UNEXPECTED_CHARACTER",o.ERROR_EOL="UNEXPECTED_END_OF_RECORD",o.WARN_SPACE="UNEXPECTED_WHITESPACE";o.parse=function(e){var t=o.result=[];o.COLUMN_SEPARATOR=o.COLUMN_SEPARATOR instanceof RegExp?new RegExp("^"+o.COLUMN_SEPARATOR.source):o.COLUMN_SEPARATOR,o.offset=0,o.str=e,o.record_begin(),o.debug("parse()",e);for(var n;;){if(n=e[o.offset++],o.debug("c",n),null==n){o.escaped&&o.error(o.ERROR_EOF),o.record&&(o.token_end(),o.record_end()),o.debug("...bail",n,o.state,o.record),o.reset();break}if(null==o.record){if(o.RELAXED&&("\n"==n||"\r"==n&&"\n"==e[o.offset+1]))continue;o.record_begin()}if(0==o.state){if((" "===n||"\t"===n)&&'"'==o.next_nonspace()){if(o.RELAXED||o.IGNORE_QUOTE_WHITESPACE)continue;o.warn(o.WARN_SPACE)}if('"'==n&&!o.IGNORE_QUOTES){o.debug("...escaped start",n),o.escaped=!0,o.state=1;continue}o.state=1}1==o.state&&o.escaped?'"'==n?'"'==e[o.offset]?(o.debug("...escaped quote",n),o.token+='"',o.offset++):(o.debug("...escaped end",n),o.escaped=!1,o.state=2):(o.token+=n,o.debug("...escaped add",n,o.token)):"\r"==n?("\n"==e[o.offset]?o.offset++:o.CARRIAGE_RETURN_OK||o.error(o.ERROR_CHAR),o.token_end(),o.record_end()):"\n"==n?(o.LINE_FEED_OK||o.RELAXED||o.error(o.ERROR_CHAR),o.token_end(),o.record_end()):o.test_regex_separator(e)||o.COLUMN_SEPARATOR==n?o.token_end():1==o.state?(o.token+=n,o.debug("...add",n,o.token)):" "===n||"\t"===n?o.IGNORE_QUOTE_WHITESPACE||o.error(o.WARN_SPACE):o.RELAXED||o.error(o.ERROR_CHAR)}return t},o.stream=function(){var e=n(19),t=new e.Transform({objectMode:!0});return t.EOL="\n",t.prior="",t.emitter=function(e){return function(t){e.push(o.parse(t+e.EOL))}}(t),t._transform=function(e,t,n){var r=""==this.prior?e.toString().split(this.EOL):(this.prior+e.toString()).split(this.EOL);this.prior=r.pop(),r.forEach(this.emitter),n()},t._flush=function(e){""!=this.prior&&(this.emitter(this.prior),this.prior=""),e()},t},o.test_regex_separator=function(e){if(!(o.COLUMN_SEPARATOR instanceof RegExp))return!1;var t;return e=e.slice(o.offset-1),t=o.COLUMN_SEPARATOR.exec(e),t&&(o.offset+=t[0].length-1),null!==t},o.stream.json=function(){var e=n(63),t=(n(19),new streamTransform({objectMode:!0}));return t._transform=function(n,r,o){t.push(JSON.stringify(n.toString())+e.EOL),o()},t},o.reset=function(){o.state=null,o.token=null,o.escaped=null,o.record=null,o.offset=null,o.result=null,o.str=null},o.next_nonspace=function(){for(var e,t=o.offset;t<o.str.length;)if(" "!=(e=o.str[t++])&&"\t"!==e)return e;return null},o.record_begin=function(){o.escaped=!1,o.record=[],o.token_begin(),o.debug("record_begin")},o.record_end=function(){o.state=4,!o.IGNORE_RECORD_LENGTH&&!o.RELAXED&&o.result.length>0&&o.record.length!=o.result[0].length&&o.error(o.ERROR_EOL),o.result.push(o.record),o.debug("record end",o.record),o.record=null},o.resolve_type=function(e){return e.match(/^[-+]?[0-9]+(\.[0-9]+)?([eE][-+]?[0-9]+)?$/)?e=parseFloat(e):e.match(/^(true|false)$/i)?e=Boolean(e.match(/true/i)):"undefined"===e?e=void 0:"null"===e&&(e=null),e},o.token_begin=function(){o.state=0,o.token=""},o.token_end=function(){o.DETECT_TYPES&&(o.token=o.resolve_type(o.token)),o.record.push(o.token),o.debug("token end",o.token),o.token_begin()},o.debug=function(){o.DEBUG&&console.log(arguments)},o.dump=function(e){return[e,"at char",o.offset,":",o.str.substr(o.offset-50,50).replace(/\r/gm,"\\r").replace(/\n/gm,"\\n").replace(/\t/gm,"\\t")].join(" ")},o.error=function(e){var t=o.dump(e);throw o.reset(),t},o.warn=function(e){if(o.DEBUG){var t=o.dump(e);try{return void console.warn(t)}catch(e){}try{console.log(t)}catch(e){}}},void 0!==e&&e.exports?e.exports=o:t.CSV=o}()},function(e,t,n){"use strict";function r(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function o(e){return 3*e.length/4-r(e)}function a(e){var t,n,o,a,i,l=e.length;a=r(e),i=new f(3*l/4-a),n=a>0?l-4:l;var u=0;for(t=0;t<n;t+=4)o=c[e.charCodeAt(t)]<<18|c[e.charCodeAt(t+1)]<<12|c[e.charCodeAt(t+2)]<<6|c[e.charCodeAt(t+3)],i[u++]=o>>16&255,i[u++]=o>>8&255,i[u++]=255&o;return 2===a?(o=c[e.charCodeAt(t)]<<2|c[e.charCodeAt(t+1)]>>4,i[u++]=255&o):1===a&&(o=c[e.charCodeAt(t)]<<10|c[e.charCodeAt(t+1)]<<4|c[e.charCodeAt(t+2)]>>2,i[u++]=o>>8&255,i[u++]=255&o),i}function i(e){return s[e>>18&63]+s[e>>12&63]+s[e>>6&63]+s[63&e]}function l(e,t,n){for(var r,o=[],a=t;a<n;a+=3)r=(e[a]<<16)+(e[a+1]<<8)+e[a+2],o.push(i(r));return o.join("")}function u(e){for(var t,n=e.length,r=n%3,o="",a=[],i=0,u=n-r;i<u;i+=16383)a.push(l(e,i,i+16383>u?u:i+16383));return 1===r?(t=e[n-1],o+=s[t>>2],o+=s[t<<4&63],o+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],o+=s[t>>10],o+=s[t>>4&63],o+=s[t<<2&63],o+="="),a.push(o),a.join("")}t.byteLength=o,t.toByteArray=a,t.fromByteArray=u;for(var s=[],c=[],f="undefined"!=typeof Uint8Array?Uint8Array:Array,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,p=d.length;h<p;++h)s[h]=d[h],c[d.charCodeAt(h)]=h;c["-".charCodeAt(0)]=62,c["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,o){var a,i,l=8*o-r-1,u=(1<<l)-1,s=u>>1,c=-7,f=n?o-1:0,d=n?-1:1,h=e[t+f];for(f+=d,a=h&(1<<-c)-1,h>>=-c,c+=l;c>0;a=256*a+e[t+f],f+=d,c-=8);for(i=a&(1<<-c)-1,a>>=-c,c+=r;c>0;i=256*i+e[t+f],f+=d,c-=8);if(0===a)a=1-s;else{if(a===u)return i?NaN:1/0*(h?-1:1);i+=Math.pow(2,r),a-=s}return(h?-1:1)*i*Math.pow(2,a-r)},t.write=function(e,t,n,r,o,a){var i,l,u,s=8*a-o-1,c=(1<<s)-1,f=c>>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:a-1,p=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,i=c):(i=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-i))<1&&(i--,u*=2),t+=i+f>=1?d/u:d*Math.pow(2,1-f),t*u>=2&&(i++,u/=2),i+f>=c?(l=0,i=c):i+f>=1?(l=(t*u-1)*Math.pow(2,o),i+=f):(l=t*Math.pow(2,f-1)*Math.pow(2,o),i=0));o>=8;e[n+h]=255&l,h+=p,l/=256,o-=8);for(i=i<<o|l,s+=o;s>0;e[n+h]=255&i,h+=p,i/=256,s-=8);e[n+h-p]|=128*g}},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t,n){e.copy(t,n)}var a=n(12).Buffer;e.exports=function(){function e(){r(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return a.alloc(0);if(1===this.length)return this.head.data;for(var t=a.allocUnsafe(e>>>0),n=this.head,r=0;n;)o(n.data,t,r),r+=n.data.length,n=n.next;return t},e}()},function(e,t,n){function r(e,t){this._id=e,this._clearFn=t}var o=Function.prototype.apply;t.setTimeout=function(){return new r(o.call(setTimeout,window,arguments),clearTimeout)},t.setInterval=function(){return new r(o.call(setInterval,window,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(window,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(56),t.setImmediate=setImmediate,t.clearImmediate=clearImmediate},function(e,t,n){(function(e,t){!function(e,n){"use strict";function r(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var r={callback:e,args:t};return s[u]=r,l(u),u++}function o(e){delete s[e]}function a(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(n,r)}}function i(e){if(c)setTimeout(i,0,e);else{var t=s[e];if(t){c=!0;try{a(t)}finally{o(e),c=!1}}}}if(!e.setImmediate){var l,u=1,s={},c=!1,f=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?function(){l=function(e){t.nextTick(function(){i(e)})}}():function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?function(){var t="setImmediate$"+Math.random()+"$",n=function(n){n.source===e&&"string"==typeof n.data&&0===n.data.indexOf(t)&&i(+n.data.slice(t.length))};e.addEventListener?e.addEventListener("message",n,!1):e.attachEvent("onmessage",n),l=function(n){e.postMessage(t+n,"*")}}():e.MessageChannel?function(){var e=new MessageChannel;e.port1.onmessage=function(e){i(e.data)},l=function(t){e.port2.postMessage(t)}}():f&&"onreadystatechange"in f.createElement("script")?function(){var e=f.documentElement;l=function(t){var n=f.createElement("script");n.onreadystatechange=function(){i(t),n.onreadystatechange=null,e.removeChild(n),n=null},e.appendChild(n)}}():function(){l=function(e){setTimeout(i,0,e)}}(),d.setImmediate=r,d.clearImmediate=o}}("undefined"==typeof self?void 0===e?this:e:self)}).call(t,n(8),n(10))},function(e,t,n){(function(t){function n(e,t){function n(){if(!o){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),o=!0}return e.apply(this,arguments)}if(r("noDeprecation"))return e;var o=!1;return n}function r(e){try{if(!t.localStorage)return!1}catch(e){return!1}var n=t.localStorage[e];return null!=n&&"true"===String(n).toLowerCase()}e.exports=n}).call(t,n(8))},function(e,t,n){"use strict";function r(e){if(!(this instanceof r))return new r(e);o.call(this,e)}e.exports=r;var o=n(26),a=n(9);a.inherits=n(7),a.inherits(r,o),r.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){e.exports=n(15)},function(e,t,n){e.exports=n(6)},function(e,t,n){e.exports=n(14).Transform},function(e,t,n){e.exports=n(14).PassThrough},function(e,t){t.endianness=function(){return"LE"},t.hostname=function(){return"undefined"!=typeof location?location.hostname:""},t.loadavg=function(){return[]},t.uptime=function(){return 0},t.freemem=function(){return Number.MAX_VALUE},t.totalmem=function(){return Number.MAX_VALUE},t.cpus=function(){return[]},t.type=function(){return"Browser"},t.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},t.networkInterfaces=t.getNetworkInterfaces=function(){return{}},t.arch=function(){return"javascript"},t.platform=function(){return"browser"},t.tmpdir=t.tmpDir=function(){return"/tmp"},t.EOL="\n",t.homedir=function(){return"/"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=e.eventManager;if(e.toMarkOptions=e.toMarkOptions||{},e.toMarkOptions.renderer=y.default,s(t),!e.isViewer()){var n=e.wwEditor.componentManager,r=e.getUI().getPopupTableUtils();a(e),i(n),r&&j.default.updateContextMenu(r,t,n.getManager("tableSelection"))}}function a(e){e.addCommand(L.default),e.addCommand(B.default)}function i(e){e.removeManager("table"),e.removeManager("tableSelection"),e.addManager(_.default),e.addManager(k.default)}function l(e,t){var n=(0,f.default)("<div>"+e+"</div>"),r=n.find("table");return r.length&&(r.get().forEach(function(e){var n=t(e);(0,f.default)(e).replaceWith(n)}),e=n.html()),e}function u(e){var t=e.command;if(t.isWWType())switch(t.getName()){case"AddRow":e.command=C.default;break;case"AddCol":e.command=T.default;break;case"RemoveRow":e.command=I.default;break;case"RemoveCol":e.command=A.default;break;case"AlignCol":e.command=N.default}}function s(e){e.listen("convertorAfterMarkdownToHtmlConverted",function(e){return l(e,g.default)}),e.listen("convertorBeforeHtmlToMarkdownConverted",function(e){return l(e,m.default)}),e.listen("addCommandBefore",u)}var c=n(0),f=r(c),d=n(2),h=r(d);n(65);var p=n(66),g=r(p),v=n(67),m=r(v),b=n(68),y=r(b),w=n(69),_=r(w),E=n(70),k=r(E),x=n(71),C=r(x),M=n(72),T=r(M),S=n(73),I=r(S),R=n(74),A=r(R),O=n(75),N=r(O),P=n(76),L=r(P),D=n(77),B=r(D),U=n(78),j=r(U);h.default.defineExtension("table",o)},function(e,t,n){"use strict";var r=n(2),o=function(e){return e&&e.__esModule?e:{default:e}}(r),a=o.default.i18n;a&&(a.setLanguage(["ko","ko_KR"],{"Merge cells":"셀 병합","Unmerge cells":"셀 병합해제","Cannot change part of merged cell":"병합 된 셀의 일부를 변경할 수 없습니다.","Cannot paste row merged cells into the table header":"테이블 헤더에는 행 병합된 셀을 붙여넣을 수 없습니다."}),a.setLanguage(["en","en_US"],{"Merge cells":"Merge cells","Unmerge cells":"Unmerge cells","Cannot change part of merged cell":"Cannot change part of merged cell.","Cannot paste row merged cells into the table header":"Cannot paste row merged cells into the table header."}),a.setLanguage(["es","es_ES"],{"Merge cells":"Combinar celdas","Unmerge cells":"Separar celdas","Cannot change part of merged cell":"No se puede cambiar parte de una celda combinada.","Cannot paste row merged cells into the table header":"No se pueden pegar celdas combinadas en el encabezado de tabla."}),a.setLanguage(["ja","ja_JP"],{"Merge cells":"セルの結合","Unmerge cells":"セルの結合を解除","Cannot change part of merged cell":"結合されたセルの一部を変更することはできません。","Cannot paste row merged cells into the table header":"行にマージされたセルをヘッダーに貼り付けることはできません。"}),a.setLanguage(["nl","nl_NL"],{"Merge cells":"Cellen samenvoegen","Unmerge cells":"Samengevoegde cellen ongedaan maken","Cannot change part of merged cell":"Kan geen deel uit van een samengevoegde cel veranderen.","Cannot paste row merged cells into the table header":"Kan geen rij met samengevoegde cellen in de koptekst plakken."}),a.setLanguage(["zh","zh_CN"],{"Merge cells":"合并单元格","Unmerge cells":"取消合并单元格","Cannot change part of merged cell":"无法更改合并单元格的一部分。","Cannot paste row merged cells into the table header":"无法将行合并单元格粘贴到标题中。"}),a.setLanguage(["de","de_DE"],{"Merge cells":"Zellen zusammenführen","Unmerge cells":"Zusammenführen rückgängig machen","Cannot change part of merged cell":"Der Teil der verbundenen Zelle kann nicht geändert werden.","Cannot paste row merged cells into the table header":"Die Zeile der verbundenen Zellen kann nicht in die Kopfzeile eingefügt werden."}),a.setLanguage(["ru","ru_RU"],{"Merge cells":"Объединить ячейки","Unmerge cells":"Разъединить ячейки","Cannot change part of merged cell":"Вы не можете изменять часть комбинированной ячейки.","Cannot paste row merged cells into the table header":"Вы не можете вставлять объединенные ячейки в заголовок таблицы."}),a.setLanguage(["fr","fr_FR"],{"Merge cells":"Fusionner les cellules","Unmerge cells":"Séparer les cellules","Cannot change part of merged cell":"Impossible de modifier une partie de la cellule fusionnée.","Cannot paste row merged cells into the table header":"Impossible de coller les cellules fusionnées dans l'en-tête du tableau."}),a.setLanguage(["uk","uk_UA"],{"Merge cells":"Об'єднати комірки","Unmerge cells":"Роз'єднати комірки","Cannot change part of merged cell":"Ви не можете змінювати частину комбінованої комірки.","Cannot paste row merged cells into the table header":"Ви не можете вставляти об'єднані комірки в заголовок таблиці."}),a.setLanguage(["tr","tr_TR"],{"Merge cells":"Hücreleri birleştir","Unmerge cells":"Hücreleri ayır","Cannot change part of merged cell":"Birleştirilmiş hücrelerin bir kısmı değiştirelemez.","Cannot paste row merged cells into the table header":"Satırda birleştirilmiş hücreler sütun başlığına yapıştırılamaz"}),a.setLanguage(["fi","fi_FI"],{"Merge cells":"Yhdistä solut","Unmerge cells":"Jaa solut","Cannot change part of merged cell":"Yhdistettyjen solujen osaa ei voi muuttaa","Cannot paste row merged cells into the table header":"Soluja ei voi yhdistää taulukon otsikkoriviin"}),a.setLanguage(["cs","cs_CZ"],{"Merge cells":"Spojit buňky","Unmerge cells":"Rozpojit buňky","Cannot change part of merged cell":"Nelze měnit část spojené buňky","Cannot paste row merged cells into the table header":"Nelze vkládat spojené buňky do záhlaví tabulky"}),a.setLanguage(["ar","ar_AR"],{"Merge cells":"دمج الوحدات","Unmerge cells":"إلغاء دمج الوحدات","Cannot change part of merged cell":"لا يمكن تغيير جزء من الخلية المدموجة","Cannot paste row merged cells into the table header":"لا يمكن لصق الخلايا المدموجة من صف واحد في رأس الجدول"}),a.setLanguage(["pl","pl_PL"],{"Merge cells":"Scal komórki","Unmerge cells":"Rozłącz komórki","Cannot change part of merged cell":"Nie można zmienić części scalonej komórki.","Cannot paste row merged cells into the table header":"Nie można wkleić komórek o scalonym rzędzie w nagłówek tabeli."}),a.setLanguage(["zh","zh_TW"],{"Merge cells":"合併儲存格","Unmerge cells":"取消合併儲存格","Cannot change part of merged cell":"無法變更儲存格的一部分。","Cannot paste row merged cells into the table header":"無法將合併的儲存格貼上至表格標題中。"}))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){var r=new RegExp("^((?:"+n+"=[0-9]+:)?)"+t+"=([0-9]+):(.*)"),o=r.exec(e),a=1;return o&&(a=parseInt(o[2],10),e=o[1]+o[3]),[a,e]}function a(e){var t=e.nodeName,n=e.align||"",r=e.innerHTML.trim(),a=null,i=null,l=o(r,"@cols","@rows");a=l[0],r=l[1];var u=o(r,"@rows","@cols");return i=u[0],r=u[1],{nodeName:t,colspan:a,rowspan:i,content:r,align:n}}function i(e){return e.find("tr").get().map(function(e){return(0,p.default)(e).find("td, th").get().map(a)})}function l(e,t){var n=-1;return v.default.forEach(e,function(e,r){var o=!0;return t(e,r)&&(n=r,o=!1),o}),n}function u(e){var t=l(e,function(e){return"TD"===e[0].nodeName});return[e.slice(0,t),e.slice(t)]}function s(e){e.forEach(function(e){var t=e.length,n=0;e.forEach(function(e){n+=e.colspan-1}),e.splice(t-n)})}function c(e){var t=e.map(function(e,t){return t}),n=t.map(function(){return 0});return e.forEach(function(e,r){var o=e.filter(function(e){return e.rowspan>1}),a=r+1;o.forEach(function(e){var r=e.colspan,o=a+(e.rowspan-1);t.slice(a,o).forEach(function(e){n[e]+=r})})}),n}function f(e){var t=c(e);e.forEach(function(e,n){e.splice(e.length-t[n])})}function d(e){var t=i((0,p.default)(e)),n=u(t),r=n[0],o=n[1];return s(r),s(o),f(o),(0,p.default)(b.default.createTableHtml(t))[0]}Object.defineProperty(t,"__esModule",{value:!0}),t._extractPropertiesForMerge=o,t._parseTableCell=a,t._createTableObjectFrom$Table=i,t._divideTrs=u,t._mergeByColspan=s,t._getRemovalTdCountsByRowspan=c,t._mergeByRowspan=f,t.default=d;var h=n(0),p=r(h),g=n(1),v=r(g),m=n(4),b=r(m)},function(e,t,n){"use strict";function r(e){var t=(0,i.default)(e),n=t.attr("colspan")||"",r=t.attr("rowspan")||"",o=t.html();n&&(o="@cols="+n+":"+o),r&&(o="@rows="+r+":"+o),o&&t.html(o)}function o(e){return(0,i.default)(e).find("td, th").get().forEach(r),e}Object.defineProperty(t,"__esModule",{value:!0}),t._prependMergeSyntaxToContent=r,t.default=o;var a=n(0),i=function(e){return e&&e.__esModule?e:{default:e}}(a)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){return f.default.range(0,t).map(function(){return e}).join("")}function a(e){var t=e.align,n=(e.textContent||e.innerText).replace(p,""),r=n.length,a="",i="";return t&&("left"===t?(a=":",r-=1):"right"===t?(i=":",r-=1):"center"===t&&(i=":",a=":",r-=2)),r=Math.max(r,3),a+o("-",r)+i}function i(e){var t=0;return e.filter(function(e){return(0,s.default)(e).attr("colspan")}).forEach(function(e){t+=parseInt((0,s.default)(e).attr("colspan"),10)-1}),t}function l(e,t){var n=(0,s.default)(e).find("th").get(),r=n.map(function(e){return" "+a(e)+" |"}).join("");return r+=o(" --- |",i(n)),t?t+"|"+r+"\n":""}Object.defineProperty(t,"__esModule",{value:!0}),t._getAdditionalThCount=i,t._createTheadMarkdown=l;var u=n(0),s=r(u),c=n(1),f=r(c),d=n(17),h=r(d),p=/@cols=[0-9]+:/g;t.default=h.default.Renderer.factory(h.default.gfmRenderer,{THEAD:l})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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}function i(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)}function l(e,t){var n=!1;return d.default.forEach(e,function(e){return!(n=t(e))}),n}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),c=r(s),f=n(1),d=r(f),h=n(2),p=r(h),g=n(3),v=r(g),m=n(4),b=r(m),y=n(5),w=r(y),_=p.default.WwTableManager,E=p.default.i18n,k=function(e){function t(){return o(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),u(t,[{key:"_updateCopyDataMergeWith",value:function(e,t){e.forEach(function(e){e.forEach(function(e){d.default.isExisty(e.rowMergeWith)&&(e.rowMergeWith-=t.rowIndex),d.default.isExisty(e.colMergeWith)&&(e.colMergeWith-=t.colIndex)})})}},{key:"_createCopyTableData",value:function(e,t,n){var r=e.slice(t.rowIndex,n.rowIndex+1);return r=r.map(function(e){return e.slice(t.colIndex,n.colIndex+1)}),this._updateCopyDataMergeWith(r,t),r}},{key:"updateTableHtmlOfClipboardIfNeed",value:function(e){var t=this.wwe.componentManager.getManager("tableSelection").getSelectedCells();if(t.length){var n=v.default.createTableData((0,c.default)(t[0]).closest("TABLE")),r=w.default.getTableSelectionRange(n,t),o=r.start,a=r.end,i=this._createCopyTableData(n,o,a),l=v.default.createCellIndexData(i),u=v.default.createRenderData(i,l);e.html(b.default.createTableHtml(u))}}},{key:"prepareToTableCellStuffing",value:function(e){var t=e[0].length,n=!1;return e.slice(1).forEach(function(e){var r=e.length;t!==r&&(n=!0,t<r&&(t=r))}),{maximumCellLength:t,needTableCellStuffingAid:n}}},{key:"tableCellAppendAidForTableElement",value:function(e){var t=(0,c.default)(e),n=v.default.createTableData(t),r=v.default.addTbodyOrTheadIfNeed(n),o=this.prepareToTableCellStuffing(n),a=o.needTableCellStuffingAid;a&&v.default.stuffCellsIntoIncompleteRow(n,o.maximumCellLength),(r||a)&&b.default.replaceTable(t,n)}},{key:"_findStartCell",value:function(e){return 1===e.length?e.get(0):this.wwe.getEditor().getSelection().startContainer}},{key:"_findStartCellIndex",value:function(e,t){var n=v.default.createCellIndexData(e);return v.default.findCellIndex(n,t)}},{key:"_hasRowMergedHeader",value:function(e,t,n){var r="TH"===t[n.rowIndex][n.colIndex].nodeName,o=l(e[0],function(e){return e.rowspan&&e.rowspan>1});return r&&o}},{key:"_isExactlyFit",value:function(e,t,n){return t%e.length==0&&n%e[0].length==0}},{key:"_updateClipboardTableData",value:function(e,t,n){var r=e.length,o=e[0].length,a=parseInt(t/r,10),i=parseInt(n/o,10);if(a>1){var l=JSON.parse(JSON.stringify(e));d.default.range(0,a-1).forEach(function(){var t=JSON.parse(JSON.stringify(l));e.push.apply(e,t)})}if(i>1){var u=JSON.parse(JSON.stringify(e));d.default.range(0,i-1).forEach(function(){var t=JSON.parse(JSON.stringify(u));e.forEach(function(e,n){e.push.apply(e,t[n])})})}}},{key:"_updateTableDataByClipboardData",value:function(e,t,n){var r=n.rowIndex,o=n.colIndex;e.forEach(function(e,n){var a=r+n;e.forEach(function(e,n){var r=o+n,i=t[a][r];e.nodeName=i.nodeName,t[a][r]=e})})}},{key:"_isPossibleToPaste",value:function(e,t,n){var r=t.rowIndex,o=t.colIndex,a=n.rowIndex,i=n.colIndex,u=e.slice(r,a+1),s=u[0].slice(o,i+1),c=!l(s,function(e){return d.default.isExisty(e.rowMergeWith)});if(c){c=!l(d.default.pluck(u,o),function(e){return d.default.isExisty(e.colMergeWith)})}if(c&&e.length>a+1){c=!l(e[a+1].slice(o,i+1),function(e){return d.default.isExisty(e.rowMergeWith)})}if(c&&e[0].length>i+1){c=!l(d.default.pluck(u,i+1),function(e){return d.default.isExisty(e.colMergeWith)})}return c}},{key:"_spliceClipboardData",value:function(e,t,n){e.splice(t),e.forEach(function(e){e.splice(n)})}},{key:"_bookmarkLastTd",value:function(e){var t=e.rowIndex,n=e.colIndex,r=this.wwe.getEditor(),o=r.get$Body().find(".tui-paste-table-bookmark"),a=v.default.createTableData(o),i=a[t][n];t=d.default.isExisty(i.rowMergeWith)?i.rowMergeWith:t,n=d.default.isExisty(i.colMergeWith)?i.colMergeWith:n;var l=a[t][n].elementIndex,u=o.find("tr").eq(l.rowIndex).children()[l.colIndex];o.removeClass("tui-paste-table-bookmark"),(0,c.default)(u).addClass("tui-paste-table-cell-bookmark")}},{key:"_updateClipboardDataForPasteToSamllerSelectedArea",value:function(e,t,n,r,o){var a=!0,i={rowIndex:0,colIndex:0},l={rowIndex:n-1,colIndex:r-1};return this._isPossibleToPaste(e,i,l)?(this._spliceClipboardData(e,n,r),this._updateTableDataByClipboardData(e,t,o)):a=!1,a}},{key:"_pasteToSelectedArea",value:function(e,t,n,r){var o=w.default.getTableSelectionRange(n,r),a=o.start,i=o.end,l=i.rowIndex-a.rowIndex+1,u=i.colIndex-a.colIndex+1,s=t.length,c=t[0].length,f=l>=s&&u>=c,d=E.get("Cannot change part of merged cell"),h=!0,p=void 0;this._hasRowMergedHeader(t,n,a)?(d=E.get("Cannot paste row merged cells into the table header"),h=!1):this._isExactlyFit(t,l,u)?(p=i,this._updateClipboardTableData(t,l,u),this._updateTableDataByClipboardData(t,n,a)):f?(p={rowIndex:a.rowIndex+s-1,colIndex:a.colIndex+c-1},this._isPossibleToPaste(n,a,p)?this._updateTableDataByClipboardData(t,n,a):h=!1):(p={rowIndex:a.rowIndex+l-1,colIndex:a.colIndex+u-1},h=this._updateClipboardDataForPasteToSamllerSelectedArea(t,n,l,u,a)),h?(n.className+=" tui-paste-table-bookmark",b.default.replaceTable(e,n),this._bookmarkLastTd(p)):(alert(d),this.wwe.focus())}},{key:"_findEndCellIndex",value:function(e,t){var n=t.rowIndex,r=t.colIndex;return{rowIndex:n+e.length-1,colIndex:r+e[0].length-1}}},{key:"_expandRow",value:function(e,t){var n=e.length,r=e[0].length,o=d.default.range(n,n+t).map(function(e){return d.default.range(0,r).map(function(t){return v.default.createBasicCell(e,t)})});e.push.apply(e,o)}},{key:"_expandCoumn",value:function(e,t){var n=e[0].length,r=d.default.range(n,n+t);e.forEach(function(e,t){var n=e[0].nodeName,o=r.map(function(e){return v.default.createBasicCell(t,e,n)});e.push.apply(e,o)})}},{key:"_expandTableDataIfNeed",value:function(e,t,n){var r=n.rowIndex-e.length+1,o=n.colIndex-e[0].length+1;r>0&&this._expandRow(e,r),o>0&&this._expandCoumn(e,o)}},{key:"_pasteAllClipboardTableData",value:function(e,t,n,r){var o=this._findEndCellIndex(t,r);if(this._hasRowMergedHeader(t,n,r))return alert(E.get("Cannot paste row merged cells into the table header")),void this.wwe.focus();this._expandTableDataIfNeed(n,r,o),this._isPossibleToPaste(n,r,o)?(this._updateTableDataByClipboardData(t,n,r),n.className+=" tui-paste-table-bookmark",b.default.replaceTable(e,n),this._bookmarkLastTd(o)):(alert(E.get("Cannot change part of merged cell")),this.wwe.focus())}},{key:"pasteTableData",value:function(e){var t=(0,c.default)(e),n=v.default.createTableData(t),r=this.wwe.componentManager.getManager("tableSelection"),o=r.getSelectedCells(),a=(0,c.default)(this._findStartCell(o)),i=a.closest("table"),l=v.default.createTableData(i),u=this._findStartCellIndex(l,a);o.length>1?this._pasteToSelectedArea(i,n,l,o):this._pasteAllClipboardTableData(i,n,l,u)}}]),t}(_);t.default=k},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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}function i(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)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),s=r(u),c=n(1),f=r(c),d=n(2),h=r(d),p=n(3),g=r(p),v=n(5),m=r(v),b=h.default.WwTableSelectionManager,y=function(e){function t(e){o(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n._tableData=null,n.mergedTableSelectionManager=!0,n}return i(t,e),l(t,[{key:"_addClassToSelectedCells",value:function(e,t,n){var r=n.start,o=n.end,a=f.default.range(r.colIndex,o.colIndex+1),i=e.find("tr");f.default.range(r.rowIndex,o.rowIndex+1).forEach(function(e){var n=t[e],r=i.eq(e).find("td, th");return a.forEach(function(e){n[e].elementIndex&&r.eq(n[e].elementIndex.colIndex).addClass("te-cell-selected")})})}},{key:"onDragStart",value:function(e){var t=(0,s.default)(e).closest("[contenteditable=true] table");this._tableData=g.default.createTableData(t)}},{key:"onDragEnd",value:function(){this._tableData=null}},{key:"highlightTableCellsBy",value:function(e,t){var n=(0,s.default)(e),r=(0,s.default)(t),o=n.closest("[contenteditable=true] table"),a=m.default.findSelectionRange(this._tableData,n,r);this.removeClassAttrbuteFromAllCellsIfNeed(),this._addClassToSelectedCells(o,this._tableData,a)}},{key:"styleToSelectedCells",value:function(e,t){var n=this.wwe.getEditor(),r=n.getSelection().cloneRange();(0,s.default)(r.startContainer).closest("[contenteditable=true] table").find("tr").get().forEach(function(o){var a=(0,s.default)(o).find(".te-cell-selected"),i=a.first().get(0),l=a.last().get(0);a.length&&(r.setStart(i,0),r.setEnd(l,l.childNodes.length),n.setSelection(r),e(n,t))})}},{key:"hasSelectedBothThAndTd",value:function(e){return e=e||this.getSelectedCells(),e.first()[0].nodeName!==e.last()[0].nodeName}}]),t}(b);t.default=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){return{nodeName:"TD",rowMergeWith:e}}function a(e,t){var n=null;return e[t].map(function(r,a){var i=void 0;if(f.default.isExisty(r.rowMergeWith)){var l=r.rowMergeWith,u=e[l][a],s=l+u.rowspan-1;f.default.isExisty(u.colMergeWith)&&n?i=f.default.extend({},n):s>t&&(u.rowspan+=1,i=f.default.extend({},r))}else r.rowspan>1&&(r.rowspan+=1,i=o(t));return i||(i=g.default.createBasicCell(t+1,a)),n=i,i})}function i(e,t){var n=t.start.rowIndex,r=t.end,o=g.default.findRowMergedLastIndex(e,r.rowIndex,r.colIndex),i=f.default.range(n,o+1).map(function(){return a(e,o)});e.splice.apply(e,[o+1,0].concat(i))}function l(e,t,n){var r=g.default.createTableData(e),o=g.default.findRowMergedLastIndex(r,t,n)+1,a=g.default.findElementIndex(r,o,n);return e.find("tr").eq(a.rowIndex).find("td")[a.colIndex]}Object.defineProperty(t,"__esModule",{value:!0}),t._createNewRow=a,t._addRow=i;var u=n(0),s=r(u),c=n(1),f=r(c),d=n(2),h=r(d),p=n(3),g=r(p),v=n(5),m=r(v),b=n(4),y=r(b),w=h.default.CommandManager,_=void 0;w&&(_=w.command("wysiwyg",{name:"AddRow",exec:function(e){var t=e.getEditor(),n=t.getSelection().cloneRange();if(e.focus(),t.hasFormat("TABLE")){var r=(0,s.default)(n.startContainer),o=r.closest("table"),a=g.default.createTableData(o),u=e.componentManager.getManager("tableSelection").getSelectedCells(),c=m.default.getTableSelectionRange(a,u,r);t.saveUndoState(n),i(a,c);var f=y.default.replaceTable(o,a),d=l(f,c.end.rowIndex,c.start.colIndex);y.default.focusToCell(t,n,d)}}})),t.default=_},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){return{nodeName:t,colMergeWith:e}}function a(e,t,n,r){var a=e[n],i=void 0;if(d.default.isExisty(a.colMergeWith)){var l=a.colMergeWith,u=e[l],s=l+u.colspan-1;d.default.isExisty(u.rowMergeWith)&&r?i=d.default.extend({},r):s>n&&(u.colspan+=1,i=d.default.extend({},a))}else a.colspan>1&&(a.colspan+=1,i=o(n,a.nodeName));return i||(i=v.default.createBasicCell(t,n+1,a.nodeName)),i}function i(e,t,n){var r=d.default.range(t,n+1),o=[],i=null;return e.forEach(function(e,t){var l=r.map(function(r,o){var l=i?i[o-1]:null;return a(e,t,n,l)});i=l,o.push(l)}),o}function l(e,t){var n=t.end,r=v.default.findColMergedLastIndex(e,n.rowIndex,n.colIndex),o=i(e,t.start.colIndex,r),a=r+1;e.forEach(function(e,t){e.splice.apply(e,[a,0].concat(o[t]))})}function u(e,t,n){var r=v.default.createTableData(e),o=v.default.findColMergedLastIndex(r,t,n)+1,a=v.default.findElementIndex(r,t,o);return e.find("tr").eq(a.rowIndex).find("td, th")[a.colIndex]}Object.defineProperty(t,"__esModule",{value:!0}),t._createNewColumns=i,t._addColumns=l;var s=n(0),c=r(s),f=n(1),d=r(f),h=n(2),p=r(h),g=n(3),v=r(g),m=n(5),b=r(m),y=n(4),w=r(y),_=p.default.CommandManager,E=void 0;_&&(E=_.command("wysiwyg",{name:"AddCol",exec:function(e){var t=e.getEditor(),n=t.getSelection().cloneRange();if(e.focus(),t.hasFormat("TABLE")){var r=(0,c.default)(n.startContainer),o=r.closest("table"),a=v.default.createTableData(o),i=e.componentManager.getManager("tableSelection").getSelectedCells(),s=b.default.getTableSelectionRange(a,i,r);t.saveUndoState(n),l(a,s);var f=w.default.replaceTable(o,a),d=u(f,s.start.rowIndex,s.end.colIndex);w.default.focusToCell(t,n,d)}}})),t.default=E},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){f.default.range(t,n+1).forEach(function(t){e[t].forEach(function(r,o){if(f.default.isExisty(r.rowMergeWith)){var a=e[r.rowMergeWith][o];a.rowspan&&(a.rowspan-=1)}else if(r.rowspan>1){var i=t+r.rowspan-1;r.rowspan-=n-t+1,i>n&&(e[n+1][o]=f.default.extend({},r))}})})}function a(e,t,n){e.slice(n+1).forEach(function(e){e.forEach(function(e){f.default.isExisty(e.rowMergeWith)&&e.rowMergeWith>=t&&(e.rowMergeWith=n+1)})})}function i(e,t){var n=t.start.rowIndex,r=t.end,i=g.default.findRowMergedLastIndex(e,r.rowIndex,r.colIndex);if(0!==n||0!==i){n=Math.max(n,1),i=Math.max(i,1);var l=i-n+1;e.length-l<2?e.splice(0,e.length):(o(e,n,i),a(e,n,i),e.splice(n,l))}}function l(e,t,n){var r=g.default.createTableData(e);r.length-1<t&&(t-=1);var o=g.default.findElementIndex(r,t,n);return e.find("tr").eq(o.rowIndex).find("th,td")[o.colIndex]}Object.defineProperty(t,"__esModule",{value:!0}),t._removeRow=i;var u=n(0),s=r(u),c=n(1),f=r(c),d=n(2),h=r(d),p=n(3),g=r(p),v=n(5),m=r(v),b=n(4),y=r(b),w=h.default.CommandManager,_=void 0;w&&(_=w.command("wysiwyg",{name:"RemoveRow",exec:function(e){var t=e.getEditor(),n=t.getSelection().cloneRange();if(e.focus(),t.hasFormat("TABLE")){var r=(0,s.default)(n.startContainer),o=r.closest("table"),a=g.default.createTableData(o),u=a.length,c=e.componentManager.getManager("tableSelection").getSelectedCells(),f=m.default.getTableSelectionRange(a,c,r);if(t.saveUndoState(n),i(a,f),a.length<2)o.remove();else if(u!==a.length){var d=y.default.replaceTable(o,a),h=f.start.rowIndex,p=h<a.length?h:h-1,v=l(d,p,f.start.colIndex);y.default.focusToCell(t,n,v)}}}})),t.default=_},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){e.forEach(function(e){f.default.range(t,n+1).forEach(function(t){var r=e[t];if(f.default.isExisty(r.colMergeWith)){var o=e[r.colMergeWith];o.colspan&&(o.colspan-=1)}else if(r.colspan>1){var a=t+r.colspan-1;r.colspan-=n-t+1,a>n&&(e[n+1]=f.default.extend({},r))}})})}function a(e,t,n){e.forEach(function(e){e.slice(n+1).forEach(function(e){f.default.isExisty(e.colMergeWith)&&e.colMergeWith>=t&&(e.colMergeWith=n+1)})})}function i(e,t){var n=t.start.colIndex,r=t.end,i=g.default.findColMergedLastIndex(e,r.rowIndex,r.colIndex),l=i-n+1;o(e,n,i),a(e,n,i),e.forEach(function(e){e.splice(n,l)})}function l(e,t,n){var r=g.default.createTableData(e);r[0].length-1<n&&(n-=1);var o=g.default.findElementIndex(r,t,n);return e.find("tr").eq(o.rowIndex).find("td, th")[o.colIndex]}Object.defineProperty(t,"__esModule",{value:!0}),t._removeColumns=i;var u=n(0),s=r(u),c=n(1),f=r(c),d=n(2),h=r(d),p=n(3),g=r(p),v=n(5),m=r(v),b=n(4),y=r(b),w=h.default.CommandManager,_=void 0;w&&(_=w.command("wysiwyg",{name:"RemoveCol",exec:function(e){var t=e.getEditor(),n=t.getSelection().cloneRange();if(e.focus(),t.hasFormat("TABLE")){var r=(0,s.default)(n.startContainer),o=r.closest("table"),a=g.default.createTableData(o),u=e.componentManager.getManager("tableSelection").getSelectedCells(),c=m.default.getTableSelectionRange(a,u,r),f=a[0].length;if(t.saveUndoState(n),i(a,c),0===a[0].length)o.remove();else if(f!==a[0].length){var d=y.default.replaceTable(o,a),h=c.start.colIndex,p=h>=a[0].length?h-1:h,v=l(d,c.start.rowIndex,p);y.default.focusToCell(t,n,v)}}}})),t.default=_},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n,r){s.default.range(t,n+1).forEach(function(t){var n=e[t];s.default.isExisty(n.colMergeWith)?e[n.colMergeWith].align=r:n.align=r})}function a(e,t){var n=h.default.findElementRowIndex(t),r=h.default.findElementColIndex(t);return e.find("tr").eq(n).find("td, th")[r]}Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),l=r(i),u=n(1),s=r(u),c=n(2),f=r(c),d=n(3),h=r(d),p=n(5),g=r(p),v=n(4),m=r(v),b=f.default.CommandManager,y=void 0;b&&(y=b.command("wysiwyg",{name:"AlignCol",exec:function(e,t){var n=e.getEditor(),r=n.getSelection().cloneRange();if(e.focus(),n.hasFormat("TABLE")){var i=(0,l.default)(r.startContainer),u=i.closest("table"),s=h.default.createTableData(u),c=e.componentManager.getManager("tableSelection").getSelectedCells(),f=g.default.getTableSelectionRange(s,c,i);o(s[0],f.start.colIndex,f.end.colIndex,t);var d=m.default.replaceTable(u,s),p=a(d,i);m.default.focusToCell(n,r,p)}}})),t.default=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){var r,o=n+1,a=(r=[]).concat.apply(r,e.map(function(e){return e.slice(t,o)})),i=a.filter(function(e){var t=e.content;return t&&t!==k});return i.length?i[0].content:k}function a(e,t,n){var r,o=n+1,a=e.map(function(e){return e.slice(t,o)});(r=[]).concat.apply(r,a).slice(1).forEach(function(e){var t=e.nodeName;h.default.forEach(e,function(t,n){return delete e[n]}),e.nodeName=t})}function i(e,t,n,r){var o=n+1;e.forEach(function(e){e.slice(t,o).forEach(function(e){e.rowMergeWith=r})})}function l(e,t,n,r){var o=n+1;e.forEach(function(e){e.slice(t,o).forEach(function(e){e.colMergeWith=r})})}function u(e,t){var n=t.start,r=t.end,u=n.rowIndex,s=n.colIndex,c=r.rowIndex,f=r.colIndex,d=e[u][s],h=e.slice(u,c+1),p=c-u+1,g=f-s+1;d.rowspan=p,d.colspan=g,d.content=o(h,s,f),a(h,s,f),p>1&&i(h.slice(1),s,f,u),g>1&&l(h,s+1,f,s)}function s(e,t,n){var r=m.default.createTableData(e),o=m.default.findElementIndex(r,t,n);return e.find("tr").eq(o.rowIndex).find("td, th")[o.colIndex]}Object.defineProperty(t,"__esModule",{value:!0}),t._mergeCells=u;var c=n(0),f=r(c),d=n(1),h=r(d),p=n(2),g=r(p),v=n(3),m=r(v),b=n(5),y=r(b),w=n(4),_=r(w),E=g.default.CommandManager,k=h.default.browser.msie?"":"<br>",x=void 0;E&&(x=E.command("wysiwyg",{name:"MergeCells",exec:function(e){var t=e.getEditor();if(e.focus(),t.hasFormat("TABLE")){var n=e.componentManager.getManager("tableSelection"),r=n.getSelectedCells();if(!(r.length<2||n.hasSelectedBothThAndTd(r))){var o=t.getSelection().cloneRange(),a=(0,f.default)(o.startContainer),i=a.closest("table"),l=m.default.createTableData(i),c=y.default.getTableSelectionRange(l,r,a);u(l,c);var d=_.default.replaceTable(i,l),h=s(d,c.start.rowIndex,c.start.colIndex);_.default.focusToCell(t,o,h)}}}})),t.default=x},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n,r=t.start,o=t.end,a=r.colIndex,i=o.colIndex+1,l=e.slice(r.rowIndex,o.rowIndex+1),u=l.map(function(e){return e.slice(a,i)});return!!(n=[]).concat.apply(n,u).filter(function(e){return e.colspan>1||e.rowspan>1}).length}function a(e,t,n,r,o){var a=t+r,i=n+o,l=f.default.range(n,i);f.default.range(t,a).forEach(function(n){var r=e[n],o=n===t?1:0;l.slice(o).forEach(function(e){r[e]=g.default.createBasicCell(n,e,r[e].nodeName)})})}function i(e,t){var n=t.start,r=t.end,o=f.default.range(n.colIndex,r.colIndex+1);f.default.range(n.rowIndex,r.rowIndex+1).forEach(function(t){o.forEach(function(n){var r=e[t][n],o=r.colspan,i=r.rowspan;(o>1||i>1)&&(r.colspan=1,r.rowspan=1,a(e,t,n,i,o))})})}function l(e,t,n){var r=g.default.createTableData(e),o=g.default.findElementIndex(r,t,n);return e.find("tr").eq(o.rowIndex).find("td, th")[o.colIndex]}Object.defineProperty(t,"__esModule",{value:!0}),t._hasMergedCell=o,t._unmergeCells=i;var u=n(0),s=r(u),c=n(1),f=r(c),d=n(2),h=r(d),p=n(3),g=r(p),v=n(5),m=r(v),b=n(4),y=r(b),w=h.default.CommandManager,_=void 0;w&&(_=w.command("wysiwyg",{name:"UnmergeCells",exec:function(e){var t=e.getEditor(),n=t.getSelection().cloneRange();if(e.focus(),t.hasFormat("TABLE")){var r=(0,s.default)(n.startContainer),a=r.closest("table"),u=g.default.createTableData(a),c=e.componentManager.getManager("tableSelection").getSelectedCells(),f=m.default.getTableSelectionRange(u,c,r);if(o(u,f)){i(u,f);var d=y.default.replaceTable(a,u),h=l(d,f.start.rowIndex,f.start.colIndex);y.default.focusToCell(t,n,h)}}}})),t.default=_},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=['<button type="button" class="te-table-add-row">'+f.get("Add row")+"</button>",'<button type="button" class="te-table-add-col">'+f.get("Add col")+"</button>",'<button type="button" class="te-table-remove-row">'+f.get("Remove row")+"</button>",'<button type="button" class="te-table-remove-col">'+f.get("Remove col")+"</button>","<hr/>",'<button type="button" class="te-table-merge">'+f.get("Merge cells")+"</button>",'<button type="button" class="te-table-unmerge">'+f.get("Unmerge cells")+"</button>","<hr/>",'<button type="button" class="te-table-col-align-left">'+f.get("Align left")+"</button>",'<button type="button" class="te-table-col-align-center">'+f.get("Align center")+"</button>",'<button type="button" class="te-table-col-align-right">'+f.get("Align right")+"</button>","<hr/>",'<button type="button" class="te-table-remove">'+f.get("Remove table")+"</button>"].join(""),n=(0,u.default)(t);e.setContent(n)}function a(e,t,n){var r=e.$content,o=(0,u.default)(r[5]),a=(0,u.default)(r[6]),i=(0,u.default)(r[7]);e.on("click .te-table-merge",function(){t.emit("command","MergeCells")}),e.on("click .te-table-unmerge",function(){t.emit("command","UnmergeCells")}),t.listen("openPopupTableUtils",function(){var e=n.getSelectedCells(),t=e.length;t?(t<2||n.hasSelectedBothThAndTd(e)?o.hide():o.show(),e.is("[rowspan], [colspan]")?a.show():a.hide(),i.show()):(o.hide(),a.hide(),i.hide())})}function i(e,t,n){o(e),a(e,t,n)}Object.defineProperty(t,"__esModule",{value:!0});var l=n(0),u=r(l),s=n(2),c=r(s),f=c.default.i18n;t.default={updateContextMenu:i}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=e.options.colorSyntax,n=void 0===t?{}:t,r=n.preset,o=n.useCustomSyntax,s=void 0!==o&&o;e.eventManager.listen("convertorAfterMarkdownToHtmlConverted",function(e){return s?e.replace(y,function(e,t,n){return u(n,t).result}):e}),e.eventManager.listen("convertorAfterHtmlToMarkdownConverted",function(e){var t=s?_:w;return e.replace(t,function(e,t,n){return t.match(E)&&(t=c(t)),s?l(n,t).result:e.replace(/ ?class="colour" ?/g," ").replace(E,t)})}),e.isViewer()||"default"!==e.getUI().name||(e.addCommand("markdown",{name:"color",exec:function(e,t){var n=e.getEditor(),r=n.getCursor("from"),o=n.getCursor("to"),a=void 0,i=void 0;if(t){if(s){var c=l(n.getSelection(),t);a=c.result,i=c.from,n.replaceSelection(a)}else{var f=u(n.getSelection(),t);a=f.result,i=f.from,n.replaceSelection(a)}n.setSelection({line:r.line,ch:r.ch+i},{line:o.line,ch:r.line===o.line?o.ch+i:o.ch}),e.focus()}}}),e.addCommand("wysiwyg",{name:"color",exec:function(e,t){if(t){var n=e.getEditor(),r=e.componentManager.getManager("tableSelection");if(n.hasFormat("table")&&r.getSelectedCells().length){r.styleToSelectedCells(a,t);var o=n.getSelection();o.collapse(!0),n.setSelection(o)}else a(n,t)}}}),i(e,r))}function a(e,t){e.hasFormat("PRE")||(t===k?e.changeFormat(null,{class:"colour",tag:"span"}):e.setTextColour(t))}function i(e,t){var n=e.i18n,r=e.getUI().getToolbar(),o=e.options.usageStatistics;e.eventManager.addEventType("colorButtonClicked"),r.insertItem(3,{type:"button",options:{name:"colorSyntax",className:"tui-color",event:"colorButtonClicked",tooltip:n.get("Text color")}});var a=r.indexOfItem("colorSyntax"),i=r.getItem(a),l=i.$el,u=(0,p.default)("<div />"),s=(0,p.default)('<button type="button" class="te-apply-button">'+n.get("OK")+"</button>"),c={container:u[0],usageStatistics:o};t&&(c.preset=t);var f=v.default.create(c),d=f.getColor();u.append(s);var h=e.getUI().createPopup({header:!1,title:!1,content:u,className:"tui-popup-color",$target:e.getUI().getToolbar().$el,css:{width:"auto",position:"absolute"}});e.eventManager.listen("focus",function(){h.hide()}),e.eventManager.listen("colorButtonClicked",function(){if(h.isShow())return void h.hide();var t=l.get(0),n=t.offsetTop,r=t.offsetLeft;h.$el.css({top:n+l.outerHeight(),left:r}),f.slider.toggle(!0),e.eventManager.emit("closeAllPopup"),h.show()}),e.eventManager.listen("closeAllPopup",function(){h.hide()}),e.eventManager.listen("removeEditor",function(){f.off("selectColor"),h.$el.find(".te-apply-button").off("click"),h.remove()}),f.on("selectColor",function(t){d=t.color,"palette"===t.origin&&(e.exec("color",d),h.hide())}),h.$el.find(".te-apply-button").on("click",function(){e.exec("color",d)})}function l(e,t){return s("{color:"+t+"}",e,"{color}")}function u(e,t){return s('<span style="color:'+t+'">',e,"</span>")}function s(e,t,n){return{result:""+e+t+n,from:e.length,to:e.length+t.length}}function c(e){return e.replace(E,function(e,t,n,r){return"#"+f(t)+f(n)+f(r)})}function f(e){var t=parseInt(e,10);return t=t.toString(16),t=d(t)}function d(e){var t="00"+e;return t.substr(t.length-2)}Object.defineProperty(t,"__esModule",{value:!0});var h=n(0),p=r(h),g=n(80),v=r(g),m=n(2),b=r(m),y=/\{color:(.+?)}(.*?)\{color}/g,w=/<span (?:class="colour" )?style="color:(.+?)"(?: class="colour")?>(.*?)/g,_=/<span (?:class="colour" )?style="color:(.+?)"(?: class="colour")?>(.*?)<\/span>/g,E=/rgb\((\d+)[, ]+(\d+)[, ]+(\d+)\)/g,k="#181818";b.default.defineExtension("colorSyntax",o),t.default=o},function(e,t){e.exports=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){function t(e){var t=void 0;try{if(!i.default)throw new Error("plantuml-encoder dependency required");t='<img src="'+o+i.default.encode(e)+'" />'}catch(e){t="Error occurred on encoding uml: "+e.message}return t}var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.rendererURL,o=void 0===r?c:r,a=e.options.codeBlockLanguages;f.forEach(function(e){a.indexOf(e)<0&&a.push(e),s.setReplacer(e,t)})}Object.defineProperty(t,"__esModule",{value:!0});var a=n(82),i=r(a),l=n(2),u=r(l),s=u.default.codeBlockManager,c="http://www.plantuml.com/plantuml/png/",f=["uml","plantuml"];u.default.defineExtension("uml",o),t.default=o},function(e,t){e.exports=l},function(e,t,n){"use strict";var r=n(0),o=function(e){return e&&e.__esModule?e:{default:e}}(r),a=n(16);o.default.fn.tuiEditor=function(){var e=void 0,t=void 0,n=this.get(0);if(n){for(var r=arguments.length,i=Array(r),l=0;l<r;l++)i[l]=arguments[l];if(e=i[0]||{},t=o.default.data(n,"tuiEditor")){if("string"==typeof e){var u;return(u=t)[e].apply(u,i.slice(1))}}else e.el=n,t=new a(e),o.default.data(n,"tuiEditor",t)}return this},e.exports=a}])}); |