Welcome to mirror list, hosted at ThFree Co, Russian Federation.

vendors~editor.js « js - github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c7e322fc0bea8e51d98b37d722ac14af0bb73f18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
(window.textWebpackJsonp=window.textWebpackJsonp||[]).push([[195],[,function(e,t,n){"use strict";var r=n(67),o=n(141),i=Object.prototype.toString;function s(e){return"[object Array]"===i.call(e)}function a(e){return null!==e&&"object"==typeof e}function c(e){return"[object Function]"===i.call(e)}function u(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),s(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:s,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:o,isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:a,isUndefined:function(e){return void 0===e},isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:c,isStream:function(e){return a(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:u,merge:function e(){var t={};function n(n,r){"object"==typeof t[r]&&"object"==typeof n?t[r]=e(t[r],n):t[r]=n}for(var r=0,o=arguments.length;r<o;r++)u(arguments[r],n);return t},deepMerge:function e(){var t={};function n(n,r){"object"==typeof t[r]&&"object"==typeof n?t[r]=e(t[r],n):t[r]="object"==typeof n?e({},n):n}for(var r=0,o=arguments.length;r<o;r++)u(arguments[r],n);return t},extend:function(e,t,n){return u(t,(function(t,o){e[o]=n&&"function"==typeof t?r(t,n):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRootUrl=function(){return OC.getRootPath()},t.generateUrl=function(e,t,n){return OC.generateUrl(e,t,n)},t.generateFilePath=function(e,t,n){return OC.filePath(e,t,n)},t.generateRemoteUrl=function(e){return OC.linkToRemote(e)},t.generateOcsUrl=function(e,t){return void 0===t&&(t=2),OC.linkToOCS(e,t)}},,,function(e,t,n){"use strict";function r(e,t,n,r,o,i,s,a){var c,u="function"==typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),s?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},u._ssrRegister=c):o&&(c=a?function(){o.call(this,this.$root.$options.shadowRoot)}:o),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(e,t){return c.call(t),l(e,t)}}else{var p=u.beforeCreate;u.beforeCreate=p?[].concat(p,c):[c]}return{exports:e,options:u}}n.d(t,"a",(function(){return r}))},,,,,,,,,function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},function(e,t,n){"use strict";var r=n(1);function o(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(r.isURLSearchParams(t))i=t.toString();else{var s=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),s.push(o(t)+"="+o(e))})))})),i=s.join("&")}if(i){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){"use strict";(function(t){var r=n(1),o=n(146),i={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var a,c={adapter:(void 0!==t&&"[object process]"===Object.prototype.toString.call(t)?a=n(71):"undefined"!=typeof XMLHttpRequest&&(a=n(71)),a),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)?(s(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};c.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],(function(e){c.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){c.headers[e]=r.merge(i)})),e.exports=c}).call(this,n(114))},function(e,t,n){"use strict";var r=n(1),o=n(147),i=n(68),s=n(149),a=n(150),c=n(72);e.exports=function(e){return new Promise((function(t,u){var l=e.data,p=e.headers;r.isFormData(l)&&delete p["Content-Type"];var f=new XMLHttpRequest;if(e.auth){var h=e.auth.username||"",d=e.auth.password||"";p.Authorization="Basic "+btoa(h+":"+d)}if(f.open(e.method.toUpperCase(),i(e.url,e.params,e.paramsSerializer),!0),f.timeout=e.timeout,f.onreadystatechange=function(){if(f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in f?s(f.getAllResponseHeaders()):null,r={data:e.responseType&&"text"!==e.responseType?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:n,config:e,request:f};o(t,u,r),f=null}},f.onabort=function(){f&&(u(c("Request aborted",e,"ECONNABORTED",f)),f=null)},f.onerror=function(){u(c("Network Error",e,null,f)),f=null},f.ontimeout=function(){u(c("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",f)),f=null},r.isStandardBrowserEnv()){var m=n(151),v=(e.withCredentials||a(e.url))&&e.xsrfCookieName?m.read(e.xsrfCookieName):void 0;v&&(p[e.xsrfHeaderName]=v)}if("setRequestHeader"in f&&r.forEach(p,(function(e,t){void 0===l&&"content-type"===t.toLowerCase()?delete p[t]:f.setRequestHeader(t,e)})),e.withCredentials&&(f.withCredentials=!0),e.responseType)try{f.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&f.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){f&&(f.abort(),u(e),f=null)})),void 0===l&&(l=null),f.send(l)}))}},function(e,t,n){"use strict";var r=n(148);e.exports=function(e,t,n,o,i){var s=new Error(e);return r(s,t,n,o,i)}},function(e,t,n){"use strict";var r=n(1);e.exports=function(e,t){t=t||{};var n={};return r.forEach(["url","method","params","data"],(function(e){void 0!==t[e]&&(n[e]=t[e])})),r.forEach(["headers","auth","proxy"],(function(o){r.isObject(t[o])?n[o]=r.deepMerge(e[o],t[o]):void 0!==t[o]?n[o]=t[o]:r.isObject(e[o])?n[o]=r.deepMerge(e[o]):void 0!==e[o]&&(n[o]=e[o])})),r.forEach(["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"],(function(r){void 0!==t[r]?n[r]=t[r]:void 0!==e[r]&&(n[r]=e[r])})),n}},function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){e.exports=n(140)},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var c,u=[],l=!1,p=-1;function f(){l&&c&&(l=!1,c.length?u=c.concat(u):p=-1,u.length&&h())}function h(){if(!l){var e=a(f);l=!0;for(var t=u.length;t;){for(c=u,u=[];++p<t;)c&&c[p].run();p=-1,t=u.length}c=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function m(){}o.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];u.push(new d(e,t)),1!==u.length||l||a(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=n(1),o=n(67),i=n(142),s=n(73);function a(e){var t=new i(e),n=o(i.prototype.request,t);return r.extend(n,i.prototype,t),r.extend(n,t),n}var c=a(n(70));c.Axios=i,c.create=function(e){return a(s(c.defaults,e))},c.Cancel=n(74),c.CancelToken=n(154),c.isCancel=n(69),c.all=function(e){return Promise.all(e)},c.spread=n(155),e.exports=c,e.exports.default=c},function(e,t){
/*!
 * Determine if an object is a Buffer
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */
e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},function(e,t,n){"use strict";var r=n(1),o=n(68),i=n(143),s=n(144),a=n(73);function c(e){this.defaults=e,this.interceptors={request:new i,response:new i}}c.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=a(this.defaults,e)).method=e.method?e.method.toLowerCase():"get";var t=[s,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)n=n.then(t.shift(),t.shift());return n},c.prototype.getUri=function(e){return e=a(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){c.prototype[e]=function(t,n){return this.request(r.merge(n||{},{method:e,url:t}))}})),r.forEach(["post","put","patch"],(function(e){c.prototype[e]=function(t,n,o){return this.request(r.merge(o||{},{method:e,url:t,data:n}))}})),e.exports=c},function(e,t,n){"use strict";var r=n(1);function o(){this.handlers=[]}o.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},function(e,t,n){"use strict";var r=n(1),o=n(145),i=n(69),s=n(70),a=n(152),c=n(153);function u(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return u(e),e.baseURL&&!a(e.url)&&(e.url=c(e.baseURL,e.url)),e.headers=e.headers||{},e.data=o(e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||s.adapter)(e).then((function(t){return u(e),t.data=o(t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(u(e),t&&t.response&&(t.response.data=o(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,n){"use strict";var r=n(1);e.exports=function(e,t,n){return r.forEach(n,(function(n){e=n(e,t)})),e}},function(e,t,n){"use strict";var r=n(1);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},function(e,t,n){"use strict";var r=n(72);e.exports=function(e,t,n){var o=n.config.validateStatus;!o||o(n.status)?e(n):t(r("Request failed with status code "+n.status,n.config,null,n.request,n))}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,n){"use strict";var r=n(1),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,s={};return e?(r.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(s[t]&&o.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([n]):s[t]?s[t]+", "+n:n}})),s):s}},function(e,t,n){"use strict";var r=n(1);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";var r=n(1);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,i,s){var a=[];a.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(o)&&a.push("path="+o),r.isString(i)&&a.push("domain="+i),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(74);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function o(e,t){return r.call(e,t)}function i(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!=(65535&e)&&65534!=(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function s(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var a=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,c=new RegExp(a.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),u=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,l=n(273);var p=/[&<>"]/,f=/[&<>"]/g,h={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function d(e){return h[e]}var m=/[.?*+^$[\]\\(){}|-]/g;var v=n(257);t.lib={},t.lib.mdurl=n(274),t.lib.ucmicro=n(488),t.assign=function(e){return Array.prototype.slice.call(arguments,1).forEach((function(t){if(t){if("object"!=typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach((function(n){e[n]=t[n]}))}})),e},t.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},t.has=o,t.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(a,"$1")},t.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(c,(function(e,t,n){return t||function(e,t){var n=0;return o(l,t)?l[t]:35===t.charCodeAt(0)&&u.test(t)&&i(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?s(n):e}(e,n)}))},t.isValidEntityCode=i,t.fromCodePoint=s,t.escapeHtml=function(e){return p.test(e)?e.replace(f,d):e},t.arrayReplaceAt=function(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))},t.isSpace=function(e){switch(e){case 9:case 32:return!0}return!1},t.isWhiteSpace=function(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},t.isMdAsciiPunct=function(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},t.isPunctChar=function(e){return v.test(e)},t.escapeRE=function(e){return e.replace(m,"\\$&")},t.normalizeReference=function(e){return e.trim().replace(/\s+/g," ").toUpperCase()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(242),o=n(241),i=n(240);function s(e,t){return!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0)}function a(e,t,n){var o=e.selection.$cursor;if(!o||(n?!n.endOfTextblock("backward",e):o.parentOffset>0))return!1;var s=l(o);if(!s){var a=o.blockRange(),u=a&&r.liftTarget(a);return null!=u&&(t&&t(e.tr.lift(a,u).scrollIntoView()),!0)}var p=s.nodeBefore;if(!p.type.spec.isolating&&w(e,s,t))return!0;if(0==o.parent.content.size&&(c(p,"end")||i.NodeSelection.isSelectable(p))){if(t){var f=e.tr.deleteRange(o.before(),o.after());f.setSelection(c(p,"end")?i.Selection.findFrom(f.doc.resolve(f.mapping.map(s.pos,-1)),-1):i.NodeSelection.create(f.doc,s.pos-p.nodeSize)),t(f.scrollIntoView())}return!0}return!(!p.isAtom||s.depth!=o.depth-1)&&(t&&t(e.tr.delete(s.pos-p.nodeSize,s.pos).scrollIntoView()),!0)}function c(e,t){for(;e;e="start"==t?e.firstChild:e.lastChild)if(e.isTextblock)return!0;return!1}function u(e,t,n){var r=e.selection.$cursor;if(!r||(n?!n.endOfTextblock("backward",e):r.parentOffset>0))return!1;var o=l(r),s=o&&o.nodeBefore;return!(!s||!i.NodeSelection.isSelectable(s))&&(t&&t(e.tr.setSelection(i.NodeSelection.create(e.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)}function l(e){if(!e.parent.type.spec.isolating)for(var t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function p(e,t,n){var r=e.selection.$cursor;if(!r||(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size))return!1;var o=h(r);if(!o)return!1;var s=o.nodeAfter;if(w(e,o,t))return!0;if(0==r.parent.content.size&&(c(s,"start")||i.NodeSelection.isSelectable(s))){if(t){var a=e.tr.deleteRange(r.before(),r.after());a.setSelection(c(s,"start")?i.Selection.findFrom(a.doc.resolve(a.mapping.map(o.pos)),1):i.NodeSelection.create(a.doc,a.mapping.map(o.pos))),t(a.scrollIntoView())}return!0}return!(!s.isAtom||o.depth!=r.depth-1)&&(t&&t(e.tr.delete(o.pos,o.pos+s.nodeSize).scrollIntoView()),!0)}function f(e,t,n){var r=e.selection.$cursor;if(!r||(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size))return!1;var o=h(r),s=o&&o.nodeAfter;return!(!s||!i.NodeSelection.isSelectable(s))&&(t&&t(e.tr.setSelection(i.NodeSelection.create(e.doc,o.pos)).scrollIntoView()),!0)}function h(e){if(!e.parent.type.spec.isolating)for(var t=e.depth-1;t>=0;t--){var n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}function d(e,t){var n=e.selection,r=n.$head,o=n.$anchor;return!(!r.parent.type.spec.code||!r.sameParent(o))&&(t&&t(e.tr.insertText("\n").scrollIntoView()),!0)}function m(e,t){var n=e.selection,r=n.$head,o=n.$anchor;if(!r.parent.type.spec.code||!r.sameParent(o))return!1;var s=r.node(-1),a=r.indexAfter(-1),c=s.contentMatchAt(a).defaultType;if(!s.canReplaceWith(a,a,c))return!1;if(t){var u=r.after(),l=e.tr.replaceWith(u,u,c.createAndFill());l.setSelection(i.Selection.near(l.doc.resolve(u),1)),t(l.scrollIntoView())}return!0}function v(e,t){var n=e.selection,r=n.$from,o=n.$to;if(r.parent.inlineContent||o.parent.inlineContent)return!1;var s=r.parent.contentMatchAt(o.indexAfter()).defaultType;if(!s||!s.isTextblock)return!1;if(t){var a=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,c=e.tr.insert(a,s.createAndFill());c.setSelection(i.TextSelection.create(c.doc,a+1)),t(c.scrollIntoView())}return!0}function g(e,t){var n=e.selection.$cursor;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){var o=n.before();if(r.canSplit(e.doc,o))return t&&t(e.tr.split(o).scrollIntoView()),!0}var i=n.blockRange(),s=i&&r.liftTarget(i);return null!=s&&(t&&t(e.tr.lift(i,s).scrollIntoView()),!0)}function y(e,t){var n=e.selection,s=n.$from,a=n.$to;if(e.selection instanceof i.NodeSelection&&e.selection.node.isBlock)return!(!s.parentOffset||!r.canSplit(e.doc,s.pos))&&(t&&t(e.tr.split(s.pos).scrollIntoView()),!0);if(!s.parent.isBlock)return!1;if(t){var c=a.parentOffset==a.parent.content.size,u=e.tr;e.selection instanceof i.TextSelection&&u.deleteSelection();var l=0==s.depth?null:s.node(-1).contentMatchAt(s.indexAfter(-1)).defaultType,p=c&&l?[{type:l}]:null,f=r.canSplit(u.doc,u.mapping.map(s.pos),1,p);p||f||!r.canSplit(u.doc,u.mapping.map(s.pos),1,l&&[{type:l}])||(p=[{type:l}],f=!0),f&&(u.split(u.mapping.map(s.pos),1,p),c||s.parentOffset||s.parent.type==l||!s.node(-1).canReplace(s.index(-1),s.indexAfter(-1),o.Fragment.from(l.create(),s.parent))||u.setNodeMarkup(u.mapping.map(s.before()),l)),t(u.scrollIntoView())}return!0}function b(e,t){return t&&t(e.tr.setSelection(new i.AllSelection(e.doc))),!0}function w(e,t,n){var s,a,c=t.nodeBefore,u=t.nodeAfter;if(c.type.spec.isolating||u.type.spec.isolating)return!1;if(function(e,t,n){var o=t.nodeBefore,i=t.nodeAfter,s=t.index();return!!(o&&i&&o.type.compatibleContent(i.type))&&(!o.content.size&&t.parent.canReplace(s-1,s)?(n&&n(e.tr.delete(t.pos-o.nodeSize,t.pos).scrollIntoView()),!0):!(!t.parent.canReplace(s,s+1)||!i.isTextblock&&!r.canJoin(e.doc,t.pos))&&(n&&n(e.tr.clearIncompatible(t.pos,o.type,o.contentMatchAt(o.childCount)).join(t.pos).scrollIntoView()),!0))}(e,t,n))return!0;if(t.parent.canReplace(t.index(),t.index()+1)&&(s=(a=c.contentMatchAt(c.childCount)).findWrapping(u.type))&&a.matchType(s[0]||u.type).validEnd){if(n){for(var l=t.pos+u.nodeSize,p=o.Fragment.empty,f=s.length-1;f>=0;f--)p=o.Fragment.from(s[f].create(null,p));p=o.Fragment.from(c.copy(p));var h=e.tr.step(new r.ReplaceAroundStep(t.pos-1,l,t.pos,l,new o.Slice(p,1,0),s.length,!0)),d=l+2*s.length;r.canJoin(h.doc,d)&&h.join(d),n(h.scrollIntoView())}return!0}var m=i.Selection.findFrom(t,1),v=m&&m.$from.blockRange(m.$to),g=v&&r.liftTarget(v);return null!=g&&g>=t.depth&&(n&&n(e.tr.lift(v,g).scrollIntoView()),!0)}function k(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return function(t,n,r){for(var o=0;o<e.length;o++)if(e[o](t,n,r))return!0;return!1}}var x=k(s,a,u),_=k(s,p,f),C={Enter:k(d,v,g,y),"Mod-Enter":m,Backspace:x,"Mod-Backspace":x,Delete:_,"Mod-Delete":_,"Mod-a":b},S={"Ctrl-h":C.Backspace,"Alt-Backspace":C["Mod-Backspace"],"Ctrl-d":C.Delete,"Ctrl-Alt-Backspace":C["Mod-Delete"],"Alt-Delete":C["Mod-Delete"],"Alt-d":C["Mod-Delete"]};for(var O in C)S[O]=C[O];var A=("undefined"!=typeof navigator?/Mac/.test(navigator.platform):"undefined"!=typeof os&&"darwin"==os.platform())?S:C;t.deleteSelection=s,t.joinBackward=a,t.selectNodeBackward=u,t.joinForward=p,t.selectNodeForward=f,t.joinUp=function(e,t){var n,o=e.selection,s=o instanceof i.NodeSelection;if(s){if(o.node.isTextblock||!r.canJoin(e.doc,o.from))return!1;n=o.from}else if(null==(n=r.joinPoint(e.doc,o.from,-1)))return!1;if(t){var a=e.tr.join(n);s&&a.setSelection(i.NodeSelection.create(a.doc,n-e.doc.resolve(n).nodeBefore.nodeSize)),t(a.scrollIntoView())}return!0},t.joinDown=function(e,t){var n,o=e.selection;if(o instanceof i.NodeSelection){if(o.node.isTextblock||!r.canJoin(e.doc,o.to))return!1;n=o.to}else if(null==(n=r.joinPoint(e.doc,o.to,1)))return!1;return t&&t(e.tr.join(n).scrollIntoView()),!0},t.lift=function(e,t){var n=e.selection,o=n.$from,i=n.$to,s=o.blockRange(i),a=s&&r.liftTarget(s);return null!=a&&(t&&t(e.tr.lift(s,a).scrollIntoView()),!0)},t.newlineInCode=d,t.exitCode=m,t.createParagraphNear=v,t.liftEmptyBlock=g,t.splitBlock=y,t.splitBlockKeepMarks=function(e,t){return y(e,t&&function(n){var r=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();r&&n.ensureMarks(r),t(n)})},t.selectParentNode=function(e,t){var n,r=e.selection,o=r.$from,s=r.to,a=o.sharedDepth(s);return 0!=a&&(n=o.before(a),t&&t(e.tr.setSelection(i.NodeSelection.create(e.doc,n))),!0)},t.selectAll=b,t.wrapIn=function(e,t){return function(n,o){var i=n.selection,s=i.$from,a=i.$to,c=s.blockRange(a),u=c&&r.findWrapping(c,e,t);return!!u&&(o&&o(n.tr.wrap(c,u).scrollIntoView()),!0)}},t.setBlockType=function(e,t){return function(n,r){var o=n.selection,i=o.from,s=o.to,a=!1;return n.doc.nodesBetween(i,s,(function(r,o){if(a)return!1;if(r.isTextblock&&!r.hasMarkup(e,t))if(r.type==e)a=!0;else{var i=n.doc.resolve(o),s=i.index();a=i.parent.canReplaceWith(s,s+1,e)}})),!!a&&(r&&r(n.tr.setBlockType(i,s,e,t).scrollIntoView()),!0)}},t.toggleMark=function(e,t){return function(n,r){var o=n.selection,i=o.empty,s=o.$cursor,a=o.ranges;if(i&&!s||!function(e,t,n){for(var r=function(r){var o=t[r],i=o.$from,s=o.$to,a=0==i.depth&&e.type.allowsMarkType(n);if(e.nodesBetween(i.pos,s.pos,(function(e){if(a)return!1;a=e.inlineContent&&e.type.allowsMarkType(n)})),a)return{v:!0}},o=0;o<t.length;o++){var i=r(o);if(i)return i.v}return!1}(n.doc,a,e))return!1;if(r)if(s)e.isInSet(n.storedMarks||s.marks())?r(n.tr.removeStoredMark(e)):r(n.tr.addStoredMark(e.create(t)));else{for(var c=!1,u=n.tr,l=0;!c&&l<a.length;l++){var p=a[l],f=p.$from,h=p.$to;c=n.doc.rangeHasMark(f.pos,h.pos,e)}for(var d=0;d<a.length;d++){var m=a[d],v=m.$from,g=m.$to;c?u.removeMark(v.pos,g.pos,e):u.addMark(v.pos,g.pos,e.create(t))}r(u.scrollIntoView())}return!0}},t.autoJoin=function(e,t){if(Array.isArray(t)){var n=t;t=function(e){return n.indexOf(e.type.name)>-1}}return function(n,o){return e(n,o&&function(e,t){return function(n){if(!n.isGeneric)return e(n);for(var o=[],i=0;i<n.mapping.maps.length;i++){for(var s=n.mapping.maps[i],a=0;a<o.length;a++)o[a]=s.map(o[a]);s.forEach((function(e,t,n,r){return o.push(n,r)}))}for(var c=[],u=0;u<o.length;u+=2)for(var l=o[u],p=o[u+1],f=n.doc.resolve(l),h=f.sharedDepth(p),d=f.node(h),m=f.indexAfter(h),v=f.after(h+1);v<=p;++m){var g=d.maybeChild(m);if(!g)break;if(m&&-1==c.indexOf(v)){var y=d.child(m-1);y.type==g.type&&t(y,g)&&c.push(v)}v+=g.nodeSize}c.sort((function(e,t){return e-t}));for(var b=c.length-1;b>=0;b--)r.canJoin(n.doc,c[b])&&n.join(c[b]);e(n)}}(o,t))}},t.chainCommands=k,t.pcBaseKeymap=C,t.macBaseKeymap=S,t.baseKeymap=A},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(241),o=n(242),i=Object.create(null),s=function(e,t,n){this.ranges=n||[new c(e.min(t),e.max(t))],this.$anchor=e,this.$head=t},a={anchor:{},head:{},from:{},to:{},$from:{},$to:{},empty:{}};a.anchor.get=function(){return this.$anchor.pos},a.head.get=function(){return this.$head.pos},a.from.get=function(){return this.$from.pos},a.to.get=function(){return this.$to.pos},a.$from.get=function(){return this.ranges[0].$from},a.$to.get=function(){return this.ranges[0].$to},a.empty.get=function(){for(var e=this.ranges,t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0},s.prototype.content=function(){return this.$from.node(0).slice(this.from,this.to,!0)},s.prototype.replace=function(e,t){void 0===t&&(t=r.Slice.empty);for(var n=t.content.lastChild,o=null,i=0;i<t.openEnd;i++)o=n,n=n.lastChild;for(var s=e.steps.length,a=this.ranges,c=0;c<a.length;c++){var u=a[c],l=u.$from,p=u.$to,f=e.mapping.slice(s);e.replaceRange(f.map(l.pos),f.map(p.pos),c?r.Slice.empty:t),0==c&&v(e,s,(n?n.isInline:o&&o.isTextblock)?-1:1)}},s.prototype.replaceWith=function(e,t){for(var n=e.steps.length,r=this.ranges,o=0;o<r.length;o++){var i=r[o],s=i.$from,a=i.$to,c=e.mapping.slice(n),u=c.map(s.pos),l=c.map(a.pos);o?e.deleteRange(u,l):(e.replaceRangeWith(u,l,t),v(e,n,t.isInline?-1:1))}},s.findFrom=function(e,t,n){var r=e.parent.inlineContent?new u(e):m(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(var o=e.depth-1;o>=0;o--){var i=t<0?m(e.node(0),e.node(o),e.before(o+1),e.index(o),t,n):m(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,t,n);if(i)return i}},s.near=function(e,t){return void 0===t&&(t=1),this.findFrom(e,t)||this.findFrom(e,-t)||new h(e.node(0))},s.atStart=function(e){return m(e,e,0,0,1)||new h(e)},s.atEnd=function(e){return m(e,e,e.content.size,e.childCount,-1)||new h(e)},s.fromJSON=function(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");var n=i[t.type];if(!n)throw new RangeError("No selection type "+t.type+" defined");return n.fromJSON(e,t)},s.jsonID=function(e,t){if(e in i)throw new RangeError("Duplicate use of selection JSON ID "+e);return i[e]=t,t.prototype.jsonID=e,t},s.prototype.getBookmark=function(){return u.between(this.$anchor,this.$head).getBookmark()},Object.defineProperties(s.prototype,a),s.prototype.visible=!0;var c=function(e,t){this.$from=e,this.$to=t},u=function(e){function t(t,n){void 0===n&&(n=t),e.call(this,t,n)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={$cursor:{}};return n.$cursor.get=function(){return this.$anchor.pos==this.$head.pos?this.$head:null},t.prototype.map=function(n,r){var o=n.resolve(r.map(this.head));if(!o.parent.inlineContent)return e.near(o);var i=n.resolve(r.map(this.anchor));return new t(i.parent.inlineContent?i:o,o)},t.prototype.replace=function(t,n){if(void 0===n&&(n=r.Slice.empty),e.prototype.replace.call(this,t,n),n==r.Slice.empty){var o=this.$from.marksAcross(this.$to);o&&t.ensureMarks(o)}},t.prototype.eq=function(e){return e instanceof t&&e.anchor==this.anchor&&e.head==this.head},t.prototype.getBookmark=function(){return new l(this.anchor,this.head)},t.prototype.toJSON=function(){return{type:"text",anchor:this.anchor,head:this.head}},t.fromJSON=function(e,n){if("number"!=typeof n.anchor||"number"!=typeof n.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new t(e.resolve(n.anchor),e.resolve(n.head))},t.create=function(e,t,n){void 0===n&&(n=t);var r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))},t.between=function(n,r,o){var i=n.pos-r.pos;if(o&&!i||(o=i>=0?1:-1),!r.parent.inlineContent){var s=e.findFrom(r,o,!0)||e.findFrom(r,-o,!0);if(!s)return e.near(r,o);r=s.$head}return n.parent.inlineContent||(0==i?n=r:(n=(e.findFrom(n,-o,!0)||e.findFrom(n,o,!0)).$anchor).pos<r.pos!=i<0&&(n=r)),new t(n,r)},Object.defineProperties(t.prototype,n),t}(s);s.jsonID("text",u);var l=function(e,t){this.anchor=e,this.head=t};l.prototype.map=function(e){return new l(e.map(this.anchor),e.map(this.head))},l.prototype.resolve=function(e){return u.between(e.resolve(this.anchor),e.resolve(this.head))};var p=function(e){function t(t){var n=t.nodeAfter,r=t.node(0).resolve(t.pos+n.nodeSize);e.call(this,t,r),this.node=n}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.map=function(n,r){var o=r.mapResult(this.anchor),i=o.deleted,s=o.pos,a=n.resolve(s);return i?e.near(a):new t(a)},t.prototype.content=function(){return new r.Slice(r.Fragment.from(this.node),0,0)},t.prototype.eq=function(e){return e instanceof t&&e.anchor==this.anchor},t.prototype.toJSON=function(){return{type:"node",anchor:this.anchor}},t.prototype.getBookmark=function(){return new f(this.anchor)},t.fromJSON=function(e,n){if("number"!=typeof n.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new t(e.resolve(n.anchor))},t.create=function(e,t){return new this(e.resolve(t))},t.isSelectable=function(e){return!e.isText&&!1!==e.type.spec.selectable},t}(s);p.prototype.visible=!1,s.jsonID("node",p);var f=function(e){this.anchor=e};f.prototype.map=function(e){var t=e.mapResult(this.anchor),n=t.deleted,r=t.pos;return n?new l(r,r):new f(r)},f.prototype.resolve=function(e){var t=e.resolve(this.anchor),n=t.nodeAfter;return n&&p.isSelectable(n)?new p(t):s.near(t)};var h=function(e){function t(t){e.call(this,t.resolve(0),t.resolve(t.content.size))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toJSON=function(){return{type:"all"}},t.fromJSON=function(e){return new t(e)},t.prototype.map=function(e){return new t(e)},t.prototype.eq=function(e){return e instanceof t},t.prototype.getBookmark=function(){return d},t}(s);s.jsonID("all",h);var d={map:function(){return this},resolve:function(e){return new h(e)}};function m(e,t,n,r,o,i){if(t.inlineContent)return u.create(e,n);for(var s=r-(o>0?0:1);o>0?s<t.childCount:s>=0;s+=o){var a=t.child(s);if(a.isAtom){if(!i&&p.isSelectable(a))return p.create(e,n-(o<0?a.nodeSize:0))}else{var c=m(e,a,n+o,o<0?a.childCount:0,o,i);if(c)return c}n+=a.nodeSize*o}}function v(e,t,n){var r=e.steps.length-1;if(!(r<t)){var i,a=e.steps[r];if(a instanceof o.ReplaceStep||a instanceof o.ReplaceAroundStep)e.mapping.maps[r].forEach((function(e,t,n,r){null==i&&(i=r)})),e.setSelection(s.near(e.doc.resolve(i),n))}}var g=function(e){function t(t){e.call(this,t.doc),this.time=Date.now(),this.curSelection=t.selection,this.curSelectionFor=0,this.storedMarks=t.storedMarks,this.updated=0,this.meta=Object.create(null)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={selection:{},selectionSet:{},storedMarksSet:{},isGeneric:{},scrolledIntoView:{}};return n.selection.get=function(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection},t.prototype.setSelection=function(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=-3&(1|this.updated),this.storedMarks=null,this},n.selectionSet.get=function(){return(1&this.updated)>0},t.prototype.setStoredMarks=function(e){return this.storedMarks=e,this.updated|=2,this},t.prototype.ensureMarks=function(e){return r.Mark.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this},t.prototype.addStoredMark=function(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))},t.prototype.removeStoredMark=function(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))},n.storedMarksSet.get=function(){return(2&this.updated)>0},t.prototype.addStep=function(t,n){e.prototype.addStep.call(this,t,n),this.updated=-3&this.updated,this.storedMarks=null},t.prototype.setTime=function(e){return this.time=e,this},t.prototype.replaceSelection=function(e){return this.selection.replace(this,e),this},t.prototype.replaceSelectionWith=function(e,t){var n=this.selection;return!1!==t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||r.Mark.none))),n.replaceWith(this,e),this},t.prototype.deleteSelection=function(){return this.selection.replace(this),this},t.prototype.insertText=function(e,t,n){void 0===n&&(n=t);var r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();if(!e)return this.deleteRange(t,n);var o=this.storedMarks;if(!o){var i=this.doc.resolve(t);o=n==t?i.marks():i.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,o)),this.selection.empty||this.setSelection(s.near(this.selection.$to)),this},t.prototype.setMeta=function(e,t){return this.meta["string"==typeof e?e:e.key]=t,this},t.prototype.getMeta=function(e){return this.meta["string"==typeof e?e:e.key]},n.isGeneric.get=function(){for(var e in this.meta)return!1;return!0},t.prototype.scrollIntoView=function(){return this.updated|=4,this},n.scrolledIntoView.get=function(){return(4&this.updated)>0},Object.defineProperties(t.prototype,n),t}(o.Transform);function y(e,t){return t&&e?e.bind(t):e}var b=function(e,t,n){this.name=e,this.init=y(t.init,n),this.apply=y(t.apply,n)},w=[new b("doc",{init:function(e){return e.doc||e.schema.topNodeType.createAndFill()},apply:function(e){return e.doc}}),new b("selection",{init:function(e,t){return e.selection||s.atStart(t.doc)},apply:function(e){return e.selection}}),new b("storedMarks",{init:function(e){return e.storedMarks||null},apply:function(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new b("scrollToSelection",{init:function(){return 0},apply:function(e,t){return e.scrolledIntoView?t+1:t}})],k=function(e,t){var n=this;this.schema=e,this.fields=w.concat(),this.plugins=[],this.pluginsByKey=Object.create(null),t&&t.forEach((function(e){if(n.pluginsByKey[e.key])throw new RangeError("Adding different instances of a keyed plugin ("+e.key+")");n.plugins.push(e),n.pluginsByKey[e.key]=e,e.spec.state&&n.fields.push(new b(e.key,e.spec.state,e))}))},x=function(e){this.config=e},_={schema:{},plugins:{},tr:{}};_.schema.get=function(){return this.config.schema},_.plugins.get=function(){return this.config.plugins},x.prototype.apply=function(e){return this.applyTransaction(e).state},x.prototype.filterTransaction=function(e,t){void 0===t&&(t=-1);for(var n=0;n<this.config.plugins.length;n++)if(n!=t){var r=this.config.plugins[n];if(r.spec.filterTransaction&&!r.spec.filterTransaction.call(r,e,this))return!1}return!0},x.prototype.applyTransaction=function(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};for(var t=[e],n=this.applyInner(e),r=null;;){for(var o=!1,i=0;i<this.config.plugins.length;i++){var s=this.config.plugins[i];if(s.spec.appendTransaction){var a=r?r[i].n:0,c=r?r[i].state:this,u=a<t.length&&s.spec.appendTransaction.call(s,a?t.slice(a):t,c,n);if(u&&n.filterTransaction(u,i)){if(u.setMeta("appendedTransaction",e),!r){r=[];for(var l=0;l<this.config.plugins.length;l++)r.push(l<i?{state:n,n:t.length}:{state:this,n:0})}t.push(u),n=n.applyInner(u),o=!0}r&&(r[i]={state:n,n:t.length})}}if(!o)return{state:n,transactions:t}}},x.prototype.applyInner=function(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");for(var t=new x(this.config),n=this.config.fields,r=0;r<n.length;r++){var o=n[r];t[o.name]=o.apply(e,this[o.name],this,t)}for(var i=0;i<C.length;i++)C[i](this,e,t);return t},_.tr.get=function(){return new g(this)},x.create=function(e){for(var t=new k(e.schema||e.doc.type.schema,e.plugins),n=new x(t),r=0;r<t.fields.length;r++)n[t.fields[r].name]=t.fields[r].init(e,n);return n},x.prototype.reconfigure=function(e){for(var t=new k(e.schema||this.schema,e.plugins),n=t.fields,r=new x(t),o=0;o<n.length;o++){var i=n[o].name;r[i]=this.hasOwnProperty(i)?this[i]:n[o].init(e,r)}return r},x.prototype.toJSON=function(e){var t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map((function(e){return e.toJSON()}))),e&&"object"==typeof e)for(var n in e){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved");var r=e[n],o=r.spec.state;o&&o.toJSON&&(t[n]=o.toJSON.call(r,this[r.key]))}return t},x.fromJSON=function(e,t,n){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");var o=new k(e.schema,e.plugins),i=new x(o);return o.fields.forEach((function(o){if("doc"==o.name)i.doc=r.Node.fromJSON(e.schema,t.doc);else if("selection"==o.name)i.selection=s.fromJSON(i.doc,t.selection);else if("storedMarks"==o.name)t.storedMarks&&(i.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(n)for(var a in n){var c=n[a],u=c.spec.state;if(c.key==o.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(t,a))return void(i[o.name]=u.fromJSON.call(c,e,t[a],i))}i[o.name]=o.init(e,i)}})),i},x.addApplyListener=function(e){C.push(e)},x.removeApplyListener=function(e){var t=C.indexOf(e);t>-1&&C.splice(t,1)},Object.defineProperties(x.prototype,_);var C=[];var S=function(e){this.props={},e.props&&function e(t,n,r){for(var o in t){var i=t[o];i instanceof Function?i=i.bind(n):"handleDOMEvents"==o&&(i=e(i,n,{})),r[o]=i}return r}(e.props,this,this.props),this.spec=e,this.key=e.key?e.key.key:A("plugin")};S.prototype.getState=function(e){return e[this.key]};var O=Object.create(null);function A(e){return e in O?e+"$"+ ++O[e]:(O[e]=0,e+"$")}var E=function(e){void 0===e&&(e="key"),this.key=A(e)};E.prototype.get=function(e){return e.config.pluginsByKey[this.key]},E.prototype.getState=function(e){return e[this.key]},t.Selection=s,t.SelectionRange=c,t.TextSelection=u,t.NodeSelection=p,t.AllSelection=h,t.Transaction=g,t.EditorState=x,t.Plugin=S,t.PluginKey=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=(r=n(470))&&"object"==typeof r&&"default"in r?r.default:r;var i=function(e,t){if(this.content=e,this.size=t||0,null==t)for(var n=0;n<e.length;n++)this.size+=e[n].nodeSize},s={firstChild:{},lastChild:{},childCount:{}};i.prototype.nodesBetween=function(e,t,n,r,o){void 0===r&&(r=0);for(var i=0,s=0;s<t;i++){var a=this.content[i],c=s+a.nodeSize;if(c>e&&!1!==n(a,r+s,o,i)&&a.content.size){var u=s+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),n,r+u)}s=c}},i.prototype.descendants=function(e){this.nodesBetween(0,this.size,e)},i.prototype.textBetween=function(e,t,n,r){var o="",i=!0;return this.nodesBetween(e,t,(function(s,a){s.isText?(o+=s.text.slice(Math.max(e,a)-a,t-a),i=!n):s.isLeaf&&r?(o+=r,i=!n):!i&&s.isBlock&&(o+=n,i=!0)}),0),o},i.prototype.append=function(e){if(!e.size)return this;if(!this.size)return e;var t=this.lastChild,n=e.firstChild,r=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),o=1);o<e.content.length;o++)r.push(e.content[o]);return new i(r,this.size+e.size)},i.prototype.cut=function(e,t){if(null==t&&(t=this.size),0==e&&t==this.size)return this;var n=[],r=0;if(t>e)for(var o=0,s=0;s<t;o++){var a=this.content[o],c=s+a.nodeSize;c>e&&((s<e||c>t)&&(a=a.isText?a.cut(Math.max(0,e-s),Math.min(a.text.length,t-s)):a.cut(Math.max(0,e-s-1),Math.min(a.content.size,t-s-1))),n.push(a),r+=a.nodeSize),s=c}return new i(n,r)},i.prototype.cutByIndex=function(e,t){return e==t?i.empty:0==e&&t==this.content.length?this:new i(this.content.slice(e,t))},i.prototype.replaceChild=function(e,t){var n=this.content[e];if(n==t)return this;var r=this.content.slice(),o=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new i(r,o)},i.prototype.addToStart=function(e){return new i([e].concat(this.content),this.size+e.nodeSize)},i.prototype.addToEnd=function(e){return new i(this.content.concat(e),this.size+e.nodeSize)},i.prototype.eq=function(e){if(this.content.length!=e.content.length)return!1;for(var t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0},s.firstChild.get=function(){return this.content.length?this.content[0]:null},s.lastChild.get=function(){return this.content.length?this.content[this.content.length-1]:null},s.childCount.get=function(){return this.content.length},i.prototype.child=function(e){var t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t},i.prototype.maybeChild=function(e){return this.content[e]},i.prototype.forEach=function(e){for(var t=0,n=0;t<this.content.length;t++){var r=this.content[t];e(r,n,t),n+=r.nodeSize}},i.prototype.findDiffStart=function(e,t){return void 0===t&&(t=0),function e(t,n,r){for(var o=0;;o++){if(o==t.childCount||o==n.childCount)return t.childCount==n.childCount?null:r;var i=t.child(o),s=n.child(o);if(i!=s){if(!i.sameMarkup(s))return r;if(i.isText&&i.text!=s.text){for(var a=0;i.text[a]==s.text[a];a++)r++;return r}if(i.content.size||s.content.size){var c=e(i.content,s.content,r+1);if(null!=c)return c}r+=i.nodeSize}else r+=i.nodeSize}}(this,e,t)},i.prototype.findDiffEnd=function(e,t,n){return void 0===t&&(t=this.size),void 0===n&&(n=e.size),function e(t,n,r,o){for(var i=t.childCount,s=n.childCount;;){if(0==i||0==s)return i==s?null:{a:r,b:o};var a=t.child(--i),c=n.child(--s),u=a.nodeSize;if(a!=c){if(!a.sameMarkup(c))return{a:r,b:o};if(a.isText&&a.text!=c.text){for(var l=0,p=Math.min(a.text.length,c.text.length);l<p&&a.text[a.text.length-l-1]==c.text[c.text.length-l-1];)l++,r--,o--;return{a:r,b:o}}if(a.content.size||c.content.size){var f=e(a.content,c.content,r-1,o-1);if(f)return f}r-=u,o-=u}else r-=u,o-=u}}(this,e,t,n)},i.prototype.findIndex=function(e,t){if(void 0===t&&(t=-1),0==e)return c(0,e);if(e==this.size)return c(this.content.length,e);if(e>this.size||e<0)throw new RangeError("Position "+e+" outside of fragment ("+this+")");for(var n=0,r=0;;n++){var o=r+this.child(n).nodeSize;if(o>=e)return o==e||t>0?c(n+1,o):c(n,r);r=o}},i.prototype.toString=function(){return"<"+this.toStringInner()+">"},i.prototype.toStringInner=function(){return this.content.join(", ")},i.prototype.toJSON=function(){return this.content.length?this.content.map((function(e){return e.toJSON()})):null},i.fromJSON=function(e,t){if(!t)return i.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new i(t.map(e.nodeFromJSON))},i.fromArray=function(e){if(!e.length)return i.empty;for(var t,n=0,r=0;r<e.length;r++){var o=e[r];n+=o.nodeSize,r&&o.isText&&e[r-1].sameMarkup(o)?(t||(t=e.slice(0,r)),t[t.length-1]=o.withText(t[t.length-1].text+o.text)):t&&t.push(o)}return new i(t||e,n)},i.from=function(e){if(!e)return i.empty;if(e instanceof i)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new i([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))},Object.defineProperties(i.prototype,s);var a={index:0,offset:0};function c(e,t){return a.index=e,a.offset=t,a}function u(e,t){if(e===t)return!0;if(!e||"object"!=typeof e||!t||"object"!=typeof t)return!1;var n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(!u(e[r],t[r]))return!1}else{for(var o in e)if(!(o in t&&u(e[o],t[o])))return!1;for(var i in t)if(!(i in e))return!1}return!0}i.empty=new i([],0);var l=function(e,t){this.type=e,this.attrs=t};function p(e){var t=Error.call(this,e);return t.__proto__=p.prototype,t}l.prototype.addToSet=function(e){for(var t,n=!1,r=0;r<e.length;r++){var o=e[r];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,r));else{if(o.type.excludes(this.type))return e;!n&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(o)}}return t||(t=e.slice()),n||t.push(this),t},l.prototype.removeFromSet=function(e){for(var t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e},l.prototype.isInSet=function(e){for(var t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1},l.prototype.eq=function(e){return this==e||this.type==e.type&&u(this.attrs,e.attrs)},l.prototype.toJSON=function(){var e={type:this.type.name};for(var t in this.attrs){e.attrs=this.attrs;break}return e},l.fromJSON=function(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");var n=e.marks[t.type];if(!n)throw new RangeError("There is no mark type "+t.type+" in this schema");return n.create(t.attrs)},l.sameSet=function(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0},l.setFrom=function(e){if(!e||0==e.length)return l.none;if(e instanceof l)return[e];var t=e.slice();return t.sort((function(e,t){return e.type.rank-t.type.rank})),t},l.none=[],p.prototype=Object.create(Error.prototype),p.prototype.constructor=p,p.prototype.name="ReplaceError";var f=function(e,t,n){this.content=e,this.openStart=t,this.openEnd=n},h={size:{}};function d(e,t,n){if(n.openStart>e.depth)throw new p("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new p("Inconsistent open depths");return function e(t,n,r,o){var s=t.index(o),a=t.node(o);if(s==n.index(o)&&o<t.depth-r.openStart){var c=e(t,n,r,o+1);return a.copy(a.content.replaceChild(s,c))}if(r.content.size){if(r.openStart||r.openEnd||t.depth!=o||n.depth!=o){var u=function(e,t){for(var n=t.depth-e.openStart,r=t.node(n).copy(e.content),o=n-1;o>=0;o--)r=t.node(o).copy(i.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(r,t),l=u.start,p=u.end;return b(a,function e(t,n,r,o,s){var a=t.depth>s&&v(t,n,s+1);var c=o.depth>s&&v(r,o,s+1);var u=[];y(null,t,s,u);a&&c&&n.index(s)==r.index(s)?(m(a,c),g(b(a,e(t,n,r,o,s+1)),u)):(a&&g(b(a,w(t,n,s+1)),u),y(n,r,s,u),c&&g(b(c,w(r,o,s+1)),u));y(o,null,s,u);return new i(u)}(t,l,p,n,o))}var f=t.parent,h=f.content;return b(f,h.cut(0,t.parentOffset).append(r.content).append(h.cut(n.parentOffset)))}return b(a,w(t,n,o))}(e,t,n,0)}function m(e,t){if(!t.type.compatibleContent(e.type))throw new p("Cannot join "+t.type.name+" onto "+e.type.name)}function v(e,t,n){var r=e.node(n);return m(r,t.node(n)),r}function g(e,t){var n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function y(e,t,n,r){var o=(t||e).node(n),i=0,s=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(g(e.nodeAfter,r),i++));for(var a=i;a<s;a++)g(o.child(a),r);t&&t.depth==n&&t.textOffset&&g(t.nodeBefore,r)}function b(e,t){if(!e.type.validContent(t))throw new p("Invalid content for node "+e.type.name);return e.copy(t)}function w(e,t,n){var r=[];(y(null,e,n,r),e.depth>n)&&g(b(v(e,t,n+1),w(e,t,n+1)),r);return y(t,null,n,r),new i(r)}h.size.get=function(){return this.content.size-this.openStart-this.openEnd},f.prototype.insertAt=function(e,t){var n=function e(t,n,r,o){var i=t.findIndex(n);var s=i.index;var a=i.offset;var c=t.maybeChild(s);if(a==n||c.isText)return o&&!o.canReplace(s,s,r)?null:t.cut(0,n).append(r).append(t.cut(n));var u=e(c.content,n-a-1,r);return u&&t.replaceChild(s,c.copy(u))}(this.content,e+this.openStart,t,null);return n&&new f(n,this.openStart,this.openEnd)},f.prototype.removeBetween=function(e,t){return new f(function e(t,n,r){var o=t.findIndex(n);var i=o.index;var s=o.offset;var a=t.maybeChild(i);var c=t.findIndex(r);var u=c.index;var l=c.offset;if(s==n||a.isText){if(l!=r&&!t.child(u).isText)throw new RangeError("Removing non-flat range");return t.cut(0,n).append(t.cut(r))}if(i!=u)throw new RangeError("Removing non-flat range");return t.replaceChild(i,a.copy(e(a.content,n-s-1,r-s-1)))}(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)},f.prototype.eq=function(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd},f.prototype.toString=function(){return this.content+"("+this.openStart+","+this.openEnd+")"},f.prototype.toJSON=function(){if(!this.content.size)return null;var e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e},f.fromJSON=function(e,t){if(!t)return f.empty;var n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new f(i.fromJSON(e,t.content),t.openStart||0,t.openEnd||0)},f.maxOpen=function(e,t){void 0===t&&(t=!0);for(var n=0,r=0,o=e.firstChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.firstChild)n++;for(var i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)r++;return new f(e,n,r)},Object.defineProperties(f.prototype,h),f.empty=new f(i.empty,0,0);var k=function(e,t,n){this.pos=e,this.path=t,this.depth=t.length/3-1,this.parentOffset=n},x={parent:{},doc:{},textOffset:{},nodeAfter:{},nodeBefore:{}};k.prototype.resolveDepth=function(e){return null==e?this.depth:e<0?this.depth+e:e},x.parent.get=function(){return this.node(this.depth)},x.doc.get=function(){return this.node(0)},k.prototype.node=function(e){return this.path[3*this.resolveDepth(e)]},k.prototype.index=function(e){return this.path[3*this.resolveDepth(e)+1]},k.prototype.indexAfter=function(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)},k.prototype.start=function(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1},k.prototype.end=function(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size},k.prototype.before=function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]},k.prototype.after=function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize},x.textOffset.get=function(){return this.pos-this.path[this.path.length-1]},x.nodeAfter.get=function(){var e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;var n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r},x.nodeBefore.get=function(){var e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)},k.prototype.marks=function(){var e=this.parent,t=this.index();if(0==e.content.size)return l.none;if(this.textOffset)return e.child(t).marks;var n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){var o=n;n=r,r=o}for(var i=n.marks,s=0;s<i.length;s++)!1!==i[s].type.spec.inclusive||r&&i[s].isInSet(r.marks)||(i=i[s--].removeFromSet(i));return i},k.prototype.marksAcross=function(e){var t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;for(var n=t.marks,r=e.parent.maybeChild(e.index()),o=0;o<n.length;o++)!1!==n[o].type.spec.inclusive||r&&n[o].isInSet(r.marks)||(n=n[o--].removeFromSet(n));return n},k.prototype.sharedDepth=function(e){for(var t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0},k.prototype.blockRange=function(e,t){if(void 0===e&&(e=this),e.pos<this.pos)return e.blockRange(this);for(var n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new O(this,e,n)},k.prototype.sameParent=function(e){return this.pos-this.parentOffset==e.pos-e.parentOffset},k.prototype.max=function(e){return e.pos>this.pos?e:this},k.prototype.min=function(e){return e.pos<this.pos?e:this},k.prototype.toString=function(){for(var e="",t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset},k.resolve=function(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");for(var n=[],r=0,o=t,i=e;;){var s=i.content.findIndex(o),a=s.index,c=s.offset,u=o-c;if(n.push(i,a,r+c),!u)break;if((i=i.child(a)).isText)break;o=u-1,r+=c+1}return new k(t,n,o)},k.resolveCached=function(e,t){for(var n=0;n<_.length;n++){var r=_[n];if(r.pos==t&&r.doc==e)return r}var o=_[C]=k.resolve(e,t);return C=(C+1)%S,o},Object.defineProperties(k.prototype,x);var _=[],C=0,S=12,O=function(e,t,n){this.$from=e,this.$to=t,this.depth=n},A={start:{},end:{},parent:{},startIndex:{},endIndex:{}};A.start.get=function(){return this.$from.before(this.depth+1)},A.end.get=function(){return this.$to.after(this.depth+1)},A.parent.get=function(){return this.$from.node(this.depth)},A.startIndex.get=function(){return this.$from.index(this.depth)},A.endIndex.get=function(){return this.$to.indexAfter(this.depth)},Object.defineProperties(O.prototype,A);var E=Object.create(null),M=function(e,t,n,r){this.type=e,this.attrs=t,this.content=n||i.empty,this.marks=r||l.none},T={nodeSize:{},childCount:{},textContent:{},firstChild:{},lastChild:{},isBlock:{},isTextblock:{},inlineContent:{},isInline:{},isText:{},isLeaf:{},isAtom:{}};T.nodeSize.get=function(){return this.isLeaf?1:2+this.content.size},T.childCount.get=function(){return this.content.childCount},M.prototype.child=function(e){return this.content.child(e)},M.prototype.maybeChild=function(e){return this.content.maybeChild(e)},M.prototype.forEach=function(e){this.content.forEach(e)},M.prototype.nodesBetween=function(e,t,n,r){void 0===r&&(r=0),this.content.nodesBetween(e,t,n,r,this)},M.prototype.descendants=function(e){this.nodesBetween(0,this.content.size,e)},T.textContent.get=function(){return this.textBetween(0,this.content.size,"")},M.prototype.textBetween=function(e,t,n,r){return this.content.textBetween(e,t,n,r)},T.firstChild.get=function(){return this.content.firstChild},T.lastChild.get=function(){return this.content.lastChild},M.prototype.eq=function(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)},M.prototype.sameMarkup=function(e){return this.hasMarkup(e.type,e.attrs,e.marks)},M.prototype.hasMarkup=function(e,t,n){return this.type==e&&u(this.attrs,t||e.defaultAttrs||E)&&l.sameSet(this.marks,n||l.none)},M.prototype.copy=function(e){return void 0===e&&(e=null),e==this.content?this:new this.constructor(this.type,this.attrs,e,this.marks)},M.prototype.mark=function(e){return e==this.marks?this:new this.constructor(this.type,this.attrs,this.content,e)},M.prototype.cut=function(e,t){return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))},M.prototype.slice=function(e,t,n){if(void 0===t&&(t=this.content.size),void 0===n&&(n=!1),e==t)return f.empty;var r=this.resolve(e),o=this.resolve(t),i=n?0:r.sharedDepth(t),s=r.start(i),a=r.node(i).content.cut(r.pos-s,o.pos-s);return new f(a,r.depth-i,o.depth-i)},M.prototype.replace=function(e,t,n){return d(this.resolve(e),this.resolve(t),n)},M.prototype.nodeAt=function(e){for(var t=this;;){var n=t.content.findIndex(e),r=n.index,o=n.offset;if(!(t=t.maybeChild(r)))return null;if(o==e||t.isText)return t;e-=o+1}},M.prototype.childAfter=function(e){var t=this.content.findIndex(e),n=t.index,r=t.offset;return{node:this.content.maybeChild(n),index:n,offset:r}},M.prototype.childBefore=function(e){if(0==e)return{node:null,index:0,offset:0};var t=this.content.findIndex(e),n=t.index,r=t.offset;if(r<e)return{node:this.content.child(n),index:n,offset:r};var o=this.content.child(n-1);return{node:o,index:n-1,offset:r-o.nodeSize}},M.prototype.resolve=function(e){return k.resolveCached(this,e)},M.prototype.resolveNoCache=function(e){return k.resolve(this,e)},M.prototype.rangeHasMark=function(e,t,n){var r=!1;return t>e&&this.nodesBetween(e,t,(function(e){return n.isInSet(e.marks)&&(r=!0),!r})),r},T.isBlock.get=function(){return this.type.isBlock},T.isTextblock.get=function(){return this.type.isTextblock},T.inlineContent.get=function(){return this.type.inlineContent},T.isInline.get=function(){return this.type.isInline},T.isText.get=function(){return this.type.isText},T.isLeaf.get=function(){return this.type.isLeaf},T.isAtom.get=function(){return this.type.isAtom},M.prototype.toString=function(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);var e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),N(this.marks,e)},M.prototype.contentMatchAt=function(e){var t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t},M.prototype.canReplace=function(e,t,n,r,o){void 0===n&&(n=i.empty),void 0===r&&(r=0),void 0===o&&(o=n.childCount);var s=this.contentMatchAt(e).matchFragment(n,r,o),a=s&&s.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(var c=r;c<o;c++)if(!this.type.allowsMarks(n.child(c).marks))return!1;return!0},M.prototype.canReplaceWith=function(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;var o=this.contentMatchAt(e).matchType(n),i=o&&o.matchFragment(this.content,t);return!!i&&i.validEnd},M.prototype.canAppend=function(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)},M.prototype.defaultContentType=function(e){return this.contentMatchAt(e).defaultType},M.prototype.check=function(){if(!this.type.validContent(this.content))throw new RangeError("Invalid content for node "+this.type.name+": "+this.content.toString().slice(0,50));this.content.forEach((function(e){return e.check()}))},M.prototype.toJSON=function(){var e={type:this.type.name};for(var t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map((function(e){return e.toJSON()}))),e},M.fromJSON=function(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");var n=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}var r=i.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)},Object.defineProperties(M.prototype,T);var D=function(e){function t(t,n,r,o){if(e.call(this,t,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={textContent:{},nodeSize:{}};return t.prototype.toString=function(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):N(this.marks,JSON.stringify(this.text))},n.textContent.get=function(){return this.text},t.prototype.textBetween=function(e,t){return this.text.slice(e,t)},n.nodeSize.get=function(){return this.text.length},t.prototype.mark=function(e){return e==this.marks?this:new t(this.type,this.attrs,this.text,e)},t.prototype.withText=function(e){return e==this.text?this:new t(this.type,this.attrs,e,this.marks)},t.prototype.cut=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.text.length),0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))},t.prototype.eq=function(e){return this.sameMarkup(e)&&this.text==e.text},t.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return t.text=this.text,t},Object.defineProperties(t.prototype,n),t}(M);function N(e,t){for(var n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}var R=function(e){this.validEnd=e,this.next=[],this.wrapCache=[]},I={inlineContent:{},defaultType:{},edgeCount:{}};R.parse=function(e,t){var n=new P(e,t);if(null==n.next)return R.empty;var r=z(n);n.next&&n.err("Unexpected trailing text");var o=function(e){var t=Object.create(null);return function n(r){var o=[];r.forEach((function(t){e[t].forEach((function(t){var n=t.term,r=t.to;if(n){var i=o.indexOf(n),s=i>-1&&o[i+1];V(e,r).forEach((function(e){s||o.push(n,s=[]),-1==s.indexOf(e)&&s.push(e)}))}}))}));var i=t[r.join(",")]=new R(r.indexOf(e.length-1)>-1);for(var s=0;s<o.length;s+=2){var a=o[s+1].sort(q);i.next.push(o[s],t[a.join(",")]||n(a))}return i}(V(e,0))}(function(e){var t=[[]];return o(function e(t,i){if("choice"==t.type)return t.exprs.reduce((function(t,n){return t.concat(e(n,i))}),[]);if("seq"==t.type)for(var s=0;;s++){var a=e(t.exprs[s],i);if(s==t.exprs.length-1)return a;o(a,i=n())}else{if("star"==t.type){var c=n();return r(i,c),o(e(t.expr,c),c),[r(c)]}if("plus"==t.type){var u=n();return o(e(t.expr,i),u),o(e(t.expr,u),u),[r(u)]}if("opt"==t.type)return[r(i)].concat(e(t.expr,i));if("range"==t.type){for(var l=i,p=0;p<t.min;p++){var f=n();o(e(t.expr,l),f),l=f}if(-1==t.max)o(e(t.expr,l),l);else for(var h=t.min;h<t.max;h++){var d=n();r(l,d),o(e(t.expr,l),d),l=d}return[r(l)]}if("name"==t.type)return[r(i,null,t.value)]}}(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){var o={term:r,to:n};return t[e].push(o),o}function o(e,t){e.forEach((function(e){return e.to=t}))}}(r));return function(e,t){for(var n=0,r=[e];n<r.length;n++){for(var o=r[n],i=!o.validEnd,s=[],a=0;a<o.next.length;a+=2){var c=o.next[a],u=o.next[a+1];s.push(c.name),!i||c.isText||c.hasRequiredAttrs()||(i=!1),-1==r.indexOf(u)&&r.push(u)}i&&t.err("Only non-generatable nodes ("+s.join(", ")+") in a required position")}}(o,n),o},R.prototype.matchType=function(e){for(var t=0;t<this.next.length;t+=2)if(this.next[t]==e)return this.next[t+1];return null},R.prototype.matchFragment=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=e.childCount);for(var r=this,o=t;r&&o<n;o++)r=r.matchType(e.child(o).type);return r},I.inlineContent.get=function(){var e=this.next[0];return!!e&&e.isInline},I.defaultType.get=function(){for(var e=0;e<this.next.length;e+=2){var t=this.next[e];if(!t.isText&&!t.hasRequiredAttrs())return t}},R.prototype.compatible=function(e){for(var t=0;t<this.next.length;t+=2)for(var n=0;n<e.next.length;n+=2)if(this.next[t]==e.next[n])return!0;return!1},R.prototype.fillBefore=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=0);var r=[this];return function o(s,a){var c=s.matchFragment(e,n);if(c&&(!t||c.validEnd))return i.from(a.map((function(e){return e.createAndFill()})));for(var u=0;u<s.next.length;u+=2){var l=s.next[u],p=s.next[u+1];if(!l.isText&&!l.hasRequiredAttrs()&&-1==r.indexOf(p)){r.push(p);var f=o(p,a.concat(l));if(f)return f}}}(this,[])},R.prototype.findWrapping=function(e){for(var t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];var n=this.computeWrapping(e);return this.wrapCache.push(e,n),n},R.prototype.computeWrapping=function(e){for(var t=Object.create(null),n=[{match:this,type:null,via:null}];n.length;){var r=n.shift(),o=r.match;if(o.matchType(e)){for(var i=[],s=r;s.type;s=s.via)i.push(s.type);return i.reverse()}for(var a=0;a<o.next.length;a+=2){var c=o.next[a];c.isLeaf||c.hasRequiredAttrs()||c.name in t||r.type&&!o.next[a+1].validEnd||(n.push({match:c.contentMatch,type:c,via:r}),t[c.name]=!0)}}},I.edgeCount.get=function(){return this.next.length>>1},R.prototype.edge=function(e){var t=e<<1;if(t>this.next.length)throw new RangeError("There's no "+e+"th edge in this content match");return{type:this.next[t],next:this.next[t+1]}},R.prototype.toString=function(){var e=[];return function t(n){e.push(n);for(var r=1;r<n.next.length;r+=2)-1==e.indexOf(n.next[r])&&t(n.next[r])}(this),e.map((function(t,n){for(var r=n+(t.validEnd?"*":" ")+" ",o=0;o<t.next.length;o+=2)r+=(o?", ":"")+t.next[o].name+"->"+e.indexOf(t.next[o+1]);return r})).join("\n")},Object.defineProperties(R.prototype,I),R.empty=new R(!0);var P=function(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.unshift()},j={next:{}};function z(e){var t=[];do{t.push(F(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function F(e){var t=[];do{t.push($(e))}while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function $(e){for(var t=function(e){if(e.eat("(")){var t=z(e);return e.eat(")")||e.err("Missing closing paren"),t}if(!/\W/.test(e.next)){var n=function(e,t){var n=e.nodeTypes,r=n[t];if(r)return[r];var o=[];for(var i in n){var s=n[i];s.groups.indexOf(t)>-1&&o.push(s)}0==o.length&&e.err("No node type or group '"+t+"' found");return o}(e,e.next).map((function(t){return null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t}}));return e.pos++,1==n.length?n[0]:{type:"choice",exprs:n}}e.err("Unexpected token '"+e.next+"'")}(e);;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else{if(!e.eat("{"))break;t=B(e,t)}return t}function L(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");var t=Number(e.next);return e.pos++,t}function B(e,t){var n=L(e),r=n;return e.eat(",")&&(r="}"!=e.next?L(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function q(e,t){return e-t}function V(e,t){var n=[];return function t(r){var o=e[r];if(1==o.length&&!o[0].term)return t(o[0].to);n.push(r);for(var i=0;i<o.length;i++){var s=o[i],a=s.term,c=s.to;a||-1!=n.indexOf(c)||t(c)}}(t),n.sort(q)}function H(e){var t=Object.create(null);for(var n in e){var r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function U(e,t){var n=Object.create(null);for(var r in e){var o=t&&t[r];if(void 0===o){var i=e[r];if(!i.hasDefault)throw new RangeError("No value supplied for attribute "+r);o=i.default}n[r]=o}return n}function W(e){var t=Object.create(null);if(e)for(var n in e)t[n]=new G(e[n]);return t}j.next.get=function(){return this.tokens[this.pos]},P.prototype.eat=function(e){return this.next==e&&(this.pos++||!0)},P.prototype.err=function(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")},Object.defineProperties(P.prototype,j);var J=function(e,t,n){this.name=e,this.schema=t,this.spec=n,this.groups=n.group?n.group.split(" "):[],this.attrs=W(n.attrs),this.defaultAttrs=H(this.attrs),this.contentMatch=null,this.markSet=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==e),this.isText="text"==e},K={isInline:{},isTextblock:{},isLeaf:{},isAtom:{}};K.isInline.get=function(){return!this.isBlock},K.isTextblock.get=function(){return this.isBlock&&this.inlineContent},K.isLeaf.get=function(){return this.contentMatch==R.empty},K.isAtom.get=function(){return this.isLeaf||this.spec.atom},J.prototype.hasRequiredAttrs=function(e){for(var t in this.attrs)if(this.attrs[t].isRequired&&(!e||!(t in e)))return!0;return!1},J.prototype.compatibleContent=function(e){return this==e||this.contentMatch.compatible(e.contentMatch)},J.prototype.computeAttrs=function(e){return!e&&this.defaultAttrs?this.defaultAttrs:U(this.attrs,e)},J.prototype.create=function(e,t,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new M(this,this.computeAttrs(e),i.from(t),l.setFrom(n))},J.prototype.createChecked=function(e,t,n){if(t=i.from(t),!this.validContent(t))throw new RangeError("Invalid content for node "+this.name);return new M(this,this.computeAttrs(e),t,l.setFrom(n))},J.prototype.createAndFill=function(e,t,n){if(e=this.computeAttrs(e),(t=i.from(t)).size){var r=this.contentMatch.fillBefore(t);if(!r)return null;t=r.append(t)}var o=this.contentMatch.matchFragment(t).fillBefore(i.empty,!0);return o?new M(this,e,t.append(o),l.setFrom(n)):null},J.prototype.validContent=function(e){var t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(var n=0;n<e.childCount;n++)if(!this.allowsMarks(e.child(n).marks))return!1;return!0},J.prototype.allowsMarkType=function(e){return null==this.markSet||this.markSet.indexOf(e)>-1},J.prototype.allowsMarks=function(e){if(null==this.markSet)return!0;for(var t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0},J.prototype.allowedMarks=function(e){var t;if(null==this.markSet)return e;for(var n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:l.empty:e},J.compile=function(e,t){var n=Object.create(null);e.forEach((function(e,r){return n[e]=new J(e,t,r)}));var r=t.spec.topNode||"doc";if(!n[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(var o in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n},Object.defineProperties(J.prototype,K);var G=function(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default},Z={isRequired:{}};Z.isRequired.get=function(){return!this.hasDefault},Object.defineProperties(G.prototype,Z);var X=function(e,t,n,r){this.name=e,this.schema=n,this.spec=r,this.attrs=W(r.attrs),this.rank=t,this.excluded=null;var o=H(this.attrs);this.instance=o&&new l(this,o)};X.prototype.create=function(e){return!e&&this.instance?this.instance:new l(this,U(this.attrs,e))},X.compile=function(e,t){var n=Object.create(null),r=0;return e.forEach((function(e,o){return n[e]=new X(e,r++,t,o)})),n},X.prototype.removeFromSet=function(e){for(var t=0;t<e.length;t++)if(e[t].type==this)return e.slice(0,t).concat(e.slice(t+1));return e},X.prototype.isInSet=function(e){for(var t=0;t<e.length;t++)if(e[t].type==this)return e[t]},X.prototype.excludes=function(e){return this.excluded.indexOf(e)>-1};var Y=function(e){for(var t in this.spec={},e)this.spec[t]=e[t];this.spec.nodes=o.from(e.nodes),this.spec.marks=o.from(e.marks),this.nodes=J.compile(this.spec.nodes,this),this.marks=X.compile(this.spec.marks,this);var n=Object.create(null);for(var r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");var i=this.nodes[r],s=i.spec.content||"",a=i.spec.marks;i.contentMatch=n[s]||(n[s]=R.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.markSet="_"==a?null:a?Q(this,a.split(" ")):""!=a&&i.inlineContent?null:[]}for(var c in this.marks){var u=this.marks[c],l=u.spec.excludes;u.excluded=null==l?[u]:""==l?[]:Q(this,l.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached=Object.create(null),this.cached.wrappings=Object.create(null)};function Q(e,t){for(var n=[],r=0;r<t.length;r++){var o=t[r],i=e.marks[o],s=i;if(i)n.push(i);else for(var a in e.marks){var c=e.marks[a];("_"==o||c.spec.group&&c.spec.group.split(" ").indexOf(o)>-1)&&n.push(s=c)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}Y.prototype.node=function(e,t,n,r){if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof J))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,n,r)},Y.prototype.text=function(e,t){var n=this.nodes.text;return new D(n,n.defaultAttrs,e,l.setFrom(t))},Y.prototype.mark=function(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)},Y.prototype.nodeFromJSON=function(e){return M.fromJSON(this,e)},Y.prototype.markFromJSON=function(e){return l.fromJSON(this,e)},Y.prototype.nodeType=function(e){var t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t};var ee=function(e,t){var n=this;this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach((function(e){e.tag?n.tags.push(e):e.style&&n.styles.push(e)}))};ee.prototype.parse=function(e,t){void 0===t&&(t={});var n=new ce(this,t,!1);return n.addAll(e,null,t.from,t.to),n.finish()},ee.prototype.parseSlice=function(e,t){void 0===t&&(t={});var n=new ce(this,t,!0);return n.addAll(e,null,t.from,t.to),f.maxOpen(n.finish())},ee.prototype.matchTag=function(e,t){for(var n=0;n<this.tags.length;n++){var r=this.tags[n];if(le(e,r.tag)&&(void 0===r.namespace||e.namespaceURI==r.namespace)&&(!r.context||t.matchesContext(r.context))){if(r.getAttrs){var o=r.getAttrs(e);if(!1===o)continue;r.attrs=o}return r}}},ee.prototype.matchStyle=function(e,t,n){for(var r=0;r<this.styles.length;r++){var o=this.styles[r];if(!(0!=o.style.indexOf(e)||o.context&&!n.matchesContext(o.context)||o.style.length>e.length&&(61!=o.style.charCodeAt(e.length)||o.style.slice(e.length+1)!=t))){if(o.getAttrs){var i=o.getAttrs(t);if(!1===i)continue;o.attrs=i}return o}}},ee.schemaRules=function(e){var t=[];function n(e){for(var n=null==e.priority?50:e.priority,r=0;r<t.length;r++){var o=t[r];if((null==o.priority?50:o.priority)<n)break}t.splice(r,0,e)}var r=function(t){var r=e.marks[t].spec.parseDOM;r&&r.forEach((function(e){n(e=pe(e)),e.mark=t}))};for(var o in e.marks)r(o);var i;for(var s in e.nodes)i=void 0,(i=e.nodes[s].spec.parseDOM)&&i.forEach((function(e){n(e=pe(e)),e.node=s}));return t},ee.fromSchema=function(e){return e.cached.domParser||(e.cached.domParser=new ee(e,ee.schemaRules(e)))};var te={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},ne={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},re={ol:!0,ul:!0},oe=1,ie=2;function se(e){return(e?oe:0)|("full"===e?ie:0)}var ae=function(e,t,n,r,o,i){this.type=e,this.attrs=t,this.solid=r,this.match=o||(4&i?null:e.contentMatch),this.options=i,this.content=[],this.marks=n,this.activeMarks=l.none};ae.prototype.findWrapping=function(e){if(!this.match){if(!this.type)return[];var t=this.type.contentMatch.fillBefore(i.from(e));if(!t){var n,r=this.type.contentMatch;return(n=r.findWrapping(e.type))?(this.match=r,n):null}this.match=this.type.contentMatch.matchFragment(t)}return this.match.findWrapping(e.type)},ae.prototype.finish=function(e){if(!(this.options&oe)){var t,n=this.content[this.content.length-1];n&&n.isText&&(t=/\s+$/.exec(n.text))&&(n.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-t[0].length)))}var r=i.from(this.content);return!e&&this.match&&(r=r.append(this.match.fillBefore(i.empty,!0))),this.type?this.type.create(this.attrs,r,this.marks):r};var ce=function(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.pendingMarks=[];var r,o=t.topNode,i=se(t.preserveWhitespace)|(n?4:0);r=o?new ae(o.type,o.attrs,l.none,!0,t.topMatch||o.type.contentMatch,i):new ae(n?null:e.schema.topNodeType,null,l.none,!0,null,i),this.nodes=[r],this.open=0,this.find=t.findPositions,this.needsBlock=!1},ue={top:{},currentPos:{}};function le(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function pe(e){var t={};for(var n in e)t[n]=e[n];return t}ue.top.get=function(){return this.nodes[this.open]},ce.prototype.addDOM=function(e){if(3==e.nodeType)this.addTextNode(e);else if(1==e.nodeType){var t=e.getAttribute("style"),n=t?this.readStyles(function(e){var t,n=/\s*([\w-]+)\s*:\s*([^;]+)/g,r=[];for(;t=n.exec(e);)r.push(t[1],t[2].trim());return r}(t)):null;if(null!=n)for(var r=0;r<n.length;r++)this.addPendingMark(n[r]);if(this.addElement(e),null!=n)for(var o=0;o<n.length;o++)this.removePendingMark(n[o])}},ce.prototype.addTextNode=function(e){var t=e.nodeValue,n=this.top;if((n.type?n.type.inlineContent:n.content.length&&n.content[0].isInline)||/\S/.test(t)){if(n.options&oe)n.options&ie||(t=t.replace(/\r?\n|\r/g," "));else if(t=t.replace(/\s+/g," "),/^\s/.test(t)&&this.open==this.nodes.length-1){var r=n.content[n.content.length-1],o=e.previousSibling;(!r||o&&"BR"==o.nodeName||r.isText&&/\s$/.test(r.text))&&(t=t.slice(1))}t&&this.insertNode(this.parser.schema.text(t)),this.findInText(e)}else this.findInside(e)},ce.prototype.addElement=function(e){var t=e.nodeName.toLowerCase();re.hasOwnProperty(t)&&function(e){for(var t=e.firstChild,n=null;t;t=t.nextSibling){var r=1==t.nodeType?t.nodeName.toLowerCase():null;r&&re.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):"li"==r?n=t:r&&(n=null)}}(e);var n=this.options.ruleFromNode&&this.options.ruleFromNode(e)||this.parser.matchTag(e,this);if(n?n.ignore:ne.hasOwnProperty(t))this.findInside(e);else if(!n||n.skip){n&&n.skip.nodeType&&(e=n.skip);var r,o=this.top,i=this.needsBlock;te.hasOwnProperty(t)&&(r=!0,o.type||(this.needsBlock=!0)),this.addAll(e),r&&this.sync(o),this.needsBlock=i}else this.addElementByRule(e,n)},ce.prototype.readStyles=function(e){for(var t=l.none,n=0;n<e.length;n+=2){var r=this.parser.matchStyle(e[n],e[n+1],this);if(r){if(r.ignore)return null;t=this.parser.schema.marks[r.mark].create(r.attrs).addToSet(t)}}return t},ce.prototype.addElementByRule=function(e,t){var n,r,o,i=this;t.node?(r=this.parser.schema.nodes[t.node]).isLeaf?this.insertNode(r.create(t.attrs)):n=this.enter(r,t.attrs,t.preserveWhitespace):(o=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(o));var s=this.top;if(r&&r.isLeaf)this.findInside(e);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach((function(e){return i.insertNode(e)}));else{var a=t.contentElement;"string"==typeof a?a=e.querySelector(a):"function"==typeof a&&(a=a(e)),a||(a=e),this.findAround(e,a,!0),this.addAll(a,n)}return n&&(this.sync(s),this.open--),o&&this.removePendingMark(o),!0},ce.prototype.addAll=function(e,t,n,r){for(var o=n||0,i=n?e.childNodes[n]:e.firstChild,s=null==r?null:e.childNodes[r];i!=s;i=i.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(i),t&&te.hasOwnProperty(i.nodeName.toLowerCase())&&this.sync(t);this.findAtPoint(e,o)},ce.prototype.findPlace=function(e){for(var t,n,r=this.open;r>=0;r--){var o=this.nodes[r],i=o.findWrapping(e);if(i&&(!t||t.length>i.length)&&(t=i,n=o,!i.length))break;if(o.solid)break}if(!t)return!1;this.sync(n);for(var s=0;s<t.length;s++)this.enterInner(t[s],null,!1);return!0},ce.prototype.insertNode=function(e){if(e.isInline&&this.needsBlock&&!this.top.type){var t=this.textblockFromContext();t&&this.enterInner(t)}if(this.findPlace(e)){this.closeExtra();var n=this.top;this.applyPendingMarks(n),n.match&&(n.match=n.match.matchType(e.type));for(var r=n.activeMarks,o=0;o<e.marks.length;o++)n.type&&!n.type.allowsMarkType(e.marks[o].type)||(r=e.marks[o].addToSet(r));n.content.push(e.mark(r))}},ce.prototype.applyPendingMarks=function(e){for(var t=0;t<this.pendingMarks.length;t++){var n=this.pendingMarks[t];e.type&&!e.type.allowsMarkType(n.type)||n.isInSet(e.activeMarks)||(e.activeMarks=n.addToSet(e.activeMarks),this.pendingMarks.splice(t--,1))}},ce.prototype.enter=function(e,t,n){var r=this.findPlace(e.create(t));return r&&(this.applyPendingMarks(this.top),this.enterInner(e,t,!0,n)),r},ce.prototype.enterInner=function(e,t,n,r){this.closeExtra();var o=this.top;o.match=o.match&&o.match.matchType(e,t);var i=null==r?-5&o.options:se(r);4&o.options&&0==o.content.length&&(i|=4),this.nodes.push(new ae(e,t,o.activeMarks,n,null,i)),this.open++},ce.prototype.closeExtra=function(e){var t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}},ce.prototype.finish=function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)},ce.prototype.sync=function(e){for(var t=this.open;t>=0;t--)if(this.nodes[t]==e)return void(this.open=t)},ce.prototype.addPendingMark=function(e){this.pendingMarks.push(e)},ce.prototype.removePendingMark=function(e){var t=this.pendingMarks.lastIndexOf(e);if(t>-1)this.pendingMarks.splice(t,1);else{var n=this.top;n.activeMarks=e.removeFromSet(n.activeMarks)}},ue.currentPos.get=function(){this.closeExtra();for(var e=0,t=this.open;t>=0;t--){for(var n=this.nodes[t].content,r=n.length-1;r>=0;r--)e+=n[r].nodeSize;t&&e++}return e},ce.prototype.findAtPoint=function(e,t){if(this.find)for(var n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)},ce.prototype.findInside=function(e){if(this.find)for(var t=0;t<this.find.length;t++)null==this.find[t].pos&&1==e.nodeType&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)},ce.prototype.findAround=function(e,t,n){if(e!=t&&this.find)for(var r=0;r<this.find.length;r++){if(null==this.find[r].pos&&1==e.nodeType&&e.contains(this.find[r].node))t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}},ce.prototype.findInText=function(e){if(this.find)for(var t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))},ce.prototype.matchesContext=function(e){var t=this;if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);var n=e.split("/"),r=this.options.context,o=!(this.isOpen||r&&r.parent.type!=this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),s=function(e,a){for(;e>=0;e--){var c=n[e];if(""==c){if(e==n.length-1||0==e)continue;for(;a>=i;a--)if(s(e-1,a))return!0;return!1}var u=a>0||0==a&&o?t.nodes[a].type:r&&a>=i?r.node(a-i).type:null;if(!u||u.name!=c&&-1==u.groups.indexOf(c))return!1;a--}return!0};return s(n.length-1,this.open)},ce.prototype.textblockFromContext=function(){var e=this.options.context;if(e)for(var t=e.depth;t>=0;t--){var n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(var r in this.parser.schema.nodes){var o=this.parser.schema.nodes[r];if(o.isTextblock&&o.defaultAttrs)return o}},Object.defineProperties(ce.prototype,ue);var fe=function(e,t){this.nodes=e||{},this.marks=t||{}};function he(e){var t={};for(var n in e){var r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function de(e){return e.document||window.document}fe.prototype.serializeFragment=function(e,t,n){var r=this;void 0===t&&(t={}),n||(n=de(t).createDocumentFragment());var o=n,i=null;return e.forEach((function(e){if(i||e.marks.length){i||(i=[]);for(var n=0,s=0;n<i.length&&s<e.marks.length;){var a=e.marks[s];if(r.marks[a.type.name]){if(!a.eq(i[n])||!1===a.type.spec.spanning)break;n+=2,s++}else s++}for(;n<i.length;)o=i.pop(),i.pop();for(;s<e.marks.length;){var c=e.marks[s++],u=r.serializeMark(c,e.isInline,t);u&&(i.push(c,o),o.appendChild(u.dom),o=u.contentDOM||u.dom)}}o.appendChild(r.serializeNode(e,t))})),n},fe.prototype.serializeNode=function(e,t){void 0===t&&(t={});var n=fe.renderSpec(de(t),this.nodes[e.type.name](e)),r=n.dom,o=n.contentDOM;if(o){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");t.onContent?t.onContent(e,o,t):this.serializeFragment(e.content,t,o)}return r},fe.prototype.serializeNodeAndMarks=function(e,t){void 0===t&&(t={});for(var n=this.serializeNode(e,t),r=e.marks.length-1;r>=0;r--){var o=this.serializeMark(e.marks[r],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n},fe.prototype.serializeMark=function(e,t,n){void 0===n&&(n={});var r=this.marks[e.type.name];return r&&fe.renderSpec(de(n),r(e,t))},fe.renderSpec=function(e,t){if("string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};var n=e.createElement(t[0]),r=null,o=t[1],i=1;if(o&&"object"==typeof o&&null==o.nodeType&&!Array.isArray(o))for(var s in i=2,o)null!=o[s]&&n.setAttribute(s,o[s]);for(var a=i;a<t.length;a++){var c=t[a];if(0===c){if(a<t.length-1||a>i)throw new RangeError("Content hole must be the only child of its parent node");return{dom:n,contentDOM:n}}var u=fe.renderSpec(e,c),l=u.dom,p=u.contentDOM;if(n.appendChild(l),p){if(r)throw new RangeError("Multiple content holes");r=p}}return{dom:n,contentDOM:r}},fe.fromSchema=function(e){return e.cached.domSerializer||(e.cached.domSerializer=new fe(this.nodesFromSchema(e),this.marksFromSchema(e)))},fe.nodesFromSchema=function(e){var t=he(e.nodes);return t.text||(t.text=function(e){return e.text}),t},fe.marksFromSchema=function(e){return he(e.marks)},t.Node=M,t.ResolvedPos=k,t.NodeRange=O,t.Fragment=i,t.Slice=f,t.ReplaceError=p,t.Mark=l,t.Schema=Y,t.NodeType=J,t.MarkType=X,t.ContentMatch=R,t.DOMParser=ee,t.DOMSerializer=fe},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(241),o=65535,i=Math.pow(2,16);function s(e){return e&o}var a=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=null),this.pos=e,this.deleted=t,this.recover=n},c=function(e,t){void 0===t&&(t=!1),this.ranges=e,this.inverted=t};c.prototype.recover=function(e){var t=0,n=s(e);if(!this.inverted)for(var r=0;r<n;r++)t+=this.ranges[3*r+2]-this.ranges[3*r+1];return this.ranges[3*n]+t+function(e){return(e-(e&o))/i}(e)},c.prototype.mapResult=function(e,t){return void 0===t&&(t=1),this._map(e,t,!1)},c.prototype.map=function(e,t){return void 0===t&&(t=1),this._map(e,t,!0)},c.prototype._map=function(e,t,n){for(var r=0,o=this.inverted?2:1,s=this.inverted?1:2,c=0;c<this.ranges.length;c+=3){var u=this.ranges[c]-(this.inverted?r:0);if(u>e)break;var l=this.ranges[c+o],p=this.ranges[c+s],f=u+l;if(e<=f){var h=u+r+((l?e==u?-1:e==f?1:t:t)<0?0:p);if(n)return h;var d=c/3+(e-u)*i;return new a(h,t<0?e!=u:e!=f,d)}r+=p-l}return n?e+r:new a(e+r)},c.prototype.touches=function(e,t){for(var n=0,r=s(t),o=this.inverted?2:1,i=this.inverted?1:2,a=0;a<this.ranges.length;a+=3){var c=this.ranges[a]-(this.inverted?n:0);if(c>e)break;var u=this.ranges[a+o];if(e<=c+u&&a==3*r)return!0;n+=this.ranges[a+i]-u}return!1},c.prototype.forEach=function(e){for(var t=this.inverted?2:1,n=this.inverted?1:2,r=0,o=0;r<this.ranges.length;r+=3){var i=this.ranges[r],s=i-(this.inverted?o:0),a=i+(this.inverted?0:o),c=this.ranges[r+t],u=this.ranges[r+n];e(s,s+c,a,a+u),o+=u-c}},c.prototype.invert=function(){return new c(this.ranges,!this.inverted)},c.prototype.toString=function(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)},c.offset=function(e){return 0==e?c.empty:new c(e<0?[0,-e,0]:[0,0,e])},c.empty=new c([]);var u=function(e,t,n,r){this.maps=e||[],this.from=n||0,this.to=null==r?this.maps.length:r,this.mirror=t};function l(e){var t=Error.call(this,e);return t.__proto__=l.prototype,t}u.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.maps.length),new u(this.maps,this.mirror,e,t)},u.prototype.copy=function(){return new u(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)},u.prototype.appendMap=function(e,t){this.to=this.maps.push(e),null!=t&&this.setMirror(this.maps.length-1,t)},u.prototype.appendMapping=function(e){for(var t=0,n=this.maps.length;t<e.maps.length;t++){var r=e.getMirror(t);this.appendMap(e.maps[t],null!=r&&r<t?n+r:null)}},u.prototype.getMirror=function(e){if(this.mirror)for(var t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]},u.prototype.setMirror=function(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)},u.prototype.appendMappingInverted=function(e){for(var t=e.maps.length-1,n=this.maps.length+e.maps.length;t>=0;t--){var r=e.getMirror(t);this.appendMap(e.maps[t].invert(),null!=r&&r>t?n-r-1:null)}},u.prototype.invert=function(){var e=new u;return e.appendMappingInverted(this),e},u.prototype.map=function(e,t){if(void 0===t&&(t=1),this.mirror)return this._map(e,t,!0);for(var n=this.from;n<this.to;n++)e=this.maps[n].map(e,t);return e},u.prototype.mapResult=function(e,t){return void 0===t&&(t=1),this._map(e,t,!1)},u.prototype._map=function(e,t,n){for(var r=!1,o=null,i=this.from;i<this.to;i++){var s=this.maps[i],c=o&&o[i];if(null!=c&&s.touches(e,c))e=s.recover(c);else{var u=s.mapResult(e,t);if(null!=u.recover){var l=this.getMirror(i);if(null!=l&&l>i&&l<this.to){if(u.deleted){i=l,e=this.maps[l].recover(u.recover);continue}(o||(o=Object.create(null)))[l]=u.recover}}u.deleted&&(r=!0),e=u.pos}}return n?e:new a(e,r)},l.prototype=Object.create(Error.prototype),l.prototype.constructor=l,l.prototype.name="TransformError";var p=function(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new u},f={before:{},docChanged:{}};function h(){throw new Error("Override me")}f.before.get=function(){return this.docs.length?this.docs[0]:this.doc},p.prototype.step=function(e){var t=this.maybeStep(e);if(t.failed)throw new l(t.failed);return this},p.prototype.maybeStep=function(e){var t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t},f.docChanged.get=function(){return this.steps.length>0},p.prototype.addStep=function(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t},Object.defineProperties(p.prototype,f);var d=Object.create(null),m=function(){};m.prototype.apply=function(e){return h()},m.prototype.getMap=function(){return c.empty},m.prototype.invert=function(e){return h()},m.prototype.map=function(e){return h()},m.prototype.merge=function(e){return null},m.prototype.toJSON=function(){return h()},m.fromJSON=function(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");var n=d[t.stepType];if(!n)throw new RangeError("No step type "+t.stepType+" defined");return n.fromJSON(e,t)},m.jsonID=function(e,t){if(e in d)throw new RangeError("Duplicate use of step JSON ID "+e);return d[e]=t,t.prototype.jsonID=e,t};var v=function(e,t){this.doc=e,this.failed=t};v.ok=function(e){return new v(e,null)},v.fail=function(e){return new v(null,e)},v.fromReplace=function(e,t,n,o){try{return v.ok(e.replace(t,n,o))}catch(e){if(e instanceof r.ReplaceError)return v.fail(e.message);throw e}};var g=function(e){function t(t,n,r,o){e.call(this),this.from=t,this.to=n,this.slice=r,this.structure=!!o}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){return this.structure&&b(e,this.from,this.to)?v.fail("Structure replace would overwrite content"):v.fromReplace(e,this.from,this.to,this.slice)},t.prototype.getMap=function(){return new c([this.from,this.to-this.from,this.slice.size])},t.prototype.invert=function(e){return new t(this.from,this.from+this.slice.size,e.slice(this.from,this.to))},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted?null:new t(n.pos,Math.max(n.pos,r.pos),this.slice)},t.prototype.merge=function(e){if(!(e instanceof t)||e.structure!=this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;var n=this.slice.size+e.slice.size==0?r.Slice.empty:new r.Slice(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new t(e.from,this.to,n,this.structure)}var o=this.slice.size+e.slice.size==0?r.Slice.empty:new r.Slice(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new t(this.from,this.to+(e.to-e.from),o,this.structure)},t.prototype.toJSON=function(){var e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new t(n.from,n.to,r.Slice.fromJSON(e,n.slice),!!n.structure)},t}(m);m.jsonID("replace",g);var y=function(e){function t(t,n,r,o,i,s,a){e.call(this),this.from=t,this.to=n,this.gapFrom=r,this.gapTo=o,this.slice=i,this.insert=s,this.structure=!!a}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){if(this.structure&&(b(e,this.from,this.gapFrom)||b(e,this.gapTo,this.to)))return v.fail("Structure gap-replace would overwrite content");var t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return v.fail("Gap is not a flat range");var n=this.slice.insertAt(this.insert,t.content);return n?v.fromReplace(e,this.from,this.to,n):v.fail("Content does not fit in gap")},t.prototype.getMap=function(){return new c([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])},t.prototype.invert=function(e){var n=this.gapTo-this.gapFrom;return new t(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),o=e.map(this.gapFrom,-1),i=e.map(this.gapTo,1);return n.deleted&&r.deleted||o<n.pos||i>r.pos?null:new t(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)},t.prototype.toJSON=function(){var e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to||"number"!=typeof n.gapFrom||"number"!=typeof n.gapTo||"number"!=typeof n.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new t(n.from,n.to,n.gapFrom,n.gapTo,r.Slice.fromJSON(e,n.slice),n.insert,!!n.structure)},t}(m);function b(e,t,n){for(var r=e.resolve(t),o=n-t,i=r.depth;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0)for(var s=r.node(i).maybeChild(r.indexAfter(i));o>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,o--}return!1}function w(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function k(e){return{type:e,attrs:null}}function x(e,t){return e&&t&&!e.isLeaf&&e.canAppend(t)}function _(e,t,n){var r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(var o=r.depth-1;o>=0;o--){var i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(var s=r.depth-1;s>=0;s--){var a=r.indexAfter(s);if(r.node(s).canReplaceWith(a,a,n))return r.after(s+1);if(a<r.node(s).childCount)return null}}function C(e,t,n){for(var o=[],i=0;i<e.childCount;i++){var s=e.child(i);s.content.size&&(s=s.copy(C(s.content,t,s))),s.isInline&&(s=t(s,n,i)),o.push(s)}return r.Fragment.fromArray(o)}m.jsonID("replaceAround",y),p.prototype.lift=function(e,t){for(var n=e.$from,o=e.$to,i=e.depth,s=n.before(i+1),a=o.after(i+1),c=s,u=a,l=r.Fragment.empty,p=0,f=i,h=!1;f>t;f--)h||n.index(f)>0?(h=!0,l=r.Fragment.from(n.node(f).copy(l)),p++):c--;for(var d=r.Fragment.empty,m=0,v=i,g=!1;v>t;v--)g||o.after(v+1)<o.end(v)?(g=!0,d=r.Fragment.from(o.node(v).copy(d)),m++):u++;return this.step(new y(c,u,s,a,new r.Slice(l.append(d),p,m),l.size-p,!0))},p.prototype.wrap=function(e,t){for(var n=r.Fragment.empty,o=t.length-1;o>=0;o--)n=r.Fragment.from(t[o].type.create(t[o].attrs,n));var i=e.start,s=e.end;return this.step(new y(i,s,i,s,new r.Slice(n,0,0),t.length,!0))},p.prototype.setBlockType=function(e,t,n,o){var i=this;if(void 0===t&&(t=e),!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var s=this.steps.length;return this.doc.nodesBetween(e,t,(function(e,t){if(e.isTextblock&&!e.hasMarkup(n,o)&&function(e,t,n){var r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(i.doc,i.mapping.slice(s).map(t),n)){i.clearIncompatible(i.mapping.slice(s).map(t,1),n);var a=i.mapping.slice(s),c=a.map(t,1),u=a.map(t+e.nodeSize,1);return i.step(new y(c,u,c+1,u-1,new r.Slice(r.Fragment.from(n.create(o,null,e.marks)),0,0),1,!0)),!1}})),this},p.prototype.setNodeMarkup=function(e,t,n,o){var i=this.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");t||(t=i.type);var s=t.create(n,null,o||i.marks);if(i.isLeaf)return this.replaceWith(e,e+i.nodeSize,s);if(!t.validContent(i.content))throw new RangeError("Invalid content for node type "+t.name);return this.step(new y(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new r.Slice(r.Fragment.from(s),0,0),1,!0))},p.prototype.split=function(e,t,n){void 0===t&&(t=1);for(var o=this.doc.resolve(e),i=r.Fragment.empty,s=r.Fragment.empty,a=o.depth,c=o.depth-t,u=t-1;a>c;a--,u--){i=r.Fragment.from(o.node(a).copy(i));var l=n&&n[u];s=r.Fragment.from(l?l.type.create(l.attrs,s):o.node(a).copy(s))}return this.step(new g(e,e,new r.Slice(i.append(s),t,t,!0)))},p.prototype.join=function(e,t){void 0===t&&(t=1);var n=new g(e-t,e+t,r.Slice.empty,!0);return this.step(n)};var S=function(e){function t(t,n,r){e.call(this),this.from=t,this.to=n,this.mark=r}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){var t=this,n=e.slice(this.from,this.to),o=e.resolve(this.from),i=o.node(o.sharedDepth(this.to)),s=new r.Slice(C(n.content,(function(e,n){return n.type.allowsMarkType(t.mark.type)?e.mark(t.mark.addToSet(e.marks)):e}),i),n.openStart,n.openEnd);return v.fromReplace(e,this.from,this.to,s)},t.prototype.invert=function(){return new O(this.from,this.to,this.mark)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new t(n.pos,r.pos,this.mark)},t.prototype.merge=function(e){if(e instanceof t&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from)return new t(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark)},t.prototype.toJSON=function(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new t(n.from,n.to,e.markFromJSON(n.mark))},t}(m);m.jsonID("addMark",S);var O=function(e){function t(t,n,r){e.call(this),this.from=t,this.to=n,this.mark=r}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){var t=this,n=e.slice(this.from,this.to),o=new r.Slice(C(n.content,(function(e){return e.mark(t.mark.removeFromSet(e.marks))})),n.openStart,n.openEnd);return v.fromReplace(e,this.from,this.to,o)},t.prototype.invert=function(){return new S(this.from,this.to,this.mark)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new t(n.pos,r.pos,this.mark)},t.prototype.merge=function(e){if(e instanceof t&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from)return new t(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark)},t.prototype.toJSON=function(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new t(n.from,n.to,e.markFromJSON(n.mark))},t}(m);function A(e,t,n,o){if(void 0===n&&(n=t),void 0===o&&(o=r.Slice.empty),t==n&&!o.size)return null;var i=e.resolve(t),s=e.resolve(n);if(T(i,s,o))return new g(t,n,o);var a=function(e,t){var n=function e(t,n,o,i){var s=r.Fragment.empty,a=0,c=o[n];if(t.depth>n){var u=e(t,n+1,o,i||c);a=u.openEnd+1,s=r.Fragment.from(t.node(n+1).copy(u.content))}c&&(s=s.append(c.content),a=c.openEnd);i&&(s=s.append(t.node(n).contentMatchAt(t.indexAfter(n)).fillBefore(r.Fragment.empty,!0)),a=0);return{content:s,openEnd:a}}(e,0,t,!1),o=n.content,i=n.openEnd;return new r.Slice(o,e.depth,i||0)}(i,function(e,t){for(var n=new D(e),r=1;t.size&&r<=3;r++)t=n.placeSlice(t.content,t.openStart,t.openEnd,r);for(;n.open.length;)n.closeNode();return n.placed}(i,o)),c=M(i,s,a);if(!c)return null;if(a.size!=c.size&&function(e,t,n){if(!t.parent.isTextblock)return!1;var r,o=n.openEnd?function(e,t){for(var n=1;n<t;n++)e=e.lastChild.content;return e.lastChild}(n.content,n.openEnd):e.node(e.depth-(n.openStart-n.openEnd));if(!o.isTextblock)return!1;for(var i=t.index();i<t.parent.childCount;i++)if(!o.type.allowsMarks(t.parent.child(i).marks))return!1;n.openEnd?r=o.contentMatchAt(o.childCount):(r=o.contentMatchAt(o.childCount),n.size&&(r=r.matchFragment(n.content,n.openStart?1:0)));return(r=r.matchFragment(t.parent.content,t.index()))&&r.validEnd}(i,s,a)){for(var u=s.depth,l=s.after(u);u>1&&l==s.end(--u);)++l;var p=M(i,e.resolve(l),a);if(p)return new y(t,l,n,s.end(),p,a.size)}return c.size||t!=n?new g(t,n,c):null}function E(e,t,n,o,i,s,a){var c,u=e.childCount,l=u-(a>0?1:0),p=s<0?t:n.node(i);c=s<0?p.contentMatchAt(l):1==u&&a>0?p.contentMatchAt(s?n.index(i):n.indexAfter(i)):p.contentMatchAt(n.indexAfter(i)).matchFragment(e,u>0&&s?1:0,l);var f=o.node(i);if(a>0&&i<o.depth){var h=f.content.cutByIndex(o.indexAfter(i)).addToStart(e.lastChild),d=c.fillBefore(h,!0);if(d&&d.size&&s>0&&1==u&&(d=null),d){var m=E(e.lastChild.content,e.lastChild,n,o,i+1,1==u?s-1:-1,a-1);if(m){var v=e.lastChild.copy(m);return d.size?e.cutByIndex(0,u-1).append(d).addToEnd(v):e.replaceChild(u-1,v)}}}a>0&&(c=c.matchType((1==u&&s>0?n.node(i+1):e.lastChild).type));var g=o.index(i);if(g==f.childCount&&!f.type.compatibleContent(t.type))return null;for(var y=c.fillBefore(f.content,!0,g),b=g;y&&b<f.content.childCount;b++)p.type.allowsMarks(f.content.child(b).marks)||(y=null);if(!y)return null;if(a>0){var w=function e(t,n,o,i,s){var a,c=t.content,u=c.childCount;a=s>=0?o.node(i).contentMatchAt(o.indexAfter(i)).matchFragment(c,s>0?1:0,u):t.contentMatchAt(u);if(n>0){var l=e(c.lastChild,n-1,o,i+1,1==u?s-1:-1);c=c.replaceChild(u-1,l)}return t.copy(c.append(a.fillBefore(r.Fragment.empty,!0)))}(e.lastChild,a-1,n,i+1,1==u?s-1:-1);e=e.replaceChild(u-1,w)}return e=e.append(y),o.depth>i&&(e=e.addToEnd(function e(t,n){var r=t.node(n);var o=r.contentMatchAt(0).fillBefore(r.content,!0,t.index(n));t.depth>n&&(o=o.addToEnd(e(t,n+1)));return r.copy(o)}(o,i+1))),e}function M(e,t,n){var o=E(n.content,e.node(0),e,t,0,n.openStart,n.openEnd);return o?function(e,t,n){for(;t>0&&n>0&&1==e.childCount;)e=e.firstChild.content,t--,n--;return new r.Slice(e,t,n)}(o,n.openStart,t.depth):null}function T(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}m.jsonID("removeMark",O),p.prototype.addMark=function(e,t,n){var r=this,o=[],i=[],s=null,a=null;return this.doc.nodesBetween(e,t,(function(r,c,u){if(r.isInline){var l=r.marks;if(!n.isInSet(l)&&u.type.allowsMarkType(n.type)){for(var p=Math.max(c,e),f=Math.min(c+r.nodeSize,t),h=n.addToSet(l),d=0;d<l.length;d++)l[d].isInSet(h)||(s&&s.to==p&&s.mark.eq(l[d])?s.to=f:o.push(s=new O(p,f,l[d])));a&&a.to==p?a.to=f:i.push(a=new S(p,f,n))}}})),o.forEach((function(e){return r.step(e)})),i.forEach((function(e){return r.step(e)})),this},p.prototype.removeMark=function(e,t,n){var o=this;void 0===n&&(n=null);var i=[],s=0;return this.doc.nodesBetween(e,t,(function(o,a){if(o.isInline){s++;var c=null;if(n instanceof r.MarkType){var u=n.isInSet(o.marks);u&&(c=[u])}else n?n.isInSet(o.marks)&&(c=[n]):c=o.marks;if(c&&c.length)for(var l=Math.min(a+o.nodeSize,t),p=0;p<c.length;p++){for(var f=c[p],h=void 0,d=0;d<i.length;d++){var m=i[d];m.step==s-1&&f.eq(i[d].style)&&(h=m)}h?(h.to=l,h.step=s):i.push({style:f,from:Math.max(a,e),to:l,step:s})}}})),i.forEach((function(e){return o.step(new O(e.from,e.to,e.style))})),this},p.prototype.clearIncompatible=function(e,t,n){void 0===n&&(n=t.contentMatch);for(var o=this.doc.nodeAt(e),i=[],s=e+1,a=0;a<o.childCount;a++){var c=o.child(a),u=s+c.nodeSize,l=n.matchType(c.type,c.attrs);if(l){n=l;for(var p=0;p<c.marks.length;p++)t.allowsMarkType(c.marks[p].type)||this.step(new O(s,u,c.marks[p]))}else i.push(new g(s,u,r.Slice.empty));s=u}if(!n.validEnd){var f=n.fillBefore(r.Fragment.empty,!0);this.replace(s,s,new r.Slice(f,0,0))}for(var h=i.length-1;h>=0;h--)this.step(i[h]);return this},p.prototype.replace=function(e,t,n){void 0===t&&(t=e),void 0===n&&(n=r.Slice.empty);var o=A(this.doc,e,t,n);return o&&this.step(o),this},p.prototype.replaceWith=function(e,t,n){return this.replace(e,t,new r.Slice(r.Fragment.from(n),0,0))},p.prototype.delete=function(e,t){return this.replace(e,t,r.Slice.empty)},p.prototype.insert=function(e,t){return this.replaceWith(e,e,t)};var D=function(e){this.open=[];for(var t=0;t<=e.depth;t++){var n=e.node(t),o=n.contentMatchAt(e.indexAfter(t));this.open.push({parent:n,match:o,content:r.Fragment.empty,wrapper:!1,openEnd:0,depth:t})}this.placed=[]};function N(e,t,n){var r=e.content;if(t>1){var o=N(e.firstChild,t-1,1==e.childCount?n-1:0);r=e.content.replaceChild(0,o)}var i=e.type.contentMatch.fillBefore(r,0==n);return e.copy(i.append(r))}function R(e,t,n,r,o){if(t<n){var i=e.firstChild;e=e.replaceChild(0,i.copy(R(i.content,t+1,n,r,i)))}return t>r&&(e=o.contentMatchAt(0).fillBefore(e,!0).append(e)),e}function I(e,t){for(var n=[],r=Math.min(e.depth,t.depth);r>=0;r--){var o=e.start(r);if(o<e.pos-(e.depth-r)||t.end(r)>t.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;o==t.start(r)&&n.push(r)}return n}D.prototype.placeSlice=function(e,t,n,o,i){if(t>0){var s=e.firstChild,a=this.placeSlice(s.content,Math.max(0,t-1),n&&1==e.childCount?n-1:0,o,s);a.content!=s.content&&(a.content.size?(e=e.replaceChild(0,s.copy(a.content)),t=a.openStart+1):(1==e.childCount&&(n=0),e=e.cutByIndex(1),t=0))}var c=this.placeContent(e,t,n,o,i);if(o>2&&c.size&&0==t){for(var u=0;u<c.content.childCount;u++){var l=c.content.child(u);this.placeContent(l.content,0,n&&u==c.content.childCount.length-1?n-1:0,o,l)}c=r.Fragment.empty}return c},D.prototype.placeContent=function(e,t,n,o,i){for(var s=0;s<e.childCount;s++){for(var a=e.child(s),c=!1,u=s==e.childCount-1,l=this.open.length-1;l>=0;l--){var p=this.open[l],f=void 0;if(o>1&&(f=p.match.findWrapping(a.type))&&(!i||!f.length||f[f.length-1]!=i.type)){for(;this.open.length-1>l;)this.closeNode();for(var h=0;h<f.length;h++)p.match=p.match.matchType(f[h]),l++,p={parent:f[h].create(),match:f[h].contentMatch,content:r.Fragment.empty,wrapper:!0,openEnd:0,depth:l+h},this.open.push(p)}var d=p.match.matchType(a.type);if(!d){var m=p.match.fillBefore(r.Fragment.from(a));if(!m){if(i&&p.match.matchType(i.type))break;continue}for(var v=0;v<m.childCount;v++){var g=m.child(v);this.addNode(p,g,0),d=p.match.matchFragment(g)}}for(;this.open.length-1>l;)this.closeNode();a=a.mark(p.parent.type.allowedMarks(a.marks)),t&&(a=N(a,t,u?n:0),t=0),this.addNode(p,a,u?n:0),p.match=d,u&&(n=0),c=!0;break}if(!c)break}return this.open.length>1&&(s>0&&s==e.childCount||i&&this.open[this.open.length-1].parent.type==i.type)&&this.closeNode(),new r.Slice(e.cutByIndex(s),t,n)},D.prototype.addNode=function(e,t,n){var o,i;e.content=(o=e.content,i=e.openEnd,i?o.replaceChild(o.childCount-1,function e(t,n){var o=t.content;if(n>1){var i=e(t.lastChild,n-1);o=t.content.replaceChild(t.childCount-1,i)}var s=t.contentMatchAt(t.childCount).fillBefore(r.Fragment.empty,!0);return t.copy(o.append(s))}(o.lastChild,i)):o).addToEnd(t),e.openEnd=n},D.prototype.closeNode=function(){var e=this.open.pop();0==e.content.size||(e.wrapper?this.addNode(this.open[this.open.length-1],e.parent.copy(e.content),e.openEnd+1):this.placed[e.depth]={depth:e.depth,content:e.content,openEnd:e.openEnd})},p.prototype.replaceRange=function(e,t,n){if(!n.size)return this.deleteRange(e,t);var o=this.doc.resolve(e),i=this.doc.resolve(t);if(T(o,i,n))return this.step(new g(e,t,n));var s=I(o,this.doc.resolve(t));0==s[s.length-1]&&s.pop();var a=-(o.depth+1);s.unshift(a);for(var c=o.depth,u=o.pos-1;c>0;c--,u--){var l=o.node(c).type.spec;if(l.defining||l.isolating)break;s.indexOf(c)>-1?a=c:o.before(c)==u&&s.splice(1,0,-c)}for(var p=s.indexOf(a),f=[],h=n.openStart,d=n.content,m=0;;m++){var v=d.firstChild;if(f.push(v),m==n.openStart)break;d=v.content}h>0&&f[h-1].type.spec.defining&&o.node(p).type!=f[h-1].type?h-=1:h>=2&&f[h-1].isTextblock&&f[h-2].type.spec.defining&&o.node(p).type!=f[h-2].type&&(h-=2);for(var y=n.openStart;y>=0;y--){var b=(y+h+1)%(n.openStart+1),w=f[b];if(w)for(var k=0;k<s.length;k++){var x=s[(k+p)%s.length],_=!0;x<0&&(_=!1,x=-x);var C=o.node(x-1),S=o.index(x-1);if(C.canReplaceWith(S,S,w.type,w.marks))return this.replace(o.before(x),_?i.after(x):t,new r.Slice(R(n.content,0,n.openStart,b),b,n.openEnd))}}return this.replace(e,t,n)},p.prototype.replaceRangeWith=function(e,t,n){if(!n.isInline&&e==t&&this.doc.resolve(e).parent.content.size){var o=_(this.doc,e,n.type);null!=o&&(e=t=o)}return this.replaceRange(e,t,new r.Slice(r.Fragment.from(n),0,0))},p.prototype.deleteRange=function(e,t){for(var n=this.doc.resolve(e),r=this.doc.resolve(t),o=I(n,r),i=0;i<o.length;i++){var s=o[i],a=i==o.length-1;if(a&&0==s||n.node(s).type.contentMatch.validEnd)return this.delete(n.start(s),r.end(s));if(s>0&&(a||n.node(s-1).canReplace(n.index(s-1),r.indexAfter(s-1))))return this.delete(n.before(s),r.after(s))}for(var c=1;c<=n.depth;c++)if(e-n.start(c)==n.depth-c&&t>n.end(c))return this.delete(n.before(c),t);return this.delete(e,t)},t.Transform=p,t.TransformError=l,t.Step=m,t.StepResult=v,t.joinPoint=function(e,t,n){void 0===n&&(n=-1);for(var r=e.resolve(t),o=r.depth;;o--){var i=void 0,s=void 0;if(o==r.depth?(i=r.nodeBefore,s=r.nodeAfter):n>0?(i=r.node(o+1),s=r.node(o).maybeChild(r.index(o)+1)):(i=r.node(o).maybeChild(r.index(o)-1),s=r.node(o+1)),i&&!i.isTextblock&&x(i,s))return t;if(0==o)break;t=n<0?r.before(o):r.after(o)}},t.canJoin=function(e,t){var n=e.resolve(t),r=n.index();return x(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)},t.canSplit=function(e,t,n,r){void 0===n&&(n=1);var o=e.resolve(t),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(var a=o.depth-1,c=n-2;a>i;a--,c--){var u=o.node(a),l=o.index(a);if(u.type.spec.isolating)return!1;var p=u.content.cutByIndex(l,u.childCount),f=r&&r[c]||u;if(f!=u&&(p=p.replaceChild(0,f.type.create(f.attrs))),!u.canReplace(l+1,u.childCount)||!f.type.validContent(p))return!1}var h=o.indexAfter(i),d=r&&r[0];return o.node(i).canReplaceWith(h,h,d?d.type:o.node(i+1).type)},t.insertPoint=_,t.dropPoint=function(e,t,n){var r=e.resolve(t);if(!n.content.size)return t;for(var o=n.content,i=0;i<n.openStart;i++)o=o.firstChild.content;for(var s=1;s<=(0==n.openStart&&n.size?2:1);s++)for(var a=r.depth;a>=0;a--){var c=a==r.depth?0:r.pos<=(r.start(a+1)+r.end(a+1))/2?-1:1,u=r.index(a)+(c>0?1:0);if(1==s?r.node(a).canReplace(u,u,o):r.node(a).contentMatchAt(u).findWrapping(o.firstChild.type))return 0==c?r.pos:c<0?r.before(a+1):r.after(a+1)}return null},t.liftTarget=function(e){for(var t=e.parent.content.cutByIndex(e.startIndex,e.endIndex),n=e.depth;;--n){var r=e.$from.node(n),o=e.$from.index(n),i=e.$to.indexAfter(n);if(n<e.depth&&r.canReplace(o,i,t))return n;if(0==n||r.type.spec.isolating||!w(r,o,i))break}},t.findWrapping=function(e,t,n,r){void 0===r&&(r=e);var o=function(e,t){var n=e.parent,r=e.startIndex,o=e.endIndex,i=n.contentMatchAt(r).findWrapping(t);if(!i)return null;var s=i.length?i[0]:t;return n.canReplaceWith(r,o,s)?i:null}(e,t),i=o&&function(e,t){var n=e.parent,r=e.startIndex,o=e.endIndex,i=n.child(r),s=t.contentMatch.findWrapping(i.type);if(!s)return null;for(var a=(s.length?s[s.length-1]:t).contentMatch,c=r;a&&c<o;c++)a=a.matchType(n.child(c).type);if(!a||!a.validEnd)return null;return s}(r,t);return i?o.map(k).concat({type:t,attrs:n}).concat(i.map(k)):null},t.StepMap=c,t.MapResult=a,t.Mapping=u,t.AddMarkStep=S,t.RemoveMarkStep=O,t.ReplaceStep=g,t.ReplaceAroundStep=y,t.replaceStep=A},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var o=(s=r,a=btoa(unescape(encodeURIComponent(JSON.stringify(s)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a),"/*# ".concat(c," */")),i=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot).concat(e," */")}));return[n].concat(i).concat([o]).join("\n")}var s,a,c;return[n].join("\n")}(t,e);return t[2]?"@media ".concat(t[2],"{").concat(n,"}"):n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];null!=i&&(r[i]=!0)}for(var s=0;s<e.length;s++){var a=e[s];null!=a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="(".concat(a[2],") and (").concat(n,")")),t.push(a))}},t}},function(e,t,n){"use strict";function r(e,t){for(var n=[],r={},o=0;o<t.length;o++){var i=t[o],s=i[0],a={id:e+":"+o,css:i[1],media:i[2],sourceMap:i[3]};r[s]?r[s].parts.push(a):n.push(r[s]={id:s,parts:[a]})}return n}n.r(t),n.d(t,"default",(function(){return d}));var o="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!o)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var i={},s=o&&(document.head||document.getElementsByTagName("head")[0]),a=null,c=0,u=!1,l=function(){},p=null,f="data-vue-ssr-id",h="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function d(e,t,n,o){u=n,p=o||{};var s=r(e,t);return m(s),function(t){for(var n=[],o=0;o<s.length;o++){var a=s[o];(c=i[a.id]).refs--,n.push(c)}t?m(s=r(e,t)):s=[];for(o=0;o<n.length;o++){var c;if(0===(c=n[o]).refs){for(var u=0;u<c.parts.length;u++)c.parts[u]();delete i[c.id]}}}}function m(e){for(var t=0;t<e.length;t++){var n=e[t],r=i[n.id];if(r){r.refs++;for(var o=0;o<r.parts.length;o++)r.parts[o](n.parts[o]);for(;o<n.parts.length;o++)r.parts.push(g(n.parts[o]));r.parts.length>n.parts.length&&(r.parts.length=n.parts.length)}else{var s=[];for(o=0;o<n.parts.length;o++)s.push(g(n.parts[o]));i[n.id]={id:n.id,refs:1,parts:s}}}}function v(){var e=document.createElement("style");return e.type="text/css",s.appendChild(e),e}function g(e){var t,n,r=document.querySelector("style["+f+'~="'+e.id+'"]');if(r){if(u)return l;r.parentNode.removeChild(r)}if(h){var o=c++;r=a||(a=v()),t=w.bind(null,r,o,!1),n=w.bind(null,r,o,!0)}else r=v(),t=k.bind(null,r),n=function(){r.parentNode.removeChild(r)};return t(e),function(r){if(r){if(r.css===e.css&&r.media===e.media&&r.sourceMap===e.sourceMap)return;t(e=r)}else n()}}var y,b=(y=[],function(e,t){return y[e]=t,y.filter(Boolean).join("\n")});function w(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=b(t,o);else{var i=document.createTextNode(o),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(i,s[t]):e.appendChild(i)}}function k(e,t){var n=t.css,r=t.media,o=t.sourceMap;if(r&&e.setAttribute("media",r),p.ssrId&&e.setAttribute(f,t.id),o&&(n+="\n/*# sourceURL="+o.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return L})),n.d(t,"b",(function(){return B})),n.d(t,"c",(function(){return V})),n.d(t,"d",(function(){return K})),n.d(t,"e",(function(){return T})),n.d(t,"f",(function(){return R})),n.d(t,"g",(function(){return P})),n.d(t,"j",(function(){return F}));var r=n(240);n.d(t,"h",(function(){return r.Plugin})),n.d(t,"i",(function(){return r.PluginKey}));var o=n(249),i=n(241),s=n(471),a=n(472),c=n(252),u=n(239),l=n(247),p=n(253),f=n(112),h=n(255);
/*!
    * tiptap v1.26.2
    * (c) 2019 Scrumpy UG (limited liability)
    * @license MIT
    */
function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(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)}}function g(e,t,n){return t&&v(e.prototype,t),n&&v(e,n),e}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(n,!0).forEach((function(t){y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function k(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_(e,t)}function x(e){return(x=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function C(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function S(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function O(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function A(e){return e.replace(/(?:^\w|[A-Z]|\b\w)/g,(function(e,t){return 0===t?e.toLowerCase():e.toUpperCase()})).replace(/\s+/g,"")}var E=function(){function e(t,n){var r=n.editor,o=n.extension,i=n.parent,s=n.node,a=n.view,c=n.decorations,u=n.getPos;m(this,e),this.component=t,this.editor=r,this.extension=o,this.parent=i,this.node=s,this.view=a,this.decorations=c,this.isNode=!!this.node.marks,this.isMark=!this.isNode,this.getPos=this.isMark?this.getMarkPos:u,this.captureEvents=!0,this.dom=this.createDOM(),this.contentDOM=this.vm.$refs.content}return g(e,[{key:"createDOM",value:function(){var e=this,t=f.default.extend(this.component),n={editor:this.editor,node:this.node,view:this.view,getPos:function(){return e.getPos()},decorations:this.decorations,selected:!1,options:this.extension.options,updateAttrs:function(t){return e.updateAttrs(t)}};return"function"==typeof this.extension.setSelection&&(this.setSelection=this.extension.setSelection),this.vm=new t({parent:this.parent,propsData:n}).$mount(),this.vm.$el}},{key:"update",value:function(e,t){return e.type===this.node.type&&(e===this.node&&this.decorations===t||(this.node=e,this.decorations=t,this.updateComponentProps({node:e,decorations:t}),!0))}},{key:"updateComponentProps",value:function(e){var t=this;if(this.vm._props){var n=f.default.config.silent;f.default.config.silent=!0,Object.entries(e).forEach((function(e){var n=S(e,2),r=n[0],o=n[1];t.vm._props[r]=o})),f.default.config.silent=n}}},{key:"updateAttrs",value:function(e){if(this.view.editable){var t=this.view.state,n=this.node.type,r=this.getPos(),o=w({},this.node.attrs,{},e),i=this.isMark?t.tr.removeMark(r.from,r.to,n).addMark(r.from,r.to,n.create(o)):t.tr.setNodeMarkup(r,null,o);this.view.dispatch(i)}}},{key:"ignoreMutation",value:function(e){return!this.contentDOM||!this.contentDOM.contains(e.target)}},{key:"stopEvent",value:function(e){var t=this;if("function"==typeof this.extension.stopEvent)return this.extension.stopEvent(e);var n=!!this.extension.schema.draggable;if(n&&"mousedown"===e.type){var r=e.target.closest&&e.target.closest("[data-drag-handle]");r&&(this.dom===r||this.dom.contains(r))&&(this.captureEvents=!1,document.addEventListener("dragend",(function(){t.captureEvents=!0}),{once:!0}))}var o="copy"===e.type,i="paste"===e.type,s="cut"===e.type,a=e.type.startsWith("drag")||"drop"===e.type;return!(n&&a||o||i||s)&&this.captureEvents}},{key:"selectNode",value:function(){this.updateComponentProps({selected:!0})}},{key:"deselectNode",value:function(){this.updateComponentProps({selected:!1})}},{key:"getMarkPos",value:function(){var e=this.view.posAtDOM(this.dom),t=this.view.state.doc.resolve(e);return Object(p.b)(t,this.node.type)}},{key:"destroy",value:function(){this.vm.$destroy()}}]),e}(),M=function(){function e(){m(this,e)}return g(e,[{key:"on",value:function(e,t){return this._callbacks=this._callbacks||{},this._callbacks[e]||(this._callbacks[e]=[]),this._callbacks[e].push(t),this}},{key:"emit",value:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];this._callbacks=this._callbacks||{};var i=this._callbacks[e];return i&&i.forEach((function(e){return e.apply(t,r)})),this}},{key:"off",value:function(e,t){if(arguments.length){var n=this._callbacks?this._callbacks[e]:null;n&&(t?this._callbacks[e]=n.filter((function(e){return e!==t})):delete this._callbacks[e])}else this._callbacks={};return this}}]),e}(),T=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};m(this,e),this.options=w({},this.defaultOptions,{},t)}return g(e,[{key:"init",value:function(){return null}},{key:"bindEditor",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.editor=e}},{key:"inputRules",value:function(){return[]}},{key:"pasteRules",value:function(){return[]}},{key:"keys",value:function(){return{}}},{key:"name",get:function(){return null}},{key:"type",get:function(){return"extension"}},{key:"update",get:function(){return function(){}}},{key:"defaultOptions",get:function(){return{}}},{key:"plugins",get:function(){return[]}}]),e}(),D=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;m(this,e),t.forEach((function(e){e.bindEditor(n),e.init()})),this.extensions=t}return g(e,[{key:"keymaps",value:function(e){var t=e.schema,n=this.extensions.filter((function(e){return["extension"].includes(e.type)})).filter((function(e){return e.keys})).map((function(e){return e.keys({schema:t})})),r=this.extensions.filter((function(e){return["node","mark"].includes(e.type)})).filter((function(e){return e.keys})).map((function(e){return e.keys({type:t["".concat(e.type,"s")][e.name],schema:t})}));return[].concat(O(n),O(r)).map((function(e){return Object(c.keymap)(e)}))}},{key:"inputRules",value:function(e){var t=e.schema,n=e.excludedExtensions;if(!(n instanceof Array)&&n)return[];var r=n instanceof Array?this.extensions.filter((function(e){return!n.includes(e.name)})):this.extensions,o=r.filter((function(e){return["extension"].includes(e.type)})).filter((function(e){return e.inputRules})).map((function(e){return e.inputRules({schema:t})})),i=r.filter((function(e){return["node","mark"].includes(e.type)})).filter((function(e){return e.inputRules})).map((function(e){return e.inputRules({type:t["".concat(e.type,"s")][e.name],schema:t})}));return[].concat(O(o),O(i)).reduce((function(e,t){return[].concat(O(e),O(t))}),[])}},{key:"pasteRules",value:function(e){var t=e.schema,n=e.excludedExtensions;if(!(n instanceof Array)&&n)return[];var r=n instanceof Array?this.extensions.filter((function(e){return!n.includes(e.name)})):this.extensions,o=r.filter((function(e){return["extension"].includes(e.type)})).filter((function(e){return e.pasteRules})).map((function(e){return e.pasteRules({schema:t})})),i=r.filter((function(e){return["node","mark"].includes(e.type)})).filter((function(e){return e.pasteRules})).map((function(e){return e.pasteRules({type:t["".concat(e.type,"s")][e.name],schema:t})}));return[].concat(O(o),O(i)).reduce((function(e,t){return[].concat(O(e),O(t))}),[])}},{key:"commands",value:function(e){var t=e.schema,n=e.view;return this.extensions.filter((function(e){return e.commands})).reduce((function(e,r){var o=r.name,i=r.type,s={},a=r.commands(w({schema:t},["node","mark"].includes(i)?{type:t["".concat(i,"s")][o]}:{})),c=function(e,t){return!!n.editable&&(n.focus(),e(t)(n.state,n.dispatch,n))},u=function(e,t){Array.isArray(t)?s[e]=function(e){return t.forEach((function(t){return c(t,e)}))}:"function"==typeof t&&(s[e]=function(e){return c(t,e)})};return"object"===d(a)?Object.entries(a).forEach((function(e){var t=S(e,2),n=t[0],r=t[1];u(n,r)})):u(o,a),w({},e,{},s)}),{})}},{key:"nodes",get:function(){return this.extensions.filter((function(e){return"node"===e.type})).reduce((function(e,t){return w({},e,y({},t.name,t.schema))}),{})}},{key:"options",get:function(){var e=this.view;return this.extensions.reduce((function(t,n){return w({},t,y({},n.name,new Proxy(n.options,{set:function(t,r,o){var i=t[r]!==o;return Object.assign(t,y({},r,o)),i&&n.update(e),!0}})))}),{})}},{key:"marks",get:function(){return this.extensions.filter((function(e){return"mark"===e.type})).reduce((function(e,t){return w({},e,y({},t.name,t.schema))}),{})}},{key:"plugins",get:function(){return this.extensions.filter((function(e){return e.plugins})).reduce((function(e,t){var n=t.plugins;return[].concat(O(e),O(n))}),[])}}]),e}();function N(e){var t=document.createElement("style");t.type="text/css",t.textContent=e;var n=document.head,r=n.firstChild;r?n.insertBefore(t,r):n.appendChild(t)}var R=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return m(this,t),C(this,x(t).call(this,e))}return k(t,e),g(t,[{key:"command",value:function(){return function(){}}},{key:"type",get:function(){return"mark"}},{key:"view",get:function(){return null}},{key:"schema",get:function(){return null}}]),t}(T);function I(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Math.min(Math.max(parseInt(e,10),t),n)}var P=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return m(this,t),C(this,x(t).call(this,e))}return k(t,e),g(t,[{key:"command",value:function(){return function(){}}},{key:"type",get:function(){return"node"}},{key:"view",get:function(){return null}},{key:"schema",get:function(){return null}}]),t}(T),j=function(e){function t(){return m(this,t),C(this,x(t).apply(this,arguments))}return k(t,e),g(t,[{key:"name",get:function(){return"doc"}},{key:"schema",get:function(){return{content:"block+"}}}]),t}(P),z=function(e){function t(){return m(this,t),C(this,x(t).apply(this,arguments))}return k(t,e),g(t,[{key:"commands",value:function(e){var t=e.type;return function(){return Object(h.k)(t)}}},{key:"name",get:function(){return"paragraph"}},{key:"schema",get:function(){return{content:"inline*",group:"block",draggable:!1,parseDOM:[{tag:"p"}],toDOM:function(){return["p",0]}}}}]),t}(P),F=function(e){function t(){return m(this,t),C(this,x(t).apply(this,arguments))}return k(t,e),g(t,[{key:"name",get:function(){return"text"}},{key:"schema",get:function(){return{group:"inline"}}}]),t}(P),$='.ProseMirror {\n  position: relative;\n}\n\n.ProseMirror {\n  word-wrap: break-word;\n  white-space: pre-wrap;\n  -webkit-font-variant-ligatures: none;\n  font-variant-ligatures: none;\n}\n\n.ProseMirror pre {\n  white-space: pre-wrap;\n}\n\n.ProseMirror-gapcursor {\n  display: none;\n  pointer-events: none;\n  position: absolute;\n}\n\n.ProseMirror-gapcursor:after {\n  content: "";\n  display: block;\n  position: absolute;\n  top: -2px;\n  width: 20px;\n  border-top: 1px solid black;\n  animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n  to {\n    visibility: hidden;\n  }\n}\n\n.ProseMirror-hideselection *::selection {\n  background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n  background: transparent;\n}\n\n.ProseMirror-hideselection * {\n  caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n  display: block;\n}\n',L=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return m(this,t),(e=C(this,x(t).call(this))).defaultOptions={editorProps:{},editable:!0,autoFocus:null,extensions:[],content:"",topNode:"doc",emptyDocument:{type:"doc",content:[{type:"paragraph"}]},useBuiltInExtensions:!0,disableInputRules:!1,disablePasteRules:!1,dropCursor:{},parseOptions:{},injectCSS:!0,onInit:function(){},onTransaction:function(){},onUpdate:function(){},onFocus:function(){},onBlur:function(){},onPaste:function(){},onDrop:function(){}},e.events=["init","transaction","update","focus","blur","paste","drop"],e.init(n),e}return k(t,e),g(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.setOptions(w({},this.defaultOptions,{},t)),this.focused=!1,this.selection={from:0,to:0},this.element=document.createElement("div"),this.extensions=this.createExtensions(),this.nodes=this.createNodes(),this.marks=this.createMarks(),this.schema=this.createSchema(),this.plugins=this.createPlugins(),this.keymaps=this.createKeymaps(),this.inputRules=this.createInputRules(),this.pasteRules=this.createPasteRules(),this.view=this.createView(),this.commands=this.createCommands(),this.setActiveNodesAndMarks(),this.options.injectCSS&&N($),null!==this.options.autoFocus&&this.focus(this.options.autoFocus),this.events.forEach((function(t){e.on(t,e.options[A("on ".concat(t))]||function(){})})),this.emit("init",{view:this.view,state:this.state}),this.extensions.view=this.view}},{key:"setOptions",value:function(e){this.options=w({},this.options,{},e),this.view&&this.state&&this.view.updateState(this.state)}},{key:"createExtensions",value:function(){return new D([].concat(O(this.builtInExtensions),O(this.options.extensions)),this)}},{key:"createPlugins",value:function(){return this.extensions.plugins}},{key:"createKeymaps",value:function(){return this.extensions.keymaps({schema:this.schema})}},{key:"createInputRules",value:function(){return this.extensions.inputRules({schema:this.schema,excludedExtensions:this.options.disableInputRules})}},{key:"createPasteRules",value:function(){return this.extensions.pasteRules({schema:this.schema,excludedExtensions:this.options.disablePasteRules})}},{key:"createCommands",value:function(){return this.extensions.commands({schema:this.schema,view:this.view})}},{key:"createNodes",value:function(){return this.extensions.nodes}},{key:"createMarks",value:function(){return this.extensions.marks}},{key:"createSchema",value:function(){return new i.Schema({topNode:this.options.topNode,nodes:this.nodes,marks:this.marks})}},{key:"createState",value:function(){var e=this;return r.EditorState.create({schema:this.schema,doc:this.createDocument(this.options.content),plugins:[].concat(O(this.plugins),[Object(l.inputRules)({rules:this.inputRules})],O(this.pasteRules),O(this.keymaps),[Object(c.keymap)({Backspace:l.undoInputRule}),Object(c.keymap)(u.baseKeymap),Object(s.dropCursor)(this.options.dropCursor),Object(a.gapCursor)(),new r.Plugin({key:new r.PluginKey("editable"),props:{editable:function(){return e.options.editable}}}),new r.Plugin({props:{attributes:{tabindex:0},handleDOMEvents:{focus:function(t,n){e.focused=!0,e.emit("focus",{event:n,state:t.state,view:t});var r=e.state.tr.setMeta("focused",!0);e.view.dispatch(r)},blur:function(t,n){e.focused=!1,e.emit("blur",{event:n,state:t.state,view:t});var r=e.state.tr.setMeta("focused",!1);e.view.dispatch(r)}}}}),new r.Plugin({props:this.options.editorProps})])})}},{key:"createDocument",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.parseOptions;if(null===e)return this.schema.nodeFromJSON(this.options.emptyDocument);if("object"===d(e))try{return this.schema.nodeFromJSON(e)}catch(t){return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",t),this.schema.nodeFromJSON(this.options.emptyDocument)}if("string"==typeof e){var n=document.createElement("div");return n.innerHTML=e.trim(),i.DOMParser.fromSchema(this.schema).parse(n,t)}return!1}},{key:"createView",value:function(){var e=this;return new o.EditorView(this.element,{state:this.createState(),handlePaste:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];e.emit.apply(e,["paste"].concat(n))},handleDrop:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];e.emit.apply(e,["drop"].concat(n))},dispatchTransaction:this.dispatchTransaction.bind(this)})}},{key:"setParentComponent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;e&&this.view.setProps({nodeViews:this.initNodeViews({parent:e,extensions:[].concat(O(this.builtInExtensions),O(this.options.extensions))})})}},{key:"initNodeViews",value:function(e){var t=this,n=e.parent;return e.extensions.filter((function(e){return["node","mark"].includes(e.type)})).filter((function(e){return e.view})).reduce((function(e,r){return w({},e,y({},r.name,(function(e,o,i,s){var a=r.view;return new E(a,{editor:t,extension:r,parent:n,node:e,view:o,getPos:i,decorations:s})})))}),{})}},{key:"dispatchTransaction",value:function(e){var t=this.state.apply(e);this.view.updateState(t),this.selection={from:this.state.selection.from,to:this.state.selection.to},this.setActiveNodesAndMarks(),this.emit("transaction",{getHTML:this.getHTML.bind(this),getJSON:this.getJSON.bind(this),state:this.state,transaction:e}),e.docChanged&&!e.getMeta("preventUpdate")&&this.emitUpdate(e)}},{key:"emitUpdate",value:function(e){this.emit("update",{getHTML:this.getHTML.bind(this),getJSON:this.getJSON.bind(this),state:this.state,transaction:e})}},{key:"resolveSelection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(this.selection&&null===e)return this.selection;if("start"===e||!0===e)return{from:0,to:0};if("end"===e){var t=this.state.doc;return{from:t.content.size,to:t.content.size}}return{from:e,to:e}}},{key:"focus",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!(this.view.focused&&null===t||!1===t)){var n=this.resolveSelection(t),r=n.from,o=n.to;this.setSelection(r,o),setTimeout((function(){return e.view.focus()}),10)}}},{key:"setSelection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.state,o=n.doc,i=n.tr,s=I(e,0,o.content.size),a=I(t,0,o.content.size),c=r.TextSelection.create(o,s,a),u=i.setSelection(c);this.view.dispatch(u)}},{key:"blur",value:function(){this.view.dom.blur()}},{key:"getSchemaJSON",value:function(){return JSON.parse(JSON.stringify({nodes:this.extensions.nodes,marks:this.extensions.marks}))}},{key:"getHTML",value:function(){var e=document.createElement("div"),t=i.DOMSerializer.fromSchema(this.schema).serializeFragment(this.state.doc.content);return e.appendChild(t),e.innerHTML}},{key:"getJSON",value:function(){return this.state.doc.toJSON()}},{key:"setContent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0,o=this.state,i=o.doc,s=o.tr,a=this.createDocument(e,n),c=r.TextSelection.create(i,0,i.content.size),u=s.setSelection(c).replaceSelectionWith(a,!1).setMeta("preventUpdate",!t);this.view.dispatch(u)}},{key:"clearContent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.setContent(this.options.emptyDocument,e)}},{key:"setActiveNodesAndMarks",value:function(){var e=this;this.activeMarks=Object.entries(this.schema.marks).reduce((function(t,n){var r=S(n,2),o=r[0],i=r[1];return w({},t,y({},o,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(p.c)(e.state,i,t)})))}),{}),this.activeMarkAttrs=Object.entries(this.schema.marks).reduce((function(t,n){var r=S(n,2),o=r[0],i=r[1];return w({},t,y({},o,Object(p.a)(e.state,i)))}),{}),this.activeNodes=Object.entries(this.schema.nodes).reduce((function(t,n){var r=S(n,2),o=r[0],i=r[1];return w({},t,y({},o,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(p.e)(e.state,i,t)})))}),{})}},{key:"getMarkAttrs",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return this.activeMarkAttrs[e]}},{key:"registerPlugin",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(e){var t=this.state.reconfigure({plugins:this.state.plugins.concat([e])});this.view.updateState(t)}}},{key:"unregisterPlugin",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(e&&this.view.docView){var t=this.state.reconfigure({plugins:this.state.plugins.filter((function(t){return!t.key.startsWith("".concat(e,"$"))}))});this.view.updateState(t)}}},{key:"destroy",value:function(){this.view&&this.view.destroy()}},{key:"builtInExtensions",get:function(){return this.options.useBuiltInExtensions?[new j,new F,new z]:[]}},{key:"state",get:function(){return this.view?this.view.state:null}},{key:"isActive",get:function(){return Object.entries(w({},this.activeMarks,{},this.activeNodes)).reduce((function(e,t){var n=S(t,2),r=n[0],o=n[1];return w({},e,y({},r,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(e)})))}),{})}}]),t}(M),B={props:{editor:{default:null,type:Object}},watch:{editor:{immediate:!0,handler:function(e){var t=this;e&&e.element&&this.$nextTick((function(){t.$el.appendChild(e.element.firstChild),e.setParentComponent(t)}))}}},render:function(e){return e("div")},beforeDestroy:function(){this.editor.element=this.$el}},q=function(){function e(t){var n=this,r=t.options;m(this,e),this.options=r,this.preventHide=!1,this.mousedownHandler=this.handleClick.bind(this),this.options.element.addEventListener("mousedown",this.mousedownHandler),this.options.editor.on("blur",(function(){n.preventHide?n.preventHide=!1:n.options.editor.emit("menubar:focusUpdate",!1)}))}return g(e,[{key:"handleClick",value:function(){this.preventHide=!0}},{key:"destroy",value:function(){this.options.element.removeEventListener("mousedown",this.mousedownHandler)}}]),e}();var V={props:{editor:{default:null,type:Object}},data:function(){return{focused:!1}},watch:{editor:{immediate:!0,handler:function(e){var t=this;e&&this.$nextTick((function(){var n;e.registerPlugin((n={editor:e,element:t.$el},new r.Plugin({key:new r.PluginKey("menu_bar"),view:function(e){return new q({editorView:e,options:n})}}))),t.focused=e.focused,e.on("focus",(function(){t.focused=!0})),e.on("menubar:focusUpdate",(function(e){t.focused=e}))}))}}},render:function(){return this.editor?this.$scopedSlots.default({focused:this.focused,focus:this.editor.focus,commands:this.editor.commands,isActive:this.editor.isActive,getMarkAttrs:this.editor.getMarkAttrs.bind(this.editor)}):null}};function H(e,t,n){var r=document.createRange();return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r}function U(e,t){var n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}function W(e,t){var n,r,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=e.docView.domFromPos(t),s=i.node,a=i.offset;if(3===s.nodeType)o&&a<s.nodeValue.length?(r=U(H(s,a-1,a),-1),n="right"):a<s.nodeValue.length&&(r=U(H(s,a,a+1),-1),n="left");else if(s.firstChild){if(a<s.childNodes.length){var c=s.childNodes[a];r=U(3===c.nodeType?H(c):c,-1),n="left"}if((!r||r.top===r.bottom)&&a){var u=s.childNodes[a-1];r=U(3===u.nodeType?H(u):u,1),n="right"}}else r=s.getBoundingClientRect(),n="left";var l=r[n];return{top:r.top,bottom:r.bottom,left:l,right:l}}var J=function(){function e(t){var n=this,r=t.options,o=t.editorView;m(this,e),this.options=w({},{element:null,keepInBounds:!0,onUpdate:function(){return!1}},{},r),this.editorView=o,this.isActive=!1,this.left=0,this.bottom=0,this.top=0,this.preventHide=!1,this.mousedownHandler=this.handleClick.bind(this),this.options.element.addEventListener("mousedown",this.mousedownHandler),this.options.editor.on("focus",(function(e){var t=e.view;n.update(t)})),this.options.editor.on("blur",(function(e){var t=e.event;n.preventHide?n.preventHide=!1:n.hide(t)}))}return g(e,[{key:"handleClick",value:function(){this.preventHide=!0}},{key:"update",value:function(e,t){var n=e.state;if(!(e.composing||t&&t.doc.eq(n.doc)&&t.selection.eq(n.selection)))if(n.selection.empty)this.hide();else{var r=n.selection,o=r.from,i=r.to,s=W(e,o),a=W(e,i,!0),c=this.options.element.offsetParent;if(c){var u=c.getBoundingClientRect(),l=this.options.element.getBoundingClientRect(),p=(s.left+a.left)/2-u.left;this.left=Math.round(this.options.keepInBounds?Math.min(u.width-l.width/2,Math.max(p,l.width/2)):p),this.bottom=Math.round(u.bottom-s.top),this.top=Math.round(a.bottom-u.top),this.isActive=!0,this.sendUpdate()}else this.hide()}}},{key:"sendUpdate",value:function(){this.options.onUpdate({isActive:this.isActive,left:this.left,bottom:this.bottom,top:this.top})}},{key:"hide",value:function(e){e&&e.relatedTarget&&this.options.element.parentNode.contains(e.relatedTarget)||(this.isActive=!1,this.sendUpdate())}},{key:"destroy",value:function(){this.options.element.removeEventListener("mousedown",this.mousedownHandler)}}]),e}();var K={props:{editor:{default:null,type:Object},keepInBounds:{default:!0,type:Boolean}},data:function(){return{menu:{isActive:!1,left:0,bottom:0}}},watch:{editor:{immediate:!0,handler:function(e){var t=this;e&&this.$nextTick((function(){var n;e.registerPlugin((n={editor:e,element:t.$el,keepInBounds:t.keepInBounds,onUpdate:function(e){e.isActive&&!1===t.menu.isActive?t.$emit("show",e):e.isActive||!0!==t.menu.isActive||t.$emit("hide",e),t.menu=e}},new r.Plugin({key:new r.PluginKey("menu_bubble"),view:function(e){return new J({editorView:e,options:n})}})))}))}}},render:function(){return this.editor?this.$scopedSlots.default({focused:this.editor.view.focused,focus:this.editor.focus,commands:this.editor.commands,isActive:this.editor.isActive,getMarkAttrs:this.editor.getMarkAttrs.bind(this.editor),menu:this.menu}):null},beforeDestroy:function(){this.editor.unregisterPlugin("menu_bubble")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(242),o=n(241),i=["ol",0],s=["ul",0],a=["li",0],c={attrs:{order:{default:1}},parseDOM:[{tag:"ol",getAttrs:function(e){return{order:e.hasAttribute("start")?+e.getAttribute("start"):1}}}],toDOM:function(e){return 1==e.attrs.order?i:["ol",{start:e.attrs.order},0]}},u={parseDOM:[{tag:"ul"}],toDOM:function(){return s}},l={parseDOM:[{tag:"li"}],toDOM:function(){return a},defining:!0};function p(e,t){var n={};for(var r in e)n[r]=e[r];for(var o in t)n[o]=t[o];return n}t.orderedList=c,t.bulletList=u,t.listItem=l,t.addListNodes=function(e,t,n){return e.append({ordered_list:p(c,{content:"list_item+",group:n}),bullet_list:p(u,{content:"list_item+",group:n}),list_item:p(l,{content:t})})},t.wrapInList=function(e,t){return function(n,i){var s=n.selection,a=s.$from,c=s.$to,u=a.blockRange(c),l=!1,p=u;if(!u)return!1;if(u.depth>=2&&a.node(u.depth-1).type.compatibleContent(e)&&0==u.startIndex){if(0==a.index(u.depth-1))return!1;var f=n.doc.resolve(u.start-2);p=new o.NodeRange(f,f,u.depth),u.endIndex<u.parent.childCount&&(u=new o.NodeRange(a,n.doc.resolve(c.end(u.depth)),u.depth)),l=!0}var h=r.findWrapping(p,e,t,u);return!!h&&(i&&i(function(e,t,n,i,s){for(var a=o.Fragment.empty,c=n.length-1;c>=0;c--)a=o.Fragment.from(n[c].type.create(n[c].attrs,a));e.step(new r.ReplaceAroundStep(t.start-(i?2:0),t.end,t.start,t.end,new o.Slice(a,0,0),n.length,!0));for(var u=0,l=0;l<n.length;l++)n[l].type==s&&(u=l+1);for(var p=n.length-u,f=t.start+n.length-(i?2:0),h=t.parent,d=t.startIndex,m=t.endIndex,v=!0;d<m;d++,v=!1)!v&&r.canSplit(e.doc,f,p)&&(e.split(f,p),f+=2*p),f+=h.child(d).nodeSize;return e}(n.tr,u,h,l,e).scrollIntoView()),!0)}},t.splitListItem=function(e){return function(t,n){var i=t.selection,s=i.$from,a=i.$to,c=i.node;if(c&&c.isBlock||s.depth<2||!s.sameParent(a))return!1;var u=s.node(-1);if(u.type!=e)return!1;if(0==s.parent.content.size){if(2==s.depth||s.node(-3).type!=e||s.index(-2)!=s.node(-2).childCount-1)return!1;if(n){for(var l=o.Fragment.empty,p=s.index(-1)>0,f=s.depth-(p?1:2);f>=s.depth-3;f--)l=o.Fragment.from(s.node(f).copy(l));l=l.append(o.Fragment.from(e.createAndFill()));var h=t.tr.replace(s.before(p?null:-1),s.after(-3),new o.Slice(l,p?3:2,2));h.setSelection(t.selection.constructor.near(h.doc.resolve(s.pos+(p?3:2)))),n(h.scrollIntoView())}return!0}var d=a.pos==s.end()?u.contentMatchAt(0).defaultType:null,m=t.tr.delete(s.pos,a.pos),v=d&&[null,{type:d}];return!!r.canSplit(m.doc,s.pos,2,v)&&(n&&n(m.split(s.pos,2,v).scrollIntoView()),!0)}},t.liftListItem=function(e){return function(t,n){var i=t.selection,s=i.$from,a=i.$to,c=s.blockRange(a,(function(t){return t.childCount&&t.firstChild.type==e}));return!!c&&(!n||(s.node(c.depth-1).type==e?function(e,t,n,i){var s=e.tr,a=i.end,c=i.$to.end(i.depth);a<c&&(s.step(new r.ReplaceAroundStep(a-1,c,a,c,new o.Slice(o.Fragment.from(n.create(null,i.parent.copy())),1,0),1,!0)),i=new o.NodeRange(s.doc.resolve(i.$from.pos),s.doc.resolve(c),i.depth));return t(s.lift(i,r.liftTarget(i)).scrollIntoView()),!0}(t,n,e,c):function(e,t,n){for(var i=e.tr,s=n.parent,a=n.end,c=n.endIndex-1,u=n.startIndex;c>u;c--)a-=s.child(c).nodeSize,i.delete(a-1,a+1);var l=i.doc.resolve(n.start),p=l.nodeAfter,f=0==n.startIndex,h=n.endIndex==s.childCount,d=l.node(-1),m=l.index(-1);if(!d.canReplace(m+(f?0:1),m+1,p.content.append(h?o.Fragment.empty:o.Fragment.from(s))))return!1;var v=l.pos,g=v+p.nodeSize;return i.step(new r.ReplaceAroundStep(v-(f?1:0),g+(h?1:0),v+1,g-1,new o.Slice((f?o.Fragment.empty:o.Fragment.from(s.copy(o.Fragment.empty))).append(h?o.Fragment.empty:o.Fragment.from(s.copy(o.Fragment.empty))),f?0:1,h?0:1),f?0:1)),t(i.scrollIntoView()),!0}(t,n,c)))}},t.sinkListItem=function(e){return function(t,n){var i=t.selection,s=i.$from,a=i.$to,c=s.blockRange(a,(function(t){return t.childCount&&t.firstChild.type==e}));if(!c)return!1;var u=c.startIndex;if(0==u)return!1;var l=c.parent,p=l.child(u-1);if(p.type!=e)return!1;if(n){var f=p.lastChild&&p.lastChild.type==l.type,h=o.Fragment.from(f?e.create():null),d=new o.Slice(o.Fragment.from(e.create(null,o.Fragment.from(l.type.create(null,h)))),f?3:1,0),m=c.start,v=c.end;n(t.tr.step(new r.ReplaceAroundStep(m-(f?3:1),v,m,v,d,1,!0)).scrollIntoView())}return!0}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(240),o=n(242),i=function(e,t){var n;this.match=e,this.handler="string"==typeof t?(n=t,function(e,t,r,o){var i=n;if(t[1]){var s=t[0].lastIndexOf(t[1]);i+=t[0].slice(s+t[1].length);var a=(r+=s)-o;a>0&&(i=t[0].slice(s-a,s)+i,r=o)}return e.tr.insertText(i,r,o)}):t};var s=500;function a(e,t,n,r,o,i){if(e.composing)return!1;var a=e.state,c=a.doc.resolve(t);if(c.parent.type.spec.code)return!1;for(var u=c.parent.textBetween(Math.max(0,c.parentOffset-s),c.parentOffset,null,"")+r,l=0;l<o.length;l++){var p=o[l].match.exec(u),f=p&&o[l].handler(a,p,t-(p[0].length-r.length),n);if(f)return e.dispatch(f.setMeta(i,{transform:f,from:t,to:n,text:r})),!0}return!1}var c=new i(/--$/,"—"),u=new i(/\.\.\.$/,"…"),l=new i(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“"),p=new i(/"$/,"”"),f=new i(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘"),h=new i(/'$/,"’"),d=[l,p,f,h];t.InputRule=i,t.inputRules=function(e){var t=e.rules,n=new r.Plugin({state:{init:function(){return null},apply:function(e,t){var n=e.getMeta(this);return n||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput:function(e,r,o,i){return a(e,r,o,i,t,n)},handleDOMEvents:{compositionend:function(e){setTimeout((function(){var r=e.state.selection.$cursor;r&&a(e,r.pos,r.pos,"",t,n)}))}}},isInputRules:!0});return n},t.undoInputRule=function(e,t){for(var n=e.plugins,r=0;r<n.length;r++){var o=n[r],i=void 0;if(o.spec.isInputRules&&(i=o.getState(e))){if(t){for(var s=e.tr,a=i.transform,c=a.steps.length-1;c>=0;c--)s.step(a.steps[c].invert(a.docs[c]));var u=s.doc.resolve(i.from).marks();t(s.replaceWith(i.from,i.to,e.schema.text(i.text,u)))}return!0}}return!1},t.emDash=c,t.ellipsis=u,t.openDoubleQuote=l,t.closeDoubleQuote=p,t.openSingleQuote=f,t.closeSingleQuote=h,t.smartQuotes=d,t.wrappingInputRule=function(e,t,n,r){return new i(e,(function(e,i,s,a){var c=n instanceof Function?n(i):n,u=e.tr.delete(s,a),l=u.doc.resolve(s).blockRange(),p=l&&o.findWrapping(l,t,c);if(!p)return null;u.wrap(l,p);var f=u.doc.resolve(s-1).nodeBefore;return f&&f.type==t&&o.canJoin(u.doc,s-1)&&(!r||r(i,f))&&u.join(s-1),u}))},t.textblockTypeInputRule=function(e,t,n){return new i(e,(function(e,r,o,i){var s=e.doc.resolve(o),a=n instanceof Function?n(r):n;return s.node(-1).canReplaceWith(s.index(-1),s.indexAfter(-1),t)?e.tr.delete(o,i).setBlockType(o,o,t,a):null}))}},function(e,t,n){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist/",n(n.s=17)}({1:function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,r,o,i=e[1]||"",s=e[3];if(!s)return i;if(t&&"function"==typeof btoa){var a=(n=s,r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),"/*# ".concat(o," */")),c=s.sources.map((function(e){return"/*# sourceURL=".concat(s.sourceRoot).concat(e," */")}));return[i].concat(c).concat([a]).join("\n")}return[i].join("\n")}(t,e);return t[2]?"@media ".concat(t[2],"{").concat(n,"}"):n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];null!=i&&(r[i]=!0)}for(var s=0;s<e.length;s++){var a=e[s];null!=a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="(".concat(a[2],") and (").concat(n,")")),t.push(a))}},t}},17:function(e,t,n){"use strict";n.r(t);var r=n(5);n(47),
/**
 * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>
 *
 * @author Julius Härtl <jus@bitgrid.net>
 * @author John Molakvoæ <skjnldsv@protonmail.com>
 *
 * @license GNU AGPL version 3 or any later version
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 *
 */
r.b.options.defaultTemplate='<div class="vue-tooltip" role="tooltip" data-v-'.concat("383038e",'><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'),r.b.options.defaultHtml=!1,t.default=r.b},2:function(e,t,n){"use strict";function r(e,t){for(var n=[],r={},o=0;o<t.length;o++){var i=t[o],s=i[0],a={id:e+":"+o,css:i[1],media:i[2],sourceMap:i[3]};r[s]?r[s].parts.push(a):n.push(r[s]={id:s,parts:[a]})}return n}n.r(t),n.d(t,"default",(function(){return d}));var o="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!o)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var i={},s=o&&(document.head||document.getElementsByTagName("head")[0]),a=null,c=0,u=!1,l=function(){},p=null,f="data-vue-ssr-id",h="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function d(e,t,n,o){u=n,p=o||{};var s=r(e,t);return m(s),function(t){for(var n=[],o=0;o<s.length;o++){var a=s[o];(c=i[a.id]).refs--,n.push(c)}for(t?m(s=r(e,t)):s=[],o=0;o<n.length;o++){var c;if(0===(c=n[o]).refs){for(var u=0;u<c.parts.length;u++)c.parts[u]();delete i[c.id]}}}}function m(e){for(var t=0;t<e.length;t++){var n=e[t],r=i[n.id];if(r){r.refs++;for(var o=0;o<r.parts.length;o++)r.parts[o](n.parts[o]);for(;o<n.parts.length;o++)r.parts.push(g(n.parts[o]));r.parts.length>n.parts.length&&(r.parts.length=n.parts.length)}else{var s=[];for(o=0;o<n.parts.length;o++)s.push(g(n.parts[o]));i[n.id]={id:n.id,refs:1,parts:s}}}}function v(){var e=document.createElement("style");return e.type="text/css",s.appendChild(e),e}function g(e){var t,n,r=document.querySelector("style["+f+'~="'+e.id+'"]');if(r){if(u)return l;r.parentNode.removeChild(r)}if(h){var o=c++;r=a||(a=v()),t=w.bind(null,r,o,!1),n=w.bind(null,r,o,!0)}else r=v(),t=function(e,t){var n=t.css,r=t.media,o=t.sourceMap;if(r&&e.setAttribute("media",r),p.ssrId&&e.setAttribute(f,t.id),o&&(n+="\n/*# sourceURL="+o.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,r),n=function(){r.parentNode.removeChild(r)};return t(e),function(r){if(r){if(r.css===e.css&&r.media===e.media&&r.sourceMap===e.sourceMap)return;t(e=r)}else n()}}var y,b=(y=[],function(e,t){return y[e]=t,y.filter(Boolean).join("\n")});function w(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=b(t,o);else{var i=document.createTextNode(o),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(i,s[t]):e.appendChild(i)}}},26:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return o}));var r=void 0,o={render:function(){var e=this.$createElement;return(this._self._c||e)("div",{staticClass:"resize-observer",attrs:{tabindex:"-1"}})},staticRenderFns:[],_scopeId:"data-v-b329ee4c",name:"resize-observer",methods:{compareAndNotify:function(){this._w===this.$el.offsetWidth&&this._h===this.$el.offsetHeight||(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.$emit("notify"))},addResizeHandlers:function(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers:function(){this._resizeObject&&this._resizeObject.onload&&(!r&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),delete this._resizeObject.onload)}},mounted:function(){var e=this;(function e(){e.init||(e.init=!0,r=-1!==function(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);if(e.indexOf("Trident/")>0){var n=e.indexOf("rv:");return parseInt(e.substring(n+3,e.indexOf(".",n)),10)}var r=e.indexOf("Edge/");return r>0?parseInt(e.substring(r+5,e.indexOf(".",r)),10):-1}())})(),this.$nextTick((function(){e._w=e.$el.offsetWidth,e._h=e.$el.offsetHeight}));var t=document.createElement("object");this._resizeObject=t,t.setAttribute("aria-hidden","true"),t.setAttribute("tabindex",-1),t.onload=this.addResizeHandlers,t.type="text/html",r&&this.$el.appendChild(t),t.data="about:blank",r||this.$el.appendChild(t)},beforeDestroy:function(){this.removeResizeHandlers()}},i={version:"0.4.5",install:function(e){e.component("resize-observer",o),e.component("ResizeObserver",o)}},s=null;"undefined"!=typeof window?s=window.Vue:void 0!==e&&(s=e.Vue),s&&s.use(i)}).call(this,n(3))},3:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},47:function(e,t,n){var r=n(48);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals),(0,n(2).default)("941c791e",r,!0,{})},48:function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".vue-tooltip[data-v-383038e]{position:absolute;z-index:100000;right:auto;left:auto;display:block;margin:0;margin-top:-3px;padding:10px 0;text-align:left;text-align:start;white-space:normal;text-decoration:none;letter-spacing:normal;word-spacing:normal;text-transform:none;word-wrap:normal;word-break:normal;opacity:0;text-shadow:none;font-family:'Nunito', 'Open Sans', Frutiger, Calibri, 'Myriad Pro', Myriad, sans-serif;font-size:12px;font-weight:normal;font-style:normal;line-height:1.6;line-break:auto;filter:drop-shadow(0 1px 10px var(--color-box-shadow))}.vue-tooltip[data-v-383038e][x-placement^='top'] .tooltip-arrow{bottom:0;margin-top:0;margin-bottom:0;border-width:10px 10px 0 10px;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent}.vue-tooltip[data-v-383038e][x-placement^='bottom'] .tooltip-arrow{top:0;margin-top:0;margin-bottom:0;border-width:0 10px 10px 10px;border-top-color:transparent;border-right-color:transparent;border-left-color:transparent}.vue-tooltip[data-v-383038e][x-placement^='right'] .tooltip-arrow{right:100%;margin-right:0;margin-left:0;border-width:10px 10px 10px 0;border-top-color:transparent;border-bottom-color:transparent;border-left-color:transparent}.vue-tooltip[data-v-383038e][x-placement^='left'] .tooltip-arrow{left:100%;margin-right:0;margin-left:0;border-width:10px 0 10px 10px;border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent}.vue-tooltip[data-v-383038e][aria-hidden='true']{visibility:hidden;transition:opacity .15s, visibility .15s;opacity:0}.vue-tooltip[data-v-383038e][aria-hidden='false']{visibility:visible;transition:opacity .15s;opacity:1}.vue-tooltip[data-v-383038e] .tooltip-inner{max-width:350px;padding:5px 8px;text-align:center;color:var(--color-main-text);border-radius:var(--border-radius);background-color:var(--color-main-background)}.vue-tooltip[data-v-383038e] .tooltip-arrow{position:absolute;z-index:1;width:0;height:0;margin:0;border-style:solid;border-color:var(--color-main-background)}\n",""])},5:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return Nt})),n.d(t,"b",(function(){return Dt}));var r=n(9),o=n(26);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(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)}}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){a(e,t,n[t])}))}return e}var u=function(){};function l(e){return"string"==typeof e&&(e=e.split(" ")),e}function p(e,t){var n,r=l(t);n=e.className instanceof u?l(e.className.baseVal):l(e.className),r.forEach((function(e){-1===n.indexOf(e)&&n.push(e)})),e instanceof SVGElement?e.setAttribute("class",n.join(" ")):e.className=n.join(" ")}function f(e,t){var n,r=l(t);n=e.className instanceof u?l(e.className.baseVal):l(e.className),r.forEach((function(e){var t=n.indexOf(e);-1!==t&&n.splice(t,1)})),e instanceof SVGElement?e.setAttribute("class",n.join(" ")):e.className=n.join(" ")}"undefined"!=typeof window&&(u=window.SVGAnimatedString);var h=!1;if("undefined"!=typeof window){h=!1;try{var d=Object.defineProperty({},"passive",{get:function(){h=!0}});window.addEventListener("test",null,d)}catch(e){}}var m={container:!1,delay:0,html:!1,placement:"top",title:"",template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",offset:0},v=[],g=function(){function e(t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),a(this,"_events",[]),a(this,"_setTooltipNodeEvent",(function(e,t,n,o){var i=e.relatedreference||e.toElement||e.relatedTarget;return!!r._tooltipNode.contains(i)&&(r._tooltipNode.addEventListener(e.type,(function n(i){var s=i.relatedreference||i.toElement||i.relatedTarget;r._tooltipNode.removeEventListener(e.type,n),t.contains(s)||r._scheduleHide(t,o.delay,o,i)})),!0)})),n=c({},m,n),t.jquery&&(t=t[0]),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.reference=t,this.options=n,this._isOpen=!1,this._init()}var t,n;return t=e,(n=[{key:"show",value:function(){this._show(this.reference,this.options)}},{key:"hide",value:function(){this._hide()}},{key:"dispose",value:function(){this._dispose()}},{key:"toggle",value:function(){return this._isOpen?this.hide():this.show()}},{key:"setClasses",value:function(e){this._classes=e}},{key:"setContent",value:function(e){this.options.title=e,this._tooltipNode&&this._setContent(e,this.options)}},{key:"setOptions",value:function(e){var t=!1,n=e&&e.classes||O.options.defaultClass;this._classes!==n&&(this.setClasses(n),t=!0),e=k(e);var r=!1,o=!1;for(var i in this.options.offset===e.offset&&this.options.placement===e.placement||(r=!0),(this.options.template!==e.template||this.options.trigger!==e.trigger||this.options.container!==e.container||t)&&(o=!0),e)this.options[i]=e[i];if(this._tooltipNode)if(o){var s=this._isOpen;this.dispose(),this._init(),s&&this.show()}else r&&this.popperInstance.update()}},{key:"_init",value:function(){var e="string"==typeof this.options.trigger?this.options.trigger.split(" "):[];this._isDisposed=!1,this._enableDocumentTouch=-1===e.indexOf("manual"),e=e.filter((function(e){return-1!==["click","hover","focus"].indexOf(e)})),this._setEventListeners(this.reference,e,this.options),this.$_originalTitle=this.reference.getAttribute("title"),this.reference.removeAttribute("title"),this.reference.setAttribute("data-original-title",this.$_originalTitle)}},{key:"_create",value:function(e,t){var n=window.document.createElement("div");n.innerHTML=t.trim();var r=n.childNodes[0];return r.id="tooltip_".concat(Math.random().toString(36).substr(2,10)),r.setAttribute("aria-hidden","true"),this.options.autoHide&&-1!==this.options.trigger.indexOf("hover")&&(r.addEventListener("mouseenter",this.hide),r.addEventListener("click",this.hide)),r}},{key:"_setContent",value:function(e,t){var n=this;this.asyncContent=!1,this._applyContent(e,t).then((function(){n.popperInstance.update()}))}},{key:"_applyContent",value:function(e,t){var n=this;return new Promise((function(r,o){var i=t.html,s=n._tooltipNode;if(s){var a=s.querySelector(n.options.innerSelector);if(1===e.nodeType){if(i){for(;a.firstChild;)a.removeChild(a.firstChild);a.appendChild(e)}}else{if("function"==typeof e){var c=e();return void(c&&"function"==typeof c.then?(n.asyncContent=!0,t.loadingClass&&p(s,t.loadingClass),t.loadingContent&&n._applyContent(t.loadingContent,t),c.then((function(e){return t.loadingClass&&f(s,t.loadingClass),n._applyContent(e,t)})).then(r).catch(o)):n._applyContent(c,t).then(r).catch(o))}i?a.innerHTML=e:a.innerText=e}r()}}))}},{key:"_show",value:function(e,t){if(!t||"string"!=typeof t.container||document.querySelector(t.container)){clearTimeout(this._disposeTimer),delete(t=Object.assign({},t)).offset;var n=!0;this._tooltipNode&&(p(this._tooltipNode,this._classes),n=!1);var r=this._ensureShown(e,t);return n&&this._tooltipNode&&p(this._tooltipNode,this._classes),p(e,["v-tooltip-open"]),r}}},{key:"_ensureShown",value:function(e,t){var n=this;if(this._isOpen)return this;if(this._isOpen=!0,v.push(this),this._tooltipNode)return this._tooltipNode.style.display="",this._tooltipNode.setAttribute("aria-hidden","false"),this.popperInstance.enableEventListeners(),this.popperInstance.update(),this.asyncContent&&this._setContent(t.title,t),this;var o=e.getAttribute("title")||t.title;if(!o)return this;var i=this._create(e,t.template);this._tooltipNode=i,e.setAttribute("aria-describedby",i.id);var s=this._findContainer(t.container,e);this._append(i,s);var a=c({},t.popperOptions,{placement:t.placement});return a.modifiers=c({},a.modifiers,{arrow:{element:this.options.arrowSelector}}),t.boundariesElement&&(a.modifiers.preventOverflow={boundariesElement:t.boundariesElement}),this.popperInstance=new r.a(e,i,a),this._setContent(o,t),requestAnimationFrame((function(){!n._isDisposed&&n.popperInstance?(n.popperInstance.update(),requestAnimationFrame((function(){n._isDisposed?n.dispose():n._isOpen&&i.setAttribute("aria-hidden","false")}))):n.dispose()})),this}},{key:"_noLongerOpen",value:function(){var e=v.indexOf(this);-1!==e&&v.splice(e,1)}},{key:"_hide",value:function(){var e=this;if(!this._isOpen)return this;this._isOpen=!1,this._noLongerOpen(),this._tooltipNode.style.display="none",this._tooltipNode.setAttribute("aria-hidden","true"),this.popperInstance.disableEventListeners(),clearTimeout(this._disposeTimer);var t=O.options.disposeTimeout;return null!==t&&(this._disposeTimer=setTimeout((function(){e._tooltipNode&&(e._tooltipNode.removeEventListener("mouseenter",e.hide),e._tooltipNode.removeEventListener("click",e.hide),e._removeTooltipNode())}),t)),f(this.reference,["v-tooltip-open"]),this}},{key:"_removeTooltipNode",value:function(){if(this._tooltipNode){var e=this._tooltipNode.parentNode;e&&(e.removeChild(this._tooltipNode),this.reference.removeAttribute("aria-describedby")),this._tooltipNode=null}}},{key:"_dispose",value:function(){var e=this;return this._isDisposed=!0,this.reference.removeAttribute("data-original-title"),this.$_originalTitle&&this.reference.setAttribute("title",this.$_originalTitle),this._events.forEach((function(t){var n=t.func,r=t.event;e.reference.removeEventListener(r,n)})),this._events=[],this._tooltipNode?(this._hide(),this._tooltipNode.removeEventListener("mouseenter",this.hide),this._tooltipNode.removeEventListener("click",this.hide),this.popperInstance.destroy(),this.popperInstance.options.removeOnDestroy||this._removeTooltipNode()):this._noLongerOpen(),this}},{key:"_findContainer",value:function(e,t){return"string"==typeof e?e=window.document.querySelector(e):!1===e&&(e=t.parentNode),e}},{key:"_append",value:function(e,t){t.appendChild(e)}},{key:"_setEventListeners",value:function(e,t,n){var r=this,o=[],i=[];t.forEach((function(e){switch(e){case"hover":o.push("mouseenter"),i.push("mouseleave"),r.options.hideOnTargetClick&&i.push("click");break;case"focus":o.push("focus"),i.push("blur"),r.options.hideOnTargetClick&&i.push("click");break;case"click":o.push("click"),i.push("click")}})),o.forEach((function(t){var o=function(t){!0!==r._isOpen&&(t.usedByTooltip=!0,r._scheduleShow(e,n.delay,n,t))};r._events.push({event:t,func:o}),e.addEventListener(t,o)})),i.forEach((function(t){var o=function(t){!0!==t.usedByTooltip&&r._scheduleHide(e,n.delay,n,t)};r._events.push({event:t,func:o}),e.addEventListener(t,o)}))}},{key:"_onDocumentTouch",value:function(e){this._enableDocumentTouch&&this._scheduleHide(this.reference,this.options.delay,this.options,e)}},{key:"_scheduleShow",value:function(e,t,n){var r=this,o=t&&t.show||t||0;clearTimeout(this._scheduleTimer),this._scheduleTimer=window.setTimeout((function(){return r._show(e,n)}),o)}},{key:"_scheduleHide",value:function(e,t,n,r){var o=this,i=t&&t.hide||t||0;clearTimeout(this._scheduleTimer),this._scheduleTimer=window.setTimeout((function(){if(!1!==o._isOpen&&document.body.contains(o._tooltipNode)){if("mouseleave"===r.type&&o._setTooltipNodeEvent(r,e,t,n))return;o._hide(e,n)}}),i)}}])&&s(t.prototype,n),e}();"undefined"!=typeof document&&document.addEventListener("touchstart",(function(e){for(var t=0;t<v.length;t++)v[t]._onDocumentTouch(e)}),!h||{passive:!0,capture:!0});var y={enabled:!0},b=["top","top-start","top-end","right","right-start","right-end","bottom","bottom-start","bottom-end","left","left-start","left-end"],w={defaultPlacement:"top",defaultClass:"vue-tooltip-theme",defaultTargetClass:"has-tooltip",defaultHtml:!0,defaultTemplate:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',defaultArrowSelector:".tooltip-arrow, .tooltip__arrow",defaultInnerSelector:".tooltip-inner, .tooltip__inner",defaultDelay:0,defaultTrigger:"hover focus",defaultOffset:0,defaultContainer:"body",defaultBoundariesElement:void 0,defaultPopperOptions:{},defaultLoadingClass:"tooltip-loading",defaultLoadingContent:"...",autoHide:!0,defaultHideOnTargetClick:!0,disposeTimeout:5e3,popover:{defaultPlacement:"bottom",defaultClass:"vue-popover-theme",defaultBaseClass:"tooltip popover",defaultWrapperClass:"wrapper",defaultInnerClass:"tooltip-inner popover-inner",defaultArrowClass:"tooltip-arrow popover-arrow",defaultOpenClass:"open",defaultDelay:0,defaultTrigger:"click",defaultOffset:0,defaultContainer:"body",defaultBoundariesElement:void 0,defaultPopperOptions:{},defaultAutoHide:!0,defaultHandleResize:!0}};function k(e){var t={placement:void 0!==e.placement?e.placement:O.options.defaultPlacement,delay:void 0!==e.delay?e.delay:O.options.defaultDelay,html:void 0!==e.html?e.html:O.options.defaultHtml,template:void 0!==e.template?e.template:O.options.defaultTemplate,arrowSelector:void 0!==e.arrowSelector?e.arrowSelector:O.options.defaultArrowSelector,innerSelector:void 0!==e.innerSelector?e.innerSelector:O.options.defaultInnerSelector,trigger:void 0!==e.trigger?e.trigger:O.options.defaultTrigger,offset:void 0!==e.offset?e.offset:O.options.defaultOffset,container:void 0!==e.container?e.container:O.options.defaultContainer,boundariesElement:void 0!==e.boundariesElement?e.boundariesElement:O.options.defaultBoundariesElement,autoHide:void 0!==e.autoHide?e.autoHide:O.options.autoHide,hideOnTargetClick:void 0!==e.hideOnTargetClick?e.hideOnTargetClick:O.options.defaultHideOnTargetClick,loadingClass:void 0!==e.loadingClass?e.loadingClass:O.options.defaultLoadingClass,loadingContent:void 0!==e.loadingContent?e.loadingContent:O.options.defaultLoadingContent,popperOptions:c({},void 0!==e.popperOptions?e.popperOptions:O.options.defaultPopperOptions)};if(t.offset){var n=i(t.offset),r=t.offset;("number"===n||"string"===n&&-1===r.indexOf(","))&&(r="0, ".concat(r)),t.popperOptions.modifiers||(t.popperOptions.modifiers={}),t.popperOptions.modifiers.offset={offset:r}}return t.trigger&&-1!==t.trigger.indexOf("click")&&(t.hideOnTargetClick=!1),t}function x(e,t){for(var n=e.placement,r=0;r<b.length;r++){var o=b[r];t[o]&&(n=o)}return n}function _(e){var t=i(e);return"string"===t?e:!(!e||"object"!==t)&&e.content}function C(e){e._tooltip&&(e._tooltip.dispose(),delete e._tooltip,delete e._tooltipOldShow),e._tooltipTargetClasses&&(f(e,e._tooltipTargetClasses),delete e._tooltipTargetClasses)}function S(e,t){var n,r=t.value,o=(t.oldValue,t.modifiers),i=_(r);i&&y.enabled?(e._tooltip?((n=e._tooltip).setContent(i),n.setOptions(c({},r,{placement:x(r,o)}))):n=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=_(t),o=void 0!==t.classes?t.classes:O.options.defaultClass,i=c({title:r},k(c({},t,{placement:x(t,n)}))),s=e._tooltip=new g(e,i);s.setClasses(o),s._vueEl=e;var a=void 0!==t.targetClasses?t.targetClasses:O.options.defaultTargetClass;return e._tooltipTargetClasses=a,p(e,a),s}(e,r,o),void 0!==r.show&&r.show!==e._tooltipOldShow&&(e._tooltipOldShow=r.show,r.show?n.show():n.hide())):C(e)}var O={options:w,bind:S,update:S,unbind:function(e){C(e)}};function A(e){e.addEventListener("click",M),e.addEventListener("touchstart",T,!!h&&{passive:!0})}function E(e){e.removeEventListener("click",M),e.removeEventListener("touchstart",T),e.removeEventListener("touchend",D),e.removeEventListener("touchcancel",N)}function M(e){var t=e.currentTarget;e.closePopover=!t.$_vclosepopover_touch,e.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}function T(e){if(1===e.changedTouches.length){var t=e.currentTarget;t.$_vclosepopover_touch=!0;var n=e.changedTouches[0];t.$_vclosepopover_touchPoint=n,t.addEventListener("touchend",D),t.addEventListener("touchcancel",N)}}function D(e){var t=e.currentTarget;if(t.$_vclosepopover_touch=!1,1===e.changedTouches.length){var n=e.changedTouches[0],r=t.$_vclosepopover_touchPoint;e.closePopover=Math.abs(n.screenY-r.screenY)<20&&Math.abs(n.screenX-r.screenX)<20,e.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}}function N(e){e.currentTarget.$_vclosepopover_touch=!1}var R={bind:function(e,t){var n=t.value,r=t.modifiers;e.$_closePopoverModifiers=r,(void 0===n||n)&&A(e)},update:function(e,t){var n=t.value,r=t.oldValue,o=t.modifiers;e.$_closePopoverModifiers=o,n!==r&&(void 0===n||n?A(e):E(e))},unbind:function(e){E(e)}};function I(e){var t=O.options.popover[e];return void 0===t?O.options[e]:t}var P=!1;"undefined"!=typeof window&&"undefined"!=typeof navigator&&(P=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);var j=[],z=function(){};"undefined"!=typeof window&&(z=window.Element);var F={name:"VPopover",components:{ResizeObserver:o.a},props:{open:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placement:{type:String,default:function(){return I("defaultPlacement")}},delay:{type:[String,Number,Object],default:function(){return I("defaultDelay")}},offset:{type:[String,Number],default:function(){return I("defaultOffset")}},trigger:{type:String,default:function(){return I("defaultTrigger")}},container:{type:[String,Object,z,Boolean],default:function(){return I("defaultContainer")}},boundariesElement:{type:[String,z],default:function(){return I("defaultBoundariesElement")}},popperOptions:{type:Object,default:function(){return I("defaultPopperOptions")}},popoverClass:{type:[String,Array],default:function(){return I("defaultClass")}},popoverBaseClass:{type:[String,Array],default:function(){return O.options.popover.defaultBaseClass}},popoverInnerClass:{type:[String,Array],default:function(){return O.options.popover.defaultInnerClass}},popoverWrapperClass:{type:[String,Array],default:function(){return O.options.popover.defaultWrapperClass}},popoverArrowClass:{type:[String,Array],default:function(){return O.options.popover.defaultArrowClass}},autoHide:{type:Boolean,default:function(){return O.options.popover.defaultAutoHide}},handleResize:{type:Boolean,default:function(){return O.options.popover.defaultHandleResize}},openGroup:{type:String,default:null},openClass:{type:[String,Array],default:function(){return O.options.popover.defaultOpenClass}}},data:function(){return{isOpen:!1,id:Math.random().toString(36).substr(2,10)}},computed:{cssClass:function(){return a({},this.openClass,this.isOpen)},popoverId:function(){return"popover_".concat(this.id)}},watch:{open:function(e){e?this.show():this.hide()},disabled:function(e,t){e!==t&&(e?this.hide():this.open&&this.show())},container:function(e){if(this.isOpen&&this.popperInstance){var t=this.$refs.popover,n=this.$refs.trigger,r=this.$_findContainer(this.container,n);if(!r)return void console.warn("No container for popover",this);r.appendChild(t),this.popperInstance.scheduleUpdate()}},trigger:function(e){this.$_removeEventListeners(),this.$_addEventListeners()},placement:function(e){var t=this;this.$_updatePopper((function(){t.popperInstance.options.placement=e}))},offset:"$_restartPopper",boundariesElement:"$_restartPopper",popperOptions:{handler:"$_restartPopper",deep:!0}},created:function(){this.$_isDisposed=!1,this.$_mounted=!1,this.$_events=[],this.$_preventOpen=!1},mounted:function(){var e=this.$refs.popover;e.parentNode&&e.parentNode.removeChild(e),this.$_init(),this.open&&this.show()},deactivated:function(){this.hide()},beforeDestroy:function(){this.dispose()},methods:{show:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.event,r=(t.skipDelay,t.force),o=void 0!==r&&r;!o&&this.disabled||(this.$_scheduleShow(n),this.$emit("show")),this.$emit("update:open",!0),this.$_beingShowed=!0,requestAnimationFrame((function(){e.$_beingShowed=!1}))},hide:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.event;e.skipDelay,this.$_scheduleHide(t),this.$emit("hide"),this.$emit("update:open",!1)},dispose:function(){if(this.$_isDisposed=!0,this.$_removeEventListeners(),this.hide({skipDelay:!0}),this.popperInstance&&(this.popperInstance.destroy(),!this.popperInstance.options.removeOnDestroy)){var e=this.$refs.popover;e.parentNode&&e.parentNode.removeChild(e)}this.$_mounted=!1,this.popperInstance=null,this.isOpen=!1,this.$emit("dispose")},$_init:function(){-1===this.trigger.indexOf("manual")&&this.$_addEventListeners()},$_show:function(){var e=this,t=this.$refs.trigger,n=this.$refs.popover;if(clearTimeout(this.$_disposeTimer),!this.isOpen){if(this.popperInstance&&(this.isOpen=!0,this.popperInstance.enableEventListeners(),this.popperInstance.scheduleUpdate()),!this.$_mounted){var o=this.$_findContainer(this.container,t);if(!o)return void console.warn("No container for popover",this);o.appendChild(n),this.$_mounted=!0}if(!this.popperInstance){var i=c({},this.popperOptions,{placement:this.placement});if(i.modifiers=c({},i.modifiers,{arrow:c({},i.modifiers&&i.modifiers.arrow,{element:this.$refs.arrow})}),this.offset){var s=this.$_getOffset();i.modifiers.offset=c({},i.modifiers&&i.modifiers.offset,{offset:s})}this.boundariesElement&&(i.modifiers.preventOverflow=c({},i.modifiers&&i.modifiers.preventOverflow,{boundariesElement:this.boundariesElement})),this.popperInstance=new r.a(t,n,i),requestAnimationFrame((function(){if(e.hidden)return e.hidden=!1,void e.$_hide();!e.$_isDisposed&&e.popperInstance?(e.popperInstance.scheduleUpdate(),requestAnimationFrame((function(){if(e.hidden)return e.hidden=!1,void e.$_hide();e.$_isDisposed?e.dispose():e.isOpen=!0}))):e.dispose()}))}var a=this.openGroup;if(a)for(var u,l=0;l<j.length;l++)(u=j[l]).openGroup!==a&&(u.hide(),u.$emit("close-group"));j.push(this),this.$emit("apply-show")}},$_hide:function(){var e=this;if(this.isOpen){var t=j.indexOf(this);-1!==t&&j.splice(t,1),this.isOpen=!1,this.popperInstance&&this.popperInstance.disableEventListeners(),clearTimeout(this.$_disposeTimer);var n=O.options.popover.disposeTimeout||O.options.disposeTimeout;null!==n&&(this.$_disposeTimer=setTimeout((function(){var t=e.$refs.popover;t&&(t.parentNode&&t.parentNode.removeChild(t),e.$_mounted=!1)}),n)),this.$emit("apply-hide")}},$_findContainer:function(e,t){return"string"==typeof e?e=window.document.querySelector(e):!1===e&&(e=t.parentNode),e},$_getOffset:function(){var e=i(this.offset),t=this.offset;return("number"===e||"string"===e&&-1===t.indexOf(","))&&(t="0, ".concat(t)),t},$_addEventListeners:function(){var e=this,t=this.$refs.trigger,n=[],r=[];("string"==typeof this.trigger?this.trigger.split(" ").filter((function(e){return-1!==["click","hover","focus"].indexOf(e)})):[]).forEach((function(e){switch(e){case"hover":n.push("mouseenter"),r.push("mouseleave");break;case"focus":n.push("focus"),r.push("blur");break;case"click":n.push("click"),r.push("click")}})),n.forEach((function(n){var r=function(t){e.isOpen||(t.usedByTooltip=!0,!e.$_preventOpen&&e.show({event:t}),e.hidden=!1)};e.$_events.push({event:n,func:r}),t.addEventListener(n,r)})),r.forEach((function(n){var r=function(t){t.usedByTooltip||(e.hide({event:t}),e.hidden=!0)};e.$_events.push({event:n,func:r}),t.addEventListener(n,r)}))},$_scheduleShow:function(){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(clearTimeout(this.$_scheduleTimer),e)this.$_show();else{var t=parseInt(this.delay&&this.delay.show||this.delay||0);this.$_scheduleTimer=setTimeout(this.$_show.bind(this),t)}},$_scheduleHide:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(clearTimeout(this.$_scheduleTimer),n)this.$_hide();else{var r=parseInt(this.delay&&this.delay.hide||this.delay||0);this.$_scheduleTimer=setTimeout((function(){if(e.isOpen){if(t&&"mouseleave"===t.type&&e.$_setTooltipNodeEvent(t))return;e.$_hide()}}),r)}},$_setTooltipNodeEvent:function(e){var t=this,n=this.$refs.trigger,r=this.$refs.popover,o=e.relatedreference||e.toElement||e.relatedTarget;return!!r.contains(o)&&(r.addEventListener(e.type,(function o(i){var s=i.relatedreference||i.toElement||i.relatedTarget;r.removeEventListener(e.type,o),n.contains(s)||t.hide({event:i})})),!0)},$_removeEventListeners:function(){var e=this.$refs.trigger;this.$_events.forEach((function(t){var n=t.func,r=t.event;e.removeEventListener(r,n)})),this.$_events=[]},$_updatePopper:function(e){this.popperInstance&&(e(),this.isOpen&&this.popperInstance.scheduleUpdate())},$_restartPopper:function(){if(this.popperInstance){var e=this.isOpen;this.dispose(),this.$_isDisposed=!1,this.$_init(),e&&this.show({skipDelay:!0,force:!0})}},$_handleGlobalClose:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.$_beingShowed||(this.hide({event:e}),e.closePopover?this.$emit("close-directive"):this.$emit("auto-hide"),n&&(this.$_preventOpen=!0,setTimeout((function(){t.$_preventOpen=!1}),300)))},$_handleResize:function(){this.isOpen&&this.popperInstance&&(this.popperInstance.scheduleUpdate(),this.$emit("resize"))}}};function $(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=function(n){var r=j[n];if(r.$refs.popover){var o=r.$refs.popover.contains(e.target);requestAnimationFrame((function(){(e.closeAllPopover||e.closePopover&&o||r.autoHide&&!o)&&r.$_handleGlobalClose(e,t)}))}},r=0;r<j.length;r++)n(r)}"undefined"!=typeof document&&"undefined"!=typeof window&&(P?document.addEventListener("touchend",(function(e){$(e,!0)}),!h||{passive:!0,capture:!0}):window.addEventListener("click",(function(e){$(e)}),!0));var L=F,B=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"v-popover",class:e.cssClass},[n("div",{ref:"trigger",staticClass:"trigger",staticStyle:{display:"inline-block"},attrs:{"aria-describedby":e.popoverId,tabindex:-1!==e.trigger.indexOf("focus")?0:void 0}},[e._t("default")],2),e._v(" "),n("div",{ref:"popover",class:[e.popoverBaseClass,e.popoverClass,e.cssClass],style:{visibility:e.isOpen?"visible":"hidden"},attrs:{id:e.popoverId,"aria-hidden":e.isOpen?"false":"true",tabindex:e.autoHide?0:void 0},on:{keyup:function(t){if(!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"]))return null;e.autoHide&&e.hide()}}},[n("div",{class:e.popoverWrapperClass},[n("div",{ref:"inner",class:e.popoverInnerClass,staticStyle:{position:"relative"}},[n("div",[e._t("popover")],2),e._v(" "),e.handleResize?n("ResizeObserver",{on:{notify:e.$_handleResize}}):e._e()],1),e._v(" "),n("div",{ref:"arrow",class:e.popoverArrowClass})])])])};B._withStripped=!0;var q=function(e,t,n,r,o,i,s,a,c,u){"boolean"!=typeof s&&(c=a,a=s,s=!1);var l,p="function"==typeof n?n.options:n;if(e&&e.render&&(p.render=e.render,p.staticRenderFns=e.staticRenderFns,p._compiled=!0,o&&(p.functional=!0)),r&&(p._scopeId=r),i?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,c(e)),e&&e._registeredComponents&&e._registeredComponents.add(i)},p._ssrRegister=l):t&&(l=s?function(){t.call(this,u(this.$root.$options.shadowRoot))}:function(e){t.call(this,a(e))}),l)if(p.functional){var f=p.render;p.render=function(e,t){return l.call(t),f(e,t)}}else{var h=p.beforeCreate;p.beforeCreate=h?[].concat(h,l):[l]}return n}({render:B,staticRenderFns:[]},void 0,L,void 0,!1,void 0,void 0,void 0),V=function(e,t){return e===t||e!=e&&t!=t},H=function(e,t){for(var n=e.length;n--;)if(V(e[n][0],t))return n;return-1},U=Array.prototype.splice;function W(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}W.prototype.clear=function(){this.__data__=[],this.size=0},W.prototype.delete=function(e){var t=this.__data__,n=H(t,e);return!(n<0||(n==t.length-1?t.pop():U.call(t,n,1),--this.size,0))},W.prototype.get=function(e){var t=this.__data__,n=H(t,e);return n<0?void 0:t[n][1]},W.prototype.has=function(e){return H(this.__data__,e)>-1},W.prototype.set=function(e,t){var n=this.__data__,r=H(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var J=W,K="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};function G(e,t){return e(t={exports:{}},t.exports),t.exports}var Z,X="object"==typeof K&&K&&K.Object===Object&&K,Y="object"==typeof self&&self&&self.Object===Object&&self,Q=X||Y||Function("return this")(),ee=Q.Symbol,te=Object.prototype,ne=te.hasOwnProperty,re=te.toString,oe=ee?ee.toStringTag:void 0,ie=Object.prototype.toString,se=ee?ee.toStringTag:void 0,ae=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":se&&se in Object(e)?function(e){var t=ne.call(e,oe),n=e[oe];try{e[oe]=void 0;var r=!0}catch(e){}var o=re.call(e);return r&&(t?e[oe]=n:delete e[oe]),o}(e):function(e){return ie.call(e)}(e)},ce=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},ue=function(e){if(!ce(e))return!1;var t=ae(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},le=Q["__core-js_shared__"],pe=(Z=/[^.]+$/.exec(le&&le.keys&&le.keys.IE_PROTO||""))?"Symbol(src)_1."+Z:"",fe=Function.prototype.toString,he=/^\[object .+?Constructor\]$/,de=Function.prototype,me=Object.prototype,ve=de.toString,ge=me.hasOwnProperty,ye=RegExp("^"+ve.call(ge).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),be=function(e){return!(!ce(e)||function(e){return!!pe&&pe in e}(e))&&(ue(e)?ye:he).test(function(e){if(null!=e){try{return fe.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))},we=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return be(n)?n:void 0},ke=we(Q,"Map"),xe=we(Object,"create"),_e=Object.prototype.hasOwnProperty,Ce=Object.prototype.hasOwnProperty;function Se(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Se.prototype.clear=function(){this.__data__=xe?xe(null):{},this.size=0},Se.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Se.prototype.get=function(e){var t=this.__data__;if(xe){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return _e.call(t,e)?t[e]:void 0},Se.prototype.has=function(e){var t=this.__data__;return xe?void 0!==t[e]:Ce.call(t,e)},Se.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=xe&&void 0===t?"__lodash_hash_undefined__":t,this};var Oe=Se,Ae=function(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map};function Ee(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ee.prototype.clear=function(){this.size=0,this.__data__={hash:new Oe,map:new(ke||J),string:new Oe}},Ee.prototype.delete=function(e){var t=Ae(this,e).delete(e);return this.size-=t?1:0,t},Ee.prototype.get=function(e){return Ae(this,e).get(e)},Ee.prototype.has=function(e){return Ae(this,e).has(e)},Ee.prototype.set=function(e,t){var n=Ae(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var Me=Ee;function Te(e){var t=this.__data__=new J(e);this.size=t.size}Te.prototype.clear=function(){this.__data__=new J,this.size=0},Te.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Te.prototype.get=function(e){return this.__data__.get(e)},Te.prototype.has=function(e){return this.__data__.has(e)},Te.prototype.set=function(e,t){var n=this.__data__;if(n instanceof J){var r=n.__data__;if(!ke||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Me(r)}return n.set(e,t),this.size=n.size,this};var De=Te,Ne=function(){try{var e=we(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Re=function(e,t,n){"__proto__"==t&&Ne?Ne(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},Ie=function(e,t,n){(void 0===n||V(e[t],n))&&(void 0!==n||t in e)||Re(e,t,n)},Pe=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),s=i.length;s--;){var a=i[++r];if(!1===t(o[a],a,o))break}return e},je=G((function(e,t){var n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,o=r&&r.exports===n?Q.Buffer:void 0,i=o?o.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=i?i(n):new e.constructor(n);return e.copy(r),r}})),ze=Q.Uint8Array,Fe=function(e,t){var n=t?function(e){var t=new e.constructor(e.byteLength);return new ze(t).set(new ze(e)),t}(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)},$e=Object.create,Le=function(){function e(){}return function(t){if(!ce(t))return{};if($e)return $e(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),Be=function(e,t){return function(n){return e(t(n))}}(Object.getPrototypeOf,Object),qe=Object.prototype,Ve=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||qe)},He=function(e){return null!=e&&"object"==typeof e},Ue=function(e){return He(e)&&"[object Arguments]"==ae(e)},We=Object.prototype,Je=We.hasOwnProperty,Ke=We.propertyIsEnumerable,Ge=Ue(function(){return arguments}())?Ue:function(e){return He(e)&&Je.call(e,"callee")&&!Ke.call(e,"callee")},Ze=Array.isArray,Xe=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},Ye=function(e){return null!=e&&Xe(e.length)&&!ue(e)},Qe=function(){return!1},et=G((function(e,t){var n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,o=r&&r.exports===n?Q.Buffer:void 0,i=(o?o.isBuffer:void 0)||Qe;e.exports=i})),tt=Function.prototype,nt=Object.prototype,rt=tt.toString,ot=nt.hasOwnProperty,it=rt.call(Object),st={};st["[object Float32Array]"]=st["[object Float64Array]"]=st["[object Int8Array]"]=st["[object Int16Array]"]=st["[object Int32Array]"]=st["[object Uint8Array]"]=st["[object Uint8ClampedArray]"]=st["[object Uint16Array]"]=st["[object Uint32Array]"]=!0,st["[object Arguments]"]=st["[object Array]"]=st["[object ArrayBuffer]"]=st["[object Boolean]"]=st["[object DataView]"]=st["[object Date]"]=st["[object Error]"]=st["[object Function]"]=st["[object Map]"]=st["[object Number]"]=st["[object Object]"]=st["[object RegExp]"]=st["[object Set]"]=st["[object String]"]=st["[object WeakMap]"]=!1;var at=G((function(e,t){var n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,o=r&&r.exports===n&&X.process,i=function(){try{return r&&r.require&&r.require("util").types||o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=i})),ct=at&&at.isTypedArray,ut=ct?function(e){return function(t){return e(t)}}(ct):function(e){return He(e)&&Xe(e.length)&&!!st[ae(e)]},lt=function(e,t){if("__proto__"!=t)return e[t]},pt=Object.prototype.hasOwnProperty,ft=function(e,t,n){var r=e[t];pt.call(e,t)&&V(r,n)&&(void 0!==n||t in e)||Re(e,t,n)},ht=/^(?:0|[1-9]\d*)$/,dt=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&ht.test(e))&&e>-1&&e%1==0&&e<t},mt=Object.prototype.hasOwnProperty,vt=function(e,t){var n=Ze(e),r=!n&&Ge(e),o=!n&&!r&&et(e),i=!n&&!r&&!o&&ut(e),s=n||r||o||i,a=s?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=a.length;for(var u in e)!t&&!mt.call(e,u)||s&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||dt(u,c))||a.push(u);return a},gt=Object.prototype.hasOwnProperty,yt=function(e){if(!ce(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=Ve(e),n=[];for(var r in e)("constructor"!=r||!t&&gt.call(e,r))&&n.push(r);return n},bt=function(e){return Ye(e)?vt(e,!0):yt(e)},wt=function(e){return function(e,t,n,r){var o=!n;n||(n={});for(var i=-1,s=t.length;++i<s;){var a=t[i],c=r?r(n[a],e[a],a,n,e):void 0;void 0===c&&(c=e[a]),o?Re(n,a,c):ft(n,a,c)}return n}(e,bt(e))},kt=function(e,t,n,r,o,i,s){var a=lt(e,n),c=lt(t,n),u=s.get(c);if(u)Ie(e,n,u);else{var l=i?i(a,c,n+"",e,t,s):void 0,p=void 0===l;if(p){var f=Ze(c),h=!f&&et(c),d=!f&&!h&&ut(c);l=c,f||h||d?Ze(a)?l=a:function(e){return He(e)&&Ye(e)}(a)?l=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(a):h?(p=!1,l=je(c,!0)):d?(p=!1,l=Fe(c,!0)):l=[]:function(e){if(!He(e)||"[object Object]"!=ae(e))return!1;var t=Be(e);if(null===t)return!0;var n=ot.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&rt.call(n)==it}(c)||Ge(c)?(l=a,Ge(a)?l=wt(a):ce(a)&&!ue(a)||(l=function(e){return"function"!=typeof e.constructor||Ve(e)?{}:Le(Be(e))}(c))):p=!1}p&&(s.set(c,l),o(l,c,r,i,s),s.delete(c)),Ie(e,n,l)}},xt=function(e){return e},_t=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)},Ct=Math.max,St=function(e){return function(){return e}},Ot=Ne?function(e,t){return Ne(e,"toString",{configurable:!0,enumerable:!1,value:St(t),writable:!0})}:xt,At=Date.now,Et=function(e){var t=0,n=0;return function(){var r=At(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(Ot),Mt=function(e,t){return Et(function(e,t,n){return t=Ct(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=Ct(r.length-t,0),s=Array(i);++o<i;)s[o]=r[t+o];o=-1;for(var a=Array(t+1);++o<t;)a[o]=r[o];return a[t]=n(s),_t(e,this,a)}}(e,t,xt),e+"")},Tt=function(e){return Mt((function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,s&&function(e,t,n){if(!ce(n))return!1;var r=typeof t;return!!("number"==r?Ye(n)&&dt(t,n.length):"string"==r&&t in n)&&V(n[t],e)}(n[0],n[1],s)&&(i=o<3?void 0:i,o=1),t=Object(t);++r<o;){var a=n[r];a&&e(t,a,r)}return t}))}((function(e,t,n){!function e(t,n,r,o,i){t!==n&&Pe(n,(function(s,a){if(ce(s))i||(i=new De),kt(t,n,a,r,e,o,i);else{var c=o?o(lt(t,a),s,a+"",t,n,i):void 0;void 0===c&&(c=s),Ie(t,a,c)}}),bt)}(e,t,n)}));!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".resize-observer[data-v-b329ee4c]{position:absolute;top:0;left:0;z-index:-1;width:100%;height:100%;border:none;background-color:transparent;pointer-events:none;display:block;overflow:hidden;opacity:0}.resize-observer[data-v-b329ee4c] object{display:block;position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden;pointer-events:none;z-index:-1}");var Dt=O,Nt=q,Rt={install:function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e.installed){e.installed=!0;var r={};Tt(r,w,n),Rt.options=r,O.options=r,t.directive("tooltip",O),t.directive("close-popover",R),t.component("v-popover",q)}},get enabled(){return y.enabled},set enabled(e){y.enabled=e}},It=null;"undefined"!=typeof window?It=window.Vue:void 0!==e&&(It=e.Vue),It&&It.use(Rt)}).call(this,n(3))},9:function(e,t,n){"use strict";(function(e){for(
/**!
 * @fileOverview Kickass library to create and place poppers near their reference elements.
 * @version 1.15.0
 * @license
 * Copyright (c) 2016 Federico Zivolo and contributors
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */
var n="undefined"!=typeof window&&"undefined"!=typeof document,r=["Edge","Trident","Firefox"],o=0,i=0;i<r.length;i+=1)if(n&&navigator.userAgent.indexOf(r[i])>=0){o=1;break}var s=n&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),o))}};function a(e){return e&&"[object Function]"==={}.toString.call(e)}function c(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function u(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function l(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=c(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/(auto|scroll|overlay)/.test(n+o+r)?e:l(u(e))}var p=n&&!(!window.MSInputMethodContext||!document.documentMode),f=n&&/MSIE 10/.test(navigator.userAgent);function h(e){return 11===e?p:10===e?f:p||f}function d(e){if(!e)return document.documentElement;for(var t=h(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===c(n,"position")?d(n):n:e?e.ownerDocument.documentElement:document.documentElement}function m(e){return null!==e.parentNode?m(e.parentNode):e}function v(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,o=n?t:e,i=document.createRange();i.setStart(r,0),i.setEnd(o,0);var s,a,c=i.commonAncestorContainer;if(e!==c&&t!==c||r.contains(o))return"BODY"===(a=(s=c).nodeName)||"HTML"!==a&&d(s.firstElementChild)!==s?d(c):c;var u=m(e);return u.host?v(u.host,t):v(e,m(t).host)}function g(e){var t="top"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top")?"scrollTop":"scrollLeft",n=e.nodeName;if("BODY"===n||"HTML"===n){var r=e.ownerDocument.documentElement;return(e.ownerDocument.scrollingElement||r)[t]}return e[t]}function y(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"],10)+parseFloat(e["border"+r+"Width"],10)}function b(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],h(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function w(e){var t=e.body,n=e.documentElement,r=h(10)&&getComputedStyle(n);return{height:b("Height",t,n,r),width:b("Width",t,n,r)}}var k=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},x=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}}(),_=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},C=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function S(e){return C({},e,{right:e.left+e.width,bottom:e.top+e.height})}function O(e){var t={};try{if(h(10)){t=e.getBoundingClientRect();var n=g(e,"top"),r=g(e,"left");t.top+=n,t.left+=r,t.bottom+=n,t.right+=r}else t=e.getBoundingClientRect()}catch(e){}var o={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},i="HTML"===e.nodeName?w(e.ownerDocument):{},s=i.width||e.clientWidth||o.right-o.left,a=i.height||e.clientHeight||o.bottom-o.top,u=e.offsetWidth-s,l=e.offsetHeight-a;if(u||l){var p=c(e);u-=y(p,"x"),l-=y(p,"y"),o.width-=u,o.height-=l}return S(o)}function A(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=h(10),o="HTML"===t.nodeName,i=O(e),s=O(t),a=l(e),u=c(t),p=parseFloat(u.borderTopWidth,10),f=parseFloat(u.borderLeftWidth,10);n&&o&&(s.top=Math.max(s.top,0),s.left=Math.max(s.left,0));var d=S({top:i.top-s.top-p,left:i.left-s.left-f,width:i.width,height:i.height});if(d.marginTop=0,d.marginLeft=0,!r&&o){var m=parseFloat(u.marginTop,10),v=parseFloat(u.marginLeft,10);d.top-=p-m,d.bottom-=p-m,d.left-=f-v,d.right-=f-v,d.marginTop=m,d.marginLeft=v}return(r&&!n?t.contains(a):t===a&&"BODY"!==a.nodeName)&&(d=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=g(t,"top"),o=g(t,"left"),i=n?-1:1;return e.top+=r*i,e.bottom+=r*i,e.left+=o*i,e.right+=o*i,e}(d,t)),d}function E(e){if(!e||!e.parentElement||h())return document.documentElement;for(var t=e.parentElement;t&&"none"===c(t,"transform");)t=t.parentElement;return t||document.documentElement}function M(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i={top:0,left:0},s=o?E(e):v(e,t);if("viewport"===r)i=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,r=A(e,n),o=Math.max(n.clientWidth,window.innerWidth||0),i=Math.max(n.clientHeight,window.innerHeight||0),s=t?0:g(n),a=t?0:g(n,"left");return S({top:s-r.top+r.marginTop,left:a-r.left+r.marginLeft,width:o,height:i})}(s,o);else{var a=void 0;"scrollParent"===r?"BODY"===(a=l(u(t))).nodeName&&(a=e.ownerDocument.documentElement):a="window"===r?e.ownerDocument.documentElement:r;var p=A(a,s,o);if("HTML"!==a.nodeName||function e(t){var n=t.nodeName;if("BODY"===n||"HTML"===n)return!1;if("fixed"===c(t,"position"))return!0;var r=u(t);return!!r&&e(r)}(s))i=p;else{var f=w(e.ownerDocument),h=f.height,d=f.width;i.top+=p.top-p.marginTop,i.bottom=h+p.top,i.left+=p.left-p.marginLeft,i.right=d+p.left}}var m="number"==typeof(n=n||0);return i.left+=m?n:n.left||0,i.top+=m?n:n.top||0,i.right-=m?n:n.right||0,i.bottom-=m?n:n.bottom||0,i}function T(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var s=M(n,r,i,o),a={top:{width:s.width,height:t.top-s.top},right:{width:s.right-t.right,height:s.height},bottom:{width:s.width,height:s.bottom-t.bottom},left:{width:t.left-s.left,height:s.height}},c=Object.keys(a).map((function(e){return C({key:e},a[e],{area:(t=a[e],t.width*t.height)});var t})).sort((function(e,t){return t.area-e.area})),u=c.filter((function(e){var t=e.width,r=e.height;return t>=n.clientWidth&&r>=n.clientHeight})),l=u.length>0?u[0].key:c[0].key,p=e.split("-")[1];return l+(p?"-"+p:"")}function D(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return A(n,r?E(t):v(t,n),r)}function N(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),r=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+r,height:e.offsetHeight+n}}function R(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(function(e){return t[e]}))}function I(e,t,n){n=n.split("-")[0];var r=N(e),o={width:r.width,height:r.height},i=-1!==["right","left"].indexOf(n),s=i?"top":"left",a=i?"left":"top",c=i?"height":"width",u=i?"width":"height";return o[s]=t[s]+t[c]/2-r[c]/2,o[a]=n===a?t[a]-r[u]:t[R(a)],o}function P(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function j(e,t,n){return(void 0===n?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex((function(e){return e[t]===n}));var r=P(e,(function(e){return e[t]===n}));return e.indexOf(r)}(e,"name",n))).forEach((function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&a(n)&&(t.offsets.popper=S(t.offsets.popper),t.offsets.reference=S(t.offsets.reference),t=n(t,e))})),t}function z(e,t){return e.some((function(e){var n=e.name;return e.enabled&&n===t}))}function F(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r<t.length;r++){var o=t[r],i=o?""+o+n:e;if(void 0!==document.body.style[i])return i}return null}function $(e){var t=e.ownerDocument;return t?t.defaultView:window}function L(){var e,t;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(e=this.reference,t=this.state,$(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach((function(e){e.removeEventListener("scroll",t.updateBound)})),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t))}function B(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function q(e,t){Object.keys(t).forEach((function(n){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&B(t[n])&&(r="px"),e.style[n]=t[n]+r}))}var V=n&&/Firefox/i.test(navigator.userAgent);function H(e,t,n){var r=P(e,(function(e){return e.name===t})),o=!!r&&e.some((function(e){return e.name===n&&e.enabled&&e.order<r.order}));if(!o){var i="`"+t+"`",s="`"+n+"`";console.warn(s+" modifier is required by "+i+" modifier in order to work, be sure to include it before "+i+"!")}return o}var U=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],W=U.slice(3);function J(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=W.indexOf(e),r=W.slice(n+1).concat(W.slice(0,n));return t?r.reverse():r}var K="flip",G="clockwise",Z="counterclockwise",X={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var o=e.offsets,i=o.reference,s=o.popper,a=-1!==["bottom","top"].indexOf(n),c=a?"left":"top",u=a?"width":"height",l={start:_({},c,i[c]),end:_({},c,i[c]+i[u]-s[u])};e.offsets.popper=C({},s,l[r])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n,r=t.offset,o=e.placement,i=e.offsets,s=i.popper,a=i.reference,c=o.split("-")[0];return n=B(+r)?[+r,0]:function(e,t,n,r){var o=[0,0],i=-1!==["right","left"].indexOf(r),s=e.split(/(\+|\-)/).map((function(e){return e.trim()})),a=s.indexOf(P(s,(function(e){return-1!==e.search(/,|\s/)})));s[a]&&-1===s[a].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var c=/\s*,\s*|\s+/,u=-1!==a?[s.slice(0,a).concat([s[a].split(c)[0]]),[s[a].split(c)[1]].concat(s.slice(a+1))]:[s];return(u=u.map((function(e,r){var o=(1===r?!i:i)?"height":"width",s=!1;return e.reduce((function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,s=!0,e):s?(e[e.length-1]+=t,s=!1,e):e.concat(t)}),[]).map((function(e){return function(e,t,n,r){var o=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+o[1],s=o[2];if(!i)return e;if(0===s.indexOf("%")){var a=void 0;switch(s){case"%p":a=n;break;case"%":case"%r":default:a=r}return S(a)[t]/100*i}return"vh"===s||"vw"===s?("vh"===s?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*i:i}(e,o,t,n)}))}))).forEach((function(e,t){e.forEach((function(n,r){B(n)&&(o[t]+=n*("-"===e[r-1]?-1:1))}))})),o}(r,s,a,c),"left"===c?(s.top+=n[0],s.left-=n[1]):"right"===c?(s.top+=n[0],s.left+=n[1]):"top"===c?(s.left+=n[0],s.top-=n[1]):"bottom"===c&&(s.left+=n[0],s.top+=n[1]),e.popper=s,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||d(e.instance.popper);e.instance.reference===n&&(n=d(n));var r=F("transform"),o=e.instance.popper.style,i=o.top,s=o.left,a=o[r];o.top="",o.left="",o[r]="";var c=M(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);o.top=i,o.left=s,o[r]=a,t.boundaries=c;var u=t.priority,l=e.offsets.popper,p={primary:function(e){var n=l[e];return l[e]<c[e]&&!t.escapeWithReference&&(n=Math.max(l[e],c[e])),_({},e,n)},secondary:function(e){var n="right"===e?"left":"top",r=l[n];return l[e]>c[e]&&!t.escapeWithReference&&(r=Math.min(l[n],c[e]-("right"===e?l.width:l.height))),_({},n,r)}};return u.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";l=C({},l,p[t](e))})),e.offsets.popper=l,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,r=t.reference,o=e.placement.split("-")[0],i=Math.floor,s=-1!==["top","bottom"].indexOf(o),a=s?"right":"bottom",c=s?"left":"top",u=s?"width":"height";return n[a]<i(r[c])&&(e.offsets.popper[c]=i(r[c])-n[u]),n[c]>i(r[a])&&(e.offsets.popper[c]=i(r[a])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!H(e.instance.modifiers,"arrow","keepTogether"))return e;var r=t.element;if("string"==typeof r){if(!(r=e.instance.popper.querySelector(r)))return e}else if(!e.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var o=e.placement.split("-")[0],i=e.offsets,s=i.popper,a=i.reference,u=-1!==["left","right"].indexOf(o),l=u?"height":"width",p=u?"Top":"Left",f=p.toLowerCase(),h=u?"left":"top",d=u?"bottom":"right",m=N(r)[l];a[d]-m<s[f]&&(e.offsets.popper[f]-=s[f]-(a[d]-m)),a[f]+m>s[d]&&(e.offsets.popper[f]+=a[f]+m-s[d]),e.offsets.popper=S(e.offsets.popper);var v=a[f]+a[l]/2-m/2,g=c(e.instance.popper),y=parseFloat(g["margin"+p],10),b=parseFloat(g["border"+p+"Width"],10),w=v-e.offsets.popper[f]-y-b;return w=Math.max(Math.min(s[l]-m,w),0),e.arrowElement=r,e.offsets.arrow=(_(n={},f,Math.round(w)),_(n,h,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(z(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=M(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],o=R(r),i=e.placement.split("-")[1]||"",s=[];switch(t.behavior){case K:s=[r,o];break;case G:s=J(r);break;case Z:s=J(r,!0);break;default:s=t.behavior}return s.forEach((function(a,c){if(r!==a||s.length===c+1)return e;r=e.placement.split("-")[0],o=R(r);var u=e.offsets.popper,l=e.offsets.reference,p=Math.floor,f="left"===r&&p(u.right)>p(l.left)||"right"===r&&p(u.left)<p(l.right)||"top"===r&&p(u.bottom)>p(l.top)||"bottom"===r&&p(u.top)<p(l.bottom),h=p(u.left)<p(n.left),d=p(u.right)>p(n.right),m=p(u.top)<p(n.top),v=p(u.bottom)>p(n.bottom),g="left"===r&&h||"right"===r&&d||"top"===r&&m||"bottom"===r&&v,y=-1!==["top","bottom"].indexOf(r),b=!!t.flipVariations&&(y&&"start"===i&&h||y&&"end"===i&&d||!y&&"start"===i&&m||!y&&"end"===i&&v),w=!!t.flipVariationsByContent&&(y&&"start"===i&&d||y&&"end"===i&&h||!y&&"start"===i&&v||!y&&"end"===i&&m),k=b||w;(f||g||k)&&(e.flipped=!0,(f||g)&&(r=s[c+1]),k&&(i=function(e){return"end"===e?"start":"start"===e?"end":e}(i)),e.placement=r+(i?"-"+i:""),e.offsets.popper=C({},e.offsets.popper,I(e.instance.popper,e.offsets.reference,e.placement)),e=j(e.instance.modifiers,e,"flip"))})),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],r=e.offsets,o=r.popper,i=r.reference,s=-1!==["left","right"].indexOf(n),a=-1===["top","left"].indexOf(n);return o[s?"left":"top"]=i[n]-(a?o[s?"width":"height"]:0),e.placement=R(t),e.offsets.popper=S(o),e}},hide:{order:800,enabled:!0,fn:function(e){if(!H(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=P(e.instance.modifiers,(function(e){return"preventOverflow"===e.name})).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var n=t.x,r=t.y,o=e.offsets.popper,i=P(e.instance.modifiers,(function(e){return"applyStyle"===e.name})).gpuAcceleration;void 0!==i&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var s,a,c=void 0!==i?i:t.gpuAcceleration,u=d(e.instance.popper),l=O(u),p={position:o.position},f=function(e,t){var n=e.offsets,r=n.popper,o=n.reference,i=Math.round,s=Math.floor,a=function(e){return e},c=i(o.width),u=i(r.width),l=-1!==["left","right"].indexOf(e.placement),p=-1!==e.placement.indexOf("-"),f=t?l||p||c%2==u%2?i:s:a,h=t?i:a;return{left:f(c%2==1&&u%2==1&&!p&&t?r.left-1:r.left),top:h(r.top),bottom:h(r.bottom),right:f(r.right)}}(e,window.devicePixelRatio<2||!V),h="bottom"===n?"top":"bottom",m="right"===r?"left":"right",v=F("transform");if(a="bottom"===h?"HTML"===u.nodeName?-u.clientHeight+f.bottom:-l.height+f.bottom:f.top,s="right"===m?"HTML"===u.nodeName?-u.clientWidth+f.right:-l.width+f.right:f.left,c&&v)p[v]="translate3d("+s+"px, "+a+"px, 0)",p[h]=0,p[m]=0,p.willChange="transform";else{var g="bottom"===h?-1:1,y="right"===m?-1:1;p[h]=a*g,p[m]=s*y,p.willChange=h+", "+m}var b={"x-placement":e.placement};return e.attributes=C({},b,e.attributes),e.styles=C({},p,e.styles),e.arrowStyles=C({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){var t,n;return q(e.instance.popper,e.styles),t=e.instance.popper,n=e.attributes,Object.keys(n).forEach((function(e){!1!==n[e]?t.setAttribute(e,n[e]):t.removeAttribute(e)})),e.arrowElement&&Object.keys(e.arrowStyles).length&&q(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,r,o){var i=D(o,t,e,n.positionFixed),s=T(n.placement,i,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",s),q(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},Y=function(){function e(t,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};k(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=s(this.update.bind(this)),this.options=C({},e.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(C({},e.Defaults.modifiers,o.modifiers)).forEach((function(t){r.options.modifiers[t]=C({},e.Defaults.modifiers[t]||{},o.modifiers?o.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return C({name:e},r.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&a(e.onLoad)&&e.onLoad(r.reference,r.popper,r.options,e,r.state)})),this.update();var i=this.options.eventsEnabled;i&&this.enableEventListeners(),this.state.eventsEnabled=i}return x(e,[{key:"update",value:function(){return function(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=D(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=T(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=I(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=j(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}.call(this)}},{key:"destroy",value:function(){return function(){return this.state.isDestroyed=!0,z(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[F("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}.call(this)}},{key:"enableEventListeners",value:function(){return function(){this.state.eventsEnabled||(this.state=function(e,t,n,r){n.updateBound=r,$(e).addEventListener("resize",n.updateBound,{passive:!0});var o=l(e);return function e(t,n,r,o){var i="BODY"===t.nodeName,s=i?t.ownerDocument.defaultView:t;s.addEventListener(n,r,{passive:!0}),i||e(l(s.parentNode),n,r,o),o.push(s)}(o,"scroll",n.updateBound,n.scrollParents),n.scrollElement=o,n.eventsEnabled=!0,n}(this.reference,this.options,this.state,this.scheduleUpdate))}.call(this)}},{key:"disableEventListeners",value:function(){return L.call(this)}}]),e}();Y.Utils=("undefined"!=typeof window?window:e).PopperUtils,Y.placements=U,Y.Defaults=X,t.a=Y}).call(this,n(3))}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(240),o=n(241),i=n(242),s={};if("undefined"!=typeof navigator&&"undefined"!=typeof document){var a=/Edge\/(\d+)/.exec(navigator.userAgent),c=/MSIE \d/.test(navigator.userAgent),u=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);s.mac=/Mac/.test(navigator.platform);var l=s.ie=!!(c||u||a);s.ie_version=c?document.documentMode||6:u?+u[1]:a?+a[1]:null,s.gecko=!l&&/gecko\/(\d+)/i.test(navigator.userAgent),s.gecko_version=s.gecko&&+(/Firefox\/(\d+)/.exec(navigator.userAgent)||[0,0])[1];var p=!l&&/Chrome\/(\d+)/.exec(navigator.userAgent);s.chrome=!!p,s.chrome_version=p&&+p[1],s.ios=!l&&/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),s.android=/Android \d/.test(navigator.userAgent),s.webkit=!l&&"WebkitAppearance"in document.documentElement.style,s.safari=/Apple Computer/.test(navigator.vendor),s.webkit_version=s.webkit&&+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]}var f=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},h=function(e){var t=e.parentNode;return t&&11==t.nodeType?t.host:t},d=function(e,t,n){var r=document.createRange();return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r},m=function(e,t,n,r){return n&&(g(e,t,n,r,-1)||g(e,t,n,r,1))},v=/^(img|br|input|textarea|hr)$/i;function g(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:y(e))){var i=e.parentNode;if(1!=i.nodeType||b(e)||v.test(e.nodeName)||"false"==e.contentEditable)return!1;t=f(e)+(o<0?0:1),e=i}else{if(1!=e.nodeType)return!1;e=e.childNodes[t+(o<0?-1:0)],t=o<0?y(e):0}}}function y(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function b(e){for(var t,n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}var w=function(e){var t=e.isCollapsed;return t&&s.chrome&&e.rangeCount&&!e.getRangeAt(0).collapsed&&(t=!1),t};function k(e,t){var n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function x(e){return{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}function _(e,t){return"number"==typeof e?e:e[t]}function C(e,t,n){for(var r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument,s=i.defaultView,a=n||e.dom;a;a=h(a))if(1==a.nodeType){var c=a==i.body||1!=a.nodeType,u=c?x(s):a.getBoundingClientRect(),l=0,p=0;if(t.top<u.top+_(r,"top")?p=-(u.top-t.top+_(o,"top")):t.bottom>u.bottom-_(r,"bottom")&&(p=t.bottom-u.bottom+_(o,"bottom")),t.left<u.left+_(r,"left")?l=-(u.left-t.left+_(o,"left")):t.right>u.right-_(r,"right")&&(l=t.right-u.right+_(o,"right")),(l||p)&&(c?s.scrollBy(l,p):(p&&(a.scrollTop+=p),l&&(a.scrollLeft+=l))),c)break}}function S(e,t){for(var n,r,o=2e8,i=0,s=t.top,a=t.top,c=e.firstChild,u=0;c;c=c.nextSibling,u++){var l=void 0;if(1==c.nodeType)l=c.getClientRects();else{if(3!=c.nodeType)continue;l=d(c).getClientRects()}for(var p=0;p<l.length;p++){var f=l[p];if(f.top<=s&&f.bottom>=a){s=Math.max(f.bottom,s),a=Math.min(f.top,a);var h=f.left>t.left?f.left-t.left:f.right<t.left?t.left-f.right:0;if(h<o){n=c,o=h,r=h&&3==n.nodeType?{left:f.right<t.left?f.right:f.left,top:t.top}:t,1==c.nodeType&&h&&(i=u+(t.left>=(f.left+f.right)/2?1:0));continue}}!n&&(t.left>=f.right&&t.top>=f.top||t.left>=f.left&&t.top>=f.bottom)&&(i=u+1)}}return n&&3==n.nodeType?function(e,t){for(var n=e.nodeValue.length,r=document.createRange(),o=0;o<n;o++){r.setEnd(e,o+1),r.setStart(e,o);var i=E(r,1);if(i.top!=i.bottom&&O(t,i))return{node:e,offset:o+(t.left>=(i.left+i.right)/2?1:0)}}return{node:e,offset:0}}(n,r):!n||o&&1==n.nodeType?{node:e,offset:i}:S(n,r)}function O(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function A(e,t){var n,r,o=e.root;if(o.caretPositionFromPoint){var i,a=o.caretPositionFromPoint(t.left,t.top);if(a)n=(i=a).offsetNode,r=i.offset}if(!n&&o.caretRangeFromPoint){var c,u=o.caretRangeFromPoint(t.left,t.top);if(u)n=(c=u).startContainer,r=c.startOffset}var l,p=o.elementFromPoint(t.left,t.top+1);if(!p||!e.dom.contains(1!=p.nodeType?p.parentNode:p)){var f=e.dom.getBoundingClientRect();if(!O(t,f))return null;if(!(p=function e(t,n,r){var o=t.childNodes.length;if(o&&r.top<r.bottom)for(var i=Math.max(0,Math.min(o-1,Math.floor(o*(n.top-r.top)/(r.bottom-r.top))-2)),s=i;;){var a=t.childNodes[s];if(1==a.nodeType)for(var c=a.getClientRects(),u=0;u<c.length;u++){var l=c[u];if(O(n,l))return e(a,n,l)}if((s=(s+1)%o)==i)break}return t}(e.dom,t,f)))return null}if(p=function(e,t){var n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}(p,t),n){if(s.gecko&&1==n.nodeType&&(r=Math.min(r,n.childNodes.length))<n.childNodes.length){var h,d=n.childNodes[r];"IMG"==d.nodeName&&(h=d.getBoundingClientRect()).right<=t.left&&h.bottom>t.top&&r++}n==e.dom&&r==n.childNodes.length-1&&1==n.lastChild.nodeType&&t.top>n.lastChild.getBoundingClientRect().bottom?l=e.state.doc.content.size:0!=r&&1==n.nodeType&&"BR"==n.childNodes[r-1].nodeName||(l=function(e,t,n,r){for(var o=-1,i=t;i!=e.dom;){var s=e.docView.nearestDesc(i,!0);if(!s)return null;if(s.node.isBlock&&s.parent){var a=s.dom.getBoundingClientRect();if(a.left>r.left||a.top>r.top)o=s.posBefore;else{if(!(a.right<r.left||a.bottom<r.top))break;o=s.posAfter}}i=s.dom.parentNode}return o>-1?o:e.docView.posFromDOM(t,n)}(e,n,r,t))}null==l&&(l=function(e,t,n){var r=S(t,n),o=r.node,i=r.offset,s=-1;if(1==o.nodeType&&!o.firstChild){var a=o.getBoundingClientRect();s=a.left!=a.right&&n.left>(a.left+a.right)/2?1:-1}return e.docView.posFromDOM(o,i,s)}(e,p,t));var m=e.docView.nearestDesc(p,!0);return{pos:l,inside:m?m.posAtStart-m.border:-1}}function E(e,t){var n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}function M(e,t){var n=e.docView.domFromPos(t),r=n.node,o=n.offset;if(3==r.nodeType&&(s.chrome||s.gecko)){var i=E(d(r,o,o),0);if(s.gecko&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){var a=E(d(r,o-1,o-1),-1);if(Math.abs(a.left-i.left)<1&&a.top==i.top){var c=E(d(r,o,o+1),-1);return T(c,c.left<a.left)}}return i}if(1==r.nodeType&&!e.state.doc.resolve(t).parent.inlineContent){var u,l=!0;if(o<r.childNodes.length){var p=r.childNodes[o];1==p.nodeType&&(u=p.getBoundingClientRect())}if(!u&&o){var f=r.childNodes[o-1];1==f.nodeType&&(u=f.getBoundingClientRect(),l=!1)}return function(e,t){if(0==e.height)return e;var n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}(u||r.getBoundingClientRect(),l)}for(var h=-1;h<2;h+=2)if(h<0&&o){var m=void 0,v=3==r.nodeType?d(r,o-1,o):3==(m=r.childNodes[o-1]).nodeType?d(m):1==m.nodeType&&"BR"!=m.nodeName?m:null;if(v){var g=E(v,1);if(g.top<g.bottom)return T(g,!1)}}else if(h>0&&o<y(r)){var b=void 0,w=3==r.nodeType?d(r,o,o+1):3==(b=r.childNodes[o]).nodeType?d(b):1==b.nodeType?b:null;if(w){var k=E(w,-1);if(k.top<k.bottom)return T(k,!0)}}return T(E(3==r.nodeType?d(r):r,0),!1)}function T(e,t){if(0==e.width)return e;var n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function D(e,t,n){var r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o.focus()}}var N=/[\u0590-\u08ac]/;var R=null,I=null,P=!1;function j(e,t,n){return R==t&&I==n?P:(R=t,I=n,P="up"==n||"down"==n?function(e,t,n){var r=t.selection,o="up"==n?r.$anchor.min(r.$head):r.$anchor.max(r.$head);return D(e,t,(function(){for(var t=e.docView.domFromPos(o.pos).node;;){var r=e.docView.nearestDesc(t,!0);if(!r)break;if(r.node.isBlock){t=r.dom;break}t=r.dom.parentNode}for(var i=M(e,o.pos),s=t.firstChild;s;s=s.nextSibling){var a=void 0;if(1==s.nodeType)a=s.getClientRects();else{if(3!=s.nodeType)continue;a=d(s,0,s.nodeValue.length).getClientRects()}for(var c=0;c<a.length;c++){var u=a[c];if(u.bottom>u.top&&("up"==n?u.bottom<i.top+1:u.top>i.bottom-1))return!1}}return!0}))}(e,t,n):function(e,t,n){var r=t.selection.$head;if(!r.parent.isTextblock)return!1;var o=r.parentOffset,i=!o,s=o==r.parent.content.size,a=getSelection();return N.test(r.parent.textContent)&&a.modify?D(e,t,(function(){var t=a.getRangeAt(0),o=a.focusNode,i=a.focusOffset,s=a.caretBidiLevel;a.modify("move",n,"character");var c=!(r.depth?e.docView.domAfterPos(r.before()):e.dom).contains(1==a.focusNode.nodeType?a.focusNode:a.focusNode.parentNode)||o==a.focusNode&&i==a.focusOffset;return a.removeAllRanges(),a.addRange(t),null!=s&&(a.caretBidiLevel=s),c})):"left"==n||"backward"==n?i:s}(e,t,n))}var z=function(e,t,n,r){this.parent=e,this.children=t,this.dom=n,n.pmViewDesc=this,this.contentDOM=r,this.dirty=0},F={beforePosition:{},size:{},border:{},posBefore:{},posAtStart:{},posAfter:{},posAtEnd:{},contentLost:{}};z.prototype.matchesWidget=function(){return!1},z.prototype.matchesMark=function(){return!1},z.prototype.matchesNode=function(){return!1},z.prototype.matchesHack=function(){return!1},F.beforePosition.get=function(){return!1},z.prototype.parseRule=function(){return null},z.prototype.stopEvent=function(){return!1},F.size.get=function(){for(var e=0,t=0;t<this.children.length;t++)e+=this.children[t].size;return e},F.border.get=function(){return 0},z.prototype.destroy=function(){this.parent=null,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=null);for(var e=0;e<this.children.length;e++)this.children[e].destroy()},z.prototype.posBeforeChild=function(e){for(var t=0,n=this.posAtStart;t<this.children.length;t++){var r=this.children[t];if(r==e)return n;n+=r.size}},F.posBefore.get=function(){return this.parent.posBeforeChild(this)},F.posAtStart.get=function(){return this.parent?this.parent.posBeforeChild(this)+this.border:0},F.posAfter.get=function(){return this.posBefore+this.size},F.posAtEnd.get=function(){return this.posAtStart+this.size-2*this.border},z.prototype.localPosFromDOM=function(e,t,n){var r;if(this.contentDOM&&this.contentDOM.contains(1==e.nodeType?e:e.parentNode)){if(n<0){var o,i;if(e==this.contentDOM)o=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;o=e.previousSibling}for(;o&&(!(i=o.pmViewDesc)||i.parent!=this);)o=o.previousSibling;return o?this.posBeforeChild(i)+i.size:this.posAtStart}var s,a;if(e==this.contentDOM)s=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;s=e.nextSibling}for(;s&&(!(a=s.pmViewDesc)||a.parent!=this);)s=s.nextSibling;return s?this.posBeforeChild(a):this.posAtEnd}if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(var c=e;;c=c.parentNode){if(c==this.dom){r=!1;break}if(c.parentNode.firstChild!=c)break}if(null==r&&t==e.childNodes.length)for(var u=e;;u=u.parentNode){if(u==this.dom){r=!0;break}if(u.parentNode.lastChild!=u)break}}return(null==r?n>0:r)?this.posAtEnd:this.posAtStart},z.prototype.nearestDesc=function(e,t){for(var n=!0,r=e;r;r=r.parentNode){var o=this.getDesc(r);if(o&&(!t||o.node)){if(!n||!o.nodeDOM||(1==o.nodeDOM.nodeType?o.nodeDOM.contains(e):o.nodeDOM==e))return o;n=!1}}},z.prototype.getDesc=function(e){for(var t=e.pmViewDesc,n=t;n;n=n.parent)if(n==this)return t},z.prototype.posFromDOM=function(e,t,n){for(var r=e;;r=r.parentNode){var o=this.getDesc(r);if(o)return o.localPosFromDOM(e,t,n)}},z.prototype.descAt=function(e){for(var t=0,n=0;t<this.children.length;t++){var r=this.children[t],o=n+r.size;if(n==e&&o!=n){for(;!r.border&&r.children.length;)r=r.children[0];return r}if(e<o)return r.descAt(e-n-r.border);n=o}},z.prototype.domFromPos=function(e){if(!this.contentDOM)return{node:this.dom,offset:0};for(var t=0,n=0;;n++){if(t==e){for(;n<this.children.length&&(this.children[n].beforePosition||this.children[n].dom.parentNode!=this.contentDOM);)n++;return{node:this.contentDOM,offset:n==this.children.length?this.contentDOM.childNodes.length:f(this.children[n].dom)}}if(n==this.children.length)throw new Error("Invalid position "+e);var r=this.children[n],o=t+r.size;if(e<o)return r.domFromPos(e-t-r.border);t=o}},z.prototype.parseRange=function(e,t,n){if(void 0===n&&(n=0),0==this.children.length)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};for(var r=-1,o=-1,i=n,s=0;;s++){var a=this.children[s],c=i+a.size;if(-1==r&&e<=c){var u=i+a.border;if(e>=u&&t<=c-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(e,t,u);e=i;for(var l=s;l>0;l--){var p=this.children[l-1];if(p.size&&p.dom.parentNode==this.contentDOM&&!p.emptyChildAt(1)){r=f(p.dom)+1;break}e-=p.size}-1==r&&(r=0)}if(r>-1&&t<=c){t=c;for(var h=s+1;h<this.children.length;h++){var d=this.children[h];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(-1)){o=f(d.dom);break}t+=d.size}-1==o&&(o=this.contentDOM.childNodes.length);break}i=c}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:o}},z.prototype.emptyChildAt=function(e){if(this.border||!this.contentDOM||!this.children.length)return!1;var t=this.children[e<0?0:this.children.length-1];return 0==t.size||t.emptyChildAt(e)},z.prototype.domAfterPos=function(e){var t=this.domFromPos(e),n=t.node,r=t.offset;if(1!=n.nodeType||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]},z.prototype.setSelection=function(e,t,n,r){for(var o=Math.min(e,t),i=Math.max(e,t),s=0,a=0;s<this.children.length;s++){var c=this.children[s],u=a+c.size;if(o>a&&i<u)return c.setSelection(e-a-c.border,t-a-c.border,n,r);a=u}var l=this.domFromPos(e),p=this.domFromPos(t),f=n.getSelection(),h=document.createRange();if(r||!m(l.node,l.offset,f.anchorNode,f.anchorOffset)||!m(p.node,p.offset,f.focusNode,f.focusOffset)){if(f.extend)h.setEnd(l.node,l.offset),h.collapse(!1);else{if(e>t){var d=l;l=p,p=d}h.setEnd(p.node,p.offset),h.setStart(l.node,l.offset)}f.removeAllRanges(),f.addRange(h),f.extend&&f.extend(p.node,p.offset)}},z.prototype.ignoreMutation=function(e){return!this.contentDOM},F.contentLost.get=function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)},z.prototype.markDirty=function(e,t){for(var n=0,r=0;r<this.children.length;r++){var o=this.children[r],i=n+o.size;if(n==i?e<=i&&t>=n:e<i&&t>n){var s=n+o.border,a=i-o.border;if(e>=s&&t<=a)return this.dirty=e==n||t==i?2:1,void(e!=s||t!=a||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(e-s,t-s):o.dirty=3);o.dirty=3}n=i}this.dirty=2},z.prototype.markParentsDirty=function(){for(var e=this.parent;e;e=e.parent){e.dirty<2&&(e.dirty=2)}},Object.defineProperties(z.prototype,F);var $=[],L=function(e){function t(t,n,r,o){var i,s=n.type.toDOM;if("function"==typeof s&&(s=s(r,(function(){return i?i.parent?i.parent.posBeforeChild(i):void 0:o}))),!n.type.spec.raw){if(1!=s.nodeType){var a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable=!1,s.classList.add("ProseMirror-widget")}e.call(this,t,$,s,null),this.widget=n,i=this}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={beforePosition:{}};return n.beforePosition.get=function(){return this.widget.type.side<0},t.prototype.matchesWidget=function(e){return 0==this.dirty&&e.type.eq(this.widget.type)},t.prototype.parseRule=function(){return{ignore:!0}},t.prototype.stopEvent=function(e){var t=this.widget.spec.stopEvent;return!!t&&t(e)},Object.defineProperties(t.prototype,n),t}(z),B=function(e){function t(t,n,r,o){e.call(this,t,$,n,null),this.textDOM=r,this.text=o}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={size:{}};return n.size.get=function(){return this.text.length},t.prototype.localPosFromDOM=function(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t},t.prototype.domFromPos=function(e){return{node:this.textDOM,offset:e}},t.prototype.ignoreMutation=function(e){return"characterData"===e.type&&e.target.nodeValue==e.oldValue},Object.defineProperties(t.prototype,n),t}(z),q=function(e){function t(t,n,r,o){e.call(this,t,[],r,o),this.mark=n}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.create=function(e,n,r,i){var s=i.nodeViews[n.type.name],a=s&&s(n,i,r);return a&&a.dom||(a=o.DOMSerializer.renderSpec(document,n.type.spec.toDOM(n,r))),new t(e,n,a.dom,a.contentDOM||a.dom)},t.prototype.parseRule=function(){return{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}},t.prototype.matchesMark=function(e){return 3!=this.dirty&&this.mark.eq(e)},t.prototype.markDirty=function(t,n){if(e.prototype.markDirty.call(this,t,n),0!=this.dirty){for(var r=this.parent;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=0}},t.prototype.slice=function(e,n,r){var o=t.create(this.parent,this.mark,!0,r),i=this.children,s=this.size;n<s&&(i=oe(i,n,s,r)),e>0&&(i=oe(i,0,e,r));for(var a=0;a<i.length;a++)i[a].parent=o;return o.children=i,o},t}(z),V=function(e){function t(t,n,r,o,i,s,a,c,u){e.call(this,t,n.isLeaf?$:[],i,s),this.nodeDOM=a,this.node=n,this.outerDeco=r,this.innerDeco=o,s&&this.updateChildren(c,u)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={size:{},border:{}};return t.create=function(e,n,r,i,s,a){var c,u=s.nodeViews[n.type.name],l=u&&u(n,s,(function(){return c?c.parent?c.parent.posBeforeChild(c):void 0:a}),r),p=l&&l.dom,f=l&&l.contentDOM;if(n.isText)if(p){if(3!=p.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else p=document.createTextNode(n.text);else if(!p){var h;p=(h=o.DOMSerializer.renderSpec(document,n.type.spec.toDOM(n))).dom,f=h.contentDOM}f||n.isText||"BR"==p.nodeName||(p.hasAttribute("contenteditable")||(p.contentEditable=!1),n.type.spec.draggable&&(p.draggable=!0));var d=p;return p=Q(p,r,n),l?c=new J(e,n,r,i,p,f,d,l,s,a+1):n.isText?new U(e,n,r,i,p,d,s):new t(e,n,r,i,p,f,d,s,a+1)},t.prototype.parseRule=function(){var e=this;if(this.node.type.spec.reparseInView)return null;var t={node:this.node.type.name,attrs:this.node.attrs};return this.node.type.spec.code&&(t.preserveWhitespace="full"),this.contentDOM&&!this.contentLost?t.contentElement=this.contentDOM:t.getContent=function(){return e.contentDOM?o.Fragment.empty:e.node.content},t},t.prototype.matchesNode=function(e,t,n){return 0==this.dirty&&e.eq(this.node)&&ee(t,this.outerDeco)&&n.eq(this.innerDeco)},n.size.get=function(){return this.node.nodeSize},n.border.get=function(){return this.node.isLeaf?0:1},t.prototype.updateChildren=function(e,t){var n=this,r=this.node.inlineContent,i=t,s=r&&e.composing&&this.localCompositionNode(e,t),a=new ne(this,s&&s.node);!function(e,t,n,r){var o=t.locals(e),i=0;if(0==o.length){for(var s=0;s<e.childCount;s++){var a=e.child(s);r(a,o,t.forChild(i,a),s),i+=a.nodeSize}return}for(var c=0,u=[],l=null,p=0;;){if(c<o.length&&o[c].to==i){for(var f=o[c++],h=void 0;c<o.length&&o[c].to==i;)(h||(h=[f])).push(o[c++]);if(h){h.sort(re);for(var d=0;d<h.length;d++)n(h[d],p)}else n(f,p)}var m=void 0,v=void 0;if(l)v=-1,m=l,l=null;else{if(!(p<e.childCount))break;v=p,m=e.child(p++)}for(var g=0;g<u.length;g++)u[g].to<=i&&u.splice(g--,1);for(;c<o.length&&o[c].from==i;)u.push(o[c++]);var y=i+m.nodeSize;if(m.isText){var b=y;c<o.length&&o[c].from<b&&(b=o[c].from);for(var w=0;w<u.length;w++)u[w].to<b&&(b=u[w].to);b<y&&(l=m.cut(b-i),m=m.cut(0,b-i),y=b,v=-1)}r(m,u.length?u.slice():$,t.forChild(i,m),v),i=y}}(this.node,this.innerDeco,(function(t,s){t.spec.marks?a.syncToMarks(t.spec.marks,r,e):t.type.side>=0&&a.syncToMarks(s==n.node.childCount?o.Mark.none:n.node.child(s).marks,r,e),a.placeWidget(t,e,i)}),(function(t,n,o,s){a.syncToMarks(t.marks,r,e),a.findNodeMatch(t,n,o,s)||a.updateNextNode(t,n,o,e,s)||a.addNode(t,n,o,e,i),i+=t.nodeSize})),a.syncToMarks($,r,e),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||2==this.dirty)&&(s&&this.protectLocalComposition(e,s),this.renderChildren())},t.prototype.renderChildren=function(){!function e(t,n){var r=t.firstChild;for(var o=0;o<n.length;o++){var i=n[o],s=i.dom;if(s.parentNode==t){for(;s!=r;)r=te(r);r=r.nextSibling}else t.insertBefore(s,r);if(i instanceof q){var a=r?r.previousSibling:t.lastChild;e(i.contentDOM,i.children),r=a?a.nextSibling:t.firstChild}}for(;r;)r=te(r)}(this.contentDOM,this.children,t.is),s.ios&&function(e){if("UL"==e.nodeName||"OL"==e.nodeName){var t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}(this.dom)},t.prototype.localCompositionNode=function(e,t){var n=e.state.selection,o=n.from,i=n.to;if(!(!(e.state.selection instanceof r.TextSelection)||o<t||i>t+this.node.content.size)){var s=e.root.getSelection(),a=function(e,t){for(;;){if(3==e.nodeType)return e;if(1==e.nodeType&&t>0){if(e.childNodes.length>t&&3==e.childNodes[t].nodeType)return e.childNodes[t];e=e.childNodes[t-1],t=y(e)}else{if(!(1==e.nodeType&&t<e.childNodes.length))return null;e=e.childNodes[t],t=0}}}(s.focusNode,s.focusOffset);if(a&&this.dom.contains(a.parentNode)){var c=a.nodeValue,u=function(e,t,n,r){for(var o="",i=0,s=0;i<e.childCount;i++){var a=e.child(i),c=s+a.nodeSize;if(a.isText){if(o+=a.text,c>=r){for(var u=c-o.length,l=o.lastIndexOf(t);l>-1&&u+l>n;)l=o.lastIndexOf(t,l-1);if(l>-1&&u+l+t.length>=r)return u+l;if(c>r)break}}else o="";s=c}return-1}(this.node.content,c,o-t,i-t);return u<0?null:{node:a,pos:u,text:c}}}},t.prototype.protectLocalComposition=function(e,t){var n=t.node,r=t.pos,o=t.text;if(!this.getDesc(n)){for(var i=n;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=null)}var s=new B(this,i,n,o);e.compositionNodes.push(s),this.children=oe(this.children,r,r+o.length,e,s)}},t.prototype.update=function(e,t,n,r){return!(3==this.dirty||!e.sameMarkup(this.node))&&(this.updateInner(e,t,n,r),!0)},t.prototype.updateInner=function(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0},t.prototype.updateOuterDeco=function(e){if(!ee(e,this.outerDeco)){var t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=X(this.dom,this.nodeDOM,Z(this.outerDeco,this.node,t),Z(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=null,this.dom.pmViewDesc=this),this.outerDeco=e}},t.prototype.selectNode=function(){this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)},t.prototype.deselectNode=function(){this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!1)},Object.defineProperties(t.prototype,n),t}(z);function H(e,t,n,r,o){return Q(r,t,e),new V(null,e,t,n,r,r,r,o,0)}var U=function(e){function t(t,n,r,o,i,s,a){e.call(this,t,n,r,o,i,null,s,a)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.parseRule=function(){return{skip:this.nodeDOM.parentNode||!0}},t.prototype.update=function(e,t){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!e.sameMarkup(this.node))&&(this.updateOuterDeco(t),0==this.dirty&&e.text==this.node.text||e.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=e.text),this.node=e,this.dirty=0,!0)},t.prototype.inParent=function(){for(var e=this.parent.contentDOM,t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1},t.prototype.domFromPos=function(e){return{node:this.nodeDOM,offset:e}},t.prototype.localPosFromDOM=function(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):e.prototype.localPosFromDOM.call(this,t,n,r)},t.prototype.ignoreMutation=function(e){return"characterData"!=e.type&&"selection"!=e.type},t.prototype.slice=function(e,n,r){var o=this.node.cut(e,n),i=document.createTextNode(o.text);return new t(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)},t}(V),W=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.parseRule=function(){return{ignore:!0}},t.prototype.matchesHack=function(){return 0==this.dirty},t}(z),J=function(e){function t(t,n,r,o,i,s,a,c,u,l){e.call(this,t,n,r,o,i,s,a,u,l),this.spec=c}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.update=function(t,n,r,o){if(3==this.dirty)return!1;if(this.spec.update){var i=this.spec.update(t,n);return i&&this.updateInner(t,n,r,o),i}return!(!this.contentDOM&&!t.isLeaf)&&e.prototype.update.call(this,t,n,r,o)},t.prototype.selectNode=function(){this.spec.selectNode?this.spec.selectNode():e.prototype.selectNode.call(this)},t.prototype.deselectNode=function(){this.spec.deselectNode?this.spec.deselectNode():e.prototype.deselectNode.call(this)},t.prototype.setSelection=function(t,n,r,o){this.spec.setSelection?this.spec.setSelection(t,n,r):e.prototype.setSelection.call(this,t,n,r,o)},t.prototype.destroy=function(){this.spec.destroy&&this.spec.destroy(),e.prototype.destroy.call(this)},t.prototype.stopEvent=function(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)},t.prototype.ignoreMutation=function(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):e.prototype.ignoreMutation.call(this,t)},t}(V);function K(e){e&&(this.nodeName=e)}K.prototype=Object.create(null);var G=[new K];function Z(e,t,n){if(0==e.length)return G;for(var r=n?G[0]:new K,o=[r],i=0;i<e.length;i++){var s=e[i].type.attrs,a=r;if(s)for(var c in s.nodeName&&o.push(a=new K(s.nodeName)),s){var u=s[c];null!=u&&(n&&1==o.length&&o.push(a=r=new K(t.isInline?"span":"div")),"class"==c?a.class=(a.class?a.class+" ":"")+u:"style"==c?a.style=(a.style?a.style+";":"")+u:"nodeName"!=c&&(a[c]=u))}}return o}function X(e,t,n,r){if(n==G&&r==G)return t;for(var o=t,i=0;i<r.length;i++){var s=r[i],a=n[i];if(i){var c=void 0;a&&a.nodeName==s.nodeName&&o!=e&&(c=t.parentNode)&&c.tagName.toLowerCase()==s.nodeName?o=c:((c=document.createElement(s.nodeName)).appendChild(o),o=c)}Y(o,a||G[0],s)}return o}function Y(e,t,n){for(var r in t)"class"==r||"style"==r||"nodeName"==r||r in n||e.removeAttribute(r);for(var o in n)"class"!=o&&"style"!=o&&"nodeName"!=o&&n[o]!=t[o]&&e.setAttribute(o,n[o]);if(t.class!=n.class){for(var i=t.class?t.class.split(" "):$,s=n.class?n.class.split(" "):$,a=0;a<i.length;a++)-1==s.indexOf(i[a])&&e.classList.remove(i[a]);for(var c=0;c<s.length;c++)-1==i.indexOf(s[c])&&e.classList.add(s[c])}if(t.style!=n.style){if(t.style)for(var u,l=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;u=l.exec(t.style);)e.style[u[1].toLowerCase()]="";n.style&&(e.style.cssText+=n.style)}}function Q(e,t,n){return X(e,e,G,Z(t,n,1!=e.nodeType))}function ee(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function te(e){var t=e.nextSibling;return e.parentNode.removeChild(e),t}var ne=function(e,t){this.top=e,this.lock=t,this.index=0,this.stack=[],this.changed=!1;var n=function(e,t){for(var n=[],r=e.childCount,o=t.length-1;r>0&&o>=0;o--){var i=t[o],s=i.node;if(s){if(s!=e.child(r-1))break;n.push(i),--r}}return{nodes:n.reverse(),offset:r}}(e.node.content,e.children);this.preMatched=n.nodes,this.preMatchOffset=n.offset};function re(e,t){return e.type.side-t.type.side}function oe(e,t,n,r,o){for(var i=[],s=0,a=0;s<e.length;s++){var c=e[s],u=a,l=a+=c.size;u>=n||l<=t?i.push(c):(u<t&&i.push(c.slice(0,t-u,r)),o&&(i.push(o),o=null),l>n&&i.push(c.slice(n-u,c.size,r)))}return i}function ie(e,t){var n=e.selection,o=n.$anchor,i=n.$head,s=t>0?o.max(i):o.min(i),a=s.parent.inlineContent?s.depth?e.doc.resolve(t>0?s.after():s.before()):null:s;return a&&r.Selection.findFrom(a,t)}function se(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function ae(e,t,n){var o=e.state.selection;if(o instanceof r.TextSelection){if(!o.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){var i=ie(e.state,t);return!!(i&&i instanceof r.NodeSelection)&&se(e,i)}var a,c=o.$head,u=c.textOffset?null:t<0?c.nodeBefore:c.nodeAfter;if(!u||u.isText)return!1;var l=t<0?c.pos-u.nodeSize:c.pos;return!!(u.isAtom||(a=e.docView.descAt(l))&&!a.contentDOM)&&(r.NodeSelection.isSelectable(u)?se(e,new r.NodeSelection(t<0?e.state.doc.resolve(c.pos-u.nodeSize):c)):!!s.webkit&&se(e,new r.TextSelection(e.state.doc.resolve(t<0?l:l+u.nodeSize))))}if(o instanceof r.NodeSelection&&o.node.isInline)return se(e,new r.TextSelection(t>0?o.$to:o.$from));var p=ie(e.state,t);return!!p&&se(e,p)}function ce(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function ue(e){var t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function le(e){var t=e.root.getSelection(),n=t.focusNode,r=t.focusOffset;if(n){var o,i,a=!1;for(s.gecko&&1==n.nodeType&&r<ce(n)&&ue(n.childNodes[r])&&(a=!0);;)if(r>0){if(1!=n.nodeType)break;var c=n.childNodes[r-1];if(ue(c))o=n,i=--r;else{if(3!=c.nodeType)break;r=(n=c).nodeValue.length}}else{if(fe(n))break;for(var u=n.previousSibling;u&&ue(u);)o=n.parentNode,i=f(u),u=u.previousSibling;if(u)r=ce(n=u);else{if((n=n.parentNode)==e.dom)break;r=0}}a?he(e,t,n,r):o&&he(e,t,o,i)}}function pe(e){var t=e.root.getSelection(),n=t.focusNode,r=t.focusOffset;if(n){for(var o,i,s=ce(n);;)if(r<s){if(1!=n.nodeType)break;if(!ue(n.childNodes[r]))break;o=n,i=++r}else{if(fe(n))break;for(var a=n.nextSibling;a&&ue(a);)o=a.parentNode,i=f(a)+1,a=a.nextSibling;if(a)r=0,s=ce(n=a);else{if((n=n.parentNode)==e.dom)break;r=s=0}}o&&he(e,t,o,i)}}function fe(e){var t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function he(e,t,n,r){if(w(t)){var o=document.createRange();o.setEnd(n,r),o.setStart(n,r),t.removeAllRanges(),t.addRange(o)}else t.extend&&t.extend(n,r);e.domObserver.setCurSelection()}function de(e,t,n){var o=e.state.selection;if(o instanceof r.TextSelection&&!o.empty||n.indexOf("s")>-1)return!1;var i=o.$from,s=o.$to;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){var a=ie(e.state,t);if(a&&a instanceof r.NodeSelection)return se(e,a)}if(!i.parent.inlineContent){var c=r.Selection.findFrom(t<0?i:s,t);return!c||se(e,c)}return!1}function me(e,t){if(!(e.state.selection instanceof r.TextSelection))return!0;var n=e.state.selection,o=n.$head,i=n.$anchor,s=n.empty;if(!o.sameParent(i))return!0;if(!s)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;var a=!o.textOffset&&(t<0?o.nodeBefore:o.nodeAfter);if(a&&!a.isText){var c=e.state.tr;return t<0?c.delete(o.pos-a.nodeSize,o.pos):c.delete(o.pos,o.pos+a.nodeSize),e.dispatch(c),!0}return!1}function ve(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function ge(e,t){var n=t.keyCode,r=function(e){var t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}(t);return 8==n||s.mac&&72==n&&"c"==r?me(e,-1)||le(e):46==n||s.mac&&68==n&&"c"==r?me(e,1)||pe(e):13==n||27==n||(37==n?ae(e,-1,r)||le(e):39==n?ae(e,1,r)||pe(e):38==n?de(e,-1,r)||le(e):40==n?function(e){if(s.chrome&&!(e.state.selection.$head.parentOffset>0)){var t=e.root.getSelection(),n=t.focusNode,r=t.focusOffset;if(n&&1==n.nodeType&&0==r&&n.firstChild&&"false"==n.firstChild.contentEditable){var o=n.firstChild;ve(e,o,!0),setTimeout((function(){return ve(e,o,!1)}),20)}}}(e)||de(e,1,r)||pe(e):r==(s.mac?"m":"c")&&(66==n||73==n||89==n||90==n))}function ye(e,t,n){var o=e.state.selection;if(ke(e,o),e.editable&&!e.hasFocus()){if(!t)return;s.gecko&&s.gecko_version<=55&&(e.domObserver.disconnectSelection(),e.dom.focus(),e.domObserver.connectSelection())}else if(!(e.editable||Ce(e)&&document.activeElement.contains(e.dom)||t))return;if(e.domObserver.disconnectSelection(),e.cursorWrapper)!function(e){var t=e.root.getSelection(),n=document.createRange(),r=e.cursorWrapper.dom,o="IMG"==r.nodeName;o?n.setEnd(r.parentNode,f(r)+1):n.setEnd(r,0);n.collapse(!1),t.removeAllRanges(),t.addRange(n),!o&&!e.state.selection.visible&&s.ie&&s.ie_version<=11&&(r.disabled=!0,r.disabled=!1)}(e);else{var i,a,c=o.anchor,u=o.head;!be||o instanceof r.TextSelection||(o.$from.parent.inlineContent||(i=we(e,o.from)),o.empty||o.$from.parent.inlineContent||(a=we(e,o.to))),e.docView.setSelection(c,u,e.root,n),be&&(i&&(i.contentEditable="false"),a&&(a.contentEditable="false")),o.visible?e.dom.classList.remove("ProseMirror-hideselection"):c!=u&&(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(e){var t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.hideSelectionGuard);var n=e.root.getSelection(),r=n.anchorNode,o=n.anchorOffset;t.addEventListener("selectionchange",e.hideSelectionGuard=function(){n.anchorNode==r&&n.anchorOffset==o||(t.removeEventListener("selectionchange",e.hideSelectionGuard),e.dom.classList.remove("ProseMirror-hideselection"))})}(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}ne.prototype.getPreMatch=function(e){return e>=this.preMatchOffset?this.preMatched[e-this.preMatchOffset]:null},ne.prototype.destroyBetween=function(e,t){if(e!=t){for(var n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}},ne.prototype.destroyRest=function(){this.destroyBetween(this.index,this.top.children.length)},ne.prototype.syncToMarks=function(e,t,n){for(var r=0,o=this.stack.length>>1,i=Math.min(o,e.length);r<i&&(r==o-1?this.top:this.stack[r+1<<1]).matchesMark(e[r])&&!1!==e[r].type.spec.spanning;)r++;for(;r<o;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);for(var s=-1,a=this.index;a<Math.min(this.index+3,this.top.children.length);a++)if(this.top.children[a].matchesMark(e[o])){s=a;break}if(s>-1)s>this.index&&(this.changed=!0,this.destroyBetween(this.index,s)),this.top=this.top.children[this.index];else{var c=q.create(this.top,e[o],t,n);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,o++}},ne.prototype.findNodeMatch=function(e,t,n,r){var o=-1,i=r<0?void 0:this.getPreMatch(r),s=this.top.children;if(i&&i.matchesNode(e,t,n))o=s.indexOf(i);else for(var a=this.index,c=Math.min(s.length,a+5);a<c;a++){var u=s[a];if(u.matchesNode(e,t,n)&&this.preMatched.indexOf(u)<0){o=a;break}}return!(o<0)&&(this.destroyBetween(this.index,o),this.index++,!0)},ne.prototype.updateNextNode=function(e,t,n,r,o){if(this.index==this.top.children.length)return!1;var i=this.top.children[this.index];if(i instanceof V){var s=this.preMatched.indexOf(i);if(s>-1&&s+this.preMatchOffset!=o)return!1;var a=i.dom;if(!(this.lock&&(a==this.lock||1==a.nodeType&&a.contains(this.lock.parentNode))&&!(e.isText&&i.node&&i.node.isText&&i.nodeDOM.nodeValue==e.text&&3!=i.dirty&&ee(t,i.outerDeco)))&&i.update(e,t,n,r))return i.dom!=a&&(this.changed=!0),this.index++,!0}return!1},ne.prototype.addNode=function(e,t,n,r,o){this.top.children.splice(this.index++,0,V.create(this.top,e,t,n,r,o)),this.changed=!0},ne.prototype.placeWidget=function(e,t,n){if(this.index<this.top.children.length&&this.top.children[this.index].matchesWidget(e))this.index++;else{var r=new L(this.top,e,t,n);this.top.children.splice(this.index++,0,r),this.changed=!0}},ne.prototype.addTextblockHacks=function(){for(var e=this.top.children[this.index-1];e instanceof q;)e=e.children[e.children.length-1];if(!e||!(e instanceof U)||/\n$/.test(e.node.text))if(this.index<this.top.children.length&&this.top.children[this.index].matchesHack())this.index++;else{var t=document.createElement("br");this.top.children.splice(this.index++,0,new W(this.top,$,t,null)),this.changed=!0}};var be=s.safari||s.chrome&&s.chrome_version<63;function we(e,t){var n=e.docView.domFromPos(t),r=n.node,o=n.offset,i=o<r.childNodes.length?r.childNodes[o]:null,s=o?r.childNodes[o-1]:null;if(!(i&&"false"!=i.contentEditable||s&&"false"!=s.contentEditable)){if(i)return i.contentEditable="true",i;if(s)return s.contentEditable="true",s}}function ke(e,t){if(t instanceof r.NodeSelection){var n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(xe(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else xe(e)}function xe(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=null)}function _e(e,t,n,o){return e.someProp("createSelectionBetween",(function(r){return r(e,t,n)}))||r.TextSelection.between(t,n,o)}function Ce(e){var t=e.root.getSelection();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(e){return!1}}function Se(e,t){return function(n){var r=n.pmViewDesc;if(r)return r.parseRule();if("BR"==n.nodeName&&n.parentNode){if(s.safari&&/^(ul|ol)$/i.test(n.parentNode.nodeName))return e.matchTag(document.createElement("li"),t);if(n.parentNode.lastChild==n||s.safari&&/^(tr|table)$/i.test(n.parentNode.nodeName))return{ignore:!0}}else if("IMG"==n.nodeName&&n.getAttribute("mark-placeholder"))return{ignore:!0}}}function Oe(e,t,n,i){if(t<0){var a=e.lastSelectionTime>Date.now()-50?e.lastSelectionOrigin:null,c=function(e,t){var n,o,i=e.root.getSelection(),s=e.state.doc,a=e.docView.nearestDesc(i.focusNode),c=a&&0==a.size,u=e.docView.posFromDOM(i.focusNode,i.focusOffset),l=s.resolve(u);if(w(i)){for(n=l;a&&!a.node;)a=a.parent;if(a&&a.node.isAtom&&r.NodeSelection.isSelectable(a.node)&&a.parent){var p=a.posBefore;o=new r.NodeSelection(u==p?l:s.resolve(p))}}else n=s.resolve(e.docView.posFromDOM(i.anchorNode,i.anchorOffset));return o||(o=_e(e,n,l,"pointer"==t||e.state.selection.head<l.pos&&!c?1:-1)),o}(e,a);if(!e.state.selection.eq(c)){var u=e.state.tr.setSelection(c);"pointer"==a?u.setMeta("pointer",!0):"key"==a&&u.scrollIntoView(),e.dispatch(u)}}else{var l=e.state.doc.resolve(t),p=l.sharedDepth(n);t=l.before(p+1),n=e.state.doc.resolve(n).after(p+1);var f,h,d=e.state.selection,m=function(e,t,n){var r=e.docView.parseRange(t,n),i=r.node,a=r.fromOffset,c=r.toOffset,u=r.from,l=r.to,p=e.root.getSelection(),f=null,h=p.anchorNode;if(h&&e.dom.contains(1==h.nodeType?h:h.parentNode)&&(f=[{node:h,offset:p.anchorOffset}],w(p)||f.push({node:p.focusNode,offset:p.focusOffset})),s.chrome&&8===e.lastKeyCode)for(var d=c;d>a;d--){var m=i.childNodes[d-1],v=m.pmViewDesc;if("BR"==m.nodeType&&!v){c=d;break}if(!v||v.size)break}var g=e.state.doc,y=e.someProp("domParser")||o.DOMParser.fromSchema(e.state.schema),b=g.resolve(u),k=null,x=y.parse(i,{topNode:b.parent,topMatch:b.parent.contentMatchAt(b.index()),topOpen:!0,from:a,to:c,preserveWhitespace:!b.parent.type.spec.code||"full",editableContent:!0,findPositions:f,ruleFromNode:Se(y,b),context:b});if(f&&null!=f[0].pos){var _=f[0].pos,C=f[1]&&f[1].pos;null==C&&(C=_),k={anchor:_+u,head:C+u}}return{doc:x,sel:k,from:u,to:l}}(e,t,n),v=e.state.doc,g=v.slice(m.from,m.to);8===e.lastKeyCode&&Date.now()-100<e.lastKeyCodeTime?(f=e.state.selection.to,h="end"):(f=e.state.selection.from,h="start"),e.lastKeyCode=null;var y=function(e,t,n,r,o){var i=e.findDiffStart(t,n);if(null==i)return null;var s=e.findDiffEnd(t,n+e.size,n+t.size),a=s.a,c=s.b;if("end"==o){var u=Math.max(0,i-Math.min(a,c));r-=a+u-i}if(a<i&&e.size<t.size){c=(i-=r<=i&&r>=a?i-r:0)+(c-a),a=i}else if(c<i){a=(i-=r<=i&&r>=c?i-r:0)+(a-c),c=i}return{start:i,endA:a,endB:c}}(g.content,m.doc.content,m.from,f,h);if(!y){if(!(i&&d instanceof r.TextSelection&&!d.empty&&d.$head.sameParent(d.$anchor))||e.composing||m.sel&&m.sel.anchor!=m.sel.head){if(m.sel){var b=Ae(e,e.state.doc,m.sel);b&&!b.eq(e.state.selection)&&e.dispatch(e.state.tr.setSelection(b))}return}y={start:d.from,endA:d.to,endB:d.to}}e.domChangeCount++,e.state.selection.from<e.state.selection.to&&y.start==y.endB&&e.state.selection instanceof r.TextSelection&&(y.start>e.state.selection.from&&y.start<=e.state.selection.from+2?y.start=e.state.selection.from:y.endA<e.state.selection.to&&y.endA>=e.state.selection.to-2&&(y.endB+=e.state.selection.to-y.endA,y.endA=e.state.selection.to)),s.ie&&s.ie_version<=11&&y.endB==y.start+1&&y.endA==y.start&&y.start>m.from&&"  "==m.doc.textBetween(y.start-m.from-1,y.start-m.from+1)&&(y.start--,y.endA--,y.endB--);var x,_=m.doc.resolveNoCache(y.start-m.from),C=m.doc.resolveNoCache(y.endB-m.from);if(!(!_.sameParent(C)&&_.pos<m.doc.content.size&&(x=r.Selection.findFrom(m.doc.resolve(_.pos+1),1,!0))&&x.head==C.pos&&e.someProp("handleKeyDown",(function(t){return t(e,k(13,"Enter"))}))))if(e.state.selection.anchor>y.start&&function(e,t,n,r,o){if(!r.parent.isTextblock||n-t<=o.pos-r.pos||Ee(r,!0,!1)<o.pos)return!1;var i=e.resolve(t);if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;var s=e.resolve(Ee(i,!0,!0));if(!s.parent.isTextblock||s.pos>n||Ee(s,!0,!1)<n)return!1;return r.parent.content.cut(r.parentOffset).eq(s.parent.content)}(v,y.start,y.endA,_,C)&&e.someProp("handleKeyDown",(function(t){return t(e,k(8,"Backspace"))})))s.android&&s.chrome&&e.domObserver.suppressSelectionUpdates();else{var S,O,A,E,M=y.start,T=y.endA;if(_.sameParent(C)&&_.parent.inlineContent)if(_.pos==C.pos)s.ie&&s.ie_version<=11&&0==_.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout((function(){return ye(e)}),20)),S=e.state.tr.delete(M,T),O=v.resolve(y.start).marksAcross(v.resolve(y.endA));else if(y.endA==y.endB&&(E=v.resolve(y.start))&&(A=function(e,t){for(var n,r,i,s=e.firstChild.marks,a=t.firstChild.marks,c=s,u=a,l=0;l<a.length;l++)c=a[l].removeFromSet(c);for(var p=0;p<s.length;p++)u=s[p].removeFromSet(u);if(1==c.length&&0==u.length)r=c[0],n="add",i=function(e){return e.mark(r.addToSet(e.marks))};else{if(0!=c.length||1!=u.length)return null;r=u[0],n="remove",i=function(e){return e.mark(r.removeFromSet(e.marks))}}for(var f=[],h=0;h<t.childCount;h++)f.push(i(t.child(h)));if(o.Fragment.from(f).eq(e))return{mark:r,type:n}}(_.parent.content.cut(_.parentOffset,C.parentOffset),E.parent.content.cut(E.parentOffset,y.endA-E.start()))))S=e.state.tr,"add"==A.type?S.addMark(M,T,A.mark):S.removeMark(M,T,A.mark);else if(_.parent.child(_.index()).isText&&_.index()==C.index()-(C.textOffset?0:1)){var D=_.parent.textBetween(_.parentOffset,C.parentOffset);if(e.someProp("handleTextInput",(function(t){return t(e,M,T,D)})))return;S=e.state.tr.insertText(D,M,T)}if(S||(S=e.state.tr.replace(M,T,m.doc.slice(y.start-m.from,y.endB-m.from))),m.sel){var N=Ae(e,S.doc,m.sel);N&&S.setSelection(N)}O&&S.ensureMarks(O),e.dispatch(S.scrollIntoView())}}}function Ae(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:_e(e,t.resolve(n.anchor),t.resolve(n.head))}function Ee(e,t,n){for(var r=e.depth,o=t?e.end():e.pos;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n)for(var i=e.node(r).maybeChild(e.indexAfter(r));i&&!i.isLeaf;)i=i.firstChild,o++;return o}function Me(e,t){for(var n=[],r=t.content,i=t.openStart,s=t.openEnd;i>1&&s>1&&1==r.childCount&&1==r.firstChild.childCount;){i--,s--;var a=r.firstChild;n.push(a.type.name,a.type.hasRequiredAttrs()?a.attrs:null),r=a.content}var c=e.someProp("clipboardSerializer")||o.DOMSerializer.fromSchema(e.state.schema),u=Pe(),l=u.createElement("div");l.appendChild(c.serializeFragment(r,{document:u}));for(var p,f=l.firstChild;f&&1==f.nodeType&&(p=Re[f.nodeName.toLowerCase()]);){for(var h=p.length-1;h>=0;h--){for(var d=u.createElement(p[h]);l.firstChild;)d.appendChild(l.firstChild);l.appendChild(d)}f=l.firstChild}return f&&1==f.nodeType&&f.setAttribute("data-pm-slice",i+" "+s+" "+JSON.stringify(n)),{dom:l,text:e.someProp("clipboardTextSerializer",(function(e){return e(t)}))||t.content.textBetween(0,t.content.size,"\n\n")}}function Te(e,t,n,r,i){var s,a,c=i.parent.type.spec.code;if(!n&&!t)return null;var u=t&&(r||c||!n);if(u){if(e.someProp("transformPastedText",(function(e){t=e(t)})),c)return new o.Slice(o.Fragment.from(e.state.schema.text(t)),0,0);var l=e.someProp("clipboardTextParser",(function(e){return e(t,i)}));l?a=l:(s=document.createElement("div"),t.trim().split(/(?:\r\n?|\n)+/).forEach((function(e){s.appendChild(document.createElement("p")).textContent=e})))}else e.someProp("transformPastedHTML",(function(e){n=e(n)})),s=function(e){var t=/(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));var n,r=Pe().createElement("div"),o=/(?:<meta [^>]*>)*<([a-z][^>\s]+)/i.exec(e),i=0;(n=o&&Re[o[1].toLowerCase()])&&(e=n.map((function(e){return"<"+e+">"})).join("")+e+n.map((function(e){return"</"+e+">"})).reverse().join(""),i=n.length);r.innerHTML=e;for(var s=0;s<i;s++)r=r.firstChild;return r}(n);var p=s&&s.querySelector("[data-pm-slice]"),f=p&&/^(\d+) (\d+) (.*)/.exec(p.getAttribute("data-pm-slice"));if(!a){var h=e.someProp("clipboardParser")||e.someProp("domParser")||o.DOMParser.fromSchema(e.state.schema);a=h.parseSlice(s,{preserveWhitespace:!(!u&&!f),context:i})}return a=f?function(e,t){if(!e.size)return e;var n,r=e.content.firstChild.type.schema;try{n=JSON.parse(t)}catch(t){return e}for(var i=e.content,s=e.openStart,a=e.openEnd,c=n.length-2;c>=0;c-=2){var u=r.nodes[n[c]];if(!u||u.hasRequiredAttrs())break;i=o.Fragment.from(u.create(n[c+1],i)),s++,a++}return new o.Slice(i,s,a)}(function(e,t,n){t<e.openStart&&(e=new o.Slice(Ne(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd));n<e.openEnd&&(e=new o.Slice(Ne(e.content,1,n,e.openEnd,0,0),e.openStart,n));return e}(a,+f[1],+f[2]),f[3]):o.Slice.maxOpen(function(e,t){if(e.childCount<2)return e;for(var n=function(n){var r=t.node(n).contentMatchAt(t.index(n)),i=void 0,s=[];if(e.forEach((function(e){if(s){var t,n=r.findWrapping(e.type);if(!n)return s=null;if(t=s.length&&i.length&&function e(t,n,r,i,s){if(s<t.length&&s<n.length&&t[s]==n[s]){var a=e(t,n,r,i.lastChild,s+1);if(a)return i.copy(i.content.replaceChild(i.childCount-1,a));if(i.contentMatchAt(i.childCount).matchType(s==t.length-1?r.type:t[s+1]))return i.copy(i.content.append(o.Fragment.from(De(r,t,s+1))))}}(n,i,e,s[s.length-1],0))s[s.length-1]=t;else{s.length&&(s[s.length-1]=function e(t,n){if(0==n)return t;var r=t.content.replaceChild(t.childCount-1,e(t.lastChild,n-1));var i=t.contentMatchAt(t.childCount).fillBefore(o.Fragment.empty,!0);return t.copy(r.append(i))}(s[s.length-1],i.length));var a=De(e,n);s.push(a),r=r.matchType(a.type,a.attrs),i=n}}})),s)return{v:o.Fragment.from(s)}},r=t.depth;r>=0;r--){var i=n(r);if(i)return i.v}return e}(a.content,i),!1),e.someProp("transformPasted",(function(e){a=e(a)})),a}function De(e,t,n){void 0===n&&(n=0);for(var r=t.length-1;r>=n;r--)e=t[r].create(null,o.Fragment.from(e));return e}function Ne(e,t,n,r,i,s){var a=t<0?e.firstChild:e.lastChild,c=a.content;return i<r-1&&(c=Ne(c,t,n,r,i+1,s)),i>=n&&(c=t<0?a.contentMatchAt(0).fillBefore(c,e.childCount>1||s<=i).append(c):c.append(a.contentMatchAt(a.childCount).fillBefore(o.Fragment.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,a.copy(c))}var Re={thead:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},Ie=null;function Pe(){return Ie||(Ie=document.implementation.createHTMLDocument("title"))}var je={childList:!0,characterData:!0,attributes:!0,subtree:!0,characterDataOldValue:!0},ze=s.ie&&s.ie_version<=11,Fe=function(){this.anchorNode=this.anchorOffset=this.focusNode=this.focusOffset=null};Fe.prototype.set=function(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset},Fe.prototype.eq=function(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset};var $e=function(e,t){var n=this;this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=!1,this.observer=window.MutationObserver&&new window.MutationObserver((function(e){for(var t=0;t<e.length;t++)n.queue.push(e[t]);s.ie&&s.ie_version<=11&&e.some((function(e){return"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length}))?n.flushSoon():n.flush()})),this.currentSelection=new Fe,ze&&(this.onCharData=function(e){n.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),n.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.suppressingSelectionUpdates=!1};$e.prototype.flushSoon=function(){var e=this;this.flushingSoon||(this.flushingSoon=!0,window.setTimeout((function(){e.flushingSoon=!1,e.flush()}),20))},$e.prototype.start=function(){this.observer&&this.observer.observe(this.view.dom,je),ze&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()},$e.prototype.stop=function(){var e=this;if(this.observer){var t=this.observer.takeRecords();if(t.length){for(var n=0;n<t.length;n++)e.queue.push(t[n]);window.setTimeout((function(){return e.flush()}),20)}this.observer.disconnect()}ze&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()},$e.prototype.connectSelection=function(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)},$e.prototype.disconnectSelection=function(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)},$e.prototype.suppressSelectionUpdates=function(){var e=this;this.suppressingSelectionUpdates=!0,setTimeout((function(){return e.suppressingSelectionUpdates=!1}),50)},$e.prototype.onSelectionChange=function(){if((!(e=this.view).editable||e.root.activeElement==e.dom)&&Ce(e)){var e;if(this.suppressingSelectionUpdates)return ye(this.view);if(s.ie&&s.ie_version<=11&&!this.view.state.selection.empty){var t=this.view.root.getSelection();if(t.focusNode&&m(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}},$e.prototype.setCurSelection=function(){this.currentSelection.set(this.view.root.getSelection())},$e.prototype.ignoreSelectionChange=function(e){if(0==e.rangeCount)return!0;var t=e.getRangeAt(0).commonAncestorContainer,n=this.view.docView.nearestDesc(t);return n&&n.ignoreMutation({type:"selection",target:3==t.nodeType?t.parentNode:t})},$e.prototype.flush=function(){if(this.view.docView&&!this.flushingSoon){var e=this.observer?this.observer.takeRecords():[];this.queue.length&&(e=this.queue.concat(e),this.queue.length=0);var t=this.view.root.getSelection(),n=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(t)&&Ce(this.view)&&!this.ignoreSelectionChange(t),r=-1,o=-1,i=!1;if(this.view.editable)for(var s=0;s<e.length;s++){var a=this.registerMutation(e[s]);a&&(r=r<0?a.from:Math.min(a.from,r),o=o<0?a.to:Math.max(a.to,o),a.typeOver&&!this.view.composing&&(i=!0))}(r>-1||n)&&(r>-1&&this.view.docView.markDirty(r,o),this.handleDOMChange(r,o,i),this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(t)||ye(this.view))}},$e.prototype.registerMutation=function(e){var t=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(t==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style")))return null;if(!t||t.ignoreMutation(e))return null;if("childList"==e.type){var n=e.previousSibling,r=e.nextSibling;if(s.ie&&s.ie_version<=11&&e.addedNodes.length)for(var o=0;o<e.addedNodes.length;o++){var i=e.addedNodes[o],a=i.previousSibling,c=i.nextSibling;(!a||Array.prototype.indexOf.call(e.addedNodes,a)<0)&&(n=a),(!c||Array.prototype.indexOf.call(e.addedNodes,c)<0)&&(r=c)}var u=n&&n.parentNode==e.target?f(n)+1:0,l=t.localPosFromDOM(e.target,u,-1),p=r&&r.parentNode==e.target?f(r):e.target.childNodes.length;return{from:l,to:t.localPosFromDOM(e.target,p,1)}}return"attributes"==e.type?{from:t.posAtStart-t.border,to:t.posAtEnd+t.border}:{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}};var Le={},Be={};function qe(e,t){e.lastSelectionOrigin=t,e.lastSelectionTime=Date.now()}function Ve(e){e.someProp("handleDOMEvents",(function(t){for(var n in t)e.eventHandlers[n]||e.dom.addEventListener(n,e.eventHandlers[n]=function(t){return He(e,t)})}))}function He(e,t){return e.someProp("handleDOMEvents",(function(n){var r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)}))}function Ue(e){return{left:e.clientX,top:e.clientY}}function We(e,t,n,r,o){if(-1==r)return!1;for(var i=e.state.doc.resolve(r),s=function(r){if(e.someProp(t,(function(t){return r>i.depth?t(e,n,i.nodeAfter,i.before(r),o,!0):t(e,n,i.node(r),i.before(r),o,!1)})))return{v:!0}},a=i.depth+1;a>0;a--){var c=s(a);if(c)return c.v}return!1}function Je(e,t,n){e.focused||e.focus();var r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function Ke(e,t,n,o,i){return We(e,"handleClickOn",t,n,o)||e.someProp("handleClick",(function(n){return n(e,t,o)}))||(i?function(e,t){if(-1==t)return!1;var n,o,i=e.state.selection;i instanceof r.NodeSelection&&(n=i.node);for(var s=e.state.doc.resolve(t),a=s.depth+1;a>0;a--){var c=a>s.depth?s.nodeAfter:s.node(a);if(r.NodeSelection.isSelectable(c)){o=n&&i.$from.depth>0&&a>=i.$from.depth&&s.before(i.$from.depth+1)==i.$from.pos?s.before(i.$from.depth):s.before(a);break}}return null!=o&&(Je(e,r.NodeSelection.create(e.state.doc,o),"pointer"),!0)}(e,n):function(e,t){if(-1==t)return!1;var n=e.state.doc.resolve(t),o=n.nodeAfter;return!!(o&&o.isAtom&&r.NodeSelection.isSelectable(o))&&(Je(e,new r.NodeSelection(n),"pointer"),!0)}(e,n))}function Ge(e,t,n,r){return We(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",(function(n){return n(e,t,r)}))}function Ze(e,t,n,o){return We(e,"handleTripleClickOn",t,n,o)||e.someProp("handleTripleClick",(function(n){return n(e,t,o)}))||function(e,t){var n=e.state.doc;if(-1==t)return!!n.inlineContent&&(Je(e,r.TextSelection.create(n,0,n.content.size),"pointer"),!0);for(var o=n.resolve(t),i=o.depth+1;i>0;i--){var s=i>o.depth?o.nodeAfter:o.node(i),a=o.before(i);if(s.inlineContent)Je(e,r.TextSelection.create(n,a+1,a+1+s.content.size),"pointer");else{if(!r.NodeSelection.isSelectable(s))continue;Je(e,r.NodeSelection.create(n,a),"pointer")}return!0}}(e,n)}function Xe(e){return rt(e)}Be.keydown=function(e,t){e.shiftKey=16==t.keyCode||t.shiftKey,et(e,t)||(e.lastKeyCode=t.keyCode,e.lastKeyCodeTime=Date.now(),e.someProp("handleKeyDown",(function(n){return n(e,t)}))||ge(e,t)?t.preventDefault():qe(e,"key"))},Be.keyup=function(e,t){16==t.keyCode&&(e.shiftKey=!1)},Be.keypress=function(e,t){if(!(et(e,t)||!t.charCode||t.ctrlKey&&!t.altKey||s.mac&&t.metaKey))if(e.someProp("handleKeyPress",(function(n){return n(e,t)})))t.preventDefault();else{var n=e.state.selection;if(!(n instanceof r.TextSelection&&n.$from.sameParent(n.$to))){var o=String.fromCharCode(t.charCode);e.someProp("handleTextInput",(function(t){return t(e,n.$from.pos,n.$to.pos,o)}))||e.dispatch(e.state.tr.insertText(o).scrollIntoView()),t.preventDefault()}}};var Ye=s.mac?"metaKey":"ctrlKey";Le.mousedown=function(e,t){e.shiftKey=t.shiftKey;var n=Xe(e),r=Date.now(),o="singleClick";r-e.lastClick.time<500&&function(e,t){var n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}(t,e.lastClick)&&!t[Ye]&&("singleClick"==e.lastClick.type?o="doubleClick":"doubleClick"==e.lastClick.type&&(o="tripleClick")),e.lastClick={time:r,x:t.clientX,y:t.clientY,type:o};var i=e.posAtCoords(Ue(t));i&&("singleClick"==o?e.mouseDown=new Qe(e,i,t,n):("doubleClick"==o?Ge:Ze)(e,i.pos,i.inside,t)?t.preventDefault():qe(e,"pointer"))};var Qe=function(e,t,n,o){var i,a,c=this;if(this.view=e,this.startDoc=e.state.doc,this.pos=t,this.event=n,this.flushed=o,this.selectNode=n[Ye],this.allowDefault=n.shiftKey,t.inside>-1)i=e.state.doc.nodeAt(t.inside),a=t.inside;else{var u=e.state.doc.resolve(t.pos);i=u.parent,a=u.depth?u.before():0}this.mightDrag=null;var l=o?null:n.target,p=l?e.docView.nearestDesc(l,!0):null;this.target=p?p.dom:null,(i.type.spec.draggable&&!1!==i.type.spec.selectable||e.state.selection instanceof r.NodeSelection&&a==e.state.selection.from)&&(this.mightDrag={node:i,pos:a,addAttr:this.target&&!this.target.draggable,setUneditable:this.target&&s.gecko&&!this.target.hasAttribute("contentEditable")}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((function(){return c.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),qe(e,"pointer")};function et(e,t){return!!e.composing||!!(s.safari&&Math.abs(t.timeStamp-e.compositionEndedAt)<500)&&(e.compositionEndedAt=-2e8,!0)}Qe.prototype.done=function(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!1),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.view.mouseDown=null},Qe.prototype.up=function(e){if(this.done(),this.view.dom.contains(3==e.target.nodeType?e.target.parentNode:e.target)){var t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Ue(e))),this.allowDefault||!t?qe(this.view,"pointer"):Ke(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():!this.flushed&&(!s.chrome||this.view.state.selection instanceof r.TextSelection||t.pos!=this.view.state.selection.from&&t.pos!=this.view.state.selection.to)?qe(this.view,"pointer"):(Je(this.view,r.Selection.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault())}},Qe.prototype.move=function(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0),qe(this.view,"pointer")},Le.touchdown=function(e){Xe(e),qe(e,"pointer")},Le.contextmenu=function(e){return Xe(e)};var tt=s.android?5e3:-1;function nt(e,t){clearTimeout(e.composingTimeout),t>-1&&(e.composingTimeout=setTimeout((function(){return rt(e)}),t))}function rt(e,t){for(e.composing=!1;e.compositionNodes.length>0;)e.compositionNodes.pop().markParentsDirty();return!(!t&&!e.docView.dirty)&&(e.updateState(e.state),!0)}Be.compositionstart=Be.compositionupdate=function(e){if(!e.composing){e.domObserver.flush();var t=e.state,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((function(e){return!1===e.type.spec.inclusive}))))e.markCursor=e.state.storedMarks||n.marks(),rt(e,!0),e.markCursor=null;else if(rt(e),s.gecko&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length)for(var r=e.root.getSelection(),o=r.focusNode,i=r.focusOffset;o&&1==o.nodeType&&0!=i;){var a=i<0?o.lastChild:o.childNodes[i-1];if(3==a.nodeType){r.collapse(a,a.nodeValue.length);break}o=a,i=-1}e.composing=!0}nt(e,tt)},Be.compositionend=function(e,t){e.composing&&(e.composing=!1,e.compositionEndedAt=t.timeStamp,nt(e,20))};var ot=s.ie&&s.ie_version<15||s.ios&&s.webkit_version<604;function it(e,t,n,r){var i=Te(e,t,n,e.shiftKey,e.state.selection.$from);if(e.someProp("handlePaste",(function(t){return t(e,r,i||o.Slice.empty)}))||!i)return!0;var s=function(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}(i),a=s?e.state.tr.replaceSelectionWith(s,e.shiftKey):e.state.tr.replaceSelection(i);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}Le.copy=Be.cut=function(e,t){var n=e.state.selection,r="cut"==t.type;if(!n.empty){var o=ot?null:t.clipboardData,i=Me(e,n.content()),s=i.dom,a=i.text;o?(t.preventDefault(),o.clearData(),o.setData("text/html",s.innerHTML),o.setData("text/plain",a)):function(e,t){var n=e.dom.ownerDocument,r=n.body.appendChild(n.createElement("div"));r.appendChild(t),r.style.cssText="position: fixed; left: -10000px; top: 10px";var o=getSelection(),i=n.createRange();i.selectNodeContents(t),e.dom.blur(),o.removeAllRanges(),o.addRange(i),setTimeout((function(){n.body.removeChild(r),e.focus()}),50)}(e,s),r&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}},Be.paste=function(e,t){var n=ot?null:t.clipboardData;n&&(it(e,n.getData("text/plain"),n.getData("text/html"),t)||n.files.length>0)?t.preventDefault():function(e,t){var n=e.dom.ownerDocument,r=e.shiftKey||e.state.selection.$from.parent.type.spec.code,o=n.body.appendChild(n.createElement(r?"textarea":"div"));r||(o.contentEditable="true"),o.style.cssText="position: fixed; left: -10000px; top: 10px",o.focus(),setTimeout((function(){e.focus(),n.body.removeChild(o),r?it(e,o.value,null,t):it(e,o.textContent,o.innerHTML,t)}),50)}(e,t)};var st=function(e,t){this.slice=e,this.move=t},at=s.mac?"altKey":"ctrlKey";for(var ct in Le.dragstart=function(e,t){var n=e.mouseDown;if(n&&n.done(),t.dataTransfer){var o=e.state.selection,i=o.empty?null:e.posAtCoords(Ue(t));if(i&&i.pos>=o.from&&i.pos<=(o instanceof r.NodeSelection?o.to-1:o.to));else if(n&&n.mightDrag)e.dispatch(e.state.tr.setSelection(r.NodeSelection.create(e.state.doc,n.mightDrag.pos)));else if(t.target&&1==t.target.nodeType){var s=e.docView.nearestDesc(t.target,!0);if(!s||!s.node.type.spec.draggable||s==e.docView)return;e.dispatch(e.state.tr.setSelection(r.NodeSelection.create(e.state.doc,s.posBefore)))}var a=e.state.selection.content(),c=Me(e,a),u=c.dom,l=c.text;t.dataTransfer.clearData(),t.dataTransfer.setData(ot?"Text":"text/html",u.innerHTML),ot||t.dataTransfer.setData("text/plain",l),e.dragging=new st(a,!t[at])}},Le.dragend=function(e){window.setTimeout((function(){return e.dragging=null}),50)},Be.dragover=Be.dragenter=function(e,t){return t.preventDefault()},Be.drop=function(e,t){var n=e.dragging;if(e.dragging=null,t.dataTransfer){var o=e.posAtCoords(Ue(t));if(o){var s=e.state.doc.resolve(o.pos);if(s){var a=n&&n.slice||Te(e,t.dataTransfer.getData(ot?"Text":"text/plain"),ot?null:t.dataTransfer.getData("text/html"),!1,s);if(a&&(t.preventDefault(),!e.someProp("handleDrop",(function(r){return r(e,t,a,n&&n.move)})))){var c=a?i.dropPoint(e.state.doc,s.pos,a):s.pos;null==c&&(c=s.pos);var u=e.state.tr;n&&n.move&&u.deleteSelection();var l=u.mapping.map(c),p=0==a.openStart&&0==a.openEnd&&1==a.content.childCount,f=u.doc;if(p?u.replaceRangeWith(l,l,a.content.firstChild):u.replaceRange(l,l,a),!u.doc.eq(f)){var h=u.doc.resolve(l);p&&r.NodeSelection.isSelectable(a.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(a.content.firstChild)?u.setSelection(new r.NodeSelection(h)):u.setSelection(_e(e,h,u.doc.resolve(u.mapping.map(c)))),e.focus(),e.dispatch(u.setMeta("uiEvent","drop"))}}}}}},Le.focus=function(e){e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0)},Le.blur=function(e){e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),e.focused=!1)},Le.beforeinput=function(e,t){if(s.chrome&&s.android&&"deleteContentBackward"==t.inputType){var n=e.domChangeCount;setTimeout((function(){if(e.domChangeCount==n&&(e.dom.blur(),e.focus(),!e.someProp("handleKeyDown",(function(t){return t(e,k(8,"Backspace"))})))){var t=e.state.selection.$cursor;t&&t.pos>0&&e.dispatch(e.state.tr.delete(t.pos-1,t.pos).scrollIntoView())}}),50)}},Be)Le[ct]=Be[ct];function ut(e,t){if(e==t)return!0;for(var n in e)if(e[n]!==t[n])return!1;for(var r in t)if(!(r in e))return!1;return!0}var lt=function(e,t){this.spec=t||vt,this.side=this.spec.side||0,this.toDOM=e};lt.prototype.map=function(e,t,n,r){var o=e.mapResult(t.from+r,this.side<0?-1:1),i=o.pos;return o.deleted?null:new ht(i-n,i-n,this)},lt.prototype.valid=function(){return!0},lt.prototype.eq=function(e){return this==e||e instanceof lt&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&ut(this.spec,e.spec))};var pt=function(e,t){this.spec=t||vt,this.attrs=e};pt.prototype.map=function(e,t,n,r){var o=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,i=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=i?null:new ht(o,i,this)},pt.prototype.valid=function(e,t){return t.from<t.to},pt.prototype.eq=function(e){return this==e||e instanceof pt&&ut(this.attrs,e.attrs)&&ut(this.spec,e.spec)},pt.is=function(e){return e.type instanceof pt};var ft=function(e,t){this.spec=t||vt,this.attrs=e};ft.prototype.map=function(e,t,n,r){var o=e.mapResult(t.from+r,1);if(o.deleted)return null;var i=e.mapResult(t.to+r,-1);return i.deleted||i.pos<=o.pos?null:new ht(o.pos-n,i.pos-n,this)},ft.prototype.valid=function(e,t){var n=e.content.findIndex(t.from),r=n.index,o=n.offset;return o==t.from&&o+e.child(r).nodeSize==t.to},ft.prototype.eq=function(e){return this==e||e instanceof ft&&ut(this.attrs,e.attrs)&&ut(this.spec,e.spec)};var ht=function(e,t,n){this.from=e,this.to=t,this.type=n},dt={spec:{}};ht.prototype.copy=function(e,t){return new ht(e,t,this.type)},ht.prototype.eq=function(e){return this.type.eq(e.type)&&this.from==e.from&&this.to==e.to},ht.prototype.map=function(e,t,n){return this.type.map(e,this,t,n)},ht.widget=function(e,t,n){return new ht(e,e,new lt(t,n))},ht.inline=function(e,t,n,r){return new ht(e,t,new pt(n,r))},ht.node=function(e,t,n,r){return new ht(e,t,new ft(n,r))},dt.spec.get=function(){return this.type.spec},Object.defineProperties(ht.prototype,dt);var mt=[],vt={},gt=function(e,t){this.local=e&&e.length?e:mt,this.children=t&&t.length?t:mt};gt.create=function(e,t){return t.length?_t(t,e,0,vt):yt},gt.prototype.find=function(e,t,n){var r=[];return this.findInner(null==e?0:e,null==t?1e9:t,r,0,n),r},gt.prototype.findInner=function(e,t,n,r,o){for(var i=0;i<this.local.length;i++){var s=this.local[i];s.from<=t&&s.to>=e&&(!o||o(s.spec))&&n.push(s.copy(s.from+r,s.to+r))}for(var a=0;a<this.children.length;a+=3)if(this.children[a]<t&&this.children[a+1]>e){var c=this.children[a]+1;this.children[a+2].findInner(e-c,t-c,n,r+c,o)}},gt.prototype.map=function(e,t,n){return this==yt||0==e.maps.length?this:this.mapInner(e,t,0,0,n||vt)},gt.prototype.mapInner=function(e,t,n,r,o){for(var i,s=0;s<this.local.length;s++){var a=this.local[s].map(e,n,r);a&&a.type.valid(t,a)?(i||(i=[])).push(a):o.onRemove&&o.onRemove(this.local[s].spec)}return this.children.length?function(e,t,n,r,o,i,s){for(var a=e.slice(),c=function(e,t,n,r){for(var s=0;s<a.length;s+=3){var c=a[s+1],u=void 0;-1==c||e>c+i||(t>=a[s]+i?a[s+1]=-1:(u=r-n-(t-e)+(i-o))&&(a[s]+=u,a[s+1]+=u))}},u=0;u<n.maps.length;u++)n.maps[u].forEach(c);for(var l=!1,p=0;p<a.length;p+=3)if(-1==a[p+1]){var f=n.map(a[p]+i),h=f-o;if(h<0||h>=r.content.size){l=!0;continue}var d=n.map(e[p+1]+i,-1)-o,m=r.content.findIndex(h),v=m.index,g=m.offset,y=r.maybeChild(v);if(y&&g==h&&g+y.nodeSize==d){var b=a[p+2].mapInner(n,y,f+1,a[p]+i+1,s);b!=yt?(a[p]=h,a[p+1]=d,a[p+2]=b):(a[p+1]=-2,l=!0)}else l=!0}if(l){var w=_t(function(e,t,n,r,o,i,s){function a(e,t){for(var i=0;i<e.local.length;i++){var c=e.local[i].map(r,o,t);c?n.push(c):s.onRemove&&s.onRemove(e.local[i].spec)}for(var u=0;u<e.children.length;u+=3)a(e.children[u+2],e.children[u]+t+1)}for(var c=0;c<e.length;c+=3)-1==e[c+1]&&a(e[c+2],t[c]+i+1);return n}(a,e,t||[],n,o,i,s),r,0,s);t=w.local;for(var k=0;k<a.length;k+=3)a[k+1]<0&&(a.splice(k,3),k-=3);for(var x=0,_=0;x<w.children.length;x+=3){for(var C=w.children[x];_<a.length&&a[_]<C;)_+=3;a.splice(_,0,w.children[x],w.children[x+1],w.children[x+2])}}return new gt(t&&t.sort(Ct),a)}(this.children,i,e,t,n,r,o):i?new gt(i.sort(Ct)):yt},gt.prototype.add=function(e,t){return t.length?this==yt?gt.create(e,t):this.addInner(e,t,0):this},gt.prototype.addInner=function(e,t,n){var r,o=this,i=0;e.forEach((function(e,s){var a,c=s+n;if(a=kt(t,e,c)){for(r||(r=o.children.slice());i<r.length&&r[i]<s;)i+=3;r[i]==s?r[i+2]=r[i+2].addInner(e,a,c+1):r.splice(i,0,s,s+e.nodeSize,_t(a,e,c+1,vt)),i+=3}}));var s=wt(i?xt(t):t,-n);return new gt(s.length?this.local.concat(s).sort(Ct):this.local,r||this.children)},gt.prototype.remove=function(e){return 0==e.length||this==yt?this:this.removeInner(e,0)},gt.prototype.removeInner=function(e,t){for(var n=this.children,r=this.local,o=0;o<n.length;o+=3){for(var i=void 0,s=n[o]+t,a=n[o+1]+t,c=0,u=void 0;c<e.length;c++)(u=e[c])&&u.from>s&&u.to<a&&(e[c]=null,(i||(i=[])).push(u));if(i){n==this.children&&(n=this.children.slice());var l=n[o+2].removeInner(i,s+1);l!=yt?n[o+2]=l:(n.splice(o,3),o-=3)}}if(r.length)for(var p=0,f=void 0;p<e.length;p++)if(f=e[p])for(var h=0;h<r.length;h++)r[h].type.eq(f.type)&&(r==this.local&&(r=this.local.slice()),r.splice(h--,1));return n==this.children&&r==this.local?this:r.length||n.length?new gt(r,n):yt},gt.prototype.forChild=function(e,t){var n,r;if(this==yt)return this;if(t.isLeaf)return gt.empty;for(var o=0;o<this.children.length;o+=3)if(this.children[o]>=e){this.children[o]==e&&(n=this.children[o+2]);break}for(var i=e+1,s=i+t.content.size,a=0;a<this.local.length;a++){var c=this.local[a];if(c.from<s&&c.to>i&&c.type instanceof pt){var u=Math.max(i,c.from)-i,l=Math.min(s,c.to)-i;u<l&&(r||(r=[])).push(c.copy(u,l))}}if(r){var p=new gt(r.sort(Ct));return n?new bt([p,n]):p}return n||yt},gt.prototype.eq=function(e){if(this==e)return!0;if(!(e instanceof gt)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(var t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(var n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0},gt.prototype.locals=function(e){return St(this.localsInner(e))},gt.prototype.localsInner=function(e){if(this==yt)return mt;if(e.inlineContent||!this.local.some(pt.is))return this.local;for(var t=[],n=0;n<this.local.length;n++)this.local[n].type instanceof pt||t.push(this.local[n]);return t};var yt=new gt;gt.empty=yt,gt.removeOverlap=St;var bt=function(e){this.members=e};function wt(e,t){if(!t||!e.length)return e;for(var n=[],r=0;r<e.length;r++){var o=e[r];n.push(new ht(o.from+t,o.to+t,o.type))}return n}function kt(e,t,n){if(t.isLeaf)return null;for(var r=n+t.nodeSize,o=null,i=0,s=void 0;i<e.length;i++)(s=e[i])&&s.from>n&&s.to<r&&((o||(o=[])).push(s),e[i]=null);return o}function xt(e){for(var t=[],n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function _t(e,t,n,r){var o=[],i=!1;t.forEach((function(t,s){var a=kt(e,t,s+n);if(a){i=!0;var c=_t(a,t,n+s+1,r);c!=yt&&o.push(s,s+t.nodeSize,c)}}));for(var s=wt(i?xt(e):e,-n).sort(Ct),a=0;a<s.length;a++)s[a].type.valid(t,s[a])||(r.onRemove&&r.onRemove(s[a].spec),s.splice(a--,1));return s.length||o.length?new gt(s,o):yt}function Ct(e,t){return e.from-t.from||e.to-t.to}function St(e){for(var t=e,n=0;n<t.length-1;n++){var r=t[n];if(r.from!=r.to)for(var o=n+1;o<t.length;o++){var i=t[o];if(i.from!=r.from){i.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,i.from),Ot(t,o,r.copy(i.from,r.to)));break}i.to!=r.to&&(t==e&&(t=e.slice()),t[o]=i.copy(i.from,r.to),Ot(t,o+1,i.copy(r.to,i.to)))}}return t}function Ot(e,t,n){for(;t<e.length&&Ct(n,e[t])>0;)t++;e.splice(t,0,n)}function At(e){var t=[];return e.someProp("decorations",(function(n){var r=n(e.state);r&&r!=yt&&t.push(r)})),e.cursorWrapper&&t.push(gt.create(e.state.doc,[e.cursorWrapper.deco])),bt.from(t)}bt.prototype.forChild=function(e,t){if(t.isLeaf)return gt.empty;for(var n=[],r=0;r<this.members.length;r++){var o=this.members[r].forChild(e,t);o!=yt&&(o instanceof bt?n=n.concat(o.members):n.push(o))}return bt.from(n)},bt.prototype.eq=function(e){if(!(e instanceof bt)||e.members.length!=this.members.length)return!1;for(var t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0},bt.prototype.locals=function(e){for(var t,n=!0,r=0;r<this.members.length;r++){var o=this.members[r].localsInner(e);if(o.length)if(t){n&&(t=t.slice(),n=!1);for(var i=0;i<o.length;i++)t.push(o[i])}else t=o}return t?St(n?t:t.sort(Ct)):mt},bt.from=function(e){switch(e.length){case 0:return yt;case 1:return e[0];default:return new bt(e)}};var Et=function(e,t){this._props=t,this.state=t.state,this.dispatch=this.dispatch.bind(this),this._root=null,this.focused=!1,this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):e.apply?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=Nt(this),this.markCursor=null,this.cursorWrapper=null,Dt(this),this.nodeViews=It(this),this.docView=H(this.state.doc,Tt(this),At(this),this.dom,this),this.lastSelectedViewDesc=null,this.dragging=null,function(e){e.shiftKey=!1,e.mouseDown=null,e.lastKeyCode=null,e.lastKeyCodeTime=0,e.lastClick={time:0,x:0,y:0,type:""},e.lastSelectionOrigin=null,e.lastSelectionTime=0,e.composing=!1,e.composingTimeout=null,e.compositionNodes=[],e.compositionEndedAt=-2e8,e.domObserver=new $e(e,(function(t,n,r){return Oe(e,t,n,r)})),e.domObserver.start(),e.domChangeCount=0,e.eventHandlers=Object.create(null);var t=function(t){var n=Le[t];e.dom.addEventListener(t,e.eventHandlers[t]=function(t){!function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(var n=t.target;n!=e.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}(e,t)||He(e,t)||!e.editable&&t.type in Be||n(e,t)})};for(var n in Le)t(n);s.safari&&e.dom.addEventListener("input",(function(){return null})),Ve(e)}(this),this.pluginViews=[],this.updatePluginViews()},Mt={props:{},root:{}};function Tt(e){var t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",(function(n){if("function"==typeof n&&(n=n(e.state)),n)for(var r in n)"class"==r?t.class+=" "+n[r]:t[r]||"contenteditable"==r||"nodeName"==r||(t[r]=String(n[r]))})),[ht.node(0,e.state.doc.content.size,t)]}function Dt(e){var t=e.state.selection,n=t.$head,r=t.$anchor,o=t.visible;if(e.markCursor){var i=document.createElement("img");i.setAttribute("mark-placeholder","true"),e.cursorWrapper={dom:i,deco:ht.widget(n.pos,i,{raw:!0,marks:e.markCursor})}}else if(o||n.pos!=r.pos)e.cursorWrapper=null;else{var s;!e.cursorWrapper||e.cursorWrapper.dom.childNodes.length?((s=document.createElement("div")).style.position="absolute",s.style.left="-100000px"):e.cursorWrapper.deco.pos!=n.pos&&(s=e.cursorWrapper.dom),s&&(e.cursorWrapper={dom:s,deco:ht.widget(n.pos,s,{raw:!0})})}}function Nt(e){return!e.someProp("editable",(function(t){return!1===t(e.state)}))}function Rt(e){var t=e.getSelection(),n=t.focusOffset,r=t.focusNode;return r&&3!=r.nodeType?[r,n,1==r.nodeType?r.childNodes[n-1]:null,1==r.nodeType?r.childNodes[n]:null]:null}function It(e){var t={};return e.someProp("nodeViews",(function(e){for(var n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])})),t}Mt.props.get=function(){if(this._props.state!=this.state){var e=this._props;for(var t in this._props={},e)this._props[t]=e[t];this._props.state=this.state}return this._props},Et.prototype.update=function(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Ve(this),this._props=e,this.updateStateInner(e.state,!0)},Et.prototype.setProps=function(e){var t={};for(var n in this._props)t[n]=this._props[n];for(var r in t.state=this.state,e)t[r]=e[r];this.update(t)},Et.prototype.updateState=function(e){this.updateStateInner(e,this.state.plugins!=e.plugins)},Et.prototype.updateStateInner=function(e,t){var n=this,o=this.state,i=!1;if(this.state=e,t){var a=It(this);(function(e,t){var n=0,r=0;for(var o in e){if(e[o]!=t[o])return!0;n++}for(var i in t)r++;return n!=r})(a,this.nodeViews)&&(this.nodeViews=a,i=!0),Ve(this)}this.editable=Nt(this),Dt(this);var c,u,l,p=At(this),f=Tt(this),d=t?"reset":e.scrollToSelection>o.scrollToSelection?"to selection":"preserve",v=i||!this.docView.matchesNode(e.doc,f,p),g=v||!e.selection.eq(o.selection),y="preserve"==d&&g&&null==this.dom.style.overflowAnchor&&function(e){for(var t,n,r=e.dom.getBoundingClientRect(),o=Math.max(0,r.top),i=e.dom.ownerDocument,s=(r.left+r.right)/2,a=o+1;a<Math.min(innerHeight,r.bottom);a+=5){var c=e.root.elementFromPoint(s,a);if(c!=e.dom&&e.dom.contains(c)){var u=c.getBoundingClientRect();if(u.top>=o-20){t=c,n=u.top;break}}}for(var l=[],p=e.dom;p&&(l.push({dom:p,top:p.scrollTop,left:p.scrollLeft}),p!=i.body);p=h(p));return{refDOM:t,refTop:n,stack:l}}(this);if(g){this.domObserver.stop();var b=!1;if(v){var w=s.chrome&&Rt(this.root);!i&&this.docView.update(e.doc,f,p,this)||(this.docView.destroy(),this.docView=H(e.doc,f,p,this.dom,this)),w&&(b=!this.composing&&function(e,t){var n=Rt(t);if(!n||3==n[0].nodeType)return!1;for(var r=0;r<e.length;r++)if(n[r]!=e[r])return!0;return!1}(w,this.root)),s.ie&&s.ie_version<=11&&!o.selection.empty&&e.selection.empty&&e.doc.content.size<o.doc.content.size&&(b=!0)}b||!(this.mouseDown&&this.domObserver.currentSelection.eq(this.root.getSelection())&&(c=this,u=c.docView.domFromPos(c.state.selection.anchor),l=c.root.getSelection(),m(u.node,u.offset,l.anchorNode,l.anchorOffset)))?ye(this,!1,b):(ke(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}if(this.updatePluginViews(o),"reset"==d)this.dom.scrollTop=0;else if("to selection"==d){var k=this.root.getSelection().focusNode;this.someProp("handleScrollToSelection",(function(e){return e(n)}))||(e.selection instanceof r.NodeSelection?C(this,this.docView.domAfterPos(e.selection.from).getBoundingClientRect(),k):C(this,this.coordsAtPos(e.selection.head),k))}else y&&function(e){for(var t=e.refDOM,n=e.refTop,r=e.stack,o=t?t.getBoundingClientRect().top:0,i=0==o?0:o-n,s=0;s<r.length;s++){var a=r[s],c=a.dom,u=a.top,l=a.left;c.scrollTop!=u+i&&(c.scrollTop=u+i),c.scrollLeft!=l&&(c.scrollLeft=l)}}(y)},Et.prototype.destroyPluginViews=function(){for(var e;e=this.pluginViews.pop();)e.destroy&&e.destroy()},Et.prototype.updatePluginViews=function(e){if(e&&e.plugins==this.state.plugins)for(var t=0;t<this.pluginViews.length;t++){var n=this.pluginViews[t];n.update&&n.update(this,e)}else{this.destroyPluginViews();for(var r=0;r<this.state.plugins.length;r++){var o=this.state.plugins[r];o.spec.view&&this.pluginViews.push(o.spec.view(this))}}},Et.prototype.someProp=function(e,t){var n,r=this._props&&this._props[e];if(null!=r&&(n=t?t(r):r))return n;var o=this.state.plugins;if(o)for(var i=0;i<o.length;i++){var s=o[i].props[e];if(null!=s&&(n=t?t(s):s))return n}},Et.prototype.hasFocus=function(){return this.root.activeElement==this.dom},Et.prototype.focus=function(){this.domObserver.stop(),ye(this,!0),this.editable&&(this.dom.setActive?this.dom.setActive():this.dom.focus({preventScroll:!0})),this.domObserver.start()},Mt.root.get=function(){var e=this._root;if(null==e)for(var t=this.dom.parentNode;t;t=t.parentNode)if(9==t.nodeType||11==t.nodeType&&t.host)return this._root=t;return e||document},Et.prototype.posAtCoords=function(e){return A(this,e)},Et.prototype.coordsAtPos=function(e){return M(this,e)},Et.prototype.domAtPos=function(e){return this.docView.domFromPos(e)},Et.prototype.nodeDOM=function(e){var t=this.docView.descAt(e);return t?t.nodeDOM:null},Et.prototype.posAtDOM=function(e,t,n){void 0===n&&(n=-1);var r=this.docView.posFromDOM(e,t,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r},Et.prototype.endOfTextblock=function(e,t){return j(this,t||this.state,e)},Et.prototype.destroy=function(){this.docView&&(!function(e){for(var t in e.domObserver.stop(),e.eventHandlers)e.dom.removeEventListener(t,e.eventHandlers[t]);clearTimeout(e.composingTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],At(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)},Et.prototype.dispatchEvent=function(e){return function(e,t){He(e,t)||!Le[t.type]||!e.editable&&t.type in Be||Le[t.type](e,t)}(this,e)},Et.prototype.dispatch=function(e){var t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))},Object.defineProperties(Et.prototype,Mt),t.EditorView=Et,t.Decoration=ht,t.DecorationSet=gt,t.__serializeForClipboard=Me,t.__parseFromClipboard=Te,t.__endComposition=rt},function(e,t,n){"use strict";n.d(t,"a",(function(){return A})),n.d(t,"b",(function(){return B})),n.d(t,"c",(function(){return E})),n.d(t,"d",(function(){return q})),n.d(t,"e",(function(){return M})),n.d(t,"f",(function(){return D})),n.d(t,"g",(function(){return W})),n.d(t,"h",(function(){return N})),n.d(t,"i",(function(){return R})),n.d(t,"j",(function(){return J})),n.d(t,"k",(function(){return I})),n.d(t,"l",(function(){return j})),n.d(t,"m",(function(){return V})),n.d(t,"n",(function(){return H})),n.d(t,"o",(function(){return z})),n.d(t,"p",(function(){return $})),n.d(t,"q",(function(){return U}));var r=n(245),o=n(255),i=n(474),s=n.n(i),a=n(249),c=n(254),u=n(240),l=n(271),p=n(253),f=n(242),h=n(251),d=n(478);
/*!
    * tiptap-extensions v1.28.2
    * (c) 2019 Scrumpy UG (limited liability)
    * @license MIT
    */
function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(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)}}function g(e,t,n){return t&&v(e.prototype,t),n&&v(e,n),e}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(n,!0).forEach((function(t){y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function k(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_(e,t)}function x(e){return(x=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function C(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function S(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function O(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var A=function(e){function t(){return m(this,t),C(this,x(t).apply(this,arguments))}return k(t,e),g(t,[{key:"commands",value:function(e){var t=e.type,n=e.schema;return function(){return Object(o.s)(t,n.nodes.paragraph)}}},{key:"keys",value:function(e){var t=e.type;return{"Ctrl->":Object(o.s)(t)}}},{key:"inputRules",value:function(e){var t=e.type;return[Object(o.u)(/^\s*>\s$/,t)]}},{key:"name",get:function(){return"blockquote"}},{key:"schema",get:function(){return{content:"block*",group:"block",defining:!0,draggable:!1,parseDOM:[{tag:"blockquote"}],toDOM:function(){return["blockquote",0]}}}}]),t}(r.g),E=function(e){function t(){return m(this,t),C(this,x(t).apply(this,arguments))}return k(t,e),g(t,[{key:"commands",value:function(e){var t=e.type,n=e.schema;return function(){return Object(o.q)(t,n.nodes.list_item)}}},{key:"keys",value:function(e){var t=e.type,n=e.schema;return{"Shift-Ctrl-8":Object(o.q)(t,n.nodes.list_item)}}},{key:"inputRules",value:function(e){var t=e.type;return[Object(o.u)(/^\s*([-+*])\s$/,t)]}},{key:"name",get:function(){return"bullet_list"}},{key:"schema",get:function(){return{content:"list_item+",group:"block",parseDOM:[{tag:"ul"}],toDOM:function(){return["ul",0]}}}}]),t}(r.g),M=function(e){function t(){return m(this,t),C(this,x(t).apply(this,arguments))}return k(t,e),g(t,[{key:"commands",value:function(e){var t=e.type,n=e.schema;return function(){return Object(o.p)(t,n.nodes.paragraph)}}},{key:"keys",value:function(e){var t=e.type;return{"Shift-Ctrl-\\":Object(o.k)(t)}}},{key:"inputRules",value:function(e){var t=e.type;return[Object(o.o)(/^```$/,t)]}},{key:"name",get:function(){return"code_block"}},{key:"schema",get:function(){return{content:"text*",marks:"",group:"block",code:!0,defining:!0,draggable:!1,parseDOM:[{tag:"pre",preserveWhitespace:"full"}],toDOM:function(){return["pre",["code",0]]}}}}]),t}(r.g);function T(e){var t=e.doc,n=e.name,r=[],o=Object(c.findBlockNodes)(t).filter((function(e){return e.node.type.name===n}));return o.forEach((function(e){var t=e.pos+1;(function e(t){return t.reduce((function(t,n){return t.concat(Array.isArray(n)?e(n):n)}),[])})(function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.map((function(t){var r=[].concat(O(n),O(t.properties?t.properties.className:[]));return t.children?e(t.children,r):{text:t.value,classes:r}}))}(s.a.highlightAuto(e.node.textContent).value)).map((function(e){var n=t,r=n+e.text.length;return t=r,w({},e,{from:n,to:r})})).forEach((function(e){var t=a.Decoration.inline(e.from,e.to,{class:e.classes.join(" ")});r.push(t)}))})),a.DecorationSet.create(t,r)}var D=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};m(this,t),e=C(this,x(t).call(this,n));try{Object.entries(e.options.languages).forEach((function(e){var t=S(e,2),n=t[0],r=t[1];s.a.registerLanguage(n,r)}))}catch(e){throw new Error("Invalid syntax highlight definitions: define at least one highlight.js language mapping")}return e}return k(t,e),g(t,[{key:"commands",value:function(e){var t=e.type,n=e.schema;return function(){return Object(o.p)(t,n.nodes.paragraph)}}},{key:"keys",value:function(e){var t=e.type;return{"Shift-Ctrl-\\":Object(o.k)(t)}}},{key:"inputRules",value:function(e){var t=e.type;return[Object(o.o)(/^```$/,t)]}},{key:"name",get:function(){return"code_block"}},{key:"defaultOptions",get:function(){return{languages:{}}}},{key:"schema",get:function(){return{content:"text*",marks:"",group:"block",code:!0,defining:!0,draggable:!1,parseDOM:[{tag:"pre",preserveWhitespace:"full"}],toDOM:function(){return["pre",["code",0]]}}}},{key:"plugins",get:function(){return[(e={name:this.name},t=e.name,new r.h({name:new r.i("highlight"),state:{init:function(e,n){return T({doc:n.doc,name:t})},apply:function(e,n,r,o){var i=o.selection.$head.parent.type.name,s=r.selection.$head.parent.type.name;return e.docChanged&&[i,s].includes(t)?T({doc:e.doc,name:t}):n.map(e.mapping,e.doc)}},props:{decorations:function(e){return this.getState(e)}}}))];var e,t}}]),t}(r.g),N=function(e){function t(){return m(this,t),C(this,x(t).apply(this,arguments))}return k(t,e),g(t,[{key:"keys",value:function(e){var t=e.type,n=Object(o.a)(o.b,(function(e,n){return n(e.tr.replaceSelectionWith(t.create()).scrollIntoView()),!0}));return{"Mod-Enter":n,"Shift-Enter":n}}},{key:"name",get:function(){return"hard_break"}},{key:"schema",get:function(){return{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM:function(){return["br"]}}}}]),t}(r.g),R=function(e){function t(){return m(this,t),C(this,x(t).apply(this,arguments))}return k(t,e),g(t,[{key:"commands",value:function(e){var t=e.type,n=e.schema;return function(e){return Object(o.p)(t,n.nodes.paragraph,e)}}},{key:"keys",value:function(e){var t=e.type;return this.options.levels.reduce((function(e,n){return w({},e,{},y({},"Shift-Ctrl-".concat(n),Object(o.k)(t,{level:n})))}),{})}},{key:"inputRules",value:function(e){var t=e.type;return this.options.levels.map((function(e){return Object(o.o)(new RegExp("^(#{1,".concat(e,"})\\s$")),t,(function(){return{level:e}}))}))}},{key:"name",get:function(){return"heading"}},{key:"defaultOptions",get:function(){return{levels:[1,2,3,4,5,6]}}},{key:"schema",get:function(){return{attrs:{level:{default:1}},content:"inline*",group:"block",defining:!0,draggable:!1,parseDOM:this.options.levels.map((function(e){return{tag:"h".concat(e),attrs:{level:e}}})),toDOM:function(e){return["h".concat(e.attrs.level),0]}}}}]),t}(r.g),I=function(e){function t(){return m(this,t),C(this,x(t).apply(this,arguments))}return k(t,e),g(t,[{key:"commands",value:function(e){var t=e.type;return function(){return function(e,n){return n(e.tr.replaceSelectionWith(t.create()))}}}},{key:"inputRules",value:function(e){var t=e.type;return[Object(o.g)(/^(?:---|___\s|\*\*\*\s)$/,t)]}},{key:"name",get:function(){return"horizontal_rule"}},{key:"schema",get:function(){return{group:"block",parseDOM:[{tag:"hr"}],toDOM:function(){return["hr"]}}}}]),t}(r.g),P=/!\[(.+|:?)\]\((\S+)(?:(?:\s+)["'](\S+)["'])?\)/,j=function(e){function t(){return m(this,t),C(this,x(t).apply(this,arguments))}return k(t,e),g(t,[{key:"commands",value:function(e){var t=e.type;return function(e){return function(n,r){var o=n.selection,i=o.$cursor?o.$cursor.pos:o.$to.pos,s=t.create(e);r(n.tr.insert(i,s))}}}},{key:"inputRules",value:function(e){var t=e.type;return[Object(o.g)(P,t,(function(e){var t=S(e,4),n=t[1];return{src:t[2],alt:n,title:t[3]}}))]}},{key:"name",get:function(){return"image"}},{key:"schema",get:function(){return{inline:!0,attrs:{src:{},alt:{default:null},title:{default:null}},group:"inline",draggable:!0,parseDOM:[{tag:"img[src]",getAttrs:function(e){return{src:e.getAttribute("src"),title:e.getAttribute("title"),alt:e.getAttribute("alt")}}}],toDOM:function(e){return["img",e.attrs]}}}},{key:"plugins",get:function(){return[new r.h({props:{handleDOMEvents:{drop:function(e,t){if(t.dataTransfer&&t.dataTransfer.files&&t.dataTransfer.files.length){var n=Array.from(t.dataTransfer.files).filter((function(e){return/image/i.test(e.type)}));if(0!==n.length){t.preventDefault();var r=e.state.schema,o=e.posAtCoords({left:t.clientX,top:t.clientY});n.forEach((function(t){var n=new FileReader;n.onload=function(t){var n=r.nodes.image.create({src:t.target.result}),i=e.state.tr.insert(o.pos,n);e.dispatch(i)},n.readAsDataURL(t)}))}}}}}})]}}]),t}(r.g),z=function(e){function t(){return m(this,t),C(this,x(t).apply(this,arguments))}return k(t,e),g(t,[{key:"keys",value:function(e){var t=e.type;return{Enter:Object(o.m)(t),Tab:Object(o.l)(t),"Shift-Tab":Object(o.d)(t)}}},{key:"name",get:function(){return"list_item"}},{key:"schema",get:function(){return{content:"paragraph block*",defining:!0,draggable:!1,parseDOM:[{tag:"li"}],toDOM:function(){return["li",0]}}}}]),t}(r.g);function F(e){var t=e.matcher,n=void 0===t?{char:"@",allowSpaces:!1,startOfLine:!1}:t,r=e.appendText,i=void 0===r?null:r,s=e.suggestionClass,c=void 0===s?"suggestion":s,l=e.command,p=void 0===l?function(){return!1}:l,f=e.items,h=void 0===f?[]:f,d=e.onEnter,m=void 0===d?function(){return!1}:d,v=e.onChange,g=void 0===v?function(){return!1}:v,y=e.onExit,b=void 0===y?function(){return!1}:y,k=e.onKeyDown,x=void 0===k?function(){return!1}:k,_=e.onFilter,C=void 0===_?function(e,t){return t?e.filter((function(e){return JSON.stringify(e).toLowerCase().includes(t.toLowerCase())})):e}:_;return new u.Plugin({key:new u.PluginKey("suggestions"),view:function(){var e=this;return{update:function(t,n){var r=e.key.getState(n),s=e.key.getState(t.state),a=r.active&&s.active&&r.range.from!==s.range.from,c=!r.active&&s.active,u=r.active&&!s.active,l=c||a,f=!c&&!u&&r.query!==s.query&&!a,d=u||a;if(l||f||d){var v=d?r:s,y=document.querySelector('[data-decoration-id="'.concat(v.decorationId,'"]')),w=y?{getBoundingClientRect:function(){return y.getBoundingClientRect()},clientWidth:y.clientWidth,clientHeight:y.clientHeight}:null,k={view:t,range:v.range,query:v.query,text:v.text,decorationNode:y,virtualNode:w,items:C(Array.isArray(h)?h:h(),v.query),command:function(e){var n=e.range,r=e.attrs;p({range:n,attrs:r,schema:t.state.schema})(t.state,t.dispatch,t),i&&Object(o.c)(i)(t.state,t.dispatch,t)}};d&&b(k),f&&g(k),l&&m(k)}}}},state:{init:function(){return{active:!1,range:{},query:null,text:null}},apply:function(e,t){var r,o,i,s,a,c,u,l=e.selection,p=w({},t);if(l.from===l.to){(l.from<t.range.from||l.from>t.range.to)&&(p.active=!1);var f=l.$from,h=(o=(r=n).char,i=void 0===o?"@":o,s=r.allowSpaces,a=void 0!==s&&s,c=r.startOfLine,u=void 0!==c&&c,function(e){if(e.depth<=0)return!1;for(var t,n="\\".concat(i),r=new RegExp("\\s".concat(n,"$")),o=u?"^":"",s=a?new RegExp("".concat(o).concat(n,".*?(?=\\s").concat(n,"|$)"),"gm"):new RegExp("".concat(o,"(?:^)?").concat(n,"[^\\s").concat(n,"]*"),"gm"),c=e.before(),l=e.end(),p=e.doc.textBetween(c,l,"\0","\0"),f=s.exec(p);null!==f;){var h=f.input.slice(Math.max(0,f.index-1),f.index);if(/^[\s\0]?$/.test(h)){var d=f.index+e.start(),m=d+f[0].length;a&&r.test(p.slice(m-1,m+1))&&(f[0]+=" ",m+=1),d<e.pos&&m>=e.pos&&(t={range:{from:d,to:m},query:f[0].slice(i.length),text:f[0]})}f=s.exec(p)}return t})(f),d=(Math.random()+1).toString(36).substr(2,5);h?(p.active=!0,p.decorationId=t.decorationId?t.decorationId:d,p.range=h.range,p.query=h.query,p.text=h.text):p.active=!1}else p.active=!1;return p.active||(p.decorationId=null,p.range={},p.query=null,p.text=null),p}},props:{handleKeyDown:function(e,t){var n=this.getState(e.state),r=n.active,o=n.range;return!!r&&x({view:e,event:t,range:o})},decorations:function(e){var t=this.getState(e),n=t.active,r=t.range,o=t.decorationId;return n?a.DecorationSet.create(e.doc,[a.Decoration.inline(r.from,r.to,{nodeName:"span",class:c,"data-decoration-id":o})]):null}}})}r.g;var $=function(e){function t(){return m(this,t),C(this,x(t).apply(this,arguments))}return k(t,e),g(t,[{key:"commands",value:function(e){var t=e.type,n=e.schema;return function(){return Object(o.q)(t,n.nodes.list_item)}}},{key:"keys",value:function(e){var t=e.type,n=e.schema;return{"Shift-Ctrl-9":Object(o.q)(t,n.nodes.list_item)}}},{key:"inputRules",value:function(e){var t=e.type;return[Object(o.u)(/^(\d+)\.\s$/,t,(function(e){return{order:+e[1]}}),(function(e,t){return t.childCount+t.attrs.order===+e[1]}))]}},{key:"name",get:function(){return"ordered_list"}},{key:"schema",get:function(){return{attrs:{order:{default:1}},content:"list_item+",group:"block",parseDOM:[{tag:"ol",getAttrs:function(e){return{order:e.hasAttribute("start")?+e.getAttribute("start"):1}}}],toDOM:function(e){return 1===e.attrs.order?["ol",0]:["ol",{start:e.attrs.order},0]}}}}]),t}(r.g),L=Object(l.tableNodes)({tableGroup:"block",cellContent:"block+",cellAttributes:{background:{default:null,getFromDOM:function(e){return e.style.backgroundColor||null},setDOMAttr:function(e,t){if(e){var n={style:"".concat(t.style||"","background-color: ").concat(e,";")};Object.assign(t,n)}}}}}),B=(r.g,r.g,r.g,r.g,r.g,r.g,function(e){function t(){return m(this,t),C(this,x(t).apply(this,arguments))}return k(t,e),g(t,[{key:"keys",value:function(e){var t=e.type;return{"Mod-b":Object(o.r)(t)}}},{key:"commands",value:function(e){var t=e.type;return function(){return Object(o.r)(t)}}},{key:"inputRules",value:function(e){var t=e.type;return[Object(o.e)(/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/,t)]}},{key:"pasteRules",value:function(e){var t=e.type;return[Object(o.f)(/(?:\*\*|__)([^*_]+)(?:\*\*|__)/g,t)]}},{key:"name",get:function(){return"bold"}},{key:"schema",get:function(){return{parseDOM:[{tag:"strong"},{tag:"b",getAttrs:function(e){return"normal"!==e.style.fontWeight&&null}},{style:"font-weight",getAttrs:function(e){return/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}}],toDOM:function(){return["strong",0]}}}}]),t}(r.f)),q=function(e){function t(){return m(this,t),C(this,x(t).apply(this,arguments))}return k(t,e),g(t,[{key:"keys",value:function(e){var t=e.type;return{"Mod-`":Object(o.r)(t)}}},{key:"commands",value:function(e){var t=e.type;return function(){return Object(o.r)(t)}}},{key:"inputRules",value:function(e){var t=e.type;return[Object(o.e)(/(?:`)([^`]+)(?:`)$/,t)]}},{key:"pasteRules",value:function(e){var t=e.type;return[Object(o.f)(/(?:`)([^`]+)(?:`)/g,t)]}},{key:"name",get:function(){return"code"}},{key:"schema",get:function(){return{excludes:"_",parseDOM:[{tag:"code"}],toDOM:function(){return["code",0]}}}}]),t}(r.f),V=function(e){function t(){return m(this,t),C(this,x(t).apply(this,arguments))}return k(t,e),g(t,[{key:"keys",value:function(e){var t=e.type;return{"Mod-i":Object(o.r)(t)}}},{key:"commands",value:function(e){var t=e.type;return function(){return Object(o.r)(t)}}},{key:"inputRules",value:function(e){var t=e.type;return[Object(o.e)(/(?:^|[^_])(_([^_]+)_)$/,t),Object(o.e)(/(?:^|[^*])(\*([^*]+)\*)$/,t)]}},{key:"pasteRules",value:function(e){var t=e.type;return[Object(o.f)(/_([^_]+)_/g,t),Object(o.f)(/\*([^*]+)\*/g,t)]}},{key:"name",get:function(){return"italic"}},{key:"schema",get:function(){return{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"}],toDOM:function(){return["em",0]}}}}]),t}(r.f),H=function(e){function t(){return m(this,t),C(this,x(t).apply(this,arguments))}return k(t,e),g(t,[{key:"commands",value:function(e){var t=e.type;return function(e){return e.href?Object(o.t)(t,e):Object(o.i)(t)}}},{key:"pasteRules",value:function(e){var t=e.type;return[Object(o.h)(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-zA-Z]{2,}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)/g,t,(function(e){return{href:e}}))]}},{key:"name",get:function(){return"link"}},{key:"defaultOptions",get:function(){return{openOnClick:!0}}},{key:"schema",get:function(){return{attrs:{href:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:function(e){return{href:e.getAttribute("href")}}}],toDOM:function(e){return["a",w({},e.attrs,{rel:"noopener noreferrer nofollow"}),0]}}}},{key:"plugins",get:function(){return this.options.openOnClick?[new r.h({props:{handleClick:function(e,t,n){var r=e.state.schema,o=Object(p.a)(e.state,r.marks.link);o.href&&n.target instanceof HTMLAnchorElement&&(n.stopPropagation(),window.open(o.href))}}})]:[]}}]),t}(r.f),U=function(e){function t(){return m(this,t),C(this,x(t).apply(this,arguments))}return k(t,e),g(t,[{key:"keys",value:function(e){var t=e.type;return{"Mod-d":Object(o.r)(t)}}},{key:"commands",value:function(e){var t=e.type;return function(){return Object(o.r)(t)}}},{key:"inputRules",value:function(e){var t=e.type;return[Object(o.e)(/~([^~]+)~$/,t)]}},{key:"pasteRules",value:function(e){var t=e.type;return[Object(o.f)(/~([^~]+)~/g,t)]}},{key:"name",get:function(){return"strike"}},{key:"schema",get:function(){return{parseDOM:[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",getAttrs:function(e){return"line-through"===e}}],toDOM:function(){return["s",0]}}}}]),t}(r.f),W=(r.f,function(e){function t(){return m(this,t),C(this,x(t).apply(this,arguments))}return k(t,e),g(t,[{key:"init",value:function(){var e=this;this.getSendableSteps=this.debounce((function(t){var n=Object(h.sendableSteps)(t);n&&e.options.onSendable({editor:e.editor,sendable:{version:n.version,steps:n.steps.map((function(e){return e.toJSON()})),clientID:n.clientID}})}),this.options.debounce),this.editor.on("transaction",(function(t){var n=t.state;e.getSendableSteps(n)}))}},{key:"debounce",value:function(e,t){var n;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];n&&clearTimeout(n),n=setTimeout((function(){e.apply(void 0,o),n=null}),t)}}},{key:"name",get:function(){return"collaboration"}},{key:"defaultOptions",get:function(){var e=this;return{version:0,clientID:Math.floor(4294967295*Math.random()),debounce:250,onSendable:function(){},update:function(t){var n=t.steps,r=t.version,o=e.editor,i=o.state,s=o.view,a=o.schema;Object(h.getVersion)(i)>r||s.dispatch(Object(h.receiveTransaction)(i,n.map((function(e){return f.Step.fromJSON(a,e.step)})),n.map((function(e){return e.clientID}))))}}}},{key:"plugins",get:function(){return[Object(h.collab)({version:this.options.version,clientID:this.options.clientID})]}}]),t}(r.e)),J=(r.e,function(e){function t(){return m(this,t),C(this,x(t).apply(this,arguments))}return k(t,e),g(t,[{key:"keys",value:function(){return{"Mod-z":d.undo,"Mod-y":d.redo,"Shift-Mod-z":d.redo}}},{key:"commands",value:function(){return{undo:function(){return d.undo},redo:function(){return d.redo}}}},{key:"name",get:function(){return"history"}},{key:"defaultOptions",get:function(){return{depth:"",newGroupDelay:""}}},{key:"plugins",get:function(){return[Object(d.history)({depth:this.options.depth,newGroupDelay:this.options.newGroupDelay})]}}]),t}(r.e));r.e,r.e,r.e},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(240),o=function(e,t,n){this.step=e,this.inverted=t,this.origin=n};function i(e,t,n){for(var r=e.length-1;r>=0;r--)n.step(e[r].inverted);for(var i=0;i<t.length;i++)n.step(t[i]);for(var s=[],a=0,c=e.length;a<e.length;a++){var u=e[a].step.map(n.mapping.slice(c));c--,u&&!n.maybeStep(u).failed&&(n.mapping.setMirror(c,n.steps.length-1),s.push(new o(u,u.invert(n.docs[n.docs.length-1]),e[a].origin)))}return s}var s=function(e,t){this.version=e,this.unconfirmed=t};var a=new r.PluginKey("collab");t.rebaseSteps=i,t.collab=function(e){return void 0===e&&(e={}),e={version:e.version||0,clientID:null==e.clientID?Math.floor(4294967295*Math.random()):e.clientID},new r.Plugin({key:a,state:{init:function(){return new s(e.version,[])},apply:function(e,t){var n=e.getMeta(a);return n||(e.docChanged?new s(t.version,t.unconfirmed.concat(function(e){for(var t=[],n=0;n<e.steps.length;n++)t.push(new o(e.steps[n],e.steps[n].invert(e.docs[n]),e));return t}(e))):t)}},config:e,historyPreserveItems:!0})},t.receiveTransaction=function(e,t,n,o){for(var c=a.getState(e),u=c.version+t.length,l=a.get(e).spec.config.clientID,p=0;p<n.length&&n[p]==l;)++p;var f=c.unconfirmed.slice(p);if(!(t=p?t.slice(p):t).length)return e.tr.setMeta(a,new s(u,f));var h=f.length,d=e.tr;if(h)f=i(f,t,d);else{for(var m=0;m<t.length;m++)d.step(t[m]);f=[]}var v=new s(u,f);return o&&o.mapSelectionBackward&&e.selection instanceof r.TextSelection&&(d.setSelection(r.TextSelection.between(d.doc.resolve(d.mapping.map(e.selection.anchor,-1)),d.doc.resolve(d.mapping.map(e.selection.head,-1)),-1)),d.updated&=-2),d.setMeta("rebased",h).setMeta("addToHistory",!1).setMeta(a,v)},t.sendableSteps=function(e){var t=a.getState(e);return 0==t.unconfirmed.length?null:{version:t.version,steps:t.unconfirmed.map((function(e){return e.step})),clientID:a.get(e).spec.config.clientID,get origins(){return this._origins||(this._origins=t.unconfirmed.map((function(e){return e.origin})))}}},t.getVersion=function(e){return a.getState(e).version}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=(r=n(473))&&"object"==typeof r&&"default"in r?r.default:r,i=n(240),s="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);function a(e){var t,n,r,o,i=e.split(/-(?!$)/),a=i[i.length-1];"Space"==a&&(a=" ");for(var c=0;c<i.length-1;c++){var u=i[c];if(/^(cmd|meta|m)$/i.test(u))o=!0;else if(/^a(lt)?$/i.test(u))t=!0;else if(/^(c|ctrl|control)$/i.test(u))n=!0;else if(/^s(hift)?$/i.test(u))r=!0;else{if(!/^mod$/i.test(u))throw new Error("Unrecognized modifier name: "+u);s?o=!0:n=!0}}return t&&(a="Alt-"+a),n&&(a="Ctrl-"+a),o&&(a="Meta-"+a),r&&(a="Shift-"+a),a}function c(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==n&&t.shiftKey&&(e="Shift-"+e),e}function u(e){var t=function(e){var t=Object.create(null);for(var n in e)t[a(n)]=e[n];return t}(e);return function(e,n){var r,i=o(n),s=1==i.length&&" "!=i,a=t[c(i,n,!s)];if(a&&a(e.state,e.dispatch,e))return!0;if(s&&(n.shiftKey||n.altKey||n.metaKey)&&(r=o.base[n.keyCode])&&r!=i){var u=t[c(r,n,!0)];if(u&&u(e.state,e.dispatch,e))return!0}return!1}}t.keymap=function(e){return new i.Plugin({props:{handleKeyDown:u(e)}})},t.keydownHandler=u},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return c})),n.d(t,"e",(function(){return u}));var r=n(254);
/*!
    * tiptap-utils v1.8.0
    * (c) 2019 Scrumpy UG (limited liability)
    * @license MIT
    */
function o(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(e,t){var n=e.selection,r=n.from,i=n.to,s=[];e.doc.nodesBetween(r,i,(function(e){s=[].concat(o(s),o(e.marks))}));var a=s.find((function(e){return e.type.name===t.name}));return a?a.attrs:{}}function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!e||!t)return!1;var n=e.parent.childAfter(e.parentOffset);if(!n.node)return!1;var r=n.node.marks.find((function(e){return e.type===t}));if(!r)return!1;for(var o=e.index(),i=e.start()+n.offset,s=o+1,a=i+n.node.nodeSize;o>0&&r.isInSet(e.parent.child(o-1).marks);)o-=1,i-=e.parent.child(o).nodeSize;for(;s<e.parent.childCount&&r.isInSet(e.parent.child(s).marks);)a+=e.parent.child(s).nodeSize,s+=1;return{from:i,to:a}}function a(e,t){var n=e.selection,r=n.from,o=n.$from,i=n.to;return n.empty?!!t.isInSet(e.storedMarks||o.marks()):!!e.doc.rangeHasMark(r,i,t)}function c(e){var t=e.types,n=e.node;return Array.isArray(t)&&t.includes(n.type)||n.type===t}function u(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=Object(r.findSelectedNodeOfType)(t)(e.selection)||Object(r.findParentNode)((function(e){return e.type===t}))(e.selection);return Object.keys(n).length&&o?o.node.hasMarkup(t,n):!!o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(240),o=n(241),i=n(271),s=function(e,t){return function(n){Array.isArray(e)||(e=[e]);for(var r=0,o=e.length;r<o;r++){var i=N(e[r])(n.selection);if(i){var s=m(i.pos,t)(n);if(s!==n)return s}}return n}},a=function(e){return function(t){if(f(t.selection)){var n=t.selection,i=n.$from,s=n.$to;if(e instanceof o.Fragment&&i.parent.canReplace(i.index(),i.indexAfter(),e)||i.parent.canReplaceWith(i.index(),i.indexAfter(),e.type))return d(t.replaceWith(i.pos,s.pos,e).setSelection(new r.NodeSelection(t.doc.resolve(i.pos))))}return t}},c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return function(n){var o=r.Selection.findFrom(n.doc.resolve(e),t,!0);return o?n.setSelection(o):n}},u=function(e){return e.type&&e.type.spec.selectable},l=function(e,t,n){return function(e){return u(e)&&e.type.isLeaf}(e)?n.setSelection(new r.NodeSelection(n.doc.resolve(t))):c(t)(n)},p=function(e,t,n){return function(r){var o="number"==typeof t,i=r.selection.$from,c=o?r.doc.resolve(t):f(r.selection)?r.doc.resolve(i.pos+1):i,p=c.parent;if(f(r.selection)&&n&&r!==(r=a(e)(r)))return r;if(w(p)&&r!==(r=s(p.type,e)(r))){var h=u(e)?c.before(c.depth):c.pos;return l(e,h,r)}if(b(c,e)){r.insert(c.pos,e);var m=o?c.pos:u(e)?r.selection.$anchor.pos-1:r.selection.$anchor.pos;return d(l(e,m,r))}for(var v=c.depth;v>0;v--){var g=c.after(v),y=r.doc.resolve(g);if(b(y,e))return r.insert(g,e),d(l(e,g,r))}return r}},f=function(e){return e instanceof r.NodeSelection},h=function(e,t){return Array.isArray(e)&&e.indexOf(t.type)>-1||t.type===e},d=function(e){return Object.assign(Object.create(e),e).setTime(Date.now())},m=function(e,t){return function(n){var r=n.doc.nodeAt(e),o=n.doc.resolve(e);if(v(o,t)){var i=(n=n.replaceWith(e,e+r.nodeSize,t)).selection.$from.pos-1;return n=c(Math.max(i,0),-1)(n),n=c(n.selection.$from.start())(n),d(n)}return n}},v=function(e,t){var n=e.node(e.depth);return n&&n.type.validContent(t instanceof o.Fragment?t:o.Fragment.from(t))},g=function(e){return function(t){var n=t.doc.nodeAt(e);return d(t.delete(e,e+n.nodeSize))}},y=function(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;var t={};return Object.keys(e.nodes).forEach((function(n){var r=e.nodes[n];r.spec.tableRole&&(t[r.spec.tableRole]=r)})),e.cached.tableNodeTypes=t,t},b=function(e,t){var n=e.index();return t instanceof o.Fragment?e.parent.canReplace(n,n,t):t instanceof o.Node&&e.parent.canReplaceWith(n,n,t.type)},w=function(e){return!e||"paragraph"===e.type.name&&2===e.nodeSize},k=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return t?e.createChecked(null,t):e.createAndFill()},x=function(e){return function(t){for(var n=i.TableMap.get(t.$anchorCell.node(-1)),r=t.$anchorCell.start(-1),o=n.cellsInRect(e),s=n.cellsInRect(n.rectBetween(t.$anchorCell.pos-r,t.$headCell.pos-r)),a=0,c=o.length;a<c;a++)if(-1===s.indexOf(o[a]))return!1;return!0}},_=function(e){return e[0].map((function(t,n){return e.map((function(e){return e[n]}))}))},C=function(e){for(var t=i.TableMap.get(e),n=[],r=0;r<t.height;r++){for(var o=[],s={},a=0;a<t.width;a++){var c=t.map[r*t.width+a],u=e.nodeAt(c),l=t.findCell(c);s[c]||l.top!==r?o.push(null):(s[c]=!0,o.push(u))}n.push(o)}return n},S=function(e,t){for(var n=[],r=i.TableMap.get(e),o=0;o<r.height;o++){for(var s=e.child(o),a=[],c=0;c<r.width;c++)if(t[o][c]){var u=r.map[o*r.width+c],l=t[o][c],p=e.nodeAt(u).type.createChecked(Object.assign({},l.attrs),l.content,l.marks);a.push(p)}n.push(s.type.createChecked(s.attrs,a,s.marks))}return e.type.createChecked(e.attrs,n,e.marks)},O=function(e,t,n,r){var o=t[0]>n[0]?-1:1,i=e.splice(t[0],t.length),s=i.length%2==0?1:0,a=void 0;return a=-1===r&&1===o?n[0]-1:1===r&&-1===o?n[n.length-1]-s+1:-1===o?n[0]:n[n.length-1]-s,e.splice.apply(e,[a,0].concat(i)),e},A=function(e,t,n,r){var o="Target position is invalid, you can't move the "+r+" "+e+" to "+t+", the target can't be split. You could use tryToFit option.";if(1===(e>t?-1:1)){if(-1!==n.slice(0,n.length-1).indexOf(t))throw new Error(o)}else if(-1!==n.slice(1).indexOf(t))throw new Error(o);return!0},E=function(e){return function(t){var n=t.$from;return M(n,e)}},M=function(e,t){for(var n=e.depth;n>0;n--){var r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}},T=function(e,t){return function(n){var r=E(e)(n);if(r)return I(r.pos,t)}},D=function(e){return function(t){return!!E(e)(t)}},N=function(e){return function(t){return E((function(t){return h(e,t)}))(t)}},R=function(e){var t=e.$from.nodeBefore,n=r.Selection.findFrom(e.$from,-1);if(n&&t){var o=N(t.type)(n);return o?o.pos:n.$from.pos}},I=function(e,t){var n=t(e),r=n.node.childNodes[n.offset];return n.node.nodeType===Node.TEXT_NODE?n.node.parentNode:r&&r.nodeType!==Node.TEXT_NODE?r:n.node},P=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e)throw new Error('Invalid "node" parameter');var n=[];return e.descendants((function(e,r){if(n.push({node:e,pos:r}),!t)return!1})),n},j=function(e,t,n){if(!e)throw new Error('Invalid "node" parameter');if(!t)throw new Error('Invalid "predicate" parameter');return P(e,n).filter((function(e){return t(e.node)}))},z=function(e,t,n){return j(e,(function(e){return e.type===t}),n)};var F=function(e){return E((function(e){return e.type.spec.tableRole&&"table"===e.type.spec.tableRole}))(e)},$=function(e){return e instanceof i.CellSelection},L=function(e){if($(e)){var t=i.TableMap.get(e.$anchorCell.node(-1));return x({left:0,right:t.width,top:0,bottom:t.height})(e)}return!1},B=function(e){return function(t){var n=F(t);if(n){var r=i.TableMap.get(n.node);return(Array.isArray(e)?e:Array.from([e])).reduce((function(e,t){if(t>=0&&t<=r.width-1){var o=r.cellsInRect({left:t,right:t+1,top:0,bottom:r.height});return e.concat(o.map((function(e){var t=n.node.nodeAt(e),r=e+n.start;return{pos:r,start:r+1,node:t}})))}}),[])}}},q=function(e){return function(t){var n=F(t);if(n){var r=i.TableMap.get(n.node);return(Array.isArray(e)?e:Array.from([e])).reduce((function(e,t){if(t>=0&&t<=r.height-1){var o=r.cellsInRect({left:0,right:r.width,top:t,bottom:t+1});return e.concat(o.map((function(e){var t=n.node.nodeAt(e),r=e+n.start;return{pos:r,start:r+1,node:t}})))}}),[])}}},V=function(e){return function(t,n){return function(r){var o=F(r.selection),s="row"===e;if(o){var a=i.TableMap.get(o.node);if(t>=0&&t<(s?a.height:a.width)){var c=s?0:t,u=s?t:0,l=s?a.width:t+1,p=s?t+1:a.height;if(n){var f=X(r.selection.$from);if(!f)return r;var h=a.findCell(f.pos-o.start);s?(u=Math.min(u,h.top),p=Math.max(p,h.bottom)):(c=Math.min(c,h.left),l=Math.max(l,h.right))}var m=a.cellsInRect({left:c,top:u,right:s?l:c+1,bottom:s?u+1:p}),v=p-u==1?m:a.cellsInRect({left:s?c:l-1,top:s?p-1:u,right:l,bottom:p}),g=o.start+m[0],y=o.start+v[v.length-1],b=r.doc.resolve(g),w=r.doc.resolve(y);return d(r.setSelection(new i.CellSelection(w,b)))}}return r}}},H=V("column"),U=V("row"),W=function(e){return function(t){var n=F(t.selection);if(n){var r=i.TableMap.get(n.node);if(e>=0&&e<=r.height){for(var o=n.node,s=y(o.type.schema),a=n.start,c=0;c<e+1;c++)a+=o.child(c).nodeSize;var u=o.child(e),l=[],f=0;if(u.forEach((function(e){1===e.attrs.rowspan&&(f+=e.attrs.colspan,l.push(s[e.type.spec.tableRole].createAndFill(e.attrs,e.marks)))})),f<r.width){for(var h=[],d=function(n){var r=Q(n,(function(t,r){var o=t.node.attrs.rowspan;return o>1&&n+o>e}))(t);h.push.apply(h,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(r))},m=e;m>=0;m--)d(m);h.length&&h.forEach((function(e){t=Z(e,{rowspan:e.node.attrs.rowspan+1})(t)}))}return p(s.row.create(u.attrs,l),a)(t)}}return t}},J=function(e){return function(t){var n=F(t.selection);if(n){var r=i.TableMap.get(n.node);if(0===e&&1===r.width)return G(t);if(e>=0&&e<=r.width)return i.removeColumn(t,{map:r,tableStart:n.start,table:n.node},e),d(t)}return t}},K=function(e){return function(t){var n=F(t.selection);if(n){var r=i.TableMap.get(n.node);if(0===e&&1===r.height)return G(t);if(e>=0&&e<=r.height)return i.removeRow(t,{map:r,tableStart:n.start,table:n.node},e),d(t)}return t}},G=function(e){for(var t=e.selection.$from,n=t.depth;n>0;n--){if("table"===t.node(n).type.spec.tableRole)return d(e.delete(t.before(n),t.after(n)))}return e},Z=function(e,t){return function(n){return e?(n.setNodeMarkup(e.pos,null,Object.assign({},e.node.attrs,t)),d(n)):n}},X=function(e){return M(e,(function(e){return e.type.spec.tableRole&&/cell/i.test(e.type.spec.tableRole)}))},Y=function(e){var t=X(e);if(t){var n=function(e){return M(e,(function(e){return e.type.spec.tableRole&&/table/i.test(e.type.spec.tableRole)}))}(e),r=i.TableMap.get(n.node),o=t.pos-n.start;return r.rectBetween(o,o)}},Q=function(e,t){return function(n){var r=[],o=q(e)(n.selection);if(o)for(var i=o.length-1;i>=0;i--)t(o[i],n)&&r.push(o[i]);return r}},ee=function(e){return function(t){for(var n=e,r=e,o=function(e){var o=B(e)(t.selection);o&&o.forEach((function(t){var o=t.node.attrs.colspan+e-1;o>=n&&(n=e),o>r&&(r=o)}))},i=e;i>=0;i--)o(i);var s=function(e){var n=B(e)(t.selection);n&&n.forEach((function(t){var n=t.node.attrs.colspan+e-1;t.node.attrs.colspan>1&&n>r&&(r=n)}))};for(i=e;i<=r;i++)s(i);var a=[];for(i=n;i<=r;i++){var c=B(i)(t.selection);c&&c.length&&a.push(i)}n=a[0],r=a[a.length-1];for(var u=B(n)(t.selection),l=q(0)(t.selection),p=t.doc.resolve(u[u.length-1].pos),f=void 0,h=r;h>=n;h--){var d=B(h)(t.selection);if(d&&d.length){for(var m=l.length-1;m>=0;m--)if(l[m].pos===d[0].pos){f=d[0];break}if(f)break}}return{$anchor:p,$head:t.doc.resolve(f.pos),indexes:a}}},te=function(e){return function(t){for(var n=e,r=e,o=function(e){q(e)(t.selection).forEach((function(t){var o=t.node.attrs.rowspan+e-1;o>=n&&(n=e),o>r&&(r=o)}))},i=e;i>=0;i--)o(i);var s=function(e){q(e)(t.selection).forEach((function(t){var n=t.node.attrs.rowspan+e-1;t.node.attrs.rowspan>1&&n>r&&(r=n)}))};for(i=e;i<=r;i++)s(i);var a=[];for(i=n;i<=r;i++){var c=q(i)(t.selection);c&&c.length&&a.push(i)}n=a[0],r=a[a.length-1];for(var u=q(n)(t.selection),l=B(0)(t.selection),p=t.doc.resolve(u[u.length-1].pos),f=void 0,h=r;h>=n;h--){var d=q(h)(t.selection);if(d&&d.length){for(var m=l.length-1;m>=0;m--)if(l[m].pos===d[0].pos){f=d[0];break}if(f)break}}return{$anchor:p,$head:t.doc.resolve(f.pos),indexes:a}}};t.isNodeSelection=f,t.canInsert=b,t.convertTableNodeToArrayOfRows=C,t.convertArrayOfRowsToTableNode=S,t.findParentNode=E,t.findParentNodeClosestToPos=M,t.findParentDomRef=T,t.hasParentNode=D,t.findParentNodeOfType=N,t.findParentNodeOfTypeClosestToPos=function(e,t){return M(e,(function(e){return h(t,e)}))},t.hasParentNodeOfType=function(e){return function(t){return D((function(t){return h(e,t)}))(t)}},t.findParentDomRefOfType=function(e,t){return function(n){return T((function(t){return h(e,t)}),t)(n)}},t.findSelectedNodeOfType=function(e){return function(t){if(f(t)){var n=t.node,r=t.$from;if(h(e,n))return{node:n,pos:r.pos,depth:r.depth}}}},t.findPositionOfNodeBefore=R,t.findDomRefAtPos=I,t.flatten=P,t.findChildren=j,t.findTextNodes=function(e,t){return j(e,(function(e){return e.isText}),t)},t.findInlineNodes=function(e,t){return j(e,(function(e){return e.isInline}),t)},t.findBlockNodes=function(e,t){return j(e,(function(e){return e.isBlock}),t)},t.findChildrenByAttr=function(e,t,n){return j(e,(function(e){return!!t(e.attrs)}),n)},t.findChildrenByType=z,t.findChildrenByMark=function(e,t,n){return j(e,(function(e){return t.isInSet(e.marks)}),n)},t.contains=function(e,t){return!!z(e,t).length},t.findTable=F,t.isCellSelection=$,t.getSelectionRect=function(e){if($(e)){var t=e.$anchorCell.start(-1);return i.TableMap.get(e.$anchorCell.node(-1)).rectBetween(e.$anchorCell.pos-t,e.$headCell.pos-t)}},t.isColumnSelected=function(e){return function(t){if($(t)){var n=i.TableMap.get(t.$anchorCell.node(-1));return x({left:e,right:e+1,top:0,bottom:n.height})(t)}return!1}},t.isRowSelected=function(e){return function(t){if($(t)){var n=i.TableMap.get(t.$anchorCell.node(-1));return x({left:0,right:n.width,top:e,bottom:e+1})(t)}return!1}},t.isTableSelected=L,t.getCellsInColumn=B,t.getCellsInRow=q,t.getCellsInTable=function(e){var t=F(e);if(t){var n=i.TableMap.get(t.node);return n.cellsInRect({left:0,right:n.width,top:0,bottom:n.height}).map((function(e){var n=t.node.nodeAt(e),r=e+t.start;return{pos:r,start:r+1,node:n}}))}},t.selectColumn=H,t.selectRow=U,t.selectTable=function(e){var t=F(e.selection);if(t){var n=i.TableMap.get(t.node).map;if(n&&n.length){var r=t.start+n[0],o=t.start+n[n.length-1],s=e.doc.resolve(r),a=e.doc.resolve(o);return d(e.setSelection(new i.CellSelection(a,s)))}}return e},t.emptyCell=function(e,t){return function(n){if(e){var r=y(t).cell.createAndFill().content;if(!e.node.content.eq(r))return n.replaceWith(e.pos+1,e.pos+e.node.nodeSize,r),d(n)}return n}},t.addColumnAt=function(e){return function(t){var n=F(t.selection);if(n){var r=i.TableMap.get(n.node);if(e>=0&&e<=r.width)return d(i.addColumn(t,{map:r,tableStart:n.start,table:n.node},e))}return t}},t.moveRow=function(e,t,n){return function(r){var o=Object.assign({tryToFit:!1,direction:0},n),i=F(r.selection);if(!i)return r;var s=te(e)(r).indexes,a=te(t)(r).indexes;if(s.indexOf(t)>-1)return r;!o.tryToFit&&a.length>1&&A(e,t,a,"row");var c=function(e,t,n,r){var o=C(e.node);return o=O(o,t,n,r),S(e.node,o)}(i,s,a,o.direction);return d(r).replaceWith(i.pos,i.pos+i.node.nodeSize,c)}},t.moveColumn=function(e,t,n){return function(r){var o=Object.assign({tryToFit:!1,direction:0},n),i=F(r.selection);if(!i)return r;var s=ee(e)(r).indexes,a=ee(t)(r).indexes;if(s.indexOf(t)>-1)return r;!o.tryToFit&&a.length>1&&A(e,t,a,"column");var c=function(e,t,n,r){var o=_(C(e.node));return o=O(o,t,n,r),o=_(o),S(e.node,o)}(i,s,a,o.direction);return d(r).replaceWith(i.pos,i.pos+i.node.nodeSize,c)}},t.addRowAt=function(e,t){return function(n){var r=F(n.selection);if(r){var o=i.TableMap.get(r.node),s=e-1;if(t&&s>=0)return d(W(s)(n));if(e>=0&&e<=o.height)return d(i.addRow(n,{map:o,tableStart:r.start,table:r.node},e))}return n}},t.cloneRowAt=W,t.removeColumnAt=J,t.removeRowAt=K,t.removeTable=G,t.removeSelectedColumns=function(e){var t=e.selection;if(L(t))return G(e);if($(t)){var n=F(t);if(n){var r=i.TableMap.get(n.node),o=r.rectBetween(t.$anchorCell.pos-n.start,t.$headCell.pos-n.start);if(0==o.left&&o.right==r.width)return!1;for(var s=Object.assign({},o,{map:r,table:n.node,tableStart:n.start}),a=s.right-1;i.removeColumn(e,s,a),a!==s.left;a--)s.table=s.tableStart?e.doc.nodeAt(s.tableStart-1):e.doc,s.map=i.TableMap.get(s.table);return d(e)}}return e},t.removeSelectedRows=function(e){var t=e.selection;if(L(t))return G(e);if($(t)){var n=F(t);if(n){var r=i.TableMap.get(n.node),o=r.rectBetween(t.$anchorCell.pos-n.start,t.$headCell.pos-n.start);if(0==o.top&&o.bottom==r.height)return!1;for(var s=Object.assign({},o,{map:r,table:n.node,tableStart:n.start}),a=s.bottom-1;i.removeRow(e,s,a),a!==s.top;a--)s.table=s.tableStart?e.doc.nodeAt(s.tableStart-1):e.doc,s.map=i.TableMap.get(s.table);return d(e)}}return e},t.removeColumnClosestToPos=function(e){return function(t){var n=Y(e);return n?J(n.left)(c(e.pos)(t)):t}},t.removeRowClosestToPos=function(e){return function(t){var n=Y(e);return n?K(n.top)(c(e.pos)(t)):t}},t.forEachCellInColumn=function(e,t,n){return function(o){var i=B(e)(o.selection);if(i){for(var s=i.length-1;s>=0;s--)o=t(i[s],o);if(n){var a=o.doc.resolve(o.mapping.map(i[i.length-1].pos));o.setSelection(r.Selection.near(a))}return d(o)}return o}},t.forEachCellInRow=function(e,t,n){return function(o){var i=q(e)(o.selection);if(i){for(var s=i.length-1;s>=0;s--)o=t(i[s],o);if(n){var a=o.doc.resolve(o.mapping.map(i[i.length-1].pos));o.setSelection(r.Selection.near(a))}}return o}},t.setCellAttrs=Z,t.createTable=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,i=y(e),s=i.cell,a=i.header_cell,c=i.row,u=i.table,l=[],p=[],f=0;f<n;f++)l.push(k(s,o)),r&&p.push(k(a,o));for(var h=[],d=0;d<t;d++)h.push(c.createChecked(null,r&&0===d?p:l));return u.createChecked(null,h)},t.findCellClosestToPos=X,t.findCellRectClosestToPos=Y,t.getSelectionRangeInColumn=ee,t.getSelectionRangeInRow=te,t.removeParentNodeOfType=function(e){return function(t){var n=N(e)(t.selection);return n?g(n.pos)(t):t}},t.replaceParentNodeOfType=s,t.removeSelectedNode=function(e){if(f(e.selection)){var t=e.selection.$from.pos,n=e.selection.$to.pos;return d(e.delete(t,n))}return e},t.replaceSelectedNode=a,t.setTextSelection=c,t.safeInsert=p,t.setParentNodeMarkup=function(e,t,n,r){return function(o){var i=N(e)(o.selection);return i?d(o.setNodeMarkup(i.pos,t,Object.assign({},i.node.attrs,n),r)):o}},t.selectParentNodeOfType=function(e){return function(t){if(!f(t.selection)){var n=N(e)(t.selection);if(n)return d(t.setSelection(r.NodeSelection.create(t.doc,n.pos)))}return t}},t.removeNodeBefore=function(e){var t=R(e.selection);return"number"==typeof t?g(t)(e):e}},function(e,t,n){"use strict";n.d(t,"c",(function(){return l})),n.d(t,"e",(function(){return f})),n.d(t,"f",(function(){return m})),n.d(t,"g",(function(){return h})),n.d(t,"h",(function(){return d})),n.d(t,"i",(function(){return v})),n.d(t,"j",(function(){return g})),n.d(t,"n",(function(){return y})),n.d(t,"p",(function(){return b})),n.d(t,"q",(function(){return k})),n.d(t,"s",(function(){return x})),n.d(t,"t",(function(){return _}));var r=n(239);n.d(t,"a",(function(){return r.chainCommands})),n.d(t,"b",(function(){return r.exitCode})),n.d(t,"k",(function(){return r.setBlockType})),n.d(t,"r",(function(){return r.toggleMark}));var o=n(246);n.d(t,"d",(function(){return o.liftListItem})),n.d(t,"l",(function(){return o.sinkListItem})),n.d(t,"m",(function(){return o.splitListItem}));var i=n(247);n.d(t,"o",(function(){return i.textblockTypeInputRule})),n.d(t,"u",(function(){return i.wrappingInputRule}));var s=n(240),a=n(241),c=n(253),u=n(254);
/*!
    * tiptap-commands v1.12.1
    * (c) 2019 Scrumpy UG (limited liability)
    * @license MIT
    */
function l(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return function(t,n){var r=t.selection.$from.pos.pos;return n(t.tr.insertText(e,r)),!0}}function p(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function f(e,t,n){return new i.InputRule(e,(function(e,r,o,i){var s=n instanceof Function?n(r):n,a=e.tr,c=r.length-1,u=i,l=o;if(r[c]){var f=o+r[0].indexOf(r[c-1]),h=f+r[c-1].length,d=f+r[c-1].lastIndexOf(r[c]),m=d+r[c].length;if(function(e,t,n){var r=[];return n.doc.nodesBetween(e,t,(function(e,t){r=[].concat(p(r),p(e.marks.map((function(n){return{start:t,end:t+e.nodeSize,mark:n}}))))})),r}(o,i,e).filter((function(e){return e.mark.type.excluded.find((function(e){return e.name===t.name}))})).filter((function(e){return e.end>f})).length)return!1;m<h&&a.delete(m,h),d>f&&a.delete(f,d),u=(l=f)+r[c].length}return a.addMark(l,u,t.create(s)),a.removeStoredMark(t),a}))}function h(e,t,n){return new i.InputRule(e,(function(e,r,o,i){var s=n instanceof Function?n(r):n,a=e.tr;return r[0]&&a.replaceWith(o-1,i,t.create(s)),a}))}function d(e,t,n){return new s.Plugin({props:{transformPasted:function(r){return new a.Slice(function r(o){var i=[];return o.forEach((function(o){if(o.isText){var s,a=o.text,c=0;do{if(s=e.exec(a)){var u=s.index,l=u+s[0].length,p=n instanceof Function?n(s[0]):n;u>0&&i.push(o.cut(c,u)),i.push(o.cut(u,l).mark(t.create(p).addToSet(o.marks))),c=l}}while(s);c<a.length&&i.push(o.cut(c))}else i.push(o.copy(r(o.content)))})),a.Fragment.fromArray(i)}(r.content),r.openStart,r.openEnd)}}})}function m(e,t,n){return new s.Plugin({props:{transformPasted:function(r){return new a.Slice(function r(o){var i=[];return o.forEach((function(o){if(o.isText){for(var s,a=o.text,c=0,u=!!o.marks.filter((function(e){return"link"===e.type.name}))[0];!u&&null!==(s=e.exec(a));)if(s[1]){var l=s.index,p=l+s[0].length,f=l+s[0].indexOf(s[1]),h=f+s[1].length,d=n instanceof Function?n(s):n;l>0&&i.push(o.cut(c,l)),i.push(o.cut(f,h).mark(t.create(d).addToSet(o.marks))),c=p}c<a.length&&i.push(o.cut(c))}else i.push(o.copy(r(o.content)))})),a.Fragment.fromArray(i)}(r.content),r.openStart,r.openEnd)}}})}function v(e){return function(t,n){var r=t.tr,o=t.selection,i=o.from,s=o.to,a=o.$from;if(o.empty){var u=Object(c.b)(a,e);i=u.from,s=u.to}return r.removeMark(i,s,e),n(r)}}function g(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(r,o){var i=r.selection,s=i.$from,a=i.$to,c=s.index(),u=e?e.from:s.pos,l=e?e.to:a.pos;return!!s.parent.canReplaceWith(c,c,t)&&(o&&o(r.tr.replaceWith(u,l,t.create(n))),!0)}}function y(e){return function(t,n){var r=t.selection,o=r.$from,i=r.$to,s=r.node;if(s&&s.isBlock||o.depth<2||!o.sameParent(i))return!1;var c=o.node(-1);if(c.type!=e)return!1;if(0==o.parent.content.size){if(2==o.depth||o.node(-3).type!=e||o.index(-2)!=o.node(-2).childCount-1)return!1;if(n){for(var u=a.Fragment.empty,l=o.index(-1)>0,p=o.depth-(l?1:2);p>=o.depth-3;p--)u=a.Fragment.from(o.node(p).copy(u));u=u.append(a.Fragment.from(e.createAndFill()));var f=t.tr.replace(o.before(l?null:-1),o.after(-3),new a.Slice(u,l?3:2,2));f.setSelection(t.selection.constructor.near(f.doc.resolve(o.pos+(l?3:2)))),n(f.scrollIntoView())}return!0}var h=i.pos==o.end()?c.contentMatchAt(o.indexAfter(-1)).defaultType:null,d=t.tr.delete(o.pos,i.pos),m=h&&[{type:e},{type:h}];return m||(m=[{type:e},null]),!!function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,o=e.resolve(t),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(var a=o.depth-1,c=n-2;a>i;a--,c--){var u=o.node(a),l=o.index(a);if(u.type.spec.isolating)return!1;var p=u.content.cutByIndex(l,u.childCount),f=r&&r[c]||u;if(f!=u&&(p=p.replaceChild(0,f.type.create(f.attrs))),!u.canReplace(l+1,u.childCount))return!1}var h=o.indexAfter(i),d=r&&r[0];return o.node(i).canReplaceWith(h,h,d?d.type:o.node(i+1).type)}(d.doc,o.pos,2,m)&&(n&&n(d.split(o.pos,2,m).scrollIntoView()),!0)}}function b(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(o,i,s){return Object(c.e)(o,e,n)?Object(r.setBlockType)(t)(o,i,s):Object(r.setBlockType)(e,n)(o,i,s)}}function w(e,t){return e.type===t.nodes.bullet_list||e.type===t.nodes.ordered_list||e.type===t.nodes.todo_list}function k(e,t){return function(n,r,i){var s=n.schema,a=n.selection,c=a.$from,l=a.$to,p=c.blockRange(l);if(!p)return!1;var f=Object(u.findParentNode)((function(e){return w(e,s)}))(a);if(p.depth>=1&&f&&p.depth-f.depth<=1){if(f.node.type===e)return Object(o.liftListItem)(t)(n,r,i);if(w(f.node,s)&&e.validContent(f.node.content)){var h=n.tr;return h.setNodeMarkup(f.pos,e),r&&r(h),!1}}return Object(o.wrapInList)(e)(n,r,i)}}function x(e){return function(t,n,o){return Object(c.e)(t,e)?Object(r.lift)(t,n):Object(r.wrapIn)(e)(t,n,o)}}function _(e,t){return function(n,r){var o=n.tr,i=n.selection,s=n.doc,a=i.from,u=i.to,l=i.$from;if(i.empty){var p=Object(c.b)(l,e);a=p.from,u=p.to}return s.rangeHasMark(a,u,e)&&o.removeMark(a,u,e),o.addMark(a,u,e.create(t)),r(o)}}},,function(e,t){e.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},function(e,t,n){"use strict";function r(){this.__rules__=[],this.__cache__=null}r.prototype.__find__=function(e){for(var t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1},r.prototype.__compile__=function(){var e=this,t=[""];e.__rules__.forEach((function(e){e.enabled&&e.alt.forEach((function(e){t.indexOf(e)<0&&t.push(e)}))})),e.__cache__={},t.forEach((function(t){e.__cache__[t]=[],e.__rules__.forEach((function(n){n.enabled&&(t&&n.alt.indexOf(t)<0||e.__cache__[t].push(n.fn))}))}))},r.prototype.at=function(e,t,n){var r=this.__find__(e),o=n||{};if(-1===r)throw new Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=o.alt||[],this.__cache__=null},r.prototype.before=function(e,t,n,r){var o=this.__find__(e),i=r||{};if(-1===o)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o,0,{name:t,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null},r.prototype.after=function(e,t,n,r){var o=this.__find__(e),i=r||{};if(-1===o)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o+1,0,{name:t,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null},r.prototype.push=function(e,t,n){var r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null},r.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);var n=[];return e.forEach((function(e){var r=this.__find__(e);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!0,n.push(e)}),this),this.__cache__=null,n},r.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach((function(e){e.enabled=!1})),this.enable(e,t)},r.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);var n=[];return e.forEach((function(e){var r=this.__find__(e);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!1,n.push(e)}),this),this.__cache__=null,n},r.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},e.exports=r},function(e,t,n){"use strict";function r(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}r.prototype.attrIndex=function(e){var t,n,r;if(!this.attrs)return-1;for(n=0,r=(t=this.attrs).length;n<r;n++)if(t[n][0]===e)return n;return-1},r.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},r.prototype.attrSet=function(e,t){var n=this.attrIndex(e),r=[e,t];n<0?this.attrPush(r):this.attrs[n]=r},r.prototype.attrGet=function(e){var t=this.attrIndex(e),n=null;return t>=0&&(n=this.attrs[t][1]),n},r.prototype.attrJoin=function(e,t){var n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+" "+t},e.exports=r},,,,,,,,,,function(e,t,n){"use strict";
/*!
 * escape-html
 * Copyright(c) 2012-2013 TJ Holowaychuk
 * Copyright(c) 2015 Andreas Lubbe
 * Copyright(c) 2015 Tiancheng "Timothy" Gu
 * MIT Licensed
 */var r=/["'&<>]/;e.exports=function(e){var t,n=""+e,o=r.exec(n);if(!o)return n;var i="",s=0,a=0;for(s=o.index;s<n.length;s++){switch(n.charCodeAt(s)){case 34:t="&quot;";break;case 38:t="&amp;";break;case 39:t="&#39;";break;case 60:t="&lt;";break;case 62:t="&gt;";break;default:continue}a!==s&&(i+=n.substring(a,s)),a=s+1,i+=t}return a!==s?i+n.substring(a,s):i}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(113).default.create({headers:{requesttoken:OC.requestToken}});t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o,i=n(240),s=n(249),a=n(241),c=n(242),u=n(252);if("undefined"!=typeof WeakMap){var l=new WeakMap;r=function(e){return l.get(e)},o=function(e,t){return l.set(e,t),t}}else{var p=[],f=0;r=function(e){for(var t=0;t<p.length;t+=2)if(p[t]==e)return p[t+1]},o=function(e,t){return 10==f&&(f=0),p[f++]=e,p[f++]=t}}var h=function(e,t,n,r){this.left=e,this.top=t,this.right=n,this.bottom=r},d=function(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r};function m(e){if(e.colwidth)return e.colwidth.slice();for(var t=[],n=0;n<e.colspan;n++)t.push(0);return t}d.prototype.findCell=function(e){for(var t=0;t<this.map.length;t++){var n=this.map[t];if(n==e){for(var r=t%this.width,o=t/this.width|0,i=r+1,s=o+1,a=1;i<this.width&&this.map[t+a]==n;a++)i++;for(var c=1;s<this.height&&this.map[t+this.width*c]==n;c++)s++;return new h(r,o,i,s)}}throw new RangeError("No cell with offset "+e+" found")},d.prototype.colCount=function(e){for(var t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw new RangeError("No cell with offset "+e+" found")},d.prototype.nextCell=function(e,t,n){var r=this.findCell(e),o=r.left,i=r.right,s=r.top,a=r.bottom;return"horiz"==t?(n<0?0==o:i==this.width)?null:this.map[s*this.width+(n<0?o-1:i)]:(n<0?0==s:a==this.height)?null:this.map[o+this.width*(n<0?s-1:a)]},d.prototype.rectBetween=function(e,t){var n=this.findCell(e),r=n.left,o=n.right,i=n.top,s=n.bottom,a=this.findCell(t),c=a.left,u=a.right,l=a.top,p=a.bottom;return new h(Math.min(r,c),Math.min(i,l),Math.max(o,u),Math.max(s,p))},d.prototype.cellsInRect=function(e){for(var t=[],n={},r=e.top;r<e.bottom;r++)for(var o=e.left;o<e.right;o++){var i=r*this.width+o,s=this.map[i];n[s]||(n[s]=!0,o==e.left&&o&&this.map[i-1]==s||r==e.top&&r&&this.map[i-this.width]==s||t.push(s))}return t},d.prototype.positionAt=function(e,t,n){for(var r=0,o=0;;r++){var i=o+n.child(r).nodeSize;if(r==e){for(var s=t+e*this.width,a=(e+1)*this.width;s<a&&this.map[s]<o;)s++;return s==a?i-1:this.map[s]}o=i}},d.get=function(e){return r(e)||o(e,function(e){if("table"!=e.type.spec.tableRole)throw new RangeError("Not a table node: "+e.type.name);for(var t=function(e){for(var t=-1,n=!1,r=0;r<e.childCount;r++){var o=e.child(r),i=0;if(n)for(var s=0;s<r;s++)for(var a=e.child(s),c=0;c<a.childCount;c++){var u=a.child(c);s+u.attrs.rowspan>r&&(i+=u.attrs.colspan)}for(var l=0;l<o.childCount;l++){var p=o.child(l);i+=p.attrs.colspan,p.attrs.rowspan>1&&(n=!0)}-1==t?t=i:t!=i&&(t=Math.max(t,i))}return t}(e),n=e.childCount,r=[],o=0,i=null,s=[],a=0,c=t*n;a<c;a++)r[a]=0;for(var u=0,l=0;u<n;u++){var p=e.child(u);l++;for(var f=0;;f++){for(;o<r.length&&0!=r[o];)o++;if(f==p.childCount)break;for(var h=p.child(f),v=h.attrs,g=v.colspan,y=v.rowspan,b=v.colwidth,w=0;w<y;w++){if(w+u>=n){(i||(i=[])).push({type:"overlong_rowspan",pos:l,n:y-w});break}for(var k=o+w*t,x=0;x<g;x++){0==r[k+x]?r[k+x]=l:(i||(i=[])).push({type:"collision",row:u,pos:l,n:g-x});var _=b&&b[x];if(_){var C=(k+x)%t*2,S=s[C];null==S||S!=_&&1==s[C+1]?(s[C]=_,s[C+1]=1):S==_&&s[C+1]++}}}o+=g,l+=h.nodeSize}for(var O=(u+1)*t,A=0;o<O;)0==r[o++]&&A++;A&&(i||(i=[])).push({type:"missing",row:u,n:A}),l++}for(var E=new d(t,n,r,i),M=!1,T=0;!M&&T<s.length;T+=2)null!=s[T]&&s[T+1]<n&&(M=!0);M&&function(e,t,n){e.problems||(e.problems=[]);for(var r=0,o={};r<e.map.length;r++){var i=e.map[r];if(!o[i]){o[i]=!0;for(var s=n.nodeAt(i),a=null,c=0;c<s.attrs.colspan;c++){var u=(r+c)%e.width,l=t[2*u];null==l||s.attrs.colwidth&&s.attrs.colwidth[c]==l||((a||(a=m(s.attrs)))[c]=l)}a&&e.problems.unshift({type:"colwidth mismatch",pos:i,colwidth:a})}}}(E,s,e);return E}(e))};var v=new i.PluginKey("selectingCells");function g(e){for(var t=e.depth-1;t>0;t--)if("row"==e.node(t).type.spec.tableRole)return e.node(0).resolve(e.before(t+1));return null}function y(e){for(var t=e.selection.$head,n=t.depth;n>0;n--)if("row"==t.node(n).type.spec.tableRole)return!0;return!1}function b(e){var t=e.selection;return t.$anchorCell?t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell:t.node&&"cell"==t.node.type.spec.tableRole?t.$anchor:g(t.$head)||function(e){for(var t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){var r=t.type.spec.tableRole;if("cell"==r||"header_cell"==r)return e.doc.resolve(n)}for(var o=e.nodeBefore,i=e.pos;o;o=o.lastChild,i--){var s=o.type.spec.tableRole;if("cell"==s||"header_cell"==s)return e.doc.resolve(i-o.nodeSize)}}(t.$head)}function w(e){return"row"==e.parent.type.spec.tableRole&&e.nodeAfter}function k(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function x(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function _(e,t,n){var r=e.start(-1),o=d.get(e.node(-1)).nextCell(e.pos-r,t,n);return null==o?null:e.node(0).resolve(r+o)}function C(e,t,n){var r={};for(var o in e)r[o]=e[o];return r[t]=n,r}function S(e,t,n){void 0===n&&(n=1);var r=C(e,"colspan",e.colspan-n);return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some((function(e){return e>0}))||(r.colwidth=null)),r}function O(e,t,n){void 0===n&&(n=1);var r=C(e,"colspan",e.colspan+n);if(r.colwidth){r.colwidth=r.colwidth.slice();for(var o=0;o<n;o++)r.colwidth.splice(t,0,0)}return r}var A=function(e){function t(t,n){void 0===n&&(n=t);var r=t.node(-1),o=d.get(r),s=t.start(-1),a=o.rectBetween(t.pos-s,n.pos-s),c=t.node(0),u=o.cellsInRect(a).filter((function(e){return e!=n.pos-s}));u.unshift(n.pos-s);var l=u.map((function(e){var t=r.nodeAt(e),n=e+s+1;return new i.SelectionRange(c.resolve(n),c.resolve(n+t.content.size))}));e.call(this,l[0].$from,l[0].$to,l),this.$anchorCell=t,this.$headCell=n}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.map=function(e,n){var r=e.resolve(n.map(this.$anchorCell.pos)),o=e.resolve(n.map(this.$headCell.pos));if(w(r)&&w(o)&&x(r,o)){var s=this.$anchorCell.node(-1)!=r.node(-1);return s&&this.isRowSelection()?t.rowSelection(r,o):s&&this.isColSelection()?t.colSelection(r,o):new t(r,o)}return i.TextSelection.between(r,o)},t.prototype.content=function(){for(var e=this.$anchorCell.node(-1),t=d.get(e),n=this.$anchorCell.start(-1),r=t.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),o={},i=[],s=r.top;s<r.bottom;s++){for(var c=[],u=s*t.width+r.left,l=r.left;l<r.right;l++,u++){var p=t.map[u];if(!o[p]){o[p]=!0;var f=t.findCell(p),h=e.nodeAt(p),m=r.left-f.left,v=f.right-r.right;if(m>0||v>0){var g=h.attrs;m>0&&(g=S(g,0,m)),v>0&&(g=S(g,g.colspan-v,v)),h=f.left<r.left?h.type.createAndFill(g):h.type.create(g,h.content)}if(f.top<r.top||f.bottom>r.bottom){var y=C(h.attrs,"rowspan",Math.min(f.bottom,r.bottom)-Math.max(f.top,r.top));h=f.top<r.top?h.type.createAndFill(y):h.type.create(y,h.content)}c.push(h)}}i.push(e.child(s).copy(a.Fragment.from(c)))}var b=this.isColSelection()&&this.isRowSelection()?e:i;return new a.Slice(a.Fragment.from(b),1,1)},t.prototype.replace=function(t,n){void 0===n&&(n=a.Slice.empty);for(var r=t.steps.length,o=this.ranges,i=0;i<o.length;i++){var s=o[i],c=s.$from,u=s.$to,l=t.mapping.slice(r);t.replace(l.map(c.pos),l.map(u.pos),i?a.Slice.empty:n)}var p=e.findFrom(t.doc.resolve(t.mapping.slice(r).map(this.to)),-1);p&&t.setSelection(p)},t.prototype.replaceWith=function(e,t){this.replace(e,new a.Slice(a.Fragment.from(t),0,0))},t.prototype.forEachCell=function(e){for(var t=this.$anchorCell.node(-1),n=d.get(t),r=this.$anchorCell.start(-1),o=n.cellsInRect(n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r)),i=0;i<o.length;i++)e(t.nodeAt(o[i]),r+o[i])},t.prototype.isColSelection=function(){var e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);if(Math.min(e,t)>0)return!1;var n=e+this.$anchorCell.nodeAfter.attrs.rowspan,r=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,r)==this.$headCell.node(-1).childCount},t.colSelection=function(e,n){void 0===n&&(n=e);var r=d.get(e.node(-1)),o=e.start(-1),i=r.findCell(e.pos-o),s=r.findCell(n.pos-o),a=e.node(0);return i.top<=s.top?(i.top>0&&(e=a.resolve(o+r.map[i.left])),s.bottom<r.height&&(n=a.resolve(o+r.map[r.width*(r.height-1)+s.right-1]))):(s.top>0&&(n=a.resolve(o+r.map[s.left])),i.bottom<r.height&&(e=a.resolve(o+r.map[r.width*(r.height-1)+i.right-1]))),new t(e,n)},t.prototype.isRowSelection=function(){var e=d.get(this.$anchorCell.node(-1)),t=this.$anchorCell.start(-1),n=e.colCount(this.$anchorCell.pos-t),r=e.colCount(this.$headCell.pos-t);if(Math.min(n,r)>0)return!1;var o=n+this.$anchorCell.nodeAfter.attrs.colspan,i=r+this.$headCell.nodeAfter.attrs.colspan;return Math.max(o,i)==e.width},t.prototype.eq=function(e){return e instanceof t&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos},t.rowSelection=function(e,n){void 0===n&&(n=e);var r=d.get(e.node(-1)),o=e.start(-1),i=r.findCell(e.pos-o),s=r.findCell(n.pos-o),a=e.node(0);return i.left<=s.left?(i.left>0&&(e=a.resolve(o+r.map[i.top*r.width])),s.right<r.width&&(n=a.resolve(o+r.map[r.width*(s.top+1)-1]))):(s.left>0&&(n=a.resolve(o+r.map[s.top*r.width])),i.right<r.width&&(e=a.resolve(o+r.map[r.width*(i.top+1)-1]))),new t(e,n)},t.prototype.toJSON=function(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}},t.fromJSON=function(e,n){return new t(e.resolve(n.anchor),e.resolve(n.head))},t.create=function(e,n,r){return void 0===r&&(r=n),new t(e.resolve(n),e.resolve(r))},t.prototype.getBookmark=function(){return new E(this.$anchorCell.pos,this.$headCell.pos)},t}(i.Selection);A.prototype.visible=!1,i.Selection.jsonID("cell",A);var E=function(e,t){this.anchor=e,this.head=t};function M(e){if(!(e.selection instanceof A))return null;var t=[];return e.selection.forEachCell((function(e,n){t.push(s.Decoration.node(n,n+e.nodeSize,{class:"selectedCell"}))})),s.DecorationSet.create(e.doc,t)}function T(e,t){var n=e.getAttribute("data-colwidth"),r=n&&/^\d+(,\d+)*$/.test(n)?n.split(",").map((function(e){return Number(e)})):null,o=Number(e.getAttribute("colspan")||1),i={colspan:o,rowspan:Number(e.getAttribute("rowspan")||1),colwidth:r&&r.length==o?r:null};for(var s in t){var a=t[s].getFromDOM,c=a&&a(e);null!=c&&(i[s]=c)}return i}function D(e,t){var n={};for(var r in 1!=e.attrs.colspan&&(n.colspan=e.attrs.colspan),1!=e.attrs.rowspan&&(n.rowspan=e.attrs.rowspan),e.attrs.colwidth&&(n["data-colwidth"]=e.attrs.colwidth.join(",")),t){var o=t[r].setDOMAttr;o&&o(e.attrs[r],n)}return n}function N(e){var t=e.cached.tableNodeTypes;if(!t)for(var n in t=e.cached.tableNodeTypes={},e.nodes){var r=e.nodes[n],o=r.spec.tableRole;o&&(t[o]=r)}return t}function R(e){if(!e.size)return null;for(var t=e.content,n=e.openStart,r=e.openEnd;1==t.childCount&&(n>0&&r>0||"table"==t.firstChild.type.spec.tableRole);)n--,r--,t=t.firstChild.content;var o=t.firstChild,i=o.type.spec.tableRole,s=o.type.schema,c=[];if("row"==i)for(var u=0;u<t.childCount;u++){var l=t.child(u).content,p=u?0:Math.max(0,n-1),f=u<t.childCount-1?0:Math.max(0,r-1);(p||f)&&(l=I(N(s).row,new a.Slice(l,p,f)).content),c.push(l)}else{if("cell"!=i&&"header_cell"!=i)return null;c.push(n||r?I(N(s).row,new a.Slice(t,n,r)).content:t)}return function(e,t){for(var n=[],r=0;r<t.length;r++)for(var o=t[r],i=o.childCount-1;i>=0;i--)for(var s=o.child(i).attrs,c=s.rowspan,u=s.colspan,l=r;l<r+c;l++)n[l]=(n[l]||0)+u;for(var p=0,f=0;f<n.length;f++)p=Math.max(p,n[f]);for(var h=0;h<n.length;h++)if(h>=t.length&&t.push(a.Fragment.empty),n[h]<p){for(var d=N(e).cell.createAndFill(),m=[],v=n[h];v<p;v++)m.push(d);t[h]=t[h].append(a.Fragment.from(m))}return{height:t.length,width:p,rows:t}}(s,c)}function I(e,t){var n=e.createAndFill();return new c.Transform(n).replace(0,n.content.size,t).doc}function P(e,t,n){var r=e.width,o=e.height,i=e.rows;if(r!=t){for(var s=[],c=[],u=0;u<i.length;u++){for(var l=i[u],p=[],f=s[u]||0,h=0;f<t;h++){var d=l.child(h%l.childCount);f+d.attrs.colspan>t&&(d=d.type.create(S(d.attrs,d.attrs.colspan,f+d.attrs.colspan-t),d.content)),p.push(d),f+=d.attrs.colspan;for(var m=1;m<d.attrs.rowspan;m++)s[u+m]=(s[u+m]||0)+d.attrs.colspan}c.push(a.Fragment.from(p))}i=c,r=t}if(o!=n){for(var v=[],g=0,y=0;g<n;g++,y++){for(var b=[],w=i[y%o],k=0;k<w.childCount;k++){var x=w.child(k);g+x.attrs.rowspan>n&&(x=x.type.create(C(x.attrs,"rowspan",n-x.attrs.rowspan),x.content)),b.push(x)}v.push(a.Fragment.from(b))}i=v,o=n}return{width:r,height:o,rows:i}}function j(e,t,n,r,o,i,s,a){if(0==s||s==t.height)return!1;for(var c=!1,u=o;u<i;u++){var l=s*t.width+u,p=t.map[l];if(t.map[l-t.width]==p){c=!0;var f=n.nodeAt(p),h=t.findCell(p),d=h.top,m=h.left;e.setNodeMarkup(e.mapping.slice(a).map(p+r),null,C(f.attrs,"rowspan",s-d)),e.insert(e.mapping.slice(a).map(t.positionAt(s,m,n)),f.type.createAndFill(C(f.attrs,"rowspan",d+f.attrs.rowspan-s))),u+=f.attrs.colspan-1}}return c}function z(e,t,n,r,o,i,s,a){if(0==s||s==t.width)return!1;for(var c=!1,u=o;u<i;u++){var l=u*t.width+s,p=t.map[l];if(t.map[l-1]==p){c=!0;var f=n.nodeAt(p),h=t.colCount(p),d=e.mapping.slice(a).map(p+r);e.setNodeMarkup(d,null,S(f.attrs,s-h,f.attrs.colspan-(s-h))),e.insert(d+f.nodeSize,f.type.createAndFill(S(f.attrs,0,s-h))),u+=f.attrs.rowspan-1}}return c}function F(e,t,n,r,o){var i=n?e.doc.nodeAt(n-1):e.doc,s=d.get(i),c=r.top,u=r.left,l=u+o.width,p=c+o.height,f=e.tr,h=0;function m(){i=n?f.doc.nodeAt(n-1):f.doc,s=d.get(i),h=f.mapping.maps.length}(function(e,t,n,r,o,i,s){var c,u,l=N(e.doc.type.schema);if(o>t.width)for(var p=0,f=0;p<t.height;p++){var h=n.child(p);f+=h.nodeSize;var d=[],m=void 0;m=null==h.lastChild||h.lastChild.type==l.cell?c||(c=l.cell.createAndFill()):u||(u=l.header_cell.createAndFill());for(var v=t.width;v<o;v++)d.push(m);e.insert(e.mapping.slice(s).map(f-1+r),d)}if(i>t.height){for(var g=[],y=0,b=(t.height-1)*t.width;y<Math.max(t.width,o);y++){var w=!(y>=t.width)&&n.nodeAt(t.map[b+y]).type==l.header_cell;g.push(w?u||(u=l.header_cell.createAndFill()):c||(c=l.cell.createAndFill()))}for(var k=l.row.create(null,a.Fragment.from(g)),x=[],_=t.height;_<i;_++)x.push(k);e.insert(e.mapping.slice(s).map(r+n.nodeSize-2),x)}return!(!c&&!u)})(f,s,i,n,l,p,h)&&m(),j(f,s,i,n,u,l,c,h)&&m(),j(f,s,i,n,u,l,p,h)&&m(),z(f,s,i,n,c,p,u,h)&&m(),z(f,s,i,n,c,p,l,h)&&m();for(var v=c;v<p;v++){var g=s.positionAt(v,u,i),y=s.positionAt(v,l,i);f.replace(f.mapping.slice(h).map(g+n),f.mapping.slice(h).map(y+n),new a.Slice(o.rows[v-c],0,0))}m(),f.setSelection(new A(f.doc.resolve(n+s.positionAt(c,u,i)),f.doc.resolve(n+s.positionAt(p-1,l-1,i)))),t(f)}E.prototype.map=function(e){return new E(e.map(this.anchor),e.map(this.head))},E.prototype.resolve=function(e){var t=e.resolve(this.anchor),n=e.resolve(this.head);return"row"==t.parent.type.spec.tableRole&&"row"==n.parent.type.spec.tableRole&&t.index()<t.parent.childCount&&n.index()<n.parent.childCount&&x(t,n)?new A(t,n):i.Selection.near(n,1)};var $=u.keydownHandler({ArrowLeft:B("horiz",-1),ArrowRight:B("horiz",1),ArrowUp:B("vert",-1),ArrowDown:B("vert",1),"Shift-ArrowLeft":q("horiz",-1),"Shift-ArrowRight":q("horiz",1),"Shift-ArrowUp":q("vert",-1),"Shift-ArrowDown":q("vert",1),Backspace:V,"Mod-Backspace":V,Delete:V,"Mod-Delete":V});function L(e,t,n){return!n.eq(e.selection)&&(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function B(e,t){return function(n,r,o){var s=n.selection;if(s instanceof A)return L(n,r,i.Selection.near(s.$headCell,t));if("horiz"!=e&&!s.empty)return!1;var a=J(o,e,t);if(null==a)return!1;if("horiz"==e)return L(n,r,i.Selection.near(n.doc.resolve(s.head+t),t));var c,u=n.doc.resolve(a),l=_(u,e,t);return c=l?i.Selection.near(l,1):t<0?i.Selection.near(n.doc.resolve(u.before(-1)),-1):i.Selection.near(n.doc.resolve(u.after(-1)),1),L(n,r,c)}}function q(e,t){return function(n,r,o){var i=n.selection;if(!(i instanceof A)){var s=J(o,e,t);if(null==s)return!1;i=new A(n.doc.resolve(s))}var a=_(i.$headCell,e,t);return!!a&&L(n,r,new A(i.$anchorCell,a))}}function V(e,t){var n=e.selection;if(!(n instanceof A))return!1;if(t){var r=e.tr,o=N(e.schema).cell.createAndFill().content;n.forEachCell((function(e,t){e.content.eq(o)||r.replace(r.mapping.map(t+1),r.mapping.map(t+e.nodeSize-1),new a.Slice(o,0,0))})),r.docChanged&&t(r)}return!0}function H(e,t){var n=g(e.state.doc.resolve(t));return!!n&&(e.dispatch(e.state.tr.setSelection(new A(n))),!0)}function U(e,t,n){if(!y(e.state))return!1;var r=R(n),o=e.state.selection;if(o instanceof A){r||(r={width:1,height:1,rows:[a.Fragment.from(I(N(e.state.schema).cell,n))]});var i=o.$anchorCell.node(-1),s=o.$anchorCell.start(-1),c=d.get(i).rectBetween(o.$anchorCell.pos-s,o.$headCell.pos-s);return r=P(r,c.right-c.left,c.bottom-c.top),F(e.state,e.dispatch,s,c,r),!0}if(r){var u=b(e.state),l=u.start(-1);return F(e.state,e.dispatch,l,d.get(u.node(-1)).findCell(u.pos-l),r),!0}return!1}function W(e,t){if(!t.ctrlKey&&!t.metaKey){var n,r=K(e,t.target);if(t.shiftKey&&e.state.selection instanceof A)o(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&null!=(n=g(e.state.selection.$anchor))&&G(e,t).pos!=n.pos)o(n,t),t.preventDefault();else if(!r)return;e.root.addEventListener("mouseup",i),e.root.addEventListener("dragstart",i),e.root.addEventListener("mousemove",s)}function o(t,n){var r=G(e,n),o=null==v.getState(e.state);if(!r||!x(t,r)){if(!o)return;r=t}var i=new A(t,r);if(o||!e.state.selection.eq(i)){var s=e.state.tr.setSelection(i);o&&s.setMeta(v,t.pos),e.dispatch(s)}}function i(){e.root.removeEventListener("mouseup",i),e.root.removeEventListener("dragstart",i),e.root.removeEventListener("mousemove",s),null!=v.getState(e.state)&&e.dispatch(e.state.tr.setMeta(v,-1))}function s(n){var s,a=v.getState(e.state);if(null!=a)s=e.state.doc.resolve(a);else if(K(e,n.target)!=r&&!(s=G(e,t)))return i();s&&o(s,n)}}function J(e,t,n){if(!(e.state.selection instanceof i.TextSelection))return null;for(var r=e.state.selection.$head,o=r.depth-1;o>=0;o--){var s=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:s.childCount))return null;if("cell"==s.type.spec.tableRole||"header_cell"==s.type.spec.tableRole){var a=r.before(o),c="vert"==t?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(c)?a:null}}return null}function K(e,t){for(;t&&t!=e.dom;t=t.parentNode)if("TD"==t.nodeName||"TH"==t.nodeName)return t}function G(e,t){var n=e.posAtCoords({left:t.clientX,top:t.clientY});return n&&n?g(e.state.doc.resolve(n.pos)):null}var Z=new i.PluginKey("fix-tables");function X(e,t){var n,r=function(t,r){"table"==t.type.spec.tableRole&&(n=function(e,t,n,r){var o=d.get(t);if(!o.problems)return r;r||(r=e.tr);for(var i,s,a=[],c=0;c<o.height;c++)a.push(0);for(var u=0;u<o.problems.length;u++){var l=o.problems[u];if("collision"==l.type){for(var p=t.nodeAt(l.pos),f=0;f<p.attrs.rowspan;f++)a[l.row+f]+=l.n;r.setNodeMarkup(r.mapping.map(n+1+l.pos),null,S(p.attrs,p.attrs.colspan-l.n,l.n))}else if("missing"==l.type)a[l.row]+=l.n;else if("overlong_rowspan"==l.type){var h=t.nodeAt(l.pos);r.setNodeMarkup(r.mapping.map(n+1+l.pos),null,C(h.attrs,"rowspan",h.attrs.rowspan-l.n))}else if("colwidth mismatch"==l.type){var m=t.nodeAt(l.pos);r.setNodeMarkup(r.mapping.map(n+1+l.pos),null,C(m.attrs,"colwidth",l.colwidth))}}for(var v=0;v<a.length;v++)a[v]&&(null==i&&(i=v),s=v);for(var g=0,y=n+1;g<o.height;g++){var b=t.child(g),w=y+b.nodeSize,k=a[g];if(k>0){var x="cell";b.firstChild&&(x=b.firstChild.type.spec.tableRole);for(var _=[],O=0;O<k;O++)_.push(N(e.schema)[x].createAndFill());var A=0!=g&&i!=g-1||s!=g?w-1:y+1;r.insert(r.mapping.map(A),_)}y=w}return r.setMeta(Z,{fixTables:!0})}(e,t,r,n))};return t?t.doc!=e.doc&&function e(t,n,r,o){var i=t.childCount,s=n.childCount;e:for(var a=0,c=0;a<s;a++){for(var u=n.child(a),l=c,p=Math.min(i,a+3);l<p;l++)if(t.child(l)==u){c=l+1,r+=u.nodeSize;continue e}o(u,r),c<i&&t.child(c).sameMarkup(u)?e(t.child(c),u,r+1,o):u.nodesBetween(0,u.content.size,o,r+1),r+=u.nodeSize}}(t.doc,e.doc,0,r):e.doc.descendants(r),n}function Y(e){var t,n=e.selection,r=b(e),o=r.node(-1),i=r.start(-1),s=d.get(o);return(t=n instanceof A?s.rectBetween(n.$anchorCell.pos-i,n.$headCell.pos-i):s.findCell(r.pos-i)).tableStart=i,t.map=s,t.table=o,t}function Q(e,t,n){var r=t.map,o=t.tableStart,i=t.table,s=n>0?-1:0;(function(e,t,n){for(var r=N(t.type.schema).header_cell,o=0;o<e.height;o++)if(t.nodeAt(e.map[n+o*e.width]).type!=r)return!1;return!0})(r,i,n+s)&&(s=0==n||n==r.width?null:0);for(var a=0;a<r.height;a++){var c=a*r.width+n;if(n>0&&n<r.width&&r.map[c-1]==r.map[c]){var u=r.map[c],l=i.nodeAt(u);e.setNodeMarkup(e.mapping.map(o+u),null,O(l.attrs,n-r.colCount(u))),a+=l.attrs.rowspan-1}else{var p=null==s?N(i.type.schema).cell:i.nodeAt(r.map[c+s]).type,f=r.positionAt(a,n,i);e.insert(e.mapping.map(o+f),p.createAndFill())}}return e}function ee(e,t,n){for(var r=t.map,o=t.table,i=t.tableStart,s=e.mapping.maps.length,a=0;a<r.height;){var c=a*r.width+n,u=r.map[c],l=o.nodeAt(u);if(n>0&&r.map[c-1]==u||n<r.width-1&&r.map[c+1]==u)e.setNodeMarkup(e.mapping.slice(s).map(i+u),null,S(l.attrs,n-r.colCount(u)));else{var p=e.mapping.slice(s).map(i+u);e.delete(p,p+l.nodeSize)}a+=l.attrs.rowspan}}function te(e,t,n){for(var r=t.map,o=t.tableStart,i=t.table,s=o,a=0;a<n;a++)s+=i.child(a).nodeSize;var c=[],u=n>0?-1:0;(function(e,t,n){for(var r=N(t.type.schema).header_cell,o=0;o<e.width;o++)if(t.nodeAt(e.map[o+n*e.width]).type!=r)return!1;return!0})(r,i,n+u)&&(u=0==n||n==r.height?null:0);for(var l=0,p=r.width*n;l<r.width;l++,p++)if(n>0&&n<r.height&&r.map[p]==r.map[p-r.width]){var f=r.map[p],h=i.nodeAt(f).attrs;e.setNodeMarkup(o+f,null,C(h,"rowspan",h.rowspan+1)),l+=h.colspan-1}else{var d=null==u?N(i.type.schema).cell:i.nodeAt(r.map[p+u*r.width]).type;c.push(d.createAndFill())}return e.insert(s,N(i.type.schema).row.create(null,c)),e}function ne(e,t,n){for(var r=t.map,o=t.table,i=t.tableStart,s=0,a=0;a<n;a++)s+=o.child(a).nodeSize;var c=s+o.child(n).nodeSize,u=e.mapping.maps.length;e.delete(s+i,c+i);for(var l=0,p=n*r.width;l<r.width;l++,p++){var f=r.map[p];if(n>0&&f==r.map[p-r.width]){var h=o.nodeAt(f).attrs;e.setNodeMarkup(e.mapping.slice(u).map(f+i),null,C(h,"rowspan",h.rowspan-1)),l+=h.colspan-1}else if(n<r.width&&f==r.map[p+r.width]){var d=o.nodeAt(f),m=d.type.create(C(d.attrs,"rowspan",d.attrs.rowspan-1),d.content),v=r.positionAt(n+1,l,o);e.insert(e.mapping.slice(u).map(i+v),m),l+=d.attrs.colspan-1}}}function re(e){var t=e.content;return 1==t.childCount&&t.firstChild.isTextblock&&0==t.firstChild.childCount}function oe(e){return function(t,n){var r,o,i=t.selection;if(i instanceof A){if(i.$anchorCell.pos!=i.$headCell.pos)return!1;r=i.$anchorCell.nodeAfter,o=i.$anchorCell.pos}else{if(!(r=function(e){for(var t=e.depth;t>0;t--){var n=e.node(t).type.spec.tableRole;if("cell"===n||"header_cell"===n)return e.node(t)}return null}(i.$from)))return!1;o=g(i.$from).pos}if(1==r.attrs.colspan&&1==r.attrs.rowspan)return!1;if(n){var s=r.attrs,a=[],c=s.colwidth;s.rowspan>1&&(s=C(s,"rowspan",1)),s.colspan>1&&(s=C(s,"colspan",1));for(var u,l=Y(t),p=t.tr,f=0;f<l.right-l.left;f++)a.push(c?C(s,"colwidth",c&&c[f]?[c[f]]:null):s);for(var h=l.top;h<l.bottom;h++){var d=l.map.positionAt(h,l.left,l.table);h==l.top&&(d+=r.nodeSize);for(var m=l.left,v=0;m<l.right;m++,v++)m==l.left&&h==l.top||p.insert(u=p.mapping.map(d+l.tableStart,1),e({node:r,row:h,col:m}).createAndFill(a[v]))}p.setNodeMarkup(o,e({node:r,row:l.top,col:l.left}),a[0]),i instanceof A&&p.setSelection(new A(p.doc.resolve(i.$anchorCell.pos),u&&p.doc.resolve(u))),n(p)}return!0}}function ie(e,t,n){for(var r=t.map.cellsInRect({left:0,top:0,right:"row"==e?t.map.width:1,bottom:"column"==e?t.map.height:1}),o=0;o<r.length;o++){var i=t.table.nodeAt(r[o]);if(i&&i.type!==n.header_cell)return!1}return!0}function se(e,t){return(t=t||{useDeprecatedLogic:!1}).useDeprecatedLogic?function(e){return function(t,n){if(!y(t))return!1;if(n){for(var r=N(t.schema),o=Y(t),i=t.tr,s=o.map.cellsInRect("column"==e?new h(o.left,0,o.right,o.map.height):"row"==e?new h(0,o.top,o.map.width,o.bottom):o),a=s.map((function(e){return o.table.nodeAt(e)})),c=0;c<s.length;c++)a[c].type==r.header_cell&&i.setNodeMarkup(o.tableStart+s[c],r.cell,a[c].attrs);if(0==i.steps.length)for(var u=0;u<s.length;u++)i.setNodeMarkup(o.tableStart+s[u],r.header_cell,a[u].attrs);n(i)}return!0}}(e):function(t,n){if(!y(t))return!1;if(n){var r=N(t.schema),o=Y(t),i=t.tr,s=ie("row",o,r),a=ie("column",o,r),c=("column"===e?s:"row"===e&&a)?1:0,u="column"==e?new h(0,c,1,o.map.height):"row"==e?new h(c,0,o.map.width,1):o,l="column"==e?a?r.cell:r.header_cell:"row"==e?s?r.cell:r.header_cell:r.cell;o.map.cellsInRect(u).forEach((function(e){var t=e+o.tableStart,n=i.doc.nodeAt(t);n&&i.setNodeMarkup(t,l,n.attrs)})),n(i)}return!0}}var ae=se("row",{useDeprecatedLogic:!0}),ce=se("column",{useDeprecatedLogic:!0}),ue=se("cell",{useDeprecatedLogic:!0});var le=function(e,t){this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),pe(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))};function pe(e,t,n,r,o,i){for(var s=0,a=!0,c=t.firstChild,u=e.firstChild,l=0,p=0;l<u.childCount;l++)for(var f=u.child(l).attrs,h=f.colspan,d=f.colwidth,m=0;m<h;m++,p++){var v=o==p?i:d&&d[m],g=v?v+"px":"";s+=v||r,v||(a=!1),c?(c.style.width!=g&&(c.style.width=g),c=c.nextSibling):t.appendChild(document.createElement("col")).style.width=g}for(;c;){var y=c.nextSibling;c.parentNode.removeChild(c),c=y}a?(n.style.width=s+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=s+"px")}le.prototype.update=function(e){return e.type==this.node.type&&(this.node=e,pe(e,this.colgroup,this.table,this.cellMinWidth),!0)},le.prototype.ignoreMutation=function(e){return"attributes"==e.type&&(e.target==this.table||this.colgroup.contains(e.target))};var fe=new i.PluginKey("tableColumnResizing");var he=function(e,t){this.activeHandle=e,this.dragging=t};function de(e,t,n){var r=e.posAtCoords({left:t.clientX,top:t.clientY}).pos,o=g(e.state.doc.resolve(r));if(!o)return-1;if("right"==n)return o.pos;var i=d.get(o.node(-1)),s=o.start(-1),a=i.map.indexOf(o.pos-s);return a%i.width==0?-1:s+i.map[a-1]}function me(e,t,n){var r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function ve(e,t){e.dispatch(e.state.tr.setMeta(fe,{setHandle:t}))}function ge(e){for(var t=[],n=0;n<e;n++)t.push(0);return t}he.prototype.apply=function(e){var t=this,n=e.getMeta(fe);if(n&&null!=n.setHandle)return new he(n.setHandle,null);if(n&&void 0!==n.setDragging)return new he(t.activeHandle,n.setDragging);if(t.activeHandle>-1&&e.docChanged){var r=e.mapping.map(t.activeHandle,-1);w(e.doc.resolve(r))||(r=null),t=new he(r,t.dragging)}return t},t.tableEditing=function(e){void 0===e&&(e={});var t=e.allowTableNodeSelection;return void 0===t&&(t=!1),new i.Plugin({key:v,state:{init:function(){return null},apply:function(e,t){var n=e.getMeta(v);if(null!=n)return-1==n?null:n;if(null==t||!e.docChanged)return t;var r=e.mapping.mapResult(t),o=r.deleted,i=r.pos;return o?null:i}},props:{decorations:M,handleDOMEvents:{mousedown:W},createSelectionBetween:function(e){if(null!=v.getState(e.state))return e.state.selection},handleTripleClick:H,handleKeyDown:$,handlePaste:U},appendTransaction:function(e,n,r){return function(e,t,n){var r,o,s=(t||e).selection,a=(t||e).doc;if(s instanceof i.NodeSelection&&(o=s.node.type.spec.tableRole)){if("cell"==o||"header_cell"==o)r=A.create(a,s.from);else if("row"==o){var c=a.resolve(s.from+1);r=A.rowSelection(c,c)}else if(!n){var u=d.get(s.node),l=s.from+1,p=l+u.map[u.width*u.height-1];r=A.create(a,l+1,p)}}else s instanceof i.TextSelection&&function(e){var t=e.$from,n=e.$to;if(t.pos==n.pos||t.pos<t.pos-6)return!1;for(var r=t.pos,o=n.pos,i=t.depth;i>=0&&!(t.after(i+1)<t.end(i));i--,r++);for(var s=n.depth;s>=0&&!(n.before(s+1)>n.start(s));s--,o--);return r==o&&/row|table/.test(t.node(i).type.spec.tableRole)}(s)?r=i.TextSelection.create(a,s.from):s instanceof i.TextSelection&&function(e){for(var t,n,r=e.$from,o=e.$to,i=r.depth;i>0;i--){var s=r.node(i);if("cell"===s.type.spec.tableRole||"header_cell"===s.type.spec.tableRole){t=s;break}}for(var a=o.depth;a>0;a--){var c=o.node(a);if("cell"===c.type.spec.tableRole||"header_cell"===c.type.spec.tableRole){n=c;break}}return t!==n&&0===o.parentOffset}(s)&&(r=i.TextSelection.create(a,s.$from.start(),s.$from.end()));return r&&(t||(t=e.tr)).setSelection(r),t}(r,X(r,n),t)}})},t.fixTables=X,t.handlePaste=U,t.fixTablesKey=Z,t.tableEditingKey=v,t.cellAround=g,t.isInTable=y,t.selectionCell=b,t.moveCellForward=k,t.inSameTable=x,t.findCell=function(e){return d.get(e.node(-1)).findCell(e.pos-e.start(-1))},t.colCount=function(e){return d.get(e.node(-1)).colCount(e.pos-e.start(-1))},t.nextCell=_,t.tableNodes=function(e){var t=e.cellAttributes||{},n={colspan:{default:1},rowspan:{default:1},colwidth:{default:null}};for(var r in t)n[r]={default:t[r].default};return{table:{content:"table_row+",tableRole:"table",isolating:!0,group:e.tableGroup,parseDOM:[{tag:"table"}],toDOM:function(){return["table",["tbody",0]]}},table_row:{content:"(table_cell | table_header)*",tableRole:"row",parseDOM:[{tag:"tr"}],toDOM:function(){return["tr",0]}},table_cell:{content:e.cellContent,attrs:n,tableRole:"cell",isolating:!0,parseDOM:[{tag:"td",getAttrs:function(e){return T(e,t)}}],toDOM:function(e){return["td",D(e,t),0]}},table_header:{content:e.cellContent,attrs:n,tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th",getAttrs:function(e){return T(e,t)}}],toDOM:function(e){return["th",D(e,t),0]}}}},t.CellSelection=A,t.TableMap=d,t.columnResizing=function(e){void 0===e&&(e={});var t=e.handleWidth;void 0===t&&(t=5);var n=e.cellMinWidth;void 0===n&&(n=25);var r=e.View;void 0===r&&(r=le);var o=e.lastColumnResizable;return void 0===o&&(o=!0),new i.Plugin({key:fe,state:{init:function(e,t){return this.spec.props.nodeViews[N(t.schema).table.name]=function(e,t){return new r(e,n,t)},new he(-1,!1)},apply:function(e,t){return t.apply(e)}},props:{attributes:function(e){return fe.getState(e).activeHandle>-1?{class:"resize-cursor"}:null},handleDOMEvents:{mousemove:function(e,n){!function(e,t,n,r,o){var i=fe.getState(e.state);if(!i.dragging){var s=function(e){for(;e&&"TD"!=e.nodeName&&"TH"!=e.nodeName;)e=e.classList.contains("ProseMirror")?null:e.parentNode;return e}(t.target),a=-1;if(s){var c=s.getBoundingClientRect(),u=c.left,l=c.right;t.clientX-u<=n?a=de(e,t,"left"):l-t.clientX<=n&&(a=de(e,t,"right"))}if(a!=i.activeHandle){if(!o&&-1!==a){var p=e.state.doc.resolve(a),f=p.node(-1),h=d.get(f),m=p.start(-1);if(h.colCount(p.pos-m)+p.nodeAfter.attrs.colspan-1==h.width-1)return}ve(e,a)}}}(e,n,t,0,o)},mouseleave:function(e){!function(e){var t=fe.getState(e.state);t.activeHandle>-1&&!t.dragging&&ve(e,-1)}(e)},mousedown:function(e,t){!function(e,t,n){var r=fe.getState(e.state);if(-1==r.activeHandle||r.dragging)return!1;var o=e.state.doc.nodeAt(r.activeHandle),i=function(e,t,n){var r=n.colspan,o=n.colwidth,i=o&&o[o.length-1];if(i)return i;var s=e.domAtPos(t),a=s.node.childNodes[s.offset].offsetWidth,c=r;if(o)for(var u=0;u<r;u++)o[u]&&(a-=o[u],c--);return a/c}(e,r.activeHandle,o.attrs);function s(t){window.removeEventListener("mouseup",s),window.removeEventListener("mousemove",a);var r=fe.getState(e.state);r.dragging&&(!function(e,t,n){for(var r=e.state.doc.resolve(t),o=r.node(-1),i=d.get(o),s=r.start(-1),a=i.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1,c=e.state.tr,u=0;u<i.height;u++){var l=u*i.width+a;if(!u||i.map[l]!=i.map[l-i.width]){var p=i.map[l],f=o.nodeAt(p).attrs,h=1==f.colspan?0:a-i.colCount(p);if(!f.colwidth||f.colwidth[h]!=n){var m=f.colwidth?f.colwidth.slice():ge(f.colspan);m[h]=n,c.setNodeMarkup(s+p,null,C(f,"colwidth",m))}}}c.docChanged&&e.dispatch(c)}(e,r.activeHandle,me(r.dragging,t,n)),e.dispatch(e.state.tr.setMeta(fe,{setDragging:null})))}function a(t){if(!t.which)return s(t);var r=fe.getState(e.state),o=me(r.dragging,t,n);!function(e,t,n,r){var o=e.state.doc.resolve(t),i=o.node(-1),s=o.start(-1),a=d.get(i).colCount(o.pos-s)+o.nodeAfter.attrs.colspan-1,c=e.domAtPos(o.start(-1)).node;for(;"TABLE"!=c.nodeName;)c=c.parentNode;pe(i,c.firstChild,c,r,a,n)}(e,r.activeHandle,o,n)}e.dispatch(e.state.tr.setMeta(fe,{setDragging:{startX:t.clientX,startWidth:i}})),window.addEventListener("mouseup",s),window.addEventListener("mousemove",a),t.preventDefault()}(e,t,n)}},decorations:function(e){var t=fe.getState(e);if(t.activeHandle>-1)return function(e,t){for(var n=[],r=e.doc.resolve(t),o=r.node(-1),i=d.get(o),a=r.start(-1),c=i.colCount(r.pos-a)+r.nodeAfter.attrs.colspan,u=0;u<i.height;u++){var l=c+u*i.width-1;if(!(c!=i.width&&i.map[l]==i.map[l+1]||0!=u&&i.map[l-1]==i.map[l-1-i.width])){var p=i.map[l],f=a+p+o.nodeAt(p).nodeSize-1,h=document.createElement("div");h.className="column-resize-handle",n.push(s.Decoration.widget(f,h))}}return s.DecorationSet.create(e.doc,n)}(e,t.activeHandle)},nodeViews:{}}})},t.columnResizingPluginKey=fe,t.updateColumnsOnResize=pe,t.__pastedCells=R,t.__insertCells=F,t.__clipCells=P,t.addColumn=Q,t.addColumnBefore=function(e,t){if(!y(e))return!1;if(t){var n=Y(e);t(Q(e.tr,n,n.left))}return!0},t.addColumnAfter=function(e,t){if(!y(e))return!1;if(t){var n=Y(e);t(Q(e.tr,n,n.right))}return!0},t.removeColumn=ee,t.deleteColumn=function(e,t){if(!y(e))return!1;if(t){var n=Y(e),r=e.tr;if(0==n.left&&n.right==n.map.width)return!1;for(var o=n.right-1;ee(r,n,o),o!=n.left;o--)n.table=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc,n.map=d.get(n.table);t(r)}return!0},t.addRow=te,t.addRowBefore=function(e,t){if(!y(e))return!1;if(t){var n=Y(e);t(te(e.tr,n,n.top))}return!0},t.addRowAfter=function(e,t){if(!y(e))return!1;if(t){var n=Y(e);t(te(e.tr,n,n.bottom))}return!0},t.removeRow=ne,t.deleteRow=function(e,t){if(!y(e))return!1;if(t){var n=Y(e),r=e.tr;if(0==n.top&&n.bottom==n.map.height)return!1;for(var o=n.bottom-1;ne(r,n,o),o!=n.top;o--)n.table=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc,n.map=d.get(n.table);t(r)}return!0},t.mergeCells=function(e,t){var n=e.selection;if(!(n instanceof A)||n.$anchorCell.pos==n.$headCell.pos)return!1;var r=Y(e),o=r.map;if(function(e,t){for(var n=e.width,r=e.height,o=e.map,i=t.top*n+t.left,s=i,a=(t.bottom-1)*n+t.left,c=i+(t.right-t.left-1),u=t.top;u<t.bottom;u++){if(t.left>0&&o[s]==o[s-1]||t.right<n&&o[c]==o[c+1])return!0;s+=n,c+=n}for(var l=t.left;l<t.right;l++){if(t.top>0&&o[i]==o[i-n]||t.bottom<r&&o[a]==o[a+n])return!0;i++,a++}return!1}(o,r))return!1;if(t){for(var i,s,c=e.tr,u={},l=a.Fragment.empty,p=r.top;p<r.bottom;p++)for(var f=r.left;f<r.right;f++){var h=o.map[p*o.width+f],d=r.table.nodeAt(h);if(!u[h])if(u[h]=!0,null==i)i=h,s=d;else{re(d)||(l=l.append(d.content));var m=c.mapping.map(h+r.tableStart);c.delete(m,m+d.nodeSize)}}if(c.setNodeMarkup(i+r.tableStart,null,C(O(s.attrs,s.attrs.colspan,r.right-r.left-s.attrs.colspan),"rowspan",r.bottom-r.top)),l.size){var v=i+1+s.content.size,g=re(s)?i+1:v;c.replaceWith(g+r.tableStart,v+r.tableStart,l)}c.setSelection(new A(c.doc.resolve(i+r.tableStart))),t(c)}return!0},t.splitCell=function(e,t){var n=N(e.schema);return oe((function(e){var t=e.node;return n[t.type.spec.tableRole]}))(e,t)},t.splitCellWithType=oe,t.setCellAttr=function(e,t){return function(n,r){if(!y(n))return!1;var o=b(n);if(o.nodeAfter.attrs[e]===t)return!1;if(r){var i=n.tr;n.selection instanceof A?n.selection.forEachCell((function(n,r){n.attrs[e]!==t&&i.setNodeMarkup(r,null,C(n.attrs,e,t))})):i.setNodeMarkup(o.pos,null,C(o.nodeAfter.attrs,e,t)),r(i)}return!0}},t.toggleHeader=se,t.toggleHeaderRow=ae,t.toggleHeaderColumn=ce,t.toggleHeaderCell=ue,t.goToNextCell=function(e){return function(t,n){if(!y(t))return!1;var r=function(e,t){if(t<0){var n=e.nodeBefore;if(n)return e.pos-n.nodeSize;for(var r=e.index(-1)-1,o=e.before();r>=0;r--){var i=e.node(-1).child(r);if(i.childCount)return o-1-i.lastChild.nodeSize;o-=i.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;for(var s=e.node(-1),a=e.indexAfter(-1),c=e.after();a<s.childCount;a++){var u=s.child(a);if(u.childCount)return c+1;c+=u.nodeSize}}}(b(t),e);if(null!=r){if(n){var o=t.doc.resolve(r);n(t.tr.setSelection(i.TextSelection.between(o,k(o))).scrollIntoView())}return!0}}},t.deleteTable=function(e,t){for(var n=e.selection.$anchor,r=n.depth;r>0;r--){if("table"==n.node(r).type.spec.tableRole)return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0}return!1}},function(e,t,n){"use strict";e.exports=n(482)},function(e,t,n){"use strict";e.exports=n(483)},function(e,t,n){"use strict";e.exports.encode=n(484),e.exports.decode=n(485),e.exports.format=n(486),e.exports.parse=n(487)},function(e,t){e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},function(e,t){e.exports=/[\0-\x1F\x7F-\x9F]/},function(e,t){e.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},function(e,t,n){"use strict";var r="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",o="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",i=new RegExp("^(?:"+r+"|"+o+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?].*?[?]>|<![A-Z]+\\s+[^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),s=new RegExp("^(?:"+r+"|"+o+")");e.exports.HTML_TAG_RE=i,e.exports.HTML_OPEN_CLOSE_TAG_RE=s},function(e,t,n){"use strict";e.exports.tokenize=function(e,t){var n,r,o,i,s=e.pos,a=e.src.charCodeAt(s);if(t)return!1;if(126!==a)return!1;if(o=(r=e.scanDelims(e.pos,!0)).length,i=String.fromCharCode(a),o<2)return!1;for(o%2&&(e.push("text","",0).content=i,o--),n=0;n<o;n+=2)e.push("text","",0).content=i+i,e.delimiters.push({marker:a,jump:n,token:e.tokens.length-1,level:e.level,end:-1,open:r.can_open,close:r.can_close});return e.pos+=r.length,!0},e.exports.postProcess=function(e){var t,n,r,o,i,s=[],a=e.delimiters,c=e.delimiters.length;for(t=0;t<c;t++)126===(r=a[t]).marker&&-1!==r.end&&(o=a[r.end],(i=e.tokens[r.token]).type="s_open",i.tag="s",i.nesting=1,i.markup="~~",i.content="",(i=e.tokens[o.token]).type="s_close",i.tag="s",i.nesting=-1,i.markup="~~",i.content="","text"===e.tokens[o.token-1].type&&"~"===e.tokens[o.token-1].content&&s.push(o.token-1));for(;s.length;){for(n=(t=s.pop())+1;n<e.tokens.length&&"s_close"===e.tokens[n].type;)n++;t!==--n&&(i=e.tokens[n],e.tokens[n]=e.tokens[t],e.tokens[t]=i)}}},function(e,t,n){"use strict";e.exports.tokenize=function(e,t){var n,r,o=e.pos,i=e.src.charCodeAt(o);if(t)return!1;if(95!==i&&42!==i)return!1;for(r=e.scanDelims(e.pos,42===i),n=0;n<r.length;n++)e.push("text","",0).content=String.fromCharCode(i),e.delimiters.push({marker:i,length:r.length,jump:n,token:e.tokens.length-1,level:e.level,end:-1,open:r.can_open,close:r.can_close});return e.pos+=r.length,!0},e.exports.postProcess=function(e){var t,n,r,o,i,s,a=e.delimiters;for(t=e.delimiters.length-1;t>=0;t--)95!==(n=a[t]).marker&&42!==n.marker||-1!==n.end&&(r=a[n.end],s=t>0&&a[t-1].end===n.end+1&&a[t-1].token===n.token-1&&a[n.end+1].token===r.token+1&&a[t-1].marker===n.marker,i=String.fromCharCode(n.marker),(o=e.tokens[n.token]).type=s?"strong_open":"em_open",o.tag=s?"strong":"em",o.nesting=1,o.markup=s?i+i:i,o.content="",(o=e.tokens[r.token]).type=s?"strong_close":"em_close",o.tag=s?"strong":"em",o.nesting=-1,o.markup=s?i+i:i,o.content="",s&&(e.tokens[a[t-1].token].content="",e.tokens[a[n.end+1].token].content="",t--))}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){function n(e){this.content=e}n.prototype={constructor:n,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return-1==t?void 0:this.content[t+1]},update:function(e,t,r){var o=r&&r!=e?this.remove(r):this,i=o.find(e),s=o.content.slice();return-1==i?s.push(r||e,t):(s[i+1]=t,r&&(s[i]=r)),new n(s)},remove:function(e){var t=this.find(e);if(-1==t)return this;var r=this.content.slice();return r.splice(t,2),new n(r)},addToStart:function(e,t){return new n([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var r=this.remove(e).content.slice();return r.push(e,t),new n(r)},addBefore:function(e,t,r){var o=this.remove(t),i=o.content.slice(),s=o.find(e);return i.splice(-1==s?i.length:s,0,t,r),new n(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return(e=n.from(e)).size?new n(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=n.from(e)).size?new n(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=n.from(e);for(var r=0;r<e.content.length;r+=2)t=t.remove(e.content[r]);return t},get size(){return this.content.length>>1}},n.from=function(e){if(e instanceof n)return e;var t=[];if(e)for(var r in e)t.push(r,e[r]);return new n(t)},e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(240),o=n(242);var i=function(e,t){var n=this;this.editorView=e,this.width=t.width||1,this.color=t.color||"black",this.class=t.class,this.cursorPos=null,this.element=null,this.timeout=null,this.handlers=["dragover","dragend","drop","dragleave"].map((function(t){var r=function(e){return n[t](e)};return e.dom.addEventListener(t,r),{name:t,handler:r}}))};i.prototype.destroy=function(){var e=this;this.handlers.forEach((function(t){var n=t.name,r=t.handler;return e.editorView.dom.removeEventListener(n,r)}))},i.prototype.update=function(e,t){null!=this.cursorPos&&t.doc!=e.state.doc&&this.updateOverlay()},i.prototype.setCursor=function(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())},i.prototype.updateOverlay=function(){var e,t=this.editorView.state.doc.resolve(this.cursorPos);if(!t.parent.inlineContent){var n=t.nodeBefore,r=t.nodeAfter;if(n||r){var o=this.editorView.nodeDOM(this.cursorPos-(n?n.nodeSize:0)).getBoundingClientRect(),i=n?o.bottom:o.top;n&&r&&(i=(i+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),e={left:o.left,right:o.right,top:i-this.width/2,bottom:i+this.width/2}}}if(!e){var s=this.editorView.coordsAtPos(this.cursorPos);e={left:s.left-this.width/2,right:s.left+this.width/2,top:s.top,bottom:s.bottom}}var a=this.editorView.dom.offsetParent;this.element||(this.element=a.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none; background-color: "+this.color);var c=!a||a==document.body&&"static"==getComputedStyle(a).position?{left:-pageXOffset,top:-pageYOffset}:a.getBoundingClientRect();this.element.style.left=e.left-c.left+"px",this.element.style.top=e.top-c.top+"px",this.element.style.width=e.right-e.left+"px",this.element.style.height=e.bottom-e.top+"px"},i.prototype.scheduleRemoval=function(e){var t=this;clearTimeout(this.timeout),this.timeout=setTimeout((function(){return t.setCursor(null)}),e)},i.prototype.dragover=function(e){if(this.editorView.editable){var t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY});if(t){var n=t.pos;this.editorView.dragging&&this.editorView.dragging.slice&&null==(n=o.dropPoint(this.editorView.state.doc,n,this.editorView.dragging.slice))&&(n=t.pos),this.setCursor(n),this.scheduleRemoval(5e3)}}},i.prototype.dragend=function(){this.scheduleRemoval(20)},i.prototype.drop=function(){this.scheduleRemoval(20)},i.prototype.dragleave=function(e){e.target!=this.editorView.dom&&this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)},t.dropCursor=function(e){return void 0===e&&(e={}),new r.Plugin({view:function(t){return new i(t,e)}})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(252),o=n(240),i=n(249),s=n(241),a=function(e){function t(t){e.call(this,t,t)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.map=function(n,r){var o=n.resolve(r.map(this.head));return t.valid(o)?new t(o):e.near(o)},t.prototype.content=function(){return s.Slice.empty},t.prototype.eq=function(e){return e instanceof t&&e.head==this.head},t.prototype.toJSON=function(){return{type:"gapcursor",pos:this.head}},t.fromJSON=function(e,n){if("number"!=typeof n.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new t(e.resolve(n.pos))},t.prototype.getBookmark=function(){return new c(this.anchor)},t.valid=function(e){var t=e.parent;if(t.isTextblock||!function(e){for(var t=e.depth;t>=0;t--){var n=e.index(t);if(0!=n)for(var r=e.node(t).child(n-1);;r=r.lastChild){if(0==r.childCount&&!r.inlineContent||r.isAtom||r.type.spec.isolating)return!0;if(r.inlineContent)return!1}}return!0}(e)||!function(e){for(var t=e.depth;t>=0;t--){var n=e.indexAfter(t),r=e.node(t);if(n!=r.childCount)for(var o=r.child(n);;o=o.firstChild){if(0==o.childCount&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}(e))return!1;var n=t.type.spec.allowGapCursor;if(null!=n)return n;var r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock},t.findFrom=function(e,n,r){if(!r&&t.valid(e))return e;for(var o=e.pos,i=null,s=e.depth;;s--){var a=e.node(s);if(n>0?e.indexAfter(s)<a.childCount:e.index(s)>0){i=a.maybeChild(n>0?e.indexAfter(s):e.index(s)-1);break}if(0==s)return null;o+=n;var c=e.doc.resolve(o);if(t.valid(c))return c}for(;i=n>0?i.firstChild:i.lastChild;){o+=n;var u=e.doc.resolve(o);if(t.valid(u))return u}return null},t}(o.Selection);a.prototype.visible=!1,o.Selection.jsonID("gapcursor",a);var c=function(e){this.pos=e};c.prototype.map=function(e){return new c(e.map(this.pos))},c.prototype.resolve=function(e){var t=e.resolve(this.pos);return a.valid(t)?new a(t):o.Selection.near(t)};var u=r.keydownHandler({ArrowLeft:l("horiz",-1),ArrowRight:l("horiz",1),ArrowUp:l("vert",-1),ArrowDown:l("vert",1)});function l(e,t){var n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,r,i){var s=e.selection,c=t>0?s.$to:s.$from,u=s.empty;if(s instanceof o.TextSelection){if(!i.endOfTextblock(n))return!1;u=!1,c=e.doc.resolve(t>0?c.after():c.before())}var l=a.findFrom(c,t,u);return!!l&&(r&&r(e.tr.setSelection(new a(l))),!0)}}function p(e,t,n){if(e.someProp("editable",(function(t){return!1===t(e.state)})))return!1;var r=e.state.doc.resolve(t);if(!a.valid(r))return!1;var i=e.posAtCoords({left:n.clientX,top:n.clientY}).inside;return!(i>-1&&o.NodeSelection.isSelectable(e.state.doc.nodeAt(i)))&&(e.dispatch(e.state.tr.setSelection(new a(r))),!0)}function f(e){if(!(e.selection instanceof a))return null;var t=document.createElement("div");return t.className="ProseMirror-gapcursor",i.DecorationSet.create(e.doc,[i.Decoration.widget(e.selection.head,t,{key:"gapcursor"})])}t.gapCursor=function(){return new o.Plugin({props:{decorations:f,createSelectionBetween:function(e,t,n){if(t.pos==n.pos&&a.valid(n))return new a(n)},handleClick:p,handleKeyDown:u}})},t.GapCursor=a},function(e,t){for(var n={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",229:"q"},r={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:";",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},o="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),i="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),s="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),a="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),c=o&&(a||+o[1]<57)||s&&a,u=0;u<10;u++)n[48+u]=n[96+u]=String(u);for(u=1;u<=24;u++)n[u+111]="F"+u;for(u=65;u<=90;u++)n[u]=String.fromCharCode(u+32),r[u]=String.fromCharCode(u);for(var l in n)r.hasOwnProperty(l)||(r[l]=n[l]);function p(e){var t=!(c&&(e.ctrlKey||e.altKey||e.metaKey)||i&&e.shiftKey&&e.key&&1==e.key.length)&&e.key||(e.shiftKey?r:n)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}e.exports=p,p.base=n,p.shift=r},function(e,t,n){"use strict";var r=n(475),o=n(476);function i(){}i.prototype=r;var s=new i;e.exports=s,s.highlight=function(e,t,n){var r=(n||{}).prefix;null==r&&(r=l);return k(w(e,t,!0,r))},s.highlightAuto=y,s.registerLanguage=function(e,t){var n=t(s);v[e]=n,m.push(e),n.aliases&&b(e,n.aliases)},s.listLanguages=function(){return m.concat()},s.registerAlias=b,s.getLanguage=C;var a=r.inherit,c={}.hasOwnProperty,u=[].concat,l="hljs-",p="case_insensitive",f="cached_variants",h=" ",d="|",m=[],v={},g={};function y(e,t){var n,r,i,s,a=t||{},c=a.subset||m,u=a.prefix,p=c.length,f=-1;if(null==u&&(u=l),"string"!=typeof e)throw o("Expected `string` for value, got `%s`",e);for(r=k({}),n=k({});++f<p;)C(s=c[f])&&((i=k(w(s,e,!1,u))).language=s,i.relevance>r.relevance&&(r=i),i.relevance>n.relevance&&(r=n,n=i));return r.language&&(n.secondBest=r),n}function b(e,t){var n,r,o,i,s=e;for(n in t&&((s={})[e]=t),s)for(o=(r="string"==typeof(r=s[n])?[r]:r).length,i=-1;++i<o;)g[r[i]]=n}function w(e,t,n,r,i){var s,l,m,g,b,k,S,O,A={},E=[],M="",T=0;if("string"!=typeof e)throw o("Expected `string` for name, got `%s`",e);if("string"!=typeof t)throw o("Expected `string` for value, got `%s`",t);if(s=C(e),m=l=i||s,g=O=[],!s)throw o("Unknown language: `%s` is not registered",e);!function(e){function t(t,r){return new RegExp(n(t),"m"+(e[p]?"i":"")+(r?"g":""))}function n(e){return e&&e.source||e}!function r(o,i){var s,c={};function l(t,n){var r,o,i,s;for(e[p]&&(n=n.toLowerCase()),s=(r=n.split(h)).length,i=-1;++i<s;)o=r[i].split(d),c[o[0]]=[t,o[1]?Number(o[1]):1]}o.compiled||(o.compiled=!0,o.keywords=o.keywords||o.beginKeywords,o.keywords&&("string"==typeof o.keywords?l("keyword",o.keywords):Object.keys(o.keywords).forEach((function(e){l(e,o.keywords[e])})),o.keywords=c),o.lexemesRe=t(o.lexemes||/\w+/,!0),i&&(o.beginKeywords&&(o.begin="\\b("+o.beginKeywords.split(h).join(d)+")\\b"),o.begin||(o.begin=/\B|\b/),o.beginRe=t(o.begin),o.end||o.endsWithParent||(o.end=/\B|\b/),o.end&&(o.endRe=t(o.end)),o.terminatorEnd=n(o.end)||"",o.endsWithParent&&i.terminatorEnd&&(o.terminatorEnd+=(o.end?d:"")+i.terminatorEnd)),o.illegal&&(o.illegalRe=t(o.illegal)),void 0===o.relevance&&(o.relevance=1),o.contains||(o.contains=[]),o.contains=u.apply([],o.contains.map((function(e){return function(e){var t,n,r,o;if(e.variants&&!e[f]){for(r=e.variants,t=r.length,n=-1,o=[];++n<t;)o[n]=a(e,{variants:null},r[n]);e[f]=o}return e[f]||(e.endsWithParent?[a(e)]:[e])}("self"===e?o:e)}))),o.contains.forEach((function(e){r(e,o)})),o.starts&&r(o.starts,i),s=o.contains.map((function(e){return e.beginKeywords?"\\.?("+e.begin+")\\.?":e.begin})).concat([o.terminatorEnd,o.illegal]).map(n).filter(Boolean),o.terminators=0===s.length?{exec:_}:t(s.join(d),!0))}(e)}(s);try{for(l.terminators.lastIndex=0,b=0,S=l.terminators.exec(t);S;)k=D(t.substring(b,S.index),S[0]),b=S.index+k,l.terminators.lastIndex=b,S=l.terminators.exec(t);for(D(t.substr(b)),m=l;m.parent;)m.className&&$(),m=m.parent;return{relevance:T,value:g,language:e,top:l}}catch(e){if(-1===e.message.indexOf("Illegal"))throw e;return{relevance:0,value:P(t,[])}}function D(e,t){var r,i,s;if(M+=e,void 0===t)return I(R(),g),0;if(r=function(e,t){var n=t.contains,r=n.length,o=-1;for(;++o<r;)if(x(n[o].beginRe,e))return n[o]}(t,l))return I(R(),g),N(r,t),r.returnBegin?0:t.length;if(i=function e(t,n){if(x(t.endRe,n)){for(;t.endsParent&&t.parent;)t=t.parent;return t}if(t.endsWithParent)return e(t.parent,n)}(l,t)){(s=l).returnEnd||s.excludeEnd||(M+=t),I(R(),g);do{l.className&&$(),T+=l.relevance,l=l.parent}while(l!==i.parent);return s.excludeEnd&&P(t,g),M="",i.starts&&N(i.starts,""),s.returnEnd?0:t.length}if(function(e,t){return!n&&x(t.illegalRe,e)}(t,l))throw o('Illegal lexeme "%s" for mode "%s"',t,l.className||"<unnamed>");return M+=t,t.length||1}function N(e,t){var n;e.className&&(n=z(e.className,[])),e.returnBegin?M="":e.excludeBegin?(P(t,g),M=""):M=t,n&&(g.push(n),E.push(g),g=n.children),l=Object.create(e,{parent:{value:l}})}function R(){var e=l.subLanguage?function(){var e,t="string"==typeof l.subLanguage;if(t&&!v[l.subLanguage])return P(M,[]);e=t?w(l.subLanguage,M,!0,r,A[l.subLanguage]):y(M,{subset:0===l.subLanguage.length?void 0:l.subLanguage,prefix:r});if(!e.language)return[j(M)];l.relevance>0&&(T+=e.relevance);t&&(A[l.subLanguage]=e.top);return[z(e.language,e.value,!0)]}():function(){var e,t,n,r,o=[];if(!l.keywords)return P(M,o);e=0,l.lexemesRe.lastIndex=0,t=l.lexemesRe.exec(M);for(;t;)P(M.substring(e,t.index),o),(r=F(l,t))?(T+=r[1],n=z(r[0],[]),o.push(n),P(t[0],n.children)):P(t[0],o),e=l.lexemesRe.lastIndex,t=l.lexemesRe.exec(M);return P(M.substr(e),o),o}();return M="",e}function I(e,t){for(var n,r=e.length,o=-1;++o<r;)"text"===(n=e[o]).type?P(n.value,t):t.push(n)}function P(e,t){var n;return e&&((n=t[t.length-1])&&"text"===n.type?n.value+=e:t.push(j(e))),t}function j(e){return{type:"text",value:e}}function z(e,t,n){return{type:"element",tagName:"span",properties:{className:[(n?"":r)+e]},children:t}}function F(e,t){var n=t[0];return s[p]&&(n=n.toLowerCase()),c.call(e.keywords,n)&&e.keywords[n]}function $(){g=E.pop()||O}}function k(e){return{relevance:e.relevance||0,language:e.language||null,value:e.value||[]}}function x(e,t){var n=e&&e.exec(t);return n&&0===n.index}function _(){return null}function C(e){return e=e.toLowerCase(),v[e]||v[g[e]]}},function(e,t,n){var r,o,i;o=function(e){var t,n=[],r=Object.keys,o={},i={},s=/^(no-?highlight|plain|text)$/i,a=/\blang(?:uage)?-([\w-]+)\b/i,c=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,u="</span>",l={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0};function p(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function f(e){return e.nodeName.toLowerCase()}function h(e,t){var n=e&&e.exec(t);return n&&0===n.index}function d(e){return s.test(e)}function m(e){var t,n={},r=Array.prototype.slice.call(arguments,1);for(t in e)n[t]=e[t];return r.forEach((function(e){for(t in e)n[t]=e[t]})),n}function v(e){var t=[];return function e(n,r){for(var o=n.firstChild;o;o=o.nextSibling)3===o.nodeType?r+=o.nodeValue.length:1===o.nodeType&&(t.push({event:"start",offset:r,node:o}),r=e(o,r),f(o).match(/br|hr|img|input/)||t.push({event:"stop",offset:r,node:o}));return r}(e,0),t}function g(e){if(t&&!e.langApiRestored){for(var n in e.langApiRestored=!0,t)e[n]&&(e[t[n]]=e[n]);(e.contains||[]).concat(e.variants||[]).forEach(g)}}function y(e){function t(e){return e&&e.source||e}function n(n,r){return new RegExp(t(n),"m"+(e.case_insensitive?"i":"")+(r?"g":""))}!function o(i,s){if(!i.compiled){if(i.compiled=!0,i.keywords=i.keywords||i.beginKeywords,i.keywords){var a={},c=function(t,n){e.case_insensitive&&(n=n.toLowerCase()),n.split(" ").forEach((function(e){var n=e.split("|");a[n[0]]=[t,n[1]?Number(n[1]):1]}))};"string"==typeof i.keywords?c("keyword",i.keywords):r(i.keywords).forEach((function(e){c(e,i.keywords[e])})),i.keywords=a}i.lexemesRe=n(i.lexemes||/\w+/,!0),s&&(i.beginKeywords&&(i.begin="\\b("+i.beginKeywords.split(" ").join("|")+")\\b"),i.begin||(i.begin=/\B|\b/),i.beginRe=n(i.begin),i.endSameAsBegin&&(i.end=i.begin),i.end||i.endsWithParent||(i.end=/\B|\b/),i.end&&(i.endRe=n(i.end)),i.terminator_end=t(i.end)||"",i.endsWithParent&&s.terminator_end&&(i.terminator_end+=(i.end?"|":"")+s.terminator_end)),i.illegal&&(i.illegalRe=n(i.illegal)),null==i.relevance&&(i.relevance=1),i.contains||(i.contains=[]),i.contains=Array.prototype.concat.apply([],i.contains.map((function(e){return function(e){return e.variants&&!e.cached_variants&&(e.cached_variants=e.variants.map((function(t){return m(e,{variants:null},t)}))),e.cached_variants||e.endsWithParent&&[m(e)]||[e]}("self"===e?i:e)}))),i.contains.forEach((function(e){o(e,i)})),i.starts&&o(i.starts,s);var u=i.contains.map((function(e){return e.beginKeywords?"\\.?(?:"+e.begin+")\\.?":e.begin})).concat([i.terminator_end,i.illegal]).map(t).filter(Boolean);i.terminators=u.length?n(function(e,n){for(var r=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./,o=0,i="",s=0;s<e.length;s++){var a=o,c=t(e[s]);for(s>0&&(i+=n);c.length>0;){var u=r.exec(c);if(null==u){i+=c;break}i+=c.substring(0,u.index),c=c.substring(u.index+u[0].length),"\\"==u[0][0]&&u[1]?i+="\\"+String(Number(u[1])+a):(i+=u[0],"("==u[0]&&o++)}}return i}(u,"|"),!0):{exec:function(){return null}}}}(e)}function b(e,t,n,r){function i(e){return new RegExp(e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")}function s(e,t){var n=m.case_insensitive?t[0].toLowerCase():t[0];return e.keywords.hasOwnProperty(n)&&e.keywords[n]}function a(e,t,n,r){var o='<span class="'+(r?"":l.classPrefix);return e?(o+=e+'">')+t+(n?"":u):t}function c(){x+=null!=g.subLanguage?function(){var e="string"==typeof g.subLanguage;if(e&&!o[g.subLanguage])return p(_);var t=e?b(g.subLanguage,_,!0,k[g.subLanguage]):w(_,g.subLanguage.length?g.subLanguage:void 0);return g.relevance>0&&(S+=t.relevance),e&&(k[g.subLanguage]=t.top),a(t.language,t.value,!1,!0)}():function(){var e,t,n,r;if(!g.keywords)return p(_);for(r="",t=0,g.lexemesRe.lastIndex=0,n=g.lexemesRe.exec(_);n;)r+=p(_.substring(t,n.index)),(e=s(g,n))?(S+=e[1],r+=a(e[0],p(n[0]))):r+=p(n[0]),t=g.lexemesRe.lastIndex,n=g.lexemesRe.exec(_);return r+p(_.substr(t))}(),_=""}function f(e){x+=e.className?a(e.className,"",!0):"",g=Object.create(e,{parent:{value:g}})}function d(e,t){if(_+=e,null==t)return c(),0;var r=function(e,t){var n,r;for(n=0,r=t.contains.length;n<r;n++)if(h(t.contains[n].beginRe,e))return t.contains[n].endSameAsBegin&&(t.contains[n].endRe=i(t.contains[n].beginRe.exec(e)[0])),t.contains[n]}(t,g);if(r)return r.skip?_+=t:(r.excludeBegin&&(_+=t),c(),r.returnBegin||r.excludeBegin||(_=t)),f(r),r.returnBegin?0:t.length;var o=function e(t,n){if(h(t.endRe,n)){for(;t.endsParent&&t.parent;)t=t.parent;return t}if(t.endsWithParent)return e(t.parent,n)}(g,t);if(o){var s=g;s.skip?_+=t:(s.returnEnd||s.excludeEnd||(_+=t),c(),s.excludeEnd&&(_=t));do{g.className&&(x+=u),g.skip||g.subLanguage||(S+=g.relevance),g=g.parent}while(g!==o.parent);return o.starts&&(o.endSameAsBegin&&(o.starts.endRe=o.endRe),f(o.starts)),s.returnEnd?0:t.length}if(function(e,t){return!n&&h(t.illegalRe,e)}(t,g))throw new Error('Illegal lexeme "'+t+'" for mode "'+(g.className||"<unnamed>")+'"');return _+=t,t.length||1}var m=C(e);if(!m)throw new Error('Unknown language: "'+e+'"');y(m);var v,g=r||m,k={},x="";for(v=g;v!==m;v=v.parent)v.className&&(x=a(v.className,"",!0)+x);var _="",S=0;try{for(var O,A,E=0;g.terminators.lastIndex=E,O=g.terminators.exec(t);)A=d(t.substring(E,O.index),O[0]),E=O.index+A;for(d(t.substr(E)),v=g;v.parent;v=v.parent)v.className&&(x+=u);return{relevance:S,value:x,language:e,top:g}}catch(e){if(e.message&&-1!==e.message.indexOf("Illegal"))return{relevance:0,value:p(t)};throw e}}function w(e,t){t=t||l.languages||r(o);var n={relevance:0,value:p(e)},i=n;return t.filter(C).filter(S).forEach((function(t){var r=b(t,e,!1);r.language=t,r.relevance>i.relevance&&(i=r),r.relevance>n.relevance&&(i=n,n=r)})),i.language&&(n.second_best=i),n}function k(e){return l.tabReplace||l.useBR?e.replace(c,(function(e,t){return l.useBR&&"\n"===e?"<br>":l.tabReplace?t.replace(/\t/g,l.tabReplace):""})):e}function x(e){var t,r,o,s,c,u=function(e){var t,n,r,o,i=e.className+" ";if(i+=e.parentNode?e.parentNode.className:"",n=a.exec(i))return C(n[1])?n[1]:"no-highlight";for(t=0,r=(i=i.split(/\s+/)).length;t<r;t++)if(d(o=i[t])||C(o))return o}(e);d(u)||(l.useBR?(t=document.createElementNS("http://www.w3.org/1999/xhtml","div")).innerHTML=e.innerHTML.replace(/\n/g,"").replace(/<br[ \/]*>/g,"\n"):t=e,c=t.textContent,o=u?b(u,c,!0):w(c),(r=v(t)).length&&((s=document.createElementNS("http://www.w3.org/1999/xhtml","div")).innerHTML=o.value,o.value=function(e,t,r){var o=0,i="",s=[];function a(){return e.length&&t.length?e[0].offset!==t[0].offset?e[0].offset<t[0].offset?e:t:"start"===t[0].event?e:t:e.length?e:t}function c(e){i+="<"+f(e)+n.map.call(e.attributes,(function(e){return" "+e.nodeName+'="'+p(e.value).replace('"',"&quot;")+'"'})).join("")+">"}function u(e){i+="</"+f(e)+">"}function l(e){("start"===e.event?c:u)(e.node)}for(;e.length||t.length;){var h=a();if(i+=p(r.substring(o,h[0].offset)),o=h[0].offset,h===e){s.reverse().forEach(u);do{l(h.splice(0,1)[0]),h=a()}while(h===e&&h.length&&h[0].offset===o);s.reverse().forEach(c)}else"start"===h[0].event?s.push(h[0].node):s.pop(),l(h.splice(0,1)[0])}return i+p(r.substr(o))}(r,v(s),c)),o.value=k(o.value),e.innerHTML=o.value,e.className=function(e,t,n){var r=t?i[t]:n,o=[e.trim()];return e.match(/\bhljs\b/)||o.push("hljs"),-1===e.indexOf(r)&&o.push(r),o.join(" ").trim()}(e.className,u,o.language),e.result={language:o.language,re:o.relevance},o.second_best&&(e.second_best={language:o.second_best.language,re:o.second_best.relevance}))}function _(){if(!_.called){_.called=!0;var e=document.querySelectorAll("pre code");n.forEach.call(e,x)}}function C(e){return e=(e||"").toLowerCase(),o[e]||o[i[e]]}function S(e){var t=C(e);return t&&!t.disableAutodetect}return e.highlight=b,e.highlightAuto=w,e.fixMarkup=k,e.highlightBlock=x,e.configure=function(e){l=m(l,e)},e.initHighlighting=_,e.initHighlightingOnLoad=function(){addEventListener("DOMContentLoaded",_,!1),addEventListener("load",_,!1)},e.registerLanguage=function(t,n){var r=o[t]=n(e);g(r),r.aliases&&r.aliases.forEach((function(e){i[e]=t}))},e.listLanguages=function(){return r(o)},e.getLanguage=C,e.autoDetection=S,e.inherit=m,e.IDENT_RE="[a-zA-Z]\\w*",e.UNDERSCORE_IDENT_RE="[a-zA-Z_]\\w*",e.NUMBER_RE="\\b\\d+(\\.\\d+)?",e.C_NUMBER_RE="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BINARY_NUMBER_RE="\\b(0b[01]+)",e.RE_STARTERS_RE="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BACKSLASH_ESCAPE={begin:"\\\\[\\s\\S]",relevance:0},e.APOS_STRING_MODE={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},e.QUOTE_STRING_MODE={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},e.PHRASAL_WORDS_MODE={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},e.COMMENT=function(t,n,r){var o=e.inherit({className:"comment",begin:t,end:n,contains:[]},r||{});return o.contains.push(e.PHRASAL_WORDS_MODE),o.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|XXX):",relevance:0}),o},e.C_LINE_COMMENT_MODE=e.COMMENT("//","$"),e.C_BLOCK_COMMENT_MODE=e.COMMENT("/\\*","\\*/"),e.HASH_COMMENT_MODE=e.COMMENT("#","$"),e.NUMBER_MODE={className:"number",begin:e.NUMBER_RE,relevance:0},e.C_NUMBER_MODE={className:"number",begin:e.C_NUMBER_RE,relevance:0},e.BINARY_NUMBER_MODE={className:"number",begin:e.BINARY_NUMBER_RE,relevance:0},e.CSS_NUMBER_MODE={className:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},e.REGEXP_MODE={className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}]},e.TITLE_MODE={className:"title",begin:e.IDENT_RE,relevance:0},e.UNDERSCORE_TITLE_MODE={className:"title",begin:e.UNDERSCORE_IDENT_RE,relevance:0},e.METHOD_GUARD={begin:"\\.\\s*"+e.UNDERSCORE_IDENT_RE,relevance:0},e},i="object"==typeof window&&window||"object"==typeof self&&self,t.nodeType?i&&(i.hljs=o({}),void 0===(r=function(){return i.hljs}.apply(t,[]))||(e.exports=r)):o(t)},function(e,t,n){"use strict";var r=n(477),o=i(Error);function i(e){return t.displayName=e.displayName||e.name,t;function t(t){return t&&(t=r.apply(null,arguments)),new e(t)}}e.exports=o,o.eval=i(EvalError),o.range=i(RangeError),o.reference=i(ReferenceError),o.syntax=i(SyntaxError),o.type=i(TypeError),o.uri=i(URIError),o.create=i},function(e,t,n){!function(){var t;function n(e){for(var t,n,r,o,i=1,s=[].slice.call(arguments),a=0,c=e.length,u="",l=!1,p=!1,f=function(){return s[i++]},h=function(){for(var n="";/\d/.test(e[a]);)n+=e[a++],t=e[a];return n.length>0?parseInt(n):null};a<c;++a)if(t=e[a],l)switch(l=!1,"."==t?(p=!1,t=e[++a]):"0"==t&&"."==e[a+1]?(p=!0,t=e[a+=2]):p=!0,o=h(),t){case"b":u+=parseInt(f(),10).toString(2);break;case"c":"string"==typeof(n=f())||n instanceof String?u+=n:u+=String.fromCharCode(parseInt(n,10));break;case"d":u+=parseInt(f(),10);break;case"f":r=String(parseFloat(f()).toFixed(o||6)),u+=p?r:r.replace(/^0/,"");break;case"j":u+=JSON.stringify(f());break;case"o":u+="0"+parseInt(f(),10).toString(8);break;case"s":u+=f();break;case"x":u+="0x"+parseInt(f(),10).toString(16);break;case"X":u+="0x"+parseInt(f(),10).toString(16).toUpperCase();break;default:u+=t}else"%"===t?l=!0:u+=t;return u}(t=e.exports=n).format=n,t.vsprintf=function(e,t){return n.apply(null,[e].concat(t))},"undefined"!=typeof console&&"function"==typeof console.log&&(t.printf=function(){console.log(n.apply(null,arguments))})}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=(r=n(479))&&"object"==typeof r&&"default"in r?r.default:r,i=n(242),s=n(240),a=function(e,t){this.items=e,this.eventCount=t};a.prototype.popEvent=function(e,t){var n=this;if(0==this.eventCount)return null;for(var r,o,i=this.items.length;;i--){if(n.items.get(i-1).selection){--i;break}}t&&(r=this.remapping(i,this.items.length),o=r.maps.length);var s,u,l=e.tr,p=[],f=[];return this.items.forEach((function(e,t){if(!e.step)return r||(r=n.remapping(i,t+1),o=r.maps.length),o--,void f.push(e);if(r){f.push(new c(e.map));var h,d=e.step.map(r.slice(o));d&&l.maybeStep(d).doc&&(h=l.mapping.maps[l.mapping.maps.length-1],p.push(new c(h,null,null,p.length+f.length))),o--,h&&r.appendMap(h,o)}else l.maybeStep(e.step);return e.selection?(s=r?e.selection.map(r.slice(o)):e.selection,u=new a(n.items.slice(0,i).append(f.reverse().concat(p)),n.eventCount-1),!1):void 0}),this.items.length,0),{remaining:u,transform:l,selection:s}},a.prototype.addTransform=function(e,t,n,r){for(var o=[],i=this.eventCount,s=this.items,u=!r&&s.length?s.get(s.length-1):null,p=0;p<e.steps.length;p++){var f,h=e.steps[p].invert(e.docs[p]),d=new c(e.mapping.maps[p],h,t);(f=u&&u.merge(d))&&(d=f,p?o.pop():s=s.slice(0,s.length-1)),o.push(d),t&&(i++,t=null),r||(u=d)}var m,v,g,y=i-n.depth;return y>l&&(v=y,(m=s).forEach((function(e,t){if(e.selection&&0==v--)return g=t,!1})),s=m.slice(g),i-=y),new a(s.append(o),i)},a.prototype.remapping=function(e,t){var n=new i.Mapping;return this.items.forEach((function(t,r){var o=null!=t.mirrorOffset&&r-t.mirrorOffset>=e?o=n.maps.length-t.mirrorOffset:null;n.appendMap(t.map,o)}),e,t),n},a.prototype.addMaps=function(e){return 0==this.eventCount?this:new a(this.items.append(e.map((function(e){return new c(e)}))),this.eventCount)},a.prototype.rebased=function(e,t){if(!this.eventCount)return this;var n=[],r=Math.max(0,this.items.length-t),o=e.mapping,i=e.steps.length,s=this.eventCount;this.items.forEach((function(e){e.selection&&s--}),r);var u=t;this.items.forEach((function(t){var r=o.getMirror(--u);if(null!=r){i=Math.min(i,r);var a=o.maps[r];if(t.step){var l=e.steps[r].invert(e.docs[r]),p=t.selection&&t.selection.map(o.slice(u+1,r));p&&s++,n.push(new c(a,l,p))}else n.push(new c(a))}}),r);for(var l=[],p=t;p<i;p++)l.push(new c(o.maps[p]));var f=this.items.slice(0,r).append(l).append(n),h=new a(f,s);return h.emptyItemCount()>500&&(h=h.compress(this.items.length-n.length)),h},a.prototype.emptyItemCount=function(){var e=0;return this.items.forEach((function(t){t.step||e++})),e},a.prototype.compress=function(e){void 0===e&&(e=this.items.length);var t=this.remapping(0,e),n=t.maps.length,r=[],i=0;return this.items.forEach((function(o,s){if(s>=e)r.push(o),o.selection&&i++;else if(o.step){var a=o.step.map(t.slice(n)),u=a&&a.getMap();if(n--,u&&t.appendMap(u,n),a){var l=o.selection&&o.selection.map(t.slice(n));l&&i++;var p,f=new c(u.invert(),a,l),h=r.length-1;(p=r.length&&r[h].merge(f))?r[h]=p:r.push(f)}}else o.map&&n--}),this.items.length,0),new a(o.from(r.reverse()),i)},a.empty=new a(o.empty,0);var c=function(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r};c.prototype.merge=function(e){if(this.step&&e.step&&!e.selection){var t=e.step.merge(this.step);if(t)return new c(t.getMap().invert(),t,this.selection)}};var u=function(e,t,n,r){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r},l=20;function p(e){var t=[];return e.forEach((function(e,n,r,o){return t.push(r,o)})),t}function f(e,t){if(!e)return null;for(var n=[],r=0;r<e.length;r+=2){var o=t.map(e[r],1),i=t.map(e[r+1],-1);o<=i&&n.push(o,i)}return n}function h(e,t,n,r){var o=v(t),i=g.get(t).spec.config,s=(r?e.undone:e.done).popEvent(t,o);if(s){var a=s.selection.resolve(s.transform.doc),c=(r?e.done:e.undone).addTransform(s.transform,t.selection.getBookmark(),i,o),l=new u(r?c:s.remaining,r?s.remaining:c,null,0);n(s.transform.setSelection(a).setMeta(g,{redo:r,historyState:l}).scrollIntoView())}}var d=!1,m=null;function v(e){var t=e.plugins;if(m!=t){d=!1,m=t;for(var n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){d=!0;break}}return d}var g=new s.PluginKey("history"),y=new s.PluginKey("closeHistory");t.HistoryState=u,t.closeHistory=function(e){return e.setMeta(y,!0)},t.history=function(e){return e={depth:e&&e.depth||100,newGroupDelay:e&&e.newGroupDelay||500},new s.Plugin({key:g,state:{init:function(){return new u(a.empty,a.empty,null,0)},apply:function(t,n,r){return function(e,t,n,r){var o,i=n.getMeta(g);if(i)return i.historyState;n.getMeta(y)&&(e=new u(e.done,e.undone,null,0));var s=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(s&&s.getMeta(g))return s.getMeta(g).redo?new u(e.done.addTransform(n,null,r,v(t)),e.undone,p(n.mapping.maps[n.steps.length-1]),e.prevTime):new u(e.done,e.undone.addTransform(n,null,r,v(t)),null,e.prevTime);if(!1===n.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(o=n.getMeta("rebased"))?new u(e.done.rebased(n,o),e.undone.rebased(n,o),f(e.prevRanges,n.mapping),e.prevTime):new u(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),f(e.prevRanges,n.mapping),e.prevTime);var c=e.prevTime<(n.time||0)-r.newGroupDelay||!s&&!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;var n=!1;return e.mapping.maps[0].forEach((function(e,r){for(var o=0;o<t.length;o+=2)e<=t[o+1]&&r>=t[o]&&(n=!0)})),n}(n,e.prevRanges),l=s?f(e.prevRanges,n.mapping):p(n.mapping.maps[n.steps.length-1]);return new u(e.done.addTransform(n,c?t.selection.getBookmark():null,r,v(t)),a.empty,l,n.time)}(n,r,t,e)}},config:e})},t.undo=function(e,t){var n=g.getState(e);return!(!n||0==n.done.eventCount)&&(t&&h(n,e,t,!1),!0)},t.redo=function(e,t){var n=g.getState(e);return!(!n||0==n.undone.eventCount)&&(t&&h(n,e,t,!0),!0)},t.undoDepth=function(e){var t=g.getState(e);return t?t.done.eventCount:0},t.redoDepth=function(e){var t=g.getState(e);return t?t.undone.eventCount:0}},function(e,t){var n=function(){};n.prototype.append=function(e){return e.length?(e=n.from(e),!this.length&&e||e.length<200&&this.leafAppend(e)||this.length<200&&e.leafPrepend(this)||this.appendInner(e)):this},n.prototype.prepend=function(e){return e.length?n.from(e).append(this):this},n.prototype.appendInner=function(e){return new o(this,e)},n.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?n.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},n.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},n.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},n.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var r=[];return this.forEach((function(t,n){return r.push(e(t,n))}),t,n),r},n.from=function(e){return e instanceof n?e:e&&e.length?new r(e):n.empty};var r=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{},depth:{}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var o=t;o<n;o++)if(!1===e(this.values[o],r+o))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var o=t-1;o>=n;o--)if(!1===e(this.values[o],r+o))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=200)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=200)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(n);n.empty=new r([]);var o=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var o=this.left.length;return!(t<o&&!1===this.left.forEachInner(e,t,Math.min(n,o),r))&&(!(n>o&&!1===this.right.forEachInner(e,Math.max(t-o,0),Math.min(this.length,n)-o,r+o))&&void 0)},t.prototype.forEachInvertedInner=function(e,t,n,r){var o=this.left.length;return!(t>o&&!1===this.right.forEachInvertedInner(e,t-o,Math.max(n,o)-o,r+o))&&(!(n<o&&!1===this.left.forEachInvertedInner(e,Math.min(t,o),n,r))&&void 0)},t.prototype.sliceInner=function(e,t){if(0==e&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(n);e.exports=n},,,function(e,t,n){"use strict";var r=n(238),o=n(490),i=n(494),s=n(495),a=n(503),c=n(517),u=n(530),l=n(274),p=n(532),f={default:n(534),zero:n(535),commonmark:n(536)},h=/^(vbscript|javascript|file|data):/,d=/^data:image\/(gif|png|jpeg|webp);/;function m(e){var t=e.trim().toLowerCase();return!h.test(t)||!!d.test(t)}var v=["http:","https:","mailto:"];function g(e){var t=l.parse(e,!0);if(t.hostname&&(!t.protocol||v.indexOf(t.protocol)>=0))try{t.hostname=p.toASCII(t.hostname)}catch(e){}return l.encode(l.format(t))}function y(e){var t=l.parse(e,!0);if(t.hostname&&(!t.protocol||v.indexOf(t.protocol)>=0))try{t.hostname=p.toUnicode(t.hostname)}catch(e){}return l.decode(l.format(t))}function b(e,t){if(!(this instanceof b))return new b(e,t);t||r.isString(e)||(t=e||{},e="default"),this.inline=new c,this.block=new a,this.core=new s,this.renderer=new i,this.linkify=new u,this.validateLink=m,this.normalizeLink=g,this.normalizeLinkText=y,this.utils=r,this.helpers=r.assign({},o),this.options={},this.configure(e),t&&this.set(t)}b.prototype.set=function(e){return r.assign(this.options,e),this},b.prototype.configure=function(e){var t,n=this;if(r.isString(e)&&!(e=f[t=e]))throw new Error('Wrong `markdown-it` preset "'+t+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&n.set(e.options),e.components&&Object.keys(e.components).forEach((function(t){e.components[t].rules&&n[t].ruler.enableOnly(e.components[t].rules),e.components[t].rules2&&n[t].ruler2.enableOnly(e.components[t].rules2)})),this},b.prototype.enable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.enable(e,!0))}),this),n=n.concat(this.inline.ruler2.enable(e,!0));var r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},b.prototype.disable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.disable(e,!0))}),this),n=n.concat(this.inline.ruler2.disable(e,!0));var r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},b.prototype.use=function(e){var t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},b.prototype.parse=function(e,t){if("string"!=typeof e)throw new Error("Input data should be a String");var n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},b.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},b.prototype.parseInline=function(e,t){var n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},b.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)},e.exports=b},function(e){e.exports=JSON.parse('{"Aacute":"Á","aacute":"á","Abreve":"Ă","abreve":"ă","ac":"∾","acd":"∿","acE":"∾̳","Acirc":"Â","acirc":"â","acute":"´","Acy":"А","acy":"а","AElig":"Æ","aelig":"æ","af":"⁡","Afr":"𝔄","afr":"𝔞","Agrave":"À","agrave":"à","alefsym":"ℵ","aleph":"ℵ","Alpha":"Α","alpha":"α","Amacr":"Ā","amacr":"ā","amalg":"⨿","amp":"&","AMP":"&","andand":"⩕","And":"⩓","and":"∧","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angmsd":"∡","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","Aogon":"Ą","aogon":"ą","Aopf":"𝔸","aopf":"𝕒","apacir":"⩯","ap":"≈","apE":"⩰","ape":"≊","apid":"≋","apos":"\'","ApplyFunction":"⁡","approx":"≈","approxeq":"≊","Aring":"Å","aring":"å","Ascr":"𝒜","ascr":"𝒶","Assign":"≔","ast":"*","asymp":"≈","asympeq":"≍","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","awconint":"∳","awint":"⨑","backcong":"≌","backepsilon":"϶","backprime":"‵","backsim":"∽","backsimeq":"⋍","Backslash":"∖","Barv":"⫧","barvee":"⊽","barwed":"⌅","Barwed":"⌆","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","Bcy":"Б","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","Because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"ℬ","Bernoullis":"ℬ","Beta":"Β","beta":"β","beth":"ℶ","between":"≬","Bfr":"𝔅","bfr":"𝔟","bigcap":"⋂","bigcirc":"◯","bigcup":"⋃","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"⋁","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bNot":"⫭","bnot":"⌐","Bopf":"𝔹","bopf":"𝕓","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxbox":"⧉","boxdl":"┐","boxdL":"╕","boxDl":"╖","boxDL":"╗","boxdr":"┌","boxdR":"╒","boxDr":"╓","boxDR":"╔","boxh":"─","boxH":"═","boxhd":"┬","boxHd":"╤","boxhD":"╥","boxHD":"╦","boxhu":"┴","boxHu":"╧","boxhU":"╨","boxHU":"╩","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxul":"┘","boxuL":"╛","boxUl":"╜","boxUL":"╝","boxur":"└","boxuR":"╘","boxUr":"╙","boxUR":"╚","boxv":"│","boxV":"║","boxvh":"┼","boxvH":"╪","boxVh":"╫","boxVH":"╬","boxvl":"┤","boxvL":"╡","boxVl":"╢","boxVL":"╣","boxvr":"├","boxvR":"╞","boxVr":"╟","boxVR":"╠","bprime":"‵","breve":"˘","Breve":"˘","brvbar":"¦","bscr":"𝒷","Bscr":"ℬ","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsolb":"⧅","bsol":"\\\\","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","Bumpeq":"≎","bumpeq":"≏","Cacute":"Ć","cacute":"ć","capand":"⩄","capbrcup":"⩉","capcap":"⩋","cap":"∩","Cap":"⋒","capcup":"⩇","capdot":"⩀","CapitalDifferentialD":"ⅅ","caps":"∩︀","caret":"⁁","caron":"ˇ","Cayleys":"ℭ","ccaps":"⩍","Ccaron":"Č","ccaron":"č","Ccedil":"Ç","ccedil":"ç","Ccirc":"Ĉ","ccirc":"ĉ","Cconint":"∰","ccups":"⩌","ccupssm":"⩐","Cdot":"Ċ","cdot":"ċ","cedil":"¸","Cedilla":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","CenterDot":"·","cfr":"𝔠","Cfr":"ℭ","CHcy":"Ч","chcy":"ч","check":"✓","checkmark":"✓","Chi":"Χ","chi":"χ","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","CircleDot":"⊙","circledR":"®","circledS":"Ⓢ","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","cir":"○","cirE":"⧃","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"’","clubs":"♣","clubsuit":"♣","colon":":","Colon":"∷","Colone":"⩴","colone":"≔","coloneq":"≔","comma":",","commat":"@","comp":"∁","compfn":"∘","complement":"∁","complexes":"ℂ","cong":"≅","congdot":"⩭","Congruent":"≡","conint":"∮","Conint":"∯","ContourIntegral":"∮","copf":"𝕔","Copf":"ℂ","coprod":"∐","Coproduct":"∐","copy":"©","COPY":"©","copysr":"℗","CounterClockwiseContourIntegral":"∳","crarr":"↵","cross":"✗","Cross":"⨯","Cscr":"𝒞","cscr":"𝒸","csub":"⫏","csube":"⫑","csup":"⫐","csupe":"⫒","ctdot":"⋯","cudarrl":"⤸","cudarrr":"⤵","cuepr":"⋞","cuesc":"⋟","cularr":"↶","cularrp":"⤽","cupbrcap":"⩈","cupcap":"⩆","CupCap":"≍","cup":"∪","Cup":"⋓","cupcup":"⩊","cupdot":"⊍","cupor":"⩅","cups":"∪︀","curarr":"↷","curarrm":"⤼","curlyeqprec":"⋞","curlyeqsucc":"⋟","curlyvee":"⋎","curlywedge":"⋏","curren":"¤","curvearrowleft":"↶","curvearrowright":"↷","cuvee":"⋎","cuwed":"⋏","cwconint":"∲","cwint":"∱","cylcty":"⌭","dagger":"†","Dagger":"‡","daleth":"ℸ","darr":"↓","Darr":"↡","dArr":"⇓","dash":"‐","Dashv":"⫤","dashv":"⊣","dbkarow":"⤏","dblac":"˝","Dcaron":"Ď","dcaron":"ď","Dcy":"Д","dcy":"д","ddagger":"‡","ddarr":"⇊","DD":"ⅅ","dd":"ⅆ","DDotrahd":"⤑","ddotseq":"⩷","deg":"°","Del":"∇","Delta":"Δ","delta":"δ","demptyv":"⦱","dfisht":"⥿","Dfr":"𝔇","dfr":"𝔡","dHar":"⥥","dharl":"⇃","dharr":"⇂","DiacriticalAcute":"´","DiacriticalDot":"˙","DiacriticalDoubleAcute":"˝","DiacriticalGrave":"`","DiacriticalTilde":"˜","diam":"⋄","diamond":"⋄","Diamond":"⋄","diamondsuit":"♦","diams":"♦","die":"¨","DifferentialD":"ⅆ","digamma":"ϝ","disin":"⋲","div":"÷","divide":"÷","divideontimes":"⋇","divonx":"⋇","DJcy":"Ђ","djcy":"ђ","dlcorn":"⌞","dlcrop":"⌍","dollar":"$","Dopf":"𝔻","dopf":"𝕕","Dot":"¨","dot":"˙","DotDot":"⃜","doteq":"≐","doteqdot":"≑","DotEqual":"≐","dotminus":"∸","dotplus":"∔","dotsquare":"⊡","doublebarwedge":"⌆","DoubleContourIntegral":"∯","DoubleDot":"¨","DoubleDownArrow":"⇓","DoubleLeftArrow":"⇐","DoubleLeftRightArrow":"⇔","DoubleLeftTee":"⫤","DoubleLongLeftArrow":"⟸","DoubleLongLeftRightArrow":"⟺","DoubleLongRightArrow":"⟹","DoubleRightArrow":"⇒","DoubleRightTee":"⊨","DoubleUpArrow":"⇑","DoubleUpDownArrow":"⇕","DoubleVerticalBar":"∥","DownArrowBar":"⤓","downarrow":"↓","DownArrow":"↓","Downarrow":"⇓","DownArrowUpArrow":"⇵","DownBreve":"̑","downdownarrows":"⇊","downharpoonleft":"⇃","downharpoonright":"⇂","DownLeftRightVector":"⥐","DownLeftTeeVector":"⥞","DownLeftVectorBar":"⥖","DownLeftVector":"↽","DownRightTeeVector":"⥟","DownRightVectorBar":"⥗","DownRightVector":"⇁","DownTeeArrow":"↧","DownTee":"⊤","drbkarow":"⤐","drcorn":"⌟","drcrop":"⌌","Dscr":"𝒟","dscr":"𝒹","DScy":"Ѕ","dscy":"ѕ","dsol":"⧶","Dstrok":"Đ","dstrok":"đ","dtdot":"⋱","dtri":"▿","dtrif":"▾","duarr":"⇵","duhar":"⥯","dwangle":"⦦","DZcy":"Џ","dzcy":"џ","dzigrarr":"⟿","Eacute":"É","eacute":"é","easter":"⩮","Ecaron":"Ě","ecaron":"ě","Ecirc":"Ê","ecirc":"ê","ecir":"≖","ecolon":"≕","Ecy":"Э","ecy":"э","eDDot":"⩷","Edot":"Ė","edot":"ė","eDot":"≑","ee":"ⅇ","efDot":"≒","Efr":"𝔈","efr":"𝔢","eg":"⪚","Egrave":"È","egrave":"è","egs":"⪖","egsdot":"⪘","el":"⪙","Element":"∈","elinters":"⏧","ell":"ℓ","els":"⪕","elsdot":"⪗","Emacr":"Ē","emacr":"ē","empty":"∅","emptyset":"∅","EmptySmallSquare":"◻","emptyv":"∅","EmptyVerySmallSquare":"▫","emsp13":" ","emsp14":" ","emsp":" ","ENG":"Ŋ","eng":"ŋ","ensp":" ","Eogon":"Ę","eogon":"ę","Eopf":"𝔼","eopf":"𝕖","epar":"⋕","eparsl":"⧣","eplus":"⩱","epsi":"ε","Epsilon":"Ε","epsilon":"ε","epsiv":"ϵ","eqcirc":"≖","eqcolon":"≕","eqsim":"≂","eqslantgtr":"⪖","eqslantless":"⪕","Equal":"⩵","equals":"=","EqualTilde":"≂","equest":"≟","Equilibrium":"⇌","equiv":"≡","equivDD":"⩸","eqvparsl":"⧥","erarr":"⥱","erDot":"≓","escr":"ℯ","Escr":"ℰ","esdot":"≐","Esim":"⩳","esim":"≂","Eta":"Η","eta":"η","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","euro":"€","excl":"!","exist":"∃","Exists":"∃","expectation":"ℰ","exponentiale":"ⅇ","ExponentialE":"ⅇ","fallingdotseq":"≒","Fcy":"Ф","fcy":"ф","female":"♀","ffilig":"ffi","fflig":"ff","ffllig":"ffl","Ffr":"𝔉","ffr":"𝔣","filig":"fi","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","fjlig":"fj","flat":"♭","fllig":"fl","fltns":"▱","fnof":"ƒ","Fopf":"𝔽","fopf":"𝕗","forall":"∀","ForAll":"∀","fork":"⋔","forkv":"⫙","Fouriertrf":"ℱ","fpartint":"⨍","frac12":"½","frac13":"⅓","frac14":"¼","frac15":"⅕","frac16":"⅙","frac18":"⅛","frac23":"⅔","frac25":"⅖","frac34":"¾","frac35":"⅗","frac38":"⅜","frac45":"⅘","frac56":"⅚","frac58":"⅝","frac78":"⅞","frasl":"⁄","frown":"⌢","fscr":"𝒻","Fscr":"ℱ","gacute":"ǵ","Gamma":"Γ","gamma":"γ","Gammad":"Ϝ","gammad":"ϝ","gap":"⪆","Gbreve":"Ğ","gbreve":"ğ","Gcedil":"Ģ","Gcirc":"Ĝ","gcirc":"ĝ","Gcy":"Г","gcy":"г","Gdot":"Ġ","gdot":"ġ","ge":"≥","gE":"≧","gEl":"⪌","gel":"⋛","geq":"≥","geqq":"≧","geqslant":"⩾","gescc":"⪩","ges":"⩾","gesdot":"⪀","gesdoto":"⪂","gesdotol":"⪄","gesl":"⋛︀","gesles":"⪔","Gfr":"𝔊","gfr":"𝔤","gg":"≫","Gg":"⋙","ggg":"⋙","gimel":"ℷ","GJcy":"Ѓ","gjcy":"ѓ","gla":"⪥","gl":"≷","glE":"⪒","glj":"⪤","gnap":"⪊","gnapprox":"⪊","gne":"⪈","gnE":"≩","gneq":"⪈","gneqq":"≩","gnsim":"⋧","Gopf":"𝔾","gopf":"𝕘","grave":"`","GreaterEqual":"≥","GreaterEqualLess":"⋛","GreaterFullEqual":"≧","GreaterGreater":"⪢","GreaterLess":"≷","GreaterSlantEqual":"⩾","GreaterTilde":"≳","Gscr":"𝒢","gscr":"ℊ","gsim":"≳","gsime":"⪎","gsiml":"⪐","gtcc":"⪧","gtcir":"⩺","gt":">","GT":">","Gt":"≫","gtdot":"⋗","gtlPar":"⦕","gtquest":"⩼","gtrapprox":"⪆","gtrarr":"⥸","gtrdot":"⋗","gtreqless":"⋛","gtreqqless":"⪌","gtrless":"≷","gtrsim":"≳","gvertneqq":"≩︀","gvnE":"≩︀","Hacek":"ˇ","hairsp":" ","half":"½","hamilt":"ℋ","HARDcy":"Ъ","hardcy":"ъ","harrcir":"⥈","harr":"↔","hArr":"⇔","harrw":"↭","Hat":"^","hbar":"ℏ","Hcirc":"Ĥ","hcirc":"ĥ","hearts":"♥","heartsuit":"♥","hellip":"…","hercon":"⊹","hfr":"𝔥","Hfr":"ℌ","HilbertSpace":"ℋ","hksearow":"⤥","hkswarow":"⤦","hoarr":"⇿","homtht":"∻","hookleftarrow":"↩","hookrightarrow":"↪","hopf":"𝕙","Hopf":"ℍ","horbar":"―","HorizontalLine":"─","hscr":"𝒽","Hscr":"ℋ","hslash":"ℏ","Hstrok":"Ħ","hstrok":"ħ","HumpDownHump":"≎","HumpEqual":"≏","hybull":"⁃","hyphen":"‐","Iacute":"Í","iacute":"í","ic":"⁣","Icirc":"Î","icirc":"î","Icy":"И","icy":"и","Idot":"İ","IEcy":"Е","iecy":"е","iexcl":"¡","iff":"⇔","ifr":"𝔦","Ifr":"ℑ","Igrave":"Ì","igrave":"ì","ii":"ⅈ","iiiint":"⨌","iiint":"∭","iinfin":"⧜","iiota":"℩","IJlig":"IJ","ijlig":"ij","Imacr":"Ī","imacr":"ī","image":"ℑ","ImaginaryI":"ⅈ","imagline":"ℐ","imagpart":"ℑ","imath":"ı","Im":"ℑ","imof":"⊷","imped":"Ƶ","Implies":"⇒","incare":"℅","in":"∈","infin":"∞","infintie":"⧝","inodot":"ı","intcal":"⊺","int":"∫","Int":"∬","integers":"ℤ","Integral":"∫","intercal":"⊺","Intersection":"⋂","intlarhk":"⨗","intprod":"⨼","InvisibleComma":"⁣","InvisibleTimes":"⁢","IOcy":"Ё","iocy":"ё","Iogon":"Į","iogon":"į","Iopf":"𝕀","iopf":"𝕚","Iota":"Ι","iota":"ι","iprod":"⨼","iquest":"¿","iscr":"𝒾","Iscr":"ℐ","isin":"∈","isindot":"⋵","isinE":"⋹","isins":"⋴","isinsv":"⋳","isinv":"∈","it":"⁢","Itilde":"Ĩ","itilde":"ĩ","Iukcy":"І","iukcy":"і","Iuml":"Ï","iuml":"ï","Jcirc":"Ĵ","jcirc":"ĵ","Jcy":"Й","jcy":"й","Jfr":"𝔍","jfr":"𝔧","jmath":"ȷ","Jopf":"𝕁","jopf":"𝕛","Jscr":"𝒥","jscr":"𝒿","Jsercy":"Ј","jsercy":"ј","Jukcy":"Є","jukcy":"є","Kappa":"Κ","kappa":"κ","kappav":"ϰ","Kcedil":"Ķ","kcedil":"ķ","Kcy":"К","kcy":"к","Kfr":"𝔎","kfr":"𝔨","kgreen":"ĸ","KHcy":"Х","khcy":"х","KJcy":"Ќ","kjcy":"ќ","Kopf":"𝕂","kopf":"𝕜","Kscr":"𝒦","kscr":"𝓀","lAarr":"⇚","Lacute":"Ĺ","lacute":"ĺ","laemptyv":"⦴","lagran":"ℒ","Lambda":"Λ","lambda":"λ","lang":"⟨","Lang":"⟪","langd":"⦑","langle":"⟨","lap":"⪅","Laplacetrf":"ℒ","laquo":"«","larrb":"⇤","larrbfs":"⤟","larr":"←","Larr":"↞","lArr":"⇐","larrfs":"⤝","larrhk":"↩","larrlp":"↫","larrpl":"⤹","larrsim":"⥳","larrtl":"↢","latail":"⤙","lAtail":"⤛","lat":"⪫","late":"⪭","lates":"⪭︀","lbarr":"⤌","lBarr":"⤎","lbbrk":"❲","lbrace":"{","lbrack":"[","lbrke":"⦋","lbrksld":"⦏","lbrkslu":"⦍","Lcaron":"Ľ","lcaron":"ľ","Lcedil":"Ļ","lcedil":"ļ","lceil":"⌈","lcub":"{","Lcy":"Л","lcy":"л","ldca":"⤶","ldquo":"“","ldquor":"„","ldrdhar":"⥧","ldrushar":"⥋","ldsh":"↲","le":"≤","lE":"≦","LeftAngleBracket":"⟨","LeftArrowBar":"⇤","leftarrow":"←","LeftArrow":"←","Leftarrow":"⇐","LeftArrowRightArrow":"⇆","leftarrowtail":"↢","LeftCeiling":"⌈","LeftDoubleBracket":"⟦","LeftDownTeeVector":"⥡","LeftDownVectorBar":"⥙","LeftDownVector":"⇃","LeftFloor":"⌊","leftharpoondown":"↽","leftharpoonup":"↼","leftleftarrows":"⇇","leftrightarrow":"↔","LeftRightArrow":"↔","Leftrightarrow":"⇔","leftrightarrows":"⇆","leftrightharpoons":"⇋","leftrightsquigarrow":"↭","LeftRightVector":"⥎","LeftTeeArrow":"↤","LeftTee":"⊣","LeftTeeVector":"⥚","leftthreetimes":"⋋","LeftTriangleBar":"⧏","LeftTriangle":"⊲","LeftTriangleEqual":"⊴","LeftUpDownVector":"⥑","LeftUpTeeVector":"⥠","LeftUpVectorBar":"⥘","LeftUpVector":"↿","LeftVectorBar":"⥒","LeftVector":"↼","lEg":"⪋","leg":"⋚","leq":"≤","leqq":"≦","leqslant":"⩽","lescc":"⪨","les":"⩽","lesdot":"⩿","lesdoto":"⪁","lesdotor":"⪃","lesg":"⋚︀","lesges":"⪓","lessapprox":"⪅","lessdot":"⋖","lesseqgtr":"⋚","lesseqqgtr":"⪋","LessEqualGreater":"⋚","LessFullEqual":"≦","LessGreater":"≶","lessgtr":"≶","LessLess":"⪡","lesssim":"≲","LessSlantEqual":"⩽","LessTilde":"≲","lfisht":"⥼","lfloor":"⌊","Lfr":"𝔏","lfr":"𝔩","lg":"≶","lgE":"⪑","lHar":"⥢","lhard":"↽","lharu":"↼","lharul":"⥪","lhblk":"▄","LJcy":"Љ","ljcy":"љ","llarr":"⇇","ll":"≪","Ll":"⋘","llcorner":"⌞","Lleftarrow":"⇚","llhard":"⥫","lltri":"◺","Lmidot":"Ŀ","lmidot":"ŀ","lmoustache":"⎰","lmoust":"⎰","lnap":"⪉","lnapprox":"⪉","lne":"⪇","lnE":"≨","lneq":"⪇","lneqq":"≨","lnsim":"⋦","loang":"⟬","loarr":"⇽","lobrk":"⟦","longleftarrow":"⟵","LongLeftArrow":"⟵","Longleftarrow":"⟸","longleftrightarrow":"⟷","LongLeftRightArrow":"⟷","Longleftrightarrow":"⟺","longmapsto":"⟼","longrightarrow":"⟶","LongRightArrow":"⟶","Longrightarrow":"⟹","looparrowleft":"↫","looparrowright":"↬","lopar":"⦅","Lopf":"𝕃","lopf":"𝕝","loplus":"⨭","lotimes":"⨴","lowast":"∗","lowbar":"_","LowerLeftArrow":"↙","LowerRightArrow":"↘","loz":"◊","lozenge":"◊","lozf":"⧫","lpar":"(","lparlt":"⦓","lrarr":"⇆","lrcorner":"⌟","lrhar":"⇋","lrhard":"⥭","lrm":"‎","lrtri":"⊿","lsaquo":"‹","lscr":"𝓁","Lscr":"ℒ","lsh":"↰","Lsh":"↰","lsim":"≲","lsime":"⪍","lsimg":"⪏","lsqb":"[","lsquo":"‘","lsquor":"‚","Lstrok":"Ł","lstrok":"ł","ltcc":"⪦","ltcir":"⩹","lt":"<","LT":"<","Lt":"≪","ltdot":"⋖","lthree":"⋋","ltimes":"⋉","ltlarr":"⥶","ltquest":"⩻","ltri":"◃","ltrie":"⊴","ltrif":"◂","ltrPar":"⦖","lurdshar":"⥊","luruhar":"⥦","lvertneqq":"≨︀","lvnE":"≨︀","macr":"¯","male":"♂","malt":"✠","maltese":"✠","Map":"⤅","map":"↦","mapsto":"↦","mapstodown":"↧","mapstoleft":"↤","mapstoup":"↥","marker":"▮","mcomma":"⨩","Mcy":"М","mcy":"м","mdash":"—","mDDot":"∺","measuredangle":"∡","MediumSpace":" ","Mellintrf":"ℳ","Mfr":"𝔐","mfr":"𝔪","mho":"℧","micro":"µ","midast":"*","midcir":"⫰","mid":"∣","middot":"·","minusb":"⊟","minus":"−","minusd":"∸","minusdu":"⨪","MinusPlus":"∓","mlcp":"⫛","mldr":"…","mnplus":"∓","models":"⊧","Mopf":"𝕄","mopf":"𝕞","mp":"∓","mscr":"𝓂","Mscr":"ℳ","mstpos":"∾","Mu":"Μ","mu":"μ","multimap":"⊸","mumap":"⊸","nabla":"∇","Nacute":"Ń","nacute":"ń","nang":"∠⃒","nap":"≉","napE":"⩰̸","napid":"≋̸","napos":"ʼn","napprox":"≉","natural":"♮","naturals":"ℕ","natur":"♮","nbsp":" ","nbump":"≎̸","nbumpe":"≏̸","ncap":"⩃","Ncaron":"Ň","ncaron":"ň","Ncedil":"Ņ","ncedil":"ņ","ncong":"≇","ncongdot":"⩭̸","ncup":"⩂","Ncy":"Н","ncy":"н","ndash":"–","nearhk":"⤤","nearr":"↗","neArr":"⇗","nearrow":"↗","ne":"≠","nedot":"≐̸","NegativeMediumSpace":"​","NegativeThickSpace":"​","NegativeThinSpace":"​","NegativeVeryThinSpace":"​","nequiv":"≢","nesear":"⤨","nesim":"≂̸","NestedGreaterGreater":"≫","NestedLessLess":"≪","NewLine":"\\n","nexist":"∄","nexists":"∄","Nfr":"𝔑","nfr":"𝔫","ngE":"≧̸","nge":"≱","ngeq":"≱","ngeqq":"≧̸","ngeqslant":"⩾̸","nges":"⩾̸","nGg":"⋙̸","ngsim":"≵","nGt":"≫⃒","ngt":"≯","ngtr":"≯","nGtv":"≫̸","nharr":"↮","nhArr":"⇎","nhpar":"⫲","ni":"∋","nis":"⋼","nisd":"⋺","niv":"∋","NJcy":"Њ","njcy":"њ","nlarr":"↚","nlArr":"⇍","nldr":"‥","nlE":"≦̸","nle":"≰","nleftarrow":"↚","nLeftarrow":"⇍","nleftrightarrow":"↮","nLeftrightarrow":"⇎","nleq":"≰","nleqq":"≦̸","nleqslant":"⩽̸","nles":"⩽̸","nless":"≮","nLl":"⋘̸","nlsim":"≴","nLt":"≪⃒","nlt":"≮","nltri":"⋪","nltrie":"⋬","nLtv":"≪̸","nmid":"∤","NoBreak":"⁠","NonBreakingSpace":" ","nopf":"𝕟","Nopf":"ℕ","Not":"⫬","not":"¬","NotCongruent":"≢","NotCupCap":"≭","NotDoubleVerticalBar":"∦","NotElement":"∉","NotEqual":"≠","NotEqualTilde":"≂̸","NotExists":"∄","NotGreater":"≯","NotGreaterEqual":"≱","NotGreaterFullEqual":"≧̸","NotGreaterGreater":"≫̸","NotGreaterLess":"≹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"≵","NotHumpDownHump":"≎̸","NotHumpEqual":"≏̸","notin":"∉","notindot":"⋵̸","notinE":"⋹̸","notinva":"∉","notinvb":"⋷","notinvc":"⋶","NotLeftTriangleBar":"⧏̸","NotLeftTriangle":"⋪","NotLeftTriangleEqual":"⋬","NotLess":"≮","NotLessEqual":"≰","NotLessGreater":"≸","NotLessLess":"≪̸","NotLessSlantEqual":"⩽̸","NotLessTilde":"≴","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","notni":"∌","notniva":"∌","notnivb":"⋾","notnivc":"⋽","NotPrecedes":"⊀","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"⋠","NotReverseElement":"∌","NotRightTriangleBar":"⧐̸","NotRightTriangle":"⋫","NotRightTriangleEqual":"⋭","NotSquareSubset":"⊏̸","NotSquareSubsetEqual":"⋢","NotSquareSuperset":"⊐̸","NotSquareSupersetEqual":"⋣","NotSubset":"⊂⃒","NotSubsetEqual":"⊈","NotSucceeds":"⊁","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"⋡","NotSucceedsTilde":"≿̸","NotSuperset":"⊃⃒","NotSupersetEqual":"⊉","NotTilde":"≁","NotTildeEqual":"≄","NotTildeFullEqual":"≇","NotTildeTilde":"≉","NotVerticalBar":"∤","nparallel":"∦","npar":"∦","nparsl":"⫽⃥","npart":"∂̸","npolint":"⨔","npr":"⊀","nprcue":"⋠","nprec":"⊀","npreceq":"⪯̸","npre":"⪯̸","nrarrc":"⤳̸","nrarr":"↛","nrArr":"⇏","nrarrw":"↝̸","nrightarrow":"↛","nRightarrow":"⇏","nrtri":"⋫","nrtrie":"⋭","nsc":"⊁","nsccue":"⋡","nsce":"⪰̸","Nscr":"𝒩","nscr":"𝓃","nshortmid":"∤","nshortparallel":"∦","nsim":"≁","nsime":"≄","nsimeq":"≄","nsmid":"∤","nspar":"∦","nsqsube":"⋢","nsqsupe":"⋣","nsub":"⊄","nsubE":"⫅̸","nsube":"⊈","nsubset":"⊂⃒","nsubseteq":"⊈","nsubseteqq":"⫅̸","nsucc":"⊁","nsucceq":"⪰̸","nsup":"⊅","nsupE":"⫆̸","nsupe":"⊉","nsupset":"⊃⃒","nsupseteq":"⊉","nsupseteqq":"⫆̸","ntgl":"≹","Ntilde":"Ñ","ntilde":"ñ","ntlg":"≸","ntriangleleft":"⋪","ntrianglelefteq":"⋬","ntriangleright":"⋫","ntrianglerighteq":"⋭","Nu":"Ν","nu":"ν","num":"#","numero":"№","numsp":" ","nvap":"≍⃒","nvdash":"⊬","nvDash":"⊭","nVdash":"⊮","nVDash":"⊯","nvge":"≥⃒","nvgt":">⃒","nvHarr":"⤄","nvinfin":"⧞","nvlArr":"⤂","nvle":"≤⃒","nvlt":"<⃒","nvltrie":"⊴⃒","nvrArr":"⤃","nvrtrie":"⊵⃒","nvsim":"∼⃒","nwarhk":"⤣","nwarr":"↖","nwArr":"⇖","nwarrow":"↖","nwnear":"⤧","Oacute":"Ó","oacute":"ó","oast":"⊛","Ocirc":"Ô","ocirc":"ô","ocir":"⊚","Ocy":"О","ocy":"о","odash":"⊝","Odblac":"Ő","odblac":"ő","odiv":"⨸","odot":"⊙","odsold":"⦼","OElig":"Œ","oelig":"œ","ofcir":"⦿","Ofr":"𝔒","ofr":"𝔬","ogon":"˛","Ograve":"Ò","ograve":"ò","ogt":"⧁","ohbar":"⦵","ohm":"Ω","oint":"∮","olarr":"↺","olcir":"⦾","olcross":"⦻","oline":"‾","olt":"⧀","Omacr":"Ō","omacr":"ō","Omega":"Ω","omega":"ω","Omicron":"Ο","omicron":"ο","omid":"⦶","ominus":"⊖","Oopf":"𝕆","oopf":"𝕠","opar":"⦷","OpenCurlyDoubleQuote":"“","OpenCurlyQuote":"‘","operp":"⦹","oplus":"⊕","orarr":"↻","Or":"⩔","or":"∨","ord":"⩝","order":"ℴ","orderof":"ℴ","ordf":"ª","ordm":"º","origof":"⊶","oror":"⩖","orslope":"⩗","orv":"⩛","oS":"Ⓢ","Oscr":"𝒪","oscr":"ℴ","Oslash":"Ø","oslash":"ø","osol":"⊘","Otilde":"Õ","otilde":"õ","otimesas":"⨶","Otimes":"⨷","otimes":"⊗","Ouml":"Ö","ouml":"ö","ovbar":"⌽","OverBar":"‾","OverBrace":"⏞","OverBracket":"⎴","OverParenthesis":"⏜","para":"¶","parallel":"∥","par":"∥","parsim":"⫳","parsl":"⫽","part":"∂","PartialD":"∂","Pcy":"П","pcy":"п","percnt":"%","period":".","permil":"‰","perp":"⊥","pertenk":"‱","Pfr":"𝔓","pfr":"𝔭","Phi":"Φ","phi":"φ","phiv":"ϕ","phmmat":"ℳ","phone":"☎","Pi":"Π","pi":"π","pitchfork":"⋔","piv":"ϖ","planck":"ℏ","planckh":"ℎ","plankv":"ℏ","plusacir":"⨣","plusb":"⊞","pluscir":"⨢","plus":"+","plusdo":"∔","plusdu":"⨥","pluse":"⩲","PlusMinus":"±","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","Poincareplane":"ℌ","pointint":"⨕","popf":"𝕡","Popf":"ℙ","pound":"£","prap":"⪷","Pr":"⪻","pr":"≺","prcue":"≼","precapprox":"⪷","prec":"≺","preccurlyeq":"≼","Precedes":"≺","PrecedesEqual":"⪯","PrecedesSlantEqual":"≼","PrecedesTilde":"≾","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"⋨","pre":"⪯","prE":"⪳","precsim":"≾","prime":"′","Prime":"″","primes":"ℙ","prnap":"⪹","prnE":"⪵","prnsim":"⋨","prod":"∏","Product":"∏","profalar":"⌮","profline":"⌒","profsurf":"⌓","prop":"∝","Proportional":"∝","Proportion":"∷","propto":"∝","prsim":"≾","prurel":"⊰","Pscr":"𝒫","pscr":"𝓅","Psi":"Ψ","psi":"ψ","puncsp":" ","Qfr":"𝔔","qfr":"𝔮","qint":"⨌","qopf":"𝕢","Qopf":"ℚ","qprime":"⁗","Qscr":"𝒬","qscr":"𝓆","quaternions":"ℍ","quatint":"⨖","quest":"?","questeq":"≟","quot":"\\"","QUOT":"\\"","rAarr":"⇛","race":"∽̱","Racute":"Ŕ","racute":"ŕ","radic":"√","raemptyv":"⦳","rang":"⟩","Rang":"⟫","rangd":"⦒","range":"⦥","rangle":"⟩","raquo":"»","rarrap":"⥵","rarrb":"⇥","rarrbfs":"⤠","rarrc":"⤳","rarr":"→","Rarr":"↠","rArr":"⇒","rarrfs":"⤞","rarrhk":"↪","rarrlp":"↬","rarrpl":"⥅","rarrsim":"⥴","Rarrtl":"⤖","rarrtl":"↣","rarrw":"↝","ratail":"⤚","rAtail":"⤜","ratio":"∶","rationals":"ℚ","rbarr":"⤍","rBarr":"⤏","RBarr":"⤐","rbbrk":"❳","rbrace":"}","rbrack":"]","rbrke":"⦌","rbrksld":"⦎","rbrkslu":"⦐","Rcaron":"Ř","rcaron":"ř","Rcedil":"Ŗ","rcedil":"ŗ","rceil":"⌉","rcub":"}","Rcy":"Р","rcy":"р","rdca":"⤷","rdldhar":"⥩","rdquo":"”","rdquor":"”","rdsh":"↳","real":"ℜ","realine":"ℛ","realpart":"ℜ","reals":"ℝ","Re":"ℜ","rect":"▭","reg":"®","REG":"®","ReverseElement":"∋","ReverseEquilibrium":"⇋","ReverseUpEquilibrium":"⥯","rfisht":"⥽","rfloor":"⌋","rfr":"𝔯","Rfr":"ℜ","rHar":"⥤","rhard":"⇁","rharu":"⇀","rharul":"⥬","Rho":"Ρ","rho":"ρ","rhov":"ϱ","RightAngleBracket":"⟩","RightArrowBar":"⇥","rightarrow":"→","RightArrow":"→","Rightarrow":"⇒","RightArrowLeftArrow":"⇄","rightarrowtail":"↣","RightCeiling":"⌉","RightDoubleBracket":"⟧","RightDownTeeVector":"⥝","RightDownVectorBar":"⥕","RightDownVector":"⇂","RightFloor":"⌋","rightharpoondown":"⇁","rightharpoonup":"⇀","rightleftarrows":"⇄","rightleftharpoons":"⇌","rightrightarrows":"⇉","rightsquigarrow":"↝","RightTeeArrow":"↦","RightTee":"⊢","RightTeeVector":"⥛","rightthreetimes":"⋌","RightTriangleBar":"⧐","RightTriangle":"⊳","RightTriangleEqual":"⊵","RightUpDownVector":"⥏","RightUpTeeVector":"⥜","RightUpVectorBar":"⥔","RightUpVector":"↾","RightVectorBar":"⥓","RightVector":"⇀","ring":"˚","risingdotseq":"≓","rlarr":"⇄","rlhar":"⇌","rlm":"‏","rmoustache":"⎱","rmoust":"⎱","rnmid":"⫮","roang":"⟭","roarr":"⇾","robrk":"⟧","ropar":"⦆","ropf":"𝕣","Ropf":"ℝ","roplus":"⨮","rotimes":"⨵","RoundImplies":"⥰","rpar":")","rpargt":"⦔","rppolint":"⨒","rrarr":"⇉","Rrightarrow":"⇛","rsaquo":"›","rscr":"𝓇","Rscr":"ℛ","rsh":"↱","Rsh":"↱","rsqb":"]","rsquo":"’","rsquor":"’","rthree":"⋌","rtimes":"⋊","rtri":"▹","rtrie":"⊵","rtrif":"▸","rtriltri":"⧎","RuleDelayed":"⧴","ruluhar":"⥨","rx":"℞","Sacute":"Ś","sacute":"ś","sbquo":"‚","scap":"⪸","Scaron":"Š","scaron":"š","Sc":"⪼","sc":"≻","sccue":"≽","sce":"⪰","scE":"⪴","Scedil":"Ş","scedil":"ş","Scirc":"Ŝ","scirc":"ŝ","scnap":"⪺","scnE":"⪶","scnsim":"⋩","scpolint":"⨓","scsim":"≿","Scy":"С","scy":"с","sdotb":"⊡","sdot":"⋅","sdote":"⩦","searhk":"⤥","searr":"↘","seArr":"⇘","searrow":"↘","sect":"§","semi":";","seswar":"⤩","setminus":"∖","setmn":"∖","sext":"✶","Sfr":"𝔖","sfr":"𝔰","sfrown":"⌢","sharp":"♯","SHCHcy":"Щ","shchcy":"щ","SHcy":"Ш","shcy":"ш","ShortDownArrow":"↓","ShortLeftArrow":"←","shortmid":"∣","shortparallel":"∥","ShortRightArrow":"→","ShortUpArrow":"↑","shy":"­","Sigma":"Σ","sigma":"σ","sigmaf":"ς","sigmav":"ς","sim":"∼","simdot":"⩪","sime":"≃","simeq":"≃","simg":"⪞","simgE":"⪠","siml":"⪝","simlE":"⪟","simne":"≆","simplus":"⨤","simrarr":"⥲","slarr":"←","SmallCircle":"∘","smallsetminus":"∖","smashp":"⨳","smeparsl":"⧤","smid":"∣","smile":"⌣","smt":"⪪","smte":"⪬","smtes":"⪬︀","SOFTcy":"Ь","softcy":"ь","solbar":"⌿","solb":"⧄","sol":"/","Sopf":"𝕊","sopf":"𝕤","spades":"♠","spadesuit":"♠","spar":"∥","sqcap":"⊓","sqcaps":"⊓︀","sqcup":"⊔","sqcups":"⊔︀","Sqrt":"√","sqsub":"⊏","sqsube":"⊑","sqsubset":"⊏","sqsubseteq":"⊑","sqsup":"⊐","sqsupe":"⊒","sqsupset":"⊐","sqsupseteq":"⊒","square":"□","Square":"□","SquareIntersection":"⊓","SquareSubset":"⊏","SquareSubsetEqual":"⊑","SquareSuperset":"⊐","SquareSupersetEqual":"⊒","SquareUnion":"⊔","squarf":"▪","squ":"□","squf":"▪","srarr":"→","Sscr":"𝒮","sscr":"𝓈","ssetmn":"∖","ssmile":"⌣","sstarf":"⋆","Star":"⋆","star":"☆","starf":"★","straightepsilon":"ϵ","straightphi":"ϕ","strns":"¯","sub":"⊂","Sub":"⋐","subdot":"⪽","subE":"⫅","sube":"⊆","subedot":"⫃","submult":"⫁","subnE":"⫋","subne":"⊊","subplus":"⪿","subrarr":"⥹","subset":"⊂","Subset":"⋐","subseteq":"⊆","subseteqq":"⫅","SubsetEqual":"⊆","subsetneq":"⊊","subsetneqq":"⫋","subsim":"⫇","subsub":"⫕","subsup":"⫓","succapprox":"⪸","succ":"≻","succcurlyeq":"≽","Succeeds":"≻","SucceedsEqual":"⪰","SucceedsSlantEqual":"≽","SucceedsTilde":"≿","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"⋩","succsim":"≿","SuchThat":"∋","sum":"∑","Sum":"∑","sung":"♪","sup1":"¹","sup2":"²","sup3":"³","sup":"⊃","Sup":"⋑","supdot":"⪾","supdsub":"⫘","supE":"⫆","supe":"⊇","supedot":"⫄","Superset":"⊃","SupersetEqual":"⊇","suphsol":"⟉","suphsub":"⫗","suplarr":"⥻","supmult":"⫂","supnE":"⫌","supne":"⊋","supplus":"⫀","supset":"⊃","Supset":"⋑","supseteq":"⊇","supseteqq":"⫆","supsetneq":"⊋","supsetneqq":"⫌","supsim":"⫈","supsub":"⫔","supsup":"⫖","swarhk":"⤦","swarr":"↙","swArr":"⇙","swarrow":"↙","swnwar":"⤪","szlig":"ß","Tab":"\\t","target":"⌖","Tau":"Τ","tau":"τ","tbrk":"⎴","Tcaron":"Ť","tcaron":"ť","Tcedil":"Ţ","tcedil":"ţ","Tcy":"Т","tcy":"т","tdot":"⃛","telrec":"⌕","Tfr":"𝔗","tfr":"𝔱","there4":"∴","therefore":"∴","Therefore":"∴","Theta":"Θ","theta":"θ","thetasym":"ϑ","thetav":"ϑ","thickapprox":"≈","thicksim":"∼","ThickSpace":"  ","ThinSpace":" ","thinsp":" ","thkap":"≈","thksim":"∼","THORN":"Þ","thorn":"þ","tilde":"˜","Tilde":"∼","TildeEqual":"≃","TildeFullEqual":"≅","TildeTilde":"≈","timesbar":"⨱","timesb":"⊠","times":"×","timesd":"⨰","tint":"∭","toea":"⤨","topbot":"⌶","topcir":"⫱","top":"⊤","Topf":"𝕋","topf":"𝕥","topfork":"⫚","tosa":"⤩","tprime":"‴","trade":"™","TRADE":"™","triangle":"▵","triangledown":"▿","triangleleft":"◃","trianglelefteq":"⊴","triangleq":"≜","triangleright":"▹","trianglerighteq":"⊵","tridot":"◬","trie":"≜","triminus":"⨺","TripleDot":"⃛","triplus":"⨹","trisb":"⧍","tritime":"⨻","trpezium":"⏢","Tscr":"𝒯","tscr":"𝓉","TScy":"Ц","tscy":"ц","TSHcy":"Ћ","tshcy":"ћ","Tstrok":"Ŧ","tstrok":"ŧ","twixt":"≬","twoheadleftarrow":"↞","twoheadrightarrow":"↠","Uacute":"Ú","uacute":"ú","uarr":"↑","Uarr":"↟","uArr":"⇑","Uarrocir":"⥉","Ubrcy":"Ў","ubrcy":"ў","Ubreve":"Ŭ","ubreve":"ŭ","Ucirc":"Û","ucirc":"û","Ucy":"У","ucy":"у","udarr":"⇅","Udblac":"Ű","udblac":"ű","udhar":"⥮","ufisht":"⥾","Ufr":"𝔘","ufr":"𝔲","Ugrave":"Ù","ugrave":"ù","uHar":"⥣","uharl":"↿","uharr":"↾","uhblk":"▀","ulcorn":"⌜","ulcorner":"⌜","ulcrop":"⌏","ultri":"◸","Umacr":"Ū","umacr":"ū","uml":"¨","UnderBar":"_","UnderBrace":"⏟","UnderBracket":"⎵","UnderParenthesis":"⏝","Union":"⋃","UnionPlus":"⊎","Uogon":"Ų","uogon":"ų","Uopf":"𝕌","uopf":"𝕦","UpArrowBar":"⤒","uparrow":"↑","UpArrow":"↑","Uparrow":"⇑","UpArrowDownArrow":"⇅","updownarrow":"↕","UpDownArrow":"↕","Updownarrow":"⇕","UpEquilibrium":"⥮","upharpoonleft":"↿","upharpoonright":"↾","uplus":"⊎","UpperLeftArrow":"↖","UpperRightArrow":"↗","upsi":"υ","Upsi":"ϒ","upsih":"ϒ","Upsilon":"Υ","upsilon":"υ","UpTeeArrow":"↥","UpTee":"⊥","upuparrows":"⇈","urcorn":"⌝","urcorner":"⌝","urcrop":"⌎","Uring":"Ů","uring":"ů","urtri":"◹","Uscr":"𝒰","uscr":"𝓊","utdot":"⋰","Utilde":"Ũ","utilde":"ũ","utri":"▵","utrif":"▴","uuarr":"⇈","Uuml":"Ü","uuml":"ü","uwangle":"⦧","vangrt":"⦜","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"∅","varphi":"ϕ","varpi":"ϖ","varpropto":"∝","varr":"↕","vArr":"⇕","varrho":"ϱ","varsigma":"ς","varsubsetneq":"⊊︀","varsubsetneqq":"⫋︀","varsupsetneq":"⊋︀","varsupsetneqq":"⫌︀","vartheta":"ϑ","vartriangleleft":"⊲","vartriangleright":"⊳","vBar":"⫨","Vbar":"⫫","vBarv":"⫩","Vcy":"В","vcy":"в","vdash":"⊢","vDash":"⊨","Vdash":"⊩","VDash":"⊫","Vdashl":"⫦","veebar":"⊻","vee":"∨","Vee":"⋁","veeeq":"≚","vellip":"⋮","verbar":"|","Verbar":"‖","vert":"|","Vert":"‖","VerticalBar":"∣","VerticalLine":"|","VerticalSeparator":"❘","VerticalTilde":"≀","VeryThinSpace":" ","Vfr":"𝔙","vfr":"𝔳","vltri":"⊲","vnsub":"⊂⃒","vnsup":"⊃⃒","Vopf":"𝕍","vopf":"𝕧","vprop":"∝","vrtri":"⊳","Vscr":"𝒱","vscr":"𝓋","vsubnE":"⫋︀","vsubne":"⊊︀","vsupnE":"⫌︀","vsupne":"⊋︀","Vvdash":"⊪","vzigzag":"⦚","Wcirc":"Ŵ","wcirc":"ŵ","wedbar":"⩟","wedge":"∧","Wedge":"⋀","wedgeq":"≙","weierp":"℘","Wfr":"𝔚","wfr":"𝔴","Wopf":"𝕎","wopf":"𝕨","wp":"℘","wr":"≀","wreath":"≀","Wscr":"𝒲","wscr":"𝓌","xcap":"⋂","xcirc":"◯","xcup":"⋃","xdtri":"▽","Xfr":"𝔛","xfr":"𝔵","xharr":"⟷","xhArr":"⟺","Xi":"Ξ","xi":"ξ","xlarr":"⟵","xlArr":"⟸","xmap":"⟼","xnis":"⋻","xodot":"⨀","Xopf":"𝕏","xopf":"𝕩","xoplus":"⨁","xotime":"⨂","xrarr":"⟶","xrArr":"⟹","Xscr":"𝒳","xscr":"𝓍","xsqcup":"⨆","xuplus":"⨄","xutri":"△","xvee":"⋁","xwedge":"⋀","Yacute":"Ý","yacute":"ý","YAcy":"Я","yacy":"я","Ycirc":"Ŷ","ycirc":"ŷ","Ycy":"Ы","ycy":"ы","yen":"¥","Yfr":"𝔜","yfr":"𝔶","YIcy":"Ї","yicy":"ї","Yopf":"𝕐","yopf":"𝕪","Yscr":"𝒴","yscr":"𝓎","YUcy":"Ю","yucy":"ю","yuml":"ÿ","Yuml":"Ÿ","Zacute":"Ź","zacute":"ź","Zcaron":"Ž","zcaron":"ž","Zcy":"З","zcy":"з","Zdot":"Ż","zdot":"ż","zeetrf":"ℨ","ZeroWidthSpace":"​","Zeta":"Ζ","zeta":"ζ","zfr":"𝔷","Zfr":"ℨ","ZHcy":"Ж","zhcy":"ж","zigrarr":"⇝","zopf":"𝕫","Zopf":"ℤ","Zscr":"𝒵","zscr":"𝓏","zwj":"‍","zwnj":"‌"}')},function(e,t,n){"use strict";var r={};function o(e,t,n){var i,s,a,c,u,l="";for("string"!=typeof t&&(n=t,t=o.defaultChars),void 0===n&&(n=!0),u=function(e){var t,n,o=r[e];if(o)return o;for(o=r[e]=[],t=0;t<128;t++)n=String.fromCharCode(t),/^[0-9a-z]$/i.test(n)?o.push(n):o.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2));for(t=0;t<e.length;t++)o[e.charCodeAt(t)]=e[t];return o}(t),i=0,s=e.length;i<s;i++)if(a=e.charCodeAt(i),n&&37===a&&i+2<s&&/^[0-9a-f]{2}$/i.test(e.slice(i+1,i+3)))l+=e.slice(i,i+3),i+=2;else if(a<128)l+=u[a];else if(a>=55296&&a<=57343){if(a>=55296&&a<=56319&&i+1<s&&(c=e.charCodeAt(i+1))>=56320&&c<=57343){l+=encodeURIComponent(e[i]+e[i+1]),i++;continue}l+="%EF%BF%BD"}else l+=encodeURIComponent(e[i]);return l}o.defaultChars=";/?:@&=+$,-_.!~*'()#",o.componentChars="-_.!~*'()",e.exports=o},function(e,t,n){"use strict";var r={};function o(e,t){var n;return"string"!=typeof t&&(t=o.defaultChars),n=function(e){var t,n,o=r[e];if(o)return o;for(o=r[e]=[],t=0;t<128;t++)n=String.fromCharCode(t),o.push(n);for(t=0;t<e.length;t++)o[n=e.charCodeAt(t)]="%"+("0"+n.toString(16).toUpperCase()).slice(-2);return o}(t),e.replace(/(%[a-f0-9]{2})+/gi,(function(e){var t,r,o,i,s,a,c,u="";for(t=0,r=e.length;t<r;t+=3)(o=parseInt(e.slice(t+1,t+3),16))<128?u+=n[o]:192==(224&o)&&t+3<r&&128==(192&(i=parseInt(e.slice(t+4,t+6),16)))?(u+=(c=o<<6&1984|63&i)<128?"��":String.fromCharCode(c),t+=3):224==(240&o)&&t+6<r&&(i=parseInt(e.slice(t+4,t+6),16),s=parseInt(e.slice(t+7,t+9),16),128==(192&i)&&128==(192&s))?(u+=(c=o<<12&61440|i<<6&4032|63&s)<2048||c>=55296&&c<=57343?"���":String.fromCharCode(c),t+=6):240==(248&o)&&t+9<r&&(i=parseInt(e.slice(t+4,t+6),16),s=parseInt(e.slice(t+7,t+9),16),a=parseInt(e.slice(t+10,t+12),16),128==(192&i)&&128==(192&s)&&128==(192&a))?((c=o<<18&1835008|i<<12&258048|s<<6&4032|63&a)<65536||c>1114111?u+="����":(c-=65536,u+=String.fromCharCode(55296+(c>>10),56320+(1023&c))),t+=9):u+="�";return u}))}o.defaultChars=";/?:@&=+$,#",o.componentChars="",e.exports=o},function(e,t,n){"use strict";e.exports=function(e){var t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&-1!==e.hostname.indexOf(":")?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||""}},function(e,t,n){"use strict";function r(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var o=/^([a-z0-9.+-]+:)/i,i=/:[0-9]*$/,s=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,a=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(a),u=["%","/","?",";","#"].concat(c),l=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,h={javascript:!0,"javascript:":!0},d={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};r.prototype.parse=function(e,t){var n,r,i,a,c,m=e;if(m=m.trim(),!t&&1===e.split("#").length){var v=s.exec(m);if(v)return this.pathname=v[1],v[2]&&(this.search=v[2]),this}var g=o.exec(m);if(g&&(i=(g=g[0]).toLowerCase(),this.protocol=g,m=m.substr(g.length)),(t||g||m.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(c="//"===m.substr(0,2))||g&&h[g]||(m=m.substr(2),this.slashes=!0)),!h[g]&&(c||g&&!d[g])){var y,b,w=-1;for(n=0;n<l.length;n++)-1!==(a=m.indexOf(l[n]))&&(-1===w||a<w)&&(w=a);for(-1!==(b=-1===w?m.lastIndexOf("@"):m.lastIndexOf("@",w))&&(y=m.slice(0,b),m=m.slice(b+1),this.auth=y),w=-1,n=0;n<u.length;n++)-1!==(a=m.indexOf(u[n]))&&(-1===w||a<w)&&(w=a);-1===w&&(w=m.length),":"===m[w-1]&&w--;var k=m.slice(0,w);m=m.slice(w),this.parseHost(k),this.hostname=this.hostname||"";var x="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!x){var _=this.hostname.split(/\./);for(n=0,r=_.length;n<r;n++){var C=_[n];if(C&&!C.match(p)){for(var S="",O=0,A=C.length;O<A;O++)C.charCodeAt(O)>127?S+="x":S+=C[O];if(!S.match(p)){var E=_.slice(0,n),M=_.slice(n+1),T=C.match(f);T&&(E.push(T[1]),M.unshift(T[2])),M.length&&(m=M.join(".")+m),this.hostname=E.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),x&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var D=m.indexOf("#");-1!==D&&(this.hash=m.substr(D),m=m.slice(0,D));var N=m.indexOf("?");return-1!==N&&(this.search=m.substr(N),m=m.slice(0,N)),m&&(this.pathname=m),d[i]&&this.hostname&&!this.pathname&&(this.pathname=""),this},r.prototype.parseHost=function(e){var t=i.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},e.exports=function(e,t){if(e&&e instanceof r)return e;var n=new r;return n.parse(e,t),n}},function(e,t,n){"use strict";t.Any=n(275),t.Cc=n(276),t.Cf=n(489),t.P=n(257),t.Z=n(277)},function(e,t){e.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/},function(e,t,n){"use strict";t.parseLinkLabel=n(491),t.parseLinkDestination=n(492),t.parseLinkTitle=n(493)},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,o,i,s,a=-1,c=e.posMax,u=e.pos;for(e.pos=t+1,r=1;e.pos<c;){if(93===(i=e.src.charCodeAt(e.pos))&&0===--r){o=!0;break}if(s=e.pos,e.md.inline.skipToken(e),91===i)if(s===e.pos-1)r++;else if(n)return e.pos=u,-1}return o&&(a=e.pos),e.pos=u,a}},function(e,t,n){"use strict";var r=n(238).isSpace,o=n(238).unescapeAll;e.exports=function(e,t,n){var i,s,a=t,c={ok:!1,pos:0,lines:0,str:""};if(60===e.charCodeAt(t)){for(t++;t<n;){if(10===(i=e.charCodeAt(t))||r(i))return c;if(62===i)return c.pos=t+1,c.str=o(e.slice(a+1,t)),c.ok=!0,c;92===i&&t+1<n?t+=2:t++}return c}for(s=0;t<n&&32!==(i=e.charCodeAt(t))&&!(i<32||127===i);)if(92===i&&t+1<n)t+=2;else{if(40===i&&s++,41===i){if(0===s)break;s--}t++}return a===t?c:0!==s?c:(c.str=o(e.slice(a,t)),c.lines=0,c.pos=t,c.ok=!0,c)}},function(e,t,n){"use strict";var r=n(238).unescapeAll;e.exports=function(e,t,n){var o,i,s=0,a=t,c={ok:!1,pos:0,lines:0,str:""};if(t>=n)return c;if(34!==(i=e.charCodeAt(t))&&39!==i&&40!==i)return c;for(t++,40===i&&(i=41);t<n;){if((o=e.charCodeAt(t))===i)return c.pos=t+1,c.lines=s,c.str=r(e.slice(a+1,t)),c.ok=!0,c;10===o?s++:92===o&&t+1<n&&(t++,10===e.charCodeAt(t)&&s++),t++}return c}},function(e,t,n){"use strict";var r=n(238).assign,o=n(238).unescapeAll,i=n(238).escapeHtml,s={};function a(){this.rules=r({},s)}s.code_inline=function(e,t,n,r,o){var s=e[t];return"<code"+o.renderAttrs(s)+">"+i(e[t].content)+"</code>"},s.code_block=function(e,t,n,r,o){var s=e[t];return"<pre"+o.renderAttrs(s)+"><code>"+i(e[t].content)+"</code></pre>\n"},s.fence=function(e,t,n,r,s){var a,c,u,l,p=e[t],f=p.info?o(p.info).trim():"",h="";return f&&(h=f.split(/\s+/g)[0]),0===(a=n.highlight&&n.highlight(p.content,h)||i(p.content)).indexOf("<pre")?a+"\n":f?(c=p.attrIndex("class"),u=p.attrs?p.attrs.slice():[],c<0?u.push(["class",n.langPrefix+h]):u[c][1]+=" "+n.langPrefix+h,l={attrs:u},"<pre><code"+s.renderAttrs(l)+">"+a+"</code></pre>\n"):"<pre><code"+s.renderAttrs(p)+">"+a+"</code></pre>\n"},s.image=function(e,t,n,r,o){var i=e[t];return i.attrs[i.attrIndex("alt")][1]=o.renderInlineAsText(i.children,n,r),o.renderToken(e,t,n)},s.hardbreak=function(e,t,n){return n.xhtmlOut?"<br />\n":"<br>\n"},s.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?"<br />\n":"<br>\n":"\n"},s.text=function(e,t){return i(e[t].content)},s.html_block=function(e,t){return e[t].content},s.html_inline=function(e,t){return e[t].content},a.prototype.renderAttrs=function(e){var t,n,r;if(!e.attrs)return"";for(r="",t=0,n=e.attrs.length;t<n;t++)r+=" "+i(e.attrs[t][0])+'="'+i(e.attrs[t][1])+'"';return r},a.prototype.renderToken=function(e,t,n){var r,o="",i=!1,s=e[t];return s.hidden?"":(s.block&&-1!==s.nesting&&t&&e[t-1].hidden&&(o+="\n"),o+=(-1===s.nesting?"</":"<")+s.tag,o+=this.renderAttrs(s),0===s.nesting&&n.xhtmlOut&&(o+=" /"),s.block&&(i=!0,1===s.nesting&&t+1<e.length&&("inline"===(r=e[t+1]).type||r.hidden?i=!1:-1===r.nesting&&r.tag===s.tag&&(i=!1))),o+=i?">\n":">")},a.prototype.renderInline=function(e,t,n){for(var r,o="",i=this.rules,s=0,a=e.length;s<a;s++)void 0!==i[r=e[s].type]?o+=i[r](e,s,t,n,this):o+=this.renderToken(e,s,t);return o},a.prototype.renderInlineAsText=function(e,t,n){for(var r="",o=0,i=e.length;o<i;o++)"text"===e[o].type?r+=e[o].content:"image"===e[o].type&&(r+=this.renderInlineAsText(e[o].children,t,n));return r},a.prototype.render=function(e,t,n){var r,o,i,s="",a=this.rules;for(r=0,o=e.length;r<o;r++)"inline"===(i=e[r].type)?s+=this.renderInline(e[r].children,t,n):void 0!==a[i]?s+=a[e[r].type](e,r,t,n,this):s+=this.renderToken(e,r,t,n);return s},e.exports=a},function(e,t,n){"use strict";var r=n(258),o=[["normalize",n(496)],["block",n(497)],["inline",n(498)],["linkify",n(499)],["replacements",n(500)],["smartquotes",n(501)]];function i(){this.ruler=new r;for(var e=0;e<o.length;e++)this.ruler.push(o[e][0],o[e][1])}i.prototype.process=function(e){var t,n,r;for(t=0,n=(r=this.ruler.getRules("")).length;t<n;t++)r[t](e)},i.prototype.State=n(502),e.exports=i},function(e,t,n){"use strict";var r=/\r[\n\u0085]?|[\u2424\u2028\u0085]/g,o=/\u0000/g;e.exports=function(e){var t;t=(t=e.src.replace(r,"\n")).replace(o,"�"),e.src=t}},function(e,t,n){"use strict";e.exports=function(e){var t;e.inlineMode?((t=new e.Token("inline","",0)).content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}},function(e,t,n){"use strict";e.exports=function(e){var t,n,r,o=e.tokens;for(n=0,r=o.length;n<r;n++)"inline"===(t=o[n]).type&&e.md.inline.parse(t.content,e.md,e.env,t.children)}},function(e,t,n){"use strict";var r=n(238).arrayReplaceAt;function o(e){return/^<\/a\s*>/i.test(e)}e.exports=function(e){var t,n,i,s,a,c,u,l,p,f,h,d,m,v,g,y,b,w,k=e.tokens;if(e.md.options.linkify)for(n=0,i=k.length;n<i;n++)if("inline"===k[n].type&&e.md.linkify.pretest(k[n].content))for(m=0,t=(s=k[n].children).length-1;t>=0;t--)if("link_close"!==(c=s[t]).type){if("html_inline"===c.type&&(w=c.content,/^<a[>\s]/i.test(w)&&m>0&&m--,o(c.content)&&m++),!(m>0)&&"text"===c.type&&e.md.linkify.test(c.content)){for(p=c.content,b=e.md.linkify.match(p),u=[],d=c.level,h=0,l=0;l<b.length;l++)v=b[l].url,g=e.md.normalizeLink(v),e.md.validateLink(g)&&(y=b[l].text,y=b[l].schema?"mailto:"!==b[l].schema||/^mailto:/i.test(y)?e.md.normalizeLinkText(y):e.md.normalizeLinkText("mailto:"+y).replace(/^mailto:/,""):e.md.normalizeLinkText("http://"+y).replace(/^http:\/\//,""),(f=b[l].index)>h&&((a=new e.Token("text","",0)).content=p.slice(h,f),a.level=d,u.push(a)),(a=new e.Token("link_open","a",1)).attrs=[["href",g]],a.level=d++,a.markup="linkify",a.info="auto",u.push(a),(a=new e.Token("text","",0)).content=y,a.level=d,u.push(a),(a=new e.Token("link_close","a",-1)).level=--d,a.markup="linkify",a.info="auto",u.push(a),h=b[l].lastIndex);h<p.length&&((a=new e.Token("text","",0)).content=p.slice(h),a.level=d,u.push(a)),k[n].children=s=r(s,t,u)}}else for(t--;s[t].level!==c.level&&"link_open"!==s[t].type;)t--}},function(e,t,n){"use strict";var r=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,o=/\((c|tm|r|p)\)/i,i=/\((c|tm|r|p)\)/gi,s={c:"©",r:"®",p:"§",tm:"™"};function a(e,t){return s[t.toLowerCase()]}function c(e){var t,n,r=0;for(t=e.length-1;t>=0;t--)"text"!==(n=e[t]).type||r||(n.content=n.content.replace(i,a)),"link_open"===n.type&&"auto"===n.info&&r--,"link_close"===n.type&&"auto"===n.info&&r++}function u(e){var t,n,o=0;for(t=e.length-1;t>=0;t--)"text"!==(n=e[t]).type||o||r.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---([^-]|$)/gm,"$1—$2").replace(/(^|\s)--(\s|$)/gm,"$1–$2").replace(/(^|[^-\s])--([^-\s]|$)/gm,"$1–$2")),"link_open"===n.type&&"auto"===n.info&&o--,"link_close"===n.type&&"auto"===n.info&&o++}e.exports=function(e){var t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&(o.test(e.tokens[t].content)&&c(e.tokens[t].children),r.test(e.tokens[t].content)&&u(e.tokens[t].children))}},function(e,t,n){"use strict";var r=n(238).isWhiteSpace,o=n(238).isPunctChar,i=n(238).isMdAsciiPunct,s=/['"]/,a=/['"]/g,c="’";function u(e,t,n){return e.substr(0,t)+n+e.substr(t+1)}function l(e,t){var n,s,l,p,f,h,d,m,v,g,y,b,w,k,x,_,C,S,O,A,E;for(O=[],n=0;n<e.length;n++){for(s=e[n],d=e[n].level,C=O.length-1;C>=0&&!(O[C].level<=d);C--);if(O.length=C+1,"text"===s.type){f=0,h=(l=s.content).length;e:for(;f<h&&(a.lastIndex=f,p=a.exec(l));){if(x=_=!0,f=p.index+1,S="'"===p[0],v=32,p.index-1>=0)v=l.charCodeAt(p.index-1);else for(C=n-1;C>=0&&("softbreak"!==e[C].type&&"hardbreak"!==e[C].type);C--)if("text"===e[C].type){v=e[C].content.charCodeAt(e[C].content.length-1);break}if(g=32,f<h)g=l.charCodeAt(f);else for(C=n+1;C<e.length&&("softbreak"!==e[C].type&&"hardbreak"!==e[C].type);C++)if("text"===e[C].type){g=e[C].content.charCodeAt(0);break}if(y=i(v)||o(String.fromCharCode(v)),b=i(g)||o(String.fromCharCode(g)),w=r(v),(k=r(g))?x=!1:b&&(w||y||(x=!1)),w?_=!1:y&&(k||b||(_=!1)),34===g&&'"'===p[0]&&v>=48&&v<=57&&(_=x=!1),x&&_&&(x=!1,_=b),x||_){if(_)for(C=O.length-1;C>=0&&(m=O[C],!(O[C].level<d));C--)if(m.single===S&&O[C].level===d){m=O[C],S?(A=t.md.options.quotes[2],E=t.md.options.quotes[3]):(A=t.md.options.quotes[0],E=t.md.options.quotes[1]),s.content=u(s.content,p.index,E),e[m.token].content=u(e[m.token].content,m.pos,A),f+=E.length-1,m.token===n&&(f+=A.length-1),h=(l=s.content).length,O.length=C;continue e}x?O.push({token:n,pos:p.index,single:S,level:d}):_&&S&&(s.content=u(s.content,p.index,c))}else S&&(s.content=u(s.content,p.index,c))}}}}e.exports=function(e){var t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&s.test(e.tokens[t].content)&&l(e.tokens[t].children,e)}},function(e,t,n){"use strict";var r=n(259);function o(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}o.prototype.Token=r,e.exports=o},function(e,t,n){"use strict";var r=n(258),o=[["table",n(504),["paragraph","reference"]],["code",n(505)],["fence",n(506),["paragraph","reference","blockquote","list"]],["blockquote",n(507),["paragraph","reference","blockquote","list"]],["hr",n(508),["paragraph","reference","blockquote","list"]],["list",n(509),["paragraph","reference","blockquote"]],["reference",n(510)],["heading",n(511),["paragraph","reference","blockquote"]],["lheading",n(512)],["html_block",n(513),["paragraph","reference","blockquote"]],["paragraph",n(515)]];function i(){this.ruler=new r;for(var e=0;e<o.length;e++)this.ruler.push(o[e][0],o[e][1],{alt:(o[e][2]||[]).slice()})}i.prototype.tokenize=function(e,t,n){for(var r,o=this.ruler.getRules(""),i=o.length,s=t,a=!1,c=e.md.options.maxNesting;s<n&&(e.line=s=e.skipEmptyLines(s),!(s>=n))&&!(e.sCount[s]<e.blkIndent);){if(e.level>=c){e.line=n;break}for(r=0;r<i&&!o[r](e,s,n,!1);r++);e.tight=!a,e.isEmpty(e.line-1)&&(a=!0),(s=e.line)<n&&e.isEmpty(s)&&(a=!0,s++,e.line=s)}},i.prototype.parse=function(e,t,n,r){var o;e&&(o=new this.State(e,t,n,r),this.tokenize(o,o.line,o.lineMax))},i.prototype.State=n(516),e.exports=i},function(e,t,n){"use strict";var r=n(238).isSpace;function o(e,t){var n=e.bMarks[t]+e.blkIndent,r=e.eMarks[t];return e.src.substr(n,r-n)}function i(e){var t,n=[],r=0,o=e.length,i=0,s=0,a=!1,c=0;for(t=e.charCodeAt(r);r<o;)96===t?a?(a=!1,c=r):i%2==0&&(a=!0,c=r):124!==t||i%2!=0||a||(n.push(e.substring(s,r)),s=r+1),92===t?i++:i=0,++r===o&&a&&(a=!1,r=c+1),t=e.charCodeAt(r);return n.push(e.substring(s)),n}e.exports=function(e,t,n,s){var a,c,u,l,p,f,h,d,m,v,g,y;if(t+2>n)return!1;if(p=t+1,e.sCount[p]<e.blkIndent)return!1;if(e.sCount[p]-e.blkIndent>=4)return!1;if((u=e.bMarks[p]+e.tShift[p])>=e.eMarks[p])return!1;if(124!==(a=e.src.charCodeAt(u++))&&45!==a&&58!==a)return!1;for(;u<e.eMarks[p];){if(124!==(a=e.src.charCodeAt(u))&&45!==a&&58!==a&&!r(a))return!1;u++}for(f=(c=o(e,t+1)).split("|"),m=[],l=0;l<f.length;l++){if(!(v=f[l].trim())){if(0===l||l===f.length-1)continue;return!1}if(!/^:?-+:?$/.test(v))return!1;58===v.charCodeAt(v.length-1)?m.push(58===v.charCodeAt(0)?"center":"right"):58===v.charCodeAt(0)?m.push("left"):m.push("")}if(-1===(c=o(e,t).trim()).indexOf("|"))return!1;if(e.sCount[t]-e.blkIndent>=4)return!1;if((h=(f=i(c.replace(/^\||\|$/g,""))).length)>m.length)return!1;if(s)return!0;for((d=e.push("table_open","table",1)).map=g=[t,0],(d=e.push("thead_open","thead",1)).map=[t,t+1],(d=e.push("tr_open","tr",1)).map=[t,t+1],l=0;l<f.length;l++)(d=e.push("th_open","th",1)).map=[t,t+1],m[l]&&(d.attrs=[["style","text-align:"+m[l]]]),(d=e.push("inline","",0)).content=f[l].trim(),d.map=[t,t+1],d.children=[],d=e.push("th_close","th",-1);for(d=e.push("tr_close","tr",-1),d=e.push("thead_close","thead",-1),(d=e.push("tbody_open","tbody",1)).map=y=[t+2,0],p=t+2;p<n&&!(e.sCount[p]<e.blkIndent)&&-1!==(c=o(e,p).trim()).indexOf("|")&&!(e.sCount[p]-e.blkIndent>=4);p++){for(f=i(c.replace(/^\||\|$/g,"")),d=e.push("tr_open","tr",1),l=0;l<h;l++)d=e.push("td_open","td",1),m[l]&&(d.attrs=[["style","text-align:"+m[l]]]),(d=e.push("inline","",0)).content=f[l]?f[l].trim():"",d.children=[],d=e.push("td_close","td",-1);d=e.push("tr_close","tr",-1)}return d=e.push("tbody_close","tbody",-1),d=e.push("table_close","table",-1),g[1]=y[1]=p,e.line=p,!0}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,o,i;if(e.sCount[t]-e.blkIndent<4)return!1;for(o=r=t+1;r<n;)if(e.isEmpty(r))r++;else{if(!(e.sCount[r]-e.blkIndent>=4))break;o=++r}return e.line=o,(i=e.push("code_block","code",0)).content=e.getLines(t,o,4+e.blkIndent,!0),i.map=[t,e.line],!0}},function(e,t,n){"use strict";e.exports=function(e,t,n,r){var o,i,s,a,c,u,l,p=!1,f=e.bMarks[t]+e.tShift[t],h=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(f+3>h)return!1;if(126!==(o=e.src.charCodeAt(f))&&96!==o)return!1;if(c=f,(i=(f=e.skipChars(f,o))-c)<3)return!1;if(l=e.src.slice(c,f),(s=e.src.slice(f,h)).indexOf(String.fromCharCode(o))>=0)return!1;if(r)return!0;for(a=t;!(++a>=n)&&!((f=c=e.bMarks[a]+e.tShift[a])<(h=e.eMarks[a])&&e.sCount[a]<e.blkIndent);)if(e.src.charCodeAt(f)===o&&!(e.sCount[a]-e.blkIndent>=4||(f=e.skipChars(f,o))-c<i||(f=e.skipSpaces(f))<h)){p=!0;break}return i=e.sCount[t],e.line=a+(p?1:0),(u=e.push("fence","code",0)).info=s,u.content=e.getLines(t+1,a,i,!0),u.markup=l,u.map=[t,e.line],!0}},function(e,t,n){"use strict";var r=n(238).isSpace;e.exports=function(e,t,n,o){var i,s,a,c,u,l,p,f,h,d,m,v,g,y,b,w,k,x,_,C,S=e.lineMax,O=e.bMarks[t]+e.tShift[t],A=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(62!==e.src.charCodeAt(O++))return!1;if(o)return!0;for(c=h=e.sCount[t]+O-(e.bMarks[t]+e.tShift[t]),32===e.src.charCodeAt(O)?(O++,c++,h++,i=!1,w=!0):9===e.src.charCodeAt(O)?(w=!0,(e.bsCount[t]+h)%4==3?(O++,c++,h++,i=!1):i=!0):w=!1,d=[e.bMarks[t]],e.bMarks[t]=O;O<A&&(s=e.src.charCodeAt(O),r(s));)9===s?h+=4-(h+e.bsCount[t]+(i?1:0))%4:h++,O++;for(m=[e.bsCount[t]],e.bsCount[t]=e.sCount[t]+1+(w?1:0),l=O>=A,y=[e.sCount[t]],e.sCount[t]=h-c,b=[e.tShift[t]],e.tShift[t]=O-e.bMarks[t],x=e.md.block.ruler.getRules("blockquote"),g=e.parentType,e.parentType="blockquote",C=!1,f=t+1;f<n&&(e.sCount[f]<e.blkIndent&&(C=!0),!((O=e.bMarks[f]+e.tShift[f])>=(A=e.eMarks[f])));f++)if(62!==e.src.charCodeAt(O++)||C){if(l)break;for(k=!1,a=0,u=x.length;a<u;a++)if(x[a](e,f,n,!0)){k=!0;break}if(k){e.lineMax=f,0!==e.blkIndent&&(d.push(e.bMarks[f]),m.push(e.bsCount[f]),b.push(e.tShift[f]),y.push(e.sCount[f]),e.sCount[f]-=e.blkIndent);break}d.push(e.bMarks[f]),m.push(e.bsCount[f]),b.push(e.tShift[f]),y.push(e.sCount[f]),e.sCount[f]=-1}else{for(c=h=e.sCount[f]+O-(e.bMarks[f]+e.tShift[f]),32===e.src.charCodeAt(O)?(O++,c++,h++,i=!1,w=!0):9===e.src.charCodeAt(O)?(w=!0,(e.bsCount[f]+h)%4==3?(O++,c++,h++,i=!1):i=!0):w=!1,d.push(e.bMarks[f]),e.bMarks[f]=O;O<A&&(s=e.src.charCodeAt(O),r(s));)9===s?h+=4-(h+e.bsCount[f]+(i?1:0))%4:h++,O++;l=O>=A,m.push(e.bsCount[f]),e.bsCount[f]=e.sCount[f]+1+(w?1:0),y.push(e.sCount[f]),e.sCount[f]=h-c,b.push(e.tShift[f]),e.tShift[f]=O-e.bMarks[f]}for(v=e.blkIndent,e.blkIndent=0,(_=e.push("blockquote_open","blockquote",1)).markup=">",_.map=p=[t,0],e.md.block.tokenize(e,t,f),(_=e.push("blockquote_close","blockquote",-1)).markup=">",e.lineMax=S,e.parentType=g,p[1]=e.line,a=0;a<b.length;a++)e.bMarks[a+t]=d[a],e.tShift[a+t]=b[a],e.sCount[a+t]=y[a],e.bsCount[a+t]=m[a];return e.blkIndent=v,!0}},function(e,t,n){"use strict";var r=n(238).isSpace;e.exports=function(e,t,n,o){var i,s,a,c,u=e.bMarks[t]+e.tShift[t],l=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(42!==(i=e.src.charCodeAt(u++))&&45!==i&&95!==i)return!1;for(s=1;u<l;){if((a=e.src.charCodeAt(u++))!==i&&!r(a))return!1;a===i&&s++}return!(s<3)&&(!!o||(e.line=t+1,(c=e.push("hr","hr",0)).map=[t,e.line],c.markup=Array(s+1).join(String.fromCharCode(i)),!0))}},function(e,t,n){"use strict";var r=n(238).isSpace;function o(e,t){var n,o,i,s;return o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t],42!==(n=e.src.charCodeAt(o++))&&45!==n&&43!==n?-1:o<i&&(s=e.src.charCodeAt(o),!r(s))?-1:o}function i(e,t){var n,o=e.bMarks[t]+e.tShift[t],i=o,s=e.eMarks[t];if(i+1>=s)return-1;if((n=e.src.charCodeAt(i++))<48||n>57)return-1;for(;;){if(i>=s)return-1;if(!((n=e.src.charCodeAt(i++))>=48&&n<=57)){if(41===n||46===n)break;return-1}if(i-o>=10)return-1}return i<s&&(n=e.src.charCodeAt(i),!r(n))?-1:i}e.exports=function(e,t,n,r){var s,a,c,u,l,p,f,h,d,m,v,g,y,b,w,k,x,_,C,S,O,A,E,M,T,D,N,R,I=!1,P=!0;if(e.sCount[t]-e.blkIndent>=4)return!1;if(r&&"paragraph"===e.parentType&&e.tShift[t]>=e.blkIndent&&(I=!0),(E=i(e,t))>=0){if(f=!0,T=e.bMarks[t]+e.tShift[t],y=Number(e.src.substr(T,E-T-1)),I&&1!==y)return!1}else{if(!((E=o(e,t))>=0))return!1;f=!1}if(I&&e.skipSpaces(E)>=e.eMarks[t])return!1;if(g=e.src.charCodeAt(E-1),r)return!0;for(v=e.tokens.length,f?(R=e.push("ordered_list_open","ol",1),1!==y&&(R.attrs=[["start",y]])):R=e.push("bullet_list_open","ul",1),R.map=m=[t,0],R.markup=String.fromCharCode(g),w=t,M=!1,N=e.md.block.ruler.getRules("list"),C=e.parentType,e.parentType="list";w<n;){for(A=E,b=e.eMarks[w],p=k=e.sCount[w]+E-(e.bMarks[t]+e.tShift[t]);A<b;){if(9===(s=e.src.charCodeAt(A)))k+=4-(k+e.bsCount[w])%4;else{if(32!==s)break;k++}A++}if((l=(a=A)>=b?1:k-p)>4&&(l=1),u=p+l,(R=e.push("list_item_open","li",1)).markup=String.fromCharCode(g),R.map=h=[t,0],x=e.blkIndent,O=e.tight,S=e.tShift[t],_=e.sCount[t],e.blkIndent=u,e.tight=!0,e.tShift[t]=a-e.bMarks[t],e.sCount[t]=k,a>=b&&e.isEmpty(t+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,t,n,!0),e.tight&&!M||(P=!1),M=e.line-t>1&&e.isEmpty(e.line-1),e.blkIndent=x,e.tShift[t]=S,e.sCount[t]=_,e.tight=O,(R=e.push("list_item_close","li",-1)).markup=String.fromCharCode(g),w=t=e.line,h[1]=w,a=e.bMarks[t],w>=n)break;if(e.sCount[w]<e.blkIndent)break;for(D=!1,c=0,d=N.length;c<d;c++)if(N[c](e,w,n,!0)){D=!0;break}if(D)break;if(f){if((E=i(e,w))<0)break}else if((E=o(e,w))<0)break;if(g!==e.src.charCodeAt(E-1))break}return(R=f?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1)).markup=String.fromCharCode(g),m[1]=w,e.line=w,e.parentType=C,P&&function(e,t){var n,r,o=e.level+2;for(n=t+2,r=e.tokens.length-2;n<r;n++)e.tokens[n].level===o&&"paragraph_open"===e.tokens[n].type&&(e.tokens[n+2].hidden=!0,e.tokens[n].hidden=!0,n+=2)}(e,v),!0}},function(e,t,n){"use strict";var r=n(238).normalizeReference,o=n(238).isSpace;e.exports=function(e,t,n,i){var s,a,c,u,l,p,f,h,d,m,v,g,y,b,w,k,x=0,_=e.bMarks[t]+e.tShift[t],C=e.eMarks[t],S=t+1;if(e.sCount[t]-e.blkIndent>=4)return!1;if(91!==e.src.charCodeAt(_))return!1;for(;++_<C;)if(93===e.src.charCodeAt(_)&&92!==e.src.charCodeAt(_-1)){if(_+1===C)return!1;if(58!==e.src.charCodeAt(_+1))return!1;break}for(u=e.lineMax,w=e.md.block.ruler.getRules("reference"),m=e.parentType,e.parentType="reference";S<u&&!e.isEmpty(S);S++)if(!(e.sCount[S]-e.blkIndent>3||e.sCount[S]<0)){for(b=!1,p=0,f=w.length;p<f;p++)if(w[p](e,S,u,!0)){b=!0;break}if(b)break}for(C=(y=e.getLines(t,S,e.blkIndent,!1).trim()).length,_=1;_<C;_++){if(91===(s=y.charCodeAt(_)))return!1;if(93===s){d=_;break}10===s?x++:92===s&&++_<C&&10===y.charCodeAt(_)&&x++}if(d<0||58!==y.charCodeAt(d+1))return!1;for(_=d+2;_<C;_++)if(10===(s=y.charCodeAt(_)))x++;else if(!o(s))break;if(!(v=e.md.helpers.parseLinkDestination(y,_,C)).ok)return!1;if(l=e.md.normalizeLink(v.str),!e.md.validateLink(l))return!1;for(a=_=v.pos,c=x+=v.lines,g=_;_<C;_++)if(10===(s=y.charCodeAt(_)))x++;else if(!o(s))break;for(v=e.md.helpers.parseLinkTitle(y,_,C),_<C&&g!==_&&v.ok?(k=v.str,_=v.pos,x+=v.lines):(k="",_=a,x=c);_<C&&(s=y.charCodeAt(_),o(s));)_++;if(_<C&&10!==y.charCodeAt(_)&&k)for(k="",_=a,x=c;_<C&&(s=y.charCodeAt(_),o(s));)_++;return!(_<C&&10!==y.charCodeAt(_))&&(!!(h=r(y.slice(1,d)))&&(!!i||(void 0===e.env.references&&(e.env.references={}),void 0===e.env.references[h]&&(e.env.references[h]={title:k,href:l}),e.parentType=m,e.line=t+x+1,!0)))}},function(e,t,n){"use strict";var r=n(238).isSpace;e.exports=function(e,t,n,o){var i,s,a,c,u=e.bMarks[t]+e.tShift[t],l=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(35!==(i=e.src.charCodeAt(u))||u>=l)return!1;for(s=1,i=e.src.charCodeAt(++u);35===i&&u<l&&s<=6;)s++,i=e.src.charCodeAt(++u);return!(s>6||u<l&&!r(i))&&(!!o||(l=e.skipSpacesBack(l,u),(a=e.skipCharsBack(l,35,u))>u&&r(e.src.charCodeAt(a-1))&&(l=a),e.line=t+1,(c=e.push("heading_open","h"+String(s),1)).markup="########".slice(0,s),c.map=[t,e.line],(c=e.push("inline","",0)).content=e.src.slice(u,l).trim(),c.map=[t,e.line],c.children=[],(c=e.push("heading_close","h"+String(s),-1)).markup="########".slice(0,s),!0))}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,o,i,s,a,c,u,l,p,f,h=t+1,d=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;for(f=e.parentType,e.parentType="paragraph";h<n&&!e.isEmpty(h);h++)if(!(e.sCount[h]-e.blkIndent>3)){if(e.sCount[h]>=e.blkIndent&&(c=e.bMarks[h]+e.tShift[h])<(u=e.eMarks[h])&&(45===(p=e.src.charCodeAt(c))||61===p)&&(c=e.skipChars(c,p),(c=e.skipSpaces(c))>=u)){l=61===p?1:2;break}if(!(e.sCount[h]<0)){for(o=!1,i=0,s=d.length;i<s;i++)if(d[i](e,h,n,!0)){o=!0;break}if(o)break}}return!!l&&(r=e.getLines(t,h,e.blkIndent,!1).trim(),e.line=h+1,(a=e.push("heading_open","h"+String(l),1)).markup=String.fromCharCode(p),a.map=[t,e.line],(a=e.push("inline","",0)).content=r,a.map=[t,e.line-1],a.children=[],(a=e.push("heading_close","h"+String(l),-1)).markup=String.fromCharCode(p),e.parentType=f,!0)}},function(e,t,n){"use strict";var r=n(514),o=n(278).HTML_OPEN_CLOSE_TAG_RE,i=[[/^<(script|pre|style)(?=(\s|>|$))/i,/<\/(script|pre|style)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+r.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(o.source+"\\s*$"),/^$/,!1]];e.exports=function(e,t,n,r){var o,s,a,c,u=e.bMarks[t]+e.tShift[t],l=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(u))return!1;for(c=e.src.slice(u,l),o=0;o<i.length&&!i[o][0].test(c);o++);if(o===i.length)return!1;if(r)return i[o][2];if(s=t+1,!i[o][1].test(c))for(;s<n&&!(e.sCount[s]<e.blkIndent);s++)if(u=e.bMarks[s]+e.tShift[s],l=e.eMarks[s],c=e.src.slice(u,l),i[o][1].test(c)){0!==c.length&&s++;break}return e.line=s,(a=e.push("html_block","",0)).map=[t,s],a.content=e.getLines(t,s,e.blkIndent,!0),!0}},function(e,t,n){"use strict";e.exports=["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","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","meta","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]},function(e,t,n){"use strict";e.exports=function(e,t){var n,r,o,i,s,a,c=t+1,u=e.md.block.ruler.getRules("paragraph"),l=e.lineMax;for(a=e.parentType,e.parentType="paragraph";c<l&&!e.isEmpty(c);c++)if(!(e.sCount[c]-e.blkIndent>3||e.sCount[c]<0)){for(r=!1,o=0,i=u.length;o<i;o++)if(u[o](e,c,l,!0)){r=!0;break}if(r)break}return n=e.getLines(t,c,e.blkIndent,!1).trim(),e.line=c,(s=e.push("paragraph_open","p",1)).map=[t,e.line],(s=e.push("inline","",0)).content=n,s.map=[t,e.line],s.children=[],s=e.push("paragraph_close","p",-1),e.parentType=a,!0}},function(e,t,n){"use strict";var r=n(259),o=n(238).isSpace;function i(e,t,n,r){var i,s,a,c,u,l,p,f;for(this.src=e,this.md=t,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.parentType="root",this.level=0,this.result="",f=!1,a=c=l=p=0,u=(s=this.src).length;c<u;c++){if(i=s.charCodeAt(c),!f){if(o(i)){l++,9===i?p+=4-p%4:p++;continue}f=!0}10!==i&&c!==u-1||(10!==i&&c++,this.bMarks.push(a),this.eMarks.push(c),this.tShift.push(l),this.sCount.push(p),this.bsCount.push(0),f=!1,l=0,p=0,a=c+1)}this.bMarks.push(s.length),this.eMarks.push(s.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}i.prototype.push=function(e,t,n){var o=new r(e,t,n);return o.block=!0,n<0&&this.level--,o.level=this.level,n>0&&this.level++,this.tokens.push(o),o},i.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},i.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},i.prototype.skipSpaces=function(e){for(var t,n=this.src.length;e<n&&(t=this.src.charCodeAt(e),o(t));e++);return e},i.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!o(this.src.charCodeAt(--e)))return e+1;return e},i.prototype.skipChars=function(e,t){for(var n=this.src.length;e<n&&this.src.charCodeAt(e)===t;e++);return e},i.prototype.skipCharsBack=function(e,t,n){if(e<=n)return e;for(;e>n;)if(t!==this.src.charCodeAt(--e))return e+1;return e},i.prototype.getLines=function(e,t,n,r){var i,s,a,c,u,l,p,f=e;if(e>=t)return"";for(l=new Array(t-e),i=0;f<t;f++,i++){for(s=0,p=c=this.bMarks[f],u=f+1<t||r?this.eMarks[f]+1:this.eMarks[f];c<u&&s<n;){if(a=this.src.charCodeAt(c),o(a))9===a?s+=4-(s+this.bsCount[f])%4:s++;else{if(!(c-p<this.tShift[f]))break;s++}c++}l[i]=s>n?new Array(s-n+1).join(" ")+this.src.slice(c,u):this.src.slice(c,u)}return l.join("")},i.prototype.Token=r,e.exports=i},function(e,t,n){"use strict";var r=n(258),o=[["text",n(518)],["newline",n(519)],["escape",n(520)],["backticks",n(521)],["strikethrough",n(279).tokenize],["emphasis",n(280).tokenize],["link",n(522)],["image",n(523)],["autolink",n(524)],["html_inline",n(525)],["entity",n(526)]],i=[["balance_pairs",n(527)],["strikethrough",n(279).postProcess],["emphasis",n(280).postProcess],["text_collapse",n(528)]];function s(){var e;for(this.ruler=new r,e=0;e<o.length;e++)this.ruler.push(o[e][0],o[e][1]);for(this.ruler2=new r,e=0;e<i.length;e++)this.ruler2.push(i[e][0],i[e][1])}s.prototype.skipToken=function(e){var t,n,r=e.pos,o=this.ruler.getRules(""),i=o.length,s=e.md.options.maxNesting,a=e.cache;if(void 0===a[r]){if(e.level<s)for(n=0;n<i&&(e.level++,t=o[n](e,!0),e.level--,!t);n++);else e.pos=e.posMax;t||e.pos++,a[r]=e.pos}else e.pos=a[r]},s.prototype.tokenize=function(e){for(var t,n,r=this.ruler.getRules(""),o=r.length,i=e.posMax,s=e.md.options.maxNesting;e.pos<i;){if(e.level<s)for(n=0;n<o&&!(t=r[n](e,!1));n++);if(t){if(e.pos>=i)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},s.prototype.parse=function(e,t,n,r){var o,i,s,a=new this.State(e,t,n,r);for(this.tokenize(a),s=(i=this.ruler2.getRules("")).length,o=0;o<s;o++)i[o](a)},s.prototype.State=n(529),e.exports=s},function(e,t,n){"use strict";function r(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}e.exports=function(e,t){for(var n=e.pos;n<e.posMax&&!r(e.src.charCodeAt(n));)n++;return n!==e.pos&&(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}},function(e,t,n){"use strict";var r=n(238).isSpace;e.exports=function(e,t){var n,o,i=e.pos;if(10!==e.src.charCodeAt(i))return!1;for(n=e.pending.length-1,o=e.posMax,t||(n>=0&&32===e.pending.charCodeAt(n)?n>=1&&32===e.pending.charCodeAt(n-1)?(e.pending=e.pending.replace(/ +$/,""),e.push("hardbreak","br",0)):(e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0)):e.push("softbreak","br",0)),i++;i<o&&r(e.src.charCodeAt(i));)i++;return e.pos=i,!0}},function(e,t,n){"use strict";for(var r=n(238).isSpace,o=[],i=0;i<256;i++)o.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach((function(e){o[e.charCodeAt(0)]=1})),e.exports=function(e,t){var n,i=e.pos,s=e.posMax;if(92!==e.src.charCodeAt(i))return!1;if(++i<s){if((n=e.src.charCodeAt(i))<256&&0!==o[n])return t||(e.pending+=e.src[i]),e.pos+=2,!0;if(10===n){for(t||e.push("hardbreak","br",0),i++;i<s&&(n=e.src.charCodeAt(i),r(n));)i++;return e.pos=i,!0}}return t||(e.pending+="\\"),e.pos++,!0}},function(e,t,n){"use strict";e.exports=function(e,t){var n,r,o,i,s,a,c=e.pos;if(96!==e.src.charCodeAt(c))return!1;for(n=c,c++,r=e.posMax;c<r&&96===e.src.charCodeAt(c);)c++;for(o=e.src.slice(n,c),i=s=c;-1!==(i=e.src.indexOf("`",s));){for(s=i+1;s<r&&96===e.src.charCodeAt(s);)s++;if(s-i===o.length)return t||((a=e.push("code_inline","code",0)).markup=o,a.content=e.src.slice(c,i).replace(/[ \n]+/g," ").trim()),e.pos=s,!0}return t||(e.pending+=o),e.pos+=o.length,!0}},function(e,t,n){"use strict";var r=n(238).normalizeReference,o=n(238).isSpace;e.exports=function(e,t){var n,i,s,a,c,u,l,p,f,h="",d=e.pos,m=e.posMax,v=e.pos,g=!0;if(91!==e.src.charCodeAt(e.pos))return!1;if(c=e.pos+1,(a=e.md.helpers.parseLinkLabel(e,e.pos,!0))<0)return!1;if((u=a+1)<m&&40===e.src.charCodeAt(u)){for(g=!1,u++;u<m&&(i=e.src.charCodeAt(u),o(i)||10===i);u++);if(u>=m)return!1;for(v=u,(l=e.md.helpers.parseLinkDestination(e.src,u,e.posMax)).ok&&(h=e.md.normalizeLink(l.str),e.md.validateLink(h)?u=l.pos:h=""),v=u;u<m&&(i=e.src.charCodeAt(u),o(i)||10===i);u++);if(l=e.md.helpers.parseLinkTitle(e.src,u,e.posMax),u<m&&v!==u&&l.ok)for(f=l.str,u=l.pos;u<m&&(i=e.src.charCodeAt(u),o(i)||10===i);u++);else f="";(u>=m||41!==e.src.charCodeAt(u))&&(g=!0),u++}if(g){if(void 0===e.env.references)return!1;if(u<m&&91===e.src.charCodeAt(u)?(v=u+1,(u=e.md.helpers.parseLinkLabel(e,u))>=0?s=e.src.slice(v,u++):u=a+1):u=a+1,s||(s=e.src.slice(c,a)),!(p=e.env.references[r(s)]))return e.pos=d,!1;h=p.href,f=p.title}return t||(e.pos=c,e.posMax=a,e.push("link_open","a",1).attrs=n=[["href",h]],f&&n.push(["title",f]),e.md.inline.tokenize(e),e.push("link_close","a",-1)),e.pos=u,e.posMax=m,!0}},function(e,t,n){"use strict";var r=n(238).normalizeReference,o=n(238).isSpace;e.exports=function(e,t){var n,i,s,a,c,u,l,p,f,h,d,m,v,g="",y=e.pos,b=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(u=e.pos+2,(c=e.md.helpers.parseLinkLabel(e,e.pos+1,!1))<0)return!1;if((l=c+1)<b&&40===e.src.charCodeAt(l)){for(l++;l<b&&(i=e.src.charCodeAt(l),o(i)||10===i);l++);if(l>=b)return!1;for(v=l,(f=e.md.helpers.parseLinkDestination(e.src,l,e.posMax)).ok&&(g=e.md.normalizeLink(f.str),e.md.validateLink(g)?l=f.pos:g=""),v=l;l<b&&(i=e.src.charCodeAt(l),o(i)||10===i);l++);if(f=e.md.helpers.parseLinkTitle(e.src,l,e.posMax),l<b&&v!==l&&f.ok)for(h=f.str,l=f.pos;l<b&&(i=e.src.charCodeAt(l),o(i)||10===i);l++);else h="";if(l>=b||41!==e.src.charCodeAt(l))return e.pos=y,!1;l++}else{if(void 0===e.env.references)return!1;if(l<b&&91===e.src.charCodeAt(l)?(v=l+1,(l=e.md.helpers.parseLinkLabel(e,l))>=0?a=e.src.slice(v,l++):l=c+1):l=c+1,a||(a=e.src.slice(u,c)),!(p=e.env.references[r(a)]))return e.pos=y,!1;g=p.href,h=p.title}return t||(s=e.src.slice(u,c),e.md.inline.parse(s,e.md,e.env,m=[]),(d=e.push("image","img",0)).attrs=n=[["src",g],["alt",""]],d.children=m,d.content=s,h&&n.push(["title",h])),e.pos=l,e.posMax=b,!0}},function(e,t,n){"use strict";var r=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,o=/^<([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)>/;e.exports=function(e,t){var n,i,s,a,c,u,l=e.pos;return 60===e.src.charCodeAt(l)&&(!((n=e.src.slice(l)).indexOf(">")<0)&&(o.test(n)?(a=(i=n.match(o))[0].slice(1,-1),c=e.md.normalizeLink(a),!!e.md.validateLink(c)&&(t||((u=e.push("link_open","a",1)).attrs=[["href",c]],u.markup="autolink",u.info="auto",(u=e.push("text","",0)).content=e.md.normalizeLinkText(a),(u=e.push("link_close","a",-1)).markup="autolink",u.info="auto"),e.pos+=i[0].length,!0)):!!r.test(n)&&(a=(s=n.match(r))[0].slice(1,-1),c=e.md.normalizeLink("mailto:"+a),!!e.md.validateLink(c)&&(t||((u=e.push("link_open","a",1)).attrs=[["href",c]],u.markup="autolink",u.info="auto",(u=e.push("text","",0)).content=e.md.normalizeLinkText(a),(u=e.push("link_close","a",-1)).markup="autolink",u.info="auto"),e.pos+=s[0].length,!0))))}},function(e,t,n){"use strict";var r=n(278).HTML_TAG_RE;e.exports=function(e,t){var n,o,i,s=e.pos;return!!e.md.options.html&&(i=e.posMax,!(60!==e.src.charCodeAt(s)||s+2>=i)&&(!(33!==(n=e.src.charCodeAt(s+1))&&63!==n&&47!==n&&!function(e){var t=32|e;return t>=97&&t<=122}(n))&&(!!(o=e.src.slice(s).match(r))&&(t||(e.push("html_inline","",0).content=e.src.slice(s,s+o[0].length)),e.pos+=o[0].length,!0))))}},function(e,t,n){"use strict";var r=n(273),o=n(238).has,i=n(238).isValidEntityCode,s=n(238).fromCodePoint,a=/^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,c=/^&([a-z][a-z0-9]{1,31});/i;e.exports=function(e,t){var n,u,l=e.pos,p=e.posMax;if(38!==e.src.charCodeAt(l))return!1;if(l+1<p)if(35===e.src.charCodeAt(l+1)){if(u=e.src.slice(l).match(a))return t||(n="x"===u[1][0].toLowerCase()?parseInt(u[1].slice(1),16):parseInt(u[1],10),e.pending+=i(n)?s(n):s(65533)),e.pos+=u[0].length,!0}else if((u=e.src.slice(l).match(c))&&o(r,u[1]))return t||(e.pending+=r[u[1]]),e.pos+=u[0].length,!0;return t||(e.pending+="&"),e.pos++,!0}},function(e,t,n){"use strict";e.exports=function(e){var t,n,r,o,i=e.delimiters,s=e.delimiters.length;for(t=0;t<s;t++)if((r=i[t]).close)for(n=t-r.jump-1;n>=0;){if((o=i[n]).open&&o.marker===r.marker&&o.end<0&&o.level===r.level)if(!((o.close||r.open)&&void 0!==o.length&&void 0!==r.length&&(o.length+r.length)%3==0)){r.jump=t-n,r.open=!1,o.end=t,o.jump=0;break}n-=o.jump+1}}},function(e,t,n){"use strict";e.exports=function(e){var t,n,r=0,o=e.tokens,i=e.tokens.length;for(t=n=0;t<i;t++)r+=o[t].nesting,o[t].level=r,"text"===o[t].type&&t+1<i&&"text"===o[t+1].type?o[t+1].content=o[t].content+o[t+1].content:(t!==n&&(o[n]=o[t]),n++);t!==n&&(o.length=n)}},function(e,t,n){"use strict";var r=n(259),o=n(238).isWhiteSpace,i=n(238).isPunctChar,s=n(238).isMdAsciiPunct;function a(e,t,n,r){this.src=e,this.env=n,this.md=t,this.tokens=r,this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[]}a.prototype.pushPending=function(){var e=new r("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},a.prototype.push=function(e,t,n){this.pending&&this.pushPending();var o=new r(e,t,n);return n<0&&this.level--,o.level=this.level,n>0&&this.level++,this.pendingLevel=this.level,this.tokens.push(o),o},a.prototype.scanDelims=function(e,t){var n,r,a,c,u,l,p,f,h,d=e,m=!0,v=!0,g=this.posMax,y=this.src.charCodeAt(e);for(n=e>0?this.src.charCodeAt(e-1):32;d<g&&this.src.charCodeAt(d)===y;)d++;return a=d-e,r=d<g?this.src.charCodeAt(d):32,p=s(n)||i(String.fromCharCode(n)),h=s(r)||i(String.fromCharCode(r)),l=o(n),(f=o(r))?m=!1:h&&(l||p||(m=!1)),l?v=!1:p&&(f||h||(v=!1)),t?(c=m,u=v):(c=m&&(!v||p),u=v&&(!m||h)),{can_open:c,can_close:u,length:a}},a.prototype.Token=r,e.exports=a},function(e,t,n){"use strict";function r(e){return Array.prototype.slice.call(arguments,1).forEach((function(t){t&&Object.keys(t).forEach((function(n){e[n]=t[n]}))})),e}function o(e){return Object.prototype.toString.call(e)}function i(e){return"[object Function]"===o(e)}function s(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var a={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};var c={"http:":{validate:function(e,t,n){var r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&":"===e[t-3]?0:t>=3&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},u="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",l="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function p(e){var t=e.re=n(531)(e.__opts__),r=e.__tlds__.slice();function a(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||r.push(u),r.push(t.src_xn),t.src_tlds=r.join("|"),t.email_fuzzy=RegExp(a(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(a(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(a(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(a(t.tpl_host_fuzzy_test),"i");var c=[];function l(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach((function(t){var n=e.__schemas__[t];if(null!==n){var r={validate:null,link:null};if(e.__compiled__[t]=r,"[object Object]"===o(n))return!function(e){return"[object RegExp]"===o(e)}(n.validate)?i(n.validate)?r.validate=n.validate:l(t,n):r.validate=function(e){return function(t,n){var r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}(n.validate),void(i(n.normalize)?r.normalize=n.normalize:n.normalize?l(t,n):r.normalize=function(e,t){t.normalize(e)});!function(e){return"[object String]"===o(e)}(n)?l(t,n):c.push(t)}})),c.forEach((function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)})),e.__compiled__[""]={validate:null,normalize:function(e,t){t.normalize(e)}};var p=Object.keys(e.__compiled__).filter((function(t){return t.length>0&&e.__compiled__[t]})).map(s).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+p+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+p+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),function(e){e.__index__=-1,e.__text_cache__=""}(e)}function f(e,t){var n=e.__index__,r=e.__last_index__,o=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=o,this.text=o,this.url=o}function h(e,t){var n=new f(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function d(e,t){if(!(this instanceof d))return new d(e,t);var n;t||(n=e,Object.keys(n||{}).reduce((function(e,t){return e||a.hasOwnProperty(t)}),!1)&&(t=e,e={})),this.__opts__=r({},a,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=r({},c,e),this.__compiled__={},this.__tlds__=l,this.__tlds_replaced__=!1,this.re={},p(this)}d.prototype.add=function(e,t){return this.__schemas__[e]=t,p(this),this},d.prototype.set=function(e){return this.__opts__=r(this.__opts__,e),this},d.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,r,o,i,s,a,c;if(this.re.schema_test.test(e))for((a=this.re.schema_search).lastIndex=0;null!==(t=a.exec(e));)if(o=this.testSchemaAt(e,t[2],a.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+o;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(c=e.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||c<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(i=n.index+n[1].length,(this.__index__<0||i<this.__index__)&&(this.__schema__="",this.__index__=i,this.__last_index__=n.index+n[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&e.indexOf("@")>=0&&null!==(r=e.match(this.re.email_fuzzy))&&(i=r.index+r[1].length,s=r.index+r[0].length,(this.__index__<0||i<this.__index__||i===this.__index__&&s>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=i,this.__last_index__=s)),this.__index__>=0},d.prototype.pretest=function(e){return this.re.pretest.test(e)},d.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},d.prototype.match=function(e){var t=0,n=[];this.__index__>=0&&this.__text_cache__===e&&(n.push(h(this,t)),t=this.__last_index__);for(var r=t?e.slice(t):e;this.test(r);)n.push(h(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},d.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,t,n){return e!==n[t-1]})).reverse(),p(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,p(this),this)},d.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},d.prototype.onCompile=function(){},e.exports=d},function(e,t,n){"use strict";e.exports=function(e){var t={};t.src_Any=n(275).source,t.src_Cc=n(276).source,t.src_Z=n(277).source,t.src_P=n(257).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");return t.src_pseudo_letter="(?:(?![><|]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><|]|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|[><|]|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,4}[a-zA-Z0-9%/]|\\.(?!"+t.src_ZCc+"|[.]).|"+(e&&e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+"\\,(?!"+t.src_ZCc+").|\\!(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><|]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}},function(e,t,n){(function(e,r){var o;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(i){t&&t.nodeType,e&&e.nodeType;var s="object"==typeof r&&r;s.global!==s&&s.window!==s&&s.self;var a,c=2147483647,u=36,l=1,p=26,f=38,h=700,d=72,m=128,v="-",g=/^xn--/,y=/[^\x20-\x7E]/,b=/[\x2E\u3002\uFF0E\uFF61]/g,w={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},k=u-l,x=Math.floor,_=String.fromCharCode;function C(e){throw new RangeError(w[e])}function S(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function O(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+S((e=e.replace(b,".")).split("."),t).join(".")}function A(e){for(var t,n,r=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(n=e.charCodeAt(o++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),o--):r.push(t);return r}function E(e){return S(e,(function(e){var t="";return e>65535&&(t+=_((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=_(e)})).join("")}function M(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function T(e,t,n){var r=0;for(e=n?x(e/h):e>>1,e+=x(e/t);e>k*p>>1;r+=u)e=x(e/k);return x(r+(k+1)*e/(e+f))}function D(e){var t,n,r,o,i,s,a,f,h,g,y,b=[],w=e.length,k=0,_=m,S=d;for((n=e.lastIndexOf(v))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&C("not-basic"),b.push(e.charCodeAt(r));for(o=n>0?n+1:0;o<w;){for(i=k,s=1,a=u;o>=w&&C("invalid-input"),((f=(y=e.charCodeAt(o++))-48<10?y-22:y-65<26?y-65:y-97<26?y-97:u)>=u||f>x((c-k)/s))&&C("overflow"),k+=f*s,!(f<(h=a<=S?l:a>=S+p?p:a-S));a+=u)s>x(c/(g=u-h))&&C("overflow"),s*=g;S=T(k-i,t=b.length+1,0==i),x(k/t)>c-_&&C("overflow"),_+=x(k/t),k%=t,b.splice(k++,0,_)}return E(b)}function N(e){var t,n,r,o,i,s,a,f,h,g,y,b,w,k,S,O=[];for(b=(e=A(e)).length,t=m,n=0,i=d,s=0;s<b;++s)(y=e[s])<128&&O.push(_(y));for(r=o=O.length,o&&O.push(v);r<b;){for(a=c,s=0;s<b;++s)(y=e[s])>=t&&y<a&&(a=y);for(a-t>x((c-n)/(w=r+1))&&C("overflow"),n+=(a-t)*w,t=a,s=0;s<b;++s)if((y=e[s])<t&&++n>c&&C("overflow"),y==t){for(f=n,h=u;!(f<(g=h<=i?l:h>=i+p?p:h-i));h+=u)S=f-g,k=u-g,O.push(_(M(g+S%k,0))),f=x(S/k);O.push(_(M(f,0))),i=T(n,w,r==o),n=0,++r}++n,++t}return O.join("")}a={version:"1.4.1",ucs2:{decode:A,encode:E},decode:D,encode:N,toASCII:function(e){return O(e,(function(e){return y.test(e)?"xn--"+N(e):e}))},toUnicode:function(e){return O(e,(function(e){return g.test(e)?D(e.slice(4).toLowerCase()):e}))}},void 0===(o=function(){return a}.call(t,n,t,e))||(e.exports=o)}()}).call(this,n(533)(e),n(33))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},function(e,t,n){"use strict";e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}}},function(e,t,n){"use strict";e.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","text_collapse"]}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(241),i=(r=n(272))&&"object"==typeof r&&"default"in r?r.default:r,s=new o.Schema({nodes:{doc:{content:"block+"},paragraph:{content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM:function(){return["p",0]}},blockquote:{content:"block+",group:"block",parseDOM:[{tag:"blockquote"}],toDOM:function(){return["blockquote",0]}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:function(){return["div",["hr"]]}},heading:{attrs:{level:{default:1}},content:"inline*",group:"block",defining:!0,parseDOM:[{tag:"h1",attrs:{level:1}},{tag:"h2",attrs:{level:2}},{tag:"h3",attrs:{level:3}},{tag:"h4",attrs:{level:4}},{tag:"h5",attrs:{level:5}},{tag:"h6",attrs:{level:6}}],toDOM:function(e){return["h"+e.attrs.level,0]}},code_block:{content:"text*",group:"block",code:!0,defining:!0,attrs:{params:{default:""}},parseDOM:[{tag:"pre",preserveWhitespace:!0,getAttrs:function(e){return{params:e.getAttribute("data-params")||""}}}],toDOM:function(e){return["pre",e.attrs.params?{"data-params":e.attrs.params}:{},["code",0]]}},ordered_list:{content:"list_item+",group:"block",attrs:{order:{default:1},tight:{default:!1}},parseDOM:[{tag:"ol",getAttrs:function(e){return{order:e.hasAttribute("start")?+e.getAttribute("start"):1,tight:e.hasAttribute("data-tight")}}}],toDOM:function(e){return["ol",{start:1==e.attrs.order?null:e.attrs.order,"data-tight":e.attrs.tight?"true":null},0]}},bullet_list:{content:"list_item+",group:"block",attrs:{tight:{default:!1}},parseDOM:[{tag:"ul",getAttrs:function(e){return{tight:e.hasAttribute("data-tight")}}}],toDOM:function(e){return["ul",{"data-tight":e.attrs.tight?"true":null},0]}},list_item:{content:"paragraph block*",defining:!0,parseDOM:[{tag:"li"}],toDOM:function(){return["li",0]}},text:{group:"inline",toDOM:function(e){return e.text}},image:{inline:!0,attrs:{src:{},alt:{default:null},title:{default:null}},group:"inline",draggable:!0,parseDOM:[{tag:"img[src]",getAttrs:function(e){return{src:e.getAttribute("src"),title:e.getAttribute("title"),alt:e.getAttribute("alt")}}}],toDOM:function(e){return["img",e.attrs]}},hard_break:{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM:function(){return["br"]}}},marks:{em:{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style",getAttrs:function(e){return"italic"==e&&null}}],toDOM:function(){return["em"]}},strong:{parseDOM:[{tag:"b"},{tag:"strong"},{style:"font-weight",getAttrs:function(e){return/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}}],toDOM:function(){return["strong"]}},link:{attrs:{href:{},title:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:function(e){return{href:e.getAttribute("href"),title:e.getAttribute("title")}}}],toDOM:function(e){return["a",e.attrs]}},code:{parseDOM:[{tag:"code"}],toDOM:function(){return["code"]}}}});var a=function(e,t){this.schema=e,this.stack=[{type:e.topNodeType,content:[]}],this.marks=o.Mark.none,this.tokenHandlers=t};function c(e,t){return e.getAttrs?e.getAttrs(t):e.attrs instanceof Function?e.attrs(t):e.attrs}function u(e){return"code_inline"==e||"code_block"==e||"fence"==e}function l(e){return"\n"==e[e.length-1]?e.slice(0,e.length-1):e}function p(){}a.prototype.top=function(){return this.stack[this.stack.length-1]},a.prototype.push=function(e){this.stack.length&&this.top().content.push(e)},a.prototype.addText=function(e){if(e){var t,n=this.top().content,r=n[n.length-1],i=this.schema.text(e,this.marks);r&&(t=function(e,t){if(e.isText&&t.isText&&o.Mark.sameSet(e.marks,t.marks))return e.withText(e.text+t.text)}(r,i))?n[n.length-1]=t:n.push(i)}},a.prototype.openMark=function(e){this.marks=e.addToSet(this.marks)},a.prototype.closeMark=function(e){this.marks=e.removeFromSet(this.marks)},a.prototype.parseTokens=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=this.tokenHandlers[n.type];if(!r)throw new Error("Token type `"+n.type+"` not supported by Markdown parser");r(this,n)}},a.prototype.addNode=function(e,t,n){var r=e.createAndFill(t,n,this.marks);return r?(this.push(r),r):null},a.prototype.openNode=function(e,t){this.stack.push({type:e,attrs:t,content:[]})},a.prototype.closeNode=function(){this.marks.length&&(this.marks=o.Mark.none);var e=this.stack.pop();return this.addNode(e.type,e.attrs,e.content)};var f=function(e,t,n){this.tokens=n,this.schema=e,this.tokenizer=t,this.tokenHandlers=function(e,t){var n=Object.create(null),r=function(r){var o=t[r];if(o.block){var i=e.nodeType(o.block);u(r)?n[r]=function(e,t){e.openNode(i,c(o,t)),e.addText(l(t.content)),e.closeNode()}:(n[r+"_open"]=function(e,t){return e.openNode(i,c(o,t))},n[r+"_close"]=function(e){return e.closeNode()})}else if(o.node){var s=e.nodeType(o.node);n[r]=function(e,t){return e.addNode(s,c(o,t))}}else if(o.mark){var a=e.marks[o.mark];u(r)?n[r]=function(e,t){e.openMark(a.create(c(o,t))),e.addText(l(t.content)),e.closeMark(a)}:(n[r+"_open"]=function(e,t){return e.openMark(a.create(c(o,t)))},n[r+"_close"]=function(e){return e.closeMark(a)})}else{if(!o.ignore)throw new RangeError("Unrecognized parsing spec "+JSON.stringify(o));u(r)?n[r]=p:(n[r+"_open"]=p,n[r+"_close"]=p)}};for(var o in t)r(o);return n.text=function(e,t){return e.addText(t.content)},n.inline=function(e,t){return e.parseTokens(t.children)},n.softbreak=n.softbreak||function(e){return e.addText("\n")},n}(e,n)};f.prototype.parse=function(e){var t,n=new a(this.schema,this.tokenHandlers);n.parseTokens(this.tokenizer.parse(e,{}));do{t=n.closeNode()}while(n.stack.length);return t};var h=new f(s,i("commonmark",{html:!1}),{blockquote:{block:"blockquote"},paragraph:{block:"paragraph"},list_item:{block:"list_item"},bullet_list:{block:"bullet_list"},ordered_list:{block:"ordered_list",getAttrs:function(e){return{order:+e.attrGet("order")||1}}},heading:{block:"heading",getAttrs:function(e){return{level:+e.tag.slice(1)}}},code_block:{block:"code_block"},fence:{block:"code_block",getAttrs:function(e){return{params:e.info||""}}},hr:{node:"horizontal_rule"},image:{node:"image",getAttrs:function(e){return{src:e.attrGet("src"),title:e.attrGet("title")||null,alt:e.children[0]&&e.children[0].content||null}}},hardbreak:{node:"hard_break"},em:{mark:"em"},strong:{mark:"strong"},link:{mark:"link",getAttrs:function(e){return{href:e.attrGet("href"),title:e.attrGet("title")||null}}},code_inline:{mark:"code"}}),d=function(e,t){this.nodes=e,this.marks=t};d.prototype.serialize=function(e,t){var n=new y(this.nodes,this.marks,t);return n.renderContent(e),n.out};var m=new d({blockquote:function(e,t){e.wrapBlock("> ",null,t,(function(){return e.renderContent(t)}))},code_block:function(e,t){e.write("```"+(t.attrs.params||"")+"\n"),e.text(t.textContent,!1),e.ensureNewLine(),e.write("```"),e.closeBlock(t)},heading:function(e,t){e.write(e.repeat("#",t.attrs.level)+" "),e.renderInline(t),e.closeBlock(t)},horizontal_rule:function(e,t){e.write(t.attrs.markup||"---"),e.closeBlock(t)},bullet_list:function(e,t){e.renderList(t,"  ",(function(){return(t.attrs.bullet||"*")+" "}))},ordered_list:function(e,t){var n=t.attrs.order||1,r=String(n+t.childCount-1).length,o=e.repeat(" ",r+2);e.renderList(t,o,(function(t){var o=String(n+t);return e.repeat(" ",r-o.length)+o+". "}))},list_item:function(e,t){e.renderContent(t)},paragraph:function(e,t){e.renderInline(t),e.closeBlock(t)},image:function(e,t){e.write("!["+e.esc(t.attrs.alt||"")+"]("+e.esc(t.attrs.src)+(t.attrs.title?" "+e.quote(t.attrs.title):"")+")")},hard_break:function(e,t,n,r){for(var o=r+1;o<n.childCount;o++)if(n.child(o).type!=t.type)return void e.write("\\\n")},text:function(e,t){e.text(t.text)}},{em:{open:"*",close:"*",mixable:!0,expelEnclosingWhitespace:!0},strong:{open:"**",close:"**",mixable:!0,expelEnclosingWhitespace:!0},link:{open:function(e,t,n,r){return g(t,n,r,1)?"<":"["},close:function(e,t,n,r){return g(t,n,r,-1)?">":"]("+e.esc(t.attrs.href)+(t.attrs.title?" "+e.quote(t.attrs.title):"")+")"}},code:{open:function(e,t,n,r){return v(n.child(r),-1)},close:function(e,t,n,r){return v(n.child(r-1),1)},escape:!1}});function v(e,t){var n,r=/`+/g,o=0;if(e.isText)for(;n=r.exec(e.text);)o=Math.max(o,n[0].length);for(var i=o>0&&t>0?" `":"`",s=0;s<o;s++)i+="`";return o>0&&t<0&&(i+=" "),i}function g(e,t,n,r){if(e.attrs.title)return!1;var o=t.child(n+(r<0?-1:0));if(!o.isText||o.text!=e.attrs.href||o.marks[o.marks.length-1]!=e)return!1;if(n==(r<0?1:t.childCount-1))return!0;var i=t.child(n+(r<0?-2:1));return!e.isInSet(i.marks)}var y=function(e,t,n){this.nodes=e,this.marks=t,this.delim=this.out="",this.closed=!1,this.inTightList=!1,this.options=n||{},void 0===this.options.tightLists&&(this.options.tightLists=!1)};y.prototype.flushClose=function(e){if(this.closed){if(this.atBlank()||(this.out+="\n"),null==e&&(e=2),e>1){var t=this.delim,n=/\s+$/.exec(t);n&&(t=t.slice(0,t.length-n[0].length));for(var r=1;r<e;r++)this.out+=t+"\n"}this.closed=!1}},y.prototype.wrapBlock=function(e,t,n,r){var o=this.delim;this.write(t||e),this.delim+=e,r(),this.delim=o,this.closeBlock(n)},y.prototype.atBlank=function(){return/(^|\n)$/.test(this.out)},y.prototype.ensureNewLine=function(){this.atBlank()||(this.out+="\n")},y.prototype.write=function(e){this.flushClose(),this.delim&&this.atBlank()&&(this.out+=this.delim),e&&(this.out+=e)},y.prototype.closeBlock=function(e){this.closed=e},y.prototype.text=function(e,t){for(var n=e.split("\n"),r=0;r<n.length;r++){var o=this.atBlank()||this.closed;this.write(),this.out+=!1!==t?this.esc(n[r],o):n[r],r!=n.length-1&&(this.out+="\n")}},y.prototype.render=function(e,t,n){if("number"==typeof t)throw new Error("!");this.nodes[e.type.name](this,e,t,n)},y.prototype.renderContent=function(e){var t=this;e.forEach((function(n,r,o){return t.render(n,e,o)}))},y.prototype.renderInline=function(e){var t=this,n=[],r="",o=function(o,i,s){var a=o?o.marks:[];o&&"hard_break"===o.type.name&&(a=a.filter((function(t){if(s+1==e.childCount)return!1;var n=e.child(s+1);return t.isInSet(n.marks)&&(!n.isText||/\S/.test(n.text))})));var c=r;if(r="",o&&o.isText&&a.some((function(e){var n=t.marks[e.type.name];return n&&n.expelEnclosingWhitespace}))){var u=/^(\s*)(.*?)(\s*)$/m.exec(o.text),l=u[1],p=u[2],f=u[3];c+=l,r=f,(l||f)&&((o=p?o.withText(p):null)||(a=n))}var h=a.length&&a[a.length-1],d=h&&!1===t.marks[h.type.name].escape,m=a.length-(d?1:0);e:for(var v=0;v<m;v++){var g=a[v];if(!t.marks[g.type.name].mixable)break;for(var y=0;y<n.length;y++){var b=n[y];if(!t.marks[b.type.name].mixable)break;if(g.eq(b)){v>y?a=a.slice(0,y).concat(g).concat(a.slice(y,v)).concat(a.slice(v+1,m)):y>v&&(a=a.slice(0,v).concat(a.slice(v+1,y)).concat(g).concat(a.slice(y,m)));continue e}}}for(var w=0;w<Math.min(n.length,m)&&a[w].eq(n[w]);)++w;for(;w<n.length;)t.text(t.markString(n.pop(),!1,e,s),!1);if(c&&t.text(c),o){for(;n.length<m;){var k=a[n.length];n.push(k),t.text(t.markString(k,!0,e,s),!1)}d&&o.isText?t.text(t.markString(h,!0,e,s)+o.text+t.markString(h,!1,e,s+1),!1):t.render(o,e,s)}};e.forEach(o),o(null,0,e.childCount)},y.prototype.renderList=function(e,t,n){var r=this;this.closed&&this.closed.type==e.type?this.flushClose(3):this.inTightList&&this.flushClose(1);var o=void 0!==e.attrs.tight?e.attrs.tight:this.options.tightLists,i=this.inTightList;this.inTightList=o,e.forEach((function(i,s,a){a&&o&&r.flushClose(1),r.wrapBlock(t,n(a),e,(function(){return r.render(i,e,a)}))})),this.inTightList=i},y.prototype.esc=function(e,t){return e=e.replace(/[`*\\~\[\]]/g,"\\$&"),t&&(e=e.replace(/^[:#\-*+]/,"\\$&").replace(/^(\d+)\./,"$1\\.")),e},y.prototype.quote=function(e){var t=-1==e.indexOf('"')?'""':-1==e.indexOf("'")?"''":"()";return t[0]+e+t[1]},y.prototype.repeat=function(e,t){for(var n="",r=0;r<t;r++)n+=e;return n},y.prototype.markString=function(e,t,n,r){var o=this.marks[e.type.name],i=t?o.open:o.close;return"string"==typeof i?i:i(this,e,n,r)},y.prototype.getEnclosingWhitespace=function(e){return{leading:(e.match(/^(\s+)/)||[])[0],trailing:(e.match(/(\s+)$/)||[])[0]}},t.schema=s,t.defaultMarkdownParser=h,t.MarkdownParser=f,t.MarkdownSerializer=d,t.defaultMarkdownSerializer=m,t.MarkdownSerializerState=y}]]);
//# sourceMappingURL=vendors~editor.js.map?v=fdcc2ae334f8c079f49c