@cardenelabs/dragon 0.50.0 → 0.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja.md +2 -2
- package/README.md +2 -2
- package/dist/cdn/dragon-main.js +16 -0
- package/dist/cdn/dragon-main.js.map +1 -0
- package/dist/cdn/dragon.js +1 -15
- package/dist/cdn/dragon.js.map +1 -1
- package/dist/light/chunk-2ZZNRPZI.cjs.map +1 -1
- package/dist/light/chunk-3X7C7W73.cjs.map +1 -1
- package/dist/light/chunk-ABHVNNIX.cjs.map +1 -1
- package/dist/light/chunk-BGI7VUO4.cjs.map +1 -1
- package/dist/light/chunk-C3T6RGAI.cjs.map +1 -1
- package/dist/light/chunk-DQHIFCPR.cjs.map +1 -1
- package/dist/light/chunk-EWKIFSIY.cjs.map +1 -1
- package/dist/light/chunk-FX3AI6DD.cjs.map +1 -1
- package/dist/light/chunk-IDTTUWLJ.cjs.map +1 -1
- package/dist/light/chunk-IMXBW6IE.cjs.map +1 -1
- package/dist/light/chunk-INW5MFVL.cjs.map +1 -1
- package/dist/light/chunk-IX7JWHZA.cjs.map +1 -1
- package/dist/light/chunk-LYSEMMIK.cjs.map +1 -1
- package/dist/light/chunk-MC2FRYQM.cjs.map +1 -1
- package/dist/light/chunk-MNKFIGKV.cjs.map +1 -1
- package/dist/light/chunk-N3SQJDCE.cjs.map +1 -1
- package/dist/light/chunk-O6TNVMAE.cjs.map +1 -1
- package/dist/light/chunk-PESRNT2K.cjs.map +1 -1
- package/dist/light/chunk-PK2IAFV7.cjs.map +1 -1
- package/dist/light/chunk-QF2WCA42.cjs.map +1 -1
- package/dist/light/chunk-RWGOB6BI.cjs.map +1 -1
- package/dist/light/chunk-SPO6C3DK.cjs.map +1 -1
- package/dist/light/chunk-UZ7P2KL7.cjs.map +1 -1
- package/dist/light/chunk-VUDVXBNS.cjs.map +1 -1
- package/dist/light/chunk-XEMPBLLY.cjs.map +1 -1
- package/dist/light/chunk-XTMF6DU3.cjs.map +1 -1
- package/dist/light/chunk-Z65BLQHP.cjs.map +1 -1
- package/dist/light/chunk-ZPDMD2HM.cjs.map +1 -1
- package/dist/light/git-NP5754AH.cjs.map +1 -1
- package/dist/light/index.cjs.map +1 -1
- package/dist/light/lineup-FH7IEWCQ.cjs.map +1 -1
- package/dist/light/read-3TGEKIWC.cjs.map +1 -1
- package/dist/light/read-4662YCBN.cjs.map +1 -1
- package/dist/light/read-7BSCLIBE.cjs.map +1 -1
- package/dist/light/read-7OID45SR.cjs.map +1 -1
- package/dist/light/read-AZNIUZRQ.cjs.map +1 -1
- package/dist/light/read-BWNWKOPK.cjs.map +1 -1
- package/dist/light/read-CCXPVHWE.cjs.map +1 -1
- package/dist/light/read-CP6UXVHG.cjs.map +1 -1
- package/dist/light/read-FD77MQ5D.cjs.map +1 -1
- package/dist/light/read-FTUHYOPX.cjs.map +1 -1
- package/dist/light/read-HQVX62P3.cjs.map +1 -1
- package/dist/light/read-HWNH6P24.cjs.map +1 -1
- package/dist/light/read-IZU6AJ2Z.cjs.map +1 -1
- package/dist/light/read-J3B35XE7.cjs.map +1 -1
- package/dist/light/read-K2HTSR6T.cjs.map +1 -1
- package/dist/light/read-MLWM6XDJ.cjs.map +1 -1
- package/dist/light/read-Q7OXFGPT.cjs.map +1 -1
- package/dist/light/read-RFXK5SUP.cjs.map +1 -1
- package/dist/light/read-S4YR3S2H.cjs.map +1 -1
- package/dist/light/read-S5XLQOSN.cjs.map +1 -1
- package/dist/light/read-UJMXEWAV.cjs.map +1 -1
- package/dist/light/read-UKSQ5PIN.cjs.map +1 -1
- package/dist/light/read-VEDXP7TO.cjs.map +1 -1
- package/dist/light/read-XMDEPGF3.cjs.map +1 -1
- package/dist/light/read-YPV7U6CJ.cjs.map +1 -1
- package/dist/light/state-SRPBN3JK.cjs.map +1 -1
- package/dist/light/time-HWLKFZEV.cjs.map +1 -1
- package/dist/light/tree-AHPW5CVX.cjs.map +1 -1
- package/dist/light/try-CGFAHWMP.cjs.map +1 -1
- package/package.json +1 -1
- package/src/script-loader.ts +19 -0
- package/src/script.ts +2 -1
package/dist/light/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/cardene/Desktop/projects/dragon-3373-release-0-50-0/packages/dragon/dist/light/index.cjs","../../src/blocks/act/read.ts","../../src/nearest.ts","../../src/blocks/icon/read.ts","../../src/blocks/color/read.ts","../../src/blocks/group/read.ts","../../src/blocks/link/read.ts","../../src/blocks/box/read.ts","../../src/blocks/lifeline/read.ts","../../src/blocks/note/read.ts","../../src/blocks/source/read.ts","../../src/blocks/step/read.ts","../../src/blocks/strip/read.ts","../../src/blocks/entry-readings.ts","../../src/blocks/reading.ts","../../src/blocks/later-readings.ts","../../src/kinds/architecture/layout.ts","../../src/kinds/architecture/kind.ts","../../src/kinds/git/kind.ts","../../src/kinds/lineup/kind.ts","../../src/kinds/sequence/layout.ts","../../src/kinds/sequence/kind.ts","../../src/kinds/state/kind.ts","../../src/kinds/time/kind.ts","../../src/kinds/tree/kind.ts","../../src/kinds/try/kind.ts","../../src/kinds/index.ts","../../src/blocks/usable.ts","../../src/blocks/event-owners.ts","../../src/blocks/used.ts","../../src/kinds/registry.ts","../../src/model.ts","../../src/messages.ts","../../src/printer.ts","../../src/markdown.ts","../../src/parser.ts","../../src/field-messages.ts","../../src/schemas/validate-diagram.js","../../src/schema.ts","../../src/version.ts","../../src/blocks/source/draw.ts","../../src/blocks/step/draw.ts","../../src/blocks/act/draw.ts","../../src/blocks/edge/draw.ts","../../src/blocks/edge-label/draw.ts","../../src/blocks/group/draw.ts","../../src/blocks/lifeline/draw.ts","../../src/blocks/note/draw.ts","../../src/blocks/side-path/draw.ts","../../src/blocks/start-finish/draw.ts","../../src/blocks/strip/draw.ts","../../src/blocks/carry/timing.ts","../../src/timeline.ts","../../src/render/motion.ts","../../src/render/draw.ts","../../src/view.ts","../../src/player.ts","../../src/light.ts"],"names":["reading","current","edge","event","strip","kind","S","changes","label","badge","k","vh","mw","mh","bw","band","name","text","markup"],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACA;ACjIO,IAAMA,SAAAA,EAAqC;AAAA,EAChD,IAAA,EAAM;AAAA,IACJ,GAAA,EAAK,CAAC,MAAA,EAAQ,KAAA,EAAA,GAAU;AACtB,MAAA,GAAA,CAAI,KAAA,CAAM,KAAA,IAAS,QAAA,EAAU,MAAM,oCAAA,MAAK,EAAQ,CAAA,EAAG,KAAA,CAAM,CAAA,CAAE,WAAW,CAAA;AACtE,MAAA,MAAM,KAAA,EAAO,KAAA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AAA;AACD,MAAA;AACX,IAAA;AACkC,IAAA;AACvB,MAAA;AACC,MAAA;AACZ,IAAA;AACc,IAAA;AAEwD,MAAA;AACtE,IAAA;AACe,IAAA;AACoC,MAAA;AAC5B,sBAAA;AACH,sBAAA;AAC4B,MAAA;AACA,MAAA;AACI,MAAA;AACP,MAAA;AAC/B,MAAA;AACd,IAAA;AACF,EAAA;AACF;AxD6rX6D;AACA;AyDzsYO;AACnC,EAAA;AACM,EAAA;AACF,EAAA;AACF,EAAA;AACA,EAAA;AACF,EAAA;AACjC;AAGyE;AAGD;AAEuD;AAGjC;AAMrB;AACzC,EAAA;AAC2B,EAAA;AACD,EAAA;AAC1D;AAE0E;AAChC,EAAA;AAC1C;AAGkE;AAClB,EAAA;AAChD;AAGmE;AACnD,EAAA;AACc,IAAA;AACQ,MAAA;AACgB,MAAA;AACjD,IAAA;AACH,EAAA;AACF;AAMwE;AAClD,EAAA;AAC2B,EAAA;AACjD;AAO2E;AAC3C,EAAA;AACQ,EAAA;AACL,EAAA;AAC7B,EAAA;AACA,EAAA;AACwC,IAAA;AACpC,EAAA;AAEN,IAAA;AACF,EAAA;AACsC,EAAA;AACxC;AAMsE;AACjB,EAAA;AACrD;AzDyqY6D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/Users/cardene/Desktop/projects/dragon-3373-release-0-50-0/packages/dragon/dist/light/index.cjs","sourcesContent":[null,"/**\n * `act` のブロックの読み方 (#3349)。読む処理と書き戻す処理と日英の誤りの文を、入口に置く定義 (`block.ts`) と分けて持つ。\n * 軽い入口は、後から読む図の種類の個別ブロックの読み方を、書いた図が使う時に読む\n */\nimport type { BlockReading } from \"../block\";\nimport { fail, readOnBox } from \"../../read-kit\";\n\nexport interface ActMessages {\n actShape: string;\n lineupNoAct: string;\n}\n\nexport const reading: BlockReading<ActMessages> = {\n read: {\n act: (source, state) => {\n if (state.kind === \"lineup\") throw fail(source, 0, state.m.lineupNoAct);\n const step = state.inStep(source);\n const on = readOnBox(source, \"act\", state.m.actShape, state.boxAt);\n step.events.push({ type: \"action\", box: on.box, label: on.text });\n },\n },\n print: { events: { action: (e) => `act ${e.box}: ${e.label}` } },\n messages: {\n ja: {\n actShape: \"act は act <名札>: <処理の名前> の形で書く\",\n lineupNoAct: \"lineup (列の図) には act の行を書けない。列の右上の字は note の行で書き換える\",\n },\n en: {\n actShape: \"Write act as act <id>: <action>\",\n lineupNoAct: \"A lineup diagram takes no act lines. Rewrite the text at the top right of a lane with a note line\",\n },\n },\n};\n","/**\n * 書いた語に一番近い語 (#3315)。誤りの文で、書き間違えた語の代わりに 1 つだけ候補を示す。\n *\n * 大文字と小文字を区別しない編集距離 (1 字の足し、消し、置き換えを 1 と数える) で比べる。\n * 距離が 2 以下で、書いた語の字数より小さい時だけ近いとみなす。\n * 字数より小さいことを求めるのは、1 字の語がどの 1 字の語とも距離 1 になり、何を書いても候補が出るのを避けるため。\n * 同じ距離の語が 2 つ以上ある時は `candidates` の並びで先の語を返し、近い語が無ければ `undefined` を返す。\n */\nconst MAX_DISTANCE = 2;\n\nexport function nearest(word: string, candidates: readonly string[]): string | undefined {\n const written = [...word.toLowerCase()];\n let limit = Math.min(MAX_DISTANCE, written.length - 1);\n let best: string | undefined;\n for (const candidate of candidates) {\n const d = distance(written, [...candidate.toLowerCase()]);\n if (d > limit) continue;\n best = candidate;\n // 後の語は、今の語より近い時だけ置き換える\n limit = d - 1;\n }\n return best;\n}\n\n/** 2 つの字の並びの編集距離 */\nfunction distance(a: readonly string[], b: readonly string[]): number {\n let previous = Array.from({ length: b.length + 1 }, (_, j) => j);\n for (let i = 1; i <= a.length; i++) {\n const current = [i];\n for (let j = 1; j <= b.length; j++) {\n const replace = (previous[j - 1] as number) + (a[i - 1] === b[j - 1] ? 0 : 1);\n current.push(Math.min((previous[j] as number) + 1, (current[j - 1] as number) + 1, replace));\n }\n previous = current;\n }\n return previous[b.length] as number;\n}\n","/**\n * `icon` のブロックの読み方 (#3349)。読む処理と書き戻す処理と日英の誤りの文を、入口に置く定義 (`block.ts`) と分けて持つ。\n * 軽い入口は、後から読む図の種類の個別ブロックの読み方を、書いた図が使う時に読む\n */\nimport { nearest } from \"../../nearest\";\nimport type { Messages } from \"../../messages\";\nimport { type Attr, fail, list } from \"../../read-kit\";\nimport type { SourceLine } from \"../../tokenize\";\nimport { type BlockReading, none } from \"../block\";\nimport { ICON_NAMES } from \"./block\";\n\nexport interface IconMessages {\n /** 知らないアイコン名 `value`。近い名前が在ればそれだけを、無ければ使える名前を全て挙げる (#3315) */\n badIcon: (value: string) => string;\n}\n\n/** 箱と区画の行の属性の、絵の名前。知らない名前は誤りで止める */\nexport function readIcon(source: SourceLine, attrs: Map<string, Attr>, m: Messages): Attr | undefined {\n const icon = attrs.get(\"icon\");\n if (icon && !ICON_NAMES.includes(icon.value)) throw fail(source, icon.at, m.badIcon(icon.value));\n return icon;\n}\n\n/** 書いたアイコン名に近い名前が在れば `near` の文、無ければ `none` の文 (#3315) */\nconst withNear = (value: string, near: (name: string) => string, none: string): string => {\n const name = nearest(value, ICON_NAMES);\n return name === undefined ? none : near(name);\n};\n\nexport const reading: BlockReading<IconMessages> = {\n read: none(\"絵は箱と区画の行の属性で、行の頭の語を持たない。箱と区画の行を読む処理が readIcon を呼ぶ\"),\n print: none(\"絵は箱と区画の行の属性で、箱と区画の宣言を書き戻す処理が icon の鍵を書く\"),\n messages: {\n ja: { badIcon: (value) => withNear(value, (near) => `${value} という icon は無い。近い名前は ${near}`, `icon は ${list(ICON_NAMES)} のどれか`) },\n en: { badIcon: (value) => withNear(value, (near) => `There is no icon named ${value}. The closest is ${near}`, `icon is one of ${list(ICON_NAMES)}`) },\n },\n};\n","/**\n * `color` のブロックの読み方 (#3349)。読む処理と書き戻す処理と日英の誤りの文を、入口に置く定義 (`block.ts`) と分けて持つ。\n * 軽い入口は、後から読む図の種類の個別ブロックの読み方を、書いた図が使う時に読む\n */\nimport type { Messages } from \"../../messages\";\nimport { type Attr, fail, isOneOf, list } from \"../../read-kit\";\nimport type { SourceLine } from \"../../tokenize\";\nimport { type BlockReading, none } from \"../block\";\nimport { readIcon } from \"../icon/read\";\nimport { COLORS, type Color } from \"./block\";\n\nexport interface ColorMessages {\n badColor: string;\n}\n\n/** 区画と箱の見た目の属性 (`note` と `color` と `icon`)。知らない色と絵の名前は誤りで止める */\nexport function readLook(source: SourceLine, attrs: Map<string, Attr>, m: Messages): { note?: string; color?: Color; icon?: string } {\n const color = attrs.get(\"color\");\n if (color && !isOneOf(COLORS, color.value)) throw fail(source, color.at, m.badColor);\n const icon = readIcon(source, attrs, m);\n const note = attrs.get(\"note\")?.value;\n return {\n ...(note !== undefined ? { note } : {}),\n ...(color ? { color: color.value as Color } : {}),\n ...(icon ? { icon: icon.value } : {}),\n };\n}\n\nexport const reading: BlockReading<ColorMessages> = {\n read: none(\"色は箱と区画の行の属性で、行の頭の語を持たない。箱と区画の行を読む処理が readLook を呼ぶ\"),\n print: none(\"色は箱と区画の行の属性で、箱と区画の宣言を書き戻す処理が color の鍵を書く\"),\n messages: {\n ja: { badColor: `color は ${list(COLORS)} のどれか` },\n en: { badColor: `color is one of ${list(COLORS)}` },\n },\n};\n","/**\n * `group` のブロックの読み方 (#3349)。読む処理と書き戻す処理と日英の誤りの文を、入口に置く定義 (`block.ts`) と分けて持つ。\n * 軽い入口は、後から読む図の種類の個別ブロックの読み方を、書いた図が使う時に読む\n */\nimport { attrs, shown } from \"../../print-kit\";\nimport { fail, readDeclared } from \"../../read-kit\";\nimport type { Region } from \"../../schema\";\nimport { type BlockReading, none } from \"../block\";\nimport { readLook } from \"../color/read\";\n\nexport interface GroupMessages {\n nestedGroup: string;\n strayEnd: string;\n endTakesNothing: string;\n unclosedGroup: (id: string) => string;\n regionReopened: (id: string) => string;\n gitNoGroup: string;\n treeNoGroup: string;\n lineupNoGroup: string;\n}\n\n/** 区画を開く行。名前と見た目の属性は、名札と違う物と書いた物だけを書く */\nexport const declareRegion = (r: Region): string =>\n `group ${r.id}${shown(r.id, r.name)}${attrs([\n [\"note\", r.note],\n [\"color\", r.color],\n [\"icon\", r.icon],\n ])}`;\n\nexport const reading: BlockReading<GroupMessages> = {\n read: {\n // `group` の行。同じ名札をもう一度開いた時は、名前も属性も書かない\n group: (source, state) => {\n const { m, figure } = state;\n state.beforeSteps(source);\n if (state.kind === \"git\") throw fail(source, 0, m.gitNoGroup);\n if (state.kind === \"tree\") throw fail(source, 0, m.treeNoGroup);\n if (state.kind === \"lineup\") throw fail(source, 0, m.lineupNoGroup);\n if (figure.group) throw fail(source, 0, m.nestedGroup);\n const declared = readDeclared(source, \"group\", state.attrs.group ?? [], m);\n if (figure.regions.some((region) => region.id === declared.id)) {\n if (declared.name !== undefined || declared.attrs.size > 0) throw fail(source, 0, m.regionReopened(declared.id));\n } else {\n state.claim(source, declared.id, declared.idAt);\n figure.regions.push({ id: declared.id, name: declared.name ?? declared.id, ...readLook(source, declared.attrs, m) });\n }\n figure.group = { source, id: declared.id };\n },\n end: (source, state) => {\n if (source.text !== \"end\") throw fail(source, \"end\".length, state.m.endTakesNothing);\n if (!state.figure.group) throw fail(source, 0, state.m.strayEnd);\n state.figure.group = undefined;\n },\n },\n print: none(\"区画の行は書き戻すと箱の行と同じ並びに入るので、箱のブロックの宣言を書く処理が declareRegion で書く\"),\n messages: {\n ja: {\n nestedGroup: \"group の中に group は書けない。先に end で閉じる\",\n strayEnd: \"end の前に、閉じる group が無い\",\n endTakesNothing: \"end の後ろには何も書かない\",\n unclosedGroup: (id) => `group ${id} を end で閉じていない`,\n regionReopened: (id) => `group ${id} は宣言済み。もう一度開く時は group ${id} だけを書き、名前と属性は最初の宣言に書く`,\n gitNoGroup: \"git (枝分かれの図) には group を書けない。枝は branch の行で宣言する\",\n treeNoGroup: \"tree (木の図) には group を書けない。木の箱は leaf と node の行で書く\",\n lineupNoGroup: \"lineup (列の図) には group を書けない。列は box の行で宣言する\",\n },\n en: {\n nestedGroup: \"A group cannot hold another group. Close it with end first\",\n strayEnd: \"There is no group for this end to close\",\n endTakesNothing: \"Write nothing after end\",\n unclosedGroup: (id) => `group ${id} is not closed with end`,\n regionReopened: (id) => `group ${id} is already declared. To open it again, write only group ${id}; put the name and attributes on the first one`,\n gitNoGroup: \"A git diagram takes no group. Declare branches with branch lines\",\n treeNoGroup: \"A tree diagram takes no group. Write the tree boxes with leaf and node lines\",\n lineupNoGroup: \"A lineup diagram takes no group. Declare the lanes with box lines\",\n },\n },\n};\n","/**\n * `link` のブロックの読み方 (#3349)。読む処理と書き戻す処理と日英の誤りの文を、入口に置く定義 (`block.ts`) と分けて持つ。\n * 軽い入口は、後から読む図の種類の個別ブロックの読み方を、書いた図が使う時に読む\n */\nimport type { Messages } from \"../../messages\";\nimport { type Attr, fail } from \"../../read-kit\";\nimport type { SourceLine } from \"../../tokenize\";\nimport { type BlockReading, none } from \"../block\";\n\nexport const URL_FORM = /^(\\/|https?:\\/\\/)/u;\n\nexport interface LinkMessages {\n /** 箱の飛び先 (`link`) か段の出典 (`url`) に、頁を移る形でない URL を書いた (#3199) */\n badUrl: (key: string) => string;\n}\n\n/** 頁を移る形の URL。ほかの形 (`javascript:` など) は、その属性の位置を示して断る */\nexport function urlOf(source: SourceLine, key: string, attr: Attr, m: Messages): string {\n if (!URL_FORM.test(attr.value)) throw fail(source, attr.at, m.badUrl(key));\n return attr.value;\n}\n\nexport const reading: BlockReading<LinkMessages> = {\n read: none(\"飛び先は箱の行の属性で、行の頭の語を持たない。箱の行を読む処理が urlOf を呼ぶ\"),\n print: none(\"飛び先は箱の行の属性で、箱の宣言を書き戻す処理が link の鍵を書く\"),\n messages: {\n ja: { badUrl: (key) => `${key} には / で始まる path か、http:// か https:// で始まる URL を書く` },\n en: { badUrl: (key) => `Write a path that starts with / or a URL that starts with http:// or https:// for ${key}` },\n },\n};\n","/**\n * `box` のブロックの読み方 (#3349)。読む処理と書き戻す処理と日英の誤りの文を、入口に置く定義 (`block.ts`) と分けて持つ。\n * 軽い入口は、後から読む図の種類の個別ブロックの読み方を、書いた図が使う時に読む\n */\nimport type { BlockReading } from \"../block\";\nimport { attrs, shown } from \"../../print-kit\";\nimport { fail, isOneOf, readDeclared } from \"../../read-kit\";\nimport type { Box, DiagramModel } from \"../../schema\";\nimport { readLook } from \"../color/read\";\nimport { declareRegion } from \"../group/read\";\nimport { urlOf } from \"../link/read\";\n\nexport const LANE_ATTRS = [\"note\", \"color\", \"order\"] as const;\n\n/** 列の図の箱の `order` に書ける並べ方。`none` は順番の無い置き場 (#3351) */\nexport const ORDERS = [\"none\"] as const;\n\nexport interface BoxMessages {\n undeclaredBox: (id: string) => string;\n noBoxes: string;\n /** 列の図の箱だけの属性 (`order`) を、別の種類の図の箱に書いた (#3351) */\n lineupOnlyAttr: (key: string) => string;\n /** 箱の `order` に `none` 以外を書いた */\n orderNone: string;\n}\n\nconst declareBox = (b: Box): string =>\n `box ${b.id}${shown(b.id, b.name)}${attrs([\n [\"note\", b.sub],\n [\"color\", b.color],\n [\"icon\", b.icon],\n [\"link\", b.link],\n [\"order\", b.order],\n ])}`;\n\n/**\n * 区画と箱の宣言の塊。塊どうしは空行で区切る。\n * 箱は JSON の並びのまま書き、同じ区画の箱が続く所を 1 つの `group … end` にする。区画の箱が飛び飛びの時は同じ `group` を開き直す。\n * 区画の並びが箱の現れる順と違う時と、箱の無い区画がある時は、先に全ての区画を中の無い `group … end` で宣言してから開き直す\n */\nfunction declarations(diagram: DiagramModel): string[] {\n const regions = diagram.regions ?? [];\n const runs: { region?: string; boxes: Box[] }[] = [];\n for (const b of diagram.boxes) {\n const last = runs.at(-1);\n if (last && last.region === b.region) last.boxes.push(b);\n else runs.push({ ...(b.region !== undefined ? { region: b.region } : {}), boxes: [b] });\n }\n const opened = [...new Set(runs.flatMap((run) => (run.region === undefined ? [] : [run.region])))];\n const inOrder = opened.length === regions.length && opened.every((id, i) => regions[i]?.id === id);\n const declared = new Set<string>();\n const blocks: string[] = [];\n if (!inOrder) {\n for (const r of regions) {\n blocks.push(`${declareRegion(r)}\\nend`);\n declared.add(r.id);\n }\n }\n for (const run of runs) {\n const lines = run.boxes.map(declareBox);\n if (run.region === undefined) {\n blocks.push(lines.join(\"\\n\"));\n continue;\n }\n const region = regions.find((r) => r.id === run.region);\n const open = declared.has(run.region) || !region ? `group ${run.region}` : declareRegion(region);\n declared.add(run.region);\n blocks.push([open, ...lines.map((line) => ` ${line}`), \"end\"].join(\"\\n\"));\n }\n return blocks;\n}\n\nexport const reading: BlockReading<BoxMessages> = {\n read: {\n // `box` の行。開いている `group` の中なら、その区画に置く\n box: (source, state) => {\n state.beforeSteps(source);\n const declared = readDeclared(source, \"box\", state.kind === \"lineup\" ? LANE_ATTRS : (state.attrs.box ?? []), state.m);\n state.claim(source, declared.id, declared.idAt);\n state.figure.firstBox ??= source;\n const { note, ...look } = readLook(source, declared.attrs, state.m);\n const link = declared.attrs.get(\"link\");\n const order = declared.attrs.get(\"order\");\n if (order && state.kind !== \"lineup\") throw fail(source, order.at, state.m.lineupOnlyAttr(\"order\"));\n if (order && !isOneOf(ORDERS, order.value)) throw fail(source, source.text.indexOf(order.value, order.at + \"order\".length), state.m.orderNone);\n const group = state.figure.group;\n state.figure.boxes.push({\n id: declared.id,\n name: declared.name ?? declared.id,\n ...(note !== undefined ? { sub: note } : {}),\n ...look,\n ...(group ? { region: group.id } : {}),\n ...(link ? { link: urlOf(source, \"link\", link, state.m) } : {}),\n ...(order ? { order: order.value as (typeof ORDERS)[number] } : {}),\n });\n },\n },\n print: { declare: declarations },\n messages: {\n ja: {\n undeclaredBox: (id) => `${id} という箱は宣言していない`,\n noBoxes: \"箱を 1 つ以上宣言する\",\n lineupOnlyAttr: (key) => `${key} は lineup (列の図) の box にだけ書ける`,\n orderNone: \"order には none だけを書ける。順番の無い置き場にする箱に書く\",\n },\n en: {\n undeclaredBox: (id) => `No box named ${id} is declared`,\n noBoxes: \"Declare at least one box\",\n lineupOnlyAttr: (key) => `${key} can be written only on box lines of lineup diagrams`,\n orderNone: \"order takes only none. Write it on a box that holds chips in no order\",\n },\n },\n};\n","/**\n * `lifeline` のブロックの読み方 (#3349)。読む処理と書き戻す処理と日英の誤りの文を、入口に置く定義 (`block.ts`) と分けて持つ。\n * 軽い入口は、後から読む図の種類の個別ブロックの読み方を、書いた図が使う時に読む\n */\nimport type { Box } from \"../../schema\";\nimport { type BlockReading, none } from \"../block\";\n\nexport const lifelinesOf = (boxes: readonly Box[]): { lifelines: string[] } => ({ lifelines: boxes.map((box) => box.id) });\n\nexport const reading: BlockReading = {\n read: none(\"生存線の行は無い。描く処理の形へ組み直す時に、toModel が lifelinesOf で箱の並びから組む\"),\n print: none(\"生存線の並びは箱の並びと同じなので書かない。読み直す時に箱の宣言から組み直す\"),\n messages: none(\"生存線は記法に行を持たないので、誤りの文を持たない\"),\n};\n","/**\n * `note` のブロックの読み方 (#3349)。読む処理と書き戻す処理と日英の誤りの文を、入口に置く定義 (`block.ts`) と分けて持つ。\n * 軽い入口は、後から読む図の種類の個別ブロックの読み方を、書いた図が使う時に読む\n */\nimport type { BlockReading } from \"../block\";\nimport { attrs, name } from \"../../print-kit\";\nimport { readOnBox } from \"../../read-kit\";\n\nexport interface NoteMessages {\n noteShape: string;\n}\n\nexport const reading: BlockReading<NoteMessages> = {\n read: {\n note: (source, state) => {\n const step = state.inStep(source);\n const on = readOnBox(source, \"note\", state.m.noteShape, state.boxAt);\n step.events.push({ type: \"swap\", box: on.box, text: on.text });\n },\n },\n print: {\n events: { swap: (e, kind) => (kind === \"time\" ? `note ${e.box}: ${name(e.text)}${attrs([[\"color\", e.color]])}` : `note ${e.box}: ${e.text}`) },\n },\n messages: {\n ja: { noteShape: \"note は note <名札>: <下の小さな字> の形で書く\" },\n en: { noteShape: \"Write note as note <id>: <caption>\" },\n },\n};\n","/**\n * `source` のブロックの読み方 (#3349)。読む処理と書き戻す処理と日英の誤りの文を、入口に置く定義 (`block.ts`) と分けて持つ。\n * 軽い入口は、後から読む図の種類の個別ブロックの読み方を、書いた図が使う時に読む\n */\nimport type { BlockReading } from \"../block\";\nimport type { Messages } from \"../../messages\";\nimport { attrs, name } from \"../../print-kit\";\nimport { fail, readAttrs, readName } from \"../../read-kit\";\nimport type { SourceLine } from \"../../tokenize\";\nimport { urlOf } from \"../link/read\";\nimport { ATTRS, type StepSource } from \"./block\";\n\n/** 出典の誤りの文 */\nexport interface SourceMessages {\n /** 段の出典の行の形 (#3199) */\n sourceShape: string;\n}\n\n/** `source <名前> [url: <URL>]` の行 */\nfunction readSource(source: SourceLine, m: Messages): StepSource {\n const named = readName(source, \"source\".length, m);\n const url = named.rest < source.text.length ? readAttrs(source, named.rest, ATTRS, m).get(\"url\") : undefined;\n if (named.value === \"\" || !url) throw fail(source, 0, m.sourceShape);\n return { name: named.value, url: urlOf(source, \"url\", url, m) };\n}\n\nexport const reading: BlockReading<SourceMessages> = {\n read: {\n source: (source, state) => {\n state.inStep(source).sources.push(readSource(source, state.m));\n },\n },\n print: { step: (step) => (step.sources ?? []).map((s) => `source ${name(s.name)}${attrs([[\"url\", s.url]])}`) },\n messages: {\n ja: { sourceShape: \"source は source <名前> [url: <URL>] の形で書く\" },\n en: { sourceShape: \"Write a source as source <name> [url: <URL>]\" },\n },\n};\n","/**\n * `step` のブロックの読み方 (#3349)。読む処理と書き戻す処理と日英の誤りの文を、入口に置く定義 (`block.ts`) と分けて持つ。\n * 軽い入口は、後から読む図の種類の個別ブロックの読み方を、書いた図が使う時に読む\n */\nimport type { Messages } from \"../../messages\";\nimport { type Attr, fail, isOneOf, list } from \"../../read-kit\";\nimport type { Step, ViewMode } from \"../../schema\";\nimport type { SourceLine } from \"../../tokenize\";\nimport type { BlockReading, ParseState, StepDraft } from \"../block\";\nimport { VIEWS } from \"./block\";\n\nexport interface StepMessages {\n noBody: (title: string) => string;\n emptyStepTitle: string;\n noSteps: string;\n emptySay: string;\n sayTwice: string;\n codeTwice: string;\n emptyCode: string;\n badView: string;\n}\n\n/** 最初の行の `view:` の値。知らない見せ方は誤りで止める */\nexport function viewOf(head: SourceLine, shown: Attr | undefined, m: Messages): ViewMode | undefined {\n if (shown && !isOneOf(VIEWS, shown.value)) throw fail(head, shown.at, m.badView);\n return shown?.value as ViewMode | undefined;\n}\n\n/** 読み終えた段。本文 (`say` の行) の無い段は、段の行を示して誤りで止める */\nexport function stepOf(draft: StepDraft, m: Messages): Step {\n if (draft.body === undefined) throw fail(draft.source, 0, m.noBody(draft.title));\n return {\n title: draft.title,\n body: draft.body.join(\"\\n\"),\n ...(draft.code !== undefined ? { code: draft.code } : {}),\n ...(draft.sources.length > 0 ? { sources: draft.sources } : {}),\n events: draft.events,\n };\n}\n\n/**\n * `say` の行と、その下に `say` より深く字下げして続けた行を段の本文にする。\n * 続きの行の間の空行は本文の空の行になる。返すのは読み終えた続きの行の数 (最後の本文の行まで)\n */\nfunction readSay(source: SourceLine, state: ParseState, after: (offset: number) => SourceLine | undefined): number {\n const step = state.inStep(source);\n if (step.body !== undefined) throw fail(source, 0, state.m.sayTwice);\n const inline = source.text.slice(\"say\".length).trim();\n const body = inline === \"\" ? [] : [inline];\n let blanks = 0;\n let read = 0;\n for (let offset = 1; ; offset++) {\n const next = after(offset);\n if (!next) break;\n if (next.text === \"\") {\n blanks++;\n continue;\n }\n if (next.indent <= source.indent) break;\n body.push(...Array.from({ length: blanks }, () => \"\"), next.text);\n blanks = 0;\n read = offset;\n }\n if (body.length === 0) throw fail(source, 0, state.m.emptySay);\n step.body = body;\n return read;\n}\n\nexport const reading: BlockReading<StepMessages> = {\n read: {\n // 前の段を閉じてから、題を確かめて次の段を書き始める\n step: (source, state) => {\n state.closeStep();\n const title = source.text.slice(\"step\".length).trim();\n if (title === \"\") throw fail(source, 0, state.m.emptyStepTitle);\n state.openStep({ source, title, sources: [], events: [] });\n },\n say: readSay,\n code: (source, state) => {\n const step = state.inStep(source);\n if (step.code !== undefined) throw fail(source, 0, state.m.codeTwice);\n const command = source.text.slice(\"code\".length).trim();\n if (command === \"\") throw fail(source, 0, state.m.emptyCode);\n step.code = command;\n },\n },\n print: {\n step: (step) => {\n const body = step.body.split(\"\\n\");\n return [\n ...(body.length === 1 ? [`say ${step.body}`] : [\"say\", ...body.map((line) => (line === \"\" ? \"\" : ` ${line}`))]),\n ...(step.code === undefined ? [] : [`code ${step.code}`]),\n ];\n },\n },\n messages: {\n ja: {\n noBody: (title) => `段「${title}」に本文 (say の行) が要る`,\n emptyStepTitle: \"step の後ろに段の題を書く\",\n noSteps: \"段 (step の行) を 1 つ以上書く\",\n emptySay: \"say の後ろか、その下に字下げした行に段の本文を書く\",\n sayTwice: \"1 つの段に say は 1 つまで。長い本文は say の下に字下げして続ける\",\n codeTwice: \"1 つの段に code は 1 行まで\",\n emptyCode: \"code の後ろに命令を書く\",\n badView: `view は ${list(VIEWS)} のどれか`,\n },\n en: {\n noBody: (title) => `Step \"${title}\" needs a body (a say line)`,\n emptyStepTitle: \"Write a title after step\",\n noSteps: \"Write at least one step (a step line)\",\n emptySay: \"Write the step body after say, or on indented lines below it\",\n sayTwice: \"A step takes one say. Continue a long body on indented lines below it\",\n codeTwice: \"A step takes at most one code line\",\n emptyCode: \"Write the command after code\",\n badView: `view is one of ${list(VIEWS)}`,\n },\n },\n};\n","/**\n * `strip` のブロックの読み方 (#3349)。読む処理と書き戻す処理と日英の誤りの文を、入口に置く定義 (`block.ts`) と分けて持つ。\n * 軽い入口は、後から読む図の種類の個別ブロックの読み方を、書いた図が使う時に読む\n */\nimport { attrs, name, quote } from \"../../print-kit\";\nimport { fail, readAttrs, readList, readName, readQuoted, skipSpaces } from \"../../read-kit\";\nimport type { DiagramEvent } from \"../../schema\";\nimport type { SourceLine } from \"../../tokenize\";\nimport type { BlockReading, ParseState } from \"../block\";\nimport { SET_ATTRS, STRIP_ATTRS } from \"./block\";\n\nexport interface StripMessages {\n stripTwice: string;\n stripShape: string;\n emptyStripField: string;\n stripUndeclared: string;\n noSuchField: (field: string) => string;\n stripNeedsValue: string;\n badRatio: string;\n /** 物差しの欄 `field` の値が割合でない */\n meterValue: (field: string) => string;\n}\n\n/** 割合。原本の JSON の割合の形と同じ */\nconst RATIO = /^([0-9]+\\/[0-9]+|[0-9]+(\\.[0-9]+)?%)$/u;\n\n/** 書き戻す時に `:` の前に置く字 (帯の題と、`set` の欄) */\nconst keyText = (text: string): string => (text.includes(\":\") || text.includes(\"[\") || text.startsWith('\"') ? quote(text) : text);\n\n/** 書き戻す時に `strip` の行に `,` で並べる欄。時間軸の図の欄は後ろに物差しの属性を書けるので、`[` を含む名前も囲む */\nconst fieldText = (text: string, time: boolean): string => (text.includes(\",\") || text.startsWith('\"') || (time && text.includes(\"[\")) ? quote(text) : text);\n\n/** `strip <題>: <欄>, <欄>` の行 */\nfunction readStrip(source: SourceLine, state: ParseState): void {\n const { m, figure } = state;\n state.beforeSteps(source);\n if (figure.strip) throw fail(source, 0, m.stripTwice);\n const text = source.text;\n const start = skipSpaces(text, \"strip\".length);\n let stripTitle: string;\n let colon: number;\n if (text[start] === '\"') {\n const quoted = readQuoted(source, start, m);\n stripTitle = quoted.value;\n colon = skipSpaces(text, quoted.end);\n } else {\n colon = text.indexOf(\":\", start);\n stripTitle = colon < 0 ? \"\" : text.slice(start, colon).trim();\n }\n if (stripTitle === \"\" || text[colon] !== \":\") throw fail(source, 0, m.stripShape);\n if (state.kind === \"time\") {\n figure.strip = { title: stripTitle, fields: readFields(source, colon + 1, state) };\n return;\n }\n const fields = readList(source, colon + 1, m);\n // 物差しは時間軸の図だけが書ける。ほかの図では欄の名前の一部として読んでいた形なので、欄が属性の形で終わる時だけ断る\n const metered = /\\[\\s*meter\\s*:/u.exec(text);\n if (metered && fields.some((f) => /\\[\\s*meter\\s*:[^\\]]*\\]$/u.test(f))) throw fail(source, metered.index + 1, m.timeOnly(\"meter\"));\n figure.strip = { title: stripTitle, fields };\n}\n\n/**\n * 時間軸の図の `strip` の行の欄。`,` で区切り、欄の名前の後ろに `[meter: <割合>]` を書いた欄は物差しにする。\n * `[` を含む名前は `\"` で囲む\n */\nfunction readFields(source: SourceLine, at: number, state: ParseState): string[] {\n const { m, figure } = state;\n const text = source.text;\n const items: string[] = [];\n for (let i = at; ; ) {\n const start = skipSpaces(text, i);\n let value: string;\n let end: number;\n if (text[start] === '\"') {\n const quoted = readQuoted(source, start, m);\n value = quoted.value;\n end = skipSpaces(text, quoted.end);\n } else {\n end = start;\n while (end < text.length && text[end] !== \",\" && text[end] !== \"[\") end++;\n value = text.slice(start, end).trim();\n }\n if (value === \"\") throw fail(source, start, m.emptyStripField);\n if (text[end] === \"[\") {\n const close = text.indexOf(\"]\", end);\n if (close < 0) throw fail(source, end, m.attrUnclosed);\n const inside = text.slice(end + 1, close);\n const inner = /^\\s*([a-z]*)\\s*:\\s*(.*?)\\s*$/u.exec(inside);\n if (!inner) throw fail(source, end + 1, m.attrNoColon(inside.trim()));\n const key = inner[1] ?? \"\";\n if (!STRIP_ATTRS.includes(key)) throw fail(source, end + 1, m.badAttr(key, STRIP_ATTRS));\n if (!RATIO.test(inner[2] ?? \"\")) throw fail(source, end + 1, m.badRatio);\n figure.meters.push({ field: value, line: inner[2] ?? \"\" });\n end = skipSpaces(text, close + 1);\n }\n if (end < text.length && text[end] !== \",\") throw fail(source, end, m.afterQuote);\n items.push(value);\n if (end >= text.length) return items;\n i = end + 1;\n }\n}\n\n/** `set <欄>: <値> [tag: <札>]` か `set <欄> [tag: <札>]` の行 */\nfunction readSet(source: SourceLine, state: ParseState): DiagramEvent {\n const { m, figure } = state;\n const declared = figure.strip;\n if (!declared) throw fail(source, 0, m.stripUndeclared);\n const text = source.text;\n const start = skipSpaces(text, \"set\".length);\n let field: string;\n let at: number;\n if (text[start] === '\"') {\n const quoted = readQuoted(source, start, m);\n field = quoted.value;\n at = skipSpaces(text, quoted.end);\n } else {\n at = start;\n while (at < text.length && text[at] !== \":\" && text[at] !== \"[\") at++;\n field = text.slice(start, at).trim();\n }\n if (!declared.fields.includes(field)) throw fail(source, start, m.noSuchField(field));\n let value: string | undefined;\n if (text[at] === \":\") {\n const named = readName(source, at + 1, m);\n if (named.value === \"\") throw fail(source, at, m.stripNeedsValue);\n value = named.value;\n at = named.rest;\n }\n if (at < text.length && text[at] !== \"[\") throw fail(source, at, m.stripNeedsValue);\n const tag = at < text.length ? readAttrs(source, at, SET_ATTRS, m).get(\"tag\")?.value : undefined;\n if (value === undefined && tag === undefined) throw fail(source, 0, m.stripNeedsValue);\n if (value !== undefined && figure.meters.some((meter) => meter.field === field) && !RATIO.test(value)) throw fail(source, start, m.meterValue(field));\n return {\n type: \"strip\",\n field,\n ...(value !== undefined ? { value } : {}),\n ...(tag !== undefined ? { tag } : {}),\n };\n}\n\nexport const reading: BlockReading<StripMessages> = {\n read: {\n strip: (source, state) => {\n readStrip(source, state);\n },\n set: (source, state) => {\n state.inStep(source).events.push(readSet(source, state));\n },\n },\n print: {\n events: { strip: (e) => `set ${keyText(e.field)}${e.value === undefined ? \"\" : `: ${name(e.value)}`}${attrs([[\"tag\", e.tag]])}` },\n figure: (diagram) => {\n if (!diagram.strip) return [];\n const time = diagram.kind === \"time\";\n const meters = new Map((diagram.strip.meters ?? []).map((m) => [m.field, m.line]));\n const fields = diagram.strip.fields.map((f) => `${fieldText(f, time)}${attrs([[\"meter\", meters.get(f)]])}`);\n return [`strip ${keyText(diagram.strip.title)}: ${fields.join(\", \")}`];\n },\n },\n messages: {\n ja: {\n stripTwice: \"strip は 1 つだけ宣言する\",\n stripShape: \"strip は strip <題>: <欄>, <欄> の形で書く\",\n emptyStripField: \"strip の欄の名前が空\",\n stripUndeclared: \"set を書く前に、strip <題>: <欄>, <欄> で帯を宣言する\",\n noSuchField: (field) => `${field} という欄は strip に無い`,\n stripNeedsValue: \"set は set <欄>: <値> か set <欄> [tag: <札>] の形で書く\",\n badRatio: \"物差しの線は分数 (2/3) か百分率 (97%) で書く\",\n meterValue: (field) => `${field} は物差しの欄なので、値を分数 (2/3) か百分率 (97%) で書く`,\n },\n en: {\n stripTwice: \"Declare only one strip\",\n stripShape: \"Write a strip as strip <title>: <field>, <field>\",\n emptyStripField: \"A strip field name is empty\",\n stripUndeclared: \"Declare the strip as strip <title>: <field>, <field> before writing set\",\n noSuchField: (field) => `The strip has no field named ${field}`,\n stripNeedsValue: \"Write set as set <field>: <value> or set <field> [tag: <tag>]\",\n badRatio: \"Write the meter line as a fraction (2/3) or a percentage (97%)\",\n meterValue: (field) => `${field} is a meter, so write its value as a fraction (2/3) or a percentage (97%)`,\n },\n },\n};\n","// packages/dragon/scripts/build-blocks.mjs が置き場の dir から書き出した。手で直さない\nimport type { BlockReading } from \"./block\";\nimport { reading as actReading } from \"./act/read\";\nimport { reading as boxReading } from \"./box/read\";\nimport { reading as carryReading } from \"./carry/read\";\nimport { reading as colorReading } from \"./color/read\";\nimport { reading as edgeReading } from \"./edge/read\";\nimport { reading as edgeLabelReading } from \"./edge-label/read\";\nimport { reading as groupReading } from \"./group/read\";\nimport { reading as iconReading } from \"./icon/read\";\nimport { reading as lifelineReading } from \"./lifeline/read\";\nimport { reading as linkReading } from \"./link/read\";\nimport { reading as noteReading } from \"./note/read\";\nimport { reading as sourceReading } from \"./source/read\";\nimport { reading as stepReading } from \"./step/read\";\nimport { reading as stripReading } from \"./strip/read\";\n\n/** 入口が初めから持つ読み方。コアブロックと、後から読まない図の種類の個別ブロック。鍵は置き場の dir の名前 (#3349) */\nexport const ENTRY_READINGS: Readonly<Record<string, BlockReading>> = {\n \"act\": actReading,\n \"box\": boxReading,\n \"carry\": carryReading,\n \"color\": colorReading,\n \"edge\": edgeReading,\n \"edge-label\": edgeLabelReading,\n \"group\": groupReading,\n \"icon\": iconReading,\n \"lifeline\": lifelineReading,\n \"link\": linkReading,\n \"note\": noteReading,\n \"source\": sourceReading,\n \"step\": stepReading,\n \"strip\": stripReading,\n};\n","/**\n * ブロックの読み方の登録簿 (#3349)。\n *\n * 読む処理 (`parser.ts`) と書き戻す処理 (`printer.ts`) と誤りの文の表 (`messages.ts`) は、ブロックの読み方をここから引く。\n * 入口は初めから持つ読み方 (コアブロックと、後から読まない図の種類の個別ブロック、`entry-readings.ts`) を読み込みの時に登録する。\n * 全部入りの入口は残りの読み方も読み込みの時に登録し (`kinds/all.ts`)、軽い入口は書いた図が使う時に読んで登録する (`light.ts`)。\n * 登録した読み方は登録した順でなく、ブロックの並び (`rank`) の順に引く。\n */\nimport { type Block, type BlockReading, ranked } from \"./block\";\nimport { ENTRY_READINGS } from \"./entry-readings\";\nimport { BLOCKS } from \"./index\";\n\nconst registered = new Map<string, BlockReading>(Object.entries(ENTRY_READINGS));\n/** 登録が変わった回数。引いた表を作り直すかを、呼ぶ側がこの数で決める */\nlet changes = 0;\n\n/** ブロック `name` の読み方を登録する。同じブロックを 2 度登録しても、後の登録で替わるだけ */\nexport function registerReading(name: string, reading: BlockReading): void {\n registered.set(name, reading);\n changes += 1;\n}\n\n/** ブロック `name` の読み方を持っているか */\nexport const readingLoaded = (name: string): boolean => registered.has(name);\n\n/** ブロック `name` の読み方。持っていなければ `undefined` */\nexport const readingOf = (name: string): BlockReading | undefined => registered.get(name);\n\n/** 登録が変わった回数 */\nexport const readingChanges = (): number => changes;\n\n/** 持っている読み方を、ブロックの並び (`rank`) の順に、定義と組にして返す */\nexport function loadedReadings(): { block: Block; reading: BlockReading }[] {\n return ranked(BLOCKS as unknown as Record<string, Block>).flatMap((block) => {\n const reading = registered.get(block.name);\n return reading ? [{ block, reading }] : [];\n });\n}\n\n/**\n * `changes` が変わった時だけ `make` で作り直して返す、引いた表の入れ物。\n * 読み方を引いて作る表 (行の頭の語ごとの読む処理、書き戻す処理、誤りの文) は、登録が変わらない間は同じ表を使う\n */\nexport function cachedByReadings<T>(make: () => T): () => T {\n let made: { at: number; value: T } | undefined;\n return () => {\n if (!made || made.at !== changes) made = { at: changes, value: make() };\n return made.value;\n };\n}\n","// packages/dragon/scripts/build-blocks.mjs が置き場の dir から書き出した。手で直さない\nimport type { BlockReading } from \"./block\";\n\n/** 後から読む図の種類の個別ブロックの読み方を読む関数。鍵は置き場の dir の名前。軽い入口が書いた図が使う時に呼ぶ (#3349) */\nexport const LATER_READINGS: Readonly<Record<string, () => Promise<BlockReading>>> = {\n \"ask\": () => import(\"./ask/read\").then((m): BlockReading => m.reading),\n \"branch\": () => import(\"./branch/read\").then((m): BlockReading => m.reading),\n \"chain\": () => import(\"./chain/read\").then((m): BlockReading => m.reading),\n \"commit\": () => import(\"./commit/read\").then((m): BlockReading => m.reading),\n \"copy\": () => import(\"./copy/read\").then((m): BlockReading => m.reading),\n \"item\": () => import(\"./item/read\").then((m): BlockReading => m.reading),\n \"leaf\": () => import(\"./leaf/read\").then((m): BlockReading => m.reading),\n \"legend\": () => import(\"./legend/read\").then((m): BlockReading => m.reading),\n \"line\": () => import(\"./line/read\").then((m): BlockReading => m.reading),\n \"merge\": () => import(\"./merge/read\").then((m): BlockReading => m.reading),\n \"node\": () => import(\"./node/read\").then((m): BlockReading => m.reading),\n \"order\": () => import(\"./order/read\").then((m): BlockReading => m.reading),\n \"pick\": () => import(\"./pick/read\").then((m): BlockReading => m.reading),\n \"point\": () => import(\"./point/read\").then((m): BlockReading => m.reading),\n \"press\": () => import(\"./press/read\").then((m): BlockReading => m.reading),\n \"queue\": () => import(\"./queue/read\").then((m): BlockReading => m.reading),\n \"role\": () => import(\"./role/read\").then((m): BlockReading => m.reading),\n \"route\": () => import(\"./route/read\").then((m): BlockReading => m.reading),\n \"row\": () => import(\"./row/read\").then((m): BlockReading => m.reading),\n \"scale\": () => import(\"./scale/read\").then((m): BlockReading => m.reading),\n \"seal\": () => import(\"./seal/read\").then((m): BlockReading => m.reading),\n \"side-path\": () => import(\"./side-path/read\").then((m): BlockReading => m.reading),\n \"stamp\": () => import(\"./stamp/read\").then((m): BlockReading => m.reading),\n \"start-finish\": () => import(\"./start-finish/read\").then((m): BlockReading => m.reading),\n \"zoom\": () => import(\"./zoom/read\").then((m): BlockReading => m.reading),\n};\n","/**\n * 構成図の置き場所。\n *\n * 区画を上から帯に積み、帯の左に区画の名前を置く。箱は全ての帯で共通の列に並べるので、\n * 区画をまたぐ線は縦にまっすぐ走る。箱の並びは線を辿って決める。前の区画の箱から線が来る箱を\n * その箱の列に置き、そこから線で繋がる箱を隣の列へ (寄せの指示が左か右なら下の行へ) 置いていく。\n * 線は縦と横の折れ線で、間にある箱を避ける。名前が箱に掛かる時は帯を広げて名前の場所を空ける。\n */\nimport { LOOK, TYPE } from \"../../look/values\";\nimport type { DiagramModel, LabelSide, Region } from \"../../schema\";\nimport { textWidth } from \"../../layout/measure\";\nimport {\n badgeOnPath,\n badgeRect,\n boxColors,\n boxWidth,\n cornerBadge,\n edgeColor,\n edgesOf,\n labelStyle,\n type Layout,\n lineBadges,\n LOOP_ROOM,\n loopBadge,\n loopLabelBase,\n loopUnder,\n replaceSameSpot,\n layoutStrip,\n type Point,\n placeLabel,\n placeSlot,\n type Rect,\n regionColors,\n type SceneBox,\n type SceneEdge,\n type SceneLabel,\n type SceneRegion,\n seatCarriers,\n shiftContent,\n slotBoxWidth,\n slotRooms,\n stripNeed,\n} from \"../../layout/scene\";\n\ninterface Group {\n region?: Region;\n members: string[];\n}\n\ninterface Slot {\n group: number;\n col: number;\n row: number;\n}\n\ninterface Room {\n top: number;\n bottom: number;\n}\n\nexport function layoutArchitecture(diagram: DiagramModel): Layout {\n const groups = groupsOf(diagram);\n const slots = placeBoxes(diagram, groups);\n const rooms = groups.map(() => ({ top: 0, bottom: 0 }));\n let layout = arrange(diagram, groups, slots, rooms);\n // 名前を置く場所が帯の外へ出たら、その帯を広げて置き直す\n for (let pass = 0; pass < 3 && grow(layout, groups, slots, rooms); pass++) layout = arrange(diagram, groups, slots, rooms);\n return layout;\n}\n\nfunction groupsOf(diagram: DiagramModel): Group[] {\n const regions = diagram.regions ?? [];\n const known = new Set(regions.map((r) => r.id));\n const groups: Group[] = regions.map((region) => ({ region, members: diagram.boxes.filter((b) => b.region === region.id).map((b) => b.id) }));\n const loose = diagram.boxes.filter((b) => b.region === undefined || !known.has(b.region)).map((b) => b.id);\n if (loose.length > 0) groups.push({ members: loose });\n return groups;\n}\n\nconst vertical = (side: LabelSide | undefined): boolean => side === \"left\" || side === \"right\";\n\n/** 箱を列と行へ置く。列は全ての区画で共通。 */\nfunction placeBoxes(diagram: DiagramModel, groups: Group[]): Map<string, Slot> {\n const columns = LOOK.architecture.columns;\n const edges = edgesOf(diagram).map((e) => e.edge);\n const slots = new Map<string, Slot>();\n groups.forEach((group, g) => {\n const inGroup = new Set(group.members);\n const taken = new Set<string>();\n const free = (col: number, row: number): boolean => col >= 0 && col < columns && !taken.has(`${col},${row}`);\n const near = (col: number, row: number): [number, number] => {\n const start = Math.min(columns - 1, Math.max(0, col));\n for (let r = row; ; r++) {\n for (let d = 0; d < columns; d++) {\n for (const c of [start + d, start - d]) if (free(c, r)) return [c, r];\n }\n }\n };\n const put = (id: string, col: number, row: number): void => {\n slots.set(id, { group: g, col, row });\n taken.add(`${col},${row}`);\n };\n let dir = 1;\n const visit = (id: string): void => {\n for (const edge of edges) {\n const partner = edge.from === id ? edge.to : edge.to === id ? edge.from : undefined;\n if (partner === undefined || !inGroup.has(partner) || slots.has(partner)) continue;\n const me = slots.get(id) as Slot;\n const [c, r] = vertical(edge.labelSide) ? near(me.col, me.row + 1) : free(me.col + dir, me.row) ? [me.col + dir, me.row] : near(me.col + dir, me.row);\n put(partner, c, r);\n visit(partner);\n }\n };\n // 前の区画の箱と線で繋がる箱 (起きる順に早い線から) をその箱の列に置き、そこから辿る\n const anchorOf = (id: string): { order: number; col: number } | undefined => {\n for (let i = 0; i < edges.length; i++) {\n const edge = edges[i];\n const partner = edge?.from === id ? edge.to : edge?.to === id ? edge.from : undefined;\n const slot = partner === undefined ? undefined : slots.get(partner);\n if (slot && slot.group < g) return { order: i, col: slot.col };\n }\n return undefined;\n };\n let placed = 0;\n for (;;) {\n const rest = group.members.filter((id) => !slots.has(id));\n if (rest.length === 0) break;\n const anchored = rest.map((id) => ({ id, anchor: anchorOf(id) })).filter((a) => a.anchor !== undefined);\n anchored.sort((a, b) => (a.anchor?.order ?? 0) - (b.anchor?.order ?? 0));\n const pick = anchored[0] ?? { id: rest[0] as string, anchor: undefined };\n const want = pick.anchor?.col ?? 0;\n if (placed === 0) dir = want >= (columns - 1) / 2 ? -1 : 1;\n const [c, r] = free(want, 0) ? [want, 0] : near(want, 0);\n put(pick.id, c, r);\n visit(pick.id);\n placed++;\n }\n });\n // 使っていない列を詰める\n const used = [...new Set([...slots.values()].map((s) => s.col))].sort((a, b) => a - b);\n for (const slot of slots.values()) slot.col = used.indexOf(slot.col);\n return slots;\n}\n\n/** 区画の名前の行。空白があれば真ん中に近い空白で 2 行に折る。 */\nfunction nameLines(name: string): string[] {\n const spaces = [...name.matchAll(/ /g)].map((m) => m.index);\n if (spaces.length === 0) return [name];\n const at = spaces.reduce((best, i) => (Math.abs(i - name.length / 2) < Math.abs(best - name.length / 2) ? i : best));\n return [name.slice(0, at), name.slice(at + 1)];\n}\n\nfunction headerSize(region: Region): { w: number; h: number; lines: string[] } {\n const { icon, nameY, line, inset } = LOOK.region;\n const lines = nameLines(region.name);\n const w = Math.max(icon, ...lines.map((l) => textWidth(l, TYPE.regionName)), textWidth(region.note ?? \"\", TYPE.regionNote));\n // 名前の最後の行の下と、添え書きの下まで\n const h = nameY - inset + (lines.length - 1) * line + (region.note ? line : 0) + LOOK.gap / 2;\n return { w, h, lines };\n}\n\nfunction arrange(diagram: DiagramModel, groups: Group[], slots: Map<string, Slot>, rooms: Room[]): Layout {\n const { box: B, region: R, architecture: A, margin, gap } = LOOK;\n const colors = boxColors(diagram);\n const regionColor = regionColors(diagram);\n const edges = edgesOf(diagram);\n\n // 列の幅と列の間。隣の列を横に結ぶ名前のある線は、名前が収まるまで間を広げる (広げすぎる時は脇へ寄せる)\n const columnCount = Math.max(1, ...[...slots.values()].map((s) => s.col + 1));\n // 運ぶ物を出し入れする箱は、絵柄の横に置き場を並べられる幅にする (#3176)\n const carriedIn = slotRooms(diagram);\n const widths = new Map(diagram.boxes.map((b) => [b.id, Math.max(boxWidth(diagram, b.id, true), slotBoxWidth(carriedIn.get(b.id), b.icon !== undefined, B.padX))]));\n const colW = Array.from({ length: columnCount }, (_, c) => Math.max(B.minW, ...[...slots].filter(([, s]) => s.col === c).map(([id]) => widths.get(id) ?? B.minW)));\n const between = Array.from({ length: Math.max(0, columnCount - 1) }, () => A.columnGap as number);\n for (const { edge } of edges) {\n const a = slots.get(edge.from);\n const b = slots.get(edge.to);\n if (!a || !b || edge.label === undefined || a.group !== b.group || a.row !== b.row || Math.abs(a.col - b.col) !== 1 || vertical(edge.labelSide)) continue;\n const need = textWidth(edge.label, labelStyle(edge.label)) + LOOK.label.padX * 2 + A.labelRoom * 2;\n const i = Math.min(a.col, b.col);\n if (need <= A.maxColumnGap) between[i] = Math.max(between[i] ?? 0, need);\n }\n const headers = groups.map((g) => (g.region ? headerSize(g.region) : undefined));\n const headerW = Math.max(0, ...headers.map((h) => (h ? h.w + R.inset * 2 : 0)));\n const colLeft: number[] = [];\n for (let c = 0; c < columnCount; c++) colLeft.push(c === 0 ? margin + (headerW > 0 ? headerW : R.pad) : (colLeft[c - 1] as number) + (colW[c - 1] as number) + (between[c - 1] as number));\n const center = (c: number): number => (colLeft[c] as number) + (colW[c] as number) / 2;\n\n // 同じ箱へ戻る線は箱の下の輪で描くので、輪を持つ箱の行の下は、輪とその下の名前が収まるだけ空ける (#3186)\n const looped = new Set(edges.filter(({ edge }) => edge.from === edge.to).map(({ edge }) => edge.from));\n const loopRows = new Set([...looped].flatMap((id) => {\n const slot = slots.get(id);\n return slot ? [`${slot.group}:${slot.row}`] : [];\n }));\n const loopRoom = (g: number, row: number): number => (loopRows.has(`${g}:${row}`) ? LOOP_ROOM : 0);\n\n // 帯を上から積む\n const boxes: SceneBox[] = [];\n const bands: { group: number; y: number; h: number; rows: number }[] = [];\n let cursor = margin;\n groups.forEach((group, g) => {\n const rows = Math.max(1, ...group.members.map((id) => (slots.get(id)?.row ?? 0) + 1));\n const room = rooms[g] as Room;\n const top = cursor + R.pad + room.top;\n // 行の上端。輪を持つ行の下は、行の間に輪の分を足す\n const rowTop: number[] = [0];\n for (let r = 1; r < rows; r++) rowTop.push((rowTop[r - 1] as number) + B.h + A.rowGap + loopRoom(g, r - 1));\n for (const id of group.members) {\n const slot = slots.get(id) as Slot;\n const source = diagram.boxes.find((b) => b.id === id);\n const w = widths.get(id) ?? B.minW;\n const cx = center(slot.col);\n const y = top + (rowTop[slot.row] as number);\n boxes.push({\n id,\n name: source?.name ?? id,\n ...(source?.sub !== undefined ? { sub: source.sub } : {}),\n ...(source?.icon !== undefined ? { icon: source.icon } : {}),\n color: colors.get(id) ?? \"slate\",\n x: cx - w / 2,\n y,\n w,\n h: B.h,\n cx,\n cy: y + B.h / 2,\n });\n }\n const contentBottom = top + (rowTop[rows - 1] as number) + B.h + loopRoom(g, rows - 1);\n const header = headers[g];\n const h = Math.max(contentBottom + R.pad + room.bottom - cursor, header ? header.h + R.inset * 2 : 0, group.region ? R.minH : 0);\n bands.push({ group: g, y: cursor, h, rows });\n cursor += h + R.gap;\n });\n const bandsBottom = cursor - R.gap;\n for (const box of boxes) placeSlot(box, carriedIn.get(box.id));\n\n const byId = new Map(boxes.map((b) => [b.id, b]));\n const bandOf = (id: string) => bands[slots.get(id)?.group ?? 0] as (typeof bands)[number];\n /** 折れ線のどれかの区間が、四角を `pad` だけ広げた所に掛かる */\n const crosses = (points: Point[], rect: Rect, pad: number): boolean => {\n for (let i = 1; i < points.length; i++) {\n const [x1, y1] = points[i - 1] as Point;\n const [x2, y2] = points[i] as Point;\n if (Math.min(x1, x2) <= rect.x + rect.w + pad && Math.max(x1, x2) >= rect.x - pad && Math.min(y1, y2) <= rect.y + rect.h + pad && Math.max(y1, y2) >= rect.y - pad) return true;\n }\n return false;\n };\n // 輪を持つ箱の下の、輪と名前の置き場。ほかの線は、その箱から出る線と入る線も含めてここを通さない (#3186)\n const loopZones: Rect[] = [...looped].flatMap((id) => {\n const box = byId.get(id);\n return box ? [{ x: box.x, y: box.y + box.h, w: box.w, h: LOOP_ROOM }] : [];\n });\n const onLoop = (points: Point[]): boolean => loopZones.some((zone) => crosses(points, zone, 0));\n const blocked = (points: Point[], a: string, b: string): boolean =>\n boxes.some((box) => box.id !== a && box.id !== b && crosses(points, box, LOOK.label.search)) || onLoop(points);\n // 箱の下 (上) の、次の行か次の帯との間の真ん中。箱の下に輪が在る時は、輪と名前の下を通す (#3186)\n const laneBelow = (id: string): number => {\n const box = byId.get(id) as SceneBox;\n const band = bandOf(id);\n const slot = slots.get(id);\n const under = box.y + box.h + (slot ? loopRoom(slot.group, slot.row) : 0);\n return (slot?.row ?? 0) < band.rows - 1 ? under + A.rowGap / 2 : Math.min(under + R.pad / 2, band.y + band.h - LOOK.edge.inset);\n };\n const laneAbove = (id: string): number => {\n const box = byId.get(id) as SceneBox;\n const band = bandOf(id);\n return (slots.get(id)?.row ?? 0) > 0 ? box.y - A.rowGap / 2 : Math.max(box.y - R.pad / 2, band.y + LOOK.edge.inset);\n };\n const inset = LOOK.edge.inset;\n /** 列 `col` の右 (左) の、隣の列との間の真ん中。同じ列の箱は幅が違うので、箱ではなく列の端から測る (幅の広い箱の中を通さない) */\n const gapX = (col: number, toRight: boolean): number =>\n toRight ? (colLeft[col] as number) + (colW[col] as number) + (between[col] ?? A.columnGap) / 2 : (colLeft[col] as number) - (between[col - 1] ?? A.columnGap) / 2;\n const route = (from: string, to: string): Point[] => {\n const a = byId.get(from) as SceneBox;\n const b = byId.get(to) as SceneBox;\n // 同じ箱へ戻る線は、状態遷移図と同じ箱の下の輪で描く (#3186)\n if (from === to) return loopUnder(a);\n const sa = slots.get(from) as Slot;\n const sb = slots.get(to) as Slot;\n if (sa.group === sb.group && sa.row === sb.row) {\n const right = b.cx > a.cx;\n const straight: Point[] = [\n [right ? a.x + a.w : a.x, a.cy],\n [right ? b.x - inset : b.x + b.w + inset, b.cy],\n ];\n if (!blocked(straight, from, to)) return straight;\n const below = laneBelow(from);\n const under: Point[] = [\n [a.cx, a.y + a.h],\n [a.cx, below],\n [b.cx, below],\n [b.cx, b.y + b.h + inset],\n ];\n if (!onLoop(under)) return under;\n // 下を回ると輪を横切る時は、上を回る\n const above = laneAbove(from);\n const over: Point[] = [\n [a.cx, a.y],\n [a.cx, above],\n [b.cx, above],\n [b.cx, b.y - inset],\n ];\n return onLoop(over) ? under : over;\n }\n const down = b.cy > a.cy;\n const leave: Point = [a.cx, down ? a.y + a.h : a.y];\n const enter: Point = [b.cx, down ? b.y - inset : b.y + b.h + inset];\n if (sa.col === sb.col) {\n const straight: Point[] = [leave, enter];\n if (!blocked(straight, from, to)) return straight;\n const x = gapX(sa.col, true);\n return [\n [a.x + a.w, a.cy],\n [x, a.cy],\n [x, b.cy],\n [b.x + b.w + inset, b.cy],\n ];\n }\n const right = b.cx > a.cx;\n const lane = down ? laneBelow(from) : laneAbove(from);\n const candidates: Point[][] = [\n [leave, [a.cx, b.cy], [right ? b.x - inset : b.x + b.w + inset, b.cy]],\n [[right ? a.x + a.w : a.x, a.cy], [b.cx, a.cy], enter],\n [leave, [a.cx, lane], [b.cx, lane], enter],\n ];\n // 輪を持つ箱の下からは出入りしない。箱の脇から列の間へ出て、列の間を縦に走る (#3186)\n if (looped.has(from) || looped.has(to)) {\n const ax = gapX(sa.col, right);\n const bx = gapX(sb.col, !right);\n const out: Point[] = [\n [right ? a.x + a.w : a.x, a.cy],\n [ax, a.cy],\n ];\n const side: Point = [right ? b.x - inset : b.x + b.w + inset, b.cy];\n candidates.push(\n [...out, [ax, b.cy], side],\n [...out, [ax, lane], [b.cx, lane], enter],\n [leave, [a.cx, lane], [bx, lane], [bx, b.cy], side],\n [...out, [ax, lane], [bx, lane], [bx, b.cy], side],\n );\n }\n return candidates.find((points) => !blocked(points, from, to)) ?? (candidates[2] as Point[]);\n };\n\n const sceneEdges: SceneEdge[] = edges.map(({ step, event, edge }) => ({\n step,\n event,\n from: edge.from,\n to: edge.to,\n points: route(edge.from, edge.to),\n color: edgeColor(edge, colors),\n carry: edge.carry,\n }));\n // 運ぶ物は着いた箱の置き場に留まり、出る箱の置き場で走り出しを待つ (#3176)\n seatCarriers(sceneEdges, byId, carriedIn);\n // 同じ 2 つの箱を行きと帰りで結ぶまっすぐな線は、少しずらして重ならないようにする。\n // ずらした線の名前は、ずらした側 (もう一方の線の反対側) に置き、どちらの線の名前かを取り違えないようにする (#3175)\n const outward = new Map<SceneEdge, LabelSide>();\n for (const edge of sceneEdges) {\n if (edge.points.length !== 2) continue;\n const back = sceneEdges.some((other) => other.from === edge.to && other.to === edge.from && other.points.length === 2);\n if (!back) continue;\n const [p, q] = edge.points as [Point, Point];\n const flat = Math.abs(q[1] - p[1]) < Math.abs(q[0] - p[0]);\n const d = (edge.from < edge.to ? 1 : -1) * LOOK.edge.parallel;\n edge.points = edge.points.map(([x, y]) => (flat ? [x, y + d] : [x + d, y]));\n outward.set(edge, flat ? (d > 0 ? \"below\" : \"above\") : d > 0 ? \"right\" : \"left\");\n }\n\n const regions: SceneRegion[] = [];\n groups.forEach((group, g) => {\n const band = bands[g] as (typeof bands)[number];\n const header = headers[g];\n if (!group.region || !header) return;\n regions.push({\n id: group.region.id,\n lines: header.lines,\n ...(group.region.note !== undefined ? { note: group.region.note } : {}),\n ...(group.region.icon !== undefined ? { icon: group.region.icon } : {}),\n color: regionColor.get(group.region.id) ?? \"slate\",\n x: margin,\n y: band.y,\n w: 0,\n h: band.h,\n header: { x: margin + R.inset, y: band.y + R.inset, w: header.w, h: header.h },\n });\n });\n\n // 線の名前は、同じ時刻に見えている段の番号 (その段とそれより前の段の番号) も避ける (#3175)\n // 輪の番号は弧に重ねず弧の右に置く (#3186)\n const badgeAt = (edge: SceneEdge, taken: Point[], lines: Point[][]): Point => (edge.from === edge.to ? loopBadge(edge.points) : badgeOnPath(edge.points, taken, lines));\n const early = lineBadges(sceneEdges, diagram.steps.length, badgeAt);\n const labels: SceneLabel[] = [];\n for (const edge of sceneEdges) {\n const source = diagram.steps[edge.step]?.events[edge.event];\n if (source?.type !== \"edge\" || source.label === undefined) continue;\n const seen = [...early].filter(([s]) => s <= edge.step).map(([, b]) => badgeRect(b.point));\n const soft: Rect[] = [...regions.map((r) => r.header), ...labels.filter((l) => l.step === edge.step)];\n // 指示の無い線の名前は、空いていなければ反対の側も探す。ずらした線は自分の側だけを探す\n const side = source.labelSide ?? outward.get(edge);\n // 輪の名前は輪の下から探す (#3186)\n const below = edge.from === edge.to ? { side: \"below\" as const, base: loopLabelBase(edge.points, textWidth(source.label, labelStyle(source.label)) + LOOK.label.padX * 2) } : undefined;\n labels.push(\n placeLabel(\n { step: edge.step, event: edge.event, text: source.label, points: edge.points, color: edge.color, ...(below ?? (side ? { side } : { flip: true })) },\n { hard: boxes, soft, touch: seen },\n ),\n );\n }\n\n const layout: Layout = { kind: \"architecture\", width: 0, height: 0, regions, boxes, lifelines: [], edges: sceneEdges, labels, actions: [], badges: [], paths: [], ends: [] };\n // 名前が左へ出たら、帯の中身を右へ寄せる。帯は図の幅いっぱいに引き直す\n const shift = labels.length > 0 ? Math.max(0, margin + LOOK.label.soft - Math.min(...labels.map((l) => l.x))) : 0;\n if (shift > 0) shiftContent(layout, shift, 0);\n const contentRight = Math.max(...boxes.map((b) => b.x + b.w + R.pad), ...labels.map((l) => l.x + l.w + LOOK.label.soft), ...sceneEdges.flatMap((e) => e.points.map((p) => p[0] + R.pad)));\n const width = Math.max(contentRight + margin, stripNeed(diagram) + margin * 2);\n for (const region of regions) region.w = width - margin * 2;\n // 箱の下を回る線の名前は帯の下へ出ることがあるので、名前の下端まで図に入れる (#3176)\n const contentBottom = Math.max(bandsBottom, ...labels.map((l) => l.y + l.h));\n const strip = layoutStrip(diagram, margin, contentBottom + gap, width - margin * 2);\n layout.width = width;\n layout.height = (strip ? strip.y + strip.h : contentBottom) + margin;\n if (strip) layout.strip = strip;\n const lines = lineBadges(sceneEdges, diagram.steps.length, badgeAt);\n // 同じ所に置いた番号は、後の段が始まると入れ替える (#3184)\n layout.badges = replaceSameSpot(\n diagram.steps.map((step, s) => {\n const line = lines.get(s);\n if (!line) return cornerBadge(step.events, s, layout);\n return { step: s, x: line.point[0], y: line.point[1], color: line.edge.color };\n }),\n );\n return layout;\n}\n\n/** 区画の中を結ぶ線の名前が帯の外へ出ていたら、その分だけ帯の上か下を広げる。広げたら true。 */\nfunction grow(layout: Layout, groups: Group[], slots: Map<string, Slot>, rooms: Room[]): boolean {\n let grown = false;\n const soft = LOOK.label.soft;\n for (const label of layout.labels) {\n const edge = layout.edges.find((e) => e.step === label.step && e.event === label.event);\n const a = edge && slots.get(edge.from);\n const b = edge && slots.get(edge.to);\n if (!a || !b || a.group !== b.group || !groups[a.group]?.region) continue;\n const region = layout.regions.find((r) => r.id === groups[a.group]?.region?.id);\n const room = rooms[a.group];\n if (!region || !room) continue;\n const over = region.y + soft - label.y;\n const under = label.y + label.h - (region.y + region.h - soft);\n if (over > 0) {\n room.top += over;\n grown = true;\n }\n if (under > 0) {\n room.bottom += under;\n grown = true;\n }\n }\n return grown;\n}\n","/**\n * 構成図 (`architecture`) の定義 (#3345)。\n * 区画を上から帯に積み、箱を全ての帯で共通の列に並べて、線を縦と横の折れ線で引く。5 つの付け方を全て受け付ける\n */\nimport type { EagerKind } from \"../kind\";\nimport { layoutArchitecture } from \"./layout\";\n\nexport const kind: EagerKind = {\n name: \"architecture\",\n accepts: [\"place\", \"connect\", \"ride-on-line\", \"attach-to-box\", \"attach-to-figure\"],\n layout: layoutArchitecture,\n};\n","/**\n * 枝分かれの図 (`git`) の定義 (#3347)。\n * 枝を上から帯に積み、commit を左から積んで、枝の分かれと取り込みと当て直しを線で結ぶ。5 つの付け方を全て受け付ける。\n * 見本帳を開いた時に読まない図の種類なので、並べ方 (`layout.ts`) を読まずに後から読むと名乗る\n */\nimport type { Kind } from \"../kind\";\n\nexport const kind: Kind = {\n name: \"git\",\n accepts: [\"place\", \"connect\", \"ride-on-line\", \"attach-to-box\", \"attach-to-figure\"],\n later: true,\n};\n","/**\n * 列の図 (`lineup`) の定義 (#3348)。\n * 箱を列にして、チップを段ごとに並べ直す。線を持たないので、つなぐと線に乗るの付け方を受け付けず、置く、箱に付く、図に付くの 3 つを受け付ける。\n * 見本帳を開いた時に読まない図の種類なので、並べ方 (`layout.ts`) を読まずに後から読むと名乗る\n */\nimport type { Kind } from \"../kind\";\n\nexport const kind: Kind = {\n name: \"lineup\",\n accepts: [\"place\", \"attach-to-box\", \"attach-to-figure\"],\n later: true,\n};\n","/**\n * 時系列図の置き場所。\n *\n * 生存線の頭の箱を上に横 1 列に並べ、段で起きる線と処理を起きる順に 1 行ずつ下へ積む。\n * 生存線の間は、箱の幅と、その間を走る線の名前が収まる幅を取る。中身の帯は一番下に置く。\n */\nimport { LOOK, TYPE } from \"../../look/values\";\nimport type { DiagramModel } from \"../../schema\";\nimport { textWidth } from \"../../layout/measure\";\nimport {\n carrierHalf,\n badgeRect,\n boxColors,\n cornerBadge,\n boxWidth,\n edgeColor,\n labelStyle,\n type Layout,\n lineBadges,\n replaceSameSpot,\n layoutStrip,\n type Point,\n placeLabel,\n type SceneAction,\n type SceneBadge,\n type SceneBox,\n type SceneEdge,\n type SceneLabel,\n shiftContent,\n stripNeed,\n} from \"../../layout/scene\";\n\nexport function layoutSequence(diagram: DiagramModel): Layout {\n const { box: B, sequence: Q, label: L, margin, gap } = LOOK;\n const colors = boxColors(diagram);\n const listed = diagram.sequence?.lifelines ?? [];\n const order = [...listed, ...diagram.boxes.map((b) => b.id).filter((id) => !listed.includes(id))];\n const column = new Map(order.map((id, i) => [id, i]));\n const widths = order.map((id) => boxWidth(diagram, id, false));\n\n // 生存線の間。隣の箱どうしの隙間を取り、名前のある線が走る間は名前が収まるまで広げる\n const spacing = widths.slice(1).map((w, i) => (widths[i] as number) / 2 + w / 2 + Q.columnGap);\n const needs: { from: number; to: number; need: number }[] = [];\n for (const step of diagram.steps) {\n for (const event of step.events) {\n if (event.type !== \"edge\" || event.label === undefined) continue;\n const a = column.get(event.from) ?? 0;\n const b = column.get(event.to) ?? 0;\n const w = textWidth(event.label, labelStyle(event.label)) + L.padX * 2;\n if (a === b) {\n // 自分へ戻る線は名前を右に置くので、右の生存線までに輪と名前が収まる幅を取る\n if (a < spacing.length) needs.push({ from: a, to: a + 1, need: Q.selfW + L.side + w + Q.labelRoom });\n } else {\n needs.push({ from: Math.min(a, b), to: Math.max(a, b), need: w + Q.labelRoom * 2 });\n }\n }\n }\n needs.sort((x, y) => x.to - x.from - (y.to - y.from));\n for (const { from, to, need } of needs) {\n let have = 0;\n for (let i = from; i < to; i++) have += spacing[i] ?? 0;\n if (have >= need) continue;\n const add = (need - have) / (to - from);\n for (let i = from; i < to; i++) spacing[i] = (spacing[i] ?? 0) + add;\n }\n const xs: number[] = [];\n order.forEach((_, i) => xs.push(i === 0 ? margin + (widths[0] as number) / 2 : (xs[i - 1] as number) + (spacing[i - 1] as number)));\n\n const boxes: SceneBox[] = order.map((id, i) => {\n const source = diagram.boxes.find((b) => b.id === id);\n const w = widths[i] as number;\n const cx = xs[i] as number;\n return {\n id,\n name: source?.name ?? id,\n ...(source?.sub !== undefined ? { sub: source.sub } : {}),\n ...(source?.icon !== undefined ? { icon: source.icon } : {}),\n color: colors.get(id) ?? \"slate\",\n x: cx - w / 2,\n y: margin,\n w,\n h: B.h,\n cx,\n cy: margin + B.h / 2,\n };\n });\n const headBottom = margin + B.h;\n\n // 行を積む。線は上か下に名前を、処理は札を持つので、行ごとに上下に要る高さが違う\n const edges: SceneEdge[] = [];\n const actions: SceneAction[] = [];\n const requests: Parameters<typeof placeLabel>[0][] = [];\n let y = headBottom + Q.firstRow;\n let below = 0;\n let first = true;\n diagram.steps.forEach((step, s) => {\n step.events.forEach((event, e) => {\n if (event.type !== \"edge\" && event.type !== \"action\") return;\n let above: number;\n let under: number;\n if (event.type === \"edge\") {\n const side = event.labelSide ?? \"above\";\n const self = event.from === event.to;\n const named = event.label !== undefined;\n above = named && side === \"above\" ? Q.labelOffset + L.h / 2 : gap;\n under = self ? Q.selfH + gap : named && side === \"below\" ? Q.labelOffset + L.h / 2 : gap;\n } else {\n above = LOOK.action.h / 2;\n under = LOOK.action.h / 2;\n }\n y = first ? y + above : y + Math.max(Q.minPitch, below + Q.rowGap + above) + (e === 0 && s > 0 ? Q.stepGap : 0);\n first = false;\n below = under;\n\n if (event.type === \"edge\") {\n const xf = xs[column.get(event.from) ?? 0] as number;\n const xt = xs[column.get(event.to) ?? 0] as number;\n const dir = Math.sign(xt - xf) || 1;\n const points: Point[] =\n xf === xt\n ? [\n [xf, y],\n [xf + Q.selfW, y],\n [xf + Q.selfW, y + Q.selfH],\n [xf + LOOK.edge.inset, y + Q.selfH],\n ]\n : [\n [xf, y],\n [xt - dir * LOOK.edge.inset, y],\n ];\n const color = edgeColor(event, colors);\n // 運ぶ物は着いた生存線の向こう側に留まって矢印の先を隠さず、出る生存線の手前側で走り出しを待って段の番号を隠さない (#3176)\n const seats: Pick<SceneEdge, \"settle\" | \"wait\"> = {};\n if (event.carry.kind !== \"none\") {\n const reach = LOOK.slot.lifeline + carrierHalf(event.carry)[0];\n const [p0, p1] = points as [Point, Point];\n const [q0, q1] = points.slice(-2) as [Point, Point];\n const out = Math.sign(p1[0] - p0[0]) || 1;\n const into = Math.sign(q1[0] - q0[0]) || -1;\n seats.wait = [xf - out * reach, p0[1]];\n seats.settle = [xt + into * reach, q1[1]];\n }\n edges.push({ step: s, event: e, from: event.from, to: event.to, points, color, carry: event.carry, ...seats });\n if (event.label !== undefined) {\n requests.push({\n step: s,\n event: e,\n text: event.label,\n points,\n color,\n ...(event.labelSide ? { side: event.labelSide } : xf === xt ? { side: \"right\" as const } : {}),\n offset: Q.labelOffset,\n });\n }\n } else {\n // 札は生存線の上の番号の丸を隠さないよう、丸の右に出す (#3017)\n const x = xs[column.get(event.box) ?? 0] as number;\n const w = textWidth(event.label, TYPE.action) + LOOK.action.padX * 2;\n actions.push({ step: s, event: e, box: event.box, text: event.label, color: colors.get(event.box) ?? \"slate\", x: x + LOOK.badge.r + 4, y: y - LOOK.action.h / 2, w, h: LOOK.action.h });\n }\n });\n });\n const bottom = (first ? headBottom : y + below) + Q.tail;\n const lifelines = order.map((id, i) => ({ id, x: xs[i] as number, y1: headBottom, y2: bottom }));\n\n // 線の名前は、同じ時刻に見えている段の番号 (その段とそれより前の段の番号) も避ける (#3175)\n const early = lineBadges(edges, diagram.steps.length);\n const labels: SceneLabel[] = [];\n for (const request of requests) {\n const seen = [...early].filter(([s]) => s <= request.step).map(([, b]) => badgeRect(b.point));\n const soft = [...labels.filter((l) => l.step === request.step), ...actions];\n labels.push(placeLabel(request, { hard: boxes, soft, touch: seen }));\n }\n\n const layout: Layout = { kind: \"sequence\", width: 0, height: 0, regions: [], boxes, lifelines, edges, labels, actions, badges: [], paths: [], ends: [] };\n\n // 図の幅。名前が左に出たら全体を右へ寄せ、右端は一番右の物に余白を足した所\n const lefts = [...boxes.map((b) => b.x), ...labels.map((l) => l.x), ...actions.map((a) => a.x)];\n const shift = Math.max(0, margin - Math.min(...lefts));\n if (shift > 0) shiftContent(layout, shift, 0);\n const rights = [...boxes.map((b) => b.x + b.w), ...labels.map((l) => l.x + l.w), ...actions.map((a) => a.x + a.w), ...edges.flatMap((edge) => edge.points.map((p) => p[0]))];\n const width = Math.max(Math.max(...rights) + margin, stripNeed(diagram) + margin * 2);\n const strip = layoutStrip(diagram, margin, bottom + gap, width - margin * 2);\n layout.width = width;\n layout.height = (strip ? strip.y + strip.h : bottom) + margin;\n if (strip) layout.strip = strip;\n layout.badges = badges(diagram, layout);\n return layout;\n}\n\n/**\n * 段の番号。その段の最初の線の始まりに置き、線が無ければ処理する箱の生存線の上、無ければ書き換わる箱の角。\n * 処理の札はその段の終わりに消えるので、札に付けると止め絵で丸だけが浮く (#3017)。\n */\nfunction badges(diagram: DiagramModel, layout: Layout): SceneBadge[] {\n const lines = lineBadges(layout.edges, diagram.steps.length);\n const placed = diagram.steps.map((step, s): SceneBadge => {\n const line = lines.get(s);\n if (line) return { step: s, x: line.point[0], y: line.point[1], color: line.edge.color };\n const action = layout.actions.find((a) => a.step === s);\n const lifeline = action && layout.lifelines.find((l) => l.id === action.box);\n if (action && lifeline) return { step: s, x: lifeline.x, y: action.y + action.h / 2, color: action.color };\n return cornerBadge(step.events, s, layout);\n });\n // 同じ所に置いた番号は、後の段が始まると入れ替える (#3184)\n return replaceSameSpot(placed);\n}\n","/**\n * 時系列図 (`sequence`) の定義 (#3345)。\n * 箱を生存線の頭に横 1 列に置き、線と処理を段の順に上から積む。5 つの付け方を全て受け付ける\n */\nimport type { EagerKind } from \"../kind\";\nimport { layoutSequence } from \"./layout\";\n\nexport const kind: EagerKind = {\n name: \"sequence\",\n accepts: [\"place\", \"connect\", \"ride-on-line\", \"attach-to-box\", \"attach-to-figure\"],\n layout: layoutSequence,\n};\n","/**\n * 状態遷移図 (`state`) の定義 (#3347)。\n * 1 つの物が状態を移る様子を、辿った順に状態の箱を並べて追う。5 つの付け方を全て受け付ける。\n * 見本帳を開いた時に読まない図の種類なので、並べ方 (`layout.ts`) を読まずに後から読むと名乗る\n */\nimport type { Kind } from \"../kind\";\n\nexport const kind: Kind = {\n name: \"state\",\n accepts: [\"place\", \"connect\", \"ride-on-line\", \"attach-to-box\", \"attach-to-figure\"],\n later: true,\n};\n","/**\n * 時間軸の図 (`time`) の定義 (#3348)。\n * 時間軸に目盛りを並べ、針を決まった速さで進めて、印の列と節目と拡大の帯の箱を時刻に合わせて動かす。5 つの付け方を全て受け付ける。\n * 見本帳を開いた時に読まない図の種類なので、並べ方 (`layout.ts`) を読まずに後から読むと名乗る\n */\nimport type { Kind } from \"../kind\";\n\nexport const kind: Kind = {\n name: \"time\",\n accepts: [\"place\", \"connect\", \"ride-on-line\", \"attach-to-box\", \"attach-to-figure\"],\n later: true,\n};\n","/**\n * 木の図 (`tree`) の定義 (#3348)。\n * 段ごとに葉を出し、子から親を組んで、根まで木の線で結ぶ。5 つの付け方を全て受け付ける。\n * 見本帳を開いた時に読まない図の種類なので、並べ方 (`layout.ts`) を読まずに後から読むと名乗る\n */\nimport type { Kind } from \"../kind\";\n\nexport const kind: Kind = {\n name: \"tree\",\n accepts: [\"place\", \"connect\", \"ride-on-line\", \"attach-to-box\", \"attach-to-figure\"],\n later: true,\n};\n","/**\n * 試す図 (`try`) の定義 (#3337、#3348)。\n * 部品 (網、待ち行列、機械の列、釦、入力の帯) を上から積み、読み手が値を入れて動かす。箱と線を持たないので、置くと図に付くの 2 つを受け付ける。\n * 箱と段と出典と中身の帯は、置くか図に付く付け方でも試す図に描かないので、それぞれのブロックが付け方の `except` で断る。\n * 見本帳を開いた時に読まない図の種類なので、並べ方 (`layout.ts`) を読まずに後から読むと名乗る\n */\nimport type { Kind } from \"../kind\";\n\nexport const kind: Kind = {\n name: \"try\",\n accepts: [\"place\", \"attach-to-figure\"],\n later: true,\n};\n","// packages/dragon/scripts/build-blocks.mjs が置き場の dir から書き出した。手で直さない\nimport { kind as architectureKind } from \"./architecture/kind\";\nimport { kind as gitKind } from \"./git/kind\";\nimport { kind as lineupKind } from \"./lineup/kind\";\nimport { kind as sequenceKind } from \"./sequence/kind\";\nimport { kind as stateKind } from \"./state/kind\";\nimport { kind as timeKind } from \"./time/kind\";\nimport { kind as treeKind } from \"./tree/kind\";\nimport { kind as tryKind } from \"./try/kind\";\n\n/** 置き場を持つ図の種類の一覧。鍵は置き場の dir の名前 */\nexport const KIND_FOLDERS = {\n \"architecture\": architectureKind,\n \"git\": gitKind,\n \"lineup\": lineupKind,\n \"sequence\": sequenceKind,\n \"state\": stateKind,\n \"time\": timeKind,\n \"tree\": treeKind,\n \"try\": tryKind,\n} as const;\n","/**\n * ブロックを使える図の種類 (#3348)。\n *\n * 図の種類は受け付ける付け方 (`kinds/<種類>/kind.ts` の `accepts`) を持ち、ブロックは付け方を 1 つ名乗る (`blocks/<名前>/block.ts` の `attach`)。\n * ブロックを使える図の種類は、ブロックの付け方を受け付ける図の種類のうち、`only` に合い `except` に無い物で、手で書いた一覧を持たない。\n * 2 つ以上の図の種類で使えるブロックがコアブロック、1 つの図の種類だけで使えるブロックが個別ブロックになる。\n */\nimport { KIND_FOLDERS } from \"../kinds/index\";\nimport type { Kind } from \"../kinds/kind\";\nimport type { DiagramKind } from \"../schema\";\nimport type { Block } from \"./block\";\nimport { BLOCKS } from \"./index\";\n\n/** ブロックの付け方が図の種類に合うか。図の種類が付け方を受け付け、`only` が無いかその図の種類で、`except` にその図の種類が無い */\nexport const fits = (block: Block, kind: Kind): boolean =>\n kind.accepts.includes(block.attach.how) && (block.attach.only === undefined || block.attach.only === kind.name) && !(block.attach.except ?? []).includes(kind.name);\n\n/** 名前 `name` のブロックを使える図の種類。図の種類の置き場の一覧の順で返し、知らない名前は空 */\nexport function blockKinds(name: string): DiagramKind[] {\n const block = (BLOCKS as Readonly<Record<string, Block>>)[name];\n return block === undefined ? [] : Object.values(KIND_FOLDERS as Readonly<Record<string, Kind>>).filter((kind) => fits(block, kind)).map((kind) => kind.name);\n}\n","// packages/dragon/scripts/build-validator.mjs がブロックの形の欠片から書き出した。手で直さない\n\n/** 段の中で起きることの種類ごとの、その形の枝を持つブロックの名前 (#3349)。軽い入口が原本から書いた図が使うブロックを引く時に読む */\nexport const EVENT_OWNERS: Readonly<Record<string, string>> = {\n \"action\": \"act\",\n \"ask\": \"ask\",\n \"branch\": \"branch\",\n \"commit\": \"commit\",\n \"edge\": \"edge\",\n \"item\": \"ask\",\n \"leaf\": \"leaf\",\n \"line\": \"line\",\n \"mark\": \"row\",\n \"node\": \"node\",\n \"now\": \"scale\",\n \"open\": \"seal\",\n \"pick\": \"pick\",\n \"press\": \"press\",\n \"role\": \"role\",\n \"seal\": \"seal\",\n \"span\": \"scale\",\n \"stamp\": \"stamp\",\n \"strip\": \"strip\",\n \"swap\": \"note\",\n};\n","/**\n * 書いた図が使うブロック (#3349)。\n *\n * 軽い入口は、後から読む図の種類の個別ブロックの読み方を、書いた図が使う時だけ読む。読む前に、記法か原本から使うブロックの名前を引くのがこの file。\n * 行が使うブロックは、ブロックの定義 (`block.ts`) の宣言から引く。読む処理 (`parser.ts`) も同じ関数で行が使うブロックを引き、読んでいなければ止めるので、\n * 読む前に引いたブロックと、読む時に要るブロックが食い違わない。\n *\n * 1 つの行が使うブロックは次の 2 つ。\n * - 行の頭の語を持つブロック。ブロックを使える図の種類 (`usable.ts` の `fits`) の図に書いた時だけ数え、ほかの種類の図に書いた行は読み方を読まずに断る\n * - 定義の `lines` が行の形に当たるブロック (時間軸の図の針を進める行、状態遷移図の最初の段より前の線、試す図の `item` と `line` の行)\n *\n * 加えて、図の種類の決まりを持つブロック (定義の `always`) は、行が無くてもその種類の図なら使う。\n * 原本からは、`blocks` の欄の鍵 (ブロックの名前か、定義の `fields`) と、試す図の部品の種類と、段の中で起きることを書き戻すブロック (`eventOwners`) を引く。\n */\nimport { KIND_FOLDERS } from \"../kinds/index\";\nimport type { Kind } from \"../kinds/kind\";\nimport { isBlankOrComment, tokenize } from \"../tokenize\";\nimport type { Block, KindName, LineMatch, LineView } from \"./block\";\nimport { EDGE } from \"./edge/block\";\nimport { EVENT_OWNERS } from \"./event-owners\";\nimport { BLOCKS } from \"./index\";\nimport { fits } from \"./usable\";\n\nconst ALL = BLOCKS as unknown as Readonly<Record<string, Block>>;\nconst KINDS = KIND_FOLDERS as unknown as Readonly<Record<string, Kind>>;\n\n/** 原本の `blocks` の欄の鍵ごとの、その欄を持つブロック。鍵はブロックの名前か、定義の `fields` に書いた名前 */\nconst FIELD_OWNERS: ReadonlyMap<string, Block> = new Map(Object.values(ALL).flatMap((block) => [block.name, ...(block.fields ?? [])].map((key) => [key, block] as const)));\n\n/** 行の頭の語ごとの、その語を持つブロック */\nconst HEAD_OWNERS: ReadonlyMap<string, Block> = new Map(Object.values(ALL).flatMap((block) => (block.words.heads ?? []).map((head) => [head, block] as const)));\n\n/** 行の形。行の頭の語と 2 つ目の語と、線の行なら送る側の名札と、最初の `step` より後の行か */\nexport function lineView(text: string, inSteps: boolean): LineView {\n const edge = EDGE.exec(text);\n const [word = \"\", second] = text.split(/\\s+/u);\n return { word, ...(second !== undefined ? { second } : {}), ...(edge?.[1] !== undefined ? { edgeFrom: edge[1] } : {}), inSteps };\n}\n\n/** 行の形が宣言に当たるか。書いた欄が全て合う時に当たる。行の頭の語の宣言は線の行に当てない (名札が語と同じ綴りの線がある) */\nexport function matches(match: LineMatch, view: LineView): boolean {\n const isEdge = view.edgeFrom !== undefined;\n if (match.heads !== undefined && (isEdge || !match.heads.includes(view.word))) return false;\n if (match.edges !== undefined && (!isEdge || (match.edges === \"before-steps\" && view.inSteps))) return false;\n if (match.from !== undefined && view.edgeFrom !== match.from) return false;\n if (match.exceptFrom !== undefined && view.edgeFrom === match.exceptFrom) return false;\n if (match.second !== undefined && (isEdge || view.second !== match.second)) return false;\n return true;\n}\n\n/** 図の種類 `kind` の図で使えるブロック。ブロックの並び (`rank`) の順で、知らない種類は空 */\nfunction kindBlocks(kind: string): Block[] {\n const found = KINDS[kind];\n return found === undefined ? [] : Object.values(ALL).filter((block) => fits(block, found)).sort((a, b) => a.rank - b.rank);\n}\n\n/** 図の種類 `kind` の図の、形が `view` の行が使うブロックの名前 */\nexport function lineNeeds(view: LineView, kind: KindName): string[] {\n const found = KINDS[kind];\n if (found === undefined) return [];\n const out = new Set<string>();\n const owner = view.edgeFrom === undefined ? HEAD_OWNERS.get(view.word) : undefined;\n if (owner && fits(owner, found)) out.add(owner.name);\n for (const block of kindBlocks(kind)) if (block.lines?.some((match) => matches(match, view))) out.add(block.name);\n return [...out];\n}\n\n/** 図の種類 `kind` の図なら、行が無くても使うブロック (図の種類の決まりを持つ) */\nexport const kindNeeds = (kind: string): string[] => kindBlocks(kind).filter((block) => block.always === true).map((block) => block.name);\n\n/**\n * 図の種類 `kind` の図で、段の中で起きることの種類 `type` を書き戻すブロック。\n * その形の枝を持つブロック (`event-owners.ts`) が使える種類ならそのブロック、ほかに `type` の行を行の形で読むブロック (試す図の `line` は待ち行列のブロック)\n */\nexport function eventOwners(type: string, kind: string): string[] {\n const found = KINDS[kind];\n if (found === undefined) return [];\n const owner = ALL[EVENT_OWNERS[type] ?? \"\"];\n const readers = kindBlocks(kind).filter((block) => block.lines?.some((match) => match.heads?.includes(type)));\n return [...(owner && fits(owner, found) ? [owner.name] : []), ...readers.map((block) => block.name)];\n}\n\n/** 記法の図の種類。最初の空でない行の頭の語 */\nexport const kindOf = (text: string): string => tokenize(text).find((source) => !isBlankOrComment(source))?.text.split(/\\s/u)[0] ?? \"\";\n\n/** 記法から、書いた図が使うブロックの名前。最初の行が図の種類でなければ空 */\nfunction notationNeeds(text: string): string[] {\n const lines = tokenize(text).filter((source) => !isBlankOrComment(source));\n const kind = kindOf(text);\n if (KINDS[kind] === undefined) return [];\n const out = new Set(kindNeeds(kind));\n let inSteps = false;\n for (const source of lines.slice(1)) {\n const view = lineView(source.text, inSteps);\n for (const name of lineNeeds(view, kind as KindName)) out.add(name);\n if (view.edgeFrom === undefined && view.word === \"step\") inSteps = true;\n }\n return [...out];\n}\n\n/** 原本 (版2) の形のうち、使うブロックを引くのに読む欄 */\ninterface SourceShape {\n kind?: unknown;\n blocks?: Record<string, unknown>;\n steps?: { events?: { type?: unknown }[] }[];\n}\n\n/** 原本 (版2) から、書いた図が使うブロックの名前 */\nfunction sourceNeeds(source: SourceShape): string[] {\n const kind = typeof source.kind === \"string\" ? source.kind : \"\";\n const found = KINDS[kind];\n if (found === undefined) return [];\n const out = new Set(kindNeeds(kind));\n const add = (block: Block | undefined): void => {\n if (block) out.add(block.name);\n };\n // `blocks` の欄の鍵はブロックの名前か、定義の `fields` に書いた名前。使えない種類のブロックの欄は数えない (試す図のチップの欄 `item` は列の図のブロックの名前と同じ綴り)\n for (const key of Object.keys(source.blocks ?? {})) {\n const block = FIELD_OWNERS.get(key);\n if (block && fits(block, found)) add(block);\n }\n // 試す図の部品は、部品の種類と同じ名前のブロックが持つ\n const parts = source.blocks?.[\"part\"];\n if (Array.isArray(parts)) for (const part of parts as { type?: unknown }[]) add(typeof part.type === \"string\" ? ALL[part.type] : undefined);\n // 段の中で起きることは、その図の種類で書き戻すブロックが要る\n for (const step of source.steps ?? []) for (const event of step.events ?? []) if (typeof event.type === \"string\") for (const name of eventOwners(event.type, kind)) out.add(name);\n return [...out];\n}\n\n/**\n * 記法か原本 (版2) から、書いた図が使うブロックの名前。ブロックの並び (`rank`) の順で返す。\n * 版1の原本は呼ぶ側が版2へ移してから渡す\n */\nexport function blocksUsedBy(source: string | object): string[] {\n const names = new Set(typeof source === \"string\" ? notationNeeds(source) : sourceNeeds(source));\n return Object.values(ALL)\n .filter((block) => names.has(block.name))\n .sort((a, b) => a.rank - b.rank)\n .map((block) => block.name);\n}\n","/**\n * 図の種類ごとの描く部品の登録簿 (#3248)。\n *\n * 描く所 (`render/draw.ts`) は git、lineup、state、time、tree、try の部品をここから引く。\n * 全部入りの入口は読み込みの時に全ての種類を登録し (`all.ts`)、軽い入口は `loadKind` か `loadFor` が種類を読んだ時に登録する (`light.ts`)。\n * ブロックの読み方は別の登録簿 (`blocks/reading.ts`) が持ち、軽い入口は書いた図が使う個別ブロックの読み方を種類の部品と別に読む (#3349)。\n * 時系列図と構成図は図の種類の置き場 (`kinds/<種類>/`) に並べ方を持ち、登録せずに描く所が置き場の一覧 (`kinds/index.ts`) から引く (#3345)。\n */\nimport { FIGURE_TEXT } from \"../figure-text\";\nimport { DEFAULT_LANG, type NotationLang } from \"../words\";\nimport type * as git from \"./git\";\nimport type * as lineup from \"./lineup\";\nimport type * as state from \"./state\";\nimport type * as time from \"./time\";\nimport type * as tree from \"./tree\";\nimport type * as tryKind from \"./try\";\n\n/** 後から読む種類の名前。部品の型から導くと、部品の型が軽い入口の型の file へ漏れるので字で書く */\nexport type LaterKind = \"git\" | \"lineup\" | \"state\" | \"time\" | \"tree\" | \"try\";\n\nexport interface LaterKinds {\n git: typeof git;\n lineup: typeof lineup;\n state: typeof state;\n time: typeof time;\n tree: typeof tree;\n try: typeof tryKind;\n}\n\n/** 後から読む種類 */\nexport const LATER_KINDS: readonly LaterKind[] = [\"git\", \"lineup\", \"state\", \"time\", \"tree\", \"try\"];\n\nconst registered: Partial<LaterKinds> = {};\n\nexport function registerKind<K extends LaterKind>(kind: K, parts: LaterKinds[K]): void {\n registered[kind] = parts;\n}\n\n/** 種類の部品を今すぐ描ける形で持っているか。時系列図と構成図は常に持つ */\nexport function kindLoaded(kind: string | undefined): boolean {\n return !(LATER_KINDS as readonly (string | undefined)[]).includes(kind) || registered[kind as LaterKind] !== undefined;\n}\n\n/** 種類の部品。読んでいない時は、種類の名前を含む誤りで止まる */\nexport function kindParts<K extends LaterKind>(kind: K, lang: NotationLang = DEFAULT_LANG): LaterKinds[K] {\n const parts = registered[kind];\n if (parts === undefined) throw new Error(FIGURE_TEXT[lang].kindNotLoaded(kind));\n return parts;\n}\n","/**\n * 原本 (版2) と、描く処理が読む図の形 (版1と同じ欄と並び) の組み直し (#3346)。\n *\n * 版2の原本は図の宣言を `blocks` のブロックの名前ごとの欄に持ち、版1の原本は同じ宣言を根の欄と図の種類の欄に持つ。\n * 2 つの形の欄の対応は `HOMES` の 1 つの表が持ち、組み直し (`toModel`、`fromModel`)、版1の原本の移し (`upgrade`)、\n * 版1の誤りの場所の戻し (`toVersion1Pointer`) が同じ表を読む。\n *\n * 描く処理の形は版1と同じ欄と同じ並びで組み、版の欄も `1` を持つ。図の id はこの形の字から作るので、\n * 版2の原本を足す前と同じ図からは同じ id の SVG を描く。\n */\nimport { lifelinesOf } from \"./blocks/lifeline/read\";\nimport type { Diagram, DiagramBlocks, DiagramModel, TryItem } from \"./schema\";\n\n/** この道具が読める原本の版。版1の原本は読む時にこの版へ移す (#3346) */\nexport const FORMAT_VERSION = 2;\n\n/** 描く処理の形の版の欄。版1の原本と同じ形なので、版1の `1` を持つ */\nexport const MODEL_VERSION = 1;\n\n/** 版2の原本の欄と、版1の原本での置き場。版1の置き場は根の欄か、図の種類の欄 (`<種類の欄>.<欄>`) */\nexport const HOMES = [\n [\"group\", \"regions\"],\n [\"box\", \"boxes\"],\n [\"strip\", \"strip\"],\n [\"path\", \"state.paths\"],\n [\"branch\", \"git.branches\"],\n [\"scale\", \"time.scale\"],\n [\"period\", \"time.period\"],\n [\"row\", \"time.rows\"],\n [\"point\", \"time.points\"],\n [\"zoom\", \"time.zoom\"],\n [\"item\", \"lineup.items\"],\n [\"role\", \"lineup.roles\"],\n] as const satisfies readonly (readonly [keyof DiagramBlocks, string])[];\n\ntype Obj = Record<string, unknown>;\n\nconst isObject = (value: unknown): value is Obj => typeof value === \"object\" && value !== null && !Array.isArray(value);\n/** 書かない値。無いか、空の並び */\nconst blank = (value: unknown): boolean => value === undefined || (Array.isArray(value) && value.length === 0);\n\n/**\n * 描く処理の形を版2の原本にする。空の並びは書かず、`blocks` の欄は `HOMES` の順に並べる。\n * 試す図 (#3337) は版1に無かった種類なので `HOMES` を通さず、部品 (`part`) とチップ (`item`) をこの順に置く\n */\nexport function fromModel(model: DiagramModel, version: number): Diagram {\n const source = model as unknown as Obj;\n const blocks: Obj = {};\n if (model.kind === \"try\") {\n blocks.part = model.try?.parts ?? [];\n if (!blank(model.try?.items)) blocks.item = model.try?.items;\n } else {\n for (const [field, home] of HOMES) {\n const [section, inner] = home.split(\".\");\n const value = inner === undefined ? source[section ?? \"\"] : (source[section ?? \"\"] as Obj | undefined)?.[inner];\n if (!blank(value)) blocks[field] = value;\n }\n }\n return {\n version,\n kind: model.kind,\n title: model.title,\n ...(model.view !== undefined ? { view: model.view } : {}),\n blocks,\n steps: model.steps,\n };\n}\n\n/** 版1の原本か。版1は検査の前に版2の形へ移す */\nexport const isVersion1 = (input: unknown): input is Obj =>\n typeof input === \"object\" && input !== null && !Array.isArray(input) && (input as { version?: unknown }).version === 1;\n\n/**\n * 版2の原本を描く処理の形にする。欄と並びは版1の原本を読んでいた時と同じにする\n * (版、種類、題、見せ方、区画、箱、帯、段、生存線、移れる道、枝、チップ、時間軸の図の欄)。\n * 時系列図の生存線は、箱の並びのまま左から組む。試す図 (#3337) は部品とチップを試す図の欄 (`try`) に持つ\n */\nexport function toModel(diagram: Diagram): DiagramModel {\n const b = diagram.blocks;\n const boxes = b.box ?? [];\n if (diagram.kind === \"try\")\n return {\n version: MODEL_VERSION,\n kind: diagram.kind,\n title: diagram.title,\n ...(diagram.view !== undefined ? { view: diagram.view } : {}),\n boxes,\n steps: diagram.steps,\n try: { parts: b.part ?? [], items: (b.item ?? []) as TryItem[] },\n };\n return {\n version: MODEL_VERSION,\n kind: diagram.kind,\n title: diagram.title,\n ...(diagram.view !== undefined ? { view: diagram.view } : {}),\n ...(b.group !== undefined ? { regions: b.group } : {}),\n boxes,\n ...(b.strip !== undefined ? { strip: b.strip } : {}),\n steps: diagram.steps,\n ...(diagram.kind === \"sequence\" ? { sequence: lifelinesOf(boxes) } : {}),\n ...(b.path !== undefined ? { state: { paths: b.path } } : {}),\n ...(b.branch !== undefined ? { git: { branches: b.branch } } : {}),\n ...(b.item !== undefined ? { lineup: { items: b.item, ...(b.role !== undefined ? { roles: b.role } : {}) } } : {}),\n ...(b.scale !== undefined || b.row !== undefined\n ? {\n time: {\n ...(b.scale !== undefined ? { scale: b.scale } : {}),\n ...(b.period !== undefined ? { period: b.period } : {}),\n ...(b.row !== undefined ? { rows: b.row } : {}),\n ...(b.point !== undefined ? { points: b.point } : {}),\n ...(b.zoom !== undefined ? { zoom: b.zoom } : {}),\n } as DiagramModel[\"time\"],\n }\n : {}),\n };\n}\n\n/**\n * 版1の原本を、検査の前に版2の形へ移す。形を確かめる前に呼ぶので、知らない欄と形の違う値と空の並びはそのまま移し、検査に任せる\n * (版1で誤りだった原本は、版2でも同じ値の誤りになる)。空の並びを外して欄を整えるのは、検査を通った後の `fromModel` が行う。\n * 図の種類の欄 (`state`、`git`、`time`、`lineup`) は、中の欄を全て移せた時だけ消す。時系列図の生存線の欄 (`sequence`) は、箱の並びから組み直せるので書かない。\n * 時系列図でない図の生存線の欄は版1でも書けなかったので、根に残して検査に断らせる\n */\nexport function upgrade(input: Obj, version: number): Obj {\n const rest: Obj = { ...input };\n delete rest.version;\n if (rest.kind === \"sequence\") delete rest.sequence;\n const out: Obj = {};\n const blocks: Obj = {};\n const moved = new Set<string>();\n for (const [field, home] of HOMES) {\n const [section = \"\", inner] = home.split(\".\");\n if (inner === undefined) {\n if (!(section in rest)) continue;\n blocks[field] = rest[section];\n moved.add(section);\n continue;\n }\n const container = rest[section];\n if (isObject(container) && inner in container) blocks[field] = container[inner];\n }\n for (const section of [\"state\", \"git\", \"time\", \"lineup\"]) {\n const container = rest[section];\n const inners: string[] = HOMES.filter(([, home]) => home.startsWith(`${section}.`)).map(([, home]) => home.slice(section.length + 1));\n if (isObject(container) && Object.keys(container).every((key) => inners.includes(key))) moved.add(section);\n }\n out.version = version;\n for (const [key, value] of Object.entries(rest)) {\n if (key === \"steps\") out.blocks = blocks;\n if (!moved.has(key)) out[key] = value;\n }\n if (!(\"blocks\" in out)) out.blocks = blocks;\n return out;\n}\n\n/** 版2の `blocks` の欄の場所から、版1の原本の同じ値の場所 */\nconst VERSION_1_HOMES: ReadonlyMap<string, string> = new Map(HOMES.map(([field, home]) => [`/blocks/${field}`, `/${home.replace(\".\", \"/\")}`]));\n\n/**\n * 版2の `blocks` の欄の場所から、その欄を持っていた版1の図の種類の欄の場所 (`/blocks/branch` なら `/git`)。\n * 図の種類が書けない欄は、版1では図の種類の欄ごと断っていたので、その場所で返す。根の欄から移した欄は `undefined`\n */\nexport function version1SectionOf(pointer: string): string | undefined {\n const home = HOMES.find(([field]) => `/blocks/${field}` === pointer)?.[1];\n return home?.includes(\".\") ? `/${home.slice(0, home.indexOf(\".\"))}` : undefined;\n}\n\n/**\n * 版2の場所 (JSON Pointer) を、版1の原本の場所へ戻す。`blocks` の欄の場所だけを戻し、ほかの場所 (段の中など) は同じ。\n * `blocks` そのものの場所は、版1の根の場所にする\n */\nexport function toVersion1Pointer(pointer: string): string {\n if (pointer === \"/blocks\") return \"\";\n const match = /^\\/blocks\\/[^/]+/u.exec(pointer);\n const home = match ? VERSION_1_HOMES.get(match[0]) : undefined;\n return match && home !== undefined ? `${home}${pointer.slice(match[0].length)}` : pointer;\n}\n","/**\n * dragon記法の誤りの文 (#2997、#3137)。\n *\n * 記法の語は英語だけで file から言葉が決まらないため、誤りの文は呼ぶ側が渡した言葉\n * (渡さなければ英語) で出す。文の中の記法の語は語の表から引き、表と文で語が食い違わないようにする。\n * ブロックの置き場へ移した行の誤りの文はブロックが日英で持ち (`blocks/<名前>/read.ts` の `messages`)、ここで 1 つの表に束ねる (#3345)。\n * 軽い入口は個別ブロックの読み方を後から読むので、表は登録簿 (`blocks/reading.ts`) が持つ読み方から引く時に束ね、登録が変わった時に束ね直す (#3349)。\n * 読んでいないブロックの誤りの文は表に無いが、読む処理はそのブロックの行を読む前に、読んでいないブロックを名指す誤りで止める (`notLoaded`)。\n */\nimport { cachedByReadings, loadedReadings } from \"./blocks/reading\";\nimport type { READINGS } from \"./blocks/readings\";\nimport { list } from \"./read-kit\";\nimport { HEADS, KINDS, type NotationLang } from \"./words\";\n\n/** 新しい形のどの行の書き方を示すか。前の形の行に当たった時に、誤りの文が書き方を示す */\nexport type Shape = \"sequence\" | \"architecture\" | \"group\" | \"box\" | \"strip\" | \"view\" | \"step\" | \"say\" | \"code\" | \"act\" | \"note\" | \"set\";\n\ntype Readings = typeof READINGS;\n/** 日英の誤りの文の、日本語の表の型。持たない (`none`) ブロックは何も足さない */\ntype JaOf<X> = X extends { ja: infer M } ? M : never;\ntype Intersect<U> = (U extends unknown ? (u: U) => void : never) extends (i: infer I) => void ? I : never;\n/** ブロックが持つ誤りの文の表。鍵はブロックの間で重ならない (`blocks.test.ts` の `block-message-keys-unique` が見る) */\nexport type BlockMessages = Intersect<JaOf<Readings[keyof Readings][\"messages\"]>>;\n\n/** 誤りの文の表。どのブロックにも属さない行の文と、ブロックが持つ文 */\nexport type Messages = CoreMessages & BlockMessages;\n\n/** どのブロックにも属さない行 (図の種類と題の行、名札、属性の書き方) の誤りの文 */\nexport interface CoreMessages {\n noHead: string;\n badHead: string;\n /** 前の形の `word` を書いた行。`shape` の行の書き方を示す */\n oldForm: (word: string, shape: Shape) => string;\n unknownHead: (word: string) => string;\n duplicate: (id: string) => string;\n needsId: (word: string) => string;\n badId: (id: string) => string;\n afterId: string;\n declarationInStep: string;\n stepLineBeforeStep: string;\n emptyName: (id: string) => string;\n quoteUnclosed: string;\n afterQuote: string;\n attrUnclosed: string;\n attrNoColon: (raw: string) => string;\n attrNoValue: (key: string) => string;\n attrTwice: (key: string) => string;\n badAttr: (key: string, allowed: readonly string[]) => string;\n badHash: string;\n /** 時間軸の図だけの行か属性 (`word`) を、別の種類の図に書いた (#3165) */\n timeOnly: (word: string) => string;\n /** 枝分かれの図だけの行 (`word`) を、別の種類の図に書いた。後から読む個別ブロックの読み方を読まずに断るので、ここに持つ (#3349) */\n gitOnly: (word: string) => string;\n /** 木の図だけの行を、別の種類の図に書いた (#3349) */\n treeOnly: (word: string) => string;\n /** 列の図だけの行を、別の種類の図に書いた (#3349) */\n lineupOnly: (word: string) => string;\n /** 列の図と試す図だけの行 (`item` と `line`) を、別の種類の図に書いた (#3349) */\n lineupOrTryOnly: (word: string) => string;\n /** 試す図だけの行を、別の種類の図に書いた (#3349) */\n tryOnly: (word: string) => string;\n /** 軽い入口で、まだ読んでいないブロック `block` の行か原本を読んだ。`loadFor` を待てば読める (#3349) */\n blockNotLoaded: (block: string) => string;\n}\n\n/** 持っている読み方が持つ `lang` の誤りの文を 1 つの表に束ねる */\nconst fromBlocks = (lang: NotationLang): BlockMessages =>\n Object.assign({}, ...loadedReadings().map(({ reading }) => (\"none\" in reading.messages ? {} : reading.messages[lang]))) as BlockMessages;\n\nconst ja = (): Messages => {\n const shapes: Record<Shape, string> = {\n sequence: \"sequence <題>\",\n architecture: \"architecture <題>\",\n group: \"group <名札> as <名前> [note: <添え書き>] から end まで\",\n box: \"box <名札> as <名前> [note: <下の小さな字>]\",\n strip: \"strip <題>: <欄>, <欄>\",\n view: \"sequence <題> [view: follow]\",\n step: \"step <段の題>\",\n say: \"say <段の本文>\",\n code: \"code <命令>\",\n act: \"act <名札>: <処理の名前>\",\n note: \"note <名札>: <下の小さな字>\",\n set: \"set <欄>: <値> [tag: <札>]\",\n };\n return {\n ...fromBlocks(\"ja\"),\n noHead: `最初の行に図の種類 (${list(KINDS)}) と題を書く`,\n badHead: `最初の行は ${KINDS.join(\" か \")} で始め、続けて題を書く`,\n oldForm: (word, shape) => `${word} は前の形の書き方。新しい形では ${shapes[shape]} と書く`,\n unknownHead: (word) => `${word} は行の頭に書けない。行は ${list(HEADS)} か、<名札> -> <名札> で始める`,\n duplicate: (id) => `${id} は既に宣言した名札`,\n needsId: (word) => `${word} の後ろに名札を書く`,\n badId: (id) => `${id} は名札に使えない。名札には空白と [ ] 「 」 = : を含めない`,\n afterId: \"名札の後ろには as <名前> か属性を書く\",\n declarationInStep: \"group と box と strip と branch と、scale と period と row と point と zoom は最初の step より前に書く\",\n stepLineBeforeStep: \"線と say と code と source と act と note と set と commit と枝を切る行と、now と mark と span と、leaf と node の行は step の下に書く\",\n emptyName: (id) => `${id} の名前が空`,\n quoteUnclosed: '\" で始めた字を \" で閉じていない',\n afterQuote: '\" で閉じた字の後ろには、属性か次の , だけを書く',\n attrUnclosed: \"属性は [ で始めて ] で閉じ、行の終わりに置く\",\n attrNoColon: (raw) => `[${raw}] は書けない。属性は [<鍵>: <値>] の形で書く`,\n attrNoValue: (key) => `${key}: の後ろに値を書く`,\n attrTwice: (key) => `${key} は 1 つの行に 1 つまで`,\n badAttr: (key, allowed) => `${key} はこの行に書けない属性。書けるのは ${list(allowed)}`,\n badHash: \"hash は 0 から 9 と a から f の字で 4 から 40 字にする\",\n timeOnly: (word) => `${word} は time (時間軸の図) でだけ書ける`,\n gitOnly: (word) => `${word} の行は git (枝分かれの図) でだけ書ける`,\n treeOnly: (word) => `${word} の行は tree (木の図) でだけ書ける`,\n lineupOnly: (word) => `${word} の行は lineup (列の図) でだけ書ける`,\n lineupOrTryOnly: (word) => `${word} の行は lineup (列の図) と try (試す図) でだけ書ける`,\n tryOnly: (word) => `${word} の行は try (試す図) でだけ書ける`,\n blockNotLoaded: (block) => `${block} のブロックの読み方を読んでいない。読む前に loadFor を待つ`,\n };\n};\n\nconst en = (): Messages => {\n const shapes: Record<Shape, string> = {\n sequence: \"sequence <title>\",\n architecture: \"architecture <title>\",\n group: \"group <id> as <name> [note: <note>] through end\",\n box: \"box <id> as <name> [note: <caption>]\",\n strip: \"strip <title>: <field>, <field>\",\n view: \"sequence <title> [view: follow]\",\n step: \"step <step title>\",\n say: \"say <step body>\",\n code: \"code <command>\",\n act: \"act <id>: <action>\",\n note: \"note <id>: <caption>\",\n set: \"set <field>: <value> [tag: <tag>]\",\n };\n return {\n ...fromBlocks(\"en\"),\n noHead: `Write the diagram kind (${list(KINDS)}) and a title on the first line`,\n badHead: `Start the first line with ${KINDS.join(\" or \")}, followed by the title`,\n oldForm: (word, shape) => `${word} is the old notation. Write ${shapes[shape]} instead`,\n unknownHead: (word) => `A line cannot start with ${word}. Start a line with ${list(HEADS)}, or <id> -> <id>`,\n duplicate: (id) => `${id} is already declared`,\n needsId: (word) => `Write an id after ${word}`,\n badId: (id) => `${id} cannot be an id. An id has no spaces and none of [ ] 「 」 = :`,\n afterId: \"Write as <name> or attributes after the id\",\n declarationInStep: \"Write group, box, strip, branch, scale, period, row, point and zoom before the first step\",\n stepLineBeforeStep: \"Write lines, say, code, source, act, note, set, commit, branch cuts, now, mark, span, leaf and node under a step\",\n emptyName: (id) => `${id} has an empty name`,\n quoteUnclosed: 'A value that starts with \" is not closed with \"',\n afterQuote: 'After a value closed with \", write only attributes or the next ,',\n attrUnclosed: \"Start attributes with [, close them with ], and put them at the end of the line\",\n attrNoColon: (raw) => `[${raw}] cannot be read. Write an attribute as [<key>: <value>]`,\n attrNoValue: (key) => `Write a value after ${key}:`,\n attrTwice: (key) => `Write ${key} only once on a line`,\n badAttr: (key, allowed) => `${key} cannot be written on this line. Write ${list(allowed)}`,\n badHash: \"Write a hash as 4 to 40 characters of 0-9 and a-f\",\n timeOnly: (word) => `${word} can be written only in time diagrams`,\n gitOnly: (word) => `${word} lines can be written only in git diagrams`,\n treeOnly: (word) => `${word} lines can be written only in tree diagrams`,\n lineupOnly: (word) => `${word} lines can be written only in lineup diagrams`,\n lineupOrTryOnly: (word) => `${word} lines can be written only in lineup and try diagrams`,\n tryOnly: (word) => `${word} lines can be written only in try diagrams`,\n blockNotLoaded: (block) => `The ${block} block is not loaded. Await loadFor before reading`,\n };\n};\n\n/** 誤りの文の表。読み方の登録が変わった時に束ね直す */\nconst MESSAGES = cachedByReadings((): Record<NotationLang, Messages> => ({ ja: ja(), en: en() }));\n\nexport const messagesFor = (lang: NotationLang): Messages => MESSAGES()[lang];\n","/**\n * 図の原本の JSON を、人が書く dragon記法へ書き戻す (#3137)。\n *\n * 並べ方は決まった形に整える。JSON の欄の並び順は見ず、欄の名前で読むので、\n * 同じ内容の JSON からは毎回同じ文字列になる。書き手の行の並べ方とコメントは保たない。\n * 段の中で起きることは JSON の並び順 (起きる順) のまま書く。\n * 状態遷移図の移れる道 (`state.paths`) は、帯の宣言の後、最初の `step` より前に JSON の並びのまま、脇道のブロックの書き戻す処理 (`print.figure`) が書く (#3163、#3347)。\n *\n * `\"` で囲むのは要る時だけにする。`[` を含む名前と、`,` か `]` を含む属性の値と、`\"` で始まる字を囲む。\n * 区画と箱の宣言の塊は箱のブロックの書き戻す処理 (`print.declare`) が書く (#3345)。\n * 枝分かれの図 (#3164) は、枝の `branch` の行を箱より前に枝のブロックの書き戻す処理 (`print.declare`) が書き、札を動かす線の運ぶ物が送る側の名前の札なら書かない。\n * commit の行と枝を切る行は、commit と枝のブロックの書き戻す処理 (`print.events`) が書く (#3347)。\n * 時間軸の図 (#3165) は、目盛りと区切りと印の列と節目と拡大の範囲の行を、各ブロックの書き戻す処理 (`print.lead`) が箱より前に書く (#3348)。\n * 中身の帯の物差しの欄の後ろには `[meter: <割合>]` を書く。\n * 時間軸の図の `note` は属性を持てるので、`[` を含む字を `\"` で囲む。\n * 木の図 (#3233) の葉と親は、段の中に `leaf` と `node … of …` の行で、葉と組んだ親のブロックが書く (#3348)。\n * 列の図 (#3239) のチップは箱の後ろに `item` の行でチップのブロックが書き、色が同じで字を持たないチップが続く所は 1 行に並べる。\n * 列の図の役は、図の種類の行の直ぐ後ろに役のブロックが書く (#3348)。\n * 試す図 (#3337) の部品の行は、部品の種類と同じ名前のブロックの書き戻す処理 (`print.part`) が書き、原本の並びのまま 1 つの塊にする (#3348)。\n * その後ろのチップの `item` の行は入力の帯のブロックが書き、欄の値と段の中の書き換えの鍵を入力の帯の欄の順に書く。\n * 段の中でブロックが受け持つ行は、段の区切りの `step` の行の後ろ、段の中で起きることより前に、ブロックの並び (`rank`) の順に書く (#3345)。\n * 段の本文の `say` と命令の `code` の行は段のブロックが、段の出典 (#3199) は出典のブロックが書く。\n * 段の中で起きることのうちブロックが持つ種類は、そのブロックの書き戻す処理 (`print.events`) が起きた順に 1 行ずつ書く (#3345)。\n * ブロックが持つ宣言の塊 (中身の帯の `strip` の行) は、区画と箱とチップの宣言の後ろに、ブロックの書き戻す処理 (`print.figure`) が書く。\n * 書き戻す処理はブロックの読み方 (`blocks/<名前>/read.ts`) が持ち、登録簿 (`blocks/reading.ts`) が持つ読み方から引く (#3349)。\n */\nimport type { Block, BlockPrint, EventPrinter } from \"./blocks/block\";\nimport { cachedByReadings, loadedReadings, readingLoaded } from \"./blocks/reading\";\nimport { fits } from \"./blocks/usable\";\nimport { blocksUsedBy, eventOwners } from \"./blocks/used\";\nimport { KIND_FOLDERS } from \"./kinds/index\";\nimport type { Kind } from \"./kinds/kind\";\nimport { messagesFor } from \"./messages\";\nimport { attrs, name } from \"./print-kit\";\nimport { FORMAT_VERSION, isVersion1, toModel, upgrade } from \"./model\";\nimport type { Diagram, DiagramEvent, DiagramModel, Step, TryPart } from \"./schema\";\nimport { DEFAULT_LANG } from \"./words\";\n\n/** 持っている読み方の書き戻す処理を、ブロックの並び (`rank`) の順に引く (#3349) */\nconst printsOf = <K extends keyof BlockPrint>(key: K): NonNullable<BlockPrint[K]>[] =>\n loadedReadings().flatMap(({ reading }) => (\"none\" in reading.print || reading.print[key] === undefined ? [] : [reading.print[key] as NonNullable<BlockPrint[K]>]));\n\n/** 段の中でブロックが受け持つ行を書き戻す処理。ブロックの並び (`rank`) の順 (#3345) */\nconst stepPrinters = cachedByReadings((): readonly ((step: Step) => string[])[] => printsOf(\"step\"));\n\n/**\n * 段の中で起きることの種類ごとの、ブロックが持つ書き戻す処理と、そのブロック (#3345、#3349)。\n * ブロックは自分の出来事の種類の処理だけを持つので、種類で引いた処理には同じ種類の出来事だけを渡す。\n * 同じ種類の出来事を 2 つのブロックが書き戻す時 (列の図と試す図の `line`) は、書き戻す図の種類で使えるブロックの処理を使う\n */\nconst eventPrinters = cachedByReadings(\n (): ReadonlyMap<string, { block: Block; print: EventPrinter }[]> => {\n const out = new Map<string, { block: Block; print: EventPrinter }[]>();\n for (const { block, reading } of loadedReadings()) {\n if (\"none\" in reading.print) continue;\n for (const [type, print] of Object.entries(reading.print.events ?? {}) as [string, EventPrinter][]) out.set(type, [...(out.get(type) ?? []), { block, print }]);\n }\n return out;\n },\n);\n\n/** 図の種類 `kind` の図の、種類 `type` の出来事を書き戻す処理。使える種類のブロックの処理を先に引く */\nfunction eventPrinter(type: string, kind: string): EventPrinter | undefined {\n const found = eventPrinters().get(type) ?? [];\n const folder = (KIND_FOLDERS as unknown as Readonly<Record<string, Kind>>)[kind];\n return (found.find(({ block }) => folder !== undefined && fits(block, folder)) ?? found[0])?.print;\n}\n\n/**\n * 図の種類の行の直ぐ後ろに書く、ブロックが持つ図の種類の宣言の塊 (時間軸の図の目盛りなど、列の図の役) を書き戻す処理。\n * ブロックの並び (`rank`) の順 (#3348)\n */\nconst leadPrinters = cachedByReadings((): readonly ((diagram: DiagramModel) => string[])[] => printsOf(\"lead\"));\n\n/** 図の種類の宣言の直ぐ後ろに書く、ブロックが持つ宣言の塊 (枝分かれの図の枝と、区画と箱) を書き戻す処理。ブロックの並び (`rank`) の順 (#3345、#3347) */\nconst declarePrinters = cachedByReadings((): readonly ((diagram: DiagramModel) => string[])[] => printsOf(\"declare\"));\n\n/** 最初の `step` より前に書く、ブロックが持つ宣言の塊を書き戻す処理。ブロックの並び (`rank`) の順 (#3345) */\nconst figurePrinters = cachedByReadings((): readonly ((diagram: DiagramModel) => string[])[] => printsOf(\"figure\"));\n\n/** 試す図の部品の種類ごとの、部品の種類と同じ名前のブロックが持つ書き戻す処理 (#3337、#3348) */\nconst partPrinters = cachedByReadings(\n (): ReadonlyMap<string, (part: TryPart) => string> =>\n new Map(loadedReadings().flatMap(({ block, reading }) => (\"none\" in reading.print || reading.print.part === undefined ? [] : [[block.name, reading.print.part] as const]))),\n);\n\n/** 書き戻す処理を持つはずのブロック `owner` の読み方を読んでいない時の誤り。読んでいれば、書き戻す処理が無いことを示す */\nfunction missingPrinter(what: string, owner: string | undefined): Error {\n if (owner !== undefined && !readingLoaded(owner)) return new Error(messagesFor(DEFAULT_LANG).blockNotLoaded(owner));\n return new Error(`${what} を書き戻す処理が無い`);\n}\n\n/** 試す図の部品の塊。部品の行を原本の並びのまま 1 つの塊に書く */\nfunction tryParts(parts: readonly TryPart[]): string {\n return parts\n .map((part) => {\n const print = partPrinters().get(part.type);\n if (!print) throw missingPrinter(`${part.type} の部品`, part.type);\n return print(part);\n })\n .join(\"\\n\");\n}\n\n/** 段の中の 1 行。出来事の種類を持つブロックの書き戻す処理が書く。`kind` は図の種類、`diagram` は書き戻す図 */\nfunction event(e: DiagramEvent, kind: DiagramModel[\"kind\"], diagram: DiagramModel): string {\n const print = eventPrinter(e.type, kind);\n if (!print) throw missingPrinter(e.type, eventOwners(e.type, kind).find((name) => !readingLoaded(name)));\n return print(e, kind, diagram);\n}\n\n/**\n * 原本を記法に書き戻す。描く処理の形 (版1と同じ欄) に組み直して書く (#3346)。\n * 版1の原本も、読む時と同じく版2の形へ移してから書く。\n * 軽い入口では、書き戻す図が使うブロックの読み方を `loadFor` で読んでから呼ぶ。読んでいない時は、ブロックの名前を名指す誤りで止める (#3349)\n */\nexport function printNotation(source: Diagram): string {\n const current = isVersion1(source) ? (upgrade(source, FORMAT_VERSION) as unknown as Diagram) : source;\n // 書き戻す処理は読んだブロックの物だけを回すので、読んでいないブロックの欄は黙って落ちる。書く前に、原本が使う全てのブロックを読んだかを見る\n const missing = blocksUsedBy(current).find((name) => !readingLoaded(name));\n if (missing !== undefined) throw new Error(messagesFor(DEFAULT_LANG).blockNotLoaded(missing));\n const diagram = toModel(current);\n const blocks = [\n `${diagram.kind} ${name(diagram.title)}${attrs([[\"view\", diagram.view]])}`,\n ...(diagram.try ? [tryParts(diagram.try.parts)] : []),\n ...leadPrinters().flatMap((print) => print(diagram)),\n ...declarePrinters().flatMap((print) => print(diagram)),\n ...figurePrinters().flatMap((print) => print(diagram)),\n ];\n // 段の区切りの `step` の行の下に、段の中でブロックが受け持つ行を字下げして書く。空の行 (本文の空の行) は字下げしない\n for (const step of diagram.steps) {\n blocks.push(\n [\n `step ${step.title}`,\n ...stepPrinters()\n .flatMap((print) => print(step))\n .map((line) => (line === \"\" ? \"\" : ` ${line}`)),\n ...step.events.map((e) => ` ${event(e, diagram.kind, diagram)}`),\n ].join(\"\\n\"),\n );\n }\n return `${blocks.join(\"\\n\\n\")}\\n`;\n}\n","/**\n * Markdown の中の dragon の囲み (```dragon) を、囲みごとに取り出す。\n *\n * 囲みの開き方と閉じ方は CommonMark に従う。` か ~ を 3 つ以上並べて開き、同じ字を開いた数以上\n * 並べて閉じる。閉じていない囲みは文書の終わりまでを中身にする。dragon 以外の言語の囲みの中は読まない。\n */\nexport interface Fence {\n /** 囲みの中身 (記法) */\n source: string;\n /** 中身の 1 行目が文書の何行目か。記法の誤りの行を文書の行に直す時に足す */\n line: number;\n}\n\nexport function extractDiagrams(markdown: string): Fence[] {\n const lines = markdown.split(/\\r?\\n/);\n if (lines[lines.length - 1] === \"\") lines.pop();\n const fences: Fence[] = [];\n let open: { mark: string; dragon: boolean; start: number; body: string[] } | undefined;\n lines.forEach((text, index) => {\n if (!open) {\n const found = /^ {0,3}(`{3,}|~{3,})\\s*([^\\s`]*)/.exec(text);\n if (found) open = { mark: found[1] ?? \"\", dragon: found[2] === \"dragon\", start: index + 2, body: [] };\n return;\n }\n const close = /^ {0,3}(`{3,}|~{3,})\\s*$/.exec(text)?.[1];\n if (close !== undefined && close[0] === open.mark[0] && close.length >= open.mark.length) {\n if (open.dragon) fences.push({ source: open.body.join(\"\\n\"), line: open.start });\n open = undefined;\n return;\n }\n open.body.push(text);\n });\n if (open?.dragon) fences.push({ source: open.body.join(\"\\n\"), line: open.start });\n return fences;\n}\n","/**\n * 人が書く dragon記法を、図の原本の JSON へ変える (#3137)。\n *\n * 行の種類は行の頭の英語の語で決まり、線の行だけは箱の名札から始まる。最初の `step` より前に\n * 図の種類と題と区画と箱と帯を宣言し、`step` ごとに、その段で起きることを起きる順に並べる。\n *\n * sequence <題> [view: fixed か follow] 書かなければ字の大きさで選ぶ。図の種類は sequence と architecture と state\n * group <名札> as <名前> [note: <添え書き>, color: <色>, icon: <印>]\n * box <名札> as <名前> [note: <下の小さな字>, color: <色>, icon: <印>, link: <飛び先>]\n * end 同じ名札の group はもう一度開ける\n * box <名札> as <名前> [...] as が無ければ名札を名前にする\n * strip <題>: <欄>, <欄>\n * step <段の題>\n * say <段の本文> say の下に字下げした行は本文の続き\n * code <段で打つ命令>\n * source <出典の名前> [url: <URL>] 1 つの段に何行でも書ける\n * <名札> -> <名札>: <線の名前> [carry: <運ぶ物>, tag: <値>, side: <側>]\n * act <名札>: <処理の名前> 箱の中の処理\n * note <名札>: <字> 箱の下の小さな字の書き換え\n * set <欄>: <値> [tag: <札>] 中身の帯の値\n *\n * 鍵と値はコロンで区切り、属性は `[ ]` の中に `,` で並べて行の終わりに置く。\n * 空白を含む名前と文は行の終わりか `[` の前に置き、`[` を含む名前と `,` か `]` を含む属性の値だけを\n * `\"` で囲む。囲みの中では `\\\"` が `\"`、`\\\\` が `\\` になる。字下げは `say` の続きの行を見分ける時だけ意味を持つ。\n *\n * 箱の飛び先 (`link`) と段の出典の `url` は描いた図と段の一覧の link にそのまま入るため、頁を移る形\n * (`/` で始まる path か、`http://` か `https://` で始まる URL) だけを受ける (#3199)。\n *\n * 状態遷移図 (`state`) では、線の送る側に始まりの印 `start`、受ける側に終わりの印 `finish` を書ける。\n * 最初の `step` より前に書いた線は、移れるが段で通るとは限らない道 (`state.paths`) になり、属性を持たない (#3163)。\n * 状態遷移図の `start` と `finish` は箱の名札に使えない。時系列図と構成図では宣言して使う普通の名札のまま。\n *\n * 枝分かれの図 (`git`、#3164) は、最初の `step` より前に `branch <名札> [note: <添え書き>]` で枝を上から順に宣言し、\n * 段の中に `commit <名札> on <枝> [hash: <hash>, note: <一言>]` で commit を積み、`<枝> from <commit>` で枝を切る。\n * 当て直しは `on <枝>` の後ろに `copy <commit>` を、merge commit は `merge <枝>` を続ける。\n * 線の行は札を動かす行になり、送る側に枝の名札か `HEAD`、受ける側に積んだ commit を書く。運ぶ物は書かなければ送る側の名前の札。\n * 枝分かれの図では `HEAD` を名札に使えず、区画 (`group`) は書けない。`branch` と `commit` の行は枝分かれの図でだけ書ける。\n * 状態遷移図の道と、枝分かれの図の枝と commit と枝を切る行は、脇道と枝と commit のブロックが読む (#3347)。\n * 道の行と枝を切る行は行の頭の語を持たないので、ここで見分けてブロックの読む処理を呼ぶ。\n *\n * 時間軸の図 (`time`、#3165) は、最初の `step` より前に目盛りと区切りと印の列と節目と拡大の範囲を宣言する。\n *\n * scale <単位> <長さ> <数> [from: <最初の番号>] 長さは数と単位 (ms、s、min、h、d) の組 (`12s`)\n * period <名前> <目盛りの数> [from: <最初の番号>]\n * row <名札> as <名前> [color: <色>, empty: <目盛り> <目盛り>]\n * point <名札> at <目盛り>\n * zoom <目盛り>-<目盛り>\n *\n * 段の中では `now -> <目盛り>` で針をその目盛りの終わりまで進め、`mark <列> <範囲> [color: <色>]` で印の色を変え、\n * `span <範囲>: <字> [shape: box, color: <色>]` で範囲に括弧か囲みを出す。目盛りは 0 から数え、範囲は `0-31` か `0` と書く。\n * 箱は拡大の帯に置き、箱どうしの線は `[at: <目盛り>]` で列を選び、受ける箱を別の列から選ぶ時は `[into: <目盛り>]` を足す。\n * 節目どうしの線は軸の上に引き、`note <節目>: <状態> [color: <色>]` で節目の状態と丸の色を変える。\n * 中身の帯の欄の名前の後ろに `[meter: <割合>]` を書くと物差しになり、`set` の値を割合 (`97%` か `2/3`) で書く。\n * 印の列と箱は同じ名札を持てる (空いた目盛りの列でその箱を空きの枠にするため)。時間軸の図では `now` を名札に使えない。\n *\n * 木の図 (`tree`、#3233) は、段の中に `leaf <名札> [hash: <hash>]` で葉を出し、`node <名札> of <子>, <子> [hash: <hash>]` で\n * 前に書いた葉か親を子にして親を組む。箱は書いた段で現れ、親は 1 つだけ持てる。最後の段を終えた時に親を持たない木の箱は根の 1 つだけ。\n * 線の端には木の箱も `box` の箱も書ける。木の図に区画 (`group`) は書けず、`leaf` と `node` の行は木の図でだけ書ける。\n *\n * 列の図 (`lineup`、#3239) は、`box` の行が列になり、最初の `step` より前に `item <名札>, <名札> [color: <色>, label: <字>]` でチップを宣言する。\n * 段の中で `line <列>: <チップ>, <チップ>` と書くと列の並びが替わり、`seal <列>` で封をし、`open <列>` で開け、`pick <列>` で列を選び、\n * `stamp <列>: <字>` で札を押す。列の図に区画 (`group`) と線と `act` の行は書けない。封をした列の並びは、開けるまで書けない。\n * `item`、`line`、`seal`、`open`、`pick`、`stamp`、`role` の行は列の図でだけ書ける。\n * 卓の形 (#3351) で、`box` の行の `[order: none]` は箱を順番の無い置き場にし、`item` の行の `[note: <説明>]` は凡例の説明を持たせる。\n * 最初の `step` より前の `role <名札> [note: <一言>]` は役を宣言し、段の中の `role <名札>` はその段で動く役を名指す。\n *\n * 試す図 (`try`、#3337) は、最初の `step` より前に部品の行を上から積む順に書く。\n *\n * route <名札>: <節> - <節>, <節> - <節> [from: <節>, to: <節>] 網。from から to へ最短の道でチップを運ぶ\n * queue <名札> [order: <欄>] 待ち行列。order の欄の値の高い順に並べる\n * chain <名札> [edit: <欄>] 機械の列。edit の欄を読み手が書き換えられる\n * ask <欄>, <欄> [into: <待ち行列>, via: <網>] 入力の帯。図に 1 つまで。最初の欄の値がチップの名前\n * press <名札> [from: <待ち行列>, into: <機械の列>, take: <数>, at: <部品>] 釦\n * item <名札> [<欄>: <値>] チップ。鍵は ask の欄 (最初の欄を除く)\n *\n * 段の中では `line <待ち行列か機械の列>: <チップ>, <チップ>` で中身を書き、`ask <値>, <値>` で送り、`press <釦>` で押し、\n * `item <チップ> [<欄>: <値>]` で書き換える。部品を名指す属性は全ての宣言を読んでから確かめ、誤りは名指した行に出す。\n * 段の中の出来事は段ごとの状態の手順 (`try-state.ts`) に 1 つずつ当て、空の待ち行列からの press と満杯の待ち行列への ask を断る。\n * 部品の行は試す図でだけ書け、試す図に箱と区画と線の行は書けない。\n *\n * 行の頭の語と同じ綴りの名札 (`end` や `step`) も書ける。名札の次に `->` が来る行は線と読む。\n * 誤りは最初の 1 つで止め、行と列を示す。誤りの文の言葉は呼ぶ側が渡す。\n *\n * 行はブロックの読み方 (`blocks/<名前>/read.ts`) が読み、ここは行をブロックへ振り分ける (#3345、#3349)。\n * どの行をどのブロックが読むかはブロックの定義 (`block.ts`) の語と `lines` の宣言から引き (`blocks/used.ts`)、読み方は登録簿 (`blocks/reading.ts`) から引く。\n * 軽い入口で読み方をまだ読んでいないブロックの行は、黙って別の行と読まず、ブロックの名前を名指す誤りで止める。\n * 図の種類の決まり (名札に使えない名前、線の端、読み終えた時の確かめ) は、その種類の図が必ず使うブロック (定義の `always`) の読み方の手続きが持つ。\n */\nimport type { BlockReading, FigureDraft, HeadReader, KindName, LineView, ParseState, StepDraft } from \"./blocks/block\";\nimport { EDGE } from \"./blocks/edge/block\";\nimport { readEdgeLine } from \"./blocks/edge/read\";\nimport { BLOCKS } from \"./blocks/index\";\nimport { cachedByReadings, loadedReadings, readingLoaded } from \"./blocks/reading\";\nimport { stepOf, viewOf } from \"./blocks/step/read\";\nimport { fits } from \"./blocks/usable\";\nimport { kindNeeds, lineNeeds, lineView, matches } from \"./blocks/used\";\nimport { TIME_EDGE_ATTRS } from \"./blocks/zoom/block\";\nimport { KIND_FOLDERS } from \"./kinds/index\";\nimport type { Kind } from \"./kinds/kind\";\nimport { type Messages, messagesFor, type Shape } from \"./messages\";\nimport { fail, isOneOf, NotationError, readAttrs, readName } from \"./read-kit\";\nimport type { Diagram, DiagramModel, Step } from \"./schema\";\nimport { isBlankOrComment, type SourceLine, tokenize } from \"./tokenize\";\nimport { FORMAT_VERSION, fromModel, MODEL_VERSION } from \"./model\";\nimport { ATTRS, DEFAULT_LANG, HEADS, KINDS, type NotationLang, OLD_HEADS } from \"./words\";\n\n/** 読み方の手続きの名前 */\ntype Hook = \"take\" | \"checkHead\" | \"settle\" | \"beginStep\" | \"endAt\" | \"reserved\" | \"columns\" | \"afterEdge\" | \"finish\" | \"verify\";\n\nexport interface LineError {\n line: number;\n column: number;\n message: string;\n}\n\nexport type Parsed = { ok: true; diagram: Diagram } | { ok: false; errors: LineError[] };\n\nexport interface ParseOptions {\n /** 誤りの文の言葉。既定は英語 (#3338) */\n lang?: NotationLang;\n}\n\n/**\n * 前の形 (#2997 まで) の行なら、その印と、新しい形で書く行の形。`inStep` は段の中の行か。\n * 新しい形で読めない行の誤りの文で、書き直し方を示すために引く。\n */\nfunction oldForm(text: string, inStep: boolean): { word: string; shape: Shape } | undefined {\n const first = text.split(/\\s/u)[0] ?? \"\";\n if (first === \"帯\") return { word: first, shape: inStep ? \"set\" : \"strip\" };\n if (Object.hasOwn(OLD_HEADS, first)) return { word: first, shape: OLD_HEADS[first as keyof typeof OLD_HEADS] };\n if (text.startsWith(\"#\")) return { word: \"#\", shape: \"step\" };\n if (text.startsWith(\">\")) return { word: \">\", shape: \"say\" };\n if (text.startsWith(\"`\")) return { word: \"`\", shape: \"code\" };\n if (text.includes(\"「\")) return { word: \"「」\", shape: inStep ? \"note\" : \"box\" };\n if (/^[^\\s=:]+\\s*=(?!>)/u.test(text)) return { word: \"=\", shape: \"box\" };\n if (inStep && /^[^\\s:]+\\s*:/u.test(text)) return { word: \":\", shape: \"act\" };\n return undefined;\n}\n\n/**\n * 持っている読み方の、行の頭の語ごとの読む処理 (#3345、#3349)。\n * 行の頭の語の誤り (図の種類だけの語と、知らない語) を確かめた後に、ここに在る語はブロックの読む処理で読む\n */\nconst headReaders = cachedByReadings(\n (): ReadonlyMap<string, HeadReader> => new Map(loadedReadings().flatMap(({ reading }) => (\"none\" in reading.read ? [] : Object.entries(reading.read)))),\n);\n/**\n * 図の種類だけのブロック (`attach.only`) が持つ行の頭の語と、その図の種類 (#3164、#3347、#3348)。\n * ほかの種類の図に書いた行は、その図の種類だけの語の誤りで止める。読み方を読まずに断れるよう、ブロックの定義から引く\n */\nconst ONLY_HEADS: ReadonlyMap<string, KindName> = new Map(\n Object.values(BLOCKS).flatMap((block) => {\n const only = block.attach.only;\n return only === undefined ? [] : (block.words.heads ?? []).map((head) => [head, only] as const);\n }),\n);\n/** 列の図と試す図の両方に書ける行の頭の語 (#3337)。ほかの種類の図に書いた行は、2 つの図の種類だけの語の誤りで止める */\nconst LINEUP_OR_TRY = [\"item\", \"line\"];\n/** 箱を持たずに描ける図の種類。ほかの種類の図は箱が 1 つも無いと止める */\nconst BOXLESS: readonly KindName[] = [\"git\", \"time\", \"tree\", \"try\"];\n\n/** 記法を読んで、描く処理の形 (版1と同じ欄と並び) に組む。原本 (版2) へは `parseNotation` が `fromModel` で移す (#3346) */\nfunction parseLines(lines: SourceLine[], m: Messages): DiagramModel {\n const headAt = lines.findIndex((source) => !isBlankOrComment(source));\n const head = lines[headAt];\n if (!head) throw new NotationError(1, 1, m.noHead);\n const kind = head.text.split(/\\s/u)[0] ?? \"\";\n if (!isOneOf(KINDS, kind)) {\n const old = oldForm(head.text, false);\n throw fail(head, 0, old ? m.oldForm(old.word, old.shape) : m.badHead);\n }\n const titled = readName(head, kind.length, m);\n if (titled.value === \"\") throw fail(head, 0, m.badHead);\n const title = titled.value;\n const view = viewOf(head, titled.rest < head.text.length ? readAttrs(head, titled.rest, ATTRS.diagram ?? [], m).get(\"view\") : undefined, m);\n\n // 図の種類の決まりを持つブロック (定義の `always`) の読み方は、行が無くても要る\n const always = kindNeeds(kind).find((name) => !readingLoaded(name));\n if (always !== undefined) throw fail(head, 0, m.blockNotLoaded(always));\n const kindFolder = (KIND_FOLDERS as unknown as Readonly<Record<string, Kind>>)[kind] as Kind;\n /** この図の種類で使える、持っている読み方。ブロックの並び (`rank`) の順 */\n const own = loadedReadings().filter(({ block }) => fits(block, kindFolder));\n /** この図の種類で使える読み方が持つ、名前 `key` の手続き。ブロックの並びの順 */\n const hooks = <K extends Hook>(key: K): NonNullable<BlockReading[K]>[] =>\n own.flatMap(({ reading }) => (reading[key] === undefined ? [] : [reading[key] as NonNullable<BlockReading[K]>]));\n const isGit = kind === \"git\";\n const isTime = kind === \"time\";\n const isLineup = kind === \"lineup\";\n const isTry = kind === \"try\";\n const ids = new Set<string>();\n /** 宣言の行でブロックが組む欄 (区画と箱と、中身の帯と、時間軸の図の物差しの欄と、状態遷移図の道と、枝分かれの図の枝と札) */\n const figure: FigureDraft = {\n regions: [],\n boxes: [],\n meters: [],\n paths: [],\n branches: [],\n git: { commits: new Set(), tips: new Map() },\n time: { rows: [], points: [], pending: [], settled: false, needle: 0 },\n tree: { boxes: new Map(), parents: new Map() },\n lineup: { items: [], roles: [], sealed: new Set() },\n try: { parts: [], items: [], pending: [] },\n };\n const { regions, boxes, paths, branches, time } = figure;\n const steps: Step[] = [];\n let building: StepDraft | undefined;\n /** 全ての宣言を読んでから確かめる宣言を、もう確かめたか */\n let settled = false;\n\n const declare = (source: SourceLine, id: string, at: number): void => {\n if (ids.has(id)) throw fail(source, at, m.duplicate(id));\n ids.add(id);\n };\n const boxAt = (source: SourceLine, id: string, at: number): string => {\n if (!boxes.some((box) => box.id === id)) throw fail(source, at, m.undeclaredBox(id));\n return id;\n };\n /**\n * 線の端。図の種類が箱のほかに書ける名札 (状態遷移図の始まりと終わりの印、枝分かれの図の枝と commit、時間軸の図の節目、木の図の木の箱) は、\n * その決まりを持つブロックが確かめる\n */\n const endAt = (source: SourceLine, id: string, at: number, side: \"from\" | \"to\"): string => {\n for (const end of hooks(\"endAt\")) {\n const found = end(source, id, at, side, state);\n if (found !== undefined) return found;\n }\n return boxAt(source, id, at);\n };\n /** 図の種類が名札に使えない名前 (状態遷移図の始まりと終わりの印、枝分かれの図の `HEAD`、時間軸の図の `now`) は、その決まりを持つブロックが止める */\n const notReserved = (source: SourceLine, id: string, at: number): void => {\n for (const reserved of hooks(\"reserved\")) reserved(source, id, at, state);\n };\n /** 宣言の行の名札を、使えない名前でも宣言済みでもない名札として取る */\n const claim = (source: SourceLine, id: string, at: number): void => {\n notReserved(source, id, at);\n declare(source, id, at);\n };\n /** 段の中に書く行の、書き先の段。最初の `step` より前なら誤り */\n const inStep = (source: SourceLine): StepDraft => {\n if (!building) throw fail(source, 0, m.stepLineBeforeStep);\n return building;\n };\n /** 宣言の行。最初の `step` より後なら誤り */\n const beforeSteps = (source: SourceLine): void => {\n if (building) throw fail(source, 0, m.declarationInStep);\n };\n /** 全ての宣言を読んでから確かめる宣言を、最初の段を始める時か記法の終わりに 1 度だけ確かめる */\n const settle = (): void => {\n if (settled) return;\n settled = true;\n for (const check of hooks(\"settle\")) check(state, head);\n };\n /** 書いている段を閉じる。開いたままの区画と、全ての宣言を読んでから確かめる宣言を確かめてから、段を段の並びへ足す */\n const closeStep = (): void => {\n if (figure.group) throw fail(figure.group.source, 0, m.unclosedGroup(figure.group.id));\n settle();\n if (building) steps.push(stepOf(building, m));\n };\n const openStep = (draft: StepDraft): void => {\n building = draft;\n for (const begin of hooks(\"beginStep\")) begin(state);\n };\n /** ブロックの読む処理が受ける、読んでいる記法の状態 */\n const declared = (id: string): boolean => ids.has(id);\n const current = (): StepDraft | undefined => building;\n /**\n * 図の種類だけの行の頭の語を、ほかの種類の図に書いた時の誤りの文。\n * 区画の行のように、図の種類だけのブロックが読む処理で自分で断る語の図の種類は持たない\n */\n const onlyIn: Partial<Record<KindName, (word: string) => string>> = { git: m.gitOnly, time: m.timeOnly, tree: m.treeOnly, lineup: m.lineupOnly, try: m.tryOnly };\n /** 線の列。持つ図の種類 (時間軸の図) のブロックが読み、ほかの種類の図に書いた列は誤りで止める */\n const columns: ParseState[\"columns\"] = (source, from, to, attrs, end) => {\n const [read] = hooks(\"columns\");\n if (read) return read(source, from, to, attrs, end, state);\n const given = TIME_EDGE_ATTRS.flatMap((name) => {\n const attr = attrs.get(name);\n return attr ? [{ name, attr }] : [];\n })[0];\n if (given) throw fail(source, given.attr.at, m.timeOnly(given.name));\n return {};\n };\n const state: ParseState = { m, kind, attrs: ATTRS, inStep, current, closeStep, openStep, beforeSteps, boxAt, declare, declared, notReserved, claim, endAt, columns, figure };\n /** 行が使うブロックの読み方を持っているか確かめる。持っていなければ、ブロックの名前を名指して止める */\n const needed = (source: SourceLine, line: LineView): void => {\n const missing = lineNeeds(line, kind).find((name) => !readingLoaded(name));\n if (missing !== undefined) throw fail(source, 0, m.blockNotLoaded(missing));\n };\n /** 行の形で読む行を、定義の `lines` が当たるブロックの読み方で読む。読んだら true */\n const taken = (source: SourceLine, line: LineView): boolean =>\n own.some(({ block, reading }) => reading.take !== undefined && (block.lines ?? []).some((match) => matches(match, line)) && reading.take(source, state, line));\n\n const rest = lines.slice(headAt + 1);\n for (let i = 0; i < rest.length; i++) {\n const source = rest[i];\n if (!source || isBlankOrComment(source)) continue;\n const text = source.text;\n const line = lineView(text, building !== undefined);\n needed(source, line);\n // 行の頭の語でなく行の形で読む行 (時間軸の図の針、状態遷移図の道、枝を切る行、試す図のチップと中身と線) は、その行を読むブロックが先に読む\n if (taken(source, line)) continue;\n // 名札の次に `->` が来る行は、名札が行の頭の語と同じ綴りでも線と読む\n const edge = EDGE.exec(text);\n if (edge) {\n const read = readEdgeLine(source, edge, state);\n for (const after of hooks(\"afterEdge\")) after(read, state);\n continue;\n }\n const { word } = line;\n // 列の図のチップと並びの語は試す図でも書け、ほかの種類の図に書いた行は 2 つの図の種類だけの語の誤りで止める (#3337)\n if (LINEUP_OR_TRY.includes(word) && !isLineup && !isTry) throw fail(source, 0, m.lineupOrTryOnly(word));\n const only = ONLY_HEADS.get(word);\n const refuse = only === undefined || only === kind ? undefined : onlyIn[only];\n if (refuse) throw fail(source, 0, refuse(word));\n if (!isOneOf(HEADS, word)) {\n const old = oldForm(text, building !== undefined);\n throw fail(source, 0, old ? m.oldForm(old.word, old.shape) : m.unknownHead(word));\n }\n for (const check of hooks(\"checkHead\")) check(source, word, state);\n const reader = headReaders().get(word);\n if (reader) {\n // 下の行まで続けて読んだ処理は、読み終えた続きの行の数を返す\n const read = reader(source, state, (offset) => rest[i + offset]);\n if (typeof read === \"number\") i += read;\n continue;\n }\n }\n closeStep();\n\n for (const finish of hooks(\"finish\")) finish(state, head);\n if (boxes.length === 0 && !BOXLESS.includes(kind)) throw fail(head, 0, m.noBoxes);\n if (steps.length === 0) throw fail(head, 0, m.noSteps);\n for (const verify of hooks(\"verify\")) verify(state, head);\n\n return {\n version: MODEL_VERSION,\n kind,\n title,\n ...(view ? { view } : {}),\n ...(regions.length > 0 ? { regions } : {}),\n boxes,\n ...(figure.strip ? { strip: figure.meters.length > 0 ? { ...figure.strip, meters: figure.meters } : figure.strip } : {}),\n steps,\n ...(paths.length > 0 ? { state: { paths } } : {}),\n ...(isGit ? { git: { branches } } : {}),\n ...(isLineup ? { lineup: { items: figure.lineup.items, ...(figure.lineup.roles.length > 0 ? { roles: figure.lineup.roles } : {}) } } : {}),\n ...(isTry ? { try: { parts: figure.try.parts, items: figure.try.items } } : {}),\n ...(isTime && time.scale\n ? {\n time: {\n scale: time.scale,\n ...(time.period ? { period: time.period } : {}),\n rows: time.rows,\n ...(time.points.length > 0 ? { points: time.points } : {}),\n ...(time.zoom ? { zoom: time.zoom } : {}),\n },\n }\n : {}),\n };\n}\n\nexport function parseNotation(notation: string, options: ParseOptions = {}): Parsed {\n try {\n return { ok: true, diagram: fromModel(parseLines(tokenize(notation), messagesFor(options.lang ?? DEFAULT_LANG)), FORMAT_VERSION) };\n } catch (error) {\n if (!(error instanceof NotationError)) throw error;\n return { ok: false, errors: [{ line: error.line, column: error.column, message: error.message }] };\n }\n}\n","/**\n * 原本の JSON の誤りの文 (#2999)。\n *\n * JSON は語を持たず file から言葉を決められないので、呼ぶ側 (頁なら頁の言葉) が言葉を渡す。\n * 文は schema が使う決まり (JSON Schema の keyword) ごとに持ち、ajv の英語の文はそのまま出さない。\n * schema に決まりを足して文が無い時は、`every-schema-keyword-has-messages` の検査が落ちる。\n * ブロックの形の決まりに当てる文はブロックが日英で持ち (`blocks/<名前>/block.ts` の `fieldMessages`)、ここで 1 つの表に束ねる (#3345)。\n */\nimport { ranked } from \"./blocks/block\";\nimport { BLOCKS } from \"./blocks/index\";\nimport type { NotationLang } from \"./words\";\n\ntype Blocks = typeof BLOCKS;\n/** 日英の誤りの文の、日本語の表の型。原本の誤りの文を持たないブロックは何も足さない */\ntype JaOf<X> = X extends { ja: infer M } ? M : never;\ntype Intersect<U> = (U extends unknown ? (u: U) => void : never) extends (i: infer I) => void ? I : never;\n/** ブロックが持つ原本の誤りの文の表 */\nexport type BlockFieldMessages = Intersect<JaOf<Blocks[keyof Blocks][\"fieldMessages\"]>>;\n\n/** 原本の誤りの文の表。決まりごとの文と、ブロックが持つ文 */\nexport type FieldMessages = CoreFieldMessages & BlockFieldMessages;\n\n/** `^[^…]+$` の形の決まりが書けないとする字。`space` は空白 (`\\s`) */\nexport interface Forbidden {\n space: boolean;\n chars: string[];\n}\n\n/** 書けない組み合わせ (`not`) の欄と、その欄を書ける時の `kind` の値 */\nexport interface Allowed {\n field: string;\n kind: string;\n}\n\n/** schema が使う決まりごとの、ブロックが持たない誤りの文 */\nexport interface CoreFieldMessages {\n additionalProperties: (key: string) => string;\n required: (key: string) => string;\n enum: (values: readonly string[]) => string;\n type: (type: string) => string;\n minLength: (limit: number) => string;\n maxLength: (limit: number) => string;\n /** 書けない字を読めない形の決まりでは `undefined` */\n pattern: (forbidden: Forbidden | undefined) => string;\n minItems: (limit: number) => string;\n maxItems: (limit: number) => string;\n minimum: (limit: number) => string;\n const: (value: string) => string;\n /** どの欄の組み合わせか判らない場所では `undefined` */\n not: (allowed: Allowed | undefined) => string;\n /** `kind` の図だけが書ける出来事の種類 (`types`) を、別の種類の図に書いた (#3164) */\n kindOnly: (types: readonly string[], kind: string) => string;\n /** 16 進の字を `min` から `max` 字で書く決まり (commit の hash、#3164) */\n hex: (min: number, max: number) => string;\n /** 分数か百分率で書く決まり (物差しの線、#3165) */\n ratio: string;\n /** 選べる決まりがどれも欄が足りない時の、足りない欄。それ以外の時は空 */\n anyOf: (fields: readonly string[]) => string;\n oneOf: string;\n discriminator: (tag: string, values: readonly string[]) => string;\n /** 道具より新しい版の図 */\n newer: (version: number, tool: number) => string;\n /** 古い版の図を今の版の形に移して読んだ時の警告 (#3346) */\n upgraded: (version: number, tool: number) => string;\n}\n\nconst TYPES_JA: Record<string, string> = {\n string: \"文字列にする\",\n integer: \"整数にする\",\n number: \"数にする\",\n object: \"オブジェクトにする\",\n array: \"配列にする\",\n boolean: \"true か false にする\",\n null: \"null にする\",\n};\n\nconst TYPES_EN: Record<string, string> = {\n string: \"Use a string\",\n integer: \"Use an integer\",\n number: \"Use a number\",\n object: \"Use an object\",\n array: \"Use an array\",\n boolean: \"Use true or false\",\n null: \"Use null\",\n};\n\nconst plural = (count: number, word: string): string => `${count} ${word}${count === 1 ? \"\" : \"s\"}`;\n\nconst ja: CoreFieldMessages = {\n additionalProperties: (key) => `${key} という欄は書けない`,\n required: (key) => `${key} の欄が要る`,\n enum: (values) => `${values.join(\" / \")} のどれかにする`,\n type: (type) => TYPES_JA[type] ?? `${type} にする`,\n minLength: (limit) => `${limit} 字以上書く`,\n maxLength: (limit) => `${limit} 字までにする`,\n pattern: (forbidden) =>\n forbidden ? `${forbidden.space ? \"空白と \" : \"\"}${forbidden.chars.join(\" \")} は使えない` : \"使えない字が入っている\",\n minItems: (limit) => `${limit} つ以上書く`,\n maxItems: (limit) => `${limit} つまでにする`,\n minimum: (limit) => `${limit} 以上にする`,\n const: (value) => `${value} にする`,\n not: (allowed) => (allowed ? `${allowed.field} の欄は kind が ${allowed.kind} の時だけ書ける` : \"この欄の組み合わせは書けない\"),\n kindOnly: (types, kind) => `${types.join(\" と \")} の出来事は kind が ${kind} の時だけ書ける`,\n hex: (min, max) => `0 から 9 と a から f の字で ${min} から ${max} 字にする`,\n ratio: \"分数 (2/3) か百分率 (97%) で書く\",\n anyOf: (fields) =>\n fields.length > 0 ? `${fields.join(\" か \")} の${fields.length === 2 ? \"どちらか\" : \"どれか\"}の欄が要る` : \"書ける形のどれにも合わない\",\n oneOf: \"書ける形のどれか 1 つだけに合わせる\",\n discriminator: (tag, values) => `${tag} は ${values.join(\" / \")} のどれかにする`,\n newer: (version, tool) => `版 ${version} の図は、この道具 (版 ${tool}) より新しいので読めない。道具を新しくする`,\n upgraded: (version, tool) => `版 ${version} の図を版 ${tool} の形に移して読んだ。file を書き換えるには migrateFile を使う`,\n};\n\nconst en: CoreFieldMessages = {\n additionalProperties: (key) => `The ${key} field is not allowed`,\n required: (key) => `The ${key} field is required`,\n enum: (values) => `Use one of ${values.join(\" / \")}`,\n type: (type) => TYPES_EN[type] ?? `Use ${type}`,\n minLength: (limit) => `Write at least ${plural(limit, \"character\")}`,\n maxLength: (limit) => `Write at most ${plural(limit, \"character\")}`,\n pattern: (forbidden) =>\n forbidden\n ? `Cannot contain ${forbidden.space ? \"spaces or \" : \"\"}${forbidden.chars.join(\" \")}`\n : \"Contains characters that are not allowed\",\n minItems: (limit) => `Write at least ${plural(limit, \"item\")}`,\n maxItems: (limit) => `Write at most ${plural(limit, \"item\")}`,\n minimum: (limit) => `Use ${limit} or greater`,\n const: (value) => `Use ${value}`,\n not: (allowed) => (allowed ? `The ${allowed.field} field is allowed only when kind is ${allowed.kind}` : \"This combination of fields is not allowed\"),\n kindOnly: (types, kind) => `${types.join(\" and \")} events are allowed only when kind is ${kind}`,\n hex: (min, max) => `Use ${min} to ${max} characters of 0-9 and a-f`,\n ratio: \"Write a fraction (2/3) or a percentage (97%)\",\n anyOf: (fields) => (fields.length > 0 ? `Write one of the ${fields.join(\" or \")} fields` : \"Does not match any of the allowed shapes\"),\n oneOf: \"Match exactly one of the allowed shapes\",\n discriminator: (tag, values) => `${tag} is one of ${values.join(\" / \")}`,\n newer: (version, tool) => `Version ${version} diagrams are newer than this tool (version ${tool}) and cannot be read. Update the tool`,\n upgraded: (version, tool) => `Read a version ${version} diagram by moving it to the version ${tool} shape. Use migrateFile to rewrite the file`,\n};\n\n/** ブロックが持つ `lang` の原本の誤りの文を 1 つの表に束ねる */\nconst fromBlocks = (lang: NotationLang): BlockFieldMessages => Object.assign({}, ...ranked(BLOCKS).map((block) => block.fieldMessages?.[lang] ?? {})) as BlockFieldMessages;\n\nexport const FIELD_MESSAGES: Record<NotationLang, FieldMessages> = { ja: { ...ja, ...fromBlocks(\"ja\") }, en: { ...en, ...fromBlocks(\"en\") } };\n","/* eslint-disable */\n// packages/dragon/scripts/build-validator.mjs が base.schema.json とブロックの形から書き出した。手で直さない\nfunction ucs2length(str) {\n let length = 0;\n for (const _ of str) length++;\n return length;\n}\nexport const validate = validate10;export default validate10;const schema11 = {\"title\":\"dragon の図の原本 (版2)\",\"description\":\"図の宣言を blocks のブロックの名前ごとの欄に置き、段ごとに起きることを steps に置く。座標は持たない。ブロックの欄の形はブロックの置き場が持ち、build の時に scripts/build-validator.mjs がこの骨組みに束ねて diagram.schema.json を書き出す。箱は枝分かれの図と時間軸の図と木の図だけが持たなくてよく、試す図は持たない。列の図の箱は列になる。\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"version\",\"kind\",\"title\",\"blocks\",\"steps\"],\"properties\":{\"version\":{\"description\":\"形式の版\",\"type\":\"integer\",\"minimum\":1},\"kind\":{\"description\":\"図の種類\",\"enum\":[\"sequence\",\"architecture\",\"state\",\"git\",\"time\",\"tree\",\"lineup\",\"try\"]},\"title\":{\"$ref\":\"#/definitions/text\"},\"view\":{\"description\":\"見せ方。書かなければ字の大きさで選ぶ。fixed は全体を止めて中だけ動かし、follow は寄って動かし全体図で今どこかを示す\",\"enum\":[\"fixed\",\"follow\"]},\"blocks\":{\"description\":\"図の宣言。ブロックの名前ごとの欄に、そのブロックの宣言を置く\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"branch\":{\"type\":\"array\",\"minItems\":1,\"items\":{\"$ref\":\"#/definitions/branch\"}},\"group\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/region\"}},\"box\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/box\"}},\"strip\":{\"$ref\":\"#/definitions/strip\"},\"scale\":{\"$ref\":\"#/definitions/scale\"},\"row\":{\"type\":\"array\",\"minItems\":1,\"items\":{\"$ref\":\"#/definitions/row\"}},\"point\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/point\"}},\"zoom\":{\"$ref\":\"#/definitions/zoom\"},\"item\":{\"type\":\"array\",\"minItems\":1,\"description\":\"チップ。列の図と試す図だけが書け、形は図の種類の決まりが持つ\"},\"role\":{\"type\":\"array\",\"minItems\":1,\"items\":{\"$ref\":\"#/definitions/role\"}},\"path\":{\"type\":\"array\",\"minItems\":1,\"items\":{\"$ref\":\"#/definitions/path\"}},\"period\":{\"$ref\":\"#/definitions/period\"},\"part\":{\"description\":\"試す図の部品。書いた順に図の上から積む\",\"type\":\"array\",\"minItems\":1,\"items\":{\"$ref\":\"#/definitions/part\"}}}},\"steps\":{\"type\":\"array\",\"minItems\":1,\"items\":{\"$ref\":\"#/definitions/step\"}}},\"allOf\":[{\"if\":{\"required\":[\"kind\"],\"properties\":{\"kind\":{\"const\":\"lineup\"}}},\"else\":{\"properties\":{\"blocks\":{\"properties\":{\"box\":{\"items\":{\"properties\":{\"order\":{\"$ref\":\"#/definitions/absent\"}}}}}}}}}],\"if\":{\"required\":[\"kind\"],\"properties\":{\"kind\":{\"const\":\"sequence\"}}},\"then\":{\"properties\":{\"blocks\":{\"required\":[\"box\"],\"properties\":{\"box\":{\"minItems\":1},\"strip\":{\"$ref\":\"#/definitions/plainStrip\"},\"path\":{\"$ref\":\"#/definitions/absent\"},\"branch\":{\"$ref\":\"#/definitions/absent\"},\"scale\":{\"$ref\":\"#/definitions/absent\"},\"period\":{\"$ref\":\"#/definitions/absent\"},\"row\":{\"$ref\":\"#/definitions/absent\"},\"point\":{\"$ref\":\"#/definitions/absent\"},\"zoom\":{\"$ref\":\"#/definitions/absent\"},\"item\":{\"$ref\":\"#/definitions/absent\"},\"role\":{\"$ref\":\"#/definitions/absent\"},\"part\":{\"$ref\":\"#/definitions/absent\"}}},\"steps\":{\"$ref\":\"#/definitions/plainSteps\"}}},\"else\":{\"if\":{\"required\":[\"kind\"],\"properties\":{\"kind\":{\"const\":\"state\"}}},\"then\":{\"properties\":{\"blocks\":{\"required\":[\"box\"],\"properties\":{\"box\":{\"minItems\":1,\"items\":{\"properties\":{\"id\":{\"description\":\"始まりと終わりの印の名前は箱の名札に使えない\",\"not\":{\"enum\":[\"start\",\"finish\"]}}}}},\"strip\":{\"$ref\":\"#/definitions/plainStrip\"},\"branch\":{\"$ref\":\"#/definitions/absent\"},\"scale\":{\"$ref\":\"#/definitions/absent\"},\"period\":{\"$ref\":\"#/definitions/absent\"},\"row\":{\"$ref\":\"#/definitions/absent\"},\"point\":{\"$ref\":\"#/definitions/absent\"},\"zoom\":{\"$ref\":\"#/definitions/absent\"},\"item\":{\"$ref\":\"#/definitions/absent\"},\"role\":{\"$ref\":\"#/definitions/absent\"},\"part\":{\"$ref\":\"#/definitions/absent\"}}},\"steps\":{\"$ref\":\"#/definitions/plainSteps\"}}},\"else\":{\"if\":{\"required\":[\"kind\"],\"properties\":{\"kind\":{\"const\":\"git\"}}},\"then\":{\"properties\":{\"blocks\":{\"required\":[\"branch\"],\"properties\":{\"strip\":{\"$ref\":\"#/definitions/plainStrip\"},\"path\":{\"$ref\":\"#/definitions/absent\"},\"group\":{\"$ref\":\"#/definitions/absent\"},\"scale\":{\"$ref\":\"#/definitions/absent\"},\"period\":{\"$ref\":\"#/definitions/absent\"},\"row\":{\"$ref\":\"#/definitions/absent\"},\"point\":{\"$ref\":\"#/definitions/absent\"},\"zoom\":{\"$ref\":\"#/definitions/absent\"},\"item\":{\"$ref\":\"#/definitions/absent\"},\"role\":{\"$ref\":\"#/definitions/absent\"},\"part\":{\"$ref\":\"#/definitions/absent\"}}},\"steps\":{\"$ref\":\"#/definitions/gitSteps\"}}},\"else\":{\"if\":{\"required\":[\"kind\"],\"properties\":{\"kind\":{\"const\":\"time\"}}},\"then\":{\"properties\":{\"blocks\":{\"required\":[\"scale\",\"row\"],\"properties\":{\"path\":{\"$ref\":\"#/definitions/absent\"},\"branch\":{\"$ref\":\"#/definitions/absent\"},\"group\":{\"$ref\":\"#/definitions/absent\"},\"item\":{\"$ref\":\"#/definitions/absent\"},\"role\":{\"$ref\":\"#/definitions/absent\"},\"part\":{\"$ref\":\"#/definitions/absent\"}}},\"steps\":{\"$ref\":\"#/definitions/timeSteps\"}}},\"else\":{\"if\":{\"required\":[\"kind\"],\"properties\":{\"kind\":{\"const\":\"tree\"}}},\"then\":{\"properties\":{\"blocks\":{\"properties\":{\"strip\":{\"$ref\":\"#/definitions/plainStrip\"},\"path\":{\"$ref\":\"#/definitions/absent\"},\"branch\":{\"$ref\":\"#/definitions/absent\"},\"scale\":{\"$ref\":\"#/definitions/absent\"},\"period\":{\"$ref\":\"#/definitions/absent\"},\"row\":{\"$ref\":\"#/definitions/absent\"},\"point\":{\"$ref\":\"#/definitions/absent\"},\"zoom\":{\"$ref\":\"#/definitions/absent\"},\"group\":{\"$ref\":\"#/definitions/absent\"},\"item\":{\"$ref\":\"#/definitions/absent\"},\"role\":{\"$ref\":\"#/definitions/absent\"},\"part\":{\"$ref\":\"#/definitions/absent\"}}},\"steps\":{\"$ref\":\"#/definitions/treeSteps\"}}},\"else\":{\"if\":{\"required\":[\"kind\"],\"properties\":{\"kind\":{\"const\":\"lineup\"}}},\"then\":{\"properties\":{\"blocks\":{\"required\":[\"box\",\"item\"],\"properties\":{\"box\":{\"minItems\":1,\"items\":{\"properties\":{\"icon\":{\"$ref\":\"#/definitions/absent\"},\"link\":{\"$ref\":\"#/definitions/absent\"},\"region\":{\"$ref\":\"#/definitions/absent\"}}}},\"strip\":{\"$ref\":\"#/definitions/plainStrip\"},\"path\":{\"$ref\":\"#/definitions/absent\"},\"branch\":{\"$ref\":\"#/definitions/absent\"},\"scale\":{\"$ref\":\"#/definitions/absent\"},\"period\":{\"$ref\":\"#/definitions/absent\"},\"row\":{\"$ref\":\"#/definitions/absent\"},\"point\":{\"$ref\":\"#/definitions/absent\"},\"zoom\":{\"$ref\":\"#/definitions/absent\"},\"group\":{\"$ref\":\"#/definitions/absent\"},\"part\":{\"$ref\":\"#/definitions/absent\"},\"item\":{\"items\":{\"$ref\":\"#/definitions/item\"}}}},\"steps\":{\"$ref\":\"#/definitions/lineupSteps\"}}},\"else\":{\"if\":{\"required\":[\"kind\"],\"properties\":{\"kind\":{\"const\":\"try\"}}},\"then\":{\"properties\":{\"blocks\":{\"required\":[\"part\"],\"properties\":{\"item\":{\"items\":{\"$ref\":\"#/definitions/tryItem\"}},\"group\":{\"$ref\":\"#/definitions/absent\"},\"box\":{\"$ref\":\"#/definitions/absent\"},\"strip\":{\"$ref\":\"#/definitions/absent\"},\"path\":{\"$ref\":\"#/definitions/absent\"},\"branch\":{\"$ref\":\"#/definitions/absent\"},\"scale\":{\"$ref\":\"#/definitions/absent\"},\"period\":{\"$ref\":\"#/definitions/absent\"},\"row\":{\"$ref\":\"#/definitions/absent\"},\"point\":{\"$ref\":\"#/definitions/absent\"},\"zoom\":{\"$ref\":\"#/definitions/absent\"},\"role\":{\"$ref\":\"#/definitions/absent\"}}},\"steps\":{\"$ref\":\"#/definitions/trySteps\"}}},\"else\":{\"properties\":{\"blocks\":{\"required\":[\"box\"],\"properties\":{\"box\":{\"minItems\":1},\"strip\":{\"$ref\":\"#/definitions/plainStrip\"},\"path\":{\"$ref\":\"#/definitions/absent\"},\"branch\":{\"$ref\":\"#/definitions/absent\"},\"scale\":{\"$ref\":\"#/definitions/absent\"},\"period\":{\"$ref\":\"#/definitions/absent\"},\"row\":{\"$ref\":\"#/definitions/absent\"},\"point\":{\"$ref\":\"#/definitions/absent\"},\"zoom\":{\"$ref\":\"#/definitions/absent\"},\"item\":{\"$ref\":\"#/definitions/absent\"},\"role\":{\"$ref\":\"#/definitions/absent\"},\"part\":{\"$ref\":\"#/definitions/absent\"}}},\"steps\":{\"$ref\":\"#/definitions/plainSteps\"}}}}}}}}},\"definitions\":{\"text\":{\"type\":\"string\",\"minLength\":1},\"absent\":{\"description\":\"この図の種類では書けない欄\",\"not\":{}},\"plainSteps\":{\"description\":\"枝分かれの図でも時間軸の図でも木の図でも列の図でもない図の段。枝分かれの図だけの出来事 (commit と branch) と、時間軸の図だけの出来事 (now と mark と span) と欄 (at と into と color) と、木の図だけの出来事 (leaf と node) と、列の図だけの出来事 (line と seal と open と pick と stamp と role) と、試す図だけの出来事 (ask と press と item) を書けない\",\"items\":{\"properties\":{\"events\":{\"items\":{\"not\":{\"$ref\":\"#/definitions/timeEvent\"},\"allOf\":[{\"not\":{\"$ref\":\"#/definitions/treeEvent\"}},{\"$ref\":\"#/definitions/notLineupEvent\"},{\"$ref\":\"#/definitions/notTryEvent\"}],\"properties\":{\"type\":{\"not\":{\"enum\":[\"commit\",\"branch\"]}},\"at\":{\"$ref\":\"#/definitions/absent\"},\"into\":{\"$ref\":\"#/definitions/absent\"},\"color\":{\"$ref\":\"#/definitions/absent\"}}}}}}},\"gitSteps\":{\"description\":\"枝分かれの図の段。時間軸の図だけの出来事 (now と mark と span) と欄 (at と into と color) と、木の図だけの出来事 (leaf と node) と、列の図だけの出来事 (line と seal と open と pick と stamp と role) と、試す図だけの出来事 (ask と press と item) を書けない\",\"items\":{\"properties\":{\"events\":{\"items\":{\"not\":{\"$ref\":\"#/definitions/timeEvent\"},\"allOf\":[{\"not\":{\"$ref\":\"#/definitions/treeEvent\"}},{\"$ref\":\"#/definitions/notLineupEvent\"},{\"$ref\":\"#/definitions/notTryEvent\"}],\"properties\":{\"at\":{\"$ref\":\"#/definitions/absent\"},\"into\":{\"$ref\":\"#/definitions/absent\"},\"color\":{\"$ref\":\"#/definitions/absent\"}}}}}}},\"timeSteps\":{\"description\":\"時間軸の図の段。枝分かれの図だけの出来事 (commit と branch) と、木の図だけの出来事 (leaf と node) と、列の図だけの出来事 (line と seal と open と pick と stamp と role) と、試す図だけの出来事 (ask と press と item) を書けない\",\"items\":{\"properties\":{\"events\":{\"items\":{\"allOf\":[{\"not\":{\"$ref\":\"#/definitions/treeEvent\"}},{\"$ref\":\"#/definitions/notLineupEvent\"},{\"$ref\":\"#/definitions/notTryEvent\"}],\"properties\":{\"type\":{\"not\":{\"enum\":[\"commit\",\"branch\"]}}}}}}}},\"treeSteps\":{\"description\":\"木の図の段。枝分かれの図だけの出来事 (commit と branch) と、時間軸の図だけの出来事 (now と mark と span) と欄 (at と into と color) と、列の図だけの出来事 (line と seal と open と pick と stamp と role) と、試す図だけの出来事 (ask と press と item) を書けない\",\"items\":{\"properties\":{\"events\":{\"items\":{\"not\":{\"$ref\":\"#/definitions/timeEvent\"},\"allOf\":[{\"$ref\":\"#/definitions/notLineupEvent\"},{\"$ref\":\"#/definitions/notTryEvent\"}],\"properties\":{\"type\":{\"not\":{\"enum\":[\"commit\",\"branch\"]}},\"at\":{\"$ref\":\"#/definitions/absent\"},\"into\":{\"$ref\":\"#/definitions/absent\"},\"color\":{\"$ref\":\"#/definitions/absent\"}}}}}}},\"lineupSteps\":{\"description\":\"列の図の段。線と処理と、枝分かれの図だけの出来事 (commit と branch) と、時間軸の図だけの出来事 (now と mark と span) と欄 (color) と、木の図だけの出来事 (leaf と node) と、試す図だけの出来事 (ask と press と item) を書けない\",\"items\":{\"properties\":{\"events\":{\"items\":{\"not\":{\"$ref\":\"#/definitions/timeEvent\"},\"allOf\":[{\"not\":{\"$ref\":\"#/definitions/treeEvent\"}},{\"$ref\":\"#/definitions/notWiredEvent\"},{\"$ref\":\"#/definitions/notTryEvent\"}],\"properties\":{\"type\":{\"not\":{\"enum\":[\"commit\",\"branch\"]}},\"color\":{\"$ref\":\"#/definitions/absent\"},\"part\":{\"$ref\":\"#/definitions/absent\"}},\"if\":{\"required\":[\"type\"],\"properties\":{\"type\":{\"const\":\"line\"}}},\"then\":{\"required\":[\"box\"]}}}}}},\"treeEvent\":{\"description\":\"木の図だけが書ける出来事\",\"required\":[\"type\"],\"properties\":{\"type\":{\"enum\":[\"leaf\",\"node\"]}}},\"notLineupEvent\":{\"description\":\"列の図だけが書ける出来事を書けない\",\"not\":{\"required\":[\"type\"],\"properties\":{\"type\":{\"enum\":[\"line\",\"seal\",\"open\",\"pick\",\"stamp\",\"role\"]}}}},\"notWiredEvent\":{\"description\":\"箱と線の図の出来事を書けない\",\"not\":{\"required\":[\"type\"],\"properties\":{\"type\":{\"enum\":[\"edge\",\"action\"]}}}},\"timeEvent\":{\"description\":\"時間軸の図だけが書ける出来事\",\"required\":[\"type\"],\"properties\":{\"type\":{\"enum\":[\"now\",\"mark\",\"span\"]}}},\"id\":{\"type\":\"string\",\"pattern\":\"^[^\\\\s\\\\[\\\\]「」=:]+$\"},\"event\":{\"description\":\"段の中で起きること。起きる順に並べる\",\"type\":\"object\",\"required\":[\"type\"],\"discriminator\":{\"propertyName\":\"type\"},\"oneOf\":[{\"description\":\"枝を切る。枝分かれの図だけが書ける。枝の札を from の commit へ置き、HEAD をその枝へ移す\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"branch\",\"from\"],\"properties\":{\"type\":{\"const\":\"branch\"},\"branch\":{\"$ref\":\"#/definitions/id\"},\"from\":{\"$ref\":\"#/definitions/id\"}}},{\"description\":\"commit を積む。枝分かれの図だけが書ける。積んだ枝の札と、その枝を指す HEAD が進む。当て直し (copy) は枝の札を動かさず、merge commit (merge) は取り込む枝の先端も親に持つ\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"id\",\"branch\"],\"properties\":{\"type\":{\"const\":\"commit\"},\"id\":{\"$ref\":\"#/definitions/id\"},\"branch\":{\"$ref\":\"#/definitions/id\"},\"copy\":{\"$ref\":\"#/definitions/id\"},\"merge\":{\"$ref\":\"#/definitions/id\"},\"hash\":{\"$ref\":\"#/definitions/hash\"},\"note\":{\"$ref\":\"#/definitions/text\"}}},{\"description\":\"中身の帯の欄の値と札\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"field\"],\"anyOf\":[{\"required\":[\"value\"]},{\"required\":[\"tag\"]}],\"properties\":{\"type\":{\"const\":\"strip\"},\"field\":{\"$ref\":\"#/definitions/text\"},\"value\":{\"$ref\":\"#/definitions/text\"},\"tag\":{\"$ref\":\"#/definitions/text\"}}},{\"description\":\"箱の中の処理\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"box\",\"label\"],\"properties\":{\"type\":{\"const\":\"action\"},\"box\":{\"$ref\":\"#/definitions/id\"},\"label\":{\"$ref\":\"#/definitions/text\"}}},{\"description\":\"箱の下の小さな字の書き換え\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"box\",\"text\"],\"properties\":{\"type\":{\"const\":\"swap\"},\"box\":{\"$ref\":\"#/definitions/id\"},\"text\":{\"$ref\":\"#/definitions/text\"},\"color\":{\"description\":\"時間軸の図の節目の丸の色\",\"$ref\":\"#/definitions/color\"}}},{\"description\":\"線。運ぶ物を載せて送る側から受ける側へ走る\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"from\",\"to\",\"carry\"],\"properties\":{\"type\":{\"const\":\"edge\"},\"from\":{\"$ref\":\"#/definitions/id\"},\"to\":{\"$ref\":\"#/definitions/id\"},\"label\":{\"$ref\":\"#/definitions/text\"},\"carry\":{\"$ref\":\"#/definitions/carry\"},\"labelSide\":{\"description\":\"線の名前を置く側 (寄せの指示)\",\"enum\":[\"above\",\"below\",\"left\",\"right\"]},\"at\":{\"description\":\"時間軸の図の拡大の帯で、線を引く列の目盛り\",\"$ref\":\"#/definitions/unit\"},\"into\":{\"description\":\"時間軸の図の拡大の帯で、受ける箱を選ぶ列の目盛り。書かなければ at の列\",\"$ref\":\"#/definitions/unit\"}}},{\"description\":\"時間軸の図の今の時刻の針を、to の目盛りの終わりまで進める\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"to\"],\"properties\":{\"type\":{\"const\":\"now\"},\"to\":{\"$ref\":\"#/definitions/unit\"}}},{\"description\":\"時間軸の図の from から to の目盛りに、括弧と字を出す。shape が box なら印の列を囲み、字を縁の札にする\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"from\",\"to\",\"text\"],\"properties\":{\"type\":{\"const\":\"span\"},\"from\":{\"$ref\":\"#/definitions/unit\"},\"to\":{\"$ref\":\"#/definitions/unit\"},\"text\":{\"$ref\":\"#/definitions/text\"},\"shape\":{\"enum\":[\"box\"]},\"color\":{\"$ref\":\"#/definitions/color\"}}},{\"description\":\"時間軸の図の印の列 row の、from から to の目盛りの印の色を変える\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"row\",\"from\",\"to\",\"color\"],\"properties\":{\"type\":{\"const\":\"mark\"},\"row\":{\"$ref\":\"#/definitions/id\"},\"from\":{\"$ref\":\"#/definitions/unit\"},\"to\":{\"$ref\":\"#/definitions/unit\"},\"color\":{\"$ref\":\"#/definitions/color\"}}},{\"description\":\"葉を出す。木の図だけが書ける。書いた段で葉の箱が現れる。hash を書くと箱に値を出し、名札を葉の下の札に出す\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"id\"],\"properties\":{\"type\":{\"const\":\"leaf\"},\"id\":{\"$ref\":\"#/definitions/id\"},\"hash\":{\"$ref\":\"#/definitions/hash\"}}},{\"description\":\"1 つ以上の子から親を組む。木の図だけが書ける。書いた段で親の箱と、子から親への木の線が現れる\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"id\",\"children\"],\"properties\":{\"type\":{\"const\":\"node\"},\"id\":{\"$ref\":\"#/definitions/id\"},\"children\":{\"type\":\"array\",\"minItems\":1,\"items\":{\"$ref\":\"#/definitions/id\"}},\"hash\":{\"$ref\":\"#/definitions/hash\"}}},{\"description\":\"列の図では列 box の並びを items に書き換える。チップは前に居た列から滑り、どの列にも居なかったチップは弾んで現れ、列から外れたチップは消える。試す図では、待ち行列 part の中身を items の並びにするか、機械の列 part に items を入れた新しいブロックを足す。列の図と試す図だけが書ける\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"items\"],\"properties\":{\"type\":{\"const\":\"line\"},\"box\":{\"$ref\":\"#/definitions/id\"},\"part\":{\"$ref\":\"#/definitions/id\"},\"items\":{\"type\":\"array\",\"minItems\":1,\"maxItems\":12,\"items\":{\"$ref\":\"#/definitions/id\"}}}},{\"description\":\"列 box に封をして、チップを隠す。列の図だけが書ける\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"box\"],\"properties\":{\"type\":{\"const\":\"seal\"},\"box\":{\"$ref\":\"#/definitions/id\"}}},{\"description\":\"列 box の封を開ける。列の図だけが書ける\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"box\"],\"properties\":{\"type\":{\"const\":\"open\"},\"box\":{\"$ref\":\"#/definitions/id\"}}},{\"description\":\"列 box を選ぶ。列の図だけが書ける。列の縁に色が付き、ほかの列が薄くなる\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"box\"],\"properties\":{\"type\":{\"const\":\"pick\"},\"box\":{\"$ref\":\"#/definitions/id\"}}},{\"description\":\"列 box の右に text の札を押す。列の図だけが書ける\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"box\",\"text\"],\"properties\":{\"type\":{\"const\":\"stamp\"},\"box\":{\"$ref\":\"#/definitions/id\"},\"text\":{\"$ref\":\"#/definitions/text\"}}},{\"description\":\"この段で役 role が動く。列の図だけが書ける。役の札の縁が光る\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"role\"],\"properties\":{\"type\":{\"const\":\"role\"},\"role\":{\"$ref\":\"#/definitions/id\"}}},{\"description\":\"入力の帯の欄の値 values (欄の順) でチップを作って送る。試す図だけが書ける。書き手の例として読み手の送る操作を書く\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"values\"],\"properties\":{\"type\":{\"const\":\"ask\"},\"values\":{\"type\":\"array\",\"minItems\":1,\"items\":{\"$ref\":\"#/definitions/text\"}}}},{\"description\":\"チップ item の欄の値を values に書き換える。試す図だけが書ける。読み手の書き換えと同じ\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"item\",\"values\"],\"properties\":{\"type\":{\"const\":\"item\"},\"item\":{\"$ref\":\"#/definitions/id\"},\"values\":{\"$ref\":\"#/definitions/tryValues\"}}},{\"description\":\"釦 press を押す。試す図だけが書ける。釦の待ち行列の上からチップを取り出し、機械の列の新しいブロックへ移す\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"press\"],\"properties\":{\"type\":{\"const\":\"press\"},\"press\":{\"$ref\":\"#/definitions/id\"}}}]},\"hash\":{\"description\":\"commit と木の箱の hash。16 進の字で 4 から 40 字\",\"type\":\"string\",\"pattern\":\"^[0-9a-f]{4,40}$\"},\"unit\":{\"description\":\"目盛りの位置。0 から数える\",\"type\":\"integer\",\"minimum\":0},\"notTryEvent\":{\"description\":\"試す図だけが書ける出来事を書けない\",\"not\":{\"required\":[\"type\"],\"properties\":{\"type\":{\"enum\":[\"ask\",\"press\",\"item\"]}}}},\"trySteps\":{\"description\":\"試す図の段。line と ask と press と item だけを書け、line は列 (box) でなく部品 (part) を名指す\",\"items\":{\"properties\":{\"events\":{\"items\":{\"properties\":{\"type\":{\"enum\":[\"line\",\"ask\",\"press\",\"item\"]},\"box\":{\"$ref\":\"#/definitions/absent\"}},\"if\":{\"required\":[\"type\"],\"properties\":{\"type\":{\"const\":\"line\"}}},\"then\":{\"required\":[\"part\"]}}}}}},\"part\":{\"description\":\"試す図の部品。網 (route)、待ち行列 (queue)、機械の列 (chain)、入力の帯 (ask)、釦 (press)\",\"type\":\"object\",\"required\":[\"type\"],\"discriminator\":{\"propertyName\":\"type\"},\"oneOf\":[{\"description\":\"網。paths は - でつないだ節の並びで、from の節から to の節へ最短の道でチップを運ぶ\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"id\",\"paths\",\"from\",\"to\"],\"properties\":{\"type\":{\"const\":\"route\"},\"id\":{\"$ref\":\"#/definitions/id\"},\"paths\":{\"type\":\"array\",\"minItems\":1,\"items\":{\"type\":\"array\",\"minItems\":2,\"items\":{\"$ref\":\"#/definitions/id\"}}},\"from\":{\"$ref\":\"#/definitions/id\"},\"to\":{\"$ref\":\"#/definitions/id\"}}},{\"description\":\"待ち行列。order の欄の値の高い順 (同じ値は入った順) にチップを上から並べる。order を書かなければ入った順\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"id\"],\"properties\":{\"type\":{\"const\":\"queue\"},\"id\":{\"$ref\":\"#/definitions/id\"},\"order\":{\"$ref\":\"#/definitions/id\"}}},{\"description\":\"機械の列 (ブロックの鎖)。edit を書いた時だけ、読み手がブロックの中のチップのその欄を書き換えられる\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"id\"],\"properties\":{\"type\":{\"const\":\"chain\"},\"id\":{\"$ref\":\"#/definitions/id\"},\"edit\":{\"$ref\":\"#/definitions/id\"}}},{\"description\":\"入力の帯。図に 1 つまでで、id は常に ask。最初の欄の値がチップの名前になる。into の待ち行列へ、via の網を通って送る\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"id\",\"fields\",\"into\"],\"properties\":{\"type\":{\"const\":\"ask\"},\"id\":{\"const\":\"ask\"},\"fields\":{\"type\":\"array\",\"minItems\":2,\"items\":{\"$ref\":\"#/definitions/id\"}},\"into\":{\"$ref\":\"#/definitions/id\"},\"via\":{\"$ref\":\"#/definitions/id\"}}},{\"description\":\"釦。from の待ち行列の上から take 件を、into の機械の列の新しいブロックへ移す。at は釦を置く部品 (書かなければ入力の帯)\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"id\",\"from\",\"into\",\"take\"],\"properties\":{\"type\":{\"const\":\"press\"},\"id\":{\"$ref\":\"#/definitions/id\"},\"from\":{\"$ref\":\"#/definitions/id\"},\"into\":{\"$ref\":\"#/definitions/id\"},\"take\":{\"type\":\"integer\",\"minimum\":1},\"at\":{\"$ref\":\"#/definitions/id\"}}}]},\"tryItem\":{\"description\":\"試す図のチップ。名札がチップの名前 (入力の帯の最初の欄の値) になり、values の鍵は入力の帯の残りの欄\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"id\",\"values\"],\"properties\":{\"id\":{\"$ref\":\"#/definitions/id\"},\"values\":{\"$ref\":\"#/definitions/tryValues\"}}},\"tryValues\":{\"description\":\"チップの欄の値。鍵は入力の帯の欄で、値は字\",\"type\":\"object\",\"additionalProperties\":{\"$ref\":\"#/definitions/text\"}},\"branch\":{\"description\":\"枝。帯の左に名札と添え書きを置く\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"id\"],\"properties\":{\"id\":{\"$ref\":\"#/definitions/id\"},\"note\":{\"$ref\":\"#/definitions/text\"}}},\"region\":{\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"id\",\"name\"],\"properties\":{\"id\":{\"$ref\":\"#/definitions/id\"},\"name\":{\"$ref\":\"#/definitions/text\"},\"note\":{\"$ref\":\"#/definitions/text\"},\"color\":{\"$ref\":\"#/definitions/color\"},\"icon\":{\"$ref\":\"#/definitions/icon\"}}},\"box\":{\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"id\",\"name\"],\"properties\":{\"id\":{\"$ref\":\"#/definitions/id\"},\"name\":{\"$ref\":\"#/definitions/text\"},\"sub\":{\"$ref\":\"#/definitions/text\"},\"color\":{\"$ref\":\"#/definitions/color\"},\"icon\":{\"$ref\":\"#/definitions/icon\"},\"region\":{\"$ref\":\"#/definitions/id\"},\"link\":{\"description\":\"飛び先。描いた図ではこの箱がここへの link になる\",\"$ref\":\"#/definitions/url\"},\"order\":{\"description\":\"列の図の箱の並べ方。none は順番の無い置き場で、チップを散らして置く。書かない箱は上から実行する札で、チップを line に書いた順に積む\",\"enum\":[\"none\"]}}},\"plainStrip\":{\"description\":\"時間軸の図でない図の中身の帯。物差しを書けない\",\"properties\":{\"meters\":{\"$ref\":\"#/definitions/absent\"}}},\"strip\":{\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"title\",\"fields\"],\"properties\":{\"title\":{\"$ref\":\"#/definitions/text\"},\"fields\":{\"type\":\"array\",\"minItems\":1,\"items\":{\"$ref\":\"#/definitions/text\"}},\"meters\":{\"description\":\"物差しにする欄。時間軸の図だけが書ける\",\"type\":\"array\",\"minItems\":1,\"items\":{\"$ref\":\"#/definitions/meter\"}}}},\"meter\":{\"description\":\"物差しの欄。line の割合の所に線を引き、set の値まで針と一緒に満ちる\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"field\",\"line\"],\"properties\":{\"field\":{\"$ref\":\"#/definitions/text\"},\"line\":{\"$ref\":\"#/definitions/ratio\"}}},\"ratio\":{\"description\":\"割合。分数 (2/3) か百分率 (97%)\",\"type\":\"string\",\"pattern\":\"^([0-9]+/[0-9]+|[0-9]+(\\\\.[0-9]+)?%)$\"},\"path\":{\"description\":\"移れる道。送る側に始まりの印 start、受ける側に終わりの印 finish を書ける。どの段にも出ない道は点線で描き、運ぶ物を走らせない\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"from\",\"to\"],\"properties\":{\"from\":{\"$ref\":\"#/definitions/id\"},\"to\":{\"$ref\":\"#/definitions/id\"},\"label\":{\"$ref\":\"#/definitions/text\"}}},\"step\":{\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"title\",\"body\",\"events\"],\"properties\":{\"title\":{\"$ref\":\"#/definitions/text\"},\"body\":{\"$ref\":\"#/definitions/text\"},\"code\":{\"$ref\":\"#/definitions/text\"},\"sources\":{\"description\":\"段の出典。読み上げの段の一覧に、名前を URL への link にして書いた順に出す\",\"type\":\"array\",\"minItems\":1,\"items\":{\"$ref\":\"#/definitions/source\"}},\"events\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/event\"}}}},\"source\":{\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"name\",\"url\"],\"properties\":{\"name\":{\"$ref\":\"#/definitions/text\"},\"url\":{\"$ref\":\"#/definitions/url\"}}},\"carry\":{\"description\":\"線の上を走る物。封筒 (メッセージや要求)、札 (名前のある値)、硬貨 (価値)、無し\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"kind\"],\"properties\":{\"kind\":{\"enum\":[\"envelope\",\"tag\",\"coin\",\"none\"]},\"text\":{\"$ref\":\"#/definitions/text\"}},\"if\":{\"required\":[\"kind\"],\"properties\":{\"kind\":{\"const\":\"tag\"}}},\"then\":{\"required\":[\"text\"]},\"else\":{\"not\":{\"required\":[\"text\"]}}},\"color\":{\"enum\":[\"blue\",\"amber\",\"green\",\"violet\",\"rose\",\"slate\",\"coin\"]},\"icon\":{\"description\":\"箱と区画のアイコン名。描く部品のアイコンの表 (ICONS) に在る名前だけ\",\"enum\":[\"app\",\"router\",\"on\",\"off\",\"pool\",\"db\",\"exe\",\"idx\",\"sign\",\"env\",\"lock\",\"check\",\"flag\",\"x\",\"chain\",\"net\",\"user\",\"server\",\"key\",\"shield\",\"globe\",\"bolt\",\"doc\",\"box\",\"truck\",\"card\",\"cart\",\"clock\",\"branch\",\"cloud\",\"refresh\",\"undo\",\"yen\",\"layers\",\"code\",\"paint\",\"tree\",\"block\"]},\"url\":{\"description\":\"頁を移る形。/ で始まる path か、http:// か https:// で始まる URL\",\"type\":\"string\",\"pattern\":\"^(/|https?://)\"},\"scale\":{\"description\":\"目盛り。unit の名前の目盛りを length の長さで count 個並べ、最初の目盛りの番号を from にする\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"unit\",\"length\",\"count\"],\"properties\":{\"unit\":{\"$ref\":\"#/definitions/text\"},\"length\":{\"$ref\":\"#/definitions/duration\"},\"count\":{\"type\":\"integer\",\"minimum\":1},\"from\":{\"type\":\"integer\",\"minimum\":0}}},\"duration\":{\"description\":\"長さ。数と単位 (ms、s、min、h、d) の組\",\"type\":\"string\",\"pattern\":\"^[0-9]+(\\\\.[0-9]+)?(ms|s|min|h|d)$\"},\"period\":{\"description\":\"区切り。目盛り length 個ごとに name の区切りを置き、最初の区切りの番号を from にする\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"name\",\"length\"],\"properties\":{\"name\":{\"$ref\":\"#/definitions/text\"},\"length\":{\"type\":\"integer\",\"minimum\":1},\"from\":{\"type\":\"integer\",\"minimum\":0}}},\"row\":{\"description\":\"印の列。目盛りごとに印を 1 つ置き、empty の目盛りは空きの印にする\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"id\",\"name\"],\"properties\":{\"id\":{\"$ref\":\"#/definitions/id\"},\"name\":{\"$ref\":\"#/definitions/text\"},\"color\":{\"$ref\":\"#/definitions/color\"},\"empty\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/unit\"}}}},\"point\":{\"description\":\"節目。at の目盛りの印の下に旗の丸と名札を置く\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"id\",\"at\"],\"properties\":{\"id\":{\"$ref\":\"#/definitions/id\"},\"at\":{\"$ref\":\"#/definitions/unit\"}}},\"zoom\":{\"description\":\"拡大の範囲。from から to の目盛りごとに拡大の帯に列を作る\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"from\",\"to\"],\"properties\":{\"from\":{\"$ref\":\"#/definitions/unit\"},\"to\":{\"$ref\":\"#/definitions/unit\"}}},\"item\":{\"description\":\"チップ。color を書かないチップは薄い色で、label を書かないチップは名前を出す。note を書いたチップは図の下の凡例にその説明を出す\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"id\"],\"properties\":{\"id\":{\"$ref\":\"#/definitions/id\"},\"color\":{\"$ref\":\"#/definitions/color\"},\"label\":{\"description\":\"チップに載せる字\",\"type\":\"string\",\"minLength\":1,\"maxLength\":4},\"note\":{\"description\":\"図の下の凡例に出す、チップの説明\",\"$ref\":\"#/definitions/text\"}}},\"role\":{\"description\":\"役。チップを持たずに動く者で、箱の上に札として並び、段の中の role の出来事で光る\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"id\"],\"properties\":{\"id\":{\"$ref\":\"#/definitions/id\"},\"note\":{\"description\":\"役の札の名前の下の一言\",\"$ref\":\"#/definitions/text\"}}}}};const schema12 = {\"description\":\"この図の種類では書けない欄\",\"not\":{}};const schema103 = {\"type\":\"string\",\"minLength\":1};const schema13 = {\"description\":\"時間軸の図でない図の中身の帯。物差しを書けない\",\"properties\":{\"meters\":{\"$ref\":\"#/definitions/absent\"}}};function validate11(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.meters !== undefined){const err0 = {instancePath:instancePath+\"/meters\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}}validate11.errors = vErrors;return errors === 0;}const schema25 = {\"description\":\"枝分かれの図でも時間軸の図でも木の図でも列の図でもない図の段。枝分かれの図だけの出来事 (commit と branch) と、時間軸の図だけの出来事 (now と mark と span) と欄 (at と into と color) と、木の図だけの出来事 (leaf と node) と、列の図だけの出来事 (line と seal と open と pick と stamp と role) と、試す図だけの出来事 (ask と press と item) を書けない\",\"items\":{\"properties\":{\"events\":{\"items\":{\"not\":{\"$ref\":\"#/definitions/timeEvent\"},\"allOf\":[{\"not\":{\"$ref\":\"#/definitions/treeEvent\"}},{\"$ref\":\"#/definitions/notLineupEvent\"},{\"$ref\":\"#/definitions/notTryEvent\"}],\"properties\":{\"type\":{\"not\":{\"enum\":[\"commit\",\"branch\"]}},\"at\":{\"$ref\":\"#/definitions/absent\"},\"into\":{\"$ref\":\"#/definitions/absent\"},\"color\":{\"$ref\":\"#/definitions/absent\"}}}}}}};const schema26 = {\"description\":\"時間軸の図だけが書ける出来事\",\"required\":[\"type\"],\"properties\":{\"type\":{\"enum\":[\"now\",\"mark\",\"span\"]}}};const schema27 = {\"description\":\"木の図だけが書ける出来事\",\"required\":[\"type\"],\"properties\":{\"type\":{\"enum\":[\"leaf\",\"node\"]}}};const schema28 = {\"description\":\"列の図だけが書ける出来事を書けない\",\"not\":{\"required\":[\"type\"],\"properties\":{\"type\":{\"enum\":[\"line\",\"seal\",\"open\",\"pick\",\"stamp\",\"role\"]}}}};const schema29 = {\"description\":\"試す図だけが書ける出来事を書けない\",\"not\":{\"required\":[\"type\"],\"properties\":{\"type\":{\"enum\":[\"ask\",\"press\",\"item\"]}}}};function validate13(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(Array.isArray(data)){const len0 = data.length;for(let i0=0; i0<len0; i0++){let data0 = data[i0];if(data0 && typeof data0 == \"object\" && !Array.isArray(data0)){if(data0.events !== undefined){let data1 = data0.events;if(Array.isArray(data1)){const len1 = data1.length;for(let i1=0; i1<len1; i1++){let data2 = data1[i1];const _errs3 = errors;const _errs4 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){let missing0;if((data2.type === undefined) && (missing0 = \"type\")){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data2.type !== undefined){let data3 = data2.type;if(!(((data3 === \"now\") || (data3 === \"mark\")) || (data3 === \"span\"))){const err1 = {};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}}}var valid5 = _errs4 === errors;if(valid5){const err2 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/items/properties/events/items/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}else {errors = _errs3;if(vErrors !== null){if(_errs3){vErrors.length = _errs3;}else {vErrors = null;}}}const _errs8 = errors;const _errs9 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){let missing1;if((data2.type === undefined) && (missing1 = \"type\")){const err3 = {};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}else {if(data2.type !== undefined){let data4 = data2.type;if(!((data4 === \"leaf\") || (data4 === \"node\"))){const err4 = {};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}}}var valid9 = _errs9 === errors;if(valid9){const err5 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/items/properties/events/items/allOf/0/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}else {errors = _errs8;if(vErrors !== null){if(_errs8){vErrors.length = _errs8;}else {vErrors = null;}}}const _errs14 = errors;const _errs15 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){let missing2;if((data2.type === undefined) && (missing2 = \"type\")){const err6 = {};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {if(data2.type !== undefined){let data5 = data2.type;if(!((((((data5 === \"line\") || (data5 === \"seal\")) || (data5 === \"open\")) || (data5 === \"pick\")) || (data5 === \"stamp\")) || (data5 === \"role\"))){const err7 = {};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}}}var valid13 = _errs15 === errors;if(valid13){const err8 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/definitions/notLineupEvent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}else {errors = _errs14;if(vErrors !== null){if(_errs14){vErrors.length = _errs14;}else {vErrors = null;}}}const _errs19 = errors;const _errs20 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){let missing3;if((data2.type === undefined) && (missing3 = \"type\")){const err9 = {};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}else {if(data2.type !== undefined){let data6 = data2.type;if(!(((data6 === \"ask\") || (data6 === \"press\")) || (data6 === \"item\"))){const err10 = {};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}}}var valid16 = _errs20 === errors;if(valid16){const err11 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/definitions/notTryEvent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}else {errors = _errs19;if(vErrors !== null){if(_errs19){vErrors.length = _errs19;}else {vErrors = null;}}}if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){if(data2.type !== undefined){let data7 = data2.type;const _errs23 = errors;const _errs24 = errors;if(!((data7 === \"commit\") || (data7 === \"branch\"))){const err12 = {};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var valid19 = _errs24 === errors;if(valid19){const err13 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1+\"/type\",schemaPath:\"#/items/properties/events/items/properties/type/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}else {errors = _errs23;if(vErrors !== null){if(_errs23){vErrors.length = _errs23;}else {vErrors = null;}}}}if(data2.at !== undefined){const err14 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1+\"/at\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}if(data2.into !== undefined){const err15 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1+\"/into\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}if(data2.color !== undefined){const err16 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1+\"/color\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}}}}}}}validate13.errors = vErrors;return errors === 0;}const schema52 = {\"description\":\"枝分かれの図の段。時間軸の図だけの出来事 (now と mark と span) と欄 (at と into と color) と、木の図だけの出来事 (leaf と node) と、列の図だけの出来事 (line と seal と open と pick と stamp と role) と、試す図だけの出来事 (ask と press と item) を書けない\",\"items\":{\"properties\":{\"events\":{\"items\":{\"not\":{\"$ref\":\"#/definitions/timeEvent\"},\"allOf\":[{\"not\":{\"$ref\":\"#/definitions/treeEvent\"}},{\"$ref\":\"#/definitions/notLineupEvent\"},{\"$ref\":\"#/definitions/notTryEvent\"}],\"properties\":{\"at\":{\"$ref\":\"#/definitions/absent\"},\"into\":{\"$ref\":\"#/definitions/absent\"},\"color\":{\"$ref\":\"#/definitions/absent\"}}}}}}};function validate18(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(Array.isArray(data)){const len0 = data.length;for(let i0=0; i0<len0; i0++){let data0 = data[i0];if(data0 && typeof data0 == \"object\" && !Array.isArray(data0)){if(data0.events !== undefined){let data1 = data0.events;if(Array.isArray(data1)){const len1 = data1.length;for(let i1=0; i1<len1; i1++){let data2 = data1[i1];const _errs3 = errors;const _errs4 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){let missing0;if((data2.type === undefined) && (missing0 = \"type\")){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data2.type !== undefined){let data3 = data2.type;if(!(((data3 === \"now\") || (data3 === \"mark\")) || (data3 === \"span\"))){const err1 = {};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}}}var valid5 = _errs4 === errors;if(valid5){const err2 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/items/properties/events/items/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}else {errors = _errs3;if(vErrors !== null){if(_errs3){vErrors.length = _errs3;}else {vErrors = null;}}}const _errs8 = errors;const _errs9 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){let missing1;if((data2.type === undefined) && (missing1 = \"type\")){const err3 = {};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}else {if(data2.type !== undefined){let data4 = data2.type;if(!((data4 === \"leaf\") || (data4 === \"node\"))){const err4 = {};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}}}var valid9 = _errs9 === errors;if(valid9){const err5 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/items/properties/events/items/allOf/0/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}else {errors = _errs8;if(vErrors !== null){if(_errs8){vErrors.length = _errs8;}else {vErrors = null;}}}const _errs14 = errors;const _errs15 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){let missing2;if((data2.type === undefined) && (missing2 = \"type\")){const err6 = {};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {if(data2.type !== undefined){let data5 = data2.type;if(!((((((data5 === \"line\") || (data5 === \"seal\")) || (data5 === \"open\")) || (data5 === \"pick\")) || (data5 === \"stamp\")) || (data5 === \"role\"))){const err7 = {};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}}}var valid13 = _errs15 === errors;if(valid13){const err8 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/definitions/notLineupEvent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}else {errors = _errs14;if(vErrors !== null){if(_errs14){vErrors.length = _errs14;}else {vErrors = null;}}}const _errs19 = errors;const _errs20 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){let missing3;if((data2.type === undefined) && (missing3 = \"type\")){const err9 = {};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}else {if(data2.type !== undefined){let data6 = data2.type;if(!(((data6 === \"ask\") || (data6 === \"press\")) || (data6 === \"item\"))){const err10 = {};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}}}var valid16 = _errs20 === errors;if(valid16){const err11 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/definitions/notTryEvent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}else {errors = _errs19;if(vErrors !== null){if(_errs19){vErrors.length = _errs19;}else {vErrors = null;}}}if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){if(data2.at !== undefined){const err12 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1+\"/at\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}if(data2.into !== undefined){const err13 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1+\"/into\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}if(data2.color !== undefined){const err14 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1+\"/color\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}}}}}}}validate18.errors = vErrors;return errors === 0;}const schema66 = {\"description\":\"時間軸の図の段。枝分かれの図だけの出来事 (commit と branch) と、木の図だけの出来事 (leaf と node) と、列の図だけの出来事 (line と seal と open と pick と stamp と role) と、試す図だけの出来事 (ask と press と item) を書けない\",\"items\":{\"properties\":{\"events\":{\"items\":{\"allOf\":[{\"not\":{\"$ref\":\"#/definitions/treeEvent\"}},{\"$ref\":\"#/definitions/notLineupEvent\"},{\"$ref\":\"#/definitions/notTryEvent\"}],\"properties\":{\"type\":{\"not\":{\"enum\":[\"commit\",\"branch\"]}}}}}}}};function validate20(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(Array.isArray(data)){const len0 = data.length;for(let i0=0; i0<len0; i0++){let data0 = data[i0];if(data0 && typeof data0 == \"object\" && !Array.isArray(data0)){if(data0.events !== undefined){let data1 = data0.events;if(Array.isArray(data1)){const len1 = data1.length;for(let i1=0; i1<len1; i1++){let data2 = data1[i1];const _errs4 = errors;const _errs5 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){let missing0;if((data2.type === undefined) && (missing0 = \"type\")){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data2.type !== undefined){let data3 = data2.type;if(!((data3 === \"leaf\") || (data3 === \"node\"))){const err1 = {};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}}}var valid6 = _errs5 === errors;if(valid6){const err2 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/items/properties/events/items/allOf/0/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}else {errors = _errs4;if(vErrors !== null){if(_errs4){vErrors.length = _errs4;}else {vErrors = null;}}}const _errs10 = errors;const _errs11 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){let missing1;if((data2.type === undefined) && (missing1 = \"type\")){const err3 = {};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}else {if(data2.type !== undefined){let data4 = data2.type;if(!((((((data4 === \"line\") || (data4 === \"seal\")) || (data4 === \"open\")) || (data4 === \"pick\")) || (data4 === \"stamp\")) || (data4 === \"role\"))){const err4 = {};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}}}var valid10 = _errs11 === errors;if(valid10){const err5 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/definitions/notLineupEvent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}else {errors = _errs10;if(vErrors !== null){if(_errs10){vErrors.length = _errs10;}else {vErrors = null;}}}const _errs15 = errors;const _errs16 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){let missing2;if((data2.type === undefined) && (missing2 = \"type\")){const err6 = {};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {if(data2.type !== undefined){let data5 = data2.type;if(!(((data5 === \"ask\") || (data5 === \"press\")) || (data5 === \"item\"))){const err7 = {};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}}}var valid13 = _errs16 === errors;if(valid13){const err8 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/definitions/notTryEvent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}else {errors = _errs15;if(vErrors !== null){if(_errs15){vErrors.length = _errs15;}else {vErrors = null;}}}if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){if(data2.type !== undefined){let data6 = data2.type;const _errs19 = errors;const _errs20 = errors;if(!((data6 === \"commit\") || (data6 === \"branch\"))){const err9 = {};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var valid16 = _errs20 === errors;if(valid16){const err10 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1+\"/type\",schemaPath:\"#/items/properties/events/items/properties/type/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}else {errors = _errs19;if(vErrors !== null){if(_errs19){vErrors.length = _errs19;}else {vErrors = null;}}}}}}}}}}}validate20.errors = vErrors;return errors === 0;}const schema81 = {\"description\":\"木の図の段。枝分かれの図だけの出来事 (commit と branch) と、時間軸の図だけの出来事 (now と mark と span) と欄 (at と into と color) と、列の図だけの出来事 (line と seal と open と pick と stamp と role) と、試す図だけの出来事 (ask と press と item) を書けない\",\"items\":{\"properties\":{\"events\":{\"items\":{\"not\":{\"$ref\":\"#/definitions/timeEvent\"},\"allOf\":[{\"$ref\":\"#/definitions/notLineupEvent\"},{\"$ref\":\"#/definitions/notTryEvent\"}],\"properties\":{\"type\":{\"not\":{\"enum\":[\"commit\",\"branch\"]}},\"at\":{\"$ref\":\"#/definitions/absent\"},\"into\":{\"$ref\":\"#/definitions/absent\"},\"color\":{\"$ref\":\"#/definitions/absent\"}}}}}}};function validate23(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(Array.isArray(data)){const len0 = data.length;for(let i0=0; i0<len0; i0++){let data0 = data[i0];if(data0 && typeof data0 == \"object\" && !Array.isArray(data0)){if(data0.events !== undefined){let data1 = data0.events;if(Array.isArray(data1)){const len1 = data1.length;for(let i1=0; i1<len1; i1++){let data2 = data1[i1];const _errs3 = errors;const _errs4 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){let missing0;if((data2.type === undefined) && (missing0 = \"type\")){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data2.type !== undefined){let data3 = data2.type;if(!(((data3 === \"now\") || (data3 === \"mark\")) || (data3 === \"span\"))){const err1 = {};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}}}var valid5 = _errs4 === errors;if(valid5){const err2 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/items/properties/events/items/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}else {errors = _errs3;if(vErrors !== null){if(_errs3){vErrors.length = _errs3;}else {vErrors = null;}}}const _errs9 = errors;const _errs10 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){let missing1;if((data2.type === undefined) && (missing1 = \"type\")){const err3 = {};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}else {if(data2.type !== undefined){let data4 = data2.type;if(!((((((data4 === \"line\") || (data4 === \"seal\")) || (data4 === \"open\")) || (data4 === \"pick\")) || (data4 === \"stamp\")) || (data4 === \"role\"))){const err4 = {};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}}}var valid10 = _errs10 === errors;if(valid10){const err5 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/definitions/notLineupEvent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}else {errors = _errs9;if(vErrors !== null){if(_errs9){vErrors.length = _errs9;}else {vErrors = null;}}}const _errs14 = errors;const _errs15 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){let missing2;if((data2.type === undefined) && (missing2 = \"type\")){const err6 = {};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {if(data2.type !== undefined){let data5 = data2.type;if(!(((data5 === \"ask\") || (data5 === \"press\")) || (data5 === \"item\"))){const err7 = {};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}}}var valid13 = _errs15 === errors;if(valid13){const err8 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/definitions/notTryEvent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}else {errors = _errs14;if(vErrors !== null){if(_errs14){vErrors.length = _errs14;}else {vErrors = null;}}}if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){if(data2.type !== undefined){let data6 = data2.type;const _errs18 = errors;const _errs19 = errors;if(!((data6 === \"commit\") || (data6 === \"branch\"))){const err9 = {};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var valid16 = _errs19 === errors;if(valid16){const err10 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1+\"/type\",schemaPath:\"#/items/properties/events/items/properties/type/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}else {errors = _errs18;if(vErrors !== null){if(_errs18){vErrors.length = _errs18;}else {vErrors = null;}}}}if(data2.at !== undefined){const err11 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1+\"/at\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}if(data2.into !== undefined){const err12 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1+\"/into\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}if(data2.color !== undefined){const err13 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1+\"/color\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}}}}}}}validate23.errors = vErrors;return errors === 0;}const schema100 = {\"description\":\"チップ。color を書かないチップは薄い色で、label を書かないチップは名前を出す。note を書いたチップは図の下の凡例にその説明を出す\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"id\"],\"properties\":{\"id\":{\"$ref\":\"#/definitions/id\"},\"color\":{\"$ref\":\"#/definitions/color\"},\"label\":{\"description\":\"チップに載せる字\",\"type\":\"string\",\"minLength\":1,\"maxLength\":4},\"note\":{\"description\":\"図の下の凡例に出す、チップの説明\",\"$ref\":\"#/definitions/text\"}}};const schema101 = {\"type\":\"string\",\"pattern\":\"^[^\\\\s\\\\[\\\\]「」=:]+$\"};const schema102 = {\"enum\":[\"blue\",\"amber\",\"green\",\"violet\",\"rose\",\"slate\",\"coin\"]};const pattern0 = new RegExp(\"^[^\\\\s\\\\[\\\\]「」=:]+$\", \"u\");const func2 = ucs2length;function validate26(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"id\"},message:\"must have required property '\"+\"id\"+\"'\"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}for(const key0 in data){if(!((((key0 === \"id\") || (key0 === \"color\")) || (key0 === \"label\")) || (key0 === \"note\"))){const err1 = {instancePath,schemaPath:\"#/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key0},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.id !== undefined){let data0 = data.id;if(typeof data0 === \"string\"){if(!pattern0.test(data0)){const err2 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}else {const err3 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.color !== undefined){let data1 = data.color;if(!(((((((data1 === \"blue\") || (data1 === \"amber\")) || (data1 === \"green\")) || (data1 === \"violet\")) || (data1 === \"rose\")) || (data1 === \"slate\")) || (data1 === \"coin\"))){const err4 = {instancePath:instancePath+\"/color\",schemaPath:\"#/definitions/color/enum\",keyword:\"enum\",params:{allowedValues: schema102.enum},message:\"must be equal to one of the allowed values\"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.label !== undefined){let data2 = data.label;if(typeof data2 === \"string\"){if(func2(data2) > 4){const err5 = {instancePath:instancePath+\"/label\",schemaPath:\"#/properties/label/maxLength\",keyword:\"maxLength\",params:{limit: 4},message:\"must NOT have more than 4 characters\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(func2(data2) < 1){const err6 = {instancePath:instancePath+\"/label\",schemaPath:\"#/properties/label/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}else {const err7 = {instancePath:instancePath+\"/label\",schemaPath:\"#/properties/label/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.note !== undefined){let data3 = data.note;if(typeof data3 === \"string\"){if(func2(data3) < 1){const err8 = {instancePath:instancePath+\"/note\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}else {const err9 = {instancePath:instancePath+\"/note\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}}else {const err10 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}validate26.errors = vErrors;return errors === 0;}const schema104 = {\"description\":\"列の図の段。線と処理と、枝分かれの図だけの出来事 (commit と branch) と、時間軸の図だけの出来事 (now と mark と span) と欄 (color) と、木の図だけの出来事 (leaf と node) と、試す図だけの出来事 (ask と press と item) を書けない\",\"items\":{\"properties\":{\"events\":{\"items\":{\"not\":{\"$ref\":\"#/definitions/timeEvent\"},\"allOf\":[{\"not\":{\"$ref\":\"#/definitions/treeEvent\"}},{\"$ref\":\"#/definitions/notWiredEvent\"},{\"$ref\":\"#/definitions/notTryEvent\"}],\"properties\":{\"type\":{\"not\":{\"enum\":[\"commit\",\"branch\"]}},\"color\":{\"$ref\":\"#/definitions/absent\"},\"part\":{\"$ref\":\"#/definitions/absent\"}},\"if\":{\"required\":[\"type\"],\"properties\":{\"type\":{\"const\":\"line\"}}},\"then\":{\"required\":[\"box\"]}}}}}};const schema107 = {\"description\":\"箱と線の図の出来事を書けない\",\"not\":{\"required\":[\"type\"],\"properties\":{\"type\":{\"enum\":[\"edge\",\"action\"]}}}};function validate28(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(Array.isArray(data)){const len0 = data.length;for(let i0=0; i0<len0; i0++){let data0 = data[i0];if(data0 && typeof data0 == \"object\" && !Array.isArray(data0)){if(data0.events !== undefined){let data1 = data0.events;if(Array.isArray(data1)){const len1 = data1.length;for(let i1=0; i1<len1; i1++){let data2 = data1[i1];const _errs3 = errors;const _errs4 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){let missing0;if((data2.type === undefined) && (missing0 = \"type\")){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data2.type !== undefined){let data3 = data2.type;if(!(((data3 === \"now\") || (data3 === \"mark\")) || (data3 === \"span\"))){const err1 = {};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}}}var valid5 = _errs4 === errors;if(valid5){const err2 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/items/properties/events/items/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}else {errors = _errs3;if(vErrors !== null){if(_errs3){vErrors.length = _errs3;}else {vErrors = null;}}}const _errs8 = errors;const _errs9 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){let missing1;if((data2.type === undefined) && (missing1 = \"type\")){const err3 = {};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}else {if(data2.type !== undefined){let data4 = data2.type;if(!((data4 === \"leaf\") || (data4 === \"node\"))){const err4 = {};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}}}var valid9 = _errs9 === errors;if(valid9){const err5 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/items/properties/events/items/allOf/0/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}else {errors = _errs8;if(vErrors !== null){if(_errs8){vErrors.length = _errs8;}else {vErrors = null;}}}const _errs14 = errors;const _errs15 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){let missing2;if((data2.type === undefined) && (missing2 = \"type\")){const err6 = {};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {if(data2.type !== undefined){let data5 = data2.type;if(!((data5 === \"edge\") || (data5 === \"action\"))){const err7 = {};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}}}var valid13 = _errs15 === errors;if(valid13){const err8 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/definitions/notWiredEvent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}else {errors = _errs14;if(vErrors !== null){if(_errs14){vErrors.length = _errs14;}else {vErrors = null;}}}const _errs19 = errors;const _errs20 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){let missing3;if((data2.type === undefined) && (missing3 = \"type\")){const err9 = {};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}else {if(data2.type !== undefined){let data6 = data2.type;if(!(((data6 === \"ask\") || (data6 === \"press\")) || (data6 === \"item\"))){const err10 = {};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}}}var valid16 = _errs20 === errors;if(valid16){const err11 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/definitions/notTryEvent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}else {errors = _errs19;if(vErrors !== null){if(_errs19){vErrors.length = _errs19;}else {vErrors = null;}}}const _errs22 = errors;let valid18 = true;const _errs23 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){let missing4;if((data2.type === undefined) && (missing4 = \"type\")){const err12 = {};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}else {if(data2.type !== undefined){if(\"line\" !== data2.type){const err13 = {};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}}}var _valid0 = _errs23 === errors;errors = _errs22;if(vErrors !== null){if(_errs22){vErrors.length = _errs22;}else {vErrors = null;}}if(_valid0){const _errs25 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){if(data2.box === undefined){const err14 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/items/properties/events/items/then/required\",keyword:\"required\",params:{missingProperty: \"box\"},message:\"must have required property '\"+\"box\"+\"'\"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}var _valid0 = _errs25 === errors;valid18 = _valid0;}if(!valid18){const err15 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/items/properties/events/items/if\",keyword:\"if\",params:{failingKeyword: \"then\"},message:\"must match \\\"then\\\" schema\"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){if(data2.type !== undefined){let data8 = data2.type;const _errs27 = errors;const _errs28 = errors;if(!((data8 === \"commit\") || (data8 === \"branch\"))){const err16 = {};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}var valid21 = _errs28 === errors;if(valid21){const err17 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1+\"/type\",schemaPath:\"#/items/properties/events/items/properties/type/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}else {errors = _errs27;if(vErrors !== null){if(_errs27){vErrors.length = _errs27;}else {vErrors = null;}}}}if(data2.color !== undefined){const err18 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1+\"/color\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}if(data2.part !== undefined){const err19 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1+\"/part\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}}}}}}}validate28.errors = vErrors;return errors === 0;}const schema111 = {\"description\":\"試す図のチップ。名札がチップの名前 (入力の帯の最初の欄の値) になり、values の鍵は入力の帯の残りの欄\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"id\",\"values\"],\"properties\":{\"id\":{\"$ref\":\"#/definitions/id\"},\"values\":{\"$ref\":\"#/definitions/tryValues\"}}};const schema113 = {\"description\":\"チップの欄の値。鍵は入力の帯の欄で、値は字\",\"type\":\"object\",\"additionalProperties\":{\"$ref\":\"#/definitions/text\"}};function validate31(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == \"object\" && !Array.isArray(data)){for(const key0 in data){let data0 = data[key0];if(typeof data0 === \"string\"){if(func2(data0) < 1){const err0 = {instancePath:instancePath+\"/\" + key0.replace(/~/g, \"~0\").replace(/\\//g, \"~1\"),schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}}else {const err1 = {instancePath:instancePath+\"/\" + key0.replace(/~/g, \"~0\").replace(/\\//g, \"~1\"),schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}}else {const err2 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}validate31.errors = vErrors;return errors === 0;}function validate30(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"id\"},message:\"must have required property '\"+\"id\"+\"'\"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.values === undefined){const err1 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"values\"},message:\"must have required property '\"+\"values\"+\"'\"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === \"id\") || (key0 === \"values\"))){const err2 = {instancePath,schemaPath:\"#/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key0},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.id !== undefined){let data0 = data.id;if(typeof data0 === \"string\"){if(!pattern0.test(data0)){const err3 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}else {const err4 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.values !== undefined){if(!(validate31(data.values, {instancePath:instancePath+\"/values\",parentData:data,parentDataProperty:\"values\",rootData}))){vErrors = vErrors === null ? validate31.errors : vErrors.concat(validate31.errors);errors = vErrors.length;}}}else {const err5 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}validate30.errors = vErrors;return errors === 0;}const schema126 = {\"description\":\"試す図の段。line と ask と press と item だけを書け、line は列 (box) でなく部品 (part) を名指す\",\"items\":{\"properties\":{\"events\":{\"items\":{\"properties\":{\"type\":{\"enum\":[\"line\",\"ask\",\"press\",\"item\"]},\"box\":{\"$ref\":\"#/definitions/absent\"}},\"if\":{\"required\":[\"type\"],\"properties\":{\"type\":{\"const\":\"line\"}}},\"then\":{\"required\":[\"part\"]}}}}}};function validate34(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(Array.isArray(data)){const len0 = data.length;for(let i0=0; i0<len0; i0++){let data0 = data[i0];if(data0 && typeof data0 == \"object\" && !Array.isArray(data0)){if(data0.events !== undefined){let data1 = data0.events;if(Array.isArray(data1)){const len1 = data1.length;for(let i1=0; i1<len1; i1++){let data2 = data1[i1];const _errs3 = errors;let valid5 = true;const _errs4 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){let missing0;if((data2.type === undefined) && (missing0 = \"type\")){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data2.type !== undefined){if(\"line\" !== data2.type){const err1 = {};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}}}var _valid0 = _errs4 === errors;errors = _errs3;if(vErrors !== null){if(_errs3){vErrors.length = _errs3;}else {vErrors = null;}}if(_valid0){const _errs6 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){if(data2.part === undefined){const err2 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/items/properties/events/items/then/required\",keyword:\"required\",params:{missingProperty: \"part\"},message:\"must have required property '\"+\"part\"+\"'\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}var _valid0 = _errs6 === errors;valid5 = _valid0;}if(!valid5){const err3 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/items/properties/events/items/if\",keyword:\"if\",params:{failingKeyword: \"then\"},message:\"must match \\\"then\\\" schema\"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){if(data2.type !== undefined){let data4 = data2.type;if(!((((data4 === \"line\") || (data4 === \"ask\")) || (data4 === \"press\")) || (data4 === \"item\"))){const err4 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1+\"/type\",schemaPath:\"#/items/properties/events/items/properties/type/enum\",keyword:\"enum\",params:{allowedValues: schema126.items.properties.events.items.properties.type.enum},message:\"must be equal to one of the allowed values\"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data2.box !== undefined){const err5 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1+\"/box\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}}}}}}}validate34.errors = vErrors;return errors === 0;}const schema139 = {\"description\":\"枝。帯の左に名札と添え書きを置く\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"id\"],\"properties\":{\"id\":{\"$ref\":\"#/definitions/id\"},\"note\":{\"$ref\":\"#/definitions/text\"}}};function validate38(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"id\"},message:\"must have required property '\"+\"id\"+\"'\"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}for(const key0 in data){if(!((key0 === \"id\") || (key0 === \"note\"))){const err1 = {instancePath,schemaPath:\"#/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key0},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.id !== undefined){let data0 = data.id;if(typeof data0 === \"string\"){if(!pattern0.test(data0)){const err2 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}else {const err3 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.note !== undefined){let data1 = data.note;if(typeof data1 === \"string\"){if(func2(data1) < 1){const err4 = {instancePath:instancePath+\"/note\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}else {const err5 = {instancePath:instancePath+\"/note\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}}else {const err6 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}validate38.errors = vErrors;return errors === 0;}const schema142 = {\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"id\",\"name\"],\"properties\":{\"id\":{\"$ref\":\"#/definitions/id\"},\"name\":{\"$ref\":\"#/definitions/text\"},\"note\":{\"$ref\":\"#/definitions/text\"},\"color\":{\"$ref\":\"#/definitions/color\"},\"icon\":{\"$ref\":\"#/definitions/icon\"}}};const schema147 = {\"description\":\"箱と区画のアイコン名。描く部品のアイコンの表 (ICONS) に在る名前だけ\",\"enum\":[\"app\",\"router\",\"on\",\"off\",\"pool\",\"db\",\"exe\",\"idx\",\"sign\",\"env\",\"lock\",\"check\",\"flag\",\"x\",\"chain\",\"net\",\"user\",\"server\",\"key\",\"shield\",\"globe\",\"bolt\",\"doc\",\"box\",\"truck\",\"card\",\"cart\",\"clock\",\"branch\",\"cloud\",\"refresh\",\"undo\",\"yen\",\"layers\",\"code\",\"paint\",\"tree\",\"block\"]};function validate40(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"id\"},message:\"must have required property '\"+\"id\"+\"'\"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.name === undefined){const err1 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"name\"},message:\"must have required property '\"+\"name\"+\"'\"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!(((((key0 === \"id\") || (key0 === \"name\")) || (key0 === \"note\")) || (key0 === \"color\")) || (key0 === \"icon\"))){const err2 = {instancePath,schemaPath:\"#/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key0},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.id !== undefined){let data0 = data.id;if(typeof data0 === \"string\"){if(!pattern0.test(data0)){const err3 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}else {const err4 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.name !== undefined){let data1 = data.name;if(typeof data1 === \"string\"){if(func2(data1) < 1){const err5 = {instancePath:instancePath+\"/name\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+\"/name\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.note !== undefined){let data2 = data.note;if(typeof data2 === \"string\"){if(func2(data2) < 1){const err7 = {instancePath:instancePath+\"/note\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}else {const err8 = {instancePath:instancePath+\"/note\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.color !== undefined){let data3 = data.color;if(!(((((((data3 === \"blue\") || (data3 === \"amber\")) || (data3 === \"green\")) || (data3 === \"violet\")) || (data3 === \"rose\")) || (data3 === \"slate\")) || (data3 === \"coin\"))){const err9 = {instancePath:instancePath+\"/color\",schemaPath:\"#/definitions/color/enum\",keyword:\"enum\",params:{allowedValues: schema102.enum},message:\"must be equal to one of the allowed values\"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.icon !== undefined){let data4 = data.icon;if(!((((((((((((((((((((((((((((((((((((((data4 === \"app\") || (data4 === \"router\")) || (data4 === \"on\")) || (data4 === \"off\")) || (data4 === \"pool\")) || (data4 === \"db\")) || (data4 === \"exe\")) || (data4 === \"idx\")) || (data4 === \"sign\")) || (data4 === \"env\")) || (data4 === \"lock\")) || (data4 === \"check\")) || (data4 === \"flag\")) || (data4 === \"x\")) || (data4 === \"chain\")) || (data4 === \"net\")) || (data4 === \"user\")) || (data4 === \"server\")) || (data4 === \"key\")) || (data4 === \"shield\")) || (data4 === \"globe\")) || (data4 === \"bolt\")) || (data4 === \"doc\")) || (data4 === \"box\")) || (data4 === \"truck\")) || (data4 === \"card\")) || (data4 === \"cart\")) || (data4 === \"clock\")) || (data4 === \"branch\")) || (data4 === \"cloud\")) || (data4 === \"refresh\")) || (data4 === \"undo\")) || (data4 === \"yen\")) || (data4 === \"layers\")) || (data4 === \"code\")) || (data4 === \"paint\")) || (data4 === \"tree\")) || (data4 === \"block\"))){const err10 = {instancePath:instancePath+\"/icon\",schemaPath:\"#/definitions/icon/enum\",keyword:\"enum\",params:{allowedValues: schema147.enum},message:\"must be equal to one of the allowed values\"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}}else {const err11 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}validate40.errors = vErrors;return errors === 0;}const schema148 = {\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"id\",\"name\"],\"properties\":{\"id\":{\"$ref\":\"#/definitions/id\"},\"name\":{\"$ref\":\"#/definitions/text\"},\"sub\":{\"$ref\":\"#/definitions/text\"},\"color\":{\"$ref\":\"#/definitions/color\"},\"icon\":{\"$ref\":\"#/definitions/icon\"},\"region\":{\"$ref\":\"#/definitions/id\"},\"link\":{\"description\":\"飛び先。描いた図ではこの箱がここへの link になる\",\"$ref\":\"#/definitions/url\"},\"order\":{\"description\":\"列の図の箱の並べ方。none は順番の無い置き場で、チップを散らして置く。書かない箱は上から実行する札で、チップを line に書いた順に積む\",\"enum\":[\"none\"]}}};const schema155 = {\"description\":\"頁を移る形。/ で始まる path か、http:// か https:// で始まる URL\",\"type\":\"string\",\"pattern\":\"^(/|https?://)\"};const pattern6 = new RegExp(\"^(/|https?://)\", \"u\");function validate42(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"id\"},message:\"must have required property '\"+\"id\"+\"'\"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.name === undefined){const err1 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"name\"},message:\"must have required property '\"+\"name\"+\"'\"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((((((((key0 === \"id\") || (key0 === \"name\")) || (key0 === \"sub\")) || (key0 === \"color\")) || (key0 === \"icon\")) || (key0 === \"region\")) || (key0 === \"link\")) || (key0 === \"order\"))){const err2 = {instancePath,schemaPath:\"#/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key0},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.id !== undefined){let data0 = data.id;if(typeof data0 === \"string\"){if(!pattern0.test(data0)){const err3 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}else {const err4 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.name !== undefined){let data1 = data.name;if(typeof data1 === \"string\"){if(func2(data1) < 1){const err5 = {instancePath:instancePath+\"/name\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+\"/name\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.sub !== undefined){let data2 = data.sub;if(typeof data2 === \"string\"){if(func2(data2) < 1){const err7 = {instancePath:instancePath+\"/sub\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}else {const err8 = {instancePath:instancePath+\"/sub\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.color !== undefined){let data3 = data.color;if(!(((((((data3 === \"blue\") || (data3 === \"amber\")) || (data3 === \"green\")) || (data3 === \"violet\")) || (data3 === \"rose\")) || (data3 === \"slate\")) || (data3 === \"coin\"))){const err9 = {instancePath:instancePath+\"/color\",schemaPath:\"#/definitions/color/enum\",keyword:\"enum\",params:{allowedValues: schema102.enum},message:\"must be equal to one of the allowed values\"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.icon !== undefined){let data4 = data.icon;if(!((((((((((((((((((((((((((((((((((((((data4 === \"app\") || (data4 === \"router\")) || (data4 === \"on\")) || (data4 === \"off\")) || (data4 === \"pool\")) || (data4 === \"db\")) || (data4 === \"exe\")) || (data4 === \"idx\")) || (data4 === \"sign\")) || (data4 === \"env\")) || (data4 === \"lock\")) || (data4 === \"check\")) || (data4 === \"flag\")) || (data4 === \"x\")) || (data4 === \"chain\")) || (data4 === \"net\")) || (data4 === \"user\")) || (data4 === \"server\")) || (data4 === \"key\")) || (data4 === \"shield\")) || (data4 === \"globe\")) || (data4 === \"bolt\")) || (data4 === \"doc\")) || (data4 === \"box\")) || (data4 === \"truck\")) || (data4 === \"card\")) || (data4 === \"cart\")) || (data4 === \"clock\")) || (data4 === \"branch\")) || (data4 === \"cloud\")) || (data4 === \"refresh\")) || (data4 === \"undo\")) || (data4 === \"yen\")) || (data4 === \"layers\")) || (data4 === \"code\")) || (data4 === \"paint\")) || (data4 === \"tree\")) || (data4 === \"block\"))){const err10 = {instancePath:instancePath+\"/icon\",schemaPath:\"#/definitions/icon/enum\",keyword:\"enum\",params:{allowedValues: schema147.enum},message:\"must be equal to one of the allowed values\"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data.region !== undefined){let data5 = data.region;if(typeof data5 === \"string\"){if(!pattern0.test(data5)){const err11 = {instancePath:instancePath+\"/region\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}else {const err12 = {instancePath:instancePath+\"/region\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data.link !== undefined){let data6 = data.link;if(typeof data6 === \"string\"){if(!pattern6.test(data6)){const err13 = {instancePath:instancePath+\"/link\",schemaPath:\"#/definitions/url/pattern\",keyword:\"pattern\",params:{pattern: \"^(/|https?://)\"},message:\"must match pattern \\\"\"+\"^(/|https?://)\"+\"\\\"\"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}else {const err14 = {instancePath:instancePath+\"/link\",schemaPath:\"#/definitions/url/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data.order !== undefined){if(!(data.order === \"none\")){const err15 = {instancePath:instancePath+\"/order\",schemaPath:\"#/properties/order/enum\",keyword:\"enum\",params:{allowedValues: schema148.properties.order.enum},message:\"must be equal to one of the allowed values\"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}}else {const err16 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}validate42.errors = vErrors;return errors === 0;}const schema156 = {\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"title\",\"fields\"],\"properties\":{\"title\":{\"$ref\":\"#/definitions/text\"},\"fields\":{\"type\":\"array\",\"minItems\":1,\"items\":{\"$ref\":\"#/definitions/text\"}},\"meters\":{\"description\":\"物差しにする欄。時間軸の図だけが書ける\",\"type\":\"array\",\"minItems\":1,\"items\":{\"$ref\":\"#/definitions/meter\"}}}};const schema159 = {\"description\":\"物差しの欄。line の割合の所に線を引き、set の値まで針と一緒に満ちる\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"field\",\"line\"],\"properties\":{\"field\":{\"$ref\":\"#/definitions/text\"},\"line\":{\"$ref\":\"#/definitions/ratio\"}}};const schema161 = {\"description\":\"割合。分数 (2/3) か百分率 (97%)\",\"type\":\"string\",\"pattern\":\"^([0-9]+/[0-9]+|[0-9]+(\\\\.[0-9]+)?%)$\"};const pattern7 = new RegExp(\"^([0-9]+/[0-9]+|[0-9]+(\\\\.[0-9]+)?%)$\", \"u\");function validate45(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.field === undefined){const err0 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"field\"},message:\"must have required property '\"+\"field\"+\"'\"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.line === undefined){const err1 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"line\"},message:\"must have required property '\"+\"line\"+\"'\"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === \"field\") || (key0 === \"line\"))){const err2 = {instancePath,schemaPath:\"#/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key0},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.field !== undefined){let data0 = data.field;if(typeof data0 === \"string\"){if(func2(data0) < 1){const err3 = {instancePath:instancePath+\"/field\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}else {const err4 = {instancePath:instancePath+\"/field\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.line !== undefined){let data1 = data.line;if(typeof data1 === \"string\"){if(!pattern7.test(data1)){const err5 = {instancePath:instancePath+\"/line\",schemaPath:\"#/definitions/ratio/pattern\",keyword:\"pattern\",params:{pattern: \"^([0-9]+/[0-9]+|[0-9]+(\\\\.[0-9]+)?%)$\"},message:\"must match pattern \\\"\"+\"^([0-9]+/[0-9]+|[0-9]+(\\\\.[0-9]+)?%)$\"+\"\\\"\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+\"/line\",schemaPath:\"#/definitions/ratio/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}}else {const err7 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}validate45.errors = vErrors;return errors === 0;}function validate44(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.title === undefined){const err0 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"title\"},message:\"must have required property '\"+\"title\"+\"'\"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.fields === undefined){const err1 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"fields\"},message:\"must have required property '\"+\"fields\"+\"'\"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!(((key0 === \"title\") || (key0 === \"fields\")) || (key0 === \"meters\"))){const err2 = {instancePath,schemaPath:\"#/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key0},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.title !== undefined){let data0 = data.title;if(typeof data0 === \"string\"){if(func2(data0) < 1){const err3 = {instancePath:instancePath+\"/title\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}else {const err4 = {instancePath:instancePath+\"/title\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.fields !== undefined){let data1 = data.fields;if(Array.isArray(data1)){if(data1.length < 1){const err5 = {instancePath:instancePath+\"/fields\",schemaPath:\"#/properties/fields/minItems\",keyword:\"minItems\",params:{limit: 1},message:\"must NOT have fewer than 1 items\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}const len0 = data1.length;for(let i0=0; i0<len0; i0++){let data2 = data1[i0];if(typeof data2 === \"string\"){if(func2(data2) < 1){const err6 = {instancePath:instancePath+\"/fields/\" + i0,schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}else {const err7 = {instancePath:instancePath+\"/fields/\" + i0,schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}}else {const err8 = {instancePath:instancePath+\"/fields\",schemaPath:\"#/properties/fields/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.meters !== undefined){let data3 = data.meters;if(Array.isArray(data3)){if(data3.length < 1){const err9 = {instancePath:instancePath+\"/meters\",schemaPath:\"#/properties/meters/minItems\",keyword:\"minItems\",params:{limit: 1},message:\"must NOT have fewer than 1 items\"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}const len1 = data3.length;for(let i1=0; i1<len1; i1++){if(!(validate45(data3[i1], {instancePath:instancePath+\"/meters/\" + i1,parentData:data3,parentDataProperty:i1,rootData}))){vErrors = vErrors === null ? validate45.errors : vErrors.concat(validate45.errors);errors = vErrors.length;}}}else {const err10 = {instancePath:instancePath+\"/meters\",schemaPath:\"#/properties/meters/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}}else {const err11 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}validate44.errors = vErrors;return errors === 0;}const schema162 = {\"description\":\"目盛り。unit の名前の目盛りを length の長さで count 個並べ、最初の目盛りの番号を from にする\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"unit\",\"length\",\"count\"],\"properties\":{\"unit\":{\"$ref\":\"#/definitions/text\"},\"length\":{\"$ref\":\"#/definitions/duration\"},\"count\":{\"type\":\"integer\",\"minimum\":1},\"from\":{\"type\":\"integer\",\"minimum\":0}}};const schema164 = {\"description\":\"長さ。数と単位 (ms、s、min、h、d) の組\",\"type\":\"string\",\"pattern\":\"^[0-9]+(\\\\.[0-9]+)?(ms|s|min|h|d)$\"};const pattern8 = new RegExp(\"^[0-9]+(\\\\.[0-9]+)?(ms|s|min|h|d)$\", \"u\");function validate48(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.unit === undefined){const err0 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"unit\"},message:\"must have required property '\"+\"unit\"+\"'\"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.length === undefined){const err1 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"length\"},message:\"must have required property '\"+\"length\"+\"'\"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.count === undefined){const err2 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"count\"},message:\"must have required property '\"+\"count\"+\"'\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}for(const key0 in data){if(!((((key0 === \"unit\") || (key0 === \"length\")) || (key0 === \"count\")) || (key0 === \"from\"))){const err3 = {instancePath,schemaPath:\"#/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key0},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.unit !== undefined){let data0 = data.unit;if(typeof data0 === \"string\"){if(func2(data0) < 1){const err4 = {instancePath:instancePath+\"/unit\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}else {const err5 = {instancePath:instancePath+\"/unit\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.length !== undefined){let data1 = data.length;if(typeof data1 === \"string\"){if(!pattern8.test(data1)){const err6 = {instancePath:instancePath+\"/length\",schemaPath:\"#/definitions/duration/pattern\",keyword:\"pattern\",params:{pattern: \"^[0-9]+(\\\\.[0-9]+)?(ms|s|min|h|d)$\"},message:\"must match pattern \\\"\"+\"^[0-9]+(\\\\.[0-9]+)?(ms|s|min|h|d)$\"+\"\\\"\"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}else {const err7 = {instancePath:instancePath+\"/length\",schemaPath:\"#/definitions/duration/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.count !== undefined){let data2 = data.count;if(!(((typeof data2 == \"number\") && (!(data2 % 1) && !isNaN(data2))) && (isFinite(data2)))){const err8 = {instancePath:instancePath+\"/count\",schemaPath:\"#/properties/count/type\",keyword:\"type\",params:{type: \"integer\"},message:\"must be integer\"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if((typeof data2 == \"number\") && (isFinite(data2))){if(data2 < 1 || isNaN(data2)){const err9 = {instancePath:instancePath+\"/count\",schemaPath:\"#/properties/count/minimum\",keyword:\"minimum\",params:{comparison: \">=\", limit: 1},message:\"must be >= 1\"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}}if(data.from !== undefined){let data3 = data.from;if(!(((typeof data3 == \"number\") && (!(data3 % 1) && !isNaN(data3))) && (isFinite(data3)))){const err10 = {instancePath:instancePath+\"/from\",schemaPath:\"#/properties/from/type\",keyword:\"type\",params:{type: \"integer\"},message:\"must be integer\"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}if((typeof data3 == \"number\") && (isFinite(data3))){if(data3 < 0 || isNaN(data3)){const err11 = {instancePath:instancePath+\"/from\",schemaPath:\"#/properties/from/minimum\",keyword:\"minimum\",params:{comparison: \">=\", limit: 0},message:\"must be >= 0\"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}}}else {const err12 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}validate48.errors = vErrors;return errors === 0;}const schema165 = {\"description\":\"印の列。目盛りごとに印を 1 つ置き、empty の目盛りは空きの印にする\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"id\",\"name\"],\"properties\":{\"id\":{\"$ref\":\"#/definitions/id\"},\"name\":{\"$ref\":\"#/definitions/text\"},\"color\":{\"$ref\":\"#/definitions/color\"},\"empty\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/unit\"}}}};const schema169 = {\"description\":\"目盛りの位置。0 から数える\",\"type\":\"integer\",\"minimum\":0};function validate50(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"id\"},message:\"must have required property '\"+\"id\"+\"'\"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.name === undefined){const err1 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"name\"},message:\"must have required property '\"+\"name\"+\"'\"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((((key0 === \"id\") || (key0 === \"name\")) || (key0 === \"color\")) || (key0 === \"empty\"))){const err2 = {instancePath,schemaPath:\"#/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key0},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.id !== undefined){let data0 = data.id;if(typeof data0 === \"string\"){if(!pattern0.test(data0)){const err3 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}else {const err4 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.name !== undefined){let data1 = data.name;if(typeof data1 === \"string\"){if(func2(data1) < 1){const err5 = {instancePath:instancePath+\"/name\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+\"/name\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.color !== undefined){let data2 = data.color;if(!(((((((data2 === \"blue\") || (data2 === \"amber\")) || (data2 === \"green\")) || (data2 === \"violet\")) || (data2 === \"rose\")) || (data2 === \"slate\")) || (data2 === \"coin\"))){const err7 = {instancePath:instancePath+\"/color\",schemaPath:\"#/definitions/color/enum\",keyword:\"enum\",params:{allowedValues: schema102.enum},message:\"must be equal to one of the allowed values\"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.empty !== undefined){let data3 = data.empty;if(Array.isArray(data3)){const len0 = data3.length;for(let i0=0; i0<len0; i0++){let data4 = data3[i0];if(!(((typeof data4 == \"number\") && (!(data4 % 1) && !isNaN(data4))) && (isFinite(data4)))){const err8 = {instancePath:instancePath+\"/empty/\" + i0,schemaPath:\"#/definitions/unit/type\",keyword:\"type\",params:{type: \"integer\"},message:\"must be integer\"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if((typeof data4 == \"number\") && (isFinite(data4))){if(data4 < 0 || isNaN(data4)){const err9 = {instancePath:instancePath+\"/empty/\" + i0,schemaPath:\"#/definitions/unit/minimum\",keyword:\"minimum\",params:{comparison: \">=\", limit: 0},message:\"must be >= 0\"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}}}else {const err10 = {instancePath:instancePath+\"/empty\",schemaPath:\"#/properties/empty/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}}else {const err11 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}validate50.errors = vErrors;return errors === 0;}const schema170 = {\"description\":\"節目。at の目盛りの印の下に旗の丸と名札を置く\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"id\",\"at\"],\"properties\":{\"id\":{\"$ref\":\"#/definitions/id\"},\"at\":{\"$ref\":\"#/definitions/unit\"}}};function validate52(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"id\"},message:\"must have required property '\"+\"id\"+\"'\"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.at === undefined){const err1 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"at\"},message:\"must have required property '\"+\"at\"+\"'\"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === \"id\") || (key0 === \"at\"))){const err2 = {instancePath,schemaPath:\"#/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key0},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.id !== undefined){let data0 = data.id;if(typeof data0 === \"string\"){if(!pattern0.test(data0)){const err3 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}else {const err4 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.at !== undefined){let data1 = data.at;if(!(((typeof data1 == \"number\") && (!(data1 % 1) && !isNaN(data1))) && (isFinite(data1)))){const err5 = {instancePath:instancePath+\"/at\",schemaPath:\"#/definitions/unit/type\",keyword:\"type\",params:{type: \"integer\"},message:\"must be integer\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if((typeof data1 == \"number\") && (isFinite(data1))){if(data1 < 0 || isNaN(data1)){const err6 = {instancePath:instancePath+\"/at\",schemaPath:\"#/definitions/unit/minimum\",keyword:\"minimum\",params:{comparison: \">=\", limit: 0},message:\"must be >= 0\"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}}}else {const err7 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}validate52.errors = vErrors;return errors === 0;}const schema173 = {\"description\":\"拡大の範囲。from から to の目盛りごとに拡大の帯に列を作る\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"from\",\"to\"],\"properties\":{\"from\":{\"$ref\":\"#/definitions/unit\"},\"to\":{\"$ref\":\"#/definitions/unit\"}}};function validate54(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.from === undefined){const err0 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"from\"},message:\"must have required property '\"+\"from\"+\"'\"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.to === undefined){const err1 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"to\"},message:\"must have required property '\"+\"to\"+\"'\"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === \"from\") || (key0 === \"to\"))){const err2 = {instancePath,schemaPath:\"#/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key0},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.from !== undefined){let data0 = data.from;if(!(((typeof data0 == \"number\") && (!(data0 % 1) && !isNaN(data0))) && (isFinite(data0)))){const err3 = {instancePath:instancePath+\"/from\",schemaPath:\"#/definitions/unit/type\",keyword:\"type\",params:{type: \"integer\"},message:\"must be integer\"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if((typeof data0 == \"number\") && (isFinite(data0))){if(data0 < 0 || isNaN(data0)){const err4 = {instancePath:instancePath+\"/from\",schemaPath:\"#/definitions/unit/minimum\",keyword:\"minimum\",params:{comparison: \">=\", limit: 0},message:\"must be >= 0\"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}}if(data.to !== undefined){let data1 = data.to;if(!(((typeof data1 == \"number\") && (!(data1 % 1) && !isNaN(data1))) && (isFinite(data1)))){const err5 = {instancePath:instancePath+\"/to\",schemaPath:\"#/definitions/unit/type\",keyword:\"type\",params:{type: \"integer\"},message:\"must be integer\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if((typeof data1 == \"number\") && (isFinite(data1))){if(data1 < 0 || isNaN(data1)){const err6 = {instancePath:instancePath+\"/to\",schemaPath:\"#/definitions/unit/minimum\",keyword:\"minimum\",params:{comparison: \">=\", limit: 0},message:\"must be >= 0\"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}}}else {const err7 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}validate54.errors = vErrors;return errors === 0;}const schema176 = {\"description\":\"役。チップを持たずに動く者で、箱の上に札として並び、段の中の role の出来事で光る\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"id\"],\"properties\":{\"id\":{\"$ref\":\"#/definitions/id\"},\"note\":{\"description\":\"役の札の名前の下の一言\",\"$ref\":\"#/definitions/text\"}}};function validate56(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"id\"},message:\"must have required property '\"+\"id\"+\"'\"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}for(const key0 in data){if(!((key0 === \"id\") || (key0 === \"note\"))){const err1 = {instancePath,schemaPath:\"#/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key0},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.id !== undefined){let data0 = data.id;if(typeof data0 === \"string\"){if(!pattern0.test(data0)){const err2 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}else {const err3 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.note !== undefined){let data1 = data.note;if(typeof data1 === \"string\"){if(func2(data1) < 1){const err4 = {instancePath:instancePath+\"/note\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}else {const err5 = {instancePath:instancePath+\"/note\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}}else {const err6 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}validate56.errors = vErrors;return errors === 0;}const schema179 = {\"description\":\"移れる道。送る側に始まりの印 start、受ける側に終わりの印 finish を書ける。どの段にも出ない道は点線で描き、運ぶ物を走らせない\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"from\",\"to\"],\"properties\":{\"from\":{\"$ref\":\"#/definitions/id\"},\"to\":{\"$ref\":\"#/definitions/id\"},\"label\":{\"$ref\":\"#/definitions/text\"}}};function validate58(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.from === undefined){const err0 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"from\"},message:\"must have required property '\"+\"from\"+\"'\"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.to === undefined){const err1 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"to\"},message:\"must have required property '\"+\"to\"+\"'\"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!(((key0 === \"from\") || (key0 === \"to\")) || (key0 === \"label\"))){const err2 = {instancePath,schemaPath:\"#/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key0},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.from !== undefined){let data0 = data.from;if(typeof data0 === \"string\"){if(!pattern0.test(data0)){const err3 = {instancePath:instancePath+\"/from\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}else {const err4 = {instancePath:instancePath+\"/from\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.to !== undefined){let data1 = data.to;if(typeof data1 === \"string\"){if(!pattern0.test(data1)){const err5 = {instancePath:instancePath+\"/to\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+\"/to\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.label !== undefined){let data2 = data.label;if(typeof data2 === \"string\"){if(func2(data2) < 1){const err7 = {instancePath:instancePath+\"/label\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}else {const err8 = {instancePath:instancePath+\"/label\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}}else {const err9 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}validate58.errors = vErrors;return errors === 0;}const schema183 = {\"description\":\"区切り。目盛り length 個ごとに name の区切りを置き、最初の区切りの番号を from にする\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"name\",\"length\"],\"properties\":{\"name\":{\"$ref\":\"#/definitions/text\"},\"length\":{\"type\":\"integer\",\"minimum\":1},\"from\":{\"type\":\"integer\",\"minimum\":0}}};function validate60(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.name === undefined){const err0 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"name\"},message:\"must have required property '\"+\"name\"+\"'\"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.length === undefined){const err1 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"length\"},message:\"must have required property '\"+\"length\"+\"'\"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!(((key0 === \"name\") || (key0 === \"length\")) || (key0 === \"from\"))){const err2 = {instancePath,schemaPath:\"#/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key0},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.name !== undefined){let data0 = data.name;if(typeof data0 === \"string\"){if(func2(data0) < 1){const err3 = {instancePath:instancePath+\"/name\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}else {const err4 = {instancePath:instancePath+\"/name\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.length !== undefined){let data1 = data.length;if(!(((typeof data1 == \"number\") && (!(data1 % 1) && !isNaN(data1))) && (isFinite(data1)))){const err5 = {instancePath:instancePath+\"/length\",schemaPath:\"#/properties/length/type\",keyword:\"type\",params:{type: \"integer\"},message:\"must be integer\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if((typeof data1 == \"number\") && (isFinite(data1))){if(data1 < 1 || isNaN(data1)){const err6 = {instancePath:instancePath+\"/length\",schemaPath:\"#/properties/length/minimum\",keyword:\"minimum\",params:{comparison: \">=\", limit: 1},message:\"must be >= 1\"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}}if(data.from !== undefined){let data2 = data.from;if(!(((typeof data2 == \"number\") && (!(data2 % 1) && !isNaN(data2))) && (isFinite(data2)))){const err7 = {instancePath:instancePath+\"/from\",schemaPath:\"#/properties/from/type\",keyword:\"type\",params:{type: \"integer\"},message:\"must be integer\"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if((typeof data2 == \"number\") && (isFinite(data2))){if(data2 < 0 || isNaN(data2)){const err8 = {instancePath:instancePath+\"/from\",schemaPath:\"#/properties/from/minimum\",keyword:\"minimum\",params:{comparison: \">=\", limit: 0},message:\"must be >= 0\"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}}}else {const err9 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}validate60.errors = vErrors;return errors === 0;}const schema185 = {\"description\":\"試す図の部品。網 (route)、待ち行列 (queue)、機械の列 (chain)、入力の帯 (ask)、釦 (press)\",\"type\":\"object\",\"required\":[\"type\"],\"discriminator\":{\"propertyName\":\"type\"},\"oneOf\":[{\"description\":\"網。paths は - でつないだ節の並びで、from の節から to の節へ最短の道でチップを運ぶ\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"id\",\"paths\",\"from\",\"to\"],\"properties\":{\"type\":{\"const\":\"route\"},\"id\":{\"$ref\":\"#/definitions/id\"},\"paths\":{\"type\":\"array\",\"minItems\":1,\"items\":{\"type\":\"array\",\"minItems\":2,\"items\":{\"$ref\":\"#/definitions/id\"}}},\"from\":{\"$ref\":\"#/definitions/id\"},\"to\":{\"$ref\":\"#/definitions/id\"}}},{\"description\":\"待ち行列。order の欄の値の高い順 (同じ値は入った順) にチップを上から並べる。order を書かなければ入った順\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"id\"],\"properties\":{\"type\":{\"const\":\"queue\"},\"id\":{\"$ref\":\"#/definitions/id\"},\"order\":{\"$ref\":\"#/definitions/id\"}}},{\"description\":\"機械の列 (ブロックの鎖)。edit を書いた時だけ、読み手がブロックの中のチップのその欄を書き換えられる\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"id\"],\"properties\":{\"type\":{\"const\":\"chain\"},\"id\":{\"$ref\":\"#/definitions/id\"},\"edit\":{\"$ref\":\"#/definitions/id\"}}},{\"description\":\"入力の帯。図に 1 つまでで、id は常に ask。最初の欄の値がチップの名前になる。into の待ち行列へ、via の網を通って送る\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"id\",\"fields\",\"into\"],\"properties\":{\"type\":{\"const\":\"ask\"},\"id\":{\"const\":\"ask\"},\"fields\":{\"type\":\"array\",\"minItems\":2,\"items\":{\"$ref\":\"#/definitions/id\"}},\"into\":{\"$ref\":\"#/definitions/id\"},\"via\":{\"$ref\":\"#/definitions/id\"}}},{\"description\":\"釦。from の待ち行列の上から take 件を、into の機械の列の新しいブロックへ移す。at は釦を置く部品 (書かなければ入力の帯)\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"id\",\"from\",\"into\",\"take\"],\"properties\":{\"type\":{\"const\":\"press\"},\"id\":{\"$ref\":\"#/definitions/id\"},\"from\":{\"$ref\":\"#/definitions/id\"},\"into\":{\"$ref\":\"#/definitions/id\"},\"take\":{\"type\":\"integer\",\"minimum\":1},\"at\":{\"$ref\":\"#/definitions/id\"}}}]};function validate62(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err0 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}const tag0 = data.type;if(typeof tag0 == \"string\"){if(tag0 === \"route\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err1 = {instancePath,schemaPath:\"#/oneOf/0/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.id === undefined){const err2 = {instancePath,schemaPath:\"#/oneOf/0/required\",keyword:\"required\",params:{missingProperty: \"id\"},message:\"must have required property '\"+\"id\"+\"'\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.paths === undefined){const err3 = {instancePath,schemaPath:\"#/oneOf/0/required\",keyword:\"required\",params:{missingProperty: \"paths\"},message:\"must have required property '\"+\"paths\"+\"'\"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.from === undefined){const err4 = {instancePath,schemaPath:\"#/oneOf/0/required\",keyword:\"required\",params:{missingProperty: \"from\"},message:\"must have required property '\"+\"from\"+\"'\"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.to === undefined){const err5 = {instancePath,schemaPath:\"#/oneOf/0/required\",keyword:\"required\",params:{missingProperty: \"to\"},message:\"must have required property '\"+\"to\"+\"'\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}for(const key0 in data){if(!(((((key0 === \"type\") || (key0 === \"id\")) || (key0 === \"paths\")) || (key0 === \"from\")) || (key0 === \"to\"))){const err6 = {instancePath,schemaPath:\"#/oneOf/0/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key0},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.type !== undefined){if(\"route\" !== data.type){const err7 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/0/properties/type/const\",keyword:\"const\",params:{allowedValue: \"route\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.id !== undefined){let data1 = data.id;if(typeof data1 === \"string\"){if(!pattern0.test(data1)){const err8 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}else {const err9 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.paths !== undefined){let data2 = data.paths;if(Array.isArray(data2)){if(data2.length < 1){const err10 = {instancePath:instancePath+\"/paths\",schemaPath:\"#/oneOf/0/properties/paths/minItems\",keyword:\"minItems\",params:{limit: 1},message:\"must NOT have fewer than 1 items\"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}const len0 = data2.length;for(let i0=0; i0<len0; i0++){let data3 = data2[i0];if(Array.isArray(data3)){if(data3.length < 2){const err11 = {instancePath:instancePath+\"/paths/\" + i0,schemaPath:\"#/oneOf/0/properties/paths/items/minItems\",keyword:\"minItems\",params:{limit: 2},message:\"must NOT have fewer than 2 items\"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}const len1 = data3.length;for(let i1=0; i1<len1; i1++){let data4 = data3[i1];if(typeof data4 === \"string\"){if(!pattern0.test(data4)){const err12 = {instancePath:instancePath+\"/paths/\" + i0+\"/\" + i1,schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}else {const err13 = {instancePath:instancePath+\"/paths/\" + i0+\"/\" + i1,schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}}else {const err14 = {instancePath:instancePath+\"/paths/\" + i0,schemaPath:\"#/oneOf/0/properties/paths/items/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}}else {const err15 = {instancePath:instancePath+\"/paths\",schemaPath:\"#/oneOf/0/properties/paths/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data.from !== undefined){let data5 = data.from;if(typeof data5 === \"string\"){if(!pattern0.test(data5)){const err16 = {instancePath:instancePath+\"/from\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}else {const err17 = {instancePath:instancePath+\"/from\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data.to !== undefined){let data6 = data.to;if(typeof data6 === \"string\"){if(!pattern0.test(data6)){const err18 = {instancePath:instancePath+\"/to\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}else {const err19 = {instancePath:instancePath+\"/to\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}}else {const err20 = {instancePath,schemaPath:\"#/oneOf/0/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}else if(tag0 === \"queue\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err21 = {instancePath,schemaPath:\"#/oneOf/1/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}if(data.id === undefined){const err22 = {instancePath,schemaPath:\"#/oneOf/1/required\",keyword:\"required\",params:{missingProperty: \"id\"},message:\"must have required property '\"+\"id\"+\"'\"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}for(const key1 in data){if(!(((key1 === \"type\") || (key1 === \"id\")) || (key1 === \"order\"))){const err23 = {instancePath,schemaPath:\"#/oneOf/1/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key1},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}if(data.type !== undefined){if(\"queue\" !== data.type){const err24 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/1/properties/type/const\",keyword:\"const\",params:{allowedValue: \"queue\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}if(data.id !== undefined){let data8 = data.id;if(typeof data8 === \"string\"){if(!pattern0.test(data8)){const err25 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}else {const err26 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}if(data.order !== undefined){let data9 = data.order;if(typeof data9 === \"string\"){if(!pattern0.test(data9)){const err27 = {instancePath:instancePath+\"/order\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}}else {const err28 = {instancePath:instancePath+\"/order\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}}}else {const err29 = {instancePath,schemaPath:\"#/oneOf/1/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}}else if(tag0 === \"chain\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err30 = {instancePath,schemaPath:\"#/oneOf/2/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}if(data.id === undefined){const err31 = {instancePath,schemaPath:\"#/oneOf/2/required\",keyword:\"required\",params:{missingProperty: \"id\"},message:\"must have required property '\"+\"id\"+\"'\"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}for(const key2 in data){if(!(((key2 === \"type\") || (key2 === \"id\")) || (key2 === \"edit\"))){const err32 = {instancePath,schemaPath:\"#/oneOf/2/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key2},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}}if(data.type !== undefined){if(\"chain\" !== data.type){const err33 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/2/properties/type/const\",keyword:\"const\",params:{allowedValue: \"chain\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}}if(data.id !== undefined){let data11 = data.id;if(typeof data11 === \"string\"){if(!pattern0.test(data11)){const err34 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}}else {const err35 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}}if(data.edit !== undefined){let data12 = data.edit;if(typeof data12 === \"string\"){if(!pattern0.test(data12)){const err36 = {instancePath:instancePath+\"/edit\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}}else {const err37 = {instancePath:instancePath+\"/edit\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}}}else {const err38 = {instancePath,schemaPath:\"#/oneOf/2/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}}else if(tag0 === \"ask\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err39 = {instancePath,schemaPath:\"#/oneOf/3/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}if(data.id === undefined){const err40 = {instancePath,schemaPath:\"#/oneOf/3/required\",keyword:\"required\",params:{missingProperty: \"id\"},message:\"must have required property '\"+\"id\"+\"'\"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}if(data.fields === undefined){const err41 = {instancePath,schemaPath:\"#/oneOf/3/required\",keyword:\"required\",params:{missingProperty: \"fields\"},message:\"must have required property '\"+\"fields\"+\"'\"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}if(data.into === undefined){const err42 = {instancePath,schemaPath:\"#/oneOf/3/required\",keyword:\"required\",params:{missingProperty: \"into\"},message:\"must have required property '\"+\"into\"+\"'\"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}for(const key3 in data){if(!(((((key3 === \"type\") || (key3 === \"id\")) || (key3 === \"fields\")) || (key3 === \"into\")) || (key3 === \"via\"))){const err43 = {instancePath,schemaPath:\"#/oneOf/3/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key3},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}}if(data.type !== undefined){if(\"ask\" !== data.type){const err44 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/3/properties/type/const\",keyword:\"const\",params:{allowedValue: \"ask\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}}if(data.id !== undefined){if(\"ask\" !== data.id){const err45 = {instancePath:instancePath+\"/id\",schemaPath:\"#/oneOf/3/properties/id/const\",keyword:\"const\",params:{allowedValue: \"ask\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}}if(data.fields !== undefined){let data15 = data.fields;if(Array.isArray(data15)){if(data15.length < 2){const err46 = {instancePath:instancePath+\"/fields\",schemaPath:\"#/oneOf/3/properties/fields/minItems\",keyword:\"minItems\",params:{limit: 2},message:\"must NOT have fewer than 2 items\"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}const len2 = data15.length;for(let i2=0; i2<len2; i2++){let data16 = data15[i2];if(typeof data16 === \"string\"){if(!pattern0.test(data16)){const err47 = {instancePath:instancePath+\"/fields/\" + i2,schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}}else {const err48 = {instancePath:instancePath+\"/fields/\" + i2,schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}}}else {const err49 = {instancePath:instancePath+\"/fields\",schemaPath:\"#/oneOf/3/properties/fields/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}}if(data.into !== undefined){let data17 = data.into;if(typeof data17 === \"string\"){if(!pattern0.test(data17)){const err50 = {instancePath:instancePath+\"/into\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}}else {const err51 = {instancePath:instancePath+\"/into\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}}if(data.via !== undefined){let data18 = data.via;if(typeof data18 === \"string\"){if(!pattern0.test(data18)){const err52 = {instancePath:instancePath+\"/via\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err52];}else {vErrors.push(err52);}errors++;}}else {const err53 = {instancePath:instancePath+\"/via\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err53];}else {vErrors.push(err53);}errors++;}}}else {const err54 = {instancePath,schemaPath:\"#/oneOf/3/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err54];}else {vErrors.push(err54);}errors++;}}else if(tag0 === \"press\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err55 = {instancePath,schemaPath:\"#/oneOf/4/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err55];}else {vErrors.push(err55);}errors++;}if(data.id === undefined){const err56 = {instancePath,schemaPath:\"#/oneOf/4/required\",keyword:\"required\",params:{missingProperty: \"id\"},message:\"must have required property '\"+\"id\"+\"'\"};if(vErrors === null){vErrors = [err56];}else {vErrors.push(err56);}errors++;}if(data.from === undefined){const err57 = {instancePath,schemaPath:\"#/oneOf/4/required\",keyword:\"required\",params:{missingProperty: \"from\"},message:\"must have required property '\"+\"from\"+\"'\"};if(vErrors === null){vErrors = [err57];}else {vErrors.push(err57);}errors++;}if(data.into === undefined){const err58 = {instancePath,schemaPath:\"#/oneOf/4/required\",keyword:\"required\",params:{missingProperty: \"into\"},message:\"must have required property '\"+\"into\"+\"'\"};if(vErrors === null){vErrors = [err58];}else {vErrors.push(err58);}errors++;}if(data.take === undefined){const err59 = {instancePath,schemaPath:\"#/oneOf/4/required\",keyword:\"required\",params:{missingProperty: \"take\"},message:\"must have required property '\"+\"take\"+\"'\"};if(vErrors === null){vErrors = [err59];}else {vErrors.push(err59);}errors++;}for(const key4 in data){if(!((((((key4 === \"type\") || (key4 === \"id\")) || (key4 === \"from\")) || (key4 === \"into\")) || (key4 === \"take\")) || (key4 === \"at\"))){const err60 = {instancePath,schemaPath:\"#/oneOf/4/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key4},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err60];}else {vErrors.push(err60);}errors++;}}if(data.type !== undefined){if(\"press\" !== data.type){const err61 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/4/properties/type/const\",keyword:\"const\",params:{allowedValue: \"press\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err61];}else {vErrors.push(err61);}errors++;}}if(data.id !== undefined){let data20 = data.id;if(typeof data20 === \"string\"){if(!pattern0.test(data20)){const err62 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err62];}else {vErrors.push(err62);}errors++;}}else {const err63 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err63];}else {vErrors.push(err63);}errors++;}}if(data.from !== undefined){let data21 = data.from;if(typeof data21 === \"string\"){if(!pattern0.test(data21)){const err64 = {instancePath:instancePath+\"/from\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err64];}else {vErrors.push(err64);}errors++;}}else {const err65 = {instancePath:instancePath+\"/from\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err65];}else {vErrors.push(err65);}errors++;}}if(data.into !== undefined){let data22 = data.into;if(typeof data22 === \"string\"){if(!pattern0.test(data22)){const err66 = {instancePath:instancePath+\"/into\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err66];}else {vErrors.push(err66);}errors++;}}else {const err67 = {instancePath:instancePath+\"/into\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err67];}else {vErrors.push(err67);}errors++;}}if(data.take !== undefined){let data23 = data.take;if(!(((typeof data23 == \"number\") && (!(data23 % 1) && !isNaN(data23))) && (isFinite(data23)))){const err68 = {instancePath:instancePath+\"/take\",schemaPath:\"#/oneOf/4/properties/take/type\",keyword:\"type\",params:{type: \"integer\"},message:\"must be integer\"};if(vErrors === null){vErrors = [err68];}else {vErrors.push(err68);}errors++;}if((typeof data23 == \"number\") && (isFinite(data23))){if(data23 < 1 || isNaN(data23)){const err69 = {instancePath:instancePath+\"/take\",schemaPath:\"#/oneOf/4/properties/take/minimum\",keyword:\"minimum\",params:{comparison: \">=\", limit: 1},message:\"must be >= 1\"};if(vErrors === null){vErrors = [err69];}else {vErrors.push(err69);}errors++;}}}if(data.at !== undefined){let data24 = data.at;if(typeof data24 === \"string\"){if(!pattern0.test(data24)){const err70 = {instancePath:instancePath+\"/at\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err70];}else {vErrors.push(err70);}errors++;}}else {const err71 = {instancePath:instancePath+\"/at\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err71];}else {vErrors.push(err71);}errors++;}}}else {const err72 = {instancePath,schemaPath:\"#/oneOf/4/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err72];}else {vErrors.push(err72);}errors++;}}else {const err73 = {instancePath,schemaPath:\"#/discriminator\",keyword:\"discriminator\",params:{error: \"mapping\", tag: \"type\", tagValue: tag0},message:\"value of tag \\\"type\\\" must be in oneOf\"};if(vErrors === null){vErrors = [err73];}else {vErrors.push(err73);}errors++;}}else {const err74 = {instancePath,schemaPath:\"#/discriminator\",keyword:\"discriminator\",params:{error: \"tag\", tag: \"type\", tagValue: tag0},message:\"tag \\\"type\\\" must be string\"};if(vErrors === null){vErrors = [err74];}else {vErrors.push(err74);}errors++;}}else {const err75 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err75];}else {vErrors.push(err75);}errors++;}validate62.errors = vErrors;return errors === 0;}const schema201 = {\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"title\",\"body\",\"events\"],\"properties\":{\"title\":{\"$ref\":\"#/definitions/text\"},\"body\":{\"$ref\":\"#/definitions/text\"},\"code\":{\"$ref\":\"#/definitions/text\"},\"sources\":{\"description\":\"段の出典。読み上げの段の一覧に、名前を URL への link にして書いた順に出す\",\"type\":\"array\",\"minItems\":1,\"items\":{\"$ref\":\"#/definitions/source\"}},\"events\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/event\"}}}};const schema205 = {\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"name\",\"url\"],\"properties\":{\"name\":{\"$ref\":\"#/definitions/text\"},\"url\":{\"$ref\":\"#/definitions/url\"}}};function validate65(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.name === undefined){const err0 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"name\"},message:\"must have required property '\"+\"name\"+\"'\"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.url === undefined){const err1 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"url\"},message:\"must have required property '\"+\"url\"+\"'\"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === \"name\") || (key0 === \"url\"))){const err2 = {instancePath,schemaPath:\"#/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key0},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.name !== undefined){let data0 = data.name;if(typeof data0 === \"string\"){if(func2(data0) < 1){const err3 = {instancePath:instancePath+\"/name\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}else {const err4 = {instancePath:instancePath+\"/name\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.url !== undefined){let data1 = data.url;if(typeof data1 === \"string\"){if(!pattern6.test(data1)){const err5 = {instancePath:instancePath+\"/url\",schemaPath:\"#/definitions/url/pattern\",keyword:\"pattern\",params:{pattern: \"^(/|https?://)\"},message:\"must match pattern \\\"\"+\"^(/|https?://)\"+\"\\\"\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+\"/url\",schemaPath:\"#/definitions/url/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}}else {const err7 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}validate65.errors = vErrors;return errors === 0;}const schema208 = {\"description\":\"段の中で起きること。起きる順に並べる\",\"type\":\"object\",\"required\":[\"type\"],\"discriminator\":{\"propertyName\":\"type\"},\"oneOf\":[{\"description\":\"枝を切る。枝分かれの図だけが書ける。枝の札を from の commit へ置き、HEAD をその枝へ移す\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"branch\",\"from\"],\"properties\":{\"type\":{\"const\":\"branch\"},\"branch\":{\"$ref\":\"#/definitions/id\"},\"from\":{\"$ref\":\"#/definitions/id\"}}},{\"description\":\"commit を積む。枝分かれの図だけが書ける。積んだ枝の札と、その枝を指す HEAD が進む。当て直し (copy) は枝の札を動かさず、merge commit (merge) は取り込む枝の先端も親に持つ\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"id\",\"branch\"],\"properties\":{\"type\":{\"const\":\"commit\"},\"id\":{\"$ref\":\"#/definitions/id\"},\"branch\":{\"$ref\":\"#/definitions/id\"},\"copy\":{\"$ref\":\"#/definitions/id\"},\"merge\":{\"$ref\":\"#/definitions/id\"},\"hash\":{\"$ref\":\"#/definitions/hash\"},\"note\":{\"$ref\":\"#/definitions/text\"}}},{\"description\":\"中身の帯の欄の値と札\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"field\"],\"anyOf\":[{\"required\":[\"value\"]},{\"required\":[\"tag\"]}],\"properties\":{\"type\":{\"const\":\"strip\"},\"field\":{\"$ref\":\"#/definitions/text\"},\"value\":{\"$ref\":\"#/definitions/text\"},\"tag\":{\"$ref\":\"#/definitions/text\"}}},{\"description\":\"箱の中の処理\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"box\",\"label\"],\"properties\":{\"type\":{\"const\":\"action\"},\"box\":{\"$ref\":\"#/definitions/id\"},\"label\":{\"$ref\":\"#/definitions/text\"}}},{\"description\":\"箱の下の小さな字の書き換え\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"box\",\"text\"],\"properties\":{\"type\":{\"const\":\"swap\"},\"box\":{\"$ref\":\"#/definitions/id\"},\"text\":{\"$ref\":\"#/definitions/text\"},\"color\":{\"description\":\"時間軸の図の節目の丸の色\",\"$ref\":\"#/definitions/color\"}}},{\"description\":\"線。運ぶ物を載せて送る側から受ける側へ走る\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"from\",\"to\",\"carry\"],\"properties\":{\"type\":{\"const\":\"edge\"},\"from\":{\"$ref\":\"#/definitions/id\"},\"to\":{\"$ref\":\"#/definitions/id\"},\"label\":{\"$ref\":\"#/definitions/text\"},\"carry\":{\"$ref\":\"#/definitions/carry\"},\"labelSide\":{\"description\":\"線の名前を置く側 (寄せの指示)\",\"enum\":[\"above\",\"below\",\"left\",\"right\"]},\"at\":{\"description\":\"時間軸の図の拡大の帯で、線を引く列の目盛り\",\"$ref\":\"#/definitions/unit\"},\"into\":{\"description\":\"時間軸の図の拡大の帯で、受ける箱を選ぶ列の目盛り。書かなければ at の列\",\"$ref\":\"#/definitions/unit\"}}},{\"description\":\"時間軸の図の今の時刻の針を、to の目盛りの終わりまで進める\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"to\"],\"properties\":{\"type\":{\"const\":\"now\"},\"to\":{\"$ref\":\"#/definitions/unit\"}}},{\"description\":\"時間軸の図の from から to の目盛りに、括弧と字を出す。shape が box なら印の列を囲み、字を縁の札にする\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"from\",\"to\",\"text\"],\"properties\":{\"type\":{\"const\":\"span\"},\"from\":{\"$ref\":\"#/definitions/unit\"},\"to\":{\"$ref\":\"#/definitions/unit\"},\"text\":{\"$ref\":\"#/definitions/text\"},\"shape\":{\"enum\":[\"box\"]},\"color\":{\"$ref\":\"#/definitions/color\"}}},{\"description\":\"時間軸の図の印の列 row の、from から to の目盛りの印の色を変える\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"row\",\"from\",\"to\",\"color\"],\"properties\":{\"type\":{\"const\":\"mark\"},\"row\":{\"$ref\":\"#/definitions/id\"},\"from\":{\"$ref\":\"#/definitions/unit\"},\"to\":{\"$ref\":\"#/definitions/unit\"},\"color\":{\"$ref\":\"#/definitions/color\"}}},{\"description\":\"葉を出す。木の図だけが書ける。書いた段で葉の箱が現れる。hash を書くと箱に値を出し、名札を葉の下の札に出す\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"id\"],\"properties\":{\"type\":{\"const\":\"leaf\"},\"id\":{\"$ref\":\"#/definitions/id\"},\"hash\":{\"$ref\":\"#/definitions/hash\"}}},{\"description\":\"1 つ以上の子から親を組む。木の図だけが書ける。書いた段で親の箱と、子から親への木の線が現れる\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"id\",\"children\"],\"properties\":{\"type\":{\"const\":\"node\"},\"id\":{\"$ref\":\"#/definitions/id\"},\"children\":{\"type\":\"array\",\"minItems\":1,\"items\":{\"$ref\":\"#/definitions/id\"}},\"hash\":{\"$ref\":\"#/definitions/hash\"}}},{\"description\":\"列の図では列 box の並びを items に書き換える。チップは前に居た列から滑り、どの列にも居なかったチップは弾んで現れ、列から外れたチップは消える。試す図では、待ち行列 part の中身を items の並びにするか、機械の列 part に items を入れた新しいブロックを足す。列の図と試す図だけが書ける\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"items\"],\"properties\":{\"type\":{\"const\":\"line\"},\"box\":{\"$ref\":\"#/definitions/id\"},\"part\":{\"$ref\":\"#/definitions/id\"},\"items\":{\"type\":\"array\",\"minItems\":1,\"maxItems\":12,\"items\":{\"$ref\":\"#/definitions/id\"}}}},{\"description\":\"列 box に封をして、チップを隠す。列の図だけが書ける\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"box\"],\"properties\":{\"type\":{\"const\":\"seal\"},\"box\":{\"$ref\":\"#/definitions/id\"}}},{\"description\":\"列 box の封を開ける。列の図だけが書ける\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"box\"],\"properties\":{\"type\":{\"const\":\"open\"},\"box\":{\"$ref\":\"#/definitions/id\"}}},{\"description\":\"列 box を選ぶ。列の図だけが書ける。列の縁に色が付き、ほかの列が薄くなる\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"box\"],\"properties\":{\"type\":{\"const\":\"pick\"},\"box\":{\"$ref\":\"#/definitions/id\"}}},{\"description\":\"列 box の右に text の札を押す。列の図だけが書ける\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"box\",\"text\"],\"properties\":{\"type\":{\"const\":\"stamp\"},\"box\":{\"$ref\":\"#/definitions/id\"},\"text\":{\"$ref\":\"#/definitions/text\"}}},{\"description\":\"この段で役 role が動く。列の図だけが書ける。役の札の縁が光る\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"role\"],\"properties\":{\"type\":{\"const\":\"role\"},\"role\":{\"$ref\":\"#/definitions/id\"}}},{\"description\":\"入力の帯の欄の値 values (欄の順) でチップを作って送る。試す図だけが書ける。書き手の例として読み手の送る操作を書く\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"values\"],\"properties\":{\"type\":{\"const\":\"ask\"},\"values\":{\"type\":\"array\",\"minItems\":1,\"items\":{\"$ref\":\"#/definitions/text\"}}}},{\"description\":\"チップ item の欄の値を values に書き換える。試す図だけが書ける。読み手の書き換えと同じ\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"item\",\"values\"],\"properties\":{\"type\":{\"const\":\"item\"},\"item\":{\"$ref\":\"#/definitions/id\"},\"values\":{\"$ref\":\"#/definitions/tryValues\"}}},{\"description\":\"釦 press を押す。試す図だけが書ける。釦の待ち行列の上からチップを取り出し、機械の列の新しいブロックへ移す\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"press\"],\"properties\":{\"type\":{\"const\":\"press\"},\"press\":{\"$ref\":\"#/definitions/id\"}}}]};const schema215 = {\"description\":\"commit と木の箱の hash。16 進の字で 4 から 40 字\",\"type\":\"string\",\"pattern\":\"^[0-9a-f]{4,40}$\"};const pattern36 = new RegExp(\"^[0-9a-f]{4,40}$\", \"u\");const schema228 = {\"description\":\"線の上を走る物。封筒 (メッセージや要求)、札 (名前のある値)、硬貨 (価値)、無し\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"kind\"],\"properties\":{\"kind\":{\"enum\":[\"envelope\",\"tag\",\"coin\",\"none\"]},\"text\":{\"$ref\":\"#/definitions/text\"}},\"if\":{\"required\":[\"kind\"],\"properties\":{\"kind\":{\"const\":\"tag\"}}},\"then\":{\"required\":[\"text\"]},\"else\":{\"not\":{\"required\":[\"text\"]}}};function validate68(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;const _errs1 = errors;let valid0 = true;const _errs2 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){let missing0;if((data.kind === undefined) && (missing0 = \"kind\")){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.kind !== undefined){if(\"tag\" !== data.kind){const err1 = {};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}}}var _valid0 = _errs2 === errors;errors = _errs1;if(vErrors !== null){if(_errs1){vErrors.length = _errs1;}else {vErrors = null;}}let ifClause0;if(_valid0){const _errs4 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.text === undefined){const err2 = {instancePath,schemaPath:\"#/then/required\",keyword:\"required\",params:{missingProperty: \"text\"},message:\"must have required property '\"+\"text\"+\"'\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}var _valid0 = _errs4 === errors;valid0 = _valid0;ifClause0 = \"then\";}else {const _errs5 = errors;const _errs6 = errors;const _errs7 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){let missing1;if((data.text === undefined) && (missing1 = \"text\")){const err3 = {};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}var valid2 = _errs7 === errors;if(valid2){const err4 = {instancePath,schemaPath:\"#/else/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}else {errors = _errs6;if(vErrors !== null){if(_errs6){vErrors.length = _errs6;}else {vErrors = null;}}}var _valid0 = _errs5 === errors;valid0 = _valid0;ifClause0 = \"else\";}if(!valid0){const err5 = {instancePath,schemaPath:\"#/if\",keyword:\"if\",params:{failingKeyword: ifClause0},message:\"must match \\\"\"+ifClause0+\"\\\" schema\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.kind === undefined){const err6 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"kind\"},message:\"must have required property '\"+\"kind\"+\"'\"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}for(const key0 in data){if(!((key0 === \"kind\") || (key0 === \"text\"))){const err7 = {instancePath,schemaPath:\"#/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key0},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.kind !== undefined){let data1 = data.kind;if(!((((data1 === \"envelope\") || (data1 === \"tag\")) || (data1 === \"coin\")) || (data1 === \"none\"))){const err8 = {instancePath:instancePath+\"/kind\",schemaPath:\"#/properties/kind/enum\",keyword:\"enum\",params:{allowedValues: schema228.properties.kind.enum},message:\"must be equal to one of the allowed values\"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.text !== undefined){let data2 = data.text;if(typeof data2 === \"string\"){if(func2(data2) < 1){const err9 = {instancePath:instancePath+\"/text\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}else {const err10 = {instancePath:instancePath+\"/text\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}}else {const err11 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}validate68.errors = vErrors;return errors === 0;}function validate67(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err0 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}const tag0 = data.type;if(typeof tag0 == \"string\"){if(tag0 === \"branch\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err1 = {instancePath,schemaPath:\"#/oneOf/0/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.branch === undefined){const err2 = {instancePath,schemaPath:\"#/oneOf/0/required\",keyword:\"required\",params:{missingProperty: \"branch\"},message:\"must have required property '\"+\"branch\"+\"'\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.from === undefined){const err3 = {instancePath,schemaPath:\"#/oneOf/0/required\",keyword:\"required\",params:{missingProperty: \"from\"},message:\"must have required property '\"+\"from\"+\"'\"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data){if(!(((key0 === \"type\") || (key0 === \"branch\")) || (key0 === \"from\"))){const err4 = {instancePath,schemaPath:\"#/oneOf/0/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key0},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.type !== undefined){if(\"branch\" !== data.type){const err5 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/0/properties/type/const\",keyword:\"const\",params:{allowedValue: \"branch\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.branch !== undefined){let data1 = data.branch;if(typeof data1 === \"string\"){if(!pattern0.test(data1)){const err6 = {instancePath:instancePath+\"/branch\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}else {const err7 = {instancePath:instancePath+\"/branch\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.from !== undefined){let data2 = data.from;if(typeof data2 === \"string\"){if(!pattern0.test(data2)){const err8 = {instancePath:instancePath+\"/from\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}else {const err9 = {instancePath:instancePath+\"/from\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}}else {const err10 = {instancePath,schemaPath:\"#/oneOf/0/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}else if(tag0 === \"commit\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err11 = {instancePath,schemaPath:\"#/oneOf/1/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}if(data.id === undefined){const err12 = {instancePath,schemaPath:\"#/oneOf/1/required\",keyword:\"required\",params:{missingProperty: \"id\"},message:\"must have required property '\"+\"id\"+\"'\"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}if(data.branch === undefined){const err13 = {instancePath,schemaPath:\"#/oneOf/1/required\",keyword:\"required\",params:{missingProperty: \"branch\"},message:\"must have required property '\"+\"branch\"+\"'\"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}for(const key1 in data){if(!(((((((key1 === \"type\") || (key1 === \"id\")) || (key1 === \"branch\")) || (key1 === \"copy\")) || (key1 === \"merge\")) || (key1 === \"hash\")) || (key1 === \"note\"))){const err14 = {instancePath,schemaPath:\"#/oneOf/1/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key1},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data.type !== undefined){if(\"commit\" !== data.type){const err15 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/1/properties/type/const\",keyword:\"const\",params:{allowedValue: \"commit\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data.id !== undefined){let data4 = data.id;if(typeof data4 === \"string\"){if(!pattern0.test(data4)){const err16 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}else {const err17 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data.branch !== undefined){let data5 = data.branch;if(typeof data5 === \"string\"){if(!pattern0.test(data5)){const err18 = {instancePath:instancePath+\"/branch\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}else {const err19 = {instancePath:instancePath+\"/branch\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}if(data.copy !== undefined){let data6 = data.copy;if(typeof data6 === \"string\"){if(!pattern0.test(data6)){const err20 = {instancePath:instancePath+\"/copy\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}else {const err21 = {instancePath:instancePath+\"/copy\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}if(data.merge !== undefined){let data7 = data.merge;if(typeof data7 === \"string\"){if(!pattern0.test(data7)){const err22 = {instancePath:instancePath+\"/merge\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}else {const err23 = {instancePath:instancePath+\"/merge\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}if(data.hash !== undefined){let data8 = data.hash;if(typeof data8 === \"string\"){if(!pattern36.test(data8)){const err24 = {instancePath:instancePath+\"/hash\",schemaPath:\"#/definitions/hash/pattern\",keyword:\"pattern\",params:{pattern: \"^[0-9a-f]{4,40}$\"},message:\"must match pattern \\\"\"+\"^[0-9a-f]{4,40}$\"+\"\\\"\"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}else {const err25 = {instancePath:instancePath+\"/hash\",schemaPath:\"#/definitions/hash/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}if(data.note !== undefined){let data9 = data.note;if(typeof data9 === \"string\"){if(func2(data9) < 1){const err26 = {instancePath:instancePath+\"/note\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}else {const err27 = {instancePath:instancePath+\"/note\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}}}else {const err28 = {instancePath,schemaPath:\"#/oneOf/1/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}}else if(tag0 === \"strip\"){const _errs36 = errors;let valid14 = false;const _errs37 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.value === undefined){const err29 = {instancePath,schemaPath:\"#/oneOf/2/anyOf/0/required\",keyword:\"required\",params:{missingProperty: \"value\"},message:\"must have required property '\"+\"value\"+\"'\"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}}var _valid0 = _errs37 === errors;valid14 = valid14 || _valid0;if(!valid14){const _errs38 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.tag === undefined){const err30 = {instancePath,schemaPath:\"#/oneOf/2/anyOf/1/required\",keyword:\"required\",params:{missingProperty: \"tag\"},message:\"must have required property '\"+\"tag\"+\"'\"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}}var _valid0 = _errs38 === errors;valid14 = valid14 || _valid0;}if(!valid14){const err31 = {instancePath,schemaPath:\"#/oneOf/2/anyOf\",keyword:\"anyOf\",params:{},message:\"must match a schema in anyOf\"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}else {errors = _errs36;if(vErrors !== null){if(_errs36){vErrors.length = _errs36;}else {vErrors = null;}}}if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err32 = {instancePath,schemaPath:\"#/oneOf/2/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}if(data.field === undefined){const err33 = {instancePath,schemaPath:\"#/oneOf/2/required\",keyword:\"required\",params:{missingProperty: \"field\"},message:\"must have required property '\"+\"field\"+\"'\"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}for(const key2 in data){if(!((((key2 === \"type\") || (key2 === \"field\")) || (key2 === \"value\")) || (key2 === \"tag\"))){const err34 = {instancePath,schemaPath:\"#/oneOf/2/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key2},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}}if(data.type !== undefined){if(\"strip\" !== data.type){const err35 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/2/properties/type/const\",keyword:\"const\",params:{allowedValue: \"strip\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}}if(data.field !== undefined){let data11 = data.field;if(typeof data11 === \"string\"){if(func2(data11) < 1){const err36 = {instancePath:instancePath+\"/field\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}}else {const err37 = {instancePath:instancePath+\"/field\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}}if(data.value !== undefined){let data12 = data.value;if(typeof data12 === \"string\"){if(func2(data12) < 1){const err38 = {instancePath:instancePath+\"/value\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}}else {const err39 = {instancePath:instancePath+\"/value\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}}if(data.tag !== undefined){let data13 = data.tag;if(typeof data13 === \"string\"){if(func2(data13) < 1){const err40 = {instancePath:instancePath+\"/tag\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}}else {const err41 = {instancePath:instancePath+\"/tag\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}}}else {const err42 = {instancePath,schemaPath:\"#/oneOf/2/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}}else if(tag0 === \"action\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err43 = {instancePath,schemaPath:\"#/oneOf/3/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}if(data.box === undefined){const err44 = {instancePath,schemaPath:\"#/oneOf/3/required\",keyword:\"required\",params:{missingProperty: \"box\"},message:\"must have required property '\"+\"box\"+\"'\"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}if(data.label === undefined){const err45 = {instancePath,schemaPath:\"#/oneOf/3/required\",keyword:\"required\",params:{missingProperty: \"label\"},message:\"must have required property '\"+\"label\"+\"'\"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}for(const key3 in data){if(!(((key3 === \"type\") || (key3 === \"box\")) || (key3 === \"label\"))){const err46 = {instancePath,schemaPath:\"#/oneOf/3/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key3},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}}if(data.type !== undefined){if(\"action\" !== data.type){const err47 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/3/properties/type/const\",keyword:\"const\",params:{allowedValue: \"action\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}}if(data.box !== undefined){let data15 = data.box;if(typeof data15 === \"string\"){if(!pattern0.test(data15)){const err48 = {instancePath:instancePath+\"/box\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}}else {const err49 = {instancePath:instancePath+\"/box\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}}if(data.label !== undefined){let data16 = data.label;if(typeof data16 === \"string\"){if(func2(data16) < 1){const err50 = {instancePath:instancePath+\"/label\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}}else {const err51 = {instancePath:instancePath+\"/label\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}}}else {const err52 = {instancePath,schemaPath:\"#/oneOf/3/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err52];}else {vErrors.push(err52);}errors++;}}else if(tag0 === \"swap\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err53 = {instancePath,schemaPath:\"#/oneOf/4/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err53];}else {vErrors.push(err53);}errors++;}if(data.box === undefined){const err54 = {instancePath,schemaPath:\"#/oneOf/4/required\",keyword:\"required\",params:{missingProperty: \"box\"},message:\"must have required property '\"+\"box\"+\"'\"};if(vErrors === null){vErrors = [err54];}else {vErrors.push(err54);}errors++;}if(data.text === undefined){const err55 = {instancePath,schemaPath:\"#/oneOf/4/required\",keyword:\"required\",params:{missingProperty: \"text\"},message:\"must have required property '\"+\"text\"+\"'\"};if(vErrors === null){vErrors = [err55];}else {vErrors.push(err55);}errors++;}for(const key4 in data){if(!((((key4 === \"type\") || (key4 === \"box\")) || (key4 === \"text\")) || (key4 === \"color\"))){const err56 = {instancePath,schemaPath:\"#/oneOf/4/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key4},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err56];}else {vErrors.push(err56);}errors++;}}if(data.type !== undefined){if(\"swap\" !== data.type){const err57 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/4/properties/type/const\",keyword:\"const\",params:{allowedValue: \"swap\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err57];}else {vErrors.push(err57);}errors++;}}if(data.box !== undefined){let data18 = data.box;if(typeof data18 === \"string\"){if(!pattern0.test(data18)){const err58 = {instancePath:instancePath+\"/box\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err58];}else {vErrors.push(err58);}errors++;}}else {const err59 = {instancePath:instancePath+\"/box\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err59];}else {vErrors.push(err59);}errors++;}}if(data.text !== undefined){let data19 = data.text;if(typeof data19 === \"string\"){if(func2(data19) < 1){const err60 = {instancePath:instancePath+\"/text\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err60];}else {vErrors.push(err60);}errors++;}}else {const err61 = {instancePath:instancePath+\"/text\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err61];}else {vErrors.push(err61);}errors++;}}if(data.color !== undefined){let data20 = data.color;if(!(((((((data20 === \"blue\") || (data20 === \"amber\")) || (data20 === \"green\")) || (data20 === \"violet\")) || (data20 === \"rose\")) || (data20 === \"slate\")) || (data20 === \"coin\"))){const err62 = {instancePath:instancePath+\"/color\",schemaPath:\"#/definitions/color/enum\",keyword:\"enum\",params:{allowedValues: schema102.enum},message:\"must be equal to one of the allowed values\"};if(vErrors === null){vErrors = [err62];}else {vErrors.push(err62);}errors++;}}}else {const err63 = {instancePath,schemaPath:\"#/oneOf/4/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err63];}else {vErrors.push(err63);}errors++;}}else if(tag0 === \"edge\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err64 = {instancePath,schemaPath:\"#/oneOf/5/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err64];}else {vErrors.push(err64);}errors++;}if(data.from === undefined){const err65 = {instancePath,schemaPath:\"#/oneOf/5/required\",keyword:\"required\",params:{missingProperty: \"from\"},message:\"must have required property '\"+\"from\"+\"'\"};if(vErrors === null){vErrors = [err65];}else {vErrors.push(err65);}errors++;}if(data.to === undefined){const err66 = {instancePath,schemaPath:\"#/oneOf/5/required\",keyword:\"required\",params:{missingProperty: \"to\"},message:\"must have required property '\"+\"to\"+\"'\"};if(vErrors === null){vErrors = [err66];}else {vErrors.push(err66);}errors++;}if(data.carry === undefined){const err67 = {instancePath,schemaPath:\"#/oneOf/5/required\",keyword:\"required\",params:{missingProperty: \"carry\"},message:\"must have required property '\"+\"carry\"+\"'\"};if(vErrors === null){vErrors = [err67];}else {vErrors.push(err67);}errors++;}for(const key5 in data){if(!((((((((key5 === \"type\") || (key5 === \"from\")) || (key5 === \"to\")) || (key5 === \"label\")) || (key5 === \"carry\")) || (key5 === \"labelSide\")) || (key5 === \"at\")) || (key5 === \"into\"))){const err68 = {instancePath,schemaPath:\"#/oneOf/5/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key5},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err68];}else {vErrors.push(err68);}errors++;}}if(data.type !== undefined){if(\"edge\" !== data.type){const err69 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/5/properties/type/const\",keyword:\"const\",params:{allowedValue: \"edge\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err69];}else {vErrors.push(err69);}errors++;}}if(data.from !== undefined){let data22 = data.from;if(typeof data22 === \"string\"){if(!pattern0.test(data22)){const err70 = {instancePath:instancePath+\"/from\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err70];}else {vErrors.push(err70);}errors++;}}else {const err71 = {instancePath:instancePath+\"/from\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err71];}else {vErrors.push(err71);}errors++;}}if(data.to !== undefined){let data23 = data.to;if(typeof data23 === \"string\"){if(!pattern0.test(data23)){const err72 = {instancePath:instancePath+\"/to\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err72];}else {vErrors.push(err72);}errors++;}}else {const err73 = {instancePath:instancePath+\"/to\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err73];}else {vErrors.push(err73);}errors++;}}if(data.label !== undefined){let data24 = data.label;if(typeof data24 === \"string\"){if(func2(data24) < 1){const err74 = {instancePath:instancePath+\"/label\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err74];}else {vErrors.push(err74);}errors++;}}else {const err75 = {instancePath:instancePath+\"/label\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err75];}else {vErrors.push(err75);}errors++;}}if(data.carry !== undefined){if(!(validate68(data.carry, {instancePath:instancePath+\"/carry\",parentData:data,parentDataProperty:\"carry\",rootData}))){vErrors = vErrors === null ? validate68.errors : vErrors.concat(validate68.errors);errors = vErrors.length;}}if(data.labelSide !== undefined){let data26 = data.labelSide;if(!((((data26 === \"above\") || (data26 === \"below\")) || (data26 === \"left\")) || (data26 === \"right\"))){const err76 = {instancePath:instancePath+\"/labelSide\",schemaPath:\"#/oneOf/5/properties/labelSide/enum\",keyword:\"enum\",params:{allowedValues: schema208.oneOf[5].properties.labelSide.enum},message:\"must be equal to one of the allowed values\"};if(vErrors === null){vErrors = [err76];}else {vErrors.push(err76);}errors++;}}if(data.at !== undefined){let data27 = data.at;if(!(((typeof data27 == \"number\") && (!(data27 % 1) && !isNaN(data27))) && (isFinite(data27)))){const err77 = {instancePath:instancePath+\"/at\",schemaPath:\"#/definitions/unit/type\",keyword:\"type\",params:{type: \"integer\"},message:\"must be integer\"};if(vErrors === null){vErrors = [err77];}else {vErrors.push(err77);}errors++;}if((typeof data27 == \"number\") && (isFinite(data27))){if(data27 < 0 || isNaN(data27)){const err78 = {instancePath:instancePath+\"/at\",schemaPath:\"#/definitions/unit/minimum\",keyword:\"minimum\",params:{comparison: \">=\", limit: 0},message:\"must be >= 0\"};if(vErrors === null){vErrors = [err78];}else {vErrors.push(err78);}errors++;}}}if(data.into !== undefined){let data28 = data.into;if(!(((typeof data28 == \"number\") && (!(data28 % 1) && !isNaN(data28))) && (isFinite(data28)))){const err79 = {instancePath:instancePath+\"/into\",schemaPath:\"#/definitions/unit/type\",keyword:\"type\",params:{type: \"integer\"},message:\"must be integer\"};if(vErrors === null){vErrors = [err79];}else {vErrors.push(err79);}errors++;}if((typeof data28 == \"number\") && (isFinite(data28))){if(data28 < 0 || isNaN(data28)){const err80 = {instancePath:instancePath+\"/into\",schemaPath:\"#/definitions/unit/minimum\",keyword:\"minimum\",params:{comparison: \">=\", limit: 0},message:\"must be >= 0\"};if(vErrors === null){vErrors = [err80];}else {vErrors.push(err80);}errors++;}}}}else {const err81 = {instancePath,schemaPath:\"#/oneOf/5/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err81];}else {vErrors.push(err81);}errors++;}}else if(tag0 === \"now\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err82 = {instancePath,schemaPath:\"#/oneOf/6/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err82];}else {vErrors.push(err82);}errors++;}if(data.to === undefined){const err83 = {instancePath,schemaPath:\"#/oneOf/6/required\",keyword:\"required\",params:{missingProperty: \"to\"},message:\"must have required property '\"+\"to\"+\"'\"};if(vErrors === null){vErrors = [err83];}else {vErrors.push(err83);}errors++;}for(const key6 in data){if(!((key6 === \"type\") || (key6 === \"to\"))){const err84 = {instancePath,schemaPath:\"#/oneOf/6/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key6},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err84];}else {vErrors.push(err84);}errors++;}}if(data.type !== undefined){if(\"now\" !== data.type){const err85 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/6/properties/type/const\",keyword:\"const\",params:{allowedValue: \"now\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err85];}else {vErrors.push(err85);}errors++;}}if(data.to !== undefined){let data30 = data.to;if(!(((typeof data30 == \"number\") && (!(data30 % 1) && !isNaN(data30))) && (isFinite(data30)))){const err86 = {instancePath:instancePath+\"/to\",schemaPath:\"#/definitions/unit/type\",keyword:\"type\",params:{type: \"integer\"},message:\"must be integer\"};if(vErrors === null){vErrors = [err86];}else {vErrors.push(err86);}errors++;}if((typeof data30 == \"number\") && (isFinite(data30))){if(data30 < 0 || isNaN(data30)){const err87 = {instancePath:instancePath+\"/to\",schemaPath:\"#/definitions/unit/minimum\",keyword:\"minimum\",params:{comparison: \">=\", limit: 0},message:\"must be >= 0\"};if(vErrors === null){vErrors = [err87];}else {vErrors.push(err87);}errors++;}}}}else {const err88 = {instancePath,schemaPath:\"#/oneOf/6/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err88];}else {vErrors.push(err88);}errors++;}}else if(tag0 === \"span\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err89 = {instancePath,schemaPath:\"#/oneOf/7/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err89];}else {vErrors.push(err89);}errors++;}if(data.from === undefined){const err90 = {instancePath,schemaPath:\"#/oneOf/7/required\",keyword:\"required\",params:{missingProperty: \"from\"},message:\"must have required property '\"+\"from\"+\"'\"};if(vErrors === null){vErrors = [err90];}else {vErrors.push(err90);}errors++;}if(data.to === undefined){const err91 = {instancePath,schemaPath:\"#/oneOf/7/required\",keyword:\"required\",params:{missingProperty: \"to\"},message:\"must have required property '\"+\"to\"+\"'\"};if(vErrors === null){vErrors = [err91];}else {vErrors.push(err91);}errors++;}if(data.text === undefined){const err92 = {instancePath,schemaPath:\"#/oneOf/7/required\",keyword:\"required\",params:{missingProperty: \"text\"},message:\"must have required property '\"+\"text\"+\"'\"};if(vErrors === null){vErrors = [err92];}else {vErrors.push(err92);}errors++;}for(const key7 in data){if(!((((((key7 === \"type\") || (key7 === \"from\")) || (key7 === \"to\")) || (key7 === \"text\")) || (key7 === \"shape\")) || (key7 === \"color\"))){const err93 = {instancePath,schemaPath:\"#/oneOf/7/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key7},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err93];}else {vErrors.push(err93);}errors++;}}if(data.type !== undefined){if(\"span\" !== data.type){const err94 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/7/properties/type/const\",keyword:\"const\",params:{allowedValue: \"span\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err94];}else {vErrors.push(err94);}errors++;}}if(data.from !== undefined){let data32 = data.from;if(!(((typeof data32 == \"number\") && (!(data32 % 1) && !isNaN(data32))) && (isFinite(data32)))){const err95 = {instancePath:instancePath+\"/from\",schemaPath:\"#/definitions/unit/type\",keyword:\"type\",params:{type: \"integer\"},message:\"must be integer\"};if(vErrors === null){vErrors = [err95];}else {vErrors.push(err95);}errors++;}if((typeof data32 == \"number\") && (isFinite(data32))){if(data32 < 0 || isNaN(data32)){const err96 = {instancePath:instancePath+\"/from\",schemaPath:\"#/definitions/unit/minimum\",keyword:\"minimum\",params:{comparison: \">=\", limit: 0},message:\"must be >= 0\"};if(vErrors === null){vErrors = [err96];}else {vErrors.push(err96);}errors++;}}}if(data.to !== undefined){let data33 = data.to;if(!(((typeof data33 == \"number\") && (!(data33 % 1) && !isNaN(data33))) && (isFinite(data33)))){const err97 = {instancePath:instancePath+\"/to\",schemaPath:\"#/definitions/unit/type\",keyword:\"type\",params:{type: \"integer\"},message:\"must be integer\"};if(vErrors === null){vErrors = [err97];}else {vErrors.push(err97);}errors++;}if((typeof data33 == \"number\") && (isFinite(data33))){if(data33 < 0 || isNaN(data33)){const err98 = {instancePath:instancePath+\"/to\",schemaPath:\"#/definitions/unit/minimum\",keyword:\"minimum\",params:{comparison: \">=\", limit: 0},message:\"must be >= 0\"};if(vErrors === null){vErrors = [err98];}else {vErrors.push(err98);}errors++;}}}if(data.text !== undefined){let data34 = data.text;if(typeof data34 === \"string\"){if(func2(data34) < 1){const err99 = {instancePath:instancePath+\"/text\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err99];}else {vErrors.push(err99);}errors++;}}else {const err100 = {instancePath:instancePath+\"/text\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err100];}else {vErrors.push(err100);}errors++;}}if(data.shape !== undefined){if(!(data.shape === \"box\")){const err101 = {instancePath:instancePath+\"/shape\",schemaPath:\"#/oneOf/7/properties/shape/enum\",keyword:\"enum\",params:{allowedValues: schema208.oneOf[7].properties.shape.enum},message:\"must be equal to one of the allowed values\"};if(vErrors === null){vErrors = [err101];}else {vErrors.push(err101);}errors++;}}if(data.color !== undefined){let data36 = data.color;if(!(((((((data36 === \"blue\") || (data36 === \"amber\")) || (data36 === \"green\")) || (data36 === \"violet\")) || (data36 === \"rose\")) || (data36 === \"slate\")) || (data36 === \"coin\"))){const err102 = {instancePath:instancePath+\"/color\",schemaPath:\"#/definitions/color/enum\",keyword:\"enum\",params:{allowedValues: schema102.enum},message:\"must be equal to one of the allowed values\"};if(vErrors === null){vErrors = [err102];}else {vErrors.push(err102);}errors++;}}}else {const err103 = {instancePath,schemaPath:\"#/oneOf/7/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err103];}else {vErrors.push(err103);}errors++;}}else if(tag0 === \"mark\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err104 = {instancePath,schemaPath:\"#/oneOf/8/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err104];}else {vErrors.push(err104);}errors++;}if(data.row === undefined){const err105 = {instancePath,schemaPath:\"#/oneOf/8/required\",keyword:\"required\",params:{missingProperty: \"row\"},message:\"must have required property '\"+\"row\"+\"'\"};if(vErrors === null){vErrors = [err105];}else {vErrors.push(err105);}errors++;}if(data.from === undefined){const err106 = {instancePath,schemaPath:\"#/oneOf/8/required\",keyword:\"required\",params:{missingProperty: \"from\"},message:\"must have required property '\"+\"from\"+\"'\"};if(vErrors === null){vErrors = [err106];}else {vErrors.push(err106);}errors++;}if(data.to === undefined){const err107 = {instancePath,schemaPath:\"#/oneOf/8/required\",keyword:\"required\",params:{missingProperty: \"to\"},message:\"must have required property '\"+\"to\"+\"'\"};if(vErrors === null){vErrors = [err107];}else {vErrors.push(err107);}errors++;}if(data.color === undefined){const err108 = {instancePath,schemaPath:\"#/oneOf/8/required\",keyword:\"required\",params:{missingProperty: \"color\"},message:\"must have required property '\"+\"color\"+\"'\"};if(vErrors === null){vErrors = [err108];}else {vErrors.push(err108);}errors++;}for(const key8 in data){if(!(((((key8 === \"type\") || (key8 === \"row\")) || (key8 === \"from\")) || (key8 === \"to\")) || (key8 === \"color\"))){const err109 = {instancePath,schemaPath:\"#/oneOf/8/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key8},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err109];}else {vErrors.push(err109);}errors++;}}if(data.type !== undefined){if(\"mark\" !== data.type){const err110 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/8/properties/type/const\",keyword:\"const\",params:{allowedValue: \"mark\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err110];}else {vErrors.push(err110);}errors++;}}if(data.row !== undefined){let data38 = data.row;if(typeof data38 === \"string\"){if(!pattern0.test(data38)){const err111 = {instancePath:instancePath+\"/row\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err111];}else {vErrors.push(err111);}errors++;}}else {const err112 = {instancePath:instancePath+\"/row\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err112];}else {vErrors.push(err112);}errors++;}}if(data.from !== undefined){let data39 = data.from;if(!(((typeof data39 == \"number\") && (!(data39 % 1) && !isNaN(data39))) && (isFinite(data39)))){const err113 = {instancePath:instancePath+\"/from\",schemaPath:\"#/definitions/unit/type\",keyword:\"type\",params:{type: \"integer\"},message:\"must be integer\"};if(vErrors === null){vErrors = [err113];}else {vErrors.push(err113);}errors++;}if((typeof data39 == \"number\") && (isFinite(data39))){if(data39 < 0 || isNaN(data39)){const err114 = {instancePath:instancePath+\"/from\",schemaPath:\"#/definitions/unit/minimum\",keyword:\"minimum\",params:{comparison: \">=\", limit: 0},message:\"must be >= 0\"};if(vErrors === null){vErrors = [err114];}else {vErrors.push(err114);}errors++;}}}if(data.to !== undefined){let data40 = data.to;if(!(((typeof data40 == \"number\") && (!(data40 % 1) && !isNaN(data40))) && (isFinite(data40)))){const err115 = {instancePath:instancePath+\"/to\",schemaPath:\"#/definitions/unit/type\",keyword:\"type\",params:{type: \"integer\"},message:\"must be integer\"};if(vErrors === null){vErrors = [err115];}else {vErrors.push(err115);}errors++;}if((typeof data40 == \"number\") && (isFinite(data40))){if(data40 < 0 || isNaN(data40)){const err116 = {instancePath:instancePath+\"/to\",schemaPath:\"#/definitions/unit/minimum\",keyword:\"minimum\",params:{comparison: \">=\", limit: 0},message:\"must be >= 0\"};if(vErrors === null){vErrors = [err116];}else {vErrors.push(err116);}errors++;}}}if(data.color !== undefined){let data41 = data.color;if(!(((((((data41 === \"blue\") || (data41 === \"amber\")) || (data41 === \"green\")) || (data41 === \"violet\")) || (data41 === \"rose\")) || (data41 === \"slate\")) || (data41 === \"coin\"))){const err117 = {instancePath:instancePath+\"/color\",schemaPath:\"#/definitions/color/enum\",keyword:\"enum\",params:{allowedValues: schema102.enum},message:\"must be equal to one of the allowed values\"};if(vErrors === null){vErrors = [err117];}else {vErrors.push(err117);}errors++;}}}else {const err118 = {instancePath,schemaPath:\"#/oneOf/8/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err118];}else {vErrors.push(err118);}errors++;}}else if(tag0 === \"leaf\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err119 = {instancePath,schemaPath:\"#/oneOf/9/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err119];}else {vErrors.push(err119);}errors++;}if(data.id === undefined){const err120 = {instancePath,schemaPath:\"#/oneOf/9/required\",keyword:\"required\",params:{missingProperty: \"id\"},message:\"must have required property '\"+\"id\"+\"'\"};if(vErrors === null){vErrors = [err120];}else {vErrors.push(err120);}errors++;}for(const key9 in data){if(!(((key9 === \"type\") || (key9 === \"id\")) || (key9 === \"hash\"))){const err121 = {instancePath,schemaPath:\"#/oneOf/9/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key9},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err121];}else {vErrors.push(err121);}errors++;}}if(data.type !== undefined){if(\"leaf\" !== data.type){const err122 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/9/properties/type/const\",keyword:\"const\",params:{allowedValue: \"leaf\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err122];}else {vErrors.push(err122);}errors++;}}if(data.id !== undefined){let data43 = data.id;if(typeof data43 === \"string\"){if(!pattern0.test(data43)){const err123 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err123];}else {vErrors.push(err123);}errors++;}}else {const err124 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err124];}else {vErrors.push(err124);}errors++;}}if(data.hash !== undefined){let data44 = data.hash;if(typeof data44 === \"string\"){if(!pattern36.test(data44)){const err125 = {instancePath:instancePath+\"/hash\",schemaPath:\"#/definitions/hash/pattern\",keyword:\"pattern\",params:{pattern: \"^[0-9a-f]{4,40}$\"},message:\"must match pattern \\\"\"+\"^[0-9a-f]{4,40}$\"+\"\\\"\"};if(vErrors === null){vErrors = [err125];}else {vErrors.push(err125);}errors++;}}else {const err126 = {instancePath:instancePath+\"/hash\",schemaPath:\"#/definitions/hash/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err126];}else {vErrors.push(err126);}errors++;}}}else {const err127 = {instancePath,schemaPath:\"#/oneOf/9/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err127];}else {vErrors.push(err127);}errors++;}}else if(tag0 === \"node\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err128 = {instancePath,schemaPath:\"#/oneOf/10/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err128];}else {vErrors.push(err128);}errors++;}if(data.id === undefined){const err129 = {instancePath,schemaPath:\"#/oneOf/10/required\",keyword:\"required\",params:{missingProperty: \"id\"},message:\"must have required property '\"+\"id\"+\"'\"};if(vErrors === null){vErrors = [err129];}else {vErrors.push(err129);}errors++;}if(data.children === undefined){const err130 = {instancePath,schemaPath:\"#/oneOf/10/required\",keyword:\"required\",params:{missingProperty: \"children\"},message:\"must have required property '\"+\"children\"+\"'\"};if(vErrors === null){vErrors = [err130];}else {vErrors.push(err130);}errors++;}for(const key10 in data){if(!((((key10 === \"type\") || (key10 === \"id\")) || (key10 === \"children\")) || (key10 === \"hash\"))){const err131 = {instancePath,schemaPath:\"#/oneOf/10/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key10},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err131];}else {vErrors.push(err131);}errors++;}}if(data.type !== undefined){if(\"node\" !== data.type){const err132 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/10/properties/type/const\",keyword:\"const\",params:{allowedValue: \"node\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err132];}else {vErrors.push(err132);}errors++;}}if(data.id !== undefined){let data46 = data.id;if(typeof data46 === \"string\"){if(!pattern0.test(data46)){const err133 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err133];}else {vErrors.push(err133);}errors++;}}else {const err134 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err134];}else {vErrors.push(err134);}errors++;}}if(data.children !== undefined){let data47 = data.children;if(Array.isArray(data47)){if(data47.length < 1){const err135 = {instancePath:instancePath+\"/children\",schemaPath:\"#/oneOf/10/properties/children/minItems\",keyword:\"minItems\",params:{limit: 1},message:\"must NOT have fewer than 1 items\"};if(vErrors === null){vErrors = [err135];}else {vErrors.push(err135);}errors++;}const len0 = data47.length;for(let i0=0; i0<len0; i0++){let data48 = data47[i0];if(typeof data48 === \"string\"){if(!pattern0.test(data48)){const err136 = {instancePath:instancePath+\"/children/\" + i0,schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err136];}else {vErrors.push(err136);}errors++;}}else {const err137 = {instancePath:instancePath+\"/children/\" + i0,schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err137];}else {vErrors.push(err137);}errors++;}}}else {const err138 = {instancePath:instancePath+\"/children\",schemaPath:\"#/oneOf/10/properties/children/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err138];}else {vErrors.push(err138);}errors++;}}if(data.hash !== undefined){let data49 = data.hash;if(typeof data49 === \"string\"){if(!pattern36.test(data49)){const err139 = {instancePath:instancePath+\"/hash\",schemaPath:\"#/definitions/hash/pattern\",keyword:\"pattern\",params:{pattern: \"^[0-9a-f]{4,40}$\"},message:\"must match pattern \\\"\"+\"^[0-9a-f]{4,40}$\"+\"\\\"\"};if(vErrors === null){vErrors = [err139];}else {vErrors.push(err139);}errors++;}}else {const err140 = {instancePath:instancePath+\"/hash\",schemaPath:\"#/definitions/hash/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err140];}else {vErrors.push(err140);}errors++;}}}else {const err141 = {instancePath,schemaPath:\"#/oneOf/10/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err141];}else {vErrors.push(err141);}errors++;}}else if(tag0 === \"line\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err142 = {instancePath,schemaPath:\"#/oneOf/11/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err142];}else {vErrors.push(err142);}errors++;}if(data.items === undefined){const err143 = {instancePath,schemaPath:\"#/oneOf/11/required\",keyword:\"required\",params:{missingProperty: \"items\"},message:\"must have required property '\"+\"items\"+\"'\"};if(vErrors === null){vErrors = [err143];}else {vErrors.push(err143);}errors++;}for(const key11 in data){if(!((((key11 === \"type\") || (key11 === \"box\")) || (key11 === \"part\")) || (key11 === \"items\"))){const err144 = {instancePath,schemaPath:\"#/oneOf/11/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key11},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err144];}else {vErrors.push(err144);}errors++;}}if(data.type !== undefined){if(\"line\" !== data.type){const err145 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/11/properties/type/const\",keyword:\"const\",params:{allowedValue: \"line\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err145];}else {vErrors.push(err145);}errors++;}}if(data.box !== undefined){let data51 = data.box;if(typeof data51 === \"string\"){if(!pattern0.test(data51)){const err146 = {instancePath:instancePath+\"/box\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err146];}else {vErrors.push(err146);}errors++;}}else {const err147 = {instancePath:instancePath+\"/box\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err147];}else {vErrors.push(err147);}errors++;}}if(data.part !== undefined){let data52 = data.part;if(typeof data52 === \"string\"){if(!pattern0.test(data52)){const err148 = {instancePath:instancePath+\"/part\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err148];}else {vErrors.push(err148);}errors++;}}else {const err149 = {instancePath:instancePath+\"/part\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err149];}else {vErrors.push(err149);}errors++;}}if(data.items !== undefined){let data53 = data.items;if(Array.isArray(data53)){if(data53.length > 12){const err150 = {instancePath:instancePath+\"/items\",schemaPath:\"#/oneOf/11/properties/items/maxItems\",keyword:\"maxItems\",params:{limit: 12},message:\"must NOT have more than 12 items\"};if(vErrors === null){vErrors = [err150];}else {vErrors.push(err150);}errors++;}if(data53.length < 1){const err151 = {instancePath:instancePath+\"/items\",schemaPath:\"#/oneOf/11/properties/items/minItems\",keyword:\"minItems\",params:{limit: 1},message:\"must NOT have fewer than 1 items\"};if(vErrors === null){vErrors = [err151];}else {vErrors.push(err151);}errors++;}const len1 = data53.length;for(let i1=0; i1<len1; i1++){let data54 = data53[i1];if(typeof data54 === \"string\"){if(!pattern0.test(data54)){const err152 = {instancePath:instancePath+\"/items/\" + i1,schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err152];}else {vErrors.push(err152);}errors++;}}else {const err153 = {instancePath:instancePath+\"/items/\" + i1,schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err153];}else {vErrors.push(err153);}errors++;}}}else {const err154 = {instancePath:instancePath+\"/items\",schemaPath:\"#/oneOf/11/properties/items/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err154];}else {vErrors.push(err154);}errors++;}}}else {const err155 = {instancePath,schemaPath:\"#/oneOf/11/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err155];}else {vErrors.push(err155);}errors++;}}else if(tag0 === \"seal\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err156 = {instancePath,schemaPath:\"#/oneOf/12/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err156];}else {vErrors.push(err156);}errors++;}if(data.box === undefined){const err157 = {instancePath,schemaPath:\"#/oneOf/12/required\",keyword:\"required\",params:{missingProperty: \"box\"},message:\"must have required property '\"+\"box\"+\"'\"};if(vErrors === null){vErrors = [err157];}else {vErrors.push(err157);}errors++;}for(const key12 in data){if(!((key12 === \"type\") || (key12 === \"box\"))){const err158 = {instancePath,schemaPath:\"#/oneOf/12/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key12},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err158];}else {vErrors.push(err158);}errors++;}}if(data.type !== undefined){if(\"seal\" !== data.type){const err159 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/12/properties/type/const\",keyword:\"const\",params:{allowedValue: \"seal\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err159];}else {vErrors.push(err159);}errors++;}}if(data.box !== undefined){let data56 = data.box;if(typeof data56 === \"string\"){if(!pattern0.test(data56)){const err160 = {instancePath:instancePath+\"/box\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err160];}else {vErrors.push(err160);}errors++;}}else {const err161 = {instancePath:instancePath+\"/box\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err161];}else {vErrors.push(err161);}errors++;}}}else {const err162 = {instancePath,schemaPath:\"#/oneOf/12/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err162];}else {vErrors.push(err162);}errors++;}}else if(tag0 === \"open\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err163 = {instancePath,schemaPath:\"#/oneOf/13/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err163];}else {vErrors.push(err163);}errors++;}if(data.box === undefined){const err164 = {instancePath,schemaPath:\"#/oneOf/13/required\",keyword:\"required\",params:{missingProperty: \"box\"},message:\"must have required property '\"+\"box\"+\"'\"};if(vErrors === null){vErrors = [err164];}else {vErrors.push(err164);}errors++;}for(const key13 in data){if(!((key13 === \"type\") || (key13 === \"box\"))){const err165 = {instancePath,schemaPath:\"#/oneOf/13/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key13},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err165];}else {vErrors.push(err165);}errors++;}}if(data.type !== undefined){if(\"open\" !== data.type){const err166 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/13/properties/type/const\",keyword:\"const\",params:{allowedValue: \"open\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err166];}else {vErrors.push(err166);}errors++;}}if(data.box !== undefined){let data58 = data.box;if(typeof data58 === \"string\"){if(!pattern0.test(data58)){const err167 = {instancePath:instancePath+\"/box\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err167];}else {vErrors.push(err167);}errors++;}}else {const err168 = {instancePath:instancePath+\"/box\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err168];}else {vErrors.push(err168);}errors++;}}}else {const err169 = {instancePath,schemaPath:\"#/oneOf/13/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err169];}else {vErrors.push(err169);}errors++;}}else if(tag0 === \"pick\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err170 = {instancePath,schemaPath:\"#/oneOf/14/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err170];}else {vErrors.push(err170);}errors++;}if(data.box === undefined){const err171 = {instancePath,schemaPath:\"#/oneOf/14/required\",keyword:\"required\",params:{missingProperty: \"box\"},message:\"must have required property '\"+\"box\"+\"'\"};if(vErrors === null){vErrors = [err171];}else {vErrors.push(err171);}errors++;}for(const key14 in data){if(!((key14 === \"type\") || (key14 === \"box\"))){const err172 = {instancePath,schemaPath:\"#/oneOf/14/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key14},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err172];}else {vErrors.push(err172);}errors++;}}if(data.type !== undefined){if(\"pick\" !== data.type){const err173 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/14/properties/type/const\",keyword:\"const\",params:{allowedValue: \"pick\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err173];}else {vErrors.push(err173);}errors++;}}if(data.box !== undefined){let data60 = data.box;if(typeof data60 === \"string\"){if(!pattern0.test(data60)){const err174 = {instancePath:instancePath+\"/box\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err174];}else {vErrors.push(err174);}errors++;}}else {const err175 = {instancePath:instancePath+\"/box\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err175];}else {vErrors.push(err175);}errors++;}}}else {const err176 = {instancePath,schemaPath:\"#/oneOf/14/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err176];}else {vErrors.push(err176);}errors++;}}else if(tag0 === \"stamp\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err177 = {instancePath,schemaPath:\"#/oneOf/15/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err177];}else {vErrors.push(err177);}errors++;}if(data.box === undefined){const err178 = {instancePath,schemaPath:\"#/oneOf/15/required\",keyword:\"required\",params:{missingProperty: \"box\"},message:\"must have required property '\"+\"box\"+\"'\"};if(vErrors === null){vErrors = [err178];}else {vErrors.push(err178);}errors++;}if(data.text === undefined){const err179 = {instancePath,schemaPath:\"#/oneOf/15/required\",keyword:\"required\",params:{missingProperty: \"text\"},message:\"must have required property '\"+\"text\"+\"'\"};if(vErrors === null){vErrors = [err179];}else {vErrors.push(err179);}errors++;}for(const key15 in data){if(!(((key15 === \"type\") || (key15 === \"box\")) || (key15 === \"text\"))){const err180 = {instancePath,schemaPath:\"#/oneOf/15/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key15},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err180];}else {vErrors.push(err180);}errors++;}}if(data.type !== undefined){if(\"stamp\" !== data.type){const err181 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/15/properties/type/const\",keyword:\"const\",params:{allowedValue: \"stamp\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err181];}else {vErrors.push(err181);}errors++;}}if(data.box !== undefined){let data62 = data.box;if(typeof data62 === \"string\"){if(!pattern0.test(data62)){const err182 = {instancePath:instancePath+\"/box\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err182];}else {vErrors.push(err182);}errors++;}}else {const err183 = {instancePath:instancePath+\"/box\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err183];}else {vErrors.push(err183);}errors++;}}if(data.text !== undefined){let data63 = data.text;if(typeof data63 === \"string\"){if(func2(data63) < 1){const err184 = {instancePath:instancePath+\"/text\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err184];}else {vErrors.push(err184);}errors++;}}else {const err185 = {instancePath:instancePath+\"/text\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err185];}else {vErrors.push(err185);}errors++;}}}else {const err186 = {instancePath,schemaPath:\"#/oneOf/15/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err186];}else {vErrors.push(err186);}errors++;}}else if(tag0 === \"role\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err187 = {instancePath,schemaPath:\"#/oneOf/16/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err187];}else {vErrors.push(err187);}errors++;}if(data.role === undefined){const err188 = {instancePath,schemaPath:\"#/oneOf/16/required\",keyword:\"required\",params:{missingProperty: \"role\"},message:\"must have required property '\"+\"role\"+\"'\"};if(vErrors === null){vErrors = [err188];}else {vErrors.push(err188);}errors++;}for(const key16 in data){if(!((key16 === \"type\") || (key16 === \"role\"))){const err189 = {instancePath,schemaPath:\"#/oneOf/16/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key16},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err189];}else {vErrors.push(err189);}errors++;}}if(data.type !== undefined){if(\"role\" !== data.type){const err190 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/16/properties/type/const\",keyword:\"const\",params:{allowedValue: \"role\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err190];}else {vErrors.push(err190);}errors++;}}if(data.role !== undefined){let data65 = data.role;if(typeof data65 === \"string\"){if(!pattern0.test(data65)){const err191 = {instancePath:instancePath+\"/role\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err191];}else {vErrors.push(err191);}errors++;}}else {const err192 = {instancePath:instancePath+\"/role\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err192];}else {vErrors.push(err192);}errors++;}}}else {const err193 = {instancePath,schemaPath:\"#/oneOf/16/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err193];}else {vErrors.push(err193);}errors++;}}else if(tag0 === \"ask\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err194 = {instancePath,schemaPath:\"#/oneOf/17/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err194];}else {vErrors.push(err194);}errors++;}if(data.values === undefined){const err195 = {instancePath,schemaPath:\"#/oneOf/17/required\",keyword:\"required\",params:{missingProperty: \"values\"},message:\"must have required property '\"+\"values\"+\"'\"};if(vErrors === null){vErrors = [err195];}else {vErrors.push(err195);}errors++;}for(const key17 in data){if(!((key17 === \"type\") || (key17 === \"values\"))){const err196 = {instancePath,schemaPath:\"#/oneOf/17/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key17},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err196];}else {vErrors.push(err196);}errors++;}}if(data.type !== undefined){if(\"ask\" !== data.type){const err197 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/17/properties/type/const\",keyword:\"const\",params:{allowedValue: \"ask\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err197];}else {vErrors.push(err197);}errors++;}}if(data.values !== undefined){let data67 = data.values;if(Array.isArray(data67)){if(data67.length < 1){const err198 = {instancePath:instancePath+\"/values\",schemaPath:\"#/oneOf/17/properties/values/minItems\",keyword:\"minItems\",params:{limit: 1},message:\"must NOT have fewer than 1 items\"};if(vErrors === null){vErrors = [err198];}else {vErrors.push(err198);}errors++;}const len2 = data67.length;for(let i2=0; i2<len2; i2++){let data68 = data67[i2];if(typeof data68 === \"string\"){if(func2(data68) < 1){const err199 = {instancePath:instancePath+\"/values/\" + i2,schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err199];}else {vErrors.push(err199);}errors++;}}else {const err200 = {instancePath:instancePath+\"/values/\" + i2,schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err200];}else {vErrors.push(err200);}errors++;}}}else {const err201 = {instancePath:instancePath+\"/values\",schemaPath:\"#/oneOf/17/properties/values/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err201];}else {vErrors.push(err201);}errors++;}}}else {const err202 = {instancePath,schemaPath:\"#/oneOf/17/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err202];}else {vErrors.push(err202);}errors++;}}else if(tag0 === \"item\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err203 = {instancePath,schemaPath:\"#/oneOf/18/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err203];}else {vErrors.push(err203);}errors++;}if(data.item === undefined){const err204 = {instancePath,schemaPath:\"#/oneOf/18/required\",keyword:\"required\",params:{missingProperty: \"item\"},message:\"must have required property '\"+\"item\"+\"'\"};if(vErrors === null){vErrors = [err204];}else {vErrors.push(err204);}errors++;}if(data.values === undefined){const err205 = {instancePath,schemaPath:\"#/oneOf/18/required\",keyword:\"required\",params:{missingProperty: \"values\"},message:\"must have required property '\"+\"values\"+\"'\"};if(vErrors === null){vErrors = [err205];}else {vErrors.push(err205);}errors++;}for(const key18 in data){if(!(((key18 === \"type\") || (key18 === \"item\")) || (key18 === \"values\"))){const err206 = {instancePath,schemaPath:\"#/oneOf/18/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key18},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err206];}else {vErrors.push(err206);}errors++;}}if(data.type !== undefined){if(\"item\" !== data.type){const err207 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/18/properties/type/const\",keyword:\"const\",params:{allowedValue: \"item\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err207];}else {vErrors.push(err207);}errors++;}}if(data.item !== undefined){let data70 = data.item;if(typeof data70 === \"string\"){if(!pattern0.test(data70)){const err208 = {instancePath:instancePath+\"/item\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err208];}else {vErrors.push(err208);}errors++;}}else {const err209 = {instancePath:instancePath+\"/item\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err209];}else {vErrors.push(err209);}errors++;}}if(data.values !== undefined){if(!(validate31(data.values, {instancePath:instancePath+\"/values\",parentData:data,parentDataProperty:\"values\",rootData}))){vErrors = vErrors === null ? validate31.errors : vErrors.concat(validate31.errors);errors = vErrors.length;}}}else {const err210 = {instancePath,schemaPath:\"#/oneOf/18/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err210];}else {vErrors.push(err210);}errors++;}}else if(tag0 === \"press\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err211 = {instancePath,schemaPath:\"#/oneOf/19/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err211];}else {vErrors.push(err211);}errors++;}if(data.press === undefined){const err212 = {instancePath,schemaPath:\"#/oneOf/19/required\",keyword:\"required\",params:{missingProperty: \"press\"},message:\"must have required property '\"+\"press\"+\"'\"};if(vErrors === null){vErrors = [err212];}else {vErrors.push(err212);}errors++;}for(const key19 in data){if(!((key19 === \"type\") || (key19 === \"press\"))){const err213 = {instancePath,schemaPath:\"#/oneOf/19/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key19},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err213];}else {vErrors.push(err213);}errors++;}}if(data.type !== undefined){if(\"press\" !== data.type){const err214 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/19/properties/type/const\",keyword:\"const\",params:{allowedValue: \"press\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err214];}else {vErrors.push(err214);}errors++;}}if(data.press !== undefined){let data73 = data.press;if(typeof data73 === \"string\"){if(!pattern0.test(data73)){const err215 = {instancePath:instancePath+\"/press\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err215];}else {vErrors.push(err215);}errors++;}}else {const err216 = {instancePath:instancePath+\"/press\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err216];}else {vErrors.push(err216);}errors++;}}}else {const err217 = {instancePath,schemaPath:\"#/oneOf/19/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err217];}else {vErrors.push(err217);}errors++;}}else {const err218 = {instancePath,schemaPath:\"#/discriminator\",keyword:\"discriminator\",params:{error: \"mapping\", tag: \"type\", tagValue: tag0},message:\"value of tag \\\"type\\\" must be in oneOf\"};if(vErrors === null){vErrors = [err218];}else {vErrors.push(err218);}errors++;}}else {const err219 = {instancePath,schemaPath:\"#/discriminator\",keyword:\"discriminator\",params:{error: \"tag\", tag: \"type\", tagValue: tag0},message:\"tag \\\"type\\\" must be string\"};if(vErrors === null){vErrors = [err219];}else {vErrors.push(err219);}errors++;}}else {const err220 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err220];}else {vErrors.push(err220);}errors++;}validate67.errors = vErrors;return errors === 0;}function validate64(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.title === undefined){const err0 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"title\"},message:\"must have required property '\"+\"title\"+\"'\"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.body === undefined){const err1 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"body\"},message:\"must have required property '\"+\"body\"+\"'\"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.events === undefined){const err2 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"events\"},message:\"must have required property '\"+\"events\"+\"'\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}for(const key0 in data){if(!(((((key0 === \"title\") || (key0 === \"body\")) || (key0 === \"code\")) || (key0 === \"sources\")) || (key0 === \"events\"))){const err3 = {instancePath,schemaPath:\"#/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key0},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.title !== undefined){let data0 = data.title;if(typeof data0 === \"string\"){if(func2(data0) < 1){const err4 = {instancePath:instancePath+\"/title\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}else {const err5 = {instancePath:instancePath+\"/title\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.body !== undefined){let data1 = data.body;if(typeof data1 === \"string\"){if(func2(data1) < 1){const err6 = {instancePath:instancePath+\"/body\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}else {const err7 = {instancePath:instancePath+\"/body\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.code !== undefined){let data2 = data.code;if(typeof data2 === \"string\"){if(func2(data2) < 1){const err8 = {instancePath:instancePath+\"/code\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}else {const err9 = {instancePath:instancePath+\"/code\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.sources !== undefined){let data3 = data.sources;if(Array.isArray(data3)){if(data3.length < 1){const err10 = {instancePath:instancePath+\"/sources\",schemaPath:\"#/properties/sources/minItems\",keyword:\"minItems\",params:{limit: 1},message:\"must NOT have fewer than 1 items\"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}const len0 = data3.length;for(let i0=0; i0<len0; i0++){if(!(validate65(data3[i0], {instancePath:instancePath+\"/sources/\" + i0,parentData:data3,parentDataProperty:i0,rootData}))){vErrors = vErrors === null ? validate65.errors : vErrors.concat(validate65.errors);errors = vErrors.length;}}}else {const err11 = {instancePath:instancePath+\"/sources\",schemaPath:\"#/properties/sources/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data.events !== undefined){let data5 = data.events;if(Array.isArray(data5)){const len1 = data5.length;for(let i1=0; i1<len1; i1++){if(!(validate67(data5[i1], {instancePath:instancePath+\"/events/\" + i1,parentData:data5,parentDataProperty:i1,rootData}))){vErrors = vErrors === null ? validate67.errors : vErrors.concat(validate67.errors);errors = vErrors.length;}}}else {const err12 = {instancePath:instancePath+\"/events\",schemaPath:\"#/properties/events/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}}else {const err13 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}validate64.errors = vErrors;return errors === 0;}const func7 = Object.prototype.hasOwnProperty;function validate10(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;const _errs2 = errors;let valid1 = true;const _errs3 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){let missing0;if((data.kind === undefined) && (missing0 = \"kind\")){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.kind !== undefined){if(\"lineup\" !== data.kind){const err1 = {};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}}}var _valid0 = _errs3 === errors;errors = _errs2;if(vErrors !== null){if(_errs2){vErrors.length = _errs2;}else {vErrors = null;}}if(!_valid0){const _errs5 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.blocks !== undefined){let data1 = data.blocks;if(data1 && typeof data1 == \"object\" && !Array.isArray(data1)){if(data1.box !== undefined){let data2 = data1.box;if(Array.isArray(data2)){const len0 = data2.length;for(let i0=0; i0<len0; i0++){let data3 = data2[i0];if(data3 && typeof data3 == \"object\" && !Array.isArray(data3)){if(data3.order !== undefined){const err2 = {instancePath:instancePath+\"/blocks/box/\" + i0+\"/order\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}}}}}}}var _valid0 = _errs5 === errors;valid1 = _valid0;}if(!valid1){const err3 = {instancePath,schemaPath:\"#/allOf/0/if\",keyword:\"if\",params:{failingKeyword: \"else\"},message:\"must match \\\"else\\\" schema\"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}const _errs12 = errors;let valid9 = true;const _errs13 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){let missing1;if((data.kind === undefined) && (missing1 = \"kind\")){const err4 = {};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}else {if(data.kind !== undefined){if(\"sequence\" !== data.kind){const err5 = {};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}}}var _valid1 = _errs13 === errors;errors = _errs12;if(vErrors !== null){if(_errs12){vErrors.length = _errs12;}else {vErrors = null;}}let ifClause0;if(_valid1){const _errs15 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.blocks !== undefined){let data6 = data.blocks;if(data6 && typeof data6 == \"object\" && !Array.isArray(data6)){if(data6.box === undefined){const err6 = {instancePath:instancePath+\"/blocks\",schemaPath:\"#/then/properties/blocks/required\",keyword:\"required\",params:{missingProperty: \"box\"},message:\"must have required property '\"+\"box\"+\"'\"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if(data6.box !== undefined){let data7 = data6.box;if(Array.isArray(data7)){if(data7.length < 1){const err7 = {instancePath:instancePath+\"/blocks/box\",schemaPath:\"#/then/properties/blocks/properties/box/minItems\",keyword:\"minItems\",params:{limit: 1},message:\"must NOT have fewer than 1 items\"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}}if(data6.strip !== undefined){if(!(validate11(data6.strip, {instancePath:instancePath+\"/blocks/strip\",parentData:data6,parentDataProperty:\"strip\",rootData}))){vErrors = vErrors === null ? validate11.errors : vErrors.concat(validate11.errors);errors = vErrors.length;}}if(data6.path !== undefined){const err8 = {instancePath:instancePath+\"/blocks/path\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if(data6.branch !== undefined){const err9 = {instancePath:instancePath+\"/blocks/branch\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}if(data6.scale !== undefined){const err10 = {instancePath:instancePath+\"/blocks/scale\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}if(data6.period !== undefined){const err11 = {instancePath:instancePath+\"/blocks/period\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}if(data6.row !== undefined){const err12 = {instancePath:instancePath+\"/blocks/row\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}if(data6.point !== undefined){const err13 = {instancePath:instancePath+\"/blocks/point\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}if(data6.zoom !== undefined){const err14 = {instancePath:instancePath+\"/blocks/zoom\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}if(data6.item !== undefined){const err15 = {instancePath:instancePath+\"/blocks/item\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}if(data6.role !== undefined){const err16 = {instancePath:instancePath+\"/blocks/role\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}if(data6.part !== undefined){const err17 = {instancePath:instancePath+\"/blocks/part\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}}if(data.steps !== undefined){if(!(validate13(data.steps, {instancePath:instancePath+\"/steps\",parentData:data,parentDataProperty:\"steps\",rootData}))){vErrors = vErrors === null ? validate13.errors : vErrors.concat(validate13.errors);errors = vErrors.length;}}}var _valid1 = _errs15 === errors;valid9 = _valid1;ifClause0 = \"then\";}else {const _errs50 = errors;const _errs51 = errors;let valid23 = true;const _errs52 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){let missing2;if((data.kind === undefined) && (missing2 = \"kind\")){const err18 = {};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}else {if(data.kind !== undefined){if(\"state\" !== data.kind){const err19 = {};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}}}var _valid2 = _errs52 === errors;errors = _errs51;if(vErrors !== null){if(_errs51){vErrors.length = _errs51;}else {vErrors = null;}}let ifClause1;if(_valid2){const _errs54 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.blocks !== undefined){let data21 = data.blocks;if(data21 && typeof data21 == \"object\" && !Array.isArray(data21)){if(data21.box === undefined){const err20 = {instancePath:instancePath+\"/blocks\",schemaPath:\"#/else/then/properties/blocks/required\",keyword:\"required\",params:{missingProperty: \"box\"},message:\"must have required property '\"+\"box\"+\"'\"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}if(data21.box !== undefined){let data22 = data21.box;if(Array.isArray(data22)){if(data22.length < 1){const err21 = {instancePath:instancePath+\"/blocks/box\",schemaPath:\"#/else/then/properties/blocks/properties/box/minItems\",keyword:\"minItems\",params:{limit: 1},message:\"must NOT have fewer than 1 items\"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}const len1 = data22.length;for(let i1=0; i1<len1; i1++){let data23 = data22[i1];if(data23 && typeof data23 == \"object\" && !Array.isArray(data23)){if(data23.id !== undefined){let data24 = data23.id;const _errs59 = errors;const _errs60 = errors;if(!((data24 === \"start\") || (data24 === \"finish\"))){const err22 = {};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}var valid30 = _errs60 === errors;if(valid30){const err23 = {instancePath:instancePath+\"/blocks/box/\" + i1+\"/id\",schemaPath:\"#/else/then/properties/blocks/properties/box/items/properties/id/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}else {errors = _errs59;if(vErrors !== null){if(_errs59){vErrors.length = _errs59;}else {vErrors = null;}}}}}}}}if(data21.strip !== undefined){if(!(validate11(data21.strip, {instancePath:instancePath+\"/blocks/strip\",parentData:data21,parentDataProperty:\"strip\",rootData}))){vErrors = vErrors === null ? validate11.errors : vErrors.concat(validate11.errors);errors = vErrors.length;}}if(data21.branch !== undefined){const err24 = {instancePath:instancePath+\"/blocks/branch\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}if(data21.scale !== undefined){const err25 = {instancePath:instancePath+\"/blocks/scale\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}if(data21.period !== undefined){const err26 = {instancePath:instancePath+\"/blocks/period\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}if(data21.row !== undefined){const err27 = {instancePath:instancePath+\"/blocks/row\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}if(data21.point !== undefined){const err28 = {instancePath:instancePath+\"/blocks/point\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}if(data21.zoom !== undefined){const err29 = {instancePath:instancePath+\"/blocks/zoom\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}if(data21.item !== undefined){const err30 = {instancePath:instancePath+\"/blocks/item\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}if(data21.role !== undefined){const err31 = {instancePath:instancePath+\"/blocks/role\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}if(data21.part !== undefined){const err32 = {instancePath:instancePath+\"/blocks/part\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}}}if(data.steps !== undefined){if(!(validate13(data.steps, {instancePath:instancePath+\"/steps\",parentData:data,parentDataProperty:\"steps\",rootData}))){vErrors = vErrors === null ? validate13.errors : vErrors.concat(validate13.errors);errors = vErrors.length;}}}var _valid2 = _errs54 === errors;valid23 = _valid2;ifClause1 = \"then\";}else {const _errs90 = errors;const _errs91 = errors;let valid40 = true;const _errs92 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){let missing3;if((data.kind === undefined) && (missing3 = \"kind\")){const err33 = {};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}else {if(data.kind !== undefined){if(\"git\" !== data.kind){const err34 = {};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}}}}var _valid3 = _errs92 === errors;errors = _errs91;if(vErrors !== null){if(_errs91){vErrors.length = _errs91;}else {vErrors = null;}}let ifClause2;if(_valid3){const _errs94 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.blocks !== undefined){let data37 = data.blocks;if(data37 && typeof data37 == \"object\" && !Array.isArray(data37)){if(data37.branch === undefined){const err35 = {instancePath:instancePath+\"/blocks\",schemaPath:\"#/else/else/then/properties/blocks/required\",keyword:\"required\",params:{missingProperty: \"branch\"},message:\"must have required property '\"+\"branch\"+\"'\"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}if(data37.strip !== undefined){if(!(validate11(data37.strip, {instancePath:instancePath+\"/blocks/strip\",parentData:data37,parentDataProperty:\"strip\",rootData}))){vErrors = vErrors === null ? validate11.errors : vErrors.concat(validate11.errors);errors = vErrors.length;}}if(data37.path !== undefined){const err36 = {instancePath:instancePath+\"/blocks/path\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}if(data37.group !== undefined){const err37 = {instancePath:instancePath+\"/blocks/group\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}if(data37.scale !== undefined){const err38 = {instancePath:instancePath+\"/blocks/scale\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}if(data37.period !== undefined){const err39 = {instancePath:instancePath+\"/blocks/period\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}if(data37.row !== undefined){const err40 = {instancePath:instancePath+\"/blocks/row\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}if(data37.point !== undefined){const err41 = {instancePath:instancePath+\"/blocks/point\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}if(data37.zoom !== undefined){const err42 = {instancePath:instancePath+\"/blocks/zoom\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}if(data37.item !== undefined){const err43 = {instancePath:instancePath+\"/blocks/item\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}if(data37.role !== undefined){const err44 = {instancePath:instancePath+\"/blocks/role\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}if(data37.part !== undefined){const err45 = {instancePath:instancePath+\"/blocks/part\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}}}if(data.steps !== undefined){if(!(validate18(data.steps, {instancePath:instancePath+\"/steps\",parentData:data,parentDataProperty:\"steps\",rootData}))){vErrors = vErrors === null ? validate18.errors : vErrors.concat(validate18.errors);errors = vErrors.length;}}}var _valid3 = _errs94 === errors;valid40 = _valid3;ifClause2 = \"then\";}else {const _errs128 = errors;const _errs129 = errors;let valid54 = true;const _errs130 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){let missing4;if((data.kind === undefined) && (missing4 = \"kind\")){const err46 = {};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}else {if(data.kind !== undefined){if(\"time\" !== data.kind){const err47 = {};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}}}}var _valid4 = _errs130 === errors;errors = _errs129;if(vErrors !== null){if(_errs129){vErrors.length = _errs129;}else {vErrors = null;}}let ifClause3;if(_valid4){const _errs132 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.blocks !== undefined){let data51 = data.blocks;if(data51 && typeof data51 == \"object\" && !Array.isArray(data51)){if(data51.scale === undefined){const err48 = {instancePath:instancePath+\"/blocks\",schemaPath:\"#/else/else/else/then/properties/blocks/required\",keyword:\"required\",params:{missingProperty: \"scale\"},message:\"must have required property '\"+\"scale\"+\"'\"};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}if(data51.row === undefined){const err49 = {instancePath:instancePath+\"/blocks\",schemaPath:\"#/else/else/else/then/properties/blocks/required\",keyword:\"required\",params:{missingProperty: \"row\"},message:\"must have required property '\"+\"row\"+\"'\"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}if(data51.path !== undefined){const err50 = {instancePath:instancePath+\"/blocks/path\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}if(data51.branch !== undefined){const err51 = {instancePath:instancePath+\"/blocks/branch\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}if(data51.group !== undefined){const err52 = {instancePath:instancePath+\"/blocks/group\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err52];}else {vErrors.push(err52);}errors++;}if(data51.item !== undefined){const err53 = {instancePath:instancePath+\"/blocks/item\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err53];}else {vErrors.push(err53);}errors++;}if(data51.role !== undefined){const err54 = {instancePath:instancePath+\"/blocks/role\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err54];}else {vErrors.push(err54);}errors++;}if(data51.part !== undefined){const err55 = {instancePath:instancePath+\"/blocks/part\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err55];}else {vErrors.push(err55);}errors++;}}}if(data.steps !== undefined){if(!(validate20(data.steps, {instancePath:instancePath+\"/steps\",parentData:data,parentDataProperty:\"steps\",rootData}))){vErrors = vErrors === null ? validate20.errors : vErrors.concat(validate20.errors);errors = vErrors.length;}}}var _valid4 = _errs132 === errors;valid54 = _valid4;ifClause3 = \"then\";}else {const _errs153 = errors;const _errs154 = errors;let valid64 = true;const _errs155 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){let missing5;if((data.kind === undefined) && (missing5 = \"kind\")){const err56 = {};if(vErrors === null){vErrors = [err56];}else {vErrors.push(err56);}errors++;}else {if(data.kind !== undefined){if(\"tree\" !== data.kind){const err57 = {};if(vErrors === null){vErrors = [err57];}else {vErrors.push(err57);}errors++;}}}}var _valid5 = _errs155 === errors;errors = _errs154;if(vErrors !== null){if(_errs154){vErrors.length = _errs154;}else {vErrors = null;}}let ifClause4;if(_valid5){const _errs157 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.blocks !== undefined){let data60 = data.blocks;if(data60 && typeof data60 == \"object\" && !Array.isArray(data60)){if(data60.strip !== undefined){if(!(validate11(data60.strip, {instancePath:instancePath+\"/blocks/strip\",parentData:data60,parentDataProperty:\"strip\",rootData}))){vErrors = vErrors === null ? validate11.errors : vErrors.concat(validate11.errors);errors = vErrors.length;}}if(data60.path !== undefined){const err58 = {instancePath:instancePath+\"/blocks/path\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err58];}else {vErrors.push(err58);}errors++;}if(data60.branch !== undefined){const err59 = {instancePath:instancePath+\"/blocks/branch\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err59];}else {vErrors.push(err59);}errors++;}if(data60.scale !== undefined){const err60 = {instancePath:instancePath+\"/blocks/scale\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err60];}else {vErrors.push(err60);}errors++;}if(data60.period !== undefined){const err61 = {instancePath:instancePath+\"/blocks/period\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err61];}else {vErrors.push(err61);}errors++;}if(data60.row !== undefined){const err62 = {instancePath:instancePath+\"/blocks/row\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err62];}else {vErrors.push(err62);}errors++;}if(data60.point !== undefined){const err63 = {instancePath:instancePath+\"/blocks/point\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err63];}else {vErrors.push(err63);}errors++;}if(data60.zoom !== undefined){const err64 = {instancePath:instancePath+\"/blocks/zoom\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err64];}else {vErrors.push(err64);}errors++;}if(data60.group !== undefined){const err65 = {instancePath:instancePath+\"/blocks/group\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err65];}else {vErrors.push(err65);}errors++;}if(data60.item !== undefined){const err66 = {instancePath:instancePath+\"/blocks/item\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err66];}else {vErrors.push(err66);}errors++;}if(data60.role !== undefined){const err67 = {instancePath:instancePath+\"/blocks/role\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err67];}else {vErrors.push(err67);}errors++;}if(data60.part !== undefined){const err68 = {instancePath:instancePath+\"/blocks/part\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err68];}else {vErrors.push(err68);}errors++;}}}if(data.steps !== undefined){if(!(validate23(data.steps, {instancePath:instancePath+\"/steps\",parentData:data,parentDataProperty:\"steps\",rootData}))){vErrors = vErrors === null ? validate23.errors : vErrors.concat(validate23.errors);errors = vErrors.length;}}}var _valid5 = _errs157 === errors;valid64 = _valid5;ifClause4 = \"then\";}else {const _errs194 = errors;const _errs195 = errors;let valid79 = true;const _errs196 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){let missing6;if((data.kind === undefined) && (missing6 = \"kind\")){const err69 = {};if(vErrors === null){vErrors = [err69];}else {vErrors.push(err69);}errors++;}else {if(data.kind !== undefined){if(\"lineup\" !== data.kind){const err70 = {};if(vErrors === null){vErrors = [err70];}else {vErrors.push(err70);}errors++;}}}}var _valid6 = _errs196 === errors;errors = _errs195;if(vErrors !== null){if(_errs195){vErrors.length = _errs195;}else {vErrors = null;}}let ifClause5;if(_valid6){const _errs198 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.blocks !== undefined){let data75 = data.blocks;if(data75 && typeof data75 == \"object\" && !Array.isArray(data75)){if(data75.box === undefined){const err71 = {instancePath:instancePath+\"/blocks\",schemaPath:\"#/else/else/else/else/else/then/properties/blocks/required\",keyword:\"required\",params:{missingProperty: \"box\"},message:\"must have required property '\"+\"box\"+\"'\"};if(vErrors === null){vErrors = [err71];}else {vErrors.push(err71);}errors++;}if(data75.item === undefined){const err72 = {instancePath:instancePath+\"/blocks\",schemaPath:\"#/else/else/else/else/else/then/properties/blocks/required\",keyword:\"required\",params:{missingProperty: \"item\"},message:\"must have required property '\"+\"item\"+\"'\"};if(vErrors === null){vErrors = [err72];}else {vErrors.push(err72);}errors++;}if(data75.box !== undefined){let data76 = data75.box;if(Array.isArray(data76)){if(data76.length < 1){const err73 = {instancePath:instancePath+\"/blocks/box\",schemaPath:\"#/else/else/else/else/else/then/properties/blocks/properties/box/minItems\",keyword:\"minItems\",params:{limit: 1},message:\"must NOT have fewer than 1 items\"};if(vErrors === null){vErrors = [err73];}else {vErrors.push(err73);}errors++;}const len2 = data76.length;for(let i2=0; i2<len2; i2++){let data77 = data76[i2];if(data77 && typeof data77 == \"object\" && !Array.isArray(data77)){if(data77.icon !== undefined){const err74 = {instancePath:instancePath+\"/blocks/box/\" + i2+\"/icon\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err74];}else {vErrors.push(err74);}errors++;}if(data77.link !== undefined){const err75 = {instancePath:instancePath+\"/blocks/box/\" + i2+\"/link\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err75];}else {vErrors.push(err75);}errors++;}if(data77.region !== undefined){const err76 = {instancePath:instancePath+\"/blocks/box/\" + i2+\"/region\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err76];}else {vErrors.push(err76);}errors++;}}}}}if(data75.strip !== undefined){if(!(validate11(data75.strip, {instancePath:instancePath+\"/blocks/strip\",parentData:data75,parentDataProperty:\"strip\",rootData}))){vErrors = vErrors === null ? validate11.errors : vErrors.concat(validate11.errors);errors = vErrors.length;}}if(data75.path !== undefined){const err77 = {instancePath:instancePath+\"/blocks/path\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err77];}else {vErrors.push(err77);}errors++;}if(data75.branch !== undefined){const err78 = {instancePath:instancePath+\"/blocks/branch\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err78];}else {vErrors.push(err78);}errors++;}if(data75.scale !== undefined){const err79 = {instancePath:instancePath+\"/blocks/scale\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err79];}else {vErrors.push(err79);}errors++;}if(data75.period !== undefined){const err80 = {instancePath:instancePath+\"/blocks/period\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err80];}else {vErrors.push(err80);}errors++;}if(data75.row !== undefined){const err81 = {instancePath:instancePath+\"/blocks/row\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err81];}else {vErrors.push(err81);}errors++;}if(data75.point !== undefined){const err82 = {instancePath:instancePath+\"/blocks/point\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err82];}else {vErrors.push(err82);}errors++;}if(data75.zoom !== undefined){const err83 = {instancePath:instancePath+\"/blocks/zoom\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err83];}else {vErrors.push(err83);}errors++;}if(data75.group !== undefined){const err84 = {instancePath:instancePath+\"/blocks/group\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err84];}else {vErrors.push(err84);}errors++;}if(data75.part !== undefined){const err85 = {instancePath:instancePath+\"/blocks/part\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err85];}else {vErrors.push(err85);}errors++;}if(data75.item !== undefined){let data91 = data75.item;if(Array.isArray(data91)){const len3 = data91.length;for(let i3=0; i3<len3; i3++){if(!(validate26(data91[i3], {instancePath:instancePath+\"/blocks/item/\" + i3,parentData:data91,parentDataProperty:i3,rootData}))){vErrors = vErrors === null ? validate26.errors : vErrors.concat(validate26.errors);errors = vErrors.length;}}}}}}if(data.steps !== undefined){if(!(validate28(data.steps, {instancePath:instancePath+\"/steps\",parentData:data,parentDataProperty:\"steps\",rootData}))){vErrors = vErrors === null ? validate28.errors : vErrors.concat(validate28.errors);errors = vErrors.length;}}}var _valid6 = _errs198 === errors;valid79 = _valid6;ifClause5 = \"then\";}else {const _errs242 = errors;const _errs243 = errors;let valid100 = true;const _errs244 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){let missing7;if((data.kind === undefined) && (missing7 = \"kind\")){const err86 = {};if(vErrors === null){vErrors = [err86];}else {vErrors.push(err86);}errors++;}else {if(data.kind !== undefined){if(\"try\" !== data.kind){const err87 = {};if(vErrors === null){vErrors = [err87];}else {vErrors.push(err87);}errors++;}}}}var _valid7 = _errs244 === errors;errors = _errs243;if(vErrors !== null){if(_errs243){vErrors.length = _errs243;}else {vErrors = null;}}let ifClause6;if(_valid7){const _errs246 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.blocks !== undefined){let data95 = data.blocks;if(data95 && typeof data95 == \"object\" && !Array.isArray(data95)){if(data95.part === undefined){const err88 = {instancePath:instancePath+\"/blocks\",schemaPath:\"#/else/else/else/else/else/else/then/properties/blocks/required\",keyword:\"required\",params:{missingProperty: \"part\"},message:\"must have required property '\"+\"part\"+\"'\"};if(vErrors === null){vErrors = [err88];}else {vErrors.push(err88);}errors++;}if(data95.item !== undefined){let data96 = data95.item;if(Array.isArray(data96)){const len4 = data96.length;for(let i4=0; i4<len4; i4++){if(!(validate30(data96[i4], {instancePath:instancePath+\"/blocks/item/\" + i4,parentData:data96,parentDataProperty:i4,rootData}))){vErrors = vErrors === null ? validate30.errors : vErrors.concat(validate30.errors);errors = vErrors.length;}}}}if(data95.group !== undefined){const err89 = {instancePath:instancePath+\"/blocks/group\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err89];}else {vErrors.push(err89);}errors++;}if(data95.box !== undefined){const err90 = {instancePath:instancePath+\"/blocks/box\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err90];}else {vErrors.push(err90);}errors++;}if(data95.strip !== undefined){const err91 = {instancePath:instancePath+\"/blocks/strip\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err91];}else {vErrors.push(err91);}errors++;}if(data95.path !== undefined){const err92 = {instancePath:instancePath+\"/blocks/path\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err92];}else {vErrors.push(err92);}errors++;}if(data95.branch !== undefined){const err93 = {instancePath:instancePath+\"/blocks/branch\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err93];}else {vErrors.push(err93);}errors++;}if(data95.scale !== undefined){const err94 = {instancePath:instancePath+\"/blocks/scale\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err94];}else {vErrors.push(err94);}errors++;}if(data95.period !== undefined){const err95 = {instancePath:instancePath+\"/blocks/period\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err95];}else {vErrors.push(err95);}errors++;}if(data95.row !== undefined){const err96 = {instancePath:instancePath+\"/blocks/row\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err96];}else {vErrors.push(err96);}errors++;}if(data95.point !== undefined){const err97 = {instancePath:instancePath+\"/blocks/point\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err97];}else {vErrors.push(err97);}errors++;}if(data95.zoom !== undefined){const err98 = {instancePath:instancePath+\"/blocks/zoom\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err98];}else {vErrors.push(err98);}errors++;}if(data95.role !== undefined){const err99 = {instancePath:instancePath+\"/blocks/role\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err99];}else {vErrors.push(err99);}errors++;}}}if(data.steps !== undefined){if(!(validate34(data.steps, {instancePath:instancePath+\"/steps\",parentData:data,parentDataProperty:\"steps\",rootData}))){vErrors = vErrors === null ? validate34.errors : vErrors.concat(validate34.errors);errors = vErrors.length;}}}var _valid7 = _errs246 === errors;valid100 = _valid7;ifClause6 = \"then\";}else {const _errs284 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.blocks !== undefined){let data110 = data.blocks;if(data110 && typeof data110 == \"object\" && !Array.isArray(data110)){if(data110.box === undefined){const err100 = {instancePath:instancePath+\"/blocks\",schemaPath:\"#/else/else/else/else/else/else/else/properties/blocks/required\",keyword:\"required\",params:{missingProperty: \"box\"},message:\"must have required property '\"+\"box\"+\"'\"};if(vErrors === null){vErrors = [err100];}else {vErrors.push(err100);}errors++;}if(data110.box !== undefined){let data111 = data110.box;if(Array.isArray(data111)){if(data111.length < 1){const err101 = {instancePath:instancePath+\"/blocks/box\",schemaPath:\"#/else/else/else/else/else/else/else/properties/blocks/properties/box/minItems\",keyword:\"minItems\",params:{limit: 1},message:\"must NOT have fewer than 1 items\"};if(vErrors === null){vErrors = [err101];}else {vErrors.push(err101);}errors++;}}}if(data110.strip !== undefined){if(!(validate11(data110.strip, {instancePath:instancePath+\"/blocks/strip\",parentData:data110,parentDataProperty:\"strip\",rootData}))){vErrors = vErrors === null ? validate11.errors : vErrors.concat(validate11.errors);errors = vErrors.length;}}if(data110.path !== undefined){const err102 = {instancePath:instancePath+\"/blocks/path\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err102];}else {vErrors.push(err102);}errors++;}if(data110.branch !== undefined){const err103 = {instancePath:instancePath+\"/blocks/branch\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err103];}else {vErrors.push(err103);}errors++;}if(data110.scale !== undefined){const err104 = {instancePath:instancePath+\"/blocks/scale\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err104];}else {vErrors.push(err104);}errors++;}if(data110.period !== undefined){const err105 = {instancePath:instancePath+\"/blocks/period\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err105];}else {vErrors.push(err105);}errors++;}if(data110.row !== undefined){const err106 = {instancePath:instancePath+\"/blocks/row\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err106];}else {vErrors.push(err106);}errors++;}if(data110.point !== undefined){const err107 = {instancePath:instancePath+\"/blocks/point\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err107];}else {vErrors.push(err107);}errors++;}if(data110.zoom !== undefined){const err108 = {instancePath:instancePath+\"/blocks/zoom\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err108];}else {vErrors.push(err108);}errors++;}if(data110.item !== undefined){const err109 = {instancePath:instancePath+\"/blocks/item\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err109];}else {vErrors.push(err109);}errors++;}if(data110.role !== undefined){const err110 = {instancePath:instancePath+\"/blocks/role\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err110];}else {vErrors.push(err110);}errors++;}if(data110.part !== undefined){const err111 = {instancePath:instancePath+\"/blocks/part\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err111];}else {vErrors.push(err111);}errors++;}}}if(data.steps !== undefined){if(!(validate13(data.steps, {instancePath:instancePath+\"/steps\",parentData:data,parentDataProperty:\"steps\",rootData}))){vErrors = vErrors === null ? validate13.errors : vErrors.concat(validate13.errors);errors = vErrors.length;}}}var _valid7 = _errs284 === errors;valid100 = _valid7;ifClause6 = \"else\";}if(!valid100){const err112 = {instancePath,schemaPath:\"#/else/else/else/else/else/else/if\",keyword:\"if\",params:{failingKeyword: ifClause6},message:\"must match \\\"\"+ifClause6+\"\\\" schema\"};if(vErrors === null){vErrors = [err112];}else {vErrors.push(err112);}errors++;}var _valid6 = _errs242 === errors;valid79 = _valid6;ifClause5 = \"else\";}if(!valid79){const err113 = {instancePath,schemaPath:\"#/else/else/else/else/else/if\",keyword:\"if\",params:{failingKeyword: ifClause5},message:\"must match \\\"\"+ifClause5+\"\\\" schema\"};if(vErrors === null){vErrors = [err113];}else {vErrors.push(err113);}errors++;}var _valid5 = _errs194 === errors;valid64 = _valid5;ifClause4 = \"else\";}if(!valid64){const err114 = {instancePath,schemaPath:\"#/else/else/else/else/if\",keyword:\"if\",params:{failingKeyword: ifClause4},message:\"must match \\\"\"+ifClause4+\"\\\" schema\"};if(vErrors === null){vErrors = [err114];}else {vErrors.push(err114);}errors++;}var _valid4 = _errs153 === errors;valid54 = _valid4;ifClause3 = \"else\";}if(!valid54){const err115 = {instancePath,schemaPath:\"#/else/else/else/if\",keyword:\"if\",params:{failingKeyword: ifClause3},message:\"must match \\\"\"+ifClause3+\"\\\" schema\"};if(vErrors === null){vErrors = [err115];}else {vErrors.push(err115);}errors++;}var _valid3 = _errs128 === errors;valid40 = _valid3;ifClause2 = \"else\";}if(!valid40){const err116 = {instancePath,schemaPath:\"#/else/else/if\",keyword:\"if\",params:{failingKeyword: ifClause2},message:\"must match \\\"\"+ifClause2+\"\\\" schema\"};if(vErrors === null){vErrors = [err116];}else {vErrors.push(err116);}errors++;}var _valid2 = _errs90 === errors;valid23 = _valid2;ifClause1 = \"else\";}if(!valid23){const err117 = {instancePath,schemaPath:\"#/else/if\",keyword:\"if\",params:{failingKeyword: ifClause1},message:\"must match \\\"\"+ifClause1+\"\\\" schema\"};if(vErrors === null){vErrors = [err117];}else {vErrors.push(err117);}errors++;}var _valid1 = _errs50 === errors;valid9 = _valid1;ifClause0 = \"else\";}if(!valid9){const err118 = {instancePath,schemaPath:\"#/if\",keyword:\"if\",params:{failingKeyword: ifClause0},message:\"must match \\\"\"+ifClause0+\"\\\" schema\"};if(vErrors === null){vErrors = [err118];}else {vErrors.push(err118);}errors++;}if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.version === undefined){const err119 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"version\"},message:\"must have required property '\"+\"version\"+\"'\"};if(vErrors === null){vErrors = [err119];}else {vErrors.push(err119);}errors++;}if(data.kind === undefined){const err120 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"kind\"},message:\"must have required property '\"+\"kind\"+\"'\"};if(vErrors === null){vErrors = [err120];}else {vErrors.push(err120);}errors++;}if(data.title === undefined){const err121 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"title\"},message:\"must have required property '\"+\"title\"+\"'\"};if(vErrors === null){vErrors = [err121];}else {vErrors.push(err121);}errors++;}if(data.blocks === undefined){const err122 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"blocks\"},message:\"must have required property '\"+\"blocks\"+\"'\"};if(vErrors === null){vErrors = [err122];}else {vErrors.push(err122);}errors++;}if(data.steps === undefined){const err123 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"steps\"},message:\"must have required property '\"+\"steps\"+\"'\"};if(vErrors === null){vErrors = [err123];}else {vErrors.push(err123);}errors++;}for(const key0 in data){if(!((((((key0 === \"version\") || (key0 === \"kind\")) || (key0 === \"title\")) || (key0 === \"view\")) || (key0 === \"blocks\")) || (key0 === \"steps\"))){const err124 = {instancePath,schemaPath:\"#/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key0},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err124];}else {vErrors.push(err124);}errors++;}}if(data.version !== undefined){let data124 = data.version;if(!(((typeof data124 == \"number\") && (!(data124 % 1) && !isNaN(data124))) && (isFinite(data124)))){const err125 = {instancePath:instancePath+\"/version\",schemaPath:\"#/properties/version/type\",keyword:\"type\",params:{type: \"integer\"},message:\"must be integer\"};if(vErrors === null){vErrors = [err125];}else {vErrors.push(err125);}errors++;}if((typeof data124 == \"number\") && (isFinite(data124))){if(data124 < 1 || isNaN(data124)){const err126 = {instancePath:instancePath+\"/version\",schemaPath:\"#/properties/version/minimum\",keyword:\"minimum\",params:{comparison: \">=\", limit: 1},message:\"must be >= 1\"};if(vErrors === null){vErrors = [err126];}else {vErrors.push(err126);}errors++;}}}if(data.kind !== undefined){let data125 = data.kind;if(!((((((((data125 === \"sequence\") || (data125 === \"architecture\")) || (data125 === \"state\")) || (data125 === \"git\")) || (data125 === \"time\")) || (data125 === \"tree\")) || (data125 === \"lineup\")) || (data125 === \"try\"))){const err127 = {instancePath:instancePath+\"/kind\",schemaPath:\"#/properties/kind/enum\",keyword:\"enum\",params:{allowedValues: schema11.properties.kind.enum},message:\"must be equal to one of the allowed values\"};if(vErrors === null){vErrors = [err127];}else {vErrors.push(err127);}errors++;}}if(data.title !== undefined){let data126 = data.title;if(typeof data126 === \"string\"){if(func2(data126) < 1){const err128 = {instancePath:instancePath+\"/title\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err128];}else {vErrors.push(err128);}errors++;}}else {const err129 = {instancePath:instancePath+\"/title\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err129];}else {vErrors.push(err129);}errors++;}}if(data.view !== undefined){let data127 = data.view;if(!((data127 === \"fixed\") || (data127 === \"follow\"))){const err130 = {instancePath:instancePath+\"/view\",schemaPath:\"#/properties/view/enum\",keyword:\"enum\",params:{allowedValues: schema11.properties.view.enum},message:\"must be equal to one of the allowed values\"};if(vErrors === null){vErrors = [err130];}else {vErrors.push(err130);}errors++;}}if(data.blocks !== undefined){let data128 = data.blocks;if(data128 && typeof data128 == \"object\" && !Array.isArray(data128)){for(const key1 in data128){if(!(func7.call(schema11.properties.blocks.properties, key1))){const err131 = {instancePath:instancePath+\"/blocks\",schemaPath:\"#/properties/blocks/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key1},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err131];}else {vErrors.push(err131);}errors++;}}if(data128.branch !== undefined){let data129 = data128.branch;if(Array.isArray(data129)){if(data129.length < 1){const err132 = {instancePath:instancePath+\"/blocks/branch\",schemaPath:\"#/properties/blocks/properties/branch/minItems\",keyword:\"minItems\",params:{limit: 1},message:\"must NOT have fewer than 1 items\"};if(vErrors === null){vErrors = [err132];}else {vErrors.push(err132);}errors++;}const len5 = data129.length;for(let i5=0; i5<len5; i5++){if(!(validate38(data129[i5], {instancePath:instancePath+\"/blocks/branch/\" + i5,parentData:data129,parentDataProperty:i5,rootData}))){vErrors = vErrors === null ? validate38.errors : vErrors.concat(validate38.errors);errors = vErrors.length;}}}else {const err133 = {instancePath:instancePath+\"/blocks/branch\",schemaPath:\"#/properties/blocks/properties/branch/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err133];}else {vErrors.push(err133);}errors++;}}if(data128.group !== undefined){let data131 = data128.group;if(Array.isArray(data131)){const len6 = data131.length;for(let i6=0; i6<len6; i6++){if(!(validate40(data131[i6], {instancePath:instancePath+\"/blocks/group/\" + i6,parentData:data131,parentDataProperty:i6,rootData}))){vErrors = vErrors === null ? validate40.errors : vErrors.concat(validate40.errors);errors = vErrors.length;}}}else {const err134 = {instancePath:instancePath+\"/blocks/group\",schemaPath:\"#/properties/blocks/properties/group/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err134];}else {vErrors.push(err134);}errors++;}}if(data128.box !== undefined){let data133 = data128.box;if(Array.isArray(data133)){const len7 = data133.length;for(let i7=0; i7<len7; i7++){if(!(validate42(data133[i7], {instancePath:instancePath+\"/blocks/box/\" + i7,parentData:data133,parentDataProperty:i7,rootData}))){vErrors = vErrors === null ? validate42.errors : vErrors.concat(validate42.errors);errors = vErrors.length;}}}else {const err135 = {instancePath:instancePath+\"/blocks/box\",schemaPath:\"#/properties/blocks/properties/box/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err135];}else {vErrors.push(err135);}errors++;}}if(data128.strip !== undefined){if(!(validate44(data128.strip, {instancePath:instancePath+\"/blocks/strip\",parentData:data128,parentDataProperty:\"strip\",rootData}))){vErrors = vErrors === null ? validate44.errors : vErrors.concat(validate44.errors);errors = vErrors.length;}}if(data128.scale !== undefined){if(!(validate48(data128.scale, {instancePath:instancePath+\"/blocks/scale\",parentData:data128,parentDataProperty:\"scale\",rootData}))){vErrors = vErrors === null ? validate48.errors : vErrors.concat(validate48.errors);errors = vErrors.length;}}if(data128.row !== undefined){let data137 = data128.row;if(Array.isArray(data137)){if(data137.length < 1){const err136 = {instancePath:instancePath+\"/blocks/row\",schemaPath:\"#/properties/blocks/properties/row/minItems\",keyword:\"minItems\",params:{limit: 1},message:\"must NOT have fewer than 1 items\"};if(vErrors === null){vErrors = [err136];}else {vErrors.push(err136);}errors++;}const len8 = data137.length;for(let i8=0; i8<len8; i8++){if(!(validate50(data137[i8], {instancePath:instancePath+\"/blocks/row/\" + i8,parentData:data137,parentDataProperty:i8,rootData}))){vErrors = vErrors === null ? validate50.errors : vErrors.concat(validate50.errors);errors = vErrors.length;}}}else {const err137 = {instancePath:instancePath+\"/blocks/row\",schemaPath:\"#/properties/blocks/properties/row/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err137];}else {vErrors.push(err137);}errors++;}}if(data128.point !== undefined){let data139 = data128.point;if(Array.isArray(data139)){const len9 = data139.length;for(let i9=0; i9<len9; i9++){if(!(validate52(data139[i9], {instancePath:instancePath+\"/blocks/point/\" + i9,parentData:data139,parentDataProperty:i9,rootData}))){vErrors = vErrors === null ? validate52.errors : vErrors.concat(validate52.errors);errors = vErrors.length;}}}else {const err138 = {instancePath:instancePath+\"/blocks/point\",schemaPath:\"#/properties/blocks/properties/point/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err138];}else {vErrors.push(err138);}errors++;}}if(data128.zoom !== undefined){if(!(validate54(data128.zoom, {instancePath:instancePath+\"/blocks/zoom\",parentData:data128,parentDataProperty:\"zoom\",rootData}))){vErrors = vErrors === null ? validate54.errors : vErrors.concat(validate54.errors);errors = vErrors.length;}}if(data128.item !== undefined){let data142 = data128.item;if(Array.isArray(data142)){if(data142.length < 1){const err139 = {instancePath:instancePath+\"/blocks/item\",schemaPath:\"#/properties/blocks/properties/item/minItems\",keyword:\"minItems\",params:{limit: 1},message:\"must NOT have fewer than 1 items\"};if(vErrors === null){vErrors = [err139];}else {vErrors.push(err139);}errors++;}}else {const err140 = {instancePath:instancePath+\"/blocks/item\",schemaPath:\"#/properties/blocks/properties/item/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err140];}else {vErrors.push(err140);}errors++;}}if(data128.role !== undefined){let data143 = data128.role;if(Array.isArray(data143)){if(data143.length < 1){const err141 = {instancePath:instancePath+\"/blocks/role\",schemaPath:\"#/properties/blocks/properties/role/minItems\",keyword:\"minItems\",params:{limit: 1},message:\"must NOT have fewer than 1 items\"};if(vErrors === null){vErrors = [err141];}else {vErrors.push(err141);}errors++;}const len10 = data143.length;for(let i10=0; i10<len10; i10++){if(!(validate56(data143[i10], {instancePath:instancePath+\"/blocks/role/\" + i10,parentData:data143,parentDataProperty:i10,rootData}))){vErrors = vErrors === null ? validate56.errors : vErrors.concat(validate56.errors);errors = vErrors.length;}}}else {const err142 = {instancePath:instancePath+\"/blocks/role\",schemaPath:\"#/properties/blocks/properties/role/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err142];}else {vErrors.push(err142);}errors++;}}if(data128.path !== undefined){let data145 = data128.path;if(Array.isArray(data145)){if(data145.length < 1){const err143 = {instancePath:instancePath+\"/blocks/path\",schemaPath:\"#/properties/blocks/properties/path/minItems\",keyword:\"minItems\",params:{limit: 1},message:\"must NOT have fewer than 1 items\"};if(vErrors === null){vErrors = [err143];}else {vErrors.push(err143);}errors++;}const len11 = data145.length;for(let i11=0; i11<len11; i11++){if(!(validate58(data145[i11], {instancePath:instancePath+\"/blocks/path/\" + i11,parentData:data145,parentDataProperty:i11,rootData}))){vErrors = vErrors === null ? validate58.errors : vErrors.concat(validate58.errors);errors = vErrors.length;}}}else {const err144 = {instancePath:instancePath+\"/blocks/path\",schemaPath:\"#/properties/blocks/properties/path/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err144];}else {vErrors.push(err144);}errors++;}}if(data128.period !== undefined){if(!(validate60(data128.period, {instancePath:instancePath+\"/blocks/period\",parentData:data128,parentDataProperty:\"period\",rootData}))){vErrors = vErrors === null ? validate60.errors : vErrors.concat(validate60.errors);errors = vErrors.length;}}if(data128.part !== undefined){let data148 = data128.part;if(Array.isArray(data148)){if(data148.length < 1){const err145 = {instancePath:instancePath+\"/blocks/part\",schemaPath:\"#/properties/blocks/properties/part/minItems\",keyword:\"minItems\",params:{limit: 1},message:\"must NOT have fewer than 1 items\"};if(vErrors === null){vErrors = [err145];}else {vErrors.push(err145);}errors++;}const len12 = data148.length;for(let i12=0; i12<len12; i12++){if(!(validate62(data148[i12], {instancePath:instancePath+\"/blocks/part/\" + i12,parentData:data148,parentDataProperty:i12,rootData}))){vErrors = vErrors === null ? validate62.errors : vErrors.concat(validate62.errors);errors = vErrors.length;}}}else {const err146 = {instancePath:instancePath+\"/blocks/part\",schemaPath:\"#/properties/blocks/properties/part/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err146];}else {vErrors.push(err146);}errors++;}}}else {const err147 = {instancePath:instancePath+\"/blocks\",schemaPath:\"#/properties/blocks/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err147];}else {vErrors.push(err147);}errors++;}}if(data.steps !== undefined){let data150 = data.steps;if(Array.isArray(data150)){if(data150.length < 1){const err148 = {instancePath:instancePath+\"/steps\",schemaPath:\"#/properties/steps/minItems\",keyword:\"minItems\",params:{limit: 1},message:\"must NOT have fewer than 1 items\"};if(vErrors === null){vErrors = [err148];}else {vErrors.push(err148);}errors++;}const len13 = data150.length;for(let i13=0; i13<len13; i13++){if(!(validate64(data150[i13], {instancePath:instancePath+\"/steps/\" + i13,parentData:data150,parentDataProperty:i13,rootData}))){vErrors = vErrors === null ? validate64.errors : vErrors.concat(validate64.errors);errors = vErrors.length;}}}else {const err149 = {instancePath:instancePath+\"/steps\",schemaPath:\"#/properties/steps/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err149];}else {vErrors.push(err149);}errors++;}}}else {const err150 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err150];}else {vErrors.push(err150);}errors++;}validate10.errors = vErrors;return errors === 0;}\n","/**\n * 図の原本の形と、原本を JSON Schema で検査する命令。\n *\n * 形の正は `schemas/diagram.schema.json` の 1 本で、下の型はその写し。ブロックの置き場へ移した欄の型はブロックが持ち、ここから出し直す (#3345)。\n * `schemas/diagram.schema.json` は、骨組み (`schemas/base.schema.json`) とブロックの形の欠片を build の時に束ねて書き出した物 (#3346)。\n * 版1の原本は検査の前に版2の形へ移して検査し、誤りの場所は版1の欄の場所へ戻して返す。検査の関数を 1 つにして、見本帳が読む量を増やさない。\n * 誤りは JSON Pointer で場所を示す。欄が足りない時と知らない欄がある時は、その欄の場所まで示す。\n * 誤りの文は呼ぶ側が渡した言葉 (渡さなければ英語) で出す。文の表は `field-messages.ts` が持つ (#2999)。\n *\n * 検査の関数は schema から前もって書き出した物 (`schemas/validate-diagram.js`) を使う。\n * ajv に schema をその場で組み立てさせると `new Function` を使い、`eval` を許さない頁の CSP で止まる。\n * 書き出しは `scripts/build-validator.mjs` が ajv の設定 `{ allErrors: true, discriminator: true, strictTypes: false }` で行う。\n */\nimport type { ErrorObject } from \"ajv\";\nimport type { GitBranch } from \"./blocks/branch/block\";\nimport type { Carry } from \"./blocks/carry/block\";\nimport { type Color, COLORS } from \"./blocks/color/block\";\nimport type { GitCommit } from \"./blocks/commit/block\";\nimport type { LabelSide } from \"./blocks/edge-label/block\";\nimport { ICON_NAMES } from \"./blocks/icon/block\";\nimport type { LineupItem } from \"./blocks/item/block\";\nimport type { TreeLeaf } from \"./blocks/leaf/block\";\nimport type { LineupOrder } from \"./blocks/line/block\";\nimport type { TreeNode } from \"./blocks/node/block\";\nimport type { LineupAct, LineupRole } from \"./blocks/role/block\";\nimport type { TimePoint } from \"./blocks/point/block\";\nimport type { TimeMarkEvent, TimeRow } from \"./blocks/row/block\";\nimport type { TimePeriod, TimeScale, TimeSpanEvent } from \"./blocks/scale/block\";\nimport type { StatePath } from \"./blocks/side-path/block\";\nimport type { StepSource } from \"./blocks/source/block\";\nimport type { LineupStamp } from \"./blocks/stamp/block\";\nimport { type Allowed, FIELD_MESSAGES, type FieldMessages, type Forbidden } from \"./field-messages\";\nimport { FORMAT_VERSION, isVersion1, toVersion1Pointer, upgrade, version1SectionOf } from \"./model\";\nimport { nearest } from \"./nearest\";\nimport validate from \"./schemas/validate-diagram.js\";\nimport { DEFAULT_LANG, type NotationLang, STATE_ENDS } from \"./words\";\n\n/** 色の役の型と一覧は色の役のブロック、アイコン名の一覧は絵のブロックが持つ (#3311、#3345) */\nexport { type Color, COLORS, ICON_NAMES };\n\nexport interface Region {\n id: string;\n name: string;\n note?: string;\n color?: Color;\n icon?: string;\n}\n\nexport interface Box {\n id: string;\n name: string;\n sub?: string;\n color?: Color;\n icon?: string;\n region?: string;\n /** 飛び先。描いた図ではこの箱がここへの link になる。`/` で始まる path か、http:// か https:// で始まる URL (#3199) */\n link?: string;\n /** 列の図の箱の並べ方 (#3351)。`none` は順番の無い置き場で、書かない箱は上から実行する札 */\n order?: \"none\";\n}\n\n/** 見せ方。`fixed` は全体を止めて中だけ動かし、`follow` は寄って動かし全体図で今どこかを示す。 */\nexport type ViewMode = \"fixed\" | \"follow\";\n\nexport type DiagramEvent =\n | { type: \"edge\"; from: string; to: string; label?: string; carry: Carry; labelSide?: LabelSide; at?: number; into?: number }\n | { type: \"action\"; box: string; label: string }\n | { type: \"swap\"; box: string; text: string; color?: Color }\n | { type: \"strip\"; field: string; value?: string; tag?: string }\n | GitCommit\n | { type: \"branch\"; branch: string; from: string }\n | { type: \"now\"; to: number }\n | TimeMarkEvent\n | TimeSpanEvent\n | TreeLeaf\n | TreeNode\n | LineupOrder\n | { type: \"seal\"; box: string }\n | { type: \"open\"; box: string }\n | { type: \"pick\"; box: string }\n | LineupStamp\n | LineupAct\n | TryLine\n | TryAsk\n | TryPress\n | TryEdit;\n\n/**\n * 時間軸の図 (#3165) の印の色を変える出来事と範囲の括弧の出来事と、目盛りと区切りと印の列と節目の型は、\n * 印の列と目盛りと針と節目のブロックが持つ (#3348)\n */\nexport type { TimeMarkEvent, TimePeriod, TimePoint, TimeRow, TimeScale, TimeSpanEvent };\n\n/** 時間軸の図の種類の欄 */\nexport interface TimeSpec {\n scale: TimeScale;\n period?: TimePeriod;\n rows: TimeRow[];\n points?: TimePoint[];\n /** 拡大の帯に列を作る目盛りの範囲 */\n zoom?: { from: number; to: number };\n}\n\n/** 中身の帯の物差しの欄。`line` の割合 (`2/3` か `97%`) の所に線を引く */\nexport interface StripMeter {\n field: string;\n line: string;\n}\n\n/** 枝分かれの図 (#3164) の commit を積む出来事の型は commit のブロックが持つ (#3347) */\nexport type { GitCommit };\n\n/** 木の図 (#3233) の葉を出す出来事と親を組む出来事の型は、葉と組んだ親のブロックが持つ (#3348) */\nexport type { TreeLeaf, TreeNode };\n\n/**\n * 列の図 (#3239) の、列の並びを書き換える出来事と札を押す出来事と役が動く出来事と、チップと役の型は、\n * 列の並びと札と役とチップのブロックが持つ (#3348)\n */\nexport type { LineupAct, LineupItem, LineupOrder, LineupRole, LineupStamp };\n\n/** 試す図 (#3337) の、待ち行列 `part` の中身を `items` の並びにするか、機械の列 `part` に `items` を入れた新しいブロックを足す出来事 */\nexport interface TryLine {\n type: \"line\";\n part: string;\n items: string[];\n}\n\n/** 試す図の、入力の帯の欄の値 `values` (欄の順) でチップを作って送る出来事。書き手の例として読み手の送る操作を書く */\nexport interface TryAsk {\n type: \"ask\";\n values: string[];\n}\n\n/** 試す図の、釦 `press` を押す出来事。釦の待ち行列の上からチップを取り出し、機械の列の新しいブロックへ移す */\nexport interface TryPress {\n type: \"press\";\n press: string;\n}\n\n/** 試す図の、チップ `item` の欄の値を `values` (鍵は欄) に書き換える出来事。読み手の書き換えと同じ */\nexport interface TryEdit {\n type: \"item\";\n item: string;\n values: Record<string, string>;\n}\n\n/**\n * 試す図の部品。書いた順に図の上から積む。網 (`route`) は `-` でつないだ節の並び (`paths`) を持ち、`from` から `to` へチップを運ぶ。\n * 待ち行列 (`queue`) は `order` の欄の値の高い順にチップを並べ、機械の列 (`chain`) は `edit` の欄を読み手に書き換えさせる。\n * 入力の帯 (`ask`) は図に 1 つまでで、`id` は常に `ask`。最初の欄の値がチップの名前になる。\n * 釦 (`press`) は `from` の待ち行列の上から `take` 件を `into` の機械の列の新しいブロックへ移し、`at` の部品の所に置く\n */\nexport type TryPart =\n | { type: \"route\"; id: string; paths: string[][]; from: string; to: string }\n | { type: \"queue\"; id: string; order?: string }\n | { type: \"chain\"; id: string; edit?: string }\n | { type: \"ask\"; id: \"ask\"; fields: string[]; into: string; via?: string }\n | { type: \"press\"; id: string; from: string; into: string; take: number; at?: string };\n\n/** 試す図のチップ。`values` の鍵は入力の帯の欄 (最初の欄を除く) で、名札がチップの名前 (最初の欄の値) になる */\nexport interface TryItem {\n id: string;\n values: Record<string, string>;\n}\n\n/** 枝分かれの図の枝の型は枝のブロック、状態遷移図の移れる道の型は脇道のブロックが持つ (#3347) */\nexport type { GitBranch, StatePath };\n\n/** 段の出典の型は出典のブロックが持つ (#3345) */\nexport type { StepSource };\n/** 線の名前を置く側の型は線の名前のブロックが持つ (#3345) */\nexport type { LabelSide };\n/** 線の上を走る物の型は運ぶ物のブロックが持つ (#3345) */\nexport type { Carry };\n\nexport interface Step {\n title: string;\n body: string;\n code?: string;\n /** 書いた順の出典。書かない段は欄を持たない */\n sources?: StepSource[];\n events: DiagramEvent[];\n}\n\n/** 図の種類。最初の行の頭の語で、原本の `kind` の欄 */\nexport type DiagramKind = \"sequence\" | \"architecture\" | \"state\" | \"git\" | \"time\" | \"tree\" | \"lineup\" | \"try\";\n\n/** 中身の帯。題と欄の名前の並び。物差しの欄は時間軸の図だけが書ける */\nexport interface Strip {\n title: string;\n fields: string[];\n meters?: StripMeter[];\n}\n\n/**\n * 原本の図の宣言 (#3346)。ブロックの名前ごとの欄に、そのブロックの宣言を持つ。空の並びは書かない。\n * 区画 (`group`)、箱 (`box`)、中身の帯 (`strip`) と、図の種類だけの宣言 (状態遷移図の移れる道 `path`、枝分かれの図の枝 `branch`、\n * 時間軸の図の目盛り `scale` と区切り `period` と印の列 `row` と節目 `point` と拡大の範囲 `zoom`、列の図と試す図のチップ `item`、試す図の部品 `part`)\n */\nexport interface DiagramBlocks {\n group?: Region[];\n box?: Box[];\n strip?: Strip;\n path?: StatePath[];\n branch?: GitBranch[];\n scale?: TimeScale;\n period?: TimePeriod;\n row?: TimeRow[];\n point?: TimePoint[];\n zoom?: { from: number; to: number };\n item?: LineupItem[] | TryItem[];\n role?: LineupRole[];\n part?: TryPart[];\n}\n\n/**\n * 図の原本 (版2、#3346)。図の宣言を `blocks` のブロックの名前ごとの欄に持ち、段 (`steps`) に段ごとに起きることを持つ。\n * 版1の原本は読む時に版2へ移す (`readDiagram`)\n */\nexport interface Diagram {\n version: number;\n kind: DiagramKind;\n title: string;\n view?: ViewMode;\n blocks: DiagramBlocks;\n steps: Step[];\n}\n\n/**\n * 描く処理が読む図の形 (#3346)。版1の原本と同じ欄と並びを持ち、版の欄も版1の `1` を持つ。\n * 図の id はこの形の字から作るので、版2の原本を足す前と同じ図からは同じ id の SVG を描く。\n * 原本からは `model.ts` の `toModel` が組み直す\n */\nexport interface DiagramModel {\n version: 1;\n kind: DiagramKind;\n title: string;\n view?: ViewMode;\n regions?: Region[];\n boxes: Box[];\n strip?: Strip;\n steps: Step[];\n sequence?: { lifelines: string[] };\n state?: { paths: StatePath[] };\n git?: { branches: GitBranch[] };\n time?: TimeSpec;\n lineup?: { items: LineupItem[]; roles?: LineupRole[] };\n /** 試す図 (#3337) の部品とチップ。版1の原本に無かった種類なので、版2の原本の `part` と `item` をそのまま持つ */\n try?: { parts: TryPart[]; items: TryItem[] };\n}\n\nexport interface FieldError {\n /** 誤った欄の場所 (JSON Pointer) */\n pointer: string;\n message: string;\n}\n\nexport type Checked = { ok: true } | { ok: false; errors: FieldError[] };\n\nexport interface CheckOptions {\n /** 誤りの文の言葉。渡さなければ英語 (#3338) */\n lang?: NotationLang;\n}\n\n/** 段の中で起きることの種類。schema の event の `discriminator` が見る `type` の値 */\nconst EVENT_TYPES = [\"edge\", \"action\", \"swap\", \"strip\", \"commit\", \"branch\", \"now\", \"mark\", \"span\", \"leaf\", \"node\", \"line\", \"seal\", \"open\", \"pick\", \"stamp\", \"ask\", \"press\", \"item\"] as const satisfies readonly DiagramEvent[\"type\"][];\n/** 試す図の部品の種類。schema の part の `discriminator` が見る `type` の値 (#3337) */\nconst PART_TYPES = [\"route\", \"queue\", \"chain\", \"ask\", \"press\"] as const satisfies readonly TryPart[\"type\"][];\n\n/**\n * その種類の図に書けない根の欄を書いた時の決まりの場所 (#3164)。根の欄に `not: {}` を置く決まり (`absent`) を指し、\n * 誤りの場所の最後の欄が書いた欄になる。種類の欄は、その欄と同じ名前の図の種類だけが書ける\n */\nconst ABSENT = \"#/definitions/absent/not\";\n/**\n * 種類の欄でない欄を書ける図の種類。区画は枝分かれの図と時間軸の図に書けない。\n * 線の列 (`at` と `into`)、節目の丸の色 (`color`)、物差し (`meters`) は時間軸の図だけが書ける (#3165)\n */\nconst ABSENT_KINDS: Record<string, string> = {\n regions: \"sequence / architecture / state\",\n group: \"sequence / architecture / state\",\n path: \"state\",\n branch: \"git\",\n scale: \"time\",\n period: \"time\",\n row: \"time\",\n point: \"time\",\n zoom: \"time\",\n item: \"lineup / try\",\n role: \"lineup\",\n part: \"try\",\n values: \"try\",\n box: \"sequence / architecture / state / git / time / tree / lineup\",\n order: \"lineup\",\n at: \"time\",\n into: \"time\",\n color: \"time\",\n meters: \"time\",\n region: \"sequence / architecture / state\",\n icon: \"sequence / architecture / state / git / time / tree\",\n link: \"sequence / architecture / state / git / time / tree\",\n};\n/** 運ぶ物の書けない組み合わせ (`not: { required: [欄] }`)。誤りの場所の最後の欄で引く */\nconst NOT_ALLOWED: Record<string, Allowed> = {\n carry: { field: \"text\", kind: \"tag\" },\n};\n\n/** 状態遷移図の箱の名札に予約の名前を書いた時の決まりの場所 */\nconst RESERVED_ID = /\\/box\\/items\\/properties\\/id\\/not$/u;\n/** 枝分かれの図でない図に、枝分かれの図だけの出来事を書いた時の決まりの場所 (#3164) */\nconst GIT_EVENT = /\\/events\\/items\\/properties\\/type\\/not$/u;\n/** 枝分かれの図だけが書ける出来事 */\nconst GIT_EVENTS = [\"commit\", \"branch\"] as const satisfies readonly DiagramEvent[\"type\"][];\n/** 時間軸の図でない図に、時間軸の図だけの出来事を書いた時の決まりの場所 (#3165)。出来事に `not` を置く */\nconst TIME_EVENT = /\\/events\\/items\\/not$/u;\n/** 時間軸の図だけが書ける出来事 */\nconst TIME_EVENTS = [\"now\", \"mark\", \"span\"] as const satisfies readonly DiagramEvent[\"type\"][];\n/** 木の図でない図に、木の図だけの出来事を書いた時の決まりの場所 (#3233)。出来事の `allOf` の中に `not` を置く */\nconst TREE_EVENT = /\\/events\\/items\\/allOf\\/0\\/not$/u;\n/** 木の図だけが書ける出来事 */\nconst TREE_EVENTS = [\"leaf\", \"node\"] as const satisfies readonly DiagramEvent[\"type\"][];\n/** 列の図でない図に、列の図だけの出来事を書いた時の決まりの場所 (#3239) */\nconst LINEUP_EVENT = \"#/definitions/notLineupEvent/not\";\n/** 列の図だけが書ける出来事 */\nconst LINEUP_EVENTS = [\"line\", \"seal\", \"open\", \"pick\", \"stamp\", \"role\"] as const satisfies readonly DiagramEvent[\"type\"][];\n/** 試す図でない図に、試す図だけの出来事を書いた時の決まりの場所 (#3337) */\nconst TRY_EVENT = \"#/definitions/notTryEvent/not\";\n/** 試す図だけが書ける出来事 */\nconst TRY_EVENTS = [\"ask\", \"press\", \"item\"] as const satisfies readonly DiagramEvent[\"type\"][];\n/** 試す図の部品の種類の決まりの場所 (#3337) */\nconst PART_TAG = \"#/definitions/part/discriminator\";\n/** 列の図に、線と処理の出来事を書いた時の決まりの場所 (#3239) */\nconst WIRED_EVENT = \"#/definitions/notWiredEvent/not\";\n/** 列の図が書けない、箱と線の図の出来事 */\nconst WIRED_EVENTS = [\"edge\", \"action\"] as const satisfies readonly DiagramEvent[\"type\"][];\n/** 時間軸の図の目盛りの長さの決まり (`^[0-9]+(\\.[0-9]+)?(<単位>|<単位>)$`)。書ける単位を読む */\nconst DURATION = /^\\^\\[0-9\\]\\+\\(\\\\\\.\\[0-9\\]\\+\\)\\?\\(([a-z|]+)\\)\\$$/u;\n/** 割合の決まり。百分率の `%` を持つ */\nconst RATIO = /%\\)\\$$/u;\n\nconst escape = (key: string): string => key.replaceAll(\"~\", \"~0\").replaceAll(\"/\", \"~1\");\n\n/** JSON Pointer `pointer` が指す `input` の中の値。辿れない時は `undefined` */\nfunction valueAt(input: unknown, pointer: string): unknown {\n let value = input;\n for (const raw of pointer.split(\"/\").slice(1)) {\n if (typeof value !== \"object\" || value === null) return undefined;\n value = (value as Record<string, unknown>)[raw.replaceAll(\"~1\", \"/\").replaceAll(\"~0\", \"~\")];\n }\n return value;\n}\n\n/** 箱の飛び先と段の出典の URL の決まりの場所 (#3199) */\nconst URL_RULE = \"#/definitions/url/pattern\";\n\n/** 箱と区画のアイコン名の決まりの場所 (#3311)。近い名前が在れば一覧の代わりにそれを示す (#3315) */\nconst ICON_RULE = \"#/definitions/icon/enum\";\n\n/** commit の hash の決まり (`^[0-9a-f]{<最小>,<最大>}$`)。字の数の幅を読む */\nconst HEX = /^\\^\\[0-9a-f\\]\\{(\\d+),(\\d+)\\}\\$$/u;\n\n/** `^[^…]+$` の形の決まりから書けない字を読む。違う形の決まりでは `undefined` */\nfunction forbiddenOf(pattern: string): Forbidden | undefined {\n const inside = /^\\^\\[\\^(.+)\\]\\+\\$$/u.exec(pattern)?.[1];\n if (inside === undefined) return undefined;\n const chars: string[] = inside.match(/\\\\.|[^\\\\]/gu) ?? [];\n return { space: chars.includes(\"\\\\s\"), chars: chars.filter((char) => char !== \"\\\\s\").map((char) => char.replace(/^\\\\/u, \"\")) };\n}\n\n/** `anyOf` の中の決まりが出した誤り。`anyOf` の誤り 1 つにまとめて出す */\nconst branchesOf = (anyOf: ErrorObject, errors: readonly ErrorObject[]): ErrorObject[] =>\n errors.filter(\n (error) =>\n error !== anyOf &&\n error.schemaPath.startsWith(`${anyOf.schemaPath}/`) &&\n (error.instancePath === anyOf.instancePath || error.instancePath.startsWith(`${anyOf.instancePath}/`)),\n );\n\nfunction toFieldError(error: ErrorObject, errors: readonly ErrorObject[], m: FieldMessages, input: unknown): FieldError {\n const params = error.params as Record<string, unknown>;\n const at = error.instancePath;\n switch (error.keyword) {\n case \"additionalProperties\": {\n const key = String(params.additionalProperty);\n return { pointer: `${at}/${escape(key)}`, message: m.additionalProperties(key) };\n }\n case \"required\": {\n const key = String(params.missingProperty);\n return { pointer: `${at}/${escape(key)}`, message: m.required(key) };\n }\n case \"not\": {\n if (RESERVED_ID.test(error.schemaPath)) return { pointer: at, message: m.reserved(STATE_ENDS) };\n if (GIT_EVENT.test(error.schemaPath)) return { pointer: at, message: m.kindOnly(GIT_EVENTS, \"git\") };\n if (TIME_EVENT.test(error.schemaPath)) return { pointer: `${at}/type`, message: m.kindOnly(TIME_EVENTS, \"time\") };\n if (TREE_EVENT.test(error.schemaPath)) return { pointer: `${at}/type`, message: m.kindOnly(TREE_EVENTS, \"tree\") };\n if (error.schemaPath === LINEUP_EVENT) return { pointer: `${at}/type`, message: m.kindOnly(LINEUP_EVENTS, \"lineup\") };\n if (error.schemaPath === TRY_EVENT) return { pointer: `${at}/type`, message: m.kindOnly(TRY_EVENTS, \"try\") };\n if (error.schemaPath === WIRED_EVENT) return { pointer: `${at}/type`, message: m.kindOnly(WIRED_EVENTS, \"sequence / architecture / state / git / time / tree\") };\n const last = at.slice(at.lastIndexOf(\"/\") + 1);\n if (error.schemaPath === ABSENT) return { pointer: at, message: m.not({ field: last, kind: ABSENT_KINDS[last] ?? last }) };\n const allowed = NOT_ALLOWED[last];\n return { pointer: allowed ? `${at}/${allowed.field}` : at, message: m.not(allowed) };\n }\n case \"anyOf\": {\n const branches = branchesOf(error, errors);\n const missing = branches.every((branch) => branch.keyword === \"required\") ? branches.map((branch) => String(branch.params.missingProperty)) : [];\n return { pointer: at, message: m.anyOf(missing) };\n }\n case \"discriminator\": {\n const tag = String(params.tag);\n return { pointer: `${at}/${escape(tag)}`, message: m.discriminator(tag, error.schemaPath === PART_TAG ? PART_TYPES : EVENT_TYPES) };\n }\n case \"enum\": {\n const written = error.schemaPath === ICON_RULE ? valueAt(input, at) : undefined;\n const near = typeof written === \"string\" ? nearest(written, ICON_NAMES) : undefined;\n if (typeof written === \"string\" && near !== undefined) return { pointer: at, message: m.unknownIcon(written, near) };\n return { pointer: at, message: m.enum((params.allowedValues as unknown[]).map(String)) };\n }\n case \"type\":\n return { pointer: at, message: m.type(String(params.type)) };\n case \"minLength\":\n return { pointer: at, message: m.minLength(Number(params.limit)) };\n case \"maxLength\":\n return { pointer: at, message: m.maxLength(Number(params.limit)) };\n case \"pattern\": {\n if (error.schemaPath === URL_RULE) return { pointer: at, message: m.url };\n const pattern = String(params.pattern);\n const hex = HEX.exec(pattern);\n if (hex) return { pointer: at, message: m.hex(Number(hex[1]), Number(hex[2])) };\n const duration = DURATION.exec(pattern);\n if (duration) return { pointer: at, message: m.duration((duration[1] ?? \"\").split(\"|\")) };\n if (RATIO.test(pattern)) return { pointer: at, message: m.ratio };\n return { pointer: at, message: m.pattern(forbiddenOf(pattern)) };\n }\n case \"minItems\":\n return { pointer: at, message: m.minItems(Number(params.limit)) };\n case \"maxItems\":\n return { pointer: at, message: m.maxItems(Number(params.limit)) };\n case \"minimum\":\n return { pointer: at, message: m.minimum(Number(params.limit)) };\n case \"const\":\n return { pointer: at, message: m.const(String(params.allowedValue)) };\n case \"oneOf\":\n return { pointer: at, message: m.oneOf };\n default:\n return { pointer: at, message: error.message ?? error.keyword };\n }\n}\n\nconst unescape = (key: string): string => key.replaceAll(\"~1\", \"/\").replaceAll(\"~0\", \"~\");\n\n/**\n * 版2へ移した版1の原本の誤りを、版1の欄の場所の誤りにする。図の種類が書けない欄は、版1の図の種類の欄 (`/git` など) の場所にする。\n * 欄が足りない時と知らない欄がある時は、欄の名前も版1の名前にする\n */\nfunction toVersion1Error(error: ErrorObject): ErrorObject {\n const section = error.schemaPath === ABSENT ? version1SectionOf(error.instancePath) : undefined;\n if (section !== undefined) return { ...error, instancePath: section };\n const param = error.keyword === \"required\" ? \"missingProperty\" : error.keyword === \"additionalProperties\" ? \"additionalProperty\" : undefined;\n if (param === undefined) return { ...error, instancePath: toVersion1Pointer(error.instancePath) };\n const full = toVersion1Pointer(`${error.instancePath}/${escape(String(error.params[param as keyof typeof error.params]))}`);\n const cut = full.lastIndexOf(\"/\");\n return { ...error, instancePath: full.slice(0, cut), params: { ...error.params, [param]: unescape(full.slice(cut + 1)) } };\n}\n\n/**\n * 原本の JSON を検査する。版が道具より新しいかは見ない (`readDiagram` が見る)。\n * 版1の原本は版2の形へ移して検査し、誤りは版1の欄の場所で返す。同じ場所の同じ文の誤りは 1 つにまとめる\n */\nexport function validateDiagram(input: unknown, options: CheckOptions = {}): Checked {\n const version1 = isVersion1(input);\n if (validate(version1 ? upgrade(input, FORMAT_VERSION) : input)) return { ok: true };\n const all = (validate.errors ?? []).map((error) => (version1 ? toVersion1Error(error) : error));\n const inBranch = new Set(all.filter((error) => error.keyword === \"anyOf\").flatMap((anyOf) => branchesOf(anyOf, all)));\n const m = FIELD_MESSAGES[options.lang ?? DEFAULT_LANG];\n // 条件付きの決まり (if / then) は中で落ちた決まりの誤りを別に出すので、包む側の if の誤りは出さない\n const errors = all.filter((error) => error.keyword !== \"if\" && !inBranch.has(error)).map((error) => toFieldError(error, all, m, input));\n return { ok: false, errors: errors.filter((error, i) => errors.findIndex((other) => other.pointer === error.pointer && other.message === error.message) === i) };\n}\n","/**\n * 原本の形式の版。\n *\n * 道具より新しい版の図は描かずに断る。古い版の図は、版を上げる変換を通して読み、\n * 原本の file を書き換えるのは移行の命令 (`migrateFile`、Node でだけ動く入口 `node.ts`) だけにする。\n * 版2 (#3346) は図の宣言を `blocks` のブロックの名前ごとの欄に持つ。版1の原本は読む時に版2へ移し、移したことを警告で返す。\n * 版の番号と、版1と版2の欄の対応は `model.ts` が持つ。\n */\nimport { FIELD_MESSAGES } from \"./field-messages\";\nimport { FORMAT_VERSION, fromModel, isVersion1, toModel, upgrade } from \"./model\";\nimport { type CheckOptions, type Diagram, type FieldError, validateDiagram } from \"./schema\";\nimport { DEFAULT_LANG, type NotationLang } from \"./words\";\n\n/** この道具が読める原本の版 */\nexport { FORMAT_VERSION };\n\nexport type Read = { ok: true; diagram: Diagram; warnings: string[] } | { ok: false; errors: FieldError[] };\n\nfunction newerThanTool(input: unknown): number | undefined {\n if (typeof input !== \"object\" || input === null) return undefined;\n const version = (input as { version?: unknown }).version;\n return typeof version === \"number\" && version > FORMAT_VERSION ? version : undefined;\n}\n\nconst newerError = (version: number, lang: NotationLang): FieldError => ({\n pointer: \"/version\",\n message: FIELD_MESSAGES[lang].newer(version, FORMAT_VERSION),\n});\n\n/**\n * 原本を読む。道具より新しい版は描かずに断り、形の誤りは検査の誤りとして返す。誤りの文は `options.lang` (渡さなければ英語) で出す。\n * 版1の原本は版2へ移し、空の並びを外して欄を版2の並びに整えた原本と、移したことの警告を返す。版2の原本は渡した物をそのまま返す\n */\nexport function readDiagram(input: unknown, options: CheckOptions = {}): Read {\n const lang = options.lang ?? DEFAULT_LANG;\n const newer = newerThanTool(input);\n if (newer !== undefined) return { ok: false, errors: [newerError(newer, lang)] };\n const checked = validateDiagram(input, options);\n if (!checked.ok) return checked;\n if (!isVersion1(input)) return { ok: true, diagram: input as Diagram, warnings: [] };\n const diagram = fromModel(toModel(upgrade(input, FORMAT_VERSION) as unknown as Diagram), FORMAT_VERSION);\n return { ok: true, diagram, warnings: [FIELD_MESSAGES[lang].upgraded(1, FORMAT_VERSION)] };\n}\n","/**\n * 出典の描き方 (#3199、#3345)。\n *\n * 出典は図の SVG に描かない。頁に置いた図の下の、読み上げの道具が段の順に読む一覧 (`player.ts`) に出す。\n * 段の項目の本文の後ろに、名前を URL への link にした項目を書いた順に並べる。出典を書かない段には何も足さない。\n */\nimport type { StepSource } from \"./block\";\n\n/** 段の項目 `item` に、出典の link の並びを足す */\nexport function drawSources(doc: Document, item: HTMLElement, sources: readonly StepSource[] | undefined): void {\n if (!sources) return;\n const list = doc.createElement(\"ul\");\n for (const source of sources) {\n const link = doc.createElement(\"a\");\n link.href = source.url;\n link.textContent = source.name;\n const entry = doc.createElement(\"li\");\n entry.append(link);\n list.append(entry);\n }\n item.append(list);\n}\n","/**\n * 段の描き方 (#3049、#3345)。\n *\n * 段は図の SVG に描かない。頁に置いた図の下の語りの帯 (`player.ts`) に今の段の題と本文を出し、\n * 読み上げの道具が段の順に読む一覧に、全ての段の題と本文を並べる。段の命令 (`code`) はどちらにも出さない。\n */\nimport type { Step } from \"../../schema\";\n\n/**\n * 全ての段の題と本文の写しを、今の段と同じ升 `text` に重ねる。見た目からは隠して場所だけを取り、\n * 帯の高さが本文の最も長い段で決まるので、段を送っても図の枠が伸び縮みしない (#3049)\n */\nexport function drawRooms(doc: Document, text: HTMLElement, steps: readonly Step[]): void {\n for (const step of steps) {\n const room = doc.createElement(\"div\");\n room.className = \"dg-room\";\n room.dataset.dragon = \"caption-room\";\n const roomTitle = doc.createElement(\"p\");\n roomTitle.className = \"dg-tt\";\n roomTitle.textContent = step.title;\n const roomBody = doc.createElement(\"p\");\n roomBody.className = \"dg-tb\";\n roomBody.textContent = step.body;\n room.append(roomTitle, roomBody);\n text.append(room);\n }\n}\n\n/** 読み上げの段の一覧の 1 項目。段の題を強めて置き、本文を行ごとの段落にする */\nexport function drawStepItem(doc: Document, step: Step): HTMLLIElement {\n const item = doc.createElement(\"li\");\n const head = doc.createElement(\"strong\");\n head.textContent = step.title;\n item.append(head);\n for (const line of step.body.split(\"\\n\")) {\n const p = doc.createElement(\"p\");\n p.textContent = line;\n item.append(p);\n }\n return item;\n}\n","/**\n * 箱の中の処理の描き方 (#3345)。\n *\n * 時系列図の処理は、その段の間だけ生存線の上の札に出す。ほかの図の種類の処理は箱の下の字に出し、\n * 箱の下の字の移り変わり (`blocks/note/draw.ts` の `subChanges`) が処理の字も組む。\n */\nimport type { SceneAction } from \"../../layout/scene\";\nimport { LOOK } from \"../../look/values\";\nimport { partRadius } from \"../../render/corner\";\nimport type { Shown } from \"../../render/ink\";\nimport { type Ctx, esc, r1 } from \"../../render/parts\";\nimport { cs } from \"../color/draw\";\nimport type { Span } from \"../../timeline\";\n\n/** 時系列図の箱の中の処理の札。その段の間だけ生存線の上に出す。`again` を渡すと (止め絵を選んだ図、#3200)、その間に同じ札をもう 1 つ出す。 */\nexport function action(a: SceneAction, at: number, until: number, ctx: Ctx, again?: Span): string {\n const shown: Shown[] = again\n ? [\n [at, until],\n [again.start, again.end],\n ]\n : [[at, until]];\n ctx.ink.push({ text: a.text, rect: a, shown, boxed: true });\n return shown\n .map(\n ([from, to]) =>\n `<g class=\"dg-act dg-a\" style=\"${cs(a.color)};${ctx.m.rise(from, to, true)}\"><rect x=\"${r1(a.x)}\" y=\"${r1(a.y)}\" width=\"${r1(a.w)}\" height=\"${a.h}\" rx=\"${partRadius(ctx.corner, LOOK.action.radius)}\"/><text x=\"${r1(a.x + a.w / 2)}\" y=\"${r1(a.y + a.h / 2 + LOOK.baseline.action)}\" text-anchor=\"middle\">${esc(a.text)}</text></g>`,\n )\n .join(\"\");\n}\n","/**\n * 線の描き方 (#3345)。\n *\n * 先に点線で道を見せ、その段で色の線を引き、流れる点で向きを見せる。済んだ線は薄く残す。\n * 道の形と曲がり角の丸め (`pathOf`) と矢じり (`arrowHead`) は、状態遷移図の通らない道と同じ下請けを使う。\n */\nimport type { SceneEdge } from \"../../layout/scene\";\nimport { EASE } from \"../../look/values\";\nimport { ALWAYS } from \"../../render/ink\";\nimport type { Frame } from \"../../render/motion\";\nimport { arrowHead, type Ctx, pathOf } from \"../../render/parts\";\nimport { cs } from \"../color/draw\";\nimport type { EdgeTime } from \"../../timeline\";\n\n/**\n * 線。点線で道を見せておき、その段で色の線を引いて、段の終わりまで流れる点で向きを見せる。\n * 済んだ段は薄く残し、最後の段の後に通った道を全て濃くし直す。\n * `past` を立てると (状態遷移図、#3171)、段が終わった後は色の線を消して灰の実線に替え、最後の段まで残す。\n * `since` を渡すと (木の図の後から現れる箱へ向かう線、#3240)、点線の道をその時刻から出す。\n */\nexport function edge(e: SceneEdge, time: EdgeTime, ctx: Ctx, past = false, since = 0): { base: string; lit: string } {\n const { m } = ctx;\n // 点線の道は `since` から最後まで見えている。`since` が 0 なら初めから見えている\n ctx.traces.push({ from: e.from, to: e.to, points: e.points, shown: since > 0 ? [[since, Number.POSITIVE_INFINITY]] : ALWAYS });\n const d = pathOf(e.points);\n const head = arrowHead(e.points);\n const { start: a, drawn: b, end } = time;\n const tail: Frame[] = past\n ? [\n [end, { opacity: 1 }, EASE.inOut],\n [end + 0.4, { opacity: 0 }],\n [m.total, { opacity: 0 }],\n ]\n : [\n [end, { opacity: 1 }, EASE.inOut],\n [end + 0.4, { opacity: 0.45 }],\n [ctx.end + 0.3, { opacity: 0.45 }, EASE.inOut],\n [ctx.end + 1, { opacity: 0.95 }],\n [m.last, { opacity: 0.95 }, EASE.inOut],\n [m.total, { opacity: 0 }],\n ];\n const line = m.kf([\n [0, { opacity: 0, \"stroke-dashoffset\": 1 }],\n [a, { opacity: 0, \"stroke-dashoffset\": 1 }, EASE.inOut],\n [a + 0.05, { opacity: 1 }],\n [b, { \"stroke-dashoffset\": 0 }],\n [m.last, { \"stroke-dashoffset\": 0 }],\n [m.total, { \"stroke-dashoffset\": 1 }],\n ...tail,\n ]);\n const hk = m.kf([[0, { opacity: 0 }], [b - 0.05, { opacity: 0 }], [b, { opacity: 1 }], ...tail]);\n const run = -(end - b) * 26;\n const flow = m.kf([\n [0, { opacity: 0, \"stroke-dashoffset\": 0 }],\n [b, { opacity: 0, \"stroke-dashoffset\": 0 }],\n [b + 0.25, { opacity: 0.9 }],\n [end - 0.1, { opacity: 0.9 }, EASE.inOut],\n [end + 0.2, { opacity: 0, \"stroke-dashoffset\": run }],\n [m.total, { opacity: 0, \"stroke-dashoffset\": run }],\n ]);\n const grey = past ? m.kf([[0, { opacity: 0 }], [end, { opacity: 0 }, EASE.inOut], [end + 0.4, { opacity: 1 }], [m.last, { opacity: 1 }, EASE.inOut], [m.total, { opacity: 0 }]]) : \"\";\n const path = `<path class=\"dg-e\" d=\"${d}\"/><path class=\"dg-eh\" d=\"${head}\"/>`;\n return {\n base: `${since > 0 ? `<g class=\"dg-a\" style=\"${m.vis(since)}\">${path}</g>` : path}${past ? `<path class=\"dg-e-past dg-a\" d=\"${d}\" style=\"${grey}\"/><path class=\"dg-eh-past dg-a\" d=\"${head}\" style=\"${grey}\"/>` : \"\"}`,\n lit: `<g style=\"${cs(e.color)}\"><path class=\"dg-e-on dg-a\" pathLength=\"1\" d=\"${d}\" style=\"${line}\"/><path class=\"dg-eh-on dg-a\" d=\"${head}\" style=\"${hk}\"/><path class=\"dg-flow dg-a\" d=\"${d}\" style=\"${flow}\"/></g>`,\n };\n}\n","/**\n * 線の名前の描き方 (#3345)。\n *\n * 線の名前は、その段の間だけ色付きの札で出し、済んだら消す。置き場所は並べ方 (`layout/`) が線の中ほどの上か右に決める。\n * 状態遷移図では段が終わった後も札を外した灰の字で薄く残し (#3171)、止め絵を選んだ図では最後の段の止め絵に全ての段の名前を出す (#3200)。\n */\nimport { textBox } from \"../../layout/measure\";\nimport type { SceneLabel } from \"../../layout/scene\";\nimport { LOOK, TYPE } from \"../../look/values\";\nimport { partRadius } from \"../../render/corner\";\nimport type { Shown } from \"../../render/ink\";\nimport { type Ctx, esc, r1 } from \"../../render/parts\";\nimport { cs } from \"../color/draw\";\nimport type { LabelTime, Span } from \"../../timeline\";\n\n/**\n * 同じ線の同じ名前を後の段が置く時は、薄く残した名前をその段が始まるまでで消す (#3184)。\n * 止め絵で全ての段の名前を出し直す間は、同じ所に出る後の段の名前に任せる (#3200)\n */\nexport function fadeBefore(l: SceneLabel, time: LabelTime, steps: Span[]): LabelTime {\n if (l.until === undefined) return time;\n const { after, again: _again, ...rest } = time;\n if (!after) return rest;\n const cut = (steps[l.until] as Span).start;\n return cut > after.start\n ? { ...rest, after: { start: after.start, end: Math.min(after.end, cut) } }\n : rest;\n}\n\n/**\n * 線の名前の札。その段の間だけ出し、段の終わりまでに消え終わる。時刻の表が `after` を持つ時は、その間だけ札を外した灰の字で薄く残す (#3171)。\n * `again` を持つ時は (止め絵を選んだ図、#3200)、その間に同じ札をもう 1 つ出す。\n */\nexport function label(l: SceneLabel, time: LabelTime, ctx: Ctx): string {\n const ja = l.family === \"sans\" ? \" dg-capj\" : \"\";\n const { radius } = LOOK.label;\n const shown: Shown[] = time.again\n ? [\n [time.start, time.end],\n [time.again.start, time.again.end],\n ]\n : [[time.start, time.end]];\n // 札の間は札の四角を、薄く残す間は札を外した字の四角を記録する\n ctx.ink.push({ text: l.text, rect: l, shown, boxed: true });\n if (time.after)\n ctx.ink.push({\n text: l.text,\n rect: textBox(\n l.text,\n l.x + l.w / 2,\n l.y + l.h / 2 + LOOK.baseline.label,\n l.family === \"sans\" ? TYPE.labelJa : TYPE.label,\n \"middle\",\n ),\n shown: [[time.after.start, time.after.end]],\n });\n const x = r1(l.x + l.w / 2);\n const y = r1(l.y + l.h / 2 + LOOK.baseline.label);\n const past = time.after\n ? `<g class=\"dg-cap-past${l.family === \"sans\" ? \" dg-cap-pastj\" : \"\"} dg-a\" style=\"${ctx.m.vis(time.after.start, time.after.end)}\"><text x=\"${x}\" y=\"${y}\" text-anchor=\"middle\">${esc(l.text)}</text></g>`\n : \"\";\n const caps = shown.map(\n ([a, b]) =>\n `<g class=\"dg-cap${ja} dg-a\" style=\"${cs(l.color)};${ctx.m.rise(a, b, true)}\"><rect x=\"${r1(l.x)}\" y=\"${r1(l.y)}\" width=\"${r1(l.w)}\" height=\"${l.h}\" rx=\"${partRadius(ctx.corner, radius)}\"/><text x=\"${x}\" y=\"${y}\" text-anchor=\"middle\">${esc(l.text)}</text></g>`,\n );\n return `${past}${caps.join(\"\")}`;\n}\n","/**\n * 区画の描き方 (#3345)。\n *\n * 区画は場所か系統を表す横の帯で、名前を左上に絵柄と 2 行まで置き、その下に添え書きを置く。\n */\nimport type { SceneRegion } from \"../../layout/scene\";\nimport { type Corner, LOOK, TYPE } from \"../../look/values\";\nimport { frameShape, partRadius } from \"../../render/corner\";\nimport type { Ink } from \"../../render/ink\";\nimport { r1, write } from \"../../render/parts\";\nimport { cs } from \"../color/draw\";\nimport { drawsIcon, glyph } from \"../icon/draw\";\n\n/** 区画を描く。`corner` は色味の角の形で、角を落とす色味では帯の右上と左下を落とし、絵柄の枠を丸めない (#3344) */\nexport function band(region: SceneRegion, ink: Ink[], corner: Corner): string {\n const { radius, icon, iconRadius, iconScale, nameY, line } = LOOK.region;\n const { x, y } = region.header;\n const lines = region.lines\n .map((t, k) => write(ink, \"dg-bz\", x, region.y + nameY + k * line, t, TYPE.regionName))\n .join(\"\");\n const note = region.note\n ? write(\n ink,\n \"dg-bx\",\n x,\n region.y + nameY + region.lines.length * line + 1,\n region.note,\n TYPE.regionNote,\n )\n : \"\";\n const mark = drawsIcon(region.icon)\n ? `<rect class=\"dg-bi\" x=\"${r1(x)}\" y=\"${r1(y)}\" width=\"${icon}\" height=\"${icon}\" rx=\"${partRadius(corner, iconRadius)}\"/>${glyph(region.icon, x + icon / 2, y + icon / 2, iconScale)}`\n : \"\";\n const frame = frameShape(\n corner,\n ' class=\"dg-band\"',\n { x: region.x + 0.5, y: region.y + 0.5, w: region.w - 1, h: region.h - 1 },\n `<rect class=\"dg-band\" x=\"${r1(region.x + 0.5)}\" y=\"${r1(region.y + 0.5)}\" width=\"${r1(region.w - 1)}\" height=\"${r1(region.h - 1)}\" rx=\"${radius}\"/>`,\n );\n return `<g style=\"${cs(region.color)}\">${frame}${mark}${lines}${note}</g>`;\n}\n","/**\n * 生存線の描き方 (#3345)。\n *\n * 時系列図の箱の下から、点線の縦の線を最後の段の下まで伸ばす。置き場所は時系列図の並べ方 (`kinds/sequence/layout.ts`) が決める。\n */\nimport { r1 } from \"../../render/parts\";\n\nexport function lifeline(x: number, y1: number, y2: number): string {\n return `<line class=\"dg-ll\" x1=\"${r1(x)}\" y1=\"${r1(y1)}\" x2=\"${r1(x)}\" y2=\"${r1(y2)}\"/>`;\n}\n","/**\n * 箱の下の小さな字の描き方 (#3345)。\n *\n * 下の字は箱の 3 段の 1 つで、箱を描く部品 (`render/parts.ts` の `card` と `subLines`) が箱と一緒に描く。\n * このブロックは、段で起きた書き換え (`note`) と、時系列図でない図の箱の中の処理 (`act`) から、\n * 箱ごとの下の字の移り変わりを組む。\n */\nimport { MOTION } from \"../../look/values\";\nimport type { SubChange } from \"../box/draw\";\nimport type { DiagramModel } from \"../../schema\";\nimport type { Span, Timeline } from \"../../timeline\";\n\n/**\n * 箱の下の字の移り変わり。書き換えはそのまま残し、構成図の処理はその段の間だけ出して元へ戻す。\n * 止め絵を選んだ図は、その箱で最後に起きたのが処理なら、最後の段で起きることが済んだ時にその処理を出し直して繰り返す前まで残す (#3200)\n */\nexport function subChanges(diagram: DiagramModel, timeline: Timeline, actionsInBox: boolean): Map<string, SubChange[]> {\n type Raw = { t: number; order: number; box: string; set?: string; act?: string | null };\n const raw: Raw[] = [];\n const { whole } = timeline;\n let order = 0;\n for (const time of timeline.events) {\n const event = diagram.steps[time.step]?.events[time.event];\n if (event?.type === \"swap\") raw.push({ t: time.at, order: order++, box: event.box, set: event.text });\n if (actionsInBox && event?.type === \"action\") {\n raw.push({ t: time.at, order: order++, box: event.box, act: event.label });\n const end = (timeline.steps[time.step] as Span).end;\n if (!whole || end <= whole.start) raw.push({ t: end, order: order++, box: event.box, act: null });\n }\n }\n raw.sort((a, b) => a.t - b.t || a.order - b.order);\n const out = new Map<string, SubChange[]>();\n for (const box of diagram.boxes) {\n let base: [string, string] = [box.sub ?? \"\", \"dg-ss\"];\n let acting: string | undefined;\n let shown = base.join(\"|\");\n const list: SubChange[] = [];\n const changes = raw.filter((r) => r.box === box.id);\n const latest = [...changes].reverse().find((r) => r.set !== undefined || typeof r.act === \"string\");\n if (whole && typeof latest?.act === \"string\") changes.push({ t: whole.start, order: order++, box: box.id, act: latest.act });\n for (const change of changes) {\n // 書き換えは、出ている処理の字も置き換える\n if (change.set !== undefined) {\n base = [change.set, \"dg-ss-ok\"];\n acting = undefined;\n }\n if (change.act !== undefined) acting = change.act ?? undefined;\n const now: [string, string] = acting !== undefined ? [acting, \"dg-ss-act\"] : base;\n if (now.join(\"|\") === shown) continue;\n shown = now.join(\"|\");\n list.push([change.t, now[0], now[1]]);\n }\n // すぐ次の字に替わる字は読めないので出さない\n const kept = list.filter((change, k) => {\n const next = list[k + 1];\n return next === undefined || next[0] - change[0] >= MOTION.minShow;\n });\n out.set(box.id, kept);\n }\n return out;\n}\n","/**\n * 脇道の描き方 (#3163、#3171、#3347)。\n *\n * 通らない道は点線で道と向きだけを見せ、運ぶ物を走らせない。どの段も辿り着かない状態は点線の縁の薄い箱にし、\n * 図の右上の脇道の囲みに入れる。囲みは左上に名前を、その下に添え書きを 1 行ずつ置く。\n * 道の形と曲がり角の丸め (`pathOf`) と矢じり (`arrowHead`) は、線と同じ下請けを使う。\n */\nimport type { SceneBox, ScenePath, SceneSide } from \"../../layout/scene\";\nimport { type ColorKey, type Corner, LOOK, TYPE } from \"../../look/values\";\nimport { frameShape, partRadius } from \"../../render/corner\";\nimport { ALWAYS, type Ink, type Trace } from \"../../render/ink\";\nimport { arrowHead, esc, pathOf, r1, write } from \"../../render/parts\";\nimport { cs } from \"../color/draw\";\nimport { drawsIcon, glyph } from \"../icon/draw\";\n\n/** 状態遷移図の通らない道。点線で道と向きだけを見せ、運ぶ物を走らせない */\nexport function path(p: ScenePath, color: ColorKey, ink: Ink[], traces: Trace[]): string {\n traces.push({ from: p.from, to: p.to, points: p.points, shown: ALWAYS });\n const sans = p.label?.family === \"sans\";\n const label = p.label\n ? write(ink, `dg-path-t${sans ? \" dg-path-tj\" : \"\"}`, p.label.x + LOOK.label.padX, p.label.y + p.label.h / 2 + LOOK.baseline.label, p.label.text, sans ? TYPE.labelJa : TYPE.label)\n : \"\";\n return `<g data-path=\"${esc(`${p.from}->${p.to}`)}\" style=\"${cs(color)}\"><path class=\"dg-path\" d=\"${pathOf(p.points)}\"/><path class=\"dg-path-h\" d=\"${arrowHead(p.points)}\"/>${label}</g>`;\n}\n\n/** 状態遷移図の脇道の囲み。左上に囲みの名前を、その下に添え書きを 1 行ずつ置く。囲みの角は色味の角の形 (`corner`) で描く */\nexport function side(s: SceneSide, color: ColorKey, ink: Ink[], corner: Corner): string {\n const { pad } = LOOK.state.side;\n const title = s.y + pad + TYPE.regionName.size;\n const notes = s.notes.map((note, k) => write(ink, \"dg-side-n\", s.x + pad, title + LOOK.region.line * (k + 1), note, TYPE.regionNote)).join(\"\");\n return (\n `<g style=\"${cs(color)}\">${frameShape(corner, ' class=\"dg-side\"', { x: s.x + 0.5, y: s.y + 0.5, w: s.w - 1, h: s.h - 1 }, `<rect class=\"dg-side\" x=\"${r1(s.x + 0.5)}\" y=\"${r1(s.y + 0.5)}\" width=\"${r1(s.w - 1)}\" height=\"${r1(s.h - 1)}\" rx=\"${LOOK.region.radius}\"/>`)}` +\n `${write(ink, \"dg-side-t\", s.x + pad, title, s.title, TYPE.regionName)}${notes}</g>`\n );\n}\n\n/**\n * 状態遷移図の、どの段も辿り着かない状態。点線の縁の札で、絵柄を左に、名前と下の字を右に並べる (#3171)。光らず、字も書き換わらない。\n * 札の縁と絵柄の角は色味の角の形 (`corner`) で描く\n */\nexport function ghostCard(box: SceneBox, ink: Ink[], corner: Corner): string {\n const { icon, iconRadius, iconScale, radius } = LOOK.box;\n const G = LOOK.state.ghost;\n const ix = box.x + G.pad + icon / 2;\n const tx = box.x + G.pad + icon + G.gap;\n const mark = drawsIcon(box.icon)\n ? `<rect class=\"dg-ic\" x=\"${r1(ix - icon / 2)}\" y=\"${r1(box.cy - icon / 2)}\" width=\"${icon}\" height=\"${icon}\" rx=\"${partRadius(corner, iconRadius)}\"/>${glyph(box.icon, ix, box.cy, iconScale)}`\n : \"\";\n const nameY = box.sub ? G.nameY : LOOK.baseline.mark;\n const frame = { x: box.x, y: box.y, w: box.w, h: box.h };\n const sub = box.sub ? write(ink, \"dg-ss\", tx, box.cy + G.subY, box.sub, TYPE.boxSub, ALWAYS, \"start\") : \"\";\n return (\n `<g data-ghost=\"${esc(box.id)}\" style=\"${cs(box.color)}\">${frameShape(corner, ' class=\"dg-ghost\"', frame, `<rect class=\"dg-ghost\" x=\"${r1(box.x)}\" y=\"${r1(box.y)}\" width=\"${r1(box.w)}\" height=\"${box.h}\" rx=\"${radius}\"/>`)}` +\n `${mark}${write(ink, \"dg-sn\", tx, box.cy + nameY, box.name, TYPE.boxName, ALWAYS, \"start\")}${sub}</g>`\n );\n}\n","/**\n * 始まりと終わりの印の描き方 (#3163、#3347)。\n *\n * 始まりは塗った丸、終わりは輪の中の丸で描く。脇道の中の終わりは点線の輪にし、脇道の状態の色を付ける。\n * 印の置き場所と字の置き場所は場面 (`layout/scene.ts`) が持つ。\n */\nimport { markText, type SceneEnd } from \"../../layout/scene\";\nimport { type ColorKey, LOOK, TYPE } from \"../../look/values\";\nimport type { Ink } from \"../../render/ink\";\nimport { r1, write } from \"../../render/parts\";\nimport { cs } from \"../color/draw\";\n\n/** 状態遷移図の始まりと終わりの印。始まりは塗った丸、終わりは輪の中の丸で、脇道の中の終わりは点線の輪 */\nexport function endMark(e: SceneEnd, color: ColorKey, ink: Ink[]): string {\n const { end } = LOOK.state;\n const at = markText(e);\n const text = e.text === \"\" ? \"\" : write(ink, \"dg-mark\", at[0], at[1], e.text, TYPE.regionNote);\n const x = r1(e.x);\n const y = r1(e.y);\n if (e.kind === \"start\") return `<g data-end=\"start\"><circle class=\"dg-start\" cx=\"${x}\" cy=\"${y}\" r=\"${e.r}\"/>${text}</g>`;\n if (e.ghost) return `<g data-end=\"finish\" style=\"${cs(color)}\"><circle class=\"dg-end-x\" cx=\"${x}\" cy=\"${y}\" r=\"${e.r}\"/><circle class=\"dg-end-xi\" cx=\"${x}\" cy=\"${y}\" r=\"${end.inner}\"/>${text}</g>`;\n return `<g data-end=\"finish\"><circle class=\"dg-end\" cx=\"${x}\" cy=\"${y}\" r=\"${e.r}\"/><circle class=\"dg-end-in\" cx=\"${x}\" cy=\"${y}\" r=\"${end.inner}\"/>${text}</g>`;\n}\n","/**\n * 中身の帯の描き方 (#3345)。\n *\n * 帯は図の下に 1 本置き、左に印と題、欄は細い線で区切り、上に欄の名前、下に値を出す。\n * 段で書いた値と札 (`set`) の移り変わりを欄ごとに組み (`fieldChanges`)、帯を描く部品 (`strip`) が出す。\n * 時間軸の図の物差しの欄は、時間軸の図を描く部品が渡す `meter` が描く。\n */\nimport { hasWide, textBox, textWidth } from \"../../layout/measure\";\nimport type { Layout, SceneField, SceneStrip } from \"../../layout/scene\";\nimport { type ColorKey, LOOK, MOTION, TYPE } from \"../../look/values\";\nimport { frameShape, partRadius } from \"../../render/corner\";\nimport { type Ctx, esc, r1, write } from \"../../render/parts\";\nimport { cs } from \"../color/draw\";\nimport { glyph } from \"../icon/draw\";\nimport type { DiagramModel } from \"../../schema\";\nimport type { Span, Timeline } from \"../../timeline\";\n\n/** 中身の帯の 1 欄の移り変わり。値と札は、次の値か札が来るまで出る。 */\nexport interface FieldChange {\n at: number;\n value?: string;\n tag?: string;\n color: ColorKey;\n /** 変わった段と、その段の終わり */\n step: number;\n until: number;\n}\n\n/** 段で書いた値と札 (`strip` の出来事) を、欄ごとの移り変わりにする。色はその段の番号の色 */\nexport function fieldChanges(\n diagram: DiagramModel,\n timeline: Timeline,\n layout: Layout,\n): Map<string, FieldChange[]> {\n const out = new Map<string, FieldChange[]>();\n for (const time of timeline.events) {\n const event = diagram.steps[time.step]?.events[time.event];\n if (event?.type !== \"strip\") continue;\n const color: ColorKey = layout.badges[time.step]?.color ?? \"slate\";\n const list = out.get(event.field) ?? [];\n const until = (timeline.steps[time.step] as Span).end;\n list.push({\n at: time.at,\n color,\n step: time.step,\n until,\n ...(event.value !== undefined ? { value: event.value } : {}),\n ...(event.tag !== undefined ? { tag: event.tag } : {}),\n });\n out.set(event.field, list);\n }\n return out;\n}\n\n/**\n * 中身の帯。`now` を立てると (状態遷移図、#3171)、段の中で変わった値をその段の終わりまで線の色 (今の状態の色) で描き、\n * 欄の名前の横に同じ色の点を置く。帯の通った状態の欄は、`arrivals` が持つ着いた時刻に点を塗る。\n * `meter` を渡すと (時間軸の図、#3165)、物差しの欄は値の字の代わりに `meter` が描く物差しを置く\n */\nexport function strip(\n s: SceneStrip,\n changes: Map<string, FieldChange[]>,\n ctx: Ctx,\n now = false,\n arrivals = new Map<string, number>(),\n meter?: (field: SceneField) => string | undefined,\n): string {\n const { m, sh } = ctx;\n const S = LOOK.strip;\n const my = s.y + S.h / 2;\n const parts = [\n frameShape(\n ctx.corner,\n ` class=\"dg-strip\" ${sh}`,\n { x: s.x + 0.5, y: s.y + 0.5, w: s.w - 1, h: s.h - 1 },\n `<rect class=\"dg-strip\" x=\"${r1(s.x + 0.5)}\" y=\"${r1(s.y + 0.5)}\" width=\"${r1(s.w - 1)}\" height=\"${r1(s.h - 1)}\" rx=\"${LOOK.region.radius}\" ${sh}/>`,\n ),\n `<g style=\"${cs(\"slate\")}\"><rect class=\"dg-bi\" x=\"${r1(s.x + S.pad)}\" y=\"${r1(my - S.icon / 2)}\" width=\"${S.icon}\" height=\"${S.icon}\" rx=\"${partRadius(ctx.corner, LOOK.box.iconRadius)}\"/>${glyph(\"env\", s.x + S.pad + S.icon / 2, my, 0.78)}</g>`,\n write(\n ctx.ink,\n \"dg-sh\",\n s.x + S.titleX,\n my + LOOK.baseline.stripTitle,\n s.title,\n TYPE.stripTitle,\n ),\n ];\n s.fields.forEach((field, i) => {\n const prev = s.fields[i - 1];\n if (prev && prev.y === field.y) {\n const sx = field.x - S.fieldGap / 2;\n parts.push(\n `<line class=\"dg-sep\" x1=\"${r1(sx)}\" y1=\"${r1(field.y + S.sepInset)}\" x2=\"${r1(sx)}\" y2=\"${r1(field.y + S.h - S.sepInset)}\"/>`,\n );\n }\n parts.push(write(ctx.ink, \"dg-fl\", field.x, field.y + S.nameY, field.name, TYPE.fieldName));\n const gauge = meter?.(field);\n if (gauge !== undefined) {\n parts.push(gauge);\n return;\n }\n const list = changes.get(field.name) ?? [];\n const values = list.filter((c) => c.value !== undefined);\n const tags = list.filter((c) => c.tag !== undefined);\n values.forEach((c, k) => {\n const next = values[k + 1]?.at;\n const value = c.value as string;\n const cls = hasWide(value) ? \"dg-fvj\" : \"dg-fv\";\n // 値は、次の値が来るまで (色を付けた間と墨に戻した間を合わせて) 1 件で記録する\n ctx.ink.push({\n text: value,\n rect: textBox(\n value,\n field.x,\n field.y + S.valueY,\n hasWide(value) ? TYPE.fieldValueJa : TYPE.fieldValue,\n ),\n shown: [[c.at, next === undefined ? Number.POSITIVE_INFINITY : next - MOTION.untilFade]],\n });\n const textOf = (c: string): string =>\n `<text class=\"${c}\" x=\"${r1(field.x)}\" y=\"${r1(field.y + S.valueY)}\">${esc(value)}</text>`;\n const text = textOf(cls);\n if (!now) {\n const anim = next === undefined ? m.rise(c.at) : m.rise(c.at, next - MOTION.untilFade);\n parts.push(`<g class=\"dg-a\" style=\"${anim}\">${text}</g>`);\n return;\n }\n // 変わった段の間は今の状態の色で、段が終わると墨に戻す\n const until = Math.min(c.until, next ?? c.until);\n const dot = `<circle class=\"dg-fl-now\" cx=\"${r1(field.x + textWidth(field.name, TYPE.fieldName) + S.now.gap)}\" cy=\"${r1(field.y + S.nameY - TYPE.fieldName.size / 3)}\" r=\"${S.now.r}\"/>`;\n parts.push(\n `<g class=\"dg-fv-now dg-a\" data-step=\"${c.step}\" style=\"${cs(c.color)};${m.rise(c.at, until - MOTION.untilFade)}\">${textOf(`${cls} dg-fv-c`)}${dot}</g>`,\n );\n if (next === undefined || next > until)\n parts.push(\n `<g class=\"dg-a\" style=\"${m.vis(until - MOTION.untilFade, next === undefined ? m.last : next - MOTION.untilFade)}\">${text}</g>`,\n );\n });\n tags.forEach((c, k) => {\n const next = tags[k + 1]?.at;\n const tag = c.tag as string;\n // 札は、その時に出ている値の右に置く\n const shown = [...values].reverse().find((v) => v.at <= c.at + 1e-9)?.value;\n const x =\n field.x +\n (shown\n ? textWidth(shown, hasWide(shown) ? TYPE.fieldValueJa : TYPE.fieldValue) + S.tagGap\n : 0);\n const w = textWidth(tag, TYPE.tag) + S.tagPadX * 2;\n const y = field.y + S.valueY - S.tagH / 2 - LOOK.baseline.tag;\n ctx.ink.push({\n text: tag,\n rect: { x, y, w, h: S.tagH },\n shown: [[c.at, next === undefined ? Number.POSITIVE_INFINITY : next - MOTION.untilFade]],\n boxed: true,\n });\n parts.push(\n `<g class=\"dg-tg dg-popc dg-a\" style=\"${cs(c.color)};${next === undefined ? m.pop(c.at) : m.pop(c.at, next - MOTION.untilFade)}\"><rect x=\"${r1(x)}\" y=\"${r1(y)}\" width=\"${r1(w)}\" height=\"${S.tagH}\" rx=\"${partRadius(ctx.corner, S.tagH / 2)}\"/><text x=\"${r1(x + w / 2)}\" y=\"${r1(y + S.tagH / 2 + LOOK.baseline.tag)}\" text-anchor=\"middle\">${esc(tag)}</text></g>`,\n );\n });\n });\n if (s.trail) {\n const t = s.trail;\n const last = s.fields[s.fields.length - 1];\n if (last && last.y === t.y) {\n const sx = t.x - S.fieldGap / 2;\n parts.push(\n `<line class=\"dg-sep\" x1=\"${r1(sx)}\" y1=\"${r1(t.y + S.sepInset)}\" x2=\"${r1(sx)}\" y2=\"${r1(t.y + S.h - S.sepInset)}\"/>`,\n );\n }\n parts.push(write(ctx.ink, \"dg-fl\", t.x, t.y + S.nameY, t.title, TYPE.fieldName));\n const dy = t.y + S.valueY - TYPE.fieldValue.size / 3;\n t.states.forEach((state, k) => {\n const cx = r1(t.x + S.trail.r + k * S.trail.step);\n const at = arrivals.get(state.box);\n const fill =\n at === undefined\n ? \"\"\n : `<circle class=\"dg-tr-fill dg-a\" cx=\"${cx}\" cy=\"${r1(dy)}\" r=\"${S.trail.r}\" style=\"${m.pop(at)}\"/>`;\n parts.push(\n `<g data-trail=\"${esc(state.box)}\" style=\"${cs(state.color)}\"><circle class=\"dg-tr-ring\" cx=\"${cx}\" cy=\"${r1(dy)}\" r=\"${S.trail.r}\"/>${fill}</g>`,\n );\n });\n }\n return parts.join(\"\");\n}\n","/**\n * 運ぶ物が見えている時刻 (#3345)。時刻の表 (`timeline.ts`) が、線を引く時刻を決めた後に呼ぶ。\n *\n * 運ぶ物は主役 (封筒と札は 1 つ、硬貨は別の 1 つ) ごとに途切れず見え続ける。着いた後は\n * 次の同じ主役が出発するまで着いた先に留まり、次が無ければ終わりまで留まる。\n */\nimport type { Span } from \"../../timeline\";\n\n/** 運ぶ物が見えている間。`depart` に出発し `arrive` に着く。出発を待つ間と、着いた先で留まる間も含む。 */\nexport interface CarrierTime extends Span {\n step: number;\n event: number;\n who: \"main\" | \"coin\";\n depart: number;\n arrive: number;\n}\n\n/** 運ぶ物を載せた線の 1 本。`a` に引き始め `b` に引き終わる */\nexport interface Departure {\n step: number;\n event: number;\n who: \"main\" | \"coin\";\n a: number;\n b: number;\n}\n\n/** 線の順に並んだ出発から、運ぶ物が見えている間を出す。`first` は最初の段の始まり、`last` は繰り返す前に消えていく所の始まり */\nexport function carrierTimes(departures: Departure[], first: number, last: number): CarrierTime[] {\n const hasMain = departures.some((d) => d.who === \"main\");\n const carriers: CarrierTime[] = [];\n for (const who of [\"main\", \"coin\"] as const) {\n const list = departures.filter((d) => d.who === who);\n list.forEach((d, k) => {\n const next = list[k + 1];\n // 主役の最初の運ぶ物は、最初の段の始まりから出発点で待つ (何も見えない時間を作らないため)\n const waits = k === 0 && (who === \"main\" || !hasMain);\n carriers.push({\n step: d.step,\n event: d.event,\n who,\n depart: d.a,\n arrive: d.b,\n start: waits ? Math.min(first, d.a) : d.a,\n end: next ? Math.max(next.a, d.b) : last,\n });\n });\n }\n carriers.sort((x, y) => x.depart - y.depart);\n return carriers;\n}\n","/**\n * 段ごとの始まりと長さと、線、運ぶ物、線の名前、段の番号が見える時刻の表。SVG の動きはこの表から組む。\n *\n * 段の長さは本文の字数で決め、段で起きることが全部済んでから少し留まる長さを下限にする。\n * 運ぶ物が見えている間は、運ぶ物のブロック (`blocks/carry/timing.ts`) が線を引く時刻から出す (#3345)。\n * 線の名前はその段の間だけ出し、同じ段に何本あっても同時に見えるのは 2 つまでにする。\n * 状態遷移図では、段が終わった後も線の名前を最後の段まで薄く残す (#3171)。薄い名前は 2 つまでの数に入れない。\n * 止め絵を選んだ図では、最後の段で起きることが済んでから繰り返す前まで (`whole`)、全ての段の線の名前を最後の段と同じ濃さで出す (#3200)。\n * その間に見えている名前は繰り返す前まで延ばし、見えていない名前は同じ間に出し直す (`again`)。状態遷移図の薄い名前はその間の前で消す。\n * 状態遷移図では、主役の運ぶ物が乗っている状態を光らせ、運ぶ物が出た状態には少し後に済んだ印を出す (#3163)。\n * 枝分かれの図では、commit を積む出来事と枝を切る出来事も線と同じ間で引く (#3164)。\n * 時間軸の図では、針を進める出来事 (`now`) で針を目盛り 1 つずつ決まった秒数で進める (#3165)。針が進む目盛りの列の線は、\n * 段の中の書いた順に依らず、針がその目盛りに入った時に引き、線を引き終えるまで針は次の目盛りへ進まない。\n * 針を進める出来事より後に書いた出来事は、針が止まってから起こす。物差しの欄は、針が進む段では針の進みに比例して満ち、\n * 区切りの境から進む時は 0 から満ち直す。針が進まない段では値を書いた時に変わる。\n * 列の図 (#3239) の列の並びを書く出来事と、封と札の出来事も線と同じ表に載せ、並びは滑り終えるまで、封は覆い終えるまでを引く間にする。\n * 試す図 (#3337) の送る、押す、書き換える出来事も線と同じ表に載せ、送るは網を運ばれて待ち行列へ入り終えるまで、\n * 押すはチップがブロックへ移り終えるまで、書き換えるは値が変わり終えるまでを引く間にする。同じ段の出来事は前の出来事が済んでから起こす。\n * 札を動かす線が運ぶ枝の札は運ぶ物の表に載せない。札は同じ時刻にいくつも出ていて、どの札も主役ではないので、\n * 枝分かれの図を描く部品が札ごとに動かす。線に書いた運ぶ物 (`tag` と `carry`) だけを表に載せる。\n */\nimport { type CarrierTime, carrierTimes, type Departure } from \"./blocks/carry/timing\";\nimport { ratioOf } from \"./layout/scene\";\nimport { MOTION } from \"./look/values\";\nimport type { DiagramModel } from \"./schema\";\nimport { STATE_ENDS } from \"./words\";\n\nexport type { CarrierTime };\n\n/** 秒で表した、見えている間。`end` の時刻は含まない。 */\nexport interface Span {\n start: number;\n end: number;\n}\n\n/** 線を引いている間。`start` で引き始め、`drawn` で引き終わり、`end` (段の終わり) まで濃く残す。枝分かれの図では commit を積む出来事と枝を切る出来事も持つ */\nexport interface EdgeTime extends Span {\n step: number;\n event: number;\n drawn: number;\n}\n\nexport interface LabelTime extends Span {\n step: number;\n event: number;\n /** 状態遷移図だけが持つ。段が終わった後に薄く残す間 */\n after?: Span;\n /** 止め絵を選んだ図だけが持つ。最後の段で起きることが済んでから、最後の段と同じ濃さで出し直す間 (#3200) */\n again?: Span;\n}\n\n/** 処理、箱の字の書き換え、中身の帯の値が起きる時刻。 */\nexport interface EventTime {\n step: number;\n event: number;\n at: number;\n}\n\n/** 状態遷移図の状態ごとの、光っている間と、済んだ印が出る時刻。運ぶ物が出ていない状態は `done` を持たない */\nexport interface StateTime {\n box: string;\n lit: Span[];\n done?: number;\n}\n\nexport interface Timeline {\n /** 1 周の長さ */\n total: number;\n /** 繰り返す前に消えていく所の始まり */\n last: number;\n steps: Span[];\n edges: EdgeTime[];\n carriers: CarrierTime[];\n labels: LabelTime[];\n badges: { step: number; appears: number }[];\n events: EventTime[];\n /** 段ごとの止め絵の時刻。その段で起きることが全部見えている */\n stills: number[];\n /** 止め絵を選んだ図だけが持つ。最後の段で起きることが済んでから繰り返す前まで、全ての段の線の名前と箱の中の処理を出す間 (#3200) */\n whole?: Span;\n /** 状態遷移図だけが持つ */\n states?: StateTime[];\n /** 時間軸の図だけが持つ (#3165)。針の動き。[時刻, 目盛りの境の位置] の並びで、間は真っ直ぐ進む */\n needle?: [number, number][];\n /** 時間軸の図だけが持つ。針が目盛りを過ぎた (右の境に着いた) 時刻 */\n units?: { unit: number; passed: number }[];\n /** 時間軸の図だけが持つ。物差しの欄の満ち具合の動き。[時刻, 割合] の並びで、間は真っ直ぐ変わる */\n meters?: { field: string; keys: [number, number][] }[];\n}\n\ninterface Planned {\n edges: { event: number; a: number; b: number; carries: boolean; coin: boolean; named: boolean }[];\n events: { event: number; at: number }[];\n busy: number;\n /** 時間軸の図の、針の動き ([段の始まりからの時刻, 境の位置]) と、針が目盛りを過ぎた時刻 */\n sweep?: { keys: [number, number][]; passed: { unit: number; at: number }[] };\n}\n\ntype EdgeEvent = Extract<DiagramModel[\"steps\"][number][\"events\"][number], { type: \"edge\" }>;\n\n/** 列の図の出来事の長さ */\nconst LINEUP_LENGTH = { line: MOTION.lineup.slide, seal: MOTION.lineup.seal, open: MOTION.fade, pick: MOTION.fade, stamp: MOTION.popFade } as const;\n\n/** 試す図の出来事の長さ。送る出来事は網を通る時に網を運ばれる長さを足す (`tryTrip`) */\nexport function tryLength(type: \"ask\" | \"press\" | \"item\", trip: boolean): number {\n const T = MOTION.try;\n return type === \"ask\" ? (trip ? T.trip : 0) + T.settle : type === \"press\" ? T.build : T.edit;\n}\n\n/** 時間軸の図の段を組む時に渡す、段の始まりの針の位置と、目盛り 1 つを進む秒数 */\ninterface Needle {\n from: number;\n speed: number;\n}\n\n/**\n * 段の中で起きることの時刻 (段の始まりから)。線は少しずつずらして引き、書き換えは直前の線が着いてから起こす。\n * 時間軸の図では `needle` を渡し、針を進める出来事の所で針を目盛り 1 つずつ進める。針が進む目盛りの列の線はその目盛りに入った時に引く\n */\nfunction plan(step: DiagramModel[\"steps\"][number], needle?: Needle, trip = false): Planned {\n const out: Planned = { edges: [], events: [], busy: 0 };\n let cursor: number = MOTION.edgeAt;\n let arrived: number | undefined;\n let changes = 0;\n let settled = Number.NEGATIVE_INFINITY;\n const line = (e: number, event: EdgeEvent, a: number): number => {\n const carries = event.carry.kind !== \"none\";\n const b = a + (carries ? MOTION.drawCarry : MOTION.draw);\n out.edges.push({ event: e, a, b, carries, coin: event.carry.kind === \"coin\", named: event.label !== undefined });\n out.busy = Math.max(out.busy, b);\n return b;\n };\n const nows = needle ? step.events.flatMap((event, e) => (event.type === \"now\" ? [{ e, to: event.to }] : [])) : [];\n const p0 = needle?.from ?? 0;\n const p1 = Math.max(p0, ...nows.map((n) => n.to + 1));\n const pulled = (event: DiagramModel[\"steps\"][number][\"events\"][number]): event is EdgeEvent => event.type === \"edge\" && event.at !== undefined && event.at >= p0 && event.at < p1;\n step.events.forEach((event, e) => {\n if (needle && e === nows[0]?.e) {\n // 針は、前に書いた書き換えが起きてから動き出す\n let t = Math.max(cursor, settled + MOTION.change);\n const keys: [number, number][] = [[t, p0]];\n const passed: { unit: number; at: number }[] = [];\n for (let u = p0; u < p1; u++) {\n const entry = t;\n const lines = step.events.flatMap((ev, k) => (pulled(ev) && ev.at === u ? [{ k, ev }] : []));\n const done = lines.reduce((latest, l, j) => Math.max(latest, line(l.k, l.ev, entry + MOTION.stagger * j)), entry);\n const end = Math.max(entry + needle.speed, lines.length > 0 ? done + MOTION.time.wait : entry);\n if (end - needle.speed > entry + 1e-9) keys.push([end - needle.speed, u]);\n keys.push([end, u + 1]);\n passed.push({ unit: u, at: end });\n t = end;\n }\n out.sweep = { keys, passed };\n out.busy = Math.max(out.busy, t);\n cursor = t + MOTION.time.after;\n arrived = t;\n changes = 0;\n return;\n }\n if (event.type === \"now\" || (needle && pulled(event))) return;\n // 列の図の役が動く出来事 (#3351) は、段の始まりから終わりまで役の札を光らせるだけで、段の中の時刻を取らない\n if (event.type === \"role\") return;\n // 試す図の出来事 (#3337) は、前の出来事が済んでから起こす\n if (event.type === \"ask\" || event.type === \"press\" || event.type === \"item\") {\n const a = cursor;\n const b = a + tryLength(event.type, trip);\n out.edges.push({ event: e, a, b, carries: false, coin: false, named: false });\n cursor = b;\n arrived = b;\n changes = 0;\n out.busy = Math.max(out.busy, b);\n return;\n }\n if (event.type === \"line\" || event.type === \"seal\" || event.type === \"open\" || event.type === \"pick\" || event.type === \"stamp\") {\n const a = cursor;\n const b = a + LINEUP_LENGTH[event.type];\n out.edges.push({ event: e, a, b, carries: false, coin: false, named: false });\n cursor = a + MOTION.lineup.stagger;\n arrived = b;\n changes = 0;\n out.busy = Math.max(out.busy, b);\n return;\n }\n // 枝分かれの図の commit を積む出来事と枝を切る出来事と、木の図の葉と親を出す出来事は、親から引く線と同じ間で引く\n if (event.type === \"commit\" || event.type === \"branch\" || event.type === \"leaf\" || event.type === \"node\") {\n const a = cursor;\n const b = a + MOTION.draw;\n out.edges.push({ event: e, a, b, carries: false, coin: false, named: false });\n cursor = a + MOTION.stagger;\n arrived = b;\n changes = 0;\n out.busy = Math.max(out.busy, b);\n } else if (event.type === \"edge\") {\n const a = cursor;\n arrived = line(e, event, a);\n cursor = a + MOTION.stagger;\n changes = 0;\n } else if (event.type === \"action\") {\n out.events.push({ event: e, at: cursor });\n out.busy = Math.max(out.busy, cursor + MOTION.action);\n cursor += MOTION.action;\n changes = 0;\n } else {\n const at = (arrived ?? cursor) + MOTION.change * changes++;\n out.events.push({ event: e, at });\n out.busy = Math.max(out.busy, at);\n settled = Math.max(settled, at);\n }\n });\n // 針が進む目盛りの列の線は書いた順と別に引くので、引き始める順に並べ直す\n out.edges.sort((x, y) => x.a - y.a);\n return out;\n}\n\n/** 時刻の表を作る。`still` を立てると、最後の段の止め絵に全ての段の線の名前と箱の中の処理を出す間 (`whole`) を持つ (#3200) */\nexport function buildTimeline(diagram: DiagramModel, still = false): Timeline {\n const time = diagram.kind === \"time\" ? diagram.time : undefined;\n const T = MOTION.time;\n const speed = time ? Math.min(T.unitMax, Math.max(T.unitMin, T.axis / Math.max(1, time.scale.count))) : 0;\n let at = 0;\n // 試す図の入力の帯が網を通るなら、送る出来事は網を運ばれる長さを持つ\n const trip = diagram.try?.parts.some((p) => p.type === \"ask\" && p.via !== undefined) ?? false;\n const plans = diagram.steps.map((step) => {\n if (!time) return plan(step, undefined, trip);\n const p = plan(step, { from: at, speed });\n at = p.sweep?.keys[p.sweep.keys.length - 1]?.[1] ?? at;\n return p;\n });\n const steps: Span[] = [];\n let t = MOTION.intro;\n diagram.steps.forEach((step, s) => {\n const read = Math.min(MOTION.stepMax, Math.max(MOTION.stepMin, MOTION.stepBase + [...step.body].length * MOTION.perChar));\n const length = Math.max(read, (plans[s]?.busy ?? 0) + MOTION.dwell);\n steps.push({ start: t, end: t + length });\n t += length;\n });\n const end = t;\n const total = Math.ceil(end + MOTION.outro);\n const last = total - MOTION.tail;\n const lastSpan = steps[steps.length - 1];\n const whole = still && lastSpan ? { start: lastSpan.start + (plans[plans.length - 1]?.busy ?? 0), end: last } : undefined;\n // 状態遷移図の薄い名前は、全ての段の名前を出し直す前に消す\n const faint = whole?.start ?? last;\n\n const edges: EdgeTime[] = [];\n const labels: LabelTime[] = [];\n const events: EventTime[] = [];\n const departures: Departure[] = [];\n plans.forEach((p, s) => {\n const span = steps[s] as Span;\n const named: LabelTime[] = [];\n for (const edge of p.edges) {\n const a = span.start + edge.a;\n edges.push({ step: s, event: edge.event, start: a, drawn: span.start + edge.b, end: span.end });\n // 枝分かれの図の、札を書かない線が運ぶ札は、枝分かれの図を描く部品が札ごとに動かす\n const event = diagram.steps[s]?.events[edge.event];\n const own = diagram.kind === \"git\" && event?.type === \"edge\" && event.carry.kind === \"tag\" && event.carry.text === event.from;\n if (edge.carries && !own) departures.push({ step: s, event: edge.event, who: edge.coin ? \"coin\" : \"main\", a, b: span.start + edge.b });\n if (edge.named) named.push({ step: s, event: edge.event, start: a + MOTION.labelDelay, end: span.end });\n }\n // 3 つ目の名前が出る時に 1 つ目を消す\n named.forEach((label, k) => {\n const later = named[k + 2];\n if (later) label.end = Math.min(label.end, later.start);\n });\n for (const label of named) {\n if (whole && label.end > whole.start) label.end = whole.end;\n else {\n if (diagram.kind === \"state\" && label.end < faint) label.after = { start: label.end, end: faint };\n if (whole) label.again = whole;\n }\n }\n labels.push(...named);\n for (const event of p.events) events.push({ step: s, event: event.event, at: span.start + event.at });\n });\n\n const first = steps[0]?.start ?? 0;\n const carriers = carrierTimes(departures, first, last);\n const states = diagram.kind === \"state\" ? stateTimes(diagram, edges, last) : undefined;\n const needle: [number, number][] = [[0, 0]];\n const units: { unit: number; passed: number }[] = [];\n plans.forEach((p, s) => {\n const start = (steps[s] as Span).start;\n for (const [t, position] of p.sweep?.keys ?? []) needle.push([start + t, position]);\n for (const u of p.sweep?.passed ?? []) units.push({ unit: u.unit, passed: start + u.at });\n });\n needle.push([total, at]);\n\n return {\n total,\n last,\n steps,\n edges,\n carriers,\n labels,\n badges: steps.map((span, s) => ({ step: s, appears: span.start })),\n events,\n stills: steps.map((span) => span.end - MOTION.still),\n ...(whole ? { whole } : {}),\n ...(states ? { states } : {}),\n ...(time ? { needle, units, meters: meterTimes(diagram, plans, steps) } : {}),\n };\n}\n\n/**\n * 時間軸の図の物差しの欄の満ち具合 (#3165)。段で最後に書いた値へ向かって変わる。\n * 針が進む段では針の進みに比例して満ち、区切りの境から進む時はその境で 0 に戻ってから満ち直す。針が進まない段では値を書いた時に変わる\n */\nfunction meterTimes(diagram: DiagramModel, plans: Planned[], steps: Span[]): { field: string; keys: [number, number][] }[] {\n const length = diagram.time?.period?.length;\n return (diagram.strip?.meters ?? []).map(({ field }) => {\n const keys: [number, number][] = [[0, 0]];\n let value = 0;\n plans.forEach((p, s) => {\n const start = (steps[s] as Span).start;\n const sets = (diagram.steps[s]?.events ?? []).flatMap((event, e) => {\n const ratio = event.type === \"strip\" && event.field === field && event.value !== undefined ? ratioOf(event.value) : undefined;\n return ratio === undefined ? [] : [{ e, ratio }];\n });\n const set = sets[sets.length - 1];\n if (!set) return;\n const sweep = p.sweep?.keys ?? [];\n const first = sweep[0];\n const lastKey = sweep[sweep.length - 1];\n if (first && lastKey && lastKey[1] > first[1]) {\n const [p0, p1] = [first[1], lastKey[1]];\n let base = value;\n let from = p0;\n const boundary = length ? Math.floor((p1 - 1e-9) / length) * length : 0;\n if (boundary > 0 && boundary >= p0) {\n const tb = start + (sweep.find(([, position]) => position === boundary)?.[0] ?? first[0]);\n const prev = (keys[keys.length - 1] as [number, number])[0];\n keys.push([Math.max(prev, tb - MOTION.time.reset), value], [tb, 0]);\n base = 0;\n from = boundary;\n }\n for (const [t, position] of sweep) if (position >= from) keys.push([start + t, base + ((set.ratio - base) * (position - from)) / (p1 - from)]);\n } else {\n const at = start + (p.events.find((x) => x.event === set.e)?.at ?? 0);\n keys.push([at, value], [at + MOTION.fade, set.ratio]);\n }\n value = set.ratio;\n });\n return { field, keys };\n });\n}\n\nconst isEnd = (id: string): boolean => (STATE_ENDS as readonly string[]).includes(id);\n\n/**\n * 状態遷移図の状態が光る間。段の線を引き終えて状態へ着いた時から、その状態を出る線を引き始めるまで光り、\n * 出た少し後に済んだ印を出す。同じ状態へ戻る線では光ったまま、最後に着いた状態は終わりまで光る。\n * 物が状態を移るのは線を辿った時なので、運ぶ物の種類 (硬貨や、運ばない線) を問わず全ての線で数える。\n */\nfunction stateTimes(diagram: DiagramModel, edges: EdgeTime[], last: number): StateTime[] {\n const times = new Map<string, StateTime>();\n const of = (box: string): StateTime => {\n const found = times.get(box) ?? { box, lit: [] };\n times.set(box, found);\n return found;\n };\n let on: { box: string; since: number } | undefined;\n for (const edge of edges) {\n const event = diagram.steps[edge.step]?.events[edge.event];\n if (event?.type !== \"edge\" || event.from === event.to) continue;\n if (on) {\n const left = of(on.box);\n left.lit.push({ start: on.since, end: edge.start });\n if (on.box === event.from && left.done === undefined) left.done = edge.start + MOTION.done;\n on = undefined;\n }\n if (!isEnd(event.to)) on = { box: event.to, since: edge.drawn };\n }\n if (on) of(on.box).lit.push({ start: on.since, end: last });\n return [...times.values()];\n}\n","/**\n * 時刻の点の並びから CSS の keyframes を組む道具。見本帳の `engine.js` の `kf` / `vis` / `rise` / `pop` / `move` を写す。\n *\n * 動きは全て 1 周 `total` 秒の keyframes で、点の時刻は 1 周の中の割合 (%) に直す。\n * 性質ごとに独立して補間されるので、点ごとに変える性質だけを書く。\n */\nimport { EASE, LOOK, MOTION } from \"../look/values\";\n\nexport type Props = Record<string, string | number>;\nexport type Frame = [time: number, props: Props, ease?: string];\n\nconst r2 = (v: number): number => Math.round(v * 100) / 100;\n\nexport class Motion {\n readonly frames: string[] = [];\n private count = 0;\n\n constructor(\n private readonly prefix: string,\n readonly total: number,\n readonly last: number,\n ) {}\n\n private pct(t: number): number {\n return +((Math.min(Math.max(t, 0), this.total) / this.total) * 100).toFixed(3);\n }\n\n /** keyframes を 1 つ足し、その名前を付ける style の字を返す。 */\n kf(points: Frame[]): string {\n const name = `${this.prefix}-${this.count++}`;\n const at = new Map<number, { props: Props; ease?: string }>();\n for (const [t, props, ease] of [...points].sort((a, b) => a[0] - b[0])) {\n const p = this.pct(t);\n const cur = at.get(p) ?? { props: {} };\n Object.assign(cur.props, props);\n if (ease) cur.ease = ease;\n at.set(p, cur);\n }\n const body = [...at]\n .map(([p, { props, ease }]) => {\n const d = Object.entries(props).map(([k, v]) => `${k}:${v}`);\n if (ease) d.push(`animation-timing-function:${ease}`);\n return `${p}%{${d.join(\";\")}}`;\n })\n .join(\"\");\n this.frames.push(`@keyframes ${name}{${body}}`);\n return `animation-name:${name}`;\n }\n\n /** `a` で出て `b` から消える。`within` を立てると `b` までに消え終わる。 */\n vis(a: number, b = this.last, o: { f?: number; on?: Props; off?: Props; ein?: string; within?: boolean } = {}): string {\n const f = o.f ?? MOTION.fade;\n const on = o.on ?? {};\n const off = o.off ?? {};\n const out = o.within ? Math.max(a + f, b - f) : b;\n return this.kf([\n [0, { opacity: 0, ...off }],\n [a, { opacity: 0, ...off }, o.ein ?? EASE.out],\n [a + f, { opacity: 1, ...on }],\n [out, { opacity: 1, ...on }, EASE.inOut],\n [Math.min(out + f, this.total), { opacity: 0, ...off }],\n [this.total, { opacity: 0, ...off }],\n ]);\n }\n\n /** 少し下から浮いて出る。 */\n rise(a: number, b = this.last, within = false): string {\n return this.vis(a, b, { on: { transform: \"translateY(0)\" }, off: { transform: `translateY(${LOOK.rise}px)` }, within });\n }\n\n /** 小さな所から弾んで出る。 */\n pop(a: number, b = this.last): string {\n return this.vis(a, b, { f: MOTION.popFade, ein: EASE.pop, on: { transform: \"scale(1)\" }, off: { transform: `scale(${LOOK.popFrom})` } });\n }\n\n /** 初めから出ていて `b` で消える。 */\n until(b: number): string {\n const f = MOTION.untilFade;\n return this.kf([\n [0, { opacity: 1 }],\n [b, { opacity: 1 }, EASE.inOut],\n [b + f, { opacity: 0 }],\n [this.last, { opacity: 0 }],\n [this.total, { opacity: 1 }],\n ]);\n }\n\n /** 点を辿って動く。`[時刻, x, y, 大きさ, 次の点までの緩急]` の並び。 */\n move(points: [number, number, number, number?, string?][], extra: Frame[] = []): string {\n return this.kf(\n points.map(([t, x, y, s = 1, ease]): Frame => [t, { transform: `translate(${r2(x)}px,${r2(y)}px) scale(${s})` }, ease]).concat(extra),\n );\n }\n\n /** `a` から `b` まで見え、`fade` 秒で消える。 */\n blink(a: number, b: number, fade: number): Frame[] {\n return [\n [0, { opacity: 0 }],\n [a - 0.01, { opacity: 0 }],\n [a, { opacity: 1 }],\n [b, { opacity: 1 }],\n [b + fade, { opacity: 0 }],\n [this.total, { opacity: 0 }],\n ];\n }\n}\n","/**\n * 原本の JSON から図を描く本体。置き場所と時刻の表を作り、部品を重なりの順に並べて SVG にする。\n * git、lineup、state、time、tree、try の部品は登録簿から引くので、読んでいない種類は描けない (`kinds/registry.ts`、#3248)。\n * 時系列図と構成図の並べ方は、図の種類の置き場 (`kinds/<種類>/`) の一覧 `KIND_FOLDERS` から引く (#3345)。\n * 置き場へ移したブロックの部品は、ブロックの置き場の描き方 (`blocks/<名前>/draw.ts`) から引く。動きの名前は呼んだ順に番号が付くので、呼ぶ順は変えない。\n *\n * 動きは全て SVG の中の CSS の keyframes が回す。1 周の長さは `--T`、止める時刻は `--at`、\n * 止めるか流すかは `--play` の変数で外から変えられる (頁に置く `player.ts` がこれを使う)。\n * 色と字は値の表から CSS の変数として 1 度だけ書き、部品はその変数だけを読む。\n * 止め絵を選ぶと (`still`)、最後の段の止め絵に全ての段の線の名前と箱の中の処理を出し、流れ全体を 1 枚で読ませる (#3200)。\n */\nimport { action } from \"../blocks/act/draw\";\nimport { boxTextY, card, headCard } from \"../blocks/box/draw\";\nimport { carrier } from \"../blocks/carry/draw\";\nimport { cs } from \"../blocks/color/draw\";\nimport { edge } from \"../blocks/edge/draw\";\nimport { fadeBefore, label } from \"../blocks/edge-label/draw\";\nimport { band } from \"../blocks/group/draw\";\nimport { lifeline } from \"../blocks/lifeline/draw\";\nimport { linkTo } from \"../blocks/link/draw\";\nimport { subChanges } from \"../blocks/note/draw\";\nimport { ghostCard, path, side } from \"../blocks/side-path/draw\";\nimport { endMark } from \"../blocks/start-finish/draw\";\nimport { fieldChanges, strip } from \"../blocks/strip/draw\";\nimport { FIGURE_TEXT } from \"../figure-text\";\nimport type { GitLayout } from \"../kinds/git/layout\";\nimport type { LineupLayout } from \"../kinds/lineup/layout\";\nimport { textWidth } from \"../layout/measure\";\nimport {\n type Layout,\n type Rect,\n rewrapStrip,\n type SceneField,\n type SceneStrip,\n} from \"../layout/scene\";\nimport type { TimeLayout } from \"../kinds/time/layout\";\nimport type { TreeLayout } from \"../kinds/tree/layout\";\nimport type { TryLayout } from \"../kinds/try/layout\";\nimport { KIND_FOLDERS } from \"../kinds/index\";\nimport type { Kind } from \"../kinds/kind\";\nimport { kindParts } from \"../kinds/registry\";\nimport { FONTS } from \"../look/fonts\";\nimport {\n type ColorKey,\n type Colors,\n type Corner,\n EASE,\n FONT_VARS,\n isColorName,\n isColorValue,\n LOOK,\n MOTION,\n type Palette,\n paletteVars,\n resolvePalette,\n type Theme,\n TYPE,\n} from \"../look/values\";\nimport { readDiagram } from \"../version\";\nimport { toModel } from \"../model\";\nimport type { DiagramModel, ViewMode } from \"../schema\";\nimport { buildTimeline, type Span, type Timeline } from \"../timeline\";\nimport { DEFAULT_LANG, type NotationLang } from \"../words\";\nimport { badge, cssFont as font, cssMix as mix, type Ctx, doneMark, esc, sansOf } from \"./parts\";\nimport { frameShape, partRadius } from \"./corner\";\nimport { findOverlaps, type Ink, type Overlap, type Trace } from \"./ink\";\nimport { Motion } from \"./motion\";\n\n/** 置き場を持つ図の種類を、図の種類の名前で引く表 */\nconst FOLDERS: Readonly<Partial<Record<string, Kind>>> = KIND_FOLDERS;\n\nconst isGitLayout = (layout: Layout): layout is GitLayout => layout.kind === \"git\";\nconst isLineupLayout = (layout: Layout): layout is LineupLayout => layout.kind === \"lineup\";\nconst isTimeLayout = (layout: Layout): layout is TimeLayout => layout.kind === \"time\";\nconst isTreeLayout = (layout: Layout): layout is TreeLayout => layout.kind === \"tree\";\nconst isTryLayout = (layout: Layout): layout is TryLayout => layout.kind === \"try\";\n\nexport interface RenderOptions {\n /** 色味の名前。書かないか知らない名前なら紙と墨 */\n palette?: string;\n /**\n * `palette` の色味に重ねる色の値 (#3198)。鍵は色味が持つ色の変数の名前 (`bg`、`ink`、`c-green` など) で、値は描く `theme` の色になる。\n * 渡さない色は色味の値のまま残る。色味に無い名前と、色の値として読めない値は、名前を挙げて描かずに断る\n */\n colors?: Colors;\n theme?: Theme;\n /** 描く部品が出す字 (断りの文、全体図の札、読み上げの名前) の言葉。書かなければ英語 (#3001、#3338) */\n lang?: NotationLang;\n /** 描く枠の幅。列の図は、箱を横に並べると箱の名前が読めない幅で縦に組む (#3351)。書かなければ横に並べる */\n width?: number;\n /**\n * 最後の段の止め絵に、全ての段の線の名前と箱の中の処理を最後の段と同じ濃さで出す (#3200)。途中の段の止め絵は今の段の名前だけを出す。\n * 箱の下の 1 行に出す処理は、その箱で最後に起きた処理か書き換えの字を出す。違う段の名前が重なっても置き直さず、最後の段の重なり (`overlaps`) に出す\n */\n still?: boolean;\n}\n\nexport interface Rendered {\n svg: string;\n palette: string;\n theme: Theme;\n /** 書き手が原本で決めた見せ方 */\n view?: ViewMode;\n fonts: { sans: string; mono: string };\n layout: Layout;\n timeline: Timeline;\n /** 描いた図の形。版1と同じ欄と並びで、図の id はこの形の字から作る (#3346) */\n diagram: DiagramModel;\n /** 段ごとの止め絵で、同時に見えている字どうしの重なりと、線が札を持たない字を横切る所 (#3175)。重なりが無ければ空 */\n overlaps: Overlap[];\n}\n\nconst S = LOOK.stroke;\nconst X = LOOK.mix;\n/** 状態遷移図で段が終わった線と番号の灰 (#3171) */\nconst PAST = `color-mix(in srgb,var(--mute) ${X.past}%,var(--bg))`;\n\n/** 部品の見た目。どの値も値の表から読む。 */\nconst PART_CSS = [\n \".dg{display:block;width:100%;height:auto;overflow:visible}\",\n \".dg .dg-a{animation-duration:var(--T);animation-timing-function:linear;animation-iteration-count:infinite;animation-fill-mode:both;animation-delay:calc(var(--at,0) * -1s);animation-play-state:var(--play,running)}\",\n \".dg .dg-popc{transform-box:fill-box;transform-origin:center}\",\n \".dg-bg{fill:var(--bg)}\",\n \".dg-band{fill:color-mix(in srgb,var(--c) var(--tint),var(--bg));stroke:color-mix(in srgb,var(--c) var(--edge),transparent)}\",\n `.dg-bi{fill:${mix(X.regionIcon)};stroke:${mix(X.regionIconEdge, \"transparent\")}}`,\n `.dg-bz{${font(TYPE.regionName)};fill:var(--ct)}`,\n `.dg-bx{${font(TYPE.regionNote)};fill:var(--mute)}`,\n \".dg-st{fill:var(--surf);stroke:var(--hair)}\",\n `.dg-halo{fill:none;stroke:var(--c);stroke-width:${S.halo};stroke-opacity:.16}`,\n `.dg-on{fill:none;stroke:var(--c);stroke-width:${S.on}}`,\n `.dg-ic{fill:${mix(X.icon)}}`,\n `.dg-slot{fill:none;stroke:${mix(X.slot, \"transparent\")};stroke-width:${S.slot};stroke-dasharray:3 3}`,\n `.dg-gl{fill:none;stroke:var(--c);stroke-width:${S.glyph};stroke-linecap:round;stroke-linejoin:round}`,\n `.dg-sn{${font(TYPE.boxName)};fill:var(--ink)}`,\n `.dg-ss{${font(TYPE.boxSub)};fill:var(--mute)}`,\n `.dg-ss-ok{${font(TYPE.boxSubStrong)};fill:var(--ct)}`,\n `.dg-ss-act{${font(TYPE.boxSubStrong)};fill:var(--ink)}`,\n `.dg-ll{stroke:var(--line);stroke-width:${S.lifeline};stroke-dasharray:3 4}`,\n `.dg-e{fill:none;stroke:var(--line);stroke-width:${S.edge};stroke-linecap:round;stroke-dasharray:0 ${LOOK.edge.ghostDash}}`,\n `.dg-eh{fill:none;stroke:var(--line);stroke-width:${S.arrow};stroke-linecap:round;stroke-linejoin:round}`,\n `.dg-e-on{fill:none;stroke:var(--c);stroke-width:${S.edgeOn};stroke-linecap:round;stroke-dasharray:1 2}`,\n `.dg-eh-on{fill:none;stroke:var(--c);stroke-width:${S.edgeOn};stroke-linecap:round;stroke-linejoin:round}`,\n `.dg-flow{fill:none;stroke:var(--surf);stroke-width:${S.flow};stroke-linecap:round;stroke-dasharray:1.5 ${LOOK.edge.flowDash}}`,\n `.dg-e-past{fill:none;stroke:${PAST};stroke-width:${S.edge};stroke-linecap:round}`,\n `.dg-eh-past{fill:none;stroke:${PAST};stroke-width:${S.arrow};stroke-linecap:round;stroke-linejoin:round}`,\n \".dg-bd{cursor:pointer}\",\n \".dg-bdf{fill:var(--c)}\",\n `.dg-bdft{${font(TYPE.badge)};fill:var(--on-c)}`,\n `.dg-bdr{fill:none;stroke:var(--c);stroke-width:${S.badgeRing};pointer-events:none}`,\n `.dg-bdp{fill:${mix(X.badgePast)};stroke:${mix(X.badgePastEdge, \"transparent\")};stroke-width:${S.hair}}`,\n `.dg-bdpt{${font(TYPE.badge)};fill:var(--ct)}`,\n `.dg-bdp-g{fill:var(--surf);stroke:${PAST};stroke-width:${S.hair}}`,\n `.dg-bdpt-g{${font(TYPE.badge)};fill:var(--mute)}`,\n `.dg-cap rect,.dg-act rect{fill:${mix(X.cap)};stroke:${mix(X.capEdge, \"transparent\")}}`,\n `.dg-cap text{${font(TYPE.label)};fill:var(--ct)}`,\n `.dg-capj text{${font(TYPE.labelJa)}}`,\n `.dg-cap-past text{${font(TYPE.label)};fill:var(--mute);fill-opacity:${LOOK.state.pastLabel}}`,\n `.dg-cap-pastj text{${font(TYPE.labelJa)}}`,\n `.dg-act text{${font(TYPE.action)};fill:var(--ct)}`,\n \".dg-car{fill:var(--carry,var(--ink))}\",\n `.dg-car-t{${font(TYPE.carrier)};fill:var(--bg)}`,\n `.dg-car-tj{${font(TYPE.carrierJa)}}`,\n `.dg-env{fill:var(--carry,var(--ink));stroke:var(--surf);stroke-width:${S.envelope}}`,\n `.dg-env-in{fill:none;stroke:var(--surf);stroke-width:${S.flow};stroke-linejoin:round;stroke-linecap:round}`,\n \".dg-coin{fill:var(--coin);stroke:var(--surf);stroke-width:1.2}\",\n \".dg-coin-in{fill:none;stroke:var(--coinin);stroke-width:1.1}\",\n \".dg-strip{fill:var(--surf);stroke:var(--hair)}\",\n `.dg-sep{stroke:var(--hair);stroke-width:${S.hair}}`,\n `.dg-sh{${font(TYPE.stripTitle)};fill:var(--ink)}`,\n `.dg-fl{${font(TYPE.fieldName)};fill:var(--mute)}`,\n `.dg-fv{${font(TYPE.fieldValue)};fill:var(--ink)}`,\n `.dg-fvj{${font(TYPE.fieldValueJa)};fill:var(--ink)}`,\n \".dg-fv-c{fill:var(--ct)}\",\n \".dg-fl-now{fill:var(--c)}\",\n `.dg-tr-ring{fill:none;stroke:var(--line);stroke-width:${S.trail}}`,\n \".dg-tr-fill{fill:var(--c)}\",\n \".dg-tg rect{fill:var(--c)}\",\n `.dg-tg text{${font(TYPE.tag)};fill:var(--on-c)}`,\n `.dg-side{fill:color-mix(in srgb,var(--c) ${X.side}%,var(--bg));stroke:${mix(X.sideEdge, \"transparent\")};stroke-dasharray:4 4}`,\n `.dg-side-t{${font(TYPE.regionName)};fill:var(--ct)}`,\n `.dg-side-n{${font(TYPE.regionNote)};fill:var(--mute)}`,\n `.dg-ghost{fill:var(--surf);stroke:${mix(X.ghostEdge, \"transparent\")};stroke-dasharray:4 3}`,\n `.dg-path{fill:none;stroke:${mix(X.path, \"transparent\")};stroke-width:${S.path};stroke-linecap:round;stroke-dasharray:0 ${LOOK.edge.ghostDash}}`,\n `.dg-path-h{fill:none;stroke:${mix(X.path, \"transparent\")};stroke-width:${S.arrow};stroke-linecap:round;stroke-linejoin:round}`,\n `.dg-path-t{${font(TYPE.label)};fill:var(--ct)}`,\n `.dg-path-tj{${font(TYPE.labelJa)}}`,\n \".dg-start{fill:var(--ink)}\",\n `.dg-end{fill:var(--bg);stroke:var(--ink);stroke-width:${S.end}}`,\n \".dg-end-in{fill:var(--ink)}\",\n `.dg-end-x{fill:var(--bg);stroke:${mix(X.path, \"transparent\")};stroke-width:${S.arrow};stroke-dasharray:2 2.5}`,\n `.dg-end-xi{fill:${mix(X.path, \"transparent\")}}`,\n `.dg-mark{${font(TYPE.regionNote)};fill:var(--mute)}`,\n `.dg-done{fill:var(--ink);stroke:var(--surf);stroke-width:${S.done}}`,\n `.dg-done-ck{fill:none;stroke:var(--surf);stroke-width:${S.glyph};stroke-linecap:round;stroke-linejoin:round}`,\n `.dg-git-l{fill:none;stroke:var(--c);stroke-width:${S.git};stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1 2}`,\n `.dg-git-cp{fill:none;stroke:var(--c);stroke-width:${S.gitOrphan};stroke-linecap:round;stroke-dasharray:3 3;stroke-opacity:.7}`,\n `.dg-git-c{fill:var(--surf);stroke:var(--c);stroke-width:${S.git}}`,\n `.dg-git-id{${font(TYPE.gitId)};fill:var(--ct)}`,\n `.dg-git-h{${font(TYPE.gitHash)};fill:var(--mute)}`,\n `.dg-git-n{${font(TYPE.gitNote)};fill:var(--ink2)}`,\n `.dg-git-old{fill:var(--surf);stroke:var(--c);stroke-width:${S.gitOrphan};stroke-dasharray:3 3;stroke-opacity:.6}`,\n `.dg-git-oldl{${font(TYPE.gitId)};fill:var(--ct);opacity:.55}`,\n // 木の図 (#3233)。木の線は線の灰で、運ぶ物が通った跡は運ぶ物の色で引く\n `.dg-tree-l{fill:none;stroke:var(--line);stroke-width:${S.tree};stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1 2}`,\n `.dg-tree-tr{fill:none;stroke:var(--c);stroke-width:${S.treeTrail};stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1 2}`,\n `.dg-tree-h{fill:none;stroke:var(--c);stroke-width:${S.treeTrail};stroke-linecap:round;stroke-linejoin:round}`,\n `.dg-tree-con{fill:none;stroke:var(--line);stroke-width:${S.treeCon};stroke-linecap:round;stroke-dasharray:2 3.5}`,\n `.dg-tree-card{fill:var(--surf);stroke:var(--hair);stroke-width:${S.hair}}`,\n `.dg-tree-cg{fill:none;stroke:var(--mute);stroke-width:${S.glyph};stroke-linecap:round;stroke-linejoin:round}`,\n `.dg-tree-ct{${font(TYPE.treeCard)};fill:var(--ink)}`,\n `.dg-tree-hash{${font(TYPE.treeHash)};fill:var(--ink)}`,\n `.dg-tree-name{${font(TYPE.treeName)};fill:var(--mute)}`,\n `.dg-tree-one{${font(TYPE.boxName)};fill:var(--ink)}`,\n `.dg-tree-rh{${font(TYPE.rootHash)};fill:var(--ink)}`,\n `.dg-tree-rn{${font(TYPE.rootName)};fill:var(--mute)}`,\n // 時間軸の図 (#3165)。和文を含む字は、末尾に j を付けた class で同じ大きさと太さの和文の字にする\n `.dg-tm-ep{fill:color-mix(in srgb,var(--ink) ${X.timeShade}%,transparent)}`,\n `.dg-tm-sep{stroke:var(--hair);stroke-width:${S.hair};stroke-dasharray:2 4}`,\n `.dg-tm-hd{${font(TYPE.timeHead)};fill:var(--ink)}`,\n `.dg-tm-hdj{${font(sansOf(TYPE.timeHead))}}`,\n `.dg-tm-slot{fill:none;stroke:var(--line);stroke-width:${S.timeSlot};opacity:.55}`,\n \".dg-tm-m{fill:var(--c)}\",\n \".dg-tm-x{fill:var(--c-slate)}\",\n `.dg-tm-fr{fill:none;stroke:var(--c-blue);stroke-width:${S.timeFrame};stroke-dasharray:3 2}`,\n `.dg-tm-gd{fill:none;stroke:color-mix(in srgb,var(--c-blue) ${X.timeGuide}%,transparent);stroke-width:${S.hair};stroke-dasharray:2 3}`,\n `.dg-tm-ax{fill:none;stroke:var(--line);stroke-width:${S.timeAxis}}`,\n `.dg-tm-tk{${font(TYPE.timeTick)};fill:var(--mute)}`,\n `.dg-tm-tkj{${font(sansOf(TYPE.timeTick))}}`,\n `.dg-tm-en{${font(TYPE.timePeriod)};fill:var(--ink2)}`,\n `.dg-tm-er{${font(TYPE.timeRange)};fill:var(--mute)}`,\n `.dg-tm-erj{${font(sansOf(TYPE.timeRange))}}`,\n `.dg-tm-rn{${font(TYPE.timeRow)};fill:var(--ink2)}`,\n `.dg-tm-br{fill:none;stroke:var(--c);stroke-width:${S.timeSpan};stroke-linecap:round;stroke-linejoin:round}`,\n `.dg-tm-bt{${font(TYPE.spanText)};fill:var(--ct)}`,\n `.dg-tm-bx{fill:color-mix(in srgb,var(--c) ${X.timeSpan}%,transparent);stroke:var(--c);stroke-width:${S.timeSpan};stroke-dasharray:4 3}`,\n `.dg-tm-con{fill:none;stroke:var(--line);stroke-width:${S.timeDrop};stroke-linecap:round;stroke-dasharray:0 3.5}`,\n \".dg-tm-pg{fill:var(--surf);stroke:var(--line);stroke-dasharray:2 2.5}\",\n `.dg-tm-pgl{fill:none;stroke:var(--mute);stroke-width:${S.timeFlag};stroke-linecap:round;stroke-linejoin:round}`,\n `.dg-tm-pc{fill:var(--surf);stroke:var(--c);stroke-width:${S.timePoint}}`,\n `.dg-tm-pcg{fill:none;stroke:var(--c);stroke-width:${S.timeFlag};stroke-linecap:round;stroke-linejoin:round}`,\n `.dg-tm-pn{${font(TYPE.pointName)};fill:var(--ink)}`,\n `.dg-tm-pnj{${font(sansOf(TYPE.pointName))}}`,\n \".dg-tm-pn-g{fill:var(--mute)}\",\n `.dg-tm-ps{${font(TYPE.pointState)};fill:var(--ct)}`,\n `.dg-tm-ln{fill:none;stroke:var(--c);stroke-width:${S.edgeOn};stroke-linecap:round;stroke-dasharray:1 2}`,\n `.dg-tm-nd{stroke:var(--ink);stroke-width:${S.timeNeedle};opacity:.55}`,\n \".dg-tm-nh{fill:var(--ink)}\",\n \".dg-tm-ph{fill:none;stroke:var(--line);stroke-dasharray:3 3}\",\n `.dg-tm-ex{fill:color-mix(in srgb,var(--c-slate) ${X.timeEmpty}%,var(--surf));stroke:var(--c-slate);stroke-width:${S.timeFrame};stroke-dasharray:3 3}`,\n `.dg-tm-ext{${font(TYPE.emptyText)};fill:var(--t-slate)}`,\n \".dg-tm-mt{fill:var(--hair)}\",\n \".dg-tm-mf{fill:var(--c);transform-box:fill-box;transform-origin:0 50%}\",\n `.dg-tm-mk{stroke:var(--ink2);stroke-width:${S.timeMeter}}`,\n `.dg-tm-ml{${font(TYPE.meterLine)};fill:var(--ink2)}`,\n \".dg-vp-bg{fill:var(--bg)}\",\n \".dg-vp-frame{fill:none;stroke:var(--hair)}\",\n \".dg-hd-bg{fill:var(--bg)}\",\n \".dg-mm-bg{fill:var(--surf);stroke:var(--hair)}\",\n `.dg-mm-t{${font(TYPE.miniTitle)};fill:var(--mute)}`,\n \".dg-mm-world{fill:var(--sunk);stroke:var(--hair)}\",\n `.dg-mm-band{fill:${mix(X.miniBand)};stroke:${mix(X.miniBandEdge, \"transparent\")};stroke-width:.6}`,\n `.dg-mm-card{fill:${mix(X.mini)}}`,\n `.dg-mm-vp{fill:color-mix(in srgb,var(--ink) ${X.view}%,transparent);stroke:var(--ink);stroke-width:${S.badgeRing};vector-effect:non-scaling-stroke}`,\n].join(\"\");\n\n/** 同じ原本と同じ見た目からは同じ名前になるよう、中身から短い名前を作る (keyframes の名前が頁の中で混ざらないため)。 */\nfunction nameOf(text: string): string {\n let h = 0x811c9dc5;\n for (let i = 0; i < text.length; i++) {\n h ^= text.charCodeAt(i);\n h = Math.imul(h, 0x01000193);\n }\n return (h >>> 0).toString(36);\n}\n\n/** 各箱が動く段。線の両端、処理、字の書き換えの箱。 */\nfunction involved(diagram: DiagramModel): Map<string, number[]> {\n const on = new Map<string, Set<number>>();\n const add = (id: string, s: number): void => {\n on.set(id, (on.get(id) ?? new Set()).add(s));\n };\n diagram.steps.forEach((step, s) => {\n for (const event of step.events) {\n if (event.type === \"edge\") {\n add(event.from, s);\n add(event.to, s);\n } else if (event.type === \"action\" || event.type === \"swap\") add(event.box, s);\n }\n });\n return new Map([...on].map(([id, steps]) => [id, [...steps].sort((a, b) => a - b)]));\n}\n\nexport interface FollowFrame {\n /** 枠の幅 (px)。寄って追う窓はこの幅で、字を原寸で見せる */\n width: number;\n /** 枠の中で見える高さ (px)。渡すと、窓と全体図をこの高さに収め (#3047)、窓をこの高さまで伸ばす (#3053)。枠の高さが図で伸びる置き場では渡さない */\n height?: number;\n /** 隅の全体図の札の言葉。渡し忘れを型の検査で止めるため、省けない欄にする */\n lang: NotationLang;\n}\n\n/** 図を描く。`follow` を渡すと、寄って追う窓と隅の全体図で描く。`ink` を渡すと、描いた字の四角と見えている間をそこへ記録する (#3175)。 */\nexport function drawSvg(\n diagram: DiagramModel,\n layout: Layout,\n timeline: Timeline,\n palette: Palette,\n theme: Theme,\n follow?: FollowFrame,\n ink: Ink[] = [],\n traces: Trace[] = [],\n): string {\n // 札の言葉で全体図の地の幅が変わりうるので、同じ頁に置いた別の言葉の図と名前を分ける。\n // 色は色味の名前でなく色の値から名前を作り、色の値を重ねた図 (#3198) と同じ色味の名前の図の変数の規則を分ける\n const vars = paletteVars(palette, theme);\n const id = nameOf(\n `${JSON.stringify(diagram)}|${vars}|${follow ? `${follow.width}|${follow.lang}` : \"\"}`,\n );\n const m = new Motion(`dg${id}`, timeline.total, timeline.last);\n const ctx: Ctx = {\n m,\n t: timeline,\n id,\n sh: `filter=\"url(#dg-sh-${id})\"`,\n end: (timeline.steps[timeline.steps.length - 1] as Span).end,\n ink,\n traces,\n boxText: boxTextY(layout.boxes),\n corner: palette.corner,\n };\n const on = involved(diagram);\n // 時系列図の処理は生存線の上の札に出し、他の図の種類は箱の下の字に出す\n const subs = subChanges(diagram, timeline, layout.kind !== \"sequence\");\n\n const L = {\n band: [] as string[],\n base: [] as string[],\n lit: [] as string[],\n node: [] as string[],\n badge: [] as string[],\n top: [] as string[],\n };\n for (const region of layout.regions) L.band.push(band(region, ink, ctx.corner));\n const ghostColor = layout.boxes.find((b) => b.ghost)?.color ?? \"slate\";\n if (layout.side) L.band.push(side(layout.side, ghostColor, ink, ctx.corner));\n // 脇道へ入る道は脇道の状態の色、それ以外の道は送る側の色で描く\n const boxColor = (id: string, ghost?: boolean): ColorKey | undefined =>\n layout.boxes.find((b) => b.id === id && (ghost === undefined || b.ghost === ghost))?.color;\n for (const p of layout.paths)\n L.base.push(path(p, boxColor(p.to, true) ?? boxColor(p.from) ?? ghostColor, ink, traces));\n for (const e of layout.ends) L.node.push(endMark(e, ghostColor, ink));\n // 状態遷移図は、段で変わった値を今の状態の色で描き、帯の通った状態の点を着いた時刻に塗る (#3171)\n const isState = layout.kind === \"state\";\n const arrivals = new Map(\n (timeline.states ?? []).flatMap((s) =>\n s.lit[0] ? [[s.box, s.lit[0].start] as [string, number]] : [],\n ),\n );\n // 時間軸の図の物差しの欄は、満ち具合の動きで棒を伸ばす (#3165)\n const meters = new Map((timeline.meters ?? []).map((meter) => [meter.field, meter.keys]));\n const gauge = (field: SceneField): string | undefined =>\n field.meter\n ? kindParts(\"time\").meterField(\n { ...field, meter: field.meter },\n meters.get(field.name) ?? [[0, 0]],\n ctx,\n )\n : undefined;\n const drawStrip = (s: SceneStrip): string =>\n strip(s, fieldChanges(diagram, timeline, layout), ctx, isState, arrivals, gauge);\n // 寄って追う図の表は窓の下に置くので、窓の中身には描かない (#3270)\n if (layout.strip && !follow) L.band.push(drawStrip(layout.strip));\n for (const line of layout.lifelines) L.base.push(lifeline(line.x, line.y1, line.y2));\n // 枝分かれの図の線と commit と札は、枝分かれの図を描く部品が描く (#3164)\n if (isGitLayout(layout)) {\n const git = kindParts(\"git\").drawGit(layout, diagram, timeline, ctx);\n L.base.push(git.links);\n L.lit.push(git.lines);\n L.node.push(git.commits);\n L.top.push(git.tags);\n }\n // 木の図の木の線と通った跡と木の箱と札は、木の図を描く部品が描く (#3233)。木の線を走る線は通った跡が見せるので、ほかの線と同じ線で描かない\n const treeLayout = isTreeLayout(layout) ? layout : undefined;\n const tree = treeLayout\n ? kindParts(\"tree\").drawTree(treeLayout, diagram, timeline, ctx)\n : undefined;\n if (tree) {\n L.base.push(tree.links);\n L.lit.push(tree.trails);\n L.node.push(tree.nodes);\n }\n const runs = new Set((treeLayout?.runs ?? []).map((r) => `${r.step}/${r.event}`));\n // 列の図の列とチップと封と札は、列の図を描く部品が描く (#3239)。\n // 列の図の見た目の規則も列の図を描く部品が持ち、列の図の SVG にだけ書く。ほかの図の SVG と最初に読む script に入れない (#3351)\n const lineupLayout = isLineupLayout(layout) ? layout : undefined;\n const lineup = lineupLayout\n ? kindParts(\"lineup\").drawLineup(lineupLayout, diagram, timeline, ctx, subs)\n : undefined;\n if (lineup) {\n // 寄って追う窓は見出しの文 (図の題、段の題、説明) を描かない。図の幅で組んだ文は窓で切れ、段の題と説明は部品の帯が出すため (#3365)\n if (!follow) L.base.push(lineup.heading);\n L.base.push(lineup.lanes);\n L.node.push(lineup.chips);\n }\n // 試す図の網と待ち行列と機械の列とチップは、試す図を描く部品が描く (#3337)。見た目の規則も試す図の SVG にだけ書く\n const tryDrawn = isTryLayout(layout)\n ? kindParts(\"try\").drawTry(layout, diagram, timeline, ctx)\n : undefined;\n if (tryDrawn) {\n L.base.push(tryDrawn.base);\n L.lit.push(tryDrawn.lit);\n L.node.push(tryDrawn.node);\n L.top.push(tryDrawn.top);\n }\n // 時間軸の図の目盛りと印と拡大の帯の箱と節目は、時間軸の図を描く部品が描く (#3165)。拡大の帯の線は他の図と同じ線で描く\n const timeLayout = isTimeLayout(layout) ? layout : undefined;\n if (timeLayout) {\n const drawn = kindParts(\"time\").drawTime(timeLayout, diagram, timeline, ctx, subs);\n L.base.push(drawn.base);\n L.lit.push(drawn.lit);\n L.node.push(drawn.node);\n L.top.push(drawn.top);\n }\n const wired = new Set((timeLayout?.wires ?? []).map((w) => `${w.step}/${w.event}`));\n for (const e of layout.edges) {\n const time = timeline.edges.find((t) => t.step === e.step && t.event === e.event);\n if (\n !time ||\n (timeLayout && !wired.has(`${e.step}/${e.event}`)) ||\n runs.has(`${e.step}/${e.event}`)\n )\n continue;\n // 木の図の箱は段ごとに現れるので、木の線を走らない線の点線は、両端の木の箱が現れてから出す (#3240)\n const since = Math.max(tree?.appear.get(e.from) ?? 0, tree?.appear.get(e.to) ?? 0);\n const drawn = edge(e, time, ctx, isState, since);\n L.base.push(drawn.base);\n L.lit.push(drawn.lit);\n }\n const states = new Map((timeline.states ?? []).map((s) => [s.box, s]));\n // 飛び先を持つ箱は、箱の札をその飛び先への link で包む (#3199)。時間軸の図の箱は時間軸の図を描く部品が包む\n const links = new Map(\n diagram.boxes.flatMap((b) =>\n b.link === undefined ? [] : [[b.id, b.link] as [string, string]],\n ),\n );\n const linked = (id: string, markup: string): string => linkTo(links.get(id), markup);\n for (const box of timeLayout || lineupLayout ? [] : layout.boxes) {\n if (box.ghost) {\n L.node.push(linked(box.id, ghostCard(box, ink, ctx.corner)));\n continue;\n }\n const state = states.get(box.id);\n L.node.push(\n linked(\n box.id,\n card(\n box,\n ctx,\n on.get(box.id) ?? [],\n subs.get(box.id) ?? [],\n isState ? (state?.lit ?? []) : undefined,\n ),\n ),\n );\n if (state?.done !== undefined) L.node.push(doneMark(box, state.done, ctx));\n }\n for (const b of layout.badges)\n if (!(follow && onStrip(layout, b))) L.badge.push(badge(b, ctx, isState));\n for (const l of layout.labels) {\n const time = timeline.labels.find((t) => t.step === l.step && t.event === l.event);\n if (time) L.top.push(label(l, fadeBefore(l, time, timeline.steps), ctx));\n }\n // 止め絵を選んだ図は、全ての段の名前を出す間にも処理の札を出す。その間に見えている札は繰り返す前まで延ばす (#3200)\n const { whole } = timeline;\n for (const a of layout.actions) {\n const time = timeline.events.find((t) => t.step === a.step && t.event === a.event);\n if (!time) continue;\n const until = (timeline.steps[a.step] as Span).end;\n L.top.push(\n whole && until > whole.start\n ? action(a, time.at, whole.end, ctx)\n : action(a, time.at, until, ctx, whole),\n );\n }\n // 木の図の運ぶ物は着いた所で消える。通った跡が行き先を残し、兄弟の箱から同じ親へ着いた運ぶ物が重ならないため\n for (const time of timeline.carriers) {\n const e = layout.edges.find((x) => x.step === time.step && x.event === time.event);\n if (e)\n L.top.push(\n carrier(\n e,\n treeLayout ? { ...time, start: time.depart, end: time.arrive + MOTION.fade } : time,\n ctx,\n ),\n );\n }\n const content = Object.values(L)\n .map((parts) => parts.join(\"\"))\n .join(\"\");\n\n const { near, far, nearY, farY } = LOOK.shadow;\n const shadow = `<filter id=\"dg-sh-${id}\" x=\"-20%\" y=\"-30%\" width=\"140%\" height=\"180%\"><feDropShadow dx=\"0\" dy=\"${nearY}\" stdDeviation=\"${near}\" style=\"flood-color:var(--sh);flood-opacity:var(--shA)\"/><feDropShadow dx=\"0\" dy=\"${farY}\" stdDeviation=\"${far}\" style=\"flood-color:var(--sh);flood-opacity:var(--shB)\"/></filter>`;\n // 寄って追う時系列図は、頭の箱を窓の上端に貼る頭の列にも描く (#3118)。頭の列の箱はアイコンを外した 2 段 (#3120)。止めて見せる図では描かない\n const heads =\n follow && layout.kind === \"sequence\"\n ? layout.boxes\n .map((box) =>\n linked(box.id, headCard(box, ctx, on.get(box.id) ?? [], subs.get(box.id) ?? [])),\n )\n .join(\"\")\n : \"\";\n // 表の値だけが変わる段の番号の丸は表の隅に在るので、表と一緒に窓の下へ移す (#3270)。\n // 窓の下の表は図の左端から始まるので、丸の半径だけ内へ寄せる。寄せないと丸の左が図の端で切れる\n const drawTable = (s: SceneStrip, from: SceneStrip): string =>\n drawStrip(s) +\n layout.badges\n .filter((b) => onStrip(layout, b))\n .map((b) =>\n badge({ ...b, x: b.x - from.x + s.x + LOOK.badge.r, y: b.y - from.y + s.y }, ctx, isState),\n )\n .join(\"\");\n const bg = frameShape(\n ctx.corner,\n ' class=\"dg-bg\"',\n { x: 0, y: 0, w: layout.width, h: layout.height },\n `<rect class=\"dg-bg\" width=\"${layout.width}\" height=\"${layout.height}\" rx=\"${LOOK.region.radius}\"/>`,\n );\n const view = follow\n ? followView(layout, timeline, diagram, m, id, content, follow, heads, drawTable, ctx.corner)\n : { body: `${bg}${content}`, w: layout.width, h: layout.height };\n const css = `.dg-${id}{${FONT_VARS};--T:${timeline.total}s;${vars}}${PART_CSS}${lineup?.css ?? \"\"}${tryDrawn?.css ?? \"\"}${m.frames.join(\"\")}`;\n return (\n `<svg xmlns=\"http://www.w3.org/2000/svg\" class=\"dg dg-${id}\" viewBox=\"0 0 ${Math.ceil(view.w)} ${Math.ceil(view.h)}\" width=\"${Math.ceil(view.w)}\" height=\"${Math.ceil(view.h)}\" role=\"img\" aria-label=\"${esc(diagram.title)}\" data-dragon=\"figure\" data-view=\"${follow ? \"follow\" : \"fixed\"}\"${isLineupLayout(layout) ? ` data-lineup-arrangement=\"${layout.arrangement}\"` : \"\"}>` +\n `<style>${css}</style><defs>${shadow}</defs>${view.body}</svg>`\n );\n}\n\n/** 四角を全部囲む四角。 */\nfunction union(rects: Rect[]): Rect {\n const x = Math.min(...rects.map((r) => r.x));\n const y = Math.min(...rects.map((r) => r.y));\n return {\n x,\n y,\n w: Math.max(...rects.map((r) => r.x + r.w)) - x,\n h: Math.max(...rects.map((r) => r.y + r.h)) - y,\n };\n}\n\n/** 番号の丸が値の表の上に在るか。表の値だけが変わる段の丸は表の隅に置かれる */\nfunction onStrip(layout: Layout, badge: { y: number }): boolean {\n return layout.strip !== undefined && badge.y >= layout.strip.y;\n}\n\n/** 列の図の見出しの文 (図の題と、段ごとの題と説明) の下の端 */\nfunction lineupHeadingBottom(layout: LineupLayout): number {\n const texts = [layout.heading, ...layout.headlines.flatMap((h) => (h.say ? [h.title, h.say] : [h.title]))];\n return Math.max(...texts.map((t) => t.y + t.h));\n}\n\n/** 段で動く物が占める所。 */\nfunction focusOf(layout: Layout, diagram: DiagramModel, step: number): Rect | undefined {\n const rects = focusParts(layout, diagram, step);\n return rects.length === 0 ? undefined : union(rects);\n}\n\n/**\n * 番号の丸が窓から外れる段で、窓に入れる所 (#3046)。\n * 丸とその周りを起点に、丸に近い動く物から順に、窓 (`vw` × `vh`) に収まる間だけ囲む。収まらない物は飛ばして次を見る\n */\nfunction badgeFocus(badge: { x: number; y: number }, parts: Rect[], vw: number, vh: number): Rect {\n const room = LOOK.badge.r + LOOK.follow.badgeRoom;\n const { x: bx, y: by } = badge;\n const away = (p: Rect): number =>\n Math.hypot(Math.max(0, p.x - bx, bx - p.x - p.w), Math.max(0, p.y - by, by - p.y - p.h));\n let held: Rect = { x: bx - room, y: by - room, w: room * 2, h: room * 2 };\n for (const p of [...parts].sort((a, b) => away(a) - away(b))) {\n const next = union([held, p]);\n if (next.w <= vw && next.h <= vh) held = next;\n }\n return held;\n}\n\n/**\n * 動く物を全部囲んだ所の真ん中 (#3337)。囲んだ所が窓 (`vw` × `vh`) より大きい時は、最初の物が窓から外れない所までに留める。\n * 動く物が無ければ `undefined`\n */\nfunction anchoredCenter(parts: Rect[], vw: number, vh: number): [number, number] | undefined {\n const first = parts[0];\n if (!first) return undefined;\n const all = union(parts);\n // 窓の幅 `size` で `[lo, lo + len]` を外さない真ん中の範囲に、全部を囲んだ所の真ん中 `c` を収める。窓より大きい物は真ん中に置く\n const keep = (c: number, lo: number, len: number, size: number): number =>\n len > size ? lo + len / 2 : Math.min(lo + size / 2, Math.max(lo + len - size / 2, c));\n return [\n keep(all.x + all.w / 2, first.x, first.w, vw),\n keep(all.y + all.h / 2, first.y, first.h, vh),\n ];\n}\n\n/** 段で動く物を 1 つずつ。 */\nfunction focusParts(layout: Layout, diagram: DiagramModel, step: number): Rect[] {\n const rects: Rect[] = [];\n for (const e of layout.edges.filter((x) => x.step === step)) {\n const xs = e.points.map((p) => p[0]);\n const ys = e.points.map((p) => p[1]);\n rects.push({\n x: Math.min(...xs),\n y: Math.min(...ys),\n w: Math.max(...xs) - Math.min(...xs),\n h: Math.max(...ys) - Math.min(...ys),\n });\n }\n rects.push(\n ...layout.labels.filter((l) => l.step === step),\n ...layout.actions.filter((a) => a.step === step),\n );\n // 木の図は、その段で現れる木の箱と木の線と、線の両端の木の箱を見る (#3233)\n if (isTreeLayout(layout)) {\n const ends = new Set(\n (diagram.steps[step]?.events ?? []).flatMap((e) => (e.type === \"edge\" ? [e.from, e.to] : [])),\n );\n rects.push(...layout.nodes.filter((n) => n.step === step || ends.has(n.id)));\n for (const l of layout.links.filter((x) => x.step === step)) {\n const xs = l.points.map((p) => p[0]);\n const ys = l.points.map((p) => p[1]);\n rects.push({\n x: Math.min(...xs),\n y: Math.min(...ys),\n w: Math.max(...xs) - Math.min(...xs),\n h: Math.max(...ys) - Math.min(...ys),\n });\n }\n }\n // 列の図は、その段で変わる列を見る (#3239)\n if (isLineupLayout(layout)) {\n const changed = new Set(\n (diagram.steps[step]?.events ?? []).flatMap((e) => (\"box\" in e ? [e.box] : [])),\n );\n rects.push(...layout.lanes.filter((lane) => changed.has(lane.id)));\n }\n // 試す図は、その段の出来事が触る部品を、出来事が着く所から順に見る (#3337)\n if (isTryLayout(layout)) rects.push(...kindParts(\"try\").tryFocusParts(layout, diagram, step));\n for (const event of diagram.steps[step]?.events ?? []) {\n const ids =\n event.type === \"edge\"\n ? [event.from, event.to]\n : event.type === \"action\" || event.type === \"swap\"\n ? [event.box]\n : [];\n for (const id of ids) {\n const box = layout.boxes.find((b) => b.id === id);\n // 時系列図の頭の箱は遠いので、線の行だけを見る\n if (box && (layout.kind === \"architecture\" || event.type === \"swap\")) rects.push(box);\n }\n }\n return rects;\n}\n\n/**\n * 寄って追う窓。段ごとに動く所へ寄り、窓の外の全体図に今見ている所の枠を同じ動きで出す。\n * 全体図は窓に重ねると今動く線や箱を覆うので、窓の外に置く (#3042)。\n * 縦長の全体図は窓の右に列を取り、横長の全体図は窓の下に置く。失う窓の幅か図の高さの小さい側を選ぶ。\n * 枠の中で見える高さを渡された時は、窓と全体図がその高さに入るまで窓を低くする (#3047)。\n * 枠が余る時は窓を広げ、図の原寸の幅と、見える高さか図の高さまで使う。全体図は今の大きさのまま置く (#3053)。\n * 枠の幅が `LOOK.follow.narrow` より狭い時は、縦長の全体図を出さずに窓へ枠の幅の全部を渡す (#3055)。値の表を持つ図は、狭い枠では横長の全体図も出さない (#3274)。\n * 段で動く物を全部囲んだ所の真ん中に寄せると今の段の番号の丸が窓から外れる段では、丸に近い動く物から窓に収まるだけ囲んだ所へ寄せる (#3046)。\n * 時系列図は頭の箱 `heads` を窓の上端の頭の列に貼り、窓が横に動く時だけ一緒に動かす。頭の箱は図の上端に在り、線を追う窓からは外れるため。\n * 窓は頭の列の下の残りの高さで動く物を真ん中に見せる (#3118)。\n * 頭の列の箱はアイコンを外した 2 段にして低く貼り、線は図の頭の箱の下から見せ始める (#3120)。\n * 値の表は図の一番下に在り、窓が近づくまで映らず、窓より広い表は右側が切れる。全体図と同じ理由で窓の外に出し、\n * 窓と全体図の下に図の枠の幅で組み直す (#3270)。窓と全体図は表を除いた図の高さ `worldH` の中だけを見る。\n */\nfunction followView(\n layout: Layout,\n timeline: Timeline,\n diagram: DiagramModel,\n m: Motion,\n id: string,\n content: string,\n follow: FollowFrame,\n heads: string,\n drawTable: (s: SceneStrip, from: SceneStrip) => string,\n corner: Corner,\n): { body: string; w: number; h: number } {\n const F = LOOK.follow;\n const M = LOOK.mini;\n const frameWidth = Math.max(1, follow.width);\n const full = Math.min(layout.width, frameWidth);\n const worldH = layout.strip ? layout.strip.y : layout.height;\n const title = FIGURE_TEXT[follow.lang].overview;\n /** 窓の高さ `vh` の時の全体図の寸法。全体図は窓の高さで縮むので、窓を低くしたら測り直す */\n const sized = (vh: number) => {\n // 全体図の寸法は枠の幅と窓の高さで決め、置き場所に依らない\n // 全体図の幅は表を含む図の比で決める。表を除いた比にすると全体図の列が太り、窓が狭くなる\n const mw = Math.min(M.w, full * 0.4, ((vh * 0.4) / layout.height) * layout.width);\n const k = mw / layout.width;\n const mh = worldH * k;\n // 地の幅は図の縦横の比で決まるので、縦に長い図では札より狭くなる。その時は地を札の幅まで広げ、図は広げた地の真ん中に置く\n const bw = Math.max(mw, Math.ceil(textWidth(title, TYPE.miniTitle)));\n // 縦横の比は窓の高さに依らないので、低くしても全体図の置き場所は変わらない\n return {\n vh,\n mw,\n k,\n mh,\n bw,\n bgW: bw + M.pad * 2,\n bgH: mh + M.pad * 2 + M.title,\n beside: mh > mw,\n };\n };\n const natural = sized(Math.min(worldH, Math.max(F.minH, full * F.aspect)));\n // 携帯の幅では縦長の全体図の列が枠の幅の 3 割を取り、窓が図の横の 3 割ほどしか見せない。その時は全体図を出さない。\n // 横長の全体図は窓の下に出して幅を取らないので、狭い枠でも出す。\n // ただし値の表を持つ図は、窓の下に全体図と表が重なって段を送る釦を最初の画面の外へ押し出すので、狭い枠では全体図を出さない (#3274)\n const bare = frameWidth < F.narrow && (natural.beside || layout.strip !== undefined);\n const tableH = layout.strip ? rewrapStrip(layout.strip, 0, 0, full).h + M.inset : 0;\n // 窓の右の全体図は窓の高さの中に収まり、窓の下の全体図と表は窓の高さに足される\n const room =\n follow.height === undefined\n ? Number.POSITIVE_INFINITY\n : (natural.beside || bare ? follow.height : follow.height - natural.bgH - M.inset) - tableH;\n // 見える高さが窓より低ければ窓と全体図を縮め、高ければ全体図はそのままに窓を図の高さまで伸ばす。\n // 全体図も伸ばすと、狭い枠では右の全体図の列が太って窓が狭くなる\n const { vh, mw, k, mh, bw, bgW, bgH, beside } =\n room < natural.vh\n ? sized(Math.max(F.fitMinH, room))\n : { ...natural, vh: Number.isFinite(room) ? Math.min(worldH, room) : natural.vh };\n // 右の全体図の列は枠の余りに置き、窓は図の原寸の幅まで広げる。枠が図より狭い時は今までどおり枠の幅から列を引く\n const vw = beside && !bare ? Math.min(layout.width, frameWidth - bgW - M.inset) : full;\n const clampX = (x: number): number => Math.min(layout.width - vw / 2, Math.max(vw / 2, x));\n // 時系列図は窓の上端に頭の列を貼るので、動く物は頭の列の下の残りの高さ `below` に見せる (#3118)。\n // 線は図の頭の箱の下 `top` から見せ始め、図の頭の箱は頭の列の下か窓の上に隠す (#3120)\n // 列の図は描かない見出しの文の下 `top` から見せ始める (#3365)\n const top =\n heads !== \"\"\n ? Math.max(...layout.boxes.map((b) => b.y + b.h)) + F.headRoom\n : isLineupLayout(layout)\n ? lineupHeadingBottom(layout)\n : 0;\n const strip = heads === \"\" ? 0 : F.head.pad * 2 + F.head.h;\n const below = vh - strip;\n /** 頭の列の下の残りの窓の真ん中の高さを、図の頭の箱の下と図の下端で止める */\n const clampY = (y: number): number => Math.min(worldH - below / 2, Math.max(top + below / 2, y));\n const r = LOOK.badge.r;\n let prev: [number, number] = [layout.width / 2, worldH / 2];\n // 頭の列の下の残りの窓の真ん中。窓の真ん中は、これより頭の列の高さの半分だけ上に在る\n const middles = timeline.steps.map((_, s) => {\n // 時間軸の図は、針と印の列を必ず窓に入れる (#3165)。番号の丸へ寄せ直すと、針が窓から外れるため\n if (isTimeLayout(layout)) {\n const f = kindParts(\"time\").timeFocus(\n layout,\n timeline,\n s,\n focusParts(layout, diagram, s),\n vw,\n below,\n );\n prev = [f.x + f.w / 2, f.y + f.h / 2];\n return [clampX(prev[0]), clampY(prev[1])] as [number, number];\n }\n // 試す図は、出来事が着く所 (送った先の待ち行列、作ったブロック、書き換えたブロック) を窓から外さずに寄せる (#3337)。\n // 網は図の幅いっぱいに広がるので、全部を囲んだ所の真ん中へ寄せると、狭い窓では送った先の待ち行列が窓から外れる\n if (isTryLayout(layout)) {\n prev = anchoredCenter(focusParts(layout, diagram, s), vw, below) ?? prev;\n return [clampX(prev[0]), clampY(prev[1])] as [number, number];\n }\n const f = focusOf(layout, diagram, s);\n prev = f ? [f.x + f.w / 2, f.y + f.h / 2] : prev;\n const at: [number, number] = [clampX(prev[0]), clampY(prev[1])];\n // 動く物を全部囲んだ所が窓より大きいと、その端に在る番号の丸が窓から外れる。その段だけ丸の近くへ寄せ直す (#3046)。\n // 窓が見せ始める所 `top` より上の丸 (列の図の見出しの横の丸) へは窓が届かないので寄せ直さない (#3365)\n const b = layout.badges.find((x) => x.step === s);\n if (\n !b ||\n onStrip(layout, b) ||\n b.y < top ||\n (Math.abs(b.x - at[0]) <= vw / 2 - r && Math.abs(b.y - at[1]) <= below / 2 - r)\n )\n return at;\n const near = badgeFocus(b, focusParts(layout, diagram, s), vw, below);\n // 動く物の無い次の段は、寄せ直した窓のまま止める\n prev = [near.x + near.w / 2, near.y + near.h / 2];\n return [clampX(prev[0]), clampY(prev[1])] as [number, number];\n });\n const centers = middles.map(([x, y]): [number, number] => [x, y - strip / 2]);\n const c0 = centers[0] as [number, number];\n const cam: [number, number, number, number?, string?][] = [\n [0, c0[0], c0[1]],\n [(timeline.steps[0] as Span).start, c0[0], c0[1]],\n ];\n centers.forEach((c, s) => {\n if (s === 0) return;\n const before = centers[s - 1] as [number, number];\n const start = (timeline.steps[s] as Span).start;\n cam.push([start, before[0], before[1], 1, EASE.inOut], [start + F.ease, c[0], c[1]]);\n });\n const cl = centers[centers.length - 1] as [number, number];\n cam.push([timeline.last, cl[0], cl[1], 1, EASE.inOut], [timeline.total, c0[0], c0[1]]);\n const camKf = m.move(cam.map(([t, cx, cy, s, e]) => [t, vw / 2 - cx, vh / 2 - cy, s, e]));\n\n // 右に出す時は窓の上端に揃え、下に出す時は窓の右端から内へ寄せる\n const bgX = beside ? vw + M.inset : vw - bgW - M.inset;\n const bgY = beside ? 0 : vh + M.inset;\n const bx = bgX + M.pad;\n const mx = bx + (bw - mw) / 2;\n const my = bgY + M.pad + M.title;\n /**\n * 全体図の地と札と、今見ている所の枠。窓と同じ動きで枠を動かす。\n * 時系列図の枠は頭の列の下の線を見せる所だけを囲む。頭の箱は頭の列に常に出ているため (#3122)\n */\n const overview = (): { clip: string; body: string } => {\n const shapes = [\n ...layout.regions.map(\n (r) =>\n `<rect class=\"dg-mm-band\" style=\"${cs(r.color)}\" x=\"${mx + r.x * k}\" y=\"${my + r.y * k}\" width=\"${r.w * k}\" height=\"${r.h * k}\" rx=\"${partRadius(corner, M.band)}\"/>`,\n ),\n ...layout.boxes.map(\n (b) =>\n `<rect class=\"dg-mm-card\" style=\"${cs(b.color)}\" x=\"${mx + b.x * k}\" y=\"${my + b.y * k}\" width=\"${b.w * k}\" height=\"${b.h * k}\" rx=\"${partRadius(corner, M.card)}\"/>`,\n ),\n ...(isTreeLayout(layout) ? layout.nodes : []).map(\n (n) =>\n `<rect class=\"dg-mm-card\" style=\"${cs(n.color)}\" x=\"${mx + n.x * k}\" y=\"${my + n.y * k}\" width=\"${n.w * k}\" height=\"${n.h * k}\" rx=\"${partRadius(corner, M.card)}\"/>`,\n ),\n // 試す図は、待ち行列の枠を地に、網の節と出ているブロックを札に描く (#3337)\n ...(isTryLayout(layout) ? kindParts(\"try\").tryOverview(layout) : []).map(\n ({ rect: t, band, color }) =>\n `<rect class=\"${band ? \"dg-mm-band\" : \"dg-mm-card\"}\" style=\"${cs(color)}\" x=\"${mx + t.x * k}\" y=\"${my + t.y * k}\" width=\"${t.w * k}\" height=\"${t.h * k}\" rx=\"${partRadius(corner, band ? M.band : M.card)}\"/>`,\n ),\n ].join(\"\");\n const vp = m.move(\n cam.map(([t, cx, cy, , e]) => [t, mx + (cx - vw / 2) * k, my + (cy - vh / 2) * k, 1, e]),\n );\n return {\n clip: `<clipPath id=\"dg-mm-${id}\">${frameShape(corner, \"\", { x: mx, y: my, w: mw, h: mh }, `<rect x=\"${mx}\" y=\"${my}\" width=\"${mw}\" height=\"${mh}\" rx=\"4\"/>`)}</clipPath>`,\n body:\n frameShape(\n corner,\n ' class=\"dg-mm-bg\"',\n { x: bgX, y: bgY, w: bgW, h: bgH },\n `<rect class=\"dg-mm-bg\" x=\"${bgX}\" y=\"${bgY}\" width=\"${bgW}\" height=\"${bgH}\" rx=\"${M.radius}\"/>`,\n ) +\n `<text class=\"dg-mm-t\" x=\"${bx}\" y=\"${my - M.pad + 2}\">${title}</text>` +\n `<g clip-path=\"url(#dg-mm-${id})\"><rect class=\"dg-mm-world\" x=\"${mx}\" y=\"${my}\" width=\"${mw}\" height=\"${mh}\"/>${shapes}<rect class=\"dg-mm-vp dg-a\"${strip === 0 ? \"\" : ` y=\"${strip * k}\"`} width=\"${vw * k}\" height=\"${(vh - strip) * k}\" rx=\"${partRadius(corner, 2)}\" style=\"${vp}\"/></g>`,\n };\n };\n const mini = bare ? { clip: \"\", body: \"\" } : overview();\n // 頭の列は窓の中身の上に重ね、窓と同じ時刻と緩急で横にだけ動かす (#3118)\n const head =\n strip === 0\n ? \"\"\n : `<g class=\"dg-hd\"><rect class=\"dg-hd-bg\" width=\"${vw}\" height=\"${strip}\"/><line class=\"dg-sep\" x1=\"0\" y1=\"${strip}\" x2=\"${vw}\" y2=\"${strip}\"/>` +\n `<g class=\"dg-a\" style=\"${m.move(cam.map(([t, cx, , s, e]) => [t, vw / 2 - cx, 0, s, e]))}\">${heads}</g></g>`;\n const body =\n `<defs><clipPath id=\"dg-vp-${id}\">${frameShape(corner, \"\", { x: 0, y: 0, w: vw, h: vh }, `<rect width=\"${vw}\" height=\"${vh}\" rx=\"${LOOK.region.radius}\"/>`)}</clipPath>${mini.clip}</defs>` +\n `<g clip-path=\"url(#dg-vp-${id})\"><rect class=\"dg-vp-bg\" width=\"${vw}\" height=\"${vh}\"/><g class=\"dg-a\" style=\"${camKf}\">${content}</g>${head}</g>` +\n `${frameShape(corner, ' class=\"dg-vp-frame\"', { x: 0.5, y: 0.5, w: vw - 1, h: vh - 1 }, `<rect class=\"dg-vp-frame\" x=\"0.5\" y=\"0.5\" width=\"${vw - 1}\" height=\"${vh - 1}\" rx=\"${LOOK.region.radius}\"/>`)}${mini.body}`;\n const w = beside && !bare ? vw + M.inset + bgW : full;\n // 全体図を出さない時は、窓のすぐ下に表を置く\n const bottom = beside || bare ? vh : bgY + bgH;\n if (!layout.strip) return { body, w, h: bottom };\n const table = rewrapStrip(layout.strip, 0, bottom + M.inset, full);\n return { body: body + drawTable(table, layout.strip), w, h: table.y + table.h };\n}\n\n/**\n * 描く色味。名前で選んだ色味の `theme` の色に `colors` の色を重ねる (#3198)。\n * 色味に無い色の名前と、色の値として読めない値は、名前を全て挙げて描かずに断る\n */\nexport function paletteOf(options: RenderOptions, theme: Theme): Palette {\n const palette = resolvePalette(options.palette);\n if (!options.colors) return palette;\n const words = FIGURE_TEXT[options.lang ?? DEFAULT_LANG];\n const errors = Object.entries(options.colors).flatMap(([name, value]) =>\n !isColorName(name)\n ? [words.unknownColor(name)]\n : isColorValue(value)\n ? []\n : [words.unreadableColor(name)],\n );\n if (errors.length > 0) throw new Error(words.cannotDraw(errors.join(\" / \")));\n return { ...palette, [theme]: { ...palette[theme], ...options.colors } };\n}\n\n/** 原本の JSON から図を描く。原本が形に合わない時は、誤りの場所を添えて断る。 */\nexport function renderDiagram(input: unknown, options: RenderOptions = {}): Rendered {\n const lang = options.lang ?? DEFAULT_LANG;\n const read = readDiagram(input, { lang });\n if (!read.ok)\n throw new Error(\n FIGURE_TEXT[lang].cannotDraw(read.errors.map((e) => `${e.pointer} ${e.message}`).join(\" / \")),\n );\n // 並べ方と描き方は版1と同じ欄の形を読み、図の id もこの形の字から作る (#3346)\n const diagram = toModel(read.diagram);\n // 置き場を持つ図の種類は、置き場の並べ方で並べる (#3345)。後から読む図の種類 (#3347) と置き場の無い図の種類は登録簿から並べ方を引き、\n // 知らない種類は構成図の並べ方で並べる\n const folder = FOLDERS[diagram.kind];\n const layout = folder?.layout\n ? folder.layout(diagram, lang)\n : diagram.kind === \"state\"\n ? kindParts(\"state\", lang).layoutState(diagram, lang)\n : diagram.kind === \"git\"\n ? kindParts(\"git\", lang).layoutGit(diagram)\n : diagram.kind === \"time\"\n ? kindParts(\"time\", lang).layoutTime(diagram, lang)\n : diagram.kind === \"tree\"\n ? kindParts(\"tree\", lang).layoutTree(diagram)\n : diagram.kind === \"lineup\"\n ? kindParts(\"lineup\", lang).layoutLineup(diagram, {\n lang,\n ...(options.width === undefined ? {} : { width: options.width }),\n })\n : diagram.kind === \"try\"\n ? kindParts(\"try\", lang).layoutTry(diagram, lang, {\n ...(options.width === undefined ? {} : { width: options.width }),\n })\n : KIND_FOLDERS.architecture.layout(diagram, lang);\n return renderLayout(diagram, layout, buildTimeline(diagram, options.still === true), options);\n}\n\n/**\n * 置き場所を決めた図を描き、描いた字の重なりを数える (#3175)。`renderDiagram` が原本を読んで置き場所を決めた後に呼ぶ。\n * 重なりは、字を描く部品が記録した字だけから数えるので、描く所が位置を決める字 (箱の名前) も対象に入る\n */\nexport function renderLayout(\n diagram: DiagramModel,\n layout: Layout,\n timeline: Timeline,\n options: RenderOptions = {},\n): Rendered {\n const theme: Theme = options.theme === \"dark\" ? \"dark\" : \"light\";\n const palette = paletteOf(options, theme);\n const ink: Ink[] = [];\n const traces: Trace[] = [];\n const svg = drawSvg(diagram, layout, timeline, palette, theme, undefined, ink, traces);\n return {\n svg,\n palette: palette.id,\n theme,\n ...(diagram.view ? { view: diagram.view } : {}),\n fonts: { ...FONTS },\n layout,\n timeline,\n diagram,\n overlaps: findOverlaps(ink, timeline.stills, traces),\n };\n}\n","/**\n * 見せ方を字の大きさで選ぶ。\n *\n * 全体を枠の幅へ収めた時の箱の名前の字が 10.5px 以上なら、全体を止めて中だけ動かす (`fixed`)。\n * 下回るなら、動く所へ寄って追い、隅の全体図で今どこかを示す (`follow`)。\n * 枠の高さを渡すと、全体を枠の幅と高さの両方へ収めた時の字で選ぶ (#3047)。高さの決まった置き場で、縦に長い図を縮めすぎないため。\n * 書き手が原本の `view` で決めた時は、字の大きさに関わらずそれに従う。\n */\nimport { READABLE_PX, TYPE } from \"./look/values\";\nimport type { Rendered } from \"./render/draw\";\nimport type { ViewMode } from \"./schema\";\n\nexport function chooseView(rendered: Pick<Rendered, \"layout\" | \"view\">, frameWidth: number, frameHeight?: number): { mode: ViewMode; textPx: number } {\n const byWidth = Math.max(0, frameWidth) / rendered.layout.width;\n const scale = frameHeight === undefined ? byWidth : Math.min(byWidth, Math.max(0, frameHeight) / rendered.layout.height);\n const textPx = scale * TYPE.boxName.size;\n if (rendered.view) return { mode: rendered.view, textPx };\n return { mode: textPx >= READABLE_PX ? \"fixed\" : \"follow\", textPx };\n}\n","/**\n * 頁に図を置いて動かす。\n *\n * 動きを嫌う設定 (`prefers-reduced-motion: reduce`) は描く前に読み、その人には一瞬も自動再生せず、\n * 段ごとの止め絵を釦で送る。各段の題と本文と出典は、読み上げの道具が段の順に読める番号付きの一覧として置き、\n * 図そのものは読み上げから隠して同じ中身を 2 度読ませない。\n * 見せ方は枠の幅で選び (`view.ts`)、寄って追う時は窓と全体図で描き直す。\n * 釦と段の一覧の読み上げの名前と全体図の札は、渡した言葉 (`options.lang`、書かなければ英語) で出す (#3001)。\n * 色は `options.palette` の名前の色味に `options.colors` の色の値を重ね、図と全体図と釦と段の帯を同じ色で塗る (#3198)。\n * 段が替わるたびに `options.onStep` で今の段を知らせ、頁の側が段の札や進み具合を出せるようにする (#3031)。\n * 置いた時に流さず決めた段で止めて置く (`options.pausedAt`) ことと、1 度だけ流して最後の段で止める (`options.playOnce`) ことを選べる。\n * 止め絵を選んだ図 (`options.still`) は、最後の段で止まった時に全ての段の線の名前を出す (#3200)。\n * 頁は `goTo` で段へ移って止め、`mark` で図の上に点線の四角を描く。頁の側では SVG を組まないので、編集画面が字の重なりを囲む時もこれを呼ぶ (#3178)。\n * 段の本文の帯は本文の最も長い段の高さに保ち、段を送っても図の大きさと位置を変えない (#3049)。\n * 帯の中身の幅が `LOOK.player.narrow` より狭い時は、段を送る釦を指で押せる大きさにして段の番号と上の段に並べ、\n * 題と本文をその下の段の全幅に置く (#3057、#3069)。\n * 試す図 (`try`) は書き手の最初の段だけを持つ原本 (今の原本) で描き、流さずに最初の段の止め絵で置く。図の下に入力の帯を置き、\n * 読み手が送るか釦を押すかチップを書き換えるたびに、その出来事の段を今の原本の最後に足して描き直し、足した段を 1 度だけ流す。\n * 動きを嫌う設定では流さずに足した段の止め絵で止める。今の原本は `player.diagram` で読め、置き直すと最初の段に戻る (#3337)。\n * 入力の帯などの操作は試す図の描く部品と同じ塊が持ち、試す図を描けた後に登録簿 (`kinds/registry.ts`) から引いて置く。\n */\nimport { drawSources } from \"./blocks/source/draw\";\nimport { drawRooms, drawStepItem } from \"./blocks/step/draw\";\nimport { FIGURE_TEXT } from \"./figure-text\";\nimport type { Rect } from \"./layout/scene\";\nimport type { TryLayout } from \"./kinds/try/layout\";\nimport { FONT_VARS, LOOK, paletteVars, type TextStyle, TYPE } from \"./look/values\";\nimport { partRadius } from \"./render/corner\";\nimport {\n drawSvg,\n paletteOf,\n type RenderOptions,\n type Rendered,\n renderDiagram,\n} from \"./render/draw\";\nimport { kindParts } from \"./kinds/registry\";\nimport type { Diagram, Step } from \"./schema\";\nimport type { Span } from \"./timeline\";\nimport { chooseView } from \"./view\";\nimport { DEFAULT_LANG } from \"./words\";\n\nexport interface PlayerOptions extends RenderOptions {\n /** 段が替わるたびに今の段 (0 から) を受け取る。置いた時にも最初の段で 1 度呼ぶ。頁の側で段の札や進み具合を出す時に使う (#3031) */\n onStep?: (step: number) => void;\n /**\n * 図を、図の枠の中で見える高さに収める (#3047)。高さに収めると字が読めない図は寄って追う図にし、寄って追う窓と全体図をその高さに収める。\n * 枠の高さが決まっている置き場 (カタログの拡大の重ね窓) で使う。枠の高さが図に合わせて伸びる置き場で使うと、描くたびに低くなる\n */\n fitHeight?: boolean;\n /** 置いた時に流さず、段 `pausedAt` (0 から) の止め絵で止めて置く。段の数を超えた時は最後の段で止める。書かなければ置いた時から流す (#3200) */\n pausedAt?: number;\n /** 流した時に最後の段の止め絵で止め、繰り返さない。最後の段で止まった図を流すと、最初の段から流し直す (#3200) */\n playOnce?: boolean;\n}\n\nexport interface Player {\n /** 今の段 (0 から) */\n readonly step: number;\n /** 動いているか */\n readonly playing: boolean;\n next(): void;\n prev(): void;\n play(): void;\n pause(): void;\n /** 段 `step` (0 から) へ移って止める。段の数を超えた時は最後の段で止める (#3178) */\n goTo(step: number): void;\n /** 図の上に点線の四角を描く。四角は図の座標で渡し、空を渡すと消す。図を置き直しても残る (#3178) */\n mark(rects: readonly Rect[]): void;\n /** 今の原本。試す図では読み手が足した段を含む写しを返し、ほかの種類の図では渡した原本を返す (#3337) */\n readonly diagram: unknown;\n destroy(): void;\n}\n\nconst font = (t: TextStyle): string => `font:${t.weight} ${t.size}px var(--${t.family})`;\nconst px = (v: number): string => `${v}px`;\n\nfunction playerCss(): string {\n const P = LOOK.player;\n const C = LOOK.corner.cut;\n const hidden = px(P.hidden);\n return [\n `.dg-player{display:flex;flex-direction:column;gap:${px(P.gap)};color:var(--ink)}`,\n `.dg-player .dg-frame{border-radius:${px(P.radius)};overflow:hidden}`,\n // 角を落とす色味の再生の枠は、図の枠と同じく右上と左下を落として切り抜き、釦の角を丸めない (#3344)\n `.dg-player[data-corner=\"cut\"] .dg-frame{border-radius:0;clip-path:polygon(0 0,calc(100% - ${px(C)}) 0,100% ${px(C)},100% 100%,${px(C)} 100%,0 calc(100% - ${px(C)}))}`,\n `.dg-player[data-corner=\"cut\"] .dg-btn{border-radius:0}`,\n // 並べ方は帯の中身の幅で選ぶ。帯の中の 1 段 (`.dg-row`) が並べ替わり、帯の左右の余白は置いた頁が帯に付ける\n `.dg-bar{container:dg-bar/inline-size}`,\n `.dg-row{display:flex;align-items:flex-start;gap:${px(P.gap)}}`,\n `.dg-btns{display:flex;gap:${px(P.gap / 2)};flex:none}`,\n `.dg-btn{width:${px(P.button)};height:${px(P.button)};border-radius:${px(P.radius)};border:${px(LOOK.stroke.hair)} solid var(--hair);background:var(--surf);color:var(--ink);${font(TYPE.button)};cursor:pointer}`,\n `.dg-btn:focus-visible{outline:${px(P.focus)} solid var(--c-blue);outline-offset:${px(P.focus)}}`,\n `.dg-say{display:flex;gap:${px(P.gap)};min-width:0}`,\n `.dg-no{${font(TYPE.stepNo)};color:var(--mute);padding-top:${px(P.focus)}}`,\n `.dg-txt{display:grid;grid-template-columns:minmax(0,1fr);min-width:0}`,\n `.dg-txt>*{grid-area:1/1}`,\n `.dg-room{visibility:hidden}`,\n `.dg-tt{${font(TYPE.stepTitle)};margin:0}`,\n `.dg-tb{${font(TYPE.stepBody)};color:var(--ink2);margin:0;white-space:pre-line}`,\n `.dg-sr{position:absolute;width:${hidden};height:${hidden};margin:-${hidden};padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}`,\n // 狭い帯 (携帯の幅) では、段を送る釦を指で押せる大きさにし、その横に番号を置き、\n // 題を 2 段目、本文を 3 段目に置いてどちらも帯の全幅を使う (#3057、#3069)。\n // 釦を大きくすると横に題を置く幅が足りず題が細かく折れるため、題は釦の段に置かない。\n // 題と本文を包む箱を外して写しも同じ升に重ねるので、2 段目は最も高い題、3 段目は最も長い本文の高さになる。\n // 題と本文の間は広い帯と同じく空けず、釦の段の下にだけ間を取って、帯が高くなる分を抑える\n `@container dg-bar (width < ${px(P.narrow)}){` +\n `.dg-row{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:0 ${px(P.gap)}}` +\n `.dg-say,.dg-txt,.dg-txt>*{display:contents}` +\n `.dg-btns{grid-area:1/1;margin-bottom:${px(P.gap / 2)}}` +\n `.dg-btn{width:${px(P.touch)};height:${px(P.touch)}}` +\n `.dg-no{grid-area:1/2;display:flex;align-items:center;min-height:${px(P.touch)};padding-top:0}` +\n `.dg-tt{grid-area:2/1/3/3}` +\n `.dg-tb{grid-area:3/1/4/3}` +\n `}`,\n // 指で触る時は、広い帯でも段を送る釦を指で押せる大きさにする (#3076)。並びは横 1 列のまま変えない。\n // 広い帯は本文が 2 行あれば帯の高さが変わらず、本文の無い帯だけが釦の分だけ高くなる\n `@media (pointer: coarse){.dg-btn{width:${px(P.touch)};height:${px(P.touch)}}}`,\n `.dg-spot{fill:none;stroke:var(--t-amber);stroke-width:${px(LOOK.stroke.mark)};stroke-dasharray:${LOOK.mark.dash} ${LOOK.mark.gap};pointer-events:none}`,\n ].join(\"\");\n}\n\n/** 試す図の原本か */\nfunction isTrySource(input: unknown): input is Diagram {\n if (typeof input !== \"object\" || input === null) return false;\n const source = input as { kind?: unknown; steps?: unknown };\n return source.kind === \"try\" && Array.isArray(source.steps);\n}\n\n/** 書き手の最初の段だけを持つ今の原本。渡した原本は書き換えない */\nfunction startSession(input: Diagram): Diagram {\n const copy = JSON.parse(JSON.stringify(input)) as Diagram;\n return { ...copy, steps: copy.steps.slice(0, 1) };\n}\n\nfunction ensureCss(doc: Document): void {\n if (doc.getElementById(\"dragon-player-css\")) return;\n const style = doc.createElement(\"style\");\n style.id = \"dragon-player-css\";\n style.textContent = playerCss();\n doc.head.appendChild(style);\n}\n\n/** 釦に出す字。HTML に書き出す時は、この字も字の file に残す。 */\nexport const BUTTON_TEXT = { prev: \"‹\", pause: \"❚❚\", play: \"▶\", next: \"›\" } as const;\n\n/** 図の上に四角を描く時の SVG の名前空間 */\nconst SVG_NS = \"http://www.w3.org/2000/svg\";\n\nconst pad = (n: number): string => String(n).padStart(2, \"0\");\n/** 段の番号の札 (`01/12`)。`step` は 0 から数える。 */\nexport const stepNo = (step: number, count: number): string => `${pad(step + 1)}/${pad(count)}`;\n\nexport function mountDiagram(\n host: HTMLElement,\n diagram: unknown,\n options: PlayerOptions = {},\n): Player {\n const doc = host.ownerDocument;\n const win = doc.defaultView;\n // 描く前に読む。描いた後に読むと、動きを嫌う人にも一瞬だけ流れてしまう\n const reduce = Boolean(win?.matchMedia?.(\"(prefers-reduced-motion: reduce)\").matches);\n // 試す図は書き手の最初の段だけを持つ今の原本で描き、読み手が押すたびに段を足す (#3337)\n let session = isTrySource(diagram) ? startSession(diagram) : undefined;\n /** 描く原本。試す図では今の原本 */\n let source: unknown = session ?? diagram;\n let rendered = renderDiagram(source, options);\n const lang = options.lang ?? DEFAULT_LANG;\n const words = FIGURE_TEXT[lang];\n const palette = paletteOf(options, rendered.theme);\n let { timeline } = rendered;\n let steps = rendered.diagram.steps;\n let count = steps.length;\n\n ensureCss(doc);\n const root = doc.createElement(\"div\");\n root.className = \"dg-player\";\n root.dataset.dragon = \"player\";\n root.setAttribute(\"style\", `${FONT_VARS};${paletteVars(palette, rendered.theme)}`);\n if (palette.corner === \"cut\") root.dataset.corner = \"cut\";\n if (session) root.dataset.try = \"\";\n\n const frame = doc.createElement(\"div\");\n frame.className = \"dg-frame\";\n const button = (name: string, label: string, text: string): HTMLButtonElement => {\n const b = doc.createElement(\"button\");\n b.type = \"button\";\n b.className = \"dg-btn\";\n b.dataset.dragon = name;\n b.setAttribute(\"aria-label\", label);\n b.textContent = text;\n return b;\n };\n const prevButton = button(\"prev\", words.prev, BUTTON_TEXT.prev);\n const toggleButton = button(\"toggle\", words.pause, BUTTON_TEXT.pause);\n const nextButton = button(\"next\", words.next, BUTTON_TEXT.next);\n const buttons = doc.createElement(\"div\");\n buttons.className = \"dg-btns\";\n // 置いた頁の言葉と違っても、釦の名前を名前の言葉の声で読ませる\n buttons.setAttribute(\"lang\", lang);\n buttons.append(prevButton, toggleButton, nextButton);\n\n // 見える語り。読み上げには下の一覧を読ませるので、こちらは読み上げから隠す\n const say = doc.createElement(\"div\");\n say.className = \"dg-say\";\n say.setAttribute(\"aria-hidden\", \"true\");\n const no = doc.createElement(\"div\");\n no.className = \"dg-no\";\n no.dataset.dragon = \"step-no\";\n const text = doc.createElement(\"div\");\n text.className = \"dg-txt\";\n const title = doc.createElement(\"p\");\n title.className = \"dg-tt\";\n title.dataset.dragon = \"step-title\";\n const body = doc.createElement(\"p\");\n body.className = \"dg-tb\";\n body.dataset.dragon = \"step-body\";\n const live = doc.createElement(\"div\");\n live.append(title, body);\n text.append(live);\n // 全部の段の題と本文の写しを今の段と同じ升に重ね、段を送っても図の枠が伸び縮みしない (#3049)\n drawRooms(doc, text, steps);\n say.append(no, text);\n // 狭い帯では語りの箱を外して番号と題と本文を釦と同じ升の並びに置く (#3057)。\n // 箱を外した要素の読み上げからの隠し方に頼らず、見える語りの 1 つずつも読み上げから隠す\n for (const shown of [no, title, body]) shown.setAttribute(\"aria-hidden\", \"true\");\n const row = doc.createElement(\"div\");\n row.className = \"dg-row\";\n row.append(buttons, say);\n const bar = doc.createElement(\"div\");\n bar.className = \"dg-bar\";\n bar.append(row);\n\n // 読み上げの道具が段の順に読む一覧。見た目からは外すが、読み上げからは隠さない。\n // 段の出典は本文の後ろに、名前を URL への link にして書いた順に並べる (#3199)\n const list = doc.createElement(\"ol\");\n list.className = \"dg-sr\";\n list.dataset.dragon = \"steps\";\n list.setAttribute(\"aria-label\", words.steps(rendered.diagram.title));\n const fillList = (): void => {\n list.replaceChildren();\n for (const step of steps) {\n const item = drawStepItem(doc, step);\n drawSources(doc, item, step.sources);\n list.append(item);\n }\n };\n fillList();\n\n // 試す図の入力の帯は図と語りの帯の間に置く。足した段は `add` が今の原本に足して描き直す。\n // 試す図を描けたので、試す図の塊は届いている\n const controls = session\n ? kindParts(\"try\", lang).mountTryControls(\n doc,\n rendered.diagram,\n rendered.layout as TryLayout,\n lang,\n (added) => add(added),\n )\n : undefined;\n root.append(frame, ...(controls ? [controls.tools] : []), bar, list);\n host.append(root);\n\n const frameWidth = (): number => frame.clientWidth || host.clientWidth || rendered.layout.width;\n /**\n * 列の図は枠の幅で箱の並べ方を変える (#3351)。横に並べると箱の名前が読めない幅では縦に組んだ図を描き直す。\n * 試す図も同じ幅で縦に組み、縦に組んだ形は枠の幅で描くので、幅が変わった時も描き直す (#3366)。\n * 描き直した時だけ真を返す。段と時刻の表は原本だけで決まるので、描き直しても変わらない\n */\n const arrange = (w: number): boolean => {\n const kind = rendered.diagram.kind;\n if (kind !== \"lineup\" && kind !== \"try\") return false;\n const next = renderDiagram(source, { ...options, width: w });\n const before = rendered.layout as { arrangement?: string; width: number };\n const after = next.layout as { arrangement?: string; width: number };\n if (before.arrangement === after.arrangement && (kind === \"lineup\" || before.width === after.width)) return false;\n rendered = next;\n controls?.update(next.layout as TryLayout);\n return true;\n };\n arrange(frameWidth());\n /** 高さに収めると頼まれた時だけ、図の枠の中で見える高さ (上下の余白を除く)。測れない時は `undefined` で、幅だけで決める */\n const frameHeight = (): number | undefined => {\n if (!options.fitHeight || !win) return undefined;\n const style = win.getComputedStyle(frame);\n const inner =\n frame.clientHeight -\n (Number.parseFloat(style.paddingTop) || 0) -\n (Number.parseFloat(style.paddingBottom) || 0);\n return inner > 0 ? inner : undefined;\n };\n let mode = chooseView(rendered, frameWidth(), frameHeight()).mode;\n let width = frameWidth();\n let height = frameHeight();\n let svg: SVGSVGElement | null = null;\n // 止めて置く段を渡された図は、動きを嫌う人と同じく止め絵で置く。試す図は読み手が押すまで流さない\n let step =\n options.pausedAt === undefined ? 0 : Math.min(count - 1, Math.max(0, options.pausedAt));\n let playing = !reduce && options.pausedAt === undefined && !session;\n let at = playing ? 0 : (timeline.stills[step] ?? 0);\n /** 1 度だけ流すか。試す図は足した段を流した後に最初の段へ戻らない */\n const once = options.playOnce === true || session !== undefined;\n /** 1 度だけ流す図が止まる時刻 (最後の段の止め絵) */\n let lastStill = timeline.stills[count - 1] ?? 0;\n let born = Date.now();\n let marked: readonly Rect[] = [];\n\n /**\n * 渡された四角を点線で囲む。寄って追う図では窓の中身と一緒に動く所に置き、止めて見せる図では図の上に置く。\n * 囲みは字の四角より `LOOK.mark.pad` だけ広げ、字の縁に線が掛からないようにする\n */\n const drawMarks = (): void => {\n if (!svg) return;\n for (const old of svg.querySelectorAll(\".dg-spots\")) old.remove();\n if (marked.length === 0) return;\n const M = LOOK.mark;\n const group = doc.createElementNS(SVG_NS, \"g\");\n group.setAttribute(\"class\", \"dg-spots\");\n for (const r of marked) {\n const rect = doc.createElementNS(SVG_NS, \"rect\");\n rect.setAttribute(\"class\", \"dg-spot\");\n rect.setAttribute(\"x\", String(r.x - M.pad));\n rect.setAttribute(\"y\", String(r.y - M.pad));\n rect.setAttribute(\"width\", String(r.w + M.pad * 2));\n rect.setAttribute(\"height\", String(r.h + M.pad * 2));\n rect.setAttribute(\"rx\", String(partRadius(palette.corner, M.radius)));\n group.append(rect);\n }\n (svg.querySelector('g[clip-path^=\"url(#dg-vp-\"] > g.dg-a') ?? svg).append(group);\n };\n\n /** 動きの変数を付けた図を置き直す。置き直すと動きの時計が最初から数え直される */\n const place = (markup?: string): void => {\n let next: SVGSVGElement | null;\n if (markup !== undefined) {\n const holder = doc.createElement(\"div\");\n holder.innerHTML = markup;\n next = holder.querySelector(\"svg\");\n } else {\n next = svg ? (svg.cloneNode(true) as SVGSVGElement) : null;\n }\n if (!next) return;\n // 箱の飛び先 (#3199) の link を持つ図を隠すと、Tab で押せる link が読み上げから消える。\n // その図は名前を残した group として読ませ、link の無い図は段の一覧に読ませて図を隠す (#3329)\n if (next.querySelector(\"a[href]\")) {\n next.removeAttribute(\"aria-hidden\");\n next.setAttribute(\"role\", \"group\");\n } else {\n next.setAttribute(\"aria-hidden\", \"true\");\n next.removeAttribute(\"role\");\n next.removeAttribute(\"aria-label\");\n }\n next.style.setProperty(\"--at\", String(at));\n next.style.setProperty(\"--play\", playing ? \"running\" : \"paused\");\n next.dataset.motion = playing ? \"play\" : \"still\";\n if (svg) svg.replaceWith(next);\n else frame.append(next);\n svg = next;\n born = Date.now();\n drawMarks();\n controls?.fit(frame, next);\n controls?.mark(next, step);\n };\n const markup = (): string =>\n mode === \"follow\"\n ? drawSvg(rendered.diagram, rendered.layout, timeline, palette, rendered.theme, {\n width,\n ...(height === undefined ? {} : { height }),\n lang,\n })\n : rendered.svg;\n\n const now = (): number => (playing ? (at + (Date.now() - born) / 1000) % timeline.total : at);\n const stepAt = (t: number): number => {\n let found = 0;\n timeline.steps.forEach((span: Span, i) => {\n if (span.start <= t) found = i;\n });\n return found;\n };\n const show = (): void => {\n const current = steps[step];\n no.textContent = stepNo(step, count);\n title.textContent = current?.title ?? \"\";\n body.textContent = current?.body ?? \"\";\n toggleButton.setAttribute(\"aria-label\", playing ? words.pause : words.play);\n toggleButton.textContent = playing ? BUTTON_TEXT.pause : BUTTON_TEXT.play;\n if (svg) controls?.mark(svg, step);\n options.onStep?.(step);\n };\n const restart = (t: number, play: boolean): void => {\n at = t;\n playing = play;\n place();\n show();\n };\n const go = (target: number): void => {\n step = Math.min(count - 1, Math.max(0, target));\n const span = timeline.steps[step] as Span;\n restart(playing ? span.start : (timeline.stills[step] ?? span.start), playing);\n };\n\n /** 流し始める。1 度だけ流す図が最後の段の止め絵まで来ていれば、最初の段から流し直す */\n const resume = (): void => {\n if (once && at >= lastStill) {\n step = 0;\n at = 0;\n }\n restart(at, true);\n };\n\n /**\n * 試す図の今の原本の最後に段 `added` を足して描き直し、足した段へ移る。\n * 動きを嫌う設定では足した段の止め絵で止め、そうでなければ足した段を流して、その段の止め絵で止める。\n * 描けない原本になる時は段を足さずに訳を出し、偽を返す\n */\n const add = (added: Step): boolean => {\n if (!session || !controls) return false;\n const next = { ...session, steps: [...session.steps, added] };\n let drawn: Rendered;\n try {\n // 足した後も今の枠の幅で並べる。狭い枠で縦に組んだ形のまま描き直す (#3366)\n drawn = renderDiagram(next, { ...options, width: frameWidth() });\n } catch (error) {\n controls.refuse(error instanceof Error ? error.message : String(error));\n return false;\n }\n session = next;\n source = next;\n rendered = drawn;\n timeline = drawn.timeline;\n steps = drawn.diagram.steps;\n count = steps.length;\n lastStill = timeline.stills[count - 1] ?? 0;\n for (const room of text.querySelectorAll(\".dg-room\")) room.remove();\n drawRooms(doc, text, steps);\n fillList();\n width = frameWidth();\n height = frameHeight();\n mode = chooseView(rendered, width, height).mode;\n controls.update(drawn.layout as TryLayout);\n controls.arrange(mode, width);\n step = count - 1;\n const span = timeline.steps[step] as Span;\n playing = !reduce;\n at = playing ? span.start : (timeline.stills[step] ?? span.start);\n place(markup());\n show();\n return true;\n };\n\n controls?.arrange(mode, width);\n place(markup());\n show();\n if (controls) frame.append(controls.layer);\n\n const timer = win?.setInterval(() => {\n if (!playing) return;\n // 1 度だけ流す図は、1 周の中の時刻に直す前の経った時間で最後の段の止め絵まで来たかを見る\n if (once && at + (Date.now() - born) / 1000 >= lastStill) {\n step = count - 1;\n restart(lastStill, false);\n return;\n }\n const s = stepAt(now());\n if (s !== step) {\n step = s;\n show();\n }\n }, 120);\n const onPrev = (): void => go(step - 1);\n const onNext = (): void => go(step + 1);\n const onToggle = (): void => (playing ? restart(now(), false) : resume());\n // 段の番号を押すとその段へ移る。試す図のブロックの中のチップを押すと、書き換える欄を出す\n const onFigure = (event: Event): void => {\n const chip = controls ? (event.target as Element | null)?.closest?.(\"[data-chip]\") : null;\n if (chip) {\n controls?.pick(chip.getAttribute(\"data-chip\") ?? \"\", step);\n return;\n }\n const target = (event.target as Element | null)?.closest?.(\"[data-step]\");\n const s = target ? Number(target.getAttribute(\"data-step\")) : Number.NaN;\n if (Number.isInteger(s)) go(s);\n };\n prevButton.addEventListener(\"click\", onPrev);\n nextButton.addEventListener(\"click\", onNext);\n toggleButton.addEventListener(\"click\", onToggle);\n frame.addEventListener(\"click\", onFigure);\n\n // 枠の大きさが変わったら見せ方を選び直す。寄って追う窓は幅 (高さに収める時は高さも) で決まるので、変われば描き直す\n const Observer = (win as (Window & { ResizeObserver?: typeof ResizeObserver }) | null)\n ?.ResizeObserver;\n const observer = Observer\n ? new Observer(() => {\n const w = frameWidth();\n const h = frameHeight();\n const rearranged = arrange(w);\n const chosen = chooseView(rendered, w, h).mode;\n controls?.arrange(chosen, w);\n if (!rearranged && chosen === mode && (mode === \"fixed\" || (w === width && h === height))) {\n if (svg) controls?.fit(frame, svg);\n return;\n }\n const t = now();\n mode = chosen;\n width = w;\n height = h;\n at = t;\n place(markup());\n })\n : undefined;\n observer?.observe(frame);\n\n return {\n get step() {\n return step;\n },\n get playing() {\n return playing;\n },\n next: onNext,\n prev: onPrev,\n play: () => {\n if (!playing) resume();\n },\n pause: () => {\n if (playing) restart(now(), false);\n },\n goTo: (target: number) => {\n playing = false;\n go(target);\n },\n mark: (rects: readonly Rect[]) => {\n marked = rects;\n drawMarks();\n },\n get diagram() {\n // 読み手が足した段を含む今の原本は写しを返し、頁の側が書き換えても再生の部品の原本を変えない\n return session ? (JSON.parse(JSON.stringify(session)) as unknown) : diagram;\n },\n destroy: () => {\n if (timer !== undefined) win?.clearInterval(timer);\n observer?.disconnect();\n controls?.destroy();\n prevButton.removeEventListener(\"click\", onPrev);\n nextButton.removeEventListener(\"click\", onNext);\n toggleButton.removeEventListener(\"click\", onToggle);\n frame.removeEventListener(\"click\", onFigure);\n root.remove();\n },\n };\n}\n","/**\n * dragon の軽い入口 (`@cardenelabs/dragon/light`、#3248、#3349)。\n *\n * 既定の入口と同じ部品を出すが、git、lineup、state、time、tree、try の描く部品と、その図の種類だけの個別ブロックの読み方を持たない。\n * コアブロックと、時系列図と構成図の個別ブロックの読み方は初めから持つ。\n *\n * - `loadFor(<記法か原本>)` を待つと、書いた図の種類の描く部品と、書いた図が使う個別ブロックの読み方だけを読む\n * - `loadKind(<種類>)` を待つと、その種類の描く部品と、その種類の個別ブロックの読み方を全て読む (裏で先に読む時に使う)\n * - `loadReadings(<記法か原本>)` を待つと、書いた図が使う個別ブロックの読み方だけを読み、描く部品は読まない (題と種類だけを引く時に使う)\n * - `diagramKind(<記法か原本>)` は、読む前に図の種類を返す。どの種類の `loadKind` を待つかを決める時に使う\n *\n * 読んだ後は既定の入口と同じ関数で、待たずに同じ図を読み、描き、書き戻す。\n * 読んでいない種類を描くと種類の名前を含む誤りで、読んでいない個別ブロックの行を読むとブロックの名前を含む誤りで止まる。\n * 最初に読む量を抑えたい頁を束ねる時に使い、この入口と既定の入口を 1 つの頁で混ぜない (混ぜると全ての部品が頁に入る)。\n */\nimport { readingLoaded, registerReading } from \"./blocks/reading\";\nimport { LATER_READINGS } from \"./blocks/later-readings\";\nimport { blockKinds } from \"./blocks/usable\";\nimport { blocksUsedBy, kindOf } from \"./blocks/used\";\nimport { kindLoaded, LATER_KINDS, type LaterKind, type LaterKinds, registerKind } from \"./kinds/registry\";\nimport { FORMAT_VERSION, isVersion1, upgrade } from \"./model\";\nimport { printNotation } from \"./printer\";\nimport type { Diagram } from \"./schema\";\n\nexport * from \"./api\";\nexport { kindLoaded, LATER_KINDS, type LaterKind };\n\nconst LOADERS: { [K in LaterKind]: () => Promise<LaterKinds[K]> } = {\n git: () => import(\"./kinds/git\"),\n lineup: () => import(\"./kinds/lineup\"),\n state: () => import(\"./kinds/state\"),\n time: () => import(\"./kinds/time\"),\n tree: () => import(\"./kinds/tree\"),\n try: () => import(\"./kinds/try\"),\n};\n\n/** 後から読む個別ブロックの名前。書いた図が使う時か、その種類を `loadKind` で読んだ時に読む (#3349) */\nexport const LATER_BLOCKS: readonly string[] = Object.keys(LATER_READINGS);\n\n/** 個別ブロック `name` の読み方を今すぐ使える形で持っているか。コアブロックと、時系列図と構成図の個別ブロックは常に持つ */\nexport const blockLoaded = (name: string): boolean => readingLoaded(name);\n\nconst isLater = (kind: string | undefined): kind is LaterKind => (LATER_KINDS as readonly (string | undefined)[]).includes(kind);\n\n/** 版1の原本を版2へ移す。記法と版2の原本はそのまま */\nconst current = (source: string | object): string | object => (typeof source === \"string\" || !isVersion1(source) ? source : upgrade(source, FORMAT_VERSION));\n\n/**\n * 記法か原本 (版1か版2) の図の種類 (#3349)。記法は最初の空でない行の頭の語、原本は `kind` の欄。読めなければ `undefined`。\n * 読む前に、どの種類を待つかを決める時に使う\n */\nexport function diagramKind(source: string | object): string | undefined {\n const diagram = current(source);\n const kind = typeof diagram === \"string\" ? kindOf(diagram) : (diagram as { kind?: unknown }).kind;\n return typeof kind === \"string\" && kind !== \"\" ? kind : undefined;\n}\n\nasync function registerParts<K extends LaterKind>(kind: K): Promise<void> {\n registerKind(kind, await LOADERS[kind]());\n}\n\n/** 種類の描く部品を読む。読んでいれば何もしない */\nasync function loadParts(kind: string | undefined): Promise<void> {\n if (isLater(kind) && !kindLoaded(kind)) await registerParts(kind);\n}\n\n/** 個別ブロックの読み方を読む。読んでいるか、後から読むブロックでなければ何もしない */\nasync function loadBlocks(names: readonly string[]): Promise<void> {\n await Promise.all(\n names.map(async (name) => {\n const load = LATER_READINGS[name];\n if (load !== undefined && !readingLoaded(name)) registerReading(name, await load());\n }),\n );\n}\n\n/**\n * 種類の描く部品と、その種類の個別ブロックの読み方を全て読む。時系列図と構成図は初めから持つので何もしない。\n * 読み込みが落ちると拒否され、次に呼ぶと読み直す\n */\nexport async function loadKind(kind: string | undefined): Promise<void> {\n if (!isLater(kind)) return;\n await Promise.all([loadParts(kind), loadBlocks(LATER_BLOCKS.filter((name) => blockKinds(name).includes(kind)))]);\n}\n\n/**\n * 記法か原本 (版1か版2) の図を読んで書き戻すのに要る、個別ブロックの読み方だけを読む (#3349)。描く部品は読まない。\n * 原本を渡した時は、原本を書き戻した記法を読むのに要るブロックも読む (時間軸の図の線は、拡大の範囲のブロックが読む時に確かめる)。\n * 記法の題と種類だけを引き、描くのは後の頁に任せる時に使う。読み込みが落ちると拒否され、次に呼ぶと読み直す\n */\nexport async function loadReadings(source: string | object): Promise<void> {\n const diagram = current(source);\n await loadBlocks(blocksUsedBy(diagram));\n if (typeof diagram === \"string\") return;\n let printed: string;\n try {\n printed = printNotation(diagram as Diagram);\n } catch {\n // 書き戻せない原本は、読む処理 (`readDiagram`) がその誤りを返す\n return;\n }\n await loadBlocks(blocksUsedBy(printed));\n}\n\n/**\n * 記法か原本 (版1か版2) の図を読んで描くのに要る物だけを読む。書いた図の種類の描く部品と、書いた図が使う個別ブロックの読み方 (`loadReadings`、#3349)。\n * 図の種類が読めない記法や原本は何も読まずに終わり、読む処理がその誤りを返す。読み込みが落ちると拒否され、次に呼ぶと読み直す\n */\nexport async function loadFor(source: string | object): Promise<void> {\n await Promise.all([loadParts(diagramKind(source)), loadReadings(source)]);\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["/Users/cardene/Desktop/projects/dragon-3377-release-0-51-0/packages/dragon/dist/light/index.cjs","../../src/blocks/act/read.ts","../../src/nearest.ts","../../src/blocks/icon/read.ts","../../src/blocks/color/read.ts","../../src/blocks/group/read.ts","../../src/blocks/link/read.ts","../../src/blocks/box/read.ts","../../src/blocks/lifeline/read.ts","../../src/blocks/note/read.ts","../../src/blocks/source/read.ts","../../src/blocks/step/read.ts","../../src/blocks/strip/read.ts","../../src/blocks/entry-readings.ts","../../src/blocks/reading.ts","../../src/blocks/later-readings.ts","../../src/kinds/architecture/layout.ts","../../src/kinds/architecture/kind.ts","../../src/kinds/git/kind.ts","../../src/kinds/lineup/kind.ts","../../src/kinds/sequence/layout.ts","../../src/kinds/sequence/kind.ts","../../src/kinds/state/kind.ts","../../src/kinds/time/kind.ts","../../src/kinds/tree/kind.ts","../../src/kinds/try/kind.ts","../../src/kinds/index.ts","../../src/blocks/usable.ts","../../src/blocks/event-owners.ts","../../src/blocks/used.ts","../../src/kinds/registry.ts","../../src/model.ts","../../src/messages.ts","../../src/printer.ts","../../src/markdown.ts","../../src/parser.ts","../../src/field-messages.ts","../../src/schemas/validate-diagram.js","../../src/schema.ts","../../src/version.ts","../../src/blocks/source/draw.ts","../../src/blocks/step/draw.ts","../../src/blocks/act/draw.ts","../../src/blocks/edge/draw.ts","../../src/blocks/edge-label/draw.ts","../../src/blocks/group/draw.ts","../../src/blocks/lifeline/draw.ts","../../src/blocks/note/draw.ts","../../src/blocks/side-path/draw.ts","../../src/blocks/start-finish/draw.ts","../../src/blocks/strip/draw.ts","../../src/blocks/carry/timing.ts","../../src/timeline.ts","../../src/render/motion.ts","../../src/render/draw.ts","../../src/view.ts","../../src/player.ts","../../src/light.ts"],"names":["reading","current","edge","event","strip","kind","S","changes","label","badge","k","vh","mw","mh","bw","band","name","text","markup"],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACA;ACjIO,IAAMA,SAAAA,EAAqC;AA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AAA;AACC,IAAA;AACJ,IAAA;AACS,IAAA;AAEhB,EAAA;AACmB,kBAAA;AAEhB,EAAA;AACM,IAAA;AACF,MAAA;AACT,IAAA;AACc,IAAA;AACL,MAAA;AACT,IAAA;AACM,IAAA;AACA,IAAA;AACM,IAAA;AACW,MAAA;AACvB,IAAA;AACa,IAAA;AACsB,MAAA;AACnC,IAAA;AAC0B,IAAA;AACd,MAAA;AACD,MAAA;AACX,IAAA;AACkC,IAAA;AACvB,MAAA;AACC,MAAA;AACZ,IAAA;AACc,IAAA;AAEwD,MAAA;AACtE,IAAA;AACe,IAAA;AACoC,MAAA;AAC5B,sBAAA;AACH,sBAAA;AAC4B,MAAA;AACA,MAAA;AACI,MAAA;AACP,MAAA;AAC/B,MAAA;AACd,IAAA;AACF,EAAA;AACF;AxD6rX6D;AACA;AyDzsYO;AACnC,EAAA;AACM,EAAA;AACF,EAAA;AACF,EAAA;AACA,EAAA;AACF,EAAA;AACjC;AAGyE;AAGD;AAEuD;AAGjC;AAMrB;AACzC,EAAA;AAC2B,EAAA;AACD,EAAA;AAC1D;AAE0E;AAChC,EAAA;AAC1C;AAGkE;AAClB,EAAA;AAChD;AAGmE;AACnD,EAAA;AACc,IAAA;AACQ,MAAA;AACgB,MAAA;AACjD,IAAA;AACH,EAAA;AACF;AAMwE;AAClD,EAAA;AAC2B,EAAA;AACjD;AAO2E;AAC3C,EAAA;AACQ,EAAA;AACL,EAAA;AAC7B,EAAA;AACA,EAAA;AACwC,IAAA;AACpC,EAAA;AAEN,IAAA;AACF,EAAA;AACsC,EAAA;AACxC;AAMsE;AACjB,EAAA;AACrD;AzDyqY6D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/Users/cardene/Desktop/projects/dragon-3377-release-0-51-0/packages/dragon/dist/light/index.cjs","sourcesContent":[null,"/**\n * `act` のブロックの読み方 (#3349)。読む処理と書き戻す処理と日英の誤りの文を、入口に置く定義 (`block.ts`) と分けて持つ。\n * 軽い入口は、後から読む図の種類の個別ブロックの読み方を、書いた図が使う時に読む\n */\nimport type { BlockReading } from \"../block\";\nimport { fail, readOnBox } from \"../../read-kit\";\n\nexport interface ActMessages {\n actShape: string;\n lineupNoAct: string;\n}\n\nexport const reading: BlockReading<ActMessages> = {\n read: {\n act: (source, state) => {\n if (state.kind === \"lineup\") throw fail(source, 0, state.m.lineupNoAct);\n const step = state.inStep(source);\n const on = readOnBox(source, \"act\", state.m.actShape, state.boxAt);\n step.events.push({ type: \"action\", box: on.box, label: on.text });\n },\n },\n print: { events: { action: (e) => `act ${e.box}: ${e.label}` } },\n messages: {\n ja: {\n actShape: \"act は act <名札>: <処理の名前> の形で書く\",\n lineupNoAct: \"lineup (列の図) には act の行を書けない。列の右上の字は note の行で書き換える\",\n },\n en: {\n actShape: \"Write act as act <id>: <action>\",\n lineupNoAct: \"A lineup diagram takes no act lines. Rewrite the text at the top right of a lane with a note line\",\n },\n },\n};\n","/**\n * 書いた語に一番近い語 (#3315)。誤りの文で、書き間違えた語の代わりに 1 つだけ候補を示す。\n *\n * 大文字と小文字を区別しない編集距離 (1 字の足し、消し、置き換えを 1 と数える) で比べる。\n * 距離が 2 以下で、書いた語の字数より小さい時だけ近いとみなす。\n * 字数より小さいことを求めるのは、1 字の語がどの 1 字の語とも距離 1 になり、何を書いても候補が出るのを避けるため。\n * 同じ距離の語が 2 つ以上ある時は `candidates` の並びで先の語を返し、近い語が無ければ `undefined` を返す。\n */\nconst MAX_DISTANCE = 2;\n\nexport function nearest(word: string, candidates: readonly string[]): string | undefined {\n const written = [...word.toLowerCase()];\n let limit = Math.min(MAX_DISTANCE, written.length - 1);\n let best: string | undefined;\n for (const candidate of candidates) {\n const d = distance(written, [...candidate.toLowerCase()]);\n if (d > limit) continue;\n best = candidate;\n // 後の語は、今の語より近い時だけ置き換える\n limit = d - 1;\n }\n return best;\n}\n\n/** 2 つの字の並びの編集距離 */\nfunction distance(a: readonly string[], b: readonly string[]): number {\n let previous = Array.from({ length: b.length + 1 }, (_, j) => j);\n for (let i = 1; i <= a.length; i++) {\n const current = [i];\n for (let j = 1; j <= b.length; j++) {\n const replace = (previous[j - 1] as number) + (a[i - 1] === b[j - 1] ? 0 : 1);\n current.push(Math.min((previous[j] as number) + 1, (current[j - 1] as number) + 1, replace));\n }\n previous = current;\n }\n return previous[b.length] as number;\n}\n","/**\n * `icon` のブロックの読み方 (#3349)。読む処理と書き戻す処理と日英の誤りの文を、入口に置く定義 (`block.ts`) と分けて持つ。\n * 軽い入口は、後から読む図の種類の個別ブロックの読み方を、書いた図が使う時に読む\n */\nimport { nearest } from \"../../nearest\";\nimport type { Messages } from \"../../messages\";\nimport { type Attr, fail, list } from \"../../read-kit\";\nimport type { SourceLine } from \"../../tokenize\";\nimport { type BlockReading, none } from \"../block\";\nimport { ICON_NAMES } from \"./block\";\n\nexport interface IconMessages {\n /** 知らないアイコン名 `value`。近い名前が在ればそれだけを、無ければ使える名前を全て挙げる (#3315) */\n badIcon: (value: string) => string;\n}\n\n/** 箱と区画の行の属性の、絵の名前。知らない名前は誤りで止める */\nexport function readIcon(source: SourceLine, attrs: Map<string, Attr>, m: Messages): Attr | undefined {\n const icon = attrs.get(\"icon\");\n if (icon && !ICON_NAMES.includes(icon.value)) throw fail(source, icon.at, m.badIcon(icon.value));\n return icon;\n}\n\n/** 書いたアイコン名に近い名前が在れば `near` の文、無ければ `none` の文 (#3315) */\nconst withNear = (value: string, near: (name: string) => string, none: string): string => {\n const name = nearest(value, ICON_NAMES);\n return name === undefined ? none : near(name);\n};\n\nexport const reading: BlockReading<IconMessages> = {\n read: none(\"絵は箱と区画の行の属性で、行の頭の語を持たない。箱と区画の行を読む処理が readIcon を呼ぶ\"),\n print: none(\"絵は箱と区画の行の属性で、箱と区画の宣言を書き戻す処理が icon の鍵を書く\"),\n messages: {\n ja: { badIcon: (value) => withNear(value, (near) => `${value} という icon は無い。近い名前は ${near}`, `icon は ${list(ICON_NAMES)} のどれか`) },\n en: { badIcon: (value) => withNear(value, (near) => `There is no icon named ${value}. The closest is ${near}`, `icon is one of ${list(ICON_NAMES)}`) },\n },\n};\n","/**\n * `color` のブロックの読み方 (#3349)。読む処理と書き戻す処理と日英の誤りの文を、入口に置く定義 (`block.ts`) と分けて持つ。\n * 軽い入口は、後から読む図の種類の個別ブロックの読み方を、書いた図が使う時に読む\n */\nimport type { Messages } from \"../../messages\";\nimport { type Attr, fail, isOneOf, list } from \"../../read-kit\";\nimport type { SourceLine } from \"../../tokenize\";\nimport { type BlockReading, none } from \"../block\";\nimport { readIcon } from \"../icon/read\";\nimport { COLORS, type Color } from \"./block\";\n\nexport interface ColorMessages {\n badColor: string;\n}\n\n/** 区画と箱の見た目の属性 (`note` と `color` と `icon`)。知らない色と絵の名前は誤りで止める */\nexport function readLook(source: SourceLine, attrs: Map<string, Attr>, m: Messages): { note?: string; color?: Color; icon?: string } {\n const color = attrs.get(\"color\");\n if (color && !isOneOf(COLORS, color.value)) throw fail(source, color.at, m.badColor);\n const icon = readIcon(source, attrs, m);\n const note = attrs.get(\"note\")?.value;\n return {\n ...(note !== undefined ? { note } : {}),\n ...(color ? { color: color.value as Color } : {}),\n ...(icon ? { icon: icon.value } : {}),\n };\n}\n\nexport const reading: BlockReading<ColorMessages> = {\n read: none(\"色は箱と区画の行の属性で、行の頭の語を持たない。箱と区画の行を読む処理が readLook を呼ぶ\"),\n print: none(\"色は箱と区画の行の属性で、箱と区画の宣言を書き戻す処理が color の鍵を書く\"),\n messages: {\n ja: { badColor: `color は ${list(COLORS)} のどれか` },\n en: { badColor: `color is one of ${list(COLORS)}` },\n },\n};\n","/**\n * `group` のブロックの読み方 (#3349)。読む処理と書き戻す処理と日英の誤りの文を、入口に置く定義 (`block.ts`) と分けて持つ。\n * 軽い入口は、後から読む図の種類の個別ブロックの読み方を、書いた図が使う時に読む\n */\nimport { attrs, shown } from \"../../print-kit\";\nimport { fail, readDeclared } from \"../../read-kit\";\nimport type { Region } from \"../../schema\";\nimport { type BlockReading, none } from \"../block\";\nimport { readLook } from \"../color/read\";\n\nexport interface GroupMessages {\n nestedGroup: string;\n strayEnd: string;\n endTakesNothing: string;\n unclosedGroup: (id: string) => string;\n regionReopened: (id: string) => string;\n gitNoGroup: string;\n treeNoGroup: string;\n lineupNoGroup: string;\n}\n\n/** 区画を開く行。名前と見た目の属性は、名札と違う物と書いた物だけを書く */\nexport const declareRegion = (r: Region): string =>\n `group ${r.id}${shown(r.id, r.name)}${attrs([\n [\"note\", r.note],\n [\"color\", r.color],\n [\"icon\", r.icon],\n ])}`;\n\nexport const reading: BlockReading<GroupMessages> = {\n read: {\n // `group` の行。同じ名札をもう一度開いた時は、名前も属性も書かない\n group: (source, state) => {\n const { m, figure } = state;\n state.beforeSteps(source);\n if (state.kind === \"git\") throw fail(source, 0, m.gitNoGroup);\n if (state.kind === \"tree\") throw fail(source, 0, m.treeNoGroup);\n if (state.kind === \"lineup\") throw fail(source, 0, m.lineupNoGroup);\n if (figure.group) throw fail(source, 0, m.nestedGroup);\n const declared = readDeclared(source, \"group\", state.attrs.group ?? [], m);\n if (figure.regions.some((region) => region.id === declared.id)) {\n if (declared.name !== undefined || declared.attrs.size > 0) throw fail(source, 0, m.regionReopened(declared.id));\n } else {\n state.claim(source, declared.id, declared.idAt);\n figure.regions.push({ id: declared.id, name: declared.name ?? declared.id, ...readLook(source, declared.attrs, m) });\n }\n figure.group = { source, id: declared.id };\n },\n end: (source, state) => {\n if (source.text !== \"end\") throw fail(source, \"end\".length, state.m.endTakesNothing);\n if (!state.figure.group) throw fail(source, 0, state.m.strayEnd);\n state.figure.group = undefined;\n },\n },\n print: none(\"区画の行は書き戻すと箱の行と同じ並びに入るので、箱のブロックの宣言を書く処理が declareRegion で書く\"),\n messages: {\n ja: {\n nestedGroup: \"group の中に group は書けない。先に end で閉じる\",\n strayEnd: \"end の前に、閉じる group が無い\",\n endTakesNothing: \"end の後ろには何も書かない\",\n unclosedGroup: (id) => `group ${id} を end で閉じていない`,\n regionReopened: (id) => `group ${id} は宣言済み。もう一度開く時は group ${id} だけを書き、名前と属性は最初の宣言に書く`,\n gitNoGroup: \"git (枝分かれの図) には group を書けない。枝は branch の行で宣言する\",\n treeNoGroup: \"tree (木の図) には group を書けない。木の箱は leaf と node の行で書く\",\n lineupNoGroup: \"lineup (列の図) には group を書けない。列は box の行で宣言する\",\n },\n en: {\n nestedGroup: \"A group cannot hold another group. Close it with end first\",\n strayEnd: \"There is no group for this end to close\",\n endTakesNothing: \"Write nothing after end\",\n unclosedGroup: (id) => `group ${id} is not closed with end`,\n regionReopened: (id) => `group ${id} is already declared. To open it again, write only group ${id}; put the name and attributes on the first one`,\n gitNoGroup: \"A git diagram takes no group. Declare branches with branch lines\",\n treeNoGroup: \"A tree diagram takes no group. Write the tree boxes with leaf and node lines\",\n lineupNoGroup: \"A lineup diagram takes no group. Declare the lanes with box lines\",\n },\n },\n};\n","/**\n * `link` のブロックの読み方 (#3349)。読む処理と書き戻す処理と日英の誤りの文を、入口に置く定義 (`block.ts`) と分けて持つ。\n * 軽い入口は、後から読む図の種類の個別ブロックの読み方を、書いた図が使う時に読む\n */\nimport type { Messages } from \"../../messages\";\nimport { type Attr, fail } from \"../../read-kit\";\nimport type { SourceLine } from \"../../tokenize\";\nimport { type BlockReading, none } from \"../block\";\n\nexport const URL_FORM = /^(\\/|https?:\\/\\/)/u;\n\nexport interface LinkMessages {\n /** 箱の飛び先 (`link`) か段の出典 (`url`) に、頁を移る形でない URL を書いた (#3199) */\n badUrl: (key: string) => string;\n}\n\n/** 頁を移る形の URL。ほかの形 (`javascript:` など) は、その属性の位置を示して断る */\nexport function urlOf(source: SourceLine, key: string, attr: Attr, m: Messages): string {\n if (!URL_FORM.test(attr.value)) throw fail(source, attr.at, m.badUrl(key));\n return attr.value;\n}\n\nexport const reading: BlockReading<LinkMessages> = {\n read: none(\"飛び先は箱の行の属性で、行の頭の語を持たない。箱の行を読む処理が urlOf を呼ぶ\"),\n print: none(\"飛び先は箱の行の属性で、箱の宣言を書き戻す処理が link の鍵を書く\"),\n messages: {\n ja: { badUrl: (key) => `${key} には / で始まる path か、http:// か https:// で始まる URL を書く` },\n en: { badUrl: (key) => `Write a path that starts with / or a URL that starts with http:// or https:// for ${key}` },\n },\n};\n","/**\n * `box` のブロックの読み方 (#3349)。読む処理と書き戻す処理と日英の誤りの文を、入口に置く定義 (`block.ts`) と分けて持つ。\n * 軽い入口は、後から読む図の種類の個別ブロックの読み方を、書いた図が使う時に読む\n */\nimport type { BlockReading } from \"../block\";\nimport { attrs, shown } from \"../../print-kit\";\nimport { fail, isOneOf, readDeclared } from \"../../read-kit\";\nimport type { Box, DiagramModel } from \"../../schema\";\nimport { readLook } from \"../color/read\";\nimport { declareRegion } from \"../group/read\";\nimport { urlOf } from \"../link/read\";\n\nexport const LANE_ATTRS = [\"note\", \"color\", \"order\"] as const;\n\n/** 列の図の箱の `order` に書ける並べ方。`none` は順番の無い置き場 (#3351) */\nexport const ORDERS = [\"none\"] as const;\n\nexport interface BoxMessages {\n undeclaredBox: (id: string) => string;\n noBoxes: string;\n /** 列の図の箱だけの属性 (`order`) を、別の種類の図の箱に書いた (#3351) */\n lineupOnlyAttr: (key: string) => string;\n /** 箱の `order` に `none` 以外を書いた */\n orderNone: string;\n}\n\nconst declareBox = (b: Box): string =>\n `box ${b.id}${shown(b.id, b.name)}${attrs([\n [\"note\", b.sub],\n [\"color\", b.color],\n [\"icon\", b.icon],\n [\"link\", b.link],\n [\"order\", b.order],\n ])}`;\n\n/**\n * 区画と箱の宣言の塊。塊どうしは空行で区切る。\n * 箱は JSON の並びのまま書き、同じ区画の箱が続く所を 1 つの `group … end` にする。区画の箱が飛び飛びの時は同じ `group` を開き直す。\n * 区画の並びが箱の現れる順と違う時と、箱の無い区画がある時は、先に全ての区画を中の無い `group … end` で宣言してから開き直す\n */\nfunction declarations(diagram: DiagramModel): string[] {\n const regions = diagram.regions ?? [];\n const runs: { region?: string; boxes: Box[] }[] = [];\n for (const b of diagram.boxes) {\n const last = runs.at(-1);\n if (last && last.region === b.region) last.boxes.push(b);\n else runs.push({ ...(b.region !== undefined ? { region: b.region } : {}), boxes: [b] });\n }\n const opened = [...new Set(runs.flatMap((run) => (run.region === undefined ? [] : [run.region])))];\n const inOrder = opened.length === regions.length && opened.every((id, i) => regions[i]?.id === id);\n const declared = new Set<string>();\n const blocks: string[] = [];\n if (!inOrder) {\n for (const r of regions) {\n blocks.push(`${declareRegion(r)}\\nend`);\n declared.add(r.id);\n }\n }\n for (const run of runs) {\n const lines = run.boxes.map(declareBox);\n if (run.region === undefined) {\n blocks.push(lines.join(\"\\n\"));\n continue;\n }\n const region = regions.find((r) => r.id === run.region);\n const open = declared.has(run.region) || !region ? `group ${run.region}` : declareRegion(region);\n declared.add(run.region);\n blocks.push([open, ...lines.map((line) => ` ${line}`), \"end\"].join(\"\\n\"));\n }\n return blocks;\n}\n\nexport const reading: BlockReading<BoxMessages> = {\n read: {\n // `box` の行。開いている `group` の中なら、その区画に置く\n box: (source, state) => {\n state.beforeSteps(source);\n const declared = readDeclared(source, \"box\", state.kind === \"lineup\" ? LANE_ATTRS : (state.attrs.box ?? []), state.m);\n state.claim(source, declared.id, declared.idAt);\n state.figure.firstBox ??= source;\n const { note, ...look } = readLook(source, declared.attrs, state.m);\n const link = declared.attrs.get(\"link\");\n const order = declared.attrs.get(\"order\");\n if (order && state.kind !== \"lineup\") throw fail(source, order.at, state.m.lineupOnlyAttr(\"order\"));\n if (order && !isOneOf(ORDERS, order.value)) throw fail(source, source.text.indexOf(order.value, order.at + \"order\".length), state.m.orderNone);\n const group = state.figure.group;\n state.figure.boxes.push({\n id: declared.id,\n name: declared.name ?? declared.id,\n ...(note !== undefined ? { sub: note } : {}),\n ...look,\n ...(group ? { region: group.id } : {}),\n ...(link ? { link: urlOf(source, \"link\", link, state.m) } : {}),\n ...(order ? { order: order.value as (typeof ORDERS)[number] } : {}),\n });\n },\n },\n print: { declare: declarations },\n messages: {\n ja: {\n undeclaredBox: (id) => `${id} という箱は宣言していない`,\n noBoxes: \"箱を 1 つ以上宣言する\",\n lineupOnlyAttr: (key) => `${key} は lineup (列の図) の box にだけ書ける`,\n orderNone: \"order には none だけを書ける。順番の無い置き場にする箱に書く\",\n },\n en: {\n undeclaredBox: (id) => `No box named ${id} is declared`,\n noBoxes: \"Declare at least one box\",\n lineupOnlyAttr: (key) => `${key} can be written only on box lines of lineup diagrams`,\n orderNone: \"order takes only none. Write it on a box that holds chips in no order\",\n },\n },\n};\n","/**\n * `lifeline` のブロックの読み方 (#3349)。読む処理と書き戻す処理と日英の誤りの文を、入口に置く定義 (`block.ts`) と分けて持つ。\n * 軽い入口は、後から読む図の種類の個別ブロックの読み方を、書いた図が使う時に読む\n */\nimport type { Box } from \"../../schema\";\nimport { type BlockReading, none } from \"../block\";\n\nexport const lifelinesOf = (boxes: readonly Box[]): { lifelines: string[] } => ({ lifelines: boxes.map((box) => box.id) });\n\nexport const reading: BlockReading = {\n read: none(\"生存線の行は無い。描く処理の形へ組み直す時に、toModel が lifelinesOf で箱の並びから組む\"),\n print: none(\"生存線の並びは箱の並びと同じなので書かない。読み直す時に箱の宣言から組み直す\"),\n messages: none(\"生存線は記法に行を持たないので、誤りの文を持たない\"),\n};\n","/**\n * `note` のブロックの読み方 (#3349)。読む処理と書き戻す処理と日英の誤りの文を、入口に置く定義 (`block.ts`) と分けて持つ。\n * 軽い入口は、後から読む図の種類の個別ブロックの読み方を、書いた図が使う時に読む\n */\nimport type { BlockReading } from \"../block\";\nimport { attrs, name } from \"../../print-kit\";\nimport { readOnBox } from \"../../read-kit\";\n\nexport interface NoteMessages {\n noteShape: string;\n}\n\nexport const reading: BlockReading<NoteMessages> = {\n read: {\n note: (source, state) => {\n const step = state.inStep(source);\n const on = readOnBox(source, \"note\", state.m.noteShape, state.boxAt);\n step.events.push({ type: \"swap\", box: on.box, text: on.text });\n },\n },\n print: {\n events: { swap: (e, kind) => (kind === \"time\" ? `note ${e.box}: ${name(e.text)}${attrs([[\"color\", e.color]])}` : `note ${e.box}: ${e.text}`) },\n },\n messages: {\n ja: { noteShape: \"note は note <名札>: <下の小さな字> の形で書く\" },\n en: { noteShape: \"Write note as note <id>: <caption>\" },\n },\n};\n","/**\n * `source` のブロックの読み方 (#3349)。読む処理と書き戻す処理と日英の誤りの文を、入口に置く定義 (`block.ts`) と分けて持つ。\n * 軽い入口は、後から読む図の種類の個別ブロックの読み方を、書いた図が使う時に読む\n */\nimport type { BlockReading } from \"../block\";\nimport type { Messages } from \"../../messages\";\nimport { attrs, name } from \"../../print-kit\";\nimport { fail, readAttrs, readName } from \"../../read-kit\";\nimport type { SourceLine } from \"../../tokenize\";\nimport { urlOf } from \"../link/read\";\nimport { ATTRS, type StepSource } from \"./block\";\n\n/** 出典の誤りの文 */\nexport interface SourceMessages {\n /** 段の出典の行の形 (#3199) */\n sourceShape: string;\n}\n\n/** `source <名前> [url: <URL>]` の行 */\nfunction readSource(source: SourceLine, m: Messages): StepSource {\n const named = readName(source, \"source\".length, m);\n const url = named.rest < source.text.length ? readAttrs(source, named.rest, ATTRS, m).get(\"url\") : undefined;\n if (named.value === \"\" || !url) throw fail(source, 0, m.sourceShape);\n return { name: named.value, url: urlOf(source, \"url\", url, m) };\n}\n\nexport const reading: BlockReading<SourceMessages> = {\n read: {\n source: (source, state) => {\n state.inStep(source).sources.push(readSource(source, state.m));\n },\n },\n print: { step: (step) => (step.sources ?? []).map((s) => `source ${name(s.name)}${attrs([[\"url\", s.url]])}`) },\n messages: {\n ja: { sourceShape: \"source は source <名前> [url: <URL>] の形で書く\" },\n en: { sourceShape: \"Write a source as source <name> [url: <URL>]\" },\n },\n};\n","/**\n * `step` のブロックの読み方 (#3349)。読む処理と書き戻す処理と日英の誤りの文を、入口に置く定義 (`block.ts`) と分けて持つ。\n * 軽い入口は、後から読む図の種類の個別ブロックの読み方を、書いた図が使う時に読む\n */\nimport type { Messages } from \"../../messages\";\nimport { type Attr, fail, isOneOf, list } from \"../../read-kit\";\nimport type { Step, ViewMode } from \"../../schema\";\nimport type { SourceLine } from \"../../tokenize\";\nimport type { BlockReading, ParseState, StepDraft } from \"../block\";\nimport { VIEWS } from \"./block\";\n\nexport interface StepMessages {\n noBody: (title: string) => string;\n emptyStepTitle: string;\n noSteps: string;\n emptySay: string;\n sayTwice: string;\n codeTwice: string;\n emptyCode: string;\n badView: string;\n}\n\n/** 最初の行の `view:` の値。知らない見せ方は誤りで止める */\nexport function viewOf(head: SourceLine, shown: Attr | undefined, m: Messages): ViewMode | undefined {\n if (shown && !isOneOf(VIEWS, shown.value)) throw fail(head, shown.at, m.badView);\n return shown?.value as ViewMode | undefined;\n}\n\n/** 読み終えた段。本文 (`say` の行) の無い段は、段の行を示して誤りで止める */\nexport function stepOf(draft: StepDraft, m: Messages): Step {\n if (draft.body === undefined) throw fail(draft.source, 0, m.noBody(draft.title));\n return {\n title: draft.title,\n body: draft.body.join(\"\\n\"),\n ...(draft.code !== undefined ? { code: draft.code } : {}),\n ...(draft.sources.length > 0 ? { sources: draft.sources } : {}),\n events: draft.events,\n };\n}\n\n/**\n * `say` の行と、その下に `say` より深く字下げして続けた行を段の本文にする。\n * 続きの行の間の空行は本文の空の行になる。返すのは読み終えた続きの行の数 (最後の本文の行まで)\n */\nfunction readSay(source: SourceLine, state: ParseState, after: (offset: number) => SourceLine | undefined): number {\n const step = state.inStep(source);\n if (step.body !== undefined) throw fail(source, 0, state.m.sayTwice);\n const inline = source.text.slice(\"say\".length).trim();\n const body = inline === \"\" ? [] : [inline];\n let blanks = 0;\n let read = 0;\n for (let offset = 1; ; offset++) {\n const next = after(offset);\n if (!next) break;\n if (next.text === \"\") {\n blanks++;\n continue;\n }\n if (next.indent <= source.indent) break;\n body.push(...Array.from({ length: blanks }, () => \"\"), next.text);\n blanks = 0;\n read = offset;\n }\n if (body.length === 0) throw fail(source, 0, state.m.emptySay);\n step.body = body;\n return read;\n}\n\nexport const reading: BlockReading<StepMessages> = {\n read: {\n // 前の段を閉じてから、題を確かめて次の段を書き始める\n step: (source, state) => {\n state.closeStep();\n const title = source.text.slice(\"step\".length).trim();\n if (title === \"\") throw fail(source, 0, state.m.emptyStepTitle);\n state.openStep({ source, title, sources: [], events: [] });\n },\n say: readSay,\n code: (source, state) => {\n const step = state.inStep(source);\n if (step.code !== undefined) throw fail(source, 0, state.m.codeTwice);\n const command = source.text.slice(\"code\".length).trim();\n if (command === \"\") throw fail(source, 0, state.m.emptyCode);\n step.code = command;\n },\n },\n print: {\n step: (step) => {\n const body = step.body.split(\"\\n\");\n return [\n ...(body.length === 1 ? [`say ${step.body}`] : [\"say\", ...body.map((line) => (line === \"\" ? \"\" : ` ${line}`))]),\n ...(step.code === undefined ? [] : [`code ${step.code}`]),\n ];\n },\n },\n messages: {\n ja: {\n noBody: (title) => `段「${title}」に本文 (say の行) が要る`,\n emptyStepTitle: \"step の後ろに段の題を書く\",\n noSteps: \"段 (step の行) を 1 つ以上書く\",\n emptySay: \"say の後ろか、その下に字下げした行に段の本文を書く\",\n sayTwice: \"1 つの段に say は 1 つまで。長い本文は say の下に字下げして続ける\",\n codeTwice: \"1 つの段に code は 1 行まで\",\n emptyCode: \"code の後ろに命令を書く\",\n badView: `view は ${list(VIEWS)} のどれか`,\n },\n en: {\n noBody: (title) => `Step \"${title}\" needs a body (a say line)`,\n emptyStepTitle: \"Write a title after step\",\n noSteps: \"Write at least one step (a step line)\",\n emptySay: \"Write the step body after say, or on indented lines below it\",\n sayTwice: \"A step takes one say. Continue a long body on indented lines below it\",\n codeTwice: \"A step takes at most one code line\",\n emptyCode: \"Write the command after code\",\n badView: `view is one of ${list(VIEWS)}`,\n },\n },\n};\n","/**\n * `strip` のブロックの読み方 (#3349)。読む処理と書き戻す処理と日英の誤りの文を、入口に置く定義 (`block.ts`) と分けて持つ。\n * 軽い入口は、後から読む図の種類の個別ブロックの読み方を、書いた図が使う時に読む\n */\nimport { attrs, name, quote } from \"../../print-kit\";\nimport { fail, readAttrs, readList, readName, readQuoted, skipSpaces } from \"../../read-kit\";\nimport type { DiagramEvent } from \"../../schema\";\nimport type { SourceLine } from \"../../tokenize\";\nimport type { BlockReading, ParseState } from \"../block\";\nimport { SET_ATTRS, STRIP_ATTRS } from \"./block\";\n\nexport interface StripMessages {\n stripTwice: string;\n stripShape: string;\n emptyStripField: string;\n stripUndeclared: string;\n noSuchField: (field: string) => string;\n stripNeedsValue: string;\n badRatio: string;\n /** 物差しの欄 `field` の値が割合でない */\n meterValue: (field: string) => string;\n}\n\n/** 割合。原本の JSON の割合の形と同じ */\nconst RATIO = /^([0-9]+\\/[0-9]+|[0-9]+(\\.[0-9]+)?%)$/u;\n\n/** 書き戻す時に `:` の前に置く字 (帯の題と、`set` の欄) */\nconst keyText = (text: string): string => (text.includes(\":\") || text.includes(\"[\") || text.startsWith('\"') ? quote(text) : text);\n\n/** 書き戻す時に `strip` の行に `,` で並べる欄。時間軸の図の欄は後ろに物差しの属性を書けるので、`[` を含む名前も囲む */\nconst fieldText = (text: string, time: boolean): string => (text.includes(\",\") || text.startsWith('\"') || (time && text.includes(\"[\")) ? quote(text) : text);\n\n/** `strip <題>: <欄>, <欄>` の行 */\nfunction readStrip(source: SourceLine, state: ParseState): void {\n const { m, figure } = state;\n state.beforeSteps(source);\n if (figure.strip) throw fail(source, 0, m.stripTwice);\n const text = source.text;\n const start = skipSpaces(text, \"strip\".length);\n let stripTitle: string;\n let colon: number;\n if (text[start] === '\"') {\n const quoted = readQuoted(source, start, m);\n stripTitle = quoted.value;\n colon = skipSpaces(text, quoted.end);\n } else {\n colon = text.indexOf(\":\", start);\n stripTitle = colon < 0 ? \"\" : text.slice(start, colon).trim();\n }\n if (stripTitle === \"\" || text[colon] !== \":\") throw fail(source, 0, m.stripShape);\n if (state.kind === \"time\") {\n figure.strip = { title: stripTitle, fields: readFields(source, colon + 1, state) };\n return;\n }\n const fields = readList(source, colon + 1, m);\n // 物差しは時間軸の図だけが書ける。ほかの図では欄の名前の一部として読んでいた形なので、欄が属性の形で終わる時だけ断る\n const metered = /\\[\\s*meter\\s*:/u.exec(text);\n if (metered && fields.some((f) => /\\[\\s*meter\\s*:[^\\]]*\\]$/u.test(f))) throw fail(source, metered.index + 1, m.timeOnly(\"meter\"));\n figure.strip = { title: stripTitle, fields };\n}\n\n/**\n * 時間軸の図の `strip` の行の欄。`,` で区切り、欄の名前の後ろに `[meter: <割合>]` を書いた欄は物差しにする。\n * `[` を含む名前は `\"` で囲む\n */\nfunction readFields(source: SourceLine, at: number, state: ParseState): string[] {\n const { m, figure } = state;\n const text = source.text;\n const items: string[] = [];\n for (let i = at; ; ) {\n const start = skipSpaces(text, i);\n let value: string;\n let end: number;\n if (text[start] === '\"') {\n const quoted = readQuoted(source, start, m);\n value = quoted.value;\n end = skipSpaces(text, quoted.end);\n } else {\n end = start;\n while (end < text.length && text[end] !== \",\" && text[end] !== \"[\") end++;\n value = text.slice(start, end).trim();\n }\n if (value === \"\") throw fail(source, start, m.emptyStripField);\n if (text[end] === \"[\") {\n const close = text.indexOf(\"]\", end);\n if (close < 0) throw fail(source, end, m.attrUnclosed);\n const inside = text.slice(end + 1, close);\n const inner = /^\\s*([a-z]*)\\s*:\\s*(.*?)\\s*$/u.exec(inside);\n if (!inner) throw fail(source, end + 1, m.attrNoColon(inside.trim()));\n const key = inner[1] ?? \"\";\n if (!STRIP_ATTRS.includes(key)) throw fail(source, end + 1, m.badAttr(key, STRIP_ATTRS));\n if (!RATIO.test(inner[2] ?? \"\")) throw fail(source, end + 1, m.badRatio);\n figure.meters.push({ field: value, line: inner[2] ?? \"\" });\n end = skipSpaces(text, close + 1);\n }\n if (end < text.length && text[end] !== \",\") throw fail(source, end, m.afterQuote);\n items.push(value);\n if (end >= text.length) return items;\n i = end + 1;\n }\n}\n\n/** `set <欄>: <値> [tag: <札>]` か `set <欄> [tag: <札>]` の行 */\nfunction readSet(source: SourceLine, state: ParseState): DiagramEvent {\n const { m, figure } = state;\n const declared = figure.strip;\n if (!declared) throw fail(source, 0, m.stripUndeclared);\n const text = source.text;\n const start = skipSpaces(text, \"set\".length);\n let field: string;\n let at: number;\n if (text[start] === '\"') {\n const quoted = readQuoted(source, start, m);\n field = quoted.value;\n at = skipSpaces(text, quoted.end);\n } else {\n at = start;\n while (at < text.length && text[at] !== \":\" && text[at] !== \"[\") at++;\n field = text.slice(start, at).trim();\n }\n if (!declared.fields.includes(field)) throw fail(source, start, m.noSuchField(field));\n let value: string | undefined;\n if (text[at] === \":\") {\n const named = readName(source, at + 1, m);\n if (named.value === \"\") throw fail(source, at, m.stripNeedsValue);\n value = named.value;\n at = named.rest;\n }\n if (at < text.length && text[at] !== \"[\") throw fail(source, at, m.stripNeedsValue);\n const tag = at < text.length ? readAttrs(source, at, SET_ATTRS, m).get(\"tag\")?.value : undefined;\n if (value === undefined && tag === undefined) throw fail(source, 0, m.stripNeedsValue);\n if (value !== undefined && figure.meters.some((meter) => meter.field === field) && !RATIO.test(value)) throw fail(source, start, m.meterValue(field));\n return {\n type: \"strip\",\n field,\n ...(value !== undefined ? { value } : {}),\n ...(tag !== undefined ? { tag } : {}),\n };\n}\n\nexport const reading: BlockReading<StripMessages> = {\n read: {\n strip: (source, state) => {\n readStrip(source, state);\n },\n set: (source, state) => {\n state.inStep(source).events.push(readSet(source, state));\n },\n },\n print: {\n events: { strip: (e) => `set ${keyText(e.field)}${e.value === undefined ? \"\" : `: ${name(e.value)}`}${attrs([[\"tag\", e.tag]])}` },\n figure: (diagram) => {\n if (!diagram.strip) return [];\n const time = diagram.kind === \"time\";\n const meters = new Map((diagram.strip.meters ?? []).map((m) => [m.field, m.line]));\n const fields = diagram.strip.fields.map((f) => `${fieldText(f, time)}${attrs([[\"meter\", meters.get(f)]])}`);\n return [`strip ${keyText(diagram.strip.title)}: ${fields.join(\", \")}`];\n },\n },\n messages: {\n ja: {\n stripTwice: \"strip は 1 つだけ宣言する\",\n stripShape: \"strip は strip <題>: <欄>, <欄> の形で書く\",\n emptyStripField: \"strip の欄の名前が空\",\n stripUndeclared: \"set を書く前に、strip <題>: <欄>, <欄> で帯を宣言する\",\n noSuchField: (field) => `${field} という欄は strip に無い`,\n stripNeedsValue: \"set は set <欄>: <値> か set <欄> [tag: <札>] の形で書く\",\n badRatio: \"物差しの線は分数 (2/3) か百分率 (97%) で書く\",\n meterValue: (field) => `${field} は物差しの欄なので、値を分数 (2/3) か百分率 (97%) で書く`,\n },\n en: {\n stripTwice: \"Declare only one strip\",\n stripShape: \"Write a strip as strip <title>: <field>, <field>\",\n emptyStripField: \"A strip field name is empty\",\n stripUndeclared: \"Declare the strip as strip <title>: <field>, <field> before writing set\",\n noSuchField: (field) => `The strip has no field named ${field}`,\n stripNeedsValue: \"Write set as set <field>: <value> or set <field> [tag: <tag>]\",\n badRatio: \"Write the meter line as a fraction (2/3) or a percentage (97%)\",\n meterValue: (field) => `${field} is a meter, so write its value as a fraction (2/3) or a percentage (97%)`,\n },\n },\n};\n","// packages/dragon/scripts/build-blocks.mjs が置き場の dir から書き出した。手で直さない\nimport type { BlockReading } from \"./block\";\nimport { reading as actReading } from \"./act/read\";\nimport { reading as boxReading } from \"./box/read\";\nimport { reading as carryReading } from \"./carry/read\";\nimport { reading as colorReading } from \"./color/read\";\nimport { reading as edgeReading } from \"./edge/read\";\nimport { reading as edgeLabelReading } from \"./edge-label/read\";\nimport { reading as groupReading } from \"./group/read\";\nimport { reading as iconReading } from \"./icon/read\";\nimport { reading as lifelineReading } from \"./lifeline/read\";\nimport { reading as linkReading } from \"./link/read\";\nimport { reading as noteReading } from \"./note/read\";\nimport { reading as sourceReading } from \"./source/read\";\nimport { reading as stepReading } from \"./step/read\";\nimport { reading as stripReading } from \"./strip/read\";\n\n/** 入口が初めから持つ読み方。コアブロックと、後から読まない図の種類の個別ブロック。鍵は置き場の dir の名前 (#3349) */\nexport const ENTRY_READINGS: Readonly<Record<string, BlockReading>> = {\n \"act\": actReading,\n \"box\": boxReading,\n \"carry\": carryReading,\n \"color\": colorReading,\n \"edge\": edgeReading,\n \"edge-label\": edgeLabelReading,\n \"group\": groupReading,\n \"icon\": iconReading,\n \"lifeline\": lifelineReading,\n \"link\": linkReading,\n \"note\": noteReading,\n \"source\": sourceReading,\n \"step\": stepReading,\n \"strip\": stripReading,\n};\n","/**\n * ブロックの読み方の登録簿 (#3349)。\n *\n * 読む処理 (`parser.ts`) と書き戻す処理 (`printer.ts`) と誤りの文の表 (`messages.ts`) は、ブロックの読み方をここから引く。\n * 入口は初めから持つ読み方 (コアブロックと、後から読まない図の種類の個別ブロック、`entry-readings.ts`) を読み込みの時に登録する。\n * 全部入りの入口は残りの読み方も読み込みの時に登録し (`kinds/all.ts`)、軽い入口は書いた図が使う時に読んで登録する (`light.ts`)。\n * 登録した読み方は登録した順でなく、ブロックの並び (`rank`) の順に引く。\n */\nimport { type Block, type BlockReading, ranked } from \"./block\";\nimport { ENTRY_READINGS } from \"./entry-readings\";\nimport { BLOCKS } from \"./index\";\n\nconst registered = new Map<string, BlockReading>(Object.entries(ENTRY_READINGS));\n/** 登録が変わった回数。引いた表を作り直すかを、呼ぶ側がこの数で決める */\nlet changes = 0;\n\n/** ブロック `name` の読み方を登録する。同じブロックを 2 度登録しても、後の登録で替わるだけ */\nexport function registerReading(name: string, reading: BlockReading): void {\n registered.set(name, reading);\n changes += 1;\n}\n\n/** ブロック `name` の読み方を持っているか */\nexport const readingLoaded = (name: string): boolean => registered.has(name);\n\n/** ブロック `name` の読み方。持っていなければ `undefined` */\nexport const readingOf = (name: string): BlockReading | undefined => registered.get(name);\n\n/** 登録が変わった回数 */\nexport const readingChanges = (): number => changes;\n\n/** 持っている読み方を、ブロックの並び (`rank`) の順に、定義と組にして返す */\nexport function loadedReadings(): { block: Block; reading: BlockReading }[] {\n return ranked(BLOCKS as unknown as Record<string, Block>).flatMap((block) => {\n const reading = registered.get(block.name);\n return reading ? [{ block, reading }] : [];\n });\n}\n\n/**\n * `changes` が変わった時だけ `make` で作り直して返す、引いた表の入れ物。\n * 読み方を引いて作る表 (行の頭の語ごとの読む処理、書き戻す処理、誤りの文) は、登録が変わらない間は同じ表を使う\n */\nexport function cachedByReadings<T>(make: () => T): () => T {\n let made: { at: number; value: T } | undefined;\n return () => {\n if (!made || made.at !== changes) made = { at: changes, value: make() };\n return made.value;\n };\n}\n","// packages/dragon/scripts/build-blocks.mjs が置き場の dir から書き出した。手で直さない\nimport type { BlockReading } from \"./block\";\n\n/** 後から読む図の種類の個別ブロックの読み方を読む関数。鍵は置き場の dir の名前。軽い入口が書いた図が使う時に呼ぶ (#3349) */\nexport const LATER_READINGS: Readonly<Record<string, () => Promise<BlockReading>>> = {\n \"ask\": () => import(\"./ask/read\").then((m): BlockReading => m.reading),\n \"branch\": () => import(\"./branch/read\").then((m): BlockReading => m.reading),\n \"chain\": () => import(\"./chain/read\").then((m): BlockReading => m.reading),\n \"commit\": () => import(\"./commit/read\").then((m): BlockReading => m.reading),\n \"copy\": () => import(\"./copy/read\").then((m): BlockReading => m.reading),\n \"item\": () => import(\"./item/read\").then((m): BlockReading => m.reading),\n \"leaf\": () => import(\"./leaf/read\").then((m): BlockReading => m.reading),\n \"legend\": () => import(\"./legend/read\").then((m): BlockReading => m.reading),\n \"line\": () => import(\"./line/read\").then((m): BlockReading => m.reading),\n \"merge\": () => import(\"./merge/read\").then((m): BlockReading => m.reading),\n \"node\": () => import(\"./node/read\").then((m): BlockReading => m.reading),\n \"order\": () => import(\"./order/read\").then((m): BlockReading => m.reading),\n \"pick\": () => import(\"./pick/read\").then((m): BlockReading => m.reading),\n \"point\": () => import(\"./point/read\").then((m): BlockReading => m.reading),\n \"press\": () => import(\"./press/read\").then((m): BlockReading => m.reading),\n \"queue\": () => import(\"./queue/read\").then((m): BlockReading => m.reading),\n \"role\": () => import(\"./role/read\").then((m): BlockReading => m.reading),\n \"route\": () => import(\"./route/read\").then((m): BlockReading => m.reading),\n \"row\": () => import(\"./row/read\").then((m): BlockReading => m.reading),\n \"scale\": () => import(\"./scale/read\").then((m): BlockReading => m.reading),\n \"seal\": () => import(\"./seal/read\").then((m): BlockReading => m.reading),\n \"side-path\": () => import(\"./side-path/read\").then((m): BlockReading => m.reading),\n \"stamp\": () => import(\"./stamp/read\").then((m): BlockReading => m.reading),\n \"start-finish\": () => import(\"./start-finish/read\").then((m): BlockReading => m.reading),\n \"zoom\": () => import(\"./zoom/read\").then((m): BlockReading => m.reading),\n};\n","/**\n * 構成図の置き場所。\n *\n * 区画を上から帯に積み、帯の左に区画の名前を置く。箱は全ての帯で共通の列に並べるので、\n * 区画をまたぐ線は縦にまっすぐ走る。箱の並びは線を辿って決める。前の区画の箱から線が来る箱を\n * その箱の列に置き、そこから線で繋がる箱を隣の列へ (寄せの指示が左か右なら下の行へ) 置いていく。\n * 線は縦と横の折れ線で、間にある箱を避ける。名前が箱に掛かる時は帯を広げて名前の場所を空ける。\n */\nimport { LOOK, TYPE } from \"../../look/values\";\nimport type { DiagramModel, LabelSide, Region } from \"../../schema\";\nimport { textWidth } from \"../../layout/measure\";\nimport {\n badgeOnPath,\n badgeRect,\n boxColors,\n boxWidth,\n cornerBadge,\n edgeColor,\n edgesOf,\n labelStyle,\n type Layout,\n lineBadges,\n LOOP_ROOM,\n loopBadge,\n loopLabelBase,\n loopUnder,\n replaceSameSpot,\n layoutStrip,\n type Point,\n placeLabel,\n placeSlot,\n type Rect,\n regionColors,\n type SceneBox,\n type SceneEdge,\n type SceneLabel,\n type SceneRegion,\n seatCarriers,\n shiftContent,\n slotBoxWidth,\n slotRooms,\n stripNeed,\n} from \"../../layout/scene\";\n\ninterface Group {\n region?: Region;\n members: string[];\n}\n\ninterface Slot {\n group: number;\n col: number;\n row: number;\n}\n\ninterface Room {\n top: number;\n bottom: number;\n}\n\nexport function layoutArchitecture(diagram: DiagramModel): Layout {\n const groups = groupsOf(diagram);\n const slots = placeBoxes(diagram, groups);\n const rooms = groups.map(() => ({ top: 0, bottom: 0 }));\n let layout = arrange(diagram, groups, slots, rooms);\n // 名前を置く場所が帯の外へ出たら、その帯を広げて置き直す\n for (let pass = 0; pass < 3 && grow(layout, groups, slots, rooms); pass++) layout = arrange(diagram, groups, slots, rooms);\n return layout;\n}\n\nfunction groupsOf(diagram: DiagramModel): Group[] {\n const regions = diagram.regions ?? [];\n const known = new Set(regions.map((r) => r.id));\n const groups: Group[] = regions.map((region) => ({ region, members: diagram.boxes.filter((b) => b.region === region.id).map((b) => b.id) }));\n const loose = diagram.boxes.filter((b) => b.region === undefined || !known.has(b.region)).map((b) => b.id);\n if (loose.length > 0) groups.push({ members: loose });\n return groups;\n}\n\nconst vertical = (side: LabelSide | undefined): boolean => side === \"left\" || side === \"right\";\n\n/** 箱を列と行へ置く。列は全ての区画で共通。 */\nfunction placeBoxes(diagram: DiagramModel, groups: Group[]): Map<string, Slot> {\n const columns = LOOK.architecture.columns;\n const edges = edgesOf(diagram).map((e) => e.edge);\n const slots = new Map<string, Slot>();\n groups.forEach((group, g) => {\n const inGroup = new Set(group.members);\n const taken = new Set<string>();\n const free = (col: number, row: number): boolean => col >= 0 && col < columns && !taken.has(`${col},${row}`);\n const near = (col: number, row: number): [number, number] => {\n const start = Math.min(columns - 1, Math.max(0, col));\n for (let r = row; ; r++) {\n for (let d = 0; d < columns; d++) {\n for (const c of [start + d, start - d]) if (free(c, r)) return [c, r];\n }\n }\n };\n const put = (id: string, col: number, row: number): void => {\n slots.set(id, { group: g, col, row });\n taken.add(`${col},${row}`);\n };\n let dir = 1;\n const visit = (id: string): void => {\n for (const edge of edges) {\n const partner = edge.from === id ? edge.to : edge.to === id ? edge.from : undefined;\n if (partner === undefined || !inGroup.has(partner) || slots.has(partner)) continue;\n const me = slots.get(id) as Slot;\n const [c, r] = vertical(edge.labelSide) ? near(me.col, me.row + 1) : free(me.col + dir, me.row) ? [me.col + dir, me.row] : near(me.col + dir, me.row);\n put(partner, c, r);\n visit(partner);\n }\n };\n // 前の区画の箱と線で繋がる箱 (起きる順に早い線から) をその箱の列に置き、そこから辿る\n const anchorOf = (id: string): { order: number; col: number } | undefined => {\n for (let i = 0; i < edges.length; i++) {\n const edge = edges[i];\n const partner = edge?.from === id ? edge.to : edge?.to === id ? edge.from : undefined;\n const slot = partner === undefined ? undefined : slots.get(partner);\n if (slot && slot.group < g) return { order: i, col: slot.col };\n }\n return undefined;\n };\n let placed = 0;\n for (;;) {\n const rest = group.members.filter((id) => !slots.has(id));\n if (rest.length === 0) break;\n const anchored = rest.map((id) => ({ id, anchor: anchorOf(id) })).filter((a) => a.anchor !== undefined);\n anchored.sort((a, b) => (a.anchor?.order ?? 0) - (b.anchor?.order ?? 0));\n const pick = anchored[0] ?? { id: rest[0] as string, anchor: undefined };\n const want = pick.anchor?.col ?? 0;\n if (placed === 0) dir = want >= (columns - 1) / 2 ? -1 : 1;\n const [c, r] = free(want, 0) ? [want, 0] : near(want, 0);\n put(pick.id, c, r);\n visit(pick.id);\n placed++;\n }\n });\n // 使っていない列を詰める\n const used = [...new Set([...slots.values()].map((s) => s.col))].sort((a, b) => a - b);\n for (const slot of slots.values()) slot.col = used.indexOf(slot.col);\n return slots;\n}\n\n/** 区画の名前の行。空白があれば真ん中に近い空白で 2 行に折る。 */\nfunction nameLines(name: string): string[] {\n const spaces = [...name.matchAll(/ /g)].map((m) => m.index);\n if (spaces.length === 0) return [name];\n const at = spaces.reduce((best, i) => (Math.abs(i - name.length / 2) < Math.abs(best - name.length / 2) ? i : best));\n return [name.slice(0, at), name.slice(at + 1)];\n}\n\nfunction headerSize(region: Region): { w: number; h: number; lines: string[] } {\n const { icon, nameY, line, inset } = LOOK.region;\n const lines = nameLines(region.name);\n const w = Math.max(icon, ...lines.map((l) => textWidth(l, TYPE.regionName)), textWidth(region.note ?? \"\", TYPE.regionNote));\n // 名前の最後の行の下と、添え書きの下まで\n const h = nameY - inset + (lines.length - 1) * line + (region.note ? line : 0) + LOOK.gap / 2;\n return { w, h, lines };\n}\n\nfunction arrange(diagram: DiagramModel, groups: Group[], slots: Map<string, Slot>, rooms: Room[]): Layout {\n const { box: B, region: R, architecture: A, margin, gap } = LOOK;\n const colors = boxColors(diagram);\n const regionColor = regionColors(diagram);\n const edges = edgesOf(diagram);\n\n // 列の幅と列の間。隣の列を横に結ぶ名前のある線は、名前が収まるまで間を広げる (広げすぎる時は脇へ寄せる)\n const columnCount = Math.max(1, ...[...slots.values()].map((s) => s.col + 1));\n // 運ぶ物を出し入れする箱は、絵柄の横に置き場を並べられる幅にする (#3176)\n const carriedIn = slotRooms(diagram);\n const widths = new Map(diagram.boxes.map((b) => [b.id, Math.max(boxWidth(diagram, b.id, true), slotBoxWidth(carriedIn.get(b.id), b.icon !== undefined, B.padX))]));\n const colW = Array.from({ length: columnCount }, (_, c) => Math.max(B.minW, ...[...slots].filter(([, s]) => s.col === c).map(([id]) => widths.get(id) ?? B.minW)));\n const between = Array.from({ length: Math.max(0, columnCount - 1) }, () => A.columnGap as number);\n for (const { edge } of edges) {\n const a = slots.get(edge.from);\n const b = slots.get(edge.to);\n if (!a || !b || edge.label === undefined || a.group !== b.group || a.row !== b.row || Math.abs(a.col - b.col) !== 1 || vertical(edge.labelSide)) continue;\n const need = textWidth(edge.label, labelStyle(edge.label)) + LOOK.label.padX * 2 + A.labelRoom * 2;\n const i = Math.min(a.col, b.col);\n if (need <= A.maxColumnGap) between[i] = Math.max(between[i] ?? 0, need);\n }\n const headers = groups.map((g) => (g.region ? headerSize(g.region) : undefined));\n const headerW = Math.max(0, ...headers.map((h) => (h ? h.w + R.inset * 2 : 0)));\n const colLeft: number[] = [];\n for (let c = 0; c < columnCount; c++) colLeft.push(c === 0 ? margin + (headerW > 0 ? headerW : R.pad) : (colLeft[c - 1] as number) + (colW[c - 1] as number) + (between[c - 1] as number));\n const center = (c: number): number => (colLeft[c] as number) + (colW[c] as number) / 2;\n\n // 同じ箱へ戻る線は箱の下の輪で描くので、輪を持つ箱の行の下は、輪とその下の名前が収まるだけ空ける (#3186)\n const looped = new Set(edges.filter(({ edge }) => edge.from === edge.to).map(({ edge }) => edge.from));\n const loopRows = new Set([...looped].flatMap((id) => {\n const slot = slots.get(id);\n return slot ? [`${slot.group}:${slot.row}`] : [];\n }));\n const loopRoom = (g: number, row: number): number => (loopRows.has(`${g}:${row}`) ? LOOP_ROOM : 0);\n\n // 帯を上から積む\n const boxes: SceneBox[] = [];\n const bands: { group: number; y: number; h: number; rows: number }[] = [];\n let cursor = margin;\n groups.forEach((group, g) => {\n const rows = Math.max(1, ...group.members.map((id) => (slots.get(id)?.row ?? 0) + 1));\n const room = rooms[g] as Room;\n const top = cursor + R.pad + room.top;\n // 行の上端。輪を持つ行の下は、行の間に輪の分を足す\n const rowTop: number[] = [0];\n for (let r = 1; r < rows; r++) rowTop.push((rowTop[r - 1] as number) + B.h + A.rowGap + loopRoom(g, r - 1));\n for (const id of group.members) {\n const slot = slots.get(id) as Slot;\n const source = diagram.boxes.find((b) => b.id === id);\n const w = widths.get(id) ?? B.minW;\n const cx = center(slot.col);\n const y = top + (rowTop[slot.row] as number);\n boxes.push({\n id,\n name: source?.name ?? id,\n ...(source?.sub !== undefined ? { sub: source.sub } : {}),\n ...(source?.icon !== undefined ? { icon: source.icon } : {}),\n color: colors.get(id) ?? \"slate\",\n x: cx - w / 2,\n y,\n w,\n h: B.h,\n cx,\n cy: y + B.h / 2,\n });\n }\n const contentBottom = top + (rowTop[rows - 1] as number) + B.h + loopRoom(g, rows - 1);\n const header = headers[g];\n const h = Math.max(contentBottom + R.pad + room.bottom - cursor, header ? header.h + R.inset * 2 : 0, group.region ? R.minH : 0);\n bands.push({ group: g, y: cursor, h, rows });\n cursor += h + R.gap;\n });\n const bandsBottom = cursor - R.gap;\n for (const box of boxes) placeSlot(box, carriedIn.get(box.id));\n\n const byId = new Map(boxes.map((b) => [b.id, b]));\n const bandOf = (id: string) => bands[slots.get(id)?.group ?? 0] as (typeof bands)[number];\n /** 折れ線のどれかの区間が、四角を `pad` だけ広げた所に掛かる */\n const crosses = (points: Point[], rect: Rect, pad: number): boolean => {\n for (let i = 1; i < points.length; i++) {\n const [x1, y1] = points[i - 1] as Point;\n const [x2, y2] = points[i] as Point;\n if (Math.min(x1, x2) <= rect.x + rect.w + pad && Math.max(x1, x2) >= rect.x - pad && Math.min(y1, y2) <= rect.y + rect.h + pad && Math.max(y1, y2) >= rect.y - pad) return true;\n }\n return false;\n };\n // 輪を持つ箱の下の、輪と名前の置き場。ほかの線は、その箱から出る線と入る線も含めてここを通さない (#3186)\n const loopZones: Rect[] = [...looped].flatMap((id) => {\n const box = byId.get(id);\n return box ? [{ x: box.x, y: box.y + box.h, w: box.w, h: LOOP_ROOM }] : [];\n });\n const onLoop = (points: Point[]): boolean => loopZones.some((zone) => crosses(points, zone, 0));\n const blocked = (points: Point[], a: string, b: string): boolean =>\n boxes.some((box) => box.id !== a && box.id !== b && crosses(points, box, LOOK.label.search)) || onLoop(points);\n // 箱の下 (上) の、次の行か次の帯との間の真ん中。箱の下に輪が在る時は、輪と名前の下を通す (#3186)\n const laneBelow = (id: string): number => {\n const box = byId.get(id) as SceneBox;\n const band = bandOf(id);\n const slot = slots.get(id);\n const under = box.y + box.h + (slot ? loopRoom(slot.group, slot.row) : 0);\n return (slot?.row ?? 0) < band.rows - 1 ? under + A.rowGap / 2 : Math.min(under + R.pad / 2, band.y + band.h - LOOK.edge.inset);\n };\n const laneAbove = (id: string): number => {\n const box = byId.get(id) as SceneBox;\n const band = bandOf(id);\n return (slots.get(id)?.row ?? 0) > 0 ? box.y - A.rowGap / 2 : Math.max(box.y - R.pad / 2, band.y + LOOK.edge.inset);\n };\n const inset = LOOK.edge.inset;\n /** 列 `col` の右 (左) の、隣の列との間の真ん中。同じ列の箱は幅が違うので、箱ではなく列の端から測る (幅の広い箱の中を通さない) */\n const gapX = (col: number, toRight: boolean): number =>\n toRight ? (colLeft[col] as number) + (colW[col] as number) + (between[col] ?? A.columnGap) / 2 : (colLeft[col] as number) - (between[col - 1] ?? A.columnGap) / 2;\n const route = (from: string, to: string): Point[] => {\n const a = byId.get(from) as SceneBox;\n const b = byId.get(to) as SceneBox;\n // 同じ箱へ戻る線は、状態遷移図と同じ箱の下の輪で描く (#3186)\n if (from === to) return loopUnder(a);\n const sa = slots.get(from) as Slot;\n const sb = slots.get(to) as Slot;\n if (sa.group === sb.group && sa.row === sb.row) {\n const right = b.cx > a.cx;\n const straight: Point[] = [\n [right ? a.x + a.w : a.x, a.cy],\n [right ? b.x - inset : b.x + b.w + inset, b.cy],\n ];\n if (!blocked(straight, from, to)) return straight;\n const below = laneBelow(from);\n const under: Point[] = [\n [a.cx, a.y + a.h],\n [a.cx, below],\n [b.cx, below],\n [b.cx, b.y + b.h + inset],\n ];\n if (!onLoop(under)) return under;\n // 下を回ると輪を横切る時は、上を回る\n const above = laneAbove(from);\n const over: Point[] = [\n [a.cx, a.y],\n [a.cx, above],\n [b.cx, above],\n [b.cx, b.y - inset],\n ];\n return onLoop(over) ? under : over;\n }\n const down = b.cy > a.cy;\n const leave: Point = [a.cx, down ? a.y + a.h : a.y];\n const enter: Point = [b.cx, down ? b.y - inset : b.y + b.h + inset];\n if (sa.col === sb.col) {\n const straight: Point[] = [leave, enter];\n if (!blocked(straight, from, to)) return straight;\n const x = gapX(sa.col, true);\n return [\n [a.x + a.w, a.cy],\n [x, a.cy],\n [x, b.cy],\n [b.x + b.w + inset, b.cy],\n ];\n }\n const right = b.cx > a.cx;\n const lane = down ? laneBelow(from) : laneAbove(from);\n const candidates: Point[][] = [\n [leave, [a.cx, b.cy], [right ? b.x - inset : b.x + b.w + inset, b.cy]],\n [[right ? a.x + a.w : a.x, a.cy], [b.cx, a.cy], enter],\n [leave, [a.cx, lane], [b.cx, lane], enter],\n ];\n // 輪を持つ箱の下からは出入りしない。箱の脇から列の間へ出て、列の間を縦に走る (#3186)\n if (looped.has(from) || looped.has(to)) {\n const ax = gapX(sa.col, right);\n const bx = gapX(sb.col, !right);\n const out: Point[] = [\n [right ? a.x + a.w : a.x, a.cy],\n [ax, a.cy],\n ];\n const side: Point = [right ? b.x - inset : b.x + b.w + inset, b.cy];\n candidates.push(\n [...out, [ax, b.cy], side],\n [...out, [ax, lane], [b.cx, lane], enter],\n [leave, [a.cx, lane], [bx, lane], [bx, b.cy], side],\n [...out, [ax, lane], [bx, lane], [bx, b.cy], side],\n );\n }\n return candidates.find((points) => !blocked(points, from, to)) ?? (candidates[2] as Point[]);\n };\n\n const sceneEdges: SceneEdge[] = edges.map(({ step, event, edge }) => ({\n step,\n event,\n from: edge.from,\n to: edge.to,\n points: route(edge.from, edge.to),\n color: edgeColor(edge, colors),\n carry: edge.carry,\n }));\n // 運ぶ物は着いた箱の置き場に留まり、出る箱の置き場で走り出しを待つ (#3176)\n seatCarriers(sceneEdges, byId, carriedIn);\n // 同じ 2 つの箱を行きと帰りで結ぶまっすぐな線は、少しずらして重ならないようにする。\n // ずらした線の名前は、ずらした側 (もう一方の線の反対側) に置き、どちらの線の名前かを取り違えないようにする (#3175)\n const outward = new Map<SceneEdge, LabelSide>();\n for (const edge of sceneEdges) {\n if (edge.points.length !== 2) continue;\n const back = sceneEdges.some((other) => other.from === edge.to && other.to === edge.from && other.points.length === 2);\n if (!back) continue;\n const [p, q] = edge.points as [Point, Point];\n const flat = Math.abs(q[1] - p[1]) < Math.abs(q[0] - p[0]);\n const d = (edge.from < edge.to ? 1 : -1) * LOOK.edge.parallel;\n edge.points = edge.points.map(([x, y]) => (flat ? [x, y + d] : [x + d, y]));\n outward.set(edge, flat ? (d > 0 ? \"below\" : \"above\") : d > 0 ? \"right\" : \"left\");\n }\n\n const regions: SceneRegion[] = [];\n groups.forEach((group, g) => {\n const band = bands[g] as (typeof bands)[number];\n const header = headers[g];\n if (!group.region || !header) return;\n regions.push({\n id: group.region.id,\n lines: header.lines,\n ...(group.region.note !== undefined ? { note: group.region.note } : {}),\n ...(group.region.icon !== undefined ? { icon: group.region.icon } : {}),\n color: regionColor.get(group.region.id) ?? \"slate\",\n x: margin,\n y: band.y,\n w: 0,\n h: band.h,\n header: { x: margin + R.inset, y: band.y + R.inset, w: header.w, h: header.h },\n });\n });\n\n // 線の名前は、同じ時刻に見えている段の番号 (その段とそれより前の段の番号) も避ける (#3175)\n // 輪の番号は弧に重ねず弧の右に置く (#3186)\n const badgeAt = (edge: SceneEdge, taken: Point[], lines: Point[][]): Point => (edge.from === edge.to ? loopBadge(edge.points) : badgeOnPath(edge.points, taken, lines));\n const early = lineBadges(sceneEdges, diagram.steps.length, badgeAt);\n const labels: SceneLabel[] = [];\n for (const edge of sceneEdges) {\n const source = diagram.steps[edge.step]?.events[edge.event];\n if (source?.type !== \"edge\" || source.label === undefined) continue;\n const seen = [...early].filter(([s]) => s <= edge.step).map(([, b]) => badgeRect(b.point));\n const soft: Rect[] = [...regions.map((r) => r.header), ...labels.filter((l) => l.step === edge.step)];\n // 指示の無い線の名前は、空いていなければ反対の側も探す。ずらした線は自分の側だけを探す\n const side = source.labelSide ?? outward.get(edge);\n // 輪の名前は輪の下から探す (#3186)\n const below = edge.from === edge.to ? { side: \"below\" as const, base: loopLabelBase(edge.points, textWidth(source.label, labelStyle(source.label)) + LOOK.label.padX * 2) } : undefined;\n labels.push(\n placeLabel(\n { step: edge.step, event: edge.event, text: source.label, points: edge.points, color: edge.color, ...(below ?? (side ? { side } : { flip: true })) },\n { hard: boxes, soft, touch: seen },\n ),\n );\n }\n\n const layout: Layout = { kind: \"architecture\", width: 0, height: 0, regions, boxes, lifelines: [], edges: sceneEdges, labels, actions: [], badges: [], paths: [], ends: [] };\n // 名前が左へ出たら、帯の中身を右へ寄せる。帯は図の幅いっぱいに引き直す\n const shift = labels.length > 0 ? Math.max(0, margin + LOOK.label.soft - Math.min(...labels.map((l) => l.x))) : 0;\n if (shift > 0) shiftContent(layout, shift, 0);\n const contentRight = Math.max(...boxes.map((b) => b.x + b.w + R.pad), ...labels.map((l) => l.x + l.w + LOOK.label.soft), ...sceneEdges.flatMap((e) => e.points.map((p) => p[0] + R.pad)));\n const width = Math.max(contentRight + margin, stripNeed(diagram) + margin * 2);\n for (const region of regions) region.w = width - margin * 2;\n // 箱の下を回る線の名前は帯の下へ出ることがあるので、名前の下端まで図に入れる (#3176)\n const contentBottom = Math.max(bandsBottom, ...labels.map((l) => l.y + l.h));\n const strip = layoutStrip(diagram, margin, contentBottom + gap, width - margin * 2);\n layout.width = width;\n layout.height = (strip ? strip.y + strip.h : contentBottom) + margin;\n if (strip) layout.strip = strip;\n const lines = lineBadges(sceneEdges, diagram.steps.length, badgeAt);\n // 同じ所に置いた番号は、後の段が始まると入れ替える (#3184)\n layout.badges = replaceSameSpot(\n diagram.steps.map((step, s) => {\n const line = lines.get(s);\n if (!line) return cornerBadge(step.events, s, layout);\n return { step: s, x: line.point[0], y: line.point[1], color: line.edge.color };\n }),\n );\n return layout;\n}\n\n/** 区画の中を結ぶ線の名前が帯の外へ出ていたら、その分だけ帯の上か下を広げる。広げたら true。 */\nfunction grow(layout: Layout, groups: Group[], slots: Map<string, Slot>, rooms: Room[]): boolean {\n let grown = false;\n const soft = LOOK.label.soft;\n for (const label of layout.labels) {\n const edge = layout.edges.find((e) => e.step === label.step && e.event === label.event);\n const a = edge && slots.get(edge.from);\n const b = edge && slots.get(edge.to);\n if (!a || !b || a.group !== b.group || !groups[a.group]?.region) continue;\n const region = layout.regions.find((r) => r.id === groups[a.group]?.region?.id);\n const room = rooms[a.group];\n if (!region || !room) continue;\n const over = region.y + soft - label.y;\n const under = label.y + label.h - (region.y + region.h - soft);\n if (over > 0) {\n room.top += over;\n grown = true;\n }\n if (under > 0) {\n room.bottom += under;\n grown = true;\n }\n }\n return grown;\n}\n","/**\n * 構成図 (`architecture`) の定義 (#3345)。\n * 区画を上から帯に積み、箱を全ての帯で共通の列に並べて、線を縦と横の折れ線で引く。5 つの付け方を全て受け付ける\n */\nimport type { EagerKind } from \"../kind\";\nimport { layoutArchitecture } from \"./layout\";\n\nexport const kind: EagerKind = {\n name: \"architecture\",\n accepts: [\"place\", \"connect\", \"ride-on-line\", \"attach-to-box\", \"attach-to-figure\"],\n layout: layoutArchitecture,\n};\n","/**\n * 枝分かれの図 (`git`) の定義 (#3347)。\n * 枝を上から帯に積み、commit を左から積んで、枝の分かれと取り込みと当て直しを線で結ぶ。5 つの付け方を全て受け付ける。\n * 見本帳を開いた時に読まない図の種類なので、並べ方 (`layout.ts`) を読まずに後から読むと名乗る\n */\nimport type { Kind } from \"../kind\";\n\nexport const kind: Kind = {\n name: \"git\",\n accepts: [\"place\", \"connect\", \"ride-on-line\", \"attach-to-box\", \"attach-to-figure\"],\n later: true,\n};\n","/**\n * 列の図 (`lineup`) の定義 (#3348)。\n * 箱を列にして、チップを段ごとに並べ直す。線を持たないので、つなぐと線に乗るの付け方を受け付けず、置く、箱に付く、図に付くの 3 つを受け付ける。\n * 見本帳を開いた時に読まない図の種類なので、並べ方 (`layout.ts`) を読まずに後から読むと名乗る\n */\nimport type { Kind } from \"../kind\";\n\nexport const kind: Kind = {\n name: \"lineup\",\n accepts: [\"place\", \"attach-to-box\", \"attach-to-figure\"],\n later: true,\n};\n","/**\n * 時系列図の置き場所。\n *\n * 生存線の頭の箱を上に横 1 列に並べ、段で起きる線と処理を起きる順に 1 行ずつ下へ積む。\n * 生存線の間は、箱の幅と、その間を走る線の名前が収まる幅を取る。中身の帯は一番下に置く。\n */\nimport { LOOK, TYPE } from \"../../look/values\";\nimport type { DiagramModel } from \"../../schema\";\nimport { textWidth } from \"../../layout/measure\";\nimport {\n carrierHalf,\n badgeRect,\n boxColors,\n cornerBadge,\n boxWidth,\n edgeColor,\n labelStyle,\n type Layout,\n lineBadges,\n replaceSameSpot,\n layoutStrip,\n type Point,\n placeLabel,\n type SceneAction,\n type SceneBadge,\n type SceneBox,\n type SceneEdge,\n type SceneLabel,\n shiftContent,\n stripNeed,\n} from \"../../layout/scene\";\n\nexport function layoutSequence(diagram: DiagramModel): Layout {\n const { box: B, sequence: Q, label: L, margin, gap } = LOOK;\n const colors = boxColors(diagram);\n const listed = diagram.sequence?.lifelines ?? [];\n const order = [...listed, ...diagram.boxes.map((b) => b.id).filter((id) => !listed.includes(id))];\n const column = new Map(order.map((id, i) => [id, i]));\n const widths = order.map((id) => boxWidth(diagram, id, false));\n\n // 生存線の間。隣の箱どうしの隙間を取り、名前のある線が走る間は名前が収まるまで広げる\n const spacing = widths.slice(1).map((w, i) => (widths[i] as number) / 2 + w / 2 + Q.columnGap);\n const needs: { from: number; to: number; need: number }[] = [];\n for (const step of diagram.steps) {\n for (const event of step.events) {\n if (event.type !== \"edge\" || event.label === undefined) continue;\n const a = column.get(event.from) ?? 0;\n const b = column.get(event.to) ?? 0;\n const w = textWidth(event.label, labelStyle(event.label)) + L.padX * 2;\n if (a === b) {\n // 自分へ戻る線は名前を右に置くので、右の生存線までに輪と名前が収まる幅を取る\n if (a < spacing.length) needs.push({ from: a, to: a + 1, need: Q.selfW + L.side + w + Q.labelRoom });\n } else {\n needs.push({ from: Math.min(a, b), to: Math.max(a, b), need: w + Q.labelRoom * 2 });\n }\n }\n }\n needs.sort((x, y) => x.to - x.from - (y.to - y.from));\n for (const { from, to, need } of needs) {\n let have = 0;\n for (let i = from; i < to; i++) have += spacing[i] ?? 0;\n if (have >= need) continue;\n const add = (need - have) / (to - from);\n for (let i = from; i < to; i++) spacing[i] = (spacing[i] ?? 0) + add;\n }\n const xs: number[] = [];\n order.forEach((_, i) => xs.push(i === 0 ? margin + (widths[0] as number) / 2 : (xs[i - 1] as number) + (spacing[i - 1] as number)));\n\n const boxes: SceneBox[] = order.map((id, i) => {\n const source = diagram.boxes.find((b) => b.id === id);\n const w = widths[i] as number;\n const cx = xs[i] as number;\n return {\n id,\n name: source?.name ?? id,\n ...(source?.sub !== undefined ? { sub: source.sub } : {}),\n ...(source?.icon !== undefined ? { icon: source.icon } : {}),\n color: colors.get(id) ?? \"slate\",\n x: cx - w / 2,\n y: margin,\n w,\n h: B.h,\n cx,\n cy: margin + B.h / 2,\n };\n });\n const headBottom = margin + B.h;\n\n // 行を積む。線は上か下に名前を、処理は札を持つので、行ごとに上下に要る高さが違う\n const edges: SceneEdge[] = [];\n const actions: SceneAction[] = [];\n const requests: Parameters<typeof placeLabel>[0][] = [];\n let y = headBottom + Q.firstRow;\n let below = 0;\n let first = true;\n diagram.steps.forEach((step, s) => {\n step.events.forEach((event, e) => {\n if (event.type !== \"edge\" && event.type !== \"action\") return;\n let above: number;\n let under: number;\n if (event.type === \"edge\") {\n const side = event.labelSide ?? \"above\";\n const self = event.from === event.to;\n const named = event.label !== undefined;\n above = named && side === \"above\" ? Q.labelOffset + L.h / 2 : gap;\n under = self ? Q.selfH + gap : named && side === \"below\" ? Q.labelOffset + L.h / 2 : gap;\n } else {\n above = LOOK.action.h / 2;\n under = LOOK.action.h / 2;\n }\n y = first ? y + above : y + Math.max(Q.minPitch, below + Q.rowGap + above) + (e === 0 && s > 0 ? Q.stepGap : 0);\n first = false;\n below = under;\n\n if (event.type === \"edge\") {\n const xf = xs[column.get(event.from) ?? 0] as number;\n const xt = xs[column.get(event.to) ?? 0] as number;\n const dir = Math.sign(xt - xf) || 1;\n const points: Point[] =\n xf === xt\n ? [\n [xf, y],\n [xf + Q.selfW, y],\n [xf + Q.selfW, y + Q.selfH],\n [xf + LOOK.edge.inset, y + Q.selfH],\n ]\n : [\n [xf, y],\n [xt - dir * LOOK.edge.inset, y],\n ];\n const color = edgeColor(event, colors);\n // 運ぶ物は着いた生存線の向こう側に留まって矢印の先を隠さず、出る生存線の手前側で走り出しを待って段の番号を隠さない (#3176)\n const seats: Pick<SceneEdge, \"settle\" | \"wait\"> = {};\n if (event.carry.kind !== \"none\") {\n const reach = LOOK.slot.lifeline + carrierHalf(event.carry)[0];\n const [p0, p1] = points as [Point, Point];\n const [q0, q1] = points.slice(-2) as [Point, Point];\n const out = Math.sign(p1[0] - p0[0]) || 1;\n const into = Math.sign(q1[0] - q0[0]) || -1;\n seats.wait = [xf - out * reach, p0[1]];\n seats.settle = [xt + into * reach, q1[1]];\n }\n edges.push({ step: s, event: e, from: event.from, to: event.to, points, color, carry: event.carry, ...seats });\n if (event.label !== undefined) {\n requests.push({\n step: s,\n event: e,\n text: event.label,\n points,\n color,\n ...(event.labelSide ? { side: event.labelSide } : xf === xt ? { side: \"right\" as const } : {}),\n offset: Q.labelOffset,\n });\n }\n } else {\n // 札は生存線の上の番号の丸を隠さないよう、丸の右に出す (#3017)\n const x = xs[column.get(event.box) ?? 0] as number;\n const w = textWidth(event.label, TYPE.action) + LOOK.action.padX * 2;\n actions.push({ step: s, event: e, box: event.box, text: event.label, color: colors.get(event.box) ?? \"slate\", x: x + LOOK.badge.r + 4, y: y - LOOK.action.h / 2, w, h: LOOK.action.h });\n }\n });\n });\n const bottom = (first ? headBottom : y + below) + Q.tail;\n const lifelines = order.map((id, i) => ({ id, x: xs[i] as number, y1: headBottom, y2: bottom }));\n\n // 線の名前は、同じ時刻に見えている段の番号 (その段とそれより前の段の番号) も避ける (#3175)\n const early = lineBadges(edges, diagram.steps.length);\n const labels: SceneLabel[] = [];\n for (const request of requests) {\n const seen = [...early].filter(([s]) => s <= request.step).map(([, b]) => badgeRect(b.point));\n const soft = [...labels.filter((l) => l.step === request.step), ...actions];\n labels.push(placeLabel(request, { hard: boxes, soft, touch: seen }));\n }\n\n const layout: Layout = { kind: \"sequence\", width: 0, height: 0, regions: [], boxes, lifelines, edges, labels, actions, badges: [], paths: [], ends: [] };\n\n // 図の幅。名前が左に出たら全体を右へ寄せ、右端は一番右の物に余白を足した所\n const lefts = [...boxes.map((b) => b.x), ...labels.map((l) => l.x), ...actions.map((a) => a.x)];\n const shift = Math.max(0, margin - Math.min(...lefts));\n if (shift > 0) shiftContent(layout, shift, 0);\n const rights = [...boxes.map((b) => b.x + b.w), ...labels.map((l) => l.x + l.w), ...actions.map((a) => a.x + a.w), ...edges.flatMap((edge) => edge.points.map((p) => p[0]))];\n const width = Math.max(Math.max(...rights) + margin, stripNeed(diagram) + margin * 2);\n const strip = layoutStrip(diagram, margin, bottom + gap, width - margin * 2);\n layout.width = width;\n layout.height = (strip ? strip.y + strip.h : bottom) + margin;\n if (strip) layout.strip = strip;\n layout.badges = badges(diagram, layout);\n return layout;\n}\n\n/**\n * 段の番号。その段の最初の線の始まりに置き、線が無ければ処理する箱の生存線の上、無ければ書き換わる箱の角。\n * 処理の札はその段の終わりに消えるので、札に付けると止め絵で丸だけが浮く (#3017)。\n */\nfunction badges(diagram: DiagramModel, layout: Layout): SceneBadge[] {\n const lines = lineBadges(layout.edges, diagram.steps.length);\n const placed = diagram.steps.map((step, s): SceneBadge => {\n const line = lines.get(s);\n if (line) return { step: s, x: line.point[0], y: line.point[1], color: line.edge.color };\n const action = layout.actions.find((a) => a.step === s);\n const lifeline = action && layout.lifelines.find((l) => l.id === action.box);\n if (action && lifeline) return { step: s, x: lifeline.x, y: action.y + action.h / 2, color: action.color };\n return cornerBadge(step.events, s, layout);\n });\n // 同じ所に置いた番号は、後の段が始まると入れ替える (#3184)\n return replaceSameSpot(placed);\n}\n","/**\n * 時系列図 (`sequence`) の定義 (#3345)。\n * 箱を生存線の頭に横 1 列に置き、線と処理を段の順に上から積む。5 つの付け方を全て受け付ける\n */\nimport type { EagerKind } from \"../kind\";\nimport { layoutSequence } from \"./layout\";\n\nexport const kind: EagerKind = {\n name: \"sequence\",\n accepts: [\"place\", \"connect\", \"ride-on-line\", \"attach-to-box\", \"attach-to-figure\"],\n layout: layoutSequence,\n};\n","/**\n * 状態遷移図 (`state`) の定義 (#3347)。\n * 1 つの物が状態を移る様子を、辿った順に状態の箱を並べて追う。5 つの付け方を全て受け付ける。\n * 見本帳を開いた時に読まない図の種類なので、並べ方 (`layout.ts`) を読まずに後から読むと名乗る\n */\nimport type { Kind } from \"../kind\";\n\nexport const kind: Kind = {\n name: \"state\",\n accepts: [\"place\", \"connect\", \"ride-on-line\", \"attach-to-box\", \"attach-to-figure\"],\n later: true,\n};\n","/**\n * 時間軸の図 (`time`) の定義 (#3348)。\n * 時間軸に目盛りを並べ、針を決まった速さで進めて、印の列と節目と拡大の帯の箱を時刻に合わせて動かす。5 つの付け方を全て受け付ける。\n * 見本帳を開いた時に読まない図の種類なので、並べ方 (`layout.ts`) を読まずに後から読むと名乗る\n */\nimport type { Kind } from \"../kind\";\n\nexport const kind: Kind = {\n name: \"time\",\n accepts: [\"place\", \"connect\", \"ride-on-line\", \"attach-to-box\", \"attach-to-figure\"],\n later: true,\n};\n","/**\n * 木の図 (`tree`) の定義 (#3348)。\n * 段ごとに葉を出し、子から親を組んで、根まで木の線で結ぶ。5 つの付け方を全て受け付ける。\n * 見本帳を開いた時に読まない図の種類なので、並べ方 (`layout.ts`) を読まずに後から読むと名乗る\n */\nimport type { Kind } from \"../kind\";\n\nexport const kind: Kind = {\n name: \"tree\",\n accepts: [\"place\", \"connect\", \"ride-on-line\", \"attach-to-box\", \"attach-to-figure\"],\n later: true,\n};\n","/**\n * 試す図 (`try`) の定義 (#3337、#3348)。\n * 部品 (網、待ち行列、機械の列、釦、入力の帯) を上から積み、読み手が値を入れて動かす。箱と線を持たないので、置くと図に付くの 2 つを受け付ける。\n * 箱と段と出典と中身の帯は、置くか図に付く付け方でも試す図に描かないので、それぞれのブロックが付け方の `except` で断る。\n * 見本帳を開いた時に読まない図の種類なので、並べ方 (`layout.ts`) を読まずに後から読むと名乗る\n */\nimport type { Kind } from \"../kind\";\n\nexport const kind: Kind = {\n name: \"try\",\n accepts: [\"place\", \"attach-to-figure\"],\n later: true,\n};\n","// packages/dragon/scripts/build-blocks.mjs が置き場の dir から書き出した。手で直さない\nimport { kind as architectureKind } from \"./architecture/kind\";\nimport { kind as gitKind } from \"./git/kind\";\nimport { kind as lineupKind } from \"./lineup/kind\";\nimport { kind as sequenceKind } from \"./sequence/kind\";\nimport { kind as stateKind } from \"./state/kind\";\nimport { kind as timeKind } from \"./time/kind\";\nimport { kind as treeKind } from \"./tree/kind\";\nimport { kind as tryKind } from \"./try/kind\";\n\n/** 置き場を持つ図の種類の一覧。鍵は置き場の dir の名前 */\nexport const KIND_FOLDERS = {\n \"architecture\": architectureKind,\n \"git\": gitKind,\n \"lineup\": lineupKind,\n \"sequence\": sequenceKind,\n \"state\": stateKind,\n \"time\": timeKind,\n \"tree\": treeKind,\n \"try\": tryKind,\n} as const;\n","/**\n * ブロックを使える図の種類 (#3348)。\n *\n * 図の種類は受け付ける付け方 (`kinds/<種類>/kind.ts` の `accepts`) を持ち、ブロックは付け方を 1 つ名乗る (`blocks/<名前>/block.ts` の `attach`)。\n * ブロックを使える図の種類は、ブロックの付け方を受け付ける図の種類のうち、`only` に合い `except` に無い物で、手で書いた一覧を持たない。\n * 2 つ以上の図の種類で使えるブロックがコアブロック、1 つの図の種類だけで使えるブロックが個別ブロックになる。\n */\nimport { KIND_FOLDERS } from \"../kinds/index\";\nimport type { Kind } from \"../kinds/kind\";\nimport type { DiagramKind } from \"../schema\";\nimport type { Block } from \"./block\";\nimport { BLOCKS } from \"./index\";\n\n/** ブロックの付け方が図の種類に合うか。図の種類が付け方を受け付け、`only` が無いかその図の種類で、`except` にその図の種類が無い */\nexport const fits = (block: Block, kind: Kind): boolean =>\n kind.accepts.includes(block.attach.how) && (block.attach.only === undefined || block.attach.only === kind.name) && !(block.attach.except ?? []).includes(kind.name);\n\n/** 名前 `name` のブロックを使える図の種類。図の種類の置き場の一覧の順で返し、知らない名前は空 */\nexport function blockKinds(name: string): DiagramKind[] {\n const block = (BLOCKS as Readonly<Record<string, Block>>)[name];\n return block === undefined ? [] : Object.values(KIND_FOLDERS as Readonly<Record<string, Kind>>).filter((kind) => fits(block, kind)).map((kind) => kind.name);\n}\n","// packages/dragon/scripts/build-validator.mjs がブロックの形の欠片から書き出した。手で直さない\n\n/** 段の中で起きることの種類ごとの、その形の枝を持つブロックの名前 (#3349)。軽い入口が原本から書いた図が使うブロックを引く時に読む */\nexport const EVENT_OWNERS: Readonly<Record<string, string>> = {\n \"action\": \"act\",\n \"ask\": \"ask\",\n \"branch\": \"branch\",\n \"commit\": \"commit\",\n \"edge\": \"edge\",\n \"item\": \"ask\",\n \"leaf\": \"leaf\",\n \"line\": \"line\",\n \"mark\": \"row\",\n \"node\": \"node\",\n \"now\": \"scale\",\n \"open\": \"seal\",\n \"pick\": \"pick\",\n \"press\": \"press\",\n \"role\": \"role\",\n \"seal\": \"seal\",\n \"span\": \"scale\",\n \"stamp\": \"stamp\",\n \"strip\": \"strip\",\n \"swap\": \"note\",\n};\n","/**\n * 書いた図が使うブロック (#3349)。\n *\n * 軽い入口は、後から読む図の種類の個別ブロックの読み方を、書いた図が使う時だけ読む。読む前に、記法か原本から使うブロックの名前を引くのがこの file。\n * 行が使うブロックは、ブロックの定義 (`block.ts`) の宣言から引く。読む処理 (`parser.ts`) も同じ関数で行が使うブロックを引き、読んでいなければ止めるので、\n * 読む前に引いたブロックと、読む時に要るブロックが食い違わない。\n *\n * 1 つの行が使うブロックは次の 2 つ。\n * - 行の頭の語を持つブロック。ブロックを使える図の種類 (`usable.ts` の `fits`) の図に書いた時だけ数え、ほかの種類の図に書いた行は読み方を読まずに断る\n * - 定義の `lines` が行の形に当たるブロック (時間軸の図の針を進める行、状態遷移図の最初の段より前の線、試す図の `item` と `line` の行)\n *\n * 加えて、図の種類の決まりを持つブロック (定義の `always`) は、行が無くてもその種類の図なら使う。\n * 原本からは、`blocks` の欄の鍵 (ブロックの名前か、定義の `fields`) と、試す図の部品の種類と、段の中で起きることを書き戻すブロック (`eventOwners`) を引く。\n */\nimport { KIND_FOLDERS } from \"../kinds/index\";\nimport type { Kind } from \"../kinds/kind\";\nimport { isBlankOrComment, tokenize } from \"../tokenize\";\nimport type { Block, KindName, LineMatch, LineView } from \"./block\";\nimport { EDGE } from \"./edge/block\";\nimport { EVENT_OWNERS } from \"./event-owners\";\nimport { BLOCKS } from \"./index\";\nimport { fits } from \"./usable\";\n\nconst ALL = BLOCKS as unknown as Readonly<Record<string, Block>>;\nconst KINDS = KIND_FOLDERS as unknown as Readonly<Record<string, Kind>>;\n\n/** 原本の `blocks` の欄の鍵ごとの、その欄を持つブロック。鍵はブロックの名前か、定義の `fields` に書いた名前 */\nconst FIELD_OWNERS: ReadonlyMap<string, Block> = new Map(Object.values(ALL).flatMap((block) => [block.name, ...(block.fields ?? [])].map((key) => [key, block] as const)));\n\n/** 行の頭の語ごとの、その語を持つブロック */\nconst HEAD_OWNERS: ReadonlyMap<string, Block> = new Map(Object.values(ALL).flatMap((block) => (block.words.heads ?? []).map((head) => [head, block] as const)));\n\n/** 行の形。行の頭の語と 2 つ目の語と、線の行なら送る側の名札と、最初の `step` より後の行か */\nexport function lineView(text: string, inSteps: boolean): LineView {\n const edge = EDGE.exec(text);\n const [word = \"\", second] = text.split(/\\s+/u);\n return { word, ...(second !== undefined ? { second } : {}), ...(edge?.[1] !== undefined ? { edgeFrom: edge[1] } : {}), inSteps };\n}\n\n/** 行の形が宣言に当たるか。書いた欄が全て合う時に当たる。行の頭の語の宣言は線の行に当てない (名札が語と同じ綴りの線がある) */\nexport function matches(match: LineMatch, view: LineView): boolean {\n const isEdge = view.edgeFrom !== undefined;\n if (match.heads !== undefined && (isEdge || !match.heads.includes(view.word))) return false;\n if (match.edges !== undefined && (!isEdge || (match.edges === \"before-steps\" && view.inSteps))) return false;\n if (match.from !== undefined && view.edgeFrom !== match.from) return false;\n if (match.exceptFrom !== undefined && view.edgeFrom === match.exceptFrom) return false;\n if (match.second !== undefined && (isEdge || view.second !== match.second)) return false;\n return true;\n}\n\n/** 図の種類 `kind` の図で使えるブロック。ブロックの並び (`rank`) の順で、知らない種類は空 */\nfunction kindBlocks(kind: string): Block[] {\n const found = KINDS[kind];\n return found === undefined ? [] : Object.values(ALL).filter((block) => fits(block, found)).sort((a, b) => a.rank - b.rank);\n}\n\n/** 図の種類 `kind` の図の、形が `view` の行が使うブロックの名前 */\nexport function lineNeeds(view: LineView, kind: KindName): string[] {\n const found = KINDS[kind];\n if (found === undefined) return [];\n const out = new Set<string>();\n const owner = view.edgeFrom === undefined ? HEAD_OWNERS.get(view.word) : undefined;\n if (owner && fits(owner, found)) out.add(owner.name);\n for (const block of kindBlocks(kind)) if (block.lines?.some((match) => matches(match, view))) out.add(block.name);\n return [...out];\n}\n\n/** 図の種類 `kind` の図なら、行が無くても使うブロック (図の種類の決まりを持つ) */\nexport const kindNeeds = (kind: string): string[] => kindBlocks(kind).filter((block) => block.always === true).map((block) => block.name);\n\n/**\n * 図の種類 `kind` の図で、段の中で起きることの種類 `type` を書き戻すブロック。\n * その形の枝を持つブロック (`event-owners.ts`) が使える種類ならそのブロック、ほかに `type` の行を行の形で読むブロック (試す図の `line` は待ち行列のブロック)\n */\nexport function eventOwners(type: string, kind: string): string[] {\n const found = KINDS[kind];\n if (found === undefined) return [];\n const owner = ALL[EVENT_OWNERS[type] ?? \"\"];\n const readers = kindBlocks(kind).filter((block) => block.lines?.some((match) => match.heads?.includes(type)));\n return [...(owner && fits(owner, found) ? [owner.name] : []), ...readers.map((block) => block.name)];\n}\n\n/** 記法の図の種類。最初の空でない行の頭の語 */\nexport const kindOf = (text: string): string => tokenize(text).find((source) => !isBlankOrComment(source))?.text.split(/\\s/u)[0] ?? \"\";\n\n/** 記法から、書いた図が使うブロックの名前。最初の行が図の種類でなければ空 */\nfunction notationNeeds(text: string): string[] {\n const lines = tokenize(text).filter((source) => !isBlankOrComment(source));\n const kind = kindOf(text);\n if (KINDS[kind] === undefined) return [];\n const out = new Set(kindNeeds(kind));\n let inSteps = false;\n for (const source of lines.slice(1)) {\n const view = lineView(source.text, inSteps);\n for (const name of lineNeeds(view, kind as KindName)) out.add(name);\n if (view.edgeFrom === undefined && view.word === \"step\") inSteps = true;\n }\n return [...out];\n}\n\n/** 原本 (版2) の形のうち、使うブロックを引くのに読む欄 */\ninterface SourceShape {\n kind?: unknown;\n blocks?: Record<string, unknown>;\n steps?: { events?: { type?: unknown }[] }[];\n}\n\n/** 原本 (版2) から、書いた図が使うブロックの名前 */\nfunction sourceNeeds(source: SourceShape): string[] {\n const kind = typeof source.kind === \"string\" ? source.kind : \"\";\n const found = KINDS[kind];\n if (found === undefined) return [];\n const out = new Set(kindNeeds(kind));\n const add = (block: Block | undefined): void => {\n if (block) out.add(block.name);\n };\n // `blocks` の欄の鍵はブロックの名前か、定義の `fields` に書いた名前。使えない種類のブロックの欄は数えない (試す図のチップの欄 `item` は列の図のブロックの名前と同じ綴り)\n for (const key of Object.keys(source.blocks ?? {})) {\n const block = FIELD_OWNERS.get(key);\n if (block && fits(block, found)) add(block);\n }\n // 試す図の部品は、部品の種類と同じ名前のブロックが持つ\n const parts = source.blocks?.[\"part\"];\n if (Array.isArray(parts)) for (const part of parts as { type?: unknown }[]) add(typeof part.type === \"string\" ? ALL[part.type] : undefined);\n // 段の中で起きることは、その図の種類で書き戻すブロックが要る\n for (const step of source.steps ?? []) for (const event of step.events ?? []) if (typeof event.type === \"string\") for (const name of eventOwners(event.type, kind)) out.add(name);\n return [...out];\n}\n\n/**\n * 記法か原本 (版2) から、書いた図が使うブロックの名前。ブロックの並び (`rank`) の順で返す。\n * 版1の原本は呼ぶ側が版2へ移してから渡す\n */\nexport function blocksUsedBy(source: string | object): string[] {\n const names = new Set(typeof source === \"string\" ? notationNeeds(source) : sourceNeeds(source));\n return Object.values(ALL)\n .filter((block) => names.has(block.name))\n .sort((a, b) => a.rank - b.rank)\n .map((block) => block.name);\n}\n","/**\n * 図の種類ごとの描く部品の登録簿 (#3248)。\n *\n * 描く所 (`render/draw.ts`) は git、lineup、state、time、tree、try の部品をここから引く。\n * 全部入りの入口は読み込みの時に全ての種類を登録し (`all.ts`)、軽い入口は `loadKind` か `loadFor` が種類を読んだ時に登録する (`light.ts`)。\n * ブロックの読み方は別の登録簿 (`blocks/reading.ts`) が持ち、軽い入口は書いた図が使う個別ブロックの読み方を種類の部品と別に読む (#3349)。\n * 時系列図と構成図は図の種類の置き場 (`kinds/<種類>/`) に並べ方を持ち、登録せずに描く所が置き場の一覧 (`kinds/index.ts`) から引く (#3345)。\n */\nimport { FIGURE_TEXT } from \"../figure-text\";\nimport { DEFAULT_LANG, type NotationLang } from \"../words\";\nimport type * as git from \"./git\";\nimport type * as lineup from \"./lineup\";\nimport type * as state from \"./state\";\nimport type * as time from \"./time\";\nimport type * as tree from \"./tree\";\nimport type * as tryKind from \"./try\";\n\n/** 後から読む種類の名前。部品の型から導くと、部品の型が軽い入口の型の file へ漏れるので字で書く */\nexport type LaterKind = \"git\" | \"lineup\" | \"state\" | \"time\" | \"tree\" | \"try\";\n\nexport interface LaterKinds {\n git: typeof git;\n lineup: typeof lineup;\n state: typeof state;\n time: typeof time;\n tree: typeof tree;\n try: typeof tryKind;\n}\n\n/** 後から読む種類 */\nexport const LATER_KINDS: readonly LaterKind[] = [\"git\", \"lineup\", \"state\", \"time\", \"tree\", \"try\"];\n\nconst registered: Partial<LaterKinds> = {};\n\nexport function registerKind<K extends LaterKind>(kind: K, parts: LaterKinds[K]): void {\n registered[kind] = parts;\n}\n\n/** 種類の部品を今すぐ描ける形で持っているか。時系列図と構成図は常に持つ */\nexport function kindLoaded(kind: string | undefined): boolean {\n return !(LATER_KINDS as readonly (string | undefined)[]).includes(kind) || registered[kind as LaterKind] !== undefined;\n}\n\n/** 種類の部品。読んでいない時は、種類の名前を含む誤りで止まる */\nexport function kindParts<K extends LaterKind>(kind: K, lang: NotationLang = DEFAULT_LANG): LaterKinds[K] {\n const parts = registered[kind];\n if (parts === undefined) throw new Error(FIGURE_TEXT[lang].kindNotLoaded(kind));\n return parts;\n}\n","/**\n * 原本 (版2) と、描く処理が読む図の形 (版1と同じ欄と並び) の組み直し (#3346)。\n *\n * 版2の原本は図の宣言を `blocks` のブロックの名前ごとの欄に持ち、版1の原本は同じ宣言を根の欄と図の種類の欄に持つ。\n * 2 つの形の欄の対応は `HOMES` の 1 つの表が持ち、組み直し (`toModel`、`fromModel`)、版1の原本の移し (`upgrade`)、\n * 版1の誤りの場所の戻し (`toVersion1Pointer`) が同じ表を読む。\n *\n * 描く処理の形は版1と同じ欄と同じ並びで組み、版の欄も `1` を持つ。図の id はこの形の字から作るので、\n * 版2の原本を足す前と同じ図からは同じ id の SVG を描く。\n */\nimport { lifelinesOf } from \"./blocks/lifeline/read\";\nimport type { Diagram, DiagramBlocks, DiagramModel, TryItem } from \"./schema\";\n\n/** この道具が読める原本の版。版1の原本は読む時にこの版へ移す (#3346) */\nexport const FORMAT_VERSION = 2;\n\n/** 描く処理の形の版の欄。版1の原本と同じ形なので、版1の `1` を持つ */\nexport const MODEL_VERSION = 1;\n\n/** 版2の原本の欄と、版1の原本での置き場。版1の置き場は根の欄か、図の種類の欄 (`<種類の欄>.<欄>`) */\nexport const HOMES = [\n [\"group\", \"regions\"],\n [\"box\", \"boxes\"],\n [\"strip\", \"strip\"],\n [\"path\", \"state.paths\"],\n [\"branch\", \"git.branches\"],\n [\"scale\", \"time.scale\"],\n [\"period\", \"time.period\"],\n [\"row\", \"time.rows\"],\n [\"point\", \"time.points\"],\n [\"zoom\", \"time.zoom\"],\n [\"item\", \"lineup.items\"],\n [\"role\", \"lineup.roles\"],\n] as const satisfies readonly (readonly [keyof DiagramBlocks, string])[];\n\ntype Obj = Record<string, unknown>;\n\nconst isObject = (value: unknown): value is Obj => typeof value === \"object\" && value !== null && !Array.isArray(value);\n/** 書かない値。無いか、空の並び */\nconst blank = (value: unknown): boolean => value === undefined || (Array.isArray(value) && value.length === 0);\n\n/**\n * 描く処理の形を版2の原本にする。空の並びは書かず、`blocks` の欄は `HOMES` の順に並べる。\n * 試す図 (#3337) は版1に無かった種類なので `HOMES` を通さず、部品 (`part`) とチップ (`item`) をこの順に置く\n */\nexport function fromModel(model: DiagramModel, version: number): Diagram {\n const source = model as unknown as Obj;\n const blocks: Obj = {};\n if (model.kind === \"try\") {\n blocks.part = model.try?.parts ?? [];\n if (!blank(model.try?.items)) blocks.item = model.try?.items;\n } else {\n for (const [field, home] of HOMES) {\n const [section, inner] = home.split(\".\");\n const value = inner === undefined ? source[section ?? \"\"] : (source[section ?? \"\"] as Obj | undefined)?.[inner];\n if (!blank(value)) blocks[field] = value;\n }\n }\n return {\n version,\n kind: model.kind,\n title: model.title,\n ...(model.view !== undefined ? { view: model.view } : {}),\n blocks,\n steps: model.steps,\n };\n}\n\n/** 版1の原本か。版1は検査の前に版2の形へ移す */\nexport const isVersion1 = (input: unknown): input is Obj =>\n typeof input === \"object\" && input !== null && !Array.isArray(input) && (input as { version?: unknown }).version === 1;\n\n/**\n * 版2の原本を描く処理の形にする。欄と並びは版1の原本を読んでいた時と同じにする\n * (版、種類、題、見せ方、区画、箱、帯、段、生存線、移れる道、枝、チップ、時間軸の図の欄)。\n * 時系列図の生存線は、箱の並びのまま左から組む。試す図 (#3337) は部品とチップを試す図の欄 (`try`) に持つ\n */\nexport function toModel(diagram: Diagram): DiagramModel {\n const b = diagram.blocks;\n const boxes = b.box ?? [];\n if (diagram.kind === \"try\")\n return {\n version: MODEL_VERSION,\n kind: diagram.kind,\n title: diagram.title,\n ...(diagram.view !== undefined ? { view: diagram.view } : {}),\n boxes,\n steps: diagram.steps,\n try: { parts: b.part ?? [], items: (b.item ?? []) as TryItem[] },\n };\n return {\n version: MODEL_VERSION,\n kind: diagram.kind,\n title: diagram.title,\n ...(diagram.view !== undefined ? { view: diagram.view } : {}),\n ...(b.group !== undefined ? { regions: b.group } : {}),\n boxes,\n ...(b.strip !== undefined ? { strip: b.strip } : {}),\n steps: diagram.steps,\n ...(diagram.kind === \"sequence\" ? { sequence: lifelinesOf(boxes) } : {}),\n ...(b.path !== undefined ? { state: { paths: b.path } } : {}),\n ...(b.branch !== undefined ? { git: { branches: b.branch } } : {}),\n ...(b.item !== undefined ? { lineup: { items: b.item, ...(b.role !== undefined ? { roles: b.role } : {}) } } : {}),\n ...(b.scale !== undefined || b.row !== undefined\n ? {\n time: {\n ...(b.scale !== undefined ? { scale: b.scale } : {}),\n ...(b.period !== undefined ? { period: b.period } : {}),\n ...(b.row !== undefined ? { rows: b.row } : {}),\n ...(b.point !== undefined ? { points: b.point } : {}),\n ...(b.zoom !== undefined ? { zoom: b.zoom } : {}),\n } as DiagramModel[\"time\"],\n }\n : {}),\n };\n}\n\n/**\n * 版1の原本を、検査の前に版2の形へ移す。形を確かめる前に呼ぶので、知らない欄と形の違う値と空の並びはそのまま移し、検査に任せる\n * (版1で誤りだった原本は、版2でも同じ値の誤りになる)。空の並びを外して欄を整えるのは、検査を通った後の `fromModel` が行う。\n * 図の種類の欄 (`state`、`git`、`time`、`lineup`) は、中の欄を全て移せた時だけ消す。時系列図の生存線の欄 (`sequence`) は、箱の並びから組み直せるので書かない。\n * 時系列図でない図の生存線の欄は版1でも書けなかったので、根に残して検査に断らせる\n */\nexport function upgrade(input: Obj, version: number): Obj {\n const rest: Obj = { ...input };\n delete rest.version;\n if (rest.kind === \"sequence\") delete rest.sequence;\n const out: Obj = {};\n const blocks: Obj = {};\n const moved = new Set<string>();\n for (const [field, home] of HOMES) {\n const [section = \"\", inner] = home.split(\".\");\n if (inner === undefined) {\n if (!(section in rest)) continue;\n blocks[field] = rest[section];\n moved.add(section);\n continue;\n }\n const container = rest[section];\n if (isObject(container) && inner in container) blocks[field] = container[inner];\n }\n for (const section of [\"state\", \"git\", \"time\", \"lineup\"]) {\n const container = rest[section];\n const inners: string[] = HOMES.filter(([, home]) => home.startsWith(`${section}.`)).map(([, home]) => home.slice(section.length + 1));\n if (isObject(container) && Object.keys(container).every((key) => inners.includes(key))) moved.add(section);\n }\n out.version = version;\n for (const [key, value] of Object.entries(rest)) {\n if (key === \"steps\") out.blocks = blocks;\n if (!moved.has(key)) out[key] = value;\n }\n if (!(\"blocks\" in out)) out.blocks = blocks;\n return out;\n}\n\n/** 版2の `blocks` の欄の場所から、版1の原本の同じ値の場所 */\nconst VERSION_1_HOMES: ReadonlyMap<string, string> = new Map(HOMES.map(([field, home]) => [`/blocks/${field}`, `/${home.replace(\".\", \"/\")}`]));\n\n/**\n * 版2の `blocks` の欄の場所から、その欄を持っていた版1の図の種類の欄の場所 (`/blocks/branch` なら `/git`)。\n * 図の種類が書けない欄は、版1では図の種類の欄ごと断っていたので、その場所で返す。根の欄から移した欄は `undefined`\n */\nexport function version1SectionOf(pointer: string): string | undefined {\n const home = HOMES.find(([field]) => `/blocks/${field}` === pointer)?.[1];\n return home?.includes(\".\") ? `/${home.slice(0, home.indexOf(\".\"))}` : undefined;\n}\n\n/**\n * 版2の場所 (JSON Pointer) を、版1の原本の場所へ戻す。`blocks` の欄の場所だけを戻し、ほかの場所 (段の中など) は同じ。\n * `blocks` そのものの場所は、版1の根の場所にする\n */\nexport function toVersion1Pointer(pointer: string): string {\n if (pointer === \"/blocks\") return \"\";\n const match = /^\\/blocks\\/[^/]+/u.exec(pointer);\n const home = match ? VERSION_1_HOMES.get(match[0]) : undefined;\n return match && home !== undefined ? `${home}${pointer.slice(match[0].length)}` : pointer;\n}\n","/**\n * dragon記法の誤りの文 (#2997、#3137)。\n *\n * 記法の語は英語だけで file から言葉が決まらないため、誤りの文は呼ぶ側が渡した言葉\n * (渡さなければ英語) で出す。文の中の記法の語は語の表から引き、表と文で語が食い違わないようにする。\n * ブロックの置き場へ移した行の誤りの文はブロックが日英で持ち (`blocks/<名前>/read.ts` の `messages`)、ここで 1 つの表に束ねる (#3345)。\n * 軽い入口は個別ブロックの読み方を後から読むので、表は登録簿 (`blocks/reading.ts`) が持つ読み方から引く時に束ね、登録が変わった時に束ね直す (#3349)。\n * 読んでいないブロックの誤りの文は表に無いが、読む処理はそのブロックの行を読む前に、読んでいないブロックを名指す誤りで止める (`notLoaded`)。\n */\nimport { cachedByReadings, loadedReadings } from \"./blocks/reading\";\nimport type { READINGS } from \"./blocks/readings\";\nimport { list } from \"./read-kit\";\nimport { HEADS, KINDS, type NotationLang } from \"./words\";\n\n/** 新しい形のどの行の書き方を示すか。前の形の行に当たった時に、誤りの文が書き方を示す */\nexport type Shape = \"sequence\" | \"architecture\" | \"group\" | \"box\" | \"strip\" | \"view\" | \"step\" | \"say\" | \"code\" | \"act\" | \"note\" | \"set\";\n\ntype Readings = typeof READINGS;\n/** 日英の誤りの文の、日本語の表の型。持たない (`none`) ブロックは何も足さない */\ntype JaOf<X> = X extends { ja: infer M } ? M : never;\ntype Intersect<U> = (U extends unknown ? (u: U) => void : never) extends (i: infer I) => void ? I : never;\n/** ブロックが持つ誤りの文の表。鍵はブロックの間で重ならない (`blocks.test.ts` の `block-message-keys-unique` が見る) */\nexport type BlockMessages = Intersect<JaOf<Readings[keyof Readings][\"messages\"]>>;\n\n/** 誤りの文の表。どのブロックにも属さない行の文と、ブロックが持つ文 */\nexport type Messages = CoreMessages & BlockMessages;\n\n/** どのブロックにも属さない行 (図の種類と題の行、名札、属性の書き方) の誤りの文 */\nexport interface CoreMessages {\n noHead: string;\n badHead: string;\n /** 前の形の `word` を書いた行。`shape` の行の書き方を示す */\n oldForm: (word: string, shape: Shape) => string;\n unknownHead: (word: string) => string;\n duplicate: (id: string) => string;\n needsId: (word: string) => string;\n badId: (id: string) => string;\n afterId: string;\n declarationInStep: string;\n stepLineBeforeStep: string;\n emptyName: (id: string) => string;\n quoteUnclosed: string;\n afterQuote: string;\n attrUnclosed: string;\n attrNoColon: (raw: string) => string;\n attrNoValue: (key: string) => string;\n attrTwice: (key: string) => string;\n badAttr: (key: string, allowed: readonly string[]) => string;\n badHash: string;\n /** 時間軸の図だけの行か属性 (`word`) を、別の種類の図に書いた (#3165) */\n timeOnly: (word: string) => string;\n /** 枝分かれの図だけの行 (`word`) を、別の種類の図に書いた。後から読む個別ブロックの読み方を読まずに断るので、ここに持つ (#3349) */\n gitOnly: (word: string) => string;\n /** 木の図だけの行を、別の種類の図に書いた (#3349) */\n treeOnly: (word: string) => string;\n /** 列の図だけの行を、別の種類の図に書いた (#3349) */\n lineupOnly: (word: string) => string;\n /** 列の図と試す図だけの行 (`item` と `line`) を、別の種類の図に書いた (#3349) */\n lineupOrTryOnly: (word: string) => string;\n /** 試す図だけの行を、別の種類の図に書いた (#3349) */\n tryOnly: (word: string) => string;\n /** 軽い入口で、まだ読んでいないブロック `block` の行か原本を読んだ。`loadFor` を待てば読める (#3349) */\n blockNotLoaded: (block: string) => string;\n}\n\n/** 持っている読み方が持つ `lang` の誤りの文を 1 つの表に束ねる */\nconst fromBlocks = (lang: NotationLang): BlockMessages =>\n Object.assign({}, ...loadedReadings().map(({ reading }) => (\"none\" in reading.messages ? {} : reading.messages[lang]))) as BlockMessages;\n\nconst ja = (): Messages => {\n const shapes: Record<Shape, string> = {\n sequence: \"sequence <題>\",\n architecture: \"architecture <題>\",\n group: \"group <名札> as <名前> [note: <添え書き>] から end まで\",\n box: \"box <名札> as <名前> [note: <下の小さな字>]\",\n strip: \"strip <題>: <欄>, <欄>\",\n view: \"sequence <題> [view: follow]\",\n step: \"step <段の題>\",\n say: \"say <段の本文>\",\n code: \"code <命令>\",\n act: \"act <名札>: <処理の名前>\",\n note: \"note <名札>: <下の小さな字>\",\n set: \"set <欄>: <値> [tag: <札>]\",\n };\n return {\n ...fromBlocks(\"ja\"),\n noHead: `最初の行に図の種類 (${list(KINDS)}) と題を書く`,\n badHead: `最初の行は ${KINDS.join(\" か \")} で始め、続けて題を書く`,\n oldForm: (word, shape) => `${word} は前の形の書き方。新しい形では ${shapes[shape]} と書く`,\n unknownHead: (word) => `${word} は行の頭に書けない。行は ${list(HEADS)} か、<名札> -> <名札> で始める`,\n duplicate: (id) => `${id} は既に宣言した名札`,\n needsId: (word) => `${word} の後ろに名札を書く`,\n badId: (id) => `${id} は名札に使えない。名札には空白と [ ] 「 」 = : を含めない`,\n afterId: \"名札の後ろには as <名前> か属性を書く\",\n declarationInStep: \"group と box と strip と branch と、scale と period と row と point と zoom は最初の step より前に書く\",\n stepLineBeforeStep: \"線と say と code と source と act と note と set と commit と枝を切る行と、now と mark と span と、leaf と node の行は step の下に書く\",\n emptyName: (id) => `${id} の名前が空`,\n quoteUnclosed: '\" で始めた字を \" で閉じていない',\n afterQuote: '\" で閉じた字の後ろには、属性か次の , だけを書く',\n attrUnclosed: \"属性は [ で始めて ] で閉じ、行の終わりに置く\",\n attrNoColon: (raw) => `[${raw}] は書けない。属性は [<鍵>: <値>] の形で書く`,\n attrNoValue: (key) => `${key}: の後ろに値を書く`,\n attrTwice: (key) => `${key} は 1 つの行に 1 つまで`,\n badAttr: (key, allowed) => `${key} はこの行に書けない属性。書けるのは ${list(allowed)}`,\n badHash: \"hash は 0 から 9 と a から f の字で 4 から 40 字にする\",\n timeOnly: (word) => `${word} は time (時間軸の図) でだけ書ける`,\n gitOnly: (word) => `${word} の行は git (枝分かれの図) でだけ書ける`,\n treeOnly: (word) => `${word} の行は tree (木の図) でだけ書ける`,\n lineupOnly: (word) => `${word} の行は lineup (列の図) でだけ書ける`,\n lineupOrTryOnly: (word) => `${word} の行は lineup (列の図) と try (試す図) でだけ書ける`,\n tryOnly: (word) => `${word} の行は try (試す図) でだけ書ける`,\n blockNotLoaded: (block) => `${block} のブロックの読み方を読んでいない。読む前に loadFor を待つ`,\n };\n};\n\nconst en = (): Messages => {\n const shapes: Record<Shape, string> = {\n sequence: \"sequence <title>\",\n architecture: \"architecture <title>\",\n group: \"group <id> as <name> [note: <note>] through end\",\n box: \"box <id> as <name> [note: <caption>]\",\n strip: \"strip <title>: <field>, <field>\",\n view: \"sequence <title> [view: follow]\",\n step: \"step <step title>\",\n say: \"say <step body>\",\n code: \"code <command>\",\n act: \"act <id>: <action>\",\n note: \"note <id>: <caption>\",\n set: \"set <field>: <value> [tag: <tag>]\",\n };\n return {\n ...fromBlocks(\"en\"),\n noHead: `Write the diagram kind (${list(KINDS)}) and a title on the first line`,\n badHead: `Start the first line with ${KINDS.join(\" or \")}, followed by the title`,\n oldForm: (word, shape) => `${word} is the old notation. Write ${shapes[shape]} instead`,\n unknownHead: (word) => `A line cannot start with ${word}. Start a line with ${list(HEADS)}, or <id> -> <id>`,\n duplicate: (id) => `${id} is already declared`,\n needsId: (word) => `Write an id after ${word}`,\n badId: (id) => `${id} cannot be an id. An id has no spaces and none of [ ] 「 」 = :`,\n afterId: \"Write as <name> or attributes after the id\",\n declarationInStep: \"Write group, box, strip, branch, scale, period, row, point and zoom before the first step\",\n stepLineBeforeStep: \"Write lines, say, code, source, act, note, set, commit, branch cuts, now, mark, span, leaf and node under a step\",\n emptyName: (id) => `${id} has an empty name`,\n quoteUnclosed: 'A value that starts with \" is not closed with \"',\n afterQuote: 'After a value closed with \", write only attributes or the next ,',\n attrUnclosed: \"Start attributes with [, close them with ], and put them at the end of the line\",\n attrNoColon: (raw) => `[${raw}] cannot be read. Write an attribute as [<key>: <value>]`,\n attrNoValue: (key) => `Write a value after ${key}:`,\n attrTwice: (key) => `Write ${key} only once on a line`,\n badAttr: (key, allowed) => `${key} cannot be written on this line. Write ${list(allowed)}`,\n badHash: \"Write a hash as 4 to 40 characters of 0-9 and a-f\",\n timeOnly: (word) => `${word} can be written only in time diagrams`,\n gitOnly: (word) => `${word} lines can be written only in git diagrams`,\n treeOnly: (word) => `${word} lines can be written only in tree diagrams`,\n lineupOnly: (word) => `${word} lines can be written only in lineup diagrams`,\n lineupOrTryOnly: (word) => `${word} lines can be written only in lineup and try diagrams`,\n tryOnly: (word) => `${word} lines can be written only in try diagrams`,\n blockNotLoaded: (block) => `The ${block} block is not loaded. Await loadFor before reading`,\n };\n};\n\n/** 誤りの文の表。読み方の登録が変わった時に束ね直す */\nconst MESSAGES = cachedByReadings((): Record<NotationLang, Messages> => ({ ja: ja(), en: en() }));\n\nexport const messagesFor = (lang: NotationLang): Messages => MESSAGES()[lang];\n","/**\n * 図の原本の JSON を、人が書く dragon記法へ書き戻す (#3137)。\n *\n * 並べ方は決まった形に整える。JSON の欄の並び順は見ず、欄の名前で読むので、\n * 同じ内容の JSON からは毎回同じ文字列になる。書き手の行の並べ方とコメントは保たない。\n * 段の中で起きることは JSON の並び順 (起きる順) のまま書く。\n * 状態遷移図の移れる道 (`state.paths`) は、帯の宣言の後、最初の `step` より前に JSON の並びのまま、脇道のブロックの書き戻す処理 (`print.figure`) が書く (#3163、#3347)。\n *\n * `\"` で囲むのは要る時だけにする。`[` を含む名前と、`,` か `]` を含む属性の値と、`\"` で始まる字を囲む。\n * 区画と箱の宣言の塊は箱のブロックの書き戻す処理 (`print.declare`) が書く (#3345)。\n * 枝分かれの図 (#3164) は、枝の `branch` の行を箱より前に枝のブロックの書き戻す処理 (`print.declare`) が書き、札を動かす線の運ぶ物が送る側の名前の札なら書かない。\n * commit の行と枝を切る行は、commit と枝のブロックの書き戻す処理 (`print.events`) が書く (#3347)。\n * 時間軸の図 (#3165) は、目盛りと区切りと印の列と節目と拡大の範囲の行を、各ブロックの書き戻す処理 (`print.lead`) が箱より前に書く (#3348)。\n * 中身の帯の物差しの欄の後ろには `[meter: <割合>]` を書く。\n * 時間軸の図の `note` は属性を持てるので、`[` を含む字を `\"` で囲む。\n * 木の図 (#3233) の葉と親は、段の中に `leaf` と `node … of …` の行で、葉と組んだ親のブロックが書く (#3348)。\n * 列の図 (#3239) のチップは箱の後ろに `item` の行でチップのブロックが書き、色が同じで字を持たないチップが続く所は 1 行に並べる。\n * 列の図の役は、図の種類の行の直ぐ後ろに役のブロックが書く (#3348)。\n * 試す図 (#3337) の部品の行は、部品の種類と同じ名前のブロックの書き戻す処理 (`print.part`) が書き、原本の並びのまま 1 つの塊にする (#3348)。\n * その後ろのチップの `item` の行は入力の帯のブロックが書き、欄の値と段の中の書き換えの鍵を入力の帯の欄の順に書く。\n * 段の中でブロックが受け持つ行は、段の区切りの `step` の行の後ろ、段の中で起きることより前に、ブロックの並び (`rank`) の順に書く (#3345)。\n * 段の本文の `say` と命令の `code` の行は段のブロックが、段の出典 (#3199) は出典のブロックが書く。\n * 段の中で起きることのうちブロックが持つ種類は、そのブロックの書き戻す処理 (`print.events`) が起きた順に 1 行ずつ書く (#3345)。\n * ブロックが持つ宣言の塊 (中身の帯の `strip` の行) は、区画と箱とチップの宣言の後ろに、ブロックの書き戻す処理 (`print.figure`) が書く。\n * 書き戻す処理はブロックの読み方 (`blocks/<名前>/read.ts`) が持ち、登録簿 (`blocks/reading.ts`) が持つ読み方から引く (#3349)。\n */\nimport type { Block, BlockPrint, EventPrinter } from \"./blocks/block\";\nimport { cachedByReadings, loadedReadings, readingLoaded } from \"./blocks/reading\";\nimport { fits } from \"./blocks/usable\";\nimport { blocksUsedBy, eventOwners } from \"./blocks/used\";\nimport { KIND_FOLDERS } from \"./kinds/index\";\nimport type { Kind } from \"./kinds/kind\";\nimport { messagesFor } from \"./messages\";\nimport { attrs, name } from \"./print-kit\";\nimport { FORMAT_VERSION, isVersion1, toModel, upgrade } from \"./model\";\nimport type { Diagram, DiagramEvent, DiagramModel, Step, TryPart } from \"./schema\";\nimport { DEFAULT_LANG } from \"./words\";\n\n/** 持っている読み方の書き戻す処理を、ブロックの並び (`rank`) の順に引く (#3349) */\nconst printsOf = <K extends keyof BlockPrint>(key: K): NonNullable<BlockPrint[K]>[] =>\n loadedReadings().flatMap(({ reading }) => (\"none\" in reading.print || reading.print[key] === undefined ? [] : [reading.print[key] as NonNullable<BlockPrint[K]>]));\n\n/** 段の中でブロックが受け持つ行を書き戻す処理。ブロックの並び (`rank`) の順 (#3345) */\nconst stepPrinters = cachedByReadings((): readonly ((step: Step) => string[])[] => printsOf(\"step\"));\n\n/**\n * 段の中で起きることの種類ごとの、ブロックが持つ書き戻す処理と、そのブロック (#3345、#3349)。\n * ブロックは自分の出来事の種類の処理だけを持つので、種類で引いた処理には同じ種類の出来事だけを渡す。\n * 同じ種類の出来事を 2 つのブロックが書き戻す時 (列の図と試す図の `line`) は、書き戻す図の種類で使えるブロックの処理を使う\n */\nconst eventPrinters = cachedByReadings(\n (): ReadonlyMap<string, { block: Block; print: EventPrinter }[]> => {\n const out = new Map<string, { block: Block; print: EventPrinter }[]>();\n for (const { block, reading } of loadedReadings()) {\n if (\"none\" in reading.print) continue;\n for (const [type, print] of Object.entries(reading.print.events ?? {}) as [string, EventPrinter][]) out.set(type, [...(out.get(type) ?? []), { block, print }]);\n }\n return out;\n },\n);\n\n/** 図の種類 `kind` の図の、種類 `type` の出来事を書き戻す処理。使える種類のブロックの処理を先に引く */\nfunction eventPrinter(type: string, kind: string): EventPrinter | undefined {\n const found = eventPrinters().get(type) ?? [];\n const folder = (KIND_FOLDERS as unknown as Readonly<Record<string, Kind>>)[kind];\n return (found.find(({ block }) => folder !== undefined && fits(block, folder)) ?? found[0])?.print;\n}\n\n/**\n * 図の種類の行の直ぐ後ろに書く、ブロックが持つ図の種類の宣言の塊 (時間軸の図の目盛りなど、列の図の役) を書き戻す処理。\n * ブロックの並び (`rank`) の順 (#3348)\n */\nconst leadPrinters = cachedByReadings((): readonly ((diagram: DiagramModel) => string[])[] => printsOf(\"lead\"));\n\n/** 図の種類の宣言の直ぐ後ろに書く、ブロックが持つ宣言の塊 (枝分かれの図の枝と、区画と箱) を書き戻す処理。ブロックの並び (`rank`) の順 (#3345、#3347) */\nconst declarePrinters = cachedByReadings((): readonly ((diagram: DiagramModel) => string[])[] => printsOf(\"declare\"));\n\n/** 最初の `step` より前に書く、ブロックが持つ宣言の塊を書き戻す処理。ブロックの並び (`rank`) の順 (#3345) */\nconst figurePrinters = cachedByReadings((): readonly ((diagram: DiagramModel) => string[])[] => printsOf(\"figure\"));\n\n/** 試す図の部品の種類ごとの、部品の種類と同じ名前のブロックが持つ書き戻す処理 (#3337、#3348) */\nconst partPrinters = cachedByReadings(\n (): ReadonlyMap<string, (part: TryPart) => string> =>\n new Map(loadedReadings().flatMap(({ block, reading }) => (\"none\" in reading.print || reading.print.part === undefined ? [] : [[block.name, reading.print.part] as const]))),\n);\n\n/** 書き戻す処理を持つはずのブロック `owner` の読み方を読んでいない時の誤り。読んでいれば、書き戻す処理が無いことを示す */\nfunction missingPrinter(what: string, owner: string | undefined): Error {\n if (owner !== undefined && !readingLoaded(owner)) return new Error(messagesFor(DEFAULT_LANG).blockNotLoaded(owner));\n return new Error(`${what} を書き戻す処理が無い`);\n}\n\n/** 試す図の部品の塊。部品の行を原本の並びのまま 1 つの塊に書く */\nfunction tryParts(parts: readonly TryPart[]): string {\n return parts\n .map((part) => {\n const print = partPrinters().get(part.type);\n if (!print) throw missingPrinter(`${part.type} の部品`, part.type);\n return print(part);\n })\n .join(\"\\n\");\n}\n\n/** 段の中の 1 行。出来事の種類を持つブロックの書き戻す処理が書く。`kind` は図の種類、`diagram` は書き戻す図 */\nfunction event(e: DiagramEvent, kind: DiagramModel[\"kind\"], diagram: DiagramModel): string {\n const print = eventPrinter(e.type, kind);\n if (!print) throw missingPrinter(e.type, eventOwners(e.type, kind).find((name) => !readingLoaded(name)));\n return print(e, kind, diagram);\n}\n\n/**\n * 原本を記法に書き戻す。描く処理の形 (版1と同じ欄) に組み直して書く (#3346)。\n * 版1の原本も、読む時と同じく版2の形へ移してから書く。\n * 軽い入口では、書き戻す図が使うブロックの読み方を `loadFor` で読んでから呼ぶ。読んでいない時は、ブロックの名前を名指す誤りで止める (#3349)\n */\nexport function printNotation(source: Diagram): string {\n const current = isVersion1(source) ? (upgrade(source, FORMAT_VERSION) as unknown as Diagram) : source;\n // 書き戻す処理は読んだブロックの物だけを回すので、読んでいないブロックの欄は黙って落ちる。書く前に、原本が使う全てのブロックを読んだかを見る\n const missing = blocksUsedBy(current).find((name) => !readingLoaded(name));\n if (missing !== undefined) throw new Error(messagesFor(DEFAULT_LANG).blockNotLoaded(missing));\n const diagram = toModel(current);\n const blocks = [\n `${diagram.kind} ${name(diagram.title)}${attrs([[\"view\", diagram.view]])}`,\n ...(diagram.try ? [tryParts(diagram.try.parts)] : []),\n ...leadPrinters().flatMap((print) => print(diagram)),\n ...declarePrinters().flatMap((print) => print(diagram)),\n ...figurePrinters().flatMap((print) => print(diagram)),\n ];\n // 段の区切りの `step` の行の下に、段の中でブロックが受け持つ行を字下げして書く。空の行 (本文の空の行) は字下げしない\n for (const step of diagram.steps) {\n blocks.push(\n [\n `step ${step.title}`,\n ...stepPrinters()\n .flatMap((print) => print(step))\n .map((line) => (line === \"\" ? \"\" : ` ${line}`)),\n ...step.events.map((e) => ` ${event(e, diagram.kind, diagram)}`),\n ].join(\"\\n\"),\n );\n }\n return `${blocks.join(\"\\n\\n\")}\\n`;\n}\n","/**\n * Markdown の中の dragon の囲み (```dragon) を、囲みごとに取り出す。\n *\n * 囲みの開き方と閉じ方は CommonMark に従う。` か ~ を 3 つ以上並べて開き、同じ字を開いた数以上\n * 並べて閉じる。閉じていない囲みは文書の終わりまでを中身にする。dragon 以外の言語の囲みの中は読まない。\n */\nexport interface Fence {\n /** 囲みの中身 (記法) */\n source: string;\n /** 中身の 1 行目が文書の何行目か。記法の誤りの行を文書の行に直す時に足す */\n line: number;\n}\n\nexport function extractDiagrams(markdown: string): Fence[] {\n const lines = markdown.split(/\\r?\\n/);\n if (lines[lines.length - 1] === \"\") lines.pop();\n const fences: Fence[] = [];\n let open: { mark: string; dragon: boolean; start: number; body: string[] } | undefined;\n lines.forEach((text, index) => {\n if (!open) {\n const found = /^ {0,3}(`{3,}|~{3,})\\s*([^\\s`]*)/.exec(text);\n if (found) open = { mark: found[1] ?? \"\", dragon: found[2] === \"dragon\", start: index + 2, body: [] };\n return;\n }\n const close = /^ {0,3}(`{3,}|~{3,})\\s*$/.exec(text)?.[1];\n if (close !== undefined && close[0] === open.mark[0] && close.length >= open.mark.length) {\n if (open.dragon) fences.push({ source: open.body.join(\"\\n\"), line: open.start });\n open = undefined;\n return;\n }\n open.body.push(text);\n });\n if (open?.dragon) fences.push({ source: open.body.join(\"\\n\"), line: open.start });\n return fences;\n}\n","/**\n * 人が書く dragon記法を、図の原本の JSON へ変える (#3137)。\n *\n * 行の種類は行の頭の英語の語で決まり、線の行だけは箱の名札から始まる。最初の `step` より前に\n * 図の種類と題と区画と箱と帯を宣言し、`step` ごとに、その段で起きることを起きる順に並べる。\n *\n * sequence <題> [view: fixed か follow] 書かなければ字の大きさで選ぶ。図の種類は sequence と architecture と state\n * group <名札> as <名前> [note: <添え書き>, color: <色>, icon: <印>]\n * box <名札> as <名前> [note: <下の小さな字>, color: <色>, icon: <印>, link: <飛び先>]\n * end 同じ名札の group はもう一度開ける\n * box <名札> as <名前> [...] as が無ければ名札を名前にする\n * strip <題>: <欄>, <欄>\n * step <段の題>\n * say <段の本文> say の下に字下げした行は本文の続き\n * code <段で打つ命令>\n * source <出典の名前> [url: <URL>] 1 つの段に何行でも書ける\n * <名札> -> <名札>: <線の名前> [carry: <運ぶ物>, tag: <値>, side: <側>]\n * act <名札>: <処理の名前> 箱の中の処理\n * note <名札>: <字> 箱の下の小さな字の書き換え\n * set <欄>: <値> [tag: <札>] 中身の帯の値\n *\n * 鍵と値はコロンで区切り、属性は `[ ]` の中に `,` で並べて行の終わりに置く。\n * 空白を含む名前と文は行の終わりか `[` の前に置き、`[` を含む名前と `,` か `]` を含む属性の値だけを\n * `\"` で囲む。囲みの中では `\\\"` が `\"`、`\\\\` が `\\` になる。字下げは `say` の続きの行を見分ける時だけ意味を持つ。\n *\n * 箱の飛び先 (`link`) と段の出典の `url` は描いた図と段の一覧の link にそのまま入るため、頁を移る形\n * (`/` で始まる path か、`http://` か `https://` で始まる URL) だけを受ける (#3199)。\n *\n * 状態遷移図 (`state`) では、線の送る側に始まりの印 `start`、受ける側に終わりの印 `finish` を書ける。\n * 最初の `step` より前に書いた線は、移れるが段で通るとは限らない道 (`state.paths`) になり、属性を持たない (#3163)。\n * 状態遷移図の `start` と `finish` は箱の名札に使えない。時系列図と構成図では宣言して使う普通の名札のまま。\n *\n * 枝分かれの図 (`git`、#3164) は、最初の `step` より前に `branch <名札> [note: <添え書き>]` で枝を上から順に宣言し、\n * 段の中に `commit <名札> on <枝> [hash: <hash>, note: <一言>]` で commit を積み、`<枝> from <commit>` で枝を切る。\n * 当て直しは `on <枝>` の後ろに `copy <commit>` を、merge commit は `merge <枝>` を続ける。\n * 線の行は札を動かす行になり、送る側に枝の名札か `HEAD`、受ける側に積んだ commit を書く。運ぶ物は書かなければ送る側の名前の札。\n * 枝分かれの図では `HEAD` を名札に使えず、区画 (`group`) は書けない。`branch` と `commit` の行は枝分かれの図でだけ書ける。\n * 状態遷移図の道と、枝分かれの図の枝と commit と枝を切る行は、脇道と枝と commit のブロックが読む (#3347)。\n * 道の行と枝を切る行は行の頭の語を持たないので、ここで見分けてブロックの読む処理を呼ぶ。\n *\n * 時間軸の図 (`time`、#3165) は、最初の `step` より前に目盛りと区切りと印の列と節目と拡大の範囲を宣言する。\n *\n * scale <単位> <長さ> <数> [from: <最初の番号>] 長さは数と単位 (ms、s、min、h、d) の組 (`12s`)\n * period <名前> <目盛りの数> [from: <最初の番号>]\n * row <名札> as <名前> [color: <色>, empty: <目盛り> <目盛り>]\n * point <名札> at <目盛り>\n * zoom <目盛り>-<目盛り>\n *\n * 段の中では `now -> <目盛り>` で針をその目盛りの終わりまで進め、`mark <列> <範囲> [color: <色>]` で印の色を変え、\n * `span <範囲>: <字> [shape: box, color: <色>]` で範囲に括弧か囲みを出す。目盛りは 0 から数え、範囲は `0-31` か `0` と書く。\n * 箱は拡大の帯に置き、箱どうしの線は `[at: <目盛り>]` で列を選び、受ける箱を別の列から選ぶ時は `[into: <目盛り>]` を足す。\n * 節目どうしの線は軸の上に引き、`note <節目>: <状態> [color: <色>]` で節目の状態と丸の色を変える。\n * 中身の帯の欄の名前の後ろに `[meter: <割合>]` を書くと物差しになり、`set` の値を割合 (`97%` か `2/3`) で書く。\n * 印の列と箱は同じ名札を持てる (空いた目盛りの列でその箱を空きの枠にするため)。時間軸の図では `now` を名札に使えない。\n *\n * 木の図 (`tree`、#3233) は、段の中に `leaf <名札> [hash: <hash>]` で葉を出し、`node <名札> of <子>, <子> [hash: <hash>]` で\n * 前に書いた葉か親を子にして親を組む。箱は書いた段で現れ、親は 1 つだけ持てる。最後の段を終えた時に親を持たない木の箱は根の 1 つだけ。\n * 線の端には木の箱も `box` の箱も書ける。木の図に区画 (`group`) は書けず、`leaf` と `node` の行は木の図でだけ書ける。\n *\n * 列の図 (`lineup`、#3239) は、`box` の行が列になり、最初の `step` より前に `item <名札>, <名札> [color: <色>, label: <字>]` でチップを宣言する。\n * 段の中で `line <列>: <チップ>, <チップ>` と書くと列の並びが替わり、`seal <列>` で封をし、`open <列>` で開け、`pick <列>` で列を選び、\n * `stamp <列>: <字>` で札を押す。列の図に区画 (`group`) と線と `act` の行は書けない。封をした列の並びは、開けるまで書けない。\n * `item`、`line`、`seal`、`open`、`pick`、`stamp`、`role` の行は列の図でだけ書ける。\n * 卓の形 (#3351) で、`box` の行の `[order: none]` は箱を順番の無い置き場にし、`item` の行の `[note: <説明>]` は凡例の説明を持たせる。\n * 最初の `step` より前の `role <名札> [note: <一言>]` は役を宣言し、段の中の `role <名札>` はその段で動く役を名指す。\n *\n * 試す図 (`try`、#3337) は、最初の `step` より前に部品の行を上から積む順に書く。\n *\n * route <名札>: <節> - <節>, <節> - <節> [from: <節>, to: <節>] 網。from から to へ最短の道でチップを運ぶ\n * queue <名札> [order: <欄>] 待ち行列。order の欄の値の高い順に並べる\n * chain <名札> [edit: <欄>] 機械の列。edit の欄を読み手が書き換えられる\n * ask <欄>, <欄> [into: <待ち行列>, via: <網>] 入力の帯。図に 1 つまで。最初の欄の値がチップの名前\n * press <名札> [from: <待ち行列>, into: <機械の列>, take: <数>, at: <部品>] 釦\n * item <名札> [<欄>: <値>] チップ。鍵は ask の欄 (最初の欄を除く)\n *\n * 段の中では `line <待ち行列か機械の列>: <チップ>, <チップ>` で中身を書き、`ask <値>, <値>` で送り、`press <釦>` で押し、\n * `item <チップ> [<欄>: <値>]` で書き換える。部品を名指す属性は全ての宣言を読んでから確かめ、誤りは名指した行に出す。\n * 段の中の出来事は段ごとの状態の手順 (`try-state.ts`) に 1 つずつ当て、空の待ち行列からの press と満杯の待ち行列への ask を断る。\n * 部品の行は試す図でだけ書け、試す図に箱と区画と線の行は書けない。\n *\n * 行の頭の語と同じ綴りの名札 (`end` や `step`) も書ける。名札の次に `->` が来る行は線と読む。\n * 誤りは最初の 1 つで止め、行と列を示す。誤りの文の言葉は呼ぶ側が渡す。\n *\n * 行はブロックの読み方 (`blocks/<名前>/read.ts`) が読み、ここは行をブロックへ振り分ける (#3345、#3349)。\n * どの行をどのブロックが読むかはブロックの定義 (`block.ts`) の語と `lines` の宣言から引き (`blocks/used.ts`)、読み方は登録簿 (`blocks/reading.ts`) から引く。\n * 軽い入口で読み方をまだ読んでいないブロックの行は、黙って別の行と読まず、ブロックの名前を名指す誤りで止める。\n * 図の種類の決まり (名札に使えない名前、線の端、読み終えた時の確かめ) は、その種類の図が必ず使うブロック (定義の `always`) の読み方の手続きが持つ。\n */\nimport type { BlockReading, FigureDraft, HeadReader, KindName, LineView, ParseState, StepDraft } from \"./blocks/block\";\nimport { EDGE } from \"./blocks/edge/block\";\nimport { readEdgeLine } from \"./blocks/edge/read\";\nimport { BLOCKS } from \"./blocks/index\";\nimport { cachedByReadings, loadedReadings, readingLoaded } from \"./blocks/reading\";\nimport { stepOf, viewOf } from \"./blocks/step/read\";\nimport { fits } from \"./blocks/usable\";\nimport { kindNeeds, lineNeeds, lineView, matches } from \"./blocks/used\";\nimport { TIME_EDGE_ATTRS } from \"./blocks/zoom/block\";\nimport { KIND_FOLDERS } from \"./kinds/index\";\nimport type { Kind } from \"./kinds/kind\";\nimport { type Messages, messagesFor, type Shape } from \"./messages\";\nimport { fail, isOneOf, NotationError, readAttrs, readName } from \"./read-kit\";\nimport type { Diagram, DiagramModel, Step } from \"./schema\";\nimport { isBlankOrComment, type SourceLine, tokenize } from \"./tokenize\";\nimport { FORMAT_VERSION, fromModel, MODEL_VERSION } from \"./model\";\nimport { ATTRS, DEFAULT_LANG, HEADS, KINDS, type NotationLang, OLD_HEADS } from \"./words\";\n\n/** 読み方の手続きの名前 */\ntype Hook = \"take\" | \"checkHead\" | \"settle\" | \"beginStep\" | \"endAt\" | \"reserved\" | \"columns\" | \"afterEdge\" | \"finish\" | \"verify\";\n\nexport interface LineError {\n line: number;\n column: number;\n message: string;\n}\n\nexport type Parsed = { ok: true; diagram: Diagram } | { ok: false; errors: LineError[] };\n\nexport interface ParseOptions {\n /** 誤りの文の言葉。既定は英語 (#3338) */\n lang?: NotationLang;\n}\n\n/**\n * 前の形 (#2997 まで) の行なら、その印と、新しい形で書く行の形。`inStep` は段の中の行か。\n * 新しい形で読めない行の誤りの文で、書き直し方を示すために引く。\n */\nfunction oldForm(text: string, inStep: boolean): { word: string; shape: Shape } | undefined {\n const first = text.split(/\\s/u)[0] ?? \"\";\n if (first === \"帯\") return { word: first, shape: inStep ? \"set\" : \"strip\" };\n if (Object.hasOwn(OLD_HEADS, first)) return { word: first, shape: OLD_HEADS[first as keyof typeof OLD_HEADS] };\n if (text.startsWith(\"#\")) return { word: \"#\", shape: \"step\" };\n if (text.startsWith(\">\")) return { word: \">\", shape: \"say\" };\n if (text.startsWith(\"`\")) return { word: \"`\", shape: \"code\" };\n if (text.includes(\"「\")) return { word: \"「」\", shape: inStep ? \"note\" : \"box\" };\n if (/^[^\\s=:]+\\s*=(?!>)/u.test(text)) return { word: \"=\", shape: \"box\" };\n if (inStep && /^[^\\s:]+\\s*:/u.test(text)) return { word: \":\", shape: \"act\" };\n return undefined;\n}\n\n/**\n * 持っている読み方の、行の頭の語ごとの読む処理 (#3345、#3349)。\n * 行の頭の語の誤り (図の種類だけの語と、知らない語) を確かめた後に、ここに在る語はブロックの読む処理で読む\n */\nconst headReaders = cachedByReadings(\n (): ReadonlyMap<string, HeadReader> => new Map(loadedReadings().flatMap(({ reading }) => (\"none\" in reading.read ? [] : Object.entries(reading.read)))),\n);\n/**\n * 図の種類だけのブロック (`attach.only`) が持つ行の頭の語と、その図の種類 (#3164、#3347、#3348)。\n * ほかの種類の図に書いた行は、その図の種類だけの語の誤りで止める。読み方を読まずに断れるよう、ブロックの定義から引く\n */\nconst ONLY_HEADS: ReadonlyMap<string, KindName> = new Map(\n Object.values(BLOCKS).flatMap((block) => {\n const only = block.attach.only;\n return only === undefined ? [] : (block.words.heads ?? []).map((head) => [head, only] as const);\n }),\n);\n/** 列の図と試す図の両方に書ける行の頭の語 (#3337)。ほかの種類の図に書いた行は、2 つの図の種類だけの語の誤りで止める */\nconst LINEUP_OR_TRY = [\"item\", \"line\"];\n/** 箱を持たずに描ける図の種類。ほかの種類の図は箱が 1 つも無いと止める */\nconst BOXLESS: readonly KindName[] = [\"git\", \"time\", \"tree\", \"try\"];\n\n/** 記法を読んで、描く処理の形 (版1と同じ欄と並び) に組む。原本 (版2) へは `parseNotation` が `fromModel` で移す (#3346) */\nfunction parseLines(lines: SourceLine[], m: Messages): DiagramModel {\n const headAt = lines.findIndex((source) => !isBlankOrComment(source));\n const head = lines[headAt];\n if (!head) throw new NotationError(1, 1, m.noHead);\n const kind = head.text.split(/\\s/u)[0] ?? \"\";\n if (!isOneOf(KINDS, kind)) {\n const old = oldForm(head.text, false);\n throw fail(head, 0, old ? m.oldForm(old.word, old.shape) : m.badHead);\n }\n const titled = readName(head, kind.length, m);\n if (titled.value === \"\") throw fail(head, 0, m.badHead);\n const title = titled.value;\n const view = viewOf(head, titled.rest < head.text.length ? readAttrs(head, titled.rest, ATTRS.diagram ?? [], m).get(\"view\") : undefined, m);\n\n // 図の種類の決まりを持つブロック (定義の `always`) の読み方は、行が無くても要る\n const always = kindNeeds(kind).find((name) => !readingLoaded(name));\n if (always !== undefined) throw fail(head, 0, m.blockNotLoaded(always));\n const kindFolder = (KIND_FOLDERS as unknown as Readonly<Record<string, Kind>>)[kind] as Kind;\n /** この図の種類で使える、持っている読み方。ブロックの並び (`rank`) の順 */\n const own = loadedReadings().filter(({ block }) => fits(block, kindFolder));\n /** この図の種類で使える読み方が持つ、名前 `key` の手続き。ブロックの並びの順 */\n const hooks = <K extends Hook>(key: K): NonNullable<BlockReading[K]>[] =>\n own.flatMap(({ reading }) => (reading[key] === undefined ? [] : [reading[key] as NonNullable<BlockReading[K]>]));\n const isGit = kind === \"git\";\n const isTime = kind === \"time\";\n const isLineup = kind === \"lineup\";\n const isTry = kind === \"try\";\n const ids = new Set<string>();\n /** 宣言の行でブロックが組む欄 (区画と箱と、中身の帯と、時間軸の図の物差しの欄と、状態遷移図の道と、枝分かれの図の枝と札) */\n const figure: FigureDraft = {\n regions: [],\n boxes: [],\n meters: [],\n paths: [],\n branches: [],\n git: { commits: new Set(), tips: new Map() },\n time: { rows: [], points: [], pending: [], settled: false, needle: 0 },\n tree: { boxes: new Map(), parents: new Map() },\n lineup: { items: [], roles: [], sealed: new Set() },\n try: { parts: [], items: [], pending: [] },\n };\n const { regions, boxes, paths, branches, time } = figure;\n const steps: Step[] = [];\n let building: StepDraft | undefined;\n /** 全ての宣言を読んでから確かめる宣言を、もう確かめたか */\n let settled = false;\n\n const declare = (source: SourceLine, id: string, at: number): void => {\n if (ids.has(id)) throw fail(source, at, m.duplicate(id));\n ids.add(id);\n };\n const boxAt = (source: SourceLine, id: string, at: number): string => {\n if (!boxes.some((box) => box.id === id)) throw fail(source, at, m.undeclaredBox(id));\n return id;\n };\n /**\n * 線の端。図の種類が箱のほかに書ける名札 (状態遷移図の始まりと終わりの印、枝分かれの図の枝と commit、時間軸の図の節目、木の図の木の箱) は、\n * その決まりを持つブロックが確かめる\n */\n const endAt = (source: SourceLine, id: string, at: number, side: \"from\" | \"to\"): string => {\n for (const end of hooks(\"endAt\")) {\n const found = end(source, id, at, side, state);\n if (found !== undefined) return found;\n }\n return boxAt(source, id, at);\n };\n /** 図の種類が名札に使えない名前 (状態遷移図の始まりと終わりの印、枝分かれの図の `HEAD`、時間軸の図の `now`) は、その決まりを持つブロックが止める */\n const notReserved = (source: SourceLine, id: string, at: number): void => {\n for (const reserved of hooks(\"reserved\")) reserved(source, id, at, state);\n };\n /** 宣言の行の名札を、使えない名前でも宣言済みでもない名札として取る */\n const claim = (source: SourceLine, id: string, at: number): void => {\n notReserved(source, id, at);\n declare(source, id, at);\n };\n /** 段の中に書く行の、書き先の段。最初の `step` より前なら誤り */\n const inStep = (source: SourceLine): StepDraft => {\n if (!building) throw fail(source, 0, m.stepLineBeforeStep);\n return building;\n };\n /** 宣言の行。最初の `step` より後なら誤り */\n const beforeSteps = (source: SourceLine): void => {\n if (building) throw fail(source, 0, m.declarationInStep);\n };\n /** 全ての宣言を読んでから確かめる宣言を、最初の段を始める時か記法の終わりに 1 度だけ確かめる */\n const settle = (): void => {\n if (settled) return;\n settled = true;\n for (const check of hooks(\"settle\")) check(state, head);\n };\n /** 書いている段を閉じる。開いたままの区画と、全ての宣言を読んでから確かめる宣言を確かめてから、段を段の並びへ足す */\n const closeStep = (): void => {\n if (figure.group) throw fail(figure.group.source, 0, m.unclosedGroup(figure.group.id));\n settle();\n if (building) steps.push(stepOf(building, m));\n };\n const openStep = (draft: StepDraft): void => {\n building = draft;\n for (const begin of hooks(\"beginStep\")) begin(state);\n };\n /** ブロックの読む処理が受ける、読んでいる記法の状態 */\n const declared = (id: string): boolean => ids.has(id);\n const current = (): StepDraft | undefined => building;\n /**\n * 図の種類だけの行の頭の語を、ほかの種類の図に書いた時の誤りの文。\n * 区画の行のように、図の種類だけのブロックが読む処理で自分で断る語の図の種類は持たない\n */\n const onlyIn: Partial<Record<KindName, (word: string) => string>> = { git: m.gitOnly, time: m.timeOnly, tree: m.treeOnly, lineup: m.lineupOnly, try: m.tryOnly };\n /** 線の列。持つ図の種類 (時間軸の図) のブロックが読み、ほかの種類の図に書いた列は誤りで止める */\n const columns: ParseState[\"columns\"] = (source, from, to, attrs, end) => {\n const [read] = hooks(\"columns\");\n if (read) return read(source, from, to, attrs, end, state);\n const given = TIME_EDGE_ATTRS.flatMap((name) => {\n const attr = attrs.get(name);\n return attr ? [{ name, attr }] : [];\n })[0];\n if (given) throw fail(source, given.attr.at, m.timeOnly(given.name));\n return {};\n };\n const state: ParseState = { m, kind, attrs: ATTRS, inStep, current, closeStep, openStep, beforeSteps, boxAt, declare, declared, notReserved, claim, endAt, columns, figure };\n /** 行が使うブロックの読み方を持っているか確かめる。持っていなければ、ブロックの名前を名指して止める */\n const needed = (source: SourceLine, line: LineView): void => {\n const missing = lineNeeds(line, kind).find((name) => !readingLoaded(name));\n if (missing !== undefined) throw fail(source, 0, m.blockNotLoaded(missing));\n };\n /** 行の形で読む行を、定義の `lines` が当たるブロックの読み方で読む。読んだら true */\n const taken = (source: SourceLine, line: LineView): boolean =>\n own.some(({ block, reading }) => reading.take !== undefined && (block.lines ?? []).some((match) => matches(match, line)) && reading.take(source, state, line));\n\n const rest = lines.slice(headAt + 1);\n for (let i = 0; i < rest.length; i++) {\n const source = rest[i];\n if (!source || isBlankOrComment(source)) continue;\n const text = source.text;\n const line = lineView(text, building !== undefined);\n needed(source, line);\n // 行の頭の語でなく行の形で読む行 (時間軸の図の針、状態遷移図の道、枝を切る行、試す図のチップと中身と線) は、その行を読むブロックが先に読む\n if (taken(source, line)) continue;\n // 名札の次に `->` が来る行は、名札が行の頭の語と同じ綴りでも線と読む\n const edge = EDGE.exec(text);\n if (edge) {\n const read = readEdgeLine(source, edge, state);\n for (const after of hooks(\"afterEdge\")) after(read, state);\n continue;\n }\n const { word } = line;\n // 列の図のチップと並びの語は試す図でも書け、ほかの種類の図に書いた行は 2 つの図の種類だけの語の誤りで止める (#3337)\n if (LINEUP_OR_TRY.includes(word) && !isLineup && !isTry) throw fail(source, 0, m.lineupOrTryOnly(word));\n const only = ONLY_HEADS.get(word);\n const refuse = only === undefined || only === kind ? undefined : onlyIn[only];\n if (refuse) throw fail(source, 0, refuse(word));\n if (!isOneOf(HEADS, word)) {\n const old = oldForm(text, building !== undefined);\n throw fail(source, 0, old ? m.oldForm(old.word, old.shape) : m.unknownHead(word));\n }\n for (const check of hooks(\"checkHead\")) check(source, word, state);\n const reader = headReaders().get(word);\n if (reader) {\n // 下の行まで続けて読んだ処理は、読み終えた続きの行の数を返す\n const read = reader(source, state, (offset) => rest[i + offset]);\n if (typeof read === \"number\") i += read;\n continue;\n }\n }\n closeStep();\n\n for (const finish of hooks(\"finish\")) finish(state, head);\n if (boxes.length === 0 && !BOXLESS.includes(kind)) throw fail(head, 0, m.noBoxes);\n if (steps.length === 0) throw fail(head, 0, m.noSteps);\n for (const verify of hooks(\"verify\")) verify(state, head);\n\n return {\n version: MODEL_VERSION,\n kind,\n title,\n ...(view ? { view } : {}),\n ...(regions.length > 0 ? { regions } : {}),\n boxes,\n ...(figure.strip ? { strip: figure.meters.length > 0 ? { ...figure.strip, meters: figure.meters } : figure.strip } : {}),\n steps,\n ...(paths.length > 0 ? { state: { paths } } : {}),\n ...(isGit ? { git: { branches } } : {}),\n ...(isLineup ? { lineup: { items: figure.lineup.items, ...(figure.lineup.roles.length > 0 ? { roles: figure.lineup.roles } : {}) } } : {}),\n ...(isTry ? { try: { parts: figure.try.parts, items: figure.try.items } } : {}),\n ...(isTime && time.scale\n ? {\n time: {\n scale: time.scale,\n ...(time.period ? { period: time.period } : {}),\n rows: time.rows,\n ...(time.points.length > 0 ? { points: time.points } : {}),\n ...(time.zoom ? { zoom: time.zoom } : {}),\n },\n }\n : {}),\n };\n}\n\nexport function parseNotation(notation: string, options: ParseOptions = {}): Parsed {\n try {\n return { ok: true, diagram: fromModel(parseLines(tokenize(notation), messagesFor(options.lang ?? DEFAULT_LANG)), FORMAT_VERSION) };\n } catch (error) {\n if (!(error instanceof NotationError)) throw error;\n return { ok: false, errors: [{ line: error.line, column: error.column, message: error.message }] };\n }\n}\n","/**\n * 原本の JSON の誤りの文 (#2999)。\n *\n * JSON は語を持たず file から言葉を決められないので、呼ぶ側 (頁なら頁の言葉) が言葉を渡す。\n * 文は schema が使う決まり (JSON Schema の keyword) ごとに持ち、ajv の英語の文はそのまま出さない。\n * schema に決まりを足して文が無い時は、`every-schema-keyword-has-messages` の検査が落ちる。\n * ブロックの形の決まりに当てる文はブロックが日英で持ち (`blocks/<名前>/block.ts` の `fieldMessages`)、ここで 1 つの表に束ねる (#3345)。\n */\nimport { ranked } from \"./blocks/block\";\nimport { BLOCKS } from \"./blocks/index\";\nimport type { NotationLang } from \"./words\";\n\ntype Blocks = typeof BLOCKS;\n/** 日英の誤りの文の、日本語の表の型。原本の誤りの文を持たないブロックは何も足さない */\ntype JaOf<X> = X extends { ja: infer M } ? M : never;\ntype Intersect<U> = (U extends unknown ? (u: U) => void : never) extends (i: infer I) => void ? I : never;\n/** ブロックが持つ原本の誤りの文の表 */\nexport type BlockFieldMessages = Intersect<JaOf<Blocks[keyof Blocks][\"fieldMessages\"]>>;\n\n/** 原本の誤りの文の表。決まりごとの文と、ブロックが持つ文 */\nexport type FieldMessages = CoreFieldMessages & BlockFieldMessages;\n\n/** `^[^…]+$` の形の決まりが書けないとする字。`space` は空白 (`\\s`) */\nexport interface Forbidden {\n space: boolean;\n chars: string[];\n}\n\n/** 書けない組み合わせ (`not`) の欄と、その欄を書ける時の `kind` の値 */\nexport interface Allowed {\n field: string;\n kind: string;\n}\n\n/** schema が使う決まりごとの、ブロックが持たない誤りの文 */\nexport interface CoreFieldMessages {\n additionalProperties: (key: string) => string;\n required: (key: string) => string;\n enum: (values: readonly string[]) => string;\n type: (type: string) => string;\n minLength: (limit: number) => string;\n maxLength: (limit: number) => string;\n /** 書けない字を読めない形の決まりでは `undefined` */\n pattern: (forbidden: Forbidden | undefined) => string;\n minItems: (limit: number) => string;\n maxItems: (limit: number) => string;\n minimum: (limit: number) => string;\n const: (value: string) => string;\n /** どの欄の組み合わせか判らない場所では `undefined` */\n not: (allowed: Allowed | undefined) => string;\n /** `kind` の図だけが書ける出来事の種類 (`types`) を、別の種類の図に書いた (#3164) */\n kindOnly: (types: readonly string[], kind: string) => string;\n /** 16 進の字を `min` から `max` 字で書く決まり (commit の hash、#3164) */\n hex: (min: number, max: number) => string;\n /** 分数か百分率で書く決まり (物差しの線、#3165) */\n ratio: string;\n /** 選べる決まりがどれも欄が足りない時の、足りない欄。それ以外の時は空 */\n anyOf: (fields: readonly string[]) => string;\n oneOf: string;\n discriminator: (tag: string, values: readonly string[]) => string;\n /** 道具より新しい版の図 */\n newer: (version: number, tool: number) => string;\n /** 古い版の図を今の版の形に移して読んだ時の警告 (#3346) */\n upgraded: (version: number, tool: number) => string;\n}\n\nconst TYPES_JA: Record<string, string> = {\n string: \"文字列にする\",\n integer: \"整数にする\",\n number: \"数にする\",\n object: \"オブジェクトにする\",\n array: \"配列にする\",\n boolean: \"true か false にする\",\n null: \"null にする\",\n};\n\nconst TYPES_EN: Record<string, string> = {\n string: \"Use a string\",\n integer: \"Use an integer\",\n number: \"Use a number\",\n object: \"Use an object\",\n array: \"Use an array\",\n boolean: \"Use true or false\",\n null: \"Use null\",\n};\n\nconst plural = (count: number, word: string): string => `${count} ${word}${count === 1 ? \"\" : \"s\"}`;\n\nconst ja: CoreFieldMessages = {\n additionalProperties: (key) => `${key} という欄は書けない`,\n required: (key) => `${key} の欄が要る`,\n enum: (values) => `${values.join(\" / \")} のどれかにする`,\n type: (type) => TYPES_JA[type] ?? `${type} にする`,\n minLength: (limit) => `${limit} 字以上書く`,\n maxLength: (limit) => `${limit} 字までにする`,\n pattern: (forbidden) =>\n forbidden ? `${forbidden.space ? \"空白と \" : \"\"}${forbidden.chars.join(\" \")} は使えない` : \"使えない字が入っている\",\n minItems: (limit) => `${limit} つ以上書く`,\n maxItems: (limit) => `${limit} つまでにする`,\n minimum: (limit) => `${limit} 以上にする`,\n const: (value) => `${value} にする`,\n not: (allowed) => (allowed ? `${allowed.field} の欄は kind が ${allowed.kind} の時だけ書ける` : \"この欄の組み合わせは書けない\"),\n kindOnly: (types, kind) => `${types.join(\" と \")} の出来事は kind が ${kind} の時だけ書ける`,\n hex: (min, max) => `0 から 9 と a から f の字で ${min} から ${max} 字にする`,\n ratio: \"分数 (2/3) か百分率 (97%) で書く\",\n anyOf: (fields) =>\n fields.length > 0 ? `${fields.join(\" か \")} の${fields.length === 2 ? \"どちらか\" : \"どれか\"}の欄が要る` : \"書ける形のどれにも合わない\",\n oneOf: \"書ける形のどれか 1 つだけに合わせる\",\n discriminator: (tag, values) => `${tag} は ${values.join(\" / \")} のどれかにする`,\n newer: (version, tool) => `版 ${version} の図は、この道具 (版 ${tool}) より新しいので読めない。道具を新しくする`,\n upgraded: (version, tool) => `版 ${version} の図を版 ${tool} の形に移して読んだ。file を書き換えるには migrateFile を使う`,\n};\n\nconst en: CoreFieldMessages = {\n additionalProperties: (key) => `The ${key} field is not allowed`,\n required: (key) => `The ${key} field is required`,\n enum: (values) => `Use one of ${values.join(\" / \")}`,\n type: (type) => TYPES_EN[type] ?? `Use ${type}`,\n minLength: (limit) => `Write at least ${plural(limit, \"character\")}`,\n maxLength: (limit) => `Write at most ${plural(limit, \"character\")}`,\n pattern: (forbidden) =>\n forbidden\n ? `Cannot contain ${forbidden.space ? \"spaces or \" : \"\"}${forbidden.chars.join(\" \")}`\n : \"Contains characters that are not allowed\",\n minItems: (limit) => `Write at least ${plural(limit, \"item\")}`,\n maxItems: (limit) => `Write at most ${plural(limit, \"item\")}`,\n minimum: (limit) => `Use ${limit} or greater`,\n const: (value) => `Use ${value}`,\n not: (allowed) => (allowed ? `The ${allowed.field} field is allowed only when kind is ${allowed.kind}` : \"This combination of fields is not allowed\"),\n kindOnly: (types, kind) => `${types.join(\" and \")} events are allowed only when kind is ${kind}`,\n hex: (min, max) => `Use ${min} to ${max} characters of 0-9 and a-f`,\n ratio: \"Write a fraction (2/3) or a percentage (97%)\",\n anyOf: (fields) => (fields.length > 0 ? `Write one of the ${fields.join(\" or \")} fields` : \"Does not match any of the allowed shapes\"),\n oneOf: \"Match exactly one of the allowed shapes\",\n discriminator: (tag, values) => `${tag} is one of ${values.join(\" / \")}`,\n newer: (version, tool) => `Version ${version} diagrams are newer than this tool (version ${tool}) and cannot be read. Update the tool`,\n upgraded: (version, tool) => `Read a version ${version} diagram by moving it to the version ${tool} shape. Use migrateFile to rewrite the file`,\n};\n\n/** ブロックが持つ `lang` の原本の誤りの文を 1 つの表に束ねる */\nconst fromBlocks = (lang: NotationLang): BlockFieldMessages => Object.assign({}, ...ranked(BLOCKS).map((block) => block.fieldMessages?.[lang] ?? {})) as BlockFieldMessages;\n\nexport const FIELD_MESSAGES: Record<NotationLang, FieldMessages> = { ja: { ...ja, ...fromBlocks(\"ja\") }, en: { ...en, ...fromBlocks(\"en\") } };\n","/* eslint-disable */\n// packages/dragon/scripts/build-validator.mjs が base.schema.json とブロックの形から書き出した。手で直さない\nfunction ucs2length(str) {\n let length = 0;\n for (const _ of str) length++;\n return length;\n}\nexport const validate = validate10;export default validate10;const schema11 = {\"title\":\"dragon の図の原本 (版2)\",\"description\":\"図の宣言を blocks のブロックの名前ごとの欄に置き、段ごとに起きることを steps に置く。座標は持たない。ブロックの欄の形はブロックの置き場が持ち、build の時に scripts/build-validator.mjs がこの骨組みに束ねて diagram.schema.json を書き出す。箱は枝分かれの図と時間軸の図と木の図だけが持たなくてよく、試す図は持たない。列の図の箱は列になる。\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"version\",\"kind\",\"title\",\"blocks\",\"steps\"],\"properties\":{\"version\":{\"description\":\"形式の版\",\"type\":\"integer\",\"minimum\":1},\"kind\":{\"description\":\"図の種類\",\"enum\":[\"sequence\",\"architecture\",\"state\",\"git\",\"time\",\"tree\",\"lineup\",\"try\"]},\"title\":{\"$ref\":\"#/definitions/text\"},\"view\":{\"description\":\"見せ方。書かなければ字の大きさで選ぶ。fixed は全体を止めて中だけ動かし、follow は寄って動かし全体図で今どこかを示す\",\"enum\":[\"fixed\",\"follow\"]},\"blocks\":{\"description\":\"図の宣言。ブロックの名前ごとの欄に、そのブロックの宣言を置く\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"branch\":{\"type\":\"array\",\"minItems\":1,\"items\":{\"$ref\":\"#/definitions/branch\"}},\"group\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/region\"}},\"box\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/box\"}},\"strip\":{\"$ref\":\"#/definitions/strip\"},\"scale\":{\"$ref\":\"#/definitions/scale\"},\"row\":{\"type\":\"array\",\"minItems\":1,\"items\":{\"$ref\":\"#/definitions/row\"}},\"point\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/point\"}},\"zoom\":{\"$ref\":\"#/definitions/zoom\"},\"item\":{\"type\":\"array\",\"minItems\":1,\"description\":\"チップ。列の図と試す図だけが書け、形は図の種類の決まりが持つ\"},\"role\":{\"type\":\"array\",\"minItems\":1,\"items\":{\"$ref\":\"#/definitions/role\"}},\"path\":{\"type\":\"array\",\"minItems\":1,\"items\":{\"$ref\":\"#/definitions/path\"}},\"period\":{\"$ref\":\"#/definitions/period\"},\"part\":{\"description\":\"試す図の部品。書いた順に図の上から積む\",\"type\":\"array\",\"minItems\":1,\"items\":{\"$ref\":\"#/definitions/part\"}}}},\"steps\":{\"type\":\"array\",\"minItems\":1,\"items\":{\"$ref\":\"#/definitions/step\"}}},\"allOf\":[{\"if\":{\"required\":[\"kind\"],\"properties\":{\"kind\":{\"const\":\"lineup\"}}},\"else\":{\"properties\":{\"blocks\":{\"properties\":{\"box\":{\"items\":{\"properties\":{\"order\":{\"$ref\":\"#/definitions/absent\"}}}}}}}}}],\"if\":{\"required\":[\"kind\"],\"properties\":{\"kind\":{\"const\":\"sequence\"}}},\"then\":{\"properties\":{\"blocks\":{\"required\":[\"box\"],\"properties\":{\"box\":{\"minItems\":1},\"strip\":{\"$ref\":\"#/definitions/plainStrip\"},\"path\":{\"$ref\":\"#/definitions/absent\"},\"branch\":{\"$ref\":\"#/definitions/absent\"},\"scale\":{\"$ref\":\"#/definitions/absent\"},\"period\":{\"$ref\":\"#/definitions/absent\"},\"row\":{\"$ref\":\"#/definitions/absent\"},\"point\":{\"$ref\":\"#/definitions/absent\"},\"zoom\":{\"$ref\":\"#/definitions/absent\"},\"item\":{\"$ref\":\"#/definitions/absent\"},\"role\":{\"$ref\":\"#/definitions/absent\"},\"part\":{\"$ref\":\"#/definitions/absent\"}}},\"steps\":{\"$ref\":\"#/definitions/plainSteps\"}}},\"else\":{\"if\":{\"required\":[\"kind\"],\"properties\":{\"kind\":{\"const\":\"state\"}}},\"then\":{\"properties\":{\"blocks\":{\"required\":[\"box\"],\"properties\":{\"box\":{\"minItems\":1,\"items\":{\"properties\":{\"id\":{\"description\":\"始まりと終わりの印の名前は箱の名札に使えない\",\"not\":{\"enum\":[\"start\",\"finish\"]}}}}},\"strip\":{\"$ref\":\"#/definitions/plainStrip\"},\"branch\":{\"$ref\":\"#/definitions/absent\"},\"scale\":{\"$ref\":\"#/definitions/absent\"},\"period\":{\"$ref\":\"#/definitions/absent\"},\"row\":{\"$ref\":\"#/definitions/absent\"},\"point\":{\"$ref\":\"#/definitions/absent\"},\"zoom\":{\"$ref\":\"#/definitions/absent\"},\"item\":{\"$ref\":\"#/definitions/absent\"},\"role\":{\"$ref\":\"#/definitions/absent\"},\"part\":{\"$ref\":\"#/definitions/absent\"}}},\"steps\":{\"$ref\":\"#/definitions/plainSteps\"}}},\"else\":{\"if\":{\"required\":[\"kind\"],\"properties\":{\"kind\":{\"const\":\"git\"}}},\"then\":{\"properties\":{\"blocks\":{\"required\":[\"branch\"],\"properties\":{\"strip\":{\"$ref\":\"#/definitions/plainStrip\"},\"path\":{\"$ref\":\"#/definitions/absent\"},\"group\":{\"$ref\":\"#/definitions/absent\"},\"scale\":{\"$ref\":\"#/definitions/absent\"},\"period\":{\"$ref\":\"#/definitions/absent\"},\"row\":{\"$ref\":\"#/definitions/absent\"},\"point\":{\"$ref\":\"#/definitions/absent\"},\"zoom\":{\"$ref\":\"#/definitions/absent\"},\"item\":{\"$ref\":\"#/definitions/absent\"},\"role\":{\"$ref\":\"#/definitions/absent\"},\"part\":{\"$ref\":\"#/definitions/absent\"}}},\"steps\":{\"$ref\":\"#/definitions/gitSteps\"}}},\"else\":{\"if\":{\"required\":[\"kind\"],\"properties\":{\"kind\":{\"const\":\"time\"}}},\"then\":{\"properties\":{\"blocks\":{\"required\":[\"scale\",\"row\"],\"properties\":{\"path\":{\"$ref\":\"#/definitions/absent\"},\"branch\":{\"$ref\":\"#/definitions/absent\"},\"group\":{\"$ref\":\"#/definitions/absent\"},\"item\":{\"$ref\":\"#/definitions/absent\"},\"role\":{\"$ref\":\"#/definitions/absent\"},\"part\":{\"$ref\":\"#/definitions/absent\"}}},\"steps\":{\"$ref\":\"#/definitions/timeSteps\"}}},\"else\":{\"if\":{\"required\":[\"kind\"],\"properties\":{\"kind\":{\"const\":\"tree\"}}},\"then\":{\"properties\":{\"blocks\":{\"properties\":{\"strip\":{\"$ref\":\"#/definitions/plainStrip\"},\"path\":{\"$ref\":\"#/definitions/absent\"},\"branch\":{\"$ref\":\"#/definitions/absent\"},\"scale\":{\"$ref\":\"#/definitions/absent\"},\"period\":{\"$ref\":\"#/definitions/absent\"},\"row\":{\"$ref\":\"#/definitions/absent\"},\"point\":{\"$ref\":\"#/definitions/absent\"},\"zoom\":{\"$ref\":\"#/definitions/absent\"},\"group\":{\"$ref\":\"#/definitions/absent\"},\"item\":{\"$ref\":\"#/definitions/absent\"},\"role\":{\"$ref\":\"#/definitions/absent\"},\"part\":{\"$ref\":\"#/definitions/absent\"}}},\"steps\":{\"$ref\":\"#/definitions/treeSteps\"}}},\"else\":{\"if\":{\"required\":[\"kind\"],\"properties\":{\"kind\":{\"const\":\"lineup\"}}},\"then\":{\"properties\":{\"blocks\":{\"required\":[\"box\",\"item\"],\"properties\":{\"box\":{\"minItems\":1,\"items\":{\"properties\":{\"icon\":{\"$ref\":\"#/definitions/absent\"},\"link\":{\"$ref\":\"#/definitions/absent\"},\"region\":{\"$ref\":\"#/definitions/absent\"}}}},\"strip\":{\"$ref\":\"#/definitions/plainStrip\"},\"path\":{\"$ref\":\"#/definitions/absent\"},\"branch\":{\"$ref\":\"#/definitions/absent\"},\"scale\":{\"$ref\":\"#/definitions/absent\"},\"period\":{\"$ref\":\"#/definitions/absent\"},\"row\":{\"$ref\":\"#/definitions/absent\"},\"point\":{\"$ref\":\"#/definitions/absent\"},\"zoom\":{\"$ref\":\"#/definitions/absent\"},\"group\":{\"$ref\":\"#/definitions/absent\"},\"part\":{\"$ref\":\"#/definitions/absent\"},\"item\":{\"items\":{\"$ref\":\"#/definitions/item\"}}}},\"steps\":{\"$ref\":\"#/definitions/lineupSteps\"}}},\"else\":{\"if\":{\"required\":[\"kind\"],\"properties\":{\"kind\":{\"const\":\"try\"}}},\"then\":{\"properties\":{\"blocks\":{\"required\":[\"part\"],\"properties\":{\"item\":{\"items\":{\"$ref\":\"#/definitions/tryItem\"}},\"group\":{\"$ref\":\"#/definitions/absent\"},\"box\":{\"$ref\":\"#/definitions/absent\"},\"strip\":{\"$ref\":\"#/definitions/absent\"},\"path\":{\"$ref\":\"#/definitions/absent\"},\"branch\":{\"$ref\":\"#/definitions/absent\"},\"scale\":{\"$ref\":\"#/definitions/absent\"},\"period\":{\"$ref\":\"#/definitions/absent\"},\"row\":{\"$ref\":\"#/definitions/absent\"},\"point\":{\"$ref\":\"#/definitions/absent\"},\"zoom\":{\"$ref\":\"#/definitions/absent\"},\"role\":{\"$ref\":\"#/definitions/absent\"}}},\"steps\":{\"$ref\":\"#/definitions/trySteps\"}}},\"else\":{\"properties\":{\"blocks\":{\"required\":[\"box\"],\"properties\":{\"box\":{\"minItems\":1},\"strip\":{\"$ref\":\"#/definitions/plainStrip\"},\"path\":{\"$ref\":\"#/definitions/absent\"},\"branch\":{\"$ref\":\"#/definitions/absent\"},\"scale\":{\"$ref\":\"#/definitions/absent\"},\"period\":{\"$ref\":\"#/definitions/absent\"},\"row\":{\"$ref\":\"#/definitions/absent\"},\"point\":{\"$ref\":\"#/definitions/absent\"},\"zoom\":{\"$ref\":\"#/definitions/absent\"},\"item\":{\"$ref\":\"#/definitions/absent\"},\"role\":{\"$ref\":\"#/definitions/absent\"},\"part\":{\"$ref\":\"#/definitions/absent\"}}},\"steps\":{\"$ref\":\"#/definitions/plainSteps\"}}}}}}}}},\"definitions\":{\"text\":{\"type\":\"string\",\"minLength\":1},\"absent\":{\"description\":\"この図の種類では書けない欄\",\"not\":{}},\"plainSteps\":{\"description\":\"枝分かれの図でも時間軸の図でも木の図でも列の図でもない図の段。枝分かれの図だけの出来事 (commit と branch) と、時間軸の図だけの出来事 (now と mark と span) と欄 (at と into と color) と、木の図だけの出来事 (leaf と node) と、列の図だけの出来事 (line と seal と open と pick と stamp と role) と、試す図だけの出来事 (ask と press と item) を書けない\",\"items\":{\"properties\":{\"events\":{\"items\":{\"not\":{\"$ref\":\"#/definitions/timeEvent\"},\"allOf\":[{\"not\":{\"$ref\":\"#/definitions/treeEvent\"}},{\"$ref\":\"#/definitions/notLineupEvent\"},{\"$ref\":\"#/definitions/notTryEvent\"}],\"properties\":{\"type\":{\"not\":{\"enum\":[\"commit\",\"branch\"]}},\"at\":{\"$ref\":\"#/definitions/absent\"},\"into\":{\"$ref\":\"#/definitions/absent\"},\"color\":{\"$ref\":\"#/definitions/absent\"}}}}}}},\"gitSteps\":{\"description\":\"枝分かれの図の段。時間軸の図だけの出来事 (now と mark と span) と欄 (at と into と color) と、木の図だけの出来事 (leaf と node) と、列の図だけの出来事 (line と seal と open と pick と stamp と role) と、試す図だけの出来事 (ask と press と item) を書けない\",\"items\":{\"properties\":{\"events\":{\"items\":{\"not\":{\"$ref\":\"#/definitions/timeEvent\"},\"allOf\":[{\"not\":{\"$ref\":\"#/definitions/treeEvent\"}},{\"$ref\":\"#/definitions/notLineupEvent\"},{\"$ref\":\"#/definitions/notTryEvent\"}],\"properties\":{\"at\":{\"$ref\":\"#/definitions/absent\"},\"into\":{\"$ref\":\"#/definitions/absent\"},\"color\":{\"$ref\":\"#/definitions/absent\"}}}}}}},\"timeSteps\":{\"description\":\"時間軸の図の段。枝分かれの図だけの出来事 (commit と branch) と、木の図だけの出来事 (leaf と node) と、列の図だけの出来事 (line と seal と open と pick と stamp と role) と、試す図だけの出来事 (ask と press と item) を書けない\",\"items\":{\"properties\":{\"events\":{\"items\":{\"allOf\":[{\"not\":{\"$ref\":\"#/definitions/treeEvent\"}},{\"$ref\":\"#/definitions/notLineupEvent\"},{\"$ref\":\"#/definitions/notTryEvent\"}],\"properties\":{\"type\":{\"not\":{\"enum\":[\"commit\",\"branch\"]}}}}}}}},\"treeSteps\":{\"description\":\"木の図の段。枝分かれの図だけの出来事 (commit と branch) と、時間軸の図だけの出来事 (now と mark と span) と欄 (at と into と color) と、列の図だけの出来事 (line と seal と open と pick と stamp と role) と、試す図だけの出来事 (ask と press と item) を書けない\",\"items\":{\"properties\":{\"events\":{\"items\":{\"not\":{\"$ref\":\"#/definitions/timeEvent\"},\"allOf\":[{\"$ref\":\"#/definitions/notLineupEvent\"},{\"$ref\":\"#/definitions/notTryEvent\"}],\"properties\":{\"type\":{\"not\":{\"enum\":[\"commit\",\"branch\"]}},\"at\":{\"$ref\":\"#/definitions/absent\"},\"into\":{\"$ref\":\"#/definitions/absent\"},\"color\":{\"$ref\":\"#/definitions/absent\"}}}}}}},\"lineupSteps\":{\"description\":\"列の図の段。線と処理と、枝分かれの図だけの出来事 (commit と branch) と、時間軸の図だけの出来事 (now と mark と span) と欄 (color) と、木の図だけの出来事 (leaf と node) と、試す図だけの出来事 (ask と press と item) を書けない\",\"items\":{\"properties\":{\"events\":{\"items\":{\"not\":{\"$ref\":\"#/definitions/timeEvent\"},\"allOf\":[{\"not\":{\"$ref\":\"#/definitions/treeEvent\"}},{\"$ref\":\"#/definitions/notWiredEvent\"},{\"$ref\":\"#/definitions/notTryEvent\"}],\"properties\":{\"type\":{\"not\":{\"enum\":[\"commit\",\"branch\"]}},\"color\":{\"$ref\":\"#/definitions/absent\"},\"part\":{\"$ref\":\"#/definitions/absent\"}},\"if\":{\"required\":[\"type\"],\"properties\":{\"type\":{\"const\":\"line\"}}},\"then\":{\"required\":[\"box\"]}}}}}},\"treeEvent\":{\"description\":\"木の図だけが書ける出来事\",\"required\":[\"type\"],\"properties\":{\"type\":{\"enum\":[\"leaf\",\"node\"]}}},\"notLineupEvent\":{\"description\":\"列の図だけが書ける出来事を書けない\",\"not\":{\"required\":[\"type\"],\"properties\":{\"type\":{\"enum\":[\"line\",\"seal\",\"open\",\"pick\",\"stamp\",\"role\"]}}}},\"notWiredEvent\":{\"description\":\"箱と線の図の出来事を書けない\",\"not\":{\"required\":[\"type\"],\"properties\":{\"type\":{\"enum\":[\"edge\",\"action\"]}}}},\"timeEvent\":{\"description\":\"時間軸の図だけが書ける出来事\",\"required\":[\"type\"],\"properties\":{\"type\":{\"enum\":[\"now\",\"mark\",\"span\"]}}},\"id\":{\"type\":\"string\",\"pattern\":\"^[^\\\\s\\\\[\\\\]「」=:]+$\"},\"event\":{\"description\":\"段の中で起きること。起きる順に並べる\",\"type\":\"object\",\"required\":[\"type\"],\"discriminator\":{\"propertyName\":\"type\"},\"oneOf\":[{\"description\":\"枝を切る。枝分かれの図だけが書ける。枝の札を from の commit へ置き、HEAD をその枝へ移す\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"branch\",\"from\"],\"properties\":{\"type\":{\"const\":\"branch\"},\"branch\":{\"$ref\":\"#/definitions/id\"},\"from\":{\"$ref\":\"#/definitions/id\"}}},{\"description\":\"commit を積む。枝分かれの図だけが書ける。積んだ枝の札と、その枝を指す HEAD が進む。当て直し (copy) は枝の札を動かさず、merge commit (merge) は取り込む枝の先端も親に持つ\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"id\",\"branch\"],\"properties\":{\"type\":{\"const\":\"commit\"},\"id\":{\"$ref\":\"#/definitions/id\"},\"branch\":{\"$ref\":\"#/definitions/id\"},\"copy\":{\"$ref\":\"#/definitions/id\"},\"merge\":{\"$ref\":\"#/definitions/id\"},\"hash\":{\"$ref\":\"#/definitions/hash\"},\"note\":{\"$ref\":\"#/definitions/text\"}}},{\"description\":\"中身の帯の欄の値と札\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"field\"],\"anyOf\":[{\"required\":[\"value\"]},{\"required\":[\"tag\"]}],\"properties\":{\"type\":{\"const\":\"strip\"},\"field\":{\"$ref\":\"#/definitions/text\"},\"value\":{\"$ref\":\"#/definitions/text\"},\"tag\":{\"$ref\":\"#/definitions/text\"}}},{\"description\":\"箱の中の処理\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"box\",\"label\"],\"properties\":{\"type\":{\"const\":\"action\"},\"box\":{\"$ref\":\"#/definitions/id\"},\"label\":{\"$ref\":\"#/definitions/text\"}}},{\"description\":\"箱の下の小さな字の書き換え\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"box\",\"text\"],\"properties\":{\"type\":{\"const\":\"swap\"},\"box\":{\"$ref\":\"#/definitions/id\"},\"text\":{\"$ref\":\"#/definitions/text\"},\"color\":{\"description\":\"時間軸の図の節目の丸の色\",\"$ref\":\"#/definitions/color\"}}},{\"description\":\"線。運ぶ物を載せて送る側から受ける側へ走る\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"from\",\"to\",\"carry\"],\"properties\":{\"type\":{\"const\":\"edge\"},\"from\":{\"$ref\":\"#/definitions/id\"},\"to\":{\"$ref\":\"#/definitions/id\"},\"label\":{\"$ref\":\"#/definitions/text\"},\"carry\":{\"$ref\":\"#/definitions/carry\"},\"labelSide\":{\"description\":\"線の名前を置く側 (寄せの指示)\",\"enum\":[\"above\",\"below\",\"left\",\"right\"]},\"at\":{\"description\":\"時間軸の図の拡大の帯で、線を引く列の目盛り\",\"$ref\":\"#/definitions/unit\"},\"into\":{\"description\":\"時間軸の図の拡大の帯で、受ける箱を選ぶ列の目盛り。書かなければ at の列\",\"$ref\":\"#/definitions/unit\"}}},{\"description\":\"時間軸の図の今の時刻の針を、to の目盛りの終わりまで進める\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"to\"],\"properties\":{\"type\":{\"const\":\"now\"},\"to\":{\"$ref\":\"#/definitions/unit\"}}},{\"description\":\"時間軸の図の from から to の目盛りに、括弧と字を出す。shape が box なら印の列を囲み、字を縁の札にする\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"from\",\"to\",\"text\"],\"properties\":{\"type\":{\"const\":\"span\"},\"from\":{\"$ref\":\"#/definitions/unit\"},\"to\":{\"$ref\":\"#/definitions/unit\"},\"text\":{\"$ref\":\"#/definitions/text\"},\"shape\":{\"enum\":[\"box\"]},\"color\":{\"$ref\":\"#/definitions/color\"}}},{\"description\":\"時間軸の図の印の列 row の、from から to の目盛りの印の色を変える\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"row\",\"from\",\"to\",\"color\"],\"properties\":{\"type\":{\"const\":\"mark\"},\"row\":{\"$ref\":\"#/definitions/id\"},\"from\":{\"$ref\":\"#/definitions/unit\"},\"to\":{\"$ref\":\"#/definitions/unit\"},\"color\":{\"$ref\":\"#/definitions/color\"}}},{\"description\":\"葉を出す。木の図だけが書ける。書いた段で葉の箱が現れる。hash を書くと箱に値を出し、名札を葉の下の札に出す\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"id\"],\"properties\":{\"type\":{\"const\":\"leaf\"},\"id\":{\"$ref\":\"#/definitions/id\"},\"hash\":{\"$ref\":\"#/definitions/hash\"}}},{\"description\":\"1 つ以上の子から親を組む。木の図だけが書ける。書いた段で親の箱と、子から親への木の線が現れる\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"id\",\"children\"],\"properties\":{\"type\":{\"const\":\"node\"},\"id\":{\"$ref\":\"#/definitions/id\"},\"children\":{\"type\":\"array\",\"minItems\":1,\"items\":{\"$ref\":\"#/definitions/id\"}},\"hash\":{\"$ref\":\"#/definitions/hash\"}}},{\"description\":\"列の図では列 box の並びを items に書き換える。チップは前に居た列から滑り、どの列にも居なかったチップは弾んで現れ、列から外れたチップは消える。試す図では、待ち行列 part の中身を items の並びにするか、機械の列 part に items を入れた新しいブロックを足す。列の図と試す図だけが書ける\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"items\"],\"properties\":{\"type\":{\"const\":\"line\"},\"box\":{\"$ref\":\"#/definitions/id\"},\"part\":{\"$ref\":\"#/definitions/id\"},\"items\":{\"type\":\"array\",\"minItems\":1,\"maxItems\":12,\"items\":{\"$ref\":\"#/definitions/id\"}}}},{\"description\":\"列 box に封をして、チップを隠す。列の図だけが書ける\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"box\"],\"properties\":{\"type\":{\"const\":\"seal\"},\"box\":{\"$ref\":\"#/definitions/id\"}}},{\"description\":\"列 box の封を開ける。列の図だけが書ける\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"box\"],\"properties\":{\"type\":{\"const\":\"open\"},\"box\":{\"$ref\":\"#/definitions/id\"}}},{\"description\":\"列 box を選ぶ。列の図だけが書ける。列の縁に色が付き、ほかの列が薄くなる\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"box\"],\"properties\":{\"type\":{\"const\":\"pick\"},\"box\":{\"$ref\":\"#/definitions/id\"}}},{\"description\":\"列 box の右に text の札を押す。列の図だけが書ける\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"box\",\"text\"],\"properties\":{\"type\":{\"const\":\"stamp\"},\"box\":{\"$ref\":\"#/definitions/id\"},\"text\":{\"$ref\":\"#/definitions/text\"}}},{\"description\":\"この段で役 role が動く。列の図だけが書ける。役の札の縁が光る\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"role\"],\"properties\":{\"type\":{\"const\":\"role\"},\"role\":{\"$ref\":\"#/definitions/id\"}}},{\"description\":\"入力の帯の欄の値 values (欄の順) でチップを作って送る。試す図だけが書ける。書き手の例として読み手の送る操作を書く\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"values\"],\"properties\":{\"type\":{\"const\":\"ask\"},\"values\":{\"type\":\"array\",\"minItems\":1,\"items\":{\"$ref\":\"#/definitions/text\"}}}},{\"description\":\"チップ item の欄の値を values に書き換える。試す図だけが書ける。読み手の書き換えと同じ\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"item\",\"values\"],\"properties\":{\"type\":{\"const\":\"item\"},\"item\":{\"$ref\":\"#/definitions/id\"},\"values\":{\"$ref\":\"#/definitions/tryValues\"}}},{\"description\":\"釦 press を押す。試す図だけが書ける。釦の待ち行列の上からチップを取り出し、機械の列の新しいブロックへ移す\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"press\"],\"properties\":{\"type\":{\"const\":\"press\"},\"press\":{\"$ref\":\"#/definitions/id\"}}}]},\"hash\":{\"description\":\"commit と木の箱の hash。16 進の字で 4 から 40 字\",\"type\":\"string\",\"pattern\":\"^[0-9a-f]{4,40}$\"},\"unit\":{\"description\":\"目盛りの位置。0 から数える\",\"type\":\"integer\",\"minimum\":0},\"notTryEvent\":{\"description\":\"試す図だけが書ける出来事を書けない\",\"not\":{\"required\":[\"type\"],\"properties\":{\"type\":{\"enum\":[\"ask\",\"press\",\"item\"]}}}},\"trySteps\":{\"description\":\"試す図の段。line と ask と press と item だけを書け、line は列 (box) でなく部品 (part) を名指す\",\"items\":{\"properties\":{\"events\":{\"items\":{\"properties\":{\"type\":{\"enum\":[\"line\",\"ask\",\"press\",\"item\"]},\"box\":{\"$ref\":\"#/definitions/absent\"}},\"if\":{\"required\":[\"type\"],\"properties\":{\"type\":{\"const\":\"line\"}}},\"then\":{\"required\":[\"part\"]}}}}}},\"part\":{\"description\":\"試す図の部品。網 (route)、待ち行列 (queue)、機械の列 (chain)、入力の帯 (ask)、釦 (press)\",\"type\":\"object\",\"required\":[\"type\"],\"discriminator\":{\"propertyName\":\"type\"},\"oneOf\":[{\"description\":\"網。paths は - でつないだ節の並びで、from の節から to の節へ最短の道でチップを運ぶ\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"id\",\"paths\",\"from\",\"to\"],\"properties\":{\"type\":{\"const\":\"route\"},\"id\":{\"$ref\":\"#/definitions/id\"},\"paths\":{\"type\":\"array\",\"minItems\":1,\"items\":{\"type\":\"array\",\"minItems\":2,\"items\":{\"$ref\":\"#/definitions/id\"}}},\"from\":{\"$ref\":\"#/definitions/id\"},\"to\":{\"$ref\":\"#/definitions/id\"}}},{\"description\":\"待ち行列。order の欄の値の高い順 (同じ値は入った順) にチップを上から並べる。order を書かなければ入った順\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"id\"],\"properties\":{\"type\":{\"const\":\"queue\"},\"id\":{\"$ref\":\"#/definitions/id\"},\"order\":{\"$ref\":\"#/definitions/id\"}}},{\"description\":\"機械の列 (ブロックの鎖)。edit を書いた時だけ、読み手がブロックの中のチップのその欄を書き換えられる\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"id\"],\"properties\":{\"type\":{\"const\":\"chain\"},\"id\":{\"$ref\":\"#/definitions/id\"},\"edit\":{\"$ref\":\"#/definitions/id\"}}},{\"description\":\"入力の帯。図に 1 つまでで、id は常に ask。最初の欄の値がチップの名前になる。into の待ち行列へ、via の網を通って送る\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"id\",\"fields\",\"into\"],\"properties\":{\"type\":{\"const\":\"ask\"},\"id\":{\"const\":\"ask\"},\"fields\":{\"type\":\"array\",\"minItems\":2,\"items\":{\"$ref\":\"#/definitions/id\"}},\"into\":{\"$ref\":\"#/definitions/id\"},\"via\":{\"$ref\":\"#/definitions/id\"}}},{\"description\":\"釦。from の待ち行列の上から take 件を、into の機械の列の新しいブロックへ移す。at は釦を置く部品 (書かなければ入力の帯)\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"id\",\"from\",\"into\",\"take\"],\"properties\":{\"type\":{\"const\":\"press\"},\"id\":{\"$ref\":\"#/definitions/id\"},\"from\":{\"$ref\":\"#/definitions/id\"},\"into\":{\"$ref\":\"#/definitions/id\"},\"take\":{\"type\":\"integer\",\"minimum\":1},\"at\":{\"$ref\":\"#/definitions/id\"}}}]},\"tryItem\":{\"description\":\"試す図のチップ。名札がチップの名前 (入力の帯の最初の欄の値) になり、values の鍵は入力の帯の残りの欄\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"id\",\"values\"],\"properties\":{\"id\":{\"$ref\":\"#/definitions/id\"},\"values\":{\"$ref\":\"#/definitions/tryValues\"}}},\"tryValues\":{\"description\":\"チップの欄の値。鍵は入力の帯の欄で、値は字\",\"type\":\"object\",\"additionalProperties\":{\"$ref\":\"#/definitions/text\"}},\"branch\":{\"description\":\"枝。帯の左に名札と添え書きを置く\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"id\"],\"properties\":{\"id\":{\"$ref\":\"#/definitions/id\"},\"note\":{\"$ref\":\"#/definitions/text\"}}},\"region\":{\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"id\",\"name\"],\"properties\":{\"id\":{\"$ref\":\"#/definitions/id\"},\"name\":{\"$ref\":\"#/definitions/text\"},\"note\":{\"$ref\":\"#/definitions/text\"},\"color\":{\"$ref\":\"#/definitions/color\"},\"icon\":{\"$ref\":\"#/definitions/icon\"}}},\"box\":{\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"id\",\"name\"],\"properties\":{\"id\":{\"$ref\":\"#/definitions/id\"},\"name\":{\"$ref\":\"#/definitions/text\"},\"sub\":{\"$ref\":\"#/definitions/text\"},\"color\":{\"$ref\":\"#/definitions/color\"},\"icon\":{\"$ref\":\"#/definitions/icon\"},\"region\":{\"$ref\":\"#/definitions/id\"},\"link\":{\"description\":\"飛び先。描いた図ではこの箱がここへの link になる\",\"$ref\":\"#/definitions/url\"},\"order\":{\"description\":\"列の図の箱の並べ方。none は順番の無い置き場で、チップを散らして置く。書かない箱は上から実行する札で、チップを line に書いた順に積む\",\"enum\":[\"none\"]}}},\"plainStrip\":{\"description\":\"時間軸の図でない図の中身の帯。物差しを書けない\",\"properties\":{\"meters\":{\"$ref\":\"#/definitions/absent\"}}},\"strip\":{\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"title\",\"fields\"],\"properties\":{\"title\":{\"$ref\":\"#/definitions/text\"},\"fields\":{\"type\":\"array\",\"minItems\":1,\"items\":{\"$ref\":\"#/definitions/text\"}},\"meters\":{\"description\":\"物差しにする欄。時間軸の図だけが書ける\",\"type\":\"array\",\"minItems\":1,\"items\":{\"$ref\":\"#/definitions/meter\"}}}},\"meter\":{\"description\":\"物差しの欄。line の割合の所に線を引き、set の値まで針と一緒に満ちる\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"field\",\"line\"],\"properties\":{\"field\":{\"$ref\":\"#/definitions/text\"},\"line\":{\"$ref\":\"#/definitions/ratio\"}}},\"ratio\":{\"description\":\"割合。分数 (2/3) か百分率 (97%)\",\"type\":\"string\",\"pattern\":\"^([0-9]+/[0-9]+|[0-9]+(\\\\.[0-9]+)?%)$\"},\"path\":{\"description\":\"移れる道。送る側に始まりの印 start、受ける側に終わりの印 finish を書ける。どの段にも出ない道は点線で描き、運ぶ物を走らせない\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"from\",\"to\"],\"properties\":{\"from\":{\"$ref\":\"#/definitions/id\"},\"to\":{\"$ref\":\"#/definitions/id\"},\"label\":{\"$ref\":\"#/definitions/text\"}}},\"step\":{\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"title\",\"body\",\"events\"],\"properties\":{\"title\":{\"$ref\":\"#/definitions/text\"},\"body\":{\"$ref\":\"#/definitions/text\"},\"code\":{\"$ref\":\"#/definitions/text\"},\"sources\":{\"description\":\"段の出典。読み上げの段の一覧に、名前を URL への link にして書いた順に出す\",\"type\":\"array\",\"minItems\":1,\"items\":{\"$ref\":\"#/definitions/source\"}},\"events\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/event\"}}}},\"source\":{\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"name\",\"url\"],\"properties\":{\"name\":{\"$ref\":\"#/definitions/text\"},\"url\":{\"$ref\":\"#/definitions/url\"}}},\"carry\":{\"description\":\"線の上を走る物。封筒 (メッセージや要求)、札 (名前のある値)、硬貨 (価値)、無し\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"kind\"],\"properties\":{\"kind\":{\"enum\":[\"envelope\",\"tag\",\"coin\",\"none\"]},\"text\":{\"$ref\":\"#/definitions/text\"}},\"if\":{\"required\":[\"kind\"],\"properties\":{\"kind\":{\"const\":\"tag\"}}},\"then\":{\"required\":[\"text\"]},\"else\":{\"not\":{\"required\":[\"text\"]}}},\"color\":{\"enum\":[\"blue\",\"amber\",\"green\",\"violet\",\"rose\",\"slate\",\"coin\"]},\"icon\":{\"description\":\"箱と区画のアイコン名。描く部品のアイコンの表 (ICONS) に在る名前だけ\",\"enum\":[\"app\",\"router\",\"on\",\"off\",\"pool\",\"db\",\"exe\",\"idx\",\"sign\",\"env\",\"lock\",\"check\",\"flag\",\"x\",\"chain\",\"net\",\"user\",\"server\",\"key\",\"shield\",\"globe\",\"bolt\",\"doc\",\"box\",\"truck\",\"card\",\"cart\",\"clock\",\"branch\",\"cloud\",\"refresh\",\"undo\",\"yen\",\"layers\",\"code\",\"paint\",\"tree\",\"block\"]},\"url\":{\"description\":\"頁を移る形。/ で始まる path か、http:// か https:// で始まる URL\",\"type\":\"string\",\"pattern\":\"^(/|https?://)\"},\"scale\":{\"description\":\"目盛り。unit の名前の目盛りを length の長さで count 個並べ、最初の目盛りの番号を from にする\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"unit\",\"length\",\"count\"],\"properties\":{\"unit\":{\"$ref\":\"#/definitions/text\"},\"length\":{\"$ref\":\"#/definitions/duration\"},\"count\":{\"type\":\"integer\",\"minimum\":1},\"from\":{\"type\":\"integer\",\"minimum\":0}}},\"duration\":{\"description\":\"長さ。数と単位 (ms、s、min、h、d) の組\",\"type\":\"string\",\"pattern\":\"^[0-9]+(\\\\.[0-9]+)?(ms|s|min|h|d)$\"},\"period\":{\"description\":\"区切り。目盛り length 個ごとに name の区切りを置き、最初の区切りの番号を from にする\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"name\",\"length\"],\"properties\":{\"name\":{\"$ref\":\"#/definitions/text\"},\"length\":{\"type\":\"integer\",\"minimum\":1},\"from\":{\"type\":\"integer\",\"minimum\":0}}},\"row\":{\"description\":\"印の列。目盛りごとに印を 1 つ置き、empty の目盛りは空きの印にする\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"id\",\"name\"],\"properties\":{\"id\":{\"$ref\":\"#/definitions/id\"},\"name\":{\"$ref\":\"#/definitions/text\"},\"color\":{\"$ref\":\"#/definitions/color\"},\"empty\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/unit\"}}}},\"point\":{\"description\":\"節目。at の目盛りの印の下に旗の丸と名札を置く\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"id\",\"at\"],\"properties\":{\"id\":{\"$ref\":\"#/definitions/id\"},\"at\":{\"$ref\":\"#/definitions/unit\"}}},\"zoom\":{\"description\":\"拡大の範囲。from から to の目盛りごとに拡大の帯に列を作る\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"from\",\"to\"],\"properties\":{\"from\":{\"$ref\":\"#/definitions/unit\"},\"to\":{\"$ref\":\"#/definitions/unit\"}}},\"item\":{\"description\":\"チップ。color を書かないチップは薄い色で、label を書かないチップは名前を出す。note を書いたチップは図の下の凡例にその説明を出す\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"id\"],\"properties\":{\"id\":{\"$ref\":\"#/definitions/id\"},\"color\":{\"$ref\":\"#/definitions/color\"},\"label\":{\"description\":\"チップに載せる字\",\"type\":\"string\",\"minLength\":1,\"maxLength\":4},\"note\":{\"description\":\"図の下の凡例に出す、チップの説明\",\"$ref\":\"#/definitions/text\"}}},\"role\":{\"description\":\"役。チップを持たずに動く者で、箱の上に札として並び、段の中の role の出来事で光る\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"id\"],\"properties\":{\"id\":{\"$ref\":\"#/definitions/id\"},\"note\":{\"description\":\"役の札の名前の下の一言\",\"$ref\":\"#/definitions/text\"}}}}};const schema12 = {\"description\":\"この図の種類では書けない欄\",\"not\":{}};const schema103 = {\"type\":\"string\",\"minLength\":1};const schema13 = {\"description\":\"時間軸の図でない図の中身の帯。物差しを書けない\",\"properties\":{\"meters\":{\"$ref\":\"#/definitions/absent\"}}};function validate11(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.meters !== undefined){const err0 = {instancePath:instancePath+\"/meters\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}}validate11.errors = vErrors;return errors === 0;}const schema25 = {\"description\":\"枝分かれの図でも時間軸の図でも木の図でも列の図でもない図の段。枝分かれの図だけの出来事 (commit と branch) と、時間軸の図だけの出来事 (now と mark と span) と欄 (at と into と color) と、木の図だけの出来事 (leaf と node) と、列の図だけの出来事 (line と seal と open と pick と stamp と role) と、試す図だけの出来事 (ask と press と item) を書けない\",\"items\":{\"properties\":{\"events\":{\"items\":{\"not\":{\"$ref\":\"#/definitions/timeEvent\"},\"allOf\":[{\"not\":{\"$ref\":\"#/definitions/treeEvent\"}},{\"$ref\":\"#/definitions/notLineupEvent\"},{\"$ref\":\"#/definitions/notTryEvent\"}],\"properties\":{\"type\":{\"not\":{\"enum\":[\"commit\",\"branch\"]}},\"at\":{\"$ref\":\"#/definitions/absent\"},\"into\":{\"$ref\":\"#/definitions/absent\"},\"color\":{\"$ref\":\"#/definitions/absent\"}}}}}}};const schema26 = {\"description\":\"時間軸の図だけが書ける出来事\",\"required\":[\"type\"],\"properties\":{\"type\":{\"enum\":[\"now\",\"mark\",\"span\"]}}};const schema27 = {\"description\":\"木の図だけが書ける出来事\",\"required\":[\"type\"],\"properties\":{\"type\":{\"enum\":[\"leaf\",\"node\"]}}};const schema28 = {\"description\":\"列の図だけが書ける出来事を書けない\",\"not\":{\"required\":[\"type\"],\"properties\":{\"type\":{\"enum\":[\"line\",\"seal\",\"open\",\"pick\",\"stamp\",\"role\"]}}}};const schema29 = {\"description\":\"試す図だけが書ける出来事を書けない\",\"not\":{\"required\":[\"type\"],\"properties\":{\"type\":{\"enum\":[\"ask\",\"press\",\"item\"]}}}};function validate13(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(Array.isArray(data)){const len0 = data.length;for(let i0=0; i0<len0; i0++){let data0 = data[i0];if(data0 && typeof data0 == \"object\" && !Array.isArray(data0)){if(data0.events !== undefined){let data1 = data0.events;if(Array.isArray(data1)){const len1 = data1.length;for(let i1=0; i1<len1; i1++){let data2 = data1[i1];const _errs3 = errors;const _errs4 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){let missing0;if((data2.type === undefined) && (missing0 = \"type\")){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data2.type !== undefined){let data3 = data2.type;if(!(((data3 === \"now\") || (data3 === \"mark\")) || (data3 === \"span\"))){const err1 = {};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}}}var valid5 = _errs4 === errors;if(valid5){const err2 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/items/properties/events/items/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}else {errors = _errs3;if(vErrors !== null){if(_errs3){vErrors.length = _errs3;}else {vErrors = null;}}}const _errs8 = errors;const _errs9 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){let missing1;if((data2.type === undefined) && (missing1 = \"type\")){const err3 = {};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}else {if(data2.type !== undefined){let data4 = data2.type;if(!((data4 === \"leaf\") || (data4 === \"node\"))){const err4 = {};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}}}var valid9 = _errs9 === errors;if(valid9){const err5 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/items/properties/events/items/allOf/0/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}else {errors = _errs8;if(vErrors !== null){if(_errs8){vErrors.length = _errs8;}else {vErrors = null;}}}const _errs14 = errors;const _errs15 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){let missing2;if((data2.type === undefined) && (missing2 = \"type\")){const err6 = {};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {if(data2.type !== undefined){let data5 = data2.type;if(!((((((data5 === \"line\") || (data5 === \"seal\")) || (data5 === \"open\")) || (data5 === \"pick\")) || (data5 === \"stamp\")) || (data5 === \"role\"))){const err7 = {};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}}}var valid13 = _errs15 === errors;if(valid13){const err8 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/definitions/notLineupEvent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}else {errors = _errs14;if(vErrors !== null){if(_errs14){vErrors.length = _errs14;}else {vErrors = null;}}}const _errs19 = errors;const _errs20 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){let missing3;if((data2.type === undefined) && (missing3 = \"type\")){const err9 = {};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}else {if(data2.type !== undefined){let data6 = data2.type;if(!(((data6 === \"ask\") || (data6 === \"press\")) || (data6 === \"item\"))){const err10 = {};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}}}var valid16 = _errs20 === errors;if(valid16){const err11 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/definitions/notTryEvent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}else {errors = _errs19;if(vErrors !== null){if(_errs19){vErrors.length = _errs19;}else {vErrors = null;}}}if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){if(data2.type !== undefined){let data7 = data2.type;const _errs23 = errors;const _errs24 = errors;if(!((data7 === \"commit\") || (data7 === \"branch\"))){const err12 = {};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var valid19 = _errs24 === errors;if(valid19){const err13 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1+\"/type\",schemaPath:\"#/items/properties/events/items/properties/type/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}else {errors = _errs23;if(vErrors !== null){if(_errs23){vErrors.length = _errs23;}else {vErrors = null;}}}}if(data2.at !== undefined){const err14 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1+\"/at\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}if(data2.into !== undefined){const err15 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1+\"/into\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}if(data2.color !== undefined){const err16 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1+\"/color\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}}}}}}}validate13.errors = vErrors;return errors === 0;}const schema52 = {\"description\":\"枝分かれの図の段。時間軸の図だけの出来事 (now と mark と span) と欄 (at と into と color) と、木の図だけの出来事 (leaf と node) と、列の図だけの出来事 (line と seal と open と pick と stamp と role) と、試す図だけの出来事 (ask と press と item) を書けない\",\"items\":{\"properties\":{\"events\":{\"items\":{\"not\":{\"$ref\":\"#/definitions/timeEvent\"},\"allOf\":[{\"not\":{\"$ref\":\"#/definitions/treeEvent\"}},{\"$ref\":\"#/definitions/notLineupEvent\"},{\"$ref\":\"#/definitions/notTryEvent\"}],\"properties\":{\"at\":{\"$ref\":\"#/definitions/absent\"},\"into\":{\"$ref\":\"#/definitions/absent\"},\"color\":{\"$ref\":\"#/definitions/absent\"}}}}}}};function validate18(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(Array.isArray(data)){const len0 = data.length;for(let i0=0; i0<len0; i0++){let data0 = data[i0];if(data0 && typeof data0 == \"object\" && !Array.isArray(data0)){if(data0.events !== undefined){let data1 = data0.events;if(Array.isArray(data1)){const len1 = data1.length;for(let i1=0; i1<len1; i1++){let data2 = data1[i1];const _errs3 = errors;const _errs4 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){let missing0;if((data2.type === undefined) && (missing0 = \"type\")){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data2.type !== undefined){let data3 = data2.type;if(!(((data3 === \"now\") || (data3 === \"mark\")) || (data3 === \"span\"))){const err1 = {};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}}}var valid5 = _errs4 === errors;if(valid5){const err2 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/items/properties/events/items/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}else {errors = _errs3;if(vErrors !== null){if(_errs3){vErrors.length = _errs3;}else {vErrors = null;}}}const _errs8 = errors;const _errs9 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){let missing1;if((data2.type === undefined) && (missing1 = \"type\")){const err3 = {};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}else {if(data2.type !== undefined){let data4 = data2.type;if(!((data4 === \"leaf\") || (data4 === \"node\"))){const err4 = {};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}}}var valid9 = _errs9 === errors;if(valid9){const err5 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/items/properties/events/items/allOf/0/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}else {errors = _errs8;if(vErrors !== null){if(_errs8){vErrors.length = _errs8;}else {vErrors = null;}}}const _errs14 = errors;const _errs15 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){let missing2;if((data2.type === undefined) && (missing2 = \"type\")){const err6 = {};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {if(data2.type !== undefined){let data5 = data2.type;if(!((((((data5 === \"line\") || (data5 === \"seal\")) || (data5 === \"open\")) || (data5 === \"pick\")) || (data5 === \"stamp\")) || (data5 === \"role\"))){const err7 = {};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}}}var valid13 = _errs15 === errors;if(valid13){const err8 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/definitions/notLineupEvent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}else {errors = _errs14;if(vErrors !== null){if(_errs14){vErrors.length = _errs14;}else {vErrors = null;}}}const _errs19 = errors;const _errs20 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){let missing3;if((data2.type === undefined) && (missing3 = \"type\")){const err9 = {};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}else {if(data2.type !== undefined){let data6 = data2.type;if(!(((data6 === \"ask\") || (data6 === \"press\")) || (data6 === \"item\"))){const err10 = {};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}}}var valid16 = _errs20 === errors;if(valid16){const err11 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/definitions/notTryEvent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}else {errors = _errs19;if(vErrors !== null){if(_errs19){vErrors.length = _errs19;}else {vErrors = null;}}}if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){if(data2.at !== undefined){const err12 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1+\"/at\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}if(data2.into !== undefined){const err13 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1+\"/into\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}if(data2.color !== undefined){const err14 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1+\"/color\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}}}}}}}validate18.errors = vErrors;return errors === 0;}const schema66 = {\"description\":\"時間軸の図の段。枝分かれの図だけの出来事 (commit と branch) と、木の図だけの出来事 (leaf と node) と、列の図だけの出来事 (line と seal と open と pick と stamp と role) と、試す図だけの出来事 (ask と press と item) を書けない\",\"items\":{\"properties\":{\"events\":{\"items\":{\"allOf\":[{\"not\":{\"$ref\":\"#/definitions/treeEvent\"}},{\"$ref\":\"#/definitions/notLineupEvent\"},{\"$ref\":\"#/definitions/notTryEvent\"}],\"properties\":{\"type\":{\"not\":{\"enum\":[\"commit\",\"branch\"]}}}}}}}};function validate20(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(Array.isArray(data)){const len0 = data.length;for(let i0=0; i0<len0; i0++){let data0 = data[i0];if(data0 && typeof data0 == \"object\" && !Array.isArray(data0)){if(data0.events !== undefined){let data1 = data0.events;if(Array.isArray(data1)){const len1 = data1.length;for(let i1=0; i1<len1; i1++){let data2 = data1[i1];const _errs4 = errors;const _errs5 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){let missing0;if((data2.type === undefined) && (missing0 = \"type\")){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data2.type !== undefined){let data3 = data2.type;if(!((data3 === \"leaf\") || (data3 === \"node\"))){const err1 = {};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}}}var valid6 = _errs5 === errors;if(valid6){const err2 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/items/properties/events/items/allOf/0/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}else {errors = _errs4;if(vErrors !== null){if(_errs4){vErrors.length = _errs4;}else {vErrors = null;}}}const _errs10 = errors;const _errs11 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){let missing1;if((data2.type === undefined) && (missing1 = \"type\")){const err3 = {};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}else {if(data2.type !== undefined){let data4 = data2.type;if(!((((((data4 === \"line\") || (data4 === \"seal\")) || (data4 === \"open\")) || (data4 === \"pick\")) || (data4 === \"stamp\")) || (data4 === \"role\"))){const err4 = {};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}}}var valid10 = _errs11 === errors;if(valid10){const err5 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/definitions/notLineupEvent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}else {errors = _errs10;if(vErrors !== null){if(_errs10){vErrors.length = _errs10;}else {vErrors = null;}}}const _errs15 = errors;const _errs16 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){let missing2;if((data2.type === undefined) && (missing2 = \"type\")){const err6 = {};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {if(data2.type !== undefined){let data5 = data2.type;if(!(((data5 === \"ask\") || (data5 === \"press\")) || (data5 === \"item\"))){const err7 = {};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}}}var valid13 = _errs16 === errors;if(valid13){const err8 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/definitions/notTryEvent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}else {errors = _errs15;if(vErrors !== null){if(_errs15){vErrors.length = _errs15;}else {vErrors = null;}}}if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){if(data2.type !== undefined){let data6 = data2.type;const _errs19 = errors;const _errs20 = errors;if(!((data6 === \"commit\") || (data6 === \"branch\"))){const err9 = {};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var valid16 = _errs20 === errors;if(valid16){const err10 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1+\"/type\",schemaPath:\"#/items/properties/events/items/properties/type/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}else {errors = _errs19;if(vErrors !== null){if(_errs19){vErrors.length = _errs19;}else {vErrors = null;}}}}}}}}}}}validate20.errors = vErrors;return errors === 0;}const schema81 = {\"description\":\"木の図の段。枝分かれの図だけの出来事 (commit と branch) と、時間軸の図だけの出来事 (now と mark と span) と欄 (at と into と color) と、列の図だけの出来事 (line と seal と open と pick と stamp と role) と、試す図だけの出来事 (ask と press と item) を書けない\",\"items\":{\"properties\":{\"events\":{\"items\":{\"not\":{\"$ref\":\"#/definitions/timeEvent\"},\"allOf\":[{\"$ref\":\"#/definitions/notLineupEvent\"},{\"$ref\":\"#/definitions/notTryEvent\"}],\"properties\":{\"type\":{\"not\":{\"enum\":[\"commit\",\"branch\"]}},\"at\":{\"$ref\":\"#/definitions/absent\"},\"into\":{\"$ref\":\"#/definitions/absent\"},\"color\":{\"$ref\":\"#/definitions/absent\"}}}}}}};function validate23(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(Array.isArray(data)){const len0 = data.length;for(let i0=0; i0<len0; i0++){let data0 = data[i0];if(data0 && typeof data0 == \"object\" && !Array.isArray(data0)){if(data0.events !== undefined){let data1 = data0.events;if(Array.isArray(data1)){const len1 = data1.length;for(let i1=0; i1<len1; i1++){let data2 = data1[i1];const _errs3 = errors;const _errs4 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){let missing0;if((data2.type === undefined) && (missing0 = \"type\")){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data2.type !== undefined){let data3 = data2.type;if(!(((data3 === \"now\") || (data3 === \"mark\")) || (data3 === \"span\"))){const err1 = {};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}}}var valid5 = _errs4 === errors;if(valid5){const err2 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/items/properties/events/items/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}else {errors = _errs3;if(vErrors !== null){if(_errs3){vErrors.length = _errs3;}else {vErrors = null;}}}const _errs9 = errors;const _errs10 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){let missing1;if((data2.type === undefined) && (missing1 = \"type\")){const err3 = {};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}else {if(data2.type !== undefined){let data4 = data2.type;if(!((((((data4 === \"line\") || (data4 === \"seal\")) || (data4 === \"open\")) || (data4 === \"pick\")) || (data4 === \"stamp\")) || (data4 === \"role\"))){const err4 = {};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}}}var valid10 = _errs10 === errors;if(valid10){const err5 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/definitions/notLineupEvent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}else {errors = _errs9;if(vErrors !== null){if(_errs9){vErrors.length = _errs9;}else {vErrors = null;}}}const _errs14 = errors;const _errs15 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){let missing2;if((data2.type === undefined) && (missing2 = \"type\")){const err6 = {};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {if(data2.type !== undefined){let data5 = data2.type;if(!(((data5 === \"ask\") || (data5 === \"press\")) || (data5 === \"item\"))){const err7 = {};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}}}var valid13 = _errs15 === errors;if(valid13){const err8 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/definitions/notTryEvent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}else {errors = _errs14;if(vErrors !== null){if(_errs14){vErrors.length = _errs14;}else {vErrors = null;}}}if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){if(data2.type !== undefined){let data6 = data2.type;const _errs18 = errors;const _errs19 = errors;if(!((data6 === \"commit\") || (data6 === \"branch\"))){const err9 = {};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var valid16 = _errs19 === errors;if(valid16){const err10 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1+\"/type\",schemaPath:\"#/items/properties/events/items/properties/type/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}else {errors = _errs18;if(vErrors !== null){if(_errs18){vErrors.length = _errs18;}else {vErrors = null;}}}}if(data2.at !== undefined){const err11 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1+\"/at\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}if(data2.into !== undefined){const err12 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1+\"/into\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}if(data2.color !== undefined){const err13 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1+\"/color\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}}}}}}}validate23.errors = vErrors;return errors === 0;}const schema100 = {\"description\":\"チップ。color を書かないチップは薄い色で、label を書かないチップは名前を出す。note を書いたチップは図の下の凡例にその説明を出す\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"id\"],\"properties\":{\"id\":{\"$ref\":\"#/definitions/id\"},\"color\":{\"$ref\":\"#/definitions/color\"},\"label\":{\"description\":\"チップに載せる字\",\"type\":\"string\",\"minLength\":1,\"maxLength\":4},\"note\":{\"description\":\"図の下の凡例に出す、チップの説明\",\"$ref\":\"#/definitions/text\"}}};const schema101 = {\"type\":\"string\",\"pattern\":\"^[^\\\\s\\\\[\\\\]「」=:]+$\"};const schema102 = {\"enum\":[\"blue\",\"amber\",\"green\",\"violet\",\"rose\",\"slate\",\"coin\"]};const pattern0 = new RegExp(\"^[^\\\\s\\\\[\\\\]「」=:]+$\", \"u\");const func2 = ucs2length;function validate26(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"id\"},message:\"must have required property '\"+\"id\"+\"'\"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}for(const key0 in data){if(!((((key0 === \"id\") || (key0 === \"color\")) || (key0 === \"label\")) || (key0 === \"note\"))){const err1 = {instancePath,schemaPath:\"#/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key0},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.id !== undefined){let data0 = data.id;if(typeof data0 === \"string\"){if(!pattern0.test(data0)){const err2 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}else {const err3 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.color !== undefined){let data1 = data.color;if(!(((((((data1 === \"blue\") || (data1 === \"amber\")) || (data1 === \"green\")) || (data1 === \"violet\")) || (data1 === \"rose\")) || (data1 === \"slate\")) || (data1 === \"coin\"))){const err4 = {instancePath:instancePath+\"/color\",schemaPath:\"#/definitions/color/enum\",keyword:\"enum\",params:{allowedValues: schema102.enum},message:\"must be equal to one of the allowed values\"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.label !== undefined){let data2 = data.label;if(typeof data2 === \"string\"){if(func2(data2) > 4){const err5 = {instancePath:instancePath+\"/label\",schemaPath:\"#/properties/label/maxLength\",keyword:\"maxLength\",params:{limit: 4},message:\"must NOT have more than 4 characters\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(func2(data2) < 1){const err6 = {instancePath:instancePath+\"/label\",schemaPath:\"#/properties/label/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}else {const err7 = {instancePath:instancePath+\"/label\",schemaPath:\"#/properties/label/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.note !== undefined){let data3 = data.note;if(typeof data3 === \"string\"){if(func2(data3) < 1){const err8 = {instancePath:instancePath+\"/note\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}else {const err9 = {instancePath:instancePath+\"/note\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}}else {const err10 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}validate26.errors = vErrors;return errors === 0;}const schema104 = {\"description\":\"列の図の段。線と処理と、枝分かれの図だけの出来事 (commit と branch) と、時間軸の図だけの出来事 (now と mark と span) と欄 (color) と、木の図だけの出来事 (leaf と node) と、試す図だけの出来事 (ask と press と item) を書けない\",\"items\":{\"properties\":{\"events\":{\"items\":{\"not\":{\"$ref\":\"#/definitions/timeEvent\"},\"allOf\":[{\"not\":{\"$ref\":\"#/definitions/treeEvent\"}},{\"$ref\":\"#/definitions/notWiredEvent\"},{\"$ref\":\"#/definitions/notTryEvent\"}],\"properties\":{\"type\":{\"not\":{\"enum\":[\"commit\",\"branch\"]}},\"color\":{\"$ref\":\"#/definitions/absent\"},\"part\":{\"$ref\":\"#/definitions/absent\"}},\"if\":{\"required\":[\"type\"],\"properties\":{\"type\":{\"const\":\"line\"}}},\"then\":{\"required\":[\"box\"]}}}}}};const schema107 = {\"description\":\"箱と線の図の出来事を書けない\",\"not\":{\"required\":[\"type\"],\"properties\":{\"type\":{\"enum\":[\"edge\",\"action\"]}}}};function validate28(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(Array.isArray(data)){const len0 = data.length;for(let i0=0; i0<len0; i0++){let data0 = data[i0];if(data0 && typeof data0 == \"object\" && !Array.isArray(data0)){if(data0.events !== undefined){let data1 = data0.events;if(Array.isArray(data1)){const len1 = data1.length;for(let i1=0; i1<len1; i1++){let data2 = data1[i1];const _errs3 = errors;const _errs4 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){let missing0;if((data2.type === undefined) && (missing0 = \"type\")){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data2.type !== undefined){let data3 = data2.type;if(!(((data3 === \"now\") || (data3 === \"mark\")) || (data3 === \"span\"))){const err1 = {};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}}}var valid5 = _errs4 === errors;if(valid5){const err2 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/items/properties/events/items/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}else {errors = _errs3;if(vErrors !== null){if(_errs3){vErrors.length = _errs3;}else {vErrors = null;}}}const _errs8 = errors;const _errs9 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){let missing1;if((data2.type === undefined) && (missing1 = \"type\")){const err3 = {};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}else {if(data2.type !== undefined){let data4 = data2.type;if(!((data4 === \"leaf\") || (data4 === \"node\"))){const err4 = {};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}}}var valid9 = _errs9 === errors;if(valid9){const err5 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/items/properties/events/items/allOf/0/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}else {errors = _errs8;if(vErrors !== null){if(_errs8){vErrors.length = _errs8;}else {vErrors = null;}}}const _errs14 = errors;const _errs15 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){let missing2;if((data2.type === undefined) && (missing2 = \"type\")){const err6 = {};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {if(data2.type !== undefined){let data5 = data2.type;if(!((data5 === \"edge\") || (data5 === \"action\"))){const err7 = {};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}}}var valid13 = _errs15 === errors;if(valid13){const err8 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/definitions/notWiredEvent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}else {errors = _errs14;if(vErrors !== null){if(_errs14){vErrors.length = _errs14;}else {vErrors = null;}}}const _errs19 = errors;const _errs20 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){let missing3;if((data2.type === undefined) && (missing3 = \"type\")){const err9 = {};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}else {if(data2.type !== undefined){let data6 = data2.type;if(!(((data6 === \"ask\") || (data6 === \"press\")) || (data6 === \"item\"))){const err10 = {};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}}}var valid16 = _errs20 === errors;if(valid16){const err11 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/definitions/notTryEvent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}else {errors = _errs19;if(vErrors !== null){if(_errs19){vErrors.length = _errs19;}else {vErrors = null;}}}const _errs22 = errors;let valid18 = true;const _errs23 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){let missing4;if((data2.type === undefined) && (missing4 = \"type\")){const err12 = {};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}else {if(data2.type !== undefined){if(\"line\" !== data2.type){const err13 = {};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}}}var _valid0 = _errs23 === errors;errors = _errs22;if(vErrors !== null){if(_errs22){vErrors.length = _errs22;}else {vErrors = null;}}if(_valid0){const _errs25 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){if(data2.box === undefined){const err14 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/items/properties/events/items/then/required\",keyword:\"required\",params:{missingProperty: \"box\"},message:\"must have required property '\"+\"box\"+\"'\"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}var _valid0 = _errs25 === errors;valid18 = _valid0;}if(!valid18){const err15 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/items/properties/events/items/if\",keyword:\"if\",params:{failingKeyword: \"then\"},message:\"must match \\\"then\\\" schema\"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){if(data2.type !== undefined){let data8 = data2.type;const _errs27 = errors;const _errs28 = errors;if(!((data8 === \"commit\") || (data8 === \"branch\"))){const err16 = {};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}var valid21 = _errs28 === errors;if(valid21){const err17 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1+\"/type\",schemaPath:\"#/items/properties/events/items/properties/type/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}else {errors = _errs27;if(vErrors !== null){if(_errs27){vErrors.length = _errs27;}else {vErrors = null;}}}}if(data2.color !== undefined){const err18 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1+\"/color\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}if(data2.part !== undefined){const err19 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1+\"/part\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}}}}}}}validate28.errors = vErrors;return errors === 0;}const schema111 = {\"description\":\"試す図のチップ。名札がチップの名前 (入力の帯の最初の欄の値) になり、values の鍵は入力の帯の残りの欄\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"id\",\"values\"],\"properties\":{\"id\":{\"$ref\":\"#/definitions/id\"},\"values\":{\"$ref\":\"#/definitions/tryValues\"}}};const schema113 = {\"description\":\"チップの欄の値。鍵は入力の帯の欄で、値は字\",\"type\":\"object\",\"additionalProperties\":{\"$ref\":\"#/definitions/text\"}};function validate31(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == \"object\" && !Array.isArray(data)){for(const key0 in data){let data0 = data[key0];if(typeof data0 === \"string\"){if(func2(data0) < 1){const err0 = {instancePath:instancePath+\"/\" + key0.replace(/~/g, \"~0\").replace(/\\//g, \"~1\"),schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}}else {const err1 = {instancePath:instancePath+\"/\" + key0.replace(/~/g, \"~0\").replace(/\\//g, \"~1\"),schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}}else {const err2 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}validate31.errors = vErrors;return errors === 0;}function validate30(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"id\"},message:\"must have required property '\"+\"id\"+\"'\"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.values === undefined){const err1 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"values\"},message:\"must have required property '\"+\"values\"+\"'\"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === \"id\") || (key0 === \"values\"))){const err2 = {instancePath,schemaPath:\"#/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key0},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.id !== undefined){let data0 = data.id;if(typeof data0 === \"string\"){if(!pattern0.test(data0)){const err3 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}else {const err4 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.values !== undefined){if(!(validate31(data.values, {instancePath:instancePath+\"/values\",parentData:data,parentDataProperty:\"values\",rootData}))){vErrors = vErrors === null ? validate31.errors : vErrors.concat(validate31.errors);errors = vErrors.length;}}}else {const err5 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}validate30.errors = vErrors;return errors === 0;}const schema126 = {\"description\":\"試す図の段。line と ask と press と item だけを書け、line は列 (box) でなく部品 (part) を名指す\",\"items\":{\"properties\":{\"events\":{\"items\":{\"properties\":{\"type\":{\"enum\":[\"line\",\"ask\",\"press\",\"item\"]},\"box\":{\"$ref\":\"#/definitions/absent\"}},\"if\":{\"required\":[\"type\"],\"properties\":{\"type\":{\"const\":\"line\"}}},\"then\":{\"required\":[\"part\"]}}}}}};function validate34(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(Array.isArray(data)){const len0 = data.length;for(let i0=0; i0<len0; i0++){let data0 = data[i0];if(data0 && typeof data0 == \"object\" && !Array.isArray(data0)){if(data0.events !== undefined){let data1 = data0.events;if(Array.isArray(data1)){const len1 = data1.length;for(let i1=0; i1<len1; i1++){let data2 = data1[i1];const _errs3 = errors;let valid5 = true;const _errs4 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){let missing0;if((data2.type === undefined) && (missing0 = \"type\")){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data2.type !== undefined){if(\"line\" !== data2.type){const err1 = {};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}}}var _valid0 = _errs4 === errors;errors = _errs3;if(vErrors !== null){if(_errs3){vErrors.length = _errs3;}else {vErrors = null;}}if(_valid0){const _errs6 = errors;if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){if(data2.part === undefined){const err2 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/items/properties/events/items/then/required\",keyword:\"required\",params:{missingProperty: \"part\"},message:\"must have required property '\"+\"part\"+\"'\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}var _valid0 = _errs6 === errors;valid5 = _valid0;}if(!valid5){const err3 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1,schemaPath:\"#/items/properties/events/items/if\",keyword:\"if\",params:{failingKeyword: \"then\"},message:\"must match \\\"then\\\" schema\"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data2 && typeof data2 == \"object\" && !Array.isArray(data2)){if(data2.type !== undefined){let data4 = data2.type;if(!((((data4 === \"line\") || (data4 === \"ask\")) || (data4 === \"press\")) || (data4 === \"item\"))){const err4 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1+\"/type\",schemaPath:\"#/items/properties/events/items/properties/type/enum\",keyword:\"enum\",params:{allowedValues: schema126.items.properties.events.items.properties.type.enum},message:\"must be equal to one of the allowed values\"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data2.box !== undefined){const err5 = {instancePath:instancePath+\"/\" + i0+\"/events/\" + i1+\"/box\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}}}}}}}validate34.errors = vErrors;return errors === 0;}const schema139 = {\"description\":\"枝。帯の左に名札と添え書きを置く\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"id\"],\"properties\":{\"id\":{\"$ref\":\"#/definitions/id\"},\"note\":{\"$ref\":\"#/definitions/text\"}}};function validate38(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"id\"},message:\"must have required property '\"+\"id\"+\"'\"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}for(const key0 in data){if(!((key0 === \"id\") || (key0 === \"note\"))){const err1 = {instancePath,schemaPath:\"#/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key0},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.id !== undefined){let data0 = data.id;if(typeof data0 === \"string\"){if(!pattern0.test(data0)){const err2 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}else {const err3 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.note !== undefined){let data1 = data.note;if(typeof data1 === \"string\"){if(func2(data1) < 1){const err4 = {instancePath:instancePath+\"/note\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}else {const err5 = {instancePath:instancePath+\"/note\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}}else {const err6 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}validate38.errors = vErrors;return errors === 0;}const schema142 = {\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"id\",\"name\"],\"properties\":{\"id\":{\"$ref\":\"#/definitions/id\"},\"name\":{\"$ref\":\"#/definitions/text\"},\"note\":{\"$ref\":\"#/definitions/text\"},\"color\":{\"$ref\":\"#/definitions/color\"},\"icon\":{\"$ref\":\"#/definitions/icon\"}}};const schema147 = {\"description\":\"箱と区画のアイコン名。描く部品のアイコンの表 (ICONS) に在る名前だけ\",\"enum\":[\"app\",\"router\",\"on\",\"off\",\"pool\",\"db\",\"exe\",\"idx\",\"sign\",\"env\",\"lock\",\"check\",\"flag\",\"x\",\"chain\",\"net\",\"user\",\"server\",\"key\",\"shield\",\"globe\",\"bolt\",\"doc\",\"box\",\"truck\",\"card\",\"cart\",\"clock\",\"branch\",\"cloud\",\"refresh\",\"undo\",\"yen\",\"layers\",\"code\",\"paint\",\"tree\",\"block\"]};function validate40(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"id\"},message:\"must have required property '\"+\"id\"+\"'\"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.name === undefined){const err1 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"name\"},message:\"must have required property '\"+\"name\"+\"'\"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!(((((key0 === \"id\") || (key0 === \"name\")) || (key0 === \"note\")) || (key0 === \"color\")) || (key0 === \"icon\"))){const err2 = {instancePath,schemaPath:\"#/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key0},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.id !== undefined){let data0 = data.id;if(typeof data0 === \"string\"){if(!pattern0.test(data0)){const err3 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}else {const err4 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.name !== undefined){let data1 = data.name;if(typeof data1 === \"string\"){if(func2(data1) < 1){const err5 = {instancePath:instancePath+\"/name\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+\"/name\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.note !== undefined){let data2 = data.note;if(typeof data2 === \"string\"){if(func2(data2) < 1){const err7 = {instancePath:instancePath+\"/note\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}else {const err8 = {instancePath:instancePath+\"/note\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.color !== undefined){let data3 = data.color;if(!(((((((data3 === \"blue\") || (data3 === \"amber\")) || (data3 === \"green\")) || (data3 === \"violet\")) || (data3 === \"rose\")) || (data3 === \"slate\")) || (data3 === \"coin\"))){const err9 = {instancePath:instancePath+\"/color\",schemaPath:\"#/definitions/color/enum\",keyword:\"enum\",params:{allowedValues: schema102.enum},message:\"must be equal to one of the allowed values\"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.icon !== undefined){let data4 = data.icon;if(!((((((((((((((((((((((((((((((((((((((data4 === \"app\") || (data4 === \"router\")) || (data4 === \"on\")) || (data4 === \"off\")) || (data4 === \"pool\")) || (data4 === \"db\")) || (data4 === \"exe\")) || (data4 === \"idx\")) || (data4 === \"sign\")) || (data4 === \"env\")) || (data4 === \"lock\")) || (data4 === \"check\")) || (data4 === \"flag\")) || (data4 === \"x\")) || (data4 === \"chain\")) || (data4 === \"net\")) || (data4 === \"user\")) || (data4 === \"server\")) || (data4 === \"key\")) || (data4 === \"shield\")) || (data4 === \"globe\")) || (data4 === \"bolt\")) || (data4 === \"doc\")) || (data4 === \"box\")) || (data4 === \"truck\")) || (data4 === \"card\")) || (data4 === \"cart\")) || (data4 === \"clock\")) || (data4 === \"branch\")) || (data4 === \"cloud\")) || (data4 === \"refresh\")) || (data4 === \"undo\")) || (data4 === \"yen\")) || (data4 === \"layers\")) || (data4 === \"code\")) || (data4 === \"paint\")) || (data4 === \"tree\")) || (data4 === \"block\"))){const err10 = {instancePath:instancePath+\"/icon\",schemaPath:\"#/definitions/icon/enum\",keyword:\"enum\",params:{allowedValues: schema147.enum},message:\"must be equal to one of the allowed values\"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}}else {const err11 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}validate40.errors = vErrors;return errors === 0;}const schema148 = {\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"id\",\"name\"],\"properties\":{\"id\":{\"$ref\":\"#/definitions/id\"},\"name\":{\"$ref\":\"#/definitions/text\"},\"sub\":{\"$ref\":\"#/definitions/text\"},\"color\":{\"$ref\":\"#/definitions/color\"},\"icon\":{\"$ref\":\"#/definitions/icon\"},\"region\":{\"$ref\":\"#/definitions/id\"},\"link\":{\"description\":\"飛び先。描いた図ではこの箱がここへの link になる\",\"$ref\":\"#/definitions/url\"},\"order\":{\"description\":\"列の図の箱の並べ方。none は順番の無い置き場で、チップを散らして置く。書かない箱は上から実行する札で、チップを line に書いた順に積む\",\"enum\":[\"none\"]}}};const schema155 = {\"description\":\"頁を移る形。/ で始まる path か、http:// か https:// で始まる URL\",\"type\":\"string\",\"pattern\":\"^(/|https?://)\"};const pattern6 = new RegExp(\"^(/|https?://)\", \"u\");function validate42(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"id\"},message:\"must have required property '\"+\"id\"+\"'\"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.name === undefined){const err1 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"name\"},message:\"must have required property '\"+\"name\"+\"'\"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((((((((key0 === \"id\") || (key0 === \"name\")) || (key0 === \"sub\")) || (key0 === \"color\")) || (key0 === \"icon\")) || (key0 === \"region\")) || (key0 === \"link\")) || (key0 === \"order\"))){const err2 = {instancePath,schemaPath:\"#/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key0},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.id !== undefined){let data0 = data.id;if(typeof data0 === \"string\"){if(!pattern0.test(data0)){const err3 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}else {const err4 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.name !== undefined){let data1 = data.name;if(typeof data1 === \"string\"){if(func2(data1) < 1){const err5 = {instancePath:instancePath+\"/name\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+\"/name\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.sub !== undefined){let data2 = data.sub;if(typeof data2 === \"string\"){if(func2(data2) < 1){const err7 = {instancePath:instancePath+\"/sub\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}else {const err8 = {instancePath:instancePath+\"/sub\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.color !== undefined){let data3 = data.color;if(!(((((((data3 === \"blue\") || (data3 === \"amber\")) || (data3 === \"green\")) || (data3 === \"violet\")) || (data3 === \"rose\")) || (data3 === \"slate\")) || (data3 === \"coin\"))){const err9 = {instancePath:instancePath+\"/color\",schemaPath:\"#/definitions/color/enum\",keyword:\"enum\",params:{allowedValues: schema102.enum},message:\"must be equal to one of the allowed values\"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.icon !== undefined){let data4 = data.icon;if(!((((((((((((((((((((((((((((((((((((((data4 === \"app\") || (data4 === \"router\")) || (data4 === \"on\")) || (data4 === \"off\")) || (data4 === \"pool\")) || (data4 === \"db\")) || (data4 === \"exe\")) || (data4 === \"idx\")) || (data4 === \"sign\")) || (data4 === \"env\")) || (data4 === \"lock\")) || (data4 === \"check\")) || (data4 === \"flag\")) || (data4 === \"x\")) || (data4 === \"chain\")) || (data4 === \"net\")) || (data4 === \"user\")) || (data4 === \"server\")) || (data4 === \"key\")) || (data4 === \"shield\")) || (data4 === \"globe\")) || (data4 === \"bolt\")) || (data4 === \"doc\")) || (data4 === \"box\")) || (data4 === \"truck\")) || (data4 === \"card\")) || (data4 === \"cart\")) || (data4 === \"clock\")) || (data4 === \"branch\")) || (data4 === \"cloud\")) || (data4 === \"refresh\")) || (data4 === \"undo\")) || (data4 === \"yen\")) || (data4 === \"layers\")) || (data4 === \"code\")) || (data4 === \"paint\")) || (data4 === \"tree\")) || (data4 === \"block\"))){const err10 = {instancePath:instancePath+\"/icon\",schemaPath:\"#/definitions/icon/enum\",keyword:\"enum\",params:{allowedValues: schema147.enum},message:\"must be equal to one of the allowed values\"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data.region !== undefined){let data5 = data.region;if(typeof data5 === \"string\"){if(!pattern0.test(data5)){const err11 = {instancePath:instancePath+\"/region\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}else {const err12 = {instancePath:instancePath+\"/region\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data.link !== undefined){let data6 = data.link;if(typeof data6 === \"string\"){if(!pattern6.test(data6)){const err13 = {instancePath:instancePath+\"/link\",schemaPath:\"#/definitions/url/pattern\",keyword:\"pattern\",params:{pattern: \"^(/|https?://)\"},message:\"must match pattern \\\"\"+\"^(/|https?://)\"+\"\\\"\"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}else {const err14 = {instancePath:instancePath+\"/link\",schemaPath:\"#/definitions/url/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data.order !== undefined){if(!(data.order === \"none\")){const err15 = {instancePath:instancePath+\"/order\",schemaPath:\"#/properties/order/enum\",keyword:\"enum\",params:{allowedValues: schema148.properties.order.enum},message:\"must be equal to one of the allowed values\"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}}else {const err16 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}validate42.errors = vErrors;return errors === 0;}const schema156 = {\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"title\",\"fields\"],\"properties\":{\"title\":{\"$ref\":\"#/definitions/text\"},\"fields\":{\"type\":\"array\",\"minItems\":1,\"items\":{\"$ref\":\"#/definitions/text\"}},\"meters\":{\"description\":\"物差しにする欄。時間軸の図だけが書ける\",\"type\":\"array\",\"minItems\":1,\"items\":{\"$ref\":\"#/definitions/meter\"}}}};const schema159 = {\"description\":\"物差しの欄。line の割合の所に線を引き、set の値まで針と一緒に満ちる\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"field\",\"line\"],\"properties\":{\"field\":{\"$ref\":\"#/definitions/text\"},\"line\":{\"$ref\":\"#/definitions/ratio\"}}};const schema161 = {\"description\":\"割合。分数 (2/3) か百分率 (97%)\",\"type\":\"string\",\"pattern\":\"^([0-9]+/[0-9]+|[0-9]+(\\\\.[0-9]+)?%)$\"};const pattern7 = new RegExp(\"^([0-9]+/[0-9]+|[0-9]+(\\\\.[0-9]+)?%)$\", \"u\");function validate45(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.field === undefined){const err0 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"field\"},message:\"must have required property '\"+\"field\"+\"'\"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.line === undefined){const err1 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"line\"},message:\"must have required property '\"+\"line\"+\"'\"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === \"field\") || (key0 === \"line\"))){const err2 = {instancePath,schemaPath:\"#/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key0},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.field !== undefined){let data0 = data.field;if(typeof data0 === \"string\"){if(func2(data0) < 1){const err3 = {instancePath:instancePath+\"/field\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}else {const err4 = {instancePath:instancePath+\"/field\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.line !== undefined){let data1 = data.line;if(typeof data1 === \"string\"){if(!pattern7.test(data1)){const err5 = {instancePath:instancePath+\"/line\",schemaPath:\"#/definitions/ratio/pattern\",keyword:\"pattern\",params:{pattern: \"^([0-9]+/[0-9]+|[0-9]+(\\\\.[0-9]+)?%)$\"},message:\"must match pattern \\\"\"+\"^([0-9]+/[0-9]+|[0-9]+(\\\\.[0-9]+)?%)$\"+\"\\\"\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+\"/line\",schemaPath:\"#/definitions/ratio/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}}else {const err7 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}validate45.errors = vErrors;return errors === 0;}function validate44(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.title === undefined){const err0 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"title\"},message:\"must have required property '\"+\"title\"+\"'\"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.fields === undefined){const err1 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"fields\"},message:\"must have required property '\"+\"fields\"+\"'\"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!(((key0 === \"title\") || (key0 === \"fields\")) || (key0 === \"meters\"))){const err2 = {instancePath,schemaPath:\"#/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key0},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.title !== undefined){let data0 = data.title;if(typeof data0 === \"string\"){if(func2(data0) < 1){const err3 = {instancePath:instancePath+\"/title\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}else {const err4 = {instancePath:instancePath+\"/title\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.fields !== undefined){let data1 = data.fields;if(Array.isArray(data1)){if(data1.length < 1){const err5 = {instancePath:instancePath+\"/fields\",schemaPath:\"#/properties/fields/minItems\",keyword:\"minItems\",params:{limit: 1},message:\"must NOT have fewer than 1 items\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}const len0 = data1.length;for(let i0=0; i0<len0; i0++){let data2 = data1[i0];if(typeof data2 === \"string\"){if(func2(data2) < 1){const err6 = {instancePath:instancePath+\"/fields/\" + i0,schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}else {const err7 = {instancePath:instancePath+\"/fields/\" + i0,schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}}else {const err8 = {instancePath:instancePath+\"/fields\",schemaPath:\"#/properties/fields/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.meters !== undefined){let data3 = data.meters;if(Array.isArray(data3)){if(data3.length < 1){const err9 = {instancePath:instancePath+\"/meters\",schemaPath:\"#/properties/meters/minItems\",keyword:\"minItems\",params:{limit: 1},message:\"must NOT have fewer than 1 items\"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}const len1 = data3.length;for(let i1=0; i1<len1; i1++){if(!(validate45(data3[i1], {instancePath:instancePath+\"/meters/\" + i1,parentData:data3,parentDataProperty:i1,rootData}))){vErrors = vErrors === null ? validate45.errors : vErrors.concat(validate45.errors);errors = vErrors.length;}}}else {const err10 = {instancePath:instancePath+\"/meters\",schemaPath:\"#/properties/meters/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}}else {const err11 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}validate44.errors = vErrors;return errors === 0;}const schema162 = {\"description\":\"目盛り。unit の名前の目盛りを length の長さで count 個並べ、最初の目盛りの番号を from にする\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"unit\",\"length\",\"count\"],\"properties\":{\"unit\":{\"$ref\":\"#/definitions/text\"},\"length\":{\"$ref\":\"#/definitions/duration\"},\"count\":{\"type\":\"integer\",\"minimum\":1},\"from\":{\"type\":\"integer\",\"minimum\":0}}};const schema164 = {\"description\":\"長さ。数と単位 (ms、s、min、h、d) の組\",\"type\":\"string\",\"pattern\":\"^[0-9]+(\\\\.[0-9]+)?(ms|s|min|h|d)$\"};const pattern8 = new RegExp(\"^[0-9]+(\\\\.[0-9]+)?(ms|s|min|h|d)$\", \"u\");function validate48(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.unit === undefined){const err0 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"unit\"},message:\"must have required property '\"+\"unit\"+\"'\"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.length === undefined){const err1 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"length\"},message:\"must have required property '\"+\"length\"+\"'\"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.count === undefined){const err2 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"count\"},message:\"must have required property '\"+\"count\"+\"'\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}for(const key0 in data){if(!((((key0 === \"unit\") || (key0 === \"length\")) || (key0 === \"count\")) || (key0 === \"from\"))){const err3 = {instancePath,schemaPath:\"#/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key0},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.unit !== undefined){let data0 = data.unit;if(typeof data0 === \"string\"){if(func2(data0) < 1){const err4 = {instancePath:instancePath+\"/unit\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}else {const err5 = {instancePath:instancePath+\"/unit\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.length !== undefined){let data1 = data.length;if(typeof data1 === \"string\"){if(!pattern8.test(data1)){const err6 = {instancePath:instancePath+\"/length\",schemaPath:\"#/definitions/duration/pattern\",keyword:\"pattern\",params:{pattern: \"^[0-9]+(\\\\.[0-9]+)?(ms|s|min|h|d)$\"},message:\"must match pattern \\\"\"+\"^[0-9]+(\\\\.[0-9]+)?(ms|s|min|h|d)$\"+\"\\\"\"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}else {const err7 = {instancePath:instancePath+\"/length\",schemaPath:\"#/definitions/duration/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.count !== undefined){let data2 = data.count;if(!(((typeof data2 == \"number\") && (!(data2 % 1) && !isNaN(data2))) && (isFinite(data2)))){const err8 = {instancePath:instancePath+\"/count\",schemaPath:\"#/properties/count/type\",keyword:\"type\",params:{type: \"integer\"},message:\"must be integer\"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if((typeof data2 == \"number\") && (isFinite(data2))){if(data2 < 1 || isNaN(data2)){const err9 = {instancePath:instancePath+\"/count\",schemaPath:\"#/properties/count/minimum\",keyword:\"minimum\",params:{comparison: \">=\", limit: 1},message:\"must be >= 1\"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}}if(data.from !== undefined){let data3 = data.from;if(!(((typeof data3 == \"number\") && (!(data3 % 1) && !isNaN(data3))) && (isFinite(data3)))){const err10 = {instancePath:instancePath+\"/from\",schemaPath:\"#/properties/from/type\",keyword:\"type\",params:{type: \"integer\"},message:\"must be integer\"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}if((typeof data3 == \"number\") && (isFinite(data3))){if(data3 < 0 || isNaN(data3)){const err11 = {instancePath:instancePath+\"/from\",schemaPath:\"#/properties/from/minimum\",keyword:\"minimum\",params:{comparison: \">=\", limit: 0},message:\"must be >= 0\"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}}}else {const err12 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}validate48.errors = vErrors;return errors === 0;}const schema165 = {\"description\":\"印の列。目盛りごとに印を 1 つ置き、empty の目盛りは空きの印にする\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"id\",\"name\"],\"properties\":{\"id\":{\"$ref\":\"#/definitions/id\"},\"name\":{\"$ref\":\"#/definitions/text\"},\"color\":{\"$ref\":\"#/definitions/color\"},\"empty\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/unit\"}}}};const schema169 = {\"description\":\"目盛りの位置。0 から数える\",\"type\":\"integer\",\"minimum\":0};function validate50(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"id\"},message:\"must have required property '\"+\"id\"+\"'\"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.name === undefined){const err1 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"name\"},message:\"must have required property '\"+\"name\"+\"'\"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((((key0 === \"id\") || (key0 === \"name\")) || (key0 === \"color\")) || (key0 === \"empty\"))){const err2 = {instancePath,schemaPath:\"#/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key0},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.id !== undefined){let data0 = data.id;if(typeof data0 === \"string\"){if(!pattern0.test(data0)){const err3 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}else {const err4 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.name !== undefined){let data1 = data.name;if(typeof data1 === \"string\"){if(func2(data1) < 1){const err5 = {instancePath:instancePath+\"/name\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+\"/name\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.color !== undefined){let data2 = data.color;if(!(((((((data2 === \"blue\") || (data2 === \"amber\")) || (data2 === \"green\")) || (data2 === \"violet\")) || (data2 === \"rose\")) || (data2 === \"slate\")) || (data2 === \"coin\"))){const err7 = {instancePath:instancePath+\"/color\",schemaPath:\"#/definitions/color/enum\",keyword:\"enum\",params:{allowedValues: schema102.enum},message:\"must be equal to one of the allowed values\"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.empty !== undefined){let data3 = data.empty;if(Array.isArray(data3)){const len0 = data3.length;for(let i0=0; i0<len0; i0++){let data4 = data3[i0];if(!(((typeof data4 == \"number\") && (!(data4 % 1) && !isNaN(data4))) && (isFinite(data4)))){const err8 = {instancePath:instancePath+\"/empty/\" + i0,schemaPath:\"#/definitions/unit/type\",keyword:\"type\",params:{type: \"integer\"},message:\"must be integer\"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if((typeof data4 == \"number\") && (isFinite(data4))){if(data4 < 0 || isNaN(data4)){const err9 = {instancePath:instancePath+\"/empty/\" + i0,schemaPath:\"#/definitions/unit/minimum\",keyword:\"minimum\",params:{comparison: \">=\", limit: 0},message:\"must be >= 0\"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}}}else {const err10 = {instancePath:instancePath+\"/empty\",schemaPath:\"#/properties/empty/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}}else {const err11 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}validate50.errors = vErrors;return errors === 0;}const schema170 = {\"description\":\"節目。at の目盛りの印の下に旗の丸と名札を置く\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"id\",\"at\"],\"properties\":{\"id\":{\"$ref\":\"#/definitions/id\"},\"at\":{\"$ref\":\"#/definitions/unit\"}}};function validate52(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"id\"},message:\"must have required property '\"+\"id\"+\"'\"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.at === undefined){const err1 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"at\"},message:\"must have required property '\"+\"at\"+\"'\"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === \"id\") || (key0 === \"at\"))){const err2 = {instancePath,schemaPath:\"#/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key0},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.id !== undefined){let data0 = data.id;if(typeof data0 === \"string\"){if(!pattern0.test(data0)){const err3 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}else {const err4 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.at !== undefined){let data1 = data.at;if(!(((typeof data1 == \"number\") && (!(data1 % 1) && !isNaN(data1))) && (isFinite(data1)))){const err5 = {instancePath:instancePath+\"/at\",schemaPath:\"#/definitions/unit/type\",keyword:\"type\",params:{type: \"integer\"},message:\"must be integer\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if((typeof data1 == \"number\") && (isFinite(data1))){if(data1 < 0 || isNaN(data1)){const err6 = {instancePath:instancePath+\"/at\",schemaPath:\"#/definitions/unit/minimum\",keyword:\"minimum\",params:{comparison: \">=\", limit: 0},message:\"must be >= 0\"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}}}else {const err7 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}validate52.errors = vErrors;return errors === 0;}const schema173 = {\"description\":\"拡大の範囲。from から to の目盛りごとに拡大の帯に列を作る\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"from\",\"to\"],\"properties\":{\"from\":{\"$ref\":\"#/definitions/unit\"},\"to\":{\"$ref\":\"#/definitions/unit\"}}};function validate54(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.from === undefined){const err0 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"from\"},message:\"must have required property '\"+\"from\"+\"'\"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.to === undefined){const err1 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"to\"},message:\"must have required property '\"+\"to\"+\"'\"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === \"from\") || (key0 === \"to\"))){const err2 = {instancePath,schemaPath:\"#/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key0},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.from !== undefined){let data0 = data.from;if(!(((typeof data0 == \"number\") && (!(data0 % 1) && !isNaN(data0))) && (isFinite(data0)))){const err3 = {instancePath:instancePath+\"/from\",schemaPath:\"#/definitions/unit/type\",keyword:\"type\",params:{type: \"integer\"},message:\"must be integer\"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if((typeof data0 == \"number\") && (isFinite(data0))){if(data0 < 0 || isNaN(data0)){const err4 = {instancePath:instancePath+\"/from\",schemaPath:\"#/definitions/unit/minimum\",keyword:\"minimum\",params:{comparison: \">=\", limit: 0},message:\"must be >= 0\"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}}if(data.to !== undefined){let data1 = data.to;if(!(((typeof data1 == \"number\") && (!(data1 % 1) && !isNaN(data1))) && (isFinite(data1)))){const err5 = {instancePath:instancePath+\"/to\",schemaPath:\"#/definitions/unit/type\",keyword:\"type\",params:{type: \"integer\"},message:\"must be integer\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if((typeof data1 == \"number\") && (isFinite(data1))){if(data1 < 0 || isNaN(data1)){const err6 = {instancePath:instancePath+\"/to\",schemaPath:\"#/definitions/unit/minimum\",keyword:\"minimum\",params:{comparison: \">=\", limit: 0},message:\"must be >= 0\"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}}}else {const err7 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}validate54.errors = vErrors;return errors === 0;}const schema176 = {\"description\":\"役。チップを持たずに動く者で、箱の上に札として並び、段の中の role の出来事で光る\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"id\"],\"properties\":{\"id\":{\"$ref\":\"#/definitions/id\"},\"note\":{\"description\":\"役の札の名前の下の一言\",\"$ref\":\"#/definitions/text\"}}};function validate56(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"id\"},message:\"must have required property '\"+\"id\"+\"'\"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}for(const key0 in data){if(!((key0 === \"id\") || (key0 === \"note\"))){const err1 = {instancePath,schemaPath:\"#/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key0},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.id !== undefined){let data0 = data.id;if(typeof data0 === \"string\"){if(!pattern0.test(data0)){const err2 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}else {const err3 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.note !== undefined){let data1 = data.note;if(typeof data1 === \"string\"){if(func2(data1) < 1){const err4 = {instancePath:instancePath+\"/note\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}else {const err5 = {instancePath:instancePath+\"/note\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}}else {const err6 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}validate56.errors = vErrors;return errors === 0;}const schema179 = {\"description\":\"移れる道。送る側に始まりの印 start、受ける側に終わりの印 finish を書ける。どの段にも出ない道は点線で描き、運ぶ物を走らせない\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"from\",\"to\"],\"properties\":{\"from\":{\"$ref\":\"#/definitions/id\"},\"to\":{\"$ref\":\"#/definitions/id\"},\"label\":{\"$ref\":\"#/definitions/text\"}}};function validate58(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.from === undefined){const err0 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"from\"},message:\"must have required property '\"+\"from\"+\"'\"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.to === undefined){const err1 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"to\"},message:\"must have required property '\"+\"to\"+\"'\"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!(((key0 === \"from\") || (key0 === \"to\")) || (key0 === \"label\"))){const err2 = {instancePath,schemaPath:\"#/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key0},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.from !== undefined){let data0 = data.from;if(typeof data0 === \"string\"){if(!pattern0.test(data0)){const err3 = {instancePath:instancePath+\"/from\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}else {const err4 = {instancePath:instancePath+\"/from\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.to !== undefined){let data1 = data.to;if(typeof data1 === \"string\"){if(!pattern0.test(data1)){const err5 = {instancePath:instancePath+\"/to\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+\"/to\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.label !== undefined){let data2 = data.label;if(typeof data2 === \"string\"){if(func2(data2) < 1){const err7 = {instancePath:instancePath+\"/label\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}else {const err8 = {instancePath:instancePath+\"/label\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}}else {const err9 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}validate58.errors = vErrors;return errors === 0;}const schema183 = {\"description\":\"区切り。目盛り length 個ごとに name の区切りを置き、最初の区切りの番号を from にする\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"name\",\"length\"],\"properties\":{\"name\":{\"$ref\":\"#/definitions/text\"},\"length\":{\"type\":\"integer\",\"minimum\":1},\"from\":{\"type\":\"integer\",\"minimum\":0}}};function validate60(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.name === undefined){const err0 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"name\"},message:\"must have required property '\"+\"name\"+\"'\"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.length === undefined){const err1 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"length\"},message:\"must have required property '\"+\"length\"+\"'\"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!(((key0 === \"name\") || (key0 === \"length\")) || (key0 === \"from\"))){const err2 = {instancePath,schemaPath:\"#/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key0},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.name !== undefined){let data0 = data.name;if(typeof data0 === \"string\"){if(func2(data0) < 1){const err3 = {instancePath:instancePath+\"/name\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}else {const err4 = {instancePath:instancePath+\"/name\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.length !== undefined){let data1 = data.length;if(!(((typeof data1 == \"number\") && (!(data1 % 1) && !isNaN(data1))) && (isFinite(data1)))){const err5 = {instancePath:instancePath+\"/length\",schemaPath:\"#/properties/length/type\",keyword:\"type\",params:{type: \"integer\"},message:\"must be integer\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if((typeof data1 == \"number\") && (isFinite(data1))){if(data1 < 1 || isNaN(data1)){const err6 = {instancePath:instancePath+\"/length\",schemaPath:\"#/properties/length/minimum\",keyword:\"minimum\",params:{comparison: \">=\", limit: 1},message:\"must be >= 1\"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}}if(data.from !== undefined){let data2 = data.from;if(!(((typeof data2 == \"number\") && (!(data2 % 1) && !isNaN(data2))) && (isFinite(data2)))){const err7 = {instancePath:instancePath+\"/from\",schemaPath:\"#/properties/from/type\",keyword:\"type\",params:{type: \"integer\"},message:\"must be integer\"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if((typeof data2 == \"number\") && (isFinite(data2))){if(data2 < 0 || isNaN(data2)){const err8 = {instancePath:instancePath+\"/from\",schemaPath:\"#/properties/from/minimum\",keyword:\"minimum\",params:{comparison: \">=\", limit: 0},message:\"must be >= 0\"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}}}else {const err9 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}validate60.errors = vErrors;return errors === 0;}const schema185 = {\"description\":\"試す図の部品。網 (route)、待ち行列 (queue)、機械の列 (chain)、入力の帯 (ask)、釦 (press)\",\"type\":\"object\",\"required\":[\"type\"],\"discriminator\":{\"propertyName\":\"type\"},\"oneOf\":[{\"description\":\"網。paths は - でつないだ節の並びで、from の節から to の節へ最短の道でチップを運ぶ\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"id\",\"paths\",\"from\",\"to\"],\"properties\":{\"type\":{\"const\":\"route\"},\"id\":{\"$ref\":\"#/definitions/id\"},\"paths\":{\"type\":\"array\",\"minItems\":1,\"items\":{\"type\":\"array\",\"minItems\":2,\"items\":{\"$ref\":\"#/definitions/id\"}}},\"from\":{\"$ref\":\"#/definitions/id\"},\"to\":{\"$ref\":\"#/definitions/id\"}}},{\"description\":\"待ち行列。order の欄の値の高い順 (同じ値は入った順) にチップを上から並べる。order を書かなければ入った順\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"id\"],\"properties\":{\"type\":{\"const\":\"queue\"},\"id\":{\"$ref\":\"#/definitions/id\"},\"order\":{\"$ref\":\"#/definitions/id\"}}},{\"description\":\"機械の列 (ブロックの鎖)。edit を書いた時だけ、読み手がブロックの中のチップのその欄を書き換えられる\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"id\"],\"properties\":{\"type\":{\"const\":\"chain\"},\"id\":{\"$ref\":\"#/definitions/id\"},\"edit\":{\"$ref\":\"#/definitions/id\"}}},{\"description\":\"入力の帯。図に 1 つまでで、id は常に ask。最初の欄の値がチップの名前になる。into の待ち行列へ、via の網を通って送る\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"id\",\"fields\",\"into\"],\"properties\":{\"type\":{\"const\":\"ask\"},\"id\":{\"const\":\"ask\"},\"fields\":{\"type\":\"array\",\"minItems\":2,\"items\":{\"$ref\":\"#/definitions/id\"}},\"into\":{\"$ref\":\"#/definitions/id\"},\"via\":{\"$ref\":\"#/definitions/id\"}}},{\"description\":\"釦。from の待ち行列の上から take 件を、into の機械の列の新しいブロックへ移す。at は釦を置く部品 (書かなければ入力の帯)\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"id\",\"from\",\"into\",\"take\"],\"properties\":{\"type\":{\"const\":\"press\"},\"id\":{\"$ref\":\"#/definitions/id\"},\"from\":{\"$ref\":\"#/definitions/id\"},\"into\":{\"$ref\":\"#/definitions/id\"},\"take\":{\"type\":\"integer\",\"minimum\":1},\"at\":{\"$ref\":\"#/definitions/id\"}}}]};function validate62(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err0 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}const tag0 = data.type;if(typeof tag0 == \"string\"){if(tag0 === \"route\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err1 = {instancePath,schemaPath:\"#/oneOf/0/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.id === undefined){const err2 = {instancePath,schemaPath:\"#/oneOf/0/required\",keyword:\"required\",params:{missingProperty: \"id\"},message:\"must have required property '\"+\"id\"+\"'\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.paths === undefined){const err3 = {instancePath,schemaPath:\"#/oneOf/0/required\",keyword:\"required\",params:{missingProperty: \"paths\"},message:\"must have required property '\"+\"paths\"+\"'\"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.from === undefined){const err4 = {instancePath,schemaPath:\"#/oneOf/0/required\",keyword:\"required\",params:{missingProperty: \"from\"},message:\"must have required property '\"+\"from\"+\"'\"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.to === undefined){const err5 = {instancePath,schemaPath:\"#/oneOf/0/required\",keyword:\"required\",params:{missingProperty: \"to\"},message:\"must have required property '\"+\"to\"+\"'\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}for(const key0 in data){if(!(((((key0 === \"type\") || (key0 === \"id\")) || (key0 === \"paths\")) || (key0 === \"from\")) || (key0 === \"to\"))){const err6 = {instancePath,schemaPath:\"#/oneOf/0/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key0},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.type !== undefined){if(\"route\" !== data.type){const err7 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/0/properties/type/const\",keyword:\"const\",params:{allowedValue: \"route\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.id !== undefined){let data1 = data.id;if(typeof data1 === \"string\"){if(!pattern0.test(data1)){const err8 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}else {const err9 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.paths !== undefined){let data2 = data.paths;if(Array.isArray(data2)){if(data2.length < 1){const err10 = {instancePath:instancePath+\"/paths\",schemaPath:\"#/oneOf/0/properties/paths/minItems\",keyword:\"minItems\",params:{limit: 1},message:\"must NOT have fewer than 1 items\"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}const len0 = data2.length;for(let i0=0; i0<len0; i0++){let data3 = data2[i0];if(Array.isArray(data3)){if(data3.length < 2){const err11 = {instancePath:instancePath+\"/paths/\" + i0,schemaPath:\"#/oneOf/0/properties/paths/items/minItems\",keyword:\"minItems\",params:{limit: 2},message:\"must NOT have fewer than 2 items\"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}const len1 = data3.length;for(let i1=0; i1<len1; i1++){let data4 = data3[i1];if(typeof data4 === \"string\"){if(!pattern0.test(data4)){const err12 = {instancePath:instancePath+\"/paths/\" + i0+\"/\" + i1,schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}else {const err13 = {instancePath:instancePath+\"/paths/\" + i0+\"/\" + i1,schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}}else {const err14 = {instancePath:instancePath+\"/paths/\" + i0,schemaPath:\"#/oneOf/0/properties/paths/items/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}}else {const err15 = {instancePath:instancePath+\"/paths\",schemaPath:\"#/oneOf/0/properties/paths/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data.from !== undefined){let data5 = data.from;if(typeof data5 === \"string\"){if(!pattern0.test(data5)){const err16 = {instancePath:instancePath+\"/from\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}else {const err17 = {instancePath:instancePath+\"/from\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data.to !== undefined){let data6 = data.to;if(typeof data6 === \"string\"){if(!pattern0.test(data6)){const err18 = {instancePath:instancePath+\"/to\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}else {const err19 = {instancePath:instancePath+\"/to\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}}else {const err20 = {instancePath,schemaPath:\"#/oneOf/0/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}else if(tag0 === \"queue\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err21 = {instancePath,schemaPath:\"#/oneOf/1/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}if(data.id === undefined){const err22 = {instancePath,schemaPath:\"#/oneOf/1/required\",keyword:\"required\",params:{missingProperty: \"id\"},message:\"must have required property '\"+\"id\"+\"'\"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}for(const key1 in data){if(!(((key1 === \"type\") || (key1 === \"id\")) || (key1 === \"order\"))){const err23 = {instancePath,schemaPath:\"#/oneOf/1/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key1},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}if(data.type !== undefined){if(\"queue\" !== data.type){const err24 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/1/properties/type/const\",keyword:\"const\",params:{allowedValue: \"queue\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}if(data.id !== undefined){let data8 = data.id;if(typeof data8 === \"string\"){if(!pattern0.test(data8)){const err25 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}else {const err26 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}if(data.order !== undefined){let data9 = data.order;if(typeof data9 === \"string\"){if(!pattern0.test(data9)){const err27 = {instancePath:instancePath+\"/order\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}}else {const err28 = {instancePath:instancePath+\"/order\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}}}else {const err29 = {instancePath,schemaPath:\"#/oneOf/1/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}}else if(tag0 === \"chain\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err30 = {instancePath,schemaPath:\"#/oneOf/2/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}if(data.id === undefined){const err31 = {instancePath,schemaPath:\"#/oneOf/2/required\",keyword:\"required\",params:{missingProperty: \"id\"},message:\"must have required property '\"+\"id\"+\"'\"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}for(const key2 in data){if(!(((key2 === \"type\") || (key2 === \"id\")) || (key2 === \"edit\"))){const err32 = {instancePath,schemaPath:\"#/oneOf/2/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key2},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}}if(data.type !== undefined){if(\"chain\" !== data.type){const err33 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/2/properties/type/const\",keyword:\"const\",params:{allowedValue: \"chain\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}}if(data.id !== undefined){let data11 = data.id;if(typeof data11 === \"string\"){if(!pattern0.test(data11)){const err34 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}}else {const err35 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}}if(data.edit !== undefined){let data12 = data.edit;if(typeof data12 === \"string\"){if(!pattern0.test(data12)){const err36 = {instancePath:instancePath+\"/edit\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}}else {const err37 = {instancePath:instancePath+\"/edit\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}}}else {const err38 = {instancePath,schemaPath:\"#/oneOf/2/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}}else if(tag0 === \"ask\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err39 = {instancePath,schemaPath:\"#/oneOf/3/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}if(data.id === undefined){const err40 = {instancePath,schemaPath:\"#/oneOf/3/required\",keyword:\"required\",params:{missingProperty: \"id\"},message:\"must have required property '\"+\"id\"+\"'\"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}if(data.fields === undefined){const err41 = {instancePath,schemaPath:\"#/oneOf/3/required\",keyword:\"required\",params:{missingProperty: \"fields\"},message:\"must have required property '\"+\"fields\"+\"'\"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}if(data.into === undefined){const err42 = {instancePath,schemaPath:\"#/oneOf/3/required\",keyword:\"required\",params:{missingProperty: \"into\"},message:\"must have required property '\"+\"into\"+\"'\"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}for(const key3 in data){if(!(((((key3 === \"type\") || (key3 === \"id\")) || (key3 === \"fields\")) || (key3 === \"into\")) || (key3 === \"via\"))){const err43 = {instancePath,schemaPath:\"#/oneOf/3/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key3},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}}if(data.type !== undefined){if(\"ask\" !== data.type){const err44 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/3/properties/type/const\",keyword:\"const\",params:{allowedValue: \"ask\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}}if(data.id !== undefined){if(\"ask\" !== data.id){const err45 = {instancePath:instancePath+\"/id\",schemaPath:\"#/oneOf/3/properties/id/const\",keyword:\"const\",params:{allowedValue: \"ask\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}}if(data.fields !== undefined){let data15 = data.fields;if(Array.isArray(data15)){if(data15.length < 2){const err46 = {instancePath:instancePath+\"/fields\",schemaPath:\"#/oneOf/3/properties/fields/minItems\",keyword:\"minItems\",params:{limit: 2},message:\"must NOT have fewer than 2 items\"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}const len2 = data15.length;for(let i2=0; i2<len2; i2++){let data16 = data15[i2];if(typeof data16 === \"string\"){if(!pattern0.test(data16)){const err47 = {instancePath:instancePath+\"/fields/\" + i2,schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}}else {const err48 = {instancePath:instancePath+\"/fields/\" + i2,schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}}}else {const err49 = {instancePath:instancePath+\"/fields\",schemaPath:\"#/oneOf/3/properties/fields/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}}if(data.into !== undefined){let data17 = data.into;if(typeof data17 === \"string\"){if(!pattern0.test(data17)){const err50 = {instancePath:instancePath+\"/into\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}}else {const err51 = {instancePath:instancePath+\"/into\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}}if(data.via !== undefined){let data18 = data.via;if(typeof data18 === \"string\"){if(!pattern0.test(data18)){const err52 = {instancePath:instancePath+\"/via\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err52];}else {vErrors.push(err52);}errors++;}}else {const err53 = {instancePath:instancePath+\"/via\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err53];}else {vErrors.push(err53);}errors++;}}}else {const err54 = {instancePath,schemaPath:\"#/oneOf/3/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err54];}else {vErrors.push(err54);}errors++;}}else if(tag0 === \"press\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err55 = {instancePath,schemaPath:\"#/oneOf/4/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err55];}else {vErrors.push(err55);}errors++;}if(data.id === undefined){const err56 = {instancePath,schemaPath:\"#/oneOf/4/required\",keyword:\"required\",params:{missingProperty: \"id\"},message:\"must have required property '\"+\"id\"+\"'\"};if(vErrors === null){vErrors = [err56];}else {vErrors.push(err56);}errors++;}if(data.from === undefined){const err57 = {instancePath,schemaPath:\"#/oneOf/4/required\",keyword:\"required\",params:{missingProperty: \"from\"},message:\"must have required property '\"+\"from\"+\"'\"};if(vErrors === null){vErrors = [err57];}else {vErrors.push(err57);}errors++;}if(data.into === undefined){const err58 = {instancePath,schemaPath:\"#/oneOf/4/required\",keyword:\"required\",params:{missingProperty: \"into\"},message:\"must have required property '\"+\"into\"+\"'\"};if(vErrors === null){vErrors = [err58];}else {vErrors.push(err58);}errors++;}if(data.take === undefined){const err59 = {instancePath,schemaPath:\"#/oneOf/4/required\",keyword:\"required\",params:{missingProperty: \"take\"},message:\"must have required property '\"+\"take\"+\"'\"};if(vErrors === null){vErrors = [err59];}else {vErrors.push(err59);}errors++;}for(const key4 in data){if(!((((((key4 === \"type\") || (key4 === \"id\")) || (key4 === \"from\")) || (key4 === \"into\")) || (key4 === \"take\")) || (key4 === \"at\"))){const err60 = {instancePath,schemaPath:\"#/oneOf/4/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key4},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err60];}else {vErrors.push(err60);}errors++;}}if(data.type !== undefined){if(\"press\" !== data.type){const err61 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/4/properties/type/const\",keyword:\"const\",params:{allowedValue: \"press\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err61];}else {vErrors.push(err61);}errors++;}}if(data.id !== undefined){let data20 = data.id;if(typeof data20 === \"string\"){if(!pattern0.test(data20)){const err62 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err62];}else {vErrors.push(err62);}errors++;}}else {const err63 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err63];}else {vErrors.push(err63);}errors++;}}if(data.from !== undefined){let data21 = data.from;if(typeof data21 === \"string\"){if(!pattern0.test(data21)){const err64 = {instancePath:instancePath+\"/from\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err64];}else {vErrors.push(err64);}errors++;}}else {const err65 = {instancePath:instancePath+\"/from\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err65];}else {vErrors.push(err65);}errors++;}}if(data.into !== undefined){let data22 = data.into;if(typeof data22 === \"string\"){if(!pattern0.test(data22)){const err66 = {instancePath:instancePath+\"/into\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err66];}else {vErrors.push(err66);}errors++;}}else {const err67 = {instancePath:instancePath+\"/into\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err67];}else {vErrors.push(err67);}errors++;}}if(data.take !== undefined){let data23 = data.take;if(!(((typeof data23 == \"number\") && (!(data23 % 1) && !isNaN(data23))) && (isFinite(data23)))){const err68 = {instancePath:instancePath+\"/take\",schemaPath:\"#/oneOf/4/properties/take/type\",keyword:\"type\",params:{type: \"integer\"},message:\"must be integer\"};if(vErrors === null){vErrors = [err68];}else {vErrors.push(err68);}errors++;}if((typeof data23 == \"number\") && (isFinite(data23))){if(data23 < 1 || isNaN(data23)){const err69 = {instancePath:instancePath+\"/take\",schemaPath:\"#/oneOf/4/properties/take/minimum\",keyword:\"minimum\",params:{comparison: \">=\", limit: 1},message:\"must be >= 1\"};if(vErrors === null){vErrors = [err69];}else {vErrors.push(err69);}errors++;}}}if(data.at !== undefined){let data24 = data.at;if(typeof data24 === \"string\"){if(!pattern0.test(data24)){const err70 = {instancePath:instancePath+\"/at\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err70];}else {vErrors.push(err70);}errors++;}}else {const err71 = {instancePath:instancePath+\"/at\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err71];}else {vErrors.push(err71);}errors++;}}}else {const err72 = {instancePath,schemaPath:\"#/oneOf/4/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err72];}else {vErrors.push(err72);}errors++;}}else {const err73 = {instancePath,schemaPath:\"#/discriminator\",keyword:\"discriminator\",params:{error: \"mapping\", tag: \"type\", tagValue: tag0},message:\"value of tag \\\"type\\\" must be in oneOf\"};if(vErrors === null){vErrors = [err73];}else {vErrors.push(err73);}errors++;}}else {const err74 = {instancePath,schemaPath:\"#/discriminator\",keyword:\"discriminator\",params:{error: \"tag\", tag: \"type\", tagValue: tag0},message:\"tag \\\"type\\\" must be string\"};if(vErrors === null){vErrors = [err74];}else {vErrors.push(err74);}errors++;}}else {const err75 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err75];}else {vErrors.push(err75);}errors++;}validate62.errors = vErrors;return errors === 0;}const schema201 = {\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"title\",\"body\",\"events\"],\"properties\":{\"title\":{\"$ref\":\"#/definitions/text\"},\"body\":{\"$ref\":\"#/definitions/text\"},\"code\":{\"$ref\":\"#/definitions/text\"},\"sources\":{\"description\":\"段の出典。読み上げの段の一覧に、名前を URL への link にして書いた順に出す\",\"type\":\"array\",\"minItems\":1,\"items\":{\"$ref\":\"#/definitions/source\"}},\"events\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/event\"}}}};const schema205 = {\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"name\",\"url\"],\"properties\":{\"name\":{\"$ref\":\"#/definitions/text\"},\"url\":{\"$ref\":\"#/definitions/url\"}}};function validate65(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.name === undefined){const err0 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"name\"},message:\"must have required property '\"+\"name\"+\"'\"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.url === undefined){const err1 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"url\"},message:\"must have required property '\"+\"url\"+\"'\"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === \"name\") || (key0 === \"url\"))){const err2 = {instancePath,schemaPath:\"#/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key0},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.name !== undefined){let data0 = data.name;if(typeof data0 === \"string\"){if(func2(data0) < 1){const err3 = {instancePath:instancePath+\"/name\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}else {const err4 = {instancePath:instancePath+\"/name\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.url !== undefined){let data1 = data.url;if(typeof data1 === \"string\"){if(!pattern6.test(data1)){const err5 = {instancePath:instancePath+\"/url\",schemaPath:\"#/definitions/url/pattern\",keyword:\"pattern\",params:{pattern: \"^(/|https?://)\"},message:\"must match pattern \\\"\"+\"^(/|https?://)\"+\"\\\"\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+\"/url\",schemaPath:\"#/definitions/url/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}}else {const err7 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}validate65.errors = vErrors;return errors === 0;}const schema208 = {\"description\":\"段の中で起きること。起きる順に並べる\",\"type\":\"object\",\"required\":[\"type\"],\"discriminator\":{\"propertyName\":\"type\"},\"oneOf\":[{\"description\":\"枝を切る。枝分かれの図だけが書ける。枝の札を from の commit へ置き、HEAD をその枝へ移す\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"branch\",\"from\"],\"properties\":{\"type\":{\"const\":\"branch\"},\"branch\":{\"$ref\":\"#/definitions/id\"},\"from\":{\"$ref\":\"#/definitions/id\"}}},{\"description\":\"commit を積む。枝分かれの図だけが書ける。積んだ枝の札と、その枝を指す HEAD が進む。当て直し (copy) は枝の札を動かさず、merge commit (merge) は取り込む枝の先端も親に持つ\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"id\",\"branch\"],\"properties\":{\"type\":{\"const\":\"commit\"},\"id\":{\"$ref\":\"#/definitions/id\"},\"branch\":{\"$ref\":\"#/definitions/id\"},\"copy\":{\"$ref\":\"#/definitions/id\"},\"merge\":{\"$ref\":\"#/definitions/id\"},\"hash\":{\"$ref\":\"#/definitions/hash\"},\"note\":{\"$ref\":\"#/definitions/text\"}}},{\"description\":\"中身の帯の欄の値と札\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"field\"],\"anyOf\":[{\"required\":[\"value\"]},{\"required\":[\"tag\"]}],\"properties\":{\"type\":{\"const\":\"strip\"},\"field\":{\"$ref\":\"#/definitions/text\"},\"value\":{\"$ref\":\"#/definitions/text\"},\"tag\":{\"$ref\":\"#/definitions/text\"}}},{\"description\":\"箱の中の処理\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"box\",\"label\"],\"properties\":{\"type\":{\"const\":\"action\"},\"box\":{\"$ref\":\"#/definitions/id\"},\"label\":{\"$ref\":\"#/definitions/text\"}}},{\"description\":\"箱の下の小さな字の書き換え\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"box\",\"text\"],\"properties\":{\"type\":{\"const\":\"swap\"},\"box\":{\"$ref\":\"#/definitions/id\"},\"text\":{\"$ref\":\"#/definitions/text\"},\"color\":{\"description\":\"時間軸の図の節目の丸の色\",\"$ref\":\"#/definitions/color\"}}},{\"description\":\"線。運ぶ物を載せて送る側から受ける側へ走る\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"from\",\"to\",\"carry\"],\"properties\":{\"type\":{\"const\":\"edge\"},\"from\":{\"$ref\":\"#/definitions/id\"},\"to\":{\"$ref\":\"#/definitions/id\"},\"label\":{\"$ref\":\"#/definitions/text\"},\"carry\":{\"$ref\":\"#/definitions/carry\"},\"labelSide\":{\"description\":\"線の名前を置く側 (寄せの指示)\",\"enum\":[\"above\",\"below\",\"left\",\"right\"]},\"at\":{\"description\":\"時間軸の図の拡大の帯で、線を引く列の目盛り\",\"$ref\":\"#/definitions/unit\"},\"into\":{\"description\":\"時間軸の図の拡大の帯で、受ける箱を選ぶ列の目盛り。書かなければ at の列\",\"$ref\":\"#/definitions/unit\"}}},{\"description\":\"時間軸の図の今の時刻の針を、to の目盛りの終わりまで進める\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"to\"],\"properties\":{\"type\":{\"const\":\"now\"},\"to\":{\"$ref\":\"#/definitions/unit\"}}},{\"description\":\"時間軸の図の from から to の目盛りに、括弧と字を出す。shape が box なら印の列を囲み、字を縁の札にする\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"from\",\"to\",\"text\"],\"properties\":{\"type\":{\"const\":\"span\"},\"from\":{\"$ref\":\"#/definitions/unit\"},\"to\":{\"$ref\":\"#/definitions/unit\"},\"text\":{\"$ref\":\"#/definitions/text\"},\"shape\":{\"enum\":[\"box\"]},\"color\":{\"$ref\":\"#/definitions/color\"}}},{\"description\":\"時間軸の図の印の列 row の、from から to の目盛りの印の色を変える\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"row\",\"from\",\"to\",\"color\"],\"properties\":{\"type\":{\"const\":\"mark\"},\"row\":{\"$ref\":\"#/definitions/id\"},\"from\":{\"$ref\":\"#/definitions/unit\"},\"to\":{\"$ref\":\"#/definitions/unit\"},\"color\":{\"$ref\":\"#/definitions/color\"}}},{\"description\":\"葉を出す。木の図だけが書ける。書いた段で葉の箱が現れる。hash を書くと箱に値を出し、名札を葉の下の札に出す\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"id\"],\"properties\":{\"type\":{\"const\":\"leaf\"},\"id\":{\"$ref\":\"#/definitions/id\"},\"hash\":{\"$ref\":\"#/definitions/hash\"}}},{\"description\":\"1 つ以上の子から親を組む。木の図だけが書ける。書いた段で親の箱と、子から親への木の線が現れる\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"id\",\"children\"],\"properties\":{\"type\":{\"const\":\"node\"},\"id\":{\"$ref\":\"#/definitions/id\"},\"children\":{\"type\":\"array\",\"minItems\":1,\"items\":{\"$ref\":\"#/definitions/id\"}},\"hash\":{\"$ref\":\"#/definitions/hash\"}}},{\"description\":\"列の図では列 box の並びを items に書き換える。チップは前に居た列から滑り、どの列にも居なかったチップは弾んで現れ、列から外れたチップは消える。試す図では、待ち行列 part の中身を items の並びにするか、機械の列 part に items を入れた新しいブロックを足す。列の図と試す図だけが書ける\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"items\"],\"properties\":{\"type\":{\"const\":\"line\"},\"box\":{\"$ref\":\"#/definitions/id\"},\"part\":{\"$ref\":\"#/definitions/id\"},\"items\":{\"type\":\"array\",\"minItems\":1,\"maxItems\":12,\"items\":{\"$ref\":\"#/definitions/id\"}}}},{\"description\":\"列 box に封をして、チップを隠す。列の図だけが書ける\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"box\"],\"properties\":{\"type\":{\"const\":\"seal\"},\"box\":{\"$ref\":\"#/definitions/id\"}}},{\"description\":\"列 box の封を開ける。列の図だけが書ける\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"box\"],\"properties\":{\"type\":{\"const\":\"open\"},\"box\":{\"$ref\":\"#/definitions/id\"}}},{\"description\":\"列 box を選ぶ。列の図だけが書ける。列の縁に色が付き、ほかの列が薄くなる\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"box\"],\"properties\":{\"type\":{\"const\":\"pick\"},\"box\":{\"$ref\":\"#/definitions/id\"}}},{\"description\":\"列 box の右に text の札を押す。列の図だけが書ける\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"box\",\"text\"],\"properties\":{\"type\":{\"const\":\"stamp\"},\"box\":{\"$ref\":\"#/definitions/id\"},\"text\":{\"$ref\":\"#/definitions/text\"}}},{\"description\":\"この段で役 role が動く。列の図だけが書ける。役の札の縁が光る\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"role\"],\"properties\":{\"type\":{\"const\":\"role\"},\"role\":{\"$ref\":\"#/definitions/id\"}}},{\"description\":\"入力の帯の欄の値 values (欄の順) でチップを作って送る。試す図だけが書ける。書き手の例として読み手の送る操作を書く\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"values\"],\"properties\":{\"type\":{\"const\":\"ask\"},\"values\":{\"type\":\"array\",\"minItems\":1,\"items\":{\"$ref\":\"#/definitions/text\"}}}},{\"description\":\"チップ item の欄の値を values に書き換える。試す図だけが書ける。読み手の書き換えと同じ\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"item\",\"values\"],\"properties\":{\"type\":{\"const\":\"item\"},\"item\":{\"$ref\":\"#/definitions/id\"},\"values\":{\"$ref\":\"#/definitions/tryValues\"}}},{\"description\":\"釦 press を押す。試す図だけが書ける。釦の待ち行列の上からチップを取り出し、機械の列の新しいブロックへ移す\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"type\",\"press\"],\"properties\":{\"type\":{\"const\":\"press\"},\"press\":{\"$ref\":\"#/definitions/id\"}}}]};const schema215 = {\"description\":\"commit と木の箱の hash。16 進の字で 4 から 40 字\",\"type\":\"string\",\"pattern\":\"^[0-9a-f]{4,40}$\"};const pattern36 = new RegExp(\"^[0-9a-f]{4,40}$\", \"u\");const schema228 = {\"description\":\"線の上を走る物。封筒 (メッセージや要求)、札 (名前のある値)、硬貨 (価値)、無し\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"kind\"],\"properties\":{\"kind\":{\"enum\":[\"envelope\",\"tag\",\"coin\",\"none\"]},\"text\":{\"$ref\":\"#/definitions/text\"}},\"if\":{\"required\":[\"kind\"],\"properties\":{\"kind\":{\"const\":\"tag\"}}},\"then\":{\"required\":[\"text\"]},\"else\":{\"not\":{\"required\":[\"text\"]}}};function validate68(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;const _errs1 = errors;let valid0 = true;const _errs2 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){let missing0;if((data.kind === undefined) && (missing0 = \"kind\")){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.kind !== undefined){if(\"tag\" !== data.kind){const err1 = {};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}}}var _valid0 = _errs2 === errors;errors = _errs1;if(vErrors !== null){if(_errs1){vErrors.length = _errs1;}else {vErrors = null;}}let ifClause0;if(_valid0){const _errs4 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.text === undefined){const err2 = {instancePath,schemaPath:\"#/then/required\",keyword:\"required\",params:{missingProperty: \"text\"},message:\"must have required property '\"+\"text\"+\"'\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}var _valid0 = _errs4 === errors;valid0 = _valid0;ifClause0 = \"then\";}else {const _errs5 = errors;const _errs6 = errors;const _errs7 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){let missing1;if((data.text === undefined) && (missing1 = \"text\")){const err3 = {};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}var valid2 = _errs7 === errors;if(valid2){const err4 = {instancePath,schemaPath:\"#/else/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}else {errors = _errs6;if(vErrors !== null){if(_errs6){vErrors.length = _errs6;}else {vErrors = null;}}}var _valid0 = _errs5 === errors;valid0 = _valid0;ifClause0 = \"else\";}if(!valid0){const err5 = {instancePath,schemaPath:\"#/if\",keyword:\"if\",params:{failingKeyword: ifClause0},message:\"must match \\\"\"+ifClause0+\"\\\" schema\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.kind === undefined){const err6 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"kind\"},message:\"must have required property '\"+\"kind\"+\"'\"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}for(const key0 in data){if(!((key0 === \"kind\") || (key0 === \"text\"))){const err7 = {instancePath,schemaPath:\"#/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key0},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.kind !== undefined){let data1 = data.kind;if(!((((data1 === \"envelope\") || (data1 === \"tag\")) || (data1 === \"coin\")) || (data1 === \"none\"))){const err8 = {instancePath:instancePath+\"/kind\",schemaPath:\"#/properties/kind/enum\",keyword:\"enum\",params:{allowedValues: schema228.properties.kind.enum},message:\"must be equal to one of the allowed values\"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.text !== undefined){let data2 = data.text;if(typeof data2 === \"string\"){if(func2(data2) < 1){const err9 = {instancePath:instancePath+\"/text\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}else {const err10 = {instancePath:instancePath+\"/text\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}}else {const err11 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}validate68.errors = vErrors;return errors === 0;}function validate67(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err0 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}const tag0 = data.type;if(typeof tag0 == \"string\"){if(tag0 === \"branch\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err1 = {instancePath,schemaPath:\"#/oneOf/0/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.branch === undefined){const err2 = {instancePath,schemaPath:\"#/oneOf/0/required\",keyword:\"required\",params:{missingProperty: \"branch\"},message:\"must have required property '\"+\"branch\"+\"'\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.from === undefined){const err3 = {instancePath,schemaPath:\"#/oneOf/0/required\",keyword:\"required\",params:{missingProperty: \"from\"},message:\"must have required property '\"+\"from\"+\"'\"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data){if(!(((key0 === \"type\") || (key0 === \"branch\")) || (key0 === \"from\"))){const err4 = {instancePath,schemaPath:\"#/oneOf/0/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key0},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.type !== undefined){if(\"branch\" !== data.type){const err5 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/0/properties/type/const\",keyword:\"const\",params:{allowedValue: \"branch\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.branch !== undefined){let data1 = data.branch;if(typeof data1 === \"string\"){if(!pattern0.test(data1)){const err6 = {instancePath:instancePath+\"/branch\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}else {const err7 = {instancePath:instancePath+\"/branch\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.from !== undefined){let data2 = data.from;if(typeof data2 === \"string\"){if(!pattern0.test(data2)){const err8 = {instancePath:instancePath+\"/from\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}else {const err9 = {instancePath:instancePath+\"/from\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}}else {const err10 = {instancePath,schemaPath:\"#/oneOf/0/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}else if(tag0 === \"commit\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err11 = {instancePath,schemaPath:\"#/oneOf/1/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}if(data.id === undefined){const err12 = {instancePath,schemaPath:\"#/oneOf/1/required\",keyword:\"required\",params:{missingProperty: \"id\"},message:\"must have required property '\"+\"id\"+\"'\"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}if(data.branch === undefined){const err13 = {instancePath,schemaPath:\"#/oneOf/1/required\",keyword:\"required\",params:{missingProperty: \"branch\"},message:\"must have required property '\"+\"branch\"+\"'\"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}for(const key1 in data){if(!(((((((key1 === \"type\") || (key1 === \"id\")) || (key1 === \"branch\")) || (key1 === \"copy\")) || (key1 === \"merge\")) || (key1 === \"hash\")) || (key1 === \"note\"))){const err14 = {instancePath,schemaPath:\"#/oneOf/1/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key1},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data.type !== undefined){if(\"commit\" !== data.type){const err15 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/1/properties/type/const\",keyword:\"const\",params:{allowedValue: \"commit\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data.id !== undefined){let data4 = data.id;if(typeof data4 === \"string\"){if(!pattern0.test(data4)){const err16 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}else {const err17 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data.branch !== undefined){let data5 = data.branch;if(typeof data5 === \"string\"){if(!pattern0.test(data5)){const err18 = {instancePath:instancePath+\"/branch\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}else {const err19 = {instancePath:instancePath+\"/branch\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}if(data.copy !== undefined){let data6 = data.copy;if(typeof data6 === \"string\"){if(!pattern0.test(data6)){const err20 = {instancePath:instancePath+\"/copy\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}else {const err21 = {instancePath:instancePath+\"/copy\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}if(data.merge !== undefined){let data7 = data.merge;if(typeof data7 === \"string\"){if(!pattern0.test(data7)){const err22 = {instancePath:instancePath+\"/merge\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}else {const err23 = {instancePath:instancePath+\"/merge\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}if(data.hash !== undefined){let data8 = data.hash;if(typeof data8 === \"string\"){if(!pattern36.test(data8)){const err24 = {instancePath:instancePath+\"/hash\",schemaPath:\"#/definitions/hash/pattern\",keyword:\"pattern\",params:{pattern: \"^[0-9a-f]{4,40}$\"},message:\"must match pattern \\\"\"+\"^[0-9a-f]{4,40}$\"+\"\\\"\"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}else {const err25 = {instancePath:instancePath+\"/hash\",schemaPath:\"#/definitions/hash/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}if(data.note !== undefined){let data9 = data.note;if(typeof data9 === \"string\"){if(func2(data9) < 1){const err26 = {instancePath:instancePath+\"/note\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}else {const err27 = {instancePath:instancePath+\"/note\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}}}else {const err28 = {instancePath,schemaPath:\"#/oneOf/1/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}}else if(tag0 === \"strip\"){const _errs36 = errors;let valid14 = false;const _errs37 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.value === undefined){const err29 = {instancePath,schemaPath:\"#/oneOf/2/anyOf/0/required\",keyword:\"required\",params:{missingProperty: \"value\"},message:\"must have required property '\"+\"value\"+\"'\"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}}var _valid0 = _errs37 === errors;valid14 = valid14 || _valid0;if(!valid14){const _errs38 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.tag === undefined){const err30 = {instancePath,schemaPath:\"#/oneOf/2/anyOf/1/required\",keyword:\"required\",params:{missingProperty: \"tag\"},message:\"must have required property '\"+\"tag\"+\"'\"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}}var _valid0 = _errs38 === errors;valid14 = valid14 || _valid0;}if(!valid14){const err31 = {instancePath,schemaPath:\"#/oneOf/2/anyOf\",keyword:\"anyOf\",params:{},message:\"must match a schema in anyOf\"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}else {errors = _errs36;if(vErrors !== null){if(_errs36){vErrors.length = _errs36;}else {vErrors = null;}}}if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err32 = {instancePath,schemaPath:\"#/oneOf/2/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}if(data.field === undefined){const err33 = {instancePath,schemaPath:\"#/oneOf/2/required\",keyword:\"required\",params:{missingProperty: \"field\"},message:\"must have required property '\"+\"field\"+\"'\"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}for(const key2 in data){if(!((((key2 === \"type\") || (key2 === \"field\")) || (key2 === \"value\")) || (key2 === \"tag\"))){const err34 = {instancePath,schemaPath:\"#/oneOf/2/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key2},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}}if(data.type !== undefined){if(\"strip\" !== data.type){const err35 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/2/properties/type/const\",keyword:\"const\",params:{allowedValue: \"strip\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}}if(data.field !== undefined){let data11 = data.field;if(typeof data11 === \"string\"){if(func2(data11) < 1){const err36 = {instancePath:instancePath+\"/field\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}}else {const err37 = {instancePath:instancePath+\"/field\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}}if(data.value !== undefined){let data12 = data.value;if(typeof data12 === \"string\"){if(func2(data12) < 1){const err38 = {instancePath:instancePath+\"/value\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}}else {const err39 = {instancePath:instancePath+\"/value\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}}if(data.tag !== undefined){let data13 = data.tag;if(typeof data13 === \"string\"){if(func2(data13) < 1){const err40 = {instancePath:instancePath+\"/tag\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}}else {const err41 = {instancePath:instancePath+\"/tag\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}}}else {const err42 = {instancePath,schemaPath:\"#/oneOf/2/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}}else if(tag0 === \"action\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err43 = {instancePath,schemaPath:\"#/oneOf/3/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}if(data.box === undefined){const err44 = {instancePath,schemaPath:\"#/oneOf/3/required\",keyword:\"required\",params:{missingProperty: \"box\"},message:\"must have required property '\"+\"box\"+\"'\"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}if(data.label === undefined){const err45 = {instancePath,schemaPath:\"#/oneOf/3/required\",keyword:\"required\",params:{missingProperty: \"label\"},message:\"must have required property '\"+\"label\"+\"'\"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}for(const key3 in data){if(!(((key3 === \"type\") || (key3 === \"box\")) || (key3 === \"label\"))){const err46 = {instancePath,schemaPath:\"#/oneOf/3/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key3},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}}if(data.type !== undefined){if(\"action\" !== data.type){const err47 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/3/properties/type/const\",keyword:\"const\",params:{allowedValue: \"action\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}}if(data.box !== undefined){let data15 = data.box;if(typeof data15 === \"string\"){if(!pattern0.test(data15)){const err48 = {instancePath:instancePath+\"/box\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}}else {const err49 = {instancePath:instancePath+\"/box\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}}if(data.label !== undefined){let data16 = data.label;if(typeof data16 === \"string\"){if(func2(data16) < 1){const err50 = {instancePath:instancePath+\"/label\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}}else {const err51 = {instancePath:instancePath+\"/label\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}}}else {const err52 = {instancePath,schemaPath:\"#/oneOf/3/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err52];}else {vErrors.push(err52);}errors++;}}else if(tag0 === \"swap\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err53 = {instancePath,schemaPath:\"#/oneOf/4/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err53];}else {vErrors.push(err53);}errors++;}if(data.box === undefined){const err54 = {instancePath,schemaPath:\"#/oneOf/4/required\",keyword:\"required\",params:{missingProperty: \"box\"},message:\"must have required property '\"+\"box\"+\"'\"};if(vErrors === null){vErrors = [err54];}else {vErrors.push(err54);}errors++;}if(data.text === undefined){const err55 = {instancePath,schemaPath:\"#/oneOf/4/required\",keyword:\"required\",params:{missingProperty: \"text\"},message:\"must have required property '\"+\"text\"+\"'\"};if(vErrors === null){vErrors = [err55];}else {vErrors.push(err55);}errors++;}for(const key4 in data){if(!((((key4 === \"type\") || (key4 === \"box\")) || (key4 === \"text\")) || (key4 === \"color\"))){const err56 = {instancePath,schemaPath:\"#/oneOf/4/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key4},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err56];}else {vErrors.push(err56);}errors++;}}if(data.type !== undefined){if(\"swap\" !== data.type){const err57 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/4/properties/type/const\",keyword:\"const\",params:{allowedValue: \"swap\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err57];}else {vErrors.push(err57);}errors++;}}if(data.box !== undefined){let data18 = data.box;if(typeof data18 === \"string\"){if(!pattern0.test(data18)){const err58 = {instancePath:instancePath+\"/box\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err58];}else {vErrors.push(err58);}errors++;}}else {const err59 = {instancePath:instancePath+\"/box\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err59];}else {vErrors.push(err59);}errors++;}}if(data.text !== undefined){let data19 = data.text;if(typeof data19 === \"string\"){if(func2(data19) < 1){const err60 = {instancePath:instancePath+\"/text\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err60];}else {vErrors.push(err60);}errors++;}}else {const err61 = {instancePath:instancePath+\"/text\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err61];}else {vErrors.push(err61);}errors++;}}if(data.color !== undefined){let data20 = data.color;if(!(((((((data20 === \"blue\") || (data20 === \"amber\")) || (data20 === \"green\")) || (data20 === \"violet\")) || (data20 === \"rose\")) || (data20 === \"slate\")) || (data20 === \"coin\"))){const err62 = {instancePath:instancePath+\"/color\",schemaPath:\"#/definitions/color/enum\",keyword:\"enum\",params:{allowedValues: schema102.enum},message:\"must be equal to one of the allowed values\"};if(vErrors === null){vErrors = [err62];}else {vErrors.push(err62);}errors++;}}}else {const err63 = {instancePath,schemaPath:\"#/oneOf/4/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err63];}else {vErrors.push(err63);}errors++;}}else if(tag0 === \"edge\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err64 = {instancePath,schemaPath:\"#/oneOf/5/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err64];}else {vErrors.push(err64);}errors++;}if(data.from === undefined){const err65 = {instancePath,schemaPath:\"#/oneOf/5/required\",keyword:\"required\",params:{missingProperty: \"from\"},message:\"must have required property '\"+\"from\"+\"'\"};if(vErrors === null){vErrors = [err65];}else {vErrors.push(err65);}errors++;}if(data.to === undefined){const err66 = {instancePath,schemaPath:\"#/oneOf/5/required\",keyword:\"required\",params:{missingProperty: \"to\"},message:\"must have required property '\"+\"to\"+\"'\"};if(vErrors === null){vErrors = [err66];}else {vErrors.push(err66);}errors++;}if(data.carry === undefined){const err67 = {instancePath,schemaPath:\"#/oneOf/5/required\",keyword:\"required\",params:{missingProperty: \"carry\"},message:\"must have required property '\"+\"carry\"+\"'\"};if(vErrors === null){vErrors = [err67];}else {vErrors.push(err67);}errors++;}for(const key5 in data){if(!((((((((key5 === \"type\") || (key5 === \"from\")) || (key5 === \"to\")) || (key5 === \"label\")) || (key5 === \"carry\")) || (key5 === \"labelSide\")) || (key5 === \"at\")) || (key5 === \"into\"))){const err68 = {instancePath,schemaPath:\"#/oneOf/5/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key5},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err68];}else {vErrors.push(err68);}errors++;}}if(data.type !== undefined){if(\"edge\" !== data.type){const err69 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/5/properties/type/const\",keyword:\"const\",params:{allowedValue: \"edge\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err69];}else {vErrors.push(err69);}errors++;}}if(data.from !== undefined){let data22 = data.from;if(typeof data22 === \"string\"){if(!pattern0.test(data22)){const err70 = {instancePath:instancePath+\"/from\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err70];}else {vErrors.push(err70);}errors++;}}else {const err71 = {instancePath:instancePath+\"/from\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err71];}else {vErrors.push(err71);}errors++;}}if(data.to !== undefined){let data23 = data.to;if(typeof data23 === \"string\"){if(!pattern0.test(data23)){const err72 = {instancePath:instancePath+\"/to\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err72];}else {vErrors.push(err72);}errors++;}}else {const err73 = {instancePath:instancePath+\"/to\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err73];}else {vErrors.push(err73);}errors++;}}if(data.label !== undefined){let data24 = data.label;if(typeof data24 === \"string\"){if(func2(data24) < 1){const err74 = {instancePath:instancePath+\"/label\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err74];}else {vErrors.push(err74);}errors++;}}else {const err75 = {instancePath:instancePath+\"/label\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err75];}else {vErrors.push(err75);}errors++;}}if(data.carry !== undefined){if(!(validate68(data.carry, {instancePath:instancePath+\"/carry\",parentData:data,parentDataProperty:\"carry\",rootData}))){vErrors = vErrors === null ? validate68.errors : vErrors.concat(validate68.errors);errors = vErrors.length;}}if(data.labelSide !== undefined){let data26 = data.labelSide;if(!((((data26 === \"above\") || (data26 === \"below\")) || (data26 === \"left\")) || (data26 === \"right\"))){const err76 = {instancePath:instancePath+\"/labelSide\",schemaPath:\"#/oneOf/5/properties/labelSide/enum\",keyword:\"enum\",params:{allowedValues: schema208.oneOf[5].properties.labelSide.enum},message:\"must be equal to one of the allowed values\"};if(vErrors === null){vErrors = [err76];}else {vErrors.push(err76);}errors++;}}if(data.at !== undefined){let data27 = data.at;if(!(((typeof data27 == \"number\") && (!(data27 % 1) && !isNaN(data27))) && (isFinite(data27)))){const err77 = {instancePath:instancePath+\"/at\",schemaPath:\"#/definitions/unit/type\",keyword:\"type\",params:{type: \"integer\"},message:\"must be integer\"};if(vErrors === null){vErrors = [err77];}else {vErrors.push(err77);}errors++;}if((typeof data27 == \"number\") && (isFinite(data27))){if(data27 < 0 || isNaN(data27)){const err78 = {instancePath:instancePath+\"/at\",schemaPath:\"#/definitions/unit/minimum\",keyword:\"minimum\",params:{comparison: \">=\", limit: 0},message:\"must be >= 0\"};if(vErrors === null){vErrors = [err78];}else {vErrors.push(err78);}errors++;}}}if(data.into !== undefined){let data28 = data.into;if(!(((typeof data28 == \"number\") && (!(data28 % 1) && !isNaN(data28))) && (isFinite(data28)))){const err79 = {instancePath:instancePath+\"/into\",schemaPath:\"#/definitions/unit/type\",keyword:\"type\",params:{type: \"integer\"},message:\"must be integer\"};if(vErrors === null){vErrors = [err79];}else {vErrors.push(err79);}errors++;}if((typeof data28 == \"number\") && (isFinite(data28))){if(data28 < 0 || isNaN(data28)){const err80 = {instancePath:instancePath+\"/into\",schemaPath:\"#/definitions/unit/minimum\",keyword:\"minimum\",params:{comparison: \">=\", limit: 0},message:\"must be >= 0\"};if(vErrors === null){vErrors = [err80];}else {vErrors.push(err80);}errors++;}}}}else {const err81 = {instancePath,schemaPath:\"#/oneOf/5/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err81];}else {vErrors.push(err81);}errors++;}}else if(tag0 === \"now\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err82 = {instancePath,schemaPath:\"#/oneOf/6/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err82];}else {vErrors.push(err82);}errors++;}if(data.to === undefined){const err83 = {instancePath,schemaPath:\"#/oneOf/6/required\",keyword:\"required\",params:{missingProperty: \"to\"},message:\"must have required property '\"+\"to\"+\"'\"};if(vErrors === null){vErrors = [err83];}else {vErrors.push(err83);}errors++;}for(const key6 in data){if(!((key6 === \"type\") || (key6 === \"to\"))){const err84 = {instancePath,schemaPath:\"#/oneOf/6/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key6},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err84];}else {vErrors.push(err84);}errors++;}}if(data.type !== undefined){if(\"now\" !== data.type){const err85 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/6/properties/type/const\",keyword:\"const\",params:{allowedValue: \"now\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err85];}else {vErrors.push(err85);}errors++;}}if(data.to !== undefined){let data30 = data.to;if(!(((typeof data30 == \"number\") && (!(data30 % 1) && !isNaN(data30))) && (isFinite(data30)))){const err86 = {instancePath:instancePath+\"/to\",schemaPath:\"#/definitions/unit/type\",keyword:\"type\",params:{type: \"integer\"},message:\"must be integer\"};if(vErrors === null){vErrors = [err86];}else {vErrors.push(err86);}errors++;}if((typeof data30 == \"number\") && (isFinite(data30))){if(data30 < 0 || isNaN(data30)){const err87 = {instancePath:instancePath+\"/to\",schemaPath:\"#/definitions/unit/minimum\",keyword:\"minimum\",params:{comparison: \">=\", limit: 0},message:\"must be >= 0\"};if(vErrors === null){vErrors = [err87];}else {vErrors.push(err87);}errors++;}}}}else {const err88 = {instancePath,schemaPath:\"#/oneOf/6/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err88];}else {vErrors.push(err88);}errors++;}}else if(tag0 === \"span\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err89 = {instancePath,schemaPath:\"#/oneOf/7/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err89];}else {vErrors.push(err89);}errors++;}if(data.from === undefined){const err90 = {instancePath,schemaPath:\"#/oneOf/7/required\",keyword:\"required\",params:{missingProperty: \"from\"},message:\"must have required property '\"+\"from\"+\"'\"};if(vErrors === null){vErrors = [err90];}else {vErrors.push(err90);}errors++;}if(data.to === undefined){const err91 = {instancePath,schemaPath:\"#/oneOf/7/required\",keyword:\"required\",params:{missingProperty: \"to\"},message:\"must have required property '\"+\"to\"+\"'\"};if(vErrors === null){vErrors = [err91];}else {vErrors.push(err91);}errors++;}if(data.text === undefined){const err92 = {instancePath,schemaPath:\"#/oneOf/7/required\",keyword:\"required\",params:{missingProperty: \"text\"},message:\"must have required property '\"+\"text\"+\"'\"};if(vErrors === null){vErrors = [err92];}else {vErrors.push(err92);}errors++;}for(const key7 in data){if(!((((((key7 === \"type\") || (key7 === \"from\")) || (key7 === \"to\")) || (key7 === \"text\")) || (key7 === \"shape\")) || (key7 === \"color\"))){const err93 = {instancePath,schemaPath:\"#/oneOf/7/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key7},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err93];}else {vErrors.push(err93);}errors++;}}if(data.type !== undefined){if(\"span\" !== data.type){const err94 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/7/properties/type/const\",keyword:\"const\",params:{allowedValue: \"span\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err94];}else {vErrors.push(err94);}errors++;}}if(data.from !== undefined){let data32 = data.from;if(!(((typeof data32 == \"number\") && (!(data32 % 1) && !isNaN(data32))) && (isFinite(data32)))){const err95 = {instancePath:instancePath+\"/from\",schemaPath:\"#/definitions/unit/type\",keyword:\"type\",params:{type: \"integer\"},message:\"must be integer\"};if(vErrors === null){vErrors = [err95];}else {vErrors.push(err95);}errors++;}if((typeof data32 == \"number\") && (isFinite(data32))){if(data32 < 0 || isNaN(data32)){const err96 = {instancePath:instancePath+\"/from\",schemaPath:\"#/definitions/unit/minimum\",keyword:\"minimum\",params:{comparison: \">=\", limit: 0},message:\"must be >= 0\"};if(vErrors === null){vErrors = [err96];}else {vErrors.push(err96);}errors++;}}}if(data.to !== undefined){let data33 = data.to;if(!(((typeof data33 == \"number\") && (!(data33 % 1) && !isNaN(data33))) && (isFinite(data33)))){const err97 = {instancePath:instancePath+\"/to\",schemaPath:\"#/definitions/unit/type\",keyword:\"type\",params:{type: \"integer\"},message:\"must be integer\"};if(vErrors === null){vErrors = [err97];}else {vErrors.push(err97);}errors++;}if((typeof data33 == \"number\") && (isFinite(data33))){if(data33 < 0 || isNaN(data33)){const err98 = {instancePath:instancePath+\"/to\",schemaPath:\"#/definitions/unit/minimum\",keyword:\"minimum\",params:{comparison: \">=\", limit: 0},message:\"must be >= 0\"};if(vErrors === null){vErrors = [err98];}else {vErrors.push(err98);}errors++;}}}if(data.text !== undefined){let data34 = data.text;if(typeof data34 === \"string\"){if(func2(data34) < 1){const err99 = {instancePath:instancePath+\"/text\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err99];}else {vErrors.push(err99);}errors++;}}else {const err100 = {instancePath:instancePath+\"/text\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err100];}else {vErrors.push(err100);}errors++;}}if(data.shape !== undefined){if(!(data.shape === \"box\")){const err101 = {instancePath:instancePath+\"/shape\",schemaPath:\"#/oneOf/7/properties/shape/enum\",keyword:\"enum\",params:{allowedValues: schema208.oneOf[7].properties.shape.enum},message:\"must be equal to one of the allowed values\"};if(vErrors === null){vErrors = [err101];}else {vErrors.push(err101);}errors++;}}if(data.color !== undefined){let data36 = data.color;if(!(((((((data36 === \"blue\") || (data36 === \"amber\")) || (data36 === \"green\")) || (data36 === \"violet\")) || (data36 === \"rose\")) || (data36 === \"slate\")) || (data36 === \"coin\"))){const err102 = {instancePath:instancePath+\"/color\",schemaPath:\"#/definitions/color/enum\",keyword:\"enum\",params:{allowedValues: schema102.enum},message:\"must be equal to one of the allowed values\"};if(vErrors === null){vErrors = [err102];}else {vErrors.push(err102);}errors++;}}}else {const err103 = {instancePath,schemaPath:\"#/oneOf/7/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err103];}else {vErrors.push(err103);}errors++;}}else if(tag0 === \"mark\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err104 = {instancePath,schemaPath:\"#/oneOf/8/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err104];}else {vErrors.push(err104);}errors++;}if(data.row === undefined){const err105 = {instancePath,schemaPath:\"#/oneOf/8/required\",keyword:\"required\",params:{missingProperty: \"row\"},message:\"must have required property '\"+\"row\"+\"'\"};if(vErrors === null){vErrors = [err105];}else {vErrors.push(err105);}errors++;}if(data.from === undefined){const err106 = {instancePath,schemaPath:\"#/oneOf/8/required\",keyword:\"required\",params:{missingProperty: \"from\"},message:\"must have required property '\"+\"from\"+\"'\"};if(vErrors === null){vErrors = [err106];}else {vErrors.push(err106);}errors++;}if(data.to === undefined){const err107 = {instancePath,schemaPath:\"#/oneOf/8/required\",keyword:\"required\",params:{missingProperty: \"to\"},message:\"must have required property '\"+\"to\"+\"'\"};if(vErrors === null){vErrors = [err107];}else {vErrors.push(err107);}errors++;}if(data.color === undefined){const err108 = {instancePath,schemaPath:\"#/oneOf/8/required\",keyword:\"required\",params:{missingProperty: \"color\"},message:\"must have required property '\"+\"color\"+\"'\"};if(vErrors === null){vErrors = [err108];}else {vErrors.push(err108);}errors++;}for(const key8 in data){if(!(((((key8 === \"type\") || (key8 === \"row\")) || (key8 === \"from\")) || (key8 === \"to\")) || (key8 === \"color\"))){const err109 = {instancePath,schemaPath:\"#/oneOf/8/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key8},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err109];}else {vErrors.push(err109);}errors++;}}if(data.type !== undefined){if(\"mark\" !== data.type){const err110 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/8/properties/type/const\",keyword:\"const\",params:{allowedValue: \"mark\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err110];}else {vErrors.push(err110);}errors++;}}if(data.row !== undefined){let data38 = data.row;if(typeof data38 === \"string\"){if(!pattern0.test(data38)){const err111 = {instancePath:instancePath+\"/row\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err111];}else {vErrors.push(err111);}errors++;}}else {const err112 = {instancePath:instancePath+\"/row\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err112];}else {vErrors.push(err112);}errors++;}}if(data.from !== undefined){let data39 = data.from;if(!(((typeof data39 == \"number\") && (!(data39 % 1) && !isNaN(data39))) && (isFinite(data39)))){const err113 = {instancePath:instancePath+\"/from\",schemaPath:\"#/definitions/unit/type\",keyword:\"type\",params:{type: \"integer\"},message:\"must be integer\"};if(vErrors === null){vErrors = [err113];}else {vErrors.push(err113);}errors++;}if((typeof data39 == \"number\") && (isFinite(data39))){if(data39 < 0 || isNaN(data39)){const err114 = {instancePath:instancePath+\"/from\",schemaPath:\"#/definitions/unit/minimum\",keyword:\"minimum\",params:{comparison: \">=\", limit: 0},message:\"must be >= 0\"};if(vErrors === null){vErrors = [err114];}else {vErrors.push(err114);}errors++;}}}if(data.to !== undefined){let data40 = data.to;if(!(((typeof data40 == \"number\") && (!(data40 % 1) && !isNaN(data40))) && (isFinite(data40)))){const err115 = {instancePath:instancePath+\"/to\",schemaPath:\"#/definitions/unit/type\",keyword:\"type\",params:{type: \"integer\"},message:\"must be integer\"};if(vErrors === null){vErrors = [err115];}else {vErrors.push(err115);}errors++;}if((typeof data40 == \"number\") && (isFinite(data40))){if(data40 < 0 || isNaN(data40)){const err116 = {instancePath:instancePath+\"/to\",schemaPath:\"#/definitions/unit/minimum\",keyword:\"minimum\",params:{comparison: \">=\", limit: 0},message:\"must be >= 0\"};if(vErrors === null){vErrors = [err116];}else {vErrors.push(err116);}errors++;}}}if(data.color !== undefined){let data41 = data.color;if(!(((((((data41 === \"blue\") || (data41 === \"amber\")) || (data41 === \"green\")) || (data41 === \"violet\")) || (data41 === \"rose\")) || (data41 === \"slate\")) || (data41 === \"coin\"))){const err117 = {instancePath:instancePath+\"/color\",schemaPath:\"#/definitions/color/enum\",keyword:\"enum\",params:{allowedValues: schema102.enum},message:\"must be equal to one of the allowed values\"};if(vErrors === null){vErrors = [err117];}else {vErrors.push(err117);}errors++;}}}else {const err118 = {instancePath,schemaPath:\"#/oneOf/8/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err118];}else {vErrors.push(err118);}errors++;}}else if(tag0 === \"leaf\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err119 = {instancePath,schemaPath:\"#/oneOf/9/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err119];}else {vErrors.push(err119);}errors++;}if(data.id === undefined){const err120 = {instancePath,schemaPath:\"#/oneOf/9/required\",keyword:\"required\",params:{missingProperty: \"id\"},message:\"must have required property '\"+\"id\"+\"'\"};if(vErrors === null){vErrors = [err120];}else {vErrors.push(err120);}errors++;}for(const key9 in data){if(!(((key9 === \"type\") || (key9 === \"id\")) || (key9 === \"hash\"))){const err121 = {instancePath,schemaPath:\"#/oneOf/9/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key9},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err121];}else {vErrors.push(err121);}errors++;}}if(data.type !== undefined){if(\"leaf\" !== data.type){const err122 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/9/properties/type/const\",keyword:\"const\",params:{allowedValue: \"leaf\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err122];}else {vErrors.push(err122);}errors++;}}if(data.id !== undefined){let data43 = data.id;if(typeof data43 === \"string\"){if(!pattern0.test(data43)){const err123 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err123];}else {vErrors.push(err123);}errors++;}}else {const err124 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err124];}else {vErrors.push(err124);}errors++;}}if(data.hash !== undefined){let data44 = data.hash;if(typeof data44 === \"string\"){if(!pattern36.test(data44)){const err125 = {instancePath:instancePath+\"/hash\",schemaPath:\"#/definitions/hash/pattern\",keyword:\"pattern\",params:{pattern: \"^[0-9a-f]{4,40}$\"},message:\"must match pattern \\\"\"+\"^[0-9a-f]{4,40}$\"+\"\\\"\"};if(vErrors === null){vErrors = [err125];}else {vErrors.push(err125);}errors++;}}else {const err126 = {instancePath:instancePath+\"/hash\",schemaPath:\"#/definitions/hash/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err126];}else {vErrors.push(err126);}errors++;}}}else {const err127 = {instancePath,schemaPath:\"#/oneOf/9/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err127];}else {vErrors.push(err127);}errors++;}}else if(tag0 === \"node\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err128 = {instancePath,schemaPath:\"#/oneOf/10/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err128];}else {vErrors.push(err128);}errors++;}if(data.id === undefined){const err129 = {instancePath,schemaPath:\"#/oneOf/10/required\",keyword:\"required\",params:{missingProperty: \"id\"},message:\"must have required property '\"+\"id\"+\"'\"};if(vErrors === null){vErrors = [err129];}else {vErrors.push(err129);}errors++;}if(data.children === undefined){const err130 = {instancePath,schemaPath:\"#/oneOf/10/required\",keyword:\"required\",params:{missingProperty: \"children\"},message:\"must have required property '\"+\"children\"+\"'\"};if(vErrors === null){vErrors = [err130];}else {vErrors.push(err130);}errors++;}for(const key10 in data){if(!((((key10 === \"type\") || (key10 === \"id\")) || (key10 === \"children\")) || (key10 === \"hash\"))){const err131 = {instancePath,schemaPath:\"#/oneOf/10/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key10},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err131];}else {vErrors.push(err131);}errors++;}}if(data.type !== undefined){if(\"node\" !== data.type){const err132 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/10/properties/type/const\",keyword:\"const\",params:{allowedValue: \"node\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err132];}else {vErrors.push(err132);}errors++;}}if(data.id !== undefined){let data46 = data.id;if(typeof data46 === \"string\"){if(!pattern0.test(data46)){const err133 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err133];}else {vErrors.push(err133);}errors++;}}else {const err134 = {instancePath:instancePath+\"/id\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err134];}else {vErrors.push(err134);}errors++;}}if(data.children !== undefined){let data47 = data.children;if(Array.isArray(data47)){if(data47.length < 1){const err135 = {instancePath:instancePath+\"/children\",schemaPath:\"#/oneOf/10/properties/children/minItems\",keyword:\"minItems\",params:{limit: 1},message:\"must NOT have fewer than 1 items\"};if(vErrors === null){vErrors = [err135];}else {vErrors.push(err135);}errors++;}const len0 = data47.length;for(let i0=0; i0<len0; i0++){let data48 = data47[i0];if(typeof data48 === \"string\"){if(!pattern0.test(data48)){const err136 = {instancePath:instancePath+\"/children/\" + i0,schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err136];}else {vErrors.push(err136);}errors++;}}else {const err137 = {instancePath:instancePath+\"/children/\" + i0,schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err137];}else {vErrors.push(err137);}errors++;}}}else {const err138 = {instancePath:instancePath+\"/children\",schemaPath:\"#/oneOf/10/properties/children/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err138];}else {vErrors.push(err138);}errors++;}}if(data.hash !== undefined){let data49 = data.hash;if(typeof data49 === \"string\"){if(!pattern36.test(data49)){const err139 = {instancePath:instancePath+\"/hash\",schemaPath:\"#/definitions/hash/pattern\",keyword:\"pattern\",params:{pattern: \"^[0-9a-f]{4,40}$\"},message:\"must match pattern \\\"\"+\"^[0-9a-f]{4,40}$\"+\"\\\"\"};if(vErrors === null){vErrors = [err139];}else {vErrors.push(err139);}errors++;}}else {const err140 = {instancePath:instancePath+\"/hash\",schemaPath:\"#/definitions/hash/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err140];}else {vErrors.push(err140);}errors++;}}}else {const err141 = {instancePath,schemaPath:\"#/oneOf/10/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err141];}else {vErrors.push(err141);}errors++;}}else if(tag0 === \"line\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err142 = {instancePath,schemaPath:\"#/oneOf/11/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err142];}else {vErrors.push(err142);}errors++;}if(data.items === undefined){const err143 = {instancePath,schemaPath:\"#/oneOf/11/required\",keyword:\"required\",params:{missingProperty: \"items\"},message:\"must have required property '\"+\"items\"+\"'\"};if(vErrors === null){vErrors = [err143];}else {vErrors.push(err143);}errors++;}for(const key11 in data){if(!((((key11 === \"type\") || (key11 === \"box\")) || (key11 === \"part\")) || (key11 === \"items\"))){const err144 = {instancePath,schemaPath:\"#/oneOf/11/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key11},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err144];}else {vErrors.push(err144);}errors++;}}if(data.type !== undefined){if(\"line\" !== data.type){const err145 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/11/properties/type/const\",keyword:\"const\",params:{allowedValue: \"line\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err145];}else {vErrors.push(err145);}errors++;}}if(data.box !== undefined){let data51 = data.box;if(typeof data51 === \"string\"){if(!pattern0.test(data51)){const err146 = {instancePath:instancePath+\"/box\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err146];}else {vErrors.push(err146);}errors++;}}else {const err147 = {instancePath:instancePath+\"/box\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err147];}else {vErrors.push(err147);}errors++;}}if(data.part !== undefined){let data52 = data.part;if(typeof data52 === \"string\"){if(!pattern0.test(data52)){const err148 = {instancePath:instancePath+\"/part\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err148];}else {vErrors.push(err148);}errors++;}}else {const err149 = {instancePath:instancePath+\"/part\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err149];}else {vErrors.push(err149);}errors++;}}if(data.items !== undefined){let data53 = data.items;if(Array.isArray(data53)){if(data53.length > 12){const err150 = {instancePath:instancePath+\"/items\",schemaPath:\"#/oneOf/11/properties/items/maxItems\",keyword:\"maxItems\",params:{limit: 12},message:\"must NOT have more than 12 items\"};if(vErrors === null){vErrors = [err150];}else {vErrors.push(err150);}errors++;}if(data53.length < 1){const err151 = {instancePath:instancePath+\"/items\",schemaPath:\"#/oneOf/11/properties/items/minItems\",keyword:\"minItems\",params:{limit: 1},message:\"must NOT have fewer than 1 items\"};if(vErrors === null){vErrors = [err151];}else {vErrors.push(err151);}errors++;}const len1 = data53.length;for(let i1=0; i1<len1; i1++){let data54 = data53[i1];if(typeof data54 === \"string\"){if(!pattern0.test(data54)){const err152 = {instancePath:instancePath+\"/items/\" + i1,schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err152];}else {vErrors.push(err152);}errors++;}}else {const err153 = {instancePath:instancePath+\"/items/\" + i1,schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err153];}else {vErrors.push(err153);}errors++;}}}else {const err154 = {instancePath:instancePath+\"/items\",schemaPath:\"#/oneOf/11/properties/items/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err154];}else {vErrors.push(err154);}errors++;}}}else {const err155 = {instancePath,schemaPath:\"#/oneOf/11/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err155];}else {vErrors.push(err155);}errors++;}}else if(tag0 === \"seal\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err156 = {instancePath,schemaPath:\"#/oneOf/12/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err156];}else {vErrors.push(err156);}errors++;}if(data.box === undefined){const err157 = {instancePath,schemaPath:\"#/oneOf/12/required\",keyword:\"required\",params:{missingProperty: \"box\"},message:\"must have required property '\"+\"box\"+\"'\"};if(vErrors === null){vErrors = [err157];}else {vErrors.push(err157);}errors++;}for(const key12 in data){if(!((key12 === \"type\") || (key12 === \"box\"))){const err158 = {instancePath,schemaPath:\"#/oneOf/12/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key12},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err158];}else {vErrors.push(err158);}errors++;}}if(data.type !== undefined){if(\"seal\" !== data.type){const err159 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/12/properties/type/const\",keyword:\"const\",params:{allowedValue: \"seal\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err159];}else {vErrors.push(err159);}errors++;}}if(data.box !== undefined){let data56 = data.box;if(typeof data56 === \"string\"){if(!pattern0.test(data56)){const err160 = {instancePath:instancePath+\"/box\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err160];}else {vErrors.push(err160);}errors++;}}else {const err161 = {instancePath:instancePath+\"/box\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err161];}else {vErrors.push(err161);}errors++;}}}else {const err162 = {instancePath,schemaPath:\"#/oneOf/12/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err162];}else {vErrors.push(err162);}errors++;}}else if(tag0 === \"open\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err163 = {instancePath,schemaPath:\"#/oneOf/13/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err163];}else {vErrors.push(err163);}errors++;}if(data.box === undefined){const err164 = {instancePath,schemaPath:\"#/oneOf/13/required\",keyword:\"required\",params:{missingProperty: \"box\"},message:\"must have required property '\"+\"box\"+\"'\"};if(vErrors === null){vErrors = [err164];}else {vErrors.push(err164);}errors++;}for(const key13 in data){if(!((key13 === \"type\") || (key13 === \"box\"))){const err165 = {instancePath,schemaPath:\"#/oneOf/13/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key13},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err165];}else {vErrors.push(err165);}errors++;}}if(data.type !== undefined){if(\"open\" !== data.type){const err166 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/13/properties/type/const\",keyword:\"const\",params:{allowedValue: \"open\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err166];}else {vErrors.push(err166);}errors++;}}if(data.box !== undefined){let data58 = data.box;if(typeof data58 === \"string\"){if(!pattern0.test(data58)){const err167 = {instancePath:instancePath+\"/box\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err167];}else {vErrors.push(err167);}errors++;}}else {const err168 = {instancePath:instancePath+\"/box\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err168];}else {vErrors.push(err168);}errors++;}}}else {const err169 = {instancePath,schemaPath:\"#/oneOf/13/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err169];}else {vErrors.push(err169);}errors++;}}else if(tag0 === \"pick\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err170 = {instancePath,schemaPath:\"#/oneOf/14/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err170];}else {vErrors.push(err170);}errors++;}if(data.box === undefined){const err171 = {instancePath,schemaPath:\"#/oneOf/14/required\",keyword:\"required\",params:{missingProperty: \"box\"},message:\"must have required property '\"+\"box\"+\"'\"};if(vErrors === null){vErrors = [err171];}else {vErrors.push(err171);}errors++;}for(const key14 in data){if(!((key14 === \"type\") || (key14 === \"box\"))){const err172 = {instancePath,schemaPath:\"#/oneOf/14/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key14},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err172];}else {vErrors.push(err172);}errors++;}}if(data.type !== undefined){if(\"pick\" !== data.type){const err173 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/14/properties/type/const\",keyword:\"const\",params:{allowedValue: \"pick\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err173];}else {vErrors.push(err173);}errors++;}}if(data.box !== undefined){let data60 = data.box;if(typeof data60 === \"string\"){if(!pattern0.test(data60)){const err174 = {instancePath:instancePath+\"/box\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err174];}else {vErrors.push(err174);}errors++;}}else {const err175 = {instancePath:instancePath+\"/box\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err175];}else {vErrors.push(err175);}errors++;}}}else {const err176 = {instancePath,schemaPath:\"#/oneOf/14/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err176];}else {vErrors.push(err176);}errors++;}}else if(tag0 === \"stamp\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err177 = {instancePath,schemaPath:\"#/oneOf/15/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err177];}else {vErrors.push(err177);}errors++;}if(data.box === undefined){const err178 = {instancePath,schemaPath:\"#/oneOf/15/required\",keyword:\"required\",params:{missingProperty: \"box\"},message:\"must have required property '\"+\"box\"+\"'\"};if(vErrors === null){vErrors = [err178];}else {vErrors.push(err178);}errors++;}if(data.text === undefined){const err179 = {instancePath,schemaPath:\"#/oneOf/15/required\",keyword:\"required\",params:{missingProperty: \"text\"},message:\"must have required property '\"+\"text\"+\"'\"};if(vErrors === null){vErrors = [err179];}else {vErrors.push(err179);}errors++;}for(const key15 in data){if(!(((key15 === \"type\") || (key15 === \"box\")) || (key15 === \"text\"))){const err180 = {instancePath,schemaPath:\"#/oneOf/15/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key15},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err180];}else {vErrors.push(err180);}errors++;}}if(data.type !== undefined){if(\"stamp\" !== data.type){const err181 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/15/properties/type/const\",keyword:\"const\",params:{allowedValue: \"stamp\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err181];}else {vErrors.push(err181);}errors++;}}if(data.box !== undefined){let data62 = data.box;if(typeof data62 === \"string\"){if(!pattern0.test(data62)){const err182 = {instancePath:instancePath+\"/box\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err182];}else {vErrors.push(err182);}errors++;}}else {const err183 = {instancePath:instancePath+\"/box\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err183];}else {vErrors.push(err183);}errors++;}}if(data.text !== undefined){let data63 = data.text;if(typeof data63 === \"string\"){if(func2(data63) < 1){const err184 = {instancePath:instancePath+\"/text\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err184];}else {vErrors.push(err184);}errors++;}}else {const err185 = {instancePath:instancePath+\"/text\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err185];}else {vErrors.push(err185);}errors++;}}}else {const err186 = {instancePath,schemaPath:\"#/oneOf/15/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err186];}else {vErrors.push(err186);}errors++;}}else if(tag0 === \"role\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err187 = {instancePath,schemaPath:\"#/oneOf/16/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err187];}else {vErrors.push(err187);}errors++;}if(data.role === undefined){const err188 = {instancePath,schemaPath:\"#/oneOf/16/required\",keyword:\"required\",params:{missingProperty: \"role\"},message:\"must have required property '\"+\"role\"+\"'\"};if(vErrors === null){vErrors = [err188];}else {vErrors.push(err188);}errors++;}for(const key16 in data){if(!((key16 === \"type\") || (key16 === \"role\"))){const err189 = {instancePath,schemaPath:\"#/oneOf/16/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key16},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err189];}else {vErrors.push(err189);}errors++;}}if(data.type !== undefined){if(\"role\" !== data.type){const err190 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/16/properties/type/const\",keyword:\"const\",params:{allowedValue: \"role\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err190];}else {vErrors.push(err190);}errors++;}}if(data.role !== undefined){let data65 = data.role;if(typeof data65 === \"string\"){if(!pattern0.test(data65)){const err191 = {instancePath:instancePath+\"/role\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err191];}else {vErrors.push(err191);}errors++;}}else {const err192 = {instancePath:instancePath+\"/role\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err192];}else {vErrors.push(err192);}errors++;}}}else {const err193 = {instancePath,schemaPath:\"#/oneOf/16/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err193];}else {vErrors.push(err193);}errors++;}}else if(tag0 === \"ask\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err194 = {instancePath,schemaPath:\"#/oneOf/17/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err194];}else {vErrors.push(err194);}errors++;}if(data.values === undefined){const err195 = {instancePath,schemaPath:\"#/oneOf/17/required\",keyword:\"required\",params:{missingProperty: \"values\"},message:\"must have required property '\"+\"values\"+\"'\"};if(vErrors === null){vErrors = [err195];}else {vErrors.push(err195);}errors++;}for(const key17 in data){if(!((key17 === \"type\") || (key17 === \"values\"))){const err196 = {instancePath,schemaPath:\"#/oneOf/17/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key17},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err196];}else {vErrors.push(err196);}errors++;}}if(data.type !== undefined){if(\"ask\" !== data.type){const err197 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/17/properties/type/const\",keyword:\"const\",params:{allowedValue: \"ask\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err197];}else {vErrors.push(err197);}errors++;}}if(data.values !== undefined){let data67 = data.values;if(Array.isArray(data67)){if(data67.length < 1){const err198 = {instancePath:instancePath+\"/values\",schemaPath:\"#/oneOf/17/properties/values/minItems\",keyword:\"minItems\",params:{limit: 1},message:\"must NOT have fewer than 1 items\"};if(vErrors === null){vErrors = [err198];}else {vErrors.push(err198);}errors++;}const len2 = data67.length;for(let i2=0; i2<len2; i2++){let data68 = data67[i2];if(typeof data68 === \"string\"){if(func2(data68) < 1){const err199 = {instancePath:instancePath+\"/values/\" + i2,schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err199];}else {vErrors.push(err199);}errors++;}}else {const err200 = {instancePath:instancePath+\"/values/\" + i2,schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err200];}else {vErrors.push(err200);}errors++;}}}else {const err201 = {instancePath:instancePath+\"/values\",schemaPath:\"#/oneOf/17/properties/values/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err201];}else {vErrors.push(err201);}errors++;}}}else {const err202 = {instancePath,schemaPath:\"#/oneOf/17/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err202];}else {vErrors.push(err202);}errors++;}}else if(tag0 === \"item\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err203 = {instancePath,schemaPath:\"#/oneOf/18/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err203];}else {vErrors.push(err203);}errors++;}if(data.item === undefined){const err204 = {instancePath,schemaPath:\"#/oneOf/18/required\",keyword:\"required\",params:{missingProperty: \"item\"},message:\"must have required property '\"+\"item\"+\"'\"};if(vErrors === null){vErrors = [err204];}else {vErrors.push(err204);}errors++;}if(data.values === undefined){const err205 = {instancePath,schemaPath:\"#/oneOf/18/required\",keyword:\"required\",params:{missingProperty: \"values\"},message:\"must have required property '\"+\"values\"+\"'\"};if(vErrors === null){vErrors = [err205];}else {vErrors.push(err205);}errors++;}for(const key18 in data){if(!(((key18 === \"type\") || (key18 === \"item\")) || (key18 === \"values\"))){const err206 = {instancePath,schemaPath:\"#/oneOf/18/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key18},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err206];}else {vErrors.push(err206);}errors++;}}if(data.type !== undefined){if(\"item\" !== data.type){const err207 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/18/properties/type/const\",keyword:\"const\",params:{allowedValue: \"item\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err207];}else {vErrors.push(err207);}errors++;}}if(data.item !== undefined){let data70 = data.item;if(typeof data70 === \"string\"){if(!pattern0.test(data70)){const err208 = {instancePath:instancePath+\"/item\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err208];}else {vErrors.push(err208);}errors++;}}else {const err209 = {instancePath:instancePath+\"/item\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err209];}else {vErrors.push(err209);}errors++;}}if(data.values !== undefined){if(!(validate31(data.values, {instancePath:instancePath+\"/values\",parentData:data,parentDataProperty:\"values\",rootData}))){vErrors = vErrors === null ? validate31.errors : vErrors.concat(validate31.errors);errors = vErrors.length;}}}else {const err210 = {instancePath,schemaPath:\"#/oneOf/18/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err210];}else {vErrors.push(err210);}errors++;}}else if(tag0 === \"press\"){if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.type === undefined){const err211 = {instancePath,schemaPath:\"#/oneOf/19/required\",keyword:\"required\",params:{missingProperty: \"type\"},message:\"must have required property '\"+\"type\"+\"'\"};if(vErrors === null){vErrors = [err211];}else {vErrors.push(err211);}errors++;}if(data.press === undefined){const err212 = {instancePath,schemaPath:\"#/oneOf/19/required\",keyword:\"required\",params:{missingProperty: \"press\"},message:\"must have required property '\"+\"press\"+\"'\"};if(vErrors === null){vErrors = [err212];}else {vErrors.push(err212);}errors++;}for(const key19 in data){if(!((key19 === \"type\") || (key19 === \"press\"))){const err213 = {instancePath,schemaPath:\"#/oneOf/19/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key19},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err213];}else {vErrors.push(err213);}errors++;}}if(data.type !== undefined){if(\"press\" !== data.type){const err214 = {instancePath:instancePath+\"/type\",schemaPath:\"#/oneOf/19/properties/type/const\",keyword:\"const\",params:{allowedValue: \"press\"},message:\"must be equal to constant\"};if(vErrors === null){vErrors = [err214];}else {vErrors.push(err214);}errors++;}}if(data.press !== undefined){let data73 = data.press;if(typeof data73 === \"string\"){if(!pattern0.test(data73)){const err215 = {instancePath:instancePath+\"/press\",schemaPath:\"#/definitions/id/pattern\",keyword:\"pattern\",params:{pattern: \"^[^\\\\s\\\\[\\\\]「」=:]+$\"},message:\"must match pattern \\\"\"+\"^[^\\\\s\\\\[\\\\]「」=:]+$\"+\"\\\"\"};if(vErrors === null){vErrors = [err215];}else {vErrors.push(err215);}errors++;}}else {const err216 = {instancePath:instancePath+\"/press\",schemaPath:\"#/definitions/id/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err216];}else {vErrors.push(err216);}errors++;}}}else {const err217 = {instancePath,schemaPath:\"#/oneOf/19/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err217];}else {vErrors.push(err217);}errors++;}}else {const err218 = {instancePath,schemaPath:\"#/discriminator\",keyword:\"discriminator\",params:{error: \"mapping\", tag: \"type\", tagValue: tag0},message:\"value of tag \\\"type\\\" must be in oneOf\"};if(vErrors === null){vErrors = [err218];}else {vErrors.push(err218);}errors++;}}else {const err219 = {instancePath,schemaPath:\"#/discriminator\",keyword:\"discriminator\",params:{error: \"tag\", tag: \"type\", tagValue: tag0},message:\"tag \\\"type\\\" must be string\"};if(vErrors === null){vErrors = [err219];}else {vErrors.push(err219);}errors++;}}else {const err220 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err220];}else {vErrors.push(err220);}errors++;}validate67.errors = vErrors;return errors === 0;}function validate64(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.title === undefined){const err0 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"title\"},message:\"must have required property '\"+\"title\"+\"'\"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.body === undefined){const err1 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"body\"},message:\"must have required property '\"+\"body\"+\"'\"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.events === undefined){const err2 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"events\"},message:\"must have required property '\"+\"events\"+\"'\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}for(const key0 in data){if(!(((((key0 === \"title\") || (key0 === \"body\")) || (key0 === \"code\")) || (key0 === \"sources\")) || (key0 === \"events\"))){const err3 = {instancePath,schemaPath:\"#/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key0},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.title !== undefined){let data0 = data.title;if(typeof data0 === \"string\"){if(func2(data0) < 1){const err4 = {instancePath:instancePath+\"/title\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}else {const err5 = {instancePath:instancePath+\"/title\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.body !== undefined){let data1 = data.body;if(typeof data1 === \"string\"){if(func2(data1) < 1){const err6 = {instancePath:instancePath+\"/body\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}else {const err7 = {instancePath:instancePath+\"/body\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.code !== undefined){let data2 = data.code;if(typeof data2 === \"string\"){if(func2(data2) < 1){const err8 = {instancePath:instancePath+\"/code\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}else {const err9 = {instancePath:instancePath+\"/code\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.sources !== undefined){let data3 = data.sources;if(Array.isArray(data3)){if(data3.length < 1){const err10 = {instancePath:instancePath+\"/sources\",schemaPath:\"#/properties/sources/minItems\",keyword:\"minItems\",params:{limit: 1},message:\"must NOT have fewer than 1 items\"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}const len0 = data3.length;for(let i0=0; i0<len0; i0++){if(!(validate65(data3[i0], {instancePath:instancePath+\"/sources/\" + i0,parentData:data3,parentDataProperty:i0,rootData}))){vErrors = vErrors === null ? validate65.errors : vErrors.concat(validate65.errors);errors = vErrors.length;}}}else {const err11 = {instancePath:instancePath+\"/sources\",schemaPath:\"#/properties/sources/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data.events !== undefined){let data5 = data.events;if(Array.isArray(data5)){const len1 = data5.length;for(let i1=0; i1<len1; i1++){if(!(validate67(data5[i1], {instancePath:instancePath+\"/events/\" + i1,parentData:data5,parentDataProperty:i1,rootData}))){vErrors = vErrors === null ? validate67.errors : vErrors.concat(validate67.errors);errors = vErrors.length;}}}else {const err12 = {instancePath:instancePath+\"/events\",schemaPath:\"#/properties/events/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}}else {const err13 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}validate64.errors = vErrors;return errors === 0;}const func7 = Object.prototype.hasOwnProperty;function validate10(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;const _errs2 = errors;let valid1 = true;const _errs3 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){let missing0;if((data.kind === undefined) && (missing0 = \"kind\")){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.kind !== undefined){if(\"lineup\" !== data.kind){const err1 = {};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}}}var _valid0 = _errs3 === errors;errors = _errs2;if(vErrors !== null){if(_errs2){vErrors.length = _errs2;}else {vErrors = null;}}if(!_valid0){const _errs5 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.blocks !== undefined){let data1 = data.blocks;if(data1 && typeof data1 == \"object\" && !Array.isArray(data1)){if(data1.box !== undefined){let data2 = data1.box;if(Array.isArray(data2)){const len0 = data2.length;for(let i0=0; i0<len0; i0++){let data3 = data2[i0];if(data3 && typeof data3 == \"object\" && !Array.isArray(data3)){if(data3.order !== undefined){const err2 = {instancePath:instancePath+\"/blocks/box/\" + i0+\"/order\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}}}}}}}var _valid0 = _errs5 === errors;valid1 = _valid0;}if(!valid1){const err3 = {instancePath,schemaPath:\"#/allOf/0/if\",keyword:\"if\",params:{failingKeyword: \"else\"},message:\"must match \\\"else\\\" schema\"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}const _errs12 = errors;let valid9 = true;const _errs13 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){let missing1;if((data.kind === undefined) && (missing1 = \"kind\")){const err4 = {};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}else {if(data.kind !== undefined){if(\"sequence\" !== data.kind){const err5 = {};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}}}var _valid1 = _errs13 === errors;errors = _errs12;if(vErrors !== null){if(_errs12){vErrors.length = _errs12;}else {vErrors = null;}}let ifClause0;if(_valid1){const _errs15 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.blocks !== undefined){let data6 = data.blocks;if(data6 && typeof data6 == \"object\" && !Array.isArray(data6)){if(data6.box === undefined){const err6 = {instancePath:instancePath+\"/blocks\",schemaPath:\"#/then/properties/blocks/required\",keyword:\"required\",params:{missingProperty: \"box\"},message:\"must have required property '\"+\"box\"+\"'\"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if(data6.box !== undefined){let data7 = data6.box;if(Array.isArray(data7)){if(data7.length < 1){const err7 = {instancePath:instancePath+\"/blocks/box\",schemaPath:\"#/then/properties/blocks/properties/box/minItems\",keyword:\"minItems\",params:{limit: 1},message:\"must NOT have fewer than 1 items\"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}}if(data6.strip !== undefined){if(!(validate11(data6.strip, {instancePath:instancePath+\"/blocks/strip\",parentData:data6,parentDataProperty:\"strip\",rootData}))){vErrors = vErrors === null ? validate11.errors : vErrors.concat(validate11.errors);errors = vErrors.length;}}if(data6.path !== undefined){const err8 = {instancePath:instancePath+\"/blocks/path\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if(data6.branch !== undefined){const err9 = {instancePath:instancePath+\"/blocks/branch\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}if(data6.scale !== undefined){const err10 = {instancePath:instancePath+\"/blocks/scale\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}if(data6.period !== undefined){const err11 = {instancePath:instancePath+\"/blocks/period\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}if(data6.row !== undefined){const err12 = {instancePath:instancePath+\"/blocks/row\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}if(data6.point !== undefined){const err13 = {instancePath:instancePath+\"/blocks/point\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}if(data6.zoom !== undefined){const err14 = {instancePath:instancePath+\"/blocks/zoom\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}if(data6.item !== undefined){const err15 = {instancePath:instancePath+\"/blocks/item\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}if(data6.role !== undefined){const err16 = {instancePath:instancePath+\"/blocks/role\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}if(data6.part !== undefined){const err17 = {instancePath:instancePath+\"/blocks/part\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}}if(data.steps !== undefined){if(!(validate13(data.steps, {instancePath:instancePath+\"/steps\",parentData:data,parentDataProperty:\"steps\",rootData}))){vErrors = vErrors === null ? validate13.errors : vErrors.concat(validate13.errors);errors = vErrors.length;}}}var _valid1 = _errs15 === errors;valid9 = _valid1;ifClause0 = \"then\";}else {const _errs50 = errors;const _errs51 = errors;let valid23 = true;const _errs52 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){let missing2;if((data.kind === undefined) && (missing2 = \"kind\")){const err18 = {};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}else {if(data.kind !== undefined){if(\"state\" !== data.kind){const err19 = {};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}}}var _valid2 = _errs52 === errors;errors = _errs51;if(vErrors !== null){if(_errs51){vErrors.length = _errs51;}else {vErrors = null;}}let ifClause1;if(_valid2){const _errs54 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.blocks !== undefined){let data21 = data.blocks;if(data21 && typeof data21 == \"object\" && !Array.isArray(data21)){if(data21.box === undefined){const err20 = {instancePath:instancePath+\"/blocks\",schemaPath:\"#/else/then/properties/blocks/required\",keyword:\"required\",params:{missingProperty: \"box\"},message:\"must have required property '\"+\"box\"+\"'\"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}if(data21.box !== undefined){let data22 = data21.box;if(Array.isArray(data22)){if(data22.length < 1){const err21 = {instancePath:instancePath+\"/blocks/box\",schemaPath:\"#/else/then/properties/blocks/properties/box/minItems\",keyword:\"minItems\",params:{limit: 1},message:\"must NOT have fewer than 1 items\"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}const len1 = data22.length;for(let i1=0; i1<len1; i1++){let data23 = data22[i1];if(data23 && typeof data23 == \"object\" && !Array.isArray(data23)){if(data23.id !== undefined){let data24 = data23.id;const _errs59 = errors;const _errs60 = errors;if(!((data24 === \"start\") || (data24 === \"finish\"))){const err22 = {};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}var valid30 = _errs60 === errors;if(valid30){const err23 = {instancePath:instancePath+\"/blocks/box/\" + i1+\"/id\",schemaPath:\"#/else/then/properties/blocks/properties/box/items/properties/id/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}else {errors = _errs59;if(vErrors !== null){if(_errs59){vErrors.length = _errs59;}else {vErrors = null;}}}}}}}}if(data21.strip !== undefined){if(!(validate11(data21.strip, {instancePath:instancePath+\"/blocks/strip\",parentData:data21,parentDataProperty:\"strip\",rootData}))){vErrors = vErrors === null ? validate11.errors : vErrors.concat(validate11.errors);errors = vErrors.length;}}if(data21.branch !== undefined){const err24 = {instancePath:instancePath+\"/blocks/branch\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}if(data21.scale !== undefined){const err25 = {instancePath:instancePath+\"/blocks/scale\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}if(data21.period !== undefined){const err26 = {instancePath:instancePath+\"/blocks/period\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}if(data21.row !== undefined){const err27 = {instancePath:instancePath+\"/blocks/row\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}if(data21.point !== undefined){const err28 = {instancePath:instancePath+\"/blocks/point\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}if(data21.zoom !== undefined){const err29 = {instancePath:instancePath+\"/blocks/zoom\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}if(data21.item !== undefined){const err30 = {instancePath:instancePath+\"/blocks/item\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}if(data21.role !== undefined){const err31 = {instancePath:instancePath+\"/blocks/role\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}if(data21.part !== undefined){const err32 = {instancePath:instancePath+\"/blocks/part\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}}}if(data.steps !== undefined){if(!(validate13(data.steps, {instancePath:instancePath+\"/steps\",parentData:data,parentDataProperty:\"steps\",rootData}))){vErrors = vErrors === null ? validate13.errors : vErrors.concat(validate13.errors);errors = vErrors.length;}}}var _valid2 = _errs54 === errors;valid23 = _valid2;ifClause1 = \"then\";}else {const _errs90 = errors;const _errs91 = errors;let valid40 = true;const _errs92 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){let missing3;if((data.kind === undefined) && (missing3 = \"kind\")){const err33 = {};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}else {if(data.kind !== undefined){if(\"git\" !== data.kind){const err34 = {};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}}}}var _valid3 = _errs92 === errors;errors = _errs91;if(vErrors !== null){if(_errs91){vErrors.length = _errs91;}else {vErrors = null;}}let ifClause2;if(_valid3){const _errs94 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.blocks !== undefined){let data37 = data.blocks;if(data37 && typeof data37 == \"object\" && !Array.isArray(data37)){if(data37.branch === undefined){const err35 = {instancePath:instancePath+\"/blocks\",schemaPath:\"#/else/else/then/properties/blocks/required\",keyword:\"required\",params:{missingProperty: \"branch\"},message:\"must have required property '\"+\"branch\"+\"'\"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}if(data37.strip !== undefined){if(!(validate11(data37.strip, {instancePath:instancePath+\"/blocks/strip\",parentData:data37,parentDataProperty:\"strip\",rootData}))){vErrors = vErrors === null ? validate11.errors : vErrors.concat(validate11.errors);errors = vErrors.length;}}if(data37.path !== undefined){const err36 = {instancePath:instancePath+\"/blocks/path\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}if(data37.group !== undefined){const err37 = {instancePath:instancePath+\"/blocks/group\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}if(data37.scale !== undefined){const err38 = {instancePath:instancePath+\"/blocks/scale\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}if(data37.period !== undefined){const err39 = {instancePath:instancePath+\"/blocks/period\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}if(data37.row !== undefined){const err40 = {instancePath:instancePath+\"/blocks/row\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}if(data37.point !== undefined){const err41 = {instancePath:instancePath+\"/blocks/point\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}if(data37.zoom !== undefined){const err42 = {instancePath:instancePath+\"/blocks/zoom\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}if(data37.item !== undefined){const err43 = {instancePath:instancePath+\"/blocks/item\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}if(data37.role !== undefined){const err44 = {instancePath:instancePath+\"/blocks/role\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}if(data37.part !== undefined){const err45 = {instancePath:instancePath+\"/blocks/part\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}}}if(data.steps !== undefined){if(!(validate18(data.steps, {instancePath:instancePath+\"/steps\",parentData:data,parentDataProperty:\"steps\",rootData}))){vErrors = vErrors === null ? validate18.errors : vErrors.concat(validate18.errors);errors = vErrors.length;}}}var _valid3 = _errs94 === errors;valid40 = _valid3;ifClause2 = \"then\";}else {const _errs128 = errors;const _errs129 = errors;let valid54 = true;const _errs130 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){let missing4;if((data.kind === undefined) && (missing4 = \"kind\")){const err46 = {};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}else {if(data.kind !== undefined){if(\"time\" !== data.kind){const err47 = {};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}}}}var _valid4 = _errs130 === errors;errors = _errs129;if(vErrors !== null){if(_errs129){vErrors.length = _errs129;}else {vErrors = null;}}let ifClause3;if(_valid4){const _errs132 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.blocks !== undefined){let data51 = data.blocks;if(data51 && typeof data51 == \"object\" && !Array.isArray(data51)){if(data51.scale === undefined){const err48 = {instancePath:instancePath+\"/blocks\",schemaPath:\"#/else/else/else/then/properties/blocks/required\",keyword:\"required\",params:{missingProperty: \"scale\"},message:\"must have required property '\"+\"scale\"+\"'\"};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}if(data51.row === undefined){const err49 = {instancePath:instancePath+\"/blocks\",schemaPath:\"#/else/else/else/then/properties/blocks/required\",keyword:\"required\",params:{missingProperty: \"row\"},message:\"must have required property '\"+\"row\"+\"'\"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}if(data51.path !== undefined){const err50 = {instancePath:instancePath+\"/blocks/path\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}if(data51.branch !== undefined){const err51 = {instancePath:instancePath+\"/blocks/branch\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}if(data51.group !== undefined){const err52 = {instancePath:instancePath+\"/blocks/group\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err52];}else {vErrors.push(err52);}errors++;}if(data51.item !== undefined){const err53 = {instancePath:instancePath+\"/blocks/item\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err53];}else {vErrors.push(err53);}errors++;}if(data51.role !== undefined){const err54 = {instancePath:instancePath+\"/blocks/role\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err54];}else {vErrors.push(err54);}errors++;}if(data51.part !== undefined){const err55 = {instancePath:instancePath+\"/blocks/part\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err55];}else {vErrors.push(err55);}errors++;}}}if(data.steps !== undefined){if(!(validate20(data.steps, {instancePath:instancePath+\"/steps\",parentData:data,parentDataProperty:\"steps\",rootData}))){vErrors = vErrors === null ? validate20.errors : vErrors.concat(validate20.errors);errors = vErrors.length;}}}var _valid4 = _errs132 === errors;valid54 = _valid4;ifClause3 = \"then\";}else {const _errs153 = errors;const _errs154 = errors;let valid64 = true;const _errs155 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){let missing5;if((data.kind === undefined) && (missing5 = \"kind\")){const err56 = {};if(vErrors === null){vErrors = [err56];}else {vErrors.push(err56);}errors++;}else {if(data.kind !== undefined){if(\"tree\" !== data.kind){const err57 = {};if(vErrors === null){vErrors = [err57];}else {vErrors.push(err57);}errors++;}}}}var _valid5 = _errs155 === errors;errors = _errs154;if(vErrors !== null){if(_errs154){vErrors.length = _errs154;}else {vErrors = null;}}let ifClause4;if(_valid5){const _errs157 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.blocks !== undefined){let data60 = data.blocks;if(data60 && typeof data60 == \"object\" && !Array.isArray(data60)){if(data60.strip !== undefined){if(!(validate11(data60.strip, {instancePath:instancePath+\"/blocks/strip\",parentData:data60,parentDataProperty:\"strip\",rootData}))){vErrors = vErrors === null ? validate11.errors : vErrors.concat(validate11.errors);errors = vErrors.length;}}if(data60.path !== undefined){const err58 = {instancePath:instancePath+\"/blocks/path\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err58];}else {vErrors.push(err58);}errors++;}if(data60.branch !== undefined){const err59 = {instancePath:instancePath+\"/blocks/branch\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err59];}else {vErrors.push(err59);}errors++;}if(data60.scale !== undefined){const err60 = {instancePath:instancePath+\"/blocks/scale\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err60];}else {vErrors.push(err60);}errors++;}if(data60.period !== undefined){const err61 = {instancePath:instancePath+\"/blocks/period\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err61];}else {vErrors.push(err61);}errors++;}if(data60.row !== undefined){const err62 = {instancePath:instancePath+\"/blocks/row\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err62];}else {vErrors.push(err62);}errors++;}if(data60.point !== undefined){const err63 = {instancePath:instancePath+\"/blocks/point\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err63];}else {vErrors.push(err63);}errors++;}if(data60.zoom !== undefined){const err64 = {instancePath:instancePath+\"/blocks/zoom\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err64];}else {vErrors.push(err64);}errors++;}if(data60.group !== undefined){const err65 = {instancePath:instancePath+\"/blocks/group\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err65];}else {vErrors.push(err65);}errors++;}if(data60.item !== undefined){const err66 = {instancePath:instancePath+\"/blocks/item\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err66];}else {vErrors.push(err66);}errors++;}if(data60.role !== undefined){const err67 = {instancePath:instancePath+\"/blocks/role\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err67];}else {vErrors.push(err67);}errors++;}if(data60.part !== undefined){const err68 = {instancePath:instancePath+\"/blocks/part\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err68];}else {vErrors.push(err68);}errors++;}}}if(data.steps !== undefined){if(!(validate23(data.steps, {instancePath:instancePath+\"/steps\",parentData:data,parentDataProperty:\"steps\",rootData}))){vErrors = vErrors === null ? validate23.errors : vErrors.concat(validate23.errors);errors = vErrors.length;}}}var _valid5 = _errs157 === errors;valid64 = _valid5;ifClause4 = \"then\";}else {const _errs194 = errors;const _errs195 = errors;let valid79 = true;const _errs196 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){let missing6;if((data.kind === undefined) && (missing6 = \"kind\")){const err69 = {};if(vErrors === null){vErrors = [err69];}else {vErrors.push(err69);}errors++;}else {if(data.kind !== undefined){if(\"lineup\" !== data.kind){const err70 = {};if(vErrors === null){vErrors = [err70];}else {vErrors.push(err70);}errors++;}}}}var _valid6 = _errs196 === errors;errors = _errs195;if(vErrors !== null){if(_errs195){vErrors.length = _errs195;}else {vErrors = null;}}let ifClause5;if(_valid6){const _errs198 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.blocks !== undefined){let data75 = data.blocks;if(data75 && typeof data75 == \"object\" && !Array.isArray(data75)){if(data75.box === undefined){const err71 = {instancePath:instancePath+\"/blocks\",schemaPath:\"#/else/else/else/else/else/then/properties/blocks/required\",keyword:\"required\",params:{missingProperty: \"box\"},message:\"must have required property '\"+\"box\"+\"'\"};if(vErrors === null){vErrors = [err71];}else {vErrors.push(err71);}errors++;}if(data75.item === undefined){const err72 = {instancePath:instancePath+\"/blocks\",schemaPath:\"#/else/else/else/else/else/then/properties/blocks/required\",keyword:\"required\",params:{missingProperty: \"item\"},message:\"must have required property '\"+\"item\"+\"'\"};if(vErrors === null){vErrors = [err72];}else {vErrors.push(err72);}errors++;}if(data75.box !== undefined){let data76 = data75.box;if(Array.isArray(data76)){if(data76.length < 1){const err73 = {instancePath:instancePath+\"/blocks/box\",schemaPath:\"#/else/else/else/else/else/then/properties/blocks/properties/box/minItems\",keyword:\"minItems\",params:{limit: 1},message:\"must NOT have fewer than 1 items\"};if(vErrors === null){vErrors = [err73];}else {vErrors.push(err73);}errors++;}const len2 = data76.length;for(let i2=0; i2<len2; i2++){let data77 = data76[i2];if(data77 && typeof data77 == \"object\" && !Array.isArray(data77)){if(data77.icon !== undefined){const err74 = {instancePath:instancePath+\"/blocks/box/\" + i2+\"/icon\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err74];}else {vErrors.push(err74);}errors++;}if(data77.link !== undefined){const err75 = {instancePath:instancePath+\"/blocks/box/\" + i2+\"/link\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err75];}else {vErrors.push(err75);}errors++;}if(data77.region !== undefined){const err76 = {instancePath:instancePath+\"/blocks/box/\" + i2+\"/region\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err76];}else {vErrors.push(err76);}errors++;}}}}}if(data75.strip !== undefined){if(!(validate11(data75.strip, {instancePath:instancePath+\"/blocks/strip\",parentData:data75,parentDataProperty:\"strip\",rootData}))){vErrors = vErrors === null ? validate11.errors : vErrors.concat(validate11.errors);errors = vErrors.length;}}if(data75.path !== undefined){const err77 = {instancePath:instancePath+\"/blocks/path\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err77];}else {vErrors.push(err77);}errors++;}if(data75.branch !== undefined){const err78 = {instancePath:instancePath+\"/blocks/branch\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err78];}else {vErrors.push(err78);}errors++;}if(data75.scale !== undefined){const err79 = {instancePath:instancePath+\"/blocks/scale\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err79];}else {vErrors.push(err79);}errors++;}if(data75.period !== undefined){const err80 = {instancePath:instancePath+\"/blocks/period\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err80];}else {vErrors.push(err80);}errors++;}if(data75.row !== undefined){const err81 = {instancePath:instancePath+\"/blocks/row\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err81];}else {vErrors.push(err81);}errors++;}if(data75.point !== undefined){const err82 = {instancePath:instancePath+\"/blocks/point\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err82];}else {vErrors.push(err82);}errors++;}if(data75.zoom !== undefined){const err83 = {instancePath:instancePath+\"/blocks/zoom\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err83];}else {vErrors.push(err83);}errors++;}if(data75.group !== undefined){const err84 = {instancePath:instancePath+\"/blocks/group\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err84];}else {vErrors.push(err84);}errors++;}if(data75.part !== undefined){const err85 = {instancePath:instancePath+\"/blocks/part\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err85];}else {vErrors.push(err85);}errors++;}if(data75.item !== undefined){let data91 = data75.item;if(Array.isArray(data91)){const len3 = data91.length;for(let i3=0; i3<len3; i3++){if(!(validate26(data91[i3], {instancePath:instancePath+\"/blocks/item/\" + i3,parentData:data91,parentDataProperty:i3,rootData}))){vErrors = vErrors === null ? validate26.errors : vErrors.concat(validate26.errors);errors = vErrors.length;}}}}}}if(data.steps !== undefined){if(!(validate28(data.steps, {instancePath:instancePath+\"/steps\",parentData:data,parentDataProperty:\"steps\",rootData}))){vErrors = vErrors === null ? validate28.errors : vErrors.concat(validate28.errors);errors = vErrors.length;}}}var _valid6 = _errs198 === errors;valid79 = _valid6;ifClause5 = \"then\";}else {const _errs242 = errors;const _errs243 = errors;let valid100 = true;const _errs244 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){let missing7;if((data.kind === undefined) && (missing7 = \"kind\")){const err86 = {};if(vErrors === null){vErrors = [err86];}else {vErrors.push(err86);}errors++;}else {if(data.kind !== undefined){if(\"try\" !== data.kind){const err87 = {};if(vErrors === null){vErrors = [err87];}else {vErrors.push(err87);}errors++;}}}}var _valid7 = _errs244 === errors;errors = _errs243;if(vErrors !== null){if(_errs243){vErrors.length = _errs243;}else {vErrors = null;}}let ifClause6;if(_valid7){const _errs246 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.blocks !== undefined){let data95 = data.blocks;if(data95 && typeof data95 == \"object\" && !Array.isArray(data95)){if(data95.part === undefined){const err88 = {instancePath:instancePath+\"/blocks\",schemaPath:\"#/else/else/else/else/else/else/then/properties/blocks/required\",keyword:\"required\",params:{missingProperty: \"part\"},message:\"must have required property '\"+\"part\"+\"'\"};if(vErrors === null){vErrors = [err88];}else {vErrors.push(err88);}errors++;}if(data95.item !== undefined){let data96 = data95.item;if(Array.isArray(data96)){const len4 = data96.length;for(let i4=0; i4<len4; i4++){if(!(validate30(data96[i4], {instancePath:instancePath+\"/blocks/item/\" + i4,parentData:data96,parentDataProperty:i4,rootData}))){vErrors = vErrors === null ? validate30.errors : vErrors.concat(validate30.errors);errors = vErrors.length;}}}}if(data95.group !== undefined){const err89 = {instancePath:instancePath+\"/blocks/group\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err89];}else {vErrors.push(err89);}errors++;}if(data95.box !== undefined){const err90 = {instancePath:instancePath+\"/blocks/box\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err90];}else {vErrors.push(err90);}errors++;}if(data95.strip !== undefined){const err91 = {instancePath:instancePath+\"/blocks/strip\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err91];}else {vErrors.push(err91);}errors++;}if(data95.path !== undefined){const err92 = {instancePath:instancePath+\"/blocks/path\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err92];}else {vErrors.push(err92);}errors++;}if(data95.branch !== undefined){const err93 = {instancePath:instancePath+\"/blocks/branch\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err93];}else {vErrors.push(err93);}errors++;}if(data95.scale !== undefined){const err94 = {instancePath:instancePath+\"/blocks/scale\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err94];}else {vErrors.push(err94);}errors++;}if(data95.period !== undefined){const err95 = {instancePath:instancePath+\"/blocks/period\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err95];}else {vErrors.push(err95);}errors++;}if(data95.row !== undefined){const err96 = {instancePath:instancePath+\"/blocks/row\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err96];}else {vErrors.push(err96);}errors++;}if(data95.point !== undefined){const err97 = {instancePath:instancePath+\"/blocks/point\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err97];}else {vErrors.push(err97);}errors++;}if(data95.zoom !== undefined){const err98 = {instancePath:instancePath+\"/blocks/zoom\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err98];}else {vErrors.push(err98);}errors++;}if(data95.role !== undefined){const err99 = {instancePath:instancePath+\"/blocks/role\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err99];}else {vErrors.push(err99);}errors++;}}}if(data.steps !== undefined){if(!(validate34(data.steps, {instancePath:instancePath+\"/steps\",parentData:data,parentDataProperty:\"steps\",rootData}))){vErrors = vErrors === null ? validate34.errors : vErrors.concat(validate34.errors);errors = vErrors.length;}}}var _valid7 = _errs246 === errors;valid100 = _valid7;ifClause6 = \"then\";}else {const _errs284 = errors;if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.blocks !== undefined){let data110 = data.blocks;if(data110 && typeof data110 == \"object\" && !Array.isArray(data110)){if(data110.box === undefined){const err100 = {instancePath:instancePath+\"/blocks\",schemaPath:\"#/else/else/else/else/else/else/else/properties/blocks/required\",keyword:\"required\",params:{missingProperty: \"box\"},message:\"must have required property '\"+\"box\"+\"'\"};if(vErrors === null){vErrors = [err100];}else {vErrors.push(err100);}errors++;}if(data110.box !== undefined){let data111 = data110.box;if(Array.isArray(data111)){if(data111.length < 1){const err101 = {instancePath:instancePath+\"/blocks/box\",schemaPath:\"#/else/else/else/else/else/else/else/properties/blocks/properties/box/minItems\",keyword:\"minItems\",params:{limit: 1},message:\"must NOT have fewer than 1 items\"};if(vErrors === null){vErrors = [err101];}else {vErrors.push(err101);}errors++;}}}if(data110.strip !== undefined){if(!(validate11(data110.strip, {instancePath:instancePath+\"/blocks/strip\",parentData:data110,parentDataProperty:\"strip\",rootData}))){vErrors = vErrors === null ? validate11.errors : vErrors.concat(validate11.errors);errors = vErrors.length;}}if(data110.path !== undefined){const err102 = {instancePath:instancePath+\"/blocks/path\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err102];}else {vErrors.push(err102);}errors++;}if(data110.branch !== undefined){const err103 = {instancePath:instancePath+\"/blocks/branch\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err103];}else {vErrors.push(err103);}errors++;}if(data110.scale !== undefined){const err104 = {instancePath:instancePath+\"/blocks/scale\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err104];}else {vErrors.push(err104);}errors++;}if(data110.period !== undefined){const err105 = {instancePath:instancePath+\"/blocks/period\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err105];}else {vErrors.push(err105);}errors++;}if(data110.row !== undefined){const err106 = {instancePath:instancePath+\"/blocks/row\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err106];}else {vErrors.push(err106);}errors++;}if(data110.point !== undefined){const err107 = {instancePath:instancePath+\"/blocks/point\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err107];}else {vErrors.push(err107);}errors++;}if(data110.zoom !== undefined){const err108 = {instancePath:instancePath+\"/blocks/zoom\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err108];}else {vErrors.push(err108);}errors++;}if(data110.item !== undefined){const err109 = {instancePath:instancePath+\"/blocks/item\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err109];}else {vErrors.push(err109);}errors++;}if(data110.role !== undefined){const err110 = {instancePath:instancePath+\"/blocks/role\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err110];}else {vErrors.push(err110);}errors++;}if(data110.part !== undefined){const err111 = {instancePath:instancePath+\"/blocks/part\",schemaPath:\"#/definitions/absent/not\",keyword:\"not\",params:{},message:\"must NOT be valid\"};if(vErrors === null){vErrors = [err111];}else {vErrors.push(err111);}errors++;}}}if(data.steps !== undefined){if(!(validate13(data.steps, {instancePath:instancePath+\"/steps\",parentData:data,parentDataProperty:\"steps\",rootData}))){vErrors = vErrors === null ? validate13.errors : vErrors.concat(validate13.errors);errors = vErrors.length;}}}var _valid7 = _errs284 === errors;valid100 = _valid7;ifClause6 = \"else\";}if(!valid100){const err112 = {instancePath,schemaPath:\"#/else/else/else/else/else/else/if\",keyword:\"if\",params:{failingKeyword: ifClause6},message:\"must match \\\"\"+ifClause6+\"\\\" schema\"};if(vErrors === null){vErrors = [err112];}else {vErrors.push(err112);}errors++;}var _valid6 = _errs242 === errors;valid79 = _valid6;ifClause5 = \"else\";}if(!valid79){const err113 = {instancePath,schemaPath:\"#/else/else/else/else/else/if\",keyword:\"if\",params:{failingKeyword: ifClause5},message:\"must match \\\"\"+ifClause5+\"\\\" schema\"};if(vErrors === null){vErrors = [err113];}else {vErrors.push(err113);}errors++;}var _valid5 = _errs194 === errors;valid64 = _valid5;ifClause4 = \"else\";}if(!valid64){const err114 = {instancePath,schemaPath:\"#/else/else/else/else/if\",keyword:\"if\",params:{failingKeyword: ifClause4},message:\"must match \\\"\"+ifClause4+\"\\\" schema\"};if(vErrors === null){vErrors = [err114];}else {vErrors.push(err114);}errors++;}var _valid4 = _errs153 === errors;valid54 = _valid4;ifClause3 = \"else\";}if(!valid54){const err115 = {instancePath,schemaPath:\"#/else/else/else/if\",keyword:\"if\",params:{failingKeyword: ifClause3},message:\"must match \\\"\"+ifClause3+\"\\\" schema\"};if(vErrors === null){vErrors = [err115];}else {vErrors.push(err115);}errors++;}var _valid3 = _errs128 === errors;valid40 = _valid3;ifClause2 = \"else\";}if(!valid40){const err116 = {instancePath,schemaPath:\"#/else/else/if\",keyword:\"if\",params:{failingKeyword: ifClause2},message:\"must match \\\"\"+ifClause2+\"\\\" schema\"};if(vErrors === null){vErrors = [err116];}else {vErrors.push(err116);}errors++;}var _valid2 = _errs90 === errors;valid23 = _valid2;ifClause1 = \"else\";}if(!valid23){const err117 = {instancePath,schemaPath:\"#/else/if\",keyword:\"if\",params:{failingKeyword: ifClause1},message:\"must match \\\"\"+ifClause1+\"\\\" schema\"};if(vErrors === null){vErrors = [err117];}else {vErrors.push(err117);}errors++;}var _valid1 = _errs50 === errors;valid9 = _valid1;ifClause0 = \"else\";}if(!valid9){const err118 = {instancePath,schemaPath:\"#/if\",keyword:\"if\",params:{failingKeyword: ifClause0},message:\"must match \\\"\"+ifClause0+\"\\\" schema\"};if(vErrors === null){vErrors = [err118];}else {vErrors.push(err118);}errors++;}if(data && typeof data == \"object\" && !Array.isArray(data)){if(data.version === undefined){const err119 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"version\"},message:\"must have required property '\"+\"version\"+\"'\"};if(vErrors === null){vErrors = [err119];}else {vErrors.push(err119);}errors++;}if(data.kind === undefined){const err120 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"kind\"},message:\"must have required property '\"+\"kind\"+\"'\"};if(vErrors === null){vErrors = [err120];}else {vErrors.push(err120);}errors++;}if(data.title === undefined){const err121 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"title\"},message:\"must have required property '\"+\"title\"+\"'\"};if(vErrors === null){vErrors = [err121];}else {vErrors.push(err121);}errors++;}if(data.blocks === undefined){const err122 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"blocks\"},message:\"must have required property '\"+\"blocks\"+\"'\"};if(vErrors === null){vErrors = [err122];}else {vErrors.push(err122);}errors++;}if(data.steps === undefined){const err123 = {instancePath,schemaPath:\"#/required\",keyword:\"required\",params:{missingProperty: \"steps\"},message:\"must have required property '\"+\"steps\"+\"'\"};if(vErrors === null){vErrors = [err123];}else {vErrors.push(err123);}errors++;}for(const key0 in data){if(!((((((key0 === \"version\") || (key0 === \"kind\")) || (key0 === \"title\")) || (key0 === \"view\")) || (key0 === \"blocks\")) || (key0 === \"steps\"))){const err124 = {instancePath,schemaPath:\"#/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key0},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err124];}else {vErrors.push(err124);}errors++;}}if(data.version !== undefined){let data124 = data.version;if(!(((typeof data124 == \"number\") && (!(data124 % 1) && !isNaN(data124))) && (isFinite(data124)))){const err125 = {instancePath:instancePath+\"/version\",schemaPath:\"#/properties/version/type\",keyword:\"type\",params:{type: \"integer\"},message:\"must be integer\"};if(vErrors === null){vErrors = [err125];}else {vErrors.push(err125);}errors++;}if((typeof data124 == \"number\") && (isFinite(data124))){if(data124 < 1 || isNaN(data124)){const err126 = {instancePath:instancePath+\"/version\",schemaPath:\"#/properties/version/minimum\",keyword:\"minimum\",params:{comparison: \">=\", limit: 1},message:\"must be >= 1\"};if(vErrors === null){vErrors = [err126];}else {vErrors.push(err126);}errors++;}}}if(data.kind !== undefined){let data125 = data.kind;if(!((((((((data125 === \"sequence\") || (data125 === \"architecture\")) || (data125 === \"state\")) || (data125 === \"git\")) || (data125 === \"time\")) || (data125 === \"tree\")) || (data125 === \"lineup\")) || (data125 === \"try\"))){const err127 = {instancePath:instancePath+\"/kind\",schemaPath:\"#/properties/kind/enum\",keyword:\"enum\",params:{allowedValues: schema11.properties.kind.enum},message:\"must be equal to one of the allowed values\"};if(vErrors === null){vErrors = [err127];}else {vErrors.push(err127);}errors++;}}if(data.title !== undefined){let data126 = data.title;if(typeof data126 === \"string\"){if(func2(data126) < 1){const err128 = {instancePath:instancePath+\"/title\",schemaPath:\"#/definitions/text/minLength\",keyword:\"minLength\",params:{limit: 1},message:\"must NOT have fewer than 1 characters\"};if(vErrors === null){vErrors = [err128];}else {vErrors.push(err128);}errors++;}}else {const err129 = {instancePath:instancePath+\"/title\",schemaPath:\"#/definitions/text/type\",keyword:\"type\",params:{type: \"string\"},message:\"must be string\"};if(vErrors === null){vErrors = [err129];}else {vErrors.push(err129);}errors++;}}if(data.view !== undefined){let data127 = data.view;if(!((data127 === \"fixed\") || (data127 === \"follow\"))){const err130 = {instancePath:instancePath+\"/view\",schemaPath:\"#/properties/view/enum\",keyword:\"enum\",params:{allowedValues: schema11.properties.view.enum},message:\"must be equal to one of the allowed values\"};if(vErrors === null){vErrors = [err130];}else {vErrors.push(err130);}errors++;}}if(data.blocks !== undefined){let data128 = data.blocks;if(data128 && typeof data128 == \"object\" && !Array.isArray(data128)){for(const key1 in data128){if(!(func7.call(schema11.properties.blocks.properties, key1))){const err131 = {instancePath:instancePath+\"/blocks\",schemaPath:\"#/properties/blocks/additionalProperties\",keyword:\"additionalProperties\",params:{additionalProperty: key1},message:\"must NOT have additional properties\"};if(vErrors === null){vErrors = [err131];}else {vErrors.push(err131);}errors++;}}if(data128.branch !== undefined){let data129 = data128.branch;if(Array.isArray(data129)){if(data129.length < 1){const err132 = {instancePath:instancePath+\"/blocks/branch\",schemaPath:\"#/properties/blocks/properties/branch/minItems\",keyword:\"minItems\",params:{limit: 1},message:\"must NOT have fewer than 1 items\"};if(vErrors === null){vErrors = [err132];}else {vErrors.push(err132);}errors++;}const len5 = data129.length;for(let i5=0; i5<len5; i5++){if(!(validate38(data129[i5], {instancePath:instancePath+\"/blocks/branch/\" + i5,parentData:data129,parentDataProperty:i5,rootData}))){vErrors = vErrors === null ? validate38.errors : vErrors.concat(validate38.errors);errors = vErrors.length;}}}else {const err133 = {instancePath:instancePath+\"/blocks/branch\",schemaPath:\"#/properties/blocks/properties/branch/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err133];}else {vErrors.push(err133);}errors++;}}if(data128.group !== undefined){let data131 = data128.group;if(Array.isArray(data131)){const len6 = data131.length;for(let i6=0; i6<len6; i6++){if(!(validate40(data131[i6], {instancePath:instancePath+\"/blocks/group/\" + i6,parentData:data131,parentDataProperty:i6,rootData}))){vErrors = vErrors === null ? validate40.errors : vErrors.concat(validate40.errors);errors = vErrors.length;}}}else {const err134 = {instancePath:instancePath+\"/blocks/group\",schemaPath:\"#/properties/blocks/properties/group/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err134];}else {vErrors.push(err134);}errors++;}}if(data128.box !== undefined){let data133 = data128.box;if(Array.isArray(data133)){const len7 = data133.length;for(let i7=0; i7<len7; i7++){if(!(validate42(data133[i7], {instancePath:instancePath+\"/blocks/box/\" + i7,parentData:data133,parentDataProperty:i7,rootData}))){vErrors = vErrors === null ? validate42.errors : vErrors.concat(validate42.errors);errors = vErrors.length;}}}else {const err135 = {instancePath:instancePath+\"/blocks/box\",schemaPath:\"#/properties/blocks/properties/box/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err135];}else {vErrors.push(err135);}errors++;}}if(data128.strip !== undefined){if(!(validate44(data128.strip, {instancePath:instancePath+\"/blocks/strip\",parentData:data128,parentDataProperty:\"strip\",rootData}))){vErrors = vErrors === null ? validate44.errors : vErrors.concat(validate44.errors);errors = vErrors.length;}}if(data128.scale !== undefined){if(!(validate48(data128.scale, {instancePath:instancePath+\"/blocks/scale\",parentData:data128,parentDataProperty:\"scale\",rootData}))){vErrors = vErrors === null ? validate48.errors : vErrors.concat(validate48.errors);errors = vErrors.length;}}if(data128.row !== undefined){let data137 = data128.row;if(Array.isArray(data137)){if(data137.length < 1){const err136 = {instancePath:instancePath+\"/blocks/row\",schemaPath:\"#/properties/blocks/properties/row/minItems\",keyword:\"minItems\",params:{limit: 1},message:\"must NOT have fewer than 1 items\"};if(vErrors === null){vErrors = [err136];}else {vErrors.push(err136);}errors++;}const len8 = data137.length;for(let i8=0; i8<len8; i8++){if(!(validate50(data137[i8], {instancePath:instancePath+\"/blocks/row/\" + i8,parentData:data137,parentDataProperty:i8,rootData}))){vErrors = vErrors === null ? validate50.errors : vErrors.concat(validate50.errors);errors = vErrors.length;}}}else {const err137 = {instancePath:instancePath+\"/blocks/row\",schemaPath:\"#/properties/blocks/properties/row/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err137];}else {vErrors.push(err137);}errors++;}}if(data128.point !== undefined){let data139 = data128.point;if(Array.isArray(data139)){const len9 = data139.length;for(let i9=0; i9<len9; i9++){if(!(validate52(data139[i9], {instancePath:instancePath+\"/blocks/point/\" + i9,parentData:data139,parentDataProperty:i9,rootData}))){vErrors = vErrors === null ? validate52.errors : vErrors.concat(validate52.errors);errors = vErrors.length;}}}else {const err138 = {instancePath:instancePath+\"/blocks/point\",schemaPath:\"#/properties/blocks/properties/point/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err138];}else {vErrors.push(err138);}errors++;}}if(data128.zoom !== undefined){if(!(validate54(data128.zoom, {instancePath:instancePath+\"/blocks/zoom\",parentData:data128,parentDataProperty:\"zoom\",rootData}))){vErrors = vErrors === null ? validate54.errors : vErrors.concat(validate54.errors);errors = vErrors.length;}}if(data128.item !== undefined){let data142 = data128.item;if(Array.isArray(data142)){if(data142.length < 1){const err139 = {instancePath:instancePath+\"/blocks/item\",schemaPath:\"#/properties/blocks/properties/item/minItems\",keyword:\"minItems\",params:{limit: 1},message:\"must NOT have fewer than 1 items\"};if(vErrors === null){vErrors = [err139];}else {vErrors.push(err139);}errors++;}}else {const err140 = {instancePath:instancePath+\"/blocks/item\",schemaPath:\"#/properties/blocks/properties/item/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err140];}else {vErrors.push(err140);}errors++;}}if(data128.role !== undefined){let data143 = data128.role;if(Array.isArray(data143)){if(data143.length < 1){const err141 = {instancePath:instancePath+\"/blocks/role\",schemaPath:\"#/properties/blocks/properties/role/minItems\",keyword:\"minItems\",params:{limit: 1},message:\"must NOT have fewer than 1 items\"};if(vErrors === null){vErrors = [err141];}else {vErrors.push(err141);}errors++;}const len10 = data143.length;for(let i10=0; i10<len10; i10++){if(!(validate56(data143[i10], {instancePath:instancePath+\"/blocks/role/\" + i10,parentData:data143,parentDataProperty:i10,rootData}))){vErrors = vErrors === null ? validate56.errors : vErrors.concat(validate56.errors);errors = vErrors.length;}}}else {const err142 = {instancePath:instancePath+\"/blocks/role\",schemaPath:\"#/properties/blocks/properties/role/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err142];}else {vErrors.push(err142);}errors++;}}if(data128.path !== undefined){let data145 = data128.path;if(Array.isArray(data145)){if(data145.length < 1){const err143 = {instancePath:instancePath+\"/blocks/path\",schemaPath:\"#/properties/blocks/properties/path/minItems\",keyword:\"minItems\",params:{limit: 1},message:\"must NOT have fewer than 1 items\"};if(vErrors === null){vErrors = [err143];}else {vErrors.push(err143);}errors++;}const len11 = data145.length;for(let i11=0; i11<len11; i11++){if(!(validate58(data145[i11], {instancePath:instancePath+\"/blocks/path/\" + i11,parentData:data145,parentDataProperty:i11,rootData}))){vErrors = vErrors === null ? validate58.errors : vErrors.concat(validate58.errors);errors = vErrors.length;}}}else {const err144 = {instancePath:instancePath+\"/blocks/path\",schemaPath:\"#/properties/blocks/properties/path/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err144];}else {vErrors.push(err144);}errors++;}}if(data128.period !== undefined){if(!(validate60(data128.period, {instancePath:instancePath+\"/blocks/period\",parentData:data128,parentDataProperty:\"period\",rootData}))){vErrors = vErrors === null ? validate60.errors : vErrors.concat(validate60.errors);errors = vErrors.length;}}if(data128.part !== undefined){let data148 = data128.part;if(Array.isArray(data148)){if(data148.length < 1){const err145 = {instancePath:instancePath+\"/blocks/part\",schemaPath:\"#/properties/blocks/properties/part/minItems\",keyword:\"minItems\",params:{limit: 1},message:\"must NOT have fewer than 1 items\"};if(vErrors === null){vErrors = [err145];}else {vErrors.push(err145);}errors++;}const len12 = data148.length;for(let i12=0; i12<len12; i12++){if(!(validate62(data148[i12], {instancePath:instancePath+\"/blocks/part/\" + i12,parentData:data148,parentDataProperty:i12,rootData}))){vErrors = vErrors === null ? validate62.errors : vErrors.concat(validate62.errors);errors = vErrors.length;}}}else {const err146 = {instancePath:instancePath+\"/blocks/part\",schemaPath:\"#/properties/blocks/properties/part/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err146];}else {vErrors.push(err146);}errors++;}}}else {const err147 = {instancePath:instancePath+\"/blocks\",schemaPath:\"#/properties/blocks/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err147];}else {vErrors.push(err147);}errors++;}}if(data.steps !== undefined){let data150 = data.steps;if(Array.isArray(data150)){if(data150.length < 1){const err148 = {instancePath:instancePath+\"/steps\",schemaPath:\"#/properties/steps/minItems\",keyword:\"minItems\",params:{limit: 1},message:\"must NOT have fewer than 1 items\"};if(vErrors === null){vErrors = [err148];}else {vErrors.push(err148);}errors++;}const len13 = data150.length;for(let i13=0; i13<len13; i13++){if(!(validate64(data150[i13], {instancePath:instancePath+\"/steps/\" + i13,parentData:data150,parentDataProperty:i13,rootData}))){vErrors = vErrors === null ? validate64.errors : vErrors.concat(validate64.errors);errors = vErrors.length;}}}else {const err149 = {instancePath:instancePath+\"/steps\",schemaPath:\"#/properties/steps/type\",keyword:\"type\",params:{type: \"array\"},message:\"must be array\"};if(vErrors === null){vErrors = [err149];}else {vErrors.push(err149);}errors++;}}}else {const err150 = {instancePath,schemaPath:\"#/type\",keyword:\"type\",params:{type: \"object\"},message:\"must be object\"};if(vErrors === null){vErrors = [err150];}else {vErrors.push(err150);}errors++;}validate10.errors = vErrors;return errors === 0;}\n","/**\n * 図の原本の形と、原本を JSON Schema で検査する命令。\n *\n * 形の正は `schemas/diagram.schema.json` の 1 本で、下の型はその写し。ブロックの置き場へ移した欄の型はブロックが持ち、ここから出し直す (#3345)。\n * `schemas/diagram.schema.json` は、骨組み (`schemas/base.schema.json`) とブロックの形の欠片を build の時に束ねて書き出した物 (#3346)。\n * 版1の原本は検査の前に版2の形へ移して検査し、誤りの場所は版1の欄の場所へ戻して返す。検査の関数を 1 つにして、見本帳が読む量を増やさない。\n * 誤りは JSON Pointer で場所を示す。欄が足りない時と知らない欄がある時は、その欄の場所まで示す。\n * 誤りの文は呼ぶ側が渡した言葉 (渡さなければ英語) で出す。文の表は `field-messages.ts` が持つ (#2999)。\n *\n * 検査の関数は schema から前もって書き出した物 (`schemas/validate-diagram.js`) を使う。\n * ajv に schema をその場で組み立てさせると `new Function` を使い、`eval` を許さない頁の CSP で止まる。\n * 書き出しは `scripts/build-validator.mjs` が ajv の設定 `{ allErrors: true, discriminator: true, strictTypes: false }` で行う。\n */\nimport type { ErrorObject } from \"ajv\";\nimport type { GitBranch } from \"./blocks/branch/block\";\nimport type { Carry } from \"./blocks/carry/block\";\nimport { type Color, COLORS } from \"./blocks/color/block\";\nimport type { GitCommit } from \"./blocks/commit/block\";\nimport type { LabelSide } from \"./blocks/edge-label/block\";\nimport { ICON_NAMES } from \"./blocks/icon/block\";\nimport type { LineupItem } from \"./blocks/item/block\";\nimport type { TreeLeaf } from \"./blocks/leaf/block\";\nimport type { LineupOrder } from \"./blocks/line/block\";\nimport type { TreeNode } from \"./blocks/node/block\";\nimport type { LineupAct, LineupRole } from \"./blocks/role/block\";\nimport type { TimePoint } from \"./blocks/point/block\";\nimport type { TimeMarkEvent, TimeRow } from \"./blocks/row/block\";\nimport type { TimePeriod, TimeScale, TimeSpanEvent } from \"./blocks/scale/block\";\nimport type { StatePath } from \"./blocks/side-path/block\";\nimport type { StepSource } from \"./blocks/source/block\";\nimport type { LineupStamp } from \"./blocks/stamp/block\";\nimport { type Allowed, FIELD_MESSAGES, type FieldMessages, type Forbidden } from \"./field-messages\";\nimport { FORMAT_VERSION, isVersion1, toVersion1Pointer, upgrade, version1SectionOf } from \"./model\";\nimport { nearest } from \"./nearest\";\nimport validate from \"./schemas/validate-diagram.js\";\nimport { DEFAULT_LANG, type NotationLang, STATE_ENDS } from \"./words\";\n\n/** 色の役の型と一覧は色の役のブロック、アイコン名の一覧は絵のブロックが持つ (#3311、#3345) */\nexport { type Color, COLORS, ICON_NAMES };\n\nexport interface Region {\n id: string;\n name: string;\n note?: string;\n color?: Color;\n icon?: string;\n}\n\nexport interface Box {\n id: string;\n name: string;\n sub?: string;\n color?: Color;\n icon?: string;\n region?: string;\n /** 飛び先。描いた図ではこの箱がここへの link になる。`/` で始まる path か、http:// か https:// で始まる URL (#3199) */\n link?: string;\n /** 列の図の箱の並べ方 (#3351)。`none` は順番の無い置き場で、書かない箱は上から実行する札 */\n order?: \"none\";\n}\n\n/** 見せ方。`fixed` は全体を止めて中だけ動かし、`follow` は寄って動かし全体図で今どこかを示す。 */\nexport type ViewMode = \"fixed\" | \"follow\";\n\nexport type DiagramEvent =\n | { type: \"edge\"; from: string; to: string; label?: string; carry: Carry; labelSide?: LabelSide; at?: number; into?: number }\n | { type: \"action\"; box: string; label: string }\n | { type: \"swap\"; box: string; text: string; color?: Color }\n | { type: \"strip\"; field: string; value?: string; tag?: string }\n | GitCommit\n | { type: \"branch\"; branch: string; from: string }\n | { type: \"now\"; to: number }\n | TimeMarkEvent\n | TimeSpanEvent\n | TreeLeaf\n | TreeNode\n | LineupOrder\n | { type: \"seal\"; box: string }\n | { type: \"open\"; box: string }\n | { type: \"pick\"; box: string }\n | LineupStamp\n | LineupAct\n | TryLine\n | TryAsk\n | TryPress\n | TryEdit;\n\n/**\n * 時間軸の図 (#3165) の印の色を変える出来事と範囲の括弧の出来事と、目盛りと区切りと印の列と節目の型は、\n * 印の列と目盛りと針と節目のブロックが持つ (#3348)\n */\nexport type { TimeMarkEvent, TimePeriod, TimePoint, TimeRow, TimeScale, TimeSpanEvent };\n\n/** 時間軸の図の種類の欄 */\nexport interface TimeSpec {\n scale: TimeScale;\n period?: TimePeriod;\n rows: TimeRow[];\n points?: TimePoint[];\n /** 拡大の帯に列を作る目盛りの範囲 */\n zoom?: { from: number; to: number };\n}\n\n/** 中身の帯の物差しの欄。`line` の割合 (`2/3` か `97%`) の所に線を引く */\nexport interface StripMeter {\n field: string;\n line: string;\n}\n\n/** 枝分かれの図 (#3164) の commit を積む出来事の型は commit のブロックが持つ (#3347) */\nexport type { GitCommit };\n\n/** 木の図 (#3233) の葉を出す出来事と親を組む出来事の型は、葉と組んだ親のブロックが持つ (#3348) */\nexport type { TreeLeaf, TreeNode };\n\n/**\n * 列の図 (#3239) の、列の並びを書き換える出来事と札を押す出来事と役が動く出来事と、チップと役の型は、\n * 列の並びと札と役とチップのブロックが持つ (#3348)\n */\nexport type { LineupAct, LineupItem, LineupOrder, LineupRole, LineupStamp };\n\n/** 試す図 (#3337) の、待ち行列 `part` の中身を `items` の並びにするか、機械の列 `part` に `items` を入れた新しいブロックを足す出来事 */\nexport interface TryLine {\n type: \"line\";\n part: string;\n items: string[];\n}\n\n/** 試す図の、入力の帯の欄の値 `values` (欄の順) でチップを作って送る出来事。書き手の例として読み手の送る操作を書く */\nexport interface TryAsk {\n type: \"ask\";\n values: string[];\n}\n\n/** 試す図の、釦 `press` を押す出来事。釦の待ち行列の上からチップを取り出し、機械の列の新しいブロックへ移す */\nexport interface TryPress {\n type: \"press\";\n press: string;\n}\n\n/** 試す図の、チップ `item` の欄の値を `values` (鍵は欄) に書き換える出来事。読み手の書き換えと同じ */\nexport interface TryEdit {\n type: \"item\";\n item: string;\n values: Record<string, string>;\n}\n\n/**\n * 試す図の部品。書いた順に図の上から積む。網 (`route`) は `-` でつないだ節の並び (`paths`) を持ち、`from` から `to` へチップを運ぶ。\n * 待ち行列 (`queue`) は `order` の欄の値の高い順にチップを並べ、機械の列 (`chain`) は `edit` の欄を読み手に書き換えさせる。\n * 入力の帯 (`ask`) は図に 1 つまでで、`id` は常に `ask`。最初の欄の値がチップの名前になる。\n * 釦 (`press`) は `from` の待ち行列の上から `take` 件を `into` の機械の列の新しいブロックへ移し、`at` の部品の所に置く\n */\nexport type TryPart =\n | { type: \"route\"; id: string; paths: string[][]; from: string; to: string }\n | { type: \"queue\"; id: string; order?: string }\n | { type: \"chain\"; id: string; edit?: string }\n | { type: \"ask\"; id: \"ask\"; fields: string[]; into: string; via?: string }\n | { type: \"press\"; id: string; from: string; into: string; take: number; at?: string };\n\n/** 試す図のチップ。`values` の鍵は入力の帯の欄 (最初の欄を除く) で、名札がチップの名前 (最初の欄の値) になる */\nexport interface TryItem {\n id: string;\n values: Record<string, string>;\n}\n\n/** 枝分かれの図の枝の型は枝のブロック、状態遷移図の移れる道の型は脇道のブロックが持つ (#3347) */\nexport type { GitBranch, StatePath };\n\n/** 段の出典の型は出典のブロックが持つ (#3345) */\nexport type { StepSource };\n/** 線の名前を置く側の型は線の名前のブロックが持つ (#3345) */\nexport type { LabelSide };\n/** 線の上を走る物の型は運ぶ物のブロックが持つ (#3345) */\nexport type { Carry };\n\nexport interface Step {\n title: string;\n body: string;\n code?: string;\n /** 書いた順の出典。書かない段は欄を持たない */\n sources?: StepSource[];\n events: DiagramEvent[];\n}\n\n/** 図の種類。最初の行の頭の語で、原本の `kind` の欄 */\nexport type DiagramKind = \"sequence\" | \"architecture\" | \"state\" | \"git\" | \"time\" | \"tree\" | \"lineup\" | \"try\";\n\n/** 中身の帯。題と欄の名前の並び。物差しの欄は時間軸の図だけが書ける */\nexport interface Strip {\n title: string;\n fields: string[];\n meters?: StripMeter[];\n}\n\n/**\n * 原本の図の宣言 (#3346)。ブロックの名前ごとの欄に、そのブロックの宣言を持つ。空の並びは書かない。\n * 区画 (`group`)、箱 (`box`)、中身の帯 (`strip`) と、図の種類だけの宣言 (状態遷移図の移れる道 `path`、枝分かれの図の枝 `branch`、\n * 時間軸の図の目盛り `scale` と区切り `period` と印の列 `row` と節目 `point` と拡大の範囲 `zoom`、列の図と試す図のチップ `item`、試す図の部品 `part`)\n */\nexport interface DiagramBlocks {\n group?: Region[];\n box?: Box[];\n strip?: Strip;\n path?: StatePath[];\n branch?: GitBranch[];\n scale?: TimeScale;\n period?: TimePeriod;\n row?: TimeRow[];\n point?: TimePoint[];\n zoom?: { from: number; to: number };\n item?: LineupItem[] | TryItem[];\n role?: LineupRole[];\n part?: TryPart[];\n}\n\n/**\n * 図の原本 (版2、#3346)。図の宣言を `blocks` のブロックの名前ごとの欄に持ち、段 (`steps`) に段ごとに起きることを持つ。\n * 版1の原本は読む時に版2へ移す (`readDiagram`)\n */\nexport interface Diagram {\n version: number;\n kind: DiagramKind;\n title: string;\n view?: ViewMode;\n blocks: DiagramBlocks;\n steps: Step[];\n}\n\n/**\n * 描く処理が読む図の形 (#3346)。版1の原本と同じ欄と並びを持ち、版の欄も版1の `1` を持つ。\n * 図の id はこの形の字から作るので、版2の原本を足す前と同じ図からは同じ id の SVG を描く。\n * 原本からは `model.ts` の `toModel` が組み直す\n */\nexport interface DiagramModel {\n version: 1;\n kind: DiagramKind;\n title: string;\n view?: ViewMode;\n regions?: Region[];\n boxes: Box[];\n strip?: Strip;\n steps: Step[];\n sequence?: { lifelines: string[] };\n state?: { paths: StatePath[] };\n git?: { branches: GitBranch[] };\n time?: TimeSpec;\n lineup?: { items: LineupItem[]; roles?: LineupRole[] };\n /** 試す図 (#3337) の部品とチップ。版1の原本に無かった種類なので、版2の原本の `part` と `item` をそのまま持つ */\n try?: { parts: TryPart[]; items: TryItem[] };\n}\n\nexport interface FieldError {\n /** 誤った欄の場所 (JSON Pointer) */\n pointer: string;\n message: string;\n}\n\nexport type Checked = { ok: true } | { ok: false; errors: FieldError[] };\n\nexport interface CheckOptions {\n /** 誤りの文の言葉。渡さなければ英語 (#3338) */\n lang?: NotationLang;\n}\n\n/** 段の中で起きることの種類。schema の event の `discriminator` が見る `type` の値 */\nconst EVENT_TYPES = [\"edge\", \"action\", \"swap\", \"strip\", \"commit\", \"branch\", \"now\", \"mark\", \"span\", \"leaf\", \"node\", \"line\", \"seal\", \"open\", \"pick\", \"stamp\", \"ask\", \"press\", \"item\"] as const satisfies readonly DiagramEvent[\"type\"][];\n/** 試す図の部品の種類。schema の part の `discriminator` が見る `type` の値 (#3337) */\nconst PART_TYPES = [\"route\", \"queue\", \"chain\", \"ask\", \"press\"] as const satisfies readonly TryPart[\"type\"][];\n\n/**\n * その種類の図に書けない根の欄を書いた時の決まりの場所 (#3164)。根の欄に `not: {}` を置く決まり (`absent`) を指し、\n * 誤りの場所の最後の欄が書いた欄になる。種類の欄は、その欄と同じ名前の図の種類だけが書ける\n */\nconst ABSENT = \"#/definitions/absent/not\";\n/**\n * 種類の欄でない欄を書ける図の種類。区画は枝分かれの図と時間軸の図に書けない。\n * 線の列 (`at` と `into`)、節目の丸の色 (`color`)、物差し (`meters`) は時間軸の図だけが書ける (#3165)\n */\nconst ABSENT_KINDS: Record<string, string> = {\n regions: \"sequence / architecture / state\",\n group: \"sequence / architecture / state\",\n path: \"state\",\n branch: \"git\",\n scale: \"time\",\n period: \"time\",\n row: \"time\",\n point: \"time\",\n zoom: \"time\",\n item: \"lineup / try\",\n role: \"lineup\",\n part: \"try\",\n values: \"try\",\n box: \"sequence / architecture / state / git / time / tree / lineup\",\n order: \"lineup\",\n at: \"time\",\n into: \"time\",\n color: \"time\",\n meters: \"time\",\n region: \"sequence / architecture / state\",\n icon: \"sequence / architecture / state / git / time / tree\",\n link: \"sequence / architecture / state / git / time / tree\",\n};\n/** 運ぶ物の書けない組み合わせ (`not: { required: [欄] }`)。誤りの場所の最後の欄で引く */\nconst NOT_ALLOWED: Record<string, Allowed> = {\n carry: { field: \"text\", kind: \"tag\" },\n};\n\n/** 状態遷移図の箱の名札に予約の名前を書いた時の決まりの場所 */\nconst RESERVED_ID = /\\/box\\/items\\/properties\\/id\\/not$/u;\n/** 枝分かれの図でない図に、枝分かれの図だけの出来事を書いた時の決まりの場所 (#3164) */\nconst GIT_EVENT = /\\/events\\/items\\/properties\\/type\\/not$/u;\n/** 枝分かれの図だけが書ける出来事 */\nconst GIT_EVENTS = [\"commit\", \"branch\"] as const satisfies readonly DiagramEvent[\"type\"][];\n/** 時間軸の図でない図に、時間軸の図だけの出来事を書いた時の決まりの場所 (#3165)。出来事に `not` を置く */\nconst TIME_EVENT = /\\/events\\/items\\/not$/u;\n/** 時間軸の図だけが書ける出来事 */\nconst TIME_EVENTS = [\"now\", \"mark\", \"span\"] as const satisfies readonly DiagramEvent[\"type\"][];\n/** 木の図でない図に、木の図だけの出来事を書いた時の決まりの場所 (#3233)。出来事の `allOf` の中に `not` を置く */\nconst TREE_EVENT = /\\/events\\/items\\/allOf\\/0\\/not$/u;\n/** 木の図だけが書ける出来事 */\nconst TREE_EVENTS = [\"leaf\", \"node\"] as const satisfies readonly DiagramEvent[\"type\"][];\n/** 列の図でない図に、列の図だけの出来事を書いた時の決まりの場所 (#3239) */\nconst LINEUP_EVENT = \"#/definitions/notLineupEvent/not\";\n/** 列の図だけが書ける出来事 */\nconst LINEUP_EVENTS = [\"line\", \"seal\", \"open\", \"pick\", \"stamp\", \"role\"] as const satisfies readonly DiagramEvent[\"type\"][];\n/** 試す図でない図に、試す図だけの出来事を書いた時の決まりの場所 (#3337) */\nconst TRY_EVENT = \"#/definitions/notTryEvent/not\";\n/** 試す図だけが書ける出来事 */\nconst TRY_EVENTS = [\"ask\", \"press\", \"item\"] as const satisfies readonly DiagramEvent[\"type\"][];\n/** 試す図の部品の種類の決まりの場所 (#3337) */\nconst PART_TAG = \"#/definitions/part/discriminator\";\n/** 列の図に、線と処理の出来事を書いた時の決まりの場所 (#3239) */\nconst WIRED_EVENT = \"#/definitions/notWiredEvent/not\";\n/** 列の図が書けない、箱と線の図の出来事 */\nconst WIRED_EVENTS = [\"edge\", \"action\"] as const satisfies readonly DiagramEvent[\"type\"][];\n/** 時間軸の図の目盛りの長さの決まり (`^[0-9]+(\\.[0-9]+)?(<単位>|<単位>)$`)。書ける単位を読む */\nconst DURATION = /^\\^\\[0-9\\]\\+\\(\\\\\\.\\[0-9\\]\\+\\)\\?\\(([a-z|]+)\\)\\$$/u;\n/** 割合の決まり。百分率の `%` を持つ */\nconst RATIO = /%\\)\\$$/u;\n\nconst escape = (key: string): string => key.replaceAll(\"~\", \"~0\").replaceAll(\"/\", \"~1\");\n\n/** JSON Pointer `pointer` が指す `input` の中の値。辿れない時は `undefined` */\nfunction valueAt(input: unknown, pointer: string): unknown {\n let value = input;\n for (const raw of pointer.split(\"/\").slice(1)) {\n if (typeof value !== \"object\" || value === null) return undefined;\n value = (value as Record<string, unknown>)[raw.replaceAll(\"~1\", \"/\").replaceAll(\"~0\", \"~\")];\n }\n return value;\n}\n\n/** 箱の飛び先と段の出典の URL の決まりの場所 (#3199) */\nconst URL_RULE = \"#/definitions/url/pattern\";\n\n/** 箱と区画のアイコン名の決まりの場所 (#3311)。近い名前が在れば一覧の代わりにそれを示す (#3315) */\nconst ICON_RULE = \"#/definitions/icon/enum\";\n\n/** commit の hash の決まり (`^[0-9a-f]{<最小>,<最大>}$`)。字の数の幅を読む */\nconst HEX = /^\\^\\[0-9a-f\\]\\{(\\d+),(\\d+)\\}\\$$/u;\n\n/** `^[^…]+$` の形の決まりから書けない字を読む。違う形の決まりでは `undefined` */\nfunction forbiddenOf(pattern: string): Forbidden | undefined {\n const inside = /^\\^\\[\\^(.+)\\]\\+\\$$/u.exec(pattern)?.[1];\n if (inside === undefined) return undefined;\n const chars: string[] = inside.match(/\\\\.|[^\\\\]/gu) ?? [];\n return { space: chars.includes(\"\\\\s\"), chars: chars.filter((char) => char !== \"\\\\s\").map((char) => char.replace(/^\\\\/u, \"\")) };\n}\n\n/** `anyOf` の中の決まりが出した誤り。`anyOf` の誤り 1 つにまとめて出す */\nconst branchesOf = (anyOf: ErrorObject, errors: readonly ErrorObject[]): ErrorObject[] =>\n errors.filter(\n (error) =>\n error !== anyOf &&\n error.schemaPath.startsWith(`${anyOf.schemaPath}/`) &&\n (error.instancePath === anyOf.instancePath || error.instancePath.startsWith(`${anyOf.instancePath}/`)),\n );\n\nfunction toFieldError(error: ErrorObject, errors: readonly ErrorObject[], m: FieldMessages, input: unknown): FieldError {\n const params = error.params as Record<string, unknown>;\n const at = error.instancePath;\n switch (error.keyword) {\n case \"additionalProperties\": {\n const key = String(params.additionalProperty);\n return { pointer: `${at}/${escape(key)}`, message: m.additionalProperties(key) };\n }\n case \"required\": {\n const key = String(params.missingProperty);\n return { pointer: `${at}/${escape(key)}`, message: m.required(key) };\n }\n case \"not\": {\n if (RESERVED_ID.test(error.schemaPath)) return { pointer: at, message: m.reserved(STATE_ENDS) };\n if (GIT_EVENT.test(error.schemaPath)) return { pointer: at, message: m.kindOnly(GIT_EVENTS, \"git\") };\n if (TIME_EVENT.test(error.schemaPath)) return { pointer: `${at}/type`, message: m.kindOnly(TIME_EVENTS, \"time\") };\n if (TREE_EVENT.test(error.schemaPath)) return { pointer: `${at}/type`, message: m.kindOnly(TREE_EVENTS, \"tree\") };\n if (error.schemaPath === LINEUP_EVENT) return { pointer: `${at}/type`, message: m.kindOnly(LINEUP_EVENTS, \"lineup\") };\n if (error.schemaPath === TRY_EVENT) return { pointer: `${at}/type`, message: m.kindOnly(TRY_EVENTS, \"try\") };\n if (error.schemaPath === WIRED_EVENT) return { pointer: `${at}/type`, message: m.kindOnly(WIRED_EVENTS, \"sequence / architecture / state / git / time / tree\") };\n const last = at.slice(at.lastIndexOf(\"/\") + 1);\n if (error.schemaPath === ABSENT) return { pointer: at, message: m.not({ field: last, kind: ABSENT_KINDS[last] ?? last }) };\n const allowed = NOT_ALLOWED[last];\n return { pointer: allowed ? `${at}/${allowed.field}` : at, message: m.not(allowed) };\n }\n case \"anyOf\": {\n const branches = branchesOf(error, errors);\n const missing = branches.every((branch) => branch.keyword === \"required\") ? branches.map((branch) => String(branch.params.missingProperty)) : [];\n return { pointer: at, message: m.anyOf(missing) };\n }\n case \"discriminator\": {\n const tag = String(params.tag);\n return { pointer: `${at}/${escape(tag)}`, message: m.discriminator(tag, error.schemaPath === PART_TAG ? PART_TYPES : EVENT_TYPES) };\n }\n case \"enum\": {\n const written = error.schemaPath === ICON_RULE ? valueAt(input, at) : undefined;\n const near = typeof written === \"string\" ? nearest(written, ICON_NAMES) : undefined;\n if (typeof written === \"string\" && near !== undefined) return { pointer: at, message: m.unknownIcon(written, near) };\n return { pointer: at, message: m.enum((params.allowedValues as unknown[]).map(String)) };\n }\n case \"type\":\n return { pointer: at, message: m.type(String(params.type)) };\n case \"minLength\":\n return { pointer: at, message: m.minLength(Number(params.limit)) };\n case \"maxLength\":\n return { pointer: at, message: m.maxLength(Number(params.limit)) };\n case \"pattern\": {\n if (error.schemaPath === URL_RULE) return { pointer: at, message: m.url };\n const pattern = String(params.pattern);\n const hex = HEX.exec(pattern);\n if (hex) return { pointer: at, message: m.hex(Number(hex[1]), Number(hex[2])) };\n const duration = DURATION.exec(pattern);\n if (duration) return { pointer: at, message: m.duration((duration[1] ?? \"\").split(\"|\")) };\n if (RATIO.test(pattern)) return { pointer: at, message: m.ratio };\n return { pointer: at, message: m.pattern(forbiddenOf(pattern)) };\n }\n case \"minItems\":\n return { pointer: at, message: m.minItems(Number(params.limit)) };\n case \"maxItems\":\n return { pointer: at, message: m.maxItems(Number(params.limit)) };\n case \"minimum\":\n return { pointer: at, message: m.minimum(Number(params.limit)) };\n case \"const\":\n return { pointer: at, message: m.const(String(params.allowedValue)) };\n case \"oneOf\":\n return { pointer: at, message: m.oneOf };\n default:\n return { pointer: at, message: error.message ?? error.keyword };\n }\n}\n\nconst unescape = (key: string): string => key.replaceAll(\"~1\", \"/\").replaceAll(\"~0\", \"~\");\n\n/**\n * 版2へ移した版1の原本の誤りを、版1の欄の場所の誤りにする。図の種類が書けない欄は、版1の図の種類の欄 (`/git` など) の場所にする。\n * 欄が足りない時と知らない欄がある時は、欄の名前も版1の名前にする\n */\nfunction toVersion1Error(error: ErrorObject): ErrorObject {\n const section = error.schemaPath === ABSENT ? version1SectionOf(error.instancePath) : undefined;\n if (section !== undefined) return { ...error, instancePath: section };\n const param = error.keyword === \"required\" ? \"missingProperty\" : error.keyword === \"additionalProperties\" ? \"additionalProperty\" : undefined;\n if (param === undefined) return { ...error, instancePath: toVersion1Pointer(error.instancePath) };\n const full = toVersion1Pointer(`${error.instancePath}/${escape(String(error.params[param as keyof typeof error.params]))}`);\n const cut = full.lastIndexOf(\"/\");\n return { ...error, instancePath: full.slice(0, cut), params: { ...error.params, [param]: unescape(full.slice(cut + 1)) } };\n}\n\n/**\n * 原本の JSON を検査する。版が道具より新しいかは見ない (`readDiagram` が見る)。\n * 版1の原本は版2の形へ移して検査し、誤りは版1の欄の場所で返す。同じ場所の同じ文の誤りは 1 つにまとめる\n */\nexport function validateDiagram(input: unknown, options: CheckOptions = {}): Checked {\n const version1 = isVersion1(input);\n if (validate(version1 ? upgrade(input, FORMAT_VERSION) : input)) return { ok: true };\n const all = (validate.errors ?? []).map((error) => (version1 ? toVersion1Error(error) : error));\n const inBranch = new Set(all.filter((error) => error.keyword === \"anyOf\").flatMap((anyOf) => branchesOf(anyOf, all)));\n const m = FIELD_MESSAGES[options.lang ?? DEFAULT_LANG];\n // 条件付きの決まり (if / then) は中で落ちた決まりの誤りを別に出すので、包む側の if の誤りは出さない\n const errors = all.filter((error) => error.keyword !== \"if\" && !inBranch.has(error)).map((error) => toFieldError(error, all, m, input));\n return { ok: false, errors: errors.filter((error, i) => errors.findIndex((other) => other.pointer === error.pointer && other.message === error.message) === i) };\n}\n","/**\n * 原本の形式の版。\n *\n * 道具より新しい版の図は描かずに断る。古い版の図は、版を上げる変換を通して読み、\n * 原本の file を書き換えるのは移行の命令 (`migrateFile`、Node でだけ動く入口 `node.ts`) だけにする。\n * 版2 (#3346) は図の宣言を `blocks` のブロックの名前ごとの欄に持つ。版1の原本は読む時に版2へ移し、移したことを警告で返す。\n * 版の番号と、版1と版2の欄の対応は `model.ts` が持つ。\n */\nimport { FIELD_MESSAGES } from \"./field-messages\";\nimport { FORMAT_VERSION, fromModel, isVersion1, toModel, upgrade } from \"./model\";\nimport { type CheckOptions, type Diagram, type FieldError, validateDiagram } from \"./schema\";\nimport { DEFAULT_LANG, type NotationLang } from \"./words\";\n\n/** この道具が読める原本の版 */\nexport { FORMAT_VERSION };\n\nexport type Read = { ok: true; diagram: Diagram; warnings: string[] } | { ok: false; errors: FieldError[] };\n\nfunction newerThanTool(input: unknown): number | undefined {\n if (typeof input !== \"object\" || input === null) return undefined;\n const version = (input as { version?: unknown }).version;\n return typeof version === \"number\" && version > FORMAT_VERSION ? version : undefined;\n}\n\nconst newerError = (version: number, lang: NotationLang): FieldError => ({\n pointer: \"/version\",\n message: FIELD_MESSAGES[lang].newer(version, FORMAT_VERSION),\n});\n\n/**\n * 原本を読む。道具より新しい版は描かずに断り、形の誤りは検査の誤りとして返す。誤りの文は `options.lang` (渡さなければ英語) で出す。\n * 版1の原本は版2へ移し、空の並びを外して欄を版2の並びに整えた原本と、移したことの警告を返す。版2の原本は渡した物をそのまま返す\n */\nexport function readDiagram(input: unknown, options: CheckOptions = {}): Read {\n const lang = options.lang ?? DEFAULT_LANG;\n const newer = newerThanTool(input);\n if (newer !== undefined) return { ok: false, errors: [newerError(newer, lang)] };\n const checked = validateDiagram(input, options);\n if (!checked.ok) return checked;\n if (!isVersion1(input)) return { ok: true, diagram: input as Diagram, warnings: [] };\n const diagram = fromModel(toModel(upgrade(input, FORMAT_VERSION) as unknown as Diagram), FORMAT_VERSION);\n return { ok: true, diagram, warnings: [FIELD_MESSAGES[lang].upgraded(1, FORMAT_VERSION)] };\n}\n","/**\n * 出典の描き方 (#3199、#3345)。\n *\n * 出典は図の SVG に描かない。頁に置いた図の下の、読み上げの道具が段の順に読む一覧 (`player.ts`) に出す。\n * 段の項目の本文の後ろに、名前を URL への link にした項目を書いた順に並べる。出典を書かない段には何も足さない。\n */\nimport type { StepSource } from \"./block\";\n\n/** 段の項目 `item` に、出典の link の並びを足す */\nexport function drawSources(doc: Document, item: HTMLElement, sources: readonly StepSource[] | undefined): void {\n if (!sources) return;\n const list = doc.createElement(\"ul\");\n for (const source of sources) {\n const link = doc.createElement(\"a\");\n link.href = source.url;\n link.textContent = source.name;\n const entry = doc.createElement(\"li\");\n entry.append(link);\n list.append(entry);\n }\n item.append(list);\n}\n","/**\n * 段の描き方 (#3049、#3345)。\n *\n * 段は図の SVG に描かない。頁に置いた図の下の語りの帯 (`player.ts`) に今の段の題と本文を出し、\n * 読み上げの道具が段の順に読む一覧に、全ての段の題と本文を並べる。段の命令 (`code`) はどちらにも出さない。\n */\nimport type { Step } from \"../../schema\";\n\n/**\n * 全ての段の題と本文の写しを、今の段と同じ升 `text` に重ねる。見た目からは隠して場所だけを取り、\n * 帯の高さが本文の最も長い段で決まるので、段を送っても図の枠が伸び縮みしない (#3049)\n */\nexport function drawRooms(doc: Document, text: HTMLElement, steps: readonly Step[]): void {\n for (const step of steps) {\n const room = doc.createElement(\"div\");\n room.className = \"dg-room\";\n room.dataset.dragon = \"caption-room\";\n const roomTitle = doc.createElement(\"p\");\n roomTitle.className = \"dg-tt\";\n roomTitle.textContent = step.title;\n const roomBody = doc.createElement(\"p\");\n roomBody.className = \"dg-tb\";\n roomBody.textContent = step.body;\n room.append(roomTitle, roomBody);\n text.append(room);\n }\n}\n\n/** 読み上げの段の一覧の 1 項目。段の題を強めて置き、本文を行ごとの段落にする */\nexport function drawStepItem(doc: Document, step: Step): HTMLLIElement {\n const item = doc.createElement(\"li\");\n const head = doc.createElement(\"strong\");\n head.textContent = step.title;\n item.append(head);\n for (const line of step.body.split(\"\\n\")) {\n const p = doc.createElement(\"p\");\n p.textContent = line;\n item.append(p);\n }\n return item;\n}\n","/**\n * 箱の中の処理の描き方 (#3345)。\n *\n * 時系列図の処理は、その段の間だけ生存線の上の札に出す。ほかの図の種類の処理は箱の下の字に出し、\n * 箱の下の字の移り変わり (`blocks/note/draw.ts` の `subChanges`) が処理の字も組む。\n */\nimport type { SceneAction } from \"../../layout/scene\";\nimport { LOOK } from \"../../look/values\";\nimport { partRadius } from \"../../render/corner\";\nimport type { Shown } from \"../../render/ink\";\nimport { type Ctx, esc, r1 } from \"../../render/parts\";\nimport { cs } from \"../color/draw\";\nimport type { Span } from \"../../timeline\";\n\n/** 時系列図の箱の中の処理の札。その段の間だけ生存線の上に出す。`again` を渡すと (止め絵を選んだ図、#3200)、その間に同じ札をもう 1 つ出す。 */\nexport function action(a: SceneAction, at: number, until: number, ctx: Ctx, again?: Span): string {\n const shown: Shown[] = again\n ? [\n [at, until],\n [again.start, again.end],\n ]\n : [[at, until]];\n ctx.ink.push({ text: a.text, rect: a, shown, boxed: true });\n return shown\n .map(\n ([from, to]) =>\n `<g class=\"dg-act dg-a\" style=\"${cs(a.color)};${ctx.m.rise(from, to, true)}\"><rect x=\"${r1(a.x)}\" y=\"${r1(a.y)}\" width=\"${r1(a.w)}\" height=\"${a.h}\" rx=\"${partRadius(ctx.corner, LOOK.action.radius)}\"/><text x=\"${r1(a.x + a.w / 2)}\" y=\"${r1(a.y + a.h / 2 + LOOK.baseline.action)}\" text-anchor=\"middle\">${esc(a.text)}</text></g>`,\n )\n .join(\"\");\n}\n","/**\n * 線の描き方 (#3345)。\n *\n * 先に点線で道を見せ、その段で色の線を引き、流れる点で向きを見せる。済んだ線は薄く残す。\n * 道の形と曲がり角の丸め (`pathOf`) と矢じり (`arrowHead`) は、状態遷移図の通らない道と同じ下請けを使う。\n */\nimport type { SceneEdge } from \"../../layout/scene\";\nimport { EASE } from \"../../look/values\";\nimport { ALWAYS } from \"../../render/ink\";\nimport type { Frame } from \"../../render/motion\";\nimport { arrowHead, type Ctx, pathOf } from \"../../render/parts\";\nimport { cs } from \"../color/draw\";\nimport type { EdgeTime } from \"../../timeline\";\n\n/**\n * 線。点線で道を見せておき、その段で色の線を引いて、段の終わりまで流れる点で向きを見せる。\n * 済んだ段は薄く残し、最後の段の後に通った道を全て濃くし直す。\n * `past` を立てると (状態遷移図、#3171)、段が終わった後は色の線を消して灰の実線に替え、最後の段まで残す。\n * `since` を渡すと (木の図の後から現れる箱へ向かう線、#3240)、点線の道をその時刻から出す。\n */\nexport function edge(e: SceneEdge, time: EdgeTime, ctx: Ctx, past = false, since = 0): { base: string; lit: string } {\n const { m } = ctx;\n // 点線の道は `since` から最後まで見えている。`since` が 0 なら初めから見えている\n ctx.traces.push({ from: e.from, to: e.to, points: e.points, shown: since > 0 ? [[since, Number.POSITIVE_INFINITY]] : ALWAYS });\n const d = pathOf(e.points);\n const head = arrowHead(e.points);\n const { start: a, drawn: b, end } = time;\n const tail: Frame[] = past\n ? [\n [end, { opacity: 1 }, EASE.inOut],\n [end + 0.4, { opacity: 0 }],\n [m.total, { opacity: 0 }],\n ]\n : [\n [end, { opacity: 1 }, EASE.inOut],\n [end + 0.4, { opacity: 0.45 }],\n [ctx.end + 0.3, { opacity: 0.45 }, EASE.inOut],\n [ctx.end + 1, { opacity: 0.95 }],\n [m.last, { opacity: 0.95 }, EASE.inOut],\n [m.total, { opacity: 0 }],\n ];\n const line = m.kf([\n [0, { opacity: 0, \"stroke-dashoffset\": 1 }],\n [a, { opacity: 0, \"stroke-dashoffset\": 1 }, EASE.inOut],\n [a + 0.05, { opacity: 1 }],\n [b, { \"stroke-dashoffset\": 0 }],\n [m.last, { \"stroke-dashoffset\": 0 }],\n [m.total, { \"stroke-dashoffset\": 1 }],\n ...tail,\n ]);\n const hk = m.kf([[0, { opacity: 0 }], [b - 0.05, { opacity: 0 }], [b, { opacity: 1 }], ...tail]);\n const run = -(end - b) * 26;\n const flow = m.kf([\n [0, { opacity: 0, \"stroke-dashoffset\": 0 }],\n [b, { opacity: 0, \"stroke-dashoffset\": 0 }],\n [b + 0.25, { opacity: 0.9 }],\n [end - 0.1, { opacity: 0.9 }, EASE.inOut],\n [end + 0.2, { opacity: 0, \"stroke-dashoffset\": run }],\n [m.total, { opacity: 0, \"stroke-dashoffset\": run }],\n ]);\n const grey = past ? m.kf([[0, { opacity: 0 }], [end, { opacity: 0 }, EASE.inOut], [end + 0.4, { opacity: 1 }], [m.last, { opacity: 1 }, EASE.inOut], [m.total, { opacity: 0 }]]) : \"\";\n const path = `<path class=\"dg-e\" d=\"${d}\"/><path class=\"dg-eh\" d=\"${head}\"/>`;\n return {\n base: `${since > 0 ? `<g class=\"dg-a\" style=\"${m.vis(since)}\">${path}</g>` : path}${past ? `<path class=\"dg-e-past dg-a\" d=\"${d}\" style=\"${grey}\"/><path class=\"dg-eh-past dg-a\" d=\"${head}\" style=\"${grey}\"/>` : \"\"}`,\n lit: `<g style=\"${cs(e.color)}\"><path class=\"dg-e-on dg-a\" pathLength=\"1\" d=\"${d}\" style=\"${line}\"/><path class=\"dg-eh-on dg-a\" d=\"${head}\" style=\"${hk}\"/><path class=\"dg-flow dg-a\" d=\"${d}\" style=\"${flow}\"/></g>`,\n };\n}\n","/**\n * 線の名前の描き方 (#3345)。\n *\n * 線の名前は、その段の間だけ色付きの札で出し、済んだら消す。置き場所は並べ方 (`layout/`) が線の中ほどの上か右に決める。\n * 状態遷移図では段が終わった後も札を外した灰の字で薄く残し (#3171)、止め絵を選んだ図では最後の段の止め絵に全ての段の名前を出す (#3200)。\n */\nimport { textBox } from \"../../layout/measure\";\nimport type { SceneLabel } from \"../../layout/scene\";\nimport { LOOK, TYPE } from \"../../look/values\";\nimport { partRadius } from \"../../render/corner\";\nimport type { Shown } from \"../../render/ink\";\nimport { type Ctx, esc, r1 } from \"../../render/parts\";\nimport { cs } from \"../color/draw\";\nimport type { LabelTime, Span } from \"../../timeline\";\n\n/**\n * 同じ線の同じ名前を後の段が置く時は、薄く残した名前をその段が始まるまでで消す (#3184)。\n * 止め絵で全ての段の名前を出し直す間は、同じ所に出る後の段の名前に任せる (#3200)\n */\nexport function fadeBefore(l: SceneLabel, time: LabelTime, steps: Span[]): LabelTime {\n if (l.until === undefined) return time;\n const { after, again: _again, ...rest } = time;\n if (!after) return rest;\n const cut = (steps[l.until] as Span).start;\n return cut > after.start\n ? { ...rest, after: { start: after.start, end: Math.min(after.end, cut) } }\n : rest;\n}\n\n/**\n * 線の名前の札。その段の間だけ出し、段の終わりまでに消え終わる。時刻の表が `after` を持つ時は、その間だけ札を外した灰の字で薄く残す (#3171)。\n * `again` を持つ時は (止め絵を選んだ図、#3200)、その間に同じ札をもう 1 つ出す。\n */\nexport function label(l: SceneLabel, time: LabelTime, ctx: Ctx): string {\n const ja = l.family === \"sans\" ? \" dg-capj\" : \"\";\n const { radius } = LOOK.label;\n const shown: Shown[] = time.again\n ? [\n [time.start, time.end],\n [time.again.start, time.again.end],\n ]\n : [[time.start, time.end]];\n // 札の間は札の四角を、薄く残す間は札を外した字の四角を記録する\n ctx.ink.push({ text: l.text, rect: l, shown, boxed: true });\n if (time.after)\n ctx.ink.push({\n text: l.text,\n rect: textBox(\n l.text,\n l.x + l.w / 2,\n l.y + l.h / 2 + LOOK.baseline.label,\n l.family === \"sans\" ? TYPE.labelJa : TYPE.label,\n \"middle\",\n ),\n shown: [[time.after.start, time.after.end]],\n });\n const x = r1(l.x + l.w / 2);\n const y = r1(l.y + l.h / 2 + LOOK.baseline.label);\n const past = time.after\n ? `<g class=\"dg-cap-past${l.family === \"sans\" ? \" dg-cap-pastj\" : \"\"} dg-a\" style=\"${ctx.m.vis(time.after.start, time.after.end)}\"><text x=\"${x}\" y=\"${y}\" text-anchor=\"middle\">${esc(l.text)}</text></g>`\n : \"\";\n const caps = shown.map(\n ([a, b]) =>\n `<g class=\"dg-cap${ja} dg-a\" style=\"${cs(l.color)};${ctx.m.rise(a, b, true)}\"><rect x=\"${r1(l.x)}\" y=\"${r1(l.y)}\" width=\"${r1(l.w)}\" height=\"${l.h}\" rx=\"${partRadius(ctx.corner, radius)}\"/><text x=\"${x}\" y=\"${y}\" text-anchor=\"middle\">${esc(l.text)}</text></g>`,\n );\n return `${past}${caps.join(\"\")}`;\n}\n","/**\n * 区画の描き方 (#3345)。\n *\n * 区画は場所か系統を表す横の帯で、名前を左上に絵柄と 2 行まで置き、その下に添え書きを置く。\n */\nimport type { SceneRegion } from \"../../layout/scene\";\nimport { type Corner, LOOK, TYPE } from \"../../look/values\";\nimport { frameShape, partRadius } from \"../../render/corner\";\nimport type { Ink } from \"../../render/ink\";\nimport { r1, write } from \"../../render/parts\";\nimport { cs } from \"../color/draw\";\nimport { drawsIcon, glyph } from \"../icon/draw\";\n\n/** 区画を描く。`corner` は色味の角の形で、角を落とす色味では帯の右上と左下を落とし、絵柄の枠を丸めない (#3344) */\nexport function band(region: SceneRegion, ink: Ink[], corner: Corner): string {\n const { radius, icon, iconRadius, iconScale, nameY, line } = LOOK.region;\n const { x, y } = region.header;\n const lines = region.lines\n .map((t, k) => write(ink, \"dg-bz\", x, region.y + nameY + k * line, t, TYPE.regionName))\n .join(\"\");\n const note = region.note\n ? write(\n ink,\n \"dg-bx\",\n x,\n region.y + nameY + region.lines.length * line + 1,\n region.note,\n TYPE.regionNote,\n )\n : \"\";\n const mark = drawsIcon(region.icon)\n ? `<rect class=\"dg-bi\" x=\"${r1(x)}\" y=\"${r1(y)}\" width=\"${icon}\" height=\"${icon}\" rx=\"${partRadius(corner, iconRadius)}\"/>${glyph(region.icon, x + icon / 2, y + icon / 2, iconScale)}`\n : \"\";\n const frame = frameShape(\n corner,\n ' class=\"dg-band\"',\n { x: region.x + 0.5, y: region.y + 0.5, w: region.w - 1, h: region.h - 1 },\n `<rect class=\"dg-band\" x=\"${r1(region.x + 0.5)}\" y=\"${r1(region.y + 0.5)}\" width=\"${r1(region.w - 1)}\" height=\"${r1(region.h - 1)}\" rx=\"${radius}\"/>`,\n );\n return `<g style=\"${cs(region.color)}\">${frame}${mark}${lines}${note}</g>`;\n}\n","/**\n * 生存線の描き方 (#3345)。\n *\n * 時系列図の箱の下から、点線の縦の線を最後の段の下まで伸ばす。置き場所は時系列図の並べ方 (`kinds/sequence/layout.ts`) が決める。\n */\nimport { r1 } from \"../../render/parts\";\n\nexport function lifeline(x: number, y1: number, y2: number): string {\n return `<line class=\"dg-ll\" x1=\"${r1(x)}\" y1=\"${r1(y1)}\" x2=\"${r1(x)}\" y2=\"${r1(y2)}\"/>`;\n}\n","/**\n * 箱の下の小さな字の描き方 (#3345)。\n *\n * 下の字は箱の 3 段の 1 つで、箱を描く部品 (`render/parts.ts` の `card` と `subLines`) が箱と一緒に描く。\n * このブロックは、段で起きた書き換え (`note`) と、時系列図でない図の箱の中の処理 (`act`) から、\n * 箱ごとの下の字の移り変わりを組む。\n */\nimport { MOTION } from \"../../look/values\";\nimport type { SubChange } from \"../box/draw\";\nimport type { DiagramModel } from \"../../schema\";\nimport type { Span, Timeline } from \"../../timeline\";\n\n/**\n * 箱の下の字の移り変わり。書き換えはそのまま残し、構成図の処理はその段の間だけ出して元へ戻す。\n * 止め絵を選んだ図は、その箱で最後に起きたのが処理なら、最後の段で起きることが済んだ時にその処理を出し直して繰り返す前まで残す (#3200)\n */\nexport function subChanges(diagram: DiagramModel, timeline: Timeline, actionsInBox: boolean): Map<string, SubChange[]> {\n type Raw = { t: number; order: number; box: string; set?: string; act?: string | null };\n const raw: Raw[] = [];\n const { whole } = timeline;\n let order = 0;\n for (const time of timeline.events) {\n const event = diagram.steps[time.step]?.events[time.event];\n if (event?.type === \"swap\") raw.push({ t: time.at, order: order++, box: event.box, set: event.text });\n if (actionsInBox && event?.type === \"action\") {\n raw.push({ t: time.at, order: order++, box: event.box, act: event.label });\n const end = (timeline.steps[time.step] as Span).end;\n if (!whole || end <= whole.start) raw.push({ t: end, order: order++, box: event.box, act: null });\n }\n }\n raw.sort((a, b) => a.t - b.t || a.order - b.order);\n const out = new Map<string, SubChange[]>();\n for (const box of diagram.boxes) {\n let base: [string, string] = [box.sub ?? \"\", \"dg-ss\"];\n let acting: string | undefined;\n let shown = base.join(\"|\");\n const list: SubChange[] = [];\n const changes = raw.filter((r) => r.box === box.id);\n const latest = [...changes].reverse().find((r) => r.set !== undefined || typeof r.act === \"string\");\n if (whole && typeof latest?.act === \"string\") changes.push({ t: whole.start, order: order++, box: box.id, act: latest.act });\n for (const change of changes) {\n // 書き換えは、出ている処理の字も置き換える\n if (change.set !== undefined) {\n base = [change.set, \"dg-ss-ok\"];\n acting = undefined;\n }\n if (change.act !== undefined) acting = change.act ?? undefined;\n const now: [string, string] = acting !== undefined ? [acting, \"dg-ss-act\"] : base;\n if (now.join(\"|\") === shown) continue;\n shown = now.join(\"|\");\n list.push([change.t, now[0], now[1]]);\n }\n // すぐ次の字に替わる字は読めないので出さない\n const kept = list.filter((change, k) => {\n const next = list[k + 1];\n return next === undefined || next[0] - change[0] >= MOTION.minShow;\n });\n out.set(box.id, kept);\n }\n return out;\n}\n","/**\n * 脇道の描き方 (#3163、#3171、#3347)。\n *\n * 通らない道は点線で道と向きだけを見せ、運ぶ物を走らせない。どの段も辿り着かない状態は点線の縁の薄い箱にし、\n * 図の右上の脇道の囲みに入れる。囲みは左上に名前を、その下に添え書きを 1 行ずつ置く。\n * 道の形と曲がり角の丸め (`pathOf`) と矢じり (`arrowHead`) は、線と同じ下請けを使う。\n */\nimport type { SceneBox, ScenePath, SceneSide } from \"../../layout/scene\";\nimport { type ColorKey, type Corner, LOOK, TYPE } from \"../../look/values\";\nimport { frameShape, partRadius } from \"../../render/corner\";\nimport { ALWAYS, type Ink, type Trace } from \"../../render/ink\";\nimport { arrowHead, esc, pathOf, r1, write } from \"../../render/parts\";\nimport { cs } from \"../color/draw\";\nimport { drawsIcon, glyph } from \"../icon/draw\";\n\n/** 状態遷移図の通らない道。点線で道と向きだけを見せ、運ぶ物を走らせない */\nexport function path(p: ScenePath, color: ColorKey, ink: Ink[], traces: Trace[]): string {\n traces.push({ from: p.from, to: p.to, points: p.points, shown: ALWAYS });\n const sans = p.label?.family === \"sans\";\n const label = p.label\n ? write(ink, `dg-path-t${sans ? \" dg-path-tj\" : \"\"}`, p.label.x + LOOK.label.padX, p.label.y + p.label.h / 2 + LOOK.baseline.label, p.label.text, sans ? TYPE.labelJa : TYPE.label)\n : \"\";\n return `<g data-path=\"${esc(`${p.from}->${p.to}`)}\" style=\"${cs(color)}\"><path class=\"dg-path\" d=\"${pathOf(p.points)}\"/><path class=\"dg-path-h\" d=\"${arrowHead(p.points)}\"/>${label}</g>`;\n}\n\n/** 状態遷移図の脇道の囲み。左上に囲みの名前を、その下に添え書きを 1 行ずつ置く。囲みの角は色味の角の形 (`corner`) で描く */\nexport function side(s: SceneSide, color: ColorKey, ink: Ink[], corner: Corner): string {\n const { pad } = LOOK.state.side;\n const title = s.y + pad + TYPE.regionName.size;\n const notes = s.notes.map((note, k) => write(ink, \"dg-side-n\", s.x + pad, title + LOOK.region.line * (k + 1), note, TYPE.regionNote)).join(\"\");\n return (\n `<g style=\"${cs(color)}\">${frameShape(corner, ' class=\"dg-side\"', { x: s.x + 0.5, y: s.y + 0.5, w: s.w - 1, h: s.h - 1 }, `<rect class=\"dg-side\" x=\"${r1(s.x + 0.5)}\" y=\"${r1(s.y + 0.5)}\" width=\"${r1(s.w - 1)}\" height=\"${r1(s.h - 1)}\" rx=\"${LOOK.region.radius}\"/>`)}` +\n `${write(ink, \"dg-side-t\", s.x + pad, title, s.title, TYPE.regionName)}${notes}</g>`\n );\n}\n\n/**\n * 状態遷移図の、どの段も辿り着かない状態。点線の縁の札で、絵柄を左に、名前と下の字を右に並べる (#3171)。光らず、字も書き換わらない。\n * 札の縁と絵柄の角は色味の角の形 (`corner`) で描く\n */\nexport function ghostCard(box: SceneBox, ink: Ink[], corner: Corner): string {\n const { icon, iconRadius, iconScale, radius } = LOOK.box;\n const G = LOOK.state.ghost;\n const ix = box.x + G.pad + icon / 2;\n const tx = box.x + G.pad + icon + G.gap;\n const mark = drawsIcon(box.icon)\n ? `<rect class=\"dg-ic\" x=\"${r1(ix - icon / 2)}\" y=\"${r1(box.cy - icon / 2)}\" width=\"${icon}\" height=\"${icon}\" rx=\"${partRadius(corner, iconRadius)}\"/>${glyph(box.icon, ix, box.cy, iconScale)}`\n : \"\";\n const nameY = box.sub ? G.nameY : LOOK.baseline.mark;\n const frame = { x: box.x, y: box.y, w: box.w, h: box.h };\n const sub = box.sub ? write(ink, \"dg-ss\", tx, box.cy + G.subY, box.sub, TYPE.boxSub, ALWAYS, \"start\") : \"\";\n return (\n `<g data-ghost=\"${esc(box.id)}\" style=\"${cs(box.color)}\">${frameShape(corner, ' class=\"dg-ghost\"', frame, `<rect class=\"dg-ghost\" x=\"${r1(box.x)}\" y=\"${r1(box.y)}\" width=\"${r1(box.w)}\" height=\"${box.h}\" rx=\"${radius}\"/>`)}` +\n `${mark}${write(ink, \"dg-sn\", tx, box.cy + nameY, box.name, TYPE.boxName, ALWAYS, \"start\")}${sub}</g>`\n );\n}\n","/**\n * 始まりと終わりの印の描き方 (#3163、#3347)。\n *\n * 始まりは塗った丸、終わりは輪の中の丸で描く。脇道の中の終わりは点線の輪にし、脇道の状態の色を付ける。\n * 印の置き場所と字の置き場所は場面 (`layout/scene.ts`) が持つ。\n */\nimport { markText, type SceneEnd } from \"../../layout/scene\";\nimport { type ColorKey, LOOK, TYPE } from \"../../look/values\";\nimport type { Ink } from \"../../render/ink\";\nimport { r1, write } from \"../../render/parts\";\nimport { cs } from \"../color/draw\";\n\n/** 状態遷移図の始まりと終わりの印。始まりは塗った丸、終わりは輪の中の丸で、脇道の中の終わりは点線の輪 */\nexport function endMark(e: SceneEnd, color: ColorKey, ink: Ink[]): string {\n const { end } = LOOK.state;\n const at = markText(e);\n const text = e.text === \"\" ? \"\" : write(ink, \"dg-mark\", at[0], at[1], e.text, TYPE.regionNote);\n const x = r1(e.x);\n const y = r1(e.y);\n if (e.kind === \"start\") return `<g data-end=\"start\"><circle class=\"dg-start\" cx=\"${x}\" cy=\"${y}\" r=\"${e.r}\"/>${text}</g>`;\n if (e.ghost) return `<g data-end=\"finish\" style=\"${cs(color)}\"><circle class=\"dg-end-x\" cx=\"${x}\" cy=\"${y}\" r=\"${e.r}\"/><circle class=\"dg-end-xi\" cx=\"${x}\" cy=\"${y}\" r=\"${end.inner}\"/>${text}</g>`;\n return `<g data-end=\"finish\"><circle class=\"dg-end\" cx=\"${x}\" cy=\"${y}\" r=\"${e.r}\"/><circle class=\"dg-end-in\" cx=\"${x}\" cy=\"${y}\" r=\"${end.inner}\"/>${text}</g>`;\n}\n","/**\n * 中身の帯の描き方 (#3345)。\n *\n * 帯は図の下に 1 本置き、左に印と題、欄は細い線で区切り、上に欄の名前、下に値を出す。\n * 段で書いた値と札 (`set`) の移り変わりを欄ごとに組み (`fieldChanges`)、帯を描く部品 (`strip`) が出す。\n * 時間軸の図の物差しの欄は、時間軸の図を描く部品が渡す `meter` が描く。\n */\nimport { hasWide, textBox, textWidth } from \"../../layout/measure\";\nimport type { Layout, SceneField, SceneStrip } from \"../../layout/scene\";\nimport { type ColorKey, LOOK, MOTION, TYPE } from \"../../look/values\";\nimport { frameShape, partRadius } from \"../../render/corner\";\nimport { type Ctx, esc, r1, write } from \"../../render/parts\";\nimport { cs } from \"../color/draw\";\nimport { glyph } from \"../icon/draw\";\nimport type { DiagramModel } from \"../../schema\";\nimport type { Span, Timeline } from \"../../timeline\";\n\n/** 中身の帯の 1 欄の移り変わり。値と札は、次の値か札が来るまで出る。 */\nexport interface FieldChange {\n at: number;\n value?: string;\n tag?: string;\n color: ColorKey;\n /** 変わった段と、その段の終わり */\n step: number;\n until: number;\n}\n\n/** 段で書いた値と札 (`strip` の出来事) を、欄ごとの移り変わりにする。色はその段の番号の色 */\nexport function fieldChanges(\n diagram: DiagramModel,\n timeline: Timeline,\n layout: Layout,\n): Map<string, FieldChange[]> {\n const out = new Map<string, FieldChange[]>();\n for (const time of timeline.events) {\n const event = diagram.steps[time.step]?.events[time.event];\n if (event?.type !== \"strip\") continue;\n const color: ColorKey = layout.badges[time.step]?.color ?? \"slate\";\n const list = out.get(event.field) ?? [];\n const until = (timeline.steps[time.step] as Span).end;\n list.push({\n at: time.at,\n color,\n step: time.step,\n until,\n ...(event.value !== undefined ? { value: event.value } : {}),\n ...(event.tag !== undefined ? { tag: event.tag } : {}),\n });\n out.set(event.field, list);\n }\n return out;\n}\n\n/**\n * 中身の帯。`now` を立てると (状態遷移図、#3171)、段の中で変わった値をその段の終わりまで線の色 (今の状態の色) で描き、\n * 欄の名前の横に同じ色の点を置く。帯の通った状態の欄は、`arrivals` が持つ着いた時刻に点を塗る。\n * `meter` を渡すと (時間軸の図、#3165)、物差しの欄は値の字の代わりに `meter` が描く物差しを置く\n */\nexport function strip(\n s: SceneStrip,\n changes: Map<string, FieldChange[]>,\n ctx: Ctx,\n now = false,\n arrivals = new Map<string, number>(),\n meter?: (field: SceneField) => string | undefined,\n): string {\n const { m, sh } = ctx;\n const S = LOOK.strip;\n const my = s.y + S.h / 2;\n const parts = [\n frameShape(\n ctx.corner,\n ` class=\"dg-strip\" ${sh}`,\n { x: s.x + 0.5, y: s.y + 0.5, w: s.w - 1, h: s.h - 1 },\n `<rect class=\"dg-strip\" x=\"${r1(s.x + 0.5)}\" y=\"${r1(s.y + 0.5)}\" width=\"${r1(s.w - 1)}\" height=\"${r1(s.h - 1)}\" rx=\"${LOOK.region.radius}\" ${sh}/>`,\n ),\n `<g style=\"${cs(\"slate\")}\"><rect class=\"dg-bi\" x=\"${r1(s.x + S.pad)}\" y=\"${r1(my - S.icon / 2)}\" width=\"${S.icon}\" height=\"${S.icon}\" rx=\"${partRadius(ctx.corner, LOOK.box.iconRadius)}\"/>${glyph(\"env\", s.x + S.pad + S.icon / 2, my, 0.78)}</g>`,\n write(\n ctx.ink,\n \"dg-sh\",\n s.x + S.titleX,\n my + LOOK.baseline.stripTitle,\n s.title,\n TYPE.stripTitle,\n ),\n ];\n s.fields.forEach((field, i) => {\n const prev = s.fields[i - 1];\n if (prev && prev.y === field.y) {\n const sx = field.x - S.fieldGap / 2;\n parts.push(\n `<line class=\"dg-sep\" x1=\"${r1(sx)}\" y1=\"${r1(field.y + S.sepInset)}\" x2=\"${r1(sx)}\" y2=\"${r1(field.y + S.h - S.sepInset)}\"/>`,\n );\n }\n parts.push(write(ctx.ink, \"dg-fl\", field.x, field.y + S.nameY, field.name, TYPE.fieldName));\n const gauge = meter?.(field);\n if (gauge !== undefined) {\n parts.push(gauge);\n return;\n }\n const list = changes.get(field.name) ?? [];\n const values = list.filter((c) => c.value !== undefined);\n const tags = list.filter((c) => c.tag !== undefined);\n values.forEach((c, k) => {\n const next = values[k + 1]?.at;\n const value = c.value as string;\n const cls = hasWide(value) ? \"dg-fvj\" : \"dg-fv\";\n // 値は、次の値が来るまで (色を付けた間と墨に戻した間を合わせて) 1 件で記録する\n ctx.ink.push({\n text: value,\n rect: textBox(\n value,\n field.x,\n field.y + S.valueY,\n hasWide(value) ? TYPE.fieldValueJa : TYPE.fieldValue,\n ),\n shown: [[c.at, next === undefined ? Number.POSITIVE_INFINITY : next - MOTION.untilFade]],\n });\n const textOf = (c: string): string =>\n `<text class=\"${c}\" x=\"${r1(field.x)}\" y=\"${r1(field.y + S.valueY)}\">${esc(value)}</text>`;\n const text = textOf(cls);\n if (!now) {\n const anim = next === undefined ? m.rise(c.at) : m.rise(c.at, next - MOTION.untilFade);\n parts.push(`<g class=\"dg-a\" style=\"${anim}\">${text}</g>`);\n return;\n }\n // 変わった段の間は今の状態の色で、段が終わると墨に戻す\n const until = Math.min(c.until, next ?? c.until);\n const dot = `<circle class=\"dg-fl-now\" cx=\"${r1(field.x + textWidth(field.name, TYPE.fieldName) + S.now.gap)}\" cy=\"${r1(field.y + S.nameY - TYPE.fieldName.size / 3)}\" r=\"${S.now.r}\"/>`;\n parts.push(\n `<g class=\"dg-fv-now dg-a\" data-step=\"${c.step}\" style=\"${cs(c.color)};${m.rise(c.at, until - MOTION.untilFade)}\">${textOf(`${cls} dg-fv-c`)}${dot}</g>`,\n );\n if (next === undefined || next > until)\n parts.push(\n `<g class=\"dg-a\" style=\"${m.vis(until - MOTION.untilFade, next === undefined ? m.last : next - MOTION.untilFade)}\">${text}</g>`,\n );\n });\n tags.forEach((c, k) => {\n const next = tags[k + 1]?.at;\n const tag = c.tag as string;\n // 札は、その時に出ている値の右に置く\n const shown = [...values].reverse().find((v) => v.at <= c.at + 1e-9)?.value;\n const x =\n field.x +\n (shown\n ? textWidth(shown, hasWide(shown) ? TYPE.fieldValueJa : TYPE.fieldValue) + S.tagGap\n : 0);\n const w = textWidth(tag, TYPE.tag) + S.tagPadX * 2;\n const y = field.y + S.valueY - S.tagH / 2 - LOOK.baseline.tag;\n ctx.ink.push({\n text: tag,\n rect: { x, y, w, h: S.tagH },\n shown: [[c.at, next === undefined ? Number.POSITIVE_INFINITY : next - MOTION.untilFade]],\n boxed: true,\n });\n parts.push(\n `<g class=\"dg-tg dg-popc dg-a\" style=\"${cs(c.color)};${next === undefined ? m.pop(c.at) : m.pop(c.at, next - MOTION.untilFade)}\"><rect x=\"${r1(x)}\" y=\"${r1(y)}\" width=\"${r1(w)}\" height=\"${S.tagH}\" rx=\"${partRadius(ctx.corner, S.tagH / 2)}\"/><text x=\"${r1(x + w / 2)}\" y=\"${r1(y + S.tagH / 2 + LOOK.baseline.tag)}\" text-anchor=\"middle\">${esc(tag)}</text></g>`,\n );\n });\n });\n if (s.trail) {\n const t = s.trail;\n const last = s.fields[s.fields.length - 1];\n if (last && last.y === t.y) {\n const sx = t.x - S.fieldGap / 2;\n parts.push(\n `<line class=\"dg-sep\" x1=\"${r1(sx)}\" y1=\"${r1(t.y + S.sepInset)}\" x2=\"${r1(sx)}\" y2=\"${r1(t.y + S.h - S.sepInset)}\"/>`,\n );\n }\n parts.push(write(ctx.ink, \"dg-fl\", t.x, t.y + S.nameY, t.title, TYPE.fieldName));\n const dy = t.y + S.valueY - TYPE.fieldValue.size / 3;\n t.states.forEach((state, k) => {\n const cx = r1(t.x + S.trail.r + k * S.trail.step);\n const at = arrivals.get(state.box);\n const fill =\n at === undefined\n ? \"\"\n : `<circle class=\"dg-tr-fill dg-a\" cx=\"${cx}\" cy=\"${r1(dy)}\" r=\"${S.trail.r}\" style=\"${m.pop(at)}\"/>`;\n parts.push(\n `<g data-trail=\"${esc(state.box)}\" style=\"${cs(state.color)}\"><circle class=\"dg-tr-ring\" cx=\"${cx}\" cy=\"${r1(dy)}\" r=\"${S.trail.r}\"/>${fill}</g>`,\n );\n });\n }\n return parts.join(\"\");\n}\n","/**\n * 運ぶ物が見えている時刻 (#3345)。時刻の表 (`timeline.ts`) が、線を引く時刻を決めた後に呼ぶ。\n *\n * 運ぶ物は主役 (封筒と札は 1 つ、硬貨は別の 1 つ) ごとに途切れず見え続ける。着いた後は\n * 次の同じ主役が出発するまで着いた先に留まり、次が無ければ終わりまで留まる。\n */\nimport type { Span } from \"../../timeline\";\n\n/** 運ぶ物が見えている間。`depart` に出発し `arrive` に着く。出発を待つ間と、着いた先で留まる間も含む。 */\nexport interface CarrierTime extends Span {\n step: number;\n event: number;\n who: \"main\" | \"coin\";\n depart: number;\n arrive: number;\n}\n\n/** 運ぶ物を載せた線の 1 本。`a` に引き始め `b` に引き終わる */\nexport interface Departure {\n step: number;\n event: number;\n who: \"main\" | \"coin\";\n a: number;\n b: number;\n}\n\n/** 線の順に並んだ出発から、運ぶ物が見えている間を出す。`first` は最初の段の始まり、`last` は繰り返す前に消えていく所の始まり */\nexport function carrierTimes(departures: Departure[], first: number, last: number): CarrierTime[] {\n const hasMain = departures.some((d) => d.who === \"main\");\n const carriers: CarrierTime[] = [];\n for (const who of [\"main\", \"coin\"] as const) {\n const list = departures.filter((d) => d.who === who);\n list.forEach((d, k) => {\n const next = list[k + 1];\n // 主役の最初の運ぶ物は、最初の段の始まりから出発点で待つ (何も見えない時間を作らないため)\n const waits = k === 0 && (who === \"main\" || !hasMain);\n carriers.push({\n step: d.step,\n event: d.event,\n who,\n depart: d.a,\n arrive: d.b,\n start: waits ? Math.min(first, d.a) : d.a,\n end: next ? Math.max(next.a, d.b) : last,\n });\n });\n }\n carriers.sort((x, y) => x.depart - y.depart);\n return carriers;\n}\n","/**\n * 段ごとの始まりと長さと、線、運ぶ物、線の名前、段の番号が見える時刻の表。SVG の動きはこの表から組む。\n *\n * 段の長さは本文の字数で決め、段で起きることが全部済んでから少し留まる長さを下限にする。\n * 運ぶ物が見えている間は、運ぶ物のブロック (`blocks/carry/timing.ts`) が線を引く時刻から出す (#3345)。\n * 線の名前はその段の間だけ出し、同じ段に何本あっても同時に見えるのは 2 つまでにする。\n * 状態遷移図では、段が終わった後も線の名前を最後の段まで薄く残す (#3171)。薄い名前は 2 つまでの数に入れない。\n * 止め絵を選んだ図では、最後の段で起きることが済んでから繰り返す前まで (`whole`)、全ての段の線の名前を最後の段と同じ濃さで出す (#3200)。\n * その間に見えている名前は繰り返す前まで延ばし、見えていない名前は同じ間に出し直す (`again`)。状態遷移図の薄い名前はその間の前で消す。\n * 状態遷移図では、主役の運ぶ物が乗っている状態を光らせ、運ぶ物が出た状態には少し後に済んだ印を出す (#3163)。\n * 枝分かれの図では、commit を積む出来事と枝を切る出来事も線と同じ間で引く (#3164)。\n * 時間軸の図では、針を進める出来事 (`now`) で針を目盛り 1 つずつ決まった秒数で進める (#3165)。針が進む目盛りの列の線は、\n * 段の中の書いた順に依らず、針がその目盛りに入った時に引き、線を引き終えるまで針は次の目盛りへ進まない。\n * 針を進める出来事より後に書いた出来事は、針が止まってから起こす。物差しの欄は、針が進む段では針の進みに比例して満ち、\n * 区切りの境から進む時は 0 から満ち直す。針が進まない段では値を書いた時に変わる。\n * 列の図 (#3239) の列の並びを書く出来事と、封と札の出来事も線と同じ表に載せ、並びは滑り終えるまで、封は覆い終えるまでを引く間にする。\n * 試す図 (#3337) の送る、押す、書き換える出来事も線と同じ表に載せ、送るは網を運ばれて待ち行列へ入り終えるまで、\n * 押すはチップがブロックへ移り終えるまで、書き換えるは値が変わり終えるまでを引く間にする。同じ段の出来事は前の出来事が済んでから起こす。\n * 札を動かす線が運ぶ枝の札は運ぶ物の表に載せない。札は同じ時刻にいくつも出ていて、どの札も主役ではないので、\n * 枝分かれの図を描く部品が札ごとに動かす。線に書いた運ぶ物 (`tag` と `carry`) だけを表に載せる。\n */\nimport { type CarrierTime, carrierTimes, type Departure } from \"./blocks/carry/timing\";\nimport { ratioOf } from \"./layout/scene\";\nimport { MOTION } from \"./look/values\";\nimport type { DiagramModel } from \"./schema\";\nimport { STATE_ENDS } from \"./words\";\n\nexport type { CarrierTime };\n\n/** 秒で表した、見えている間。`end` の時刻は含まない。 */\nexport interface Span {\n start: number;\n end: number;\n}\n\n/** 線を引いている間。`start` で引き始め、`drawn` で引き終わり、`end` (段の終わり) まで濃く残す。枝分かれの図では commit を積む出来事と枝を切る出来事も持つ */\nexport interface EdgeTime extends Span {\n step: number;\n event: number;\n drawn: number;\n}\n\nexport interface LabelTime extends Span {\n step: number;\n event: number;\n /** 状態遷移図だけが持つ。段が終わった後に薄く残す間 */\n after?: Span;\n /** 止め絵を選んだ図だけが持つ。最後の段で起きることが済んでから、最後の段と同じ濃さで出し直す間 (#3200) */\n again?: Span;\n}\n\n/** 処理、箱の字の書き換え、中身の帯の値が起きる時刻。 */\nexport interface EventTime {\n step: number;\n event: number;\n at: number;\n}\n\n/** 状態遷移図の状態ごとの、光っている間と、済んだ印が出る時刻。運ぶ物が出ていない状態は `done` を持たない */\nexport interface StateTime {\n box: string;\n lit: Span[];\n done?: number;\n}\n\nexport interface Timeline {\n /** 1 周の長さ */\n total: number;\n /** 繰り返す前に消えていく所の始まり */\n last: number;\n steps: Span[];\n edges: EdgeTime[];\n carriers: CarrierTime[];\n labels: LabelTime[];\n badges: { step: number; appears: number }[];\n events: EventTime[];\n /** 段ごとの止め絵の時刻。その段で起きることが全部見えている */\n stills: number[];\n /** 止め絵を選んだ図だけが持つ。最後の段で起きることが済んでから繰り返す前まで、全ての段の線の名前と箱の中の処理を出す間 (#3200) */\n whole?: Span;\n /** 状態遷移図だけが持つ */\n states?: StateTime[];\n /** 時間軸の図だけが持つ (#3165)。針の動き。[時刻, 目盛りの境の位置] の並びで、間は真っ直ぐ進む */\n needle?: [number, number][];\n /** 時間軸の図だけが持つ。針が目盛りを過ぎた (右の境に着いた) 時刻 */\n units?: { unit: number; passed: number }[];\n /** 時間軸の図だけが持つ。物差しの欄の満ち具合の動き。[時刻, 割合] の並びで、間は真っ直ぐ変わる */\n meters?: { field: string; keys: [number, number][] }[];\n}\n\ninterface Planned {\n edges: { event: number; a: number; b: number; carries: boolean; coin: boolean; named: boolean }[];\n events: { event: number; at: number }[];\n busy: number;\n /** 時間軸の図の、針の動き ([段の始まりからの時刻, 境の位置]) と、針が目盛りを過ぎた時刻 */\n sweep?: { keys: [number, number][]; passed: { unit: number; at: number }[] };\n}\n\ntype EdgeEvent = Extract<DiagramModel[\"steps\"][number][\"events\"][number], { type: \"edge\" }>;\n\n/** 列の図の出来事の長さ */\nconst LINEUP_LENGTH = { line: MOTION.lineup.slide, seal: MOTION.lineup.seal, open: MOTION.fade, pick: MOTION.fade, stamp: MOTION.popFade } as const;\n\n/** 試す図の出来事の長さ。送る出来事は網を通る時に網を運ばれる長さを足す (`tryTrip`) */\nexport function tryLength(type: \"ask\" | \"press\" | \"item\", trip: boolean): number {\n const T = MOTION.try;\n return type === \"ask\" ? (trip ? T.trip : 0) + T.settle : type === \"press\" ? T.build : T.edit;\n}\n\n/** 時間軸の図の段を組む時に渡す、段の始まりの針の位置と、目盛り 1 つを進む秒数 */\ninterface Needle {\n from: number;\n speed: number;\n}\n\n/**\n * 段の中で起きることの時刻 (段の始まりから)。線は少しずつずらして引き、書き換えは直前の線が着いてから起こす。\n * 時間軸の図では `needle` を渡し、針を進める出来事の所で針を目盛り 1 つずつ進める。針が進む目盛りの列の線はその目盛りに入った時に引く\n */\nfunction plan(step: DiagramModel[\"steps\"][number], needle?: Needle, trip = false): Planned {\n const out: Planned = { edges: [], events: [], busy: 0 };\n let cursor: number = MOTION.edgeAt;\n let arrived: number | undefined;\n let changes = 0;\n let settled = Number.NEGATIVE_INFINITY;\n const line = (e: number, event: EdgeEvent, a: number): number => {\n const carries = event.carry.kind !== \"none\";\n const b = a + (carries ? MOTION.drawCarry : MOTION.draw);\n out.edges.push({ event: e, a, b, carries, coin: event.carry.kind === \"coin\", named: event.label !== undefined });\n out.busy = Math.max(out.busy, b);\n return b;\n };\n const nows = needle ? step.events.flatMap((event, e) => (event.type === \"now\" ? [{ e, to: event.to }] : [])) : [];\n const p0 = needle?.from ?? 0;\n const p1 = Math.max(p0, ...nows.map((n) => n.to + 1));\n const pulled = (event: DiagramModel[\"steps\"][number][\"events\"][number]): event is EdgeEvent => event.type === \"edge\" && event.at !== undefined && event.at >= p0 && event.at < p1;\n step.events.forEach((event, e) => {\n if (needle && e === nows[0]?.e) {\n // 針は、前に書いた書き換えが起きてから動き出す\n let t = Math.max(cursor, settled + MOTION.change);\n const keys: [number, number][] = [[t, p0]];\n const passed: { unit: number; at: number }[] = [];\n for (let u = p0; u < p1; u++) {\n const entry = t;\n const lines = step.events.flatMap((ev, k) => (pulled(ev) && ev.at === u ? [{ k, ev }] : []));\n const done = lines.reduce((latest, l, j) => Math.max(latest, line(l.k, l.ev, entry + MOTION.stagger * j)), entry);\n const end = Math.max(entry + needle.speed, lines.length > 0 ? done + MOTION.time.wait : entry);\n if (end - needle.speed > entry + 1e-9) keys.push([end - needle.speed, u]);\n keys.push([end, u + 1]);\n passed.push({ unit: u, at: end });\n t = end;\n }\n out.sweep = { keys, passed };\n out.busy = Math.max(out.busy, t);\n cursor = t + MOTION.time.after;\n arrived = t;\n changes = 0;\n return;\n }\n if (event.type === \"now\" || (needle && pulled(event))) return;\n // 列の図の役が動く出来事 (#3351) は、段の始まりから終わりまで役の札を光らせるだけで、段の中の時刻を取らない\n if (event.type === \"role\") return;\n // 試す図の出来事 (#3337) は、前の出来事が済んでから起こす\n if (event.type === \"ask\" || event.type === \"press\" || event.type === \"item\") {\n const a = cursor;\n const b = a + tryLength(event.type, trip);\n out.edges.push({ event: e, a, b, carries: false, coin: false, named: false });\n cursor = b;\n arrived = b;\n changes = 0;\n out.busy = Math.max(out.busy, b);\n return;\n }\n if (event.type === \"line\" || event.type === \"seal\" || event.type === \"open\" || event.type === \"pick\" || event.type === \"stamp\") {\n const a = cursor;\n const b = a + LINEUP_LENGTH[event.type];\n out.edges.push({ event: e, a, b, carries: false, coin: false, named: false });\n cursor = a + MOTION.lineup.stagger;\n arrived = b;\n changes = 0;\n out.busy = Math.max(out.busy, b);\n return;\n }\n // 枝分かれの図の commit を積む出来事と枝を切る出来事と、木の図の葉と親を出す出来事は、親から引く線と同じ間で引く\n if (event.type === \"commit\" || event.type === \"branch\" || event.type === \"leaf\" || event.type === \"node\") {\n const a = cursor;\n const b = a + MOTION.draw;\n out.edges.push({ event: e, a, b, carries: false, coin: false, named: false });\n cursor = a + MOTION.stagger;\n arrived = b;\n changes = 0;\n out.busy = Math.max(out.busy, b);\n } else if (event.type === \"edge\") {\n const a = cursor;\n arrived = line(e, event, a);\n cursor = a + MOTION.stagger;\n changes = 0;\n } else if (event.type === \"action\") {\n out.events.push({ event: e, at: cursor });\n out.busy = Math.max(out.busy, cursor + MOTION.action);\n cursor += MOTION.action;\n changes = 0;\n } else {\n const at = (arrived ?? cursor) + MOTION.change * changes++;\n out.events.push({ event: e, at });\n out.busy = Math.max(out.busy, at);\n settled = Math.max(settled, at);\n }\n });\n // 針が進む目盛りの列の線は書いた順と別に引くので、引き始める順に並べ直す\n out.edges.sort((x, y) => x.a - y.a);\n return out;\n}\n\n/** 時刻の表を作る。`still` を立てると、最後の段の止め絵に全ての段の線の名前と箱の中の処理を出す間 (`whole`) を持つ (#3200) */\nexport function buildTimeline(diagram: DiagramModel, still = false): Timeline {\n const time = diagram.kind === \"time\" ? diagram.time : undefined;\n const T = MOTION.time;\n const speed = time ? Math.min(T.unitMax, Math.max(T.unitMin, T.axis / Math.max(1, time.scale.count))) : 0;\n let at = 0;\n // 試す図の入力の帯が網を通るなら、送る出来事は網を運ばれる長さを持つ\n const trip = diagram.try?.parts.some((p) => p.type === \"ask\" && p.via !== undefined) ?? false;\n const plans = diagram.steps.map((step) => {\n if (!time) return plan(step, undefined, trip);\n const p = plan(step, { from: at, speed });\n at = p.sweep?.keys[p.sweep.keys.length - 1]?.[1] ?? at;\n return p;\n });\n const steps: Span[] = [];\n let t = MOTION.intro;\n diagram.steps.forEach((step, s) => {\n const read = Math.min(MOTION.stepMax, Math.max(MOTION.stepMin, MOTION.stepBase + [...step.body].length * MOTION.perChar));\n const length = Math.max(read, (plans[s]?.busy ?? 0) + MOTION.dwell);\n steps.push({ start: t, end: t + length });\n t += length;\n });\n const end = t;\n const total = Math.ceil(end + MOTION.outro);\n const last = total - MOTION.tail;\n const lastSpan = steps[steps.length - 1];\n const whole = still && lastSpan ? { start: lastSpan.start + (plans[plans.length - 1]?.busy ?? 0), end: last } : undefined;\n // 状態遷移図の薄い名前は、全ての段の名前を出し直す前に消す\n const faint = whole?.start ?? last;\n\n const edges: EdgeTime[] = [];\n const labels: LabelTime[] = [];\n const events: EventTime[] = [];\n const departures: Departure[] = [];\n plans.forEach((p, s) => {\n const span = steps[s] as Span;\n const named: LabelTime[] = [];\n for (const edge of p.edges) {\n const a = span.start + edge.a;\n edges.push({ step: s, event: edge.event, start: a, drawn: span.start + edge.b, end: span.end });\n // 枝分かれの図の、札を書かない線が運ぶ札は、枝分かれの図を描く部品が札ごとに動かす\n const event = diagram.steps[s]?.events[edge.event];\n const own = diagram.kind === \"git\" && event?.type === \"edge\" && event.carry.kind === \"tag\" && event.carry.text === event.from;\n if (edge.carries && !own) departures.push({ step: s, event: edge.event, who: edge.coin ? \"coin\" : \"main\", a, b: span.start + edge.b });\n if (edge.named) named.push({ step: s, event: edge.event, start: a + MOTION.labelDelay, end: span.end });\n }\n // 3 つ目の名前が出る時に 1 つ目を消す\n named.forEach((label, k) => {\n const later = named[k + 2];\n if (later) label.end = Math.min(label.end, later.start);\n });\n for (const label of named) {\n if (whole && label.end > whole.start) label.end = whole.end;\n else {\n if (diagram.kind === \"state\" && label.end < faint) label.after = { start: label.end, end: faint };\n if (whole) label.again = whole;\n }\n }\n labels.push(...named);\n for (const event of p.events) events.push({ step: s, event: event.event, at: span.start + event.at });\n });\n\n const first = steps[0]?.start ?? 0;\n const carriers = carrierTimes(departures, first, last);\n const states = diagram.kind === \"state\" ? stateTimes(diagram, edges, last) : undefined;\n const needle: [number, number][] = [[0, 0]];\n const units: { unit: number; passed: number }[] = [];\n plans.forEach((p, s) => {\n const start = (steps[s] as Span).start;\n for (const [t, position] of p.sweep?.keys ?? []) needle.push([start + t, position]);\n for (const u of p.sweep?.passed ?? []) units.push({ unit: u.unit, passed: start + u.at });\n });\n needle.push([total, at]);\n\n return {\n total,\n last,\n steps,\n edges,\n carriers,\n labels,\n badges: steps.map((span, s) => ({ step: s, appears: span.start })),\n events,\n stills: steps.map((span) => span.end - MOTION.still),\n ...(whole ? { whole } : {}),\n ...(states ? { states } : {}),\n ...(time ? { needle, units, meters: meterTimes(diagram, plans, steps) } : {}),\n };\n}\n\n/**\n * 時間軸の図の物差しの欄の満ち具合 (#3165)。段で最後に書いた値へ向かって変わる。\n * 針が進む段では針の進みに比例して満ち、区切りの境から進む時はその境で 0 に戻ってから満ち直す。針が進まない段では値を書いた時に変わる\n */\nfunction meterTimes(diagram: DiagramModel, plans: Planned[], steps: Span[]): { field: string; keys: [number, number][] }[] {\n const length = diagram.time?.period?.length;\n return (diagram.strip?.meters ?? []).map(({ field }) => {\n const keys: [number, number][] = [[0, 0]];\n let value = 0;\n plans.forEach((p, s) => {\n const start = (steps[s] as Span).start;\n const sets = (diagram.steps[s]?.events ?? []).flatMap((event, e) => {\n const ratio = event.type === \"strip\" && event.field === field && event.value !== undefined ? ratioOf(event.value) : undefined;\n return ratio === undefined ? [] : [{ e, ratio }];\n });\n const set = sets[sets.length - 1];\n if (!set) return;\n const sweep = p.sweep?.keys ?? [];\n const first = sweep[0];\n const lastKey = sweep[sweep.length - 1];\n if (first && lastKey && lastKey[1] > first[1]) {\n const [p0, p1] = [first[1], lastKey[1]];\n let base = value;\n let from = p0;\n const boundary = length ? Math.floor((p1 - 1e-9) / length) * length : 0;\n if (boundary > 0 && boundary >= p0) {\n const tb = start + (sweep.find(([, position]) => position === boundary)?.[0] ?? first[0]);\n const prev = (keys[keys.length - 1] as [number, number])[0];\n keys.push([Math.max(prev, tb - MOTION.time.reset), value], [tb, 0]);\n base = 0;\n from = boundary;\n }\n for (const [t, position] of sweep) if (position >= from) keys.push([start + t, base + ((set.ratio - base) * (position - from)) / (p1 - from)]);\n } else {\n const at = start + (p.events.find((x) => x.event === set.e)?.at ?? 0);\n keys.push([at, value], [at + MOTION.fade, set.ratio]);\n }\n value = set.ratio;\n });\n return { field, keys };\n });\n}\n\nconst isEnd = (id: string): boolean => (STATE_ENDS as readonly string[]).includes(id);\n\n/**\n * 状態遷移図の状態が光る間。段の線を引き終えて状態へ着いた時から、その状態を出る線を引き始めるまで光り、\n * 出た少し後に済んだ印を出す。同じ状態へ戻る線では光ったまま、最後に着いた状態は終わりまで光る。\n * 物が状態を移るのは線を辿った時なので、運ぶ物の種類 (硬貨や、運ばない線) を問わず全ての線で数える。\n */\nfunction stateTimes(diagram: DiagramModel, edges: EdgeTime[], last: number): StateTime[] {\n const times = new Map<string, StateTime>();\n const of = (box: string): StateTime => {\n const found = times.get(box) ?? { box, lit: [] };\n times.set(box, found);\n return found;\n };\n let on: { box: string; since: number } | undefined;\n for (const edge of edges) {\n const event = diagram.steps[edge.step]?.events[edge.event];\n if (event?.type !== \"edge\" || event.from === event.to) continue;\n if (on) {\n const left = of(on.box);\n left.lit.push({ start: on.since, end: edge.start });\n if (on.box === event.from && left.done === undefined) left.done = edge.start + MOTION.done;\n on = undefined;\n }\n if (!isEnd(event.to)) on = { box: event.to, since: edge.drawn };\n }\n if (on) of(on.box).lit.push({ start: on.since, end: last });\n return [...times.values()];\n}\n","/**\n * 時刻の点の並びから CSS の keyframes を組む道具。見本帳の `engine.js` の `kf` / `vis` / `rise` / `pop` / `move` を写す。\n *\n * 動きは全て 1 周 `total` 秒の keyframes で、点の時刻は 1 周の中の割合 (%) に直す。\n * 性質ごとに独立して補間されるので、点ごとに変える性質だけを書く。\n */\nimport { EASE, LOOK, MOTION } from \"../look/values\";\n\nexport type Props = Record<string, string | number>;\nexport type Frame = [time: number, props: Props, ease?: string];\n\nconst r2 = (v: number): number => Math.round(v * 100) / 100;\n\nexport class Motion {\n readonly frames: string[] = [];\n private count = 0;\n\n constructor(\n private readonly prefix: string,\n readonly total: number,\n readonly last: number,\n ) {}\n\n private pct(t: number): number {\n return +((Math.min(Math.max(t, 0), this.total) / this.total) * 100).toFixed(3);\n }\n\n /** keyframes を 1 つ足し、その名前を付ける style の字を返す。 */\n kf(points: Frame[]): string {\n const name = `${this.prefix}-${this.count++}`;\n const at = new Map<number, { props: Props; ease?: string }>();\n for (const [t, props, ease] of [...points].sort((a, b) => a[0] - b[0])) {\n const p = this.pct(t);\n const cur = at.get(p) ?? { props: {} };\n Object.assign(cur.props, props);\n if (ease) cur.ease = ease;\n at.set(p, cur);\n }\n const body = [...at]\n .map(([p, { props, ease }]) => {\n const d = Object.entries(props).map(([k, v]) => `${k}:${v}`);\n if (ease) d.push(`animation-timing-function:${ease}`);\n return `${p}%{${d.join(\";\")}}`;\n })\n .join(\"\");\n this.frames.push(`@keyframes ${name}{${body}}`);\n return `animation-name:${name}`;\n }\n\n /** `a` で出て `b` から消える。`within` を立てると `b` までに消え終わる。 */\n vis(a: number, b = this.last, o: { f?: number; on?: Props; off?: Props; ein?: string; within?: boolean } = {}): string {\n const f = o.f ?? MOTION.fade;\n const on = o.on ?? {};\n const off = o.off ?? {};\n const out = o.within ? Math.max(a + f, b - f) : b;\n return this.kf([\n [0, { opacity: 0, ...off }],\n [a, { opacity: 0, ...off }, o.ein ?? EASE.out],\n [a + f, { opacity: 1, ...on }],\n [out, { opacity: 1, ...on }, EASE.inOut],\n [Math.min(out + f, this.total), { opacity: 0, ...off }],\n [this.total, { opacity: 0, ...off }],\n ]);\n }\n\n /** 少し下から浮いて出る。 */\n rise(a: number, b = this.last, within = false): string {\n return this.vis(a, b, { on: { transform: \"translateY(0)\" }, off: { transform: `translateY(${LOOK.rise}px)` }, within });\n }\n\n /** 小さな所から弾んで出る。 */\n pop(a: number, b = this.last): string {\n return this.vis(a, b, { f: MOTION.popFade, ein: EASE.pop, on: { transform: \"scale(1)\" }, off: { transform: `scale(${LOOK.popFrom})` } });\n }\n\n /** 初めから出ていて `b` で消える。 */\n until(b: number): string {\n const f = MOTION.untilFade;\n return this.kf([\n [0, { opacity: 1 }],\n [b, { opacity: 1 }, EASE.inOut],\n [b + f, { opacity: 0 }],\n [this.last, { opacity: 0 }],\n [this.total, { opacity: 1 }],\n ]);\n }\n\n /** 点を辿って動く。`[時刻, x, y, 大きさ, 次の点までの緩急]` の並び。 */\n move(points: [number, number, number, number?, string?][], extra: Frame[] = []): string {\n return this.kf(\n points.map(([t, x, y, s = 1, ease]): Frame => [t, { transform: `translate(${r2(x)}px,${r2(y)}px) scale(${s})` }, ease]).concat(extra),\n );\n }\n\n /** `a` から `b` まで見え、`fade` 秒で消える。 */\n blink(a: number, b: number, fade: number): Frame[] {\n return [\n [0, { opacity: 0 }],\n [a - 0.01, { opacity: 0 }],\n [a, { opacity: 1 }],\n [b, { opacity: 1 }],\n [b + fade, { opacity: 0 }],\n [this.total, { opacity: 0 }],\n ];\n }\n}\n","/**\n * 原本の JSON から図を描く本体。置き場所と時刻の表を作り、部品を重なりの順に並べて SVG にする。\n * git、lineup、state、time、tree、try の部品は登録簿から引くので、読んでいない種類は描けない (`kinds/registry.ts`、#3248)。\n * 時系列図と構成図の並べ方は、図の種類の置き場 (`kinds/<種類>/`) の一覧 `KIND_FOLDERS` から引く (#3345)。\n * 置き場へ移したブロックの部品は、ブロックの置き場の描き方 (`blocks/<名前>/draw.ts`) から引く。動きの名前は呼んだ順に番号が付くので、呼ぶ順は変えない。\n *\n * 動きは全て SVG の中の CSS の keyframes が回す。1 周の長さは `--T`、止める時刻は `--at`、\n * 止めるか流すかは `--play` の変数で外から変えられる (頁に置く `player.ts` がこれを使う)。\n * 色と字は値の表から CSS の変数として 1 度だけ書き、部品はその変数だけを読む。\n * 止め絵を選ぶと (`still`)、最後の段の止め絵に全ての段の線の名前と箱の中の処理を出し、流れ全体を 1 枚で読ませる (#3200)。\n */\nimport { action } from \"../blocks/act/draw\";\nimport { boxTextY, card, headCard } from \"../blocks/box/draw\";\nimport { carrier } from \"../blocks/carry/draw\";\nimport { cs } from \"../blocks/color/draw\";\nimport { edge } from \"../blocks/edge/draw\";\nimport { fadeBefore, label } from \"../blocks/edge-label/draw\";\nimport { band } from \"../blocks/group/draw\";\nimport { lifeline } from \"../blocks/lifeline/draw\";\nimport { linkTo } from \"../blocks/link/draw\";\nimport { subChanges } from \"../blocks/note/draw\";\nimport { ghostCard, path, side } from \"../blocks/side-path/draw\";\nimport { endMark } from \"../blocks/start-finish/draw\";\nimport { fieldChanges, strip } from \"../blocks/strip/draw\";\nimport { FIGURE_TEXT } from \"../figure-text\";\nimport type { GitLayout } from \"../kinds/git/layout\";\nimport type { LineupLayout } from \"../kinds/lineup/layout\";\nimport { textWidth } from \"../layout/measure\";\nimport {\n type Layout,\n type Rect,\n rewrapStrip,\n type SceneField,\n type SceneStrip,\n} from \"../layout/scene\";\nimport type { TimeLayout } from \"../kinds/time/layout\";\nimport type { TreeLayout } from \"../kinds/tree/layout\";\nimport type { TryLayout } from \"../kinds/try/layout\";\nimport { KIND_FOLDERS } from \"../kinds/index\";\nimport type { Kind } from \"../kinds/kind\";\nimport { kindParts } from \"../kinds/registry\";\nimport { FONTS } from \"../look/fonts\";\nimport {\n type ColorKey,\n type Colors,\n type Corner,\n EASE,\n FONT_VARS,\n isColorName,\n isColorValue,\n LOOK,\n MOTION,\n type Palette,\n paletteVars,\n resolvePalette,\n type Theme,\n TYPE,\n} from \"../look/values\";\nimport { readDiagram } from \"../version\";\nimport { toModel } from \"../model\";\nimport type { DiagramModel, ViewMode } from \"../schema\";\nimport { buildTimeline, type Span, type Timeline } from \"../timeline\";\nimport { DEFAULT_LANG, type NotationLang } from \"../words\";\nimport { badge, cssFont as font, cssMix as mix, type Ctx, doneMark, esc, sansOf } from \"./parts\";\nimport { frameShape, partRadius } from \"./corner\";\nimport { findOverlaps, type Ink, type Overlap, type Trace } from \"./ink\";\nimport { Motion } from \"./motion\";\n\n/** 置き場を持つ図の種類を、図の種類の名前で引く表 */\nconst FOLDERS: Readonly<Partial<Record<string, Kind>>> = KIND_FOLDERS;\n\nconst isGitLayout = (layout: Layout): layout is GitLayout => layout.kind === \"git\";\nconst isLineupLayout = (layout: Layout): layout is LineupLayout => layout.kind === \"lineup\";\nconst isTimeLayout = (layout: Layout): layout is TimeLayout => layout.kind === \"time\";\nconst isTreeLayout = (layout: Layout): layout is TreeLayout => layout.kind === \"tree\";\nconst isTryLayout = (layout: Layout): layout is TryLayout => layout.kind === \"try\";\n\nexport interface RenderOptions {\n /** 色味の名前。書かないか知らない名前なら紙と墨 */\n palette?: string;\n /**\n * `palette` の色味に重ねる色の値 (#3198)。鍵は色味が持つ色の変数の名前 (`bg`、`ink`、`c-green` など) で、値は描く `theme` の色になる。\n * 渡さない色は色味の値のまま残る。色味に無い名前と、色の値として読めない値は、名前を挙げて描かずに断る\n */\n colors?: Colors;\n theme?: Theme;\n /** 描く部品が出す字 (断りの文、全体図の札、読み上げの名前) の言葉。書かなければ英語 (#3001、#3338) */\n lang?: NotationLang;\n /** 描く枠の幅。列の図は、箱を横に並べると箱の名前が読めない幅で縦に組む (#3351)。書かなければ横に並べる */\n width?: number;\n /**\n * 最後の段の止め絵に、全ての段の線の名前と箱の中の処理を最後の段と同じ濃さで出す (#3200)。途中の段の止め絵は今の段の名前だけを出す。\n * 箱の下の 1 行に出す処理は、その箱で最後に起きた処理か書き換えの字を出す。違う段の名前が重なっても置き直さず、最後の段の重なり (`overlaps`) に出す\n */\n still?: boolean;\n}\n\nexport interface Rendered {\n svg: string;\n palette: string;\n theme: Theme;\n /** 書き手が原本で決めた見せ方 */\n view?: ViewMode;\n fonts: { sans: string; mono: string };\n layout: Layout;\n timeline: Timeline;\n /** 描いた図の形。版1と同じ欄と並びで、図の id はこの形の字から作る (#3346) */\n diagram: DiagramModel;\n /** 段ごとの止め絵で、同時に見えている字どうしの重なりと、線が札を持たない字を横切る所 (#3175)。重なりが無ければ空 */\n overlaps: Overlap[];\n}\n\nconst S = LOOK.stroke;\nconst X = LOOK.mix;\n/** 状態遷移図で段が終わった線と番号の灰 (#3171) */\nconst PAST = `color-mix(in srgb,var(--mute) ${X.past}%,var(--bg))`;\n\n/** 部品の見た目。どの値も値の表から読む。 */\nconst PART_CSS = [\n \".dg{display:block;width:100%;height:auto;overflow:visible}\",\n \".dg .dg-a{animation-duration:var(--T);animation-timing-function:linear;animation-iteration-count:infinite;animation-fill-mode:both;animation-delay:calc(var(--at,0) * -1s);animation-play-state:var(--play,running)}\",\n \".dg .dg-popc{transform-box:fill-box;transform-origin:center}\",\n \".dg-bg{fill:var(--bg)}\",\n \".dg-band{fill:color-mix(in srgb,var(--c) var(--tint),var(--bg));stroke:color-mix(in srgb,var(--c) var(--edge),transparent)}\",\n `.dg-bi{fill:${mix(X.regionIcon)};stroke:${mix(X.regionIconEdge, \"transparent\")}}`,\n `.dg-bz{${font(TYPE.regionName)};fill:var(--ct)}`,\n `.dg-bx{${font(TYPE.regionNote)};fill:var(--mute)}`,\n \".dg-st{fill:var(--surf);stroke:var(--hair)}\",\n `.dg-halo{fill:none;stroke:var(--c);stroke-width:${S.halo};stroke-opacity:.16}`,\n `.dg-on{fill:none;stroke:var(--c);stroke-width:${S.on}}`,\n `.dg-ic{fill:${mix(X.icon)}}`,\n `.dg-slot{fill:none;stroke:${mix(X.slot, \"transparent\")};stroke-width:${S.slot};stroke-dasharray:3 3}`,\n `.dg-gl{fill:none;stroke:var(--c);stroke-width:${S.glyph};stroke-linecap:round;stroke-linejoin:round}`,\n `.dg-sn{${font(TYPE.boxName)};fill:var(--ink)}`,\n `.dg-ss{${font(TYPE.boxSub)};fill:var(--mute)}`,\n `.dg-ss-ok{${font(TYPE.boxSubStrong)};fill:var(--ct)}`,\n `.dg-ss-act{${font(TYPE.boxSubStrong)};fill:var(--ink)}`,\n `.dg-ll{stroke:var(--line);stroke-width:${S.lifeline};stroke-dasharray:3 4}`,\n `.dg-e{fill:none;stroke:var(--line);stroke-width:${S.edge};stroke-linecap:round;stroke-dasharray:0 ${LOOK.edge.ghostDash}}`,\n `.dg-eh{fill:none;stroke:var(--line);stroke-width:${S.arrow};stroke-linecap:round;stroke-linejoin:round}`,\n `.dg-e-on{fill:none;stroke:var(--c);stroke-width:${S.edgeOn};stroke-linecap:round;stroke-dasharray:1 2}`,\n `.dg-eh-on{fill:none;stroke:var(--c);stroke-width:${S.edgeOn};stroke-linecap:round;stroke-linejoin:round}`,\n `.dg-flow{fill:none;stroke:var(--surf);stroke-width:${S.flow};stroke-linecap:round;stroke-dasharray:1.5 ${LOOK.edge.flowDash}}`,\n `.dg-e-past{fill:none;stroke:${PAST};stroke-width:${S.edge};stroke-linecap:round}`,\n `.dg-eh-past{fill:none;stroke:${PAST};stroke-width:${S.arrow};stroke-linecap:round;stroke-linejoin:round}`,\n \".dg-bd{cursor:pointer}\",\n \".dg-bdf{fill:var(--c)}\",\n `.dg-bdft{${font(TYPE.badge)};fill:var(--on-c)}`,\n `.dg-bdr{fill:none;stroke:var(--c);stroke-width:${S.badgeRing};pointer-events:none}`,\n `.dg-bdp{fill:${mix(X.badgePast)};stroke:${mix(X.badgePastEdge, \"transparent\")};stroke-width:${S.hair}}`,\n `.dg-bdpt{${font(TYPE.badge)};fill:var(--ct)}`,\n `.dg-bdp-g{fill:var(--surf);stroke:${PAST};stroke-width:${S.hair}}`,\n `.dg-bdpt-g{${font(TYPE.badge)};fill:var(--mute)}`,\n `.dg-cap rect,.dg-act rect{fill:${mix(X.cap)};stroke:${mix(X.capEdge, \"transparent\")}}`,\n `.dg-cap text{${font(TYPE.label)};fill:var(--ct)}`,\n `.dg-capj text{${font(TYPE.labelJa)}}`,\n `.dg-cap-past text{${font(TYPE.label)};fill:var(--mute);fill-opacity:${LOOK.state.pastLabel}}`,\n `.dg-cap-pastj text{${font(TYPE.labelJa)}}`,\n `.dg-act text{${font(TYPE.action)};fill:var(--ct)}`,\n \".dg-car{fill:var(--carry,var(--ink))}\",\n `.dg-car-t{${font(TYPE.carrier)};fill:var(--bg)}`,\n `.dg-car-tj{${font(TYPE.carrierJa)}}`,\n `.dg-env{fill:var(--carry,var(--ink));stroke:var(--surf);stroke-width:${S.envelope}}`,\n `.dg-env-in{fill:none;stroke:var(--surf);stroke-width:${S.flow};stroke-linejoin:round;stroke-linecap:round}`,\n \".dg-coin{fill:var(--coin);stroke:var(--surf);stroke-width:1.2}\",\n \".dg-coin-in{fill:none;stroke:var(--coinin);stroke-width:1.1}\",\n \".dg-strip{fill:var(--surf);stroke:var(--hair)}\",\n `.dg-sep{stroke:var(--hair);stroke-width:${S.hair}}`,\n `.dg-sh{${font(TYPE.stripTitle)};fill:var(--ink)}`,\n `.dg-fl{${font(TYPE.fieldName)};fill:var(--mute)}`,\n `.dg-fv{${font(TYPE.fieldValue)};fill:var(--ink)}`,\n `.dg-fvj{${font(TYPE.fieldValueJa)};fill:var(--ink)}`,\n \".dg-fv-c{fill:var(--ct)}\",\n \".dg-fl-now{fill:var(--c)}\",\n `.dg-tr-ring{fill:none;stroke:var(--line);stroke-width:${S.trail}}`,\n \".dg-tr-fill{fill:var(--c)}\",\n \".dg-tg rect{fill:var(--c)}\",\n `.dg-tg text{${font(TYPE.tag)};fill:var(--on-c)}`,\n `.dg-side{fill:color-mix(in srgb,var(--c) ${X.side}%,var(--bg));stroke:${mix(X.sideEdge, \"transparent\")};stroke-dasharray:4 4}`,\n `.dg-side-t{${font(TYPE.regionName)};fill:var(--ct)}`,\n `.dg-side-n{${font(TYPE.regionNote)};fill:var(--mute)}`,\n `.dg-ghost{fill:var(--surf);stroke:${mix(X.ghostEdge, \"transparent\")};stroke-dasharray:4 3}`,\n `.dg-path{fill:none;stroke:${mix(X.path, \"transparent\")};stroke-width:${S.path};stroke-linecap:round;stroke-dasharray:0 ${LOOK.edge.ghostDash}}`,\n `.dg-path-h{fill:none;stroke:${mix(X.path, \"transparent\")};stroke-width:${S.arrow};stroke-linecap:round;stroke-linejoin:round}`,\n `.dg-path-t{${font(TYPE.label)};fill:var(--ct)}`,\n `.dg-path-tj{${font(TYPE.labelJa)}}`,\n \".dg-start{fill:var(--ink)}\",\n `.dg-end{fill:var(--bg);stroke:var(--ink);stroke-width:${S.end}}`,\n \".dg-end-in{fill:var(--ink)}\",\n `.dg-end-x{fill:var(--bg);stroke:${mix(X.path, \"transparent\")};stroke-width:${S.arrow};stroke-dasharray:2 2.5}`,\n `.dg-end-xi{fill:${mix(X.path, \"transparent\")}}`,\n `.dg-mark{${font(TYPE.regionNote)};fill:var(--mute)}`,\n `.dg-done{fill:var(--ink);stroke:var(--surf);stroke-width:${S.done}}`,\n `.dg-done-ck{fill:none;stroke:var(--surf);stroke-width:${S.glyph};stroke-linecap:round;stroke-linejoin:round}`,\n `.dg-git-l{fill:none;stroke:var(--c);stroke-width:${S.git};stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1 2}`,\n `.dg-git-cp{fill:none;stroke:var(--c);stroke-width:${S.gitOrphan};stroke-linecap:round;stroke-dasharray:3 3;stroke-opacity:.7}`,\n `.dg-git-c{fill:var(--surf);stroke:var(--c);stroke-width:${S.git}}`,\n `.dg-git-id{${font(TYPE.gitId)};fill:var(--ct)}`,\n `.dg-git-h{${font(TYPE.gitHash)};fill:var(--mute)}`,\n `.dg-git-n{${font(TYPE.gitNote)};fill:var(--ink2)}`,\n `.dg-git-old{fill:var(--surf);stroke:var(--c);stroke-width:${S.gitOrphan};stroke-dasharray:3 3;stroke-opacity:.6}`,\n `.dg-git-oldl{${font(TYPE.gitId)};fill:var(--ct);opacity:.55}`,\n // 木の図 (#3233)。木の線は線の灰で、運ぶ物が通った跡は運ぶ物の色で引く\n `.dg-tree-l{fill:none;stroke:var(--line);stroke-width:${S.tree};stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1 2}`,\n `.dg-tree-tr{fill:none;stroke:var(--c);stroke-width:${S.treeTrail};stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1 2}`,\n `.dg-tree-h{fill:none;stroke:var(--c);stroke-width:${S.treeTrail};stroke-linecap:round;stroke-linejoin:round}`,\n `.dg-tree-con{fill:none;stroke:var(--line);stroke-width:${S.treeCon};stroke-linecap:round;stroke-dasharray:2 3.5}`,\n `.dg-tree-card{fill:var(--surf);stroke:var(--hair);stroke-width:${S.hair}}`,\n `.dg-tree-cg{fill:none;stroke:var(--mute);stroke-width:${S.glyph};stroke-linecap:round;stroke-linejoin:round}`,\n `.dg-tree-ct{${font(TYPE.treeCard)};fill:var(--ink)}`,\n `.dg-tree-hash{${font(TYPE.treeHash)};fill:var(--ink)}`,\n `.dg-tree-name{${font(TYPE.treeName)};fill:var(--mute)}`,\n `.dg-tree-one{${font(TYPE.boxName)};fill:var(--ink)}`,\n `.dg-tree-rh{${font(TYPE.rootHash)};fill:var(--ink)}`,\n `.dg-tree-rn{${font(TYPE.rootName)};fill:var(--mute)}`,\n // 時間軸の図 (#3165)。和文を含む字は、末尾に j を付けた class で同じ大きさと太さの和文の字にする\n `.dg-tm-ep{fill:color-mix(in srgb,var(--ink) ${X.timeShade}%,transparent)}`,\n `.dg-tm-sep{stroke:var(--hair);stroke-width:${S.hair};stroke-dasharray:2 4}`,\n `.dg-tm-hd{${font(TYPE.timeHead)};fill:var(--ink)}`,\n `.dg-tm-hdj{${font(sansOf(TYPE.timeHead))}}`,\n `.dg-tm-slot{fill:none;stroke:var(--line);stroke-width:${S.timeSlot};opacity:.55}`,\n \".dg-tm-m{fill:var(--c)}\",\n \".dg-tm-x{fill:var(--c-slate)}\",\n `.dg-tm-fr{fill:none;stroke:var(--c-blue);stroke-width:${S.timeFrame};stroke-dasharray:3 2}`,\n `.dg-tm-gd{fill:none;stroke:color-mix(in srgb,var(--c-blue) ${X.timeGuide}%,transparent);stroke-width:${S.hair};stroke-dasharray:2 3}`,\n `.dg-tm-ax{fill:none;stroke:var(--line);stroke-width:${S.timeAxis}}`,\n `.dg-tm-tk{${font(TYPE.timeTick)};fill:var(--mute)}`,\n `.dg-tm-tkj{${font(sansOf(TYPE.timeTick))}}`,\n `.dg-tm-en{${font(TYPE.timePeriod)};fill:var(--ink2)}`,\n `.dg-tm-er{${font(TYPE.timeRange)};fill:var(--mute)}`,\n `.dg-tm-erj{${font(sansOf(TYPE.timeRange))}}`,\n `.dg-tm-rn{${font(TYPE.timeRow)};fill:var(--ink2)}`,\n `.dg-tm-br{fill:none;stroke:var(--c);stroke-width:${S.timeSpan};stroke-linecap:round;stroke-linejoin:round}`,\n `.dg-tm-bt{${font(TYPE.spanText)};fill:var(--ct)}`,\n `.dg-tm-bx{fill:color-mix(in srgb,var(--c) ${X.timeSpan}%,transparent);stroke:var(--c);stroke-width:${S.timeSpan};stroke-dasharray:4 3}`,\n `.dg-tm-con{fill:none;stroke:var(--line);stroke-width:${S.timeDrop};stroke-linecap:round;stroke-dasharray:0 3.5}`,\n \".dg-tm-pg{fill:var(--surf);stroke:var(--line);stroke-dasharray:2 2.5}\",\n `.dg-tm-pgl{fill:none;stroke:var(--mute);stroke-width:${S.timeFlag};stroke-linecap:round;stroke-linejoin:round}`,\n `.dg-tm-pc{fill:var(--surf);stroke:var(--c);stroke-width:${S.timePoint}}`,\n `.dg-tm-pcg{fill:none;stroke:var(--c);stroke-width:${S.timeFlag};stroke-linecap:round;stroke-linejoin:round}`,\n `.dg-tm-pn{${font(TYPE.pointName)};fill:var(--ink)}`,\n `.dg-tm-pnj{${font(sansOf(TYPE.pointName))}}`,\n \".dg-tm-pn-g{fill:var(--mute)}\",\n `.dg-tm-ps{${font(TYPE.pointState)};fill:var(--ct)}`,\n `.dg-tm-ln{fill:none;stroke:var(--c);stroke-width:${S.edgeOn};stroke-linecap:round;stroke-dasharray:1 2}`,\n `.dg-tm-nd{stroke:var(--ink);stroke-width:${S.timeNeedle};opacity:.55}`,\n \".dg-tm-nh{fill:var(--ink)}\",\n \".dg-tm-ph{fill:none;stroke:var(--line);stroke-dasharray:3 3}\",\n `.dg-tm-ex{fill:color-mix(in srgb,var(--c-slate) ${X.timeEmpty}%,var(--surf));stroke:var(--c-slate);stroke-width:${S.timeFrame};stroke-dasharray:3 3}`,\n `.dg-tm-ext{${font(TYPE.emptyText)};fill:var(--t-slate)}`,\n \".dg-tm-mt{fill:var(--hair)}\",\n \".dg-tm-mf{fill:var(--c);transform-box:fill-box;transform-origin:0 50%}\",\n `.dg-tm-mk{stroke:var(--ink2);stroke-width:${S.timeMeter}}`,\n `.dg-tm-ml{${font(TYPE.meterLine)};fill:var(--ink2)}`,\n \".dg-vp-bg{fill:var(--bg)}\",\n \".dg-vp-frame{fill:none;stroke:var(--hair)}\",\n \".dg-hd-bg{fill:var(--bg)}\",\n \".dg-mm-bg{fill:var(--surf);stroke:var(--hair)}\",\n `.dg-mm-t{${font(TYPE.miniTitle)};fill:var(--mute)}`,\n \".dg-mm-world{fill:var(--sunk);stroke:var(--hair)}\",\n `.dg-mm-band{fill:${mix(X.miniBand)};stroke:${mix(X.miniBandEdge, \"transparent\")};stroke-width:.6}`,\n `.dg-mm-card{fill:${mix(X.mini)}}`,\n `.dg-mm-vp{fill:color-mix(in srgb,var(--ink) ${X.view}%,transparent);stroke:var(--ink);stroke-width:${S.badgeRing};vector-effect:non-scaling-stroke}`,\n].join(\"\");\n\n/** 同じ原本と同じ見た目からは同じ名前になるよう、中身から短い名前を作る (keyframes の名前が頁の中で混ざらないため)。 */\nfunction nameOf(text: string): string {\n let h = 0x811c9dc5;\n for (let i = 0; i < text.length; i++) {\n h ^= text.charCodeAt(i);\n h = Math.imul(h, 0x01000193);\n }\n return (h >>> 0).toString(36);\n}\n\n/** 各箱が動く段。線の両端、処理、字の書き換えの箱。 */\nfunction involved(diagram: DiagramModel): Map<string, number[]> {\n const on = new Map<string, Set<number>>();\n const add = (id: string, s: number): void => {\n on.set(id, (on.get(id) ?? new Set()).add(s));\n };\n diagram.steps.forEach((step, s) => {\n for (const event of step.events) {\n if (event.type === \"edge\") {\n add(event.from, s);\n add(event.to, s);\n } else if (event.type === \"action\" || event.type === \"swap\") add(event.box, s);\n }\n });\n return new Map([...on].map(([id, steps]) => [id, [...steps].sort((a, b) => a - b)]));\n}\n\nexport interface FollowFrame {\n /** 枠の幅 (px)。寄って追う窓はこの幅で、字を原寸で見せる */\n width: number;\n /** 枠の中で見える高さ (px)。渡すと、窓と全体図をこの高さに収め (#3047)、窓をこの高さまで伸ばす (#3053)。枠の高さが図で伸びる置き場では渡さない */\n height?: number;\n /** 隅の全体図の札の言葉。渡し忘れを型の検査で止めるため、省けない欄にする */\n lang: NotationLang;\n}\n\n/** 図を描く。`follow` を渡すと、寄って追う窓と隅の全体図で描く。`ink` を渡すと、描いた字の四角と見えている間をそこへ記録する (#3175)。 */\nexport function drawSvg(\n diagram: DiagramModel,\n layout: Layout,\n timeline: Timeline,\n palette: Palette,\n theme: Theme,\n follow?: FollowFrame,\n ink: Ink[] = [],\n traces: Trace[] = [],\n): string {\n // 札の言葉で全体図の地の幅が変わりうるので、同じ頁に置いた別の言葉の図と名前を分ける。\n // 色は色味の名前でなく色の値から名前を作り、色の値を重ねた図 (#3198) と同じ色味の名前の図の変数の規則を分ける\n const vars = paletteVars(palette, theme);\n const id = nameOf(\n `${JSON.stringify(diagram)}|${vars}|${follow ? `${follow.width}|${follow.lang}` : \"\"}`,\n );\n const m = new Motion(`dg${id}`, timeline.total, timeline.last);\n const ctx: Ctx = {\n m,\n t: timeline,\n id,\n sh: `filter=\"url(#dg-sh-${id})\"`,\n end: (timeline.steps[timeline.steps.length - 1] as Span).end,\n ink,\n traces,\n boxText: boxTextY(layout.boxes),\n corner: palette.corner,\n };\n const on = involved(diagram);\n // 時系列図の処理は生存線の上の札に出し、他の図の種類は箱の下の字に出す\n const subs = subChanges(diagram, timeline, layout.kind !== \"sequence\");\n\n const L = {\n band: [] as string[],\n base: [] as string[],\n lit: [] as string[],\n node: [] as string[],\n badge: [] as string[],\n top: [] as string[],\n };\n for (const region of layout.regions) L.band.push(band(region, ink, ctx.corner));\n const ghostColor = layout.boxes.find((b) => b.ghost)?.color ?? \"slate\";\n if (layout.side) L.band.push(side(layout.side, ghostColor, ink, ctx.corner));\n // 脇道へ入る道は脇道の状態の色、それ以外の道は送る側の色で描く\n const boxColor = (id: string, ghost?: boolean): ColorKey | undefined =>\n layout.boxes.find((b) => b.id === id && (ghost === undefined || b.ghost === ghost))?.color;\n for (const p of layout.paths)\n L.base.push(path(p, boxColor(p.to, true) ?? boxColor(p.from) ?? ghostColor, ink, traces));\n for (const e of layout.ends) L.node.push(endMark(e, ghostColor, ink));\n // 状態遷移図は、段で変わった値を今の状態の色で描き、帯の通った状態の点を着いた時刻に塗る (#3171)\n const isState = layout.kind === \"state\";\n const arrivals = new Map(\n (timeline.states ?? []).flatMap((s) =>\n s.lit[0] ? [[s.box, s.lit[0].start] as [string, number]] : [],\n ),\n );\n // 時間軸の図の物差しの欄は、満ち具合の動きで棒を伸ばす (#3165)\n const meters = new Map((timeline.meters ?? []).map((meter) => [meter.field, meter.keys]));\n const gauge = (field: SceneField): string | undefined =>\n field.meter\n ? kindParts(\"time\").meterField(\n { ...field, meter: field.meter },\n meters.get(field.name) ?? [[0, 0]],\n ctx,\n )\n : undefined;\n const drawStrip = (s: SceneStrip): string =>\n strip(s, fieldChanges(diagram, timeline, layout), ctx, isState, arrivals, gauge);\n // 寄って追う図の表は窓の下に置くので、窓の中身には描かない (#3270)\n if (layout.strip && !follow) L.band.push(drawStrip(layout.strip));\n for (const line of layout.lifelines) L.base.push(lifeline(line.x, line.y1, line.y2));\n // 枝分かれの図の線と commit と札は、枝分かれの図を描く部品が描く (#3164)\n if (isGitLayout(layout)) {\n const git = kindParts(\"git\").drawGit(layout, diagram, timeline, ctx);\n L.base.push(git.links);\n L.lit.push(git.lines);\n L.node.push(git.commits);\n L.top.push(git.tags);\n }\n // 木の図の木の線と通った跡と木の箱と札は、木の図を描く部品が描く (#3233)。木の線を走る線は通った跡が見せるので、ほかの線と同じ線で描かない\n const treeLayout = isTreeLayout(layout) ? layout : undefined;\n const tree = treeLayout\n ? kindParts(\"tree\").drawTree(treeLayout, diagram, timeline, ctx)\n : undefined;\n if (tree) {\n L.base.push(tree.links);\n L.lit.push(tree.trails);\n L.node.push(tree.nodes);\n }\n const runs = new Set((treeLayout?.runs ?? []).map((r) => `${r.step}/${r.event}`));\n // 列の図の列とチップと封と札は、列の図を描く部品が描く (#3239)。\n // 列の図の見た目の規則も列の図を描く部品が持ち、列の図の SVG にだけ書く。ほかの図の SVG と最初に読む script に入れない (#3351)\n const lineupLayout = isLineupLayout(layout) ? layout : undefined;\n const lineup = lineupLayout\n ? kindParts(\"lineup\").drawLineup(lineupLayout, diagram, timeline, ctx, subs)\n : undefined;\n if (lineup) {\n // 寄って追う窓は見出しの文 (図の題、段の題、説明) を描かない。図の幅で組んだ文は窓で切れ、段の題と説明は部品の帯が出すため (#3365)\n if (!follow) L.base.push(lineup.heading);\n L.base.push(lineup.lanes);\n L.node.push(lineup.chips);\n }\n // 試す図の網と待ち行列と機械の列とチップは、試す図を描く部品が描く (#3337)。見た目の規則も試す図の SVG にだけ書く\n const tryDrawn = isTryLayout(layout)\n ? kindParts(\"try\").drawTry(layout, diagram, timeline, ctx)\n : undefined;\n if (tryDrawn) {\n L.base.push(tryDrawn.base);\n L.lit.push(tryDrawn.lit);\n L.node.push(tryDrawn.node);\n L.top.push(tryDrawn.top);\n }\n // 時間軸の図の目盛りと印と拡大の帯の箱と節目は、時間軸の図を描く部品が描く (#3165)。拡大の帯の線は他の図と同じ線で描く\n const timeLayout = isTimeLayout(layout) ? layout : undefined;\n if (timeLayout) {\n const drawn = kindParts(\"time\").drawTime(timeLayout, diagram, timeline, ctx, subs);\n L.base.push(drawn.base);\n L.lit.push(drawn.lit);\n L.node.push(drawn.node);\n L.top.push(drawn.top);\n }\n const wired = new Set((timeLayout?.wires ?? []).map((w) => `${w.step}/${w.event}`));\n for (const e of layout.edges) {\n const time = timeline.edges.find((t) => t.step === e.step && t.event === e.event);\n if (\n !time ||\n (timeLayout && !wired.has(`${e.step}/${e.event}`)) ||\n runs.has(`${e.step}/${e.event}`)\n )\n continue;\n // 木の図の箱は段ごとに現れるので、木の線を走らない線の点線は、両端の木の箱が現れてから出す (#3240)\n const since = Math.max(tree?.appear.get(e.from) ?? 0, tree?.appear.get(e.to) ?? 0);\n const drawn = edge(e, time, ctx, isState, since);\n L.base.push(drawn.base);\n L.lit.push(drawn.lit);\n }\n const states = new Map((timeline.states ?? []).map((s) => [s.box, s]));\n // 飛び先を持つ箱は、箱の札をその飛び先への link で包む (#3199)。時間軸の図の箱は時間軸の図を描く部品が包む\n const links = new Map(\n diagram.boxes.flatMap((b) =>\n b.link === undefined ? [] : [[b.id, b.link] as [string, string]],\n ),\n );\n const linked = (id: string, markup: string): string => linkTo(links.get(id), markup);\n for (const box of timeLayout || lineupLayout ? [] : layout.boxes) {\n if (box.ghost) {\n L.node.push(linked(box.id, ghostCard(box, ink, ctx.corner)));\n continue;\n }\n const state = states.get(box.id);\n L.node.push(\n linked(\n box.id,\n card(\n box,\n ctx,\n on.get(box.id) ?? [],\n subs.get(box.id) ?? [],\n isState ? (state?.lit ?? []) : undefined,\n ),\n ),\n );\n if (state?.done !== undefined) L.node.push(doneMark(box, state.done, ctx));\n }\n for (const b of layout.badges)\n if (!(follow && onStrip(layout, b))) L.badge.push(badge(b, ctx, isState));\n for (const l of layout.labels) {\n const time = timeline.labels.find((t) => t.step === l.step && t.event === l.event);\n if (time) L.top.push(label(l, fadeBefore(l, time, timeline.steps), ctx));\n }\n // 止め絵を選んだ図は、全ての段の名前を出す間にも処理の札を出す。その間に見えている札は繰り返す前まで延ばす (#3200)\n const { whole } = timeline;\n for (const a of layout.actions) {\n const time = timeline.events.find((t) => t.step === a.step && t.event === a.event);\n if (!time) continue;\n const until = (timeline.steps[a.step] as Span).end;\n L.top.push(\n whole && until > whole.start\n ? action(a, time.at, whole.end, ctx)\n : action(a, time.at, until, ctx, whole),\n );\n }\n // 木の図の運ぶ物は着いた所で消える。通った跡が行き先を残し、兄弟の箱から同じ親へ着いた運ぶ物が重ならないため\n for (const time of timeline.carriers) {\n const e = layout.edges.find((x) => x.step === time.step && x.event === time.event);\n if (e)\n L.top.push(\n carrier(\n e,\n treeLayout ? { ...time, start: time.depart, end: time.arrive + MOTION.fade } : time,\n ctx,\n ),\n );\n }\n const content = Object.values(L)\n .map((parts) => parts.join(\"\"))\n .join(\"\");\n\n const { near, far, nearY, farY } = LOOK.shadow;\n const shadow = `<filter id=\"dg-sh-${id}\" x=\"-20%\" y=\"-30%\" width=\"140%\" height=\"180%\"><feDropShadow dx=\"0\" dy=\"${nearY}\" stdDeviation=\"${near}\" style=\"flood-color:var(--sh);flood-opacity:var(--shA)\"/><feDropShadow dx=\"0\" dy=\"${farY}\" stdDeviation=\"${far}\" style=\"flood-color:var(--sh);flood-opacity:var(--shB)\"/></filter>`;\n // 寄って追う時系列図は、頭の箱を窓の上端に貼る頭の列にも描く (#3118)。頭の列の箱はアイコンを外した 2 段 (#3120)。止めて見せる図では描かない\n const heads =\n follow && layout.kind === \"sequence\"\n ? layout.boxes\n .map((box) =>\n linked(box.id, headCard(box, ctx, on.get(box.id) ?? [], subs.get(box.id) ?? [])),\n )\n .join(\"\")\n : \"\";\n // 表の値だけが変わる段の番号の丸は表の隅に在るので、表と一緒に窓の下へ移す (#3270)。\n // 窓の下の表は図の左端から始まるので、丸の半径だけ内へ寄せる。寄せないと丸の左が図の端で切れる\n const drawTable = (s: SceneStrip, from: SceneStrip): string =>\n drawStrip(s) +\n layout.badges\n .filter((b) => onStrip(layout, b))\n .map((b) =>\n badge({ ...b, x: b.x - from.x + s.x + LOOK.badge.r, y: b.y - from.y + s.y }, ctx, isState),\n )\n .join(\"\");\n const bg = frameShape(\n ctx.corner,\n ' class=\"dg-bg\"',\n { x: 0, y: 0, w: layout.width, h: layout.height },\n `<rect class=\"dg-bg\" width=\"${layout.width}\" height=\"${layout.height}\" rx=\"${LOOK.region.radius}\"/>`,\n );\n const view = follow\n ? followView(layout, timeline, diagram, m, id, content, follow, heads, drawTable, ctx.corner)\n : { body: `${bg}${content}`, w: layout.width, h: layout.height };\n const css = `.dg-${id}{${FONT_VARS};--T:${timeline.total}s;${vars}}${PART_CSS}${lineup?.css ?? \"\"}${tryDrawn?.css ?? \"\"}${m.frames.join(\"\")}`;\n return (\n `<svg xmlns=\"http://www.w3.org/2000/svg\" class=\"dg dg-${id}\" viewBox=\"0 0 ${Math.ceil(view.w)} ${Math.ceil(view.h)}\" width=\"${Math.ceil(view.w)}\" height=\"${Math.ceil(view.h)}\" role=\"img\" aria-label=\"${esc(diagram.title)}\" data-dragon=\"figure\" data-view=\"${follow ? \"follow\" : \"fixed\"}\"${isLineupLayout(layout) ? ` data-lineup-arrangement=\"${layout.arrangement}\"` : \"\"}>` +\n `<style>${css}</style><defs>${shadow}</defs>${view.body}</svg>`\n );\n}\n\n/** 四角を全部囲む四角。 */\nfunction union(rects: Rect[]): Rect {\n const x = Math.min(...rects.map((r) => r.x));\n const y = Math.min(...rects.map((r) => r.y));\n return {\n x,\n y,\n w: Math.max(...rects.map((r) => r.x + r.w)) - x,\n h: Math.max(...rects.map((r) => r.y + r.h)) - y,\n };\n}\n\n/** 番号の丸が値の表の上に在るか。表の値だけが変わる段の丸は表の隅に置かれる */\nfunction onStrip(layout: Layout, badge: { y: number }): boolean {\n return layout.strip !== undefined && badge.y >= layout.strip.y;\n}\n\n/** 列の図の見出しの文 (図の題と、段ごとの題と説明) の下の端 */\nfunction lineupHeadingBottom(layout: LineupLayout): number {\n const texts = [layout.heading, ...layout.headlines.flatMap((h) => (h.say ? [h.title, h.say] : [h.title]))];\n return Math.max(...texts.map((t) => t.y + t.h));\n}\n\n/** 段で動く物が占める所。 */\nfunction focusOf(layout: Layout, diagram: DiagramModel, step: number): Rect | undefined {\n const rects = focusParts(layout, diagram, step);\n return rects.length === 0 ? undefined : union(rects);\n}\n\n/**\n * 番号の丸が窓から外れる段で、窓に入れる所 (#3046)。\n * 丸とその周りを起点に、丸に近い動く物から順に、窓 (`vw` × `vh`) に収まる間だけ囲む。収まらない物は飛ばして次を見る\n */\nfunction badgeFocus(badge: { x: number; y: number }, parts: Rect[], vw: number, vh: number): Rect {\n const room = LOOK.badge.r + LOOK.follow.badgeRoom;\n const { x: bx, y: by } = badge;\n const away = (p: Rect): number =>\n Math.hypot(Math.max(0, p.x - bx, bx - p.x - p.w), Math.max(0, p.y - by, by - p.y - p.h));\n let held: Rect = { x: bx - room, y: by - room, w: room * 2, h: room * 2 };\n for (const p of [...parts].sort((a, b) => away(a) - away(b))) {\n const next = union([held, p]);\n if (next.w <= vw && next.h <= vh) held = next;\n }\n return held;\n}\n\n/**\n * 動く物を全部囲んだ所の真ん中 (#3337)。囲んだ所が窓 (`vw` × `vh`) より大きい時は、最初の物が窓から外れない所までに留める。\n * 動く物が無ければ `undefined`\n */\nfunction anchoredCenter(parts: Rect[], vw: number, vh: number): [number, number] | undefined {\n const first = parts[0];\n if (!first) return undefined;\n const all = union(parts);\n // 窓の幅 `size` で `[lo, lo + len]` を外さない真ん中の範囲に、全部を囲んだ所の真ん中 `c` を収める。窓より大きい物は真ん中に置く\n const keep = (c: number, lo: number, len: number, size: number): number =>\n len > size ? lo + len / 2 : Math.min(lo + size / 2, Math.max(lo + len - size / 2, c));\n return [\n keep(all.x + all.w / 2, first.x, first.w, vw),\n keep(all.y + all.h / 2, first.y, first.h, vh),\n ];\n}\n\n/** 段で動く物を 1 つずつ。 */\nfunction focusParts(layout: Layout, diagram: DiagramModel, step: number): Rect[] {\n const rects: Rect[] = [];\n for (const e of layout.edges.filter((x) => x.step === step)) {\n const xs = e.points.map((p) => p[0]);\n const ys = e.points.map((p) => p[1]);\n rects.push({\n x: Math.min(...xs),\n y: Math.min(...ys),\n w: Math.max(...xs) - Math.min(...xs),\n h: Math.max(...ys) - Math.min(...ys),\n });\n }\n rects.push(\n ...layout.labels.filter((l) => l.step === step),\n ...layout.actions.filter((a) => a.step === step),\n );\n // 木の図は、その段で現れる木の箱と木の線と、線の両端の木の箱を見る (#3233)\n if (isTreeLayout(layout)) {\n const ends = new Set(\n (diagram.steps[step]?.events ?? []).flatMap((e) => (e.type === \"edge\" ? [e.from, e.to] : [])),\n );\n rects.push(...layout.nodes.filter((n) => n.step === step || ends.has(n.id)));\n for (const l of layout.links.filter((x) => x.step === step)) {\n const xs = l.points.map((p) => p[0]);\n const ys = l.points.map((p) => p[1]);\n rects.push({\n x: Math.min(...xs),\n y: Math.min(...ys),\n w: Math.max(...xs) - Math.min(...xs),\n h: Math.max(...ys) - Math.min(...ys),\n });\n }\n }\n // 列の図は、その段で変わる列を見る (#3239)\n if (isLineupLayout(layout)) {\n const changed = new Set(\n (diagram.steps[step]?.events ?? []).flatMap((e) => (\"box\" in e ? [e.box] : [])),\n );\n rects.push(...layout.lanes.filter((lane) => changed.has(lane.id)));\n }\n // 試す図は、その段の出来事が触る部品を、出来事が着く所から順に見る (#3337)\n if (isTryLayout(layout)) rects.push(...kindParts(\"try\").tryFocusParts(layout, diagram, step));\n for (const event of diagram.steps[step]?.events ?? []) {\n const ids =\n event.type === \"edge\"\n ? [event.from, event.to]\n : event.type === \"action\" || event.type === \"swap\"\n ? [event.box]\n : [];\n for (const id of ids) {\n const box = layout.boxes.find((b) => b.id === id);\n // 時系列図の頭の箱は遠いので、線の行だけを見る\n if (box && (layout.kind === \"architecture\" || event.type === \"swap\")) rects.push(box);\n }\n }\n return rects;\n}\n\n/**\n * 寄って追う窓。段ごとに動く所へ寄り、窓の外の全体図に今見ている所の枠を同じ動きで出す。\n * 全体図は窓に重ねると今動く線や箱を覆うので、窓の外に置く (#3042)。\n * 縦長の全体図は窓の右に列を取り、横長の全体図は窓の下に置く。失う窓の幅か図の高さの小さい側を選ぶ。\n * 枠の中で見える高さを渡された時は、窓と全体図がその高さに入るまで窓を低くする (#3047)。\n * 枠が余る時は窓を広げ、図の原寸の幅と、見える高さか図の高さまで使う。全体図は今の大きさのまま置く (#3053)。\n * 枠の幅が `LOOK.follow.narrow` より狭い時は、縦長の全体図を出さずに窓へ枠の幅の全部を渡す (#3055)。値の表を持つ図は、狭い枠では横長の全体図も出さない (#3274)。\n * 段で動く物を全部囲んだ所の真ん中に寄せると今の段の番号の丸が窓から外れる段では、丸に近い動く物から窓に収まるだけ囲んだ所へ寄せる (#3046)。\n * 時系列図は頭の箱 `heads` を窓の上端の頭の列に貼り、窓が横に動く時だけ一緒に動かす。頭の箱は図の上端に在り、線を追う窓からは外れるため。\n * 窓は頭の列の下の残りの高さで動く物を真ん中に見せる (#3118)。\n * 頭の列の箱はアイコンを外した 2 段にして低く貼り、線は図の頭の箱の下から見せ始める (#3120)。\n * 値の表は図の一番下に在り、窓が近づくまで映らず、窓より広い表は右側が切れる。全体図と同じ理由で窓の外に出し、\n * 窓と全体図の下に図の枠の幅で組み直す (#3270)。窓と全体図は表を除いた図の高さ `worldH` の中だけを見る。\n */\nfunction followView(\n layout: Layout,\n timeline: Timeline,\n diagram: DiagramModel,\n m: Motion,\n id: string,\n content: string,\n follow: FollowFrame,\n heads: string,\n drawTable: (s: SceneStrip, from: SceneStrip) => string,\n corner: Corner,\n): { body: string; w: number; h: number } {\n const F = LOOK.follow;\n const M = LOOK.mini;\n const frameWidth = Math.max(1, follow.width);\n const full = Math.min(layout.width, frameWidth);\n const worldH = layout.strip ? layout.strip.y : layout.height;\n const title = FIGURE_TEXT[follow.lang].overview;\n /** 窓の高さ `vh` の時の全体図の寸法。全体図は窓の高さで縮むので、窓を低くしたら測り直す */\n const sized = (vh: number) => {\n // 全体図の寸法は枠の幅と窓の高さで決め、置き場所に依らない\n // 全体図の幅は表を含む図の比で決める。表を除いた比にすると全体図の列が太り、窓が狭くなる\n const mw = Math.min(M.w, full * 0.4, ((vh * 0.4) / layout.height) * layout.width);\n const k = mw / layout.width;\n const mh = worldH * k;\n // 地の幅は図の縦横の比で決まるので、縦に長い図では札より狭くなる。その時は地を札の幅まで広げ、図は広げた地の真ん中に置く\n const bw = Math.max(mw, Math.ceil(textWidth(title, TYPE.miniTitle)));\n // 縦横の比は窓の高さに依らないので、低くしても全体図の置き場所は変わらない\n return {\n vh,\n mw,\n k,\n mh,\n bw,\n bgW: bw + M.pad * 2,\n bgH: mh + M.pad * 2 + M.title,\n beside: mh > mw,\n };\n };\n const natural = sized(Math.min(worldH, Math.max(F.minH, full * F.aspect)));\n // 携帯の幅では縦長の全体図の列が枠の幅の 3 割を取り、窓が図の横の 3 割ほどしか見せない。その時は全体図を出さない。\n // 横長の全体図は窓の下に出して幅を取らないので、狭い枠でも出す。\n // ただし値の表を持つ図は、窓の下に全体図と表が重なって段を送る釦を最初の画面の外へ押し出すので、狭い枠では全体図を出さない (#3274)\n const bare = frameWidth < F.narrow && (natural.beside || layout.strip !== undefined);\n const tableH = layout.strip ? rewrapStrip(layout.strip, 0, 0, full).h + M.inset : 0;\n // 窓の右の全体図は窓の高さの中に収まり、窓の下の全体図と表は窓の高さに足される\n const room =\n follow.height === undefined\n ? Number.POSITIVE_INFINITY\n : (natural.beside || bare ? follow.height : follow.height - natural.bgH - M.inset) - tableH;\n // 見える高さが窓より低ければ窓と全体図を縮め、高ければ全体図はそのままに窓を図の高さまで伸ばす。\n // 全体図も伸ばすと、狭い枠では右の全体図の列が太って窓が狭くなる\n const { vh, mw, k, mh, bw, bgW, bgH, beside } =\n room < natural.vh\n ? sized(Math.max(F.fitMinH, room))\n : { ...natural, vh: Number.isFinite(room) ? Math.min(worldH, room) : natural.vh };\n // 右の全体図の列は枠の余りに置き、窓は図の原寸の幅まで広げる。枠が図より狭い時は今までどおり枠の幅から列を引く\n const vw = beside && !bare ? Math.min(layout.width, frameWidth - bgW - M.inset) : full;\n const clampX = (x: number): number => Math.min(layout.width - vw / 2, Math.max(vw / 2, x));\n // 時系列図は窓の上端に頭の列を貼るので、動く物は頭の列の下の残りの高さ `below` に見せる (#3118)。\n // 線は図の頭の箱の下 `top` から見せ始め、図の頭の箱は頭の列の下か窓の上に隠す (#3120)\n // 列の図は描かない見出しの文の下 `top` から見せ始める (#3365)\n const top =\n heads !== \"\"\n ? Math.max(...layout.boxes.map((b) => b.y + b.h)) + F.headRoom\n : isLineupLayout(layout)\n ? lineupHeadingBottom(layout)\n : 0;\n const strip = heads === \"\" ? 0 : F.head.pad * 2 + F.head.h;\n const below = vh - strip;\n /** 頭の列の下の残りの窓の真ん中の高さを、図の頭の箱の下と図の下端で止める */\n const clampY = (y: number): number => Math.min(worldH - below / 2, Math.max(top + below / 2, y));\n const r = LOOK.badge.r;\n let prev: [number, number] = [layout.width / 2, worldH / 2];\n // 頭の列の下の残りの窓の真ん中。窓の真ん中は、これより頭の列の高さの半分だけ上に在る\n const middles = timeline.steps.map((_, s) => {\n // 時間軸の図は、針と印の列を必ず窓に入れる (#3165)。番号の丸へ寄せ直すと、針が窓から外れるため\n if (isTimeLayout(layout)) {\n const f = kindParts(\"time\").timeFocus(\n layout,\n timeline,\n s,\n focusParts(layout, diagram, s),\n vw,\n below,\n );\n prev = [f.x + f.w / 2, f.y + f.h / 2];\n return [clampX(prev[0]), clampY(prev[1])] as [number, number];\n }\n // 試す図は、出来事が着く所 (送った先の待ち行列、作ったブロック、書き換えたブロック) を窓から外さずに寄せる (#3337)。\n // 網は図の幅いっぱいに広がるので、全部を囲んだ所の真ん中へ寄せると、狭い窓では送った先の待ち行列が窓から外れる\n if (isTryLayout(layout)) {\n prev = anchoredCenter(focusParts(layout, diagram, s), vw, below) ?? prev;\n return [clampX(prev[0]), clampY(prev[1])] as [number, number];\n }\n const f = focusOf(layout, diagram, s);\n prev = f ? [f.x + f.w / 2, f.y + f.h / 2] : prev;\n const at: [number, number] = [clampX(prev[0]), clampY(prev[1])];\n // 動く物を全部囲んだ所が窓より大きいと、その端に在る番号の丸が窓から外れる。その段だけ丸の近くへ寄せ直す (#3046)。\n // 窓が見せ始める所 `top` より上の丸 (列の図の見出しの横の丸) へは窓が届かないので寄せ直さない (#3365)\n const b = layout.badges.find((x) => x.step === s);\n if (\n !b ||\n onStrip(layout, b) ||\n b.y < top ||\n (Math.abs(b.x - at[0]) <= vw / 2 - r && Math.abs(b.y - at[1]) <= below / 2 - r)\n )\n return at;\n const near = badgeFocus(b, focusParts(layout, diagram, s), vw, below);\n // 動く物の無い次の段は、寄せ直した窓のまま止める\n prev = [near.x + near.w / 2, near.y + near.h / 2];\n return [clampX(prev[0]), clampY(prev[1])] as [number, number];\n });\n const centers = middles.map(([x, y]): [number, number] => [x, y - strip / 2]);\n const c0 = centers[0] as [number, number];\n const cam: [number, number, number, number?, string?][] = [\n [0, c0[0], c0[1]],\n [(timeline.steps[0] as Span).start, c0[0], c0[1]],\n ];\n centers.forEach((c, s) => {\n if (s === 0) return;\n const before = centers[s - 1] as [number, number];\n const start = (timeline.steps[s] as Span).start;\n cam.push([start, before[0], before[1], 1, EASE.inOut], [start + F.ease, c[0], c[1]]);\n });\n const cl = centers[centers.length - 1] as [number, number];\n cam.push([timeline.last, cl[0], cl[1], 1, EASE.inOut], [timeline.total, c0[0], c0[1]]);\n const camKf = m.move(cam.map(([t, cx, cy, s, e]) => [t, vw / 2 - cx, vh / 2 - cy, s, e]));\n\n // 右に出す時は窓の上端に揃え、下に出す時は窓の右端から内へ寄せる\n const bgX = beside ? vw + M.inset : vw - bgW - M.inset;\n const bgY = beside ? 0 : vh + M.inset;\n const bx = bgX + M.pad;\n const mx = bx + (bw - mw) / 2;\n const my = bgY + M.pad + M.title;\n /**\n * 全体図の地と札と、今見ている所の枠。窓と同じ動きで枠を動かす。\n * 時系列図の枠は頭の列の下の線を見せる所だけを囲む。頭の箱は頭の列に常に出ているため (#3122)\n */\n const overview = (): { clip: string; body: string } => {\n const shapes = [\n ...layout.regions.map(\n (r) =>\n `<rect class=\"dg-mm-band\" style=\"${cs(r.color)}\" x=\"${mx + r.x * k}\" y=\"${my + r.y * k}\" width=\"${r.w * k}\" height=\"${r.h * k}\" rx=\"${partRadius(corner, M.band)}\"/>`,\n ),\n ...layout.boxes.map(\n (b) =>\n `<rect class=\"dg-mm-card\" style=\"${cs(b.color)}\" x=\"${mx + b.x * k}\" y=\"${my + b.y * k}\" width=\"${b.w * k}\" height=\"${b.h * k}\" rx=\"${partRadius(corner, M.card)}\"/>`,\n ),\n ...(isTreeLayout(layout) ? layout.nodes : []).map(\n (n) =>\n `<rect class=\"dg-mm-card\" style=\"${cs(n.color)}\" x=\"${mx + n.x * k}\" y=\"${my + n.y * k}\" width=\"${n.w * k}\" height=\"${n.h * k}\" rx=\"${partRadius(corner, M.card)}\"/>`,\n ),\n // 試す図は、待ち行列の枠を地に、網の節と出ているブロックを札に描く (#3337)\n ...(isTryLayout(layout) ? kindParts(\"try\").tryOverview(layout) : []).map(\n ({ rect: t, band, color }) =>\n `<rect class=\"${band ? \"dg-mm-band\" : \"dg-mm-card\"}\" style=\"${cs(color)}\" x=\"${mx + t.x * k}\" y=\"${my + t.y * k}\" width=\"${t.w * k}\" height=\"${t.h * k}\" rx=\"${partRadius(corner, band ? M.band : M.card)}\"/>`,\n ),\n ].join(\"\");\n const vp = m.move(\n cam.map(([t, cx, cy, , e]) => [t, mx + (cx - vw / 2) * k, my + (cy - vh / 2) * k, 1, e]),\n );\n return {\n clip: `<clipPath id=\"dg-mm-${id}\">${frameShape(corner, \"\", { x: mx, y: my, w: mw, h: mh }, `<rect x=\"${mx}\" y=\"${my}\" width=\"${mw}\" height=\"${mh}\" rx=\"4\"/>`)}</clipPath>`,\n body:\n frameShape(\n corner,\n ' class=\"dg-mm-bg\"',\n { x: bgX, y: bgY, w: bgW, h: bgH },\n `<rect class=\"dg-mm-bg\" x=\"${bgX}\" y=\"${bgY}\" width=\"${bgW}\" height=\"${bgH}\" rx=\"${M.radius}\"/>`,\n ) +\n `<text class=\"dg-mm-t\" x=\"${bx}\" y=\"${my - M.pad + 2}\">${title}</text>` +\n `<g clip-path=\"url(#dg-mm-${id})\"><rect class=\"dg-mm-world\" x=\"${mx}\" y=\"${my}\" width=\"${mw}\" height=\"${mh}\"/>${shapes}<rect class=\"dg-mm-vp dg-a\"${strip === 0 ? \"\" : ` y=\"${strip * k}\"`} width=\"${vw * k}\" height=\"${(vh - strip) * k}\" rx=\"${partRadius(corner, 2)}\" style=\"${vp}\"/></g>`,\n };\n };\n const mini = bare ? { clip: \"\", body: \"\" } : overview();\n // 頭の列は窓の中身の上に重ね、窓と同じ時刻と緩急で横にだけ動かす (#3118)\n const head =\n strip === 0\n ? \"\"\n : `<g class=\"dg-hd\"><rect class=\"dg-hd-bg\" width=\"${vw}\" height=\"${strip}\"/><line class=\"dg-sep\" x1=\"0\" y1=\"${strip}\" x2=\"${vw}\" y2=\"${strip}\"/>` +\n `<g class=\"dg-a\" style=\"${m.move(cam.map(([t, cx, , s, e]) => [t, vw / 2 - cx, 0, s, e]))}\">${heads}</g></g>`;\n const body =\n `<defs><clipPath id=\"dg-vp-${id}\">${frameShape(corner, \"\", { x: 0, y: 0, w: vw, h: vh }, `<rect width=\"${vw}\" height=\"${vh}\" rx=\"${LOOK.region.radius}\"/>`)}</clipPath>${mini.clip}</defs>` +\n `<g clip-path=\"url(#dg-vp-${id})\"><rect class=\"dg-vp-bg\" width=\"${vw}\" height=\"${vh}\"/><g class=\"dg-a\" style=\"${camKf}\">${content}</g>${head}</g>` +\n `${frameShape(corner, ' class=\"dg-vp-frame\"', { x: 0.5, y: 0.5, w: vw - 1, h: vh - 1 }, `<rect class=\"dg-vp-frame\" x=\"0.5\" y=\"0.5\" width=\"${vw - 1}\" height=\"${vh - 1}\" rx=\"${LOOK.region.radius}\"/>`)}${mini.body}`;\n const w = beside && !bare ? vw + M.inset + bgW : full;\n // 全体図を出さない時は、窓のすぐ下に表を置く\n const bottom = beside || bare ? vh : bgY + bgH;\n if (!layout.strip) return { body, w, h: bottom };\n const table = rewrapStrip(layout.strip, 0, bottom + M.inset, full);\n return { body: body + drawTable(table, layout.strip), w, h: table.y + table.h };\n}\n\n/**\n * 描く色味。名前で選んだ色味の `theme` の色に `colors` の色を重ねる (#3198)。\n * 色味に無い色の名前と、色の値として読めない値は、名前を全て挙げて描かずに断る\n */\nexport function paletteOf(options: RenderOptions, theme: Theme): Palette {\n const palette = resolvePalette(options.palette);\n if (!options.colors) return palette;\n const words = FIGURE_TEXT[options.lang ?? DEFAULT_LANG];\n const errors = Object.entries(options.colors).flatMap(([name, value]) =>\n !isColorName(name)\n ? [words.unknownColor(name)]\n : isColorValue(value)\n ? []\n : [words.unreadableColor(name)],\n );\n if (errors.length > 0) throw new Error(words.cannotDraw(errors.join(\" / \")));\n return { ...palette, [theme]: { ...palette[theme], ...options.colors } };\n}\n\n/** 原本の JSON から図を描く。原本が形に合わない時は、誤りの場所を添えて断る。 */\nexport function renderDiagram(input: unknown, options: RenderOptions = {}): Rendered {\n const lang = options.lang ?? DEFAULT_LANG;\n const read = readDiagram(input, { lang });\n if (!read.ok)\n throw new Error(\n FIGURE_TEXT[lang].cannotDraw(read.errors.map((e) => `${e.pointer} ${e.message}`).join(\" / \")),\n );\n // 並べ方と描き方は版1と同じ欄の形を読み、図の id もこの形の字から作る (#3346)\n const diagram = toModel(read.diagram);\n // 置き場を持つ図の種類は、置き場の並べ方で並べる (#3345)。後から読む図の種類 (#3347) と置き場の無い図の種類は登録簿から並べ方を引き、\n // 知らない種類は構成図の並べ方で並べる\n const folder = FOLDERS[diagram.kind];\n const layout = folder?.layout\n ? folder.layout(diagram, lang)\n : diagram.kind === \"state\"\n ? kindParts(\"state\", lang).layoutState(diagram, lang)\n : diagram.kind === \"git\"\n ? kindParts(\"git\", lang).layoutGit(diagram)\n : diagram.kind === \"time\"\n ? kindParts(\"time\", lang).layoutTime(diagram, lang)\n : diagram.kind === \"tree\"\n ? kindParts(\"tree\", lang).layoutTree(diagram)\n : diagram.kind === \"lineup\"\n ? kindParts(\"lineup\", lang).layoutLineup(diagram, {\n lang,\n ...(options.width === undefined ? {} : { width: options.width }),\n })\n : diagram.kind === \"try\"\n ? kindParts(\"try\", lang).layoutTry(diagram, lang, {\n ...(options.width === undefined ? {} : { width: options.width }),\n })\n : KIND_FOLDERS.architecture.layout(diagram, lang);\n return renderLayout(diagram, layout, buildTimeline(diagram, options.still === true), options);\n}\n\n/**\n * 置き場所を決めた図を描き、描いた字の重なりを数える (#3175)。`renderDiagram` が原本を読んで置き場所を決めた後に呼ぶ。\n * 重なりは、字を描く部品が記録した字だけから数えるので、描く所が位置を決める字 (箱の名前) も対象に入る\n */\nexport function renderLayout(\n diagram: DiagramModel,\n layout: Layout,\n timeline: Timeline,\n options: RenderOptions = {},\n): Rendered {\n const theme: Theme = options.theme === \"dark\" ? \"dark\" : \"light\";\n const palette = paletteOf(options, theme);\n const ink: Ink[] = [];\n const traces: Trace[] = [];\n const svg = drawSvg(diagram, layout, timeline, palette, theme, undefined, ink, traces);\n return {\n svg,\n palette: palette.id,\n theme,\n ...(diagram.view ? { view: diagram.view } : {}),\n fonts: { ...FONTS },\n layout,\n timeline,\n diagram,\n overlaps: findOverlaps(ink, timeline.stills, traces),\n };\n}\n","/**\n * 見せ方を字の大きさで選ぶ。\n *\n * 全体を枠の幅へ収めた時の箱の名前の字が 10.5px 以上なら、全体を止めて中だけ動かす (`fixed`)。\n * 下回るなら、動く所へ寄って追い、隅の全体図で今どこかを示す (`follow`)。\n * 枠の高さを渡すと、全体を枠の幅と高さの両方へ収めた時の字で選ぶ (#3047)。高さの決まった置き場で、縦に長い図を縮めすぎないため。\n * 書き手が原本の `view` で決めた時は、字の大きさに関わらずそれに従う。\n */\nimport { READABLE_PX, TYPE } from \"./look/values\";\nimport type { Rendered } from \"./render/draw\";\nimport type { ViewMode } from \"./schema\";\n\nexport function chooseView(rendered: Pick<Rendered, \"layout\" | \"view\">, frameWidth: number, frameHeight?: number): { mode: ViewMode; textPx: number } {\n const byWidth = Math.max(0, frameWidth) / rendered.layout.width;\n const scale = frameHeight === undefined ? byWidth : Math.min(byWidth, Math.max(0, frameHeight) / rendered.layout.height);\n const textPx = scale * TYPE.boxName.size;\n if (rendered.view) return { mode: rendered.view, textPx };\n return { mode: textPx >= READABLE_PX ? \"fixed\" : \"follow\", textPx };\n}\n","/**\n * 頁に図を置いて動かす。\n *\n * 動きを嫌う設定 (`prefers-reduced-motion: reduce`) は描く前に読み、その人には一瞬も自動再生せず、\n * 段ごとの止め絵を釦で送る。各段の題と本文と出典は、読み上げの道具が段の順に読める番号付きの一覧として置き、\n * 図そのものは読み上げから隠して同じ中身を 2 度読ませない。\n * 見せ方は枠の幅で選び (`view.ts`)、寄って追う時は窓と全体図で描き直す。\n * 釦と段の一覧の読み上げの名前と全体図の札は、渡した言葉 (`options.lang`、書かなければ英語) で出す (#3001)。\n * 色は `options.palette` の名前の色味に `options.colors` の色の値を重ね、図と全体図と釦と段の帯を同じ色で塗る (#3198)。\n * 段が替わるたびに `options.onStep` で今の段を知らせ、頁の側が段の札や進み具合を出せるようにする (#3031)。\n * 置いた時に流さず決めた段で止めて置く (`options.pausedAt`) ことと、1 度だけ流して最後の段で止める (`options.playOnce`) ことを選べる。\n * 止め絵を選んだ図 (`options.still`) は、最後の段で止まった時に全ての段の線の名前を出す (#3200)。\n * 頁は `goTo` で段へ移って止め、`mark` で図の上に点線の四角を描く。頁の側では SVG を組まないので、編集画面が字の重なりを囲む時もこれを呼ぶ (#3178)。\n * 段の本文の帯は本文の最も長い段の高さに保ち、段を送っても図の大きさと位置を変えない (#3049)。\n * 帯の中身の幅が `LOOK.player.narrow` より狭い時は、段を送る釦を指で押せる大きさにして段の番号と上の段に並べ、\n * 題と本文をその下の段の全幅に置く (#3057、#3069)。\n * 試す図 (`try`) は書き手の最初の段だけを持つ原本 (今の原本) で描き、流さずに最初の段の止め絵で置く。図の下に入力の帯を置き、\n * 読み手が送るか釦を押すかチップを書き換えるたびに、その出来事の段を今の原本の最後に足して描き直し、足した段を 1 度だけ流す。\n * 動きを嫌う設定では流さずに足した段の止め絵で止める。今の原本は `player.diagram` で読め、置き直すと最初の段に戻る (#3337)。\n * 入力の帯などの操作は試す図の描く部品と同じ塊が持ち、試す図を描けた後に登録簿 (`kinds/registry.ts`) から引いて置く。\n */\nimport { drawSources } from \"./blocks/source/draw\";\nimport { drawRooms, drawStepItem } from \"./blocks/step/draw\";\nimport { FIGURE_TEXT } from \"./figure-text\";\nimport type { Rect } from \"./layout/scene\";\nimport type { TryLayout } from \"./kinds/try/layout\";\nimport { FONT_VARS, LOOK, paletteVars, type TextStyle, TYPE } from \"./look/values\";\nimport { partRadius } from \"./render/corner\";\nimport {\n drawSvg,\n paletteOf,\n type RenderOptions,\n type Rendered,\n renderDiagram,\n} from \"./render/draw\";\nimport { kindParts } from \"./kinds/registry\";\nimport type { Diagram, Step } from \"./schema\";\nimport type { Span } from \"./timeline\";\nimport { chooseView } from \"./view\";\nimport { DEFAULT_LANG } from \"./words\";\n\nexport interface PlayerOptions extends RenderOptions {\n /** 段が替わるたびに今の段 (0 から) を受け取る。置いた時にも最初の段で 1 度呼ぶ。頁の側で段の札や進み具合を出す時に使う (#3031) */\n onStep?: (step: number) => void;\n /**\n * 図を、図の枠の中で見える高さに収める (#3047)。高さに収めると字が読めない図は寄って追う図にし、寄って追う窓と全体図をその高さに収める。\n * 枠の高さが決まっている置き場 (カタログの拡大の重ね窓) で使う。枠の高さが図に合わせて伸びる置き場で使うと、描くたびに低くなる\n */\n fitHeight?: boolean;\n /** 置いた時に流さず、段 `pausedAt` (0 から) の止め絵で止めて置く。段の数を超えた時は最後の段で止める。書かなければ置いた時から流す (#3200) */\n pausedAt?: number;\n /** 流した時に最後の段の止め絵で止め、繰り返さない。最後の段で止まった図を流すと、最初の段から流し直す (#3200) */\n playOnce?: boolean;\n}\n\nexport interface Player {\n /** 今の段 (0 から) */\n readonly step: number;\n /** 動いているか */\n readonly playing: boolean;\n next(): void;\n prev(): void;\n play(): void;\n pause(): void;\n /** 段 `step` (0 から) へ移って止める。段の数を超えた時は最後の段で止める (#3178) */\n goTo(step: number): void;\n /** 図の上に点線の四角を描く。四角は図の座標で渡し、空を渡すと消す。図を置き直しても残る (#3178) */\n mark(rects: readonly Rect[]): void;\n /** 今の原本。試す図では読み手が足した段を含む写しを返し、ほかの種類の図では渡した原本を返す (#3337) */\n readonly diagram: unknown;\n destroy(): void;\n}\n\nconst font = (t: TextStyle): string => `font:${t.weight} ${t.size}px var(--${t.family})`;\nconst px = (v: number): string => `${v}px`;\n\nfunction playerCss(): string {\n const P = LOOK.player;\n const C = LOOK.corner.cut;\n const hidden = px(P.hidden);\n return [\n `.dg-player{display:flex;flex-direction:column;gap:${px(P.gap)};color:var(--ink)}`,\n `.dg-player .dg-frame{border-radius:${px(P.radius)};overflow:hidden}`,\n // 角を落とす色味の再生の枠は、図の枠と同じく右上と左下を落として切り抜き、釦の角を丸めない (#3344)\n `.dg-player[data-corner=\"cut\"] .dg-frame{border-radius:0;clip-path:polygon(0 0,calc(100% - ${px(C)}) 0,100% ${px(C)},100% 100%,${px(C)} 100%,0 calc(100% - ${px(C)}))}`,\n `.dg-player[data-corner=\"cut\"] .dg-btn{border-radius:0}`,\n // 並べ方は帯の中身の幅で選ぶ。帯の中の 1 段 (`.dg-row`) が並べ替わり、帯の左右の余白は置いた頁が帯に付ける\n `.dg-bar{container:dg-bar/inline-size}`,\n `.dg-row{display:flex;align-items:flex-start;gap:${px(P.gap)}}`,\n `.dg-btns{display:flex;gap:${px(P.gap / 2)};flex:none}`,\n `.dg-btn{width:${px(P.button)};height:${px(P.button)};border-radius:${px(P.radius)};border:${px(LOOK.stroke.hair)} solid var(--hair);background:var(--surf);color:var(--ink);${font(TYPE.button)};cursor:pointer}`,\n `.dg-btn:focus-visible{outline:${px(P.focus)} solid var(--c-blue);outline-offset:${px(P.focus)}}`,\n `.dg-say{display:flex;gap:${px(P.gap)};min-width:0}`,\n `.dg-no{${font(TYPE.stepNo)};color:var(--mute);padding-top:${px(P.focus)}}`,\n `.dg-txt{display:grid;grid-template-columns:minmax(0,1fr);min-width:0}`,\n `.dg-txt>*{grid-area:1/1}`,\n `.dg-room{visibility:hidden}`,\n `.dg-tt{${font(TYPE.stepTitle)};margin:0}`,\n `.dg-tb{${font(TYPE.stepBody)};color:var(--ink2);margin:0;white-space:pre-line}`,\n `.dg-sr{position:absolute;width:${hidden};height:${hidden};margin:-${hidden};padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}`,\n // 狭い帯 (携帯の幅) では、段を送る釦を指で押せる大きさにし、その横に番号を置き、\n // 題を 2 段目、本文を 3 段目に置いてどちらも帯の全幅を使う (#3057、#3069)。\n // 釦を大きくすると横に題を置く幅が足りず題が細かく折れるため、題は釦の段に置かない。\n // 題と本文を包む箱を外して写しも同じ升に重ねるので、2 段目は最も高い題、3 段目は最も長い本文の高さになる。\n // 題と本文の間は広い帯と同じく空けず、釦の段の下にだけ間を取って、帯が高くなる分を抑える\n `@container dg-bar (width < ${px(P.narrow)}){` +\n `.dg-row{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:0 ${px(P.gap)}}` +\n `.dg-say,.dg-txt,.dg-txt>*{display:contents}` +\n `.dg-btns{grid-area:1/1;margin-bottom:${px(P.gap / 2)}}` +\n `.dg-btn{width:${px(P.touch)};height:${px(P.touch)}}` +\n `.dg-no{grid-area:1/2;display:flex;align-items:center;min-height:${px(P.touch)};padding-top:0}` +\n `.dg-tt{grid-area:2/1/3/3}` +\n `.dg-tb{grid-area:3/1/4/3}` +\n `}`,\n // 指で触る時は、広い帯でも段を送る釦を指で押せる大きさにする (#3076)。並びは横 1 列のまま変えない。\n // 広い帯は本文が 2 行あれば帯の高さが変わらず、本文の無い帯だけが釦の分だけ高くなる\n `@media (pointer: coarse){.dg-btn{width:${px(P.touch)};height:${px(P.touch)}}}`,\n `.dg-spot{fill:none;stroke:var(--t-amber);stroke-width:${px(LOOK.stroke.mark)};stroke-dasharray:${LOOK.mark.dash} ${LOOK.mark.gap};pointer-events:none}`,\n ].join(\"\");\n}\n\n/** 試す図の原本か */\nfunction isTrySource(input: unknown): input is Diagram {\n if (typeof input !== \"object\" || input === null) return false;\n const source = input as { kind?: unknown; steps?: unknown };\n return source.kind === \"try\" && Array.isArray(source.steps);\n}\n\n/** 書き手の最初の段だけを持つ今の原本。渡した原本は書き換えない */\nfunction startSession(input: Diagram): Diagram {\n const copy = JSON.parse(JSON.stringify(input)) as Diagram;\n return { ...copy, steps: copy.steps.slice(0, 1) };\n}\n\nfunction ensureCss(doc: Document): void {\n if (doc.getElementById(\"dragon-player-css\")) return;\n const style = doc.createElement(\"style\");\n style.id = \"dragon-player-css\";\n style.textContent = playerCss();\n doc.head.appendChild(style);\n}\n\n/** 釦に出す字。HTML に書き出す時は、この字も字の file に残す。 */\nexport const BUTTON_TEXT = { prev: \"‹\", pause: \"❚❚\", play: \"▶\", next: \"›\" } as const;\n\n/** 図の上に四角を描く時の SVG の名前空間 */\nconst SVG_NS = \"http://www.w3.org/2000/svg\";\n\nconst pad = (n: number): string => String(n).padStart(2, \"0\");\n/** 段の番号の札 (`01/12`)。`step` は 0 から数える。 */\nexport const stepNo = (step: number, count: number): string => `${pad(step + 1)}/${pad(count)}`;\n\nexport function mountDiagram(\n host: HTMLElement,\n diagram: unknown,\n options: PlayerOptions = {},\n): Player {\n const doc = host.ownerDocument;\n const win = doc.defaultView;\n // 描く前に読む。描いた後に読むと、動きを嫌う人にも一瞬だけ流れてしまう\n const reduce = Boolean(win?.matchMedia?.(\"(prefers-reduced-motion: reduce)\").matches);\n // 試す図は書き手の最初の段だけを持つ今の原本で描き、読み手が押すたびに段を足す (#3337)\n let session = isTrySource(diagram) ? startSession(diagram) : undefined;\n /** 描く原本。試す図では今の原本 */\n let source: unknown = session ?? diagram;\n let rendered = renderDiagram(source, options);\n const lang = options.lang ?? DEFAULT_LANG;\n const words = FIGURE_TEXT[lang];\n const palette = paletteOf(options, rendered.theme);\n let { timeline } = rendered;\n let steps = rendered.diagram.steps;\n let count = steps.length;\n\n ensureCss(doc);\n const root = doc.createElement(\"div\");\n root.className = \"dg-player\";\n root.dataset.dragon = \"player\";\n root.setAttribute(\"style\", `${FONT_VARS};${paletteVars(palette, rendered.theme)}`);\n if (palette.corner === \"cut\") root.dataset.corner = \"cut\";\n if (session) root.dataset.try = \"\";\n\n const frame = doc.createElement(\"div\");\n frame.className = \"dg-frame\";\n const button = (name: string, label: string, text: string): HTMLButtonElement => {\n const b = doc.createElement(\"button\");\n b.type = \"button\";\n b.className = \"dg-btn\";\n b.dataset.dragon = name;\n b.setAttribute(\"aria-label\", label);\n b.textContent = text;\n return b;\n };\n const prevButton = button(\"prev\", words.prev, BUTTON_TEXT.prev);\n const toggleButton = button(\"toggle\", words.pause, BUTTON_TEXT.pause);\n const nextButton = button(\"next\", words.next, BUTTON_TEXT.next);\n const buttons = doc.createElement(\"div\");\n buttons.className = \"dg-btns\";\n // 置いた頁の言葉と違っても、釦の名前を名前の言葉の声で読ませる\n buttons.setAttribute(\"lang\", lang);\n buttons.append(prevButton, toggleButton, nextButton);\n\n // 見える語り。読み上げには下の一覧を読ませるので、こちらは読み上げから隠す\n const say = doc.createElement(\"div\");\n say.className = \"dg-say\";\n say.setAttribute(\"aria-hidden\", \"true\");\n const no = doc.createElement(\"div\");\n no.className = \"dg-no\";\n no.dataset.dragon = \"step-no\";\n const text = doc.createElement(\"div\");\n text.className = \"dg-txt\";\n const title = doc.createElement(\"p\");\n title.className = \"dg-tt\";\n title.dataset.dragon = \"step-title\";\n const body = doc.createElement(\"p\");\n body.className = \"dg-tb\";\n body.dataset.dragon = \"step-body\";\n const live = doc.createElement(\"div\");\n live.append(title, body);\n text.append(live);\n // 全部の段の題と本文の写しを今の段と同じ升に重ね、段を送っても図の枠が伸び縮みしない (#3049)\n drawRooms(doc, text, steps);\n say.append(no, text);\n // 狭い帯では語りの箱を外して番号と題と本文を釦と同じ升の並びに置く (#3057)。\n // 箱を外した要素の読み上げからの隠し方に頼らず、見える語りの 1 つずつも読み上げから隠す\n for (const shown of [no, title, body]) shown.setAttribute(\"aria-hidden\", \"true\");\n const row = doc.createElement(\"div\");\n row.className = \"dg-row\";\n row.append(buttons, say);\n const bar = doc.createElement(\"div\");\n bar.className = \"dg-bar\";\n bar.append(row);\n\n // 読み上げの道具が段の順に読む一覧。見た目からは外すが、読み上げからは隠さない。\n // 段の出典は本文の後ろに、名前を URL への link にして書いた順に並べる (#3199)\n const list = doc.createElement(\"ol\");\n list.className = \"dg-sr\";\n list.dataset.dragon = \"steps\";\n list.setAttribute(\"aria-label\", words.steps(rendered.diagram.title));\n const fillList = (): void => {\n list.replaceChildren();\n for (const step of steps) {\n const item = drawStepItem(doc, step);\n drawSources(doc, item, step.sources);\n list.append(item);\n }\n };\n fillList();\n\n // 試す図の入力の帯は図と語りの帯の間に置く。足した段は `add` が今の原本に足して描き直す。\n // 試す図を描けたので、試す図の塊は届いている\n const controls = session\n ? kindParts(\"try\", lang).mountTryControls(\n doc,\n rendered.diagram,\n rendered.layout as TryLayout,\n lang,\n (added) => add(added),\n )\n : undefined;\n root.append(frame, ...(controls ? [controls.tools] : []), bar, list);\n host.append(root);\n\n const frameWidth = (): number => frame.clientWidth || host.clientWidth || rendered.layout.width;\n /**\n * 列の図は枠の幅で箱の並べ方を変える (#3351)。横に並べると箱の名前が読めない幅では縦に組んだ図を描き直す。\n * 試す図も同じ幅で縦に組み、縦に組んだ形は枠の幅で描くので、幅が変わった時も描き直す (#3366)。\n * 描き直した時だけ真を返す。段と時刻の表は原本だけで決まるので、描き直しても変わらない\n */\n const arrange = (w: number): boolean => {\n const kind = rendered.diagram.kind;\n if (kind !== \"lineup\" && kind !== \"try\") return false;\n const next = renderDiagram(source, { ...options, width: w });\n const before = rendered.layout as { arrangement?: string; width: number };\n const after = next.layout as { arrangement?: string; width: number };\n if (before.arrangement === after.arrangement && (kind === \"lineup\" || before.width === after.width)) return false;\n rendered = next;\n controls?.update(next.layout as TryLayout);\n return true;\n };\n arrange(frameWidth());\n /** 高さに収めると頼まれた時だけ、図の枠の中で見える高さ (上下の余白を除く)。測れない時は `undefined` で、幅だけで決める */\n const frameHeight = (): number | undefined => {\n if (!options.fitHeight || !win) return undefined;\n const style = win.getComputedStyle(frame);\n const inner =\n frame.clientHeight -\n (Number.parseFloat(style.paddingTop) || 0) -\n (Number.parseFloat(style.paddingBottom) || 0);\n return inner > 0 ? inner : undefined;\n };\n let mode = chooseView(rendered, frameWidth(), frameHeight()).mode;\n let width = frameWidth();\n let height = frameHeight();\n let svg: SVGSVGElement | null = null;\n // 止めて置く段を渡された図は、動きを嫌う人と同じく止め絵で置く。試す図は読み手が押すまで流さない\n let step =\n options.pausedAt === undefined ? 0 : Math.min(count - 1, Math.max(0, options.pausedAt));\n let playing = !reduce && options.pausedAt === undefined && !session;\n let at = playing ? 0 : (timeline.stills[step] ?? 0);\n /** 1 度だけ流すか。試す図は足した段を流した後に最初の段へ戻らない */\n const once = options.playOnce === true || session !== undefined;\n /** 1 度だけ流す図が止まる時刻 (最後の段の止め絵) */\n let lastStill = timeline.stills[count - 1] ?? 0;\n let born = Date.now();\n let marked: readonly Rect[] = [];\n\n /**\n * 渡された四角を点線で囲む。寄って追う図では窓の中身と一緒に動く所に置き、止めて見せる図では図の上に置く。\n * 囲みは字の四角より `LOOK.mark.pad` だけ広げ、字の縁に線が掛からないようにする\n */\n const drawMarks = (): void => {\n if (!svg) return;\n for (const old of svg.querySelectorAll(\".dg-spots\")) old.remove();\n if (marked.length === 0) return;\n const M = LOOK.mark;\n const group = doc.createElementNS(SVG_NS, \"g\");\n group.setAttribute(\"class\", \"dg-spots\");\n for (const r of marked) {\n const rect = doc.createElementNS(SVG_NS, \"rect\");\n rect.setAttribute(\"class\", \"dg-spot\");\n rect.setAttribute(\"x\", String(r.x - M.pad));\n rect.setAttribute(\"y\", String(r.y - M.pad));\n rect.setAttribute(\"width\", String(r.w + M.pad * 2));\n rect.setAttribute(\"height\", String(r.h + M.pad * 2));\n rect.setAttribute(\"rx\", String(partRadius(palette.corner, M.radius)));\n group.append(rect);\n }\n (svg.querySelector('g[clip-path^=\"url(#dg-vp-\"] > g.dg-a') ?? svg).append(group);\n };\n\n /** 動きの変数を付けた図を置き直す。置き直すと動きの時計が最初から数え直される */\n const place = (markup?: string): void => {\n let next: SVGSVGElement | null;\n if (markup !== undefined) {\n const holder = doc.createElement(\"div\");\n holder.innerHTML = markup;\n next = holder.querySelector(\"svg\");\n } else {\n next = svg ? (svg.cloneNode(true) as SVGSVGElement) : null;\n }\n if (!next) return;\n // 箱の飛び先 (#3199) の link を持つ図を隠すと、Tab で押せる link が読み上げから消える。\n // その図は名前を残した group として読ませ、link の無い図は段の一覧に読ませて図を隠す (#3329)\n if (next.querySelector(\"a[href]\")) {\n next.removeAttribute(\"aria-hidden\");\n next.setAttribute(\"role\", \"group\");\n } else {\n next.setAttribute(\"aria-hidden\", \"true\");\n next.removeAttribute(\"role\");\n next.removeAttribute(\"aria-label\");\n }\n next.style.setProperty(\"--at\", String(at));\n next.style.setProperty(\"--play\", playing ? \"running\" : \"paused\");\n next.dataset.motion = playing ? \"play\" : \"still\";\n if (svg) svg.replaceWith(next);\n else frame.append(next);\n svg = next;\n born = Date.now();\n drawMarks();\n controls?.fit(frame, next);\n controls?.mark(next, step);\n };\n const markup = (): string =>\n mode === \"follow\"\n ? drawSvg(rendered.diagram, rendered.layout, timeline, palette, rendered.theme, {\n width,\n ...(height === undefined ? {} : { height }),\n lang,\n })\n : rendered.svg;\n\n const now = (): number => (playing ? (at + (Date.now() - born) / 1000) % timeline.total : at);\n const stepAt = (t: number): number => {\n let found = 0;\n timeline.steps.forEach((span: Span, i) => {\n if (span.start <= t) found = i;\n });\n return found;\n };\n const show = (): void => {\n const current = steps[step];\n no.textContent = stepNo(step, count);\n title.textContent = current?.title ?? \"\";\n body.textContent = current?.body ?? \"\";\n toggleButton.setAttribute(\"aria-label\", playing ? words.pause : words.play);\n toggleButton.textContent = playing ? BUTTON_TEXT.pause : BUTTON_TEXT.play;\n if (svg) controls?.mark(svg, step);\n options.onStep?.(step);\n };\n const restart = (t: number, play: boolean): void => {\n at = t;\n playing = play;\n place();\n show();\n };\n const go = (target: number): void => {\n step = Math.min(count - 1, Math.max(0, target));\n const span = timeline.steps[step] as Span;\n restart(playing ? span.start : (timeline.stills[step] ?? span.start), playing);\n };\n\n /** 流し始める。1 度だけ流す図が最後の段の止め絵まで来ていれば、最初の段から流し直す */\n const resume = (): void => {\n if (once && at >= lastStill) {\n step = 0;\n at = 0;\n }\n restart(at, true);\n };\n\n /**\n * 試す図の今の原本の最後に段 `added` を足して描き直し、足した段へ移る。\n * 動きを嫌う設定では足した段の止め絵で止め、そうでなければ足した段を流して、その段の止め絵で止める。\n * 描けない原本になる時は段を足さずに訳を出し、偽を返す\n */\n const add = (added: Step): boolean => {\n if (!session || !controls) return false;\n const next = { ...session, steps: [...session.steps, added] };\n let drawn: Rendered;\n try {\n // 足した後も今の枠の幅で並べる。狭い枠で縦に組んだ形のまま描き直す (#3366)\n drawn = renderDiagram(next, { ...options, width: frameWidth() });\n } catch (error) {\n controls.refuse(error instanceof Error ? error.message : String(error));\n return false;\n }\n session = next;\n source = next;\n rendered = drawn;\n timeline = drawn.timeline;\n steps = drawn.diagram.steps;\n count = steps.length;\n lastStill = timeline.stills[count - 1] ?? 0;\n for (const room of text.querySelectorAll(\".dg-room\")) room.remove();\n drawRooms(doc, text, steps);\n fillList();\n width = frameWidth();\n height = frameHeight();\n mode = chooseView(rendered, width, height).mode;\n controls.update(drawn.layout as TryLayout);\n controls.arrange(mode, width);\n step = count - 1;\n const span = timeline.steps[step] as Span;\n playing = !reduce;\n at = playing ? span.start : (timeline.stills[step] ?? span.start);\n place(markup());\n show();\n return true;\n };\n\n controls?.arrange(mode, width);\n place(markup());\n show();\n if (controls) frame.append(controls.layer);\n\n const timer = win?.setInterval(() => {\n if (!playing) return;\n // 1 度だけ流す図は、1 周の中の時刻に直す前の経った時間で最後の段の止め絵まで来たかを見る\n if (once && at + (Date.now() - born) / 1000 >= lastStill) {\n step = count - 1;\n restart(lastStill, false);\n return;\n }\n const s = stepAt(now());\n if (s !== step) {\n step = s;\n show();\n }\n }, 120);\n const onPrev = (): void => go(step - 1);\n const onNext = (): void => go(step + 1);\n const onToggle = (): void => (playing ? restart(now(), false) : resume());\n // 段の番号を押すとその段へ移る。試す図のブロックの中のチップを押すと、書き換える欄を出す\n const onFigure = (event: Event): void => {\n const chip = controls ? (event.target as Element | null)?.closest?.(\"[data-chip]\") : null;\n if (chip) {\n controls?.pick(chip.getAttribute(\"data-chip\") ?? \"\", step);\n return;\n }\n const target = (event.target as Element | null)?.closest?.(\"[data-step]\");\n const s = target ? Number(target.getAttribute(\"data-step\")) : Number.NaN;\n if (Number.isInteger(s)) go(s);\n };\n prevButton.addEventListener(\"click\", onPrev);\n nextButton.addEventListener(\"click\", onNext);\n toggleButton.addEventListener(\"click\", onToggle);\n frame.addEventListener(\"click\", onFigure);\n\n // 枠の大きさが変わったら見せ方を選び直す。寄って追う窓は幅 (高さに収める時は高さも) で決まるので、変われば描き直す\n const Observer = (win as (Window & { ResizeObserver?: typeof ResizeObserver }) | null)\n ?.ResizeObserver;\n const observer = Observer\n ? new Observer(() => {\n const w = frameWidth();\n const h = frameHeight();\n const rearranged = arrange(w);\n const chosen = chooseView(rendered, w, h).mode;\n controls?.arrange(chosen, w);\n if (!rearranged && chosen === mode && (mode === \"fixed\" || (w === width && h === height))) {\n if (svg) controls?.fit(frame, svg);\n return;\n }\n const t = now();\n mode = chosen;\n width = w;\n height = h;\n at = t;\n place(markup());\n })\n : undefined;\n observer?.observe(frame);\n\n return {\n get step() {\n return step;\n },\n get playing() {\n return playing;\n },\n next: onNext,\n prev: onPrev,\n play: () => {\n if (!playing) resume();\n },\n pause: () => {\n if (playing) restart(now(), false);\n },\n goTo: (target: number) => {\n playing = false;\n go(target);\n },\n mark: (rects: readonly Rect[]) => {\n marked = rects;\n drawMarks();\n },\n get diagram() {\n // 読み手が足した段を含む今の原本は写しを返し、頁の側が書き換えても再生の部品の原本を変えない\n return session ? (JSON.parse(JSON.stringify(session)) as unknown) : diagram;\n },\n destroy: () => {\n if (timer !== undefined) win?.clearInterval(timer);\n observer?.disconnect();\n controls?.destroy();\n prevButton.removeEventListener(\"click\", onPrev);\n nextButton.removeEventListener(\"click\", onNext);\n toggleButton.removeEventListener(\"click\", onToggle);\n frame.removeEventListener(\"click\", onFigure);\n root.remove();\n },\n };\n}\n","/**\n * dragon の軽い入口 (`@cardenelabs/dragon/light`、#3248、#3349)。\n *\n * 既定の入口と同じ部品を出すが、git、lineup、state、time、tree、try の描く部品と、その図の種類だけの個別ブロックの読み方を持たない。\n * コアブロックと、時系列図と構成図の個別ブロックの読み方は初めから持つ。\n *\n * - `loadFor(<記法か原本>)` を待つと、書いた図の種類の描く部品と、書いた図が使う個別ブロックの読み方だけを読む\n * - `loadKind(<種類>)` を待つと、その種類の描く部品と、その種類の個別ブロックの読み方を全て読む (裏で先に読む時に使う)\n * - `loadReadings(<記法か原本>)` を待つと、書いた図が使う個別ブロックの読み方だけを読み、描く部品は読まない (題と種類だけを引く時に使う)\n * - `diagramKind(<記法か原本>)` は、読む前に図の種類を返す。どの種類の `loadKind` を待つかを決める時に使う\n *\n * 読んだ後は既定の入口と同じ関数で、待たずに同じ図を読み、描き、書き戻す。\n * 読んでいない種類を描くと種類の名前を含む誤りで、読んでいない個別ブロックの行を読むとブロックの名前を含む誤りで止まる。\n * 最初に読む量を抑えたい頁を束ねる時に使い、この入口と既定の入口を 1 つの頁で混ぜない (混ぜると全ての部品が頁に入る)。\n */\nimport { readingLoaded, registerReading } from \"./blocks/reading\";\nimport { LATER_READINGS } from \"./blocks/later-readings\";\nimport { blockKinds } from \"./blocks/usable\";\nimport { blocksUsedBy, kindOf } from \"./blocks/used\";\nimport { kindLoaded, LATER_KINDS, type LaterKind, type LaterKinds, registerKind } from \"./kinds/registry\";\nimport { FORMAT_VERSION, isVersion1, upgrade } from \"./model\";\nimport { printNotation } from \"./printer\";\nimport type { Diagram } from \"./schema\";\n\nexport * from \"./api\";\nexport { kindLoaded, LATER_KINDS, type LaterKind };\n\nconst LOADERS: { [K in LaterKind]: () => Promise<LaterKinds[K]> } = {\n git: () => import(\"./kinds/git\"),\n lineup: () => import(\"./kinds/lineup\"),\n state: () => import(\"./kinds/state\"),\n time: () => import(\"./kinds/time\"),\n tree: () => import(\"./kinds/tree\"),\n try: () => import(\"./kinds/try\"),\n};\n\n/** 後から読む個別ブロックの名前。書いた図が使う時か、その種類を `loadKind` で読んだ時に読む (#3349) */\nexport const LATER_BLOCKS: readonly string[] = Object.keys(LATER_READINGS);\n\n/** 個別ブロック `name` の読み方を今すぐ使える形で持っているか。コアブロックと、時系列図と構成図の個別ブロックは常に持つ */\nexport const blockLoaded = (name: string): boolean => readingLoaded(name);\n\nconst isLater = (kind: string | undefined): kind is LaterKind => (LATER_KINDS as readonly (string | undefined)[]).includes(kind);\n\n/** 版1の原本を版2へ移す。記法と版2の原本はそのまま */\nconst current = (source: string | object): string | object => (typeof source === \"string\" || !isVersion1(source) ? source : upgrade(source, FORMAT_VERSION));\n\n/**\n * 記法か原本 (版1か版2) の図の種類 (#3349)。記法は最初の空でない行の頭の語、原本は `kind` の欄。読めなければ `undefined`。\n * 読む前に、どの種類を待つかを決める時に使う\n */\nexport function diagramKind(source: string | object): string | undefined {\n const diagram = current(source);\n const kind = typeof diagram === \"string\" ? kindOf(diagram) : (diagram as { kind?: unknown }).kind;\n return typeof kind === \"string\" && kind !== \"\" ? kind : undefined;\n}\n\nasync function registerParts<K extends LaterKind>(kind: K): Promise<void> {\n registerKind(kind, await LOADERS[kind]());\n}\n\n/** 種類の描く部品を読む。読んでいれば何もしない */\nasync function loadParts(kind: string | undefined): Promise<void> {\n if (isLater(kind) && !kindLoaded(kind)) await registerParts(kind);\n}\n\n/** 個別ブロックの読み方を読む。読んでいるか、後から読むブロックでなければ何もしない */\nasync function loadBlocks(names: readonly string[]): Promise<void> {\n await Promise.all(\n names.map(async (name) => {\n const load = LATER_READINGS[name];\n if (load !== undefined && !readingLoaded(name)) registerReading(name, await load());\n }),\n );\n}\n\n/**\n * 種類の描く部品と、その種類の個別ブロックの読み方を全て読む。時系列図と構成図は初めから持つので何もしない。\n * 読み込みが落ちると拒否され、次に呼ぶと読み直す\n */\nexport async function loadKind(kind: string | undefined): Promise<void> {\n if (!isLater(kind)) return;\n await Promise.all([loadParts(kind), loadBlocks(LATER_BLOCKS.filter((name) => blockKinds(name).includes(kind)))]);\n}\n\n/**\n * 記法か原本 (版1か版2) の図を読んで書き戻すのに要る、個別ブロックの読み方だけを読む (#3349)。描く部品は読まない。\n * 原本を渡した時は、原本を書き戻した記法を読むのに要るブロックも読む (時間軸の図の線は、拡大の範囲のブロックが読む時に確かめる)。\n * 記法の題と種類だけを引き、描くのは後の頁に任せる時に使う。読み込みが落ちると拒否され、次に呼ぶと読み直す\n */\nexport async function loadReadings(source: string | object): Promise<void> {\n const diagram = current(source);\n await loadBlocks(blocksUsedBy(diagram));\n if (typeof diagram === \"string\") return;\n let printed: string;\n try {\n printed = printNotation(diagram as Diagram);\n } catch {\n // 書き戻せない原本は、読む処理 (`readDiagram`) がその誤りを返す\n return;\n }\n await loadBlocks(blocksUsedBy(printed));\n}\n\n/**\n * 記法か原本 (版1か版2) の図を読んで描くのに要る物だけを読む。書いた図の種類の描く部品と、書いた図が使う個別ブロックの読み方 (`loadReadings`、#3349)。\n * 図の種類が読めない記法や原本は何も読まずに終わり、読む処理がその誤りを返す。読み込みが落ちると拒否され、次に呼ぶと読み直す\n */\nexport async function loadFor(source: string | object): Promise<void> {\n await Promise.all([loadParts(diagramKind(source)), loadReadings(source)]);\n}\n"]}
|