@zipify/wysiwyg 1.0.0-dev.39 → 1.0.0-dev.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/wysiwyg.js DELETED
@@ -1,2 +0,0 @@
1
- /*! For license information please see wysiwyg.js.LICENSE.txt */
2
- var t={3700:(t,e,n)=>{var r={"./alignment-center.svg":8274,"./alignment-justify.svg":8768,"./alignment-left.svg":2449,"./alignment-right.svg":2515,"./arrow.svg":548,"./background-color.svg":1881,"./case-style.svg":9464,"./font-color.svg":9747,"./italic.svg":9441,"./line-height.svg":4140,"./link.svg":8693,"./list-circle.svg":1304,"./list-decimal.svg":2412,"./list-disc.svg":4311,"./list-latin.svg":1477,"./list-roman.svg":5400,"./list-square.svg":2807,"./remove-format.svg":6495,"./reset-styles.svg":7522,"./strike-through.svg":9976,"./superscript.svg":9857,"./underline.svg":6031,"./unlink.svg":4538};function o(t){var e=i(t);return n(e)}function i(t){if(!n.o(r,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return r[t]}o.keys=function(){return Object.keys(r)},o.resolve=i,t.exports=o,o.id=3700},1807:t=>{var e=!("undefined"==typeof window||!window.document||!window.document.createElement);t.exports=e},9662:(t,e,n)=>{var r=n(614),o=n(6330),i=TypeError;t.exports=function(t){if(r(t))return t;throw i(o(t)+" is not a function")}},6077:(t,e,n)=>{var r=n(614),o=String,i=TypeError;t.exports=function(t){if("object"==typeof t||r(t))return t;throw i("Can't set "+o(t)+" as a prototype")}},1223:(t,e,n)=>{var r=n(5112),o=n(30),i=n(3070).f,s=r("unscopables"),a=Array.prototype;null==a[s]&&i(a,s,{configurable:!0,value:o(null)}),t.exports=function(t){a[s][t]=!0}},1530:(t,e,n)=>{var r=n(8710).charAt;t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},5787:(t,e,n)=>{var r=n(7976),o=TypeError;t.exports=function(t,e){if(r(e,t))return t;throw o("Incorrect invocation")}},9670:(t,e,n)=>{var r=n(111),o=String,i=TypeError;t.exports=function(t){if(r(t))return t;throw i(o(t)+" is not an object")}},7556:(t,e,n)=>{var r=n(7293);t.exports=r((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))},8533:(t,e,n)=>{var r=n(2092).forEach,o=n(9341)("forEach");t.exports=o?[].forEach:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}},1318:(t,e,n)=>{var r=n(5656),o=n(1400),i=n(6244),s=function(t){return function(e,n,s){var a,l=r(e),u=i(l),c=o(s,u);if(t&&n!=n){for(;u>c;)if((a=l[c++])!=a)return!0}else for(;u>c;c++)if((t||c in l)&&l[c]===n)return t||c||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},2092:(t,e,n)=>{var r=n(9974),o=n(1702),i=n(8361),s=n(7908),a=n(6244),l=n(5417),u=o([].push),c=function(t){var e=1==t,n=2==t,o=3==t,c=4==t,d=6==t,p=7==t,h=5==t||d;return function(f,m,g,v){for(var y,b,w=s(f),x=i(w),D=r(m,g),k=a(x),C=0,E=v||l,S=e?E(f,k):n||p?E(f,0):void 0;k>C;C++)if((h||C in x)&&(b=D(y=x[C],C,w),t))if(e)S[C]=b;else if(b)switch(t){case 3:return!0;case 5:return y;case 6:return C;case 2:u(S,y)}else switch(t){case 4:return!1;case 7:u(S,y)}return d?-1:o||c?c:S}};t.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6),filterReject:c(7)}},1194:(t,e,n)=>{var r=n(7293),o=n(5112),i=n(7392),s=o("species");t.exports=function(t){return i>=51||!r((function(){var e=[];return(e.constructor={})[s]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},9341:(t,e,n)=>{var r=n(7293);t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){return 1},1)}))}},3671:(t,e,n)=>{var r=n(9662),o=n(7908),i=n(8361),s=n(6244),a=TypeError,l=function(t){return function(e,n,l,u){r(n);var c=o(e),d=i(c),p=s(c),h=t?p-1:0,f=t?-1:1;if(l<2)for(;;){if(h in d){u=d[h],h+=f;break}if(h+=f,t?h<0:p<=h)throw a("Reduce of empty array with no initial value")}for(;t?h>=0:p>h;h+=f)h in d&&(u=n(u,d[h],h,c));return u}};t.exports={left:l(!1),right:l(!0)}},1589:(t,e,n)=>{var r=n(1400),o=n(6244),i=n(6135),s=Array,a=Math.max;t.exports=function(t,e,n){for(var l=o(t),u=r(e,l),c=r(void 0===n?l:n,l),d=s(a(c-u,0)),p=0;u<c;u++,p++)i(d,p,t[u]);return d.length=p,d}},7475:(t,e,n)=>{var r=n(3157),o=n(4411),i=n(111),s=n(5112)("species"),a=Array;t.exports=function(t){var e;return r(t)&&(e=t.constructor,(o(e)&&(e===a||r(e.prototype))||i(e)&&null===(e=e[s]))&&(e=void 0)),void 0===e?a:e}},5417:(t,e,n)=>{var r=n(7475);t.exports=function(t,e){return new(r(t))(0===e?0:e)}},7072:(t,e,n)=>{var r=n(5112)("iterator"),o=!1;try{var i=0,s={next:function(){return{done:!!i++}},return:function(){o=!0}};s[r]=function(){return this},Array.from(s,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},t(i)}catch(t){}return n}},4326:(t,e,n)=>{var r=n(1702),o=r({}.toString),i=r("".slice);t.exports=function(t){return i(o(t),8,-1)}},648:(t,e,n)=>{var r=n(1694),o=n(614),i=n(4326),s=n(5112)("toStringTag"),a=Object,l="Arguments"==i(function(){return arguments}());t.exports=r?i:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=a(t),s))?n:l?i(e):"Object"==(r=i(e))&&o(e.callee)?"Arguments":r}},9320:(t,e,n)=>{var r=n(1702),o=n(9190),i=n(2423).getWeakData,s=n(9670),a=n(111),l=n(5787),u=n(408),c=n(2092),d=n(2597),p=n(9909),h=p.set,f=p.getterFor,m=c.find,g=c.findIndex,v=r([].splice),y=0,b=function(t){return t.frozen||(t.frozen=new w)},w=function(){this.entries=[]},x=function(t,e){return m(t.entries,(function(t){return t[0]===e}))};w.prototype={get:function(t){var e=x(this,t);if(e)return e[1]},has:function(t){return!!x(this,t)},set:function(t,e){var n=x(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=g(this.entries,(function(e){return e[0]===t}));return~e&&v(this.entries,e,1),!!~e}},t.exports={getConstructor:function(t,e,n,r){var c=t((function(t,o){l(t,p),h(t,{type:e,id:y++,frozen:void 0}),null!=o&&u(o,t[r],{that:t,AS_ENTRIES:n})})),p=c.prototype,m=f(e),g=function(t,e,n){var r=m(t),o=i(s(e),!0);return!0===o?b(r).set(e,n):o[r.id]=n,t};return o(p,{delete:function(t){var e=m(this);if(!a(t))return!1;var n=i(t);return!0===n?b(e).delete(t):n&&d(n,e.id)&&delete n[e.id]},has:function(t){var e=m(this);if(!a(t))return!1;var n=i(t);return!0===n?b(e).has(t):n&&d(n,e.id)}}),o(p,n?{get:function(t){var e=m(this);if(a(t)){var n=i(t);return!0===n?b(e).get(t):n?n[e.id]:void 0}},set:function(t,e){return g(this,t,e)}}:{add:function(t){return g(this,t,!0)}}),c}}},7710:(t,e,n)=>{var r=n(2109),o=n(7854),i=n(1702),s=n(4705),a=n(8052),l=n(2423),u=n(408),c=n(5787),d=n(614),p=n(111),h=n(7293),f=n(7072),m=n(8003),g=n(9587);t.exports=function(t,e,n){var v=-1!==t.indexOf("Map"),y=-1!==t.indexOf("Weak"),b=v?"set":"add",w=o[t],x=w&&w.prototype,D=w,k={},C=function(t){var e=i(x[t]);a(x,t,"add"==t?function(t){return e(this,0===t?0:t),this}:"delete"==t?function(t){return!(y&&!p(t))&&e(this,0===t?0:t)}:"get"==t?function(t){return y&&!p(t)?void 0:e(this,0===t?0:t)}:"has"==t?function(t){return!(y&&!p(t))&&e(this,0===t?0:t)}:function(t,n){return e(this,0===t?0:t,n),this})};if(s(t,!d(w)||!(y||x.forEach&&!h((function(){(new w).entries().next()})))))D=n.getConstructor(e,t,v,b),l.enable();else if(s(t,!0)){var E=new D,S=E[b](y?{}:-0,1)!=E,O=h((function(){E.has(1)})),A=f((function(t){new w(t)})),T=!y&&h((function(){for(var t=new w,e=5;e--;)t[b](e,e);return!t.has(-0)}));A||((D=e((function(t,e){c(t,x);var n=g(new w,t,D);return null!=e&&u(e,n[b],{that:n,AS_ENTRIES:v}),n}))).prototype=x,x.constructor=D),(O||T)&&(C("delete"),C("has"),v&&C("get")),(T||S)&&C(b),y&&x.clear&&delete x.clear}return k[t]=D,r({global:!0,constructor:!0,forced:D!=w},k),m(D,t),y||n.setStrong(D,t,v),D}},9920:(t,e,n)=>{var r=n(2597),o=n(3887),i=n(1236),s=n(3070);t.exports=function(t,e,n){for(var a=o(e),l=s.f,u=i.f,c=0;c<a.length;c++){var d=a[c];r(t,d)||n&&r(n,d)||l(t,d,u(e,d))}}},8544:(t,e,n)=>{var r=n(7293);t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},4994:(t,e,n)=>{var r=n(3383).IteratorPrototype,o=n(30),i=n(9114),s=n(8003),a=n(7497),l=function(){return this};t.exports=function(t,e,n,u){var c=e+" Iterator";return t.prototype=o(r,{next:i(+!u,n)}),s(t,c,!1,!0),a[c]=l,t}},8880:(t,e,n)=>{var r=n(9781),o=n(3070),i=n(9114);t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},9114:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},6135:(t,e,n)=>{var r=n(4948),o=n(3070),i=n(9114);t.exports=function(t,e,n){var s=r(e);s in t?o.f(t,s,i(0,n)):t[s]=n}},8052:(t,e,n)=>{var r=n(614),o=n(3070),i=n(6339),s=n(3072);t.exports=function(t,e,n,a){a||(a={});var l=a.enumerable,u=void 0!==a.name?a.name:e;if(r(n)&&i(n,u,a),a.global)l?t[e]=n:s(e,n);else{try{a.unsafe?t[e]&&(l=!0):delete t[e]}catch(t){}l?t[e]=n:o.f(t,e,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},9190:(t,e,n)=>{var r=n(8052);t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},3072:(t,e,n)=>{var r=n(7854),o=Object.defineProperty;t.exports=function(t,e){try{o(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},654:(t,e,n)=>{var r=n(2109),o=n(6916),i=n(1913),s=n(6530),a=n(614),l=n(4994),u=n(9518),c=n(7674),d=n(8003),p=n(8880),h=n(8052),f=n(5112),m=n(7497),g=n(3383),v=s.PROPER,y=s.CONFIGURABLE,b=g.IteratorPrototype,w=g.BUGGY_SAFARI_ITERATORS,x=f("iterator"),D="keys",k="values",C="entries",E=function(){return this};t.exports=function(t,e,n,s,f,g,S){l(n,e,s);var O,A,T,M=function(t){if(t===f&&R)return R;if(!w&&t in B)return B[t];switch(t){case D:case k:case C:return function(){return new n(this,t)}}return function(){return new n(this)}},F=e+" Iterator",N=!1,B=t.prototype,_=B[x]||B["@@iterator"]||f&&B[f],R=!w&&_||M(f),z="Array"==e&&B.entries||_;if(z&&(O=u(z.call(new t)))!==Object.prototype&&O.next&&(i||u(O)===b||(c?c(O,b):a(O[x])||h(O,x,E)),d(O,F,!0,!0),i&&(m[F]=E)),v&&f==k&&_&&_.name!==k&&(!i&&y?p(B,"name",k):(N=!0,R=function(){return o(_,this)})),f)if(A={values:M(k),keys:g?R:M(D),entries:M(C)},S)for(T in A)(w||N||!(T in B))&&h(B,T,A[T]);else r({target:e,proto:!0,forced:w||N},A);return i&&!S||B[x]===R||h(B,x,R,{name:f}),m[e]=R,A}},9781:(t,e,n)=>{var r=n(7293);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},317:(t,e,n)=>{var r=n(7854),o=n(111),i=r.document,s=o(i)&&o(i.createElement);t.exports=function(t){return s?i.createElement(t):{}}},8324:t=>{t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8509:(t,e,n)=>{var r=n(317)("span").classList,o=r&&r.constructor&&r.constructor.prototype;t.exports=o===Object.prototype?void 0:o},5268:(t,e,n)=>{var r=n(4326),o=n(7854);t.exports="process"==r(o.process)},8113:(t,e,n)=>{var r=n(5005);t.exports=r("navigator","userAgent")||""},7392:(t,e,n)=>{var r,o,i=n(7854),s=n(8113),a=i.process,l=i.Deno,u=a&&a.versions||l&&l.version,c=u&&u.v8;c&&(o=(r=c.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&s&&(!(r=s.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/))&&(o=+r[1]),t.exports=o},748:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:(t,e,n)=>{var r=n(7854),o=n(1236).f,i=n(8880),s=n(8052),a=n(3072),l=n(9920),u=n(4705);t.exports=function(t,e){var n,c,d,p,h,f=t.target,m=t.global,g=t.stat;if(n=m?r:g?r[f]||a(f,{}):(r[f]||{}).prototype)for(c in e){if(p=e[c],d=t.dontCallGetSet?(h=o(n,c))&&h.value:n[c],!u(m?c:f+(g?".":"#")+c,t.forced)&&void 0!==d){if(typeof p==typeof d)continue;l(p,d)}(t.sham||d&&d.sham)&&i(p,"sham",!0),s(n,c,p,t)}}},7293:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},7007:(t,e,n)=>{n(4916);var r=n(1702),o=n(8052),i=n(2261),s=n(7293),a=n(5112),l=n(8880),u=a("species"),c=RegExp.prototype;t.exports=function(t,e,n,d){var p=a(t),h=!s((function(){var e={};return e[p]=function(){return 7},7!=""[t](e)})),f=h&&!s((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[u]=function(){return n},n.flags="",n[p]=/./[p]),n.exec=function(){return e=!0,null},n[p](""),!e}));if(!h||!f||n){var m=r(/./[p]),g=e(p,""[t],(function(t,e,n,o,s){var a=r(t),l=e.exec;return l===i||l===c.exec?h&&!s?{done:!0,value:m(e,n,o)}:{done:!0,value:a(n,e,o)}:{done:!1}}));o(String.prototype,t,g[0]),o(c,p,g[1])}d&&l(c[p],"sham",!0)}},6677:(t,e,n)=>{var r=n(7293);t.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},2104:(t,e,n)=>{var r=n(4374),o=Function.prototype,i=o.apply,s=o.call;t.exports="object"==typeof Reflect&&Reflect.apply||(r?s.bind(i):function(){return s.apply(i,arguments)})},9974:(t,e,n)=>{var r=n(1702),o=n(9662),i=n(4374),s=r(r.bind);t.exports=function(t,e){return o(t),void 0===e?t:i?s(t,e):function(){return t.apply(e,arguments)}}},4374:(t,e,n)=>{var r=n(7293);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},6916:(t,e,n)=>{var r=n(4374),o=Function.prototype.call;t.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},6530:(t,e,n)=>{var r=n(9781),o=n(2597),i=Function.prototype,s=r&&Object.getOwnPropertyDescriptor,a=o(i,"name"),l=a&&"something"===function(){}.name,u=a&&(!r||r&&s(i,"name").configurable);t.exports={EXISTS:a,PROPER:l,CONFIGURABLE:u}},1702:(t,e,n)=>{var r=n(4374),o=Function.prototype,i=o.bind,s=o.call,a=r&&i.bind(s,s);t.exports=r?function(t){return t&&a(t)}:function(t){return t&&function(){return s.apply(t,arguments)}}},5005:(t,e,n)=>{var r=n(7854),o=n(614),i=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t]):r[t]&&r[t][e]}},1246:(t,e,n)=>{var r=n(648),o=n(8173),i=n(7497),s=n(5112)("iterator");t.exports=function(t){if(null!=t)return o(t,s)||o(t,"@@iterator")||i[r(t)]}},8554:(t,e,n)=>{var r=n(6916),o=n(9662),i=n(9670),s=n(6330),a=n(1246),l=TypeError;t.exports=function(t,e){var n=arguments.length<2?a(t):e;if(o(n))return i(r(n,t));throw l(s(t)+" is not iterable")}},8173:(t,e,n)=>{var r=n(9662);t.exports=function(t,e){var n=t[e];return null==n?void 0:r(n)}},647:(t,e,n)=>{var r=n(1702),o=n(7908),i=Math.floor,s=r("".charAt),a=r("".replace),l=r("".slice),u=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,c=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,n,r,d,p){var h=n+t.length,f=r.length,m=c;return void 0!==d&&(d=o(d),m=u),a(p,m,(function(o,a){var u;switch(s(a,0)){case"$":return"$";case"&":return t;case"`":return l(e,0,n);case"'":return l(e,h);case"<":u=d[l(a,1,-1)];break;default:var c=+a;if(0===c)return o;if(c>f){var p=i(c/10);return 0===p?o:p<=f?void 0===r[p-1]?s(a,1):r[p-1]+s(a,1):o}u=r[c-1]}return void 0===u?"":u}))}},7854:(t,e,n)=>{var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},2597:(t,e,n)=>{var r=n(1702),o=n(7908),i=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},3501:t=>{t.exports={}},490:(t,e,n)=>{var r=n(5005);t.exports=r("document","documentElement")},4664:(t,e,n)=>{var r=n(9781),o=n(7293),i=n(317);t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},8361:(t,e,n)=>{var r=n(1702),o=n(7293),i=n(4326),s=Object,a=r("".split);t.exports=o((function(){return!s("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?a(t,""):s(t)}:s},9587:(t,e,n)=>{var r=n(614),o=n(111),i=n(7674);t.exports=function(t,e,n){var s,a;return i&&r(s=e.constructor)&&s!==n&&o(a=s.prototype)&&a!==n.prototype&&i(t,a),t}},2788:(t,e,n)=>{var r=n(1702),o=n(614),i=n(5465),s=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return s(t)}),t.exports=i.inspectSource},2423:(t,e,n)=>{var r=n(2109),o=n(1702),i=n(3501),s=n(111),a=n(2597),l=n(3070).f,u=n(8006),c=n(1156),d=n(2050),p=n(9711),h=n(6677),f=!1,m=p("meta"),g=0,v=function(t){l(t,m,{value:{objectID:"O"+g++,weakData:{}}})},y=t.exports={enable:function(){y.enable=function(){},f=!0;var t=u.f,e=o([].splice),n={};n[m]=1,t(n).length&&(u.f=function(n){for(var r=t(n),o=0,i=r.length;o<i;o++)if(r[o]===m){e(r,o,1);break}return r},r({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:c.f}))},fastKey:function(t,e){if(!s(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!a(t,m)){if(!d(t))return"F";if(!e)return"E";v(t)}return t[m].objectID},getWeakData:function(t,e){if(!a(t,m)){if(!d(t))return!0;if(!e)return!1;v(t)}return t[m].weakData},onFreeze:function(t){return h&&f&&d(t)&&!a(t,m)&&v(t),t}};i[m]=!0},9909:(t,e,n)=>{var r,o,i,s=n(8536),a=n(7854),l=n(1702),u=n(111),c=n(8880),d=n(2597),p=n(5465),h=n(6200),f=n(3501),m="Object already initialized",g=a.TypeError,v=a.WeakMap;if(s||p.state){var y=p.state||(p.state=new v),b=l(y.get),w=l(y.has),x=l(y.set);r=function(t,e){if(w(y,t))throw new g(m);return e.facade=t,x(y,t,e),e},o=function(t){return b(y,t)||{}},i=function(t){return w(y,t)}}else{var D=h("state");f[D]=!0,r=function(t,e){if(d(t,D))throw new g(m);return e.facade=t,c(t,D,e),e},o=function(t){return d(t,D)?t[D]:{}},i=function(t){return d(t,D)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!u(e)||(n=o(e)).type!==t)throw g("Incompatible receiver, "+t+" required");return n}}}},7659:(t,e,n)=>{var r=n(5112),o=n(7497),i=r("iterator"),s=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||s[i]===t)}},3157:(t,e,n)=>{var r=n(4326);t.exports=Array.isArray||function(t){return"Array"==r(t)}},614:t=>{t.exports=function(t){return"function"==typeof t}},4411:(t,e,n)=>{var r=n(1702),o=n(7293),i=n(614),s=n(648),a=n(5005),l=n(2788),u=function(){},c=[],d=a("Reflect","construct"),p=/^\s*(?:class|function)\b/,h=r(p.exec),f=!p.exec(u),m=function(t){if(!i(t))return!1;try{return d(u,c,t),!0}catch(t){return!1}},g=function(t){if(!i(t))return!1;switch(s(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return f||!!h(p,l(t))}catch(t){return!0}};g.sham=!0,t.exports=!d||o((function(){var t;return m(m.call)||!m(Object)||!m((function(){t=!0}))||t}))?g:m},4705:(t,e,n)=>{var r=n(7293),o=n(614),i=/#|\.prototype\./,s=function(t,e){var n=l[a(t)];return n==c||n!=u&&(o(e)?r(e):!!e)},a=s.normalize=function(t){return String(t).replace(i,".").toLowerCase()},l=s.data={},u=s.NATIVE="N",c=s.POLYFILL="P";t.exports=s},111:(t,e,n)=>{var r=n(614);t.exports=function(t){return"object"==typeof t?null!==t:r(t)}},1913:t=>{t.exports=!1},2190:(t,e,n)=>{var r=n(5005),o=n(614),i=n(7976),s=n(3307),a=Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return o(e)&&i(e.prototype,a(t))}},408:(t,e,n)=>{var r=n(9974),o=n(6916),i=n(9670),s=n(6330),a=n(7659),l=n(6244),u=n(7976),c=n(8554),d=n(1246),p=n(9212),h=TypeError,f=function(t,e){this.stopped=t,this.result=e},m=f.prototype;t.exports=function(t,e,n){var g,v,y,b,w,x,D,k=n&&n.that,C=!(!n||!n.AS_ENTRIES),E=!(!n||!n.IS_ITERATOR),S=!(!n||!n.INTERRUPTED),O=r(e,k),A=function(t){return g&&p(g,"normal",t),new f(!0,t)},T=function(t){return C?(i(t),S?O(t[0],t[1],A):O(t[0],t[1])):S?O(t,A):O(t)};if(E)g=t;else{if(!(v=d(t)))throw h(s(t)+" is not iterable");if(a(v)){for(y=0,b=l(t);b>y;y++)if((w=T(t[y]))&&u(m,w))return w;return new f(!1)}g=c(t,v)}for(x=g.next;!(D=o(x,g)).done;){try{w=T(D.value)}catch(t){p(g,"throw",t)}if("object"==typeof w&&w&&u(m,w))return w}return new f(!1)}},9212:(t,e,n)=>{var r=n(6916),o=n(9670),i=n(8173);t.exports=function(t,e,n){var s,a;o(t);try{if(!(s=i(t,"return"))){if("throw"===e)throw n;return n}s=r(s,t)}catch(t){a=!0,s=t}if("throw"===e)throw n;if(a)throw s;return o(s),n}},3383:(t,e,n)=>{var r,o,i,s=n(7293),a=n(614),l=n(30),u=n(9518),c=n(8052),d=n(5112),p=n(1913),h=d("iterator"),f=!1;[].keys&&("next"in(i=[].keys())?(o=u(u(i)))!==Object.prototype&&(r=o):f=!0),null==r||s((function(){var t={};return r[h].call(t)!==t}))?r={}:p&&(r=l(r)),a(r[h])||c(r,h,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:f}},7497:t=>{t.exports={}},6244:(t,e,n)=>{var r=n(7466);t.exports=function(t){return r(t.length)}},6339:(t,e,n)=>{var r=n(7293),o=n(614),i=n(2597),s=n(9781),a=n(6530).CONFIGURABLE,l=n(2788),u=n(9909),c=u.enforce,d=u.get,p=Object.defineProperty,h=s&&!r((function(){return 8!==p((function(){}),"length",{value:8}).length})),f=String(String).split("String"),m=t.exports=function(t,e,n){"Symbol("===String(e).slice(0,7)&&(e="["+String(e).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!i(t,"name")||a&&t.name!==e)&&(s?p(t,"name",{value:e,configurable:!0}):t.name=e),h&&n&&i(n,"arity")&&t.length!==n.arity&&p(t,"length",{value:n.arity});try{n&&i(n,"constructor")&&n.constructor?s&&p(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var r=c(t);return i(r,"source")||(r.source=f.join("string"==typeof e?e:"")),t};Function.prototype.toString=m((function(){return o(this)&&d(this).source||l(this)}),"toString")},4758:t=>{var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var r=+t;return(r>0?n:e)(r)}},133:(t,e,n)=>{var r=n(7392),o=n(7293);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},8536:(t,e,n)=>{var r=n(7854),o=n(614),i=n(2788),s=r.WeakMap;t.exports=o(s)&&/native code/.test(i(s))},3009:(t,e,n)=>{var r=n(7854),o=n(7293),i=n(1702),s=n(1340),a=n(3111).trim,l=n(1361),u=r.parseInt,c=r.Symbol,d=c&&c.iterator,p=/^[+-]?0x/i,h=i(p.exec),f=8!==u(l+"08")||22!==u(l+"0x16")||d&&!o((function(){u(Object(d))}));t.exports=f?function(t,e){var n=a(s(t));return u(n,e>>>0||(h(p,n)?16:10))}:u},1574:(t,e,n)=>{var r=n(9781),o=n(1702),i=n(6916),s=n(7293),a=n(1956),l=n(5181),u=n(5296),c=n(7908),d=n(8361),p=Object.assign,h=Object.defineProperty,f=o([].concat);t.exports=!p||s((function(){if(r&&1!==p({b:1},p(h({},"a",{enumerable:!0,get:function(){h(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),o="abcdefghijklmnopqrst";return t[n]=7,o.split("").forEach((function(t){e[t]=t})),7!=p({},t)[n]||a(p({},e)).join("")!=o}))?function(t,e){for(var n=c(t),o=arguments.length,s=1,p=l.f,h=u.f;o>s;)for(var m,g=d(arguments[s++]),v=p?f(a(g),p(g)):a(g),y=v.length,b=0;y>b;)m=v[b++],r&&!i(h,g,m)||(n[m]=g[m]);return n}:p},30:(t,e,n)=>{var r,o=n(9670),i=n(6048),s=n(748),a=n(3501),l=n(490),u=n(317),c=n(6200)("IE_PROTO"),d=function(){},p=function(t){return"<script>"+t+"<\/script>"},h=function(t){t.write(p("")),t.close();var e=t.parentWindow.Object;return t=null,e},f=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e;f="undefined"!=typeof document?document.domain&&r?h(r):((e=u("iframe")).style.display="none",l.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(p("document.F=Object")),t.close(),t.F):h(r);for(var n=s.length;n--;)delete f.prototype[s[n]];return f()};a[c]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(d.prototype=o(t),n=new d,d.prototype=null,n[c]=t):n=f(),void 0===e?n:i.f(n,e)}},6048:(t,e,n)=>{var r=n(9781),o=n(3353),i=n(3070),s=n(9670),a=n(5656),l=n(1956);e.f=r&&!o?Object.defineProperties:function(t,e){s(t);for(var n,r=a(e),o=l(e),u=o.length,c=0;u>c;)i.f(t,n=o[c++],r[n]);return t}},3070:(t,e,n)=>{var r=n(9781),o=n(4664),i=n(3353),s=n(9670),a=n(4948),l=TypeError,u=Object.defineProperty,c=Object.getOwnPropertyDescriptor;e.f=r?i?function(t,e,n){if(s(t),e=a(e),s(n),"function"==typeof t&&"prototype"===e&&"value"in n&&"writable"in n&&!n.writable){var r=c(t,e);r&&r.writable&&(t[e]=n.value,n={configurable:"configurable"in n?n.configurable:r.configurable,enumerable:"enumerable"in n?n.enumerable:r.enumerable,writable:!1})}return u(t,e,n)}:u:function(t,e,n){if(s(t),e=a(e),s(n),o)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw l("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},1236:(t,e,n)=>{var r=n(9781),o=n(6916),i=n(5296),s=n(9114),a=n(5656),l=n(4948),u=n(2597),c=n(4664),d=Object.getOwnPropertyDescriptor;e.f=r?d:function(t,e){if(t=a(t),e=l(e),c)try{return d(t,e)}catch(t){}if(u(t,e))return s(!o(i.f,t,e),t[e])}},1156:(t,e,n)=>{var r=n(4326),o=n(5656),i=n(8006).f,s=n(1589),a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"Window"==r(t)?function(t){try{return i(t)}catch(t){return s(a)}}(t):i(o(t))}},8006:(t,e,n)=>{var r=n(6324),o=n(748).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},5181:(t,e)=>{e.f=Object.getOwnPropertySymbols},9518:(t,e,n)=>{var r=n(2597),o=n(614),i=n(7908),s=n(6200),a=n(8544),l=s("IE_PROTO"),u=Object,c=u.prototype;t.exports=a?u.getPrototypeOf:function(t){var e=i(t);if(r(e,l))return e[l];var n=e.constructor;return o(n)&&e instanceof n?n.prototype:e instanceof u?c:null}},2050:(t,e,n)=>{var r=n(7293),o=n(111),i=n(4326),s=n(7556),a=Object.isExtensible,l=r((function(){a(1)}));t.exports=l||s?function(t){return!!o(t)&&(!s||"ArrayBuffer"!=i(t))&&(!a||a(t))}:a},7976:(t,e,n)=>{var r=n(1702);t.exports=r({}.isPrototypeOf)},6324:(t,e,n)=>{var r=n(1702),o=n(2597),i=n(5656),s=n(1318).indexOf,a=n(3501),l=r([].push);t.exports=function(t,e){var n,r=i(t),u=0,c=[];for(n in r)!o(a,n)&&o(r,n)&&l(c,n);for(;e.length>u;)o(r,n=e[u++])&&(~s(c,n)||l(c,n));return c}},1956:(t,e,n)=>{var r=n(6324),o=n(748);t.exports=Object.keys||function(t){return r(t,o)}},5296:(t,e)=>{var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);e.f=o?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},7674:(t,e,n)=>{var r=n(1702),o=n(9670),i=n(6077);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=r(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return o(n),i(r),e?t(n,r):n.__proto__=r,n}}():void 0)},288:(t,e,n)=>{var r=n(1694),o=n(648);t.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},2140:(t,e,n)=>{var r=n(6916),o=n(614),i=n(111),s=TypeError;t.exports=function(t,e){var n,a;if("string"===e&&o(n=t.toString)&&!i(a=r(n,t)))return a;if(o(n=t.valueOf)&&!i(a=r(n,t)))return a;if("string"!==e&&o(n=t.toString)&&!i(a=r(n,t)))return a;throw s("Can't convert object to primitive value")}},3887:(t,e,n)=>{var r=n(5005),o=n(1702),i=n(8006),s=n(5181),a=n(9670),l=o([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(a(t)),n=s.f;return n?l(e,n(t)):e}},7651:(t,e,n)=>{var r=n(6916),o=n(9670),i=n(614),s=n(4326),a=n(2261),l=TypeError;t.exports=function(t,e){var n=t.exec;if(i(n)){var u=r(n,t,e);return null!==u&&o(u),u}if("RegExp"===s(t))return r(a,t,e);throw l("RegExp#exec called on incompatible receiver")}},2261:(t,e,n)=>{var r,o,i=n(6916),s=n(1702),a=n(1340),l=n(7066),u=n(2999),c=n(2309),d=n(30),p=n(9909).get,h=n(3350),f=n(7168),m=c("native-string-replace",String.prototype.replace),g=RegExp.prototype.exec,v=g,y=s("".charAt),b=s("".indexOf),w=s("".replace),x=s("".slice),D=(o=/b*/g,i(g,r=/a/,"a"),i(g,o,"a"),0!==r.lastIndex||0!==o.lastIndex),k=u.BROKEN_CARET,C=void 0!==/()??/.exec("")[1];(D||C||k||h||f)&&(v=function(t){var e,n,r,o,s,u,c,h=this,f=p(h),E=a(t),S=f.raw;if(S)return S.lastIndex=h.lastIndex,e=i(v,S,E),h.lastIndex=S.lastIndex,e;var O=f.groups,A=k&&h.sticky,T=i(l,h),M=h.source,F=0,N=E;if(A&&(T=w(T,"y",""),-1===b(T,"g")&&(T+="g"),N=x(E,h.lastIndex),h.lastIndex>0&&(!h.multiline||h.multiline&&"\n"!==y(E,h.lastIndex-1))&&(M="(?: "+M+")",N=" "+N,F++),n=new RegExp("^(?:"+M+")",T)),C&&(n=new RegExp("^"+M+"$(?!\\s)",T)),D&&(r=h.lastIndex),o=i(g,A?n:h,N),A?o?(o.input=x(o.input,F),o[0]=x(o[0],F),o.index=h.lastIndex,h.lastIndex+=o[0].length):h.lastIndex=0:D&&o&&(h.lastIndex=h.global?o.index+o[0].length:r),C&&o&&o.length>1&&i(m,o[0],n,(function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(o[s]=void 0)})),o&&O)for(o.groups=u=d(null),s=0;s<O.length;s++)u[(c=O[s])[0]]=o[c[1]];return o}),t.exports=v},7066:(t,e,n)=>{var r=n(9670);t.exports=function(){var t=r(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}},2999:(t,e,n)=>{var r=n(7293),o=n(7854).RegExp,i=r((function(){var t=o("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),s=i||r((function(){return!o("a","y").sticky})),a=i||r((function(){var t=o("^r","gy");return t.lastIndex=2,null!=t.exec("str")}));t.exports={BROKEN_CARET:a,MISSED_STICKY:s,UNSUPPORTED_Y:i}},3350:(t,e,n)=>{var r=n(7293),o=n(7854).RegExp;t.exports=r((function(){var t=o(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}))},7168:(t,e,n)=>{var r=n(7293),o=n(7854).RegExp;t.exports=r((function(){var t=o("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},4488:t=>{var e=TypeError;t.exports=function(t){if(null==t)throw e("Can't call method on "+t);return t}},8003:(t,e,n)=>{var r=n(3070).f,o=n(2597),i=n(5112)("toStringTag");t.exports=function(t,e,n){t&&!n&&(t=t.prototype),t&&!o(t,i)&&r(t,i,{configurable:!0,value:e})}},6200:(t,e,n)=>{var r=n(2309),o=n(9711),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},5465:(t,e,n)=>{var r=n(7854),o=n(3072),i="__core-js_shared__",s=r[i]||o(i,{});t.exports=s},2309:(t,e,n)=>{var r=n(1913),o=n(5465);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.23.3",mode:r?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.23.3/LICENSE",source:"https://github.com/zloirock/core-js"})},8710:(t,e,n)=>{var r=n(1702),o=n(9303),i=n(1340),s=n(4488),a=r("".charAt),l=r("".charCodeAt),u=r("".slice),c=function(t){return function(e,n){var r,c,d=i(s(e)),p=o(n),h=d.length;return p<0||p>=h?t?"":void 0:(r=l(d,p))<55296||r>56319||p+1===h||(c=l(d,p+1))<56320||c>57343?t?a(d,p):r:t?u(d,p,p+2):c-56320+(r-55296<<10)+65536}};t.exports={codeAt:c(!1),charAt:c(!0)}},3111:(t,e,n)=>{var r=n(1702),o=n(4488),i=n(1340),s=n(1361),a=r("".replace),l="["+s+"]",u=RegExp("^"+l+l+"*"),c=RegExp(l+l+"*$"),d=function(t){return function(e){var n=i(o(e));return 1&t&&(n=a(n,u,"")),2&t&&(n=a(n,c,"")),n}};t.exports={start:d(1),end:d(2),trim:d(3)}},1400:(t,e,n)=>{var r=n(9303),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},5656:(t,e,n)=>{var r=n(8361),o=n(4488);t.exports=function(t){return r(o(t))}},9303:(t,e,n)=>{var r=n(4758);t.exports=function(t){var e=+t;return e!=e||0===e?0:r(e)}},7466:(t,e,n)=>{var r=n(9303),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},7908:(t,e,n)=>{var r=n(4488),o=Object;t.exports=function(t){return o(r(t))}},7593:(t,e,n)=>{var r=n(6916),o=n(111),i=n(2190),s=n(8173),a=n(2140),l=n(5112),u=TypeError,c=l("toPrimitive");t.exports=function(t,e){if(!o(t)||i(t))return t;var n,l=s(t,c);if(l){if(void 0===e&&(e="default"),n=r(l,t,e),!o(n)||i(n))return n;throw u("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},4948:(t,e,n)=>{var r=n(7593),o=n(2190);t.exports=function(t){var e=r(t,"string");return o(e)?e:e+""}},1694:(t,e,n)=>{var r={};r[n(5112)("toStringTag")]="z",t.exports="[object z]"===String(r)},1340:(t,e,n)=>{var r=n(648),o=String;t.exports=function(t){if("Symbol"===r(t))throw TypeError("Cannot convert a Symbol value to a string");return o(t)}},6330:t=>{var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},9711:(t,e,n)=>{var r=n(1702),o=0,i=Math.random(),s=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++o+i,36)}},3307:(t,e,n)=>{var r=n(133);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3353:(t,e,n)=>{var r=n(9781),o=n(7293);t.exports=r&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},5112:(t,e,n)=>{var r=n(7854),o=n(2309),i=n(2597),s=n(9711),a=n(133),l=n(3307),u=o("wks"),c=r.Symbol,d=c&&c.for,p=l?c:c&&c.withoutSetter||s;t.exports=function(t){if(!i(u,t)||!a&&"string"!=typeof u[t]){var e="Symbol."+t;a&&i(c,t)?u[t]=c[t]:u[t]=l&&d?d(e):p(e)}return u[t]}},1361:t=>{t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},7327:(t,e,n)=>{var r=n(2109),o=n(2092).filter;r({target:"Array",proto:!0,forced:!n(1194)("filter")},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},6992:(t,e,n)=>{var r=n(5656),o=n(1223),i=n(7497),s=n(9909),a=n(3070).f,l=n(654),u=n(1913),c=n(9781),d="Array Iterator",p=s.set,h=s.getterFor(d);t.exports=l(Array,"Array",(function(t,e){p(this,{type:d,target:r(t),index:0,kind:e})}),(function(){var t=h(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values");var f=i.Arguments=i.Array;if(o("keys"),o("values"),o("entries"),!u&&c&&"values"!==f.name)try{a(f,"name",{value:"values"})}catch(t){}},5827:(t,e,n)=>{var r=n(2109),o=n(3671).left,i=n(9341),s=n(7392),a=n(5268);r({target:"Array",proto:!0,forced:!i("reduce")||!a&&s>79&&s<83},{reduce:function(t){var e=arguments.length;return o(this,t,e,e>1?arguments[1]:void 0)}})},8309:(t,e,n)=>{var r=n(9781),o=n(6530).EXISTS,i=n(1702),s=n(3070).f,a=Function.prototype,l=i(a.toString),u=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,c=i(u.exec);r&&!o&&s(a,"name",{configurable:!0,get:function(){try{return c(u,l(this))[1]}catch(t){return""}}})},9601:(t,e,n)=>{var r=n(2109),o=n(1574);r({target:"Object",stat:!0,arity:2,forced:Object.assign!==o},{assign:o})},1539:(t,e,n)=>{var r=n(1694),o=n(8052),i=n(288);r||o(Object.prototype,"toString",i,{unsafe:!0})},1058:(t,e,n)=>{var r=n(2109),o=n(3009);r({global:!0,forced:parseInt!=o},{parseInt:o})},4916:(t,e,n)=>{var r=n(2109),o=n(2261);r({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},8783:(t,e,n)=>{var r=n(8710).charAt,o=n(1340),i=n(9909),s=n(654),a="String Iterator",l=i.set,u=i.getterFor(a);s(String,"String",(function(t){l(this,{type:a,string:o(t),index:0})}),(function(){var t,e=u(this),n=e.string,o=e.index;return o>=n.length?{value:void 0,done:!0}:(t=r(n,o),e.index+=t.length,{value:t,done:!1})}))},4723:(t,e,n)=>{var r=n(6916),o=n(7007),i=n(9670),s=n(7466),a=n(1340),l=n(4488),u=n(8173),c=n(1530),d=n(7651);o("match",(function(t,e,n){return[function(e){var n=l(this),o=null==e?void 0:u(e,t);return o?r(o,e,n):new RegExp(e)[t](a(n))},function(t){var r=i(this),o=a(t),l=n(e,r,o);if(l.done)return l.value;if(!r.global)return d(r,o);var u=r.unicode;r.lastIndex=0;for(var p,h=[],f=0;null!==(p=d(r,o));){var m=a(p[0]);h[f]=m,""===m&&(r.lastIndex=c(o,s(r.lastIndex),u)),f++}return 0===f?null:h}]}))},5306:(t,e,n)=>{var r=n(2104),o=n(6916),i=n(1702),s=n(7007),a=n(7293),l=n(9670),u=n(614),c=n(9303),d=n(7466),p=n(1340),h=n(4488),f=n(1530),m=n(8173),g=n(647),v=n(7651),y=n(5112)("replace"),b=Math.max,w=Math.min,x=i([].concat),D=i([].push),k=i("".indexOf),C=i("".slice),E="$0"==="a".replace(/./,"$0"),S=!!/./[y]&&""===/./[y]("a","$0");s("replace",(function(t,e,n){var i=S?"$":"$0";return[function(t,n){var r=h(this),i=null==t?void 0:m(t,y);return i?o(i,t,r,n):o(e,p(r),t,n)},function(t,o){var s=l(this),a=p(t);if("string"==typeof o&&-1===k(o,i)&&-1===k(o,"$<")){var h=n(e,s,a,o);if(h.done)return h.value}var m=u(o);m||(o=p(o));var y=s.global;if(y){var E=s.unicode;s.lastIndex=0}for(var S=[];;){var O=v(s,a);if(null===O)break;if(D(S,O),!y)break;""===p(O[0])&&(s.lastIndex=f(a,d(s.lastIndex),E))}for(var A,T="",M=0,F=0;F<S.length;F++){for(var N=p((O=S[F])[0]),B=b(w(c(O.index),a.length),0),_=[],R=1;R<O.length;R++)D(_,void 0===(A=O[R])?A:String(A));var z=O.groups;if(m){var L=x([N],_,B,a);void 0!==z&&D(L,z);var I=p(r(o,void 0,L))}else I=g(N,a,B,_,z,o);B>=M&&(T+=C(a,M,B)+I,M=B+N.length)}return T+C(a,M)}]}),!!a((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!E||S)},1202:(t,e,n)=>{var r,o=n(7854),i=n(1702),s=n(9190),a=n(2423),l=n(7710),u=n(9320),c=n(111),d=n(2050),p=n(9909).enforce,h=n(8536),f=!o.ActiveXObject&&"ActiveXObject"in o,m=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},g=l("WeakMap",m,u);if(h&&f){r=u.getConstructor(m,"WeakMap",!0),a.enable();var v=g.prototype,y=i(v.delete),b=i(v.has),w=i(v.get),x=i(v.set);s(v,{delete:function(t){if(c(t)&&!d(t)){var e=p(this);return e.frozen||(e.frozen=new r),y(this,t)||e.frozen.delete(t)}return y(this,t)},has:function(t){if(c(t)&&!d(t)){var e=p(this);return e.frozen||(e.frozen=new r),b(this,t)||e.frozen.has(t)}return b(this,t)},get:function(t){if(c(t)&&!d(t)){var e=p(this);return e.frozen||(e.frozen=new r),b(this,t)?w(this,t):e.frozen.get(t)}return w(this,t)},set:function(t,e){if(c(t)&&!d(t)){var n=p(this);n.frozen||(n.frozen=new r),b(this,t)?x(this,t,e):n.frozen.set(t,e)}else x(this,t,e);return this}})}},4129:(t,e,n)=>{n(1202)},4747:(t,e,n)=>{var r=n(7854),o=n(8324),i=n(8509),s=n(8533),a=n(8880),l=function(t){if(t&&t.forEach!==s)try{a(t,"forEach",s)}catch(e){t.forEach=s}};for(var u in o)o[u]&&l(r[u]&&r[u].prototype);l(i)},3948:(t,e,n)=>{var r=n(7854),o=n(8324),i=n(8509),s=n(6992),a=n(8880),l=n(5112),u=l("iterator"),c=l("toStringTag"),d=s.values,p=function(t,e){if(t){if(t[u]!==d)try{a(t,u,d)}catch(e){t[u]=d}if(t[c]||a(t,c,e),o[e])for(var n in s)if(t[n]!==s[n])try{a(t,n,s[n])}catch(e){t[n]=s[n]}}};for(var h in o)p(r[h]&&r[h].prototype,h);p(i,"DOMTokenList")},1296:(t,e,n)=>{var r=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,s=/^0o[0-7]+$/i,a=parseInt,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,u="object"==typeof self&&self&&self.Object===Object&&self,c=l||u||Function("return this")(),d=Object.prototype.toString,p=Math.max,h=Math.min,f=function(){return c.Date.now()};function m(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function g(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==d.call(t)}(t))return NaN;if(m(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=m(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(r,"");var n=i.test(t);return n||s.test(t)?a(t.slice(2),n?2:8):o.test(t)?NaN:+t}t.exports=function(t,e,n){var r,o,i,s,a,l,u=0,c=!1,d=!1,v=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function y(e){var n=r,i=o;return r=o=void 0,u=e,s=t.apply(i,n)}function b(t){return u=t,a=setTimeout(x,e),c?y(t):s}function w(t){var n=t-l;return void 0===l||n>=e||n<0||d&&t-u>=i}function x(){var t=f();if(w(t))return D(t);a=setTimeout(x,function(t){var n=e-(t-l);return d?h(n,i-(t-u)):n}(t))}function D(t){return a=void 0,v&&r?y(t):(r=o=void 0,s)}function k(){var t=f(),n=w(t);if(r=arguments,o=this,l=t,n){if(void 0===a)return b(l);if(d)return a=setTimeout(x,e),y(l)}return void 0===a&&(a=setTimeout(x,e)),s}return e=g(e)||0,m(n)&&(c=!!n.leading,i=(d="maxWait"in n)?p(g(n.maxWait)||0,e):i,v="trailing"in n?!!n.trailing:v),k.cancel=function(){void 0!==a&&clearTimeout(a),u=0,r=l=o=a=void 0},k.flush=function(){return void 0===a?s:D(f())},k}},773:(t,e,n)=>{var r,o="__lodash_hash_undefined__",i=/^\[object .+?Constructor\]$/,s="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,a="object"==typeof self&&self&&self.Object===Object&&self,l=s||a||Function("return this")(),u=Array.prototype,c=Function.prototype,d=Object.prototype,p=l["__core-js_shared__"],h=(r=/[^.]+$/.exec(p&&p.keys&&p.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",f=c.toString,m=d.hasOwnProperty,g=d.toString,v=RegExp("^"+f.call(m).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),y=u.splice,b=S(l,"Map"),w=S(Object,"create");function x(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function D(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function k(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function C(t,e){for(var n,r,o=t.length;o--;)if((n=t[o][0])===(r=e)||n!=n&&r!=r)return o;return-1}function E(t,e){var n,r,o=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof e?"string":"hash"]:o.map}function S(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return function(t){if(!A(t)||h&&h in t)return!1;var e=function(t){var e=A(t)?g.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t)?v:i;return e.test(function(t){if(null!=t){try{return f.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t))}(n)?n:void 0}function O(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=t.apply(this,r);return n.cache=i.set(o,s),s};return n.cache=new(O.Cache||k),n}function A(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}x.prototype.clear=function(){this.__data__=w?w(null):{}},x.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},x.prototype.get=function(t){var e=this.__data__;if(w){var n=e[t];return n===o?void 0:n}return m.call(e,t)?e[t]:void 0},x.prototype.has=function(t){var e=this.__data__;return w?void 0!==e[t]:m.call(e,t)},x.prototype.set=function(t,e){return this.__data__[t]=w&&void 0===e?o:e,this},D.prototype.clear=function(){this.__data__=[]},D.prototype.delete=function(t){var e=this.__data__,n=C(e,t);return!(n<0||(n==e.length-1?e.pop():y.call(e,n,1),0))},D.prototype.get=function(t){var e=this.__data__,n=C(e,t);return n<0?void 0:e[n][1]},D.prototype.has=function(t){return C(this.__data__,t)>-1},D.prototype.set=function(t,e){var n=this.__data__,r=C(n,t);return r<0?n.push([t,e]):n[r][1]=e,this},k.prototype.clear=function(){this.__data__={hash:new x,map:new(b||D),string:new x}},k.prototype.delete=function(t){return E(this,t).delete(t)},k.prototype.get=function(t){return E(this,t).get(t)},k.prototype.has=function(t){return E(this,t).has(t)},k.prototype.set=function(t,e){return E(this,t).set(t,e),this},O.Cache=k,t.exports=O},3096:(t,e,n)=>{var r="Expected a function",o=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,a=/^0o[0-7]+$/i,l=parseInt,u="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,d=u||c||Function("return this")(),p=Object.prototype.toString,h=Math.max,f=Math.min,m=function(){return d.Date.now()};function g(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function v(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==p.call(t)}(t))return NaN;if(g(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=g(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(o,"");var n=s.test(t);return n||a.test(t)?l(t.slice(2),n?2:8):i.test(t)?NaN:+t}t.exports=function(t,e,n){var o=!0,i=!0;if("function"!=typeof t)throw new TypeError(r);return g(n)&&(o="leading"in n?!!n.leading:o,i="trailing"in n?!!n.trailing:i),function(t,e,n){var o,i,s,a,l,u,c=0,d=!1,p=!1,y=!0;if("function"!=typeof t)throw new TypeError(r);function b(e){var n=o,r=i;return o=i=void 0,c=e,a=t.apply(r,n)}function w(t){return c=t,l=setTimeout(D,e),d?b(t):a}function x(t){var n=t-u;return void 0===u||n>=e||n<0||p&&t-c>=s}function D(){var t=m();if(x(t))return k(t);l=setTimeout(D,function(t){var n=e-(t-u);return p?f(n,s-(t-c)):n}(t))}function k(t){return l=void 0,y&&o?b(t):(o=i=void 0,a)}function C(){var t=m(),n=x(t);if(o=arguments,i=this,u=t,n){if(void 0===l)return w(u);if(p)return l=setTimeout(D,e),b(u)}return void 0===l&&(l=setTimeout(D,e)),a}return e=v(e)||0,g(n)&&(d=!!n.leading,s=(p="maxWait"in n)?h(v(n.maxWait)||0,e):s,y="trailing"in n?!!n.trailing:y),C.cancel=function(){void 0!==l&&clearTimeout(l),c=0,o=u=i=l=void 0},C.flush=function(){return void 0===l?a:k(m())},C}(t,e,{leading:o,maxWait:e,trailing:i})}},8274:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" fill-rule="evenodd" d="M23 7H5v2h18V7Zm-3 4H8v2h12v-2Zm3 4H5v2h18v-2ZM8 19h12v2H8v-2Z" clip-rule="evenodd"/>\n</svg>\n'},8768:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" fill-rule="evenodd" d="M23 7H5v2h18V7Zm0 4H5v2h18v-2Zm0 4H5v2h18v-2ZM5 19h18v2H5v-2Z" clip-rule="evenodd"/>\n</svg>\n'},2449:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" fill-rule="evenodd" d="M23 7H5v2h18V7Zm-6 4H5v2h12v-2Zm6 4H5v2h18v-2ZM5 19h12v2H5v-2Z" clip-rule="evenodd"/>\n</svg>\n'},2515:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" fill-rule="evenodd" d="M23 7H5v2h18V7Zm0 4H11v2h12v-2Zm0 4H5v2h18v-2Zm-12 4h12v2H11v-2Z" clip-rule="evenodd"/>\n</svg>\n'},548:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 8 8">\n <path fill="var(--zw-icon-foreground)" fill-rule="evenodd" d="m4 6.934 4-5H0l4 5Z" clip-rule="evenodd"/>\n</svg>\n'},1881:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" fill-rule="evenodd" d="M22 20.62a2.42 2.42 0 0 1-4.84 0c0-1.25 2.42-4.54 2.42-4.54S22 19.37 22 20.62ZM9.92 15.425l1.452-3.951c.071-.182.145-.394.219-.636.074-.242.149-.503.226-.783a17.223 17.223 0 0 0 .454 1.402l1.452 3.968H9.919Zm5.411 4.199c.226-.795.658-1.684 1.184-2.562L12.955 8h-2.269L6 19.93h1.725a.736.736 0 0 0 .474-.157.792.792 0 0 0 .26-.347l.891-2.434h4.941l.891 2.434c.031.079.097.134.148.198Z" clip-rule="evenodd"/>\n</svg>\n'},9464:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" fill-rule="evenodd" d="M16.64 19.93h-1.715a.75.75 0 0 1-.475-.145.82.82 0 0 1-.268-.359l-.89-2.433H8.35l-.891 2.433a.78.78 0 0 1-.26.347.73.73 0 0 1-.475.157H5L9.686 8h2.269l4.686 11.93Zm-7.72-4.505h3.803l-1.452-3.968a18.048 18.048 0 0 1-.219-.623c-.08-.24-.158-.5-.235-.78-.077.28-.152.542-.227.784a8.742 8.742 0 0 1-.218.635L8.92 15.425Zm14.968 4.505h-.915a.987.987 0 0 1-.454-.087c-.11-.058-.192-.175-.248-.35l-.181-.603a7.005 7.005 0 0 1-.631.507c-.206.146-.42.269-.64.368a3.26 3.26 0 0 1-.7.222c-.248.05-.523.075-.826.075-.357 0-.687-.049-.99-.145a2.134 2.134 0 0 1-.78-.433 1.967 1.967 0 0 1-.507-.718 2.545 2.545 0 0 1-.181-.998c0-.319.084-.634.251-.945.168-.31.447-.59.838-.841.39-.25.91-.458 1.559-.623.649-.165 1.455-.258 2.417-.28v-.495c0-.567-.12-.986-.359-1.259-.239-.272-.587-.408-1.043-.408-.33 0-.605.039-.825.116a3.17 3.17 0 0 0-.574.26 25.11 25.11 0 0 1-.45.26.912.912 0 0 1-.453.115.59.59 0 0 1-.355-.107.843.843 0 0 1-.239-.264l-.371-.652c.973-.891 2.148-1.337 3.523-1.337.494 0 .936.081 1.324.244.387.162.716.387.985.676.27.289.475.634.615 1.036.14.401.21.841.21 1.32v5.346Zm-3.96-1.271c.21 0 .402-.02.578-.058.176-.038.342-.096.5-.173.156-.077.307-.172.453-.285a4.13 4.13 0 0 0 .441-.4v-1.427c-.594.027-1.09.078-1.489.153a3.967 3.967 0 0 0-.961.284c-.242.116-.414.25-.516.404a.894.894 0 0 0-.152.504c0 .357.106.613.317.767.212.154.489.231.83.231Z" clip-rule="evenodd"/>\n</svg>\n'},9747:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="#fff" stroke="#B3B3B3" d="M4.5 4.5h19v19h-19z"/>\n <path fill="#3B3B3B" d="M26 20.7a2.51 2.51 0 0 1-5 0c0-1.31 2.5-4.7 2.5-4.7s2.5 3.39 2.5 4.7Z"/>\n <path fill="#3B3B3B" fill-rule="evenodd" d="M19.64 19.93h-1.715a.75.75 0 0 1-.475-.145.82.82 0 0 1-.268-.359l-.89-2.433h-4.943l-.89 2.433a.78.78 0 0 1-.26.347.73.73 0 0 1-.475.157H8L12.686 8h2.269l4.686 11.93Zm-7.721-4.505h3.803l-1.452-3.968a18.048 18.048 0 0 1-.219-.623c-.08-.24-.158-.5-.235-.78-.077.28-.152.542-.227.784a8.742 8.742 0 0 1-.218.635l-1.452 3.952Z" clip-rule="evenodd"/>\n</svg>\n'},9441:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" d="M18 9V7h-7v2h2.64l-1.22 10H10v2h7v-2h-2.83L15.4 9H18Z"/>\n</svg>\n'},4140:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" fill-rule="evenodd" d="m5 10 3-3 3 3H9v8h2l-3 3-3-3h2v-8H5Zm8-3h10v2H13V7Zm10 6H13v2h10v-2Zm0 6H13v2h10v-2Z" clip-rule="evenodd"/>\n</svg>\n'},8693:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" fill-rule="evenodd" d="M12 17.5h-2a3.5 3.5 0 1 1 0-7h2V9h-2a5 5 0 0 0 0 10h2v-1.5Zm6-4.5h-8v2h8v-2Zm-2-4h2a5 5 0 0 1 0 10h-2v-1.5h2a3.5 3.5 0 1 0 0-7h-2V9Z" clip-rule="evenodd"/>\n</svg>\n'},1304:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <rect width="9" height="9" x="9.5" y="9.5" stroke="var(--zw-icon-foreground)" rx="4.5"/>\n</svg>\n'},2412:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" d="M15.108 18.184V19H10.5v-.816h1.842v-5.862c0-.176.006-.354.018-.534l-1.53 1.314a.375.375 0 0 1-.156.084.373.373 0 0 1-.27-.048.318.318 0 0 1-.084-.078l-.336-.462 2.562-2.214h.87v7.8h1.692Zm1.519.156a.8.8 0 0 1 .054-.294.829.829 0 0 1 .156-.24.77.77 0 0 1 .534-.222.77.77 0 0 1 .696.462c.04.092.06.19.06.294a.744.744 0 0 1-.222.534.692.692 0 0 1-.24.156.73.73 0 0 1-.294.06.73.73 0 0 1-.294-.06.692.692 0 0 1-.396-.39.816.816 0 0 1-.054-.3Z"/>\n</svg>\n'},4311:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <rect width="10" height="10" x="9" y="9" fill="var(--zw-icon-foreground)" rx="5"/>\n</svg>\n'},1477:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" d="M12.086 9.802h.834v11.292h-.834V9.802Zm2.592 8.538a.8.8 0 0 1 .054-.294.829.829 0 0 1 .156-.24.77.77 0 0 1 .534-.222.77.77 0 0 1 .696.462c.04.092.06.19.06.294a.744.744 0 0 1-.222.534.692.692 0 0 1-.24.156.73.73 0 0 1-.294.06.73.73 0 0 1-.294-.06.692.692 0 0 1-.396-.39.816.816 0 0 1-.054-.3Z"/>\n</svg>\n'},5400:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" d="m13.664 15.808-1.35-3.498a7.11 7.11 0 0 1-.252-.804c-.084.324-.17.594-.258.81l-1.35 3.492h3.21ZM16.088 19h-.9a.387.387 0 0 1-.252-.078.48.48 0 0 1-.144-.198l-.804-2.076H10.13l-.804 2.076a.421.421 0 0 1-.138.192.383.383 0 0 1-.252.084h-.9l3.438-8.598h1.176L16.088 19Zm.7-.66a.8.8 0 0 1 .053-.294.829.829 0 0 1 .156-.24.77.77 0 0 1 .534-.222.77.77 0 0 1 .696.462c.04.092.06.19.06.294a.744.744 0 0 1-.222.534.692.692 0 0 1-.24.156.73.73 0 0 1-.294.06.73.73 0 0 1-.294-.06.692.692 0 0 1-.396-.39.816.816 0 0 1-.054-.3Z"/>\n</svg>\n'},2807:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" d="M9 9h10v10H9z"/>\n</svg>\n'},6495:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" fill-rule="evenodd" d="M14.089 6.726a1 1 0 0 1 1.425-.003l6.8 6.882a1 1 0 0 1 .007 1.398L17.2 20.3l-.2.2c-2.2 2.1-5.7 2-7.8-.2l-3.516-3.6a1 1 0 0 1 0-1.399l8.405-8.575Zm1.81 12.674c.1 0 .2 0 .2-.1l4.8-5-6.1-6.2-5 5.1 6.1 6.2Z" clip-rule="evenodd"/>\n</svg>\n'},7522:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" d="M14 9.333V6.666l-3.334 3.333L14 13.333v-2.667c2.206 0 4 1.793 4 4s-1.794 4-4 4c-2.207 0-4-1.793-4-4H8.666A5.332 5.332 0 0 0 14 19.999a5.332 5.332 0 0 0 5.333-5.333A5.332 5.332 0 0 0 14 9.333Z"/>\n</svg>\n'},9976:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" fill-rule="evenodd" d="m14 12.731.77.27H20v2H8v-2h2.84a2.892 2.892 0 0 1-.46-.71 3.61 3.61 0 0 1-.29-1.52c0-.484.1-.964.29-1.41a3.5 3.5 0 0 1 .83-1.2 4 4 0 0 1 1.35-.84 4.74 4.74 0 0 1 1.83-.32 6 6 0 0 1 2.11.41 5 5 0 0 1 1.68 1l-.46.88a.69.69 0 0 1-.18.22.41.41 0 0 1-.25.07.69.69 0 0 1-.39-.16 5.551 5.551 0 0 0-.56-.36 4.641 4.641 0 0 0-.8-.36 3.44 3.44 0 0 0-1.14-.16 3.16 3.16 0 0 0-1.11.17 2.29 2.29 0 0 0-.8.45 1.87 1.87 0 0 0-.49.67 2.138 2.138 0 0 0-.11.79c-.023.357.08.711.29 1 .206.267.465.489.76.65.338.187.693.34 1.06.46Zm1.99 6.06c.24-.22.427-.49.55-.79.135-.315.2-.657.19-1h1.74a4.58 4.58 0 0 1-.25 1.38 4 4 0 0 1-.91 1.37 4.231 4.231 0 0 1-1.46.92 5.503 5.503 0 0 1-2 .33 6.13 6.13 0 0 1-2.5-.46 5.66 5.66 0 0 1-1.89-1.31l.54-.88a.61.61 0 0 1 .19-.17.45.45 0 0 1 .25-.07.5.5 0 0 1 .28.1c.128.077.251.16.37.25l.46.33c.19.13.391.243.6.34.245.107.5.191.76.25.328.076.664.11 1 .1a3.67 3.67 0 0 0 1.19-.18c.328-.109.63-.282.89-.51Z" clip-rule="evenodd"/>\n</svg>\n'},9857:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" d="M21.985 8.625h-1.75V9.5h2.625v.875h-3.5v-1.75c0-.481.394-.875.875-.875h1.75v-.875H19.36V6h2.625c.481 0 .875.394.875.875v.875a.878.878 0 0 1-.875.875ZM7.88 20h2.327l2.975-4.742h.105L16.262 20h2.328l-4.069-6.361L18.32 7.75h-2.345l-2.687 4.366h-.105L10.48 7.75H8.15l3.78 5.889L7.88 20Z"/>\n</svg>\n'},6031:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" fill-rule="evenodd" d="M15.4 16.06a3.3 3.3 0 0 1-1.4.29 3.12 3.12 0 0 1-1.39-.29 2.88 2.88 0 0 1-1.05-.81 3.711 3.711 0 0 1-.65-1.25 5.659 5.659 0 0 1-.22-1.6V7H9v5.41a6.89 6.89 0 0 0 .34 2.22 5.29 5.29 0 0 0 1 1.77c.437.501.975.904 1.58 1.18A5 5 0 0 0 14 18a5 5 0 0 0 2.08-.42 4.61 4.61 0 0 0 1.57-1.18 5.27 5.27 0 0 0 1-1.77 6.89 6.89 0 0 0 .35-2.22V7h-1.69v5.41a5.659 5.659 0 0 1-.22 1.59 3.71 3.71 0 0 1-.69 1.25c-.27.34-.61.617-1 .81ZM20 19H8v2h12v-2Z" clip-rule="evenodd"/>\n</svg>\n'},4538:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 20 20">\n <path fill="var(--zw-icon-foreground)" fill-rule="evenodd" d="M18.96 10a5 5 0 0 0-5-5h-2v1.5h2a3.49 3.49 0 0 1 1.58 6.61L13.43 11h.53V9h-2.53l-7-7-1.47 1.47L17.49 18l1.47-1.47-2.34-2.34A4.93 4.93 0 0 0 18.96 10Zm-13 1h1.59L5.96 9.41V11ZM3.81 7.26A3.47 3.47 0 0 0 2.46 10a3.5 3.5 0 0 0 3.5 3.5h2V15h-2a5 5 0 0 1-3.21-8.8l1.06 1.06Z" clip-rule="evenodd"/>\n</svg>\n'},7061:(t,e,n)=>{var r=n(8698).default;function o(){t.exports=o=function(){return e},t.exports.__esModule=!0,t.exports.default=t.exports;var e={},n=Object.prototype,i=n.hasOwnProperty,s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",l=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function d(t,e,n,r){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),s=new S(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var s=n.delegate;if(s){var a=k(s,n);if(a){if(a===h)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=p(t,e,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===h)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(t,n,s),i}function p(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=d;var h={};function f(){}function m(){}function g(){}var v={};c(v,a,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(O([])));b&&b!==n&&i.call(b,a)&&(v=b);var w=g.prototype=f.prototype=Object.create(v);function x(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function D(t,e){function n(o,s,a,l){var u=p(t[o],t,s);if("throw"!==u.type){var c=u.arg,d=c.value;return d&&"object"==r(d)&&i.call(d,"__await")?e.resolve(d.__await).then((function(t){n("next",t,a,l)}),(function(t){n("throw",t,a,l)})):e.resolve(d).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,l)}))}l(u.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function k(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,k(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var r=p(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,h;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function O(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function e(){for(;++n<t.length;)if(i.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return r.next=r}}return{next:A}}function A(){return{value:void 0,done:!0}}return m.prototype=g,c(w,"constructor",g),c(g,"constructor",m),m.displayName=c(g,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,c(t,u,"GeneratorFunction")),t.prototype=Object.create(w),t},e.awrap=function(t){return{__await:t}},x(D.prototype),c(D.prototype,l,(function(){return this})),e.AsyncIterator=D,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var s=new D(d(t,n,r,o),i);return e.isGeneratorFunction(n)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},x(w),c(w,u,"Generator"),c(w,a,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=O,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,r){return s.type="throw",s.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=i.call(o,"catchLoc"),l=i.call(o,"finallyLoc");if(a&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;E(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},e}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports},8698:t=>{function e(n){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},4687:(t,e,n)=>{var r=n(7061)();t.exports=r;try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};(()=>{n.r(r),n.d(r,{Wysiwyg:()=>Wf});var t=function(){var t=this,e=t._self._c;return e("div",{ref:"wysiwygRef",staticClass:"zw-wysiwyg"},[e("Toolbar",{ref:"toolbarRef",attrs:{toolbar:t.toolbar,device:t.device}}),t._v(" "),e("EditorContent",{attrs:{editor:t.editor}})],1)};function e(t){this.content=t}t._withStripped=!0,e.prototype={constructor:e,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return-1==e?void 0:this.content[e+1]},update:function(t,n,r){var o=r&&r!=t?this.remove(r):this,i=o.find(t),s=o.content.slice();return-1==i?s.push(r||t,n):(s[i+1]=n,r&&(s[i]=r)),new e(s)},remove:function(t){var n=this.find(t);if(-1==n)return this;var r=this.content.slice();return r.splice(n,2),new e(r)},addToStart:function(t,n){return new e([t,n].concat(this.remove(t).content))},addToEnd:function(t,n){var r=this.remove(t).content.slice();return r.push(t,n),new e(r)},addBefore:function(t,n,r){var o=this.remove(n),i=o.content.slice(),s=o.find(t);return i.splice(-1==s?i.length:s,0,n,r),new e(i)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return(t=e.from(t)).size?new e(t.content.concat(this.subtract(t).content)):this},append:function(t){return(t=e.from(t)).size?new e(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var n=this;t=e.from(t);for(var r=0;r<t.content.length;r+=2)n=n.remove(t.content[r]);return n},get size(){return this.content.length>>1}},e.from=function(t){if(t instanceof e)return t;var n=[];if(t)for(var r in t)n.push(r,t[r]);return new e(n)};const o=e;function i(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let o=t.child(r),s=e.child(r);if(o!=s){if(!o.sameMarkup(s))return n;if(o.isText&&o.text!=s.text){for(let t=0;o.text[t]==s.text[t];t++)n++;return n}if(o.content.size||s.content.size){let t=i(o.content,s.content,n+1);if(null!=t)return t}n+=o.nodeSize}else n+=o.nodeSize}}function s(t,e,n,r){for(let o=t.childCount,i=e.childCount;;){if(0==o||0==i)return o==i?null:{a:n,b:r};let a=t.child(--o),l=e.child(--i),u=a.nodeSize;if(a!=l){if(!a.sameMarkup(l))return{a:n,b:r};if(a.isText&&a.text!=l.text){let t=0,e=Math.min(a.text.length,l.text.length);for(;t<e&&a.text[a.text.length-t-1]==l.text[l.text.length-t-1];)t++,n--,r--;return{a:n,b:r}}if(a.content.size||l.content.size){let t=s(a.content,l.content,n-1,r-1);if(t)return t}n-=u,r-=u}else n-=u,r-=u}}class a{constructor(t,e){if(this.content=t,this.size=e||0,null==e)for(let e=0;e<t.length;e++)this.size+=t[e].nodeSize}nodesBetween(t,e,n,r=0,o){for(let i=0,s=0;s<e;i++){let a=this.content[i],l=s+a.nodeSize;if(l>t&&!1!==n(a,r+s,o||null,i)&&a.content.size){let o=s+1;a.nodesBetween(Math.max(0,t-o),Math.min(a.content.size,e-o),n,r+o)}s=l}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,e,n,r){let o="",i=!0;return this.nodesBetween(t,e,((s,a)=>{s.isText?(o+=s.text.slice(Math.max(t,a)-a,e-a),i=!n):s.isLeaf?(r?o+="function"==typeof r?r(s):r:s.type.spec.leafText&&(o+=s.type.spec.leafText(s)),i=!n):!i&&s.isBlock&&(o+=n,i=!0)}),0),o}append(t){if(!t.size)return this;if(!this.size)return t;let e=this.lastChild,n=t.firstChild,r=this.content.slice(),o=0;for(e.isText&&e.sameMarkup(n)&&(r[r.length-1]=e.withText(e.text+n.text),o=1);o<t.content.length;o++)r.push(t.content[o]);return new a(r,this.size+t.size)}cut(t,e=this.size){if(0==t&&e==this.size)return this;let n=[],r=0;if(e>t)for(let o=0,i=0;i<e;o++){let s=this.content[o],a=i+s.nodeSize;a>t&&((i<t||a>e)&&(s=s.isText?s.cut(Math.max(0,t-i),Math.min(s.text.length,e-i)):s.cut(Math.max(0,t-i-1),Math.min(s.content.size,e-i-1))),n.push(s),r+=s.nodeSize),i=a}return new a(n,r)}cutByIndex(t,e){return t==e?a.empty:0==t&&e==this.content.length?this:new a(this.content.slice(t,e))}replaceChild(t,e){let n=this.content[t];if(n==e)return this;let r=this.content.slice(),o=this.size+e.nodeSize-n.nodeSize;return r[t]=e,new a(r,o)}addToStart(t){return new a([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new a(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let e=0;e<this.content.length;e++)if(!this.content[e].eq(t.content[e]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let e=this.content[t];if(!e)throw new RangeError("Index "+t+" out of range for "+this);return e}maybeChild(t){return this.content[t]||null}forEach(t){for(let e=0,n=0;e<this.content.length;e++){let r=this.content[e];t(r,n,e),n+=r.nodeSize}}findDiffStart(t,e=0){return i(this,t,e)}findDiffEnd(t,e=this.size,n=t.size){return s(this,t,e,n)}findIndex(t,e=-1){if(0==t)return u(0,t);if(t==this.size)return u(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,r=0;;n++){let o=r+this.child(n).nodeSize;if(o>=t)return o==t||e>0?u(n+1,o):u(n,r);r=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map((t=>t.toJSON())):null}static fromJSON(t,e){if(!e)return a.empty;if(!Array.isArray(e))throw new RangeError("Invalid input for Fragment.fromJSON");return new a(e.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return a.empty;let e,n=0;for(let r=0;r<t.length;r++){let o=t[r];n+=o.nodeSize,r&&o.isText&&t[r-1].sameMarkup(o)?(e||(e=t.slice(0,r)),e[e.length-1]=o.withText(e[e.length-1].text+o.text)):e&&e.push(o)}return new a(e||t,n)}static from(t){if(!t)return a.empty;if(t instanceof a)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new a([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}a.empty=new a([],0);const l={index:0,offset:0};function u(t,e){return l.index=t,l.offset=e,l}function c(t,e){if(t===e)return!0;if(!t||"object"!=typeof t||!e||"object"!=typeof e)return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!c(t[n],e[n]))return!1}else{for(let n in t)if(!(n in e)||!c(t[n],e[n]))return!1;for(let n in e)if(!(n in t))return!1}return!0}class d{constructor(t,e){this.type=t,this.attrs=e}addToSet(t){let e,n=!1;for(let r=0;r<t.length;r++){let o=t[r];if(this.eq(o))return t;if(this.type.excludes(o.type))e||(e=t.slice(0,r));else{if(o.type.excludes(this.type))return t;!n&&o.type.rank>this.type.rank&&(e||(e=t.slice(0,r)),e.push(this),n=!0),e&&e.push(o)}}return e||(e=t.slice()),n||e.push(this),e}removeFromSet(t){for(let e=0;e<t.length;e++)if(this.eq(t[e]))return t.slice(0,e).concat(t.slice(e+1));return t}isInSet(t){for(let e=0;e<t.length;e++)if(this.eq(t[e]))return!0;return!1}eq(t){return this==t||this.type==t.type&&c(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let e in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,e){if(!e)throw new RangeError("Invalid input for Mark.fromJSON");let n=t.marks[e.type];if(!n)throw new RangeError(`There is no mark type ${e.type} in this schema`);return n.create(e.attrs)}static sameSet(t,e){if(t==e)return!0;if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].eq(e[n]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&0==t.length)return d.none;if(t instanceof d)return[t];let e=t.slice();return e.sort(((t,e)=>t.type.rank-e.type.rank)),e}}d.none=[];class p extends Error{}class h{constructor(t,e,n){this.content=t,this.openStart=e,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,e){let n=m(this.content,t+this.openStart,e);return n&&new h(n,this.openStart,this.openEnd)}removeBetween(t,e){return new h(f(this.content,t+this.openStart,e+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,e){if(!e)return h.empty;let n=e.openStart||0,r=e.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new h(a.fromJSON(t,e.content),n,r)}static maxOpen(t,e=!0){let n=0,r=0;for(let r=t.firstChild;r&&!r.isLeaf&&(e||!r.type.spec.isolating);r=r.firstChild)n++;for(let n=t.lastChild;n&&!n.isLeaf&&(e||!n.type.spec.isolating);n=n.lastChild)r++;return new h(t,n,r)}}function f(t,e,n){let{index:r,offset:o}=t.findIndex(e),i=t.maybeChild(r),{index:s,offset:a}=t.findIndex(n);if(o==e||i.isText){if(a!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,i.copy(f(i.content,e-o-1,n-o-1)))}function m(t,e,n,r){let{index:o,offset:i}=t.findIndex(e),s=t.maybeChild(o);if(i==e||s.isText)return r&&!r.canReplace(o,o,n)?null:t.cut(0,e).append(n).append(t.cut(e));let a=m(s.content,e-i-1,n);return a&&t.replaceChild(o,s.copy(a))}function g(t,e,n){if(n.openStart>t.depth)throw new p("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new p("Inconsistent open depths");return v(t,e,n,0)}function v(t,e,n,r){let o=t.index(r),i=t.node(r);if(o==e.index(r)&&r<t.depth-n.openStart){let s=v(t,e,n,r+1);return i.copy(i.content.replaceChild(o,s))}if(n.content.size){if(n.openStart||n.openEnd||t.depth!=r||e.depth!=r){let{start:o,end:s}=function(t,e){let n=e.depth-t.openStart,r=e.node(n).copy(t.content);for(let t=n-1;t>=0;t--)r=e.node(t).copy(a.from(r));return{start:r.resolveNoCache(t.openStart+n),end:r.resolveNoCache(r.content.size-t.openEnd-n)}}(n,t);return D(i,k(t,o,s,e,r))}{let r=t.parent,o=r.content;return D(r,o.cut(0,t.parentOffset).append(n.content).append(o.cut(e.parentOffset)))}}return D(i,C(t,e,r))}function y(t,e){if(!e.type.compatibleContent(t.type))throw new p("Cannot join "+e.type.name+" onto "+t.type.name)}function b(t,e,n){let r=t.node(n);return y(r,e.node(n)),r}function w(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function x(t,e,n,r){let o=(e||t).node(n),i=0,s=e?e.index(n):o.childCount;t&&(i=t.index(n),t.depth>n?i++:t.textOffset&&(w(t.nodeAfter,r),i++));for(let t=i;t<s;t++)w(o.child(t),r);e&&e.depth==n&&e.textOffset&&w(e.nodeBefore,r)}function D(t,e){if(!t.type.validContent(e))throw new p("Invalid content for node "+t.type.name);return t.copy(e)}function k(t,e,n,r,o){let i=t.depth>o&&b(t,e,o+1),s=r.depth>o&&b(n,r,o+1),l=[];return x(null,t,o,l),i&&s&&e.index(o)==n.index(o)?(y(i,s),w(D(i,k(t,e,n,r,o+1)),l)):(i&&w(D(i,C(t,e,o+1)),l),x(e,n,o,l),s&&w(D(s,C(n,r,o+1)),l)),x(r,null,o,l),new a(l)}function C(t,e,n){let r=[];return x(null,t,n,r),t.depth>n&&w(D(b(t,e,n+1),C(t,e,n+1)),r),x(e,null,n,r),new a(r)}h.empty=new h(a.empty,0,0);class E{constructor(t,e,n){this.pos=t,this.path=e,this.parentOffset=n,this.depth=e.length/3-1}resolveDepth(t){return null==t?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[3*this.resolveDepth(t)]}index(t){return this.path[3*this.resolveDepth(t)+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t!=this.depth||this.textOffset?1:0)}start(t){return 0==(t=this.resolveDepth(t))?0:this.path[3*t-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]}after(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]+this.path[3*t].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,e=this.index(this.depth);if(e==t.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=t.child(e);return n?t.child(e).cut(n):r}get nodeBefore(){let t=this.index(this.depth),e=this.pos-this.path[this.path.length-1];return e?this.parent.child(t).cut(0,e):0==t?null:this.parent.child(t-1)}posAtIndex(t,e){e=this.resolveDepth(e);let n=this.path[3*e],r=0==e?0:this.path[3*e-1]+1;for(let e=0;e<t;e++)r+=n.child(e).nodeSize;return r}marks(){let t=this.parent,e=this.index();if(0==t.content.size)return d.none;if(this.textOffset)return t.child(e).marks;let n=t.maybeChild(e-1),r=t.maybeChild(e);if(!n){let t=n;n=r,r=t}let o=n.marks;for(var i=0;i<o.length;i++)!1!==o[i].type.spec.inclusive||r&&o[i].isInSet(r.marks)||(o=o[i--].removeFromSet(o));return o}marksAcross(t){let e=this.parent.maybeChild(this.index());if(!e||!e.isInline)return null;let n=e.marks,r=t.parent.maybeChild(t.index());for(var 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}sharedDepth(t){for(let e=this.depth;e>0;e--)if(this.start(e)<=t&&this.end(e)>=t)return e;return 0}blockRange(t=this,e){if(t.pos<this.pos)return t.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);n>=0;n--)if(t.pos<=this.end(n)&&(!e||e(this.node(n))))return new T(this,t,n);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let e=1;e<=this.depth;e++)t+=(t?"/":"")+this.node(e).type.name+"_"+this.index(e-1);return t+":"+this.parentOffset}static resolve(t,e){if(!(e>=0&&e<=t.content.size))throw new RangeError("Position "+e+" out of range");let n=[],r=0,o=e;for(let e=t;;){let{index:t,offset:i}=e.content.findIndex(o),s=o-i;if(n.push(e,t,r+i),!s)break;if(e=e.child(t),e.isText)break;o=s-1,r+=i+1}return new E(e,n,o)}static resolveCached(t,e){for(let n=0;n<S.length;n++){let r=S[n];if(r.pos==e&&r.doc==t)return r}let n=S[O]=E.resolve(t,e);return O=(O+1)%A,n}}let S=[],O=0,A=12;class T{constructor(t,e,n){this.$from=t,this.$to=e,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const M=Object.create(null);class F{constructor(t,e,n,r=d.none){this.type=t,this.attrs=e,this.marks=r,this.content=n||a.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,e,n,r=0){this.content.nodesBetween(t,e,n,r,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,e,n,r){return this.content.textBetween(t,e,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,e,n){return this.type==t&&c(this.attrs,e||t.defaultAttrs||M)&&d.sameSet(this.marks,n||d.none)}copy(t=null){return t==this.content?this:new F(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new F(this.type,this.attrs,this.content,t)}cut(t,e=this.content.size){return 0==t&&e==this.content.size?this:this.copy(this.content.cut(t,e))}slice(t,e=this.content.size,n=!1){if(t==e)return h.empty;let r=this.resolve(t),o=this.resolve(e),i=n?0:r.sharedDepth(e),s=r.start(i),a=r.node(i).content.cut(r.pos-s,o.pos-s);return new h(a,r.depth-i,o.depth-i)}replace(t,e,n){return g(this.resolve(t),this.resolve(e),n)}nodeAt(t){for(let e=this;;){let{index:n,offset:r}=e.content.findIndex(t);if(e=e.maybeChild(n),!e)return null;if(r==t||e.isText)return e;t-=r+1}}childAfter(t){let{index:e,offset:n}=this.content.findIndex(t);return{node:this.content.maybeChild(e),index:e,offset:n}}childBefore(t){if(0==t)return{node:null,index:0,offset:0};let{index:e,offset:n}=this.content.findIndex(t);if(n<t)return{node:this.content.child(e),index:e,offset:n};let r=this.content.child(e-1);return{node:r,index:e-1,offset:n-r.nodeSize}}resolve(t){return E.resolveCached(this,t)}resolveNoCache(t){return E.resolve(this,t)}rangeHasMark(t,e,n){let r=!1;return e>t&&this.nodesBetween(t,e,(t=>(n.isInSet(t.marks)&&(r=!0),!r))),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),B(this.marks,t)}contentMatchAt(t){let e=this.type.contentMatch.matchFragment(this.content,0,t);if(!e)throw new Error("Called contentMatchAt on a node with invalid content");return e}canReplace(t,e,n=a.empty,r=0,o=n.childCount){let i=this.contentMatchAt(t).matchFragment(n,r,o),s=i&&i.matchFragment(this.content,e);if(!s||!s.validEnd)return!1;for(let t=r;t<o;t++)if(!this.type.allowsMarks(n.child(t).marks))return!1;return!0}canReplaceWith(t,e,n,r){if(r&&!this.type.allowsMarks(r))return!1;let o=this.contentMatchAt(t).matchType(n),i=o&&o.matchFragment(this.content,e);return!!i&&i.validEnd}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){if(!this.type.validContent(this.content))throw new RangeError(`Invalid content for node ${this.type.name}: ${this.content.toString().slice(0,50)}`);let t=d.none;for(let e=0;e<this.marks.length;e++)t=this.marks[e].addToSet(t);if(!d.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map((t=>t.type.name))}`);this.content.forEach((t=>t.check()))}toJSON(){let t={type:this.type.name};for(let e in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map((t=>t.toJSON()))),t}static fromJSON(t,e){if(!e)throw new RangeError("Invalid input for Node.fromJSON");let n=null;if(e.marks){if(!Array.isArray(e.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=e.marks.map(t.markFromJSON)}if("text"==e.type){if("string"!=typeof e.text)throw new RangeError("Invalid text node in JSON");return t.text(e.text,n)}let r=a.fromJSON(t,e.content);return t.nodeType(e.type).create(e.attrs,r,n)}}F.prototype.text=void 0;class N extends F{constructor(t,e,n,r){if(super(t,e,null,r),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):B(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,e){return this.text.slice(t,e)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new N(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new N(this.type,this.attrs,t,this.marks)}cut(t=0,e=this.text.length){return 0==t&&e==this.text.length?this:this.withText(this.text.slice(t,e))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function B(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class _{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,e){let n=new R(t,e);if(null==n.next)return _.empty;let r=z(n);n.next&&n.err("Unexpected trailing text");let o=function(t){let e=Object.create(null);return function n(r){let o=[];r.forEach((e=>{t[e].forEach((({term:e,to:n})=>{if(!e)return;let r;for(let t=0;t<o.length;t++)o[t][0]==e&&(r=o[t][1]);H(t,n).forEach((t=>{r||o.push([e,r=[]]),-1==r.indexOf(t)&&r.push(t)}))}))}));let i=e[r.join(",")]=new _(r.indexOf(t.length-1)>-1);for(let t=0;t<o.length;t++){let r=o[t][1].sort(V);i.next.push({type:o[t][0],next:e[r.join(",")]||n(r)})}return i}(H(t,0))}(function(t){let e=[[]];return o(function t(e,i){if("choice"==e.type)return e.exprs.reduce(((e,n)=>e.concat(t(n,i))),[]);if("seq"!=e.type){if("star"==e.type){let s=n();return r(i,s),o(t(e.expr,s),s),[r(s)]}if("plus"==e.type){let s=n();return o(t(e.expr,i),s),o(t(e.expr,s),s),[r(s)]}if("opt"==e.type)return[r(i)].concat(t(e.expr,i));if("range"==e.type){let s=i;for(let r=0;r<e.min;r++){let r=n();o(t(e.expr,s),r),s=r}if(-1==e.max)o(t(e.expr,s),s);else for(let i=e.min;i<e.max;i++){let i=n();r(s,i),o(t(e.expr,s),i),s=i}return[r(s)]}if("name"==e.type)return[r(i,void 0,e.value)];throw new Error("Unknown expr type")}for(let r=0;;r++){let s=t(e.exprs[r],i);if(r==e.exprs.length-1)return s;o(s,i=n())}}(t,0),n()),e;function n(){return e.push([])-1}function r(t,n,r){let o={term:r,to:n};return e[t].push(o),o}function o(t,e){t.forEach((t=>t.to=e))}}(r));return function(t,e){for(let n=0,r=[t];n<r.length;n++){let t=r[n],o=!t.validEnd,i=[];for(let e=0;e<t.next.length;e++){let{type:n,next:s}=t.next[e];i.push(n.name),!o||n.isText||n.hasRequiredAttrs()||(o=!1),-1==r.indexOf(s)&&r.push(s)}o&&e.err("Only non-generatable nodes ("+i.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(o,n),o}matchType(t){for(let e=0;e<this.next.length;e++)if(this.next[e].type==t)return this.next[e].next;return null}matchFragment(t,e=0,n=t.childCount){let r=this;for(let o=e;r&&o<n;o++)r=r.matchType(t.child(o).type);return r}get inlineContent(){return this.next.length&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:e}=this.next[t];if(!e.isText&&!e.hasRequiredAttrs())return e}return null}compatible(t){for(let e=0;e<this.next.length;e++)for(let n=0;n<t.next.length;n++)if(this.next[e].type==t.next[n].type)return!0;return!1}fillBefore(t,e=!1,n=0){let r=[this];return function o(i,s){let l=i.matchFragment(t,n);if(l&&(!e||l.validEnd))return a.from(s.map((t=>t.createAndFill())));for(let t=0;t<i.next.length;t++){let{type:e,next:n}=i.next[t];if(!e.isText&&!e.hasRequiredAttrs()&&-1==r.indexOf(n)){r.push(n);let t=o(n,s.concat(e));if(t)return t}}return null}(this,[])}findWrapping(t){for(let e=0;e<this.wrapCache.length;e+=2)if(this.wrapCache[e]==t)return this.wrapCache[e+1];let e=this.computeWrapping(t);return this.wrapCache.push(t,e),e}computeWrapping(t){let e=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),o=r.match;if(o.matchType(t)){let t=[];for(let e=r;e.type;e=e.via)t.push(e.type);return t.reverse()}for(let t=0;t<o.next.length;t++){let{type:i,next:s}=o.next[t];i.isLeaf||i.hasRequiredAttrs()||i.name in e||r.type&&!s.validEnd||(n.push({match:i.contentMatch,type:i,via:r}),e[i.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];return function e(n){t.push(n);for(let r=0;r<n.next.length;r++)-1==t.indexOf(n.next[r].next)&&e(n.next[r].next)}(this),t.map(((e,n)=>{let r=n+(e.validEnd?"*":" ")+" ";for(let n=0;n<e.next.length;n++)r+=(n?", ":"")+e.next[n].type.name+"->"+t.indexOf(e.next[n].next);return r})).join("\n")}}_.empty=new _(!0);class R{constructor(t,e){this.string=t,this.nodeTypes=e,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function z(t){let e=[];do{e.push(L(t))}while(t.eat("|"));return 1==e.length?e[0]:{type:"choice",exprs:e}}function L(t){let e=[];do{e.push(I(t))}while(t.next&&")"!=t.next&&"|"!=t.next);return 1==e.length?e[0]:{type:"seq",exprs:e}}function I(t){let e=function(t){if(t.eat("(")){let e=z(t);return t.eat(")")||t.err("Missing closing paren"),e}if(!/\W/.test(t.next)){let e=function(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let o=[];for(let t in n){let r=n[t];r.groups.indexOf(e)>-1&&o.push(r)}return 0==o.length&&t.err("No node type or group '"+e+"' found"),o}(t,t.next).map((e=>(null==t.inline?t.inline=e.isInline:t.inline!=e.isInline&&t.err("Mixing inline and block content"),{type:"name",value:e})));return t.pos++,1==e.length?e[0]:{type:"choice",exprs:e}}t.err("Unexpected token '"+t.next+"'")}(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else{if(!t.eat("{"))break;e=j(t,e)}return e}function P(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function j(t,e){let n=P(t),r=n;return t.eat(",")&&(r="}"!=t.next?P(t):-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function V(t,e){return e-t}function H(t,e){let n=[];return function e(r){let o=t[r];if(1==o.length&&!o[0].term)return e(o[0].to);n.push(r);for(let t=0;t<o.length;t++){let{term:r,to:i}=o[t];r||-1!=n.indexOf(i)||e(i)}}(e),n.sort(V)}function $(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function W(t,e){let n=Object.create(null);for(let r in t){let o=e&&e[r];if(void 0===o){let e=t[r];if(!e.hasDefault)throw new RangeError("No value supplied for attribute "+r);o=e.default}n[r]=o}return n}function q(t){let e=Object.create(null);if(t)for(let n in t)e[n]=new K(t[n]);return e}class U{constructor(t,e,n){this.name=t,this.schema=e,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=q(n.attrs),this.defaultAttrs=$(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==t),this.isText="text"==t}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==_.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:W(this.attrs,t)}create(t=null,e,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new F(this,this.computeAttrs(t),a.from(e),d.setFrom(n))}createChecked(t=null,e,n){if(e=a.from(e),!this.validContent(e))throw new RangeError("Invalid content for node "+this.name);return new F(this,this.computeAttrs(t),e,d.setFrom(n))}createAndFill(t=null,e,n){if(t=this.computeAttrs(t),(e=a.from(e)).size){let t=this.contentMatch.fillBefore(e);if(!t)return null;e=t.append(e)}let r=this.contentMatch.matchFragment(e),o=r&&r.fillBefore(a.empty,!0);return o?new F(this,t,e.append(o),d.setFrom(n)):null}validContent(t){let e=this.contentMatch.matchFragment(t);if(!e||!e.validEnd)return!1;for(let e=0;e<t.childCount;e++)if(!this.allowsMarks(t.child(e).marks))return!1;return!0}allowsMarkType(t){return null==this.markSet||this.markSet.indexOf(t)>-1}allowsMarks(t){if(null==this.markSet)return!0;for(let e=0;e<t.length;e++)if(!this.allowsMarkType(t[e].type))return!1;return!0}allowedMarks(t){if(null==this.markSet)return t;let e;for(let n=0;n<t.length;n++)this.allowsMarkType(t[n].type)?e&&e.push(t[n]):e||(e=t.slice(0,n));return e?e.length?e:d.none:t}static compile(t,e){let n=Object.create(null);t.forEach(((t,r)=>n[t]=new U(t,e,r)));let r=e.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(let t in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}}class K{constructor(t){this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default}get isRequired(){return!this.hasDefault}}class G{constructor(t,e,n,r){this.name=t,this.rank=e,this.schema=n,this.spec=r,this.attrs=q(r.attrs),this.excluded=null;let o=$(this.attrs);this.instance=o?new d(this,o):null}create(t=null){return!t&&this.instance?this.instance:new d(this,W(this.attrs,t))}static compile(t,e){let n=Object.create(null),r=0;return t.forEach(((t,o)=>n[t]=new G(t,r++,e,o))),n}removeFromSet(t){for(var e=0;e<t.length;e++)t[e].type==this&&(t=t.slice(0,e).concat(t.slice(e+1)),e--);return t}isInSet(t){for(let e=0;e<t.length;e++)if(t[e].type==this)return t[e]}excludes(t){return this.excluded.indexOf(t)>-1}}class J{constructor(t){this.cached=Object.create(null),this.spec={nodes:o.from(t.nodes),marks:o.from(t.marks||{}),topNode:t.topNode},this.nodes=U.compile(this.spec.nodes,this),this.marks=G.compile(this.spec.marks,this);let e=Object.create(null);for(let t in this.nodes){if(t in this.marks)throw new RangeError(t+" can not be both a node and a mark");let n=this.nodes[t],r=n.spec.content||"",o=n.spec.marks;n.contentMatch=e[r]||(e[r]=_.parse(r,this.nodes)),n.inlineContent=n.contentMatch.inlineContent,n.markSet="_"==o?null:o?Z(this,o.split(" ")):""!=o&&n.inlineContent?null:[]}for(let t in this.marks){let e=this.marks[t],n=e.spec.excludes;e.excluded=null==n?[e]:""==n?[]:Z(this,n.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,e=null,n,r){if("string"==typeof t)t=this.nodeType(t);else{if(!(t instanceof U))throw new RangeError("Invalid node type: "+t);if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}return t.createChecked(e,n,r)}text(t,e){let n=this.nodes.text;return new N(n,n.defaultAttrs,t,d.setFrom(e))}mark(t,e){return"string"==typeof t&&(t=this.marks[t]),t.create(e)}nodeFromJSON(t){return F.fromJSON(this,t)}markFromJSON(t){return d.fromJSON(this,t)}nodeType(t){let e=this.nodes[t];if(!e)throw new RangeError("Unknown node type: "+t);return e}}function Z(t,e){let n=[];for(let r=0;r<e.length;r++){let o=e[r],i=t.marks[o],s=i;if(i)n.push(i);else for(let e in t.marks){let r=t.marks[e];("_"==o||r.spec.group&&r.spec.group.split(" ").indexOf(o)>-1)&&n.push(s=r)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}class Y{constructor(t,e){this.schema=t,this.rules=e,this.tags=[],this.styles=[],e.forEach((t=>{t.tag?this.tags.push(t):t.style&&this.styles.push(t)})),this.normalizeLists=!this.tags.some((e=>{if(!/^(ul|ol)\b/.test(e.tag)||!e.node)return!1;let n=t.nodes[e.node];return n.contentMatch.matchType(n)}))}parse(t,e={}){let n=new rt(this,e,!1);return n.addAll(t,e.from,e.to),n.finish()}parseSlice(t,e={}){let n=new rt(this,e,!0);return n.addAll(t,e.from,e.to),h.maxOpen(n.finish())}matchTag(t,e,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let n=this.tags[r];if(ot(t,n.tag)&&(void 0===n.namespace||t.namespaceURI==n.namespace)&&(!n.context||e.matchesContext(n.context))){if(n.getAttrs){let e=n.getAttrs(t);if(!1===e)continue;n.attrs=e||void 0}return n}}}matchStyle(t,e,n,r){for(let o=r?this.styles.indexOf(r)+1:0;o<this.styles.length;o++){let r=this.styles[o],i=r.style;if(!(0!=i.indexOf(t)||r.context&&!n.matchesContext(r.context)||i.length>t.length&&(61!=i.charCodeAt(t.length)||i.slice(t.length+1)!=e))){if(r.getAttrs){let t=r.getAttrs(e);if(!1===t)continue;r.attrs=t||void 0}return r}}}static schemaRules(t){let e=[];function n(t){let n=null==t.priority?50:t.priority,r=0;for(;r<e.length;r++){let t=e[r];if((null==t.priority?50:t.priority)<n)break}e.splice(r,0,t)}for(let e in t.marks){let r=t.marks[e].spec.parseDOM;r&&r.forEach((t=>{n(t=it(t)),t.mark=e}))}for(let e in t.nodes){let r=t.nodes[e].spec.parseDOM;r&&r.forEach((t=>{n(t=it(t)),t.node=e}))}return e}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new Y(t,Y.schemaRules(t)))}}const X={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},Q={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},tt={ol:!0,ul:!0};function et(t,e,n){return null!=e?(e?1:0)|("full"===e?2:0):t&&"pre"==t.whitespace?3:-5&n}class nt{constructor(t,e,n,r,o,i,s){this.type=t,this.attrs=e,this.marks=n,this.pendingMarks=r,this.solid=o,this.options=s,this.content=[],this.activeMarks=d.none,this.stashMarks=[],this.match=i||(4&s?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let e=this.type.contentMatch.fillBefore(a.from(t));if(!e){let e,n=this.type.contentMatch;return(e=n.findWrapping(t.type))?(this.match=n,e):null}this.match=this.type.contentMatch.matchFragment(e)}return this.match.findWrapping(t.type)}finish(t){if(!(1&this.options)){let t,e=this.content[this.content.length-1];if(e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))){let n=e;e.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))}}let e=a.from(this.content);return!t&&this.match&&(e=e.append(this.match.fillBefore(a.empty,!0))),this.type?this.type.create(this.attrs,e,this.marks):e}popFromStashMark(t){for(let e=this.stashMarks.length-1;e>=0;e--)if(t.eq(this.stashMarks[e]))return this.stashMarks.splice(e,1)[0]}applyPending(t){for(let e=0,n=this.pendingMarks;e<n.length;e++){let r=n[e];(this.type?this.type.allowsMarkType(r.type):st(r.type,t))&&!r.isInSet(this.activeMarks)&&(this.activeMarks=r.addToSet(this.activeMarks),this.pendingMarks=r.removeFromSet(this.pendingMarks))}}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!X.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class rt{constructor(t,e,n){this.parser=t,this.options=e,this.isOpen=n,this.open=0;let r,o=e.topNode,i=et(null,e.preserveWhitespace,0)|(n?4:0);r=o?new nt(o.type,o.attrs,d.none,d.none,!0,e.topMatch||o.type.contentMatch,i):new nt(n?null:t.schema.topNodeType,null,d.none,d.none,!0,null,i),this.nodes=[r],this.find=e.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t){if(3==t.nodeType)this.addTextNode(t);else if(1==t.nodeType){let e=t.getAttribute("style"),n=e?this.readStyles(function(t){let e,n=/\s*([\w-]+)\s*:\s*([^;]+)/g,r=[];for(;e=n.exec(t);)r.push(e[1],e[2].trim());return r}(e)):null,r=this.top;if(null!=n)for(let t=0;t<n.length;t++)this.addPendingMark(n[t]);if(this.addElement(t),null!=n)for(let t=0;t<n.length;t++)this.removePendingMark(n[t],r)}}addTextNode(t){let e=t.nodeValue,n=this.top;if(2&n.options||n.inlineContext(t)||/[^ \t\r\n\u000c]/.test(e)){if(1&n.options)e=2&n.options?e.replace(/\r\n?/g,"\n"):e.replace(/\r?\n|\r/g," ");else if(e=e.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(e)&&this.open==this.nodes.length-1){let r=n.content[n.content.length-1],o=t.previousSibling;(!r||o&&"BR"==o.nodeName||r.isText&&/[ \t\r\n\u000c]$/.test(r.text))&&(e=e.slice(1))}e&&this.insertNode(this.parser.schema.text(e)),this.findInText(t)}else this.findInside(t)}addElement(t,e){let n,r=t.nodeName.toLowerCase();tt.hasOwnProperty(r)&&this.parser.normalizeLists&&function(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let t=1==e.nodeType?e.nodeName.toLowerCase():null;t&&tt.hasOwnProperty(t)&&n?(n.appendChild(e),e=n):"li"==t?n=e:t&&(n=null)}}(t);let o=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(n=this.parser.matchTag(t,this,e));if(o?o.ignore:Q.hasOwnProperty(r))this.findInside(t),this.ignoreFallback(t);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(t=o.skip);let e,n=this.top,i=this.needsBlock;if(X.hasOwnProperty(r))e=!0,n.type||(this.needsBlock=!0);else if(!t.firstChild)return void this.leafFallback(t);this.addAll(t),e&&this.sync(n),this.needsBlock=i}else this.addElementByRule(t,o,!1===o.consuming?n:void 0)}leafFallback(t){"BR"==t.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode("\n"))}ignoreFallback(t){"BR"!=t.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))}readStyles(t){let e=d.none;t:for(let n=0;n<t.length;n+=2)for(let r;;){let o=this.parser.matchStyle(t[n],t[n+1],this,r);if(!o)continue t;if(o.ignore)return null;if(e=this.parser.schema.marks[o.mark].create(o.attrs).addToSet(e),!1!==o.consuming)break;r=o}return e}addElementByRule(t,e,n){let r,o,i;e.node?(o=this.parser.schema.nodes[e.node],o.isLeaf?this.insertNode(o.create(e.attrs))||this.leafFallback(t):r=this.enter(o,e.attrs||null,e.preserveWhitespace)):(i=this.parser.schema.marks[e.mark].create(e.attrs),this.addPendingMark(i));let s=this.top;if(o&&o.isLeaf)this.findInside(t);else if(n)this.addElement(t,n);else if(e.getContent)this.findInside(t),e.getContent(t,this.parser.schema).forEach((t=>this.insertNode(t)));else{let n=t;"string"==typeof e.contentElement?n=t.querySelector(e.contentElement):"function"==typeof e.contentElement?n=e.contentElement(t):e.contentElement&&(n=e.contentElement),this.findAround(t,n,!0),this.addAll(n)}r&&this.sync(s)&&this.open--,i&&this.removePendingMark(i,s)}addAll(t,e,n){let r=e||0;for(let o=e?t.childNodes[e]:t.firstChild,i=null==n?null:t.childNodes[n];o!=i;o=o.nextSibling,++r)this.findAtPoint(t,r),this.addDOM(o);this.findAtPoint(t,r)}findPlace(t){let e,n;for(let r=this.open;r>=0;r--){let o=this.nodes[r],i=o.findWrapping(t);if(i&&(!e||e.length>i.length)&&(e=i,n=o,!i.length))break;if(o.solid)break}if(!e)return!1;this.sync(n);for(let t=0;t<e.length;t++)this.enterInner(e[t],null,!1);return!0}insertNode(t){if(t.isInline&&this.needsBlock&&!this.top.type){let t=this.textblockFromContext();t&&this.enterInner(t)}if(this.findPlace(t)){this.closeExtra();let e=this.top;e.applyPending(t.type),e.match&&(e.match=e.match.matchType(t.type));let n=e.activeMarks;for(let r=0;r<t.marks.length;r++)e.type&&!e.type.allowsMarkType(t.marks[r].type)||(n=t.marks[r].addToSet(n));return e.content.push(t.mark(n)),!0}return!1}enter(t,e,n){let r=this.findPlace(t.create(e));return r&&this.enterInner(t,e,!0,n),r}enterInner(t,e=null,n=!1,r){this.closeExtra();let o=this.top;o.applyPending(t),o.match=o.match&&o.match.matchType(t);let i=et(t,r,o.options);4&o.options&&0==o.content.length&&(i|=4),this.nodes.push(new nt(t,e,o.activeMarks,o.pendingMarks,n,null,i)),this.open++}closeExtra(t=!1){let e=this.nodes.length-1;if(e>this.open){for(;e>this.open;e--)this.nodes[e-1].content.push(this.nodes[e].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(t){for(let e=this.open;e>=0;e--)if(this.nodes[e]==t)return this.open=e,!0;return!1}get currentPos(){this.closeExtra();let t=0;for(let e=this.open;e>=0;e--){let n=this.nodes[e].content;for(let e=n.length-1;e>=0;e--)t+=n[e].nodeSize;e&&t++}return t}findAtPoint(t,e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&this.find[n].offset==e&&(this.find[n].pos=this.currentPos)}findInside(t){if(this.find)for(let e=0;e<this.find.length;e++)null==this.find[e].pos&&1==t.nodeType&&t.contains(this.find[e].node)&&(this.find[e].pos=this.currentPos)}findAround(t,e,n){if(t!=e&&this.find)for(let r=0;r<this.find.length;r++)null==this.find[r].pos&&1==t.nodeType&&t.contains(this.find[r].node)&&e.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}findInText(t){if(this.find)for(let e=0;e<this.find.length;e++)this.find[e].node==t&&(this.find[e].pos=this.currentPos-(t.nodeValue.length-this.find[e].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let e=t.split("/"),n=this.options.context,r=!(this.isOpen||n&&n.parent.type!=this.nodes[0].type),o=-(n?n.depth+1:0)+(r?0:1),i=(t,s)=>{for(;t>=0;t--){let a=e[t];if(""==a){if(t==e.length-1||0==t)continue;for(;s>=o;s--)if(i(t-1,s))return!0;return!1}{let t=s>0||0==s&&r?this.nodes[s].type:n&&s>=o?n.node(s-o).type:null;if(!t||t.name!=a&&-1==t.groups.indexOf(a))return!1;s--}}return!0};return i(e.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let e=t.depth;e>=0;e--){let n=t.node(e).contentMatchAt(t.indexAfter(e)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let t in this.parser.schema.nodes){let e=this.parser.schema.nodes[t];if(e.isTextblock&&e.defaultAttrs)return e}}addPendingMark(t){let e=function(t,e){for(let n=0;n<e.length;n++)if(t.eq(e[n]))return e[n]}(t,this.top.pendingMarks);e&&this.top.stashMarks.push(e),this.top.pendingMarks=t.addToSet(this.top.pendingMarks)}removePendingMark(t,e){for(let n=this.open;n>=0;n--){let r=this.nodes[n];if(r.pendingMarks.lastIndexOf(t)>-1)r.pendingMarks=t.removeFromSet(r.pendingMarks);else{r.activeMarks=t.removeFromSet(r.activeMarks);let e=r.popFromStashMark(t);e&&r.type&&r.type.allowsMarkType(e.type)&&(r.activeMarks=e.addToSet(r.activeMarks))}if(r==e)break}}}function ot(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function it(t){let e={};for(let n in t)e[n]=t[n];return e}function st(t,e){let n=e.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(t))continue;let i=[],s=t=>{i.push(t);for(let n=0;n<t.edgeCount;n++){let{type:r,next:o}=t.edge(n);if(r==e)return!0;if(i.indexOf(o)<0&&s(o))return!0}};if(s(o.contentMatch))return!0}}class at{constructor(t,e){this.nodes=t,this.marks=e}serializeFragment(t,e={},n){n||(n=ut(e).createDocumentFragment());let r=n,o=[];return t.forEach((t=>{if(o.length||t.marks.length){let n=0,i=0;for(;n<o.length&&i<t.marks.length;){let e=t.marks[i];if(this.marks[e.type.name]){if(!e.eq(o[n][0])||!1===e.type.spec.spanning)break;n++,i++}else i++}for(;n<o.length;)r=o.pop()[1];for(;i<t.marks.length;){let n=t.marks[i++],s=this.serializeMark(n,t.isInline,e);s&&(o.push([n,r]),r.appendChild(s.dom),r=s.contentDOM||s.dom)}}r.appendChild(this.serializeNodeInner(t,e))})),n}serializeNodeInner(t,e){let{dom:n,contentDOM:r}=at.renderSpec(ut(e),this.nodes[t.type.name](t));if(r){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,e,r)}return n}serializeNode(t,e={}){let n=this.serializeNodeInner(t,e);for(let r=t.marks.length-1;r>=0;r--){let o=this.serializeMark(t.marks[r],t.isInline,e);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n}serializeMark(t,e,n={}){let r=this.marks[t.type.name];return r&&at.renderSpec(ut(n),r(t,e))}static renderSpec(t,e,n=null){if("string"==typeof e)return{dom:t.createTextNode(e)};if(null!=e.nodeType)return{dom:e};if(e.dom&&null!=e.dom.nodeType)return e;let r,o=e[0],i=o.indexOf(" ");i>0&&(n=o.slice(0,i),o=o.slice(i+1));let s=n?t.createElementNS(n,o):t.createElement(o),a=e[1],l=1;if(a&&"object"==typeof a&&null==a.nodeType&&!Array.isArray(a)){l=2;for(let t in a)if(null!=a[t]){let e=t.indexOf(" ");e>0?s.setAttributeNS(t.slice(0,e),t.slice(e+1),a[t]):s.setAttribute(t,a[t])}}for(let o=l;o<e.length;o++){let i=e[o];if(0===i){if(o<e.length-1||o>l)throw new RangeError("Content hole must be the only child of its parent node");return{dom:s,contentDOM:s}}{let{dom:e,contentDOM:o}=at.renderSpec(t,i,n);if(s.appendChild(e),o){if(r)throw new RangeError("Multiple content holes");r=o}}}return{dom:s,contentDOM:r}}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new at(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let e=lt(t.nodes);return e.text||(e.text=t=>t.text),e}static marksFromSchema(t){return lt(t.marks)}}function lt(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function ut(t){return t.document||window.document}const ct=Math.pow(2,16);function dt(t){return 65535&t}class pt{constructor(t,e,n){this.pos=t,this.delInfo=e,this.recover=n}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class ht{constructor(t,e=!1){if(this.ranges=t,this.inverted=e,!t.length&&ht.empty)return ht.empty}recover(t){let e=0,n=dt(t);if(!this.inverted)for(let t=0;t<n;t++)e+=this.ranges[3*t+2]-this.ranges[3*t+1];return this.ranges[3*n]+e+function(t){return(t-(65535&t))/ct}(t)}mapResult(t,e=1){return this._map(t,e,!1)}map(t,e=1){return this._map(t,e,!0)}_map(t,e,n){let r=0,o=this.inverted?2:1,i=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let a=this.ranges[s]-(this.inverted?r:0);if(a>t)break;let l=this.ranges[s+o],u=this.ranges[s+i],c=a+l;if(t<=c){let o=a+r+((l?t==a?-1:t==c?1:e:e)<0?0:u);if(n)return o;let i=t==(e<0?a:c)?null:s/3+(t-a)*ct,d=t==a?2:t==c?1:4;return(e<0?t!=a:t!=c)&&(d|=8),new pt(o,d,i)}r+=u-l}return n?t+r:new pt(t+r,0,null)}touches(t,e){let n=0,r=dt(e),o=this.inverted?2:1,i=this.inverted?1:2;for(let e=0;e<this.ranges.length;e+=3){let s=this.ranges[e]-(this.inverted?n:0);if(s>t)break;let a=this.ranges[e+o];if(t<=s+a&&e==3*r)return!0;n+=this.ranges[e+i]-a}return!1}forEach(t){let e=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,o=0;r<this.ranges.length;r+=3){let i=this.ranges[r],s=i-(this.inverted?o:0),a=i+(this.inverted?0:o),l=this.ranges[r+e],u=this.ranges[r+n];t(s,s+l,a,a+u),o+=u-l}}invert(){return new ht(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return 0==t?ht.empty:new ht(t<0?[0,-t,0]:[0,0,t])}}ht.empty=new ht([]);class ft{constructor(t=[],e,n=0,r=t.length){this.maps=t,this.mirror=e,this.from=n,this.to=r}slice(t=0,e=this.maps.length){return new ft(this.maps,this.mirror,t,e)}copy(){return new ft(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(t,e){this.to=this.maps.push(t),null!=e&&this.setMirror(this.maps.length-1,e)}appendMapping(t){for(let e=0,n=this.maps.length;e<t.maps.length;e++){let r=t.getMirror(e);this.appendMap(t.maps[e],null!=r&&r<e?n+r:void 0)}}getMirror(t){if(this.mirror)for(let e=0;e<this.mirror.length;e++)if(this.mirror[e]==t)return this.mirror[e+(e%2?-1:1)]}setMirror(t,e){this.mirror||(this.mirror=[]),this.mirror.push(t,e)}appendMappingInverted(t){for(let e=t.maps.length-1,n=this.maps.length+t.maps.length;e>=0;e--){let r=t.getMirror(e);this.appendMap(t.maps[e].invert(),null!=r&&r>e?n-r-1:void 0)}}invert(){let t=new ft;return t.appendMappingInverted(this),t}map(t,e=1){if(this.mirror)return this._map(t,e,!0);for(let n=this.from;n<this.to;n++)t=this.maps[n].map(t,e);return t}mapResult(t,e=1){return this._map(t,e,!1)}_map(t,e,n){let r=0;for(let n=this.from;n<this.to;n++){let o=this.maps[n].mapResult(t,e);if(null!=o.recover){let e=this.getMirror(n);if(null!=e&&e>n&&e<this.to){n=e,t=this.maps[e].recover(o.recover);continue}}r|=o.delInfo,t=o.pos}return n?t:new pt(t,r,null)}}const mt=Object.create(null);class gt{getMap(){return ht.empty}merge(t){return null}static fromJSON(t,e){if(!e||!e.stepType)throw new RangeError("Invalid input for Step.fromJSON");let n=mt[e.stepType];if(!n)throw new RangeError(`No step type ${e.stepType} defined`);return n.fromJSON(t,e)}static jsonID(t,e){if(t in mt)throw new RangeError("Duplicate use of step JSON ID "+t);return mt[t]=e,e.prototype.jsonID=t,e}}class vt{constructor(t,e){this.doc=t,this.failed=e}static ok(t){return new vt(t,null)}static fail(t){return new vt(null,t)}static fromReplace(t,e,n,r){try{return vt.ok(t.replace(e,n,r))}catch(t){if(t instanceof p)return vt.fail(t.message);throw t}}}function yt(t,e,n){let r=[];for(let o=0;o<t.childCount;o++){let i=t.child(o);i.content.size&&(i=i.copy(yt(i.content,e,i))),i.isInline&&(i=e(i,n,o)),r.push(i)}return a.fromArray(r)}class bt extends gt{constructor(t,e,n){super(),this.from=t,this.to=e,this.mark=n}apply(t){let e=t.slice(this.from,this.to),n=t.resolve(this.from),r=n.node(n.sharedDepth(this.to)),o=new h(yt(e.content,((t,e)=>t.isAtom&&e.type.allowsMarkType(this.mark.type)?t.mark(this.mark.addToSet(t.marks)):t),r),e.openStart,e.openEnd);return vt.fromReplace(t,this.from,this.to,o)}invert(){return new wt(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return e.deleted&&n.deleted||e.pos>=n.pos?null:new bt(e.pos,n.pos,this.mark)}merge(t){return t instanceof bt&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new bt(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new bt(e.from,e.to,t.markFromJSON(e.mark))}}gt.jsonID("addMark",bt);class wt extends gt{constructor(t,e,n){super(),this.from=t,this.to=e,this.mark=n}apply(t){let e=t.slice(this.from,this.to),n=new h(yt(e.content,(t=>t.mark(this.mark.removeFromSet(t.marks))),t),e.openStart,e.openEnd);return vt.fromReplace(t,this.from,this.to,n)}invert(){return new bt(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return e.deleted&&n.deleted||e.pos>=n.pos?null:new wt(e.pos,n.pos,this.mark)}merge(t){return t instanceof wt&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new wt(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new wt(e.from,e.to,t.markFromJSON(e.mark))}}gt.jsonID("removeMark",wt);class xt extends gt{constructor(t,e,n,r=!1){super(),this.from=t,this.to=e,this.slice=n,this.structure=r}apply(t){return this.structure&&kt(t,this.from,this.to)?vt.fail("Structure replace would overwrite content"):vt.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new ht([this.from,this.to-this.from,this.slice.size])}invert(t){return new xt(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return e.deletedAcross&&n.deletedAcross?null:new xt(e.pos,Math.max(e.pos,n.pos),this.slice)}merge(t){if(!(t instanceof xt)||t.structure||this.structure)return null;if(this.from+this.slice.size!=t.from||this.slice.openEnd||t.slice.openStart){if(t.to!=this.from||this.slice.openStart||t.slice.openEnd)return null;{let e=this.slice.size+t.slice.size==0?h.empty:new h(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new xt(t.from,this.to,e,this.structure)}}{let e=this.slice.size+t.slice.size==0?h.empty:new h(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new xt(this.from,this.to+(t.to-t.from),e,this.structure)}}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new xt(e.from,e.to,h.fromJSON(t,e.slice),!!e.structure)}}gt.jsonID("replace",xt);class Dt extends gt{constructor(t,e,n,r,o,i,s=!1){super(),this.from=t,this.to=e,this.gapFrom=n,this.gapTo=r,this.slice=o,this.insert=i,this.structure=s}apply(t){if(this.structure&&(kt(t,this.from,this.gapFrom)||kt(t,this.gapTo,this.to)))return vt.fail("Structure gap-replace would overwrite content");let e=t.slice(this.gapFrom,this.gapTo);if(e.openStart||e.openEnd)return vt.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,e.content);return n?vt.fromReplace(t,this.from,this.to,n):vt.fail("Content does not fit in gap")}getMap(){return new ht([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let e=this.gapTo-this.gapFrom;return new Dt(this.from,this.from+this.slice.size+e,this.from+this.insert,this.from+this.insert+e,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1),r=t.map(this.gapFrom,-1),o=t.map(this.gapTo,1);return e.deletedAcross&&n.deletedAcross||r<e.pos||o>n.pos?null:new Dt(e.pos,n.pos,r,o,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to||"number"!=typeof e.gapFrom||"number"!=typeof e.gapTo||"number"!=typeof e.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Dt(e.from,e.to,e.gapFrom,e.gapTo,h.fromJSON(t,e.slice),e.insert,!!e.structure)}}function kt(t,e,n){let r=t.resolve(e),o=n-e,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let t=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!t||t.isLeaf)return!0;t=t.firstChild,o--}}return!1}function Ct(t,e,n){return(0==e||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function Et(t){let e=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let n=t.depth;;--n){let r=t.$from.node(n),o=t.$from.index(n),i=t.$to.indexAfter(n);if(n<t.depth&&r.canReplace(o,i,e))return n;if(0==n||r.type.spec.isolating||!Ct(r,o,i))break}return null}function St(t,e,n=null,r=t){let o=function(t,e){let{parent:n,startIndex:r,endIndex:o}=t,i=n.contentMatchAt(r).findWrapping(e);if(!i)return null;let s=i.length?i[0]:e;return n.canReplaceWith(r,o,s)?i:null}(t,e),i=o&&function(t,e){let{parent:n,startIndex:r,endIndex:o}=t,i=n.child(r),s=e.contentMatch.findWrapping(i.type);if(!s)return null;let a=(s.length?s[s.length-1]:e).contentMatch;for(let t=r;a&&t<o;t++)a=a.matchType(n.child(t).type);return a&&a.validEnd?s:null}(r,e);return i?o.map(Ot).concat({type:e,attrs:n}).concat(i.map(Ot)):null}function Ot(t){return{type:t,attrs:null}}function At(t,e,n=1,r){let o=t.resolve(e),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(let t=o.depth-1,e=n-2;t>i;t--,e--){let n=o.node(t),i=o.index(t);if(n.type.spec.isolating)return!1;let s=n.content.cutByIndex(i,n.childCount),a=r&&r[e]||n;if(a!=n&&(s=s.replaceChild(0,a.type.create(a.attrs))),!n.canReplace(i+1,n.childCount)||!a.type.validContent(s))return!1}let a=o.indexAfter(i),l=r&&r[0];return o.node(i).canReplaceWith(a,a,l?l.type:o.node(i+1).type)}function Tt(t,e){let n=t.resolve(e),r=n.index();return o=n.nodeBefore,i=n.nodeAfter,!(!o||!i||o.isLeaf||!o.canAppend(i))&&n.parent.canReplace(r,r+1);var o,i}function Mt(t,e,n=e,r=h.empty){if(e==n&&!r.size)return null;let o=t.resolve(e),i=t.resolve(n);return Ft(o,i,r)?new xt(e,n,r):new Nt(o,i,r).fit()}function Ft(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}gt.jsonID("replaceAround",Dt);class Nt{constructor(t,e,n){this.$from=t,this.$to=e,this.unplaced=n,this.frontier=[],this.placed=a.empty;for(let e=0;e<=t.depth;e++){let n=t.node(e);this.frontier.push({type:n.type,match:n.contentMatchAt(t.indexAfter(e))})}for(let e=t.depth;e>0;e--)this.placed=a.from(t.node(e).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let t=this.findFittable();t?this.placeNodes(t):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),e=this.placed.size-this.depth-this.$from.depth,n=this.$from,r=this.close(t<0?this.$to:n.doc.resolve(t));if(!r)return null;let o=this.placed,i=n.depth,s=r.depth;for(;i&&s&&1==o.childCount;)o=o.firstChild.content,i--,s--;let a=new h(o,i,s);return t>-1?new Dt(n.pos,t,this.$to.pos,this.$to.end(),a,e):a.size||n.pos!=this.$to.pos?new xt(n.pos,r.pos,a):null}findFittable(){for(let t=1;t<=2;t++)for(let e=this.unplaced.openStart;e>=0;e--){let n,r=null;e?(r=Rt(this.unplaced.content,e-1).firstChild,n=r.content):n=this.unplaced.content;let o=n.firstChild;for(let n=this.depth;n>=0;n--){let i,{type:s,match:l}=this.frontier[n],u=null;if(1==t&&(o?l.matchType(o.type)||(u=l.fillBefore(a.from(o),!1)):r&&s.compatibleContent(r.type)))return{sliceDepth:e,frontierDepth:n,parent:r,inject:u};if(2==t&&o&&(i=l.findWrapping(o.type)))return{sliceDepth:e,frontierDepth:n,parent:r,wrap:i};if(r&&l.matchType(r.type))break}}}openMore(){let{content:t,openStart:e,openEnd:n}=this.unplaced,r=Rt(t,e);return!(!r.childCount||r.firstChild.isLeaf||(this.unplaced=new h(t,e+1,Math.max(n,r.size+e>=t.size-n?e+1:0)),0))}dropNode(){let{content:t,openStart:e,openEnd:n}=this.unplaced,r=Rt(t,e);if(r.childCount<=1&&e>0){let o=t.size-e<=e+r.size;this.unplaced=new h(Bt(t,e-1,1),e-1,o?e-1:n)}else this.unplaced=new h(Bt(t,e,1),e,n)}placeNodes({sliceDepth:t,frontierDepth:e,parent:n,inject:r,wrap:o}){for(;this.depth>e;)this.closeFrontierNode();if(o)for(let t=0;t<o.length;t++)this.openFrontierNode(o[t]);let i=this.unplaced,s=n?n.content:i.content,l=i.openStart-t,u=0,c=[],{match:d,type:p}=this.frontier[e];if(r){for(let t=0;t<r.childCount;t++)c.push(r.child(t));d=d.matchFragment(r)}let f=s.size+t-(i.content.size-i.openEnd);for(;u<s.childCount;){let t=s.child(u),e=d.matchType(t.type);if(!e)break;u++,(u>1||0==l||t.content.size)&&(d=e,c.push(zt(t.mark(p.allowedMarks(t.marks)),1==u?l:0,u==s.childCount?f:-1)))}let m=u==s.childCount;m||(f=-1),this.placed=_t(this.placed,e,a.from(c)),this.frontier[e].match=d,m&&f<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let t=0,e=s;t<f;t++){let t=e.lastChild;this.frontier.push({type:t.type,match:t.contentMatchAt(t.childCount)}),e=t.content}this.unplaced=m?0==t?h.empty:new h(Bt(i.content,t-1,1),t-1,f<0?i.openEnd:t-1):new h(Bt(i.content,t,u),i.openStart,i.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let t,e=this.frontier[this.depth];if(!e.type.isTextblock||!Lt(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(t){t:for(let e=Math.min(this.depth,t.depth);e>=0;e--){let{match:n,type:r}=this.frontier[e],o=e<t.depth&&t.end(e+1)==t.pos+(t.depth-(e+1)),i=Lt(t,e,r,n,o);if(i){for(let n=e-1;n>=0;n--){let{match:e,type:r}=this.frontier[n],o=Lt(t,n,r,e,!0);if(!o||o.childCount)continue t}return{depth:e,fit:i,move:o?t.doc.resolve(t.after(e+1)):t}}}}close(t){let e=this.findCloseLevel(t);if(!e)return null;for(;this.depth>e.depth;)this.closeFrontierNode();e.fit.childCount&&(this.placed=_t(this.placed,e.depth,e.fit)),t=e.move;for(let n=e.depth+1;n<=t.depth;n++){let e=t.node(n),r=e.type.contentMatch.fillBefore(e.content,!0,t.index(n));this.openFrontierNode(e.type,e.attrs,r)}return t}openFrontierNode(t,e=null,n){let r=this.frontier[this.depth];r.match=r.match.matchType(t),this.placed=_t(this.placed,this.depth,a.from(t.create(e,n))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(a.empty,!0);t.childCount&&(this.placed=_t(this.placed,this.frontier.length,t))}}function Bt(t,e,n){return 0==e?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(Bt(t.firstChild.content,e-1,n)))}function _t(t,e,n){return 0==e?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(_t(t.lastChild.content,e-1,n)))}function Rt(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function zt(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,zt(r.firstChild,e-1,1==r.childCount?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(a.empty,!0)))),t.copy(r)}function Lt(t,e,n,r,o){let i=t.node(e),s=o?t.indexAfter(e):t.index(e);if(s==i.childCount&&!n.compatibleContent(i.type))return null;let a=r.fillBefore(i.content,!0,s);return a&&!function(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}(n,i.content,s)?a:null}function It(t){return t.spec.defining||t.spec.definingForContent}function Pt(t,e,n,r,o){if(e<n){let o=t.firstChild;t=t.replaceChild(0,o.copy(Pt(o.content,e+1,n,r,o)))}if(e>r){let e=o.contentMatchAt(0),n=e.fillBefore(t).append(t);t=n.append(e.matchFragment(n).fillBefore(a.empty,!0))}return t}function jt(t,e){let n=[];for(let r=Math.min(t.depth,e.depth);r>=0;r--){let o=t.start(r);if(o<t.pos-(t.depth-r)||e.end(r)>e.pos+(e.depth-r)||t.node(r).type.spec.isolating||e.node(r).type.spec.isolating)break;(o==e.start(r)||r==t.depth&&r==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&r&&e.start(r-1)==o-1)&&n.push(r)}return n}let Vt=class extends Error{};Vt=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n},(Vt.prototype=Object.create(Error.prototype)).constructor=Vt,Vt.prototype.name="TransformError";class Ht{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new ft}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let e=this.maybeStep(t);if(e.failed)throw new Vt(e.failed);return this}maybeStep(t){let e=t.apply(this.doc);return e.failed||this.addStep(t,e.doc),e}get docChanged(){return this.steps.length>0}addStep(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e}replace(t,e=t,n=h.empty){let r=Mt(this.doc,t,e,n);return r&&this.step(r),this}replaceWith(t,e,n){return this.replace(t,e,new h(a.from(n),0,0))}delete(t,e){return this.replace(t,e,h.empty)}insert(t,e){return this.replaceWith(t,t,e)}replaceRange(t,e,n){return function(t,e,n,r){if(!r.size)return t.deleteRange(e,n);let o=t.doc.resolve(e),i=t.doc.resolve(n);if(Ft(o,i,r))return t.step(new xt(e,n,r));let s=jt(o,t.doc.resolve(n));0==s[s.length-1]&&s.pop();let a=-(o.depth+1);s.unshift(a);for(let t=o.depth,e=o.pos-1;t>0;t--,e--){let n=o.node(t).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;s.indexOf(t)>-1?a=t:o.before(t)==e&&s.splice(1,0,-t)}let l=s.indexOf(a),u=[],c=r.openStart;for(let t=r.content,e=0;;e++){let n=t.firstChild;if(u.push(n),e==r.openStart)break;t=n.content}for(let t=c-1;t>=0;t--){let e=u[t].type,n=It(e);if(n&&o.node(l).type!=e)c=t;else if(n||!e.isTextblock)break}for(let e=r.openStart;e>=0;e--){let a=(e+c+1)%(r.openStart+1),d=u[a];if(d)for(let e=0;e<s.length;e++){let u=s[(e+l)%s.length],c=!0;u<0&&(c=!1,u=-u);let p=o.node(u-1),f=o.index(u-1);if(p.canReplaceWith(f,f,d.type,d.marks))return t.replace(o.before(u),c?i.after(u):n,new h(Pt(r.content,0,r.openStart,a),a,r.openEnd))}}let d=t.steps.length;for(let a=s.length-1;a>=0&&(t.replace(e,n,r),!(t.steps.length>d));a--){let t=s[a];t<0||(e=o.before(t),n=i.after(t))}}(this,t,e,n),this}replaceRangeWith(t,e,n){return function(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let o=function(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(0==r.parentOffset)for(let t=r.depth-1;t>=0;t--){let e=r.index(t);if(r.node(t).canReplaceWith(e,e,n))return r.before(t+1);if(e>0)return null}if(r.parentOffset==r.parent.content.size)for(let t=r.depth-1;t>=0;t--){let e=r.indexAfter(t);if(r.node(t).canReplaceWith(e,e,n))return r.after(t+1);if(e<r.node(t).childCount)return null}return null}(t.doc,e,r.type);null!=o&&(e=n=o)}t.replaceRange(e,n,new h(a.from(r),0,0))}(this,t,e,n),this}deleteRange(t,e){return function(t,e,n){let r=t.doc.resolve(e),o=t.doc.resolve(n),i=jt(r,o);for(let e=0;e<i.length;e++){let n=i[e],s=e==i.length-1;if(s&&0==n||r.node(n).type.contentMatch.validEnd)return t.delete(r.start(n),o.end(n));if(n>0&&(s||r.node(n-1).canReplace(r.index(n-1),o.indexAfter(n-1))))return t.delete(r.before(n),o.after(n))}for(let i=1;i<=r.depth&&i<=o.depth;i++)if(e-r.start(i)==r.depth-i&&n>r.end(i)&&o.end(i)-n!=o.depth-i)return t.delete(r.before(i),n);t.delete(e,n)}(this,t,e),this}lift(t,e){return function(t,e,n){let{$from:r,$to:o,depth:i}=e,s=r.before(i+1),l=o.after(i+1),u=s,c=l,d=a.empty,p=0;for(let t=i,e=!1;t>n;t--)e||r.index(t)>0?(e=!0,d=a.from(r.node(t).copy(d)),p++):u--;let f=a.empty,m=0;for(let t=i,e=!1;t>n;t--)e||o.after(t+1)<o.end(t)?(e=!0,f=a.from(o.node(t).copy(f)),m++):c++;t.step(new Dt(u,c,s,l,new h(d.append(f),p,m),d.size-p,!0))}(this,t,e),this}join(t,e=1){return function(t,e,n){let r=new xt(e-n,e+n,h.empty,!0);t.step(r)}(this,t,e),this}wrap(t,e){return function(t,e,n){let r=a.empty;for(let t=n.length-1;t>=0;t--){if(r.size){let e=n[t].type.contentMatch.matchFragment(r);if(!e||!e.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=a.from(n[t].type.create(n[t].attrs,r))}let o=e.start,i=e.end;t.step(new Dt(o,i,o,i,new h(r,0,0),n.length,!0))}(this,t,e),this}setBlockType(t,e=t,n,r=null){return function(t,e,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=t.steps.length;t.doc.nodesBetween(e,n,((e,n)=>{if(e.isTextblock&&!e.hasMarkup(r,o)&&function(t,e,n){let r=t.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(t.doc,t.mapping.slice(i).map(n),r)){t.clearIncompatible(t.mapping.slice(i).map(n,1),r);let s=t.mapping.slice(i),l=s.map(n,1),u=s.map(n+e.nodeSize,1);return t.step(new Dt(l,u,l+1,u-1,new h(a.from(r.create(o,null,e.marks)),0,0),1,!0)),!1}}))}(this,t,e,n,r),this}setNodeMarkup(t,e,n=null,r=[]){return function(t,e,n,r,o){let i=t.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let s=n.create(r,null,o||i.marks);if(i.isLeaf)return t.replaceWith(e,e+i.nodeSize,s);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new Dt(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new h(a.from(s),0,0),1,!0))}(this,t,e,n,r),this}split(t,e=1,n){return function(t,e,n=1,r){let o=t.doc.resolve(e),i=a.empty,s=a.empty;for(let t=o.depth,e=o.depth-n,l=n-1;t>e;t--,l--){i=a.from(o.node(t).copy(i));let e=r&&r[l];s=a.from(e?e.type.create(e.attrs,s):o.node(t).copy(s))}t.step(new xt(e,e,new h(i.append(s),n,n),!0))}(this,t,e,n),this}addMark(t,e,n){return function(t,e,n,r){let o,i,s=[],a=[];t.doc.nodesBetween(e,n,((t,l,u)=>{if(!t.isInline)return;let c=t.marks;if(!r.isInSet(c)&&u.type.allowsMarkType(r.type)){let u=Math.max(l,e),d=Math.min(l+t.nodeSize,n),p=r.addToSet(c);for(let t=0;t<c.length;t++)c[t].isInSet(p)||(o&&o.to==u&&o.mark.eq(c[t])?o.to=d:s.push(o=new wt(u,d,c[t])));i&&i.to==u?i.to=d:a.push(i=new bt(u,d,r))}})),s.forEach((e=>t.step(e))),a.forEach((e=>t.step(e)))}(this,t,e,n),this}removeMark(t,e,n){return function(t,e,n,r){let o=[],i=0;t.doc.nodesBetween(e,n,((t,s)=>{if(!t.isInline)return;i++;let a=null;if(r instanceof G){let e,n=t.marks;for(;e=r.isInSet(n);)(a||(a=[])).push(e),n=e.removeFromSet(n)}else r?r.isInSet(t.marks)&&(a=[r]):a=t.marks;if(a&&a.length){let r=Math.min(s+t.nodeSize,n);for(let t=0;t<a.length;t++){let n,l=a[t];for(let t=0;t<o.length;t++){let e=o[t];e.step==i-1&&l.eq(o[t].style)&&(n=e)}n?(n.to=r,n.step=i):o.push({style:l,from:Math.max(s,e),to:r,step:i})}}})),o.forEach((e=>t.step(new wt(e.from,e.to,e.style))))}(this,t,e,n),this}clearIncompatible(t,e,n){return function(t,e,n,r=n.contentMatch){let o=t.doc.nodeAt(e),i=[],s=e+1;for(let e=0;e<o.childCount;e++){let a=o.child(e),l=s+a.nodeSize,u=r.matchType(a.type);if(u){r=u;for(let e=0;e<a.marks.length;e++)n.allowsMarkType(a.marks[e].type)||t.step(new wt(s,l,a.marks[e]))}else i.push(new xt(s,l,h.empty));s=l}if(!r.validEnd){let e=r.fillBefore(a.empty,!0);t.replace(s,s,new h(e,0,0))}for(let e=i.length-1;e>=0;e--)t.step(i[e])}(this,t,e,n),this}}const $t=Object.create(null);class Wt{constructor(t,e,n){this.$anchor=t,this.$head=e,this.ranges=n||[new qt(t.min(e),t.max(e))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let e=0;e<t.length;e++)if(t[e].$from.pos!=t[e].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(t,e=h.empty){let n=e.content.lastChild,r=null;for(let t=0;t<e.openEnd;t++)r=n,n=n.lastChild;let o=t.steps.length,i=this.ranges;for(let s=0;s<i.length;s++){let{$from:a,$to:l}=i[s],u=t.mapping.slice(o);t.replaceRange(u.map(a.pos),u.map(l.pos),s?h.empty:e),0==s&&ee(t,o,(n?n.isInline:r&&r.isTextblock)?-1:1)}}replaceWith(t,e){let n=t.steps.length,r=this.ranges;for(let o=0;o<r.length;o++){let{$from:i,$to:s}=r[o],a=t.mapping.slice(n),l=a.map(i.pos),u=a.map(s.pos);o?t.deleteRange(l,u):(t.replaceRangeWith(l,u,e),ee(t,n,e.isInline?-1:1))}}static findFrom(t,e,n=!1){let r=t.parent.inlineContent?new Gt(t):te(t.node(0),t.parent,t.pos,t.index(),e,n);if(r)return r;for(let r=t.depth-1;r>=0;r--){let o=e<0?te(t.node(0),t.node(r),t.before(r+1),t.index(r),e,n):te(t.node(0),t.node(r),t.after(r+1),t.index(r)+1,e,n);if(o)return o}return null}static near(t,e=1){return this.findFrom(t,e)||this.findFrom(t,-e)||new Xt(t.node(0))}static atStart(t){return te(t,t,0,0,1)||new Xt(t)}static atEnd(t){return te(t,t,t.content.size,t.childCount,-1)||new Xt(t)}static fromJSON(t,e){if(!e||!e.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=$t[e.type];if(!n)throw new RangeError(`No selection type ${e.type} defined`);return n.fromJSON(t,e)}static jsonID(t,e){if(t in $t)throw new RangeError("Duplicate use of selection JSON ID "+t);return $t[t]=e,e.prototype.jsonID=t,e}getBookmark(){return Gt.between(this.$anchor,this.$head).getBookmark()}}Wt.prototype.visible=!0;class qt{constructor(t,e){this.$from=t,this.$to=e}}let Ut=!1;function Kt(t){Ut||t.parent.inlineContent||(Ut=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class Gt extends Wt{constructor(t,e=t){Kt(t),Kt(e),super(t,e)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,e){let n=t.resolve(e.map(this.head));if(!n.parent.inlineContent)return Wt.near(n);let r=t.resolve(e.map(this.anchor));return new Gt(r.parent.inlineContent?r:n,n)}replace(t,e=h.empty){if(super.replace(t,e),e==h.empty){let e=this.$from.marksAcross(this.$to);e&&t.ensureMarks(e)}}eq(t){return t instanceof Gt&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new Jt(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,e){if("number"!=typeof e.anchor||"number"!=typeof e.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new Gt(t.resolve(e.anchor),t.resolve(e.head))}static create(t,e,n=e){let r=t.resolve(e);return new this(r,n==e?r:t.resolve(n))}static between(t,e,n){let r=t.pos-e.pos;if(n&&!r||(n=r>=0?1:-1),!e.parent.inlineContent){let t=Wt.findFrom(e,n,!0)||Wt.findFrom(e,-n,!0);if(!t)return Wt.near(e,n);e=t.$head}return t.parent.inlineContent||(0==r||(t=(Wt.findFrom(t,-n,!0)||Wt.findFrom(t,n,!0)).$anchor).pos<e.pos!=r<0)&&(t=e),new Gt(t,e)}}Wt.jsonID("text",Gt);class Jt{constructor(t,e){this.anchor=t,this.head=e}map(t){return new Jt(t.map(this.anchor),t.map(this.head))}resolve(t){return Gt.between(t.resolve(this.anchor),t.resolve(this.head))}}class Zt extends Wt{constructor(t){let e=t.nodeAfter,n=t.node(0).resolve(t.pos+e.nodeSize);super(t,n),this.node=e}map(t,e){let{deleted:n,pos:r}=e.mapResult(this.anchor),o=t.resolve(r);return n?Wt.near(o):new Zt(o)}content(){return new h(a.from(this.node),0,0)}eq(t){return t instanceof Zt&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new Yt(this.anchor)}static fromJSON(t,e){if("number"!=typeof e.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new Zt(t.resolve(e.anchor))}static create(t,e){return new Zt(t.resolve(e))}static isSelectable(t){return!t.isText&&!1!==t.type.spec.selectable}}Zt.prototype.visible=!1,Wt.jsonID("node",Zt);class Yt{constructor(t){this.anchor=t}map(t){let{deleted:e,pos:n}=t.mapResult(this.anchor);return e?new Jt(n,n):new Yt(n)}resolve(t){let e=t.resolve(this.anchor),n=e.nodeAfter;return n&&Zt.isSelectable(n)?new Zt(e):Wt.near(e)}}class Xt extends Wt{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t,e=h.empty){if(e==h.empty){t.delete(0,t.doc.content.size);let e=Wt.atStart(t.doc);e.eq(t.selection)||t.setSelection(e)}else super.replace(t,e)}toJSON(){return{type:"all"}}static fromJSON(t){return new Xt(t)}map(t){return new Xt(t)}eq(t){return t instanceof Xt}getBookmark(){return Qt}}Wt.jsonID("all",Xt);const Qt={map(){return this},resolve:t=>new Xt(t)};function te(t,e,n,r,o,i=!1){if(e.inlineContent)return Gt.create(t,n);for(let s=r-(o>0?0:1);o>0?s<e.childCount:s>=0;s+=o){let r=e.child(s);if(r.isAtom){if(!i&&Zt.isSelectable(r))return Zt.create(t,n-(o<0?r.nodeSize:0))}else{let e=te(t,r,n+o,o<0?r.childCount:0,o,i);if(e)return e}n+=r.nodeSize*o}return null}function ee(t,e,n){let r=t.steps.length-1;if(r<e)return;let o,i=t.steps[r];(i instanceof xt||i instanceof Dt)&&(t.mapping.maps[r].forEach(((t,e,n,r)=>{null==o&&(o=r)})),t.setSelection(Wt.near(t.doc.resolve(o),n)))}class ne extends Ht{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){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}setSelection(t){if(t.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=-3&(1|this.updated),this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(t){return this.storedMarks=t,this.updated|=2,this}ensureMarks(t){return d.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(t,e){super.addStep(t,e),this.updated=-3&this.updated,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,e=!0){let n=this.selection;return e&&(t=t.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||d.none))),n.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,e,n){let r=this.doc.type.schema;if(null==e)return t?this.replaceSelectionWith(r.text(t),!0):this.deleteSelection();{if(null==n&&(n=e),n=null==n?e:n,!t)return this.deleteRange(e,n);let o=this.storedMarks;if(!o){let t=this.doc.resolve(e);o=n==e?t.marks():t.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(e,n,r.text(t,o)),this.selection.empty||this.setSelection(Wt.near(this.selection.$to)),this}}setMeta(t,e){return this.meta["string"==typeof t?t:t.key]=e,this}getMeta(t){return this.meta["string"==typeof t?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function re(t,e){return e&&t?t.bind(e):t}class oe{constructor(t,e,n){this.name=t,this.init=re(e.init,n),this.apply=re(e.apply,n)}}const ie=[new oe("doc",{init:t=>t.doc||t.schema.topNodeType.createAndFill(),apply:t=>t.doc}),new oe("selection",{init:(t,e)=>t.selection||Wt.atStart(e.doc),apply:t=>t.selection}),new oe("storedMarks",{init:t=>t.storedMarks||null,apply:(t,e,n,r)=>r.selection.$cursor?t.storedMarks:null}),new oe("scrollToSelection",{init:()=>0,apply:(t,e)=>t.scrolledIntoView?e+1:e})];class se{constructor(t,e){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=ie.slice(),e&&e.forEach((t=>{if(this.pluginsByKey[t.key])throw new RangeError("Adding different instances of a keyed plugin ("+t.key+")");this.plugins.push(t),this.pluginsByKey[t.key]=t,t.spec.state&&this.fields.push(new oe(t.key,t.spec.state,t))}))}}class ae{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,e=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=e){let e=this.config.plugins[n];if(e.spec.filterTransaction&&!e.spec.filterTransaction.call(e,t,this))return!1}return!0}applyTransaction(t){if(!this.filterTransaction(t))return{state:this,transactions:[]};let e=[t],n=this.applyInner(t),r=null;for(;;){let o=!1;for(let i=0;i<this.config.plugins.length;i++){let s=this.config.plugins[i];if(s.spec.appendTransaction){let a=r?r[i].n:0,l=r?r[i].state:this,u=a<e.length&&s.spec.appendTransaction.call(s,a?e.slice(a):e,l,n);if(u&&n.filterTransaction(u,i)){if(u.setMeta("appendedTransaction",t),!r){r=[];for(let t=0;t<this.config.plugins.length;t++)r.push(t<i?{state:n,n:e.length}:{state:this,n:0})}e.push(u),n=n.applyInner(u),o=!0}r&&(r[i]={state:n,n:e.length})}}if(!o)return{state:n,transactions:e}}}applyInner(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let e=new ae(this.config),n=this.config.fields;for(let r=0;r<n.length;r++){let o=n[r];e[o.name]=o.apply(t,this[o.name],this,e)}return e}get tr(){return new ne(this)}static create(t){let e=new se(t.doc?t.doc.type.schema:t.schema,t.plugins),n=new ae(e);for(let r=0;r<e.fields.length;r++)n[e.fields[r].name]=e.fields[r].init(t,n);return n}reconfigure(t){let e=new se(this.schema,t.plugins),n=e.fields,r=new ae(e);for(let e=0;e<n.length;e++){let o=n[e].name;r[o]=this.hasOwnProperty(o)?this[o]:n[e].init(t,r)}return r}toJSON(t){let e={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(e.storedMarks=this.storedMarks.map((t=>t.toJSON()))),t&&"object"==typeof t)for(let n in t){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved");let r=t[n],o=r.spec.state;o&&o.toJSON&&(e[n]=o.toJSON.call(r,this[r.key]))}return e}static fromJSON(t,e,n){if(!e)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let r=new se(t.schema,t.plugins),o=new ae(r);return r.fields.forEach((r=>{if("doc"==r.name)o.doc=F.fromJSON(t.schema,e.doc);else if("selection"==r.name)o.selection=Wt.fromJSON(o.doc,e.selection);else if("storedMarks"==r.name)e.storedMarks&&(o.storedMarks=e.storedMarks.map(t.schema.markFromJSON));else{if(n)for(let i in n){let s=n[i],a=s.spec.state;if(s.key==r.name&&a&&a.fromJSON&&Object.prototype.hasOwnProperty.call(e,i))return void(o[r.name]=a.fromJSON.call(s,t,e[i],o))}o[r.name]=r.init(t,o)}})),o}}function le(t,e,n){for(let r in t){let o=t[r];o instanceof Function?o=o.bind(e):"handleDOMEvents"==r&&(o=le(o,e,{})),n[r]=o}return n}class ue{constructor(t){this.spec=t,this.props={},t.props&&le(t.props,this,this.props),this.key=t.key?t.key.key:de("plugin")}getState(t){return t[this.key]}}const ce=Object.create(null);function de(t){return t in ce?t+"$"+ ++ce[t]:(ce[t]=0,t+"$")}class pe{constructor(t="key"){this.key=de(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}const he="undefined"!=typeof navigator?navigator:null,fe="undefined"!=typeof document?document:null,me=he&&he.userAgent||"",ge=/Edge\/(\d+)/.exec(me),ve=/MSIE \d/.exec(me),ye=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(me),be=!!(ve||ye||ge),we=ve?document.documentMode:ye?+ye[1]:ge?+ge[1]:0,xe=!be&&/gecko\/(\d+)/i.test(me);xe&&(/Firefox\/(\d+)/.exec(me)||[0,0])[1];const De=!be&&/Chrome\/(\d+)/.exec(me),ke=!!De,Ce=De?+De[1]:0,Ee=!be&&!!he&&/Apple Computer/.test(he.vendor),Se=Ee&&(/Mobile\/\w+/.test(me)||!!he&&he.maxTouchPoints>2),Oe=Se||!!he&&/Mac/.test(he.platform),Ae=/Android \d/.test(me),Te=!!fe&&"webkitFontSmoothing"in fe.documentElement.style,Me=Te?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,Fe=function(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e},Ne=function(t){let e=t.assignedSlot||t.parentNode;return e&&11==e.nodeType?e.host:e};let Be=null;const _e=function(t,e,n){let r=Be||(Be=document.createRange());return r.setEnd(t,null==n?t.nodeValue.length:n),r.setStart(t,e||0),r},Re=function(t,e,n,r){return n&&(Le(t,e,n,r,-1)||Le(t,e,n,r,1))},ze=/^(img|br|input|textarea|hr)$/i;function Le(t,e,n,r,o){for(;;){if(t==n&&e==r)return!0;if(e==(o<0?0:Ie(t))){let n=t.parentNode;if(!n||1!=n.nodeType||Pe(t)||ze.test(t.nodeName)||"false"==t.contentEditable)return!1;e=Fe(t)+(o<0?0:1),t=n}else{if(1!=t.nodeType)return!1;if("false"==(t=t.childNodes[e+(o<0?-1:0)]).contentEditable)return!1;e=o<0?Ie(t):0}}}function Ie(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function Pe(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const je=function(t){let e=t.isCollapsed;return e&&ke&&t.rangeCount&&!t.getRangeAt(0).collapsed&&(e=!1),e};function Ve(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function He(t){return{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function $e(t,e){return"number"==typeof t?t:t[e]}function We(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function qe(t,e,n){let r=t.someProp("scrollThreshold")||0,o=t.someProp("scrollMargin")||5,i=t.dom.ownerDocument;for(let s=n||t.dom;s;s=Ne(s)){if(1!=s.nodeType)continue;let t=s,n=t==i.body,a=n?He(i):We(t),l=0,u=0;if(e.top<a.top+$e(r,"top")?u=-(a.top-e.top+$e(o,"top")):e.bottom>a.bottom-$e(r,"bottom")&&(u=e.bottom-a.bottom+$e(o,"bottom")),e.left<a.left+$e(r,"left")?l=-(a.left-e.left+$e(o,"left")):e.right>a.right-$e(r,"right")&&(l=e.right-a.right+$e(o,"right")),l||u)if(n)i.defaultView.scrollBy(l,u);else{let n=t.scrollLeft,r=t.scrollTop;u&&(t.scrollTop+=u),l&&(t.scrollLeft+=l);let o=t.scrollLeft-n,i=t.scrollTop-r;e={left:e.left-o,top:e.top-i,right:e.right-o,bottom:e.bottom-i}}if(n)break}}function Ue(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=Ne(r));return e}function Ke(t,e){for(let n=0;n<t.length;n++){let{dom:r,top:o,left:i}=t[n];r.scrollTop!=o+e&&(r.scrollTop=o+e),r.scrollLeft!=i&&(r.scrollLeft=i)}}let Ge=null;function Je(t,e){let n,r,o=2e8,i=0,s=e.top,a=e.top;for(let l=t.firstChild,u=0;l;l=l.nextSibling,u++){let t;if(1==l.nodeType)t=l.getClientRects();else{if(3!=l.nodeType)continue;t=_e(l).getClientRects()}for(let c=0;c<t.length;c++){let d=t[c];if(d.top<=s&&d.bottom>=a){s=Math.max(d.bottom,s),a=Math.min(d.top,a);let t=d.left>e.left?d.left-e.left:d.right<e.left?e.left-d.right:0;if(t<o){n=l,o=t,r=t&&3==n.nodeType?{left:d.right<e.left?d.right:d.left,top:e.top}:e,1==l.nodeType&&t&&(i=u+(e.left>=(d.left+d.right)/2?1:0));continue}}!n&&(e.left>=d.right&&e.top>=d.top||e.left>=d.left&&e.top>=d.bottom)&&(i=u+1)}}return n&&3==n.nodeType?function(t,e){let n=t.nodeValue.length,r=document.createRange();for(let o=0;o<n;o++){r.setEnd(t,o+1),r.setStart(t,o);let n=Qe(r,1);if(n.top!=n.bottom&&Ze(e,n))return{node:t,offset:o+(e.left>=(n.left+n.right)/2?1:0)}}return{node:t,offset:0}}(n,r):!n||o&&1==n.nodeType?{node:t,offset:i}:Je(n,r)}function Ze(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function Ye(t,e,n){let r=t.childNodes.length;if(r&&n.top<n.bottom)for(let o=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),i=o;;){let n=t.childNodes[i];if(1==n.nodeType){let t=n.getClientRects();for(let r=0;r<t.length;r++){let o=t[r];if(Ze(e,o))return Ye(n,e,o)}}if((i=(i+1)%r)==o)break}return t}function Xe(t,e){let n,r=t.dom.ownerDocument,o=0;if(r.caretPositionFromPoint)try{let t=r.caretPositionFromPoint(e.left,e.top);t&&({offsetNode:n,offset:o}=t)}catch(t){}if(!n&&r.caretRangeFromPoint){let t=r.caretRangeFromPoint(e.left,e.top);t&&({startContainer:n,startOffset:o}=t)}let i,s=(t.root.elementFromPoint?t.root:r).elementFromPoint(e.left,e.top+1);if(!s||!t.dom.contains(1!=s.nodeType?s.parentNode:s)){let n=t.dom.getBoundingClientRect();if(!Ze(e,n))return null;if(s=Ye(t.dom,e,n),!s)return null}if(Ee)for(let t=s;n&&t;t=Ne(t))t.draggable&&(n=void 0);if(s=function(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}(s,e),n){if(xe&&1==n.nodeType&&(o=Math.min(o,n.childNodes.length),o<n.childNodes.length)){let t,r=n.childNodes[o];"IMG"==r.nodeName&&(t=r.getBoundingClientRect()).right<=e.left&&t.bottom>e.top&&o++}n==t.dom&&o==n.childNodes.length-1&&1==n.lastChild.nodeType&&e.top>n.lastChild.getBoundingClientRect().bottom?i=t.state.doc.content.size:0!=o&&1==n.nodeType&&"BR"==n.childNodes[o-1].nodeName||(i=function(t,e,n,r){let o=-1;for(let n=e;n!=t.dom;){let e=t.docView.nearestDesc(n,!0);if(!e)return null;if(e.node.isBlock&&e.parent){let t=e.dom.getBoundingClientRect();if(t.left>r.left||t.top>r.top)o=e.posBefore;else{if(!(t.right<r.left||t.bottom<r.top))break;o=e.posAfter}}n=e.dom.parentNode}return o>-1?o:t.docView.posFromDOM(e,n,1)}(t,n,o,e))}null==i&&(i=function(t,e,n){let{node:r,offset:o}=Je(e,n),i=-1;if(1==r.nodeType&&!r.firstChild){let t=r.getBoundingClientRect();i=t.left!=t.right&&n.left>(t.left+t.right)/2?1:-1}return t.docView.posFromDOM(r,o,i)}(t,s,e));let a=t.docView.nearestDesc(s,!0);return{pos:i,inside:a?a.posAtStart-a.border:-1}}function Qe(t,e){let n=t.getClientRects();return n.length?n[e<0?0:n.length-1]:t.getBoundingClientRect()}const tn=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function en(t,e,n){let{node:r,offset:o}=t.docView.domFromPos(e,n<0?-1:1),i=Te||xe;if(3==r.nodeType){if(!i||!tn.test(r.nodeValue)&&(n<0?o:o!=r.nodeValue.length)){let t=o,e=o,i=n<0?1:-1;return n<0&&!o?(e++,i=-1):n>=0&&o==r.nodeValue.length?(t--,i=1):n<0?t--:e++,nn(Qe(_e(r,t,e),i),i<0)}{let t=Qe(_e(r,o,o),n);if(xe&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let e=Qe(_e(r,o-1,o-1),-1);if(e.top==t.top){let n=Qe(_e(r,o,o+1),-1);if(n.top!=t.top)return nn(n,n.left<e.left)}}return t}}if(!t.state.doc.resolve(e).parent.inlineContent){if(o&&(n<0||o==Ie(r))){let t=r.childNodes[o-1];if(1==t.nodeType)return rn(t.getBoundingClientRect(),!1)}if(o<Ie(r)){let t=r.childNodes[o];if(1==t.nodeType)return rn(t.getBoundingClientRect(),!0)}return rn(r.getBoundingClientRect(),n>=0)}if(o&&(n<0||o==Ie(r))){let t=r.childNodes[o-1],e=3==t.nodeType?_e(t,Ie(t)-(i?0:1)):1!=t.nodeType||"BR"==t.nodeName&&t.nextSibling?null:t;if(e)return nn(Qe(e,1),!1)}if(o<Ie(r)){let t=r.childNodes[o];for(;t.pmViewDesc&&t.pmViewDesc.ignoreForCoords;)t=t.nextSibling;let e=t?3==t.nodeType?_e(t,0,i?0:1):1==t.nodeType?t:null:null;if(e)return nn(Qe(e,-1),!0)}return nn(Qe(3==r.nodeType?_e(r):r,-n),n>=0)}function nn(t,e){if(0==t.width)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function rn(t,e){if(0==t.height)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function on(t,e,n){let r=t.state,o=t.root.activeElement;r!=e&&t.updateState(e),o!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),o!=t.dom&&o&&o.focus()}}const sn=/[\u0590-\u08ac]/;let an=null,ln=null,un=!1;class cn{constructor(t,e,n,r){this.parent=t,this.children=e,this.dom=n,this.contentDOM=r,this.dirty=0,n.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,e,n){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let e=0;e<this.children.length;e++)t+=this.children[e].size;return t}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let t=0;t<this.children.length;t++)this.children[t].destroy()}posBeforeChild(t){for(let e=0,n=this.posAtStart;;e++){let r=this.children[e];if(r==t)return n;n+=r.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(t,e,n){if(this.contentDOM&&this.contentDOM.contains(1==t.nodeType?t:t.parentNode)){if(n<0){let n,r;if(t==this.contentDOM)n=t.childNodes[e-1];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;n=t.previousSibling}for(;n&&(!(r=n.pmViewDesc)||r.parent!=this);)n=n.previousSibling;return n?this.posBeforeChild(r)+r.size:this.posAtStart}{let n,r;if(t==this.contentDOM)n=t.childNodes[e];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;n=t.nextSibling}for(;n&&(!(r=n.pmViewDesc)||r.parent!=this);)n=n.nextSibling;return n?this.posBeforeChild(r):this.posAtEnd}}let r;if(t==this.dom&&this.contentDOM)r=e>Fe(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=2&t.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==e)for(let e=t;;e=e.parentNode){if(e==this.dom){r=!1;break}if(e.previousSibling)break}if(null==r&&e==t.childNodes.length)for(let e=t;;e=e.parentNode){if(e==this.dom){r=!0;break}if(e.nextSibling)break}}return(null==r?n>0:r)?this.posAtEnd:this.posAtStart}nearestDesc(t,e=!1){for(let n=!0,r=t;r;r=r.parentNode){let o,i=this.getDesc(r);if(i&&(!e||i.node)){if(!n||!(o=i.nodeDOM)||(1==o.nodeType?o.contains(1==t.nodeType?t:t.parentNode):o==t))return i;n=!1}}}getDesc(t){let e=t.pmViewDesc;for(let t=e;t;t=t.parent)if(t==this)return e}posFromDOM(t,e,n){for(let r=t;r;r=r.parentNode){let o=this.getDesc(r);if(o)return o.localPosFromDOM(t,e,n)}return-1}descAt(t){for(let e=0,n=0;e<this.children.length;e++){let r=this.children[e],o=n+r.size;if(n==t&&o!=n){for(;!r.border&&r.children.length;)r=r.children[0];return r}if(t<o)return r.descAt(t-n-r.border);n=o}}domFromPos(t,e){if(!this.contentDOM)return{node:this.dom,offset:0};let n,r=0,o=0;for(let e=0;r<this.children.length;r++){let n=this.children[r],i=e+n.size;if(i>t||n instanceof vn){o=t-e;break}e=i}if(o)return this.children[r].domFromPos(o-this.children[r].border,e);for(;r&&!(n=this.children[r-1]).size&&n instanceof dn&&n.side>=0;r--);if(e<=0){let t,n=!0;for(;t=r?this.children[r-1]:null,t&&t.dom.parentNode!=this.contentDOM;r--,n=!1);return t&&e&&n&&!t.border&&!t.domAtom?t.domFromPos(t.size,e):{node:this.contentDOM,offset:t?Fe(t.dom)+1:0}}{let t,n=!0;for(;t=r<this.children.length?this.children[r]:null,t&&t.dom.parentNode!=this.contentDOM;r++,n=!1);return t&&n&&!t.border&&!t.domAtom?t.domFromPos(0,e):{node:this.contentDOM,offset:t?Fe(t.dom):this.contentDOM.childNodes.length}}}parseRange(t,e,n=0){if(0==this.children.length)return{node:this.contentDOM,from:t,to:e,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let r=-1,o=-1;for(let i=n,s=0;;s++){let n=this.children[s],a=i+n.size;if(-1==r&&t<=a){let o=i+n.border;if(t>=o&&e<=a-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(t,e,o);t=i;for(let e=s;e>0;e--){let n=this.children[e-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){r=Fe(n.dom)+1;break}t-=n.size}-1==r&&(r=0)}if(r>-1&&(a>e||s==this.children.length-1)){e=a;for(let t=s+1;t<this.children.length;t++){let n=this.children[t];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(-1)){o=Fe(n.dom);break}e+=n.size}-1==o&&(o=this.contentDOM.childNodes.length);break}i=a}return{node:this.contentDOM,from:t,to:e,fromOffset:r,toOffset:o}}emptyChildAt(t){if(this.border||!this.contentDOM||!this.children.length)return!1;let e=this.children[t<0?0:this.children.length-1];return 0==e.size||e.emptyChildAt(t)}domAfterPos(t){let{node:e,offset:n}=this.domFromPos(t,0);if(1!=e.nodeType||n==e.childNodes.length)throw new RangeError("No node after pos "+t);return e.childNodes[n]}setSelection(t,e,n,r=!1){let o=Math.min(t,e),i=Math.max(t,e);for(let s=0,a=0;s<this.children.length;s++){let l=this.children[s],u=a+l.size;if(o>a&&i<u)return l.setSelection(t-a-l.border,e-a-l.border,n,r);a=u}let s=this.domFromPos(t,t?-1:1),a=e==t?s:this.domFromPos(e,e?-1:1),l=n.getSelection(),u=!1;if((xe||Ee)&&t==e){let{node:t,offset:e}=s;if(3==t.nodeType){if(u=!(!e||"\n"!=t.nodeValue[e-1]),u&&e==t.nodeValue.length)for(let e,n=t;n;n=n.parentNode){if(e=n.nextSibling){"BR"==e.nodeName&&(s=a={node:e.parentNode,offset:Fe(e)+1});break}let t=n.pmViewDesc;if(t&&t.node&&t.node.isBlock)break}}else{let n=t.childNodes[e-1];u=n&&("BR"==n.nodeName||"false"==n.contentEditable)}}if(xe&&l.focusNode&&l.focusNode!=a.node&&1==l.focusNode.nodeType){let t=l.focusNode.childNodes[l.focusOffset];t&&"false"==t.contentEditable&&(r=!0)}if(!(r||u&&Ee)&&Re(s.node,s.offset,l.anchorNode,l.anchorOffset)&&Re(a.node,a.offset,l.focusNode,l.focusOffset))return;let c=!1;if((l.extend||t==e)&&!u){l.collapse(s.node,s.offset);try{t!=e&&l.extend(a.node,a.offset),c=!0}catch(t){if(!(t instanceof DOMException))throw t}}if(!c){if(t>e){let t=s;s=a,a=t}let n=document.createRange();n.setEnd(a.node,a.offset),n.setStart(s.node,s.offset),l.removeAllRanges(),l.addRange(n)}}ignoreMutation(t){return!this.contentDOM&&"selection"!=t.type}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,e){for(let n=0,r=0;r<this.children.length;r++){let o=this.children[r],i=n+o.size;if(n==i?t<=i&&e>=n:t<i&&e>n){let r=n+o.border,s=i-o.border;if(t>=r&&e<=s)return this.dirty=t==n||e==i?2:1,void(t!=r||e!=s||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(t-r,e-r):o.dirty=3);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}n=i}this.dirty=2}markParentsDirty(){let t=1;for(let e=this.parent;e;e=e.parent,t++){let n=1==t?2:1;e.dirty<n&&(e.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}}class dn extends cn{constructor(t,e,n,r){let o,i=e.type.toDOM;if("function"==typeof i&&(i=i(n,(()=>o?o.parent?o.parent.posBeforeChild(o):void 0:r))),!e.type.spec.raw){if(1!=i.nodeType){let t=document.createElement("span");t.appendChild(i),i=t}i.contentEditable="false",i.classList.add("ProseMirror-widget")}super(t,[],i,null),this.widget=e,this.widget=e,o=this}matchesWidget(t){return 0==this.dirty&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let e=this.widget.spec.stopEvent;return!!e&&e(t)}ignoreMutation(t){return"selection"!=t.type||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class pn extends cn{constructor(t,e,n,r){super(t,[],e,null),this.textDOM=n,this.text=r}get size(){return this.text.length}localPosFromDOM(t,e){return t!=this.textDOM?this.posAtStart+(e?this.size:0):this.posAtStart+e}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return"characterData"===t.type&&t.target.nodeValue==t.oldValue}}class hn extends cn{constructor(t,e,n,r){super(t,[],n,r),this.mark=e}static create(t,e,n,r){let o=r.nodeViews[e.type.name],i=o&&o(e,r,n);return i&&i.dom||(i=at.renderSpec(document,e.type.spec.toDOM(e,n))),new hn(t,e,i.dom,i.contentDOM||i.dom)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM||void 0}}matchesMark(t){return 3!=this.dirty&&this.mark.eq(t)}markDirty(t,e){if(super.markDirty(t,e),0!=this.dirty){let t=this.parent;for(;!t.node;)t=t.parent;t.dirty<this.dirty&&(t.dirty=this.dirty),this.dirty=0}}slice(t,e,n){let r=hn.create(this.parent,this.mark,!0,n),o=this.children,i=this.size;e<i&&(o=Mn(o,e,i,n)),t>0&&(o=Mn(o,0,t,n));for(let t=0;t<o.length;t++)o[t].parent=r;return r.children=o,r}}class fn extends cn{constructor(t,e,n,r,o,i,s,a,l){super(t,[],o,i),this.node=e,this.outerDeco=n,this.innerDeco=r,this.nodeDOM=s,i&&this.updateChildren(a,l)}static create(t,e,n,r,o,i){let s,a=o.nodeViews[e.type.name],l=a&&a(e,o,(()=>s?s.parent?s.parent.posBeforeChild(s):void 0:i),n,r),u=l&&l.dom,c=l&&l.contentDOM;if(e.isText)if(u){if(3!=u.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else u=document.createTextNode(e.text);else u||({dom:u,contentDOM:c}=at.renderSpec(document,e.type.spec.toDOM(e)));c||e.isText||"BR"==u.nodeName||(u.hasAttribute("contenteditable")||(u.contentEditable="false"),e.type.spec.draggable&&(u.draggable=!0));let d=u;return u=En(u,n,e),l?s=new yn(t,e,n,r,u,c||null,d,l,o,i+1):e.isText?new gn(t,e,n,r,u,d,o):new fn(t,e,n,r,u,c||null,d,o,i+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(t.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let e=this.children.length-1;e>=0;e--){let n=this.children[e];if(this.dom.contains(n.dom.parentNode)){t.contentElement=n.dom.parentNode;break}}t.contentElement||(t.getContent=()=>a.empty)}else t.contentElement=this.contentDOM;else t.getContent=()=>this.node.content;return t}matchesNode(t,e,n){return 0==this.dirty&&t.eq(this.node)&&Sn(e,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,e){let n=this.node.inlineContent,r=e,o=t.composing?this.localCompositionInfo(t,e):null,i=o&&o.pos>-1?o:null,s=o&&o.pos<0,a=new An(this,i&&i.node);!function(t,e,n,r){let o=e.locals(t),i=0;if(0==o.length){for(let n=0;n<t.childCount;n++){let s=t.child(n);r(s,o,e.forChild(i,s),n),i+=s.nodeSize}return}let s=0,a=[],l=null;for(let u=0;;){if(s<o.length&&o[s].to==i){let t,e=o[s++];for(;s<o.length&&o[s].to==i;)(t||(t=[e])).push(o[s++]);if(t){t.sort(Tn);for(let e=0;e<t.length;e++)n(t[e],u,!!l)}else n(e,u,!!l)}let c,d;if(l)d=-1,c=l,l=null;else{if(!(u<t.childCount))break;d=u,c=t.child(u++)}for(let t=0;t<a.length;t++)a[t].to<=i&&a.splice(t--,1);for(;s<o.length&&o[s].from<=i&&o[s].to>i;)a.push(o[s++]);let p=i+c.nodeSize;if(c.isText){let t=p;s<o.length&&o[s].from<t&&(t=o[s].from);for(let e=0;e<a.length;e++)a[e].to<t&&(t=a[e].to);t<p&&(l=c.cut(t-i),c=c.cut(0,t-i),p=t,d=-1)}r(c,c.isInline&&!c.isLeaf?a.filter((t=>!t.inline)):a.slice(),e.forChild(i,c),d),i=p}}(this.node,this.innerDeco,((e,o,i)=>{e.spec.marks?a.syncToMarks(e.spec.marks,n,t):e.type.side>=0&&!i&&a.syncToMarks(o==this.node.childCount?d.none:this.node.child(o).marks,n,t),a.placeWidget(e,t,r)}),((e,i,l,u)=>{let c;a.syncToMarks(e.marks,n,t),a.findNodeMatch(e,i,l,u)||s&&t.state.selection.from>r&&t.state.selection.to<r+e.nodeSize&&(c=a.findIndexWithChild(o.node))>-1&&a.updateNodeAt(e,i,l,c,t)||a.updateNextNode(e,i,l,t,u)||a.addNode(e,i,l,t,r),r+=e.nodeSize})),a.syncToMarks([],n,t),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||2==this.dirty)&&(i&&this.protectLocalComposition(t,i),bn(this.contentDOM,this.children,t),Se&&function(t){if("UL"==t.nodeName||"OL"==t.nodeName){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}(this.dom))}localCompositionInfo(t,e){let{from:n,to:r}=t.state.selection;if(!(t.state.selection instanceof Gt)||n<e||r>e+this.node.content.size)return null;let o=t.domSelection(),i=function(t,e){for(;;){if(3==t.nodeType)return t;if(1==t.nodeType&&e>0){if(t.childNodes.length>e&&3==t.childNodes[e].nodeType)return t.childNodes[e];e=Ie(t=t.childNodes[e-1])}else{if(!(1==t.nodeType&&e<t.childNodes.length))return null;t=t.childNodes[e],e=0}}}(o.focusNode,o.focusOffset);if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let t=i.nodeValue,o=function(t,e,n,r){for(let o=0,i=0;o<t.childCount&&i<=r;){let s=t.child(o++),a=i;if(i+=s.nodeSize,!s.isText)continue;let l=s.text;for(;o<t.childCount;){let e=t.child(o++);if(i+=e.nodeSize,!e.isText)break;l+=e.text}if(i>=n){let t=a<r?l.lastIndexOf(e,r-a-1):-1;if(t>=0&&t+e.length+a>=n)return a+t;if(n==r&&l.length>=r+e.length-a&&l.slice(r-a,r-a+e.length)==e)return r}}return-1}(this.node.content,t,n-e,r-e);return o<0?null:{node:i,pos:o,text:t}}return{node:i,pos:-1,text:""}}protectLocalComposition(t,{node:e,pos:n,text:r}){if(this.getDesc(e))return;let o=e;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let i=new pn(this,o,e,r);t.input.compositionNodes.push(i),this.children=Mn(this.children,n,n+r.length,t,i)}update(t,e,n,r){return!(3==this.dirty||!t.sameMarkup(this.node)||(this.updateInner(t,e,n,r),0))}updateInner(t,e,n,r){this.updateOuterDeco(e),this.node=t,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0}updateOuterDeco(t){if(Sn(t,this.outerDeco))return;let e=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=kn(this.dom,this.nodeDOM,Dn(this.outerDeco,this.node,e),Dn(t,this.node,e)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)}deselectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function mn(t,e,n,r,o){return En(r,e,t),new fn(void 0,t,e,n,r,r,r,o,0)}class gn extends fn{constructor(t,e,n,r,o,i,s){super(t,e,n,r,o,null,i,s,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,e,n,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!t.sameMarkup(this.node)||(this.updateOuterDeco(e),0==this.dirty&&t.text==this.node.text||t.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=t.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=t,this.dirty=0,0))}inParent(){let t=this.parent.contentDOM;for(let e=this.nodeDOM;e;e=e.parentNode)if(e==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,e,n){return t==this.nodeDOM?this.posAtStart+Math.min(e,this.node.text.length):super.localPosFromDOM(t,e,n)}ignoreMutation(t){return"characterData"!=t.type&&"selection"!=t.type}slice(t,e,n){let r=this.node.cut(t,e),o=document.createTextNode(r.text);return new gn(this.parent,r,this.outerDeco,this.innerDeco,o,o,n)}markDirty(t,e){super.markDirty(t,e),this.dom==this.nodeDOM||0!=t&&e!=this.nodeDOM.nodeValue.length||(this.dirty=3)}get domAtom(){return!1}}class vn extends cn{parseRule(){return{ignore:!0}}matchesHack(t){return 0==this.dirty&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}}class yn extends fn{constructor(t,e,n,r,o,i,s,a,l,u){super(t,e,n,r,o,i,s,l,u),this.spec=a}update(t,e,n,r){if(3==this.dirty)return!1;if(this.spec.update){let o=this.spec.update(t,e,n);return o&&this.updateInner(t,e,n,r),o}return!(!this.contentDOM&&!t.isLeaf)&&super.update(t,e,n,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,e,n,r){this.spec.setSelection?this.spec.setSelection(t,e,n):super.setSelection(t,e,n,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return!!this.spec.stopEvent&&this.spec.stopEvent(t)}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}}function bn(t,e,n){let r=t.firstChild,o=!1;for(let i=0;i<e.length;i++){let s=e[i],a=s.dom;if(a.parentNode==t){for(;a!=r;)r=On(r),o=!0;r=r.nextSibling}else o=!0,t.insertBefore(a,r);if(s instanceof hn){let e=r?r.previousSibling:t.lastChild;bn(s.contentDOM,s.children,n),r=e?e.nextSibling:t.firstChild}}for(;r;)r=On(r),o=!0;o&&n.trackWrites==t&&(n.trackWrites=null)}const wn=function(t){t&&(this.nodeName=t)};wn.prototype=Object.create(null);const xn=[new wn];function Dn(t,e,n){if(0==t.length)return xn;let r=n?xn[0]:new wn,o=[r];for(let i=0;i<t.length;i++){let s=t[i].type.attrs;if(s){s.nodeName&&o.push(r=new wn(s.nodeName));for(let t in s){let i=s[t];null!=i&&(n&&1==o.length&&o.push(r=new wn(e.isInline?"span":"div")),"class"==t?r.class=(r.class?r.class+" ":"")+i:"style"==t?r.style=(r.style?r.style+";":"")+i:"nodeName"!=t&&(r[t]=i))}}}return o}function kn(t,e,n,r){if(n==xn&&r==xn)return e;let o=e;for(let e=0;e<r.length;e++){let i=r[e],s=n[e];if(e){let e;s&&s.nodeName==i.nodeName&&o!=t&&(e=o.parentNode)&&e.nodeName.toLowerCase()==i.nodeName||(e=document.createElement(i.nodeName),e.pmIsDeco=!0,e.appendChild(o),s=xn[0]),o=e}Cn(o,s||xn[0],i)}return o}function Cn(t,e,n){for(let r in e)"class"==r||"style"==r||"nodeName"==r||r in n||t.removeAttribute(r);for(let r in n)"class"!=r&&"style"!=r&&"nodeName"!=r&&n[r]!=e[r]&&t.setAttribute(r,n[r]);if(e.class!=n.class){let r=e.class?e.class.split(" ").filter(Boolean):[],o=n.class?n.class.split(" ").filter(Boolean):[];for(let e=0;e<r.length;e++)-1==o.indexOf(r[e])&&t.classList.remove(r[e]);for(let e=0;e<o.length;e++)-1==r.indexOf(o[e])&&t.classList.add(o[e]);0==t.classList.length&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let n,r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;for(;n=r.exec(e.style);)t.style.removeProperty(n[1])}n.style&&(t.style.cssText+=n.style)}}function En(t,e,n){return kn(t,t,xn,Dn(e,n,1!=t.nodeType))}function Sn(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function On(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class An{constructor(t,e){this.lock=e,this.index=0,this.stack=[],this.changed=!1,this.top=t,this.preMatch=function(t,e){let n=e,r=n.children.length,o=t.childCount,i=new Map,s=[];t:for(;o>0;){let a;for(;;)if(r){let t=n.children[r-1];if(!(t instanceof hn)){a=t,r--;break}n=t,r=t.children.length}else{if(n==e)break t;r=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=t.child(o-1))break;--o,i.set(a,o),s.push(a)}}return{index:o,matched:i,matches:s.reverse()}}(t.node.content,t)}destroyBetween(t,e){if(t!=e){for(let n=t;n<e;n++)this.top.children[n].destroy();this.top.children.splice(t,e-t),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(t,e,n){let r=0,o=this.stack.length>>1,i=Math.min(o,t.length);for(;r<i&&(r==o-1?this.top:this.stack[r+1<<1]).matchesMark(t[r])&&!1!==t[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<t.length;){this.stack.push(this.top,this.index+1);let r=-1;for(let e=this.index;e<Math.min(this.index+3,this.top.children.length);e++)if(this.top.children[e].matchesMark(t[o])){r=e;break}if(r>-1)r>this.index&&(this.changed=!0,this.destroyBetween(this.index,r)),this.top=this.top.children[this.index];else{let r=hn.create(this.top,t[o],e,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,o++}}findNodeMatch(t,e,n,r){let o,i=-1;if(r>=this.preMatch.index&&(o=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&o.matchesNode(t,e,n))i=this.top.children.indexOf(o,this.index);else for(let r=this.index,o=Math.min(this.top.children.length,r+5);r<o;r++){let o=this.top.children[r];if(o.matchesNode(t,e,n)&&!this.preMatch.matched.has(o)){i=r;break}}return!(i<0||(this.destroyBetween(this.index,i),this.index++,0))}updateNodeAt(t,e,n,r,o){let i=this.top.children[r];return 3==i.dirty&&i.dom==i.contentDOM&&(i.dirty=2),!!i.update(t,e,n,o)&&(this.destroyBetween(this.index,r),this.index=r+1,!0)}findIndexWithChild(t){for(;;){let e=t.parentNode;if(!e)return-1;if(e==this.top.contentDOM){let e=t.pmViewDesc;if(e)for(let t=this.index;t<this.top.children.length;t++)if(this.top.children[t]==e)return t;return-1}t=e}}updateNextNode(t,e,n,r,o){for(let i=this.index;i<this.top.children.length;i++){let s=this.top.children[i];if(s instanceof fn){let a=this.preMatch.matched.get(s);if(null!=a&&a!=o)return!1;let l=s.dom;if((!this.lock||!(l==this.lock||1==l.nodeType&&l.contains(this.lock.parentNode))||t.isText&&s.node&&s.node.isText&&s.nodeDOM.nodeValue==t.text&&3!=s.dirty&&Sn(e,s.outerDeco))&&s.update(t,e,n,r))return this.destroyBetween(this.index,i),s.dom!=l&&(this.changed=!0),this.index++,!0;break}}return!1}addNode(t,e,n,r,o){this.top.children.splice(this.index++,0,fn.create(this.top,t,e,n,r,o)),this.changed=!0}placeWidget(t,e,n){let r=this.index<this.top.children.length?this.top.children[this.index]:null;if(!r||!r.matchesWidget(t)||t!=r.widget&&r.widget.type.toDOM.parentNode){let r=new dn(this.top,t,e,n);this.top.children.splice(this.index++,0,r),this.changed=!0}else this.index++}addTextblockHacks(){let t=this.top.children[this.index-1],e=this.top;for(;t instanceof hn;)e=t,t=e.children[e.children.length-1];t&&t instanceof gn&&!/\n$/.test(t.node.text)||((Ee||ke)&&t&&"false"==t.dom.contentEditable&&this.addHackNode("IMG",e),this.addHackNode("BR",this.top))}addHackNode(t,e){if(e==this.top&&this.index<e.children.length&&e.children[this.index].matchesHack(t))this.index++;else{let n=document.createElement(t);"IMG"==t&&(n.className="ProseMirror-separator",n.alt=""),"BR"==t&&(n.className="ProseMirror-trailingBreak");let r=new vn(this.top,[],n,null);e!=this.top?e.children.push(r):e.children.splice(this.index++,0,r),this.changed=!0}}}function Tn(t,e){return t.type.side-e.type.side}function Mn(t,e,n,r,o){let i=[];for(let s=0,a=0;s<t.length;s++){let l=t[s],u=a,c=a+=l.size;u>=n||c<=e?i.push(l):(u<e&&i.push(l.slice(0,e-u,r)),o&&(i.push(o),o=void 0),c>n&&i.push(l.slice(n-u,l.size,r)))}return i}function Fn(t,e=null){let n=t.domSelection(),r=t.state.doc;if(!n.focusNode)return null;let o=t.docView.nearestDesc(n.focusNode),i=o&&0==o.size,s=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a,l,u=r.resolve(s);if(je(n)){for(a=u;o&&!o.node;)o=o.parent;let t=o.node;if(o&&t.isAtom&&Zt.isSelectable(t)&&o.parent&&(!t.isInline||!function(t,e,n){for(let r=0==e,o=e==Ie(t);r||o;){if(t==n)return!0;let e=Fe(t);if(!(t=t.parentNode))return!1;r=r&&0==e,o=o&&e==Ie(t)}}(n.focusNode,n.focusOffset,o.dom))){let t=o.posBefore;l=new Zt(s==t?u:r.resolve(t))}}else{let e=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(e<0)return null;a=r.resolve(e)}return l||(l=jn(t,a,u,"pointer"==e||t.state.selection.head<u.pos&&!i?1:-1)),l}function Nn(t){return t.editable?t.hasFocus():Hn(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function Bn(t,e=!1){let n=t.state.selection;if(In(t,n),Nn(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&ke){let e=t.domSelection(),n=t.domObserver.currentSelection;if(e.anchorNode&&n.anchorNode&&Re(e.anchorNode,e.anchorOffset,n.anchorNode,n.anchorOffset))return t.input.mouseDown.delayedSelectionSync=!0,void t.domObserver.setCurSelection()}if(t.domObserver.disconnectSelection(),t.cursorWrapper)!function(t){let e=t.domSelection(),n=document.createRange(),r=t.cursorWrapper.dom,o="IMG"==r.nodeName;o?n.setEnd(r.parentNode,Fe(r)+1):n.setEnd(r,0),n.collapse(!1),e.removeAllRanges(),e.addRange(n),!o&&!t.state.selection.visible&&be&&we<=11&&(r.disabled=!0,r.disabled=!1)}(t);else{let r,o,{anchor:i,head:s}=n;!_n||n instanceof Gt||(n.$from.parent.inlineContent||(r=Rn(t,n.from)),n.empty||n.$from.parent.inlineContent||(o=Rn(t,n.to))),t.docView.setSelection(i,s,t.root,e),_n&&(r&&Ln(r),o&&Ln(o)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelection(),r=n.anchorNode,o=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{n.anchorNode==r&&n.anchorOffset==o||(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout((()=>{Nn(t)&&!t.state.selection.visible||t.dom.classList.remove("ProseMirror-hideselection")}),20))})}(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const _n=Ee||ke&&Ce<63;function Rn(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),o=r<n.childNodes.length?n.childNodes[r]:null,i=r?n.childNodes[r-1]:null;if(Ee&&o&&"false"==o.contentEditable)return zn(o);if(!(o&&"false"!=o.contentEditable||i&&"false"!=i.contentEditable)){if(o)return zn(o);if(i)return zn(i)}}function zn(t){return t.contentEditable="true",Ee&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function Ln(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function In(t,e){if(e instanceof Zt){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(Pn(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else Pn(t)}function Pn(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function jn(t,e,n,r){return t.someProp("createSelectionBetween",(r=>r(t,e,n)))||Gt.between(e,n,r)}function Vn(t){return(!t.editable||t.root.activeElement==t.dom)&&Hn(t)}function Hn(t){let e=t.domSelection();if(!e.anchorNode)return!1;try{return t.dom.contains(3==e.anchorNode.nodeType?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(3==e.focusNode.nodeType?e.focusNode.parentNode:e.focusNode))}catch(t){return!1}}function $n(t,e){let{$anchor:n,$head:r}=t.selection,o=e>0?n.max(r):n.min(r),i=o.parent.inlineContent?o.depth?t.doc.resolve(e>0?o.after():o.before()):null:o;return i&&Wt.findFrom(i,e)}function Wn(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function qn(t,e,n){let r=t.state.selection;if(!(r instanceof Gt)){if(r instanceof Zt&&r.node.isInline)return Wn(t,new Gt(e>0?r.$to:r.$from));{let n=$n(t.state,e);return!!n&&Wn(t,n)}}if(!r.empty||n.indexOf("s")>-1)return!1;if(t.endOfTextblock(e>0?"right":"left")){let n=$n(t.state,e);return!!(n&&n instanceof Zt)&&Wn(t,n)}if(!(Oe&&n.indexOf("m")>-1)){let n,o=r.$head,i=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter;if(!i||i.isText)return!1;let s=e<0?o.pos-i.nodeSize:o.pos;return!!(i.isAtom||(n=t.docView.descAt(s))&&!n.contentDOM)&&(Zt.isSelectable(i)?Wn(t,new Zt(e<0?t.state.doc.resolve(o.pos-i.nodeSize):o)):!!Te&&Wn(t,new Gt(t.state.doc.resolve(e<0?s:s+i.nodeSize))))}}function Un(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function Kn(t){let e=t.pmViewDesc;return e&&0==e.size&&(t.nextSibling||"BR"!=t.nodeName)}function Gn(t){let e=t.domSelection(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o,i,s=!1;for(xe&&1==n.nodeType&&r<Un(n)&&Kn(n.childNodes[r])&&(s=!0);;)if(r>0){if(1!=n.nodeType)break;{let t=n.childNodes[r-1];if(Kn(t))o=n,i=--r;else{if(3!=t.nodeType)break;n=t,r=n.nodeValue.length}}}else{if(Zn(n))break;{let e=n.previousSibling;for(;e&&Kn(e);)o=n.parentNode,i=Fe(e),e=e.previousSibling;if(e)n=e,r=Un(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}s?Yn(t,e,n,r):o&&Yn(t,e,o,i)}function Jn(t){let e=t.domSelection(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o,i,s=Un(n);for(;;)if(r<s){if(1!=n.nodeType)break;if(!Kn(n.childNodes[r]))break;o=n,i=++r}else{if(Zn(n))break;{let e=n.nextSibling;for(;e&&Kn(e);)o=e.parentNode,i=Fe(e)+1,e=e.nextSibling;if(e)n=e,r=0,s=Un(n);else{if(n=n.parentNode,n==t.dom)break;r=s=0}}}o&&Yn(t,e,o,i)}function Zn(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function Yn(t,e,n,r){if(je(e)){let t=document.createRange();t.setEnd(n,r),t.setStart(n,r),e.removeAllRanges(),e.addRange(t)}else e.extend&&e.extend(n,r);t.domObserver.setCurSelection();let{state:o}=t;setTimeout((()=>{t.state==o&&Bn(t)}),50)}function Xn(t,e,n){let r=t.state.selection;if(r instanceof Gt&&!r.empty||n.indexOf("s")>-1)return!1;if(Oe&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let n=$n(t.state,e);if(n&&n instanceof Zt)return Wn(t,n)}if(!o.parent.inlineContent){let n=e<0?o:i,s=r instanceof Xt?Wt.near(n,e):Wt.findFrom(n,e);return!!s&&Wn(t,s)}return!1}function Qn(t,e){if(!(t.state.selection instanceof Gt))return!0;let{$head:n,$anchor:r,empty:o}=t.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let i=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let r=t.state.tr;return e<0?r.delete(n.pos-i.nodeSize,n.pos):r.delete(n.pos,n.pos+i.nodeSize),t.dispatch(r),!0}return!1}function tr(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function er(t,e){let n=[],{content:r,openStart:o,openEnd:i}=e;for(;o>1&&i>1&&1==r.childCount&&1==r.firstChild.childCount;){o--,i--;let t=r.firstChild;n.push(t.type.name,t.attrs!=t.type.defaultAttrs?t.attrs:null),r=t.content}let s=t.someProp("clipboardSerializer")||at.fromSchema(t.state.schema),a=dr(),l=a.createElement("div");l.appendChild(s.serializeFragment(r,{document:a}));let u,c=l.firstChild,d=0;for(;c&&1==c.nodeType&&(u=ur[c.nodeName.toLowerCase()]);){for(let t=u.length-1;t>=0;t--){let e=a.createElement(u[t]);for(;l.firstChild;)e.appendChild(l.firstChild);l.appendChild(e),d++}c=l.firstChild}return c&&1==c.nodeType&&c.setAttribute("data-pm-slice",`${o} ${i}${d?` -${d}`:""} ${JSON.stringify(n)}`),{dom:l,text:t.someProp("clipboardTextSerializer",(t=>t(e)))||e.content.textBetween(0,e.content.size,"\n\n")}}function nr(t,e,n,r,o){let i,s,l=o.parent.type.spec.code;if(!n&&!e)return null;let u=e&&(r||l||!n);if(u){if(t.someProp("transformPastedText",(t=>{e=t(e,l||r)})),l)return e?new h(a.from(t.state.schema.text(e.replace(/\r\n?/g,"\n"))),0,0):h.empty;let n=t.someProp("clipboardTextParser",(t=>t(e,o,r)));if(n)s=n;else{let n=o.marks(),{schema:r}=t.state,s=at.fromSchema(r);i=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach((t=>{let e=i.appendChild(document.createElement("p"));t&&e.appendChild(s.serializeNode(r.text(t,n)))}))}}else t.someProp("transformPastedHTML",(t=>{n=t(n)})),i=function(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n,r=dr().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(t);if((n=o&&ur[o[1].toLowerCase()])&&(t=n.map((t=>"<"+t+">")).join("")+t+n.map((t=>"</"+t+">")).reverse().join("")),r.innerHTML=t,n)for(let t=0;t<n.length;t++)r=r.querySelector(n[t])||r;return r}(n),Te&&function(t){let e=t.querySelectorAll(ke?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let r=e[n];1==r.childNodes.length&&" "==r.textContent&&r.parentNode&&r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),r)}}(i);let c=i&&i.querySelector("[data-pm-slice]"),d=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(d&&d[3])for(let t=+d[3];t>0&&i.firstChild;t--)i=i.firstChild;if(!s){let e=t.someProp("clipboardParser")||t.someProp("domParser")||Y.fromSchema(t.state.schema);s=e.parseSlice(i,{preserveWhitespace:!(!u&&!d),context:o,ruleFromNode:t=>"BR"!=t.nodeName||t.nextSibling||!t.parentNode||rr.test(t.parentNode.nodeName)?null:{ignore:!0}})}if(d)s=function(t,e){if(!t.size)return t;let n,r=t.content.firstChild.type.schema;try{n=JSON.parse(e)}catch(e){return t}let{content:o,openStart:i,openEnd:s}=t;for(let t=n.length-2;t>=0;t-=2){let e=r.nodes[n[t]];if(!e||e.hasRequiredAttrs())break;o=a.from(e.create(n[t+1],o)),i++,s++}return new h(o,i,s)}(lr(s,+d[1],+d[2]),d[4]);else if(s=h.maxOpen(function(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let r,o=e.node(n).contentMatchAt(e.index(n)),i=[];if(t.forEach((t=>{if(!i)return;let e,n=o.findWrapping(t.type);if(!n)return i=null;if(e=i.length&&r.length&&ir(n,r,t,i[i.length-1],0))i[i.length-1]=e;else{i.length&&(i[i.length-1]=sr(i[i.length-1],r.length));let e=or(t,n);i.push(e),o=o.matchType(e.type),r=n}})),i)return a.from(i)}return t}(s.content,o),!0),s.openStart||s.openEnd){let t=0,e=0;for(let e=s.content.firstChild;t<s.openStart&&!e.type.spec.isolating;t++,e=e.firstChild);for(let t=s.content.lastChild;e<s.openEnd&&!t.type.spec.isolating;e++,t=t.lastChild);s=lr(s,t,e)}return t.someProp("transformPasted",(t=>{s=t(s)})),s}const rr=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function or(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,a.from(t));return t}function ir(t,e,n,r,o){if(o<t.length&&o<e.length&&t[o]==e[o]){let i=ir(t,e,n,r.lastChild,o+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(o==t.length-1?n.type:t[o+1]))return r.copy(r.content.append(a.from(or(n,t,o+1))))}}function sr(t,e){if(0==e)return t;let n=t.content.replaceChild(t.childCount-1,sr(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(a.empty,!0);return t.copy(n.append(r))}function ar(t,e,n,r,o,i){let s=e<0?t.firstChild:t.lastChild,l=s.content;return o<r-1&&(l=ar(l,e,n,r,o+1,i)),o>=n&&(l=e<0?s.contentMatchAt(0).fillBefore(l,t.childCount>1||i<=o).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(a.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(l))}function lr(t,e,n){return e<t.openStart&&(t=new h(ar(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new h(ar(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const ur={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let cr=null;function dr(){return cr||(cr=document.implementation.createHTMLDocument("title"))}const pr={};let hr={};class fr{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastAndroidDelete=0,this.composing=!1,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function mr(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function gr(t){t.someProp("handleDOMEvents",(e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=e=>vr(t,e))}))}function vr(t,e){return t.someProp("handleDOMEvents",(n=>{let r=n[e.type];return!!r&&(r(t,e)||e.defaultPrevented)}))}function yr(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function br(t){return{left:t.clientX,top:t.clientY}}function wr(t,e,n,r,o){if(-1==r)return!1;let i=t.state.doc.resolve(r);for(let r=i.depth+1;r>0;r--)if(t.someProp(e,(e=>r>i.depth?e(t,n,i.nodeAfter,i.before(r),o,!0):e(t,n,i.node(r),i.before(r),o,!1))))return!0;return!1}function xr(t,e,n){t.focused||t.focus();let r=t.state.tr.setSelection(e);"pointer"==n&&r.setMeta("pointer",!0),t.dispatch(r)}function Dr(t,e,n,r){return wr(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",(n=>n(t,e,r)))}function kr(t,e,n,r){return wr(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",(n=>n(t,e,r)))||function(t,e,n){if(0!=n.button)return!1;let r=t.state.doc;if(-1==e)return!!r.inlineContent&&(xr(t,Gt.create(r,0,r.content.size),"pointer"),!0);let o=r.resolve(e);for(let e=o.depth+1;e>0;e--){let n=e>o.depth?o.nodeAfter:o.node(e),i=o.before(e);if(n.inlineContent)xr(t,Gt.create(r,i+1,i+1+n.content.size),"pointer");else{if(!Zt.isSelectable(n))continue;xr(t,Zt.create(r,i),"pointer")}return!0}}(t,n,r)}function Cr(t){return Fr(t)}hr.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=16==n.keyCode||n.shiftKey,!Or(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!Ae||!ke||13!=n.keyCode))if(229!=n.keyCode&&t.domObserver.forceFlush(),!Se||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)t.someProp("handleKeyDown",(e=>e(t,n)))||function(t,e){let n=e.keyCode,r=function(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}(e);return 8==n||Oe&&72==n&&"c"==r?Qn(t,-1)||Gn(t):46==n||Oe&&68==n&&"c"==r?Qn(t,1)||Jn(t):13==n||27==n||(37==n||Oe&&66==n&&"c"==r?qn(t,-1,r)||Gn(t):39==n||Oe&&70==n&&"c"==r?qn(t,1,r)||Jn(t):38==n||Oe&&80==n&&"c"==r?Xn(t,-1,r)||Gn(t):40==n||Oe&&78==n&&"c"==r?function(t){if(!Ee||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelection();if(e&&1==e.nodeType&&0==n&&e.firstChild&&"false"==e.firstChild.contentEditable){let n=e.firstChild;tr(t,n,"true"),setTimeout((()=>tr(t,n,"false")),20)}return!1}(t)||Xn(t,1,r)||Jn(t):r==(Oe?"m":"c")&&(66==n||73==n||89==n||90==n))}(t,n)?n.preventDefault():mr(t,"key");else{let e=Date.now();t.input.lastIOSEnter=e,t.input.lastIOSEnterFallbackTimeout=setTimeout((()=>{t.input.lastIOSEnter==e&&(t.someProp("handleKeyDown",(e=>e(t,Ve(13,"Enter")))),t.input.lastIOSEnter=0)}),200)}},hr.keyup=(t,e)=>{16==e.keyCode&&(t.input.shiftKey=!1)},hr.keypress=(t,e)=>{let n=e;if(Or(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||Oe&&n.metaKey)return;if(t.someProp("handleKeyPress",(e=>e(t,n))))return void n.preventDefault();let r=t.state.selection;if(!(r instanceof Gt&&r.$from.sameParent(r.$to))){let e=String.fromCharCode(n.charCode);t.someProp("handleTextInput",(n=>n(t,r.$from.pos,r.$to.pos,e)))||t.dispatch(t.state.tr.insertText(e).scrollIntoView()),n.preventDefault()}};const Er=Oe?"metaKey":"ctrlKey";pr.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=Cr(t),o=Date.now(),i="singleClick";o-t.input.lastClick.time<500&&function(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}(n,t.input.lastClick)&&!n[Er]&&("singleClick"==t.input.lastClick.type?i="doubleClick":"doubleClick"==t.input.lastClick.type&&(i="tripleClick")),t.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i};let s=t.posAtCoords(br(n));s&&("singleClick"==i?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new Sr(t,s,n,!!r)):("doubleClick"==i?Dr:kr)(t,s.pos,s.inside,n)?n.preventDefault():mr(t,"pointer"))};class Sr{constructor(t,e,n,r){let o,i;if(this.view=t,this.pos=e,this.event=n,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!n[Er],this.allowDefault=n.shiftKey,e.inside>-1)o=t.state.doc.nodeAt(e.inside),i=e.inside;else{let n=t.state.doc.resolve(e.pos);o=n.parent,i=n.depth?n.before():0}const s=r?null:n.target,a=s?t.docView.nearestDesc(s,!0):null;this.target=a?a.dom:null;let{selection:l}=t.state;(0==n.button&&o.type.spec.draggable&&!1!==o.type.spec.selectable||l instanceof Zt&&l.from<=i&&l.to>i)&&(this.mightDrag={node:o,pos:i,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!xe||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((()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),mr(t,"pointer")}done(){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.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((()=>Bn(this.view))),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let e=this.pos;this.view.state.doc!=this.startDoc&&(e=this.view.posAtCoords(br(t))),this.allowDefault||!e?mr(this.view,"pointer"):function(t,e,n,r,o){return wr(t,"handleClickOn",e,n,r)||t.someProp("handleClick",(n=>n(t,e,r)))||(o?function(t,e){if(-1==e)return!1;let n,r,o=t.state.selection;o instanceof Zt&&(n=o.node);let i=t.state.doc.resolve(e);for(let t=i.depth+1;t>0;t--){let e=t>i.depth?i.nodeAfter:i.node(t);if(Zt.isSelectable(e)){r=n&&o.$from.depth>0&&t>=o.$from.depth&&i.before(o.$from.depth+1)==o.$from.pos?i.before(o.$from.depth):i.before(t);break}}return null!=r&&(xr(t,Zt.create(t.state.doc,r),"pointer"),!0)}(t,n):function(t,e){if(-1==e)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return!!(r&&r.isAtom&&Zt.isSelectable(r))&&(xr(t,new Zt(n),"pointer"),!0)}(t,n))}(this.view,e.pos,e.inside,t,this.selectNode)?t.preventDefault():0==t.button&&(this.flushed||Ee&&this.mightDrag&&!this.mightDrag.node.isAtom||ke&&!(this.view.state.selection instanceof Gt)&&Math.min(Math.abs(e.pos-this.view.state.selection.from),Math.abs(e.pos-this.view.state.selection.to))<=2)?(xr(this.view,Wt.near(this.view.state.doc.resolve(e.pos)),"pointer"),t.preventDefault()):mr(this.view,"pointer")}move(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0),mr(this.view,"pointer"),0==t.buttons&&this.done()}}function Or(t,e){return!!t.composing||!!(Ee&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500)&&(t.input.compositionEndedAt=-2e8,!0)}pr.touchdown=t=>{Cr(t),mr(t,"pointer")},pr.contextmenu=t=>Cr(t);const Ar=Ae?5e3:-1;function Tr(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout((()=>Fr(t)),e))}function Mr(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=function(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function Fr(t,e=!1){if(!(Ae&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),Mr(t),e||t.docView&&t.docView.dirty){let e=Fn(t);return e&&!e.eq(t.state.selection)?t.dispatch(t.state.tr.setSelection(e)):t.updateState(t.state),!0}return!1}}hr.compositionstart=hr.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$from;if(e.selection.empty&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((t=>!1===t.type.spec.inclusive))))t.markCursor=t.state.storedMarks||n.marks(),Fr(t,!0),t.markCursor=null;else if(Fr(t),xe&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let e=t.domSelection();for(let t=e.focusNode,n=e.focusOffset;t&&1==t.nodeType&&0!=n;){let r=n<0?t.lastChild:t.childNodes[n-1];if(!r)break;if(3==r.nodeType){e.collapse(r,r.nodeValue.length);break}t=r,n=-1}}t.input.composing=!0}Tr(t,Ar)},hr.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,Tr(t,20))};const Nr=be&&we<15||Se&&Me<604;function Br(t,e,n,r){let o=nr(t,e,n,t.input.shiftKey,t.state.selection.$from);if(t.someProp("handlePaste",(e=>e(t,r,o||h.empty))))return!0;if(!o)return!1;let i=function(t){return 0==t.openStart&&0==t.openEnd&&1==t.content.childCount?t.content.firstChild:null}(o),s=i?t.state.tr.replaceSelectionWith(i,t.input.shiftKey):t.state.tr.replaceSelection(o);return t.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}pr.copy=hr.cut=(t,e)=>{let n=e,r=t.state.selection,o="cut"==n.type;if(r.empty)return;let i=Nr?null:n.clipboardData,s=r.content(),{dom:a,text:l}=er(t,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",a.innerHTML),i.setData("text/plain",l)):function(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout((()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()}),50)}(t,a),o&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},hr.paste=(t,e)=>{let n=e;if(t.composing&&!Ae)return;let r=Nr?null:n.clipboardData;r&&Br(t,r.getData("text/plain"),r.getData("text/html"),n)?n.preventDefault():function(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout((()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Br(t,r.value,null,e):Br(t,r.textContent,r.innerHTML,e)}),50)}(t,n)};class _r{constructor(t,e){this.slice=t,this.move=e}}const Rr=Oe?"altKey":"ctrlKey";pr.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=t.state.selection,i=o.empty?null:t.posAtCoords(br(n));if(i&&i.pos>=o.from&&i.pos<=(o instanceof Zt?o.to-1:o.to));else if(r&&r.mightDrag)t.dispatch(t.state.tr.setSelection(Zt.create(t.state.doc,r.mightDrag.pos)));else if(n.target&&1==n.target.nodeType){let e=t.docView.nearestDesc(n.target,!0);e&&e.node.type.spec.draggable&&e!=t.docView&&t.dispatch(t.state.tr.setSelection(Zt.create(t.state.doc,e.posBefore)))}let s=t.state.selection.content(),{dom:a,text:l}=er(t,s);n.dataTransfer.clearData(),n.dataTransfer.setData(Nr?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",Nr||n.dataTransfer.setData("text/plain",l),t.dragging=new _r(s,!n[Rr])},pr.dragend=t=>{let e=t.dragging;window.setTimeout((()=>{t.dragging==e&&(t.dragging=null)}),50)},hr.dragover=hr.dragenter=(t,e)=>e.preventDefault(),hr.drop=(t,e)=>{let n=e,r=t.dragging;if(t.dragging=null,!n.dataTransfer)return;let o=t.posAtCoords(br(n));if(!o)return;let i=t.state.doc.resolve(o.pos);if(!i)return;let s=r&&r.slice;s?t.someProp("transformPasted",(t=>{s=t(s)})):s=nr(t,n.dataTransfer.getData(Nr?"Text":"text/plain"),Nr?null:n.dataTransfer.getData("text/html"),!1,i);let a=!(!r||n[Rr]);if(t.someProp("handleDrop",(e=>e(t,n,s||h.empty,a))))return void n.preventDefault();if(!s)return;n.preventDefault();let l=s?function(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let o=n.content;for(let t=0;t<n.openStart;t++)o=o.firstChild.content;for(let t=1;t<=(0==n.openStart&&n.size?2:1);t++)for(let e=r.depth;e>=0;e--){let n=e==r.depth?0:r.pos<=(r.start(e+1)+r.end(e+1))/2?-1:1,i=r.index(e)+(n>0?1:0),s=r.node(e),a=!1;if(1==t)a=s.canReplace(i,i,o);else{let t=s.contentMatchAt(i).findWrapping(o.firstChild.type);a=t&&s.canReplaceWith(i,i,t[0])}if(a)return 0==n?r.pos:n<0?r.before(e+1):r.after(e+1)}return null}(t.state.doc,i.pos,s):i.pos;null==l&&(l=i.pos);let u=t.state.tr;a&&u.deleteSelection();let c=u.mapping.map(l),d=0==s.openStart&&0==s.openEnd&&1==s.content.childCount,p=u.doc;if(d?u.replaceRangeWith(c,c,s.content.firstChild):u.replaceRange(c,c,s),u.doc.eq(p))return;let f=u.doc.resolve(c);if(d&&Zt.isSelectable(s.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(s.content.firstChild))u.setSelection(new Zt(f));else{let e=u.mapping.map(l);u.mapping.maps[u.mapping.maps.length-1].forEach(((t,n,r,o)=>e=o)),u.setSelection(jn(t,f,u.doc.resolve(e)))}t.focus(),t.dispatch(u.setMeta("uiEvent","drop"))},pr.focus=t=>{t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout((()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelection())&&Bn(t)}),20))},pr.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)},pr.beforeinput=(t,e)=>{if(ke&&Ae&&"deleteContentBackward"==e.inputType){t.domObserver.flushSoon();let{domChangeCount:e}=t.input;setTimeout((()=>{if(t.input.domChangeCount!=e)return;if(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",(e=>e(t,Ve(8,"Backspace")))))return;let{$cursor:n}=t.state.selection;n&&n.pos>0&&t.dispatch(t.state.tr.delete(n.pos-1,n.pos).scrollIntoView())}),50)}};for(let t in hr)pr[t]=hr[t];function zr(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class Lr{constructor(t,e){this.toDOM=t,this.spec=e||Hr,this.side=this.spec.side||0}map(t,e,n,r){let{pos:o,deleted:i}=t.mapResult(e.from+r,this.side<0?-1:1);return i?null:new jr(o-n,o-n,this)}valid(){return!0}eq(t){return this==t||t instanceof Lr&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&zr(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class Ir{constructor(t,e){this.attrs=t,this.spec=e||Hr}map(t,e,n,r){let o=t.map(e.from+r,this.spec.inclusiveStart?-1:1)-n,i=t.map(e.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=i?null:new jr(o,i,this)}valid(t,e){return e.from<e.to}eq(t){return this==t||t instanceof Ir&&zr(this.attrs,t.attrs)&&zr(this.spec,t.spec)}static is(t){return t.type instanceof Ir}destroy(){}}class Pr{constructor(t,e){this.attrs=t,this.spec=e||Hr}map(t,e,n,r){let o=t.mapResult(e.from+r,1);if(o.deleted)return null;let i=t.mapResult(e.to+r,-1);return i.deleted||i.pos<=o.pos?null:new jr(o.pos-n,i.pos-n,this)}valid(t,e){let n,{index:r,offset:o}=t.content.findIndex(e.from);return o==e.from&&!(n=t.child(r)).isText&&o+n.nodeSize==e.to}eq(t){return this==t||t instanceof Pr&&zr(this.attrs,t.attrs)&&zr(this.spec,t.spec)}destroy(){}}class jr{constructor(t,e,n){this.from=t,this.to=e,this.type=n}copy(t,e){return new jr(t,e,this.type)}eq(t,e=0){return this.type.eq(t.type)&&this.from+e==t.from&&this.to+e==t.to}map(t,e,n){return this.type.map(t,this,e,n)}static widget(t,e,n){return new jr(t,t,new Lr(e,n))}static inline(t,e,n,r){return new jr(t,e,new Ir(n,r))}static node(t,e,n,r){return new jr(t,e,new Pr(n,r))}get spec(){return this.type.spec}get inline(){return this.type instanceof Ir}}const Vr=[],Hr={};class $r{constructor(t,e){this.local=t.length?t:Vr,this.children=e.length?e:Vr}static create(t,e){return e.length?Jr(e,t,0,Hr):Wr}find(t,e,n){let r=[];return this.findInner(null==t?0:t,null==e?1e9:e,r,0,n),r}findInner(t,e,n,r,o){for(let i=0;i<this.local.length;i++){let s=this.local[i];s.from<=e&&s.to>=t&&(!o||o(s.spec))&&n.push(s.copy(s.from+r,s.to+r))}for(let i=0;i<this.children.length;i+=3)if(this.children[i]<e&&this.children[i+1]>t){let s=this.children[i]+1;this.children[i+2].findInner(t-s,e-s,n,r+s,o)}}map(t,e,n){return this==Wr||0==t.maps.length?this:this.mapInner(t,e,0,0,n||Hr)}mapInner(t,e,n,r,o){let i;for(let s=0;s<this.local.length;s++){let a=this.local[s].map(t,n,r);a&&a.type.valid(e,a)?(i||(i=[])).push(a):o.onRemove&&o.onRemove(this.local[s].spec)}return this.children.length?function(t,e,n,r,o,i,s){let a=t.slice(),l=(t,e,n,r)=>{for(let s=0;s<a.length;s+=3){let l,u=a[s+1];if(u<0||t>u+i)continue;let c=a[s]+i;e>=c?a[s+1]=t<=c?-2:-1:n>=o&&(l=r-n-(e-t))&&(a[s]+=l,a[s+1]+=l)}};for(let t=0;t<n.maps.length;t++)n.maps[t].forEach(l);let u=!1;for(let e=0;e<a.length;e+=3)if(a[e+1]<0){if(-2==a[e+1]){u=!0,a[e+1]=-1;continue}let l=n.map(t[e]+i),c=l-o;if(c<0||c>=r.content.size){u=!0;continue}let d=n.map(t[e+1]+i,-1)-o,{index:p,offset:h}=r.content.findIndex(c),f=r.maybeChild(p);if(f&&h==c&&h+f.nodeSize==d){let r=a[e+2].mapInner(n,f,l+1,t[e]+i+1,s);r!=Wr?(a[e]=c,a[e+1]=d,a[e+2]=r):(a[e+1]=-2,u=!0)}else u=!0}if(u){let l=function(t,e,n,r,o,i,s){function a(t,e){for(let i=0;i<t.local.length;i++){let a=t.local[i].map(r,o,e);a?n.push(a):s.onRemove&&s.onRemove(t.local[i].spec)}for(let n=0;n<t.children.length;n+=3)a(t.children[n+2],t.children[n]+e+1)}for(let n=0;n<t.length;n+=3)-1==t[n+1]&&a(t[n+2],e[n]+i+1);return n}(a,t,e,n,o,i,s),u=Jr(l,r,0,s);e=u.local;for(let t=0;t<a.length;t+=3)a[t+1]<0&&(a.splice(t,3),t-=3);for(let t=0,e=0;t<u.children.length;t+=3){let n=u.children[t];for(;e<a.length&&a[e]<n;)e+=3;a.splice(e,0,u.children[t],u.children[t+1],u.children[t+2])}}return new $r(e.sort(Zr),a)}(this.children,i||[],t,e,n,r,o):i?new $r(i.sort(Zr),Vr):Wr}add(t,e){return e.length?this==Wr?$r.create(t,e):this.addInner(t,e,0):this}addInner(t,e,n){let r,o=0;t.forEach(((t,i)=>{let s,a=i+n;if(s=Kr(e,t,a)){for(r||(r=this.children.slice());o<r.length&&r[o]<i;)o+=3;r[o]==i?r[o+2]=r[o+2].addInner(t,s,a+1):r.splice(o,0,i,i+t.nodeSize,Jr(s,t,a+1,Hr)),o+=3}}));let i=Ur(o?Gr(e):e,-n);for(let e=0;e<i.length;e++)i[e].type.valid(t,i[e])||i.splice(e--,1);return new $r(i.length?this.local.concat(i).sort(Zr):this.local,r||this.children)}remove(t){return 0==t.length||this==Wr?this:this.removeInner(t,0)}removeInner(t,e){let n=this.children,r=this.local;for(let r=0;r<n.length;r+=3){let o,i=n[r]+e,s=n[r+1]+e;for(let e,n=0;n<t.length;n++)(e=t[n])&&e.from>i&&e.to<s&&(t[n]=null,(o||(o=[])).push(e));if(!o)continue;n==this.children&&(n=this.children.slice());let a=n[r+2].removeInner(o,i+1);a!=Wr?n[r+2]=a:(n.splice(r,3),r-=3)}if(r.length)for(let n,o=0;o<t.length;o++)if(n=t[o])for(let t=0;t<r.length;t++)r[t].eq(n,e)&&(r==this.local&&(r=this.local.slice()),r.splice(t--,1));return n==this.children&&r==this.local?this:r.length||n.length?new $r(r,n):Wr}forChild(t,e){if(this==Wr)return this;if(e.isLeaf)return $r.empty;let n,r;for(let e=0;e<this.children.length;e+=3)if(this.children[e]>=t){this.children[e]==t&&(n=this.children[e+2]);break}let o=t+1,i=o+e.content.size;for(let t=0;t<this.local.length;t++){let e=this.local[t];if(e.from<i&&e.to>o&&e.type instanceof Ir){let t=Math.max(o,e.from)-o,n=Math.min(i,e.to)-o;t<n&&(r||(r=[])).push(e.copy(t,n))}}if(r){let t=new $r(r.sort(Zr),Vr);return n?new qr([t,n]):t}return n||Wr}eq(t){if(this==t)return!0;if(!(t instanceof $r)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(let e=0;e<this.local.length;e++)if(!this.local[e].eq(t.local[e]))return!1;for(let e=0;e<this.children.length;e+=3)if(this.children[e]!=t.children[e]||this.children[e+1]!=t.children[e+1]||!this.children[e+2].eq(t.children[e+2]))return!1;return!0}locals(t){return Yr(this.localsInner(t))}localsInner(t){if(this==Wr)return Vr;if(t.inlineContent||!this.local.some(Ir.is))return this.local;let e=[];for(let t=0;t<this.local.length;t++)this.local[t].type instanceof Ir||e.push(this.local[t]);return e}}$r.empty=new $r([],[]),$r.removeOverlap=Yr;const Wr=$r.empty;class qr{constructor(t){this.members=t}map(t,e){const n=this.members.map((n=>n.map(t,e,Hr)));return qr.from(n)}forChild(t,e){if(e.isLeaf)return $r.empty;let n=[];for(let r=0;r<this.members.length;r++){let o=this.members[r].forChild(t,e);o!=Wr&&(o instanceof qr?n=n.concat(o.members):n.push(o))}return qr.from(n)}eq(t){if(!(t instanceof qr)||t.members.length!=this.members.length)return!1;for(let e=0;e<this.members.length;e++)if(!this.members[e].eq(t.members[e]))return!1;return!0}locals(t){let e,n=!0;for(let r=0;r<this.members.length;r++){let o=this.members[r].localsInner(t);if(o.length)if(e){n&&(e=e.slice(),n=!1);for(let t=0;t<o.length;t++)e.push(o[t])}else e=o}return e?Yr(n?e:e.sort(Zr)):Vr}static from(t){switch(t.length){case 0:return Wr;case 1:return t[0];default:return new qr(t)}}}function Ur(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;r<t.length;r++){let o=t[r];n.push(new jr(o.from+e,o.to+e,o.type))}return n}function Kr(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,o=null;for(let e,i=0;i<t.length;i++)(e=t[i])&&e.from>n&&e.to<r&&((o||(o=[])).push(e),t[i]=null);return o}function Gr(t){let e=[];for(let n=0;n<t.length;n++)null!=t[n]&&e.push(t[n]);return e}function Jr(t,e,n,r){let o=[],i=!1;e.forEach(((e,s)=>{let a=Kr(t,e,s+n);if(a){i=!0;let t=Jr(a,e,n+s+1,r);t!=Wr&&o.push(s,s+e.nodeSize,t)}}));let s=Ur(i?Gr(t):t,-n).sort(Zr);for(let t=0;t<s.length;t++)s[t].type.valid(e,s[t])||(r.onRemove&&r.onRemove(s[t].spec),s.splice(t--,1));return s.length||o.length?new $r(s,o):Wr}function Zr(t,e){return t.from-e.from||t.to-e.to}function Yr(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let o=n+1;o<e.length;o++){let i=e[o];if(i.from!=r.from){i.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,i.from),Xr(e,o,r.copy(i.from,r.to)));break}i.to!=r.to&&(e==t&&(e=t.slice()),e[o]=i.copy(i.from,r.to),Xr(e,o+1,i.copy(r.to,i.to)))}}return e}function Xr(t,e,n){for(;e<t.length&&Zr(n,t[e])>0;)e++;t.splice(e,0,n)}function Qr(t){let e=[];return t.someProp("decorations",(n=>{let r=n(t.state);r&&r!=Wr&&e.push(r)})),t.cursorWrapper&&e.push($r.create(t.state.doc,[t.cursorWrapper.deco])),qr.from(e)}const to={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},eo=be&&we<=11;class no{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}}class ro{constructor(t,e){this.view=t,this.handleDOMChange=e,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new no,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver((t=>{for(let e=0;e<t.length;e++)this.queue.push(t[e]);be&&we<=11&&t.some((t=>"childList"==t.type&&t.removedNodes.length||"characterData"==t.type&&t.oldValue.length>t.target.nodeValue.length))?this.flushSoon():this.flush()})),eo&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((()=>{this.flushingSoon=-1,this.flush()}),20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&this.observer.observe(this.view.dom,to),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let e=0;e<t.length;e++)this.queue.push(t[e]);window.setTimeout((()=>this.flush()),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout((()=>this.suppressingSelectionUpdates=!1),50)}onSelectionChange(){if(Vn(this.view)){if(this.suppressingSelectionUpdates)return Bn(this.view);if(be&&we<=11&&!this.view.state.selection.empty){let t=this.view.domSelection();if(t.focusNode&&Re(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelection())}ignoreSelectionChange(t){if(0==t.rangeCount)return!0;let e=t.getRangeAt(0).commonAncestorContainer,n=this.view.docView.nearestDesc(e);return n&&n.ignoreMutation({type:"selection",target:3==e.nodeType?e.parentNode:e})?(this.setCurSelection(),!0):void 0}flush(){if(!this.view.docView||this.flushingSoon>-1)return;let t=this.observer?this.observer.takeRecords():[];this.queue.length&&(t=this.queue.concat(t),this.queue.length=0);let e=this.view.domSelection(),n=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(e)&&Vn(this.view)&&!this.ignoreSelectionChange(e),r=-1,o=-1,i=!1,s=[];if(this.view.editable)for(let e=0;e<t.length;e++){let n=this.registerMutation(t[e],s);n&&(r=r<0?n.from:Math.min(n.from,r),o=o<0?n.to:Math.max(n.to,o),n.typeOver&&(i=!0))}if(xe&&s.length>1){let t=s.filter((t=>"BR"==t.nodeName));if(2==t.length){let e=t[0],n=t[1];e.parentNode&&e.parentNode.parentNode==n.parentNode?n.remove():e.remove()}}var a;(r>-1||n)&&(r>-1&&(this.view.docView.markDirty(r,o),a=this.view,oo||(oo=!0,"normal"==getComputedStyle(a.dom).whiteSpace&&console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."))),this.handleDOMChange(r,o,i,s),this.view.docView&&this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(e)||Bn(this.view),this.currentSelection.set(e))}registerMutation(t,e){if(e.indexOf(t.target)>-1)return null;let n=this.view.docView.nearestDesc(t.target);if("attributes"==t.type&&(n==this.view.docView||"contenteditable"==t.attributeName||"style"==t.attributeName&&!t.oldValue&&!t.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(t))return null;if("childList"==t.type){for(let n=0;n<t.addedNodes.length;n++)e.push(t.addedNodes[n]);if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(t.target))return{from:n.posBefore,to:n.posAfter};let r=t.previousSibling,o=t.nextSibling;if(be&&we<=11&&t.addedNodes.length)for(let e=0;e<t.addedNodes.length;e++){let{previousSibling:n,nextSibling:i}=t.addedNodes[e];(!n||Array.prototype.indexOf.call(t.addedNodes,n)<0)&&(r=n),(!i||Array.prototype.indexOf.call(t.addedNodes,i)<0)&&(o=i)}let i=r&&r.parentNode==t.target?Fe(r)+1:0,s=n.localPosFromDOM(t.target,i,-1),a=o&&o.parentNode==t.target?Fe(o):t.target.childNodes.length;return{from:s,to:n.localPosFromDOM(t.target,a,1)}}return"attributes"==t.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:{from:n.posAtStart,to:n.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}}}let oo=!1;function io(t){let e=t.pmViewDesc;if(e)return e.parseRule();if("BR"==t.nodeName&&t.parentNode){if(Ee&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let t=document.createElement("div");return t.appendChild(document.createElement("li")),{skip:t}}if(t.parentNode.lastChild==t||Ee&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if("IMG"==t.nodeName&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}function so(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:jn(t,e.resolve(n.anchor),e.resolve(n.head))}function ao(t,e,n){let r=t.depth,o=e?t.end():t.pos;for(;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,o++,e=!1;if(n){let e=t.node(r).maybeChild(t.indexAfter(r));for(;e&&!e.isLeaf;)e=e.firstChild,o++}return o}class lo{constructor(t,e){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new fr,this.prevDirectPlugins=[],this.pluginViews=[],this.dragging=null,this._props=e,this.state=e.state,this.directPlugins=e.plugins||[],this.directPlugins.forEach(fo),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):"function"==typeof t?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=po(this),co(this),this.nodeViews=ho(this),this.docView=mn(this.state.doc,uo(this),Qr(this),this.dom,this),this.domObserver=new ro(this,((t,e,n,r)=>function(t,e,n,r,o){if(e<0){let e=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,n=Fn(t,e);if(n&&!t.state.selection.eq(n)){let r=t.state.tr.setSelection(n);"pointer"==e?r.setMeta("pointer",!0):"key"==e&&r.scrollIntoView(),t.dispatch(r)}return}let i=t.state.doc.resolve(e),s=i.sharedDepth(n);e=i.before(s+1),n=t.state.doc.resolve(n).after(s+1);let l=t.state.selection,u=function(t,e,n){let r,{node:o,fromOffset:i,toOffset:s,from:a,to:l}=t.docView.parseRange(e,n),u=t.domSelection(),c=u.anchorNode;if(c&&t.dom.contains(1==c.nodeType?c:c.parentNode)&&(r=[{node:c,offset:u.anchorOffset}],je(u)||r.push({node:u.focusNode,offset:u.focusOffset})),ke&&8===t.input.lastKeyCode)for(let t=s;t>i;t--){let e=o.childNodes[t-1],n=e.pmViewDesc;if("BR"==e.nodeName&&!n){s=t;break}if(!n||n.size)break}let d=t.state.doc,p=t.someProp("domParser")||Y.fromSchema(t.state.schema),h=d.resolve(a),f=null,m=p.parse(o,{topNode:h.parent,topMatch:h.parent.contentMatchAt(h.index()),topOpen:!0,from:i,to:s,preserveWhitespace:"pre"!=h.parent.type.whitespace||"full",findPositions:r,ruleFromNode:io,context:h});if(r&&null!=r[0].pos){let t=r[0].pos,e=r[1]&&r[1].pos;null==e&&(e=t),f={anchor:t+a,head:e+a}}return{doc:m,sel:f,from:a,to:l}}(t,e,n);if(ke&&t.cursorWrapper&&u.sel&&u.sel.anchor==t.cursorWrapper.deco.from){let e=t.cursorWrapper.deco.type.toDOM.nextSibling,n=e&&e.nodeValue?e.nodeValue.length:1;u.sel={anchor:u.sel.anchor+n,head:u.sel.anchor+n}}let c,d,p=t.state.doc,h=p.slice(u.from,u.to);8===t.input.lastKeyCode&&Date.now()-100<t.input.lastKeyCodeTime?(c=t.state.selection.to,d="end"):(c=t.state.selection.from,d="start"),t.input.lastKeyCode=null;let f=function(t,e,n,r,o){let i=t.findDiffStart(e,n);if(null==i)return null;let{a:s,b:a}=t.findDiffEnd(e,n+t.size,n+e.size);return"end"==o&&(r-=s+Math.max(0,i-Math.min(s,a))-i),s<i&&t.size<e.size?(i-=r<=i&&r>=s?i-r:0,a=i+(a-s),s=i):a<i&&(i-=r<=i&&r>=a?i-r:0,s=i+(s-a),a=i),{start:i,endA:s,endB:a}}(h.content,u.doc.content,u.from,c,d);if((Se&&t.input.lastIOSEnter>Date.now()-225||Ae)&&o.some((t=>"DIV"==t.nodeName||"P"==t.nodeName))&&(!f||f.endA>=f.endB)&&t.someProp("handleKeyDown",(e=>e(t,Ve(13,"Enter")))))return void(t.input.lastIOSEnter=0);if(!f){if(!(r&&l instanceof Gt&&!l.empty&&l.$head.sameParent(l.$anchor))||t.composing||u.sel&&u.sel.anchor!=u.sel.head){if(u.sel){let e=so(t,t.state.doc,u.sel);e&&!e.eq(t.state.selection)&&t.dispatch(t.state.tr.setSelection(e))}return}f={start:l.from,endA:l.to,endB:l.to}}t.input.domChangeCount++,t.state.selection.from<t.state.selection.to&&f.start==f.endB&&t.state.selection instanceof Gt&&(f.start>t.state.selection.from&&f.start<=t.state.selection.from+2&&t.state.selection.from>=u.from?f.start=t.state.selection.from:f.endA<t.state.selection.to&&f.endA>=t.state.selection.to-2&&t.state.selection.to<=u.to&&(f.endB+=t.state.selection.to-f.endA,f.endA=t.state.selection.to)),be&&we<=11&&f.endB==f.start+1&&f.endA==f.start&&f.start>u.from&&"  "==u.doc.textBetween(f.start-u.from-1,f.start-u.from+1)&&(f.start--,f.endA--,f.endB--);let m,g=u.doc.resolveNoCache(f.start-u.from),v=u.doc.resolveNoCache(f.endB-u.from),y=p.resolve(f.start),b=g.sameParent(v)&&g.parent.inlineContent&&y.end()>=f.endA;if((Se&&t.input.lastIOSEnter>Date.now()-225&&(!b||o.some((t=>"DIV"==t.nodeName||"P"==t.nodeName)))||!b&&g.pos<u.doc.content.size&&(m=Wt.findFrom(u.doc.resolve(g.pos+1),1,!0))&&m.head==v.pos)&&t.someProp("handleKeyDown",(e=>e(t,Ve(13,"Enter")))))return void(t.input.lastIOSEnter=0);if(t.state.selection.anchor>f.start&&function(t,e,n,r,o){if(!r.parent.isTextblock||n-e<=o.pos-r.pos||ao(r,!0,!1)<o.pos)return!1;let i=t.resolve(e);if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;let s=t.resolve(ao(i,!0,!0));return!(!s.parent.isTextblock||s.pos>n||ao(s,!0,!1)<n)&&r.parent.content.cut(r.parentOffset).eq(s.parent.content)}(p,f.start,f.endA,g,v)&&t.someProp("handleKeyDown",(e=>e(t,Ve(8,"Backspace")))))return void(Ae&&ke&&t.domObserver.suppressSelectionUpdates());ke&&Ae&&f.endB==f.start&&(t.input.lastAndroidDelete=Date.now()),Ae&&!b&&g.start()!=v.start()&&0==v.parentOffset&&g.depth==v.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==f.endA&&(f.endB-=2,v=u.doc.resolveNoCache(f.endB-u.from),setTimeout((()=>{t.someProp("handleKeyDown",(function(e){return e(t,Ve(13,"Enter"))}))}),20));let w,x,D,k=f.start,C=f.endA;if(b)if(g.pos==v.pos)be&&we<=11&&0==g.parentOffset&&(t.domObserver.suppressSelectionUpdates(),setTimeout((()=>Bn(t)),20)),w=t.state.tr.delete(k,C),x=p.resolve(f.start).marksAcross(p.resolve(f.endA));else if(f.endA==f.endB&&(D=function(t,e){let n,r,o,i=t.firstChild.marks,s=e.firstChild.marks,l=i,u=s;for(let t=0;t<s.length;t++)l=s[t].removeFromSet(l);for(let t=0;t<i.length;t++)u=i[t].removeFromSet(u);if(1==l.length&&0==u.length)r=l[0],n="add",o=t=>t.mark(r.addToSet(t.marks));else{if(0!=l.length||1!=u.length)return null;r=u[0],n="remove",o=t=>t.mark(r.removeFromSet(t.marks))}let c=[];for(let t=0;t<e.childCount;t++)c.push(o(e.child(t)));if(a.from(c).eq(t))return{mark:r,type:n}}(g.parent.content.cut(g.parentOffset,v.parentOffset),y.parent.content.cut(y.parentOffset,f.endA-y.start()))))w=t.state.tr,"add"==D.type?w.addMark(k,C,D.mark):w.removeMark(k,C,D.mark);else if(g.parent.child(g.index()).isText&&g.index()==v.index()-(v.textOffset?0:1)){let e=g.parent.textBetween(g.parentOffset,v.parentOffset);if(t.someProp("handleTextInput",(n=>n(t,k,C,e))))return;w=t.state.tr.insertText(e,k,C)}if(w||(w=t.state.tr.replace(k,C,u.doc.slice(f.start-u.from,f.endB-u.from))),u.sel){let e=so(t,w.doc,u.sel);e&&!(ke&&Ae&&t.composing&&e.empty&&(f.start!=f.endB||t.input.lastAndroidDelete<Date.now()-100)&&(e.head==k||e.head==w.mapping.map(C)-1)||be&&e.empty&&e.head==k)&&w.setSelection(e)}x&&w.ensureMarks(x),t.dispatch(w.scrollIntoView())}(this,t,e,n,r))),this.domObserver.start(),function(t){for(let e in pr){let n=pr[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=e=>{!yr(t,e)||vr(t,e)||!t.editable&&e.type in hr||n(t,e)})}Ee&&t.dom.addEventListener("input",(()=>null)),gr(t)}(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let e in t)this._props[e]=t[e];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&gr(this),this._props=t,t.plugins&&(t.plugins.forEach(fo),this.directPlugins=t.plugins),this.updateStateInner(t.state,!0)}setProps(t){let e={};for(let t in this._props)e[t]=this._props[t];e.state=this.state;for(let n in t)e[n]=t[n];this.update(e)}updateState(t){this.updateStateInner(t,this.state.plugins!=t.plugins)}updateStateInner(t,e){let n=this.state,r=!1,o=!1;if(t.storedMarks&&this.composing&&(Mr(this),o=!0),this.state=t,e){let t=ho(this);(function(t,e){let n=0,r=0;for(let r in t){if(t[r]!=e[r])return!0;n++}for(let t in e)r++;return n!=r})(t,this.nodeViews)&&(this.nodeViews=t,r=!0),gr(this)}this.editable=po(this),co(this);let i=Qr(this),s=uo(this),a=e?"reset":t.scrollToSelection>n.scrollToSelection?"to selection":"preserve",l=r||!this.docView.matchesNode(t.doc,s,i);!l&&t.selection.eq(n.selection)||(o=!0);let u="preserve"==a&&o&&null==this.dom.style.overflowAnchor&&function(t){let e,n,r=t.dom.getBoundingClientRect(),o=Math.max(0,r.top);for(let i=(r.left+r.right)/2,s=o+1;s<Math.min(innerHeight,r.bottom);s+=5){let r=t.root.elementFromPoint(i,s);if(!r||r==t.dom||!t.dom.contains(r))continue;let a=r.getBoundingClientRect();if(a.top>=o-20){e=r,n=a.top;break}}return{refDOM:e,refTop:n,stack:Ue(t.dom)}}(this);if(o){this.domObserver.stop();let e=l&&(be||ke)&&!this.composing&&!n.selection.empty&&!t.selection.empty&&function(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}(n.selection,t.selection);if(l){let n=ke?this.trackWrites=this.domSelection().focusNode:null;!r&&this.docView.update(t.doc,s,i,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=mn(t.doc,s,i,this.dom,this)),n&&!this.trackWrites&&(e=!0)}e||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelection())&&function(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelection();return Re(e.node,e.offset,n.anchorNode,n.anchorOffset)}(this))?Bn(this,e):(In(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}if(this.updatePluginViews(n),"reset"==a)this.dom.scrollTop=0;else if("to selection"==a){let e=this.domSelection().focusNode;if(this.someProp("handleScrollToSelection",(t=>t(this))));else if(t.selection instanceof Zt){let n=this.docView.domAfterPos(t.selection.from);1==n.nodeType&&qe(this,n.getBoundingClientRect(),e)}else qe(this,this.coordsAtPos(t.selection.head,1),e)}else u&&function({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;Ke(n,0==r?0:r-e)}(u)}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(t&&t.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let e=0;e<this.pluginViews.length;e++){let n=this.pluginViews[e];n.update&&n.update(this,t)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let t=0;t<this.directPlugins.length;t++){let e=this.directPlugins[t];e.spec.view&&this.pluginViews.push(e.spec.view(this))}for(let t=0;t<this.state.plugins.length;t++){let e=this.state.plugins[t];e.spec.view&&this.pluginViews.push(e.spec.view(this))}}}someProp(t,e){let n,r=this._props&&this._props[t];if(null!=r&&(n=e?e(r):r))return n;for(let r=0;r<this.directPlugins.length;r++){let o=this.directPlugins[r].props[t];if(null!=o&&(n=e?e(o):o))return n}let o=this.state.plugins;if(o)for(let r=0;r<o.length;r++){let i=o[r].props[t];if(null!=i&&(n=e?e(i):i))return n}}hasFocus(){return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&function(t){if(t.setActive)return t.setActive();if(Ge)return t.focus(Ge);let e=Ue(t);t.focus(null==Ge?{get preventScroll(){return Ge={preventScroll:!0},!0}}:void 0),Ge||(Ge=!1,Ke(e,0))}(this.dom),Bn(this),this.domObserver.start()}get root(){let t=this._root;if(null==t)for(let t=this.dom.parentNode;t;t=t.parentNode)if(9==t.nodeType||11==t.nodeType&&t.host)return t.getSelection||(Object.getPrototypeOf(t).getSelection=()=>t.ownerDocument.getSelection()),this._root=t;return t||document}posAtCoords(t){return Xe(this,t)}coordsAtPos(t,e=1){return en(this,t,e)}domAtPos(t,e=0){return this.docView.domFromPos(t,e)}nodeDOM(t){let e=this.docView.descAt(t);return e?e.nodeDOM:null}posAtDOM(t,e,n=-1){let r=this.docView.posFromDOM(t,e,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r}endOfTextblock(t,e){return function(t,e,n){return an==e&&ln==n?un:(an=e,ln=n,un="up"==n||"down"==n?function(t,e,n){let r=e.selection,o="up"==n?r.$from:r.$to;return on(t,e,(()=>{let{node:e}=t.docView.domFromPos(o.pos,"up"==n?-1:1);for(;;){let n=t.docView.nearestDesc(e,!0);if(!n)break;if(n.node.isBlock){e=n.dom;break}e=n.dom.parentNode}let r=en(t,o.pos,1);for(let t=e.firstChild;t;t=t.nextSibling){let e;if(1==t.nodeType)e=t.getClientRects();else{if(3!=t.nodeType)continue;e=_e(t,0,t.nodeValue.length).getClientRects()}for(let t=0;t<e.length;t++){let o=e[t];if(o.bottom>o.top+1&&("up"==n?r.top-o.top>2*(o.bottom-r.top):o.bottom-r.bottom>2*(r.bottom-o.top)))return!1}}return!0}))}(t,e,n):function(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,s=o==r.parent.content.size,a=t.domSelection();return sn.test(r.parent.textContent)&&a.modify?on(t,e,(()=>{let e=a.getRangeAt(0),o=a.focusNode,i=a.focusOffset,s=a.caretBidiLevel;a.modify("move",n,"character");let l=!(r.depth?t.docView.domAfterPos(r.before()):t.dom).contains(1==a.focusNode.nodeType?a.focusNode:a.focusNode.parentNode)||o==a.focusNode&&i==a.focusOffset;return a.removeAllRanges(),a.addRange(e),null!=s&&(a.caretBidiLevel=s),l})):"left"==n||"backward"==n?i:s}(t,e,n))}(this,e||this.state,t)}destroy(){this.docView&&(function(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Qr(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return null==this.docView}dispatchEvent(t){return function(t,e){vr(t,e)||!pr[e.type]||!t.editable&&e.type in hr||pr[e.type](t,e)}(this,t)}dispatch(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))}domSelection(){return this.root.getSelection()}}function uo(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),e.translate="no",t.someProp("attributes",(n=>{if("function"==typeof n&&(n=n(t.state)),n)for(let t in n)"class"==t&&(e.class+=" "+n[t]),"style"==t?e.style=(e.style?e.style+";":"")+n[t]:e[t]||"contenteditable"==t||"nodeName"==t||(e[t]=String(n[t]))})),[jr.node(0,t.state.doc.content.size,e)]}function co(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:jr.widget(t.state.selection.head,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function po(t){return!t.someProp("editable",(e=>!1===e(t.state)))}function ho(t){let e=Object.create(null);function n(t){for(let n in t)Object.prototype.hasOwnProperty.call(e,n)||(e[n]=t[n])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function fo(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}for(var mo={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"},go={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"},vo="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),yo="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),bo="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),wo="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),xo="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Do=vo&&(wo||+vo[1]<57)||bo&&wo,ko=0;ko<10;ko++)mo[48+ko]=mo[96+ko]=String(ko);for(ko=1;ko<=24;ko++)mo[ko+111]="F"+ko;for(ko=65;ko<=90;ko++)mo[ko]=String.fromCharCode(ko+32),go[ko]=String.fromCharCode(ko);for(var Co in mo)go.hasOwnProperty(Co)||(go[Co]=mo[Co]);const Eo="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function So(t){let e,n,r,o,i=t.split(/-(?!$)/),s=i[i.length-1];"Space"==s&&(s=" ");for(let t=0;t<i.length-1;t++){let s=i[t];if(/^(cmd|meta|m)$/i.test(s))o=!0;else if(/^a(lt)?$/i.test(s))e=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else if(/^s(hift)?$/i.test(s))r=!0;else{if(!/^mod$/i.test(s))throw new Error("Unrecognized modifier name: "+s);Eo?o=!0:n=!0}}return e&&(s="Alt-"+s),n&&(s="Ctrl-"+s),o&&(s="Meta-"+s),r&&(s="Shift-"+s),s}function Oo(t,e,n){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),!1!==n&&e.shiftKey&&(t="Shift-"+t),t}function Ao(t){let e=function(t){let e=Object.create(null);for(let n in t)e[So(n)]=t[n];return e}(t);return function(t,n){let r,o=function(t){var e=!(Do&&(t.ctrlKey||t.altKey||t.metaKey)||(yo||xo)&&t.shiftKey&&t.key&&1==t.key.length)&&t.key||(t.shiftKey?go:mo)[t.keyCode]||t.key||"Unidentified";return"Esc"==e&&(e="Escape"),"Del"==e&&(e="Delete"),"Left"==e&&(e="ArrowLeft"),"Up"==e&&(e="ArrowUp"),"Right"==e&&(e="ArrowRight"),"Down"==e&&(e="ArrowDown"),e}(n),i=1==o.length&&" "!=o,s=e[Oo(o,n,!i)];if(s&&s(t.state,t.dispatch,t))return!0;if(i&&(n.shiftKey||n.altKey||n.metaKey||o.charCodeAt(0)>127)&&(r=mo[n.keyCode])&&r!=o){let o=e[Oo(r,n,!0)];if(o&&o(t.state,t.dispatch,t))return!0}else if(i&&n.shiftKey){let r=e[Oo(o,n,!0)];if(r&&r(t.state,t.dispatch,t))return!0}return!1}}const To=(t,e)=>!t.selection.empty&&(e&&e(t.tr.deleteSelection().scrollIntoView()),!0),Mo=(t,e,n)=>{let{$cursor:r}=t.selection;if(!r||(n?!n.endOfTextblock("backward",t):r.parentOffset>0))return!1;let o=Bo(r);if(!o){let n=r.blockRange(),o=n&&Et(n);return null!=o&&(e&&e(t.tr.lift(n,o).scrollIntoView()),!0)}let i=o.nodeBefore;if(!i.type.spec.isolating&&Ho(t,o,e))return!0;if(0==r.parent.content.size&&(Fo(i,"end")||Zt.isSelectable(i))){let n=Mt(t.doc,r.before(),r.after(),h.empty);if(n&&n.slice.size<n.to-n.from){if(e){let r=t.tr.step(n);r.setSelection(Fo(i,"end")?Wt.findFrom(r.doc.resolve(r.mapping.map(o.pos,-1)),-1):Zt.create(r.doc,o.pos-i.nodeSize)),e(r.scrollIntoView())}return!0}}return!(!i.isAtom||o.depth!=r.depth-1||(e&&e(t.tr.delete(o.pos-i.nodeSize,o.pos).scrollIntoView()),0))};function Fo(t,e,n=!1){for(let r=t;r;r="start"==e?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)return!1}return!1}const No=(t,e,n)=>{let{$head:r,empty:o}=t.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;i=Bo(r)}let s=i&&i.nodeBefore;return!(!s||!Zt.isSelectable(s)||(e&&e(t.tr.setSelection(Zt.create(t.doc,i.pos-s.nodeSize)).scrollIntoView()),0))};function Bo(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}const _o=(t,e,n)=>{let{$cursor:r}=t.selection;if(!r||(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size))return!1;let o=zo(r);if(!o)return!1;let i=o.nodeAfter;if(Ho(t,o,e))return!0;if(0==r.parent.content.size&&(Fo(i,"start")||Zt.isSelectable(i))){let n=Mt(t.doc,r.before(),r.after(),h.empty);if(n&&n.slice.size<n.to-n.from){if(e){let r=t.tr.step(n);r.setSelection(Fo(i,"start")?Wt.findFrom(r.doc.resolve(r.mapping.map(o.pos)),1):Zt.create(r.doc,r.mapping.map(o.pos))),e(r.scrollIntoView())}return!0}}return!(!i.isAtom||o.depth!=r.depth-1||(e&&e(t.tr.delete(o.pos,o.pos+i.nodeSize).scrollIntoView()),0))},Ro=(t,e,n)=>{let{$head:r,empty:o}=t.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;i=zo(r)}let s=i&&i.nodeAfter;return!(!s||!Zt.isSelectable(s)||(e&&e(t.tr.setSelection(Zt.create(t.doc,i.pos)).scrollIntoView()),0))};function zo(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}const Lo=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!(!n.parent.type.spec.code||!n.sameParent(r)||(e&&e(t.tr.insertText("\n").scrollIntoView()),0))};function Io(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const Po=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),s=Io(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(e){let r=n.after(),o=t.tr.replaceWith(r,r,s.createAndFill());o.setSelection(Wt.near(o.doc.resolve(r),1)),e(o.scrollIntoView())}return!0},jo=(t,e)=>{let n=t.selection,{$from:r,$to:o}=n;if(n instanceof Xt||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=Io(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){let n=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,s=t.tr.insert(n,i.createAndFill());s.setSelection(Gt.create(s.doc,n+1)),e(s.scrollIntoView())}return!0},Vo=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let r=n.before();if(At(t.doc,r))return e&&e(t.tr.split(r).scrollIntoView()),!0}let r=n.blockRange(),o=r&&Et(r);return null!=o&&(e&&e(t.tr.lift(r,o).scrollIntoView()),!0)};function Ho(t,e,n){let r,o,i=e.nodeBefore,s=e.nodeAfter;if(i.type.spec.isolating||s.type.spec.isolating)return!1;if(function(t,e,n){let r=e.nodeBefore,o=e.nodeAfter,i=e.index();return!(!(r&&o&&r.type.compatibleContent(o.type))||(!r.content.size&&e.parent.canReplace(i-1,i)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),0):!e.parent.canReplace(i,i+1)||!o.isTextblock&&!Tt(t.doc,e.pos)||(n&&n(t.tr.clearIncompatible(e.pos,r.type,r.contentMatchAt(r.childCount)).join(e.pos).scrollIntoView()),0)))}(t,e,n))return!0;let l=e.parent.canReplace(e.index(),e.index()+1);if(l&&(r=(o=i.contentMatchAt(i.childCount)).findWrapping(s.type))&&o.matchType(r[0]||s.type).validEnd){if(n){let o=e.pos+s.nodeSize,l=a.empty;for(let t=r.length-1;t>=0;t--)l=a.from(r[t].create(null,l));l=a.from(i.copy(l));let u=t.tr.step(new Dt(e.pos-1,o,e.pos,o,new h(l,1,0),r.length,!0)),c=o+2*r.length;Tt(u.doc,c)&&u.join(c),n(u.scrollIntoView())}return!0}let u=Wt.findFrom(e,1),c=u&&u.$from.blockRange(u.$to),d=c&&Et(c);if(null!=d&&d>=e.depth)return n&&n(t.tr.lift(c,d).scrollIntoView()),!0;if(l&&Fo(s,"start",!0)&&Fo(i,"end")){let r=i,o=[];for(;o.push(r),!r.isTextblock;)r=r.lastChild;let l=s,u=1;for(;!l.isTextblock;l=l.firstChild)u++;if(r.canReplace(r.childCount,r.childCount,l.content)){if(n){let r=a.empty;for(let t=o.length-1;t>=0;t--)r=a.from(o[t].copy(r));n(t.tr.step(new Dt(e.pos-o.length,e.pos+s.nodeSize,e.pos+u,e.pos+s.nodeSize-u,new h(r,o.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function $o(t){return function(e,n){let r=e.selection,o=t<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return!!o.node(i).isTextblock&&(n&&n(e.tr.setSelection(Gt.create(e.doc,t<0?o.start(i):o.end(i)))),!0)}}const Wo=$o(-1),qo=$o(1);function Uo(t,e=null){return function(n,r){let{from:o,to:i}=n.selection,s=!1;return n.doc.nodesBetween(o,i,((r,o)=>{if(s)return!1;if(r.isTextblock&&!r.hasMarkup(t,e))if(r.type==t)s=!0;else{let e=n.doc.resolve(o),r=e.index();s=e.parent.canReplaceWith(r,r+1,t)}})),!!s&&(r&&r(n.tr.setBlockType(o,i,t,e).scrollIntoView()),!0)}}function Ko(...t){return function(e,n,r){for(let o=0;o<t.length;o++)if(t[o](e,n,r))return!0;return!1}}let Go=Ko(To,Mo,No),Jo=Ko(To,_o,Ro);const Zo={Enter:Ko(Lo,jo,Vo,((t,e)=>{let{$from:n,$to:r}=t.selection;if(t.selection instanceof Zt&&t.selection.node.isBlock)return!(!n.parentOffset||!At(t.doc,n.pos)||(e&&e(t.tr.split(n.pos).scrollIntoView()),0));if(!n.parent.isBlock)return!1;if(e){let o=r.parentOffset==r.parent.content.size,i=t.tr;(t.selection instanceof Gt||t.selection instanceof Xt)&&i.deleteSelection();let s=0==n.depth?null:Io(n.node(-1).contentMatchAt(n.indexAfter(-1))),a=o&&s?[{type:s}]:void 0,l=At(i.doc,i.mapping.map(n.pos),1,a);if(a||l||!At(i.doc,i.mapping.map(n.pos),1,s?[{type:s}]:void 0)||(s&&(a=[{type:s}]),l=!0),l&&(i.split(i.mapping.map(n.pos),1,a),!o&&!n.parentOffset&&n.parent.type!=s)){let t=i.mapping.map(n.before()),e=i.doc.resolve(t);s&&n.node(-1).canReplaceWith(e.index(),e.index()+1,s)&&i.setNodeMarkup(i.mapping.map(n.before()),s)}e(i.scrollIntoView())}return!0})),"Mod-Enter":Po,Backspace:Go,"Mod-Backspace":Go,"Shift-Backspace":Go,Delete:Jo,"Mod-Delete":Jo,"Mod-a":(t,e)=>(e&&e(t.tr.setSelection(new Xt(t.doc))),!0)},Yo={"Ctrl-h":Zo.Backspace,"Alt-Backspace":Zo["Mod-Backspace"],"Ctrl-d":Zo.Delete,"Ctrl-Alt-Backspace":Zo["Mod-Delete"],"Alt-Delete":Zo["Mod-Delete"],"Alt-d":Zo["Mod-Delete"],"Ctrl-a":Wo,"Ctrl-e":qo};for(let t in Zo)Yo[t]=Zo[t];function Xo(t){const{state:e,transaction:n}=t;let{selection:r}=n,{doc:o}=n,{storedMarks:i}=n;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),filterTransaction:e.filterTransaction,plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return i},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,i=n.storedMarks,n}}}"undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"undefined"!=typeof os&&os.platform&&os.platform();class Qo{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:e,state:n}=this,{view:r}=e,{tr:o}=n,i=this.buildProps(o);return Object.fromEntries(Object.entries(t).map((([t,e])=>[t,(...t)=>{const n=e(...t)(i);return o.getMeta("preventDispatch")||this.hasCustomState||r.dispatch(o),n}])))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,e=!0){const{rawCommands:n,editor:r,state:o}=this,{view:i}=r,s=[],a=!!t,l=t||o.tr,u={...Object.fromEntries(Object.entries(n).map((([t,n])=>[t,(...t)=>{const r=this.buildProps(l,e),o=n(...t)(r);return s.push(o),u}]))),run:()=>(a||!e||l.getMeta("preventDispatch")||this.hasCustomState||i.dispatch(l),s.every((t=>!0===t)))};return u}createCan(t){const{rawCommands:e,state:n}=this,r=void 0,o=t||n.tr,i=this.buildProps(o,r);return{...Object.fromEntries(Object.entries(e).map((([t,e])=>[t,(...t)=>e(...t)({...i,dispatch:r})]))),chain:()=>this.createChain(o,r)}}buildProps(t,e=!0){const{rawCommands:n,editor:r,state:o}=this,{view:i}=r;o.storedMarks&&t.setStoredMarks(o.storedMarks);const s={tr:t,editor:r,view:i,state:Xo({state:o,transaction:t}),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(t),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(n).map((([t,e])=>[t,(...t)=>e(...t)(s)])))}};return s}}function ti(t,e,n){return void 0===t.config[e]&&t.parent?ti(t.parent,e,n):"function"==typeof t.config[e]?t.config[e].bind({...n,parent:t.parent?ti(t.parent,e,n):null}):t.config[e]}function ei(t){return{baseExtensions:t.filter((t=>"extension"===t.type)),nodeExtensions:t.filter((t=>"node"===t.type)),markExtensions:t.filter((t=>"mark"===t.type))}}function ni(t){const e=[],{nodeExtensions:n,markExtensions:r}=ei(t),o=[...n,...r],i={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return t.forEach((t=>{const n=ti(t,"addGlobalAttributes",{name:t.name,options:t.options,storage:t.storage});n&&n().forEach((t=>{t.types.forEach((n=>{Object.entries(t.attributes).forEach((([t,r])=>{e.push({type:n,name:t,attribute:{...i,...r}})}))}))}))})),o.forEach((t=>{const n={name:t.name,options:t.options,storage:t.storage},r=ti(t,"addAttributes",n);if(!r)return;const o=r();Object.entries(o).forEach((([n,r])=>{const o={...i,...r};r.isRequired&&void 0===r.default&&delete o.default,e.push({type:t.name,name:n,attribute:o})}))})),e}function ri(t,e){if("string"==typeof t){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}function oi(...t){return t.filter((t=>!!t)).reduce(((t,e)=>{const n={...t};return Object.entries(e).forEach((([t,e])=>{n[t]?n[t]="class"===t?[n[t],e].join(" "):"style"===t?[n[t],e].join("; "):e:n[t]=e})),n}),{})}function ii(t,e){return e.filter((t=>t.attribute.rendered)).map((e=>e.attribute.renderHTML?e.attribute.renderHTML(t.attrs)||{}:{[e.name]:t.attrs[e.name]})).reduce(((t,e)=>oi(t,e)),{})}function si(t){return"function"==typeof t}function ai(t,e,...n){return si(t)?e?t.bind(e)(...n):t(...n):t}function li(t,e){return t.style?t:{...t,getAttrs:n=>{const r=t.getAttrs?t.getAttrs(n):t.attrs;if(!1===r)return!1;const o=e.reduce(((t,e)=>{const r=e.attribute.parseHTML?e.attribute.parseHTML(n):function(t){return"string"!=typeof t?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):"true"===t||"false"!==t&&t}(n.getAttribute(e.name));return null==r?t:{...t,[e.name]:r}}),{});return{...r,...o}}}}function ui(t){return Object.fromEntries(Object.entries(t).filter((([t,e])=>("attrs"!==t||!function(t={}){return 0===Object.keys(t).length&&t.constructor===Object}(e))&&null!=e)))}function ci(t,e){return e.nodes[t]||e.marks[t]||null}function di(t,e){return Array.isArray(e)?e.some((e=>("string"==typeof e?e:e.name)===t.name)):e}function pi(t){return"[object RegExp]"===Object.prototype.toString.call(t)}class hi{constructor(t){this.find=t.find,this.handler=t.handler}}function fi(t){var e;const{editor:n,from:r,to:o,text:i,rules:s,plugin:a}=t,{view:l}=n;if(l.composing)return!1;const u=l.state.doc.resolve(r);if(u.parent.type.spec.code||(null===(e=u.nodeBefore||u.nodeAfter)||void 0===e?void 0:e.marks.find((t=>t.type.spec.code))))return!1;let c=!1;const d=((t,e=500)=>{let n="";return t.parent.nodesBetween(Math.max(0,t.parentOffset-e),t.parentOffset,((e,r,o,i)=>{var s,a,l;n+=(null===(a=(s=e.type.spec).toText)||void 0===a?void 0:a.call(s,{node:e,pos:r,parent:o,index:i}))||(null===(l=t.nodeBefore)||void 0===l?void 0:l.text)||"%leaf%"})),n})(u)+i;return s.forEach((t=>{if(c)return;const e=((t,e)=>{if(pi(e))return e.exec(t);const n=e(t);if(!n)return null;const r=[];return r.push(n.text),r.index=n.index,r.input=t,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r})(d,t.find);if(!e)return;const s=l.state.tr,u=Xo({state:l.state,transaction:s}),p={from:r-(e[0].length-i.length),to:o},{commands:h,chain:f,can:m}=new Qo({editor:n,state:u});null!==t.handler({state:u,range:p,match:e,commands:h,chain:f,can:m})&&s.steps.length&&(s.setMeta(a,{transform:s,from:r,to:o,text:i}),l.dispatch(s),c=!0)})),c}function mi(t){const{editor:e,rules:n}=t,r=new ue({state:{init:()=>null,apply:(t,e)=>t.getMeta(r)||(t.selectionSet||t.docChanged?null:e)},props:{handleTextInput:(t,o,i,s)=>fi({editor:e,from:o,to:i,text:s,rules:n,plugin:r}),handleDOMEvents:{compositionend:t=>(setTimeout((()=>{const{$cursor:o}=t.state.selection;o&&fi({editor:e,from:o.pos,to:o.pos,text:"",rules:n,plugin:r})})),!1)},handleKeyDown(t,o){if("Enter"!==o.key)return!1;const{$cursor:i}=t.state.selection;return!!i&&fi({editor:e,from:i.pos,to:i.pos,text:"\n",rules:n,plugin:r})}},isInputRules:!0});return r}class gi{constructor(t){this.find=t.find,this.handler=t.handler}}function vi(t){const{editor:e,rules:n}=t;let r=null,o=!1,i=!1;return n.map((t=>new ue({view(t){const e=e=>{var n;r=(null===(n=t.dom.parentElement)||void 0===n?void 0:n.contains(e.target))?t.dom.parentElement:null};return window.addEventListener("dragstart",e),{destroy(){window.removeEventListener("dragstart",e)}}},props:{handleDOMEvents:{drop:t=>(i=r===t.dom.parentElement,!1),paste:(t,e)=>{var n;const r=null===(n=e.clipboardData)||void 0===n?void 0:n.getData("text/html");return o=!!(null==r?void 0:r.includes("data-pm-slice")),!1}}},appendTransaction:(n,r,s)=>{const a=n[0],l="paste"===a.getMeta("uiEvent")&&!o,u="drop"===a.getMeta("uiEvent")&&!i;if(!l&&!u)return;const c=r.doc.content.findDiffStart(s.doc.content),d=r.doc.content.findDiffEnd(s.doc.content);if("number"!=typeof c||!d||c===d.b)return;const p=s.tr,h=Xo({state:s,transaction:p});return function(t){const{editor:e,state:n,from:r,to:o,rule:i}=t,{commands:s,chain:a,can:l}=new Qo({editor:e,state:n}),u=[];return n.doc.nodesBetween(r,o,((t,e)=>{if(!t.isTextblock||t.type.spec.code)return;const c=Math.max(r,e),d=Math.min(o,e+t.content.size),p=((t,e)=>{if(pi(e))return[...t.matchAll(e)];const n=e(t);return n?n.map((e=>{const n=[];return n.push(e.text),n.index=e.index,n.input=t,n.data=e.data,e.replaceWith&&(e.text.includes(e.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),n.push(e.replaceWith)),n})):[]})(t.textBetween(c-e,d-e,void 0,""),i.find);p.forEach((t=>{if(void 0===t.index)return;const e=c+t.index+1,r=e+t[0].length,o={from:n.tr.mapping.map(e),to:n.tr.mapping.map(r)},d=i.handler({state:n,range:o,match:t,commands:s,chain:a,can:l});u.push(d)}))})),u.every((t=>null!==t))}({editor:e,state:h,from:Math.max(c-1,0),to:d.b,rule:t})&&p.steps.length?p:void 0}})))}class yi{constructor(t,e){this.splittableMarks=[],this.editor=e,this.extensions=yi.resolve(t),this.schema=function(t){var e;const n=ni(t),{nodeExtensions:r,markExtensions:o}=ei(t),i=null===(e=r.find((t=>ti(t,"topNode"))))||void 0===e?void 0:e.name,s=Object.fromEntries(r.map((e=>{const r=n.filter((t=>t.type===e.name)),o={name:e.name,options:e.options,storage:e.storage},i=ui({...t.reduce(((t,n)=>{const r=ti(n,"extendNodeSchema",o);return{...t,...r?r(e):{}}}),{}),content:ai(ti(e,"content",o)),marks:ai(ti(e,"marks",o)),group:ai(ti(e,"group",o)),inline:ai(ti(e,"inline",o)),atom:ai(ti(e,"atom",o)),selectable:ai(ti(e,"selectable",o)),draggable:ai(ti(e,"draggable",o)),code:ai(ti(e,"code",o)),defining:ai(ti(e,"defining",o)),isolating:ai(ti(e,"isolating",o)),attrs:Object.fromEntries(r.map((t=>{var e;return[t.name,{default:null===(e=null==t?void 0:t.attribute)||void 0===e?void 0:e.default}]})))}),s=ai(ti(e,"parseHTML",o));s&&(i.parseDOM=s.map((t=>li(t,r))));const a=ti(e,"renderHTML",o);a&&(i.toDOM=t=>a({node:t,HTMLAttributes:ii(t,r)}));const l=ti(e,"renderText",o);return l&&(i.toText=l),[e.name,i]}))),a=Object.fromEntries(o.map((e=>{const r=n.filter((t=>t.type===e.name)),o={name:e.name,options:e.options,storage:e.storage},i=ui({...t.reduce(((t,n)=>{const r=ti(n,"extendMarkSchema",o);return{...t,...r?r(e):{}}}),{}),inclusive:ai(ti(e,"inclusive",o)),excludes:ai(ti(e,"excludes",o)),group:ai(ti(e,"group",o)),spanning:ai(ti(e,"spanning",o)),code:ai(ti(e,"code",o)),attrs:Object.fromEntries(r.map((t=>{var e;return[t.name,{default:null===(e=null==t?void 0:t.attribute)||void 0===e?void 0:e.default}]})))}),s=ai(ti(e,"parseHTML",o));s&&(i.parseDOM=s.map((t=>li(t,r))));const a=ti(e,"renderHTML",o);return a&&(i.toDOM=t=>a({mark:t,HTMLAttributes:ii(t,r)})),[e.name,i]})));return new J({topNode:i,nodes:s,marks:a})}(this.extensions),this.extensions.forEach((t=>{var e;this.editor.extensionStorage[t.name]=t.storage;const n={name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:ci(t.name,this.schema)};"mark"===t.type&&(null===(e=ai(ti(t,"keepOnSplit",n)))||void 0===e||e)&&this.splittableMarks.push(t.name);const r=ti(t,"onBeforeCreate",n);r&&this.editor.on("beforeCreate",r);const o=ti(t,"onCreate",n);o&&this.editor.on("create",o);const i=ti(t,"onUpdate",n);i&&this.editor.on("update",i);const s=ti(t,"onSelectionUpdate",n);s&&this.editor.on("selectionUpdate",s);const a=ti(t,"onTransaction",n);a&&this.editor.on("transaction",a);const l=ti(t,"onFocus",n);l&&this.editor.on("focus",l);const u=ti(t,"onBlur",n);u&&this.editor.on("blur",u);const c=ti(t,"onDestroy",n);c&&this.editor.on("destroy",c)}))}static resolve(t){const e=yi.sort(yi.flatten(t)),n=function(t){const e=t.filter(((e,n)=>t.indexOf(e)!==n));return[...new Set(e)]}(e.map((t=>t.name)));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map((t=>`'${t}'`)).join(", ")}]. This can lead to issues.`),e}static flatten(t){return t.map((t=>{const e=ti(t,"addExtensions",{name:t.name,options:t.options,storage:t.storage});return e?[t,...this.flatten(e())]:t})).flat(10)}static sort(t){return t.sort(((t,e)=>{const n=ti(t,"priority")||100,r=ti(e,"priority")||100;return n>r?-1:n<r?1:0}))}get commands(){return this.extensions.reduce(((t,e)=>{const n=ti(e,"addCommands",{name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:ci(e.name,this.schema)});return n?{...t,...n()}:t}),{})}get plugins(){const{editor:t}=this,e=yi.sort([...this.extensions].reverse()),n=[],r=[],o=e.map((e=>{const o={name:e.name,options:e.options,storage:e.storage,editor:t,type:ci(e.name,this.schema)},i=[],s=ti(e,"addKeyboardShortcuts",o);if(s){const e=(a=Object.fromEntries(Object.entries(s()).map((([e,n])=>[e,()=>n({editor:t})]))),new ue({props:{handleKeyDown:Ao(a)}}));i.push(e)}var a;const l=ti(e,"addInputRules",o);di(e,t.options.enableInputRules)&&l&&n.push(...l());const u=ti(e,"addPasteRules",o);di(e,t.options.enablePasteRules)&&u&&r.push(...u());const c=ti(e,"addProseMirrorPlugins",o);if(c){const t=c();i.push(...t)}return i})).flat();return[mi({editor:t,rules:n}),...vi({editor:t,rules:r}),...o]}get attributes(){return ni(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:e}=ei(this.extensions);return Object.fromEntries(e.filter((t=>!!ti(t,"addNodeView"))).map((e=>{const n=this.attributes.filter((t=>t.type===e.name)),r={name:e.name,options:e.options,storage:e.storage,editor:t,type:ri(e.name,this.schema)},o=ti(e,"addNodeView",r);return o?[e.name,(r,i,s,a)=>{const l=ii(r,n);return o()({editor:t,node:r,getPos:s,decorations:a,HTMLAttributes:l,extension:e})}]:[]})))}}function bi(t){return"Object"===function(t){return Object.prototype.toString.call(t).slice(8,-1)}(t)&&t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function wi(t,e){const n={...t};return bi(t)&&bi(e)&&Object.keys(e).forEach((r=>{bi(e[r])?r in t?n[r]=wi(t[r],e[r]):Object.assign(n,{[r]:e[r]}):Object.assign(n,{[r]:e[r]})})),n}class xi{constructor(t={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=ai(ti(this,"addOptions",{name:this.name}))),this.storage=ai(ti(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new xi(t)}configure(t={}){const e=this.extend();return e.options=wi(this.options,t),e.storage=ai(ti(e,"addStorage",{name:e.name,options:e.options})),e}extend(t={}){const e=new xi(t);return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`),e.options=ai(ti(e,"addOptions",{name:e.name})),e.storage=ai(ti(e,"addStorage",{name:e.name,options:e.options})),e}}function Di(t,e,n){const{from:r,to:o}=e,{blockSeparator:i="\n\n",textSerializers:s={}}=n||{};let a="",l=!0;return t.nodesBetween(r,o,((t,n,u,c)=>{var d;const p=null==s?void 0:s[t.type.name];p?(t.isBlock&&!l&&(a+=i,l=!0),u&&(a+=p({node:t,pos:n,parent:u,index:c,range:e}))):t.isText?(a+=null===(d=null==t?void 0:t.text)||void 0===d?void 0:d.slice(Math.max(r,n)-n,o-n),l=!1):t.isBlock&&!l&&(a+=i,l=!0)})),a}function ki(t){return Object.fromEntries(Object.entries(t.nodes).filter((([,t])=>t.spec.toText)).map((([t,e])=>[t,e.spec.toText])))}const Ci=xi.create({name:"clipboardTextSerializer",addProseMirrorPlugins(){return[new ue({key:new pe("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:n}=t,{doc:r,selection:o}=e,{ranges:i}=o;return Di(r,{from:Math.min(...i.map((t=>t.$from.pos))),to:Math.max(...i.map((t=>t.$to.pos)))},{textSerializers:ki(n)})}}})]}});function Ei(t,e,n={strict:!0}){const r=Object.keys(e);return!r.length||r.every((r=>n.strict?e[r]===t[r]:pi(e[r])?e[r].test(t[r]):e[r]===t[r]))}function Si(t,e,n={}){return t.find((t=>t.type===e&&Ei(t.attrs,n)))}function Oi(t,e,n={}){return!!Si(t,e,n)}function Ai(t,e,n={}){if(!t||!e)return;let r=t.parent.childAfter(t.parentOffset);if(t.parentOffset===r.offset&&0!==r.offset&&(r=t.parent.childBefore(t.parentOffset)),!r.node)return;const o=Si([...r.node.marks],e,n);if(!o)return;let i=r.index,s=t.start()+r.offset,a=i+1,l=s+r.node.nodeSize;for(Si([...r.node.marks],e,n);i>0&&o.isInSet(t.parent.child(i-1).marks);)i-=1,s-=t.parent.child(i).nodeSize;for(;a<t.parent.childCount&&Oi([...t.parent.child(a).marks],e,n);)l+=t.parent.child(a).nodeSize,a+=1;return{from:s,to:l}}function Ti(t,e){if("string"==typeof t){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);return e.marks[t]}return t}function Mi(t){return t&&"object"==typeof t&&!Array.isArray(t)&&!function(t){var e;return"class"===(null===(e=t.constructor)||void 0===e?void 0:e.toString().substring(0,5))}(t)}function Fi(t){return Mi(t)&&t instanceof Gt}function Ni(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function Bi(t,e=null){if(!e)return null;const n=Wt.atStart(t),r=Wt.atEnd(t);if("start"===e||!0===e)return n;if("end"===e)return r;const o=n.from,i=r.to;return"all"===e?Gt.create(t,Ni(0,o,i),Ni(t.content.size,o,i)):Gt.create(t,Ni(e,o,i),Ni(e,o,i))}function _i(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function Ri(t){const e=`<body>${t}</body>`;return(new window.DOMParser).parseFromString(e,"text/html").body}function zi(t,e,n){if(n={slice:!0,parseOptions:{},...n},"object"==typeof t&&null!==t)try{return Array.isArray(t)?a.fromArray(t.map((t=>e.nodeFromJSON(t)))):e.nodeFromJSON(t)}catch(r){return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",r),zi("",e,n)}if("string"==typeof t){const r=Y.fromSchema(e);return n.slice?r.parseSlice(Ri(t),n.parseOptions).content:r.parse(Ri(t),n.parseOptions)}return zi("",e,n)}function Li(){return"undefined"!=typeof navigator&&/Mac/.test(navigator.platform)}function Ii(t,e,n={}){const{from:r,to:o,empty:i}=t.selection,s=e?ri(e,t.schema):null,a=[];t.doc.nodesBetween(r,o,((t,e)=>{if(t.isText)return;const n=Math.max(r,e),i=Math.min(o,e+t.nodeSize);a.push({node:t,from:n,to:i})}));const l=o-r,u=a.filter((t=>!s||s.name===t.node.type.name)).filter((t=>Ei(t.node.attrs,n,{strict:!1})));return i?!!u.length:u.reduce(((t,e)=>t+e.to-e.from),0)>=l}function Pi(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function ji(t,e){const n="string"==typeof e?[e]:e;return Object.keys(t).reduce(((e,r)=>(n.includes(r)||(e[r]=t[r]),e)),{})}function Vi(t,e,n={}){return zi(t,e,{slice:!1,parseOptions:n})}function Hi(t,e){const n=Ti(e,t.schema),{from:r,to:o,empty:i}=t.selection,s=[];i?(t.storedMarks&&s.push(...t.storedMarks),s.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,o,(t=>{s.push(...t.marks)}));const a=s.find((t=>t.type.name===n.name));return a?{...a.attrs}:{}}function $i(t,e,n){return Object.fromEntries(Object.entries(n).filter((([n])=>{const r=t.find((t=>t.type===e&&t.name===n));return!!r&&r.attribute.keepOnSplit})))}function Wi(t,e){const n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(n){const r=n.filter((t=>null==e?void 0:e.includes(t.type.name)));t.tr.ensureMarks(r)}}function qi(t){return e=>function(t,e){for(let n=t.depth;n>0;n-=1){const r=t.node(n);if(e(r))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:r}}}(e.$from,t)}function Ui(t,e){const{nodeExtensions:n}=ei(e),r=n.find((e=>e.name===t));if(!r)return!1;const o=ai(ti(r,"group",{name:r.name,options:r.options,storage:r.storage}));return"string"==typeof o&&o.split(" ").includes("list")}const Ki=(t,e)=>{const n=qi((t=>t.type===e))(t.selection);if(!n)return!0;const r=t.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(void 0===r)return!0;const o=t.doc.nodeAt(r);return n.node.type!==(null==o?void 0:o.type)||!Tt(t.doc,n.pos)||(t.join(n.pos),!0)},Gi=(t,e)=>{const n=qi((t=>t.type===e))(t.selection);if(!n)return!0;const r=t.doc.resolve(n.start).after(n.depth);if(void 0===r)return!0;const o=t.doc.nodeAt(r);return n.node.type!==(null==o?void 0:o.type)||!Tt(t.doc,r)||(t.join(r),!0)};function Ji(t,e,n={}){const{empty:r,ranges:o}=t.selection,i=e?Ti(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter((t=>!i||i.name===t.type.name)).find((t=>Ei(t.attrs,n,{strict:!1})));let s=0;const a=[];if(o.forEach((({$from:e,$to:n})=>{const r=e.pos,o=n.pos;t.doc.nodesBetween(r,o,((t,e)=>{if(!t.isText&&!t.marks.length)return;const n=Math.max(r,e),i=Math.min(o,e+t.nodeSize);s+=i-n,a.push(...t.marks.map((t=>({mark:t,from:n,to:i}))))}))})),0===s)return!1;const l=a.filter((t=>!i||i.name===t.mark.type.name)).filter((t=>Ei(t.mark.attrs,n,{strict:!1}))).reduce(((t,e)=>t+e.to-e.from),0),u=a.filter((t=>!i||t.mark.type!==i&&t.mark.type.excludes(i))).reduce(((t,e)=>t+e.to-e.from),0);return(l>0?l+u:l)>=s}var Zi=Object.freeze({__proto__:null,blur:()=>({editor:t,view:e})=>(requestAnimationFrame((()=>{var n;t.isDestroyed||(e.dom.blur(),null===(n=null===window||void 0===window?void 0:window.getSelection())||void 0===n||n.removeAllRanges())})),!0),clearContent:(t=!1)=>({commands:e})=>e.setContent("",t),clearNodes:()=>({state:t,tr:e,dispatch:n})=>{const{selection:r}=e,{ranges:o}=r;return!n||(o.forEach((({$from:n,$to:r})=>{t.doc.nodesBetween(n.pos,r.pos,((t,n)=>{if(t.type.isText)return;const{doc:r,mapping:o}=e,i=r.resolve(o.map(n)),s=r.resolve(o.map(n+t.nodeSize)),a=i.blockRange(s);if(!a)return;const l=Et(a);if(t.type.isTextblock){const{defaultType:t}=i.parent.contentMatchAt(i.index());e.setNodeMarkup(a.start,t)}(l||0===l)&&e.lift(a,l)}))})),!0)},command:t=>e=>t(e),createParagraphNear:()=>({state:t,dispatch:e})=>jo(t,e),deleteNode:t=>({tr:e,state:n,dispatch:r})=>{const o=ri(t,n.schema),i=e.selection.$anchor;for(let t=i.depth;t>0;t-=1)if(i.node(t).type===o){if(r){const n=i.before(t),r=i.after(t);e.delete(n,r).scrollIntoView()}return!0}return!1},deleteRange:t=>({tr:e,dispatch:n})=>{const{from:r,to:o}=t;return n&&e.delete(r,o),!0},deleteSelection:()=>({state:t,dispatch:e})=>To(t,e),enter:()=>({commands:t})=>t.keyboardShortcut("Enter"),exitCode:()=>({state:t,dispatch:e})=>Po(t,e),extendMarkRange:(t,e={})=>({tr:n,state:r,dispatch:o})=>{const i=Ti(t,r.schema),{doc:s,selection:a}=n,{$from:l,from:u,to:c}=a;if(o){const t=Ai(l,i,e);if(t&&t.from<=u&&t.to>=c){const e=Gt.create(s,t.from,t.to);n.setSelection(e)}}return!0},first:t=>e=>{const n="function"==typeof t?t(e):t;for(let t=0;t<n.length;t+=1)if(n[t](e))return!0;return!1},focus:(t=null,e={})=>({editor:n,view:r,tr:o,dispatch:i})=>{e={scrollIntoView:!0,...e};const s=()=>{_i()&&r.dom.focus(),requestAnimationFrame((()=>{n.isDestroyed||(r.focus(),(null==e?void 0:e.scrollIntoView)&&n.commands.scrollIntoView())}))};if(r.hasFocus()&&null===t||!1===t)return!0;if(i&&null===t&&!Fi(n.state.selection))return s(),!0;const a=Bi(o.doc,t)||n.state.selection,l=n.state.selection.eq(a);return i&&(l||o.setSelection(a),l&&o.storedMarks&&o.setStoredMarks(o.storedMarks),s()),!0},forEach:(t,e)=>n=>t.every(((t,r)=>e(t,{...n,index:r}))),insertContent:(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),insertContentAt:(t,e,n)=>({tr:r,dispatch:o,editor:i})=>{if(o){n={parseOptions:{},updateSelection:!0,...n};const o=zi(e,i.schema,{parseOptions:{preserveWhitespace:"full",...n.parseOptions}});if("<>"===o.toString())return!0;let{from:s,to:a}="number"==typeof t?{from:t,to:t}:t,l=!0,u=!0;if((o.toString().startsWith("<")?o:[o]).forEach((t=>{t.check(),l=!!l&&t.isText&&0===t.marks.length,u=!!u&&t.isBlock})),s===a&&u){const{parent:t}=r.doc.resolve(s);t.isTextblock&&!t.type.spec.code&&!t.childCount&&(s-=1,a+=1)}l?r.insertText(e,s,a):r.replaceWith(s,a,o),n.updateSelection&&function(t,e,n){const r=t.steps.length-1;if(r<e)return;const o=t.steps[r];if(!(o instanceof xt||o instanceof Dt))return;const i=t.mapping.maps[r];let s=0;i.forEach(((t,e,n,r)=>{0===s&&(s=r)})),t.setSelection(Wt.near(t.doc.resolve(s),-1))}(r,r.steps.length-1)}return!0},joinBackward:()=>({state:t,dispatch:e})=>Mo(t,e),joinForward:()=>({state:t,dispatch:e})=>_o(t,e),keyboardShortcut:t=>({editor:e,view:n,tr:r,dispatch:o})=>{const i=function(t){const e=t.split(/-(?!$)/);let n,r,o,i,s=e[e.length-1];"Space"===s&&(s=" ");for(let t=0;t<e.length-1;t+=1){const s=e[t];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))n=!0;else if(/^(c|ctrl|control)$/i.test(s))r=!0;else if(/^s(hift)?$/i.test(s))o=!0;else{if(!/^mod$/i.test(s))throw new Error(`Unrecognized modifier name: ${s}`);_i()||Li()?i=!0:r=!0}}return n&&(s=`Alt-${s}`),r&&(s=`Ctrl-${s}`),i&&(s=`Meta-${s}`),o&&(s=`Shift-${s}`),s}(t).split(/-(?!$)/),s=i.find((t=>!["Alt","Ctrl","Meta","Shift"].includes(t))),a=new KeyboardEvent("keydown",{key:"Space"===s?" ":s,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),l=e.captureTransaction((()=>{n.someProp("handleKeyDown",(t=>t(n,a)))}));return null==l||l.steps.forEach((t=>{const e=t.map(r.mapping);e&&o&&r.maybeStep(e)})),!0},lift:(t,e={})=>({state:n,dispatch:r})=>!!Ii(n,ri(t,n.schema),e)&&((t,e)=>{let{$from:n,$to:r}=t.selection,o=n.blockRange(r),i=o&&Et(o);return null!=i&&(e&&e(t.tr.lift(o,i).scrollIntoView()),!0)})(n,r),liftEmptyBlock:()=>({state:t,dispatch:e})=>Vo(t,e),liftListItem:t=>({state:e,dispatch:n})=>{return(r=ri(t,e.schema),function(t,e){let{$from:n,$to:o}=t.selection,i=n.blockRange(o,(t=>t.childCount>0&&t.firstChild.type==r));return!!i&&(!e||(n.node(i.depth-1).type==r?function(t,e,n,r){let o=t.tr,i=r.end,s=r.$to.end(r.depth);return i<s&&(o.step(new Dt(i-1,s,i,s,new h(a.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new T(o.doc.resolve(r.$from.pos),o.doc.resolve(s),r.depth)),e(o.lift(r,Et(r)).scrollIntoView()),!0}(t,e,r,i):function(t,e,n){let r=t.tr,o=n.parent;for(let t=n.end,e=n.endIndex-1,i=n.startIndex;e>i;e--)t-=o.child(e).nodeSize,r.delete(t-1,t+1);let i=r.doc.resolve(n.start),s=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let l=0==n.startIndex,u=n.endIndex==o.childCount,c=i.node(-1),d=i.index(-1);if(!c.canReplace(d+(l?0:1),d+1,s.content.append(u?a.empty:a.from(o))))return!1;let p=i.pos,f=p+s.nodeSize;return r.step(new Dt(p-(l?1:0),f+(u?1:0),p+1,f-1,new h((l?a.empty:a.from(o.copy(a.empty))).append(u?a.empty:a.from(o.copy(a.empty))),l?0:1,u?0:1),l?0:1)),e(r.scrollIntoView()),!0}(t,e,i)))})(e,n);var r},newlineInCode:()=>({state:t,dispatch:e})=>Lo(t,e),resetAttributes:(t,e)=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const a=Pi("string"==typeof t?t:t.name,r.schema);return!!a&&("node"===a&&(i=ri(t,r.schema)),"mark"===a&&(s=Ti(t,r.schema)),o&&n.selection.ranges.forEach((t=>{r.doc.nodesBetween(t.$from.pos,t.$to.pos,((t,r)=>{i&&i===t.type&&n.setNodeMarkup(r,void 0,ji(t.attrs,e)),s&&t.marks.length&&t.marks.forEach((o=>{s===o.type&&n.addMark(r,r+t.nodeSize,s.create(ji(o.attrs,e)))}))}))})),!0)},scrollIntoView:()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),selectAll:()=>({tr:t,commands:e})=>e.setTextSelection({from:0,to:t.doc.content.size}),selectNodeBackward:()=>({state:t,dispatch:e})=>No(t,e),selectNodeForward:()=>({state:t,dispatch:e})=>Ro(t,e),selectParentNode:()=>({state:t,dispatch:e})=>((t,e)=>{let n,{$from:r,to:o}=t.selection,i=r.sharedDepth(o);return 0!=i&&(n=r.before(i),e&&e(t.tr.setSelection(Zt.create(t.doc,n))),!0)})(t,e),selectTextblockEnd:()=>({state:t,dispatch:e})=>qo(t,e),selectTextblockStart:()=>({state:t,dispatch:e})=>Wo(t,e),setContent:(t,e=!1,n={})=>({tr:r,editor:o,dispatch:i})=>{const{doc:s}=r,a=Vi(t,o.schema,n);return i&&r.replaceWith(0,s.content.size,a).setMeta("preventUpdate",!e),!0},setMark:(t,e={})=>({tr:n,state:r,dispatch:o})=>{const{selection:i}=n,{empty:s,ranges:a}=i,l=Ti(t,r.schema);if(o)if(s){const t=Hi(r,l);n.addStoredMark(l.create({...t,...e}))}else a.forEach((t=>{const o=t.$from.pos,i=t.$to.pos;r.doc.nodesBetween(o,i,((t,r)=>{const s=Math.max(r,o),a=Math.min(r+t.nodeSize,i);t.marks.find((t=>t.type===l))?t.marks.forEach((t=>{l===t.type&&n.addMark(s,a,l.create({...t.attrs,...e}))})):n.addMark(s,a,l.create(e))}))}));return!0},setMeta:(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),setNode:(t,e={})=>({state:n,dispatch:r,chain:o})=>{const i=ri(t,n.schema);return i.isTextblock?o().command((({commands:t})=>!!Uo(i,e)(n)||t.clearNodes())).command((({state:t})=>Uo(i,e)(t,r))).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},setNodeSelection:t=>({tr:e,dispatch:n})=>{if(n){const{doc:n}=e,r=Wt.atStart(n).from,o=Wt.atEnd(n).to,i=Ni(t,r,o),s=Zt.create(n,i);e.setSelection(s)}return!0},setTextSelection:t=>({tr:e,dispatch:n})=>{if(n){const{doc:n}=e,{from:r,to:o}="number"==typeof t?{from:t,to:t}:t,i=Gt.atStart(n).from,s=Gt.atEnd(n).to,a=Ni(r,i,s),l=Ni(o,i,s),u=Gt.create(n,a,l);e.setSelection(u)}return!0},sinkListItem:t=>({state:e,dispatch:n})=>{const r=ri(t,e.schema);return(o=r,function(t,e){let{$from:n,$to:r}=t.selection,i=n.blockRange(r,(t=>t.childCount>0&&t.firstChild.type==o));if(!i)return!1;let s=i.startIndex;if(0==s)return!1;let l=i.parent,u=l.child(s-1);if(u.type!=o)return!1;if(e){let n=u.lastChild&&u.lastChild.type==l.type,r=a.from(n?o.create():null),s=new h(a.from(o.create(null,a.from(l.type.create(null,r)))),n?3:1,0),c=i.start,d=i.end;e(t.tr.step(new Dt(c-(n?3:1),d,c,d,s,1,!0)).scrollIntoView())}return!0})(e,n);var o},splitBlock:({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:o})=>{const{selection:i,doc:s}=e,{$from:a,$to:l}=i,u=$i(o.extensionManager.attributes,a.node().type.name,a.node().attrs);if(i instanceof Zt&&i.node.isBlock)return!(!a.parentOffset||!At(s,a.pos)||(r&&(t&&Wi(n,o.extensionManager.splittableMarks),e.split(a.pos).scrollIntoView()),0));if(!a.parent.isBlock)return!1;if(r){const r=l.parentOffset===l.parent.content.size;i instanceof Gt&&e.deleteSelection();const s=0===a.depth?void 0:function(t){for(let e=0;e<t.edgeCount;e+=1){const{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}(a.node(-1).contentMatchAt(a.indexAfter(-1)));let c=r&&s?[{type:s,attrs:u}]:void 0,d=At(e.doc,e.mapping.map(a.pos),1,c);if(c||d||!At(e.doc,e.mapping.map(a.pos),1,s?[{type:s}]:void 0)||(d=!0,c=s?[{type:s,attrs:u}]:void 0),d&&(e.split(e.mapping.map(a.pos),1,c),s&&!r&&!a.parentOffset&&a.parent.type!==s)){const t=e.mapping.map(a.before()),n=e.doc.resolve(t);a.node(-1).canReplaceWith(n.index(),n.index()+1,s)&&e.setNodeMarkup(e.mapping.map(a.before()),s)}t&&Wi(n,o.extensionManager.splittableMarks),e.scrollIntoView()}return!0},splitListItem:t=>({tr:e,state:n,dispatch:r,editor:o})=>{var i;const s=ri(t,n.schema),{$from:l,$to:u}=n.selection,c=n.selection.node;if(c&&c.isBlock||l.depth<2||!l.sameParent(u))return!1;const d=l.node(-1);if(d.type!==s)return!1;const p=o.extensionManager.attributes;if(0===l.parent.content.size&&l.node(-1).childCount===l.indexAfter(-1)){if(2===l.depth||l.node(-3).type!==s||l.index(-2)!==l.node(-2).childCount-1)return!1;if(r){let t=a.empty;const n=l.index(-1)?1:l.index(-2)?2:3;for(let e=l.depth-n;e>=l.depth-3;e-=1)t=a.from(l.node(e).copy(t));const r=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,o=$i(p,l.node().type.name,l.node().attrs),u=(null===(i=s.contentMatch.defaultType)||void 0===i?void 0:i.createAndFill(o))||void 0;t=t.append(a.from(s.createAndFill(null,u)||void 0));const c=l.before(l.depth-(n-1));e.replace(c,l.after(-r),new h(t,4-n,0));let d=-1;e.doc.nodesBetween(c,e.doc.content.size,((t,e)=>{if(d>-1)return!1;t.isTextblock&&0===t.content.size&&(d=e+1)})),d>-1&&e.setSelection(Gt.near(e.doc.resolve(d))),e.scrollIntoView()}return!0}const f=u.pos===l.end()?d.contentMatchAt(0).defaultType:null,m=$i(p,d.type.name,d.attrs),g=$i(p,l.node().type.name,l.node().attrs);e.delete(l.pos,u.pos);const v=f?[{type:s,attrs:m},{type:f,attrs:g}]:[{type:s,attrs:m}];return!!At(e.doc,l.pos,2)&&(r&&e.split(l.pos,2,v).scrollIntoView(),!0)},toggleList:(t,e)=>({editor:n,tr:r,state:o,dispatch:i,chain:s,commands:a,can:l})=>{const{extensions:u}=n.extensionManager,c=ri(t,o.schema),d=ri(e,o.schema),{selection:p}=o,{$from:h,$to:f}=p,m=h.blockRange(f);if(!m)return!1;const g=qi((t=>Ui(t.type.name,u)))(p);if(m.depth>=1&&g&&m.depth-g.depth<=1){if(g.node.type===c)return a.liftListItem(d);if(Ui(g.node.type.name,u)&&c.validContent(g.node.content)&&i)return s().command((()=>(r.setNodeMarkup(g.pos,c),!0))).command((()=>Ki(r,c))).command((()=>Gi(r,c))).run()}return s().command((()=>!!l().wrapInList(c)||a.clearNodes())).wrapInList(c).command((()=>Ki(r,c))).command((()=>Gi(r,c))).run()},toggleMark:(t,e={},n={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:i=!1}=n,s=Ti(t,r.schema);return Ji(r,s,e)?o.unsetMark(s,{extendEmptyMarkRange:i}):o.setMark(s,e)},toggleNode:(t,e,n={})=>({state:r,commands:o})=>{const i=ri(t,r.schema),s=ri(e,r.schema);return Ii(r,i,n)?o.setNode(s):o.setNode(i,n)},toggleWrap:(t,e={})=>({state:n,commands:r})=>{const o=ri(t,n.schema);return Ii(n,o,e)?r.lift(o):r.wrapIn(o,e)},undoInputRule:()=>({state:t,dispatch:e})=>{const n=t.plugins;for(let r=0;r<n.length;r+=1){const o=n[r];let i;if(o.spec.isInputRules&&(i=o.getState(t))){if(e){const e=t.tr,n=i.transform;for(let t=n.steps.length-1;t>=0;t-=1)e.step(n.steps[t].invert(n.docs[t]));if(i.text){const n=e.doc.resolve(i.from).marks();e.replaceWith(i.from,i.to,t.schema.text(i.text,n))}else e.delete(i.from,i.to)}return!0}}return!1},unsetAllMarks:()=>({tr:t,dispatch:e})=>{const{selection:n}=t,{empty:r,ranges:o}=n;return r||e&&o.forEach((e=>{t.removeMark(e.$from.pos,e.$to.pos)})),!0},unsetMark:(t,e={})=>({tr:n,state:r,dispatch:o})=>{var i;const{extendEmptyMarkRange:s=!1}=e,{selection:a}=n,l=Ti(t,r.schema),{$from:u,empty:c,ranges:d}=a;if(!o)return!0;if(c&&s){let{from:t,to:e}=a;const r=null===(i=u.marks().find((t=>t.type===l)))||void 0===i?void 0:i.attrs,o=Ai(u,l,r);o&&(t=o.from,e=o.to),n.removeMark(t,e,l)}else d.forEach((t=>{n.removeMark(t.$from.pos,t.$to.pos,l)}));return n.removeStoredMark(l),!0},updateAttributes:(t,e={})=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const a=Pi("string"==typeof t?t:t.name,r.schema);return!!a&&("node"===a&&(i=ri(t,r.schema)),"mark"===a&&(s=Ti(t,r.schema)),o&&n.selection.ranges.forEach((t=>{const o=t.$from.pos,a=t.$to.pos;r.doc.nodesBetween(o,a,((t,r)=>{i&&i===t.type&&n.setNodeMarkup(r,void 0,{...t.attrs,...e}),s&&t.marks.length&&t.marks.forEach((i=>{if(s===i.type){const l=Math.max(r,o),u=Math.min(r+t.nodeSize,a);n.addMark(l,u,s.create({...i.attrs,...e}))}}))}))})),!0)},wrapIn:(t,e={})=>({state:n,dispatch:r})=>function(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),a=s&&St(s,t,e);return!!a&&(r&&r(n.tr.wrap(s,a).scrollIntoView()),!0)}}(ri(t,n.schema),e)(n,r),wrapInList:(t,e={})=>({state:n,dispatch:r})=>function(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),l=!1,u=s;if(!s)return!1;if(s.depth>=2&&o.node(s.depth-1).type.compatibleContent(t)&&0==s.startIndex){if(0==o.index(s.depth-1))return!1;let t=n.doc.resolve(s.start-2);u=new T(t,t,s.depth),s.endIndex<s.parent.childCount&&(s=new T(o,n.doc.resolve(i.end(s.depth)),s.depth)),l=!0}let c=St(u,t,e,s);return!!c&&(r&&r(function(t,e,n,r,o){let i=a.empty;for(let t=n.length-1;t>=0;t--)i=a.from(n[t].type.create(n[t].attrs,i));t.step(new Dt(e.start-(r?2:0),e.end,e.start,e.end,new h(i,0,0),n.length,!0));let s=0;for(let t=0;t<n.length;t++)n[t].type==o&&(s=t+1);let l=n.length-s,u=e.start+n.length-(r?2:0),c=e.parent;for(let n=e.startIndex,r=e.endIndex,o=!0;n<r;n++,o=!1)!o&&At(t.doc,u,l)&&(t.split(u,l),u+=2*l),u+=c.child(n).nodeSize;return t}(n.tr,s,c,l,t).scrollIntoView()),!0)}}(ri(t,n.schema),e)(n,r)});const Yi=xi.create({name:"commands",addCommands:()=>({...Zi})}),Xi=xi.create({name:"editable",addProseMirrorPlugins(){return[new ue({key:new pe("editable"),props:{editable:()=>this.editor.options.editable}})]}}),Qi=xi.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new ue({key:new pe("focusEvents"),props:{handleDOMEvents:{focus:(e,n)=>{t.isFocused=!0;const r=t.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,n)=>{t.isFocused=!1;const r=t.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),ts=xi.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first((({commands:t})=>[()=>t.undoInputRule(),()=>t.command((({tr:e})=>{const{selection:n,doc:r}=e,{empty:o,$anchor:i}=n,{pos:s,parent:a}=i,l=Wt.atStart(r).from===s;return!(!(o&&l&&a.type.isTextblock)||a.textContent.length)&&t.clearNodes()})),()=>t.deleteSelection(),()=>t.joinBackward(),()=>t.selectNodeBackward()])),e=()=>this.editor.commands.first((({commands:t})=>[()=>t.deleteSelection(),()=>t.joinForward(),()=>t.selectNodeForward()])),n={Enter:()=>this.editor.commands.first((({commands:t})=>[()=>t.newlineInCode(),()=>t.createParagraphNear(),()=>t.liftEmptyBlock(),()=>t.splitBlock()])),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},r={...n},o={...n,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return _i()||Li()?o:r},addProseMirrorPlugins(){return[new ue({key:new pe("clearDocument"),appendTransaction:(t,e,n)=>{if(!t.some((t=>t.docChanged))||e.doc.eq(n.doc))return;const{empty:r,from:o,to:i}=e.selection,s=Wt.atStart(e.doc).from,a=Wt.atEnd(e.doc).to,l=o===s&&i===a,u=0===n.doc.textBetween(0,n.doc.content.size," "," ").length;if(r||!l||!u)return;const c=n.tr,d=Xo({state:n,transaction:c}),{commands:p}=new Qo({editor:this.editor,state:d});return p.clearNodes(),c.steps.length?c:void 0}})]}}),es=xi.create({name:"tabindex",addProseMirrorPlugins(){return[new ue({key:new pe("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}});var ns=Object.freeze({__proto__:null,ClipboardTextSerializer:Ci,Commands:Yi,Editable:Xi,FocusEvents:Qi,Keymap:ts,Tabindex:es});function rs(t,e){const n=Pi("string"==typeof e?e:e.name,t.schema);return"node"===n?function(t,e){const n=ri(e,t.schema),{from:r,to:o}=t.selection,i=[];t.doc.nodesBetween(r,o,(t=>{i.push(t)}));const s=i.reverse().find((t=>t.type.name===n.name));return s?{...s.attrs}:{}}(t,e):"mark"===n?Hi(t,e):{}}function is(t,e,n){const r=[];return t===e?n.resolve(t).marks().forEach((e=>{const o=Ai(n.resolve(t-1),e.type);o&&r.push({mark:e,...o})})):n.nodesBetween(t,e,((t,e)=>{r.push(...t.marks.map((n=>({from:e,to:e+t.nodeSize,mark:n}))))})),r}function ss(t,e,n){const r=t.state.doc.content.size,o=Ni(e,0,r),i=Ni(n,0,r),s=t.coordsAtPos(o),a=t.coordsAtPos(i,-1),l=Math.min(s.top,a.top),u=Math.max(s.bottom,a.bottom),c=Math.min(s.left,a.left),d=Math.max(s.right,a.right),p={top:l,bottom:u,left:c,right:d,width:d-c,height:u-l,x:c,y:l};return{...p,toJSON:()=>p}}function as(t){return new hi({find:t.find,handler:({state:e,range:n,match:r})=>{let o=t.replace,i=n.from;const s=n.to;if(r[1]){const t=r[0].lastIndexOf(r[1]);o+=r[0].slice(t+r[1].length),i+=t;const e=i-s;e>0&&(o=r[0].slice(t-e,t)+o,i=s)}e.tr.insertText(o,i,s)}})}class ls{constructor(t={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=ai(ti(this,"addOptions",{name:this.name}))),this.storage=ai(ti(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new ls(t)}configure(t={}){const e=this.extend();return e.options=wi(this.options,t),e.storage=ai(ti(e,"addStorage",{name:e.name,options:e.options})),e}extend(t={}){const e=new ls(t);return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`),e.options=ai(ti(e,"addOptions",{name:e.name})),e.storage=ai(ti(e,"addStorage",{name:e.name,options:e.options})),e}}class us{constructor(t={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=ai(ti(this,"addOptions",{name:this.name}))),this.storage=ai(ti(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new us(t)}configure(t={}){const e=this.extend();return e.options=wi(this.options,t),e.storage=ai(ti(e,"addStorage",{name:e.name,options:e.options})),e}extend(t={}){const e=new us(t);return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`),e.options=ai(ti(e,"addOptions",{name:e.name})),e.storage=ai(ti(e,"addStorage",{name:e.name,options:e.options})),e}}function cs(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function ds(t){return t instanceof cs(t).Element||t instanceof Element}function ps(t){return t instanceof cs(t).HTMLElement||t instanceof HTMLElement}function hs(t){return"undefined"!=typeof ShadowRoot&&(t instanceof cs(t).ShadowRoot||t instanceof ShadowRoot)}var fs=Math.max,ms=Math.min,gs=Math.round;function vs(t,e){void 0===e&&(e=!1);var n=t.getBoundingClientRect(),r=1,o=1;if(ps(t)&&e){var i=t.offsetHeight,s=t.offsetWidth;s>0&&(r=gs(n.width)/s||1),i>0&&(o=gs(n.height)/i||1)}return{width:n.width/r,height:n.height/o,top:n.top/o,right:n.right/r,bottom:n.bottom/o,left:n.left/r,x:n.left/r,y:n.top/o}}function ys(t){var e=cs(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function bs(t){return t?(t.nodeName||"").toLowerCase():null}function ws(t){return((ds(t)?t.ownerDocument:t.document)||window.document).documentElement}function xs(t){return vs(ws(t)).left+ys(t).scrollLeft}function Ds(t){return cs(t).getComputedStyle(t)}function ks(t){var e=Ds(t),n=e.overflow,r=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function Cs(t,e,n){void 0===n&&(n=!1);var r,o,i=ps(e),s=ps(e)&&function(t){var e=t.getBoundingClientRect(),n=gs(e.width)/t.offsetWidth||1,r=gs(e.height)/t.offsetHeight||1;return 1!==n||1!==r}(e),a=ws(e),l=vs(t,s),u={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(i||!i&&!n)&&(("body"!==bs(e)||ks(a))&&(u=(r=e)!==cs(r)&&ps(r)?{scrollLeft:(o=r).scrollLeft,scrollTop:o.scrollTop}:ys(r)),ps(e)?((c=vs(e,!0)).x+=e.clientLeft,c.y+=e.clientTop):a&&(c.x=xs(a))),{x:l.left+u.scrollLeft-c.x,y:l.top+u.scrollTop-c.y,width:l.width,height:l.height}}function Es(t){var e=vs(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function Ss(t){return"html"===bs(t)?t:t.assignedSlot||t.parentNode||(hs(t)?t.host:null)||ws(t)}function Os(t){return["html","body","#document"].indexOf(bs(t))>=0?t.ownerDocument.body:ps(t)&&ks(t)?t:Os(Ss(t))}function As(t,e){var n;void 0===e&&(e=[]);var r=Os(t),o=r===(null==(n=t.ownerDocument)?void 0:n.body),i=cs(r),s=o?[i].concat(i.visualViewport||[],ks(r)?r:[]):r,a=e.concat(s);return o?a:a.concat(As(Ss(s)))}function Ts(t){return["table","td","th"].indexOf(bs(t))>=0}function Ms(t){return ps(t)&&"fixed"!==Ds(t).position?t.offsetParent:null}function Fs(t){for(var e=cs(t),n=Ms(t);n&&Ts(n)&&"static"===Ds(n).position;)n=Ms(n);return n&&("html"===bs(n)||"body"===bs(n)&&"static"===Ds(n).position)?e:n||function(t){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&ps(t)&&"fixed"===Ds(t).position)return null;var n=Ss(t);for(hs(n)&&(n=n.host);ps(n)&&["html","body"].indexOf(bs(n))<0;){var r=Ds(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||e&&"filter"===r.willChange||e&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(t)||e}var Ns="top",Bs="bottom",_s="right",Rs="left",zs="auto",Ls=[Ns,Bs,_s,Rs],Is="start",Ps="end",js="viewport",Vs="popper",Hs=Ls.reduce((function(t,e){return t.concat([e+"-"+Is,e+"-"+Ps])}),[]),$s=[].concat(Ls,[zs]).reduce((function(t,e){return t.concat([e,e+"-"+Is,e+"-"+Ps])}),[]),Ws=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function qs(t){var e=new Map,n=new Set,r=[];function o(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!n.has(t)){var r=e.get(t);r&&o(r)}})),r.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){n.has(t.name)||o(t)})),r}var Us={placement:"bottom",modifiers:[],strategy:"absolute"};function Ks(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function Gs(t){void 0===t&&(t={});var e=t,n=e.defaultModifiers,r=void 0===n?[]:n,o=e.defaultOptions,i=void 0===o?Us:o;return function(t,e,n){void 0===n&&(n=i);var o,s,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},Us,i),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},l=[],u=!1,c={state:a,setOptions:function(n){var o="function"==typeof n?n(a.options):n;d(),a.options=Object.assign({},i,a.options,o),a.scrollParents={reference:ds(t)?As(t):t.contextElement?As(t.contextElement):[],popper:As(e)};var s=function(t){var e=qs(t);return Ws.reduce((function(t,n){return t.concat(e.filter((function(t){return t.phase===n})))}),[])}(function(t){var e=t.reduce((function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign({},n,e,{options:Object.assign({},n.options,e.options),data:Object.assign({},n.data,e.data)}):e,t}),{});return Object.keys(e).map((function(t){return e[t]}))}([].concat(r,a.options.modifiers)));return a.orderedModifiers=s.filter((function(t){return t.enabled})),a.orderedModifiers.forEach((function(t){var e=t.name,n=t.options,r=void 0===n?{}:n,o=t.effect;if("function"==typeof o){var i=o({state:a,name:e,instance:c,options:r});l.push(i||function(){})}})),c.update()},forceUpdate:function(){if(!u){var t=a.elements,e=t.reference,n=t.popper;if(Ks(e,n)){a.rects={reference:Cs(e,Fs(n),"fixed"===a.options.strategy),popper:Es(n)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(t){return a.modifiersData[t.name]=Object.assign({},t.data)}));for(var r=0;r<a.orderedModifiers.length;r++)if(!0!==a.reset){var o=a.orderedModifiers[r],i=o.fn,s=o.options,l=void 0===s?{}:s,d=o.name;"function"==typeof i&&(a=i({state:a,options:l,name:d,instance:c})||a)}else a.reset=!1,r=-1}}},update:(o=function(){return new Promise((function(t){c.forceUpdate(),t(a)}))},function(){return s||(s=new Promise((function(t){Promise.resolve().then((function(){s=void 0,t(o())}))}))),s}),destroy:function(){d(),u=!0}};if(!Ks(t,e))return c;function d(){l.forEach((function(t){return t()})),l=[]}return c.setOptions(n).then((function(t){!u&&n.onFirstUpdate&&n.onFirstUpdate(t)})),c}}var Js={passive:!0};function Zs(t){return t.split("-")[0]}function Ys(t){return t.split("-")[1]}function Xs(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Qs(t){var e,n=t.reference,r=t.element,o=t.placement,i=o?Zs(o):null,s=o?Ys(o):null,a=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(i){case Ns:e={x:a,y:n.y-r.height};break;case Bs:e={x:a,y:n.y+n.height};break;case _s:e={x:n.x+n.width,y:l};break;case Rs:e={x:n.x-r.width,y:l};break;default:e={x:n.x,y:n.y}}var u=i?Xs(i):null;if(null!=u){var c="y"===u?"height":"width";switch(s){case Is:e[u]=e[u]-(n[c]/2-r[c]/2);break;case Ps:e[u]=e[u]+(n[c]/2-r[c]/2)}}return e}var ta={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ea(t){var e,n=t.popper,r=t.popperRect,o=t.placement,i=t.variation,s=t.offsets,a=t.position,l=t.gpuAcceleration,u=t.adaptive,c=t.roundOffsets,d=t.isFixed,p=s.x,h=void 0===p?0:p,f=s.y,m=void 0===f?0:f,g="function"==typeof c?c({x:h,y:m}):{x:h,y:m};h=g.x,m=g.y;var v=s.hasOwnProperty("x"),y=s.hasOwnProperty("y"),b=Rs,w=Ns,x=window;if(u){var D=Fs(n),k="clientHeight",C="clientWidth";D===cs(n)&&"static"!==Ds(D=ws(n)).position&&"absolute"===a&&(k="scrollHeight",C="scrollWidth"),(o===Ns||(o===Rs||o===_s)&&i===Ps)&&(w=Bs,m-=(d&&D===x&&x.visualViewport?x.visualViewport.height:D[k])-r.height,m*=l?1:-1),o!==Rs&&(o!==Ns&&o!==Bs||i!==Ps)||(b=_s,h-=(d&&D===x&&x.visualViewport?x.visualViewport.width:D[C])-r.width,h*=l?1:-1)}var E,S=Object.assign({position:a},u&&ta),O=!0===c?function(t){var e=t.x,n=t.y,r=window.devicePixelRatio||1;return{x:gs(e*r)/r||0,y:gs(n*r)/r||0}}({x:h,y:m}):{x:h,y:m};return h=O.x,m=O.y,l?Object.assign({},S,((E={})[w]=y?"0":"",E[b]=v?"0":"",E.transform=(x.devicePixelRatio||1)<=1?"translate("+h+"px, "+m+"px)":"translate3d("+h+"px, "+m+"px, 0)",E)):Object.assign({},S,((e={})[w]=y?m+"px":"",e[b]=v?h+"px":"",e.transform="",e))}const na={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var n=e.styles[t]||{},r=e.attributes[t]||{},o=e.elements[t];ps(o)&&bs(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(t){var e=r[t];!1===e?o.removeAttribute(t):o.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach((function(t){var r=e.elements[t],o=e.attributes[t]||{},i=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce((function(t,e){return t[e]="",t}),{});ps(r)&&bs(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(t){r.removeAttribute(t)})))}))}},requires:["computeStyles"]};var ra={left:"right",right:"left",bottom:"top",top:"bottom"};function oa(t){return t.replace(/left|right|bottom|top/g,(function(t){return ra[t]}))}var ia={start:"end",end:"start"};function sa(t){return t.replace(/start|end/g,(function(t){return ia[t]}))}function aa(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&hs(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function la(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function ua(t,e){return e===js?la(function(t){var e=cs(t),n=ws(t),r=e.visualViewport,o=n.clientWidth,i=n.clientHeight,s=0,a=0;return r&&(o=r.width,i=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=r.offsetLeft,a=r.offsetTop)),{width:o,height:i,x:s+xs(t),y:a}}(t)):ds(e)?function(t){var e=vs(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(e):la(function(t){var e,n=ws(t),r=ys(t),o=null==(e=t.ownerDocument)?void 0:e.body,i=fs(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=fs(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-r.scrollLeft+xs(t),l=-r.scrollTop;return"rtl"===Ds(o||n).direction&&(a+=fs(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:a,y:l}}(ws(t)))}function ca(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function da(t,e){return e.reduce((function(e,n){return e[n]=t,e}),{})}function pa(t,e){void 0===e&&(e={});var n=e,r=n.placement,o=void 0===r?t.placement:r,i=n.boundary,s=void 0===i?"clippingParents":i,a=n.rootBoundary,l=void 0===a?js:a,u=n.elementContext,c=void 0===u?Vs:u,d=n.altBoundary,p=void 0!==d&&d,h=n.padding,f=void 0===h?0:h,m=ca("number"!=typeof f?f:da(f,Ls)),g=c===Vs?"reference":Vs,v=t.rects.popper,y=t.elements[p?g:c],b=function(t,e,n){var r="clippingParents"===e?function(t){var e=As(Ss(t)),n=["absolute","fixed"].indexOf(Ds(t).position)>=0&&ps(t)?Fs(t):t;return ds(n)?e.filter((function(t){return ds(t)&&aa(t,n)&&"body"!==bs(t)})):[]}(t):[].concat(e),o=[].concat(r,[n]),i=o[0],s=o.reduce((function(e,n){var r=ua(t,n);return e.top=fs(r.top,e.top),e.right=ms(r.right,e.right),e.bottom=ms(r.bottom,e.bottom),e.left=fs(r.left,e.left),e}),ua(t,i));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}(ds(y)?y:y.contextElement||ws(t.elements.popper),s,l),w=vs(t.elements.reference),x=Qs({reference:w,element:v,strategy:"absolute",placement:o}),D=la(Object.assign({},v,x)),k=c===Vs?D:w,C={top:b.top-k.top+m.top,bottom:k.bottom-b.bottom+m.bottom,left:b.left-k.left+m.left,right:k.right-b.right+m.right},E=t.modifiersData.offset;if(c===Vs&&E){var S=E[o];Object.keys(C).forEach((function(t){var e=[_s,Bs].indexOf(t)>=0?1:-1,n=[Ns,Bs].indexOf(t)>=0?"y":"x";C[t]+=S[n]*e}))}return C}const ha={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,s=n.altAxis,a=void 0===s||s,l=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,p=n.altBoundary,h=n.flipVariations,f=void 0===h||h,m=n.allowedAutoPlacements,g=e.options.placement,v=Zs(g),y=l||(v!==g&&f?function(t){if(Zs(t)===zs)return[];var e=oa(t);return[sa(t),e,sa(e)]}(g):[oa(g)]),b=[g].concat(y).reduce((function(t,n){return t.concat(Zs(n)===zs?function(t,e){void 0===e&&(e={});var n=e,r=n.placement,o=n.boundary,i=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,u=void 0===l?$s:l,c=Ys(r),d=c?a?Hs:Hs.filter((function(t){return Ys(t)===c})):Ls,p=d.filter((function(t){return u.indexOf(t)>=0}));0===p.length&&(p=d);var h=p.reduce((function(e,n){return e[n]=pa(t,{placement:n,boundary:o,rootBoundary:i,padding:s})[Zs(n)],e}),{});return Object.keys(h).sort((function(t,e){return h[t]-h[e]}))}(e,{placement:n,boundary:c,rootBoundary:d,padding:u,flipVariations:f,allowedAutoPlacements:m}):n)}),[]),w=e.rects.reference,x=e.rects.popper,D=new Map,k=!0,C=b[0],E=0;E<b.length;E++){var S=b[E],O=Zs(S),A=Ys(S)===Is,T=[Ns,Bs].indexOf(O)>=0,M=T?"width":"height",F=pa(e,{placement:S,boundary:c,rootBoundary:d,altBoundary:p,padding:u}),N=T?A?_s:Rs:A?Bs:Ns;w[M]>x[M]&&(N=oa(N));var B=oa(N),_=[];if(i&&_.push(F[O]<=0),a&&_.push(F[N]<=0,F[B]<=0),_.every((function(t){return t}))){C=S,k=!1;break}D.set(S,_)}if(k)for(var R=function(t){var e=b.find((function(e){var n=D.get(e);if(n)return n.slice(0,t).every((function(t){return t}))}));if(e)return C=e,"break"},z=f?3:1;z>0&&"break"!==R(z);z--);e.placement!==C&&(e.modifiersData[r]._skip=!0,e.placement=C,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function fa(t,e,n){return fs(t,ms(e,n))}function ma(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function ga(t){return[Ns,_s,Bs,Rs].some((function(e){return t[e]>=0}))}var va=Gs({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,n=t.instance,r=t.options,o=r.scroll,i=void 0===o||o,s=r.resize,a=void 0===s||s,l=cs(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return i&&u.forEach((function(t){t.addEventListener("scroll",n.update,Js)})),a&&l.addEventListener("resize",n.update,Js),function(){i&&u.forEach((function(t){t.removeEventListener("scroll",n.update,Js)})),a&&l.removeEventListener("resize",n.update,Js)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,n=t.name;e.modifiersData[n]=Qs({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,n=t.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,s=void 0===i||i,a=n.roundOffsets,l=void 0===a||a,u={placement:Zs(e.placement),variation:Ys(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,ea(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,ea(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},na,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,n=t.options,r=t.name,o=n.offset,i=void 0===o?[0,0]:o,s=$s.reduce((function(t,n){return t[n]=function(t,e,n){var r=Zs(t),o=[Rs,Ns].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},e,{placement:t})):n,s=i[0],a=i[1];return s=s||0,a=(a||0)*o,[Rs,_s].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}(n,e.rects,i),t}),{}),a=s[e.placement],l=a.x,u=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=u),e.modifiersData[r]=s}},ha,{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,r=t.name,o=n.mainAxis,i=void 0===o||o,s=n.altAxis,a=void 0!==s&&s,l=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,p=n.tether,h=void 0===p||p,f=n.tetherOffset,m=void 0===f?0:f,g=pa(e,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),v=Zs(e.placement),y=Ys(e.placement),b=!y,w=Xs(v),x="x"===w?"y":"x",D=e.modifiersData.popperOffsets,k=e.rects.reference,C=e.rects.popper,E="function"==typeof m?m(Object.assign({},e.rects,{placement:e.placement})):m,S="number"==typeof E?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),O=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,A={x:0,y:0};if(D){if(i){var T,M="y"===w?Ns:Rs,F="y"===w?Bs:_s,N="y"===w?"height":"width",B=D[w],_=B+g[M],R=B-g[F],z=h?-C[N]/2:0,L=y===Is?k[N]:C[N],I=y===Is?-C[N]:-k[N],P=e.elements.arrow,j=h&&P?Es(P):{width:0,height:0},V=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},H=V[M],$=V[F],W=fa(0,k[N],j[N]),q=b?k[N]/2-z-W-H-S.mainAxis:L-W-H-S.mainAxis,U=b?-k[N]/2+z+W+$+S.mainAxis:I+W+$+S.mainAxis,K=e.elements.arrow&&Fs(e.elements.arrow),G=K?"y"===w?K.clientTop||0:K.clientLeft||0:0,J=null!=(T=null==O?void 0:O[w])?T:0,Z=B+U-J,Y=fa(h?ms(_,B+q-J-G):_,B,h?fs(R,Z):R);D[w]=Y,A[w]=Y-B}if(a){var X,Q="x"===w?Ns:Rs,tt="x"===w?Bs:_s,et=D[x],nt="y"===x?"height":"width",rt=et+g[Q],ot=et-g[tt],it=-1!==[Ns,Rs].indexOf(v),st=null!=(X=null==O?void 0:O[x])?X:0,at=it?rt:et-k[nt]-C[nt]-st+S.altAxis,lt=it?et+k[nt]+C[nt]-st-S.altAxis:ot,ut=h&&it?function(t,e,n){var r=fa(t,e,n);return r>n?n:r}(at,et,lt):fa(h?at:rt,et,h?lt:ot);D[x]=ut,A[x]=ut-et}e.modifiersData[r]=A}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,n=t.state,r=t.name,o=t.options,i=n.elements.arrow,s=n.modifiersData.popperOffsets,a=Zs(n.placement),l=Xs(a),u=[Rs,_s].indexOf(a)>=0?"height":"width";if(i&&s){var c=function(t,e){return ca("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:da(t,Ls))}(o.padding,n),d=Es(i),p="y"===l?Ns:Rs,h="y"===l?Bs:_s,f=n.rects.reference[u]+n.rects.reference[l]-s[l]-n.rects.popper[u],m=s[l]-n.rects.reference[l],g=Fs(i),v=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,y=f/2-m/2,b=c[p],w=v-d[u]-c[h],x=v/2-d[u]/2+y,D=fa(b,x,w),k=l;n.modifiersData[r]=((e={})[k]=D,e.centerOffset=D-x,e)}},effect:function(t){var e=t.state,n=t.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=e.elements.popper.querySelector(r)))&&aa(e.elements.popper,r)&&(e.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,n=t.name,r=e.rects.reference,o=e.rects.popper,i=e.modifiersData.preventOverflow,s=pa(e,{elementContext:"reference"}),a=pa(e,{altBoundary:!0}),l=ma(s,r),u=ma(a,o,i),c=ga(l),d=ga(u);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}}]}),ya="tippy-content",ba="tippy-arrow",wa="tippy-svg-arrow",xa={passive:!0,capture:!0},Da=function(){return document.body};function ka(t,e,n){if(Array.isArray(t)){var r=t[e];return null==r?Array.isArray(n)?n[e]:n:r}return t}function Ca(t,e){var n={}.toString.call(t);return 0===n.indexOf("[object")&&n.indexOf(e+"]")>-1}function Ea(t,e){return"function"==typeof t?t.apply(void 0,e):t}function Sa(t,e){return 0===e?t:function(r){clearTimeout(n),n=setTimeout((function(){t(r)}),e)};var n}function Oa(t){return[].concat(t)}function Aa(t,e){-1===t.indexOf(e)&&t.push(e)}function Ta(t){return[].slice.call(t)}function Ma(t){return Object.keys(t).reduce((function(e,n){return void 0!==t[n]&&(e[n]=t[n]),e}),{})}function Fa(){return document.createElement("div")}function Na(t){return["Element","Fragment"].some((function(e){return Ca(t,e)}))}function Ba(t,e){t.forEach((function(t){t&&(t.style.transitionDuration=e+"ms")}))}function _a(t,e){t.forEach((function(t){t&&t.setAttribute("data-state",e)}))}function Ra(t,e,n){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(e){t[r](e,n)}))}function za(t,e){for(var n=e;n;){var r;if(t.contains(n))return!0;n=null==n.getRootNode||null==(r=n.getRootNode())?void 0:r.host}return!1}var La={isTouch:!1},Ia=0;function Pa(){La.isTouch||(La.isTouch=!0,window.performance&&document.addEventListener("mousemove",ja))}function ja(){var t=performance.now();t-Ia<20&&(La.isTouch=!1,document.removeEventListener("mousemove",ja)),Ia=t}function Va(){var t,e=document.activeElement;if((t=e)&&t._tippy&&t._tippy.reference===t){var n=e._tippy;e.blur&&!n.state.isVisible&&e.blur()}}var Ha=!("undefined"==typeof window||"undefined"==typeof document||!window.msCrypto),$a=Object.assign({appendTo:Da,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Wa=Object.keys($a);function qa(t){var e=(t.plugins||[]).reduce((function(e,n){var r,o=n.name,i=n.defaultValue;return o&&(e[o]=void 0!==t[o]?t[o]:null!=(r=$a[o])?r:i),e}),{});return Object.assign({},t,e)}function Ua(t,e){var n=Object.assign({},e,{content:Ea(e.content,[t])},e.ignoreAttributes?{}:function(t,e){return(e?Object.keys(qa(Object.assign({},$a,{plugins:e}))):Wa).reduce((function(e,n){var r=(t.getAttribute("data-tippy-"+n)||"").trim();if(!r)return e;if("content"===n)e[n]=r;else try{e[n]=JSON.parse(r)}catch(t){e[n]=r}return e}),{})}(t,e.plugins));return n.aria=Object.assign({},$a.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?e.interactive:n.aria.expanded,content:"auto"===n.aria.content?e.interactive?null:"describedby":n.aria.content},n}function Ka(t,e){t.innerHTML=e}function Ga(t){var e=Fa();return!0===t?e.className=ba:(e.className=wa,Na(t)?e.appendChild(t):Ka(e,t)),e}function Ja(t,e){Na(e.content)?(Ka(t,""),t.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?Ka(t,e.content):t.textContent=e.content)}function Za(t){var e=t.firstElementChild,n=Ta(e.children);return{box:e,content:n.find((function(t){return t.classList.contains(ya)})),arrow:n.find((function(t){return t.classList.contains(ba)||t.classList.contains(wa)})),backdrop:n.find((function(t){return t.classList.contains("tippy-backdrop")}))}}function Ya(t){var e=Fa(),n=Fa();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=Fa();function o(n,r){var o=Za(e),i=o.box,s=o.content,a=o.arrow;r.theme?i.setAttribute("data-theme",r.theme):i.removeAttribute("data-theme"),"string"==typeof r.animation?i.setAttribute("data-animation",r.animation):i.removeAttribute("data-animation"),r.inertia?i.setAttribute("data-inertia",""):i.removeAttribute("data-inertia"),i.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?i.setAttribute("role",r.role):i.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||Ja(s,t.props),r.arrow?a?n.arrow!==r.arrow&&(i.removeChild(a),i.appendChild(Ga(r.arrow))):i.appendChild(Ga(r.arrow)):a&&i.removeChild(a)}return r.className=ya,r.setAttribute("data-state","hidden"),Ja(r,t.props),e.appendChild(n),n.appendChild(r),o(t.props,t.props),{popper:e,onUpdate:o}}Ya.$$tippy=!0;var Xa=1,Qa=[],tl=[];function el(t,e){var n,r,o,i,s,a,l,u,c=Ua(t,Object.assign({},$a,qa(Ma(e)))),d=!1,p=!1,h=!1,f=!1,m=[],g=Sa(K,c.interactiveDebounce),v=Xa++,y=(u=c.plugins).filter((function(t,e){return u.indexOf(t)===e})),b={id:v,reference:t,popper:Fa(),popperInstance:null,props:c,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:y,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(o)},setProps:function(e){if(!b.state.isDestroyed){B("onBeforeUpdate",[b,e]),q();var n=b.props,r=Ua(t,Object.assign({},n,Ma(e),{ignoreAttributes:!0}));b.props=r,W(),n.interactiveDebounce!==r.interactiveDebounce&&(z(),g=Sa(K,r.interactiveDebounce)),n.triggerTarget&&!r.triggerTarget?Oa(n.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):r.triggerTarget&&t.removeAttribute("aria-expanded"),R(),N(),D&&D(n,r),b.popperInstance&&(Y(),Q().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)}))),B("onAfterUpdate",[b,e])}},setContent:function(t){b.setProps({content:t})},show:function(){var t=b.state.isVisible,e=b.state.isDestroyed,n=!b.state.isEnabled,r=La.isTouch&&!b.props.touch,o=ka(b.props.duration,0,$a.duration);if(!(t||e||n||r||A().hasAttribute("disabled")||(B("onShow",[b],!1),!1===b.props.onShow(b)))){if(b.state.isVisible=!0,O()&&(x.style.visibility="visible"),N(),j(),b.state.isMounted||(x.style.transition="none"),O()){var i=M();Ba([i.box,i.content],0)}a=function(){var t;if(b.state.isVisible&&!f){if(f=!0,x.offsetHeight,x.style.transition=b.props.moveTransition,O()&&b.props.animation){var e=M(),n=e.box,r=e.content;Ba([n,r],o),_a([n,r],"visible")}_(),R(),Aa(tl,b),null==(t=b.popperInstance)||t.forceUpdate(),B("onMount",[b]),b.props.animation&&O()&&function(t,e){H(t,(function(){b.state.isShown=!0,B("onShown",[b])}))}(o)}},function(){var t,e=b.props.appendTo,n=A();(t=b.props.interactive&&e===Da||"parent"===e?n.parentNode:Ea(e,[n])).contains(x)||t.appendChild(x),b.state.isMounted=!0,Y()}()}},hide:function(){var t=!b.state.isVisible,e=b.state.isDestroyed,n=!b.state.isEnabled,r=ka(b.props.duration,1,$a.duration);if(!(t||e||n)&&(B("onHide",[b],!1),!1!==b.props.onHide(b))){if(b.state.isVisible=!1,b.state.isShown=!1,f=!1,d=!1,O()&&(x.style.visibility="hidden"),z(),V(),N(!0),O()){var o=M(),i=o.box,s=o.content;b.props.animation&&(Ba([i,s],r),_a([i,s],"hidden"))}_(),R(),b.props.animation?O()&&function(t,e){H(t,(function(){!b.state.isVisible&&x.parentNode&&x.parentNode.contains(x)&&e()}))}(r,b.unmount):b.unmount()}},hideWithInteractivity:function(t){T().addEventListener("mousemove",g),Aa(Qa,g),g(t)},enable:function(){b.state.isEnabled=!0},disable:function(){b.hide(),b.state.isEnabled=!1},unmount:function(){b.state.isVisible&&b.hide(),b.state.isMounted&&(X(),Q().forEach((function(t){t._tippy.unmount()})),x.parentNode&&x.parentNode.removeChild(x),tl=tl.filter((function(t){return t!==b})),b.state.isMounted=!1,B("onHidden",[b]))},destroy:function(){b.state.isDestroyed||(b.clearDelayTimeouts(),b.unmount(),q(),delete t._tippy,b.state.isDestroyed=!0,B("onDestroy",[b]))}};if(!c.render)return b;var w=c.render(b),x=w.popper,D=w.onUpdate;x.setAttribute("data-tippy-root",""),x.id="tippy-"+b.id,b.popper=x,t._tippy=b,x._tippy=b;var k=y.map((function(t){return t.fn(b)})),C=t.hasAttribute("aria-expanded");return W(),R(),N(),B("onCreate",[b]),c.showOnCreate&&tt(),x.addEventListener("mouseenter",(function(){b.props.interactive&&b.state.isVisible&&b.clearDelayTimeouts()})),x.addEventListener("mouseleave",(function(){b.props.interactive&&b.props.trigger.indexOf("mouseenter")>=0&&T().addEventListener("mousemove",g)})),b;function E(){var t=b.props.touch;return Array.isArray(t)?t:[t,0]}function S(){return"hold"===E()[0]}function O(){var t;return!(null==(t=b.props.render)||!t.$$tippy)}function A(){return l||t}function T(){var t,e,n=A().parentNode;return n?null!=(e=Oa(n)[0])&&null!=(t=e.ownerDocument)&&t.body?e.ownerDocument:document:document}function M(){return Za(x)}function F(t){return b.state.isMounted&&!b.state.isVisible||La.isTouch||i&&"focus"===i.type?0:ka(b.props.delay,t?0:1,$a.delay)}function N(t){void 0===t&&(t=!1),x.style.pointerEvents=b.props.interactive&&!t?"":"none",x.style.zIndex=""+b.props.zIndex}function B(t,e,n){var r;void 0===n&&(n=!0),k.forEach((function(n){n[t]&&n[t].apply(n,e)})),n&&(r=b.props)[t].apply(r,e)}function _(){var e=b.props.aria;if(e.content){var n="aria-"+e.content,r=x.id;Oa(b.props.triggerTarget||t).forEach((function(t){var e=t.getAttribute(n);if(b.state.isVisible)t.setAttribute(n,e?e+" "+r:r);else{var o=e&&e.replace(r,"").trim();o?t.setAttribute(n,o):t.removeAttribute(n)}}))}}function R(){!C&&b.props.aria.expanded&&Oa(b.props.triggerTarget||t).forEach((function(t){b.props.interactive?t.setAttribute("aria-expanded",b.state.isVisible&&t===A()?"true":"false"):t.removeAttribute("aria-expanded")}))}function z(){T().removeEventListener("mousemove",g),Qa=Qa.filter((function(t){return t!==g}))}function L(e){if(!La.isTouch||!h&&"mousedown"!==e.type){var n=e.composedPath&&e.composedPath()[0]||e.target;if(!b.props.interactive||!za(x,n)){if(Oa(b.props.triggerTarget||t).some((function(t){return za(t,n)}))){if(La.isTouch)return;if(b.state.isVisible&&b.props.trigger.indexOf("click")>=0)return}else B("onClickOutside",[b,e]);!0===b.props.hideOnClick&&(b.clearDelayTimeouts(),b.hide(),p=!0,setTimeout((function(){p=!1})),b.state.isMounted||V())}}}function I(){h=!0}function P(){h=!1}function j(){var t=T();t.addEventListener("mousedown",L,!0),t.addEventListener("touchend",L,xa),t.addEventListener("touchstart",P,xa),t.addEventListener("touchmove",I,xa)}function V(){var t=T();t.removeEventListener("mousedown",L,!0),t.removeEventListener("touchend",L,xa),t.removeEventListener("touchstart",P,xa),t.removeEventListener("touchmove",I,xa)}function H(t,e){var n=M().box;function r(t){t.target===n&&(Ra(n,"remove",r),e())}if(0===t)return e();Ra(n,"remove",s),Ra(n,"add",r),s=r}function $(e,n,r){void 0===r&&(r=!1),Oa(b.props.triggerTarget||t).forEach((function(t){t.addEventListener(e,n,r),m.push({node:t,eventType:e,handler:n,options:r})}))}function W(){var t;S()&&($("touchstart",U,{passive:!0}),$("touchend",G,{passive:!0})),(t=b.props.trigger,t.split(/\s+/).filter(Boolean)).forEach((function(t){if("manual"!==t)switch($(t,U),t){case"mouseenter":$("mouseleave",G);break;case"focus":$(Ha?"focusout":"blur",J);break;case"focusin":$("focusout",J)}}))}function q(){m.forEach((function(t){var e=t.node,n=t.eventType,r=t.handler,o=t.options;e.removeEventListener(n,r,o)})),m=[]}function U(t){var e,n=!1;if(b.state.isEnabled&&!Z(t)&&!p){var r="focus"===(null==(e=i)?void 0:e.type);i=t,l=t.currentTarget,R(),!b.state.isVisible&&Ca(t,"MouseEvent")&&Qa.forEach((function(e){return e(t)})),"click"===t.type&&(b.props.trigger.indexOf("mouseenter")<0||d)&&!1!==b.props.hideOnClick&&b.state.isVisible?n=!0:tt(t),"click"===t.type&&(d=!n),n&&!r&&et(t)}}function K(t){var e=t.target,n=A().contains(e)||x.contains(e);if("mousemove"!==t.type||!n){var r=Q().concat(x).map((function(t){var e,n=null==(e=t._tippy.popperInstance)?void 0:e.state;return n?{popperRect:t.getBoundingClientRect(),popperState:n,props:c}:null})).filter(Boolean);(function(t,e){var n=e.clientX,r=e.clientY;return t.every((function(t){var e=t.popperRect,o=t.popperState,i=t.props.interactiveBorder,s=o.placement.split("-")[0],a=o.modifiersData.offset;if(!a)return!0;var l="bottom"===s?a.top.y:0,u="top"===s?a.bottom.y:0,c="right"===s?a.left.x:0,d="left"===s?a.right.x:0,p=e.top-r+l>i,h=r-e.bottom-u>i,f=e.left-n+c>i,m=n-e.right-d>i;return p||h||f||m}))})(r,t)&&(z(),et(t))}}function G(t){Z(t)||b.props.trigger.indexOf("click")>=0&&d||(b.props.interactive?b.hideWithInteractivity(t):et(t))}function J(t){b.props.trigger.indexOf("focusin")<0&&t.target!==A()||b.props.interactive&&t.relatedTarget&&x.contains(t.relatedTarget)||et(t)}function Z(t){return!!La.isTouch&&S()!==t.type.indexOf("touch")>=0}function Y(){X();var e=b.props,n=e.popperOptions,r=e.placement,o=e.offset,i=e.getReferenceClientRect,s=e.moveTransition,l=O()?Za(x).arrow:null,u=i?{getBoundingClientRect:i,contextElement:i.contextElement||A()}:t,c=[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;if(O()){var n=M().box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?n.setAttribute("data-placement",e.placement):e.attributes.popper["data-popper-"+t]?n.setAttribute("data-"+t,""):n.removeAttribute("data-"+t)})),e.attributes.popper={}}}}];O()&&l&&c.push({name:"arrow",options:{element:l,padding:3}}),c.push.apply(c,(null==n?void 0:n.modifiers)||[]),b.popperInstance=va(u,x,Object.assign({},n,{placement:r,onFirstUpdate:a,modifiers:c}))}function X(){b.popperInstance&&(b.popperInstance.destroy(),b.popperInstance=null)}function Q(){return Ta(x.querySelectorAll("[data-tippy-root]"))}function tt(t){b.clearDelayTimeouts(),t&&B("onTrigger",[b,t]),j();var e=F(!0),r=E(),o=r[0],i=r[1];La.isTouch&&"hold"===o&&i&&(e=i),e?n=setTimeout((function(){b.show()}),e):b.show()}function et(t){if(b.clearDelayTimeouts(),B("onUntrigger",[b,t]),b.state.isVisible){if(!(b.props.trigger.indexOf("mouseenter")>=0&&b.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&d)){var e=F(!1);e?r=setTimeout((function(){b.state.isVisible&&b.hide()}),e):o=requestAnimationFrame((function(){b.hide()}))}}else V()}}function nl(t,e){void 0===e&&(e={});var n=$a.plugins.concat(e.plugins||[]);document.addEventListener("touchstart",Pa,xa),window.addEventListener("blur",Va);var r,o=Object.assign({},e,{plugins:n}),i=(r=t,Na(r)?[r]:function(t){return Ca(t,"NodeList")}(r)?Ta(r):Array.isArray(r)?r:Ta(document.querySelectorAll(r))).reduce((function(t,e){var n=e&&el(e,o);return n&&t.push(n),t}),[]);return Na(t)?i[0]:i}nl.defaultProps=$a,nl.setDefaultProps=function(t){Object.keys(t).forEach((function(e){$a[e]=t[e]}))},nl.currentInput=La,Object.assign({},na,{effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow)}}),nl.setDefaultProps({render:Ya});const rl=nl;class ol{constructor({editor:t,element:e,view:n,tippyOptions:r={},shouldShow:o}){this.preventHide=!1,this.shouldShow=({view:t,state:e,from:n,to:r})=>{const{doc:o,selection:i}=e,{empty:s}=i,a=!o.textBetween(n,r).length&&Fi(e.selection);return!(!t.hasFocus()||s||a)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout((()=>this.update(this.editor.view)))},this.blurHandler=({event:t})=>{var e;this.preventHide?this.preventHide=!1:(null==t?void 0:t.relatedTarget)&&(null===(e=this.element.parentNode)||void 0===e?void 0:e.contains(t.relatedTarget))||this.hide()},this.editor=t,this.element=e,this.view=n,o&&(this.shouldShow=o),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=r,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:t}=this.editor.options,e=!!t.parentElement;!this.tippy&&e&&(this.tippy=rl(t,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",(t=>{this.blurHandler({event:t})})))}update(t,e){var n,r,o;const{state:i,composing:s}=t,{doc:a,selection:l}=i,u=e&&e.doc.eq(a)&&e.selection.eq(l);if(s||u)return;this.createTooltip();const{ranges:c}=l,d=Math.min(...c.map((t=>t.$from.pos))),p=Math.max(...c.map((t=>t.$to.pos)));(null===(n=this.shouldShow)||void 0===n?void 0:n.call(this,{editor:this.editor,view:t,state:i,oldState:e,from:d,to:p}))?(null===(r=this.tippy)||void 0===r||r.setProps({getReferenceClientRect:(null===(o=this.tippyOptions)||void 0===o?void 0:o.getReferenceClientRect)||(()=>{if(Mi(e=i.selection)&&e instanceof Zt){const e=t.nodeDOM(d);if(e)return e.getBoundingClientRect()}var e;return ss(t,d,p)})}),this.show()):this.hide()}show(){var t;null===(t=this.tippy)||void 0===t||t.show()}hide(){var t;null===(t=this.tippy)||void 0===t||t.hide()}destroy(){var t;null===(t=this.tippy)||void 0===t||t.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}xi.create({name:"bubbleMenu",addOptions:()=>({element:null,tippyOptions:{},pluginKey:"bubbleMenu",shouldShow:null}),addProseMirrorPlugins(){return this.options.element?[(t={pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow},new ue({key:"string"==typeof t.pluginKey?new pe(t.pluginKey):t.pluginKey,view:e=>new ol({view:e,...t})}))]:[];var t}});class il{constructor({editor:t,element:e,view:n,tippyOptions:r={},shouldShow:o}){this.preventHide=!1,this.shouldShow=({view:t,state:e})=>{const{selection:n}=e,{$anchor:r,empty:o}=n,i=1===r.depth,s=r.parent.isTextblock&&!r.parent.type.spec.code&&!r.parent.textContent;return!!(t.hasFocus()&&o&&i&&s)},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout((()=>this.update(this.editor.view)))},this.blurHandler=({event:t})=>{var e;this.preventHide?this.preventHide=!1:(null==t?void 0:t.relatedTarget)&&(null===(e=this.element.parentNode)||void 0===e?void 0:e.contains(t.relatedTarget))||this.hide()},this.editor=t,this.element=e,this.view=n,o&&(this.shouldShow=o),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=r,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:t}=this.editor.options,e=!!t.parentElement;!this.tippy&&e&&(this.tippy=rl(t,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"right",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",(t=>{this.blurHandler({event:t})})))}update(t,e){var n,r,o;const{state:i}=t,{doc:s,selection:a}=i,{from:l,to:u}=a;e&&e.doc.eq(s)&&e.selection.eq(a)||(this.createTooltip(),(null===(n=this.shouldShow)||void 0===n?void 0:n.call(this,{editor:this.editor,view:t,state:i,oldState:e}))?(null===(r=this.tippy)||void 0===r||r.setProps({getReferenceClientRect:(null===(o=this.tippyOptions)||void 0===o?void 0:o.getReferenceClientRect)||(()=>ss(t,l,u))}),this.show()):this.hide())}show(){var t;null===(t=this.tippy)||void 0===t||t.show()}hide(){var t;null===(t=this.tippy)||void 0===t||t.hide()}destroy(){var t;null===(t=this.tippy)||void 0===t||t.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const sl=(xi.create({name:"floatingMenu",addOptions:()=>({element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}),addProseMirrorPlugins(){return this.options.element?[(t={pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow},new ue({key:"string"==typeof t.pluginKey?new pe(t.pluginKey):t.pluginKey,view:e=>new il({view:e,...t})}))]:[];var t}}),require("vue"));class al extends class extends class{constructor(){this.callbacks={}}on(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),this}emit(t,...e){const n=this.callbacks[t];return n&&n.forEach((t=>t.apply(this,e))),this}off(t,e){const n=this.callbacks[t];return n&&(e?this.callbacks[t]=n.filter((t=>t!==e)):delete this.callbacks[t]),this}removeAllListeners(){this.callbacks={}}}{constructor(t={}){super(),this.isFocused=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),window.setTimeout((()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}))}),0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=function(t,e){const n=document.querySelector("style[data-tiptap-style]");if(null!==n)return n;const r=document.createElement("style");return e&&r.setAttribute("nonce",e),r.setAttribute("data-tiptap-style",""),r.innerHTML='.ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: "liga" 0; /* the above doesn\'t seem to work in Edge */\n}\n\n.ProseMirror [contenteditable="false"] {\n white-space: normal;\n}\n\n.ProseMirror [contenteditable="false"] [contenteditable="true"] {\n white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n display: inline !important;\n border: none !important;\n margin: 0 !important;\n width: 1px !important;\n height: 1px !important;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n margin: 0;\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\n.tippy-box[data-animation=fade][data-state=hidden] {\n opacity: 0\n}',document.getElementsByTagName("head")[0].appendChild(r),r}(0,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},this.view&&this.state&&!this.isDestroyed&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t){this.setOptions({editable:t})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(t,e){const n=si(e)?e(t,[...this.state.plugins]):[...this.state.plugins,t],r=this.state.reconfigure({plugins:n});this.view.updateState(r)}unregisterPlugin(t){if(this.isDestroyed)return;const e="string"==typeof t?`${t}$`:t.key,n=this.state.reconfigure({plugins:this.state.plugins.filter((t=>!t.key.startsWith(e)))});this.view.updateState(n)}createExtensionManager(){const t=[...this.options.enableCoreExtensions?Object.values(ns):[],...this.options.extensions].filter((t=>["extension","node","mark"].includes(null==t?void 0:t.type)));this.extensionManager=new yi(t,this)}createCommandManager(){this.commandManager=new Qo({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){const t=Vi(this.options.content,this.schema,this.options.parseOptions),e=Bi(t,this.options.autofocus);this.view=new lo(this.options.element,{...this.options.editorProps,dispatchTransaction:this.dispatchTransaction.bind(this),state:ae.create({doc:t,selection:e||void 0})});const n=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(n),this.createNodeViews(),this.view.dom.editor=this}createNodeViews(){this.view.setProps({nodeViews:this.extensionManager.nodeViews})}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const e=this.capturedTransaction;return this.capturedTransaction=null,e}dispatchTransaction(t){if(this.isCapturingTransaction)return this.capturedTransaction?void t.steps.forEach((t=>{var e;return null===(e=this.capturedTransaction)||void 0===e?void 0:e.step(t)})):void(this.capturedTransaction=t);const e=this.state.apply(t),n=!this.state.selection.eq(e.selection);this.view.updateState(e),this.emit("transaction",{editor:this,transaction:t}),n&&this.emit("selectionUpdate",{editor:this,transaction:t});const r=t.getMeta("focus"),o=t.getMeta("blur");r&&this.emit("focus",{editor:this,event:r.event,transaction:t}),o&&this.emit("blur",{editor:this,event:o.event,transaction:t}),t.docChanged&&!t.getMeta("preventUpdate")&&this.emit("update",{editor:this,transaction:t})}getAttributes(t){return rs(this.state,t)}isActive(t,e){const n="string"==typeof t?t:null,r="string"==typeof t?e:t;return function(t,e,n={}){if(!e)return Ii(t,null,n)||Ji(t,null,n);const r=Pi(e,t.schema);return"node"===r?Ii(t,e,n):"mark"===r&&Ji(t,e,n)}(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return function(t,e){const n=at.fromSchema(e).serializeFragment(t),r=document.implementation.createHTMLDocument().createElement("div");return r.appendChild(n),r.innerHTML}(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:e="\n\n",textSerializers:n={}}=t||{};return function(t,e){return Di(t,{from:0,to:t.content.size},e)}(this.state.doc,{blockSeparator:e,textSerializers:{...n,...ki(this.schema)}})}get isEmpty(){return function(t){var e;const n=null===(e=t.type.createAndFill())||void 0===e?void 0:e.toJSON(),r=t.toJSON();return JSON.stringify(n)===JSON.stringify(r)}(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){this.emit("destroy"),this.view&&this.view.destroy(),this.removeAllListeners()}get isDestroyed(){var t;return!(null===(t=this.view)||void 0===t?void 0:t.docView)}}{constructor(){super(...arguments),this.contentComponent=null}}const ll={name:"EditorContent",props:{editor:{default:null,type:Object}},watch:{editor:{immediate:!0,handler(t){t&&t.options.element&&this.$nextTick((()=>{const e=this.$el;e&&t.options.element.firstChild&&(e.append(...t.options.element.childNodes),t.contentComponent=this,t.setOptions({element:e}),t.createNodeViews())}))}}},render:t=>t("div"),beforeDestroy(){const{editor:t}=this;if(!t)return;if(t.isDestroyed||t.view.setProps({nodeViews:{}}),t.contentComponent=null,!t.options.element.firstChild)return;const e=document.createElement("div");e.append(...t.options.element.childNodes),t.setOptions({element:e})}};Boolean;var ul=function(){var t=this,e=t._self._c;return e("keep-alive",[e("transition",{attrs:{name:"zw-toolbar-",duration:"150"}},[t.isVisible?e("div",{ref:"toolbarRef",staticClass:"zw-toolbar",style:t.toolbarStyles},[e(t.toolbarComponent,{tag:"component"})],1):t._e()])],1)};ul._withStripped=!0;var cl=Object.freeze({COMMON:"common",DESKTOP:"desktop",TABLET:"tablet",MOBILE:"mobile",get values(){return[this.COMMON,this.MOBILE,this.TABLET,this.DESKTOP]}}),dl=Object.freeze({UPPERCASE:"uppercase",LOWERCASE:"lowercase",CAPITALIZE:"capitalize"}),pl=Object.freeze({LEFT:"left",CENTER:"center",RIGHT:"right",JUSTIFY:"justify"}),hl=Object.freeze({DOCUMENT:"doc",PARAGRAPH:"paragraph",HEADING:"heading",LIST:"list",LIST_ITEM:"listItem",TEXT:"text",get blocks(){return[this.PARAGRAPH,this.LIST,this.HEADING]}}),fl=Object.freeze({DISC:"disc",CIRCLE:"circle",SQUARE:"square",DECIMAL:"decimal",ROMAN:"roman",LATIN:"latin",get values(){return[this.DISC,this.CIRCLE,this.SQUARE,this.DECIMAL,this.ROMAN,this.LATIN]},get ordered(){return[this.DECIMAL,this.ROMAN,this.LATIN]}}),ml=Object.freeze({ALIGNMENT:"alignment",BACKGROUND_COLOR:"background_color",FONT_COLOR:"font_color",FONT_FAMILY:"font_family",FONT_SIZE:"font_size",FONT_STYLE:"font_style",FONT_WEIGHT:"font_weight",LINE_HEIGHT:"line_height",TEXT_DECORATION:"text_decoration",SUPERSCRIPT:"superscript",get attributes(){return[this.ALIGNMENT,this.LINE_HEIGHT]},get marks(){return[this.BACKGROUND_COLOR,this.FONT_COLOR,this.FONT_FAMILY,this.FONT_SIZE,this.FONT_STYLE,this.FONT_WEIGHT,this.TEXT_DECORATION,this.SUPERSCRIPT]}}),gl=Object.freeze({BLANK:"_blank",SELF:"_self"}),vl=Object.freeze({URL:"url",BLOCK:"block"}),yl=function(){var t=this,e=t._self._c;return e("div",[e("ToolbarRow",[e("StylePresetControl"),t._v(" "),e("ToolbarDivider",{attrs:{vertical:""}}),t._v(" "),e("FontFamilyControl"),t._v(" "),e("ToolbarDivider",{attrs:{vertical:""}}),t._v(" "),e("FontWeightControl"),t._v(" "),e("ToolbarDivider",{attrs:{vertical:""}}),t._v(" "),e("FontSizeControl"),t._v(" "),e("ToolbarDivider",{attrs:{vertical:""}}),t._v(" "),e("ToolbarGroup",[e("FontColorControl"),t._v(" "),e("BackgroundColorControl")],1)],1),t._v(" "),e("ToolbarDivider",{attrs:{horizontal:""}}),t._v(" "),e("ToolbarRow",[e("ToolbarGroup",[e("ItalicControl"),t._v(" "),e("UnderlineControl"),t._v(" "),e("StrikeThroughControl"),t._v(" "),e("SuperscriptControl"),t._v(" "),e("CaseStyleControl")],1),t._v(" "),e("ToolbarDivider",{attrs:{vertical:""}}),t._v(" "),e("AlignmentControl"),t._v(" "),e("ToolbarDivider",{attrs:{vertical:""}}),t._v(" "),e("ToolbarGroup",[e("LineHeightControl")],1),t._v(" "),e("ToolbarDivider",{attrs:{vertical:""}}),t._v(" "),e("ToolbarGroup",[e("ListControl")],1),t._v(" "),e("ToolbarDivider",{attrs:{vertical:""}}),t._v(" "),e("ToolbarGroup",[e("LinkControl"),t._v(" "),e("RemoveFormatControl")],1)],1)],1)};yl._withStripped=!0;var bl=function(){return(0,this._self._c)("div",{staticClass:"zw-toolbar__divider",class:this.classes})};function wl(t,e,n,r,o,i,s,a){var l,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),s?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},u._ssrRegister=l):o&&(l=a?function(){o.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:o),l)if(u.functional){u._injectStyles=l;var c=u.render;u.render=function(t,e){return l.call(e),c(t,e)}}else{var d=u.beforeCreate;u.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:u}}bl._withStripped=!0;const xl=wl({name:"ToolbarDivider",props:{vertical:{type:Boolean,required:!1,default:!1},horizontal:{type:Boolean,required:!1,default:!1}},setup:function(t){return{classes:(0,sl.computed)((function(){return{"zw-toolbar__divider--vertical":t.vertical,"zw-toolbar__divider--horizontal":t.horizontal}}))}}},bl,[],!1,null,"2af3bffa",null).exports;var Dl=function(){return(0,this._self._c)("div",{staticClass:"zw-toolbar__row"},[this._t("default")],2)};Dl._withStripped=!0;const kl=wl({name:"ToolbarRow"},Dl,[],!1,null,"4984472d",null).exports;var Cl=function(){return(0,this._self._c)("div",{staticClass:"zw-toolbar__group"},[this._t("default")],2)};Cl._withStripped=!0;const El=wl({name:"ToolbarGroup"},Cl,[],!1,null,"95aed9d6",null).exports;var Sl=function(){var t=this,e=t._self._c;return e("div",{staticClass:"zw-style-preset-control"},[e("Dropdown",{directives:[{name:"tooltip",rawName:"v-tooltip",value:"Text Type",expression:"'Text Type'"}],staticClass:"zw-style-preset-control__dropdown",attrs:{value:t.preset.id,options:t.options},on:{change:t.apply}}),t._v(" "),e("Button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:"Reset Styles",expression:"'Reset Styles'"}],staticClass:"zw-style-preset-control__reset",attrs:{disabled:!t.isCustomized,icon:""},on:{click:t.removeCustomization}},[e("Icon",{attrs:{name:"reset-styles",size:"28px","auto-color":""}})],1)],1)};Sl._withStripped=!0;var Ol=Object.freeze({FONTS:Symbol("fonts"),FONT_SIZES:Symbol("fontSizes"),EDITOR:Symbol("editor"),LOCAL_STORAGE:Symbol("localStorage"),FAVORITE_COLORS:Symbol("favoriteColors"),PAGE_BLOCKS:Symbol("pageBlocks")}),Al=function(){var t=this;return(0,t._self._c)("button",{staticClass:"zw-button",class:t.classes,attrs:{type:"button",disabled:t.disabled},on:{click:function(e){return t.$emit("click",e)}}},[t._t("default")],2)};function Tl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Al._withStripped=!0;const Ml=wl({name:"Button",props:{skin:{type:String,required:!1,validator:function(t){return["toolbar","primary","secondary","none"].includes(t)},default:"none"},active:{type:Boolean,required:!1,default:!1},disabled:{type:Boolean,required:!1,default:!1},icon:{type:Boolean,required:!1,default:!1}},setup:function(t){return{classes:(0,sl.computed)((function(){var e;return Tl(e={},"zw-button--".concat(t.skin),"none"!==t.skin),Tl(e,"zw-button--active",t.active),Tl(e,"zw-button--icon",t.icon),e}))}}},Al,[],!1,null,"7b26f21e",null).exports;var Fl=function(){var t=this;return(0,t._self._c)("div",{staticClass:"zw-button-toggle"},[t._l(t.options,(function(e){return t._t("option",null,{option:e,isActive:e.id===t.value,activate:function(){return t.$emit("change",e.id)}})}))],2)};Fl._withStripped=!0;const Nl=wl({name:"ButtonToggle",model:{event:"change"},props:{value:{type:String,required:!0},options:{type:Array,required:!0}}},Fl,[],!1,null,"a03d6d62",null).exports;var Bl=function(){var t=this;return(0,t._self._c)("div",{staticClass:"zw-icon",class:t.iconClasses,style:t.iconStyles,domProps:{innerHTML:t._s(t.source)}})};function _l(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return function(e){return t.apply(void 0,[e].concat(n))}}}function Rl(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function zl(t,e){if(t){if("string"==typeof t)return Rl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Rl(t,e):void 0}}function Ll(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],s=!0,a=!1;try{for(n=n.call(t);!(s=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);s=!0);}catch(t){a=!0,o=t}finally{try{s||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||zl(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Il(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Pl(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Il(Object(n),!0).forEach((function(e){Tl(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Il(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function jl(t){var e=Object.entries(t).reduce((function(t,e){var n=Ll(e,2),r=n[0],o=n[1];if(!o)return t;var i=r.replace(/_/g,"-");return"".concat(t,"--zw-").concat(i,":").concat(o,";")}),"");return e?{style:e}:null}function Vl(t){var e=jl(t);return["span",e?Pl(Pl({},e),{},{class:"zw-style"}):{},0]}function Hl(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return function(e){var r;return(r=e.editor.commands)[t].apply(r,n),!0}}Bl._withStripped=!0;const $l=require("zipify-colorpicker");function Wl(t){var e=$l.ColorModel.create(t);return 1===e.alpha?e.toHexString():e.toRgbaString()}var ql=n(3700);const Ul=wl({name:"Icon",props:{name:{type:String,required:!0},size:{type:[String,Number],required:!1,default:""},autoColor:{type:Boolean,required:!1,default:!1}},setup:function(t){var e=(0,sl.computed)((function(){return function(t){try{return ql("./".concat(t,".svg"))}catch(t){return console.warn("Cannot resolve wysiwyg icon",t),""}}(t.name)})),n=(0,sl.computed)((function(){return isNaN(Number(t.size))?t.size:"".concat(t.size,"px")}));return{source:e,iconStyles:(0,sl.computed)((function(){return t.size?{"--zw-icon-width":n.value,"--zw-icon-height":n.value}:null})),iconClasses:(0,sl.computed)((function(){return{"zw-icon--auto-color":t.autoColor}}))}}},Bl,[],!1,null,"0cdffb89",null).exports;var Kl=function(){return(0,this._self._c)("div",{ref:"hostRef",staticClass:"zw-scroll-view",attrs:{"data-simplebar-auto-hide":"false"}},[this._t("default")],2)};Kl._withStripped=!0,n(1539),n(4747);var Gl,Jl=n(1807),Zl=n.n(Jl),Yl=(n(1058),n(9601),n(7327),n(6992),n(8783),n(4129),n(3948),n(3096)),Xl=n.n(Yl),Ql=n(1296),tu=n.n(Ql),eu=n(773),nu=n.n(eu),ru=[],ou="ResizeObserver loop completed with undelivered notifications.";!function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(Gl||(Gl={}));var iu,su=function(t){return Object.freeze(t)},au=function(t,e){this.inlineSize=t,this.blockSize=e,su(this)},lu=function(){function t(t,e,n,r){return this.x=t,this.y=e,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,su(this)}return t.prototype.toJSON=function(){var t=this;return{x:t.x,y:t.y,top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),uu=function(t){return t instanceof SVGElement&&"getBBox"in t},cu=function(t){if(uu(t)){var e=t.getBBox(),n=e.width,r=e.height;return!n&&!r}var o=t,i=o.offsetWidth,s=o.offsetHeight;return!(i||s||t.getClientRects().length)},du=function(t){var e,n;if(t instanceof Element)return!0;var r=null===(n=null===(e=t)||void 0===e?void 0:e.ownerDocument)||void 0===n?void 0:n.defaultView;return!!(r&&t instanceof r.Element)},pu="undefined"!=typeof window?window:{},hu=new WeakMap,fu=/auto|scroll/,mu=/^tb|vertical/,gu=/msie|trident/i.test(pu.navigator&&pu.navigator.userAgent),vu=function(t){return parseFloat(t||"0")},yu=function(t,e,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=!1),new au((n?e:t)||0,(n?t:e)||0)},bu=su({devicePixelContentBoxSize:yu(),borderBoxSize:yu(),contentBoxSize:yu(),contentRect:new lu(0,0,0,0)}),wu=function(t,e){if(void 0===e&&(e=!1),hu.has(t)&&!e)return hu.get(t);if(cu(t))return hu.set(t,bu),bu;var n=getComputedStyle(t),r=uu(t)&&t.ownerSVGElement&&t.getBBox(),o=!gu&&"border-box"===n.boxSizing,i=mu.test(n.writingMode||""),s=!r&&fu.test(n.overflowY||""),a=!r&&fu.test(n.overflowX||""),l=r?0:vu(n.paddingTop),u=r?0:vu(n.paddingRight),c=r?0:vu(n.paddingBottom),d=r?0:vu(n.paddingLeft),p=r?0:vu(n.borderTopWidth),h=r?0:vu(n.borderRightWidth),f=r?0:vu(n.borderBottomWidth),m=d+u,g=l+c,v=(r?0:vu(n.borderLeftWidth))+h,y=p+f,b=a?t.offsetHeight-y-t.clientHeight:0,w=s?t.offsetWidth-v-t.clientWidth:0,x=o?m+v:0,D=o?g+y:0,k=r?r.width:vu(n.width)-x-w,C=r?r.height:vu(n.height)-D-b,E=k+m+w+v,S=C+g+b+y,O=su({devicePixelContentBoxSize:yu(Math.round(k*devicePixelRatio),Math.round(C*devicePixelRatio),i),borderBoxSize:yu(E,S,i),contentBoxSize:yu(k,C,i),contentRect:new lu(d,l,k,C)});return hu.set(t,O),O},xu=function(t,e,n){var r=wu(t,n),o=r.borderBoxSize,i=r.contentBoxSize,s=r.devicePixelContentBoxSize;switch(e){case Gl.DEVICE_PIXEL_CONTENT_BOX:return s;case Gl.BORDER_BOX:return o;default:return i}},Du=function(t){var e=wu(t);this.target=t,this.contentRect=e.contentRect,this.borderBoxSize=su([e.borderBoxSize]),this.contentBoxSize=su([e.contentBoxSize]),this.devicePixelContentBoxSize=su([e.devicePixelContentBoxSize])},ku=function(t){if(cu(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},Cu=function(){var t=1/0,e=[];ru.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(e){var n=new Du(e.target),o=ku(e.target);r.push(n),e.lastReportedSize=xu(e.target,e.observedBox),o<t&&(t=o)})),e.push((function(){n.callback.call(n.observer,r,n.observer)})),n.activeTargets.splice(0,n.activeTargets.length)}}));for(var n=0,r=e;n<r.length;n++)(0,r[n])();return t},Eu=function(t){ru.forEach((function(e){e.activeTargets.splice(0,e.activeTargets.length),e.skippedTargets.splice(0,e.skippedTargets.length),e.observationTargets.forEach((function(n){n.isActive()&&(ku(n.target)>t?e.activeTargets.push(n):e.skippedTargets.push(n))}))}))},Su=[],Ou=0,Au={attributes:!0,characterData:!0,childList:!0,subtree:!0},Tu=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Mu=function(t){return void 0===t&&(t=0),Date.now()+t},Fu=!1,Nu=new(function(){function t(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return t.prototype.run=function(t){var e=this;if(void 0===t&&(t=250),!Fu){Fu=!0;var n,r=Mu(t);n=function(){var n=!1;try{n=function(){var t,e=0;for(Eu(e);ru.some((function(t){return t.activeTargets.length>0}));)e=Cu(),Eu(e);return ru.some((function(t){return t.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?t=new ErrorEvent("error",{message:ou}):((t=document.createEvent("Event")).initEvent("error",!1,!1),t.message=ou),window.dispatchEvent(t)),e>0}()}finally{if(Fu=!1,t=r-Mu(),!Ou)return;n?e.run(1e3):t>0?e.run(t):e.start()}},function(t){if(!iu){var e=0,n=document.createTextNode("");new MutationObserver((function(){return Su.splice(0).forEach((function(t){return t()}))})).observe(n,{characterData:!0}),iu=function(){n.textContent=""+(e?e--:e++)}}Su.push(t),iu()}((function(){requestAnimationFrame(n)}))}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var t=this,e=function(){return t.observer&&t.observer.observe(document.body,Au)};document.body?e():pu.addEventListener("DOMContentLoaded",e)},t.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Tu.forEach((function(e){return pu.addEventListener(e,t.listener,!0)})))},t.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Tu.forEach((function(e){return pu.removeEventListener(e,t.listener,!0)})),this.stopped=!0)},t}()),Bu=function(t){!Ou&&t>0&&Nu.start(),!(Ou+=t)&&Nu.stop()},_u=function(){function t(t,e){this.target=t,this.observedBox=e||Gl.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var t,e=xu(this.target,this.observedBox,!0);return t=this.target,uu(t)||function(t){switch(t.tagName){case"INPUT":if("image"!==t.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(t)||"inline"!==getComputedStyle(t).display||(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),Ru=function(t,e){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=e},zu=new WeakMap,Lu=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},Iu=function(){function t(){}return t.connect=function(t,e){var n=new Ru(t,e);zu.set(t,n)},t.observe=function(t,e,n){var r=zu.get(t),o=0===r.observationTargets.length;Lu(r.observationTargets,e)<0&&(o&&ru.push(r),r.observationTargets.push(new _u(e,n&&n.box)),Bu(1),Nu.schedule())},t.unobserve=function(t,e){var n=zu.get(t),r=Lu(n.observationTargets,e),o=1===n.observationTargets.length;r>=0&&(o&&ru.splice(ru.indexOf(n),1),n.observationTargets.splice(r,1),Bu(-1))},t.disconnect=function(t){var e=this,n=zu.get(t);n.observationTargets.slice().forEach((function(n){return e.unobserve(t,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},t}(),Pu=function(){function t(t){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof t)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Iu.connect(this,t)}return t.prototype.observe=function(t,e){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!du(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Iu.observe(this,t,e)},t.prototype.unobserve=function(t){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!du(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Iu.unobserve(this,t)},t.prototype.disconnect=function(){Iu.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}(),ju=(n(5827),n(4916),n(4723),n(8309),n(5306),function(t){return Array.prototype.reduce.call(t,(function(t,e){var n=e.name.match(/data-simplebar-(.+)/);if(n){var r=n[1].replace(/\W+(.)/g,(function(t,e){return e.toUpperCase()}));switch(e.value){case"true":t[r]=!0;break;case"false":t[r]=!1;break;case void 0:t[r]=!0;break;default:t[r]=e.value}}return t}),{})});function Vu(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView?t.ownerDocument.defaultView:window}function Hu(t){return t&&t.ownerDocument?t.ownerDocument:document}var $u=null,Wu=null;function qu(t){if(null===$u){var e=Hu(t);if(void 0===e)return $u=0;var n=e.body,r=e.createElement("div");r.classList.add("simplebar-hide-scrollbar"),n.appendChild(r);var o=r.getBoundingClientRect().right;n.removeChild(r),$u=o}return $u}Zl()&&window.addEventListener("resize",(function(){Wu!==window.devicePixelRatio&&(Wu=window.devicePixelRatio,$u=null)}));var Uu=function(){function t(e,n){var r=this;this.onScroll=function(){var t=Vu(r.el);r.scrollXTicking||(t.requestAnimationFrame(r.scrollX),r.scrollXTicking=!0),r.scrollYTicking||(t.requestAnimationFrame(r.scrollY),r.scrollYTicking=!0)},this.scrollX=function(){r.axis.x.isOverflowing&&(r.showScrollbar("x"),r.positionScrollbar("x")),r.scrollXTicking=!1},this.scrollY=function(){r.axis.y.isOverflowing&&(r.showScrollbar("y"),r.positionScrollbar("y")),r.scrollYTicking=!1},this.onMouseEnter=function(){r.showScrollbar("x"),r.showScrollbar("y")},this.onMouseMove=function(t){r.mouseX=t.clientX,r.mouseY=t.clientY,(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseMoveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseMoveForAxis("y")},this.onMouseLeave=function(){r.onMouseMove.cancel(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseLeaveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseLeaveForAxis("y"),r.mouseX=-1,r.mouseY=-1},this.onWindowResize=function(){r.scrollbarWidth=r.getScrollbarWidth(),r.hideNativeScrollbar()},this.hideScrollbars=function(){r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.track.rect)||(r.axis.y.scrollbar.el.classList.remove(r.classNames.visible),r.axis.y.isVisible=!1),r.isWithinBounds(r.axis.x.track.rect)||(r.axis.x.scrollbar.el.classList.remove(r.classNames.visible),r.axis.x.isVisible=!1)},this.onPointerEvent=function(t){var e,n;r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&(e=r.isWithinBounds(r.axis.x.track.rect)),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&(n=r.isWithinBounds(r.axis.y.track.rect)),(e||n)&&(t.preventDefault(),t.stopPropagation(),"mousedown"===t.type&&(e&&(r.axis.x.scrollbar.rect=r.axis.x.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.x.scrollbar.rect)?r.onDragStart(t,"x"):r.onTrackClick(t,"x")),n&&(r.axis.y.scrollbar.rect=r.axis.y.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.scrollbar.rect)?r.onDragStart(t,"y"):r.onTrackClick(t,"y"))))},this.drag=function(e){var n=r.axis[r.draggedAxis].track,o=n.rect[r.axis[r.draggedAxis].sizeAttr],i=r.axis[r.draggedAxis].scrollbar,s=r.contentWrapperEl[r.axis[r.draggedAxis].scrollSizeAttr],a=parseInt(r.elStyles[r.axis[r.draggedAxis].sizeAttr],10);e.preventDefault(),e.stopPropagation();var l=(("y"===r.draggedAxis?e.pageY:e.pageX)-n.rect[r.axis[r.draggedAxis].offsetAttr]-r.axis[r.draggedAxis].dragOffset)/(o-i.size)*(s-a);"x"===r.draggedAxis&&(l=r.isRtl&&t.getRtlHelpers().isRtlScrollbarInverted?l-(o+i.size):l,l=r.isRtl&&t.getRtlHelpers().isRtlScrollingInverted?-l:l),r.contentWrapperEl[r.axis[r.draggedAxis].scrollOffsetAttr]=l},this.onEndDrag=function(t){var e=Hu(r.el),n=Vu(r.el);t.preventDefault(),t.stopPropagation(),r.el.classList.remove(r.classNames.dragging),e.removeEventListener("mousemove",r.drag,!0),e.removeEventListener("mouseup",r.onEndDrag,!0),r.removePreventClickId=n.setTimeout((function(){e.removeEventListener("click",r.preventClick,!0),e.removeEventListener("dblclick",r.preventClick,!0),r.removePreventClickId=null}))},this.preventClick=function(t){t.preventDefault(),t.stopPropagation()},this.el=e,this.minScrollbarWidth=20,this.options=Object.assign({},t.defaultOptions,n),this.classNames=Object.assign({},t.defaultOptions.classNames,this.options.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.removePreventClickId=null,t.instances.has(this.el)||(this.recalculate=Xl()(this.recalculate.bind(this),64),this.onMouseMove=Xl()(this.onMouseMove.bind(this),64),this.hideScrollbars=tu()(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=tu()(this.onWindowResize.bind(this),64,{leading:!0}),t.getRtlHelpers=nu()(t.getRtlHelpers),this.init())}t.getRtlHelpers=function(){var e=document.createElement("div");e.innerHTML='<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>';var n=e.firstElementChild;document.body.appendChild(n);var r=n.firstElementChild;n.scrollLeft=0;var o=t.getOffset(n),i=t.getOffset(r);n.scrollLeft=999;var s=t.getOffset(r);return{isRtlScrollingInverted:o.left!==i.left&&i.left-s.left!=0,isRtlScrollbarInverted:o.left!==i.left}},t.getOffset=function(t){var e=t.getBoundingClientRect(),n=Hu(t),r=Vu(t);return{top:e.top+(r.pageYOffset||n.documentElement.scrollTop),left:e.left+(r.pageXOffset||n.documentElement.scrollLeft)}};var e=t.prototype;return e.init=function(){t.instances.set(this.el,this),Zl()&&(this.initDOM(),this.setAccessibilityAttributes(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},e.initDOM=function(){var t=this;if(Array.prototype.filter.call(this.el.children,(function(e){return e.classList.contains(t.classNames.wrapper)})).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector("."+this.classNames.contentWrapper),this.contentEl=this.options.contentNode||this.el.querySelector("."+this.classNames.contentEl),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.placeholderEl=this.findChild(this.wrapperEl,"."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.horizontal),this.axis.y.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.vertical);else{for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl)}if(!this.axis.x.track.el||!this.axis.y.track.el){var e=document.createElement("div"),n=document.createElement("div");e.classList.add(this.classNames.track),n.classList.add(this.classNames.scrollbar),e.appendChild(n),this.axis.x.track.el=e.cloneNode(!0),this.axis.x.track.el.classList.add(this.classNames.horizontal),this.axis.y.track.el=e.cloneNode(!0),this.axis.y.track.el.classList.add(this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector("."+this.classNames.scrollbar),this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar),this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible)),this.el.setAttribute("data-simplebar","init")},e.setAccessibilityAttributes=function(){var t=this.options.ariaLabel||"scrollable content";this.contentWrapperEl.setAttribute("tabindex","0"),this.contentWrapperEl.setAttribute("role","region"),this.contentWrapperEl.setAttribute("aria-label",t)},e.initListeners=function(){var t=this,e=Vu(this.el);this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(e){t.el.addEventListener(e,t.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(e){t.el.addEventListener(e,t.onPointerEvent,{capture:!0,passive:!0})})),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.addEventListener("scroll",this.onScroll),e.addEventListener("resize",this.onWindowResize);var n=!1,r=e.ResizeObserver||Pu;this.resizeObserver=new r((function(){n&&t.recalculate()})),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),e.requestAnimationFrame((function(){n=!0})),this.mutationObserver=new e.MutationObserver(this.recalculate),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})},e.recalculate=function(){var t=Vu(this.el);this.elStyles=t.getComputedStyle(this.el),this.isRtl="rtl"===this.elStyles.direction;var e=this.heightAutoObserverEl.offsetHeight<=1,n=this.heightAutoObserverEl.offsetWidth<=1,r=this.contentEl.offsetWidth,o=this.contentWrapperEl.offsetWidth,i=this.elStyles.overflowX,s=this.elStyles.overflowY;this.contentEl.style.padding=this.elStyles.paddingTop+" "+this.elStyles.paddingRight+" "+this.elStyles.paddingBottom+" "+this.elStyles.paddingLeft,this.wrapperEl.style.margin="-"+this.elStyles.paddingTop+" -"+this.elStyles.paddingRight+" -"+this.elStyles.paddingBottom+" -"+this.elStyles.paddingLeft;var a=this.contentEl.scrollHeight,l=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=e?"auto":"100%",this.placeholderEl.style.width=n?r+"px":"auto",this.placeholderEl.style.height=a+"px";var u=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=l>r,this.axis.y.isOverflowing=a>u,this.axis.x.isOverflowing="hidden"!==i&&this.axis.x.isOverflowing,this.axis.y.isOverflowing="hidden"!==s&&this.axis.y.isOverflowing,this.axis.x.forceVisible="x"===this.options.forceVisible||!0===this.options.forceVisible,this.axis.y.forceVisible="y"===this.options.forceVisible||!0===this.options.forceVisible,this.hideNativeScrollbar();var c=this.axis.x.isOverflowing?this.scrollbarWidth:0,d=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&l>o-d,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&a>u-c,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el.style.width=this.axis.x.scrollbar.size+"px",this.axis.y.scrollbar.el.style.height=this.axis.y.scrollbar.size+"px",this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")},e.getScrollbarSize=function(t){if(void 0===t&&(t="y"),!this.axis[t].isOverflowing)return 0;var e,n=this.contentEl[this.axis[t].scrollSizeAttr],r=this.axis[t].track.el[this.axis[t].offsetSizeAttr],o=r/n;return e=Math.max(~~(o*r),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(e=Math.min(e,this.options.scrollbarMaxSize)),e},e.positionScrollbar=function(e){if(void 0===e&&(e="y"),this.axis[e].isOverflowing){var n=this.contentWrapperEl[this.axis[e].scrollSizeAttr],r=this.axis[e].track.el[this.axis[e].offsetSizeAttr],o=parseInt(this.elStyles[this.axis[e].sizeAttr],10),i=this.axis[e].scrollbar,s=this.contentWrapperEl[this.axis[e].scrollOffsetAttr],a=(s="x"===e&&this.isRtl&&t.getRtlHelpers().isRtlScrollingInverted?-s:s)/(n-o),l=~~((r-i.size)*a);l="x"===e&&this.isRtl&&t.getRtlHelpers().isRtlScrollbarInverted?l+(r-i.size):l,i.el.style.transform="x"===e?"translate3d("+l+"px, 0, 0)":"translate3d(0, "+l+"px, 0)"}},e.toggleTrackVisibility=function(t){void 0===t&&(t="y");var e=this.axis[t].track.el,n=this.axis[t].scrollbar.el;this.axis[t].isOverflowing||this.axis[t].forceVisible?(e.style.visibility="visible",this.contentWrapperEl.style[this.axis[t].overflowAttr]="scroll"):(e.style.visibility="hidden",this.contentWrapperEl.style[this.axis[t].overflowAttr]="hidden"),this.axis[t].isOverflowing?n.style.display="block":n.style.display="none"},e.hideNativeScrollbar=function(){this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-"+this.scrollbarWidth+"px":0,this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-"+this.scrollbarWidth+"px":0},e.onMouseMoveForAxis=function(t){void 0===t&&(t="y"),this.axis[t].track.rect=this.axis[t].track.el.getBoundingClientRect(),this.axis[t].scrollbar.rect=this.axis[t].scrollbar.el.getBoundingClientRect(),this.isWithinBounds(this.axis[t].scrollbar.rect)?this.axis[t].scrollbar.el.classList.add(this.classNames.hover):this.axis[t].scrollbar.el.classList.remove(this.classNames.hover),this.isWithinBounds(this.axis[t].track.rect)?(this.showScrollbar(t),this.axis[t].track.el.classList.add(this.classNames.hover)):this.axis[t].track.el.classList.remove(this.classNames.hover)},e.onMouseLeaveForAxis=function(t){void 0===t&&(t="y"),this.axis[t].track.el.classList.remove(this.classNames.hover),this.axis[t].scrollbar.el.classList.remove(this.classNames.hover)},e.showScrollbar=function(t){void 0===t&&(t="y");var e=this.axis[t].scrollbar.el;this.axis[t].isVisible||(e.classList.add(this.classNames.visible),this.axis[t].isVisible=!0),this.options.autoHide&&this.hideScrollbars()},e.onDragStart=function(t,e){void 0===e&&(e="y");var n=Hu(this.el),r=Vu(this.el),o=this.axis[e].scrollbar,i="y"===e?t.pageY:t.pageX;this.axis[e].dragOffset=i-o.rect[this.axis[e].offsetAttr],this.draggedAxis=e,this.el.classList.add(this.classNames.dragging),n.addEventListener("mousemove",this.drag,!0),n.addEventListener("mouseup",this.onEndDrag,!0),null===this.removePreventClickId?(n.addEventListener("click",this.preventClick,!0),n.addEventListener("dblclick",this.preventClick,!0)):(r.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},e.onTrackClick=function(t,e){var n=this;if(void 0===e&&(e="y"),this.options.clickOnTrack){var r=Vu(this.el);this.axis[e].scrollbar.rect=this.axis[e].scrollbar.el.getBoundingClientRect();var o=this.axis[e].scrollbar.rect[this.axis[e].offsetAttr],i=parseInt(this.elStyles[this.axis[e].sizeAttr],10),s=this.contentWrapperEl[this.axis[e].scrollOffsetAttr],a=("y"===e?this.mouseY-o:this.mouseX-o)<0?-1:1,l=-1===a?s-i:s+i;!function t(){var o,i;-1===a?s>l&&(s-=n.options.clickOnTrackSpeed,n.contentWrapperEl.scrollTo(((o={})[n.axis[e].offsetAttr]=s,o)),r.requestAnimationFrame(t)):s<l&&(s+=n.options.clickOnTrackSpeed,n.contentWrapperEl.scrollTo(((i={})[n.axis[e].offsetAttr]=s,i)),r.requestAnimationFrame(t))}()}},e.getContentElement=function(){return this.contentEl},e.getScrollElement=function(){return this.contentWrapperEl},e.getScrollbarWidth=function(){try{return"none"===getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:qu(this.el)}catch(t){return qu(this.el)}},e.removeListeners=function(){var t=this,e=Vu(this.el);this.options.autoHide&&this.el.removeEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(e){t.el.removeEventListener(e,t.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(e){t.el.removeEventListener(e,t.onPointerEvent,{capture:!0,passive:!0})})),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.recalculate.cancel(),this.onMouseMove.cancel(),this.hideScrollbars.cancel(),this.onWindowResize.cancel()},e.unMount=function(){this.removeListeners(),t.instances.delete(this.el)},e.isWithinBounds=function(t){return this.mouseX>=t.left&&this.mouseX<=t.left+t.width&&this.mouseY>=t.top&&this.mouseY<=t.top+t.height},e.findChild=function(t,e){var n=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;return Array.prototype.filter.call(t.children,(function(t){return n.call(t,e)}))[0]},t}();Uu.defaultOptions={autoHide:!0,forceVisible:!1,clickOnTrack:!0,clickOnTrackSpeed:40,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging"},scrollbarMinSize:25,scrollbarMaxSize:0,timeout:1e3},Uu.instances=new WeakMap,Uu.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.removeEventListener("load",this.initDOMLoadedElements),Array.prototype.forEach.call(document.querySelectorAll("[data-simplebar]"),(function(t){"init"===t.getAttribute("data-simplebar")||Uu.instances.has(t)||new Uu(t,ju(t.attributes))}))},Uu.removeObserver=function(){this.globalObserver.disconnect()},Uu.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),"undefined"!=typeof MutationObserver&&(this.globalObserver=new MutationObserver(Uu.handleMutations),this.globalObserver.observe(document,{childList:!0,subtree:!0})),"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?window.setTimeout(this.initDOMLoadedElements):(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.addEventListener("load",this.initDOMLoadedElements))},Uu.handleMutations=function(t){t.forEach((function(t){Array.prototype.forEach.call(t.addedNodes,(function(t){1===t.nodeType&&(t.hasAttribute("data-simplebar")?!Uu.instances.has(t)&&document.documentElement.contains(t)&&new Uu(t,ju(t.attributes)):Array.prototype.forEach.call(t.querySelectorAll("[data-simplebar]"),(function(t){"init"!==t.getAttribute("data-simplebar")&&!Uu.instances.has(t)&&document.documentElement.contains(t)&&new Uu(t,ju(t.attributes))})))})),Array.prototype.forEach.call(t.removedNodes,(function(t){1===t.nodeType&&("init"===t.getAttribute("data-simplebar")?Uu.instances.has(t)&&!document.documentElement.contains(t)&&Uu.instances.get(t).unMount():Array.prototype.forEach.call(t.querySelectorAll('[data-simplebar="init"]'),(function(t){Uu.instances.has(t)&&!document.documentElement.contains(t)&&Uu.instances.get(t).unMount()})))}))}))},Uu.getOptions=ju,Zl()&&Uu.initHtmlApi();const Ku=Uu;function Gu(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Ju(t){var e=t.validations,n=(0,sl.ref)(null);return{error:n,validate:function(t){var r,o=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Gu(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gu(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}(e);try{for(o.s();!(r=o.n()).done;){var i=(0,r.value)(t);if(i)return n.value=i;n.value=null}}catch(t){o.e(t)}finally{o.f()}}}}var Zu=function(t){return t};function Yu(t){var e=t.valueRef,n=t.format,r=void 0===n?Zu:n,o=(0,sl.ref)(r(e.value));return(0,sl.watch)(e,(function(){return o.value=r(e.value)})),o}function Xu(t){return(0,sl.computed)((function(){var e;return(null===(e=t.value)||void 0===e?void 0:e.$el)||t.value}))}function Qu(t,e,n,r,o,i,s){try{var a=t[i](s),l=a.value}catch(t){return void n(t)}a.done?e(l):Promise.resolve(l).then(r,o)}function tc(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function s(t){Qu(i,r,o,s,a,"next",t)}function a(t){Qu(i,r,o,s,a,"throw",t)}s(void 0)}))}}var ec=n(4687),nc=n.n(ec);function rc(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.onBeforeOpened,r=e.onClosed,o=e.wrapperRef,i=e.modalRef,s=(0,sl.inject)(Ol.EDITOR),a=(0,sl.ref)(!1);function l(){var e=Xu(o),n=Xu(i);t=va(e.value,n.value,{placement:"bottom",modifiers:[{name:"offset",options:{offset:[0,4]}},{name:"preventOverflow",options:{padding:16}}]})}function u(){return c.apply(this,arguments)}function c(){return(c=tc(nc().mark((function t(){return nc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return null==n||n(),s.commands.storeSelection(),a.value=!0,t.next=5,(0,sl.nextTick)();case 5:l();case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function d(){a.value=!1,s.commands.restoreSelection(),null==r||r()}(0,sl.onUnmounted)((function(){var e;null===(e=t)||void 0===e||e.destroy()}));var p=function(t){return t?u():d()};return{isOpened:a,open:u,close:d,toggle:p}}function oc(t){var e=t.targetRef,n=t.isActiveRef,r=t.event,o=t.onEvent,i=t.options;function s(){var t;null===(t=e.value)||void 0===t||t.removeEventListener(r,o,i)}function a(){e.value&&(n.value?e.value.addEventListener(r,o,i):s())}(0,sl.watch)(n,a),(0,sl.watch)(e,a),(0,sl.onUnmounted)(s),a()}var ic=["BUTTON","INPUT","LABEL","A"];function sc(t){var e=t.hostRef,n=t.isActiveRef,r=(0,sl.inject)(Ol.EDITOR);oc({event:"mousedown",targetRef:Xu(e),isActiveRef:n,onEvent:function(t){ic.includes(t.target.tagName)||(r.isFocused&&(t.stopPropagation(),t.preventDefault()),r.chain().restoreSelection().run())}})}var ac=Symbol("scrollView");const lc=wl({name:"ScrollView",setup:function(){var t=(0,sl.ref)(null),e=(0,sl.ref)(null);return(0,sl.provide)(ac,e),(0,sl.onMounted)((function(){var n=Ku.getOptions(t.value.attributes),r=new Ku(t.value,n);e.value=r.getScrollElement()})),{hostRef:t}}},Kl,[],!1,null,"bec57602",null).exports;var uc=function(){var t=this;return(0,t._self._c)("label",{staticClass:"zw-field-label",attrs:{for:t.fieldId}},[t._t("default")],2)};uc._withStripped=!0;const cc=wl({name:"FieldLabel",props:{fieldId:{type:String,required:!1,default:null}}},uc,[],!1,null,"42ff6f5b",null).exports;var dc=function(){var t=this;return(0,t._self._c)("input",{staticClass:"zw-range",style:t.inputStyles,attrs:{type:"range",id:t.fieldId,min:t.min,max:t.max,step:t.step},domProps:{value:t.tempValue},on:{input:function(e){return t.update(e)}}})};dc._withStripped=!0;const pc=wl({name:"Range",props:{min:{type:[String,Number],required:!0},max:{type:[String,Number],required:!0},step:{type:[String,Number],required:!0},value:{type:[String,Number],required:!0},fieldId:{type:String,required:!1,default:""}},setup:function(t,e){var n=e.emit,r=Yu({valueRef:(0,sl.toRef)(t,"value"),format:Number});return{inputStyles:(0,sl.computed)((function(){var e=Number(t.min),n=Number(t.max),o=Number(t.step),i=Math.ceil(r.value/o)*o;return{"--zw-range-progress":"".concat((i-e)/(n-e)*100,"%")}})),tempValue:r,update:function(t){r.value=Number(t.target.value),n("input",r.value)}}}},dc,[],!1,null,"2caa9e86",null).exports;var hc=function(){var t=this,e=t._self._c;return e("div",{staticClass:"zw-number-field",class:t.elementClasses},[e("input",{staticClass:"zw-number-field__input",attrs:{type:"number",id:t.fieldId,disabled:t.disabled},domProps:{value:t.tempValue},on:{change:t.onChange}}),t._v(" "),e("div",{staticClass:"zw-number-field__controls"},[e("div",{staticClass:"zw-number-field__buttons"},[e("Button",{staticClass:"zw-number-field__increment-button",attrs:{disabled:t.disabled,"data-test-selector":"increment-button",type:"button"},on:{click:t.incrementValue}}),t._v(" "),e("Button",{staticClass:"zw-number-field__decrement-button",attrs:{disabled:t.disabled,"data-test-selector":"decrement-button",type:"button"},on:{click:t.decrementValue}})],1),t._v(" "),t.units?e("p",{staticClass:"zw-number-field__units"},[t._v("\n "+t._s(t.units)+"\n ")]):t._e()])])};hc._withStripped=!0;const fc=wl({name:"NumberField",components:{Button:Ml},props:{value:{required:!0,type:[Number,String]},min:{type:[Number,String],required:!1,default:null},max:{type:[Number,String],required:!1,default:null},digits:{type:[Number,String],required:!1,default:2},step:{type:[Number,String],required:!1,default:1},units:{type:String,required:!1,default:""},disabled:{type:Boolean,required:!1,default:!1},fieldId:{type:String,required:!1,default:""}},setup:function(t,e){var n=e.emit,r=function(t){return null===t?null:Number(t)},o=function(t){var e=t.digits,n=t.min,r=t.max,o=t.onChange;function i(t){return Number(parseFloat(t).toFixed(e))}var s=Yu({valueRef:t.valueRef,format:i});function a(t){return null!==n&&t<n?n:null!==r&&t>r?r:t}return{temp:s,change:function(t){s.value=t,""===s.value&&(s.value=null!=n?n:1);var e=a(Number.parseFloat(s.value));s.value=i(e),o(s.value)},increment:function(t){var e=a(s.value+Number(t));s.value=i(e),o(s.value)},decrement:function(t){var e=a(s.value-Number(t));s.value=i(e),o(s.value)}}}({valueRef:(0,sl.toRef)(t,"value"),onChange:function(t){return n("input",t)},digits:Number(t.digits),min:r(t.min),max:r(t.max)});return{elementClasses:(0,sl.computed)((function(){return{"zw-number-field--disabled":t.disabled}})),tempValue:o.temp,onChange:function(t){return o.change(t.target.value)},incrementValue:function(){return o.increment(Number(t.step))},decrementValue:function(){return o.decrement(Number(t.step))}}}},hc,[],!1,null,"0a7fafb2",null).exports;var mc=function(){var t=this,e=t._self._c;return e("transition",{attrs:{name:"zw-modal-",duration:t.$options.transition}},[t.isOpened?e("div",{directives:[{name:"out-click",rawName:"v-out-click",value:t.close,expression:"close"}],ref:"hostRef",staticClass:"zw-modal",style:t.modalStyles},[t._t("default")],2):t._e()])};function gc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function vc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function yc(t,e,n){return e&&vc(t.prototype,e),n&&vc(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}mc._withStripped=!0;var bc=function(){function t(){gc(this,t)}return yc(t,null,[{key:"decode",value:function(t){try{return JSON.parse(t)}catch(t){return console.error(t),null}}},{key:"encode",value:function(t){return JSON.stringify(t)}}]),t}(),wc=function(){function t(e){gc(this,t),this.nativeStorage=e,this.KEY_PREFIX="zp."}return yc(t,[{key:"makeKey",value:function(t){return this.KEY_PREFIX+t}},{key:"setItem",value:function(t,e){var n=this,r=bc.encode(e);this.accessToStorage((function(e){return e.setItem(n.makeKey(t),r)}))}},{key:"getItem",value:function(t){var e=this,n=this.accessToStorage((function(n){return n.getItem(e.makeKey(t))}));return bc.decode(n)}},{key:"accessToStorage",value:function(t){try{return t(this.nativeStorage)}catch(t){this.onPrivateModeEnabled(t)}}},{key:"onPrivateModeEnabled",value:function(t){console.error(t)}}]),t}(),xc=yc((function t(e){var n=e.listRef,r=e.triggerUpdate;gc(this,t),this.listRef=n,this.triggerUpdate=r})),Dc=function(){function t(){gc(this,t)}return yc(t,null,[{key:"use",value:function(t){this.window=t}},{key:"document",get:function(){return this.window.document}},{key:"body",get:function(){return this.document.body}},{key:"head",get:function(){return this.document.head}},{key:"getComputedStyle",value:function(t){return this.window.getComputedStyle(t)}}]),t}();function kc(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Cc(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Cc(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}function Cc(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}Tl(Dc,"window",window);var Ec=function(){function t(e){gc(this,t),this._content=e,this._dom=null}return yc(t,[{key:"normalize",value:function(){return"string"!=typeof this._content?this._content:this._normalizeTextContent()}},{key:"_normalizeTextContent",value:function(){return this._dom=(new DOMParser).parseFromString(this._content,"text/html"),this._iterateNodes(this._normalizeListItems.bind(this),(function(t){return"LI"===t.tagName})),this._iterateNodes(this._normalizeSettingsStructure.bind(this),(function(t){return"SPAN"===t.tagName})),this._iterateNodes(this._normalizeStyles.bind(this),(function(t){return"SPAN"!==t.tagName})),this._dom.body.innerHTML}},{key:"_iterateNodes",value:function(t,e){for(var n=this._dom.createNodeIterator(this._dom.body,NodeFilter.SHOW_ELEMENT,{acceptNode:function(t){return e(t)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}),r=n.nextNode();r;)t(r),r=n.nextNode()}},{key:"_normalizeListItems",value:function(e){for(var n,r=this,o=new DocumentFragment,i=function(n){r._assignElementProperties(n,e,t.BLOCK_STYLES),o.append(n)},s=0,a=Array.from(e.childNodes);s<a.length;s++){var l=a[s];"P"!==l.tagName?(n||i(n=document.createElement("p")),n.append(l)):(i(l),n=null)}e.append(o),this._removeStyleProperties(e,t.BLOCK_STYLES)}},{key:"_normalizeSettingsStructure",value:function(t){var e=Array.from(t.childNodes).every((function(t){return t.nodeType===Node.TEXT_NODE}));if(!e){var n,r=t.cloneNode(!0),o=this._getMigratingStyles(t,{customProperties:!0}),i=[],s=kc(r.childNodes);try{for(s.s();!(n=s.n()).done;){var a=n.value,l=a;o.length&&(l=this._wrapTextNode(r,a),this._assignElementProperties(l,r,o)),i.push(l)}}catch(t){s.e(t)}finally{s.f()}t.replaceWith.apply(t,i)}}},{key:"_normalizeStyles",value:function(t){var e,n=this._getMigratingStyles(t),r=kc(t.childNodes);try{for(r.s();!(e=r.n()).done;){var o=e.value,i=this._wrapTextNode(t,o);this._assignElementProperties(i,t,n)}}catch(t){r.e(t)}finally{r.f()}this._removeStyleProperties(t,n)}},{key:"_getMigratingStyles",value:function(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.customProperties,o=t.BLOCK_STYLES,i=[],s=0;s<e.style.length;s++){var a=e.style.item(s);o.includes(a)||!r&&a.startsWith("--")||i.push(a)}return i}},{key:"_wrapTextNode",value:function(t,e){if(e.nodeType!==Node.TEXT_NODE)return e;var n=Dc.document.createElement("span");return n.append(e.cloneNode()),t.replaceChild(n,e),n}},{key:"_assignElementProperties",value:function(t,e,n){var r,o=kc(n);try{for(o.s();!(r=o.n()).done;){var i=r.value;if(!t.style.getPropertyValue(i)){var s=e.style.getPropertyValue(i);s&&t.style.setProperty(i,s)}}}catch(t){o.e(t)}finally{o.f()}}},{key:"_removeStyleProperties",value:function(t,e){var n,r=kc(e);try{for(r.s();!(n=r.n()).done;){var o=n.value;t.style.removeProperty(o)}}catch(t){r.e(t)}finally{r.f()}0===t.style.length&&t.removeAttribute("style")}}],[{key:"normalize",value:function(e){return new t(e).normalize()}}]),t}();Tl(Ec,"BLOCK_STYLES",["text-align","line-height"]);var Sc=new WeakMap;function Oc(t){Dc.window!==window&&window.document.addEventListener("click",t),Dc.document.addEventListener("click",t)}function Ac(t){Dc.window!==window&&window.document.removeEventListener("click",t),Dc.document.removeEventListener("click",t)}var Tc={bind:function(t,e){var n=e.value,r=n.onOutClick||n,o=!n.isDisabled;function i(e){var n=e.target===t||t.contains(e.target);e.target.isConnected&&!n&&r(e)}Sc.set(t,{callback:i,isEnabled:o}),o&&setTimeout((function(){return Oc(i)}))},update:function(t,e){var n=e.value,r=Sc.get(t),o=!n.isDisabled;o!==r.isEnabled&&(o?Oc(r.callback):Ac(r.callback),Sc.set(t,{callback:r.callback,isEnabled:o}))},unbind:function(t){Ac(Sc.get(t).callback)}};function Mc(t,e){var n=e.value,r="string"==typeof n?{text:n}:n,o=r.text,i=r.hotkey;o&&(t.dataset.tooltip=o),o&&i&&(t.dataset.tooltipHotkey=i)}const Fc=wl({name:"Modal",transition:{enter:200,leave:100},directives:{outClick:Tc},props:{toggler:{type:Object,required:!1,default:null},maxHeight:{type:[Number,String],required:!1,default:1e3},maxWidth:{type:[Number,String],required:!1,default:1e3}},setup:function(t){var e=t.toggler||rc(),n=(0,sl.ref)(null),r=(0,sl.computed)((function(){return{"--zw-modal-max-height":"".concat(t.maxHeight,"px"),"--zw-modal-max-width":"".concat(t.maxWidth,"px")}}));return sc({isActiveRef:e.isOpened,hostRef:n}),{hostRef:n,modalStyles:r,close:e.close,isOpened:e.isOpened}}},mc,[],!1,null,"514338df",null).exports;var Nc=function(){var t=this,e=t._self._c;return e("div",{staticClass:"zw-field"},[e("label",{staticClass:"zw-field__label",attrs:{for:t.fieldId,"data-test-selector":"label"}},[t._v("\n "+t._s(t.label)+"\n ")]),t._v(" "),e("input",{staticClass:"zw-field__input",attrs:{type:"text",id:t.fieldId,placeholder:t.placeholder,"data-test-selector":"input"},domProps:{value:t.value},on:{input:t.onInput}}),t._v(" "),t.error?e("p",{staticClass:"zw-field__label--error",attrs:{"data-test-selector":"error"}},[t._v("\n "+t._s(t.error)+"\n ")]):t._e()])};Nc._withStripped=!0;const Bc=wl({name:"TextField",props:{value:{type:[Number,String],required:!0},label:{type:String,required:!0},placeholder:{type:String,required:!1,default:""},error:{type:String,required:!1,default:null}},setup:function(t,e){var n=e.emit;return{onInput:function(t){return n("input",t.target.value)},fieldId:(0,sl.computed)((function(){return t.label.toLowerCase().replace(/[^a-zA-Z0-9]+(.)/g,(function(t,e){return e.toUpperCase()}))}))}}},Nc,[],!1,null,"762329fc",null).exports;var _c=function(){var t=this,e=t._self._c;return e("label",{staticClass:"zw-checkbox"},[e("input",{staticClass:"zw-checkbox__field",attrs:{type:"checkbox"},domProps:{checked:t.value},on:{change:t.onCheckedChanged}}),t._v(" "),e("span",{staticClass:"zw-checkbox__indicator zw-margin-right--xs"}),t._v(" "),e("span",{staticClass:"zw-checkbox__label"},[t._v(t._s(t.label))])])};_c._withStripped=!0;const Rc=wl({name:"Checkbox",props:{value:{type:Boolean,required:!0},label:{type:String,required:!1,default:null}},setup:function(t,e){var n=e.emit;return{onCheckedChanged:function(t){n("input",t.target.checked)}}}},_c,[],!1,null,"684c8df7",null).exports;var zc=function(){var t=this,e=t._self._c;return e("div",{ref:"dropdownRef",staticClass:"zw-dropdown"},[e("DropdownActivator",{attrs:{color:t.color},scopedSlots:t._u([{key:"default",fn:function(e){return[t._t("activator",null,null,e)]}}],null,!0)}),t._v(" "),e("Modal",{ref:"modalRef",attrs:{"max-height":"300","max-width":t.maxWidth,toggler:t.toggler}},[e("DropdownMenu",{attrs:{options:t.options},scopedSlots:t._u([{key:"option",fn:function(e){return[t._t("option",null,null,e)]}}],null,!0)})],1)],1)};zc._withStripped=!0;var Lc=Object.freeze({ACTIVE_MANAGER:Symbol("dropdownActiveManager"),TOGGLER:Symbol("dropdownToggler"),SESSION:Symbol("session")}),Ic=function(){var t=this,e=t._self._c;return e("div",[t._t("default",(function(){return[e("Button",{staticClass:"zw-dropdown__activator",class:t.dropdownClasses,attrs:{skin:"toolbar",active:t.isOpened},on:{click:t.open}},[e("span",{staticClass:"zw-dropdown__activator-title zw-text--truncate"},[t._v("\n "+t._s(t.activeOptionTitle)+"\n ")]),t._v(" "),e("Icon",{staticClass:"zw-dropdown__activator-arrow",attrs:{name:"arrow",size:"8px","auto-color":""}})],1)]}),{open:t.open,isOpened:t.isOpened})],2)};function Pc(t){return(0,sl.computed)((function(){var e,n;return(null===(e=t.value)||void 0===e?void 0:e.title)||(null===(n=t.value)||void 0===n?void 0:n.id)||""}))}Ic._withStripped=!0;const jc=wl({name:"DropdownActivator",components:{Icon:Ul,Button:Ml},model:{event:"change"},props:{color:{type:String,required:!1,default:"none"}},setup:function(t){var e=(0,sl.inject)(Lc.ACTIVE_MANAGER),n=(0,sl.inject)(Lc.TOGGLER),r=(0,sl.toRef)(t,"color"),o=Pc(e.activeOption),i=(0,sl.computed)((function(){return{"zw-dropdown__activator--active":n.isOpened.value,"zw-dropdown__activator--gray":"gray"===r.value}}));return{activeOptionTitle:o,isOpened:n.isOpened,open:n.open,dropdownClasses:i}}},Ic,[],!1,null,"15cad90c",null).exports;var Vc=function(){var t=this,e=t._self._c;return e("ScrollView",[e("div",{staticClass:"zw-dropdown__menu",attrs:{"data-test-selector":"dropdownMenu"}},[t._l(t.options,(function(n,r){return[n.options?[e("DropdownGroup",{key:n.id,attrs:{group:n},scopedSlots:t._u([{key:"option",fn:function(e){return[t._t("option",null,null,e)]}}],null,!0)}),t._v(" "),r+1!==t.options.length?e("DropdownDivider",{key:n.id+" divider"}):t._e()]:t._t("option",(function(){return[e("DropdownOption",{attrs:{option:n}})]}),{option:n})]}))],2)])};Vc._withStripped=!0;var Hc=function(){var t=this,e=t._self._c;return e("div",{staticClass:"zw-dropdown__group"},[e("p",{staticClass:"zw-dropdown__group-title"},[t._v("\n "+t._s(t.groupTitle)+"\n ")]),t._v(" "),t._l(t.group.options,(function(n){return t._t("option",(function(){return[e("DropdownOption",{attrs:{option:n}})]}),{option:n})}))],2)};Hc._withStripped=!0;var $c=function(){var t=this;return(0,t._self._c)("Button",{ref:"optionRef",staticClass:"zw-dropdown__option zw-text--truncate",class:t.classes,on:{click:t.activate}},[t._t("default",(function(){return[t._v(t._s(t.optionTitle))]}))],2)};$c._withStripped=!0;const Wc=wl({name:"DropdownOption",components:{Button:Ml},props:{option:{type:Object,required:!0}},setup:function(t){var e,n=(0,sl.inject)(Lc.ACTIVE_MANAGER),r=(0,sl.inject)(Lc.TOGGLER),o=(0,sl.inject)(Lc.SESSION),i=(0,sl.ref)(null),s=(e=(0,sl.inject)(ac),{scrollToElement:function(t){var n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).offset;if(e.value){var r=e.value.getBoundingClientRect(),o=t.getBoundingClientRect().top-r.top;e.value.scrollTo({top:o-(n||0)})}}}),a=Pc((0,sl.toRef)(t,"option")),l=(0,sl.computed)((function(){var e;return t.option.id===(null===(e=n.activeOption.value)||void 0===e?void 0:e.id)})),u=(0,sl.computed)((function(){return{"zw-dropdown__option--active":l.value}}));return(0,sl.onMounted)(tc(nc().mark((function t(){var e,n;return nc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!l.value||o.scrolled){t.next=7;break}return o.scrolled=!0,t.next=4,(0,sl.nextTick)();case 4:e=i.value.$el,n=1.5*e.offsetHeight,s.scrollToElement(e,{offset:n});case 7:case"end":return t.stop()}}),t)})))),{optionTitle:a,classes:u,isActive:l,optionRef:i,activate:function(){n.activateOption(t.option),r.close()}}}},$c,[],!1,null,"a2df7ee0",null).exports,qc=wl({name:"DropdownGroup",components:{DropdownOption:Wc},props:{group:{type:Object,required:!0}},setup:function(t){return{groupTitle:Pc((0,sl.toRef)(t,"group"))}}},Hc,[],!1,null,"00bbc880",null).exports;var Uc=function(){return(0,this._self._c)("div",{staticClass:"zw-dropdown__divider"})};Uc._withStripped=!0;var Kc=wl({name:"DropdownDivider"},Uc,[],!1,null,"65262c5d",null),Gc=wl({name:"DropdownMenu",components:{ScrollView:lc,DropdownGroup:qc,DropdownOption:Wc,DropdownDivider:Kc.exports},props:{options:{type:Array,required:!0}},setup:function(){(0,sl.provide)(Lc.SESSION,{})}},Vc,[],!1,null,null,null);const Jc=wl({name:"Dropdown",components:{Modal:Fc,DropdownActivator:jc,DropdownMenu:Gc.exports},model:{event:"change"},props:{value:{type:[String,Number],required:!1,default:null},options:{type:Array,required:!0},maxWidth:{type:Number,required:!1,default:156},color:{type:String,required:!1,default:"none"}},setup:function(t,e){var n=e.emit,r=(0,sl.ref)(null),o=(0,sl.ref)(null),i=function(t){var e=t.optionsRef,n=t.inputRef,r=t.stateless,o=t.onChange,i=(0,sl.ref)(null);function s(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).emitEvent;r||(i.value=t),!1!==e&&o(t)}var a=function(){return t=n.value,r={emitEvent:!1},void s(e.value.flatMap((function(t){return t.options||t})).find((function(e){return e.id===t})),r);var t,r};return a(),(0,sl.watch)(n,a),{activeOption:i,activateOption:s}}({optionsRef:(0,sl.toRef)(t,"options"),inputRef:(0,sl.toRef)(t,"value"),stateless:null===t.value,onChange:function(t){return n("change",t.id)}}),s=rc({wrapperRef:r,modalRef:o});return(0,sl.provide)(Lc.ACTIVE_MANAGER,i),(0,sl.provide)(Lc.TOGGLER,s),{dropdownRef:r,modalRef:o,toggler:s}}},zc,[],!1,null,"3661c591",null).exports;var Zc=function(){var t=this;return(0,t._self._c)("ZipifyColorPicker",{directives:[{name:"out-click",rawName:"v-out-click",value:{onOutClick:t.close,isDisabled:!t.isOpened},expression:"{ onOutClick: close, isDisabled: !isOpened }"}],ref:"pickerRef",attrs:{placement:"bottom-end","favorite-colors":t.favoriteColors},on:{changeFavoriteColors:t.updateFavoriteColors},scopedSlots:t._u([{key:"activator",fn:function(){return[t._t("activator",null,{isOpened:t.isOpened,open:t.open,close:t.close,toggle:t.toggle})]},proxy:!0}],null,!0),model:{value:t.editingColor,callback:function(e){t.editingColor=e},expression:"editingColor"}})};Zc._withStripped=!0;const Yc=wl({name:"ColorPicker",components:{ZipifyColorPicker:$l.ZipifyColorPicker},directives:{outClick:Tc},props:{value:{type:String,required:!0}},setup:function(t,e){var n=e.emit,r=(0,sl.inject)(Ol.FAVORITE_COLORS),o=(0,sl.inject)(Ol.EDITOR),i=(0,sl.ref)(null),s=function(t){var e=t.pickerRef,n=t.initialColorRef,r=t.onClosed,o=t.onBeforeOpened,i=(0,sl.ref)(n.value),s=(0,sl.computed)((function(){var t,n;return null!==(t=null===(n=e.value)||void 0===n?void 0:n.isVisible)&&void 0!==t&&t}));function a(){o(),i.value=n.value,e.value.open(e.value.$el)}function l(){e.value.close(i.value),r(i.value)}return{isOpened:s,editingColor:i,open:a,close:l,toggle:function(){s.value?l():a()},cancel:function(){i.value=n.value,e.value.close(i.value)}}}({onClosed:function(e){o.commands.restoreSelection(),e!==t.value&&n("change",e)},onBeforeOpened:function(){o.commands.storeSelection(),n("before-opened")},pickerRef:i,initialColorRef:(0,sl.toRef)(t,"value")});return function(t){var e=t.isOpenedRef,n=t.onCancel,r=t.onApply;function o(t,e){t.stopImmediatePropagation(),t.preventDefault(),e()}oc({targetRef:(0,sl.ref)(Dc.document),isActiveRef:e,event:"keydown",onEvent:function(t){switch(t.key){case"Escape":return o(t,n);case"Enter":return o(t,r)}},options:{capture:!0}})}({isOpenedRef:s.isOpened,onCancel:function(){return s.cancel()},onApply:function(){return s.close()}}),sc({hostRef:i,isActiveRef:s.isOpened}),{pickerRef:i,isOpened:s.isOpened,editingColor:s.editingColor,open:s.open,close:s.close,toggle:s.toggle,favoriteColors:r.listRef,updateFavoriteColors:function(t){r.triggerUpdate(t)}}}},Zc,[],!1,null,null,null).exports,Xc=wl({name:"StylePresetControl",components:{Icon:Ul,Button:Ml,Dropdown:Jc},directives:{tooltip:Mc},setup:function(){var t=(0,sl.inject)(Ol.EDITOR),e=t.commands.getPresetList(),n=t.commands.getPreset(),r=t.commands.getPresetCustomization(),o=(0,sl.computed)((function(){var t=r.value,e=t.attributes,n=t.marks;return!!e.length||!!n.length})),i=(0,sl.computed)((function(){return e.value.map((function(t){return{id:t.id,title:t.name}}))}));return{options:i,preset:n,isCustomized:o,apply:function(e){return t.chain().focus().applyPreset(e).run()},removeCustomization:function(){return t.chain().focus().removePresetCustomization().run()}}}},Sl,[],!1,null,"53860f1d",null).exports;var Qc=function(){var t=this,e=t._self._c;return e("Dropdown",{directives:[{name:"tooltip",rawName:"v-tooltip",value:"Font Name",expression:"'Font Name'"}],staticClass:"zw-font-family-control",attrs:{options:t.options,value:t.currentValue},on:{change:t.apply},scopedSlots:t._u([{key:"option",fn:function(n){var r=n.option;return[e("DropdownOption",{directives:[{name:"tooltip",rawName:"v-tooltip",value:r.id,expression:"option.id"}],staticClass:"zw-font-family-control__option",style:t.renderOptionStyles(r),attrs:{option:r}})]}}])})};function td(t){return function(t){if(Array.isArray(t))return Rl(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||zl(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}Qc._withStripped=!0;var ed="wswg.recently_used_fonts";function nd(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}const rd=wl({name:"FontFamilyControl",components:{Dropdown:Jc,DropdownOption:Wc},directives:{tooltip:Mc},setup:function(){var t=(0,sl.inject)(Ol.FONTS),e=(0,sl.inject)(Ol.EDITOR),n=function(t){var e=(0,sl.inject)(Ol.LOCAL_STORAGE),n=(0,sl.ref)(e.getItem(ed)||[]),r=(0,sl.computed)((function(){return!n.value.length}));return{fonts:n,isEmpty:r,add:function(t){n.value=Array.from(new Set([t].concat(td(n.value)))).slice(0,5),e.setItem(ed,n.value)}}}(),r=(0,sl.computed)((function(){return{id:"Recently Used",options:n.fonts.value.map((function(t){return{id:t}}))}}));return{options:(0,sl.computed)((function(){var e,o={},i=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return nd(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?nd(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}(t);try{for(i.s();!(e=i.n()).done;){var s,a,l=e.value;null!==(a=o[s=l.category])&&void 0!==a||(o[s]={id:l.category,options:[]}),o[l.category].options.push({id:l.name})}}catch(t){i.e(t)}finally{i.f()}return n.isEmpty.value?Object.values(o):[r.value].concat(td(Object.values(o)))})),currentValue:e.commands.getFontFamily(),renderOptionStyles:function(t){return{"--zw-font-family-option":'"'.concat(t.id,'"')}},apply:function(t){n.add(t),e.chain().focus().applyFontFamily(t).run()}}}},Qc,[],!1,null,"01eacaed",null).exports;var od=function(){var t=this;return(0,t._self._c)("Dropdown",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{text:"Font Weight",hotkey:"Mod B"},expression:"{ text: 'Font Weight', hotkey: 'Mod B' }"}],attrs:{options:t.options,value:t.currentValue},on:{change:t.apply}})};od._withStripped=!0;const id=wl({name:"FontWeightControl",components:{Dropdown:Jc},directives:{tooltip:Mc},setup:function(){var t=(0,sl.inject)(Ol.EDITOR),e=t.commands.getFont();return{options:(0,sl.computed)((function(){return e.value.weights.map((function(t){return{id:t}}))})),currentValue:t.commands.getFontWeight(),apply:function(e){return t.chain().focus().applyFontWeight(e).run()}}}},od,[],!1,null,null,null).exports;var sd=function(){var t=this;return(0,t._self._c)("Dropdown",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{text:"Font Size",hotkey:"Mod Shift +/-"},expression:"{ text: 'Font Size', hotkey: 'Mod Shift +/-' }"}],staticClass:"zw-font-size-control",attrs:{options:t.options,value:t.currentValue},on:{change:t.apply}})};sd._withStripped=!0;const ad={name:"FontSizeControl",components:{Dropdown:Jc},directives:{tooltip:Mc},setup:function(){var t=(0,sl.inject)(Ol.FONT_SIZES),e=(0,sl.inject)(Ol.EDITOR),n=(0,sl.computed)((function(){return t.map((function(t){return{id:t,title:"".concat(t,"px")}}))}));return{options:n,currentValue:e.commands.getFontSize(),apply:function(t){return e.chain().focus().applyFontSize(t).run()}}}},ld=wl(ad,sd,[],!1,null,"25fe7704",null).exports;var ud=function(){var t=this,e=t._self._c;return e("ColorPicker",{attrs:{value:t.currentValue},on:{change:t.apply},scopedSlots:t._u([{key:"activator",fn:function(t){var n=t.toggle,r=t.isOpened;return[e("Button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:"Font Color",expression:"'Font Color'"}],attrs:{icon:"",skin:"toolbar",active:r},on:{click:n}},[e("Icon",{attrs:{name:"font-color",size:"28px","auto-color":""}})],1)]}}])})};ud._withStripped=!0;const cd=wl({name:"FontColorControl",components:{ColorPicker:Yc,Button:Ml,Icon:Ul},directives:{tooltip:Mc},setup:function(){var t=(0,sl.inject)(Ol.EDITOR);return{currentValue:t.commands.getFontColor(),apply:function(e){return t.chain().applyFontColor(e).run()}}}},ud,[],!1,null,null,null).exports;var dd=function(){var t=this,e=t._self._c;return e("ColorPicker",{attrs:{value:t.currentValue},on:{change:t.apply},scopedSlots:t._u([{key:"activator",fn:function(t){var n=t.toggle,r=t.isOpened;return[e("Button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:"Background Color",expression:"'Background Color'"}],attrs:{icon:"",skin:"toolbar",active:r},on:{click:n}},[e("Icon",{attrs:{name:"background-color",size:"28px","auto-color":""}})],1)]}}])})};dd._withStripped=!0;const pd=wl({name:"BackgroundColorControl",components:{ColorPicker:Yc,Button:Ml,Icon:Ul},directives:{tooltip:Mc},setup:function(){var t=(0,sl.inject)(Ol.EDITOR);return{currentValue:t.commands.getBackgroundColor(),apply:function(e){return t.chain().applyBackgroundColor(e).run()}}}},dd,[],!1,null,null,null).exports;var hd=function(){var t=this,e=t._self._c;return e("Button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{text:"Italic",hotkey:"Mod I"},expression:"{ text: 'Italic', hotkey: 'Mod I' }"}],attrs:{skin:"toolbar",icon:"",active:t.currentValue,disabled:!t.isAvailable},on:{click:t.apply}},[e("Icon",{attrs:{name:"italic",size:"28px","auto-color":""}})],1)};hd._withStripped=!0;const fd=wl({name:"ItalicControl",components:{Button:Ml,Icon:Ul},directives:{tooltip:Mc},setup:function(){var t=(0,sl.inject)(Ol.EDITOR),e=t.commands.isItalic();return{isAvailable:t.commands.isItalicAvailable(),currentValue:e,apply:function(){return t.chain().focus().toggleItalic().run()}}}},hd,[],!1,null,null,null).exports;var md=function(){var t=this,e=t._self._c;return e("Button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{text:"Underline",hotkey:"Mod U"},expression:"{ text: 'Underline', hotkey: 'Mod U' }"}],attrs:{skin:"toolbar",icon:"",active:t.currentValue},on:{click:t.apply}},[e("Icon",{attrs:{name:"underline",size:"28px","auto-color":""}})],1)};md._withStripped=!0;const gd=wl({name:"UnderlineControl",components:{Button:Ml,Icon:Ul},directives:{tooltip:Mc},setup:function(){var t=(0,sl.inject)(Ol.EDITOR);return{currentValue:(0,sl.computed)((function(){return t.commands.isUnderline().value})),apply:function(){return t.chain().focus().toggleUnderline().run()}}}},md,[],!1,null,null,null).exports;var vd=function(){var t=this,e=t._self._c;return e("Button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:"Strikethrough",expression:"'Strikethrough'"}],attrs:{skin:"toolbar",icon:"",active:t.currentValue},on:{click:t.apply}},[e("Icon",{attrs:{name:"strike-through",size:"28px","auto-color":""}})],1)};vd._withStripped=!0;const yd=wl({name:"StrikeThroughControl",components:{Button:Ml,Icon:Ul},directives:{tooltip:Mc},setup:function(){var t=(0,sl.inject)(Ol.EDITOR);return{currentValue:t.commands.isStrikeThrough(),apply:function(){return t.chain().focus().toggleStrikeThrough().run()}}}},vd,[],!1,null,null,null).exports;var bd=function(){var t=this,e=t._self._c;return e("Button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:"Superscript",expression:"'Superscript'"}],attrs:{skin:"toolbar",icon:"",active:t.currentValue},on:{click:t.apply}},[e("Icon",{attrs:{name:"superscript",size:"28px","auto-color":""}})],1)};bd._withStripped=!0;const wd=wl({name:"SuperscriptControl",components:{Button:Ml,Icon:Ul},directives:{tooltip:Mc},setup:function(){var t=(0,sl.inject)(Ol.EDITOR);return{currentValue:(0,sl.computed)((function(){return t.isActive("superscript")})),apply:function(){return t.chain().focus().toggleSuperscript().run()}}}},bd,[],!1,null,null,null).exports;var xd=function(){var t=this,e=t._self._c;return e("Dropdown",{attrs:{options:t.$options.styles},on:{change:t.apply},scopedSlots:t._u([{key:"activator",fn:function(t){var n=t.open,r=t.isOpened;return[e("Button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:"Case Styles",expression:"'Case Styles'"}],attrs:{icon:"",skin:"toolbar",active:r},on:{click:n}},[e("Icon",{attrs:{name:"case-style",size:"28px","auto-color":""}})],1)]}}])})};xd._withStripped=!0;const Dd=wl({name:"CaseStyleControl",components:{Dropdown:Jc,Button:Ml,Icon:Ul},directives:{tooltip:Mc},styles:[{id:dl.UPPERCASE,title:"UPPERCASE"},{id:dl.LOWERCASE,title:"lowercase"},{id:dl.CAPITALIZE,title:"Capitalize"}],setup:function(){var t=(0,sl.inject)(Ol.EDITOR);return{apply:function(e){return t.chain().focus().applyCaseStyle(e).run()}}}},xd,[],!1,null,null,null).exports;var kd=function(){var t=this,e=t._self._c;return e("ButtonToggle",{attrs:{value:t.currentValue,options:t.$options.alignments},on:{change:t.apply},scopedSlots:t._u([{key:"option",fn:function(t){var n=t.isActive,r=t.option,o=t.activate;return[e("Button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:r.tooltip,expression:"option.tooltip"}],attrs:{icon:"",skin:"toolbar",active:n},on:{click:o}},[e("Icon",{attrs:{name:"alignment-".concat(r.id),size:"28px","auto-color":""}})],1)]}}])})};kd._withStripped=!0;const Cd=wl({name:"AlignmentControl",alignments:[{id:pl.LEFT,tooltip:{text:"Align Left",hotkey:"Mod Shift L"}},{id:pl.CENTER,tooltip:{text:"Align Center",hotkey:"Mod Shift E"}},{id:pl.RIGHT,tooltip:{text:"Align Right",hotkey:"Mod Shift R"}},{id:pl.JUSTIFY,tooltip:{text:"Justify",hotkey:"Mod Shift J"}}],components:{ButtonToggle:Nl,Button:Ml,Icon:Ul},directives:{tooltip:Mc},setup:function(t,e){var n=e.emit,r=(0,sl.inject)(Ol.EDITOR);return{currentValue:r.commands.getAlignment(),apply:function(t){r.chain().focus().applyAlignment(t).run(),n("applied")}}}},kd,[],!1,null,null,null).exports;var Ed=function(){var t=this,e=t._self._c;return e("div",{ref:"wrapperRef",staticClass:"zw-position--relative"},[e("Button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:"Alignment",expression:"'Alignment'"}],attrs:{icon:"",skin:"toolbar",active:t.isOpened},on:{click:t.toggler.open}},[e("Icon",{attrs:{name:"alignment-".concat(t.currentValue),size:"28px","auto-color":""}})],1),t._v(" "),e("Modal",{ref:"modalRef",staticClass:"zw-alignment-control__modal",attrs:{toggler:t.toggler}},[e("AlignmentControl",{staticClass:"zw-alignment-control__toggle",on:{applied:t.toggler.close}})],1)],1)};Ed._withStripped=!0;const Sd=wl({name:"AlignmentDeviceControl",components:{Button:Ml,Icon:Ul,Modal:Fc,AlignmentControl:Cd},directives:{tooltip:Mc},setup:function(){var t=(0,sl.inject)(Ol.EDITOR).commands.getAlignment(),e=(0,sl.ref)(null),n=(0,sl.ref)(null),r=rc({wrapperRef:e,modalRef:n});return{wrapperRef:e,modalRef:n,currentValue:t,toggler:r,isOpened:r.isOpened}}},Ed,[],!1,null,"3fa858ad",null).exports;var Od=function(){var t=this,e=t._self._c;return e("div",{ref:"wrapperRef",staticClass:"zw-position--relative"},[e("Button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:"Line Height",expression:"'Line Height'"}],attrs:{icon:"",skin:"toolbar",active:t.isOpened},on:{click:t.toggler.open}},[e("Icon",{attrs:{name:"line-height",size:"28px","auto-color":""}})],1),t._v(" "),e("Modal",{ref:"modalRef",staticClass:"zw-line-height-control__modal",attrs:{toggler:t.toggler}},[e("FieldLabel",{staticClass:"zw-margin-bottom--xs",attrs:{"field-id":"wswg-line-height"}},[t._v("\n Line Height\n ")]),t._v(" "),e("div",{staticClass:"zw-line-height-control__row"},[e("Range",{staticClass:"zw-line-height-control__range",attrs:{step:"0.1",min:"1",max:"3",value:t.currentValue},on:{input:t.apply}}),t._v(" "),e("NumberField",{staticClass:"zw-line-height-control__field",attrs:{step:"0.1",min:"1",max:"3","field-id":"wswg-line-height",value:t.currentValue},on:{input:t.apply}})],1)],1)],1)};Od._withStripped=!0;const Ad=wl({name:"LineHeightControl",components:{Range:pc,Modal:Fc,Icon:Ul,Button:Ml,NumberField:fc,FieldLabel:cc},directives:{tooltip:Mc},setup:function(){var t=(0,sl.ref)(null),e=(0,sl.ref)(null),n=(0,sl.inject)(Ol.EDITOR),r=rc({wrapperRef:t,modalRef:e}),o=n.commands.getLineHeight();return{wrapperRef:t,modalRef:e,isOpened:r.isOpened,toggler:r,currentValue:o,apply:function(t){return n.commands.applyLineHeight(String(t))}}}},Od,[],!1,null,"4cac262f",null).exports;var Td=function(){var t=this,e=t._self._c;return e("Dropdown",{attrs:{value:t.currentValue,options:t.$options.listTypes},on:{change:t.apply},scopedSlots:t._u([{key:"activator",fn:function(n){var r=n.open,o=n.isOpened;return[e("Button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:"Bullet Styles",expression:"'Bullet Styles'"}],attrs:{icon:"",skin:"toolbar",active:o||t.isList},on:{click:r}},[e("Icon",{attrs:{name:t.currentIcon,size:"28px","auto-color":""}})],1)]}},{key:"option",fn:function(t){var n=t.option;return[e("DropdownOption",{staticClass:"zw-list-control__option",attrs:{option:n}},[e("Icon",{attrs:{name:n.icon,size:"28px","auto-color":""}})],1)]}}])})};Td._withStripped=!0;const Md=wl({name:"ListControl",listTypes:fl.values.map((function(t){return{id:t,icon:"list-".concat(t)}})),components:{Dropdown:Jc,DropdownOption:Wc,Button:Ml,Icon:Ul},directives:{tooltip:Mc},setup:function(){var t=(0,sl.inject)(Ol.EDITOR),e=t.commands.getListType();return{isList:(0,sl.computed)((function(){return!!e.value})),currentValue:(0,sl.computed)((function(){return e.value||"none"})),currentIcon:(0,sl.computed)((function(){var t=e.value||fl.DISC;return"list-".concat(t)})),apply:function(e){return t.chain().focus().applyList(e).run()}}}},Td,[],!1,null,"5cba50d4",null).exports;var Fd=function(){var t=this._self._c;return t("Button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:"Remove Styles",expression:"'Remove Styles'"}],attrs:{skin:"toolbar",icon:""},on:{click:this.apply}},[t("Icon",{attrs:{name:"remove-format",size:"28px","auto-color":""}})],1)};Fd._withStripped=!0;const Nd=wl({name:"RemoveFormatControl",components:{Icon:Ul,Button:Ml},directives:{tooltip:Mc},setup:function(){var t=(0,sl.inject)(Ol.EDITOR);return{apply:function(){return t.chain().focus().removeFormat().run()}}}},Fd,[],!1,null,null,null).exports;var Bd=function(){var t=this,e=t._self._c;return e("div",{ref:"wrapperRef",staticClass:"zw-position--relative"},[e("Button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:"Link",expression:"'Link'"}],attrs:{icon:"",skin:"toolbar",active:t.isActive},on:{click:t.toggler.open}},[e("Icon",{attrs:{name:"link",size:"28px","auto-color":""}})],1),t._v(" "),e("Modal",{ref:"modalRef",staticClass:"zw-link-modal",attrs:{toggler:t.toggler}},[e("LinkControlHeader",{on:{"remove-link":t.removeLink}}),t._v(" "),e("div",{staticClass:"zw-link-modal__body"},[e("TextField",{staticClass:"zw-margin-bottom--sm",attrs:{value:t.link.linkData.value.text,label:"Text to display",placeholder:"Type Text",error:t.nameValidator.error.value},on:{input:t.link.updateText}}),t._v(" "),e("LinkControlDestination",{staticClass:"zw-margin-bottom--md",attrs:{link:t.link,validator:t.urlValidator},on:{"reset-errors":t.resetErrors}}),t._v(" "),e("LinkControlApply",{on:{cancel:t.toggler.close,apply:t.applyLink}})],1)],1)],1)};Bd._withStripped=!0;var _d=function(){var t=this,e=t._self._c;return e("div",{staticClass:"zw-link-modal-header"},[e("span",{staticClass:"zw-link-modal-header__title"},[t._v("Link")]),t._v(" "),e("Button",{staticClass:"zw-link-modal-header__unlink-button",attrs:{disabled:!t.isLink},on:{click:t.removeLink}},[e("Icon",{staticClass:"zw-link-modal-header__unlink-icon",attrs:{name:"unlink",size:"14px","auto-color":""}}),t._v("\n Remove\n ")],1)],1)};_d._withStripped=!0;const Rd=wl({name:"LinkControlHeader",components:{Icon:Ul,Button:Ml},setup:function(t,e){var n=e.emit,r=(0,sl.inject)(Ol.EDITOR);return{isLink:(0,sl.computed)((function(){return r.isActive("link")})),removeLink:function(){return n("remove-link")}}}},_d,[],!1,null,"8211d55a",null).exports;var zd=function(){var t=this,e=t._self._c;return e("div",{staticClass:"zw-link-modal__apply"},[e("Button",{staticClass:"zw-margin-right--xs",attrs:{skin:"secondary"},on:{click:t.cancel}},[t._v("\n Cancel\n ")]),t._v(" "),e("Button",{attrs:{skin:"primary"},on:{click:t.apply}},[t._v("\n Save\n ")])],1)};zd._withStripped=!0;const Ld=wl({name:"LinkControlApply",components:{Button:Ml},setup:function(t,e){var n=e.emit;return{cancel:function(){return n("cancel")},apply:function(){return n("apply")}}}},zd,[],!1,null,"67c5d4b6",null).exports;var Id=function(){var t=this,e=t._self._c;return e("div",[e("FieldLabel",{staticClass:"zw-margin-bottom--xxs"},[t._v("\n Destination\n ")]),t._v(" "),e("Dropdown",{staticClass:"zw-margin-bottom--sm",attrs:{color:"gray","max-width":266,value:t.link.currentDestination.value.id,options:t.$options.destinationTypes},on:{change:t.changeDestination},scopedSlots:t._u([{key:"option",fn:function(t){var n=t.option;return[e("DropdownOption",{staticClass:"zw-link-modal-dropdown__option",attrs:{option:n}})]}}])}),t._v(" "),t.isURLDestination?e("LinkControlUrl",{staticClass:"zw-margin-bottom--md",attrs:{href:t.link.destinationHrefs.value.url,isTargetBlank:t.isTargetBlank,validator:t.validator},on:{updateLink:t.updateLink,updateTarget:t.link.updateTarget}}):e("LinkControlPageBlock",{attrs:{value:t.link.destinationHrefs.value.block},on:{update:t.updateLink}})],1)};Id._withStripped=!0;var Pd=function(){var t=this,e=t._self._c;return e("div",[e("FieldLabel",{staticClass:"zw-margin-bottom--xxs",attrs:{"field-id":"link-destination"}},[t._v("\n Select block\n ")]),t._v(" "),e("Dropdown",{attrs:{color:"gray","max-width":266,value:t.value,options:t.pageBlocks},on:{change:t.applyBlock},scopedSlots:t._u([{key:"option",fn:function(t){var n=t.option;return[e("DropdownOption",{staticClass:"zw-link-modal-dropdown__option",attrs:{option:n}})]}}])})],1)};Pd._withStripped=!0;const jd=wl({name:"LinkControlPageBlock",components:{DropdownOption:Wc,Dropdown:Jc,FieldLabel:cc},props:{value:{type:Number,required:!0}},setup:function(t,e){var n=e.emit,r=(0,sl.inject)(Ol.PAGE_BLOCKS);return{pageBlocks:r,applyBlock:function(t){var e=r.value.find((function(e){return e.id===t}));n("update",e.id)}}}},Pd,[],!1,null,null,null).exports;var Vd=function(){var t=this,e=t._self._c;return e("div",[e("TextField",{staticClass:"zw-margin-bottom--xs",attrs:{label:"To what URL should this link go?",placeholder:"https://",value:t.href,error:t.validator.error.value},on:{input:t.updateLink}}),t._v(" "),e("Checkbox",{attrs:{label:"Open in new tab",value:t.isTargetBlank},on:{input:t.updateTarget}})],1)};Vd._withStripped=!0;const Hd=wl({name:"LinkControlUrl",components:{TextField:Bc,Checkbox:Rc},props:{href:{type:String,required:!0},isTargetBlank:{type:Boolean,required:!0},validator:{type:Object,required:!0}},setup:function(t,e){var n=e.emit;return{updateLink:function(t){return n("updateLink",t)},updateTarget:function(t){return n("updateTarget",t)}}}},Vd,[],!1,null,null,null).exports,$d={name:"LinkControl",components:{LinkControlDestination:wl({name:"LinkControlDestination",destinationTypes:[{id:vl.URL,title:"URL"},{id:vl.BLOCK,title:"Page Block"}],components:{LinkControlPageBlock:jd,LinkControlUrl:Hd,FieldLabel:cc,DropdownOption:Wc,Dropdown:Jc},props:{link:{type:Object,required:!0},validator:{type:Object,required:!0}},setup:function(t,e){var n=e.emit,r=(0,sl.toRef)(t,"link"),o=(0,sl.computed)((function(){return"url"===r.value.currentDestination.value.id}));return{isTargetBlank:(0,sl.computed)((function(){return r.value.linkData.value.target===gl.BLANK})),isURLDestination:o,changeDestination:function(t){n("reset-errors"),r.value.currentDestination.value.id=t,o.value||(r.value.target=gl.SELF),r.value.destinationHrefs.value.url=""},updateLink:function(t){n("reset-errors"),r.value.updateLink(t)}}}},Id,[],!1,null,null,null).exports,LinkControlApply:Ld,LinkControlHeader:Rd,TextField:Bc,Modal:Fc,Icon:Ul,Button:Ml},directives:{tooltip:Mc},setup:function(){var t=(0,sl.ref)(null),e=(0,sl.ref)(null),n=(0,sl.ref)(!1),r=(0,sl.ref)(!1),o=(0,sl.inject)(Ol.EDITOR),i=function(){var t=(0,sl.inject)(Ol.EDITOR),e=(0,sl.inject)(Ol.PAGE_BLOCKS),n=(0,sl.ref)({text:"",target:gl.SELF,destination:vl.URL}),r=(0,sl.ref)({block:e.value[0].id,url:""}),o=(0,sl.ref)({id:vl.URL});return{editor:t,linkData:n,destinationHrefs:r,currentDestination:o,prepareInitialFields:function(){n.value.text=t.commands.getSelectedText(),o.value.id=t.getAttributes("link").destination||vl.URL,r.value[o.value.id]=t.getAttributes("link").href||"",n.value.target=t.getAttributes("link").target||gl.SELF},updateTarget:function(t){n.value.target=t?gl.BLANK:gl.SELF},updateLink:function(t){r.value[o.value.id]=t},apply:function(){t.chain().focus().applyLink({href:r.value[o.value.id],text:n.value.text,target:n.value.target,destination:o.value.id}).run()},removeLink:function(){t.chain().focus().unsetLink().run()},updateText:function(t){n.value.text=t}}}(),s=function(){n.value=null,r.value=null},a=rc({onBeforeOpened:function(){return o.commands.extendMarkRange("link"),s(),void i.prepareInitialFields()},wrapperRef:t,modalRef:e}),l=(0,sl.computed)((function(){return a.isOpened.value||o.isActive("link")})),u=Ju({validations:[function(){return!i.linkData.value.text&&"Can't be empty"}],value:i.linkData.value.text}),c=Ju({validations:[function(){return"url"===i.currentDestination.value.id&&!/(^(https?:\/\/|\/)(?:www\.|(?!www))?[^\s])/.test(i.destinationHrefs.value.url)&&"Please enter a valid URL"}],value:i.linkData.value.text});return{wrapperRef:t,modalRef:e,link:i,toggler:a,isActive:l,nameValidator:u,urlValidator:c,nameError:n,resetErrors:s,applyLink:function(){r.value=c.validate(),n.value=u.validate(),r.value||n.value||(i.apply(),a.close())},removeLink:function(){i.removeLink(),a.close()}}}};var Wd=wl($d,Bd,[],!1,null,"64ef07e8",null);const qd=wl({name:"ToolbarFull",components:{ToolbarRow:kl,ToolbarGroup:El,ToolbarDivider:xl,StylePresetControl:Xc,CaseStyleControl:Dd,FontFamilyControl:rd,FontWeightControl:id,FontSizeControl:ld,FontColorControl:cd,BackgroundColorControl:pd,ItalicControl:fd,UnderlineControl:gd,SuperscriptControl:wd,StrikeThroughControl:yd,AlignmentControl:Cd,LineHeightControl:Ad,ListControl:Md,RemoveFormatControl:Nd,LinkControl:Wd.exports}},yl,[],!1,null,null,null).exports;var Ud=function(){var t=this,e=t._self._c;return e("ToolbarRow",[e("StylePresetControl"),t._v(" "),e("ToolbarDivider",{attrs:{vertical:""}}),t._v(" "),e("AlignmentDeviceControl"),t._v(" "),e("ToolbarDivider",{attrs:{vertical:""}}),t._v(" "),e("FontSizeControl"),t._v(" "),e("ToolbarDivider",{attrs:{vertical:""}}),t._v(" "),e("LineHeightControl")],1)};Ud._withStripped=!0;const Kd=wl({name:"ToolbarDevice",components:{ToolbarRow:kl,ToolbarDivider:xl,StylePresetControl:Xc,AlignmentDeviceControl:Sd,FontSizeControl:ld,LineHeightControl:Ad}},Ud,[],!1,null,null,null).exports,Gd=wl({name:"Toolbar",props:{device:{type:String,required:!0},toolbar:{type:Object,required:!0}},setup:function(t){var e=(0,sl.computed)((function(){return t.device===cl.DESKTOP?qd:Kd})),n=(0,sl.computed)((function(){return t.toolbar.isActiveRef.value})),r=(0,sl.ref)(null);return(0,sl.watch)(r,(function(e){e&&t.toolbar.mount(e)})),{toolbarComponent:e,isVisible:n,toolbarRef:r,toolbarStyles:(0,sl.computed)((function(){return{"--zw-toolbar-offset-y":"".concat(t.toolbar.offsets[1],"px")}}))}}},ul,[],!1,null,"84436334",null).exports;var Jd=ls.create({name:ml.FONT_FAMILY,addOptions:function(){return{fonts:[],defaultFont:""}},addAttributes:function(){return{value:{required:!0}}},addCommands:function(){var t=this;return{applyFontFamily:_l((function(e,n){var r=e.commands;r.setMark(t.name,{value:n});var o=r.findFontByName(n),i=r.getFontWeight().value;o.isWeightSupported(i)||(i=o.findClosestWeight(i),r.applyFontWeight(i)),o.isItalicSupported(i)||r.removeItalic()})),getFont:_l((function(t){var e=t.commands,n=e.getFontFamily();return(0,sl.computed)((function(){return e.findFontByName(n.value)}))})),findFontByName:_l((function(e,n){return t.options.fonts.find((function(t){return t.name===n}))})),getFontFamily:_l((function(e){var n=e.editor,r=e.commands.getDefaultFontFamily();return(0,sl.computed)((function(){var e,o;return null!==(e=null===(o=n.getAttributes(t.name))||void 0===o?void 0:o.value)&&void 0!==e?e:r.value}))})),getDefaultFontFamily:_l((function(t){var e=t.commands.getPreset();return(0,sl.computed)((function(){return e.value.common.font_family}))}))}},parseHTML:function(){var t=this,e=function(e){var n=e.replace(/"/g,"");return{value:t.options.fonts.some((function(t){return t.name===n}))?n:t.options.defaultFont}};return[{style:"--zw-font-family",getAttrs:e},{style:"font-family",getAttrs:e}]},renderHTML:function(t){var e=t.HTMLAttributes;return Vl({font_family:e.value?'"'.concat(e.value,'"'):null})}});const Zd=us.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map((t=>({tag:`h${t}`,attrs:{level:t}})))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,oi(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:t=>({commands:e})=>!!this.options.levels.includes(t.level)&&e.setNode(this.name,t),toggleHeading:t=>({commands:e})=>!!this.options.levels.includes(t.level)&&e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return this.options.levels.reduce(((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})})),{})},addInputRules(){return this.options.levels.map((t=>{return e={find:new RegExp(`^(#{1,${t}})\\s$`),type:this.type,getAttributes:{level:t}},new hi({find:e.find,handler:({state:t,range:n,match:r})=>{const o=t.doc.resolve(n.from),i=ai(e.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,i)}});var e}))}});function Yd(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Xd(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xd(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}function Xd(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Qd(t,e){return t.split(" ").map((function(t){return".".concat(t)})).join("")+e.id}var tp=xi.create({name:"style_preset",addExtensions:function(){return[Zd.configure({levels:[1,2,3,4],HTMLAttributes:{class:"zw-style"}})]},addStorage:function(){return{presetStyleEl:null}},addGlobalAttributes:function(){var t=this;return[{types:[hl.PARAGRAPH,hl.HEADING],attributes:{preset:{isRequired:!1,default:{id:this.options.defaultId},parseHTML:function(e){var n=t.options.presets;if("LI"===e.parentElement.tagName)return null;var r,o=Yd(n);try{for(o.s();!(r=o.n()).done;){var i=r.value,s=i.id,a=i.node,l=i.fallbackClass;if(l&&e.classList.contains(l))return{id:s};var u=Qd(t.options.baseClass,{id:s});if(e.matches(u))return{id:s};if(e.tagName==="H".concat(null==a?void 0:a.level))return{id:s}}}catch(t){o.e(t)}finally{o.f()}return"P"===e.tagName?{id:t.options.defaultId}:null},renderHTML:function(e){return e.preset?{class:t.options.baseClass+e.preset.id}:null}}}}]},addCommands:function(){var t=this;function e(t,e){return t.find((function(t){return e===t.id}))}return{getPresetList:_l((function(){return(0,sl.computed)((function(){return t.options.presets.filter((function(t){return!t.hidden}))}))})),getPreset:_l((function(n){var r=n.commands,o=r.getBlockAttributes("preset",{id:t.options.defaultId}),i=r.getPresetList();return(0,sl.computed)((function(){return e(i.value,o.value.id)}))})),applyPreset:_l((function(t,n){var r,o,i=t.commands,s=t.chain,a=e(i.getPresetList().value,n),l=null!==(r=null===(o=a.node)||void 0===o?void 0:o.type)&&void 0!==r?r:hl.PARAGRAPH,u={preset:{id:n}};a.node&&(u.level=a.node.level);var c,d=Yd(ml.attributes);try{for(d.s();!(c=d.n()).done;){var p=c.value;u[p]=i.getBlockAttributes(p).value}}catch(t){d.e(t)}finally{d.f()}s().removeList().setNode(l,u).run()})),applyDefaultPreset:_l((function(e){e.commands.applyPreset(t.options.defaultId)})),removePreset:_l((function(t){t.commands.setNode(hl.PARAGRAPH,{preset:null})})),getPresetCustomization:_l((function(t){var e=t.editor,n=(0,sl.toRef)(e,"state");return(0,sl.computed)((function(){var t=new Set,e=new Set,r=n.value.selection,o=r.from,i=r.to;return n.value.doc.nodesBetween(o,i,(function(n){for(var r=0,o=Object.entries(n.attrs);r<o.length;r++){var i=Ll(o[r],2),s=i[0],a=i[1];ml.attributes.includes(s)&&a&&t.add(s)}var l,u=Yd(n.marks);try{for(u.s();!(l=u.n()).done;){var c=l.value.type;ml.marks.includes(c.name)&&e.add(c.name)}}catch(t){u.e(t)}finally{u.f()}})),{attributes:Array.from(t),marks:Array.from(e)}}))})),removePresetCustomization:_l((function(t){(0,t.chain)().storeSelection().expandSelectionToBlock().unsetMarks(ml.marks).resetAttributes(hl.PARAGRAPH,ml.attributes).resetAttributes(hl.HEADING,ml.attributes).restoreSelection().run()})),removeFormat:_l((function(t){var e=t.commands;e.removePresetCustomization(),e.applyDefaultPreset()}))}},onCreate:function(){var t=Dc.document.querySelector("[data-zw-styles]");if(t)this.storage.presetStyleEl=t;else{this.storage.presetStyleEl=Dc.document.createElement("style"),this.storage.presetStyleEl.dataset.zwStyles="";var e,n=Yd(this.options.presets);try{for(n.s();!(e=n.n()).done;){var r,o=e.value,i=Qd(this.options.baseClass,o),s=[" ".concat(i," {")],a=Yd(cl.values);try{for(a.s();!(r=a.n()).done;)for(var l=r.value,u=0,c=Object.keys(o[l]);u<c.length;u++){var d=c[u],p=this.options.makeVariable({device:l,preset:o,property:d}),h=d.replace(/_/i,"-"),f=l===cl.COMMON?"preset":"preset-".concat(l);s.push("--zw-".concat(f,"-").concat(h,": var(").concat(p,", inherit);"))}}catch(t){a.e(t)}finally{a.f()}s.push("}"),this.storage.presetStyleEl.innerHTML+=s.join(" ")}}catch(t){n.e(t)}finally{n.f()}Dc.head.append(this.storage.presetStyleEl)}}}),ep=ls.create({name:ml.FONT_WEIGHT,addAttributes:function(){return{value:{required:!0}}},addCommands:function(){var t=this;return{applyFontWeight:_l((function(e,n){var r=e.commands;r.setMark(t.name,{value:n}),r.getFont().value.isItalicSupported(n)||r.removeItalic()})),toggleBold:_l((function(t){var e=t.commands,n=e.getFontWeight().value,r=e.getFont().value,o=Number(n)>=600?"400":"700",i=r.findClosestWeight(o);e.applyFontWeight(i)})),getFontWeight:_l((function(e){var n=e.editor,r=e.commands,o=r.getDefaultFontWeight(),i=r.getFont();return(0,sl.computed)((function(){var e,r,s=null!==(e=null===(r=n.getAttributes(t.name))||void 0===r?void 0:r.value)&&void 0!==e?e:o.value;return i.value.isWeightSupported(s)?s:i.value.findClosestWeight(s)}))})),getDefaultFontWeight:_l((function(t){var e=t.commands.getPreset();return(0,sl.computed)((function(){return e.value.common.font_weight}))}))}},addKeyboardShortcuts:function(){return{"Mod-b":Hl("toggleBold"),"Mod-B":Hl("toggleBold")}},parseHTML:function(){var t=function(t){return{value:t}};return[{style:"--zw-font-weight",getAttrs:t},{style:"font-weight",getAttrs:t},{tag:"b",attrs:{value:"700"}},{tag:"strong",attrs:{value:"700"}}]},renderHTML:function(t){return Vl({font_weight:t.HTMLAttributes.value})}}),np=ls.create({name:ml.FONT_SIZE,addOptions:function(){return{minSize:1,maxSize:100}},addAttributes:function(){return{mobile:{default:null},tablet:{default:null},desktop:{default:null}}},addCommands:function(){var t=this;return{getFontSize:_l((function(e){var n=e.editor,r=e.commands,o=r.getDevice(),i=r.getDefaultFontSize();return(0,sl.computed)((function(){var e,r;return null!==(e=null===(r=n.getAttributes(t.name))||void 0===r?void 0:r[o.value])&&void 0!==e?e:i.value}))})),getDefaultFontSize:_l((function(t){var e=t.commands,n=e.getDevice(),r=e.getPreset();return(0,sl.computed)((function(){return r.value[n.value].font_size.replace("px","")}))})),applyFontSize:_l((function(e,n){var r=e.commands,o=r.getDevice().value;r.setMark(t.name,Tl({},o,n))})),increaseFontSize:_l((function(e){var n=e.commands,r=Number(n.getFontSize().value),o=Math.min(r+1,t.options.maxSize);n.applyFontSize(String(o))})),decreaseFontSize:_l((function(e){var n=e.commands,r=Number(n.getFontSize().value),o=Math.max(r-1,t.options.minSize);n.applyFontSize(String(o))}))}},addKeyboardShortcuts:function(){return{"Mod-Shift-=":Hl("increaseFontSize"),"Mod-Shift--":Hl("decreaseFontSize")}},parseHTML:function(){var t=function(t){return t?String(parseInt(t)):null};return[{tag:'[style*="--zw-font-size"]',getAttrs:function(e){var n=e.style;return{mobile:t(n.getPropertyValue("--zw-font-size-mobile")),tablet:t(n.getPropertyValue("--zw-font-size-tablet")),desktop:t(n.getPropertyValue("--zw-font-size-desktop"))}}},{style:"font-size",getAttrs:function(e){var n=t(e);return{desktop:n,tablet:n,mobile:n}}}]},renderHTML:function(t){var e=t.HTMLAttributes,n=function(t){return t?"".concat(t,"px"):null};return Vl({font_size_mobile:n(e.mobile),font_size_tablet:n(e.tablet),font_size_desktop:n(e.desktop)})}}),rp=ls.create({name:ml.FONT_COLOR,addAttributes:function(){return{value:{required:!0}}},addCommands:function(){var t=this;return{getFontColor:_l((function(e){var n=e.commands,r=e.editor,o=n.getDefaultFontColor();return(0,sl.computed)((function(){var e,n;return null!==(e=null===(n=r.getAttributes(t.name))||void 0===n?void 0:n.value)&&void 0!==e?e:o.value}))})),getDefaultFontColor:_l((function(t){var e=t.commands.getPreset();return(0,sl.computed)((function(){return e.value.common.color}))})),applyFontColor:_l((function(e,n){e.commands.setMark(t.name,{value:n})}))}},parseHTML:function(){var t=function(t){return{value:Wl(t)}};return[{style:"--zw-font-color",getAttrs:t},{style:"color",getAttrs:t}]},renderHTML:function(t){return Vl({font_color:t.HTMLAttributes.value})}}),op=ls.create({name:ml.BACKGROUND_COLOR,addAttributes:function(){return{value:{required:!0}}},addCommands:function(){var t=this;return{getBackgroundColor:_l((function(e){var n=e.editor;return(0,sl.computed)((function(){var e,r;return null!==(e=null===(r=n.getAttributes(t.name))||void 0===r?void 0:r.value)&&void 0!==e?e:"rgba(255, 255, 255, 0%)"}))})),applyBackgroundColor:_l((function(e,n){e.commands.setMark(t.name,{value:n})}))}},parseHTML:function(){var t=function(t){return{value:Wl(t)}};return[{style:"--zw-background-color",getAttrs:t},{style:"background-color",getAttrs:t}]},renderHTML:function(t){return Vl({background_color:t.HTMLAttributes.value})}}),ip=xi.create({name:"device_manager",addCommands:function(){var t=this;return{getDevice:_l((function(){return(0,sl.toRef)(t.options,"device")}))}}}),sp=ls.create({name:ml.FONT_STYLE,addAttributes:function(){return{italic:{required:!0}}},addCommands:function(){var t=this;return{isItalic:_l((function(e){var n=e.editor,r=e.commands.getDefaultFontStyle();return(0,sl.computed)((function(){var e,o;return null!==(e=null===(o=n.getAttributes(t.name))||void 0===o?void 0:o.italic)&&void 0!==e?e:r.value.italic}))})),isItalicAvailable:_l((function(t){var e=t.commands,n=e.getFont(),r=e.getFontWeight();return(0,sl.computed)((function(){return n.value.isItalicSupported(r.value)}))})),getDefaultFontStyle:_l((function(t){var e=t.commands.getPreset();return(0,sl.computed)((function(){return{italic:"italic"===e.value.common.font_style}}))})),toggleItalic:_l((function(e){var n=e.commands;t.editor.commands.isItalicAvailable().value&&(n.isItalic().value?n.removeItalic():n.applyItalic())})),applyItalic:_l((function(e){e.commands.setMark(t.name,{italic:!0})})),removeItalic:_l((function(e){e.commands.unsetMark(t.name)}))}},addKeyboardShortcuts:function(){return{"Mod-i":Hl("toggleItalic"),"Mod-I":Hl("toggleItalic")}},parseHTML:function(){var t=function(t){return t.includes("italic")&&{italic:!0}};return[{style:"--zw-font-style",getAttrs:t},{style:"font-style",getAttrs:t},{tag:"i",attrs:{italic:!0}}]},renderHTML:function(t){return Vl({font_style:t.HTMLAttributes.italic?"italic":null})}});function ap(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function lp(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ap(Object(n),!0).forEach((function(e){Tl(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ap(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var up=ls.create({name:ml.TEXT_DECORATION,addAttributes:function(){return{underline:{default:!1},strike_through:{default:!1}}},addCommands:function(){var t=this;return{isUnderline:_l((function(t){var e=t.commands,n=t.editor,r=e.getTextDecoration();return(0,sl.computed)((function(){return n.isActive("link")||r.value.underline}))})),isStrikeThrough:_l((function(t){var e=t.commands.getTextDecoration();return(0,sl.computed)((function(){return e.value.strike_through}))})),getTextDecoration:_l((function(e){var n=e.editor,r=e.commands.getDefaultTextDecoration();return(0,sl.computed)((function(){var e,o,i,s=null!==(e=n.getAttributes(t.name))&&void 0!==e?e:{};return{underline:null!==(o=s.underline)&&void 0!==o?o:r.value.underline,strike_through:null!==(i=s.strike_through)&&void 0!==i?i:r.value.strike_through}}))})),getDefaultTextDecoration:_l((function(t){var e=t.commands.getPreset();return(0,sl.computed)((function(){var t=e.value.common.text_decoration;return{underline:t.includes("underline"),strike_through:t.includes("line-through")}}))})),toggleUnderline:_l((function(t){var e=t.commands;t.editor.isActive("link")||e.toggleTextDecoration("underline")})),toggleStrikeThrough:_l((function(t){t.commands.toggleTextDecoration("strike_through")})),toggleTextDecoration:_l((function(t,e){var n=t.commands;n.getTextDecoration().value[e]?n.removeTextDecoration(e):n.applyTextDecoration(e)})),applyTextDecoration:_l((function(e,n){e.commands.setMark(t.name,Tl({},n,!0))})),removeTextDecoration:_l((function(e,n){var r=e.commands,o=lp(lp({},r.getTextDecoration().value),{},Tl({},n,!1));o.underline||o.strike_through?r.setMark(t.name,o):r.unsetMark(t.name)}))}},addKeyboardShortcuts:function(){return{"Mod-u":Hl("toggleUnderline"),"Mod-U":Hl("toggleUnderline")}},parseHTML:function(){var t=function(t){var e=t.includes("underline"),n=t.includes("line-through");return!(!e&&!n)&&{underline:e,strike_through:n}};return[{style:"--zw-text-decoration",getAttrs:t},{style:"text-decoration-line",getAttrs:t}]},renderHTML:function(t){var e=t.HTMLAttributes,n=[];return e.underline&&n.push("underline"),e.strike_through&&n.push("line-through"),Vl({text_decoration:n.join(" ")})}}),cp=xi.create({name:"case_style",addCommands:function(){return{applyCaseStyle:_l((function(t,e){var n=t.commands;switch(e){case dl.CAPITALIZE:return n.applyCapitalize();case dl.LOWERCASE:return n.applyLowerCase();case dl.UPPERCASE:return n.applyUpperCase()}})),applyCapitalize:_l((function(t){t.commands.transformText((function(t){return t.text.toLowerCase().replace(/(?:^|\s)\S/g,(function(t){return t.toUpperCase()}))}))})),applyLowerCase:_l((function(t){t.commands.transformText((function(t){return t.text.toLowerCase()}))})),applyUpperCase:_l((function(t){t.commands.transformText((function(t){return t.text.toUpperCase()}))}))}}}),dp={mobile:null,tablet:null,desktop:null},pp=xi.create({name:ml.ALIGNMENT,addGlobalAttributes:function(){return[{types:[hl.PARAGRAPH,hl.HEADING],attributes:Tl({},ml.ALIGNMENT,{isRequired:!1,parseHTML:function(t){var e=t.style;if(e.textAlign)return{desktop:e.textAlign,tablet:e.textAlign,mobile:e.textAlign};var n=e.getPropertyValue("--zw-text-align-mobile")||null,r=e.getPropertyValue("--zw-text-align-tablet")||null,o=e.getPropertyValue("--zw-text-align-desktop")||null;return n||r||o?{desktop:o,tablet:r,mobile:n}:null},renderHTML:function(t){return t.alignment?jl({text_align_mobile:t.alignment.mobile,text_align_tablet:t.alignment.tablet,text_align_desktop:t.alignment.desktop}):null}})}]},addCommands:function(){var t=this;return{applyAlignment:_l((function(e,n){var r=e.commands,o=r.getDevice().value;r.setBlockAttributes(t.name,Tl({},o,n),dp)})),getAlignment:_l((function(e){var n=e.commands,r=n.getBlockAttributes(t.name,dp),o=n.getDevice(),i=n.getDefaultAlignment();return(0,sl.computed)((function(){var t,e;return null!==(t=null===(e=r.value)||void 0===e?void 0:e[o.value])&&void 0!==t?t:i.value}))})),getDefaultAlignment:_l((function(t){var e=t.commands,n=e.getDevice(),r=e.getPreset();return(0,sl.computed)((function(){return r.value[n.value].alignment}))}))}},addKeyboardShortcuts:function(){return{"Mod-Shift-l":Hl("applyAlignment",pl.LEFT),"Mod-Shift-e":Hl("applyAlignment",pl.CENTER),"Mod-Shift-r":Hl("applyAlignment",pl.RIGHT),"Mod-Shift-j":Hl("applyAlignment",pl.JUSTIFY)}}}),hp={mobile:null,tablet:null,desktop:null},fp=xi.create({name:ml.LINE_HEIGHT,addGlobalAttributes:function(){return[{types:[hl.PARAGRAPH,hl.HEADING],attributes:Tl({},ml.LINE_HEIGHT,{isRequired:!1,parseHTML:function(t){if(t.matches('[style*="--zw-line-height"]'))return{mobile:t.style.getPropertyValue("--zw-line-height-mobile")||null,tablet:t.style.getPropertyValue("--zw-line-height-tablet")||null,desktop:t.style.getPropertyValue("--zw-line-height-desktop")||null};var e=t.style.lineHeight;if(!e)return null;if(!e.includes("px"))return{desktop:e,tablet:e,mobile:e};var n=t.firstElementChild.style.fontSize||Dc.getComputedStyle(Dc.body).fontSize,r=(parseFloat(e)/parseFloat(n)).toFixed(2);return{desktop:r,tablet:r,mobile:r}},renderHTML:function(t){return t.line_height?jl({line_height_mobile:t.line_height.mobile,line_height_tablet:t.line_height.tablet,line_height_desktop:t.line_height.desktop}):null}})}]},addCommands:function(){var t=this;return{getLineHeight:_l((function(e){var n=e.commands,r=n.getBlockAttributes(t.name,hp),o=n.getDevice(),i=n.getDefaultLineHeight();return(0,sl.computed)((function(){var t,e;return null!==(t=null===(e=r.value)||void 0===e?void 0:e[o.value])&&void 0!==t?t:i.value}))})),getDefaultLineHeight:_l((function(t){var e=t.commands,n=e.getDevice(),r=e.getPreset();return(0,sl.computed)((function(){return r.value[n.value].line_height}))})),applyLineHeight:_l((function(e,n){var r=e.commands,o=r.getDevice().value;r.setBlockAttributes(t.name,Tl({},o,n),hp)}))}}}),mp=us.create({name:"listItem",addOptions:()=>({HTMLAttributes:{}}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:t}){return["li",oi(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}).extend({name:hl.LIST_ITEM,addKeyboardShortcuts:function(){return{Enter:this.parent().Enter}}});function gp(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var vp=us.create({name:hl.LIST,content:"".concat(hl.LIST_ITEM,"+"),group:"block list",addExtensions:function(){return[mp]},addOptions:function(){return{baseClass:""}},addAttributes:function(){return{bullet:{isRequired:!0}}},parseHTML:function(){var t=this,e={a:fl.ROMAN,i:fl.LATIN,1:fl.DECIMAL},n=function(n){var r,o=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return gp(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gp(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}(fl.values);try{for(o.s();!(r=o.n()).done;){var i=r.value,s=".".concat(t.options.baseClass).concat(i);if(n.matches(s))return i;if(e[n.type.toLowerCase()]===i)return i}}catch(t){o.e(t)}finally{o.f()}};return[{tag:"ol",getAttrs:function(t){return{bullet:{type:n(t)||fl.DECIMAL}}}},{tag:"ul",getAttrs:function(t){return{bullet:{type:n(t)||fl.DISC}}}}]},renderHTML:function(t){var e=t.HTMLAttributes;return[fl.ordered.includes(e.bullet.type)?"ol":"ul",{class:this.options.baseClass+e.bullet.type},0]},addCommands:function(){return{getListType:_l((function(t){var e=t.commands.getBlockAttributes("bullet",{type:null});return(0,sl.computed)((function(){var t;return null!==(t=e.value.type)&&void 0!==t?t:null}))})),applyList:_l((function(t,e){var n=t.commands,r=t.chain;if(n.getListType().value!==e)return r().removeList()._addList(e).run();n.applyDefaultPreset()})),_addList:_l((function(t,e){return(0,t.chain)().removePreset().toggleList(hl.LIST,hl.LIST_ITEM).setBlockAttributes("bullet",{type:e}).run()})),removeList:_l((function(t){t.commands.liftListItem(hl.LIST_ITEM)}))}},addInputRules:function(){var t=this,e=function(e,n){return r={find:n,type:t.type,getAttributes:{bullet:{type:e}},joinPredicate:function(t,n){return n.attrs.bullet.type===e}},new hi({find:r.find,handler:({state:t,range:e,match:n})=>{const o=ai(r.getAttributes,void 0,n)||{},i=t.tr.delete(e.from,e.to),s=i.doc.resolve(e.from).blockRange(),a=s&&St(s,r.type,o);if(!a)return null;i.wrap(s,a);const l=i.doc.resolve(e.from-1).nodeBefore;l&&l.type===r.type&&Tt(i.doc,e.from-1)&&(!r.joinPredicate||r.joinPredicate(n,l))&&i.join(e.from-1)}});var r};return[e(fl.DISC,/^\s*([-+*])\s$/),e(fl.DECIMAL,/^(\d+)\.\s$/),e(fl.LATIN,/^([ivx]{1,3})\.\s$/i),e(fl.ROMAN,/^([a-z])\.\s$/i)]}});function yp(t){this.j={},this.jr=[],this.jd=null,this.t=t}yp.prototype={accepts:function(){return!!this.t},tt:function(t,e){if(e&&e.j)return this.j[t]=e,e;var n=e,r=this.j[t];if(r)return n&&(r.t=n),r;r=bp();var o=kp(this,t);return o?(Object.assign(r.j,o.j),r.jr.append(o.jr),r.jr=o.jd,r.t=n||o.t):r.t=n,this.j[t]=r,r}};var bp=function(){return new yp},wp=function(t){return new yp(t)},xp=function(t,e,n){t.j[e]||(t.j[e]=n)},Dp=function(t,e,n){t.jr.push([e,n])},kp=function(t,e){var n=t.j[e];if(n)return n;for(var r=0;r<t.jr.length;r++){var o=t.jr[r][0],i=t.jr[r][1];if(o.test(e))return i}return t.jd},Cp=function(t,e,n){for(var r=0;r<e.length;r++)xp(t,e[r],n)},Ep=function(t,e){for(var n=0;n<e.length;n++){var r=e[n][0],o=e[n][1];xp(t,r,o)}},Sp=function(t,e,n,r){for(var o,i=0,s=e.length;i<s&&(o=t.j[e[i]]);)t=o,i++;if(i>=s)return[];for(;i<s-1;)o=r(),xp(t,e[i],o),t=o,i++;xp(t,e[s-1],n)},Op="DOMAIN",Ap="LOCALHOST",Tp="TLD",Mp="NUM",Fp="PROTOCOL",Np="MAILTO",Bp="WS",_p="NL",Rp="OPENBRACE",zp="OPENBRACKET",Lp="OPENANGLEBRACKET",Ip="OPENPAREN",Pp="CLOSEBRACE",jp="CLOSEBRACKET",Vp="CLOSEANGLEBRACKET",Hp="CLOSEPAREN",$p="AMPERSAND",Wp="APOSTROPHE",qp="ASTERISK",Up="AT",Kp="BACKSLASH",Gp="BACKTICK",Jp="CARET",Zp="COLON",Yp="COMMA",Xp="DOLLAR",Qp="DOT",th="EQUALS",eh="EXCLAMATION",nh="HYPHEN",rh="PERCENT",oh="PIPE",ih="PLUS",sh="POUND",ah="QUERY",lh="QUOTE",uh="SEMI",ch="SLASH",dh="TILDE",ph="UNDERSCORE",hh="SYM",fh=Object.freeze({__proto__:null,DOMAIN:Op,LOCALHOST:Ap,TLD:Tp,NUM:Mp,PROTOCOL:Fp,MAILTO:Np,WS:Bp,NL:_p,OPENBRACE:Rp,OPENBRACKET:zp,OPENANGLEBRACKET:Lp,OPENPAREN:Ip,CLOSEBRACE:Pp,CLOSEBRACKET:jp,CLOSEANGLEBRACKET:Vp,CLOSEPAREN:Hp,AMPERSAND:$p,APOSTROPHE:Wp,ASTERISK:qp,AT:Up,BACKSLASH:Kp,BACKTICK:Gp,CARET:Jp,COLON:Zp,COMMA:Yp,DOLLAR:Xp,DOT:Qp,EQUALS:th,EXCLAMATION:eh,HYPHEN:nh,PERCENT:rh,PIPE:oh,PLUS:ih,POUND:sh,QUERY:ah,QUOTE:lh,SEMI:uh,SLASH:ch,TILDE:dh,UNDERSCORE:ph,SYM:hh}),mh="aaa aarp abarth abb abbott abbvie abc able abogado abudhabi ac academy accenture accountant accountants aco actor ad adac ads adult ae aeg aero aetna af afamilycompany afl africa ag agakhan agency ai aig airbus airforce airtel akdn al alfaromeo alibaba alipay allfinanz allstate ally alsace alstom am amazon americanexpress americanfamily amex amfam amica amsterdam analytics android anquan anz ao aol apartments app apple aq aquarelle ar arab aramco archi army arpa art arte as asda asia associates at athleta attorney au auction audi audible audio auspost author auto autos avianca aw aws ax axa az azure ba baby baidu banamex bananarepublic band bank bar barcelona barclaycard barclays barefoot bargains baseball basketball bauhaus bayern bb bbc bbt bbva bcg bcn bd be beats beauty beer bentley berlin best bestbuy bet bf bg bh bharti bi bible bid bike bing bingo bio biz bj black blackfriday blockbuster blog bloomberg blue bm bms bmw bn bnpparibas bo boats boehringer bofa bom bond boo book booking bosch bostik boston bot boutique box br bradesco bridgestone broadway broker brother brussels bs bt budapest bugatti build builders business buy buzz bv bw by bz bzh ca cab cafe cal call calvinklein cam camera camp cancerresearch canon capetown capital capitalone car caravan cards care career careers cars casa case cash casino cat catering catholic cba cbn cbre cbs cc cd center ceo cern cf cfa cfd cg ch chanel channel charity chase chat cheap chintai christmas chrome church ci cipriani circle cisco citadel citi citic city cityeats ck cl claims cleaning click clinic clinique clothing cloud club clubmed cm cn co coach codes coffee college cologne com comcast commbank community company compare computer comsec condos construction consulting contact contractors cooking cookingchannel cool coop corsica country coupon coupons courses cpa cr credit creditcard creditunion cricket crown crs cruise cruises csc cu cuisinella cv cw cx cy cymru cyou cz dabur dad dance data date dating datsun day dclk dds de deal dealer deals degree delivery dell deloitte delta democrat dental dentist desi design dev dhl diamonds diet digital direct directory discount discover dish diy dj dk dm dnp do docs doctor dog domains dot download drive dtv dubai duck dunlop dupont durban dvag dvr dz earth eat ec eco edeka edu education ee eg email emerck energy engineer engineering enterprises epson equipment er ericsson erni es esq estate et etisalat eu eurovision eus events exchange expert exposed express extraspace fage fail fairwinds faith family fan fans farm farmers fashion fast fedex feedback ferrari ferrero fi fiat fidelity fido film final finance financial fire firestone firmdale fish fishing fit fitness fj fk flickr flights flir florist flowers fly fm fo foo food foodnetwork football ford forex forsale forum foundation fox fr free fresenius frl frogans frontdoor frontier ftr fujitsu fujixerox fun fund furniture futbol fyi ga gal gallery gallo gallup game games gap garden gay gb gbiz gd gdn ge gea gent genting george gf gg ggee gh gi gift gifts gives giving gl glade glass gle global globo gm gmail gmbh gmo gmx gn godaddy gold goldpoint golf goo goodyear goog google gop got gov gp gq gr grainger graphics gratis green gripe grocery group gs gt gu guardian gucci guge guide guitars guru gw gy hair hamburg hangout haus hbo hdfc hdfcbank health healthcare help helsinki here hermes hgtv hiphop hisamitsu hitachi hiv hk hkt hm hn hockey holdings holiday homedepot homegoods homes homesense honda horse hospital host hosting hot hoteles hotels hotmail house how hr hsbc ht hu hughes hyatt hyundai ibm icbc ice icu id ie ieee ifm ikano il im imamat imdb immo immobilien in inc industries infiniti info ing ink institute insurance insure int international intuit investments io ipiranga iq ir irish is ismaili ist istanbul it itau itv iveco jaguar java jcb je jeep jetzt jewelry jio jll jm jmp jnj jo jobs joburg jot joy jp jpmorgan jprs juegos juniper kaufen kddi ke kerryhotels kerrylogistics kerryproperties kfh kg kh ki kia kim kinder kindle kitchen kiwi km kn koeln komatsu kosher kp kpmg kpn kr krd kred kuokgroup kw ky kyoto kz la lacaixa lamborghini lamer lancaster lancia land landrover lanxess lasalle lat latino latrobe law lawyer lb lc lds lease leclerc lefrak legal lego lexus lgbt li lidl life lifeinsurance lifestyle lighting like lilly limited limo lincoln linde link lipsy live living lixil lk llc llp loan loans locker locus loft lol london lotte lotto love lpl lplfinancial lr ls lt ltd ltda lu lundbeck luxe luxury lv ly ma macys madrid maif maison makeup man management mango map market marketing markets marriott marshalls maserati mattel mba mc mckinsey md me med media meet melbourne meme memorial men menu merckmsd mg mh miami microsoft mil mini mint mit mitsubishi mk ml mlb mls mm mma mn mo mobi mobile moda moe moi mom monash money monster mormon mortgage moscow moto motorcycles mov movie mp mq mr ms msd mt mtn mtr mu museum mutual mv mw mx my mz na nab nagoya name nationwide natura navy nba nc ne nec net netbank netflix network neustar new news next nextdirect nexus nf nfl ng ngo nhk ni nico nike nikon ninja nissan nissay nl no nokia northwesternmutual norton now nowruz nowtv np nr nra nrw ntt nu nyc nz obi observer off office okinawa olayan olayangroup oldnavy ollo om omega one ong onl online onyourside ooo open oracle orange org organic origins osaka otsuka ott ovh pa page panasonic paris pars partners parts party passagens pay pccw pe pet pf pfizer pg ph pharmacy phd philips phone photo photography photos physio pics pictet pictures pid pin ping pink pioneer pizza pk pl place play playstation plumbing plus pm pn pnc pohl poker politie porn post pr pramerica praxi press prime pro prod productions prof progressive promo properties property protection pru prudential ps pt pub pw pwc py qa qpon quebec quest qvc racing radio raid re read realestate realtor realty recipes red redstone redumbrella rehab reise reisen reit reliance ren rent rentals repair report republican rest restaurant review reviews rexroth rich richardli ricoh ril rio rip rmit ro rocher rocks rodeo rogers room rs rsvp ru rugby ruhr run rw rwe ryukyu sa saarland safe safety sakura sale salon samsclub samsung sandvik sandvikcoromant sanofi sap sarl sas save saxo sb sbi sbs sc sca scb schaeffler schmidt scholarships school schule schwarz science scjohnson scot sd se search seat secure security seek select sener services ses seven sew sex sexy sfr sg sh shangrila sharp shaw shell shia shiksha shoes shop shopping shouji show showtime si silk sina singles site sj sk ski skin sky skype sl sling sm smart smile sn sncf so soccer social softbank software sohu solar solutions song sony soy spa space sport spot spreadbetting sr srl ss st stada staples star statebank statefarm stc stcgroup stockholm storage store stream studio study style su sucks supplies supply support surf surgery suzuki sv swatch swiftcover swiss sx sy sydney systems sz tab taipei talk taobao target tatamotors tatar tattoo tax taxi tc tci td tdk team tech technology tel temasek tennis teva tf tg th thd theater theatre tiaa tickets tienda tiffany tips tires tirol tj tjmaxx tjx tk tkmaxx tl tm tmall tn to today tokyo tools top toray toshiba total tours town toyota toys tr trade trading training travel travelchannel travelers travelersinsurance trust trv tt tube tui tunes tushu tv tvs tw tz ua ubank ubs ug uk unicom university uno uol ups us uy uz va vacations vana vanguard vc ve vegas ventures verisign versicherung vet vg vi viajes video vig viking villas vin vip virgin visa vision viva vivo vlaanderen vn vodka volkswagen volvo vote voting voto voyage vu vuelos wales walmart walter wang wanggou watch watches weather weatherchannel webcam weber website wed wedding weibo weir wf whoswho wien wiki williamhill win windows wine winners wme wolterskluwer woodside work works world wow ws wtc wtf xbox xerox xfinity xihuan xin xxx xyz yachts yahoo yamaxun yandex ye yodobashi yoga yokohama you youtube yt yun za zappos zara zero zip zm zone zuerich zw vermögensberater-ctb vermögensberatung-pwb ελ ευ бг бел дети ею католик ком қаз мкд мон москва онлайн орг рус рф сайт срб укр გე հայ ישראל קום ابوظبي اتصالات ارامكو الاردن البحرين الجزائر السعودية العليان المغرب امارات ایران بارت بازار بھارت بيتك پاکستان ڀارت تونس سودان سورية شبكة عراق عرب عمان فلسطين قطر كاثوليك كوم مصر مليسيا موريتانيا موقع همراه कॉम नेट भारत भारतम् भारोत संगठन বাংলা ভারত ভাৰত ਭਾਰਤ ભારત ଭାରତ இந்தியா இலங்கை சிங்கப்பூர் భారత్ ಭಾರತ ഭാരതം ලංකා คอม ไทย ລາວ 닷넷 닷컴 삼성 한국 アマゾン グーグル クラウド コム ストア セール ファッション ポイント みんな 世界 中信 中国 中國 中文网 亚马逊 企业 佛山 信息 健康 八卦 公司 公益 台湾 台灣 商城 商店 商标 嘉里 嘉里大酒店 在线 大众汽车 大拿 天主教 娱乐 家電 广东 微博 慈善 我爱你 手机 招聘 政务 政府 新加坡 新闻 时尚 書籍 机构 淡马锡 游戏 澳門 点看 移动 组织机构 网址 网店 网站 网络 联通 诺基亚 谷歌 购物 通販 集团 電訊盈科 飞利浦 食品 餐厅 香格里拉 香港".split(" "),gh=/(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/,vh=/(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEDD-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDDFF\uDE70-\uDE74\uDE78-\uDE7C\uDE80-\uDE86\uDE90-\uDEAC\uDEB0-\uDEBA\uDEC0-\uDEC5\uDED0-\uDED9\uDEE0-\uDEE7\uDEF0-\uDEF6])/,yh=/\uFE0F/,bh=/\d/,wh=/\s/;function xh(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=bp(),n=wp(Mp),r=wp(Op),o=bp(),i=wp(Bp),s=[[bh,r],[gh,r],[vh,r],[yh,r]],a=function(){var t=wp(Op);return t.j={"-":o},t.jr=[].concat(s),t},l=function(t){var e=a();return e.t=t,e};Ep(e,[["'",wp(Wp)],["{",wp(Rp)],["[",wp(zp)],["<",wp(Lp)],["(",wp(Ip)],["}",wp(Pp)],["]",wp(jp)],[">",wp(Vp)],[")",wp(Hp)],["&",wp($p)],["*",wp(qp)],["@",wp(Up)],["`",wp(Gp)],["^",wp(Jp)],[":",wp(Zp)],[",",wp(Yp)],["$",wp(Xp)],[".",wp(Qp)],["=",wp(th)],["!",wp(eh)],["-",wp(nh)],["%",wp(rh)],["|",wp(oh)],["+",wp(ih)],["#",wp(sh)],["?",wp(ah)],['"',wp(lh)],["/",wp(ch)],[";",wp(uh)],["~",wp(dh)],["_",wp(ph)],["\\",wp(Kp)]]),xp(e,"\n",wp(_p)),Dp(e,wh,i),xp(i,"\n",bp()),Dp(i,wh,i);for(var u=0;u<mh.length;u++)Sp(e,mh[u],l(Tp),a);var c=a(),d=a(),p=a(),h=a();Sp(e,"file",c,a),Sp(e,"ftp",d,a),Sp(e,"http",p,a),Sp(e,"mailto",h,a);var f=a(),m=wp(Fp),g=wp(Np);xp(d,"s",f),xp(d,":",m),xp(p,"s",f),xp(p,":",m),xp(c,":",m),xp(f,":",m),xp(h,":",g);for(var v=a(),y=0;y<t.length;y++)Sp(e,t[y],v,a);return xp(v,":",m),Sp(e,"localhost",l(Ap),a),Dp(e,bh,n),Dp(e,gh,r),Dp(e,vh,r),Dp(e,yh,r),Dp(n,bh,n),Dp(n,gh,r),Dp(n,vh,r),Dp(n,yh,r),xp(n,"-",o),xp(r,"-",o),xp(o,"-",o),Dp(r,bh,r),Dp(r,gh,r),Dp(r,vh,r),Dp(r,yh,r),Dp(o,bh,r),Dp(o,gh,r),Dp(o,vh,r),Dp(o,yh,r),e.jd=wp(hh),e}var Dh={defaultProtocol:"http",events:null,format:kh,formatHref:kh,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:0,className:null,attributes:null,ignoreTags:[]};function kh(t){return t}function Ch(){}function Eh(t,e){function n(e,n){this.t=t,this.v=e,this.tk=n}return function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Object.create(t.prototype);for(var o in n)r[o]=n[o];r.constructor=e,e.prototype=r}(Ch,n,e),n}Ch.prototype={t:"token",isLink:!1,toString:function(){return this.v},toHref:function(){return this.toString()},startIndex:function(){return this.tk[0].s},endIndex:function(){return this.tk[this.tk.length-1].e},toObject:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Dh.defaultProtocol;return{type:this.t,value:this.v,isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}}};var Sh=Eh("email",{isLink:!0}),Oh=Eh("email",{isLink:!0,toHref:function(){return"mailto:"+this.toString()}}),Ah=Eh("text"),Th=Eh("nl"),Mh=Eh("url",{isLink:!0,toHref:function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Dh.defaultProtocol,e=this.tk,n=!1,r=!1,o=[],i=0;e[i].t===Fp;)n=!0,o.push(e[i].v),i++;for(;e[i].t===ch;)r=!0,o.push(e[i].v),i++;for(;i<e.length;i++)o.push(e[i].v);return o=o.join(""),n||r||(o="".concat(t,"://").concat(o)),o},hasProtocol:function(){return this.tk[0].t===Fp}}),Fh=Object.freeze({__proto__:null,MultiToken:Ch,Base:Ch,createTokenClass:Eh,MailtoEmail:Sh,Email:Oh,Text:Ah,Nl:Th,Url:Mh});function Nh(){var t=bp(),e=bp(),n=bp(),r=bp(),o=bp(),i=bp(),s=bp(),a=wp(Mh),l=bp(),u=wp(Mh),c=wp(Mh),d=bp(),p=bp(),h=bp(),f=bp(),m=bp(),g=wp(Mh),v=wp(Mh),y=wp(Mh),b=wp(Mh),w=bp(),x=bp(),D=bp(),k=bp(),C=bp(),E=bp(),S=wp(Oh),O=bp(),A=wp(Oh),T=wp(Sh),M=bp(),F=bp(),N=bp(),B=bp(),_=wp(Th);xp(t,_p,_),xp(t,Fp,e),xp(t,Np,n),xp(e,ch,r),xp(r,ch,o),xp(t,Tp,i),xp(t,Op,i),xp(t,Ap,a),xp(t,Mp,i),xp(o,Tp,c),xp(o,Op,c),xp(o,Mp,c),xp(o,Ap,c),xp(i,Qp,s),xp(C,Qp,E),xp(s,Tp,a),xp(s,Op,i),xp(s,Mp,i),xp(s,Ap,i),xp(E,Tp,S),xp(E,Op,C),xp(E,Mp,C),xp(E,Ap,C),xp(a,Qp,s),xp(S,Qp,E),xp(a,Zp,l),xp(a,ch,c),xp(l,Mp,u),xp(u,ch,c),xp(S,Zp,O),xp(O,Mp,A);var R=[$p,qp,Up,Kp,Gp,Jp,Xp,Op,th,nh,Ap,Mp,rh,oh,ih,sh,Fp,ch,hh,dh,Tp,ph],z=[Wp,Vp,Pp,jp,Hp,Zp,Yp,Qp,eh,Lp,Rp,zp,Ip,ah,lh,uh];xp(c,Rp,p),xp(c,zp,h),xp(c,Lp,f),xp(c,Ip,m),xp(d,Rp,p),xp(d,zp,h),xp(d,Lp,f),xp(d,Ip,m),xp(p,Pp,c),xp(h,jp,c),xp(f,Vp,c),xp(m,Hp,c),xp(g,Pp,c),xp(v,jp,c),xp(y,Vp,c),xp(b,Hp,c),xp(w,Pp,c),xp(x,jp,c),xp(D,Vp,c),xp(k,Hp,c),Cp(p,R,g),Cp(h,R,v),Cp(f,R,y),Cp(m,R,b),Cp(p,z,w),Cp(h,z,x),Cp(f,z,D),Cp(m,z,k),Cp(g,R,g),Cp(v,R,v),Cp(y,R,y),Cp(b,R,b),Cp(g,z,g),Cp(v,z,v),Cp(y,z,y),Cp(b,z,b),Cp(w,R,g),Cp(x,R,v),Cp(D,R,y),Cp(k,R,b),Cp(w,z,w),Cp(x,z,x),Cp(D,z,D),Cp(k,z,k),Cp(c,R,c),Cp(d,R,c),Cp(c,z,d),Cp(d,z,d),xp(n,Tp,T),xp(n,Op,T),xp(n,Mp,T),xp(n,Ap,T),Cp(T,R,T),Cp(T,z,M),Cp(M,R,T),Cp(M,z,M);var L=[$p,Wp,qp,Kp,Gp,Jp,Pp,Xp,Op,th,nh,Mp,Rp,rh,oh,ih,sh,ah,ch,hh,dh,Tp,ph];return Cp(i,L,F),xp(i,Up,N),Cp(a,L,F),xp(a,Up,N),Cp(s,L,F),Cp(F,L,F),xp(F,Up,N),xp(F,Qp,B),Cp(B,L,F),xp(N,Tp,C),xp(N,Op,C),xp(N,Mp,C),xp(N,Ap,S),t}function Bh(t,e,n){var r=n[0].s,o=n[n.length-1].e;return new t(e.substr(r,o-r),n)}var _h="undefined"!=typeof console&&console&&console.warn||function(){},Rh={scanner:null,parser:null,pluginQueue:[],customProtocols:[],initialized:!1};function zh(t){if(Rh.initialized&&_h('linkifyjs: already initialized - will not register custom protocol "'.concat(t,'" until you manually call linkify.init(). To avoid this warning, please register all custom protocols before invoking linkify the first time.')),!/^[a-z-]+$/.test(t))throw Error("linkifyjs: protocols containing characters other than a-z or - (hyphen) are not supported");Rh.customProtocols.push(t)}function Lh(t){return Rh.initialized||function(){Rh.scanner={start:xh(Rh.customProtocols),tokens:fh},Rh.parser={start:Nh(),tokens:Fh};for(var t={createTokenClass:Eh},e=0;e<Rh.pluginQueue.length;e++)Rh.pluginQueue[e][1]({scanner:Rh.scanner,parser:Rh.parser,utils:t});Rh.initialized=!0}(),function(t,e,n){for(var r=n.length,o=0,i=[],s=[];o<r;){for(var a=t,l=null,u=null,c=0,d=null,p=-1;o<r&&!(l=kp(a,n[o].t));)s.push(n[o++]);for(;o<r&&(u=l||kp(a,n[o].t));)l=null,(a=u).accepts()?(p=0,d=a):p>=0&&p++,o++,c++;if(p<0)for(var h=o-c;h<o;h++)s.push(n[h]);else{s.length>0&&(i.push(Bh(Ah,e,s)),s=[]),o-=p,c-=p;var f=d.t,m=n.slice(o-c,o);i.push(Bh(f,e,m))}}return s.length>0&&i.push(Bh(Ah,e,s)),i}(Rh.parser.start,t,function(t,e){for(var n=function(t){for(var e=[],n=t.length,r=0;r<n;){var o=t.charCodeAt(r),i=void 0,s=o<55296||o>56319||r+1===n||(i=t.charCodeAt(r+1))<56320||i>57343?t[r]:t.slice(r,r+2);e.push(s),r+=s.length}return e}(e.replace(/[A-Z]/g,(function(t){return t.toLowerCase()}))),r=n.length,o=[],i=0,s=0;s<r;){for(var a=t,l=null,u=0,c=null,d=-1,p=-1;s<r&&(l=kp(a,n[s]));)(a=l).accepts()?(d=0,p=0,c=a):d>=0&&(d+=n[s].length,p++),u+=n[s].length,i+=n[s].length,s++;i-=d,s-=p,u-=d,o.push({t:c.t,v:e.substr(i-u,u),s:i-u,e:i})}return o}(Rh.scanner.start,t))}function Ih(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Lh(t),r=[],o=0;o<n.length;o++){var i=n[o];!i.isLink||e&&i.t!==e||r.push(i.toObject())}return r}function Ph(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Lh(t);return 1===n.length&&n[0].isLink&&(!e||n[0].t===e)}function jh(t){return new ue({key:new pe("autolink"),appendTransaction:(e,n,r)=>{const o=e.some((t=>t.docChanged))&&!n.doc.eq(r.doc),i=e.some((t=>t.getMeta("preventAutolink")));if(!o||i)return;const{tr:s}=r,a=function(t,e){const n=new Ht(t);return e.forEach((t=>{t.steps.forEach((t=>{n.step(t)}))})),n}(n.doc,[...e]),{mapping:l}=a,u=function(t){const{mapping:e,steps:n}=t,r=[];return e.maps.forEach(((t,o)=>{const i=[];if(t.ranges.length)t.forEach(((t,e)=>{i.push({from:t,to:e})}));else{const{from:t,to:e}=n[o];if(void 0===t||void 0===e)return;i.push({from:t,to:e})}i.forEach((({from:t,to:n})=>{const i=e.slice(o).map(t,-1),s=e.slice(o).map(n),a=e.invert().map(i,-1),l=e.invert().map(s);r.push({oldRange:{from:a,to:l},newRange:{from:i,to:s}})}))})),function(t){const e=function(t,e=JSON.stringify){const n={};return t.filter((t=>{const r=e(t);return!Object.prototype.hasOwnProperty.call(n,r)&&(n[r]=!0)}))}(t);return 1===e.length?e:e.filter(((t,n)=>{const r=e.filter(((t,e)=>e!==n));return!r.some((e=>t.oldRange.from>=e.oldRange.from&&t.oldRange.to<=e.oldRange.to&&t.newRange.from>=e.newRange.from&&t.newRange.to<=e.newRange.to))}))}(r)}(a);return u.forEach((({oldRange:e,newRange:o})=>{is(e.from,e.to,n.doc).filter((e=>e.mark.type===t.type)).forEach((e=>{const o=is(l.map(e.from),l.map(e.to),r.doc).filter((e=>e.mark.type===t.type));if(!o.length)return;const i=o[0],a=n.doc.textBetween(e.from,e.to,void 0," "),u=r.doc.textBetween(i.from,i.to,void 0," "),c=Ph(a),d=Ph(u);c&&!d&&s.removeMark(i.from,i.to,t.type)})),function(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,((t,e)=>{(t=>t.isTextblock)(t)&&r.push({node:t,pos:e})})),r}(r.doc,o).forEach((e=>{Ih(r.doc.textBetween(e.pos,e.pos+e.node.nodeSize,void 0," ")).filter((t=>t.isLink)).filter((e=>!t.validate||t.validate(e.value))).map((t=>({...t,from:e.pos+t.start+1,to:e.pos+t.end+1}))).filter((t=>{const e=o.from>=t.from&&o.from<=t.to,n=o.to>=t.from&&o.to<=t.to;return e||n})).forEach((e=>{s.addMark(e.from,e.to,t.type.create({href:e.href}))}))}))})),s.steps.length?s:void 0}})}const Vh=ls.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach(zh)},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}),addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},class:{default:this.options.HTMLAttributes.class}}},parseHTML:()=>[{tag:'a[href]:not([href *= "javascript:" i])'}],renderHTML({HTMLAttributes:t}){return["a",oi(this.options.HTMLAttributes,t),0]},addCommands(){return{setLink:t=>({chain:e})=>e().setMark(this.name,t).setMeta("preventAutolink",!0).run(),toggleLink:t=>({chain:e})=>e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[(t={find:t=>Ih(t).filter((t=>!this.options.validate||this.options.validate(t.value))).filter((t=>t.isLink)).map((t=>({text:t.value,index:t.start,data:t}))),type:this.type,getAttributes:t=>{var e;return{href:null===(e=t.data)||void 0===e?void 0:e.href}}},new gi({find:t.find,handler:({state:e,range:n,match:r})=>{const o=ai(t.getAttributes,void 0,r);if(!1===o||null===o)return null;const{tr:i}=e,s=r[r.length-1],a=r[0];let l=n.to;if(s){const r=a.search(/\S/),u=n.from+a.indexOf(s),c=u+s.length;if(is(n.from,n.to,e.doc).filter((e=>e.mark.type.excluded.find((n=>n===t.type&&n!==e.mark.type)))).filter((t=>t.to>u)).length)return null;c<n.to&&i.delete(c,n.to),u>n.from&&i.delete(n.from+r,u),l=n.from+r+s.length,i.addMark(n.from+r,l,t.type.create(o||{})),i.removeStoredMark(t.type)}}}))];var t},addProseMirrorPlugins(){const t=[];return this.options.autolink&&t.push(jh({type:this.type,validate:this.options.validate})),this.options.openOnClick&&t.push((e={type:this.type},new ue({key:new pe("handleClickLink"),props:{handleClick:(t,n,r)=>{var o;const i=rs(t.state,e.type.name);return!(!(null===(o=r.target)||void 0===o?void 0:o.closest("a"))||!i.href||(window.open(i.href,i.target),0))}}}))),this.options.linkOnPaste&&t.push(function(t){return new ue({key:new pe("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{state:o}=e,{selection:i}=o,{empty:s}=i;if(s)return!1;let a="";r.content.forEach((t=>{a+=t.textContent}));const l=Ih(a).find((t=>t.isLink&&t.value===a));return!(!a||!l||(t.editor.commands.setMark(t.type,{href:l.href}),0))}}})}({editor:this.editor,type:this.type})),t;var e}});function Hh(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function $h(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Hh(Object(n),!0).forEach((function(e){Tl(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Hh(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var Wh=Vh.extend({name:"link",addOptions:function(){var t;return $h($h({},null===(t=this.parent)||void 0===t?void 0:t.call(this)),{},{openOnClick:!1,HTMLAttributes:{target:gl.SELF},preset:{},basePresetClass:null,pageBlocks:[]})},addAttributes:function(){var t=this;return{href:{default:null,parseHTML:function(t){var e=t.getAttribute("href");return e.startsWith("#")?parseFloat(t.getAttribute("href").replace("#","")):e}},target:{default:this.options.target,parseHTML:function(t){return t.getAttribute("target")||gl.SELF}},destination:{default:vl.URL,parseHTML:function(e){var n=e.getAttribute("href");if(!n.startsWith("#"))return vl.URL;var r=n.replace("#","");return t.options.pageBlocks.value.find((function(t){return t.id===parseInt(r)}))?vl.BLOCK:vl.URL}}}},addCommands:function(){var t,e=this;return $h($h({},null===(t=this.parent)||void 0===t?void 0:t.call(this)),{},{applyLink:_l((function(t,n){var r=t.commands,o=t.chain;return r.getSelectedText()?o().setMark(e.name,n).transformText((function(){return n.text})).extendMarkRange("link").run():r.insertContent({type:"text",marks:[{type:"link",attrs:$h({},n)}],text:n.text})}))})},renderHTML:function(t){var e=t.HTMLAttributes,n=e.destination===vl.BLOCK?"#".concat(e.href):e.href,r=this.options.basePresetClass+this.options.preset.id,o="".concat(r," zw-style");return["a",{href:n,target:e.target,class:o},0]}});const qh=ls.create({name:"superscript",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"sup"},{style:"vertical-align",getAttrs:t=>"super"===t&&null}],renderHTML({HTMLAttributes:t}){return["sup",oi(this.options.HTMLAttributes,t),0]},addCommands(){return{setSuperscript:()=>({commands:t})=>t.setMark(this.name),toggleSuperscript:()=>({commands:t})=>t.toggleMark(this.name),unsetSuperscript:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}});var Uh=qh.extend({addKeyboardShortcuts:null});const Kh=us.create({name:"doc",topNode:!0,content:"block+"}),Gh=us.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:t}){return["p",oi(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),Jh=us.create({name:"text",group:"inline"}),Zh=xi.create({name:"placeholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){return[new ue({props:{decorations:({doc:t,selection:e})=>{const n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=e,o=[];return n?(t.descendants(((t,e)=>{const n=r>=e&&r<=e+t.nodeSize,i=!t.isLeaf&&!t.childCount;if((n||!this.options.showOnlyCurrent)&&i){const r=[this.options.emptyNodeClass];this.editor.isEmpty&&r.push(this.options.emptyEditorClass);const i=jr.node(e,e+t.nodeSize,{class:r.join(" "),"data-placeholder":"function"==typeof this.options.placeholder?this.options.placeholder({editor:this.editor,node:t,pos:e,hasAnchor:n}):this.options.placeholder});o.push(i)}return this.options.includeChildren})),$r.create(t,o)):null}}})]}});var Yh=200,Xh=function(){};Xh.prototype.append=function(t){return t.length?(t=Xh.from(t),!this.length&&t||t.length<Yh&&this.leafAppend(t)||this.length<Yh&&t.leafPrepend(this)||this.appendInner(t)):this},Xh.prototype.prepend=function(t){return t.length?Xh.from(t).append(this):this},Xh.prototype.appendInner=function(t){return new tf(this,t)},Xh.prototype.slice=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.length),t>=e?Xh.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))},Xh.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)},Xh.prototype.forEach=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length),e<=n?this.forEachInner(t,e,n,0):this.forEachInvertedInner(t,e,n,0)},Xh.prototype.map=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length);var r=[];return this.forEach((function(e,n){return r.push(t(e,n))}),e,n),r},Xh.from=function(t){return t instanceof Xh?t:t&&t.length?new Qh(t):Xh.empty};var Qh=function(t){function e(e){t.call(this),this.values=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(t,n){return 0==t&&n==this.length?this:new e(this.values.slice(t,n))},e.prototype.getInner=function(t){return this.values[t]},e.prototype.forEachInner=function(t,e,n,r){for(var o=e;o<n;o++)if(!1===t(this.values[o],r+o))return!1},e.prototype.forEachInvertedInner=function(t,e,n,r){for(var o=e-1;o>=n;o--)if(!1===t(this.values[o],r+o))return!1},e.prototype.leafAppend=function(t){if(this.length+t.length<=Yh)return new e(this.values.concat(t.flatten()))},e.prototype.leafPrepend=function(t){if(this.length+t.length<=Yh)return new e(t.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(Xh);Xh.empty=new Qh([]);var tf=function(t){function e(e,n){t.call(this),this.left=e,this.right=n,this.length=e.length+n.length,this.depth=Math.max(e.depth,n.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(t){return t<this.left.length?this.left.get(t):this.right.get(t-this.left.length)},e.prototype.forEachInner=function(t,e,n,r){var o=this.left.length;return!(e<o&&!1===this.left.forEachInner(t,e,Math.min(n,o),r))&&!(n>o&&!1===this.right.forEachInner(t,Math.max(e-o,0),Math.min(this.length,n)-o,r+o))&&void 0},e.prototype.forEachInvertedInner=function(t,e,n,r){var o=this.left.length;return!(e>o&&!1===this.right.forEachInvertedInner(t,e-o,Math.max(n,o)-o,r+o))&&!(n<o&&!1===this.left.forEachInvertedInner(t,Math.min(e,o),n,r))&&void 0},e.prototype.sliceInner=function(t,e){if(0==t&&e==this.length)return this;var n=this.left.length;return e<=n?this.left.slice(t,e):t>=n?this.right.slice(t-n,e-n):this.left.slice(t,n).append(this.right.slice(0,e-n))},e.prototype.leafAppend=function(t){var n=this.right.leafAppend(t);if(n)return new e(this.left,n)},e.prototype.leafPrepend=function(t){var n=this.left.leafPrepend(t);if(n)return new e(n,this.right)},e.prototype.appendInner=function(t){return this.left.depth>=Math.max(this.right.depth,t.depth)+1?new e(this.left,new e(this.right,t)):new e(this,t)},e}(Xh);const ef=Xh;class nf{constructor(t,e){this.items=t,this.eventCount=e}popEvent(t,e){if(0==this.eventCount)return null;let n,r,o=this.items.length;for(;;o--)if(this.items.get(o-1).selection){--o;break}e&&(n=this.remapping(o,this.items.length),r=n.maps.length);let i,s,a=t.tr,l=[],u=[];return this.items.forEach(((t,e)=>{if(!t.step)return n||(n=this.remapping(o,e+1),r=n.maps.length),r--,void u.push(t);if(n){u.push(new rf(t.map));let e,o=t.step.map(n.slice(r));o&&a.maybeStep(o).doc&&(e=a.mapping.maps[a.mapping.maps.length-1],l.push(new rf(e,void 0,void 0,l.length+u.length))),r--,e&&n.appendMap(e,r)}else a.maybeStep(t.step);return t.selection?(i=n?t.selection.map(n.slice(r)):t.selection,s=new nf(this.items.slice(0,o).append(u.reverse().concat(l)),this.eventCount-1),!1):void 0}),this.items.length,0),{remaining:s,transform:a,selection:i}}addTransform(t,e,n,r){let o=[],i=this.eventCount,s=this.items,a=!r&&s.length?s.get(s.length-1):null;for(let n=0;n<t.steps.length;n++){let l,u=t.steps[n].invert(t.docs[n]),c=new rf(t.mapping.maps[n],u,e);(l=a&&a.merge(c))&&(c=l,n?o.pop():s=s.slice(0,s.length-1)),o.push(c),e&&(i++,e=void 0),r||(a=c)}let l=i-n.depth;return l>sf&&(s=function(t,e){let n;return t.forEach(((t,r)=>{if(t.selection&&0==e--)return n=r,!1})),t.slice(n)}(s,l),i-=l),new nf(s.append(o),i)}remapping(t,e){let n=new ft;return this.items.forEach(((e,r)=>{let o=null!=e.mirrorOffset&&r-e.mirrorOffset>=t?n.maps.length-e.mirrorOffset:void 0;n.appendMap(e.map,o)}),t,e),n}addMaps(t){return 0==this.eventCount?this:new nf(this.items.append(t.map((t=>new rf(t)))),this.eventCount)}rebased(t,e){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-e),o=t.mapping,i=t.steps.length,s=this.eventCount;this.items.forEach((t=>{t.selection&&s--}),r);let a=e;this.items.forEach((e=>{let r=o.getMirror(--a);if(null==r)return;i=Math.min(i,r);let l=o.maps[r];if(e.step){let i=t.steps[r].invert(t.docs[r]),u=e.selection&&e.selection.map(o.slice(a+1,r));u&&s++,n.push(new rf(l,i,u))}else n.push(new rf(l))}),r);let l=[];for(let t=e;t<i;t++)l.push(new rf(o.maps[t]));let u=this.items.slice(0,r).append(l).append(n),c=new nf(u,s);return c.emptyItemCount()>500&&(c=c.compress(this.items.length-n.length)),c}emptyItemCount(){let t=0;return this.items.forEach((e=>{e.step||t++})),t}compress(t=this.items.length){let e=this.remapping(0,t),n=e.maps.length,r=[],o=0;return this.items.forEach(((i,s)=>{if(s>=t)r.push(i),i.selection&&o++;else if(i.step){let t=i.step.map(e.slice(n)),s=t&&t.getMap();if(n--,s&&e.appendMap(s,n),t){let a=i.selection&&i.selection.map(e.slice(n));a&&o++;let l,u=new rf(s.invert(),t,a),c=r.length-1;(l=r.length&&r[c].merge(u))?r[c]=l:r.push(u)}}else i.map&&n--}),this.items.length,0),new nf(ef.from(r.reverse()),o)}}nf.empty=new nf(ef.empty,0);class rf{constructor(t,e,n,r){this.map=t,this.step=e,this.selection=n,this.mirrorOffset=r}merge(t){if(this.step&&t.step&&!t.selection){let e=t.step.merge(this.step);if(e)return new rf(e.getMap().invert(),e,this.selection)}}}class of{constructor(t,e,n,r){this.done=t,this.undone=e,this.prevRanges=n,this.prevTime=r}}const sf=20;function af(t){let e=[];return t.forEach(((t,n,r,o)=>e.push(r,o))),e}function lf(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let o=e.map(t[r],1),i=e.map(t[r+1],-1);o<=i&&n.push(o,i)}return n}function uf(t,e,n,r){let o=pf(e),i=hf.get(e).spec.config,s=(r?t.undone:t.done).popEvent(e,o);if(!s)return;let a=s.selection.resolve(s.transform.doc),l=(r?t.done:t.undone).addTransform(s.transform,e.selection.getBookmark(),i,o),u=new of(r?l:s.remaining,r?s.remaining:l,null,0);n(s.transform.setSelection(a).setMeta(hf,{redo:r,historyState:u}).scrollIntoView())}let cf=!1,df=null;function pf(t){let e=t.plugins;if(df!=e){cf=!1,df=e;for(let t=0;t<e.length;t++)if(e[t].spec.historyPreserveItems){cf=!0;break}}return cf}const hf=new pe("history"),ff=new pe("closeHistory");function mf(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new ue({key:hf,state:{init:()=>new of(nf.empty,nf.empty,null,0),apply:(e,n,r)=>function(t,e,n,r){let o,i=n.getMeta(hf);if(i)return i.historyState;n.getMeta(ff)&&(t=new of(t.done,t.undone,null,0));let s=n.getMeta("appendedTransaction");if(0==n.steps.length)return t;if(s&&s.getMeta(hf))return s.getMeta(hf).redo?new of(t.done.addTransform(n,void 0,r,pf(e)),t.undone,af(n.mapping.maps[n.steps.length-1]),t.prevTime):new of(t.done,t.undone.addTransform(n,void 0,r,pf(e)),null,t.prevTime);if(!1===n.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(o=n.getMeta("rebased"))?new of(t.done.rebased(n,o),t.undone.rebased(n,o),lf(t.prevRanges,n.mapping),t.prevTime):new of(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),lf(t.prevRanges,n.mapping),t.prevTime);{let o=0==t.prevTime||!s&&(t.prevTime<(n.time||0)-r.newGroupDelay||!function(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach(((t,r)=>{for(let o=0;o<e.length;o+=2)t<=e[o+1]&&r>=e[o]&&(n=!0)})),n}(n,t.prevRanges)),i=s?lf(t.prevRanges,n.mapping):af(n.mapping.maps[n.steps.length-1]);return new of(t.done.addTransform(n,o?e.selection.getBookmark():void 0,r,pf(e)),nf.empty,i,n.time)}}(n,r,e,t)},config:t,props:{handleDOMEvents:{beforeinput(t,e){let n=e.inputType,r="historyUndo"==n?gf:"historyRedo"==n?vf:null;return!!r&&(e.preventDefault(),r(t.state,t.dispatch))}}}})}const gf=(t,e)=>{let n=hf.getState(t);return!(!n||0==n.done.eventCount||(e&&uf(n,t,e,!1),0))},vf=(t,e)=>{let n=hf.getState(t);return!(!n||0==n.undone.eventCount||(e&&uf(n,t,e,!0),0))},yf=xi.create({name:"history",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:t,dispatch:e})=>gf(t,e),redo:()=>({state:t,dispatch:e})=>vf(t,e)}),addProseMirrorPlugins(){return[mf(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Mod-y":()=>this.editor.commands.redo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}});function bf(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function wf(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?bf(Object(n),!0).forEach((function(e){Tl(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):bf(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function xf(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Df(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Df(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}function Df(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var kf=xi.create({name:"node_processor",addCommands:function(){return{setBlockAttributes:_l((function(t,e,n){var r,o,i=t.commands,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=null!==(r=i.getBlockAttributes(e).value)&&void 0!==r?r:{},l=xf(hl.blocks);try{for(l.s();!(o=l.n()).done;){var u=o.value;i.updateAttributes(u,Tl({},e,wf(wf(wf({},s),a),n)))}}catch(t){l.e(t)}finally{l.f()}})),getBlockAttributes:_l((function(t,e,n){var r=t.editor;return(0,sl.computed)((function(){var t,o=Object.assign({},n||{}),i=xf(hl.blocks);try{for(i.s();!(t=i.n()).done;){var s,a=t.value;Object.assign(o,(null===(s=r.getAttributes(a))||void 0===s?void 0:s[e])||{})}}catch(t){i.e(t)}finally{i.f()}return Object.keys(o).length?o:null}))}))}}}),Cf=as({find:/"/,replace:"”"}),Ef=as({find:/'/,replace:"’"}),Sf=as({find:/\(c\)/i,replace:"©"}),Of=as({find:/\.\.\./,replace:"…"}),Af=as({find:/--/,replace:"—"}),Tf=as({find:/(?:^|[\s{[(<'"\u2018\u201C])(")/,replace:"“"}),Mf=as({find:/(?:^|[\s{[(<'"\u2018\u201C])(')/,replace:"‘"}),Ff=as({find:/\(r\)/i,replace:"®"}),Nf=as({find:/\(tm\)/i,replace:"™"}),Bf=xi.create({name:"text_processor",addCommands:function(){return{getSelectedText:_l((function(t){var e=t.state,n=e.selection,r=n.from,o=n.to;return e.doc.textBetween(r,o," ")})),unsetMarks:_l((function(t,e){var n=t.commands;e.forEach((function(t){return n.unsetMark(t)}))})),transformText:_l((function(t,e){var n=t.state,r=n.tr.selection;r.from!==r.to&&n.doc.nodesBetween(r.from,r.to,(function(t,o){if(t.isText){var i=Math.max(o,r.from),s=Math.min(o+t.nodeSize,r.to),a=Math.max(0,r.from-o),l=Math.max(0,r.to-o),u=e({text:t.textContent.substring(a,l),position:{start:i,end:s}}),c=n.schema.text(u,t.marks);n.tr.replaceWith(i,s,c)}}))}))}},addInputRules:function(){return[Af,Ff,Nf,Of,Tf,Mf,Cf,Ef,Sf]}}),_f=xi.create({name:"selection_processor",addStorage:function(){return{selection:null}},addCommands:function(){var t=this;return{storeSelection:_l((function(e){var n=e.state;t.storage.selection=n.selection})),restoreSelection:_l((function(e){e.commands.setTextSelection(t.storage.selection)})),expandSelectionToBlock:_l((function(t){var e=t.state,n=t.commands,r=e.selection.from,o=e.selection.to;e.doc.nodesBetween(r,o,(function(t,e,n){n.type.name===hl.DOCUMENT&&(r=Math.min(r,e+1),o=Math.max(o,e+t.nodeSize-1))})),n.setTextSelection({from:r,to:o})}))}}});function Rf(t){return Rf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rf(t)}function zf(t,e){return zf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},zf(t,e)}function Lf(t,e){if(e&&("object"===Rf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function If(t){return If=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},If(t)}var Pf=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zf(t,e)}(o,t);var e,n,r=(e=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=If(e);if(n){var o=If(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Lf(this,t)});function o(){return gc(this,o),r.apply(this,arguments)}return yc(o,[{key:"buildProps",value:function(){return{transformPastedHTML:Ec.normalize,handlePaste:this._handlePaste.bind(this)}}},{key:"_handlePaste",value:function(t,e,n){var r=this._insertPastedContent(t,n).scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste");return t.dispatch(r),!0}},{key:"_insertPastedContent",value:function(t,e){var n=t.state,r=t.input;if(!this._isSingleNode(e))return n.tr.replaceSelection(e);var o=n.selection,i=o.$from,s=o.$to;if(i.sharedDepth(s.pos)!==i.depth)return n.tr.replaceSelection(e);var a=Math.abs(i.pos-s.pos);return s.path.reverse().find((function(t){return"object"===Rf(t)})).nodeSize-a>5?n.tr.replaceSelection(e):n.tr.replaceSelectionWith(e.content.firstChild,r.shiftKey)}},{key:"_isSingleNode",value:function(t){var e=t.openStart,n=t.openEnd,r=t.content;return 1===e&&1===n&&1===r.childCount}}]),o}(function(){function t(e){gc(this,t),this.options=e}return yc(t,[{key:"buildProps",value:function(){return{}}}],[{key:"create",value:function(t){var e=new this(t||{});return new ue({key:new pe(this.name),props:e.buildProps()})}}]),t}()),jf=xi.create({name:"copy_paste_processor",addProseMirrorPlugins:function(){return[Pf.create()]}});function Vf(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Hf=function(){function t(e){var n=e.name,r=e.category,o=e.styles;gc(this,t),this.name=n,this.category=r,this.styles=o}return yc(t,[{key:"weights",get:function(){return this.styles.filter((function(t){return!t.endsWith("i")}))}},{key:"isWeightSupported",value:function(t){return this.styles.includes(t)}},{key:"isItalicSupported",value:function(t){return this.styles.includes("".concat(t,"i"))}},{key:"findClosestWeight",value:function(t){var e,n,r=this.weights.map((function(t){return parseInt(t)})),o=null,i=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Vf(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Vf(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}(r);try{for(i.s();!(n=i.n()).done;){var s=n.value,a=Math.abs(t-s);(null===o||a<o)&&(o=a,e=s)}}catch(t){i.e(t)}finally{i.f()}return String(e)}}]),t}();const $f={name:"Wysiwyg",components:{Toolbar:Gd,EditorContent:ll},directives:{outClick:Tc},props:{value:{type:[String,Object],required:!0},presets:{type:Array,required:!0},defaultPresetId:{type:[Number,String],required:!0},basePresetClass:{type:String,required:!0},makePresetVariable:{type:Function,required:!0},fonts:{type:Array,required:!0},active:{type:Boolean,required:!0},device:{type:String,required:!1,default:cl.DESKTOP},favoriteColors:{type:Array,required:!1,default:function(){return[]}},toolbarOffsets:{type:Array,required:!1,default:function(){return[0,8]}},baseListClass:{type:String,required:!1,default:"zw-list--"},pageBlocks:{type:Array,required:!0},window:{required:!1,default:function(){return window}}},setup:function(t,e){var n=e.emit;Dc.use(t.window);var r,o,i,s=t.fonts.map((function(t){return new Hf(t)})),a=(0,sl.toRef)(t,"presets"),l=(0,sl.ref)(null),u=(0,sl.ref)(null),c=function(t){var e,n=t.offsets,r=t.isActiveRef,o=Xu(t.wrapperRef);return{toolbar:e,update:function(){var t;return null===(t=e)||void 0===t?void 0:t.update()},mount:function(t){e=va(o.value,t,{placement:"top-start",modifiers:[{name:"offset",options:{offset:n}}]})},isActiveRef:r,offsets:n}}({wrapperRef:u,isActiveRef:(0,sl.toRef)(t,"active"),offsets:t.toolbarOffsets}),d=(0,sl.toRef)(t,"pageBlocks"),p=function(t){var e=t.content,n=t.onChange,r=t.extensions,o=(0,sl.reactive)(new al({content:Ec.normalize(e.value),onUpdate:function(){return n(o.getJSON())},extensions:r,injectCSS:!1}));return(0,sl.onUnmounted)((function(){return o.destroy()})),(0,sl.watch)(e,(function(t){if(JSON.stringify(o.getJSON())!==JSON.stringify(t)){var e=Ec.normalize(t);o.commands.setContent(e,!1)}})),o}({content:(0,sl.toRef)(t,"value"),onChange:function(t){return function(t){n("input",t),c.update()}(t)},extensions:(r={fonts:s,minFontSize:5,maxFontSize:112,presetsRef:(0,sl.toRef)(t,"presets"),defaultPresetId:t.defaultPresetId,makePresetVariable:t.makePresetVariable,basePresetClass:t.basePresetClass,baseListClass:t.baseListClass,linkPreset:a.value.find((function(t){return"link"===t.id})),deviceRef:(0,sl.toRef)(t,"device"),pageBlocks:d},o=r.defaultPresetId,i=r.presetsRef.value.find((function(t){return t.id===o})),[Kh,Gh.configure({HTMLAttributes:{class:"zw-style"}}),Jh,Zh.configure({placeholder:"Type your text here...",emptyNodeClass:"zw-wysiwyg__placeholder"}),yf,kf,Bf,_f,jf].concat([tp.configure({presets:r.presetsRef,defaultId:r.defaultPresetId,baseClass:r.basePresetClass,makeVariable:r.makePresetVariable}),vp.configure({baseClass:r.baseListClass}),ip.configure({device:r.deviceRef}),Jd.configure({fonts:r.fonts,defaultFont:i.common.font_family}),ep,np.configure({minSize:r.minFontSize,maxSize:r.maxFontSize}),rp,op,sp,up,cp,Uh,pp,fp,Wh.configure({preset:r.linkPreset,basePresetClass:r.basePresetClass,pageBlocks:r.pageBlocks})]))}),h=new Array(108).fill(0).map((function(t,e){return String(e+5)})),f=new xc({listRef:(0,sl.toRef)(t,"favoriteColors"),triggerUpdate:function(t){return n("updateFavoriteColors",t)}});return(0,sl.provide)(Ol.EDITOR,p),(0,sl.provide)(Ol.FONTS,s),(0,sl.provide)(Ol.FONT_SIZES,h),(0,sl.provide)(Ol.LOCAL_STORAGE,new wc(localStorage)),(0,sl.provide)(Ol.FAVORITE_COLORS,f),(0,sl.provide)(Ol.PAGE_BLOCKS,d),{editor:p,toolbarRef:l,wysiwygRef:u,toolbar:c}}},Wf=wl($f,t,[],!1,null,null,null).exports})(),module.exports=r;