"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3016],{62564:function(t,e,n){let r;n.d(e,{P:function(){return ie},h:function(){return it}});var o,i,a,c=n(30764),l=n(43781),s=n(52518);function u(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=Array(e);n1?e-1:0),r=1;r32){for(var e=[],n=t.ctx.length/32,r=0;r2&&void 0!==arguments[2]?arguments[2]:{},o=r.cancelable,i=t.$$.callbacks[e];if(i){var a=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.bubbles,o=void 0!==r&&r,i=n.cancelable,a=void 0!==i&&i,c=document.createEvent("CustomEvent");return c.initCustomEvent(t,o,a,e),c}(e,n,{cancelable:void 0!==o&&o});return i.slice().forEach(function(e){e.call(t,a)}),!a.defaultPrevented}return!0}}function to(t,e){return te().$$.context.set(t,e),e}function ti(t){return te().$$.context.get(t)}function ta(t,e){var n=this,r=t.$$.callbacks[e.type];r&&r.slice().forEach(function(t){return t.call(n,e)})}var tc=[],tl=[],ts=[],tu=[],tf=Promise.resolve(),td=!1;function tp(t){ts.push(t)}var th=new Set,tv=0;function tg(){var t=i;do{for(;tv7&&void 0!==arguments[7]?arguments[7]:[-1],s=i;i=t;var u=t.$$={fragment:null,ctx:null,props:a,update:k,not_equal:o,bound:O(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(s?s.$$.context:[])),callbacks:O(),dirty:l,skip_bound:!1,root:e.target||s.$$.root};c&&c(u.root);var f=!1;if(u.ctx=n?n(t,e.props||{},function(e,n){var r=(arguments.length<=2?0:arguments.length-2)?arguments.length<=2?void 0:arguments[2]:n;return u.ctx&&o(u.ctx[e],u.ctx[e]=r)&&(!u.skip_bound&&u.bound[e]&&u.bound[e](r),f)&&(-1===t.$$.dirty[0]&&(tc.push(t),td||(td=!0,tf.then(tg)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<to(t,e),tR=t=>ti(t);function tS(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}function tE(t){var e,n,r,o,i,a,c,l,s,u,f,d,p,h,v,g,m,y,b,x,w,_,j,O;return{c:function(){e=H("button"),n=U("svg"),r=U("title"),o=J("prosemirror"),i=U("desc"),a=J("Created using Figma"),c=U("use"),l=U("use"),s=U("use"),u=U("use"),f=U("use"),d=U("use"),p=U("use"),h=U("defs"),v=U("path"),g=U("path"),m=U("path"),y=U("path"),b=U("path"),x=U("path"),w=U("path"),Z(c,"xlink:href","#a"),Y(c,"transform","matrix(2 0 0 2 118 116)"),Y(c,"fill","#FFF"),Z(l,"xlink:href","#b"),Y(l,"transform","rotate(16 59.054 420.192) scale(2)"),Y(l,"fill","#FFF"),Z(s,"xlink:href","#c"),Y(s,"transform","matrix(2 0 0 2 154.024 141.58)"),Y(s,"fill","#363755"),Z(u,"xlink:href","#d"),Y(u,"transform","matrix(2 0 0 2 220 334.8)"),Y(u,"fill","#FFF"),Z(f,"xlink:href","#e"),Y(f,"transform","matrix(2 0 0 2 218.826 262.052)"),Y(f,"fill","#363755"),Z(d,"xlink:href","#f"),Y(d,"transform","matrix(2 0 0 2 197.108 184.998)"),Y(d,"fill","#FFF"),Z(p,"xlink:href","#g"),Y(p,"transform","matrix(2 0 0 2 221.8 216)"),Y(p,"fill","#363755"),Y(v,"id","a"),Y(v,"d","M73.5 0C32.859 0 0 32.859 0 73.5S32.859 147 73.5 147 147 114.141 147 73.5 114.069 0 73.5\n 0z"),Y(g,"id","b"),Y(g,"d","M193.601 107.116c0-13.376 8.238-23.91\n 20.619-31.153-2.244-7.447-5.19-14.6-8.824-21.32-13.886\n 3.633-25.12-1.799-34.568-11.26-9.449-9.437-12.344-20.672-8.709-34.571A111.362 111.362 0 0 0\n 140.799 0c-7.243 12.37-20.339 20.594-33.689 20.594-13.363\n 0-26.446-8.225-33.701-20.594A110.888 110.888 0 0 0 52.1 8.812c3.634 13.9.753 25.134-8.721\n 34.57-9.436 9.462-20.67 14.894-34.569 11.26A112.178 112.178 0 0 0 0 75.963c12.369 7.243\n 20.593 17.777 20.593 31.153 0 13.352-8.224 26.448-20.593 33.704a113.338 113.338 0 0 0 8.811\n 21.321c13.899-3.634 25.133-.752 34.569 8.697 9.448 9.462 12.355 20.696 8.721 34.57a112.653\n 112.653 0 0 0 21.32 8.837c7.243-12.407 20.338-20.619 33.702-20.619 13.35 0 26.446 8.225\n 33.701 20.619a114.22 114.22 0 0 0 21.32-8.837c-3.634-13.874-.752-25.108 8.709-34.57\n 9.449-9.437 20.683-14.869 34.569-11.26a112.343 112.343 0 0 0\n 8.823-21.321c-12.406-7.256-20.644-17.789-20.644-31.141zm-86.491 46.57c-25.732\n 0-46.58-20.849-46.58-46.57 0-25.733 20.86-46.595 46.58-46.595 25.732 0 46.567 20.875 46.567\n 46.595 0 25.734-20.835 46.57-46.567 46.57z"),Y(m,"id","c"),Y(m,"d","M98.088 49.91c-6.9 83.9 10.8 103.401 10.8 103.401s-55.1\n 5.499-82.7-13.401c-30.5-20.9-26-67.5-25.9-94.6.1-28.4 25.6-45.8 49.9-45.3 29.1.5 50.2 21.6\n 47.9 49.9z"),Y(y,"id","d"),Y(y,"d","M.1.1c12.2 33.3 22.5 42.7 40 55.2 25.3 18 36.6 17.5 76.3 41C78.1 60.3 30.8 45.7 0 0l.1.1z"),Y(b,"id","e"),Y(b,"d","M.687 36.474c3 13.3 17.9 29.9 30.4 41.6 24.8 23.2 42 22.4 86\n 54.7-18.2-51.8-18.8-62-43.5-106.1-24.7-44-67.6-20.3-67.6-20.3s-8.4 16.6-5.3 29.9v.2z"),Y(x,"id","f"),Y(x,"d","M38.346 11.5s-4-11.6-18-11.5c-30 .2-28.8 52.1 16.9 52 39.6-.1 39.2-49.4\n 16.1-49.6-10.2-.2-15 9.1-15 9.1z"),Y(w,"id","g"),Y(w,"d","M26.5 15c10.8 0 2 14.9-.6 20.9-1.8-8.4-10.2-20.9.6-20.9zM10.2.1C4.6.1 0 4.6 0 10.3c0 5.6\n 4.5 10.2 10.2 10.2 5.6 0 10.2-4.5 10.2-10.2C20.4 4.7 15.9.1 10.2.1zM40.7 0c-4.8 0-8.8\n 4.5-8.8 10.2 0 5.6 3.9 10.2 8.8 10.2 4.8 0 8.8-4.5 8.8-10.2C49.5 4.6 45.6 0 40.7 0z"),Y(n,"width","530"),Y(n,"height","530"),Y(n,"viewBox","0 0 530 530"),Y(n,"xmlns","http://www.w3.org/2000/svg"),Y(n,"xmlns:xlink","http://www.w3.org/1999/xlink"),Y(n,"class","svelte-1lt2k10"),Y(e,"class",_=q("floating-btn ".concat(t[0]))+" svelte-1lt2k10")},m:function($,k){F($,e,k),z(e,n),z(n,r),z(r,o),z(n,i),z(i,a),z(n,c),z(n,l),z(n,s),z(n,u),z(n,f),z(n,d),z(n,p),z(n,h),z(h,v),z(h,g),z(h,m),z(h,y),z(h,b),z(h,x),z(h,w),j||(O=W(e,"click",t[1]),j=!0)},p:function(t,n){1&$(n,1)[0]&&_!==(_=q("floating-btn ".concat(t[0]))+" svelte-1lt2k10")&&Y(e,"class",_)},i:k,o:k,d:function(t){t&&L(e),j=!1,O()}}}function tD(t,e,n){var r=e.buttonPosition;return t.$$set=function(t){"buttonPosition"in t&&n(0,r=t.buttonPosition)},[r,function(e){ta.call(this,t,e)}]}tS(".floating-btn.svelte-1lt2k10.svelte-1lt2k10{background:#363755;border:0;border-radius:50%;box-shadow:0 0 30px rgba(34, 34, 34, 0.3);cursor:pointer;position:fixed;padding:6px;transition:opacity 0.3s;-webkit-transition:opacity 0.3s;z-index:99999}.floating-btn.bottom-right.svelte-1lt2k10.svelte-1lt2k10{bottom:16px;right:16px}.floating-btn.bottom-left.svelte-1lt2k10.svelte-1lt2k10{bottom:16px;left:16px}.floating-btn.top-right.svelte-1lt2k10.svelte-1lt2k10{top:16px;right:16px}.floating-btn.top-left.svelte-1lt2k10.svelte-1lt2k10{top:16px;left:16px}.floating-btn.svelte-1lt2k10.svelte-1lt2k10:hover{opacity:0.7}.floating-btn.svelte-1lt2k10>svg.svelte-1lt2k10{display:block;width:34px;height:34px;position:relative}");var tA=function(t){v(r,t);var e,n=(e=function(){if("undefined"==typeof Reflect||!Reflect.construct||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,n=y(r);if(e){var o=y(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return m(this,t)});function r(t){var e;return d(this,r),tj(p(e=n.call(this)),t,tD,tE,S,{buttonPosition:0}),e}return f(r)}(tO);function tP(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n1&&void 0!==arguments[1]?arguments[1]:k,r=new Set;function o(n){if(S(t,n)&&(t=n,e)){var o,i=!tN.length,a=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 tP(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tP(t,e)}}(t))){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 TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw i}}}}(r);try{for(a.s();!(o=a.n()).done;){var c=o.value;c[1](),tN.push(c,t)}}catch(t){a.e(t)}finally{a.f()}if(i){for(var l=0;l1&&void 0!==arguments[1]?arguments[1]:k,c=[i,a];return r.add(c),1===r.size&&(e=n(o)||k),i(t),function(){r.delete(c),0===r.size&&(e(),e=null)}}}}let tB="__prosemirror-dev-toolkit__snapshots",tT=tM([]),tI=tM(),tq=tM(),tz=!0;function tF(t,e){let n=t.state.schema.nodeFromJSON(e),r=t.state.tr;r.replaceWith(0,t.state.doc.nodeSize-2,n.content),t.dispatch(r)}function tL(t,e){let n={name:t,timestamp:Date.now(),doc:e};tT.update(t=>[n,...t])}function tV(t){tT.update(e=>e.map(e=>e.timestamp===t.timestamp?t:e))}function tH(t){let e=document.createElement("a"),n=new Blob([JSON.stringify(t.doc)],{type:"application/json"});e.href=URL.createObjectURL(n),e.download=`${t.name}.json`,e.click()}function tU(t){tT.update(e=>e.filter(e=>e.timestamp!==t.timestamp));let e=D(tI);(null==e?void 0:e.timestamp)===t.timestamp&&tI.set(void 0)}function tJ(t,e){let n=n=>t&&!t.contains(n.target)&&!n.defaultPrevented&&e();return document.addEventListener("click",n,!0),{destroy(){document.removeEventListener("click",n,!0)}}}function tG(t){var e,n,r,o,i,a,c,l,s,u,f,d;return{c:function(){e=H("div"),n=H("div"),r=G(),o=H("form"),i=H("fieldset"),(a=H("div")).innerHTML='',c=G(),(l=H("legend")).textContent="Doc",s=G(),u=H("textarea"),Y(n,"class","modal-bg svelte-1xgo4vn"),Y(a,"class","submit-container svelte-1xgo4vn"),Y(l,"class","svelte-1xgo4vn"),Y(u,"class","svelte-1xgo4vn"),Y(i,"class","svelte-1xgo4vn"),Y(o,"class","paste-content svelte-1xgo4vn"),Y(e,"class","paste-modal svelte-1xgo4vn"),tt(e,"hidden",!t[0])},m:function(p,h){if(F(p,e,h),z(e,n),z(e,r),z(e,o),z(o,i),z(i,a),z(i,c),z(i,l),z(i,s),z(i,u),X(u,t[1]),!f){var v,g;d=[W(u,"input",t[4]),(v=tJ.call(null,i,t[2]))&&R(v.destroy)?v.destroy:k,W(o,"submit",(g=t[3],function(t){return t.preventDefault(),g.call(this,t)}))],f=!0}},p:function(t,n){var r=$(n,1)[0];2&r&&X(u,t[1]),1&r&&tt(e,"hidden",!t[0])},i:k,o:k,d:function(t){t&&L(e),f=!1,C(d)}}}function tK(t,e,n){var r,o=e.isOpen,i=tr();return t.$$set=function(t){"isOpen"in t&&n(0,o=t.isOpen)},[o,r,function(){i("close")},function(){try{i("submit",{doc:JSON.parse(r)})}catch(t){}},function(){n(1,r=this.value)}]}!function(){let t=null;try{t=localStorage.getItem(tB)}catch(t){tz=!1}if(t&&t.length>0)try{let e=JSON.parse(t);tT.set(e)}catch(t){console.error("Corrupted snapshots values in localStorage",t)}}(),tT.subscribe(t=>{tz&&localStorage.setItem(tB,JSON.stringify(t))}),tS(".hidden.svelte-1xgo4vn.svelte-1xgo4vn{opacity:0;visibility:hidden}.paste-modal.svelte-1xgo4vn.svelte-1xgo4vn{font-size:15px;height:100%;left:0;position:fixed;top:0;width:100%;z-index:1000}.paste-modal.svelte-1xgo4vn>form.svelte-1xgo4vn{display:flex;height:100%;justify-content:center;padding:64px;width:100%}.modal-bg.svelte-1xgo4vn.svelte-1xgo4vn{background:#000;height:100%;left:0;opacity:0.8;position:absolute;top:0;width:100%;z-index:-1}fieldset.svelte-1xgo4vn.svelte-1xgo4vn{border-color:transparent;width:100%;max-width:800px}.submit-container.svelte-1xgo4vn.svelte-1xgo4vn{position:relative;width:100%}button.svelte-1xgo4vn.svelte-1xgo4vn{cursor:pointer;padding:4px 8px;position:absolute;right:0;top:-32px}legend.svelte-1xgo4vn.svelte-1xgo4vn{color:white}textarea.svelte-1xgo4vn.svelte-1xgo4vn{background:#fefcfc;height:100%;width:100%}");var tW=function(t){v(r,t);var e,n=(e=function(){if("undefined"==typeof Reflect||!Reflect.construct||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,n=y(r);if(e){var o=y(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return m(this,t)});function r(t){var e;return d(this,r),tj(p(e=n.call(this)),t,tK,tG,S,{isOpen:0}),e}return f(r)}(tO);function tY(t){var e,n,r,o,i,a,c,l,s,u,f,d,p,h,v,g,m,y,b,x;return{c:function(){e=H("ul"),n=H("li"),(r=H("button")).textContent="STATE",o=G(),i=H("li"),(a=H("button")).textContent="HISTORY",c=G(),l=H("li"),(s=H("button")).textContent="PLUGINS",u=G(),f=H("li"),(d=H("button")).textContent="SCHEMA",p=G(),h=H("li"),(v=H("button")).textContent="STRUCTURE",g=G(),m=H("li"),(y=H("button")).textContent="SNAPSHOTS",Y(r,"class","svelte-b89ziw"),tt(r,"active","state"===t[0]),Y(a,"class","svelte-b89ziw"),tt(a,"active","history"===t[0]),Y(s,"class","svelte-b89ziw"),tt(s,"active","plugins"===t[0]),Y(d,"class","svelte-b89ziw"),tt(d,"active","schema"===t[0]),Y(v,"class","svelte-b89ziw"),tt(v,"active","structure"===t[0]),Y(y,"class","svelte-b89ziw"),tt(y,"active","snapshots"===t[0]),Y(e,"class","tabs-menu svelte-b89ziw")},m:function($,w){F($,e,w),z(e,n),z(n,r),z(e,o),z(e,i),z(i,a),z(e,c),z(e,l),z(l,s),z(e,u),z(e,f),z(f,d),z(e,p),z(e,h),z(h,v),z(e,g),z(e,m),z(m,y),b||(x=[W(r,"click",t[2]),W(a,"click",t[3]),W(s,"click",t[4]),W(d,"click",t[5]),W(v,"click",t[6]),W(y,"click",t[7])],b=!0)},p:function(t,e){var n=$(e,1)[0];1&n&&tt(r,"active","state"===t[0]),1&n&&tt(a,"active","history"===t[0]),1&n&&tt(s,"active","plugins"===t[0]),1&n&&tt(d,"active","schema"===t[0]),1&n&&tt(v,"active","structure"===t[0]),1&n&&tt(y,"active","snapshots"===t[0])},i:k,o:k,d:function(t){t&&L(e),b=!1,C(x)}}}function tZ(t,e,n){var r=e.active,o=e.onClickTab;return t.$$set=function(t){"active"in t&&n(0,r=t.active),"onClickTab"in t&&n(1,o=t.onClickTab)},[r,o,function(){return o("state")},function(){return o("history")},function(){return o("plugins")},function(){return o("schema")},function(){return o("structure")},function(){return o("snapshots")}]}tS("ul.svelte-b89ziw{display:flex;list-style:none;margin:0;overflow-x:scroll;padding:0}button.svelte-b89ziw{background:transparent;border:0;border-bottom:2px solid transparent;color:#fff;cursor:pointer;height:100%;padding:1em}button.svelte-b89ziw:hover{background:rgba(255, 255, 255, 0.05)}button.active.svelte-b89ziw{border-bottom:2px solid rgb(255, 162, 177)}");var tQ=function(t){v(r,t);var e,n=(e=function(){if("undefined"==typeof Reflect||!Reflect.construct||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,n=y(r);if(e){var o=y(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return m(this,t)});function r(t){var e;return d(this,r),tj(p(e=n.call(this)),t,tZ,tY,S,{active:0,onClickTab:1}),e}return f(r)}(tO),tX={exports:{}};(o=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32}).Diff=function(t,e){return[t,e]},o.prototype.diff_main=function(t,e,n,r){void 0===r&&(r=this.Diff_Timeout<=0?Number.MAX_VALUE:new Date().getTime()+1e3*this.Diff_Timeout);var i=r;if(null==t||null==e)throw Error("Null input. (diff_main)");if(t==e)return t?[new o.Diff(0,t)]:[];void 0===n&&(n=!0);var a=n,c=this.diff_commonPrefix(t,e),l=t.substring(0,c);t=t.substring(c),e=e.substring(c),c=this.diff_commonSuffix(t,e);var s=t.substring(t.length-c);t=t.substring(0,t.length-c),e=e.substring(0,e.length-c);var u=this.diff_compute_(t,e,a,i);return l&&u.unshift(new o.Diff(0,l)),s&&u.push(new o.Diff(0,s)),this.diff_cleanupMerge(u),u},o.prototype.diff_compute_=function(t,e,n,r){if(!t)return[new o.Diff(1,e)];if(!e)return[new o.Diff(-1,t)];var i,a=t.length>e.length?t:e,c=t.length>e.length?e:t,l=a.indexOf(c);if(-1!=l)return i=[new o.Diff(1,a.substring(0,l)),new o.Diff(0,c),new o.Diff(1,a.substring(l+c.length))],t.length>e.length&&(i[0][0]=i[2][0]=-1),i;if(1==c.length)return[new o.Diff(-1,t),new o.Diff(1,e)];var s=this.diff_halfMatch_(t,e);if(s){var u=s[0],f=s[1],d=s[2],p=s[3],h=s[4],v=this.diff_main(u,d,n,r),g=this.diff_main(f,p,n,r);return v.concat([new o.Diff(0,h)],g)}return n&&t.length>100&&e.length>100?this.diff_lineMode_(t,e,r):this.diff_bisect_(t,e,r)},o.prototype.diff_lineMode_=function(t,e,n){var r=this.diff_linesToChars_(t,e);t=r.chars1,e=r.chars2;var i=r.lineArray,a=this.diff_main(t,e,!1,n);this.diff_charsToLines_(a,i),this.diff_cleanupSemantic(a),a.push(new o.Diff(0,""));for(var c=0,l=0,s=0,u="",f="";c=1&&s>=1){a.splice(c-l-s,l+s),c=c-l-s;for(var d=this.diff_main(u,f,!1,n),p=d.length-1;p>=0;p--)a.splice(c,0,d[p]);c+=d.length}s=0,l=0,u="",f=""}c++}return a.pop(),a},o.prototype.diff_bisect_=function(t,e,n){for(var r=t.length,i=e.length,a=Math.ceil((r+i)/2),c=2*a,l=Array(c),s=Array(c),u=0;un);m++){for(var y=-m+p;y<=m-h;y+=2){for(var b,x=a+y,$=(b=y==-m||y!=m&&l[x-1]r)h+=2;else if($>i)p+=2;else if(d){var w=a+f-y;if(w>=0&&w=k)return this.diff_bisectSplit_(t,e,b,$,n)}}}for(var _=-m+v;_<=m-g;_+=2){for(var k,w=a+_,j=(k=_==-m||_!=m&&s[w-1]r)g+=2;else if(j>i)v+=2;else if(!d){var x=a+f-_;if(x>=0&&x=(k=r-k))return this.diff_bisectSplit_(t,e,b,$,n)}}}}return[new o.Diff(-1,t),new o.Diff(1,e)]},o.prototype.diff_bisectSplit_=function(t,e,n,r,o){var i=t.substring(0,n),a=e.substring(0,r),c=t.substring(n),l=e.substring(r),s=this.diff_main(i,a,!1,o),u=this.diff_main(c,l,!1,o);return s.concat(u)},o.prototype.diff_linesToChars_=function(t,e){var n=[],r={};function o(t){for(var e="",o=0,a=-1,c=n.length;ar?t=t.substring(n-r):ne.length?t:e,l=t.length>e.length?e:t;if(c.length<4||2*l.length=t.length?[r,o,i,a,u]:null}var f=u(c,l,Math.ceil(c.length/4)),d=u(c,l,Math.ceil(c.length/2));return f||d?(n=d?f&&f[4].length>d[4].length?f:d:f,t.length>e.length?(r=n[0],o=n[1],i=n[2],a=n[3]):(i=n[0],a=n[1],r=n[2],o=n[3]),[r,o,i,a,n[4]]):null},o.prototype.diff_cleanupSemantic=function(t){for(var e=!1,n=[],r=0,i=null,a=0,c=0,l=0,s=0,u=0;a0?n[r-1]:-1,c=0,l=0,s=0,u=0,i=null,e=!0)),a++;for(e&&this.diff_cleanupMerge(t),this.diff_cleanupSemanticLossless(t),a=1;a=h?(p>=f.length/2||p>=d.length/2)&&(t.splice(a,0,new o.Diff(0,d.substring(0,p))),t[a-1][1]=f.substring(0,f.length-p),t[a+1][1]=d.substring(p),a++):(h>=f.length/2||h>=d.length/2)&&(t.splice(a,0,new o.Diff(0,f.substring(0,h))),t[a-1][0]=1,t[a-1][1]=d.substring(0,d.length-h),t[a+1][0]=-1,t[a+1][1]=f.substring(h),a++),a++}a++}},o.prototype.diff_cleanupSemanticLossless=function(t){function e(t,e){if(!t||!e)return 6;var n=t.charAt(t.length-1),r=e.charAt(0),i=n.match(o.nonAlphaNumericRegex_),a=r.match(o.nonAlphaNumericRegex_),c=i&&n.match(o.whitespaceRegex_),l=a&&r.match(o.whitespaceRegex_),s=c&&n.match(o.linebreakRegex_),u=l&&r.match(o.linebreakRegex_),f=s&&t.match(o.blanklineEndRegex_),d=u&&e.match(o.blanklineStartRegex_);return f||d?5:s||u?4:i&&!c&&l?3:c||l?2:i||a?1:0}for(var n=1;n=d&&(d=p,s=r,u=i,f=a)}t[n-1][1]!=s&&(s?t[n-1][1]=s:(t.splice(n-1,1),n--),t[n][1]=u,f?t[n+1][1]=f:(t.splice(n+1,1),n--))}n++}},o.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,o.whitespaceRegex_=/\s/,o.linebreakRegex_=/[\r\n]/,o.blanklineEndRegex_=/\n\r?\n$/,o.blanklineStartRegex_=/^\r?\n\r?\n/,o.prototype.diff_cleanupEfficiency=function(t){for(var e=!1,n=[],r=0,i=null,a=0,c=!1,l=!1,s=!1,u=!1;a0?n[r-1]:-1,s=u=!1),e=!0)),a++;e&&this.diff_cleanupMerge(t)},o.prototype.diff_cleanupMerge=function(t){t.push(new o.Diff(0,""));for(var e,n=0,r=0,i=0,a="",c="";n1?(0!==r&&0!==i&&(0!==(e=this.diff_commonPrefix(c,a))&&(n-r-i>0&&0==t[n-r-i-1][0]?t[n-r-i-1][1]+=c.substring(0,e):(t.splice(0,0,new o.Diff(0,c.substring(0,e))),n++),c=c.substring(e),a=a.substring(e)),0!==(e=this.diff_commonSuffix(c,a))&&(t[n][1]=c.substring(c.length-e)+t[n][1],c=c.substring(0,c.length-e),a=a.substring(0,a.length-e))),n-=r+i,t.splice(n,r+i),a.length&&(t.splice(n,0,new o.Diff(-1,a)),n++),c.length&&(t.splice(n,0,new o.Diff(1,c)),n++),n++):0!==n&&0==t[n-1][0]?(t[n-1][1]+=t[n][1],t.splice(n,1)):n++,i=0,r=0,a="",c=""}""===t[t.length-1][1]&&t.pop();var l=!1;for(n=1;ne));n++)i=r,a=o;return t.length!=n&&-1===t[n][0]?a:a+(e-i)},o.prototype.diff_prettyHtml=function(t){for(var e=[],n=/&/g,r=//g,i=/\n/g,a=0;a");switch(c){case 1:e[a]=''+l+"";break;case -1:e[a]=''+l+"";break;case 0:e[a]=""+l+""}}return e.join("")},o.prototype.diff_text1=function(t){for(var e=[],n=0;nthis.Match_MaxBits)throw Error("Pattern too long for this browser.");var r,o,i,a=this.match_alphabet_(e),c=this;function l(t,r){var o=t/e.length,i=Math.abs(n-r);return c.Match_Distance?o+i/c.Match_Distance:i?1:o}var s=this.Match_Threshold,u=t.indexOf(e,n);-1!=u&&(s=Math.min(l(0,u),s),-1!=(u=t.lastIndexOf(e,n+e.length))&&(s=Math.min(l(0,u),s)));var f=1<=h;m--){var y=a[t.charAt(m-1)];if(0===p?g[m]=(g[m+1]<<1|1)&y:g[m]=(g[m+1]<<1|1)&y|((i[m+1]|i[m])<<1|1)|i[m+1],g[m]&f){var b=l(p,m-1);if(b<=s){if(s=b,(u=m-1)>n)h=Math.max(1,2*n-u);else break}}}if(l(p+1,n)>s)break;i=g}return u},o.prototype.match_alphabet_=function(t){for(var e={},n=0;n2&&(this.diff_cleanupSemantic(i),this.diff_cleanupEfficiency(i));else if(t&&"object"==g(t)&&void 0===e&&void 0===n)i=t,r=this.diff_text1(i);else if("string"==typeof t&&e&&"object"==g(e)&&void 0===n)r=t,i=e;else if("string"==typeof t&&"string"==typeof e&&n&&"object"==g(n))r=t,i=n;else throw Error("Unknown call format to patch_make.");if(0===i.length)return[];for(var r,i,a=[],c=new o.patch_obj,l=0,s=0,u=0,f=r,d=r,p=0;p=2*this.Patch_Margin&&l&&(this.patch_addContext_(c,f),a.push(c),c=new o.patch_obj,l=0,f=d,s=u)}1!==h&&(s+=v.length),-1!==h&&(u+=v.length)}return l&&(this.patch_addContext_(c,f),a.push(c)),a},o.prototype.patch_deepCopy=function(t){for(var e=[],n=0;nthis.Match_MaxBits?-1!=(u=this.match_main(e,c.substring(0,this.Match_MaxBits),a))&&(-1==(l=this.match_main(e,c.substring(c.length-this.Match_MaxBits),a+c.length-this.Match_MaxBits))||u>=l)&&(u=-1):u=this.match_main(e,c,a),-1==u)o[i]=!1,r-=t[i].length2-t[i].length1;else if(o[i]=!0,r=u-a,f=-1==l?e.substring(u,u+c.length):e.substring(u,l+this.Match_MaxBits),c==f)e=e.substring(0,u)+this.diff_text2(t[i].diffs)+e.substring(u+c.length);else{var s=this.diff_main(c,f,!1);if(c.length>this.Match_MaxBits&&this.diff_levenshtein(s)/c.length>this.Patch_DeleteThreshold)o[i]=!1;else{this.diff_cleanupSemanticLossless(s);for(var u,f,d,p=0,h=0;ha[0][1].length){var c=e-a[0][1].length;a[0][1]=n.substring(a[0][1].length)+a[0][1],i.start1-=c,i.start2-=c,i.length1+=c,i.length2+=c}if(0==(a=(i=t[t.length-1]).diffs).length||0!=a[a.length-1][0])a.push(new o.Diff(0,n)),i.length1+=e,i.length2+=e;else if(e>a[a.length-1][1].length){var c=e-a[a.length-1][1].length;a[a.length-1][1]+=n.substring(0,c),i.length1+=c,i.length2+=c}return n},o.prototype.patch_splitMax=function(t){for(var e=this.Match_MaxBits,n=0;n2*e?(l.length1+=f.length,i+=f.length,s=!1,l.diffs.push(new o.Diff(u,f)),r.diffs.shift()):(f=f.substring(0,e-l.length1-this.Patch_Margin),l.length1+=f.length,i+=f.length,0===u?(l.length2+=f.length,a+=f.length):s=!1,l.diffs.push(new o.Diff(u,f)),f==r.diffs[0][1]?r.diffs.shift():r.diffs[0][1]=r.diffs[0][1].substring(f.length))}c=(c=this.diff_text2(l.diffs)).substring(c.length-this.Patch_Margin);var d=this.diff_text1(r.diffs).substring(0,this.Patch_Margin);""!==d&&(l.length1+=d.length,l.length2+=d.length,0!==l.diffs.length&&0===l.diffs[l.diffs.length-1][0]?l.diffs[l.diffs.length-1][1]+=d:l.diffs.push(new o.Diff(0,d))),s||t.splice(++n,0,l)}}},o.prototype.patch_toText=function(t){for(var e=[],n=0;nt[o-1][i]?--i:--o;return a},ex={get:function(t,e,n,r){var o=r||{},i=eb(ey(t,e,n||em,o),t,e,o);return"string"==typeof t&&"string"==typeof e&&(i.sequence=i.sequence.join("")),i}},e$="function"==typeof Array.isArray?Array.isArray:function(t){return t instanceof Array},ew="function"==typeof Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var n=t.length,r=0;r0&&u>0&&!e.objectHash&&"boolean"!=typeof e.matchByPosition&&(e.matchByPosition=!function(t,e,n,r){for(var o=0;oew(v.indices1,o-n)&&(d["_"+o]=[c[o],0,0],g.push(o));var m=!0;t.options&&t.options.arrays&&!1===t.options.arrays.detectMove&&(m=!1);var y=!1;t.options&&t.options.arrays&&t.options.arrays.includeValueOnMove&&(y=!0);var b=g.length;for(o=n;o0){for(var w=0;w=0;e--){var l=r["_"+(n=i[e])],s=o.splice(n,1)[0];3===l[2]&&a.push({index:l[1],value:s})}var u=(a=a.sort(ej.numericallyBy("index"))).length;for(e=0;e0)for(e=0;er?r++:a>=r&&c'+e+"")}},{key:"formatValue",value:function(t,e){t.out("
"+eJ(JSON.stringify(e,null,2))+"
")}},{key:"formatTextDiffString",value:function(t,e){var n=this.parseTextDiff(e);t.out('
    ');for(var r=0,o=n.length;r
    '+i.location.line+''+i.location.chr+'
    ');for(var a=i.pieces,c=0,l=a.length;c'+eJ(decodeURI(s.text))+"")}t.out("
    ")}t.out("
")}},{key:"rootBegin",value:function(t,e,n){t.out('
')}},{key:"rootEnd",value:function(t){t.out("
"+(t.hasArrows?'":""))}},{key:"nodeBegin",value:function(t,e,n,r,o){t.out('
  • '+n+"
    ")}},{key:"nodeEnd",value:function(t){t.out("
  • ")}},{key:"format_unchanged",value:function(t,e,n){void 0!==n&&(t.out('
    '),this.formatValue(t,n),t.out("
    "))}},{key:"format_movedestination",value:function(t,e,n){void 0!==n&&(t.out('
    '),this.formatValue(t,n),t.out("
    "))}},{key:"format_node",value:function(t,e,n){var r="a"===e._t?"array":"object";t.out('
      '),this.formatDeltaChildren(t,e,n),t.out("
    ")}},{key:"format_added",value:function(t,e){t.out('
    '),this.formatValue(t,e[0]),t.out("
    ")}},{key:"format_modified",value:function(t,e){t.out('
    '),this.formatValue(t,e[0]),t.out('
    '),this.formatValue(t,e[1]),t.out("
    ")}},{key:"format_deleted",value:function(t,e){t.out('
    '),this.formatValue(t,e[0]),t.out("
    ")}},{key:"format_moved",value:function(t,e){t.out('
    '),this.formatValue(t,e[0]),t.out('
    '+e[1]+"
    "),t.out('
    \n \n \n \n \n \n \n \n \n
    '),t.hasArrows=!0}},{key:"format_textdiff",value:function(t,e){t.out('
    '),this.formatTextDiffString(t,e[0]),t.out("
    ")}}]),e}(eV);function eJ(t){for(var e=t,n=[[/&/g,"&"],[//g,">"],[/'/g,"'"],[/"/g,"""]],r=0;r0?0:f)+"px",c.setAttribute("d",f>0?"M30,0 Q-10,"+Math.round(f/2)+" 26,"+(f-4):"M30,"+-f+" Q-10,"+Math.round(-f/2)+" 26,4"),a.style.display=""}catch(t){}})},eK=function(t,e,n){var r=e||document.body,o="jsondiffpatch-unchanged-",i={showing:o+"showing",hiding:o+"hiding",visible:o+"visible",hidden:o+"hidden"},a=r.classList;if(a){if(!n){a.remove(i.showing),a.remove(i.hiding),a.remove(i.visible),a.remove(i.hidden),!1===t&&a.add(i.hidden);return}!1===t?(a.remove(i.showing),a.add(i.visible),setTimeout(function(){a.add(i.hiding)},10)):(a.remove(i.hiding),a.add(i.showing),a.remove(i.hidden));var c=setInterval(function(){eG(r)},100);setTimeout(function(){a.remove(i.showing),a.remove(i.hiding),!1===t?(a.add(i.hidden),a.remove(i.visible)):(a.add(i.visible),a.remove(i.hidden)),setTimeout(function(){a.remove(i.visible),clearInterval(c)},n+400)},n)}},eW=void 0,eY=Object.freeze({showUnchanged:eK,hideUnchanged:function(t,e){return eK(!1,t,e)},default:eU,format:function(t,e){return eW||(eW=new eU),eW.format(t,e)}}),eZ=function(t){function e(){t2(this,e);var t=t6(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.includeMoveDestinations=!1,t}return t3(e,t),t5(e,[{key:"prepareContext",value:function(t){t4(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"prepareContext",this).call(this,t),t.indent=function(t){this.indentLevel=(this.indentLevel||0)+(void 0===t?1:t),this.indentPad=Array(this.indentLevel+1).join("  ")},t.row=function(e,n){t.out('
    '),t.out(t.indentPad),t.out('
    '),t.out(e),t.out('
    '),t.out(n),t.out("
    ")}}},{key:"typeFormattterErrorFormatter",value:function(t,e){t.row("",'
    '+e+"
    ")}},{key:"formatTextDiffString",value:function(t,e){var n=this.parseTextDiff(e);t.out('
      ');for(var r=0,o=n.length;r
      '+i.location.line+''+i.location.chr+'
      ');for(var a=i.pieces,c=0,l=a.length;c'+s.text+"")}t.out("
      ")}t.out("
    ")}},{key:"rootBegin",value:function(t,e,n){t.out(''),"node"===e&&(t.row("{"),t.indent()),"array"===n&&t.row('"_t": "a",',"Array delta (member names indicate array indices)")}},{key:"rootEnd",value:function(t,e){"node"===e&&(t.indent(-1),t.row("}")),t.out("
    ")}},{key:"nodeBegin",value:function(t,e,n,r,o){t.row("""+e+"": {"),"node"===r&&t.indent(),"array"===o&&t.row('"_t": "a",',"Array delta (member names indicate array indices)")}},{key:"nodeEnd",value:function(t,e,n,r,o,i){"node"===r&&t.indent(-1),t.row("}"+(i?"":","))}},{key:"format_unchanged",value:function(){}},{key:"format_movedestination",value:function(){}},{key:"format_node",value:function(t,e,n){this.formatDeltaChildren(t,e,n)}}]),e}(eV),eQ=function(t){return'
    "'+t+""
    "},eX={added:function(t,e,n,r){var o="
    ([newValue])
    ";return void 0===r?"new value"+o:"number"==typeof r?"insert at index "+r+o:"add property "+eQ(r)+o},modified:function(t,e,n,r){var o="
    ([previousValue, newValue])
    ";return void 0===r?"modify value"+o:"number"==typeof r?"modify at index "+r+o:"modify property "+eQ(r)+o},deleted:function(t,e,n,r){var o="
    ([previousValue, 0, 0])
    ";return void 0===r?"delete value"+o:"number"==typeof r?"remove index "+r+o:"delete property "+eQ(r)+o},moved:function(t,e,n,r){return'move from index '+r+' to index '+t[1]+""},textdiff:function(t,e,n,r){return"text diff"+(void 0===r?"":"number"==typeof r?" at index "+r:" at property "+eQ(r))+', format is a variation of Unidiff'}},e0=function(t,e){var n=this.getDeltaType(e),r=eX[n],o=r&&r.apply(r,Array.prototype.slice.call(arguments,1)),i=JSON.stringify(e,null,2);"textdiff"===n&&(i=i.split("\\n").join('\\n"+\n "')),t.indent(),t.row(i,o),t.indent(-1)};eZ.prototype.format_added=e0,eZ.prototype.format_modified=e0,eZ.prototype.format_deleted=e0,eZ.prototype.format_moved=e0,eZ.prototype.format_textdiff=e0;var e1=void 0,e2=Object.freeze({default:eZ,format:function(t,e){return e1||(e1=new eZ),e1.format(t,e)}}),e5=function(t){function e(){t2(this,e);var t=t6(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.includeMoveDestinations=!0,t}return t3(e,t),t5(e,[{key:"prepareContext",value:function(t){t4(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"prepareContext",this).call(this,t),t.result=[],t.path=[],t.pushCurrentOp=function(t){var e=t.op,n=t.value,r={op:e,path:this.currentPath()};void 0!==n&&(r.value=n),this.result.push(r)},t.pushMoveOp=function(t){var e=this.currentPath();this.result.push({op:"move",from:e,path:this.toPath(t)})},t.currentPath=function(){return"/"+this.path.join("/")},t.toPath=function(t){var e=this.path.slice();return e[e.length-1]=t,"/"+e.join("/")}}},{key:"typeFormattterErrorFormatter",value:function(t,e){t.out("[ERROR] "+e)}},{key:"rootBegin",value:function(){}},{key:"rootEnd",value:function(){}},{key:"nodeBegin",value:function(t,e,n){t.path.push(n)}},{key:"nodeEnd",value:function(t){t.path.pop()}},{key:"format_unchanged",value:function(){}},{key:"format_movedestination",value:function(){}},{key:"format_node",value:function(t,e,n){this.formatDeltaChildren(t,e,n)}},{key:"format_added",value:function(t,e){t.pushCurrentOp({op:"add",value:e[0]})}},{key:"format_modified",value:function(t,e){t.pushCurrentOp({op:"replace",value:e[1]})}},{key:"format_deleted",value:function(t){t.pushCurrentOp({op:"remove"})}},{key:"format_moved",value:function(t,e){var n=e[1];t.pushMoveOp(n)}},{key:"format_textdiff",value:function(){throw Error("Not implemented")}},{key:"format",value:function(t,e){var n={};return this.prepareContext(n),this.recurse(n,t,e),n.result}}]),e}(eV),e4=function(t){return t[t.length-1]},e3=function(t,e){var n=parseInt(t,10),r=parseInt(e,10);return isNaN(n)||isNaN(r)?0:r-n},e6=function(t,e){var n=Array(e.length+1).fill().map(function(){return[]});return t.map(function(t){var n=e.map(function(e){return e(t)}).indexOf(!0);return n<0&&(n=e.length),{item:t,position:n}}).reduce(function(t,e){return t[e.position].push(e.item),t},n)},e7=function(t){return"move"===t.op},e9=function(t){return"remove"===t.op},e8=function(t){var e,n=t7(e6(t,[e7,e9]),3),r=n[0],o=n[1],i=n[2];return[].concat(t9(((e=o).sort(function(t,e){var n=t.path.split("/"),r=e.path.split("/");return n.length!==r.length?n.length-r.length:e3(e4(n),e4(r))}),e)),t9(r),t9(i))},nt=void 0,ne=function(t,e){return nt||(nt=new e5),e8(nt.format(t,e))},nn=Object.freeze({default:e5,partitionOps:e6,format:ne,log:function(t,e){console.log(ne(t,e))}});function nr(t){return s.Z&&s.Z[t]||function(){for(var t=arguments.length,e=Array(t),n=0;n "),t.pushColor(no.added),this.formatValue(t,e[1]),t.popColor()}},{key:"format_deleted",value:function(t,e){this.formatValue(t,e[0])}},{key:"format_moved",value:function(t,e){t.out("==> "+e[1])}},{key:"format_textdiff",value:function(t,e){this.formatTextDiffString(t,e[0])}}]),e}(eV),na=void 0,nc=function(t,e){return na||(na=new ni),na.format(t,e)};Object.freeze({base:eH,html:eY,annotated:e2,jsonpatch:nn,console:Object.freeze({default:ni,format:nc,log:function(t,e){console.log(nc(t,e))}})});let nl=new eI({arrays:{detectMove:!1,includeValueOnMove:!1},textDiff:{minLength:1}}),ns=["docChanged","isGeneric","scrolledIntoView","selectionSet","storedMarksSet"];function nu(t){return{type:t.type,empty:t.empty,anchor:t.anchor,head:t.head,from:t.from,to:t.to}}function nf(t){return("00"+t).slice(-2)}let nd=t=>{let e=new Date(t);return[nf(e.getHours()),nf(e.getMinutes()),nf(e.getSeconds()),("000"+e.getMilliseconds()).slice(-3)].join(":")},np=/(<\/?[\w\d\s="']+>)/gim,nh=t=>t.replace(//g,">").replace(np,"$&"),nv=tM(new Map),ng=tM([]),nm=tM(void 0);function ny(){nv.set(new Map),ng.set([]),nm.set(void 0)}let nb=["jsonID","empty","anchor","from","head","to"],nx=["$anchor","$head","$cursor","$to","$from"],n$=["nodeAfter","nodeBefore","textOffset"];function nw(t){return nb.reduce((e,n)=>(e[n]=t[n],e),{})}function nk(t){return nb.concat(nx).reduce((e,n)=>{let r=t[n];if(r&&nx.includes(n)){let t={};n$.forEach(e=>{t[e]=r[e]}),r=Object.assign(Object.assign({},r),t)}return e[n]=r,e},{})}function n_(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function nj(t,e,n,r,o){var i=o?[].concat(w(o.path),[t]):[];return{id:"[".concat(i.join(","),"]"),index:t,key:e,value:n,depth:r,collapsed:!0,type:nO(n),path:i,parentId:o?o.id:null,circularOfId:null,children:[]}}function nO(t){return Array.isArray(t)?"array":t instanceof Map?"map":t instanceof Set?"set":t instanceof Date?"date":null===t?"null":g(t)}function nC(t,e,n,r,o,i,a,c,l,s,u){if((null===(f=u.omitKeys)||void 0===f?void 0:f.includes(e))||u.maxDepth&&r>u.maxDepth)return null;var f,d=nj(t,e,n,r,i),p=c.get(d.id);if(o?d.collapsed=!1:p&&!s?d.collapsed=p.collapsed:u.shouldExpandNode&&(d.collapsed=!u.shouldExpandNode(d)),a.set(d.id,d),function(t,e,n,r){if(e){if(t.collapsed&&(null==e?void 0:e.collapsed))return!1;if(r.stopCircularRecursion){if(r.isCircularNode)return r.isCircularNode(t,n);if("object"===t.type||"array"===t.type){var o=n.get(t.value);if(o&&t.id!==o.id)return t.circularOfId=o.id,!1;n.set(t.value,t)}}}return!0}(d,i,l,u)){var h=u.mapChildren&&u.mapChildren(n,nO(n),d),v=null!=h?h:function(t,e){switch(e){case"array":return t.map(function(t,e){return[e.toString(),t]});case"map":return Array.from(t.entries()).map(function(t,e){var n=$(t,2),r=n[0],o=n[1];return["[map entry ".concat(e,"]"),{"[key]":r,"[value]":o}]});case"set":return Array.from(t.values()).map(function(t,e){return["[set entry ".concat(e,"]"),t]});case"object":return Object.entries(t);default:return[]}}(n,nO(n));d.children=v.map(function(t,e){var n=$(t,2);return nC(e,n[0],n[1],r+1,!1,d,a,c,l,s,u)}).filter(function(t){return null!==t})}return d}var nR=function(t){var e,n,r,o,i=tM(t),a=(e=function(t){return t.recursionOpts},r=(n=!Array.isArray(i))?[i]:i,o=e.length<2,{subscribe:tM(void 0,function(t){var i=!1,a=[],c=0,l=k,s=function(){if(!c){l();var r=e(n?a[0]:a,t);o?t(r):l=R(r)?r:k}},u=r.map(function(t,e){return E(t,function(t){a[e]=t,c&=~(1<0),2&t.$$.dirty&&n(3,a=l.valueComponent)},n(4,i=p.props),s(),s=E(i,function(t){return n(1,l=t)}),[r,l,o,a,i,p,h,function(){console.info("%c [svelte-tree-view]: Property added to window._node","color: #b8e248"),console.log(r.value);try{"undefined"!=typeof window&&(window._node=r.value)}catch(t){console.error("Failed to set _node, window was undefined")}},function(){try{navigator.clipboard.writeText(JSON.stringify(r.value))}catch(t){console.error("Copying node to clipboard failed: ",t)}},function(){var t;o?d.toggleCollapse(r.id):r.circularOfId&&(d.expandAllNodesToNode(r.circularOfId),null===(t=c.querySelector('li[data-tree-id="'.concat(r.circularOfId,'"]')))||void 0===t||t.scrollIntoView())},function(t){return p.formatValue(t,r)},u]}tS("ul.svelte-ngcjq5.svelte-ngcjq5{display:flex;flex-direction:column;height:max-content;list-style:none;padding:0;padding-left:var(--tree-view-left-indent);margin:0;width:100%}li.svelte-ngcjq5.svelte-ngcjq5{align-items:baseline;display:flex;height:max-content;line-height:var(--tree-view-line-height);list-style:none;width:100%}li.svelte-ngcjq5+li.svelte-ngcjq5{margin-top:0.25em}.empty-block.svelte-ngcjq5.svelte-ngcjq5{visibility:hidden}.node-key.svelte-ngcjq5.svelte-ngcjq5{color:var(--tree-view-base0D);margin-right:var(--tree-view-key-margin-right)}.node-key.has-children.svelte-ngcjq5.svelte-ngcjq5{cursor:pointer}.node-key.p-left.svelte-ngcjq5.svelte-ngcjq5{padding-left:1.1em}.node-value.svelte-ngcjq5.svelte-ngcjq5{color:var(--tree-view-base0B);margin-right:0.5em;word-break:break-all}.node-value[data-type=number].svelte-ngcjq5.svelte-ngcjq5,.node-value[data-type=boolean].svelte-ngcjq5.svelte-ngcjq5{color:var(--tree-view-base09)}.node-value[data-type=null].svelte-ngcjq5.svelte-ngcjq5,.node-value[data-type=undefined].svelte-ngcjq5.svelte-ngcjq5{color:var(--tree-view-base08)}.node-value.expanded.svelte-ngcjq5.svelte-ngcjq5{color:var(--tree-view-base03)}.node-value.has-children.svelte-ngcjq5.svelte-ngcjq5{cursor:pointer}.arrow-btn.svelte-ngcjq5.svelte-ngcjq5{background:transparent;border:0;color:var(--tree-view-base0D);cursor:pointer;margin-right:0.7em;padding:0;transition:all 150ms ease 0s;transform:rotateZ(90deg);transform-origin:47% 43%;position:relative;line-height:1.1em;font-size:0.75em}.arrow-btn.collapsed.svelte-ngcjq5.svelte-ngcjq5{transform:rotateZ(0deg)}.buttons.svelte-ngcjq5.svelte-ngcjq5{display:flex;flex-wrap:wrap}.log-copy-button.svelte-ngcjq5.svelte-ngcjq5{background:transparent;border:0;color:var(--tree-view-base0D);cursor:pointer;margin:0;padding:0 0.5em}.log-copy-button.svelte-ngcjq5.svelte-ngcjq5:hover{background:rgba(255, 162, 177, 0.4);border-radius:2px;color:var(--tree-view-base07)}");var nF=function(t){v(r,t);var e,n=(e=function(){if("undefined"==typeof Reflect||!Reflect.construct||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,n=y(r);if(e){var o=y(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return m(this,t)});function r(t){var e;return d(this,r),tj(p(e=n.call(this)),t,nz,nq,S,{id:11}),e}return f(r)}(tO);function nL(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 nV(t){for(var e=1;e .left-panel{display:flex;flex-direction:column;flex-grow:1;overflow:scroll;padding:1em}.split-view > .right-panel{border-left:1px solid rgba(255, 162, 177, 0.2);display:flex;flex-direction:column;flex-grow:1;overflow:scroll;padding:1em}.split-view .hidden{visibility:hidden}");var nW=function(t){return{}},nY=function(t){return{class:"right-panel"}},nZ=function(t){return{}},nQ=function(t){return{class:"left-panel"}};function nX(t){var e,n,r,o=t[1].left,i=P(o,t,t[0],nQ),a=t[1].right,c=P(a,t,t[0],nY);return{c:function(){e=H("section"),i&&i.c(),n=G(),c&&c.c(),Y(e,"class","split-view svelte-kkh9zd")},m:function(t,o){F(t,e,o),i&&i.m(e,null),z(e,n),c&&c.m(e,null),r=!0},p:function(t,e){var n=$(e,1)[0];i&&i.p&&(!r||1&n)&&B(i,o,t,t[0],r?M(o,t[0],n,nZ):T(t[0]),nQ),c&&c.p&&(!r||1&n)&&B(c,a,t,t[0],r?M(a,t[0],n,nW):T(t[0]),nY)},i:function(t){r||(tx(i,t),tx(c,t),r=!0)},o:function(t){t$(i,t),t$(c,t),r=!1},d:function(t){t&&L(e),i&&i.d(t),c&&c.d(t)}}}function n0(t,e,n){var r=e.$$slots,o=e.$$scope;return t.$$set=function(t){"$$scope"in t&&n(0,o=t.$$scope)},[o,void 0===r?{}:r]}var n1=function(t){v(r,t);var e,n=(e=function(){if("undefined"==typeof Reflect||!Reflect.construct||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,n=y(r);if(e){var o=y(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return m(this,t)});function r(t){var e;return d(this,r),tj(p(e=n.call(this)),t,n0,nX,S,{}),e}return f(r)}(tO);function n2(t){var e,n,r,o,i,a=t[3].default,c=P(a,t,t[2],null);return{c:function(){e=H("button"),c&&c.c(),Y(e,"class",n=q("".concat(t[1].class||""))+" svelte-1bsnhi4"),tt(e,"selected",t[0])},m:function(n,a){F(n,e,a),c&&c.m(e,null),r=!0,o||(i=[W(e,"click",t[4]),W(e,"mouseover",t[5]),W(e,"mouseenter",t[6]),W(e,"mouseleave",t[7]),W(e,"focus",t[8])],o=!0)},p:function(t,o){var i=$(o,1)[0];c&&c.p&&(!r||4&i)&&B(c,a,t,t[2],r?M(a,t[2],i,null):T(t[2]),null),(!r||2&i&&n!==(n=q("".concat(t[1].class||""))+" svelte-1bsnhi4"))&&Y(e,"class",n),(!r||3&i)&&tt(e,"selected",t[0])},i:function(t){r||(tx(c,t),r=!0)},o:function(t){t$(c,t),r=!1},d:function(t){t&&L(e),c&&c.d(t),o=!1,C(i)}}}function n5(t,e,n){var r=e,o=r.$$slots,i=r.$$scope,a=e.selected,c=void 0!==a&&a;return t.$$set=function(t){n(1,e=_(_({},e),I(t))),"selected"in t&&n(0,c=t.selected),"$$scope"in t&&n(2,i=t.$$scope)},e=I(e),[c,e,i,void 0===o?{}:o,function(e){ta.call(this,t,e)},function(e){ta.call(this,t,e)},function(e){ta.call(this,t,e)},function(e){ta.call(this,t,e)},function(e){ta.call(this,t,e)}]}tS("button.svelte-1bsnhi4{background:transparent;border:0;border-radius:2px;color:#d3d3d9;cursor:pointer;font-size:var(--font-small);padding:6px 10px;text-transform:uppercase}button.svelte-1bsnhi4:hover{background:rgba(255, 162, 177, 0.4);color:#fff}button.selected.svelte-1bsnhi4{background:rgba(255, 162, 177, 0.4)}");var n4=function(t){v(r,t);var e,n=(e=function(){if("undefined"==typeof Reflect||!Reflect.construct||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,n=y(r);if(e){var o=y(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return m(this,t)});function r(t){var e;return d(this,r),tj(p(e=n.call(this)),t,n5,n2,S,{selected:0}),e}return f(r)}(tO);function n3(t){var e;return{c:function(){e=J("log")},m:function(t,n){F(t,e,n)},d:function(t){t&&L(e)}}}function n6(t){var e,n,r,o,i,a,c,l;return(i=new n4({props:{$$slots:{default:[n3]},$$scope:{ctx:t}}})).$on("click",t[6]),c=new nK({props:{class:"tree-view",data:t[0],showLogButton:!0,showCopyButton:!0,valueFormatter:rn}}),{c:function(){e=H("div"),n=H("div"),(r=H("h2")).textContent="Current doc",o=G(),tw(i.$$.fragment),a=G(),tw(c.$$.fragment),Y(n,"class","top-row svelte-1lnyndi"),Y(e,"slot","left"),Y(e,"class","left-panel svelte-1lnyndi")},m:function(t,s){F(t,e,s),z(e,n),z(n,r),z(n,o),tk(i,n,null),z(e,a),tk(c,e,null),l=!0},p:function(t,e){var n={};1024&e&&(n.$$scope={dirty:e,ctx:t}),i.$set(n);var r={};1&e&&(r.data=t[0]),c.$set(r)},i:function(t){l||(tx(i.$$.fragment,t),tx(c.$$.fragment,t),l=!0)},o:function(t){t$(i.$$.fragment,t),t$(c.$$.fragment,t),l=!1},d:function(t){t&&L(e),t_(i),t_(c)}}}function n7(t){var e;return{c:function(){Y(e=H("span"),"class","caret-icon svelte-1lnyndi"),tt(e,"expanded",t[5])},m:function(t,n){F(t,e,n)},p:function(t,n){32&n&&tt(e,"expanded",t[5])},d:function(t){t&&L(e)}}}function n9(t){var e,n;return e=new nK({props:{class:"tree-view",data:t[2]}}),{c:function(){tw(e.$$.fragment)},m:function(t,r){tk(e,t,r),n=!0},p:function(t,n){var r={};4&n&&(r.data=t[2]),e.$set(r)},i:function(t){n||(tx(e.$$.fragment,t),n=!0)},o:function(t){t$(e.$$.fragment,t),n=!1},d:function(t){t_(e,t)}}}function n8(t){var e;return{c:function(){(e=H("div")).textContent="No active marks",Y(e,"class","no-marks svelte-1lnyndi")},m:function(t,n){F(t,e,n)},p:k,i:k,o:k,d:function(t){t&&L(e)}}}function rt(t){(i=new n4({props:{class:"selection-btn",$$slots:{default:[n7]},$$scope:{ctx:t}}})).$on("click",t[7]),c=new nK({props:{class:"tree-view",data:t[1]}});var e,n,r,o,i,a,c,l,s,u,f,d,p,h,v,g,m,y,b,x=[n8,n9],$=[];function w(t,e){return 0===t[2].length?0:1}return p=$[d=w(t)]=x[d](t),y=new nK({props:{class:"tree-view",data:{nodeSize:t[3],childCount:t[4]}}}),{c:function(){e=H("div"),n=H("div"),(r=H("h2")).textContent="Selection",o=G(),tw(i.$$.fragment),a=G(),tw(c.$$.fragment),l=G(),s=H("div"),(u=H("h2")).textContent="Active marks",f=G(),p.c(),h=G(),v=H("div"),(g=H("h2")).textContent="Document stats",m=G(),tw(y.$$.fragment),Y(n,"class","top-row svelte-1lnyndi"),Y(e,"slot","right"),Y(e,"class","right-panel svelte-1lnyndi")},m:function(t,p){F(t,e,p),z(e,n),z(n,r),z(n,o),tk(i,n,null),z(e,a),tk(c,e,null),z(e,l),z(e,s),z(s,u),z(s,f),$[d].m(s,null),z(e,h),z(e,v),z(v,g),z(v,m),tk(y,v,null),b=!0},p:function(t,e){var n={};1056&e&&(n.$$scope={dirty:e,ctx:t}),i.$set(n);var r={};2&e&&(r.data=t[1]),c.$set(r);var o=d;(d=w(t))===o?$[d].p(t,e):(ty(),t$($[o],1,1,function(){$[o]=null}),tb(),(p=$[d])?p.p(t,e):(p=$[d]=x[d](t)).c(),tx(p,1),p.m(s,null));var a={};24&e&&(a.data={nodeSize:t[3],childCount:t[4]}),y.$set(a)},i:function(t){b||(tx(i.$$.fragment,t),tx(c.$$.fragment,t),tx(p),tx(y.$$.fragment,t),b=!0)},o:function(t){t$(i.$$.fragment,t),t$(c.$$.fragment,t),t$(p),t$(y.$$.fragment,t),b=!1},d:function(t){t&&L(e),t_(i),t_(c),$[d].d(),t_(y)}}}function re(t){var e,n;return e=new n1({props:{$$slots:{right:[rt],left:[n6]},$$scope:{ctx:t}}}),{c:function(){tw(e.$$.fragment)},m:function(t,r){tk(e,t,r),n=!0},p:function(t,n){var r=$(n,1)[0],o={};1087&r&&(o.$$scope={dirty:r,ctx:t}),e.$set(o)},i:function(t){n||(tx(e.$$.fragment,t),n=!0)},o:function(t){t$(e.$$.fragment,t),n=!1},d:function(t){t_(e,t)}}}function rn(t,e){if("object"===e.type&&t.type)return"{} ".concat(t.type)}function rr(t,e,n){var r=tR("editor-view").view,o=r.state.doc.toJSON(),i=nw(r.state.selection),a=r.state,c=[],l=r.state.doc.nodeSize,s=r.state.doc.childCount,u=!1;return nm.subscribe(function(t){if(t){var e=t.state;a=e,n(0,o=e.doc.toJSON()),n(1,i=u?nk(e.selection):nw(e.selection)),n(2,c=function(t){if(t.selection.empty){let e=t.selection.$from,n=t.storedMarks;return n?n.map(t=>t.type.name):e.marks().map(t=>t.type.name)}{let e=t.selection.$head,n=t.selection.$anchor,r=new Set;return e.marks().forEach(t=>r.add(t.type.name)),n.marks().forEach(t=>r.add(t.type.name)),Array.from(r)}}(e)),n(3,l=e.doc.nodeSize),n(4,s=e.doc.childCount)}}),[o,i,c,l,s,u,function(){console.log(o),window._doc=o},function(){n(5,u=!u),u?n(1,i=nk(a.selection)):n(1,i=nw(a.selection))}]}tS('@charset "UTF-8";.top-row.svelte-1lnyndi{align-items:center;display:flex;justify-content:space-between}.left-panel.svelte-1lnyndi{overflow:scroll}.right-panel.svelte-1lnyndi{border-left:1px solid rgba(255, 162, 177, 0.2);flex-grow:0;min-width:200px;width:200px}.split-view .selection-btn{height:24px;width:35px}.caret-icon.svelte-1lnyndi::before{content:"▶"}.caret-icon.expanded.svelte-1lnyndi::before{content:"▼"}.no-marks.svelte-1lnyndi{color:#85d9ef;margin:0.5em 0 1em 1em}.split-view .tree-view{margin:0.5em 0 1em 0}');var ro=function(t){v(r,t);var e,n=(e=function(){if("undefined"==typeof Reflect||!Reflect.construct||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,n=y(r);if(e){var o=y(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return m(this,t)});function r(t){var e;return d(this,r),tj(p(e=n.call(this)),t,rr,re,S,{}),e}return f(r)}(tO);function ri(t,e,n){if("array"===e)return[]}function ra(t,e){if("array"===e&&0===t[1]&&0===t[2]||"array"===e&&"string"==typeof t[0]&&0===t[1]&&2===t[2]||"array"===e&&1===t.length&&"object"==typeof t[0])return[];if("object"!==e||"a"!==t._t)return;let n=[];for(let e in t)"_t"!==e&&("_"===e.charAt(0)?n.push([e.substr(1),t[e]]):n.push([e,t[e]]));return n}function rc(t,e,n){var r=t.slice();return r[7]=e[n],r[9]=n,r}function rl(t,e,n){var r=t.slice();return r[10]=e[n],r}function rs(t){var e,n,r,o=t[7].entries.length+"";return{c:function(){e=J("["),n=J(o),r=J("]")},m:function(t,o){F(t,e,o),F(t,n,o),F(t,r,o)},p:function(t,e){1&e&&o!==(o=t[7].entries.length+"")&&Q(n,o)},d:function(t){t&&L(e),t&&L(n),t&&L(r)}}}function ru(t){var e;return{c:function(){Y(e=H("span"),"class","caret-icon svelte-s055jw"),tt(e,"expanded",t[7].expanded)},m:function(t,n){F(t,e,n)},p:function(t,n){1&n&&tt(e,"expanded",t[7].expanded)},d:function(t){t&&L(e)}}}function rf(t){for(var e,n=t[7].entries,r=[],o=0;o1&&ru(t);function g(){return t[4](t[7],t[9])}function m(){return t[5](t[7])}var y=t[7].isGroup&&t[7].expanded&&rf(t);return{c:function(){var e,n;r=H("li"),o=H("button"),i=H("span"),a=J(p),c=G(),h&&h.c(),l=G(),v&&v.c(),s=G(),y&&y.c(),u=K(),Y(o,"class","svelte-s055jw"),tt(o,"is-group",t[7].isGroup),Y(r,"class","svelte-s055jw"),tt(r,"selected",!t[7].expanded&&t[1]===(null===(e=t[7])||void 0===e?void 0:null===(n=e.topEntry)||void 0===n?void 0:n.id))},m:function(t,e){F(t,r,e),z(r,o),z(o,i),z(i,a),z(i,c),h&&h.m(i,null),z(o,l),v&&v.m(o,null),F(t,s,e),y&&y.m(t,e),F(t,u,e),f||(d=[W(o,"click",g),W(o,"dblclick",m)],f=!0)},p:function(e,n){var c,l,s,f;t=e,1&n&&p!==(p=(null===(c=t[7])||void 0===c?void 0:null===(l=c.topEntry)||void 0===l?void 0:l.timeStr)+"")&&Q(a,p),t[7].isGroup?h?h.p(t,n):((h=rs(t)).c(),h.m(i,null)):h&&(h.d(1),h=null),t[7].isGroup&&t[7].entries.length>1?v?v.p(t,n):((v=ru(t)).c(),v.m(o,null)):v&&(v.d(1),v=null),1&n&&tt(o,"is-group",t[7].isGroup),3&n&&tt(r,"selected",!t[7].expanded&&t[1]===(null===(s=t[7])||void 0===s?void 0:null===(f=s.topEntry)||void 0===f?void 0:f.id)),t[7].isGroup&&t[7].expanded?y?y.p(t,n):((y=rf(t)).c(),y.m(u.parentNode,u)):y&&(y.d(1),y=null)},d:function(t){t&&L(r),h&&h.d(),v&&v.d(),t&&L(s),y&&y.d(t),t&&L(u),f=!1,C(d)}}}function rh(t){for(var e,n=t[0],r=[],o=0;o",a=G(),c=H("span"),l=J(u),Y(n,"class","deleted svelte-17gp0ui"),Y(i,"class","arrow svelte-17gp0ui"),Y(c,"class","added svelte-17gp0ui"),Y(e,"class","updated svelte-17gp0ui")},m:function(t,s){F(t,e,s),z(e,n),z(n,r),z(e,o),z(e,i),z(e,a),z(e,c),z(c,l)},p:function(t,e){2&e&&s!==(s=rE(t[1][0])+"")&&Q(r,s),2&e&&u!==(u=rE(t[1][1])+"")&&Q(l,u)},d:function(t){t&&L(e)}}}function rk(t){var e,n,r=rE(t[1][0])+"";return{c:function(){e=H("span"),n=J(r),Y(e,"class","added svelte-17gp0ui")},m:function(t,r){F(t,e,r),z(e,n)},p:function(t,e){2&e&&r!==(r=rE(t[1][0])+"")&&Q(n,r)},d:function(t){t&&L(e)}}}function r_(t){var e,n,r=t[3].raw+"";return{c:function(){e=H("span"),n=J(r)},m:function(t,r){F(t,e,r),z(e,n)},p:function(t,e){2&e&&r!==(r=t[3].raw+"")&&Q(n,r)},d:function(t){t&&L(e)}}}function rj(t){var e,n,r=t[3].add+"";return{c:function(){e=H("span"),n=J(r),Y(e,"class","added svelte-17gp0ui")},m:function(t,r){F(t,e,r),z(e,n)},p:function(t,e){2&e&&r!==(r=t[3].add+"")&&Q(n,r)},d:function(t){t&&L(e)}}}function rO(t){var e,n,r=t[3].delete+"";return{c:function(){e=H("span"),n=J(r),Y(e,"class","deleted svelte-17gp0ui")},m:function(t,r){F(t,e,r),z(e,n)},p:function(t,e){2&e&&r!==(r=t[3].delete+"")&&Q(n,r)},d:function(t){t&&L(e)}}}function rC(t){function e(t,e){return t[3].delete?rO:t[3].add?rj:r_}var n,r=e(t),o=r(t);return{c:function(){o.c(),n=K()},m:function(t,e){o.m(t,e),F(t,n,e)},p:function(t,i){r===(r=e(t))&&o?o.p(t,i):(o.d(1),(o=r(t))&&(o.c(),o.m(n.parentNode,n)))},d:function(t){o.d(t),t&&L(n)}}}function rR(t){function e(t,e){return(2&e&&(n=null),null==n&&(n=!!Array.isArray(t[1])),n)?rb:ry}var n,r,o=e(t,-1),i=o(t);return{c:function(){i.c(),r=K()},m:function(t,e){i.m(t,e),F(t,r,e)},p:function(t,n){var a=$(n,1)[0];o===(o=e(t,a))&&i?i.p(t,a):(i.d(1),(i=o(t))&&(i.c(),i.m(r.parentNode,r)))},i:k,o:k,d:function(t){i.d(t),t&&L(r)}}}function rS(t){return t.split(/\n/gm).slice(1).map(function(t){return n_({},t.startsWith("-")?"delete":t.startsWith("+")?"add":"raw",t.slice(1).replace(/\s/gm,"\xa0"))})}function rE(t){return"string"==typeof t?t:function(t){if(null===t)return"null";var e=JSON.stringify(t);return void 0===e?"undefined":e.length>22?"".concat(e.slice(0,15),"…").concat(e.slice(-5)):e}(t)}function rD(t,e,n){var r,o=e.node,i=e.defaultFormatter;return t.$$set=function(t){"node"in t&&n(2,o=t.node),"defaultFormatter"in t&&n(0,i=t.defaultFormatter)},t.$$.update=function(){4&t.$$.dirty&&n(1,r=o.value)},[i,r,o]}tS(".added.svelte-17gp0ui.svelte-17gp0ui{display:inline-block;background:#87cc86;border-radius:1px;color:green;padding:1px 2px;text-indent:0;min-height:1ex}.deleted.svelte-17gp0ui.svelte-17gp0ui{display:inline-block;background:#d66363;border-radius:1px;color:#d3d3d9;padding:1px 2px;text-decoration:line-through;text-indent:0;min-height:1ex}.updated.svelte-17gp0ui.svelte-17gp0ui{word-break:break-all}.updated.svelte-17gp0ui .added.svelte-17gp0ui{background:#eaea37}.arrow.svelte-17gp0ui.svelte-17gp0ui{color:#87cc86}");var rA=function(t){v(r,t);var e,n=(e=function(){if("undefined"==typeof Reflect||!Reflect.construct||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,n=y(r);if(e){var o=y(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return m(this,t)});function r(t){var e;return d(this,r),tj(p(e=n.call(this)),t,rD,rR,S,{node:2,defaultFormatter:0}),e}return f(r)}(tO);function rP(t){var e,n,r,o;return(r=new rg({props:{listItems:t[4],selectedId:(null===(e=t[0])||void 0===e?void 0:e.id)||""}})).$on("click-item",t[7]),r.$on("dblclick-item",t[8]),{c:function(){n=H("div"),tw(r.$$.fragment),Y(n,"slot","left"),Y(n,"class","left-panel svelte-lq0bhc")},m:function(t,e){F(t,n,e),tk(r,n,null),o=!0},p:function(t,e){var n,o={};16&e&&(o.listItems=t[4]),1&e&&(o.selectedId=(null===(n=t[0])||void 0===n?void 0:n.id)||""),r.$set(o)},i:function(t){o||(tx(r.$$.fragment,t),o=!0)},o:function(t){t$(r.$$.fragment,t),o=!1},d:function(t){t&&L(n),t_(r)}}}function rN(t){var e;return{c:function(){(e=H("div")).textContent="Docs are equal.",Y(e,"class","equal-diff svelte-lq0bhc")},m:function(t,n){F(t,e,n)},p:k,i:k,o:k,d:function(t){t&&L(e)}}}function rM(t){var e,n,r,o,i,a,c,l,s,u,f,d,p,h=t[0].contentDiff&&rB(t),v=t[0].selectionDiff&&rI(t),g=t[0].selectionHtml.length>0&&rz(t),m=t[1]&&rL(t);(f=new n4({props:{$$slots:{default:[rU]},$$scope:{ctx:t}}})).$on("click",t[5]);var y=t[1]&&rJ(t);return{c:function(){e=H("div"),h&&h.c(),n=G(),v&&v.c(),r=G(),g&&g.c(),o=G(),i=H("div"),a=H("div"),(c=H("h2")).textContent="Transaction",l=G(),s=H("div"),m&&m.c(),u=G(),tw(f.$$.fragment),d=G(),y&&y.c(),Y(s,"class","transaction-buttons svelte-lq0bhc"),Y(a,"class","title-container svelte-lq0bhc"),Y(i,"class","entry-row svelte-lq0bhc")},m:function(t,b){F(t,e,b),h&&h.m(e,null),z(e,n),v&&v.m(e,null),z(e,r),g&&g.m(e,null),z(e,o),z(e,i),z(i,a),z(a,c),z(a,l),z(a,s),m&&m.m(s,null),z(s,u),tk(f,s,null),z(i,d),y&&y.m(i,null),p=!0},p:function(t,a){t[0].contentDiff?h?(h.p(t,a),1&a&&tx(h,1)):((h=rB(t)).c(),tx(h,1),h.m(e,n)):h&&(ty(),t$(h,1,1,function(){h=null}),tb()),t[0].selectionDiff?v?(v.p(t,a),1&a&&tx(v,1)):((v=rI(t)).c(),tx(v,1),v.m(e,r)):v&&(ty(),t$(v,1,1,function(){v=null}),tb()),t[0].selectionHtml.length>0?g?(g.p(t,a),1&a&&tx(g,1)):((g=rz(t)).c(),tx(g,1),g.m(e,o)):g&&(ty(),t$(g,1,1,function(){g=null}),tb()),t[1]?m?(m.p(t,a),2&a&&tx(m,1)):((m=rL(t)).c(),tx(m,1),m.m(s,u)):m&&(ty(),t$(m,1,1,function(){m=null}),tb());var c={};8194&a&&(c.$$scope={dirty:a,ctx:t}),f.$set(c),t[1]?y?(y.p(t,a),2&a&&tx(y,1)):((y=rJ(t)).c(),tx(y,1),y.m(i,null)):y&&(ty(),t$(y,1,1,function(){y=null}),tb())},i:function(t){p||(tx(h),tx(v),tx(g),tx(m),tx(f.$$.fragment,t),tx(y),p=!0)},o:function(t){t$(h),t$(v),t$(g),t$(m),t$(f.$$.fragment,t),t$(y),p=!1},d:function(t){t&&L(e),h&&h.d(),v&&v.d(),g&&g.d(),m&&m.d(),t_(f),y&&y.d()}}}function rB(t){var e,n,r,o,i,a,c,l;return i=new n4({props:{class:"hidden",$$slots:{default:[rT]},$$scope:{ctx:t}}}),c=new nK({props:{class:"tree-view",data:t[0].contentDiff,showLogButton:!0,showCopyButton:!0,valueComponent:rA,recursionOpts:{maxDepth:12,mapChildren:ra,shouldExpandNode:rW}}}),{c:function(){e=H("div"),n=H("div"),(r=H("h2")).textContent="Doc diff",o=G(),tw(i.$$.fragment),a=G(),tw(c.$$.fragment),Y(n,"class","title-container svelte-lq0bhc"),Y(e,"class","entry-row svelte-lq0bhc")},m:function(t,s){F(t,e,s),z(e,n),z(n,r),z(n,o),tk(i,n,null),z(e,a),tk(c,e,null),l=!0},p:function(t,e){var n={};8192&e&&(n.$$scope={dirty:e,ctx:t}),i.$set(n);var r={};1&e&&(r.data=t[0].contentDiff),c.$set(r)},i:function(t){l||(tx(i.$$.fragment,t),tx(c.$$.fragment,t),l=!0)},o:function(t){t$(i.$$.fragment,t),t$(c.$$.fragment,t),l=!1},d:function(t){t&&L(e),t_(i),t_(c)}}}function rT(t){var e;return{c:function(){e=J("log")},m:function(t,n){F(t,e,n)},d:function(t){t&&L(e)}}}function rI(t){var e,n,r,o,i,a,c,l;return i=new n4({props:{class:"hidden",$$slots:{default:[rq]},$$scope:{ctx:t}}}),c=new nK({props:{class:"tree-view",data:t[0].selectionDiff,valueComponent:rA,recursionOpts:{mapChildren:ri,shouldExpandNode:rY}}}),{c:function(){e=H("div"),n=H("div"),(r=H("h2")).textContent="Selection diff",o=G(),tw(i.$$.fragment),a=G(),tw(c.$$.fragment),Y(n,"class","title-container svelte-lq0bhc"),Y(e,"class","entry-row svelte-lq0bhc")},m:function(t,s){F(t,e,s),z(e,n),z(n,r),z(n,o),tk(i,n,null),z(e,a),tk(c,e,null),l=!0},p:function(t,e){var n={};8192&e&&(n.$$scope={dirty:e,ctx:t}),i.$set(n);var r={};1&e&&(r.data=t[0].selectionDiff),c.$set(r)},i:function(t){l||(tx(i.$$.fragment,t),tx(c.$$.fragment,t),l=!0)},o:function(t){t$(i.$$.fragment,t),t$(c.$$.fragment,t),l=!1},d:function(t){t&&L(e),t_(i),t_(c)}}}function rq(t){var e;return{c:function(){e=J("log")},m:function(t,n){F(t,e,n)},d:function(t){t&&L(e)}}}function rz(t){var e,n,r,o,i,a,c,l,s,u=t[0].selectionHtml+"";return i=new n4({props:{class:"hidden",$$slots:{default:[rF]},$$scope:{ctx:t}}}),{c:function(){e=H("div"),n=H("div"),(r=H("h2")).textContent="Selection content",o=G(),tw(i.$$.fragment),a=G(),c=H("pre"),l=H("code"),Y(n,"class","title-container svelte-lq0bhc"),Y(c,"class","selection-html svelte-lq0bhc"),Y(e,"class","entry-row svelte-lq0bhc")},m:function(t,f){F(t,e,f),z(e,n),z(n,r),z(n,o),tk(i,n,null),z(e,a),z(e,c),z(c,l),l.innerHTML=u,s=!0},p:function(t,e){var n={};8192&e&&(n.$$scope={dirty:e,ctx:t}),i.$set(n),(!s||1&e)&&u!==(u=t[0].selectionHtml+"")&&(l.innerHTML=u)},i:function(t){s||(tx(i.$$.fragment,t),s=!0)},o:function(t){t$(i.$$.fragment,t),s=!1},d:function(t){t&&L(e),t_(i)}}}function rF(t){var e;return{c:function(){e=J("log")},m:function(t,n){F(t,e,n)},d:function(t){t&&L(e)}}}function rL(t){var e,n,r,o;return(e=new n4({props:{$$slots:{default:[rV]},$$scope:{ctx:t}}})).$on("click",t[9]),(r=new n4({props:{$$slots:{default:[rH]},$$scope:{ctx:t}}})).$on("click",t[6]),{c:function(){tw(e.$$.fragment),n=G(),tw(r.$$.fragment)},m:function(t,i){tk(e,t,i),F(t,n,i),tk(r,t,i),o=!0},p:function(t,n){var o={};8196&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o);var i={};8192&n&&(i.$$scope={dirty:n,ctx:t}),r.$set(i)},i:function(t){o||(tx(e.$$.fragment,t),tx(r.$$.fragment,t),o=!0)},o:function(t){t$(e.$$.fragment,t),t$(r.$$.fragment,t),o=!1},d:function(t){t_(e,t),t&&L(n),t_(r,t)}}}function rV(t){var e,n=t[2]?"collapse":"expand";return{c:function(){e=J(n)},m:function(t,n){F(t,e,n)},p:function(t,r){4&r&&n!==(n=t[2]?"collapse":"expand")&&Q(e,n)},d:function(t){t&&L(e)}}}function rH(t){var e;return{c:function(){e=J("log")},m:function(t,n){F(t,e,n)},d:function(t){t&&L(e)}}}function rU(t){var e,n=t[1]?"hide":"show";return{c:function(){e=J(n)},m:function(t,n){F(t,e,n)},p:function(t,r){2&r&&n!==(n=t[1]?"hide":"show")&&Q(e,n)},d:function(t){t&&L(e)}}}function rJ(t){var e,n;return e=new nK({props:{class:"tree-view",data:t[0].trs[0],showLogButton:!0,showCopyButton:!0,recursionOpts:t[3]}}),{c:function(){tw(e.$$.fragment)},m:function(t,r){tk(e,t,r),n=!0},p:function(t,n){var r={};1&n&&(r.data=t[0].trs[0]),8&n&&(r.recursionOpts=t[3]),e.$set(r)},i:function(t){n||(tx(e.$$.fragment,t),n=!0)},o:function(t){t$(e.$$.fragment,t),n=!1},d:function(t){t_(e,t)}}}function rG(t){var e,n,r,o,i=[rM,rN],a=[];return r=a[n=t[0]?0:1]=i[n](t),{c:function(){e=H("div"),r.c(),Y(e,"slot","right"),Y(e,"class","right-panel")},m:function(t,r){F(t,e,r),a[n].m(e,null),o=!0},p:function(t,o){var c=n;(n=t[0]?0:1)===c?a[n].p(t,o):(ty(),t$(a[c],1,1,function(){a[c]=null}),tb(),(r=a[n])?r.p(t,o):(r=a[n]=i[n](t)).c(),tx(r,1),r.m(e,null))},i:function(t){o||(tx(r),o=!0)},o:function(t){t$(r),o=!1},d:function(t){t&&L(e),a[n].d()}}}function rK(t){var e,n;return e=new n1({props:{$$slots:{right:[rG],left:[rP]},$$scope:{ctx:t}}}),{c:function(){tw(e.$$.fragment)},m:function(t,r){tk(e,t,r),n=!0},p:function(t,n){var r=$(n,1)[0],o={};8223&r&&(o.$$scope={dirty:r,ctx:t}),e.$set(o)},i:function(t){n||(tx(e.$$.fragment,t),n=!0)},o:function(t){t$(e.$$.fragment,t),n=!1},d:function(t){t_(e,t)}}}tS(".hidden{display:none;visibility:hidden}.left-panel.svelte-lq0bhc.svelte-lq0bhc{flex-grow:0;padding:0;min-width:190px;width:190px}.title-container.svelte-lq0bhc.svelte-lq0bhc{align-items:center;display:flex}.transaction-buttons.svelte-lq0bhc.svelte-lq0bhc{margin-left:2rem}.entry-row.svelte-lq0bhc+.entry-row.svelte-lq0bhc{margin-top:1em}.selection-html.svelte-lq0bhc.svelte-lq0bhc{font-weight:100;margin:0.5em 0 0 0;padding:0}.equal-diff.svelte-lq0bhc.svelte-lq0bhc{align-items:center;color:rgb(255, 162, 177);display:flex;font-size:14px;height:100%;justify-content:center;width:100%}");var rW=function(){return!0},rY=function(){return!0};function rZ(t,e,n){A(t,nv,function(t){return n(10,o=t)}),A(t,ng,function(t){return n(11,i=t)});var r,o,i,a=void 0,c=!1,l=tR("editor-view").replaceEditorContent,s=!1,u={maxDepth:24,stopCircularRecursion:!0,omitKeys:["schema"],shouldExpandNode:function(){return s}};return nm.subscribe(function(t){t&&n(0,a=t)}),t.$$.update=function(){3072&t.$$.dirty&&n(4,r=i.map(function(t){return{isGroup:t.isGroup,topEntry:o.get(t.topEntryId),entries:t.entryIds.map(function(t){return o.get(t)}),expanded:t.expanded}}))},[a,c,s,u,r,function(){n(1,c=!c)},function(){console.info("%c [prosemirror-dev-toolkit]: Property added to window._trs","color: #b8e248"),console.log(null==a?void 0:a.trs),window._trs=null==a?void 0:a.trs},function(t){var e=t.detail,i=e.id,c=void 0===i?"":i,l=e.groupIdx,s=e.wasTopNode;if(n(0,a=o.get(c)),a){var u=r[l];u.isGroup&&u.entries.length>1&&s&&ng.update(function(t){return t.map(function(t,e){return e!==l?t:Object.assign(Object.assign({},t),{expanded:!t.expanded})})})}},function(t){n(0,a=o.get(t.detail.id||"")),a&&l(a.state)},function(){n(2,s=!s),n(3,u=Object.assign(Object.assign({},u),{shouldExpandNode:function(){return s}}))},o,i]}var rQ=function(t){v(r,t);var e,n=(e=function(){if("undefined"==typeof Reflect||!Reflect.construct||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,n=y(r);if(e){var o=y(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return m(this,t)});function r(t){var e;return d(this,r),tj(p(e=n.call(this)),t,rZ,rK,S,{}),e}return f(r)}(tO);function rX(t,e,n){var r=t.slice();return r[4]=e[n],r}function r0(t){var e,n,r,o,i,a,c=t[4].value+"";function l(){return t[3](t[4])}return{c:function(){e=H("li"),n=H("button"),r=J(c),o=G(),Y(n,"class","svelte-i8gf0s"),tt(n,"selected",t[1]===t[4].key),tt(n,"empty",t[4].empty),Y(e,"class","svelte-i8gf0s")},m:function(t,c){F(t,e,c),z(e,n),z(n,r),z(e,o),i||(a=W(n,"click",l),i=!0)},p:function(e,o){t=e,1&o&&c!==(c=t[4].value+"")&&Q(r,c),3&o&&tt(n,"selected",t[1]===t[4].key),1&o&&tt(n,"empty",t[4].empty)},d:function(t){t&&L(e),i=!1,a()}}}function r1(t){for(var e,n=t[0],r=[],o=0;o=1),Y(e,"class",h=q("".concat(t[11].class||""," doc-node"))+" svelte-km02vz"),tt(e,"root",t[8])},m:function(f,h){F(f,e,h),z(e,n),z(n,r),z(r,o),z(n,i),z(n,a),z(a,c),z(n,l),z(n,s),z(s,u),z(e,d),z(e,p);for(var y=0;y=1),(!v||2048&i&&h!==(h=q("".concat(t[11].class||""," doc-node"))+" svelte-km02vz"))&&Y(e,"class",h),(!v||2304&i)&&tt(e,"root",t[8])},i:function(t){if(!v){for(var e=0;e0?"".concat(p.type.name," - [").concat(p.marks.map(function(t){return t.type.name}).join(", "),"]"):p.type.name),4097&t.$$.dirty&&n(5,a=Array(p.childCount).fill(void 0).reduce(function(t,e,n){if(0===n)return[g?0:h+1];var r=t[n-1],o=p.child(n-1);return[].concat(w(t),[r+o.nodeSize])},[])),4097&t.$$.dirty&&n(4,c=h+p.nodeSize),4&t.$$.dirty&&n(3,l=r.content.every(function(t){return t.isInline}))},e=I(e),[h,v,r,l,c,a,i,o,g,function(){f(p,h)},function(){f(p,h,!0)},e,p]}tS(".doc-node.svelte-km02vz{border-left:1px solid #363755;border-right:1px solid #363755;display:flex;flex-direction:column;padding:0 12px}.doc-node.root.svelte-km02vz{border:0;padding:0}.doc-node-body.svelte-km02vz{background:#363755;color:#222;display:flex;font-size:13px;margin-top:3px}.number-box.svelte-km02vz{padding:3px 6px;background:rgba(255, 255, 255, 0.3)}button.svelte-km02vz{background:transparent;border:0;color:#222;cursor:pointer;display:flex;height:100%;padding:3px 9px;white-space:pre;width:100%}button.svelte-km02vz:hover{background:rgba(255, 162, 177, 0.4);color:#fff}button.selected.svelte-km02vz{background:rgba(255, 162, 177, 0.4)}ul.svelte-km02vz{list-style:none;margin:0;padding:0}ul.show-borders.svelte-km02vz{border-left:1px solid rgb(96, 76, 104);border-right:1px solid rgb(96, 76, 104)}.inline-children.svelte-km02vz{border-left:1px solid rgb(96, 76, 104);border-right:1px solid rgb(96, 76, 104);display:flex;flex-wrap:wrap;padding:0 12px}.inline-children.svelte-km02vz>.doc-node{flex-grow:1;padding:0}");var ov=function(t){v(r,t);var e,n=(e=function(){if("undefined"==typeof Reflect||!Reflect.construct||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,n=y(r);if(e){var o=y(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return m(this,t)});function r(t){var e;return d(this,r),tj(p(e=n.call(this)),t,oh,op,S,{node:12,startPos:0,depth:1}),e}return f(r)}(tO);let og=["#EA7C7F","#67B0C6","#94BB7F","#CA9EDB","#DCDC5D","#B9CC7C","#DD97D8","#FFB761","#4D8FD1","#F36E98","#E45F44","#A6A4AE","#FCC047","#FFC129","#D3929C","#4CBCD4","#8D7BC0"];function om(t){var e,n,r;return n=new ov({props:{class:t[1].class,node:t[0],startPos:0,depth:0}}),{c:function(){e=H("ul"),tw(n.$$.fragment),Y(e,"class","svelte-is7zuw")},m:function(t,o){F(t,e,o),tk(n,e,null),r=!0},p:function(t,e){var r=$(e,1)[0],o={};2&r&&(o.class=t[1].class),1&r&&(o.node=t[0]),n.$set(o)},i:function(t){r||(tx(n.$$.fragment,t),r=!0)},o:function(t){t$(n.$$.fragment,t),r=!1},d:function(t){t&&L(e),t_(n)}}}function oy(t,e,n){var r=e,o=r.doc,i=r.schema,a=r.selected,c=void 0===a?{type:"",start:0,end:0}:a,l=r.handleNodeSelect;return tC("doc-view",{selected:c,colors:Object.keys(i.nodes).reduce((t,e,n)=>{let r=n>=og.length?function(t,e){let n=t/e;return Math.round(e*(n-Math.floor(n)))}(n,og.length):n;return t[e]=og[r],t},{}),handleNodeClick:l}),t.$$set=function(t){n(1,e=_(_({},e),I(t))),"doc"in t&&n(0,o=t.doc),"schema"in t&&n(2,i=t.schema),"selected"in t&&n(3,c=t.selected),"handleNodeSelect"in t&&n(4,l=t.handleNodeSelect)},e=I(e),[o,e,i,c,l]}tS("ul.svelte-is7zuw{list-style:none;margin:0;padding:0}");var ob=function(t){v(r,t);var e,n=(e=function(){if("undefined"==typeof Reflect||!Reflect.construct||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,n=y(r);if(e){var o=y(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return m(this,t)});function r(t){var e;return d(this,r),tj(p(e=n.call(this)),t,oy,om,S,{doc:0,schema:2,selected:3,handleNodeSelect:4}),e}return f(r)}(tO);function ox(t){var e;return{c:function(){e=J("log")},m:function(t,n){F(t,e,n)},d:function(t){t&&L(e)}}}function o$(t){var e,n,r,o,i,a,c,l;return i=new n4({props:{class:"hidden",$$slots:{default:[ox]},$$scope:{ctx:t}}}),c=new ob({props:{class:"m-top",doc:t[0],schema:t[2],handleNodeSelect:t[3]}}),{c:function(){e=H("div"),n=H("div"),(r=H("h2")).textContent="Current doc",o=G(),tw(i.$$.fragment),a=G(),tw(c.$$.fragment),Y(n,"class","top-row svelte-uwxe50"),Y(e,"slot","left"),Y(e,"class","left-panel")},m:function(t,s){F(t,e,s),z(e,n),z(n,r),z(n,o),tk(i,n,null),z(e,a),tk(c,e,null),l=!0},p:function(t,e){var n={};256&e&&(n.$$scope={dirty:e,ctx:t}),i.$set(n);var r={};1&e&&(r.doc=t[0]),c.$set(r)},i:function(t){l||(tx(i.$$.fragment,t),tx(c.$$.fragment,t),l=!0)},o:function(t){t$(i.$$.fragment,t),t$(c.$$.fragment,t),l=!1},d:function(t){t&&L(e),t_(i),t_(c)}}}function ow(t){var e;return{c:function(){e=J("log")},m:function(t,n){F(t,e,n)},d:function(t){t&&L(e)}}}function ok(t){var e,n,r,o,i,a,c,l;return(i=new n4({props:{$$slots:{default:[ow]},$$scope:{ctx:t}}})).$on("click",t[4]),c=new nK({props:{class:"m-top",data:t[1],recursionOpts:{shouldExpandNode:oj}}}),{c:function(){e=H("div"),n=H("div"),(r=H("h2")).textContent="Node info",o=G(),tw(i.$$.fragment),a=G(),tw(c.$$.fragment),Y(n,"class","top-row svelte-uwxe50"),Y(e,"slot","right"),Y(e,"class","right-panel svelte-uwxe50")},m:function(t,s){F(t,e,s),z(e,n),z(n,r),z(n,o),tk(i,n,null),z(e,a),tk(c,e,null),l=!0},p:function(t,e){var n={};256&e&&(n.$$scope={dirty:e,ctx:t}),i.$set(n);var r={};2&e&&(r.data=t[1]),c.$set(r)},i:function(t){l||(tx(i.$$.fragment,t),tx(c.$$.fragment,t),l=!0)},o:function(t){t$(i.$$.fragment,t),t$(c.$$.fragment,t),l=!1},d:function(t){t&&L(e),t_(i),t_(c)}}}function o_(t){var e,n;return e=new n1({props:{$$slots:{right:[ok],left:[o$]},$$scope:{ctx:t}}}),{c:function(){tw(e.$$.fragment)},m:function(t,r){tk(e,t,r),n=!0},p:function(t,n){var r=$(n,1)[0],o={};259&r&&(o.$$scope={dirty:r,ctx:t}),e.$set(o)},i:function(t){n||(tx(e.$$.fragment,t),n=!0)},o:function(t){t$(e.$$.fragment,t),n=!1},d:function(t){t_(e,t)}}}tS(".hidden{display:none;visibility:hidden}.top-row.svelte-uwxe50{align-items:center;display:flex;justify-content:space-between}.right-panel.svelte-uwxe50{border-left:1px solid rgba(255, 162, 177, 0.2);flex-grow:0;min-width:220px;width:220px}.split-view .m-top{margin-top:0.5em}");var oj=function(t){return"array"!==t.type||t.value.length<=50};function oO(t,e,n){var r,o,i=tR("editor-view").view,a=i.state.doc,c={node:i.state.doc,pos:0},l=i.state.schema;return nm.subscribe(function(t){t&&(t.trs.forEach(function(t){n(5,c.pos=t.mapping.map(c.pos),c)}),clearTimeout(o),o=setTimeout(function(){n(0,a=t.state.doc);var e=c.pos;try{var r=a.nodeAt(e);n(5,c={node:r||a,pos:r?e:0})}catch(t){}},100))}),t.$$.update=function(){32&t.$$.dirty&&n(1,r=c.node.toJSON())},[a,r,l,function(t,e){var r,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(n(5,c={node:t,pos:e}),o){for(var a=i.nodeDOM(e);a&&!(a instanceof HTMLElement);)a=a.parentElement;if(a&&"none"!==getComputedStyle(a).display){var l=function t(e){return e&&e!==document.body?e.scrollHeight!==e.clientHeight?e:t(e.parentElement):void 0}(i.dom);if(l){var s=l.scrollTop,u=l.offsetTop-window.scrollY,f=l.getBoundingClientRect().top-u,d=a.getBoundingClientRect().top-u,p=l.clientHeight/2;l.scroll(0,s+f+d-p)}var h=i.coordsAtPos(e).top,v=(null===(r=document.querySelector(".floating-dock"))||void 0===r?void 0:r.clientHeight)||0;window.scroll(0,h-v+a.clientHeight+window.scrollY)}}},function(){console.log(c),window._node=c,console.info("%c [prosemirror-dev-toolkit]: Property added to window._node","color: #b8e248")},c]}var oC=function(t){v(r,t);var e,n=(e=function(){if("undefined"==typeof Reflect||!Reflect.construct||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,n=y(r);if(e){var o=y(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return m(this,t)});function r(t){var e;return d(this,r),tj(p(e=n.call(this)),t,oO,o_,S,{}),e}return f(r)}(tO);function oR(t,e,n){var r=t.slice();return r[23]=e[n],r}function oS(t){var e,n,r,o,i=t[23].name+"";function a(){return t[16](t[23])}return{c:function(){e=H("button"),n=J(i),Y(e,"class","unstyled-btn svelte-969ox4"),Y(e,"aria-label","Edit snapshot name button")},m:function(t,i){F(t,e,i),z(e,n),r||(o=W(e,"dblclick",a),r=!0)},p:function(e,r){t=e,1&r&&i!==(i=t[23].name+"")&&Q(n,i)},d:function(t){t&&L(e),r=!1,o()}}}function oE(t){var e,n,r,o;return{c:function(){(e=H("input")).value=n=t[2].name,Y(e,"class","svelte-969ox4")},m:function(n,i){F(n,e,i),r||(o=[W(e,"input",t[5]),W(e,"keypress",t[6])],r=!0)},p:function(t,r){4&r&&n!==(n=t[2].name)&&e.value!==n&&(e.value=n)},d:function(t){t&&L(e),r=!1,C(o)}}}function oD(t){var e;return{c:function(){e=J("Show")},m:function(t,n){F(t,e,n)},d:function(t){t&&L(e)}}}function oA(t){var e;return{c:function(){e=J("Hide")},m:function(t,n){F(t,e,n)},d:function(t){t&&L(e)}}}function oP(t){var e;return{c:function(){e=J("Delete")},m:function(t,n){F(t,e,n)},d:function(t){t&&L(e)}}}function oN(t){var e;return{c:function(){e=J("Confirm Delete")},m:function(t,n){F(t,e,n)},d:function(t){t&&L(e)}}}function oM(t){function e(t,e){return t[2]&&t[2].timestamp===t[23].timestamp?oE:oS}var n,r,o,i,a,c,l,s,u,f,d,p,h=e(t),v=h(t);function g(t,e){var n;return(null===(n=t[1])||void 0===n?void 0:n.timestamp)===t[23].timestamp?oA:oD}var m=g(t),y=m(t);function b(){return t[17](t[23])}function x(){return t[18](t[23])}function $(){return t[19](t[23])}function w(t,e){var n;return(null===(n=t[3])||void 0===n?void 0:n.timestamp)===t[23].timestamp?oN:oP}var k=w(t),_=k(t);function j(){return t[20](t[23])}return{c:function(){n=H("li"),v.c(),r=G(),o=H("button"),y.c(),i=G(),(a=H("button")).textContent="Restore",c=G(),(l=H("button")).textContent="Export",s=G(),u=H("button"),_.c(),f=G(),Y(o,"class","snapshot-btn ml-2 svelte-969ox4"),Y(a,"class","snapshot-btn svelte-969ox4"),Y(l,"class","snapshot-btn svelte-969ox4"),Y(u,"class","snapshot-btn svelte-969ox4"),Y(n,"class","svelte-969ox4")},m:function(t,e){F(t,n,e),v.m(n,null),z(n,r),z(n,o),y.m(o,null),z(n,i),z(n,a),z(n,c),z(n,l),z(n,s),z(n,u),_.m(u,null),z(n,f),d||(p=[W(o,"click",b),W(a,"click",x),W(l,"click",$),W(u,"click",j)],d=!0)},p:function(i,a){h===(h=e(t=i))&&v?v.p(t,a):(v.d(1),(v=h(t))&&(v.c(),v.m(n,r))),m!==(m=g(t))&&(y.d(1),(y=m(t))&&(y.c(),y.m(o,null))),k!==(k=w(t))&&(_.d(1),(_=k(t))&&(_.c(),_.m(u,null)))},d:function(t){t&&L(n),v.d(),y.d(),_.d(),d=!1,C(p)}}}function oB(t){for(var e,n=t[0],r=[],o=0;o[o,...t])}(c,a,i.state.schema)}catch(t){console.error("Failed to import snapshot: "+t)}}})},function(t){n(1,a=t)},function(t){tl[t?"unshift":"push"](function(){n(4,r=t)})}]}tS(".floating-dock-wrapper.svelte-1r4ymhu{position:fixed;width:0px;height:0px;top:0px;left:0px;z-index:99999999}.floating-dock.svelte-1r4ymhu{background-color:#363755;position:fixed;z-index:1;box-shadow:rgba(34, 34, 34, 0.3) 0px 0px 4px 0px;left:0px;top:50%;width:100%;height:50%}.resizing-div.svelte-1r4ymhu{position:absolute;z-index:2;opacity:0;top:-5px;height:10px;left:0px;width:100%;cursor:row-resize}.container.svelte-1r4ymhu{height:100%}button.svelte-1r4ymhu{background:rgba(255, 162, 177, 0.6);border:0;border-radius:3px;color:#fff;cursor:pointer;font-size:12px;height:24px;line-height:25px;padding:0 6px;position:absolute}button.svelte-1r4ymhu:hover{background:rgba(255, 162, 177, 0.8)}.copy-btn.svelte-1r4ymhu{right:173px;top:-28px}.save-btn.svelte-1r4ymhu{right:129px;top:-28px}.import-btn.svelte-1r4ymhu{right:79px;top:-28px}.paste-btn.svelte-1r4ymhu{right:32px;top:-28px}.close-btn.svelte-1r4ymhu{font-size:var(--font-medium);right:4px;top:-28px;width:24px}");var o0=function(t){v(r,t);var e,n=(e=function(){if("undefined"==typeof Reflect||!Reflect.construct||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,n=y(r);if(e){var o=y(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return m(this,t)});function r(t){var e;return d(this,r),tj(p(e=n.call(this)),t,oX,oQ,S,{onClose:0}),e}return f(r)}(tO);function o1(t){var e,n;return(e=new tA({props:{buttonPosition:t[1]}})).$on("click",t[2]),{c:function(){tw(e.$$.fragment)},m:function(t,r){tk(e,t,r),n=!0},p:function(t,n){var r={};2&n&&(r.buttonPosition=t[1]),e.$set(r)},i:function(t){n||(tx(e.$$.fragment,t),n=!0)},o:function(t){t$(e.$$.fragment,t),n=!1},d:function(t){t_(e,t)}}}function o2(t){var e,n;return e=new o0({props:{onClose:t[3]}}),{c:function(){tw(e.$$.fragment)},m:function(t,r){tk(e,t,r),n=!0},p:k,i:function(t){n||(tx(e.$$.fragment,t),n=!0)},o:function(t){t$(e.$$.fragment,t),n=!1},d:function(t){t_(e,t)}}}function o5(t){var e,n,r,o,i=[o2,o1],a=[];return r=a[n=t[0]?0:1]=i[n](t),{c:function(){e=H("section"),r.c(),Y(e,"class","dev-tools svelte-1g07t8b")},m:function(t,r){F(t,e,r),a[n].m(e,null),o=!0},p:function(t,o){var c=$(o,1)[0],l=n;(n=t[0]?0:1)===l?a[n].p(t,c):(ty(),t$(a[l],1,1,function(){a[l]=null}),tb(),(r=a[n])?r.p(t,c):(r=a[n]=i[n](t)).c(),tx(r,1),r.m(e,null))},i:function(t){o||(tx(r),o=!0)},o:function(t){t$(r),o=!1},d:function(t){t&&L(e),a[n].d()}}}function o4(t,e,n){var r=e.view,o=e.devToolsExpanded,i=void 0!==o&&o,a=e.buttonPosition,c=void 0===a?"bottom-right":a;return tC("editor-view",{view:r,execCmd:function(t){t(r.state,r.dispatch)},replaceEditorContent:function(t){var e=r.state.tr;e.replaceWith(0,r.state.doc.nodeSize-2,t.doc.content),r.dispatch(e)}}),tn(function(){var t=document&&document.querySelector("html");i&&t&&(t.style.paddingBottom="341px")}),t.$$set=function(t){"view"in t&&n(4,r=t.view),"devToolsExpanded"in t&&n(0,i=t.devToolsExpanded),"buttonPosition"in t&&n(1,c=t.buttonPosition)},[i,c,function(){n(0,i=!0);var t=document&&document.querySelector("html");t&&(t.style.paddingBottom="341px")},function(){n(0,i=!1);var t=document&&document.querySelector("html");t&&(t.style.paddingBottom="")},r]}tS(".svelte-1g07t8b{--font-sans:Helvetica Neue, Calibri Light, Roboto, sans-serif;--font-small:11px;--font-medium:13px;--font-large:16px;--height-tabs-menu:48px}.dev-tools.svelte-1g07t8b{font-family:var(--font-sans);font-size:var(--font-medium);--tree-view-base00:#363755;--tree-view-base01:#604d49;--tree-view-base02:#6d5a55;--tree-view-base03:#d1929b;--tree-view-base04:#b79f8d;--tree-view-base05:#f9f8f2;--tree-view-base06:#f7f4f1;--tree-view-base07:#faf8f5;--tree-view-base08:#fa3e7e;--tree-view-base09:#fd993c;--tree-view-base0A:#f6bf81;--tree-view-base0B:#b8e248;--tree-view-base0C:#b4efe4;--tree-view-base0D:#85d9ef;--tree-view-base0E:#be87ff;--tree-view-base0F:#d6724c}");var o3=function(t){v(r,t);var e,n=(e=function(){if("undefined"==typeof Reflect||!Reflect.construct||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,n=y(r);if(e){var o=y(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return m(this,t)});function r(t){var e;return d(this,r),tj(p(e=n.call(this)),t,o4,o5,S,{view:4,devToolsExpanded:0,buttonPosition:1}),e}return f(r)}(tO);let o6=!1,o7,o9=(t,e)=>n=>{let r=t.state,o=t.state.applyTransaction(n);if(e){let r=t.state.applyTransaction.bind(t.state);t.state.applyTransaction=function(e){return e!==n?(t.state.applyTransaction=r,Reflect.apply(r,t.state,arguments)):o},e(n)}else t.updateState(o.state);o6&&o.transactions.length>0&&function(t,e,n){let r=D(nv),o=D(ng)[0],i=r.get((null==o?void 0:o.topEntryId)||""),a=function(t,e,n,r){var o,i,a,s;let u=c.PW.fromSchema(e.schema),f=e.selection,d=u.serializeFragment(f.content().content),p=[];if(d){let t=d.firstChild;for(;t;)p.push(t.outerHTML),t=t.nextSibling}let h=r?r.state:n,v=(o=h.doc.toJSON(),i=e.doc.toJSON(),nl.diff(o,i)),g=(a=nu(h.selection),s=nu(e.selection),nl.diff(a,s));return{id:Math.random().toString()+Math.random().toString(),state:e,trs:t.map(t=>Object.keys(t).concat(ns).reduce((e,n)=>(e[n]=t[n],e),{})),timestamp:t[0].time,timeStr:nd(t[0].time),contentDiff:v,selectionDiff:g,selectionHtml:nh((0,l.prettyPrint)(p.join("\n"),{max_char:60,indent_size:2}))}}(t,e,n,i);nv.update(t=>new Map(t.set(a.id,a))),nm.set(a);let s=!a.contentDiff;if((null==o?void 0:o.isGroup)&&s){let t={isGroup:s,entryIds:[a.id,...o.entryIds],topEntryId:a.id,expanded:o.expanded};ng.update(e=>[t,...e.slice(1)])}else{let t={isGroup:s,entryIds:[a.id],topEntryId:a.id,expanded:!1};ng.update(e=>[t,...e])}}(o.transactions,t.state,r)},o8="__prosemirror-dev-toolkit__";function it(t,e={}){let n;let o=((n=document.querySelector(`.${o8}`))||((n=document.createElement("div")).className=o8,document.body.appendChild(n)),n);ie();let i=new o3({target:o,props:Object.assign({view:t},e)});"undefined"!=typeof window&&(window.editorView=t);let a=t.destroy.bind(t);t.destroy=()=>{ie(),a()},function(t){var e;o6=!0;let n=null===(e=t.props.dispatchTransaction)||void 0===e?void 0:e.bind(t);t.setProps({dispatchTransaction:o9(t,n)}),o7=()=>t.setProps({dispatchTransaction:n})}(t),r=()=>{ny(),o6=!1,o7&&o7(),o7=void 0,i.$destroy()}}function ie(){r&&r(),r=void 0}"undefined"!=typeof window&&(window.applyDevTools=it)}}]); //# sourceMappingURL=3d35b88c-add1990a508b9ea1.js.map