@tiqian/engine 0.0.0-stage.1 → 0.1.0-alpha.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (478) hide show
  1. package/dist/org/tiqian/clreq/AdjustmentStylePolicy.d.ts +11 -0
  2. package/dist/org/tiqian/clreq/AdjustmentStylePolicy.js +21 -0
  3. package/dist/org/tiqian/clreq/AutoSpaceMode.d.ts +16 -0
  4. package/dist/org/tiqian/clreq/AutoSpaceMode.js +17 -0
  5. package/dist/org/tiqian/clreq/AutoSpacePolicy.d.ts +13 -0
  6. package/dist/org/tiqian/clreq/AutoSpacePolicy.js +23 -0
  7. package/dist/org/tiqian/clreq/BopomofoParser.d.ts +10 -0
  8. package/dist/org/tiqian/clreq/BopomofoParser.js +46 -0
  9. package/dist/org/tiqian/clreq/BopomofoReading.d.ts +12 -0
  10. package/dist/org/tiqian/clreq/BopomofoReading.js +86 -0
  11. package/dist/org/tiqian/clreq/BopomofoTone.d.ts +28 -0
  12. package/dist/org/tiqian/clreq/BopomofoTone.js +26 -0
  13. package/dist/org/tiqian/clreq/CjkPunctuationGlyphPolicy.d.ts +16 -0
  14. package/dist/org/tiqian/clreq/CjkPunctuationGlyphPolicy.js +17 -0
  15. package/dist/org/tiqian/clreq/CjkPunctuationGlyphSubstitution.d.ts +8 -0
  16. package/dist/org/tiqian/clreq/CjkPunctuationGlyphSubstitution.js +25 -0
  17. package/dist/org/tiqian/clreq/ClreqProfile.d.ts +27 -0
  18. package/dist/org/tiqian/clreq/ClreqProfile.js +58 -0
  19. package/dist/org/tiqian/clreq/ClreqProfileResolver.d.ts +10 -0
  20. package/dist/org/tiqian/clreq/ClreqProfileResolver.js +13 -0
  21. package/dist/org/tiqian/clreq/ClreqPunctuationAdvancePolicy.d.ts +7 -0
  22. package/dist/org/tiqian/clreq/ClreqPunctuationAdvancePolicy.js +40 -0
  23. package/dist/org/tiqian/clreq/ClreqPunctuationGlyphSubstitutor.d.ts +19 -0
  24. package/dist/org/tiqian/clreq/ClreqPunctuationGlyphSubstitutor.js +93 -0
  25. package/dist/org/tiqian/clreq/ClreqPunctuationPolicies.d.ts +26 -0
  26. package/dist/org/tiqian/clreq/ClreqPunctuationPolicies.js +137 -0
  27. package/dist/org/tiqian/clreq/ClreqRegion.d.ts +20 -0
  28. package/dist/org/tiqian/clreq/ClreqRegion.js +20 -0
  29. package/dist/org/tiqian/clreq/ClreqStrictness.d.ts +16 -0
  30. package/dist/org/tiqian/clreq/ClreqStrictness.js +17 -0
  31. package/dist/org/tiqian/clreq/GlueSide.d.ts +16 -0
  32. package/dist/org/tiqian/clreq/GlueSide.js +17 -0
  33. package/dist/org/tiqian/clreq/HangingPunctuationStyle.d.ts +12 -0
  34. package/dist/org/tiqian/clreq/HangingPunctuationStyle.js +14 -0
  35. package/dist/org/tiqian/clreq/InteriorPunctuationStyle.d.ts +12 -0
  36. package/dist/org/tiqian/clreq/InteriorPunctuationStyle.js +14 -0
  37. package/dist/org/tiqian/clreq/KinsokuLevel.d.ts +20 -0
  38. package/dist/org/tiqian/clreq/KinsokuLevel.js +20 -0
  39. package/dist/org/tiqian/clreq/KinsokuMode.d.ts +14 -0
  40. package/dist/org/tiqian/clreq/KinsokuMode.js +2 -0
  41. package/dist/org/tiqian/clreq/KinsokuModes.d.ts +11 -0
  42. package/dist/org/tiqian/clreq/KinsokuModes.js +71 -0
  43. package/dist/org/tiqian/clreq/LineAdjustmentStrategy.d.ts +16 -0
  44. package/dist/org/tiqian/clreq/LineAdjustmentStrategy.js +17 -0
  45. package/dist/org/tiqian/clreq/LineEndPunctuationStyle.d.ts +12 -0
  46. package/dist/org/tiqian/clreq/LineEndPunctuationStyle.js +14 -0
  47. package/dist/org/tiqian/clreq/NumberSymbolCohesion.d.ts +8 -0
  48. package/dist/org/tiqian/clreq/NumberSymbolCohesion.js +56 -0
  49. package/dist/org/tiqian/clreq/PunctuationClass.d.ts +44 -0
  50. package/dist/org/tiqian/clreq/PunctuationClass.js +38 -0
  51. package/dist/org/tiqian/clreq/PunctuationGluePlacement.d.ts +12 -0
  52. package/dist/org/tiqian/clreq/PunctuationGluePlacement.js +14 -0
  53. package/dist/org/tiqian/clreq/PunctuationGluePlacements.d.ts +9 -0
  54. package/dist/org/tiqian/clreq/PunctuationGluePlacements.js +49 -0
  55. package/dist/org/tiqian/clreq/PunctuationPolicy.d.ts +10 -0
  56. package/dist/org/tiqian/clreq/PunctuationPolicy.js +18 -0
  57. package/dist/org/tiqian/clreq/PunctuationWidthPolicy.d.ts +8 -0
  58. package/dist/org/tiqian/clreq/PunctuationWidthPolicy.js +16 -0
  59. package/dist/org/tiqian/clreq/ResolvedKinsoku.d.ts +12 -0
  60. package/dist/org/tiqian/clreq/ResolvedKinsoku.js +43 -0
  61. package/dist/org/tiqian/core/AccurateSum.d.ts +3 -0
  62. package/dist/org/tiqian/core/AccurateSum.js +9 -0
  63. package/dist/org/tiqian/core/AutoSpaceDecisionInfo.d.ts +13 -0
  64. package/dist/org/tiqian/core/AutoSpaceDecisionInfo.js +24 -0
  65. package/dist/org/tiqian/core/BopomofoDecisionInfo.d.ts +13 -0
  66. package/dist/org/tiqian/core/BopomofoDecisionInfo.js +32 -0
  67. package/dist/org/tiqian/core/BopomofoGlyphPlacement.d.ts +16 -0
  68. package/dist/org/tiqian/core/BopomofoGlyphPlacement.js +33 -0
  69. package/dist/org/tiqian/core/BopomofoGlyphRole.d.ts +16 -0
  70. package/dist/org/tiqian/core/BopomofoGlyphRole.js +17 -0
  71. package/dist/org/tiqian/core/BreakOpportunityDecisionInfo.d.ts +11 -0
  72. package/dist/org/tiqian/core/BreakOpportunityDecisionInfo.js +52 -0
  73. package/dist/org/tiqian/core/BuiltInLayoutProfiles.d.ts +4 -0
  74. package/dist/org/tiqian/core/BuiltInLayoutProfiles.js +5 -0
  75. package/dist/org/tiqian/core/Cluster.d.ts +13 -0
  76. package/dist/org/tiqian/core/Cluster.js +24 -0
  77. package/dist/org/tiqian/core/ClusterGeometryDecisionInfo.d.ts +21 -0
  78. package/dist/org/tiqian/core/ClusterGeometryDecisionInfo.js +40 -0
  79. package/dist/org/tiqian/core/ColorSpan.d.ts +8 -0
  80. package/dist/org/tiqian/core/ColorSpan.js +25 -0
  81. package/dist/org/tiqian/core/ContextualKinsokuDecisionInfo.d.ts +12 -0
  82. package/dist/org/tiqian/core/ContextualKinsokuDecisionInfo.js +47 -0
  83. package/dist/org/tiqian/core/DecorationDecisionInfo.d.ts +13 -0
  84. package/dist/org/tiqian/core/DecorationDecisionInfo.js +24 -0
  85. package/dist/org/tiqian/core/DecorationKind.d.ts +20 -0
  86. package/dist/org/tiqian/core/DecorationKind.js +20 -0
  87. package/dist/org/tiqian/core/DecorationSegmentInfo.d.ts +15 -0
  88. package/dist/org/tiqian/core/DecorationSegmentInfo.js +28 -0
  89. package/dist/org/tiqian/core/DecorationSpan.d.ts +10 -0
  90. package/dist/org/tiqian/core/DecorationSpan.js +36 -0
  91. package/dist/org/tiqian/core/EastAsianSpacingData.d.ts +4 -0
  92. package/dist/org/tiqian/core/EastAsianSpacingData.js +399 -0
  93. package/dist/org/tiqian/core/EastAsianSpacingEdges.d.ts +8 -0
  94. package/dist/org/tiqian/core/EastAsianSpacingEdges.js +14 -0
  95. package/dist/org/tiqian/core/EastAsianSpacingValue.d.ts +20 -0
  96. package/dist/org/tiqian/core/EastAsianSpacingValue.js +20 -0
  97. package/dist/org/tiqian/core/EmergencyTrackingEligibilityDecisionInfo.d.ts +9 -0
  98. package/dist/org/tiqian/core/EmergencyTrackingEligibilityDecisionInfo.js +29 -0
  99. package/dist/org/tiqian/core/FirstLineIndentDecisionInfo.d.ts +8 -0
  100. package/dist/org/tiqian/core/FirstLineIndentDecisionInfo.js +16 -0
  101. package/dist/org/tiqian/core/FittedLinePatternGeometry.d.ts +2 -0
  102. package/dist/org/tiqian/core/FittedLinePatternGeometry.js +84 -0
  103. package/dist/org/tiqian/core/FontDecisionInfo.d.ts +13 -0
  104. package/dist/org/tiqian/core/FontDecisionInfo.js +45 -0
  105. package/dist/org/tiqian/core/Glyph.d.ts +15 -0
  106. package/dist/org/tiqian/core/Glyph.js +30 -0
  107. package/dist/org/tiqian/core/GlyphRun.d.ts +11 -0
  108. package/dist/org/tiqian/core/GlyphRun.js +28 -0
  109. package/dist/org/tiqian/core/Ic.d.ts +7 -0
  110. package/dist/org/tiqian/core/Ic.js +17 -0
  111. package/dist/org/tiqian/core/IllegalStateException.d.ts +4 -0
  112. package/dist/org/tiqian/core/IllegalStateException.js +8 -0
  113. package/dist/org/tiqian/core/InlineAttachment.d.ts +12 -0
  114. package/dist/org/tiqian/core/InlineAttachment.js +14 -0
  115. package/dist/org/tiqian/core/InlineBoxDecisionInfo.d.ts +12 -0
  116. package/dist/org/tiqian/core/InlineBoxDecisionInfo.js +22 -0
  117. package/dist/org/tiqian/core/InlineBoxOuterSpacing.d.ts +12 -0
  118. package/dist/org/tiqian/core/InlineBoxOuterSpacing.js +14 -0
  119. package/dist/org/tiqian/core/InlineBoxSpan.d.ts +10 -0
  120. package/dist/org/tiqian/core/InlineBoxSpan.js +17 -0
  121. package/dist/org/tiqian/core/InlineObjectBoundaryAdjustment.d.ts +12 -0
  122. package/dist/org/tiqian/core/InlineObjectBoundaryAdjustment.js +31 -0
  123. package/dist/org/tiqian/core/InlineObjectDecisionInfo.d.ts +28 -0
  124. package/dist/org/tiqian/core/InlineObjectDecisionInfo.js +54 -0
  125. package/dist/org/tiqian/core/InlineObjectLineHeightDecisionInfo.d.ts +16 -0
  126. package/dist/org/tiqian/core/InlineObjectLineHeightDecisionInfo.js +57 -0
  127. package/dist/org/tiqian/core/InlineObjectPreferredStretch.d.ts +11 -0
  128. package/dist/org/tiqian/core/InlineObjectPreferredStretch.js +30 -0
  129. package/dist/org/tiqian/core/InlineObjectPreferredStretchKind.d.ts +16 -0
  130. package/dist/org/tiqian/core/InlineObjectPreferredStretchKind.js +17 -0
  131. package/dist/org/tiqian/core/InlineObjectPunctuationAttachmentDecisionInfo.d.ts +12 -0
  132. package/dist/org/tiqian/core/InlineObjectPunctuationAttachmentDecisionInfo.js +22 -0
  133. package/dist/org/tiqian/core/InlineObjectSpan.d.ts +13 -0
  134. package/dist/org/tiqian/core/InlineObjectSpan.js +22 -0
  135. package/dist/org/tiqian/core/IntRange.d.ts +12 -0
  136. package/dist/org/tiqian/core/IntRange.js +30 -0
  137. package/dist/org/tiqian/core/IntRangeFns.d.ts +2 -0
  138. package/dist/org/tiqian/core/IntRangeFns.js +4 -0
  139. package/dist/org/tiqian/core/JustificationAllocationInfo.d.ts +10 -0
  140. package/dist/org/tiqian/core/JustificationAllocationInfo.js +18 -0
  141. package/dist/org/tiqian/core/JustificationDecisionInfo.d.ts +10 -0
  142. package/dist/org/tiqian/core/JustificationDecisionInfo.js +21 -0
  143. package/dist/org/tiqian/core/KinsokuDecisionInfo.d.ts +8 -0
  144. package/dist/org/tiqian/core/KinsokuDecisionInfo.js +16 -0
  145. package/dist/org/tiqian/core/LastLineAlignment.d.ts +16 -0
  146. package/dist/org/tiqian/core/LastLineAlignment.js +17 -0
  147. package/dist/org/tiqian/core/LayoutConstraints.d.ts +7 -0
  148. package/dist/org/tiqian/core/LayoutConstraints.js +24 -0
  149. package/dist/org/tiqian/core/LayoutDebugInfo.d.ts +70 -0
  150. package/dist/org/tiqian/core/LayoutDebugInfo.js +205 -0
  151. package/dist/org/tiqian/core/LayoutInput.d.ts +22 -0
  152. package/dist/org/tiqian/core/LayoutInput.js +56 -0
  153. package/dist/org/tiqian/core/LayoutPaintBounds.d.ts +18 -0
  154. package/dist/org/tiqian/core/LayoutPaintBounds.js +131 -0
  155. package/dist/org/tiqian/core/LayoutProfileId.d.ts +6 -0
  156. package/dist/org/tiqian/core/LayoutProfileId.js +17 -0
  157. package/dist/org/tiqian/core/LayoutQueries.d.ts +121 -0
  158. package/dist/org/tiqian/core/LayoutQueries.js +1297 -0
  159. package/dist/org/tiqian/core/LayoutQueryFns.d.ts +27 -0
  160. package/dist/org/tiqian/core/LayoutQueryFns.js +65 -0
  161. package/dist/org/tiqian/core/LayoutResult.d.ts +16 -0
  162. package/dist/org/tiqian/core/LayoutResult.js +36 -0
  163. package/dist/org/tiqian/core/LayoutResultFns.d.ts +3 -0
  164. package/dist/org/tiqian/core/LayoutResultFns.js +5 -0
  165. package/dist/org/tiqian/core/LayoutResultLineFns.d.ts +4 -0
  166. package/dist/org/tiqian/core/LayoutResultLineFns.js +5 -0
  167. package/dist/org/tiqian/core/LayoutResultReplayIndex.d.ts +37 -0
  168. package/dist/org/tiqian/core/LayoutResultReplayIndex.js +379 -0
  169. package/dist/org/tiqian/core/LineBox.d.ts +23 -0
  170. package/dist/org/tiqian/core/LineBox.js +43 -0
  171. package/dist/org/tiqian/core/LineBreakPolicy.d.ts +8 -0
  172. package/dist/org/tiqian/core/LineBreakPolicy.js +11 -0
  173. package/dist/org/tiqian/core/LineBreakSpan.d.ts +10 -0
  174. package/dist/org/tiqian/core/LineBreakSpan.js +30 -0
  175. package/dist/org/tiqian/core/LineDebugInfo.d.ts +7 -0
  176. package/dist/org/tiqian/core/LineDebugInfo.js +18 -0
  177. package/dist/org/tiqian/core/LineDecisionInfo.d.ts +14 -0
  178. package/dist/org/tiqian/core/LineDecisionInfo.js +32 -0
  179. package/dist/org/tiqian/core/LineEdgeTrimDecisionInfo.d.ts +12 -0
  180. package/dist/org/tiqian/core/LineEdgeTrimDecisionInfo.js +22 -0
  181. package/dist/org/tiqian/core/LineEndReason.d.ts +16 -0
  182. package/dist/org/tiqian/core/LineEndReason.js +17 -0
  183. package/dist/org/tiqian/core/LineLengthGrid.d.ts +7 -0
  184. package/dist/org/tiqian/core/LineLengthGrid.js +12 -0
  185. package/dist/org/tiqian/core/LineLengthGridDecisionInfo.d.ts +13 -0
  186. package/dist/org/tiqian/core/LineLengthGridDecisionInfo.js +26 -0
  187. package/dist/org/tiqian/core/LineRepairAllocationInfo.d.ts +8 -0
  188. package/dist/org/tiqian/core/LineRepairAllocationInfo.js +14 -0
  189. package/dist/org/tiqian/core/LineRepairCandidateInfo.d.ts +16 -0
  190. package/dist/org/tiqian/core/LineRepairCandidateInfo.js +30 -0
  191. package/dist/org/tiqian/core/LineRepairDecisionInfo.d.ts +15 -0
  192. package/dist/org/tiqian/core/LineRepairDecisionInfo.js +31 -0
  193. package/dist/org/tiqian/core/LineSpacingDecisionInfo.d.ts +10 -0
  194. package/dist/org/tiqian/core/LineSpacingDecisionInfo.js +20 -0
  195. package/dist/org/tiqian/core/LinkAddressDisplay.d.ts +3 -0
  196. package/dist/org/tiqian/core/LinkAddressDisplay.js +12 -0
  197. package/dist/org/tiqian/core/MandatoryBreakDecisionInfo.d.ts +10 -0
  198. package/dist/org/tiqian/core/MandatoryBreakDecisionInfo.js +33 -0
  199. package/dist/org/tiqian/core/MaxLinesDecisionInfo.d.ts +8 -0
  200. package/dist/org/tiqian/core/MaxLinesDecisionInfo.js +25 -0
  201. package/dist/org/tiqian/core/MeasureAdaptiveFirstLineIndent.d.ts +8 -0
  202. package/dist/org/tiqian/core/MeasureAdaptiveFirstLineIndent.js +17 -0
  203. package/dist/org/tiqian/core/MetricDecisionInfo.d.ts +19 -0
  204. package/dist/org/tiqian/core/MetricDecisionInfo.js +36 -0
  205. package/dist/org/tiqian/core/ParagraphStyle.d.ts +22 -0
  206. package/dist/org/tiqian/core/ParagraphStyle.js +36 -0
  207. package/dist/org/tiqian/core/PositionedCluster.d.ts +22 -0
  208. package/dist/org/tiqian/core/PositionedCluster.js +52 -0
  209. package/dist/org/tiqian/core/PunctuationDecisionInfo.d.ts +29 -0
  210. package/dist/org/tiqian/core/PunctuationDecisionInfo.js +54 -0
  211. package/dist/org/tiqian/core/Rect.d.ts +12 -0
  212. package/dist/org/tiqian/core/Rect.js +28 -0
  213. package/dist/org/tiqian/core/RichTextBackgroundDrawStyle.d.ts +15 -0
  214. package/dist/org/tiqian/core/RichTextBackgroundDrawStyle.js +25 -0
  215. package/dist/org/tiqian/core/RichTextBackgroundMetricPolicy.d.ts +16 -0
  216. package/dist/org/tiqian/core/RichTextBackgroundMetricPolicy.js +17 -0
  217. package/dist/org/tiqian/core/RichTextBackgroundPaint.d.ts +19 -0
  218. package/dist/org/tiqian/core/RichTextBackgroundPaint.js +51 -0
  219. package/dist/org/tiqian/core/RichTextCornerRadii.d.ts +12 -0
  220. package/dist/org/tiqian/core/RichTextCornerRadii.js +28 -0
  221. package/dist/org/tiqian/core/RichTextLayoutProjection.d.ts +6 -0
  222. package/dist/org/tiqian/core/RichTextLayoutProjection.js +62 -0
  223. package/dist/org/tiqian/core/RichTextLinePattern.d.ts +24 -0
  224. package/dist/org/tiqian/core/RichTextLinePattern.js +46 -0
  225. package/dist/org/tiqian/core/RichTextLineSegment.d.ts +25 -0
  226. package/dist/org/tiqian/core/RichTextLineSegment.js +55 -0
  227. package/dist/org/tiqian/core/RichTextPaint.d.ts +17 -0
  228. package/dist/org/tiqian/core/RichTextPaint.js +64 -0
  229. package/dist/org/tiqian/core/RichTextProjectionFns.d.ts +7 -0
  230. package/dist/org/tiqian/core/RichTextProjectionFns.js +102 -0
  231. package/dist/org/tiqian/core/RichTextRole.d.ts +35 -0
  232. package/dist/org/tiqian/core/RichTextRole.js +57 -0
  233. package/dist/org/tiqian/core/RichTextSpan.d.ts +11 -0
  234. package/dist/org/tiqian/core/RichTextSpan.js +34 -0
  235. package/dist/org/tiqian/core/RoleOverrideInfo.d.ts +12 -0
  236. package/dist/org/tiqian/core/RoleOverrideInfo.js +41 -0
  237. package/dist/org/tiqian/core/RubyDecisionInfo.d.ts +20 -0
  238. package/dist/org/tiqian/core/RubyDecisionInfo.js +46 -0
  239. package/dist/org/tiqian/core/RubyKind.d.ts +12 -0
  240. package/dist/org/tiqian/core/RubyKind.js +14 -0
  241. package/dist/org/tiqian/core/RubyLineHeightDecisionInfo.d.ts +13 -0
  242. package/dist/org/tiqian/core/RubyLineHeightDecisionInfo.js +36 -0
  243. package/dist/org/tiqian/core/RubyLineHeightMode.d.ts +12 -0
  244. package/dist/org/tiqian/core/RubyLineHeightMode.js +14 -0
  245. package/dist/org/tiqian/core/RubySpan.d.ts +13 -0
  246. package/dist/org/tiqian/core/RubySpan.js +60 -0
  247. package/dist/org/tiqian/core/ShapingDecisionInfo.d.ts +21 -0
  248. package/dist/org/tiqian/core/ShapingDecisionInfo.js +40 -0
  249. package/dist/org/tiqian/core/Size.d.ts +6 -0
  250. package/dist/org/tiqian/core/Size.js +12 -0
  251. package/dist/org/tiqian/core/SourceBoundaryBias.d.ts +16 -0
  252. package/dist/org/tiqian/core/SourceBoundaryBias.js +17 -0
  253. package/dist/org/tiqian/core/SourceInteractionBoundaries.d.ts +29 -0
  254. package/dist/org/tiqian/core/SourceInteractionBoundaries.js +193 -0
  255. package/dist/org/tiqian/core/SpacingDecisionInfo.d.ts +13 -0
  256. package/dist/org/tiqian/core/SpacingDecisionInfo.js +24 -0
  257. package/dist/org/tiqian/core/TextRange.d.ts +11 -0
  258. package/dist/org/tiqian/core/TextRange.js +40 -0
  259. package/dist/org/tiqian/core/TextRangeError.d.ts +11 -0
  260. package/dist/org/tiqian/core/TextRangeError.js +2 -0
  261. package/dist/org/tiqian/core/TextSpan.d.ts +8 -0
  262. package/dist/org/tiqian/core/TextSpan.js +12 -0
  263. package/dist/org/tiqian/core/TextStyle.d.ts +12 -0
  264. package/dist/org/tiqian/core/TextStyle.js +28 -0
  265. package/dist/org/tiqian/core/TiqianIllegalArgumentException.d.ts +6 -0
  266. package/dist/org/tiqian/core/TiqianIllegalArgumentException.js +21 -0
  267. package/dist/org/tiqian/core/TiqianNoSuchElementException.d.ts +10 -0
  268. package/dist/org/tiqian/core/TiqianNoSuchElementException.js +16 -0
  269. package/dist/org/tiqian/core/TiqianTextContent.d.ts +12 -0
  270. package/dist/org/tiqian/core/TiqianTextContent.js +38 -0
  271. package/dist/org/tiqian/core/UnicodeCombiningMarkData.d.ts +3 -0
  272. package/dist/org/tiqian/core/UnicodeCombiningMarkData.js +109 -0
  273. package/dist/org/tiqian/core/UnicodeEastAsianSpacing.d.ts +16 -0
  274. package/dist/org/tiqian/core/UnicodeEastAsianSpacing.js +88 -0
  275. package/dist/org/tiqian/core/UnicodeEmojiModifierBaseData.d.ts +3 -0
  276. package/dist/org/tiqian/core/UnicodeEmojiModifierBaseData.js +35 -0
  277. package/dist/org/tiqian/core/UnicodeExtendedPictographicData.d.ts +3 -0
  278. package/dist/org/tiqian/core/UnicodeExtendedPictographicData.js +64 -0
  279. package/dist/org/tiqian/core/UnicodeNumber.d.ts +3 -0
  280. package/dist/org/tiqian/core/UnicodeNumber.js +14 -0
  281. package/dist/org/tiqian/core/UnicodeNumberData.d.ts +3 -0
  282. package/dist/org/tiqian/core/UnicodeNumberData.js +64 -0
  283. package/dist/org/tiqian/core/UnicodeScriptEvidence.d.ts +16 -0
  284. package/dist/org/tiqian/core/UnicodeScriptEvidence.js +17 -0
  285. package/dist/org/tiqian/core/UnicodeScriptEvidenceClassifier.d.ts +7 -0
  286. package/dist/org/tiqian/core/UnicodeScriptEvidenceClassifier.js +17 -0
  287. package/dist/org/tiqian/core/UnicodeScriptEvidenceData.d.ts +4 -0
  288. package/dist/org/tiqian/core/UnicodeScriptEvidenceData.js +295 -0
  289. package/dist/org/tiqian/core/UnicodeWordCharacter.d.ts +6 -0
  290. package/dist/org/tiqian/core/UnicodeWordCharacter.js +17 -0
  291. package/dist/org/tiqian/core/UnicodeWordCharacterData.d.ts +3 -0
  292. package/dist/org/tiqian/core/UnicodeWordCharacterData.js +234 -0
  293. package/dist/org/tiqian/core/Units.d.ts +7 -0
  294. package/dist/org/tiqian/core/Units.js +11 -0
  295. package/dist/org/tiqian/core/WritingMode.d.ts +12 -0
  296. package/dist/org/tiqian/core/WritingMode.js +14 -0
  297. package/dist/org/tiqian/core/ZeroWidthBreakDecisionInfo.d.ts +10 -0
  298. package/dist/org/tiqian/core/ZeroWidthBreakDecisionInfo.js +33 -0
  299. package/dist/org/tiqian/font/BaselineClass.d.ts +24 -0
  300. package/dist/org/tiqian/font/BaselineClass.js +23 -0
  301. package/dist/org/tiqian/font/BaselinePolicy.d.ts +17 -0
  302. package/dist/org/tiqian/font/BaselinePolicy.js +18 -0
  303. package/dist/org/tiqian/font/CjkDashCapabilityPolicy.d.ts +4 -0
  304. package/dist/org/tiqian/font/CjkDashCapabilityPolicy.js +9 -0
  305. package/dist/org/tiqian/font/CjkFontRoleClassifier.d.ts +8 -0
  306. package/dist/org/tiqian/font/CjkFontRoleClassifier.js +43 -0
  307. package/dist/org/tiqian/font/FontMetricSource.d.ts +24 -0
  308. package/dist/org/tiqian/font/FontMetricSource.js +23 -0
  309. package/dist/org/tiqian/font/FontMetrics.d.ts +39 -0
  310. package/dist/org/tiqian/font/FontMetrics.js +106 -0
  311. package/dist/org/tiqian/font/FontMetricsPolicy.d.ts +21 -0
  312. package/dist/org/tiqian/font/FontMetricsPolicy.js +21 -0
  313. package/dist/org/tiqian/font/FontPolicy.d.ts +36 -0
  314. package/dist/org/tiqian/font/FontPolicy.js +157 -0
  315. package/dist/org/tiqian/font/FontRole.d.ts +29 -0
  316. package/dist/org/tiqian/font/FontRole.js +27 -0
  317. package/dist/org/tiqian/font/FontRoleContext.d.ts +13 -0
  318. package/dist/org/tiqian/font/FontRoleContext.js +28 -0
  319. package/dist/org/tiqian/font/InlineShapingStylePolicy.d.ts +4 -0
  320. package/dist/org/tiqian/font/InlineShapingStylePolicy.js +18 -0
  321. package/dist/org/tiqian/font/LayoutFontMetrics.d.ts +18 -0
  322. package/dist/org/tiqian/font/LayoutFontMetrics.js +29 -0
  323. package/dist/org/tiqian/font/MetricBox.d.ts +20 -0
  324. package/dist/org/tiqian/font/MetricBox.js +20 -0
  325. package/dist/org/tiqian/font/PreferCjkForAmbiguousPunctuationResolver.d.ts +10 -0
  326. package/dist/org/tiqian/font/PreferCjkForAmbiguousPunctuationResolver.js +30 -0
  327. package/dist/org/tiqian/font/PunctuationFontPolicy.d.ts +21 -0
  328. package/dist/org/tiqian/font/PunctuationFontPolicy.js +21 -0
  329. package/dist/org/tiqian/font/RawFontMetrics.d.ts +11 -0
  330. package/dist/org/tiqian/font/RawFontMetrics.js +23 -0
  331. package/dist/org/tiqian/font/UnicodeEmojiData.d.ts +3 -0
  332. package/dist/org/tiqian/font/UnicodeEmojiData.js +63 -0
  333. package/dist/org/tiqian/font/UnicodeEmojiPresentationData.d.ts +3 -0
  334. package/dist/org/tiqian/font/UnicodeEmojiPresentationData.js +46 -0
  335. package/dist/org/tiqian/font/UnicodeEmojiStyleVariationData.d.ts +3 -0
  336. package/dist/org/tiqian/font/UnicodeEmojiStyleVariationData.js +71 -0
  337. package/dist/org/tiqian/font/UnicodeSymbolData.d.ts +3 -0
  338. package/dist/org/tiqian/font/UnicodeSymbolData.js +88 -0
  339. package/dist/org/tiqian/layout/AnnotationGeometryStage.d.ts +57 -0
  340. package/dist/org/tiqian/layout/AnnotationGeometryStage.js +622 -0
  341. package/dist/org/tiqian/layout/AsciiPointMarkKinsokuTestSupport.d.ts +52 -0
  342. package/dist/org/tiqian/layout/AsciiPointMarkKinsokuTestSupport.js +209 -0
  343. package/dist/org/tiqian/layout/ClusterRoleResolution.d.ts +30 -0
  344. package/dist/org/tiqian/layout/ClusterRoleResolution.js +215 -0
  345. package/dist/org/tiqian/layout/ContextualDashEllipsisRoleResolver.d.ts +54 -0
  346. package/dist/org/tiqian/layout/ContextualDashEllipsisRoleResolver.js +326 -0
  347. package/dist/org/tiqian/layout/ContextualPunctuationDisplaySubstitution.d.ts +6 -0
  348. package/dist/org/tiqian/layout/ContextualPunctuationDisplaySubstitution.js +8 -0
  349. package/dist/org/tiqian/layout/ContextualQuoteRoleResolver.d.ts +51 -0
  350. package/dist/org/tiqian/layout/ContextualQuoteRoleResolver.js +305 -0
  351. package/dist/org/tiqian/layout/DefaultHyphenator.d.ts +4 -0
  352. package/dist/org/tiqian/layout/DefaultHyphenator.js +7 -0
  353. package/dist/org/tiqian/layout/Justifier.d.ts +64 -0
  354. package/dist/org/tiqian/layout/Justifier.js +474 -0
  355. package/dist/org/tiqian/layout/KinsokuRule.d.ts +15 -0
  356. package/dist/org/tiqian/layout/KinsokuRule.js +24 -0
  357. package/dist/org/tiqian/layout/LayoutDebugAssembly.d.ts +87 -0
  358. package/dist/org/tiqian/layout/LayoutDebugAssembly.js +371 -0
  359. package/dist/org/tiqian/layout/LineAdjustmentStage.d.ts +29 -0
  360. package/dist/org/tiqian/layout/LineAdjustmentStage.js +797 -0
  361. package/dist/org/tiqian/layout/LineBreakPlanningStage.d.ts +149 -0
  362. package/dist/org/tiqian/layout/LineBreakPlanningStage.js +769 -0
  363. package/dist/org/tiqian/layout/LineBreaker.d.ts +54 -0
  364. package/dist/org/tiqian/layout/LineBreaker.js +457 -0
  365. package/dist/org/tiqian/layout/LineGeometryStage.d.ts +63 -0
  366. package/dist/org/tiqian/layout/LineGeometryStage.js +344 -0
  367. package/dist/org/tiqian/layout/LineOptimization.d.ts +125 -0
  368. package/dist/org/tiqian/layout/LineOptimization.js +299 -0
  369. package/dist/org/tiqian/layout/LineRepair.d.ts +30 -0
  370. package/dist/org/tiqian/layout/LineRepair.js +471 -0
  371. package/dist/org/tiqian/layout/ParagraphDpLineBreaker.d.ts +80 -0
  372. package/dist/org/tiqian/layout/ParagraphDpLineBreaker.js +556 -0
  373. package/dist/org/tiqian/layout/ParagraphDpLineBreakerTestSupport.d.ts +23 -0
  374. package/dist/org/tiqian/layout/ParagraphDpLineBreakerTestSupport.js +135 -0
  375. package/dist/org/tiqian/layout/ParagraphLayoutEngine.d.ts +48 -0
  376. package/dist/org/tiqian/layout/ParagraphLayoutEngine.js +199 -0
  377. package/dist/org/tiqian/layout/ParagraphShapingStage.d.ts +63 -0
  378. package/dist/org/tiqian/layout/ParagraphShapingStage.js +1471 -0
  379. package/dist/org/tiqian/layout/PlanLowering.d.ts +10 -0
  380. package/dist/org/tiqian/layout/PlanLowering.js +329 -0
  381. package/dist/org/tiqian/layout/PreparedParagraph.d.ts +32 -0
  382. package/dist/org/tiqian/layout/PreparedParagraph.js +114 -0
  383. package/dist/org/tiqian/layout/ProgressiveBreakDecisions.d.ts +86 -0
  384. package/dist/org/tiqian/layout/ProgressiveBreakDecisions.js +415 -0
  385. package/dist/org/tiqian/layout/ProgressiveBreakTierPriority.d.ts +5 -0
  386. package/dist/org/tiqian/layout/ProgressiveBreakTierPriority.js +33 -0
  387. package/dist/org/tiqian/layout/PunctuationGeometryLedger.d.ts +92 -0
  388. package/dist/org/tiqian/layout/PunctuationGeometryLedger.js +617 -0
  389. package/dist/org/tiqian/layout/PunctuationGeometryStage.d.ts +73 -0
  390. package/dist/org/tiqian/layout/PunctuationGeometryStage.js +631 -0
  391. package/dist/org/tiqian/layout/PunctuationModel.d.ts +181 -0
  392. package/dist/org/tiqian/layout/PunctuationModel.js +414 -0
  393. package/dist/org/tiqian/layout/QuotePairAnalyzer.d.ts +63 -0
  394. package/dist/org/tiqian/layout/QuotePairAnalyzer.js +251 -0
  395. package/dist/org/tiqian/layout/UnicodePunctuationBoundaryResolver.d.ts +88 -0
  396. package/dist/org/tiqian/layout/UnicodePunctuationBoundaryResolver.js +495 -0
  397. package/dist/org/tiqian/layout/WidthIndependentAnnotationCache.d.ts +102 -0
  398. package/dist/org/tiqian/layout/WidthIndependentAnnotationCache.js +1207 -0
  399. package/dist/org/tiqian/linebreak/BreakKind.d.ts +20 -0
  400. package/dist/org/tiqian/linebreak/BreakKind.js +20 -0
  401. package/dist/org/tiqian/linebreak/BreakOpportunity.d.ts +19 -0
  402. package/dist/org/tiqian/linebreak/BreakOpportunity.js +64 -0
  403. package/dist/org/tiqian/linebreak/EnglishHyphenation.d.ts +5 -0
  404. package/dist/org/tiqian/linebreak/EnglishHyphenation.js +14 -0
  405. package/dist/org/tiqian/linebreak/EnglishHyphenationPatterns.d.ts +4 -0
  406. package/dist/org/tiqian/linebreak/EnglishHyphenationPatterns.js +4294 -0
  407. package/dist/org/tiqian/linebreak/Hyphenator.d.ts +17 -0
  408. package/dist/org/tiqian/linebreak/Hyphenator.js +24 -0
  409. package/dist/org/tiqian/linebreak/LiangHyphenator.d.ts +10 -0
  410. package/dist/org/tiqian/linebreak/LiangHyphenator.js +67 -0
  411. package/dist/org/tiqian/linebreak/LineBreakAnalyzer.d.ts +9 -0
  412. package/dist/org/tiqian/linebreak/LineBreakAnalyzer.js +23 -0
  413. package/dist/org/tiqian/linebreak/LineBreakFns.d.ts +2 -0
  414. package/dist/org/tiqian/linebreak/LineBreakFns.js +7 -0
  415. package/dist/org/tiqian/linebreak/ParseTexHyphenationPatterns.d.ts +7 -0
  416. package/dist/org/tiqian/linebreak/ParseTexHyphenationPatterns.js +108 -0
  417. package/dist/org/tiqian/linebreak/ParsedTexHyphenation.d.ts +6 -0
  418. package/dist/org/tiqian/linebreak/ParsedTexHyphenation.js +9 -0
  419. package/dist/org/tiqian/linebreak/UnicodePunctuationLineBreak.d.ts +63 -0
  420. package/dist/org/tiqian/linebreak/UnicodePunctuationLineBreak.js +103 -0
  421. package/dist/org/tiqian/linebreak/UnicodePunctuationLineBreakData.d.ts +3 -0
  422. package/dist/org/tiqian/linebreak/UnicodePunctuationLineBreakData.js +164 -0
  423. package/dist/org/tiqian/protocol/NamedError.d.ts +88 -0
  424. package/dist/org/tiqian/protocol/NamedError.js +71 -0
  425. package/dist/org/tiqian/protocol/NamedErrorNames.d.ts +5 -0
  426. package/dist/org/tiqian/protocol/NamedErrorNames.js +53 -0
  427. package/dist/org/tiqian/protocol/Plan.d.ts +101 -0
  428. package/dist/org/tiqian/protocol/Plan.js +10 -0
  429. package/dist/org/tiqian/protocol/PlanEndReason.d.ts +16 -0
  430. package/dist/org/tiqian/protocol/PlanEndReason.js +17 -0
  431. package/dist/org/tiqian/protocol/PlanJson.d.ts +10 -0
  432. package/dist/org/tiqian/protocol/PlanJson.js +442 -0
  433. package/dist/org/tiqian/protocol/PlanJsonNumber.d.ts +43 -0
  434. package/dist/org/tiqian/protocol/PlanJsonNumber.js +362 -0
  435. package/dist/org/tiqian/protocol/PlanPacked.d.ts +34 -0
  436. package/dist/org/tiqian/protocol/PlanPacked.js +1166 -0
  437. package/dist/org/tiqian/protocol/PlanSchema.d.ts +4 -0
  438. package/dist/org/tiqian/protocol/PlanSchema.js +5 -0
  439. package/dist/org/tiqian/protocol/PlanStyleDelta.d.ts +5 -0
  440. package/dist/org/tiqian/protocol/PlanStyleDelta.js +2 -0
  441. package/dist/org/tiqian/shaping/ReplayableFontBackend.d.ts +48 -0
  442. package/dist/org/tiqian/shaping/ReplayableFontBackend.js +97 -0
  443. package/dist/org/tiqian/shaping/TextShaper.d.ts +71 -0
  444. package/dist/org/tiqian/shaping/TextShaper.js +176 -0
  445. package/dist/org/tiqian/test/TestHelpers.d.ts +5 -0
  446. package/dist/org/tiqian/test/TestHelpers.js +27 -0
  447. package/dist/org/tiqian/test/trace/TestTrace.d.ts +6 -0
  448. package/dist/org/tiqian/test/trace/TestTrace.js +8 -0
  449. package/dist/org/tiqian/test/trace/TestTracePlatform.d.ts +6 -0
  450. package/dist/org/tiqian/test/trace/TestTracePlatform.js +78 -0
  451. package/dist/org/tiqian/test/trace/TestTraceRecorder.d.ts +9 -0
  452. package/dist/org/tiqian/test/trace/TestTraceRecorder.js +36 -0
  453. package/dist/org/tiqian/test/trace/TestTraceRender.d.ts +47 -0
  454. package/dist/org/tiqian/test/trace/TestTraceRender.js +690 -0
  455. package/dist/org/tiqian/test/trace/TestTraceStore.d.ts +18 -0
  456. package/dist/org/tiqian/test/trace/TestTraceStore.js +149 -0
  457. package/dist/org/tiqian/test/trace/TraceAssertionError.d.ts +5 -0
  458. package/dist/org/tiqian/test/trace/TraceAssertionError.js +2 -0
  459. package/dist/org/tiqian/test/trace/TraceAssertionException.d.ts +6 -0
  460. package/dist/org/tiqian/test/trace/TraceAssertionException.js +16 -0
  461. package/dist/org/tiqian/test/trace/TraceField.d.ts +5 -0
  462. package/dist/org/tiqian/test/trace/TraceField.js +10 -0
  463. package/dist/org/tiqian/test/trace/TraceFormat.d.ts +21 -0
  464. package/dist/org/tiqian/test/trace/TraceFormat.js +184 -0
  465. package/dist/org/tiqian/test/trace/TracedAssertions.d.ts +78 -0
  466. package/dist/org/tiqian/test/trace/TracedAssertions.js +749 -0
  467. package/dist/runtime.d.ts +96 -0
  468. package/dist/runtime.js +1612 -0
  469. package/dist/std/FsError.d.ts +48 -0
  470. package/dist/std/FsError.js +2 -0
  471. package/dist/std/FsException.d.ts +6 -0
  472. package/dist/std/FsException.js +45 -0
  473. package/dist/std/UStringException.d.ts +6 -0
  474. package/dist/std/UStringException.js +21 -0
  475. package/dist/std/UStringFault.d.ts +9 -0
  476. package/dist/std/UStringFault.js +2 -0
  477. package/package.json +22 -4
  478. package/README.md +0 -3
@@ -0,0 +1,1166 @@
1
+ // Generated by the reflaxe TypeScript target. Do not edit.
2
+ import { PlanEndReason } from "./PlanEndReason.js";
3
+ import { BytesBuffer, doubleToI64, i64ToDouble } from "../../../runtime.js";
4
+ export class PlanPackedWriter {
5
+ buf;
6
+ constructor() {
7
+ this.buf = new BytesBuffer();
8
+ }
9
+ u8(v) {
10
+ this.buf.addByte(v & 255);
11
+ }
12
+ u16(v) {
13
+ this.buf.addByte(v & 255);
14
+ this.buf.addByte((v >>> 8) & 255);
15
+ }
16
+ u32(v) {
17
+ this.buf.addByte(v & 255);
18
+ this.buf.addByte((v >>> 8) & 255);
19
+ this.buf.addByte((v >>> 16) & 255);
20
+ this.buf.addByte((v >>> 24) & 255);
21
+ }
22
+ f64(v) {
23
+ const bits = doubleToI64(v);
24
+ this.u32(bits.low);
25
+ this.u32(bits.high);
26
+ }
27
+ raw(bytes) {
28
+ for (let i = 0, count = bytes.length; i < count; i += 1) {
29
+ this.buf.addByte(bytes[i]);
30
+ }
31
+ }
32
+ finish() {
33
+ return this.buf.getBytes();
34
+ }
35
+ }
36
+ export class PlanPackedReader {
37
+ bytes;
38
+ pos;
39
+ failed;
40
+ constructor(bytes) {
41
+ this.bytes = bytes;
42
+ this.pos = 0;
43
+ this.failed = false;
44
+ }
45
+ u8() {
46
+ if (!this.need(1)) {
47
+ return 0;
48
+ }
49
+ const v = this.bytes[this.pos];
50
+ this.pos += 1;
51
+ return v;
52
+ }
53
+ u32() {
54
+ if (!this.need(4)) {
55
+ return 0;
56
+ }
57
+ const v = (this.bytes[this.pos] | (this.bytes[this.pos + 1] << 8) | (this.bytes[this.pos + 2] << 16)) + this.bytes[this.pos + 3] * 16777216;
58
+ this.pos += 4;
59
+ return v;
60
+ }
61
+ f64() {
62
+ const low = this.u32();
63
+ const high = this.u32();
64
+ if (this.failed) {
65
+ return 0.0;
66
+ }
67
+ return i64ToDouble(low, high);
68
+ }
69
+ string(len) {
70
+ if (!this.need(len)) {
71
+ return "";
72
+ }
73
+ const s = new TextDecoder().decode(this.bytes.subarray(this.pos, this.pos + len));
74
+ this.pos += len;
75
+ return s;
76
+ }
77
+ need(length) {
78
+ if (this.failed) {
79
+ return false;
80
+ }
81
+ if (length < 0 || this.pos + length > this.bytes.length) {
82
+ this.failed = true;
83
+ return false;
84
+ }
85
+ return true;
86
+ }
87
+ }
88
+ export class StringPool {
89
+ ordered;
90
+ constructor() {
91
+ this.ordered = [];
92
+ }
93
+ intern(value) {
94
+ for (let i = 0, count2 = this.ordered.length; i < count2; i += 1) {
95
+ if (this.ordered[i] === value) {
96
+ return i;
97
+ }
98
+ }
99
+ const idx = this.ordered.length;
100
+ this.ordered.push(value);
101
+ return idx;
102
+ }
103
+ indexOf(value) {
104
+ for (let i = 0, count3 = this.ordered.length; i < count3; i += 1) {
105
+ if (this.ordered[i] === value) {
106
+ return i;
107
+ }
108
+ }
109
+ return -1;
110
+ }
111
+ }
112
+ export class PlanPacked {
113
+ static f32(v) {
114
+ return v;
115
+ }
116
+ static encode(plan) {
117
+ const pool = new StringPool();
118
+ const writer = new PlanPackedWriter();
119
+ const cellRangeStart = [];
120
+ const cellRangeEnd = [];
121
+ const cellSourceRef = [];
122
+ const cellDisplayRef = [];
123
+ const cellDrawX = [];
124
+ const cellNaturalWidth = [];
125
+ const cellLeadingAdvance = [];
126
+ const cellShapingBoundary = [];
127
+ const cellLatin = [];
128
+ const cellRenderFamilyRef = [];
129
+ const cellDashRef = [];
130
+ const cellLanguageRef = [];
131
+ const cellResolvedFaceRef = [];
132
+ const cellGlyphIdsRef = [];
133
+ const cellEvidenceRef = [];
134
+ const cellInkFloor = [];
135
+ const cellBodyWidth = [];
136
+ const cellAdvance = [];
137
+ const cellInlineObject = [];
138
+ const cellStyleFontSize = [];
139
+ const cellStyleFontWeight = [];
140
+ const cellStyleItalic = [];
141
+ const cellFeatureOffset = [];
142
+ const cellFeatureCount = [];
143
+ const featurePool = [];
144
+ let cellCount = 0;
145
+ {
146
+ const _g1 = plan.lines;
147
+ for (let _g_index = 0, count59 = _g1.length; _g_index < count59; _g_index += 1) {
148
+ const line = _g1[_g_index];
149
+ cellCount += line.cells.length;
150
+ }
151
+ }
152
+ {
153
+ const _g12 = plan.lines;
154
+ for (let _g_index1 = 0, count60 = _g12.length; _g_index1 < count60; _g_index1 += 1) {
155
+ const line2 = _g12[_g_index1];
156
+ {
157
+ let _g = 0;
158
+ const _g13 = line2.cells;
159
+ while (_g < _g13.length) {
160
+ const cell = _g13[_g];
161
+ _g++;
162
+ cellRangeStart.push(cell.rangeStart);
163
+ cellRangeEnd.push(cell.rangeEnd);
164
+ cellSourceRef.push(pool.intern(cell.source));
165
+ cellDisplayRef.push(pool.intern(cell.display));
166
+ cellDrawX.push(cell.drawX);
167
+ cellNaturalWidth.push(cell.naturalWidth);
168
+ cellLeadingAdvance.push(cell.leadingLayoutAdvance);
169
+ cellShapingBoundary.push((cell.shapingBoundary ? 1 : 0));
170
+ cellLatin.push((cell.latin ? 1 : 0));
171
+ cellRenderFamilyRef.push((cell.renderFontFamily !== null ? pool.intern((cell.renderFontFamily)) : -1));
172
+ cellDashRef.push((cell.dashStrategy !== null ? pool.intern((cell.dashStrategy)) : -1));
173
+ cellLanguageRef.push((cell.shapingLanguage !== null ? pool.intern((cell.shapingLanguage)) : -1));
174
+ cellResolvedFaceRef.push((cell.resolvedFace !== null ? pool.intern((cell.resolvedFace)) : -1));
175
+ cellGlyphIdsRef.push((cell.glyphIds !== null ? pool.intern((cell.glyphIds)) : -1));
176
+ cellEvidenceRef.push((cell.shapingEvidence !== null ? pool.intern((cell.shapingEvidence)) : -1));
177
+ const ink = cell.punctuationInkFloor;
178
+ cellInkFloor.push(((ink !== null ? ink : Number.NaN)));
179
+ const bw = cell.punctuationBodyWidth;
180
+ cellBodyWidth.push(((bw !== null ? bw : Number.NaN)));
181
+ const adv = cell.advance;
182
+ cellAdvance.push(((adv !== null ? adv : Number.NaN)));
183
+ const inl = cell.inlineObject;
184
+ cellInlineObject.push(((inl !== null ? inl : Number.NaN)));
185
+ const style = cell.styleDelta;
186
+ let styleFontSize = Number.NaN;
187
+ let styleFontWeight = Number.NaN;
188
+ let styleItalic = 2;
189
+ if (style !== null) {
190
+ const fs = style.fontSize;
191
+ if (fs !== null) {
192
+ styleFontSize = fs;
193
+ }
194
+ const fw = style.fontWeight;
195
+ if (fw !== null) {
196
+ styleFontWeight = PlanPacked.f32((fw));
197
+ }
198
+ const it = style.italic;
199
+ if (it !== null) {
200
+ styleItalic = (it ? 1 : 0);
201
+ }
202
+ }
203
+ cellStyleFontSize.push(styleFontSize);
204
+ cellStyleFontWeight.push(styleFontWeight);
205
+ cellStyleItalic.push(styleItalic);
206
+ const feats = cell.openTypeFeatures;
207
+ {
208
+ let _g2 = 0;
209
+ while (_g2 < feats.length) {
210
+ const f = feats[_g2];
211
+ _g2++;
212
+ pool.intern(f);
213
+ }
214
+ }
215
+ cellFeatureOffset.push(featurePool.length);
216
+ cellFeatureCount.push(feats.length);
217
+ {
218
+ let _g3 = 0;
219
+ while (_g3 < feats.length) {
220
+ const f2 = feats[_g3];
221
+ _g3++;
222
+ featurePool.push(pool.indexOf(f2));
223
+ }
224
+ }
225
+ }
226
+ }
227
+ }
228
+ }
229
+ const rubyBaseStart = [];
230
+ const rubyBaseEnd = [];
231
+ const rubyTextRef = [];
232
+ const rubyCenterX = [];
233
+ const rubyBaselineY = [];
234
+ const rubyFontSize = [];
235
+ const rubyFontWeight = [];
236
+ const rubyFamilyOffset = [];
237
+ const rubyFamilyCount = [];
238
+ const rubyAscent = [];
239
+ const rubyFamilyPool = [];
240
+ {
241
+ const _g14 = plan.rubyDecisions;
242
+ for (let _g_index2 = 0, count61 = _g14.length; _g_index2 < count61; _g_index2 += 1) {
243
+ const ruby = _g14[_g_index2];
244
+ {
245
+ let _g4 = 0;
246
+ const _g15 = ruby.fontFamilies;
247
+ while (_g4 < _g15.length) {
248
+ const fam = _g15[_g4];
249
+ _g4++;
250
+ pool.intern(fam);
251
+ }
252
+ }
253
+ pool.intern(ruby.text);
254
+ }
255
+ }
256
+ {
257
+ const _g16 = plan.rubyDecisions;
258
+ for (let _g_index3 = 0, count62 = _g16.length; _g_index3 < count62; _g_index3 += 1) {
259
+ const ruby2 = _g16[_g_index3];
260
+ rubyBaseStart.push(ruby2.baseRangeStart);
261
+ rubyBaseEnd.push(ruby2.baseRangeEnd);
262
+ rubyTextRef.push(pool.indexOf(ruby2.text));
263
+ rubyCenterX.push(ruby2.centerX);
264
+ rubyBaselineY.push(ruby2.baselineY);
265
+ rubyFontSize.push(ruby2.fontSize);
266
+ rubyFontWeight.push(ruby2.fontWeight);
267
+ rubyFamilyOffset.push(rubyFamilyPool.length);
268
+ rubyFamilyCount.push(ruby2.fontFamilies.length);
269
+ const ascent = ruby2.ascent;
270
+ rubyAscent.push(((ascent !== null ? ascent : Number.NaN)));
271
+ {
272
+ let _g5 = 0;
273
+ const _g17 = ruby2.fontFamilies;
274
+ while (_g5 < _g17.length) {
275
+ const fam2 = _g17[_g5];
276
+ _g5++;
277
+ rubyFamilyPool.push(pool.indexOf(fam2));
278
+ }
279
+ }
280
+ }
281
+ }
282
+ const bopomofoBaseStart = [];
283
+ const bopomofoBaseEnd = [];
284
+ const bopomofoTextRef = [];
285
+ const bopomofoFontWeight = [];
286
+ const bopomofoFamilyOffset = [];
287
+ const bopomofoFamilyCount = [];
288
+ const bopomofoPlaceOffset = [];
289
+ const bopomofoPlaceCount = [];
290
+ const bopomofoFamilyPool = [];
291
+ const bopomofoPlaceTextRef = [];
292
+ const bopomofoPlaceRoleRef = [];
293
+ const bopomofoPlaceLeft = [];
294
+ const bopomofoPlaceTop = [];
295
+ const bopomofoPlaceWidth = [];
296
+ const bopomofoPlaceHeight = [];
297
+ {
298
+ const _g18 = plan.bopomofoDecisions;
299
+ for (let _g_index4 = 0, count63 = _g18.length; _g_index4 < count63; _g_index4 += 1) {
300
+ const bopomofo = _g18[_g_index4];
301
+ {
302
+ let _g6 = 0;
303
+ const _g19 = bopomofo.fontFamilies;
304
+ while (_g6 < _g19.length) {
305
+ const fam3 = _g19[_g6];
306
+ _g6++;
307
+ pool.intern(fam3);
308
+ }
309
+ }
310
+ pool.intern(bopomofo.text);
311
+ {
312
+ let _g7 = 0;
313
+ const _g110 = bopomofo.placements;
314
+ while (_g7 < _g110.length) {
315
+ const pl = _g110[_g7];
316
+ _g7++;
317
+ pool.intern(pl.text);
318
+ pool.intern(pl.role);
319
+ }
320
+ }
321
+ }
322
+ }
323
+ {
324
+ const _g111 = plan.bopomofoDecisions;
325
+ for (let _g_index5 = 0, count64 = _g111.length; _g_index5 < count64; _g_index5 += 1) {
326
+ const bopomofo2 = _g111[_g_index5];
327
+ bopomofoBaseStart.push(bopomofo2.baseRangeStart);
328
+ bopomofoBaseEnd.push(bopomofo2.baseRangeEnd);
329
+ bopomofoTextRef.push(pool.indexOf(bopomofo2.text));
330
+ bopomofoFontWeight.push(bopomofo2.fontWeight);
331
+ bopomofoFamilyOffset.push(bopomofoFamilyPool.length);
332
+ bopomofoFamilyCount.push(bopomofo2.fontFamilies.length);
333
+ bopomofoPlaceOffset.push(bopomofoPlaceTextRef.length);
334
+ bopomofoPlaceCount.push(bopomofo2.placements.length);
335
+ {
336
+ let _g8 = 0;
337
+ const _g112 = bopomofo2.fontFamilies;
338
+ while (_g8 < _g112.length) {
339
+ const fam4 = _g112[_g8];
340
+ _g8++;
341
+ bopomofoFamilyPool.push(pool.indexOf(fam4));
342
+ }
343
+ }
344
+ {
345
+ let _g9 = 0;
346
+ const _g113 = bopomofo2.placements;
347
+ while (_g9 < _g113.length) {
348
+ const pl2 = _g113[_g9];
349
+ _g9++;
350
+ bopomofoPlaceTextRef.push(pool.indexOf(pl2.text));
351
+ bopomofoPlaceRoleRef.push(pool.indexOf(pl2.role));
352
+ bopomofoPlaceLeft.push(pl2.left);
353
+ bopomofoPlaceTop.push(pl2.top);
354
+ bopomofoPlaceWidth.push(pl2.width);
355
+ bopomofoPlaceHeight.push(pl2.height);
356
+ }
357
+ }
358
+ }
359
+ }
360
+ const decorationKindRef = [];
361
+ const decorationLeft = [];
362
+ const decorationTop = [];
363
+ const decorationRight = [];
364
+ {
365
+ const _g114 = plan.decorationSegments;
366
+ for (let _g_index6 = 0, count65 = _g114.length; _g_index6 < count65; _g_index6 += 1) {
367
+ const seg = _g114[_g_index6];
368
+ pool.intern(seg.kind);
369
+ }
370
+ }
371
+ {
372
+ const _g115 = plan.decorationSegments;
373
+ for (let _g_index7 = 0, count66 = _g115.length; _g_index7 < count66; _g_index7 += 1) {
374
+ const seg2 = _g115[_g_index7];
375
+ decorationKindRef.push(pool.indexOf(seg2.kind));
376
+ decorationLeft.push(seg2.left);
377
+ decorationTop.push(seg2.top);
378
+ decorationRight.push(seg2.right);
379
+ }
380
+ }
381
+ const emphasisRangeCount = plan.emphasisRanges.length;
382
+ const inlineEdgeCount = plan.inlineEdges.length;
383
+ const rubyCount = plan.rubyDecisions.length;
384
+ const bopomofoCount = plan.bopomofoDecisions.length;
385
+ const count49 = bopomofoPlaceTextRef.length;
386
+ const bopomofoPlacementTotal = count49;
387
+ const decorationSegmentCount = plan.decorationSegments.length;
388
+ const emphasisDotCount = plan.emphasisDots.length;
389
+ const stringCount = pool.ordered.length;
390
+ const count28 = featurePool.length;
391
+ const featureTotal = count28;
392
+ const count39 = rubyFamilyPool.length;
393
+ const rubyFamilyTotal = count39;
394
+ const count48 = bopomofoFamilyPool.length;
395
+ const bopomofoFamilyTotal = count48;
396
+ writer.u32(1414615120);
397
+ writer.u32(1);
398
+ writer.f64(plan.width);
399
+ writer.f64(plan.height);
400
+ const fontSize = plan.fontSize;
401
+ writer.f64((fontSize !== null ? fontSize : Number.NaN));
402
+ const overlayWidth = plan.overlayWidth;
403
+ writer.f64((overlayWidth !== null ? overlayWidth : Number.NaN));
404
+ writer.u32(plan.lines.length);
405
+ writer.u32(cellCount);
406
+ writer.u32(emphasisRangeCount);
407
+ writer.u32(inlineEdgeCount);
408
+ writer.u32(rubyCount);
409
+ writer.u32(bopomofoCount);
410
+ writer.u32(bopomofoPlacementTotal);
411
+ writer.u32(decorationSegmentCount);
412
+ writer.u32(emphasisDotCount);
413
+ writer.u32(stringCount);
414
+ writer.u32(featureTotal);
415
+ writer.u32(rubyFamilyTotal);
416
+ writer.u32(bopomofoFamilyTotal);
417
+ {
418
+ const _g116 = pool.ordered;
419
+ for (let _g_index8 = 0, count67 = _g116.length; _g_index8 < count67; _g_index8 += 1) {
420
+ const s = _g116[_g_index8];
421
+ const encoded = new TextEncoder().encode(s);
422
+ writer.u32(encoded.length);
423
+ }
424
+ }
425
+ {
426
+ const _g117 = pool.ordered;
427
+ for (let _g_index9 = 0, count68 = _g117.length; _g_index9 < count68; _g_index9 += 1) {
428
+ const s2 = _g117[_g_index9];
429
+ writer.raw(new TextEncoder().encode(s2));
430
+ }
431
+ }
432
+ {
433
+ const _g118 = plan.lines;
434
+ for (let _g_index10 = 0, count69 = _g118.length; _g_index10 < count69; _g_index10 += 1) {
435
+ const line3 = _g118[_g_index10];
436
+ writer.u32(line3.rangeStart);
437
+ }
438
+ }
439
+ {
440
+ const _g119 = plan.lines;
441
+ for (let _g_index11 = 0, count70 = _g119.length; _g_index11 < count70; _g_index11 += 1) {
442
+ const line4 = _g119[_g_index11];
443
+ writer.u32(line4.rangeEnd);
444
+ }
445
+ }
446
+ {
447
+ const _g120 = plan.lines;
448
+ for (let _g_index12 = 0, count71 = _g120.length; _g_index12 < count71; _g_index12 += 1) {
449
+ const line5 = _g120[_g_index12];
450
+ writer.f64(line5.top);
451
+ }
452
+ }
453
+ {
454
+ const _g121 = plan.lines;
455
+ for (let _g_index13 = 0, count72 = _g121.length; _g_index13 < count72; _g_index13 += 1) {
456
+ const line6 = _g121[_g_index13];
457
+ writer.f64(line6.bottom);
458
+ }
459
+ }
460
+ {
461
+ const _g122 = plan.lines;
462
+ for (let _g_index14 = 0, count73 = _g122.length; _g_index14 < count73; _g_index14 += 1) {
463
+ const line7 = _g122[_g_index14];
464
+ writer.f64(line7.baseline);
465
+ }
466
+ }
467
+ {
468
+ const _g123 = plan.lines;
469
+ for (let _g_index15 = 0, count74 = _g123.length; _g_index15 < count74; _g_index15 += 1) {
470
+ const line8 = _g123[_g_index15];
471
+ writer.f64(line8.indent);
472
+ }
473
+ }
474
+ {
475
+ const _g124 = plan.lines;
476
+ for (let _g_index16 = 0, count75 = _g124.length; _g_index16 < count75; _g_index16 += 1) {
477
+ const line9 = _g124[_g_index16];
478
+ writer.f64(line9.visualWidth);
479
+ }
480
+ }
481
+ {
482
+ const _g125 = plan.lines;
483
+ for (let _g_index17 = 0, count76 = _g125.length; _g_index17 < count76; _g_index17 += 1) {
484
+ const line10 = _g125[_g_index17];
485
+ writer.f64(line10.hyphenAdvance);
486
+ }
487
+ }
488
+ {
489
+ const _g126 = plan.lines;
490
+ for (let _g_index18 = 0, count77 = _g126.length; _g_index18 < count77; _g_index18 += 1) {
491
+ const line11 = _g126[_g_index18];
492
+ writer.u8(PlanPacked.endReasonCode(line11.endReason));
493
+ }
494
+ }
495
+ {
496
+ const _g127 = plan.lines;
497
+ for (let _g_index19 = 0, count78 = _g127.length; _g_index19 < count78; _g_index19 += 1) {
498
+ const line12 = _g127[_g_index19];
499
+ writer.u32(line12.cells.length);
500
+ }
501
+ }
502
+ for (let _g_index20 = 0, count4 = cellRangeStart.length; _g_index20 < count4; _g_index20 += 1) {
503
+ const v = cellRangeStart[_g_index20];
504
+ writer.u32(v);
505
+ }
506
+ for (let _g_index21 = 0, count5 = cellRangeEnd.length; _g_index21 < count5; _g_index21 += 1) {
507
+ const v2 = cellRangeEnd[_g_index21];
508
+ writer.u32(v2);
509
+ }
510
+ for (let _g_index22 = 0, count6 = cellSourceRef.length; _g_index22 < count6; _g_index22 += 1) {
511
+ const v3 = cellSourceRef[_g_index22];
512
+ writer.u32(v3);
513
+ }
514
+ for (let _g_index23 = 0, count7 = cellDisplayRef.length; _g_index23 < count7; _g_index23 += 1) {
515
+ const v4 = cellDisplayRef[_g_index23];
516
+ writer.u32(v4);
517
+ }
518
+ for (let _g_index24 = 0, count8 = cellDrawX.length; _g_index24 < count8; _g_index24 += 1) {
519
+ const v5 = cellDrawX[_g_index24];
520
+ writer.f64(v5);
521
+ }
522
+ for (let _g_index25 = 0, count9 = cellNaturalWidth.length; _g_index25 < count9; _g_index25 += 1) {
523
+ const v6 = cellNaturalWidth[_g_index25];
524
+ writer.f64(v6);
525
+ }
526
+ for (let _g_index26 = 0, count10 = cellLeadingAdvance.length; _g_index26 < count10; _g_index26 += 1) {
527
+ const v7 = cellLeadingAdvance[_g_index26];
528
+ writer.f64(v7);
529
+ }
530
+ for (let _g_index27 = 0, count11 = cellShapingBoundary.length; _g_index27 < count11; _g_index27 += 1) {
531
+ const v8 = cellShapingBoundary[_g_index27];
532
+ writer.u8(v8);
533
+ }
534
+ for (let _g_index28 = 0, count12 = cellLatin.length; _g_index28 < count12; _g_index28 += 1) {
535
+ const v9 = cellLatin[_g_index28];
536
+ writer.u8(v9);
537
+ }
538
+ for (let _g_index29 = 0, count13 = cellRenderFamilyRef.length; _g_index29 < count13; _g_index29 += 1) {
539
+ const v10 = cellRenderFamilyRef[_g_index29];
540
+ writer.u32(v10);
541
+ }
542
+ for (let _g_index30 = 0, count14 = cellDashRef.length; _g_index30 < count14; _g_index30 += 1) {
543
+ const v11 = cellDashRef[_g_index30];
544
+ writer.u32(v11);
545
+ }
546
+ for (let _g_index31 = 0, count15 = cellLanguageRef.length; _g_index31 < count15; _g_index31 += 1) {
547
+ const v12 = cellLanguageRef[_g_index31];
548
+ writer.u32(v12);
549
+ }
550
+ for (let _g_index32 = 0, count16 = cellResolvedFaceRef.length; _g_index32 < count16; _g_index32 += 1) {
551
+ const v13 = cellResolvedFaceRef[_g_index32];
552
+ writer.u32(v13);
553
+ }
554
+ for (let _g_index33 = 0, count17 = cellGlyphIdsRef.length; _g_index33 < count17; _g_index33 += 1) {
555
+ const v14 = cellGlyphIdsRef[_g_index33];
556
+ writer.u32(v14);
557
+ }
558
+ for (let _g_index34 = 0, count18 = cellEvidenceRef.length; _g_index34 < count18; _g_index34 += 1) {
559
+ const v15 = cellEvidenceRef[_g_index34];
560
+ writer.u32(v15);
561
+ }
562
+ for (let _g_index35 = 0, count19 = cellInkFloor.length; _g_index35 < count19; _g_index35 += 1) {
563
+ const v16 = cellInkFloor[_g_index35];
564
+ writer.f64(v16);
565
+ }
566
+ for (let _g_index36 = 0, count20 = cellBodyWidth.length; _g_index36 < count20; _g_index36 += 1) {
567
+ const v17 = cellBodyWidth[_g_index36];
568
+ writer.f64(v17);
569
+ }
570
+ for (let _g_index37 = 0, count21 = cellAdvance.length; _g_index37 < count21; _g_index37 += 1) {
571
+ const v18 = cellAdvance[_g_index37];
572
+ writer.f64(v18);
573
+ }
574
+ for (let _g_index38 = 0, count22 = cellInlineObject.length; _g_index38 < count22; _g_index38 += 1) {
575
+ const v19 = cellInlineObject[_g_index38];
576
+ writer.f64(v19);
577
+ }
578
+ for (let _g_index39 = 0, count23 = cellStyleFontSize.length; _g_index39 < count23; _g_index39 += 1) {
579
+ const v20 = cellStyleFontSize[_g_index39];
580
+ writer.f64(v20);
581
+ }
582
+ for (let _g_index40 = 0, count24 = cellStyleFontWeight.length; _g_index40 < count24; _g_index40 += 1) {
583
+ const v21 = cellStyleFontWeight[_g_index40];
584
+ writer.f64(v21);
585
+ }
586
+ for (let _g_index41 = 0, count25 = cellStyleItalic.length; _g_index41 < count25; _g_index41 += 1) {
587
+ const v22 = cellStyleItalic[_g_index41];
588
+ writer.u8(v22);
589
+ }
590
+ for (let _g_index42 = 0, count26 = cellFeatureOffset.length; _g_index42 < count26; _g_index42 += 1) {
591
+ const v23 = cellFeatureOffset[_g_index42];
592
+ writer.u32(v23);
593
+ }
594
+ for (let _g_index43 = 0, count27 = cellFeatureCount.length; _g_index43 < count27; _g_index43 += 1) {
595
+ const v24 = cellFeatureCount[_g_index43];
596
+ writer.u32(v24);
597
+ }
598
+ for (let _g_index44 = 0; _g_index44 < count28; _g_index44 += 1) {
599
+ const v25 = featurePool[_g_index44];
600
+ writer.u32(v25);
601
+ }
602
+ {
603
+ const _g128 = plan.emphasisRanges;
604
+ for (let _g_index45 = 0, count79 = _g128.length; _g_index45 < count79; _g_index45 += 1) {
605
+ const range = _g128[_g_index45];
606
+ writer.f64(range.start);
607
+ }
608
+ }
609
+ {
610
+ const _g129 = plan.emphasisRanges;
611
+ for (let _g_index46 = 0, count80 = _g129.length; _g_index46 < count80; _g_index46 += 1) {
612
+ const range2 = _g129[_g_index46];
613
+ writer.f64(range2.end);
614
+ }
615
+ }
616
+ {
617
+ const _g130 = plan.inlineEdges;
618
+ for (let _g_index47 = 0, count81 = _g130.length; _g_index47 < count81; _g_index47 += 1) {
619
+ const edge = _g130[_g_index47];
620
+ writer.f64(edge.offset);
621
+ }
622
+ }
623
+ {
624
+ const _g131 = plan.inlineEdges;
625
+ for (let _g_index48 = 0, count82 = _g131.length; _g_index48 < count82; _g_index48 += 1) {
626
+ const edge2 = _g131[_g_index48];
627
+ const s3 = edge2.inlineStart;
628
+ writer.f64(((s3 !== null ? s3 : Number.NaN)));
629
+ }
630
+ }
631
+ {
632
+ const _g132 = plan.inlineEdges;
633
+ for (let _g_index49 = 0, count83 = _g132.length; _g_index49 < count83; _g_index49 += 1) {
634
+ const edge3 = _g132[_g_index49];
635
+ const e = edge3.inlineEnd;
636
+ writer.f64(((e !== null ? e : Number.NaN)));
637
+ }
638
+ }
639
+ for (let _g_index50 = 0, count29 = rubyBaseStart.length; _g_index50 < count29; _g_index50 += 1) {
640
+ const v26 = rubyBaseStart[_g_index50];
641
+ writer.u32(v26);
642
+ }
643
+ for (let _g_index51 = 0, count30 = rubyBaseEnd.length; _g_index51 < count30; _g_index51 += 1) {
644
+ const v27 = rubyBaseEnd[_g_index51];
645
+ writer.u32(v27);
646
+ }
647
+ for (let _g_index52 = 0, count31 = rubyTextRef.length; _g_index52 < count31; _g_index52 += 1) {
648
+ const v28 = rubyTextRef[_g_index52];
649
+ writer.u32(v28);
650
+ }
651
+ for (let _g_index53 = 0, count32 = rubyCenterX.length; _g_index53 < count32; _g_index53 += 1) {
652
+ const v29 = rubyCenterX[_g_index53];
653
+ writer.f64(v29);
654
+ }
655
+ for (let _g_index54 = 0, count33 = rubyBaselineY.length; _g_index54 < count33; _g_index54 += 1) {
656
+ const v30 = rubyBaselineY[_g_index54];
657
+ writer.f64(v30);
658
+ }
659
+ for (let _g_index55 = 0, count34 = rubyFontSize.length; _g_index55 < count34; _g_index55 += 1) {
660
+ const v31 = rubyFontSize[_g_index55];
661
+ writer.f64(v31);
662
+ }
663
+ for (let _g_index56 = 0, count35 = rubyFontWeight.length; _g_index56 < count35; _g_index56 += 1) {
664
+ const v32 = rubyFontWeight[_g_index56];
665
+ writer.u32(v32);
666
+ }
667
+ for (let _g_index57 = 0, count36 = rubyFamilyOffset.length; _g_index57 < count36; _g_index57 += 1) {
668
+ const v33 = rubyFamilyOffset[_g_index57];
669
+ writer.u32(v33);
670
+ }
671
+ for (let _g_index58 = 0, count37 = rubyFamilyCount.length; _g_index58 < count37; _g_index58 += 1) {
672
+ const v34 = rubyFamilyCount[_g_index58];
673
+ writer.u32(v34);
674
+ }
675
+ for (let _g_index59 = 0, count38 = rubyAscent.length; _g_index59 < count38; _g_index59 += 1) {
676
+ const v35 = rubyAscent[_g_index59];
677
+ writer.f64(v35);
678
+ }
679
+ for (let _g_index60 = 0; _g_index60 < count39; _g_index60 += 1) {
680
+ const v36 = rubyFamilyPool[_g_index60];
681
+ writer.u32(v36);
682
+ }
683
+ for (let _g_index61 = 0, count40 = bopomofoBaseStart.length; _g_index61 < count40; _g_index61 += 1) {
684
+ const v37 = bopomofoBaseStart[_g_index61];
685
+ writer.u32(v37);
686
+ }
687
+ for (let _g_index62 = 0, count41 = bopomofoBaseEnd.length; _g_index62 < count41; _g_index62 += 1) {
688
+ const v38 = bopomofoBaseEnd[_g_index62];
689
+ writer.u32(v38);
690
+ }
691
+ for (let _g_index63 = 0, count42 = bopomofoTextRef.length; _g_index63 < count42; _g_index63 += 1) {
692
+ const v39 = bopomofoTextRef[_g_index63];
693
+ writer.u32(v39);
694
+ }
695
+ for (let _g_index64 = 0, count43 = bopomofoFontWeight.length; _g_index64 < count43; _g_index64 += 1) {
696
+ const v40 = bopomofoFontWeight[_g_index64];
697
+ writer.u32(v40);
698
+ }
699
+ for (let _g_index65 = 0, count44 = bopomofoFamilyOffset.length; _g_index65 < count44; _g_index65 += 1) {
700
+ const v41 = bopomofoFamilyOffset[_g_index65];
701
+ writer.u32(v41);
702
+ }
703
+ for (let _g_index66 = 0, count45 = bopomofoFamilyCount.length; _g_index66 < count45; _g_index66 += 1) {
704
+ const v42 = bopomofoFamilyCount[_g_index66];
705
+ writer.u32(v42);
706
+ }
707
+ for (let _g_index67 = 0, count46 = bopomofoPlaceOffset.length; _g_index67 < count46; _g_index67 += 1) {
708
+ const v43 = bopomofoPlaceOffset[_g_index67];
709
+ writer.u32(v43);
710
+ }
711
+ for (let _g_index68 = 0, count47 = bopomofoPlaceCount.length; _g_index68 < count47; _g_index68 += 1) {
712
+ const v44 = bopomofoPlaceCount[_g_index68];
713
+ writer.u32(v44);
714
+ }
715
+ for (let _g_index69 = 0; _g_index69 < count48; _g_index69 += 1) {
716
+ const v45 = bopomofoFamilyPool[_g_index69];
717
+ writer.u32(v45);
718
+ }
719
+ for (let _g_index70 = 0; _g_index70 < count49; _g_index70 += 1) {
720
+ const v46 = bopomofoPlaceTextRef[_g_index70];
721
+ writer.u32(v46);
722
+ }
723
+ for (let _g_index71 = 0, count50 = bopomofoPlaceRoleRef.length; _g_index71 < count50; _g_index71 += 1) {
724
+ const v47 = bopomofoPlaceRoleRef[_g_index71];
725
+ writer.u32(v47);
726
+ }
727
+ for (let _g_index72 = 0, count51 = bopomofoPlaceLeft.length; _g_index72 < count51; _g_index72 += 1) {
728
+ const v48 = bopomofoPlaceLeft[_g_index72];
729
+ writer.f64(v48);
730
+ }
731
+ for (let _g_index73 = 0, count52 = bopomofoPlaceTop.length; _g_index73 < count52; _g_index73 += 1) {
732
+ const v49 = bopomofoPlaceTop[_g_index73];
733
+ writer.f64(v49);
734
+ }
735
+ for (let _g_index74 = 0, count53 = bopomofoPlaceWidth.length; _g_index74 < count53; _g_index74 += 1) {
736
+ const v50 = bopomofoPlaceWidth[_g_index74];
737
+ writer.f64(v50);
738
+ }
739
+ for (let _g_index75 = 0, count54 = bopomofoPlaceHeight.length; _g_index75 < count54; _g_index75 += 1) {
740
+ const v51 = bopomofoPlaceHeight[_g_index75];
741
+ writer.f64(v51);
742
+ }
743
+ for (let _g_index76 = 0, count55 = decorationKindRef.length; _g_index76 < count55; _g_index76 += 1) {
744
+ const v52 = decorationKindRef[_g_index76];
745
+ writer.u32(v52);
746
+ }
747
+ for (let _g_index77 = 0, count56 = decorationLeft.length; _g_index77 < count56; _g_index77 += 1) {
748
+ const v53 = decorationLeft[_g_index77];
749
+ writer.f64(v53);
750
+ }
751
+ for (let _g_index78 = 0, count57 = decorationTop.length; _g_index78 < count57; _g_index78 += 1) {
752
+ const v54 = decorationTop[_g_index78];
753
+ writer.f64(v54);
754
+ }
755
+ for (let _g_index79 = 0, count58 = decorationRight.length; _g_index79 < count58; _g_index79 += 1) {
756
+ const v55 = decorationRight[_g_index79];
757
+ writer.f64(v55);
758
+ }
759
+ {
760
+ const _g133 = plan.emphasisDots;
761
+ for (let _g_index80 = 0, count84 = _g133.length; _g_index80 < count84; _g_index80 += 1) {
762
+ const dot = _g133[_g_index80];
763
+ const cs = dot.clusterRangeStart;
764
+ writer.f64((cs !== null ? cs : Number.NaN));
765
+ }
766
+ }
767
+ {
768
+ const _g134 = plan.emphasisDots;
769
+ for (let _g_index81 = 0, count85 = _g134.length; _g_index81 < count85; _g_index81 += 1) {
770
+ const dot2 = _g134[_g_index81];
771
+ writer.f64(dot2.anchorX);
772
+ }
773
+ }
774
+ {
775
+ const _g135 = plan.emphasisDots;
776
+ for (let _g_index82 = 0, count86 = _g135.length; _g_index82 < count86; _g_index82 += 1) {
777
+ const dot3 = _g135[_g_index82];
778
+ writer.f64(dot3.anchorY);
779
+ }
780
+ }
781
+ {
782
+ const _g136 = plan.emphasisDots;
783
+ for (let _g_index83 = 0, count87 = _g136.length; _g_index83 < count87; _g_index83 += 1) {
784
+ const dot4 = _g136[_g_index83];
785
+ writer.f64(dot4.dotDiameter);
786
+ }
787
+ }
788
+ return writer.finish();
789
+ }
790
+ static endReasonCode(reason) {
791
+ switch (reason.kind) {
792
+ case "AutoWrap":
793
+ return 0;
794
+ case "MandatoryBreak":
795
+ return 1;
796
+ case "ParagraphEnd":
797
+ return 2;
798
+ }
799
+ }
800
+ static decode(bytes) {
801
+ const r = new PlanPackedReader(bytes);
802
+ if (r.u32() !== 1414615120) {
803
+ return null;
804
+ }
805
+ if (r.u32() !== 1) {
806
+ return null;
807
+ }
808
+ const width = r.f64();
809
+ const height = r.f64();
810
+ const fontSz = r.f64();
811
+ const overlayW = r.f64();
812
+ const lc = r.u32();
813
+ const cc = r.u32();
814
+ const erc = r.u32();
815
+ const iec = r.u32();
816
+ const rc = r.u32();
817
+ const bc = r.u32();
818
+ const bpt = r.u32();
819
+ const dsc = r.u32();
820
+ const edc = r.u32();
821
+ const sc = r.u32();
822
+ const ft = r.u32();
823
+ const rft = r.u32();
824
+ const bft = r.u32();
825
+ if (r.failed) {
826
+ return null;
827
+ }
828
+ const deltas = [];
829
+ for (let i = 0; i < sc; i += 1) {
830
+ deltas.push(r.u32());
831
+ }
832
+ const pool = [];
833
+ for (let _g_index = 0, count88 = deltas.length; _g_index < count88; _g_index += 1) {
834
+ const d = deltas[_g_index];
835
+ pool.push(r.string(d));
836
+ }
837
+ if (r.failed) {
838
+ return null;
839
+ }
840
+ const sref = (ref) => {
841
+ return (ref !== -1 ? pool[ref] : null);
842
+ };
843
+ const lrs = [];
844
+ for (let i2 = 0; i2 < lc; i2 += 1) {
845
+ lrs.push(r.u32());
846
+ }
847
+ const lre = [];
848
+ for (let i3 = 0; i3 < lc; i3 += 1) {
849
+ lre.push(r.u32());
850
+ }
851
+ const lt = [];
852
+ for (let i4 = 0; i4 < lc; i4 += 1) {
853
+ lt.push(r.f64());
854
+ }
855
+ const lb = [];
856
+ for (let i5 = 0; i5 < lc; i5 += 1) {
857
+ lb.push(r.f64());
858
+ }
859
+ const lbl = [];
860
+ for (let i6 = 0; i6 < lc; i6 += 1) {
861
+ lbl.push(r.f64());
862
+ }
863
+ const lin = [];
864
+ for (let i7 = 0; i7 < lc; i7 += 1) {
865
+ lin.push(r.f64());
866
+ }
867
+ const lvw = [];
868
+ for (let i8 = 0; i8 < lc; i8 += 1) {
869
+ lvw.push(r.f64());
870
+ }
871
+ const lha = [];
872
+ for (let i9 = 0; i9 < lc; i9 += 1) {
873
+ lha.push(r.f64());
874
+ }
875
+ const ler = [];
876
+ for (let i10 = 0; i10 < lc; i10 += 1) {
877
+ ler.push(r.u8());
878
+ }
879
+ const lcc = [];
880
+ for (let i11 = 0; i11 < lc; i11 += 1) {
881
+ lcc.push(r.u32());
882
+ }
883
+ if (r.failed) {
884
+ return null;
885
+ }
886
+ const crs = [];
887
+ for (let i12 = 0; i12 < cc; i12 += 1) {
888
+ crs.push(r.u32());
889
+ }
890
+ const cre = [];
891
+ for (let i13 = 0; i13 < cc; i13 += 1) {
892
+ cre.push(r.u32());
893
+ }
894
+ const csr = [];
895
+ for (let i14 = 0; i14 < cc; i14 += 1) {
896
+ csr.push(r.u32());
897
+ }
898
+ const cdr = [];
899
+ for (let i15 = 0; i15 < cc; i15 += 1) {
900
+ cdr.push(r.u32());
901
+ }
902
+ const cdx = [];
903
+ for (let i16 = 0; i16 < cc; i16 += 1) {
904
+ cdx.push(r.f64());
905
+ }
906
+ const cnw = [];
907
+ for (let i17 = 0; i17 < cc; i17 += 1) {
908
+ cnw.push(r.f64());
909
+ }
910
+ const cla = [];
911
+ for (let i18 = 0; i18 < cc; i18 += 1) {
912
+ cla.push(r.f64());
913
+ }
914
+ const csb = [];
915
+ for (let i19 = 0; i19 < cc; i19 += 1) {
916
+ csb.push(r.u8());
917
+ }
918
+ const cla2 = [];
919
+ for (let i20 = 0; i20 < cc; i20 += 1) {
920
+ cla2.push(r.u8());
921
+ }
922
+ const crf = [];
923
+ for (let i21 = 0; i21 < cc; i21 += 1) {
924
+ crf.push(r.u32());
925
+ }
926
+ const cd2 = [];
927
+ for (let i22 = 0; i22 < cc; i22 += 1) {
928
+ cd2.push(r.u32());
929
+ }
930
+ const cl2 = [];
931
+ for (let i23 = 0; i23 < cc; i23 += 1) {
932
+ cl2.push(r.u32());
933
+ }
934
+ const crf2 = [];
935
+ for (let i24 = 0; i24 < cc; i24 += 1) {
936
+ crf2.push(r.u32());
937
+ }
938
+ const cgi = [];
939
+ for (let i25 = 0; i25 < cc; i25 += 1) {
940
+ cgi.push(r.u32());
941
+ }
942
+ const cev = [];
943
+ for (let i26 = 0; i26 < cc; i26 += 1) {
944
+ cev.push(r.u32());
945
+ }
946
+ const cif = [];
947
+ for (let i27 = 0; i27 < cc; i27 += 1) {
948
+ cif.push(r.f64());
949
+ }
950
+ const cbw = [];
951
+ for (let i28 = 0; i28 < cc; i28 += 1) {
952
+ cbw.push(r.f64());
953
+ }
954
+ const cad = [];
955
+ for (let i29 = 0; i29 < cc; i29 += 1) {
956
+ cad.push(r.f64());
957
+ }
958
+ const cio = [];
959
+ for (let i30 = 0; i30 < cc; i30 += 1) {
960
+ cio.push(r.f64());
961
+ }
962
+ const csf = [];
963
+ for (let i31 = 0; i31 < cc; i31 += 1) {
964
+ csf.push(r.f64());
965
+ }
966
+ const csw = [];
967
+ for (let i32 = 0; i32 < cc; i32 += 1) {
968
+ csw.push(r.f64());
969
+ }
970
+ const csi = [];
971
+ for (let i33 = 0; i33 < cc; i33 += 1) {
972
+ csi.push(r.u8());
973
+ }
974
+ const cfo = [];
975
+ for (let i34 = 0; i34 < cc; i34 += 1) {
976
+ cfo.push(r.u32());
977
+ }
978
+ const cfc = [];
979
+ for (let i35 = 0; i35 < cc; i35 += 1) {
980
+ cfc.push(r.u32());
981
+ }
982
+ if (r.failed) {
983
+ return null;
984
+ }
985
+ const fp = [];
986
+ for (let i36 = 0; i36 < ft; i36 += 1) {
987
+ fp.push(r.u32());
988
+ }
989
+ let cursor = 0;
990
+ const lines = [];
991
+ for (let li = 0; li < lc; li += 1) {
992
+ const cellN = lcc[li];
993
+ const cells = [];
994
+ for (let ci = 0; ci < cellN; ci += 1) {
995
+ const i37 = cursor;
996
+ cursor += 1;
997
+ const fo = cfo[i37];
998
+ const fn = cfc[i37];
999
+ const feats = [];
1000
+ for (let k = 0; k < fn; k += 1) {
1001
+ feats.push(pool[fp[fo + k]]);
1002
+ }
1003
+ const sf = csf[i37];
1004
+ const sw = csw[i37];
1005
+ const si = csi[i37];
1006
+ const style = (Number.isNaN(sf) && Number.isNaN(sw) && si === 2 ? null : { fontSize: (Number.isNaN(sf) ? null : sf), fontWeight: (Number.isNaN(sw) ? null : Math.trunc(sw)), italic: (si === 2 ? null : si !== 0) });
1007
+ cells.push({ rangeStart: crs[i37], rangeEnd: cre[i37], source: pool[csr[i37]], display: pool[cdr[i37]], drawX: cdx[i37], naturalWidth: cnw[i37], leadingLayoutAdvance: cla[i37], shapingBoundary: csb[i37] !== 0, openTypeFeatures: feats, renderFontFamily: sref(crf[i37]), dashStrategy: sref(cd2[i37]), shapingLanguage: sref(cl2[i37]), resolvedFace: sref(crf2[i37]), glyphIds: sref(cgi[i37]), shapingEvidence: sref(cev[i37]), punctuationInkFloor: (Number.isNaN(cif[i37]) ? null : cif[i37]), punctuationBodyWidth: (Number.isNaN(cbw[i37]) ? null : cbw[i37]), latin: cla2[i37] !== 0, advance: (Number.isNaN(cad[i37]) ? null : cad[i37]), inlineObject: (Number.isNaN(cio[i37]) ? null : cio[i37]), styleDelta: style });
1008
+ }
1009
+ const er = ler[li];
1010
+ const endR = (er === 1 ? PlanEndReason.MandatoryBreak : (er === 2 ? PlanEndReason.ParagraphEnd : PlanEndReason.AutoWrap));
1011
+ lines.push({ rangeStart: lrs[li], rangeEnd: lre[li], top: lt[li], bottom: lb[li], baseline: lbl[li], indent: lin[li], visualWidth: lvw[li], hyphenAdvance: lha[li], endReason: endR, cells });
1012
+ }
1013
+ const emphasis = [];
1014
+ for (let i38 = 0; i38 < erc; i38 += 1) {
1015
+ const s = r.f64();
1016
+ const e = r.f64();
1017
+ emphasis.push({ start: Math.trunc(s), end: Math.trunc(e) });
1018
+ }
1019
+ const edges = [];
1020
+ for (let i39 = 0; i39 < iec; i39 += 1) {
1021
+ const off = r.f64();
1022
+ const s2 = r.f64();
1023
+ const e2 = r.f64();
1024
+ edges.push({ offset: Math.trunc(off), inlineStart: (Number.isNaN(s2) ? null : s2), inlineEnd: (Number.isNaN(e2) ? null : e2) });
1025
+ }
1026
+ const rbS = [];
1027
+ for (let i40 = 0; i40 < rc; i40 += 1) {
1028
+ rbS.push(r.u32());
1029
+ }
1030
+ const rbE = [];
1031
+ for (let i41 = 0; i41 < rc; i41 += 1) {
1032
+ rbE.push(r.u32());
1033
+ }
1034
+ const rbT = [];
1035
+ for (let i42 = 0; i42 < rc; i42 += 1) {
1036
+ rbT.push(r.u32());
1037
+ }
1038
+ const rbCx = [];
1039
+ for (let i43 = 0; i43 < rc; i43 += 1) {
1040
+ rbCx.push(r.f64());
1041
+ }
1042
+ const rbBy = [];
1043
+ for (let i44 = 0; i44 < rc; i44 += 1) {
1044
+ rbBy.push(r.f64());
1045
+ }
1046
+ const rbFs = [];
1047
+ for (let i45 = 0; i45 < rc; i45 += 1) {
1048
+ rbFs.push(r.f64());
1049
+ }
1050
+ const rbFw = [];
1051
+ for (let i46 = 0; i46 < rc; i46 += 1) {
1052
+ rbFw.push(r.u32());
1053
+ }
1054
+ const rbFo = [];
1055
+ for (let i47 = 0; i47 < rc; i47 += 1) {
1056
+ rbFo.push(r.u32());
1057
+ }
1058
+ const rbFc = [];
1059
+ for (let i48 = 0; i48 < rc; i48 += 1) {
1060
+ rbFc.push(r.u32());
1061
+ }
1062
+ const rbAs = [];
1063
+ for (let i49 = 0; i49 < rc; i49 += 1) {
1064
+ rbAs.push(r.f64());
1065
+ }
1066
+ const rubyFam = [];
1067
+ for (let i50 = 0; i50 < rft; i50 += 1) {
1068
+ rubyFam.push(r.u32());
1069
+ }
1070
+ const rubys = [];
1071
+ for (let i51 = 0; i51 < rc; i51 += 1) {
1072
+ const fams = [];
1073
+ for (let k2 = 0; k2 < rbFc[i51]; k2 += 1) {
1074
+ fams.push(pool[rubyFam[rbFo[i51] + k2]]);
1075
+ }
1076
+ rubys.push({ baseRangeStart: rbS[i51], baseRangeEnd: rbE[i51], text: pool[rbT[i51]], centerX: rbCx[i51], baselineY: rbBy[i51], fontSize: rbFs[i51], fontWeight: rbFw[i51], fontFamilies: fams, ascent: (Number.isNaN(rbAs[i51]) ? null : rbAs[i51]) });
1077
+ }
1078
+ const bbS = [];
1079
+ for (let i52 = 0; i52 < bc; i52 += 1) {
1080
+ bbS.push(r.u32());
1081
+ }
1082
+ const bbE = [];
1083
+ for (let i53 = 0; i53 < bc; i53 += 1) {
1084
+ bbE.push(r.u32());
1085
+ }
1086
+ const bbT = [];
1087
+ for (let i54 = 0; i54 < bc; i54 += 1) {
1088
+ bbT.push(r.u32());
1089
+ }
1090
+ const bbFw = [];
1091
+ for (let i55 = 0; i55 < bc; i55 += 1) {
1092
+ bbFw.push(r.u32());
1093
+ }
1094
+ const bbFo = [];
1095
+ for (let i56 = 0; i56 < bc; i56 += 1) {
1096
+ bbFo.push(r.u32());
1097
+ }
1098
+ const bbFc = [];
1099
+ for (let i57 = 0; i57 < bc; i57 += 1) {
1100
+ bbFc.push(r.u32());
1101
+ }
1102
+ const bbPo = [];
1103
+ for (let i58 = 0; i58 < bc; i58 += 1) {
1104
+ bbPo.push(r.u32());
1105
+ }
1106
+ const bbPc = [];
1107
+ for (let i59 = 0; i59 < bc; i59 += 1) {
1108
+ bbPc.push(r.u32());
1109
+ }
1110
+ const bopoFam = [];
1111
+ for (let i60 = 0; i60 < bft; i60 += 1) {
1112
+ bopoFam.push(r.u32());
1113
+ }
1114
+ const bpT = [];
1115
+ for (let i61 = 0; i61 < bpt; i61 += 1) {
1116
+ bpT.push(r.u32());
1117
+ }
1118
+ const bpR = [];
1119
+ for (let i62 = 0; i62 < bpt; i62 += 1) {
1120
+ bpR.push(r.u32());
1121
+ }
1122
+ const bpL = [];
1123
+ for (let i63 = 0; i63 < bpt; i63 += 1) {
1124
+ bpL.push(r.f64());
1125
+ }
1126
+ const bpT2 = [];
1127
+ for (let i64 = 0; i64 < bpt; i64 += 1) {
1128
+ bpT2.push(r.f64());
1129
+ }
1130
+ const bpW = [];
1131
+ for (let i65 = 0; i65 < bpt; i65 += 1) {
1132
+ bpW.push(r.f64());
1133
+ }
1134
+ const bpH = [];
1135
+ for (let i66 = 0; i66 < bpt; i66 += 1) {
1136
+ bpH.push(r.f64());
1137
+ }
1138
+ const bopos = [];
1139
+ for (let i67 = 0; i67 < bc; i67 += 1) {
1140
+ const fams2 = [];
1141
+ for (let k3 = 0; k3 < bbFc[i67]; k3 += 1) {
1142
+ fams2.push(pool[bopoFam[bbFo[i67] + k3]]);
1143
+ }
1144
+ const placements = [];
1145
+ for (let k4 = 0; k4 < bbPc[i67]; k4 += 1) {
1146
+ const pidx = bbPo[i67] + k4;
1147
+ placements.push({ text: pool[bpT[pidx]], role: pool[bpR[pidx]], left: bpL[pidx], top: bpT2[pidx], width: bpW[pidx], height: bpH[pidx] });
1148
+ }
1149
+ bopos.push({ baseRangeStart: bbS[i67], baseRangeEnd: bbE[i67], text: pool[bbT[i67]], fontWeight: bbFw[i67], fontFamilies: fams2, placements });
1150
+ }
1151
+ const decos = [];
1152
+ for (let i68 = 0; i68 < dsc; i68 += 1) {
1153
+ const kr = r.u32();
1154
+ decos.push({ kind: pool[kr], left: r.f64(), top: r.f64(), right: r.f64(), sourceRangeStart: 0, sourceRangeEnd: 0 });
1155
+ }
1156
+ const dots = [];
1157
+ for (let i69 = 0; i69 < edc; i69 += 1) {
1158
+ const ds = r.f64();
1159
+ dots.push({ clusterRangeStart: (Number.isNaN(ds) ? null : ds), anchorX: r.f64(), anchorY: r.f64(), dotDiameter: r.f64() });
1160
+ }
1161
+ if (r.failed) {
1162
+ return null;
1163
+ }
1164
+ return { width, height, lines, emphasisRanges: emphasis, inlineEdges: edges, rubyDecisions: rubys, bopomofoDecisions: bopos, fontSize: (Number.isNaN(fontSz) ? null : fontSz), overlayWidth: (Number.isNaN(overlayW) ? null : overlayW), decorationSegments: decos, emphasisDots: dots };
1165
+ }
1166
+ }