PageSourceSearch

https://garnish-rhd2uex.gamma.site/_next/static/chunks/3d35b88c.8342026cc792cf47.js

js garnish-rhd2uex.gamma.site collected 2026-10-03 04:04:49 UTC 146,903 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3016],{62564:function(t,e,n){let r,o,i;n.r(e),n.d(e,{applyDevTools:function(){return o2},removeDevTools:function(){return o3}});var l,s,a=n(30764),c=n(43781),f=n(52518);function u(){}function d(t,e){for(let n in e)t[n]=e[n];return t}function p(t){return t()}function h(){return Object.create(null)}function v(t){t.forEach(p)}function g(t){return"function"==typeof t}function m(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function y(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(null==t){for(let t of n)t(void 0);return u}let o=t.subscribe(...n);return o.unsubscribe?()=>o.unsubscribe():o}function b(t){let e;return y(t,t=>e=t)(),e}function $(t,e,n){t.$$.on_destroy.push(y(e,n))}function x(t,e,n,r){if(t){let o=w(t,e,n,r);return t[0](o)}}function w(t,e,n,r){return t[1]&&r?d(n.ctx.slice(),t[1](r(e))):n.ctx}function k(t,e,n,r){if(t[2]&&r){let o=t[2](r(n));if(void 0===e.dirty)return o;if("object"==typeof o){let t=[],n=Math.max(e.dirty.length,o.length);for(let r=0;r<n;r+=1)t[r]=e.dirty[r]|o[r];return t}return e.dirty|o}return e.dirty}function _(t,e,n,r,o,i){if(o){let l=w(e,n,r,i);t.p(l,o)}}function j(t){if(t.ctx.length>32){let e=[],n=t.ctx.length/32;for(let t=0;t<n;t++)e[t]=-1;return e}return -1}function C(t){let e={};for(let n in t)"$"!==n[0]&&(e[n]=t[n]);return e}function O(t){return null==t?"":t}function E(t,e){t.appendChild(e)}function q(t,e,n){let r=function(t){if(!t)return document;let e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}(t);if(!r.getElementById(e)){let t=N("style");t.id=e,t.textContent=n,E(r.head||r,t),t.sheet}}function D(t,e,n){t.insertBefore(e,n||null)}function S(t){t.parentNode&&t.parentNode.removeChild(t)}function M(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function N(t){return document.createElement(t)}function A(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function R(t){return document.createTextNode(t)}function P(){return R(" ")}function T(){return R("")}function z(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function I(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function B(t,e,n){t.setAttributeNS("http://www.w3.org/1999/xlink",e,n)}function F(t,e){e=""+e,t.data!==e&&(t.data=e)}function L(t,e){t.value=null==e?"":e}function V(t,e,n){t.classList.toggle(e,!!n)}function H(){if(!r)throw Error("Function called outside component initialization");return r}function U(t){H().$$.on_mount.push(t)}function J(){let t=H();return function(e,n){let{cancelable:r=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=t.$$.callbacks[e];if(o){let i=function(t,e){let{bubbles:n=!1,cancelable:r=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new CustomEvent(t,{detail:e,bubbles:n,cancelable:r})}(e,n,{cancelable:r});return o.slice().forEach(e=>{e.call(t,i)}),!i.defaultPrevented}return!0}}function G(t,e){return H().$$.context.set(t,e),e}function K(t){return H().$$.context.get(t)}function W(t,e){let n=t.$$.callbacks[e.type];n&&n.slice().forEach(t=>t.call(this,e))}"function"==typeof SuppressedError&&SuppressedError;let Y=[],Z=[],Q=[],X=[],tt=Promise.resolve(),te=!1;function tn(t){Q.push(t)}let tr=new Set,to=0;function ti(){if(0!==to)return;let t=r;do{try{for(;to<Y.length;){let t=Y[to];to++,r=t,function(t){if(null!==t.fragment){t.update(),v(t.before_update);let e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(tn)}}(t.$$)}}catch(t){throw Y.length=0,to=0,t}for(r=null,Y.length=0,to=0;Z.length;)Z.pop()();for(let t=0;t<Q.length;t+=1){let e=Q[t];tr.has(e)||(tr.add(e),e())}Q.length=0}while(Y.length);for(;X.length;)X.pop()();te=!1,tr.clear(),r=t}let tl=new Set;function ts(){o={r:0,c:[],p:o}}function ta(){o.r||v(o.c),o=o.p}function tc(t,e){t&&t.i&&(tl.delete(t),t.i(e))}function tf(t,e,n,r){t&&t.o?tl.has(t)||(tl.add(t),o.c.push(()=>{tl.delete(t),r&&(n&&t.d(1),r())}),t.o(e)):r&&r()}function tu(t){return(null==t?void 0:t.length)!==void 0?t:Array.from(t)}function td(t,e){t.d(1),e.delete(t.key)}function tp(t,e,n,r,o,i,l,s,a,c,f,u){let d=t.length,p=i.length,h=d,g={};for(;h--;)g[t[h].key]=h;let m=[],y=new Map,b=new Map,$=[];for(h=p;h--;){let t=u(o,i,h),r=n(t),s=l.get(r);s?$.push(()=>s.p(t,e)):(s=c(r,t)).c(),y.set(r,m[h]=s),r in g&&b.set(r,Math.abs(h-g[r]))}let x=new Set,w=new Set;function k(t){tc(t,1),t.m(s,f),l.set(t.key,t),f=t.first,p--}for(;d&&p;){let e=m[p-1],n=t[d-1],r=e.key,o=n.key;e===n?(f=e.first,d--,p--):y.has(o)?!l.has(r)||x.has(r)?k(e):w.has(o)?d--:b.get(r)>b.get(o)?(w.add(r),k(e)):(x.add(o),d--):(a(n,l),d--)}for(;d--;){let e=t[d];y.has(e.key)||a(e,l)}for(;p;)k(m[p-1]);return v($),m}function th(t){t&&t.c()}function tv(t,e,n){let{fragment:r,after_update:o}=t.$$;r&&r.m(e,n),tn(()=>{let e=t.$$.on_mount.map(p).filter(g);t.$$.on_destroy?t.$$.on_destroy.push(...e):v(e),t.$$.on_mount=[]}),o.forEach(tn)}function tg(t,e){let n=t.$$;null!==n.fragment&&(!function(t){let e=[],n=[];Q.forEach(r=>
1-1===t.indexOf(r)?e.push(r):n.push(r)),n.forEach(t=>t()),Q=e}(n.after_update),v(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function tm(t,e,n,o,i,l){let s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[-1],c=r;r=t;let f=t.$$={fragment:null,ctx:[],props:l,update:u,not_equal:i,bound:h(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(c?c.$$.context:[])),callbacks:h(),dirty:a,skip_bound:!1,root:e.target||c.$$.root};s&&s(f.root);let d=!1;if(f.ctx=n?n(t,e.props||{},function(e,n){let r=(arguments.length<=2?0:arguments.length-2)?arguments.length<=2?void 0:arguments[2]:n;return f.ctx&&i(f.ctx[e],f.ctx[e]=r)&&(!f.skip_bound&&f.bound[e]&&f.bound[e](r),d)&&(-1===t.$$.dirty[0]&&(Y.push(t),te||(te=!0,tt.then(ti)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31),n}):[],f.update(),d=!0,v(f.before_update),f.fragment=!!o&&o(f.ctx),e.target){if(e.hydrate){let t=Array.from(e.target.childNodes);f.fragment&&f.fragment.l(t),t.forEach(S)}else f.fragment&&f.fragment.c();e.intro&&tc(t.$$.fragment),tv(t,e.target,e.anchor),ti()}r=c}class ty{constructor(){this.$$=void 0,this.$$set=void 0}$destroy(){tg(this,1),this.$destroy=u}$on(t,e){if(!g(e))return u;let n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{let t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){this.$$set&&0!==Object.keys(t).length&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}"undefined"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add("4");let tb=(t,e)=>G(t,e),t$=t=>K(t);function tx(t){q(t,"svelte-1lt2k10",".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}")}function tw(t){let e,n,r,o,i,l,s,a,c,f,d,p,h,v,g,m,y,b,$,x,w,k,_,j;return{c(){e=N("button"),n=A("svg"),r=A("title"),o=R("prosemirror"),i=A("desc"),l=R("Created using Figma"),s=A("use"),a=A("use"),c=A("use"),f=A("use"),d=A("use"),p=A("use"),h=A("use"),v=A("defs"),g=A("path"),m=A("path"),y=A("path"),b=A("path"),$=A("path"),x=A("path"),w=A("path"),B(s,"xlink:href","#a"),I(s,"transform","matrix(2 0 0 2 118 116)"),I(s,"fill","#FFF"),B(a,"xlink:href","#b"),I(a,"transform","rotate(16 59.054 420.192) scale(2)"),I(a,"fill","#FFF"),B(c,"xlink:href","#c"),I(c,"transform","matrix(2 0 0 2 154.024 141.58)"),I(c,"fill","#363755"),B(f,"xlink:href","#d"),I(f,"transform","matrix(2 0 0 2 220 334.8)"),I(f,"fill","#FFF"),B(d,"xlink:href","#e"),I(d,"transform","matrix(2 0 0 2 218.826 262.052)"),I(d,"fill","#363755"),B(p,"xlink:href","#f"),I(p,"transform","matrix(2 0 0 2 197.108 184.998)"),I(p,"fill","#FFF"),B(h,"xlink:href","#g"),I(h,"transform","matrix(2 0 0 2 221.8 216)"),I(h,"fill","#363755"),I(g,"id","a"),I(g,"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"),I(m,"id","b"),I(m,"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"),I(y,"id","c"),I(y,"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"),I(b,"id","d"),I(b,"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"),I($,"id","e"),I($,"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-
15.3 29.9v.2z"),I(x,"id","f"),I(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"),I(w,"id","g"),I(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"),I(n,"width","530"),I(n,"height","530"),I(n,"viewBox","0 0 530 530"),I(n,"xmlns","http://www.w3.org/2000/svg"),I(n,"xmlns:xlink","http://www.w3.org/1999/xlink"),I(n,"class","svelte-1lt2k10"),I(e,"class",k=O("floating-btn ".concat(t[0]))+" svelte-1lt2k10")},m(u,k){D(u,e,k),E(e,n),E(n,r),E(r,o),E(n,i),E(i,l),E(n,s),E(n,a),E(n,c),E(n,f),E(n,d),E(n,p),E(n,h),E(n,v),E(v,g),E(v,m),E(v,y),E(v,b),E(v,$),E(v,x),E(v,w),_||(j=z(e,"click",t[1]),_=!0)},p(t,n){let[r]=n;1&r&&k!==(k=O("floating-btn ".concat(t[0]))+" svelte-1lt2k10")&&I(e,"class",k)},i:u,o:u,d(t){t&&S(e),_=!1,j()}}}function tk(t,e,n){let{buttonPosition:r}=e;return t.$$set=t=>{"buttonPosition"in t&&n(0,r=t.buttonPosition)},[r,function(e){W.call(this,t,e)}]}class t_ extends ty{constructor(t){super(),tm(this,t,tk,tw,m,{buttonPosition:0},tx)}}let tj=[];function tC(t){let e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u,r=new Set;function o(n){if(m(t,n)&&(t=n,e)){let e=!tj.length;for(let e of r)e[1](),tj.push(e,t);if(e){for(let t=0;t<tj.length;t+=2)tj[t][0](tj[t+1]);tj.length=0}}}function i(e){o(e(t))}return{set:o,update:i,subscribe:function(l){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u,a=[l,s];return r.add(a),1===r.size&&(e=n(o,i)||u),l(t),()=>{r.delete(a),0===r.size&&e&&(e(),e=null)}}}}let tO="__prosemirror-dev-toolkit__snapshots",tE=tC([]),tq=tC(),tD=tC(),tS=!0;function tM(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 tN(t,e){let n={name:t,timestamp:Date.now(),doc:e};return tE.update(t=>[n,...t]),n}function tA(t){tE.update(e=>e.map(e=>e.timestamp===t.timestamp?t:e))}function tR(t,e){tM(t,e.doc),tD.set(void 0),tq.set(void 0)}function tP(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 tT(t){tE.update(e=>e.filter(e=>e.timestamp!==t.timestamp));let e=b(tq);(null==e?void 0:e.timestamp)===t.timestamp&&tq.set(void 0)}function tz(t,e){let n=n=>{!t||n.composedPath().includes(t)||n.defaultPrevented||e()};return document.addEventListener("click",n,!0),{destroy(){document.removeEventListener("click",n,!0)}}}function tI(t){q(t,"svelte-19h7j7n",".paste-modal.svelte-19h7j7n.svelte-19h7j7n{font-size:15px;height:100%;left:0;position:fixed;top:0;width:100%;z-index:1000}.paste-modal.svelte-19h7j7n>form.svelte-19h7j7n{display:flex;height:100%;justify-content:center;padding:64px}.modal-bg.svelte-19h7j7n.svelte-19h7j7n{background:#000;height:100%;left:0;opacity:0.8;position:absolute;top:0;width:100%;z-index:-1}fieldset.svelte-19h7j7n.svelte-19h7j7n{border-color:transparent;width:100%;max-width:800px}.submit-container.svelte-19h7j7n.svelte-19h7j7n{position:relative;width:100%}button.svelte-19h7j7n.svelte-19h7j7n{cursor:pointer;padding:4px 8px;position:absolute;right:-6px;top:-32px}legend.svelte-19h7j7n.svelte-19h7j7n{color:white}textarea.svelte-19h7j7n.svelte-19h7j7n{background:#fefcfc;height:calc(100vh - 128px);width:100%}")}function tB(t){let e,n,r,o,i,l,s,a,c,f,d,p;return{c(){e=N("div"),n=N("div"),r=P(),o=N("form"),i=N("fieldset"),(l=N("div")).innerHTML='<button class="svelte-19h7j7n">Submit</button>',s=P(),(a=N("legend")).textContent="Doc",c=P(),f=N("textarea"),I(n,"class","modal-bg svelte-19h7j7n"),I(l,"class","submit-container svelte-19h7j7n"),I(a,"class","svelte-19h7j7n"),I(f,"class","svelte-19h7j7n"),I(i,"class","svelte-19h7j7n"),I(o,"class","paste-content svelte-19h7j7n"),I(e,"class","paste-modal svelte-19h7j7n"),V(e,"hidden",!t[0])},m(h,v){if(D(h,e,v),E(e,n),E(e,r),E(e,o),E(o,i),E(i,l),E(i,s),E(i,a),E(i,c),E(i,f),L(f,t[1]),!d){var m,y;p=[z(f,"input",t[4]),(m=tz.call(null,i,t[2]))&&g(m.destroy)?m.destroy:u,z(o,"submit",(y=t[3],function(t){return t.preventDefault(),y.call(this,t)}))],d=!0}},p(t,n){let[r]=n;2&r&&L(f,t[1]),1&r&&V(e,"hidden",!t[0])},i:u,o:u,d(t){t&&S(e),d=!1,v(p)}}}function tF(t,e,n){let r,{isOpen:o}=e,i=J();return t.$$set=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(tO)}catch(t){tS=!1}if(t&&t.length>0)try{let e=JSON.parse(t);tE.set(e)}catch(t){console.error("Corrupted snapshots values in localStorage",t)}}(),tE.subscribe(t=>{tS&&localStorage.setItem(tO,JSON.stringify(t))});class tL extends ty{constructor(t){super(),tm(this,t,tF,tB,m,{isOpen:0},tI)}}function tV(t){q(t,"svelte-10notzq","ul.svelte-10notzq{display:flex;list-style:none;margin:0;overflow-x:scroll;padding:0}button.svelte-10notzq{background:transparent;border:0;border-bottom:2px solid transparent;color:#fff;cursor:pointer;height:100%;font-size:var(--font-medium);font-weight:400;padding:1em}button.svelte-10notzq:hover{background:rgba(255, 255, 255, 0.05)}button.active.svelte-10notzq{border-bottom:2px solid rgb(255, 162, 177)}")}function tH(t){let e,n,r,o,i,l,s,a,c,f,d,p,h,g,m,y,b,$,x,w;return{c(){e=N("ul"),n=N("li"),(r=N("button")).textContent="STATE",o=P(),i=N("li"),(l=N("button")).textContent="HISTORY",s=P(),a=N("li"),(c=N("button")).textContent="PLUGINS",f
1=P(),d=N("li"),(p=N("button")).textContent="SCHEMA",h=P(),g=N("li"),(m=N("button")).textContent="STRUCTURE",y=P(),b=N("li"),($=N("button")).textContent="SNAPSHOTS",I(r,"class","svelte-10notzq"),V(r,"active","state"===t[0]),I(l,"class","svelte-10notzq"),V(l,"active","history"===t[0]),I(c,"class","svelte-10notzq"),V(c,"active","plugins"===t[0]),I(p,"class","svelte-10notzq"),V(p,"active","schema"===t[0]),I(m,"class","svelte-10notzq"),V(m,"active","structure"===t[0]),I($,"class","svelte-10notzq"),V($,"active","snapshots"===t[0]),I(e,"class","tabs-menu svelte-10notzq")},m(u,v){D(u,e,v),E(e,n),E(n,r),E(e,o),E(e,i),E(i,l),E(e,s),E(e,a),E(a,c),E(e,f),E(e,d),E(d,p),E(e,h),E(e,g),E(g,m),E(e,y),E(e,b),E(b,$),x||(w=[z(r,"click",t[2]),z(l,"click",t[3]),z(c,"click",t[4]),z(p,"click",t[5]),z(m,"click",t[6]),z($,"click",t[7])],x=!0)},p(t,e){let[n]=e;1&n&&V(r,"active","state"===t[0]),1&n&&V(l,"active","history"===t[0]),1&n&&V(c,"active","plugins"===t[0]),1&n&&V(p,"active","schema"===t[0]),1&n&&V(m,"active","structure"===t[0]),1&n&&V($,"active","snapshots"===t[0])},i:u,o:u,d(t){t&&S(e),x=!1,v(w)}}}function tU(t,e,n){let{active:r,onClickTab:o}=e;return t.$$set=t=>{"active"in t&&n(0,r=t.active),"onClickTab"in t&&n(1,o=t.onClickTab)},[r,o,()=>o("state"),()=>o("history"),()=>o("plugins"),()=>o("schema"),()=>o("structure"),()=>o("snapshots")]}class tJ extends ty{constructor(t){super(),tm(this,t,tU,tH,m,{active:0,onClickTab:1},tV)}}var tG={exports:{}};(l=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]},l.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 o=r;if(null==t||null==e)throw Error("Null input. (diff_main)");if(t==e)return t?[new l.Diff(0,t)]:[];void 0===n&&(n=!0);var i=n,s=this.diff_commonPrefix(t,e),a=t.substring(0,s);t=t.substring(s),e=e.substring(s),s=this.diff_commonSuffix(t,e);var c=t.substring(t.length-s);t=t.substring(0,t.length-s),e=e.substring(0,e.length-s);var f=this.diff_compute_(t,e,i,o);return a&&f.unshift(new l.Diff(0,a)),c&&f.push(new l.Diff(0,c)),this.diff_cleanupMerge(f),f},l.prototype.diff_compute_=function(t,e,n,r){if(!t)return[new l.Diff(1,e)];if(!e)return[new l.Diff(-1,t)];var o,i=t.length>e.length?t:e,s=t.length>e.length?e:t,a=i.indexOf(s);if(-1!=a)return o=[new l.Diff(1,i.substring(0,a)),new l.Diff(0,s),new l.Diff(1,i.substring(a+s.length))],t.length>e.length&&(o[0][0]=o[2][0]=-1),o;if(1==s.length)return[new l.Diff(-1,t),new l.Diff(1,e)];var c=this.diff_halfMatch_(t,e);if(c){var f=c[0],u=c[1],d=c[2],p=c[3],h=c[4],v=this.diff_main(f,d,n,r),g=this.diff_main(u,p,n,r);return v.concat([new l.Diff(0,h)],g)}return n&&t.length>100&&e.length>100?this.diff_lineMode_(t,e,r):this.diff_bisect_(t,e,r)},l.prototype.diff_lineMode_=function(t,e,n){var r=this.diff_linesToChars_(t,e);t=r.chars1,e=r.chars2;var o=r.lineArray,i=this.diff_main(t,e,!1,n);this.diff_charsToLines_(i,o),this.diff_cleanupSemantic(i),i.push(new l.Diff(0,""));for(var s=0,a=0,c=0,f="",u="";s<i.length;){switch(i[s][0]){case 1:c++,u+=i[s][1];break;case -1:a++,f+=i[s][1];break;case 0:if(a>=1&&c>=1){i.splice(s-a-c,a+c),s=s-a-c;for(var d=this.diff_main(f,u,!1,n),p=d.length-1;p>=0;p--)i.splice(s,0,d[p]);s+=d.length}c=0,a=0,f="",u=""}s++}return i.pop(),i},l.prototype.diff_bisect_=function(t,e,n){for(var r=t.length,o=e.length,i=Math.ceil((r+o)/2),s=2*i,a=Array(s),c=Array(s),f=0;f<s;f++)a[f]=-1,c[f]=-1;a[i+1]=0,c[i+1]=0;for(var u=r-o,d=u%2!=0,p=0,h=0,v=0,g=0,m=0;m<i&&!(new Date().getTime()>n);m++){for(var y=-m+p;y<=m-h;y+=2){for(var b,$=i+y,x=(b=y==-m||y!=m&&a[$-1]<a[$+1]?a[$+1]:a[$-1]+1)-y;b<r&&x<o&&t.charAt(b)==e.charAt(x);)b++,x++;if(a[$]=b,b>r)h+=2;else if(x>o)p+=2;else if(d){var w=i+u-y;if(w>=0&&w<s&&-1!=c[w]){var k=r-c[w];if(b>=k)return this.diff_bisectSplit_(t,e,b,x,n)}}}for(var _=-m+v;_<=m-g;_+=2){for(var k,w=i+_,j=(k=_==-m||_!=m&&c[w-1]<c[w+1]?c[w+1]:c[w-1]+1)-_;k<r&&j<o&&t.charAt(r-k-1)==e.charAt(o-j-1);)k++,j++;if(c[w]=k,k>r)g+=2;else if(j>o)v+=2;else if(!d){var $=i+u-_;if($>=0&&$<s&&-1!=a[$]){var b=a[$],x=i+b-$;if(b>=(k=r-k))return this.diff_bisectSplit_(t,e,b,x,n)}}}}return[new l.Diff(-1,t),new l.Diff(1,e)]},l.prototype.diff_bisectSplit_=function(t,e,n,r,o){var i=t.substring(0,n),l=e.substring(0,r),s=t.substring(n),a=e.substring(r),c=this.diff_main(i,l,!1,o),f=this.diff_main(s,a,!1,o);return c.concat(f)},l.prototype.diff_linesToChars_=function(t,e){var n=[],r={};function o(t){for(var e="",o=0,l=-1,s=n.length;l<t.length-1;){-1==(l=t.indexOf("\n",o))&&(l=t.length-1);var a=t.substring(o,l+1);(r.hasOwnProperty?r.hasOwnProperty(a):void 0!==r[a])?e+=String.fromCharCode(r[a]):(s==i&&(a=t.substring(o),l=t.length),e+=String.fromCharCode(s),r[a]=s,n[s++]=a),o=l+1}return e}n[0]="";var i=4e4,l=o(t);return i=65535,{chars1:l,chars2:o(e),lineArray:n}},l.prototype.diff_charsToLines_=function(t,e){for(var n=0;n<t.length;n++){for(var r=t[n][1],o=[],i=0;i<r.length;i++)o[i]=e[r.charCodeAt(i)];t[n][1]=o.join("")}},l.prototype.diff_commonPrefix=function(t,e){if(!t||!e||t.charAt(0)!=e.charAt(0))return 0;for(var n=0,r=Math.min(t.length,e.length),o=r,i=0;n<o;)t.substring(i,o)==e.substring(i,o)?i=n=o:r=o,o=Math.floor((r-n)/2+n);return o},l.prototype.diff_commonSuffix=function(t,e){if(!t||!e||t.charAt(t.length-1)!=e.charAt(e.length-1))return 0;for(var n=0,r=Math.min(t.length,e.length),o=r,i=0;n<o;)t.substring(t.length-o,t.length-i)==e.substring(e.length-o,e.length-i)?i=n=o:r=o,o=Math.floor((r-n)/2+n);return o},l.prototype.diff_commonOverlap_=function(t,e){var n=t.length,r=e.length;if(0==n||0==r)return 0;n>r?t=t.substring(n-r):n<r&&(e=e.substring(0,n));var o=Math.min(n,r);if(t==e)return o;for(var i=0,l=1;;){var s=t.substring(o-l),a=e.indexOf(s);if(-1==a)return i;l+=a,(0==a||t.substring(o-l)==e.substring(0,l))&&(i=l,l++)}},l.prototype.diff_halfMatch_=function(t,e){if(this.Diff_Timeout<=0)return null;var n,r,o,i,l,s=t.length>e.length?t:e,a=t.length>e.length?e:t;if(s.length<4||2*a.length<s.length)return null;var c=this;function f(t,e,n){for(var r,o,i,l,s=t.substring(n,n+Math.floor(t.length/4)),a=-1,f="";-1!=(a=e.indexOf(s,a+1));){var u=c.diff_commonPrefix(t.substring(n),e.substring(a)),d=c.diff_commonSuffix(t.substring(0,n),e.substring(0,a));f.length<d+u&&(f=e.substring(a-d,a)+e.substring(a,a+u),r=t.substring(0,n-d),o=t.substring(n+u),i=e.substring(0,a-d),l=e.substring(a+u))}return 2*f.length>=t.length?[r,o,i,l,f]:null}var u=f(s,a,Math.ceil(s.length/4)),d=f(s,a,Math.ceil(s.length/2));return u||d?(n=d?u&&u[4].length>d[4].length?u:d:u,t.length>e.length?(r=n[0],o=n[1],i=n[2],l=n[3]):(i=n[0],l=n[1],r=n[2],o=n[3]),[r,o,i,l,n[4]]):null},l.prototype.diff_cleanupSemantic=function(t){for(var e=!1,n=[],r=0,o=null,i=0,s=0,a=0,c=0,f=0;i<t.length;)0==t[i][0]?(n[r++]=i,s=c,a=f,c=0,f=0,o=t[i][1]):(1==t[i][0]?c+=t[i][1].length:f+=t[i][1].length,o&&o.length<=Math.max(s,a)&&o.length<=Math.max(c,f)&&(t.splice(n[r-1],0,new l.Diff(-1,o)),t[n[r-1]+1][0]=1,r--,i=--r>0?n[r-1]:-1,s=0,a=0,c=0,f=0,o=null,e=!0)),i++;for(e&&this.diff_cleanupMerge(t),this.diff_cleanupSemanticLossless(t),i=1;i<t.length;){if(-1==t[i-1][0]&&1==t[i][0]){var u=t[i-1][1],d=t[i][1],p=this.diff_commonOverlap_(u,d),h=this.diff_commonOverlap_(d,u);p>=h?(p>=u.length/2||p>=d.length/2)&&(t.splice(i,0,new l.Diff(0,d.substring(0,p))),t[i-1][1]=u.substring(0,u.length-p),t[i+1][1]=d.substring(p),i++):(h>=u.length/2||h>=d.length/2)&&(t.splice(i,0,new l.Diff(0,u.substring(0,h))),t[i-1][0]=1,t[i-1][1]=d.substring(0,d.length-h),t[i+1][0]=-1,t[i+1][1]=u.substring(h),i++),i++}i++}},l.prototype.diff_cleanupSemanticLossless=function(t){function e(t,e){if(!t||!e)return 6;
vendor: 1,661 bytes, line 1
1var n=t.charAt(t.length-1),r=e.charAt(0),o=n.match(l.nonAlphaNumericRegex_),i=r.match(l.nonAlphaNumericRegex_),s=o&&n.match(l.whitespaceRegex_),a=i&&r.match(l.whitespaceRegex_),c=s&&n.match(l.linebreakRegex_),f=a&&r.match(l.linebreakRegex_),u=c&&t.match(l.blanklineEndRegex_),d=f&&e.match(l.blanklineStartRegex_);return u||d?5:c||f?4:o&&!s&&a?3:s||a?2:o||i?1:0}for(var n=1;n<t.length-1;){if(0==t[n-1][0]&&0==t[n+1][0]){var r=t[n-1][1],o=t[n][1],i=t[n+1][1],s=this.diff_commonSuffix(r,o);if(s){var a=o.substring(o.length-s);r=r.substring(0,r.length-s),o=a+o.substring(0,o.length-s),i=a+i}for(var c=r,f=o,u=i,d=e(r,o)+e(o,i);o.charAt(0)===i.charAt(0);){r+=o.charAt(0),o=o.substring(1)+i.charAt(0),i=i.substring(1);var p=e(r,o)+e(o,i);p>=d&&(d=p,c=r,f=o,u=i)}t[n-1][1]!=c&&(c?t[n-1][1]=c:(t.splice(n-1,1),n--),t[n][1]=f,u?t[n+1][1]=u:(t.splice(n+1,1),n--))}n++}},l.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,l.whitespaceRegex_=/\s/,l.linebreakRegex_=/[\r\n]/,l.blanklineEndRegex_=/\n\r?\n$/,l.blanklineStartRegex_=/^\r?\n\r?\n/,l.prototype.diff_cleanupEfficiency=function(t){for(var e=!1,n=[],r=0,o=null,i=0,s=!1,a=!1,c=!1,f=!1;i<t.length;)0==t[i][0]?(t[i][1].length<this.Diff_EditCost&&(c||f)?(n[r++]=i,s=c,a=f,o=t[i][1]):(r=0,o=null),c=f=!1):(-1==t[i][0]?f=!0:c=!0,o&&(s&&a&&c&&f||o.length<this.Diff_EditCost/2&&s+a+c+f==3)&&(t.splice(n[r-1],0,new l.Diff(-1,o)),t[n[r-1]+1][0]=1,r--,o=null,s&&a?(c=f=!0,r=0):(i=--r>0?n[r-1]:-1,c=f=!1),e=!0)),i++;e&&this.diff_cleanupMerge(t)},l.prototype.diff_cleanupMerge=function(t){t.push(new l.Diff(0,""));for(var e,n=0,r=0,o=0,i="",s="";n<t.length;)switch(t[n][0]){case 1:o++,s+=t[n][1],n++;break;case -1:r++,i+=t[n][1],n++;break;
vendor: 9,480 bytes, line 1
1case 0:r+o>1?(0!==r&&0!==o&&(0!==(e=this.diff_commonPrefix(s,i))&&(n-r-o>0&&0==t[n-r-o-1][0]?t[n-r-o-1][1]+=s.substring(0,e):(t.splice(0,0,new l.Diff(0,s.substring(0,e))),n++),s=s.substring(e),i=i.substring(e)),0!==(e=this.diff_commonSuffix(s,i))&&(t[n][1]=s.substring(s.length-e)+t[n][1],s=s.substring(0,s.length-e),i=i.substring(0,i.length-e))),n-=r+o,t.splice(n,r+o),i.length&&(t.splice(n,0,new l.Diff(-1,i)),n++),s.length&&(t.splice(n,0,new l.Diff(1,s)),n++),n++):0!==n&&0==t[n-1][0]?(t[n-1][1]+=t[n][1],t.splice(n,1)):n++,o=0,r=0,i="",s=""}""===t[t.length-1][1]&&t.pop();var a=!1;for(n=1;n<t.length-1;)0==t[n-1][0]&&0==t[n+1][0]&&(t[n][1].substring(t[n][1].length-t[n-1][1].length)==t[n-1][1]?(t[n][1]=t[n-1][1]+t[n][1].substring(0,t[n][1].length-t[n-1][1].length),t[n+1][1]=t[n-1][1]+t[n+1][1],t.splice(n-1,1),a=!0):t[n][1].substring(0,t[n+1][1].length)==t[n+1][1]&&(t[n-1][1]+=t[n+1][1],t[n][1]=t[n][1].substring(t[n+1][1].length)+t[n+1][1],t.splice(n+1,1),a=!0)),n++;a&&this.diff_cleanupMerge(t)},l.prototype.diff_xIndex=function(t,e){var n,r=0,o=0,i=0,l=0;for(n=0;n<t.length&&(1!==t[n][0]&&(r+=t[n][1].length),-1!==t[n][0]&&(o+=t[n][1].length),!(r>e));n++)i=r,l=o;return t.length!=n&&-1===t[n][0]?l:l+(e-i)},l.prototype.diff_prettyHtml=function(t){for(var e=[],n=/&/g,r=/</g,o=/>/g,i=/\n/g,l=0;l<t.length;l++){var s=t[l][0],a=t[l][1].replace(n,"&amp;").replace(r,"&lt;").replace(o,"&gt;").replace(i,"&para;<br>");switch(s){case 1:e[l]='<ins style="background:#e6ffe6;">'+a+"</ins>";break;case -1:e[l]='<del style="background:#ffe6e6;">'+a+"</del>";break;case 0:e[l]="<span>"+a+"</span>"}}return e.join("")},l.prototype.diff_text1=function(t){for(var e=[],n=0;n<t.length;n++)1!==t[n][0]&&(e[n]=t[n][1]);return e.join("")},l.prototype.diff_text2=function(t){for(var e=[],n=0;n<t.length;n++)-1!==t[n][0]&&(e[n]=t[n][1]);return e.join("")},l.prototype.diff_levenshtein=function(t){for(var e=0,n=0,r=0,o=0;o<t.length;o++){var i=t[o][0],l=t[o][1];switch(i){case 1:n+=l.length;break;case -1:r+=l.length;break;case 0:e+=Math.max(n,r),n=0,r=0}}return e+Math.max(n,r)},l.prototype.diff_toDelta=function(t){for(var e=[],n=0;n<t.length;n++)switch(t[n][0]){case 1:e[n]="+"+encodeURI(t[n][1]);break;case -1:e[n]="-"+t[n][1].length;break;case 0:e[n]="="+t[n][1].length}return e.join("	").replace(/%20/g," ")},l.prototype.diff_fromDelta=function(t,e){for(var n=[],r=0,o=0,i=e.split(/\t/g),s=0;s<i.length;s++){var a=i[s].substring(1);switch(i[s].charAt(0)){case"+":try{n[r++]=new l.Diff(1,decodeURI(a))}catch(t){throw Error("Illegal escape in diff_fromDelta: "+a)}break;case"-":case"=":var c=parseInt(a,10);if(isNaN(c)||c<0)throw Error("Invalid number in diff_fromDelta: "+a);var f=t.substring(o,o+=c);"="==i[s].charAt(0)?n[r++]=new l.Diff(0,f):n[r++]=new l.Diff(-1,f);break;default:if(i[s])throw Error("Invalid diff operation in diff_fromDelta: "+i[s])}}if(o!=t.length)throw Error("Delta length ("+o+") does not equal source text length ("+t.length+").");return n},l.prototype.match_main=function(t,e,n){if(null==t||null==e||null==n)throw Error("Null input. (match_main)");return(n=Math.max(0,Math.min(n,t.length)),t==e)?0:t.length?t.substring(n,n+e.length)==e?n:this.match_bitap_(t,e,n):-1},l.prototype.match_bitap_=function(t,e,n){if(e.length>this.Match_MaxBits)throw Error("Pattern too long for this browser.");var r,o,i,l=this.match_alphabet_(e),s=this;function a(t,r){var o=t/e.length,i=Math.abs(n-r);return s.Match_Distance?o+i/s.Match_Distance:i?1:o}var c=this.Match_Threshold,f=t.indexOf(e,n);-1!=f&&(c=Math.min(a(0,f),c),-1!=(f=t.lastIndexOf(e,n+e.length))&&(c=Math.min(a(0,f),c)));var u=1<<e.length-1;f=-1;for(var d=e.length+t.length,p=0;p<e.length;p++){for(r=0,o=d;r<o;)a(p,n+o)<=c?r=o:d=o,o=Math.floor((d-r)/2+r);d=o;var h=Math.max(1,n-o+1),v=Math.min(n+o,t.length)+e.length,g=Array(v+2);g[v+1]=(1<<p)-1;for(var m=v;m>=h;m--){var y=l[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]&u){var b=a(p,m-1);if(b<=c){if(c=b,(f=m-1)>n)h=Math.max(1,2*n-f);else break}}}if(a(p+1,n)>c)break;i=g}return f},l.prototype.match_alphabet_=function(t){for(var e={},n=0;n<t.length;n++)e[t.charAt(n)]=0;for(var n=0;n<t.length;n++)e[t.charAt(n)]|=1<<t.length-n-1;return e},l.prototype.patch_addContext_=function(t,e){if(0!=e.length){if(null===t.start2)throw Error("patch not initialized");for(var n=e.substring(t.start2,t.start2+t.length1),r=0;e.indexOf(n)!=e.lastIndexOf(n)&&n.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)r+=this.Patch_Margin,n=e.substring(t.start2-r,t.start2+t.length1+r);r+=this.Patch_Margin;var o=e.substring(t.start2-r,t.start2);o&&t.diffs.unshift(new l.Diff(0,o));var i=e.substring(t.start2+t.length1,t.start2+t.length1+r);i&&t.diffs.push(new l.Diff(0,i)),t.start1-=o.length,t.start2-=o.length,t.length1+=o.length+i.length,t.length2+=o.length+i.length}},l.prototype.patch_make=function(t,e,n){if("string"==typeof t&&"string"==typeof e&&void 0===n)r=t,(o=this.diff_main(r,e,!0)).length>2&&(this.diff_cleanupSemantic(o),this.diff_cleanupEfficiency(o));else if(t&&"object"==typeof t&&void 0===e&&void 0===n)o=t,r=this.diff_text1(o);else if("string"==typeof t&&e&&"object"==typeof e&&void 0===n)r=t,o=e;else if("string"==typeof t&&"string"==typeof e&&n&&"object"==typeof n)r=t,o=n;else throw Error("Unknown call format to patch_make.");if(0===o.length)return[];for(var r,o,i=[],s=new l.patch_obj,a=0,c=0,f=0,u=r,d=r,p=0;p<o.length;p++){var h=o[p][0],v=o[p][1];switch(a||0===h||(s.start1=c,s.start2=f),h){case 1:s.diffs[a++]=o[p],s.length2+=v.length,d=d.substring(0,f)+v+d.substring(f);break;case -1:s.length1+=v.length,s.diffs[a++]=o[p],d=d.substring(0,f)+d.substring(f+v.length);break;case 0:v.length<=2*this.Patch_Margin&&a&&o.length!=p+1?(s.diffs[a++]=o[p],s.length1+=v.length,s.length2+=v.length):v.length>=2*this.Patch_Margin&&a&&(this.patch_addContext_(s,u),i.push(s),s=new l.patch_obj,a=0,u=d,c=f)}1!==h&&(c+=v.length),-1!==h&&(f+=v.length)}return a&&(this.patch_addContext_(s,u),i.push(s)),i},l.prototype.patch_deepCopy=function(t){for(var e=[],n=0;n<t.length;n++){var r=t[n],o=new l.patch_obj;o.diffs=[];for(var i=0;i<r.diffs.length;i++)o.diffs[i]=new l.Diff(r.diffs[i][0],r.diffs[i][1]);o.start1=r.start1,o.start2=r.start2,o.length1=r.length1,o.length2=r.length2,e[n]=o}return e},l.prototype.patch_apply=function(t,e){if(0==t.length)return[e,[]];t=this.patch_deepCopy(t);var n=this.patch_addPadding(t);e=n+e+n,this.patch_splitMax(t);for(var r=0,o=[],i=0;i<t.length;i++){var l=t[i].start2+r,s=this.diff_text1(t[i].diffs),a=-1;if(s.length>this.Match_MaxBits?-1!=(f=this.match_main(e,s.substring(0,this.Match_MaxBits),l))&&(-1==(a=this.match_main(e,s.substring(s.length-this.Match_MaxBits),l+s.length-this.Match_MaxBits))||f>=a)&&(f=-1):f=this.match_main(e,s,l),-1==f)o[i]=!1,r-=t[i].length2-t[i].length1;else if(o[i]=!0,r=f-l,u=-1==a?e.substring(f,f+s.length):e.substring(f,a+this.Match_MaxBits),s==u)e=e.substring(0,f)+this.diff_text2(t[i].diffs)+e.substring(f+s.length);else{var c=this.diff_main(s,u,!1);if(s.length>this.Match_MaxBits&&this.diff_levenshtein(c)/s.length>this.Patch_DeleteThreshold)o[i]=!1;else{this.diff_cleanupSemanticLossless(c);for(var f,u,d,p=0,h=0;h<t[i].diffs.length;h++){var v=t[i].diffs[h];0!==v[0]&&(d=this.diff_xIndex(c,p)),1===v[0]?e=e.substring(0,f+d)+v[1]+e.substring(f+d):-1===v[0]&&(e=e.substring(0,f+d)+e.substring(f+this.diff_xIndex(c,p+v[1].length))),-1!==v[0]&&(p+=v[1].length)}}}}return[e=e.substring(n.length,e.length-n.length),o]},l.prototype.patch_addPadding=function(t){for(var e=this.Patch_Margin,n="",r=1;r<=e;r++)n+=String.fromCharCode(r);for(var r=0;r<t.length;r++)t[r].start1+=e,t[r].start2+=e;var o=t[0],i=o.diffs;if(0==i.length||0!=i[0][0])i.unshift(new l.Diff(0,n)),o.start1-=e,o.start2-=e,o.length1+=e,o.length2+=e;else if(e>i[0][1].length){var s=e-i[0][1].length;i[0][1]=n.substring(i[0][1].length)+i[0][1],o.start1-=s,o.start2-=s,o.length1+=s,o.length2+=s}if(0==(i=(o=t[t.length-1]).diffs).length||0!=i[i.length-1][0])i.push(new l.Diff(0,n)),o.length1+=e,o.length2+=e;else if(e>i[i.length-1][1].length){var s=e-i[i.length-1][1].length;i[i.length-1][1]+=n.substring(0,s),o.length1+=s,o.length2+=s}return n},l.prototype.patch_splitMax=function(t){for(var e=this.Match_MaxBits,n=0;n<t.length;n++)if(!(t[n].length1<=e)){var r=t[n];t.splice(n--,1);for(var o=r.start1,i=r.start2,s="";0!==r.diffs.length;){var a=new l.patch_obj,c=!0;for(a.start1=o-s.length,a.start2=i-s.length,""!==s&&(a.length1=a.length2=s.length,a.diffs.push(new l.Diff(0,s)));0!==r.diffs.length&&a.length1<e-this.Patch_Margin;){var f=r.diffs[0][0],u=r.diffs[0][1];1===f?(a.length2+=u.length,i+=u.length,a.diffs.push(r.diffs.shift()),c=!1):-1===f&&1==a.diffs.length&&0==a.diffs[0][0]&&u.length>2*e?(a.length1+=u.length,o+=u.length,c=!1,a.diffs.push(new l.Diff(f,u)),r.diffs.shift()):(u=u.substring(0,e-a.length1-this.Patch_Margin),a.length1+=u.length,o+=u.length,0===f?(a.length2+=u.length,i+=u.length):c=!1,a.diffs.push(new l.Diff(f,u)),u==r.diffs[0][1]?r.diffs.shift():r.diffs[0][1]=r.diffs[0][1].substring(u.length))}s=(s=this.diff_text2(a.diffs)).substring(s.length-this.Patch_Margin);var d=this.diff_text1(r.diffs).substring(0,this.Patch_Margin);""!==d&&(a.length1+=d.length,a.length2+=d.length,0!==a.diffs.length&&0===a.diffs[a.diffs.length-1][0]?a.diffs[a.diffs.length-1][1]+=d:a.diffs.push(new l.Diff(0,d))),c||t.splice(++n,0,a)}}},l.prototype.patch_toText=function(t){for(var e=[],n=0;n<t.length;n++)e[n]=t[n];return e.join("")},l.prototype.patch_fromText=function(t){var e=[];
1if(!t)return e;for(var n=t.split("\n"),r=0,o=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;r<n.length;){var i=n[r].match(o);if(!i)throw Error("Invalid patch string: "+n[r]);var s=new l.patch_obj;for(e.push(s),s.start1=parseInt(i[1],10),""===i[2]?(s.start1--,s.length1=1):"0"==i[2]?s.length1=0:(s.start1--,s.length1=parseInt(i[2],10)),s.start2=parseInt(i[3],10),""===i[4]?(s.start2--,s.length2=1):"0"==i[4]?s.length2=0:(s.start2--,s.length2=parseInt(i[4],10)),r++;r<n.length;){var a=n[r].charAt(0);try{var c=decodeURI(n[r].substring(1))}catch(t){throw Error("Illegal escape in patch_fromText: "+c)}if("-"==a)s.diffs.push(new l.Diff(-1,c));else if("+"==a)s.diffs.push(new l.Diff(1,c));else if(" "==a)s.diffs.push(new l.Diff(0,c));else if("@"==a)break;else if(""===a);else throw Error('Invalid patch mode "'+a+'" in: '+c);r++}}return e},l.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},l.patch_obj.prototype.toString=function(){t=0===this.length1?this.start1+",0":1==this.length1?this.start1+1:this.start1+1+","+this.length1;for(var t,e,n=["@@ -"+t+" +"+(0===this.length2?this.start2+",0":1==this.length2?this.start2+1:this.start2+1+","+this.length2)+" @@\n"],r=0;r<this.diffs.length;r++){switch(this.diffs[r][0]){case 1:e="+";break;case -1:e="-";break;case 0:e=" "}n[r+1]=e+encodeURI(this.diffs[r][1])+"\n"}return n.join("").replace(/%20/g," ")},tG.exports=l,tG.exports.diff_match_patch=l,tG.exports.DIFF_DELETE=-1,tG.exports.DIFF_INSERT=1,tG.exports.DIFF_EQUAL=0;var tK=(s=tG.exports)&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s,tW="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},tY=function(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")},tZ=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),tQ=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);if(null===i)return;return t(i,n,r)}if("value"in o)return o.value;var l=o.get;if(void 0!==l)return l.call(r)},tX=function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},t1=function(t,e){if(!t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&("object"==typeof e||"function"==typeof e)?e:t},t0=function(){function t(e){tY(this,t),this.selfOptions=e||{},this.pipes={}}return tZ(t,[{key:"options",value:function(t){return t&&(this.selfOptions=t),this.selfOptions}},{key:"pipe",value:function(t,e){var n=e;if("string"==typeof t){if(void 0===n)return this.pipes[t];this.pipes[t]=n}if(t&&t.name){if((n=t).processor===this)return n;this.pipes[n.name]=n}return n.processor=this,n}},{key:"process",value:function(t,e){var n=t;n.options=this.options();for(var r=e||t.pipe||"default",o=void 0,i=void 0;r;)void 0!==n.nextAfterChildren&&(n.next=n.nextAfterChildren,n.nextAfterChildren=null),"string"==typeof r&&(r=this.pipe(r)),r.process(n),i=n,o=r,r=null,n&&n.next&&(n=n.next,r=i.nextPipe||n.pipe||o);return n.hasResult?n.result:void 0}}]),t}(),t2=function(){function t(e){tY(this,t),this.name=e,this.filters=[]}return tZ(t,[{key:"process",value:function(t){if(!this.processor)throw Error("add this pipe to a processor before using it");for(var e=this.debug,n=this.filters.length,r=0;r<n;r++){var o=this.filters[r];if(e&&this.log("filter: "+o.filterName),o(t),(void 0===t?"undefined":tW(t))==="object"&&t.exiting){t.exiting=!1;break}}!t.next&&this.resultCheck&&this.resultCheck(t)}},{key:"log",value:function(t){console.log("[jsondiffpatch] "+this.name+" pipe, "+t)}},{key:"append",value:function(){var t;return(t=this.filters).push.apply(t,arguments),this}},{key:"prepend",value:function(){var t;return(t=this.filters).unshift.apply(t,arguments),this}},{key:"indexOf",value:function(t){if(!t)throw Error("a filter name is required");for(var e=0;e<this.filters.length;e++)if(this.filters[e].filterName===t)return e;throw Error("filter not found: "+t)}},{key:"list",value:function(){return this.filters.map(function(t){return t.filterName})}},{key:"after",value:function(t){var e=this.indexOf(t),n=Array.prototype.slice.call(arguments,1
1);if(!n.length)throw Error("a filter is required");return n.unshift(e+1,0),Array.prototype.splice.apply(this.filters,n),this}},{key:"before",value:function(t){var e=this.indexOf(t),n=Array.prototype.slice.call(arguments,1);if(!n.length)throw Error("a filter is required");return n.unshift(e,0),Array.prototype.splice.apply(this.filters,n),this}},{key:"replace",value:function(t){var e=this.indexOf(t),n=Array.prototype.slice.call(arguments,1);if(!n.length)throw Error("a filter is required");return n.unshift(e,1),Array.prototype.splice.apply(this.filters,n),this}},{key:"remove",value:function(t){var e=this.indexOf(t);return this.filters.splice(e,1),this}},{key:"clear",value:function(){return this.filters.length=0,this}},{key:"shouldHaveResult",value:function(t){if(!1===t){this.resultCheck=null;return}if(!this.resultCheck){var e=this;return this.resultCheck=function(t){if(!t.hasResult){console.log(t);var n=Error(e.name+" failed");throw n.noResult=!0,n}},this}}}]),t}(),t3=function(){function t(){tY(this,t)}return tZ(t,[{key:"setResult",value:function(t){return this.result=t,this.hasResult=!0,this}},{key:"exit",value:function(){return this.exiting=!0,this}},{key:"switchTo",value:function(t,e){return"string"==typeof t||t instanceof t2?this.nextPipe=t:(this.next=t,e&&(this.nextPipe=e)),this}},{key:"push",value:function(t,e){return t.parent=this,void 0!==e&&(t.childName=e),t.root=this.root||this,t.options=t.options||this.options,this.children?(this.children[this.children.length-1].next=t,this.children.push(t)):(this.children=[t],this.nextAfterChildren=this.next||null,this.next=t),t.next=this,this}}]),t}(),t5="function"==typeof Array.isArray?Array.isArray:function(t){return t instanceof Array};function t6(t){if((void 0===t?"undefined":tW(t))!=="object")return t;if(null===t)return null;if(t5(t))return t.map(t6);if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){var e;return new RegExp((e=/^\/(.*)\/([gimyu]*)$/.exec(t.toString()))[1],e[2])}var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t6(t[r]));return n}var t4=function(t){function e(t,n){tY(this,e);var r=t1(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return r.left=t,r.right=n,r.pipe="diff",r}return tX(e,t),tZ(e,[{key:"setResult",value:function(t){if(this.options.cloneDiffValues&&(void 0===t?"undefined":tW(t))==="object"){var e="function"==typeof this.options.cloneDiffValues?this.options.cloneDiffValues:t6;"object"===tW(t[0])&&(t[0]=e(t[0])),"object"===tW(t[1])&&(t[1]=e(t[1]))}return t3.prototype.setResult.apply(this,arguments)}}]),e}(t3),t9=function(t){function e(t,n){tY(this,e);var r=t1(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return r.left=t,r.delta=n,r.pipe="patch",r}return tX(e,t),e}(t3),t7=function(t){function e(t){tY(this,e);var n=t1(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return n.delta=t,n.pipe="reverse",n}return tX(e,t),e}(t3),t8="function"==typeof Array.isArray?Array.isArray:function(t){return t instanceof Array},et=function(t){if(t.left===t.right){t.setResult(void 0).exit();return}if(void 0===t.left){if("function"==typeof t.right)throw Error("functions are not supported");t.setResult([t.right]).exit();return}
1if(void 0===t.right){t.setResult([t.left,0,0]).exit();return}if("function"==typeof t.left||"function"==typeof t.right)throw Error("functions are not supported");if(t.leftType=null===t.left?"null":tW(t.left),t.rightType=null===t.right?"null":tW(t.right),t.leftType!==t.rightType||"boolean"===t.leftType||"number"===t.leftType||("object"===t.leftType&&(t.leftIsArray=t8(t.left)),"object"===t.rightType&&(t.rightIsArray=t8(t.right)),t.leftIsArray!==t.rightIsArray)){t.setResult([t.left,t.right]).exit();return}t.left instanceof RegExp&&(t.right instanceof RegExp?t.setResult([t.left.toString(),t.right.toString()]).exit():t.setResult([t.left,t.right]).exit())};et.filterName="trivial";var ee=function(t){if(void 0===t.delta){t.setResult(t.left).exit();return}if(t.nested=!t8(t.delta),!t.nested){if(1===t.delta.length){t.setResult(t.delta[0]).exit();return}if(2===t.delta.length){if(t.left instanceof RegExp){var e=/^\/(.*)\/([gimyu]+)$/.exec(t.delta[1]);if(e){t.setResult(new RegExp(e[1],e[2])).exit();return}}t.setResult(t.delta[1]).exit(
1);return}3===t.delta.length&&0===t.delta[2]&&t.setResult(void 0).exit()}};ee.filterName="trivial";var en=function(t){if(void 0===t.delta){t.setResult(t.delta).exit();return}if(t.nested=!t8(t.delta),!t.nested){if(1===t.delta.length){t.setResult([t.delta[0],0,0]).exit();return}if(2===t.delta.length){t.setResult([t.delta[1],t.delta[0]]).exit();return}3===t.delta.length&&0===t.delta[2]&&t.setResult([t.delta[0]]).exit()}};function er(t){if(t&&t.children){for(var e=t.children.length,n=void 0,r=t.result,o=0;o<e;o++)void 0!==(n=t.children[o]).result&&((r=r||{})[n.childName]=n.result);r&&t.leftIsArray&&(r._t="a"),t.setResult(r).exit()}}function eo(t){if(!t.leftIsArray&&"object"===t.leftType){var e=void 0,n=void 0,r=t.options.propertyFilter;for(e in t.left)Object.prototype.hasOwnProperty.call(t.left,e)&&(!r||r(e,t))&&(n=new t4(t.left[e],t.right[e]),t.push(n,e));for(e in t.right)Object.prototype.hasOwnProperty.call(t.right,e)&&(!r||r(e,t))&&void 0===t.left[e]&&(n=new t4(void 0,t.right[e]),t.push(n,e));if(!t.children||0===t.children.length){t.setResult(void 0).exit();return}t.exit()}}en.filterName="trivial",er.filterName="collectChildren",eo.filterName="objects";var ei=function(t){if(t.nested&&!t.delta._t){var e=void 0,n=void 0;for(e in t.delta)n=new t9(t.left[e],t.delta[e]),t.push(n,e);t.exit()}};ei.filterName="objects";var el=function(t){if(t&&t.children&&!t.delta._t){for(var e=t.children.length,n=void 0,r=0;r<e;r++)n=t.children[r],Object.prototype.hasOwnProperty.call(t.left,n.childName)&&void 0===n.result?delete t.left[n.childName]:t.left[n.childName]!==n.result&&(t.left[n.childName]=n.result);t.setResult(t.left).exit()}};el.filterName="collectChildren";var es=function(t){if(t.nested&&!t.delta._t){var e=void 0,n=void 0;for(e in t.delta)n=new t7(t.delta[e]),t.push(n,e);t.exit()}};function ea(t){if(t&&t.children&&!t.delta._t){for(var e=t.children.length,n=void 0,r={},o=0;o<e;o++)r[(n=t.children[o]).childName]!==n.result&&(r[n.childName]=n.result);t.setResult(r).exit()}}es.filterName="objects",ea.filterName="collectChildren";var ec=function(t,e,n,r){return t[n]===e[r]},ef=function(t,e,n,r){var o=t.length,i=e.length,l=void 0,s=void 0,a=[o+1];for(l=0;l<o+1;l++)for(s=0,a[l]=[i+1];s<i+1;s++)a[l][s]=0;for(l=1,a.match=n;l<o+1;l++)for(s=1;s<i+1;s++)n(t,e,l-1,s-1,r)?a[l][s]=a[l-1][s-1]+1:a[l][s]=Math.max(a[l-1][s],a[l][s-1]);return a},eu=function(t,e,n,r){for(var o=e.length,i=n.length,l={sequence:[],indices1:[],indices2:[]};0!==o&&0!==i;)t.match(e,n,o-1,i-1,r)?(l.sequence.unshift(e[o-1]),l.indices1.unshift(o-1),l.indices2.unshift(i-1),--o,--i):t[o][i-1]>t[o-1][i]?--i:--o;return l},ed=function(t,e,n,r){var o=r||{},i=eu(ef(t,e,n||ec,o),t,e,o);return"string"==typeof t&&"string"==typeof e&&(i.sequence=i.sequence.join("")),i},ep="function"==typeof Array.isArray?Array.isArray:function(t){return t instanceof Array},eh="function"==typeof Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var n=t.length,r=0;r<n;r++)if(t[r]===e)return r;return -1};function ev(t,e,n,r,o){var i=t[n],l=e[r];if(i===l)return!0;if((void 0===i?"undefined":tW(i))!=="object"||(void 0===l?"undefined":tW(l))!=="object")return!1;var s=o.objectHash;if(!s)return o.matchByPosition&&n===r;var a=void 0,c=void 0;return"number"==typeof n?(o.hashCache1=o.hashCache1||[],void 0===(a=o.hashCache1[n])&&(o.hashCache1[n]=a=s(i,n))):a=s(i),void 0!==a&&("number"==typeof r?(o.hashCache2=o.hashCache2||[],void 0===(c=o.hashCache2[r])&&(o.hashCache2[r]=c=s(l,r))):c=s(l),void 0!==c&&a===c)}var eg=function(t){if(t.leftIsArray){var e={objectHash:t.options&&t.options.objectHash,matchByPosition:t.options&&t.options.matchByPosition},n=0,r=0,o=void 0,i=void 0,l=void 0,s=t.left,a=t.right,c=s.length,f=a.length,u=void 0;for(c>0&&f>0&&!e.objectHash&&"boolean"!=typeof e.matchByPosition&&(e.matchByPosition=!function(t,e,n,r){for(var o=0;o<n;o++)for(var i=t[o],l=0;l<r;l++){var s=e[l];if(o!==l&&i===s)return!0}}(s,a,c,f));n<c&&n<f&&ev(s,a,n,n,e);)o=n,u=new t4(t.left[o],t.right[o]),t.push(u,o),n++;for(;r+n<c&&r+n<f&&ev(s,a,c-1-r,f-1-r,e);)i=c-1-r,l=f-1-r,u=new t4(t.left[i],t.right[l]),t.push(u,l),r++;var d=void 0;
1if(n+r===c){if(c===f){t.setResult(void 0).exit();return}for(d=d||{_t:"a"},o=n;o<f-r;o++)d[o]=[a[o]];t.setResult(d).exit();return}if(n+r===f){for(d=d||{_t:"a"},o=n;o<c-r;o++)d["_"+o]=[s[o],0,0];t.setResult(d).exit();return}delete e.hashCache1,delete e.hashCache2;var p=s.slice(n,c-r),h=a.slice(n,f-r),v=ed(p,h,ev,e),g=[];for(d=d||{_t:"a"},o=n;o<c-r;o++)0>eh(v.indices1,o-n)&&(d["_"+o]=[s[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;o<f-r;o++){var $=eh(v.indices2,o-n);if($<0){var x=!1;if(m&&b>0){for(var w=0;w<b;w++)if(ev(p,h,(i=g[w])-n,o-n,e)){d["_"+i].splice(1,2,o,3),y||(d["_"+i][0]=""),l=o,u=new t4(t.left[i],t.right[l]),t.push(u,l),g.splice(w,1),x=!0;break}}x||(d[o]=[a[o]])}else i=v.indices1[$]+n,l=v.indices2[$]+n,u=new t4(t.left[i],t.right[l]),t.push(u,l)}t.setResult(d).exit()}};eg.filterName="arrays";var em=function(t,e){return t-e},ey=function(t){if(t.nested&&"a"===t.delta._t){var e,n=void 0,r=void 0,o=t.delta,i=t.left,l=[],s=[],a=[];for(n in o)if("_t"!==n){if("_"===n[0]){if(0===o[n][2]||3===o[n][2])l.push(parseInt(n.slice(1),10));else throw Error("only removal or move can be applied at original array indices, invalid diff type: "+o[n][2])}else 1===o[n].length?s.push({index:parseInt(n,10),value:o[n][0]}):a.push({index:parseInt(n,10),delta:o[n]})}for(n=(l=l.sort(em)).length-1;n>=0;n--){var c=o["_"+(r=l[n])],f=i.splice(r,1)[0];3===c[2]&&s.push({index:c[1],value:f})}var u=(s=s.sort((e="index",function(t,n){return t[e]-n[e]}))).length;for(n=0;n<u;n++){var d=s[n];i.splice(d.index,0,d.value)}var p=a.length,h=void 0;if(p>0)for(n=0;n<p;n++){var v=a[n];h=new t9(t.left[v.index],v.delta),t.push(h,v.index)}if(!t.children){t.setResult(t.left).exit();return}t.exit()}};ey.filterName="arrays";var eb=function(t){if(t&&t.children&&"a"===t.delta._t){for(var e=t.children.length,n=void 0,r=0;r<e;r++)n=t.children[r],t.left[n.childName]=n.result;t.setResult(t.left).exit()}};eb.filterName="arraysCollectChildren";var e$=function(t){if(!t.nested){3===t.delta[2]&&(t.newName="_"+t.delta[1],t.setResult([t.delta[0],parseInt(t.childName.substr(1),10),3]).exit());return}if("a"===t.delta._t){var e=void 0,n=void 0;for(e in t.delta)"_t"!==e&&(n=new t7(t.delta[e]),t.push(n,e));t.exit()}};e$.filterName="arrays";var ex=function(t,e,n){if("string"==typeof e&&"_"===e[0])return parseInt(e.substr(1),10);if(ep(n)&&0===n[2])return"_"+e;var r=+e;for(var o in t){var i=t[o];if(ep(i)){if(3===i[2]){var l=parseInt(o.substr(1),10),s=i[1];if(s===+e)return l;l<=r&&s>r?r++:l>=r&&s<r&&r--}else 0===i[2]?parseInt(o.substr(1),10)<=r&&r++:1===i.length&&o<=r&&r--}}return r};function ew(t){if(t&&t.children&&"a"===t.delta._t){for(var e=t.children.length,n=void 0,r={_t:"a"},o=0;o<e;o++){var i=(n=t.children[o]).newName;void 0===i&&(i=ex(t.delta,n.childName,n.result)),r[i]!==n.result&&(r[i]=n.result)}t.setResult(r).exit()}}ew.filterName="arraysCollectChildren";var ek=function(t){t.left instanceof Date?(t.right instanceof Date?t.left.getTime()!==t.right.getTime()?t.setResult([t.left,t.right]):t.setResult(void 0):t.setResult([t.left,t.right]),t.exit()):t.right instanceof Date&&t.setResult([t.left,t.right]).exit()};ek.filterName="dates";var e_=null,ej=function(t){if(!e_){var e=void 0;if("undefined"!=typeof diff_match_patch)e="function"==typeof diff_match_patch?new diff_match_patch:new diff_match_patch.diff_match_patch;else if(tK)try{e=tK&&new tK}catch(t){e=null}if(!e){if(!t)return null;var n=Error("text diff_match_patch library not found");throw n.diff_match_patch_not_found=!0,n}e_={diff:function(t,n){return e.patch_toText(e.patch_make(t,n))},patch:function(t,n){for(var r=e.patch_apply(e.patch_fromText(n),t),o=0;o<r[1].length;o++)r[1][o]||(Error("text patch failed").textPatchFailed=!0);return r[0]}}}return e_},eC=function(t){if("string"===t.leftType){var e=t.options&&t.options.textDiff&&t.options.textDiff.minLength||60;if(t.left.length<e||t.right.length<e){t.setResult([t.left,t.right]).exit();return}var n=ej();if(!n){t.setResult([t.left,t.right]).exit();return}var r=n.diff;t.setResult([r(t.left,t.right),0,2]).exit()}};eC.filterName="texts";var eO=function(t){if(!t.nested&&2===t.delta[2]){var e=ej(!0).patch;
1t.setResult(e(t.left,t.delta[0])).exit()}};eO.filterName="texts";var eE=function(t){var e=void 0,n=void 0,r=void 0,o=void 0,i=void 0,l=null,s=/^@@ +-(\d+),(\d+) +\+(\d+),(\d+) +@@$/;for(e=0,n=(r=t.split("\n")).length;e<n;e++){var a=(o=r[e]).slice(0,1);"@"===a?(l=s.exec(o),r[e]="@@ -"+l[3]+","+l[4]+" +"+l[1]+","+l[2]+" @@"):"+"===a?(r[e]="-"+r[e].slice(1),"+"===r[e-1].slice(0,1)&&(i=r[e],r[e]=r[e-1],r[e-1]=i)):"-"===a&&(r[e]="+"+r[e].slice(1))}return r.join("\n")},eq=function(t){t.nested||2!==t.delta[2]||t.setResult([eE(t.delta[0]),0,2]).exit()};eq.filterName="texts";var eD=function(){function t(e){tY(this,t),this.processor=new t0(e),this.processor.pipe(new t2("diff").append(er,et,ek,eC,eo,eg).shouldHaveResult()),this.processor.pipe(new t2("patch").append(el,eb,ee,eO,ei,ey).shouldHaveResult()),this.processor.pipe(new t2("reverse").append(ea,ew,en,eq,es,e$).shouldHaveResult())}return tZ(t,[{key:"options",value:function(){var t;return(t=this.processor).options.apply(t,arguments)}},{key:"diff",value:function(t,e){return this.processor.process(new t4(t,e))}},{key:"patch",value:function(t,e){return this.processor.process(new t9(t,e))}},{key:"reverse",value:function(t){return this.processor.process(new t7(t))}},{key:"unpatch",value:function(t,e){return this.patch(t,this.reverse(e))}},{key:"clone",value:function(t){return t6(t)}}]),t}(),eS="function"==typeof Array.isArray?Array.isArray:function(t){return t instanceof Array},eM="function"==typeof Object.keys?function(t){return Object.keys(t)}:function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e},eN=function(t){return"_t"===t?-1:"_"===t.substr(0,1)?parseInt(t.slice(1),10):parseInt(t,10)+.1},eA=function(t,e){return eN(t)-eN(e)},eR=function(){function t(){tY(this,t)}return tZ(t,[{key:"format",value:function(t,e){var n={};return this.prepareContext(n),this.recurse(n,t,e),this.finalize(n)}},{key:"prepareContext",value:function(t){t.buffer=[],t.out=function(){var t;(t=this.buffer).push.apply(t,arguments)}}},{key:"typeFormattterNotFound",value:function(t,e){throw Error("cannot format delta type: "+e)}},{key:"typeFormattterErrorFormatter",value:function(t,e){return e.toString()}},{key:"finalize",value:function(t){var e=t.buffer;if(eS(e))return e.join("")}},{key:"recurse",value:function(t,e,n,r,o,i,l){var s=e&&i?i.value:n;if(void 0!==e||void 0!==r){var a=this.getDeltaType(e,i),c="node"===a?"a"===e._t?"array":"object":"";void 0!==r?this.nodeBegin(t,r,o,a,c,l):this.rootBegin(t,a,c);try{(this["format_"+a]||this.typeFormattterNotFound(t,a)).call(this,t,e,s,r,o,i)}catch(n){this.typeFormattterErrorFormatter(t,n,e,s,r,o,i),"undefined"!=typeof console&&console.error&&console.error(n.stack)}void 0!==r?this.nodeEnd(t,r,o,a,c,l):this.rootEnd(t,a,c)}}},{key:"formatDeltaChildren",value:function(t,e,n){var r=this;this.forEachDeltaKey(e,n,function(o,i,l,s){r.recurse(t,e[o],n?n[i]:void 0,o,i,l,s)})}},{key:"forEachDeltaKey",value:function(t,e,n){var r=eM(t),o="a"===t._t,i={},l=void 0;if(void 0!==e)for(l in e)Object.prototype.hasOwnProperty.call(e,l)&&void 0===t[l]&&(!o||void 0===t["_"+l])&&r.push(l);for(l in t)if(Object.prototype.hasOwnProperty.call(t,l)){var s=t[l];eS(s)&&3===s[2]&&(i[s[1].toString()]={key:l,value:e&&e[parseInt(l.substr(1))]},!1!==this.includeMoveDestinations&&void 0===e&&void 0===t[s[1]]&&r.push(s[1].toString()))}o?r.sort(eA):r.sort();for(var a=0,c=r.length;a<c;a++){var f=r[a];if(!o||"_t"!==f){var u=o?"number"==typeof f?f:parseInt("_"===f.substr(0,1)?f.slice(1):f,10):f,d=a===c-1;n(f,u,i[u],d)}}}},{key:"getDeltaType",value:function(t,e){if(void 0===t)return void 0!==e?"movedestination":"unchanged";if(eS(t)){if(1===t.length)return"added";if(2===t.length)return"modified";if(3===t.length&&0===t[2])return"deleted";if(3===t.length&&2===t[2])return"textdiff";if(3===t.length&&3===t[2])return"moved"}else if((void 0===t?"undefined":tW(t))==="object")return"node";return"unknown"}},{key:"parseTextDiff",value:function(t){for(var e=[],n=t.split("\n@@ "),r=0,o=n.length;r<o;r++){var i=n[r],l={pieces:[]},s=/^(?:@@ )?[-+]?(\d+),(\d+)/.exec(i).slice(1);l.location={line:s[0],chr:s[1]};for(var a=i.split("\n").slice(1),c=0,f=a.length;c<f;c++){var u=a[c];if(u.length){var d={type:"context"};"+"===u.substr(0,1)?d.type="added":"-"===u.substr(0,1)&&(d.type="deleted"),d.text=u.slice(1),l.pieces.push(d)}}e.push(l)}return e}}]),t}();function eP(t){for(var e=t,n=[[/&/g,"&amp;"],[/</g,"&lt;"],[/>/g,"&gt;"],[/'/g,"&apos;"],[/"/g,"&quot;"]],r=0;r<n.length;r++)e=e.replace(n[r][0],n[r][1]);return e}!function(t){function e(){return tY(this,e),t1(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}tX(e,t),tZ(e,[{key:"typeFormattterErrorFormatter",value:function(t,e){t.out('<pre class="jsondiffpatch-error">'+e+"</pre>")}},{key:"formatValue",value:function(t,e){t.out("<pre>"+eP(JSON.stringify(e,null,2))+"</pre>")}},{key:"formatTextDiffString",value:function(t,e){var n=this.parseTextDiff(e);t.out('<ul class="jsondiffpatch-textdiff">');for(var r=0,o=n.length;r<o;r++){var i=n[r];t.out('<li><div class="jsondiffpatch-textdiff-location"><span class="jsondiffpatch-textdiff-line-number">'+i.location.line+'</span><span class="jsondiffpatch-textdiff-char">'+i.location.chr+'</span></div><div class="jsondiffpatch-textdiff-line">');for(var l=i.pieces,s=0,a=l.length;s<a;s++){var c=l[s];t.out('<span class="jsondiffpatch-textdiff-'+c.type+'">'+eP(decodeURI(c.text))+"</span>")}t.out("</div></li>")}t.out("</ul>")}},{key:"rootBegin",value:function(t,e,n){t.out('<div class="jsondiffpatch-delta jsondiffpatch-'+e+(n?" jsondiffpatch-child-node-type-"+n:"")+'">')}},{key:"rootEnd",value:function(t){t.out("</div>"+(t.hasArrows?'<script type="text/javascript">setTimeout('+eT.toString()+",10);</script>":""))}},{key:"nodeBegin",value:function(t,e,n,r,o){t.out('<li class="jsondiffpatch-'+r+(o?" jsondiffpatch-child-node-type-"+o:"")+'" data-key="'+n+'"><div class="jsondiffpatch-property-name">'+n+"</div>")}},{key:"nodeEnd",value:function(t){t.out("</li>")}},{key:"format_unchanged",value:function(t,e,n){void 0!==n&&(t.out('<div class="jsondiffpatch-value">'),this.formatValue(t,n),t.out("</div>"))}},{key:"format_movedestination",value:function(t,e,n){void 0!==n&&(t.out('<div class="jsondiffpatch-value">'),this.formatValue(t,n),t.out("</div>"))}},{key:"format_node",value:function(t,e,n){var r="a"===e._t?"array":"object";t.out('<ul class="jsondiffpatch-node jsondiffpatch-node-type-'+r+'">'),this.formatDeltaChildren(t,e,n),t.out("</ul>")}},{key:"format_added",value:function(t,e){t.out('<div class="jsondiffpatch-value">'),this.formatValue(t,e[0]),t.out("</div>")}},{key:"format_modified",value:function(t,e){t.out('<div class="jsondiffpatch-value jsondiffpatch-left-value">'),this.formatValue(t,e[0]),t.out('</div><div class="jsondiffpatch-value jsondiffpatch-right-value">'),this.formatValue(t,e[1]),t.out("</div>")}},{key:"format_deleted",value:function(t,e){t.out('<div class="jsondiffpatch-value">'),this.formatValue(t,e[0]),t.out("</div>")}},{key:"format_moved",value:function(t,e){t.out('<div class="jsondiffpatch-value">'),this.formatValue(t,e[0]),t.out('</div><div class="jsondiffpatch-moved-destination">'+e[1]+"</div>"),t.out('<div class="jsondiffpatch-arrow" style="position: relative; left: -34px;">\n          <svg width="30" height="60" style="position: absolute; display: none;">\n          <defs>\n              <marker id="markerArrow" markerWidth="8" markerHeight="8"\n                 refx="2" refy="4"\n                     orient="auto" markerUnits="userSpaceOnUse">\n                  <path d="M1,1 L1,7 L7,4 L1,1" style="fill: #339;" />\n              </marker>\n          </defs>\n          <path d="M30,0 Q-10,25 26,50"\n            style="stroke: #88f; stroke-width: 2px; fill: none; stroke-opacity: 0.5; marker-end: url(#markerArrow);"\n          ></path>\n          </svg>\n      </div>'),t.hasArrows=!0}},{key:"format_textdiff",value:function(t,e){t.out('<div class="jsondiffpatch-value">'),this.formatTextDiffString(t,e[0]),t.out("</div>")}}])}(eR);var eT=function(t){var e=function(t){var e=t.textContent,n=t.innerText;return e||n},n=function(t,e){for(var n=t.children,r=0,o=n.length;r<o;r++)e(n[r],r)};!function(t,e,n){for(var r=t.querySelectorAll(e),o=0,i=r.length;o<i;o++)n(r[o])}(t||document,".jsondiffpatch-arrow",function(t){var r=t.parentNode,o=t.children,i=t.style,l=o[0],s=l.children[1];l.style.display="none";var a=e(r.querySelector(".jsondiffpatch-moved-destination")),c=r.parentNode,f=void 0;if(n(c,function(t){t.getAttribute("data-key")===a&&(f=t)}),f)try{var u=f.offsetTop-r.offsetTop;l.setAttribute("height",Math.abs(u)+6),i.top=-8+(u>0?0:u)+"px",s.setAttribute("d",u>0?"M30,0 Q-10,"+Math.round(u/2)+" 26,"+(u-4):"M30,"+-u+" Q-10,"+Math.round(-u/2)+" 26,4"),l.style.display=""}catch(t){}})},ez=function(t){function e(){tY(this,e);var t=t1(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.includeMoveDestinations=!1,t}return tX(e,t),tZ(e,[{key:"prepareContext",value:function(t){tQ(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("&nbsp;&nbsp;")},t.row=function(e,n){t.out('<tr><td style="white-space: nowrap;"><pre class="jsondiffpatch-annotated-indent" style="display: inline-block">'),t.out(t.indentPad),t.out('</pre><pre style="display: inline-block">'),t.out(e),t.out('</pre></td><td class="jsondiffpatch-delta-note"><div>'),t.out(n),t.out("</div></td></tr>")}}},{key:"typeFormattterErrorFormatter",value:function(t,e){t.row("",'<pre class="jsondiffpatch-error">'+e+"</pre>")}},{key:"formatTextDiffString",value:function(t,e){var n=this.parseTextDiff(e);t.out('<ul class="jsondiffpatch-textdiff">');for(var r=0,o=n.length;r<o;r++){var i=n[r];t.out('<li><div class="jsondiffpatch-textdiff-location"><span class="jsondiffpatch-textdiff-line-number">'+i.location.line+'</span><span class="jsondiffpatch-textdiff-char">'+i.location.chr+'</span></div><div class="jsondiffpatch-textdiff-line">');for(var l=i.pieces,s=0,a=l.length;s<a;s++){var c=l[s];t.out('<span class="jsondiffpatch-textdiff-'+c.type+'">'+c.text+"</span>")}t.out("</div></li>")}t.out("</ul>")}},{key:"rootBegin",value:function(t,e,n){t.out('<table class="jsondiffpatch-annotated-delta">'),"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("</table>")}},{key:"nodeBegin",value:function(t,e,n,r,o){t.row("&quot;"+e+"&quot;: {"),"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}(eR),eI=function(t){return'<pre style="display:inline-block">&quot;'+t+"&quot;</pre>"},eB={added:function(t,e,n,r){var o=" <pre>([newValue])</pre>";return void 0===r?"new value"+o:"number"==typeof r?"insert at index "+r+o:"add property "+eI(r)+o},modified:function(t,e,n,r){var o=" <pre>([previousValue, newValue])</pre>";return void 0===r?"modify value"+o:"number"==typeof r?"modify at index "+r+o:"modify property "+eI(r)+o},deleted:function(t,e,n,r){var o=" <pre>([previousValue, 0, 0])</pre>";return void 0===r?"delete value"+o:"number"==typeof r?"remove index "+r+o:"delete property "+eI(r)+o},moved:function(t,e,n,r){return'move from <span title="(position to remove at original state)">index '+r+'</span> to <span title="(position to insert at final state)">index '+t[1]+"</span>"},textdiff:function(t,e,n,r){return"text diff"+(void 0===r?"":"number"==typeof r?" at index "+r:" at property "+eI(r))+', format is <a href="https://code.google.com/p/google-diff-match-patch/wiki/Unidiff">a variation of Unidiff</a>'}},eF=function(t,e){var n=this.getDeltaType(e),r=eB[n],o=r&&r.apply(r,Array.prototype.slice.call(arguments,1
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)};function eL(t){return f.Z&&f.Z[t]||function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return e}}ez.prototype.format_added=eF,ez.prototype.format_modified=eF,ez.prototype.format_deleted=eF,ez.prototype.format_moved=eF,ez.prototype.format_textdiff=eF,!function(t){function e(){tY(this,e);var t=t1(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.includeMoveDestinations=!0,t}tX(e,t),tZ(e,[{key:"prepareContext",value:function(t){tQ(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}}])}(eR);var eV={added:eL("green"),deleted:eL("red"),movedestination:eL("gray"),moved:eL("yellow"),unchanged:eL("gray"),error:eL("white.bgRed"),textDiffLine:eL("gray")};!function(t){function e(){tY(this,e);var t=t1(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.includeMoveDestinations=!1,t}tX(e,t),tZ(e,[{key:"prepareContext",value:function(t){tQ(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("  "),this.outLine()},t.outLine=function(){this.buffer.push("\n"+(this.indentPad||""))},t.out=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];for(var r=0,o=e.length;r<o;r++){var i=e[r].split("\n").join("\n"+(this.indentPad||""));this.color&&this.color[0]&&(i=this.color[0](i)),this.buffer.push(i)}},t.pushColor=function(t){this.color=this.color||[],this.color.unshift(t)},t.popColor=function(){this.color=this.color||[],this.color.shift()}}},{key:"typeFormattterErrorFormatter",value:function(t,e){t.pushColor(eV.error),t.out("[ERROR]"+e),t.popColor()}},{key:"formatValue",value:function(t,e){t.out(JSON.stringify(e,null,2))}},{key:"formatTextDiffString",value:function(t,e){var n=this.parseTextDiff(e);t.indent();for(var r=0,o=n.length;r<o;r++){var i=n[r];t.pushColor(eV.textDiffLine),t.out(i.location.line+","+i.location.chr+" "),t.popColor();for(var l=i.pieces,s=0,a=l.length;s<a;s++){var c=l[s];t.pushColor(eV[c.type]),t.out(c.text),t.popColor()}r<o-1&&t.outLine()}t.indent(-1)}},{key:"rootBegin",value:function(t,e,n){t.pushColor(eV[e]),"node"===e&&(t.out("array"===n?"[":"{"),t.indent())}},{key:"rootEnd",value:function(t,e,n){"node"===e&&(t.indent(-1),t.out("array"===n?"]":"}")),t.popColor()}},{key:"nodeBegin",value:function(t,e,n,r,o){t.pushColor(eV[r]),t.out(n+": "),"node"===r&&(t.out("array"===o?"[":"{"),t.indent())}},{key:"nodeEnd",value:function(t,e,n,r,o,i){"node"===r&&(t.indent(-1),t.out("array"===o?"]":"}"+(i?"":","))),i||t.outLine(),t.popColor()}},{key:"format_unchanged",value:function(t,e,n){void 0!==n&&this.formatValue(t,n)}},{key:"format_movedestination",value:function(t,e,n){void 0!==n&&this.formatValue(t,n)}},{key:"format_node",value:function(t,e,n){this.formatDeltaChildren(t,e,n)}},{key:"format_added",value:function(t,e){this.formatValue(t,e[0])}},{key:"format_modified",value:function(t,e){t.pushColor(eV.deleted),this.formatValue(t,e[0]),t.popColor(),t.out(" => "),t.pushColor(eV.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])}}])}(eR);let eH=new eD({arrays:{detectMove:!1,includeValueOnMove:!1},textDiff:{minLength:1}}),eU=["docChanged","isGeneric","scrolledIntoView","selectionSet","storedMarksSet"];function eJ(t){return{type:t.type,empty:t.empty,anchor:t.anchor,head:t.head,from:t.from,to:t.to}}function eG(t){return("00"+t).slice(-2)}let eK=t=>{let e=new Date(t);return[eG(e.getHours()),eG(e.getMinutes()),eG(e.getSeconds()),("000"+e.getMilliseconds()).slice(-3)].join(":")},eW=/(&lt;\/?[\w\d\s="']+&gt;)/gim,eY=t=>t.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(eW,"<span style='color: cadetblue;'>$&</span>"),eZ=tC(new Map),eQ=tC([]),eX=tC(void 0),e1=tC(0);function e0(){eZ.set(new Map),eQ.set([]),eX.set(void 0)}let e2=["jsonID","empty","anchor","from","head","to"],e3=["$anchor","$head","$cursor","$to","$from"],e5=["nodeAfter","nodeBefore","textOffset"];function e6(t){return e2.reduce((e,n)=>(e[n]=t[n],e),{})}function e4(t){return e2.concat(e3).reduce((e,n)=>{let r=t[n];if(r&&e3.includes(n)){let t={};
1e5.forEach(e=>{t[e]=r[e]}),r=Object.assign(Object.assign({},r),t)}return e[n]=r,e},{})}function e9(t,e,n,r,o){let i=o?[...o.path,t]:[];return{id:"[".concat(i.join(","),"]"),index:t,key:e,value:n,depth:r,collapsed:!0,type:e7(n),path:i,parentId:o?o.id:null,circularOfId:null,children:[]}}function e7(t){return Array.isArray(t)?"array":t instanceof Map?"map":t instanceof Set?"set":t instanceof Date?"date":null===t?"null":typeof t}function e8(t,e,n,r,o,i,l,s,a,c,f){var u;if((null===(u=f.omitKeys)||void 0===u?void 0:u.includes(e))||f.maxDepth&&r>f.maxDepth)return null;let d=e9(t,e,n,r,i),p=s.get(d.id);if(o?d.collapsed=!1:p&&!c?d.collapsed=p.collapsed:f.shouldExpandNode&&(d.collapsed=!f.shouldExpandNode(d)),l.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){let e=n.get(t.value);if(e&&t.id!==e.id)return t.circularOfId=e.id,!1;n.set(t.value,t)}}}return!0}(d,i,a,f)){let t=f.mapChildren&&f.mapChildren(n,e7(n),d),e=null!=t?t:function(t,e){switch(e){case"array":return t.map((t,e)=>[e.toString(),t]);case"map":return Array.from(t.entries()).map((t,e)=>{let[n,r]=t;return["[map entry ".concat(e,"]"),{"[key]":n,"[value]":r}]});case"set":return Array.from(t.values()).map((t,e)=>["[set entry ".concat(e,"]"),t]);case"object":return Object.entries(t);default:return[]}}(n,e7(n));d.children=e.map((t,e)=>{let[n,o]=t;return e8(e,n,o,r+1,!1,d,l,s,a,c,f)}).filter(t=>null!==t)}return d}let nt=t=>{let e=tC(t),n=function(t,e,n){let r=!Array.isArray(t),o=r?[t]:t;if(!o.every(Boolean))throw Error("derived() expects stores as input, got a falsy value");let i=e.length<2;return{subscribe:tC(void 0,(t,n)=>{let l=!1,s=[],a=0,c=u,f=()=>{if(a)return;c();let o=e(r?s[0]:s,t,n);i?t(o):c=g(o)?o:u},d=o.map((t,e)=>y(t,t=>{s[e]=t,a&=~(1<<e),l&&f()},()=>{a|=1<<e}));return l=!0,f(),function(){v(d),c(),l=!1}}).subscribe}}(e,t=>t.recursionOpts);return{props:e,recursionOpts:n,setProps(t){e.set(t)},formatValue(t,n){let{valueFormatter:r}=b(e),o=r?r(t,n):void 0;if(o)return o;switch(n.type){case"array":return"".concat(n.circularOfId?"circular":""," [] ").concat(t.length," items");case"object":return"".concat(n.circularOfId?"circular":""," {} ").concat(Object.keys(t).length," keys");case"map":case"set":return"".concat(n.circularOfId?"circular":""," () ").concat(t.size," entries");case"date":return"".concat(t.toISOString());case"string":return'"'.concat(t,'"');case"boolean":return t?"true":"false";case"symbol":return String(t);default:return t}}}},ne=()=>{let t=tC(null);return{set:t.set,subscribe:t.subscribe}},nn=t=>{let e=e9(0,"root",[],0,null),n=tC(e),r=tC(new Map),o=tC(new Map);return{tree:n,treeMap:r,defaultRootNode:e,init(t,i,l){t?n.set(t):n.set(e),r.set(i),o.set(l)},getNode:t=>b(r).get(t),toggleCollapse(e){let n=b(r).get(e);if(!n){console.warn("Attempted to collapse non-existent node: ".concat(e));return}let o=Object.assign(Object.assign({},n),{collapsed:!n.collapsed});r.update(t=>new Map(t.set(n.id,o)));let i=b(t.recursionOpts);i&&this.expandNodeChildren(o,i)},expandNodeChildren(t,e){let n=this.getNode((null==t?void 0:t.parentId)||"")||null;if(!n)throw Error("No parent in expandNodeChildren for node: "+t);let i=new Map(b(r)),l=b(r),s=b(o),a=e8(t.index,t.key,t.value,t.depth,!t.collapsed,n,i,l,s,!1,e);a&&(n.children=n.children.map(t=>t.id===a.id?a:t),i.set(a.id,a),i.set(n.id,n),r.set(i),o.set(s))},expandAllNodesToNode(t){let e=new Map(b(r));!function t(e,n){n&&(e.set(n.id,Object.assign(Object.assign({},n),{collapsed:!1})),n.parentId&&t(e,e.get(n.parentId)))}(e,e.get(t)),r.set(e)}}};function nr(t){q(t,"svelte-ngcjq5","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)}
1.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)}")}function no(t,e,n){let r=t.slice();return r[14]=e[n],r}function ni(t){let e,n,r,o,i;return{c(){e=N("button"),n=R("▶"),I(e,"class",r=O("arrow-btn ".concat(t[0].collapsed?"collapsed":""))+" svelte-ngcjq5")},m(r,l){D(r,e,l),E(e,n),o||(i=z(e,"click",t[9]),o=!0)},p(t,n){1&n&&r!==(r=O("arrow-btn ".concat(t[0].collapsed?"collapsed":""))+" svelte-ngcjq5")&&I(e,"class",r)},d(t){t&&S(e),o=!1,i()}}}function nl(t){let e,n=t[5].formatValue(t[0].value,t[0])+"";return{c(){e=R(n)},m(t,n){D(t,e,n)},p(t,r){1&r&&n!==(n=t[5].formatValue(t[0].value,t[0])+"")&&F(e,n)},i:u,o:u,d(t){t&&S(e)}}}function ns(t){let e,n,r;var o=t[3];function i(t,e){return{props:{value:t[0].value,node:t[0],defaultFormatter:t[10]}}}return o&&(e=new o(i(t))),{c(){e&&th(e.$$.fragment),n=T()},m(t,o){e&&tv(e,t,o),D(t,n,o),r=!0},p(t,r){if(8&r&&o!==(o=t[3])){if(e){ts();let t=e;tf(t.$$.fragment,1,0,()=>{tg(t,1)}),ta()}o?(th((e=new o(i(t))).$$.fragment),tc(e.$$.fragment,1),tv(e,n.parentNode,n)):e=null}else if(o){let n={};1&r&&(n.value=t[0].value),1&r&&(n.node=t[0]),e.$set(n)}},i(t){r||(e&&tc(e.$$.fragment,t),r=!0)},o(t){e&&tf(e.$$.fragment,t),r=!1},d(t){t&&S(n),e&&tg(e,t)}}}function na(t){let e,n,r;return{c(){(e=N("button")).textContent="log",I(e,"class","log-copy-button svelte-ngcjq5")},m(o,i){D(o,e,i),n||(r=z(e,"click",t[7]),n=!0)},p:u,d(t){t&&S(e),n=!1,r()}}}function nc(t){let e,n,r;return{c(){(e=N("button")).textContent="copy",I(e,"class","log-copy-button svelte-ngcjq5")},m(o,i){D(o,e,i),n||(r=z(e,"click",t[8]),n=!0)},p:u,d(t){t&&S(e),n=!1,r()}}}function nf(t){let e,n,r;let o=tu(t[0].children),i=[];for(let e=0;e<o.length;e+=1)i[e]=nu(no(t,o,e));let l=t=>tf(i[t],1,1,()=>{i[t]=null});return{c(){e=N("li"),n=N("ul");for(let t=0;t<i.length;t+=1)i[t].c();I(n,"class","svelte-ngcjq5"),I(e,"class","row svelte-ngcjq5")}
1,m(t,o){D(t,e,o),E(e,n);for(let t=0;t<i.length;t+=1)i[t]&&i[t].m(n,null);r=!0},p(t,e){if(1&e){let r;for(r=0,o=tu(t[0].children);r<o.length;r+=1){let l=no(t,o,r);i[r]?(i[r].p(l,e),tc(i[r],1)):(i[r]=nu(l),i[r].c(),tc(i[r],1),i[r].m(n,null))}for(ts(),r=o.length;r<i.length;r+=1)l(r);ta()}},i(t){if(!r){for(let t=0;t<o.length;t+=1)tc(i[t]);r=!0}},o(t){i=i.filter(Boolean);for(let t=0;t<i.length;t+=1)tf(i[t]);r=!1},d(t){t&&S(e),M(i,t)}}}function nu(t){let e,n;return e=new nh({props:{id:t[14].id}}),{c(){th(e.$$.fragment)},m(t,r){tv(e,t,r),n=!0},p(t,n){let r={};1&n&&(r.id=t[14].id),e.$set(r)},i(t){n||(tc(e.$$.fragment,t),n=!0)},o(t){tf(e.$$.fragment,t),n=!1},d(t){tg(e,t)}}}function nd(t){let e,n,r,o,i,l,s,a,c,f,u,d,p,h,g,m,y,b,$;let x=t[0].key+"",w=t[2]&&ni(t),k=[ns,nl],_=[];c=_[a=t[3]?0:1]=k[a](t);let j=t[1].showLogButton&&na(t),C=t[1].showCopyButton&&nc(t),O=!t[0].collapsed&&t[2]&&nf(t);return{c(){e=N("li"),w&&w.c(),n=P(),r=N("div"),o=R(x),i=R(":"),l=P(),s=N("div"),c.c(),u=P(),d=N("div"),j&&j.c(),p=P(),C&&C.c(),g=P(),O&&O.c(),m=T(),I(r,"class","node-key svelte-ngcjq5"),I(r,"role","presentation"),V(r,"has-children",t[2]),V(r,"p-left",!t[2]),I(s,"class","node-value svelte-ngcjq5"),I(s,"data-type",f=t[0].type),I(s,"role","presentation"),V(s,"expanded",!t[0].collapsed&&t[2]),V(s,"has-children",t[2]),I(d,"class","buttons svelte-ngcjq5"),I(e,"class","row svelte-ngcjq5"),I(e,"data-tree-id",h=t[0].id),V(e,"collapsed",t[0].collapsed&&t[2])},m(c,f){D(c,e,f),w&&w.m(e,null),E(e,n),E(e,r),E(r,o),E(r,i),E(e,l),E(e,s),_[a].m(s,null),E(e,u),E(e,d),j&&j.m(d,null),E(d,p),C&&C.m(d,null),D(c,g,f),O&&O.m(c,f),D(c,m,f),y=!0,b||($=[z(r,"click",t[9]),z(s,"click",t[9])],b=!0)},p(t,i){let[l]=i;t[2]?w?w.p(t,l):((w=ni(t)).c(),w.m(e,n)):w&&(w.d(1),w=null),(!y||1&l)&&x!==(x=t[0].key+"")&&F(o,x),(!y||4&l)&&V(r,"has-children",t[2]),(!y||4&l)&&V(r,"p-left",!t[2]);let u=a;(a=t[3]?0:1)===u?_[a].p(t,l):(ts(),tf(_[u],1,1,()=>{_[u]=null}),ta(),(c=_[a])?c.p(t,l):(c=_[a]=k[a](t)).c(),tc(c,1),c.m(s,null)),(!y||1&l&&f!==(f=t[0].type))&&I(s,"data-type",f),(!y||5&l)&&V(s,"expanded",!t[0].collapsed&&t[2]),(!y||4&l)&&V(s,"has-children",t[2]),t[1].showLogButton?j?j.p(t,l):((j=na(t)).c(),j.m(d,p)):j&&(j.d(1),j=null),t[1].showCopyButton?C?C.p(t,l):((C=nc(t)).c(),C.m(d,null)):C&&(C.d(1),C=null),(!y||1&l&&h!==(h=t[0].id))&&I(e,"data-tree-id",h),(!y||5&l)&&V(e,"collapsed",t[0].collapsed&&t[2]),!t[0].collapsed&&t[2]?O?(O.p(t,l),5&l&&tc(O,1)):((O=nf(t)).c(),tc(O,1),O.m(m.parentNode,m)):O&&(ts(),tf(O,1,1,()=>{O=null}),ta())},i(t){y||(tc(c),tc(O),y=!0)},o(t){tf(c),tf(O),y=!1},d(t){t&&(S(e),S(g),S(m)),w&&w.d(),_[a].d(),j&&j.d(),C&&C.d(),O&&O.d(t),b=!1,v($)}}}function np(t,e,n){let r,o,i,l,s;let a,c=u;t.$$.on_destroy.push(()=>c());let{id:f}=e,{treeStore:d,propsStore:p,rootElementStore:h}=K("svelte-tree-view");return $(t,h,t=>n(12,l=t)),d.treeMap.subscribe(t=>{let e=t.get(f);e&&s!==e&&n(0,s=e)}),t.$$set=t=>{"id"in t&&n(11,f=t.id)},t.$$.update=()=>
1{if(2048&t.$$.dirty){let t=d.getNode(f);if(!t)throw Error("[svelte-tree-view] TreeViewNode.svelte received undefined node from treeMapStore whereas it should be already unmounted!");n(0,s=t)}1&t.$$.dirty&&n(2,r=s&&s.children.length>0),2&t.$$.dirty&&n(3,i=a.valueComponent)},n(4,o=p.props),c(),c=y(o,t=>n(1,a=t)),[s,a,r,i,o,p,h,function(){console.info("%c [svelte-tree-view]: Property added to window._node","color: #b8e248"),console.log(s.value);try{"undefined"!=typeof window&&(window._node=s.value)}catch(t){console.error("Failed to set _node, window was undefined")}},function(){try{navigator.clipboard.writeText(JSON.stringify(s.value))}catch(t){console.error("Copying node to clipboard failed: ",t)}},function(){var t;r?d.toggleCollapse(s.id):s.circularOfId&&(d.expandAllNodesToNode(s.circularOfId),null===(t=null==l?void 0:l.querySelector('li[data-tree-id="'.concat(s.circularOfId,'"]')))||void 0===t||t.scrollIntoView())},function(t){return p.formatValue(t,s)},f]}class nh extends ty{constructor(t){super(),tm(this,t,np,nd,m,{id:11},nr)}}function nv(t){q(t,"svelte-167awo5",":root{--tree-view-font-family:'Helvetica Neue', 'Calibri Light', Roboto, sans-serif;--tree-view-font-size:13px;--tree-view-left-indent:0.875em;--tree-view-line-height:1.1;--tree-view-key-margin-right:0.5em}ul.svelte-167awo5{background:var(--tree-view-base00);font-family:var(--tree-view-font-family);font-size:var(--tree-view-font-size);height:max-content;list-style:none;margin:0;padding:0;width:max-content}")}function ng(t,e,n){let r=t.slice();return r[18]=e[n],r}function nm(t){let e,n;return e=new nh({props:{id:t[18].id}}),{c(){th(e.$$.fragment)},m(t,r){tv(e,t,r),n=!0},p(t,n){let r={};4&n&&(r.id=t[18].id),e.$set(r)},i(t){n||(tc(e.$$.fragment,t),n=!0)},o(t){tf(e.$$.fragment,t),n=!1},d(t){tg(e,t)}}}function ny(t){let e,n,r;let o=tu(t[2].children),i=[];for(let e=0;e<o.length;e+=1)i[e]=nm(ng(t,o,e));let l=t=>tf(i[t],1,1,()=>{i[t]=null});return{c(){e=N("ul");for(let t=0;t<i.length;t+=1)i[t].c();I(e,"class",n=O("".concat(t[3].class||""," svelte-tree-view"))+" svelte-167awo5")},m(n,o){D(n,e,o);for(let t=0;t<i.length;t+=1)i[t]&&i[t].m(e,null);t[13](e),r=!0},p(t,s){let[a]=s;if(4&a){let n;for(n=0,o=tu(t[2].children);n<o.length;n+=1){let r=ng(t,o,n);i[n]?(i[n].p(r,a),tc(i[n],1)):(i[n]=nm(r),i[n].c(),tc(i[n],1),i[n].m(e,null))}for(ts(),n=o.length;n<i.length;n+=1)l(n);ta()}(!r||8&a&&n!==(n=O("".concat(t[3].class||""," svelte-tree-view"))+" svelte-167awo5"))&&I(e,"class",n)},i(t){if(!r){for(let t=0;t<o.length;t+=1)tc(i[t]);r=!0}}
1,o(t){i=i.filter(Boolean);for(let t=0;t<i.length;t+=1)tf(i[t]);r=!1},d(n){n&&S(e),M(i,n),t[13](null)}}}function nb(t,e,n){var r;let o;let i,l=u;t.$$.on_destroy.push(()=>l());let{data:s,theme:a,showLogButton:c=!1,showCopyButton:f=!1,valueComponent:p,recursionOpts:h={},valueFormatter:v}=e,g=null,m={maxDepth:16,omitKeys:[],stopCircularRecursion:!1,shouldExpandNode:()=>!1},$={showLogButton:c,showCopyButton:f,valueComponent:p,recursionOpts:{...m,...h},valueFormatter:v},x=nt($),w=ne(),k=nn(x);return G("svelte-tree-view",{propsStore:x,rootElementStore:w,treeStore:k}),U(()=>{w.set(g)}),t.$$set=t=>{n(3,e=d(d({},e),C(t))),"data"in t&&n(4,s=t.data),"theme"in t&&n(5,a=t.theme),"showLogButton"in t&&n(6,c=t.showLogButton),"showCopyButton"in t&&n(7,f=t.showCopyButton),"valueComponent"in t&&n(8,p=t.valueComponent),"recursionOpts"in t&&n(9,h=t.recursionOpts),"valueFormatter"in t&&n(10,v=t.valueFormatter)},t.$$.update=()=>{if(5568&t.$$.dirty&&n(12,$={showLogButton:c,showCopyButton:f,valueComponent:p,valueFormatter:v,recursionOpts:$.recursionOpts}),6672&t.$$.dirty){let t={...m,...h},e=(null===n(11,r=null==$?void 0:$.recursionOpts)||void 0===r?void 0:r.shouldExpandNode)!==t.shouldExpandNode,o=b(k.treeMap),{treeMap:i,tree:l,iteratedValues:a}=function(t,e,n,r){let o=new Map,i=new Map,l=e8(-1,"root",t,0,!0,null,o,e,i,r,n);return{treeMap:o,tree:l,iteratedValues:i}}(s,o,t,e);k.init(l,i,a),n(12,$.recursionOpts=t,$),x.setProps($)}if(33&t.$$.dirty&&a&&g){let t;for(t in a){let e=a[t];g&&t.includes("base")&&e&&g.style.setProperty("--tree-view-".concat(t),e)}}},n(1,o=k.tree),l(),l=y(o,t=>n(2,i=t)),e=C(e),[g,o,i,e,s,a,c,f,p,h,v,r,$,function(t){Z[t?"unshift":"push"](()=>{n(0,g=t)})}]}class n$ extends ty{constructor(t){super(),tm(this,t,nb,ny,m,{data:4,theme:5,showLogButton:6,showCopyButton:7,valueComponent:8,recursionOpts:9,valueFormatter:10},nv)}}function nx(t){q(t,"svelte-fdudio",".split-view.svelte-fdudio{border-top:1px solid rgba(255, 162, 177, 0.2);color:#fff;display:flex;height:calc(100% - var(--height-tabs-menu));width:100%}.split-view h2{color:rgb(187, 145, 163);font-family:var(--font-sans);font-size:var(--font-medium);font-weight:400;letter-spacing:1px;margin:0;text-transform:uppercase}.split-view > .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}")}let nw=t=>({}),nk=t=>({class:"right-panel"}),n_=t=>({}),nj=t=>({class:"left-panel"});function nC(t){let e,n,r;let o=t[1].left,i=x(o,t,t[0],nj),l=t[1].right,s=x(l,t,t[0],nk);return{c(){e=N("section"),i&&i.c(),n=P(),s&&s.c(),I(e,"class","split-view svelte-fdudio")},m(t,o){D(t,e,o),i&&i.m(e,null),E(e,n),s&&s.m(e,null),r=!0},p(t,e){let[n]=e;i&&i.p&&(!r||1&n)&&_(i,o,t,t[0],r?k(o,t[0],n,n_):j(t[0]),nj),s&&s.p&&(!r||1&n)&&_(s,l,t,t[0],r?k(l,t[0],n,nw):j(t[0]),nk)},i(t){r||(tc(i,t),tc(s,t),r=!0)},o(t){tf(i,t),tf(s,t),r=!1},d(t){t&&S(e),i&&i.d(t),s&&s.d(t)}}}function nO(t,e,n){let{$$slots:r={},$$scope:o}=e;return t.$$set=t=>{"$$scope"in t&&n(0,o=t.$$scope)},[o,r]}class nE extends ty{constructor(t){super(),tm(this,t,nO,nC,m,{},nx)}}function nq(t){q(t,"svelte-it3v6s","button.svelte-it3v6s{background:transparent;border:0;border-radius:2px;color:#d3d3d9;cursor:pointer;font-family:var(--font-family);font-size:var(--font-small);font-weight:400;padding:6px 10px;text-transform:uppercase}button.svelte-it3v6s:hover{background:rgba(255, 162, 177, 0.4);color:#fff}button.selected.svelte-it3v6s{background:rgba(255, 162, 177, 0.4)}")}function nD(t){let e,n,r,o,i;let l=t[3].default,s=x(l,t,t[2],null);return{c(){e=N("button"),s&&s.c(),I(e,"class",n=O("".concat(t[1].class||""))+" svelte-it3v6s"),V(e,"selected",t[0])},m(n,l){D(n,e,l),s&&s.m(e,null),r=!0,o||(i=[z(e,"click",t[4]),z(e,"mouseover",t[5]),z(e,"mouseenter",t[6]),z(e,"mouseleave",t[7]),z(e,"focus",t[8])],o=!0)},p(t,o){let[i]=o;s&&s.p&&(!r||4&i)&&_(s,l,t,t[2],r?k(l,t[2],i,null):j(t[2]),null),(!r||2&i&&n!==(n=O("".concat(t[1].class||""))+" svelte-it3v6s"))&&I(e,"class",n),(!r||3&i)&&V(e,"selected",t[0])},i(t){r||(tc(s,t),r=!0)},o(t){tf(s,t),r=!1},d(t){t&&S(e),s&&s.d(t),o=!1,v(i)}}}function nS(t,e,n){let{$$slots:r={},$$scope:o}=e,{selected:i=!1}=e;return t.$$set=t=>{n(1,e=d(d({},e),C(t))),"selected"in t&&n(0,i=t.selected),"$$scope"in t&&n(2,o=t.$$scope)},e=C(e),[i,e,o,r,function(e){W.call(this,t,e)},function(e){W.call(this,t,e)},function(e){W.call(this,t,e)},function(e){W.call(this,t,e)},function(e){W.call(this,t,e)}]}class nM extends ty{constructor(t){super(),tm(this,t,nS,nD,m,{selected:0},nq)}}function nN(t){q(t,"svelte-8c7oqn",'@charset "UTF-8";.top-row.svelte-8c7oqn{align-items:center;display:flex;justify-content:space-between}.left-panel[slot=left].svelte-8c7oqn{overflow:scroll}.right-panel[slot=right].svelte-8c7oqn{border-left:1px solid rgba(255, 162, 177, 0.2);flex-grow:0;
1min-width:200px;width:200px}.split-view .selection-btn{height:24px;width:35px}.caret-icon.svelte-8c7oqn::before{content:"▶"}.caret-icon.expanded.svelte-8c7oqn::before{content:"▼"}.no-marks.svelte-8c7oqn{color:#85d9ef;margin:0.5em 0 1.25em 1em}.split-view .tree-view{margin:0.5em 0 1.25em 0}')}function nA(t){let e;return{c(){e=R("log")},m(t,n){D(t,e,n)},d(t){t&&S(e)}}}function nR(t){let e,n,r,o,i,l,s,a;return(i=new nM({props:{$$slots:{default:[nA]},$$scope:{ctx:t}}})).$on("click",t[6]),s=new n$({props:{class:"tree-view",data:t[0],showLogButton:!0,showCopyButton:!0,valueFormatter:nF}}),{c(){e=N("div"),n=N("div"),(r=N("h2")).textContent="Current doc",o=P(),th(i.$$.fragment),l=P(),th(s.$$.fragment),I(n,"class","top-row svelte-8c7oqn"),I(e,"slot","left"),I(e,"class","left-panel svelte-8c7oqn")},m(t,c){D(t,e,c),E(e,n),E(n,r),E(n,o),tv(i,n,null),E(e,l),tv(s,e,null),a=!0},p(t,e){let n={};1024&e&&(n.$$scope={dirty:e,ctx:t}),i.$set(n);let r={};1&e&&(r.data=t[0]),s.$set(r)},i(t){a||(tc(i.$$.fragment,t),tc(s.$$.fragment,t),a=!0)},o(t){tf(i.$$.fragment,t),tf(s.$$.fragment,t),a=!1},d(t){t&&S(e),tg(i),tg(s)}}}function nP(t){let e;return{c(){I(e=N("span"),"class","caret-icon svelte-8c7oqn"),V(e,"expanded",t[5])},m(t,n){D(t,e,n)},p(t,n){32&n&&V(e,"expanded",t[5])},d(t){t&&S(e)}}}function nT(t){let e,n;return e=new n$({props:{class:"tree-view",data:t[2]}}),{c(){th(e.$$.fragment)},m(t,r){tv(e,t,r),n=!0},p(t,n){let r={};4&n&&(r.data=t[2]),e.$set(r)},i(t){n||(tc(e.$$.fragment,t),n=!0)},o(t){tf(e.$$.fragment,t),n=!1},d(t){tg(e,t)}}}function nz(t){let e;return{c(){(e=N("div")).textContent="No active marks",I(e,"class","no-marks svelte-8c7oqn")},m(t,n){D(t,e,n)},p:u,i:u,o:u,d(t){t&&S(e)}}}function nI(t){let e,n,r,o,i,l,s,a,c,f,u,d,p,h,v,g,m,y,b;(i=new nM({props:{class:"selection-btn",$$slots:{default:[nP]},$$scope:{ctx:t}}})).$on("click",t[7]),s=new n$({props:{class:"tree-view",data:t[1]}});let $=[nz,nT],x=[];function w(t,e){return 0===t[2].length?0:1}return p=x[d=w(t)]=$[d](t),y=new n$({props:{class:"tree-view",data:{nodeSize:t[3],childCount:t[4]}}}),{c(){e=N("div"),n=N("div"),(r=N("h2")).textContent="Selection",o=P(),th(i.$$.fragment),l=P(),th(s.$$.fragment),a=P(),c=N("div"),(f=N("h2")).textContent="Active marks",u=P(),p.c(),h=P(),v=N("div"),(g=N("h2")).textContent="Document stats",m=P(),th(y.$$.fragment),I(n,"class","top-row svelte-8c7oqn"),I(e,"slot","right"),I(e,"class","right-panel svelte-8c7oqn")},m(t,p){D(t,e,p),E(e,n),E(n,r),E(n,o),tv(i,n,null),E(e,l),tv(s,e,null),E(e,a),E(e,c),E(c,f),E(c,u),x[d].m(c,null),E(e,h),E(e,v),E(v,g),E(v,m),tv(y,v,null),b=!0},p(t,e){let n={};1056&e&&(n.$$scope={dirty:e,ctx:t}),i.$set(n);let r={};2&e&&(r.data=t[1]),s.$set(r);let o=d;(d=w(t))===o?x[d].p(t,e):(ts(),tf(x[o],1,1,()=>{x[o]=null}),ta(),(p=x[d])?p.p(t,e):(p=x[d]=$[d](t)).c(),tc(p,1),p.m(c,null));let l={};24&e&&(l.data={nodeSize:t[3],childCount:t[4]}),y.$set(l)},i(t){b||(tc(i.$$.fragment,t),tc(s.$$.fragment,t),tc(p),tc(y.$$.fragment,t),b=!0)},o(t){tf(i.$$.fragment,t),tf(s.$$.fragment,t),tf(p),tf(y.$$.fragment,t),b=!1},d(t){t&&S(e),tg(i),tg(s),x[d].d(),tg(y)}}}function nB(t){let e,n;return e=new nE({props:{$$slots:{right:[nI],left:[nR]},$$scope:{ctx:t}}}),{c(){th(e.$$.fragment)},m(t,r){tv(e,t,r),n=!0},p(t,n){let[r]=n,o={};1087&r&&(o.$$scope={dirty:r,ctx:t}),e.$set(o)},i(t){n||(tc(e.$$.fragment,t),n=!0)},o(t){tf(e.$$.fragment,t),n=!1},d(t){tg(e,t)}}}function nF(t,e){if("object"===e.type&&t.type)return"{} ".concat(t.type)}function nL(t,e,n){let{view:r}=t$("editor-view"),o=r.state.doc.toJSON(),i=e6(r.state.selection),l=r.state,s=[],a=r.state.doc.nodeSize,c=r.state.doc.childCount,f=!1;return eX.subscribe(t=>{if(!t)return;let{state:e}=t;l=e,n(0,o=e.doc.toJSON()),n(1,i=f?e4(e.selection):e6(e.selection)),n(2,s=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,a=e.doc.nodeSize),n(4,c=e.doc.childCount)}),[o,i,s,a,c,f,function(){console.log(o),window._doc=o},function(){n(5,f=!f),f?n(1,i=e4(l.selection)):n(1,i=e6(l.selection))}]}class nV extends ty{constructor(t){super(),tm(this,t,nL,nB,m,{},nN)}}function nH(t,e,n){if("array"===e)return[]}function nU(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 nJ(t){q(t,"svelte-vbjxb8",'@charset "UTF-8";ul.svelte-vbjxb8.svelte-vbjxb8{color:#fff;list-style:none;margin:0;padding:0;height:100%;width:100%}li.svelte-vbjxb8.svelte-vbjxb8{transition:background 0.7s ease}li.svelte-vbjxb8.svelte-vbjxb8:hover{background:rgba(255, 162, 177, 0.4);color:#fff}li.selected.svelte-vbjxb8.svelte-vbjxb8{background:rgba(255, 162, 177, 0.4)}li.svelte-vbjxb8+li.svelte-vbjxb8{border-top:1px solid rgb(96, 76, 104)}button.svelte-vbjxb8.svelte-vbjxb8{background:transparent;border:0;color:#d3d3d9;cursor:pointer;display:flex;font-family:monospace;font-size:var(--font-medium);justify-content:space-between;padding:6px 18px;text-transform:uppercase;width:100%}button.p-left.svelte-vbjxb8.svelte-vbjxb8{margin-left:1em}.caret-icon.svelte-vbjxb8.svelte-vbjxb8::before{content:"▶"}
1.caret-icon.expanded.svelte-vbjxb8.svelte-vbjxb8::before{content:"▼"}')}function nG(t,e,n){let r=t.slice();return r[6]=e[n],r[8]=n,r}function nK(t,e,n){let r=t.slice();return r[9]=e[n],r}function nW(t){let e,n,r;let o=t[6].entries.length+"";return{c(){e=R("["),n=R(o),r=R("]")},m(t,o){D(t,e,o),D(t,n,o),D(t,r,o)},p(t,e){1&e&&o!==(o=t[6].entries.length+"")&&F(n,o)},d(t){t&&(S(e),S(n),S(r))}}}function nY(t){let e,n;let r=t[6].topEntry.trs.length-1+"";return{c(){e=R("+"),n=R(r)},m(t,r){D(t,e,r),D(t,n,r)},p(t,e){1&e&&r!==(r=t[6].topEntry.trs.length-1+"")&&F(n,r)},d(t){t&&(S(e),S(n))}}}function nZ(t){let e;return{c(){I(e=N("span"),"class","caret-icon svelte-vbjxb8"),V(e,"expanded",t[6].expanded)},m(t,n){D(t,e,n)},p(t,n){1&n&&V(e,"expanded",t[6].expanded)},d(t){t&&S(e)}}}function nQ(t){let e,n=[],r=new Map,o=tu(t[6].entries),i=t=>{var e;return null===(e=t[9])||void 0===e?void 0:e.id};for(let e=0;e<o.length;e+=1){let l=nK(t,o,e),s=i(l);r.set(s,n[e]=nX(s,l))}return{c(){for(let t=0;t<n.length;t+=1)n[t].c();e=T()},m(t,r){for(let e=0;e<n.length;e+=1)n[e]&&n[e].m(t,r);D(t,e,r)},p(t,l){7&l&&(o=tu(t[6].entries),n=tp(n,l,i,1,t,o,r,e.parentNode,td,nX,e,nK))},d(t){t&&S(e);for(let e=0;e<n.length;e+=1)n[e].d(t)}}}function nX(t,e){var n;let r,o,i,l,s,a;let c=(null===(n=e[9])||void 0===n?void 0:n.timeStr)+"";function f(){return e[5](e[9],e[8])}return{key:t,first:null,c(){var t;r=N("li"),o=N("button"),i=R(c),l=P(),I(o,"class","p-left svelte-vbjxb8"),I(r,"class","svelte-vbjxb8"),V(r,"selected",e[1]===(null===(t=e[9])||void 0===t?void 0:t.id)),this.first=r},m(t,e){D(t,r,e),E(r,o),E(o,i),E(r,l),s||(a=z(o,"click",f),s=!0)},p(t,n){var o,l;e=t,1&n&&c!==(c=(null===(o=e[9])||void 0===o?void 0:o.timeStr)+"")&&F(i,c),3&n&&V(r,"selected",e[1]===(null===(l=e[9])||void 0===l?void 0:l.id))},d(t){t&&S(r),s=!1,a()}}}function n1(t,e){var n;let r,o,i,l,s,a,c,f,u,d,p;let h=(null===(n=e[6])||void 0===n||null===(n=n.topEntry)||void 0===n?void 0:n.timeStr)+"",g=e[6].isGroup&&nW(e),m=e[6].topEntry&&e[6].topEntry.trs.length>1&&nY(e),y=e[6].isGroup&&e[6].entries.length>1&&nZ(e);function b(){return e[3](e[6],e[8])}function $(){return e[4](e[6])}let x=e[6].isGroup&&e[6].expanded&&nQ(e);return{key:t,first:null,c(){var t;r=N("li"),o=N("button"),i=N("span"),l=R(h),s=P(),g&&g.c(),a=P(),m&&m.c(),c=P(),y&&y.c(),f=P(),x&&x.c(),u=T(),I(o,"class","svelte-vbjxb8"),V(o,"is-group",e[6].isGroup),I(r,"class","svelte-vbjxb8"),V(r,"selected",!e[6].expanded&&e[1]===(null===(t=e[6])||void 0===t||null===(t=t.topEntry)||void 0===t?void 0:t.id)),this.first=r},m(t,e){D(t,r,e),E(r,o),E(o,i),E(i,l),E(i,s),g&&g.m(i,null),E(i,a),m&&m.m(i,null),E(o,c),y&&y.m(o,null),D(t,f,e),x&&x.m(t,e),D(t,u,e),d||(p=[z(o,"click",b),z(o,"dblclick",$)],d=!0)},p(t,n){var s,c;e=t,1&n&&h!==(h=(null===(s=e[6])||void 0===s||null===(s=s.topEntry)||void 0===s?void 0:s.timeStr)+"")&&F(l,h),e[6].isGroup?g?g.p(e,n):((g=nW(e)).c(),g.m(i,a)):g&&(g.d(1),g=null),e[6].topEntry&&e[6].topEntry.trs.length>1?m?m.p(e,n):((m=nY(e)).c(),m.m(i,null)):m&&(m.d(1),m=null),e[6].isGroup&&e[6].entries.length>1?y?y.p(e,n):((y=nZ(e)).c(),y.m(o,null)):y&&(y.d(1),y=null),1&n&&V(o,"is-group",e[6].isGroup),3&n&&V(r,"selected",!e[6].expanded&&e[1]===(null===(c=e[6])||void 0===c||null===(c=c.topEntry)||void 0===c?void 0:c.id)),e[6].isGroup&&e[6].expanded?x?x.p(e,n):((x=nQ(e)).c(),x.m(u.parentNode,u)):x&&(x.d(1),x=null)},d(t){t&&(S(r),S(f),S(u)),g&&g.d(),m&&m.d(),y&&y.d(),x&&x.d(t),d=!1,v(p)}}}function n0(t){let e;let n=[],r=new Map,o=tu(t[0]),i=t=>t[6].id;for(let e=0;e<o.length;e+=1){let l=nG(t,o,e),s=i(l);r.set(s,n[e]=n1(s,l))}return{c(){e=N("ul");for(let t=0;t<n.length;t+=1)n[t].c();I(e,"class","svelte-vbjxb8")},m(t,r){D(t,e,r);for(let t=0;t<n.length;t+=1)n[t]&&n[t].m(e,null)},p(t,l){let[s]=l;7&s&&(o=tu(t[0]),n=tp(n,s,i,1,t,o,r,e,td,n1,null,nG))},i:u,o:u,d(t){t&&S(e);for(let t=0;t<n.length;t+=1)n[t].d()}}}function n2(t,e,n){let{listItems:r=[],selectedId:o}=e,i=J();return t.$$set=t=>{"listItems"in t&&n(0,r=t.listItems),"selectedId"in t&&n(1,o=t.selectedId)},[r,o,i,(t,e)=>{var n;return i("click-item",{id:null==t||null===(n=t.topEntry)||void 0===n?void 0:n.id,groupIdx:e,wasTopNode:!0})},t=>{var e;return i("dblclick-item",{id:null==t||null===(e=t.topEntry)||void 0===e?void 0:e.id})},(t,e)=>i("click-item",{id:null==t?void 0:t.id,groupIdx:e,wasTopNode:!1})]}class n3 extends ty{constructor(t){super(),tm(this,t,n2,n0,m,{listItems:0,selectedId:1},nJ)}}function n5(t){q(t,"svelte-1a1oqej",".added.svelte-1a1oqej.svelte-1a1oqej{display:inline-block;background:#87cc86;border-radius:1px;color:green;padding:1px 2px;text-indent:0;min-height:1ex}.deleted.svelte-1a1oqej.svelte-1a1oqej{display:inline-block;background:#d66363;border-radius:1px;color:#222;padding:1px 2px;text-decoration:line-through;text-indent:0;min-height:1ex}.updated.svelte-1a1oqej.svelte-1a1oqej{word-break:break-all}.updated.svelte-1a1oqej .added.svelte-1a1oqej{background:#eaea37}.arrow.svelte-1a1oqej.svelte-1a1oqej{color:#87cc86}")}function n6(t,e,n){let r=t.slice();return r[3]=e[n],r}function n4(t){let e,n=t[0](t[1])+"";return{c(){e=R(n)},m(t,n){D(t,e,n)},p(t,r){3&r&&n!==(n=t[0](t[1])+"")&&F(e,n)},d(t){t&&S(e)}}}function n9(t){let e;function n(t,e){return 1===t[1].length?re:2===t[1].length?rt:3===t[1].length&&0===t[1][1]&&0===t[1][2]?n8:3===t[1].length&&2===t[1][2]?n7:void 0}let r=n(t),o=r&&r(t);return{c(){o&&o.c(),e=T()},m(t,n){o&&o.m(t,n),D(t,e,n)},p(t,i){r===(r=n(t))&&o?o.p(t,i):(o&&o.d(1),(o=r&&r(t))&&(o.c(),o.m(e.parentNode,e)))},d(t){t&&S(e),o&&o.d(t)}}}function n7(t){let e;let n=tu(rs(t[1][0])),r=[];for(let e=0;e<n.length;e+=1)r[e]=ri(n6(t,n,e));return{c(){e=N("span");for(let t=0;t<r.length;t+=1)r[t].c();I(e,"class","updated svelte-1a1oqej")},m(t,n){D(t,e,n);for(let t=0;t<r.length;t+=1)r[t]&&r[t].m(e,null)},p(t,o){if(2&o){let i;for(i=0,n=tu(rs(t[1][0]));i<n.length;i+=1){let l=n6(t,n,i);r[i]?r[i].p(l,o):(r[i]=ri(l),r[i].c(),r[i].m(e,null))}for(;i<r.length;i+=1)r[i].d(1);r.length=n.length}},d(t){t&&S(e),M(r,t)}}}function n8(t){let e,n;let r=ra(t[1][0])+"";return{c(){e=N("span"),n=R(r),I(e,"class","deleted svelte-1a1oqej")},m(t,r){D(t,e,r),E(e,n)},p(t,e){2&e&&r!==(r=ra(t[1][0])+"")&&F(n,r)},d(t){t&&S(e)}}}function rt(t){let e,n,r,o,i,l,s,a;let c=ra(t[1][0])+"",f=ra(t[1][1])+"";
1return{c(){e=N("span"),n=N("span"),r=R(c),o=P(),(i=N("span")).textContent="=>",l=P(),s=N("span"),a=R(f),I(n,"class","deleted svelte-1a1oqej"),I(i,"class","arrow svelte-1a1oqej"),I(s,"class","added svelte-1a1oqej"),I(e,"class","updated svelte-1a1oqej")},m(t,c){D(t,e,c),E(e,n),E(n,r),E(e,o),E(e,i),E(e,l),E(e,s),E(s,a)},p(t,e){2&e&&c!==(c=ra(t[1][0])+"")&&F(r,c),2&e&&f!==(f=ra(t[1][1])+"")&&F(a,f)},d(t){t&&S(e)}}}function re(t){let e,n;let r=ra(t[1][0])+"";return{c(){e=N("span"),n=R(r),I(e,"class","added svelte-1a1oqej")},m(t,r){D(t,e,r),E(e,n)},p(t,e){2&e&&r!==(r=ra(t[1][0])+"")&&F(n,r)},d(t){t&&S(e)}}}function rn(t){let e,n;let r=t[3].raw+"";return{c(){e=N("span"),n=R(r)},m(t,r){D(t,e,r),E(e,n)},p(t,e){2&e&&r!==(r=t[3].raw+"")&&F(n,r)},d(t){t&&S(e)}}}function rr(t){let e,n;let r=t[3].add+"";return{c(){e=N("span"),n=R(r),I(e,"class","added svelte-1a1oqej")},m(t,r){D(t,e,r),E(e,n)},p(t,e){2&e&&r!==(r=t[3].add+"")&&F(n,r)},d(t){t&&S(e)}}}function ro(t){let e,n;let r=t[3].delete+"";return{c(){e=N("span"),n=R(r),I(e,"class","deleted svelte-1a1oqej")},m(t,r){D(t,e,r),E(e,n)},p(t,e){2&e&&r!==(r=t[3].delete+"")&&F(n,r)},d(t){t&&S(e)}}}function ri(t){let e;function n(t,e){return t[3].delete?ro:t[3].add?rr:rn}let r=n(t),o=r(t);return{c(){o.c(),e=T()},m(t,n){o.m(t,n),D(t,e,n)},p(t,i){r===(r=n(t))&&o?o.p(t,i):(o.d(1),(o=r(t))&&(o.c(),o.m(e.parentNode,e)))},d(t){t&&S(e),o.d(t)}}}function rl(t){let e,n;function r(t,n){return(2&n&&(e=null),null==e&&(e=!!Array.isArray(t[1])),e)?n9:n4}let o=r(t,-1),i=o(t);return{c(){i.c(),n=T()},m(t,e){i.m(t,e),D(t,n,e)},p(t,e){let[l]=e;o===(o=r(t,l))&&i?i.p(t,l):(i.d(1),(i=o(t))&&(i.c(),i.m(n.parentNode,n)))},i:u,o:u,d(t){t&&S(n),i.d(t)}}}function rs(t){return t.split(/\n/gm).slice(1).map(t=>({[t.startsWith("-")?"delete":t.startsWith("+")?"add":"raw"]:t.slice(1).replace(/\s/gm,"\xa0")}))}function ra(t){return"string"==typeof t?t:function(t){if(null===t)return"null";let e=JSON.stringify(t);return void 0===e?"undefined":e.length>22?"".concat(e.slice(0,15),"…").concat(e.slice(-5)):e}(t)}function rc(t,e,n){let r;let{node:o,defaultFormatter:i}=e;return t.$$set=t=>{"node"in t&&n(2,o=t.node),"defaultFormatter"in t&&n(0,i=t.defaultFormatter)},t.$$.update=()=>{4&t.$$.dirty&&n(1,r=o.value)},[i,r,o]}class rf extends ty{constructor(t){super(),tm(this,t,rc,rl,m,{node:2,defaultFormatter:0},n5)}}function ru(t){q(t,"svelte-r7zw98",".left-panel.svelte-r7zw98.svelte-r7zw98{flex-grow:0;padding:0;min-width:190px;width:190px}.title-container.svelte-r7zw98.svelte-r7zw98{align-items:center;display:flex}.transaction-buttons.svelte-r7zw98.svelte-r7zw98{margin-left:2rem}.entry-row.svelte-r7zw98+.entry-row.svelte-r7zw98{margin-top:1em}.selection-html.svelte-r7zw98.svelte-r7zw98{font-weight:100;margin:0.5em 0 0 0;padding:0}.equal-diff.svelte-r7zw98.svelte-r7zw98{align-items:center;color:rgb(255, 162, 177);display:flex;font-size:14px;height:100%;justify-content:center;width:100%}")}function rd(t,e,n){let r=t.slice();return r[13]=e[n],r}function rp(t){var e;let n,r,o;return(r=new n3({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(){n=N("div"),th(r.$$.fragment),I(n,"slot","left"),I(n,"class","left-panel svelte-r7zw98")},m(t,e){D(t,n,e),tv(r,n,null),o=!0},p(t,e){var n;let 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(t){o||(tc(r.$$.fragment,t),o=!0)},o(t){tf(r.$$.fragment,t),o=!1},d(t){t&&S(n),tg(r)}}}function rh(t){let e;return{c(){(e=N("div")).textContent="Docs are equal.",I(e,"class","equal-diff svelte-r7zw98")},m(t,n){D(t,e,n)},p:u,i:u,o:u,d(t){t&&S(e)}}}function rv(t){let e,n,r,o,i,l,s,a,c,f,u,d,p;let h=t[0].contentDiff&&rg(t),v=t[0].selectionDiff&&ry(t),g=t[0].selectionHtml.length>0&&r$(t),m=t[1]&&rw(t);(u=new nM({props:{$$slots:{default:[rj]},$$scope:{ctx:t}}})).$on("click",t[5]);let y=t[1]&&rC(t);return{c(){e=N("div"),h&&h.c(),n=P(),v&&v.c(),r=P(),g&&g.c(),o=P(),i=N("div"),l=N("div"),(s=N("h2")).textContent="Transactions",a=P(),c=N("div"),m&&m.c(),f=P(),th(u.$$.fragment),d=P(),y&&y.c(),I(c,"class","transaction-buttons svelte-r7zw98"),I(l,"class","title-container svelte-r7zw98"),I(i,"class","entry-row svelte-r7zw98")},m(t,b){D(t,e,b),h&&h.m(e,null),E(e,n),v&&v.m(e,null),E(e,r),g&&g.m
1(e,null),E(e,o),E(e,i),E(i,l),E(l,s),E(l,a),E(l,c),m&&m.m(c,null),E(c,f),tv(u,c,null),E(i,d),y&&y.m(i,null),p=!0},p(t,l){t[0].contentDiff?h?(h.p(t,l),1&l&&tc(h,1)):((h=rg(t)).c(),tc(h,1),h.m(e,n)):h&&(ts(),tf(h,1,1,()=>{h=null}),ta()),t[0].selectionDiff?v?(v.p(t,l),1&l&&tc(v,1)):((v=ry(t)).c(),tc(v,1),v.m(e,r)):v&&(ts(),tf(v,1,1,()=>{v=null}),ta()),t[0].selectionHtml.length>0?g?(g.p(t,l),1&l&&tc(g,1)):((g=r$(t)).c(),tc(g,1),g.m(e,o)):g&&(ts(),tf(g,1,1,()=>{g=null}),ta()),t[1]?m?(m.p(t,l),2&l&&tc(m,1)):((m=rw(t)).c(),tc(m,1),m.m(c,f)):m&&(ts(),tf(m,1,1,()=>{m=null}),ta());let s={};65538&l&&(s.$$scope={dirty:l,ctx:t}),u.$set(s),t[1]?y?(y.p(t,l),2&l&&tc(y,1)):((y=rC(t)).c(),tc(y,1),y.m(i,null)):y&&(ts(),tf(y,1,1,()=>{y=null}),ta())},i(t){p||(tc(h),tc(v),tc(g),tc(m),tc(u.$$.fragment,t),tc(y),p=!0)},o(t){tf(h),tf(v),tf(g),tf(m),tf(u.$$.fragment,t),tf(y),p=!1},d(t){t&&S(e),h&&h.d(),v&&v.d(),g&&g.d(),m&&m.d(),tg(u),y&&y.d()}}}function rg(t){let e,n,r,o,i,l,s,a;return i=new nM({props:{class:"hidden",$$slots:{default:[rm]},$$scope:{ctx:t}}}),s=new n$({props:{class:"tree-view",data:t[0].contentDiff,showLogButton:!0,showCopyButton:!0,valueComponent:rf,recursionOpts:{maxDepth:12,mapChildren:nU,shouldExpandNode:rD}}}),{c(){e=N("div"),n=N("div"),(r=N("h2")).textContent="Doc diff",o=P(),th(i.$$.fragment),l=P(),th(s.$$.fragment),I(n,"class","title-container svelte-r7zw98"),I(e,"class","entry-row svelte-r7zw98")},m(t,c){D(t,e,c),E(e,n),E(n,r),E(n,o),tv(i,n,null),E(e,l),tv(s,e,null),a=!0},p(t,e){let n={};65536&e&&(n.$$scope={dirty:e,ctx:t}),i.$set(n);let r={};1&e&&(r.data=t[0].contentDiff),s.$set(r)},i(t){a||(tc(i.$$.fragment,t),tc(s.$$.fragment,t),a=!0)},o(t){tf(i.$$.fragment,t),tf(s.$$.fragment,t),a=!1},d(t){t&&S(e),tg(i),tg(s)}}}function rm(t){let e;return{c(){e=R("log")},m(t,n){D(t,e,n)},d(t){t&&S(e)}}}function ry(t){let e,n,r,o,i,l,s,a;return i=new nM({props:{class:"hidden",$$slots:{default:[rb]},$$scope:{ctx:t}}}),s=new n$({props:{class:"tree-view",data:t[0].selectionDiff,valueComponent:rf,recursionOpts:{mapChildren:nH,shouldExpandNode:rS}}}),{c(){e=N("div"),n=N("div"),(r=N("h2")).textContent="Selection diff",o=P(),th(i.$$.fragment),l=P(),th(s.$$.fragment),I(n,"class","title-container svelte-r7zw98"),I(e,"class","entry-row svelte-r7zw98")},m(t,c){D(t,e,c),E(e,n),E(n,r),E(n,o),tv(i,n,null),E(e,l),tv(s,e,null),a=!0},p(t,e){let n={};65536&e&&(n.$$scope={dirty:e,ctx:t}),i.$set(n);let r={};1&e&&(r.data=t[0].selectionDiff),s.$set(r)},i(t){a||(tc(i.$$.fragment,t),tc(s.$$.fragment,t),a=!0)},o(t){tf(i.$$.fragment,t),tf(s.$$.fragment,t),a=!1},d(t){t&&S(e),tg(i),tg(s)}}}function rb(t){let e;return{c(){e=R("log")},m(t,n){D(t,e,n)},d(t){t&&S(e)}}}function r$(t){let e,n,r,o,i,l,s,a,c;let f=t[0].selectionHtml+"";return i=new nM({props:{class:"hidden",$$slots:{default:[rx]},$$scope:{ctx:t}}}),{c(){e=N("div"),n=N("div"),(r=N("h2")).textContent="Selection content",o=P(),th(i.$$.fragment),l=P(),s=N("pre"),a=N("code"),I(n,"class","title-container svelte-r7zw98"),I(s,"class","selection-html svelte-r7zw98"),I(e,"class","entry-row svelte-r7zw98")},m(t,u){D(t,e,u),E(e,n),E(n,r),E(n,o),tv(i,n,null),E(e,l),E(e,s),E(s,a),a.innerHTML=f,c=!0},p(t,e){let n={};65536&e&&(n.$$scope={dirty:e,ctx:t}),i.$set(n),(!c||1&e)&&f!==(f=t[0].selectionHtml+"")&&(a.innerHTML=f)},i(t){c||(tc(i.$$.fragment,t),c=!0)},o(t){tf(i.$$.fragment,t),c=!1},d(t){t&&S(e),tg(i)}}}function rx(t){let e;return{c(){e=R("log")},m(t,n){D(t,e,n)},d(t){t&&S(e)}}}function rw(t){let e,n,r,o;return(e=new nM({props:{$$slots:{default:[rk]},$$scope:{ctx:t}}})).$on("click",t[9]),(r=new nM({props:{$$slots:{default:[r_]},$$scope:{ctx:t}}})).$on("click",t[6]),{c(){th(e.$$.fragment),n=P(),th(r.$$.fragment)},m(t,i){tv(e,t,i),D(t,n,i),tv(r,t,i),o=!0},p(t,n){let o={};65540&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o);let i={};65536&n&&(i.$$scope={dirty:n,ctx:t}),r.$set(i)},i(t){o||(tc(e.$$.fragment,t),tc(r.$$.fragment,t),o=!0)},o(t){tf(e.$$.fragment,t),tf(r.$$.fragment,t),o=!1},d(t){t&&S(n),tg(e,t),tg(r,t)}}}function rk(t){let e,n=t[2]?"collapse":"expand";return{c(){e=R(n)},m(t,n){D(t,e,n)},p(t,r){4&r&&n!==(n=t[2]?"collapse":"expand")&&F(e,n)},d(t){t&&S(e)}}}function r_(t){let e;return{c(){e=R("log")},m(t,n){D(t,e,n)},d(t){t&&S(e)}}}function rj(t){let e,n=t[1]?"hide":"show";return{c(){e=R(n)},m(t,n){D(t,e,n)},p(t,r){2&r&&n!==(n=t[1]?"hide":"show")&&F(e,n)},d(t){t&&S(e)}}}function rC(t){let e,n;let r=tu(t[0].trs),o=[];for(let e=0;e<r.length;e+=1)o[e]=rO(rd(t,r,e));let i=t=>tf(o[t],1,1,()=>{o[t]=null});return{c(){for(let t=0;t<o.length;t+=1)o[t].c();e=T()},m(t,r){for(let e=0;e<o.length;e+=1)o[e]&&o[e].m(t,r);D(t,e,r),n=!0},p(t,n){if(9&n){let l;for(l=0,r=tu(t[0].trs);l<r.length;l+=1){let i=rd(t,r,l);o[l]?(o[l].p(i,n),tc(o[l],1)):(o[l]=rO(i),o[l].c(),tc(o[l],1),o[l].m(e.parentNode,e))}for(ts(),l=r.length;l<o.length;l+=1)i(l);ta()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)tc(o[t]);n=!0}}
1,o(t){o=o.filter(Boolean);for(let t=0;t<o.length;t+=1)tf(o[t]);n=!1},d(t){t&&S(e),M(o,t)}}}function rO(t){let e,n;return e=new n$({props:{class:"tree-view",data:t[13],showLogButton:!0,showCopyButton:!0,recursionOpts:t[3]}}),{c(){th(e.$$.fragment)},m(t,r){tv(e,t,r),n=!0},p(t,n){let r={};1&n&&(r.data=t[13]),8&n&&(r.recursionOpts=t[3]),e.$set(r)},i(t){n||(tc(e.$$.fragment,t),n=!0)},o(t){tf(e.$$.fragment,t),n=!1},d(t){tg(e,t)}}}function rE(t){let e,n,r,o;let i=[rv,rh],l=[];return r=l[n=t[0]?0:1]=i[n](t),{c(){e=N("div"),r.c(),I(e,"slot","right"),I(e,"class","right-panel")},m(t,r){D(t,e,r),l[n].m(e,null),o=!0},p(t,o){let s=n;(n=t[0]?0:1)===s?l[n].p(t,o):(ts(),tf(l[s],1,1,()=>{l[s]=null}),ta(),(r=l[n])?r.p(t,o):(r=l[n]=i[n](t)).c(),tc(r,1),r.m(e,null))},i(t){o||(tc(r),o=!0)},o(t){tf(r),o=!1},d(t){t&&S(e),l[n].d()}}}function rq(t){let e,n;return e=new nE({props:{$$slots:{right:[rE],left:[rp]},$$scope:{ctx:t}}}),{c(){th(e.$$.fragment)},m(t,r){tv(e,t,r),n=!0},p(t,n){let[r]=n,o={};65567&r&&(o.$$scope={dirty:r,ctx:t}),e.$set(o)},i(t){n||(tc(e.$$.fragment,t),n=!0)},o(t){tf(e.$$.fragment,t),n=!1},d(t){tg(e,t)}}}let rD=()=>!0,rS=()=>!0;function rM(t,e,n){let r,o,i;$(t,eZ,t=>n(10,o=t)),$(t,eQ,t=>n(11,i=t));let l,s=!1,{replaceEditorContent:a}=t$("editor-view"),c=!1,f={maxDepth:24,stopCircularRecursion:!0,omitKeys:["schema"],shouldExpandNode:()=>c};return eX.subscribe(t=>{t&&n(0,l=t)}),t.$$.update=()=>{3072&t.$$.dirty&&n(4,r=i.map(t=>({id:t.id,isGroup:t.isGroup,topEntry:o.get(t.topEntryId),entries:t.entryIds.map(t=>o.get(t)),expanded:t.expanded})))},[l,s,c,f,r,function(){n(1,s=!s)},function(){console.info("%c [prosemirror-dev-toolkit]: Property added to window._trs","color: #b8e248"),console.log(null==l?void 0:l.trs),window._trs=null==l?void 0:l.trs},function(t){let{id:e="",groupIdx:i,wasTopNode:s}=t.detail;if(n(0,l=o.get(e)),!l)return;let a=r[i];a.isGroup&&a.entries.length>1&&s&&eQ.update(t=>t.map((t,e)=>e!==i?t:Object.assign(Object.assign({},t),{expanded:!t.expanded})))},function(t){n(0,l=o.get(t.detail.id||"")),l&&a(l.state)},function(){n(2,c=!c),n(3,f=Object.assign(Object.assign({},f),{shouldExpandNode:()=>c}))},o,i]}class rN extends ty{constructor(t){super(),tm(this,t,rM,rq,m,{},ru)}}function rA(t){q(t,"svelte-1fq2hhi","ul.svelte-1fq2hhi.svelte-1fq2hhi{color:#fff;list-style:none;margin:0;padding:0;height:100%;width:100%}li.svelte-1fq2hhi+li.svelte-1fq2hhi{border-top:1px solid rgb(96, 76, 104)}button.svelte-1fq2hhi.svelte-1fq2hhi{background:transparent;border:0;color:#d3d3d9;cursor:pointer;display:flex;font-family:monospace;font-size:var(--font-medium);font-weight:100;padding:6px 18px;text-transform:uppercase;width:100%}button.svelte-1fq2hhi.svelte-1fq2hhi:hover{background:rgba(255, 162, 177, 0.4);color:#fff}button:hover.empty.svelte-1fq2hhi.svelte-1fq2hhi{background:rgb(80, 68, 93)}button.selected.svelte-1fq2hhi.svelte-1fq2hhi{background:rgba(255, 162, 177, 0.4)}button.selected.empty.svelte-1fq2hhi.svelte-1fq2hhi{background:rgb(80, 68, 93)}button.empty.svelte-1fq2hhi.svelte-1fq2hhi{color:#727288}")}function rR(t,e,n){let r=t.slice();return r[4]=e[n],r}function rP(t){let e,n,r,o,i,l;let s=t[4].value+"";function a(){return t[3](t[4])}return{c(){e=N("li"),n=N("button"),r=R(s),o=P(),I(n,"class","svelte-1fq2hhi"),V(n,"selected",t[1]===t[4].key),V(n,"empty",t[4].empty),I(e,"class","svelte-1fq2hhi")},m(t,s){D(t,e,s),E(e,n),E(n,r),E(e,o),i||(l=z(n,"click",a),i=!0)},p(e,o){t=e,1&o&&s!==(s=t[4].value+"")&&F(r,s),3&o&&V(n,"selected",t[1]===t[4].key),1&o&&V(n,"empty",t[4].empty)},d(t){t&&S(e),i=!1,l()}}}function rT(t){let e;let n=tu(t[0]),r=[];for(let e=0;e<n.length;e+=1)r[e]=rP(rR(t,n,e));return{c(){e=N("ul");for(let t=0;t<r.length;t+=1)r[t].c();I(e,"class","svelte-1fq2hhi")},m(t,n){D(t,e,n);for(let t=0;t<r.length;t+=1)r[t]&&r[t].m(e,null)},p(t,o){let[i]=o;if(7&i){let o;for(o=0,n=tu(t[0]);o<n.length;o+=1){let l=rR(t,n,o);r[o]?r[o].p(l,i):(r[o]=rP(l),r[o].c(),r[o].m(e,null))}for(;o<r.length;o+=1)r[o].d(1);r.length=n.length}},i:u,o:u,d(t){t&&S(e),M(r,t)}}}function rz(t,e,n){let{listItems:r=[],selectedKey:o,onSelect:i}=e;return t.$$set=t=>{"listItems"in t&&n(0,r=t.listItems),"selectedKey"in t&&n(1,o=t.selectedKey),"onSelect"in t&&n(2,i=t.onSelect)},[r,o,i,t=>i(t)]}class rI extends ty{constructor(t){super(),tm(this,t,rz,rT,m,{listItems:0,selectedKey:1,onSelect:2},rA)}}function rB(t){q(t,"svelte-9l897d",".top-row.svelte-9l897d{align-items:center;display:flex;justify-content:space-between;margin-bottom:0.5em}.left-panel[slot=left].svelte-9l897d{flex-grow:0;overflow:scroll;padding:0;min-width:190px;width:190px}.right-panel[slot=right].svelte-9l897d{border-left:1px solid rgba(255, 162, 177, 0.2)}.empty-state.svelte-9l897d{align-items:center;color:rgb(255, 162, 177);display:flex;font-size:14px;height:100%;justify-content:center;width:100%}")}function rF(t){var e;let n,r,o;return r=new rI({props:{listItems:t[4],selectedKey:null===(e=t[0])||void 0===e?void 0:e.key,onSelect:t[5]}}),{c(){n=N("div"),th(r.$$.fragment),I(n,"slot","left"),I(n,"class","left-panel svelte-9l897d")},m(t,e){D(t,n,e),tv(r,n,null),o=!0},p(t,e){var n;let o={};16&e&&(o.listItems=t[4]),1&e&&(o.selectedKey=null===(n=t[0])||void 0===n?void 0:n.key),r.$set(o)},i(t){o||(tc(r.$$.fragment,t),o=!0)},o(t){tf(r.$$.fragment,t),o=!1},d(t){t&&S(n),tg(r)}}}function rL(t){let e,n,r,o,i,l,s,a;return(i=new nM({props:{$$slots:{default:[rV]},$$scope:{ctx:t}}})).$on("click",t[6]),(s=new nM({props:{$$slots:{default:[rH]},$$scope:{ctx:t}}})).$on("click",t[7]),{c(){e=N("div"),(n=N("h2")).textContent="Plugin state",r=P(),o=N("div"),th(i.$$.fragment),l=P(),th(s.$$.fragment),I(e,"class","top-row svelte-9l897d")},m(t,c){D(t,e,c),E(e,n),E(e,r),E(e,o),tv(i,o,null),E(o,l),tv(s,o,null),a=!0},p(t,e){let n={};2050&e&&(n.$$scope={dirty:e,ctx:t}),i.$set(n);let r={};2048&e&&(r.$$scope={dirty:e,ctx:t}),s.$set(r)},i(t){a||(tc(i.$$.fragment,t),tc(s.$$.fragment,t),a=!0)},o(t){tf(i.$$.fragment,t),tf(s.$$.fragment,t),a=!1},d(t){t&&S(e),tg(i),tg(s)}}}function rV(t){let e,n=t[1]?"collapse":"expand";return{c(){e=R(n)},m(t,n){D(t,e,n)},p(t,r){2&r&&n!==(n=t[1]?"collapse":"expand")&&F(e,n)},d(t){t&&S(e)}}}function rH(t){let e;return{c(){e=R("log")},m(t,n){D(t,e,n)},d(t){t&&S(e)}}}function rU(t){let e;return{c(){(e=N("div")).textContent="Plugin has no state",I(e,"class","empty-state svelte-9l897d")},m(t,n){D(t,e,n)},p:u,i:u,o:u,d(t){t&&S(e)}}}function rJ(t){let e,n;return e=new n$({props:{data:t[3],showLogButton:!0,showCopyButton:!0,recursionOpts:t[2]}}),{c(){th(e.$$.fragment)},m(t,r){tv(e,t,r),n=!0},p(t,n){let r={};8&n&&(r.data=t[3]),4&n&&(r.recursionOpts=t[2]),e.$set(r)},i(t){n||(tc(e.$$.fragment,t),n=!0)},o(t){tf(e.$$.fragment,t),n=!1},d(t){tg(e,t)}}}function rG(t){let e,n,r,o,i;let l=t[3]&&rL(t),s=[rJ,rU],a=[];return o=a[r=t[3]?0:1]=s[r](t),{c(){e=N("div"),l&&l.c(),n=P(),o.c(),I(e,"slot","right"),I(e,"class","right-panel svelte-9l897d")},m(t,o){D(t,e,o),l&&l.m(e,null),E(e,n),a[r].m(e,null),i=!0},p(t,i){t[3]?l?(l.p(t,i),8&i&&tc(l,1)):((l=rL(t)).c(),tc(l,1),l.m(e,n)):l&&(ts(),tf(l,1,1,()=>{l=null}),ta());let c=r;(r=t[3]?0:1)===c?a[r].p(t,i):(ts(),tf(a[c],1,1,()=>{a[c]=null}),ta(),(o=a[r])?o.p(t,i):(o=a[r]=s[r](t)).c(),tc(o,1),o.m(e,null))},i(t){i||(tc(l),tc(o),i=!0)},o(t){tf(l),tf(o),i=!1},d(t){t&&S(e),l&&l.d(),a[r].d()}}}function rK(t){let e,n;return e=new nE({props:{$$slots:{right:[rG],left:[rF]},$$scope:{ctx:t}}}),{c(){th(e.$$.fragment)},m(t,r){tv(e,t,r),n=!0},p(t,n){let[r]=n,o={};2079&r&&(o.$$scope={dirty:r,ctx:t}),e.$set(o)},i(t){n||(tc(e.$$.fragment,t),n=!0)},o(t){tf(e.$$.fragment,t),n=!1},d(t){tg(e,t)}}}function rW(t,e,n){let r,o;let{view:i}=t$("editor-view"),l=!1,s={maxDepth:10,stopCircularRecursion:!0,shouldExpandNode:()=>l},a=i.state,c=a.plugins,f=c[0];return eX.subscribe(t=>{t&&(n(8,a=t.state),n(9,c=a.plugins),n(0,f=c.find(t=>t.key===(null==f?void 0:f.key))))}),t.$$.update=()=>{257&t.$$.dirty&&n(3,r=(null==f?void 0:f.getState)?f.getState(a):void 0),768&t.$$.dirty&&n(4,o=c.map(t=>({key:t.key,value:t.key.toUpperCase(),empty:!(t.getState&&t.getState(a))}
1)))},[f,l,s,r,o,function(t){n(0,f=c.find(e=>e.key===t.key))},function(){n(1,l=!l),n(2,s=Object.assign(Object.assign({},s),{shouldExpandNode:()=>l}))},function(){window._plugin=[f,r],console.info("%c [prosemirror-dev-toolkit]: Property added to window._plugin","color: #b8e248"),console.log(f),console.log(r)},a,c]}class rY extends ty{constructor(t){super(),tm(this,t,rW,rK,m,{},rB)}}function rZ(t){q(t,"svelte-1u2reu1",".top-row.svelte-1u2reu1{align-items:center;display:flex;justify-content:space-between}.left-panel[slot=left].svelte-1u2reu1{overflow:scroll;padding:1em}.right-panel[slot=right].svelte-1u2reu1{border-left:1px solid rgba(255, 162, 177, 0.2);overflow:scroll;padding:1em}")}function rQ(t){let e;return{c(){e=R("log")},m(t,n){D(t,e,n)},d(t){t&&S(e)}}}function rX(t){let e,n,r,o,i,l,s,a;return i=new nM({props:{class:"hidden",$$slots:{default:[rQ]},$$scope:{ctx:t}}}),s=new n$({props:{class:"tree-view",data:t[0],showLogButton:!0,showCopyButton:!0,recursionOpts:{stopCircularRecursion:!0}}}),{c(){e=N("div"),n=N("div"),(r=N("h2")).textContent="Nodes",o=P(),th(i.$$.fragment),l=P(),th(s.$$.fragment),I(n,"class","top-row svelte-1u2reu1"),I(e,"slot","left"),I(e,"class","left-panel svelte-1u2reu1")},m(t,c){D(t,e,c),E(e,n),E(n,r),E(n,o),tv(i,n,null),E(e,l),tv(s,e,null),a=!0},p(t,e){let n={};8&e&&(n.$$scope={dirty:e,ctx:t}),i.$set(n)},i(t){a||(tc(i.$$.fragment,t),tc(s.$$.fragment,t),a=!0)},o(t){tf(i.$$.fragment,t),tf(s.$$.fragment,t),a=!1},d(t){t&&S(e),tg(i),tg(s)}}}function r1(t){let e;return{c(){e=R("log")},m(t,n){D(t,e,n)},d(t){t&&S(e)}}}function r0(t){let e,n,r,o,i,l,s,a;return i=new nM({props:{class:"hidden",$$slots:{default:[r1]},$$scope:{ctx:t}}}),s=new n$({props:{class:"tree-view",data:t[1],showLogButton:!0,showCopyButton:!0,recursionOpts:{stopCircularRecursion:!0}}}),{c(){e=N("div"),n=N("div"),(r=N("h2")).textContent="Marks",o=P(),th(i.$$.fragment),l=P(),th(s.$$.fragment),I(n,"class","top-row svelte-1u2reu1"),I(e,"slot","right"),I(e,"class","right-panel svelte-1u2reu1")},m(t,c){D(t,e,c),E(e,n),E(n,r),E(n,o),tv(i,n,null),E(e,l),tv(s,e,null),a=!0},p(t,e){let n={};8&e&&(n.$$scope={dirty:e,ctx:t}),i.$set(n)},i(t){a||(tc(i.$$.fragment,t),tc(s.$$.fragment,t),a=!0)},o(t){tf(i.$$.fragment,t),tf(s.$$.fragment,t),a=!1},d(t){t&&S(e),tg(i),tg(s)}}}function r2(t){let e,n;return e=new nE({props:{$$slots:{right:[r0],left:[rX]},$$scope:{ctx:t}}}),{c(){th(e.$$.fragment)},m(t,r){tv(e,t,r),n=!0},p(t,n){let[r]=n,o={};8&r&&(o.$$scope={dirty:r,ctx:t}),e.$set(o)},i(t){n||(tc(e.$$.fragment,t),n=!0)},o(t){tf(e.$$.fragment,t),n=!1},d(t){tg(e,t)}}}function r3(t){let{view:e}=t$("editor-view");return[e.state.schema.nodes,e.state.schema.marks]}class r5 extends ty{constructor(t){super(),tm(this,t,r3,r2,m,{},rZ)}}function r6(t){q(t,"svelte-1un819s",".doc-node.svelte-1un819s{border-left:1px solid #363755;border-right:1px solid #363755;display:flex;flex-direction:column;padding:0 12px}.doc-node.root.svelte-1un819s{border:0;padding:0}.doc-node-body.svelte-1un819s{background:#363755;color:#222;display:flex;font-size:13px;margin-top:3px}.number-box.svelte-1un819s{padding:3px 6px;background:rgba(255, 255, 255, 0.3)}.node-name.svelte-1un819s{width:100%}button.svelte-1un819s{align-items:center;background:transparent;border:0;color:#222;cursor:pointer;display:flex;height:100%;white-space:pre;width:100%}button.svelte-1un819s:hover{background:rgba(255, 162, 177, 0.4);color:#fff}button.selected.svelte-1un819s{background:rgba(255, 162, 177, 0.4)}ul.svelte-1un819s{list-style:none;margin:0;padding:0}ul.show-borders.svelte-1un819s{border-left:1px solid rgb(96, 76, 104);border-right:1px solid rgb(96, 76, 104)}.inline-children.svelte-1un819s{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-1un819s>.doc-node{flex-grow:1;padding:0}")}function r4(t,e,n){let r=t.slice();return r[15]=e[n],r[17]=n,r}function r9(t){let e,n;return e=new ot({props:{node:t[15],startPos:t[5][t[17]],depth:t[1]+1}}),{c(){th(e.$$.fragment)},m(t,r){tv(e,t,r),n=!0},p(t,n){let r={};4&n&&(r.node=t[15]),32&n&&(r.startPos=t[5][t[17]]),2&n&&(r.depth=t[1]+1),e.$set(r)},i(t){n||(tc(e.$$.fragment,t),n=!0)},o(t){tf(e.$$.fragment,t),n=!1},d(t){tg(e,t)}}}function r7(t){let e,n,r,o,i,l,s,a,c,f,u,d,p,h,g,m,y,b;let $=tu(t[2].content),x=[];for(let e=0;e<$.length;e+=1)x[e]=r9(r4(t,$,e));let w=t=>
1tf(x[t],1,1,()=>{x[t]=null});return{c(){e=N("li"),n=N("div"),r=N("div"),o=R(t[0]),i=P(),l=N("div"),s=N("button"),a=R(t[6]),c=P(),f=N("div"),u=R(t[4]),p=P(),h=N("ul");for(let t=0;t<x.length;t+=1)x[t].c();I(r,"class","number-box svelte-1un819s"),I(s,"aria-label","Show node info button"),I(s,"class","svelte-1un819s"),V(s,"selected",!1),I(l,"class","node-name svelte-1un819s"),I(f,"class","number-box svelte-1un819s"),I(n,"class","doc-node-body svelte-1un819s"),I(n,"style",d="background: ".concat(t[7])),I(h,"class","svelte-1un819s"),V(h,"inline-children",t[3]),V(h,"show-borders",t[1]>=1),I(e,"class",g=O("".concat(t[11].class||""," doc-node"))+" svelte-1un819s"),V(e,"root",t[8])},m(d,v){D(d,e,v),E(e,n),E(n,r),E(r,o),E(n,i),E(n,l),E(l,s),E(s,a),E(n,c),E(n,f),E(f,u),E(e,p),E(e,h);for(let t=0;t<x.length;t+=1)x[t]&&x[t].m(h,null);m=!0,y||(b=[z(s,"click",t[9]),z(s,"dblclick",t[10])],y=!0)},p(t,r){let[i]=r;if((!m||1&i)&&F(o,t[0]),(!m||64&i)&&F(a,t[6]),(!m||16&i)&&F(u,t[4]),(!m||128&i&&d!==(d="background: ".concat(t[7])))&&I(n,"style",d),38&i){let e;for(e=0,$=tu(t[2].content);e<$.length;e+=1){let n=r4(t,$,e);x[e]?(x[e].p(n,i),tc(x[e],1)):(x[e]=r9(n),x[e].c(),tc(x[e],1),x[e].m(h,null))}for(ts(),e=$.length;e<x.length;e+=1)w(e);ta()}(!m||8&i)&&V(h,"inline-children",t[3]),(!m||2&i)&&V(h,"show-borders",t[1]>=1),(!m||2048&i&&g!==(g=O("".concat(t[11].class||""," doc-node"))+" svelte-1un819s"))&&I(e,"class",g),(!m||2304&i)&&V(e,"root",t[8])},i(t){if(!m){for(let t=0;t<$.length;t+=1)tc(x[t]);m=!0}},o(t){x=x.filter(Boolean);for(let t=0;t<x.length;t+=1)tf(x[t]);m=!1},d(t){t&&S(e),M(x,t),y=!1,v(b)}}}function r8(t,e,n){let r,o,i,l,s,a;let{colors:c,handleNodeClick:f}=t$("doc-view"),{node:u,startPos:p,depth:h}=e,v=0===h;return t.$$set=t=>{n(11,e=d(d({},e),C(t))),"node"in t&&n(12,u=t.node),"startPos"in t&&n(0,p=t.startPos),"depth"in t&&n(1,h=t.depth)},t.$$.update=()=>{4096&t.$$.dirty&&n(2,r=u.content),4096&t.$$.dirty&&n(7,o=c[u.type.name]),4096&t.$$.dirty&&n(6,i=u.isText&&u.marks.length>0?"".concat(u.type.name," - [").concat(u.marks.map(t=>t.type.name).join(", "),"]"):u.type.name),4097&t.$$.dirty&&n(5,l=Array(u.childCount).fill(void 0).reduce((t,e,n)=>{if(0===n)return[v?0:p+1];let r=t[n-1];return[...t,r+u.child(n-1).nodeSize]},[])),4097&t.$$.dirty&&n(4,s=p+u.nodeSize),4&t.$$.dirty&&n(3,a=r.content.every(t=>t.isInline))},e=C(e),[p,h,r,a,s,l,i,o,v,function(){f(u,p)},function(){f(u,p,!0)},e,u]}class ot extends ty{constructor(t){super(),tm(this,t,r8,r7,m,{node:12,startPos:0,depth:1},r6)}}let oe=["#EA7C7F","#67B0C6","#94BB7F","#CA9EDB","#DCDC5D","#B9CC7C","#DD97D8","#FFB761","#4D8FD1","#F36E98","#E45F44","#A6A4AE","#FCC047","#FFC129","#D3929C","#4CBCD4","#8D7BC0"];function on(t){q(t,"svelte-is7zuw","ul.svelte-is7zuw{list-style:none;margin:0;padding:0}")}function or(t){let e,n,r;return n=new ot({props:{class:t[1].class,node:t[0],startPos:0,depth:0}}),{c(){e=N("ul"),th(n.$$.fragment),I(e,"class","svelte-is7zuw")},m(t,o){D(t,e,o),tv(n,e,null),r=!0},p(t,e){let[r]=e,o={};2&r&&(o.class=t[1].class),1&r&&(o.node=t[0]),n.$set(o)},i(t){r||(tc(n.$$.fragment,t),r=!0)},o(t){tf(n.$$.fragment,t),r=!1},d(t){t&&S(e),tg(n)}}}function oo(t,e,n){let{doc:r,schema:o,selected:i={type:"",start:0,end:0},handleNodeSelect:l}=e;return tb("doc-view",{selected:i,colors:Object.keys(o.nodes).reduce((t,e,n)=>{let r=n>=oe.length?function(t,e){let n=t/e;return Math.round(e*(n-Math.floor(n)))}(n,oe.length):n;return t[e]=oe[r],t},{}),handleNodeClick:l}),t.$$set=t=>{n(1,e=d(d({},e),C(t))),"doc"in t&&n(0,r=t.doc),"schema"in t&&n(2,o=t.schema),"selected"in t&&n(3,i=t.selected),"handleNodeSelect"in t&&n(4,l=t.handleNodeSelect)},e=C(e),[r,e,o,i,l]}class oi extends ty{constructor(t){super(),tm(this,t,oo,or,m,{doc:0,schema:2,selected:3,handleNodeSelect:4},on)}}function ol(t){q(t,"svelte-15i66m0",".top-row.svelte-15i66m0{align-items:center;display:flex;justify-content:space-between}.right-panel[slot=right].svelte-15i66m0{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.75em}")}function os(t){let e;return{c(){e=R("log")},m(t,n){D(t,e,n)},d(t){t&&S(e)}}}function oa(t){let e,n,r,o,i,l,s,a;return i=new nM({props:{class:"hidden",$$slots:{default:[os]},$$scope:{ctx:t}}}),s=new oi({props:{class:"m-top",doc:t[0],schema:t[2],handleNodeSelect:t[3]}}),{c(){e=N("div"),n=N("div"),(r=N("h2")).textContent="Current doc",o=P(),th(i.$$.fragment),l=P(),th(s.$$.fragment),I(n,"class","top-row svelte-15i66m0"),I(e,"slot","left"),I(e,"class","left-panel")},m(t,c){D(t,e,c),E(e,n),E(n,r),E(n,o),tv(i,n,null),E(e,l),tv(s,e,null),a=!0},p(t,e){let n={};256&e&&(n.$$scope={dirty:e,ctx:t}),i.$set(n);let r={};1&e&&(r.doc=t[0]),s.$set(r)},i(t){a||(tc(i.$$.fragment,t),tc(s.$$.fragment,t),a=!0)},o(t){tf(i.$$.fragment,t),tf(s.$$.fragment,t),a=!1},d(t){t&&S(e),tg(i),tg(s)}}}function oc(t){let e;return{c(){e=R("log")},m(t,n){D(t,e,n)},d(t){t&&S(e)}}}function of(t){let e,n,r,o,i,l,s,a;return(i=new nM({props:{$$slots:{default:[oc]},$$scope:{ctx:t}}})).$on("click",t[4]),s=new n$({props:{class:"m-top",data:t[1],recursionOpts:{shouldExpandNode:od}}}),{c(){e=N("div"),n=N("div"),(r=N("h2")).textContent="Node info",o=P(),th(i.$$.fragment),l=P(),th(s.$$.fragment),I(n,"class","top-row svelte-15i66m0"),I(e,"slot","right"),I(e,"class","right-panel svelte-15i66m0")},m(t,c){D(t,e,c),E(e,n),E(n,r),E(n,o),tv(i,n,null),E(e,l),tv(s,e,null),a=!0},p(t,e){let n={};256&e&&(n.$$scope={dirty:e,ctx:t}),i.$set(n);let r={};2&e&&(r.data=t[1]),s.$set(r)},i(t){a||(tc(i.$$.fragment,t),tc(s.$$.fragment,t),a=!0)},o(t){tf(i.$$.fragment,t),tf(s.$$.fragment,t),a=!1},d(t){t&&S(e),tg(i),tg(s)}}}function ou(t){let e,n;return e=new nE({props:{$$slots:{right:[of],left:[oa]},$$scope:{ctx:t}}}),{c(){th(e.$$.fragment)},m(t,r){tv(e,t,r),n=!0},p(t,n){let[r]=n,o={};259&r&&(o.$$scope={dirty:r,ctx:t}),e.$set(o)},i(t){n||(tc(e.$$.fragment,t),n=!0)},o(t){tf(e.$$.fragment,t),n=!1},d(t){tg(e,t)}}}let od=t=>"array"!==t.type||t.value.length<=50;function op(t,e,n){let r,o;let{view:i}=t$("editor-view"),l=i.state.doc,s={node:i.state.doc,pos:0},a=i.state.schema;return eX.subscribe(t=>
1{t&&(t.trs.forEach(t=>{n(5,s.pos=t.mapping.map(s.pos),s)}),clearTimeout(o),o=setTimeout(()=>{n(0,l=t.state.doc);let e=s.pos;try{let t=l.nodeAt(e);n(5,s={node:t||l,pos:t?e:0})}catch(t){}},100))}),t.$$.update=()=>{32&t.$$.dirty&&n(1,r=s.node.toJSON())},[l,r,a,function(t,e){var r;let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(n(5,s={node:t,pos:e}),!o)return;let l=i.nodeDOM(e);for(;l&&!(l instanceof HTMLElement);)l=l.parentElement;if(!l||"none"===getComputedStyle(l).display)return;let a=function t(e){return e&&e!==document.body?e.scrollHeight!==e.clientHeight?e:t(e.parentElement):void 0}(i.dom);if(a){let t=a.scrollTop,e=a.offsetTop-window.scrollY,n=a.getBoundingClientRect().top-e,r=l.getBoundingClientRect().top-e,o=a.clientHeight/2;a.scroll(0,t+n+r-o)}let c=i.coordsAtPos(e).top,f=(null===(r=document.querySelector(".floating-dock"))||void 0===r?void 0:r.clientHeight)||0;window.scroll(0,c-f+l.clientHeight+window.scrollY)},function(){console.log(s),window._node=s,console.info("%c [prosemirror-dev-toolkit]: Property added to window._node","color: #b8e248")},s]}class oh extends ty{constructor(t){super(),tm(this,t,op,ou,m,{},ol)}}function ov(t){q(t,"svelte-969ox4","ul.svelte-969ox4.svelte-969ox4{color:#fff;list-style:none;margin:0;padding:0;height:100%;width:100%}li.svelte-969ox4+li.svelte-969ox4{border-top:1px solid rgb(96, 76, 104)}li.svelte-969ox4.svelte-969ox4{align-items:center;display:flex;font-family:monospace;padding:6px 18px}input.svelte-969ox4.svelte-969ox4{background:transparent;border:0;color:#fff;height:100%;margin:0;padding:2px;width:100%}.unstyled-btn.svelte-969ox4.svelte-969ox4{background:transparent;border:0;color:#fff;cursor:pointer;display:block;font-family:monospace;margin:0;padding:0;text-align:start;width:100%}.snapshot-btn.svelte-969ox4.svelte-969ox4{background:transparent;border:0;border-radius:3px;color:#d3d3d9;cursor:pointer;display:flex;font-size:11px;padding:6px 18px;text-transform:uppercase}.snapshot-btn.svelte-969ox4.svelte-969ox4:hover{background:rgba(255, 162, 177, 0.4);color:#fff}.ml-2.svelte-969ox4.svelte-969ox4{margin-left:1rem}")}function og(t,e,n){let r=t.slice();return r[23]=e[n],r}function om(t){let e,n,r,o;let i=t[23].name+"";function l(){return t[16](t[23])}return{c(){e=N("button"),n=R(i),I(e,"class","unstyled-btn svelte-969ox4"),I(e,"aria-label","Edit snapshot name button")},m(t,i){D(t,e,i),E(e,n),r||(o=z(e,"dblclick",l),r=!0)},p(e,r){t=e,1&r&&i!==(i=t[23].name+"")&&F(n,i)},d(t){t&&S(e),r=!1,o()}}}function oy(t){let e,n,r,o;return{c(){(e=N("input")).value=n=t[2].name,I(e,"class","svelte-969ox4")},m(n,i){D(n,e,i),r||(o=[z(e,"input",t[5]),z(e,"keypress",t[6])],r=!0)},p(t,r){4&r&&n!==(n=t[2].name)&&e.value!==n&&(e.value=n)},d(t){t&&S(e),r=!1,v(o)}}}function ob(t){let e;return{c(){e=R("Show")},m(t,n){D(t,e,n)},d(t){t&&S(e)}}}function o$(t){let e;return{c(){e=R("Hide")},m(t,n){D(t,e,n)},d(t){t&&S(e)}}}function ox(t){let e;return{c(){e=R("Delete")},m(t,n){D(t,e,n)},d(t){t&&S(e)}}}function ow(t){let e;return{c(){e=R("Confirm Delete")},m(t,n){D(t,e,n)},d(t){t&&S(e)}}}function ok(t){let e,n,r,o,i,l,s,a,c,f,u,d;function p(t,e){return t[2]&&t[2].timestamp===t[23].timestamp?oy:om}let h=p(t),g=h(t);function m(t,e){var n;return(null===(n=t[1])||void 0===n?void 0:n.timestamp)===t[23].timestamp?o$:ob}let y=m(t),b=y(t);function $(){return t[17](t[23])}function x(){return t[18](t[23])}function w(){return t[19](t[23])}function k(t,e){var n;return(null===(n=t[3])||void 0===n?void 0:n.timestamp)===t[23].timestamp?ow:ox}let _=k(t),j=_(t);function C(){return t[20](t[23])}return{c(){e=N("li"),g.c(),n=P(),r=N("button"),b.c(),o=P(),(i=N("button")).textContent="Restore",l=P(),(s=N("button")).textContent="Export",a=P(),c=N("button"),j.c(),f=P(),I(r,"class","snapshot-btn ml-2 svelte-969ox4"),I(i,"class","snapshot-btn svelte-969ox4"),I(s,"class","snapshot-btn svelte-969ox4"),I(c,"class","snapshot-btn svelte-969ox4"),I(e,"class","svelte-969ox4")},m(t,p){D(t,e,p),g.m(e,null),E(e,n),E(e,r),b.m(r,null),E(e,o),E(e,i),E(e,l),E(e,s),E(e,a),E(e,c),j.m(c,null),E(e,f),u||(d=[z(r,"click",$),z(i,"click",x),z(s,"click",w),z(c,"click",C)],u=!0)},p(o,i){h===(h=p(t=o))&&g?g.p(t,i):(g.d(1),(g=h(t))&&(g.c(),g.m(e,n))),y!==(y=m(t))&&(b.d(1),(b=y(t))&&(b.c(),b.m(r,
1null))),_!==(_=k(t))&&(j.d(1),(j=_(t))&&(j.c(),j.m(c,null)))},d(t){t&&S(e),g.d(),b.d(),j.d(),u=!1,v(d)}}}function o_(t){let e;let n=tu(t[0]),r=[];for(let e=0;e<n.length;e+=1)r[e]=ok(og(t,n,e));return{c(){e=N("ul");for(let t=0;t<r.length;t+=1)r[t].c();I(e,"class","svelte-969ox4")},m(t,n){D(t,e,n);for(let t=0;t<r.length;t+=1)r[t]&&r[t].m(e,null)},p(t,o){let[i]=o;if(2047&i){let o;for(o=0,n=tu(t[0]);o<n.length;o+=1){let l=og(t,n,o);r[o]?r[o].p(l,i):(r[o]=ok(l),r[o].c(),r[o].m(e,null))}for(;o<r.length;o+=1)r[o].d(1);r.length=n.length}},i:u,o:u,d(t){t&&S(e),M(r,t)}}}function oj(t,e,n){let r,o,i,{snapshots:l=[],selectedSnapshot:s,onUpdate:a,onView:c,onRestore:f,onExport:u,onDelete:d}=e,p=()=>{clearTimeout(i),i=setTimeout(()=>{a(r)},150)};function h(t){n(2,r=t),n(3,o=void 0)}function v(t){(null==s?void 0:s.timestamp)===t.timestamp?c():c(t),n(3,o=void 0)}function g(t){f(t),n(3,o=void 0)}function m(t){u(t),n(3,o=void 0)}function y(t){o&&o.timestamp===t.timestamp?(d(t),n(3,o=void 0)):n(3,o=t)}return t.$$set=t=>{"snapshots"in t&&n(0,l=t.snapshots),"selectedSnapshot"in t&&n(1,s=t.selectedSnapshot),"onUpdate"in t&&n(11,a=t.onUpdate),"onView"in t&&n(12,c=t.onView),"onRestore"in t&&n(13,f=t.onRestore),"onExport"in t&&n(14,u=t.onExport),"onDelete"in t&&n(15,d=t.onDelete)},[l,s,r,o,h,function(t){r&&(n(2,r.name=t.currentTarget.value,r),p())},function(t){"Enter"===t.key&&r&&(a(r),clearTimeout(i),n(2,r=void 0),n(3,o=void 0))},v,g,m,y,a,c,f,u,d,t=>h(t),t=>v(t),t=>g(t),t=>m(t),t=>y(t)]}class oC extends ty{constructor(t){super(),tm(this,t,oj,o_,m,{snapshots:0,selectedSnapshot:1,onUpdate:11,onView:12,onRestore:13,onExport:14,onDelete:15},ov)}}function oO(t){q(t,"svelte-3jdj5c",".right-panel[slot=right].svelte-3jdj5c{padding:0}.no-snapshots.svelte-3jdj5c{align-items:center;color:rgb(255, 162, 177);display:flex;font-size:14px;height:100%;justify-content:center;width:100%}")}function oE(t){let e,n;return e=new oC({props:{snapshots:t[0],selectedSnapshot:t[1],onUpdate:tA,onView:t[4],onRestore:t[3],onExport:tP,onDelete:tT}}),{c(){th(e.$$.fragment)},m(t,r){tv(e,t,r),n=!0},p(t,n){let r={};1&n&&(r.snapshots=t[0]),2&n&&(r.selectedSnapshot=t[1]),e.$set(r)},i(t){n||(tc(e.$$.fragment,t),n=!0)},o(t){tf(e.$$.fragment,t),n=!1},d(t){tg(e,t)}}}function oq(t){let e;return{c(){(e=N("div")).textContent='Save snapshots by clicking "Save" button.',I(e,"class","no-snapshots svelte-3jdj5c")},m(t,n){D(t,e,n)},p:u,i:u,o:u,d(t){t&&S(e)}}}function oD(t){let e,n,r,o;let i=[oq,oE],l=[];function s(t,e){return 0===t[0].length?0:1}return r=l[n=s(t)]=i[n](t),{c(){e=N("div"),r.c(),I(e,"slot","right"),I(e,"class","right-panel svelte-3jdj5c")},m(t,r){D(t,e,r),l[n].m(e,null),o=!0},p(t,o){let a=n;(n=s(t))===a?l[n].p(t,o):(ts(),tf(l[a],1,1,()=>{l[a]=null}),ta(),(r=l[n])?r.p(t,o):(r=l[n]=i[n](t)).c(),tc(r,1),r.m(e,null))},i(t){o||(tc(r),o=!0)},o(t){tf(r),o=!1},d(t){t&&S(e),l[n].d()}}}function oS(t){let e,n;return e=new nE({props:{$$slots:{right:[oD]},$$scope:{ctx:t}}}),{c(){th(e.$$.fragment)},m(t,r){tv(e,t,r),n=!0},p(t,n){let[r]=n,o={};35&r&&(o.$$scope={dirty:r,ctx:t}),e.$set(o)},i(t){n||(tc(e.$$.fragment,t),n=!0)},o(t){tf(e.$$.fragment,t),n=!1},d(t){tg(e,t)}}}function oM(t,e,n){let r,o;$(t,tE,t=>n(0,r=t)),$(t,tq,t=>n(1,o=t));let{view:i}=t$("editor-view");return[r,o,i,function(t){tR(i,t),e0()},t=>(function(t,e){if(e)b(tD)||tD.set(t.state),tM(t,e.doc);else{let e=b(tD);e?t.updateState(e):console.error("No previous state to restore!"),tD.set(void 0)}tq.set(e)})(i,t)]}class oN extends ty{constructor(t){super(),tm(this,t,oM,oS,m,{},oO)}}function oA(t){q(t,"svelte-1quf800",".floating-dock-wrapper.svelte-1quf800{position:fixed;width:0px;height:0px;top:0px;left:0px;z-index:99999999}.floating-dock.svelte-1quf800{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-1quf800{position:absolute;z-index:2;opacity:0;top:-5px;height:10px;left:0px;width:100%;cursor:row-resize}.floating-dock-body.svelte-1quf800{height:100%}button.svelte-1quf800{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-1quf800:hover{background:rgba(255, 162, 177, 0.8)}.copy-btn.svelte-1quf800{right:173px;top:-28px}.save-btn.svelte-1quf800{right:129px;top:-28px}.import-btn.svelte-1quf800{right:79px;top:-28px}.paste-btn.svelte-1quf800{right:32px;top:-28px}.close-btn.svelte-1quf800{font-size:var(--font-medium);right:4px;top:-28px;width:24px}")}function oR(t){let e;return{c(){(e=N("p")).textContent="nuting here"},m(t,n){D(t,e,n)},i:u,o:u,d(t){t&&S(e)}}}function oP(t){let e,n;return e=new oN({}),{c(){th(e.$$.fragment)},m(t,r){tv(e,t,r),n=!0},i(t){n||(tc(e.$$.fragment,t),n=!0)},o(t){tf(e.$$.fragment,t),n=!1},d(t){tg(e,t)}}}function oT(t){let e,n;return e=new oh({}),{c(){th(e.$$.fragment)},m(t,r){tv(e,t,r),n=!0},i(t){n||(tc(e.$$.fragment,t),n=!0)},o(t){tf(e.$$.fragment,t),n=!1},d(t){tg(e,t)}}}function oz(t){let e,n;return e=new r5({}),{c(){th(e.$$.fragment)},m(t,r){tv(e,t,r),n=!0},i(t){n||(tc(e.$$.fragment,t),n=!0)},o(t){tf(e.$$.fragment,t),n=!1},d(t){tg(e,t)}}}function oI(t){let e,n;return e=new rY({}),{c(){th(e.$$.fragment)},m(t,r){tv(e,t,r),n=!0},i(t){n||(tc(e.$$.fragment,t),n=!0)},o(t){tf(e.$$.fragment,t),n=!1},d(t){tg(e,t)}}}function oB(t){let e,n;return e=new rN({}),{c(){th(e.$$.fragment)},m(t,r){tv(e,t,r),n=!0},i(t){n||(tc(e.$$.fragment,t),n=!0)},o(t){tf(e.$$.fragment,t),n=!1},d(t){tg(e,t)}}}function oF(t){let e,n;return e=new nV({}),{c(){th(e.$$.fragment)},m(t,r){tv(e,t,r),n=!0},i(t){n||(tc(e.$$.fragment,t),n=!0)},o(t){tf(e.$$.fragment,t),n=!1},d(t){tg(e,t)}}}function oL(t){let e,n,r,o,i,l,s,a,c,f,u,d,p,h,m,y,b,$,x,w,k,_,j,C,O,q,M,A;(n=new tL({props:{isOpen:t[5]}})).$on("submit",t[12]),n.$on("close",t[11]),k=new tJ({props:{onClickTab:t[14],active:t[1]}});let R=[oF,oB,oI,oz,oT,oP,oR],T=[];function B(t,e){return"state"===t[1]?0:"history"===t[1]?1:"plugins"===t[1]?2:"schema"===t[1]?3:"structure"===t[1]?4:"snapshots"===t[1]?5:6}return C=T[j=B(t)]=R[j](t),{c(){e=N("div"),th(n.$$.fragment),r=P(),o=N("div"),i=N("div"),l=P(),s=N("div"),a=N("div"),(c=N("button")).textContent="Copy",f=P(),(u=N("button")).textContent="Save",d=P(),(p=N("button")).textContent="Import",h=P(),(m=N("button")).textContent="Paste",y=P(),(b=N("button")).textContent="X",$=P(),x=N("input"),w=P(),th(k.$$.fragment),_=P(),C.c(),I(i,"class","resizing-div svelte-1quf800"),I(i,"role","button"),I(i,"tabindex","-1"),I(c,"class","copy-btn svelte-1quf800"),I(u,"class","save-btn svelte-1quf800"),I(p,"class","import-btn svelte-1quf800"),I(m,"class","paste-btn svelte-1quf800"),I(b,"class","close-btn svelte-1quf800"),I(b,"aria-label","Close dev-toolkit"),function(t,e,n,r){t.style.setProperty(e,n,"")}(x,"display","none"),I(x,"type","file"),I(x,"accept",".json"),x.multiple=!0,I(s,"class","floating-dock-body svelte-1quf800"),I(o,"class","floating-dock svelte-1quf800"),I(o,"style",O="top: ".concat(t[2],"%; height: ").concat(t[3],"%;")),I(e,"class","floating-dock-wrapper svelte-1quf800")},m(v,C){D(v,e,C),tv(n,e,null),E(e,r),E(e,o),E(o,i),E(o,l),E(o,s),E(s,a),E(a,c),E(a,f),E(a,u),E(a,d),E(a,p),E(a,h),E(a,m),E(a,y),E(a,b),E(s,$),E(s,x),t[15](x),E(s,w),tv(k,s,null),E(s,_),T[j].m(s,null),q=!0,M||(A=[z(i,"mousedown",t[6]),z(c,"click",t[7]),z(u,"click",t[8]),z(p,"click",t[9]),z(m,"click",t[10]),z(b,"click",function(){g(t[0])&&t[0].apply(this,arguments)}),z(x,"change",t[13])],M=!0)},p(e,r){let[i]=r;t=e;let l={};32&i&&(l.isOpen=t[5]),n.$set(l);let a={};2&i&&(a.active=t[1]),k.$set(a);let c=j;(j=B(t))!==c&&(ts(),tf(T[c],1,1,()=>{T[c]=null}
1),ta(),(C=T[j])||(C=T[j]=R[j](t)).c(),tc(C,1),C.m(s,null)),(!q||12&i&&O!==(O="top: ".concat(t[2],"%; height: ").concat(t[3],"%;")))&&I(o,"style",O)},i(t){q||(tc(n.$$.fragment,t),tc(k.$$.fragment,t),tc(C),q=!0)},o(t){tf(n.$$.fragment,t),tf(k.$$.fragment,t),tf(C),q=!1},d(r){r&&S(e),tg(n),t[15](null),tg(k),T[j].d(),M=!1,v(A)}}}function oV(t,e,n){var r;let{onClose:o}=e,{view:i}=t$("editor-view"),l="state",s=50,a=50,c,f=!1;function u(t){t.preventDefault(),n(2,s=100*t.clientY/window.innerHeight),n(3,a=100*(1-t.clientY/window.innerHeight))}function d(t){t.preventDefault(),document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",d)}return r=()=>{document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",d)},H().$$.on_destroy.push(r),t.$$set=t=>{"onClose"in t&&n(0,o=t.onClose)},[o,l,s,a,c,f,function(){document.addEventListener("mousemove",u),document.addEventListener("mouseup",d)},function(){navigator.clipboard.writeText(JSON.stringify(i.state.doc.toJSON()))},function(){let t=prompt("Enter snapshot name",new Date().toLocaleString("sv"));t&&tN(t,i.state.doc.toJSON())},function(){c.click()},function(){n(5,f=!f)},function(){n(5,f=!1)},function(t){tR(i,tN(new Date().toLocaleString("sv"),t.detail.doc)),n(5,f=!1)},function(t){Array.from(t.currentTarget.files||[]).forEach(t=>{let e=new FileReader;e.readAsText(t),e.onload=e=>{var n,r;let o="string"==typeof(null===(n=e.target)||void 0===n?void 0:n.result)?null===(r=e.target)||void 0===r?void 0:r.result:"";try{let e=JSON.parse(o);if(!e||"object"!=typeof e)throw Error("Imported snapshot was not a JSON object"+e);let n=t.name.slice(0,t.name.lastIndexOf("."));!function(t,e,n){let r=n.nodeFromJSON(e),o={name:t,timestamp:Date.now(),doc:r.toJSON()};tE.update(t=>[o,...t])}(n,e,i.state.schema)}catch(t){console.error("Failed to import snapshot: "+t)}}})},function(t){n(1,l=t)},function(t){Z[t?"unshift":"push"](()=>{n(4,c=t)})}]}class oH extends ty{constructor(t){super(),tm(this,t,oV,oL,m,{onClose:0},oA)}}function oU(t){q(t,"svelte-pr6kw9",'.dev-tools.svelte-pr6kw9{font-family:var(--font-sans);font-size:var(--font-medium);font-weight:400;--font-sans:Helvetica Neue, Calibri Light, Roboto, sans-serif;--font-small:11px;--font-medium:13px;--font-large:16px;--height-tabs-menu:48px;--tree-view-font-family:"Helvetica Neue", "Calibri Light", Roboto, sans-serif;--tree-view-font-size:13px;--tree-view-left-indent:0.875em;--tree-view-line-height:1.1;--tree-view-key-margin-right:0.5em;--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}.dev-tools.svelte-pr6kw9 .svelte-tree-view *{box-sizing:border-box}.dev-tools.svelte-pr6kw9 .hidden{opacity:0;visibility:hidden}')}function oJ(t){let e,n;return(e=new t_({props:{buttonPosition:t[1]}})).$on("click",t[2]),{c(){th(e.$$.fragment)},m(t,r){tv(e,t,r),n=!0},p(t,n){let r={};2&n&&(r.buttonPosition=t[1]),e.$set(r)},i(t){n||(tc(e.$$.fragment,t),n=!0)},o(t){tf(e.$$.fragment,t),n=!1},d(t){tg(e,t)}}}function oG(t){let e,n;return e=new oH({props:{onClose:t[3]}}),{c(){th(e.$$.fragment)},m(t,r){tv(e,t,r),n=!0},p:u,i(t){n||(tc(e.$$.fragment,t),n=!0)},o(t){tf(e.$$.fragment,t),n=!1},d(t){tg(e,t)}}}function oK(t){let e,n,r,o;let i=[oG,oJ],l=[];return r=l[n=t[0]?0:1]=i[n](t),{c(){e=N("section"),r.c(),I(e,"class","dev-tools svelte-pr6kw9")},m(t,r){D(t,e,r),l[n].m(e,null),o=!0},p(t,o){let[s]=o,a=n;(n=t[0]?0:1)===a?l[n].p(t,s):(ts(),tf(l[a],1,1,()=>{l[a]=null}),ta(),(r=l[n])?r.p(t,s):(r=l[n]=i[n](t)).c(),tc(r,1),r.m(e,null))},i(t){o||(tc(r),o=!0)},o(t){tf(r),o=!1},d(t){t&&S(e),l[n].d()}}}function oW(t,e,n){let{view:r,devToolsExpanded:o=!1,buttonPosition:i="bottom-right"}=e;return tb("editor-view",{view:r,execCmd(t){t(r.state,r.dispatch)},replaceEditorContent(t){let e=r.state.tr;e.replaceWith(0,r.state.doc.nodeSize-2,t.doc.content),r.dispatch(e)}}),U(()=>{let t=document&&document.querySelector("html");o&&t&&(t.style.paddingBottom="341px")}),t.$$set=t=>{"view"in t&&n(4,r=t.view),"devToolsExpanded"in t&&n(0,o=t.devToolsExpanded),"buttonPosition"in t&&n(1,i=t.buttonPosition)},[o,i,function(){n(0,o=!0);let t=document&&document.querySelector("html");t&&(t.style.paddingBottom="341px")},function(){n(0,o=!1);let t=document&&document.querySelector("html");t&&(t.style.paddingBottom="")},r]}class oY extends ty{constructor(t){super(),tm(this,t,oW,oK,m,{view:4,devToolsExpanded:0,buttonPosition:1},oU)}}let oZ=!1,oQ,oX=(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);oZ&&o.transactions.length>
10&&function(t,e,n){let r=b(eZ),o=b(eQ)[0],i=function(t,e,n,r){var o,i,l,s;let f=a.PW.fromSchema(e.schema),u=e.selection,d=f.serializeFragment(u.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(),eH.diff(o,i)),g=(l=eJ(h.selection),s=eJ(e.selection),eH.diff(l,s));return{id:Math.random().toString()+Math.random().toString(),state:e,trs:t.map(t=>Object.keys(t).concat(eU).reduce((e,n)=>(e[n]=t[n],e),{})),timestamp:t[0].time,timeStr:eK(t[0].time),contentDiff:v,selectionDiff:g,selectionHtml:eY((0,c.prettyPrint)(p.join("\n"),{max_char:60,indent_size:2}))}}(t,e,n,r.get((null==o?void 0:o.topEntryId)||""));eZ.update(t=>new Map(t.set(i.id,i))),eX.set(i);let l=!i.contentDiff;if((null==o?void 0:o.isGroup)&&l){let t={id:o.id,isGroup:l,entryIds:[i.id,...o.entryIds],topEntryId:i.id,expanded:o.expanded};eQ.update(e=>[t,...e.slice(1)])}else{let t=b(e1)+1,e={id:t,isGroup:l,entryIds:[i.id],topEntryId:i.id,expanded:!1};eQ.update(t=>[e,...t]),e1.set(t)}}(o.transactions,t.state,r)},o1="__prosemirror-dev-toolkit__";class o0 extends HTMLElement{constructor(){super();let t=this.attachShadow({mode:"open"});this.addEventListener("init-dev-toolkit",e=>{let{detail:{view:n,opts:r}}=e;this.component=new oY({target:t,props:Object.assign({view:n},r)})})}disconnectedCallback(){var t;null===(t=this.component)||void 0===t||t.$destroy()}}function o2(t,e={}){let n,r;let o=((r=document.querySelector(`.${o1}`))||((r=document.createElement("div")).className=o1,document.body.appendChild(r)),r);if(o3(),t.isDestroyed)return;let{disableWebComponent:l}=e,s=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)0>e.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n}(e,["disableWebComponent"]);if(l)n=new oY({target:o,props:Object.assign({view:t},s)});else{let e=document.createElement("prosemirror-dev-toolkit");e.dispatchEvent(new CustomEvent("init-dev-toolkit",{detail:{view:t,opts:s}})),o.appendChild(e)}"undefined"!=typeof window&&(window.editorView=t,window.pmCmd=e=>e(t.state,t.dispatch,t));let a=t.destroy.bind(t);t.destroy=()=>{o3(),a()},function(t){var e;oZ=!0;let n=null===(e=(t.props||t._props).dispatchTransaction)||void 0===e?void 0:e.bind(t);t.setProps({dispatchTransaction:oX(t,n)}),oQ=()=>t.setProps({dispatchTransaction:n})}(t),i=()=>{e0(),oZ=!1,oQ&&oQ(),oQ=void 0,null==n||n.$destroy();let t=o.firstChild;t&&o.removeChild(t)}}function o3(){i&&i(),i=void 0}customElements.get("prosemirror-dev-toolkit")||customElements.define("prosemirror-dev-toolkit",o0),"undefined"!=typeof window&&(window.applyDevTools=o2)}}]);
2//# sourceMappingURL=3d35b88c.8342026cc792cf47.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.