@astl/astrolabe 0.1.0 → 0.1.2

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.
Files changed (27) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/cdn/astrolabe-editor.js +55 -19
  3. package/dist/cdn/astrolabe-editor.js.map +1 -1
  4. package/dist/cdn/astrolabe.standalone.js +74 -20
  5. package/dist/cdn/chunks/{help-form-DaC6KaFG.js → help-form-CDg3TCwI.js} +2 -2
  6. package/dist/cdn/chunks/{help-form-DaC6KaFG.js.map → help-form-CDg3TCwI.js.map} +1 -1
  7. package/dist/cdn/chunks/{insert-menu-LgrifBYT.js → insert-menu-7vANVmTK.js} +2 -2
  8. package/dist/cdn/chunks/{insert-menu-LgrifBYT.js.map → insert-menu-7vANVmTK.js.map} +1 -1
  9. package/dist/cdn/chunks/{issue-list-BgnXzXRM.js → issue-list-BT9qvnZU.js} +2 -2
  10. package/dist/cdn/chunks/{issue-list-BgnXzXRM.js.map → issue-list-BT9qvnZU.js.map} +1 -1
  11. package/dist/cdn/chunks/messages-D1aJfyS_.js +2 -0
  12. package/dist/cdn/chunks/messages-D1aJfyS_.js.map +1 -0
  13. package/dist/cdn/chunks/{source-view-DXKPFCl9.js → source-view-CZVxgTNQ.js} +2 -2
  14. package/dist/cdn/chunks/{source-view-DXKPFCl9.js.map → source-view-CZVxgTNQ.js.map} +1 -1
  15. package/dist/cdn/chunks/{style-form-D5haJtWM.js → style-form-DUGbG_kL.js} +2 -2
  16. package/dist/cdn/chunks/{style-form-D5haJtWM.js.map → style-form-DUGbG_kL.js.map} +1 -1
  17. package/dist/cdn/chunks/{style-messages-BbZpeD2a.js → style-messages-qdf3pZbT.js} +2 -2
  18. package/dist/cdn/chunks/{style-messages-BbZpeD2a.js.map → style-messages-qdf3pZbT.js.map} +1 -1
  19. package/dist/cdn/chunks/{style-rules-D45PZLCv.js → style-rules-D17QGzXk.js} +2 -2
  20. package/dist/cdn/chunks/{style-rules-D45PZLCv.js.map → style-rules-D17QGzXk.js.map} +1 -1
  21. package/dist/cdn/chunks/{styles-DxJJxVNH.js → styles-CdJT6Pp9.js} +2 -2
  22. package/dist/cdn/chunks/{styles-DxJJxVNH.js.map → styles-CdJT6Pp9.js.map} +1 -1
  23. package/dist/cdn/chunks/{surface-CgxfAwCR.js → surface-C6wtQkTY.js} +21 -3
  24. package/dist/cdn/chunks/{surface-CgxfAwCR.js.map → surface-C6wtQkTY.js.map} +1 -1
  25. package/package.json +22 -10
  26. package/dist/cdn/chunks/messages-9xiYDvRT.js +0 -2
  27. package/dist/cdn/chunks/messages-9xiYDvRT.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # @astl/astrolabe
2
2
 
3
+ ## 0.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [8b65594]
8
+ - Updated dependencies [8b65594]
9
+ - Updated dependencies [8b65594]
10
+ - @astl/editor@0.1.2
11
+ - @astl/editor-tiptap@0.1.2
12
+ - @astl/core@0.1.2
13
+ - @astl/components@0.1.2
14
+ - @astl/engine@0.1.2
15
+ - @astl/player@0.1.2
16
+ - @astl/server@0.1.2
17
+ - @astl/tokens@0.1.2
18
+
19
+ ## 0.1.1
20
+
21
+ ### Patch Changes
22
+
23
+ - 2f8247b: Shorter npm description for @astl/astrolabe and keywords for all packages.
24
+ - Updated dependencies [2f8247b]
25
+ - @astl/components@0.1.1
26
+ - @astl/core@0.1.1
27
+ - @astl/editor@0.1.1
28
+ - @astl/editor-tiptap@0.1.1
29
+ - @astl/engine@0.1.1
30
+ - @astl/player@0.1.1
31
+ - @astl/server@0.1.1
32
+ - @astl/tokens@0.1.1
33
+
3
34
  ## 0.1.0
4
35
 
5
36
  ### Minor Changes
@@ -1,4 +1,4 @@
1
- import{S as e,_ as t,a as n,b as r,c as i,d as a,f as o,g as s,h as c,i as l,l as u,m as d,n as f,o as p,p as m,r as ee,s as te,t as h,u as ne,v as re,w as ie,x as ae,y as oe}from"./chunks/definitions-CNX90WtL.js";import{$ as se,$t as ce,A as le,At as ue,B as de,Bt as fe,C as g,Ct as pe,D as me,Dt as he,E as _,Et as ge,F as _e,Ft as ve,G as ye,Gt as be,H as xe,Ht as Se,I as Ce,It as we,J as Te,Jt as Ee,K as v,Kt as De,L as Oe,Lt as ke,M as y,Mt as Ae,N as je,Nt as Me,O as Ne,Ot as Pe,P as Fe,Pt as b,Q as Ie,Qt as Le,R as Re,Rt as ze,Sn as Be,St as Ve,T as x,Tt as He,U as Ue,Ut as We,V as Ge,Vt as Ke,W as qe,Wt as Je,X as Ye,Xt as Xe,Y as Ze,Yt as Qe,Z as $e,Zt as et,_n as tt,_t as nt,a as rt,an as it,at,b as S,bn as ot,bt as st,cn as ct,ct as lt,dn as ut,dt,en as ft,et as pt,fn as mt,ft as ht,gn as gt,gt as _t,hn as vt,ht as yt,in as bt,it as xt,j as St,jt as C,k as Ct,kt as wt,ln as Tt,lt as Et,mn as Dt,mt as Ot,nn as kt,nt as At,on as jt,ot as Mt,pn as Nt,pt as Pt,q as Ft,qt as It,rn as Lt,rt as Rt,sn as zt,st as Bt,tn as Vt,tt as Ht,un as Ut,ut as Wt,v as w,vn as Gt,vt as Kt,wt as qt,xn as Jt,xt as Yt,y as Xt,yn as Zt,yt as Qt,z as $t,zt as en}from"./chunks/runtime-DxAbpr3S.js";import{r as tn}from"./chunks/audio-manifest-B9FWQzRy.js";import{r as nn}from"./chunks/callout-manifest-Cb12O4jl.js";import{r as rn}from"./chunks/categorise-manifest-C_hEDVYQ.js";import{r as an}from"./chunks/choice-manifest-C-XahD7m.js";import{r as on}from"./chunks/crossword-manifest-2qlu7AYd.js";import{r as sn}from"./chunks/drop-manifest-bzNOa5ks.js";import{r as cn}from"./chunks/flash-cards-manifest-B8nWXbRy.js";import{r as ln}from"./chunks/gap-manifest-RSydA41N.js";import{r as un}from"./chunks/hotspot-manifest-CNs1oiZ_.js";import{r as dn}from"./chunks/image-drop-manifest-BZ6hCoAd.js";import{r as fn}from"./chunks/image-label-manifest--1CLRJzd.js";import{r as pn}from"./chunks/long-answer-manifest-BYJpZRtB.js";import{r as mn}from"./chunks/mark-words-manifest-Cs2pXCEx.js";import{r as hn}from"./chunks/match-manifest-D0UfoajU.js";import{r as gn}from"./chunks/memory-manifest-D1589iR0.js";import{r as _n}from"./chunks/order-manifest-J5IXN0he.js";import{r as vn}from"./chunks/select-manifest-BBMbvdkH.js";import{r as yn}from"./chunks/true-false-manifest-B4exv60u.js";import{r as bn}from"./chunks/video-manifest-8OwkhhAI.js";import{r as xn}from"./chunks/word-bank-manifest-C1FSo1kH.js";import{o as Sn}from"./chunks/word-search-manifest-Fg1a59Z1.js";import{d as Cn,n as wn,r as Tn,s as En,u as Dn}from"./chunks/scan-jWgPnVxA.js";import{a as On,c as kn,d as An,f as T,i as E,l as jn,n as D,o as O,r as Mn,s as Nn,t as Pn}from"./chunks/insert-menu-LgrifBYT.js";import{n as Fn,t as k}from"./chunks/messages-9xiYDvRT.js";import{n as In,s as Ln,t as Rn}from"./chunks/style-model-ZXNe_c8R.js";import{n as A,r as j,t as M}from"./chunks/styles-DxJJxVNH.js";import{c as zn,r as Bn,s as Vn}from"./chunks/directive-helpers-D7lOZKnB.js";import{t as N}from"./chunks/live-jdiyYln2.js";import{i as Hn,n as Un,r as Wn,t as Gn}from"./chunks/issue-list-BgnXzXRM.js";import{t as Kn}from"./chunks/roving-focus-BxGgi2DD.js";var qn={manifest:tn,messages:e,label:`editor.label`,description:`editor.description`,icon:`speaker-high`,idPrefix:`audio`,template:`<astl-audio id="{{id}}" label="{{t:template.label}}"><astl-transcript>{{t:template.transcript}}</astl-transcript></astl-audio>`,fields:[{kind:`attribute`,name:`label`,label:`editor.title`,help:`editor.titleHelp`},{kind:`attribute`,name:`src`,label:`editor.src`,help:`editor.srcHelp`,accept:`audio/*`},{kind:`text-list`,tag:`astl-transcript`,label:`editor.transcript`,help:`editor.transcriptHelp`,multiline:!0}]},Jn={manifest:nn,messages:ae,label:`editor.label`,description:`editor.description`,icon:`info`,idPrefix:`callout`,template:`<astl-callout id="{{id}}" kind="tip"><p>{{t:template.text}}</p></astl-callout>`,fields:[{kind:`attribute`,name:`kind`,label:`editor.kind`}]},Yn={manifest:rn,messages:r,label:`editor.label`,description:`editor.description`,icon:`kanban`,idPrefix:`cat`,template:`<astl-categorise id="{{id}}"><astl-prompt>{{t:template.prompt}}</astl-prompt><astl-category id="a">{{t:template.categoryA}}</astl-category><astl-category id="b">{{t:template.categoryB}}</astl-category><astl-card id="a1" category="a">{{t:template.cardA1}}</astl-card><astl-card id="a2" category="a">{{t:template.cardA2}}</astl-card><astl-card id="b1" category="b">{{t:template.cardB1}}</astl-card><astl-card id="b2" category="b">{{t:template.cardB2}}</astl-card></astl-categorise>`,templates:[{id:`sort-into-groups`,label:`template.sort.label`,description:`template.sort.description`,template:`<h3>{{t:template.sort.heading}}</h3><p>{{t:template.sort.instruction}}</p><astl-categorise id="{{id}}"><astl-prompt>{{t:template.sort.prompt}}</astl-prompt><astl-category id="a">{{t:template.sort.groupA}}</astl-category><astl-category id="b">{{t:template.sort.groupB}}</astl-category><astl-card id="a1" category="a">{{t:template.sort.card1}}</astl-card><astl-card id="b1" category="b">{{t:template.sort.card2}}</astl-card><astl-card id="a2" category="a">{{t:template.sort.card3}}</astl-card><astl-card id="b2" category="b">{{t:template.sort.card4}}</astl-card></astl-categorise>`}],fields:[{kind:`child-choice`,tag:`astl-card`,attribute:`category`,options:`astl-category`,label:`editor.cardCategories`,help:`editor.cardCategoriesHelp`},{kind:`child-table`,tag:`astl-category`,columns:[{attribute:`palette`,label:`editor.palette`}],label:`editor.groups`,help:`editor.groupsHelp`},{kind:`attribute`,name:`scoring`,label:`editor.scoring`,help:`editor.scoringHelp`},{kind:`attribute`,name:`points`,label:`editor.points`}]},Xn={manifest:an,messages:oe,label:`editor.label`,description:`editor.description`,icon:`list-checks`,idPrefix:`choice`,template:`<astl-choice id="{{id}}"><astl-prompt>{{t:template.prompt}}</astl-prompt><astl-option id="a" correct>{{t:template.option1}}</astl-option><astl-option id="b">{{t:template.option2}}</astl-option><astl-option id="c">{{t:template.option3}}</astl-option></astl-choice>`,templates:[{id:`multiple-choice`,label:`template.choice.label`,description:`template.choice.description`,template:`<h3>{{t:template.choice.heading}}</h3><p>{{t:template.choice.instruction}}</p><astl-choice id="{{id}}"><astl-prompt>{{t:template.choice.prompt}}</astl-prompt><astl-option id="a">{{t:template.choice.option1}}</astl-option><astl-option id="b" correct>{{t:template.choice.option2}}</astl-option><astl-option id="c">{{t:template.choice.option3}}</astl-option></astl-choice>`}],fields:[{kind:`child-flag`,tag:`astl-option`,attribute:`correct`,label:`editor.correctOptions`},{kind:`attribute`,name:`multiple`,label:`editor.multiple`},{kind:`attribute`,name:`shuffle`,label:`editor.shuffle`},{kind:`attribute`,name:`scoring`,label:`editor.scoring`,help:`editor.scoringHelp`},{kind:`attribute`,name:`points`,label:`editor.points`}]},Zn=e=>`<astl-crossword id="{{id}}" rows="5" columns="5">${e}<astl-crossword-word id="w1" answer="{{t:template.crossword.across}}" row="0" column="0" direction="across">{{t:template.crossword.acrossClue}}</astl-crossword-word><astl-crossword-word id="w2" answer="{{t:template.crossword.down}}" row="0" column="0" direction="down">{{t:template.crossword.downClue}}</astl-crossword-word></astl-crossword>`,Qn={manifest:on,messages:re,label:`editor.label`,description:`editor.description`,icon:`grid-four`,idPrefix:`crossword`,template:Zn(`<astl-prompt>{{t:template.crossword.prompt}}</astl-prompt>`),templates:[{id:`crossword`,label:`template.crossword`,description:`template.crossword.description`,template:`<h3>{{t:template.crossword.heading}}</h3><p>{{t:template.crossword.prompt}}</p>${Zn(``)}`}],fields:[{kind:`attribute`,name:`rows`,label:`editor.rows`},{kind:`attribute`,name:`columns`,label:`editor.columns`},{kind:`child-table`,tag:`astl-crossword-word`,label:`editor.words`,help:`editor.wordsHelp`,columns:[{attribute:`answer`,label:`editor.answer`},{attribute:`row`,label:`editor.row`},{attribute:`column`,label:`editor.column`},{attribute:`direction`,label:`editor.direction`}]},{kind:`attribute`,name:`scoring`,label:`editor.scoring`},{kind:`attribute`,name:`points`,label:`editor.points`}]},$n={manifest:sn,messages:t,label:`editor.label`,description:`editor.description`,icon:`arrow-square-in`,idPrefix:`drop`,template:`<astl-drop id="{{id}}" answer="a" bank=""></astl-drop>`,companion:{tag:`astl-word-bank`,attribute:`bank`},fields:[{kind:`attribute`,name:`answer`,label:`editor.answer`,help:`editor.answerHelp`,options:{from:`bank`,tag:`astl-word`}},{kind:`attribute`,name:`bank`,label:`editor.bank`,help:`editor.bankHelp`},{kind:`attribute`,name:`points`,label:`editor.points`}]},er=`https://assets.example.org/flash-cards/`,P=(e,t)=>`<astl-front>${e}</astl-front><astl-back>{{t:template.cards.${t}}}</astl-back>`,tr=e=>`<img src="${er}${e}.svg" alt="{{t:template.cards.${e}}}" width="96" height="96">`,nr={manifest:cn,messages:s,label:`editor.label`,description:`editor.description`,icon:`cards`,idPrefix:`cards`,template:`<astl-flash-cards id="{{id}}"><astl-front>{{t:template.front}}</astl-front><astl-back>{{t:template.back}}</astl-back></astl-flash-cards>`,templates:[{id:`flash-cards`,label:`editor.template.cards`,description:`editor.template.cards.description`,template:`<h3>{{t:template.cards.title}}</h3><p>{{t:template.cards.instruction}}</p><astl-flash-cards id="{{id}}">`+P(tr(`sun`),`sunBack`)+P(tr(`moon`),`moonBack`)+P(`{{t:template.cards.mars}}`,`marsBack`)+P(`{{t:template.cards.saturn}}`,`saturnBack`)+`</astl-flash-cards>`}],fields:[{kind:`text-list`,tag:`astl-back`,label:`editor.backs`,help:`editor.backsHelp`}]},rr={manifest:ln,messages:c,label:`editor.label`,description:`editor.description`,icon:`text-t`,idPrefix:`gap`,template:`<astl-gap id="{{id}}" answer="{{selection}}"></astl-gap>`,templates:[{id:`fill-the-gaps`,label:`template.fill.label`,description:`template.fill.description`,template:`<h3>{{t:template.fill.heading}}</h3><p>{{t:template.fill.instruction}}</p><p>{{t:template.fill.start}} <astl-gap id="{{id}}" answer="{{t:template.fill.answer1}}"></astl-gap> {{t:template.fill.middle}} <astl-gap answer="{{t:template.fill.answer2}}"></astl-gap>{{t:template.fill.end}}</p>`}],fields:[{kind:`attribute`,name:`answer`,label:`editor.answer`},{kind:`text-list`,tag:`astl-alt`,label:`editor.alternatives`,help:`editor.alternativesHelp`},{kind:`attribute`,name:`type`,label:`editor.type`},{kind:`attribute`,name:`case`,label:`editor.case`},{kind:`attribute`,name:`marks`,label:`editor.marks`,help:`editor.marksHelp`},{kind:`attribute`,name:`tolerance`,label:`editor.tolerance`},{kind:`attribute`,name:`width`,label:`editor.width`},{kind:`attribute`,name:`points`,label:`editor.points`}]},ir={manifest:un,messages:d,label:`editor.label`,description:`editor.description`,icon:`crosshair`,idPrefix:`hotspot`,template:`<astl-hotspot id="{{id}}"><astl-prompt>{{t:template.prompt}}</astl-prompt><astl-hotspot-region id="r1" x="5" y="10" width="40" height="80" label="{{t:template.place1}}" correct></astl-hotspot-region><astl-hotspot-region id="r2" x="55" y="10" width="40" height="80" label="{{t:template.place2}}"></astl-hotspot-region></astl-hotspot>`,templates:[{id:`find-it-in-the-picture`,label:`template.find.label`,description:`template.find.description`,template:`<h3>{{t:template.find.heading}}</h3><p>{{t:template.find.instruction}}</p><astl-hotspot id="{{id}}" multiple><astl-prompt>{{t:template.find.prompt}}</astl-prompt><astl-hotspot-region id="r1" x="4" y="6" width="22" height="26" label="{{t:template.find.topLeft}}" correct></astl-hotspot-region><astl-hotspot-region id="r2" shape="circle" x="85" y="18" r="10" label="{{t:template.find.topRight}}"></astl-hotspot-region><astl-hotspot-region id="r3" shape="circle" x="50" y="50" r="12" label="{{t:template.find.centre}}" correct></astl-hotspot-region><astl-hotspot-region id="r4" shape="circle" x="15" y="82" r="10" label="{{t:template.find.bottomLeft}}"></astl-hotspot-region><astl-hotspot-region id="r5" x="74" y="68" width="22" height="26" label="{{t:template.find.bottomRight}}" correct></astl-hotspot-region></astl-hotspot>`}],fields:[{kind:`picture-regions`,tag:`astl-hotspot-region`,src:`src`,label:`editor.regions`,help:`editor.regionsHelp`},{kind:`attribute`,name:`alt`,label:`editor.alt`,help:`editor.altHelp`},{kind:`child-flag`,tag:`astl-hotspot-region`,attribute:`correct`,label:`editor.correct`,help:`editor.correctHelp`},{kind:`attribute`,name:`multiple`,label:`editor.multiple`},{kind:`attribute`,name:`outline`,label:`editor.outline`},{kind:`attribute`,name:`scoring`,label:`editor.scoring`,help:`editor.scoringHelp`},{kind:`attribute`,name:`points`,label:`editor.points`}]},ar={manifest:dn,messages:m,label:`editor.label`,description:`editor.description`,icon:`tag`,idPrefix:`image-drop`,template:`<astl-image-drop id="{{id}}"><astl-prompt>{{t:template.prompt}}</astl-prompt><astl-image-drop-zone id="z1" x="10" y="35" width="30" height="30" answer="l1"></astl-image-drop-zone><astl-image-drop-zone id="z2" x="60" y="35" width="30" height="30" answer="l2"></astl-image-drop-zone><astl-image-drop-label id="l1">{{t:template.label1}}</astl-image-drop-label><astl-image-drop-label id="l2">{{t:template.label2}}</astl-image-drop-label></astl-image-drop>`,templates:[{id:`drag-labels-onto-the-picture`,label:`template.drag.label`,description:`template.drag.description`,template:`<h3>{{t:template.drag.heading}}</h3><p>{{t:template.drag.instruction}}</p><astl-image-drop id="{{id}}"><astl-prompt>{{t:template.drag.prompt}}</astl-prompt><astl-image-drop-zone id="z1" x="20" y="5" width="60" height="25" answer="l1"></astl-image-drop-zone><astl-image-drop-zone id="z2" x="20" y="37.5" width="60" height="25" answer="l2"></astl-image-drop-zone><astl-image-drop-zone id="z3" x="20" y="70" width="60" height="25" answer="l3"></astl-image-drop-zone><astl-image-drop-label id="l1">{{t:template.drag.label1}}</astl-image-drop-label><astl-image-drop-label id="l2">{{t:template.drag.label2}}</astl-image-drop-label><astl-image-drop-label id="l3">{{t:template.drag.label3}}</astl-image-drop-label><astl-image-drop-label id="l4">{{t:template.drag.label4}}</astl-image-drop-label></astl-image-drop>`}],fields:[{kind:`picture-regions`,tag:`astl-image-drop-zone`,src:`src`,label:`editor.zones`,help:`editor.zonesHelp`},{kind:`attribute`,name:`alt`,label:`editor.alt`,help:`editor.altHelp`},{kind:`child-choice`,tag:`astl-image-drop-zone`,attribute:`answer`,options:`astl-image-drop-label`,label:`editor.answers`,help:`editor.answersHelp`},{kind:`attribute`,name:`scoring`,label:`editor.scoring`,help:`editor.scoringHelp`},{kind:`attribute`,name:`points`,label:`editor.points`}]},or={manifest:fn,messages:o,label:`editor.label`,description:`editor.description`,icon:`map-pin`,idPrefix:`image-label`,template:`<astl-image-label id="{{id}}"><astl-prompt>{{t:template.prompt}}</astl-prompt><astl-image-label-pin id="p1" x="30" y="50" label="{{t:template.answer1}}"></astl-image-label-pin><astl-image-label-pin id="p2" x="70" y="50" label="{{t:template.answer2}}"></astl-image-label-pin></astl-image-label>`,templates:[{id:`label-the-picture`,label:`template.label.label`,description:`template.label.description`,template:`<h3>{{t:template.label.heading}}</h3><p>{{t:template.label.instruction}}</p><astl-image-label id="{{id}}"><astl-prompt>{{t:template.label.prompt}}</astl-prompt><astl-image-label-pin id="p1" x="50" y="15" label="{{t:template.label.top}}"></astl-image-label-pin><astl-image-label-pin id="p2" x="50" y="50" label="{{t:template.label.centre}}" alternatives="{{t:template.label.centreAlternative}}"></astl-image-label-pin><astl-image-label-pin id="p3" x="50" y="85" label="{{t:template.label.bottom}}"></astl-image-label-pin></astl-image-label>`}],fields:[{kind:`picture-points`,tag:`astl-image-label-pin`,src:`src`,label:`editor.pins`,help:`editor.pinsHelp`},{kind:`attribute`,name:`alt`,label:`editor.alt`,help:`editor.altHelp`},{kind:`child-text`,tag:`astl-image-label-pin`,attribute:`alternatives`,label:`editor.alternatives`,help:`editor.alternativesHelp`},{kind:`attribute`,name:`case`,label:`editor.case`},{kind:`attribute`,name:`scoring`,label:`editor.scoring`,help:`editor.scoringHelp`},{kind:`attribute`,name:`points`,label:`editor.points`}]},sr={manifest:pn,messages:a,label:`editor.label`,description:`editor.description`,icon:`note-pencil`,idPrefix:`answer`,template:`<astl-long-answer id="{{id}}"><astl-prompt>{{t:template.prompt}}</astl-prompt></astl-long-answer>`,templates:[{id:`write-your-answer`,label:`editor.template.write`,description:`editor.template.write.description`,template:`<h3>{{t:template.write.title}}</h3><p>{{t:template.write.instruction}}</p><astl-long-answer id="{{id}}" rows="6" minlength="100" maxlength="800" placeholder="{{t:template.write.placeholder}}"><astl-prompt>{{t:template.write.question}}</astl-prompt></astl-long-answer>`}],fields:[{kind:`attribute`,name:`rows`,label:`editor.rows`,help:`editor.rowsHelp`},{kind:`attribute`,name:`minlength`,label:`editor.minlength`,help:`editor.minlengthHelp`},{kind:`attribute`,name:`maxlength`,label:`editor.maxlength`,help:`editor.maxlengthHelp`},{kind:`attribute`,name:`placeholder`,label:`editor.placeholder`}]},F=(e,t,n=!1)=>`<astl-mark-word id="${e}"${n?` correct`:``}>{{t:template.${t}}}</astl-mark-word>`,I=(e,t)=>`<p>${[1,2,3,4].map(n=>F(`${e}${n}`,`odd.${e}${n}`,n===t)).join(` `)}</p>`,cr={manifest:mn,messages:ne,label:`editor.label`,description:`editor.description`,icon:`highlighter`,idPrefix:`mark-words`,template:`<astl-mark-words id="{{id}}"><p>{{t:template.before}} ${F(`w1`,`word`,!0)} {{t:template.after}}</p></astl-mark-words>`,templates:[{id:`select-words`,label:`template.select.label`,description:`template.select.description`,template:`<h3>{{t:template.select.heading}}</h3><p>{{t:template.select.instruction}}</p><astl-mark-words id="{{id}}"><astl-prompt>{{t:template.select.prompt}}</astl-prompt><p>{{t:template.select.before}} ${F(`w1`,`select.word1`,!0)} {{t:template.select.middle}} ${F(`w2`,`select.word2`)} {{t:template.select.and}} ${F(`w3`,`select.word3`,!0)} {{t:template.select.after}}</p></astl-mark-words>`},{id:`odd-word`,label:`template.odd.label`,description:`template.odd.description`,icon:`strikethrough`,template:`<h3>{{t:template.odd.heading}}</h3><p>{{t:template.odd.instruction}}</p><astl-mark-words id="{{id}}" variant="strike"><astl-prompt>{{t:template.odd.prompt}}</astl-prompt>${I(`a`,3)}${I(`b`,4)}${I(`c`,2)}</astl-mark-words>`}],fields:[{kind:`attribute`,name:`variant`,label:`editor.variant`},{kind:`child-flag`,tag:`astl-mark-word`,attribute:`correct`,label:`editor.correct`,help:`editor.correctHelp`},{kind:`attribute`,name:`scoring`,label:`editor.scoring`},{kind:`attribute`,name:`points`,label:`editor.points`}],wrap:{label:`editor.wrap`,child:`astl-mark-word`,attributes:{correct:``}}},lr=(e,t,n)=>`<astl-match id="{{id}}"${t}>${n}`+[`1`,`2`,`3`].map((t,n)=>`<astl-row id="r${t}" column="${`abc`[n]}">{{t:template.${e}.row${t}}}</astl-row>`).join(``)+[`A`,`B`,`C`].map(t=>`<astl-column id="${t.toLowerCase()}">{{t:template.${e}.column${t}}}</astl-column>`).join(``)+`</astl-match>`,ur=(e,t=``)=>`<h3>{{t:template.${e}.heading}}</h3><p>{{t:template.${e}.prompt}}</p>${lr(e,t,``)}`,dr={manifest:hn,messages:u,label:`editor.label`,description:`editor.description`,icon:`arrows-left-right`,idPrefix:`match`,template:lr(`matching`,``,`<astl-prompt>{{t:template.matching.prompt}}</astl-prompt>`),templates:[{id:`matching`,label:`template.matching`,description:`template.matching.description`,template:ur(`matching`)},{id:`join-the-lines`,label:`template.lines`,description:`template.lines.description`,template:ur(`lines`,` variant="lines"`)}],fields:[{kind:`child-choice`,tag:`astl-row`,attribute:`column`,options:`astl-column`,label:`editor.answers`,help:`editor.answersHelp`},{kind:`attribute`,name:`variant`,label:`editor.layout`},{kind:`attribute`,name:`scoring`,label:`editor.scoring`},{kind:`attribute`,name:`points`,label:`editor.points`}]},fr=e=>`<astl-memory id="{{id}}">${e}`+[`1`,`2`,`3`].map(e=>`<astl-card-a id="a${e}">{{t:template.memory.a${e}}}</astl-card-a><astl-card-b id="b${e}" pair="a${e}">{{t:template.memory.b${e}}}</astl-card-b>`).join(``)+`</astl-memory>`,pr={manifest:gn,messages:i,label:`editor.label`,description:`editor.description`,icon:`cards`,idPrefix:`memory`,template:fr(`<astl-prompt>{{t:template.memory.prompt}}</astl-prompt>`),templates:[{id:`memory`,label:`template.memory`,description:`template.memory.description`,template:`<h3>{{t:template.memory.heading}}</h3><p>{{t:template.memory.prompt}}</p>${fr(``)}`}],fields:[{kind:`child-choice`,tag:`astl-card-b`,attribute:`pair`,options:`astl-card-a`,label:`editor.pairs`,help:`editor.pairsHelp`},{kind:`attribute`,name:`scoring`,label:`editor.scoring`},{kind:`attribute`,name:`points`,label:`editor.points`}]},mr={manifest:_n,messages:te,label:`editor.label`,description:`editor.description`,icon:`list-numbers`,idPrefix:`order`,template:`<astl-order id="{{id}}"><astl-prompt>{{t:template.prompt}}</astl-prompt><astl-item id="a">{{t:template.item1}}</astl-item><astl-item id="b">{{t:template.item2}}</astl-item><astl-item id="c">{{t:template.item3}}</astl-item></astl-order>`,templates:[{id:`ordering`,label:`template.cycle.label`,description:`template.cycle.description`,template:`<h3>{{t:template.cycle.heading}}</h3><p>{{t:template.cycle.instruction}}</p><astl-order id="{{id}}"><astl-prompt>{{t:template.cycle.prompt}}</astl-prompt><astl-item id="a">{{t:template.cycle.item1}}</astl-item><astl-item id="b">{{t:template.cycle.item2}}</astl-item><astl-item id="c">{{t:template.cycle.item3}}</astl-item><astl-item id="d">{{t:template.cycle.item4}}</astl-item></astl-order>`}],fields:[{kind:`attribute`,name:`scoring`,label:`editor.scoring`,help:`editor.scoringHelp`},{kind:`attribute`,name:`variant`,label:`editor.variant`,help:`editor.variantHelp`},{kind:`attribute`,name:`points`,label:`editor.points`}]},hr={manifest:vn,messages:p,label:`editor.label`,description:`editor.description`,icon:`caret-circle-down`,idPrefix:`select`,template:`<astl-select id="{{id}}"><astl-option id="a" correct>{{t:template.option1}}</astl-option><astl-option id="b">{{t:template.option2}}</astl-option><astl-option id="c">{{t:template.option3}}</astl-option></astl-select>`,templates:[{id:`choose-from-a-list`,label:`template.list.label`,description:`template.list.description`,template:`<h3>{{t:template.list.heading}}</h3><p>{{t:template.list.instruction}}</p><p>{{t:template.list.start}} <astl-select id="{{id}}"><astl-option id="a">{{t:template.list.option1}}</astl-option><astl-option id="b" correct>{{t:template.list.option2}}</astl-option><astl-option id="c">{{t:template.list.option3}}</astl-option></astl-select>{{t:template.list.end}}</p>`},{id:`click-the-right-word`,label:`template.click.label`,description:`template.click.description`,template:`<h3>{{t:template.click.heading}}</h3><p>{{t:template.click.instruction}}</p><p>{{t:template.click.start1}} <astl-select id="{{id}}" variant="buttons"><astl-option id="a">{{t:template.click.option1a}}</astl-option><astl-option id="b" correct>{{t:template.click.option1b}}</astl-option><astl-option id="c">{{t:template.click.option1c}}</astl-option></astl-select>{{t:template.click.end}}</p><p>{{t:template.click.start2}} <astl-select variant="buttons"><astl-option id="a">{{t:template.click.option2a}}</astl-option><astl-option id="b" correct>{{t:template.click.option2b}}</astl-option></astl-select>{{t:template.click.end}}</p>`}],fields:[{kind:`child-flag`,tag:`astl-option`,attribute:`correct`,label:`editor.correctOption`,help:`editor.correctOptionHelp`},{kind:`attribute`,name:`shuffle`,label:`editor.shuffle`},{kind:`attribute`,name:`points`,label:`editor.points`},{kind:`attribute`,name:`variant`,label:`editor.variant`},{kind:`attribute`,name:`native`,label:`editor.native`,help:`editor.nativeHelp`,variants:[`dropdown`]}]},gr={manifest:yn,messages:n,label:`editor.label`,description:`editor.description`,icon:`toggle-left`,idPrefix:`tf`,template:`<astl-true-false id="{{id}}"><astl-prompt>{{t:template.prompt}}</astl-prompt><astl-statement id="s1" answer="true">{{t:template.statement1}}</astl-statement><astl-statement id="s2" answer="false">{{t:template.statement2}}</astl-statement></astl-true-false>`,templates:[{id:`true-or-false`,label:`template.tf.label`,description:`template.tf.description`,template:`<h3>{{t:template.tf.heading}}</h3><p>{{t:template.tf.instruction}}</p><astl-true-false id="{{id}}"><astl-statement id="s1" answer="true">{{t:template.tf.statement1}}</astl-statement><astl-statement id="s2" answer="false">{{t:template.tf.statement2}}</astl-statement><astl-statement id="s3" answer="true">{{t:template.tf.statement3}}</astl-statement></astl-true-false>`}],fields:[{kind:`child-choice`,tag:`astl-statement`,attribute:`answer`,label:`editor.answers`},{kind:`attribute`,name:`true-label`,label:`editor.trueLabel`,help:`editor.labelsHelp`},{kind:`attribute`,name:`false-label`,label:`editor.falseLabel`},{kind:`attribute`,name:`scoring`,label:`editor.scoring`},{kind:`attribute`,name:`points`,label:`editor.points`}]},_r={manifest:bn,messages:l,label:`editor.label`,description:`editor.description`,icon:`film-strip`,idPrefix:`video`,template:`<astl-video id="{{id}}" label="{{t:template.label}}"></astl-video>`,templates:[{id:`watch-then-answer`,label:`editor.template.watch`,description:`editor.template.watch.description`,template:`<h3>{{t:template.watch.title}}</h3><p>{{t:template.watch.instruction}}</p><astl-callout kind="tip"><p>{{t:template.watch.tip}}</p></astl-callout><astl-video id="{{id}}" label="{{t:template.watch.label}}" youtube="https://youtu.be/Bq7mT2kWx4E"></astl-video><p>{{t:template.watch.sentence}} <astl-gap answer="{{t:template.watch.gap}}"></astl-gap>.</p>`}],fields:[{kind:`attribute`,name:`label`,label:`editor.title`,help:`editor.titleHelp`},{kind:`attribute`,name:`youtube`,label:`editor.youtube`,help:`editor.youtubeHelp`},{kind:`attribute`,name:`vimeo`,label:`editor.vimeo`,help:`editor.vimeoHelp`},{kind:`attribute`,name:`src`,label:`editor.src`,help:`editor.srcHelp`,accept:`video/mp4,video/webm`},{kind:`attribute`,name:`poster`,label:`editor.poster`,help:`editor.posterHelp`,accept:`image/*`},{kind:`attribute`,name:`captions`,label:`editor.captions`,help:`editor.captionsHelp`,accept:`.vtt,text/vtt`},{kind:`attribute`,name:`captions-lang`,label:`editor.captionsLang`,help:`editor.captionsLangHelp`}]},vr={manifest:xn,messages:ee,label:`editor.label`,description:`editor.description`,icon:`cards`,idPrefix:`bank`,template:`<astl-word-bank id="{{id}}"><astl-word id="a">{{t:template.word1}}</astl-word><astl-word id="b">{{t:template.word2}}</astl-word><astl-word id="c" distractor>{{t:template.word3}}</astl-word></astl-word-bank>`,templates:[{id:`drag-words`,label:`editor.template.dragWords`,description:`editor.template.dragWords.description`,template:`<h3>{{t:template.dragWords.heading}}</h3><p>{{t:template.dragWords.instruction}}</p><astl-word-bank id="{{id}}"><astl-word id="a">{{t:template.dragWords.answer1}}</astl-word><astl-word id="b">{{t:template.dragWords.answer2}}</astl-word><astl-word id="c" distractor>{{t:template.dragWords.distractor}}</astl-word></astl-word-bank><p>{{t:template.dragWords.start}} <astl-drop answer="a"></astl-drop>{{t:template.dragWords.middle}} <astl-drop answer="b"></astl-drop>{{t:template.dragWords.end}}</p>`}],fields:[{kind:`child-flag`,tag:`astl-word`,attribute:`distractor`,label:`editor.distractors`,help:`editor.distractorsHelp`},{kind:`attribute`,name:`reuse`,label:`editor.reuse`,help:`editor.reuseHelp`}]},yr=[`right`,`down`,`down-right`,`left`,`up`,`up-left`,`down-left`,`up-right`],br=`<astl-word-search id="{{id}}" right down down-right>`,xr=[1,2,3].map(e=>`<astl-search-word id="w${e}">{{t:template.word${e}}}</astl-search-word>`).join(``),Sr=[rr,Xn,hr,gr,mr,Yn,dr,vr,$n,{manifest:Sn,messages:f,label:`editor.label`,description:`editor.description`,icon:`magnifying-glass`,idPrefix:`word-search`,template:`${br}<astl-prompt>{{t:template.instruction}}</astl-prompt>${xr}</astl-word-search>`,templates:[{id:`word-search`,label:`editor.template.wordSearch`,description:`editor.template.wordSearch.description`,template:`<h3>{{t:template.title}}</h3><p>{{t:template.instruction}}</p>${br}${xr}</astl-word-search>`}],fields:[{kind:`child-text`,tag:`astl-search-word`,attribute:`word`,label:`editor.words`,help:`editor.wordsHelp`},{kind:`attribute`,name:`size`,label:`editor.size`,help:`editor.sizeHelp`},...yr.map(e=>({kind:`attribute`,name:e,label:`editor.${e}`,...e===`right`?{help:`editor.rightHelp`}:{}})),{kind:`attribute`,name:`scoring`,label:`editor.scoring`},{kind:`attribute`,name:`points`,label:`editor.points`}]},pr,Qn,nr,sr,cr,Jn,ir,ar,or,_r,qn],Cr={moveUp:x`<path d="M10 16V4M5 9l5-5 5 5"/>`,moveDown:x`<path d="M10 4v12M5 11l5 5 5-5"/>`,delete:x`<path d="M4 6h12M8 6V4h4v2M6 6l.8 10h6.4L14 6M9 9v4M11 9v4"/>`},wr=e=>e.kind===`attribute`&&e.control!==`checkbox`&&(e.control!==`text`||e.accept===null),L=e=>e.target.value,Tr=e=>e.target.checked,Er=class extends j{static styles=[A,M(`astl-picture-field, astl-style-form, astl-help-form`),_`
1
+ import{S as e,_ as t,a as n,b as r,c as i,d as a,f as o,g as s,h as c,i as l,l as u,m as d,n as f,o as p,p as m,r as ee,s as te,t as h,u as ne,v as re,w as ie,x as ae,y as oe}from"./chunks/definitions-CNX90WtL.js";import{$ as se,$t as ce,A as le,At as ue,B as de,Bt as fe,C as g,Ct as pe,D as me,Dt as he,E as _,Et as ge,F as _e,Ft as ve,G as ye,Gt as be,H as xe,Ht as Se,I as Ce,It as we,J as Te,Jt as Ee,K as v,Kt as De,L as Oe,Lt as ke,M as y,Mt as Ae,N as je,Nt as Me,O as Ne,Ot as Pe,P as Fe,Pt as b,Q as Ie,Qt as Le,R as Re,Rt as ze,Sn as Be,St as Ve,T as x,Tt as He,U as Ue,Ut as We,V as Ge,Vt as Ke,W as qe,Wt as Je,X as Ye,Xt as Xe,Y as Ze,Yt as Qe,Z as $e,Zt as et,_n as tt,_t as nt,a as rt,an as it,at,b as S,bn as ot,bt as st,cn as ct,ct as lt,dn as ut,dt,en as ft,et as pt,fn as mt,ft as ht,gn as gt,gt as _t,hn as vt,ht as yt,in as bt,it as xt,j as St,jt as C,k as Ct,kt as wt,ln as Tt,lt as Et,mn as Dt,mt as Ot,nn as kt,nt as At,on as jt,ot as Mt,pn as Nt,pt as Pt,q as Ft,qt as It,rn as Lt,rt as Rt,sn as zt,st as Bt,tn as Vt,tt as Ht,un as Ut,ut as Wt,v as w,vn as Gt,vt as Kt,wt as qt,xn as Jt,xt as Yt,y as Xt,yn as Zt,yt as Qt,z as $t,zt as en}from"./chunks/runtime-DxAbpr3S.js";import{r as tn}from"./chunks/audio-manifest-B9FWQzRy.js";import{r as nn}from"./chunks/callout-manifest-Cb12O4jl.js";import{r as rn}from"./chunks/categorise-manifest-C_hEDVYQ.js";import{r as an}from"./chunks/choice-manifest-C-XahD7m.js";import{r as on}from"./chunks/crossword-manifest-2qlu7AYd.js";import{r as sn}from"./chunks/drop-manifest-bzNOa5ks.js";import{r as cn}from"./chunks/flash-cards-manifest-B8nWXbRy.js";import{r as ln}from"./chunks/gap-manifest-RSydA41N.js";import{r as un}from"./chunks/hotspot-manifest-CNs1oiZ_.js";import{r as dn}from"./chunks/image-drop-manifest-BZ6hCoAd.js";import{r as fn}from"./chunks/image-label-manifest--1CLRJzd.js";import{r as pn}from"./chunks/long-answer-manifest-BYJpZRtB.js";import{r as mn}from"./chunks/mark-words-manifest-Cs2pXCEx.js";import{r as hn}from"./chunks/match-manifest-D0UfoajU.js";import{r as gn}from"./chunks/memory-manifest-D1589iR0.js";import{r as _n}from"./chunks/order-manifest-J5IXN0he.js";import{r as vn}from"./chunks/select-manifest-BBMbvdkH.js";import{r as yn}from"./chunks/true-false-manifest-B4exv60u.js";import{r as bn}from"./chunks/video-manifest-8OwkhhAI.js";import{r as xn}from"./chunks/word-bank-manifest-C1FSo1kH.js";import{o as Sn}from"./chunks/word-search-manifest-Fg1a59Z1.js";import{d as Cn,n as wn,r as Tn,s as En,u as Dn}from"./chunks/scan-jWgPnVxA.js";import{a as On,c as kn,d as An,f as T,i as E,l as jn,n as D,o as O,r as Mn,s as Nn,t as Pn}from"./chunks/insert-menu-7vANVmTK.js";import{n as Fn,t as k}from"./chunks/messages-D1aJfyS_.js";import{n as In,s as Ln,t as Rn}from"./chunks/style-model-ZXNe_c8R.js";import{n as A,r as j,t as M}from"./chunks/styles-CdJT6Pp9.js";import{c as zn,r as Bn,s as Vn}from"./chunks/directive-helpers-D7lOZKnB.js";import{t as N}from"./chunks/live-jdiyYln2.js";import{i as Hn,n as Un,r as Wn,t as Gn}from"./chunks/issue-list-BT9qvnZU.js";import{t as Kn}from"./chunks/roving-focus-BxGgi2DD.js";var qn={manifest:tn,messages:e,label:`editor.label`,description:`editor.description`,icon:`speaker-high`,idPrefix:`audio`,template:`<astl-audio id="{{id}}" label="{{t:template.label}}"><astl-transcript>{{t:template.transcript}}</astl-transcript></astl-audio>`,fields:[{kind:`attribute`,name:`label`,label:`editor.title`,help:`editor.titleHelp`},{kind:`attribute`,name:`src`,label:`editor.src`,help:`editor.srcHelp`,accept:`audio/*`},{kind:`text-list`,tag:`astl-transcript`,label:`editor.transcript`,help:`editor.transcriptHelp`,multiline:!0}]},Jn={manifest:nn,messages:ae,label:`editor.label`,description:`editor.description`,icon:`info`,idPrefix:`callout`,template:`<astl-callout id="{{id}}" kind="tip"><p>{{t:template.text}}</p></astl-callout>`,fields:[{kind:`attribute`,name:`kind`,label:`editor.kind`}]},Yn={manifest:rn,messages:r,label:`editor.label`,description:`editor.description`,icon:`kanban`,idPrefix:`cat`,template:`<astl-categorise id="{{id}}"><astl-prompt>{{t:template.prompt}}</astl-prompt><astl-category id="a">{{t:template.categoryA}}</astl-category><astl-category id="b">{{t:template.categoryB}}</astl-category><astl-card id="a1" category="a">{{t:template.cardA1}}</astl-card><astl-card id="a2" category="a">{{t:template.cardA2}}</astl-card><astl-card id="b1" category="b">{{t:template.cardB1}}</astl-card><astl-card id="b2" category="b">{{t:template.cardB2}}</astl-card></astl-categorise>`,templates:[{id:`sort-into-groups`,label:`template.sort.label`,description:`template.sort.description`,template:`<h3>{{t:template.sort.heading}}</h3><p>{{t:template.sort.instruction}}</p><astl-categorise id="{{id}}"><astl-prompt>{{t:template.sort.prompt}}</astl-prompt><astl-category id="a">{{t:template.sort.groupA}}</astl-category><astl-category id="b">{{t:template.sort.groupB}}</astl-category><astl-card id="a1" category="a">{{t:template.sort.card1}}</astl-card><astl-card id="b1" category="b">{{t:template.sort.card2}}</astl-card><astl-card id="a2" category="a">{{t:template.sort.card3}}</astl-card><astl-card id="b2" category="b">{{t:template.sort.card4}}</astl-card></astl-categorise>`}],fields:[{kind:`child-choice`,tag:`astl-card`,attribute:`category`,options:`astl-category`,label:`editor.cardCategories`,help:`editor.cardCategoriesHelp`},{kind:`child-table`,tag:`astl-category`,columns:[{attribute:`palette`,label:`editor.palette`}],label:`editor.groups`,help:`editor.groupsHelp`},{kind:`attribute`,name:`scoring`,label:`editor.scoring`,help:`editor.scoringHelp`},{kind:`attribute`,name:`points`,label:`editor.points`}]},Xn={manifest:an,messages:oe,label:`editor.label`,description:`editor.description`,icon:`list-checks`,idPrefix:`choice`,template:`<astl-choice id="{{id}}"><astl-prompt>{{t:template.prompt}}</astl-prompt><astl-option id="a" correct>{{t:template.option1}}</astl-option><astl-option id="b">{{t:template.option2}}</astl-option><astl-option id="c">{{t:template.option3}}</astl-option></astl-choice>`,templates:[{id:`multiple-choice`,label:`template.choice.label`,description:`template.choice.description`,template:`<h3>{{t:template.choice.heading}}</h3><p>{{t:template.choice.instruction}}</p><astl-choice id="{{id}}"><astl-prompt>{{t:template.choice.prompt}}</astl-prompt><astl-option id="a">{{t:template.choice.option1}}</astl-option><astl-option id="b" correct>{{t:template.choice.option2}}</astl-option><astl-option id="c">{{t:template.choice.option3}}</astl-option></astl-choice>`}],fields:[{kind:`child-flag`,tag:`astl-option`,attribute:`correct`,label:`editor.correctOptions`},{kind:`attribute`,name:`multiple`,label:`editor.multiple`},{kind:`attribute`,name:`shuffle`,label:`editor.shuffle`},{kind:`attribute`,name:`scoring`,label:`editor.scoring`,help:`editor.scoringHelp`},{kind:`attribute`,name:`points`,label:`editor.points`}]},Zn=e=>`<astl-crossword id="{{id}}" rows="5" columns="5">${e}<astl-crossword-word id="w1" answer="{{t:template.crossword.across}}" row="0" column="0" direction="across">{{t:template.crossword.acrossClue}}</astl-crossword-word><astl-crossword-word id="w2" answer="{{t:template.crossword.down}}" row="0" column="0" direction="down">{{t:template.crossword.downClue}}</astl-crossword-word></astl-crossword>`,Qn={manifest:on,messages:re,label:`editor.label`,description:`editor.description`,icon:`grid-four`,idPrefix:`crossword`,template:Zn(`<astl-prompt>{{t:template.crossword.prompt}}</astl-prompt>`),templates:[{id:`crossword`,label:`template.crossword`,description:`template.crossword.description`,template:`<h3>{{t:template.crossword.heading}}</h3><p>{{t:template.crossword.prompt}}</p>${Zn(``)}`}],fields:[{kind:`attribute`,name:`rows`,label:`editor.rows`},{kind:`attribute`,name:`columns`,label:`editor.columns`},{kind:`child-table`,tag:`astl-crossword-word`,label:`editor.words`,help:`editor.wordsHelp`,columns:[{attribute:`answer`,label:`editor.answer`},{attribute:`row`,label:`editor.row`},{attribute:`column`,label:`editor.column`},{attribute:`direction`,label:`editor.direction`}]},{kind:`attribute`,name:`scoring`,label:`editor.scoring`},{kind:`attribute`,name:`points`,label:`editor.points`}]},$n={manifest:sn,messages:t,label:`editor.label`,description:`editor.description`,icon:`arrow-square-in`,idPrefix:`drop`,template:`<astl-drop id="{{id}}" answer="a" bank=""></astl-drop>`,companion:{tag:`astl-word-bank`,attribute:`bank`},fields:[{kind:`attribute`,name:`answer`,label:`editor.answer`,help:`editor.answerHelp`,options:{from:`bank`,tag:`astl-word`}},{kind:`attribute`,name:`bank`,label:`editor.bank`,help:`editor.bankHelp`},{kind:`attribute`,name:`points`,label:`editor.points`}]},er=`https://assets.example.org/flash-cards/`,P=(e,t)=>`<astl-front>${e}</astl-front><astl-back>{{t:template.cards.${t}}}</astl-back>`,tr=e=>`<img src="${er}${e}.svg" alt="{{t:template.cards.${e}}}" width="96" height="96">`,nr={manifest:cn,messages:s,label:`editor.label`,description:`editor.description`,icon:`cards`,idPrefix:`cards`,template:`<astl-flash-cards id="{{id}}"><astl-front>{{t:template.front}}</astl-front><astl-back>{{t:template.back}}</astl-back></astl-flash-cards>`,templates:[{id:`flash-cards`,label:`editor.template.cards`,description:`editor.template.cards.description`,template:`<h3>{{t:template.cards.title}}</h3><p>{{t:template.cards.instruction}}</p><astl-flash-cards id="{{id}}">`+P(tr(`sun`),`sunBack`)+P(tr(`moon`),`moonBack`)+P(`{{t:template.cards.mars}}`,`marsBack`)+P(`{{t:template.cards.saturn}}`,`saturnBack`)+`</astl-flash-cards>`}],fields:[{kind:`text-list`,tag:`astl-back`,label:`editor.backs`,help:`editor.backsHelp`}]},rr={manifest:ln,messages:c,label:`editor.label`,description:`editor.description`,icon:`text-t`,idPrefix:`gap`,template:`<astl-gap id="{{id}}" answer="{{selection}}"></astl-gap>`,templates:[{id:`fill-the-gaps`,label:`template.fill.label`,description:`template.fill.description`,template:`<h3>{{t:template.fill.heading}}</h3><p>{{t:template.fill.instruction}}</p><p>{{t:template.fill.start}} <astl-gap id="{{id}}" answer="{{t:template.fill.answer1}}"></astl-gap> {{t:template.fill.middle}} <astl-gap answer="{{t:template.fill.answer2}}"></astl-gap>{{t:template.fill.end}}</p>`}],fields:[{kind:`attribute`,name:`answer`,label:`editor.answer`},{kind:`text-list`,tag:`astl-alt`,label:`editor.alternatives`,help:`editor.alternativesHelp`},{kind:`attribute`,name:`type`,label:`editor.type`},{kind:`attribute`,name:`case`,label:`editor.case`},{kind:`attribute`,name:`marks`,label:`editor.marks`,help:`editor.marksHelp`},{kind:`attribute`,name:`tolerance`,label:`editor.tolerance`},{kind:`attribute`,name:`width`,label:`editor.width`},{kind:`attribute`,name:`points`,label:`editor.points`}]},ir={manifest:un,messages:d,label:`editor.label`,description:`editor.description`,icon:`crosshair`,idPrefix:`hotspot`,template:`<astl-hotspot id="{{id}}"><astl-prompt>{{t:template.prompt}}</astl-prompt><astl-hotspot-region id="r1" x="5" y="10" width="40" height="80" label="{{t:template.place1}}" correct></astl-hotspot-region><astl-hotspot-region id="r2" x="55" y="10" width="40" height="80" label="{{t:template.place2}}"></astl-hotspot-region></astl-hotspot>`,templates:[{id:`find-it-in-the-picture`,label:`template.find.label`,description:`template.find.description`,template:`<h3>{{t:template.find.heading}}</h3><p>{{t:template.find.instruction}}</p><astl-hotspot id="{{id}}" multiple><astl-prompt>{{t:template.find.prompt}}</astl-prompt><astl-hotspot-region id="r1" x="4" y="6" width="22" height="26" label="{{t:template.find.topLeft}}" correct></astl-hotspot-region><astl-hotspot-region id="r2" shape="circle" x="85" y="18" r="10" label="{{t:template.find.topRight}}"></astl-hotspot-region><astl-hotspot-region id="r3" shape="circle" x="50" y="50" r="12" label="{{t:template.find.centre}}" correct></astl-hotspot-region><astl-hotspot-region id="r4" shape="circle" x="15" y="82" r="10" label="{{t:template.find.bottomLeft}}"></astl-hotspot-region><astl-hotspot-region id="r5" x="74" y="68" width="22" height="26" label="{{t:template.find.bottomRight}}" correct></astl-hotspot-region></astl-hotspot>`}],fields:[{kind:`picture-regions`,tag:`astl-hotspot-region`,src:`src`,label:`editor.regions`,help:`editor.regionsHelp`},{kind:`attribute`,name:`alt`,label:`editor.alt`,help:`editor.altHelp`},{kind:`child-flag`,tag:`astl-hotspot-region`,attribute:`correct`,label:`editor.correct`,help:`editor.correctHelp`},{kind:`attribute`,name:`multiple`,label:`editor.multiple`},{kind:`attribute`,name:`outline`,label:`editor.outline`},{kind:`attribute`,name:`scoring`,label:`editor.scoring`,help:`editor.scoringHelp`},{kind:`attribute`,name:`points`,label:`editor.points`}]},ar={manifest:dn,messages:m,label:`editor.label`,description:`editor.description`,icon:`tag`,idPrefix:`image-drop`,template:`<astl-image-drop id="{{id}}"><astl-prompt>{{t:template.prompt}}</astl-prompt><astl-image-drop-zone id="z1" x="10" y="35" width="30" height="30" answer="l1"></astl-image-drop-zone><astl-image-drop-zone id="z2" x="60" y="35" width="30" height="30" answer="l2"></astl-image-drop-zone><astl-image-drop-label id="l1">{{t:template.label1}}</astl-image-drop-label><astl-image-drop-label id="l2">{{t:template.label2}}</astl-image-drop-label></astl-image-drop>`,templates:[{id:`drag-labels-onto-the-picture`,label:`template.drag.label`,description:`template.drag.description`,template:`<h3>{{t:template.drag.heading}}</h3><p>{{t:template.drag.instruction}}</p><astl-image-drop id="{{id}}"><astl-prompt>{{t:template.drag.prompt}}</astl-prompt><astl-image-drop-zone id="z1" x="20" y="5" width="60" height="25" answer="l1"></astl-image-drop-zone><astl-image-drop-zone id="z2" x="20" y="37.5" width="60" height="25" answer="l2"></astl-image-drop-zone><astl-image-drop-zone id="z3" x="20" y="70" width="60" height="25" answer="l3"></astl-image-drop-zone><astl-image-drop-label id="l1">{{t:template.drag.label1}}</astl-image-drop-label><astl-image-drop-label id="l2">{{t:template.drag.label2}}</astl-image-drop-label><astl-image-drop-label id="l3">{{t:template.drag.label3}}</astl-image-drop-label><astl-image-drop-label id="l4">{{t:template.drag.label4}}</astl-image-drop-label></astl-image-drop>`}],fields:[{kind:`picture-regions`,tag:`astl-image-drop-zone`,src:`src`,label:`editor.zones`,help:`editor.zonesHelp`},{kind:`attribute`,name:`alt`,label:`editor.alt`,help:`editor.altHelp`},{kind:`child-choice`,tag:`astl-image-drop-zone`,attribute:`answer`,options:`astl-image-drop-label`,label:`editor.answers`,help:`editor.answersHelp`},{kind:`attribute`,name:`scoring`,label:`editor.scoring`,help:`editor.scoringHelp`},{kind:`attribute`,name:`points`,label:`editor.points`}]},or={manifest:fn,messages:o,label:`editor.label`,description:`editor.description`,icon:`map-pin`,idPrefix:`image-label`,template:`<astl-image-label id="{{id}}"><astl-prompt>{{t:template.prompt}}</astl-prompt><astl-image-label-pin id="p1" x="30" y="50" label="{{t:template.answer1}}"></astl-image-label-pin><astl-image-label-pin id="p2" x="70" y="50" label="{{t:template.answer2}}"></astl-image-label-pin></astl-image-label>`,templates:[{id:`label-the-picture`,label:`template.label.label`,description:`template.label.description`,template:`<h3>{{t:template.label.heading}}</h3><p>{{t:template.label.instruction}}</p><astl-image-label id="{{id}}"><astl-prompt>{{t:template.label.prompt}}</astl-prompt><astl-image-label-pin id="p1" x="50" y="15" label="{{t:template.label.top}}"></astl-image-label-pin><astl-image-label-pin id="p2" x="50" y="50" label="{{t:template.label.centre}}" alternatives="{{t:template.label.centreAlternative}}"></astl-image-label-pin><astl-image-label-pin id="p3" x="50" y="85" label="{{t:template.label.bottom}}"></astl-image-label-pin></astl-image-label>`}],fields:[{kind:`picture-points`,tag:`astl-image-label-pin`,src:`src`,label:`editor.pins`,help:`editor.pinsHelp`},{kind:`attribute`,name:`alt`,label:`editor.alt`,help:`editor.altHelp`},{kind:`child-text`,tag:`astl-image-label-pin`,attribute:`alternatives`,label:`editor.alternatives`,help:`editor.alternativesHelp`},{kind:`attribute`,name:`case`,label:`editor.case`},{kind:`attribute`,name:`scoring`,label:`editor.scoring`,help:`editor.scoringHelp`},{kind:`attribute`,name:`points`,label:`editor.points`}]},sr={manifest:pn,messages:a,label:`editor.label`,description:`editor.description`,icon:`note-pencil`,idPrefix:`answer`,template:`<astl-long-answer id="{{id}}"><astl-prompt>{{t:template.prompt}}</astl-prompt></astl-long-answer>`,templates:[{id:`write-your-answer`,label:`editor.template.write`,description:`editor.template.write.description`,template:`<h3>{{t:template.write.title}}</h3><p>{{t:template.write.instruction}}</p><astl-long-answer id="{{id}}" rows="6" minlength="100" maxlength="800" placeholder="{{t:template.write.placeholder}}"><astl-prompt>{{t:template.write.question}}</astl-prompt></astl-long-answer>`}],fields:[{kind:`attribute`,name:`rows`,label:`editor.rows`,help:`editor.rowsHelp`},{kind:`attribute`,name:`minlength`,label:`editor.minlength`,help:`editor.minlengthHelp`},{kind:`attribute`,name:`maxlength`,label:`editor.maxlength`,help:`editor.maxlengthHelp`},{kind:`attribute`,name:`placeholder`,label:`editor.placeholder`}]},F=(e,t,n=!1)=>`<astl-mark-word id="${e}"${n?` correct`:``}>{{t:template.${t}}}</astl-mark-word>`,I=(e,t)=>`<p>${[1,2,3,4].map(n=>F(`${e}${n}`,`odd.${e}${n}`,n===t)).join(` `)}</p>`,cr={manifest:mn,messages:ne,label:`editor.label`,description:`editor.description`,icon:`highlighter`,idPrefix:`mark-words`,template:`<astl-mark-words id="{{id}}"><p>{{t:template.before}} ${F(`w1`,`word`,!0)} {{t:template.after}}</p></astl-mark-words>`,templates:[{id:`select-words`,label:`template.select.label`,description:`template.select.description`,template:`<h3>{{t:template.select.heading}}</h3><p>{{t:template.select.instruction}}</p><astl-mark-words id="{{id}}"><astl-prompt>{{t:template.select.prompt}}</astl-prompt><p>{{t:template.select.before}} ${F(`w1`,`select.word1`,!0)} {{t:template.select.middle}} ${F(`w2`,`select.word2`)} {{t:template.select.and}} ${F(`w3`,`select.word3`,!0)} {{t:template.select.after}}</p></astl-mark-words>`},{id:`odd-word`,label:`template.odd.label`,description:`template.odd.description`,icon:`strikethrough`,template:`<h3>{{t:template.odd.heading}}</h3><p>{{t:template.odd.instruction}}</p><astl-mark-words id="{{id}}" variant="strike"><astl-prompt>{{t:template.odd.prompt}}</astl-prompt>${I(`a`,3)}${I(`b`,4)}${I(`c`,2)}</astl-mark-words>`}],fields:[{kind:`attribute`,name:`variant`,label:`editor.variant`},{kind:`child-flag`,tag:`astl-mark-word`,attribute:`correct`,label:`editor.correct`,help:`editor.correctHelp`},{kind:`attribute`,name:`scoring`,label:`editor.scoring`},{kind:`attribute`,name:`points`,label:`editor.points`}],wrap:{label:`editor.wrap`,child:`astl-mark-word`,attributes:{correct:``}}},lr=(e,t,n)=>`<astl-match id="{{id}}"${t}>${n}`+[`1`,`2`,`3`].map((t,n)=>`<astl-row id="r${t}" column="${`abc`[n]}">{{t:template.${e}.row${t}}}</astl-row>`).join(``)+[`A`,`B`,`C`].map(t=>`<astl-column id="${t.toLowerCase()}">{{t:template.${e}.column${t}}}</astl-column>`).join(``)+`</astl-match>`,ur=(e,t=``)=>`<h3>{{t:template.${e}.heading}}</h3><p>{{t:template.${e}.prompt}}</p>${lr(e,t,``)}`,dr={manifest:hn,messages:u,label:`editor.label`,description:`editor.description`,icon:`arrows-left-right`,idPrefix:`match`,template:lr(`matching`,``,`<astl-prompt>{{t:template.matching.prompt}}</astl-prompt>`),templates:[{id:`matching`,label:`template.matching`,description:`template.matching.description`,template:ur(`matching`)},{id:`join-the-lines`,label:`template.lines`,description:`template.lines.description`,template:ur(`lines`,` variant="lines"`)}],fields:[{kind:`child-choice`,tag:`astl-row`,attribute:`column`,options:`astl-column`,label:`editor.answers`,help:`editor.answersHelp`},{kind:`attribute`,name:`variant`,label:`editor.layout`},{kind:`attribute`,name:`scoring`,label:`editor.scoring`},{kind:`attribute`,name:`points`,label:`editor.points`}]},fr=e=>`<astl-memory id="{{id}}">${e}`+[`1`,`2`,`3`].map(e=>`<astl-card-a id="a${e}">{{t:template.memory.a${e}}}</astl-card-a><astl-card-b id="b${e}" pair="a${e}">{{t:template.memory.b${e}}}</astl-card-b>`).join(``)+`</astl-memory>`,pr={manifest:gn,messages:i,label:`editor.label`,description:`editor.description`,icon:`cards`,idPrefix:`memory`,template:fr(`<astl-prompt>{{t:template.memory.prompt}}</astl-prompt>`),templates:[{id:`memory`,label:`template.memory`,description:`template.memory.description`,template:`<h3>{{t:template.memory.heading}}</h3><p>{{t:template.memory.prompt}}</p>${fr(``)}`}],fields:[{kind:`child-choice`,tag:`astl-card-b`,attribute:`pair`,options:`astl-card-a`,label:`editor.pairs`,help:`editor.pairsHelp`},{kind:`attribute`,name:`scoring`,label:`editor.scoring`},{kind:`attribute`,name:`points`,label:`editor.points`}]},mr={manifest:_n,messages:te,label:`editor.label`,description:`editor.description`,icon:`list-numbers`,idPrefix:`order`,template:`<astl-order id="{{id}}"><astl-prompt>{{t:template.prompt}}</astl-prompt><astl-item id="a">{{t:template.item1}}</astl-item><astl-item id="b">{{t:template.item2}}</astl-item><astl-item id="c">{{t:template.item3}}</astl-item></astl-order>`,templates:[{id:`ordering`,label:`template.cycle.label`,description:`template.cycle.description`,template:`<h3>{{t:template.cycle.heading}}</h3><p>{{t:template.cycle.instruction}}</p><astl-order id="{{id}}"><astl-prompt>{{t:template.cycle.prompt}}</astl-prompt><astl-item id="a">{{t:template.cycle.item1}}</astl-item><astl-item id="b">{{t:template.cycle.item2}}</astl-item><astl-item id="c">{{t:template.cycle.item3}}</astl-item><astl-item id="d">{{t:template.cycle.item4}}</astl-item></astl-order>`}],fields:[{kind:`attribute`,name:`scoring`,label:`editor.scoring`,help:`editor.scoringHelp`},{kind:`attribute`,name:`variant`,label:`editor.variant`,help:`editor.variantHelp`},{kind:`attribute`,name:`points`,label:`editor.points`}]},hr={manifest:vn,messages:p,label:`editor.label`,description:`editor.description`,icon:`caret-circle-down`,idPrefix:`select`,template:`<astl-select id="{{id}}"><astl-option id="a" correct>{{t:template.option1}}</astl-option><astl-option id="b">{{t:template.option2}}</astl-option><astl-option id="c">{{t:template.option3}}</astl-option></astl-select>`,templates:[{id:`choose-from-a-list`,label:`template.list.label`,description:`template.list.description`,template:`<h3>{{t:template.list.heading}}</h3><p>{{t:template.list.instruction}}</p><p>{{t:template.list.start}} <astl-select id="{{id}}"><astl-option id="a">{{t:template.list.option1}}</astl-option><astl-option id="b" correct>{{t:template.list.option2}}</astl-option><astl-option id="c">{{t:template.list.option3}}</astl-option></astl-select>{{t:template.list.end}}</p>`},{id:`click-the-right-word`,label:`template.click.label`,description:`template.click.description`,template:`<h3>{{t:template.click.heading}}</h3><p>{{t:template.click.instruction}}</p><p>{{t:template.click.start1}} <astl-select id="{{id}}" variant="buttons"><astl-option id="a">{{t:template.click.option1a}}</astl-option><astl-option id="b" correct>{{t:template.click.option1b}}</astl-option><astl-option id="c">{{t:template.click.option1c}}</astl-option></astl-select>{{t:template.click.end}}</p><p>{{t:template.click.start2}} <astl-select variant="buttons"><astl-option id="a">{{t:template.click.option2a}}</astl-option><astl-option id="b" correct>{{t:template.click.option2b}}</astl-option></astl-select>{{t:template.click.end}}</p>`}],fields:[{kind:`child-flag`,tag:`astl-option`,attribute:`correct`,label:`editor.correctOption`,help:`editor.correctOptionHelp`},{kind:`attribute`,name:`shuffle`,label:`editor.shuffle`},{kind:`attribute`,name:`points`,label:`editor.points`},{kind:`attribute`,name:`variant`,label:`editor.variant`},{kind:`attribute`,name:`native`,label:`editor.native`,help:`editor.nativeHelp`,variants:[`dropdown`]}]},gr={manifest:yn,messages:n,label:`editor.label`,description:`editor.description`,icon:`toggle-left`,idPrefix:`tf`,template:`<astl-true-false id="{{id}}"><astl-prompt>{{t:template.prompt}}</astl-prompt><astl-statement id="s1" answer="true">{{t:template.statement1}}</astl-statement><astl-statement id="s2" answer="false">{{t:template.statement2}}</astl-statement></astl-true-false>`,templates:[{id:`true-or-false`,label:`template.tf.label`,description:`template.tf.description`,template:`<h3>{{t:template.tf.heading}}</h3><p>{{t:template.tf.instruction}}</p><astl-true-false id="{{id}}"><astl-statement id="s1" answer="true">{{t:template.tf.statement1}}</astl-statement><astl-statement id="s2" answer="false">{{t:template.tf.statement2}}</astl-statement><astl-statement id="s3" answer="true">{{t:template.tf.statement3}}</astl-statement></astl-true-false>`}],fields:[{kind:`child-choice`,tag:`astl-statement`,attribute:`answer`,label:`editor.answers`},{kind:`attribute`,name:`true-label`,label:`editor.trueLabel`,help:`editor.labelsHelp`},{kind:`attribute`,name:`false-label`,label:`editor.falseLabel`},{kind:`attribute`,name:`scoring`,label:`editor.scoring`},{kind:`attribute`,name:`points`,label:`editor.points`}]},_r={manifest:bn,messages:l,label:`editor.label`,description:`editor.description`,icon:`film-strip`,idPrefix:`video`,template:`<astl-video id="{{id}}" label="{{t:template.label}}"></astl-video>`,templates:[{id:`watch-then-answer`,label:`editor.template.watch`,description:`editor.template.watch.description`,template:`<h3>{{t:template.watch.title}}</h3><p>{{t:template.watch.instruction}}</p><astl-callout kind="tip"><p>{{t:template.watch.tip}}</p></astl-callout><astl-video id="{{id}}" label="{{t:template.watch.label}}" youtube="https://youtu.be/Bq7mT2kWx4E"></astl-video><p>{{t:template.watch.sentence}} <astl-gap answer="{{t:template.watch.gap}}"></astl-gap>.</p>`}],fields:[{kind:`attribute`,name:`label`,label:`editor.title`,help:`editor.titleHelp`},{kind:`attribute`,name:`youtube`,label:`editor.youtube`,help:`editor.youtubeHelp`},{kind:`attribute`,name:`vimeo`,label:`editor.vimeo`,help:`editor.vimeoHelp`},{kind:`attribute`,name:`src`,label:`editor.src`,help:`editor.srcHelp`,accept:`video/mp4,video/webm`},{kind:`attribute`,name:`poster`,label:`editor.poster`,help:`editor.posterHelp`,accept:`image/*`},{kind:`attribute`,name:`captions`,label:`editor.captions`,help:`editor.captionsHelp`,accept:`.vtt,text/vtt`},{kind:`attribute`,name:`captions-lang`,label:`editor.captionsLang`,help:`editor.captionsLangHelp`}]},vr={manifest:xn,messages:ee,label:`editor.label`,description:`editor.description`,icon:`cards`,idPrefix:`bank`,template:`<astl-word-bank id="{{id}}"><astl-word id="a">{{t:template.word1}}</astl-word><astl-word id="b">{{t:template.word2}}</astl-word><astl-word id="c" distractor>{{t:template.word3}}</astl-word></astl-word-bank>`,templates:[{id:`drag-words`,label:`editor.template.dragWords`,description:`editor.template.dragWords.description`,template:`<h3>{{t:template.dragWords.heading}}</h3><p>{{t:template.dragWords.instruction}}</p><astl-word-bank id="{{id}}"><astl-word id="a">{{t:template.dragWords.answer1}}</astl-word><astl-word id="b">{{t:template.dragWords.answer2}}</astl-word><astl-word id="c" distractor>{{t:template.dragWords.distractor}}</astl-word></astl-word-bank><p>{{t:template.dragWords.start}} <astl-drop answer="a"></astl-drop>{{t:template.dragWords.middle}} <astl-drop answer="b"></astl-drop>{{t:template.dragWords.end}}</p>`}],fields:[{kind:`child-flag`,tag:`astl-word`,attribute:`distractor`,label:`editor.distractors`,help:`editor.distractorsHelp`},{kind:`attribute`,name:`reuse`,label:`editor.reuse`,help:`editor.reuseHelp`}]},yr=[`right`,`down`,`down-right`,`left`,`up`,`up-left`,`down-left`,`up-right`],br=`<astl-word-search id="{{id}}" right down down-right>`,xr=[1,2,3].map(e=>`<astl-search-word id="w${e}">{{t:template.word${e}}}</astl-search-word>`).join(``),Sr=[rr,Xn,hr,gr,mr,Yn,dr,vr,$n,{manifest:Sn,messages:f,label:`editor.label`,description:`editor.description`,icon:`magnifying-glass`,idPrefix:`word-search`,template:`${br}<astl-prompt>{{t:template.instruction}}</astl-prompt>${xr}</astl-word-search>`,templates:[{id:`word-search`,label:`editor.template.wordSearch`,description:`editor.template.wordSearch.description`,template:`<h3>{{t:template.title}}</h3><p>{{t:template.instruction}}</p>${br}${xr}</astl-word-search>`}],fields:[{kind:`child-text`,tag:`astl-search-word`,attribute:`word`,label:`editor.words`,help:`editor.wordsHelp`},{kind:`attribute`,name:`size`,label:`editor.size`,help:`editor.sizeHelp`},...yr.map(e=>({kind:`attribute`,name:e,label:`editor.${e}`,...e===`right`?{help:`editor.rightHelp`}:{}})),{kind:`attribute`,name:`scoring`,label:`editor.scoring`},{kind:`attribute`,name:`points`,label:`editor.points`}]},pr,Qn,nr,sr,cr,Jn,ir,ar,or,_r,qn],Cr={moveUp:x`<path d="M10 16V4M5 9l5-5 5 5"/>`,moveDown:x`<path d="M10 4v12M5 11l5 5 5-5"/>`,delete:x`<path d="M4 6h12M8 6V4h4v2M6 6l.8 10h6.4L14 6M9 9v4M11 9v4"/>`},wr=e=>e.kind===`attribute`&&e.control!==`checkbox`&&(e.control!==`text`||e.accept===null),L=e=>e.target.value,Tr=e=>e.target.checked,Er=class extends j{static styles=[A,M(`astl-picture-field, astl-style-form, astl-help-form`),_`
2
2
  .style {
3
3
  display: flex;
4
4
  flex-direction: column;
@@ -903,13 +903,18 @@ border: var(--astl-outline-width) solid var(--astl-line);
903
903
  border-radius: var(--astl-radius-l);
904
904
  background: var(--astl-surface);
905
905
  }
906
+ .formats,
907
+ .actions {
908
+ display: contents;
909
+ }
906
910
  .group {
907
911
  display: flex;
908
912
  flex-wrap: wrap;
909
913
  align-items: center;
910
914
  gap: var(--astl-space-1);
911
915
  }
912
- .group + .group {
916
+ .group + .group,
917
+ .formats + .actions > .group:first-child {
913
918
  position: relative;
914
919
  margin-inline-start: calc(-1 * var(--astl-space-2) - var(--astl-outline-width));
915
920
  padding-inline-start: calc(var(--astl-space-2) + var(--astl-outline-width));
@@ -925,9 +930,39 @@ margin-inline-start: auto;
925
930
  }
926
931
  @container (inline-size < 30rem) {
927
932
  .bar {
928
- flex-wrap: nowrap;
933
+ flex-flow: column nowrap;
934
+ align-items: stretch;
935
+ }
936
+ .formats,
937
+ .actions {
938
+ display: flex;
939
+ align-items: center;
940
+ }
941
+ .actions {
942
+ flex-wrap: wrap;
943
+ gap: var(--astl-space-1);
944
+ }
945
+ .actions > .group:not(.views, .history) {
946
+ display: contents;
947
+ }
948
+ .actions .separator {
949
+ display: none;
950
+ }
951
+ .actions > .group {
952
+ margin-inline-start: 0;
953
+ }
954
+ .actions > .history {
955
+ margin-inline-start: auto;
956
+ padding-inline-start: 0;
957
+ }
958
+ .formats {
959
+ --ring: calc(var(--astl-focus-width) + var(--astl-focus-offset));
960
+ gap: var(--astl-space-1) calc(2 * var(--astl-space-2) + var(--astl-outline-width));
929
961
  overflow-x: auto;
930
962
  scrollbar-width: thin;
963
+ padding: var(--ring);
964
+ margin-block: calc(-1 * var(--ring)) 0;
965
+ margin-inline: calc(-1 * var(--ring));
931
966
  background:
932
967
  linear-gradient(90deg, var(--astl-surface) 50%, #0000) left / 1.5rem no-repeat local,
933
968
  linear-gradient(-90deg, var(--astl-surface) 50%, #0000) right / 1.5rem no-repeat local,
@@ -935,7 +970,7 @@ radial-gradient(farthest-side at 0, var(--astl-outline), #0000) left / 0.5rem no
935
970
  radial-gradient(farthest-side at 100%, var(--astl-outline), #0000) right / 0.5rem no-repeat,
936
971
  var(--astl-surface);
937
972
  }
938
- .group {
973
+ .formats > .group {
939
974
  flex: none;
940
975
  flex-wrap: nowrap;
941
976
  }
@@ -1123,7 +1158,7 @@ border-color: Highlight;
1123
1158
  color: GrayText;
1124
1159
  }
1125
1160
  }
1126
- `,Kr=class extends j{static properties={...j.properties,featured:{attribute:!1},views:{attribute:!1},view:{}};static styles=[A,M(`astl-insert-menu, astl-picture-dialog, astl-style-form, astl-style-rules`),Ur,Wr,Gr];#e=Hr;#t=null;#n=null;#r=null;#i=`block`;#a=!1;#o=`elements`;#s=``;#c=!1;#l=null;#u=[];#d=new Kn(this,{count:()=>this.#u.length,item:e=>this.renderRoot.querySelector(`.bar [data-item="${e}"]`),axis:`inline`});constructor(){super(),this.featured=[],this.views=[],this.view=``}get menu(){return this.renderRoot.querySelector(`astl-insert-menu`)}async openMenu(e){await this.#g(e)}async openStyle(e){let t={target:e};this.#_(!1);let n=new CustomEvent(E,{detail:t,bubbles:!0,composed:!0,cancelable:!0});this.dispatchEvent(n)&&(await O(),this.#i=e,await this.#g(`panel`))}async#f(){if(this.#r!==null)return!0;try{let e=await import(`./chunks/style-popups-BobgX1WK.js`),t=this.renderRoot,n=e.stylePopupStyles.styleSheet;return this.#r===null&&n!==void 0&&(t.adoptedStyleSheets=[...t.adoptedStyleSheets,n]),this.#r=e,!0}catch(e){return console.error(e),!1}}connectedCallback(){super.connectedCallback(),this.#p(),document.addEventListener(`pointerdown`,this.#m,!0),document.addEventListener(`keydown`,this.#h)}disconnectedCallback(){super.disconnectedCallback(),this.#p(),document.removeEventListener(`pointerdown`,this.#m,!0),document.removeEventListener(`keydown`,this.#h)}willUpdate(e){super.willUpdate(e),e.has(`adapter`)&&this.#p(),this.#e=this.adapter?.formatState?.()??Hr,this.#t=this.adapter?.style?.state()??null}#p(){let e=this.isConnected?this.adapter:null;if((this.#l?.adapter??null)===e)return;this.#l?.off(),this.#l=null;let t=e?.onCursorChange;e!==null&&t!==void 0&&(this.#l={adapter:e,off:t.call(e,()=>this.requestUpdate())})}#m=e=>{if(this.#n===null)return;let t=e.composedPath(),n=this.renderRoot.querySelector(`#${G(this.#n)}`),r=this.renderRoot.querySelector(`[data-popup="${K(this.#n)}"]`);n!==null&&t.includes(n)||r!==null&&t.includes(r)||t.some(e=>e instanceof Element&&e.localName===`astl-picture-dialog`)||this.#_(!1)};#h=e=>{if(this.#n!==`panel`||e.key!==`Escape`)return;let t=this.renderRoot.querySelector(`#panel`),n=t!==null&&e.composedPath().includes(t);n&&e.defaultPrevented||(e.preventDefault(),this.#_(n))};async#g(e){if((e===`panel`||W.has(e))&&!await this.#f())return;this.#n!==null&&this.#n!==e&&this.#_(!1),this.#n=e,this.#c=!1,this.#a=!1,Br(e)&&(this.#s=``,this.#o=e),this.requestUpdate(),await this.updateComplete;let t=this.renderRoot.querySelector(`#${G(e)}`),n=this.renderRoot.querySelector(`[data-popup="${K(e)}"]`);t!==null&&n!==null&&(t.matches(`:popover-open`)||t.showPopover(),this.menu?.requestUpdate(),this.#v(t,n),(e===`style`||W.has(e)?t.querySelector(`[aria-checked="true"], [aria-pressed="true"]`)??t.querySelector(`button`):e===`panel`?t:t.querySelector(`input`))?.focus())}#_(e){let t=this.#n;if(t===null)return;this.#n=null;let n=this.renderRoot.querySelector(`#${G(t)}`);n?.matches(`:popover-open`)===!0&&n.hidePopover(),e&&this.renderRoot.querySelector(`[data-popup="${K(t)}"]`)?.focus(),this.requestUpdate()}#v(e,t){let n=t.getBoundingClientRect(),r=getComputedStyle(t).direction===`rtl`,i=e.offsetWidth,a=document.documentElement.clientWidth,o=r?a-n.right:n.left,s=Math.max(8,Math.min(o,a-i-8));e.style.setProperty(`inset-inline-start`,`${s}px`);let c=document.documentElement.clientHeight-e.offsetHeight-8;e.style.setProperty(`inset-block-start`,`${Math.max(8,Math.min(n.bottom+4,c))}px`)}#y(){this.adapter?.focus?.()}#b(e,t){this.#e.enabled.includes(e)&&(this.adapter?.format?.(e,t),this.#y(),this.requestUpdate())}#x(e){this.adapter?.style?.setText(e),this.#_(!1),this.#y(),this.requestUpdate()}#S(e){this.adapter?.style?.setTarget(`block`,e),this.#_(!1),this.#y(),this.requestUpdate()}#C(e=!1){let t=this.#t;return t===null?null:t.hasSelection&&!e?`text`:t.targets[0]?.kind??null}#w(e=!1){let t=this.#C(e);return t===`text`?this.#t?.textClass??null:this.#t?.targets.find(e=>e.kind===t)?.className??null}#T(e){return this.authoring?.styles.some(t=>t.name===e&&t.text!==!0)??!1}#E(e,t){let n=this.#T(e),r=this.#C(n);r!==null&&(t===void 0?this.adapter?.style?.setClass(r,this.#w(n)===e?null:e):this.adapter?.style?.setClass(r,e,t)),this.#_(!1),this.#y(),this.requestUpdate()}#D(){let e=this.#t?.text[`font-family`];return e===void 0?``:this.authoring?.fonts.find(t=>t.stack===e)?.name??(e.split(`,`)[0]??``).replace(/"/g,``).trim()}#O(){let e=this.#t;if(e===null)return{fonts:[],colors:[],blocks:[],clear:[]};let{text:t,textEnabled:n,targets:r}=e,i=r.some(e=>e.kind===`block`),a=(e,t,n,r,i)=>({id:e,label:t,text:null,icon:r,iconName:i,disabled:!n,popup:e,press:()=>{this.#n===e?this.#_(!0):this.#g(e)}}),o=this.#D(),s=/^(\d+(?:\.\d+)?)px$/.exec(t[`font-size`]??``)?.[1]??t[`font-size`]??``,c=(e,t,r)=>({...a(e,this.t(t,{value:r===``?this.t(`toolbar.default`):r}),n,H.chevron,`chevron`),text:r===``?this.t(`toolbar.${e}.name`):r,menu:!0}),l=r.find(e=>e.kind===`block`)?.style??``,u=Ln(l).get(`text-align`),d=u===`right`||u===`end`?`align-end`:u===`center`?`align-center`:u===`justify`?`align-justify`:`align-start`;return{fonts:[c(`font`,`toolbar.font`,o),c(`size`,`toolbar.size`,s)],colors:[{...a(`color`,this.t(`toolbar.color`),n,H.color,`color`),bar:t.color??null},{...a(`highlight`,this.t(`toolbar.highlight`),n,H.highlight,`highlight`),bar:t[`background-color`]??null}],blocks:[a(`align`,this.t(`toolbar.align`),i,H[d],d),a(`spacing`,this.t(`toolbar.spacing`),i,H.spacing,`spacing`)],clear:[{id:`clear`,label:this.t(`toolbar.clear`),text:null,icon:H.clear,iconName:`clear`,disabled:!n&&!i,press:()=>{this.adapter?.style?.clear(),this.#y(),this.requestUpdate()}}]}}async#k(e){let t=this.menu,n=this.adapter;if(t!==null&&n!==null){if(e===`text`)n.insert(`<p></p>`),this.#y();else{if(e===`picture`)await t.insertPicture();else if(e===`page-break`)t.insertPageBreak();else{let[n=``,r]=e.split(`:`);await t.add(n,r)}this.#y()}}}#A(){let e=this.authoring;if(e===null)return[];let t=this.adapter===null,n=[];for(let r of this.featured){if(r===`text`||r===`picture`){let e=this.t(r===`text`?`insert.text`:`insert.picture`);n.push({id:`insert-${r}`,label:e,text:e,icon:r===`text`?H.text:D.picture,iconName:r===`text`?`text`:`image`,disabled:t,data:{content:r},press:()=>void this.#k(r)});continue}if(r===`page-break`){if(this.adapter?.splitPage===void 0)continue;let e=this.t(`insert.pageBreak`);n.push({id:`insert-page-break`,label:e,text:e,icon:D.page,iconName:`files`,data:{content:r},press:()=>void this.#k(r)});continue}let[i=``,a]=r.split(`:`),o=e.descriptor(i);if(o===null)continue;let s=a===void 0?null:e.templates(i).find(e=>e.id===a);if(s===void 0)continue;let c=e.t(o.manifest.messages,s?.label??o.label),l=s?.icon??o.icon;n.push({id:`insert-${r}`,label:c,text:c,icon:Mn.get(l)??D[o.manifest.display],iconName:l,disabled:t,data:a===void 0?{tag:i}:{tag:i,template:a},press:()=>void this.#k(r)})}return n}#j(){let e=this.adapter,t=this.authoring,n=this.#e,r=[],i=(e,t)=>({id:e,label:this.t(`toolbar.${e}`),text:null,icon:H[e],iconName:e,pressed:n.active.includes(e),disabled:!n.enabled.includes(e),...t===void 0?{}:{popup:t},press:()=>{t===void 0?this.#b(e):this.#g(t)}});if(e?.format!==void 0&&e.formatState!==void 0){let t=U.find(e=>n.active.includes(e)),a=this.#w(),o=a===null?void 0:e.style?.rules().find(e=>e.name===a),s=o?.label??o?.name??this.t(`toolbar.${t??`paragraph`}`),c=this.#O();r.push([`group`,[{id:`style`,label:this.t(`toolbar.style`,{style:s}),text:s,icon:H.chevron,iconName:`chevron`,menu:!0,disabled:!U.some(e=>n.enabled.includes(e))&&(this.#t?.targets.length??0)===0,popup:`style`,press:()=>void this.#g(`style`)}]]),c.fonts.length>0&&r.push([`group`,c.fonts]),r.push([`group`,[...Rr.map(e=>i(e)),i(`link`,`link`)]]),c.colors.length>0&&r.push([`group`,c.colors]),c.blocks.length>0&&r.push([`group`,c.blocks]),r.push([`group`,[...zr.map(e=>i(e)),...c.clear]])}let a=(t,n)=>({id:t,label:this.t(`toolbar.${t}`),text:this.t(`toolbar.${t}`),icon:H[n],iconName:n,disabled:e===null,popup:t,press:()=>{this.#n===t?this.#_(!0):this.#g(t)}}),o=t?.descriptors.some(e=>(e.templates??[]).length>0)===!0;if(r.push([`group inserts`,[...this.#A(),a(`elements`,`add`),...o?[a(`templates`,`templates`)]:[],...e?.style===void 0?[]:[a(`layouts`,`layouts`)]]]),e?.wrap!==void 0&&t!==null){let e=t.descriptors.filter(e=>e.wrap!==void 0);e.length>0&&r.push([`group`,e.map(e=>{let n=t.t(e.manifest.messages,e.wrap?.label??``);return{id:`wrap-${e.manifest.tag}`,label:n,text:n,icon:H.wrap,iconName:`wrap`,data:{wrap:e.manifest.tag},press:()=>{this.adapter?.wrap?.(e.manifest.tag),this.#y()}}})])}if(this.views.length>0&&r.push([`group views`,this.views.map(e=>({id:`view-${e.name}`,label:e.label,text:e.label,icon:null,iconName:``,checked:e.name===this.view,press:()=>{if(e.name===this.view)return;let t={view:e.name};this.dispatchEvent(new CustomEvent(Vr,{detail:t,bubbles:!0,composed:!0}))}}))]),e?.undo!==void 0&&e.redo!==void 0){let t=t=>({id:t,label:this.t(`toolbar.${t}`),text:null,icon:H[t],iconName:t,disabled:!n[t],press:()=>{n[t]&&(e[t]?.(),this.#y())}});r.push([`group history`,[t(`undo`),t(`redo`)]])}return r}#M(e){let t=e.target.closest(`[data-item]`);if(t===null)return;let n=Number(t.dataset.item),r=this.#u[n];(r?.popup===`style`||W.has(r?.popup??``))&&(e.key===`ArrowDown`||e.key===`ArrowUp`)?(e.preventDefault(),r?.disabled!==!0&&r?.popup!==void 0&&this.#g(r.popup)):this.#d.keydown(e,n)}#N(e,t){let n=e.disabled===!0,r=e.checked===void 0?e.text===null?`button icon-button`:`button`:`button view`;return g`<button
1161
+ `,Kr=class extends j{static properties={...j.properties,featured:{attribute:!1},views:{attribute:!1},view:{}};static styles=[A,M(`astl-insert-menu, astl-picture-dialog, astl-style-form, astl-style-rules`),Ur,Wr,Gr];#e=Hr;#t=null;#n=null;#r=null;#i=`block`;#a=!1;#o=`elements`;#s=``;#c=!1;#l=null;#u=[];#d=new Kn(this,{count:()=>this.#u.length,item:e=>this.renderRoot.querySelector(`.bar [data-item="${e}"]`),axis:`inline`});constructor(){super(),this.featured=[],this.views=[],this.view=``}get menu(){return this.renderRoot.querySelector(`astl-insert-menu`)}async openMenu(e){await this.#g(e)}async openStyle(e){let t={target:e};this.#_(!1);let n=new CustomEvent(E,{detail:t,bubbles:!0,composed:!0,cancelable:!0});this.dispatchEvent(n)&&(await O(),this.#i=e,await this.#g(`panel`))}async#f(){if(this.#r!==null)return!0;try{let e=await import(`./chunks/style-popups-BobgX1WK.js`),t=this.renderRoot,n=e.stylePopupStyles.styleSheet;return this.#r===null&&n!==void 0&&(t.adoptedStyleSheets=[...t.adoptedStyleSheets,n]),this.#r=e,!0}catch(e){return console.error(e),!1}}connectedCallback(){super.connectedCallback(),this.#p(),document.addEventListener(`pointerdown`,this.#m,!0),document.addEventListener(`keydown`,this.#h)}disconnectedCallback(){super.disconnectedCallback(),this.#p(),document.removeEventListener(`pointerdown`,this.#m,!0),document.removeEventListener(`keydown`,this.#h)}willUpdate(e){super.willUpdate(e),e.has(`adapter`)&&this.#p(),this.#e=this.adapter?.formatState?.()??Hr,this.#t=this.adapter?.style?.state()??null}#p(){let e=this.isConnected?this.adapter:null;if((this.#l?.adapter??null)===e)return;this.#l?.off(),this.#l=null;let t=e?.onCursorChange;e!==null&&t!==void 0&&(this.#l={adapter:e,off:t.call(e,()=>this.requestUpdate())})}#m=e=>{if(this.#n===null)return;let t=e.composedPath(),n=this.renderRoot.querySelector(`#${G(this.#n)}`),r=this.renderRoot.querySelector(`[data-popup="${K(this.#n)}"]`);n!==null&&t.includes(n)||r!==null&&t.includes(r)||t.some(e=>e instanceof Element&&e.localName===`astl-picture-dialog`)||this.#_(!1)};#h=e=>{if(this.#n!==`panel`||e.key!==`Escape`)return;let t=this.renderRoot.querySelector(`#panel`),n=t!==null&&e.composedPath().includes(t);n&&e.defaultPrevented||(e.preventDefault(),this.#_(n))};async#g(e){if((e===`panel`||W.has(e))&&!await this.#f())return;this.#n!==null&&this.#n!==e&&this.#_(!1),this.#n=e,this.#c=!1,this.#a=!1,Br(e)&&(this.#s=``,this.#o=e),this.requestUpdate(),await this.updateComplete;let t=this.renderRoot.querySelector(`#${G(e)}`),n=this.renderRoot.querySelector(`[data-popup="${K(e)}"]`);t!==null&&n!==null&&(t.matches(`:popover-open`)||t.showPopover(),this.menu?.requestUpdate(),this.#v(t,n),(e===`style`||W.has(e)?t.querySelector(`[aria-checked="true"], [aria-pressed="true"]`)??t.querySelector(`button`):e===`panel`?t:t.querySelector(`input`))?.focus())}#_(e){let t=this.#n;if(t===null)return;this.#n=null;let n=this.renderRoot.querySelector(`#${G(t)}`);n?.matches(`:popover-open`)===!0&&n.hidePopover(),e&&this.renderRoot.querySelector(`[data-popup="${K(t)}"]`)?.focus(),this.requestUpdate()}#v(e,t){let n=t.getBoundingClientRect(),r=getComputedStyle(t).direction===`rtl`,i=e.offsetWidth,a=document.documentElement.clientWidth,o=r?a-n.right:n.left,s=Math.max(8,Math.min(o,a-i-8));e.style.setProperty(`inset-inline-start`,`${s}px`);let c=document.documentElement.clientHeight-e.offsetHeight-8;e.style.setProperty(`inset-block-start`,`${Math.max(8,Math.min(n.bottom+4,c))}px`)}#y(){this.adapter?.focus?.()}#b(e,t){this.#e.enabled.includes(e)&&(this.adapter?.format?.(e,t),this.#y(),this.requestUpdate())}#x(e){this.adapter?.style?.setText(e),this.#_(!1),this.#y(),this.requestUpdate()}#S(e){this.adapter?.style?.setTarget(`block`,e),this.#_(!1),this.#y(),this.requestUpdate()}#C(e=!1){let t=this.#t;return t===null?null:t.hasSelection&&!e?`text`:t.targets[0]?.kind??null}#w(e=!1){let t=this.#C(e);return t===`text`?this.#t?.textClass??null:this.#t?.targets.find(e=>e.kind===t)?.className??null}#T(e){return this.authoring?.styles.some(t=>t.name===e&&t.text!==!0)??!1}#E(e,t){let n=this.#T(e),r=this.#C(n);r!==null&&(t===void 0?this.adapter?.style?.setClass(r,this.#w(n)===e?null:e):this.adapter?.style?.setClass(r,e,t)),this.#_(!1),this.#y(),this.requestUpdate()}#D(){let e=this.#t?.text[`font-family`];return e===void 0?``:this.authoring?.fonts.find(t=>t.stack===e)?.name??(e.split(`,`)[0]??``).replace(/"/g,``).trim()}#O(){let e=this.#t;if(e===null)return{fonts:[],colors:[],blocks:[],clear:[]};let{text:t,textEnabled:n,targets:r}=e,i=r.some(e=>e.kind===`block`),a=(e,t,n,r,i)=>({id:e,label:t,text:null,icon:r,iconName:i,disabled:!n,popup:e,press:()=>{this.#n===e?this.#_(!0):this.#g(e)}}),o=this.#D(),s=/^(\d+(?:\.\d+)?)px$/.exec(t[`font-size`]??``)?.[1]??t[`font-size`]??``,c=(e,t,r)=>({...a(e,this.t(t,{value:r===``?this.t(`toolbar.default`):r}),n,H.chevron,`chevron`),text:r===``?this.t(`toolbar.${e}.name`):r,menu:!0}),l=r.find(e=>e.kind===`block`)?.style??``,u=Ln(l).get(`text-align`),d=u===`right`||u===`end`?`align-end`:u===`center`?`align-center`:u===`justify`?`align-justify`:`align-start`;return{fonts:[c(`font`,`toolbar.font`,o),c(`size`,`toolbar.size`,s)],colors:[{...a(`color`,this.t(`toolbar.color`),n,H.color,`color`),bar:t.color??null},{...a(`highlight`,this.t(`toolbar.highlight`),n,H.highlight,`highlight`),bar:t[`background-color`]??null}],blocks:[a(`align`,this.t(`toolbar.align`),i,H[d],d),a(`spacing`,this.t(`toolbar.spacing`),i,H.spacing,`spacing`)],clear:[{id:`clear`,label:this.t(`toolbar.clear`),text:null,icon:H.clear,iconName:`clear`,disabled:!n&&!i,press:()=>{this.adapter?.style?.clear(),this.#y(),this.requestUpdate()}}]}}async#k(e){let t=this.menu,n=this.adapter;if(t!==null&&n!==null){if(e===`text`)n.insert(`<p></p>`),this.#y();else{if(e===`picture`)await t.insertPicture();else if(e===`page-break`)t.insertPageBreak();else{let[n=``,r]=e.split(`:`);await t.add(n,r)}this.#y()}}}#A(){let e=this.authoring;if(e===null)return[];let t=this.adapter===null,n=[];for(let r of this.featured){if(r===`text`||r===`picture`){let e=this.t(r===`text`?`insert.text`:`insert.picture`);n.push({id:`insert-${r}`,label:e,text:e,icon:r===`text`?H.text:D.picture,iconName:r===`text`?`text`:`image`,disabled:t,data:{content:r},press:()=>void this.#k(r)});continue}if(r===`page-break`){if(this.adapter?.splitPage===void 0)continue;let e=this.t(`insert.pageBreak`);n.push({id:`insert-page-break`,label:e,text:e,icon:D.page,iconName:`files`,data:{content:r},press:()=>void this.#k(r)});continue}let[i=``,a]=r.split(`:`),o=e.descriptor(i);if(o===null)continue;let s=a===void 0?null:e.templates(i).find(e=>e.id===a);if(s===void 0)continue;let c=e.t(o.manifest.messages,s?.label??o.label),l=s?.icon??o.icon;n.push({id:`insert-${r}`,label:c,text:c,icon:Mn.get(l)??D[o.manifest.display],iconName:l,disabled:t,data:a===void 0?{tag:i}:{tag:i,template:a},press:()=>void this.#k(r)})}return n}#j(){let e=this.adapter,t=this.authoring,n=this.#e,r=[],i=(e,t)=>({id:e,label:this.t(`toolbar.${e}`),text:null,icon:H[e],iconName:e,pressed:n.active.includes(e),disabled:!n.enabled.includes(e),...t===void 0?{}:{popup:t},press:()=>{t===void 0?this.#b(e):this.#g(t)}});if(e?.format!==void 0&&e.formatState!==void 0){let t=U.find(e=>n.active.includes(e)),a=this.#w(),o=a===null?void 0:e.style?.rules().find(e=>e.name===a),s=o?.label??o?.name??this.t(`toolbar.${t??`paragraph`}`),c=this.#O();r.push([`group`,[{id:`style`,label:this.t(`toolbar.style`,{style:s}),text:s,icon:H.chevron,iconName:`chevron`,menu:!0,disabled:!U.some(e=>n.enabled.includes(e))&&(this.#t?.targets.length??0)===0,popup:`style`,press:()=>void this.#g(`style`)}]]),c.fonts.length>0&&r.push([`group`,c.fonts]),r.push([`group`,[...Rr.map(e=>i(e)),i(`link`,`link`)]]),c.colors.length>0&&r.push([`group`,c.colors]),c.blocks.length>0&&r.push([`group`,c.blocks]),r.push([`group`,[...zr.map(e=>i(e)),...c.clear]])}let a=(t,n)=>({id:t,label:this.t(`toolbar.${t}`),text:this.t(`toolbar.${t}`),icon:H[n],iconName:n,disabled:e===null,popup:t,press:()=>{this.#n===t?this.#_(!0):this.#g(t)}}),o=t?.descriptors.some(e=>(e.templates??[]).length>0)===!0;if(r.push([`group inserts`,[...this.#A(),a(`elements`,`add`),...o?[a(`templates`,`templates`)]:[],...e?.style===void 0?[]:[a(`layouts`,`layouts`)]]]),e?.wrap!==void 0&&t!==null){let e=t.descriptors.filter(e=>e.wrap!==void 0);e.length>0&&r.push([`group`,e.map(e=>{let n=t.t(e.manifest.messages,e.wrap?.label??``);return{id:`wrap-${e.manifest.tag}`,label:n,text:n,icon:H.wrap,iconName:`wrap`,data:{wrap:e.manifest.tag},press:()=>{this.adapter?.wrap?.(e.manifest.tag),this.#y()}}})])}if(this.views.length>1&&r.push([`group views`,this.views.map(e=>({id:`view-${e.name}`,label:e.label,text:e.label,icon:null,iconName:``,checked:e.name===this.view,...e.description===void 0?{}:{description:e.description},press:()=>{if(e.name===this.view)return;let t={view:e.name};this.dispatchEvent(new CustomEvent(Vr,{detail:t,bubbles:!0,composed:!0}))}}))]),e?.undo!==void 0&&e.redo!==void 0){let t=t=>({id:t,label:this.t(`toolbar.${t}`),text:null,icon:H[t],iconName:t,disabled:!n[t],press:()=>{n[t]&&(e[t]?.(),this.#y())}});r.push([`group history`,[t(`undo`),t(`redo`)]])}return r}#M(e){let t=e.target.closest(`[data-item]`);if(t===null)return;let n=Number(t.dataset.item),r=this.#u[n];(r?.popup===`style`||W.has(r?.popup??``))&&(e.key===`ArrowDown`||e.key===`ArrowUp`)?(e.preventDefault(),r?.disabled!==!0&&r?.popup!==void 0&&this.#g(r.popup)):this.#d.keydown(e,n)}#N(e,t){let n=e.disabled===!0,r=e.checked===void 0?e.text===null?`button icon-button`:`button`:`button view`;return g`<button
1127
1162
  type="button"
1128
1163
  part=${r}
1129
1164
  class=${e.text===null?`icon-only`:`labelled`}
@@ -1135,7 +1170,7 @@ color: GrayText;
1135
1170
  data-popup=${e.popup??S}
1136
1171
  tabindex=${this.#d.tabIndex(t)}
1137
1172
  aria-label=${e.text===null||e.menu===!0?e.label:S}
1138
- title=${e.text===null?e.label:S}
1173
+ title=${e.description??(e.text===null?e.label:S)}
1139
1174
  aria-pressed=${e.pressed===void 0?S:String(e.pressed)}
1140
1175
  role=${e.checked===void 0?S:`radio`}
1141
1176
  aria-checked=${e.checked===void 0?S:String(e.checked)}
@@ -1268,7 +1303,12 @@ color: GrayText;
1268
1303
  .filter=${this.#s}
1269
1304
  .groups=${Ir[this.#o]}
1270
1305
  ></astl-insert-menu>
1271
- </div>`}render(){if(this.authoring===null)return S;let{lang:e,dir:t}=this.ui,n=this.views.length>0&&this.view!==this.views[0]?.name,r=this.#j().map(([e,t])=>[e,n?t.map(e=>e.checked===void 0?{...e,disabled:!0}:e):t]);this.#u=r.flatMap(([,e])=>e);let i=0;return g`<div
1306
+ </div>`}render(){if(this.authoring===null)return S;let{lang:e,dir:t}=this.ui,n=this.views.length>0&&this.view!==this.views[0]?.name,r=this.#j().map(([e,t])=>[e,n?t.map(e=>e.checked===void 0?{...e,disabled:!0}:e):t]);this.#u=r.flatMap(([,e])=>e);let i=0,a=([e,t],n)=>g`<div class=${e} role=${e===`group views`?`radiogroup`:`presentation`}
1307
+ part=${e===`group views`?`views`:S}
1308
+ aria-label=${e===`group views`?this.t(`toolbar.view`):S}>
1309
+ ${n===0||e===`group views`?S:g`<span class="separator" part="separator" aria-hidden="true"></span>`}
1310
+ ${t.map(e=>this.#N(e,i++))}
1311
+ </div>`,o=Math.max(0,r.findIndex(([e])=>e===`group inserts`));return g`<div
1272
1312
  class="bar"
1273
1313
  part="toolbar"
1274
1314
  role="toolbar"
@@ -1278,18 +1318,14 @@ color: GrayText;
1278
1318
  @mousedown=${e=>{e.target.closest(`button`)!==null&&e.preventDefault()}}
1279
1319
  @keydown=${e=>this.#M(e)}
1280
1320
  >
1281
- ${r.map(([e,t],n)=>g`<div class=${e} role=${e===`group views`?`radiogroup`:`presentation`}
1282
- part=${e===`group views`?`views`:S}
1283
- aria-label=${e===`group views`?this.t(`toolbar.view`):S}>
1284
- ${n===0||e===`group views`?S:g`<span class="separator" part="separator" aria-hidden="true"></span>`}
1285
- ${t.map(e=>this.#N(e,i++))}
1286
- </div>`)}
1321
+ ${o===0?S:g`<div class="formats">${r.slice(0,o).map((e,t)=>a(e,t))}</div>`}
1322
+ <div class="actions">${r.slice(o).map((e,t)=>a(e,o+t))}</div>
1287
1323
  </div>
1288
1324
  <div lang=${e} dir=${t}>
1289
1325
  ${this.#L()} ${this.#R()} ${this.#z()} ${this.#I()}
1290
1326
  </div>
1291
1327
  <astl-picture-dialog .authoring=${this.authoring}></astl-picture-dialog>`}updated(e){super.updated(e);let t=this.menu;t!==null&&(t.dialog=this.renderRoot.querySelector(`astl-picture-dialog`));for(let e of this.renderRoot.querySelectorAll(`.color-mark`))e.style.background=e.dataset.color??``;for(let e of this.renderRoot.querySelectorAll(`[data-font]`))e.style.fontFamily=e.dataset.font??``;if(this.#n===null)return;let n=this.renderRoot.querySelector(`#${G(this.#n)}`),r=this.renderRoot.querySelector(`[data-popup="${K(this.#n)}"]`);n!==null&&r!==null&&n.matches(`:popover-open`)&&this.#v(n,r)}},qr=[[`astl-insert-menu`,Pn],[`astl-inspector`,Er],[`astl-issues`,Dr],[`astl-preview`,Fr],[`astl-toolbar`,Kr],[`astl-picture-dialog`,Or],[`astl-picture-field`,Nr]];function Jr(e=customElements){Nn(e);for(let[t,n]of qr){let r=e.get(t);if(r!==n){if(r!==void 0)throw Error(`<${t}> is already defined by another class`);e.define(t,n)}}}var Yr=new Set([`p`,`h2`,`h3`,`h4`]),q=e=>e.endTag?.start??e.end;function Xr(e){let t=Tn(e),n=t.find(e=>e.name===He),r=n?.children??t,i=r.findIndex(e=>e.name!==Vt),a=i<0?[]:r.slice(i);return{start:(i<0?r.at(-1):r[i-1])?.end??n?.startTag.end??0,end:n===void 0?e.length:q(n),blocks:a,pages:a.filter(e=>e.name===C)}}function J(e){let t=1;for(;e.has(`page-${t}`);)t++;return e.add(`page-${t}`),`page-${t}`}function Zr(e){let t=0;for(let n of Dn(e)){if(e.slice(t,n.start).trim()!==``||n.type===`start`&&(n.name===`br`||n.name===`img`||n.name.includes(`-`)))return!1;t=n.end}return e.slice(t).trim()===``}function Qr(e,t){let n=[e];for(let r=e;;){if(t<r.startTag.end||t>q(r))return null;let e=r.children.find(e=>e.start<t&&t<e.end);if(e===void 0)return n;if(e.name.includes(`-`))return null;n.push(e),r=e}}function $r(e,t){let n=Xr(e),r=n.pages.find(e=>e.startTag.end<=t&&t<=q(e));if(n.pages.length>0?r===void 0:t<n.start||t>n.end)return null;let[i,a]=r===void 0?[n.start,n.end]:[r.startTag.end,q(r)],o=r?.children??n.blocks,s=t,c=``,l=``,u=o.find(e=>e.start<t&&t<e.end);if(u!==void 0){let n=Yr.has(u.name)?Qr(u,t):null;n===null?s=u.end:Zr(e.slice(u.startTag.end,t))?s=u.start:Zr(e.slice(t,q(u)))?s=u.end:(c=n.map(e=>`</${e.name}>`).reverse().join(``),l=n.map(t=>e.slice(t.startTag.start,t.startTag.end)).join(``))}let d=Cn(e),f=r===void 0?`<astl-page id="${J(d)}">`:``,p=J(d),m=(r?.startTag.attributes??[]).filter(e=>Se.has(e.name)||e.name===`class`).map(t=>` ${e.slice(t.start,t.end)}`).join(``),ee=l!==``||o.some(e=>e.end<=s)?``:`<p></p>`,te=l===``&&!o.some(e=>e.start>=s),h=`${e.slice(0,i)}${f}${e.slice(i,s)}${c}${ee}</astl-page><astl-page id="${p}"${m}>${te?`<p>`:l}`;return{source:h+`${te?`</p>`:``}${e.slice(s,a)}${f===``?``:`</astl-page>`}${e.slice(a)}`,caret:h.length,id:p}}function ei(e,t){let n=Xr(e),r=Cn(e),i=n.pages.find(e=>wn(e.startTag,`id`)===t)??n.pages.at(-1),a=i===void 0?`${e.slice(0,n.start)}<astl-page id="${J(r)}">${e.slice(n.start,n.end)}</astl-page>`:e.slice(0,i.end),o=J(r),s=`${a}<astl-page id="${o}"><p>`;return{source:`${s}</p></astl-page>${e.slice(i?.end??n.end)}`,caret:s.length,id:o}}function ti(e,t){let{pages:n}=Xr(e),r=n.findIndex(e=>wn(e.startTag,`id`)===t),i=n[r-1]?.endTag,a=n[r]?.startTag;if(r<1||i==null||a===void 0)return null;let o=e.slice(0,i.start)+e.slice(i.end,a.start);return{source:o+e.slice(a.end),caret:o.length}}var ni=[`select`,`keyup`,`click`,`focus`];function ri(e,t){return e?.id===t?.id&&e?.tag===t?.tag}var ii=e=>e.tag!==C;function ai(e,t,n){let r=En(e),i=r.filter(e=>ii(e)&&(t===n?e.start<t:e.start<n)&&t<e.end),a=i[i.length-1];if(a!==void 0)return[a.end,a.end];let o=Dn(e),s=e=>o.find(t=>t.start<e&&e<t.end),c=s(t);if(c!==void 0)return[c.end,c.end];if(s(n)!==void 0)return[t,t];let l=o.find(e=>e.type===`start`&&e.name===`astl-doc`),u=o.findLast(e=>e.type===`end`&&e.name===`astl-doc`);if(l===void 0||t>=l.end&&(u===void 0||n<=u.start))return[t,n];let d=r.filter(e=>e.tag===C),f=d[d.length-1],p=(f&&o.find(e=>e.type===`end`&&e.name===`astl-page`&&e.end===f.end))?.start??u?.start??e.length;return[p,p]}function oi(e,t){let n=e.value.slice(0,t).split(`
1292
- `).length-1,r=Number.parseFloat(getComputedStyle(e).lineHeight)||20;e.scrollTop=Math.max(0,n*r-e.clientHeight/3),e.setSelectionRange(t,t)}function si(e){let t=new Set,n=new Set,r=null,i=()=>{let t=e.value;return r?.value!==t&&(r={value:t,elements:En(t)}),r.elements},a=e=>i().find(t=>ii(t)&&t.id===e)??null,o=()=>{let t=e.selectionStart,n=i().find(e=>ii(e)&&e.start<=t&&t<e.end);return n?.id?{id:n.id,tag:n.tag}:null},s=o(),c=()=>{let e=o();if(!ri(e,s)){s=e;for(let t of[...n])t(e)}},l=()=>{for(let e of[...t])e();c()};e.addEventListener(`input`,l);for(let t of ni)e.addEventListener(t,c);let u=t=>{let n=e.value,r=Math.min(n.length,t.length),i=0;for(;i<r&&n[i]===t[i];)i++;let a=0;for(;a<r-i&&n[n.length-1-a]===t[t.length-1-a];)a++;e.setRangeText(t.slice(i,t.length-a),i,n.length-a,`preserve`),l()},d=t=>{u(t.source),oi(e,t.caret),c()};return{getSource:()=>e.value,setSource:u,insert(t){let[n,r]=ai(e.value,e.selectionStart,e.selectionEnd);e.setRangeText(t,n,r,`select`),l()},getElement(t){let n=a(t);return n===null?null:e.value.slice(n.start,n.end)},replaceElement(t,n){let r=a(t);if(r===null)return;let{selectionStart:i,selectionEnd:o,selectionDirection:s}=e,c=n.length-(r.end-r.start),u=e=>e<r.start?e:e>=r.end?e+c:Math.min(e,r.start+Math.max(0,n.length-1));e.setRangeText(n,r.start,r.end,`preserve`),e.setSelectionRange(u(i),u(o),s),l()},getSelection:o,select(t){let n=i().find(e=>e.id===t);n!==void 0&&(oi(e,n.start),e.focus(),c())},splitPage(){let t=$r(e.value,e.selectionStart);return t!==null&&d(t),t?.id??null},addPage(t){let n=ei(e.value,t);return d(n),n.id},mergePage(t){let n=ti(e.value,t);return n!==null&&d(n),n!==null},onChange(e){return t.add(e),()=>t.delete(e)},onSelectionChange(e){return n.add(e),()=>n.delete(e)},destroy(){e.removeEventListener(`input`,l);for(let t of ni)e.removeEventListener(t,c);t.clear(),n.clear()}}}
1328
+ `).length-1,r=Number.parseFloat(getComputedStyle(e).lineHeight)||20;e.scrollTop=Math.max(0,n*r-e.clientHeight/3),e.setSelectionRange(t,t)}function si(e){let t=new Set,n=new Set,r=null,i=()=>{let t=e.value;return r?.value!==t&&(r={value:t,elements:En(t)}),r.elements},a=e=>i().find(t=>ii(t)&&t.id===e)??null,o=()=>{let t=e.selectionStart,n=i().find(e=>ii(e)&&e.start<=t&&t<e.end);return n?.id?{id:n.id,tag:n.tag}:null},s=o(),c=()=>{let e=o();if(!ri(e,s)){s=e;for(let t of[...n])t(e)}},l=()=>{for(let e of[...t])e();c()};e.addEventListener(`input`,l);for(let t of ni)e.addEventListener(t,c);let u=t=>{let n=e.value,r=Math.min(n.length,t.length),i=0;for(;i<r&&n[i]===t[i];)i++;let a=0;for(;a<r-i&&n[n.length-1-a]===t[t.length-1-a];)a++;e.setRangeText(t.slice(i,t.length-a),i,n.length-a,`preserve`),l()},d=t=>{u(t.source),oi(e,t.caret),c()};return{editsSource:!0,getSource:()=>e.value,setSource:u,insert(t){let[n,r]=ai(e.value,e.selectionStart,e.selectionEnd);e.setRangeText(t,n,r,`select`),l()},getElement(t){let n=a(t);return n===null?null:e.value.slice(n.start,n.end)},replaceElement(t,n){let r=a(t);if(r===null)return;let{selectionStart:i,selectionEnd:o,selectionDirection:s}=e,c=n.length-(r.end-r.start),u=e=>e<r.start?e:e>=r.end?e+c:Math.min(e,r.start+Math.max(0,n.length-1));e.setRangeText(n,r.start,r.end,`preserve`),e.setSelectionRange(u(i),u(o),s),l()},getSelection:o,select(t){let n=i().find(e=>e.id===t);n!==void 0&&(oi(e,n.start),e.focus(),c())},splitPage(){let t=$r(e.value,e.selectionStart);return t!==null&&d(t),t?.id??null},addPage(t){let n=ei(e.value,t);return d(n),n.id},mergePage(t){let n=ti(e.value,t);return n!==null&&d(n),n!==null},onChange(e){return t.add(e),()=>t.delete(e)},onSelectionChange(e){return n.add(e),()=>n.delete(e)},destroy(){e.removeEventListener(`input`,l);for(let t of ni)e.removeEventListener(t,c);t.clear(),n.clear()}}}
1293
1329
  /**
1294
1330
  * @license
1295
1331
  * Copyright 2021 Google LLC
@@ -1411,18 +1447,18 @@ padding: var(--astl-focus-width);
1411
1447
  margin: calc(-1 * var(--astl-focus-width));
1412
1448
  }
1413
1449
  }
1414
- `],di=e=>`load`in e?e.tag:e.manifest.tag,fi=null;function pi(){return fi??=Array.from(crypto.getRandomValues(new Uint8Array(16)),e=>e.toString(16).padStart(2,`0`)).join(``),fi}function mi(e,t){return ie({components:t,secret:pi(),slotKinds:[...e.slotKinds.values()],profile:e.profile,catalogs:e.catalogs,styleTemplates:[...e.styleTemplates.values()],...e.urlPolicy===null?{}:{urlPolicy:e.urlPolicy},...e.groundColors===null?{}:{groundColors:e.groundColors}})}var hi={components:new Map,editors:new Map,elements:new Map,styleTemplates:new Map,slotKinds:new Map,catalogs:[],profile:{},urlPolicy:null,groundColors:null,uploadAsset:null,pickPicture:null,fonts:Rn,styles:In,featured:[],views:[],menuMessages:null},Y=null;function X(){return Y??={...hi,engine:mi(hi,[]),version:0},Y}var gi=new Set;function Z(e,t,n,r){let i=new Map(e);for(let e of t??[]){let t=n(e),a=i.get(t);if(a!==void 0&&a!==e)throw Error(`${r} ${t} is already registered`);i.set(t,e)}return i}function _i(e){let t=Y??{...hi,version:0},n=e=>e.manifest.tag,r={components:Z(t.components,e.components,n,`Component`),editors:Z(t.editors,e.editors,n,`Editor descriptor`),elements:Z(t.elements,e.elements,di,`Preview element`),styleTemplates:Z(t.styleTemplates,e.styleTemplates,e=>e.name,`Style template`),slotKinds:Z(t.slotKinds,e.slotKinds,e=>e.kind,`Slot kind`),catalogs:[...new Set([...t.catalogs,...e.catalogs??[]])],profile:{...t.profile,...e.profile},urlPolicy:e.urlPolicy??t.urlPolicy,groundColors:e.groundColors??t.groundColors,uploadAsset:e.uploadAsset??t.uploadAsset,pickPicture:e.pickPicture??t.pickPicture,fonts:e.fonts??t.fonts,styles:e.styles??t.styles,featured:e.featured??t.featured,views:e.views??t.views,menuMessages:e.menuMessages??t.menuMessages},i=[`components`,`editors`,`elements`,`styleTemplates`,`slotKinds`],a=e=>JSON.stringify(Object.entries(e).sort());if(Y!==null&&i.every(e=>r[e].size===t[e].size)&&r.catalogs.length===t.catalogs.length&&r.urlPolicy===t.urlPolicy&&JSON.stringify(r.groundColors)===JSON.stringify(t.groundColors)&&r.uploadAsset===t.uploadAsset&&r.pickPicture===t.pickPicture&&r.menuMessages===t.menuMessages&&JSON.stringify(r.fonts)===JSON.stringify(t.fonts)&&JSON.stringify(r.styles)===JSON.stringify(t.styles)&&r.featured.join(` `)===t.featured.join(` `)&&JSON.stringify(r.views)===JSON.stringify(t.views)&&a(r.profile)===a(t.profile))return;let o=mi(r,[...r.components.values()]);jn({engine:o,descriptors:[...r.editors.values()],locale:`en`,fonts:r.fonts,styles:r.styles}),Y={...r,engine:o,version:t.version+1};for(let e of gi)e.requestUpdate()}function vi(e,t,n){let r=e=>[...e.entries()].filter(([e])=>n===null||n.includes(e)).map(([,e])=>e);return jn({engine:n===null?e.engine:mi(e,r(e.components)),descriptors:r(e.editors),elements:r(e.elements),locale:t,catalogs:e.catalogs,styleTemplates:[...e.styleTemplates.values()],fonts:e.fonts,styles:e.styles,...e.urlPolicy===null?{}:{urlPolicy:e.urlPolicy},...e.uploadAsset===null?{}:{uploadAsset:e.uploadAsset},...e.pickPicture===null?{}:{pickPicture:e.pickPicture},...e.menuMessages===null?{}:{menuMessages:e.menuMessages}})}var yi=[`light`,`dark`,`hc`,`auto`],bi=`astl-editor-change`,xi=`astl-editor-ready`,Si=`astl-editor-view`,Ci=[`visual`,`source`],wi=300,Ti=[`issues`,`inspector`],Ei={fromAttribute:e=>e===null?null:e.split(/\s+/).filter(e=>e!==``)},Di={fromAttribute:e=>{try{return e===null?null:JSON.parse(e)}catch{return null}}},Oi=[`chevron`,`bold`,`italic`,`underline`,`link`,`bulleted`,`numbered`,`undo`,`redo`,`wrap`,`text`,`image`,`files`,`add`,`templates`],ki=`header: inspector-header, id: inspector-id, actions: inspector-actions, issue: inspector-issue, field: inspector-field, label: inspector-label, style: inspector-style`,Q=null,$=null,Ai=class extends Xt{static properties={locale:{},components:{converter:Ei},featured:{converter:Ei},panels:{converter:Ei},view:{},views:{converter:Di},theme:{},previewPolicy:{attribute:!1},adapter:{attribute:!1}};static styles=ui;#e=null;#t=null;#n=null;#r=!1;#i=!1;#a=null;#o=null;#s=0;#c=null;#l=()=>{};#u=new Promise(e=>{this.#l=e});#d={ask:e=>this.renderRoot.querySelector(`astl-picture-dialog`)?.ask(e)??Promise.resolve(null),refuse:()=>{this.#a={key:`picture.pasteRefused`},this.requestUpdate()},style:e=>{this.renderRoot.querySelector(`astl-toolbar`)?.openStyle(e)}};#f=e=>{this.#o=e};#p={start:!1,end:!1};#m=e=>{let t=e.target,n=t.name===`end`?`end`:`start`,r=t.assignedElements().length>0;this.#p[n]!==r&&(this.#p[n]=r,this.requestUpdate())};#h=null;#g=null;#_=[];#v=null;#y;#b=null;#x=null;constructor(){if(super(),this.locale=null,this.components=null,this.featured=null,this.panels=null,this.view=`visual`,this.views=null,this.theme=`auto`,this.previewPolicy=null,this.adapter=null,Object.hasOwn(this,`value`)){let e=this.value;delete this.value,typeof e==`string`&&(this.value=e)}}get value(){return this.adapter?.getSource()??this.#e??`<astl-doc lang="${this.authoring.locale}"></astl-doc>`}set value(e){this.adapter===null?this.#e=e:this.adapter.setSource(e)}get ready(){return this.#u}async preview(){await this.updateComplete,await this.renderRoot.querySelector(`astl-preview`)?.refresh()}get authoring(){let e=X(),t=this.#k(e),n=this.components,r=typeof n==`string`?n.split(/\s+/).filter(e=>e!==``):n,i=`${e.version}\n${t}\n${r===null?`*`:r.join(` `)}`;return this.#b?.key!==i&&(this.#b={key:i,authoring:vi(e,t,r)}),this.#b.authoring}connectedCallback(){super.connectedCallback(),gi.add(this),this.#t===!0&&this.#D(),this.#O()}disconnectedCallback(){super.disconnectedCallback(),gi.delete(this),clearTimeout(this.#y),this.#c=null,this.#O();let e=this.#n;e!==null&&(this.#e=e.adapter.getSource(),e.destroy(),this.#n=null,this.adapter=null)}#S(){let e=this.views??X().views;return Array.isArray(e)?e:[]}#C(){return[...Ci,...this.#S().map(e=>e.name)].includes(this.view)?this.view:`visual`}#w(){let e=this.#g??this.#h??this.value,t=this.authoring.validate(e).issues.filter(e=>e.severity===`error`);return this.#_=t,t.length>0?(this.#a={key:`view.sourceErrors`,params:{n:t.length}},this.#s++,!1):(this.#g!==null&&$?.formatHtml(this.#g)!==this.#h&&(this.value=this.#g),this.#g=null,!0)}#T(e){clearTimeout(this.#y),this.#y=setTimeout(()=>{let e=this.adapter;this.#v=e===null?null:this.authoring.outline(e.getSource()),this.requestUpdate()},e)}willUpdate(e){if(e.has(`theme`)&&(this.dataset.theme=this.#A()),e.has(`view`)){let t=e.get(`view`);t===`source`&&this.view!==`source`&&!this.#w()?this.view=`source`:this.view===`source`&&t!==`source`&&(this.#h=this.#g=null,this.#_=[],$===null&&import(`./chunks/source-view-DXKPFCl9.js`).then(e=>{$=e,this.requestUpdate()},e=>console.error(e)))}let t=this.#n;if(t!==null&&this.adapter!==t.adapter&&(this.adapter===null&&(this.#e=t.adapter.getSource()),t.destroy(),this.#n=null),this.adapter!==null&&this.#n===null)this.#t=!1,this.#e!==null&&this.adapter.setSource(this.#e),this.#e=null;else if(this.adapter===null&&this.#n===null)this.isConnected&&(this.#t===null||e.has(`adapter`))&&this.#E();else if(this.#n!==null&&Q!==null&&this.#n.authoring!==this.authoring){let e=this.#n.adapter.getSource();this.#n.destroy(),this.#n=Q.createSurface(this,this.authoring,X().engine.manifests,e,this.#d,this.#f),this.adapter=this.#n.adapter}this.#O()}updated(e){e.has(`theme`)&&this.renderRoot.querySelector(`astl-preview`)?.requestUpdate();let t=this.adapter;t!==null&&t!==this.#c&&this.isConnected&&(this.#c=t,this.#T(0),this.#l(),this.dispatchEvent(new Event(xi,{bubbles:!0,composed:!0})));let n=e.get(`view`);e.has(`view`)&&n!==void 0&&n!==this.view&&this.dispatchEvent(new CustomEvent(Si,{detail:{view:this.view},bubbles:!0,composed:!0}))}#E(){document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,()=>this.requestUpdate(`adapter`),{once:!0}):(this.#t=this.querySelector(`:scope > [slot="surface"]`)===null,this.#t&&this.#D())}async#D(){if(!(this.#r||this.#n!==null)){this.#r=!0,this.#i=!1;try{if(Q??=await import(`./chunks/surface-CgxfAwCR.js`),!this.isConnected||!this.#t||this.adapter!==null||this.#n!==null)return;this.#n=Q.createSurface(this,this.authoring,X().engine.manifests,this.value,this.#d,this.#f),this.#e=null,this.adapter=this.#n.adapter}catch(e){this.#i=!0,console.error(e)}finally{this.#r=!1,this.requestUpdate()}}}#O(){let e=this.isConnected?this.adapter:null;(this.#x?.adapter??null)!==e&&(this.#x?.off(),this.#x=e===null?null:{adapter:e,off:e.onChange(()=>{let e=this.#o;this.#o=null,(this.#a!==null||e!==null)&&(this.#a=e,e!==null&&this.#s++,this.requestUpdate()),this.#T(wi),this.dispatchEvent(new Event(bi,{bubbles:!0,composed:!0}))})})}#k(e){let t=this.locale?[this.locale]:this.lang?[this.lang]:[...navigator.languages??[],navigator.language].filter(e=>!!e),n=[...Fn,...e.catalogs].filter(e=>e.namespace===k).map(e=>e.locale);return Wt(t,[...new Set(n)],`en`)}#A(){let e=this.theme;return e!==null&&yi.includes(e)?e:`auto`}render(){let{authoring:e,adapter:t}=this,n=this.#A(),r=this.#i?{key:`surface.failed`}:this.#t&&t===null?{key:`surface.loading`}:this.#a,i=e.locale,a=e=>typeof e==`string`?e.split(/\s+/).filter(e=>e!==``):e,o=a(this.featured)??X().featured,s=(a(this.panels)??Ti).filter(e=>Ti.includes(e)),c=new Set([...Oi,...e.descriptors.flatMap(e=>[e.icon,...(e.templates??[]).map(t=>t.icon??e.icon)])]),l=[`toolbar: toolbar-bar`,`button: toolbar-button`,`icon-button: toolbar-icon-button`,`views: toolbar-views`,`view: toolbar-view`,`separator: toolbar-separator`,`icon: toolbar-icon`,`insert`,`menu: insert-menu`,`style-menu`,`style-colors`,`style-panel`].concat([...c].map(e=>`icon-${e}`)).join(`, `),u=r=>r===`issues`?g`<astl-issues part="issues" data-theme=${n} .authoring=${e} .adapter=${t}></astl-issues>`:g`<astl-inspector part="inspector" exportparts=${ki} data-theme=${n} .authoring=${e} .adapter=${t}></astl-inspector>`,d=(t,n)=>e.t(k,t,n),f=this.#C(),p=[...Ci.map(e=>({name:e,label:d(`view.${e}`)})),...this.#S()],m=f!==`visual`;return g`<div class=${s.length===0||m?`layout solo`:`layout`}>
1450
+ `],di=e=>`load`in e?e.tag:e.manifest.tag,fi=null;function pi(){return fi??=Array.from(crypto.getRandomValues(new Uint8Array(16)),e=>e.toString(16).padStart(2,`0`)).join(``),fi}function mi(e,t){return ie({components:t,secret:pi(),slotKinds:[...e.slotKinds.values()],profile:e.profile,catalogs:e.catalogs,styleTemplates:[...e.styleTemplates.values()],...e.urlPolicy===null?{}:{urlPolicy:e.urlPolicy},...e.groundColors===null?{}:{groundColors:e.groundColors}})}var hi={components:new Map,editors:new Map,elements:new Map,styleTemplates:new Map,slotKinds:new Map,catalogs:[],profile:{},urlPolicy:null,groundColors:null,uploadAsset:null,pickPicture:null,fonts:Rn,styles:In,featured:[],views:[],menuMessages:null},Y=null;function X(){return Y??={...hi,engine:mi(hi,[]),version:0},Y}var gi=new Set;function Z(e,t,n,r){let i=new Map(e);for(let e of t??[]){let t=n(e),a=i.get(t);if(a!==void 0&&a!==e)throw Error(`${r} ${t} is already registered`);i.set(t,e)}return i}function _i(e){let t=Y??{...hi,version:0},n=e=>e.manifest.tag,r={components:Z(t.components,e.components,n,`Component`),editors:Z(t.editors,e.editors,n,`Editor descriptor`),elements:Z(t.elements,e.elements,di,`Preview element`),styleTemplates:Z(t.styleTemplates,e.styleTemplates,e=>e.name,`Style template`),slotKinds:Z(t.slotKinds,e.slotKinds,e=>e.kind,`Slot kind`),catalogs:[...new Set([...t.catalogs,...e.catalogs??[]])],profile:{...t.profile,...e.profile},urlPolicy:e.urlPolicy??t.urlPolicy,groundColors:e.groundColors??t.groundColors,uploadAsset:e.uploadAsset??t.uploadAsset,pickPicture:e.pickPicture??t.pickPicture,fonts:e.fonts??t.fonts,styles:e.styles??t.styles,featured:e.featured??t.featured,views:e.views??t.views,menuMessages:e.menuMessages??t.menuMessages},i=[`components`,`editors`,`elements`,`styleTemplates`,`slotKinds`],a=e=>JSON.stringify(Object.entries(e).sort());if(Y!==null&&i.every(e=>r[e].size===t[e].size)&&r.catalogs.length===t.catalogs.length&&r.urlPolicy===t.urlPolicy&&JSON.stringify(r.groundColors)===JSON.stringify(t.groundColors)&&r.uploadAsset===t.uploadAsset&&r.pickPicture===t.pickPicture&&r.menuMessages===t.menuMessages&&JSON.stringify(r.fonts)===JSON.stringify(t.fonts)&&JSON.stringify(r.styles)===JSON.stringify(t.styles)&&r.featured.join(` `)===t.featured.join(` `)&&JSON.stringify(r.views)===JSON.stringify(t.views)&&a(r.profile)===a(t.profile))return;let o=mi(r,[...r.components.values()]);jn({engine:o,descriptors:[...r.editors.values()],locale:`en`,fonts:r.fonts,styles:r.styles}),Y={...r,engine:o,version:t.version+1};for(let e of gi)e.requestUpdate()}function vi(e,t,n){let r=e=>[...e.entries()].filter(([e])=>n===null||n.includes(e)).map(([,e])=>e);return jn({engine:n===null?e.engine:mi(e,r(e.components)),descriptors:r(e.editors),elements:r(e.elements),locale:t,catalogs:e.catalogs,styleTemplates:[...e.styleTemplates.values()],fonts:e.fonts,styles:e.styles,...e.urlPolicy===null?{}:{urlPolicy:e.urlPolicy},...e.uploadAsset===null?{}:{uploadAsset:e.uploadAsset},...e.pickPicture===null?{}:{pickPicture:e.pickPicture},...e.menuMessages===null?{}:{menuMessages:e.menuMessages}})}var yi=[`light`,`dark`,`hc`,`auto`],bi=`astl-editor-change`,xi=`astl-editor-ready`,Si=`astl-editor-view`,Ci=[`visual`,`source`],wi=300,Ti=[`issues`,`inspector`],Ei={fromAttribute:e=>e===null?null:e.split(/\s+/).filter(e=>e!==``)},Di={fromAttribute:e=>{try{return e===null?null:JSON.parse(e)}catch{return null}}},Oi=[`chevron`,`bold`,`italic`,`underline`,`link`,`bulleted`,`numbered`,`undo`,`redo`,`wrap`,`text`,`image`,`files`,`add`,`templates`],ki=`header: inspector-header, id: inspector-id, actions: inspector-actions, issue: inspector-issue, field: inspector-field, label: inspector-label, style: inspector-style`,Q=null,$=null,Ai=class extends Xt{static properties={locale:{},components:{converter:Ei},featured:{converter:Ei},panels:{converter:Ei},view:{},views:{converter:Di},theme:{},previewPolicy:{attribute:!1},adapter:{attribute:!1}};static styles=ui;#e=null;#t=null;#n=null;#r=!1;#i=!1;#a=null;#o=null;#s=0;#c=null;#l=()=>{};#u=new Promise(e=>{this.#l=e});#d={ask:e=>this.renderRoot.querySelector(`astl-picture-dialog`)?.ask(e)??Promise.resolve(null),refuse:()=>{this.#a={key:`picture.pasteRefused`},this.requestUpdate()},style:e=>{this.renderRoot.querySelector(`astl-toolbar`)?.openStyle(e)}};#f=e=>{this.#o=e};#p={start:!1,end:!1};#m=e=>{let t=e.target,n=t.name===`end`?`end`:`start`,r=t.assignedElements().length>0;this.#p[n]!==r&&(this.#p[n]=r,this.requestUpdate())};#h=null;#g=null;#_=[];#v=null;#y;#b=null;#x=null;constructor(){if(super(),this.locale=null,this.components=null,this.featured=null,this.panels=null,this.view=`visual`,this.views=null,this.theme=`auto`,this.previewPolicy=null,this.adapter=null,Object.hasOwn(this,`value`)){let e=this.value;delete this.value,typeof e==`string`&&(this.value=e)}}get value(){return this.adapter?.getSource()??this.#e??`<astl-doc lang="${this.authoring.locale}"></astl-doc>`}set value(e){this.adapter===null?this.#e=e:this.adapter.setSource(e)}get ready(){return this.#u}async preview(){await this.updateComplete,await this.renderRoot.querySelector(`astl-preview`)?.refresh()}get authoring(){let e=X(),t=this.#A(e),n=this.components,r=typeof n==`string`?n.split(/\s+/).filter(e=>e!==``):n,i=`${e.version}\n${t}\n${r===null?`*`:r.join(` `)}`;return this.#b?.key!==i&&(this.#b={key:i,authoring:vi(e,t,r)}),this.#b.authoring}connectedCallback(){super.connectedCallback(),gi.add(this),this.#t===!0&&this.#O(),this.#k()}disconnectedCallback(){super.disconnectedCallback(),gi.delete(this),clearTimeout(this.#y),this.#c=null,this.#k();let e=this.#n;e!==null&&(this.#e=e.adapter.getSource(),e.destroy(),this.#n=null,this.adapter=null)}#S(){let e=this.views??X().views;return Array.isArray(e)?e:[]}#C(){return this.adapter?.editsSource===!0?[`visual`]:Ci}#w(){return[...this.#C(),...this.#S().map(e=>e.name)].includes(this.view)?this.view:`visual`}#T(){let e=this.#g??this.#h??this.value,t=this.authoring.validate(e).issues.filter(e=>e.severity===`error`);return this.#_=t,t.length>0?(this.#a={key:`view.sourceErrors`,params:{n:t.length}},this.#s++,!1):(this.#g!==null&&$?.formatHtml(this.#g)!==this.#h&&(this.value=this.#g),this.#g=null,!0)}#E(e){clearTimeout(this.#y),this.#y=setTimeout(()=>{let e=this.adapter;this.#v=e===null?null:this.authoring.outline(e.getSource()),this.requestUpdate()},e)}willUpdate(e){if(e.has(`theme`)&&(this.dataset.theme=this.#j()),e.has(`view`)&&this.adapter?.editsSource!==!0){let t=e.get(`view`);t===`source`&&this.view!==`source`&&!this.#T()?this.view=`source`:this.view===`source`&&t!==`source`&&(this.#h=this.#g=null,this.#_=[],$===null&&import(`./chunks/source-view-CZVxgTNQ.js`).then(e=>{$=e,this.requestUpdate()},e=>console.error(e)))}let t=this.#n;if(t!==null&&this.adapter!==t.adapter&&(this.adapter===null&&(this.#e=t.adapter.getSource()),t.destroy(),this.#n=null),this.adapter!==null&&this.#n===null)this.#t=!1,this.#e!==null&&this.adapter.setSource(this.#e),this.#e=null;else if(this.adapter===null&&this.#n===null)this.isConnected&&(this.#t===null||e.has(`adapter`))&&this.#D();else if(this.#n!==null&&Q!==null&&this.#n.authoring!==this.authoring){let e=this.#n.adapter.getSource();this.#n.destroy(),this.#n=Q.createSurface(this,this.authoring,X().engine.manifests,e,this.#d,this.#f),this.adapter=this.#n.adapter}this.#k()}updated(e){e.has(`theme`)&&this.renderRoot.querySelector(`astl-preview`)?.requestUpdate();let t=this.adapter;t!==null&&t!==this.#c&&this.isConnected&&(this.#c=t,this.#E(0),this.#l(),this.dispatchEvent(new Event(xi,{bubbles:!0,composed:!0})));let n=e.get(`view`);e.has(`view`)&&n!==void 0&&n!==this.view&&this.dispatchEvent(new CustomEvent(Si,{detail:{view:this.view},bubbles:!0,composed:!0}))}#D(){document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,()=>this.requestUpdate(`adapter`),{once:!0}):(this.#t=this.querySelector(`:scope > [slot="surface"]`)===null,this.#t&&this.#O())}async#O(){if(!(this.#r||this.#n!==null)){this.#r=!0,this.#i=!1;try{if(Q??=await import(`./chunks/surface-C6wtQkTY.js`),!this.isConnected||!this.#t||this.adapter!==null||this.#n!==null)return;this.#n=Q.createSurface(this,this.authoring,X().engine.manifests,this.value,this.#d,this.#f),this.#e=null,this.adapter=this.#n.adapter}catch(e){this.#i=!0,console.error(e)}finally{this.#r=!1,this.requestUpdate()}}}#k(){let e=this.isConnected?this.adapter:null;(this.#x?.adapter??null)!==e&&(this.#x?.off(),this.#x=e===null?null:{adapter:e,off:e.onChange(()=>{let e=this.#o;this.#o=null,(this.#a!==null||e!==null)&&(this.#a=e,e!==null&&this.#s++,this.requestUpdate()),this.#E(wi),this.dispatchEvent(new Event(bi,{bubbles:!0,composed:!0}))})})}#A(e){let t=this.locale?[this.locale]:this.lang?[this.lang]:[...navigator.languages??[],navigator.language].filter(e=>!!e),n=[...Fn,...e.catalogs].filter(e=>e.namespace===k).map(e=>e.locale);return Wt(t,[...new Set(n)],`en`)}#j(){let e=this.theme;return e!==null&&yi.includes(e)?e:`auto`}render(){let{authoring:e,adapter:t}=this,n=this.#j(),r=this.#i?{key:`surface.failed`}:this.#t&&t===null?{key:`surface.loading`}:this.#a,i=e.locale,a=e=>typeof e==`string`?e.split(/\s+/).filter(e=>e!==``):e,o=a(this.featured)??X().featured,s=(a(this.panels)??Ti).filter(e=>Ti.includes(e)),c=new Set([...Oi,...e.descriptors.flatMap(e=>[e.icon,...(e.templates??[]).map(t=>t.icon??e.icon)])]),l=[`toolbar: toolbar-bar`,`button: toolbar-button`,`icon-button: toolbar-icon-button`,`views: toolbar-views`,`view: toolbar-view`,`separator: toolbar-separator`,`icon: toolbar-icon`,`insert`,`menu: insert-menu`,`style-menu`,`style-colors`,`style-panel`].concat([...c].map(e=>`icon-${e}`)).join(`, `),u=r=>r===`issues`?g`<astl-issues part="issues" data-theme=${n} .authoring=${e} .adapter=${t}></astl-issues>`:g`<astl-inspector part="inspector" exportparts=${ki} data-theme=${n} .authoring=${e} .adapter=${t}></astl-inspector>`,d=(t,n)=>e.t(k,t,n),f=this.#w(),p=[...this.#C().map(e=>{let n=t?.editsSource===!0?`source`:e;return{name:e,label:d(`view.${n}`),description:d(`view.${n}Hint`)}}),...this.#S()],m=f!==`visual`;return g`<div class=${s.length===0||m?`layout solo`:`layout`}>
1415
1451
  <astl-toolbar part="toolbar" exportparts=${l} data-theme=${n} .authoring=${e}
1416
1452
  .adapter=${t} .featured=${o} .views=${p} .view=${f}
1417
1453
  @astl-toolbar-view=${e=>{this.view=e.detail.view}}></astl-toolbar>
1418
- ${this.#j()}
1454
+ ${this.#M()}
1419
1455
  <div class="work" part="work">
1420
1456
  <div class="start" part="start" ?hidden=${m||!this.#p.start}>
1421
1457
  <slot name="start" @slotchange=${this.#m}></slot>
1422
1458
  </div>
1423
1459
  <div class="surface" part="surface">
1424
1460
  ${m?S:g`<slot name="surface"></slot>`}
1425
- ${f===`source`?this.#M():m?g`<slot name="view-${f}"></slot>`:S}
1461
+ ${f===`source`?this.#N():m?g`<slot name="view-${f}"></slot>`:S}
1426
1462
  <p class=${r===null?`status idle`:`status`} role="status" lang=${i} dir=${b(i)}
1427
1463
  >${ci(this.#s,r===null?``:e.t(k,r.key,r.params))}</p>
1428
1464
  <astl-picture-dialog data-theme=${n} .authoring=${e}></astl-picture-dialog>
@@ -1434,8 +1470,8 @@ margin: calc(-1 * var(--astl-focus-width));
1434
1470
  </div>
1435
1471
  <astl-preview part="preview" data-theme=${n} .authoring=${e} .adapter=${t}
1436
1472
  .policy=${this.previewPolicy??v}></astl-preview>
1437
- </div>`}#j(){let e=this.#v;if(e===null)return S;let{authoring:t}=this,n=(e,n)=>t.t(k,e,n),r=e.pages.reduce((e,t)=>e+t.components.length,0),i=e.errors===0,a=t.locale;return g`<p class="status-line" part="status-line" lang=${a} dir=${b(a)}>
1473
+ </div>`}#M(){let e=this.#v;if(e===null)return S;let{authoring:t}=this,n=(e,n)=>t.t(k,e,n),r=e.pages.reduce((e,t)=>e+t.components.length,0),i=e.errors===0,a=t.locale;return g`<p class="status-line" part="status-line" lang=${a} dir=${b(a)}>
1438
1474
  <span class="counts"><span>${n(`status.elements`,{n:r})}</span>${e.points===null?S:g`<span>${n(`surface.points`,{points:e.points})}</span>`}</span>
1439
1475
  <span class=${i?`ready`:`counts error`}>${i?n(`status.ready`):g`<span>${n(`status.errors`,{n:e.errors})}</span><span>${n(`status.warnings`,{n:e.warnings})}</span>`}</span>
1440
- </p>`}#M(){let e=$;return e===null?S:(this.#h??=e.formatHtml(this.value),e.renderSource(this.renderRoot,this.authoring,this.#g??this.#h,this.#_,e=>{this.#g=e}))}},ji=`astl-editor`;function Mi(e){let t=e.registry??customElements,n=t.get(ji);if(n!==void 0&&n!==Ai)throw Error(`<${ji}> is already defined by another class`);Jr(t),_i(e),n===void 0&&t.define(ji,Ai)}var Ni=[],Pi=async()=>(await import(`./chunks/menu-messages-Dx3jYUEp.js`)).builtInMenuMessages;function Fi(e={}){let t=e.components??h,n=new Set(t.map(e=>e.manifest.tag)),{surface:r,ink:i}=y.themes.light;Mi({styleTemplates:le,groundColors:{surface:r,ink:i},featured:Ni,menuMessages:Pi,...e,components:t,editors:e.editors??Sr.filter(e=>n.has(e.manifest.tag)),elements:e.elements??Ne.filter(e=>n.has(e.tag))})}Fi();export{Ai as AstlEditor,ke as BLOCK_TAGS,qt as BUILT_IN_PREFIX,ze as CAPTION_TAG,en as CLASS_ATTRIBUTE,fe as COLUMNS_TAG,Ke as COLUMN_TAG,$e as COMMON_ATTRIBUTES,Se as CONTENT_ATTRIBUTES,Tt as CheckerError,We as DEFAULT_DOC_KIND,Ni as DEFAULT_FEATURED,Rn as DEFAULT_FONTS,_e as DEFAULT_PROFILE,In as DEFAULT_STYLES,Je as DOC_ATTRIBUTES,be as DOC_KINDS,He as DOC_TAG,ge as ELEMENT_TAG_PATTERN,Mt as ENGINE_NAMESPACE,Kt as EXPLANATION_TAG,Bt as EngineIssue,Qt as FEEDBACK_TAG,st as FEEDBACK_VARIANTS,De as FIGURE_TAG,vt as FLAG_SELECTED,he as FORMAT_VERSION,Yt as HELP_ATTRIBUTES,Ve as HELP_TAGS,pe as HINT_TAG,It as INERT_STYLE,Ee as INLINE_TAGS,$t as JSON_MEDIA_TYPE,zt as KEY_FORMAT_VERSION,Pe as LANGUAGE_TAG_PATTERN,gt as MAX_ANSWER_COUNT,tt as MAX_ANSWER_LENGTH,Qe as MAX_ATTRIBUTES_PER_ELEMENT,Xe as MAX_COLUMNS,et as MAX_NESTING_DEPTH,Gt as MAX_OPEN_ANSWER_LENGTH,de as MAX_REQUEST_BYTES,wt as MAX_SOURCE_LENGTH,Le as MIN_COLUMNS,Pt as MessageSyntaxError,ue as OPAQUE_ID_PATTERN,Zt as OPEN_SLOT_KIND,ce as PAGE_ATTRIBUTES,C as PAGE_TAG,v as PRACTICE_POLICY,Ge as PROBLEM_MEDIA_TYPE,xe as PROTOCOL_VERSION,Ye as PlayerEvent,Ue as ProblemCode,qe as ProtocolPath,ft as REMOVED_WITH_CONTENT,Ie as SCORING_ATTRIBUTES,Ce as SCORING_RULES,je as SNAPSHOT_FORMAT,Ae as SOURCE_ID_PATTERN,E as STYLE_OPEN,Vt as STYLE_TAG,Rt as STYLE_TEMPLATE_ATTRIBUTE,xt as STYLE_TEMPLATE_NAME,Me as SUPPORTED_FORMATS,kt as TAG_ATTRIBUTES,Ft as TEST_POLICY,Lt as URL_ATTRIBUTES,kn as UploadRefused,se as allAttributes,h as builtInDefinitions,Sr as builtInEditors,Ne as builtInElements,le as builtInStyleTemplates,dt as checkCatalog,Ut as childElements,pt as childTagConflict,ht as compareCatalogs,jn as createAuthoring,Et as createI18n,si as createTextareaAdapter,Fi as defineEditor,b as directionOf,ut as element,ot as fitsAnswer,Oe as groupMax,lt as hasErrors,Te as helpPolicy,Ot as icuFormatter,bt as inertStyles,ct as isAnswerKey,Jt as isAnswers,Ze as isAttemptPolicy,mt as isElement,ve as isOpaqueId,ye as isProblemDetails,it as isSafeUrl,Fe as isSnapshot,we as isSourceId,at as isStyleTemplate,O as loadStyleElements,Be as maxAnswerLength,yt as messageParams,Wt as negotiateLocale,_t as parseMessage,nt as pluralCategories,Re as roundScore,Ht as sameChildSpec,jt as strictUrlPolicy,Nt as text,Dt as textContent,Ct as tokensCss,At as variantAttribute};
1476
+ </p>`}#N(){let e=$;return e===null?S:(this.#h??=e.formatHtml(this.value),e.renderSource(this.renderRoot,this.authoring,this.#g??this.#h,this.#_,e=>{this.#g=e}))}},ji=`astl-editor`;function Mi(e){let t=e.registry??customElements,n=t.get(ji);if(n!==void 0&&n!==Ai)throw Error(`<${ji}> is already defined by another class`);Jr(t),_i(e),n===void 0&&t.define(ji,Ai)}var Ni=[],Pi=async()=>(await import(`./chunks/menu-messages-Dx3jYUEp.js`)).builtInMenuMessages;function Fi(e={}){let t=e.components??h,n=new Set(t.map(e=>e.manifest.tag)),{surface:r,ink:i}=y.themes.light;Mi({styleTemplates:le,groundColors:{surface:r,ink:i},featured:Ni,menuMessages:Pi,...e,components:t,editors:e.editors??Sr.filter(e=>n.has(e.manifest.tag)),elements:e.elements??Ne.filter(e=>n.has(e.tag))})}Fi();export{Ai as AstlEditor,ke as BLOCK_TAGS,qt as BUILT_IN_PREFIX,ze as CAPTION_TAG,en as CLASS_ATTRIBUTE,fe as COLUMNS_TAG,Ke as COLUMN_TAG,$e as COMMON_ATTRIBUTES,Se as CONTENT_ATTRIBUTES,Tt as CheckerError,We as DEFAULT_DOC_KIND,Ni as DEFAULT_FEATURED,Rn as DEFAULT_FONTS,_e as DEFAULT_PROFILE,In as DEFAULT_STYLES,Je as DOC_ATTRIBUTES,be as DOC_KINDS,He as DOC_TAG,ge as ELEMENT_TAG_PATTERN,Mt as ENGINE_NAMESPACE,Kt as EXPLANATION_TAG,Bt as EngineIssue,Qt as FEEDBACK_TAG,st as FEEDBACK_VARIANTS,De as FIGURE_TAG,vt as FLAG_SELECTED,he as FORMAT_VERSION,Yt as HELP_ATTRIBUTES,Ve as HELP_TAGS,pe as HINT_TAG,It as INERT_STYLE,Ee as INLINE_TAGS,$t as JSON_MEDIA_TYPE,zt as KEY_FORMAT_VERSION,Pe as LANGUAGE_TAG_PATTERN,gt as MAX_ANSWER_COUNT,tt as MAX_ANSWER_LENGTH,Qe as MAX_ATTRIBUTES_PER_ELEMENT,Xe as MAX_COLUMNS,et as MAX_NESTING_DEPTH,Gt as MAX_OPEN_ANSWER_LENGTH,de as MAX_REQUEST_BYTES,wt as MAX_SOURCE_LENGTH,Le as MIN_COLUMNS,Pt as MessageSyntaxError,ue as OPAQUE_ID_PATTERN,Zt as OPEN_SLOT_KIND,ce as PAGE_ATTRIBUTES,C as PAGE_TAG,v as PRACTICE_POLICY,Ge as PROBLEM_MEDIA_TYPE,xe as PROTOCOL_VERSION,Ye as PlayerEvent,Ue as ProblemCode,qe as ProtocolPath,ft as REMOVED_WITH_CONTENT,Ie as SCORING_ATTRIBUTES,Ce as SCORING_RULES,je as SNAPSHOT_FORMAT,Ae as SOURCE_ID_PATTERN,E as STYLE_OPEN,Vt as STYLE_TAG,Rt as STYLE_TEMPLATE_ATTRIBUTE,xt as STYLE_TEMPLATE_NAME,Me as SUPPORTED_FORMATS,kt as TAG_ATTRIBUTES,Ft as TEST_POLICY,Lt as URL_ATTRIBUTES,kn as UploadRefused,se as allAttributes,h as builtInDefinitions,Sr as builtInEditors,Ne as builtInElements,le as builtInStyleTemplates,dt as checkCatalog,Ut as childElements,pt as childTagConflict,ht as compareCatalogs,jn as createAuthoring,Et as createI18n,si as createTextareaAdapter,Fi as defineEditor,b as directionOf,ut as element,ot as fitsAnswer,Oe as groupMax,lt as hasErrors,Te as helpPolicy,Ot as icuFormatter,bt as inertStyles,ct as isAnswerKey,Jt as isAnswers,Ze as isAttemptPolicy,mt as isElement,ve as isOpaqueId,ye as isProblemDetails,it as isSafeUrl,Fe as isSnapshot,we as isSourceId,at as isStyleTemplate,O as loadStyleElements,Be as maxAnswerLength,yt as messageParams,Wt as negotiateLocale,_t as parseMessage,nt as pluralCategories,Re as roundScore,Ht as sameChildSpec,jt as strictUrlPolicy,Nt as text,Dt as textContent,Ct as tokensCss,At as variantAttribute};
1441
1477
  //# sourceMappingURL=astrolabe-editor.js.map