archsight 0.5.6 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/docs/pages.md +2 -2
- data/docs/search.md +91 -17
- data/lib/archsight/database.rb +14 -0
- data/lib/archsight/diagram/style/representers.rb +3 -1
- data/lib/archsight/linter.rb +8 -5
- data/lib/archsight/mcp/query_hints.rb +0 -23
- data/lib/archsight/mcp/query_tool.rb +15 -12
- data/lib/archsight/query/ast.rb +46 -2
- data/lib/archsight/query/evaluator.rb +7 -1
- data/lib/archsight/query/full_text.rb +69 -0
- data/lib/archsight/query/parser.rb +43 -4
- data/lib/archsight/query/text_search.rb +2 -12
- data/lib/archsight/query.rb +25 -4
- data/lib/archsight/resources/config.rb +21 -0
- data/lib/archsight/text_index/expression.rb +73 -0
- data/lib/archsight/text_index/matcher.rb +107 -0
- data/lib/archsight/text_index/snippets.rb +107 -0
- data/lib/archsight/text_index/weights.rb +76 -0
- data/lib/archsight/text_index.rb +89 -0
- data/lib/archsight/version.rb +1 -1
- data/lib/archsight/web/api/json_helpers.rb +23 -4
- data/lib/archsight/web/api/openapi/spec.yaml +70 -0
- data/lib/archsight/web/api/routes.rb +7 -3
- data/lib/archsight/web/application.rb +20 -1
- data/lib/archsight/web/public/vue/{DocPage-BHffBQ3u.js → DocPage-qVqx-gJ9.js} +1 -1
- data/lib/archsight/web/public/vue/{EditorPage-BHZtvtnN.js → EditorPage-Bz21Jreq.js} +1 -1
- data/lib/archsight/web/public/vue/{ErrorPage-BQARAwF8.js → ErrorPage-CKNxpjzn.js} +1 -1
- data/lib/archsight/web/public/vue/{GraphView-D84CH00D.js → GraphView-6EzYwP8T.js} +1 -1
- data/lib/archsight/web/public/vue/{HomePage-BJpTPWFz.js → HomePage-tCk9Pmh5.js} +2 -2
- data/lib/archsight/web/public/vue/{InstanceRouter-C1Da3nWo.js → InstanceRouter-BQx8UnCA.js} +1 -1
- data/lib/archsight/web/public/vue/{KindList-DNRUVuEJ.js → KindList-Ky5uk5xe.js} +1 -1
- data/lib/archsight/web/public/vue/{PageView-DzKj212I.js → PageView-AdolhVA0.js} +1 -1
- data/lib/archsight/web/public/vue/{QueryError-CTVAL1Tm.js → QueryError-Qt-3lwb7.js} +1 -1
- data/lib/archsight/web/public/vue/ResourceList-LYEUNwQn.css +1 -0
- data/lib/archsight/web/public/vue/ResourceList-zb7VO6Bk.js +2 -0
- data/lib/archsight/web/public/vue/SearchResults-8SgERqBf.js +1 -0
- data/lib/archsight/web/public/vue/SearchResults-C8Nqi4yk.css +1 -0
- data/lib/archsight/web/public/vue/{WikiPage-DSEL2gmd.js → WikiPage-D0x1B2aR.js} +1 -1
- data/lib/archsight/web/public/vue/{index-JZkWwfYg.js → index-DlL2S_4s.js} +2 -2
- data/lib/archsight/web/public/vue.html +1 -1
- metadata +36 -16
- data/lib/archsight/web/public/vue/ResourceList-CRt_FpfS.js +0 -2
- data/lib/archsight/web/public/vue/ResourceList-D75O87zG.css +0 -1
- data/lib/archsight/web/public/vue/SearchResults-BMwBz4BB.js +0 -1
- data/lib/archsight/web/public/vue/SearchResults-BV6UHriJ.css +0 -1
|
@@ -945,6 +945,11 @@ paths:
|
|
|
945
945
|
`summary: true` in the kind definition, at most 3 per kind, computed ones included) that are set.
|
|
946
946
|
`by_kind` counts all hits of the query per kind, also when `kind` narrows the list, so a client can show
|
|
947
947
|
facets and let the user pick one.
|
|
948
|
+
|
|
949
|
+
A query that searches text (`text: "words"`, or bare words with `fulltext=true`) returns its hits ranked by
|
|
950
|
+
relevance (full-text score times the weight of the kind), every other query sorted by name. Every hit of a
|
|
951
|
+
query with text conditions also carries `title` / `title_marks`, `matches` (excerpts with the searched
|
|
952
|
+
words marked) and, when ranked, `relevance`.
|
|
948
953
|
operationId: search
|
|
949
954
|
tags:
|
|
950
955
|
- Search
|
|
@@ -975,6 +980,23 @@ paths:
|
|
|
975
980
|
schema:
|
|
976
981
|
type: string
|
|
977
982
|
example: TechnologyArtifact
|
|
983
|
+
- name: sort
|
|
984
|
+
in: query
|
|
985
|
+
required: false
|
|
986
|
+
description: "`name` lists a text search by name instead of by relevance (other queries are always by name)"
|
|
987
|
+
schema:
|
|
988
|
+
type: string
|
|
989
|
+
enum: [relevance, name]
|
|
990
|
+
- name: fulltext
|
|
991
|
+
in: query
|
|
992
|
+
required: false
|
|
993
|
+
description: |
|
|
994
|
+
Search box mode: bare words (`kubernetes failover`) match resources whose name contains every word or
|
|
995
|
+
whose text contains every word (also as prefix), ranked by relevance. Without it a bare word is a name
|
|
996
|
+
search only.
|
|
997
|
+
schema:
|
|
998
|
+
type: boolean
|
|
999
|
+
default: false
|
|
978
1000
|
- $ref: '#/components/parameters/limit'
|
|
979
1001
|
- $ref: '#/components/parameters/offset'
|
|
980
1002
|
- $ref: '#/components/parameters/output'
|
|
@@ -1784,6 +1806,21 @@ components:
|
|
|
1784
1806
|
description: Values of the kind's summary attributes that are set (search results only)
|
|
1785
1807
|
items:
|
|
1786
1808
|
$ref: '#/components/schemas/Highlight'
|
|
1809
|
+
title:
|
|
1810
|
+
type: string
|
|
1811
|
+
description: Title to show for a hit of a text search (page or architecture title, else the name)
|
|
1812
|
+
title_marks:
|
|
1813
|
+
$ref: '#/components/schemas/TextMarks'
|
|
1814
|
+
relevance:
|
|
1815
|
+
type: number
|
|
1816
|
+
description: Relevance of a hit of a ranked text search, relative to the best hit (1.0)
|
|
1817
|
+
matches:
|
|
1818
|
+
type: array
|
|
1819
|
+
description: |
|
|
1820
|
+
Excerpts of a hit of a text search, best first (at most 2): the annotations the searched words occur in,
|
|
1821
|
+
cut around them, markdown taken off
|
|
1822
|
+
items:
|
|
1823
|
+
$ref: '#/components/schemas/TextMatch'
|
|
1787
1824
|
relations:
|
|
1788
1825
|
type: object
|
|
1789
1826
|
additionalProperties:
|
|
@@ -1812,6 +1849,32 @@ components:
|
|
|
1812
1849
|
dependsOn:
|
|
1813
1850
|
- other-service
|
|
1814
1851
|
|
|
1852
|
+
TextMarks:
|
|
1853
|
+
type: array
|
|
1854
|
+
description: Ranges of a text to highlight, [from, to) in characters (code points), ordered, not overlapping
|
|
1855
|
+
items:
|
|
1856
|
+
type: array
|
|
1857
|
+
items:
|
|
1858
|
+
type: integer
|
|
1859
|
+
minItems: 2
|
|
1860
|
+
maxItems: 2
|
|
1861
|
+
|
|
1862
|
+
TextMatch:
|
|
1863
|
+
type: object
|
|
1864
|
+
required: [key, title, text, marks]
|
|
1865
|
+
properties:
|
|
1866
|
+
key:
|
|
1867
|
+
type: string
|
|
1868
|
+
description: Annotation key the excerpt is from
|
|
1869
|
+
title:
|
|
1870
|
+
type: string
|
|
1871
|
+
description: Title of the annotation
|
|
1872
|
+
text:
|
|
1873
|
+
type: string
|
|
1874
|
+
description: Plain text excerpt, with … where it is cut
|
|
1875
|
+
marks:
|
|
1876
|
+
$ref: '#/components/schemas/TextMarks'
|
|
1877
|
+
|
|
1815
1878
|
InstanceList:
|
|
1816
1879
|
type: object
|
|
1817
1880
|
required:
|
|
@@ -1824,6 +1887,13 @@ components:
|
|
|
1824
1887
|
query:
|
|
1825
1888
|
type: string
|
|
1826
1889
|
description: The executed query string (search only)
|
|
1890
|
+
sort:
|
|
1891
|
+
type: string
|
|
1892
|
+
enum: [relevance, name]
|
|
1893
|
+
description: Order of the hits (search only)
|
|
1894
|
+
ranked:
|
|
1895
|
+
type: boolean
|
|
1896
|
+
description: The query searches text, so its hits can be ordered by relevance (search only)
|
|
1827
1897
|
total:
|
|
1828
1898
|
type: integer
|
|
1829
1899
|
description: Total number of instances
|
|
@@ -133,15 +133,19 @@ module Archsight::Web::API::Routes
|
|
|
133
133
|
start_time = Time.now
|
|
134
134
|
|
|
135
135
|
begin
|
|
136
|
-
|
|
137
|
-
|
|
136
|
+
# fulltext=1 (the search box): bare words search names and text, hits come ranked by relevance
|
|
137
|
+
bare_words = %w[1 true].include?(params[:fulltext].to_s) ? :search : :name
|
|
138
|
+
parsed_query = Archsight::Query.parse(query, bare_words: bare_words)
|
|
139
|
+
# a text search comes ranked by relevance unless sort=name asks for the name order
|
|
140
|
+
scored = params[:sort] == "name" ? nil : parsed_query.scored(db)
|
|
141
|
+
results = scored ? scored.map(&:first) : parsed_query.filter(db).sort_by(&:name)
|
|
138
142
|
query_time_ms = ((Time.now - start_time) * 1000).round(2)
|
|
139
143
|
output = parse_output_param
|
|
140
144
|
|
|
141
145
|
if output == "count"
|
|
142
146
|
json_response(build_count_response(query, results, query_time_ms))
|
|
143
147
|
else
|
|
144
|
-
json_response(build_search_response(query, results, parsed_query, query_time_ms))
|
|
148
|
+
json_response(build_search_response(query, results, parsed_query, query_time_ms, scores: scored&.to_h))
|
|
145
149
|
end
|
|
146
150
|
rescue Archsight::Query::QueryError => e
|
|
147
151
|
json_error(e.message, status: 400, error_type: "QueryError", query: query)
|
|
@@ -25,7 +25,10 @@ class Archsight::Web::Application < Sinatra::Base
|
|
|
25
25
|
attr_accessor :db
|
|
26
26
|
|
|
27
27
|
def database
|
|
28
|
-
@database ||= Archsight::Database.new(Archsight.resources_dir).tap(&:reload!).tap
|
|
28
|
+
@database ||= Archsight::Database.new(Archsight.resources_dir).tap(&:reload!).tap do |db|
|
|
29
|
+
load_import_handlers(db)
|
|
30
|
+
warm_text_index(db)
|
|
31
|
+
end
|
|
29
32
|
end
|
|
30
33
|
|
|
31
34
|
def reload!
|
|
@@ -33,10 +36,20 @@ class Archsight::Web::Application < Sinatra::Base
|
|
|
33
36
|
puts "== Reloading ..." if database.verbose
|
|
34
37
|
database.reload!
|
|
35
38
|
load_import_handlers(database)
|
|
39
|
+
warm_text_index(database)
|
|
36
40
|
dur = (Time.new - start) * 1000
|
|
37
41
|
puts format("== done %0.2f ms", dur) if database.verbose
|
|
38
42
|
end
|
|
39
43
|
|
|
44
|
+
# Builds the full-text index in the background, so the first search does not wait for it
|
|
45
|
+
def warm_text_index(db)
|
|
46
|
+
Thread.new do
|
|
47
|
+
db.text_index
|
|
48
|
+
rescue StandardError => e
|
|
49
|
+
warn "Text index: #{e.message}"
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
40
53
|
# The import handlers, built-in and of the resources repository (import/handlerPath), so the editor knows the
|
|
41
54
|
# same handler names as `archsight lint`. A file that does not load is reported, the server keeps running.
|
|
42
55
|
def load_import_handlers(db)
|
|
@@ -293,6 +306,12 @@ class Archsight::Web::Application < Sinatra::Base
|
|
|
293
306
|
serve_vue
|
|
294
307
|
end
|
|
295
308
|
|
|
309
|
+
# GET /error - the SPA's error page only lives inside the app (its error comes along in the URL
|
|
310
|
+
# from a failed reload and is stale on a fresh load), so a direct request goes home.
|
|
311
|
+
get "/error" do
|
|
312
|
+
redirect "/"
|
|
313
|
+
end
|
|
314
|
+
|
|
296
315
|
get "/dot" do
|
|
297
316
|
content_type "text/plain"
|
|
298
317
|
create_graph_all(db)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as e,L as t,R as n,X as r,it as i,p as a,t as o,tt as s}from"./index-
|
|
1
|
+
import{B as e,L as t,R as n,X as r,it as i,p as a,t as o,tt as s}from"./index-DlL2S_4s.js";import{t as c}from"./WikiPage-D0x1B2aR.js";var l={key:1},u={__name:`DocPage`,props:{filename:String},setup(u){let d=u,f=i(null);function p(e,t){let n=new DOMParser().parseFromString(e,`text/html`).body,r=n.querySelector(`:scope > article`)||n,i=r.querySelector(`h1`),a=i?.textContent.trim()||t.split(`/`).pop().replace(/[-_]/g,` `);i?.remove();let o=[...r.querySelectorAll(`h2[id], h3[id], h4[id]`)].map(e=>({level:Number(e.tagName[1]),id:e.id,text:e.textContent.trim()})),s=[{title:`Documentation`}];return t.startsWith(`resources/`)&&s.push({title:`Resource types`}),{title:a,html:r.innerHTML,toc:o.length>=2?o:[],breadcrumb:s}}async function m(){let e=await a(d.filename);f.value=e?p(e,d.filename):{title:`Not found`,html:`<p>Documentation not found.</p>`,toc:[],breadcrumb:[{title:`Documentation`}]},o(f.value.title)}return s(()=>d.filename,m,{immediate:!0}),(i,a)=>f.value?(r(),n(c,{key:0,title:f.value.title,html:f.value.html,breadcrumb:f.value.breadcrumb,toc:f.value.toc},null,8,[`title`,`html`,`breadcrumb`,`toc`])):(r(),e(`article`,l,[...a[0]||=[t(`p`,null,`Loading...`,-1)]]))}};export{u as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as e,t}from"./rolldown-runtime-COiEfhsA.js";import{$ as n,A as r,B as i,E as a,G as o,H as s,I as c,J as l,K as u,L as d,N as f,P as p,R as m,T as h,U as g,X as _,Y as v,Z as y,a as b,at as x,ct as S,d as C,f as w,h as ee,it as T,j as te,k as ne,m as re,nt as ie,ot as E,q as ae,rt as oe,tt as se,z as D}from"./index-JZkWwfYg.js";import{t as ce}from"./useHighlight-BH32C7yt.js";var le=`archsight.diagramPreview.layout`,ue=[`bottom`,`right`,`full`,`hidden`],de=`(min-width: 1400px)`;function fe(){try{let e=localStorage.getItem(le);return ue.includes(e)?e:null}catch{return null}}var pe=T(fe()),me=T(typeof matchMedia==`function`&&matchMedia(de).matches);typeof matchMedia==`function`&&matchMedia(de).addEventListener(`change`,e=>{me.value=e.matches});var he=c(()=>pe.value||(me.value?`right`:`bottom`));function ge(e){if(ue.includes(e)){pe.value=e;try{localStorage.setItem(le,e)}catch{}}}function _e(){return{layout:he,setLayout:ge}}var ve={class:`preview-head`},ye={class:`preview-tools`},be={key:0,class:`preview-state`},xe={class:`preview-layout`,role:`group`,"aria-label":`Preview layout`},Se=[`aria-pressed`,`title`,`aria-label`,`onClick`],Ce={key:0,class:`preview-error`,role:`alert`},we=[`innerHTML`],Te={key:2,class:`preview-empty`},Ee=300,De=b({__name:`DiagramPreview`,props:{source:String},setup(e){let t=e,{layout:n,setLayout:r}=_e(),a=c(()=>n.value===`hidden`),o=[{value:`bottom`,icon:`iconoir-table-rows`,label:`Below the editor`},{value:`right`,icon:`iconoir-view-columns-2`,label:`Right of the editor`},{value:`full`,icon:`iconoir-expand`,label:`Preview only`},{value:`hidden`,icon:`iconoir-eye-closed`,label:`Hide preview`}],l=T(``),u=T(null),f=T(!1),m=null,g=null;function v(){clearTimeout(m),m=null,g?.abort(),g=null}async function b(e){g=new AbortController;let t=g;f.value=!0;try{let n=await h(e,{signal:t.signal});if(t!==g)return;n.html&&(l.value=n.html),u.value=n.error}catch(e){if(e.name===`AbortError`||t!==g)return;u.value=e.message}finally{t===g&&(f.value=!1)}}se([()=>t.source,a],([e,t],[,n])=>{v(),t?f.value=!1:!e||!e.trim()?(l.value=``,u.value=null,f.value=!1):(f.value=!0,m=setTimeout(()=>b(e),n?0:Ee))},{immediate:!0}),ae(v);function C(e){e.target.closest(`a`)&&e.preventDefault()}return(e,t)=>(_(),i(`div`,{class:E([`diagram-preview`,`layout-${x(n)}`])},[d(`div`,ve,[d(`span`,null,[t[0]||=d(`i`,{class:`iconoir-eye`},null,-1),t[1]||=s(` Preview`,-1),a.value?(_(),i(p,{key:0},[s(` hidden`)],64)):D(``,!0)]),d(`span`,ye,[f.value&&!a.value?(_(),i(`span`,be,`Rendering…`)):D(``,!0),d(`span`,xe,[(_(!0),i(p,null,y(o.filter(e=>!a.value||e.value!==`hidden`),e=>(_(),i(`button`,{key:e.value,type:`button`,class:E({active:x(n)===e.value}),"aria-pressed":x(n)===e.value,title:e.label,"aria-label":e.label,onClick:t=>x(r)(e.value)},[d(`i`,{class:E(e.icon)},null,2)],10,Se))),128))])])]),a.value?D(``,!0):(_(),i(p,{key:0},[u.value?(_(),i(`div`,Ce,[t[2]||=d(`i`,{class:`iconoir-warning-triangle`},null,-1),s(` `+S(u.value),1)])):D(``,!0),l.value?(_(),i(`div`,{key:1,class:E([`preview-body`,{stale:!!u.value}]),title:`Links are disabled in the preview`,onClick:C,innerHTML:l.value},null,10,we)):!u.value&&!f.value?(_(),i(`p`,Te,`Nothing to preview yet.`)):D(``,!0)],64))],2))}},[[`__scopeId`,`data-v-11568657`]]),Oe={class:`label-row`},ke=[`for`,`title`],Ae={key:0,class:`required`},je=[`id`,`aria-invalid`],Me=[`value`],Ne=[`id`,`aria-invalid`,`placeholder`],Pe={key:0,class:`future-hint`},Fe={class:`code-source`},Ie=[`id`,`aria-invalid`,`placeholder`],Le={class:`future-hint`},Re=[`id`,`step`,`aria-invalid`],ze=[`id`,`aria-invalid`],Be=[`id`,`aria-invalid`],Ve=[`id`,`aria-invalid`],He={key:7,class:`field-description`},Ue={key:8,class:`field-error`},We=b({__name:`EditorField`,props:{field:Object,modelValue:[String,Number,null],error:[Array,null]},emits:[`update:modelValue`,`openMarkdown`],setup(e,{emit:t}){let n=e,a=t,o=c({get:()=>n.modelValue??``,set:e=>a(`update:modelValue`,e)}),l=c(()=>[`textarea`,`markdown`,`code`].includes(n.field.input_type)),u=c(()=>n.field.key===`page/content`),f=c(()=>n.field.code_language===`asd`),{layout:h}=_e(),g={asd:`Archsight Diagram`},v=c(()=>{let e=n.field.code_language||``;return g[e]||e.charAt(0).toUpperCase()+e.slice(1)}),b=c(()=>n.error&&n.error.length>0);return(t,n)=>(_(),i(`div`,{class:E([`field-group`,{"field-full-width":l.value}])},[d(`div`,Oe,[d(`label`,{for:e.field.key,title:e.field.description},[s(S(e.field.title)+` `,1),e.field.required?(_(),i(`span`,Ae,`*`)):D(``,!0)],8,ke),e.field.input_type===`markdown`?(_(),i(`button`,{key:0,type:`button`,class:`btn-edit-markdown`,title:`Open rich text editor`,onClick:n[0]||=n=>t.$emit(`openMarkdown`,e.field.key)},[...n[8]||=[d(`i`,{class:`iconoir-edit-pencil`},null,-1),s(` Edit `,-1)]])):D(``,!0)]),e.field.input_type===`select`?oe((_(),i(`select`,{key:0,id:e.field.key,"onUpdate:modelValue":n[1]||=e=>o.value=e,"aria-invalid":b.value?`true`:void 0},[n[9]||=d(`option`,{value:``},`Select...`,-1),(_(!0),i(p,null,y(e.field.options,e=>(_(),i(`option`,{key:e,value:e},S(e),9,Me))),128))],8,je)),[[r,o.value]]):e.field.input_type===`textarea`||e.field.input_type===`markdown`?(_(),i(`div`,{key:1,class:E([`markdown-field`,{"page-body":u.value}])},[oe(d(`textarea`,{id:e.field.key,"onUpdate:modelValue":n[2]||=e=>o.value=e,"aria-invalid":b.value?`true`:void 0,placeholder:e.field.input_type===`markdown`?`Enter markdown content...`:`One entry per line...`},null,8,Ne),[[te,o.value]]),e.field.input_type===`markdown`?(_(),i(`small`,Pe,[...n[10]||=[d(`i`,{class:`iconoir-info-circle`},null,-1),s(` Markdown, `,-1),d(`code`,null,`[[links]]`,-1),s(` and `,-1),d(`code`,null,"```asd",-1),s(` diagrams. Use Edit for the rich text editor `,-1)]])):D(``,!0)],2)):e.field.input_type===`code`?(_(),i(`div`,{key:2,class:E([`code-field`,f.value&&[`with-preview`,`layout-${x(h)}`]])},[d(`div`,Fe,[oe(d(`textarea`,{id:e.field.key,"onUpdate:modelValue":n[3]||=e=>o.value=e,"aria-invalid":b.value?`true`:void 0,placeholder:`Enter ${e.field.code_language||``} code...`,spellcheck:`false`},null,8,Ie),[[te,o.value]]),d(`small`,Le,[n[11]||=d(`i`,{class:`iconoir-code`},null,-1),s(` `+S(v.value)+` code `,1)])]),f.value?(_(),m(De,{key:0,class:`field-diagram-preview`,source:String(o.value)},null,8,[`source`])):D(``,!0)],2)):e.field.input_type===`number`?oe((_(),i(`input`,{key:3,id:e.field.key,type:`number`,"onUpdate:modelValue":n[4]||=e=>o.value=e,step:e.field.step,"aria-invalid":b.value?`true`:void 0},null,8,Re)),[[te,o.value]]):e.field.input_type===`url`?oe((_(),i(`input`,{key:4,id:e.field.key,type:`url`,"onUpdate:modelValue":n[5]||=e=>o.value=e,placeholder:`https://...`,"aria-invalid":b.value?`true`:void 0},null,8,ze)),[[te,o.value]]):e.field.input_type===`list`?oe((_(),i(`input`,{key:5,id:e.field.key,type:`text`,"onUpdate:modelValue":n[6]||=e=>o.value=e,placeholder:`Comma-separated values`,"aria-invalid":b.value?`true`:void 0},null,8,Be)),[[te,o.value]]):oe((_(),i(`input`,{key:6,id:e.field.key,type:`text`,"onUpdate:modelValue":n[7]||=e=>o.value=e,"aria-invalid":b.value?`true`:void 0},null,8,Ve)),[[te,o.value]]),e.field.description&&![`textarea`,`markdown`,`code`].includes(e.field.input_type)?(_(),i(`small`,He,S(e.field.description),1)):D(``,!0),b.value?(_(),i(`div`,Ue,S(e.error.join(`, `)),1)):D(``,!0)],2))}},[[`__scopeId`,`data-v-fe1221de`]]),Ge={class:`relations-editor`},Ke={key:0,class:`no-relations`},qe={id:`relations-list`},Je={class:`relation-text`},Ye=[`onClick`],Xe={class:`add-relation-row`},Ze=[`value`],Qe=[`value`],$e=b({__name:`EditorRelations`,props:{relations:Array,relationOptions:Array,instancesByKind:Object},emits:[`update:relations`],setup(e,{emit:t}){let n=e,a=t,o=T(``),l=T(``),u=c(()=>[...n.relations].sort((e,t)=>(e.verb+e.kind+e.name).localeCompare(t.verb+t.kind+t.name))),f=c(()=>o.value?n.relationOptions.find(e=>e.combo===o.value)?.target_kind:null),m=c(()=>f.value&&n.instancesByKind[f.value]||[]);se(o,()=>{l.value=``});function h(){if(!o.value||!l.value)return;let e=n.relationOptions.find(e=>e.combo===o.value);if(!e||n.relations.some(t=>t.verb===e.verb&&t.kind===e.target_kind&&t.name===l.value))return;let t=[...n.relations,{verb:e.verb,kind:e.target_kind,name:l.value}];a(`update:relations`,t),o.value=``,l.value=``}function g(e){let t=n.relations.filter((t,n)=>n!==e);a(`update:relations`,t)}return(t,n)=>(_(),i(`div`,Ge,[!e.relationOptions||e.relationOptions.length===0?(_(),i(`p`,Ke,` This resource type has no defined relations. `)):(_(),i(p,{key:1},[d(`div`,qe,[(_(!0),i(p,null,y(u.value,(e,t)=>(_(),i(`div`,{key:`${e.verb}:${e.kind}:${e.name}`,class:`relation-item`},[d(`span`,Je,[d(`strong`,null,S(e.verb),1),s(` → `+S(e.kind)+`: `,1),d(`em`,null,S(e.name),1)]),d(`button`,{class:`btn-remove`,type:`button`,title:`Remove`,onClick:e=>g(t)},[...n[2]||=[d(`i`,{class:`iconoir-xmark`},null,-1)]],8,Ye)]))),128))]),d(`div`,Xe,[oe(d(`select`,{"onUpdate:modelValue":n[0]||=e=>o.value=e},[n[3]||=d(`option`,{value:``},`Select relation...`,-1),(_(!0),i(p,null,y(e.relationOptions,e=>(_(),i(`option`,{key:e.combo,value:e.combo},S(e.verb)+` → `+S(e.target_kind),9,Ze))),128))],512),[[r,o.value]]),oe(d(`select`,{"onUpdate:modelValue":n[1]||=e=>l.value=e},[n[4]||=d(`option`,{value:``},`Select instance...`,-1),(_(!0),i(p,null,y(m.value,e=>(_(),i(`option`,{key:e,value:e},S(e),9,Qe))),128))],512),[[r,l.value]]),d(`button`,{class:`secondary btn-add`,type:`button`,onClick:h},[...n[5]||=[d(`i`,{class:`iconoir-plus`},null,-1),s(` Add `,-1)]])])],64))]))}},[[`__scopeId`,`data-v-a987a6fe`]]),et={class:`yaml-output-container`},tt={key:0,class:`conflict-error`},nt={class:`yaml-success`},rt={id:`yaml-content`},it={key:0,class:`yaml-file-info`},at={key:1,class:`yaml-instructions`},ot={class:`yaml-actions`},st=[`disabled`],ct=b({__name:`EditorYamlOutput`,props:{yaml:String,format:{type:String,default:`yaml`},kind:String,name:String,contentHash:String,pathRef:String,inlineEditEnabled:Boolean},emits:[`editAgain`],setup(e,{emit:t}){let n=e,r=T(null),o=T(`idle`),f=T(`idle`),m=T(null),h=c(()=>n.format===`markdown`),g=c(()=>h.value?`Markdown`:`YAML`),v=c(()=>h.value?`.md`:`.yaml`);l(()=>{r.value&&ce(r.value)}),se(()=>n.yaml,async()=>{await u(),r.value&&ce(r.value)});async function y(){try{await navigator.clipboard.writeText(n.yaml),o.value=`copied`,setTimeout(()=>{o.value=`idle`},2e3)}catch{let e=document.createElement(`textarea`);e.value=n.yaml,e.style.position=`fixed`,e.style.opacity=`0`,document.body.appendChild(e),e.select(),document.execCommand(`copy`),document.body.removeChild(e),o.value=`copied`,setTimeout(()=>{o.value=`idle`},2e3)}}async function b(){f.value=`saving`,m.value=null;try{let e=await a(n.kind,n.name,n.yaml,n.contentHash);e.success?(f.value=`saved`,setTimeout(()=>{f.value=`idle`},2e3)):e.conflict?(m.value=e.error,f.value=`idle`):(alert(`Save failed: `+e.error),f.value=`idle`)}catch(e){alert(`Save failed: `+e.message),f.value=`idle`}}return(t,n)=>(_(),i(`div`,et,[m.value?(_(),i(`div`,tt,[n[1]||=d(`i`,{class:`iconoir-warning-triangle`},null,-1),d(`span`,null,S(m.value),1)])):D(``,!0),d(`p`,nt,[n[2]||=d(`i`,{class:`iconoir-check-circle`},null,-1),s(` Generated `+S(g.value),1)]),d(`div`,{ref_key:`codeEl`,ref:r},[d(`pre`,rt,[d(`code`,{class:E(`language-${e.format}`)},S(e.yaml),3)])],512),d(`footer`,null,[e.pathRef?(_(),i(`p`,it,[n[3]||=d(`i`,{class:`iconoir-folder`},null,-1),d(`span`,null,`Source: `+S(e.pathRef),1)])):(_(),i(`p`,at,[n[10]||=d(`i`,{class:`iconoir-info-circle`},null,-1),d(`span`,null,[s(` Copy this `+S(g.value)+` and save it to a `,1),d(`code`,null,S(v.value),1),n[6]||=s(` file in your resources directory`,-1),h.value?(_(),i(p,{key:0},[n[4]||=s(` (named `,-1),d(`code`,null,S(e.name)+`.md`,1),n[5]||=s(`)`,-1)],64)):D(``,!0),n[7]||=s(`, `,-1),n[8]||=d(`br`,null,null,-1),n[9]||=s(`then reload the application. `,-1)])])),d(`div`,ot,[e.pathRef&&e.inlineEditEnabled?(_(),i(`button`,{key:0,type:`button`,onClick:b,disabled:f.value===`saving`,class:E({saved:f.value===`saved`})},[d(`i`,{class:E(f.value===`saving`?`iconoir-refresh`:f.value===`saved`?`iconoir-check`:`iconoir-check-circle`)},null,2),s(` `+S(f.value===`saving`?`Saving...`:f.value===`saved`?`Saved!`:`Save to File`),1)],10,st)):D(``,!0),d(`button`,{type:`button`,onClick:y,class:E({copied:o.value===`copied`})},[d(`i`,{class:E(o.value===`copied`?`iconoir-check`:`iconoir-copy`)},null,2),s(` `+S(o.value===`copied`?`Copied!`:`Copy to Clipboard`),1)],2),d(`button`,{class:`secondary`,type:`button`,onClick:n[0]||=e=>t.$emit(`editAgain`)},[...n[11]||=[d(`i`,{class:`iconoir-edit-pencil`},null,-1),s(` Edit Again `,-1)]])])])]))}},[[`__scopeId`,`data-v-b5ea938f`]]);function O(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function lt(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);n.search=r.toString(),console.warn(`Minified Lexical warning #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}var ut=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,dt=ut&&`documentMode`in document?document.documentMode:null,ft=ut&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),pt=ut&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),mt=!(!ut||!(`InputEvent`in window)||dt)&&`getTargetRanges`in new window.InputEvent(`input`),ht=ut&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),gt=ut&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,_t=ut&&/Android/.test(navigator.userAgent),vt=ut&&/^(?=.*Chrome).*/i.test(navigator.userAgent),yt=ut&&_t&&vt,bt=ut&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&ft&&!vt,xt=0,St=1,Ct=2,wt=1,Tt=2,Et=3,Dt=4,Ot=5,kt=6,At=ht||gt||bt?`\xA0`:``,jt=`
|
|
1
|
+
import{i as e,t}from"./rolldown-runtime-COiEfhsA.js";import{$ as n,A as r,B as i,E as a,G as o,H as s,I as c,J as l,K as u,L as d,N as f,P as p,R as m,T as h,U as g,X as _,Y as v,Z as y,a as b,at as x,ct as S,d as C,f as w,h as ee,it as T,j as te,k as ne,m as re,nt as ie,ot as E,q as ae,rt as oe,tt as se,z as D}from"./index-DlL2S_4s.js";import{t as ce}from"./useHighlight-BH32C7yt.js";var le=`archsight.diagramPreview.layout`,ue=[`bottom`,`right`,`full`,`hidden`],de=`(min-width: 1400px)`;function fe(){try{let e=localStorage.getItem(le);return ue.includes(e)?e:null}catch{return null}}var pe=T(fe()),me=T(typeof matchMedia==`function`&&matchMedia(de).matches);typeof matchMedia==`function`&&matchMedia(de).addEventListener(`change`,e=>{me.value=e.matches});var he=c(()=>pe.value||(me.value?`right`:`bottom`));function ge(e){if(ue.includes(e)){pe.value=e;try{localStorage.setItem(le,e)}catch{}}}function _e(){return{layout:he,setLayout:ge}}var ve={class:`preview-head`},ye={class:`preview-tools`},be={key:0,class:`preview-state`},xe={class:`preview-layout`,role:`group`,"aria-label":`Preview layout`},Se=[`aria-pressed`,`title`,`aria-label`,`onClick`],Ce={key:0,class:`preview-error`,role:`alert`},we=[`innerHTML`],Te={key:2,class:`preview-empty`},Ee=300,De=b({__name:`DiagramPreview`,props:{source:String},setup(e){let t=e,{layout:n,setLayout:r}=_e(),a=c(()=>n.value===`hidden`),o=[{value:`bottom`,icon:`iconoir-table-rows`,label:`Below the editor`},{value:`right`,icon:`iconoir-view-columns-2`,label:`Right of the editor`},{value:`full`,icon:`iconoir-expand`,label:`Preview only`},{value:`hidden`,icon:`iconoir-eye-closed`,label:`Hide preview`}],l=T(``),u=T(null),f=T(!1),m=null,g=null;function v(){clearTimeout(m),m=null,g?.abort(),g=null}async function b(e){g=new AbortController;let t=g;f.value=!0;try{let n=await h(e,{signal:t.signal});if(t!==g)return;n.html&&(l.value=n.html),u.value=n.error}catch(e){if(e.name===`AbortError`||t!==g)return;u.value=e.message}finally{t===g&&(f.value=!1)}}se([()=>t.source,a],([e,t],[,n])=>{v(),t?f.value=!1:!e||!e.trim()?(l.value=``,u.value=null,f.value=!1):(f.value=!0,m=setTimeout(()=>b(e),n?0:Ee))},{immediate:!0}),ae(v);function C(e){e.target.closest(`a`)&&e.preventDefault()}return(e,t)=>(_(),i(`div`,{class:E([`diagram-preview`,`layout-${x(n)}`])},[d(`div`,ve,[d(`span`,null,[t[0]||=d(`i`,{class:`iconoir-eye`},null,-1),t[1]||=s(` Preview`,-1),a.value?(_(),i(p,{key:0},[s(` hidden`)],64)):D(``,!0)]),d(`span`,ye,[f.value&&!a.value?(_(),i(`span`,be,`Rendering…`)):D(``,!0),d(`span`,xe,[(_(!0),i(p,null,y(o.filter(e=>!a.value||e.value!==`hidden`),e=>(_(),i(`button`,{key:e.value,type:`button`,class:E({active:x(n)===e.value}),"aria-pressed":x(n)===e.value,title:e.label,"aria-label":e.label,onClick:t=>x(r)(e.value)},[d(`i`,{class:E(e.icon)},null,2)],10,Se))),128))])])]),a.value?D(``,!0):(_(),i(p,{key:0},[u.value?(_(),i(`div`,Ce,[t[2]||=d(`i`,{class:`iconoir-warning-triangle`},null,-1),s(` `+S(u.value),1)])):D(``,!0),l.value?(_(),i(`div`,{key:1,class:E([`preview-body`,{stale:!!u.value}]),title:`Links are disabled in the preview`,onClick:C,innerHTML:l.value},null,10,we)):!u.value&&!f.value?(_(),i(`p`,Te,`Nothing to preview yet.`)):D(``,!0)],64))],2))}},[[`__scopeId`,`data-v-11568657`]]),Oe={class:`label-row`},ke=[`for`,`title`],Ae={key:0,class:`required`},je=[`id`,`aria-invalid`],Me=[`value`],Ne=[`id`,`aria-invalid`,`placeholder`],Pe={key:0,class:`future-hint`},Fe={class:`code-source`},Ie=[`id`,`aria-invalid`,`placeholder`],Le={class:`future-hint`},Re=[`id`,`step`,`aria-invalid`],ze=[`id`,`aria-invalid`],Be=[`id`,`aria-invalid`],Ve=[`id`,`aria-invalid`],He={key:7,class:`field-description`},Ue={key:8,class:`field-error`},We=b({__name:`EditorField`,props:{field:Object,modelValue:[String,Number,null],error:[Array,null]},emits:[`update:modelValue`,`openMarkdown`],setup(e,{emit:t}){let n=e,a=t,o=c({get:()=>n.modelValue??``,set:e=>a(`update:modelValue`,e)}),l=c(()=>[`textarea`,`markdown`,`code`].includes(n.field.input_type)),u=c(()=>n.field.key===`page/content`),f=c(()=>n.field.code_language===`asd`),{layout:h}=_e(),g={asd:`Archsight Diagram`},v=c(()=>{let e=n.field.code_language||``;return g[e]||e.charAt(0).toUpperCase()+e.slice(1)}),b=c(()=>n.error&&n.error.length>0);return(t,n)=>(_(),i(`div`,{class:E([`field-group`,{"field-full-width":l.value}])},[d(`div`,Oe,[d(`label`,{for:e.field.key,title:e.field.description},[s(S(e.field.title)+` `,1),e.field.required?(_(),i(`span`,Ae,`*`)):D(``,!0)],8,ke),e.field.input_type===`markdown`?(_(),i(`button`,{key:0,type:`button`,class:`btn-edit-markdown`,title:`Open rich text editor`,onClick:n[0]||=n=>t.$emit(`openMarkdown`,e.field.key)},[...n[8]||=[d(`i`,{class:`iconoir-edit-pencil`},null,-1),s(` Edit `,-1)]])):D(``,!0)]),e.field.input_type===`select`?oe((_(),i(`select`,{key:0,id:e.field.key,"onUpdate:modelValue":n[1]||=e=>o.value=e,"aria-invalid":b.value?`true`:void 0},[n[9]||=d(`option`,{value:``},`Select...`,-1),(_(!0),i(p,null,y(e.field.options,e=>(_(),i(`option`,{key:e,value:e},S(e),9,Me))),128))],8,je)),[[r,o.value]]):e.field.input_type===`textarea`||e.field.input_type===`markdown`?(_(),i(`div`,{key:1,class:E([`markdown-field`,{"page-body":u.value}])},[oe(d(`textarea`,{id:e.field.key,"onUpdate:modelValue":n[2]||=e=>o.value=e,"aria-invalid":b.value?`true`:void 0,placeholder:e.field.input_type===`markdown`?`Enter markdown content...`:`One entry per line...`},null,8,Ne),[[te,o.value]]),e.field.input_type===`markdown`?(_(),i(`small`,Pe,[...n[10]||=[d(`i`,{class:`iconoir-info-circle`},null,-1),s(` Markdown, `,-1),d(`code`,null,`[[links]]`,-1),s(` and `,-1),d(`code`,null,"```asd",-1),s(` diagrams. Use Edit for the rich text editor `,-1)]])):D(``,!0)],2)):e.field.input_type===`code`?(_(),i(`div`,{key:2,class:E([`code-field`,f.value&&[`with-preview`,`layout-${x(h)}`]])},[d(`div`,Fe,[oe(d(`textarea`,{id:e.field.key,"onUpdate:modelValue":n[3]||=e=>o.value=e,"aria-invalid":b.value?`true`:void 0,placeholder:`Enter ${e.field.code_language||``} code...`,spellcheck:`false`},null,8,Ie),[[te,o.value]]),d(`small`,Le,[n[11]||=d(`i`,{class:`iconoir-code`},null,-1),s(` `+S(v.value)+` code `,1)])]),f.value?(_(),m(De,{key:0,class:`field-diagram-preview`,source:String(o.value)},null,8,[`source`])):D(``,!0)],2)):e.field.input_type===`number`?oe((_(),i(`input`,{key:3,id:e.field.key,type:`number`,"onUpdate:modelValue":n[4]||=e=>o.value=e,step:e.field.step,"aria-invalid":b.value?`true`:void 0},null,8,Re)),[[te,o.value]]):e.field.input_type===`url`?oe((_(),i(`input`,{key:4,id:e.field.key,type:`url`,"onUpdate:modelValue":n[5]||=e=>o.value=e,placeholder:`https://...`,"aria-invalid":b.value?`true`:void 0},null,8,ze)),[[te,o.value]]):e.field.input_type===`list`?oe((_(),i(`input`,{key:5,id:e.field.key,type:`text`,"onUpdate:modelValue":n[6]||=e=>o.value=e,placeholder:`Comma-separated values`,"aria-invalid":b.value?`true`:void 0},null,8,Be)),[[te,o.value]]):oe((_(),i(`input`,{key:6,id:e.field.key,type:`text`,"onUpdate:modelValue":n[7]||=e=>o.value=e,"aria-invalid":b.value?`true`:void 0},null,8,Ve)),[[te,o.value]]),e.field.description&&![`textarea`,`markdown`,`code`].includes(e.field.input_type)?(_(),i(`small`,He,S(e.field.description),1)):D(``,!0),b.value?(_(),i(`div`,Ue,S(e.error.join(`, `)),1)):D(``,!0)],2))}},[[`__scopeId`,`data-v-fe1221de`]]),Ge={class:`relations-editor`},Ke={key:0,class:`no-relations`},qe={id:`relations-list`},Je={class:`relation-text`},Ye=[`onClick`],Xe={class:`add-relation-row`},Ze=[`value`],Qe=[`value`],$e=b({__name:`EditorRelations`,props:{relations:Array,relationOptions:Array,instancesByKind:Object},emits:[`update:relations`],setup(e,{emit:t}){let n=e,a=t,o=T(``),l=T(``),u=c(()=>[...n.relations].sort((e,t)=>(e.verb+e.kind+e.name).localeCompare(t.verb+t.kind+t.name))),f=c(()=>o.value?n.relationOptions.find(e=>e.combo===o.value)?.target_kind:null),m=c(()=>f.value&&n.instancesByKind[f.value]||[]);se(o,()=>{l.value=``});function h(){if(!o.value||!l.value)return;let e=n.relationOptions.find(e=>e.combo===o.value);if(!e||n.relations.some(t=>t.verb===e.verb&&t.kind===e.target_kind&&t.name===l.value))return;let t=[...n.relations,{verb:e.verb,kind:e.target_kind,name:l.value}];a(`update:relations`,t),o.value=``,l.value=``}function g(e){let t=n.relations.filter((t,n)=>n!==e);a(`update:relations`,t)}return(t,n)=>(_(),i(`div`,Ge,[!e.relationOptions||e.relationOptions.length===0?(_(),i(`p`,Ke,` This resource type has no defined relations. `)):(_(),i(p,{key:1},[d(`div`,qe,[(_(!0),i(p,null,y(u.value,(e,t)=>(_(),i(`div`,{key:`${e.verb}:${e.kind}:${e.name}`,class:`relation-item`},[d(`span`,Je,[d(`strong`,null,S(e.verb),1),s(` → `+S(e.kind)+`: `,1),d(`em`,null,S(e.name),1)]),d(`button`,{class:`btn-remove`,type:`button`,title:`Remove`,onClick:e=>g(t)},[...n[2]||=[d(`i`,{class:`iconoir-xmark`},null,-1)]],8,Ye)]))),128))]),d(`div`,Xe,[oe(d(`select`,{"onUpdate:modelValue":n[0]||=e=>o.value=e},[n[3]||=d(`option`,{value:``},`Select relation...`,-1),(_(!0),i(p,null,y(e.relationOptions,e=>(_(),i(`option`,{key:e.combo,value:e.combo},S(e.verb)+` → `+S(e.target_kind),9,Ze))),128))],512),[[r,o.value]]),oe(d(`select`,{"onUpdate:modelValue":n[1]||=e=>l.value=e},[n[4]||=d(`option`,{value:``},`Select instance...`,-1),(_(!0),i(p,null,y(m.value,e=>(_(),i(`option`,{key:e,value:e},S(e),9,Qe))),128))],512),[[r,l.value]]),d(`button`,{class:`secondary btn-add`,type:`button`,onClick:h},[...n[5]||=[d(`i`,{class:`iconoir-plus`},null,-1),s(` Add `,-1)]])])],64))]))}},[[`__scopeId`,`data-v-a987a6fe`]]),et={class:`yaml-output-container`},tt={key:0,class:`conflict-error`},nt={class:`yaml-success`},rt={id:`yaml-content`},it={key:0,class:`yaml-file-info`},at={key:1,class:`yaml-instructions`},ot={class:`yaml-actions`},st=[`disabled`],ct=b({__name:`EditorYamlOutput`,props:{yaml:String,format:{type:String,default:`yaml`},kind:String,name:String,contentHash:String,pathRef:String,inlineEditEnabled:Boolean},emits:[`editAgain`],setup(e,{emit:t}){let n=e,r=T(null),o=T(`idle`),f=T(`idle`),m=T(null),h=c(()=>n.format===`markdown`),g=c(()=>h.value?`Markdown`:`YAML`),v=c(()=>h.value?`.md`:`.yaml`);l(()=>{r.value&&ce(r.value)}),se(()=>n.yaml,async()=>{await u(),r.value&&ce(r.value)});async function y(){try{await navigator.clipboard.writeText(n.yaml),o.value=`copied`,setTimeout(()=>{o.value=`idle`},2e3)}catch{let e=document.createElement(`textarea`);e.value=n.yaml,e.style.position=`fixed`,e.style.opacity=`0`,document.body.appendChild(e),e.select(),document.execCommand(`copy`),document.body.removeChild(e),o.value=`copied`,setTimeout(()=>{o.value=`idle`},2e3)}}async function b(){f.value=`saving`,m.value=null;try{let e=await a(n.kind,n.name,n.yaml,n.contentHash);e.success?(f.value=`saved`,setTimeout(()=>{f.value=`idle`},2e3)):e.conflict?(m.value=e.error,f.value=`idle`):(alert(`Save failed: `+e.error),f.value=`idle`)}catch(e){alert(`Save failed: `+e.message),f.value=`idle`}}return(t,n)=>(_(),i(`div`,et,[m.value?(_(),i(`div`,tt,[n[1]||=d(`i`,{class:`iconoir-warning-triangle`},null,-1),d(`span`,null,S(m.value),1)])):D(``,!0),d(`p`,nt,[n[2]||=d(`i`,{class:`iconoir-check-circle`},null,-1),s(` Generated `+S(g.value),1)]),d(`div`,{ref_key:`codeEl`,ref:r},[d(`pre`,rt,[d(`code`,{class:E(`language-${e.format}`)},S(e.yaml),3)])],512),d(`footer`,null,[e.pathRef?(_(),i(`p`,it,[n[3]||=d(`i`,{class:`iconoir-folder`},null,-1),d(`span`,null,`Source: `+S(e.pathRef),1)])):(_(),i(`p`,at,[n[10]||=d(`i`,{class:`iconoir-info-circle`},null,-1),d(`span`,null,[s(` Copy this `+S(g.value)+` and save it to a `,1),d(`code`,null,S(v.value),1),n[6]||=s(` file in your resources directory`,-1),h.value?(_(),i(p,{key:0},[n[4]||=s(` (named `,-1),d(`code`,null,S(e.name)+`.md`,1),n[5]||=s(`)`,-1)],64)):D(``,!0),n[7]||=s(`, `,-1),n[8]||=d(`br`,null,null,-1),n[9]||=s(`then reload the application. `,-1)])])),d(`div`,ot,[e.pathRef&&e.inlineEditEnabled?(_(),i(`button`,{key:0,type:`button`,onClick:b,disabled:f.value===`saving`,class:E({saved:f.value===`saved`})},[d(`i`,{class:E(f.value===`saving`?`iconoir-refresh`:f.value===`saved`?`iconoir-check`:`iconoir-check-circle`)},null,2),s(` `+S(f.value===`saving`?`Saving...`:f.value===`saved`?`Saved!`:`Save to File`),1)],10,st)):D(``,!0),d(`button`,{type:`button`,onClick:y,class:E({copied:o.value===`copied`})},[d(`i`,{class:E(o.value===`copied`?`iconoir-check`:`iconoir-copy`)},null,2),s(` `+S(o.value===`copied`?`Copied!`:`Copy to Clipboard`),1)],2),d(`button`,{class:`secondary`,type:`button`,onClick:n[0]||=e=>t.$emit(`editAgain`)},[...n[11]||=[d(`i`,{class:`iconoir-edit-pencil`},null,-1),s(` Edit Again `,-1)]])])])]))}},[[`__scopeId`,`data-v-b5ea938f`]]);function O(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function lt(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);n.search=r.toString(),console.warn(`Minified Lexical warning #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}var ut=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,dt=ut&&`documentMode`in document?document.documentMode:null,ft=ut&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),pt=ut&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),mt=!(!ut||!(`InputEvent`in window)||dt)&&`getTargetRanges`in new window.InputEvent(`input`),ht=ut&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),gt=ut&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,_t=ut&&/Android/.test(navigator.userAgent),vt=ut&&/^(?=.*Chrome).*/i.test(navigator.userAgent),yt=ut&&_t&&vt,bt=ut&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&ft&&!vt,xt=0,St=1,Ct=2,wt=1,Tt=2,Et=3,Dt=4,Ot=5,kt=6,At=ht||gt||bt?`\xA0`:``,jt=`
|
|
2
2
|
|
|
3
3
|
`,Mt=pt?`\xA0`:At,Nt=`֑-߿יִ-﷽ﹰ-ﻼ`,Pt=`A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--`,Ft=RegExp(`^[^`+Pt+`]*[`+Nt+`]`),It=RegExp(`^[^`+Nt+`]*[`+Pt+`]`),Lt={bold:1,capitalize:1024,code:16,highlight:128,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},Rt={directionless:1,unmergeable:2},zt={center:2,end:6,justify:4,left:1,right:3,start:5},Bt={[Tt]:`center`,[kt]:`end`,[Dt]:`justify`,[wt]:`left`,[Et]:`right`,[Ot]:`start`},Vt={normal:0,segmented:2,token:1},Ht={[xt]:`normal`,[Ct]:`segmented`,[St]:`token`},Ut=`$config`;function Wt(e,t,n,r,i,a){let o=e.getFirstChild();for(;o!==null;){let e=o.__key;o.__parent===t&&(B(o)&&Wt(o,e,n,r,i,a),n.has(e)||a.delete(e),i.push(e)),o=o.getNextSibling()}}var Gt=!1,Kt=0;function qt(e){Kt=e.timeStamp}function Jt(e,t,n){let r=e.nodeName===`BR`,i=t.__lexicalLineBreak;return i&&(e===i||r&&e.previousSibling===i)||r&&Xo(e,n)!==void 0}function Yt(e,t,n){let r=Ls(ks(n)),i=null,a=null;r!==null&&r.anchorNode===e&&(i=r.anchorOffset,a=r.focusOffset);let o=e.nodeValue;o!==null&&cs(t,o,i,a,!1)}function Xt(e,t,n){if(P(e)){let t=e.anchor.getNode();if(t.is(n)&&e.format!==t.getFormat())return!1}return zo(t)&&n.isAttached()}function Zt(e,t,n,r){for(let i=e;i&&!Qs(i);i=Cs(i)){let e=Xo(i,t);if(e!==void 0){let t=W(e,n);if(t)return V(t)||!J(i)?void 0:[i,t]}else if(i===r)return[r,es(n)]}}function Qt(e,t,n){Gt=!0;let r=performance.now()-Kt>100;try{io(e,()=>{let i=F()||function(e){return e.getEditorState().read(()=>{let e=F();return e===null?null:e.clone()})}(e),a=new Map,o=e.getRootElement(),s=e._editorState,c=e._blockCursorElement,l=!1,u=``;for(let n=0;n<t.length;n++){let d=t[n],f=d.type,p=d.target,m=Zt(p,e,s,o);if(!m)continue;let[h,g]=m;if(f===`characterData`)r&&N(g)&&zo(p)&&Xt(i,p,g)&&Yt(p,g,e);else if(f===`childList`){l=!0;let t=d.addedNodes;for(let n=0;n<t.length;n++){let r=t[n],i=Yo(r),a=r.parentNode;if(a!=null&&r!==c&&i===null&&!Jt(r,a,e)){if(pt){let e=(J(r)?r.innerText:null)||r.nodeValue;e&&(u+=e)}a.removeChild(r)}}let n=d.removedNodes,r=n.length;if(r>0){let t=0;for(let i=0;i<r;i++){let r=n[i];(Jt(r,p,e)||c===r)&&(p.appendChild(r),t++)}r!==t&&a.set(h,g)}}}if(a.size>0)for(let[t,n]of a)n.reconcileObservedMutation(t,e);let d=n.takeRecords();if(d.length>0){for(let t=0;t<d.length;t++){let n=d[t],r=n.addedNodes,i=n.target;for(let t=0;t<r.length;t++){let n=r[t],a=n.parentNode;a==null||n.nodeName!==`BR`||Jt(n,i,e)||a.removeChild(n)}}n.takeRecords()}i!==null&&(l&&ts(i),pt&&xs(e)&&i.insertRawText(u))})}finally{Gt=!1}}function $t(e){let t=e._observer;t!==null&&Qt(e,t.takeRecords(),t)}function en(e){(function(e){Kt===0&&ks(e).addEventListener(`textInput`,qt,!0)})(e),e._observer=new MutationObserver((t,n)=>{Qt(e,t,n)})}var tn=class{key;parse;unparse;isEqual;defaultValue;constructor(e,t){this.key=e,this.parse=t.parse.bind(t),this.unparse=(t.unparse||dn).bind(t),this.isEqual=(t.isEqual||Object.is).bind(t),this.defaultValue=this.parse(void 0)}};function nn(e,t){return new tn(e,t)}function rn(e,t,n=`latest`){let r=(n===`latest`?e.getLatest():e).__state;return r?r.getValue(t):t.defaultValue}function an(e,t,n){let r;if(R(),typeof n==`function`){let i=e.getLatest(),a=rn(i,t);if(r=n(a),t.isEqual(a,r))return i}else r=n;let i=e.getWritable();return cn(i).updateFromKnown(t,r),i}function on(e){let t=new Map,n=new Set;for(let r=typeof e==`function`?e:e.replace;r.prototype&&r.prototype.getType!==void 0;r=Object.getPrototypeOf(r)){let{ownNodeConfig:e}=ec(r);if(e&&e.stateConfigs)for(let r of e.stateConfigs){let e;`stateConfig`in r?(e=r.stateConfig,r.flat&&n.add(e.key)):e=r,t.set(e.key,e)}}return{flatKeys:n,sharedConfigMap:t}}var sn=class e{node;knownState;unknownState;sharedNodeState;size;constructor(e,t,n=void 0,r=new Map,i=void 0){this.node=e,this.sharedNodeState=t,this.unknownState=n,this.knownState=r;let{sharedConfigMap:a}=this.sharedNodeState,o=i===void 0?function(e,t,n){let r=n.size;if(t)for(let i in t){let t=e.get(i);t&&n.has(t)||r++}return r}(a,n,r):i;this.size=o}getValue(e){let t=this.knownState.get(e);if(t!==void 0)return t;this.sharedNodeState.sharedConfigMap.set(e.key,e);let n=e.defaultValue;if(this.unknownState&&e.key in this.unknownState){let t=this.unknownState[e.key];t!==void 0&&(n=e.parse(t)),this.updateFromKnown(e,n)}return n}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){let e={...this.unknownState},t={};for(let[t,n]of this.knownState)t.isEqual(n,t.defaultValue)?delete e[t.key]:e[t.key]=t.unparse(n);for(let n of this.sharedNodeState.flatKeys)n in e&&(t[n]=e[n],delete e[n]);return un(e)&&(t.$=e),t}getWritable(t){if(this.node===t)return this;let{sharedNodeState:n,unknownState:r}=this,i=new Map(this.knownState);return new e(t,n,function(e,t,n){let r;if(n)for(let[i,a]of Object.entries(n)){let n=e.get(i);n?t.has(n)||t.set(n,n.parse(a)):(r||={},r[i]=a)}return r}(n.sharedConfigMap,i,r),i,this.size)}updateFromKnown(e,t){let n=e.key;this.sharedNodeState.sharedConfigMap.set(n,e);let{knownState:r,unknownState:i}=this;r.has(e)||i&&n in i||(i&&(delete i[n],this.unknownState=un(i)),this.size++),r.set(e,t)}updateFromUnknown(e,t){let n=this.sharedNodeState.sharedConfigMap.get(e);n?this.updateFromKnown(n,n.parse(t)):(this.unknownState=this.unknownState||{},e in this.unknownState||this.size++,this.unknownState[e]=t)}updateFromJSON(e){let{knownState:t}=this;for(let e of t.keys())t.set(e,e.defaultValue);if(this.size=t.size,this.unknownState=void 0,e)for(let[t,n]of Object.entries(e))this.updateFromUnknown(t,n)}};function cn(e){let t=e.getWritable(),n=t.__state?t.__state.getWritable(t):new sn(t,ln(t));return t.__state=n,n}function ln(e){return e.__state?e.__state.sharedNodeState:Do(Gs(),e.getType()).sharedNodeState}function un(e){if(e)for(let t in e)return e}function dn(e){return e}function fn(e,t,n){for(let[r,i]of t.knownState){if(e.has(r.key))continue;e.add(r.key);let t=n?n.getValue(r):r.defaultValue;if(t!==i&&!r.isEqual(t,i))return!0}return!1}function pn(e,t,n){let{unknownState:r}=t,i=n?n.unknownState:void 0;if(r){for(let[t,n]of Object.entries(r))if(!e.has(t)&&(e.add(t),n!==(i?i[t]:void 0)))return!0}return!1}function mn(e,t){let n=e.__state;return n&&n.node===e?n.getWritable(t):n}function hn(e,t){let n=e.__mode,r=e.__format,i=e.__style,a=t.__mode,o=t.__format,s=t.__style,c=e.__state,l=t.__state;return(n===null||n===a)&&(r===null||r===o)&&(i===null||i===s)&&(e.__state===null||c===l||function(e,t){if(e===t)return!0;if(e&&t&&e.size!==t.size)return!1;let n=new Set;return!(e&&fn(n,e,t)||t&&fn(n,t,e)||e&&pn(n,e,t)||t&&pn(n,t,e))}(c,l))}function gn(e,t){let n=e.mergeWithSibling(t),r=z()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function _n(e){let t,n,r=e;if(r.__text!==``||!r.isSimpleText()||r.isUnmergeable()){for(;(t=r.getPreviousSibling())!==null&&N(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==``){if(hn(t,r)){r=gn(t,r);break}break}t.remove()}for(;(n=r.getNextSibling())!==null&&N(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(n.__text!==``){if(hn(r,n)){r=gn(r,n);break}break}n.remove()}}else r.remove()}function vn(e){return yn(e.anchor),yn(e.focus),e}function yn(e){for(;e.type===`element`;){let t=e.getNode(),n=e.offset,r,i;if(n===t.getChildrenSize()?(r=t.getChildAtIndex(n-1),i=!0):(r=t.getChildAtIndex(n),i=!1),N(r)){e.set(r.__key,i?r.getTextContentSize():0,`text`,!0);break}if(!B(r))break;e.set(r.__key,i?r.getChildrenSize():0,`element`,!0)}}var bn,xn,Sn,Cn,wn,Tn,En,Dn,On,kn,k=``,An=null,jn=null,Mn=!1,Nn=!1;function Pn(e,t){let n=En.get(e);if(t!==null){let n=Qn(e);n.parentNode===t&&t.removeChild(n)}if(Dn.has(e)||xn._keyToDOMMap.delete(e),B(n)){let e=Kn(n,En);Fn(e,0,e.length-1,null)}n!==void 0&&vs(kn,Sn,Cn,n,`destroyed`)}function Fn(e,t,n,r){for(let i=t;i<=n;++i){let t=e[i];t!==void 0&&Pn(t,r)}}function In(e,t){e.setProperty(`text-align`,t)}var Ln=`40px`;function Rn(e,t){let n=bn.theme.indent;if(typeof n==`string`){let r=e.classList.contains(n);t>0&&!r?e.classList.add(n):t<1&&r&&e.classList.remove(n)}if(t===0)return void e.style.setProperty(`padding-inline-start`,``);let r=getComputedStyle(xn._rootElement||e).getPropertyValue(`--lexical-indent-base-value`)||Ln;e.style.setProperty(`padding-inline-start`,`calc(${t} * ${r})`)}function zn(e,t){let n=e.style;t===0?In(n,``):t===1?In(n,`left`):t===2?In(n,`center`):t===3?In(n,`right`):t===4?In(n,`justify`):t===5?In(n,`start`):t===6&&In(n,`end`)}function Bn(e,t){let n=function(e){let t=e.__dir;if(t!==null)return t;if(H(e))return null;let n=e.getParentOrThrow();return H(n)&&n.__dir===null?`auto`:null}(t);n===null?e.removeAttribute(`dir`):e.dir=n}function Vn(e,t){let n=Dn.get(e);n===void 0&&O(60);let r=n.createDOM(bn,xn);if(function(e,t,n){let r=n._keyToDOMMap;(function(e,t,n){let r=`__lexicalKey_${t._key}`;e[r]=n})(t,n,e),r.set(e,t)}(e,r,xn),N(n)?r.setAttribute(`data-lexical-text`,`true`):V(n)&&r.setAttribute(`data-lexical-decorator`,`true`),B(n)){let e=n.__indent,t=n.__size;if(Bn(r,n),e!==0&&Rn(r,e),t!==0){let e=t-1;Hn(Kn(n,Dn),n,0,e,n.getDOMSlot(r))}let i=n.__format;i!==0&&zn(r,i),n.isInline()||Wn(null,n,r)}else{let t=n.getTextContent();if(V(n)){let t=n.decorate(xn,bn);t!==null&&Jn(e,t),r.contentEditable=`false`}k+=t}return t!==null&&t.insertChild(r),vs(kn,Sn,Cn,n,`created`),r}function Hn(e,t,n,r,i){let a=k;k=``;let o=n;for(;o<=r;++o){Vn(e[o],i);let t=Dn.get(e[o]);t!==null&&N(t)?An===null&&(An=t.getFormat(),jn=t.getStyle()):B(t)&&o<r&&!t.isInline()&&(k+=jt)}i.element.__lexicalTextContent=k,k=a+k}function Un(e,t){if(e){let n=e.__last;if(n){let e=t.get(n);if(e)return j(e)?`line-break`:V(e)&&e.isInline()?`decorator`:null}return`empty`}return null}function Wn(e,t,n){let r=Un(e,En),i=Un(t,Dn);r!==i&&t.getDOMSlot(n).setManagedLineBreak(i)}function Gn(e,t,n){var r;An=null,jn=null,function(e,t,n){let r=k,i=e.__size,a=t.__size;k=``;let o=n.element;if(i===1&&a===1){let n=e.__first,r=t.__first;if(n===r)qn(n,o);else{let e=Qn(n),t=Vn(r,null);try{o.replaceChild(t,e)}catch(i){if(typeof i==`object`&&i){let a=`${i.toString()} Parent: ${o.tagName}, new child: {tag: ${t.tagName} key: ${r}}, old child: {tag: ${e.tagName}, key: ${n}}.`;throw Error(a)}throw i}Pn(n,null)}let i=Dn.get(r);N(i)&&An===null&&(An=i.getFormat(),jn=i.getStyle())}else{let r=Kn(e,En),s=Kn(t,Dn);if(r.length!==i&&O(227),s.length!==a&&O(228),i===0)a!==0&&Hn(s,0,0,a-1,n);else if(a===0){if(i!==0){let e=n.after==null&&n.before==null&&n.element.__lexicalLineBreak==null;Fn(r,0,i-1,e?null:o),e&&(o.textContent=``)}}else(function(e,t,n,r,i,a){let o=r-1,s=i-1,c,l,u=a.getFirstChild(),d=0,f=0;for(;d<=o&&f<=s;){let e=t[d],r=n[f];if(e===r)u=Yn(qn(r,a.element)),d++,f++;else{if(l===void 0&&(l=Xn(n,f)),c===void 0)c=Xn(t,d);else if(!c.has(e)){d++;continue}if(!l.has(e)){u=Yn(Qn(e)),Pn(e,a.element),d++,c.delete(e);continue}if(c.has(r)){let e=Ss(xn,r);e!==u&&a.withBefore(u).insertChild(e),u=Yn(qn(r,a.element)),d++,f++}else Vn(r,a.withBefore(u)),f++}let i=Dn.get(r);i!==null&&N(i)?An===null&&(An=i.getFormat(),jn=i.getStyle()):B(i)&&f<=s&&!i.isInline()&&(k+=jt)}let p=d>o,m=f>s;if(p&&!m){let e=n[s+1],t=e===void 0?null:xn.getElementByKey(e);Hn(n,0,f,s,a.withBefore(t))}else m&&!p&&Fn(t,d,o,a.element)})(0,r,s,i,a,n)}o.__lexicalTextContent=k,k=r+k}(e,t,t.getDOMSlot(n)),r=t,An==null||An===r.__textFormat||Nn||r.setTextFormat(An),function(e){jn==null||jn===e.__textStyle||Nn||e.setTextStyle(jn)}(t)}function Kn(e,t){let n=[],r=e.__first;for(;r!==null;){let e=t.get(r);e===void 0&&O(101),n.push(r),r=e.__next}return n}function qn(e,t){let n=En.get(e),r=Dn.get(e);n!==void 0&&r!==void 0||O(61);let i=Mn||Tn.has(e)||wn.has(e),a=Ss(xn,e);if(n===r&&!i){let e;if(B(n)){let t=a.__lexicalTextContent;typeof t==`string`?e=t:(e=n.getTextContent(),a.__lexicalTextContent=e)}else e=n.getTextContent();return k+=e,a}if(n!==r&&i&&vs(kn,Sn,Cn,r,`updated`),r.updateDOM(n,a,bn)){let n=Vn(e,null);return t===null&&O(62),t.replaceChild(n,a),Pn(e,null),n}if(B(n)){B(r)||O(334,e);let t=r.__indent;(Mn||t!==n.__indent)&&Rn(a,t);let o=r.__format;if((Mn||o!==n.__format)&&zn(a,o),i)Gn(n,r,a),H(r)||r.isInline()||Wn(n,r,a);else{let e=a.__lexicalTextContent,t;typeof e==`string`?t=e:(t=n.getTextContent(),a.__lexicalTextContent=t),k+=t}if((Mn||r.__dir!==n.__dir)&&(Bn(a,r),H(r)&&!Mn))for(let e of r.getChildren())B(e)&&Bn(Ss(xn,e.getKey()),e)}else{let t=r.getTextContent();if(V(r)){let t=r.decorate(xn,bn);t!==null&&Jn(e,t)}k+=t}if(!Nn&&H(r)&&r.__cachedText!==k){let e=r.getWritable();e.__cachedText=k,r=e}return a}function Jn(e,t){let n=xn._pendingDecorators,r=xn._decorators;if(n===null){if(r[e]===t)return;n=Qo(xn)}n[e]=t}function Yn(e){let t=e.nextSibling;return t!==null&&t===xn._blockCursorElement&&(t=t.nextSibling),t}function Xn(e,t){let n=new Set;for(let r=t;r<e.length;r++)n.add(e[r]);return n}function Zn(e,t,n,r,i,a){k=``,Mn=r===2,xn=n,bn=n._config,Sn=n._nodes,Cn=xn._listeners.mutation,wn=i,Tn=a,En=e._nodeMap,Dn=t._nodeMap,Nn=t._readOnly,On=new Map(n._keyToDOMMap);let o=new Map;return kn=o,qn(`root`,null),xn=void 0,Sn=void 0,wn=void 0,Tn=void 0,En=void 0,Dn=void 0,bn=void 0,On=void 0,kn=void 0,o}function Qn(e){let t=On.get(e);return t===void 0&&O(75,e),t}function A(e){return{type:e}}var $n=A(`SELECTION_CHANGE_COMMAND`),er=A(`SELECTION_INSERT_CLIPBOARD_NODES_COMMAND`),tr=A(`CLICK_COMMAND`),nr=A(`BEFORE_INPUT_COMMAND`),rr=A(`INPUT_COMMAND`),ir=A(`COMPOSITION_START_COMMAND`),ar=A(`COMPOSITION_END_COMMAND`),or=A(`DELETE_CHARACTER_COMMAND`),sr=A(`INSERT_LINE_BREAK_COMMAND`),cr=A(`INSERT_PARAGRAPH_COMMAND`),lr=A(`CONTROLLED_TEXT_INSERTION_COMMAND`),ur=A(`PASTE_COMMAND`),dr=A(`REMOVE_TEXT_COMMAND`),fr=A(`DELETE_WORD_COMMAND`),pr=A(`DELETE_LINE_COMMAND`),mr=A(`FORMAT_TEXT_COMMAND`),hr=A(`UNDO_COMMAND`),gr=A(`REDO_COMMAND`),_r=A(`KEYDOWN_COMMAND`),vr=A(`KEY_ARROW_RIGHT_COMMAND`),yr=A(`MOVE_TO_END`),br=A(`KEY_ARROW_LEFT_COMMAND`),xr=A(`MOVE_TO_START`),Sr=A(`KEY_ARROW_UP_COMMAND`),Cr=A(`KEY_ARROW_DOWN_COMMAND`),wr=A(`KEY_ENTER_COMMAND`),Tr=A(`KEY_SPACE_COMMAND`),Er=A(`KEY_BACKSPACE_COMMAND`),Dr=A(`KEY_ESCAPE_COMMAND`),Or=A(`KEY_DELETE_COMMAND`),kr=A(`KEY_TAB_COMMAND`),Ar=A(`INSERT_TAB_COMMAND`),jr=A(`INDENT_CONTENT_COMMAND`),Mr=A(`OUTDENT_CONTENT_COMMAND`),Nr=A(`DROP_COMMAND`),Pr=A(`FORMAT_ELEMENT_COMMAND`),Fr=A(`DRAGSTART_COMMAND`),Ir=A(`DRAGOVER_COMMAND`),Lr=A(`DRAGEND_COMMAND`),Rr=A(`COPY_COMMAND`),zr=A(`CUT_COMMAND`),Br=A(`SELECT_ALL_COMMAND`),Vr=A(`CLEAR_EDITOR_COMMAND`),Hr=A(`CLEAR_HISTORY_COMMAND`),Ur=A(`CAN_REDO_COMMAND`),Wr=A(`CAN_UNDO_COMMAND`),Gr=A(`FOCUS_COMMAND`),Kr=A(`BLUR_COMMAND`),qr=A(`KEY_MODIFIER_COMMAND`),Jr=Object.freeze({}),Yr=[[`keydown`,function(e,t){Xr=e.timeStamp,Zr=e.key,!t.isComposing()&&q(t,_r,e)}],[`pointerdown`,function(e,t){let n=e.target,r=e.pointerType;Bs(n)&&r!==`touch`&&r!==`pen`&&e.button===0&&io(t,()=>{Ao(n)||(ri=!0)})}],[`compositionstart`,function(e,t){q(t,ir,e)}],[`compositionend`,function(e,t){pt?ai=!0:gt||!ht&&!bt?q(t,ar,e):(oi=!0,si=e.data)}],[`input`,function(e,t){e.stopPropagation(),io(t,()=>{t.dispatchCommand(rr,e)},{event:e}),$r=null}],[`click`,function(e,t){io(t,()=>{let n=F(),r=Ls(ks(t)),i=Da();if(r){if(P(n)){let t=n.anchor,a=t.getNode();if(t.type===`element`&&t.offset===0&&n.isCollapsed()&&!H(a)&&G().getChildrenSize()===1&&a.getTopLevelElementOrThrow().isEmpty()&&i!==null&&n.is(i))r.removeAllRanges(),n.dirty=!0;else if(e.detail===3&&!n.isCollapsed()&&a!==n.focus.getNode()){let e=nc(a,e=>B(e)&&!e.isInline());B(e)&&e.select(0)}}else if(e.pointerType===`touch`||e.pointerType===`pen`){let n=r.anchorNode;(J(n)||zo(n))&&ts(Ea(i,r,t,e))}}q(t,tr,e)})}],[`cut`,Jr],[`copy`,Jr],[`dragstart`,Jr],[`dragover`,Jr],[`dragend`,Jr],[`paste`,Jr],[`focus`,Jr],[`blur`,Jr],[`drop`,Jr]];mt&&Yr.push([`beforeinput`,(e,t)=>function(e,t){let n=e.inputType;n===`deleteCompositionText`||pt&&xs(t)||n!==`insertCompositionText`&&q(t,nr,e)}(e,t)]);var Xr=0,Zr=null,Qr=0,$r=null,ei=new WeakMap,ti=new WeakMap,ni=!1,ri=!1,ii=!1,ai=!1,oi=!1,si=``,ci=null,li=[0,``,0,`root`,0];function ui(e,t,n,r,i){let a=e.anchor,o=e.focus,s=a.getNode(),c=z(),l=Ls(ks(c)),u=l===null?null:l.anchorNode,d=a.key,f=c.getElementByKey(d),p=n.length;return d!==o.key||!N(s)||(!i&&(!mt||Qr<r+50)||s.isDirty()&&p<2||rs(n))&&a.offset!==o.offset&&!s.isComposing()||Ro(s)||s.isDirty()&&p>1||(i||!mt)&&f!==null&&!s.isComposing()&&u!==Vo(f)||l!==null&&t!==null&&(!t.collapsed||t.startContainer!==l.anchorNode||t.startOffset!==l.anchorOffset)||!s.isComposing()&&(s.getFormat()!==e.format||s.getStyle()!==e.style)||function(e,t){if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;let n=e.anchor.offset,r=t.getParentOrThrow(),i=Lo(t);return n===0?!t.canInsertTextBefore()||!r.canInsertTextBefore()&&!t.isComposing()||i||function(e){let t=e.getPreviousSibling();return(N(t)||B(t)&&t.isInline())&&!t.canInsertTextAfter()}(t):n===t.getTextContentSize()&&(!t.canInsertTextAfter()||!r.canInsertTextAfter()&&!t.isComposing()||i)}(e,s)}function di(e,t){return zo(e)&&e.nodeValue!==null&&t!==0&&t!==e.nodeValue.length}function fi(e,t,n){let{anchorNode:r,anchorOffset:i,focusNode:a,focusOffset:o}=e;ni&&(ni=!1,di(r,i)&&di(a,o)&&!ci)||io(t,()=>{if(!n)return void ts(null);if(!Mo(t,r,a))return;let s=F();if(ci&&P(s)&&s.isCollapsed()){let e=s.anchor,t=ci.anchor;(e.key===t.key&&e.offset===t.offset+1||e.offset===1&&t.getNode().is(e.getNode().getPreviousSibling()))&&(s=ci.clone(),ts(s))}if(ci=null,P(s)){let n=s.anchor,r=n.getNode();if(s.isCollapsed()){e.type===`Range`&&e.anchorNode===e.focusNode&&(s.dirty=!0);let i=ks(t).event,a=i?i.timeStamp:performance.now(),[o,c,l,u,d]=li,f=G(),p=!1===t.isComposing()&&f.getTextContent()===``;if(a<d+200&&n.offset===l&&n.key===u)pi(s,o,c);else if(n.type===`text`)N(r)||O(141),mi(s,r);else if(n.type===`element`&&!p){B(r)||O(259);let e=n.getNode();e.isEmpty()?function(e,t){pi(e,t.getTextFormat(),t.getTextStyle())}(s,e):pi(s,0,``)}}else{let e=n.key,t=s.focus.key,r=s.getNodes(),a=r.length,c=s.isBackward(),l=c?o:i,u=c?i:o,d=c?t:e,f=c?e:t,p=2047,m=!1;for(let e=0;e<a;e++){let t=r[e],n=t.getTextContentSize();if(N(t)&&n!==0&&!(e===0&&t.__key===d&&l===n||e===a-1&&t.__key===f&&u===0)&&(m=!0,p&=t.getFormat(),p===0))break}s.format=m?p:0}}q(t,$n,void 0)})}function pi(e,t,n){e.format===t&&e.style===n||(e.format=t,e.style=n,e.dirty=!0)}function mi(e,t){pi(e,t.getFormat(),t.getStyle())}function hi(e){if(!e.getTargetRanges)return null;let t=e.getTargetRanges();return t.length===0?null:t[0]}function gi(e){let t=e.inputType,n=hi(e),r=z(),i=F();if(t===`deleteContentBackward`){if(i===null){let e=Da();if(!P(e))return!0;ts(e.clone())}if(P(i)){let t=i.anchor.key===i.focus.key;if(a=e.timeStamp,Zr===`MediaLast`&&a<Xr+30&&r.isComposing()&&t){if(qo(null),Xr=0,setTimeout(()=>{io(r,()=>{qo(null)})},30),P(i)){let e=i.anchor.getNode();e.markDirty(),N(e)||O(142),mi(i,e)}}else{qo(null),e.preventDefault();let n=i.anchor.getNode(),a=n.getTextContent(),o=n.canInsertTextAfter(),s=i.anchor.offset===0&&i.focus.offset===a.length,c=yt&&t&&!s&&o;if(c&&i.isCollapsed()&&(c=!V(bs(i.anchor,!0))),!c){q(r,or,!0);let e=F();yt&&P(e)&&e.isCollapsed()&&(ci=e,setTimeout(()=>ci=null))}}return!0}}var a;if(!P(i))return!0;let o=e.data;$r!==null&&ss(!1,r,$r),i.dirty&&$r===null||!i.isCollapsed()||H(i.anchor.getNode())||n===null||i.applyDOMRange(n),$r=null;let s=i.anchor,c=i.focus,l=s.getNode(),u=c.getNode();if(t===`insertText`||t===`insertTranspose`){if(o===`
|
|
4
4
|
`)e.preventDefault(),q(r,sr,!1);else if(o===jt)e.preventDefault(),q(r,cr,void 0);else if(o==null&&e.dataTransfer){let t=e.dataTransfer.getData(`text/plain`);e.preventDefault(),i.insertRawText(t)}else o!=null&&ui(i,n,o,e.timeStamp,!0)?(e.preventDefault(),q(r,lr,o)):$r=o;return Qr=e.timeStamp,!0}switch(e.preventDefault(),t){case`insertFromYank`:case`insertFromDrop`:case`insertReplacementText`:q(r,lr,e);break;case`insertFromComposition`:qo(null),q(r,lr,e);break;case`insertLineBreak`:qo(null),q(r,sr,!1);break;case`insertParagraph`:qo(null),ii&&!gt?(ii=!1,q(r,sr,!1)):q(r,cr,void 0);break;case`insertFromPaste`:case`insertFromPasteAsQuotation`:q(r,ur,e);break;case`deleteByComposition`:(function(e,t){return e!==t||B(e)||B(t)||!Lo(e)||!Lo(t)})(l,u)&&q(r,dr,e);break;case`deleteByDrag`:case`deleteByCut`:q(r,dr,e);break;case`deleteContent`:q(r,or,!1);break;case`deleteWordBackward`:q(r,fr,!0);break;case`deleteWordForward`:q(r,fr,!1);break;case`deleteHardLineBackward`:case`deleteSoftLineBackward`:q(r,pr,!0);break;case`deleteContentForward`:case`deleteHardLineForward`:case`deleteSoftLineForward`:q(r,pr,!1);break;case`formatStrikeThrough`:q(r,mr,`strikethrough`);break;case`formatBold`:q(r,mr,`bold`);break;case`formatItalic`:q(r,mr,`italic`);break;case`formatUnderline`:q(r,mr,`underline`);break;case`historyUndo`:q(r,hr,void 0);break;case`historyRedo`:q(r,gr,void 0)}return!0}function _i(e){if(J(e.target)&&Ao(e.target))return!0;let t=z(),n=F(),r=e.data,i=hi(e);if(r!=null&&P(n)&&ui(n,i,r,e.timeStamp,!1)){ai&&=(bi(t,r),!1);let i=n.anchor.getNode(),a=Ls(ks(t));if(a===null)return!0;let o=n.isBackward(),s=o?n.anchor.offset:n.focus.offset,c=o?n.focus.offset:n.anchor.offset;mt&&!n.isCollapsed()&&N(i)&&a.anchorNode!==null&&i.getTextContent().slice(0,s)+r+i.getTextContent().slice(s+c)===os(a.anchorNode)||q(t,lr,r);let l=r.length;pt&&l>1&&e.inputType===`insertCompositionText`&&!t.isComposing()&&(n.anchor.offset-=l),yt&&t.isComposing()&&(Xr=0,qo(null))}else ss(!1,t,r===null?void 0:r),ai&&=(bi(t,r||void 0),!1);return function(){R(),$t(z())}(),!0}function vi(e){let t=z(),n=F();if(P(n)&&!t.isComposing()){let r=n.anchor,i=n.anchor.getNode();qo(r.key),Ts(Fi),(e.timeStamp<Xr+30||r.type===`element`||!n.isCollapsed()||i.getFormat()!==n.format||N(i)&&i.getStyle()!==n.style)&&q(t,lr,Mt)}return!0}function yi(e){return bi(z(),e.data),Ts(Ii),!0}function bi(e,t){let n=e._compositionKey;if(qo(null),n!==null&&t!=null){if(t===``){let t=W(n),r=Vo(e.getElementByKey(n));if(r!==null&&r.nodeValue!==null&&N(t)){let n=Ls(ks(e)),i=null,a=null;n!==null&&n.anchorNode===r&&(i=n.anchorOffset,a=n.focusOffset),cs(t,r.nodeValue,i,a,!0)}return}if(t[t.length-1]===`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{$ as e,B as t,H as n,I as r,L as i,N as a,O as o,P as s,U as c,X as l,Z as u,a as d,ct as f,k as p,nt as m,ot as h,w as g,z as _}from"./index-
|
|
1
|
+
import{$ as e,B as t,H as n,I as r,L as i,N as a,O as o,P as s,U as c,X as l,Z as u,a as d,ct as f,k as p,nt as m,ot as h,w as g,z as _}from"./index-DlL2S_4s.js";var v={key:0},y={class:`error-header`},b={class:`error-message`},x={class:`error-location`},S={class:`error-line-badge`},C={key:0,class:`error-code-block`},w={class:`line-number`},T={key:1},E=d({__name:`ErrorPage`,setup(d){let E=o(),D=p(),O=r(()=>{try{return E.query.data?JSON.parse(E.query.data):null}catch{return null}});async function k(){let e=await g();e.error?D.replace({name:`error`,query:{data:JSON.stringify(e.error)}}):(D.push(`/`),window.location.reload())}return(r,o)=>{let d=e(`router-link`);return O.value?(l(),t(`div`,v,[i(`header`,null,[i(`article`,y,[o[1]||=i(`h3`,null,[i(`i`,{class:`iconoir-warning-triangle`}),n(` Error `)],-1),i(`p`,b,f(O.value.error),1),i(`p`,x,[o[0]||=i(`i`,{class:`iconoir-page`},null,-1),n(` `+f(O.value.path)+` `,1),i(`span`,S,`Line `+f(O.value.line_no),1)])]),i(`a`,{href:`#`,class:`reload-btn`,onClick:a(k,[`prevent`])},[...o[2]||=[i(`i`,{class:`iconoir-refresh`},null,-1),n(` Reload `,-1)]])]),O.value.context?(l(),t(`div`,C,[i(`pre`,null,[i(`code`,null,[(l(!0),t(s,null,u(O.value.context,e=>(l(),t(`span`,{key:e.line_no,class:h(e.selected?`error-line`:`code-line`)},[i(`span`,w,f(String(e.line_no).padStart(4,` `)),1),n(f(e.content)+`
|
|
2
2
|
`,1)],2))),128))])])])):_(``,!0)])):(l(),t(`div`,T,[o[4]||=i(`p`,null,`No error data available.`,-1),c(d,{to:`/`},{default:m(()=>[...o[3]||=[n(`Back to home`,-1)]]),_:1})]))}}},[[`__scopeId`,`data-v-cb96d9d5`]]);export{E as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as e,J as t,K as n,L as r,X as i,Y as a,a as o,g as s,it as c}from"./index-
|
|
1
|
+
import{B as e,J as t,K as n,L as r,X as i,Y as a,a as o,g as s,it as c}from"./index-DlL2S_4s.js";import{t as l}from"./useGraphviz-DFlxVG1U.js";import{t as u}from"./usePanZoom-RxoG4Zu7.js";var d={key:0,class:`graph-loading`,"aria-busy":`true`},f={key:1,class:`graph-container graph-expand`},p=[`innerHTML`],m=o({__name:`GraphView`,setup(o){let m=c(``),h=c(!0),g=c(null),_=null;t(async()=>{let e=await s();m.value=e?await l(e):``,h.value=!1,await n(),v()}),a(()=>{_?.destroy()});function v(){if(!g.value)return;let e=g.value.querySelector(`svg`);e&&(_=u(e,g.value))}return(t,n)=>(i(),e(`article`,null,[n[0]||=r(`header`,null,[r(`h2`,null,`Architecture Overview`)],-1),h.value?(i(),e(`p`,d,`Laying out graph...`)):(i(),e(`div`,f,[r(`div`,{id:`graphviz`,ref_key:`graphEl`,ref:g,class:`fullcanvas`,innerHTML:m.value},null,8,p)]))]))}},[[`__scopeId`,`data-v-cb6fbf12`]]);export{m as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["vue/GraphView-
|
|
2
|
-
import{M as e}from"./mermaid-C3bOamfn.js";import{B as t,G as n,I as r,L as i,R as a,W as o,X as s,at as c}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["vue/GraphView-6EzYwP8T.js","vue/index-DlL2S_4s.js","vue/mermaid-C3bOamfn.js","vue/rolldown-runtime-COiEfhsA.js","vue/index-BP-NH0dn.css","vue/useGraphviz-DFlxVG1U.js","vue/usePanZoom-RxoG4Zu7.js","vue/GraphView-B_EJRCcO.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{M as e}from"./mermaid-C3bOamfn.js";import{B as t,G as n,I as r,L as i,R as a,W as o,X as s,at as c}from"./index-DlL2S_4s.js";import{n as l}from"./PageView-AdolhVA0.js";var u={key:2},d={__name:`HomePage`,setup(d){let f=o(()=>e(()=>import(`./GraphView-6EzYwP8T.js`),__vite__mapDeps([0,1,2,3,4,5,6,7]))),p=n(`pages`,null),m=n(`pageHome`,null),h=r(()=>p?.value!=null),g=r(()=>m?.value);return(e,n)=>g.value?(s(),a(l,{key:0,name:g.value.name},null,8,[`name`])):h.value?(s(),a(c(f),{key:1})):(s(),t(`article`,u,[...n[0]||=[i(`p`,null,`Loading...`,-1)]]))}};export{d as default};
|