@syncfusion/ej2-office-common 35.1.37 → 35.1.42

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 (226) hide show
  1. package/dist/ej2-office-common.umd.min.js +2 -2
  2. package/dist/ej2-office-common.umd.min.js.map +1 -1
  3. package/dist/es6/ej2-office-common.es2015.js +5421 -6017
  4. package/dist/es6/ej2-office-common.es2015.js.map +1 -1
  5. package/dist/es6/ej2-office-common.es5.js +6270 -7203
  6. package/dist/es6/ej2-office-common.es5.js.map +1 -1
  7. package/dist/global/ej2-office-common.min.js +2 -2
  8. package/dist/global/ej2-office-common.min.js.map +1 -1
  9. package/dist/global/index.d.ts +1 -1
  10. package/office-common.js +4 -0
  11. package/package.json +11 -7
  12. package/src/index.d.ts +3 -17
  13. package/src/index.js +3 -18
  14. package/src/office-common/features/index.d.ts +6 -0
  15. package/src/office-common/features/index.js +6 -0
  16. package/src/office-common/features/mathml/index.d.ts +25 -0
  17. package/src/office-common/features/mathml/index.js +22 -0
  18. package/src/office-common/features/mathml/latex/latex-generator.d.ts +8 -0
  19. package/src/office-common/features/mathml/latex/latex-generator.js +357 -0
  20. package/src/office-common/features/mathml/latex/latex-parser.d.ts +87 -0
  21. package/src/office-common/features/mathml/latex/latex-parser.js +1206 -0
  22. package/src/office-common/features/mathml/latex/latex-symbols.d.ts +13 -0
  23. package/src/office-common/features/mathml/latex/latex-symbols.js +681 -0
  24. package/src/office-common/features/mathml/math-settings.d.ts +54 -0
  25. package/src/office-common/features/mathml/math-settings.js +174 -0
  26. package/src/office-common/features/mathml/office-math/adapter.d.ts +59 -0
  27. package/src/office-common/features/mathml/office-math/adapter.js +6 -0
  28. package/src/office-common/features/mathml/office-math/basic.d.ts +91 -0
  29. package/src/office-common/features/mathml/office-math/basic.js +93 -0
  30. package/src/office-common/features/mathml/office-math/break.d.ts +30 -0
  31. package/src/office-common/features/mathml/office-math/break.js +75 -0
  32. package/src/office-common/features/mathml/office-math/collection.d.ts +104 -0
  33. package/src/office-common/features/mathml/office-math/collection.js +170 -0
  34. package/src/office-common/features/mathml/office-math/entity.d.ts +12 -0
  35. package/src/office-common/features/mathml/office-math/entity.js +3 -0
  36. package/src/office-common/features/mathml/office-math/enums.d.ts +97 -0
  37. package/src/office-common/features/mathml/office-math/enums.js +108 -0
  38. package/src/office-common/features/mathml/office-math/format.d.ts +28 -0
  39. package/src/office-common/features/mathml/office-math/format.js +90 -0
  40. package/src/office-common/features/mathml/office-math/function-base.d.ts +27 -0
  41. package/src/office-common/features/mathml/office-math/function-base.js +69 -0
  42. package/src/office-common/features/mathml/office-math/function-collection.d.ts +29 -0
  43. package/src/office-common/features/mathml/office-math/function-collection.js +76 -0
  44. package/src/office-common/features/mathml/office-math/functions-basic.d.ts +118 -0
  45. package/src/office-common/features/mathml/office-math/functions-basic.js +331 -0
  46. package/src/office-common/features/mathml/office-math/functions-multi.d.ts +156 -0
  47. package/src/office-common/features/mathml/office-math/functions-multi.js +407 -0
  48. package/src/office-common/features/mathml/office-math/index.d.ts +27 -0
  49. package/src/office-common/features/mathml/office-math/index.js +25 -0
  50. package/src/office-common/features/mathml/office-math/keys.d.ts +6 -0
  51. package/src/office-common/features/mathml/office-math/keys.js +20 -0
  52. package/src/office-common/features/mathml/office-math/math-clone.d.ts +20 -0
  53. package/src/office-common/features/mathml/office-math/math-clone.js +203 -0
  54. package/src/office-common/features/mathml/office-math/math-collection.d.ts +19 -0
  55. package/src/office-common/features/mathml/office-math/math-collection.js +41 -0
  56. package/src/office-common/features/mathml/office-math/math-equality.d.ts +21 -0
  57. package/src/office-common/features/mathml/office-math/math-equality.js +115 -0
  58. package/src/office-common/features/mathml/office-math/math-paragraph.d.ts +58 -0
  59. package/src/office-common/features/mathml/office-math/math-paragraph.js +126 -0
  60. package/src/office-common/features/mathml/office-math/math-traversal.d.ts +23 -0
  61. package/src/office-common/features/mathml/office-math/math-traversal.js +95 -0
  62. package/src/office-common/features/mathml/office-math/matrix-collections.d.ts +54 -0
  63. package/src/office-common/features/mathml/office-math/matrix-collections.js +113 -0
  64. package/src/office-common/features/mathml/office-math/matrix-column.d.ts +43 -0
  65. package/src/office-common/features/mathml/office-math/matrix-column.js +96 -0
  66. package/src/office-common/features/mathml/office-math/matrix-row.d.ts +38 -0
  67. package/src/office-common/features/mathml/office-math/matrix-row.js +71 -0
  68. package/src/office-common/features/mathml/office-math/matrix.d.ts +62 -0
  69. package/src/office-common/features/mathml/office-math/matrix.js +158 -0
  70. package/src/office-common/features/mathml/office-math/office-math.d.ts +55 -0
  71. package/src/office-common/features/mathml/office-math/office-math.js +116 -0
  72. package/src/office-common/features/mathml/office-math/owner-holder.d.ts +42 -0
  73. package/src/office-common/features/mathml/office-math/owner-holder.js +87 -0
  74. package/src/office-common/features/mathml/office-math/property-store.d.ts +66 -0
  75. package/src/office-common/features/mathml/office-math/property-store.js +99 -0
  76. package/src/office-common/features/mathml/office-math/run-element.d.ts +31 -0
  77. package/src/office-common/features/mathml/office-math/run-element.js +97 -0
  78. package/src/office-common/features/mathml/office-math/unknown-element.d.ts +37 -0
  79. package/src/office-common/features/mathml/office-math/unknown-element.js +62 -0
  80. package/src/office-common/features/mathml/office-math/xml-equal.d.ts +13 -0
  81. package/src/office-common/features/mathml/office-math/xml-equal.js +24 -0
  82. package/src/office-common/features/mathml/parse/office-math-parser.d.ts +24 -0
  83. package/src/office-common/features/mathml/parse/office-math-parser.js +396 -0
  84. package/src/office-common/features/mathml/parse/office-math-properties.d.ts +165 -0
  85. package/src/office-common/features/mathml/parse/office-math-properties.js +432 -0
  86. package/src/office-common/features/mathml/parse/parse-options.d.ts +22 -0
  87. package/src/office-common/features/mathml/parse/parse-options.js +3 -0
  88. package/src/office-common/features/mathml/serialize/office-math-properties-writer.d.ts +38 -0
  89. package/src/office-common/features/mathml/serialize/office-math-properties-writer.js +267 -0
  90. package/src/office-common/features/mathml/serialize/office-math-serializer.d.ts +23 -0
  91. package/src/office-common/features/mathml/serialize/office-math-serializer.js +306 -0
  92. package/src/office-common/features/mathml/serialize/omml-writer.d.ts +123 -0
  93. package/src/office-common/features/mathml/serialize/omml-writer.js +135 -0
  94. package/src/office-common/index.d.ts +10 -0
  95. package/src/office-common/index.js +10 -0
  96. package/.eslintrc.json +0 -263
  97. package/.prettierrc.json +0 -5
  98. package/api-extractor.json +0 -35
  99. package/core.js +0 -4
  100. package/encryption.js +0 -4
  101. package/features.js +0 -4
  102. package/global.json +0 -6
  103. package/nuget.config +0 -7
  104. package/src/all.d.ts +0 -41
  105. package/src/all.js +0 -38
  106. package/src/features/index.d.ts +0 -11
  107. package/src/features/index.js +0 -11
  108. package/src/features/mathml/index.d.ts +0 -30
  109. package/src/features/mathml/index.js +0 -22
  110. package/src/features/mathml/math-factory.d.ts +0 -26
  111. package/src/features/mathml/math-factory.js +0 -568
  112. package/src/features/mathml/model/controls.d.ts +0 -896
  113. package/src/features/mathml/model/controls.js +0 -1541
  114. package/src/features/mathml/model/math-element.d.ts +0 -173
  115. package/src/features/mathml/model/math-element.js +0 -315
  116. package/src/features/mathml/model/roots.d.ts +0 -82
  117. package/src/features/mathml/model/roots.js +0 -177
  118. package/src/features/mathml/parse/math-parser.d.ts +0 -43
  119. package/src/features/mathml/parse/math-parser.js +0 -636
  120. package/src/features/mathml/serialize/math-serializer.d.ts +0 -34
  121. package/src/features/mathml/serialize/math-serializer.js +0 -749
  122. package/tsconfig.build.json +0 -13
  123. package/tsconfig.harness.json +0 -32
  124. package/tslint.json +0 -111
  125. /package/src/{core → office-common/core}/index.d.ts +0 -0
  126. /package/src/{core → office-common/core}/index.js +0 -0
  127. /package/src/{core → office-common/core}/xml/index.d.ts +0 -0
  128. /package/src/{core → office-common/core}/xml/index.js +0 -0
  129. /package/src/{core → office-common/core}/xml/model.d.ts +0 -0
  130. /package/src/{core → office-common/core}/xml/model.js +0 -0
  131. /package/src/{encryption → office-common/encryption}/agile-constants.d.ts +0 -0
  132. /package/src/{encryption → office-common/encryption}/agile-constants.js +0 -0
  133. /package/src/{encryption → office-common/encryption}/agile-encryption-info.d.ts +0 -0
  134. /package/src/{encryption → office-common/encryption}/agile-encryption-info.js +0 -0
  135. /package/src/{encryption → office-common/encryption}/agile-password.d.ts +0 -0
  136. /package/src/{encryption → office-common/encryption}/agile-password.js +0 -0
  137. /package/src/{encryption → office-common/encryption}/cfb-reader.d.ts +0 -0
  138. /package/src/{encryption → office-common/encryption}/cfb-reader.js +0 -0
  139. /package/src/{encryption → office-common/encryption}/crypto-primitives.d.ts +0 -0
  140. /package/src/{encryption → office-common/encryption}/crypto-primitives.js +0 -0
  141. /package/src/{encryption → office-common/encryption}/decrypt-encrypted-package.d.ts +0 -0
  142. /package/src/{encryption → office-common/encryption}/decrypt-encrypted-package.js +0 -0
  143. /package/src/{encryption → office-common/encryption}/encryption-info-xml.d.ts +0 -0
  144. /package/src/{encryption → office-common/encryption}/encryption-info-xml.js +0 -0
  145. /package/src/{encryption → office-common/encryption}/errors.d.ts +0 -0
  146. /package/src/{encryption → office-common/encryption}/errors.js +0 -0
  147. /package/src/{encryption → office-common/encryption}/index.d.ts +0 -0
  148. /package/src/{encryption → office-common/encryption}/index.js +0 -0
  149. /package/src/{features → office-common/features}/diagrams/constants.d.ts +0 -0
  150. /package/src/{features → office-common/features}/diagrams/constants.js +0 -0
  151. /package/src/{features → office-common/features}/diagrams/diagram-data-model.d.ts +0 -0
  152. /package/src/{features → office-common/features}/diagrams/diagram-data-model.js +0 -0
  153. /package/src/{features → office-common/features}/diagrams/diagram-parsers.d.ts +0 -0
  154. /package/src/{features → office-common/features}/diagrams/diagram-parsers.js +0 -0
  155. /package/src/{features → office-common/features}/diagrams/diagram-serializers.d.ts +0 -0
  156. /package/src/{features → office-common/features}/diagrams/diagram-serializers.js +0 -0
  157. /package/src/{features → office-common/features}/diagrams/diagram-views.d.ts +0 -0
  158. /package/src/{features → office-common/features}/diagrams/diagram-views.js +0 -0
  159. /package/src/{features → office-common/features}/diagrams/element-tree.d.ts +0 -0
  160. /package/src/{features → office-common/features}/diagrams/element-tree.js +0 -0
  161. /package/src/{features → office-common/features}/diagrams/errors.d.ts +0 -0
  162. /package/src/{features → office-common/features}/diagrams/errors.js +0 -0
  163. /package/src/{features → office-common/features}/diagrams/index.d.ts +0 -0
  164. /package/src/{features → office-common/features}/diagrams/index.js +0 -0
  165. /package/src/{features → office-common/features}/diagrams/smart-art-catalog.d.ts +0 -0
  166. /package/src/{features → office-common/features}/diagrams/smart-art-catalog.js +0 -0
  167. /package/src/{features → office-common/features}/diagrams/smart-art-diagram.d.ts +0 -0
  168. /package/src/{features → office-common/features}/diagrams/smart-art-diagram.js +0 -0
  169. /package/src/{features → office-common/features}/ink/constants.d.ts +0 -0
  170. /package/src/{features → office-common/features}/ink/constants.js +0 -0
  171. /package/src/{features → office-common/features}/ink/index.d.ts +0 -0
  172. /package/src/{features → office-common/features}/ink/index.js +0 -0
  173. /package/src/{features → office-common/features}/ink/ink-effects.d.ts +0 -0
  174. /package/src/{features → office-common/features}/ink/ink-effects.js +0 -0
  175. /package/src/{features → office-common/features}/ink/ink-model.d.ts +0 -0
  176. /package/src/{features → office-common/features}/ink/ink-model.js +0 -0
  177. /package/src/{features → office-common/features}/ink/ink-parser.d.ts +0 -0
  178. /package/src/{features → office-common/features}/ink/ink-parser.js +0 -0
  179. /package/src/{features → office-common/features}/ink/ink-serializer.d.ts +0 -0
  180. /package/src/{features → office-common/features}/ink/ink-serializer.js +0 -0
  181. /package/src/{features → office-common/features}/ink/ink-units.d.ts +0 -0
  182. /package/src/{features → office-common/features}/ink/ink-units.js +0 -0
  183. /package/src/{features → office-common/features}/ink/ink-xml.d.ts +0 -0
  184. /package/src/{features → office-common/features}/ink/ink-xml.js +0 -0
  185. /package/src/{features → office-common/features}/ink/trace-codec.d.ts +0 -0
  186. /package/src/{features → office-common/features}/ink/trace-codec.js +0 -0
  187. /package/src/{features → office-common/features}/mathml/constants.d.ts +0 -0
  188. /package/src/{features → office-common/features}/mathml/constants.js +0 -0
  189. /package/src/{features → office-common/features}/mathml/errors.d.ts +0 -0
  190. /package/src/{features → office-common/features}/mathml/errors.js +0 -0
  191. /package/src/{features → office-common/features}/mathml/model/enums.d.ts +0 -0
  192. /package/src/{features → office-common/features}/mathml/model/enums.js +0 -0
  193. /package/src/{features → office-common/features}/mathml/openxml.d.ts +0 -0
  194. /package/src/{features → office-common/features}/mathml/openxml.js +0 -0
  195. /package/src/{features → office-common/features}/smart-art/diagram-xml.d.ts +0 -0
  196. /package/src/{features → office-common/features}/smart-art/diagram-xml.js +0 -0
  197. /package/src/{features → office-common/features}/smart-art/errors.d.ts +0 -0
  198. /package/src/{features → office-common/features}/smart-art/errors.js +0 -0
  199. /package/src/{features → office-common/features}/smart-art/index.d.ts +0 -0
  200. /package/src/{features → office-common/features}/smart-art/index.js +0 -0
  201. /package/src/{features → office-common/features}/smart-art/minimal-samples.d.ts +0 -0
  202. /package/src/{features → office-common/features}/smart-art/minimal-samples.js +0 -0
  203. /package/src/{features → office-common/features}/smart-art/mutators.d.ts +0 -0
  204. /package/src/{features → office-common/features}/smart-art/mutators.js +0 -0
  205. /package/src/{features → office-common/features}/smart-art/namespaces.d.ts +0 -0
  206. /package/src/{features → office-common/features}/smart-art/namespaces.js +0 -0
  207. /package/src/{features → office-common/features}/smart-art/package-graph.d.ts +0 -0
  208. /package/src/{features → office-common/features}/smart-art/package-graph.js +0 -0
  209. /package/src/{features → office-common/features}/smart-art/parse-colors.d.ts +0 -0
  210. /package/src/{features → office-common/features}/smart-art/parse-colors.js +0 -0
  211. /package/src/{features → office-common/features}/smart-art/parse-data.d.ts +0 -0
  212. /package/src/{features → office-common/features}/smart-art/parse-data.js +0 -0
  213. /package/src/{features → office-common/features}/smart-art/parse-layout.d.ts +0 -0
  214. /package/src/{features → office-common/features}/smart-art/parse-layout.js +0 -0
  215. /package/src/{features → office-common/features}/smart-art/parse-rel-ids.d.ts +0 -0
  216. /package/src/{features → office-common/features}/smart-art/parse-rel-ids.js +0 -0
  217. /package/src/{features → office-common/features}/smart-art/parse-style.d.ts +0 -0
  218. /package/src/{features → office-common/features}/smart-art/parse-style.js +0 -0
  219. /package/src/{features → office-common/features}/smart-art/point-text.d.ts +0 -0
  220. /package/src/{features → office-common/features}/smart-art/point-text.js +0 -0
  221. /package/src/{features → office-common/features}/smart-art/register.d.ts +0 -0
  222. /package/src/{features → office-common/features}/smart-art/register.js +0 -0
  223. /package/src/{features → office-common/features}/smart-art/serialize.d.ts +0 -0
  224. /package/src/{features → office-common/features}/smart-art/serialize.js +0 -0
  225. /package/src/{features → office-common/features}/smart-art/types.d.ts +0 -0
  226. /package/src/{features → office-common/features}/smart-art/types.js +0 -0
@@ -1,11 +1,11 @@
1
1
  /*!
2
2
  * filename: ej2-office-common.umd.min.js
3
- * version : 35.1.37
3
+ * version : 35.1.42
4
4
  * Copyright Syncfusion Inc. 2001 - 2025. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
7
7
  * licensing@syncfusion.com. Any infringement will be prosecuted under
8
8
  * applicable laws.
9
9
  */
10
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).ej={})}(this,function(e){"use strict";var F="http://www.w3.org/2003/InkML",f=Object.freeze({bronze:"#BB5B18",silver:"#B4C3DA",gold:"#CC912C",roseGold:"#EEB3A6",ocean:"#0B868D",lava:"#DA0C07",rainbow:"#FF4E00",galaxy:"#AE198D"});function T(e){return f[e]}var N=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return{value:(e=e&&r>=e.length?void 0:e)&&e[r++],done:!e}}}},U="!",I="'",j='"';function v(e){var t,r,e=e.trim();if(0===e.length)return{channelRows:[],points:[],stats:{packetCount:0,channelValueCount:0,pointCount:0}};var n,i,e=e.split(","),o=[],a=[],s=0,u=[],c=[],l="absolute";try{for(var p=N(e),f=p.next();!f.done;f=p.next()){var h=f.value.trim().split(/\s+/).filter(function(e){return 0<e.length});if(0!==h.length){for(var d=l,v=[],y=0;y<h.length;y++){var b,m,g,w,P,_=h[y];void 0!==_&&((i=void 0)!==(m=(b=0===(n=_).length?{prefix:void 0,raw:n}:(i=n.charAt(0))===U?{prefix:"absolute",raw:n.slice(1)}:i===I?{prefix:"first",raw:n.slice(1)}:i===j?{prefix:"second",raw:n.slice(1)}:{prefix:void 0,raw:n}).prefix)&&(l=d=m),g=function(e){if(0!==e.length)return e=Number(e),Number.isFinite(e)?e:void 0}(b.raw),s+=1,void 0!==g)&&(w=void 0,"absolute"===d?(w=g,c[y]=0):"first"===d?(w=(null!=u[y]?u[y]:0)+g,c[y]=g):(c[y]=P=(null!=c[y]?c[y]:0)+g,w=(null!=u[y]?u[y]:0)+P),v[y]=w)}o.push(v);var u=v.slice(),x=v[0],S=v[1];void 0!==x&&void 0!==S&&a.push({x:x,y:S})}}}catch(e){t={error:e}}finally{try{f&&!f.done&&(r=p.return)&&r.call(p)}finally{if(t)throw t.error}}return{channelRows:o,points:a,stats:{packetCount:o.length,channelValueCount:s,pointCount:a.length}}}function y(e){return 0===e.length?"":e.map(function(e){return g(e.x)+" "+g(e.y)}).join(", ")}function g(e){return Number.isInteger(e),String(e)}function w(e){var t=e[0];if(void 0===t)return{minX:0,minY:0,maxX:0,maxY:0};for(var r=t.x,n=t.y,i=r,o=n,a=1;a<e.length;a++){var s=e[a];void 0!==s&&(s.x<r&&(r=s.x),s.y<n&&(n=s.y),s.x>i&&(i=s.x),s.y>o)&&(o=s.y)}return{minX:r,minY:n,maxX:i,maxY:o}}function P(e,t){var r,n,i,o;return 0===e.length?[]:(r=(n=w(e)).maxX-n.minX,n=n.maxY-n.minY,i=0<r?t.width/r:0,t=0<n?t.height/n:0,o=0<r&&0<n?Math.min(i,t):0<r?i:0<n?t:0,e.map(function(e){return{x:e.x*o,y:e.y*o}}))}function z(e,t){var r,n,i,o,a;return 0===e.length?[]:(r=w(e),n=r.maxX-r.minX,i=r.maxY-r.minY,o=0<n?t.width/n:0,a=0<i?t.height/i:0,e.map(function(e){return{x:0<n?(e.x-r.minX)*o:0,y:0<i?(e.y-r.minY)*a:0}}))}var D=function(){return(D=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},V=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||0<t--)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},X=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(V(arguments[t]));return e},Y=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return{value:(e=e&&r>=e.length?void 0:e)&&e[r++],done:!e}}}},q=Symbol.for("@syncfusion/ej2-office-common.OfficeInk"),K=1.42,G="#000000",J="pt";function W(e,t){t={color:e.color,size:{width:e.size.width,height:e.size.height},units:e.units,inkEffect:e.inkEffect,ignorePressure:e.ignorePressure,id:t};return void 0!==e.tip&&(t.tip=e.tip),void 0!==e.rasterOp&&(t.rasterOp=e.rasterOp),void 0!==e.anchorX&&(t.anchorX=e.anchorX),void 0!==e.anchorY&&(t.anchorY=e.anchorY),void 0!==e.scaleFactor&&(t.scaleFactor=e.scaleFactor),void 0!==e.transparency&&(t.transparency=e.transparency),void 0!==e.antiAliased&&(t.antiAliased=e.antiAliased),void 0!==e.fitToCurve&&(t.fitToCurve=e.fitToCurve),t}function Z(e){var t={id:e.id,channels:e.channels.map(function(e){var t={name:e.name};return void 0!==e.type&&(t.type=e.type),void 0!==e.min&&(t.min=e.min),void 0!==e.max&&(t.max=e.max),void 0!==e.units&&(t.units=e.units),t})};return void 0!==e.inkSourceId&&(t.inkSourceId=e.inkSourceId),t}function $(e){return Object.defineProperty(e,q,{value:!0,enumerable:!1,configurable:!1,writable:!1}),e}function Q(e){return $(D({traces:e.traces,brushes:e.brushes,scaleMode:"decoded"},void 0!==e.contexts?{contexts:e.contexts}:{},void 0!==e.traceTree?{traceTree:e.traceTree}:{}))}function ee(e){return null!==e&&"object"==typeof e&&!0===e[q]}var te="http://www.w3.org/XML/1998/namespace",re=12700;function ne(e,t){var r;switch((null!=t?t:"cm").trim().toLowerCase()){case"pt":r=e;break;case"mm":r=e/25.4*72;break;case"px":r=e/4*3;break;case"in":r=72*e;break;case"cm":r=e/2.54*72;break;default:r=e/re}return t=r,Math.round(100*t)/100}function ie(e,t){switch((null!=t?t:"cm").trim().toLowerCase()){case"pt":return e;case"mm":return 25.4*e/72;case"px":return 96*e/72;case"in":return e/72;case"cm":return 2.54*e/72;case"emu":return e*re;default:return 2.54*e/72}}function oe(e){return Number.isFinite(e)?-1===(e=e.toFixed(3)).indexOf(".")?e:e.replace(/\.?0+$/,""):"0"}var ae=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return{value:(e=e&&r>=e.length?void 0:e)&&e[r++],done:!e}}}},se="inkml";function O(e,t,r,n){return{kind:"element",namespaceUri:F,localName:e,prefix:se,attributes:t=void 0===t?[]:t,namespaceDeclarations:n=void 0===n?[]:n,children:r=void 0===r?[]:r}}function n(e,t){return{namespaceUri:"",localName:e,prefix:"",value:t}}function ue(e){return{namespaceUri:te,localName:"id",prefix:"xml",value:e}}function B(e,t,r){var n,i,o,a;try{for(var s=ae(e.attributes),u=s.next();!u.done;u=s.next()){var c=u.value;if(c.localName===t&&(void 0===r||c.namespaceUri===r))return c.value}}catch(e){n={error:e}}finally{try{u&&!u.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}if("id"===t)try{for(var l=ae(e.attributes),p=l.next();!p.done;p=l.next())if("id"===(c=p.value).localName&&("xml"===c.prefix||c.namespaceUri===te))return c.value}catch(e){o={error:e}}finally{try{p&&!p.done&&(a=l.return)&&a.call(l)}finally{if(o)throw o.error}}}function R(e){return e.namespaceUri===F||""===e.namespaceUri}var ce=function(){return(ce=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},le=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return{value:(e=e&&r>=e.length?void 0:e)&&e[r++],done:!e}}}},pe="content/invalid-ink-trace",fe=new Set(["X","Y","Z","S","T","SN","F","TP","BP","OTx","OTy","OA","OE","OR","RP","RR","RY","TW","TH","TC"]),he=new Set(["dev","in","cm","deg","rad","s","lb","g"]),de=new Set(["timestamp","canvas","canvasTransform","mapping","bind","table","matrix","traceView","annotation","annotationXML","channelProperty","traceProperty","brushPropertyRef","intermittentInfo","latency","sampleRate","sampleRateExact","srcRef","channelRef"]),ve=new Set(["width","height","color","transparency","tip","rasterop","antialiased","fittocurve","ignorepressure","inkeffects","anchorx","anchory","scalefactor"]),ye=new Map([["none","none"],["pencil","pencil"],["rainbow","rainbow"],["galaxy","galaxy"],["lava","lava"],["ocean","ocean"],["rosegold","roseGold"],["gold","gold"],["silver","silver"],["bronze","bronze"]]),be=.053,me=.001,ge="#000000",we="ellipse",Pe="copyPen",Ae="#ctx0",Ce={items:[],traceCount:0,packetCount:0,pointCount:0,channelValueCount:0};function Le(e,t){var r,n,i,o,a;try{for(var s=le(e.children),u=s.next();!u.done;u=s.next()){var c=u.value;a=o=void 0,"element"===(i=c).kind&&R(i)&&("traceFormat"===i.localName?Le(i,t):"channel"===i.localName&&(o=null!=(o=B(i,"name"))?o:"",fe.has(o))&&(o={name:o},void 0!==(a=B(i,"type"))&&(o.type=a),void 0!==(a=B(i,"min"))&&(o.min=a),void 0!==(a=B(i,"max"))&&(o.max=a),(void 0!==(a=B(i,"units"))&&he.has(a)||void 0!==a)&&(o.units=a),t.push(o)))}}catch(e){r={error:e}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}}function Te(e,t){var r,n=null!=(n=B(e,"brushRef"))?n:"",i=null!=(i=B(e,"contextRef"))?i:"",o=B(e,"timeOffset"),e=function e(t){var r,n,i="";try{for(var o=ae(t.children),a=o.next();!a.done;a=o.next()){var s=a.value;"text"===s.kind?i+=s.value:i+=e(s)}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i}(e).trim(),a=v(e),e=(0<e.length&&0===a.points.length&&(r={code:pe,message:"malformed or untokenizable ink trace text",traceIndex:t}),{points:a.points.map(function(e){return{x:e.x,y:e.y}}),brushRef:0<n.length?Ue(n.replace(/^#/,"")):"",contextRef:0<i.length?Ue(i.replace(/^#/,"")):Ae});return 0<n.length&&(e.brushRef=n.startsWith("#")?n:Ue(n)),void 0!==o&&(e.timeOffset=o),{trace:e,node:{kind:"trace",traceIndex:t},stats:{packetCount:a.stats.packetCount,pointCount:a.stats.pointCount,channelValueCount:a.stats.channelValueCount},diagnostic:r}}function Ne(e){var t=B(e,"id",te);return void 0!==t?t:B(e,"id")}function Ue(e){return e.startsWith("#")?e:"#"+e}function Ie(e){var e=e.trim();if(0!==e.length)return e.startsWith(".")&&(e="0"+e),e=Number(e),Number.isFinite(e)?e:void 0}function je(e){e=e.trim().toLowerCase();return"1"===e||"true"===e}var Be=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return{value:(e=e&&r>=e.length?void 0:e)&&e[r++],done:!e}}}},Re=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||0<t--)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},Fe=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Re(arguments[t]));return e},He="#ctx0",ze="inkSrc0",De="-2.14748E9",Ve="2.14748E9",Xe="cm";function Ye(){return{id:He,inkSourceId:ze,channels:[{name:"X",type:"integer",min:De,max:Ve,units:Xe},{name:"Y",type:"integer",min:De,max:Ve,units:Xe}]}}function qe(e){var t=Ge(e.id),r=Ge(null!=e.inkSourceId?e.inkSourceId:ze),e=(0<e.channels.length?e:Ye()).channels.map(function(e){var t=[n("name",e.name)];return void 0!==e.type&&t.push(n("type",e.type)),void 0!==e.min&&t.push(n("min",e.min)),void 0!==e.max&&t.push(n("max",e.max)),void 0!==e.units&&t.push(n("units",e.units)),O("channel",t,[])}),e=O("traceFormat",[],e),r=O("inkSource",[ue(r)],[e]);return O("context",[ue(t)],[r])}function k(e,t,r){e=[n("name",e),n("value",t)];return void 0!==r&&e.push(n("units",r)),O("brushProperty",e,[])}function Ke(e){var t=[],r=0<e.contextRef.length?Je(e.contextRef):He,r=(t.push(n("contextRef",r)),0<e.brushRef.length&&t.push(n("brushRef",Je(e.brushRef))),void 0!==e.timeOffset&&t.push(n("timeOffset",e.timeOffset)),y(e.points));return O("trace",t,0<r.length?[{kind:"text",value:r}]:[])}function Ge(e){return e.startsWith("#")?e.slice(1):e}function Je(e){return e.startsWith("#")?e:"#"+e}var We="http://schemas.openxmlformats.org/officeDocument/2006/math",Ze=["m","m1","m2","m3","m4","m5"],$e="http://schemas.openxmlformats.org/wordprocessingml/2006/main",Qe="http://www.w3.org/XML/1998/namespace",et=["left","right","center","centerGroup"],tt=["bar","skw","lin","noBar"],rt=["centered","match"],nt=["undOvr","subSup"],it=["top","bot"],ot=["before","after","repeat"],at=["--","-+","+-"],st=["roman","script","fraktur","double-struck","sans-serif","monospace"],ut=["p","b","i","bi"];function ct(e){return-1!==et.indexOf(e)?e:void 0}function lt(e){return-1!==tt.indexOf(e)?e:void 0}function pt(e){return-1!==rt.indexOf(e)?e:void 0}function ft(e){return-1!==nt.indexOf(e)?e:void 0}function ht(e){return-1!==it.indexOf(e)?e:void 0}function dt(e){return-1!==st.indexOf(e)?e:void 0}function vt(e){return-1!==ut.indexOf(e)?e:void 0}function yt(e){return Number.isInteger(e)&&-2<=e&&e<=2}function bt(e){return Number.isInteger(e)&&1<=e&&e<=255}function mt(e){if(void 0!==e)return"1"===(e=e.toLowerCase())||"true"===e||"on"===e||"0"!==e&&"false"!==e&&"off"!==e&&void 0}gt=function(e,t){return(gt=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}))(e,t)};var gt,wt,t=function(e,t){function r(){this.constructor=e}gt(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},_e=(wt=Error,t(Pt,wt),Pt);function Pt(e,t,r){var n=this.constructor,e=wt.call(this,e)||this;return e.name="MathmlValidationError",e.elementPath=t,e.constraintKind=r,Object.setPrototypeOf(e,n.prototype),e}_t=Error,t(St,_t);var _t,xt=St;function St(e){var t=this.constructor,e=_t.call(this,e=void 0===e?"Math equation is preserve-only and cannot be mutated":e)||this;return e.isPreserveOnly=!0,e.name="MathmlReadOnlyError",Object.setPrototypeOf(e,t.prototype),e}Mt=function(e,t){return(Mt=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}))(e,t)};var Mt,t=function(e,t){function r(){this.constructor=e}Mt(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},Ot=function(){return(Ot=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},kt=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||0<t--)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},Et=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(kt(arguments[t]));return e},r=(Object.defineProperty(i.prototype,"preserveOnly",{get:function(){return this._preserveOnly},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"preservedXml",{get:function(){return this._preservedXml},enumerable:!0,configurable:!0}),i.prototype.setMutationListener=function(e){this._onMutate=e},i.prototype.markPreserveOnly=function(e){this._preserveOnly=!0,this._preservedXml=e},i.prototype.attachPreservedXml=function(e){this._preservedXml=e},i.prototype.notifyMutated=function(){if(this._preserveOnly)throw new xt;null!=this._onMutate&&this._onMutate()},i.prototype.assertMutable=function(){if(this._preserveOnly)throw new xt},i);function i(){this._preserveOnly=!1}t(Lt,At=r),Object.defineProperty(Lt.prototype,"value",{get:function(){return this._value},set:function(e){this.assertMutable(),this._value=e,this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(Lt.prototype,"xmlSpace",{get:function(){return this._xmlSpace},set:function(e){this.assertMutable(),this._xmlSpace=e,this.notifyMutated()},enumerable:!0,configurable:!0});var At,Ct=Lt;function Lt(e,t){void 0===e&&(e="");var r=At.call(this)||this;return r.type="t",r._value=e,r._xmlSpace=t,r}t(Ut,Tt=r),Object.defineProperty(Ut.prototype,"properties",{get:function(){return this._properties},set:function(e){if(this.assertMutable(),void 0!==e.argSz&&!yt(e.argSz))throw new _e("argSz must be an integer in −2..2 (ST_Integer2), got "+String(e.argSz),"arg.argPr.argSz","value-range");this._properties=Object.freeze(Ot({},e)),this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(Ut.prototype,"item",{get:function(){return this._item},set:function(e){this.assertMutable(),this._item=Et(e),this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(Ut.prototype,"ctrlPr",{get:function(){return this._ctrlPr},set:function(e){this.assertMutable(),this._ctrlPr=e,this.notifyMutated()},enumerable:!0,configurable:!0}),Ut.prototype.appendItem=function(e){return this.assertMutable(),this._item.push(e),this.notifyMutated(),e};var Tt,Nt=Ut;function Ut(e,t,r){void 0===e&&(e={}),void 0===t&&(t=[]);var n=Tt.call(this)||this;if(n.type="arg",void 0===e.argSz||yt(e.argSz))return n._properties=Object.freeze(Ot({},e)),n._item=Et(t),n._ctrlPr=r,n;throw new _e("argSz must be an integer in −2..2 (ST_Integer2), got "+String(e.argSz),"arg.argPr.argSz","value-range")}t(Bt,It=r);var It,jt=Bt;function Bt(e,t){var r=It.call(this)||this;return r.type="unknown",r.localName=e,r.attachPreservedXml(t),r}Rt=function(e,t){return(Rt=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}))(e,t)};var Rt,Ft,t=function(e,t){function r(){this.constructor=e}Rt(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},Ht=function(){return(Ht=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},zt=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||0<t--)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},Dt=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(zt(arguments[t]));return e},Vt=(t(Xt,Ft=r),Object.defineProperty(Xt.prototype,"properties",{get:function(){return this._properties},set:function(e){this.assertMutable(),this._properties=Object.freeze(Ht({},e)),this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(Xt.prototype,"equations",{get:function(){return this._equations},enumerable:!0,configurable:!0}),Xt.prototype.setEquations=function(e){this.assertMutable(),this._equations=Dt(e),this.notifyMutated()},Xt.prototype.appendEquation=function(e){this.assertMutable(),this._equations.push(e),this.notifyMutated()},Xt.prototype.assertSerializable=function(e){if(void 0===e&&(e="oMathPara"),this._equations.length<1)throw new _e("m:oMathPara requires at least one m:oMath (CT_OMathPara)",e,"required-child")},Xt);function Xt(e,t){void 0===e&&(e={}),void 0===t&&(t=[]);var r=Ft.call(this)||this;return r.type="oMathPara",r._properties=Object.freeze(Ht({},e)),r._equations=Dt(t),r}t(Kt,Yt=r),Object.defineProperty(Kt.prototype,"children",{get:function(){return this._children},enumerable:!0,configurable:!0}),Kt.prototype.setChildren=function(e){this.assertMutable(),this._children=Dt(e),this.notifyMutated()},Kt.prototype.appendChild=function(e){this.assertMutable(),this._children.push(e),this.notifyMutated()};var Yt,qt=Kt;function Kt(e){void 0===e&&(e=[]);var t=Yt.call(this)||this;return t.type="oMath",t._children=Dt(e),t}Gt=function(e,t){return(Gt=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}))(e,t)};var Gt,t=function(e,t){function r(){this.constructor=e}Gt(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},Jt=function(){return(Jt=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},Wt=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||0<t--)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},o=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Wt(arguments[t]));return e};function a(e){return Object.freeze(Jt({},e))}function s(e){return e instanceof Nt?e:new Nt({},e)}t(Qt,Zt=r),Object.defineProperty(Qt.prototype,"properties",{get:function(){return this._properties},set:function(e){this.assertMutable(),this._properties=a(e),this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(Qt.prototype,"base",{get:function(){return this._base},set:function(e){this.assertMutable(),this._base=e,this.notifyMutated()},enumerable:!0,configurable:!0});var Zt,$t=Qt;function Qt(e,t){void 0===e&&(e={}),void 0===t&&(t=[]);var r=Zt.call(this)||this;return r.type="acc",r._properties=a(e),r._base=s(t),r}t(rr,er=r),Object.defineProperty(rr.prototype,"properties",{get:function(){return this._properties},set:function(e){this.assertMutable(),this._properties=a(e),this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(rr.prototype,"base",{get:function(){return this._base},set:function(e){this.assertMutable(),this._base=e,this.notifyMutated()},enumerable:!0,configurable:!0});var er,tr=rr;function rr(e,t){void 0===e&&(e={}),void 0===t&&(t=[]);var r=er.call(this)||this;return r.type="bar",r._properties=a(e),r._base=s(t),r}t(or,nr=r),Object.defineProperty(or.prototype,"properties",{get:function(){return this._properties},set:function(e){this.assertMutable(),this._properties=a(e),this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(or.prototype,"base",{get:function(){return this._base},set:function(e){this.assertMutable(),this._base=e,this.notifyMutated()},enumerable:!0,configurable:!0});var nr,ir=or;function or(e,t){void 0===e&&(e={}),void 0===t&&(t=[]);var r=nr.call(this)||this;return r.type="box",r._properties=a(e),r._base=s(t),r}t(ur,ar=r),Object.defineProperty(ur.prototype,"properties",{get:function(){return this._properties},set:function(e){this.assertMutable(),this._properties=a(e),this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(ur.prototype,"base",{get:function(){return this._base},set:function(e){this.assertMutable(),this._base=e,this.notifyMutated()},enumerable:!0,configurable:!0});var ar,sr=ur;function ur(e,t){void 0===e&&(e={}),void 0===t&&(t=[]);var r=ar.call(this)||this;return r.type="borderBox",r._properties=a(e),r._base=s(t),r}t(pr,cr=r),Object.defineProperty(pr.prototype,"properties",{get:function(){return this._properties},set:function(e){this.assertMutable(),this._properties=a(e),this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(pr.prototype,"elements",{get:function(){return this._elements},set:function(e){this.assertMutable(),this._elements=o(e),this.notifyMutated()},enumerable:!0,configurable:!0}),pr.prototype.assertSerializable=function(e){if(void 0===e&&(e="d"),this._elements.length<1)throw new _e("m:d requires at least one m:e (CT_D)",e,"required-child")};var cr,lr=pr;function pr(e,t){void 0===e&&(e={}),void 0===t&&(t=[]);var r=cr.call(this)||this;return r.type="d",r._properties=a(e),r._elements=t.map(s),r}t(dr,fr=r),Object.defineProperty(dr.prototype,"properties",{get:function(){return this._properties},set:function(e){this.assertMutable(),this._properties=a(e),this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(dr.prototype,"elements",{get:function(){return this._elements},set:function(e){this.assertMutable(),this._elements=o(e),this.notifyMutated()},enumerable:!0,configurable:!0}),dr.prototype.assertSerializable=function(e){if(void 0===e&&(e="eqArr"),this._elements.length<1)throw new _e("m:eqArr requires at least one m:e (CT_EqArr)",e,"required-child")};var fr,hr=dr;function dr(e,t){void 0===e&&(e={}),void 0===t&&(t=[]);var r=fr.call(this)||this;return r.type="eqArr",r._properties=a(e),r._elements=t.map(s),r}t(br,vr=r),Object.defineProperty(br.prototype,"properties",{get:function(){return this._properties},set:function(e){this.assertMutable(),this._properties=a(e),this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(br.prototype,"numerator",{get:function(){return this._numerator},set:function(e){this.assertMutable(),this._numerator=e,this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(br.prototype,"denominator",{get:function(){return this._denominator},set:function(e){this.assertMutable(),this._denominator=e,this.notifyMutated()},enumerable:!0,configurable:!0});var vr,yr=br;function br(e,t,r){void 0===e&&(e={}),void 0===t&&(t=[]),void 0===r&&(r=[]);var n=vr.call(this)||this;return n.type="f",n._properties=a(e),n._numerator=s(t),n._denominator=s(r),n}t(wr,mr=r),Object.defineProperty(wr.prototype,"properties",{get:function(){return this._properties},set:function(e){this.assertMutable(),this._properties=a(e),this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(wr.prototype,"name",{get:function(){return this._name},set:function(e){this.assertMutable(),this._name=e,this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(wr.prototype,"base",{get:function(){return this._base},set:function(e){this.assertMutable(),this._base=e,this.notifyMutated()},enumerable:!0,configurable:!0});var mr,gr=wr;function wr(e,t,r){void 0===e&&(e={}),void 0===t&&(t=[]),void 0===r&&(r=[]);var n=mr.call(this)||this;return n.type="func",n._properties=a(e),n._name=s(t),n._base=s(r),n}t(xr,Pr=r),Object.defineProperty(xr.prototype,"properties",{get:function(){return this._properties},set:function(e){this.assertMutable(),this._properties=a(e),this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(xr.prototype,"base",{get:function(){return this._base},set:function(e){this.assertMutable(),this._base=e,this.notifyMutated()},enumerable:!0,configurable:!0});var Pr,_r=xr;function xr(e,t){void 0===e&&(e={}),void 0===t&&(t=[]);var r=Pr.call(this)||this;return r.type="groupChr",r._properties=a(e),r._base=s(t),r}t(Or,Sr=r),Object.defineProperty(Or.prototype,"properties",{get:function(){return this._properties},set:function(e){this.assertMutable(),this._properties=a(e),this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(Or.prototype,"base",{get:function(){return this._base},set:function(e){this.assertMutable(),this._base=e,this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(Or.prototype,"lim",{get:function(){return this._lim},set:function(e){this.assertMutable(),this._lim=e,this.notifyMutated()},enumerable:!0,configurable:!0});var Sr,Mr=Or;function Or(e,t,r){void 0===e&&(e={}),void 0===t&&(t=[]),void 0===r&&(r=[]);var n=Sr.call(this)||this;return n.type="limLow",n._properties=a(e),n._base=s(t),n._lim=s(r),n}t(Ar,kr=r),Object.defineProperty(Ar.prototype,"properties",{get:function(){return this._properties},set:function(e){this.assertMutable(),this._properties=a(e),this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(Ar.prototype,"base",{get:function(){return this._base},set:function(e){this.assertMutable(),this._base=e,this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(Ar.prototype,"lim",{get:function(){return this._lim},set:function(e){this.assertMutable(),this._lim=e,this.notifyMutated()},enumerable:!0,configurable:!0});var kr,Er=Ar;function Ar(e,t,r){void 0===e&&(e={}),void 0===t&&(t=[]),void 0===r&&(r=[]);var n=kr.call(this)||this;return n.type="limUpp",n._properties=a(e),n._base=s(t),n._lim=s(r),n}t(Tr,Cr=r),Object.defineProperty(Tr.prototype,"elements",{get:function(){return this._elements},enumerable:!0,configurable:!0}),Tr.prototype.setElements=function(e){this.assertMutable(),this._elements=o(e),this.notifyMutated()},Tr.prototype.assertSerializable=function(e){if(void 0===e&&(e="mr"),this._elements.length<1)throw new _e("m:mr requires at least one m:e (CT_MR)",e,"required-child")};var Cr,Lr=Tr;function Tr(e){void 0===e&&(e=[]);var t=Cr.call(this)||this;return t.type="mr",t._elements=e.map(s),t}t(Ir,Nr=r),Object.defineProperty(Ir.prototype,"properties",{get:function(){return this._properties},set:function(e){this.assertMutable(),this._properties=a(e),this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(Ir.prototype,"rows",{get:function(){return this._rows},enumerable:!0,configurable:!0}),Ir.prototype.setRows=function(e){this.assertMutable(),this._rows=o(e),this.notifyMutated()},Ir.prototype.assertSerializable=function(r){if(void 0===r&&(r="m"),this._rows.length<1)throw new _e("m:m requires at least one m:mr (CT_M)",r,"required-child");this._rows.forEach(function(e,t){return e.assertSerializable(r+".mr["+String(t)+"]")})};var Nr,Ur=Ir;function Ir(e,t){void 0===e&&(e={}),void 0===t&&(t=[]);var r=Nr.call(this)||this;return r.type="m",r._properties=a(e),r._rows=o(t),r}t(Rr,jr=r),Object.defineProperty(Rr.prototype,"properties",{get:function(){return this._properties},set:function(e){this.assertMutable(),this._properties=a(e),this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(Rr.prototype,"subscript",{get:function(){return this._sub},set:function(e){this.assertMutable(),this._sub=e,this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(Rr.prototype,"superscript",{get:function(){return this._sup},set:function(e){this.assertMutable(),this._sup=e,this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(Rr.prototype,"base",{get:function(){return this._base},set:function(e){this.assertMutable(),this._base=e,this.notifyMutated()},enumerable:!0,configurable:!0});var jr,Br=Rr;function Rr(e,t,r,n){void 0===e&&(e={}),void 0===t&&(t=[]),void 0===r&&(r=[]),void 0===n&&(n=[]);var i=jr.call(this)||this;return i.type="nary",i._properties=a(e),i._sub=s(t),i._sup=s(r),i._base=s(n),i}t(zr,Fr=r),Object.defineProperty(zr.prototype,"properties",{get:function(){return this._properties},set:function(e){this.assertMutable(),this._properties=a(e),this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(zr.prototype,"base",{get:function(){return this._base},set:function(e){this.assertMutable(),this._base=e,this.notifyMutated()},enumerable:!0,configurable:!0});var Fr,Hr=zr;function zr(e,t){void 0===e&&(e={}),void 0===t&&(t=[]);var r=Fr.call(this)||this;return r.type="phant",r._properties=a(e),r._base=s(t),r}t(Xr,Dr=r),Object.defineProperty(Xr.prototype,"properties",{get:function(){return this._properties},set:function(e){this.assertMutable(),this._properties=a(e),this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(Xr.prototype,"deg",{get:function(){return this._deg},set:function(e){this.assertMutable(),this._deg=e,this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(Xr.prototype,"base",{get:function(){return this._base},set:function(e){this.assertMutable(),this._base=e,this.notifyMutated()},enumerable:!0,configurable:!0});var Dr,Vr=Xr;function Xr(e,t,r){void 0===e&&(e={}),void 0===t&&(t=[]),void 0===r&&(r=[]);var n=Dr.call(this)||this;return n.type="rad",n._properties=a(e),n._deg=s(t),n._base=s(r),n}t(Kr,Yr=r),Object.defineProperty(Kr.prototype,"properties",{get:function(){return this._properties},set:function(e){this.assertMutable(),this._properties=a(e),this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(Kr.prototype,"sub",{get:function(){return this._sub},set:function(e){this.assertMutable(),this._sub=e,this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(Kr.prototype,"sup",{get:function(){return this._sup},set:function(e){this.assertMutable(),this._sup=e,this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(Kr.prototype,"base",{get:function(){return this._base},set:function(e){this.assertMutable(),this._base=e,this.notifyMutated()},enumerable:!0,configurable:!0});var Yr,qr=Kr;function Kr(e,t,r,n){void 0===e&&(e={}),void 0===t&&(t=[]),void 0===r&&(r=[]),void 0===n&&(n=[]);var i=Yr.call(this)||this;return i.type="sPre",i._properties=a(e),i._sub=s(t),i._sup=s(r),i._base=s(n),i}t(Wr,Gr=r),Object.defineProperty(Wr.prototype,"properties",{get:function(){return this._properties},set:function(e){this.assertMutable(),this._properties=a(e),this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(Wr.prototype,"base",{get:function(){return this._base},set:function(e){this.assertMutable(),this._base=e,this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(Wr.prototype,"subscript",{get:function(){return this._sub},set:function(e){this.assertMutable(),this._sub=e,this.notifyMutated()},enumerable:!0,configurable:!0});var Gr,Jr=Wr;function Wr(e,t,r){void 0===e&&(e={}),void 0===t&&(t=[]),void 0===r&&(r=[]);var n=Gr.call(this)||this;return n.type="sSub",n._properties=a(e),n._base=s(t),n._sub=s(r),n}t(Qr,Zr=r),Object.defineProperty(Qr.prototype,"properties",{get:function(){return this._properties},set:function(e){this.assertMutable(),this._properties=a(e),this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(Qr.prototype,"base",{get:function(){return this._base},set:function(e){this.assertMutable(),this._base=e,this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(Qr.prototype,"subscript",{get:function(){return this._sub},set:function(e){this.assertMutable(),this._sub=e,this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(Qr.prototype,"superscript",{get:function(){return this._sup},set:function(e){this.assertMutable(),this._sup=e,this.notifyMutated()},enumerable:!0,configurable:!0});var Zr,$r=Qr;function Qr(e,t,r,n){void 0===e&&(e={}),void 0===t&&(t=[]),void 0===r&&(r=[]),void 0===n&&(n=[]);var i=Zr.call(this)||this;return i.type="sSubSup",i._properties=a(e),i._base=s(t),i._sub=s(r),i._sup=s(n),i}t(rn,en=r),Object.defineProperty(rn.prototype,"properties",{get:function(){return this._properties},set:function(e){this.assertMutable(),this._properties=a(e),this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(rn.prototype,"base",{get:function(){return this._base},set:function(e){this.assertMutable(),this._base=e,this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(rn.prototype,"superscript",{get:function(){return this._sup},set:function(e){this.assertMutable(),this._sup=e,this.notifyMutated()},enumerable:!0,configurable:!0});var en,tn=rn;function rn(e,t,r){void 0===e&&(e={}),void 0===t&&(t=[]),void 0===r&&(r=[]);var n=en.call(this)||this;return n.type="sSup",n._properties=a(e),n._base=s(t),n._sup=s(r),n}t(u,nn=r),Object.defineProperty(u.prototype,"properties",{get:function(){return this._properties},set:function(e){this.assertMutable(),this._properties=a(e),this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"wRPr",{get:function(){return this._wRPr},set:function(e){this.assertMutable(),this._wRPr=e,this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"children",{get:function(){return this._children},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"opaqueChildren",{get:function(){return this._opaqueChildren},enumerable:!0,configurable:!0}),u.prototype.setChildren=function(e){this.assertMutable(),this._children=o(e),this.notifyMutated()},Object.defineProperty(u.prototype,"text",{get:function(){return this._children.filter(function(e){return"t"===e.type}).map(function(e){return e.value}).join("")},set:function(e){this.assertMutable(),this._children=[new Ct(e)],this.notifyMutated()},enumerable:!0,configurable:!0});var nn,on=u;function u(e,t,r,n){void 0===e&&(e=[]),void 0===t&&(t={}),void 0===n&&(n=[]);var i=nn.call(this)||this;return i.type="r",i._properties=a(t),i._wRPr=r,i._opaqueChildren=o(n),i._children="string"==typeof e?[new Ct(e)]:o(e),i}var an=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return{value:(e=e&&r>=e.length?void 0:e)&&e[r++],done:!e}}}};function sn(e,t,r,n){return{kind:"element",namespaceUri:e,localName:t,prefix:r,attributes:null!=(e=null==n?void 0:n.attributes)?e:[],namespaceDeclarations:null!=(t=null==n?void 0:n.namespaceDeclarations)?t:[],children:null!=(r=null==n?void 0:n.children)?r:[]}}function un(e){return{kind:"text",value:e}}function cn(e){return e.children.filter(function(e){return"element"===e.kind})}function ln(e,t){return null==(e=e.attributes.find(function(e){return e.localName===t}))?void 0:e.value}function pn(e,t,r){return null==(e=e.attributes.find(function(e){return e.namespaceUri===t&&e.localName===r}))?void 0:e.value}function fn(e){var t,r,n="";try{for(var i=an(e.children),o=i.next();!o.done;o=i.next()){var a=o.value;"text"===a.kind&&(n+=a.value)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}var _=function(){return(_=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},hn=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return{value:(e=e&&r>=e.length?void 0:e)&&e[r++],done:!e}}}},dn=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||0<t--)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a};function x(e){return e.namespaceUri===We}function S(e,t){return cn(e).find(function(e){return x(e)&&e.localName===t})}function vn(e,t){return cn(e).filter(function(e){return x(e)&&e.localName===t})}function yn(e){if(e)return ln(e,"val")}function M(e,t){if(e){e=S(e,t);if(e)return void 0===(t=ln(e,"val"))||mt(t)}}function E(e,t){if(e)return yn(S(e,t))}function A(e){if(e)return S(e,"ctrlPr")}function bn(e,t,r,n,i){return null!=(n=null==n?void 0:n.onDiagnostic)&&n({path:t,message:r,localName:e.localName}),i.markPreserveOnly(e),i}function C(e,t){var r,n;if(!e)return new Nt;var i=S(e,"argPr"),i=(i=i)&&void 0!==(i=yn(S(i,"argSz")))&&(i=Number(i),Number.isFinite(i))&&yt(i)?{argSz:i}:{},o=S(e,"ctrlPr"),a=[];try{for(var s=hn(cn(e)),u=s.next();!u.done;u=s.next()){var c=u.value;x(c)&&"argPr"!==c.localName&&"ctrlPr"!==c.localName&&a.push(An(c,t))}}catch(e){r={error:e}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return new Nt(i,a,o)}function mn(e,t,r){return vn(e,t).map(function(e){return C(e,r)})}var gn=[["hideTop","isTopHidden"],["hideBot","isBottomHidden"],["hideLeft","isLeftHidden"],["hideRight","isRightHidden"],["strikeH","hasHorizontalStrike"],["strikeV","hasVerticalStrike"],["strikeBLTR","hasBottomLeftToTopRightStrike"],["strikeTLBR","hasTopLeftToBottomRightStrike"]];function wn(e){var t=E(e,"begChr"),r=E(e,"sepChr"),n=E(e,"endChr"),i=M(e,"grow"),o=E(e,"shp"),o=void 0!==o?pt(o):void 0,e=A(e);return _({},void 0!==t?{begChr:t}:{},void 0!==r?{sepChr:r}:{},void 0!==n?{endChr:n}:{},void 0!==i?{canGrow:i}:{},void 0!==o?{shp:o}:{},void 0!==e?{ctrlPr:e}:{})}function Pn(e){var t=E(e,"baseJc"),r=M(e,"maxDist"),n=M(e,"objDist"),e=A(e);return _({},void 0!==t?{baseJc:t}:{},void 0!==r?{hasMaxDistance:r}:{},void 0!==n?{hasObjectDistance:n}:{},void 0!==e?{ctrlPr:e}:{})}function _n(e){var t=E(e,"type"),t=void 0!==t?lt(t):void 0,e=A(e);return _({},void 0!==t?{type:t}:{},void 0!==e?{ctrlPr:e}:{})}function xn(e){e=A(e);return _({},void 0!==e?{ctrlPr:e}:{})}function Sn(e){var t=E(e,"baseJc"),r=M(e,"plcHide"),e=A(e);return _({},void 0!==t?{baseJc:t}:{},void 0!==r?{isPlaceholderHidden:r}:{},void 0!==e?{ctrlPr:e}:{})}function Mn(e){var t=M(e,"alnScr"),e=A(e);return _({},void 0!==t?{isScriptAligned:t}:{},void 0!==e?{ctrlPr:e}:{})}function On(e){var t=pn(e,Qe,"space"),t="preserve"===t||"default"===t?t:void 0;return new Ct(fn(e),t)}function kn(e,t){var r,n,i,o,a,s,u,c=S(e,"rPr"),l=(c=c)?(l=M(c,"lit"),i=M(c,"nor"),o=E(c,"scr"),a=E(c,"sty"),o=void 0!==o?dt(o):void 0,a=void 0!==a?vt(a):void 0,s=M(c,"aln"),c=void 0!==(c=void 0!==(c=E(c,"brk"))?Number(c):void 0)&&Number.isFinite(c)?c:void 0,_({},void 0!==l?{isLiteral:l}:{},void 0!==i?{isNormal:i}:{},void 0!==o?{scr:o}:{},void 0!==a?{sty:a}:{},void 0!==s?{isAligned:s}:{},void 0!==c?{brk:c}:{})):{},p=[],f=[];try{for(var h=hn(cn(e)),d=h.next();!d.done;d=h.next()){var v=d.value;x(v)&&"rPr"===v.localName||(v.namespaceUri===$e&&"rPr"===v.localName?u=v:x(v)&&"t"===v.localName?p.push(On(v)):x(v)?p.push(An(v,t)):f.push(v))}}catch(e){r={error:e}}finally{try{d&&!d.done&&(n=h.return)&&n.call(h)}finally{if(r)throw r.error}}return new on(p,l,u,f)}function En(e,t){return new Lr(mn(e,"e",t))}function An(e,t){if(!x(e))return new jt(e.localName,e);switch(e.localName){case"oMathPara":var r=e,n=t,i=void 0!==(i=(i=S(r,"oMathParaPr"))?E(i,"jc"):void 0)?ct(i):void 0,i=_({},void 0!==i?{jc:i}:{}),o=vn(r,"oMath").map(function(e){return Cn(e,n)});return o.length<1?bn(r,"oMathPara","m:oMathPara missing required m:oMath",n,new Vt(i,[])):new Vt(i,o);case"oMath":return Cn(e,t);case"t":return On(e);case"r":return kn(e,t);case"acc":var a=S(e,"accPr");return new $t((i=E(r=a,"chr"),r=A(r),_({},void 0!==i?{chr:i}:{},void 0!==r?{ctrlPr:r}:{})),C(S(e,"e"),t));case"bar":a=S(e,"barPr");return new tr((P=void 0!==(P=E(o=a,"pos"))?ht(P):void 0,o=A(o),_({},void 0!==P?{pos:P}:{},void 0!==o?{ctrlPr:o}:{})),C(S(e,"e"),t));case"box":a=S(e,"boxPr");return new ir((s=M(P=a,"opEmu"),u=M(P,"noBreak"),g=M(P,"diff"),w=M(P,"aln"),P=A(P),_({},void 0!==s?{isOperatorEmulated:s}:{},void 0!==u?{isNoBreak:u}:{},void 0!==g?{isDifferential:g}:{},void 0!==w?{isAligned:w}:{},void 0!==P?{ctrlPr:P}:{})),C(S(e,"e"),t));case"borderBox":a=S(e,"borderBoxPr");return new sr(function(e){var t,r={};try{for(var n=hn(gn),i=n.next();!i.done;i=n.next()){var o=dn(i.value,2),a=o[0],s=o[1],u=M(e,a);void 0!==u&&(r[s]=u)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(c=n.return)&&c.call(n)}finally{if(t)throw t.error}}var c=A(e);return void 0!==c&&(r.ctrlPr=c),r}(a),C(S(e,"e"),t));case"d":a=S(e,"dPr");return(b=mn(e,"e",t)).length<1?bn(e,"d","m:d missing required m:e",t,new lr(wn(a),[])):new lr(wn(a),b);case"eqArr":var a=S(e,"eqArrPr");return(b=mn(e,"e",t)).length<1?bn(e,"eqArr","m:eqArr missing required m:e",t,new hr(Pn(a),[])):new hr(Pn(a),b);case"f":var a=S(e,"fPr"),s=S(e,"num"),u=S(e,"den");return s&&u?new yr(_n(a),C(s,t),C(u,t)):bn(e,"f","m:f missing required m:num and/or m:den",t,new yr(_n(a),C(s,t),C(u,t)));case"func":a=S(e,"funcPr");return new gr((g=A(g=a),_({},void 0!==g?{ctrlPr:g}:{})),C(S(e,"fName"),t),C(S(e,"e"),t));case"groupChr":a=S(e,"groupChrPr");return new _r((b=E(w=a,"chr"),c=void 0!==(c=E(w,"pos"))?ht(c):void 0,m=void 0!==(m=E(w,"vertJc"))?ht(m):void 0,w=A(w),_({},void 0!==b?{chr:b}:{},void 0!==c?{pos:c}:{},void 0!==m?{vertJc:m}:{},void 0!==w?{ctrlPr:w}:{})),C(S(e,"e"),t));case"limLow":a=S(e,"limLowPr");return new Mr(xn(a),C(S(e,"e"),t),C(S(e,"lim"),t));case"limUpp":a=S(e,"limUppPr");return new Er(xn(a),C(S(e,"e"),t),C(S(e,"lim"),t));case"m":var a=S(e,"mPr"),c=vn(e,"mr").map(function(e){return En(e,t)});return c.length<1?bn(e,"m","m:m missing required m:mr",t,new Ur(Sn(a),[])):new Ur(Sn(a),c);case"mr":return En(e,t);case"nary":a=S(e,"naryPr");return new Br((f=E(m=a,"chr"),h=void 0!==(h=E(m,"limLoc"))?ft(h):void 0,d=M(m,"grow"),v=M(m,"subHide"),y=M(m,"supHide"),m=A(m),_({},void 0!==f?{chr:f}:{},void 0!==h?{limLoc:h}:{},void 0!==d?{canGrow:d}:{},void 0!==v?{isSubscriptHidden:v}:{},void 0!==y?{isSuperscriptHidden:y}:{},void 0!==m?{ctrlPr:m}:{})),C(S(e,"sub"),t),C(S(e,"sup"),t),C(S(e,"e"),t));case"phant":a=S(e,"phantPr");return new Hr((h=M(f=a,"show"),d=M(f,"zeroWid"),v=M(f,"zeroAsc"),y=M(f,"zeroDesc"),p=M(f,"transp"),f=A(f),_({},void 0!==h?{isShown:h}:{},void 0!==d?{isZeroWidth:d}:{},void 0!==v?{isZeroAscender:v}:{},void 0!==y?{isZeroDescender:y}:{},void 0!==p?{isTransparent:p}:{},void 0!==f?{ctrlPr:f}:{})),C(S(e,"e"),t));case"rad":a=S(e,"radPr");return new Vr((l=M(p=a,"degHide"),p=A(p),_({},void 0!==l?{isDegreeHidden:l}:{},void 0!==p?{ctrlPr:p}:{})),C(S(e,"deg"),t),C(S(e,"e"),t));case"sPre":a=S(e,"sPrePr");return new qr(Mn(a),C(S(e,"sub"),t),C(S(e,"sup"),t),C(S(e,"e"),t));case"sSub":a=S(e,"sSubPr");return new Jr(Mn(a),C(S(e,"e"),t),C(S(e,"sub"),t));case"sSubSup":a=S(e,"sSubSupPr");return new $r(Mn(a),C(S(e,"e"),t),C(S(e,"sub"),t),C(S(e,"sup"),t));case"sSup":a=S(e,"sSupPr");return new tn(Mn(a),C(S(e,"e"),t),C(S(e,"sup"),t));default:return new jt(e.localName,e)}var l,p,f,h,d,v,y,b,c,m,s,u,g,w,P}function Cn(e,t){var r,n,i=[];try{for(var o=hn(cn(e)),a=o.next();!a.done;a=o.next()){var s=a.value;x(s)?i.push(An(s,t)):i.push(new jt(s.localName,s))}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return new qt(i)}function Ln(e,t){return An(e,t)}var Tn=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return{value:(e=e&&r>=e.length?void 0:e)&&e[r++],done:!e}}}},Nn=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||0<t--)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a};function xe(e,t,r,n){return sn(We,t,e.prefix,{attributes:n=void 0===n?[]:n,children:r=void 0===r?[]:r})}function Un(e){return{namespaceUri:"",localName:"val",prefix:"",value:e}}function Se(e,t,r){return xe(e,t,[],[Un(r)])}function Me(e,t,r){return xe(e,t,[],[Un(r?"1":"0")])}function Oe(e,t){void 0!==t&&e.push(t)}function ke(e,t,r,n){if(-1===t.indexOf(e))throw new _e("Illegal "+n+" token '"+e+"' (not in schema enum)",r,"enum-value")}function Ee(e,t,r){var n=e.path+"."+t,i=[],o=r.properties.argSz;if(void 0!==o){if(!yt(o))throw new _e("argSz must be an integer in −2..2 (ST_Integer2), got "+String(o),n+".argPr.argSz","value-range");i.push(xe(e,"argPr",[Se(e,"argSz",String(o))]))}for(var a=0;a<r.item.length;a++){var s=r.item[a];void 0!==s&&i.push(Hn(s,{prefix:e.prefix,path:n+"["+String(a)+"]"}))}return Oe(i,r.ctrlPr),xe(e,t,i)}function In(e,t){var r,n,i=[],o=function(e,t){var t=t.properties,r=[];if(void 0!==t.isLiteral&&r.push(Me(e,"lit",t.isLiteral)),void 0!==t.isNormal&&r.push(Me(e,"nor",t.isNormal)),void 0!==t.scr&&(ke(t.scr,st,e.path+".rPr.scr","ST_Script"),r.push(Se(e,"scr",t.scr))),void 0!==t.sty&&(ke(t.sty,ut,e.path+".rPr.sty","ST_Style"),r.push(Se(e,"sty",t.sty))),void 0!==t.brk){if(!(bt(t.brk)||Number.isInteger(t.brk)&&0===t.brk)&&(!Number.isInteger(t.brk)||t.brk<0||255<t.brk))throw new _e("brk must be an integer in 0..255, got "+String(t.brk),e.path+".rPr.brk","value-range");r.push(Se(e,"brk",String(t.brk)))}if(void 0!==t.isAligned&&r.push(Me(e,"aln",t.isAligned)),0!==r.length)return xe(e,"rPr",r)}(e,t);void 0!==o&&i.push(o),void 0!==t.wRPr&&i.push(t.wRPr);for(var a=0;a<t.children.length;a++){var s=t.children[a];void 0!==s&&i.push(Hn(s,{prefix:e.prefix,path:e.path+".r["+String(a)+"]"}))}try{for(var u=Tn(t.opaqueChildren),c=u.next();!c.done;c=u.next()){var l=c.value;i.push(l)}}catch(e){r={error:e}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}return xe(e,"r",i)}var jn=[["isTopHidden","hideTop"],["isBottomHidden","hideBot"],["isLeftHidden","hideLeft"],["isRightHidden","hideRight"],["hasHorizontalStrike","strikeH"],["hasVerticalStrike","strikeV"],["hasBottomLeftToTopRightStrike","strikeBLTR"],["hasTopLeftToBottomRightStrike","strikeTLBR"]];function Bn(e,t){t.assertSerializable(e.path);var r,n,i=[];try{for(var o=Tn(t.elements),a=o.next();!a.done;a=o.next()){var s=a.value;i.push(Ee(e,"e",s))}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return xe(e,"mr",i)}function Rn(e,t,r,n){var i=[];if(void 0!==r&&i.push(Me(e,"alnScr",r)),Oe(i,n),0!==i.length)return xe(e,t,i)}function Fn(e,t){for(var r=[],n=0;n<t.children.length;n++){var i=t.children[n];void 0!==i&&r.push(Hn(i,{prefix:e.prefix,path:e.path+"["+String(n)+"]"}))}return xe(e,"oMath",r)}function Hn(e,t){if(e.preserveOnly){if(void 0===e.preservedXml)throw new _e("preserve-only node missing preservedXml",t.path,"required-child");return e.preservedXml}if(e instanceof jt){if(void 0===e.preservedXml)throw new _e("unknown math node missing preservedXml",t.path,"required-child");return e.preservedXml}switch(e.type){case"oMathPara":var r=t,j=e,B=(j.assertSerializable(r.path),[]);void 0!==j.properties.jc&&(ke(j.properties.jc,et,r.path+".oMathParaPr.jc","ST_Jc"),B.push(xe(r,"oMathParaPr",[Se(r,"jc",j.properties.jc)])));for(var R=0;R<j.equations.length;R++){var F=j.equations[R];void 0!==F&&B.push(Fn({prefix:r.prefix,path:r.path+".oMath["+String(R)+"]"},F))}return xe(r,"oMathPara",B);case"oMath":return Fn(t,e);case"t":return we=t,Pe=[],void 0!==(I=void 0!==(I=(T=e).xmlSpace)||0!==(N=T.value).length&&(U=N[0],N=N[N.length-1]," "!==U)&&"\t"!==U&&"\n"!==U&&"\r"!==U&&" "!==N&&"\t"!==N&&"\n"!==N&&"\r"!==N?I:"preserve")&&Pe.push({namespaceUri:Qe,localName:"space",prefix:"xml",value:I}),xe(we,"t",[un(T.value)],Pe);case"r":return In(t,e);case"acc":return U=t,N=[],I=[],void 0!==(we=e).properties.chr&&I.push(Se(U,"chr",we.properties.chr)),Oe(I,we.properties.ctrlPr),0<I.length&&N.push(xe(U,"accPr",I)),N.push(Ee(U,"e",we.base)),xe(U,"acc",N);case"bar":return T=t,Pe=[],L=[],void 0!==(C=e).properties.pos&&(ke(C.properties.pos,it,T.path+".barPr.pos","ST_TopBot"),L.push(Se(T,"pos",C.properties.pos))),Oe(L,C.properties.ctrlPr),0<L.length&&Pe.push(xe(T,"barPr",L)),Pe.push(Ee(T,"e",C.base)),xe(T,"bar",Pe);case"box":return L=t,C=[],i=[],void 0!==(n=(J=e).properties).isOperatorEmulated&&i.push(Me(L,"opEmu",n.isOperatorEmulated)),void 0!==n.isNoBreak&&i.push(Me(L,"noBreak",n.isNoBreak)),void 0!==n.isDifferential&&i.push(Me(L,"diff",n.isDifferential)),void 0!==n.isAligned&&i.push(Me(L,"aln",n.isAligned)),Oe(i,n.ctrlPr),0<i.length&&C.push(xe(L,"boxPr",i)),C.push(Ee(L,"e",J.base)),xe(L,"box",C);case"borderBox":var H=t,n=e,i=[],z=[],D=n.properties;try{for(var V=Tn(jn),X=V.next();!X.done;X=V.next()){var Y=Nn(X.value,2),q=Y[0],K=Y[1],G=D[q];"boolean"==typeof G&&z.push(Me(H,K,G))}}catch(e){s={error:e}}finally{try{X&&!X.done&&(a=V.return)&&a.call(V)}finally{if(s)throw s.error}}return Oe(z,D.ctrlPr),0<z.length&&i.push(xe(H,"borderBoxPr",z)),i.push(Ee(H,"e",n.base)),xe(H,"borderBox",i);case"d":var o=t,J=e;J.assertSerializable(o.path);var W=[],a=[],s=J.properties;void 0!==s.begChr&&a.push(Se(o,"begChr",s.begChr)),void 0!==s.sepChr&&a.push(Se(o,"sepChr",s.sepChr)),void 0!==s.endChr&&a.push(Se(o,"endChr",s.endChr)),void 0!==s.canGrow&&a.push(Me(o,"grow",s.canGrow)),void 0!==s.shp&&(ke(s.shp,rt,o.path+".dPr.shp","ST_Shp"),a.push(Se(o,"shp",s.shp))),Oe(a,s.ctrlPr),0<a.length&&W.push(xe(o,"dPr",a));try{for(var Z=Tn(J.elements),$=Z.next();!$.done;$=Z.next()){var Q=$.value;W.push(Ee(o,"e",Q))}}catch(e){u={error:e}}finally{try{$&&!$.done&&(te=Z.return)&&te.call(Z)}finally{if(u)throw u.error}}return xe(o,"d",W);case"eqArr":var ee=t,te=e;te.assertSerializable(ee.path);var re=[],u=[],c=te.properties;void 0!==c.baseJc&&u.push(Se(ee,"baseJc",c.baseJc)),void 0!==c.hasMaxDistance&&u.push(Me(ee,"maxDist",c.hasMaxDistance)),void 0!==c.hasObjectDistance&&u.push(Me(ee,"objDist",c.hasObjectDistance)),Oe(u,c.ctrlPr),0<u.length&&re.push(xe(ee,"eqArrPr",u));try{for(var ne=Tn(te.elements),ie=ne.next();!ie.done;ie=ne.next()){var oe=ie.value;re.push(Ee(ee,"e",oe))}}catch(e){A={error:e}}finally{try{ie&&!ie.done&&(ge=ne.return)&&ge.call(ne)}finally{if(A)throw A.error}}return xe(ee,"eqArr",re);case"f":return c=t,ge=[],A=[],void 0!==(E=e).properties.type&&(ke(E.properties.type,tt,c.path+".fPr.type","ST_FType"),A.push(Se(c,"type",E.properties.type))),Oe(A,E.properties.ctrlPr),0<A.length&&ge.push(xe(c,"fPr",A)),ge.push(Ee(c,"num",E.numerator)),ge.push(Ee(c,"den",E.denominator)),xe(c,"f",ge);case"func":return E=t,O=[],Oe(k=[],(me=e).properties.ctrlPr),0<k.length&&O.push(xe(E,"funcPr",k)),O.push(Ee(E,"fName",me.name)),O.push(Ee(E,"e",me.base)),xe(E,"func",O);case"groupChr":return k=t,me=[],O=[],void 0!==(M=(be=e).properties).chr&&O.push(Se(k,"chr",M.chr)),void 0!==M.pos&&(ke(M.pos,it,k.path+".groupChrPr.pos","ST_TopBot"),O.push(Se(k,"pos",M.pos))),void 0!==M.vertJc&&(ke(M.vertJc,it,k.path+".groupChrPr.vertJc","ST_TopBot"),O.push(Se(k,"vertJc",M.vertJc))),Oe(O,M.ctrlPr),0<O.length&&me.push(xe(k,"groupChrPr",O)),me.push(Ee(k,"e",be.base)),xe(k,"groupChr",me);case"limLow":return M=t,be=[],Oe(S=[],(x=e).properties.ctrlPr),0<S.length&&be.push(xe(M,"limLowPr",S)),be.push(Ee(M,"e",x.base)),be.push(Ee(M,"lim",x.lim)),xe(M,"limLow",be);case"limUpp":return S=t,x=[],Oe(l=[],(p=e).properties.ctrlPr),0<l.length&&x.push(xe(S,"limUppPr",l)),x.push(Ee(S,"e",p.base)),x.push(Ee(S,"lim",p.lim)),xe(S,"limUpp",x);case"m":var ae=t,se=e,ue=(se.assertSerializable(ae.path),[]),l=[],p=se.properties;void 0!==p.baseJc&&l.push(Se(ae,"baseJc",p.baseJc)),void 0!==p.isPlaceholderHidden&&l.push(Me(ae,"plcHide",p.isPlaceholderHidden)),Oe(l,p.ctrlPr),0<l.length&&ue.push(xe(ae,"mPr",l));for(var ce=0;ce<se.rows.length;ce++){var le=se.rows[ce];void 0!==le&&ue.push(Bn({prefix:ae.prefix,path:ae.path+".mr["+String(ce)+"]"},le))}return xe(ae,"m",ue);case"mr":return Bn(t,e);case"nary":return m=t,w=[],P=[],void 0!==(_=(g=e).properties).chr&&P.push(Se(m,"chr",_.chr)),void 0!==_.limLoc&&(ke(_.limLoc,nt,m.path+".naryPr.limLoc","ST_LimLoc"),P.push(Se(m,"limLoc",_.limLoc))),void 0!==_.canGrow&&P.push(Me(m,"grow",_.canGrow)),void 0!==_.isSubscriptHidden&&P.push(Me(m,"subHide",_.isSubscriptHidden)),void 0!==_.isSuperscriptHidden&&P.push(Me(m,"supHide",_.isSuperscriptHidden)),Oe(P,_.ctrlPr),0<P.length&&w.push(xe(m,"naryPr",P)),w.push(Ee(m,"sub",g.subscript)),w.push(Ee(m,"sup",g.superscript)),w.push(Ee(m,"e",g.base)),xe(m,"nary",w);case"phant":return _=t,P=[],g=[],void 0!==(w=(m=e).properties).isShown&&g.push(Me(_,"show",w.isShown)),void 0!==w.isZeroWidth&&g.push(Me(_,"zeroWid",w.isZeroWidth)),void 0!==w.isZeroAscender&&g.push(Me(_,"zeroAsc",w.isZeroAscender)),void 0!==w.isZeroDescender&&g.push(Me(_,"zeroDesc",w.isZeroDescender)),void 0!==w.isTransparent&&g.push(Me(_,"transp",w.isTransparent)),Oe(g,w.ctrlPr),0<g.length&&P.push(xe(_,"phantPr",g)),P.push(Ee(_,"e",m.base)),xe(_,"phant",P);case"rad":return v=t,ye=[],b=[],void 0!==(y=e).properties.isDegreeHidden&&b.push(Me(v,"degHide",y.properties.isDegreeHidden)),Oe(b,y.properties.ctrlPr),0<b.length&&ye.push(xe(v,"radPr",b)),ye.push(Ee(v,"deg",y.deg)),ye.push(Ee(v,"e",y.base)),xe(v,"rad",ye);case"sPre":return b=[],void 0!==(ye=Rn(y=t,"sPrePr",(v=e).properties.isScriptAligned,v.properties.ctrlPr))&&b.push(ye),b.push(Ee(y,"sub",v.sub)),b.push(Ee(y,"sup",v.sup)),b.push(Ee(y,"e",v.base)),xe(y,"sPre",b);case"sSub":return ve=[],void 0!==(d=Rn(f=t,"sSubPr",(h=e).properties.isScriptAligned,h.properties.ctrlPr))&&ve.push(d),ve.push(Ee(f,"e",h.base)),ve.push(Ee(f,"sub",h.subscript)),xe(f,"sSub",ve);case"sSubSup":return d=[],void 0!==(ve=Rn(h=t,"sSubSupPr",(f=e).properties.isScriptAligned,f.properties.ctrlPr))&&d.push(ve),d.push(Ee(h,"e",f.base)),d.push(Ee(h,"sub",f.subscript)),d.push(Ee(h,"sup",f.superscript)),xe(h,"sSubSup",d);case"sSup":return he=[],void 0!==(de=Rn(pe=t,"sSupPr",(fe=e).properties.isScriptAligned,fe.properties.ctrlPr))&&he.push(de),he.push(Ee(pe,"e",fe.base)),he.push(Ee(pe,"sup",fe.superscript)),xe(pe,"sSup",he);case"arg":throw new _e("MathArgument cannot be serialized as a root; use a named CT_OMathArg slot",t.path,"child-order");case"unknown":if(void 0!==e.preservedXml)return e.preservedXml;throw new _e("unknown math node missing preservedXml",t.path,"required-child");default:de=e.type;throw new _e("Unhandled math kind: "+String(de),t.path,"required-child")}var pe,fe,he,de,f,h,ve,d,v,y,ye,b,m,g,w,P,_,p,l,x,S,be,M,me,O,k,E,ge,A,J,i,n,C,L,we,T,N,U,Pe,I}var h=function(){return(h=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},zn=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||0<t--)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},Dn=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(zn(arguments[t]));return e},Vn=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return{value:(e=e&&r>=e.length?void 0:e)&&e[r++],done:!e}}}};function Xn(e){return{kind:"element",namespaceUri:e.namespaceUri,localName:e.localName,prefix:e.prefix,attributes:e.attributes.map(function(e){return{namespaceUri:e.namespaceUri,localName:e.localName,prefix:e.prefix,value:e.value}}),namespaceDeclarations:e.namespaceDeclarations.map(function(e){return{prefix:e.prefix,namespaceUri:e.namespaceUri}}),children:e.children.map(Yn)}}function Yn(e){return"text"===e.kind?{kind:"text",value:e.value}:Xn(e)}function d(e){return void 0===e?void 0:Xn(e)}function qn(e){return h({},void 0!==e.ctrlPr?{ctrlPr:d(e.ctrlPr)}:{})}function Kn(e){return h({},void 0!==e.isScriptAligned?{isScriptAligned:e.isScriptAligned}:{},void 0!==e.ctrlPr?{ctrlPr:d(e.ctrlPr)}:{})}function Gn(e,t){if(void 0!==e||void 0!==t){if(void 0===e||void 0===t)return!1;if(e.namespaceUri!==t.namespaceUri||e.localName!==t.localName||e.prefix!==t.prefix||e.attributes.length!==t.attributes.length||e.namespaceDeclarations.length!==t.namespaceDeclarations.length||e.children.length!==t.children.length)return!1;for(var r=0;r<e.attributes.length;r++){var n=e.attributes[r],i=t.attributes[r];if(n.namespaceUri!==i.namespaceUri||n.localName!==i.localName||n.prefix!==i.prefix||n.value!==i.value)return!1}for(r=0;r<e.namespaceDeclarations.length;r++){n=e.namespaceDeclarations[r],i=t.namespaceDeclarations[r];if(n.prefix!==i.prefix||n.namespaceUri!==i.namespaceUri)return!1}for(r=0;r<e.children.length;r++){var o=e.children[r],a=t.children[r];if(o.kind!==a.kind)return!1;if("text"===o.kind&&"text"===a.kind){if(o.value!==a.value)return!1}else{if("element"!==o.kind||"element"!==a.kind)return!1;if(!Gn(o,a))return!1}}}return!0}function c(e,t,r){void 0===r&&(r="ctrlPr");var n,i,o=new Set(Dn(Object.keys(e),Object.keys(t)));try{for(var a=Vn(o),s=a.next();!s.done;s=a.next()){var u=s.value;if(u===r){if(Gn(e[u],t[u]))continue;return!1}if(e[u]!==t[u])return!1}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return!0}function Jn(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(!l(e[r],t[r]))return!1;return!0}function l(e,t){if(e.type!==t.type)return!1;if(e.preserveOnly!==t.preserveOnly)return!1;switch(e.type){case"t":return e.value===t.value&&e.xmlSpace===t.xmlSpace;case"arg":var r=e,n=t;return c(r.properties,n.properties)&&Gn(r.ctrlPr,n.ctrlPr)&&Jn(r.item,n.item);case"oMathPara":r=e,n=t;return c(r.properties,n.properties)&&Jn(r.equations,n.equations);case"oMath":return Jn(e.children,t.children);case"unknown":return e.localName===t.localName&&Gn(e.preservedXml,t.preservedXml);case"r":r=e,n=t;return c(r.properties,n.properties)&&Gn(r.wRPr,n.wRPr)&&Jn(r.children,n.children)&&function(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(!Gn(e[r],t[r]))return!1;return!0}(r.opaqueChildren,n.opaqueChildren);case"acc":case"bar":case"box":case"borderBox":o=t;return c((i=e).properties,o.properties)&&l(i.base,o.base);case"d":case"eqArr":o=t;return c((i=e).properties,o.properties)&&Jn(i.elements,o.elements);case"f":o=t;return c((i=e).properties,o.properties)&&l(i.numerator,o.numerator)&&l(i.denominator,o.denominator);case"func":o=t;return c((i=e).properties,o.properties)&&l(i.name,o.name)&&l(i.base,o.base);case"groupChr":o=t;return c((i=e).properties,o.properties)&&l(i.base,o.base);case"limLow":case"limUpp":o=t;return c((i=e).properties,o.properties)&&l(i.base,o.base)&&l(i.lim,o.lim);case"m":o=t;return c((i=e).properties,o.properties)&&Jn(i.rows,o.rows);case"mr":o=t;return Jn((i=e).elements,o.elements);case"nary":o=t;return c((i=e).properties,o.properties)&&l(i.subscript,o.subscript)&&l(i.superscript,o.superscript)&&l(i.base,o.base);case"phant":o=t;return c((i=e).properties,o.properties)&&l(i.base,o.base);case"rad":o=t;return c((i=e).properties,o.properties)&&l(i.deg,o.deg)&&l(i.base,o.base);case"sPre":o=t;return c((i=e).properties,o.properties)&&l(i.sub,o.sub)&&l(i.sup,o.sup)&&l(i.base,o.base);case"sSub":o=t;return c((i=e).properties,o.properties)&&l(i.base,o.base)&&l(i.subscript,o.subscript);case"sSubSup":o=t;return c((i=e).properties,o.properties)&&l(i.base,o.base)&&l(i.subscript,o.subscript)&&l(i.superscript,o.superscript);case"sSup":var i,o=t;return c((i=e).properties,o.properties)&&l(i.base,o.base)&&l(i.superscript,o.superscript);default:e.type;return!1}}var Wn,Zn=4,$n=4,Qn=64,ei="http://schemas.microsoft.com/office/2006/encryption",ti="http://schemas.microsoft.com/office/2006/keyEncryptor/password",ri=Uint8Array.of(254,167,210,118,59,75,158,121),ni=Uint8Array.of(215,170,15,109,48,97,52,78),ii=Uint8Array.of(20,110,11,231,171,172,208,214),oi=Uint8Array.of(95,178,173,1,12,185,225,246),ai=Uint8Array.of(160,103,127,2,178,44,132,51),si=4096,ui="EncryptionInfo",ci="EncryptedPackage",li=1e7,pi=2,fi=54,hi=54,t=(Wn=function(e,t){return(Wn=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}))(e,t)},function(e,t){function r(){this.constructor=e}Wn(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),di=function(){return(di=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},vi=1048576,p=Object.freeze({totalUncompressedBytes:1073741824,singlePartUncompressedBytes:256*vi,xmlNestingDepth:256,xmlAttributesPerElement:4096,textNodeLengthBytes:32*vi});function yi(e){var t,r,n;return void 0===e?p:(t=(null!=e.xmlNestingDepth?e:p).xmlNestingDepth,r=(null!=e.xmlAttributesPerElement?e:p).xmlAttributesPerElement,n=(null!=e.textNodeLengthBytes?e:p).textNodeLengthBytes,e=di({totalUncompressedBytes:(null!=e.totalUncompressedBytes?e:p).totalUncompressedBytes,singlePartUncompressedBytes:(null!=e.singlePartUncompressedBytes?e:p).singlePartUncompressedBytes},void 0===t?{}:{xmlNestingDepth:t},void 0===r?{}:{xmlAttributesPerElement:r},void 0===n?{}:{textNodeLengthBytes:n}),Object.freeze(e))}bi=Error,t(mi,bi);var bi,L=mi;function mi(e,t){var r=this.constructor,n=this,i=void 0===(t=void 0===t?{}:t).partName?"":" (part: "+t.partName+")",o=void 0===t.actual?"":"; actual value: "+String(t.actual);return(n=bi.call(this,"Package security limit exceeded: "+e+i+o)||this).name="PackageLimitError",n.limit=e,n.partName=t.partName,n.actual=t.actual,Object.setPrototypeOf(n,r.prototype),n}gi=Error,t(wi,gi);var gi,H=wi;function wi(e){var t=this.constructor,e=gi.call(this,e)||this;return e.name="EncryptedPackageError",Object.setPrototypeOf(e,t.prototype),e}Pi=Error,t(xi,Pi);var Pi,_i=xi;function xi(e){var t=this.constructor,e=Pi.call(this,e=void 0===e?"Invalid password":e)||this;return e.name="InvalidPasswordError",Object.setPrototypeOf(e,t.prototype),e}Si=Error,t(Mi,Si);var Si,b=Mi;function Mi(e){var t=this.constructor,e=Si.call(this,e=void 0===e?"Unsupported encryption method":e)||this;return e.name="UnsupportedEncryptionError",Object.setPrototypeOf(e,t.prototype),e}var Oi=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return{value:(e=e&&r>=e.length?void 0:e)&&e[r++],done:!e}}}};var vi=function(){try{return require("crypto")}catch(e){throw new Error("Node crypto is required for Agile encryption")}}(),ki=vi.createCipheriv,Ei=vi.createDecipheriv,Ai=vi.createHash,Ci=vi.createHmac,Li={"SHA-1":"sha1",SHA256:"sha256",SHA384:"sha384",SHA512:"sha512"},Ti={"SHA-1":20,SHA256:32,SHA384:48,SHA512:64};function Ni(e){switch(e){case"SHA-1":case"SHA1":return"SHA-1";case"SHA256":return"SHA256";case"SHA384":return"SHA384";case"SHA512":return"SHA512";default:throw new b("Unsupported OFFCRYPTO hashAlgorithm: "+Ki(e))}}function Ui(e,t){if("AES"!==e)throw new b("Unsupported OFFCRYPTO cipherAlgorithm: "+Ki(e));if("ChainingModeCBC"!==t)throw new b("Unsupported OFFCRYPTO cipherChaining: "+Ki(t))}function Ii(e){if(128!==e&&192!==e&&256!==e)throw new b("Unsupported OFFCRYPTO AES keyBits: "+String(e))}function ji(e){return Ti[e]}function Bi(e,t){e=Ai(Li[e]);return e.update(t),new Uint8Array(e.digest())}function Ri(e,t,r){e=Ci(Li[e],Buffer.from(t));return e.update(r),new Uint8Array(e.digest())}function Fi(){for(var t,e,r,n,i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];var a=0;try{for(var s=Oi(i),u=s.next();!u.done;u=s.next())a+=(h=u.value).byteLength}catch(e){t={error:e}}finally{try{u&&!u.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}var c=new Uint8Array(a),l=0;try{for(var p=Oi(i),f=p.next();!f.done;f=p.next()){var h=f.value;c.set(h,l),l+=h.byteLength}}catch(e){r={error:e}}finally{try{f&&!f.done&&(n=p.return)&&n.call(p)}finally{if(r)throw r.error}}return c}function Hi(e){for(var t=new Uint8Array(2*e.length),r=0;r<e.length;r++){var n=e.charCodeAt(r);t[2*r]=255&n,t[2*r+1]=n>>>8&255}return t}function zi(e,t,r,n,i,o){for(var a=Bi(e,Fi(t,r)),s=new Uint8Array(4),u=new DataView(s.buffer),c=0;c<n;c++)u.setUint32(0,c,!0),a=Bi(e,Fi(s,a));return Yi(Bi(e,Fi(a,i)),o/8,fi)}function Di(e,t,r,n){return Yi(void 0===r?t:Bi(e,Fi(t,r)),n,hi)}function Vi(e,t,r){if(0===r.byteLength)return new Uint8Array(0);if(r.byteLength%16!=0)throw new b("OFFCRYPTO AES-CBC ciphertext length is not block-aligned");if(16!==t.byteLength)throw new b("OFFCRYPTO AES-CBC IV must be 16 bytes");var n=qi(e.byteLength),n=Ei(n,Buffer.from(e),Buffer.from(t)),e=(n.setAutoPadding(!1),n.update(Buffer.from(r))),t=n.final();return 0===t.byteLength?new Uint8Array(e):((r=new Uint8Array(e.byteLength+t.byteLength)).set(e,0),r.set(t,e.byteLength),r)}function Xi(e,t){if(e.byteLength!==t.byteLength)return!1;for(var r=0,n=0;n<e.byteLength;n++)r|=(null!=e[n]?e[n]:0)^(null!=t[n]?t[n]:0);return 0===r}function Yi(e,t,r){return e.byteLength===t?e:e.byteLength>t?e.subarray(0,t):((t=new Uint8Array(t)).set(e,0),t.fill(r,e.byteLength),t)}function qi(e){switch(e){case 16:return"aes-128-cbc";case 24:return"aes-192-cbc";case 32:return"aes-256-cbc";default:throw new b("Unsupported AES key length")}}function Ki(e){e=e.replace(/[^\w.\-:/+]/g,"").slice(0,64);return 0<e.length?e:"(unrecognized)"}var Gi=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||0<t--)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},Ji=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Gi(arguments[t]));return e},Wi=256,Zi=4096,$i=33554432;function Qi(d,e,v){if(void 0===v&&(v="EncryptionInfo"),/<!DOCTYPE/i.test(d)||/<!ENTITY/i.test(d))throw new H("EncryptionInfo XML must not contain DTD or entities");function y(){for(;S<M;){var e=d.charCodeAt(S);if(32!==e&&9!==e&&10!==e&&13!==e)break;S+=1}}function b(e){return d.startsWith(e,S)}function m(){for(var e=S;S<M;){var t=d[S];if(!/[A-Za-z0-9:_.-]/.test(t))break;S+=1}if(S===e)throw new H("EncryptionInfo XML is invalid: expected name");return d.slice(e,S)}function g(e,t,r){var n=e.indexOf(":"),i=-1===n?"":e.slice(0,n),o=-1===n?e:e.slice(n+1);if(!r||""!==i){if("xmlns"===i)return{localName:o,namespaceUri:"http://www.w3.org/2000/xmlns/"};for(var a=t.length-1;0<=a;a--){var s=t[a].get(i);if(void 0!==s)return{localName:o,namespaceUri:s}}}return{localName:o,namespaceUri:""}}function w(e,t){if(P<t)throw new L("xmlNestingDepth",{partName:v,actual:t});if("<"!==O())throw new H("EncryptionInfo XML is invalid: expected element");if(S+=1,"/"===O())throw new H("EncryptionInfo XML is invalid: unexpected end tag");for(var r=m(),n=(y(),[]),i=!1,o=new Map;S<M&&">"!==O()&&"/"!==O();){var a=m();if(y(),"="!==O())throw new H("EncryptionInfo XML is invalid: expected =");S+=1,y();var s=function(){var e=O();if('"'!==e&&"'"!==e)throw new H("EncryptionInfo XML is invalid: attribute value");for(var t=S+=1;S<M&&d[S]!==e;)if(x<(S+=1)-t)throw new L("textNodeLengthBytes",{partName:v,actual:S-t});if(M<=S)throw new H("EncryptionInfo XML is invalid: unclosed attribute");var r=d.slice(t,S);return S+=1,k(r)}();if(y(),"xmlns"===a?o.set("",s):a.startsWith("xmlns:")?o.set(a.slice(6),s):n.push({qName:a,value:s}),_<n.length)throw new L("xmlAttributesPerElement",{partName:v,actual:n.length})}if(b("/>"))i=!0,S+=2;else{if(">"!==O())throw new H("EncryptionInfo XML is invalid: element tag");S+=1}var u=Ji(e,[o]),e=g(r,u,!1),c=n.map(function(e){var t=g(e.qName,u,!0);return{localName:t.localName,namespaceUri:t.namespaceUri,value:e.value}});if(i)return{kind:"element",localName:e.localName,namespaceUri:e.namespaceUri,attributes:c,children:[]};for(var l,p=[];;){if(y(),M<=S)throw new H("EncryptionInfo XML is invalid: unclosed element");if(b("</")){S+=2;var f=m();if(y(),">"!==O())throw new H("EncryptionInfo XML is invalid: end tag");if(S+=1,f!==r)throw new H("EncryptionInfo XML is invalid: mismatched end tag "+f);break}if(b("\x3c!--")){if((l=d.indexOf("--\x3e",S+4))<0)throw new H("EncryptionInfo XML is invalid: unclosed comment");S=l+3}else if(b("<?")){if((l=d.indexOf("?>",S+2))<0)throw new H("EncryptionInfo XML is invalid: unclosed PI");S=l+2}else if("<"===O())p.push(w(u,t+1));else for(var h=S;S<M&&"<"!==O();)if(x<(S+=1)-h)throw new L("textNodeLengthBytes",{partName:v,actual:S-h})}return{kind:"element",localName:e.localName,namespaceUri:e.namespaceUri,attributes:c,children:p}}var t,P=null!=e.xmlNestingDepth?e.xmlNestingDepth:Wi,_=null!=e.xmlAttributesPerElement?e.xmlAttributesPerElement:Zi,x=null!=e.textNodeLengthBytes?e.textNodeLengthBytes:$i,S=0,M=d.length,O=function(){return S<M?d[S]:""},k=function(e){return e.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&apos;/g,"'").replace(/&amp;/g,"&")};for(y(),b("\ufeff")&&(S+=1,y());b("<?")||b("\x3c!--");){if(b("<?")){if((t=d.indexOf("?>",S+2))<0)throw new H("EncryptionInfo XML is invalid: unclosed declaration");S=t+2}else{if((t=d.indexOf("--\x3e",S+4))<0)throw new H("EncryptionInfo XML is invalid: unclosed comment");S=t+3}y()}e=w([new Map],1);if(y(),S<M)throw new H("EncryptionInfo XML is invalid: trailing content");return e}var eo=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return{value:(e=e&&r>=e.length?void 0:e)&&e[r++],done:!e}}}};function to(){return function(){try{return Function("return this")()}catch(e){return{}}}()||{}}var ro=8;function no(t,e){if(t.byteLength<ro+1)throw new H("EncryptionInfo stream is truncated");var r=new DataView(t.buffer,t.byteOffset,t.byteLength),n=r.getUint16(0,!0),i=r.getUint16(2,!0),r=r.getUint32(4,!0);if(i===pi&&(2===n||3===n||4===n))throw new b("OFFCRYPTO Standard Encryption (EncryptionInfo minor version 2) is not supported; Agile (4.4) only");if(n!==Zn||i!==$n)throw new b("Unsupported EncryptionInfo version "+String(n)+"."+String(i));if(r!==Qn)throw new b("Unsupported EncryptionInfo reserved field 0x"+r.toString(16));var o,n=t.subarray(ro),r=(i=n,new TextDecoder("utf-8",{fatal:!0}).decode(i));try{o=Qi(r,e,"EncryptionInfo")}catch(e){if(e instanceof H||e instanceof b)throw e;if(e instanceof Error&&"PackageLimitError"===e.name)throw e;t=e instanceof Error?e.message:"XML parse failed";throw new H("EncryptionInfo XML is invalid: "+t)}if("encryption"!==o.localName||o.namespaceUri!==ei){if("encryption"!==o.localName)throw new H("EncryptionInfo root element is not encryption");if(""!==o.namespaceUri&&o.namespaceUri!==ei)throw new H("EncryptionInfo root element is not encryption")}n=io(o,ei,"keyData"),i=oo(o,ei,"dataIntegrity"),r=io(o,ei,"keyEncryptors");return{keyData:function(e){var t=so(e,"saltSize"),r=so(e,"blockSize"),n=so(e,"keyBits"),i=so(e,"hashSize"),o=m(e,"cipherAlgorithm"),a=m(e,"cipherChaining"),s=m(e,"hashAlgorithm"),e=uo(e,"saltValue"),s=(Ui(o,a),Ii(n),Ni(s));if(16!==r)throw new b("Unsupported OFFCRYPTO blockSize: "+String(r)+" (AES requires 16)");if(e.byteLength===t)return{saltSize:t,blockSize:r,keyBits:n,hashSize:i,cipherAlgorithm:o,cipherChaining:a,hashAlgorithm:s,saltValue:e};throw new H("keyData saltValue length does not match saltSize")}(n),dataIntegrity:void 0===i?void 0:{encryptedHmacKey:uo(e=i,"encryptedHmacKey"),encryptedHmacValue:uo(e,"encryptedHmacValue")},passwordKeyEncryptor:function(e){var t,e=e.children.filter(function(e){return"element"===e.kind&&"keyEncryptor"===e.localName});if(0===e.length)throw new H("EncryptionInfo has no keyEncryptor");try{for(var r=eo(e),n=r.next();!n.done;n=r.next()){var i=n.value,o=ao(i,"uri");if(o===ti){t=function(e){var t,r;try{for(var n=eo(e.children),i=n.next();!i.done;i=n.next()){var o=i.value;if("element"===o.kind&&"encryptedKey"===o.localName)return o}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return}(i);break}if(void 0!==o&&0<o.length)throw new b("OFFCRYPTO certificate (or non-password) keyEncryptor is not supported")}}catch(e){s={error:e}}finally{try{n&&!n.done&&(a=r.return)&&a.call(r)}finally{if(s)throw s.error}}if(void 0===t)throw new b("OFFCRYPTO EncryptionInfo has no password keyEncryptor");e=function(e,t){e=m(e,t),e=Number.parseInt(e,10);if(!Number.isFinite(e)||e<0)throw new H("EncryptionInfo attribute "+t+" is invalid");return e}(t,"spinCount");if(li<e)throw new H("OFFCRYPTO spinCount exceeds maximum allowed ("+String(li)+")");var a=so(t,"saltSize"),s=so(t,"blockSize"),u=so(t,"keyBits"),c=so(t,"hashSize"),l=m(t,"cipherAlgorithm"),p=m(t,"cipherChaining"),f=m(t,"hashAlgorithm"),h=uo(t,"saltValue"),d=uo(t,"encryptedVerifierHashInput"),v=uo(t,"encryptedVerifierHashValue"),y=uo(t,"encryptedKeyValue"),f=(Ui(l,p),Ii(u),Ni(f));if(16!==s)throw new b("Unsupported password keyEncryptor blockSize: "+String(s));if(h.byteLength===a)return{spinCount:e,saltSize:a,blockSize:s,keyBits:u,hashSize:c,cipherAlgorithm:l,cipherChaining:p,hashAlgorithm:f,saltValue:h,encryptedVerifierHashInput:d,encryptedVerifierHashValue:v,encryptedKeyValue:y};throw new H("encryptedKey saltValue length does not match saltSize")}(r)}}function io(e,t,r){e=oo(e,t,r);if(void 0===e)throw new H("EncryptionInfo missing element "+r);return e}function oo(e,t,r){var n,i,o,a;try{for(var s=eo(e.children),u=s.next();!u.done;u=s.next()){var c=u.value;if("element"===c.kind&&(c.localName===r&&(c.namespaceUri===t||""===c.namespaceUri)))return c}}catch(e){n={error:e}}finally{try{u&&!u.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}try{for(var l=eo(e.children),p=l.next();!p.done;p=l.next())if("element"===(c=p.value).kind&&c.localName===r)return c}catch(e){o={error:e}}finally{try{p&&!p.done&&(a=l.return)&&a.call(l)}finally{if(o)throw o.error}}}function ao(e,t){var r,n;try{for(var i=eo(e.attributes),o=i.next();!o.done;o=i.next()){var a=o.value;if(a.localName===t)return a.value}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}function m(e,t){e=ao(e,t);if(void 0===e||0===e.length)throw new H("EncryptionInfo missing attribute "+t);return e}function so(e,t){e=m(e,t),e=Number.parseInt(e,10);if(!Number.isFinite(e)||e<=0)throw new H("EncryptionInfo attribute "+t+" is invalid");return e}function uo(e,t){e=m(e,t);try{var r=e;if(r=r.replace(/\s+/g,""),"function"!=typeof to().atob)return new Uint8Array(Buffer.from(r,"base64"));for(var n=to().atob(r),i=new Uint8Array(n.length),o=0;o<n.length;o++)i[o]=n.charCodeAt(o);return i}catch(e){throw new H("EncryptionInfo attribute "+t+" is not valid base64")}}var co=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return{value:(e=e&&r>=e.length?void 0:e)&&e[r++],done:!e}}}},lo=Object.freeze([208,207,17,224,161,177,26,225]),po=9,fo=12,ho=4294967294,vo=4294967295,yo=4294967293,bo=4294967292,mo=128,go=65536,wo=1048576;function Po(h){if(h.byteLength<512)throw new H("OFFCRYPTO package is truncated (CFB header)");for(var e=0;e<lo.length;e++)if(h[e]!==lo[e])throw new H("Package is not a valid OLE compound file");var d=new DataView(h.buffer,h.byteOffset,h.byteLength),t=d.getUint16(30,!0);if(t!==po&&t!==fo)throw new H("Unsupported CFB sector size");var v=1<<t,t=d.getUint16(32,!0);if(6!==t)throw new H("Unsupported CFB mini-sector size");var y=1<<t,b=d.getUint32(56,!0),t=d.getUint32(48,!0),m=d.getUint32(60,!0),g=d.getUint32(64,!0),r=d.getUint32(44,!0),n=d.getUint32(68,!0),i=d.getUint32(72,!0);if(wo<r)throw new H("CFB FAT is unreasonably large");for(var o=[],e=0;e<109;e++)(u=d.getUint32(76+4*e,!0))!==vo&&o.push(u);for(var a=n,s=0;s<i&&a!==ho&&a!==vo;s++){_o(h,p=(a+1)*v,v);for(var u,c=v/4-1,e=0;e<c;e++)(u=d.getUint32(p+4*e,!0))!==vo&&o.push(u);a=d.getUint32(p+4*c,!0)}if(o.length<r)throw new H("CFB DIFAT is truncated");for(var w=[],e=0;e<r;e++){var l=o[e];if(void 0===l)throw new H("CFB DIFAT is truncated");_o(h,p=(l+1)*v,v);for(var p,f=v/4,P=0;P<f;P++)w.push(d.getUint32(p+4*P,!0))}n=xo(h,0,w,t,v,void 0);if(n.byteLength<mo)throw new H("CFB directory is empty");for(var _=Math.min(Math.floor(n.byteLength/mo),go),x=new DataView(n.buffer,n.byteOffset,n.byteLength),S=[],e=0;e<_;e++){for(var M=e*mo,O=x.getUint16(64+M,!0),j=2<=O?Math.floor((O-2)/2):0,k="",E=0;E<j&&E<32;E++)k+=String.fromCharCode(x.getUint16(M+2*E,!0));var O=x.getUint8(66+M),B=x.getUint32(76+M,!0),R=x.getUint32(116+M,!0),F=x.getUint32(120+M,!0);if(0!==x.getUint32(124+M,!0))throw new H("OFFCRYPTO stream exceeds supported size");S.push({name:k,objectType:O,startSector:R,streamSize:F,childId:B})}var A=S[0];if(void 0===A||5!==A.objectType)throw new H("CFB root storage is missing");function C(e){var t,r;4294967290<e||S.length<=e||U.has(e)||(U.add(e),void 0!==(t=S[e])&&(r=x.getUint32(e*mo+68,!0),e=x.getUint32(e*mo+72,!0),C(r),2===t.objectType&&N.set(t.name,t),C(e),1===t.objectType||5===t.objectType)&&C(t.childId))}var L,T,N=new Map,U=new Set,t=(C(A.childId),N.get(ui)),n=N.get(ci);if(void 0===t||void 0===n)throw new H("OFFCRYPTO streams EncryptionInfo and/or EncryptedPackage are missing");function I(e){if(0===e.streamSize)return new Uint8Array(0);if(e.streamSize<b&&e!==A){if(void 0===L&&(L=function(e,t,r,n,i,o){if(0===i||n===ho)return[];for(var a=xo(e,0,r,n,o,i*o),s=new DataView(a.buffer,a.byteOffset,a.byteLength),u=[],c=0;c+4<=a.byteLength;c+=4)u.push(s.getUint32(c,!0));return u}(h,d,w,m,g,v),T=xo(h,0,w,A.startSector,v,void 0)),void 0===T)throw new H("CFB mini-stream is unavailable");for(var t=T,r=L,n=e.startSector,i=y,o=e.streamSize,a=[],s=0,u=n,c=0,l=r.length+2;u!==ho&&u!==vo&&s<o;){if(c++>l)throw new H("CFB mini-FAT chain is cyclic or unbounded");var p=u*i;if(p>=t.byteLength)throw new H("CFB mini-stream is truncated");var f=Math.min(i,t.byteLength-p,o-s);if(a.push(t.subarray(p,p+f)),s+=f,u>=r.length)throw new H("CFB mini-FAT sector out of range");p=r[u];if(void 0===p)throw new H("CFB mini-FAT sector out of range");u=p}if((n=So(a)).byteLength<o)throw new H("OFFCRYPTO mini-stream data is truncated");return n.subarray(0,o)}return xo(h,0,w,e.startSector,v,e.streamSize)}return{encryptionInfo:I(t),encryptedPackage:I(n)}}function _o(e,t,r){if(t<0||r<0||t+r>e.byteLength)throw new H("OFFCRYPTO package is truncated (CFB sector)")}function xo(e,t,r,n,i,o){if(n===ho||n===vo)return new Uint8Array(0);for(var a=[],s=0,u=n,c=0,l=r.length+2;u!==ho&&u!==vo;){if(c++>l)throw new H("CFB FAT chain is cyclic or unbounded");if(u===yo||u===bo)throw new H("CFB FAT chain contains reserved sector");if(u<0||u>=r.length){var p=(u+1)*i;if(p+i>e.byteLength&&p>=e.byteLength)throw new H("CFB FAT chain sector out of range")}var p=(u+1)*i,f=(_o(e,p,Math.min(i,e.byteLength-p)),Math.min(i,e.byteLength-p)),f=e.subarray(p,p+f);if(a.push(f),s+=f.byteLength,void 0!==o&&o<=s)break;if(u>=r.length)throw new H("CFB FAT chain sector out of range");f=r[u];if(void 0===f)throw new H("CFB FAT chain sector out of range");u=f}n=So(a);if(void 0===o)return n;if(n.byteLength<o)throw new H("OFFCRYPTO stream data is truncated");return n.subarray(0,o)}function So(e){var t,r,n,i,o=0;try{for(var a=co(e),s=a.next();!s.done;s=a.next())o+=(f=s.value).byteLength}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}var u=new Uint8Array(o),c=0;try{for(var l=co(e),p=l.next();!p.done;p=l.next()){var f=p.value;u.set(f,c),c+=f.byteLength}}catch(e){n={error:e}}finally{try{p&&!p.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}return u}var Mo=8;function Oo(e,t,r,n,i){if(e.byteLength<Mo)throw new H("EncryptedPackage stream is truncated");var o=Math.max(i.singlePartUncompressedBytes,i.totalUncompressedBytes);if(e.byteLength>o+Mo+si)throw new L("singlePartUncompressedBytes",{actual:e.byteLength});var o=new DataView(e.buffer,e.byteOffset,e.byteLength),a=o.getUint32(0,!0);if(0!==o.getUint32(4,!0))throw new L("singlePartUncompressedBytes",{actual:Number.MAX_SAFE_INTEGER});o=a;if(o>i.singlePartUncompressedBytes)throw new L("singlePartUncompressedBytes",{actual:o});if(o>i.totalUncompressedBytes)throw new L("totalUncompressedBytes",{actual:o});a=e.subarray(Mo);if(0===a.byteLength&&0<o)throw new H("EncryptedPackage has StreamSize but no ciphertext");if(void 0!==n){var i=e,e=t,s=(c=r).hashAlgorithm,u=c.saltValue,c=c.blockSize,l=Di(s,u,oi,c),l=Vi(e,l,n.encryptedHmacKey),p=Ti[s];if(l.byteLength<p)throw new _i;if(l=l.subarray(0,p),u=Di(s,u,ai,c),(c=Vi(e,u,n.encryptedHmacValue)).byteLength<p)throw new _i;if(e=c.subarray(0,p),!Xi(Ri(s,l,i).subarray(0,p),e))throw new _i}u=function(e,t,r){var n=si,i=r.blockSize,o=new Uint8Array(e.byteLength),a=0,s=0,u=0;for(;u<e.byteLength;){var c=e.byteLength-u,c=n<c?n:c;if(c%i!=0)throw new H("EncryptedPackage segment is not block-aligned");var l=e.subarray(u,u+c),p=function(e){var t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,e>>>0,!0),t}(s),p=Di(r.hashAlgorithm,r.saltValue,p,i),p=Vi(t,p,l);o.set(p,a),a+=p.byteLength,u+=c,s+=1}return o.subarray(0,a)}(a,t,r);if(u.byteLength<o)throw new H("Decrypted EncryptedPackage is shorter than StreamSize");return u.subarray(0,o)}var ko=function(o,a,s,u){return new(s=s||Promise)(function(e,t){function r(e){try{i(u.next(e))}catch(e){t(e)}}function n(e){try{i(u.throw(e))}catch(e){t(e)}}function i(t){t.done?e(t.value):new s(function(e){e(t.value)}).then(r,n)}i((u=u.apply(o,a||[])).next())})},Eo=function(n,i){var o,a,s,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,a&&(s=2&t[0]?a.return:t[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,t[1])).done)return s;switch(a=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return u.label++,{value:t[1],done:!1};case 5:u.label++,a=t[1],t=[0];continue;case 7:t=u.ops.pop(),u.trys.pop();continue;default:if(!(s=0<(s=u.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){u=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))u.label=t[1];else if(6===t[0]&&u.label<s[1])u.label=s[1],s=t;else{if(!(s&&u.label<s[2])){s[2]&&u.ops.pop(),u.trys.pop();continue}u.label=s[2],u.ops.push(t)}}t=i.call(n,u)}catch(e){t=[6,e],a=0}finally{o=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},Ao=Object.freeze([208,207,17,224,161,177,26,225]);e.AGILE_ENCRYPTION_NS=ei,e.AGILE_RESERVED=Qn,e.AGILE_VERSION_MAJOR=Zn,e.AGILE_VERSION_MINOR=$n,e.BLOCK_KEY_ENCRYPTOR_KEY=ii,e.BLOCK_KEY_HMAC_KEY=oi,e.BLOCK_KEY_HMAC_VALUE=ai,e.BLOCK_KEY_VERIFIER_HASH=ni,e.BLOCK_KEY_VERIFIER_INPUT=ri,e.DEFAULT_DECRYPT_SECURITY_LIMITS=p,e.DIAG_INVALID_INK_TRACE=pe,e.EMUS_PER_POINT=re,e.ENCRYPTED_PACKAGE_SEGMENT_SIZE=si,e.EncryptedPackageError=H,e.INKML_NAMESPACE=F,e.INK_CONTENT_TYPE="application/inkml+xml",e.INK_EFFECT_COLORS=f,e.INK_SOURCE_RELATIONSHIP_TYPE="http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml",e.InvalidPasswordError=_i,e.MATH_BREAKBINSUB_VALUES=at,e.MATH_BREAKBIN_VALUES=ot,e.MATH_FTYPE_VALUES=tt,e.MATH_JC_VALUES=et,e.MATH_LIMLOC_VALUES=nt,e.MATH_NAMESPACE=We,e.MATH_PREFIX_FALLBACKS=Ze,e.MATH_SCRIPT_VALUES=st,e.MATH_SHP_VALUES=rt,e.MATH_SPACING_RULE_VALUES=[0,1,2,3,4],e.MATH_STYLE_VALUES=ut,e.MATH_TOPBOT_VALUES=it,e.MathAccent=$t,e.MathArgument=Nt,e.MathBar=tr,e.MathBorderBox=sr,e.MathBox=ir,e.MathDelimiter=lr,e.MathElement=r,e.MathEquationArray=hr,e.MathFraction=yr,e.MathFunction=gr,e.MathGroupCharacter=_r,e.MathLimitLower=Mr,e.MathLimitUpper=Er,e.MathMatrix=Ur,e.MathMatrixRow=Lr,e.MathNaryOperator=Br,e.MathOMath=qt,e.MathParagraph=Vt,e.MathPhantom=Hr,e.MathPreSubSuperscript=qr,e.MathRadical=Vr,e.MathRun=on,e.MathSubSuperscript=$r,e.MathSubscript=Jr,e.MathSuperscript=tn,e.MathText=Ct,e.OFFICE_COMMON_PACKAGE_NAME="@syncfusion/ej2-office-common",e.PASSWORD_KEY_ENCRYPTOR_NS="http://schemas.microsoft.com/office/2006/keyEncryptor/password",e.PASSWORD_KEY_ENCRYPTOR_URI=ti,e.PackageLimitError=L,e.STREAM_ENCRYPTED_PACKAGE=ci,e.STREAM_ENCRYPTION_INFO=ui,e.UnknownMathElement=jt,e.UnsupportedEncryptionError=b,e.WML_TRANSITIONAL_NAMESPACE=$e,e.WORDML_2010_NAMESPACE="http://schemas.microsoft.com/office/word/2010/wordml",e.WORDPROCESSING_INK_URI="http://schemas.microsoft.com/office/word/2010/wordprocessingInk",e.XML_NAMESPACE=Qe,e.addInkTrace=function(e,t,r){var n,i,o,a;if(ee(e))return e=e,t=t.map(function(e){return{x:e.x,y:e.y}}),void 0!==(n=e.traces[e.traces.length-1])&&(i=e.brushes.find(function(e){return e.id===n.brushRef})),a=function(e){for(var t=new Set(e.map(function(e){return e.id})),r=0;;){var n="#br"+String(r);if(!t.has(n))return n;r+=1}}(e.brushes),i=void 0!==i?W(i,a):{color:G,size:{width:K,height:K},units:J,inkEffect:"none",ignorePressure:!0,id:a},void 0!==r&&(a=i,void 0!==(r=r).color&&(a.color=r.color),void 0!==r.size&&(a.size={width:r.size.width,height:r.size.height}),void 0!==r.units&&(a.units=r.units),void 0===r.inkEffect||"none"!==(o=r.inkEffect)&&"pencil"!==o&&"rainbow"!==o&&"galaxy"!==o&&"lava"!==o&&"ocean"!==o&&"roseGold"!==o&&"gold"!==o&&"silver"!==o&&"bronze"!==o||(a.inkEffect=r.inkEffect),void 0!==r.ignorePressure&&(a.ignorePressure=r.ignorePressure),void 0!==r.tip&&(a.tip=r.tip),void 0!==r.rasterOp&&(a.rasterOp=r.rasterOp),void 0!==r.anchorX&&(a.anchorX=r.anchorX),void 0!==r.anchorY&&(a.anchorY=r.anchorY),void 0!==r.scaleFactor)&&(a.scaleFactor=r.scaleFactor),e.brushes.push(i),o={points:t,brushRef:i.id,contextRef:"#ctx0"},a=e.traces.length,e.traces.push(o),void 0!==e.traceTree&&(e.traceTree=X(e.traceTree,[{kind:"trace",traceIndex:a}])),o;throw new TypeError("addInkTrace: expected OfficeInk from createInk/cloneInk")},e.aesCbcDecrypt=Vi,e.aesCbcEncrypt=function(e,t,r){if(16!==t.byteLength)throw new b("OFFCRYPTO AES-CBC IV must be 16 bytes");var n=0===r.byteLength?16:16*Math.ceil(r.byteLength/16),r=((n=new Uint8Array(n)).set(r,0),qi(e.byteLength)),e=((r=ki(r,Buffer.from(e),Buffer.from(t))).setAutoPadding(!1),r.update(Buffer.from(n)));return 0===(t=r.final()).byteLength?new Uint8Array(e):((n=new Uint8Array(e.byteLength+t.byteLength)).set(e,0),n.set(t,e.byteLength),n)},e.attrValue=ln,e.attrValueNs=pn,e.childElements=cn,e.cloneInk=function(e){var t;if(ee(e))return t=(e=e).brushes.map(function(e){return W(e,e.id)}),t={traces:e.traces.map(function(e){var t={points:e.points.map(function(e){return{x:e.x,y:e.y}}),brushRef:e.brushRef,contextRef:e.contextRef};return void 0!==e.timeOffset&&(t.timeOffset=e.timeOffset),t}),brushes:t,scaleMode:e.scaleMode},void 0!==e.contexts&&(t.contexts=e.contexts.map(Z)),void 0!==e.traceTree&&(t.traceTree=function t(e){return e.map(function(e){return"trace"===e.kind?{kind:"trace",traceIndex:e.traceIndex}:{kind:"group",children:t(e.children)}})}(e.traceTree)),$(t);throw new TypeError("cloneInk: expected OfficeInk from createInk/cloneInk")},e.cloneMathElement=function e(t){switch(t.type){case"t":return new Ct(t.value,t.xmlSpace);case"arg":var r=t;return new Nt((f=r.properties,h({},void 0!==f.argSz?{argSz:f.argSz}:{})),r.item.map(e),d(r.ctrlPr));case"oMathPara":return new Vt((r=(f=t).properties,h({},void 0!==r.jc?{jc:r.jc}:{})),f.equations.map(e));case"oMath":return new qt(t.children.map(e));case"unknown":var n=t,i=n.preservedXml;return new jt(n.localName,void 0===i?{kind:"element",namespaceUri:"",localName:n.localName,prefix:"",attributes:[],namespaceDeclarations:[],children:[]}:Xn(i));case"r":return new on((n=t).children.map(e),(i=n.properties,h({},void 0!==i.isLiteral?{isLiteral:i.isLiteral}:{},void 0!==i.isNormal?{isNormal:i.isNormal}:{},void 0!==i.scr?{scr:i.scr}:{},void 0!==i.sty?{sty:i.sty}:{},void 0!==i.isAligned?{isAligned:i.isAligned}:{},void 0!==i.brk?{brk:i.brk}:{})),void 0===n.wRPr?void 0:Xn(n.wRPr),n.opaqueChildren.map(Xn));case"acc":return new $t((n=(o=t).properties,h({},void 0!==n.chr?{chr:n.chr}:{},void 0!==n.ctrlPr?{ctrlPr:d(n.ctrlPr)}:{})),e(o.base));case"bar":return new tr((p=(o=t).properties,h({},void 0!==p.pos?{pos:p.pos}:{},void 0!==p.ctrlPr?{ctrlPr:d(p.ctrlPr)}:{})),e(o.base));case"box":return new ir((p=(o=t).properties,h({},void 0!==p.isOperatorEmulated?{isOperatorEmulated:p.isOperatorEmulated}:{},void 0!==p.isNoBreak?{isNoBreak:p.isNoBreak}:{},void 0!==p.isDifferential?{isDifferential:p.isDifferential}:{},void 0!==p.isAligned?{isAligned:p.isAligned}:{},void 0!==p.ctrlPr?{ctrlPr:d(p.ctrlPr)}:{})),e(o.base));case"borderBox":return new sr((l=(o=t).properties,h({},void 0!==l.isTopHidden?{isTopHidden:l.isTopHidden}:{},void 0!==l.isBottomHidden?{isBottomHidden:l.isBottomHidden}:{},void 0!==l.isLeftHidden?{isLeftHidden:l.isLeftHidden}:{},void 0!==l.isRightHidden?{isRightHidden:l.isRightHidden}:{},void 0!==l.hasHorizontalStrike?{hasHorizontalStrike:l.hasHorizontalStrike}:{},void 0!==l.hasVerticalStrike?{hasVerticalStrike:l.hasVerticalStrike}:{},void 0!==l.hasBottomLeftToTopRightStrike?{hasBottomLeftToTopRightStrike:l.hasBottomLeftToTopRightStrike}:{},void 0!==l.hasTopLeftToBottomRightStrike?{hasTopLeftToBottomRightStrike:l.hasTopLeftToBottomRightStrike}:{},void 0!==l.ctrlPr?{ctrlPr:d(l.ctrlPr)}:{})),e(o.base));case"d":return new lr((l=(o=t).properties,h({},void 0!==l.begChr?{begChr:l.begChr}:{},void 0!==l.sepChr?{sepChr:l.sepChr}:{},void 0!==l.endChr?{endChr:l.endChr}:{},void 0!==l.canGrow?{canGrow:l.canGrow}:{},void 0!==l.shp?{shp:l.shp}:{},void 0!==l.ctrlPr?{ctrlPr:d(l.ctrlPr)}:{})),o.elements.map(e));case"eqArr":return new hr((c=(o=t).properties,h({},void 0!==c.baseJc?{baseJc:c.baseJc}:{},void 0!==c.hasMaxDistance?{hasMaxDistance:c.hasMaxDistance}:{},void 0!==c.hasObjectDistance?{hasObjectDistance:c.hasObjectDistance}:{},void 0!==c.ctrlPr?{ctrlPr:d(c.ctrlPr)}:{})),o.elements.map(e));case"f":return new yr((c=(o=t).properties,h({},void 0!==c.type?{type:c.type}:{},void 0!==c.ctrlPr?{ctrlPr:d(c.ctrlPr)}:{})),e(o.numerator),e(o.denominator));case"func":return new gr((u=(o=t).properties,h({},void 0!==u.ctrlPr?{ctrlPr:d(u.ctrlPr)}:{})),e(o.name),e(o.base));case"groupChr":return new _r((u=(o=t).properties,h({},void 0!==u.chr?{chr:u.chr}:{},void 0!==u.pos?{pos:u.pos}:{},void 0!==u.vertJc?{vertJc:u.vertJc}:{},void 0!==u.ctrlPr?{ctrlPr:d(u.ctrlPr)}:{})),e(o.base));case"limLow":return new Mr(qn((o=t).properties),e(o.base),e(o.lim));case"limUpp":return new Er(qn((o=t).properties),e(o.base),e(o.lim));case"m":return new Ur((s=(o=t).properties,h({},void 0!==s.baseJc?{baseJc:s.baseJc}:{},void 0!==s.isPlaceholderHidden?{isPlaceholderHidden:s.isPlaceholderHidden}:{},void 0!==s.ctrlPr?{ctrlPr:d(s.ctrlPr)}:{})),o.rows.map(e));case"mr":return new Lr((o=t).elements.map(e));case"nary":return new Br((s=(o=t).properties,h({},void 0!==s.chr?{chr:s.chr}:{},void 0!==s.limLoc?{limLoc:s.limLoc}:{},void 0!==s.canGrow?{canGrow:s.canGrow}:{},void 0!==s.isSubscriptHidden?{isSubscriptHidden:s.isSubscriptHidden}:{},void 0!==s.isSuperscriptHidden?{isSuperscriptHidden:s.isSuperscriptHidden}:{},void 0!==s.ctrlPr?{ctrlPr:d(s.ctrlPr)}:{})),e(o.subscript),e(o.superscript),e(o.base));case"phant":return new Hr((a=(o=t).properties,h({},void 0!==a.isShown?{isShown:a.isShown}:{},void 0!==a.isZeroWidth?{isZeroWidth:a.isZeroWidth}:{},void 0!==a.isZeroAscender?{isZeroAscender:a.isZeroAscender}:{},void 0!==a.isZeroDescender?{isZeroDescender:a.isZeroDescender}:{},void 0!==a.isTransparent?{isTransparent:a.isTransparent}:{},void 0!==a.ctrlPr?{ctrlPr:d(a.ctrlPr)}:{})),e(o.base));case"rad":return new Vr((a=(o=t).properties,h({},void 0!==a.isDegreeHidden?{isDegreeHidden:a.isDegreeHidden}:{},void 0!==a.ctrlPr?{ctrlPr:d(a.ctrlPr)}:{})),e(o.deg),e(o.base));case"sPre":return new qr(Kn((o=t).properties),e(o.sub),e(o.sup),e(o.base));case"sSub":return new Jr(Kn((o=t).properties),e(o.base),e(o.subscript));case"sSubSup":return new $r(Kn((o=t).properties),e(o.base),e(o.subscript),e(o.superscript));case"sSup":var o;return new tn(Kn((o=t).properties),e(o.base),e(o.superscript));default:throw t.type,new Error("cloneMathElement: unhandled kind")}var a,s,u,c,l,p,f},e.computeInkBounds=w,e.concatBytes=Fi,e.createElement=sn,e.createInk=function(){return $({traces:[],brushes:[],scaleMode:"authored"})},e.createText=un,e.decodeTrace=v,e.decryptOffCryptoPackage=function(o,a,s){return void 0===s&&(s=p),ko(this,void 0,void 0,function(){var t,r,n,i;return Eo(this,function(e){return t=yi(s),r=Po(o),n=no(r.encryptionInfo,t),i=function(e,t){var e=Hi(e),r=t.hashAlgorithm,n=t.saltValue,i=t.spinCount,o=t.keyBits,a=t.blockSize,s=t.hashSize;if((u=Vi(zi(r,n,e,i,ri,o),Di(r,n,void 0,a),t.encryptedVerifierHashInput)).byteLength<t.saltSize)throw new _i;var u=Bi(r,u.subarray(0,t.saltSize)),c=Vi(zi(r,n,e,i,ni,o),Di(r,n,void 0,a),t.encryptedVerifierHashValue);if((s=Math.min(s,u.byteLength,c.byteLength))<=0)throw new _i;if(!Xi(u.subarray(0,s),c.subarray(0,s)))throw new _i;if(u=Vi(zi(r,n,e,i,ii,o),Di(r,n,void 0,a),t.encryptedKeyValue),c=o/8,u.byteLength<c)throw new _i;return u.subarray(0,c)}(a,n.passwordKeyEncryptor),[2,Oo(r.encryptedPackage,i,n.keyData,n.dataIntegrity,t)]})})},e.deriveAgileIv=Di,e.deriveAgileKey=zi,e.emitOnOff=function(e){return e?"1":"0"},e.encodePasswordUtf16Le=Hi,e.encodeTrace=y,e.formatUnitValue=oe,e.getLastInkParseDiagnostics=function(){return Ce},e.hashBytes=Bi,e.hashDigestLength=ji,e.hmacBytes=Ri,e.inkEffectColor=T,e.inkPathPoints=function(e,t){var r,n,i,o,a,s;if(!ee(e))throw new TypeError("inkPathPoints: expected OfficeInk from createInk/cloneInk");var u=[];try{for(var c=Y(e.traces),l=c.next();!l.done;l=c.next()){var p=l.value;try{for(var f=Y(p.points),h=f.next();!h.done;h=f.next()){var d=h.value;u.push(d)}}catch(e){i={error:e}}finally{try{h&&!h.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}}}catch(e){r={error:e}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}if(0===u.length)return e.traces.map(function(){return[]});var v=("decoded"===e.scaleMode?P:z)(u,t),y=0,b=[];try{for(var m=Y(e.traces),g=m.next();!g.done;g=m.next()){var p=g.value,w=v.slice(y,y+p.points.length);y+=p.points.length,b.push(X(w))}}catch(e){a={error:e}}finally{try{g&&!g.done&&(s=m.return)&&s.call(m)}finally{if(a)throw a.error}}return b},e.isInteger2=yt,e.isInteger255=bt,e.isOffCryptoPackage=function(e){var t=e instanceof Uint8Array?e:new Uint8Array(e);if(t.byteLength<Ao.length)return!1;for(var r=0;r<Ao.length;r++)if(t[r]!==Ao[r])return!1;return!0},e.isOfficeInk=ee,e.isSpacingRule=function(e){return Number.isInteger(e)&&0<=e&&e<=4},e.isUnSignedInteger=function(e){return Number.isInteger(e)&&0<=e},e.mathArg=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new Nt({},e)},e.mathElementToOpenXml=function(e,t){return Hn(e,{prefix:function(e){var t,r;if(void 0!==(null==e?void 0:e.prefix)&&0<e.prefix.length)return e.prefix;var n=new Set(null!=(e=null==e?void 0:e.reservedPrefixes)?e:[]);try{for(var i=Tn(Ze),o=i.next();!o.done;o=i.next()){var a=o.value;if(!n.has(a))return a}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return"m999"}(t),path:e.type})},e.mathEqual=l,e.parseInkXml=function(e){var t,r,n,i,o,a=[],s=0,u=0,c=0,l=[],p=[],f=[],h=[];if("ink"!==(o=e).localName||!R(o)&&o.namespaceUri!==F)return Ce={items:a,traceCount:0,packetCount:0,pointCount:0,channelValueCount:0},Q({traces:[],brushes:[]});var d=!1;try{for(var v=le(e.children),y=v.next();!y.done;y=v.next())if("element"===(k=y.value).kind&&R(k)){var b=k.localName;if(!de.has(b)&&"definitions"===b&&!d){d=!0,M=O=S=x=g=m=_=P=w=void 0;var m,g,w=k,P=l,_=p;try{for(var x=le(w.children),S=x.next();!S.done;S=x.next()){var M,O=S.value;"element"!==O.kind||!R(O)||de.has(O.localName)||("brush"===O.localName?P.push(function(t){function e(e){if("element"===e.kind&&R(e)&&"brushProperty"===e.localName){var t=B(e,"name");if(void 0!==t&&(t=t.trim().toLowerCase(),ve.has(t))){var r,n=null!=(r=B(e,"value"))?r:"",i=B(e,"units");switch(t){case"width":void 0!==(a=Ie(n))&&(h=ne(a,o=null!=i?i:"cm"),_||(v=o),P=!0,v=o);break;case"height":void 0!==(a=Ie(n))&&(d=ne(a,o=null!=i?i:v),_=!0,void 0!==i)&&(v=i);break;case"color":var o=function(e){var t,r,n,e=e.trim();if(0!==e.length&&(e.startsWith("#")||(e="#"+e),/^#[0-9A-Fa-f]{6}$/.test(e)||/^#[0-9A-Fa-f]{3}$/.test(e)))return(4===e.length?(t=e.charAt(1),r=e.charAt(2),n=e.charAt(3),"#"+t+t+r+r+n+n):e).toUpperCase();return}(n);void 0!==o&&(y=o);break;case"tip":0<n.length&&(b=n);break;case"rasterop":0<n.length&&(m=n);break;case"ignorepressure":g=je(n);break;case"inkeffects":o=n.trim().toLowerCase().replace(/[_\s-]/g,""),o=ye.get(o);void 0!==o&&(w=o);break;case"anchorx":s=n;break;case"anchory":u=n;break;case"scalefactor":c=n;break;case"transparency":var a=Number(n);Number.isFinite(a)&&(l=a);break;case"antialiased":p=je(n);break;case"fittocurve":f=je(n)}}}}var r,s,u,c,l,p,f,n=function(){var e=Ne(t);return null!=e?e:""}(),n=Ue(0<n.length?n:"br0"),h=ne(be,"cm"),d=ne(me,"cm"),v="cm",y=ge,b=we,m=Pe,g=!1,w="none",P=!1,_=!1;try{for(var i=le(t.children),o=i.next();!o.done;o=i.next()){var a=o.value;e(a)}}catch(e){r={error:e}}finally{try{o&&!o.done&&(x=i.return)&&x.call(i)}finally{if(r)throw r.error}}P||_||(v="cm");var x={id:n,color:y,size:{width:h,height:d},units:v,inkEffect:w,ignorePressure:g,tip:b,rasterOp:m};void 0!==s&&(x.anchorX=s);void 0!==u&&(x.anchorY=u);void 0!==c&&(x.scaleFactor=c);void 0!==l&&(x.transparency=l);void 0!==p&&(x.antiAliased=p);void 0!==f&&(x.fitToCurve=f);return x}(O)):"context"===O.localName&&void 0!==(M=function(e){var t,r,n=Ne(e);if(void 0===n||0===n.length)return;var i,n=Ue(n),o=[];try{for(var a=le(e.children),s=a.next();!s.done;s=a.next()){var u,c=s.value;"element"!==c.kind||!R(c)||de.has(c.localName)||("inkSource"===c.localName?(void 0!==(u=Ne(c))&&0<u.length&&(i=u),Le(c,o)):"traceFormat"===c.localName&&Le(c,o))}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}e={id:n,channels:o};void 0!==i&&(e.inkSourceId=i);return e}(O))&&_.push(M))}}catch(e){m={error:e}}finally{try{S&&!S.done&&(g=x.return)&&g.call(x)}finally{if(m)throw m.error}}}}}catch(e){t={error:e}}finally{try{y&&!y.done&&(r=v.return)&&r.call(v)}finally{if(t)throw t.error}}try{for(var k,E,A,C,L,T,N,j,U=le(e.children),I=U.next();!I.done;I=U.next())"element"===(k=I.value).kind&&R(k)&&(E=k.localName,de.has(E)||"definitions"===E||("trace"===E?(C=(A=Te(k,f.length)).trace,L=A.node,T=A.stats,N=A.diagnostic,f.push(C),h.push(L),s+=T.packetCount,u+=T.pointCount,c+=T.channelValueCount,void 0!==N&&a.push(N)):"traceGroup"===E&&0<(j=function e(t,r,n,i){var o,a;var s=[];try{for(var u=le(t.children),c=u.next();!c.done;c=u.next()){var l,p,f,h,d,v,y=c.value;"element"!==y.kind||!R(y)||de.has(y.localName)||("trace"===y.localName?(l=Te(y,r.length),p=l.trace,f=l.node,h=l.stats,d=l.diagnostic,r.push(p),s.push(f),i(h),void 0!==d&&n.push(d)):"traceGroup"===y.localName&&0<(v=e(y,r,n,i)).children.length&&s.push(v))}}catch(e){o={error:e}}finally{try{c&&!c.done&&(a=u.return)&&a.call(u)}finally{if(o)throw o.error}}return{kind:"group",children:s}}(k,f,a,function(e){s+=e.packetCount,u+=e.pointCount,c+=e.channelValueCount})).children.length&&h.push(j)))}catch(e){n={error:e}}finally{try{I&&!I.done&&(i=U.return)&&i.call(U)}finally{if(n)throw n.error}}return Ce={items:a,traceCount:f.length,packetCount:s,pointCount:u,channelValueCount:c},Q(ce({traces:f,brushes:l},0<p.length?{contexts:p}:{},0<f.length?{traceTree:h}:{}))},e.parseMathBreakBin=function(e){return-1!==ot.indexOf(e)?e:void 0},e.parseMathBreakBinSub=function(e){return-1!==at.indexOf(e)?e:void 0},e.parseMathElement=Ln,e.parseMathElements=function(e,t){return e.map(function(e){return Ln(e,t)})},e.parseMathFractionType=lt,e.parseMathJc=ct,e.parseMathLimLoc=ft,e.parseMathScript=dt,e.parseMathShape=pt,e.parseMathStyle=vt,e.parseMathTopBot=ht,e.parseOnOff=mt,e.pointsToUnit=ie,e.resolveDecryptLimits=yi,e.scalePointsStretch=z,e.scalePointsUniform=P,e.serializeInkXml=function(e){var t,r,n,i,o,a,s,u;if(!ee(e))throw new TypeError("serializeInkXml: expected OfficeInk from parseInkXml/createInk");var c=[],l=[],p=e.traces.some(function(e){return e.contextRef===He||""===e.contextRef||"#ctx0"===e.contextRef})||0<e.traces.length,f=null!=e.contexts?e.contexts:[],h=!1;try{for(var d=Be(f),v=d.next();!v.done;v=d.next()){var y=v.value;l.push(qe(y)),"ctx0"===Ge(y.id)&&(h=!0)}}catch(e){t={error:e}}finally{try{v&&!v.done&&(r=d.return)&&r.call(d)}finally{if(t)throw t.error}}p&&!h&&l.push(qe(Ye())),f=Fe(e.brushes).sort(function(e,t){return e.id<t.id?-1:e.id>t.id?1:0});try{for(var b=Be(f),m=b.next();!m.done;m=b.next()){var g=m.value;l.push(function(e){var t=Ge(e.id),r=[],n=0<e.units.length?e.units:"cm",i=ie(e.size.width,n),o=ie(e.size.height,n),i=(r.push(k("width",oe(i),n),k("height",oe(o),n)),function(e){var t=T(e.inkEffect);return(void 0===t?e.color:t).toUpperCase()}(e)),o=(r.push(k("color",i.startsWith("#")?i:"#"+i)),e.inkEffect);r.push(k("ignorePressure",e.ignorePressure?"1":"0")),"pencil"!==o&&void 0!==e.rasterOp&&0<e.rasterOp.length&&(r.push(k("tip",null!=e.tip?e.tip:"ellipse")),r.push(k("rasterOp",e.rasterOp)));"none"!==o&&(r.push(k("inkEffects",function(e){return"roseGold"!==e?e:"roseGold"}(o))),"pencil"!==o)&&(r.push(k("anchorX",null!=e.anchorX?e.anchorX:"0")),r.push(k("anchorY",null!=e.anchorY?e.anchorY:"0")),r.push(k("scaleFactor",null!=e.scaleFactor?e.scaleFactor:"0.5")));return O("brush",[ue(t)],r)}(g))}}catch(e){n={error:e}}finally{try{m&&!m.done&&(i=b.return)&&i.call(b)}finally{if(n)throw n.error}}if(0<l.length&&c.push(O("definitions",[],l)),void 0!==e.traceTree&&0<e.traceTree.length)try{for(var w=Be(e.traceTree),P=w.next();!P.done;P=w.next()){var _=P.value;c.push.apply(c,Fe(function e(t,r){var n,i;{var o;if("trace"===t.kind)return void 0===(o=r[t.traceIndex])?[]:[Ke(o)]}var a=[];try{for(var s=Be(t.children),u=s.next();!u.done;u=s.next()){var c=u.value;a.push.apply(a,Fe(e(c,r)))}}catch(e){n={error:e}}finally{try{u&&!u.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}return[O("traceGroup",[],a)]}(_,e.traces)))}}catch(e){o={error:e}}finally{try{P&&!P.done&&(a=w.return)&&a.call(w)}finally{if(o)throw o.error}}else try{for(var x=Be(e.traces),S=x.next();!S.done;S=x.next()){var M=S.value;c.push(Ke(M))}}catch(e){s={error:e}}finally{try{S&&!S.done&&(u=x.return)&&u.call(x)}finally{if(s)throw s.error}}return O("ink",[],c,[{prefix:se,namespaceUri:F}])},e.textContent=fn,e.timingSafeEqual=Xi,e.unitValueToPoints=ne,Object.defineProperty(e,"__esModule",{value:!0})});
10
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).ej={})}(this,function(q){"use strict";var F="http://schemas.openxmlformats.org/officeDocument/2006/math",L=["m","m1","m2","m3","m4","m5"],B="http://schemas.openxmlformats.org/wordprocessingml/2006/main",N="http://www.w3.org/XML/1998/namespace",t=((t=q.MathJustification||(q.MathJustification={}))[t.CenterGroup=0]="CenterGroup",t[t.Center=1]="Center",t[t.Left=2]="Left",t[t.Right=3]="Right",(t=q.MathFontType||(q.MathFontType={}))[t.DoubleStruck=0]="DoubleStruck",t[t.Fraktur=1]="Fraktur",t[t.Monospace=2]="Monospace",t[t.Roman=3]="Roman",t[t.SansSerif=4]="SansSerif",t[t.Script=5]="Script",(t=q.MathStyleType||(q.MathStyleType={}))[t.Italic=0]="Italic",t[t.BoldItalic=1]="BoldItalic",t[t.Bold=2]="Bold",t[t.Regular=3]="Regular",(t=q.MathFunctionType||(q.MathFunctionType={}))[t.Unknown=0]="Unknown",t[t.Accent=1]="Accent",t[t.Bar=2]="Bar",t[t.BorderBox=3]="BorderBox",t[t.Box=4]="Box",t[t.Delimiter=5]="Delimiter",t[t.EquationArray=6]="EquationArray",t[t.Fraction=7]="Fraction",t[t.Function=8]="Function",t[t.GroupCharacter=9]="GroupCharacter",t[t.Limit=10]="Limit",t[t.Matrix=11]="Matrix",t[t.NArray=12]="NArray",t[t.Phantom=13]="Phantom",t[t.Radical=14]="Radical",t[t.LeftSubSuperscript=15]="LeftSubSuperscript",t[t.SubSuperscript=16]="SubSuperscript",t[t.RightSubSuperscript=17]="RightSubSuperscript",t[t.RunElement=18]="RunElement",(t=q.MathDelimiterShapeType||(q.MathDelimiterShapeType={}))[t.Centered=0]="Centered",t[t.Match=1]="Match",(t=q.MathFractionType||(q.MathFractionType={}))[t.NormalFractionBar=0]="NormalFractionBar",t[t.NoFractionBar=1]="NoFractionBar",t[t.SkewedFractionBar=2]="SkewedFractionBar",t[t.FractionInline=3]="FractionInline",(t=q.MathHorizontalAlignment||(q.MathHorizontalAlignment={}))[t.Center=0]="Center",t[t.Left=1]="Left",t[t.Right=2]="Right",(t=q.MathVerticalAlignment||(q.MathVerticalAlignment={}))[t.Center=0]="Center",t[t.Top=1]="Top",t[t.Bottom=2]="Bottom",(t=q.SpacingRule||(q.SpacingRule={}))[t.Single=0]="Single",t[t.OneAndHalf=1]="OneAndHalf",t[t.Double=2]="Double",t[t.Exactly=3]="Exactly",t[t.Multiple=4]="Multiple",(t=q.MathScriptType||(q.MathScriptType={}))[t.Superscript=0]="Superscript",t[t.Subscript=1]="Subscript",(t=q.MathLimitType||(q.MathLimitType={}))[t.LowerLimit=0]="LowerLimit",t[t.UpperLimit=1]="UpperLimit",e.prototype.hasProperty=function(t){return this._values.has(t)},e.prototype.getProperty=function(t,e){return this._values.has(t)?this._values.get(t):e()},e.prototype.setProperty=function(t,e){this._values.set(t,e),this.propertyChanged()},e.prototype.clearProperty=function(t){this._values.delete(t)&&this.propertyChanged()},e.prototype.isExplicit=function(t){return this.hasProperty(t)},e.prototype.copyExplicitFrom=function(t){var r=this;t._values.forEach(function(t,e){return r._values.set(e,t)})},e.prototype.explicitEquals=function(r){var n;return this._values.size===r._values.size&&(n=!0,this._values.forEach(function(t,e){r._values.has(e)&&r._values.get(e)===t||(n=!1)}),n)},e.prototype.propertyChanged=function(){},e);function e(){this._values=new Map}D=function(t,e){return(D=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])}))(t,e)};(function(t,e){function r(){this.constructor=t}D(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)})(r,H=t),Object.defineProperty(r.prototype,"ownerMathEntity",{get:function(){return this._owner},enumerable:!0,configurable:!0}),r.prototype.setOwner=function(t){this._owner=t},Object.defineProperty(r.prototype,"isMatrixArgumentOwner",{get:function(){return!1},enumerable:!0,configurable:!0}),r.prototype.rootMutated=function(){},r.prototype.notifyMutated=function(){for(var t=this,e=t._owner;e instanceof r;)e=(t=e)._owner;t.rootMutated()},r.prototype.propertyChanged=function(){this.notifyMutated()};var D,H,I=r;function r(t){var e=H.call(this)||this;return e._owner=t,e}function G(t,e){var r;return"text"===t.kind||"text"===e.kind?t.kind===e.kind&&t.value===e.value:(t=t).namespaceUri===(r=e).namespaceUri&&t.localName===r.localName&&t.attributes.length===r.attributes.length&&t.attributes.every(function(t,e){return t.localName===r.attributes[e].localName&&t.namespaceUri===r.attributes[e].namespaceUri&&t.value===r.attributes[e].value})&&t.children.length===r.children.length&&t.children.every(function(t,e){return G(t,r.children[e])})}U.prototype.clone=function(){return new U(this.preservedXml)},U.prototype.equals=function(t){t=t instanceof U?t:void 0;return void 0!==t&&(void 0===this.preservedXml||void 0===t.preservedXml?this.preservedXml===t.preservedXml:G(this.preservedXml,t.preservedXml))};var z=U;function U(t){this.preservedXml=t}Object.defineProperty(V.prototype,"text",{get:function(){return this.parts.map(function(t){return"text"===t.kind?t.value:""}).join("")},set:function(t){var e=this,r=this.parts.map(function(t){return t.kind}).indexOf("text"),n=this.parts.filter(function(t){return"text"!==t.kind}),r=(r<0?n:this.parts.slice(0,r).filter(function(t){return"text"!==t.kind})).length;n.splice(r,0,{kind:"text",value:t}),this.parts.length=0,n.forEach(function(t){return e.parts.push(t)})},enumerable:!0,configurable:!0}),V.prototype.clone=function(){var e=new V;return e.characterFormat=this.characterFormat.clone(),e.runProperties=this.runProperties,this.parts.forEach(function(t){return e.parts.push(t)}),e};var J=V;function V(){this.characterFormat=new z,this.parts=[]}Object.defineProperty(n.prototype,"count",{get:function(){return this._items.length},enumerable:!0,configurable:!0}),n.prototype.getItem=function(t){return this.checkIndex(t,this._items.length-1),this._items[t]},n.prototype.insert=function(t,e){this.insertItem(t,e)},n.prototype.remove=function(t){t=this._items.indexOf(t);0<=t&&this.removeAt(t)},n.prototype.removeAt=function(t){this.checkIndex(t,this._items.length-1);t=this._items.splice(t,1)[0];this.detach(t),this.afterChange()},n.prototype.clear=function(){var e=this;this._items.splice(0,this._items.length).forEach(function(t){return e.detach(t)}),this.afterChange()},n.prototype[Symbol.iterator]=function(){return this._items[Symbol.iterator]()},n.prototype.toArray=function(){return this._items.slice()},n.prototype.pushRaw=function(t){this._items.push(t),this.syncIndexes()},n.prototype.insertRaw=function(t,e){this.attach(e),this._items.splice(t,0,e),this.syncIndexes()},n.prototype.attach=function(t){t.setOwner(this.owner)},n.prototype.removeRawAt=function(t){t=this._items.splice(t,1)[0];return this.detach(t),this.syncIndexes(),t},n.prototype.insertItem=function(t,e){if(this.checkIndex(t,this._items.length),0<=this._items.indexOf(e)||void 0!==e.ownerMathEntity&&e.ownerMathEntity!==this.owner)throw new Error("The item already belongs to a Math collection.");e.setOwner(this.owner),this._items.splice(t,0,e),this.afterChange()},n.prototype.afterChange=function(){this.syncIndexes(),this.owner.notifyMutated()},n.prototype.detach=function(t){t.setOwner(void 0)},n.prototype.checkIndex=function(t,e){if(!(0<=t&&t<=e)||Math.floor(t)!==t)throw new RangeError("Index "+t+" is out of range.")},n.prototype.syncIndexes=function(){for(var t=this._items.length;t<this._synced;t++)delete this[t];for(t=0;t<this._items.length;t++)this[t]=this._items[t];this._synced=this._items.length};var X=n;function n(t){this.owner=t,this._items=[],this._synced=0}var W,Z,y={AccentChar:1,BarTop:2,HideTop:3,HideBottom:4,HideRight:5,HideLeft:6,StrikeBLTR:7,StrikeTLBR:8,StrikeVertical:9,StrikeHorizontal:10,BoxAlign:11,NoBreak:12,EnableDifferential:14,OperatorEmulator:15,AlignAt:16,BegChar:17,EndChar:18,NoRightChar:19,NoLeftChar:20,SeparatorChar:21,Grow:22,Shape:23,EqArrAlign:24,MaxDist:25,ObjDist:26,RowSpacing:27,RowSpacingRule:28,FractionType:29,HasAlignTop:30,GroupChar:31,HasCharTop:32,MatrixAlign:33,ColumnWidth:34,ColumnSpacingRule:35,ColumnSpacing:36,ColumnGap:38,ColumnGapRule:39,PlaceHoldHidden:37,NAryChar:41,HasGrow:42,HideSubscript:43,HideSuperscript:44,SubSupLimit:45,Show:46,Smash:47,Transparent:48,ZeroAscent:49,ZeroDescent:50,ZeroWidth:51,HideDegree:51,SkipAlign:52,HasAlignment:53,HasLiteral:54,HasNormalText:55,Script:56,Style:57,ArgumentSize:74,AlignPoint:76,Justification:77,LimitType:80,ScriptType:81},i=(W=function(t,e){return(W=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])}))(t,e)},function(t,e){function r(){this.constructor=t}W(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),$=(i(K,Z=I),Object.defineProperty(K.prototype,"alignAt",{get:function(){return this.getProperty(y.AlignAt,function(){return 0})},set:function(t){this.setProperty(y.AlignAt,t)},enumerable:!0,configurable:!0}),Object.defineProperty(K.prototype,"hasExplicitAlignAt",{get:function(){return this.isExplicit(y.AlignAt)},enumerable:!0,configurable:!0}),K);function K(){return null!==Z&&Z.apply(this,arguments)||this}i(tt,Q=X),tt.prototype.add=function(t){var e=new $(this.owner);return e.setOwner(void 0),this.insertItem(void 0===t?this.count:t,e),e};var Q,Y=tt;function tt(t){return Q.call(this,t)||this}et=function(t,e){return(et=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])}))(t,e)};(function(t,e){function r(){this.constructor=t}et(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)})(o,rt=I),Object.defineProperty(o.prototype,"hasAlignment",{get:function(){return this.getProperty(y.HasAlignment,function(){return!1})},set:function(t){this.setProperty(y.HasAlignment,t)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"hasLiteral",{get:function(){return this.getProperty(y.HasLiteral,function(){return!1})},set:function(t){this.setProperty(y.HasLiteral,t)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"hasNormalText",{get:function(){return this.getProperty(y.HasNormalText,function(){return!1})},set:function(t){this.setProperty(y.HasNormalText,t)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"font",{get:function(){return this.getProperty(y.Script,function(){return q.MathFontType.Roman})},set:function(t){this.setProperty(y.Script,t)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"style",{get:function(){return this.getProperty(y.Style,function(){return q.MathStyleType.Italic})},set:function(t){this.setProperty(y.Style,t)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"break",{get:function(){return this._break},set:function(t){void 0!==(this._break=t)&&t.setOwner(this),this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"hasContent",{get:function(){var e=this;return void 0!==this._break||[y.HasAlignment,y.HasLiteral,y.HasNormalText,y.Script,y.Style].some(function(t){return e.isExplicit(t)})},enumerable:!0,configurable:!0});var et,rt,nt=o;function o(){return null!==rt&&rt.apply(this,arguments)||this}it=function(t,e){return(it=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])}))(t,e)};(function(t,e){function r(){this.constructor=t}it(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)})(at,ot=I),Object.defineProperty(at.prototype,"controlProperties",{get:function(){return void 0===this._controlProperties&&(this._controlProperties=this.getDefaultControlProperties()),this._controlProperties},set:function(t){this._controlProperties=t,this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(at.prototype,"hasControlProperties",{get:function(){return void 0!==this._controlProperties},enumerable:!0,configurable:!0}),at.prototype.getDefaultControlProperties=function(){for(var t=this.ownerMathEntity;void 0!==t&&!("defaultMathCharacterFormat"in t);)t=t.ownerMathEntity;if(void 0===t)throw new Error("Math function is not attached to a Math paragraph.");return t.defaultMathCharacterFormat.clone()};var it,ot,i=at;function at(){return null!==ot&&ot.apply(this,arguments)||this}ut=function(t,e){return(ut=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])}))(t,e)};(function(t,e){function r(){this.constructor=t}ut(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)})(pt,st=i),Object.defineProperty(pt.prototype,"item",{get:function(){return this._item},set:function(t){void 0!==(this._item=t)&&(t.ownerMathRunElement=this),this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(pt.prototype,"text",{get:function(){var t=this.findAdapter();return void 0===this._item?"":void 0!==t?t.getRunText(this._item):this._item.text},set:function(t){var e=this.findAdapter();void 0===this._item&&(this.item=void 0!==e?e.createRun(this):new J),void 0!==e?e.setRunText(this._item,t):this._item.text=t,this.notifyMutated()},enumerable:!0,configurable:!0}),pt.prototype.findAdapter=function(){for(var t=this.ownerMathEntity;void 0!==t;){var e=t;if(void 0!==e.adapter)return e.adapter;t=t.ownerMathEntity}},Object.defineProperty(pt.prototype,"mathFormat",{get:function(){return this._mathFormat},enumerable:!0,configurable:!0});var ut,st,ct=pt;function pt(t){t=st.call(this,t)||this;return t.type=q.MathFunctionType.RunElement,t._mathFormat=new nt(t),t}ht=function(t,e){return(ht=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])}))(t,e)};(function(t,e){function r(){this.constructor=t}ht(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)})(yt,lt=X),yt.prototype.add=function(t){var e=new l;return this.insertItem(void 0===t?this.count:t,e),e};var ht,lt,ft=yt;function yt(t){return lt.call(this,t)||this}gt=function(t,e){return(gt=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])}))(t,e)};var gt,mt,a=function(t,e){function r(){this.constructor=t}gt(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},dt=(a(bt,mt=i),Object.defineProperty(bt.prototype,"beginCharacter",{get:function(){return this.getProperty(y.BegChar,function(){return"("})},set:function(t){this.setProperty(y.BegChar,t)},enumerable:!0,configurable:!0}),Object.defineProperty(bt.prototype,"endCharacter",{get:function(){return this.getProperty(y.EndChar,function(){return")"})},set:function(t){this.setProperty(y.EndChar,t)},enumerable:!0,configurable:!0}),Object.defineProperty(bt.prototype,"separator",{get:function(){return this.getProperty(y.SeparatorChar,function(){return"|"})},set:function(t){this.setProperty(y.SeparatorChar,t)},enumerable:!0,configurable:!0}),Object.defineProperty(bt.prototype,"isGrow",{get:function(){return this.getProperty(y.Grow,function(){return!0})},set:function(t){this.setProperty(y.Grow,t)},enumerable:!0,configurable:!0}),Object.defineProperty(bt.prototype,"delimiterShape",{get:function(){return this.getProperty(y.Shape,function(){return q.MathDelimiterShapeType.Centered})},set:function(t){this.setProperty(y.Shape,t)},enumerable:!0,configurable:!0}),Object.defineProperty(bt.prototype,"equations",{get:function(){return this._equations},enumerable:!0,configurable:!0}),bt);function bt(t){t=mt.call(this,t)||this;return t.type=q.MathFunctionType.Delimiter,t._equations=new ft(t),t}function vt(t,e){if(e===q.SpacingRule.Exactly&&(t<0||1584<t))throw new RangeError("RowSpacing must be between 0 pt and 1584 pt for Exactly spacing rule.");if(e===q.SpacingRule.Multiple&&(t<0||132<t))throw new RangeError("RowSpacing must be between 0 li and 132 li for Multiple spacing rule.")}a(Mt,wt=i),Object.defineProperty(Mt.prototype,"verticalAlignment",{get:function(){return this.getProperty(y.EqArrAlign,function(){return q.MathVerticalAlignment.Center})},set:function(t){this.setProperty(y.EqArrAlign,t)},enumerable:!0,configurable:!0}),Object.defineProperty(Mt.prototype,"expandEquationContainer",{get:function(){return this.getProperty(y.MaxDist,function(){return!1})},set:function(t){this.setProperty(y.MaxDist,t)},enumerable:!0,configurable:!0}),Object.defineProperty(Mt.prototype,"expandEquationContent",{get:function(){return this.getProperty(y.ObjDist,function(){return!1})},set:function(t){this.setProperty(y.ObjDist,t)},enumerable:!0,configurable:!0}),Object.defineProperty(Mt.prototype,"rowSpacing",{get:function(){return this.getProperty(y.RowSpacing,function(){return 0})},set:function(t){vt(t,this.rowSpacingRule),this.setProperty(y.RowSpacing,t)},enumerable:!0,configurable:!0}),Object.defineProperty(Mt.prototype,"rowSpacingRule",{get:function(){return this.getProperty(y.RowSpacingRule,function(){return q.SpacingRule.Single})},set:function(t){this.setProperty(y.RowSpacingRule,t)},enumerable:!0,configurable:!0}),Object.defineProperty(Mt.prototype,"equations",{get:function(){return this._equations},enumerable:!0,configurable:!0});var wt,Pt=Mt;function Mt(t){t=wt.call(this,t)||this;return t.type=q.MathFunctionType.EquationArray,t._equations=new ft(t),t}a(Tt,St=i),Object.defineProperty(Tt.prototype,"fractionType",{get:function(){return this.getProperty(y.FractionType,function(){return q.MathFractionType.NormalFractionBar})},set:function(t){this.setProperty(y.FractionType,t)},enumerable:!0,configurable:!0}),Object.defineProperty(Tt.prototype,"numerator",{get:function(){return this._numerator},enumerable:!0,configurable:!0}),Object.defineProperty(Tt.prototype,"denominator",{get:function(){return this._denominator},enumerable:!0,configurable:!0});var St,xt=Tt;function Tt(t){t=St.call(this,t)||this;return t.type=q.MathFunctionType.Fraction,t._denominator=new l(t),t._numerator=new l(t),t}a(_t,qt=i),Object.defineProperty(_t.prototype,"equation",{get:function(){return this._equation},enumerable:!0,configurable:!0}),Object.defineProperty(_t.prototype,"functionName",{get:function(){return this._functionName},enumerable:!0,configurable:!0});var qt,Ft=_t;function _t(t){t=qt.call(this,t)||this;return t.type=q.MathFunctionType.Function,t._equation=new l(t),t._functionName=new l(t),t}a(kt,Ot=i),Object.defineProperty(kt.prototype,"limitType",{get:function(){return this.getProperty(y.LimitType,function(){return q.MathLimitType.LowerLimit})},set:function(t){this.setProperty(y.LimitType,t)},enumerable:!0,configurable:!0}),Object.defineProperty(kt.prototype,"equation",{get:function(){return this._equation},enumerable:!0,configurable:!0}),Object.defineProperty(kt.prototype,"limit",{get:function(){return this._limit},enumerable:!0,configurable:!0});var Ot,At=kt;function kt(t){t=Ot.call(this,t)||this;return t.type=q.MathFunctionType.Limit,t._equation=new l(t),t._limit=new l(t),t}a(u,Ct=i),Object.defineProperty(u.prototype,"nArrayCharacter",{get:function(){return this.getProperty(y.NAryChar,function(){return String.fromCharCode(8747)})},set:function(t){this.setProperty(y.NAryChar,t)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"hasGrow",{get:function(){return this.getProperty(y.HasGrow,function(){return!1})},set:function(t){this.setProperty(y.HasGrow,t)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"hideLowerLimit",{get:function(){return this.getProperty(y.HideSubscript,function(){return!1})},set:function(t){this.setProperty(y.HideSubscript,t)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"hideUpperLimit",{get:function(){return this.getProperty(y.HideSuperscript,function(){return!1})},set:function(t){this.setProperty(y.HideSuperscript,t)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"subSuperscriptLimit",{get:function(){var t=this;return this.getProperty(y.SubSupLimit,function(){return t.nArrayCharacter===String.fromCharCode(8747)})},set:function(t){this.setProperty(y.SubSupLimit,t)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"equation",{get:function(){return this._equation},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"subscript",{get:function(){return this._subscript},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"superscript",{get:function(){return this._superscript},enumerable:!0,configurable:!0});var Ct,Et=u;function u(t){t=Ct.call(this,t)||this;return t.type=q.MathFunctionType.NArray,t._equation=new l(t),t._subscript=new l(t),t._superscript=new l(t),t}a(Lt,Rt=i),Object.defineProperty(Lt.prototype,"scriptType",{get:function(){return this.getProperty(y.ScriptType,function(){return q.MathScriptType.Superscript})},set:function(t){this.setProperty(y.ScriptType,t)},enumerable:!0,configurable:!0}),Object.defineProperty(Lt.prototype,"equation",{get:function(){return this._equation},enumerable:!0,configurable:!0}),Object.defineProperty(Lt.prototype,"script",{get:function(){return this._script},enumerable:!0,configurable:!0});var Rt,jt=Lt;function Lt(t){t=Rt.call(this,t)||this;return t.type=q.MathFunctionType.SubSuperscript,t._equation=new l(t),t._script=new l(t),t}a(Dt,Bt=i),Object.defineProperty(Dt.prototype,"isSkipAlign",{get:function(){return this.getProperty(y.SkipAlign,function(){return!0})},set:function(t){this.setProperty(y.SkipAlign,t)},enumerable:!0,configurable:!0}),Object.defineProperty(Dt.prototype,"equation",{get:function(){return this._equation},enumerable:!0,configurable:!0}),Object.defineProperty(Dt.prototype,"subscript",{get:function(){return this._subscript},enumerable:!0,configurable:!0}),Object.defineProperty(Dt.prototype,"superscript",{get:function(){return this._superscript},enumerable:!0,configurable:!0});var Bt,Nt=Dt;function Dt(t){t=Bt.call(this,t)||this;return t.type=q.MathFunctionType.RightSubSuperscript,t._equation=new l(t),t._subscript=new l(t),t._superscript=new l(t),t}a(Gt,Ht=i),Object.defineProperty(Gt.prototype,"equation",{get:function(){return this._equation},enumerable:!0,configurable:!0}),Object.defineProperty(Gt.prototype,"subscript",{get:function(){return this._subscript},enumerable:!0,configurable:!0}),Object.defineProperty(Gt.prototype,"superscript",{get:function(){return this._superscript},enumerable:!0,configurable:!0});var Ht,It=Gt;function Gt(t){t=Ht.call(this,t)||this;return t.type=q.MathFunctionType.LeftSubSuperscript,t._equation=new l(t),t._subscript=new l(t),t._superscript=new l(t),t}zt=function(t,e){return(zt=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])}))(t,e)};var zt,Ut,a=function(t,e){function r(){this.constructor=t}zt(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},Jt=(a(Vt,Ut=X),Vt.prototype.add=function(){throw new Error("Cells are managed by the matrix; add a column instead.")},Vt.prototype.insert=function(){throw new Error("Cells are managed by the matrix.")},Vt.prototype.removeAt=function(){throw new Error("Cells are managed by the matrix; remove a column instead.")},Vt.prototype.remove=function(){throw new Error("Cells are managed by the matrix; remove a column instead.")},Vt.prototype.clear=function(){throw new Error("Cells are managed by the matrix; remove columns instead.")},Vt);function Vt(t){return Ut.call(this,t)||this}a(Zt,Xt=I),Object.defineProperty(Zt.prototype,"arguments",{get:function(){return this._arguments},enumerable:!0,configurable:!0}),Object.defineProperty(Zt.prototype,"rowIndex",{get:function(){var t=this.ownerMathEntity;return void 0===t?-1:t.rowItems.indexOf(this)},enumerable:!0,configurable:!0});var Xt,Wt=Zt;function Zt(t){t=Xt.call(this,t)||this;return t._arguments=new Jt(t),t}$t=function(t,e){return($t=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])}))(t,e)};var $t,a=function(t,e){function r(){this.constructor=t}$t(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},Kt=(Object.defineProperty(Qt.prototype,"count",{get:function(){return this._items.length},enumerable:!0,configurable:!0}),Qt.prototype.getItem=function(t){if(0<=t&&t<this._items.length)return this._items[t];throw new RangeError("Index "+t+" is out of range.")},Qt.prototype.add=function(){throw new Error("Cells are managed by the matrix; add a row instead.")},Qt.prototype[Symbol.iterator]=function(){return this._items[Symbol.iterator]()},Qt);function Qt(t){var r=this;(this._items=t).forEach(function(t,e){r[e]=t})}a(ee,Yt=I),Object.defineProperty(ee.prototype,"horizontalAlignment",{get:function(){return this.getProperty(y.MatrixAlign,function(){return q.MathHorizontalAlignment.Center})},set:function(t){this.setProperty(y.MatrixAlign,t)},enumerable:!0,configurable:!0}),Object.defineProperty(ee.prototype,"columnIndex",{get:function(){var t=this.ownerMathEntity;return void 0===t?-1:t.columns.toArray().indexOf(this)},enumerable:!0,configurable:!0}),Object.defineProperty(ee.prototype,"arguments",{get:function(){var t=this.ownerMathEntity,e=this.columnIndex,t=void 0===t?[]:t.rowItems.map(function(t){return t.arguments.getItem(e)});return new Kt(t)},enumerable:!0,configurable:!0});var Yt,te=ee;function ee(t){return Yt.call(this,t)||this}re=function(t,e){return(re=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])}))(t,e)};var re,ne,a=function(t,e){function r(){this.constructor=t}re(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},ie=(a(oe,ne=X),oe.prototype.add=function(t){for(var e=new Wt,r=this.matrix.columns.count,n=0;n<r;n++)e.arguments.pushRaw(new l(e));return this.insertItem(void 0===t?this.count:t,e),e},oe.prototype.afterChange=function(){this.matrix.relink(),ne.prototype.afterChange.call(this)},oe);function oe(t){var e=ne.call(this,t)||this;return e.matrix=t,e}a(se,ae=X),se.prototype.add=function(t){var t=void 0===t?this.count:t,e=new te;return this.insertItem(t,e),e},se.prototype.removeAt=function(e){ae.prototype.removeAt.call(this,e),this.matrix.rowItems.forEach(function(t){return t.arguments.removeRawAt(e)}),this.matrix.relink()},se.prototype.clear=function(){ae.prototype.clear.call(this),this.matrix.rowItems.forEach(function(t){for(;0<t.arguments.count;)t.arguments.removeRawAt(t.arguments.count-1)})},se.prototype.afterChange=function(){this.matrix.relink(),ae.prototype.afterChange.call(this)},se.prototype.insertItem=function(e,t){ae.prototype.insertItem.call(this,e,t),this.matrix.rowItems.forEach(function(t){return t.arguments.insertRaw(e,new l(t))}),this.matrix.relink()};var ae,ue=se;function se(t){var e=ae.call(this,t)||this;return e.matrix=t,e}ce=function(t,e){return(ce=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])}))(t,e)};(function(t,e){function r(){this.constructor=t}ce(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)})(s,pe=i),Object.defineProperty(s.prototype,"rows",{get:function(){return this._rows},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"columns",{get:function(){return this._columns},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"verticalAlignment",{get:function(){return this.getProperty(y.MatrixAlign,function(){return q.MathVerticalAlignment.Center})},set:function(t){this.setProperty(y.MatrixAlign,t)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"hidePlaceholder",{get:function(){return this.getProperty(y.PlaceHoldHidden,function(){return!1})},set:function(t){this.setProperty(y.PlaceHoldHidden,t)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"rowSpacing",{get:function(){return this.getProperty(y.RowSpacing,function(){return 0})},set:function(t){vt(t,this.rowSpacingRule),this.setProperty(y.RowSpacing,t)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"rowSpacingRule",{get:function(){return this.getProperty(y.RowSpacingRule,function(){return q.SpacingRule.Single})},set:function(t){this.setProperty(y.RowSpacingRule,t)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"columnGap",{get:function(){return this.getProperty(y.ColumnGap,function(){return 0})},set:function(t){this.setProperty(y.ColumnGap,t)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"columnGapRule",{get:function(){return this.getProperty(y.ColumnGapRule,function(){return q.SpacingRule.Single})},set:function(t){this.setProperty(y.ColumnGapRule,t)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"hidePlaceHolders",{get:function(){return this.hidePlaceholder},set:function(t){this.hidePlaceholder=t},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"columnSpacingRule",{get:function(){return this.columnGapRule},set:function(t){this.columnGapRule=t},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"columnWidth",{get:function(){return this.columnSpacing},set:function(t){this.columnSpacing=t},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"columnSpacing",{get:function(){return this.getProperty(y.ColumnSpacing,function(){return 0})},set:function(t){this.setProperty(y.ColumnSpacing,t)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"columnGroups",{get:function(){var n=[];return this._columns.toArray().forEach(function(t,e){var r=n[n.length-1];void 0!==r&&r.horizontalAlignment===t.horizontalAlignment?r.count++:n.push({startIndex:e,count:1,horizontalAlignment:t.horizontalAlignment})}),n},enumerable:!0,configurable:!0}),s.prototype.relink=function(){var r=this._columns.toArray();this._rows.toArray().forEach(function(t){t.arguments.toArray().forEach(function(t,e){return t.setOwnerColumn(r[e])})})},Object.defineProperty(s.prototype,"rowItems",{get:function(){return this._rows.toArray()},enumerable:!0,configurable:!0});var ce,pe,he,le=s;function s(t){t=pe.call(this,t)||this;return t.type=q.MathFunctionType.Matrix,t._rows=new ie(t),t._columns=new ue(t),t}function fe(t){switch(t){case q.MathFunctionType.Accent:return new Pe;case q.MathFunctionType.Bar:return new xe;case q.MathFunctionType.BorderBox:return new Fe;case q.MathFunctionType.Box:return new Oe;case q.MathFunctionType.Delimiter:return new dt;case q.MathFunctionType.EquationArray:return new Pt;case q.MathFunctionType.Fraction:return new xt;case q.MathFunctionType.Function:return new Ft;case q.MathFunctionType.GroupCharacter:return new Ce;case q.MathFunctionType.Limit:return new At;case q.MathFunctionType.Matrix:return new le;case q.MathFunctionType.NArray:return new Et;case q.MathFunctionType.Phantom:return new je;case q.MathFunctionType.Radical:return new Be;case q.MathFunctionType.LeftSubSuperscript:return new It;case q.MathFunctionType.SubSuperscript:return new jt;case q.MathFunctionType.RightSubSuperscript:return new Nt;case q.MathFunctionType.RunElement:return new ct;default:throw new RangeError("Unknown Math function type: "+String(t))}}he=function(t,e){return(he=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])}))(t,e)};(function(t,e){function r(){this.constructor=t}he(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)})(me,ye=X),me.prototype.add=function(t,e){t=fe(t);return this.insertItem(void 0===e?this.count:e,t),t};var ye,ge=me;function me(t){return ye.call(this,t)||this}de=function(t,e){return(de=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])}))(t,e)};(function(t,e){function r(){this.constructor=t}de(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)})(c,be=I),Object.defineProperty(c.prototype,"breaks",{get:function(){return this._breaks},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"functions",{get:function(){return this._functions},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"argumentSize",{get:function(){return this.getProperty(y.ArgumentSize,function(){return 0})},set:function(t){if(t<-2||2<t||Math.floor(t)!==t)throw new RangeError("ArgumentSize must be an integer between -2 and 2.");this.setProperty(y.ArgumentSize,t)},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"preservedControlProperties",{get:function(){return this._preservedControl},set:function(t){this._preservedControl=t,this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"ownerMath",{get:function(){for(var t=this.ownerMathEntity;void 0!==t;){if(t instanceof c)return t;t=t.ownerMathEntity}},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"ownerRow",{get:function(){var t=this.ownerMathEntity;return void 0!==t&&"arguments"in t?t:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"ownerColumn",{get:function(){return this._column},enumerable:!0,configurable:!0}),c.prototype.setOwnerColumn=function(t){this._column=t};var de,be,l=c;function c(t){t=be.call(this,t)||this;return t._functions=new ge(t),t._breaks=new Y(t),t}ve=function(t,e){return(ve=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])}))(t,e)};var ve,we,a=function(t,e){function r(){this.constructor=t}ve(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},Pe=(a(Me,we=i),Object.defineProperty(Me.prototype,"accentCharacter",{get:function(){return this.getProperty(y.AccentChar,function(){return String.fromCharCode(770)})},set:function(t){this.setProperty(y.AccentChar,t)},enumerable:!0,configurable:!0}),Object.defineProperty(Me.prototype,"equation",{get:function(){return this._equation},enumerable:!0,configurable:!0}),Me);function Me(t){t=we.call(this,t)||this;return t.type=q.MathFunctionType.Accent,t._equation=new l(t),t}a(Te,Se=i),Object.defineProperty(Te.prototype,"barTop",{get:function(){return this.getProperty(y.BarTop,function(){return!1})},set:function(t){this.setProperty(y.BarTop,t)},enumerable:!0,configurable:!0}),Object.defineProperty(Te.prototype,"equation",{get:function(){return this._equation},enumerable:!0,configurable:!0});var Se,xe=Te;function Te(t){t=Se.call(this,t)||this;return t.type=q.MathFunctionType.Bar,t._equation=new l(t),t}a(p,qe=i),Object.defineProperty(p.prototype,"hideTop",{get:function(){return this.getProperty(y.HideTop,function(){return!1})},set:function(t){this.setProperty(y.HideTop,t)},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"hideBottom",{get:function(){return this.getProperty(y.HideBottom,function(){return!1})},set:function(t){this.setProperty(y.HideBottom,t)},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"hideLeft",{get:function(){return this.getProperty(y.HideLeft,function(){return!1})},set:function(t){this.setProperty(y.HideLeft,t)},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"hideRight",{get:function(){return this.getProperty(y.HideRight,function(){return!1})},set:function(t){this.setProperty(y.HideRight,t)},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"strikeDiagonalUp",{get:function(){return this.getProperty(y.StrikeBLTR,function(){return!1})},set:function(t){this.setProperty(y.StrikeBLTR,t)},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"strikeDiagonalDown",{get:function(){return this.getProperty(y.StrikeTLBR,function(){return!1})},set:function(t){this.setProperty(y.StrikeTLBR,t)},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"strikeVertical",{get:function(){return this.getProperty(y.StrikeVertical,function(){return!1})},set:function(t){this.setProperty(y.StrikeVertical,t)},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"strikeHorizontal",{get:function(){return this.getProperty(y.StrikeHorizontal,function(){return!1})},set:function(t){this.setProperty(y.StrikeHorizontal,t)},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"equation",{get:function(){return this._equation},enumerable:!0,configurable:!0});var qe,Fe=p;function p(t){t=qe.call(this,t)||this;return t.type=q.MathFunctionType.BorderBox,t._equation=new l(t),t}a(Ae,_e=i),Object.defineProperty(Ae.prototype,"alignment",{get:function(){return this.getProperty(y.BoxAlign,function(){return!1})},set:function(t){this.setProperty(y.BoxAlign,t)},enumerable:!0,configurable:!0}),Object.defineProperty(Ae.prototype,"enableDifferential",{get:function(){return this.getProperty(y.EnableDifferential,function(){return!1})},set:function(t){this.setProperty(y.EnableDifferential,t)},enumerable:!0,configurable:!0}),Object.defineProperty(Ae.prototype,"noBreak",{get:function(){return this.getProperty(y.NoBreak,function(){return!0})},set:function(t){this.setProperty(y.NoBreak,t)},enumerable:!0,configurable:!0}),Object.defineProperty(Ae.prototype,"operatorEmulator",{get:function(){return this.getProperty(y.OperatorEmulator,function(){return!1})},set:function(t){this.setProperty(y.OperatorEmulator,t)},enumerable:!0,configurable:!0}),Object.defineProperty(Ae.prototype,"break",{get:function(){return this._break},set:function(t){this._break=t,this.notifyMutated()},enumerable:!0,configurable:!0}),Object.defineProperty(Ae.prototype,"equation",{get:function(){return this._equation},enumerable:!0,configurable:!0});var _e,Oe=Ae;function Ae(t){t=_e.call(this,t)||this;return t.type=q.MathFunctionType.Box,t._equation=new l(t),t}a(Ee,ke=i),Object.defineProperty(Ee.prototype,"hasAlignTop",{get:function(){return this.getProperty(y.HasAlignTop,function(){return!0})},set:function(t){this.setProperty(y.HasAlignTop,t)},enumerable:!0,configurable:!0}),Object.defineProperty(Ee.prototype,"hasCharacterTop",{get:function(){return this.getProperty(y.HasCharTop,function(){return!1})},set:function(t){this.setProperty(y.HasCharTop,t)},enumerable:!0,configurable:!0}),Object.defineProperty(Ee.prototype,"groupCharacter",{get:function(){return this.getProperty(y.GroupChar,function(){return String.fromCharCode(9183)})},set:function(t){this.setProperty(y.GroupChar,t)},enumerable:!0,configurable:!0}),Object.defineProperty(Ee.prototype,"equation",{get:function(){return this._equation},enumerable:!0,configurable:!0});var ke,Ce=Ee;function Ee(t){t=ke.call(this,t)||this;return t.type=q.MathFunctionType.GroupCharacter,t._equation=new l(t),t}a(h,Re=i),Object.defineProperty(h.prototype,"show",{get:function(){return this.getProperty(y.Show,function(){return!0})},set:function(t){this.setProperty(y.Show,t)},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"transparent",{get:function(){return this.getProperty(y.Transparent,function(){return!1})},set:function(t){this.setProperty(y.Transparent,t)},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"zeroAscent",{get:function(){return this.getProperty(y.ZeroAscent,function(){return!1})},set:function(t){this.setProperty(y.ZeroAscent,t)},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"zeroDescent",{get:function(){return this.getProperty(y.ZeroDescent,function(){return!1})},set:function(t){this.setProperty(y.ZeroDescent,t)},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"zeroWidth",{get:function(){return this.getProperty(y.ZeroWidth,function(){return!1})},set:function(t){this.setProperty(y.ZeroWidth,t)},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"smash",{get:function(){return this.getProperty(y.Smash,function(){return!1})},set:function(t){this.setProperty(y.Smash,t)},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"equation",{get:function(){return this._equation},enumerable:!0,configurable:!0});var Re,je=h;function h(t){t=Re.call(this,t)||this;return t.type=q.MathFunctionType.Phantom,t._equation=new l(t),t}a(Ne,Le=i),Object.defineProperty(Ne.prototype,"hideDegree",{get:function(){return this.getProperty(y.HideDegree,function(){return!1})},set:function(t){this.setProperty(y.HideDegree,t)},enumerable:!0,configurable:!0}),Object.defineProperty(Ne.prototype,"degree",{get:function(){return this._degree},enumerable:!0,configurable:!0}),Object.defineProperty(Ne.prototype,"equation",{get:function(){return this._equation},enumerable:!0,configurable:!0});var Le,Be=Ne;function Ne(t){t=Le.call(this,t)||this;return t.type=q.MathFunctionType.Radical,t._equation=new l(t),t._degree=new l(t),t}var De={"\\pm":"±","\\infty":"∞","\\neq":"≠","\\times":"×","\\div":"÷","\\propto":"∝","\\ll":"≪","\\gg":"≫","\\le":"≤","\\geq":"≥","\\mp":"∓","\\cong":"≅","\\approx":"≈","\\equiv":"≡","\\forall":"∀","\\complement":"∁","\\partial":"∂","\\cup":"∪","\\cap":"∩","\\emptyset":"∅","\\degf":"℉","\\degc":"℃","\\nabla":"∇","\\exists":"∃","\\nexists":"∄","\\in":"∈","\\ni":"∋","\\gets":"←","\\uparrow":"↑","\\rightarrow":"→","\\downarrow":"↓","\\leftrightarrow":"↔","\\therefore":"∴","\\lnot":"¬","\\alpha":"α","\\beta":"β","\\gamma":"γ","\\delta":"δ","\\varepsilon":"ε","\\epsilon":"ϵ","\\theta":"θ","\\vartheta":"ϑ","\\mu":"μ","\\pi":"π","\\rho":"ρ","\\sigma":"σ","\\tau":"τ","\\varphi":"φ","\\omega":"ω","\\ast":"*","\\bullet":"∙","\\vdots":"⋮","\\cdots":"⋯","\\ddots":"⋱","\\aleph":"ℵ","\\beth":"ℶ","\\qed":"∎","\\zeta":"ζ","\\eta":"η","\\iota":"ι","\\kappa":"κ","\\lambda":"λ","\\nu":"ν","\\xi":"ξ","\\varpi":"ϖ","\\varrho":"ϱ","\\varsigma":"ς","\\upsilon":"υ","\\phi":"ϕ","\\chi":"χ","\\psi":"ψ","\\Gamma":"Γ","\\Delta":"Δ","\\Theta":"Θ","\\Lambda":"Λ","\\Xi":"Ξ","\\Pi":"Π","\\Sigma":"Σ","\\Upsilon":"Υ","\\Phi":"Φ","\\Psi":"Ψ","\\Omega":"Ω","\\mathbb{C}":"C","\\mathcal{g}":"g","\\mathcal{H}":"H","\\mathfrak{H}":"H","\\hbar":"ℏ","\\imath":"ı","\\mathfrak{I}":"I","\\varkappa":"ϰ","\\mathcal{L}":"L","\\ell":"l","\\mathbb{N}":"N","\\wp":"℘","\\mathbb{Q}":"Q","\\mathcal{R}":"R","\\mathfrak{R}":"R","\\mathbb{R}":"R","\\mathbb{Z}":"Z","\\mathcal{B}":"B","\\mathcal{E}":"E","\\mathcal{F}":"F","\\mathcal{M}":"M","\\mathcal{o}":"o","\\gimel":"ℷ","\\daleth":"ℸ","\\circ":"∘","\\cdot":"⋅","\\uplus":"⊎","\\sqcap":"⊓","\\sqcup":"⊔","\\land":"∧","\\vee":"∨","\\nless":"≮","\\nleq":"≰","\\ngt":"≯","\\ngeq":"≱","\\sim":"∼","\\simeq":"≃","\\nequiv":"≢","\\nsimeq":"≄","\\napprox":"≉","\\ncong":"≇","\\notin":"∉","\\subset":"⊂","\\supset":"⊃","\\subseteq":"⊆","\\supseteq":"⊇","\\prcue":"≺","\\succ":"≻","\\preccurlyeq":"≼","\\succcurlyeq":"≽","\\sqsubset":"⊏","\\sqsupset":"⊐","\\sqsubseteq":"⊑","\\sqsupseteq":"⊒","\\parallel":"∥","\\bot":"⊥","\\vdash":"⊢","\\dashv":"⊣","\\bowtie":"⋈","\\asymp":"≍","\\dotplus":"∔","\\dotminus":"∸","\\setminus":"∖","\\Cap":"⋒","\\Cup":"⋓","\\boxminus":"⊟","\\boxtimes":"⊠","\\boxdot":"⊡","\\boxplus":"⊞","\\divideontimes":"⋇","\\ltimes":"⋉","\\rtimes":"⋊","\\leftthreetimes":"⋋","\\rightthreetimes":"⋌","\\curlywedge":"⋏","\\curlyvee":"⋎","\\odash":"⊝","\\intercal":"⊺","\\oplus":"⊕","\\ominus":"⊖","\\otimes":"⊗","\\oslash":"⊘","\\odot":"⊙","\\oast":"⊛","\\ocirc":"⊚","\\dag":"†","\\ddag":"‡","\\star":"⋆","\\diamond":"⋄","\\wr":"≀","\\triangle":"△","\\bigwedge":"⋀","\\bigvee":"⋁","\\bigodot":"⨀","\\bigotimes":"⨂","\\bigoplus":"⨁","\\bigsqcap":"⨅","\\bigsqcup":"⨆","\\biguplus":"⨄","\\bigudot":"⨃","\\because":"∵","\\lll":"⋘","\\ggg":"⋙","\\leqq":"≦","\\geqq":"≧","\\lesssim":"≲","\\gtrsim":"≳","\\lessdot":"⋖","\\gtrdot":"⋗","\\lessgtr":"≶","\\lesseqgtr":"⋚","\\gtrless":"≷","\\gtreqless":"⋛","\\Doteq":"≑","\\fallingdotseq":"≒","\\risingdotseq":"≓","\\backsim":"∽","\\approxeq":"≊","\\backsimeq":"⋍","\\curlyeqprec":"⋞","\\curlyeqsucc":"⋟","\\precsim":"≾","\\succsim":"≿","\\eqless":"⋜","\\eqgtr":"⋝","\\vartriangleleft":"⊲","\\vartriangleright":"⊳","\\trianglelefteq":"⊴","\\trianglerighteq":"⊵","\\models":"⊨","\\Subset":"⋐","\\Supset":"⋑","\\Vdash":"⊩","\\Vvdash":"⊪","\\eqcirc":"≖","\\circeq":"≗","\\Deltaeq":"≜","\\bumpeq":"≏","\\Bumpeq":"≎","\\between":"≬","\\pitchfork":"⋔","\\doteq":"≐","\\get":"←","\\updownarrow":"↕","\\Leftarrow":"⇐","\\Rightarrow":"⇒","\\Uparrow":"⇑","\\Downarrow":"⇓","\\Leftrightarrow":"⇔","\\Updownarrow":"⇕","\\longleftarrow":"⟵","\\longrightarrow":"⟶","\\longleftrightarrow":"⟷","\\Longleftarrow":"⟸","\\Longrightarrow":"⟹","\\Longleftrightarrow":"⟺","\\nearrow":"↗","\\nwarrow":"↖","\\searrow":"↘","\\swarrow":"↙","\\nleftarrow":"↚","\\nrightarrow":"↛","\\nleftrightarrow":"↮","\\nLeftarrow":"⇍","\\nRightarrow":"⇏","\\nLeftrightarrow":"⇎","\\dashleftarrow":"⇠","\\dashrightarrow":"⇢","\\mapstoleft":"↤","\\mapsto":"↦","\\longmapstoleft":"⟻","\\longmapsto":"⟼","\\hookleftarrow":"↩","\\hookrightarrow":"↪","\\leftharpoonup":"↼","\\leftharpoondown":"↽","\\rightharpoonup":"⇀","\\rightharpoondown":"⇁","\\upharpoonleft":"↿","\\upharpoonright":"↾","\\downharpoonleft":"⇃","\\downharpoonright":"⇂","\\leftrightharpoons":"⇋","\\rlhar":"⇌","\\leftleftarrows":"⇇","\\rightrightarrows":"⇉","\\upuparrows":"⇈","\\downdownarrows":"⇊","\\leftrightarrows":"⇆","\\rightleftarrows":"⇄","\\looparrowleft":"↫","\\looparrowright":"↬","\\leftarrowtail":"↢","\\rightarrowtail":"↣","\\Lsh":"↰","\\Rsh":"↱","\\ldsh":"↲","\\rdsh":"↳","\\Lleftarrow":"⇚","\\Rrightarrow":"⇛","\\twoheadleftarrow":"↞","\\twoheadrightarrow":"↠","\\curvearrowleft":"↶","\\curvearrowright":"↷","\\circlearrowleft":"↺","\\circlearrowright":"↻","\\multimap":"⊸","\\leftrightwavearrow":"↭","\\leftwavearrow":"↜","\\rightwavearrow":"↝","\\leftsquigarrow":"⇜","\\nsim":"≁","\\nasymp":"≭","\\lneqq":"≨","\\gneqq":"≩","\\nprec":"⊀","\\nsucc":"⊁","\\npreccurlyeq":"⋠","\\nsucccurlyeq":"⋡","\\notni":"∌","\\nsub":"⊄","\\nsup":"⊅","\\nsubseteq":"⊈","\\nsupseteq":"⊉","\\supsetneq":"⊋","\\nsqsubseteq":"⋢","\\nsqsupseteq":"⋣","\\lnsim":"⋦","\\gnsim":"⋧","\\precnsim":"⋨","\\succnsim":"⋩","\\ntriangleleft":"⋪","\\ntriangleright":"⋫","\\ntrianglelefteq":"⋬","\\ntrianglerighteq":"⋭","\\nmid":"∤","\\nparallel":"∦","\\nvdash":"⊬","\\nvDash":"⊭","\\nVdash":"⊮","\\nVDash":"⊯","\\rightangle":"∟","\\angle":"∠","\\angmsd":"∡","\\angsph":"∢","\\angrtvb":"⊾","\\righttriangle":"⊿","\\epar":"⋕","\\colon":"∶","\\Colon":"∷","\\;":" "};function He(t){return Object.prototype.hasOwnProperty.call(De,t)?De[t]:t}var Ie={177:"\\pm",8734:"\\infty",8800:"\\neq",215:"\\times",247:"\\div",8733:"\\propto",8810:"\\ll",8811:"\\gg",8804:"\\le",8805:"\\geq",8723:"\\mp",8773:"\\cong",8776:"\\approx",8801:"\\equiv",8704:"\\forall",8705:"\\complement",8706:"\\partial",8730:"\\sqrt",8731:"\\cbrt",8732:"\\qdrt",8746:"\\cup",8745:"\\cap",8709:"\\emptyset",8457:"\\degf",8451:"\\degc",8711:"\\nabla",8707:"\\exists",8708:"\\nexists",8712:"\\in",8715:"\\ni",8592:"\\gets",8593:"\\uparrow",8594:"\\rightarrow",8595:"\\downarrow",8596:"\\leftrightarrow",8756:"\\therefore",172:"\\lnot",945:"\\alpha",946:"\\beta",947:"\\gamma",948:"\\delta",949:"\\varepsilon",1013:"\\epsilon",952:"\\theta",977:"\\vartheta",956:"\\mu",960:"\\pi",961:"\\rho",963:"\\sigma",964:"\\tau",966:"\\varphi",969:"\\omega",42:"\\ast",8729:"\\bullet",8942:"\\vdots",8943:"\\cdots",8945:"\\ddots",8501:"\\aleph",8502:"\\beth",8718:"\\qed",950:"\\zeta",951:"\\eta",953:"\\iota",954:"\\kappa",955:"\\lambda",957:"\\nu",958:"\\xi",982:"\\varpi",1009:"\\varrho",962:"\\varsigma",965:"\\upsilon",981:"\\phi",967:"\\chi",968:"\\psi",915:"\\Gamma",916:"\\Delta",920:"\\Theta",923:"\\Lambda",926:"\\Xi",928:"\\Pi",931:"\\Sigma",933:"\\Upsilon",934:"\\Phi",936:"\\Psi",937:"\\Omega",8463:"\\hbar",305:"\\imath",1008:"\\varkappa",8472:"\\wp",8503:"\\gimel",8504:"\\daleth",8728:"\\circ",8901:"\\cdot",8846:"\\uplus",8851:"\\sqcap",8852:"\\sqcup",8743:"\\land",8744:"\\vee",8814:"\\nless",8816:"\\nleq",8815:"\\ngt",8817:"\\ngeq",8764:"\\sim",8771:"\\simeq",8802:"\\nequiv",8772:"\\nsimeq",8777:"\\napprox",8775:"\\ncong",8713:"\\notin",8834:"\\subset",8835:"\\supset",8838:"\\subseteq",8839:"\\supseteq",8826:"\\prcue",8827:"\\succ",8828:"\\preccurlyeq",8829:"\\succcurlyeq",8847:"\\sqsubset",8848:"\\sqsupset",8849:"\\sqsubseteq",8850:"\\sqsupseteq",8741:"\\parallel",8869:"\\bot",8866:"\\vdash",8867:"\\dashv",8904:"\\bowtie",8781:"\\asymp",8724:"\\dotplus",8760:"\\dotminus",8726:"\\setminus",8914:"\\Cap",8915:"\\Cup",8863:"\\boxminus",8864:"\\boxtimes",8865:"\\boxdot",8862:"\\boxplus",8903:"\\divideontimes",8905:"\\ltimes",8906:"\\rtimes",8907:"\\leftthreetimes",8908:"\\rightthreetimes",8911:"\\curlywedge",8910:"\\curlyvee",8861:"\\odash",8890:"\\intercal",8853:"\\oplus",8854:"\\ominus",8855:"\\otimes",8856:"\\oslash",8857:"\\odot",8859:"\\oast",8858:"\\ocirc",8224:"\\dag",8225:"\\ddag",8902:"\\star",8900:"\\diamond",8768:"\\wr",9651:"\\triangle",8896:"\\bigwedge",8897:"\\bigvee",10752:"\\bigodot",10754:"\\bigotimes",10753:"\\bigoplus",10757:"\\bigsqcap",10758:"\\bigsqcup",10756:"\\biguplus",10755:"\\bigudot",8757:"\\because",8920:"\\lll",8921:"\\ggg",8806:"\\leqq",8807:"\\geqq",8818:"\\lesssim",8819:"\\gtrsim",8918:"\\lessdot",8919:"\\gtrdot",8822:"\\lessgtr",8922:"\\lesseqgtr",8823:"\\gtrless",8923:"\\gtreqless",8785:"\\Doteq",8786:"\\fallingdotseq",8787:"\\risingdotseq",8765:"\\backsim",8778:"\\approxeq",8909:"\\backsimeq",8926:"\\curlyeqprec",8927:"\\curlyeqsucc",8830:"\\precsim",8831:"\\succsim",8924:"\\eqless",8925:"\\eqgtr",8882:"\\vartriangleleft",8883:"\\vartriangleright",8884:"\\trianglelefteq",8885:"\\trianglerighteq",8872:"\\models",8912:"\\Subset",8913:"\\Supset",8873:"\\Vdash",8874:"\\Vvdash",8790:"\\eqcirc",8791:"\\circeq",8796:"\\Deltaeq",8783:"\\bumpeq",8782:"\\Bumpeq",8812:"\\between",8916:"\\pitchfork",8784:"\\doteq",8597:"\\updownarrow",8656:"\\Leftarrow",8658:"\\Rightarrow",8657:"\\Uparrow",8659:"\\Downarrow",8660:"\\Leftrightarrow",8661:"\\Updownarrow",10229:"\\longleftarrow",10230:"\\longrightarrow",10231:"\\longleftrightarrow",10232:"\\Longleftarrow",10233:"\\Longrightarrow",10234:"\\Longleftrightarrow",8599:"\\nearrow",8598:"\\nwarrow",8600:"\\searrow",8601:"\\swarrow",8602:"\\nleftarrow",8603:"\\nrightarrow",8622:"\\nleftrightarrow",8653:"\\nLeftarrow",8655:"\\nRightarrow",8654:"\\nLeftrightarrow",8672:"\\dashleftarrow",8674:"\\dashrightarrow",8612:"\\mapstoleft",8614:"\\mapsto",10235:"\\longmapstoleft",10236:"\\longmapsto",8617:"\\hookleftarrow",8618:"\\hookrightarrow",8636:"\\leftharpoonup",8637:"\\leftharpoondown",8640:"\\rightharpoonup",8641:"\\rightharpoondown",8639:"\\upharpoonleft",8638:"\\upharpoonright",8643:"\\downharpoonleft",8642:"\\downharpoonright",8651:"\\leftrightharpoons",8652:"\\rlhar",8647:"\\leftleftarrows",8649:"\\rightrightarrows",8648:"\\upuparrows",8650:"\\downdownarrows",8646:"\\leftrightarrows",8644:"\\rightleftarrows",8619:"\\looparrowleft",8620:"\\looparrowright",8610:"\\leftarrowtail",8611:"\\rightarrowtail",8624:"\\Lsh",8625:"\\Rsh",8626:"\\ldsh",8627:"\\rdsh",8666:"\\Lleftarrow",8667:"\\Rrightarrow",8606:"\\twoheadleftarrow",8608:"\\twoheadrightarrow",8630:"\\curvearrowleft",8631:"\\curvearrowright",8634:"\\circlearrowleft",8635:"\\circlearrowright",8888:"\\multimap",8621:"\\leftrightwavearrow",8604:"\\leftwavearrow",8605:"\\rightwavearrow",8668:"\\leftsquigarrow",8769:"\\nsim",8813:"\\nasymp",8808:"\\lneqq",8809:"\\gneqq",8832:"\\nprec",8833:"\\nsucc",8928:"\\npreccurlyeq",8929:"\\nsucccurlyeq",8716:"\\notni",8836:"\\nsub",8837:"\\nsup",8840:"\\nsubseteq",8841:"\\nsupseteq",8843:"\\supsetneq",8930:"\\nsqsubseteq",8931:"\\nsqsupseteq",8934:"\\lnsim",8935:"\\gnsim",8936:"\\precnsim",8937:"\\succnsim",8938:"\\ntriangleleft",8939:"\\ntriangleright",8940:"\\ntrianglelefteq",8941:"\\ntrianglerighteq",8740:"\\nmid",8742:"\\nparallel",8876:"\\nvdash",8877:"\\nvDash",8878:"\\nVdash",8879:"\\nVDash",8735:"\\rightangle",8736:"\\angle",8737:"\\angmsd",8738:"\\angsph",8894:"\\angrtvb",8895:"\\righttriangle",8917:"\\epar",8758:"\\colon",8759:"\\Colon"};function Ge(t,e){t=t.charCodeAt(0);return 108===t?e?"\\ell":void 0:Ie[t]}var ze=new RegExp("^\\p{L}$","u"),Ue=new RegExp("^[\\p{L}\\p{Nd}]$","u"),f="{",g="}",Je="\\",m=" ",d="^",b="_",Ve="\\below",Xe={"\\dot":775,"\\ddot":776,"\\dddot":8411,"\\hat":770,"\\widehat":770,"\\check":780,"\\acute":769,"\\grave":768,"\\breve":774,"\\widetilde":771,"\\bar":773,"\\vec":8407,"\\hvec":8401},We=["\\sin","\\cos","\\tan","\\cot","\\sec","\\csc","\\sinh","\\cosh","\\tanh","\\coth","\\sech","\\csch","\\arcsin","\\arccos","\\arctan","\\log","\\lim","\\min","\\max","\\ln"],Ze={"\\sum":8721,"\\int":8747,"\\iint":8748,"\\iiint":8749,"\\oint":8750,"\\oiint":8751,"\\oiiint":8752,"\\cwint":8753,"\\coint":8754,"\\aoint":8755,"\\prod":8719,"\\amalg":8720,"\\bigcap":8898,"\\bigcup":8899,"\\bigwedge":8896,"\\bigvee":8897,"\\bigodot":10752,"\\bigotimes":10754,"\\bigoplus":10753,"\\biguplus":10756,"\\bigudot":10755},$e={"\\lfloor":"⌊","\\rfloor":"⌋","\\lceil":"⌈","\\rceil":"⌉","\\langle":"〈","\\rangle":"〉",".":"","|":"|","(":"(",")":")","[":"[","]":"]","{":"{","}":"}"},Ke={"\\mathbb":q.MathFontType.DoubleStruck,"\\mathfrak":q.MathFontType.Fraktur,"\\mathtt":q.MathFontType.Monospace,"\\mathsf":q.MathFontType.SansSerif,"\\mathcal":q.MathFontType.Script,"\\mathscr":q.MathFontType.Script},Qe={"\\mathbit":q.MathStyleType.BoldItalic,"\\mathbf":q.MathStyleType.Bold},Ye=function(t,e,r,n){this.text=t,this.sty=e,this.scr=r,this.nor=n};function v(t,r){t.forEach(function(t){if(!(t instanceof Ye))return t.make(r);var e=r;(e=e.functions.add(q.MathFunctionType.RunElement)).text=t.text,void 0!==t.sty&&(e.mathFormat.style=t.sty),void 0!==t.scr&&(e.mathFormat.font=t.scr),t.nor&&(e.mathFormat.hasNormalText=!0)})}function w(t,e){return t.functions.add(e)}function tr(t){return String.fromCharCode(t)}function P(t){return null===t?"":t}function er(t){return t.startsWith(b)&&t.includes(d)||t.startsWith(d)&&t.includes(b)}M.prototype.populate=function(t,e){var r=this;this.latex=t,this.parseEquation(),e.suspendMutations(function(){return r.roots.forEach(function(t){return v(t,e.maths.add())})})},M.prototype.next=function(){if(this.pos>this.latex.length-1)return null;var t=this.latex[this.pos];if(this.pos++,(this.cur=t)===Je){for(;this.pos<this.latex.length&&(ze.test(this.latex[this.pos])||";"===this.latex[this.pos]);)t+=this.latex[this.pos],this.pos++;this.cur=t}return this.cur},M.prototype.ensure=function(){return null===this.current&&(this.current=[],this.roots.push(this.current)),this.current},M.prototype.sub=function(t,e){var r;null!==t&&(r={latex:this.latex,current:this.current,pos:this.pos,cur:this.cur,use:this.useExisting},this.latex=t,this.current=e,this.pos=0,this.cur=null,this.useExisting=!1,this.parseEquation(),this.latex=r.latex,this.current=r.current,this.pos=r.pos,this.cur=r.cur,this.useExisting=r.use)},M.prototype.fill=function(t){var e=[];return this.sub(t,e),e},M.prototype.add=function(t){this.ensure().push({make:t})},M.prototype.setRun=function(t){var e,r;0!==t.length&&(e=this.ensure(),t=t.startsWith("\\")?He(t):t,(r=e[e.length-1])instanceof Ye&&r.sty===this.sty&&r.scr===this.scr&&r.nor===this.nor?r.text+=t:e.push(new Ye(t,this.sty,this.scr,this.nor)))},M.prototype.fallbackRun=function(t){this.setRun(this.latex.substring(t,this.pos))},M.prototype.equationString=function(){this.cur=this.next();var t,e=null,r=!1,n=!1;return this.cur===f?(r=(t=this.group()).ok,e=t.text):n=!0,n&&null!==this.cur&&1===this.cur.length&&(Ue.test(this.cur)||this.cur===m)?e=this.cur:r||(e=null),e},M.prototype.group=function(){if(this.cur!==f)return{ok:!1,text:""};for(var t="",e=1;0<e&&this.pos<this.latex.length;)if(this.cur=this.next(),this.cur===f)e++,t+=this.cur;else if(this.cur===g)1!==e&&(t+=this.cur),e--;else if("\\left"===this.cur){var r=this.delimiter();if(t+=r.text,!r.ok)return{ok:!1,text:t}}else t+=P(this.cur);return{ok:0===e,text:t}},M.prototype.squareGroup=function(){if("["!==this.cur)return null;for(var t="",e=1;0<e&&this.pos<this.latex.length;)this.cur=this.next(),"["===this.cur?(e++,t+=this.cur):"]"===this.cur?(1!==e&&(t+=this.cur),e--):t+=P(this.cur);return t},M.prototype.parseEquation=function(){for(;this.pos<this.latex.length||this.useExisting;)this.useExisting?this.useExisting=!1:this.cur=this.next(),this.dispatch(P(this.cur),this.cur)},M.prototype.dispatch=function(t,e){null===e?this.parseDefault():void 0!==Xe[t]?this.parseAccent():"\\overline"===t||"\\underline"===t?this.parseBar():"\\box"===t?this.parseBox():"\\fbox"===t||"\\boxed"===t?this.parseBorderBox():"\\left"===t?this.parseDelimiter():"\\eqarray"===t?this.parseEqArray():"\\frac"===t||"\\sfrac"===t||"\\binom"===t?this.parseFraction():-1!==We.indexOf(t)?this.parseFunction():"\\overbrace"===t||"\\underbrace"===t?this.parseGroupChar():"\\begin"===t?this.parseMatrix():void 0!==Ze[t]?this.parseNary():"\\sqrt"===t?this.parseRadical():t===f?this.parseGroupStart():void 0!==Qe[t]?this.parseFormat(t,"sty",Qe[t]):void 0!==Ke[t]?this.parseFormat(t,"scr",Ke[t]):"\\mathrm"===t?this.parseFormat(t,"nor",!0):this.parseDefault()},M.prototype.parseDefault=function(){var t=this.pos,e=P(this.cur);if(this.cur=this.next(),this.cur===d||this.cur===b)this.parseScript(e,t-e.length);else{if(null!==this.cur&&(this.useExisting=!0),this.cur===m){if("\\"===e)return;e.startsWith("\\")&&He(e)!==e&&(this.useExisting=!1)}this.setRun(e)}},M.prototype.parseFormat=function(t,e,r){var n,i,o=this.pos;this.cur=this.next(),this.cur!==f?(this.setRun(t),this.useExisting=!0):(n=this.group()).ok?(i={sty:this.sty,scr:this.scr,nor:this.nor},"sty"===e&&void 0===this.sty?this.sty=r:"scr"===e&&void 0===this.scr?this.scr=r:"nor"===e&&(this.nor=!0),this.sub(n.text,this.current),this.sty=i.sty,this.scr=i.scr,this.nor=i.nor):this.fallbackRun(o-t.length)},M.prototype.oneArg=function(){var t=this.pos,e=P(this.cur),r=this.equationString();return{start:e,at:t,text:r=r===m&&this.cur===m?this.equationString():r}},M.prototype.parseAccent=function(){var e,r,t=this.oneArg(),n=t.start,i=t.at,t=t.text;null===t&&null!==this.cur?this.fallbackRun(i-n.length):(e=tr(Xe[n]),(i=t)&&i.startsWith("\\bar{")&&i.endsWith(g)&&e===tr(773)&&(e=tr(831),i=i.substring(5,i.length-1)),r=i?this.fill(i):[],this.add(function(t){t=w(t,q.MathFunctionType.Accent);t.accentCharacter=e,v(r,t.equation)}))},M.prototype.parseBar=function(){var e,r,t=this.oneArg(),n=t.start,i=t.at,t=t.text;null===t&&null!==this.cur?this.fallbackRun(i-n.length):(this.cur=this.next(),this.cur===d||this.cur===b?this.parseScript(n+f+P(t)+g,i):(null!==this.cur&&(this.useExisting=!0),e=t?this.fill(t):[],r="\\overline"===n?"top":"bot",this.add(function(t){t=w(t,q.MathFunctionType.Bar);t.barTop="top"==r,v(e,t.equation)})))},M.prototype.parseBox=function(){var e,t=this.oneArg(),r=t.start,n=t.at,t=t.text;null===t&&null!==this.cur?this.fallbackRun(n-r.length):(e=t?this.fill(t):[],this.add(function(t){t=w(t,q.MathFunctionType.Box);t.noBreak=!1,v(e,t.equation)}))},M.prototype.parseBorderBox=function(){var e,t=this.oneArg(),r=t.start,n=t.at,t=t.text;null===t&&null!==this.cur?this.fallbackRun(n-r.length):(this.cur=this.next(),this.cur===d||this.cur===b?this.parseScript(r+f+P(t)+g,n):(null!==this.cur&&(this.useExisting=!0),e=t?this.fill(t):[],this.add(function(t){return v(e,w(t,q.MathFunctionType.BorderBox).equation)})))},M.prototype.delimiterChar=function(t){this.cur=this.next(),t.s+=P(this.cur),this.cur===Je&&(this.cur=this.next(),t.s+=P(this.cur));t=P(this.cur);return Object.prototype.hasOwnProperty.call($e,t)?$e[t]:null},M.prototype.delimiter=function(){var t={ok:!1,begin:null,end:null,sep:null,list:[],text:""},e={s:P(this.cur)},r=1;if(t.begin=this.delimiterChar(e),null!==t.begin){for(var n="";0<r&&this.pos<this.latex.length;){var i=P(this.next());if(e.s+=i,"\\left"===i)n+=i,r++;else if("\\right"===i){if(1===r){if(t.list.push(n.trim()),t.end=this.delimiterChar(e),null===t.end)return t.text=e.s,t}else n+=i;r--}else if("\\middle"===i)if(1===r){var o=this.delimiterChar(e);if(null===o)return t.text=e.s,t;null===t.sep&&(t.sep=o),t.list.push(n.trim()),n=""}else n+=i;else n+=i}t.ok=0===r}return t.text=e.s,t},M.prototype.parseDelimiter=function(){var r,n,e=this,t=this.pos,i=P(this.cur),o=this.delimiter();o.ok?(this.cur=this.next(),this.cur===d||this.cur===b?this.parseScript(o.text,t):(null!==this.cur&&(this.useExisting=!0),r=o.list.map(function(t){return e.fill(t)}),n={begChr:P(o.begin),endChr:P(o.end)},null!==o.sep&&(n.sepChr=o.sep),this.add(function(t){var e=w(t,q.MathFunctionType.Delimiter);e.beginCharacter=n.begChr,e.endCharacter=n.endChr,void 0!==n.sepChr&&(e.separator=n.sepChr),r.forEach(function(t){return v(t,e.equations.add())})}))):this.setRun(this.latex.substring(t-i.length,this.pos).replace(/\\ /g," "))},M.prototype.splitEqArray=function(t){var e=[],r="";if(null!==t){for(var n=0;n<t.length;n++)"@"===t[n]?(t.substring(n).includes("&")||t.substring(n+1).includes("@"))&&(e.push(r.trim()),r=""):r+=t[n];e.push(r.trim())}return e},M.prototype.parseEqArray=function(){var r,e=this,t=this.pos,n=P(this.cur),i=this.equationString();null===i&&null!==this.cur?this.fallbackRun(t-n.length):(r=this.splitEqArray(i).map(function(t){return e.fill(t)}),this.add(function(t){var e=w(t,q.MathFunctionType.EquationArray);0===r.length&&e.equations.add(),r.forEach(function(t){return v(t,e.equations.add())})}))},M.prototype.parseFraction=function(){var t=this.pos,e=P(this.cur),r=this.equationString(),n=(this.cur===m&&r===m&&(r=this.equationString()),"");this.cur===m&&r===m||null===this.cur&&null===r?r="":n=this.equationString(),null===r||null===n?this.fallbackRun(t-e.length):(this.cur=this.next(),this.cur===d||this.cur===b?this.parseScript(e+f+r+g+f+n+g,t):(null!==this.cur&&(this.useExisting=!0),"\\binom"===e?this.binomial(r,n):(t="\\sfrac"===e?q.MathFractionType.SkewedFractionBar:q.MathFractionType.NormalFractionBar,this.fraction(t,r,n))))},M.prototype.fraction=function(e,t,r){var n=""!==t?this.fill(t):[],i=""!==r?this.fill(r):[];this.add(function(t){t=w(t,q.MathFunctionType.Fraction);t.fractionType=e,v(n,t.numerator),v(i,t.denominator)})},M.prototype.binomial=function(t,e){var r=""!==t?this.fill(t):[],n=""!==e?this.fill(e):[];this.add(function(t){t=w(t,q.MathFunctionType.Delimiter),t.beginCharacter="(",t.endCharacter=")",t=w(t.equations.add(),q.MathFunctionType.Fraction);t.fractionType=q.MathFractionType.NoFractionBar,v(r,t.numerator),v(n,t.denominator)})},M.prototype.parseNoFractionBar=function(t,e){var r;"\\atop"===this.cur&&(r=this.equationString(),null===(r=this.cur===r?null:r)?this.fallbackRun(e):this.fraction(q.MathFractionType.NoFractionBar,t,r))},M.prototype.parseFunction=function(){var e,r,n,i,o,a,u,t=this.pos,s=P(this.cur),c=this.equationString(),p=null,h=null;this.cur!==d&&this.cur!==b&&this.cur!==Ve||(p=this.cur===d?"sup":this.cur===b?"sub":"limit",(h=this.equationString())===this.cur?null!==(c=this.equationString())&&c===this.cur&&(this.useExisting=!(c="")):c=this.equationString()),null===c?this.fallbackRun(t-s.length):(t=s.replace(/^\\+|\\+$/g,""),e=[],i="sup"===p||"sub"===p?(r=this.fill(t),this.regular(r),n=null!==h?this.fill(h):[],function(t){t=w(t.functionName,q.MathFunctionType.SubSuperscript);t.scriptType="sup"===p?q.MathScriptType.Superscript:q.MathScriptType.Subscript,v(r,t.equation),v(n,t.script)}):"limit"===p?(o=this.fill(t),this.regular(o),a=null!==h?this.fill(h):[],function(t){t=w(t.functionName,q.MathFunctionType.Limit);t.limitType=q.MathLimitType.LowerLimit,v(o,t.equation),v(a,t.limit)}):(s=this.current,this.current=e,this.setRun(t),this.current=s,this.regular(e),function(t){return v(e,t.functionName)}),this.ensure(),u=""!==c?this.fill(c):[],this.add(function(t){t=w(t,q.MathFunctionType.Function);i(t),v(u,t.equation)}))},M.prototype.regular=function(t){t=t[0];t instanceof Ye&&(t.sty=q.MathStyleType.Regular)},M.prototype.parseGroupChar=function(){var e,r,t=this.oneArg(),n=t.start,i=t.at,t=t.text;null===t&&null!==this.cur?this.fallbackRun(i-n.length):(e=t?this.fill(t):[],r="\\overbrace"===n,this.add(function(t){t=w(t,q.MathFunctionType.GroupCharacter);r&&(t.groupCharacter=tr(9182),t.hasAlignTop=!1,t.hasCharacterTop=!0),v(e,t.equation)}))},M.prototype.isCurrent=function(t){return this.cur===t},M.prototype.parseLimit=function(t,e){var r,n,i;this.isCurrent(Ve)&&(null===(r=(r=this.equationString())===m&&this.isCurrent(m)?this.equationString():r)?this.fallbackRun(e):(n=this.fill(t),i=r!==m?this.fill(r):[],this.add(function(t){t=w(t,q.MathFunctionType.Limit);t.limitType=q.MathLimitType.LowerLimit,v(n,t.equation),v(i,t.limit)})))},M.prototype.parseMatrix=function(){var t,n,i,o,a=this,e=this.pos,r=P(this.cur);this.cur=this.next(),this.cur!==f?(this.setRun(r),this.useExisting=!0):(t=this.group(),null===(n=t.ok&&"matrix"===t.text?this.matrixRows():null)?this.fallbackRun(e-r.length):(this.cur=this.next(),this.cur===d||this.cur===b?this.parseScript(this.latex.substring(e-r.length,this.pos-1),e):(null!==this.cur&&(this.useExisting=!0),i=n.rows.map(function(t){for(var e=[],r=0;r<n.maxCols;r++)e.push(r<t.length?a.fill(t[r]):[]);return e}),o=n.maxCols,this.add(function(t){for(var e=w(t,q.MathFunctionType.Matrix),r=0;r<o;r++)e.columns.add().horizontalAlignment=q.MathHorizontalAlignment.Center;i.forEach(function(t){var r=e.rows.add();t.forEach(function(t,e){return v(t,r.arguments.getItem(e))})})}))))},M.prototype.matrixRows=function(){for(var t=[],e=0,r=1,n="",i=[],o=function(){i.push(n),n="",e=Math.max(e,i.length),t.push(i),i=[]};0<r&&this.pos<this.latex.length;){for(this.cur=this.next();this.cur===m;)this.cur=this.next();this.cur===Je&&(this.cur=this.next(),this.cur===Je)&&(this.cur+=Je);var a=this.cur;if("\\begin"===a){n+=a;var u=P(this.cur=this.next());(s=this.group()).ok&&"matrix"===s.text&&r++,n+=u+s.text+P(this.cur)}else if("\\end"===a){var s,u=a+P(this.cur=this.next());if((s=this.group()).ok&&"matrix"===s.text&&1===r)0===i.length&&""===n||o(),r--;else{if(1===r)return null;n+=u+s.text+P(this.cur)}}else"&"===a?1===r?(i.push(n),n=""):n+=a:"\\\\"===a?1===r?o():n+=a:n+=P(a)}return 0===r?{rows:t,maxCols:e}:null},M.prototype.parseNary=function(){for(var e,r,n,i,t=this.pos,o=P(this.cur),a=this.equationString(),u=null,s=null,c=0;c<2&&a===m&&this.cur===m;c++)a=this.equationString();this.cur===b?u=this.equationString():this.cur===d&&(s=this.equationString()),null!==u?(a=this.equationString(),this.cur===d&&(s=this.equationString())):null!==s&&(a=this.equationString(),this.cur===b)&&(u=this.equationString()),null===(a=null!==(a=null!==u&&null!==s?this.equationString():a)?this.naryTail(a):a)&&null!==this.cur?this.fallbackRun(t-o.length):(e=null!==u?this.fill(u):[],r=null!==s?this.fill(s):[],n=a!==m?this.fill(a):[],i=tr(Ze[o]),this.add(function(t){t=w(t,q.MathFunctionType.NArray);t.nArrayCharacter=i,null===u&&(t.hideLowerLimit=!0),null===s&&(t.hideUpperLimit=!0),null===u&&null===s&&(t.subSuperscriptLimit=!1),v(e,t.subscript),v(r,t.superscript),v(n,t.equation)}))},M.prototype.naryTail=function(t){var e=t,t=!1,r=(this.cur===g&&er(e)&&(e=f+e+g,t=!0),this.equationString()),n=!0;for(null!==r&&t?e+=f+r+g:null!==r||this.cur!==d&&this.cur!==b?null!==r&&er(r)?e+=f+r+g:(n=!(this.useExisting=!0),null!==r&&this.cur!==r&&(this.cur=r)):e+=this.cur+f+P(this.equationString())+g;n;)null!==(r=this.equationString())||this.cur!==d&&this.cur!==b?null!==r&&er(r)?e+=f+r+g:n=!(this.useExisting=!0):e+=this.cur+f+P(this.equationString())+g;return e},M.prototype.parseRadical=function(){var t,e,r,n,i=this.pos,o=P(this.cur),a=(this.cur=this.next(),this.cur===m&&(this.cur=this.next()),this.squareGroup()),u=(null!==a&&(this.cur=this.next()),null),s=!1,c=!1;this.cur===f?(s=(t=this.group()).ok,u=t.text):c=!0,c&&null!==this.cur&&1===this.cur.length&&(Ue.test(this.cur)||this.cur===m)&&(u=this.cur),c||s?(this.cur=this.next(),this.cur===d||this.cur===b?this.parseScript(this.latex.substring(i-o.length,this.pos-1),i):(null!==this.cur&&(this.useExisting=!0),r=(e=!(null!==a&&null!==u))?[]:this.fill(a),n=[],null!==u&&u!==m?n=this.fill(u):null===u&&(this.useExisting=!0,null!==a)&&this.setRun("["+a+"]"),this.add(function(t){t=w(t,q.MathFunctionType.Radical);e&&(t.hideDegree=!0),v(r,t.degree),v(n,t.equation)}))):this.fallbackRun(i-o.length)},M.prototype.parseGroupStart=function(){var t=this.pos-f.length,e=this.group();e.ok?er(e.text)?this.parseLeftScript(e.text,t):(this.cur=this.next(),this.cur===d||this.cur===b?this.parseScript(e.text,t):this.cur===Ve?this.parseLimit(e.text,t):"\\atop"===this.cur?this.parseNoFractionBar(e.text,t):(this.sub(e.text,this.current),this.useExisting=!0)):(this.setRun(f),this.sub(e.text,this.current))},M.prototype.parseScript=function(t,e){if(this.cur===d||this.cur===b){var r=this.cur===d,n=this.equationString();if(null===n&&null!==this.cur)this.fallbackRun(e);else{if(null!==this.cur){if(this.cur=this.next(),r&&this.cur===b||!r&&this.cur===d)return void this.parseRightScript(t,n,r,e);this.useExisting=!0}this.ensure();var i=this.fill(t),o=n?this.fill(n):[];this.add(function(t){t=w(t,q.MathFunctionType.SubSuperscript);t.scriptType=r?q.MathScriptType.Superscript:q.MathScriptType.Subscript,v(i,t.equation),v(o,t.script)})}}},M.prototype.parseRightScript=function(t,e,r,n){var i,o,a,u=this.equationString();null===u&&null!==this.cur?this.fallbackRun(n):(i=this.fill((n=function(t){return null!==t&&t!==m?t:null})(t)),o=this.fill(n(r?e:u)),a=this.fill(n(r?u:e)),this.add(function(t){t=w(t,q.MathFunctionType.RightSubSuperscript);v(i,t.equation),v(a,t.subscript),v(o,t.superscript)}))},M.prototype.parseLeftScript=function(t,e){var r,n,i,o=null,a=null,u={latex:this.latex,pos:this.pos,cur:this.cur},t=(this.latex=t,this.pos=1,t.startsWith(b)?o=this.equationString():a=this.equationString(),null!==o?(this.cur=this.next(),this.cur===d&&(a=this.equationString())):null!==a&&(this.cur=this.next(),this.cur===b)&&(o=this.equationString()),this.latex=u.latex,this.pos=u.pos,this.cur=u.cur,null);null===(t=null!==o&&null!==a?this.equationString():t)&&null!==this.cur?this.fallbackRun(e):(r=this.fill((u=function(t){return t!==m?t:null})(o)),n=this.fill(u(a)),i=null!==t&&t!==m?this.fill(t):[],this.add(function(t){t=w(t,q.MathFunctionType.LeftSubSuperscript);v(r,t.subscript),v(n,t.superscript),v(i,t.equation)}))};var rr=M;function M(){this.latex="",this.pos=0,this.cur=null,this.useExisting=!1,this.current=null,this.roots=[],this.nor=!1}function nr(t,e){(new rr).populate(t,e)}var ir=function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return{value:(t=t&&r>=t.length?void 0:t)&&t[r++],done:!t}}}},or=new RegExp("^\\p{L}$","u");function ar(t,e){return null!=t?t:e}var ur={775:"\\dot",776:"\\ddot",8411:"\\dddot",770:"\\widehat",780:"\\check",768:"\\grave",774:"\\breve",771:"\\widetilde",769:"\\acute",773:"\\bar",831:"\\bar{\\bar",8407:"\\vec",8401:"\\hvec"},sr={8721:"\\sum",8747:"\\int",8748:"\\iint",8749:"\\iiint",8750:"\\oint",8751:"\\oiint",8752:"\\oiiint",8753:"\\cwint",8754:"\\coint",8755:"\\aoint",8719:"\\prod",8720:"\\amalg",8898:"\\bigcap",8899:"\\bigcup",8896:"\\bigwedge",8897:"\\bigvee",10752:"\\bigodot",10754:"\\bigotimes",10753:"\\bigoplus",10756:"\\biguplus",10755:"\\bigudot"},cr={40:"(",91:"[",123:"{",41:")",93:"]",125:"}",124:"|",9001:"\\langle",8968:"\\lceil",8970:"\\lfloor",9002:"\\rangle",8969:"\\rceil",8971:"\\rfloor"},pr=((a={})[q.MathFontType.DoubleStruck]="\\mathbb",a[q.MathFontType.Fraktur]="\\mathfrak",a[q.MathFontType.Monospace]="\\mathtt",a[q.MathFontType.SansSerif]="\\mathsf",a[q.MathFontType.Script]="\\mathscr",a),hr=(S.prototype.generate=function(t){var e,r;try{for(var n=ir(t),i=n.next();!i.done;i=n.next()){var o=i.value;this.arg(o)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}return this.out},S.prototype.group=function(t){this.out+="{",this.arg(t),this.out+="}"},S.prototype.arg=function(t){if(t)for(var e=0;e<t.functions.count;e++)this.element(t.functions.getItem(e))},S.prototype.element=function(t){switch(t.type){case q.MathFunctionType.RunElement:this.run(t);break;case q.MathFunctionType.Accent:this.accent(t);break;case q.MathFunctionType.Bar:this.out+=t.barTop?"\\overline":"\\underline",this.group(t.equation);break;case q.MathFunctionType.Box:this.out+="\\box",this.group(t.equation);break;case q.MathFunctionType.BorderBox:this.out+="\\fbox",this.group(t.equation);break;case q.MathFunctionType.Fraction:this.fraction(t);break;case q.MathFunctionType.Function:this.func(t);break;case q.MathFunctionType.Delimiter:this.delimiter(t);break;case q.MathFunctionType.GroupCharacter:this.groupChar(t);break;case q.MathFunctionType.Limit:this.limit(t);break;case q.MathFunctionType.Matrix:this.matrix(t);break;case q.MathFunctionType.NArray:this.nary(t);break;case q.MathFunctionType.Radical:this.radical(t);break;case q.MathFunctionType.SubSuperscript:var e=t;this.script(e.equation,e.scriptType===q.MathScriptType.Subscript?"_":"^",e.script);break;case q.MathFunctionType.LeftSubSuperscript:e=t;this.out+="{_",this.group(e.subscript),this.out+="^",this.group(e.superscript),this.out+="}",this.group(e.equation);break;case q.MathFunctionType.RightSubSuperscript:e=t;this.group(e.equation),this.out+="_",this.group(e.subscript),this.out+="^",this.group(e.superscript);break;case q.MathFunctionType.EquationArray:var r=t;this.out+="\\eqarray{";for(var n=0;n<r.equations.count;n++)0<n&&(this.out+="@"),this.arg(r.equations.getItem(n));this.out+="}"}},S.prototype.accent=function(t){var e=t.accentCharacter.charCodeAt(0);this.out+=ar(ur[e],""),this.group(t.equation),831===e&&(this.out+="}")},S.prototype.fraction=function(t){var e=t.fractionType;e===q.MathFractionType.NormalFractionBar?this.out+="\\frac":e!==q.MathFractionType.SkewedFractionBar&&e!==q.MathFractionType.FractionInline||(this.out+="\\sfrac"),this.group(t.numerator),e===q.MathFractionType.NoFractionBar&&(this.out+="\\atop"),this.group(t.denominator)},S.prototype.func=function(t){this.inFunctionName=!0,this.out+="\\",this.arg(t.functionName),this.inFunctionName=!1,this.group(t.equation)},S.prototype.delimiterChar=function(t){this.out+=0<t.length?ar(cr[t.charCodeAt(0)],""):"."},S.prototype.delimiter=function(t){this.out+="\\left",this.delimiterChar(t.beginCharacter),this.out+=" ";for(var e=0;e<t.equations.count;e++)this.arg(t.equations.getItem(e)),e<t.equations.count-1&&(this.out+="\\middle",this.delimiterChar(t.separator),this.out+=" ");this.out+="\\right",this.delimiterChar(t.endCharacter)},S.prototype.groupChar=function(t){var e=t.groupCharacter.charCodeAt(0);9182===e?this.out+="\\overbrace":9183===e&&(this.out+="\\underbrace"),this.group(t.equation)},S.prototype.limit=function(t){this.inFunctionName||(this.out+="{"),this.arg(t.equation),this.inFunctionName||(this.out+="}"),this.out+="\\below",this.group(t.limit)},S.prototype.matrix=function(t){var e,r;this.out+="\\begin{matrix}";try{for(var n=ir(t.rowItems),i=n.next();!i.done;i=n.next()){for(var o=i.value,a=o.arguments.count,u=0;u<a;u++)this.arg(o.arguments.getItem(u)),u!==a-1&&(this.out+="&");this.out+="\\\\"}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}this.out+="\\end{matrix}"},S.prototype.nary=function(t){this.out+=ar(sr[t.nArrayCharacter.charCodeAt(0)],""),0<t.subscript.functions.count&&(this.out+="_",this.group(t.subscript)),0<t.superscript.functions.count&&(this.out+="^",this.group(t.superscript)),this.group(t.equation)},S.prototype.radical=function(t){this.out+="\\sqrt",0<t.degree.functions.count&&(this.out+="[",this.arg(t.degree),this.out+="]"),this.group(t.equation)},S.prototype.script=function(t,e,r){this.inFunctionName||(this.out+="{"),this.arg(t),this.inFunctionName||(this.out+="}"),this.out+=e,this.group(r)},S.prototype.run=function(t){var e,r,n=t.text,t=t.mathFormat,i=t.isExplicit(y.Style)?t.style:void 0,o=t.isExplicit(y.Script)?t.font:void 0,a=[],u=(i===q.MathStyleType.BoldItalic?a.push("\\mathbit{"):i===q.MathStyleType.Bold&&a.push("\\mathbf{"),void 0!==o&&void 0!==pr[o]&&a.push(pr[o]+"{"),t.hasNormalText&&a.push("\\mathrm{"),0),s=!0,c=!1;try{for(var p=ir(n),h=p.next();!h.done;h=p.next()){var l=h.value,f=Ge(l,o===q.MathFontType.Script);void 0!==f?(this.out+="}".repeat(u),s=!(u=0),this.out+=f,c=!0):(c&&or.test(l)&&(this.out+=" "),c=!1,s&&(this.out+=a.join(""),u=a.length,s=!1),this.out+=l)}}catch(t){e={error:t}}finally{try{h&&!h.done&&(r=p.return)&&r.call(p)}finally{if(e)throw e.error}}this.out+="}".repeat(u)},S);function S(){this.out="",this.inFunctionName=!1}function lr(t){return(new hr).generate(t instanceof gr?t.maths.toArray():[t])}fr=function(t,e){return(fr=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])}))(t,e)};(function(t,e){function r(){this.constructor=t}fr(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)})(x,yr=I),Object.defineProperty(x.prototype,"maths",{get:function(){return this._maths},enumerable:!0,configurable:!0}),Object.defineProperty(x.prototype,"justification",{get:function(){return this.getProperty(y.Justification,function(){return q.MathJustification.CenterGroup})},set:function(t){this.setProperty(y.Justification,t)},enumerable:!0,configurable:!0}),Object.defineProperty(x.prototype,"hasExplicitJustification",{get:function(){return this.isExplicit(y.Justification)},enumerable:!0,configurable:!0}),Object.defineProperty(x.prototype,"defaultMathCharacterFormat",{get:function(){return void 0!==this.adapter?this.adapter.createDefaultMathCharacterFormat(this):new z},enumerable:!0,configurable:!0}),Object.defineProperty(x.prototype,"latex",{get:function(){return lr(this)},set:function(t){this.convertLatexToMath(t)},enumerable:!0,configurable:!0}),x.prototype.convertLatexToMath=function(t){var e=this;this.suspendMutations(function(){e._maths.clear(),nr(t,e)}),this.notifyMutated()},x.prototype.setMutationListener=function(t){this._listener=t},x.prototype.suspendMutations=function(t){this._suspended++;try{t()}finally{this._suspended--}},x.prototype.rootMutated=function(){0===this._suspended&&void 0!==this._listener&&this._listener()};var fr,yr,gr=x;function x(t){var e=yr.call(this)||this;return e._suspended=0,e.adapter=t,e._maths=new ft(e),e}mr=function(t,e){return(mr=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])}))(t,e)};(function(t,e){function r(){this.constructor=t}mr(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)})(vr,dr=i),Object.defineProperty(vr.prototype,"localName",{get:function(){return this._localName},enumerable:!0,configurable:!0}),Object.defineProperty(vr.prototype,"preservedXml",{get:function(){return this._xml},enumerable:!0,configurable:!0});var mr,dr,br=vr;function vr(t,e,r){r=dr.call(this,r)||this;return r.type=q.MathFunctionType.Unknown,r._localName=t,r._xml=e,r}var wr=function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return{value:(t=t&&r>=t.length?void 0:t)&&t[r++],done:!t}}}},Pr=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),a=[];try{for(;(void 0===e||0<e--)&&!(n=o.next()).done;)a.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},Mr=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(Pr(arguments[e]));return t};function Sr(t){var a,e,r=t;return t.type===q.MathFunctionType.Matrix?(a=[],t.rowItems.forEach(function(t){var e,r;try{for(var n=wr(t.arguments),i=n.next();!i.done;i=n.next()){var o=i.value;a.push(o)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}}),a):(e=[],["equation","degree","numerator","denominator","functionName","limit","script","subscript","superscript"].forEach(function(t){t=r[t];t instanceof l&&e.push(t)}),void 0!==(t=r.equations)&&e.push.apply(e,Mr(Array.from(t))),e)}function xr(t){return t.type===q.MathFunctionType.Box?t.break:t.type===q.MathFunctionType.RunElement?t.mathFormat.break:void 0}var Tr=function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return{value:(t=t&&r>=t.length?void 0:t)&&t[r++],done:!t}}}};function qr(t){var e=new $;return e.copyExplicitFrom(t),e}function Fr(t,e,r){if(t instanceof br)e.functions.insert(e.functions.count,new br(t.localName,t.preservedXml));else{e=e.functions.add(t.type);if(p=t,(o=e).copyExplicitFrom(p),p.hasControlProperties&&(o.controlProperties=p.controlProperties.clone()),p.type===q.MathFunctionType.Box&&void 0!==p.break&&(i=p.break,p=p.ownerMathEntity instanceof l?p.ownerMathEntity:void 0,n=o.ownerMathEntity instanceof l?o.ownerMathEntity:void 0,p=void 0!==p?p.breaks.toArray().indexOf(i):-1,o.break=0<=p&&void 0!==n?n.breaks.getItem(p):qr(i)),t.type===q.MathFunctionType.RunElement)o=t,n=r,(p=e).mathFormat.copyExplicitFrom(o.mathFormat),void 0!==o.mathFormat.break&&(p.mathFormat.break=qr(o.mathFormat.break)),void 0!==o.item&&(void 0!==n.adapter?p.item=n.adapter.cloneRun(o.item):o.item instanceof J?p.item=o.item.clone():((n=new J).text=o.text,p.item=n));else{var n,i=t,o=e;if(i.type===q.MathFunctionType.Matrix){var a=o;(u=i).columns.toArray().forEach(function(t){return a.columns.add().copyExplicitFrom(t)}),u.rowItems.forEach(function(t){return a.rows.add().copyExplicitFrom(t)})}else if(i.type===q.MathFunctionType.Delimiter||i.type===q.MathFunctionType.EquationArray)for(var u=i,s=o,c=0;c<u.equations.count;c++)s.equations.add();var p=Sr(t),h=Sr(e);p.forEach(function(t,e){return _r(t,h[e],r)})}}}function _r(t,e,r){var n,i,o,a;e.copyExplicitFrom(t),e.preservedControlProperties=t.preservedControlProperties;try{for(var u=Tr(t.breaks),s=u.next();!s.done;s=u.next()){var c=s.value;e.breaks.add().copyExplicitFrom(c)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}try{for(var p=Tr(t.functions),h=p.next();!h.done;h=p.next())Fr(h.value,e,r)}catch(t){o={error:t}}finally{try{h&&!h.done&&(a=p.return)&&a.call(p)}finally{if(o)throw o.error}}}function Or(t,e){var r=e.maths.add();return _r(t,r,e),r}function Ar(t,e){return void 0===t||void 0===e?t===e:t.explicitEquals(e)}function kr(t,e){var r,s;return!(!t.explicitEquals(e)||t.functions.count!==e.functions.count||t.breaks.count!==e.breaks.count||(r=e.breaks.toArray(),!t.breaks.toArray().every(function(t,e){return Ar(t,r[e])})))&&(s=e.functions.toArray(),t.functions.toArray().every(function(t,e){return t=t,e=s[e],!(t.type!==e.type||!t.explicitEquals(e)||(r=e,(a=t).hasControlProperties!==r.hasControlProperties)||a.hasControlProperties&&void 0!==(a=a.controlProperties).equals&&!a.equals(r.controlProperties))&&(t instanceof br?t.localName===e.localName&&G(t.preservedXml,e.preservedXml):!!Ar(xr(t),xr(e))&&(t.type===q.MathFunctionType.RunElement?t.text===e.text&&t.mathFormat.explicitEquals(e.mathFormat):!(t.type===q.MathFunctionType.Matrix&&(a=e,n=(r=t).columns.toArray(),i=a.columns.toArray(),r=r.rowItems,o=a.rowItems,n.length!==i.length||r.length!==o.length||!n.every(function(t,e){return t.explicitEquals(i[e])})||!r.every(function(t,e){return t.explicitEquals(o[e])})))&&(a=Sr(t),u=Sr(e),a.length===u.length)&&a.every(function(t,e){return kr(t,u[e])})));var r,n,i,o,a,u}))}var Cr=function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return{value:(t=t&&r>=t.length?void 0:t)&&t[r++],done:!t}}}};function Er(t,e,r,n){return{kind:"element",namespaceUri:t,localName:e,prefix:r,attributes:null!=(t=null==n?void 0:n.attributes)?t:[],namespaceDeclarations:null!=(e=null==n?void 0:n.namespaceDeclarations)?e:[],children:null!=(r=null==n?void 0:n.children)?r:[]}}function Rr(t){return{kind:"text",value:t}}function jr(t){return t.children.filter(function(t){return"element"===t.kind})}function Lr(t,e){return null==(t=t.attributes.find(function(t){return t.localName===e}))?void 0:t.value}function Br(t,e,r){return null==(t=t.attributes.find(function(t){return t.namespaceUri===e&&t.localName===r}))?void 0:t.value}function Nr(t){var e,r,n="";try{for(var i=Cr(t.children),o=i.next();!o.done;o=i.next()){var a=o.value;"text"===a.kind&&(n+=a.value)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return n}function _(t,e){return void 0===t?void 0:jr(t).filter(function(t){return t.namespaceUri===F&&t.localName===e})[0]}function Dr(t,e){return jr(t).filter(function(t){return t.namespaceUri===F&&t.localName===e})}function O(t,e){t=_(t,e);return void 0===t?void 0:Lr(t,"val")}function Hr(t,e){t=O(t,e);return void 0!==t&&/^\d+$/.test(t)?Number(t):void 0}function A(r,t){t.forEach(function(t){var e=function(t,e){var t=_(t,e);if(void 0!==t)return void 0===(e=Lr(t,"val"))||"1"===(t=e.toLowerCase())||"true"===t||"on"===t||"0"!==t&&"false"!==t&&"off"!==t&&void 0}(r,t[0]);void 0!==e&&t[1](e)})}function Ir(t,e,r){t=O(t,e);void 0!==t&&r(t)}function Gr(t){return"top"===t?q.MathVerticalAlignment.Top:"bottom"===t?q.MathVerticalAlignment.Bottom:"center"===t?q.MathVerticalAlignment.Center:void 0}function zr(t,e){var t=_(t,"brk");if(void 0!==t)return e=void 0!==e?e.breaks.add():new $,void 0!==(t=Lr(t,"alnAt"))&&/^\d+$/.test(t)&&1<=Number(t)&&Number(t)<=255&&(e.alignAt=Number(t)),e}var Ur={roman:q.MathFontType.Roman,script:q.MathFontType.Script,fraktur:q.MathFontType.Fraktur,"double-struck":q.MathFontType.DoubleStruck,"sans-serif":q.MathFontType.SansSerif,monospace:q.MathFontType.Monospace},Jr={p:q.MathStyleType.Regular,b:q.MathStyleType.Bold,i:q.MathStyleType.Italic,bi:q.MathStyleType.BoldItalic};function Vr(t,e,r,n,i){n=Hr(t,n),void 0!==n&&n<=4&&e(n),e=Hr(t,i);if(void 0!==e)try{r(e)}catch(t){if(!(t instanceof RangeError))throw t}}var Xr={bar:q.MathFractionType.NormalFractionBar,noBar:q.MathFractionType.NoFractionBar,skw:q.MathFractionType.SkewedFractionBar,lin:q.MathFractionType.FractionInline};function Wr(a,t,e){t=_(t,"mcs");for((void 0===t?[]:Dr(t,"mc")).forEach(function(t){for(var t=_(t,"mcPr"),e=Hr(t,"count"),r=void 0!==e&&1<=e&&e<=255?e:1,n="left"===(e=O(t,"mcJc"))?q.MathHorizontalAlignment.Left:"right"===e?q.MathHorizontalAlignment.Right:"center"===e?q.MathHorizontalAlignment.Center:void 0,i=0;i<r;i++){var o=a.columns.add();void 0!==n&&(o.horizontalAlignment=n)}});a.columns.count<e;)a.columns.add()}function T(t,e,r,n){return{type:t,pr:e,args:r,apply:n}}var Zr={acc:T(q.MathFunctionType.Accent,"accPr",["e"],function(e,t){Ir(t,"chr",function(t){e.accentCharacter=t})}),bar:T(q.MathFunctionType.Bar,"barPr",["e"],function(t,e){"top"!==(e=O(e,"pos"))&&"bot"!==e||(t.barTop="top"===e)}),borderBox:T(q.MathFunctionType.BorderBox,"borderBoxPr",["e"],function(e,t){A(t,[["hideTop",function(t){e.hideTop=t}],["hideBot",function(t){e.hideBottom=t}],["hideLeft",function(t){e.hideLeft=t}],["hideRight",function(t){e.hideRight=t}],["strikeH",function(t){e.strikeHorizontal=t}],["strikeV",function(t){e.strikeVertical=t}],["strikeBLTR",function(t){e.strikeDiagonalUp=t}],["strikeTLBR",function(t){e.strikeDiagonalDown=t}]])}),box:T(q.MathFunctionType.Box,"boxPr",["e"],function(e,t){A(t,[["opEmu",function(t){e.operatorEmulator=t}],["noBreak",function(t){e.noBreak=t}],["diff",function(t){e.enableDifferential=t}],["aln",function(t){e.alignment=t}]]),void 0!==(t=zr(t,e.ownerMathEntity instanceof l?e.ownerMathEntity:void 0))&&(e.break=t)}),f:T(q.MathFunctionType.Fraction,"fPr",["num","den"],function(t,e){void 0!==(e=O(e,"type"))&&Xr.hasOwnProperty(e)&&(t.fractionType=Xr[e])}),func:T(q.MathFunctionType.Function,"funcPr",["fName","e"]),groupChr:T(q.MathFunctionType.GroupCharacter,"groupChrPr",["e"],function(e,t){Ir(t,"chr",function(t){e.groupCharacter=t});var r=O(t,"pos");"top"!==r&&"bot"!==r||(e.hasCharacterTop="top"===r),"top"!==(r=O(t,"vertJc"))&&"bot"!==r||(e.hasAlignTop="top"===r)}),limLow:T(q.MathFunctionType.Limit,"limLowPr",["e","lim"]),limUpp:T(q.MathFunctionType.Limit,"limUppPr",["e","lim"]),nary:T(q.MathFunctionType.NArray,"naryPr",["sub","sup","e"],function(e,t){Ir(t,"chr",function(t){e.nArrayCharacter=t});var r=O(t,"limLoc");"undOvr"!==r&&"subSup"!==r||(e.subSuperscriptLimit="subSup"===r),A(t,[["grow",function(t){e.hasGrow=t}],["subHide",function(t){e.hideLowerLimit=t}],["supHide",function(t){e.hideUpperLimit=t}]])}),phant:T(q.MathFunctionType.Phantom,"phantPr",["e"],function(e,t){A(t,[["show",function(t){e.show=t}],["zeroWid",function(t){e.zeroWidth=t}],["zeroAsc",function(t){e.zeroAscent=t}],["zeroDesc",function(t){e.zeroDescent=t}],["transp",function(t){e.transparent=t}]])}),rad:T(q.MathFunctionType.Radical,"radPr",["deg","e"],function(e,t){A(t,[["degHide",function(t){e.hideDegree=t}]])}),sPre:T(q.MathFunctionType.LeftSubSuperscript,"sPrePr",["sub","sup","e"]),sSub:T(q.MathFunctionType.SubSuperscript,"sSubPr",["e","sub"]),sSubSup:T(q.MathFunctionType.RightSubSuperscript,"sSubSupPr",["e","sub","sup"],function(e,t){A(t,[["alnScr",function(t){e.isSkipAlign=t}]])}),sSup:T(q.MathFunctionType.SubSuperscript,"sSupPr",["e","sup"])};function $r(t,e,r){void 0!==t.options&&void 0!==t.options.onDiagnostic&&(r={path:e.localName,message:r,localName:e.localName},t.options.onDiagnostic(r))}function Kr(t,e){e.functions.insert(e.functions.count,new br(t.localName,t))}function Qr(t,e,r){var n;void 0!==e&&(void 0!==(n=_(e,"ctrlPr"))&&(t.preservedControlProperties=n),void 0!==(n=void 0!==(n=O(n=_(e,"argPr"),"argSz"))&&/^-?\d+$/.test(n)&&Math.abs(Number(n))<=2?n:void 0)&&(t.argumentSize=Number(n)),Yr(t,e,r))}function Yr(x,t,T){jr(t).forEach(function(t){if(!(t.namespaceUri===F)||"argPr"!==t.localName&&"ctrlPr"!==t.localName){var e=t,t=x,r=T;if(e.namespaceUri!==F)Kr(e,t);else if("r"===e.localName){var n,i=e,o=r,a=(a=t).functions.add(q.MathFunctionType.RunElement),u=a.mathFormat,s=_(i,"rPr"),c=(A(s,[["lit",function(t){u.hasLiteral=t}],["nor",function(t){u.hasNormalText=t}],["aln",function(t){u.hasAlignment=t}]]),O(s,"scr"));void 0!==c&&Ur.hasOwnProperty(c)&&(u.font=Ur[c]),void 0!==(c=O(s,"sty"))&&Jr.hasOwnProperty(c)&&(u.style=Jr[c]),void 0!==(c=zr(s))&&(u.break=c),void 0!==o.adapter?o.adapter.parseMathRun(i,a):(n=new J,jr(i).forEach(function(t){var e;t.namespaceUri===F&&"rPr"===t.localName||(t.namespaceUri===B&&"rPr"===t.localName?n.runProperties=t:t.namespaceUri===F&&"t"===t.localName?(e=Br(t,N,"space"),n.parts.push(void 0===e?{kind:"text",value:Nr(t)}:{kind:"text",value:Nr(t),space:e})):n.parts.push({kind:"xml",element:t}))}),a.item=n)}else if("d"===e.localName||"eqArr"===e.localName){var p,s=e,c=t,h=r,o=Dr(s,"e");o.length<1?($r(h,s,"m:"+s.localName+" is missing a required m:e"),Kr(s,c)):(i="d"===s.localName,c=c.functions.add(i?q.MathFunctionType.Delimiter:q.MathFunctionType.EquationArray),s=_(s,i?"dPr":"eqArrPr"),tn(c,s,h),(i?function(e,t){Ir(t,"begChr",function(t){e.beginCharacter=t}),Ir(t,"sepChr",function(t){e.separator=t}),Ir(t,"endChr",function(t){e.endCharacter=t}),A(t,[["grow",function(t){e.isGrow=t}]]),"centered"!==(t=O(t,"shp"))&&"match"!==t||(e.delimiterShape="centered"===t?q.MathDelimiterShapeType.Centered:q.MathDelimiterShapeType.Match)}:function(e,t){var r=Gr(O(t,"baseJc"));void 0!==r&&(e.verticalAlignment=r),A(t,[["maxDist",function(t){e.expandEquationContainer=t}],["objDist",function(t){e.expandEquationContent=t}]]),Vr(t,function(t){e.rowSpacingRule=t},function(t){e.rowSpacing=t},"rSpRule","rSp")})(c,s),p=c.equations,o.forEach(function(t){return Qr(p.add(),t,h)}))}else if("m"===e.localName){var l,f,y,g,a=e,m=t,d=r,b=Dr(a,"mr");b.length<1?($r(d,a,"m:m is missing a required m:mr"),Kr(a,m)):(l=m.functions.add(q.MathFunctionType.Matrix),m=_(a,"mPr"),tn(l,m,d),f=l,void 0!==(g=Gr(O(y=m,"baseJc")))&&(f.verticalAlignment=g),A(y,[["plcHide",function(t){f.hidePlaceholder=t}]]),Vr(y,function(t){f.rowSpacingRule=t},function(t){f.rowSpacing=t},"rSpRule","rSp"),Vr(y,function(t){f.columnGapRule=t},function(t){f.columnGap=t},"cGpRule","cGp"),void 0!==(g=Hr(y,"cSp"))&&(f.columnSpacing=g),a=b.reduce(function(t,e){return Math.max(t,Dr(e,"e").length)},0),Wr(l,m,a),b.forEach(function(t){var r=l.rows.add();Dr(t,"e").forEach(function(t,e){return Qr(r.arguments.getItem(e),t,d)})}))}else{if(y=Zr.hasOwnProperty(e.localName)?Zr[e.localName]:void 0,g=void 0===y?[]:y.args.map(function(t){return _(e,t)}),void 0===y||g.some(function(t){return void 0===t}))void 0!==y&&$r(r,e,"m:"+e.localName+" is missing a required child"),Kr(e,t);else{m=t.functions.add(y.type),b=_(e,y.pr),tn(m,b,r),void 0!==y.apply&&y.apply(m,b);var v=e.localName,w=m,P=g,M=r;switch(w.type){case q.MathFunctionType.Fraction:S(w.numerator,0),S(w.denominator,1);break;case q.MathFunctionType.Function:S(w.functionName,0),S(w.equation,1);break;case q.MathFunctionType.Limit:w.limitType="limUpp"===v?q.MathLimitType.UpperLimit:q.MathLimitType.LowerLimit,S(w.equation,0),S(w.limit,1);break;case q.MathFunctionType.NArray:S(w.subscript,0),S(w.superscript,1),S(w.equation,2);break;case q.MathFunctionType.Radical:S(w.degree,0),S(w.equation,1);break;case q.MathFunctionType.LeftSubSuperscript:S(w.subscript,0),S(w.superscript,1),S(w.equation,2);break;case q.MathFunctionType.SubSuperscript:w.scriptType="sSub"===v?q.MathScriptType.Subscript:q.MathScriptType.Superscript,S(w.equation,0),S(w.script,1);break;case q.MathFunctionType.RightSubSuperscript:S(w.equation,0),S(w.subscript,1),S(w.superscript,2);break;default:S(w.equation,0)}}function S(t,e){Qr(t,P[e],M)}}}})}function tn(t,e,r){var e=_(e,"ctrlPr");void 0!==e&&(t.controlProperties=(e=e,t=t,void 0!==(r=r).adapter?r.adapter.parseControlProperties(e,t):new z(e)))}function en(t,e,r){Yr(t.maths.add(),e,r)}var rn={left:q.MathJustification.Left,right:q.MathJustification.Right,center:q.MathJustification.Center,centerGroup:q.MathJustification.CenterGroup};nn=function(t,e){return(nn=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])}))(t,e)};var nn,on,a=function(t,e){function r(){this.constructor=t}nn(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},an=(on=Error,a(un,on),un);function un(t,e,r){var n=this.constructor,t=on.call(this,t)||this;return t.name="MathmlValidationError",t.elementPath=e,t.constraintKind=r,Object.setPrototypeOf(t,n.prototype),t}sn=Error,a(cn,sn);var sn,k,a=cn;function cn(t){var e=this.constructor,t=sn.call(this,t=void 0===t?"Math equation is preserve-only and cannot be mutated":t)||this;return t.isPreserveOnly=!0,t.name="MathmlReadOnlyError",Object.setPrototypeOf(t,e.prototype),t}function C(t,e,r,n){return Er(F,e,t.prefix,{attributes:n=void 0===n?[]:n,children:r=void 0===r?[]:r})}function pn(t,e,r){return{namespaceUri:F,localName:e,prefix:t.prefix,value:r}}function hn(t,e,r){return C(t,e,[],[pn(t,"val",r)])}function E(t,e,r){throw new an(t,e,r)}function ln(t,e,r,n){t=t[e];return void 0!==t?t:E("Illegal "+n+" value "+String(e),r,"enum-value")}function fn(t,e){return Number.isInteger(t)&&0<=t?String(t):E("Expected an unsigned integer, got "+String(t),e,"value-range")}function R(r,n,i,t){t.forEach(function(t){var e;i.isExplicit(t[0])&&n.push((e=t[1],t=t[2],hn(r,e,t?"1":"0")))})}function j(t,e,r,n,i,o){r.isExplicit(n)&&e.push(hn(t,i,o()))}var yn=["bar","noBar","skw","lin"],gn=["center","top","bottom"],mn=["center","left","right"],dn=["centered","match"],bn=["double-struck","fraktur","monospace","roman","sans-serif","script"],vn=["i","bi","b","p"],wn=((k={})[q.MathFunctionType.Accent]="accPr",k[q.MathFunctionType.Bar]="barPr",k[q.MathFunctionType.BorderBox]="borderBoxPr",k[q.MathFunctionType.Box]="boxPr",k[q.MathFunctionType.Delimiter]="dPr",k[q.MathFunctionType.EquationArray]="eqArrPr",k[q.MathFunctionType.Fraction]="fPr",k[q.MathFunctionType.Function]="funcPr",k[q.MathFunctionType.GroupCharacter]="groupChrPr",k[q.MathFunctionType.Matrix]="mPr",k[q.MathFunctionType.NArray]="naryPr",k[q.MathFunctionType.Phantom]="phantPr",k[q.MathFunctionType.Radical]="radPr",k[q.MathFunctionType.LeftSubSuperscript]="sPrePr",k[q.MathFunctionType.RightSubSuperscript]="sSubSupPr",k);function Pn(t,e){return e.isExplicit(y.AlignAt)?((!Number.isInteger(e.alignAt)||e.alignAt<1||255<e.alignAt)&&E("alnAt must be an integer in 1..255, got "+String(e.alignAt),"brk.alnAt","value-range"),C(t,"brk",[],[pn(t,"alnAt",String(e.alignAt))])):C(t,"brk")}function Mn(t,e){var r,n=[];return R(t,n,e,[[y.HasLiteral,"lit",e.hasLiteral]]),e.isExplicit(y.HasNormalText)&&(e.hasNormalText||!((r=e).isExplicit(y.Script)||r.isExplicit(y.Style)))?R(t,n,e,[[y.HasNormalText,"nor",e.hasNormalText]]):(j(t,n,e,y.Script,"scr",function(){return ln(bn,e.font,"rPr.scr","ST_Script")}),j(t,n,e,y.Style,"sty",function(){return ln(vn,e.style,"rPr.sty","ST_Style")})),void 0!==e.break&&n.push(Pn(t,e.break)),R(t,n,e,[[y.HasAlignment,"aln",e.hasAlignment]]),n}function Sn(t,e){return 0<=t&&t<=4&&Number.isInteger(t)?String(t):E("Illegal spacing rule "+String(t),e,"enum-value")}function xn(t,e,r,n){j(t,e,r,y.RowSpacingRule,"rSpRule",function(){return Sn(r.rowSpacingRule,n+".rSpRule")})}function Tn(t,e,r){j(t,e,r,y.MatrixAlign,"baseJc",function(){return ln(gn,r.verticalAlignment,"mPr.baseJc","ST_YAlign")}),R(t,e,r,[[y.PlaceHoldHidden,"plcHide",r.hidePlaceholder]]),xn(t,e,r,"mPr"),j(t,e,r,y.ColumnGapRule,"cGpRule",function(){return Sn(r.columnGapRule,"mPr.cGpRule")}),j(t,e,r,y.RowSpacing,"rSp",function(){return fn(r.rowSpacing,"mPr.rSp")}),j(t,e,r,y.ColumnSpacing,"cSp",function(){return fn(r.columnSpacing,"mPr.cSp")}),j(t,e,r,y.ColumnGap,"cGp",function(){return fn(r.columnGap,"mPr.cGp")});t=function(r,t){var n,t=t.columns.toArray();if(t.some(function(t){return t.isExplicit(y.MatrixAlign)}))return n=[],t.forEach(function(t){var e=n[n.length-1];void 0!==e&&e.column.isExplicit(y.MatrixAlign)===t.isExplicit(y.MatrixAlign)&&(!t.isExplicit(y.MatrixAlign)||e.column.horizontalAlignment===t.horizontalAlignment)&&void 0!==e&&e.count<255?e.count++:n.push({column:t,count:1})}),C(r,"mcs",n.map(function(t){var e=[hn(r,"count",String(t.count))];return j(r,e,t.column,y.MatrixAlign,"mcJc",function(){return ln(mn,t.column.horizontalAlignment,"mcPr.mcJc","ST_XAlign")}),C(r,"mc",[C(r,"mcPr",e)])}))}(t,r);void 0!==t&&e.push(t)}function qn(t,e,r){var n,i,o,a,u,s;r.type===q.MathFunctionType.Delimiter?(j(t,e,n=r,y.BegChar,"begChr",function(){return n.beginCharacter}),j(t,e,n,y.SeparatorChar,"sepChr",function(){return n.separator}),j(t,e,n,y.EndChar,"endChr",function(){return n.endCharacter}),R(t,e,n,[[y.Grow,"grow",n.isGrow]]),j(t,e,n,y.Shape,"shp",function(){return ln(dn,n.delimiterShape,"dPr.shp","ST_Shp")})):r.type===q.MathFunctionType.EquationArray?(j(a=t,u=e,s=r,y.EqArrAlign,"baseJc",function(){return ln(gn,s.verticalAlignment,"eqArrPr.baseJc","ST_YAlign")}),R(a,u,s,[[y.MaxDist,"maxDist",s.expandEquationContainer],[y.ObjDist,"objDist",s.expandEquationContent]]),xn(a,u,s,"eqArrPr"),j(a,u,s,y.RowSpacing,"rSp",function(){return fn(s.rowSpacing,"eqArrPr.rSp")})):r.type===q.MathFunctionType.Fraction?j(t,e,i=r,y.FractionType,"type",function(){return ln(yn,i.fractionType,"fPr.type","ST_FType")}):r.type===q.MathFunctionType.Matrix?Tn(t,e,r):r.type===q.MathFunctionType.NArray?(j(t,e,o=r,y.NAryChar,"chr",function(){return o.nArrayCharacter}),j(t,e,o,y.SubSupLimit,"limLoc",function(){return o.subSuperscriptLimit?"subSup":"undOvr"}),R(t,e,o,[[y.HasGrow,"grow",o.hasGrow],[y.HideSubscript,"subHide",o.hideLowerLimit],[y.HideSuperscript,"supHide",o.hideUpperLimit]])):r.type===q.MathFunctionType.RightSubSuperscript&&R(t,e,r,[[y.SkipAlign,"alnScr",r.isSkipAlign]])}function Fn(t,e){var r,n,i,o,a,u=[];return r=t,n=u,(i=e).type===q.MathFunctionType.Accent?j(r,n,i,y.AccentChar,"chr",function(){return i.accentCharacter}):i.type===q.MathFunctionType.Bar?j(r,n,i,y.BarTop,"pos",function(){return i.barTop?"top":"bot"}):i.type===q.MathFunctionType.BorderBox?R(r,n,o=i,[[y.HideTop,"hideTop",o.hideTop],[y.HideBottom,"hideBot",o.hideBottom],[y.HideLeft,"hideLeft",o.hideLeft],[y.HideRight,"hideRight",o.hideRight],[y.StrikeHorizontal,"strikeH",o.strikeHorizontal],[y.StrikeVertical,"strikeV",o.strikeVertical],[y.StrikeBLTR,"strikeBLTR",o.strikeDiagonalUp],[y.StrikeTLBR,"strikeTLBR",o.strikeDiagonalDown]]):i.type===q.MathFunctionType.Box?(R(r,n,o=i,[[y.OperatorEmulator,"opEmu",o.operatorEmulator],[y.NoBreak,"noBreak",o.noBreak],[y.EnableDifferential,"diff",o.enableDifferential]]),void 0!==o.break&&n.push(Pn(r,o.break)),R(r,n,o,[[y.BoxAlign,"aln",o.alignment]])):i.type===q.MathFunctionType.GroupCharacter?(j(r,n,a=i,y.GroupChar,"chr",function(){return a.groupCharacter}),j(r,n,a,y.HasCharTop,"pos",function(){return a.hasCharacterTop?"top":"bot"}),j(r,n,a,y.HasAlignTop,"vertJc",function(){return a.hasAlignTop?"top":"bot"})):i.type===q.MathFunctionType.Phantom?R(r,n,i,[[y.Show,"show",i.show],[y.ZeroWidth,"zeroWid",i.zeroWidth],[y.ZeroAscent,"zeroAsc",i.zeroAscent],[y.ZeroDescent,"zeroDesc",i.zeroDescent],[y.Transparent,"transp",i.transparent]]):i.type===q.MathFunctionType.Radical&&R(r,n,i,[[y.HideDegree,"degHide",i.hideDegree]]),qn(t,u,e),u}var _n=["centerGroup","center","left","right"];function On(t){switch(t.type){case q.MathFunctionType.Accent:return{name:"acc",pr:"accPr",args:[["e",t.equation]]};case q.MathFunctionType.Bar:return{name:"bar",pr:"barPr",args:[["e",t.equation]]};case q.MathFunctionType.BorderBox:return{name:"borderBox",pr:"borderBoxPr",args:[["e",t.equation]]};case q.MathFunctionType.Box:return{name:"box",pr:"boxPr",args:[["e",t.equation]]};case q.MathFunctionType.GroupCharacter:return{name:"groupChr",pr:"groupChrPr",args:[["e",t.equation]]};case q.MathFunctionType.Phantom:return{name:"phant",pr:"phantPr",args:[["e",t.equation]]};case q.MathFunctionType.Radical:return{name:"rad",pr:"radPr",args:[["deg",t.degree],["e",t.equation]]};case q.MathFunctionType.Fraction:return{name:"f",pr:"fPr",args:[["num",t.numerator],["den",t.denominator]]};case q.MathFunctionType.Function:return{name:"func",pr:"funcPr",args:[["fName",t.functionName],["e",t.equation]]};default:var e,r=t;return r.type===q.MathFunctionType.Limit?{name:(e=r.limitType===q.MathLimitType.UpperLimit)?"limUpp":"limLow",pr:e?"limUppPr":"limLowPr",args:[["e",r.equation],["lim",r.limit]]}:r.type===q.MathFunctionType.NArray?{name:"nary",pr:"naryPr",args:[["sub",r.subscript],["sup",r.superscript],["e",r.equation]]}:r.type===q.MathFunctionType.SubSuperscript?{name:(e=r.scriptType===q.MathScriptType.Subscript)?"sSub":"sSup",pr:e?"sSubPr":"sSupPr",args:[["e",r.equation],[e?"sub":"sup",r.script]]}:r.type===q.MathFunctionType.RightSubSuperscript?{name:"sSubSup",pr:"sSubSupPr",args:[["e",r.equation],["sub",r.subscript],["sup",r.superscript]]}:r.type===q.MathFunctionType.LeftSubSuperscript?{name:"sPre",pr:"sPrePr",args:[["sub",r.subscript],["sup",r.superscript],["e",r.equation]]}:void 0}}function An(t,e,r){var n,i=Fn(t,e).concat((n=t,(e=e).hasControlProperties?void 0!==n.adapter?0<(i=n.adapter.serializeControlProperties(e.controlProperties)).length?[C(n,"ctrlPr",i)]:[]:void 0!==(n=e.controlProperties instanceof z?e.controlProperties:void 0)&&void 0!==n.preservedXml?[n.preservedXml]:[]:[]));return 0<i.length?[C(t,r,i)]:[]}function kn(t,e,r,n){var i=[];return r.isExplicit(y.ArgumentSize)&&i.push(C(t,"argPr",[hn(t,"argSz",String(r.argumentSize))])),Cn(t,r,n).forEach(function(t){return i.push(t)}),void 0!==r.preservedControlProperties&&i.push(r.preservedControlProperties),C(t,e,i)}function Cn(h,t,l){return t.functions.toArray().map(function(t,e){var r,n,i,o,a,u,s,c=h,p=l+"["+String(e)+"]";return t instanceof br?t.preservedXml:t.type===q.MathFunctionType.RunElement?(n=[],0<(o=Mn(r=c,(e=t).mathFormat)).length&&n.push(C(r,"rPr",o)),void 0!==r.adapter?r.adapter.serializeMathRun(e).forEach(function(t){return n.push(t)}):e.item instanceof J&&(void 0!==e.item.runProperties&&n.push(e.item.runProperties),e.item.parts.forEach(function(t){return n.push(function(t,e){if("xml"===e.kind)return e.element;var r=void 0!==e.space?e.space:function(t){return 0===t.length||/^\s|\s$/.test(t)}(e.value)?"preserve":void 0,r=void 0===r?[]:[{namespaceUri:N,localName:"space",prefix:"xml",value:r}];return C(t,"t",[Rr(e.value)],r)}(r,t))})),C(r,"r",n)):t.type===q.MathFunctionType.Delimiter?En(c,"d",t,"dPr",p):t.type===q.MathFunctionType.EquationArray?En(c,"eqArr",t,"eqArrPr",p):t.type===q.MathFunctionType.Matrix?(i=c,a=p,(o=t).rows.count<1&&E("m:m requires at least one m:mr",a,"required-child"),u=An(i,o,wn[q.MathFunctionType.Matrix]),o.rowItems.forEach(function(t,r){t=t.arguments.toArray().map(function(t,e){return kn(i,"e",t,a+".mr["+String(r)+"].e["+String(e)+"]")});u.push(C(i,"mr",t))}),C(i,"m",u)):void 0===(e=On(t))?E("Unsupported Math function type "+String(t.type),p,"enum-value"):(s=An(c,t,e.pr),e.args.forEach(function(t){return s.push(kn(c,t[0],t[1],p+"."+t[0]))}),C(c,e.name,s))})}function En(r,t,e,n,i){e.equations.count<1&&E("m:"+t+" requires at least one m:e",i,"required-child");var o=An(r,e,n);return e.equations.toArray().forEach(function(t,e){return o.push(kn(r,"e",t,i+".e["+String(e)+"]"))}),C(r,t,o)}var Rn=["left","right","center","centerGroup"],jn=["undOvr","subSup"],Ln=["before","after","repeat"],Bn=["--","-+","+-"];function Nn(t){return-1!==jn.indexOf(t)?t:void 0}var Dn=function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return{value:(t=t&&r>=t.length?void 0:t)&&t[r++],done:!t}}}},Hn=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),a=[];try{for(;(void 0===e||0<e--)&&!(n=o.next()).done;)a.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},In=[["leftMargin","lMargin"],["rightMargin","rMargin"],["defaultJustification","defJc"],["preSpacing","preSp"],["postSpacing","postSp"],["interSpacing","interSp"],["intraSpacing","intraSp"]];function Gn(t,e){return jr(t).find(function(t){return t.namespaceUri===F&&t.localName===e})}function zn(t,e){t=Gn(t,e);return t?Lr(t,"val"):void 0}function Un(t,e){t=zn(t,e);return void 0!==t&&/^\d+$/.test(t)?Number(t):void 0}function Jn(t,e){t=Gn(t,e);if(t)return void 0===(e=Lr(t,"val"))||function(t){if(void 0!==t)return"1"===(t=t.toLowerCase())||"true"===t||"on"===t||"0"!==t&&"false"!==t&&"off"!==t&&void 0}(e)}q.BasicRun=J,q.BasicRunFormat=z,q.ExplicitPropertyStore=t,q.MATH_EM=12,q.MATH_NAMESPACE=F,q.MATH_PREFIX_FALLBACKS=L,q.MathmlReadOnlyError=a,q.MathmlValidationError=an,q.OfficeMath=l,q.OfficeMathAccent=Pe,q.OfficeMathBar=xe,q.OfficeMathBorderBox=Fe,q.OfficeMathBox=Oe,q.OfficeMathBreak=$,q.OfficeMathBreakCollection=Y,q.OfficeMathCollection=ft,q.OfficeMathDelimiter=dt,q.OfficeMathEquationArray=Pt,q.OfficeMathFormat=nt,q.OfficeMathFraction=xt,q.OfficeMathFunction=Ft,q.OfficeMathFunctionBase=i,q.OfficeMathFunctionCollection=ge,q.OfficeMathGroupCharacter=Ce,q.OfficeMathLeftScript=It,q.OfficeMathLimit=At,q.OfficeMathMatrix=le,q.OfficeMathMatrixColumn=te,q.OfficeMathMatrixColumnArguments=Kt,q.OfficeMathMatrixColumnCollection=ue,q.OfficeMathMatrixRow=Wt,q.OfficeMathMatrixRowArguments=Jt,q.OfficeMathMatrixRowCollection=ie,q.OfficeMathNArray=Et,q.OfficeMathParagraph=gr,q.OfficeMathPhantom=je,q.OfficeMathRadical=Be,q.OfficeMathRightScript=Nt,q.OfficeMathRunElement=ct,q.OfficeMathScript=jt,q.OfficeMathUnknownElement=br,q.OwnedCollection=X,q.OwnerHolder=I,q.WML_TRANSITIONAL_NAMESPACE=B,q.XML_NAMESPACE=N,q.attrValue=Lr,q.attrValueNs=Br,q.checkRowSpacing=vt,q.childElements=jr,q.cloneOfficeMath=Or,q.cloneOfficeMathParagraph=function(t){var e,r,n=new gr(t.adapter);n.copyExplicitFrom(t);try{for(var i=Tr(t.maths),o=i.next();!o.done;o=i.next())Or(o.value,n)}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return n},q.createElement=Er,q.createMathFunction=fe,q.createText=Rr,q.getLatexSymbol=He,q.getSymbolLatex=Ge,q.mathSettingsToOpenXml=function(t,r){function n(t,e){u.push(Er(F,t,r,{attributes:[{namespaceUri:"",localName:"val",prefix:"",value:e}],children:[]}))}function e(t,e){void 0!==e&&n(t,e?"1":"0")}function i(t,e){if(void 0!==e){if(!Number.isInteger(e)||e<0)throw new an(t+" must be a non-negative integer, got "+String(e),"mathPr."+t,"value-range");n(t,String(e))}}void 0===r&&(r="m");var o,a,u=[];if(void 0!==t.wrapIndent&&void 0!==t.wrapRight)throw new an("wrapIndent and wrapRight are mutually exclusive","mathPr","child-order");void 0!==t.mathFont&&n("mathFont",t.mathFont),void 0!==t.breakOnBinaryOperators&&n("brkBin",t.breakOnBinaryOperators),void 0!==t.breakOnBinarySubtraction&&n("brkBinSub",t.breakOnBinarySubtraction),e("smallFrac",t.smallFraction),e("dispDef",t.displayMathDefaults);try{for(var s=Dn(In),c=s.next();!c.done;c=s.next()){var p=Hn(c.value,2),h=p[0],l=p[1],f=t[h];("string"==typeof f?n:i)(l,f)}}catch(t){o={error:t}}finally{try{c&&!c.done&&(a=s.return)&&a.call(s)}finally{if(o)throw o.error}}return i("wrapIndent",t.wrapIndent),e("wrapRight",t.wrapRight),void 0!==t.integralLimitLocation&&n("intLim",t.integralLimitLocation),void 0!==t.naryLimitLocation&&n("naryLim",t.naryLimitLocation),Er(F,"mathPr",r,{attributes:[],children:u})},q.mathToLatex=lr,q.officeMathEquals=kr,q.officeMathParagraphEquals=function(t,e){var r;return!(!t.explicitEquals(e)||t.maths.count!==e.maths.count)&&(r=e.maths.toArray(),t.maths.toArray().every(function(t,e){return kr(t,r[e])}))},q.parseLatexIntoMathParagraph=nr,q.parseLatexToMath=function(t,e){return e=new gr(e),nr(t,e),e},q.parseMathSettings=function(t){function e(t,e){void 0!==e&&(r[t]=e)}var r={},n=(e("mathFont",zn(t,"mathFont")),zn(t,"brkBin")),n=(e("breakOnBinaryOperators",void 0!==n&&(n=n,-1!==Ln.indexOf(n))?n:void 0),zn(t,"brkBinSub")),n=(e("breakOnBinarySubtraction",void 0!==n&&(n=n,-1!==Bn.indexOf(n))?n:void 0),e("smallFraction",Jn(t,"smallFrac")),e("displayMathDefaults",Jn(t,"dispDef")),e("leftMargin",Un(t,"lMargin")),e("rightMargin",Un(t,"rMargin")),zn(t,"defJc")),n=(e("defaultJustification",void 0!==n&&(n=n,-1!==Rn.indexOf(n))?n:void 0),e("preSpacing",Un(t,"preSp")),e("postSpacing",Un(t,"postSp")),e("interSpacing",Un(t,"interSp")),e("intraSpacing",Un(t,"intraSp")),e("wrapIndent",Un(t,"wrapIndent")),e("wrapRight",Jn(t,"wrapRight")),zn(t,"intLim")),n=(e("integralLimitLocation",void 0!==n?Nn(n):void 0),zn(t,"naryLim"));return e("naryLimitLocation",void 0!==n?Nn(n):void 0),r},q.parseOfficeMathParagraph=function(e,t,r){var n=new gr(t),i={adapter:t,options:r};return n.suspendMutations(function(){var t;!function(t){if(t.namespaceUri!==F)return;if("oMath"===t.localName)return 1;if("oMathPara"!==t.localName)return;var e=jr(t).slice(),r=e.filter(function(t){return t.namespaceUri!==F}),e=e.filter(function(t){return t.namespaceUri===F&&"oMath"!==t.localName&&"oMathParaPr"!==t.localName}),n=t.children.some(function(t){return"text"===t.kind&&""!==(t.value||"").trim()});return 0===r.length&&0===e.length&&!n&&0<Dr(t,"oMath").length}(e)?($r(i,e,"m:"+e.localName+" is not a well-formed m:oMath or m:oMathPara; preserved verbatim"),Kr(e,n.maths.add())):"oMath"===e.localName?en(n,e,i):(void 0!==(t=void 0===(t=_(_(e,"oMathParaPr"),"jc"))?void 0:Lr(t,"val"))&&Object.prototype.hasOwnProperty.call(rn,t)&&(n.justification=rn[t]),Dr(e,"oMath").forEach(function(t){return en(n,t,i)}))}),n},q.serializeOfficeMathParagraph=function(t,e){var r,n,i,o=t.adapter,a={prefix:void 0!==(n=e)&&void 0!==n.prefix&&0<n.prefix.length?n.prefix:(r=void 0!==n&&void 0!==n.reservedPrefixes?n.reservedPrefixes:[],0<(n=L.filter(function(t){return-1===r.indexOf(t)})).length?n[0]:"m999"),adapter:o};return void 0!==(o=1===(n=t).maths.count&&1===n.maths.getItem(0).functions.count&&(n=n.maths.getItem(0).functions.getItem(0))instanceof br&&n.preservedXml.namespaceUri===F&&("oMath"===n.localName||"oMathPara"===n.localName)?n.preservedXml:void 0)?o:(n=void 0!==e&&void 0!==e.display?e.display:t.hasExplicitJustification||1!==t.maths.count,(o=t.maths.toArray()).length<1&&E("An equation paragraph requires at least one m:oMath","oMathPara","required-child"),n?(i=[],t.hasExplicitJustification&&(e=ln(_n,t.justification,"oMathParaPr.jc","ST_Jc"),i.push(C(a,"oMathParaPr",[hn(a,"jc",e)]))),o.forEach(function(t,e){e="oMathPara.oMath["+String(e)+"]";i.push(C(a,"oMath",Cn(a,t,e)))}),C(a,"oMathPara",i)):(1<o.length&&E("A bare m:oMath holds exactly one equation","oMath","child-order"),C(a,"oMath",Cn(a,o[0],"oMath"))))},q.textContent=Nr,Object.defineProperty(q,"__esModule",{value:!0})});
11
11
  //# sourceMappingURL=ej2-office-common.umd.min.js.map