diff --git a/gno.land/pkg/gnoweb/components/views/playground.html b/gno.land/pkg/gnoweb/components/views/playground.html index 4c3f8d8eeaa..d796b923c43 100644 --- a/gno.land/pkg/gnoweb/components/views/playground.html +++ b/gno.land/pkg/gnoweb/components/views/playground.html @@ -73,10 +73,8 @@
e;){let f=!0,c=!1;if(!h||a>r[h-1].to){let g=V[a-1];g!=l&&(f=!1,c=g==16)}let u=!f&&l==1?[]:null,d=f?i:i+1,p=a;e:for(;;)if(h&&p==r[h-1].to){if(c)break e;let g=r[--h];if(!f)for(let m=g.from,b=h;;){if(m==e)break e;if(b&&r[b-1].to==m)m=r[--b].from;else{if(V[m-1]==l)break e;break}}if(u)u.push(g);else{g.toV.length;)V[V.length]=256;let i=[],s=e==St?0:1;return Ds(n,s,s,t,0,n.length,i),i}function bl(n){return[new xe(0,n,0)]}var wl="";function xf(n,e,t,i,s){var r;let o=i.head-n.from,l=xe.find(e,o,(r=i.bidiLevel)!==null&&r!==void 0?r:-1,i.assoc),a=e[l],h=a.side(s,t);if(o==h){let u=l+=s?1:-1;if(u<0||u>=e.length)return null;a=e[l=u],o=a.side(!s,t),h=a.side(s,t)}let f=Q(n.text,o,a.forward(s,t));(f0&&l>0&&n.charCodeAt(o-1)==e.charCodeAt(l-1);)o--,l--;if(i=="end"){let a=Math.max(0,r-Math.min(o,l));t-=o+a-r}if(othis.left.length)return this.balanced(this.left,this.right.replace(e-s,t-s,i));let r=[];e>0&&this.decomposeLeft(e,r);let o=r.length;for(let l of i)r.push(l);if(e>0&&Jo(r,o-1),t=f)break;v+=k}if(T==P+1){if(v>f){let k=p[P];d(k.children,k.positions,0,k.children.length,g[P]+C);continue}c.push(p[P])}else{let k=g[T-1]+p[T-1].length-A;c.push(Sr(n,p,g,P,T,A,k,null,a))}u.push(A+C-r)}}return d(e,t,i,s,0),(l||a)(c,u,o)}var Mt=class n{constructor(e,t,i,s,r=!1,o=!1){this.from=e,this.to=t,this.tree=i,this.offset=s,this.open=(r?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],i=!1){let s=[new n(0,e.length,e,0,!1,i)];for(let r of t)r.to>e.length&&s.push(r);return s}static applyChanges(e,t,i=128){if(!t.length)return e;let s=[],r=1,o=e.length?e[0]:null;for(let l=0,a=0,h=0;;l++){let f=l=e.length)return e;!s&&t==0&&e.type==n.topNode&&(s=!0);for(let r=e.children.length-1;r>=0;r--){let o=e.positions[r],l=e.children[r],a;if(ot&&Wr(n,r.tree,0-r.offset,t,l),h;if(a&&a.pos<=i&&(h=La(n,r.tree,t+r.offset,a.pos+r.offset,!1)))return{state:a.state,tree:h}}return{state:n.streamParser.startState(s?lt(s):4),tree:_.empty}}var Fr=class{constructor(e,t,i,s){this.lang=e,this.input=t,this.fragments=i,this.ranges=s,this.stoppedAt=null,this.chunks=[],this.chunkPos=[],this.chunk=[],this.chunkReused=void 0,this.rangeIndex=0,this.to=s[s.length-1].to;let r=Bi.get(),o=s[0].from,{state:l,tree:a}=vu(e,i,o,this.to,r?.state);this.state=l,this.parsedPos=this.chunkStart=o+a.length;for(let h=0;ht.empty?n.moveByChar(t,e):zn(t,e))}function ie(n){return n.textDirectionAt(n.state.selection.main.head)==j.LTR}var Za=n=>Qa(n,!ie(n)),eh=n=>Qa(n,ie(n));function th(n,e){return Ne(n,t=>t.empty?n.moveByGroup(t,e):zn(t,e))}var Ku=n=>th(n,!ie(n)),ju=n=>th(n,ie(n));var Np=typeof Intl<"u"&&Intl.Segmenter?new Intl.Segmenter(void 0,{granularity:"word"}):null;function Uu(n,e,t){if(e.type.prop(t))return!0;let i=e.to-e.from;return i&&(i>2||/[^\s,.;:]/.test(n.sliceDoc(e.from,e.to)))||e.firstChild}function qn(n,e,t){let i=Re(n).resolveInner(e.head),s=t?B.closedBy:B.openedBy;for(let a=e.head;;){let h=t?i.childAfter(a):i.childBefore(a);if(!h)break;Uu(n,h,s)?i=h:a=t?h.to:h.from}let r=i.type.prop(s),o,l;return r&&(o=t?Le(n,i.from,1):Le(n,i.to,-1))&&o.matched?l=t?o.end.to:o.end.from:l=t?i.to:i.from,w.cursor(l,t?-1:1)}var $u=n=>Ne(n,e=>qn(n.state,e,!ie(n))),Gu=n=>Ne(n,e=>qn(n.state,e,ie(n)));function ih(n,e){return Ne(n,t=>{if(!t.empty)return zn(t,e);let i=n.moveVertically(t,e);return i.head!=t.head?i:n.moveToLineBoundary(t,e)})}var nh=n=>ih(n,!1),sh=n=>ih(n,!0);function rh(n){let e=n.scrollDOM.clientHeight