From 9d5ee813c2734fb4151efa20ad958e2d2db77916 Mon Sep 17 00:00:00 2001 From: Bubobubobubobubo Date: Sun, 27 Aug 2023 17:36:38 +0000 Subject: [PATCH] deploy: 13300b698e20d6f2161b84271798d2f5efdbbc22 --- assets/{index-e9026a88.js => index-710cd1ad.js} | 2 +- index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename assets/{index-e9026a88.js => index-710cd1ad.js} (99%) diff --git a/assets/index-e9026a88.js b/assets/index-710cd1ad.js similarity index 99% rename from assets/index-e9026a88.js rename to assets/index-710cd1ad.js index f085fea..0bb4906 100644 --- a/assets/index-e9026a88.js +++ b/assets/index-710cd1ad.js @@ -59,7 +59,7 @@ Length provided: ${this.length}. Number of dictionaries provided: ${this.diction `,kS=` `,JL="// Notes buffer: a buffer to write your notes.",ek={global:{candidate:LS,committed:LS,evaluations:0},locals:{1:{candidate:ar,committed:ar,evaluations:0},2:{candidate:ar,committed:ar,evaluations:0},3:{candidate:ar,committed:ar,evaluations:0},4:{candidate:ar,committed:ar,evaluations:0},5:{candidate:ar,committed:ar,evaluations:0},6:{candidate:ar,committed:ar,evaluations:0},7:{candidate:ar,committed:ar,evaluations:0},8:{candidate:ar,committed:ar,evaluations:0},9:{candidate:ar,committed:ar,evaluations:0}},init:{candidate:kS,committed:kS,evaluations:0},notes:{candidate:JL}},MS={global:{candidate:"",committed:"",evaluations:0},locals:{1:{candidate:"",committed:"",evaluations:0},2:{candidate:"",committed:"",evaluations:0},3:{candidate:"",committed:"",evaluations:0},4:{candidate:"",committed:"",evaluations:0},5:{candidate:"",committed:"",evaluations:0},6:{candidate:"",committed:"",evaluations:0},7:{candidate:"",committed:"",evaluations:0},8:{candidate:"",committed:"",evaluations:0},9:{candidate:"",committed:"",evaluations:0}},init:{candidate:"",committed:"",evaluations:0},notes:{candidate:""}},Rh={Default:{global:{candidate:"",committed:"",evaluations:0},locals:{1:{candidate:"",committed:"",evaluations:0},2:{candidate:"",committed:"",evaluations:0},3:{candidate:"",committed:"",evaluations:0},4:{candidate:"",committed:"",evaluations:0},5:{candidate:"",committed:"",evaluations:0},6:{candidate:"",committed:"",evaluations:0},7:{candidate:"",committed:"",evaluations:0},8:{candidate:"",committed:"",evaluations:0},9:{candidate:"",committed:"",evaluations:0}},init:{candidate:"",committed:"",evaluations:0},notes:{candidate:"// NOTES"}},Help:ek};class tk{constructor(){R(this,"vimMode",!1);R(this,"theme","materialDark");R(this,"font","SpaceMono");R(this,"font_size",22);R(this,"universes");R(this,"selected_universe","Default");R(this,"line_numbers",!0);const e=JSON.parse(localStorage.getItem("topos")||"{}");e&&Object.keys(e).length!==0?(this.vimMode=e.vimMode,this.theme=e.theme,this.font=e.font,this.font_size=e.font_size,this.universes=e.universes,this.selected_universe=e.selected_universe,this.line_numbers=e.line_numbers):this.universes=Rh}get_universe(){this.universes.universe_name}get data(){return{vimMode:this.vimMode,theme:this.theme,font:this.font,font_size:this.font_size,universes:this.universes,selected_universe:this.selected_universe,line_numbers:this.line_numbers}}saveApplicationToLocalStorage(e,t){this.universes=e,this.vimMode=t.vimMode,this.font=t.font,this.font_size=t.font_size,this.selected_universe=t.selected_universe,this.line_numbers=t.line_numbers,localStorage.setItem("topos",JSON.stringify(this.data))}}class rk{constructor(e,t,r){this.from=e,this.to=t,this.diagnostic=r}}class Mi{constructor(e,t,r){this.diagnostics=e,this.panel=t,this.selected=r}static init(e,t,r){let i=e,a=r.facet(xy).markerFilter;a&&(i=a(i));let s=qe.set(i.map(o=>o.from==o.to||o.from==o.to-1&&r.doc.lineAt(o.from).to==o.from?qe.widget({widget:new dk(o),diagnostic:o}).range(o.from):qe.mark({attributes:{class:"cm-lintRange cm-lintRange-"+o.severity+(o.markClass?" "+o.markClass:"")},diagnostic:o}).range(o.from,o.to)),!0);return new Mi(s,t,Fa(s))}}function Fa(n,e=null,t=0){let r=null;return n.between(t,1e9,(i,a,{spec:s})=>{if(!(e&&s.diagnostic!=e))return r=new rk(i,a,s.diagnostic),!1}),r}function nk(n,e){let t=n.startState.doc.lineAt(e.pos);return!!(n.effects.some(r=>r.is(Dy))||n.changes.touchesRange(t.from,t.to))}function ik(n,e){return n.field(jr,!1)?e:e.concat(it.appendConfig.of(hk))}const Dy=it.define(),Im=it.define(),wy=it.define(),jr=fr.define({create(){return new Mi(qe.none,null,null)},update(n,e){if(e.docChanged){let t=n.diagnostics.map(e.changes),r=null;if(n.selected){let i=e.changes.mapPos(n.selected.from,1);r=Fa(t,n.selected.diagnostic,i)||Fa(t,null,i)}n=new Mi(t,n.panel,r)}for(let t of e.effects)t.is(Dy)?n=Mi.init(t.value,n.panel,e.state):t.is(Im)?n=new Mi(n.diagnostics,t.value?zl.open:null,n.selected):t.is(wy)&&(n=new Mi(n.diagnostics,n.panel,t.value));return n},provide:n=>[Rs.from(n,e=>e.panel),Ae.decorations.from(n,e=>e.diagnostics)]}),ak=qe.mark({class:"cm-lintRange cm-lintRange-active"});function sk(n,e,t){let{diagnostics:r}=n.state.field(jr),i=[],a=2e8,s=0;r.between(e-(t<0?1:0),e+(t>0?1:0),(l,c,{spec:d})=>{e>=l&&e<=c&&(l==c||(e>l||t>0)&&(eky(n,t,!1)))}const lk=n=>{let e=n.state.field(jr,!1);(!e||!e.panel)&&n.dispatch({effects:ik(n.state,[Im.of(!0)])});let t=KI(n,zl.open);return t&&t.dom.querySelector(".cm-panel-lint ul").focus(),!0},PS=n=>{let e=n.state.field(jr,!1);return!e||!e.panel?!1:(n.dispatch({effects:Im.of(!1)}),!0)},ck=n=>{let e=n.state.field(jr,!1);if(!e)return!1;let t=n.state.selection.main,r=e.diagnostics.iter(t.to+1);return!r.value&&(r=e.diagnostics.iter(0),!r.value||r.from==t.from&&r.to==t.to)?!1:(n.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)},uk=[{key:"Mod-Shift-m",run:lk,preventDefault:!0},{key:"F8",run:ck}],xy=De.define({combine(n){return Object.assign({sources:n.map(e=>e.source)},ti(n.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null},{needsRefresh:(e,t)=>e?t?r=>e(r)||t(r):e:t}))}});function Ly(n){let e=[];if(n)e:for(let{name:t}of n){for(let r=0;ra.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function ky(n,e,t){var r;let i=t?Ly(e.actions):[];return Pn("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},Pn("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage():e.message),(r=e.actions)===null||r===void 0?void 0:r.map((a,s)=>{let o=!1,l=m=>{if(m.preventDefault(),o)return;o=!0;let g=Fa(n.state.field(jr).diagnostics,e);g&&a.apply(n,g.from,g.to)},{name:c}=a,d=i[s]?c.indexOf(i[s]):-1,p=d<0?c:[c.slice(0,d),Pn("u",c.slice(d,d+1)),c.slice(d+1)];return Pn("button",{type:"button",class:"cm-diagnosticAction",onclick:l,onmousedown:l,"aria-label":` Action: ${c}${d<0?"":` (access key "${i[s]})"`}.`},p)}),e.source&&Pn("div",{class:"cm-diagnosticSource"},e.source))}class dk extends ri{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return Pn("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class BS{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=ky(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class zl{constructor(e){this.view=e,this.items=[];let t=i=>{if(i.keyCode==27)PS(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:a}=this.items[this.selectedIndex],s=Ly(a.actions);for(let o=0;o{for(let a=0;aPS(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(jr).selected;if(!e)return-1;for(let t=0;t{let c=-1,d;for(let p=r;pr&&(this.items.splice(r,c-r),i=!0)),t&&d.diagnostic==t.diagnostic?d.dom.hasAttribute("aria-selected")||(d.dom.setAttribute("aria-selected","true"),a=d):d.dom.hasAttribute("aria-selected")&&d.dom.removeAttribute("aria-selected"),r++});r({sel:a.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:s,panel:o})=>{s.topo.bottom&&(this.list.scrollTop+=s.bottom-o.bottom)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function t(){let r=e;e=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)t();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=this.view.state.field(jr),r=Fa(t.diagnostics,this.items[e].diagnostic);r&&this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:wy.of(r)})}static open(e){return new zl(e)}}function pk(n,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(n)}')`}function wo(n){return pk(``,'width="6" height="3"')}const fk=Ae.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:wo("#d11")},".cm-lintRange-warning":{backgroundImage:wo("orange")},".cm-lintRange-info":{backgroundImage:wo("#999")},".cm-lintRange-hint":{backgroundImage:wo("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),hk=[jr,Ae.decorations.compute([jr],n=>{let{selected:e,panel:t}=n.field(jr);return!e||!t||e.from==e.to?qe.none:qe.set([ak.range(e.from,e.to)])}),XI(sk,{hideOn:nk}),fk],mk=(()=>[sN(),RI(),_x(),_I(),bI(),ut.allowMultipleSelections.of(!0),m2(),O1(w2,{fallback:!0}),U2(),vD(),MD(),FI(),$I(),LI(),mL(),Xi.of([...ID,...dL,...yx,...uk])])(),_t=n=>`${n}`,_k=n=>{let e=n.api._all_samples(),t="",r=Object.keys(e),i=-1;for(;i++ ${r[i]} diff --git a/index.html b/index.html index e056ffd..88bcd66 100644 --- a/index.html +++ b/index.html @@ -6,7 +6,7 @@ Topos - +