@synnaxlabs/pluto 0.53.1 → 0.54.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (286) hide show
  1. package/dist/aether-BBeeeA1z.cjs +10 -0
  2. package/dist/aether-Bl3vMZO3.js +716 -0
  3. package/dist/aether-DmSenWd4.js +704 -0
  4. package/dist/aether-VeYJQDcf.cjs +11 -0
  5. package/dist/button-DBdzH6Ky.cjs +1 -0
  6. package/dist/button-KtgabnXL.js +251 -0
  7. package/dist/button.cjs +1 -1
  8. package/dist/button.js +2 -4
  9. package/dist/chunk-DeC0fbbY.js +23 -0
  10. package/dist/chunk-FeXHwk1_.cjs +1 -0
  11. package/dist/color-Cspp5cKp.js +7904 -0
  12. package/dist/color-DCCr0Z1b.cjs +29 -0
  13. package/dist/color.cjs +1 -1
  14. package/dist/color.js +2 -4
  15. package/dist/css-Ce-x3HcK.cjs +1 -0
  16. package/dist/css-UEo6g0SR.js +69 -0
  17. package/dist/css.cjs +1 -1
  18. package/dist/css.js +2 -8
  19. package/dist/dialog-BTCrp5Yv.cjs +1 -0
  20. package/dist/dialog-ClQI4sHo.js +331 -0
  21. package/dist/dialog.cjs +1 -1
  22. package/dist/dialog.js +2 -4
  23. package/dist/divider-BYRH8-5K.js +13 -0
  24. package/dist/divider-CEyntx31.cjs +1 -0
  25. package/dist/ether-CZlE80D0.cjs +53 -0
  26. package/dist/ether-KMGPzrZR.js +6222 -0
  27. package/dist/ether.cjs +1 -1
  28. package/dist/ether.js +4 -104
  29. package/dist/event-Btz3eWg1.cjs +1 -0
  30. package/dist/event-Z4V8c501.js +4 -0
  31. package/dist/flex-Bgtu0DK6.js +62 -0
  32. package/dist/flex-D_GoD3ed.cjs +1 -0
  33. package/dist/flex.cjs +1 -1
  34. package/dist/flex.js +2 -4
  35. package/dist/haul-BdMc4rLJ.js +171 -0
  36. package/dist/haul-ZdSHqhp6.cjs +1 -0
  37. package/dist/header-CNx3pAkx.js +64 -0
  38. package/dist/header-lD0sRjCR.cjs +1 -0
  39. package/dist/header.cjs +1 -1
  40. package/dist/header.js +2 -4
  41. package/dist/input-CdL1OPDU.cjs +74 -0
  42. package/dist/input-h-4axMs7.js +47772 -0
  43. package/dist/input.cjs +1 -1
  44. package/dist/input.js +2 -4
  45. package/dist/list-DacuSBB3.cjs +4 -0
  46. package/dist/list-dZDsxTzd.js +1756 -0
  47. package/dist/list.cjs +1 -1
  48. package/dist/list.js +2 -4
  49. package/dist/menu-eeXfR_zT.js +170 -0
  50. package/dist/menu-yADx33I8.cjs +1 -0
  51. package/dist/menu.cjs +1 -1
  52. package/dist/menu.js +2 -4
  53. package/dist/pluto.cjs +52 -0
  54. package/dist/pluto.css +2 -1
  55. package/dist/pluto.js +36474 -0
  56. package/dist/select-B93mFqvf.js +1328 -0
  57. package/dist/select-gt7wGGO4.cjs +1 -0
  58. package/dist/src/access/policy/queries.d.ts +34 -34
  59. package/dist/src/access/policy/queries.d.ts.map +1 -1
  60. package/dist/src/access/queries.d.ts +1 -1
  61. package/dist/src/access/queries.d.ts.map +1 -1
  62. package/dist/src/access/role/queries.d.ts +2 -12
  63. package/dist/src/access/role/queries.d.ts.map +1 -1
  64. package/dist/src/arc/queries.d.ts +1167 -29
  65. package/dist/src/arc/queries.d.ts.map +1 -1
  66. package/dist/src/channel/LinePlot.d.ts +2 -2
  67. package/dist/src/channel/LinePlot.d.ts.map +1 -1
  68. package/dist/src/channel/queries.d.ts +108 -60
  69. package/dist/src/channel/queries.d.ts.map +1 -1
  70. package/dist/src/color/Provider.d.ts +8 -8
  71. package/dist/src/device/queries.d.ts +148 -363
  72. package/dist/src/device/queries.d.ts.map +1 -1
  73. package/dist/src/flux/result.d.ts +5 -5
  74. package/dist/src/flux/result.d.ts.map +1 -1
  75. package/dist/src/flux/update.d.ts +1 -1
  76. package/dist/src/flux/update.d.ts.map +1 -1
  77. package/dist/src/icon/Icon.d.ts.map +1 -1
  78. package/dist/src/icon/registry.d.ts +1 -0
  79. package/dist/src/icon/registry.d.ts.map +1 -1
  80. package/dist/src/label/queries.d.ts +21 -21
  81. package/dist/src/label/queries.d.ts.map +1 -1
  82. package/dist/src/lineplot/aether/XAxis.d.ts +28 -28
  83. package/dist/src/lineplot/aether/YAxis.d.ts +28 -28
  84. package/dist/src/lineplot/aether/axis.d.ts +14 -14
  85. package/dist/src/lineplot/queries.d.ts +2 -2
  86. package/dist/src/lineplot/queries.d.ts.map +1 -1
  87. package/dist/src/lineplot/range/aether/provider.d.ts +126 -102
  88. package/dist/src/lineplot/range/aether/provider.d.ts.map +1 -1
  89. package/dist/src/lineplot/tooltip/aether/tooltip.d.ts +56 -56
  90. package/dist/src/log/aether/Log.d.ts +21 -21
  91. package/dist/src/log/queries.d.ts +2 -2
  92. package/dist/src/log/queries.d.ts.map +1 -1
  93. package/dist/src/memo/index.d.ts +0 -1
  94. package/dist/src/memo/index.d.ts.map +1 -1
  95. package/dist/src/memo/useMemoCompare.d.ts +0 -1
  96. package/dist/src/memo/useMemoCompare.d.ts.map +1 -1
  97. package/dist/src/rack/queries.d.ts.map +1 -1
  98. package/dist/src/ranger/aether/queries.d.ts.map +1 -1
  99. package/dist/src/ranger/queries.d.ts +19 -19
  100. package/dist/src/ranger/queries.d.ts.map +1 -1
  101. package/dist/src/schematic/queries.d.ts +2 -2
  102. package/dist/src/schematic/queries.d.ts.map +1 -1
  103. package/dist/src/schematic/symbol/Forms.d.ts.map +1 -1
  104. package/dist/src/schematic/symbol/Primitives.d.ts +2 -1
  105. package/dist/src/schematic/symbol/Primitives.d.ts.map +1 -1
  106. package/dist/src/schematic/symbol/SelectOrientation.d.ts.map +1 -1
  107. package/dist/src/schematic/symbol/Symbols.d.ts +35 -34
  108. package/dist/src/schematic/symbol/Symbols.d.ts.map +1 -1
  109. package/dist/src/schematic/symbol/queries.d.ts +96 -50
  110. package/dist/src/schematic/symbol/queries.d.ts.map +1 -1
  111. package/dist/src/schematic/symbol/registry.d.ts.map +1 -1
  112. package/dist/src/select/Dialog.d.ts +2 -1
  113. package/dist/src/select/Dialog.d.ts.map +1 -1
  114. package/dist/src/status/Select.d.ts.map +1 -1
  115. package/dist/src/status/SelectMulipleVariants.spec.d.ts +2 -0
  116. package/dist/src/status/SelectMulipleVariants.spec.d.ts.map +1 -0
  117. package/dist/src/status/SelectMultipleVariants.d.ts +9 -0
  118. package/dist/src/status/SelectMultipleVariants.d.ts.map +1 -0
  119. package/dist/src/status/SelectVariant.d.ts +2 -2
  120. package/dist/src/status/SelectVariant.d.ts.map +1 -1
  121. package/dist/src/status/SelectVariant.spec.d.ts +2 -0
  122. package/dist/src/status/SelectVariant.spec.d.ts.map +1 -0
  123. package/dist/src/status/aether/aggregator.d.ts +16 -2
  124. package/dist/src/status/aether/aggregator.d.ts.map +1 -1
  125. package/dist/src/status/aether/errorHandler.d.ts +2 -1
  126. package/dist/src/status/aether/errorHandler.d.ts.map +1 -1
  127. package/dist/src/status/base/Aggregator.d.ts +3 -2
  128. package/dist/src/status/base/Aggregator.d.ts.map +1 -1
  129. package/dist/src/status/external.d.ts +1 -0
  130. package/dist/src/status/external.d.ts.map +1 -1
  131. package/dist/src/status/queries.d.ts +25 -9
  132. package/dist/src/status/queries.d.ts.map +1 -1
  133. package/dist/src/status/variantData.d.ts +4 -0
  134. package/dist/src/status/variantData.d.ts.map +1 -0
  135. package/dist/src/table/cells/Cells.d.ts +17 -17
  136. package/dist/src/table/queries.d.ts +2 -2
  137. package/dist/src/table/queries.d.ts.map +1 -1
  138. package/dist/src/task/queries.d.ts +3 -3
  139. package/dist/src/task/queries.d.ts.map +1 -1
  140. package/dist/src/telem/aether/noop.d.ts.map +1 -1
  141. package/dist/src/telem/aether/static.d.ts +10 -10
  142. package/dist/src/telem/aether/telem.d.ts +1 -1
  143. package/dist/src/telem/aether/telem.d.ts.map +1 -1
  144. package/dist/src/telem/aether/transformers.d.ts +15 -15
  145. package/dist/src/telem/aether/transformers.d.ts.map +1 -1
  146. package/dist/src/telem/client/cache/cache.d.ts +1 -1
  147. package/dist/src/telem/client/cache/cache.d.ts.map +1 -1
  148. package/dist/src/telem/client/client.d.ts +4 -4
  149. package/dist/src/telem/client/client.d.ts.map +1 -1
  150. package/dist/src/telem/client/reader.d.ts +1 -1
  151. package/dist/src/telem/client/reader.d.ts.map +1 -1
  152. package/dist/src/telem/client/streamer.d.ts +1 -1
  153. package/dist/src/telem/client/streamer.d.ts.map +1 -1
  154. package/dist/src/telem/control/Controller.d.ts +1 -1
  155. package/dist/src/telem/control/Controller.d.ts.map +1 -1
  156. package/dist/src/telem/control/aether/chip.d.ts +16 -2
  157. package/dist/src/telem/control/aether/chip.d.ts.map +1 -1
  158. package/dist/src/telem/control/aether/controller.d.ts +16 -16
  159. package/dist/src/telem/control/aether/controller.d.ts.map +1 -1
  160. package/dist/src/telem/control/aether/indicator.d.ts +51 -37
  161. package/dist/src/telem/control/aether/indicator.d.ts.map +1 -1
  162. package/dist/src/telem/control/aether/legend.d.ts +18 -16
  163. package/dist/src/telem/control/aether/legend.d.ts.map +1 -1
  164. package/dist/src/telem/control/aether/state.d.ts +9 -8
  165. package/dist/src/telem/control/aether/state.d.ts.map +1 -1
  166. package/dist/src/theming/aether/provider.d.ts +990 -990
  167. package/dist/src/theming/base/theme.d.ts +330 -330
  168. package/dist/src/user/queries.d.ts +2 -2
  169. package/dist/src/view/queries.d.ts +2 -2
  170. package/dist/src/vis/axis/axis.d.ts +14 -14
  171. package/dist/src/vis/gauge/aether/gauge.d.ts +21 -21
  172. package/dist/src/vis/gauge/use.d.ts +7 -7
  173. package/dist/src/vis/line/aether/line.d.ts +7 -7
  174. package/dist/src/vis/measure/aether/measure.d.ts +56 -56
  175. package/dist/src/vis/rule/aether/aether.d.ts +14 -14
  176. package/dist/src/vis/value/aether/value.d.ts +42 -42
  177. package/dist/src/vis/value/redline.d.ts +5 -5
  178. package/dist/src/vis/value/redline.d.ts.map +1 -1
  179. package/dist/src/vis/value/use.d.ts +14 -14
  180. package/dist/src/workspace/queries.d.ts +6 -4
  181. package/dist/src/workspace/queries.d.ts.map +1 -1
  182. package/dist/tabs-CB7d2_0h.cjs +1 -0
  183. package/dist/tabs-DEXXNOZA.js +253 -0
  184. package/dist/tabs.cjs +1 -1
  185. package/dist/tabs.js +2 -4
  186. package/dist/text-Dd6wYgQM.js +142 -0
  187. package/dist/text-n3Fetdk6.cjs +1 -0
  188. package/dist/text.cjs +1 -1
  189. package/dist/text.js +2 -5
  190. package/dist/theming-Blgv4Cvi.js +591 -0
  191. package/dist/theming-KFfFjsRJ.cjs +1 -0
  192. package/dist/theming.cjs +1 -1
  193. package/dist/theming.js +2 -5
  194. package/dist/tree-B4jJAzS1.js +294 -0
  195. package/dist/tree-CsgSEpgy.cjs +1 -0
  196. package/dist/tree.cjs +1 -1
  197. package/dist/tree.js +2 -4
  198. package/dist/triggers-AqBSAR_T.cjs +1 -0
  199. package/dist/triggers-DDlalLoO.js +4748 -0
  200. package/dist/triggers.cjs +1 -1
  201. package/dist/triggers.js +2 -4
  202. package/dist/types-BGbd8pRh.js +73 -0
  203. package/dist/types-ByXvRm2h.cjs +1 -0
  204. package/dist/video-Bnr-2W9p.cjs +1 -0
  205. package/dist/video-ByMlaeKI.js +15 -0
  206. package/dist/video.cjs +1 -1
  207. package/dist/video.js +2 -4
  208. package/package.json +27 -28
  209. package/dist/Animated-B_N04fe6.cjs +0 -1
  210. package/dist/Animated-BsbNkFLg.cjs +0 -1
  211. package/dist/Animated-CLo1CLgn.js +0 -29
  212. package/dist/Animated-CO--9HPM.js +0 -354
  213. package/dist/Box-Bi280MYh.js +0 -96
  214. package/dist/Box-CNUz5BsV.cjs +0 -1
  215. package/dist/Copy-BgRUUzWz.cjs +0 -1
  216. package/dist/Copy-COWBkO_v.js +0 -337
  217. package/dist/Dialog-Bj7FiHJD.js +0 -59
  218. package/dist/Dialog-DBm6Fap1.cjs +0 -1
  219. package/dist/Editable-C17ILP50.js +0 -202
  220. package/dist/Editable-HUPqTaui.cjs +0 -1
  221. package/dist/Haul-CnZK3e-n.js +0 -132
  222. package/dist/Haul-DlwI4b25.cjs +0 -1
  223. package/dist/Items-CXBBG9Ip.cjs +0 -4
  224. package/dist/Items-DQba1BFQ.js +0 -842
  225. package/dist/Menu-BZ6ZGIv3.cjs +0 -1
  226. package/dist/Menu-CniMpPmC.js +0 -139
  227. package/dist/Provider-cSwm-2e_.cjs +0 -1
  228. package/dist/Provider-jFWpR0CX.js +0 -520
  229. package/dist/Tags-CxzMdPpm.cjs +0 -1
  230. package/dist/Tags-DvfGhiWv.js +0 -925
  231. package/dist/Text-2MISZsc5.js +0 -1712
  232. package/dist/Text-XHBXXDRS.cjs +0 -1
  233. package/dist/Video-Bew5_j16.js +0 -10
  234. package/dist/Video-BryrVNlH.cjs +0 -1
  235. package/dist/css-CloSmhZB.cjs +0 -1
  236. package/dist/css-D90kZTM8.js +0 -63
  237. package/dist/dimensions-CdFEW3oU.cjs +0 -1
  238. package/dist/dimensions-DbMN4145.js +0 -19
  239. package/dist/eraser-BShvqlBE.js +0 -958
  240. package/dist/eraser-rFMFKqsg.cjs +0 -11
  241. package/dist/event-BxvV3arE.cjs +0 -1
  242. package/dist/event-nNH_pXSr.js +0 -36
  243. package/dist/external-4jf1Bv96.cjs +0 -1
  244. package/dist/external-B2YeNEwd.cjs +0 -1
  245. package/dist/external-B9PnwQOL.js +0 -29
  246. package/dist/external-BBbkXXN0.js +0 -47
  247. package/dist/external-BByOkVID.cjs +0 -1
  248. package/dist/external-BrEnYrZV.js +0 -32
  249. package/dist/external-BwbypKCk.cjs +0 -1
  250. package/dist/external-C65vBow6.cjs +0 -1
  251. package/dist/external-CCcIJ20u.cjs +0 -1
  252. package/dist/external-CF4uh-dm.js +0 -51423
  253. package/dist/external-Cn6EfkLd.cjs +0 -1
  254. package/dist/external-CovFw1fv.cjs +0 -1
  255. package/dist/external-D2Zb9O5J.js +0 -93
  256. package/dist/external-D6aLGjMg.js +0 -8969
  257. package/dist/external-DDvmnE2k.js +0 -341
  258. package/dist/external-DTi9a-iK.cjs +0 -1
  259. package/dist/external-DYP1_xpd.js +0 -80
  260. package/dist/external-DxsuBuKe.js +0 -392
  261. package/dist/external-DysGdnTb.js +0 -130
  262. package/dist/external-N2L8ffzi.js +0 -71
  263. package/dist/external-UzXlHlr9.js +0 -24
  264. package/dist/external-_Ht_yCRf.cjs +0 -1
  265. package/dist/external-igNfmRSB.cjs +0 -28
  266. package/dist/external-uUEGzmui.cjs +0 -84
  267. package/dist/fontString-76R2eWDd.js +0 -29
  268. package/dist/fontString-BNnhiwug.cjs +0 -1
  269. package/dist/hooks-Co6IVYNw.cjs +0 -1
  270. package/dist/hooks-QNj6PdUo.js +0 -73
  271. package/dist/index.cjs +0 -60
  272. package/dist/index.js +0 -36908
  273. package/dist/jsx-runtime-nZSsnGb7.cjs +0 -6
  274. package/dist/jsx-runtime-tc70JA_2.js +0 -264
  275. package/dist/provider-Bt-E2O6g.js +0 -810
  276. package/dist/provider-DQkVj3tA.cjs +0 -10
  277. package/dist/src/memo/proxyMemo.d.ts +0 -3
  278. package/dist/src/memo/proxyMemo.d.ts.map +0 -1
  279. package/dist/types-CGRCBVD4.js +0 -82
  280. package/dist/types-DI2vtOGs.cjs +0 -1
  281. package/dist/units-Bu36uC6z.cjs +0 -1
  282. package/dist/units-DMip-eZH.js +0 -14
  283. package/dist/useStaticData-BTwIe0Il.cjs +0 -1
  284. package/dist/useStaticData-p8sk2VCJ.js +0 -1051
  285. package/dist/value-BkUH03tl.cjs +0 -53
  286. package/dist/value-D0vfKEY3.js +0 -6821
@@ -0,0 +1,74 @@
1
+ const e=require(`./chunk-FeXHwk1_.cjs`),t=require(`./triggers-AqBSAR_T.cjs`),n=require(`./theming-KFfFjsRJ.cjs`),r=require(`./text-n3Fetdk6.cjs`),i=require(`./css-Ce-x3HcK.cjs`),a=require(`./flex-D_GoD3ed.cjs`),o=require(`./select-gt7wGGO4.cjs`),s=require(`./button-DBdzH6Ky.cjs`),c=require(`./event-Btz3eWg1.cjs`),l=require(`./dialog-BTCrp5Yv.cjs`),u=require(`./list-DacuSBB3.cjs`),d=require(`./divider-CEyntx31.cjs`),f=require(`./aether-VeYJQDcf.cjs`);let p=require(`@synnaxlabs/x`),m=require(`react`),h=require(`react/jsx-runtime`),g=require(`@synnaxlabs/media`);var _=(e,t,n)=>e===`preview`&&n===!0?`var(--pluto-primary-z)`:t,v=({ref:e,className:t,value:n,ghost:r,disabled:a,onChange:o,inputType:c,size:l,variant:u=`text`,style:d,color:f,borderColor:p,borderWidth:m,bordered:g,rounded:v,background:y,textColor:b,onClick:x,...S})=>(0,h.jsx)(s.i,{el:`label`,variant:u,className:i.n(i.n.BE(`input`,c),t),ghost:r,disabled:a,size:l,preventClick:!0,style:d,color:f,borderColor:p,borderWidth:m,bordered:g,rounded:v,background:y,textColor:_(u,b,n),onClick:x,children:u===`preview`?n?`True`:`False`:(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`input`,{className:i.n.BE(`input`,c,`input`),type:`checkbox`,ref:e,checked:n,onChange:e=>{e.stopPropagation(),o?.(e.target.checked)},value:``,disabled:a,onClick:x,...S}),(0,h.jsx)(`span`,{className:i.n.BE(`input`,c,`indicator`),onClick:x})]})}),y=e=>(0,h.jsx)(v,{...e,inputType:`checkbox`}),b=`cursor-style`,x=(e,t=document.head)=>{S();let n=document.createElement(`style`);n.innerHTML=`*{cursor: ${e} !important;}`,n.id=b,t.appendChild(n)},S=()=>{document.getElementById(b)?.remove()},C=(e,t,n,r,i)=>{let{x:a,y:o}=r??p.xy.construct(p.box.dims(i));if(p.box.width(t)>a&&p.box.width(t)>p.box.height(t)){let r=p.box.signedWidth(t)<0?a:-a;e+=(p.box.signedWidth(t)+r)*n.x,x(`ew-resize`)}if(p.box.height(t)>o&&p.box.height(t)>p.box.width(t)){let r=p.box.signedHeight(t)<0?o:-o;e+=(p.box.signedHeight(t)+r)*n.y,x(`ns-resize`)}return e},w=({direction:e,className:r,dragScale:a={x:10,y:1},dragThreshold:o=15,dragDirection:l,onChange:u,value:d,resetValue:f,onDragEnd:g,..._})=>{let v=(0,m.useRef)({dragging:!1,curr:d,prev:d}),y=(0,m.useRef)(null);v.current.dragging||(v.current.prev=d);let b=(0,m.useMemo)(()=>{let e=p.xy.construct(a);return l===`x`?p.xy.construct(e.x,0):l===`y`?p.xy.construct(0,e.y):e},[a,l]),x=(0,m.useMemo)(()=>o==null?null:p.xy.construct(o),[o]);n.y({ref:y,onMove:(0,m.useCallback)(e=>{if(y.current==null)return;let t=v.current.prev;v.current.dragging=!0,t=C(t,e,b,x,p.box.construct(y.current)),v.current.curr=t,u(t)},[u,b,x]),onEnd:(0,m.useCallback)((e,t)=>{if(y.current==null)return;let n=v.current.prev;n=C(n,e,b,x,p.box.construct(y.current)),v.current.prev=n,v.current.dragging=!1,S(),g?.(n),_.onBlur?.()},[_.onBlur,g,b,x])});let w=(0,m.useCallback)(()=>{u(f??v.current.prev)},[u,f]);return(0,h.jsx)(s.i,{ref:y,variant:`outlined`,className:i.n(i.n.BE(`input`,`drag-btn`),e!=null&&i.n.BEM(`input`,`drag-btn`,`direction`,e),r),tabIndex:-1,onDoubleClick:w,onClick:c.t,contrast:0,textColor:9,..._,children:(0,h.jsx)(t.T,{})})},T={x:Number(p.TimeStamp.HOUR.valueOf()),y:Number(p.TimeStamp.days(.75).valueOf())},E=({value:e,onChange:t})=>{let n=new p.TimeStamp(e,`UTC`);return(0,m.useLayoutEffect)(()=>{let e=n.sub(p.TimeStamp.utcOffset);if(e.remainder(p.TimeStamp.DAY).isZero)return;let r=e.sub(e.remainder(p.TimeStamp.DAY));t(Number(new p.TimeStamp(r,`local`).valueOf()))},[e]),{value:n.toString(`ISODate`,`local`),onChange:e=>{let n;if(typeof e==`number`)n=new p.TimeStamp(e,`UTC`);else if(e.length===0)return;else n=new p.TimeStamp(e,`local`);t(Number(n.valueOf()))}}},D=({ref:e,onChange:t,value:n,className:r,showDragHandle:a=!0,children:s,...c})=>{let{value:l,onChange:u}=E({value:n,onChange:t});return(0,h.jsxs)(o.v,{ref:e,value:l,className:i.n(i.n.B(`input-date`),r),onChange:u,type:`date`,...c,children:[a&&(0,h.jsx)(w,{value:n,onChange:u,dragScale:T}),s]})},O={methods:{one:{},two:{},three:{},four:{}},model:{one:{},two:{},three:{}},compute:{},hooks:[]},k=e=>Object.prototype.toString.call(e)===`[object Array]`,A={compute:function(e){let{world:t}=this,n=t.compute;return typeof e==`string`&&n.hasOwnProperty(e)?n[e](this):k(e)?e.forEach(r=>{t.compute.hasOwnProperty(r)?n[r](this):console.warn(`no compute:`,e)}):typeof e==`function`?e(this):console.warn(`no compute:`,e),this}},j={forEach:function(e){return this.fullPointer.forEach((t,n)=>{e(this.update([t]),n)}),this},map:function(e,t){let n=this.fullPointer.map((t,n)=>{let r=e(this.update([t]),n);return r===void 0?this.none():r});if(n.length===0)return t||this.update([]);if(n[0]!==void 0&&(typeof n[0]==`string`||typeof n[0]==`object`&&(n[0]===null||!n[0].isView)))return n;let r=[];return n.forEach(e=>{r=r.concat(e.fullPointer)}),this.toView(r)},filter:function(e){let t=this.fullPointer;return t=t.filter((t,n)=>e(this.update([t]),n)),this.update(t)},find:function(e){let t=this.fullPointer.find((t,n)=>e(this.update([t]),n));return this.update([t])},some:function(e){return this.fullPointer.some((t,n)=>e(this.update([t]),n))},random:function(e=1){let t=this.fullPointer,n=Math.floor(Math.random()*t.length);return n+e>this.length&&(n=this.length-e,n=n<0?0:n),t=t.slice(n,n+e),this.update(t)}},M={termList:function(){return this.methods.one.termList(this.docs)},terms:function(e){let t=this.match(`.`);return typeof e==`number`?t.eq(e):t},groups:function(e){if(e||e===0)return this.update(this._groups[e]||[]);let t={};return Object.keys(this._groups).forEach(e=>{t[e]=this.update(this._groups[e])}),t},eq:function(e){let t=this.pointer;return t||=this.docs.map((e,t)=>[t]),t[e]?this.update([t[e]]):this.none()},first:function(){return this.eq(0)},last:function(){let e=this.fullPointer.length-1;return this.eq(e)},firstTerms:function(){return this.match(`^.`)},lastTerms:function(){return this.match(`.$`)},slice:function(e,t){let n=this.pointer||this.docs.map((e,t)=>[t]);return n=n.slice(e,t),this.update(n)},all:function(){return this.update().toView()},fullSentences:function(){let e=this.fullPointer.map(e=>[e[0]]);return this.update(e).toView()},none:function(){return this.update([])},isDoc:function(e){if(!e||!e.isView)return!1;let t=this.fullPointer,n=e.fullPointer;return!t.length===n.length?!1:t.every((e,t)=>n[t]?e[0]===n[t][0]&&e[1]===n[t][1]&&e[2]===n[t][2]:!1)},wordCount:function(){return this.docs.reduce((e,t)=>(e+=t.filter(e=>e.text!==``).length,e),0)},isFull:function(){let e=this.pointer;if(!e)return!0;if(e.length===0||e[0][0]!==0)return!1;let t=0,n=0;return this.document.forEach(e=>t+=e.length),this.docs.forEach(e=>n+=e.length),t===n},getNth:function(e){return typeof e==`number`?this.eq(e):typeof e==`string`?this.if(e):this}};M.group=M.groups,M.fullSentence=M.fullSentences,M.sentence=M.fullSentences,M.lastTerm=M.lastTerms,M.firstTerm=M.firstTerms;var N=Object.assign({},M,A,j);N.get=N.eq;var ee=class e{constructor(e,t,n={}){[[`document`,e],[`world`,O],[`_groups`,n],[`_cache`,null],[`viewType`,`View`]].forEach(e=>{Object.defineProperty(this,e[0],{value:e[1],writable:!0})}),this.ptrs=t}get docs(){let e=this.document;return this.ptrs&&(e=O.methods.one.getDoc(this.ptrs,this.document)),e}get pointer(){return this.ptrs}get methods(){return this.world.methods}get model(){return this.world.model}get hooks(){return this.world.hooks}get isView(){return!0}get found(){return this.docs.length>0}get length(){return this.docs.length}get fullPointer(){let{docs:e,ptrs:t,document:n}=this;return(t||e.map((e,t)=>[t])).map(e=>{let[t,r,i,a,o]=e;return r||=0,i||=(n[t]||[]).length,n[t]&&n[t][r]&&(a||=n[t][r].id,n[t][i-1]&&(o||=n[t][i-1].id)),[t,r,i,a,o]})}update(t){let n=new e(this.document,t);if(this._cache&&t&&t.length>0){let e=[];t.forEach((t,n)=>{let[r,i,a]=t;(t.length===1||i===0&&this.document[r].length===a)&&(e[n]=this._cache[r])}),e.length>0&&(n._cache=e)}return n.world=this.world,n}toView(t){return new e(this.document,t||this.pointer)}fromText(t){let{methods:n}=this,r=new e(n.one.tokenize.fromString(t,this.world));return r.world=this.world,r.compute([`normal`,`freeze`,`lexicon`]),this.world.compute.preTagger&&r.compute(`preTagger`),r.compute(`unfreeze`),r}clone(){let e=this.document.slice(0);e=e.map(e=>e.map(e=>(e=Object.assign({},e),e.tags=new Set(e.tags),e)));let t=this.update(this.pointer);return t.document=e,t._cache=this._cache,t}};Object.assign(ee.prototype,N);var P=`14.15.0`,te=function(e){return e&&typeof e==`object`&&!Array.isArray(e)},ne=function(e){return Object.prototype.toString.call(e)===`[object Array]`};function re(e,t){if(te(t))for(let n in t)te(t[n])?(e[n]||Object.assign(e,{[n]:{}}),re(e[n],t[n])):Object.assign(e,{[n]:t[n]});return e}function F(e,t){for(let n in t)e[n]=e[n]||{},Object.assign(e[n],t[n]);return e}var ie=function(e,t){let n=e.two.models||{};Object.keys(t).forEach(e=>{t[e].pastTense&&(n.toPast&&(n.toPast.ex[e]=t[e].pastTense),n.fromPast&&(n.fromPast.ex[t[e].pastTense]=e)),t[e].presentTense&&(n.toPresent&&(n.toPresent.ex[e]=t[e].presentTense),n.fromPresent&&(n.fromPresent.ex[t[e].presentTense]=e)),t[e].gerund&&(n.toGerund&&(n.toGerund.ex[e]=t[e].gerund),n.fromGerund&&(n.fromGerund.ex[t[e].gerund]=e)),t[e].comparative&&(n.toComparative&&(n.toComparative.ex[e]=t[e].comparative),n.fromComparative&&(n.fromComparative.ex[t[e].comparative]=e)),t[e].superlative&&(n.toSuperlative&&(n.toSuperlative.ex[e]=t[e].superlative),n.fromSuperlative&&(n.fromSuperlative.ex[t[e].superlative]=e))})},I=function(e,t,n,r){if(ne(e)){e.forEach(e=>I(e,t,n,r));return}let{methods:i,model:a,compute:o,hooks:s}=t;e.methods&&F(i,e.methods),e.model&&re(a,e.model),e.irregulars&&ie(a,e.irregulars),e.compute&&Object.assign(o,e.compute),s&&(t.hooks=s.concat(e.hooks||[])),e.api&&e.api(n),e.lib&&Object.keys(e.lib).forEach(t=>r[t]=e.lib[t]),e.tags&&r.addTags(e.tags),e.words&&r.addWords(e.words),e.frozen&&r.addWords(e.frozen,!0),e.mutate&&e.mutate(t,r)},ae=function(e){let t=typeof process>`u`||!process.env?self.env||{}:process.env;return t.DEBUG_TAGS=e===`tagger`||e===!0?!0:``,t.DEBUG_MATCH=e===`match`||e===!0?!0:``,t.DEBUG_CHUNKS=e===`chunker`||e===!0?!0:``,this},oe=e=>Object.prototype.toString.call(e)===`[object Object]`,L=function(e){return Object.prototype.toString.call(e)===`[object Array]`},se=function(e){return e.map(e=>e.terms.map(e=>(L(e.tags)&&(e.tags=new Set(e.tags)),e)))},ce=function(e){return e.map(e=>e.map(e=>({text:e,normal:e,pre:``,post:` `,tags:new Set})))},le=function(e,t,n){let{methods:r}=n,i=new t([]);return i.world=n,typeof e==`number`&&(e=String(e)),e?typeof e==`string`?new t(r.one.tokenize.fromString(e,n)):oe(e)&&e.isView?new t(e.document,e.ptrs):L(e)?L(e[0])?new t(ce(e)):new t(se(e)):i:i},ue=Object.assign({},O),R=function(e,t){t&&R.addWords(t);let n=le(e,ee,ue);return e&&n.compute(ue.hooks),n};Object.defineProperty(R,`_world`,{value:ue,writable:!0}),R.tokenize=function(e,t){let{compute:n}=this._world;t&&R.addWords(t);let r=le(e,ee,ue);return n.contractions&&r.compute([`alias`,`normal`,`machine`,`contractions`]),r},R.plugin=function(e){return I(e,this._world,ee,this),this},R.extend=R.plugin,R.world=function(){return this._world},R.model=function(){return this._world.model},R.methods=function(){return this._world.methods},R.hooks=function(){return this._world.hooks},R.verbose=ae,R.version=P;var de={one:{cacheDoc:function(e){return e.map(e=>{let t=new Set;return e.forEach(e=>{e.normal!==``&&t.add(e.normal),e.switch&&t.add(`%${e.switch}%`),e.implicit&&t.add(e.implicit),e.machine&&t.add(e.machine),e.root&&t.add(e.root),e.alias&&e.alias.forEach(e=>t.add(e));let n=Array.from(e.tags);for(let e=0;e<n.length;e+=1)t.add(`#`+n[e])}),t})}}},fe={cache:function(){return this._cache=this.methods.one.cacheDoc(this.document),this},uncache:function(){return this._cache=null,this}},pe={api:function(e){Object.assign(e.prototype,fe)},compute:{cache:function(e){e._cache=e.methods.one.cacheDoc(e.document)}},methods:de},me={toLowerCase:function(){return this.termList().forEach(e=>{e.text=e.text.toLowerCase()}),this},toUpperCase:function(){return this.termList().forEach(e=>{e.text=e.text.toUpperCase()}),this},toTitleCase:function(){return this.termList().forEach(e=>{e.text=e.text.replace(/^ *[a-z\u00C0-\u00FF]/,e=>e.toUpperCase())}),this},toCamelCase:function(){return this.docs.forEach(e=>{e.forEach((t,n)=>{n!==0&&(t.text=t.text.replace(/^ *[a-z\u00C0-\u00FF]/,e=>e.toUpperCase())),n!==e.length-1&&(t.post=``)})}),this}},he=e=>/^\p{Lu}[\p{Ll}'’]/u.test(e)||/^\p{Lu}$/u.test(e),ge=e=>e.replace(/^\p{Ll}/u,e=>e.toUpperCase()),_e=e=>e.replace(/^\p{Lu}/u,e=>e.toLowerCase()),ve=(e,t,n)=>{if(n.forEach(e=>e.dirty=!0),e){let r=[t,0].concat(n);Array.prototype.splice.apply(e,r)}return e},ye=function(e){let t=/ $/,n=/[-–—]/,r=e[e.length-1];r&&!t.test(r.post)&&!n.test(r.post)&&(r.post+=` `)},be=(e,t,n)=>{let r=/[-.?!,;:)–—'"]/g,i=e[t-1];if(!i)return;let a=i.post;if(r.test(a)){let e=a.match(r).join(``),t=n[n.length-1];t.post=e+t.post,i.post=i.post.replace(r,``)}},xe=function(e,t,n){let r=e[t];if(t!==0||!he(r.text))return;n[0].text=ge(n[0].text);let i=e[t];i.tags.has(`ProperNoun`)||i.tags.has(`Acronym`)||he(i.text)&&i.text.length>1&&(i.text=_e(i.text))},Se=function(e,t,n,r){let[i,a,o]=t;a===0||o===r[i].length?ye(n):(ye(n),ye([e[t[1]]])),xe(e,a,n),ve(e,a,n)},Ce=function(e,t,n,r){let[i,,a]=t,o=(r[i]||[]).length;a<o?(be(e,a,n),ye(n)):o===a&&(ye(e),be(e,a,n),r[i+1]&&(n[n.length-1].post+=` `)),ve(e,t[2],n),t[4]=n[n.length-1].id},we=0,Te=e=>(e=e.length<3?`0`+e:e,e.length<3?`0`+e:e),Ee=function(e){let[t,n]=e.index||[0,0];we+=1,we=we>46655?0:we,t=t>46655?0:t,n=n>1294?0:n;let r=Te(we.toString(36));r+=Te(t.toString(36));let i=n.toString(36);i=i.length<2?`0`+i:i,r+=i;let a=parseInt(Math.random()*36,10);return r+=a.toString(36),e.normal+`|`+r.toUpperCase()},De=function(e){e.has(`@hasContraction`)&&typeof e.contractions==`function`&&e.grow(`@hasContraction`).contractions().expand()},Oe=e=>Object.prototype.toString.call(e)===`[object Array]`,ke=function(e){return e=e.map(e=>(e.id=Ee(e),e)),e},Ae=function(e,t){let{methods:n}=t;return typeof e==`string`?n.one.tokenize.fromString(e,t)[0]:typeof e==`object`&&e.isView?e.clone().docs[0]||[]:Oe(e)?Oe(e[0])?e[0]:e:[]},je=function(e,t,n){let{document:r,world:i}=t;t.uncache();let a=t.fullPointer,o=t.fullPointer;t.forEach((s,c)=>{let l=s.fullPointer[0],[u]=l,d=r[u],f=Ae(e,i);f.length!==0&&(f=ke(f),n?(De(t.update([l]).firstTerm()),Se(d,l,f,r)):(De(t.update([l]).lastTerm()),Ce(d,l,f,r)),r[u]&&r[u][l[1]]&&(l[3]=r[u][l[1]].id),o[c]=l,l[2]+=f.length,a[c]=l)});let s=t.toView(a);return t.ptrs=o,s.compute([`id`,`index`,`freeze`,`lexicon`]),s.world.compute.preTagger&&s.compute(`preTagger`),s.compute(`unfreeze`),s},Me={insertAfter:function(e){return je(e,this,!1)},insertBefore:function(e){return je(e,this,!0)}};Me.append=Me.insertAfter,Me.prepend=Me.insertBefore,Me.insert=Me.insertAfter;var Ne=/\$[0-9a-z]+/g,Pe={},Fe=e=>/^\p{Lu}[\p{Ll}'’]/u.test(e)||/^\p{Lu}$/u.test(e),Ie=e=>e.replace(/^\p{Ll}/u,e=>e.toUpperCase()),Le=e=>e.replace(/^\p{Lu}/u,e=>e.toLowerCase()),Re=function(e,t,n){return e.forEach(e=>{let r=t(e);e.replaceWith(r,n)}),e},ze=function(e,t){if(typeof e!=`string`)return e;let n=t.groups();return e=e.replace(Ne,e=>{let t=e.replace(/\$/,``);return n.hasOwnProperty(t)?n[t].text():e}),e};Pe.replaceWith=function(e,t={}){let n=this.fullPointer,r=this;if(this.uncache(),typeof e==`function`)return Re(r,e,t);let i=r.docs[0];if(!i)return r;let a=t.possessives&&i[i.length-1].tags.has(`Possessive`),o=t.case&&Fe(i[0].text);e=ze(e,r);let s=this.update(n);n=n.map(e=>e.slice(0,3));let c=(s.docs[0]||[]).map(e=>Array.from(e.tags)),l=s.docs[0][0].pre,u=s.docs[0][s.docs[0].length-1].post;if(typeof e==`string`&&(e=this.fromText(e).compute(`id`)),r.insertAfter(e),s.has(`@hasContraction`)&&r.contractions&&r.grow(`@hasContraction+`).contractions().expand(),r.delete(s),a){let e=r.docs[0],t=e[e.length-1];t.tags.has(`Possessive`)||(t.text+=`'s`,t.normal+=`'s`,t.tags.add(`Possessive`))}if(l&&r.docs[0]&&(r.docs[0][0].pre=l),u&&r.docs[0]){let e=r.docs[0][r.docs[0].length-1];e.post.trim()||(e.post=u)}let d=r.toView(n).compute([`index`,`freeze`,`lexicon`]);if(d.world.compute.preTagger&&d.compute(`preTagger`),d.compute(`unfreeze`),t.tags&&d.terms().forEach((e,t)=>{e.tagSafe(c[t])}),!d.docs[0]||!d.docs[0][0])return d;if(t.case){let e=o?Ie:Le;d.docs[0][0].text=e(d.docs[0][0].text)}return d},Pe.replace=function(e,t,n){if(e&&!t)return this.replaceWith(e,n);let r=this.match(e);return r.found?(this.soften(),r.replaceWith(t,n)):this};var Be=function(e,t){let n=e.length-1,r=e[n],i=e[n-t];i&&r&&(i.post+=r.post,i.post=i.post.replace(/ +([.?!,;:])/,`$1`),i.post=i.post.replace(/[,;:]+([.?!])/,`$1`))},Ve=function(e,t){t.forEach(t=>{let[n,r,i]=t,a=i-r;e[n]&&(i===e[n].length&&i>1&&Be(e[n],a),e[n].splice(r,a))});for(let t=e.length-1;t>=0;--t)if(e[t].length===0&&(e.splice(t,1),t===e.length&&e[t-1])){let n=e[t-1],r=n[n.length-1];r&&(r.post=r.post.trimEnd())}return e},He=function(e,t){return e=e.map(e=>{let[n]=e;return t[n]&&t[n].forEach(t=>{let n=t[2]-t[1];e[1]<=t[1]&&e[2]>=t[2]&&(e[2]-=n)}),e}),e.forEach((t,n)=>{if(t[1]===0&&t[2]==0)for(let t=n+1;t<e.length;t+=1)--e[t][0],e[t][0]<0&&(e[t][0]=0)}),e=e.filter(e=>e[2]-e[1]>0),e=e.map(e=>(e[3]=null,e[4]=null,e)),e},Ue={remove:function(e){let{indexN:t}=this.methods.one.pointer;this.uncache();let n=this.all(),r=this;e&&(n=this,r=this.match(e));let i=!n.ptrs;r.has(`@hasContraction`)&&r.contractions&&r.grow(`@hasContraction`).contractions().expand();let a=n.fullPointer,o=r.fullPointer.reverse(),s=Ve(this.document,o),c=t(o);return a=He(a,c),n.ptrs=a,n.document=s,n.compute(`index`),i&&(n.ptrs=void 0),e?n.toView(a):(this.ptrs=[],n.none())}};Ue.delete=Ue.remove;var We={pre:function(e,t){return e===void 0&&this.found?this.docs[0][0].pre:(this.docs.forEach(n=>{let r=n[0];t===!0?r.pre+=e:r.pre=e}),this)},post:function(e,t){if(e===void 0){let e=this.docs[this.docs.length-1];return e[e.length-1].post}return this.docs.forEach(n=>{let r=n[n.length-1];t===!0?r.post+=e:r.post=e}),this},trim:function(){if(!this.found)return this;let e=this.docs,t=e[0][0];t.pre=t.pre.trimStart();let n=e[e.length-1],r=n[n.length-1];return r.post=r.post.trimEnd(),this},hyphenate:function(){return this.docs.forEach(e=>{e.forEach((t,n)=>{n!==0&&(t.pre=``),e[n+1]&&(t.post=`-`)})}),this},dehyphenate:function(){let e=/[-–—]/;return this.docs.forEach(t=>{t.forEach(t=>{e.test(t.post)&&(t.post=` `)})}),this},toQuotations:function(e,t){return e||=`"`,t||=`"`,this.docs.forEach(n=>{n[0].pre=e+n[0].pre;let r=n[n.length-1];r.post=t+r.post}),this},toParentheses:function(e,t){return e||=`(`,t||=`)`,this.docs.forEach(n=>{n[0].pre=e+n[0].pre;let r=n[n.length-1];r.post=t+r.post}),this}};We.deHyphenate=We.dehyphenate,We.toQuotation=We.toQuotations;var Ge={alpha:(e,t)=>e.normal<t.normal?-1:e.normal>t.normal?1:0,length:(e,t)=>{let n=e.normal.trim().length,r=t.normal.trim().length;return n<r?1:n>r?-1:0},wordCount:(e,t)=>e.words<t.words?1:e.words>t.words?-1:0,sequential:(e,t)=>e[0]<t[0]?1:e[0]>t[0]?-1:e[1]>t[1]?1:-1,byFreq:function(e){let t={};return e.forEach(e=>{t[e.normal]=t[e.normal]||0,t[e.normal]+=1}),e.sort((e,n)=>{let r=t[e.normal],i=t[n.normal];return r<i?1:r>i?-1:0}),e}},Ke=new Set([`index`,`sequence`,`seq`,`sequential`,`chron`,`chronological`]),qe=new Set([`freq`,`frequency`,`topk`,`repeats`]),Je=new Set([`alpha`,`alphabetical`]),Ye=function(e,t){let n=e.fullPointer;return n=n.sort((n,r)=>(n=e.update([n]),r=e.update([r]),t(n,r))),e.ptrs=n,e},Xe={unique:function(){let e=new Set;return this.filter(t=>{let n=t.text(`machine`);return e.has(n)?!1:(e.add(n),!0)})},reverse:function(){let e=this.pointer||this.docs.map((e,t)=>[t]);return e=[].concat(e),e=e.reverse(),this._cache&&=this._cache.reverse(),this.update(e)},sort:function(e){let{docs:t,pointer:n}=this;if(this.uncache(),typeof e==`function`)return Ye(this,e);e||=`alpha`;let r=n||t.map((e,t)=>[t]),i=t.map((e,t)=>({index:t,words:e.length,normal:e.map(e=>e.machine||e.normal||``).join(` `),pointer:r[t]}));return Ke.has(e)&&(e=`sequential`),Je.has(e)&&(e=`alpha`),qe.has(e)?(i=Ge.byFreq(i),this.update(i.map(e=>e.pointer))):typeof Ge[e]==`function`?(i=i.sort(Ge[e]),this.update(i.map(e=>e.pointer))):this}},Ze=e=>Object.prototype.toString.call(e)===`[object Array]`,Qe=function(e,t){if(e.length>0){let t=e[e.length-1],n=t[t.length-1];/ /.test(n.post)===!1&&(n.post+=` `)}return e=e.concat(t),e},$e=function(e,t){if(e.document===t.document){let n=e.fullPointer.concat(t.fullPointer);return e.toView(n).compute(`index`)}return t.fullPointer.forEach(t=>{t[0]+=e.document.length}),e.document=Qe(e.document,t.docs),e.all()},et=Object.assign({},me,Me,Pe,Ue,We,Xe,{concat:function(e){if(typeof e==`string`){let t=this.fromText(e);if(!this.found||!this.ptrs)this.document=this.document.concat(t.document);else{let e=this.fullPointer,n=e[e.length-1][0];this.document.splice(n,0,...t.document)}return this.all().compute(`index`)}return typeof e==`object`&&e.isView?$e(this,e):Ze(e)?(this.document=Qe(this.document,e),this.all()):this}},{harden:function(){return this.ptrs=this.fullPointer,this},soften:function(){let e=this.ptrs;return!e||e.length<1?this:(e=e.map(e=>e.slice(0,3)),this.ptrs=e,this)}}),tt={api:function(e){Object.assign(e.prototype,et)},compute:{id:function(e){let t=e.docs;for(let e=0;e<t.length;e+=1)for(let n=0;n<t[e].length;n+=1){let r=t[e][n];r.id=r.id||Ee(r)}}}},nt=[{word:`@`,out:[`at`]},{word:`arent`,out:[`are`,`not`]},{word:`alot`,out:[`a`,`lot`]},{word:`brb`,out:[`be`,`right`,`back`]},{word:`cannot`,out:[`can`,`not`]},{word:`dun`,out:[`do`,`not`]},{word:`can't`,out:[`can`,`not`]},{word:`shan't`,out:[`should`,`not`]},{word:`won't`,out:[`will`,`not`]},{word:`that's`,out:[`that`,`is`]},{word:`what's`,out:[`what`,`is`]},{word:`let's`,out:[`let`,`us`]},{word:`dunno`,out:[`do`,`not`,`know`]},{word:`gonna`,out:[`going`,`to`]},{word:`gotta`,out:[`have`,`got`,`to`]},{word:`gimme`,out:[`give`,`me`]},{word:`outta`,out:[`out`,`of`]},{word:`tryna`,out:[`trying`,`to`]},{word:`gtg`,out:[`got`,`to`,`go`]},{word:`im`,out:[`i`,`am`]},{word:`imma`,out:[`I`,`will`]},{word:`imo`,out:[`in`,`my`,`opinion`]},{word:`irl`,out:[`in`,`real`,`life`]},{word:`ive`,out:[`i`,`have`]},{word:`rn`,out:[`right`,`now`]},{word:`tbh`,out:[`to`,`be`,`honest`]},{word:`wanna`,out:[`want`,`to`]},{word:`c'mere`,out:[`come`,`here`]},{word:`c'mon`,out:[`come`,`on`]},{word:`shoulda`,out:[`should`,`have`]},{word:`coulda`,out:[`coulda`,`have`]},{word:`woulda`,out:[`woulda`,`have`]},{word:`musta`,out:[`must`,`have`]},{word:`tis`,out:[`it`,`is`]},{word:`twas`,out:[`it`,`was`]},{word:`y'know`,out:[`you`,`know`]},{word:`ne'er`,out:[`never`]},{word:`o'er`,out:[`over`]},{after:`ll`,out:[`will`]},{after:`ve`,out:[`have`]},{after:`re`,out:[`are`]},{after:`m`,out:[`am`]},{before:`c`,out:[`ce`]},{before:`m`,out:[`me`]},{before:`n`,out:[`ne`]},{before:`qu`,out:[`que`]},{before:`s`,out:[`se`]},{before:`t`,out:[`tu`]},{word:`shouldnt`,out:[`should`,`not`]},{word:`couldnt`,out:[`could`,`not`]},{word:`wouldnt`,out:[`would`,`not`]},{word:`hasnt`,out:[`has`,`not`]},{word:`wasnt`,out:[`was`,`not`]},{word:`isnt`,out:[`is`,`not`]},{word:`cant`,out:[`can`,`not`]},{word:`dont`,out:[`do`,`not`]},{word:`wont`,out:[`will`,`not`]},{word:`howd`,out:[`how`,`did`]},{word:`whatd`,out:[`what`,`did`]},{word:`whend`,out:[`when`,`did`]},{word:`whered`,out:[`where`,`did`]}],rt=!0,it={one:{contractions:nt,numberSuffixes:{st:rt,nd:rt,rd:rt,th:rt,am:rt,pm:rt,max:rt,"°":rt,s:rt,e:rt,er:rt,ère:rt,ème:rt}}},at=function(e,t,n){let[r,i]=t;!n||n.length===0||(n=n.map((e,t)=>(e.implicit=e.text,e.machine=e.text,e.pre=``,e.post=``,e.text=``,e.normal=``,e.index=[r,i+t],e)),n[0]&&(n[0].pre=e[r][i].pre,n[n.length-1].post=e[r][i].post,n[0].text=e[r][i].text,n[0].normal=e[r][i].normal),e[r].splice(i,1,...n))},ot=/'/,st=new Set([`what`,`how`,`when`,`where`,`why`]),ct=new Set([`be`,`go`,`start`,`think`,`need`]),lt=new Set([`been`,`gone`]),ut=function(e,t){let n=e[t].normal.split(ot)[0];if(st.has(n))return[n,`did`];if(e[t+1]){if(lt.has(e[t+1].normal))return[n,`had`];if(ct.has(e[t+1].normal))return[n,`would`]}return null},dt=function(e,t){return e[t].normal===`ain't`||e[t].normal===`aint`?null:[e[t].normal.replace(/n't/,``),`not`]},ft=/'/,pt=/(e|é|aison|sion|tion)$/,mt=/(age|isme|acle|ege|oire)$/,ht={preJ:(e,t)=>[`je`,e[t].normal.split(ft)[1]],preL:(e,t)=>{let n=e[t].normal.split(ft)[1];return n&&n.endsWith(`e`)?[`la`,n]:[`le`,n]},preD:(e,t)=>{let n=e[t].normal.split(ft)[1];return n&&pt.test(n)&&!mt.test(n)?[`du`,n]:n&&n.endsWith(`s`)?[`des`,n]:[`de`,n]}},gt=/^([0-9.]{1,4}[a-z]{0,2}) ?[-–—] ?([0-9]{1,4}[a-z]{0,2})$/i,_t=/^([0-9]{1,2}(:[0-9][0-9])?(am|pm)?) ?[-–—] ?([0-9]{1,2}(:[0-9][0-9])?(am|pm)?)$/i,vt=/^[0-9]{3}-[0-9]{4}$/,yt=function(e,t){let n=e[t],r=n.text.match(gt);return r===null?(r=n.text.match(_t),r===null?null:[r[1],`to`,r[4]]):n.tags.has(`PhoneNumber`)===!0||vt.test(n.text)?null:[r[1],`to`,r[2]]},bt=/^([+-]?[0-9][.,0-9]*)([a-z°²³µ/]+)$/,xt=function(e,t,n){let r=n.model.one.numberSuffixes||{},i=e[t].text.match(bt);if(i!==null){let e=i[2].toLowerCase().trim();return r.hasOwnProperty(e)?null:[i[1],e]}return null},St=/'/,Ct=/^[0-9][^-–—]*[-–—].*?[0-9]/,wt=function(e,t,n,r){let i=t.update();i.document=[e];let a=n+r;n>0&&--n,e[a]&&(a+=1),i.ptrs=[[0,n,a]]},Tt={t:(e,t)=>dt(e,t),d:(e,t)=>ut(e,t)},Et={j:(e,t)=>ht.preJ(e,t),l:(e,t)=>ht.preL(e,t),d:(e,t)=>ht.preD(e,t)},Dt=function(e,t,n,r){for(let i=0;i<e.length;i+=1){let a=e[i];if(a.word===t.normal)return a.out;if(r!==null&&r===a.after)return[n].concat(a.out);if(n!==null&&n===a.before&&r&&r.length>2)return a.out.concat(r)}return null},Ot=function(e,t){let n=t.fromText(e.join(` `));return n.compute([`id`,`alias`]),n.docs[0]},kt=function(e,t){for(let n=t+1;n<5&&e[n];n+=1)if(e[n].normal===`been`)return[`there`,`has`];return[`there`,`is`]},At={model:it,compute:{contractions:e=>{let{world:t,document:n}=e,{model:r,methods:i}=t,a=r.one.contractions||[];n.forEach((r,o)=>{for(let s=r.length-1;s>=0;--s){let c=null,l=null;if(St.test(r[s].normal)===!0){let e=r[s].normal.split(St);c=e[0],l=e[1]}let u=Dt(a,r[s],c,l);if(!u&&Tt.hasOwnProperty(l)&&(u=Tt[l](r,s,t)),!u&&Et.hasOwnProperty(c)&&(u=Et[c](r,s)),c===`there`&&l===`s`&&(u=kt(r,s)),u){u=Ot(u,e),at(n,[o,s],u),wt(n[o],e,s,u.length);continue}if(Ct.test(r[s].normal)){u=yt(r,s),u&&(u=Ot(u,e),at(n,[o,s],u),i.one.setTag(u,`NumberRange`,t),u[2]&&u[2].tags.has(`Time`)&&i.one.setTag([u[0]],`Time`,t,null,`time-range`),wt(n[o],e,s,u.length));continue}u=xt(r,s,t),u&&(u=Ot(u,e),at(n,[o,s],u),i.one.setTag([u[1]],`Unit`,t,null,`contraction-unit`))}})}},hooks:[`contractions`]},jt=function(e){let t=e.world,{model:n,methods:r}=e.world,i=r.one.setTag,{frozenLex:a}=n.one,o=n.one._multiCache||{};e.docs.forEach(e=>{for(let n=0;n<e.length;n+=1){let r=e[n],s=r.machine||r.normal;if(o[s]!==void 0&&e[n+1]){let r=n+o[s]-1;for(let o=r;o>n;--o){let r=e.slice(n,o+1),s=r.map(e=>e.machine||e.normal).join(` `);if(a.hasOwnProperty(s)===!0){i(r,a[s],t,!1,`1-frozen-multi-lexicon`),r.forEach(e=>e.frozen=!0);continue}}}if(a[s]!==void 0&&a.hasOwnProperty(s)){i([r],a[s],t,!1,`1-freeze-lexicon`),r.frozen=!0;continue}}})},Mt={frozen:jt,freeze:jt,unfreeze:function(e){return e.docs.forEach(e=>{e.forEach(e=>{delete e.frozen})}),e}},Nt=e=>`\x1B[34m`+e+`\x1B[0m`,Pt=e=>`\x1B[3m\x1B[2m`+e+`\x1B[0m`,Ft=function(e){e.docs.forEach(e=>{console.log(Nt(`
2
+ ┌─────────`)),e.forEach(e=>{let t=` ${Pt(`│`)} `,n=e.implicit||e.text||`-`;e.frozen===!0?t+=`${Nt(n)} ❄️`:t+=Pt(n),console.log(t)})})},It={compute:Mt,mutate:e=>{let t=e.methods.one;t.termMethods.isFrozen=e=>e.frozen===!0,t.debug.freeze=Ft,t.debug.frozen=Ft},api:function(e){e.prototype.freeze=function(){return this.docs.forEach(e=>{e.forEach(e=>{e.frozen=!0})}),this},e.prototype.unfreeze=function(){this.compute(`unfreeze`)},e.prototype.isFrozen=function(){return this.match(`@isFrozen+`)}},hooks:[`freeze`]},Lt=function(e,t,n){let{model:r,methods:i}=n,a=i.one.setTag,o=r.one._multiCache||{},{lexicon:s}=r.one||{},c=e[t],l=c.machine||c.normal;if(o[l]!==void 0&&e[t+1]){let r=t+o[l]-1;for(let i=r;i>t;--i){let r=e.slice(t,i+1);if(r.length<=1)return!1;let o=r.map(e=>e.machine||e.normal).join(` `);if(s.hasOwnProperty(o)===!0){let e=s[o];return a(r,e,n,!1,`1-multi-lexicon`),e&&e.length===2&&(e[0]===`PhrasalVerb`||e[1]===`PhrasalVerb`)&&a([r[1]],`Particle`,n,!1,`1-phrasal-particle`),!0}}return!1}return null},Rt=/^(under|over|mis|re|un|dis|semi|pre|post)-?/,zt=new Set([`Verb`,`Infinitive`,`PastTense`,`Gerund`,`PresentTense`,`Adjective`,`Participle`]),Bt=function(e,t,n){let{model:r,methods:i}=n,a=i.one.setTag,{lexicon:o}=r.one,s=e[t],c=s.machine||s.normal;if(o[c]!==void 0&&o.hasOwnProperty(c))return a([s],o[c],n,!1,`1-lexicon`),!0;if(s.alias){let e=s.alias.find(e=>o.hasOwnProperty(e));if(e)return a([s],o[e],n,!1,`1-lexicon-alias`),!0}if(Rt.test(c)===!0){let e=c.replace(Rt,``);if(o.hasOwnProperty(e)&&e.length>3&&zt.has(o[e]))return a([s],o[e],n,!1,`1-lexicon-prefix`),!0}return null},Vt={model:{one:{lexicon:{},_multiCache:{},frozenLex:{}}},methods:{one:{expandLexicon:function(e){let t={},n={};return Object.keys(e).forEach(r=>{let i=e[r];r=r.toLowerCase().trim(),r=r.replace(/'s\b/,``);let a=r.split(/ /);a.length>1&&(n[a[0]]===void 0||a.length>n[a[0]])&&(n[a[0]]=a.length),t[r]=t[r]||i}),delete t[``],delete t[null],delete t[` `],{lex:t,_multi:n}}}},compute:{lexicon:function(e){let t=e.world;e.docs.forEach(e=>{for(let n=0;n<e.length;n+=1)if(e[n].tags.size===0){let r=null;r||=Lt(e,n,t),r||=Bt(e,n,t)}})}},lib:{addWords:function(e,t=!1){let n=this.world(),{methods:r,model:i}=n;if(!e)return;if(Object.keys(e).forEach(t=>{typeof e[t]==`string`&&e[t].startsWith(`#`)&&(e[t]=e[t].replace(/^#/,``))}),t===!0){let{lex:t,_multi:a}=r.one.expandLexicon(e,n);Object.assign(i.one._multiCache,a),Object.assign(i.one.frozenLex,t);return}if(r.two.expandLexicon){let{lex:t,_multi:a}=r.two.expandLexicon(e,n);Object.assign(i.one.lexicon,t),Object.assign(i.one._multiCache,a)}let{lex:a,_multi:o}=r.one.expandLexicon(e,n);Object.assign(i.one.lexicon,a),Object.assign(i.one._multiCache,o)}},hooks:[`lexicon`]},Ht=function(e,t){let{methods:n,model:r}=t;return n.one.tokenize.splitTerms(e,r).map(e=>n.one.tokenize.splitWhitespace(e,r)).map(e=>e.text.toLowerCase())},Ut=function(e,t){let n=[{}],r=[null],i=[0],a=[],o=0;e.forEach(function(e){let i=0,a=Ht(e,t);for(let e=0;e<a.length;e++){let t=a[e];n[i]&&n[i].hasOwnProperty(t)?i=n[i][t]:(o++,n[i][t]=o,n[o]={},i=o,r[o]=null)}r[i]=[a.length]});for(let e in n[0])o=n[0][e],i[o]=0,a.push(o);for(;a.length;){let e=a.shift(),t=Object.keys(n[e]);for(let s=0;s<t.length;s+=1){let c=t[s],l=n[e][c];for(a.push(l),o=i[e];o>0&&!n[o].hasOwnProperty(c);)o=i[o];if(n.hasOwnProperty(o)){let e=n[o][c];i[l]=e,r[e]&&(r[l]=r[l]||[],r[l]=r[l].concat(r[e]))}else i[l]=0}}return{goNext:n,endAs:r,failTo:i}},Wt=function(e,t,n){let r=0,i=[];for(let a=0;a<e.length;a++){let o=e[a][n.form]||e[a].normal;for(;r>0&&(t.goNext[r]===void 0||!t.goNext[r].hasOwnProperty(o));)r=t.failTo[r]||0;if(t.goNext[r].hasOwnProperty(o)&&(r=t.goNext[r][o],t.endAs[r])){let n=t.endAs[r];for(let t=0;t<n.length;t++){let r=n[t],o=e[a-r+1],[s,c]=o.index;i.push([s,c,c+r,o.id])}}}return i},Gt=function(e,t){for(let n=0;n<e.length;n+=1)if(t.has(e[n])===!0)return!1;return!0},Kt=function(e,t,n){let r=[];n.form=n.form||`normal`;let i=e.docs;if(!t.goNext||!t.goNext[0])return console.error(`Compromise invalid lookup trie`),e.none();let a=Object.keys(t.goNext[0]);for(let o=0;o<i.length;o++){if(e._cache&&e._cache[o]&&Gt(a,e._cache[o])===!0)continue;let s=i[o],c=Wt(s,t,n);c.length>0&&(r=r.concat(c))}return e.update(r)},qt=e=>Object.prototype.toString.call(e)===`[object Object]`;function Jt(e){e.prototype.lookup=function(e,t={}){if(!e)return this.none();typeof e==`string`&&(e=[e]);let n=qt(e)?e:Ut(e,this.world),r=Kt(this,n,t);return r=r.settle(),r}}var Yt=(e,t)=>{for(let n=e.length-1;n>=0;--n)if(e[n]!==t)return e=e.slice(0,n+1),e;return e},Xt=function(e){return e.goNext=e.goNext.map(e=>{if(Object.keys(e).length!==0)return e}),e.goNext=Yt(e.goNext,void 0),e.failTo=Yt(e.failTo,0),e.endAs=Yt(e.endAs,null),e},Zt={buildTrie:function(e){return Xt(Ut(e,this.world()))}};Zt.compile=Zt.buildTrie;var Qt={api:Jt,lib:Zt},$t=function(e,t){return t&&e.forEach(e=>{let n=e[0];t[n]&&(e[0]=t[n][0],e[1]+=t[n][1],e[2]+=t[n][1])}),e},en=function(e,t){let{ptrs:n}=e,{byGroup:r}=e;return n=$t(n,t),Object.keys(r).forEach(e=>{r[e]=$t(r[e],t)}),{ptrs:n,byGroup:r}},tn=function(e,t,n){let r=n.methods.one;return typeof e==`number`&&(e=String(e)),typeof e==`string`&&(e=r.killUnicode(e,n),e=r.parseMatch(e,t,n)),e},nn=e=>Object.prototype.toString.call(e)===`[object Object]`,rn=e=>e&&nn(e)&&e.isView===!0,an=e=>e&&nn(e)&&e.isNet===!0,on={matchOne:function(e,t,n){let r=this.methods.one;if(rn(e))return this.intersection(e).eq(0);if(an(e))return this.sweep(e,{tagger:!1,matchOne:!0}).view;e=tn(e,n,this.world);let i={regs:e,group:t,justOne:!0},{ptrs:a,byGroup:o}=en(r.match(this.docs,i,this._cache),this.fullPointer),s=this.toView(a);return s._groups=o,s},match:function(e,t,n){let r=this.methods.one;if(rn(e))return this.intersection(e);if(an(e))return this.sweep(e,{tagger:!1}).view.settle();e=tn(e,n,this.world);let i={regs:e,group:t},{ptrs:a,byGroup:o}=en(r.match(this.docs,i,this._cache),this.fullPointer),s=this.toView(a);return s._groups=o,s},has:function(e,t,n){let r=this.methods.one;if(rn(e))return this.intersection(e).fullPointer.length>0;if(an(e))return this.sweep(e,{tagger:!1}).view.found;e=tn(e,n,this.world);let i={regs:e,group:t,justOne:!0};return r.match(this.docs,i,this._cache).ptrs.length>0},if:function(e,t,n){let r=this.methods.one;if(rn(e))return this.filter(t=>t.intersection(e).found);if(an(e)){let t=this.sweep(e,{tagger:!1}).view.settle();return this.if(t)}e=tn(e,n,this.world);let i={regs:e,group:t,justOne:!0},a=this.fullPointer,o=this._cache||[];a=a.filter((e,t)=>{let n=this.update([e]);return r.match(n.docs,i,o[t]).ptrs.length>0});let s=this.update(a);return this._cache&&(s._cache=a.map(e=>o[e[0]])),s},ifNo:function(e,t,n){let{methods:r}=this,i=r.one;if(rn(e))return this.filter(t=>!t.intersection(e).found);if(an(e)){let t=this.sweep(e,{tagger:!1}).view.settle();return this.ifNo(t)}e=tn(e,n,this.world);let a=this._cache||[],o=this.filter((n,r)=>{let o={regs:e,group:t,justOne:!0};return i.match(n.docs,o,a[r]).ptrs.length===0});return this._cache&&(o._cache=o.ptrs.map(e=>a[e[0]])),o}},sn={before:function(e,t,n){let{indexN:r}=this.methods.one.pointer,i=[],a=r(this.fullPointer);Object.keys(a).forEach(e=>{let t=a[e].sort((e,t)=>e[1]>t[1]?1:-1)[0];t[1]>0&&i.push([t[0],0,t[1]])});let o=this.toView(i);return e?o.match(e,t,n):o},after:function(e,t,n){let{indexN:r}=this.methods.one.pointer,i=[],a=r(this.fullPointer),o=this.document;Object.keys(a).forEach(e=>{let[t,,n]=a[e].sort((e,t)=>e[1]>t[1]?-1:1)[0];n<o[t].length&&i.push([t,n,o[t].length])});let s=this.toView(i);return e?s.match(e,t,n):s},growLeft:function(e,t,n){typeof e==`string`&&(e=this.world.methods.one.parseMatch(e,n,this.world)),e[e.length-1].end=!0;let r=this.fullPointer;return this.forEach((n,i)=>{let a=n.before(e,t);if(a.found){let e=a.terms();r[i][1]-=e.length,r[i][3]=e.docs[0][0].id}}),this.update(r)},growRight:function(e,t,n){typeof e==`string`&&(e=this.world.methods.one.parseMatch(e,n,this.world)),e[0].start=!0;let r=this.fullPointer;return this.forEach((n,i)=>{let a=n.after(e,t);if(a.found){let e=a.terms();r[i][2]+=e.length,r[i][4]=null}}),this.update(r)},grow:function(e,t,n){return this.growRight(e,t,n).growLeft(e,t,n)}},cn=function(e,t){return[e[0],e[1],t[2]]},ln=function(e){return Object.prototype.toString.call(e)===`[object Array]`},un=(e,t,n)=>typeof e==`string`||ln(e)?t.match(e,n):e||t.none(),dn=function(e,t){let[n,r,i]=e;return t.document[n]&&t.document[n][r]&&(e[3]=e[3]||t.document[n][r].id,t.document[n][i-1]&&(e[4]=e[4]||t.document[n][i-1].id)),e},fn={};fn.splitOn=function(e,t){let{splitAll:n}=this.methods.one.pointer,r=un(e,this,t).fullPointer,i=n(this.fullPointer,r),a=[];return i.forEach(e=>{a.push(e.passthrough),a.push(e.before),a.push(e.match),a.push(e.after)}),a=a.filter(e=>e),a=a.map(e=>dn(e,this)),this.update(a)},fn.splitBefore=function(e,t){let{splitAll:n}=this.methods.one.pointer,r=un(e,this,t).fullPointer,i=n(this.fullPointer,r);for(let e=0;e<i.length;e+=1)!i[e].after&&i[e+1]&&i[e+1].before&&i[e].match&&i[e].match[0]===i[e+1].before[0]&&(i[e].after=i[e+1].before,delete i[e+1].before);let a=[];return i.forEach(e=>{a.push(e.passthrough),a.push(e.before),e.match&&e.after?a.push(cn(e.match,e.after)):a.push(e.match)}),a=a.filter(e=>e),a=a.map(e=>dn(e,this)),this.update(a)},fn.splitAfter=function(e,t){let{splitAll:n}=this.methods.one.pointer,r=un(e,this,t).fullPointer,i=n(this.fullPointer,r),a=[];return i.forEach(e=>{a.push(e.passthrough),e.before&&e.match?a.push(cn(e.before,e.match)):(a.push(e.before),a.push(e.match)),a.push(e.after)}),a=a.filter(e=>e),a=a.map(e=>dn(e,this)),this.update(a)},fn.split=fn.splitAfter;var pn=function(e,t){return!e||!t||e[0]!==t[0]?!1:e[2]===t[1]},mn=function(e,t,n){let r=e.world,i=r.methods.one.parseMatch;t||=`.$`,n||=`^.`;let a=i(t,{},r),o=i(n,{},r);a[a.length-1].end=!0,o[0].start=!0;let s=e.fullPointer,c=[s[0]];for(let t=1;t<s.length;t+=1){let n=c[c.length-1],r=s[t],i=e.update([n]),l=e.update([r]);pn(n,r)&&i.has(a)&&l.has(o)?c[c.length-1]=[n[0],n[1],r[2],n[3],r[4]]:c.push(r)}return e.update(c)},hn=Object.assign({},on,sn,fn,{joinIf:function(e,t){return mn(this,e,t)},join:function(){return mn(this)}});hn.lookBehind=hn.before,hn.lookBefore=hn.before,hn.lookAhead=hn.after,hn.lookAfter=hn.after,hn.notIf=hn.ifNo;var gn=function(e){Object.assign(e.prototype,hn)},_n=/(?:^|\s)([![^]*(?:<[^<]*>)?\/.*?[^\\/]\/[?\]+*$~]*)(?:\s|$)/,vn=/([!~[^]*(?:<[^<]*>)?\([^)]+[^\\)]\)[?\]+*$~]*)(?:\s|$)/,yn=/ /g,bn=e=>/^[![^]*(<[^<]*>)?\(/.test(e)&&/\)[?\]+*$~]*$/.test(e),xn=e=>/^[![^]*(<[^<]*>)?\//.test(e)&&/\/[?\]+*$~]*$/.test(e),Sn=function(e){return e=e.map(e=>e.trim()),e=e.filter(e=>e),e},Cn=function(e){let t=e.split(_n),n=[];t.forEach(e=>{if(xn(e)){n.push(e);return}n=n.concat(e.split(vn))}),n=Sn(n);let r=[];return n.forEach(e=>{bn(e)||xn(e)?r.push(e):r=r.concat(e.split(yn))}),r=Sn(r),r},wn=/\{([0-9]+)?(, *[0-9]*)?\}/,Tn=/&&/,En=new RegExp(/^<\s*(\S+)\s*>/),Dn=e=>e.charAt(0).toUpperCase()+e.substring(1),On=e=>e.charAt(e.length-1),kn=e=>e.charAt(0),An=e=>e.substring(1),jn=e=>e.substring(0,e.length-1),Mn=function(e){return e=An(e),e=jn(e),e},Nn=function(e,t){let n={};for(let r=0;r<2;r+=1){if(On(e)===`$`&&(n.end=!0,e=jn(e)),kn(e)===`^`&&(n.start=!0,e=An(e)),On(e)===`?`&&(n.optional=!0,e=jn(e)),(kn(e)===`[`||On(e)===`]`)&&(n.group=null,kn(e)===`[`&&(n.groupStart=!0),On(e)===`]`&&(n.groupEnd=!0),e=e.replace(/^\[/,``),e=e.replace(/\]$/,``),kn(e)===`<`)){let t=En.exec(e);t.length>=2&&(n.group=t[1],e=e.replace(t[0],``))}if(On(e)===`+`&&(n.greedy=!0,e=jn(e)),e!==`*`&&On(e)===`*`&&e!==`\\*`&&(n.greedy=!0,e=jn(e)),kn(e)===`!`&&(n.negative=!0,e=An(e)),kn(e)===`~`&&On(e)===`~`&&e.length>2&&(e=Mn(e),n.fuzzy=!0,n.min=t.fuzzy||.85,/\(/.test(e)===!1))return n.word=e,n;if(kn(e)===`/`&&On(e)===`/`)return e=Mn(e),t.caseSensitive&&(n.use=`text`),n.regex=new RegExp(e),n;if(wn.test(e)===!0&&(e=e.replace(wn,(e,t,r)=>(r===void 0?(n.min=Number(t),n.max=Number(t)):(r=r.replace(/, */,``),t===void 0?(n.min=0,n.max=Number(r)):(n.min=Number(t),n.max=Number(r||999))),n.greedy=!0,n.min||(n.optional=!0),``))),kn(e)===`(`&&On(e)===`)`){Tn.test(e)?(n.choices=e.split(Tn),n.operator=`and`):(n.choices=e.split(`|`),n.operator=`or`),n.choices[0]=An(n.choices[0]);let r=n.choices.length-1;n.choices[r]=jn(n.choices[r]),n.choices=n.choices.map(e=>e.trim()),n.choices=n.choices.filter(e=>e),n.choices=n.choices.map(e=>e.split(/ /g).map(e=>Nn(e,t))),e=``}if(kn(e)===`{`&&On(e)===`}`){if(e=Mn(e),n.root=e,/\//.test(e)){let e=n.root.split(/\//);n.root=e[0],n.pos=e[1],n.pos===`adj`&&(n.pos=`Adjective`),n.pos=n.pos.charAt(0).toUpperCase()+n.pos.substr(1).toLowerCase(),e[2]!==void 0&&(n.sense=e[2])}return n}if(kn(e)===`<`&&On(e)===`>`)return e=Mn(e),n.chunk=Dn(e),n.greedy=!0,n;if(kn(e)===`%`&&On(e)===`%`)return e=Mn(e),n.switch=e,n}return kn(e)===`#`?(n.tag=An(e),n.tag=Dn(n.tag),n):kn(e)===`@`?(n.method=An(e),n):e===`.`?(n.anything=!0,n):e===`*`?(n.anything=!0,n.greedy=!0,n.optional=!0,n):(e&&(e=e.replace(`\\*`,`*`),e=e.replace(`\\.`,`.`),t.caseSensitive?n.use=`text`:e=e.toLowerCase(),n.word=e),n)},Pn=/[a-z0-9][-–—][a-z]/i,Fn=function(e,t){let n=t.model.one.prefixes;for(let t=e.length-1;t>=0;--t){let r=e[t];if(r.word&&Pn.test(r.word)){let i=r.word.split(/[-–—]/g);if(n.hasOwnProperty(i[0]))continue;i=i.filter(e=>e).reverse(),e.splice(t,1),i.forEach(n=>{let i=Object.assign({},r);i.word=n,e.splice(t,0,i)})}}return e},In=function(e,t){let{all:n}=t.methods.two.transform.verb||{},r=e.root;return n?n(r,t.model):[]},Ln=function(e,t){let{all:n}=t.methods.two.transform.noun||{};return n?n(e.root,t.model):[e.root]},Rn=function(e,t){let{all:n}=t.methods.two.transform.adjective||{};return n?n(e.root,t.model):[e.root]},zn=function(e,t){return e=e.map(e=>{if(e.root)if(t.methods.two&&t.methods.two.transform){let n=[];e.pos?e.pos===`Verb`?n=n.concat(In(e,t)):e.pos===`Noun`?n=n.concat(Ln(e,t)):e.pos===`Adjective`&&(n=n.concat(Rn(e,t))):(n=n.concat(In(e,t)),n=n.concat(Ln(e,t)),n=n.concat(Rn(e,t))),n=n.filter(e=>e),n.length>0&&(e.operator=`or`,e.fastOr=new Set(n))}else e.machine=e.root,delete e.id,delete e.root;return e}),e},Bn=function(e){let t=0,n=null;for(let r=0;r<e.length;r++){let i=e[r];i.groupStart===!0&&(n=i.group,n===null&&(n=String(t),t+=1)),n!==null&&(i.group=n),i.groupEnd===!0&&(n=null)}return e},Vn=function(e){return e.map(e=>{if(e.choices!==void 0){if(e.operator!==`or`||e.fuzzy===!0)return e;e.choices.every(e=>{if(e.length!==1)return!1;let t=e[0];return t.fuzzy===!0||t.start||t.end?!1:t.word!==void 0&&t.negative!==!0&&t.optional!==!0&&t.method!==!0})===!0&&(e.fastOr=new Set,e.choices.forEach(t=>{e.fastOr.add(t[0].word)}),delete e.choices)}return e})},Hn=function(e){return e.map(e=>(e.fuzzy&&e.choices&&e.choices.forEach(t=>{t.length===1&&t[0].word&&(t[0].fuzzy=!0,t[0].min=e.min)}),e))},Un=function(e){return e=Bn(e),e=Vn(e),e=Hn(e),e},Wn=function(e,t,n){if(e==null||e===``)return[];t||={},typeof e==`number`&&(e=String(e));let r=Cn(e);return r=r.map(e=>Nn(e,t)),r=Fn(r,n),r=zn(r,n),r=Un(r,t),r},Gn=function(e,t){for(let n of t)if(e.has(n))return!0;return!1},Kn=function(e,t){for(let n=0;n<e.length;n+=1){let r=e[n];if(!(r.optional===!0||r.negative===!0||r.fuzzy===!0)){if(r.word!==void 0&&t.has(r.word)===!1||r.tag!==void 0&&t.has(`#`+r.tag)===!1)return!0;if(r.fastOr&&Gn(r.fastOr,t)===!1)return!1}}return!1},qn=function(e,t){let n=e.length,r=t.length;if(n===0)return r;if(r===0)return n;let i=(r>n?r:n)+1;if(Math.abs(n-r)>(i||100))return i||100;let a=[];for(let e=0;e<i;e++)a[e]=[e],a[e].length=i;for(let e=0;e<i;e++)a[0][e]=e;let o,s,c,l,u,d;for(let i=1;i<=n;++i)for(s=e[i-1],o=1;o<=r;++o){if(i===o&&a[i][o]>4)return n;c=t[o-1],l=s===c?0:1,u=a[i-1][o]+1,(d=a[i][o-1]+1)<u&&(u=d),(d=a[i-1][o-1]+l)<u&&(u=d),i>1&&o>1&&s===t[o-2]&&e[i-2]===c&&(d=a[i-2][o-2]+l)<u?a[i][o]=d:a[i][o]=u}return a[n][r]},Jn=function(e,t,n=3){if(e===t)return 1;if(e.length<n||t.length<n)return 0;let r=qn(e,t),i=Math.max(e.length,t.length);return 1-(i===0?0:r/i)},Yn=/([\u0022\uFF02\u0027\u201C\u2018\u201F\u201B\u201E\u2E42\u201A\u00AB\u2039\u2035\u2036\u2037\u301D\u0060\u301F])/,Xn=/([\u0022\uFF02\u0027\u201D\u2019\u00BB\u203A\u2032\u2033\u2034\u301E\u00B4])/,Zn=/^[-–—]$/,Qn=/ [-–—]{1,3} /,$n=(e,t)=>e.post.indexOf(t)!==-1,er={hasQuote:e=>Yn.test(e.pre)||Xn.test(e.post),hasComma:e=>$n(e,`,`),hasPeriod:e=>$n(e,`.`)===!0&&$n(e,`...`)===!1,hasExclamation:e=>$n(e,`!`),hasQuestionMark:e=>$n(e,`?`)||$n(e,`¿`),hasEllipses:e=>$n(e,`..`)||$n(e,`…`),hasSemicolon:e=>$n(e,`;`),hasColon:e=>$n(e,`:`),hasSlash:e=>/\//.test(e.text),hasHyphen:e=>Zn.test(e.post)||Zn.test(e.pre),hasDash:e=>Qn.test(e.post)||Qn.test(e.pre),hasContraction:e=>!!e.implicit,isAcronym:e=>e.tags.has(`Acronym`),isKnown:e=>e.tags.size>0,isTitleCase:e=>/^\p{Lu}[a-z'\u00C0-\u00FF]/u.test(e.text),isUpperCase:e=>/^\p{Lu}+$/u.test(e.text)};er.hasQuotation=er.hasQuote;var tr=function(){},nr=function(e,t,n,r){if(t.anything===!0)return!0;if(t.start===!0&&n!==0||t.end===!0&&n!==r-1)return!1;if(t.id!==void 0&&t.id===e.id)return!0;if(t.word!==void 0)return t.use?t.word===e[t.use]:e.machine!==null&&e.machine===t.word||e.alias!==void 0&&e.alias.hasOwnProperty(t.word)||t.fuzzy===!0&&(t.word===e.root||Jn(t.word,e.normal)>=t.min)||e.alias&&e.alias.some(e=>e===t.word)?!0:t.word===e.text||t.word===e.normal;if(t.tag!==void 0)return e.tags.has(t.tag)===!0;if(t.method!==void 0)return typeof er[t.method]==`function`&&er[t.method](e)===!0;if(t.pre!==void 0)return e.pre&&e.pre.includes(t.pre);if(t.post!==void 0)return e.post&&e.post.includes(t.post);if(t.regex!==void 0){let n=e.normal;return t.use&&(n=e[t.use]),t.regex.test(n)}if(t.chunk!==void 0)return e.chunk===t.chunk;if(t.switch!==void 0)return e.switch===t.switch;if(t.machine!==void 0)return e.normal===t.machine||e.machine===t.machine||e.root===t.machine;if(t.sense!==void 0)return e.sense===t.sense;if(t.fastOr!==void 0){if(t.pos&&!e.tags.has(t.pos))return null;let n=e.root||e.implicit||e.machine||e.normal;return t.fastOr.has(n)||t.fastOr.has(e.text)}return t.choices===void 0?!1:t.operator===`and`?t.choices.every(t=>tr(e,t,n,r)):t.choices.some(t=>tr(e,t,n,r))};tr=function(e,t,n,r){let i=nr(e,t,n,r);return t.negative===!0?!i:i};var rr=tr,ir=function(e,t){let n=Object.assign({},e.regs[e.r],{start:!1,end:!1}),r=e.t;for(;e.t<e.terms.length;e.t+=1){if(t&&rr(e.terms[e.t],t,e.start_i+e.t,e.phrase_length))return e.t;let i=e.t-r+1;if(n.max!==void 0&&i===n.max)return e.t;if(rr(e.terms[e.t],n,e.start_i+e.t,e.phrase_length)===!1)return n.min!==void 0&&i<n.min?null:e.t}return e.t},ar=function(e,t){let n=e.t;if(!t)return e.terms.length;for(;n<e.terms.length;n+=1)if(rr(e.terms[n],t,e.start_i+n,e.phrase_length)===!0)return n;return null},or=function(e,t){if(e.end===!0&&e.greedy===!0&&t.start_i+t.t<t.phrase_length-1){let n=Object.assign({},e,{end:!1});if(rr(t.terms[t.t],n,t.start_i+t.t,t.phrase_length)===!0)return!0}return!1},sr=function(e,t){return e.groups[e.inGroup]||(e.groups[e.inGroup]={start:t,length:0}),e.groups[e.inGroup]},cr=function(e){let{regs:t}=e,n=t[e.r],r=ar(e,t[e.r+1]);if(r===null||r===0||n.min!==void 0&&r-e.t<n.min)return null;if(n.max!==void 0&&r-e.t>n.max)return e.t+=n.max,!0;if(e.hasGroup===!0){let t=sr(e,e.t);t.length=r-e.t}return e.t=r,!0},lr=function(e){return Object.prototype.toString.call(e)===`[object Array]`},ur=function(e,t=0){let n=e.regs[e.r],r=!1;for(let i=0;i<n.choices.length;i+=1){let a=n.choices[i];if(!lr(a))return!1;if(r=a.every((n,r)=>{let i=0,a=e.t+r+t+i;if(e.terms[a]===void 0)return!1;let o=rr(e.terms[a],n,a+e.start_i,e.phrase_length);if(o===!0&&n.greedy===!0)for(let t=1;t<e.terms.length;t+=1){let r=e.terms[a+t];if(r)if(rr(r,n,e.start_i+t,e.phrase_length)===!0)i+=1;else break}return t+=i,o}),r){t+=a.length;break}}return r&&n.greedy===!0?ur(e,t):t},dr=function(e){let t=0;return e.regs[e.r].choices.every(n=>{let r=n.every((t,n)=>{let r=e.t+n;return e.terms[r]===void 0?!1:rr(e.terms[r],t,r,e.phrase_length)});return r===!0&&n.length>t&&(t=n.length),r})===!0?t:!1},fr=function(e){let{regs:t}=e,n=t[e.r],r=ur(e);if(r){if(n.negative===!0)return null;if(e.hasGroup===!0){let t=sr(e,e.t);t.length+=r}if(n.end===!0){let t=e.phrase_length;if(e.t+e.start_i+r!==t)return null}return e.t+=r,!0}else if(!n.optional)return null;return!0},pr=function(e){let{regs:t}=e,n=t[e.r],r=dr(e);if(r){if(n.negative===!0)return null;if(e.hasGroup===!0){let t=sr(e,e.t);t.length+=r}if(n.end===!0){let t=e.phrase_length-1;if(e.t+e.start_i!==t)return null}return e.t+=r,!0}else if(!n.optional)return null;return!0},mr=function(e,t,n){let r=0;for(let i=e.t;i<e.terms.length;i+=1){let a=rr(e.terms[i],t,e.start_i+e.t,e.phrase_length);if(a||n&&(a=rr(e.terms[i],n,e.start_i+e.t,e.phrase_length),a)||(r+=1,t.max!==void 0&&r===t.max))break}return r===0||t.min&&t.min>r?!1:(e.t+=r,!0)},hr=function(e){let{regs:t}=e,n=t[e.r],r=Object.assign({},n);if(r.negative=!1,rr(e.terms[e.t],r,e.start_i+e.t,e.phrase_length))return!1;if(n.optional){let n=t[e.r+1];n&&(rr(e.terms[e.t],n,e.start_i+e.t,e.phrase_length)?e.r+=1:n.optional&&t[e.r+2]&&rr(e.terms[e.t],t[e.r+2],e.start_i+e.t,e.phrase_length)&&(e.r+=2))}return n.greedy?mr(e,r,t[e.r+1]):(e.t+=1,!0)},gr=function(e){let{regs:t}=e,n=t[e.r],r=e.terms[e.t],i=rr(r,t[e.r+1],e.start_i+e.t,e.phrase_length);if(n.negative||i){let n=e.terms[e.t+1];(!n||!rr(n,t[e.r+1],e.start_i+e.t,e.phrase_length))&&(e.r+=1)}},_r=function(e){let{regs:t,phrase_length:n}=e,r=t[e.r];return e.t=ir(e,t[e.r+1]),e.t===null||r.min&&r.min>e.t||r.end===!0&&e.start_i+e.t!==n?null:!0},vr=function(e){let t=e.terms[e.t],n=e.regs[e.r];if(t.implicit&&e.terms[e.t+1]){if(!e.terms[e.t+1].implicit)return;n.word===t.normal&&(e.t+=1),n.method===`hasContraction`&&(e.t+=1)}},yr=function(e,t){let n=e.regs[e.r],r=sr(e,t);e.t>1&&n.greedy?r.length+=e.t-t:r.length++},br=function(e){let{regs:t}=e,n=t[e.r],r=e.terms[e.t],i=e.t;return n.optional&&t[e.r+1]&&n.negative?!0:(n.optional&&t[e.r+1]&&gr(e),r.implicit&&e.terms[e.t+1]&&vr(e),e.t+=1,n.end===!0&&e.t!==e.terms.length&&n.greedy!==!0||n.greedy===!0&&!_r(e)?null:(e.hasGroup===!0&&yr(e,i),!0))},xr=function(e,t,n,r){if(e.length===0||t.length===0)return null;let i={t:0,terms:e,r:0,regs:t,groups:{},start_i:n,phrase_length:r,inGroup:null};for(;i.r<t.length;i.r+=1){let e=t[i.r];if(i.hasGroup=!!e.group,i.hasGroup===!0?i.inGroup=e.group:i.inGroup=null,!i.terms[i.t]){if(t.slice(i.r).some(e=>!e.optional)===!1)break;return null}if(e.anything===!0&&e.greedy===!0){if(!cr(i))return null;continue}if(e.choices!==void 0&&e.operator===`or`){if(!fr(i))return null;continue}if(e.choices!==void 0&&e.operator===`and`){if(!pr(i))return null;continue}if(e.anything===!0){if(e.negative&&e.anything||!br(i))return null;continue}if(or(e,i)===!0){if(!br(i))return null;continue}if(e.negative){if(!hr(i))return null;continue}if(rr(i.terms[i.t],e,i.start_i+i.t,i.phrase_length)===!0){if(!br(i))return null;continue}if(e.optional!==!0)return null}let a=[null,n,i.t+n];if(a[1]===a[2])return null;let o={};return Object.keys(i.groups).forEach(e=>{let t=i.groups[e],r=n+t.start;o[e]=[null,r,r+t.length]}),{pointer:a,groups:o}},Sr=function(e,t){let n=[],r={};return e.length===0?{ptrs:n,byGroup:r}:(typeof t==`number`&&(t=String(t)),t?e.forEach(e=>{e.groups[t]&&n.push(e.groups[t])}):e.forEach(e=>{n.push(e.pointer),Object.keys(e.groups).forEach(t=>{r[t]=r[t]||[],r[t].push(e.groups[t])})}),{ptrs:n,byGroup:r})},Cr=function(e,t,n){return e=e.filter(e=>{let[r,i,a]=e.pointer,o=n[r].slice(i,a);for(let e=0;e<o.length;e+=1)if(xr(o.slice(e),t,e,o.length)!==null)return!1;return!0}),e},wr=function(e,t){return e.pointer[0]=t,Object.keys(e.groups).forEach(n=>{e.groups[n][0]=t}),e},Tr=function(e,t,n){let r=xr(e,t,0,e.length);return r?(r=wr(r,n),r):null},Er={api:gn,methods:{one:{termMethods:er,parseMatch:Wn,match:function(e,t,n){n||=[];let{regs:r,group:i,justOne:a}=t,o=[];if(!r||r.length===0)return{ptrs:[],byGroup:{}};let s=r.filter(e=>e.optional!==!0&&e.negative!==!0).length;docs:for(let t=0;t<e.length;t+=1){let c=e[t];if(!(n[t]&&Kn(r,n[t]))){if(r[0].start===!0){let e=Tr(c,r,t,i);e&&o.push(e);continue}for(let e=0;e<c.length;e+=1){let n=c.slice(e);if(n.length<s)break;let i=xr(n,r,e,c.length);if(i){if(i=wr(i,t),o.push(i),a===!0)break docs;let n=i.pointer[2];Math.abs(n-1)>e&&(e=Math.abs(n-1))}}}}return r[r.length-1].end===!0&&(o=o.filter(t=>e[t.pointer[0]].length===t.pointer[2])),t.notIf&&(o=Cr(o,t.notIf,e)),o=Sr(o,i),o.ptrs.forEach(t=>{let[n,r,i]=t;t[3]=e[n][r].id,t[4]=e[n][i-1].id}),o}}},lib:{parseMatch:function(e,t){let n=this.world(),r=n.methods.one.killUnicode;return r&&(e=r(e,n)),n.methods.one.parseMatch(e,t,n)}}},Dr=/^\../,Or=/^#./,kr=e=>(e=e.replace(/&/g,`&amp;`),e=e.replace(/</g,`&lt;`),e=e.replace(/>/g,`&gt;`),e=e.replace(/"/g,`&quot;`),e=e.replace(/'/g,`&apos;`),e),Ar=function(e){let t=``,n=`</span>`;return e=kr(e),Dr.test(e)?t=`<span class="${e.replace(/^\./,``)}"`:Or.test(e)?t=`<span id="${e.replace(/^#/,``)}"`:(t=`<${e}`,n=`</${e}>`),t+=`>`,{start:t,end:n}},jr=function(e,t){let n={},r={};return Object.keys(t).forEach(i=>{let a=t[i],o=Ar(i);typeof a==`string`&&(a=e.match(a)),a.docs.forEach(e=>{if(e.every(e=>e.implicit))return;let t=e[0].id;n[t]=n[t]||[],n[t].push(o.start);let i=e[e.length-1].id;r[i]=r[i]||[],r[i].push(o.end)})}),{starts:n,ends:r}},Mr={html:function(e){let{starts:t,ends:n}=jr(this,e),r=``;return this.docs.forEach(e=>{for(let i=0;i<e.length;i+=1){let a=e[i];t.hasOwnProperty(a.id)&&(r+=t[a.id].join(``)),r+=a.pre||``,r+=a.text||``,n.hasOwnProperty(a.id)&&(r+=n[a.id].join(``)),r+=a.post||``}}),r}},Nr=/[,:;)\]*.?~!\u0022\uFF02\u201D\u2019\u00BB\u203A\u2032\u2033\u2034\u301E\u00B4—-]+$/,Pr=/^[(['"*~\uFF02\u201C\u2018\u201F\u201B\u201E\u2E42\u201A\u00AB\u2039\u2035\u2036\u2037\u301D\u0060\u301F]+/,Fr=/[,:;)('"\u201D\]]/,Ir=/^[-–—]$/,Lr=/ /,Rr=function(e,t,n=!0){let r=``;return e.forEach(e=>{let n=e.pre||``,i=e.post||``;t.punctuation===`some`&&(n=n.replace(Pr,``),Ir.test(i)&&(i=` `),i=i.replace(Fr,``),i=i.replace(/\?!+/,`?`),i=i.replace(/!+/,`!`),i=i.replace(/\?+/,`?`),i=i.replace(/\.{2,}/,``),e.tags.has(`Abbreviation`)&&(i=i.replace(/\./,``))),t.whitespace===`some`&&(n=n.replace(/\s/,``),i=i.replace(/\s+/,` `)),t.keepPunct||(n=n.replace(Pr,``),i=i===`-`?` `:i.replace(Nr,``));let a=e[t.form||`text`]||e.normal||``;t.form===`implicit`&&(a=e.implicit||e.text),t.form===`root`&&e.implicit&&(a=e.root||e.implicit||e.normal),(t.form===`machine`||t.form===`implicit`||t.form===`root`)&&e.implicit&&(!i||!Lr.test(i))&&(i+=` `),r+=n+a+i}),n===!1&&(r=r.trim()),t.lowerCase===!0&&(r=r.toLowerCase()),r},zr=function(e,t){let n=``;if(!e||!e[0]||!e[0][0])return n;for(let r=0;r<e.length;r+=1)n+=Rr(e[r],t,!0);if(t.keepSpace||(n=n.trim()),t.keepEndPunct===!1){e[0][0].tags.has(`Emoticon`)||(n=n.replace(Pr,``));let t=e[e.length-1];t[t.length-1].tags.has(`Emoticon`)||(n=n.replace(Nr,``)),n.endsWith(`'`)&&!n.endsWith(`s'`)&&(n=n.replace(/'/,``))}return t.cleanWhitespace===!0&&(n=n.trim()),n},Br={text:{form:`text`},normal:{whitespace:`some`,punctuation:`some`,case:`some`,unicode:`some`,form:`normal`},machine:{keepSpace:!1,whitespace:`some`,punctuation:`some`,case:`none`,unicode:`some`,form:`machine`},root:{keepSpace:!1,whitespace:`some`,punctuation:`some`,case:`some`,unicode:`some`,form:`root`},implicit:{form:`implicit`}};Br.clean=Br.normal,Br.reduced=Br.root;for(var Vr=[],Hr=0;Hr<64;)Vr[Hr]=0|Math.sin(++Hr%Math.PI)*4294967296;var Ur=function(e){let t,n,r,i=decodeURI(encodeURI(e))+`€`,a=i.length,o=[t=1732584193,n=4023233417,~t,~n],s=[];for(e=--a/4+2|15,s[--e]=a*8;~a;)s[a>>2]|=i.charCodeAt(a)<<8*a--;for(Hr=i=0;Hr<e;Hr+=16){for(a=o;i<64;a=[r=a[3],t+((r=a[0]+[t&n|~t&r,r&t|~r&n,t^n^r,n^(t|~r)][a=i>>4]+Vr[i]+~~s[Hr|[i,5*i+1,3*i+5,7*i][a]&15])<<(a=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*a+ i++%4])|r>>>-a),t,n])t=a[1]|0,n=a[2];for(i=4;i;)o[--i]+=a[i]}for(e=``;i<32;)e+=(o[i>>3]>>(1^i++)*4&15).toString(16);return e},Wr={text:!0,terms:!0},Gr={case:`none`,unicode:`some`,form:`machine`,punctuation:`some`},Kr=function(e,t){return Object.assign({},e,t)},qr={text:e=>Rr(e,{keepPunct:!0},!1),normal:e=>Rr(e,Kr(Br.normal,{keepPunct:!0}),!1),implicit:e=>Rr(e,Kr(Br.implicit,{keepPunct:!0}),!1),machine:e=>Rr(e,Gr,!1),root:e=>Rr(e,Kr(Gr,{form:`root`}),!1),hash:e=>Ur(Rr(e,{keepPunct:!0},!1)),offset:e=>{let t=qr.text(e).length;return{index:e[0].offset.index,start:e[0].offset.start,length:t}},terms:e=>e.map(e=>{let t=Object.assign({},e);return t.tags=Array.from(e.tags),t}),confidence:(e,t,n)=>t.eq(n).confidence(),syllables:(e,t,n)=>t.eq(n).syllables(),sentence:(e,t,n)=>t.eq(n).fullSentence().text(),dirty:e=>e.some(e=>e.dirty===!0)};qr.sentences=qr.sentence,qr.clean=qr.normal,qr.reduced=qr.root;var Jr=function(e,t){return t||={},typeof t==`string`&&(t={}),t=Object.assign({},Wr,t),t.offset&&e.compute(`offset`),e.docs.map((n,r)=>{let i={};return Object.keys(t).forEach(a=>{t[a]&&qr[a]&&(i[a]=qr[a](n,e,r))}),i})},Yr={json:function(e){let t=Jr(this,e);return typeof e==`number`?t[e]:t}};Yr.data=Yr.json;var Xr=()=>typeof window<`u`&&window.document,Zr=function(e){let t=this.methods.one.debug||{};return e&&t.hasOwnProperty(e)?(t[e](this),this):Xr()?(t.clientSide(this),this):(t.tags(this),this)},Qr=function(e){let t=e.pre||``,n=e.post||``;return t+e.text+n},$r=function(e,t){let n={};return Object.keys(t).forEach(r=>{e.match(r).fullPointer.forEach(e=>{n[e[3]]={fn:t[r],end:e[2]}})}),n},ei=function(e,t){let n=$r(e,t),r=``;return e.docs.forEach((t,i)=>{for(let a=0;a<t.length;a+=1){let o=t[a];if(n.hasOwnProperty(o.id)){let{fn:s,end:c}=n[o.id],l=e.update([[i,a,c]]);r+=t[a].pre||``,r+=s(l),a=c-1,r+=t[a].post||``}else r+=Qr(o)}}),r},ti=e=>Object.prototype.toString.call(e)===`[object Object]`,ni=function(e){let t={};return e.forEach(e=>{t[e]=t[e]||0,t[e]+=1}),Object.keys(t).map(e=>({normal:e,count:t[e]})).sort((e,t)=>e.count>t.count?-1:0)},ri={debug:Zr,out:function(e){if(ti(e))return ei(this,e);if(e===`text`)return this.text();if(e===`normal`)return this.text(`normal`);if(e===`root`)return this.text(`root`);if(e===`machine`||e===`reduced`)return this.text(`machine`);if(e===`hash`||e===`md5`)return Ur(this.text());if(e===`json`)return this.json();if(e===`offset`||e===`offsets`)return this.compute(`offset`),this.json({offset:!0});if(e===`array`)return this.docs.map(e=>e.reduce((e,t)=>e+t.pre+t.text+t.post,``).trim()).filter(e=>e);if(e===`freq`||e===`frequency`||e===`topk`)return ni(this.json({normal:!0}).map(e=>e.normal));if(e===`terms`){let e=[];return this.docs.forEach(t=>{let n=t.map(e=>e.text);n=n.filter(e=>e),e=e.concat(n)}),e}return e===`tags`?this.docs.map(e=>e.reduce((e,t)=>(e[t.implicit||t.normal]=Array.from(t.tags),e),{})):e===`debug`?this.debug():this.text()},wrap:function(e){return ei(this,e)}},ii=e=>Object.prototype.toString.call(e)===`[object Object]`,ai=Object.assign({},ri,{text:function(e){let t={};if(e&&typeof e==`string`&&Br.hasOwnProperty(e)?t=Object.assign({},Br[e]):e&&ii(e)&&(t=Object.assign({},e)),t.keepSpace===void 0&&!this.isFull()&&(t.keepSpace=!1),t.keepEndPunct===void 0&&this.pointer){let e=this.pointer[0];e&&e[1]?t.keepEndPunct=!1:t.keepEndPunct=!0}return t.keepPunct===void 0&&(t.keepPunct=!0),t.keepSpace===void 0&&(t.keepSpace=!0),zr(this.docs,t)}},Yr,Mr),oi=function(e){Object.assign(e.prototype,ai)},si=function(e){console.log(`%c -=-=- `,`background-color:#6699cc;`),e.forEach(e=>{console.groupCollapsed(e.text());let t=e.docs[0].map(e=>{let t=e.text||`-`;e.implicit&&(t=`[`+e.implicit+`]`);let n=`[`+Array.from(e.tags).join(`, `)+`]`;return{text:t,tags:n}});console.table(t,[`text`,`tags`]),console.groupEnd()})},ci=`\x1B[0m`,li={green:e=>`\x1B[32m`+e+ci,red:e=>`\x1B[31m`+e+ci,blue:e=>`\x1B[34m`+e+ci,magenta:e=>`\x1B[35m`+e+ci,cyan:e=>`\x1B[36m`+e+ci,yellow:e=>`\x1B[33m`+e+ci,black:e=>`\x1B[30m`+e+ci,dim:e=>`\x1B[2m`+e+ci,i:e=>`\x1B[3m`+e+ci},ui=function(e,t){return t.one.tagSet&&(e=e.map(e=>t.one.tagSet.hasOwnProperty(e)?li[t.one.tagSet[e].color||`blue`](e):e)),e.join(`, `)},di=function(e){let{docs:t,model:n}=e;t.length===0&&console.log(li.blue(`
3
+ ──────`)),t.forEach(t=>{console.log(li.blue(`
4
+ ┌─────────`)),t.forEach(t=>{let r=[...t.tags||[]],i=t.text||`-`;t.sense&&(i=`{${t.normal}/${t.sense}}`),t.implicit&&(i=`[`+t.implicit+`]`),i=li.yellow(i);let a=`'`+i+`'`;if(t.reference){let n=e.update([t.reference]).text(`normal`);a+=` - ${li.dim(li.i(`[`+n+`]`))}`}a=a.padEnd(18);let o=li.blue(` │ `)+li.i(a)+` - `+ui(r,n);console.log(o)})}),console.log(`
5
+ `)},fi=function(e){let{docs:t}=e;console.log(``),t.forEach(e=>{let t=[];e.forEach(e=>{e.chunk===`Noun`?t.push(li.blue(e.implicit||e.normal)):e.chunk===`Verb`?t.push(li.green(e.implicit||e.normal)):e.chunk===`Adjective`?t.push(li.yellow(e.implicit||e.normal)):e.chunk===`Pivot`?t.push(li.red(e.implicit||e.normal)):t.push(e.implicit||e.normal)}),console.log(t.join(` `),`
6
+ `)}),console.log(`
7
+ `)},pi=(e,t,n)=>{let r=n*9,i=t.start+r,a=i+t.length;return[e.substring(0,i),e.substring(i,a),e.substring(a,e.length)]},mi=function(e,t,n){let r=pi(e,t,n);return`${r[0]}${li.blue(r[1])}${r[2]}`},hi={api:oi,methods:{one:{hash:Ur,debug:{tags:di,clientSide:si,chunks:fi,highlight:function(e){if(!e.found)return;let t={};e.fullPointer.forEach(e=>{t[e[0]]=t[e[0]]||[],t[e[0]].push(e)}),Object.keys(t).forEach(n=>{let r=e.update([[Number(n)]]).text();e.update(t[n]).json({offset:!0}).forEach((e,t)=>{r=mi(r,e.offset,t)}),console.log(r)}),console.log(`
8
+ `)}}}}},gi=function(e,t){if(e[0]!==t[0])return!1;let[,n,r]=e,[,i,a]=t;return n<=i&&r>i||i<=n&&a>n},_i=function(e){let t=e[0][1],n=e[0][2];return e.forEach(e=>{e[1]<t&&(t=e[1]),e[2]>n&&(n=e[2])}),[e[0][0],t,n]},vi=function(e){let t={};return e.forEach(e=>{t[e[0]]=t[e[0]]||[],t[e[0]].push(e)}),t},yi=function(e){let t={};for(let n=0;n<e.length;n+=1)t[e[n].join(`,`)]=e[n];return Object.values(t)},bi=function(e,t){let[n,r]=e,i=t[1],a=t[2],o={};return r<i&&(o.before=[n,r,i<e[2]?i:e[2]]),o.match=t,e[2]>a&&(o.after=[n,a,e[2]]),o},xi=function(e,t){return e[1]<=t[1]&&t[2]<=e[2]},Si=function(e,t){let n=vi(t),r=[];return e.forEach(e=>{let[t]=e,i=n[t]||[];if(i=i.filter(t=>xi(e,t)),i.length===0){r.push({passthrough:e});return}i=i.sort((e,t)=>e[1]-t[1]);let a=e;i.forEach((e,t)=>{let n=bi(a,e);i[t+1]?(r.push({before:n.before,match:n.match}),n.after&&(a=n.after)):r.push(n)})}),r},Ci=20,wi=function(e,t,n){for(let r=0;r<Ci;r+=1){if(t[n-r]){let i=t[n-r].findIndex(t=>t.id===e);if(i!==-1)return[n-r,i]}if(t[n+r]){let i=t[n+r].findIndex(t=>t.id===e);if(i!==-1)return[n+r,i]}}return null},Ti=function(e,t){let[n,r,,,i]=e,a=t[n],o=a.findIndex(e=>e.id===i);return o===-1?(e[2]=t[n].length,e[4]=a.length?a[a.length-1].id:null):e[2]=o,t[n].slice(r,e[2]+1)},Ei={one:{termList:function(e){let t=[];for(let n=0;n<e.length;n+=1)for(let r=0;r<e[n].length;r+=1)t.push(e[n][r]);return t},getDoc:function(e,t){let n=[];return e.forEach((r,i)=>{if(!r)return;let[a,o,s,c,l]=r,u=t[a]||[];if(o===void 0&&(o=0),s===void 0&&(s=u.length),c&&(!u[o]||u[o].id!==c)){let n=wi(c,t,a);if(n!==null){let r=s-o;u=t[n[0]].slice(n[1],n[1]+r);let a=u[0]?u[0].id:null;e[i]=[n[0],n[1],n[1]+r,a]}}else u=u.slice(o,s);u.length!==0&&o!==s&&(l&&u[u.length-1].id!==l&&(u=Ti(r,t)),n.push(u))}),n=n.filter(e=>e.length>0),n},pointer:{indexN:vi,splitAll:Si}}},Di=function(e,t){let n=e.concat(t),r=vi(n),i=[];return n.forEach(e=>{let[t]=e;if(r[t].length===1){i.push(e);return}let n=r[t].filter(t=>gi(e,t));n.push(e);let a=_i(n);i.push(a)}),i=yi(i),i},Oi=function(e,t){let n=[];return Si(e,t).forEach(e=>{e.passthrough&&n.push(e.passthrough),e.before&&n.push(e.before),e.after&&n.push(e.after)}),n},ki=function(e,t){let n=e[1]<t[1]?t[1]:e[1],r=e[2]>t[2]?t[2]:e[2];return n<r?[e[0],n,r]:null},Ai=function(e,t){let n=vi(t),r=[];return e.forEach(e=>{let t=n[e[0]]||[];t=t.filter(t=>gi(e,t)),t.length!==0&&t.forEach(t=>{let n=ki(e,t);n&&r.push(n)})}),r},ji=function(e){return Object.prototype.toString.call(e)===`[object Array]`},Mi=(e,t)=>typeof e==`string`||ji(e)?t.match(e):e||t.none(),Ni=function(e,t){return e.map(e=>{let[n,r]=e;return t[n]&&t[n][r]&&(e[3]=t[n][r].id),e})},Pi={};Pi.union=function(e){e=Mi(e,this);let t=Di(this.fullPointer,e.fullPointer);return t=Ni(t,this.document),this.toView(t)},Pi.and=Pi.union,Pi.intersection=function(e){e=Mi(e,this);let t=Ai(this.fullPointer,e.fullPointer);return t=Ni(t,this.document),this.toView(t)},Pi.not=function(e){e=Mi(e,this);let t=Oi(this.fullPointer,e.fullPointer);return t=Ni(t,this.document),this.toView(t)},Pi.difference=Pi.not,Pi.complement=function(){let e=Oi(this.all().fullPointer,this.fullPointer);return e=Ni(e,this.document),this.toView(e)},Pi.settle=function(){let e=this.fullPointer;return e.forEach(t=>{e=Di(e,[t])}),e=Ni(e,this.document),this.update(e)};var Fi={methods:Ei,api:function(e){Object.assign(e.prototype,Pi)}},Ii={buildNet:function(e){let t=this.methods().one.buildNet(e,this.world());return t.isNet=!0,t}},Li=function(e){e.prototype.sweep=function(e,t={}){let{world:n,docs:r}=this,{methods:i}=n,a=i.one.bulkMatch(r,e,this.methods,t);t.tagger!==!1&&i.one.bulkTagger(a,r,this.world),a=a.map(e=>{let t=e.pointer,n=r[t[0]][t[1]],i=t[2]-t[1];return n.index&&(e.pointer=[n.index[0],n.index[1],t[1]+i]),e});let o=a.map(e=>e.pointer);return a=a.map(e=>(e.view=this.update([e.pointer]),delete e.regs,delete e.needs,delete e.pointer,delete e._expanded,e)),{view:this.update(o),found:a}}},Ri=function(e){return e.optional===!0||e.negative===!0?null:e.tag?`#`+e.tag:e.word?e.word:e.switch?`%${e.switch}%`:null},zi=function(e){let t=[];return e.forEach(e=>{t.push(Ri(e)),e.operator===`and`&&e.choices&&e.choices.forEach(e=>{e.forEach(e=>{t.push(Ri(e))})})}),t.filter(e=>e)},Bi=function(e){let t=[],n=0;return e.forEach(e=>{e.operator===`or`&&!e.optional&&!e.negative&&(e.fastOr&&Array.from(e.fastOr).forEach(e=>{t.push(e)}),e.choices&&e.choices.forEach(e=>{e.forEach(e=>{let n=Ri(e);n&&t.push(n)})}),n+=1)}),{wants:t,count:n}},Vi=function(e,t){let n=t.methods.one.parseMatch;return e.forEach(e=>{e.regs=n(e.match,{},t),typeof e.ifNo==`string`&&(e.ifNo=[e.ifNo]),e.notIf&&=n(e.notIf,{},t),e.needs=zi(e.regs);let{wants:r,count:i}=Bi(e.regs);e.wants=r,e.minWant=i,e.minWords=e.regs.filter(e=>!e.optional).length}),e},Hi=function(e,t){e=Vi(e,t);let n={};return e.forEach(e=>{e.needs.forEach(t=>{n[t]=Array.isArray(n[t])?n[t]:[],n[t].push(e)}),e.wants.forEach(t=>{n[t]=Array.isArray(n[t])?n[t]:[],n[t].push(e)})}),Object.keys(n).forEach(e=>{let t={};n[e]=n[e].filter(e=>typeof t[e.match]==`boolean`?!1:(t[e.match]=!0,!0))}),{hooks:n,always:e.filter(e=>e.needs.length===0&&e.wants.length===0)}},Ui=function(e,t){return e.map((n,r)=>{let i=[];Object.keys(t).forEach(n=>{e[r].has(n)&&(i=i.concat(t[n]))});let a={};return i=i.filter(e=>typeof a[e.match]==`boolean`?!1:(a[e.match]=!0,!0)),i})},Wi=function(e,t){return e.map((e,n)=>{let r=t[n];return e=e.filter(e=>e.needs.every(e=>r.has(e))),e=e.filter(e=>!(e.ifNo!==void 0&&e.ifNo.some(e=>r.has(e))===!0)),e=e.filter(e=>e.wants.length===0?!0:e.wants.filter(e=>r.has(e)).length>=e.minWant),e})},Gi=function(e,t,n,r,i){let a=[];for(let n=0;n<e.length;n+=1)for(let o=0;o<e[n].length;o+=1){let s=e[n][o],c=r.one.match([t[n]],s);if(c.ptrs.length>0&&(c.ptrs.forEach(e=>{e[0]=n;let t=Object.assign({},s,{pointer:e});s.unTag!==void 0&&(t.unTag=s.unTag),a.push(t)}),i.matchOne===!0))return[a[0]]}return a},Ki=function(e,t){return e.map((e,n)=>{let r=t[n].length;return e=e.filter(e=>r>=e.minWords),e})},qi=function(e,t,n,r={}){let i=n.one.cacheDoc(e),a=Ui(i,t.hooks);return a=Wi(a,i,e),t.always.length>0&&(a=a.map(e=>e.concat(t.always))),a=Ki(a,e),Gi(a,e,i,n,r)},Ji=function(e,t,n){let r=n.one.tagSet;if(!r.hasOwnProperty(t))return!0;let i=r[t].not||[];for(let t=0;t<e.length;t+=1){let n=e[t];for(let e=0;e<i.length;e+=1)if(n.tags.has(i[e])===!0)return!1}return!0},Yi={lib:Ii,api:Li,methods:{one:{buildNet:Hi,bulkMatch:qi,bulkTagger:function(e,t,n){let{model:r,methods:i}=n,{getDoc:a,setTag:o,unTag:s}=i.one,c=i.two.looksPlural;return e.length===0?e:((typeof process>`u`||!process.env?self.env||{}:process.env).DEBUG_TAGS&&console.log(`\n\n \x1b[32m→ ${e.length} post-tagger:\x1b[0m`),e.map(e=>{if(!e.tag&&!e.chunk&&!e.unTag)return;let i=e.reason||e.match,l=a([e.pointer],t)[0];if(!(e.safe===!0&&(Ji(l,e.tag,r)===!1||l[l.length-1].post===`-`))){if(e.tag!==void 0){if(o(l,e.tag,n,e.safe,`[post] '${i}'`),e.tag===`Noun`&&c){let t=l[l.length-1];c(t.text)?o([t],`Plural`,n,e.safe,`quick-plural`):o([t],`Singular`,n,e.safe,`quick-singular`)}e.freeze===!0&&l.forEach(e=>e.frozen=!0)}e.unTag!==void 0&&s(l,e.unTag,n,e.safe,i),e.chunk&&l.forEach(t=>t.chunk=e.chunk)}}))}}}},Xi=/ /,Zi=function(e,t){t===`Noun`&&(e.chunk=t),t===`Verb`&&(e.chunk=t)},Qi=function(e,t,n,r){if(e.tags.has(t)===!0||t===`.`)return null;e.frozen===!0&&(r=!0);let i=n[t];if(i){if(i.not&&i.not.length>0)for(let t=0;t<i.not.length;t+=1){if(r===!0&&e.tags.has(i.not[t]))return null;e.tags.delete(i.not[t])}if(i.parents&&i.parents.length>0)for(let t=0;t<i.parents.length;t+=1)e.tags.add(i.parents[t]),Zi(e,i.parents[t])}return e.tags.add(t),e.dirty=!0,Zi(e,t),!0},$i=function(e,t,n,r){let i=t.split(Xi);e.forEach((e,t)=>{let a=i[t];a&&(a=a.replace(/^#/,``),Qi(e,a,n,r))})},ea=function(e){return Object.prototype.toString.call(e)===`[object Array]`},ta=(e,t,n=``)=>{let r=e=>`\x1B[33m\x1B[3m`+e+`\x1B[0m`,i=e=>`\x1B[3m`+e+`\x1B[0m`,a=e.map(e=>e.text||`[`+e.implicit+`]`).join(` `);typeof t!=`string`&&t.length>2&&(t=t.slice(0,2).join(`, #`)+` +`),t=typeof t==`string`?t:t.join(`, #`),console.log(` ${r(a).padEnd(24)} \x1b[32m→\x1b[0m #${t.padEnd(22)} ${i(n)}`)},na=function(e,t,n={},r,i){let a=n.model.one.tagSet||{};if(!t)return;let o=typeof process>`u`||!process.env?self.env||{}:process.env;if(o&&o.DEBUG_TAGS&&ta(e,t,i),ea(t)===!0){t.forEach(t=>na(e,t,n,r));return}if(typeof t!=`string`){console.warn(`compromise: Invalid tag '${t}'`);return}if(t=t.trim(),Xi.test(t)){$i(e,t,a,r);return}t=t.replace(/^#/,``);for(let n=0;n<e.length;n+=1)Qi(e[n],t,a,r)},ra=function(e,t,n){t=t.trim().replace(/^#/,``);for(let r=0;r<e.length;r+=1){let i=e[r];if(i.frozen===!0)continue;if(t===`*`){i.tags.clear();continue}let a=n[t];if(a&&a.children.length>0)for(let e=0;e<a.children.length;e+=1)i.tags.delete(a.children[e]);i.tags.delete(t)}},ia=function(e,t,n){if(!n.hasOwnProperty(t))return!0;let r=n[t].not||[];for(let t=0;t<r.length;t+=1)if(e.tags.has(r[t]))return!1;return!0},aa=function(e){return e.children=e.children||[],e._cache=e._cache||{},e.props=e.props||{},e._cache.parents=e._cache.parents||[],e._cache.children=e._cache.children||[],e},oa=/^ *(#|\/\/)/,sa=function(e){let t=e.trim().split(/->/),n=[];t.forEach((e=>{n=n.concat(function(e){if(!(e=e.trim()))return null;if(/^\[/.test(e)&&/\]$/.test(e)){let t=(e=(e=e.replace(/^\[/,``)).replace(/\]$/,``)).split(/,/);return t=t.map((e=>e.trim())).filter((e=>e)),t=t.map((e=>aa({id:e}))),t}return[aa({id:e})]}(e))})),n=n.filter((e=>e));let r=n[0];for(let e=1;e<n.length;e+=1)r.children.push(n[e]),r=n[e];return n[0]},ca=(e,t)=>{let n=[],r=[e];for(;r.length>0;){let e=r.pop();n.push(e),e.children&&e.children.forEach((n=>{t&&t(e,n),r.push(n)}))}return n},la=e=>Object.prototype.toString.call(e)===`[object Array]`,ua=e=>(e||=``).trim(),da=function(e=[]){return typeof e==`string`?function(e){let t=e.split(/\r?\n/),n=[];t.forEach((e=>{if(!e.trim()||oa.test(e))return;let t=(e=>{let t=/^( {2}|\t)/,n=0;for(;t.test(e);)e=e.replace(t,``),n+=1;return n})(e);n.push({indent:t,node:sa(e)})}));let r=function(e){let t={children:[]};return e.forEach(((n,r)=>{n.indent===0?t.children=t.children.concat(n.node):e[r-1]&&function(e,t){let n=e[t].indent;for(;t>=0;--t)if(e[t].indent<n)return e[t];return e[0]}(e,r).node.children.push(n.node)})),t}(n);return r=aa(r),r}(e):la(e)?function(e){let t={};e.forEach((e=>{t[e.id]=e}));let n=aa({});return e.forEach((e=>{if((e=aa(e)).parent)if(t.hasOwnProperty(e.parent)){let n=t[e.parent];delete e.parent,n.children.push(e)}else console.warn(`[Grad] - missing node '${e.parent}'`);else n.children.push(e)})),n}(e):(ca(t=e).forEach(aa),t);var t},fa=e=>`\x1B[31m`+e+`\x1B[0m`,pa=e=>`\x1B[2m`+e+`\x1B[0m`,ma=function(e,t){let n=`-> `;t&&(n=pa(`→ `));let r=``;return ca(e).forEach(((e,i)=>{let a=e.id||``;if(t&&(a=fa(a)),i===0&&!e.id)return;let o=e._cache.parents.length;r+=` `.repeat(o)+n+a+`
9
+ `})),r},ha=function(e){let t=ca(e);t.forEach((e=>{delete(e=Object.assign({},e)).children}));let n=t[0];return n&&!n.id&&Object.keys(n.props).length===0&&t.shift(),t},ga={text:ma,txt:ma,array:ha,flat:ha},_a=function(e,t){return t===`nested`||t===`json`?e:t===`debug`?(console.log(ma(e,!0)),null):ga.hasOwnProperty(t)?ga[t](e):e},va=e=>{ca(e,((e,t)=>{e.id&&(e._cache.parents=e._cache.parents||[],t._cache.parents=e._cache.parents.concat([e.id]))}))},ya=(e,t)=>(Object.keys(t).forEach((n=>{if(t[n]instanceof Set){let r=e[n]||new Set;e[n]=new Set([...r,...t[n]])}else if((e=>e&&typeof e==`object`&&!Array.isArray(e))(t[n])){let r=e[n]||{};e[n]=Object.assign({},t[n],r)}else la(t[n])?e[n]=t[n].concat(e[n]||[]):e[n]===void 0&&(e[n]=t[n])})),e),ba=/\//,xa=class e{constructor(e={}){Object.defineProperty(this,`json`,{enumerable:!1,value:e,writable:!0})}get children(){return this.json.children}get id(){return this.json.id}get found(){return this.json.id||this.json.children.length>0}props(e={}){let t=this.json.props||{};return typeof e==`string`&&(t[e]=!0),this.json.props=Object.assign(t,e),this}get(t){return t=ua(t),ba.test(t)?new e(((e,t)=>{let n=(e=>typeof e==`string`?(e=e.replace(/^\//,``)).split(/\//):e)(t||=``);for(let t=0;t<n.length;t+=1){let r=e.children.find((e=>e.id===n[t]));if(!r)return null;e=r}return e})(this.json,t)||aa({})):new e(this.json.children.find((e=>e.id===t)))}add(t,n={}){if(la(t))return t.forEach((e=>this.add(ua(e),n))),this;t=ua(t);let r=aa({id:t,props:n});return this.json.children.push(r),new e(r)}remove(e){return e=ua(e),this.json.children=this.json.children.filter((t=>t.id!==e)),this}nodes(){return ca(this.json).map((e=>(delete(e=Object.assign({},e)).children,e)))}cache(){return(e=>{let t=ca(e,((e,t)=>{e.id&&(e._cache.parents=e._cache.parents||[],e._cache.children=e._cache.children||[],t._cache.parents=e._cache.parents.concat([e.id]))})),n={};t.forEach((e=>{e.id&&(n[e.id]=e)})),t.forEach((e=>{e._cache.parents.forEach((t=>{n.hasOwnProperty(t)&&n[t]._cache.children.push(e.id)}))})),e._cache.children=Object.keys(n)})(this.json),this}list(){return ca(this.json)}fillDown(){var e;return e=this.json,ca(e,((e,t)=>{t.props=ya(t.props,e.props)})),this}depth(){va(this.json);let e=ca(this.json),t=e.length>1?1:0;return e.forEach((e=>{if(e._cache.parents.length===0)return;let n=e._cache.parents.length+1;n>t&&(t=n)})),t}out(e){return va(this.json),_a(this.json,e)}debug(){return va(this.json),_a(this.json,`debug`),this}},Sa=function(e){return new xa(da(e))};Sa.prototype.plugin=function(e){e(this)};var Ca={Noun:`blue`,Verb:`green`,Negative:`green`,Date:`red`,Value:`red`,Adjective:`magenta`,Preposition:`cyan`,Conjunction:`cyan`,Determiner:`cyan`,Hyphenated:`cyan`,Adverb:`cyan`},wa=function(e){return Ca.hasOwnProperty(e.id)?Ca[e.id]:Ca.hasOwnProperty(e.is)?Ca[e.is]:Ca[e._cache.parents.find(e=>Ca[e])]},Ta=function(e){let t={};return e.forEach(e=>{let{not:n,also:r,is:i,novel:a}=e.props,o=e._cache.parents;r&&(o=o.concat(r)),t[e.id]={is:i,not:n,novel:a,also:r,parents:o,children:e._cache.children,color:wa(e)}}),Object.keys(t).forEach(e=>{let n=new Set(t[e].not);t[e].not.forEach(e=>{t[e]&&t[e].children.forEach(e=>n.add(e))}),t[e].not=Array.from(n)}),t},Ea=function(e){return e?typeof e==`string`?[e]:e:[]},Da=function(e,t){return Object.keys(e).forEach(n=>{e[n].isA&&(e[n].is=e[n].isA),e[n].notA&&(e[n].not=e[n].notA),e[n].is&&typeof e[n].is==`string`&&!t.hasOwnProperty(e[n].is)&&!e.hasOwnProperty(e[n].is)&&(e[e[n].is]={}),e[n].not&&typeof e[n].not==`string`&&!e.hasOwnProperty(e[n].not)&&!t.hasOwnProperty(e[n].not)&&!e.hasOwnProperty(e[n].not)&&(e[e[n].not]={})}),e},Oa=function(e,t){return e=Da(e,t),Object.keys(e).forEach(t=>{e[t].children=Ea(e[t].children),e[t].not=Ea(e[t].not)}),Object.keys(e).forEach(t=>{(e[t].not||[]).forEach(n=>{e[n]&&e[n].not&&e[n].not.push(t)})}),e},ka=function(e){return Sa(Object.keys(e).map(t=>{let n=e[t],r={not:new Set(n.not),also:n.also,is:n.is,novel:n.novel};return{id:t,parent:n.is,props:r,children:[]}})).cache().fillDown().out(`array`)},Aa=function(e){return Object.keys(e).forEach(t=>{e[t]=Object.assign({},e[t]),e[t].novel=!0}),e},ja={one:{setTag:na,unTag:ra,addTags:function(e,t){return Object.keys(t).length>0&&(e=Aa(e)),e=Oa(e,t),Ta(ka(Object.assign({},t,e)))},canBe:ia}},Ma=function(e){return Object.prototype.toString.call(e)===`[object Array]`},Na={tag:function(e,t=``,n){if(!this.found||!e)return this;let r=this.termList();if(r.length===0)return this;let{methods:i,verbose:a,world:o}=this;return a===!0&&console.log(` + `,e,t||``),Ma(e)?e.forEach(e=>i.one.setTag(r,e,o,n,t)):i.one.setTag(r,e,o,n,t),this.uncache(),this},tagSafe:function(e,t=``){return this.tag(e,t,!0)},unTag:function(e,t){if(!this.found||!e)return this;let n=this.termList();if(n.length===0)return this;let{methods:r,verbose:i,model:a}=this;i===!0&&console.log(` - `,e,t||``);let o=a.one.tagSet;return Ma(e)?e.forEach(e=>r.one.unTag(n,e,o)):r.one.unTag(n,e,o),this.uncache(),this},canBe:function(e){e=e.replace(/^#/,``);let t=this.model.one.tagSet,n=this.methods.one.canBe,r=[];this.document.forEach((i,a)=>{i.forEach((i,o)=>{n(i,e,t)||r.push([a,o,o+1])})});let i=this.update(r);return this.difference(i)}},Pa=function(e){Object.assign(e.prototype,Na)},Fa={addTags:function(e){let{model:t,methods:n}=this.world(),r=t.one.tagSet,i=n.one.addTags,a=i(e,r);return t.one.tagSet=a,this}},Ia=new Set([`Auxiliary`,`Possessive`]),La=function(e,t){return e=e.sort((e,n)=>{if(Ia.has(e)||!t.hasOwnProperty(n))return 1;if(Ia.has(n)||!t.hasOwnProperty(e))return-1;let r=t[e].children||[],i=r.length;return r=t[n].children||[],i-r.length}),e},Ra={model:{one:{tagSet:{}}},compute:{tagRank:function(e){let{document:t,world:n}=e,r=n.model.one.tagSet;t.forEach(e=>{e.forEach(e=>{e.tagRank=La(Array.from(e.tags),r)})})}},methods:ja,api:Pa,lib:Fa},za=/([.!?\u203D\u2E18\u203C\u2047-\u2049\u3002]+\s)/g,Ba=/^[.!?\u203D\u2E18\u203C\u2047-\u2049\u3002]+\s$/,Va=/((?:\r?\n|\r)+)/,Ha=function(e){let t=[],n=e.split(Va);for(let e=0;e<n.length;e++){let r=n[e].split(za);for(let e=0;e<r.length;e++)r[e+1]&&Ba.test(r[e+1])===!0&&(r[e]+=r[e+1],r[e+1]=``),r[e]!==``&&t.push(r[e])}return t},Ua=/[a-z0-9\u00C0-\u00FF\u00a9\u00ae\u2000-\u3300\ud000-\udfff]/i,Wa=/\S/,Ga=function(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n];if(!(r===void 0||r===``)){if(Wa.test(r)===!1||Ua.test(r)===!1){if(t[t.length-1]){t[t.length-1]+=r;continue}else if(e[n+1]){e[n+1]=r+e[n+1];continue}}t.push(r)}}return t},Ka=function(e){return!!e.match(/\n$/)},qa=function(e,t){let n=t.methods.one.tokenize.isSentence,r=t.model.one.abbreviations||new Set,i=[];for(let t=0;t<e.length;t++){let a=e[t];e[t+1]&&!n(a,r)&&!Ka(a)?e[t+1]=a+(e[t+1]||``):a&&a.length>0&&(i.push(a),e[t]=``)}return i},Ja=280,Ya={'"':`"`,""":`"`,"“":`”`,"‟":`”`,"„":`”`,"⹂":`”`,"‚":`’`,"«":`»`,"‹":`›`,"‵":`′`,"‶":`″`,"‷":`‴`,"〝":`〞`,"〟":`〞`},Xa=RegExp(`[`+Object.keys(Ya).join(``)+`]`,`g`),Za=RegExp(`[`+Object.values(Ya).join(``)+`]`,`g`),Qa=function(e){if(!e)return!1;let t=e.match(Za);return t!==null&&t.length===1},$a=function(e){let t=[];for(let n=0;n<e.length;n+=1){let r=e[n].match(Xa);if(r!==null&&r.length===1){if(Qa(e[n+1])&&e[n+1].length<Ja){e[n]+=e[n+1],t.push(e[n]),e[n+1]=``,n+=1;continue}if(Qa(e[n+2])){let r=e[n+1]+e[n+2];if(r.length<Ja){e[n]+=r,t.push(e[n]),e[n+1]=``,e[n+2]=``,n+=2;continue}}}t.push(e[n])}return t},eo=250,to=/\(/g,no=/\)/g,ro=function(e){let t=[];for(let n=0;n<e.length;n+=1){let r=e[n].match(to);if(r!==null&&r.length===1&&e[n+1]&&e[n+1].length<eo&&e[n+1].match(no)!==null&&r.length===1&&!to.test(e[n+1])){e[n]+=e[n+1],t.push(e[n]),e[n+1]=``,n+=1;continue}t.push(e[n])}return t},io=/\S/,ao=/^\s+/,oo=function(e,t){if(e||=``,e=String(e),!e||typeof e!=`string`||io.test(e)===!1)return[];e=e.replace(`\xA0`,` `);let n=Ga(Ha(e));if(n=qa(n,t),n=$a(n),n=ro(n),n.length===0)return[e];for(let e=1;e<n.length;e+=1){let t=n[e].match(ao);t!==null&&(n[e-1]+=t[0],n[e]=n[e].replace(ao,``))}return n},so=function(e,t){let n=e.split(/[-–—]/);if(n.length<=1)return!1;let{prefixes:r,suffixes:i}=t.one;return n[0].length===1&&/[a-z]/i.test(n[0])||r.hasOwnProperty(n[0])||(n[1]=n[1].trim().replace(/[.?!]$/,``),i.hasOwnProperty(n[1]))?!1:/^([a-z\u00C0-\u00FF`"'/]+)[-–—]([a-z0-9\u00C0-\u00FF].*)/i.test(e)===!0||/^[('"]?([0-9]{1,4})[-–—]([a-z\u00C0-\u00FF`"'/-]+[)'"]?$)/i.test(e)===!0},co=function(e){let t=[],n=e.split(/[-–—]/),r=`-`,i=e.match(/[-–—]/);i&&i[0]&&(r=i);for(let e=0;e<n.length;e++)e===n.length-1?t.push(n[e]):t.push(n[e]+r);return t},lo=function(e){let t=/^[0-9]{1,4}(:[0-9][0-9])?([a-z]{1,2})? ?[-–—] ?$/,n=/^[0-9]{1,4}([a-z]{1,2})? ?$/;for(let r=0;r<e.length-1;r+=1)e[r+1]&&t.test(e[r])&&n.test(e[r+1])&&(e[r]=e[r]+e[r+1],e[r+1]=null);return e},uo=/\p{L} ?\/ ?\p{L}+$/u,fo=function(e){for(let t=1;t<e.length-1;t++)uo.test(e[t])&&(e[t-1]+=e[t]+e[t+1],e[t]=null,e[t+1]=null);return e},po=/\S/,mo=/^[!?.]+$/,ho=/(\S+)/,go=[`.`,`?`,`!`,`:`,`;`,`-`,`–`,`—`,`--`,`...`,`(`,`)`,`[`,`]`,`"`,`'`,"`",`«`,`»`,`*`,`•`];go=go.reduce((e,t)=>(e[t]=!0,e),{});var _o=function(e){return Object.prototype.toString.call(e)===`[object Array]`},vo=function(e,t){let n=[],r=[];if(e||=``,typeof e==`number`&&(e=String(e)),_o(e))return e;let i=e.split(ho);for(let e=0;e<i.length;e++){if(so(i[e],t)===!0){r=r.concat(co(i[e]));continue}r.push(i[e])}let a=``;for(let e=0;e<r.length;e++){let t=r[e];po.test(t)===!0&&go.hasOwnProperty(t)===!1&&mo.test(t)===!1?(n.length>0?(n[n.length-1]+=a,n.push(t)):n.push(a+t),a=``):a+=t}return a&&(n.length===0&&(n[0]=``),n[n.length-1]+=a),n=fo(n),n=lo(n),n=n.filter(e=>e),n},yo=/\p{Letter}/u,bo=/[\p{Number}\p{Currency_Symbol}]/u,xo=/^[a-z]\.([a-z]\.)+/i,So=/[sn]['’]$/,Co=function(e,t){let{prePunctuation:n,postPunctuation:r,emoticons:i}=t.one,a=e,o=``,s=``,c=Array.from(e);if(i.hasOwnProperty(e.trim()))return{str:e.trim(),pre:o,post:` `};let l=c.length;for(let e=0;e<l;e+=1){let e=c[0];if(n[e]!==!0){if((e===`+`||e===`-`)&&bo.test(c[1])||e===`'`&&e.length===3&&bo.test(c[1])||yo.test(e)||bo.test(e))break;o+=c.shift()}}l=c.length;for(let e=0;e<l;e+=1){let e=c[c.length-1];if(r[e]!==!0){if(yo.test(e)||bo.test(e))break;e===`.`&&xo.test(a)===!0||e===`'`&&So.test(a)===!0||(s=c.pop()+s)}}return e=c.join(``),e===``&&(a=a.replace(/ *$/,e=>(s=e||``,``)),e=a,o=``),{str:e,pre:o,post:s}},wo=(e,t)=>{let{str:n,pre:r,post:i}=Co(e,t);return{text:n,pre:r,post:i,tags:new Set}},To=function(e,t){let n=t.model.one.unicode||{};e||=``;let r=e.split(``);return r.forEach((e,t)=>{n[e]&&(r[t]=n[e])}),r.join(``)},Eo=function(e){e||=``,e=e.toLowerCase(),e=e.trim();let t=e;return e=e.replace(/[,;.!?]+$/,``),e=e.replace(/\u2026/g,`...`),e=e.replace(/\u2013/g,`-`),/^[:;]/.test(e)===!1&&(e=e.replace(/\.{3,}$/g,``),e=e.replace(/[",.!:;?)]+$/g,``),e=e.replace(/^['"(]+/g,``)),e=e.replace(/[\u200B-\u200D\uFEFF]/g,``),e=e.trim(),e===``&&(e=t),e=e.replace(/([0-9]),([0-9])/g,`$1$2`),e},Do=/([A-Z]\.)+[A-Z]?,?$/,Oo=/^[A-Z]\.,?$/,ko=/[A-Z]{2,}('s|,)?$/,Ao=/([a-z]\.)+[a-z]\.?$/,jo=function(e){return Do.test(e)===!0||Ao.test(e)===!0||Oo.test(e)===!0||ko.test(e)===!0},Mo=function(e){return jo(e)&&(e=e.replace(/\./g,``)),e},No=function(e,t){let n=t.methods.one.killUnicode,r=e.text||``;r=Eo(r),r=n(r,t),r=Mo(r),e.normal=r},Po=function(e,t){let{methods:n,model:r}=t,{splitSentences:i,splitTerms:a,splitWhitespace:o}=n.one.tokenize;return e||=``,e=i(e,t).map(e=>{let n=a(e,r);return n=n.map(e=>o(e,r)),n.forEach(e=>{No(e,t)}),n}),e},Fo=/[ .][A-Z]\.? *$/i,Io=/(?:\u2026|\.{2,}) *$/,Lo=/\p{L}/u,Ro=/\. *$/,zo=/^[A-Z]\. $/,Bo={one:{killUnicode:To,tokenize:{splitSentences:oo,isSentence:function(e,t){if(Lo.test(e)===!1||Fo.test(e)===!0||e.length===3&&zo.test(e)||Io.test(e)===!0)return!1;let n=e.replace(/[.!?\u203D\u2E18\u203C\u2047-\u2049] *$/,``).split(` `),r=n[n.length-1].toLowerCase();return!(t.hasOwnProperty(r)===!0&&Ro.test(e)===!0)},splitTerms:vo,splitWhitespace:wo,fromString:Po}}},Vo={"&":`and`,"@":`at`,"%":`percent`,plz:`please`,bein:`being`},Ho=`approx.apt.bc.cyn.eg.esp.est.etc.ex.exp.prob.pron.gal.min.pseud.fig.jd.lat.lng.vol.fm.def.misc.plz.ea.ps.sec.pt.pref.pl.pp.qt.fr.sq.nee.ss.tel.temp.vet.ver.fem.masc.eng.adj.vb.rb.inf.situ.vivo.vitro.wr`.split(`.`),Uo=`adj.adm.adv.asst.atty.bldg.brig.capt.cmdr.comdr.cpl.det.dr.esq.gen.gov.hon.jr.llb.lt.maj.messrs.mlle.mme.mr.mrs.ms.mstr.phd.prof.pvt.rep.reps.res.rev.sen.sens.sfc.sgt.sir.sr.supt.surg`.split(`.`),Wo=[`jan`,`feb`,`mar`,`apr`,`jun`,`jul`,`aug`,`sep`,`sept`,`oct`,`nov`,`dec`],Go=[`ad`,`al`,`arc`,`ba`,`bl`,`ca`,`cca`,`col`,`corp`,`ft`,`fy`,`ie`,`lit`,`ma`,`md`,`pd`,`tce`],Ko=[`dept`,`univ`,`assn`,`bros`,`inc`,`ltd`,`co`],qo=`rd.st.dist.mt.ave.blvd.cl.cres.hwy.ariz.cal.calif.colo.conn.fla.fl.ga.ida.ia.kan.kans.minn.neb.nebr.okla.penna.penn.pa.dak.tenn.tex.ut.vt.va.wis.wisc.wy.wyo.usafa.alta.ont.que.sask`.split(`.`),Jo=[[Ho],[`dl.ml.gal.qt.pt.tbl.tsp.tbsp.km.dm.cm.mm.mi.td.hr.hrs.kg.hg.dg.cg.mg.µg.lb.oz.sq ft.hz.mps.mph.kmph.kb.mb.tb.lx.lm.fl oz.yb`.split(`.`),`Unit`],[Go,`Noun`],[Uo,`Honorific`],[Wo,`Month`],[Ko,`Organization`],[qo,`Place`]],Yo={},Xo={};Jo.forEach(e=>{e[0].forEach(t=>{Yo[t]=!0,Xo[t]=`Abbreviation`,e[1]!==void 0&&(Xo[t]=[Xo[t],e[1]])})});var Zo=`anti.bi.co.contra.de.extra.infra.inter.intra.macro.micro.mis.mono.multi.peri.pre.pro.proto.pseudo.re.sub.supra.trans.tri.un.out.ex`.split(`.`).reduce((e,t)=>(e[t]=!0,e),{}),Qo={like:!0,ish:!0,less:!0,able:!0,elect:!0,type:!0,designate:!0},$o={"!":`¡`,"?":`¿Ɂ`,'"':`“”"❝❞`,"'":`‘‛❛❜’`,"-":`—–`,a:`ªÀÁÂÃÄÅàáâãäåĀāĂ㥹ǍǎǞǟǠǡǺǻȀȁȂȃȦȧȺΆΑΔΛάαλАаѦѧӐӑӒӓƛæ`,b:`ßþƀƁƂƃƄƅɃΒβϐϦБВЪЬвъьѢѣҌҍ`,c:`¢©ÇçĆćĈĉĊċČčƆƇƈȻȼͻͼϲϹϽϾСсєҀҁҪҫ`,d:`ÐĎďĐđƉƊȡƋƌ`,e:`ÈÉÊËèéêëĒēĔĕĖėĘęĚěƐȄȅȆȇȨȩɆɇΈΕΞΣέεξϵЀЁЕеѐёҼҽҾҿӖӗễ`,f:`ƑƒϜϝӺӻҒғſ`,g:`ĜĝĞğĠġĢģƓǤǥǦǧǴǵ`,h:`ĤĥĦħƕǶȞȟΉΗЂЊЋНнђћҢңҤҥҺһӉӊ`,I:`ÌÍÎÏ`,i:`ìíîïĨĩĪīĬĭĮįİıƖƗȈȉȊȋΊΐΪίιϊІЇіїi̇`,j:`ĴĵǰȷɈɉϳЈј`,k:`ĶķĸƘƙǨǩΚκЌЖКжкќҚқҜҝҞҟҠҡ`,l:`ĹĺĻļĽľĿŀŁłƚƪǀǏǐȴȽΙӀӏ`,m:`ΜϺϻМмӍӎ`,n:`ÑñŃńŅņŇňʼnŊŋƝƞǸǹȠȵΝΠήηϞЍИЙЛПийлпѝҊҋӅӆӢӣӤӥπ`,o:`ÒÓÔÕÖØðòóôõöøŌōŎŏŐőƟƠơǑǒǪǫǬǭǾǿȌȍȎȏȪȫȬȭȮȯȰȱΌΘΟθοσόϕϘϙϬϴОФоѲѳӦӧӨөӪӫ`,p:`ƤΡρϷϸϼРрҎҏÞ`,q:`Ɋɋ`,r:`ŔŕŖŗŘřƦȐȑȒȓɌɍЃГЯгяѓҐґ`,s:`ŚśŜŝŞşŠšƧƨȘșȿЅѕ`,t:`ŢţŤťŦŧƫƬƭƮȚțȶȾΓΤτϮТт`,u:`ÙÚÛÜùúûüŨũŪūŬŭŮůŰűŲųƯưƱƲǓǔǕǖǗǘǙǚǛǜȔȕȖȗɄΰυϋύ`,v:`νѴѵѶѷ`,w:`ŴŵƜωώϖϢϣШЩшщѡѿ`,x:`×ΧχϗϰХхҲҳӼӽӾӿ`,y:`ÝýÿŶŷŸƳƴȲȳɎɏΎΥΫγψϒϓϔЎУучўѰѱҮүҰұӮӯӰӱӲӳ`,z:`ŹźŻżŽžƵƶȤȥɀΖ`},es={};Object.keys($o).forEach(function(e){$o[e].split(``).forEach(function(t){es[t]=e})});var ts={one:{aliases:Vo,abbreviations:Yo,prefixes:Zo,suffixes:Qo,prePunctuation:{"#":!0,"@":!0,_:!0,"°":!0,"​":!0,"‌":!0,"‍":!0,"":!0},postPunctuation:{"%":!0,_:!0,"°":!0,"​":!0,"‌":!0,"‍":!0,"":!0},lexicon:Xo,unicode:es,emoticons:{"<3":!0,"</3":!0,"<\\3":!0,":^P":!0,":^p":!0,":^O":!0,":^3":!0}}},ns=/\//,rs=/[a-z]\.[a-z]/i,is=/[0-9]/,as=function(e,t){let n=e.normal||e.text||e.machine,r=t.model.one.aliases;if(r.hasOwnProperty(n)&&(e.alias=e.alias||[],e.alias.push(r[n])),ns.test(n)&&!rs.test(n)&&!is.test(n)){let t=n.split(ns);t.length<=3&&t.forEach(t=>{t=t.trim(),t!==``&&(e.alias=e.alias||[],e.alias.push(t))})}return e},os=/^\p{Letter}+-\p{Letter}+$/u,ss=function(e){let t=e.implicit||e.normal||e.text;t=t.replace(/['’]s$/,``),t=t.replace(/s['’]$/,`s`),t=t.replace(/([aeiou][ktrp])in'$/,`$1ing`),os.test(t)&&(t=t.replace(/-/g,``)),t=t.replace(/^[#@]/,``),t!==e.normal&&(e.machine=t)},cs=function(e){let t=e.docs,n={};for(let e=0;e<t.length;e+=1)for(let r=0;r<t[e].length;r+=1){let i=t[e][r],a=i.machine||i.normal;n[a]=n[a]||0,n[a]+=1}for(let e=0;e<t.length;e+=1)for(let r=0;r<t[e].length;r+=1){let i=t[e][r];i.freq=n[i.machine||i.normal]}},ls=function(e){let t=0,n=0,r=e.document;for(let e=0;e<r.length;e+=1)for(let i=0;i<r[e].length;i+=1){let a=r[e][i];a.offset={index:n,start:t+a.pre.length,length:a.text.length},t+=a.pre.length+a.text.length+a.post.length,n+=1}},us=function(e){let t=e.document;for(let e=0;e<t.length;e+=1)for(let n=0;n<t[e].length;n+=1)t[e][n].index=[e,n]},ds=function(e){let t=0,n=e.docs;for(let e=0;e<n.length;e+=1)for(let r=0;r<n[e].length;r+=1)n[e][r].normal!==``&&(t+=1,n[e][r].wordCount=t)},fs=function(e,t){let n=e.docs;for(let r=0;r<n.length;r+=1)for(let i=0;i<n[r].length;i+=1)t(n[r][i],e.world)},ps={compute:{alias:e=>fs(e,as),machine:e=>fs(e,ss),normal:e=>fs(e,No),freq:cs,offset:ls,index:us,wordCount:ds},methods:Bo,model:ts,hooks:[`alias`,`machine`,`index`,`id`]},ms={typeahead:function(e){let t=e.model.one.typeahead,n=e.docs;if(n.length===0||Object.keys(t).length===0)return;let r=n[n.length-1]||[],i=r[r.length-1];if(!i.post&&t.hasOwnProperty(i.normal)){let n=t[i.normal];i.implicit=n,i.machine=n,i.typeahead=!0,e.compute.preTagger&&e.last().unTag(`*`).compute([`lexicon`,`preTagger`])}}},hs=function(){let e=this.docs;if(e.length===0)return this;let t=e[e.length-1]||[],n=t[t.length-1];return n.typeahead===!0&&n.machine&&(n.text=n.machine,n.normal=n.machine),this},gs=function(e){e.prototype.autoFill=hs},_s=function(e,t,n){let r={},i=[],a=n.prefixes||{};return e.forEach(e=>{e=e.toLowerCase().trim();let o=e.length;t.max&&o>t.max&&(o=t.max);for(let s=t.min;s<o;s+=1){let o=e.substring(0,s);if(!(t.safe&&n.model.one.lexicon.hasOwnProperty(o))){if(a.hasOwnProperty(o)===!0){i.push(o);continue}if(r.hasOwnProperty(o)===!0){i.push(o);continue}r[o]=e}}}),r=Object.assign({},a,r),i.forEach(e=>{delete r[e]}),r},vs=e=>Object.prototype.toString.call(e)===`[object Object]`,ys={safe:!0,min:3},bs={model:{one:{typeahead:{}}},api:gs,lib:{typeahead:function(e=[],t={}){let n=this.model();t=Object.assign({},ys,t),vs(e)&&(Object.assign(n.one.lexicon,e),e=Object.keys(e));let r=_s(e,t,this.world());return Object.keys(r).forEach(e=>{if(n.one.typeahead.hasOwnProperty(e)){delete n.one.typeahead[e];return}n.one.typeahead[e]=r[e]}),this}},compute:ms,hooks:[`typeahead`]};R.extend(tt),R.extend(hi),R.extend(Er),R.extend(Fi),R.extend(Ra),R.plugin(At),R.extend(ps),R.extend(It),R.plugin(pe),R.extend(Qt),R.extend(bs),R.extend(Vt),R.extend(Yi);var xs=R,Ss={addendum:`addenda`,corpus:`corpora`,criterion:`criteria`,curriculum:`curricula`,genus:`genera`,memorandum:`memoranda`,opus:`opera`,ovum:`ova`,phenomenon:`phenomena`,referendum:`referenda`,alga:`algae`,alumna:`alumnae`,antenna:`antennae`,formula:`formulae`,larva:`larvae`,nebula:`nebulae`,vertebra:`vertebrae`,analysis:`analyses`,axis:`axes`,diagnosis:`diagnoses`,parenthesis:`parentheses`,prognosis:`prognoses`,synopsis:`synopses`,thesis:`theses`,neurosis:`neuroses`,appendix:`appendices`,index:`indices`,matrix:`matrices`,ox:`oxen`,sex:`sexes`,alumnus:`alumni`,bacillus:`bacilli`,cactus:`cacti`,fungus:`fungi`,hippopotamus:`hippopotami`,libretto:`libretti`,modulus:`moduli`,nucleus:`nuclei`,octopus:`octopi`,radius:`radii`,stimulus:`stimuli`,syllabus:`syllabi`,cookie:`cookies`,calorie:`calories`,auntie:`aunties`,movie:`movies`,pie:`pies`,rookie:`rookies`,tie:`ties`,zombie:`zombies`,leaf:`leaves`,loaf:`loaves`,thief:`thieves`,foot:`feet`,goose:`geese`,tooth:`teeth`,beau:`beaux`,chateau:`chateaux`,tableau:`tableaux`,bus:`buses`,gas:`gases`,circus:`circuses`,crisis:`crises`,virus:`viruses`,database:`databases`,excuse:`excuses`,abuse:`abuses`,avocado:`avocados`,barracks:`barracks`,child:`children`,clothes:`clothes`,echo:`echoes`,embargo:`embargoes`,epoch:`epochs`,deer:`deer`,halo:`halos`,man:`men`,woman:`women`,mosquito:`mosquitoes`,mouse:`mice`,person:`people`,quiz:`quizzes`,rodeo:`rodeos`,shoe:`shoes`,sombrero:`sombreros`,stomach:`stomachs`,tornado:`tornados`,tuxedo:`tuxedos`,volcano:`volcanoes`},Cs={Comparative:`true¦bett1f0;arth0ew0in0;er`,Superlative:`true¦earlier`,PresentTense:`true¦bests,sounds`,Condition:`true¦lest,unless`,PastTense:`true¦began,came,d4had,kneel3l2m0sa4we1;ea0sg2;nt;eap0i0;ed;id`,Participle:`true¦0:09;a06b01cZdXeat0fSgQhPoJprov0rHs7t6u4w1;ak0ithdra02o2r1;i02uY;k0v0;nd1pr04;ergoJoJ;ak0hHo3;e9h7lain,o6p5t4un3w1;o1um;rn;g,k;ol0reS;iQok0;ught,wn;ak0o1runk;ne,wn;en,wn;ewriNi1uJ;dd0s0;ut3ver1;do4se0t1;ak0h2;do2g1;roG;ne;ast0i7;iv0o1;ne,tt0;all0loBor1;bi3g2s1;ak0e0;iv0o9;dd0;ove,r1;a5eamt,iv0;hos0lu1;ng;e4i3lo2ui1;lt;wn;tt0;at0en,gun;r2w1;ak0ok0;is0;en`,Gerund:`true¦accord0be0doin,go0result0stain0;ing`,Expression:`true¦a0Yb0Uc0Sd0Oe0Mfarew0Lg0FhZjeez,lWmVnToOpLsJtIuFvEw7y0;a5e3i1u0;ck,p;k04p0;ee,pee;a0p,s;!h;!a,h,y;a5h2o1t0;af,f;rd up,w;atsoever,e1o0;a,ops;e,w;hoo,t;ery w06oi0L;gh,h0;! 0h,m;huh,oh;here nPsk,ut tut;h0ic;eesh,hh,it,oo;ff,h1l0ow,sst;ease,s,z;ew,ooey;h1i,mg,o0uch,w,y;h,o,ps;! 0h;hTmy go0wT;d,sh;a7evertheless,o0;!pe;eh,mm;ah,eh,m1ol0;!s;ao,fao;aCeBi9o2u0;h,mph,rra0zzC;h,y;l1o0;r6y9;la,y0;! 0;c1moCsmok0;es;ow;!p hip hoor0;ay;ck,e,llo,y;ha1i,lleluj0;ah;!ha;ah,ee4o1r0;eat scott,r;l1od0sh; grief,bye;ly;! whiz;ell;e0h,t cetera,ureka,ww,xcuse me;k,p;'oh,a0rat,uh;m0ng;mit,n0;!it;mon,o0;ngratulations,wabunga;a2oo1r0tw,ye;avo,r;!ya;h,m; 1h0ka,las,men,rgh,ye;!a,em,h,oy;la`,Negative:`true¦n0;ever,o0;n,t`,QuestionWord:`true¦how3wh0;at,e1ich,o0y;!m,se;n,re; come,'s`,Reflexive:`true¦h4it5my5o1the0your2;ir1m1;ne3ur0;sel0;f,ves;er0im0;self`,Plural:`true¦dick0gre0ones,records;ens`,"Unit|Noun":`true¦cEfDgChBinchAk9lb,m6newt5oz,p4qt,t1y0;ardEd;able1b0ea1sp;!l,sp;spo1;a,t,x;on9;!b,g,i1l,m,p0;h,s;!les;!b,elvin,g,m;!es;g,z;al,b;eet,oot,t;m,up0;!s`,Value:`true¦a few`,Imperative:`true¦bewa0come he0;re`,"Plural|Verb":`true¦leaves`,Demonym:`true¦0:15;1:12;a0Vb0Oc0Dd0Ce08f07g04h02iYjVkTlPmLnIomHpEqatari,rCs7t5u4v3welAz2;am0Gimbabwe0;enezuel0ietnam0I;gAkrai1;aiwTex0hai,rinida0Ju2;ni0Prkmen;a5cotti4e3ingapoOlovak,oma0Spaniard,udRw2y0W;ede,iss;negal0Cr09;sh;mo0uT;o5us0Jw2;and0;a2eru0Fhilippi0Nortugu07uerto r0S;kist3lesti1na2raguay0;ma1;ani;ami00i2orweP;caragu0geri2;an,en;a3ex0Lo2;ngo0Drocc0;cedo1la2;gasy,y07;a4eb9i2;b2thua1;e0Cy0;o,t01;azakh,eny0o2uwaiI;re0;a2orda1;ma0Ap2;anO;celandic,nd4r2sraeli,ta01vo05;a2iB;ni0qi;i0oneU;aiAin2ondur0unO;di;amEe2hanai0reek,uatemal0;or2rm0;gi0;ilipino,ren8;cuadoVgyp4mira3ngli2sto1thiopi0urope0;shm0;ti;ti0;aPominUut3;a9h6o4roat3ub0ze2;ch;!i0;lom2ngol5;bi0;a6i2;le0n2;ese;lifor1m2na3;bo2eroo1;di0;angladeshi,el6o4r3ul2;gaE;azi9it;li2s1;vi0;aru2gi0;si0;fAl7merBngol0r5si0us2;sie,tr2;a2i0;li0;genti2me1;ne;ba1ge2;ri0;ni0;gh0r2;ic0;an`,Organization:`true¦0:4Q;a3Tb3Bc2Od2He2Df27g1Zh1Ti1Pj1Nk1Ll1Gm12n0Po0Mp0Cqu0Br02sTtHuCv9w3xiaomi,y1;amaha,m1Bou1w1B;gov,tu3C;a4e2iki1orld trade organizati33;leaRped0O;lls fargo,st1;fie2Hinghou2R;l1rner br3U;gree3Jl street journ2Im1E;an halOeriz2Xisa,o1;dafo2Yl1;kswagMvo;b4kip,n2ps,s1;a tod3Aps;es3Mi1;lev3Fted natio3C;er,s; mobi32aco beRd bOe9gi frida3Lh3im horto3Amz,o1witt3D;shi49y1;ota,s r 05;e 1in lizzy;b3carpen3Jdaily ma3Dguess w2holli0s1w2;mashing pumpki35uprem0;ho;ea1lack eyed pe3Xyr0Q;ch bo3Dtl0;l2n3Qs1xas instrumen1U;co,la m1F;efoni0Kus;a8cientology,e5ieme2Ymirnoff,np,o3pice gir6quare0Ata1ubaru;rbuc1to34;ks;ny,undgard1;en;a2x pisto1;ls;g1Wrs;few2Minsbur31lesfor03msu2E;adiohead,b8e4o1yana3C;man empi1Xyal 1;b1dutch she4;ank;a3d 1max,vl20;bu1c2Ahot chili peppe2Ylobst2N;ll;ders dige1Ll madrid;c,s;ant3Aizn2Q;a8bs,e5fiz2Ihilip4i3r1;emier 1udenti1D;leagTo2K;nk floyd,zza hut; morrBs;psi2tro1uge0E;br33chi0Tn33;!co;lant2Un1yp16; 2ason27da2P;ld navy,pec,range juli2xf1;am;us;aAb9e6fl,h5i4o1sa,vid3wa;k2tre dame,vart1;is;ia;ke,ntendo,ss0QvZ;l,s;c,st1Otflix,w1; 1sweek;kids on the block,york0D;a,c;nd22s2t1;ional aca2Po,we0U;a,c02d0S;aDcdonalCe9i6lb,o3tv,y1;spa1;ce;b1Tnsanto,ody blu0t1;ley cr1or0T;ue;c2t1;as,subisO;helin,rosoft;dica2rcedes benz,talli1;ca;id,re;ds;cs milk,tt19z24;a3e1g,ittle caesa1P; ore09novo,x1;is,mark,us; 1bour party;pres0Dz boy;atv,fc,kk,lm,m1od1O;art;iffy lu0Roy divisi0Jpmorgan1sa;! cha09;bm,hop,k3n1tv;g,te1;l,rpol;ea;a5ewlett pack1Vi3o1sbc,yundai;me dep1n1P;ot;tac1zbollah;hi;lliburt08sbro;eneral 6hq,ithub,l5mb,o2reen d0Ou1;cci,ns n ros0;ldman sachs,o1;dye1g0H;ar;axo smith kli04encoW;electr0Nm1;oto0Z;a5bi,c barcelo4da,edex,i2leetwood m03o1rito l0G;rd,xcY;at,fa,nancial1restoZ; tim0;na;cebook,nnie mae;b0Asa,u3xxon1; m1m1;ob0J;!rosceptics;aiml0De5isney,o4u1;nkin donu2po0Zran dur1;an;ts;j,w jon0;a,f lepp12ll,peche mode,r spieg02stiny's chi1;ld;aJbc,hFiDloudflaCnn,o3r1;aigsli5eedence clearwater reviv1ossra09;al;c7inba6l4m1o0Est09;ca2p1;aq;st;dplSg1;ate;se;a c1o chanQ;ola;re;a,sco1tigroup;! systems;ev2i1;ck fil a,na daily;r1y;on;d2pital o1rls jr;ne;bury,ill1;ac;aEbc,eBf9l5mw,ni,o1p,rexiteeU;ei3mbardiIston 1;glo1pizza;be;ng;o2ue c1;roV;ckbuster video,omingda1;le; g1g1;oodriL;cht2e ge0rkshire hathaw1;ay;el;cardi,idu,nana republ3s1xt5y5;f,kin robbi1;ns;ic;bYcTdidSerosmith,iRlKmEnheuser busDol,ppleAr6s4u3v2y1;er;is,on;di,todesk;hland o1sociated E;il;b3g2m1;co;os;ys; compu1be0;te1;rs;ch;c,d,erican3t1;!r1;ak; ex1;pre1;ss; 5catel2ta1;ir;! lu1;ce1;nt;jazeera,qae1;da;g,rbnb;as;/dc,a3er,tivision1;! blizz1;ard;demy of scienc0;es;ba`,Possessive:`true¦its,my,our0thy;!s`,"Noun|Verb":`true¦0:9W;1:AA;2:96;3:A3;4:9R;5:A2;6:9K;7:8N;8:7L;9:A8;A:93;B:8D;C:8X;a9Ob8Qc7Id6Re6Gf5Sg5Hh55i4Xj4Uk4Rl4Em40n3Vo3Sp2Squ2Rr21s0Jt02u00vVwGyFzD;ip,oD;ne,om;awn,e6Fie68;aOeMhJiHoErD;ap,e9Oink2;nd0rDuC;kDry,sh5Hth;!shop;ck,nDpe,re,sh;!d,g;e86iD;p,sD;k,p0t2;aDed,lco8W;r,th0;it,lk,rEsDt4ve,x;h,te;!ehou1ra9;aGen5FiFoD;iDmAte,w;ce,d;be,ew,sA;cuum,l4B;pDr7;da5gra6Elo6A;aReQhrPiOoMrGuEwiDy5Z;n,st;nDrn;e,n7O;aGeFiEoDu6;t,ub2;bu5ck4Jgg0m,p;at,k,nd;ck,de,in,nsDp,v7J;f0i8R;ll,ne,p,r4Yss,t94uD;ch,r;ck,de,e,le,me,p,re;e5Wow,u6;ar,e,ll,mp0st,xt;g,lDng2rg7Ps5x;k,ly;a0Sc0Ne0Kh0Fi0Dk0Cl0Am08n06o05pXquaBtKuFwD;ea88iD;ng,pe,t4;bGit,m,ppErD;fa3ge,pri1v2U;lDo6S;e6Py;!je8;aMeLiKoHrEuDy2;dy,ff,mb2;a85eEiDo5Pugg2;ke,ng;am,ss,t4;ckEop,p,rD;e,m;ing,pi2;ck,nk,t4;er,m,p;ck,ff,ge,in,ke,lEmp,nd,p2rDte,y;!e,t;k,l;aJeIiHlGoFrDur,y;ay,e56inDu3;g,k2;ns8Bt;a5Qit;ll,n,r87te;ed,ll;m,n,rk;b,uC;aDee1Tow;ke,p;a5Je4FiDo53;le,rk;eep,iDou4;ce,p,t;ateboa7Ii;de,gnDl2Vnk,p,ze;!al;aGeFiEoDuff2;ck,p,re,w;ft,p,v0;d,i3Ylt0;ck,de,pe,re,ve;aEed,nDrv1It;se,t2N;l,r4t;aGhedu2oBrD;aEeDibb2o3Z;en,w;pe,t4;le,n,r2M;cDfegua72il,mp2;k,rifi3;aZeHhy6LiGoEuD;b,in,le,n,s5X;a6ck,ll,oDpe,u5;f,t;de,ng,ot,p,s1W;aTcSdo,el,fQgPje8lOmMnLo17pJque6sFturn,vDwa6V;eDi27;al,r1;er74oFpe8tEuD;lt,me;!a55;l71rt;air,eaDly,o53;l,t;dezvo2Zt;aDedy;ke,rk;ea1i4G;a6Iist0r5N;act6Yer1Vo71uD;nd,se;a38o6F;ch,s6G;c1Dge,iEke,lly,nDp1Wt1W;ge,k,t;n,se;es6Biv0;a04e00hYiXlToNrEsy4uD;mp,n4rcha1sh;aKeIiHoDu4O;be,ceFdu3fi2grDje8mi1p,te6;amDe6W;!me;ed,ss;ce,de,nt;sDy;er6Cs;cti3i1;iHlFoEp,re,sDuCw0;e,i5Yt;l,p;iDl;ce,sh;nt,s5V;aEce,e32uD;g,mp,n7;ce,nDy;!t;ck,le,n17pe,tNvot;a1oD;ne,tograph;ak,eFnErDt;fu55mA;!c32;!l,r;ckJiInHrFsEtDu1y;ch,e9;s,te;k,tD;!y;!ic;nt,r,se;!a7;bje8ff0il,oErDutli3Qver4B;bAd0ie9;ze;a4ReFoDur1;d,tD;e,i3;ed,gle8tD;!work;aMeKiIoEuD;rd0;ck,d3Rld,nEp,uDve;nt,th;it5EkD;ey;lk,n4Brr5CsDx;s,ta2B;asuBn4UrDss;ge,it;il,nFp,rk3WsEtD;ch,t0;h,k,t0;da5n0oeuvB;aLeJiHoEuD;mp,st;aEbby,ck,g,oDve;k,t;d,n;cDe,ft,mAnIst;en1k;aDc0Pe4vK;ch,d,k,p,se;bFcEnd,p,t4uD;gh,n4;e,k;el,o2U;eEiDno4E;ck,d,ll,ss;el,y;aEo1OuD;i3mp;m,zz;mpJnEr46ssD;ue;c1Rdex,fluGha2k,se2HteDvoi3;nt,rD;e6fa3viD;ew;en3;a8le2A;aJeHiGoEuD;g,nt;l3Ano2Dok,pDr1u1;!e;ghli1Fke,nt,re,t;aDd7lp;d,t;ck,mGndFrEsh,tDu9;ch,e;bo3Xm,ne4Eve6;!le;!m0;aMear,ift,lKossJrFuD;arDe4Alp,n;antee,d;aFiEoDumb2;uCwth;ll,nd,p;de,sp;ip;aBoDue;ss,w;g,in,me,ng,s,te,ze;aZeWiRlNoJrFuD;ck,el,nDss,zz;c38d;aEoDy;st,wn;cDgme,me,nchi1;tuB;cFg,il,ld,rD;ce,e29mDwa31;!at;us;aFe0Vip,oDy;at,ck,od,wD;!er;g,ke,me,re,sh,vo1E;eGgFlEnDre,sh,t,x;an3i0Q;e,m,t0;ht,uB;ld;aEeDn3;d,l;r,tuB;ce,il,ll,rm,vo2W;cho,d7ffe8nMsKxFyeD;!baD;ll;cGerci1hFpDtra8;eriDo0W;en3me9;au6ibA;el,han7u1;caDtima5;pe;count0d,vy;a01eSiMoJrEuDye;b,el,mp,pli2X;aGeFiEoD;ne,p;ft,ll,nk,p,ve;am,ss;ft,g,in;cEd7ubt,wnloD;ad;k,u0E;ge6p,sFt4vD;e,iDor3;de;char7gui1h,liEpD;at4lay,u5;ke;al,bKcJfeIlGmaCposAsEtaD;il;e07iD;gn,re;ay,ega5iD;ght;at,ct;li04rea1;a5ut;b,ma7n3rDte;e,t;a0Eent0Dh06irc2l03oKrFuD;be,e,rDt;b,e,l,ve;aGeFoEuDy;sh;p,ss,wd;dAep;ck,ft,sh;at,de,in,lTmMnFordina5py,re,st,uDv0;gh,nDp2rt;s01t;ceHdu8fli8glomeIsFtDveN;a8rD;a6ol;e9tru8;ct;ntDrn;ra5;bHfoGmFpD;leDouCromi1;me9;aCe9it,u5;rt;at,iD;ne;lap1oD;r,ur;aEiDoud,ub;ck,p;im,w;aEeDip;at,ck,er;iGllen7nErD;ge,m,t;ge,nD;el;n,r;er,re;ke,ll,mp,noe,pGrXsFtEuDve;se,ti0I;alog,ch;h,t;!tuB;re;a03eZiXlToPrHuEyD;pa11;bb2ck2dgEff0mp,rDst,zz;den,n;et;anJeHiFoadEuD;i1sh;ca6;be,d7;ge;aDed;ch,k;ch,d;aFg,mb,nEoDrd0tt2x,ycott;k,st,t;d,e;rd,st;aFeCiDoYur;nk,tz;nd;me;as,d,ke,nd,opsy,tD;!ch,e;aFef,lt,nDt;d,efA;it;r,t;ck,il,lan3nIrFsEtt2;le;e,h;!gDk;aDe;in;!d,g,k;bu1c05dZge,iYlVnTppQrLsIttGucEwaD;rd;tiD;on;aDempt;ck;k,sD;i6ocia5;st;chFmD;!oD;ur;!iD;ve;eEroa4;ch;al;chDg0sw0;or;aEt0;er;rm;d,m,r;dreHvD;an3oD;ca5;te;ce;ss;cDe,he,t;eFoD;rd,u9;nt;nt,ss;se`,Actor:`true¦0:7B;1:7G;2:6A;3:7F;4:7O;5:7K;a6Nb62c4Ud4Be41f3Sg3Bh30i2Uj2Qkin2Pl2Km26n1Zo1Sp0Vqu0Tr0JsQtJuHvEw8yo6;gi,ut6;h,ub0;aAe9i8o7r6;estl0it0;m2rk0;fe,nn0t2Bza2H;atherm2ld0;ge earn0it0nder0rri1;eter7i6oyF;ll5Qp,s3Z;an,ina2U;n6s0;c6Uder03;aoisea23e9herapi5iktok0o8r6ut1yco6S;a6endseLo43;d0mp,nscri0Bvel0;ddl0u1G;a0Qchn7en6na4st0;ag0;i3Oo0D;aiXcUeRhPiMki0mu26oJpGquaFtBu7wee6;p0theart;lt2per7r6;f0ge6Iviv1;h6inten0Ist5Ivis1;ero,um2;a8ep7r6;ang0eam0;bro2Nc2Ofa2Nmo2Nsi20;ff0tesm2;tt0;ec7ir2Do6;kesp59u0M;ia5Jt3;l7me6An,rcere6ul;r,ss;di0oi5;n7s6;sy,t0;g0n0;am2ephe1Iow6;girl,m2r2Q;cretInior cit3Fr6;gea4v6;a4it1;hol4Xi7reen6ulpt1;wr2C;e01on;l1nt;aEe9o8u6;l0nn6;er up,ingE;g40le mod3Zof0;a4Zc8fug2Ppo32searQv6;ere4Uolution6;ary;e6luYru22;ptio3T;bbi,dic5Vpp0;arter6e2Z;back;aYeWhSiRlOoKr8sycho7u6;nk,p31;logi5;aGeDiBo6;d9fess1g7ph47s6;pe2Ktitu51;en6ramm0;it1y;igy,uc0;est4Nme mini0Unce6s3E;!ss;a7si6;de4;ch0;ctiti39nk0P;dca0Oet,li6pula50rnst42;c2Itic6;al scie6i2;nti5;a6umb0;nn0y6;er,ma4Lwright;lgrim,one0;a8iloso7otogra7ra6ysi1V;se;ph0;ntom,rmaci5;r6ssi1T;form0s4O;i3El,nel3Yr8st1tr6wn;i6on;arWot;ent4Wi42tn0;ccupa4ffBp8r7ut6;ca5l0B;ac4Iganiz0ig2Fph2;er3t6;i1Jomet6;ri5;ic0spring;aBe9ie4Xo7u6;n,rser3J;b6mad,vi4V;le2Vo4D;i6mesis,phew;ce,ghb1;nny,rr3t1X;aEeDiAo7u6yst1Y;m8si16;der3gul,m7n6th0;arDk;!my;ni7s6;f02s0Jt0;on,st0;chan1Qnt1rcha4;gi9k0n8rtyr,t6y1;e,riar6;ch;ag0iac;ci2stra3I;a7e2Aieutena4o6;rd,s0v0;bor0d7ndlo6ss,urea3Fwy0ym2;rd;!y;!s28;e8o7u6;ggl0;gg0urna2U;st0;c3Hdol,llu3Ummigra4n6; l9c1Qfa4habi42nov3s7ve6;nt1stig3;pe0Nt6;a1Fig3ru0M;aw;airFeBistoAo8u6ygie1K;man6sba2H;!ita8;bo,st6usekN;age,e3P;ri2;ir,r6;m7o6;!ine;it;dress0sty2C;aLeIhostGirl26ladi3oCrand7u6;e5ru;c9daug0Jfa8m7pa6s2Y;!re4;a,o6;th0;hi1B;al7d6lf0;!de3A;ie,k6te26;eep0;!wr6;it0;isha,n6;i6tl04;us;mbl0rden0;aDella,iAo7r6;eela2Nie1P;e,re6ster pare4;be1Hm2r6st0;unn0;an2ZgZlmm17nanci0r6tt0;e6st la2H; marsh2OfigXm2;rm0th0;conoEdDlectriCm8n7x6;amin0cellency,i2A;emy,trepreneur,vironmenta1J;c8p6;er1loye6;e,r;ee;ci2;it1;mi5;aKeBi8ork,ri7u6we02;de,tche2H;ft0v0;ct3eti7plom2Hre6va;ct1;ci2ti2;aDcor3fencCi0InAput9s7tectLvel6;op0;ce1Ge6ign0;rt0;ee,y;iz6;en;em2;c1Ml0;d8nc0redev7ug6;ht0;il;!dy;a06e04fo,hXitizenWlToBr9u6;r3stomer6;! representat6;ive;e3it6;ic;lJmGnAord9rpor1Nu7w6;boy,ork0;n6ri0;ciTte1Q;in3;fidantAgressSs9t6;e0Kr6;ibut1o6;ll0;tab13ul1O;!e;edi2m6pos0rade;a0EeQissi6;on0;leag8on7um6;ni5;el;ue;e6own;an0r6;ic,k;!s;a9e7i6um;ld;erle6f;ad0;ir7nce6plFract0;ll1;m2wI;lebri6o;ty;dBptAr6shi0;e7pe6;nt0;r,t6;ak0;ain;et;aMeLiJlogg0oErBu6;dd0Fild0rgl9siness6;m2p7w6;om2;ers05;ar;i7o6;!k0th0;cklay0de,gadi0;hemi2oge8y6;!frie6;nd;ym2;an;cyc6sR;li5;atbox0ings;by,nk0r6;b0on7te6;nd0;!e07;c04dWge4nQpLrHsFtAu7yatull6;ah;nt7t6;h1oG;!ie;h8t6;e6orney;nda4;ie5le6;te;sis00tron6;aut,om0;chbis8isto7tis6;an,t;crU;hop;ost9p6;ari6rentiS;ti6;on;le;a9cest1im3nou8y6;bo6;dy;nc0;ly5rc6;hi5;mi8v6;entur0is1;er;ni7r6;al;str3;at1;or;counBquaintanArob9t6;ivi5or,re6;ss;st;at;ce;ta4;nt`,"Adj|Noun":`true¦0:16;a1Db17c0Ud0Re0Mf0Dg0Ah08i06ju05l02mWnUoSpNrIsBt7u4v1watershed;a1ision0Z;gabo4nilla,ria1;b0Vnt;ndergr1pstairs;adua14ou1;nd;a3e1oken,ri0;en,r1;min0rori13;boo,n;age,e5ilv0Flack,o3quat,ta2u1well;bordina0Xper5;b0Lndard;ciali0Yl1vereign;e,ve16;cret,n1ri0;ior;a4e2ou1ubbiL;nd,tiY;ar,bBl0Wnt0p1side11;resent0Vublican;ci0Qsh;a4eriodic0last0Zotenti0r1;emi2incip0o1;!fession0;er,um;rall4st,tie0U;ff1pposi0Hv0;ens0Oi0C;agg01ov1uts;el;a5e3iniatJo1;bi01der07r1;al,t0;di1tr0N;an,um;le,riG;attOi2u1;sh;ber0ght,qC;stice,veniT;de0mpressioYn1;cumbe0Edividu0no0Dsta0Eterim;alf,o1umdrum;bby,melF;en2old,ra1;ph0Bve;er0ious;a7e5i4l3u1;git03t1;ure;uid;ne;llow,m1;aFiL;ir,t,vo1;riOuriO;l3p00x1;c1ecutUpeV;ess;d1iK;er;ar2e1;mographUrivO;k,l2;hiGlassSo2rude,unn1;ing;m5n1operK;creCstitueOte2vertab1;le;mpor1nt;ary;ic,m2p1;anion,lex;er2u1;ni8;ci0;al;e5lank,o4r1;i2u1;te;ef;ttom,urgeois;st;cadem9d6l2ntarct9r1;ab,ct8;e3tern1;at1;ive;rt;oles1ult;ce1;nt;ic`,"Adj|Past":`true¦0:4Q;1:4C;2:4H;3:4E;a44b3Tc36d2Je29f20g1Wh1Si1Jj1Gkno1Fl1Am15n12o0Xp0Mqu0Kr08sLtEuAv9w4yellow0;a7ea6o4rinkl0;r4u3Y;n,ri0;k31th3;rp0sh0tZ;ari0e1O;n5p4s0;d1li1Rset;cov3derstood,i4;fi0t0;a8e3Rhr7i6ouTr4urn0wi4C;a4imm0ou2G;ck0in0pp0;ed,r0;eat2Qi37;m0nn0r4;get0ni2T;aOcKeIhGimFm0Hoak0pDt7u4;bsid3Ogge44s4;pe4ta2Y;ct0nd0;a8e7i2Eok0r5u4;ff0mp0nn0;ength2Hip4;ed,p0;am0reotyp0;in0t0;eci4ik0oH;al3Efi0;pRul1;a4ock0ut;d0r0;a4c1Jle2t31;l0s3Ut0;a6or5r4;at4e25;ch0;r0tt3;t4ut0;is2Mur1;aEe5o4;tt0;cAdJf2Bg9je2l8m0Knew0p7qu6s4;eTpe2t4;or0ri2;e3Dir0;e1lac0;at0e2Q;i0Rul1;eiv0o4ycl0;mme2Lrd0v3;in0lli0ti2A;a4ot0;li28;aCer30iBlAo9r5u4;mp0zzl0;e6i2Oo4;ce2Fd4lo1Anou30pos0te2v0;uc0;fe1CocCp0Iss0;i2Kli1L;ann0e2CuS;ck0erc0ss0;ck0i2Hr4st0;allLk0;bse7c6pp13rgan2Dver4;lo4whelm0;ok0;cupi0;rv0;aJe5o4;t0uri1A;ed0gle2;a6e5ix0o4ut0ys1N;di1Nt15u26;as0Clt0;n4rk0;ag0ufact0A;e6i5o4;ad0ck0st,v0;cens0m04st0;ft,v4;el0;tt0wn;a5o15u4;dg0s1B;gg0;llumSmpAn4sol1;br0cre1Ldebt0f8jZspir0t5v4;it0olv0;e4ox0Y;gr1n4re23;d0si15;e2l1o1Wuri1;li0o01r4;ov0;a6e1o4um03;ok0r4;ri0Z;mm3rm0;i6r5u4;a1Bid0;a0Ui0Rown;ft0;aAe9i8l6oc0Ir4;a4i0oz0Y;ctHg19m0;avo0Ju4;st3;ni08tt0x0;ar0;d0il0sc4;in1;dCl1mBn9quipp0s8x4;agger1c6p4te0T;a0Se4os0;ct0rie1D;it0;cap0tabliZ;cha0XgFha1As4;ur0;a0Zbarra0N;i0Buc1;aMeDi5r4;a01i0;gni08miniSre2s4;a9c6grun0Ft4;o4re0Hu17;rt0;iplWou4;nt0r4;ag0;bl0;cBdRf9l8p7ra6t5v4;elop0ot0;ail0ermQ;ng0;re07;ay0ight0;e4in0o0M;rr0;ay0enTor1;m5t0z4;ed,zl0;ag0p4;en0;aPeLhIlHo9r6u4;lt4r0stom03;iv1;a5owd0u4;sh0;ck0mp0;d0loAm7n4ok0v3;centr1f5s4troC;id3olid1;us0;b5pl4;ic1;in0;r0ur0;assi9os0utt3;ar5i4;ll0;g0m0;lebr1n6r4;ti4;fi0;tralJ;g0lcul1;aDewild3iCl9o7r5urn4;ed,t;ok4uis0;en;il0r0t4und;tl0;e5i4;nd0;ss0;as0;ffl0k0laMs0tt3;bPcNdKfIg0lFmaz0nDppBrm0ss9u5wa4;rd0;g5thor4;iz0;me4;nt0;o6u4;m0r0;li0re4;ci1;im1ticip1;at0;a5leg0t3;er0;rm0;fe2;ct0;ju5o7va4;nc0;st0;ce4knowledg0;pt0;and5so4;rb0;on0;ed`,Singular:`true¦0:5J;1:5H;2:4W;3:4S;4:52;5:57;6:5L;7:56;8:5B;a52b4Lc3Nd35e2Xf2Og2Jh28in24j23k22l1Um1Ln1Ho1Bp0Rqu0Qr0FsZtMuHvCw9x r58yo yo;a9ha3Po3Q;f3i4Rt0Gy9;! arou39;arCeAideo ga2Qo9;cabu4Jl5C;gOr9t;di4Zt1Y;iety,ni4P;nBp30rAs 9;do43s5E;bani1in0;coordinat3Ader9;estima1to24we41; rex,aKeJhHiFoErBuAv9;! show;m2On2rntLto1D;agedy,ib9o4E;e,u9;n0ta46;ni1p2rq3L;c,er,m9;etF;ing9ree26;!y;am,mp3F;ct2le6x return;aNcMeKhor4QiJkHoGpin off,tDuBy9;ll9ner7st4T;ab2X;b9i1n28per bowl,rro1X;st3Ltot0;atAipe2Go1Lrate7udent9;! lo0I;i39u1;ft ser4Lmeo1I;elet5i9;ll,r3V;b38gn2Tte;ab2Jc9min3B;t,urity gua2N;e6ho2Y;bbatic0la3Jndwi0Qpi5;av5eDhetor2iAo9;de6om,w;tAv9;erb2C;e,u0;bDcBf9publ2r10spi1;er9orm3;e6r0;i9ord label;p2Ht0;a1u46;estion mark,ot2F;aPeMhoLiIlGoErAu9yram1F;ddi3HpErpo1Js3J;eBo9;bl3Zs9;pe3Jta1;dic1Rmi1Fp1Qroga8ss relea1F;p9rt0;py;a9ebisci1;q2Dte;cn2eAg9;!gy;!r;ne call,tocoK;anut,dAr9t0yo1;cen3Jsp3K;al,est0;nop4rAt9;e,hog5;adi11i2V;atme0bj3FcBpia1rde0thers,utspok5ve9wn3;n,r9;ti0Pview;cuAe9;an;pi3;arBitAot9umb3;a2Fhi2R;e,ra1;cot2ra8;aFeCiAo9ur0;nopo4p18rni2Nsq1Rti36uld;c,li11n0As9tt5;chief,si34;dAnu,t9;al,i3;al,ic;gna1mm0nd15rsupi0te9yf4;ri0;aDegCiBu9;ddi1n9;ch;me,p09; Be0M;bor14y9; 9er;up;eyno1itt5;el4ourn0;cBdices,itia8ni25sAtel0Lvert9;eb1J;e28titu1;en8i2T;aIeEighDoAu9;man right,s22;me9rmoFsp1Ftb0K;! r9;un; scho0YriY;a9i1N;d9v5; start,pho9;ne;ndful,sh brown,v5ze;aBelat0Ilaci3r9ul4yp1S;an9enadi3id;a1Cd slam,ny;df4r9;l2ni1I;aGeti1HiFlu1oCrAun9;er0;ee market,i9onti3;ga1;l4ur9;so9;me;ePref4;br2mi4;conoFffi7gg,lecto0Rmbas1EnCpidem2s1Zth2venBxAyel9;id;ampZempl0Nte6;i19t;er7terp9;ri9;se;my;eLiEoBr9ump tru0U;agonf4i9;er,ve thru;cAg7i4or,ssi3wn9;side;to0EumenE;aEgniDnn3sAvide9;nd;conte6incen8p9tri11;osi9;ti0C;ta0H;le0X;athBcAf9ni0terre6;ault 05err0;al,im0;!b9;ed;aWeThMiLlJoDr9;edit caBuc9;ib9;le;rd;efficDke,lCmmuniqLnsApi3rr0t0Xus9yo1;in;erv9uI;ato02;ic,lQ;ie6;er7i9oth;e6n2;ty,vil wM;aDeqCick5ocoBr9;istmas car9ysanthemum;ol;la1;ue;ndeli3racteri9;st2;iAllEr9;e0tifica1;liZ;hi3nFpErCt9ucus;erpi9hedr0;ll9;ar;!bohyd9ri3;ra1;it0;aAe,nib0t9;on;l,ry;aMeLiop2leJoHrDu9;nny,r9tterf4;g9i0;la9;ry;eakAi9;ck;fa9throB;st;dy,ro9wl;ugh;mi9;sh;an,l4;nkiArri3;er;ng;cSdMlInFppeti1rDsBtt2utop9;sy;ic;ce6pe9;ct;r9sen0;ay;ecAoma4tiA;ly;do1;i5l9;er7y;gy;en; hominDjAvan9;tage;ec8;ti9;ve;em;cCeAqui9;tt0;ta1;te;iAru0;al;de6;nt`,"Person|Noun":`true¦a0Eb07c03dWeUfQgOhLjHkiGlFmCnBolive,p7r4s3trini06v1wa0;ng,rd,tts;an,enus,iol0;a,et;ky,onPumm09;ay,e1o0uby;bin,d,se;ed,x;a2e1o0;l,tt04;aLnJ;dYge,tR;at,orm;a0eloW;t0x,ya;!s;a9eo,iH;ng,tP;a2e1o0;lGy;an,w3;de,smi4y;a0erb,iOolBuntR;ll,z0;el;ail,e0iLuy;ne;a1ern,i0lo;elds,nn;ith,n0;ny;a0dEmir,ula,ve;rl;a4e3i1j,ol0;ly;ck,x0;ie;an,ja;i0wn;sy;am,h0liff,rystal;a0in,ristian;mbers,ri0;ty;a4e3i2o,r0ud;an0ook;dy;ll;nedict,rg;k0nks;er;l0rt;fredo,ma`,"Actor|Verb":`true¦aCb8c5doctor,engineAfool,g3host,judge,m2nerd,p1recruit,scout,ushAvolunteAwi0;mp,tneA;arent,ilot;an,ime;eek,oof,r0uide;adu8oom;ha1o0;ach,nscript,ok;mpion,uffeur;o2u0;lly,tch0;er;ss;ddi1ffili0rchite1;ate;ct`,MaleName:`true¦0:H6;1:FZ;2:DS;3:GQ;4:CZ;5:FV;6:GM;7:FP;8:GW;9:ET;A:C2;B:GD;aF8bE1cCQdBMeASfA1g8Yh88i7Uj6Sk6Bl5Mm48n3So3Ip33qu31r26s1Et0Ru0Ov0CwTxSyHzC;aCor0;cChC1karia,nAT;!hDkC;!aF6;!ar7CeF5;aJevgenBSoEuC;en,rFVsCu3FvEF;if,uf;nDs6OusC;ouf,s6N;aCg;s,tC;an,h0;hli,nCrosE1ss09;is,nC;!iBU;avi2ho5;aPeNiDoCyaEL;jcieBJlfgang,odrFutR;lFnC;f8TsC;lCt1;ow;bGey,frEhe4QlC;aE5iCy;am,e,s;ed8iC;d,ed;eAur;i,ndeD2rn2sC;!l9t1;lDyC;l1ne;lDtC;!er;aCHy;aKernDAiFladDoC;jteB0lodymyr;!iC;mFQsDB;cFha0ktBZnceDrgCOvC;a0ek;!nC;t,zo;!e4StBV;lCnC7sily;!entC;in9J;ghE2lCm70nax,ri,sm0;riCyss87;ch,k;aWeRhNiLoGrEuDyC;!l2roEDs1;n6r6E;avD0eCist0oy,um0;ntCRvBKy;bFdAWmCny;!asDmCoharu;aFFie,y;!z;iA6y;mCt4;!my,othy;adEeoDia0SomC;!as;!dor91;!de4;dFrC;enBKrC;anBJeCy;ll,nBI;!dy;dgh,ha,iCnn2req,tsu5V;cDAka;aYcotWeThPiMlobod0oKpenc2tEurDvenAEyCzym1;ed,lvest2;aj,e9V;anFeDuC;!aA;fan17phEQvCwaA;e77ie;!islaCl9;v,w;lom1rBuC;leymaDHta;dDgmu9UlCm1yabonga;as,v8B;!dhart8Yn9;aEeClo75;lCrm0;d1t1;h9Jne,qu1Jun,wn,yne;aDbastiEDk2Yl5Mpp,rgCth,ymoCU;e1Dio;m4n;!tC;!ie,y;eDPlFmEnCq67tosCMul;dCj2UtiA5;e01ro;!iATkeB6mC4u5;!ik,vato9K;aZeUheC8iRoGuDyC;an,ou;b99dDf4peAssC;!elEG;ol00y;an,bLc7MdJel,geIh0lHmGnEry,sDyC;!ce;ar7Ocoe,s;!aCnBU;ld,n;an,eo;a7Ef;l7Jr;e3Eg2n9olfo,riC;go;bBNeDH;cCl9;ar87c86h54kCo;!ey,ie,y;cFeA3gDid,ubByCza;an8Ln06;g85iC;naC6s;ep;ch8Kfa5hHin2je8HlGmFndEoHpha5sDul,wi36yC;an,mo8O;h9Im4;alDSol3O;iD0on;f,ph;ul;e9CinC;cy,t1;aOeLhilJiFrCyoG;aDeC;m,st1;ka85v2O;eDoC;tr;r8GtC;er,ro;!ipCl6H;!p6U;dCLrcy,tC;ar,e9JrC;!o7;b9Udra8So9UscAHtri62ulCv8I;!ie,o7;ctav6Ji2lImHndrBRrGsDtCum6wB;is,to;aDc6k6m0vCwaBE;al79;ma;i,vR;ar,er;aDeksandr,ivC;er,i2;f,v;aNeLguyBiFoCu3O;aDel,j4l0ma0rC;beAm0;h,m;cFels,g5i9EkDlC;es,s;!au,h96l78olaC;!i,y;hCkCol76;ol75;al,d,il,ls1vC;ilAF;hom,tC;e,hC;anCy;!a5i5;aYeViLoGuDyC;l4Nr1;hamDr84staC;fa,p6E;ed,mG;di10e,hamEis4JntDritz,sCussa;es,he;e,y;ad,ed,mC;ad,ed;cGgu5hai,kFlEnDtchC;!e8O;a9Pik;house,o7t1;ae73eC3ha8Iolaj;ah,hDkC;!ey,y;aDeC;al,l;el,l;hDlv3rC;le,ri8Ev4T;di,met;ay0c00gn4hWjd,ks2NlTmadZnSrKsXtDuric7VxC;imilBKwe8B;eHhEi69tCus,y69;!eo,hCia7;ew,i67;eDiC;as,eu,s;us,w;j,o;cHiGkFlEqu8Qsha83tCv3;iCy;!m,n;in,on;el,o7us;a6Yo7us;!elCin,o7us;!l8o;frAEi5Zny,u5;achDcoCik;lm;ai,y;amDdi,e5VmC;oud;adCm6W;ou;aulCi9P;ay;aWeOiMloyd,oJuDyC;le,nd1;cFdEiDkCth2uk;a7e;gi,s,z;ov7Cv6Hw6H;!as,iC;a6Een;g0nn52renDuCvA4we7D;!iS;!zo;am,n4oC;n5r;a9Yevi,la5KnHoFst2thaEvC;eCi;nte;bo;nCpo8V;!a82el,id;!nC;aAy;mEnd1rDsz73urenCwr6K;ce,t;ry,s;ar,beAont;aOeIhalHiFla4onr63rDu5SylC;e,s;istCzysztof;i0oph2;er0ngsl9p,rC;ilA9k,ollos;ed,id;en0iGnDrmCv4Z;it;!dDnCt1;e2Ny;ri4Z;r,th;cp2j4mEna8BrDsp6them,uC;ri;im,l;al,il;a03eXiVoFuC;an,lCst3;en,iC;an,en,o,us;aQeOhKkub4AnIrGsDzC;ef;eDhCi9Wue;!ua;!f,ph;dCge;i,on;!aCny;h,s,th6J;anDnC;!ath6Hie,n72;!nC;!es;!l,sCy;ph;o,qu3;an,mC;!i,m6V;d,ffFns,rCs4;a7JemDmai7QoCry;me,ni1H;i9Dy;!e73rC;ey,y;cKdBkImHrEsDvi2yC;dBs1;on,p2;ed,oDrCv67;e6Qod;d,s61;al,es5Wis1;a,e,oCub;b,v;ob,qu13;aTbNchiMgLke53lija,nuKonut,rIsEtCv0;ai,suC;ki;aDha0i8XmaCsac;el,il;ac,iaC;h,s;a,vinCw3;!g;k,nngu6X;nac1Xor;ka;ai,rahC;im;aReLoIuCyd6;beAgGmFsC;eyDsC;a3e3;in,n;ber5W;h,o;m2raDsse3wC;a5Pie;c49t1K;a0Qct3XiGnDrC;beAman08;dr7VrC;iCy2N;!k,q1R;n0Tt3S;bKlJmza,nIo,rEsDyC;a5KdB;an,s0;lEo67r2IuCv9;hi5Hki,tC;a,o;an,ey;k,s;!im;ib;a08e00iUlenToQrMuCyorgy;iHnFsC;!taC;f,vC;!e,o;n6tC;er,h2;do,lC;herDlC;auCerQ;me;aEegCov2;!g,orC;!io,y;dy,h7C;dfr9nza3XrDttfC;ri6C;an,d47;!n;acoGlEno,oCuseppe;rgiCvan6O;!o,s;be6Ies,lC;es;mo;oFrC;aDha4HrCt;it,y;ld,rd8;ffErgC;!e7iCy;!os;!r9;bElBrCv3;eCla1Nr4Hth,y;th;e,rC;e3YielC;!i4;aXeSiQlOorrest,rCyod2E;aHedFiC;edDtC;s,z;ri18;!d42eri11riC;ck,k;nCs2;cEkC;ie,lC;in,yn;esLisC;!co,z3M;etch2oC;ri0yd;d5lConn;ip;deriFliEng,rC;dinaCg4nan0B;nd8;pe,x;co;bCdi,hd;iEriC;ce,zC;io;an,en,o;benez2dZfrYit0lTmMnJo3rFsteb0th0ugenEvCymBzra;an,eCge4D;ns,re3K;!e;gi,iDnCrol,v3w3;est8ie,st;cCk;!h,k;o0DriCzo;co,qC;ue;aHerGiDmC;aGe3A;lCrh0;!iC;a10o,s;s1y;nu5;beAd1iEliDm2t1viCwood;n,s;ot28s;!as,j5Hot,sC;ha;a3en;!dGg6mFoDua2QwC;a2Pin;arC;do;oZuZ;ie;a04eTiOmitrNoFrag0uEwDylC;an,l0;ay3Hig4D;a3Gdl9nc0st3;minFnDri0ugCvydGy2S;!lF;!a36nCov0;e1Eie,y;go,iDykC;as;cCk;!k;i,y;armuFetDll1mitri7neCon,rk;sh;er,m6riC;ch;id;andLepak,j0lbeAmetri4nIon,rGsEvDwCxt2;ay30ey;en,in;hawn,moC;nd;ek,riC;ck;is,nC;is,y;rt;re;an,le,mKnIrEvC;e,iC;!d;en,iEne0PrCyl;eCin,yl;l45n;n,o,us;!iCny;el,lo;iCon;an,en,on;a0Fe0Ch03iar0lRoJrFuDyrC;il,us;rtC;!is;aEistC;iaCob12;no;ig;dy,lInErC;ey,neliCy;s,us;nEor,rDstaC;nt3;ad;or;by,e,in,l3t1;aHeEiCyde;fCnt,ve;fo0Xt1;menDt4;us;s,t;rFuDyC;!t1;dCs;e,io;enC;ce;aHeGrisC;!toC;phCs;!eC;!r;st2t;d,rCs;b5leC;s,y;cDdrCs6;ic;il;lHmFrC;ey,lDroCy;ll;!o7t1;er1iC;lo;!eb,v3;a09eZiVjorn,laUoSrEuCyr1;ddy,rtKst2;er;aKeFiEuDyC;an,ce,on;ce,no;an,ce;nDtC;!t;dDtC;!on;an,on;dFnC;dDisC;lav;en,on;!foOl9y;bby,gd0rCyd;is;i0Lke;bElDshC;al;al,lL;ek;nIrCshoi;at,nEtC;!raC;m,nd;aDhaCie;rd;rd8;!iDjam3nCs1;ie,y;to;kaMlazs,nHrC;n9rDtC;!holomew;eCy;tt;ey;dCeD;ar,iC;le;ar1Nb1Dd16fon15gust3hm12i0Zja0Yl0Bm07nTputsiSrGsaFugustEveDyCziz;a0kh0;ry;o,us;hi;aMchiKiJjun,mHnEon,tCy0;em,hCie,ur8;ur;aDoC;!ld;ud,v;aCin;an,nd8;!el,ki;baCe;ld;ta;aq;aMdHgel8tCw6;hoFoC;iDnC;!i8y;ne;ny;er7rCy;eDzC;ej;!as,i,j,s,w;!s;s,tolC;iCy;!y;ar,iEmaCos;nu5r;el;ne,r,t;aVbSdBeJfHiGl01onFphonsEt1vC;aPin;on;e,o;so,zo;!sR;!onZrC;ed;c,jaHksFssaHxC;!andC;er,rC;e,os,u;andCei;ar,er,r;ndC;ro;en;eDrecC;ht;rt8;dd3in,n,sC;taC;ir;ni;dDm6;ar;an,en;ad,eC;d,t;in;so;aGi,olErDvC;ik;ian8;f8ph;!o;mCn;!a;dGeFraDuC;!bakr,lfazl;hCm;am;!l;allFel,oulaye,ulC;!lDrahm0;an;ah,o;ah;av,on`,Uncountable:`true¦0:2E;1:2L;2:33;a2Ub2Lc29d22e1Rf1Ng1Eh16i11j0Yk0Wl0Rm0Hn0Do0Cp03rZsLt9uran2Jv7w3you gu0E;a5his17i4oo3;d,l;ldlife,ne;rm8t1;apor,ernacul29i3;neg28ol1Otae;eDhBiAo8r4un3yranny;a,gst1B;aff2Oea1Ko4ue nor3;th;o08u3;bleshoot2Ose1Tt;night,othpas1Vwn3;foEsfoE;me off,n;er3und1;e,mod2S;a,nnis;aDcCeBhAi9ki8o7p6t4u3weepstak0;g1Unshi2Hshi;ati08e3;am,el;ace2Keci0;ap,cc1meth2C;n,ttl0;lk;eep,ingl0or1C;lf,na1Gri0;ene1Kisso1C;d0Wfe2l4nd,t3;i0Iurn;m1Ut;abi0e4ic3;e,ke15;c3i01laxa11search;ogni10rea10;a9e8hys7luto,o5re3ut2;amble,mis0s3ten20;en1Zs0L;l3rk;i28l0EyH; 16i28;a24tr0F;nt3ti0M;i0s;bstetri24vercrowd1Qxyg09;a5e4owada3utella;ys;ptu1Ows;il poliZtional securi2;aAe8o5u3;m3s1H;ps;n3o1K;ey,o3;gamy;a3cha0Elancholy,rchandi1Htallurgy;sl0t;chine3g1Aj1Hrs,thema1Q; learn1Cry;aught1e6i5ogi4u3;ck,g12;c,s1M;ce,ghtn18nguis1LteratWv1;ath1isVss;ara0EindergartPn3;icke0Aowled0Y;e3upit1;a3llyfiGwel0G;ns;ce,gnor6mp5n3;forma00ter3;net,sta07;atiSort3rov;an18;a7e6isto09o3ung1;ckey,mework,ne4o3rseradi8spitali2use arrest;ky;s2y;adquarteXre;ir,libut,ppiHs3;hi3te;sh;ene8l6o5r3um,ymnas11;a3eZ;niUss;lf,re;ut3yce0F;en; 3ti0W;edit0Hpo3;ol;aNicFlour,o4urnit3;ure;od,rgive3uri1wl;ness;arCcono0LducaBlectr9n7quip8thi0Pvery6x3;ist4per3;ti0B;en0J;body,o08th07;joy3tertain3;ment;ici2o3;ni0H;tiS;nings,th;emi02i6o4raugh3ynas2;ts;pe,wnstai3;rs;abet0ce,s3;honZrepu3;te;aDelciChAivi07l8o3urrency;al,ld w6mmenta5n3ral,ttIuscoB;fusiHt 3;ed;ry;ar;assi01oth0;es;aos,e3;eMwK;us;d,rO;a8i6lood,owlHread5u3;ntGtt1;er;!th;lliarJs3;on;g3ss;ga3;ge;cKdviJeroGirFmBn6ppeal court,r4spi3thleL;rin;ithmet3sen3;ic;i6y3;o4th3;ing;ne;se;en5n3;es2;ty;ds;craft;bi8d3nau7;yna3;mi6;ce;id,ous3;ti3;cs`,Infinitive:`true¦0:9G;1:9T;2:AD;3:90;4:9Z;5:84;6:AH;7:A9;8:92;9:A0;A:AG;B:AI;C:9V;D:8R;E:8O;F:97;G:6H;H:7D;a94b8Hc7Jd68e4Zf4Mg4Gh4Ai3Qj3Nk3Kl3Bm34nou48o2Vp2Equ2Dr1Es0CtZuTvRwI;aOeNiLors5rI;eJiI;ng,te;ak,st3;d5e8TthI;draw,er;a2d,ep;i2ke,nIrn;d1t;aIie;liADniAry;nJpI;ho8Llift;cov1dJear8Hfound8DlIplug,rav82tie,ve94;eaAo3X;erIo;cut,go,staAFvalA3w2G;aSeQhNoMrIu73;aIe72;ffi3Smp3nsI;aBfo7CpI;i8oD;pp3ugh5;aJiJrIwaD;eat5i2;nk;aImA0;ch,se;ck3ilor,keImp1r8L;! paD;a0Ic0He0Fh0Bi0Al08mugg3n07o05p02qu01tUuLwI;aJeeIim;p,t5;ll7Wy;bNccMffLggeCmmKppJrI;mouFpa6Zvi2;o0re6Y;ari0on;er,i4;e7Numb;li9KmJsiIveD;de,st;er9it;aMe8MiKrI;ang3eIi2;ng27w;fIng;f5le;b,gg1rI;t3ve;a4AiA;a4UeJit,l7DoI;il,of;ak,nd;lIot7Kw;icEve;atGeak,i0O;aIi6;m,y;ft,ng,t;aKi6CoJriIun;nk,v6Q;ot,rt5;ke,rp5tt1;eIll,nd,que8Gv1w;!k,m;aven9ul8W;dd5tis1Iy;a0FeKiJoI;am,t,ut;d,p5;a0Ab08c06d05f01group,hea00iZjoi4lXmWnVpTq3MsOtMup,vI;amp,eJiIo3B;sEve;l,rI;e,t;i8rI;ie2ofE;eLiKpo8PtIurfa4;o24rI;aHiBuctu8;de,gn,st;mb3nt;el,hra0lIreseF;a4e71;d1ew,o07;aHe3Fo2;a7eFiIo6Jy;e2nq41ve;mbur0nf38;r0t;inKleBocus,rJuI;el,rbiA;aBeA;an4e;aBu4;ei2k8Bla43oIyc3;gni39nci3up,v1;oot,uI;ff;ct,d,liIp;se,ze;tt3viA;aAenGit,o7;aWerUinpoiFlumm1LoTrLuI;b47ke,niArIt;poDsuI;aFe;eMoI;cKd,fe4XhibEmo7noJpo0sp1tru6vI;e,i6o5L;un4;la3Nu8;aGclu6dJf1occupy,sup0JvI;a6BeF;etermi4TiB;aGllu7rtr5Ksse4Q;cei2fo4NiAmea7plex,sIva6;eve8iCua6;mp1rItrol,ve;a6It6E;bOccuNmEpMutLverIwe;l07sJtu6Yu0wI;helm;ee,h1F;gr5Cnu2Cpa4;era7i4Ipo0;py,r;ey,seItaH;r2ss;aMe0ViJoIultiply;leCu6Pw;micJnIspla4;ce,g3us;!k;iIke,na9;m,ntaH;aPeLiIo0u3N;ke,ng1quIv5;eIi6S;fy;aKnIss5;d,gI;th5;rn,ve;ng2Gu1N;eep,idnJnI;e4Cow;ap;oHuI;gg3xtaI;po0;gno8mVnIrk;cTdRfQgeChPitia7ju8q1CsNtKun6EvI;a6eIo11;nt,rt,st;erJimi6BoxiPrI;odu4u6;aBn,pr03ru6C;iCpi8tIu8;all,il,ruB;abEibE;eCo3Eu0;iIul9;ca7;i7lu6;b5Xmer0pI;aLer4Uin9ly,oJrI;e3Ais6Bo2;rt,se,veI;riA;le,rt;aLeKiIoiCuD;de,jaInd1;ck;ar,iT;mp1ng,pp5raIve;ng5Mss;ath1et,iMle27oLrI;aJeIow;et;b,pp3ze;!ve5A;gg3ve;aTer45i5RlSorMrJuI;lf4Cndrai0r48;eJiIolic;ght5;e0Qsh5;b3XeLfeEgJsI;a3Dee;eIi2;!t;clo0go,shIwa4Z;ad3F;att1ee,i36;lt1st5;a0OdEl0Mm0FnXquip,rWsVtGvTxI;aRcPeDhOiNpJtIu6;ing0Yol;eKi8lIo0un9;aHoI;it,re;ct,di7l;st,t;a3oDu3B;e30lI;a10u6;lt,mi28;alua7oI;ke,l2;chew,pou0tab19;a0u4U;aYcVdTfSgQhan4joy,lPqOrNsuMtKvI;e0YisI;a9i50;er,i4rI;aHenGuC;e,re;iGol0F;ui8;ar9iC;a9eIra2ulf;nd1;or4;ang1oIu8;r0w;irc3lo0ou0ErJuI;mb1;oaGy4D;b3ct;bKer9pI;hasiIow1;ze;aKody,rI;a4oiI;d1l;lm,rk;ap0eBuI;ci40de;rIt;ma0Rn;a0Re04iKo,rIwind3;aw,ed9oI;wn;agno0e,ff1g,mi2Kne,sLvI;eIul9;rIst;ge,t;aWbVcQlod9mant3pNru3TsMtI;iIoDu37;lJngI;uiA;!l;ol2ua6;eJlIo0ro2;a4ea0;n0r0;a2Xe36lKoIu0S;uIv1;ra9;aIo0;im;a3Kur0;b3rm;af5b01cVduBep5fUliTmQnOpMrLsiCtaGvI;eIol2;lop;ch;a20i2;aDiBloIoD;re,y;oIy;te,un4;eJoI;liA;an;mEv1;a4i0Ao06raud,y;ei2iMla8oKrI;ee,yI;!pt;de,mIup3;missi34po0;de,ma7ph1;aJrief,uI;g,nk;rk;mp5rk5uF;a0Dea0h0Ai09l08oKrIurta1G;a2ea7ipp3uI;mb3;ales4e04habEinci6ll03m00nIrro6;cXdUfQju8no7qu1sLtKvI;eIin4;ne,r9y;aHin2Bribu7;er2iLoli2Epi8tJuI;lt,me;itu7raH;in;d1st;eKiJoIroFu0;rm;de,gu8rm;ss;eJoI;ne;mn,n0;eIlu6ur;al,i2;buCe,men4pI;eIi3ly;l,te;eBi6u6;r4xiC;ean0iT;rcumveFte;eJirp,oI;o0p;riAw;ncIre5t1ulk;el;a02eSi6lQoPrKuI;iXrIy;st,y;aLeaKiJoad5;en;ng;stfeLtX;ke;il,l11mba0WrrMth1;eIow;ed;!coQfrie1LgPhMliLqueaKstJtrIwild1;ay;ow;th;e2tt3;a2eJoI;ld;ad;!in,ui3;me;bysEckfi8ff3tI;he;b15c0Rd0Iff0Ggree,l0Cm09n03ppZrXsQttOuMvJwaE;it;eDoI;id;rt;gIto0X;meF;aIeCraB;ch,in;pi8sJtoI;niA;aKeIi04u8;mb3rt,ss;le;il;re;g0Hi0ou0rI;an9i2;eaKly,oiFrI;ai0o2;nt;r,se;aMi0GnJtI;icipa7;eJoIul;un4y;al;ly0;aJu0;se;lga08ze;iKlI;e9oIu6;t,w;gn;ix,oI;rd;a03jNmiKoJsoI;rb;pt,rn;niIt;st1;er;ouJuC;st;rn;cLhie2knowled9quiItiva7;es4re;ce;ge;eQliOoKrJusI;e,tom;ue;mIst;moJpI;any,liA;da7;ma7;te;pt;andPduBet,i6oKsI;coKol2;ve;liArt,uI;nd;sh;de;ct;on`,Person:`true¦0:1Q;a29b1Zc1Md1Ee18f15g13h0Ri0Qj0Nk0Jl0Gm09n06o05p00rPsItCusain bolt,v9w4xzibit,y1;anni,oko on2uji,v1;an,es;en,o;a3ednesday adams,i2o1;lfram,o0Q;ll ferrell,z khalifa;lt disn1Qr1;hol,r0G;a2i1oltai06;n dies0Zrginia wo17;lentino rossi,n goG;a4h3i2ripp,u1yra banks;lZpac shakur;ger woods,mba07;eresa may,or;kashi,t1ylor;um,ya1B;a5carlett johanss0h4i3lobodan milosevic,no2ocr1Lpider1uperm0Fwami; m0Em0E;op dogg,w whi1H;egfried,nbad;akespeaTerlock holm1Sia labeouf;ddam hussa16nt1;a cla11ig9;aAe6i5o3u1za;mi,n dmc,paul,sh limbau1;gh;bin hood,d stew16nald1thko;in0Mo;han0Yngo starr,valdo;ese witherspo0i1mbrandt;ll2nh1;old;ey,y;chmaninoff,ffi,iJshid,y roma1H;a4e3i2la16o1uff daddy;cahont0Ie;lar,p19;le,rZ;lm17ris hilt0;leg,prah winfr0Sra;a2e1iles cra1Bostradam0J; yo,l5tt06wmQ;pole0s;a5e4i2o1ubar03;by,lie5net,rriss0N;randa ju1tt romn0M;ly;rl0GssiaB;cklemo1rkov,s0ta hari,ya angelou;re;ady gaga,e1ibera0Pu;bron jam0Xch wale1e;sa;anye west,e3i1obe bryant;d cudi,efer suther1;la0P;ats,sha;a2effers0fk,k rowling,rr tolki1;en;ck the ripp0Mwaharlal nehru,y z;liTnez,ron m7;a7e5i3u1;lk hog5mphrey1sa01;! bog05;l1tl0H;de; m1dwig,nry 4;an;ile selassFlle ber4m3rrison1;! 1;ford;id,mo09;ry;ast0iannis,o1;odwPtye;ergus0lorence nightinga08r1;an1ederic chopN;s,z;ff5m2nya,ustaXzeki1;el;eril lagasse,i1;le zatop1nem;ek;ie;a6e4i2octor w1rake;ho;ck w1ego maradoC;olf;g1mi lovaOnzel washingt0;as;l1nHrth vadR;ai lNt0;a8h5lint0o1thulhu;n1olio;an,fuci1;us;on;aucKop2ristian baMy1;na;in;millo,ptain beefhe4r1;dinal wols2son1;! palmF;ey;art;a8e5hatt,i3oHro1;ck,n1;te;ll g1ng crosby;atB;ck,nazir bhut2rtil,yon1;ce;to;nksy,rack ob1;ama;l 6r3shton kutch2vril lavig8yn ra1;nd;er;chimed2istot1;le;es;capo2paci1;no;ne`,Adjective:`true¦0:AI;1:BS;2:BI;3:BA;4:A8;5:84;6:AV;7:AN;8:AF;9:7H;A:BQ;B:AY;C:BC;D:BH;E:9Y;aA2b9Ec8Fd7We79f6Ng6Eh61i4Xj4Wk4Tl4Im41n3Po36p2Oquart7Pr2Ds1Dt14uSvOwFye29;aMeKhIiHoF;man5oFrth7G;dADzy;despreB1n w97s86;acked1UoleF;!sa6;ather1PeFll o70ste1D;!k5;nt1Ist6Ate4;aHeGiFola5T;bBUce versa,gi3Lle;ng67rsa5R;ca1gBSluAV;lt0PnLpHrGsFttermoBL;ef9Ku3;b96ge1; Hb32pGsFtiAH;ca6ide d4R;er,i85;f52to da2;a0Fbeco0Hc0Bd04e02f01gu1XheaBGiXkn4OmUnTopp06pRrNsJtHus0wF;aFiel3K;nt0rra0P;app0eXoF;ld,uS;eHi37o5ApGuF;perv06spec39;e1ok9O;en,ttl0;eFu5;cogn06gul2RlGqu84sF;erv0olv0;at0en33;aFrecede0E;id,rallel0;am0otic0;aFet;rri0tF;ch0;nFq26vers3;sur0terFv7U;eFrupt0;st0;air,inish0orese98;mploy0n7Ov97xpF;ect0lain0;eHisFocume01ue;clFput0;os0;cid0rF;!a8Scov9ha8Jlyi8nea8Gprivileg0sMwF;aFei9I;t9y;hGircumcFonvin2U;is0;aFeck0;lleng0rt0;b20ppea85ssuGttend0uthorF;iz0;mi8;i4Ara;aLeIhoHip 25oGrF;anspare1encha1i2;geth9leADp notch,rpB;rny,ugh6H;ena8DmpGrFs6U;r49tia4;eCo8P;leFst4M;nt0;a0Dc09e07h06i04ki03l01mug,nobbi4XoVpRqueami4XtKuFymb94;bHccinAi generis,pFr5;erFre7N;! dup9b,vi70;du0li7Lp6IsFurb7J;eq9Atanda9X;aKeJi16o2QrGubboFy4Q;rn;aightFin5GungS; fFfF;or7V;adfa9Pri6;lwa6Ftu82;arHeGir6NlendBot Fry;on;c3Qe1S;k5se; call0lImb9phistic16rHuFviV;ndFth1B;proof;dBry;dFub6; o2A;e60ipF;pe4shod;ll0n d7R;g2HnF;ceEg6ist9;am3Se9;co1Zem5lfFn6Are7; suf4Xi43;aGholFient3A;ar5;rlFt4A;et;cr0me,tisfac7F;aOeIheumatoBiGoF;bu8Ztt7Gy3;ghtFv3; 1Sf6X;cJdu8PlInown0pro69sGtF;ard0;is47oF;lu2na1;e1Suc45;alcit8Xe1ondi2;bBci3mpa1;aSePicayu7laOoNrGuF;bl7Tnjabi;eKiIoF;b7VfGmi49pFxi2M;er,ort81;a7uD;maFor,sti7va2;!ry;ciDexis0Ima2CpaB;in55puli8G;cBid;ac2Ynt 3IrFti2;ma40tFv7W;!i3Z;i2YrFss7R;anoBtF; 5XiF;al,s5V;bSffQkPld OnMrLth9utKverF;!aIbMdHhGni75seas,t,wF;ei74rou74;a63e7A;ue;ll;do1Ger,si6A;d3Qg2Aotu5Z; bFbFe on o7g3Uli7;oa80;fashion0school;!ay; gua7XbFha5Uli7;eat;eHligGsF;ce7er0So1C;at0;diFse;a1e1;aOeNiMoGuF;anc0de; moEnHrthFt6V;!eFwe7L;a7Krn;chaGdescri7Iprof30sF;top;la1;ght5;arby,cessa4ighbor5wlyw0xt;k0usiaFv3;ti8;aQeNiLoHuF;dIltiF;facet0p6;deHlGnFot,rbBst;ochro4Xth5;dy;rn,st;ddle ag0nF;dbloZi,or;ag9diocEga,naGrFtropolit4Q;e,ry;ci8;cIgenta,inHj0Fkeshift,mmGnFri4Oscu61ver18;da5Dy;ali4Lo4U;!stream;abEho;aOeLiIoFumberi8;ngFuti1R;stan3RtF;erm,i4H;ghtGteraF;l,ry,te;heart0wei5O;ft JgFss9th3;al,eFi0M;nda4;nguBps0te5;apGind5noF;wi8;ut;ad0itte4uniW;ce co0Hgno6Mll0Cm04nHpso 2UrF;a2releF;va1; ZaYcoWdReQfOgrNhibi4Ri05nMoLsHtFvalu5M;aAeF;nDrdepe2K;a7iGolFuboI;ub6ve1;de,gF;nifica1;rdi5N;a2er;own;eriIiLluenVrF;ar0eq5H;pt,rt;eHiGoFul1O;or;e,reA;fiFpe26termi5E;ni2;mpFnsideCrreA;le2;ccuCdeq5Ene,ppr4J;fFsitu,vitro;ro1;mJpF;arHeGl15oFrop9;li2r11;n2LrfeA;ti3;aGeFi18;d4BnD;tuE;egGiF;c0YteC;al,iF;tiF;ma2;ld;aOelNiLoFuma7;a4meInHrrGsFur5;ti6;if4E;e58o3U; ma3GsF;ick;ghfalut2HspF;an49;li00pf33;i4llow0ndGrdFtM; 05coEworki8;sy,y;aLener44iga3Blob3oKrGuF;il1Nng ho;aFea1Fizzl0;cGtF;ef2Vis;ef2U;ld3Aod;iFuc2D;nf2R;aVeSiQlOoJrF;aGeFil5ug3;q43tf2O;gFnt3S;i6ra1;lk13oHrF; keeps,eFge0Vm9tu41;g0Ei2Ds3R;liF;sh;ag4Mowe4uF;e1or45;e4nF;al,i2;d Gmini7rF;ti6ve1;up;bl0lDmIr Fst pac0ux;oGreacF;hi8;ff;ed,ili0R;aXfVlTmQnOqu3rMthere3veryday,xF;aApIquisi2traHuF;be48lF;ta1;!va2L;edRlF;icF;it;eAstF;whi6; Famor0ough,tiE;rou2sui2;erGiF;ne1;ge1;dFe2Aoq34;er5;ficF;ie1;g9sF;t,ygF;oi8;er;aWeMiHoGrFue;ea4owY;ci6mina1ne,r31ti8ubQ;dact2Jfficult,m,sGverF;ge1se;creGePjoi1paCtF;a1inA;et,te; Nadp0WceMfiLgeneCliJmuEpeIreliAsGvoF;id,ut;pFtitu2ul1L;eCoF;nde1;ca2ghF;tf13;a1ni2;as0;facto;i5ngero0I;ar0Ce09h07i06l05oOrIuF;rmudgeon5stoma4teF;sy;ly;aIeHu1EystalF; cleFli7;ar;epy;fFv17z0;ty;erUgTloSmPnGrpoCunterclVveFy;rt;cLdJgr21jIsHtrF;aFi2;dic0Yry;eq1Yta1;oi1ug3;escenFuN;di8;a1QeFiD;it0;atoDmensuCpF;ass1SulF;so4;ni3ss3;e1niza1;ci1J;ockwiD;rcumspeAvil;eFintzy;e4wy;leGrtaF;in;ba2;diac,ef00;a00ePiLliJoGrFuck nak0;and new,isk,on22;gGldface,naF; fi05fi05;us;nd,tF;he;gGpartisFzarE;an;tiF;me;autifOhiNlLnHsFyoN;iWtselF;li8;eGiFt;gn;aFfi03;th;at0oF;v0w;nd;ul;ckwards,rF;e,rT; priori,b13c0Zd0Tf0Ng0Ihe0Hl09mp6nt06pZrTsQttracti0MuLvIwF;aGkF;wa1B;ke,re;ant garGeraF;ge;de;diIsteEtF;heFoimmu7;nt07;re;to4;hGlFtu2;eep;en;bitIchiv3roHtF;ifiFsy;ci3;ga1;ra4;ry;pFt;aHetizi8rF;oprF;ia2;llFre1;ed,i8;ng;iquFsy;at0e;ed;cohKiJkaHl,oGriFterX;ght;ne,of;li7;ne;ke,ve;olF;ic;ad;ain07gressiIi6rF;eeF;ab6;le;ve;fGraB;id;ectGlF;ue1;ioF;na2; JaIeGvF;erD;pt,qF;ua2;ma1;hoc,infinitum;cuCquiGtu3u2;al;esce1;ra2;erSjeAlPoNrKsGuF;nda1;e1olu2trF;aAuD;se;te;eaGuF;pt;st;aFve;rd;aFe;ze;ct;ra1;nt`,Pronoun:`true¦elle,h3i2me,she,th0us,we,you;e0ou;e,m,y;!l,t;e,im`,Preposition:`true¦aPbMcLdKexcept,fIinGmid,notwithstandiWoDpXqua,sCt7u4v2w0;/o,hereSith0;! whHin,oW;ersus,i0;a,s a vis;n1p0;!on;like,til;h1ill,oward0;!s;an,ereby,r0;ough0u;!oM;ans,ince,o that,uch G;f1n0ut;!to;!f;! 0to;effect,part;or,r0;om;espite,own,u3;hez,irca;ar1e0oBy;sides,tween;ri7;bo8cross,ft7lo6m4propos,round,s1t0;!op;! 0;a whole,long 0;as;id0ong0;!st;ng;er;ut`,SportsTeam:`true¦0:18;1:1E;2:1D;3:14;a1Db15c0Sd0Kfc dallas,g0Ihouston 0Hindiana0Gjacksonville jagua0k0El0Am01new UoRpKqueens parkJreal salt lake,sBt6utah jazz,vancouver whitecaps,w4yW;ashington 4h10;natio1Mredski2wizar0W;ampa bay 7e6o4;ronto 4ttenham hotspur;blue ja0Mrapto0;nnessee tita2xasD;buccanee0ra0K;a8eattle 6porting kansas0Wt4; louis 4oke0V;c1Drams;marine0s4;eah13ounH;cramento Rn 4;antonio spu0diego 4francisco gJjose earthquak1;char08paB; ran07;a9h6ittsburgh 5ortland t4;imbe0rail blaze0;pirat1steele0;il4oenix su2;adelphia 4li1;eagl1philNunE;dr1;akland 4klahoma city thunder,rlando magic;athle0Lrai4;de0;england 8orleans 7york 4;g5je3knYme3red bul0Xy4;anke1;ian3;pelica2sain3;patrio3revolut4;ion;anchEeAi4ontreal impact;ami 8lwaukee b7nnesota 4;t5vi4;kings;imberwolv1wi2;rewe0uc0J;dolphi2heat,marli2;mphis grizz4ts;li1;a6eic5os angeles 4;clippe0dodFlaB;esterV; galaxy,ke0;ansas city 4nF;chiefs,roya0D; pace0polis col3;astr05dynamo,rocke3texa2;olden state warrio0reen bay pac4;ke0;allas 8e4i04od6;nver 6troit 4;lio2pisto2ti4;ge0;broncYnugge3;cowbo5maver4;icZ;ys;arEelLhAincinnati 8leveland 6ol4;orado r4umbus crew sc;api7ocki1;brow2cavalie0guar4in4;dia2;bengaVre4;ds;arlotte horAicago 4;b5cubs,fire,wh4;iteB;ea0ulQ;diff4olina panthe0; city;altimore Alackburn rove0oston 6rooklyn 4uffalo bilN;ne3;ts;cel5red4; sox;tics;rs;oriol1rave2;rizona Ast8tlanta 4;brav1falco2h4;awA;ns;es;on villa,r4;os;c6di4;amondbac4;ks;ardi4;na4;ls`,Unit:`true¦a07b04cXdWexVfTgRhePinYjoule0BkMlJmDnan08oCp9quart0Bsq ft,t7volts,w6y2ze3°1µ0;g,s;c,f,n;dVear1o0;ttR; 0s 0;old;att,b;erNon0;!ne02;ascals,e1i0;cXnt00;rcent,tJ;hms,unceY;/s,e4i0m²,²,³;/h,cro2l0;e0liK;!²;grLsR;gCtJ;it1u0;menQx;erPreP;b5elvins,ilo1m0notO;/h,ph,²;!byGgrEmCs;ct0rtzL;aJogrC;allonJb0ig3rB;ps;a0emtEl oz,t4;hrenheit,radG;aby9;eci3m1;aratDe1m0oulombD;²,³;lsius,nti0;gr2lit1m0;et0;er8;am7;b1y0;te5;l,ps;c2tt0;os0;econd1;re0;!s`,"Noun|Gerund":`true¦0:3O;1:3M;2:3N;3:3D;4:32;5:2V;6:3E;7:3K;8:36;9:3J;A:3B;a3Pb37c2Jd27e23f1Vg1Sh1Mi1Ij1Gk1Dl18m13n11o0Wp0Pques0Sr0EsTtNunderMvKwFyDzB;eroi0oB;ni0o3P;aw2eB;ar2l3;aEed4hispe5i5oCrB;ap8est3i1;n0ErB;ki0r31;i1r2s9tc9;isualizi0oB;lunt1Vti0;stan4ta6;aFeDhin6iCraBy8;c6di0i2vel1M;mi0p8;aBs1;c9si0;l6n2s1;aUcReQhOiMkatKl2Wmo6nowJpeItFuCwB;ea5im37;b35f0FrB;fi0vB;e2Mi2J;aAoryt1KrCuB;d2KfS;etc9ugg3;l3n4;bCi0;ebBi0;oar4;gnBnAt1;a3i0;ip8oB;p8rte2u1;a1r27t1;hCo5reBulp1;a2Qe2;edu3oo3;i3yi0;aKeEi4oCuB;li0n2;oBwi0;fi0;aFcEhear7laxi0nDpor1sB;pon4tructB;r2Iu5;de5;or4yc3;di0so2;p8ti0;aFeacek20laEoCrBublis9;a1Teten4in1oces7;iso2siB;tio2;n2yi0;ckaAin1rB;ki0t1O;fEpeDrganiCvB;erco24ula1;si0zi0;ni0ra1;fe5;avi0QeBur7;gotia1twor6;aDeCi2oB;de3nito5;a2dita1e1ssaA;int0XnBrke1;ifUufactu5;aEeaDiBodAyi0;cen7f1mi1stB;e2i0;r2si0;n4ug9;iCnB;ea4it1;c6l3;ogAuB;dAgg3stif12;ci0llust0VmDnBro2;nova1sp0NterBven1;ac1vie02;agi2plo4;aDea1iCoBun1;l4w3;ki0ri0;nd3rB;roWvB;es1;aCene0Lli4rBui4;ee1ie0N;rde2the5;aHeGiDlCorBros1un4;e0Pmat1;ir1oo4;gh1lCnBs9;anZdi0;i0li0;e3nX;r0Zscina1;a1du01nCxB;erci7plo5;chan1di0ginB;ee5;aLeHiGoub1rCum8wB;el3;aDeCiB;bb3n6vi0;a0Qs7;wi0;rTscoDvi0;ba1coZlBvelo8;eCiB;ve5;ga1;nGti0;aVelebUhSlPoDrBur3yc3;aBos7yi0;f1w3;aLdi0lJmFnBo6pi0ve5;dDsCvinB;ci0;trBul1;uc1;muniDpB;lBo7;ai2;ca1;lBo5;ec1;c9ti0;ap8eaCimToBubT;ni0t9;ni0ri0;aBee5;n1t1;ra1;m8rCs1te5;ri0;vi0;aPeNitMlLoGrDuB;dge1il4llBr8;yi0;an4eat9oadB;cas1;di0;a1mEokB;i0kB;ee8;pi0;bi0;es7oa1;c9i0;gin2lonAt1;gi0;bysit1c6ki0tt3;li0;ki0;bando2cGdverti7gi0pproac9rgDssuCtB;trac1;mi0;ui0;hi0;si0;coun1ti0;ti0;ni0;ng`,PhrasalVerb:`true¦0:92;1:96;2:8H;3:8V;4:8A;5:83;6:85;7:98;8:90;9:8G;A:8X;B:8R;C:8U;D:8S;E:70;F:97;G:8Y;H:81;I:7H;J:79;a9Fb7Uc6Rd6Le6Jf5Ig50h4Biron0j47k40l3Em31n2Yo2Wp2Cquiet Hr1Xs0KtZuXvacuu6QwNyammerBzK;ero Dip LonK;e0k0;by,ov9up;aQeMhLiKor0Mrit19;mp0n3Fpe0r5s5;ackAeel Di0S;aLiKn33;gh 3Wrd0;n Dr K;do1in,oJ;it 79k5lk Lrm 69sh Kt83v60;aw3do1o7up;aw3in,oC;rgeBsK;e 2herE;a00eYhViRoQrMuKypP;ckErn K;do1in,oJup;aLiKot0y 30;ckl7Zp F;ck HdK;e 5Y;n7Wp 3Es5K;ck MdLe Kghten 6me0p o0Rre0;aw3ba4do1in,up;e Iy 2;by,oG;ink Lrow K;aw3ba4in,up;ba4ov9up;aKe 77ll62;m 2r 5M;ckBke Llk K;ov9shit,u47;aKba4do1in,leave,o4Dup;ba4ft9pa69w3;a0Vc0Te0Mh0Ii0Fl09m08n07o06p01quar5GtQuOwK;earMiK;ngLtch K;aw3ba4o8K; by;cKi6Bm 2ss0;k 64;aReQiPoNrKud35;aigh2Det75iK;ke 7Sng K;al6Yup;p Krm2F;by,in,oG;c3Ln3Lr 2tc4O;p F;c3Jmp0nd LrKveAy 2O;e Ht 2L;ba4do1up;ar3GeNiMlLrKurB;ead0ingBuc5;a49it 6H;c5ll o3Cn 2;ak Fe1Xll0;a3Bber 2rt0und like;ap 5Vow Duggl5;ash 6Noke0;eep NiKow 6;cLp K;o6Dup;e 68;in,oK;ff,v9;de19gn 4NnKt 6Gz5;gKkE; al6Ale0;aMoKu5W;ot Kut0w 7M;aw3ba4f48oC;c2WdeEk6EveA;e Pll1Nnd Orv5tK; Ktl5J;do1foLin,o7upK;!on;ot,r5Z;aw3ba4do1in,o33up;oCto;al66out0rK;ap65ew 6J;ilAv5;aXeUiSoOuK;b 5Yle0n Kstl5;aLba4do1inKo2Ith4Nu5P;!to;c2Xr8w3;ll Mot LpeAuK;g3Ind17;a2Wf3Po7;ar8in,o7up;ng 68p oKs5;ff,p18;aKelAinEnt0;c6Hd K;o4Dup;c27t0;aZeYiWlToQrOsyc35uK;ll Mn5Kt K;aKba4do1in,oJto47up;pa4Dw3;a3Jdo1in,o21to45up;attleBess KiNop 2;ah2Fon;iLp Kr4Zu1Gwer 6N;do1in,o6Nup;nt0;aLuK;gEmp 6;ce u20y 6D;ck Kg0le 4An 6p5B;oJup;el 5NncilE;c53ir 39n0ss MtLy K;ba4oG; Hc2R;aw3ba4in,oJ;pKw4Y;e4Xt D;aLerd0oK;dAt53;il Hrrow H;aTeQiPoLuK;ddl5ll I;c1FnkeyMp 6uthAve K;aKdo1in,o4Lup;l4Nw3; wi4K;ss0x 2;asur5e3SlLss K;a21up;t 6;ke Ln 6rKs2Ax0;k 6ryA;do,fun,oCsure,up;a02eViQoLuK;ck0st I;aNc4Fg MoKse0;k Kse4D;aft9ba4do1forw37in56o0Zu46;in,oJ;d 6;e NghtMnLsKve 00;ten F;e 2k 2; 2e46;ar8do1in;aMt LvelK; oC;do1go,in,o7up;nEve K;in,oK;pKut;en;c5p 2sh LtchBughAy K;do1o59;in4Po7;eMick Lnock K;do1oCup;oCup;eLy K;in,up;l Ip K;aw3ba4do1f04in,oJto,up;aMoLuK;ic5mpE;ke3St H;c43zz 2;a01eWiToPuK;nLrrKsh 6;y 2;keLt K;ar8do1;r H;lKneErse3K;d Ke 2;ba4dKfast,o0Cup;ear,o1;de Lt K;ba4on,up;aw3o7;aKlp0;d Ml Ir Kt 2;fKof;rom;f11in,o03uW;cPm 2nLsh0ve Kz2P;at,it,to;d Lg KkerP;do1in,o2Tup;do1in,oK;ut,v9;k 2;aZeTive Rloss IoMrLunK; f0S;ab hold,in43ow 2U; Kof 2I;aMb1Mit,oLr8th1IuK;nd9;ff,n,v9;bo7ft9hQw3;aw3bKdo1in,oJrise,up,w3;a4ir2H;ar 6ek0t K;aLb1Fdo1in,oKr8up;ff,n,ut,v9;cLhKl2Fr8t,w3;ead;ross;d aKng 2;bo7;a0Ee07iYlUoQrMuK;ck Ke2N;ar8up;eLighten KownBy 2;aw3oG;eKshe27; 2z5;g 2lMol Krk I;aKwi20;bo7r8;d 6low 2;aLeKip0;sh0;g 6ke0mKrKtten H;e F;gRlPnNrLsKzzle0;h F;e Km 2;aw3ba4up;d0isK;h 2;e Kl 1T;aw3fPin,o7;ht ba4ure0;ePnLsK;s 2;cMd K;fKoG;or;e D;d04l 2;cNll Krm0t1G;aLbKdo1in,o09sho0Eth08victim;a4ehi2O;pa0C;e K;do1oGup;at Kdge0nd 12y5;in,o7up;aOi1HoNrK;aLess 6op KuN;aw3b03in,oC;gBwB; Ile0ubl1B;m 2;a0Ah05l02oOrLut K;aw3ba4do1oCup;ackBeep LoKy0;ss Dwd0;by,do1in,o0Uup;me NoLuntK; o2A;k 6l K;do1oG;aRbQforOin,oNtKu0O;hLoKrue;geth9;rough;ff,ut,v9;th,wK;ard;a4y;paKr8w3;rt;eaLose K;in,oCup;n 6r F;aNeLiK;ll0pE;ck Der Kw F;on,up;t 2;lRncel0rOsMtch LveE; in;o1Nup;h Dt K;doubt,oG;ry LvK;e 08;aw3oJ;l Km H;aLba4do1oJup;ff,n,ut;r8w3;a0Ve0MiteAl0Fo04rQuK;bblNckl05il0Dlk 6ndl05rLsKtMy FzzA;t 00;n 0HsK;t D;e I;ov9;anWeaUiLush K;oGup;ghQng K;aNba4do1forMin,oLuK;nd9p;n,ut;th;bo7lKr8w3;ong;teK;n 2;k K;do1in,o7up;ch0;arTg 6iRn5oPrNssMttlLunce Kx D;aw3ba4;e 6; ar8;e H;do1;k Dt 2;e 2;l 6;do1up;d 2;aPeed0oKurt0;cMw K;aw3ba4do1o7up;ck;k K;in,oC;ck0nk0stA; oQaNef 2lt0nd K;do1ov9up;er;up;r Lt K;do1in,oCup;do1o7;ff,nK;to;ck Pil0nMrgLsK;h D;ainBe D;g DkB; on;in,o7;aw3do1in,oCup;ff,ut;ay;ct FdQir0sk MuctionA; oG;ff;ar8o7;ouK;nd; o7;d K;do1oKup;ff,n;wn;o7up;ut`,ProperNoun:`true¦aIbDc8dalhousHe7f5gosford,h4iron maiden,kirby,landsdowne,m2nis,r1s0wembF;herwood,paldiB;iel,othwe1;cgi0ercedes,issy;ll;intBudsB;airview,lorence,ra0;mpt9nco;lmo,uro;a1h0;arlt6es5risti;rl0talina;et4i0;ng;arb3e0;et1nt0rke0;ley;on;ie;bid,jax`,"Person|Place":`true¦a8d6h4jordan,k3orlando,s1vi0;ctor9rgin9;a0ydney;lvador,mara,ntia4;ent,obe;amil0ous0;ton;arw2ie0;go;lexandr1ust0;in;ia`,LastName:`true¦0:BR;1:BF;2:B5;3:BH;4:AX;5:9Y;6:B6;7:BK;8:B0;9:AV;A:AL;B:8Q;C:8G;D:7K;E:BM;F:AH;aBDb9Zc8Wd88e81f7Kg6Wh64i60j5Lk4Vl4Dm39n2Wo2Op25quispe,r1Ls0Pt0Ev03wTxSyKzG;aIhGimmerm6A;aGou,u;ng,o;khar5ytsE;aKeun9BiHoGun;koya32shiBU;!lG;diGmaz;rim,z;maGng;da,g52mo83sGzaC;aChiBV;iao,u;aLeJiHoGright,u;jcA5lff,ng;lGmm0nkl0sniewsC;kiB1liams33s3;bGiss,lt0;b,er,st0;a6Vgn0lHtG;anabe,s3;k0sh,tG;e2Non;aLeKiHoGukD;gt,lk5roby5;dHllalGnogr3Kr1Css0val3S;ba,ob1W;al,ov4;lasHsel8W;lJn dIrgBEsHzG;qu7;ilyEqu7siljE;en b6Aijk,yk;enzueAIverde;aPeix1VhKi2j8ka43oJrIsui,uG;om5UrG;c2n0un1;an,emblA7ynisC;dorAMlst3Km4rrAth;atch0i8UoG;mHrG;are84laci79;ps3sG;en,on;hirDkah9Mnaka,te,varA;a06ch01eYhUiRmOoMtIuHvGzabo;en9Jobod3N;ar7bot4lliv2zuC;aIeHoG;i7Bj4AyanAB;ele,in2FpheBvens25;l8rm0;kol5lovy5re7Tsa,to,uG;ng,sa;iGy72;rn5tG;!h;l71mHnGrbu;at9cla9Egh;moBo7M;aIeGimizu;hu,vchG;en8Luk;la,r1G;gu9infe5YmGoh,pulveA7rra5P;jGyG;on5;evi6iltz,miHneid0roed0uGwarz;be3Elz;dHtG;!t,z;!t;ar4Th8ito,ka4OlJnGr4saCto,unde19v4;ch7dHtGz;a5Le,os;b53e16;as,ihDm4Po0Y;aVeSiPoJuHyG;a6oo,u;bio,iz,sG;so,u;bKc8Fdrigue67ge10j9YmJosevelt,sItHux,wG;e,li6;a9Ch;enb4Usi;a54e4L;erts15i93;bei4JcHes,vGzzo;as,e9;ci,hards12;ag2es,iHut0yG;es,nol5N;s,t0;dImHnGsmu97v6C;tan1;ir7os;ic,u;aUeOhMiJoHrGut8;asad,if6Zochazk27;lishc2GpGrti72u10we76;e3Aov51;cHe45nG;as,to;as70hl0;aGillips;k,m,n6I;a3Hde3Wete0Bna,rJtG;ersHrovGters54;!a,ic;!en,on;eGic,kiBss3;i9ra,tz,z;h86k,padopoulIrk0tHvG;ic,l4N;el,te39;os;bMconn2Ag2TlJnei6PrHsbor6XweBzG;dem7Rturk;ella4DtGwe6N;ega,iz;iGof7Hs8I;vGyn1R;ei9;aSri1;aPeNiJoGune50ym2;rHvGwak;ak4Qik5otn66;odahl,r4S;cholsZeHkolGls4Jx3;ic,ov84;ls1miG;!n1;ils3mG;co4Xec;gy,kaGray2sh,var38;jiGmu9shiG;ma;a07c04eZiWoMuHyeG;rs;lJnIrGssoli6S;atGp03r7C;i,ov4;oz,te58;d0l0;h2lOnNo0RrHsGza1A;er,s;aKeJiIoz5risHtG;e56on;!on;!n7K;au,i9no,t5J;!lA;r1Btgome59;i3El0;cracFhhail5kkeHlG;l0os64;ls1;hmeJiIj30lHn3Krci0ssiGyer2N;!er;n0Po;er,j0;dDti;cartHlG;aughl8e2;hy;dQe7Egnu68i0jer3TkPmNnMrItHyG;er,r;ei,ic,su21thews;iHkDquAroqu8tinG;ez,s;a5Xc,nG;!o;ci5Vn;a5UmG;ad5;ar5e6Kin1;rig77s1;aVeOiLoJuHyG;!nch;k4nGo;d,gu;mbarGpe3Fvr4we;di;!nGu,yana2B;coln,dG;b21holm,strom;bedEfeKhIitn0kaHn8rGw35;oy;!j;m11tG;in1on1;bvGvG;re;iGmmy,ng,rs2Qu,voie,ws3;ne,t1F;aZeYh2iWlUnez50oNrJuHvar2woG;k,n;cerGmar68znets5;a,o34;aHem0isGyeziu;h23t3O;m0sni4Fus3KvG;ch4O;bay57ch,rh0Usk16vaIwalGzl5;czGsC;yk;cIlG;!cGen4K;huk;!ev4ic,s;e8uiveG;rt;eff0kGl4mu9nnun1;ucF;ll0nnedy;hn,llKminsCne,pIrHstra3Qto,ur,yGzl5;a,s0;j0Rls22;l2oG;or;oe;aPenOha6im14oHuG;ng,r4;e32hInHrge32u6vG;anD;es,ss3;anHnsG;en,on,t3;nesGs1R;en,s1;kiBnings,s1;cJkob4EnGrv0E;kDsG;en,sG;en0Ion;ks3obs2A;brahimDglesi5Nke5Fl0Qno07oneIshikHto,vanoG;u,v54;awa;scu;aVeOiNjaltal8oIrist50uG;!aGb0ghAynh;m2ng;a6dz4fIjgaa3Hk,lHpUrGwe,x3X;ak1Gvat;mAt;er,fm3WmG;ann;ggiBtchcock;iJmingw4BnHrGss;nand7re9;deGriks1;rs3;kkiHnG;on1;la,n1;dz4g1lvoQmOns0ZqNrMsJuIwHyG;asFes;kiB;g1ng;anHhiG;mo14;i,ov0J;di6p0r10t;ue;alaG;in1;rs1;aVeorgUheorghe,iSjonRoLrJuGw3;errGnnar3Co,staf3Ctierr7zm2;a,eG;ro;ayli6ee2Lg4iffithGub0;!s;lIme0UnHodGrbachE;e,m2;calvAzale0S;dGubE;bGs0E;erg;aj,i;bs3l,mGordaO;en7;iev3U;gnMlJmaIndFo,rGsFuthi0;cGdn0za;ia;ge;eaHlG;agh0i,o;no;e,on;aVerQiLjeldsted,lKoIrHuG;chs,entAji41ll0;eem2iedm2;ntaGrt8urni0wl0;na;emi6orA;lipIsHtzgeraG;ld;ch0h0;ovG;!ic;hatDnanIrG;arGei9;a,i;deY;ov4;b0rre1D;dKinsJriksIsGvaB;cob3GpGtra3D;inoza,osiQ;en,s3;te8;er,is3warG;ds;aXePiNjurhuMoKrisco15uHvorakG;!oT;arte,boHmitru,nn,rGt3C;and,ic;is;g2he0Omingu7nErd1ItG;to;us;aGcki2Hmitr2Ossanayake,x3;s,z; JbnaIlHmirGrvisFvi,w2;!ov4;gado,ic;th;bo0groot,jo6lHsilGvriA;va;a cruz,e3uG;ca;hl,mcevsCnIt2WviG;dGes,s;ov,s3;ielsGku22;!en;ki;a0Be06hRiobQlarkPoIrGunningh1H;awfo0RivGuz;elli;h1lKntJoIrGs2Nx;byn,reG;a,ia;ke,p0;i,rer2K;em2liB;ns;!e;anu;aOeMiu,oIristGu6we;eGiaG;ns1;i,ng,p9uHwGy;!dH;dGng;huJ;!n,onGu6;!g;kJnIpm2ttHudhGv7;ry;erjee,o14;!d,g;ma,raboG;rty;bJl0Cng4rG;eghetHnG;a,y;ti;an,ota1C;cerAlder3mpbeLrIstGvadi0B;iGro;llo;doHl0Er,t0uGvalho;so;so,zo;ll;a0Fe01hYiXlUoNrKuIyG;rLtyG;qi;chan2rG;ke,ns;ank5iem,oGyant;oks,wG;ne;gdan5nIruya,su,uchaHyKziG;c,n5;rd;darGik;enG;ko;ov;aGond15;nco,zG;ev4;ancFshw16;a08oGuiy2;umGwmG;ik;ckRethov1gu,ktPnNrG;gJisInG;ascoGds1;ni;ha;er,mG;anG;!n;gtGit7nP;ss3;asF;hi;er,hG;am;b4ch,ez,hRiley,kk0ldw8nMrIshHtAu0;es;ir;bInHtlGua;ett;es,i0;ieYosa;dGik;a9yoG;padhyG;ay;ra;k,ng;ic;bb0Acos09d07g04kht05lZnPrLsl2tJyG;aHd8;in;la;chis3kiG;ns3;aImstro6sl2;an;ng;ujo,ya;dJgelHsaG;ri;ovG;!a;ersJov,reG;aGjEws;ss1;en;en,on,s3;on;eksejEiyEmeiIvG;ar7es;ez;da;ev;arwHuilG;ar;al;ams,l0;er;ta;as`,Ordinal:`true¦eBf7nin5s3t0zeroE;enDhir1we0;lfCn7;d,t3;e0ixt8;cond,vent7;et0th;e6ie7;i2o0;r0urt3;tie4;ft1rst;ight0lev1;e0h,ie1;en0;th`,Cardinal:`true¦bEeBf5mEnine7one,s4t0zero;en,h2rDw0;e0o;lve,n5;irt6ousands,ree;even2ix2;i3o0;r1ur0;!t2;ty;ft0ve;e2y;ight0lev1;!e0y;en;illions`,Multiple:`true¦b3hundred,m3qu2se1t0;housand,r2;pt1xt1;adr0int0;illion`,City:`true¦0:74;1:61;2:6G;3:6J;4:5S;a68b53c4Id48e44f3Wg3Hh39i31j2Wk2Fl23m1Mn1Co19p0Wq0Ur0Os05tRuQvLwDxiBy9z5;a7h5i4Muri4O;a5e5ongsh0;ng3H;greb,nzib5G;ang2e5okoha3Sunfu;katerin3Hrev0;a5n0Q;m5Hn;arsBeAi6roclBu5;h0xi,zh5P;c7n5;d5nipeg,terth4;hoek,s1L;hi5Zkl3A;l63xford;aw;a8e6i5ladivost5Molgogr6L;en3lni6S;ni22r5;o3saill4N;lenc4Wncouv3Sr3ughn;lan bat1Crumqi,trecht;aFbilisi,eEheDiBo9r7u5;l21n63r5;in,ku;i5ondh62;es51poli;kyo,m2Zron1Pulo5;n,uS;an5jua3l2Tmisoa6Bra3;j4Tshui; hag62ssaloni2H;gucigal26hr0l av1U;briz,i6llinn,mpe56ng5rtu,shk2R;i3Esh0;an,chu1n0p2Eyu0;aEeDh8kopje,owe1Gt7u5;ra5zh4X;ba0Ht;aten is55ockholm,rasbou67uttga2V;an8e6i5;jiazhua1llo1m5Xy0;f50n5;ya1zh4H;gh3Kt4Q;att45o1Vv44;cramen16int ClBn5o paulo,ppo3Rrajevo; 7aa,t5;a 5o domin3E;a3fe,m1M;antonio,die3Cfrancisco,j5ped3Nsalvad0J;o5u0;se;em,t lake ci5Fz25;lou58peters24;a9e8i6o5;me,t59;ga,o5yadh;! de janei3F;cife,ims,nn3Jykjavik;b4Sip4lei2Inc2Pwalpindi;ingdao,u5;ez2i0Q;aFeEhDiCo9r7u6yong5;ya1;eb59ya1;a5etor3M;g52to;rt5zn0; 5la4Co;au prin0Melizabe24sa03;ls3Prae5Atts26;iladelph3Gnom pe1Aoenix;ki1tah tik3E;dua,lerYnaji,r4Ot5;na,r32;ak44des0Km1Mr6s5ttawa;a3Vlo;an,d06;a7ew5ing2Fovosibir1Jyc; 5cast36;del24orlea44taip14;g8iro4Wn5pl2Wshv33v0;ch6ji1t5;es,o1;a1o1;a6o5p4;ya;no,sa0W;aEeCi9o6u5;mb2Ani26sc3Y;gadishu,nt6s5;c13ul;evideo,pelli1Rre2Z;ami,l6n14s5;kolc,sissauga;an,waukee;cca,d5lbour2Mmph41ndo1Cssi3;an,ell2Xi3;cau,drAkass2Sl9n8r5shh4A;aca6ib5rakesh,se2L;or;i1Sy;a4EchFdal0Zi47;mo;id;aDeAi8o6u5vSy2;anMckn0Odhia3;n5s angel26;d2g bea1N;brev2Be3Lma5nz,sb2verpo28;!ss27; ma39i5;c5pzig;est16; p6g5ho2Wn0Cusan24;os;az,la33;aHharFiClaipeBo9rak0Du7y5;iv,o5;to;ala lump4n5;mi1sh0;hi0Hlka2Xpavog4si5wlo2;ce;da;ev,n5rkuk;gst2sha5;sa;k5toum;iv;bHdu3llakuric0Qmpa3Fn6ohsiu1ra5un1Iwaguc0Q;c0Pj;d5o,p4;ah1Ty;a7e6i5ohannesV;l1Vn0;dd36rusalem;ip4k5;ar2H;bad0mph1OnArkutUs7taXz5;mir,tapala5;pa;fah0l6tanb5;ul;am2Zi2H;che2d5;ianap2Mo20;aAe7o5yder2W; chi mi5ms,nolulu;nh;f6lsin5rakli2;ki;ei;ifa,lifax,mCn5rb1Dva3;g8nov01oi;aFdanEenDhCiPlasgBo9raz,u5;a5jr23;dal6ng5yaquil;zh1J;aja2Oupe;ld coa1Bthen5;bu2S;ow;ent;e0Uoa;sk;lw7n5za;dhi5gt1E;nag0U;ay;aisal29es,o8r6ukuya5;ma;ankfu5esno;rt;rt5sh0; wor6ale5;za;th;d5indhov0Pl paso;in5mont2;bur5;gh;aBe8ha0Xisp4o7resd0Lu5;b5esseldorf,nkirk,rb0shanbe;ai,l0I;ha,nggu0rtmu13;hradSl6nv5troit;er;hi;donghIe6k09l5masc1Zr es sala1KugavpiY;i0lU;gu,je2;aJebu,hAleve0Vo5raio02uriti1Q;lo7n6penhag0Ar5;do1Ok;akKst0V;gUm5;bo;aBen8i6ongqi1ristchur5;ch;ang m7ca5ttago1;go;g6n5;ai;du,zho1;ng5ttogr14;ch8sha,zh07;gliari,i9lga8mayenJn6pe town,r5tanO;acCdiff;ber1Ac5;un;ry;ro;aWeNhKirmingh0WoJr9u5;chareTdapeTenos air7r5s0tu0;g5sa;as;es;a9is6usse5;ls;ba6t5;ol;ne;sil8tisla7zzav5;il5;le;va;ia;goZst2;op6ubaneshw5;ar;al;iCl9ng8r5;g6l5n;in;en;aluru,hazi;fa6grade,o horizon5;te;st;ji1rut;ghd0BkFn9ot8r7s6yan n4;ur;el,r07;celo3i,ranquil09;ou;du1g6ja lu5;ka;alo6k5;ok;re;ng;ers5u;field;a05b02cc01ddis aba00gartaZhmedXizawl,lSmPnHqa00rEsBt7uck5;la5;nd;he7l5;an5;ta;ns;h5unci2;dod,gab5;at;li5;ngt2;on;a8c5kaOtwerp;hora6o3;na;ge;h7p5;ol5;is;eim;aravati,m0s5;terd5;am; 7buquerq6eppo,giers,ma5;ty;ue;basrah al qadim5mawsil al jadid5;ah;ab5;ad;la;ba;ra;idj0u dha5;bi;an;lbo6rh5;us;rg`,Region:`true¦0:2O;1:2L;2:2U;3:2F;a2Sb2Fc21d1Wes1Vf1Tg1Oh1Ki1Fj1Bk16l13m0Sn09o07pYqVrSsJtEuBverAw6y4zacatec2W;akut0o0Fu4;cat1k09;a5est 4isconsin,yomi1O;bengal,virgin0;rwick3shington4;! dc;acruz,mont;dmurt0t4;ah,tar4; 2Pa12;a6e5laxca1Vripu21u4;scaEva;langa2nnessee,x2J;bas10m4smQtar29;aulip2Hil nadu;a9elang07i7o5taf16u4ylh1J;ff02rr09s1E;me1Gno1Uuth 4;cZdY;ber0c4kkim,naloa;hu1ily;n5rawak,skatchew1xo4;ny; luis potosi,ta catari2;a4hodeA;j4ngp0C;asth1shahi;ingh29u4;e4intana roo;bec,en6retaro;aAe6rince edward4unjab; i4;sl0G;i,n5r4;ak,nambu0F;a0Rnsylv4;an0;ha0Pra4;!na;axa0Zdisha,h4klaho21ntar4reg7ss0Dx0I;io;aLeEo6u4;evo le4nav0X;on;r4tt18va scot0;f9mandy,th4; 4ampton3;c6d5yo4;rk3;ako1O;aroli2;olk;bras1Nva0Dw4; 6foundland4;! and labrad4;or;brunswick,hamp3jers5mexiTyork4;! state;ey;galPyarit;aAeghala0Mi6o4;nta2r4;dov0elos;ch6dlanDn5ss4zor11;issippi,ouri;as geraPneso18;ig1oac1;dhy12harasht0Gine,lac07ni5r4ssachusetts;anhao,i el,ylG;p4toba;ur;anca3e4incoln3ouisI;e4iR;ds;a6e5h4omi;aka06ul2;dah,lant1ntucky,ra01;bardino,lmyk0ns0Qr4;achay,el0nata0X;alis6har4iangxi;kh4;and;co;daho,llino7n4owa;d5gush4;et0;ia2;is;a6ert5i4un1;dalFm0D;ford3;mp3rya2waii;ansu,eorg0lou7oa,u4;an4izhou,jarat;ajuato,gdo4;ng;cester3;lori4uji1;da;sex;ageUe7o5uran4;go;rs4;et;lawaMrby3;aFeaEh9o4rim08umbr0;ahui7l6nnectic5rsi4ventry;ca;ut;i03orado;la;e5hattisgarh,i4uvash0;apRhuahua;chn5rke4;ss0;ya;ra;lGm4;bridge3peche;a9ihar,r8u4;ck4ryat0;ingham3;shi4;re;emen,itish columb0;h0ja cal8lk7s4v7;hkorto4que;st1;an;ar0;iforn0;ia;dygHguascalientes,lBndhr9r5ss4;am;izo2kans5un4;achal 7;as;na;a 4;pradesh;a6ber5t4;ai;ta;ba5s4;ka;ma;ea`,Place:`true¦0:4T;1:4V;2:44;3:4B;4:3I;a4Eb3Gc2Td2Ge26f25g1Vh1Ji1Fk1Cl14m0Vn0No0Jp08r04sTtNuLvJw7y5;a5o0Syz;kut1Bngtze;aDeChitBi9o5upatki,ycom2P;ki26o5;d5l1B;b3Ps5;i4to3Y;c0SllowbroCn5;c2Qgh2;by,chur1P;ed0ntw3Gs22;ke6r3St5;erf1f1; is0Gf3V;auxha3Mirgin is0Jost5;ok;laanbaatar,pto5xb3E;n,wn;a9eotihuac43h7ive49o6ru2Nsarskoe selo,u5;l2Dzigo47;nto,rquay,tt2J;am3e 5orn3E;bronx,hamptons;hiti,j mah0Iu1N;aEcotts bluff,eCfo,herbroQoApring9t7u5yd2F;dbu1Wn5;der03set3B;aff1ock2Nr5;atf1oud;hi37w24;ho,uth5; 1Iam1Zwo3E;a5i2O;f2Tt0;int lawrence riv3Pkhal2D;ayleigh,ed7i5oc1Z;chmo1Eo gran4ver5;be1Dfr09si4; s39cliffe,hi2Y;aCe9h8i5ompeii,utn2;c6ne5tcai2T; 2Pc0G;keri13t0;l,x;k,lh2mbr6n5r2J;n1Hzance;oke;cif38pahanaumokuak30r5;k5then0;si4w1K;ak7r6x5;f1l2X;ange county,d,f1inoco;mTw1G;e8i1Uo5;r5tt2N;th5wi0E; 0Sam19;uschwanste1Pw5; eng6a5h2market,po36;rk;la0P;a8co,e6i5uc;dt1Yll0Z;adow5ko0H;lands;chu picchu,gad2Ridsto1Ql8n7ple6r5;kh2; g1Cw11;hatt2Osf2B;ibu,t0ve1Z;a8e7gw,hr,in5owlOynd02;coln memori5dl2C;al;asi4w3;kefr7mbe1On5s,x;ca2Ig5si05;f1l27t0;ont;azan kreml14e6itchen2Gosrae,rasnoyar5ul;sk;ns0Hs1U;ax,cn,lf1n6ps5st;wiN;d5glew0Lverness;ian27ochina;aDeBi6kg,nd,ov5unti2H;d,enweep;gh6llc5;reL;bu03l5;and5;!s;r5yw0C;ef1tf1;libu24mp6r5stings;f1lem,row;stead,t0;aDodavari,r5uelph;avenAe5imsS;at 8en5; 6f1Fwi5;ch;acr3vall1H;brita0Flak3;hur5;st;ng3y villa0W;airhavHco,ra;aAgli9nf17ppi8u7ver6x5;et1Lf1;glad3t0;rope,st0;ng;nt0;rls1Ls5;t 5;e5si4;nd;aCe9fw,ig8o7ryd6u5xb;mfri3nstab00rh2tt0;en;nca18rcKv19wnt0B;by;n6r5vonpo1D;ry;!h2;nu8r5;l6t5;f1moor;ingt0;be;aLdg,eIgk,hClBo5royd0;l6m5rnwa0B;pt0;c7lingw6osse5;um;ood;he0S;earwat0St;a8el6i5uuk;chen itza,mney ro07natSricahua;m0Zt5;enh2;mor5rlottetPth2;ro;dar 5ntervilA;breaks,faZg5;rove;ld9m8r5versh2;lis6rizo pla5;in;le;bLpbellf1;weQ;aZcn,eNingl01kk,lackLolt0r5uckV;aGiAo5;ckt0ok5wns cany0;lyn,s5;i4to5;ne;de;dge6gh5;am,t0;n6t5;own;or5;th;ceb6m5;lNpt0;rid5;ge;bu5pool,wa8;rn;aconsfEdf1lBr9verly7x5;hi5;ll; hi5;lls;wi5;ck; air,l5;ingh2;am;ie5;ld;ltimore,rnsl6tters5;ea;ey;bLct0driadic,frica,ginJlGmFn9rc8s7tl6yleOzor3;es;!ant8;hcroft,ia; de triomphe,t6;adyr,ca8dov9tarct5;ic5; oce5;an;st5;er;ericas,s;be6dersh5hambra,list0;ot;rt0;cou5;rt;bot7i5;ngd0;on;sf1;ord`,Country:`true¦0:38;1:2L;2:3B;a2Xb2Ec22d1Ye1Sf1Mg1Ch1Ai14j12k0Zl0Um0Gn05om2pZqat1KrXsKtCu7v5wal4yemTz3;a25imbabwe;es,lis and futu2Y;a3enezue32ietnam;nuatu,tican city;gTk6nited 4ruXs3zbeE; 2Ca,sr;arab emirat0Kkingdom,states3;! of am2Y;!raiV;a8haCimor les0Co7rinidad 5u3;nis0rk3valu;ey,me2Zs and caic1V;and t3t3;oba1L;go,kel10nga;iw2ji3nz2T;ki2V;aDcotl1eCi9lov8o6pa2Dri lanka,u5w3yr0;az3edAitzerl1;il1;d2riname;lomon1Xmal0uth 3;afr2KkMsud2;ak0en0;erra leoFn3;gapo1Yt maart3;en;negLrb0ychellZ;int 3moa,n marino,udi arab0;hele26luc0mart21;epublic of ir0Eom2Euss0w3;an27;a4eIhilippinUitcairn1Mo3uerto riN;l1rtugF;ki2Dl4nama,pua new0Vra3;gu7;au,esti3;ne;aBe9i7or3;folk1Ith4w3;ay; k3ern mariana1D;or0O;caragua,ger3ue;!ia;p3ther1Aw zeal1;al;mib0u3;ru;a7exi6icro0Bo3yanm06;ldova,n3roc5zambA;a4gol0t3;enegro,serrat;co;cAdagasc01l7r5urit4yot3;te;an0i16;shall0Xtin3;ique;a4div3i,ta;es;wi,ys0;ao,ed02;a6e5i3uxembourg;b3echtenste12thu1G;er0ya;ban0Isotho;os,tv0;azakh1Fe4iriba04o3uwait,yrgyz1F;rXsovo;eling0Knya;a3erG;ma16p2;c7nd6r4s3taly,vory coast;le of m2rael;a3el1;n,q;ia,oJ;el1;aiTon3ungary;dur0Ng kong;aBermany,ha0QibraltAre8u3;a6ern5inea3ya0P;! biss3;au;sey;deloupe,m,tema0Q;e3na0N;ce,nl1;ar;bUmb0;a7i6r3;ance,ench 3;guia0Epoly3;nes0;ji,nl1;lklandUroeU;ast tim7cu6gypt,l salv6ngl1quatorial4ritr5st3thiop0;on0; guin3;ea;ad3;or;enmark,jibou5ominica4r con3;go;!n C;ti;aBentral african Ah8o5roat0u4yprRzech3; 9ia;ba,racao;c4lo3morQngo brazzaville,okGsta r04te de ivoiL;mb0;osE;i3ristmasG;le,na;republic;m3naUpe verde,ymanA;bod0ero3;on;aGeDhut2o9r5u3;lgar0r3;kina faso,ma,undi;azil,itish 3unei;virgin3; is3;lands;liv0nai5snia and herzegoviHtswaHuvet3; isl1;and;re;l3n8rmuG;ar3gium,ize;us;h4ngladesh,rbad3;os;am4ra3;in;as;fghaGlDmBn6r4ustr3zerbaij2;al0ia;genti3men0uba;na;dorra,g5t3;arct7igua and barbu3;da;o3uil3;la;er3;ica;b3ger0;an0;ia;ni3;st2;an`,FirstName:`true¦aTblair,cQdOfrancoZgabMhinaLilya,jHkClBm6ni4quinn,re3s0;h0umit,yd;ay,e0iloh;a,lby;g9ne;co,ko0;!s;a1el0ina,org6;!okuhF;ds,naia,r1tt0xiB;i,y;ion,lo;ashawn,eif,uca;a3e1ir0rM;an;lsFn0rry;dall,yat5;i,sD;a0essIie,ude;i1m0;ie,mG;me;ta;rie0y;le;arcy,ev0;an,on;as1h0;arl8eyenne;ey,sidy;drien,kira,l4nd1ubr0vi;ey;i,r0;a,e0;a,y;ex2f1o0;is;ie;ei,is`,WeekDay:`true¦fri2mon2s1t0wednesd3;hurs1ues1;aturd1und1;!d0;ay0;!s`,Month:`true¦dec0february,july,nov0octo1sept0;em0;ber`,Date:`true¦ago,on4som4t1week0yesterd5; end,ends;mr1o0;d2morrow;!w;ed0;ay`,Duration:`true¦centurAd8h7m5q4se3w1y0;ear8r8;eek0k7;!end,s;ason,c5;tr,uarter;i0onth3;llisecond2nute2;our1r1;ay0ecade0;!s;ies,y`,FemaleName:`true¦0:J7;1:JB;2:IJ;3:IK;4:J1;5:IO;6:JS;7:JO;8:HB;9:JK;A:H4;B:I2;C:IT;D:JH;E:IX;F:BA;G:I4;aGTbFLcDRdD0eBMfB4gADh9Ti9Gj8Dk7Cl5Wm48n3Lo3Hp33qu32r29s15t0Eu0Cv02wVxiTyOzH;aLeIineb,oHsof3;e3Sf3la,ra;h2iKlIna,ynH;ab,ep;da,ma;da,h2iHra;nab;aKeJi0FolB7uIvH;et8onDP;i0na;le0sen3;el,gm3Hn,rGLs8W;aoHme0nyi;m5XyAD;aMendDZhiDGiH;dele9lJnH;if48niHo0;e,f47;a,helmi0lHma;a,ow;ka0nB;aNeKiHusa5;ck84kIl8oleAviH;anFenJ4;ky,toriBK;da,lA8rHs0;a,nHoniH9;a,iFR;leHnesH9;nILrH;i1y;g9rHs6xHA;su5te;aYeUhRiNoLrIuHy2;i,la;acJ3iHu0J;c3na,sH;hFta;nHr0F;iFya;aJffaEOnHs6;a,gtiH;ng;!nFSra;aIeHomasi0;a,l9Oo8Ares1;l3ndolwethu;g9Fo88rIssH;!a,ie;eHi,ri7;sa,za;bOlMmKnIrHs6tia0wa0;a60yn;iHya;a,ka,s6;arFe2iHm77ra;!ka;a,iH;a,t6;at6it6;a0Ecarlett,e0AhWiSkye,neza0oQri,tNuIyH;bIGlvi1;ha,mayIJniAsIzH;an3Net8ie,y;anHi7;!a,e,nH;aCe;aIeH;fan4l5Dphan6E;cI5r5;b3fiAAm0LnHphi1;d2ia,ja,ya;er2lJmon1nIobh8QtH;a,i;dy;lETv3;aMeIirHo0risFDy5;a,lDM;ba,e0i5lJrH;iHr6Jyl;!d8Ifa;ia,lDZ;hd,iMki2nJrIu0w0yH;la,ma,na;i,le9on,ron,yn;aIda,ia,nHon;a,on;!ya;k6mH;!aa;lJrItaye82vH;da,inj;e0ife;en1i0ma;anA9bLd5Oh1SiBkKlJmInd2rHs6vannaC;aCi0;ant6i2;lDOma,ome;ee0in8Tu2;in1ri0;a05eZhXiUoHuthDM;bScRghQl8LnPsJwIxH;anB3ie,y;an,e0;aIeHie,lD;ann7ll1marDGtA;!lHnn1;iHyn;e,nH;a,dF;da,i,na;ayy8G;hel67io;bDRerAyn;a,cIkHmas,nFta,ya;ki,o;h8Xki;ea,iannGMoH;da,n1P;an0bJemFgi0iInHta,y0;a8Bee;han86na;a,eH;cHkaC;a,ca;bi0chIe,i0mo0nHquETy0;di,ia;aERelHiB;!e,le;een4ia0;aPeOhMiLoJrHute6A;iHudenCV;scil3LyamvaB;lHrt3;i0ly;a,paluk;ilome0oebe,ylH;is,lis;ggy,nelope,r5t2;ige,m0VnKo5rvaDMtIulH;a,et8in1;ricHt4T;a,e,ia;do2i07;ctav3dIfD3is6ksa0lHphD3umC5yunbileg;a,ga,iv3;eHvAF;l3t8;aWeUiMoIurHy5;!ay,ul;a,eJor,rIuH;f,r;aCeEma;ll1mi;aNcLhariBQkKlaJna,sHta,vi;anHha;ur;!y;a,iDZki;hoGk9YolH;a,e4P;!mh;hir,lHna,risDEsreE;!a,iDDlBV;asuMdLh3i6Dl5nKomi7rgEVtH;aHhal4;lHs6;i1ya;cy,et8;e9iF0ya;nngu2X;a0Ackenz4e02iMoJrignayani,uriDJyH;a,rH;a,iOlNna,tG;bi0i2llBJnH;a,iH;ca,ka,qD9;a,cUdo4ZkaTlOmi,nMrItzi,yH;ar;aJiIlH;anET;am;!l,nB;dy,eHh,n4;nhGrva;aKdJe0iCUlH;iHy;cent,e;red;!gros;!e5;ae5hH;ae5el3Z;ag5DgNi,lKrH;edi7AiIjem,on,yH;em,l;em,sCG;an4iHliCF;nHsCJ;a,da;!an,han;b09cASd07e,g05ha,i04ja,l02n00rLsoum5YtKuIv84xBKyHz4;bell,ra,soBB;d7rH;a,eE;h8Gild1t4;a,cUgQiKjor4l7Un4s6tJwa,yH;!aHbe6Xja9lAE;m,nBL;a,ha,in1;!aJbCGeIja,lDna,sHt63;!a,ol,sa;!l1D;!h,mInH;!a,e,n1;!awit,i;arJeIie,oHr48ueri8;!t;!ry;et46i3B;el4Xi7Cy;dHon,ue5;akranAy;ak,en,iHlo3S;a,ka,nB;a,re,s4te;daHg4;!l3E;alDd4elHge,isDJon0;ei9in1yn;el,le;a0Ne0CiXoQuLyH;d3la,nH;!a,dIe2OnHsCT;!a,e2N;a,sCR;aD4cJel0Pis1lIna,pHz;e,iA;a,u,wa;iHy;a0Se,ja,l2NnB;is,l1UrItt1LuHvel4;el5is1;aKeIi7na,rH;aADi7;lHn1tA;ei;!in1;aTbb9HdSepa,lNnKsJvIzH;!a,be5Ret8z4;!ia;a,et8;!a,dH;a,sHy;ay,ey,i,y;a,iJja,lH;iHy;aA8e;!aH;!nF;ia,ya;!nH;!a,ne;aPda,e0iNjYla,nMoKsJtHx93y5;iHt4;c3t3;e2PlCO;la,nHra;a,ie,o2;a,or1;a,gh,laH;!ni;!h,nH;a,d2e,n5V;cOdon9DiNkes6mi9Gna,rMtJurIvHxmi,y5;ern1in3;a,e5Aie,yn;as6iIoH;nya,ya;fa,s6;a,isA9;a,la;ey,ie,y;a04eZhXiOlASoNrJyH;lHra;a,ee,ie;istHy6I;a,en,iIyH;!na;!e,n5F;nul,ri,urtnB8;aOerNlB7mJrHzzy;a,stH;en,in;!berlImernH;aq;eHi,y;e,y;a,stE;!na,ra;aHei2ongordzol;dij1w5;el7UiKjsi,lJnIrH;a,i,ri;d2na,za;ey,i,lBLs4y;ra,s6;biAcARdiat7MeBAiSlQmPnyakuma1DrNss6NtKviAyH;!e,lH;a,eH;e,i8T;!a6HeIhHi4TlDri0y;ar8Her8Hie,leErBAy;!lyn8Ori0;a,en,iHl5Xoli0yn;!ma,nFs95;a5il1;ei8Mi,lH;e,ie;a,tl6O;a0AeZiWoOuH;anMdLlHst88;es,iH;a8NeHs8X;!n9tH;!a,te;e5Mi3My;a,iA;!anNcelDdMelGhan7VleLni,sIva0yH;a,ce;eHie;fHlDph7Y;a,in1;en,n1;i7y;!a,e,n45;lHng;!i1DlH;!i1C;anNle0nKrJsH;i8JsH;!e,i8I;i,ri;!a,elGif2CnH;a,et8iHy;!e,f2A;a,eJiInH;a,eIiH;e,n1;!t8;cMda,mi,nIque4YsminFvie2y9zH;min7;a7eIiH;ce,e,n1s;!lHs82t0F;e,le;inIk6HlDquelH;in1yn;da,ta;da,lRmPnOo0rNsIvaHwo0zaro;!a0lu,na;aJiIlaHob89;!n9R;do2;belHdo2;!a,e,l3B;a7Ben1i0ma;di2es,gr72ji;a9elBogH;en1;a,e9iHo0se;a0na;aSeOiJoHus7Kyacin2C;da,ll4rten24snH;a,i9U;lImaH;ri;aIdHlaI;a,egard;ry;ath1BiJlInrietArmi9sH;sa,t1A;en2Uga,mi;di;bi2Fil8MlNnMrJsItHwa,yl8M;i5Tt4;n60ti;iHmo51ri53;etH;!te;aCnaC;a,ey,l4;a02eWiRlPoNrKunJwH;enHyne1R;!dolD;ay,el;acieIetHiselB;a,chE;!la;ld1CogooH;sh;adys,enHor3yn2K;a,da,na;aKgi,lIna,ov8EselHta;a,e,le;da,liH;an;!n0;mLnJorgIrH;ald5Si,m3Etrud7;et8i4X;a,eHna;s29vieve;ma;bIle,mHrnet,yG;al5Si5;iIrielH;a,l1;!ja;aTeQiPlorOoz3rH;anJeIiH;da,eB;da,ja;!cH;esIiHoi0P;n1s66;!ca;a,enc3;en,o0;lIn0rnH;anB;ec3ic3;jr,nArKtHy7;emIiHma,oumaA;ha,ma,n;eh;ah,iBrah,za0;cr4Rd0Re0Qi0Pk0Ol07mXn54rUsOtNuMvHwa;aKelIiH;!e,ta;inFyn;!a;!ngel4V;geni1ni47;h5Yien9ta;mLperanKtH;eIhHrel5;er;l31r7;za;a,eralB;iHma,ne4Lyn;cHka,n;a,ka;aPeNiKmH;aHe21ie,y;!li9nuH;elG;lHn1;e7iHy;a,e,ja;lHrald;da,y;!nue5;aWeUiNlMma,no2oKsJvH;a,iH;na,ra;a,ie;iHuiH;se;a,en,ie,y;a0c3da,e,f,nMsJzaH;!betHveA;e,h;aHe,ka;!beH;th;!a,or;anor,nH;!a,i;!in1na;ate1Rta;leEs6;vi;eIiHna,wi0;e,th;l,n;aYeMh3iLjeneKoH;lor5Vminiq4Ln3FrHtt4;a,eEis,la,othHthy;ea,y;ba;an09naCon9ya;anQbPde,eOiMlJmetr3nHsir5M;a,iH;ce,se;a,iIla,orHphi9;es,is;a,l6F;dHrdH;re;!d5Ena;!b2ForaCraC;a,d2nH;!a,e;hl3i0l0GmNnLphn1rIvi1WyH;le,na;a,by,cIia,lH;a,en1;ey,ie;a,et8iH;!ca,el1Aka,z;arHia;is;a0Re0Nh04i02lUoJristIynH;di,th3;al,i0;lPnMrIurH;tn1D;aJd2OiHn2Ori9;!nH;a,e,n1;!l4;cepci5Cn4sH;tanHuelo;ce,za;eHleE;en,t8;aJeoIotH;il54;!pat2;ir7rJudH;et8iH;a,ne;a,e,iH;ce,sZ;a2er2ndH;i,y;aReNloe,rH;isJyH;stH;al;sy,tH;a1Sen,iHy;an1e,n1;deJlseIrH;!i7yl;a,y;li9;nMrH;isKlImH;ai9;a,eHot8;n1t8;!sa;d2elGtH;al,elG;cIlH;es8i47;el3ilH;e,ia,y;itlYlXmilWndVrMsKtHy5;aIeIhHri0;er1IleErDy;ri0;a38sH;a37ie;a,iOlLmeJolIrH;ie,ol;!e,in1yn;lHn;!a,la;a,eIie,otHy;a,ta;ne,y;na,s1X;a0Ii0I;a,e,l1;isAl4;in,yn;a0Ke02iZlXoUrH;andi7eRiJoIyH;an0nn;nwDoke;an3HdgMgiLtH;n31tH;!aInH;ey,i,y;ny;d,t8;etH;!t7;an0e,nH;da,na;bbi7glarIlo07nH;iAn4;ka;ancHythe;a,he;an1Clja0nHsm3M;iAtH;ou;aWcVlinUniArPssOtJulaCvH;!erlH;ey,y;hJsy,tH;e,iHy7;e,na;!anH;ie,y;!ie;nItHyl;ha,ie;adIiH;ce;et8i9;ay,da;ca,ky;!triH;ce,z;rbJyaH;rmH;aa;a2o2ra;a2Ub2Od25g21i1Sj5l18m0Zn0Boi,r06sWtVuPvOwa,yIzH;ra,u0;aKes6gJlIn,seH;!l;in;un;!nH;a,na;a,i2K;drLguJrIsteH;ja;el3;stH;in1;a,ey,i,y;aahua,he0;hIi2Gja,miAs2DtrH;id;aMlIraqHt21;at;eIi7yH;!n;e,iHy;gh;!nH;ti;iJleIo6piA;ta;en,n1t8;aHelG;!n1J;a01dje5eZgViTjRnKohito,toHya;inet8nH;el5ia;te;!aKeIiHmJ;e,ka;!mHtt7;ar4;!belIliHmU;sa;!l1;a,eliH;ca;ka,sHta;a,sa;elHie;a,iH;a,ca,n1qH;ue;!tH;a,te;!bImHstasiMya;ar3;el;aLberKeliJiHy;e,l3naH;!ta;a,ja;!ly;hGiIl3nB;da;a,ra;le;aWba,ePiMlKthJyH;a,c3sH;a,on,sa;ea;iHys0N;e,s0M;a,cIn1sHza;a,e,ha,on,sa;e,ia,ja;c3is6jaKksaKna,sJxH;aHia;!nd2;ia,saH;nd2;ra;ia;i0nIyH;ah,na;a,is,naCoud;la;c6da,leEmNnLsH;haClH;inHyY;g,n;!h;a,o,slH;ey;ee;en;at6g4nIusH;ti0;es;ie;aWdiTelMrH;eJiH;anMenH;a,e,ne;an0;na;!aLeKiIyH;nn;a,n1;a,e;!ne;!iH;de;e,lDsH;on;yn;!lH;i9yn;ne;aKbIiHrL;!e,gaK;ey,i7y;!e;gaH;il;dKliyJradhIs6;ha;ya;ah;a,ya`,Honorific:`true¦director1field marsh2lieutenant1rear0sergeant major,vice0; admir1; gener0;al`,"Adj|Gerund":`true¦0:3F;1:3H;2:31;3:2X;4:35;5:33;6:3C;7:2Z;8:36;9:29;a33b2Tc2Bd1Te1If19g12h0Zi0Rl0Nm0Gnu0Fo0Ap04rYsKtEuBvAw1Ayiel3;ar6e08;nBpA;l1Rs0B;fol3n1Zsett2;aEeDhrBi4ouc7rAwis0;e0Bif2oub2us0yi1;ea1SiA;l2vi1;l2mp0rr1J;nt1Vxi1;aMcreec7enten2NhLkyrocke0lo0Vmi2oJpHtDuBweA;e0Ul2;pp2ArA;gi1pri5roun3;aBea8iAri2Hun9;mula0r4;gge4rA;t2vi1;ark2eAraw2;e3llb2F;aAot7;ki1ri1;i9oc29;dYtisf6;aEeBive0oAus7;a4l2;assu4defi9fres7ig9juve07mai9s0vAwar3;ea2italiAol1G;si1zi1;gi1ll6mb2vi1;a6eDier23lun1VrAun2C;eBoA;mi5vo1Z;ce3s5vai2;n3rpleA;xi1;ffCpWutBverAwi1;arc7lap04p0Pri3whel8;goi1l6st1J;en3sA;et0;m2Jrtu4;aEeDiCoBuAyst0L;mb2;t1Jvi1;s5tiga0;an1Rl0n3smeri26;dAtu4;de9;aCeaBiAo0U;fesa0Tvi1;di1ni1;c1Fg19s0;llumiGmFnArri0R;cDfurHsCtBviA;go23ti1;e1Oimi21oxica0rig0V;pi4ul0;orpo20r0K;po5;na0;eaBorr02umilA;ia0;li1rtwar8;lFrA;atiDipCoBuelA;i1li1;undbrea10wi1;pi1;f6ng;a4ea8;a3etc7it0lEoCrBulfA;il2;ee1FighXust1L;rAun3;ebo3thco8;aCoA;a0wA;e4i1;mi1tte4;lectrJmHnExA;aCci0hBis0pA;an3lo3;aOila1B;c0spe1A;ab2coura0CdBergi13ga0Clive9ric7s02tA;hral2i0J;ea4u4;barras5er09pA;owe4;if6;aQeIiBrA;if0;sAzz6;aEgDhearCsen0tA;rAur11;ac0es5;te9;us0;ppoin0r8;biliGcDfi9gra3ligh0mBpres5sAvasG;erE;an3ea9orA;ali0L;a6eiBli9rA;ea5;vi1;ta0;maPri1s7un0zz2;aPhMlo5oAripp2ut0;mGnArrespon3;cer9fDspi4tA;inBrA;as0ibu0ol2;ui1;lic0u5;ni1;fDmCpA;eAromi5;l2ti1;an3;or0;aAil2;llenAnAr8;gi1;l8ptAri1;iva0;aff2eGin3lFoDrBuA;d3st2;eathtaAui5;ki1;gg2i2o8ri1unA;ci1;in3;co8wiA;lAtc7;de4;bsorVcOgonMlJmHnno6ppea2rFsA;pi4su4toA;nBun3;di1;is7;hi1;res0;li1;aFu5;si1;ar8lu4;ri1;mi1;iAzi1;zi1;cAhi1;eleDomA;moBpan6;yi1;da0;ra0;ti1;bi1;ng`,Comparable:`true¦0:3C;1:3Q;2:3F;a3Tb3Cc33d2Te2Mf2Ag1Wh1Li1Fj1Ek1Bl13m0Xn0So0Rp0Iqu0Gr07sHtCug0vAw4y3za0Q;el10ouN;ary,e6hi5i3ry;ck0Cde,l3n1ry,se;d,y;ny,te;a3i3R;k,ry;a3erda2ulgar;gue,in,st;a6en2Xhi5i4ouZr3;anqu2Cen1ue;dy,g36me0ny;ck,rs28;ll,me,rt,wd3I;aRcaPeOhMiLkin0BlImGoEpDt6u4w3;eet,ift;b3dd0Wperfi21rre28;sta26t21;a8e7iff,r4u3;pUr1;a4ict,o3;ng;ig2Vn0N;a1ep,rn;le,rk,te0;e1Si2Vright0;ci1Yft,l3on,re;emn,id;a3el0;ll,rt;e4i3y;g2Mm0Z;ek,nd2T;ck24l0mp1L;a3iRrill,y;dy,l01rp;ve0Jxy;n1Jr3;ce,y;d,fe,int0l1Hv0V;a8e6i5o3ude;mantic,o19sy,u3;gh;pe,t1P;a3d,mo0A;dy,l;gg4iFndom,p3re,w;id;ed;ai2i3;ck,et;hoAi1Fl9o8r5u3;ny,r3;e,p11;egna2ic4o3;fouSud;ey,k0;liXor;ain,easa2;ny;dd,i0ld,ranL;aive,e5i4o3u14;b0Sisy,rm0Ysy;bb0ce,mb0R;a3r1w;r,t;ad,e5ild,o4u3;nda12te;ist,o1;a4ek,l3;low;s0ty;a8e7i6o3ucky;f0Jn4o15u3ve0w10y0N;d,sy;e0g;ke0l,mp,tt0Eve0;e1Qwd;me,r3te;ge;e4i3;nd;en;ol0ui19;cy,ll,n3;secu6t3;e3ima4;llege2rmedia3;te;re;aAe7i6o5u3;ge,m3ng1C;bYid;me0t;gh,l0;a3fXsita2;dy,rWv3;en0y;nd13ppy,r3;d3sh;!y;aFenEhCiBlAoofy,r3;a8e6i5o3ue0Z;o3ss;vy;m,s0;at,e3y;dy,n;nd,y;ad,ib,ooD;a2d1;a3o3;st0;tDuiS;u1y;aCeebBi9l8o6r5u3;ll,n3r0N;!ny;aCesh,iend0;a3nd,rmD;my;at,ir7;erce,nan3;ci9;le;r,ul3;ty;a6erie,sse4v3xtre0B;il;nti3;al;r4s3;tern,y;ly,th0;appZe9i5ru4u3;mb;nk;r5vi4z3;zy;ne;e,ty;a3ep,n9;d3f,r;!ly;agey,h8l7o5r4u3;dd0r0te;isp,uel;ar3ld,mmon,st0ward0zy;se;evKou1;e3il0;ap,e3;sy;aHiFlCoAr5u3;ff,r0sy;ly;a6i3oad;g4llia2;nt;ht;sh,ve;ld,un3;cy;a4o3ue;nd,o1;ck,nd;g,tt3;er;d,ld,w1;dy;bsu6ng5we3;so3;me;ry;rd`,Adverb:`true¦a08b05d00eYfSheQinPjustOkinda,likewiZmMnJoEpCquite,r9s5t2u0very,well;ltima01p0; to,wards5;h1iny bit,o0wiO;o,t6;en,us;eldom,o0uch;!me1rt0; of;how,times,w0C;a1e0;alS;ndomRth05;ar excellenEer0oint blank; Lhaps;f3n0utright;ce0ly;! 0;ag05moX; courGten;ewJo0; longWt 0;onHwithstand9;aybe,eanwhiNore0;!ovT;! aboX;deed,steY;lla,n0;ce;or3u0;ck1l9rther0;!moK;ing; 0evK;exampCgood,suH;n mas0vI;se;e0irect2; 2fini0;te0;ly;juAtrop;ackward,y 0;far,no0; means,w; GbroFd nauseam,gEl7ny5part,s4t 2w0;ay,hi0;le;be7l0mo7wor7;arge,ea6; soon,i4;mo0way;re;l 3mo2ongsi1ready,so,togeth0ways;er;de;st;b1t0;hat;ut;ain;ad;lot,posteriori`,Conjunction:`true¦aXbTcReNhowMiEjust00noBo9p8supposing,t5wh0yet;e1il0o3;e,st;n1re0thN; if,by,vM;evL;h0il,o;erefOo0;!uU;lus,rovided th9;r0therwiM;! not; mattEr,w0;! 0;since,th4w7;f4n0; 0asmuch;as mIcaForder t0;h0o;at;! 0;only,t0w0;hen;!ev3;ith2ven0;! 0;if,tB;er;o0uz;s,z;e0ut,y the time;cau1f0;ore;se;lt3nd,s 0;far1if,m0soon1t2;uch0; as;hou0;gh`,Currency:`true¦$,aud,bQcOdJeurIfHgbp,hkd,iGjpy,kElDp8r7s3usd,x2y1z0¢,£,¥,ден,лв,руб,฿,₡,₨,€,₭,﷼;lotyQł;en,uanP;af,of;h0t5;e0il5;k0q0;elK;oubleJp,upeeJ;e2ound st0;er0;lingG;n0soF;ceEnies;empi7i7;n,r0wanzaCyatC;!onaBw;ls,nr;ori7ranc9;!os;en3i2kk,o0;b0ll2;ra5;me4n0rham4;ar3;e0ny;nt1;aht,itcoin0;!s`,Determiner:`true¦aBboth,d9e6few,le5mu8neiDplenty,s4th2various,wh0;at0ich0;evC;a0e4is,ose;!t;everal,ome;!ast,s;a1l0very;!se;ch;e0u;!s;!n0;!o0y;th0;er`,"Adj|Present":`true¦a07b04cVdQeNfJhollIidRlEmCnarrIoBp9qua8r7s3t2uttFw0;aKet,ro0;ng,u08;endChin;e2hort,l1mooth,our,pa9tray,u0;re,speU;i2ow;cu6da02leSpaN;eplica01i02;ck;aHerfePr0;eseUime,omV;bscu1pen,wn;atu0e3odeH;re;a2e1ive,ow0;er;an;st,y;ow;a2i1oul,r0;ee,inge;rm;iIke,ncy,st;l1mpty,x0;emHpress;abo4ic7;amp,e2i1oub0ry,ull;le;ffu9re6;fu8libe0;raE;alm,l5o0;mpleCn3ol,rr1unterfe0;it;e0u7;ct;juga8sum7;ea1o0;se;n,r;ankru1lu0;nt;pt;li2pproxi0rticula1;ma0;te;ght`,"Person|Adj":`true¦b3du2earnest,frank,mi2r0san1woo1;an0ich,u1;dy;sty;ella,rown`,Modal:`true¦c5lets,m4ought3sh1w0;ill,o5;a0o4;ll,nt;! to,a;ight,ust;an,o0;uld`,Verb:`true¦born,cannot,gonna,has,keep tabs,msg`,"Person|Verb":`true¦b8ch7dr6foster,gra5ja9lan4ma2ni9ollie,p1rob,s0wade;kip,pike,t5ue;at,eg,ier2;ck,r0;k,shal;ce;ce,nt;ew;ase,u1;iff,l1ob,u0;ck;aze,ossom`,"Person|Date":`true¦a2j0sep;an0une;!uary;p0ugust,v0;ril`},ws=36,Ts=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ`,Es=Ts.split(``).reduce(function(e,t,n){return e[t]=n,e},{}),Ds={toAlphaCode:function(e){if(Ts[e]!==void 0)return Ts[e];let t=1,n=ws,r=``;for(;e>=n;e-=n,t++,n*=ws);for(;t--;){let t=e%ws;r=String.fromCharCode((t<10?48:55)+t)+r,e=(e-t)/ws}return r},fromAlphaCode:function(e){if(Es[e]!==void 0)return Es[e];let t=0,n=1,r=ws,i=1;for(;n<e.length;t+=r,n++,r*=ws);for(let n=e.length-1;n>=0;n--,i*=ws){let r=e.charCodeAt(n)-48;r>10&&(r-=7),t+=r*i}return t}},Os=function(e){let t=RegExp(`([0-9A-Z]+):([0-9A-Z]+)`);for(let n=0;n<e.nodes.length;n++){let r=t.exec(e.nodes[n]);if(!r){e.symCount=n;break}e.syms[Ds.fromAlphaCode(r[1])]=Ds.fromAlphaCode(r[2])}e.nodes=e.nodes.slice(e.symCount,e.nodes.length)},ks=function(e,t,n){let r=Ds.fromAlphaCode(t);return r<e.symCount?e.syms[r]:n+r+1-e.symCount},As=function(e){let t=[],n=(r,i)=>{let a=e.nodes[r];a[0]===`!`&&(t.push(i),a=a.slice(1));let o=a.split(/([A-Z0-9,]+)/g);for(let a=0;a<o.length;a+=2){let s=o[a],c=o[a+1];if(!s)continue;let l=i+s;if(c===`,`||c===void 0){t.push(l);continue}n(ks(e,c,r),l)}};return n(0,``),t},js=function(e){let t={nodes:e.split(`;`),syms:[],symCount:0};return e.match(`:`)&&Os(t),As(t)},Ms=function(e){if(!e)return{};let t=e.split(`|`).reduce((e,t)=>{let n=t.split(`¦`);return e[n[0]]=n[1],e},{}),n={};return Object.keys(t).forEach(function(e){let r=js(t[e]);e===`true`&&(e=!0);for(let t=0;t<r.length;t++){let i=r[t];n.hasOwnProperty(i)===!0?Array.isArray(n[i])===!1?n[i]=[n[i],e]:n[i].push(e):n[i]=e}}),n},Ns=[`Possessive`,`Pronoun`],Ps={"20th century fox":`Organization`,"7 eleven":`Organization`,"motel 6":`Organization`,g8:`Organization`,vh1:`Organization`,"76ers":`SportsTeam`,"49ers":`SportsTeam`,q1:`Date`,q2:`Date`,q3:`Date`,q4:`Date`,km2:`Unit`,m2:`Unit`,dm2:`Unit`,cm2:`Unit`,mm2:`Unit`,mile2:`Unit`,in2:`Unit`,yd2:`Unit`,ft2:`Unit`,m3:`Unit`,dm3:`Unit`,cm3:`Unit`,in3:`Unit`,ft3:`Unit`,yd3:`Unit`,"at&t":`Organization`,"black & decker":`Organization`,"h & m":`Organization`,"johnson & johnson":`Organization`,"procter & gamble":`Organization`,"ben & jerry's":`Organization`,"&":`Conjunction`,i:[`Pronoun`,`Singular`],he:[`Pronoun`,`Singular`],she:[`Pronoun`,`Singular`],it:[`Pronoun`,`Singular`],they:[`Pronoun`,`Plural`],we:[`Pronoun`,`Plural`],was:[`Copula`,`PastTense`],is:[`Copula`,`PresentTense`],are:[`Copula`,`PresentTense`],am:[`Copula`,`PresentTense`],were:[`Copula`,`PastTense`],her:Ns,his:Ns,hers:Ns,their:Ns,theirs:Ns,themselves:Ns,your:Ns,our:Ns,ours:Ns,my:Ns,its:Ns,vs:[`Conjunction`,`Abbreviation`],if:[`Condition`,`Preposition`],closer:`Comparative`,closest:`Superlative`,much:`Adverb`,may:`Modal`,babysat:`PastTense`,blew:`PastTense`,drank:`PastTense`,drove:`PastTense`,forgave:`PastTense`,skiied:`PastTense`,spilt:`PastTense`,stung:`PastTense`,swam:`PastTense`,swung:`PastTense`,guaranteed:`PastTense`,shrunk:`PastTense`,nears:`PresentTense`,nearing:`Gerund`,neared:`PastTense`,no:[`Negative`,`Expression`]},Fs={"20th century fox":`Organization`,"7 eleven":`Organization`,"motel 6":`Organization`,"excuse me":`Expression`,"financial times":`Organization`,"guns n roses":`Organization`,"la z boy":`Organization`,"labour party":`Organization`,"new kids on the block":`Organization`,"new york times":`Organization`,"the guess who":`Organization`,"thin lizzy":`Organization`,"prime minister":`Actor`,"free market":`Singular`,"lay up":`Singular`,"living room":`Singular`,"living rooms":`Plural`,"spin off":`Singular`,"appeal court":`Uncountable`,"cold war":`Uncountable`,"gene pool":`Uncountable`,"machine learning":`Uncountable`,"nail polish":`Uncountable`,"time off":`Uncountable`,"take part":`Infinitive`,"bill gates":`Person`,"doctor who":`Person`,"dr who":`Person`,"he man":`Person`,"iron man":`Person`,"kid cudi":`Person`,"run dmc":`Person`,"rush limbaugh":`Person`,"snow white":`Person`,"tiger woods":`Person`,"brand new":`Adjective`,"en route":`Adjective`,"left wing":`Adjective`,"off guard":`Adjective`,"on board":`Adjective`,"part time":`Adjective`,"right wing":`Adjective`,"so called":`Adjective`,"spot on":`Adjective`,"straight forward":`Adjective`,"super duper":`Adjective`,"tip top":`Adjective`,"top notch":`Adjective`,"up to date":`Adjective`,"win win":`Adjective`,"brooklyn nets":`SportsTeam`,"chicago bears":`SportsTeam`,"houston astros":`SportsTeam`,"houston dynamo":`SportsTeam`,"houston rockets":`SportsTeam`,"houston texans":`SportsTeam`,"minnesota twins":`SportsTeam`,"orlando magic":`SportsTeam`,"san antonio spurs":`SportsTeam`,"san diego chargers":`SportsTeam`,"san diego padres":`SportsTeam`,"iron maiden":`ProperNoun`,"isle of man":`Country`,"united states":`Country`,"united states of america":`Country`,"prince edward island":`Region`,"cedar breaks":`Place`,"cedar falls":`Place`,"point blank":`Adverb`,"tiny bit":`Adverb`,"by the time":`Conjunction`,"no matter":`Conjunction`,"civil wars":`Plural`,"credit cards":`Plural`,"default rates":`Plural`,"free markets":`Plural`,"head starts":`Plural`,"home runs":`Plural`,"lay ups":`Plural`,"phone calls":`Plural`,"press releases":`Plural`,"record labels":`Plural`,"soft serves":`Plural`,"student loans":`Plural`,"tax returns":`Plural`,"tv shows":`Plural`,"video games":`Plural`,"took part":`PastTense`,"takes part":`PresentTense`,"taking part":`Gerund`,"taken part":`Participle`,"light bulb":`Noun`,"rush hour":`Noun`,"fluid ounce":`Unit`,"the rolling stones":`Organization`},Is=`:(.:).:P.:p.:O.;(.;).;P.;p.;O.:3.:|.:/.:\\.:$.:*.:@.:-(.:-).:-P.:-p.:-O.:-3.:-|.:-/.:-\\.:-$.:-*.:-@.:^(.:^).:^P.:^p.:^O.:^3.:^|.:^/.:^\\.:^$.:^*.:^@.):.(:.$:.*:.)-:.(-:.$-:.*-:.)^:.(^:.$^:.*^:.<3.</3.<\\3.=(`.split(`.`),Ls={a:[[/(antenn|formul|nebul|vertebr|vit)a$/i,`$1ae`],[/ia$/i,`ia`]],e:[[/(kn|l|w)ife$/i,`$1ives`],[/(hive)$/i,`$1s`],[/([m|l])ouse$/i,`$1ice`],[/([m|l])ice$/i,`$1ice`]],f:[[/^(dwar|handkerchie|hoo|scar|whar)f$/i,`$1ves`],[/^((?:ca|e|ha|(?:our|them|your)?se|she|wo)l|lea|loa|shea|thie)f$/i,`$1ves`]],i:[[/(octop|vir)i$/i,`$1i`]],m:[[/([ti])um$/i,`$1a`]],n:[[/^(oxen)$/i,`$1`]],o:[[/(al|ad|at|er|et|ed)o$/i,`$1oes`]],s:[[/(ax|test)is$/i,`$1es`],[/(alias|status)$/i,`$1es`],[/sis$/i,`ses`],[/(bu)s$/i,`$1ses`],[/(sis)$/i,`ses`],[/^(?!talis|.*hu)(.*)man$/i,`$1men`],[/(octop|vir|radi|nucle|fung|cact|stimul)us$/i,`$1i`]],x:[[/(matr|vert|ind|cort)(ix|ex)$/i,`$1ices`],[/^(ox)$/i,`$1en`]],y:[[/([^aeiouy]|qu)y$/i,`$1ies`]],z:[[/(quiz)$/i,`$1zes`]]},Rs=/([xsz]|ch|sh)$/,zs=function(e){let t=e[e.length-1];if(Ls.hasOwnProperty(t)===!0)for(let n=0;n<Ls[t].length;n+=1){let r=Ls[t][n][0];if(r.test(e)===!0)return e.replace(r,Ls[t][n][1])}return null},Bs=function(e=``,t){let{irregularPlurals:n,uncountable:r}=t.two;if(r.hasOwnProperty(e))return e;if(n.hasOwnProperty(e))return n[e];let i=zs(e);return i===null?Rs.test(e)?e+`es`:e+`s`:i},Vs=/\|/,Hs=Ps,Us={},Ws={two:{irregularPlurals:Ss,uncountable:{}}};Object.keys(Cs).forEach(e=>{let t=Ms(Cs[e]);if(!Vs.test(e)){Object.keys(t).forEach(t=>{Hs[t]=e});return}Object.keys(t).forEach(t=>{if(Us[t]=e,e===`Noun|Verb`){let e=Bs(t,Ws);Us[e]=`Plural|Verb`}})}),Is.forEach(e=>Hs[e]=`Emoticon`),delete Hs[``],delete Hs[null],delete Hs[` `];var z=`Singular`,Gs={beforeTags:{Determiner:z,Possessive:z,Acronym:z,Noun:z,Adjective:z,PresentTense:z,Gerund:z,PastTense:z,Infinitive:z,Date:z,Ordinal:z,Demonym:z},afterTags:{Value:z,Modal:z,Copula:z,PresentTense:z,PastTense:z,Demonym:z,Actor:z},beforeWords:{the:z,with:z,without:z,of:z,for:z,any:z,all:z,on:z,cut:z,cuts:z,increase:z,decrease:z,raise:z,drop:z,save:z,saved:z,saves:z,make:z,makes:z,made:z,minus:z,plus:z,than:z,another:z,versus:z,neither:z,about:z,favorite:z,best:z,daily:z,weekly:z,linear:z,binary:z,mobile:z,lexical:z,technical:z,computer:z,scientific:z,security:z,government:z,popular:z,formal:z,no:z,more:z,one:z,let:z,her:z,his:z,their:z,our:z,us:z,sheer:z,monthly:z,yearly:z,current:z,previous:z,upcoming:z,last:z,next:z,main:z,initial:z,final:z,beginning:z,end:z,top:z,bottom:z,future:z,past:z,major:z,minor:z,side:z,central:z,peripheral:z,public:z,private:z},afterWords:{of:z,system:z,aid:z,method:z,utility:z,tool:z,reform:z,therapy:z,philosophy:z,room:z,authority:z,says:z,said:z,wants:z,wanted:z,is:z,did:z,do:z,can:z,wise:z}},B=`Infinitive`,Ks={beforeTags:{Modal:B,Adverb:B,Negative:B,Plural:B},afterTags:{Determiner:B,Adverb:B,Possessive:B,Reflexive:B,Preposition:B,Cardinal:B,Comparative:B,Superlative:B},beforeWords:{i:B,we:B,you:B,they:B,to:B,please:B,will:B,have:B,had:B,would:B,could:B,should:B,do:B,did:B,does:B,can:B,must:B,us:B,me:B,let:B,even:B,when:B,help:B,he:B,she:B,it:B,being:B,bi:B,co:B,contra:B,de:B,inter:B,intra:B,mis:B,pre:B,out:B,counter:B,nobody:B,somebody:B,anybody:B,everybody:B},afterWords:{the:B,me:B,you:B,him:B,us:B,her:B,his:B,them:B,they:B,it:B,himself:B,herself:B,itself:B,myself:B,ourselves:B,themselves:B,something:B,anything:B,a:B,an:B,up:B,down:B,by:B,out:B,off:B,under:B,what:B,all:B,to:B,because:B,although:B,how:B,otherwise:B,together:B,though:B,into:B,yet:B,more:B,here:B,there:B,away:B}},qs={beforeTags:Object.assign({},Ks.beforeTags,Gs.beforeTags,{}),afterTags:Object.assign({},Ks.afterTags,Gs.afterTags,{}),beforeWords:Object.assign({},Ks.beforeWords,Gs.beforeWords,{}),afterWords:Object.assign({},Ks.afterWords,Gs.afterWords,{})},V=`Adjective`,Js={beforeTags:{Determiner:V,Possessive:V,Hyphenated:V},afterTags:{Adjective:V},beforeWords:{seem:V,seemed:V,seems:V,feel:V,feels:V,felt:V,stay:V,appear:V,appears:V,appeared:V,also:V,over:V,under:V,too:V,it:V,but:V,still:V,really:V,quite:V,well:V,very:V,truly:V,how:V,deeply:V,hella:V,profoundly:V,extremely:V,so:V,badly:V,mostly:V,totally:V,awfully:V,rather:V,nothing:V,something:V,anything:V,not:V,me:V,is:V,face:V,faces:V,faced:V,look:V,looks:V,looked:V,reveal:V,reveals:V,revealed:V,sound:V,sounded:V,sounds:V,remains:V,remained:V,prove:V,proves:V,proved:V,becomes:V,stays:V,tastes:V,taste:V,smells:V,smell:V,gets:V,grows:V,as:V,rings:V,radiates:V,conveys:V,convey:V,conveyed:V,of:V},afterWords:{too:V,also:V,or:V,enough:V,as:V}},Ys=`Gerund`,Xs={beforeTags:{Adverb:Ys,Preposition:Ys,Conjunction:Ys},afterTags:{Adverb:Ys,Possessive:Ys,Person:Ys,Pronoun:Ys,Determiner:Ys,Copula:Ys,Preposition:Ys,Conjunction:Ys,Comparative:Ys},beforeWords:{been:Ys,keep:Ys,continue:Ys,stop:Ys,am:Ys,be:Ys,me:Ys,began:Ys,start:Ys,starts:Ys,started:Ys,stops:Ys,stopped:Ys,help:Ys,helps:Ys,avoid:Ys,avoids:Ys,love:Ys,loves:Ys,loved:Ys,hate:Ys,hates:Ys,hated:Ys},afterWords:{you:Ys,me:Ys,her:Ys,him:Ys,his:Ys,them:Ys,their:Ys,it:Ys,this:Ys,there:Ys,on:Ys,about:Ys,for:Ys,up:Ys,down:Ys}},Zs=`Gerund`,Qs=`Adjective`,$s={beforeTags:Object.assign({},Js.beforeTags,Xs.beforeTags,{Imperative:Zs,Infinitive:Qs,Plural:Zs}),afterTags:Object.assign({},Js.afterTags,Xs.afterTags,{Noun:Qs}),beforeWords:Object.assign({},Js.beforeWords,Xs.beforeWords,{is:Qs,are:Zs,was:Qs,of:Qs,suggest:Zs,suggests:Zs,suggested:Zs,recommend:Zs,recommends:Zs,recommended:Zs,imagine:Zs,imagines:Zs,imagined:Zs,consider:Zs,considered:Zs,considering:Zs,resist:Zs,resists:Zs,resisted:Zs,avoid:Zs,avoided:Zs,avoiding:Zs,except:Qs,accept:Qs,assess:Zs,explore:Zs,fear:Zs,fears:Zs,appreciate:Zs,question:Zs,help:Zs,embrace:Zs,with:Qs}),afterWords:Object.assign({},Js.afterWords,Xs.afterWords,{to:Zs,not:Zs,the:Zs})},ec={beforeTags:{Determiner:void 0,Cardinal:`Noun`,PhrasalVerb:`Adjective`},afterTags:{}},tc={beforeTags:Object.assign({},Js.beforeTags,Gs.beforeTags,ec.beforeTags),afterTags:Object.assign({},Js.afterTags,Gs.afterTags,ec.afterTags),beforeWords:Object.assign({},Js.beforeWords,Gs.beforeWords,{are:`Adjective`,is:`Adjective`,was:`Adjective`,be:`Adjective`,off:`Adjective`,out:`Adjective`}),afterWords:Object.assign({},Js.afterWords,Gs.afterWords)},nc=`PastTense`,rc=`Adjective`,ic={beforeTags:{Adverb:nc,Pronoun:nc,ProperNoun:nc,Auxiliary:nc,Noun:nc},afterTags:{Possessive:nc,Pronoun:nc,Determiner:nc,Adverb:nc,Comparative:nc,Date:nc,Gerund:nc},beforeWords:{be:nc,who:nc,get:rc,had:nc,has:nc,have:nc,been:nc,it:nc,as:nc,for:rc,more:rc,always:rc},afterWords:{by:nc,back:nc,out:nc,in:nc,up:nc,down:nc,before:nc,after:nc,for:nc,the:nc,with:nc,as:nc,on:nc,at:nc,between:nc,to:nc,into:nc,us:nc,them:nc,his:nc,her:nc,their:nc,our:nc,me:nc,about:rc}},ac={beforeTags:Object.assign({},Js.beforeTags,ic.beforeTags),afterTags:Object.assign({},Js.afterTags,ic.afterTags),beforeWords:Object.assign({},Js.beforeWords,ic.beforeWords),afterWords:Object.assign({},Js.afterWords,ic.afterWords)},oc={beforeTags:Object.assign({},Js.beforeTags,Ks.beforeTags,{Adverb:void 0,Negative:void 0}),afterTags:Object.assign({},Js.afterTags,Ks.afterTags,{afterTags:{Noun:`Adjective`,Conjunction:void 0}}.afterTags),beforeWords:Object.assign({},Js.beforeWords,Ks.beforeWords,{have:void 0,had:void 0,not:void 0,went:`Adjective`,goes:`Adjective`,got:`Adjective`,be:`Adjective`}),afterWords:Object.assign({},Js.afterWords,Ks.afterWords,{to:void 0,as:`Adjective`})},sc={beforeTags:{Copula:`Gerund`,PastTense:`Gerund`,PresentTense:`Gerund`,Infinitive:`Gerund`},afterTags:{Value:`Gerund`},beforeWords:{are:`Gerund`,were:`Gerund`,be:`Gerund`,no:`Gerund`,without:`Gerund`,you:`Gerund`,we:`Gerund`,they:`Gerund`,he:`Gerund`,she:`Gerund`,us:`Gerund`,them:`Gerund`},afterWords:{the:`Gerund`,this:`Gerund`,that:`Gerund`,me:`Gerund`,us:`Gerund`,them:`Gerund`}},cc={beforeTags:Object.assign({},Xs.beforeTags,Gs.beforeTags,sc.beforeTags),afterTags:Object.assign({},Xs.afterTags,Gs.afterTags,sc.afterTags),beforeWords:Object.assign({},Xs.beforeWords,Gs.beforeWords,sc.beforeWords),afterWords:Object.assign({},Xs.afterWords,Gs.afterWords,sc.afterWords)},lc=`Singular`,uc=`Infinitive`,dc={beforeTags:Object.assign({},Ks.beforeTags,Gs.beforeTags,{Adjective:lc,Particle:lc}),afterTags:Object.assign({},Ks.afterTags,Gs.afterTags,{ProperNoun:uc,Gerund:uc,Adjective:uc,Copula:lc}),beforeWords:Object.assign({},Ks.beforeWords,Gs.beforeWords,{is:lc,was:lc,of:lc,have:null}),afterWords:Object.assign({},Ks.afterWords,Gs.afterWords,{instead:uc,about:uc,his:uc,her:uc,to:null,by:null,in:null})},fc=`Person`,pc={beforeTags:{Honorific:fc,Person:fc},afterTags:{Person:fc,ProperNoun:fc,Verb:fc},ownTags:{ProperNoun:fc},beforeWords:{hi:fc,hey:fc,yo:fc,dear:fc,hello:fc},afterWords:{said:fc,says:fc,told:fc,tells:fc,feels:fc,felt:fc,seems:fc,thinks:fc,thought:fc,spends:fc,spendt:fc,plays:fc,played:fc,sing:fc,sang:fc,learn:fc,learned:fc,wants:fc,wanted:fc}},mc=`Month`,hc={beforeTags:{Date:mc,Value:mc},afterTags:{Date:mc,Value:mc},beforeWords:{by:mc,in:mc,on:mc,during:mc,after:mc,before:mc,between:mc,until:mc,til:mc,sometime:mc,of:mc,this:mc,next:mc,last:mc,previous:mc,following:mc,with:`Person`},afterWords:{sometime:mc,in:mc,of:mc,until:mc,the:mc}},gc={beforeTags:Object.assign({},pc.beforeTags,hc.beforeTags),afterTags:Object.assign({},pc.afterTags,hc.afterTags),beforeWords:Object.assign({},pc.beforeWords,hc.beforeWords),afterWords:Object.assign({},pc.afterWords,hc.afterWords)},_c={beforeTags:Object.assign({},Gs.beforeTags,pc.beforeTags),afterTags:Object.assign({},Gs.afterTags,pc.afterTags),beforeWords:Object.assign({},Gs.beforeWords,pc.beforeWords,{i:`Infinitive`,we:`Infinitive`}),afterWords:Object.assign({},Gs.afterWords,pc.afterWords)},vc={beforeTags:Object.assign({},Gs.beforeTags,pc.beforeTags,Ks.beforeTags),afterTags:Object.assign({},Gs.afterTags,pc.afterTags,Ks.afterTags),beforeWords:Object.assign({},Gs.beforeWords,pc.beforeWords,Ks.beforeWords),afterWords:Object.assign({},Gs.afterWords,pc.afterWords,Ks.afterWords)},yc=`Place`,bc={beforeTags:{Place:yc},afterTags:{Place:yc,Abbreviation:yc},beforeWords:{in:yc,by:yc,near:yc,from:yc,to:yc},afterWords:{in:yc,by:yc,near:yc,from:yc,to:yc,government:yc,council:yc,region:yc,city:yc}},xc={beforeTags:Object.assign({},bc.beforeTags,pc.beforeTags),afterTags:Object.assign({},bc.afterTags,pc.afterTags),beforeWords:Object.assign({},bc.beforeWords,pc.beforeWords),afterWords:Object.assign({},bc.afterWords,pc.afterWords)},Sc={beforeTags:Object.assign({},pc.beforeTags,Js.beforeTags),afterTags:Object.assign({},pc.afterTags,Js.afterTags),beforeWords:Object.assign({},pc.beforeWords,Js.beforeWords),afterWords:Object.assign({},pc.afterWords,Js.afterWords)},Cc=`Unit`,wc={beforeTags:{Value:Cc},afterTags:{},beforeWords:{per:Cc,every:Cc,each:Cc,square:Cc,cubic:Cc,sq:Cc,metric:Cc},afterWords:{per:Cc,squared:Cc,cubed:Cc,long:Cc}},Tc={"Actor|Verb":qs,"Adj|Gerund":$s,"Adj|Noun":tc,"Adj|Past":ac,"Adj|Present":oc,"Noun|Verb":dc,"Noun|Gerund":cc,"Person|Noun":_c,"Person|Date":gc,"Person|Verb":vc,"Person|Place":xc,"Person|Adj":Sc,"Unit|Noun":wc},Ec=(e,t)=>{let n=Object.keys(e).reduce((t,n)=>(t[n]=e[n]===`Infinitive`?`PresentTense`:`Plural`,t),{});return Object.assign(n,t)};Tc[`Plural|Verb`]={beforeWords:Ec(Tc[`Noun|Verb`].beforeWords,{had:`Plural`,have:`Plural`}),afterWords:Ec(Tc[`Noun|Verb`].afterWords,{his:`PresentTense`,her:`PresentTense`,its:`PresentTense`,in:null,to:null,is:`PresentTense`,by:`PresentTense`}),beforeTags:Ec(Tc[`Noun|Verb`].beforeTags,{Conjunction:`PresentTense`,Noun:void 0,ProperNoun:`PresentTense`}),afterTags:Ec(Tc[`Noun|Verb`].afterTags,{Gerund:`Plural`,Noun:`PresentTense`,Value:`PresentTense`})};var Dc=`Adjective`,Oc=`Infinitive`,kc=`PresentTense`,Ac=`Singular`,jc=`PastTense`,Mc=`Adverb`,Nc=`Plural`,Pc=`Actor`,Fc=`Verb`,Ic=`Noun`,Lc=`ProperNoun`,Rc=`LastName`,zc=`Modal`,Bc=`Place`,Vc=`Participle`,Hc=[null,null,{ea:Ac,ia:Ic,ic:Dc,ly:Mc,"'n":Fc,"'t":Fc},{oed:jc,ued:jc,xed:jc," so":Mc,"'ll":zc,"'re":`Copula`,azy:Dc,eer:Ic,end:Fc,ped:jc,ffy:Dc,ify:Oc,ing:`Gerund`,ize:Oc,ibe:Oc,lar:Dc,mum:Dc,nes:kc,nny:Dc,ous:Dc,que:Dc,ger:Ic,ber:Ic,rol:Ac,sis:Ac,ogy:Ac,oid:Ac,ian:Ac,zes:kc,eld:jc,ken:Vc,ven:Vc,ten:Vc,ect:Oc,ict:Oc,ign:Oc,oze:Oc,ful:Dc,bal:Dc,ton:Ic,pur:Bc},{amed:jc,aped:jc,ched:jc,lked:jc,rked:jc,reed:jc,nded:jc,mned:Dc,cted:jc,dged:jc,ield:Ac,akis:Rc,cede:Oc,chuk:Rc,czyk:Rc,ects:kc,iend:Ac,ends:Fc,enko:Rc,ette:Ac,iary:Ac,wner:Ac,fies:kc,fore:Mc,gate:Oc,gone:Dc,ices:Nc,ints:Nc,ruct:Oc,ines:Nc,ions:Nc,ners:Nc,pers:Nc,lers:Nc,less:Dc,llen:Dc,made:Dc,nsen:Rc,oses:kc,ould:zc,some:Dc,sson:Rc,ians:Nc,tion:Ac,tage:Ic,ique:Ac,tive:Dc,tors:Ic,vice:Ac,lier:Ac,fier:Ac,wned:jc,gent:Ac,tist:Pc,pist:Pc,rist:Pc,mist:Pc,yist:Pc,vist:Pc,ists:Pc,lite:Ac,site:Ac,rite:Ac,mite:Ac,bite:Ac,mate:Ac,date:Ac,ndal:Ac,vent:Ac,uist:Pc,gist:Pc,note:Ac,cide:Ac,ence:Ac,wide:Dc,vide:Oc,ract:Oc,duce:Oc,pose:Oc,eive:Oc,lyze:Oc,lyse:Oc,iant:Dc,nary:Dc,ghty:Dc,uent:Dc,erer:Pc,bury:Bc,dorf:Ic,esty:Ic,wych:Bc,dale:Bc,folk:Bc,vale:Bc,abad:Bc,sham:Bc,wick:Bc,view:Bc},{elist:Pc,holic:Ac,phite:Ac,tized:jc,urned:jc,eased:jc,ances:Nc,bound:Dc,ettes:Nc,fully:Mc,ishes:kc,ities:Nc,marek:Rc,nssen:Rc,ology:Ic,osome:Ac,tment:Ac,ports:Nc,rough:Dc,tches:kc,tieth:`Ordinal`,tures:Nc,wards:Mc,where:Mc,archy:Ic,pathy:Ic,opoly:Ic,embly:Ic,phate:Ic,ndent:Ac,scent:Ac,onist:Pc,anist:Pc,alist:Pc,olist:Pc,icist:Pc,ounce:Oc,iable:Dc,borne:Dc,gnant:Dc,inant:Dc,igent:Dc,atory:Dc,rient:Ac,dient:Ac,maker:Pc,burgh:Bc,mouth:Bc,ceter:Bc,ville:Bc,hurst:Bc,stead:Bc,endon:Bc,brook:Bc,shire:Bc,worth:Ic,field:Lc,ridge:Bc},{auskas:Rc,parent:Ac,cedent:Ac,ionary:Ac,cklist:Ac,brooke:Bc,keeper:Pc,logist:Pc,teenth:`Value`,worker:Pc,master:Pc,writer:Pc,brough:Bc,cester:Bc,ington:Bc,cliffe:Bc,ingham:Bc},{chester:Bc,logists:Pc,opoulos:Rc,borough:Bc,sdottir:Rc}],Uc=`Adjective`,Wc=`Noun`,Gc=`Verb`,Kc=[null,null,{},{neo:Wc,bio:Wc,"de-":Gc,"re-":Gc,"un-":Gc,"ex-":Wc},{anti:Wc,auto:Wc,faux:Uc,hexa:Wc,kilo:Wc,mono:Wc,nano:Wc,octa:Wc,poly:Wc,semi:Uc,tele:Wc,"pro-":Uc,"mis-":Gc,"dis-":Gc,"pre-":Uc},{anglo:Wc,centi:Wc,ethno:Wc,ferro:Wc,grand:Wc,hepta:Wc,hydro:Wc,intro:Wc,macro:Wc,micro:Wc,milli:Wc,nitro:Wc,penta:Wc,quasi:Uc,radio:Wc,tetra:Wc,"omni-":Uc,"post-":Uc},{pseudo:Uc,"extra-":Uc,"hyper-":Uc,"inter-":Uc,"intra-":Uc,"deca-":Uc},{electro:Wc}],qc=`Adjective`,Jc=`Infinitive`,Yc=`PresentTense`,Xc=`Singular`,Zc=`PastTense`,Qc=`Adverb`,$c=`Expression`,el=`Actor`,tl=`Verb`,nl=`Noun`,rl=`LastName`,il={a:[[/.[aeiou]na$/,nl,`tuna`],[/.[oau][wvl]ska$/,rl],[/.[^aeiou]ica$/,Xc,`harmonica`],[/^([hyj]a+)+$/,$c,`haha`]],c:[[/.[^aeiou]ic$/,qc]],d:[[/[aeiou](pp|ll|ss|ff|gg|tt|rr|bb|nn|mm)ed$/,Zc,`popped`],[/.[aeo]{2}[bdgmnprvz]ed$/,Zc,`rammed`],[/.[aeiou][sg]hed$/,Zc,`gushed`],[/.[aeiou]red$/,Zc,`hired`],[/.[aeiou]r?ried$/,Zc,`hurried`],[/[^aeiou]ard$/,Xc,`steward`],[/[aeiou][^aeiou]id$/,qc,``],[/.[vrl]id$/,qc,`livid`],[/..led$/,Zc,`hurled`],[/.[iao]sed$/,Zc,``],[/[aeiou]n?[cs]ed$/,Zc,``],[/[aeiou][rl]?[mnf]ed$/,Zc,``],[/[aeiou][ns]?c?ked$/,Zc,`bunked`],[/[aeiou]gned$/,Zc],[/[aeiou][nl]?ged$/,Zc],[/.[tdbwxyz]ed$/,Zc],[/[^aeiou][aeiou][tvx]ed$/,Zc],[/.[cdflmnprstv]ied$/,Zc,`emptied`]],e:[[/.[lnr]ize$/,Jc,`antagonize`],[/.[^aeiou]ise$/,Jc,`antagonise`],[/.[aeiou]te$/,Jc,`bite`],[/.[^aeiou][ai]ble$/,qc,`fixable`],[/.[^aeiou]eable$/,qc,`maleable`],[/.[ts]ive$/,qc,`festive`],[/[a-z]-like$/,qc,`woman-like`]],h:[[/.[^aeiouf]ish$/,qc,`cornish`],[/.v[iy]ch$/,rl,`..ovich`],[/^ug?h+$/,$c,`ughh`],[/^uh[ -]?oh$/,$c,`uhoh`],[/[a-z]-ish$/,qc,`cartoon-ish`]],i:[[/.[oau][wvl]ski$/,rl,`polish-male`]],k:[[/^(k){2}$/,$c,`kkkk`]],l:[[/.[gl]ial$/,qc,`familial`],[/.[^aeiou]ful$/,qc,`fitful`],[/.[nrtumcd]al$/,qc,`natal`],[/.[^aeiou][ei]al$/,qc,`familial`]],m:[[/.[^aeiou]ium$/,Xc,`magnesium`],[/[^aeiou]ism$/,Xc,`schism`],[/^[hu]m+$/,$c,`hmm`],[/^\d+ ?[ap]m$/,`Date`,`3am`]],n:[[/.[lsrnpb]ian$/,qc,`republican`],[/[^aeiou]ician$/,el,`musician`],[/[aeiou][ktrp]in'$/,`Gerund`,`cookin'`]],o:[[/^no+$/,$c,`noooo`],[/^(yo)+$/,$c,`yoo`],[/^wo{2,}[pt]?$/,$c,`woop`]],r:[[/.[bdfklmst]ler$/,`Noun`],[/[aeiou][pns]er$/,Xc],[/[^i]fer$/,Jc],[/.[^aeiou][ao]pher$/,el],[/.[lk]er$/,`Noun`],[/.ier$/,`Comparative`]],t:[[/.[di]est$/,`Superlative`],[/.[icldtgrv]ent$/,qc],[/[aeiou].*ist$/,qc],[/^[a-z]et$/,tl]],s:[[/.[^aeiou]ises$/,Yc],[/.[rln]ates$/,Yc],[/.[^z]ens$/,tl],[/.[lstrn]us$/,Xc],[/.[aeiou]sks$/,Yc],[/.[aeiou]kes$/,Yc],[/[aeiou][^aeiou]is$/,Xc],[/[a-z]'s$/,nl],[/^yes+$/,$c]],v:[[/.[^aeiou][ai][kln]ov$/,rl]],y:[[/.[cts]hy$/,qc],[/.[st]ty$/,qc],[/.[tnl]ary$/,qc],[/.[oe]ry$/,Xc],[/[rdntkbhs]ly$/,Qc],[/.(gg|bb|zz)ly$/,qc],[/...lly$/,Qc],[/.[gk]y$/,qc],[/[bszmp]{2}y$/,qc],[/.[ai]my$/,qc],[/[ea]{2}zy$/,qc],[/.[^aeiou]ity$/,Xc]]},al=`Verb`,ol=`Noun`,sl={leftTags:[[`Adjective`,ol],[`Possessive`,ol],[`Determiner`,ol],[`Adverb`,al],[`Pronoun`,al],[`Value`,ol],[`Ordinal`,ol],[`Modal`,al],[`Superlative`,ol],[`Demonym`,ol],[`Honorific`,`Person`]],leftWords:[[`i`,al],[`first`,ol],[`it`,al],[`there`,al],[`not`,al],[`because`,ol],[`if`,ol],[`but`,ol],[`who`,al],[`this`,ol],[`his`,ol],[`when`,ol],[`you`,al],[`very`,`Adjective`],[`old`,ol],[`never`,al],[`before`,ol],[`a`,ol],[`the`,ol],[`been`,al]],rightTags:[[`Copula`,ol],[`PastTense`,ol],[`Conjunction`,ol],[`Modal`,ol]],rightWords:[[`there`,al],[`me`,al],[`man`,`Adjective`],[`him`,al],[`it`,al],[`were`,ol],[`took`,ol],[`himself`,al],[`went`,ol],[`who`,ol],[`jr`,`Person`]]},cl={Comparative:{fwd:`3:ser,ier¦1er:h,t,f,l,n¦1r:e¦2er:ss,or,om`,both:`3er:ver,ear,alm¦3ner:hin¦3ter:lat¦2mer:im¦2er:ng,rm,mb¦2ber:ib¦2ger:ig¦1er:w,p,k,d¦ier:y`,rev:`1:tter,yer¦2:uer,ver,ffer,oner,eler,ller,iler,ster,cer,uler,sher,ener,gher,aner,adder,nter,eter,rter,hter,rner,fter¦3:oser,ooler,eafer,user,airer,bler,maler,tler,eater,uger,rger,ainer,urer,ealer,icher,pler,emner,icter,nser,iser¦4:arser,viner,ucher,rosser,somer,ndomer,moter,oother,uarer,hiter¦5:nuiner,esser,emier¦ar:urther`,ex:`worse:bad¦better:good¦4er:fair,gray,poor¦1urther:far¦3ter:fat,hot,wet¦3der:mad,sad¦3er:shy,fun¦4der:glad¦:¦4r:cute,dire,fake,fine,free,lame,late,pale,rare,ripe,rude,safe,sore,tame,wide¦5r:eerie,stale`},Gerund:{fwd:`1:nning,tting,rring,pping,eing,mming,gging,dding,bbing,kking¦2:eking,oling,eling,eming¦3:velling,siting,uiting,fiting,loting,geting,ialing,celling¦4:graming`,both:`1:aing,iing,fing,xing,ying,oing,hing,wing¦2:tzing,rping,izzing,bting,mning,sping,wling,rling,wding,rbing,uping,lming,wning,mping,oning,lting,mbing,lking,fting,hting,sking,gning,pting,cking,ening,nking,iling,eping,ering,rting,rming,cting,lping,ssing,nting,nding,lding,sting,rning,rding,rking¦3:belling,siping,toming,yaking,uaking,oaning,auling,ooping,aiding,naping,euring,tolling,uzzing,ganing,haning,ualing,halling,iasing,auding,ieting,ceting,ouling,voring,ralling,garing,joring,oaming,oaking,roring,nelling,ooring,uelling,eaming,ooding,eaping,eeting,ooting,ooming,xiting,keting,ooking,ulling,airing,oaring,biting,outing,oiting,earing,naling,oading,eeding,ouring,eaking,aiming,illing,oining,eaning,onging,ealing,aining,eading¦4:thoming,melling,aboring,ivoting,weating,dfilling,onoring,eriting,imiting,tialling,rgining,otoring,linging,winging,lleting,louding,spelling,mpelling,heating,feating,opelling,choring,welling,ymaking,ctoring,calling,peating,iloring,laiting,utoring,uditing,mmaking,loating,iciting,waiting,mbating,voiding,otalling,nsoring,nselling,ocusing,itoring,eloping¦5:rselling,umpeting,atrolling,treating,tselling,rpreting,pringing,ummeting,ossoming,elmaking,eselling,rediting,totyping,onmaking,rfeiting,ntrolling¦5e:chmaking,dkeeping,severing,erouting,ecreting,ephoning,uthoring,ravening,reathing,pediting,erfering,eotyping,fringing,entoring,ombining,ompeting¦4e:emaking,eething,twining,rruling,chuting,xciting,rseding,scoping,edoring,pinging,lunging,agining,craping,pleting,eleting,nciting,nfining,ncoding,tponing,ecoding,writing,esaling,nvening,gnoring,evoting,mpeding,rvening,dhering,mpiling,storing,nviting,ploring¦3e:tining,nuring,saking,miring,haling,ceding,xuding,rining,nuting,laring,caring,miling,riding,hoking,piring,lading,curing,uading,noting,taping,futing,paring,hading,loding,siring,guring,vading,voking,during,niting,laning,caping,luting,muting,ruding,ciding,juring,laming,caling,hining,uoting,liding,ciling,duling,tuting,puting,cuting,coring,uiding,tiring,turing,siding,rading,enging,haping,buting,lining,taking,anging,haring,uiring,coming,mining,moting,suring,viding,luding¦2e:tring,zling,uging,oging,gling,iging,vring,fling,lging,obing,psing,pling,ubing,cling,dling,wsing,iking,rsing,dging,kling,ysing,tling,rging,eging,nsing,uning,osing,uming,using,ibing,bling,aging,ising,asing,ating¦2ie:rlying¦1e:zing,uing,cing,ving`,rev:`ying:ie¦1ing:se,ke,te,we,ne,re,de,pe,me,le,c,he¦2ing:ll,ng,dd,ee,ye,oe,rg,us¦2ning:un¦2ging:og,ag,ug,ig,eg¦2ming:um¦2bing:ub,ab,eb,ob¦3ning:lan,can,hin,pin,win¦3ring:cur,lur,tir,tar,pur,car¦3ing:ait,del,eel,fin,eat,oat,eem,lel,ool,ein,uin¦3ping:rop,rap,top,uip,wap,hip,hop,lap,rip,cap¦3ming:tem,wim,rim,kim,lim¦3ting:mat,cut,pot,lit,lot,hat,set,pit,put¦3ding:hed,bed,bid¦3king:rek¦3ling:cil,pel¦3bing:rib¦4ning:egin¦4ing:isit,ruit,ilot,nsit,dget,rkel,ival,rcel¦4ring:efer,nfer¦4ting:rmit,mmit,ysit,dmit,emit,bmit,tfit,gret¦4ling:evel,xcel,ivel¦4ding:hred¦5ing:arget,posit,rofit¦5ring:nsfer¦5ting:nsmit,orget,cquit¦5ling:ancel,istil`,ex:`3:adding,eating,aiming,aiding,airing,outing,gassing,setting,getting,putting,cutting,winning,sitting,betting,mapping,tapping,letting,bidding,hitting,tanning,netting,popping,fitting,capping,lapping,barring,banning,vetting,topping,rotting,tipping,potting,wetting,pitting,dipping,budding,hemming,pinning,jetting,kidding,padding,podding,sipping,wedding,bedding,donning,warring,penning,gutting,cueing,wadding,petting,ripping,napping,matting,tinning,binning,dimming,hopping,mopping,nodding,panning,rapping,ridding,sinning¦4:selling,falling,calling,waiting,editing,telling,rolling,heating,boating,hanging,beating,coating,singing,tolling,felling,polling,discing,seating,voiding,gelling,yelling,baiting,reining,ruining,seeking,spanning,stepping,knitting,emitting,slipping,quitting,dialing,omitting,clipping,shutting,skinning,abutting,flipping,trotting,cramming,fretting,suiting¦5:bringing,treating,spelling,stalling,trolling,expelling,rivaling,wringing,deterring,singeing,befitting,refitting¦6:enrolling,distilling,scrolling,strolling,caucusing,travelling¦7:installing,redefining,stencilling,recharging,overeating,benefiting,unraveling,programing¦9:reprogramming¦is:being¦2e:using,aging,owing¦3e:making,taking,coming,noting,hiring,filing,coding,citing,doping,baking,coping,hoping,lading,caring,naming,voting,riding,mining,curing,lining,ruling,typing,boring,dining,firing,hiding,piling,taping,waning,baling,boning,faring,honing,wiping,luring,timing,wading,piping,fading,biting,zoning,daring,waking,gaming,raking,ceding,tiring,coking,wining,joking,paring,gaping,poking,pining,coring,liming,toting,roping,wiring,aching¦4e:writing,storing,eroding,framing,smoking,tasting,wasting,phoning,shaking,abiding,braking,flaking,pasting,priming,shoring,sloping,withing,hinging¦5e:defining,refining,renaming,swathing,fringing,reciting¦1ie:dying,tying,lying,vying¦7e:sunbathing`},Participle:{fwd:`1:mt¦2:llen¦3:iven,aken¦:ne¦y:in`,both:`1:wn¦2:me,aten¦3:seen,bidden,isen¦4:roven,asten¦3l:pilt¦3d:uilt¦2e:itten¦1im:wum¦1eak:poken¦1ine:hone¦1ose:osen¦1in:gun¦1ake:woken¦ear:orn¦eal:olen¦eeze:ozen¦et:otten¦ink:unk¦ing:ung`,rev:`2:un¦oken:eak¦ought:eek¦oven:eave¦1ne:o¦1own:ly¦1den:de¦1in:ay¦2t:am¦2n:ee¦3en:all¦4n:rive,sake,take¦5n:rgive`,ex:`2:been¦3:seen,run¦4:given,taken¦5:shaken¦2eak:broken¦1ive:dove¦2y:flown¦3e:hidden,ridden¦1eek:sought¦1ake:woken¦1eave:woven`},PastTense:{fwd:`1:tted,wed,gged,nned,een,rred,pped,yed,bbed,oed,dded,rd,wn,mmed¦2:eed,nded,et,hted,st,oled,ut,emed,eled,lded,ken,rt,nked,apt,ant,eped,eked¦3:eared,eat,eaded,nelled,ealt,eeded,ooted,eaked,eaned,eeted,mited,bid,uit,ead,uited,ealed,geted,velled,ialed,belled¦4:ebuted,hined,comed¦y:ied¦ome:ame¦ear:ore¦ind:ound¦ing:ung,ang¦ep:pt¦ink:ank,unk¦ig:ug¦all:ell¦ee:aw¦ive:ave¦eeze:oze¦old:eld¦ave:ft¦ake:ook¦ell:old¦ite:ote¦ide:ode¦ine:one¦in:un,on¦eal:ole¦im:am¦ie:ay¦and:ood¦1ise:rose¦1eak:roke¦1ing:rought¦1ive:rove¦1el:elt¦1id:bade¦1et:got¦1y:aid¦1it:sat¦3e:lid¦3d:pent`,both:`1:aed,fed,xed,hed¦2:sged,xted,wled,rped,lked,kied,lmed,lped,uped,bted,rbed,rked,wned,rled,mped,fted,mned,mbed,zzed,omed,ened,cked,gned,lted,sked,ued,zed,nted,ered,rted,rmed,ced,sted,rned,ssed,rded,pted,ved,cted¦3:cled,eined,siped,ooned,uked,ymed,jored,ouded,ioted,oaned,lged,asped,iged,mured,oided,eiled,yped,taled,moned,yled,lit,kled,oaked,gled,naled,fled,uined,oared,valled,koned,soned,aided,obed,ibed,meted,nicked,rored,micked,keted,vred,ooped,oaded,rited,aired,auled,filled,ouled,ooded,ceted,tolled,oited,bited,aped,tled,vored,dled,eamed,nsed,rsed,sited,owded,pled,sored,rged,osed,pelled,oured,psed,oated,loned,aimed,illed,eured,tred,ioned,celled,bled,wsed,ooked,oiled,itzed,iked,iased,onged,ased,ailed,uned,umed,ained,auded,nulled,ysed,eged,ised,aged,oined,ated,used,dged,doned¦4:ntied,efited,uaked,caded,fired,roped,halled,roked,himed,culed,tared,lared,tuted,uared,routed,pited,naked,miled,houted,helled,hared,cored,caled,tired,peated,futed,ciled,called,tined,moted,filed,sided,poned,iloted,honed,lleted,huted,ruled,cured,named,preted,vaded,sured,talled,haled,peded,gined,nited,uided,ramed,feited,laked,gured,ctored,unged,pired,cuted,voked,eloped,ralled,rined,coded,icited,vided,uaded,voted,mined,sired,noted,lined,nselled,luted,jured,fided,puted,piled,pared,olored,cided,hoked,enged,tured,geoned,cotted,lamed,uiled,waited,udited,anged,luded,mired,uired,raded¦5:modelled,izzled,eleted,umpeted,ailored,rseded,treated,eduled,ecited,rammed,eceded,atrolled,nitored,basted,twined,itialled,ncited,gnored,ploded,xcited,nrolled,namelled,plored,efeated,redited,ntrolled,nfined,pleted,llided,lcined,eathed,ibuted,lloted,dhered,cceded¦3ad:sled¦2aw:drew¦2ot:hot¦2ke:made¦2ow:hrew,grew¦2ose:hose¦2d:ilt¦2in:egan¦1un:ran¦1ink:hought¦1ick:tuck¦1ike:ruck¦1eak:poke,nuck¦1it:pat¦1o:did¦1ow:new¦1ake:woke¦go:went`,rev:`3:rst,hed,hut,cut,set¦4:tbid¦5:dcast,eread,pread,erbid¦ought:uy,eek¦1ied:ny,ly,dy,ry,fy,py,vy,by,ty,cy¦1ung:ling,ting,wing¦1pt:eep¦1ank:rink¦1ore:bear,wear¦1ave:give¦1oze:reeze¦1ound:rind,wind¦1ook:take,hake¦1aw:see¦1old:sell¦1ote:rite¦1ole:teal¦1unk:tink¦1am:wim¦1ay:lie¦1ood:tand¦1eld:hold¦2d:he,ge,re,le,leed,ne,reed,be,ye,lee,pe,we¦2ed:dd,oy,or,ey,gg,rr,us,ew,to¦2ame:ecome,rcome¦2ped:ap¦2ged:ag,og,ug,eg¦2bed:ub,ab,ib,ob¦2lt:neel¦2id:pay¦2ang:pring¦2ove:trive¦2med:um¦2ode:rride¦2at:ysit¦3ted:mit,hat,mat,lat,pot,rot,bat¦3ed:low,end,tow,und,ond,eem,lay,cho,dow,xit,eld,ald,uld,law,lel,eat,oll,ray,ank,fin,oam,out,how,iek,tay,haw,ait,vet,say,cay,bow¦3d:ste,ede,ode,ete,ree,ude,ame,oke,ote,ime,ute,ade¦3red:lur,cur,pur,car¦3ped:hop,rop,uip,rip,lip,tep,top¦3ded:bed,rod,kid¦3ade:orbid¦3led:uel¦3ned:lan,can,kin,pan,tun¦3med:rim,lim¦4ted:quit,llot¦4ed:pear,rrow,rand,lean,mand,anel,pand,reet,link,abel,evel,imit,ceed,ruit,mind,peal,veal,hool,head,pell,well,mell,uell,band,hear,weak¦4led:nnel,qual,ebel,ivel¦4red:nfer,efer,sfer¦4n:sake,trew¦4d:ntee¦4ded:hred¦4ned:rpin¦5ed:light,nceal,right,ndear,arget,hread,eight,rtial,eboot¦5d:edite,nvite¦5ted:egret¦5led:ravel`,ex:`2:been,upped¦3:added,aged,aided,aimed,aired,bid,died,dyed,egged,erred,eyed,fit,gassed,hit,lied,owed,pent,pied,tied,used,vied,oiled,outed,banned,barred,bet,canned,cut,dipped,donned,ended,feed,inked,jarred,let,manned,mowed,netted,padded,panned,pitted,popped,potted,put,set,sewn,sowed,tanned,tipped,topped,vowed,weed,bowed,jammed,binned,dimmed,hopped,mopped,nodded,pinned,rigged,sinned,towed,vetted¦4:ached,baked,baled,boned,bored,called,caned,cared,ceded,cited,coded,cored,cubed,cured,dared,dined,edited,exited,faked,fared,filed,fined,fired,fuelled,gamed,gelled,hired,hoped,joked,lined,mined,named,noted,piled,poked,polled,pored,pulled,reaped,roamed,rolled,ruled,seated,shed,sided,timed,tolled,toned,voted,waited,walled,waned,winged,wiped,wired,zoned,yelled,tamed,lubed,roped,faded,mired,caked,honed,banged,culled,heated,raked,welled,banded,beat,cast,cooled,cost,dealt,feared,folded,footed,handed,headed,heard,hurt,knitted,landed,leaked,leapt,linked,meant,minded,molded,neared,needed,peaked,plodded,plotted,pooled,quit,read,rooted,sealed,seeded,seeped,shipped,shunned,skimmed,slammed,sparred,stemmed,stirred,suited,thinned,twinned,swayed,winked,dialed,abutted,blotted,fretted,healed,heeded,peeled,reeled¦5:basted,cheated,equalled,eroded,exiled,focused,opined,pleated,primed,quoted,scouted,shored,sloped,smoked,sniped,spelled,spouted,routed,staked,stored,swelled,tasted,treated,wasted,smelled,dwelled,honored,prided,quelled,eloped,scared,coveted,sweated,breaded,cleared,debuted,deterred,freaked,modeled,pleaded,rebutted,speeded¦6:anchored,defined,endured,impaled,invited,refined,revered,strolled,cringed,recast,thrust,unfolded¦7:authored,combined,competed,conceded,convened,excreted,extruded,redefined,restored,secreted,rescinded,welcomed¦8:expedited,infringed¦9:interfered,intervened,persevered¦10:contravened¦eat:ate¦is:was¦go:went¦are:were¦3d:bent,lent,rent,sent¦3e:bit,fled,hid,lost¦3ed:bled,bred¦2ow:blew,grew¦1uy:bought¦2tch:caught¦1o:did¦1ive:dove,gave¦2aw:drew¦2ed:fed¦2y:flew,laid,paid,said¦1ight:fought¦1et:got¦2ve:had¦1ang:hung¦2ad:led¦2ght:lit¦2ke:made¦2et:met¦1un:ran¦1ise:rose¦1it:sat¦1eek:sought¦1each:taught¦1ake:woke,took¦1eave:wove¦2ise:arose¦1ear:bore,tore,wore¦1ind:bound,found,wound¦2eak:broke¦2ing:brought,wrung¦1ome:came¦2ive:drove¦1ig:dug¦1all:fell¦2el:felt¦4et:forgot¦1old:held¦2ave:left¦1ing:rang,sang¦1ide:rode¦1ink:sank¦1ee:saw¦2ine:shone¦4e:slid¦1ell:sold,told¦4d:spent¦2in:spun¦1in:won`},PresentTense:{fwd:`1:oes¦1ve:as`,both:`1:xes¦2:zzes,ches,shes,sses¦3:iases¦2y:llies,plies¦1y:cies,bies,ties,vies,nies,pies,dies,ries,fies¦:s`,rev:`1ies:ly¦2es:us,go,do¦3es:cho,eto`,ex:`2:does,goes¦3:gasses¦5:focuses¦is:are¦3y:relies¦2y:flies¦2ve:has`},Superlative:{fwd:`1st:e¦1est:l,m,f,s¦1iest:cey¦2est:or,ir¦3est:ver`,both:`4:east¦5:hwest¦5lest:erful¦4est:weet,lgar,tter,oung¦4most:uter¦3est:ger,der,rey,iet,ong,ear¦3test:lat¦3most:ner¦2est:pt,ft,nt,ct,rt,ht¦2test:it¦2gest:ig¦1est:b,k,n,p,h,d,w¦iest:y`,rev:`1:ttest,nnest,yest¦2:sest,stest,rmest,cest,vest,lmest,olest,ilest,ulest,ssest,imest,uest¦3:rgest,eatest,oorest,plest,allest,urest,iefest,uelest,blest,ugest,amest,yalest,ealest,illest,tlest,itest¦4:cerest,eriest,somest,rmalest,ndomest,motest,uarest,tiffest¦5:leverest,rangest¦ar:urthest¦3ey:riciest`,ex:`best:good¦worst:bad¦5est:great¦4est:fast,full,fair,dull¦3test:hot,wet,fat¦4nest:thin¦1urthest:far¦3est:gay,shy,ill¦4test:neat¦4st:late,wide,fine,safe,cute,fake,pale,rare,rude,sore,ripe,dire¦6st:severe`},AdjToNoun:{fwd:`1:tistic,eable,lful,sful,ting,tty¦2:onate,rtable,geous,ced,seful,ctful¦3:ortive,ented¦arity:ear¦y:etic¦fulness:begone¦1ity:re¦1y:tiful,gic¦2ity:ile,imous,ilous,ime¦2ion:ated¦2eness:iving¦2y:trious¦2ation:iring¦2tion:vant¦3ion:ect¦3ce:mant,mantic¦3tion:irable¦3y:est,estic¦3m:mistic,listic¦3ess:ning¦4n:utious¦4on:rative,native,vative,ective¦4ce:erant`,both:`1:king,wing¦2:alous,ltuous,oyful,rdous¦3:gorous,ectable,werful,amatic¦4:oised,usical,agical,raceful,ocused,lined,ightful¦5ness:stful,lding,itous,nuous,ulous,otous,nable,gious,ayful,rvous,ntous,lsive,peful,entle,ciful,osive,leful,isive,ncise,reful,mious¦5ty:ivacious¦5ties:ubtle¦5ce:ilient,adiant,atient¦5cy:icient¦5sm:gmatic¦5on:sessive,dictive¦5ity:pular,sonal,eative,entic¦5sity:uminous¦5ism:conic¦5nce:mperate¦5ility:mitable¦5ment:xcited¦5n:bitious¦4cy:brant,etent,curate¦4ility:erable,acable,icable,ptable¦4ty:nacious,aive,oyal,dacious¦4n:icious¦4ce:vient,erent,stent,ndent,dient,quent,ident¦4ness:adic,ound,hing,pant,sant,oing,oist,tute¦4icity:imple¦4ment:fined,mused¦4ism:otic¦4ry:dantic¦4ity:tund,eral¦4edness:hand¦4on:uitive¦4lity:pitable¦4sm:eroic,namic¦4sity:nerous¦3th:arm¦3ility:pable,bable,dable,iable¦3cy:hant,nant,icate¦3ness:red,hin,nse,ict,iet,ite,oud,ind,ied,rce¦3ion:lute¦3ity:ual,gal,volous,ial¦3ce:sent,fensive,lant,gant,gent,lent,dant¦3on:asive¦3m:fist,sistic,iastic¦3y:terious,xurious,ronic,tastic¦3ur:amorous¦3e:tunate¦3ation:mined¦3sy:rteous¦3ty:ain¦3ry:ave¦3ment:azed¦2ness:de,on,ue,rn,ur,ft,rp,pe,om,ge,rd,od,ay,ss,er,ll,oy,ap,ht,ld,ad,rt¦2inousness:umous¦2ity:neous,ene,id,ane¦2cy:bate,late¦2ation:ized¦2ility:oble,ible¦2y:odic¦2e:oving,aring¦2s:ost¦2itude:pt¦2dom:ee¦2ance:uring¦2tion:reet¦2ion:oted¦2sion:ending¦2liness:an¦2or:rdent¦1th:ung¦1e:uable¦1ness:w,h,k,f¦1ility:mble¦1or:vent¦1ement:ging¦1tiquity:ncient¦1ment:hed¦verty:or¦ength:ong¦eat:ot¦pth:ep¦iness:y`,rev:``,ex:`5:forceful,humorous¦8:charismatic¦13:understanding¦5ity:active¦11ness:adventurous,inquisitive,resourceful¦8on:aggressive,automatic,perceptive¦7ness:amorous,fatuous,furtive,ominous,serious¦5ness:ample,sweet¦12ness:apprehensive,cantankerous,contemptuous,ostentatious¦13ness:argumentative,conscientious¦9ness:assertive,facetious,imperious,inventive,oblivious,rapacious,receptive,seditious,whimsical¦10ness:attractive,expressive,impressive,loquacious,salubrious,thoughtful¦3edom:boring¦4ness:calm,fast,keen,tame¦8ness:cheerful,gracious,specious,spurious,timorous,unctuous¦5sity:curious¦9ion:deliberate¦8ion:desperate¦6e:expensive¦7ce:fragrant¦3y:furious¦9ility:ineluctable¦6ism:mystical¦8ity:physical,proactive,sensitive,vertical¦5cy:pliant¦7ity:positive¦9ity:practical¦12ism:professional¦6ce:prudent¦3ness:red¦6cy:vagrant¦3dom:wise`}},ll=function(e,t={}){return t.hasOwnProperty(e)?t[e]:null},ul=function(e,t=[]){for(let n=0;n<t.length;n+=1)if(e.endsWith(t[n]))return e;return null},dl=function(e,t,n={}){t||={};let r=e.length-1;for(let i=r;i>=1;--i){let r=e.length-i,a=e.substring(r,e.length);if(t.hasOwnProperty(a)===!0)return e.slice(0,r)+t[a];if(n.hasOwnProperty(a)===!0)return e.slice(0,r)+n[a]}return t.hasOwnProperty(``)?e+=t[``]:n.hasOwnProperty(``)?e+=n[``]:null},fl=function(e=``,t={}){let n=ll(e,t.ex);return n||=ul(e,t.same),n||=dl(e,t.fwd,t.both),n||=e,n},pl=function(e){return Object.entries(e).reduce((e,t)=>(e[t[1]]=t[0],e),{})},ml=function(e={}){return{reversed:!0,both:pl(e.both),ex:pl(e.ex),fwd:e.rev||{}}},hl=/^([0-9]+)/,gl=function(e){let t={};return e.split(`¦`).forEach(e=>{let[n,r]=e.split(`:`);r=(r||``).split(`,`),r.forEach(e=>{t[e]=n})}),t},_l=function(e=``,t=``){t=String(t);let n=t.match(hl);if(n===null)return t;let r=Number(n[1])||0;return e.substring(0,r)+t.replace(hl,``)},vl=function(e){let t=gl(e);return Object.keys(t).reduce((e,n)=>(e[n]=_l(n,t[n]),e),{})},yl=function(e={}){return typeof e==`string`&&(e=JSON.parse(e)),e.fwd=vl(e.fwd||``),e.both=vl(e.both||``),e.rev=vl(e.rev||``),e.ex=vl(e.ex||``),e},bl=yl(cl.PastTense),xl=yl(cl.PresentTense),Sl=yl(cl.Gerund),Cl=yl(cl.Participle),wl=ml(bl),Tl=ml(xl),El=ml(Sl),Dl=ml(Cl),Ol=yl(cl.Comparative),kl=yl(cl.Superlative),Al={fromPast:bl,fromPresent:xl,fromGerund:Sl,fromParticiple:Cl,toPast:wl,toPresent:Tl,toGerund:El,toParticiple:Dl,toComparative:Ol,toSuperlative:kl,fromComparative:ml(Ol),fromSuperlative:ml(kl),adjToNoun:yl(cl.AdjToNoun)},jl=[[/^[\w.]+@[\w.]+\.[a-z]{2,3}$/,`Email`],[/^(https?:\/\/|www\.)+\w+\.[a-z]{2,3}/,`Url`,`http..`],[/^[a-z0-9./].+\.(com|net|gov|org|ly|edu|info|biz|dev|ru|jp|de|in|uk|br|io|ai)/,`Url`,`.com`],[/^[PMCE]ST$/,`Timezone`,`EST`],[/^ma?c'[a-z]{3}/,`LastName`,`mc'neil`],[/^o'[a-z]{3}/,`LastName`,`o'connor`],[/^ma?cd[aeiou][a-z]{3}/,`LastName`,`mcdonald`],[/^(lol)+[sz]$/,`Expression`,`lol`],[/^wo{2,}a*h?$/,`Expression`,`wooah`],[/^(hee?){2,}h?$/,`Expression`,`hehe`],[/^(un|de|re)\\-[a-z\u00C0-\u00FF]{2}/,`Verb`,`un-vite`],[/^(m|k|cm|km)\/(s|h|hr)$/,`Unit`,`5 k/m`],[/^(ug|ng|mg)\/(l|m3|ft3)$/,`Unit`,`ug/L`],[/[^:/]\/\p{Letter}/u,`SlashedTerm`,`love/hate`]],Ml=[[/^#[\p{Number}_]*\p{Letter}/u,`HashTag`],[/^@\w{2,}$/,`AtMention`],[/^([A-Z]\.){2}[A-Z]?/i,[`Acronym`,`Noun`],`F.B.I`],[/.{3}[lkmnp]in['‘’‛‵′`´]$/,`Gerund`,`chillin'`],[/.{4}s['‘’‛‵′`´]$/,`Possessive`,`flanders'`],[/^[\p{Emoji_Presentation}\p{Extended_Pictographic}]/u,`Emoji`,`emoji-class`]],Nl=[[/^@1?[0-9](am|pm)$/i,`Time`,`3pm`],[/^@1?[0-9]:[0-9]{2}(am|pm)?$/i,`Time`,`3:30pm`],[/^'[0-9]{2}$/,`Year`],[/^[012]?[0-9](:[0-5][0-9])(:[0-5][0-9])$/,`Time`,`3:12:31`],[/^[012]?[0-9](:[0-5][0-9])?(:[0-5][0-9])? ?(am|pm)$/i,`Time`,`1:12pm`],[/^[012]?[0-9](:[0-5][0-9])(:[0-5][0-9])? ?(am|pm)?$/i,`Time`,`1:12:31pm`],[/^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}/i,`Date`,`iso-date`],[/^[0-9]{1,4}-[0-9]{1,2}-[0-9]{1,4}$/,`Date`,`iso-dash`],[/^[0-9]{1,4}\/[0-9]{1,2}\/([0-9]{4}|[0-9]{2})$/,`Date`,`iso-slash`],[/^[0-9]{1,4}\.[0-9]{1,2}\.[0-9]{1,4}$/,`Date`,`iso-dot`],[/^[0-9]{1,4}-[a-z]{2,9}-[0-9]{1,4}$/i,`Date`,`12-dec-2019`],[/^utc ?[+-]?[0-9]+$/,`Timezone`,`utc-9`],[/^(gmt|utc)[+-][0-9]{1,2}$/i,`Timezone`,`gmt-3`],[/^[0-9]{3}-[0-9]{4}$/,`PhoneNumber`,`421-0029`],[/^(\+?[0-9][ -])?[0-9]{3}[ -]?[0-9]{3}-[0-9]{4}$/,`PhoneNumber`,`1-800-`],[/^[-+]?\p{Currency_Symbol}[-+]?[0-9]+(,[0-9]{3})*(\.[0-9]+)?([kmb]|bn)?\+?$/u,[`Money`,`Value`],`$5.30`],[/^[-+]?[0-9]+(,[0-9]{3})*(\.[0-9]+)?\p{Currency_Symbol}\+?$/u,[`Money`,`Value`],`5.30£`],[/^[-+]?[$£]?[0-9]([0-9,.])+(usd|eur|jpy|gbp|cad|aud|chf|cny|hkd|nzd|kr|rub)$/i,[`Money`,`Value`],`$400usd`],[/^[-+]?[0-9]+(,[0-9]{3})*(\.[0-9]+)?\+?$/,[`Cardinal`,`NumericValue`],`5,999`],[/^[-+]?[0-9]+(,[0-9]{3})*(\.[0-9]+)?(st|nd|rd|r?th)$/,[`Ordinal`,`NumericValue`],`53rd`],[/^\.[0-9]+\+?$/,[`Cardinal`,`NumericValue`],`.73th`],[/^[-+]?[0-9]+(,[0-9]{3})*(\.[0-9]+)?%\+?$/,[`Percent`,`Cardinal`,`NumericValue`],`-4%`],[/^\.[0-9]+%$/,[`Percent`,`Cardinal`,`NumericValue`],`.3%`],[/^[0-9]{1,4}\/[0-9]{1,4}(st|nd|rd|th)?s?$/,[`Fraction`,`NumericValue`],`2/3rds`],[/^[0-9.]{1,3}[a-z]{0,2}[-–—][0-9]{1,3}[a-z]{0,2}$/,[`Value`,`NumberRange`],`3-4`],[/^[0-9]{1,2}(:[0-9][0-9])?(am|pm)? ?[-–—] ?[0-9]{1,2}(:[0-9][0-9])?(am|pm)$/,[`Time`,`NumberRange`],`3-4pm`],[/^[0-9.]+([a-z°]{1,4})$/,`NumericValue`,`9km`]],Pl=`academy.administration.agence.agences.agencies.agency.airlines.airways.army.assoc.associates.association.assurance.authority.autorite.aviation.bank.banque.board.boys.brands.brewery.brotherhood.brothers.bureau.cafe.co.caisse.capital.care.cathedral.center.centre.chemicals.choir.chronicle.church.circus.clinic.clinique.club.co.coalition.coffee.collective.college.commission.committee.communications.community.company.comprehensive.computers.confederation.conference.conseil.consulting.containers.corporation.corps.corp.council.crew.data.departement.department.departments.design.development.directorate.division.drilling.education.eglise.electric.electricity.energy.ensemble.enterprise.enterprises.entertainment.estate.etat.faculty.faction.federation.financial.fm.foundation.fund.gas.gazette.girls.government.group.guild.herald.holdings.hospital.hotel.hotels.inc.industries.institut.institute.institutes.insurance.international.interstate.investment.investments.investors.journal.laboratory.labs.llc.ltd.limited.machines.magazine.management.marine.marketing.markets.media.memorial.ministere.ministry.military.mobile.motor.motors.musee.museum.news.observatory.office.oil.optical.orchestra.organization.partners.partnership.petrol.petroleum.pharmacare.pharmaceutical.pharmaceuticals.pizza.plc.police.politburo.polytechnic.post.power.press.productions.quartet.radio.reserve.resources.restaurant.restaurants.savings.school.securities.service.services.societe.subsidiary.society.sons.subcommittee.syndicat.systems.telecommunications.telegraph.television.times.tribunal.tv.union.university.utilities.workers`.split(`.`).reduce((e,t)=>(e[t]=!0,e),{}),Fl=`atoll.basin.bay.beach.bluff.bog.camp.canyon.canyons.cape.cave.caves.cliffs.coast.cove.coves.crater.crossing.creek.desert.dune.dunes.downs.estates.escarpment.estuary.falls.fjord.fjords.forest.forests.glacier.gorge.gorges.grove.gulf.gully.highland.heights.hollow.hill.hills.inlet.island.islands.isthmus.junction.knoll.lagoon.lake.lakeshore.marsh.marshes.mount.mountain.mountains.narrows.peninsula.plains.plateau.pond.rapids.ravine.reef.reefs.ridge.river.rivers.sandhill.shoal.shore.shoreline.shores.strait.straits.springs.stream.swamp.tombolo.trail.trails.trench.valley.vallies.village.volcano.waterfall.watershed.wetland.woods.acres.burough.county.district.municipality.prefecture.province.region.reservation.state.territory.borough.metropolis.downtown.uptown.midtown.city.town.township.hamlet.country.kingdom.enclave.neighbourhood.neighborhood.kingdom.ward.zone.airport.amphitheater.arch.arena.auditorium.bar.barn.basilica.battlefield.bridge.building.castle.centre.coliseum.cineplex.complex.dam.farm.field.fort.garden.gardens.gymnasium.hall.house.levee.library.manor.memorial.monument.museum.gallery.palace.pillar.pits.plantation.playhouse.quarry.sportsfield.sportsplex.stadium.terrace.terraces.theater.tower.park.parks.site.ranch.raceway.sportsplex.ave.st.street.rd.road.lane.landing.crescent.cr.way.tr.terrace.avenue`.split(`.`).reduce((e,t)=>(e[t]=!0,e),{}),Il=[[/([^v])ies$/i,`$1y`],[/(ise)s$/i,`$1`],[/(kn|[^o]l|w)ives$/i,`$1ife`],[/^((?:ca|e|ha|(?:our|them|your)?se|she|wo)l|lea|loa|shea|thie)ves$/i,`$1f`],[/^(dwar|handkerchie|hoo|scar|whar)ves$/i,`$1f`],[/(antenn|formul|nebul|vertebr|vit)ae$/i,`$1a`],[/(octop|vir|radi|nucle|fung|cact|stimul)(i)$/i,`$1us`],[/(buffal|tomat|tornad)(oes)$/i,`$1o`],[/(ause)s$/i,`$1`],[/(ease)s$/i,`$1`],[/(ious)es$/i,`$1`],[/(ouse)s$/i,`$1`],[/(ose)s$/i,`$1`],[/(..ase)s$/i,`$1`],[/(..[aeiu]s)es$/i,`$1`],[/(vert|ind|cort)(ices)$/i,`$1ex`],[/(matr|append)(ices)$/i,`$1ix`],[/([xo]|ch|ss|sh)es$/i,`$1`],[/men$/i,`man`],[/(n)ews$/i,`$1ews`],[/([ti])a$/i,`$1um`],[/([^aeiouy]|qu)ies$/i,`$1y`],[/(s)eries$/i,`$1eries`],[/(m)ovies$/i,`$1ovie`],[/(cris|ax|test)es$/i,`$1is`],[/(alias|status)es$/i,`$1`],[/(ss)$/i,`$1`],[/(ic)s$/i,`$1`],[/s$/i,``]],Ll=function(e){return Object.keys(e).reduce((t,n)=>(t[e[n]]=n,t),{})},Rl=function(e,t){let{irregularPlurals:n}=t.two,r=Ll(n);if(r.hasOwnProperty(e))return r[e];for(let t=0;t<Il.length;t++)if(Il[t][0].test(e)===!0)return e=e.replace(Il[t][0],Il[t][1]),e;return e},zl={toPlural:Bs,toSingular:Rl,all:function(e,t){let n=[e],r=Bs(e,t);r!==e&&n.push(r);let i=Rl(e,t);return i!==e&&n.push(i),n}},Bl={Gerund:[`ing`],Actor:[`erer`],Infinitive:`ate.ize.tion.rify.then.ress.ify.age.nce.ect.ise.ine.ish.ace.ash.ure.tch.end.ack.and.ute.ade.ock.ite.ase.ose.use.ive.int.nge.lay.est.ain.ant.ent.eed.er.le.unk.ung.upt.en`.split(`.`),PastTense:[`ept`,`ed`,`lt`,`nt`,`ew`,`ld`],PresentTense:`rks.cks.nks.ngs.mps.tes.zes.ers.les.acks.ends.ands.ocks.lays.eads.lls.els.ils.ows.nds.ays.ams.ars.ops.ffs.als.urs.lds.ews.ips.es.ts.ns`.split(`.`),Participle:[`ken`,`wn`]};Bl=Object.keys(Bl).reduce((e,t)=>(Bl[t].forEach(n=>e[n]=t),e),{});var Vl=Bl,Hl=function(e){let t=e.substring(e.length-3);if(Vl.hasOwnProperty(t)===!0)return Vl[t];let n=e.substring(e.length-2);return Vl.hasOwnProperty(n)===!0?Vl[n]:e.substring(e.length-1)===`s`?`PresentTense`:null},Ul=function(e,t){let n=``,r={};t.one&&t.one.prefixes&&(r=t.one.prefixes);let[i,a]=e.split(/ /);return a&&r[i]===!0&&(n=i,i=a,a=``),{prefix:n,verb:i,particle:a}},Wl={are:`be`,were:`be`,been:`be`,is:`be`,am:`be`,was:`be`,be:`be`,being:`be`},Gl=function(e,t,n){let{fromPast:r,fromPresent:i,fromGerund:a,fromParticiple:o}=t.two.models,{prefix:s,verb:c,particle:l}=Ul(e,t),u=``;if(n||=Hl(e),Wl.hasOwnProperty(e))u=Wl[e];else if(n===`Participle`)u=fl(c,o);else if(n===`PastTense`)u=fl(c,r);else if(n===`PresentTense`)u=fl(c,i);else if(n===`Gerund`)u=fl(c,a);else return e;return l&&(u+=` `+l),s&&(u=s+` `+u),u},Kl=e=>/ /.test(e)?e.split(/ /):[e,``],ql=function(e,t){let{toPast:n,toPresent:r,toGerund:i,toParticiple:a}=t.two.models;if(e===`be`)return{Infinitive:e,Gerund:`being`,PastTense:`was`,PresentTense:`is`};let[o,s]=Kl(e),c={Infinitive:o,PastTense:fl(o,n),PresentTense:fl(o,r),Gerund:fl(o,i),FutureTense:`will `+o},l=fl(o,a);if(l!==e&&l!==c.PastTense){let n=t.one.lexicon||{};(n[l]===`Participle`||n[l]===`Adjective`)&&(e===`play`&&(l=`played`),c.Participle=l)}return s&&Object.keys(c).forEach(e=>{c[e]+=` `+s}),c},Jl={toInfinitive:Gl,conjugate:ql,all:function(e,t){let n=ql(e,t);return delete n.FutureTense,Object.values(n).filter(e=>e)}},Yl=function(e,t){let n=t.two.models.toSuperlative;return fl(e,n)},Xl=function(e,t){let n=t.two.models.toComparative;return fl(e,n)},Zl=function(e,t){let n=t.two.models.fromComparative;return fl(e,n)},Ql=function(e,t){let n=t.two.models.fromSuperlative;return fl(e,n)},$l=function(e,t){let n=t.two.models.adjToNoun;return fl(e,n)},eu=function(e=``,t=[]){let n=e.length,r=n<=6?n-1:6;for(let i=r;i>=1;--i){let r=e.substring(n-i,e.length);if(t[r.length].hasOwnProperty(r)===!0)return e.slice(0,n-i)+t[r.length][r]}return null},tu=`ically`,nu=new Set([`analyt`+tu,`chem`+tu,`class`+tu,`clin`+tu,`crit`+tu,`ecolog`+tu,`electr`+tu,`empir`+tu,`frant`+tu,`grammat`+tu,`ident`+tu,`ideolog`+tu,`log`+tu,`mag`+tu,`mathemat`+tu,`mechan`+tu,`med`+tu,`method`+tu,`method`+tu,`mus`+tu,`phys`+tu,`phys`+tu,`polit`+tu,`pract`+tu,`rad`+tu,`satir`+tu,`statist`+tu,`techn`+tu,`technolog`+tu,`theoret`+tu,`typ`+tu,`vert`+tu,`whims`+tu]),ru=[null,{},{ly:``},{ily:`y`,bly:`ble`,ply:`ple`},{ally:`al`,rply:`rp`},{ually:`ual`,ially:`ial`,cally:`cal`,eally:`eal`,rally:`ral`,nally:`nal`,mally:`mal`,eeply:`eep`,eaply:`eap`},{ically:`ic`}],iu=new Set([`early`,`only`,`hourly`,`daily`,`weekly`,`monthly`,`yearly`,`mostly`,`duly`,`unduly`,`especially`,`undoubtedly`,`conversely`,`namely`,`exceedingly`,`presumably`,`accordingly`,`overly`,`best`,`latter`,`little`,`long`,`low`]),au={wholly:`whole`,fully:`full`,truly:`true`,gently:`gentle`,singly:`single`,customarily:`customary`,idly:`idle`,publically:`public`,quickly:`quick`,superbly:`superb`,cynically:`cynical`,well:`good`},ou=function(e){return e.endsWith(`ly`)?nu.has(e)?e.replace(/ically/,`ical`):iu.has(e)?null:au.hasOwnProperty(e)?au[e]:eu(e,ru)||e:null},su=[null,{y:`ily`},{ly:`ly`,ic:`ically`},{ial:`ially`,ual:`ually`,tle:`tly`,ble:`bly`,ple:`ply`,ary:`arily`},{},{},{}],cu={cool:`cooly`,whole:`wholly`,full:`fully`,good:`well`,idle:`idly`,public:`publicly`,single:`singly`,special:`especially`},lu=function(e){if(cu.hasOwnProperty(e))return cu[e];let t=eu(e,su);return t||=e+`ly`,t},uu={noun:zl,verb:Jl,adjective:{toSuperlative:Yl,toComparative:Xl,toAdverb:lu,toNoun:$l,fromAdverb:ou,fromSuperlative:Ql,fromComparative:Zl,all:function(e,t){let n=[e];return n.push(Yl(e,t)),n.push(Xl(e,t)),n.push(lu(e)),n=n.filter(e=>e),n=new Set(n),Array.from(n)}}},du={Singular:(e,t,n,r)=>{let i=r.one.lexicon,a=n.two.transform.noun.toPlural(e,r);i[a]||(t[a]=t[a]||`Plural`)},Actor:(e,t,n,r)=>{let i=r.one.lexicon,a=n.two.transform.noun.toPlural(e,r);i[a]||(t[a]=t[a]||[`Plural`,`Actor`])},Comparable:(e,t,n,r)=>{let i=r.one.lexicon,{toSuperlative:a,toComparative:o}=n.two.transform.adjective,s=a(e,r);i[s]||(t[s]=t[s]||`Superlative`);let c=o(e,r);i[c]||(t[c]=t[c]||`Comparative`),t[e]=`Adjective`},Demonym:(e,t,n,r)=>{let i=n.two.transform.noun.toPlural(e,r);t[i]=t[i]||[`Demonym`,`Plural`]},Infinitive:(e,t,n,r)=>{let i=r.one.lexicon,a=n.two.transform.verb.conjugate(e,r);Object.entries(a).forEach(e=>{!i[e[1]]&&!t[e[1]]&&e[0]!==`FutureTense`&&(t[e[1]]=e[0])})},PhrasalVerb:(e,t,n,r)=>{let i=r.one.lexicon;t[e]=[`PhrasalVerb`,`Infinitive`];let a=r.one._multiCache,[o,s]=e.split(` `);i[o]||(t[o]=t[o]||`Infinitive`);let c=n.two.transform.verb.conjugate(o,r);delete c.FutureTense,Object.entries(c).forEach(e=>{if(e[0]===`Actor`||e[1]===``)return;!t[e[1]]&&!i[e[1]]&&(t[e[1]]=e[0]),a[e[1]]=2;let n=e[1]+` `+s;t[n]=t[n]||[e[0],`PhrasalVerb`]})},Multiple:(e,t)=>{t[e]=[`Multiple`,`Cardinal`],t[e+`th`]=[`Multiple`,`Ordinal`],t[e+`ths`]=[`Multiple`,`Fraction`]},Cardinal:(e,t)=>{t[e]=[`TextValue`,`Cardinal`]},Ordinal:(e,t)=>{t[e]=[`TextValue`,`Ordinal`],t[e+`s`]=[`TextValue`,`Fraction`]},Place:(e,t)=>{t[e]=[`Place`,`ProperNoun`]},Region:(e,t)=>{t[e]=[`Region`,`ProperNoun`]}},fu=function(e,t){let{methods:n,model:r}=t,i={},a={};return Object.keys(e).forEach(t=>{let o=e[t];t=t.toLowerCase().trim(),t=t.replace(/'s\b/,``);let s=t.split(/ /);s.length>1&&(a[s[0]]===void 0||s.length>a[s[0]])&&(a[s[0]]=s.length),du.hasOwnProperty(o)===!0&&du[o](t,i,n,r),i[t]=i[t]||o}),delete i[``],delete i[null],delete i[` `],{lex:i,_multi:a}},pu=function(e,t){let n=/^[0-9]+$/,r=e[t];if(!r)return!1;let i=new Set([`may`,`april`,`august`,`jan`]);if(r.normal===`like`||i.has(r.normal)||r.tags.has(`Place`)||r.tags.has(`Date`))return!1;if(e[t-1]){let n=e[t-1];if(n.tags.has(`Date`)||i.has(n.normal)||n.tags.has(`Adjective`)||r.tags.has(`Adjective`))return!1}let a=r.normal;return!((a.length===1||a.length===2||a.length===4)&&n.test(a))},mu=function(e){let t=/[,:;]/,n=[];return e.forEach(e=>{let r=0;e.forEach((i,a)=>{t.test(i.post)&&pu(e,a+1)&&(n.push(e.slice(r,a+1)),r=a+1)}),r<e.length&&n.push(e.slice(r,e.length))}),n},hu={e:[`mice`,`louse`,`antennae`,`formulae`,`nebulae`,`vertebrae`,`vitae`],i:[`tia`,`octopi`,`viri`,`radii`,`nuclei`,`fungi`,`cacti`,`stimuli`],n:[`men`],t:[`feet`]},gu=new Set([`israelis`,`menus`,`logos`]),_u=`bus.mas.was.ias.xas.vas.cis.lis.nis.ois.ris.sis.tis.xis.aus.cus.eus.fus.gus.ius.lus.nus.das.ous.pus.rus.sus.tus.xus.aos.igos.ados.ogos.'s.ss`.split(`.`),vu=function(e){if(!e||e.length<=3)return!1;if(gu.has(e))return!0;let t=e[e.length-1];return hu.hasOwnProperty(t)?hu[t].find(t=>e.endsWith(t)):!(t!==`s`||_u.find(t=>e.endsWith(t)))},yu={two:{quickSplit:mu,expandLexicon:fu,transform:uu,looksPlural:vu}},bu=function(e){let{irregularPlurals:t}=e.two,{lexicon:n}=e.one;return Object.entries(t).forEach(e=>{n[e[0]]=n[e[0]]||`Singular`,n[e[1]]=n[e[1]]||`Plural`}),e},xu={one:{lexicon:{}},two:{models:Al}},Su={"Actor|Verb":`Actor`,"Adj|Gerund":`Adjective`,"Adj|Noun":`Adjective`,"Adj|Past":`Adjective`,"Adj|Present":`Adjective`,"Noun|Verb":`Singular`,"Noun|Gerund":`Gerund`,"Person|Noun":`Noun`,"Person|Date":`Month`,"Person|Verb":`FirstName`,"Person|Place":`Person`,"Person|Adj":`Comparative`,"Plural|Verb":`Plural`,"Unit|Noun":`Noun`},Cu=function(e,t){let n={model:t,methods:yu},{lex:r,_multi:i}=yu.two.expandLexicon(e,n);return Object.assign(t.one.lexicon,r),Object.assign(t.one._multiCache,i),t},wu=function(e,t){return Object.keys(e).forEach(n=>{e[n]===`Uncountable`&&(t.two.uncountable[n]=!0,e[n]=`Uncountable`)}),t},Tu=function(e,t,n){let r=ql(e,xu);t[r.PastTense]=t[r.PastTense]||`PastTense`,t[r.Gerund]=t[r.Gerund]||`Gerund`,n===!0&&(t[r.PresentTense]=t[r.PresentTense]||`PresentTense`)},Eu=function(e,t,n){let r=Yl(e,n);t[r]=t[r]||`Superlative`;let i=Xl(e,n);t[i]=t[i]||`Comparative`},Du=function(e,t,n){let r=Bs(e,n);t[r]=t[r]||`Plural`},Ou=function(e,t){let n={},r=t.one.lexicon;return Object.keys(e).forEach(i=>{let a=e[i];if(n[i]=Su[a],(a===`Noun|Verb`||a===`Person|Verb`||a===`Actor|Verb`)&&Tu(i,r,!1),a===`Adj|Present`&&(Tu(i,r,!0),Eu(i,r,t)),a===`Person|Adj`&&Eu(i,r,t),a===`Adj|Gerund`||a===`Noun|Gerund`){let e=Gl(i,xu,`Gerund`);r[e]||(n[e]=`Infinitive`)}if((a===`Noun|Gerund`||a===`Adj|Noun`||a===`Person|Noun`)&&Du(i,r,t),a===`Adj|Past`){let e=Gl(i,xu,`PastTense`);r[e]||(n[e]=`Infinitive`)}}),t=Cu(n,t),t},ku=function(e){return e=Cu(e.one.lexicon,e),e=wu(e.one.lexicon,e),e=Ou(e.two.switches,e),e=bu(e),e},Au={one:{_multiCache:{},lexicon:Hs,frozenLex:Fs},two:{irregularPlurals:Ss,models:Al,suffixPatterns:Hc,prefixPatterns:Kc,endsWith:il,neighbours:sl,regexNormal:jl,regexText:Ml,regexNumbers:Nl,switches:Us,clues:Tc,uncountable:{},orgWords:Pl,placeWords:Fl}};Au=ku(Au);var ju=Au,Mu=function(e,t,n,r){let i=r.methods.one.setTag;if(t===0&&e.length>=3&&e[0].post.match(/:/)){let t=e[1];if(t.tags.has(`Value`)||t.tags.has(`Email`)||t.tags.has(`PhoneNumber`))return;i([e[0]],`Expression`,r,null,`2-punct-colon''`)}},Nu=function(e,t,n,r){let i=r.methods.one.setTag;e[t].post===`-`&&e[t+1]&&i([e[t],e[t+1]],`Hyphenated`,r,null,`1-punct-hyphen''`)},Pu=/^(under|over|mis|re|un|dis|semi)-?/,Fu=function(e,t,n){let r=n.two.switches,i=e[t];if(r.hasOwnProperty(i.normal)){i.switch=r[i.normal];return}if(Pu.test(i.normal)){let e=i.normal.replace(Pu,``);e.length>3&&r.hasOwnProperty(e)&&(i.switch=r[e])}},Iu=(e,t,n=``)=>{let r=e=>`\x1B[33m\x1B[3m`+e+`\x1B[0m`,i=e=>`\x1B[3m`+e+`\x1B[0m`,a=e.text||`[`+e.implicit+`]`;typeof t!=`string`&&t.length>2&&(t=t.slice(0,2).join(`, #`)+` +`),t=typeof t==`string`?t:t.join(`, #`),console.log(` ${r(a).padEnd(24)} \x1b[32m→\x1b[0m #${t.padEnd(22)} ${i(n)}`)},Lu=function(e,t,n){if(!t||t.length===0||e.frozen===!0)return;let r=typeof process>`u`||!process.env?self.env||{}:process.env;r&&r.DEBUG_TAGS&&Iu(e,t,n),e.tags=e.tags||new Set,typeof t==`string`?e.tags.add(t):t.forEach(t=>e.tags.add(t))},Ru=[`Acronym`,`Abbreviation`,`ProperNoun`,`Uncountable`,`Possessive`,`Pronoun`,`Activity`,`Honorific`,`Month`],zu=function(e){!e.tags.has(`Noun`)||e.tags.has(`Plural`)||e.tags.has(`Singular`)||Ru.find(t=>e.tags.has(t))||(vu(e.normal)?Lu(e,`Plural`,`3-plural-guess`):Lu(e,`Singular`,`3-singular-guess`))},Bu=function(e){let t=e.tags;if(t.has(`Verb`)&&t.size===1){let t=Hl(e.normal);t&&Lu(e,t,`3-verb-tense-guess`)}},Vu=function(e,t,n){let r=e[t],i=Array.from(r.tags);for(let e=0;e<i.length;e+=1)if(n.one.tagSet[i[e]]){let t=n.one.tagSet[i[e]].parents;Lu(r,t,` -inferred by #${i[e]}`)}zu(r),Bu(r,n)},Hu=/^\p{Lu}[\p{Ll}'’]/u,Uu=/[0-9]/,Wu=[`Date`,`Month`,`WeekDay`,`Unit`,`Expression`],Gu=/[IVX]/,Ku=/^[IVXLCDM]{2,}$/,qu=/^M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$/,Ju={li:!0,dc:!0,md:!0,dm:!0,ml:!0},Yu=function(e,t,n){let r=e[t];r.index=r.index||[0,0];let i=r.index[1],a=r.text||``;return i!==0&&Hu.test(a)===!0&&Uu.test(a)===!1?Wu.find(e=>r.tags.has(e))||r.pre.match(/["']$/)||r.normal===`the`?null:(Vu(e,t,n),!r.tags.has(`Noun`)&&!r.frozen&&r.tags.clear(),Lu(r,`ProperNoun`,`2-titlecase`),!0):a.length>=2&&Ku.test(a)&&Gu.test(a)&&qu.test(a)&&!Ju[r.normal]?(Lu(r,`RomanNumeral`,`2-xvii`),!0):null},Xu=function(e=``,t=[]){let n=e.length,r=7;n<=r&&(r=n-1);for(let i=r;i>1;--i){let r=e.substring(n-i,n);if(t[r.length].hasOwnProperty(r)===!0)return t[r.length][r]}return null},Zu=function(e,t,n){let r=e[t];if(r.tags.size===0){let e=Xu(r.normal,n.two.suffixPatterns);if(e!==null)return Lu(r,e,`2-suffix`),r.confidence=.7,!0;if(r.implicit&&(e=Xu(r.implicit,n.two.suffixPatterns),e!==null))return Lu(r,e,`2-implicit-suffix`),r.confidence=.7,!0}return null},Qu=/['‘’‛‵′`´]/,$u=function(e,t){for(let n=0;n<t.length;n+=1)if(t[n][0].test(e)===!0)return t[n];return null},ed=function(e=``,t){let n=e[e.length-1];if(t.hasOwnProperty(n)===!0){let r=t[n]||[];for(let t=0;t<r.length;t+=1)if(r[t][0].test(e)===!0)return r[t]}return null},td=function(e,t,n,r){let i=r.methods.one.setTag,{regexText:a,regexNormal:o,regexNumbers:s,endsWith:c}=n.two,l=e[t],u=l.machine||l.normal,d=l.text;Qu.test(l.post)&&!Qu.test(l.pre)&&(d+=l.post.trim());let f=$u(d,a)||$u(u,o);return!f&&/[0-9]/.test(u)&&(f=$u(u,s)),!f&&l.tags.size===0&&(f=ed(u,c)),f?(i([l],f[1],r,null,`2-regex-'${f[2]||f[0]}'`),l.confidence=.6,!0):null},nd=function(e=``,t=[]){let n=e.length,r=7;r>n-3&&(r=n-3);for(let n=r;n>2;--n){let r=e.substring(0,n);if(t[r.length].hasOwnProperty(r)===!0)return t[r.length][r]}return null},rd=function(e,t,n){let r=e[t];if(r.tags.size===0){let e=nd(r.normal,n.two.prefixPatterns);if(e!==null)return Lu(r,e,`2-prefix`),r.confidence=.5,!0}return null},id=1400,ad=2100,od=new Set([`in`,`on`,`by`,`until`,`for`,`to`,`during`,`throughout`,`through`,`within`,`before`,`after`,`of`,`this`,`next`,`last`,`circa`,`around`,`post`,`pre`,`budget`,`classic`,`plan`,`may`]),sd=function(e){if(!e)return!1;let t=e.normal||e.implicit;return!!(od.has(t)||e.tags.has(`Date`)||e.tags.has(`Month`)||e.tags.has(`WeekDay`)||e.tags.has(`Year`)||e.tags.has(`ProperNoun`))},cd=function(e){return e?!!(e.tags.has(`Ordinal`)||e.tags.has(`Cardinal`)&&e.normal.length<3||e.normal===`is`||e.normal===`was`):!1},ld=function(e){return e&&(e.tags.has(`Date`)||e.tags.has(`Month`)||e.tags.has(`WeekDay`)||e.tags.has(`Year`))},ud=function(e,t){let n=e[t];if(n.tags.has(`NumericValue`)&&n.tags.has(`Cardinal`)&&n.normal.length===4){let r=Number(n.normal);if(r&&!isNaN(r)&&r>id&&r<ad){let i=e[t-1],a=e[t+1];if(sd(i)||sd(a))return Lu(n,`Year`,`2-tagYear`);if(r>=1920&&r<2025){if(cd(i)||cd(a))return Lu(n,`Year`,`2-tagYear-close`);if(ld(e[t-2])||ld(e[t+2]))return Lu(n,`Year`,`2-tagYear-far`);if(i&&(i.tags.has(`Determiner`)||i.tags.has(`Possessive`))&&a&&a.tags.has(`Noun`)&&!a.tags.has(`Plural`))return Lu(n,`Year`,`2-tagYear-noun`)}}}return null},dd=function(e,t,n,r){let i=r.methods.one.setTag,a=e[t];a.tags.has(`Verb`)&&([`PastTense`,`PresentTense`,`Auxiliary`,`Modal`,`Particle`].find(e=>a.tags.has(e))||i([a],`Infinitive`,r,null,`2-verb-type''`))},fd=/^[A-Z]('s|,)?$/,pd=/^[A-Z-]+$/,md=/^[A-Z]+s$/,hd=/([A-Z]\.)+[A-Z]?,?$/,gd=/[A-Z]{2,}('s|,)?$/,_d=/([a-z]\.)+[a-z]\.?$/,vd={I:!0,A:!0},yd={la:!0,ny:!0,us:!0,dc:!0,gb:!0},bd=function(e,t){let n=e.text;if(pd.test(n)===!1)if(n.length>3&&md.test(n)===!0)n=n.replace(/s$/,``);else return!1;return n.length>5||vd.hasOwnProperty(n)||t.one.lexicon.hasOwnProperty(e.normal)?!1:hd.test(n)===!0||_d.test(n)===!0||fd.test(n)===!0||gd.test(n)===!0},xd=function(e,t,n){let r=e[t];return r.tags.has(`RomanNumeral`)||r.tags.has(`Acronym`)||r.frozen?null:bd(r,n)?(r.tags.clear(),Lu(r,[`Acronym`,`Noun`],`3-no-period-acronym`),yd[r.normal]===!0&&Lu(r,`Place`,`3-place-acronym`),md.test(r.text)===!0&&Lu(r,`Plural`,`3-plural-acronym`),!0):!vd.hasOwnProperty(r.text)&&fd.test(r.text)?(r.tags.clear(),Lu(r,[`Acronym`,`Noun`],`3-one-letter-acronym`),!0):r.tags.has(`Organization`)&&r.text.length<=3?(Lu(r,`Acronym`,`3-org-acronym`),!0):r.tags.has(`Organization`)&&pd.test(r.text)&&r.text.length<=6?(Lu(r,`Acronym`,`3-titlecase-acronym`),!0):null},Sd=function(e,t){if(!e)return null;let n=t.find(t=>e.normal===t[0]);return n?n[1]:null},Cd=function(e,t){if(!e)return null;let n=t.find(t=>e.tags.has(t[0]));return n?n[1]:null},wd=function(e,t,n){let{leftTags:r,leftWords:i,rightWords:a,rightTags:o}=n.two.neighbours,s=e[t];if(s.tags.size===0){let c=null;if(c||=Sd(e[t-1],i),c||=Sd(e[t+1],a),c||=Cd(e[t-1],r),c||=Cd(e[t+1],o),c)return Lu(s,c,`3-[neighbour]`),Vu(e,t,n),e[t].confidence=.2,!0}return null},Td=e=>/^\p{Lu}[\p{Ll}'’]/u.test(e),Ed=function(e,t,n){return!e||e.tags.has(`FirstName`)||e.tags.has(`Place`)?!1:e.tags.has(`ProperNoun`)||e.tags.has(`Organization`)||e.tags.has(`Acronym`)?!0:!n&&Td(e.text)?t===0?e.tags.has(`Singular`):!0:!1},Dd=function(e,t,n,r){let i=n.model.two.orgWords,a=n.methods.one.setTag,o=e[t];if(i[o.machine||o.normal]===!0&&Ed(e[t-1],t-1,r)){a([e[t]],`Organization`,n,null,`3-[org-word]`);for(let i=t;i>=0&&Ed(e[i],i,r);--i)a([e[i]],`Organization`,n,null,`3-[org-word]`)}return null},Od=e=>/^\p{Lu}[\p{Ll}'’]/u.test(e),kd=/'s$/,Ad=new Set(`athletic.city.community.eastern.federal.financial.great.historic.historical.local.memorial.municipal.national.northern.provincial.southern.state.western.spring.pine.sunset.view.oak.maple.spruce.cedar.willow`.split(`.`)),jd=new Set([`center`,`centre`,`way`,`range`,`bar`,`bridge`,`field`,`pit`]),Md=function(e,t,n){if(!e)return!1;let r=e.tags;return r.has(`Organization`)||r.has(`Possessive`)||kd.test(e.normal)?!1:r.has(`ProperNoun`)||r.has(`Place`)?!0:!n&&Od(e.text)?t===0?r.has(`Singular`):!0:!1},Nd=function(e,t,n,r){let i=n.model.two.placeWords,a=n.methods.one.setTag,o=e[t],s=o.machine||o.normal;if(i[s]===!0){for(let i=t-1;i>=0;--i)if(!Ad.has(e[i].normal)){if(Md(e[i],i,r)){a(e.slice(i,t+1),`Place`,n,null,`3-[place-of-foo]`);continue}break}if(jd.has(s))return!1;for(let i=t+1;i<e.length;i+=1){if(Md(e[i],i,r))return a(e.slice(t,i+1),`Place`,n,null,`3-[foo-place]`),!0;if(!(e[i].normal===`of`||Ad.has(e[i].normal)))break}}return null},Pd=function(e,t,n){let r=!1,i=e[t].tags;(i.size===0||i.size===1&&(i.has(`Hyphenated`)||i.has(`HashTag`)||i.has(`Prefix`)||i.has(`SlashedTerm`)))&&(r=!0),r&&(Lu(e[t],`Noun`,`3-[fallback]`),Vu(e,t,n),e[t].confidence=.1)},Fd=/^[A-Z][a-z]/,Id=(e,t)=>e[t].tags.has(`ProperNoun`)&&Fd.test(e[t].text)?`Noun`:null,Ld=(e,t,n)=>t===0&&!e[1]?n:null,Rd=function(e,t){return!e[t+1]&&e[t-1]&&e[t-1].tags.has(`Determiner`)?`Noun`:null},zd=function(e,t,n){return t===0&&e.length>3?n:null},Bd={"Adj|Gerund":(e,t)=>Id(e,t),"Adj|Noun":(e,t)=>Id(e,t)||Rd(e,t),"Actor|Verb":(e,t)=>Id(e,t),"Adj|Past":(e,t)=>Id(e,t),"Adj|Present":(e,t)=>Id(e,t),"Noun|Gerund":(e,t)=>Id(e,t),"Noun|Verb":(e,t)=>t>0&&Id(e,t)||Ld(e,t,`Infinitive`),"Plural|Verb":(e,t)=>Id(e,t)||Ld(e,t,`PresentTense`)||zd(e,t,`Plural`),"Person|Noun":(e,t)=>Id(e,t),"Person|Verb":(e,t)=>t===0?null:Id(e,t),"Person|Adj":(e,t)=>t===0&&e.length>1||Id(e,t)?`Person`:null},Vd=typeof process>`u`||!process.env?self.env||{}:process.env,Hd=/^(under|over|mis|re|un|dis|semi)-?/,Ud=(e,t)=>{if(!e||!t)return null;let n=e.normal||e.implicit,r=null;return t.hasOwnProperty(n)&&(r=t[n]),r&&Vd.DEBUG_TAGS&&console.log(`\n \x1b[2m\x1b[3m ↓ - '${n}' \x1b[0m`),r},Wd=(e,t={},n)=>{if(!e||!t)return null;let r=Array.from(e.tags).sort((e,t)=>(n[e]?n[e].parents.length:0)>(n[t]?n[t].parents.length:0)?-1:1).find(e=>t[e]);return r&&Vd.DEBUG_TAGS&&console.log(` \x1b[2m\x1b[3m ↓ - '${e.normal||e.implicit}' (#${r}) \x1b[0m`),r=t[r],r},Gd=function(e,t,n,r){if(!n)return null;let i=e[t-1]?.text===`also`?Math.max(0,t-2):t-1,a=r.one.tagSet,o=Ud(e[t+1],n.afterWords);return o||=Ud(e[i],n.beforeWords),o||=Wd(e[i],n.beforeTags,a),o||=Wd(e[t+1],n.afterTags,a),o},Kd=function(e,t,n){let r=n.model,i=n.methods.one.setTag,{switches:a,clues:o}=r.two,s=e[t],c=s.normal||s.implicit||``;if(Hd.test(c)&&!a[c]&&(c=c.replace(Hd,``)),s.switch){let a=s.switch;if(s.tags.has(`Acronym`)||s.tags.has(`PhrasalVerb`))return;let l=Gd(e,t,o[a],r);Bd[a]&&(l=Bd[a](e,t)||l),l?(i([s],l,n,null,`3-[switch] (${a})`),Vu(e,t,r)):Vd.DEBUG_TAGS&&console.log(`\n -> X - '${c}' : (${a}) `)}},qd={there:!0,this:!0,it:!0,him:!0,her:!0,us:!0},Jd=function(e,t){let n=t.methods.one.setTag,r=t.model.one._multiCache||{},i=e[0];if((i.switch===`Noun|Verb`||i.tags.has(`Infinitive`))&&e.length>=2){if(e.length<4&&!qd[e[1].normal]||!i.tags.has(`PhrasalVerb`)&&r.hasOwnProperty(i.normal))return;(e[1].tags.has(`Noun`)||e[1].tags.has(`Determiner`))&&(!e.slice(1,3).some(e=>e.tags.has(`Verb`))||i.tags.has(`#PhrasalVerb`))&&n([i],`Imperative`,t,null,`3-[imperative]`)}},Yd=function(e){if(e.filter(e=>!e.tags.has(`ProperNoun`)).length<=3)return!1;let t=/^[a-z]/;return e.every(e=>!t.test(e.text))},Xd=function(e,t,n){e.forEach(e=>{Mu(e,0,t,n)})},Zd=function(e,t,n,r){for(let i=0;i<e.length;i+=1)e[i].frozen!==!0&&(Fu(e,i,t),r===!1&&Yu(e,i,t),Zu(e,i,t),td(e,i,t,n),rd(e,i,t),ud(e,i,t))},Qd=function(e,t,n,r){for(let n=0;n<e.length;n+=1){let r=xd(e,n,t);Vu(e,n,t),r||=wd(e,n,t),r||=Pd(e,n,t)}for(let i=0;i<e.length;i+=1)e[i].frozen!==!0&&(Dd(e,i,n,r),Nd(e,i,n,r),Kd(e,i,n),dd(e,i,t,n),Nu(e,i,t,n));Jd(e,n)},$d=function(e){let{methods:t,model:n,world:r}=e,i=e.docs;Xd(i,n,r);let a=t.two.quickSplit(i);for(let e=0;e<a.length;e+=1){let t=a[e],i=Yd(t);Zd(t,n,r,i),Qd(t,n,r,i)}return a},ef={Possessive:e=>{let t=e.machine||e.normal||e.text;return t=t.replace(/'s$/,``),t},Plural:(e,t)=>{let n=e.machine||e.normal||e.text;return t.methods.two.transform.noun.toSingular(n,t.model)},Copula:()=>`is`,PastTense:(e,t)=>{let n=e.machine||e.normal||e.text;return t.methods.two.transform.verb.toInfinitive(n,t.model,`PastTense`)},Gerund:(e,t)=>{let n=e.machine||e.normal||e.text;return t.methods.two.transform.verb.toInfinitive(n,t.model,`Gerund`)},PresentTense:(e,t)=>{let n=e.machine||e.normal||e.text;return e.tags.has(`Infinitive`)?n:t.methods.two.transform.verb.toInfinitive(n,t.model,`PresentTense`)},Comparative:(e,t)=>{let n=e.machine||e.normal||e.text;return t.methods.two.transform.adjective.fromComparative(n,t.model)},Superlative:(e,t)=>{let n=e.machine||e.normal||e.text;return t.methods.two.transform.adjective.fromSuperlative(n,t.model)},Adverb:(e,t)=>{let{fromAdverb:n}=t.methods.two.transform.adjective;return n(e.machine||e.normal||e.text)}},tf=function(e){let t=e.world,n=Object.keys(ef);e.docs.forEach(e=>{for(let r=0;r<e.length;r+=1){let i=e[r];for(let e=0;e<n.length;e+=1)if(i.tags.has(n[e])){let r=ef[n[e]],a=r(i,t);i.normal!==a&&(i.root=a);break}}})},nf={Adverb:`RB`,Comparative:`JJR`,Superlative:`JJS`,Adjective:`JJ`,TO:`Conjunction`,Modal:`MD`,Auxiliary:`MD`,Gerund:`VBG`,PastTense:`VBD`,Participle:`VBN`,PresentTense:`VBZ`,Infinitive:`VB`,Particle:`RP`,Verb:`VB`,Pronoun:`PRP`,Cardinal:`CD`,Conjunction:`CC`,Determiner:`DT`,Preposition:`IN`,QuestionWord:`WP`,Expression:`UH`,Possessive:`POS`,ProperNoun:`NNP`,Person:`NNP`,Place:`NNP`,Organization:`NNP`,Singular:`NN`,Plural:`NNS`,Noun:`NN`,There:`EX`},rf=function(e){if(e.tags.has(`ProperNoun`)&&e.tags.has(`Plural`))return`NNPS`;if(e.tags.has(`Possessive`)&&e.tags.has(`Pronoun`))return`PRP$`;if(e.normal===`there`)return`EX`;if(e.normal===`to`)return`TO`;let t=e.tagRank||[];for(let e=0;e<t.length;e+=1)if(nf.hasOwnProperty(t[e]))return nf[t[e]];return null},af={preTagger:$d,root:tf,penn:function(e){e.compute(`tagRank`),e.docs.forEach(e=>{e.forEach(e=>{e.penn=rf(e)})})}},of=[`Person`,`Place`,`Organization`],sf={compute:af,methods:yu,model:ju,tags:Object.assign({},{Noun:{not:[`Verb`,`Adjective`,`Adverb`,`Value`,`Determiner`]},Singular:{is:`Noun`,not:[`Plural`,`Uncountable`]},ProperNoun:{is:`Noun`},Person:{is:`Singular`,also:[`ProperNoun`],not:[`Place`,`Organization`,`Date`]},FirstName:{is:`Person`},MaleName:{is:`FirstName`,not:[`FemaleName`,`LastName`]},FemaleName:{is:`FirstName`,not:[`MaleName`,`LastName`]},LastName:{is:`Person`,not:[`FirstName`]},Honorific:{is:`Person`,not:[`FirstName`,`LastName`,`Value`]},Place:{is:`Singular`,not:[`Person`,`Organization`]},Country:{is:`Place`,also:[`ProperNoun`],not:[`City`]},City:{is:`Place`,also:[`ProperNoun`],not:[`Country`]},Region:{is:`Place`,also:[`ProperNoun`]},Address:{},Organization:{is:`ProperNoun`,not:[`Person`,`Place`]},SportsTeam:{is:`Organization`},School:{is:`Organization`},Company:{is:`Organization`},Plural:{is:`Noun`,not:[`Singular`,`Uncountable`]},Uncountable:{is:`Noun`},Pronoun:{is:`Noun`,not:of},Actor:{is:`Noun`,not:[`Place`,`Organization`]},Activity:{is:`Noun`,not:[`Person`,`Place`]},Unit:{is:`Noun`,not:of},Demonym:{is:`Noun`,also:[`ProperNoun`],not:of},Possessive:{is:`Noun`},Reflexive:{is:`Pronoun`}},{Verb:{not:[`Noun`,`Adjective`,`Adverb`,`Value`,`Expression`]},PresentTense:{is:`Verb`,not:[`PastTense`,`FutureTense`]},Infinitive:{is:`PresentTense`,not:[`Gerund`]},Imperative:{is:`Verb`,not:[`PastTense`,`Gerund`,`Copula`]},Gerund:{is:`PresentTense`,not:[`Copula`]},PastTense:{is:`Verb`,not:[`PresentTense`,`Gerund`,`FutureTense`]},FutureTense:{is:`Verb`,not:[`PresentTense`,`PastTense`]},Copula:{is:`Verb`},Modal:{is:`Verb`,not:[`Infinitive`]},Participle:{is:`PastTense`},Auxiliary:{is:`Verb`,not:[`PastTense`,`PresentTense`,`Gerund`,`Conjunction`]},PhrasalVerb:{is:`Verb`},Particle:{is:`PhrasalVerb`,not:[`PastTense`,`PresentTense`,`Copula`,`Gerund`]},Passive:{is:`Verb`}},{Value:{not:[`Verb`,`Adjective`,`Adverb`]},Ordinal:{is:`Value`,not:[`Cardinal`]},Cardinal:{is:`Value`,not:[`Ordinal`]},Fraction:{is:`Value`,not:[`Noun`]},Multiple:{is:`TextValue`},RomanNumeral:{is:`Cardinal`,not:[`TextValue`]},TextValue:{is:`Value`,not:[`NumericValue`]},NumericValue:{is:`Value`,not:[`TextValue`]},Money:{is:`Cardinal`},Percent:{is:`Value`}},{Date:{not:[`Verb`,`Adverb`,`Adjective`]},Month:{is:`Date`,also:[`Noun`],not:[`Year`,`WeekDay`,`Time`]},WeekDay:{is:`Date`,also:[`Noun`]},Year:{is:`Date`,not:[`RomanNumeral`]},FinancialQuarter:{is:`Date`,not:`Fraction`},Holiday:{is:`Date`,also:[`Noun`]},Season:{is:`Date`},Timezone:{is:`Date`,also:[`Noun`],not:[`ProperNoun`]},Time:{is:`Date`,not:[`AtMention`]},Duration:{is:`Date`,also:[`Noun`]}},{Adjective:{not:[`Noun`,`Verb`,`Adverb`,`Value`]},Comparable:{is:`Adjective`},Comparative:{is:`Adjective`},Superlative:{is:`Adjective`,not:[`Comparative`]},NumberRange:{},Adverb:{not:[`Noun`,`Verb`,`Adjective`,`Value`]},Determiner:{not:[`Noun`,`Verb`,`Adjective`,`Adverb`,`QuestionWord`,`Conjunction`]},Conjunction:{not:[`Noun`,`Verb`,`Adjective`,`Adverb`,`Value`,`QuestionWord`]},Preposition:{not:[`Noun`,`Verb`,`Adjective`,`Adverb`,`QuestionWord`,`Determiner`]},QuestionWord:{not:[`Determiner`]},Currency:{is:`Noun`},Expression:{not:[`Noun`,`Adjective`,`Verb`,`Adverb`]},Abbreviation:{},Url:{not:[`HashTag`,`PhoneNumber`,`Verb`,`Adjective`,`Value`,`AtMention`,`Email`,`SlashedTerm`]},PhoneNumber:{not:[`HashTag`,`Verb`,`Adjective`,`Value`,`AtMention`,`Email`]},HashTag:{},AtMention:{is:`Noun`,not:[`HashTag`,`Email`]},Emoji:{not:[`HashTag`,`Verb`,`Adjective`,`Value`,`AtMention`]},Emoticon:{not:[`HashTag`,`Verb`,`Adjective`,`Value`,`AtMention`,`SlashedTerm`]},SlashedTerm:{not:[`Emoticon`,`Url`,`Value`]},Email:{not:[`HashTag`,`Verb`,`Adjective`,`Value`,`AtMention`]},Acronym:{not:[`Plural`,`RomanNumeral`,`Pronoun`,`Date`]},Negative:{not:[`Noun`,`Adjective`,`Value`,`Expression`]},Condition:{not:[`Verb`,`Adjective`,`Noun`,`Value`]},There:{not:[`Verb`,`Adjective`,`Noun`,`Value`,`Conjunction`,`Preposition`]},Prefix:{not:[`Abbreviation`,`Acronym`,`ProperNoun`]},Hyphenated:{}}),hooks:[`preTagger`]},cf=/[,)"';:\-–—.…]/,lf=function(e,t){if(!e.found)return;let n=e.termList();for(let e=0;e<n.length-1;e++){let t=n[e];if(cf.test(t.post))return}n[0].implicit=n[0].normal,n[0].text+=t,n[0].normal+=t,n.slice(1).forEach(e=>{e.implicit=e.normal,e.text=``,e.normal=``});for(let e=0;e<n.length-1;e++)n[e].post=n[e].post.replace(/ /,``)},uf=function(){let e=this.not(`@hasContraction`),t=e.match(`(we|they|you) are`);return lf(t,`'re`),t=e.match(`(he|she|they|it|we|you) will`),lf(t,`'ll`),t=e.match(`(he|she|they|it|we) is`),lf(t,`'s`),t=e.match(`#Person is`),lf(t,`'s`),t=e.match(`#Person would`),lf(t,`'d`),t=e.match(`(is|was|had|would|should|could|do|does|have|has|can) not`),lf(t,`n't`),t=e.match(`(i|we|they) have`),lf(t,`'ve`),t=e.match(`(would|should|could) have`),lf(t,`'ve`),t=e.match(`i am`),lf(t,`'m`),t=e.match(`going to`),this},df=/^\p{Lu}[\p{Ll}'’]/u,ff=function(e=``){return e=e.replace(/^ *[a-z\u00C0-\u00FF]/,e=>e.toUpperCase()),e},pf=function(e){class t extends e{constructor(e,t,n){super(e,t,n),this.viewType=`Contraction`}expand(){return this.docs.forEach(e=>{let t=df.test(e[0].text);e.forEach((t,n)=>{t.text=t.implicit||``,delete t.implicit,n<e.length-1&&t.post===``&&(t.post+=` `),t.dirty=!0}),t&&(e[0].text=ff(e[0].text))}),this.compute(`normal`),this}}e.prototype.contractions=function(){let e=this.match(`@hasContraction+`);return new t(this.document,e.pointer)},e.prototype.contract=uf},mf=function(e,t,n){let[r,i]=t;!n||n.length===0||(n=n.map((e,t)=>(e.implicit=e.text,e.machine=e.text,e.pre=``,e.post=``,e.text=``,e.normal=``,e.index=[r,i+t],e)),n[0]&&(n[0].pre=e[r][i].pre,n[n.length-1].post=e[r][i].post,n[0].text=e[r][i].text,n[0].normal=e[r][i].normal),e[r].splice(i,1,...n))},hf=/'/,gf=new Set([`been`,`become`]),_f=new Set([`what`,`how`,`when`,`if`,`too`]),vf=new Set([`too`,`also`,`enough`]),yf=(e,t)=>{for(let n=t+1;n<e.length;n+=1){let t=e[n];if(gf.has(t.normal))return`has`;if(_f.has(t.normal)||t.tags.has(`Gerund`)||t.tags.has(`Determiner`)||t.tags.has(`Adjective`)||t.switch===`Adj|Past`&&e[n+1]&&(vf.has(e[n+1].normal)||e[n+1].tags.has(`Preposition`)))return`is`;if(t.tags.has(`PastTense`))return e[n+1]&&e[n+1].normal===`for`?`is`:`has`}return`is`},bf=function(e,t){let n=e[t].normal.split(hf)[0];if(n===`let`)return[n,`us`];if(n===`there`){let r=e[t+1];if(r&&r.tags.has(`Plural`))return[n,`are`]}return yf(e,t)===`has`?[n,`has`]:[n,`is`]},xf=/'/,Sf=new Set([`better`,`done`,`before`,`it`,`had`]),Cf=new Set([`have`,`be`]),wf=(e,t)=>{for(let n=t+1;n<e.length;n+=1){let t=e[n];if(Sf.has(t.normal))return`had`;if(Cf.has(t.normal))return`would`;if(t.tags.has(`PastTense`)||t.switch===`Adj|Past`)return`had`;if(t.tags.has(`PresentTense`)||t.tags.has(`Infinitive`))return`would`;if(t.tags.has(`#Determiner`))return`had`;if(t.tags.has(`Adjective`))return`would`}return!1},Tf=function(e,t){let n=e[t].normal.split(xf)[0];return n===`how`||n===`what`?[n,`did`]:wf(e,t)===`had`?[n,`had`]:[n,`would`]},Ef=function(e,t){for(let n=t-1;n>=0;--n)if(e[n].tags.has(`Noun`)||e[n].tags.has(`Pronoun`)||e[n].tags.has(`Plural`)||e[n].tags.has(`Singular`))return e[n];return null},Df=function(e,t){if(e[t].normal===`ain't`||e[t].normal===`aint`){if(e[t+1]&&e[t+1].normal===`never`)return[`have`];let n=Ef(e,t);if(n){if(n.normal===`we`||n.normal===`they`)return[`are`,`not`];if(n.normal===`i`)return[`am`,`not`];if(n.tags&&n.tags.has(`Plural`))return[`are`,`not`]}return[`is`,`not`]}return[e[t].normal.replace(/n't/,``),`not`]},Of={that:!0,there:!0,let:!0,here:!0,everywhere:!0},kf={in:!0,by:!0,for:!0},Af=new Set([`too`,`also`,`enough`,`about`]),jf=new Set([`is`,`are`,`did`,`were`,`could`,`should`,`must`,`had`,`have`]),Mf=(e,t)=>{let n=e[t];if(Of.hasOwnProperty(n.machine||n.normal))return!1;if(n.tags.has(`Possessive`))return!0;if(n.tags.has(`QuestionWord`)||n.normal===`he's`||n.normal===`she's`)return!1;let r=e[t+1];if(!r)return!0;if(n.normal===`it's`)return!!r.tags.has(`#Noun`);if(r.switch==`Noun|Gerund`){let r=e[t+2];return r?r.tags.has(`Copula`)?!0:(r.normal===`on`||r.normal,!1):!!(n.tags.has(`Actor`)||n.tags.has(`ProperNoun`))}if(r.tags.has(`Verb`))return r.tags.has(`Infinitive`)?!0:r.tags.has(`Gerund`)?!1:!!r.tags.has(`PresentTense`);if(r.switch===`Adj|Noun`){let n=e[t+2];if(!n)return!1;if(jf.has(n.normal))return!0;if(Af.has(n.normal))return!1}if(r.tags.has(`Noun`)){let e=r.machine||r.normal;return!(e===`here`||e===`there`||e===`everywhere`||r.tags.has(`Possessive`)||r.tags.has(`ProperNoun`)&&!n.tags.has(`ProperNoun`))}if(e[t-1]&&kf[e[t-1].normal]===!0)return!0;if(r.tags.has(`Adjective`)){let n=e[t+2];if(!n)return!1;if(n.tags.has(`Noun`)&&!n.tags.has(`Pronoun`)){let e=r.normal;return!(e===`above`||e===`below`||e===`behind`)}return n.switch===`Noun|Verb`}return!!r.tags.has(`Value`)},Nf=/'/,Pf=function(e){e.forEach((e,t)=>{e.index&&(e.index[1]=t)})},Ff=function(e,t,n,r){let i=t.update();i.document=[e];let a=n+r;n>0&&--n,e[a]&&(a+=1),i.ptrs=[[0,n,a]],i.compute([`freeze`,`lexicon`,`preTagger`,`unfreeze`]),Pf(e)},If={d:(e,t)=>Tf(e,t),t:(e,t)=>Df(e,t),s:(e,t,n)=>Mf(e,t)?n.methods.one.setTag([e[t]],`Possessive`,n,null,`2-contraction`):bf(e,t)},Lf=function(e,t){let n=t.fromText(e.join(` `));return n.compute(`id`),n.docs[0]},Rf={compute:{contractionTwo:e=>{let{world:t,document:n}=e;n.forEach((r,i)=>{for(let a=r.length-1;a>=0;--a){if(r[a].implicit)continue;let o=null;Nf.test(r[a].normal)===!0&&(o=r[a].normal.split(Nf)[1]);let s=null;if(If.hasOwnProperty(o)&&(s=If[o](r,a,t)),s){s=Lf(s,e),mf(n,[i,a],s),Ff(n[i],e,a,s.length);continue}}})}},api:pf,hooks:[`contractionTwo`]},zf=[{match:`[(all|both)] #Determiner #Noun`,group:0,tag:`Noun`,reason:`all-noun`},{match:`#Copula [(just|alone)]$`,group:0,tag:`Adjective`,reason:`not-adverb`},{match:`#Singular is #Adverb? [#PastTense$]`,group:0,tag:`Adjective`,reason:`is-filled`},{match:`[#PastTense] #Singular is`,group:0,tag:`Adjective`,reason:`smoked-poutine`},{match:`[#PastTense] #Plural are`,group:0,tag:`Adjective`,reason:`baked-onions`},{match:`well [#PastTense]`,group:0,tag:`Adjective`,reason:`well-made`},{match:`#Copula [fucked up?]`,group:0,tag:`Adjective`,reason:`swears-adjective`},{match:`#Singular (seems|appears) #Adverb? [#PastTense$]`,group:0,tag:`Adjective`,reason:`seems-filled`},{match:`#Copula #Adjective? [(out|in|through)]$`,group:0,tag:`Adjective`,reason:`still-out`},{match:`^[#Adjective] (the|your) #Noun`,group:0,notIf:`(all|even)`,tag:`Infinitive`,reason:`shut-the`},{match:`the [said] #Noun`,group:0,tag:`Adjective`,reason:`the-said-card`},{match:`[#Hyphenated (#Hyphenated && #PastTense)] (#Noun|#Conjunction)`,group:0,tag:`Adjective`,notIf:`#Adverb`,reason:`faith-based`},{match:`[#Hyphenated (#Hyphenated && #Gerund)] (#Noun|#Conjunction)`,group:0,tag:`Adjective`,notIf:`#Adverb`,reason:`self-driving`},{match:`[#PastTense (#Hyphenated && #PhrasalVerb)] (#Noun|#Conjunction)`,group:0,tag:`Adjective`,reason:`dammed-up`},{match:`(#Hyphenated && #Value) fold`,tag:`Adjective`,reason:`two-fold`},{match:`must (#Hyphenated && #Infinitive)`,tag:`Adjective`,reason:`must-win`},{match:`(#Hyphenated && #Infinitive) #Hyphenated`,tag:`Adjective`,notIf:`#PhrasalVerb`,reason:`vacuum-sealed`},{match:`too much`,tag:`Adverb Adjective`,reason:`bit-4`},{match:`a bit much`,tag:`Determiner Adverb Adjective`,reason:`bit-3`},{match:`[(un|contra|extra|inter|intra|macro|micro|mid|mis|mono|multi|pre|sub|tri|ex)] #Adjective`,group:0,tag:[`Adjective`,`Prefix`],reason:`un-skilled`}],Bf=`(dark|bright|flat|light|soft|pale|dead|dim|faux|little|wee|sheer|most|near|good|extra|all)`,Vf=`(hard|fast|late|early|high|right|deep|close|direct)`,Hf=[{match:`#Adverb [#Adverb] (and|or|then)`,group:0,tag:`Adjective`,reason:`kinda-sparkly-and`},{match:`[${Bf}] #Adjective`,group:0,tag:`Adverb`,reason:`dark-green`},{match:`#Copula [far too] #Adjective`,group:0,tag:`Adverb`,reason:`far-too`},{match:`#Copula [still] (in|#Gerund|#Adjective)`,group:0,tag:`Adverb`,reason:`was-still-walking`},{match:`#Plural ${Vf}`,tag:`#PresentTense #Adverb`,reason:`studies-hard`},{match:`#Verb [${Vf}] !#Noun?`,group:0,notIf:`(#Copula|get|got|getting|become|became|becoming|feel|feels|feeling|#Determiner|#Preposition)`,tag:`Adverb`,reason:`shops-direct`},{match:`[#Plural] a lot`,tag:`PresentTense`,reason:`studies-a-lot`}],Uf=[{match:`as [#Gerund] as`,group:0,tag:`Adjective`,reason:`as-gerund-as`},{match:`more [#Gerund] than`,group:0,tag:`Adjective`,reason:`more-gerund-than`},{match:`(so|very|extremely) [#Gerund]`,group:0,tag:`Adjective`,reason:`so-gerund`},{match:`(found|found) it #Adverb? [#Gerund]`,group:0,tag:`Adjective`,reason:`found-it-gerund`},{match:`a (little|bit|wee) bit? [#Gerund]`,group:0,tag:`Adjective`,reason:`a-bit-gerund`},{match:`#Gerund [#Gerund]`,group:0,tag:`Adjective`,notIf:`(impersonating|practicing|considering|assuming)`,reason:`looking-annoying`},{match:`(looked|look|looks) #Adverb? [%Adj|Gerund%]`,group:0,tag:`Adjective`,notIf:`(impersonating|practicing|considering|assuming)`,reason:`looked-amazing`},{match:`[%Adj|Gerund%] #Determiner`,group:0,tag:`Gerund`,reason:`developing-a`},{match:`#Possessive [%Adj|Gerund%] #Noun`,group:0,tag:`Adjective`,reason:`leading-manufacturer`},{match:`%Noun|Gerund% %Adj|Gerund%`,tag:`Gerund #Adjective`,reason:`meaning-alluring`},{match:`(face|embrace|reveal|stop|start|resume) %Adj|Gerund%`,tag:`#PresentTense #Adjective`,reason:`face-shocking`},{match:`(are|were) [%Adj|Gerund%] #Plural`,group:0,tag:`Adjective`,reason:`are-enduring-symbols`}],Wf=[{match:`#Determiner [#Adjective] #Copula`,group:0,tag:`Noun`,reason:`the-adj-is`},{match:`#Adjective [#Adjective] #Copula`,group:0,tag:`Noun`,reason:`adj-adj-is`},{match:`(his|its) [%Adj|Noun%]`,group:0,tag:`Noun`,notIf:`#Hyphenated`,reason:`his-fine`},{match:`#Copula #Adverb? [all]`,group:0,tag:`Noun`,reason:`is-all`},{match:`(have|had) [#Adjective] #Preposition .`,group:0,tag:`Noun`,reason:`have-fun`},{match:`#Gerund (giant|capital|center|zone|application)`,tag:`Noun`,reason:`brewing-giant`},{match:`#Preposition (a|an) [#Adjective]$`,group:0,tag:`Noun`,reason:`an-instant`},{match:`no [#Adjective] #Modal`,group:0,tag:`Noun`,reason:`no-golden`},{match:`[brand #Gerund?] new`,group:0,tag:`Adverb`,reason:`brand-new`},{match:`(#Determiner|#Comparative|new|different) [kind]`,group:0,tag:`Noun`,reason:`some-kind`},{match:`#Possessive [%Adj|Noun%] #Noun`,group:0,tag:`Adjective`,reason:`her-favourite`},{match:`must && #Hyphenated .`,tag:`Adjective`,reason:`must-win`},{match:`#Determiner [#Adjective]$`,tag:`Noun`,notIf:`(this|that|#Comparative|#Superlative)`,reason:`the-south`},{match:`(#Noun && #Hyphenated) (#Adjective && #Hyphenated)`,tag:`Adjective`,notIf:`(this|that|#Comparative|#Superlative)`,reason:`company-wide`},{match:`#Determiner [#Adjective] (#Copula|#Determiner)`,notIf:`(#Comparative|#Superlative)`,group:0,tag:`Noun`,reason:`the-poor`},{match:`[%Adj|Noun%] #Noun`,notIf:`(#Pronoun|#ProperNoun)`,group:0,tag:`Adjective`,reason:`stable-foundations`}],Gf=[{match:`(slowly|quickly) [#Adjective]`,group:0,tag:`Verb`,reason:`slowly-adj`},{match:`does (#Adverb|not)? [#Adjective]`,group:0,tag:`PresentTense`,reason:`does-mean`},{match:`[(fine|okay|cool|ok)] by me`,group:0,tag:`Adjective`,reason:`okay-by-me`},{match:`i (#Adverb|do)? not? [mean]`,group:0,tag:`PresentTense`,reason:`i-mean`},{match:`will #Adjective`,tag:`Auxiliary Infinitive`,reason:`will-adj`},{match:`#Pronoun [#Adjective] #Determiner #Adjective? #Noun`,group:0,tag:`Verb`,reason:`he-adj-the`},{match:`#Copula [%Adj|Present%] to #Verb`,group:0,tag:`Verb`,reason:`adj-to`},{match:`#Copula [#Adjective] (well|badly|quickly|slowly)`,group:0,tag:`Verb`,reason:`done-well`},{match:`#Adjective and [#Gerund] !#Preposition?`,group:0,tag:`Adjective`,reason:`rude-and-x`},{match:`#Copula #Adverb? (over|under) [#PastTense]`,group:0,tag:`Adjective`,reason:`over-cooked`},{match:`#Copula #Adjective+ (and|or) [#PastTense]$`,group:0,tag:`Adjective`,reason:`bland-and-overcooked`},{match:`got #Adverb? [#PastTense] of`,group:0,tag:`Adjective`,reason:`got-tired-of`},{match:`(seem|seems|seemed|appear|appeared|appears|feel|feels|felt|sound|sounds|sounded) (#Adverb|#Adjective)? [#PastTense]`,group:0,tag:`Adjective`,reason:`felt-loved`},{match:`(seem|feel|seemed|felt) [#PastTense #Particle?]`,group:0,tag:`Adjective`,reason:`seem-confused`},{match:`a (bit|little|tad) [#PastTense #Particle?]`,group:0,tag:`Adjective`,reason:`a-bit-confused`},{match:`not be [%Adj|Past% #Particle?]`,group:0,tag:`Adjective`,reason:`do-not-be-confused`},{match:`#Copula just [%Adj|Past% #Particle?]`,group:0,tag:`Adjective`,reason:`is-just-right`},{match:`as [#Infinitive] as`,group:0,tag:`Adjective`,reason:`as-pale-as`},{match:`[%Adj|Past%] and #Adjective`,group:0,tag:`Adjective`,reason:`faled-and-oppressive`},{match:`or [#PastTense] #Noun`,group:0,tag:`Adjective`,notIf:`(#Copula|#Pronoun)`,reason:`or-heightened-emotion`},{match:`(become|became|becoming|becomes) [#Verb]`,group:0,tag:`Adjective`,reason:`become-verb`},{match:`#Possessive [#PastTense] #Noun`,group:0,tag:`Adjective`,reason:`declared-intentions`},{match:`#Copula #Pronoun [%Adj|Present%]`,group:0,tag:`Adjective`,reason:`is-he-cool`},{match:`#Copula [%Adj|Past%] with`,group:0,tag:`Adjective`,notIf:`(associated|worn|baked|aged|armed|bound|fried|loaded|mixed|packed|pumped|filled|sealed)`,reason:`is-crowded-with`},{match:`#Copula #Adverb? [%Adj|Present%]$`,group:0,tag:`Adjective`,reason:`was-empty$`}],Kf=[{match:`[still] #Adjective`,group:0,tag:`Adverb`,reason:`still-advb`},{match:`[still] #Verb`,group:0,tag:`Adverb`,reason:`still-verb`},{match:`[so] #Adjective`,group:0,tag:`Adverb`,reason:`so-adv`},{match:`[way] #Comparative`,group:0,tag:`Adverb`,reason:`way-adj`},{match:`[way] #Adverb #Adjective`,group:0,tag:`Adverb`,reason:`way-too-adj`},{match:`[all] #Verb`,group:0,tag:`Adverb`,reason:`all-verb`},{match:`#Verb [like]`,group:0,notIf:`(#Modal|#PhrasalVerb)`,tag:`Adverb`,reason:`verb-like`},{match:`(barely|hardly) even`,tag:`Adverb`,reason:`barely-even`},{match:`[even] #Verb`,group:0,tag:`Adverb`,reason:`even-walk`},{match:`[even] #Comparative`,group:0,tag:`Adverb`,reason:`even-worse`},{match:`[even] (#Determiner|#Possessive)`,group:0,tag:`#Adverb`,reason:`even-the`},{match:`even left`,tag:`#Adverb #Verb`,reason:`even-left`},{match:`[way] #Adjective`,group:0,tag:`#Adverb`,reason:`way-over`},{match:`#PresentTense [(hard|quick|bright|slow|fast|backwards|forwards)]`,notIf:`#Copula`,group:0,tag:`Adverb`,reason:`lazy-ly`},{match:`[much] #Adjective`,group:0,tag:`Adverb`,reason:`bit-1`},{match:`#Copula [#Adverb]$`,group:0,tag:`Adjective`,reason:`is-well`},{match:`a [(little|bit|wee) bit?] #Adjective`,group:0,tag:`Adverb`,reason:`a-bit-cold`},{match:`[(super|pretty)] #Adjective`,group:0,tag:`Adverb`,reason:`super-strong`},{match:`(become|fall|grow) #Adverb? [#PastTense]`,group:0,tag:`Adjective`,reason:`overly-weakened`},{match:`(a|an) #Adverb [#Participle] #Noun`,group:0,tag:`Adjective`,reason:`completely-beaten`},{match:`#Determiner #Adverb? [close]`,group:0,tag:`Adjective`,reason:`a-close`},{match:`#Gerund #Adverb? [close]`,group:0,tag:`Adverb`,notIf:`(getting|becoming|feeling)`,reason:`being-close`},{match:`(the|those|these|a|an) [#Participle] #Noun`,group:0,tag:`Adjective`,reason:`blown-motor`},{match:`(#PresentTense|#PastTense) [back]`,group:0,tag:`Adverb`,notIf:`(#PhrasalVerb|#Copula)`,reason:`charge-back`},{match:`#Verb [around]`,group:0,tag:`Adverb`,notIf:`#PhrasalVerb`,reason:`send-around`},{match:`[later] #PresentTense`,group:0,tag:`Adverb`,reason:`later-say`},{match:`#Determiner [well] !#PastTense?`,group:0,tag:`Noun`,reason:`the-well`},{match:`#Adjective [enough]`,group:0,tag:`Adverb`,reason:`high-enough`}],qf=[{match:`#Holiday (day|eve)`,tag:`Holiday`,reason:`holiday-day`},{match:`#Value of #Month`,tag:`Date`,reason:`value-of-month`},{match:`#Cardinal #Month`,tag:`Date`,reason:`cardinal-month`},{match:`#Month #Value to #Value`,tag:`Date`,reason:`value-to-value`},{match:`#Month the #Value`,tag:`Date`,reason:`month-the-value`},{match:`(#WeekDay|#Month) #Value`,tag:`Date`,reason:`date-value`},{match:`#Value (#WeekDay|#Month)`,tag:`Date`,reason:`value-date`},{match:`(#TextValue && #Date) #TextValue`,tag:`Date`,reason:`textvalue-date`},{match:`#Month #NumberRange`,tag:`Date`,reason:`aug 20-21`},{match:`#WeekDay #Month #Ordinal`,tag:`Date`,reason:`week mm-dd`},{match:`#Month #Ordinal #Cardinal`,tag:`Date`,reason:`mm-dd-yyy`},{match:`(#Place|#Demonmym|#Time) (standard|daylight|central|mountain)? time`,tag:`Timezone`,reason:`std-time`},{match:`(eastern|mountain|pacific|central|atlantic) (standard|daylight|summer)? time`,tag:`Timezone`,reason:`eastern-time`},{match:`#Time [(eastern|mountain|pacific|central|est|pst|gmt)]`,group:0,tag:`Timezone`,reason:`5pm-central`},{match:`(central|western|eastern) european time`,tag:`Timezone`,reason:`cet`}],Jf=[{match:`[sun] the #Ordinal`,tag:`WeekDay`,reason:`sun-the-5th`},{match:`[sun] #Date`,group:0,tag:`WeekDay`,reason:`sun-feb`},{match:`#Date (on|this|next|last|during)? [sun]`,group:0,tag:`WeekDay`,reason:`1pm-sun`},{match:`(in|by|before|during|on|until|after|of|within|all) [sat]`,group:0,tag:`WeekDay`,reason:`sat`},{match:`(in|by|before|during|on|until|after|of|within|all) [wed]`,group:0,tag:`WeekDay`,reason:`wed`},{match:`(in|by|before|during|on|until|after|of|within|all) [march]`,group:0,tag:`Month`,reason:`march`},{match:`[sat] #Date`,group:0,tag:`WeekDay`,reason:`sat-feb`},{match:`#Preposition [(march|may)]`,group:0,tag:`Month`,reason:`in-month`},{match:`(this|next|last) (march|may) !#Infinitive?`,tag:`#Date #Month`,reason:`this-month`},{match:`(march|may) the? #Value`,tag:`#Month #Date #Date`,reason:`march-5th`},{match:`#Value of? (march|may)`,tag:`#Date #Date #Month`,reason:`5th-of-march`},{match:`[(march|may)] .? #Date`,group:0,tag:`Month`,reason:`march-and-feb`},{match:`#Date .? [(march|may)]`,group:0,tag:`Month`,reason:`feb-and-march`},{match:`#Adverb [(march|may)]`,group:0,tag:`Verb`,reason:`quickly-march`},{match:`[(march|may)] #Adverb`,group:0,tag:`Verb`,reason:`march-quickly`},{match:`#Value (am|pm)`,tag:`Time`,reason:`2-am`}],Yf=[{match:`(the|any) [more]`,group:0,tag:`Singular`,reason:`more-noun`},{match:`[more] #Noun`,group:0,tag:`Adjective`,reason:`more-noun`},{match:`(right|rights) of .`,tag:`Noun`,reason:`right-of`},{match:`a [bit]`,group:0,tag:`Singular`,reason:`bit-2`},{match:`a [must]`,group:0,tag:`Singular`,reason:`must-2`},{match:`(we|us) [all]`,group:0,tag:`Noun`,reason:`we all`},{match:`due to [#Verb]`,group:0,tag:`Noun`,reason:`due-to`},{match:`some [#Verb] #Plural`,group:0,tag:`Noun`,reason:`determiner6`},{match:`#Possessive #Ordinal [#PastTense]`,group:0,tag:`Noun`,reason:`first-thought`},{match:`(the|this|those|these) #Adjective [%Verb|Noun%]`,group:0,tag:`Noun`,notIf:`#Copula`,reason:`the-adj-verb`},{match:`(the|this|those|these) #Adverb #Adjective [#Verb]`,group:0,tag:`Noun`,reason:`determiner4`},{match:`the [#Verb] #Preposition .`,group:0,tag:`Noun`,reason:`determiner1`},{match:`(a|an|the) [#Verb] of`,group:0,tag:`Noun`,reason:`the-verb-of`},{match:`#Determiner #Noun of [#Verb]`,group:0,tag:`Noun`,notIf:`#Gerund`,reason:`noun-of-noun`},{match:`#PastTense #Preposition [#PresentTense]`,group:0,notIf:`#Gerund`,tag:`Noun`,reason:`ended-in-ruins`},{match:`#Conjunction [u]`,group:0,tag:`Pronoun`,reason:`u-pronoun-2`},{match:`[u] #Verb`,group:0,tag:`Pronoun`,reason:`u-pronoun-1`},{match:`#Determiner [(western|eastern|northern|southern|central)] #Noun`,group:0,tag:`Noun`,reason:`western-line`},{match:`(#Singular && @hasHyphen) #PresentTense`,tag:`Noun`,reason:`hyphen-verb`},{match:`is no [#Verb]`,group:0,tag:`Noun`,reason:`is-no-verb`},{match:`do [so]`,group:0,tag:`Noun`,reason:`so-noun`},{match:`#Determiner [(shit|damn|hell)]`,group:0,tag:`Noun`,reason:`swears-noun`},{match:`to [(shit|hell)]`,group:0,tag:`Noun`,reason:`to-swears`},{match:`(the|these) [#Singular] (were|are)`,group:0,tag:`Plural`,reason:`singular-were`},{match:`a #Noun+ or #Adverb+? [#Verb]`,group:0,tag:`Noun`,reason:`noun-or-noun`},{match:`(the|those|these|a|an) #Adjective? [#PresentTense #Particle?]`,group:0,tag:`Noun`,notIf:`(seem|appear|include|#Gerund|#Copula)`,reason:`det-inf`},{match:`#Noun #Actor`,tag:`Actor`,notIf:`(#Person|#Pronoun)`,reason:`thing-doer`},{match:`#Gerund #Actor`,tag:`Actor`,reason:`gerund-doer`},{match:`co #Singular`,tag:`Actor`,reason:`co-noun`},{match:`[#Noun+] #Actor`,group:0,tag:`Actor`,notIf:`(#Honorific|#Pronoun|#Possessive)`,reason:`air-traffic-controller`},{match:`(urban|cardiac|cardiovascular|respiratory|medical|clinical|visual|graphic|creative|dental|exotic|fine|certified|registered|technical|virtual|professional|amateur|junior|senior|special|pharmaceutical|theoretical)+ #Noun? #Actor`,tag:`Actor`,reason:`fine-artist`},{match:`#Noun+ (coach|chef|king|engineer|fellow|personality|boy|girl|man|woman|master)`,tag:`Actor`,reason:`dance-coach`},{match:`chief . officer`,tag:`Actor`,reason:`chief-x-officer`},{match:`chief of #Noun+`,tag:`Actor`,reason:`chief-of-police`},{match:`senior? vice? president of #Noun+`,tag:`Actor`,reason:`president-of`},{match:`#Determiner [sun]`,group:0,tag:`Singular`,reason:`the-sun`},{match:`#Verb (a|an) [#Value]$`,group:0,tag:`Singular`,reason:`did-a-value`},{match:`the [(can|will|may)]`,group:0,tag:`Singular`,reason:`the can`},{match:`#FirstName #Acronym? (#Possessive && #LastName)`,tag:`Possessive`,reason:`name-poss`},{match:`#Organization+ #Possessive`,tag:`Possessive`,reason:`org-possessive`},{match:`#Place+ #Possessive`,tag:`Possessive`,reason:`place-possessive`},{match:`#Possessive #PresentTense #Particle?`,notIf:`(#Gerund|her)`,tag:`Noun`,reason:`possessive-verb`},{match:`(my|our|their|her|his|its) [(#Plural && #Actor)] #Noun`,tag:`Possessive`,reason:`my-dads`},{match:`#Value of a [second]`,group:0,unTag:`Value`,tag:`Singular`,reason:`10th-of-a-second`},{match:`#Value [seconds]`,group:0,unTag:`Value`,tag:`Plural`,reason:`10-seconds`},{match:`in [#Infinitive]`,group:0,tag:`Singular`,reason:`in-age`},{match:`a [#Adjective] #Preposition`,group:0,tag:`Noun`,reason:`a-minor-in`},{match:`#Determiner [#Singular] said`,group:0,tag:`Actor`,reason:`the-actor-said`},{match:`#Determiner #Noun [(feel|sense|process|rush|side|bomb|bully|challenge|cover|crush|dump|exchange|flow|function|issue|lecture|limit|march|process)] !(#Preposition|to|#Adverb)?`,group:0,tag:`Noun`,reason:`the-noun-sense`},{match:`[#PresentTense] (of|by|for) (a|an|the) #Noun #Copula`,group:0,tag:`Plural`,reason:`photographs-of`},{match:`#Infinitive and [%Noun|Verb%]`,group:0,tag:`Infinitive`,reason:`fight and win`},{match:`#Noun and [#Verb] and #Noun`,group:0,tag:`Noun`,reason:`peace-and-flowers`},{match:`the #Cardinal [%Adj|Noun%]`,group:0,tag:`Noun`,reason:`the-1992-classic`},{match:`#Copula the [%Adj|Noun%] #Noun`,group:0,tag:`Adjective`,reason:`the-premier-university`},{match:`i #Verb [me] #Noun`,group:0,tag:`Possessive`,reason:`scottish-me`},{match:`[#PresentTense] (music|class|lesson|night|party|festival|league|ceremony)`,group:0,tag:`Noun`,reason:`dance-music`},{match:`[wit] (me|it)`,group:0,tag:`Presposition`,reason:`wit-me`},{match:`#PastTense #Possessive [#Verb]`,group:0,tag:`Noun`,notIf:`(saw|made)`,reason:`left-her-boots`},{match:`#Value [%Plural|Verb%]`,group:0,tag:`Plural`,notIf:`(one|1|a|an)`,reason:`35-signs`},{match:`had [#PresentTense]`,group:0,tag:`Noun`,notIf:`(#Gerund|come|become)`,reason:`had-time`},{match:`%Adj|Noun% %Noun|Verb%`,tag:`#Adjective #Noun`,notIf:`#ProperNoun #Noun`,reason:`instant-access`},{match:`#Determiner [%Adj|Noun%] #Conjunction`,group:0,tag:`Noun`,reason:`a-rep-to`},{match:`#Adjective #Noun [%Plural|Verb%]$`,group:0,tag:`Plural`,notIf:`#Pronoun`,reason:`near-death-experiences`},{match:`#Possessive #Noun [%Plural|Verb%]$`,group:0,tag:`Plural`,reason:`your-guild-colors`}],Xf=[{match:`(this|that|the|a|an) [#Gerund #Infinitive]`,group:0,tag:`Singular`,reason:`the-planning-process`},{match:`(that|the) [#Gerund #PresentTense]`,group:0,ifNo:`#Copula`,tag:`Plural`,reason:`the-paving-stones`},{match:`#Determiner [#Gerund] #Noun`,group:0,tag:`Adjective`,reason:`the-gerund-noun`},{match:`#Pronoun #Infinitive [#Gerund] #PresentTense`,group:0,tag:`Noun`,reason:`tipping-sucks`},{match:`#Adjective [#Gerund]`,group:0,tag:`Noun`,notIf:`(still|even|just)`,reason:`early-warning`},{match:`[#Gerund] #Adverb? not? #Copula`,group:0,tag:`Activity`,reason:`gerund-copula`},{match:`#Copula [(#Gerund|#Activity)] #Copula`,group:0,tag:`Gerund`,reason:`are-doing-is`},{match:`[#Gerund] #Modal`,group:0,tag:`Activity`,reason:`gerund-modal`},{match:`#Singular for [%Noun|Gerund%]`,group:0,tag:`Gerund`,reason:`noun-for-gerund`},{match:`#Comparative (for|at) [%Noun|Gerund%]`,group:0,tag:`Gerund`,reason:`better-for-gerund`},{match:`#PresentTense the [#Gerund]`,group:0,tag:`Noun`,reason:`keep-the-touching`}],Zf=[{match:`#Infinitive (this|that|the) [#Infinitive]`,group:0,tag:`Noun`,reason:`do-this-dance`},{match:`#Gerund #Determiner [#Infinitive]`,group:0,tag:`Noun`,reason:`running-a-show`},{match:`#Determiner (only|further|just|more|backward) [#Infinitive]`,group:0,tag:`Noun`,reason:`the-only-reason`},{match:`(the|this|a|an) [#Infinitive] #Adverb? #Verb`,group:0,tag:`Noun`,reason:`determiner5`},{match:`#Determiner #Adjective #Adjective? [#Infinitive]`,group:0,tag:`Noun`,reason:`a-nice-inf`},{match:`#Determiner #Demonym [#PresentTense]`,group:0,tag:`Noun`,reason:`mexican-train`},{match:`#Adjective #Noun+ [#Infinitive] #Copula`,group:0,tag:`Noun`,reason:`career-move`},{match:`at some [#Infinitive]`,group:0,tag:`Noun`,reason:`at-some-inf`},{match:`(go|goes|went) to [#Infinitive]`,group:0,tag:`Noun`,reason:`goes-to-verb`},{match:`(a|an) #Adjective? #Noun [#Infinitive] (#Preposition|#Noun)`,group:0,notIf:`from`,tag:`Noun`,reason:`a-noun-inf`},{match:`(a|an) #Noun [#Infinitive]$`,group:0,tag:`Noun`,reason:`a-noun-inf2`},{match:`#Gerund #Adjective? for [#Infinitive]`,group:0,tag:`Noun`,reason:`running-for`},{match:`about [#Infinitive]`,group:0,tag:`Singular`,reason:`about-love`},{match:`#Plural on [#Infinitive]`,group:0,tag:`Noun`,reason:`on-stage`},{match:`any [#Infinitive]`,group:0,tag:`Noun`,reason:`any-charge`},{match:`no [#Infinitive]`,group:0,tag:`Noun`,reason:`no-doubt`},{match:`number of [#PresentTense]`,group:0,tag:`Noun`,reason:`number-of-x`},{match:`(taught|teaches|learns|learned) [#PresentTense]`,group:0,tag:`Noun`,reason:`teaches-x`},{match:`(try|use|attempt|build|make) [#Verb #Particle?]`,notIf:`(#Copula|#Noun|sure|fun|up)`,group:0,tag:`Noun`,reason:`do-verb`},{match:`^[#Infinitive] (is|was)`,group:0,tag:`Noun`,reason:`checkmate-is`},{match:`#Infinitive much [#Infinitive]`,group:0,tag:`Noun`,reason:`get-much`},{match:`[cause] #Pronoun #Verb`,group:0,tag:`Conjunction`,reason:`cause-cuz`},{match:`the #Singular [#Infinitive] #Noun`,group:0,tag:`Noun`,notIf:`#Pronoun`,reason:`cardio-dance`},{match:`#Determiner #Modal [#Noun]`,group:0,tag:`PresentTense`,reason:`should-smoke`},{match:`this [#Plural]`,group:0,tag:`PresentTense`,notIf:`(#Preposition|#Date)`,reason:`this-verbs`},{match:`#Noun that [#Plural]`,group:0,tag:`PresentTense`,notIf:`(#Preposition|#Pronoun|way)`,reason:`voice-that-rocks`},{match:`that [#Plural] to`,group:0,tag:`PresentTense`,notIf:`#Preposition`,reason:`that-leads-to`},{match:`(let|make|made) (him|her|it|#Person|#Place|#Organization)+ [#Singular] (a|an|the|it)`,group:0,tag:`Infinitive`,reason:`let-him-glue`},{match:`#Verb (all|every|each|most|some|no) [#PresentTense]`,notIf:`#Modal`,group:0,tag:`Noun`,reason:`all-presentTense`},{match:`(had|have|#PastTense) #Adjective [#PresentTense]`,group:0,tag:`Noun`,notIf:`better`,reason:`adj-presentTense`},{match:`#Value #Adjective [#PresentTense]`,group:0,tag:`Noun`,notIf:`#Copula`,reason:`one-big-reason`},{match:`#PastTense #Adjective+ [#PresentTense]`,group:0,tag:`Noun`,notIf:`(#Copula|better)`,reason:`won-wide-support`},{match:`(many|few|several|couple) [#PresentTense]`,group:0,tag:`Noun`,notIf:`#Copula`,reason:`many-poses`},{match:`#Determiner #Adverb #Adjective [%Noun|Verb%]`,group:0,tag:`Noun`,notIf:`#Copula`,reason:`very-big-dream`},{match:`from #Noun to [%Noun|Verb%]`,group:0,tag:`Noun`,reason:`start-to-finish`},{match:`(for|with|of) #Noun (and|or|not) [%Noun|Verb%]`,group:0,tag:`Noun`,notIf:`#Pronoun`,reason:`for-food-and-gas`},{match:`#Adjective #Adjective [#PresentTense]`,group:0,tag:`Noun`,notIf:`#Copula`,reason:`adorable-little-store`},{match:`#Gerund #Adverb? #Comparative [#PresentTense]`,group:0,tag:`Noun`,notIf:`#Copula`,reason:`higher-costs`},{match:`(#Noun && @hasComma) #Noun (and|or) [#PresentTense]`,group:0,tag:`Noun`,notIf:`#Copula`,reason:`noun-list`},{match:`(many|any|some|several) [#PresentTense] for`,group:0,tag:`Noun`,reason:`any-verbs-for`},{match:`to #PresentTense #Noun [#PresentTense] #Preposition`,group:0,tag:`Noun`,reason:`gas-exchange`},{match:`#PastTense (until|as|through|without) [#PresentTense]`,group:0,tag:`Noun`,reason:`waited-until-release`},{match:`#Gerund like #Adjective? [#PresentTense]`,group:0,tag:`Plural`,reason:`like-hot-cakes`},{match:`some #Adjective [#PresentTense]`,group:0,tag:`Noun`,reason:`some-reason`},{match:`for some [#PresentTense]`,group:0,tag:`Noun`,reason:`for-some-reason`},{match:`(same|some|the|that|a) kind of [#PresentTense]`,group:0,tag:`Noun`,reason:`some-kind-of`},{match:`(same|some|the|that|a) type of [#PresentTense]`,group:0,tag:`Noun`,reason:`some-type-of`},{match:`#Gerund #Adjective #Preposition [#PresentTense]`,group:0,tag:`Noun`,reason:`doing-better-for-x`},{match:`(get|got|have) #Comparative [#PresentTense]`,group:0,tag:`Noun`,reason:`got-better-aim`},{match:`whose [#PresentTense] #Copula`,group:0,tag:`Noun`,reason:`whos-name-was`},{match:`#PhrasalVerb #Particle #Preposition [#PresentTense]`,group:0,tag:`Noun`,reason:`given-up-on-x`},{match:`there (are|were) #Adjective? [#PresentTense]`,group:0,tag:`Plural`,reason:`there-are`},{match:`#Value [#PresentTense] of`,group:0,notIf:`(one|1|#Copula|#Infinitive)`,tag:`Plural`,reason:`2-trains`},{match:`[#PresentTense] (are|were) #Adjective`,group:0,tag:`Plural`,reason:`compromises-are-possible`},{match:`^[(hope|guess|thought|think)] #Pronoun #Verb`,group:0,tag:`Infinitive`,reason:`suppose-i`},{match:`#Possessive #Adjective [#Verb]`,group:0,tag:`Noun`,notIf:`#Copula`,reason:`our-full-support`},{match:`[(tastes|smells)] #Adverb? #Adjective`,group:0,tag:`PresentTense`,reason:`tastes-good`},{match:`#Copula #Gerund [#PresentTense] !by?`,group:0,tag:`Noun`,notIf:`going`,reason:`ignoring-commute`},{match:`#Determiner #Adjective? [(shed|thought|rose|bid|saw|spelt)]`,group:0,tag:`Noun`,reason:`noun-past`},{match:`how to [%Noun|Verb%]`,group:0,tag:`Infinitive`,reason:`how-to-noun`},{match:`which [%Noun|Verb%] #Noun`,group:0,tag:`Infinitive`,reason:`which-boost-it`},{match:`#Gerund [%Plural|Verb%]`,group:0,tag:`Plural`,reason:`asking-questions`},{match:`(ready|available|difficult|hard|easy|made|attempt|try) to [%Noun|Verb%]`,group:0,tag:`Infinitive`,reason:`ready-to-noun`},{match:`(bring|went|go|drive|run|bike) to [%Noun|Verb%]`,group:0,tag:`Noun`,reason:`bring-to-noun`},{match:`#Modal #Noun [%Noun|Verb%]`,group:0,tag:`Infinitive`,reason:`would-you-look`},{match:`#Copula just [#Infinitive]`,group:0,tag:`Noun`,reason:`is-just-spam`},{match:`^%Noun|Verb% %Plural|Verb%`,tag:`Imperative #Plural`,reason:`request-copies`},{match:`#Adjective #Plural and [%Plural|Verb%]`,group:0,tag:`#Plural`,reason:`pickles-and-drinks`},{match:`#Determiner #Year [#Verb]`,group:0,tag:`Noun`,reason:`the-1968-film`},{match:`#Determiner [#PhrasalVerb #Particle]`,group:0,tag:`Noun`,reason:`the-break-up`},{match:`#Determiner [%Adj|Noun%] #Noun`,group:0,tag:`Adjective`,notIf:`(#Pronoun|#Possessive|#ProperNoun)`,reason:`the-individual-goals`},{match:`[%Noun|Verb%] or #Infinitive`,group:0,tag:`Infinitive`,reason:`work-or-prepare`},{match:`to #Infinitive [#PresentTense]`,group:0,tag:`Noun`,notIf:`(#Gerund|#Copula|help)`,reason:`to-give-thanks`},{match:`[#Noun] me`,group:0,tag:`Verb`,reason:`kills-me`},{match:`%Plural|Verb% %Plural|Verb%`,tag:`#PresentTense #Plural`,reason:`removes-wrinkles`}],Qf=[{match:`#Money and #Money #Currency?`,tag:`Money`,reason:`money-and-money`},{match:`#Value #Currency [and] #Value (cents|ore|centavos|sens)`,group:0,tag:`money`,reason:`and-5-cents`},{match:`#Value (mark|rand|won|rub|ore)`,tag:`#Money #Currency`,reason:`4-mark`},{match:`a pound`,tag:`#Money #Unit`,reason:`a-pound`},{match:`#Value (pound|pounds)`,tag:`#Money #Unit`,reason:`4-pounds`}],$f=[{match:`[(half|quarter)] of? (a|an)`,group:0,tag:`Fraction`,reason:`millionth`},{match:`#Adverb [half]`,group:0,tag:`Fraction`,reason:`nearly-half`},{match:`[half] the`,group:0,tag:`Fraction`,reason:`half-the`},{match:`#Cardinal and a half`,tag:`Fraction`,reason:`and-a-half`},{match:`#Value (halves|halfs|quarters)`,tag:`Fraction`,reason:`two-halves`},{match:`a #Ordinal`,tag:`Fraction`,reason:`a-quarter`},{match:`[#Cardinal+] (#Fraction && /s$/)`,tag:`Fraction`,reason:`seven-fifths`},{match:`[#Cardinal+ #Ordinal] of .`,group:0,tag:`Fraction`,reason:`ordinal-of`},{match:`[(#NumericValue && #Ordinal)] of .`,group:0,tag:`Fraction`,reason:`num-ordinal-of`},{match:`(a|one) #Cardinal?+ #Ordinal`,tag:`Fraction`,reason:`a-ordinal`},{match:`#Cardinal+ out? of every? #Cardinal`,tag:`Fraction`,reason:`out-of`}],ep=[{match:`#Cardinal [second]`,tag:`Unit`,reason:`one-second`},{match:`!once? [(a|an)] (#Duration|hundred|thousand|million|billion|trillion)`,group:0,tag:`Value`,reason:`a-is-one`},{match:`1 #Value #PhoneNumber`,tag:`PhoneNumber`,reason:`1-800-Value`},{match:`#NumericValue #PhoneNumber`,tag:`PhoneNumber`,reason:`(800) PhoneNumber`},{match:`#Demonym #Currency`,tag:`Currency`,reason:`demonym-currency`},{match:`#Value [(buck|bucks|grand)]`,group:0,tag:`Currency`,reason:`value-bucks`},{match:`[#Value+] #Currency`,group:0,tag:`Money`,reason:`15 usd`},{match:`[second] #Noun`,group:0,tag:`Ordinal`,reason:`second-noun`},{match:`#Value+ [#Currency]`,group:0,tag:`Unit`,reason:`5-yan`},{match:`#Value [(foot|feet)]`,group:0,tag:`Unit`,reason:`foot-unit`},{match:`#Value [#Abbreviation]`,group:0,tag:`Unit`,reason:`value-abbr`},{match:`#Value [k]`,group:0,tag:`Unit`,reason:`value-k`},{match:`#Unit an hour`,tag:`Unit`,reason:`unit-an-hour`},{match:`(minus|negative) #Value`,tag:`Value`,reason:`minus-value`},{match:`#Value (point|decimal) #Value`,tag:`Value`,reason:`value-point-value`},{match:`#Determiner [(half|quarter)] #Ordinal`,group:0,tag:`Value`,reason:`half-ordinal`},{match:`#Multiple+ and #Value`,tag:`Value`,reason:`magnitude-and-value`},{match:`#Value #Unit [(per|an) (hr|hour|sec|second|min|minute)]`,group:0,tag:`Unit`,reason:`12-miles-per-second`},{match:`#Value [(square|cubic)] #Unit`,group:0,tag:`Unit`,reason:`square-miles`}],tp=[{match:`#Copula [(#Noun|#PresentTense)] #LastName`,group:0,tag:`FirstName`,reason:`copula-noun-lastname`},{match:`(sister|pope|brother|father|aunt|uncle|grandpa|grandfather|grandma) #ProperNoun`,tag:`Person`,reason:`lady-titlecase`,safe:!0},{match:`#FirstName [#Determiner #Noun] #LastName`,group:0,tag:`Person`,reason:`first-noun-last`},{match:`#ProperNoun (b|c|d|e|f|g|h|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z) #ProperNoun`,tag:`Person`,reason:`titlecase-acronym-titlecase`,safe:!0},{match:`#Acronym #LastName`,tag:`Person`,reason:`acronym-lastname`,safe:!0},{match:`#Person (jr|sr|md)`,tag:`Person`,reason:`person-honorific`},{match:`#Honorific #Acronym`,tag:`Person`,reason:`Honorific-TitleCase`},{match:`#Person #Person the? #RomanNumeral`,tag:`Person`,reason:`roman-numeral`},{match:`#FirstName [/^[^aiurck]$/]`,group:0,tag:[`Acronym`,`Person`],reason:`john-e`},{match:`#Noun van der? #Noun`,tag:`Person`,reason:`van der noun`,safe:!0},{match:`(king|queen|prince|saint|lady) of #Noun`,tag:`Person`,reason:`king-of-noun`,safe:!0},{match:`(prince|lady) #Place`,tag:`Person`,reason:`lady-place`},{match:`(king|queen|prince|saint) #ProperNoun`,tag:`Person`,notIf:`#Place`,reason:`saint-foo`},{match:`al (#Person|#ProperNoun)`,tag:`Person`,reason:`al-borlen`,safe:!0},{match:`#FirstName de #Noun`,tag:`Person`,reason:`bill-de-noun`},{match:`#FirstName (bin|al) #Noun`,tag:`Person`,reason:`bill-al-noun`},{match:`#FirstName #Acronym #ProperNoun`,tag:`Person`,reason:`bill-acronym-title`},{match:`#FirstName #FirstName #ProperNoun`,tag:`Person`,reason:`bill-firstname-title`},{match:`#Honorific #FirstName? #ProperNoun`,tag:`Person`,reason:`dr-john-Title`},{match:`#FirstName the #Adjective`,tag:`Person`,reason:`name-the-great`},{match:`#ProperNoun (van|al|bin) #ProperNoun`,tag:`Person`,reason:`title-van-title`,safe:!0},{match:`#ProperNoun (de|du) la? #ProperNoun`,tag:`Person`,notIf:`#Place`,reason:`title-de-title`},{match:`#Singular #Acronym #LastName`,tag:`#FirstName #Person .`,reason:`title-acro-noun`,safe:!0},{match:`[#ProperNoun] #Person`,group:0,tag:`Person`,reason:`proper-person`,safe:!0},{match:`#Person [#ProperNoun #ProperNoun]`,group:0,tag:`Person`,notIf:`#Possessive`,reason:`three-name-person`,safe:!0},{match:`#FirstName #Acronym? [#ProperNoun]`,group:0,tag:`LastName`,notIf:`#Possessive`,reason:`firstname-titlecase`},{match:`#FirstName [#FirstName]`,group:0,tag:`LastName`,reason:`firstname-firstname`},{match:`#FirstName #Acronym #Noun`,tag:`Person`,reason:`n-acro-noun`,safe:!0},{match:`#FirstName [(de|di|du|van|von)] #Person`,group:0,tag:`LastName`,reason:`de-firstname`},{match:`[(lieutenant|corporal|sergeant|captain|qeen|king|admiral|major|colonel|marshal|president|queen|king)+] #ProperNoun`,group:0,tag:`Honorific`,reason:`seargeant-john`},{match:`[(private|general|major|rear|prime|field|count|miss)] #Honorific? #Person`,group:0,tag:[`Honorific`,`Person`],reason:`ambg-honorifics`},{match:`#Honorific #FirstName [#Singular]`,group:0,tag:`LastName`,notIf:`#Possessive`,reason:`dr-john-foo`,safe:!0},{match:`[(his|her) (majesty|honour|worship|excellency|honorable)] #Person`,group:0,tag:`Honorific`,reason:`his-excellency`},{match:`#Honorific #Actor`,tag:`Honorific`,reason:`Lieutenant colonel`},{match:`(first|second|third|1st|2nd|3rd) #Actor`,tag:`Honorific`,reason:`first lady`},{match:`#Person #RomanNumeral`,tag:`Person`,reason:`louis-IV`}],np=[{match:`#FirstName #Noun$`,tag:`. #LastName`,notIf:`(#Possessive|#Organization|#Place|#Pronoun|@hasTitleCase)`,reason:`firstname-noun`},{match:`%Person|Date% #Acronym? #ProperNoun`,tag:`Person`,reason:`jan-thierson`},{match:`%Person|Noun% #Acronym? #ProperNoun`,tag:`Person`,reason:`switch-person`,safe:!0},{match:`%Person|Noun% #Organization`,tag:`Organization`,reason:`olive-garden`},{match:`%Person|Verb% #Acronym? #ProperNoun`,tag:`Person`,reason:`verb-propernoun`,ifNo:`#Actor`},{match:`[%Person|Verb%] (will|had|has|said|says|told|did|learned|wants|wanted)`,group:0,tag:`Person`,reason:`person-said`},{match:`[%Person|Place%] (harbor|harbour|pier|town|city|place|dump|landfill)`,group:0,tag:`Place`,reason:`sydney-harbour`},{match:`(west|east|north|south) [%Person|Place%]`,group:0,tag:`Place`,reason:`east-sydney`},{match:`#Modal [%Person|Verb%]`,group:0,tag:`Verb`,reason:`would-mark`},{match:`#Adverb [%Person|Verb%]`,group:0,tag:`Verb`,reason:`really-mark`},{match:`[%Person|Verb%] (#Adverb|#Comparative)`,group:0,tag:`Verb`,reason:`drew-closer`},{match:`%Person|Verb% #Person`,tag:`Person`,reason:`rob-smith`},{match:`%Person|Verb% #Acronym #ProperNoun`,tag:`Person`,reason:`rob-a-smith`},{match:`[will] #Verb`,group:0,tag:`Modal`,reason:`will-verb`},{match:`(will && @isTitleCase) #ProperNoun`,tag:`Person`,reason:`will-name`},{match:`(#FirstName && !#Possessive) [#Singular] #Verb`,group:0,safe:!0,tag:`LastName`,reason:`jack-layton`},{match:`^[#Singular] #Person #Verb`,group:0,safe:!0,tag:`Person`,reason:`sherwood-anderson`},{match:`(a|an) [#Person]$`,group:0,unTag:`Person`,reason:`a-warhol`}],rp=[{match:`#Copula (pretty|dead|full|well|sure) (#Adjective|#Noun)`,tag:`#Copula #Adverb #Adjective`,reason:`sometimes-adverb`},{match:`(#Pronoun|#Person) (had|#Adverb)? [better] #PresentTense`,group:0,tag:`Modal`,reason:`i-better`},{match:`(#Modal|i|they|we|do) not? [like]`,group:0,tag:`PresentTense`,reason:`modal-like`},{match:`#Noun #Adverb? [left]`,group:0,tag:`PastTense`,reason:`left-verb`},{match:`will #Adverb? not? #Adverb? [be] #Gerund`,group:0,tag:`Copula`,reason:`will-be-copula`},{match:`will #Adverb? not? #Adverb? [be] #Adjective`,group:0,tag:`Copula`,reason:`be-copula`},{match:`[march] (up|down|back|toward)`,notIf:`#Date`,group:0,tag:`Infinitive`,reason:`march-to`},{match:`#Modal [march]`,group:0,tag:`Infinitive`,reason:`must-march`},{match:`[may] be`,group:0,tag:`Verb`,reason:`may-be`},{match:`[(subject|subjects|subjected)] to`,group:0,tag:`Verb`,reason:`subject to`},{match:`[home] to`,group:0,tag:`PresentTense`,reason:`home to`},{match:`[open] #Determiner`,group:0,tag:`Infinitive`,reason:`open-the`},{match:`(were|was) being [#PresentTense]`,group:0,tag:`PastTense`,reason:`was-being`},{match:`(had|has|have) [been /en$/]`,group:0,tag:`Auxiliary Participle`,reason:`had-been-broken`},{match:`(had|has|have) [been /ed$/]`,group:0,tag:`Auxiliary PastTense`,reason:`had-been-smoked`},{match:`(had|has) #Adverb? [been] #Adverb? #PastTense`,group:0,tag:`Auxiliary`,reason:`had-been-adj`},{match:`(had|has) to [#Noun] (#Determiner|#Possessive)`,group:0,tag:`Infinitive`,reason:`had-to-noun`},{match:`have [#PresentTense]`,group:0,tag:`PastTense`,notIf:`(come|gotten)`,reason:`have-read`},{match:`(does|will|#Modal) that [work]`,group:0,tag:`PastTense`,reason:`does-that-work`},{match:`[(sound|sounds)] #Adjective`,group:0,tag:`PresentTense`,reason:`sounds-fun`},{match:`[(look|looks)] #Adjective`,group:0,tag:`PresentTense`,reason:`looks-good`},{match:`[(start|starts|stop|stops|begin|begins)] #Gerund`,group:0,tag:`Verb`,reason:`starts-thinking`},{match:`(have|had) read`,tag:`Modal #PastTense`,reason:`read-read`},{match:`(is|was|were) [(under|over) #PastTense]`,group:0,tag:`Adverb Adjective`,reason:`was-under-cooked`},{match:`[shit] (#Determiner|#Possessive|them)`,group:0,tag:`Verb`,reason:`swear1-verb`},{match:`[damn] (#Determiner|#Possessive|them)`,group:0,tag:`Verb`,reason:`swear2-verb`},{match:`[fuck] (#Determiner|#Possessive|them)`,group:0,tag:`Verb`,reason:`swear3-verb`},{match:`#Plural that %Noun|Verb%`,tag:`. #Preposition #Infinitive`,reason:`jobs-that-work`},{match:`[works] for me`,group:0,tag:`PresentTense`,reason:`works-for-me`},{match:`as #Pronoun [please]`,group:0,tag:`Infinitive`,reason:`as-we-please`},{match:`[(co|mis|de|inter|intra|pre|re|un|out|under|over|counter)] #Verb`,group:0,tag:[`Verb`,`Prefix`],notIf:`(#Copula|#PhrasalVerb)`,reason:`co-write`},{match:`#PastTense and [%Adj|Past%]`,group:0,tag:`PastTense`,reason:`dressed-and-left`},{match:`[%Adj|Past%] and #PastTense`,group:0,tag:`PastTense`,reason:`dressed-and-left`},{match:`#Copula #Pronoun [%Adj|Past%]`,group:0,tag:`Adjective`,reason:`is-he-stoked`},{match:`to [%Noun|Verb%] #Preposition`,group:0,tag:`Infinitive`,reason:`to-dream-of`}],ip=[{match:`will (#Adverb|not)+? [have] (#Adverb|not)+? #Verb`,group:0,tag:`Auxiliary`,reason:`will-have-vb`},{match:`[#Copula] (#Adverb|not)+? (#Gerund|#PastTense)`,group:0,tag:`Auxiliary`,reason:`copula-walking`},{match:`[(#Modal|did)+] (#Adverb|not)+? #Verb`,group:0,tag:`Auxiliary`,reason:`modal-verb`},{match:`#Modal (#Adverb|not)+? [have] (#Adverb|not)+? [had] (#Adverb|not)+? #Verb`,group:0,tag:`Auxiliary`,reason:`would-have`},{match:`[(has|had)] (#Adverb|not)+? #PastTense`,group:0,tag:`Auxiliary`,reason:`had-walked`},{match:`[(do|does|did|will|have|had|has|got)] (not|#Adverb)+? #Verb`,group:0,tag:`Auxiliary`,reason:`have-had`},{match:`[about to] #Adverb? #Verb`,group:0,tag:[`Auxiliary`,`Verb`],reason:`about-to`},{match:`#Modal (#Adverb|not)+? [be] (#Adverb|not)+? #Verb`,group:0,tag:`Auxiliary`,reason:`would-be`},{match:`[(#Modal|had|has)] (#Adverb|not)+? [been] (#Adverb|not)+? #Verb`,group:0,tag:`Auxiliary`,reason:`had-been`},{match:`[(be|being|been)] #Participle`,group:0,tag:`Auxiliary`,reason:`being-driven`},{match:`[may] #Adverb? #Infinitive`,group:0,tag:`Auxiliary`,reason:`may-want`},{match:`#Copula (#Adverb|not)+? [(be|being|been)] #Adverb+? #PastTense`,group:0,tag:`Auxiliary`,reason:`being-walked`},{match:`will [be] #PastTense`,group:0,tag:`Auxiliary`,reason:`will-be-x`},{match:`[(be|been)] (#Adverb|not)+? #Gerund`,group:0,tag:`Auxiliary`,reason:`been-walking`},{match:`[used to] #PresentTense`,group:0,tag:`Auxiliary`,reason:`used-to-walk`},{match:`#Copula (#Adverb|not)+? [going to] #Adverb+? #PresentTense`,group:0,tag:`Auxiliary`,reason:`going-to-walk`},{match:`#Imperative [(me|him|her)]`,group:0,tag:`Reflexive`,reason:`tell-him`},{match:`(is|was) #Adverb? [no]`,group:0,tag:`Negative`,reason:`is-no`},{match:`[(been|had|became|came)] #PastTense`,group:0,notIf:`#PhrasalVerb`,tag:`Auxiliary`,reason:`been-told`},{match:`[(being|having|getting)] #Verb`,group:0,tag:`Auxiliary`,reason:`being-born`},{match:`[be] #Gerund`,group:0,tag:`Auxiliary`,reason:`be-walking`},{match:`[better] #PresentTense`,group:0,tag:`Modal`,notIf:`(#Copula|#Gerund)`,reason:`better-go`},{match:`even better`,tag:`Adverb #Comparative`,reason:`even-better`}],ap=[{match:`(#Verb && @hasHyphen) up`,tag:`PhrasalVerb`,reason:`foo-up`},{match:`(#Verb && @hasHyphen) off`,tag:`PhrasalVerb`,reason:`foo-off`},{match:`(#Verb && @hasHyphen) over`,tag:`PhrasalVerb`,reason:`foo-over`},{match:`(#Verb && @hasHyphen) out`,tag:`PhrasalVerb`,reason:`foo-out`},{match:`[#Verb (in|out|up|down|off|back)] (on|in)`,notIf:`#Copula`,tag:`PhrasalVerb Particle`,reason:`walk-in-on`},{match:`(lived|went|crept|go) [on] for`,group:0,tag:`PhrasalVerb`,reason:`went-on`},{match:`#Verb (up|down|in|on|for)$`,tag:`PhrasalVerb #Particle`,notIf:`#PhrasalVerb`,reason:`come-down$`},{match:`help [(stop|end|make|start)]`,group:0,tag:`Infinitive`,reason:`help-stop`},{match:`#PhrasalVerb (in && #Particle) #Determiner`,tag:`#Verb #Preposition #Determiner`,unTag:`PhrasalVerb`,reason:`work-in-the`},{match:`[(stop|start|finish|help)] #Gerund`,group:0,tag:`Infinitive`,reason:`start-listening`},{match:`#Verb (him|her|it|us|himself|herself|itself|everything|something) [(up|down)]`,group:0,tag:`Adverb`,reason:`phrasal-pronoun-advb`}],op=`(i|we|they)`,sp=[{match:`^do not? [#Infinitive #Particle?]`,notIf:op,group:0,tag:`Imperative`,reason:`do-eat`},{match:`^please do? not? [#Infinitive #Particle?]`,group:0,tag:`Imperative`,reason:`please-go`},{match:`^just do? not? [#Infinitive #Particle?]`,group:0,tag:`Imperative`,reason:`just-go`},{match:`^[#Infinitive] it #Comparative`,notIf:op,group:0,tag:`Imperative`,reason:`do-it-better`},{match:`^[#Infinitive] it (please|now|again|plz)`,notIf:op,group:0,tag:`Imperative`,reason:`do-it-please`},{match:`^[#Infinitive] (#Adjective|#Adverb)$`,group:0,tag:`Imperative`,notIf:`(so|such|rather|enough)`,reason:`go-quickly`},{match:`^[#Infinitive] (up|down|over) #Determiner`,group:0,tag:`Imperative`,reason:`turn-down`},{match:`^[#Infinitive] (your|my|the|a|an|any|each|every|some|more|with|on)`,group:0,notIf:`like`,tag:`Imperative`,reason:`eat-my-shorts`},{match:`^[#Infinitive] (him|her|it|us|me|there)`,group:0,tag:`Imperative`,reason:`tell-him`},{match:`^[#Infinitive] #Adjective #Noun$`,group:0,tag:`Imperative`,reason:`avoid-loud-noises`},{match:`^[#Infinitive] (#Adjective|#Adverb)? and #Infinitive`,group:0,tag:`Imperative`,reason:`call-and-reserve`},{match:`^(go|stop|wait|hurry) please?$`,tag:`Imperative`,reason:`go`},{match:`^(somebody|everybody) [#Infinitive]`,group:0,tag:`Imperative`,reason:`somebody-call`},{match:`^let (us|me) [#Infinitive]`,group:0,tag:`Imperative`,reason:`lets-leave`},{match:`^[(shut|close|open|start|stop|end|keep)] #Determiner #Noun`,group:0,tag:`Imperative`,reason:`shut-the-door`},{match:`^[#PhrasalVerb #Particle] #Determiner #Noun`,group:0,tag:`Imperative`,reason:`turn-off-the-light`},{match:`^[go] to .`,group:0,tag:`Imperative`,reason:`go-to-toronto`},{match:`^#Modal you [#Infinitive]`,group:0,tag:`Imperative`,reason:`would-you-`},{match:`^never [#Infinitive]`,group:0,tag:`Imperative`,reason:`never-stop`},{match:`^come #Infinitive`,tag:`Imperative`,notIf:`on`,reason:`come-have`},{match:`^come and? #Infinitive`,tag:`Imperative . Imperative`,notIf:`#PhrasalVerb`,reason:`come-and-have`},{match:`^stay (out|away|back)`,tag:`Imperative`,reason:`stay-away`},{match:`^[(stay|be|keep)] #Adjective`,group:0,tag:`Imperative`,reason:`stay-cool`},{match:`^[keep it] #Adjective`,group:0,tag:`Imperative`,reason:`keep-it-cool`},{match:`^do not [#Infinitive]`,group:0,tag:`Imperative`,reason:`do-not-be`},{match:`[#Infinitive] (yourself|yourselves)`,group:0,tag:`Imperative`,reason:`allow-yourself`},{match:`[#Infinitive] what .`,group:0,tag:`Imperative`,reason:`look-what`},{match:`^[#Infinitive] #Gerund`,group:0,tag:`Imperative`,reason:`keep-playing`},{match:`^[#Infinitive] (to|for|into|toward|here|there)`,group:0,tag:`Imperative`,reason:`go-to`},{match:`^[#Infinitive] (and|or) #Infinitive`,group:0,tag:`Imperative`,reason:`inf-and-inf`},{match:`^[%Noun|Verb%] to`,group:0,tag:`Imperative`,reason:`commit-to`},{match:`^[#Infinitive] #Adjective? #Singular #Singular`,group:0,tag:`Imperative`,reason:`maintain-eye-contact`},{match:`do not (forget|omit|neglect) to [#Infinitive]`,group:0,tag:`Imperative`,reason:`do-not-forget`},{match:`^[(ask|wear|pay|look|help|show|watch|act|fix|kill|stop|start|turn|try|win)] #Noun`,group:0,tag:`Imperative`,reason:`pay-attention`}],cp={two:{matches:[{match:`(got|were|was|is|are|am) (#PastTense|#Participle)`,tag:`Passive`,reason:`got-walked`},{match:`(was|were|is|are|am) being (#PastTense|#Participle)`,tag:`Passive`,reason:`was-being`},{match:`(had|have|has) been (#PastTense|#Participle)`,tag:`Passive`,reason:`had-been`},{match:`will be being? (#PastTense|#Participle)`,tag:`Passive`,reason:`will-be-cleaned`},{match:`#Noun [(#PastTense|#Participle)] by (the|a) #Noun`,group:0,tag:`Passive`,reason:`suffered-by`}].concat(zf,Hf,Uf,Wf,Kf,Jf,qf,Yf,Xf,Zf,Qf,$f,ep,tp,np,rp,Gf,ip,ap,sp,[{match:`(that|which) were [%Adj|Gerund%]`,group:0,tag:`Gerund`,reason:`that-were-growing`},{match:`#Gerund [#Gerund] #Plural`,group:0,tag:`Adjective`,reason:`hard-working-fam`}],[{match:`u r`,tag:`#Pronoun #Copula`,reason:`u r`},{match:`#Noun [(who|whom)]`,group:0,tag:`Determiner`,reason:`captain-who`},{match:`[had] #Noun+ #PastTense`,group:0,tag:`Condition`,reason:`had-he`},{match:`[were] #Noun+ to #Infinitive`,group:0,tag:`Condition`,reason:`were-he`},{match:`some sort of`,tag:`Adjective Noun Conjunction`,reason:`some-sort-of`},{match:`of some sort`,tag:`Conjunction Adjective Noun`,reason:`of-some-sort`},{match:`[such] (a|an|is)? #Noun`,group:0,tag:`Determiner`,reason:`such-skill`},{match:`[right] (before|after|in|into|to|toward)`,group:0,tag:`#Adverb`,reason:`right-into`},{match:`#Preposition [about]`,group:0,tag:`Adjective`,reason:`at-about`},{match:`(are|#Modal|see|do|for) [ya]`,group:0,tag:`Pronoun`,reason:`are-ya`},{match:`[long live] .`,group:0,tag:`#Adjective #Infinitive`,reason:`long-live`},{match:`[plenty] of`,group:0,tag:`#Uncountable`,reason:`plenty-of`},{match:`(always|nearly|barely|practically) [there]`,group:0,tag:`Adjective`,reason:`always-there`},{match:`[there] (#Adverb|#Pronoun)? #Copula`,group:0,tag:`There`,reason:`there-is`},{match:`#Copula [there] .`,group:0,tag:`There`,reason:`is-there`},{match:`#Modal #Adverb? [there]`,group:0,tag:`There`,reason:`should-there`},{match:`^[do] (you|we|they)`,group:0,tag:`QuestionWord`,reason:`do-you`},{match:`^[does] (he|she|it|#ProperNoun)`,group:0,tag:`QuestionWord`,reason:`does-he`},{match:`#Determiner #Noun+ [who] #Verb`,group:0,tag:`Preposition`,reason:`the-x-who`},{match:`#Determiner #Noun+ [which] #Verb`,group:0,tag:`Preposition`,reason:`the-x-which`},{match:`a [while]`,group:0,tag:`Noun`,reason:`a-while`},{match:`guess who`,tag:`#Infinitive #QuestionWord`,reason:`guess-who`},{match:`[fucking] !#Verb`,group:0,tag:`#Gerund`,reason:`f-as-gerund`}],[{match:`university of #Place`,tag:`Organization`,reason:`university-of-Foo`},{match:`#Noun (&|n) #Noun`,tag:`Organization`,reason:`Noun-&-Noun`},{match:`#Organization of the? #ProperNoun`,tag:`Organization`,reason:`org-of-place`,safe:!0},{match:`#Organization #Country`,tag:`Organization`,reason:`org-country`},{match:`#ProperNoun #Organization`,tag:`Organization`,notIf:`#FirstName`,reason:`titlecase-org`},{match:`#ProperNoun (ltd|co|inc|dept|assn|bros)`,tag:`Organization`,reason:`org-abbrv`},{match:`the [#Acronym]`,group:0,tag:`Organization`,reason:`the-acronym`,safe:!0},{match:`government of the? [#Place+]`,tag:`Organization`,reason:`government-of-x`},{match:`(health|school|commerce) board`,tag:`Organization`,reason:`school-board`},{match:`(nominating|special|conference|executive|steering|central|congressional) committee`,tag:`Organization`,reason:`special-comittee`},{match:`(world|global|international|national|#Demonym) #Organization`,tag:`Organization`,reason:`global-org`},{match:`#Noun+ (public|private) school`,tag:`School`,reason:`noun-public-school`},{match:`#Place+ #SportsTeam`,tag:`SportsTeam`,reason:`place-sportsteam`},{match:`(dc|atlanta|minnesota|manchester|newcastle|sheffield) united`,tag:`SportsTeam`,reason:`united-sportsteam`},{match:`#Place+ fc`,tag:`SportsTeam`,reason:`fc-sportsteam`},{match:`#Place+ #Noun{0,2} (club|society|group|team|committee|commission|association|guild|crew)`,tag:`Organization`,reason:`place-noun-society`}],[{match:`(west|north|south|east|western|northern|southern|eastern)+ #Place`,tag:`Region`,reason:`west-norfolk`},{match:`#City [(al|ak|az|ar|ca|ct|dc|fl|ga|id|il|nv|nh|nj|ny|oh|pa|sc|tn|tx|ut|vt|pr)]`,group:0,tag:`Region`,reason:`us-state`},{match:`portland [or]`,group:0,tag:`Region`,reason:`portland-or`},{match:`#ProperNoun+ (cliff|place|range|pit|place|point|room|grounds|ruins)`,tag:`Place`,reason:`foo-point`},{match:`in [#ProperNoun] #Place`,group:0,tag:`Place`,reason:`propernoun-place`},{match:`#Value #Noun (st|street|rd|road|crescent|cr|way|tr|terrace|avenue|ave)`,tag:`Address`,reason:`address-st`},{match:`(port|mount|mt) #ProperName`,tag:`Place`,reason:`port-name`}],[{match:`[so] #Noun`,group:0,tag:`Conjunction`,reason:`so-conj`},{match:`[(who|what|where|why|how|when)] #Noun #Copula #Adverb? (#Verb|#Adjective)`,group:0,tag:`Conjunction`,reason:`how-he-is-x`},{match:`#Copula [(who|what|where|why|how|when)] #Noun`,group:0,tag:`Conjunction`,reason:`when-he`},{match:`#Verb [that] #Pronoun`,group:0,tag:`Conjunction`,reason:`said-that-he`},{match:`#Noun [that] #Copula`,group:0,tag:`Conjunction`,reason:`that-are`},{match:`#Noun [that] #Verb #Adjective`,group:0,tag:`Conjunction`,reason:`that-seem`},{match:`#Noun #Copula not? [that] #Adjective`,group:0,tag:`Adverb`,reason:`that-adj`},{match:`#Verb #Adverb? #Noun [(that|which)]`,group:0,tag:`Preposition`,reason:`that-prep`},{match:`@hasComma [which] (#Pronoun|#Verb)`,group:0,tag:`Preposition`,reason:`which-copula`},{match:`#Noun [like] #Noun`,group:0,tag:`Preposition`,reason:`noun-like`},{match:`^[like] #Determiner`,group:0,tag:`Preposition`,reason:`like-the`},{match:`a #Noun [like] (#Noun|#Determiner)`,group:0,tag:`Preposition`,reason:`a-noun-like`},{match:`#Adverb [like]`,group:0,tag:`Verb`,reason:`really-like`},{match:`(not|nothing|never) [like]`,group:0,tag:`Preposition`,reason:`nothing-like`},{match:`#Infinitive #Pronoun [like]`,group:0,tag:`Preposition`,reason:`treat-them-like`},{match:`[#QuestionWord] (#Pronoun|#Determiner)`,group:0,tag:`Preposition`,reason:`how-he`},{match:`[#QuestionWord] #Participle`,group:0,tag:`Preposition`,reason:`when-stolen`},{match:`[how] (#Determiner|#Copula|#Modal|#PastTense)`,group:0,tag:`QuestionWord`,reason:`how-is`},{match:`#Plural [(who|which|when)] .`,group:0,tag:`Preposition`,reason:`people-who`}],[{match:`holy (shit|fuck|hell)`,tag:`Expression`,reason:`swears-expression`},{match:`^[(well|so|okay|now)] !#Adjective?`,group:0,tag:`Expression`,reason:`well-`},{match:`^come on`,tag:`Expression`,reason:`come-on`},{match:`(say|says|said) [sorry]`,group:0,tag:`Expression`,reason:`say-sorry`},{match:`^(ok|alright|shoot|hell|anyways)`,tag:`Expression`,reason:`ok-`},{match:`^(say && @hasComma)`,tag:`Expression`,reason:`say-`},{match:`^(like && @hasComma)`,tag:`Expression`,reason:`like-`},{match:`^[(dude|man|girl)] #Pronoun`,group:0,tag:`Expression`,reason:`dude-i`}])}},lp=null,up={postTagger:function(e){let{world:t}=e,{model:n,methods:r}=t;lp||=r.one.buildNet(n.two.matches,t);let i=r.two.quickSplit(e.document).map(e=>{let t=e[0];return[t.index[0],t.index[1],t.index[1]+e.length]}),a=e.update(i);return a.cache(),a.sweep(lp),e.uncache(),e.unfreeze(),e},tagger:e=>e.compute([`freeze`,`lexicon`,`preTagger`,`postTagger`,`unfreeze`])},dp=e=>Math.round(e*100)/100;function fp(e){e.prototype.confidence=function(){let e=0,t=0;return this.docs.forEach(n=>{n.forEach(n=>{t+=1,e+=n.confidence||1})}),t===0?1:dp(e/t)},e.prototype.tagger=function(){return this.compute([`tagger`])}}var pp={api:fp,compute:up,model:cp,hooks:[`postTagger`]},mp=function(e){return Object.keys(e.hooks).filter(e=>!e.startsWith(`#`)&&!e.startsWith(`%`))},hp=function(e,t){let n=mp(t);if(n.length===0)return e;e._cache||e.cache();let r=e._cache;return e.filter((e,t)=>n.some(e=>r[t].has(e)))},gp={lib:{lazy:function(e,t){let n=t;typeof t==`string`&&(n=this.buildNet([{match:t}]));let r=this.tokenize(e),i=hp(r,n);return i.found?(i.compute([`index`,`tagger`]),i.match(t)):r.none()}}},_p=function(e,t){let n=e.methods.two.transform.verb.conjugate,r=n(t,e.model);return e.has(`#Gerund`)?r.Gerund:e.has(`#PastTense`)?r.PastTense:e.has(`#PresentTense`)?r.PresentTense:e.has(`#Gerund`)?r.Gerund:t},vp=function(e,t){let n=t;return e.forEach(e=>{e.has(`#Infinitive`)||(n=_p(e,t)),e.replaceWith(n)}),e},yp=function(e,t){let n=t;if(e.has(`#Plural`)){let r=e.methods.two.transform.noun.toPlural;n=r(t,e.model)}e.replaceWith(n,{possessives:!0})},bp=function(e,t){let{toAdverb:n}=e.methods.two.transform.adjective,r=n(t);r&&e.replaceWith(r)},xp=function(e,t){let{toComparative:n,toSuperlative:r}=e.methods.two.transform.adjective,i=t;e.has(`#Comparative`)?i=n(i,e.model):e.has(`#Superlative`)&&(i=r(i,e.model)),i&&e.replaceWith(i)},Sp=function(e,t,n){let r=e.split(/ /g).map(e=>e.toLowerCase().trim());r=r.filter(e=>e),r=r.map(e=>`{${e}}`).join(` `);let i=this.match(r);return n&&(i=i.if(n)),i.has(`#Verb`)?vp(i,t):i.has(`#Noun`)?yp(i,t):i.has(`#Adverb`)?bp(i,t):i.has(`#Adjective`)?xp(i,t):this};xs.plugin(sf),xs.plugin(Rf),xs.plugin(pp),xs.plugin(gp),xs.plugin({api:function(e){e.prototype.swap=Sp}});var Cp=xs,wp=function(e){let{fromComparative:t,fromSuperlative:n}=e.methods.two.transform.adjective,r=e.text(`normal`);return e.has(`#Comparative`)?t(r,e.model):e.has(`#Superlative`)?n(r,e.model):r},Tp={api:function(e){class t extends e{constructor(e,t,n){super(e,t,n),this.viewType=`Adjectives`}json(e={}){let{toAdverb:t,toNoun:n,toSuperlative:r,toComparative:i}=this.methods.two.transform.adjective;return e.normal=!0,this.map(a=>{let o=a.toView().json(e)[0]||{},s=wp(a);return o.adjective={adverb:t(s,this.model),noun:n(s,this.model),superlative:r(s,this.model),comparative:i(s,this.model)},o},[])}adverbs(){return this.before(`#Adverb+$`).concat(this.after(`^#Adverb+`))}conjugate(e){let{toComparative:t,toSuperlative:n,toNoun:r,toAdverb:i}=this.methods.two.transform.adjective;return this.getNth(e).map(e=>{let a=wp(e);return{Adjective:a,Comparative:t(a,this.model),Superlative:n(a,this.model),Noun:r(a,this.model),Adverb:i(a,this.model)}},[])}toComparative(e){let{toComparative:t}=this.methods.two.transform.adjective;return this.getNth(e).map(e=>{let n=t(wp(e),this.model);return e.replaceWith(n)})}toSuperlative(e){let{toSuperlative:t}=this.methods.two.transform.adjective;return this.getNth(e).map(e=>{let n=t(wp(e),this.model);return e.replaceWith(n)})}toAdverb(e){let{toAdverb:t}=this.methods.two.transform.adjective;return this.getNth(e).map(e=>{let n=t(wp(e),this.model);return e.replaceWith(n)})}toNoun(e){let{toNoun:t}=this.methods.two.transform.adjective;return this.getNth(e).map(e=>{let n=t(wp(e),this.model);return e.replaceWith(n)})}}e.prototype.adjectives=function(e){let n=this.match(`#Adjective`);return n=n.getNth(e),new t(n.document,n.pointer)},e.prototype.superlatives=function(e){let n=this.match(`#Superlative`);return n=n.getNth(e),new t(n.document,n.pointer)},e.prototype.comparatives=function(e){let n=this.match(`#Comparative`);return n=n.getNth(e),new t(n.document,n.pointer)}}},Ep=function(e){return e.compute(`root`).text(`root`)},Dp={api:function(e){class t extends e{constructor(e,t,n){super(e,t,n),this.viewType=`Adverbs`}conjugate(e){return this.getNth(e).map(e=>{let t=Ep(e);return{Adverb:e.text(`normal`),Adjective:t}},[])}json(e={}){let t=this.methods.two.transform.adjective.fromAdverb;return e.normal=!0,this.map(n=>{let r=n.toView().json(e)[0]||{};return r.adverb={adjective:t(r.normal)},r},[])}}e.prototype.adverbs=function(e){let n=this.match(`#Adverb`);return n=n.getNth(e),new t(n.document,n.pointer)}}},Op=function(e){let t=e.match(`@hasComma`);return t=t.filter(e=>{if(e.growLeft(`.`).wordCount()===1||e.growRight(`. .`).wordCount()===1)return!1;let t=e.grow(`.`);return t=t.ifNo(`@hasComma @hasComma`),t=t.ifNo(`@hasComma (and|or) .`),t=t.ifNo(`(#City && @hasComma) #Country`),t=t.ifNo(`(#WeekDay && @hasComma) #Date`),t=t.ifNo(`(#Date+ && @hasComma) #Value`),t=t.ifNo(`(#Adjective && @hasComma) #Adjective`),t.found}),e.splitAfter(t)},kp=function(e){let t=e.parentheses();return t=t.filter(e=>e.wordCount()>=3&&e.has(`#Verb`)&&e.has(`#Noun`)),e.splitOn(t)},Ap=function(e){let t=e.quotations();return t=t.filter(e=>e.wordCount()>=3&&e.has(`#Verb`)&&e.has(`#Noun`)),e.splitOn(t)},jp=function(e){let t=this;t=kp(t),t=Ap(t),t=Op(t),t=t.splitAfter(`(@hasEllipses|@hasSemicolon|@hasDash|@hasColon)`),t=t.splitAfter(`^#Pronoun (said|says)`),t=t.splitBefore(`(said|says) #ProperNoun$`),t=t.splitBefore(`. . if .{4}`),t=t.splitBefore(`and while`),t=t.splitBefore(`now that`),t=t.splitBefore(`ever since`),t=t.splitBefore(`(supposing|although)`),t=t.splitBefore(`even (while|if|though)`),t=t.splitBefore(`(whereas|whose)`),t=t.splitBefore(`as (though|if)`),t=t.splitBefore(`(til|until)`);let n=t.match(`#Verb .* [but] .* #Verb`,0);n.found&&(t=t.splitBefore(n));let r=t.if(`if .{2,9} then .`).match(`then`);return t=t.splitBefore(r),typeof e==`number`&&(t=t.get(e)),t},Mp=function(e){let t=[],n=null;return e.clauses().docs.forEach(e=>{e.forEach(e=>{!e.chunk||e.chunk!==n?(n=e.chunk,t.push([e.index[0],e.index[1],e.index[1]+1])):t[t.length-1][2]=e.index[1]+1}),n=null}),e.update(t)},Np=function(e){class t extends e{constructor(e,t,n){super(e,t,n),this.viewType=`Chunks`}isVerb(){return this.filter(e=>e.has(`<Verb>`))}isNoun(){return this.filter(e=>e.has(`<Noun>`))}isAdjective(){return this.filter(e=>e.has(`<Adjective>`))}isPivot(){return this.filter(e=>e.has(`<Pivot>`))}debug(){return this.toView().debug(`chunks`),this}update(e){let n=new t(this.document,e);return n._cache=this._cache,n}}e.prototype.chunks=function(e){let n=Mp(this);return n=n.getNth(e),new t(this.document,n.pointer)},e.prototype.clauses=jp},Pp={this:`Noun`,then:`Pivot`},Fp=function(e){for(let t=0;t<e.length;t+=1)for(let n=0;n<e[t].length;n+=1){let r=e[t][n];if(Pp.hasOwnProperty(r.normal)===!0){r.chunk=Pp[r.normal];continue}if(r.tags.has(`Verb`)){r.chunk=`Verb`;continue}if(r.tags.has(`Noun`)||r.tags.has(`Determiner`)){r.chunk=`Noun`;continue}if(r.tags.has(`Value`)){r.chunk=`Noun`;continue}if(r.tags.has(`QuestionWord`)){r.chunk=`Pivot`;continue}}},Ip=function(e){for(let t=0;t<e.length;t+=1)for(let n=0;n<e[t].length;n+=1){let r=e[t][n];if(r.chunk)continue;let i=e[t][n+1],a=e[t][n-1];if(r.tags.has(`Adjective`)){if(a&&a.tags.has(`Copula`)){r.chunk=`Adjective`;continue}if(a&&a.tags.has(`Determiner`)){r.chunk=`Noun`;continue}if(i&&i.tags.has(`Noun`)){r.chunk=`Noun`;continue}continue}if(r.tags.has(`Adverb`)||r.tags.has(`Negative`)){if(a&&a.tags.has(`Adjective`)){r.chunk=`Adjective`;continue}if(a&&a.tags.has(`Verb`)){r.chunk=`Verb`;continue}if(i&&i.tags.has(`Adjective`)){r.chunk=`Adjective`;continue}if(i&&i.tags.has(`Verb`)){r.chunk=`Verb`;continue}}}},Lp=[{match:`[that] #Determiner #Noun`,group:0,chunk:`Pivot`},{match:`#PastTense [that]`,group:0,chunk:`Pivot`},{match:`[so] #Determiner`,group:0,chunk:`Pivot`},{match:`#Copula #Adverb+? [#Adjective]`,group:0,chunk:`Adjective`},{match:`#Adjective and #Adjective`,chunk:`Adjective`},{match:`#Adverb+ and #Adverb #Verb`,chunk:`Verb`},{match:`#Gerund #Adjective$`,chunk:`Verb`},{match:`#Gerund to #Verb`,chunk:`Verb`},{match:`#PresentTense and #PresentTense`,chunk:`Verb`},{match:`#Adverb #Negative`,chunk:`Verb`},{match:`(want|wants|wanted) to #Infinitive`,chunk:`Verb`},{match:`#Verb #Reflexive`,chunk:`Verb`},{match:`#Verb [to] #Adverb? #Infinitive`,group:0,chunk:`Verb`},{match:`[#Preposition] #Gerund`,group:0,chunk:`Verb`},{match:`#Infinitive [that] <Noun>`,group:0,chunk:`Verb`},{match:`#Noun of #Determiner? #Noun`,chunk:`Noun`},{match:`#Value+ #Adverb? #Adjective`,chunk:`Noun`},{match:`the [#Adjective] #Noun`,chunk:`Noun`},{match:`#Singular in #Determiner? #Singular`,chunk:`Noun`},{match:`#Plural [in] #Determiner? #Noun`,group:0,chunk:`Pivot`},{match:`#Noun and #Determiner? #Noun`,notIf:`(#Possessive|#Pronoun)`,chunk:`Noun`}],Rp=null,zp=function(e,t,n){let{methods:r}=n;Rp||=r.one.buildNet(Lp,n),e.sweep(Rp)},Bp=function(e,t){if((typeof process>`u`||!process.env?self.env||{}:process.env).DEBUG_CHUNKS){let n=(e.normal+`'`).padEnd(8);console.log(` | '${n} → \x1b[34m${t.padEnd(12)}\x1b[0m \x1b[2m -fallback- \x1b[0m`)}e.chunk=t},Vp=function(e){for(let t=0;t<e.length;t+=1)for(let n=0;n<e[t].length;n+=1){let r=e[t][n];r.chunk===void 0&&(r.tags.has(`Conjunction`)||r.tags.has(`Preposition`)?Bp(r,`Pivot`):r.tags.has(`Adverb`)?Bp(r,`Verb`):r.chunk=`Noun`)}},Hp=function(e){let t=[],n=null;e.forEach(e=>{for(let r=0;r<e.length;r+=1){let i=e[r];n&&i.chunk===n?t[t.length-1].terms.push(i):(t.push({chunk:i.chunk,terms:[i]}),n=i.chunk)}}),t.forEach(e=>{e.chunk===`Verb`&&(e.terms.find(e=>e.tags.has(`Verb`))||e.terms.forEach(e=>e.chunk=null))})},Up={compute:{chunks:function(e){let{document:t,world:n}=e;Fp(t),Ip(t),zp(e,t,n),Vp(t,n),Hp(t,n)}},api:Np,hooks:[`chunks`]},Wp=/\./g,Gp=function(e){class t extends e{constructor(e,t,n){super(e,t,n),this.viewType=`Acronyms`}strip(){return this.docs.forEach(e=>{e.forEach(e=>{e.text=e.text.replace(Wp,``),e.normal=e.normal.replace(Wp,``)})}),this}addPeriods(){return this.docs.forEach(e=>{e.forEach(e=>{e.text=e.text.replace(Wp,``),e.normal=e.normal.replace(Wp,``),e.text=e.text.split(``).join(`.`)+`.`,e.normal=e.normal.split(``).join(`.`)+`.`})}),this}}e.prototype.acronyms=function(e){let n=this.match(`#Acronym`);return n=n.getNth(e),new t(n.document,n.pointer)}},Kp=/\(/,qp=/\)/,Jp=function(e,t){for(;t<e.length;t+=1)if(e[t].post&&qp.test(e[t].post)){let[,n]=e[t].index;return n||=0,n}return null},Yp=function(e){let t=[];return e.docs.forEach(e=>{for(let n=0;n<e.length;n+=1){let r=e[n];if(r.pre&&Kp.test(r.pre)){let r=Jp(e,n);if(r!==null){let[i,a]=e[n].index;t.push([i,a,r+1,e[n].id]),n=r}}}}),e.update(t)},Xp=function(e){return e.docs.forEach(e=>{e[0].pre=e[0].pre.replace(Kp,``);let t=e[e.length-1];t.post=t.post.replace(qp,``)}),e},Zp=function(e){class t extends e{constructor(e,t,n){super(e,t,n),this.viewType=`Possessives`}strip(){return Xp(this)}}e.prototype.parentheses=function(e){let n=Yp(this);return n=n.getNth(e),new t(n.document,n.pointer)}},Qp=/'s$/,$p=function(e){let t=e.match(`#Possessive+`);return t.has(`#Person`)&&(t=t.growLeft(`#Person+`)),t.has(`#Place`)&&(t=t.growLeft(`#Place+`)),t.has(`#Organization`)&&(t=t.growLeft(`#Organization+`)),t},em=function(e){class t extends e{constructor(e,t,n){super(e,t,n),this.viewType=`Possessives`}strip(){return this.docs.forEach(e=>{e.forEach(e=>{e.text=e.text.replace(Qp,``),e.normal=e.normal.replace(Qp,``)})}),this}}e.prototype.possessives=function(e){let n=$p(this);return n=n.getNth(e),new t(n.document,n.pointer)}},tm={'"':`"`,""":`"`,"'":`'`,"“":`”`,"‘":`’`,"‟":`”`,"‛":`’`,"„":`”`,"⹂":`”`,"‚":`’`,"«":`»`,"‹":`›`,"‵":`′`,"‶":`″`,"‷":`‴`,"〝":`〞`,"`":`´`,"〟":`〞`},nm=RegExp(`[`+Object.keys(tm).join(``)+`]`),rm=RegExp(`[`+Object.values(tm).join(``)+`]`),im=function(e,t){let n=e[t].pre.match(nm)[0]||``;if(!n||!tm[n])return null;let r=tm[n];for(;t<e.length;t+=1)if(e[t].post&&e[t].post.match(r))return t;return null},am=function(e){let t=[];return e.docs.forEach(e=>{for(let n=0;n<e.length;n+=1){let r=e[n];if(r.pre&&nm.test(r.pre)){let r=im(e,n);if(r!==null){let[i,a]=e[n].index;t.push([i,a,r+1,e[n].id]),n=r}}}}),e.update(t)},om=function(e){e.docs.forEach(e=>{e[0].pre=e[0].pre.replace(nm,``);let t=e[e.length-1];t.post=t.post.replace(rm,``)})},sm=function(e){class t extends e{constructor(e,t,n){super(e,t,n),this.viewType=`Possessives`}strip(){return om(this)}}e.prototype.quotations=function(e){let n=am(this);return n=n.getNth(e),new t(n.document,n.pointer)}},cm=function(e){let t=this.splitAfter(`@hasComma`);return t=t.match(`#PhoneNumber+`),t=t.getNth(e),t},lm=[[`hyphenated`,`@hasHyphen .`],[`hashTags`,`#HashTag`],[`emails`,`#Email`],[`emoji`,`#Emoji`],[`emoticons`,`#Emoticon`],[`atMentions`,`#AtMention`],[`urls`,`#Url`],[`conjunctions`,`#Conjunction`],[`prepositions`,`#Preposition`],[`abbreviations`,`#Abbreviation`],[`honorifics`,`#Honorific`]],um=[[`emojis`,`emoji`],[`atmentions`,`atMentions`]],dm=function(e){lm.forEach(t=>{e.prototype[t[0]]=function(e){let n=this.match(t[1]);return typeof e==`number`?n.get(e):n}}),e.prototype.phoneNumbers=cm,um.forEach(t=>{e.prototype[t[0]]=e.prototype[t[1]]})},fm=/\//,pm=function(e){class t extends e{constructor(e,t,n){super(e,t,n),this.viewType=`Slashes`}split(){return this.map(e=>{let t=e.text().split(fm);return e=e.replaceWith(t.join(` `)),e.growRight(`(`+t.join(`|`)+`)+`)})}}e.prototype.slashes=function(e){let n=this.match(`#SlashedTerm`);return n=n.getNth(e),new t(n.document,n.pointer)}},mm={api:function(e){Gp(e),Zp(e),em(e),sm(e),dm(e),pm(e)}},hm=function(e,t){e.docs.forEach(e=>{e.forEach(t)})},gm={case:e=>{hm(e,e=>{e.text=e.text.toLowerCase()})},unicode:e=>{let t=e.world,n=t.methods.one.killUnicode;hm(e,e=>e.text=n(e.text,t))},whitespace:e=>{hm(e,e=>{e.post=e.post.replace(/\s+/g,` `),e.post=e.post.replace(/\s([.,?!:;])/g,`$1`),e.pre=e.pre.replace(/\s+/g,``)})},punctuation:e=>{hm(e,e=>{e.post=e.post.replace(/[–—-]/g,` `),e.post=e.post.replace(/[,:;]/g,``),e.post=e.post.replace(/\.{2,}/g,``),e.post=e.post.replace(/\?{2,}/g,`?`),e.post=e.post.replace(/!{2,}/g,`!`),e.post=e.post.replace(/\?!+/g,`?`)});let t=e.docs,n=t[t.length-1];if(n&&n.length>0){let e=n[n.length-1];e.post=e.post.replace(/ /g,``)}},contractions:e=>{e.contractions().expand()},acronyms:e=>{e.acronyms().strip()},parentheses:e=>{e.parentheses().strip()},possessives:e=>{e.possessives().strip()},quotations:e=>{e.quotations().strip()},emoji:e=>{e.emojis().remove()},honorifics:e=>{e.match(`#Honorific+ #Person`).honorifics().remove()},adverbs:e=>{e.adverbs().remove()},nouns:e=>{e.nouns().toSingular()},verbs:e=>{e.verbs().toInfinitive()},numbers:e=>{e.numbers().toNumber()},debullet:e=>{let t=/^\s*([-–—*•])\s*$/;return e.docs.forEach(e=>{t.test(e[0].pre)&&(e[0].pre=e[0].pre.replace(t,``))}),e}},_m=e=>e.split(`|`).reduce((e,t)=>(e[t]=!0,e),{}),vm=`unicode|punctuation|whitespace|acronyms`,ym=`|case|contractions|parentheses|quotations|emoji|honorifics|debullet`,bm={light:_m(vm),medium:_m(vm+ym),heavy:_m(vm+ym+`|possessives|adverbs|nouns|verbs`)};function xm(e){e.prototype.normalize=function(e=`light`){return typeof e==`string`&&(e=bm[e]),Object.keys(e).forEach(t=>{gm.hasOwnProperty(t)&&gm[t](this,e[t])}),this}}var Sm={api:xm},Cm=function(e){let t=e.clauses().match(`<Noun>`),n=t.match(`@hasComma`);return n=n.not(`#Place`),n.found&&(t=t.splitAfter(n)),t=t.splitOn(`#Expression`),t=t.splitOn(`(he|she|we|you|they|i)`),t=t.splitOn(`(#Noun|#Adjective) [(he|him|she|it)]`,0),t=t.splitOn(`[(he|him|she|it)] (#Determiner|#Value)`,0),t=t.splitBefore(`#Noun [(the|a|an)] #Adjective? #Noun`,0),t=t.splitOn(`[(here|there)] #Noun`,0),t=t.splitOn(`[#Noun] (here|there)`,0),t=t.splitBefore(`(our|my|their|your)`),t=t.splitOn(`#Noun [#Determiner]`,0),t=t.if(`#Noun`),t},wm=`after.although.as if.as long as.as.because.before.even if.even though.ever since.if.in order that.provided that.since.so that.than.that.though.unless.until.what.whatever.when.whenever.where.whereas.wherever.whether.which.whichever.who.whoever.whom.whomever.whose`.split(`.`),Tm=function(e){if(e.before(`#Preposition$`).found)return!0;if(!e.before().found)return!1;for(let t=0;t<wm.length;t+=1)if(e.has(wm[t]))return!0;return!1},Em=`(#Pronoun|#Place|#Value|#Person|#Uncountable|#Month|#WeekDay|#Holiday|#Possessive)`,Dm=function(e,t){if(e.has(`#Plural`)||e.has(`#Noun and #Noun`)||e.has(`(we|they)`))return!0;if(t.has(Em)===!0||e.has(`#Singular`))return!1;let n=t.text(`normal`);return n.length>3&&n.endsWith(`s`)&&!n.endsWith(`ss`)},Om=function(e){let t=e.clone();return t=t.match(`#Noun+`),t=t.remove(`(#Adjective|#Preposition|#Determiner|#Value)`),t=t.not(`#Possessive`),t=t.first(),t.found?t:e},km=function(e){let t=Om(e);return{determiner:e.match(`#Determiner`).eq(0),adjectives:e.match(`#Adjective`),number:e.values(),isPlural:Dm(e,t),isSubordinate:Tm(e),root:t}},Am=e=>e.text(),jm=e=>e.json({terms:!1,normal:!0}).map(e=>e.normal),Mm=function(e){if(!e.found)return null;let t=e.values(0);return t.found?(t.parse()[0]||{}).num:null},Nm=function(e){let t=km(e);return{root:Am(t.root),number:Mm(t.number),determiner:Am(t.determiner),adjectives:jm(t.adjectives),isPlural:t.isPlural,isSubordinate:t.isSubordinate}},Pm=function(e){return!e.has(`^(#Uncountable|#ProperNoun|#Place|#Pronoun|#Acronym)+$`)},Fm={tags:!0},Im=function(e,t){if(t.isPlural===!0||(t.root.has(`#Possessive`)&&(t.root=t.root.possessives().strip()),!Pm(t.root)))return e;let{methods:n,model:r}=e.world,{toPlural:i}=n.two.transform.noun,a=i(t.root.text({keepPunct:!1}),r);e.match(t.root).replaceWith(a,Fm).tag(`Plural`,`toPlural`),t.determiner.has(`(a|an)`)&&e.remove(t.determiner);let o=t.root.after(`not? #Adverb+? [#Copula]`,0);return o.found&&(o.has(`is`)?e.replace(o,`are`):o.has(`was`)&&e.replace(o,`were`)),e},Lm={tags:!0},Rm=function(e,t){if(t.isPlural===!1)return e;let{methods:n,model:r}=e.world,{toSingular:i}=n.two.transform.noun,a=i(t.root.text(`normal`),r);return e.replace(t.root,a,Lm).tag(`Singular`,`toPlural`),e},zm={api:function(e){class t extends e{constructor(e,t,n){super(e,t,n),this.viewType=`Nouns`}parse(e){return this.getNth(e).map(km)}json(e){let t=typeof e==`object`?e:{};return this.getNth(e).map(e=>{let n=e.toView().json(t)[0]||{};return t&&t.noun!==!1&&(n.noun=Nm(e)),n},[])}conjugate(e){let t=this.world.methods.two.transform.noun;return this.getNth(e).map(e=>{let n=km(e),r=n.root.compute(`root`).text(`root`),i={Singular:r};return Pm(n.root)&&(i.Plural=t.toPlural(r,this.model)),i.Singular===i.Plural&&delete i.Plural,i},[])}isPlural(e){return this.filter(e=>km(e).isPlural).getNth(e)}isSingular(e){return this.filter(e=>!km(e).isPlural).getNth(e)}adjectives(e){let t=this.update([]);return this.forEach(e=>{let n=km(e).adjectives;n.found&&(t=t.concat(n))}),t.getNth(e)}toPlural(e){return this.getNth(e).map(e=>Im(e,km(e)))}toSingular(e){return this.getNth(e).map(e=>Rm(e,km(e)))}update(e){let n=new t(this.document,e);return n._cache=this._cache,n}}e.prototype.nouns=function(e){let n=Cm(this);return n=n.getNth(e),new t(this.document,n.pointer)}}},Bm=function(e,t){let n=e.match(`#Fraction+`);return n=n.filter(e=>!e.lookBehind(`#Value and$`).found),n=n.notIf(`#Value seconds`),typeof t==`number`&&(n=n.eq(t)),n},Vm=e=>{let t=[{reg:/^(minus|negative)[\s-]/i,mult:-1},{reg:/^(a\s)?half[\s-](of\s)?/i,mult:.5}];for(let n=0;n<t.length;n++)if(t[n].reg.test(e)===!0)return{amount:t[n].mult,str:e.replace(t[n].reg,``)};return{amount:1,str:e}},Hm={ones:{zeroth:0,first:1,second:2,third:3,fourth:4,fifth:5,sixth:6,seventh:7,eighth:8,ninth:9,zero:0,one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9},teens:{tenth:10,eleventh:11,twelfth:12,thirteenth:13,fourteenth:14,fifteenth:15,sixteenth:16,seventeenth:17,eighteenth:18,nineteenth:19,ten:10,eleven:11,twelve:12,thirteen:13,fourteen:14,fifteen:15,sixteen:16,seventeen:17,eighteen:18,nineteen:19},tens:{twentieth:20,thirtieth:30,fortieth:40,fourtieth:40,fiftieth:50,sixtieth:60,seventieth:70,eightieth:80,ninetieth:90,twenty:20,thirty:30,forty:40,fourty:40,fifty:50,sixty:60,seventy:70,eighty:80,ninety:90},multiples:{hundredth:100,thousandth:1e3,millionth:1e6,billionth:1e9,trillionth:0xe8d4a51000,quadrillionth:0x38d7ea4c68000,quintillionth:0xde0b6b3a7640000,sextillionth:1e21,septillionth:1e24,hundred:100,thousand:1e3,million:1e6,billion:1e9,trillion:0xe8d4a51000,quadrillion:0x38d7ea4c68000,quintillion:0xde0b6b3a7640000,sextillion:1e21,septillion:1e24,grand:1e3}},Um=(e,t)=>{if(Hm.ones.hasOwnProperty(e)){if(t.ones||t.teens)return!1}else if(Hm.teens.hasOwnProperty(e)){if(t.ones||t.teens||t.tens)return!1}else if(Hm.tens.hasOwnProperty(e)&&(t.ones||t.teens||t.tens))return!1;return!0},Wm=function(e){let t=`0.`;for(let n=0;n<e.length;n++){let r=e[n];if(Hm.ones.hasOwnProperty(r)===!0)t+=Hm.ones[r];else if(Hm.teens.hasOwnProperty(r)===!0)t+=Hm.teens[r];else if(Hm.tens.hasOwnProperty(r)===!0)t+=Hm.tens[r];else if(/^[0-9]$/.test(r)===!0)t+=r;else return 0}return parseFloat(t)},Gm=e=>(e=e.replace(/1st$/,`1`),e=e.replace(/2nd$/,`2`),e=e.replace(/3rd$/,`3`),e=e.replace(/([4567890])r?th$/,`$1`),e=e.replace(/^[$€¥£¢]/,``),e=e.replace(/[%$€¥£¢]$/,``),e=e.replace(/,/g,``),e=e.replace(/([0-9])([a-z\u00C0-\u00FF]{1,2})$/,`$1`),e),Km=/^([0-9,. ]+)\/([0-9,. ]+)$/,qm={"a few":3,"a couple":2,"a dozen":12,"two dozen":24,zero:0},Jm=e=>Object.keys(e).reduce((t,n)=>(t+=e[n],t),0),Ym=function(e){if(qm.hasOwnProperty(e)===!0)return qm[e];if(e===`a`||e===`an`)return 1;let t=Vm(e);e=t.str;let n=null,r={},i=0,a=!1,o=e.split(/[ -]/);for(let e=0;e<o.length;e++){let s=o[e];if(s=Gm(s),!s||s===`and`)continue;if(s===`-`||s===`negative`){a=!0;continue}if(s.charAt(0)===`-`&&(a=!0,s=s.substring(1)),s===`point`)return i+=Jm(r),i+=Wm(o.slice(e+1,o.length)),i*=t.amount,i;let c=s.match(Km);if(c){let e=parseFloat(c[1].replace(/[, ]/g,``)),t=parseFloat(c[2].replace(/[, ]/g,``));t&&(i+=e/t||0);continue}if(Hm.tens.hasOwnProperty(s)&&r.ones&&Object.keys(r).length===1&&(i=r.ones*100,r={}),Um(s,r)===!1)return null;if(/^[0-9.]+$/.test(s))r.ones=parseFloat(s);else if(Hm.ones.hasOwnProperty(s)===!0)r.ones=Hm.ones[s];else if(Hm.teens.hasOwnProperty(s)===!0)r.teens=Hm.teens[s];else if(Hm.tens.hasOwnProperty(s)===!0)r.tens=Hm.tens[s];else if(Hm.multiples.hasOwnProperty(s)===!0){let t=Hm.multiples[s];if(t===n)return null;if(t===100&&o[e+1]!==void 0){let n=o[e+1];Hm.multiples[n]&&(t*=Hm.multiples[n],e+=1)}n===null||t<n?(i+=(Jm(r)||1)*t,n=t,r={}):(i+=Jm(r),n=t,i=(i||1)*t,r={})}}return i+=Jm(r),i*=t.amount,i*=a?-1:1,i===0&&Object.keys(r).length===0?null:i},Xm=/s$/,Zm=function(e){return Ym(e.text(`reduced`))},Qm={half:2,halve:2,quarter:4},$m=function(e){let t=e.text(`reduced`).match(/^([-+]?[0-9]+)\/([-+]?[0-9]+)(st|nd|rd|th)?s?$/);return t&&t[1]&&t[0]?{numerator:Number(t[1]),denominator:Number(t[2])}:null},eh=function(e){let t=e.match(`[<num>#Value+] out of every? [<den>#Value+]`);if(t.found!==!0)return null;let{num:n,den:r}=t.groups();return!n||!r||(n=Zm(n),r=Zm(r),!n||!r)?null:typeof n==`number`&&typeof r==`number`?{numerator:n,denominator:r}:null},th=function(e){let t=e.match(`[<num>(#Cardinal|a)+] [<den>#Fraction+]`);if(t.found!==!0)return null;let{num:n,den:r}=t.groups();n=n.has(`a`)?1:Zm(n);let i=r.text(`reduced`);return Xm.test(i)&&(i=i.replace(Xm,``),r=r.replaceWith(i)),r=Qm.hasOwnProperty(i)?Qm[i]:Zm(r),typeof n==`number`&&typeof r==`number`?{numerator:n,denominator:r}:null},nh=function(e){let t=e.match(`^#Ordinal$`);return t.found===!0&&e.lookAhead(`^of .`)?{numerator:1,denominator:Zm(t)}:null},rh=function(e){let t=e.text(`reduced`);return Qm.hasOwnProperty(t)?{numerator:1,denominator:Qm[t]}:null},ih=e=>{let t=Math.round(e*1e3)/1e3;return t===0&&e!==0?e:t},ah=function(e){e=e.clone();let t=rh(e)||$m(e)||eh(e)||th(e)||nh(e)||null;return t!==null&&t.numerator&&t.denominator&&(t.decimal=t.numerator/t.denominator,t.decimal=ih(t.decimal)),t},oh=function(e){if(e<1e6)return String(e);let t;return t=typeof e==`number`?e.toFixed(0):e,t.indexOf(`e+`)===-1?t:t.replace(`.`,``).split(`e+`).reduce(function(e,t){return e+Array(t-e.length+2).join(0)})},sh=[[`ninety`,90],[`eighty`,80],[`seventy`,70],[`sixty`,60],[`fifty`,50],[`forty`,40],[`thirty`,30],[`twenty`,20]],ch=[``,`one`,`two`,`three`,`four`,`five`,`six`,`seven`,`eight`,`nine`,`ten`,`eleven`,`twelve`,`thirteen`,`fourteen`,`fifteen`,`sixteen`,`seventeen`,`eighteen`,`nineteen`],lh=[[1e24,`septillion`],[0x56bc75e2d63100000,`hundred sextillion`],[1e21,`sextillion`],[0x56bc75e2d63100000,`hundred quintillion`],[0xde0b6b3a7640000,`quintillion`],[0x16345785d8a0000,`hundred quadrillion`],[0x38d7ea4c68000,`quadrillion`],[0x5af3107a4000,`hundred trillion`],[0xe8d4a51000,`trillion`],[1e11,`hundred billion`],[1e9,`billion`],[1e8,`hundred million`],[1e6,`million`],[1e5,`hundred thousand`],[1e3,`thousand`],[100,`hundred`],[1,`one`]],uh=function(e){let t=e,n=[];return lh.forEach(r=>{if(e>=r[0]){let e=Math.floor(t/r[0]);t-=e*r[0],e&&n.push({unit:r[1],count:e})}}),n},dh=function(e){let t=[];if(e>100)return t;for(let n=0;n<sh.length;n++)e>=sh[n][1]&&(e-=sh[n][1],t.push(sh[n][0]));return ch[e]&&t.push(ch[e]),t},fh=e=>{let t=[`zero`,`one`,`two`,`three`,`four`,`five`,`six`,`seven`,`eight`,`nine`],n=[],r=oh(e).match(/\.([0-9]+)/);if(!r||!r[0])return n;n.push(`point`);let i=r[0].split(``);for(let e=0;e<i.length;e++)n.push(t[i[e]]);return n},ph=function(e){let t=e.num;if(t===0||t===`0`)return`zero`;t>1e21&&(t=oh(t));let n=[];t<0&&(n.push(`minus`),t=Math.abs(t));let r=uh(t);for(let e=0;e<r.length;e++){let t=r[e].unit;t===`one`&&(t=``,n.length>1&&n.push(`and`)),n=n.concat(dh(r[e].count)),n.push(t)}return n=n.concat(fh(t)),n=n.filter(e=>e),n.length===0&&(n[0]=``),n.join(` `)},mh=function(e){return!e.numerator||!e.denominator?``:`${ph({num:e.numerator})} out of ${ph({num:e.denominator})}`},hh={one:`first`,two:`second`,three:`third`,five:`fifth`,eight:`eighth`,nine:`ninth`,twelve:`twelfth`,twenty:`twentieth`,thirty:`thirtieth`,forty:`fortieth`,fourty:`fourtieth`,fifty:`fiftieth`,sixty:`sixtieth`,seventy:`seventieth`,eighty:`eightieth`,ninety:`ninetieth`},gh=e=>{let t=ph(e).split(` `),n=t[t.length-1];return hh.hasOwnProperty(n)?t[t.length-1]=hh[n]:t[t.length-1]=n.replace(/y$/,`i`)+`th`,t.join(` `)},_h=function(e){if(!e.numerator||!e.denominator)return``;let t=ph({num:e.numerator}),n=gh({num:e.denominator});return e.denominator===2&&(n=`half`),t&&n?(e.numerator!==1&&(n+=`s`),`${t} ${n}`):``},vh=function(e){class t extends e{constructor(e,t,n){super(e,t,n),this.viewType=`Fractions`}parse(e){return this.getNth(e).map(ah)}get(e){return this.getNth(e).map(ah)}json(e){return this.getNth(e).map(t=>{let n=t.toView().json(e)[0];return n.fraction=ah(t),n},[])}toDecimal(e){return this.getNth(e).forEach(e=>{let{decimal:t}=ah(e);e=e.replaceWith(String(t),!0),e.tag(`NumericValue`),e.unTag(`Fraction`)}),this}toFraction(e){return this.getNth(e).forEach(e=>{let t=ah(e);if(t&&typeof t.numerator==`number`&&typeof t.denominator==`number`){let n=`${t.numerator}/${t.denominator}`;this.replace(e,n)}}),this}toOrdinal(e){return this.getNth(e).forEach(e=>{let t=_h(ah(e));e.after(`^#Noun`).found&&(t+=` of`),e.replaceWith(t)}),this}toCardinal(e){return this.getNth(e).forEach(e=>{let t=mh(ah(e));e.replaceWith(t)}),this}toPercentage(e){return this.getNth(e).forEach(e=>{let{decimal:t}=ah(e),n=t*100;n=Math.round(n*100)/100,e.replaceWith(`${n}%`)}),this}}e.prototype.fractions=function(e){let n=Bm(this);return n=n.getNth(e),new t(this.document,n.pointer)}},yh=`one|two|three|four|five|six|seven|eight|nine`,bh=`twenty|thirty|forty|fifty|sixty|seventy|eighty|ninety|fourty`,xh=function(e){let t=e.match(`#Value+`);if(t.has(`#NumericValue #NumericValue`)&&(t.has(`#Value @hasComma #Value`)?t.splitAfter(`@hasComma`):t.has(`#NumericValue #Fraction`)?t.splitAfter(`#NumericValue #Fraction`):t=t.splitAfter(`#NumericValue`)),t.has(`#Value #Value #Value`)&&!t.has(`#Multiple`)&&t.has(`(`+bh+`) #Cardinal #Cardinal`)&&(t=t.splitAfter(`(`+bh+`) #Cardinal`)),t.has(`#Value #Value`)){t.has(`#NumericValue #NumericValue`)&&(t=t.splitOn(`#Year`)),t.has(`(`+bh+`) (eleven|twelve|thirteen|fourteen|fifteen|sixteen|seventeen|eighteen|nineteen)`)&&(t=t.splitAfter(`(`+bh+`)`));let e=t.match(`#Cardinal #Cardinal`);if(e.found&&!t.has(`(point|decimal|#Fraction)`)&&!e.has(`#Cardinal (#Multiple|point|decimal)`)){let n=t.has(`(${yh}) (${bh})`),r=e.has(`(`+bh+`) #Cardinal`),i=e.has(`#Multiple #Value`);!n&&!r&&!i&&e.terms().forEach(e=>{t=t.splitOn(e)})}t.match(`#Ordinal #Ordinal`).match(`#TextValue`).found&&!t.has(`#Multiple`)&&(t.has(`(`+bh+`) #Ordinal`)||(t=t.splitAfter(`#Ordinal`))),t=t.splitBefore(`#Ordinal [#Cardinal]`,0),t.has(`#TextValue #NumericValue`)&&!t.has(`(`+bh+`|#Multiple)`)&&(t=t.splitBefore(`#TextValue #NumericValue`))}return t=t.splitAfter(`#NumberRange`),t=t.splitBefore(`#Year`),t},Sh=function(e,t){e=e.replace(/,/g,``);let n=e.split(/([0-9.,]*)/),[r,i]=n,a=n.slice(2).join(``);return i!==``&&t.length<2?(i=Number(i||e),typeof i!=`number`&&(i=null),a||=``,(a===`st`||a===`nd`||a===`rd`||a===`th`)&&(a=``),{prefix:r||``,num:i,suffix:a}):null},Ch=function(e){if(typeof e==`string`)return{num:Ym(e)};let t=e.text(`reduced`),n=e.growRight(`#Unit`).match(`#Unit$`).text(`machine`),r=/[0-9],[0-9]/.test(e.text(`text`));if(e.terms().length===1&&!e.has(`#Multiple`)){let i=Sh(t,e);if(i!==null)return i.hasComma=r,i.unit=n,i}let i=e.match(`#Fraction{2,}$`);i=i.found===!1?e.match(`^#Fraction$`):i;let a=null;i.found&&(i.has(`#Value and #Value #Fraction`)&&(i=i.match(`and #Value #Fraction`)),a=ah(i),e=e.not(i),e=e.not(`and$`),t=e.text(`reduced`));let o=0;return t&&(o=Ym(t)||0),a&&a.decimal&&(o+=a.decimal),{hasComma:r,prefix:``,num:o,suffix:``,isOrdinal:e.has(`#Ordinal`),isText:e.has(`#TextValue`),isFraction:e.has(`#Fraction`),isMoney:e.has(`#Money`),unit:n}},wh=function(e){let t=e.num;if(!t&&t!==0)return null;let n=t%100;if(n>10&&n<20)return String(t)+`th`;let r={0:`th`,1:`st`,2:`nd`,3:`rd`},i=oh(t),a=i.slice(i.length-1,i.length);return r[a]?i+=r[a]:i+=`th`,i},Th={"¢":`cents`,$:`dollars`,"£":`pounds`,"¥":`yen`,"€":`euros`,"₡":`colón`,"฿":`baht`,"₭":`kip`,"₩":`won`,"₹":`rupees`,"₽":`ruble`,"₺":`liras`},Eh={"%":`percent`,"°":`degrees`},Dh=function(e){let t={suffix:``,prefix:e.prefix};return Th.hasOwnProperty(e.prefix)&&(t.suffix+=` `+Th[e.prefix],t.prefix=``),Eh.hasOwnProperty(e.suffix)&&(t.suffix+=` `+Eh[e.suffix]),t.suffix&&e.num===1&&(t.suffix=t.suffix.replace(/s$/,``)),!t.suffix&&e.suffix&&(t.suffix+=` `+e.suffix),t},Oh=function(e,t){if(t===`TextOrdinal`){let{prefix:t,suffix:n}=Dh(e);return t+gh(e)+n}if(t===`Ordinal`)return e.prefix+wh(e)+e.suffix;if(t===`TextCardinal`){let{prefix:t,suffix:n}=Dh(e);return t+ph(e)+n}let n=e.num;return e.hasComma&&(n=n.toLocaleString()),e.prefix+String(n)+e.suffix},kh=e=>Object.prototype.toString.call(e)===`[object Array]`,Ah=function(e){if(typeof e==`string`||typeof e==`number`){let t={};return t[e]=!0,t}return kh(e)?e.reduce((e,t)=>(e[t]=!0,e),{}):e||{}},jh=function(e,t={}){return t=Ah(t),e.filter(e=>{let{unit:n}=Ch(e);return!!(n&&t[n]===!0)})},Mh=function(e){class t extends e{constructor(e,t,n){super(e,t,n),this.viewType=`Numbers`}parse(e){return this.getNth(e).map(Ch)}get(e){return this.getNth(e).map(Ch).map(e=>e.num)}json(e){let t=typeof e==`object`?e:{};return this.getNth(e).map(e=>{let n=e.toView().json(t)[0],r=Ch(e);return n.number={prefix:r.prefix,num:r.num,suffix:r.suffix,hasComma:r.hasComma,unit:r.unit},n},[])}units(){return this.growRight(`#Unit`).match(`#Unit$`)}isUnit(e){return jh(this,e)}isOrdinal(){return this.if(`#Ordinal`)}isCardinal(){return this.if(`#Cardinal`)}toNumber(){let e=this.map(e=>{if(!this.has(`#TextValue`))return e;let t=Ch(e);if(t.num===null)return e;let n=Oh(t,e.has(`#Ordinal`)?`Ordinal`:`Cardinal`);return e.replaceWith(n,{tags:!0}),e.tag(`NumericValue`)});return new t(e.document,e.pointer)}toLocaleString(){return this.forEach(e=>{let t=Ch(e);if(t.num===null)return;let n=t.num.toLocaleString();if(e.has(`#Ordinal`)){let e=Oh(t,`Ordinal`).match(/[a-z]+$/);e&&(n+=e[0]||``)}e.replaceWith(n,{tags:!0})}),this}toText(){let e=this.map(e=>{if(e.has(`#TextValue`))return e;let t=Ch(e);if(t.num===null)return e;let n=Oh(t,e.has(`#Ordinal`)?`TextOrdinal`:`TextCardinal`);return e.replaceWith(n,{tags:!0}),e.tag(`TextValue`),e});return new t(e.document,e.pointer)}toCardinal(){let e=this.map(e=>{if(!e.has(`#Ordinal`))return e;let t=Ch(e);if(t.num===null)return e;let n=Oh(t,e.has(`#TextValue`)?`TextCardinal`:`Cardinal`);return e.replaceWith(n,{tags:!0}),e.tag(`Cardinal`),e});return new t(e.document,e.pointer)}toOrdinal(){let e=this.map(e=>{if(e.has(`#Ordinal`))return e;let t=Ch(e);if(t.num===null)return e;let n=Oh(t,e.has(`#TextValue`)?`TextOrdinal`:`Ordinal`);return e.replaceWith(n,{tags:!0}),e.tag(`Ordinal`),e});return new t(e.document,e.pointer)}isEqual(e){return this.filter(t=>Ch(t).num===e)}greaterThan(e){return this.filter(t=>Ch(t).num>e)}lessThan(e){return this.filter(t=>Ch(t).num<e)}between(e,t){return this.filter(n=>{let r=Ch(n).num;return r>e&&r<t})}set(e){if(e===void 0)return this;typeof e==`string`&&(e=Ch(e).num);let n=this.map(t=>{let n=Ch(t);if(n.num=e,n.num===null)return t;let r=t.has(`#Ordinal`)?`Ordinal`:`Cardinal`;t.has(`#TextValue`)&&(r=t.has(`#Ordinal`)?`TextOrdinal`:`TextCardinal`);let i=Oh(n,r);return n.hasComma&&r===`Cardinal`&&(i=Number(i).toLocaleString()),t=t.not(`#Currency`),t.replaceWith(i,{tags:!0}),t});return new t(n.document,n.pointer)}add(e){if(!e)return this;typeof e==`string`&&(e=Ch(e).num);let n=this.map(t=>{let n=Ch(t);if(n.num===null)return t;n.num+=e;let r=t.has(`#Ordinal`)?`Ordinal`:`Cardinal`;n.isText&&(r=t.has(`#Ordinal`)?`TextOrdinal`:`TextCardinal`);let i=Oh(n,r);return t.replaceWith(i,{tags:!0}),t});return new t(n.document,n.pointer)}subtract(e,t){return this.add(e*-1,t)}increment(e){return this.add(1,e)}decrement(e){return this.add(-1,e)}update(e){let n=new t(this.document,e);return n._cache=this._cache,n}}t.prototype.toNice=t.prototype.toLocaleString,t.prototype.isBetween=t.prototype.between,t.prototype.minus=t.prototype.subtract,t.prototype.plus=t.prototype.add,t.prototype.equals=t.prototype.isEqual,e.prototype.numbers=function(e){let n=xh(this);return n=n.getNth(e),new t(this.document,n.pointer)},e.prototype.percentages=function(e){let n=xh(this);return n=n.filter(e=>e.has(`#Percent`)||e.after(`^percent`)),n=n.getNth(e),new t(this.document,n.pointer)},e.prototype.money=function(e){let n=xh(this);return n=n.filter(e=>e.has(`#Money`)||e.after(`^#Currency`)),n=n.getNth(e),new t(this.document,n.pointer)},e.prototype.values=e.prototype.numbers},Nh={api:function(e){vh(e),Mh(e)}},Ph={people:!0,emails:!0,phoneNumbers:!0,places:!0},Fh=function(e={}){return e=Object.assign({},Ph,e),e.people!==!1&&this.people().replaceWith(`██████████`),e.emails!==!1&&this.emails().replaceWith(`██████████`),e.places!==!1&&this.places().replaceWith(`██████████`),e.phoneNumbers!==!1&&this.phoneNumbers().replaceWith(`███████`),this},Ih={api:function(e){e.prototype.redact=Fh}},Lh=function(e){let t=e.clauses();return/\.\.$/.test(e.out(`text`))||e.has(`^#QuestionWord`)&&e.has(`@hasComma`)?!1:!!(e.has(`or not$`)||e.has(`^#QuestionWord`)||e.has(`^(do|does|did|is|was|can|could|will|would|may) #Noun`)||e.has(`^(have|must) you`)||t.has(`(do|does|is|was) #Noun+ #Adverb? (#Adjective|#Infinitive)$`))},Rh=function(e){let t=/\?/,{document:n}=e;return e.filter(e=>{let r=e.docs[0]||[],i=r[r.length-1];return!i||n[i.index[0]].length!==r.length?!1:t.test(i.post)?!0:Lh(e)})},zh=`(after|although|as|because|before|if|since|than|that|though|when|whenever|where|whereas|wherever|whether|while|why|unless|until|once)`,Bh=`(that|which|whichever|who|whoever|whom|whose|whomever)`,Vh=function(e){let t=e;return t.length===1||(t=t.if(`#Verb`),t.length===1)||(t=t.ifNo(zh),t=t.ifNo(`^even (if|though)`),t=t.ifNo(`^so that`),t=t.ifNo(`^rather than`),t=t.ifNo(`^provided that`),t.length===1)||(t=t.ifNo(Bh),t.length===1)||(t=t.ifNo(`(^despite|^during|^before|^through|^throughout)`),t.length===1)||(t=t.ifNo(`^#Gerund`),t.length===1)?t:(t.length===0&&(t=e),t.eq(0))},Hh=function(e){let t=null;return e.has(`#PastTense`)?t=`PastTense`:e.has(`#FutureTense`)?t=`FutureTense`:e.has(`#PresentTense`)&&(t=`PresentTense`),{tense:t}},Uh=function(e){let t=Vh(e.clauses()).chunks(),n=e.none(),r=e.none(),i=e.none();return t.forEach((e,t)=>{if(t===0&&!e.has(`<Verb>`)){n=e;return}if(!r.found&&e.has(`<Verb>`)){r=e;return}r.found&&(i=i.concat(e))}),r.found&&!n.found&&(n=r.before(`<Noun>+`).first()),{subj:n,verb:r,pred:i,grammar:Hh(r)}},Wh=function(e){let t=e.verbs(),n=t.eq(0);if(n.has(`#PastTense`))return e;if(n.toPastTense(),t.length>1){t=t.slice(1),t=t.filter(e=>!e.lookBehind(`to$`).found),t=t.if(`#PresentTense`),t=t.notIf(`#Gerund`);let n=e.match(`to #Verb+ #Conjunction #Verb`).terms();t=t.not(n),t.found&&t.verbs().toPastTense()}return e},Gh=function(e){let t=e.verbs();return t.eq(0).toPresentTense(),t.length>1&&(t=t.slice(1),t=t.filter(e=>!e.lookBehind(`to$`).found),t=t.notIf(`#Gerund`),t.found&&t.verbs().toPresentTense()),e},Kh=function(e){let t=e.verbs();if(t.eq(0).toFutureTense(),e=e.fullSentence(),t=e.verbs(),t.length>1){t=t.slice(1);let e=t.filter(e=>e.lookBehind(`to$`).found?!1:e.has(`#Copula #Gerund`)?!0:e.has(`#Gerund`)?!1:e.has(`#Copula`)?!0:!(e.has(`#PresentTense`)&&!e.has(`#Infinitive`)&&e.lookBefore(`(he|she|it|that|which)$`).found));e.found&&e.forEach(e=>{if(e.has(`#Copula`)){e.match(`was`).replaceWith(`is`),e.match(`is`).replaceWith(`will be`);return}e.toInfinitive()})}return e},qh=function(e){return e.verbs().first().toNegative().compute(`chunks`),e},Jh=function(e){return e.verbs().first().toPositive().compute(`chunks`),e},Yh=function(e){return e.verbs().toInfinitive(),e},Xh={api:function(e){class t extends e{constructor(e,t,n){super(e,t,n),this.viewType=`Sentences`}json(e={}){return this.map(t=>{let n=t.toView().json(e)[0]||{},{subj:r,verb:i,pred:a,grammar:o}=Uh(t);return n.sentence={subject:r.text(`normal`),verb:i.text(`normal`),predicate:a.text(`normal`),grammar:o},n},[])}toPastTense(e){return this.getNth(e).map(e=>Wh(e,Uh(e)))}toPresentTense(e){return this.getNth(e).map(e=>Gh(e,Uh(e)))}toFutureTense(e){return this.getNth(e).map(e=>{let t=Uh(e);return e=Kh(e,t),e})}toInfinitive(e){return this.getNth(e).map(e=>Yh(e,Uh(e)))}toNegative(e){return this.getNth(e).map(e=>qh(e,Uh(e)))}toPositive(e){return this.getNth(e).map(e=>Jh(e,Uh(e)))}isQuestion(e){return this.questions(e)}isExclamation(e){return this.filter(e=>e.lastTerm().has(`@hasExclamation`)).getNth(e)}isStatement(e){return this.filter(e=>!e.isExclamation().found&&!e.isQuestion().found).getNth(e)}update(e){let n=new t(this.document,e);return n._cache=this._cache,n}}t.prototype.toPresent=t.prototype.toPresentTense,t.prototype.toPast=t.prototype.toPastTense,t.prototype.toFuture=t.prototype.toFutureTense,Object.assign(e.prototype,{sentences:function(e){let n=this.map(e=>e.fullSentence());return n=n.getNth(e),new t(this.document,n.pointer)},questions:function(e){return Rh(this).getNth(e)}})}},Zh=function(e){let t=e.splitAfter(`@hasComma`);t=t.match(`#Honorific+? #Person+`);let n=t.match(`#Possessive`).notIf(`(his|her)`);return t=t.splitAfter(n),t},Qh=function(e){let t={};t.firstName=e.match(`#FirstName+`),t.lastName=e.match(`#LastName+`),t.honorific=e.match(`#Honorific+`);let n=t.lastName,r=t.firstName;return(!r.found||!n.found)&&!r.found&&!n.found&&e.has(`^#Honorific .$`)&&(t.lastName=e.match(`.$`)),t},$h=`male`,eg=`female`,tg={mr:$h,mrs:eg,miss:eg,madam:eg,king:$h,queen:eg,duke:$h,duchess:eg,baron:$h,baroness:eg,count:$h,countess:eg,prince:$h,princess:eg,sire:$h,dame:eg,lady:eg,ayatullah:$h,congressman:$h,congresswoman:eg,"first lady":eg,mx:null},ng=function(e,t){let{firstName:n,honorific:r}=e;if(n.has(`#FemaleName`))return eg;if(n.has(`#MaleName`))return $h;if(r.found){let e=r.text(`normal`);if(e=e.replace(/\./g,``),tg.hasOwnProperty(e))return tg[e];if(/^her /.test(e))return eg;if(/^his /.test(e))return $h}let i=t.after();if(!i.has(`#Person`)&&i.has(`#Pronoun`)){let e=i.match(`#Pronoun`);if(e.has(`(they|their)`))return null;let t=e.has(`(he|his)`),n=e.has(`(she|her|hers)`);if(t&&!n)return $h;if(n&&!t)return eg}return null},rg=function(e){class t extends e{constructor(e,t,n){super(e,t,n),this.viewType=`People`}parse(e){return this.getNth(e).map(Qh)}json(e){let t=typeof e==`object`?e:{};return this.getNth(e).map(e=>{let n=e.toView().json(t)[0],r=Qh(e);return n.person={firstName:r.firstName.text(`normal`),lastName:r.lastName.text(`normal`),honorific:r.honorific.text(`normal`),presumed_gender:ng(r,e)},n},[])}presumedMale(){return this.filter(e=>e.has(`(#MaleName|mr|mister|sr|jr|king|pope|prince|sir)`))}presumedFemale(){return this.filter(e=>e.has(`(#FemaleName|mrs|miss|queen|princess|madam)`))}update(e){let n=new t(this.document,e);return n._cache=this._cache,n}}e.prototype.people=function(e){let n=Zh(this);return n=n.getNth(e),new t(this.document,n.pointer)}},ig=function(e){let t=e.match(`(#Place|#Address)+`),n=t.match(`@hasComma`);return n=n.filter(e=>e.has(`(asia|africa|europe|america)$`)?!0:!(e.has(`(#City|#Region|#ProperNoun)$`)&&e.after(`^(#Country|#Region)`).found)),t=t.splitAfter(n),t},ag=function(e){e.prototype.places=function(t){let n=ig(this);return n=n.getNth(t),new e(this.document,n.pointer)}},og=function(e){e.prototype.organizations=function(e){return this.match(`#Organization+`).getNth(e)}},sg=function(e){let t=this.clauses(),n=t.people();return n=n.concat(t.places()),n=n.concat(t.organizations()),n=n.not(`(someone|man|woman|mother|brother|sister|father)`),n=n.sort(`seq`),n=n.getNth(e),n},cg=function(e){e.prototype.topics=sg},lg={api:function(e){rg(e),ag(e),og(e),cg(e)}},ug=function(e){let t=e.match(`<Verb>`);return t=t.not(`#Conjunction`),t=t.not(`#Preposition`),t=t.splitAfter(`@hasComma`),t=t.splitAfter(`[(do|did|am|was|is|will)] (is|was)`,0),t=t.splitBefore(`(#Verb && !#Copula) [being] #Verb`,0),t=t.splitBefore(`#Verb [to be] #Verb`,0),t=t.splitAfter(`[help] #PresentTense`,0),t=t.splitBefore(`(#PresentTense|#PastTense) [#Copula]$`,0),t=t.splitBefore(`(#PresentTense|#PastTense) [will be]$`,0),t=t.splitBefore(`(#PresentTense|#PastTense) [(had|has)]`,0),t=t.not(`#Reflexive$`),t=t.not(`#Adjective`),t=t.splitAfter(`[#PastTense] #PastTense`,0),t=t.splitAfter(`[#PastTense] #Auxiliary+ #PastTense`,0),t=t.splitAfter(`#Copula [#Gerund] #PastTense`,0),t=t.if(`#Verb`),t.has(`(#Verb && !#Auxiliary) #Adverb+? #Copula`)&&(t=t.splitBefore(`#Copula`)),t},dg=function(e){let t=e;return e.wordCount()>1&&(t=e.not(`(#Negative|#Auxiliary|#Modal|#Adverb|#Prefix)`)),t.length>1&&!t.has(`#Phrasal #Particle`)&&(t=t.last()),t=t.not(`(want|wants|wanted) to`),t.found||(t=e.not(`#Negative`)),t},fg=function(e,t){let n={pre:e.none(),post:e.none()};if(!e.has(`#Adverb`))return n;let r=e.splitOn(t);return r.length===3?{pre:r.eq(0).adverbs(),post:r.eq(2).adverbs()}:r.eq(0).isDoc(t)?(n.post=r.eq(1).adverbs(),n):(n.pre=r.eq(0).adverbs(),n)},pg=function(e,t){let n=e.splitBefore(t);if(n.length<=1)return e.none();let r=n.eq(0);return r=r.not(`(#Adverb|#Negative|#Prefix)`),r},mg=function(e){return e.match(`#Negative`)},hg=function(e){if(!e.has(`(#Particle|#PhrasalVerb)`))return{verb:e.none(),particle:e.none()};let t=e.match(`#Particle$`);return{verb:e.not(t),particle:t}},gg=function(e){let t=e.clone();t.contractions().expand();let n=dg(t);return{root:n,prefix:t.match(`#Prefix`),adverbs:fg(t,n),auxiliary:pg(t,n),negative:mg(t),phrasal:hg(n)}},_g={tense:`PresentTense`},vg={conditional:!0},yg={tense:`FutureTense`},bg={progressive:!0},xg={tense:`PastTense`},Sg={complete:!0,progressive:!1},Cg={passive:!0},wg={plural:!0},Tg={plural:!1},Eg=function(e){let t={};return e.forEach(e=>{Object.assign(t,e)}),t},Dg={imperative:[[`#Imperative`,[]]],"want-infinitive":[[`^(want|wants|wanted) to #Infinitive$`,[_g]],[`^wanted to #Infinitive$`,[xg]],[`^will want to #Infinitive$`,[yg]]],"gerund-phrase":[[`^#PastTense #Gerund$`,[xg]],[`^#PresentTense #Gerund$`,[_g]],[`^#Infinitive #Gerund$`,[_g]],[`^will #Infinitive #Gerund$`,[yg]],[`^have #PastTense #Gerund$`,[xg]],[`^will have #PastTense #Gerund$`,[xg]]],"simple-present":[[`^#PresentTense$`,[_g]],[`^#Infinitive$`,[_g]]],"simple-past":[[`^#PastTense$`,[xg]]],"simple-future":[[`^will #Adverb? #Infinitive`,[yg]]],"present-progressive":[[`^(is|are|am) #Gerund$`,[_g,bg]]],"past-progressive":[[`^(was|were) #Gerund$`,[xg,bg]]],"future-progressive":[[`^will be #Gerund$`,[yg,bg]]],"present-perfect":[[`^(has|have) #PastTense$`,[xg,Sg]]],"past-perfect":[[`^had #PastTense$`,[xg,Sg]],[`^had #PastTense to #Infinitive`,[xg,Sg]]],"future-perfect":[[`^will have #PastTense$`,[yg,Sg]]],"present-perfect-progressive":[[`^(has|have) been #Gerund$`,[xg,bg]]],"past-perfect-progressive":[[`^had been #Gerund$`,[xg,bg]]],"future-perfect-progressive":[[`^will have been #Gerund$`,[yg,bg]]],"passive-past":[[`(got|were|was) #Passive`,[xg,Cg]],[`^(was|were) being #Passive`,[xg,Cg]],[`^(had|have) been #Passive`,[xg,Cg]]],"passive-present":[[`^(is|are|am) #Passive`,[_g,Cg]],[`^(is|are|am) being #Passive`,[_g,Cg]],[`^has been #Passive`,[_g,Cg]]],"passive-future":[[`will have been #Passive`,[yg,Cg,vg]],[`will be being? #Passive`,[yg,Cg,vg]]],"present-conditional":[[`would be #PastTense`,[_g,vg]]],"past-conditional":[[`would have been #PastTense`,[xg,vg]]],"auxiliary-future":[[`(is|are|am|was) going to (#Infinitive|#PresentTense)`,[yg]]],"auxiliary-past":[[`^did #Infinitive$`,[xg,Tg]],[`^used to #Infinitive$`,[xg,Sg]]],"auxiliary-present":[[`^(does|do) #Infinitive$`,[_g,Sg,wg]]],"modal-past":[[`^(could|must|should|shall) have #PastTense$`,[xg]]],"modal-infinitive":[[`^#Modal #Infinitive$`,[]]],infinitive:[[`^#Infinitive$`,[]]]},Og=[];Object.keys(Dg).map(e=>{Dg[e].forEach(t=>{Og.push({name:e,match:t[0],data:Eg(t[1])})})});var kg=function(e,t){return e=e.clone(),t.adverbs.post&&t.adverbs.post.found&&e.remove(t.adverbs.post),t.adverbs.pre&&t.adverbs.pre.found&&e.remove(t.adverbs.pre),e.has(`#Negative`)&&(e=e.remove(`#Negative`)),e.has(`#Prefix`)&&(e=e.remove(`#Prefix`)),t.root.has(`#PhrasalVerb #Particle`)&&e.remove(`#Particle$`),e=e.not(`#Adverb`),e},Ag=function(e){return!!(e.has(`#Infinitive`)&&e.growLeft(`to`).has(`^to #Infinitive`))},jg=function(e,t){let n={};e=kg(e,t);for(let t=0;t<Og.length;t+=1){let r=Og[t];if(e.has(r.match)===!0){n.form=r.name,Object.assign(n,r.data);break}}return n.form||e.has(`^#Verb$`)&&(n.form=`infinitive`),n.tense||=t.root.has(`#PastTense`)?`PastTense`:`PresentTense`,n.copula=t.root.has(`#Copula`),n.isInfinitive=Ag(e),n},Mg=function(e){return e.length<=1?!1:(e.parse()[0]||{}).isSubordinate},Ng=function(e){let t=e.clauses();return t=t.filter((e,t)=>!(e.has(`^(if|unless|while|but|for|per|at|by|that|which|who|from)`)||t>0&&e.has(`^#Verb . #Noun+$`)||t>0&&e.has(`^#Adverb`))),t.length===0?e:t},Pg=function(e){let t=e.before();t=Ng(t);let n=t.nouns(),r=n.last(),i=r.match(`(i|he|she|we|you|they)`);if(i.found)return i.nouns();let a=n.if(`^(that|this|those)`);return a.found||n.found===!1&&(a=t.match(`^(that|this|those)`),a.found)?a:(r=n.last(),Mg(r)&&(n.remove(r),r=n.last()),Mg(r)&&(n.remove(r),r=n.last()),r)},Fg=function(e,t){return t.has(`(are|were|does)`)||e.has(`(those|they|we)`)?!0:e.found&&e.isPlural?e.isPlural().found:!1},Ig=function(e){let t=Pg(e);return{subject:t,plural:Fg(t,e)}},Lg=e=>e,Rg=(e,t)=>{let n=Ig(e,t),r=n.subject;return r.has(`i`)||r.has(`we`)?!0:n.plural},zg=(e,t)=>{let{subject:n,plural:r}=Ig(e,t);return r||n.has(`we`)?`were`:`was`},Bg=function(e,t){if(e.has(`were`))return`are`;let{subject:n,plural:r}=Ig(e,t);return n.has(`i`)?`am`:n.has(`we`)||r?`are`:`is`},Vg=function(e,t){let n=Ig(e,t),r=n.subject;return r.has(`i`)||r.has(`we`)||n.plural?`do`:`does`},Hg=function(e){if(e.has(`#Infinitive`))return`Infinitive`;if(e.has(`#Participle`))return`Participle`;if(e.has(`#PastTense`))return`PastTense`;if(e.has(`#Gerund`))return`Gerund`;if(e.has(`#PresentTense`))return`PresentTense`},Ug=function(e,t){let{toInfinitive:n}=e.methods.two.transform.verb,r=t.root.text({keepPunct:!1});return r=n(r,e.model,Hg(e)),r&&e.replace(t.root,r),e},Wg=e=>e.has(`will not`)?e.replace(`will not`,`have not`):e.remove(`will`),Gg=function(e){return!e||!e.isView?[]:e.json({normal:!0,terms:!1,text:!1}).map(e=>e.normal)},Kg=function(e){return!e||!e.isView?``:e.text(`normal`)},qg=function(e){let{toInfinitive:t}=e.methods.two.transform.verb;return t(e.text(`normal`),e.model,Hg(e))},Jg=function(e){let t=gg(e);e=e.clone().toView();let n=jg(e,t);return{root:t.root.text(),preAdverbs:Gg(t.adverbs.pre),postAdverbs:Gg(t.adverbs.post),auxiliary:Kg(t.auxiliary),negative:t.negative.found,prefix:Kg(t.prefix),infinitive:qg(t.root),grammar:n}},Yg={tags:!0},Xg=function(e,t){let{toInfinitive:n}=e.methods.two.transform.verb,{root:r,auxiliary:i}=t,a=i.terms().harden(),o=r.text(`normal`);if(o=n(o,e.model,Hg(r)),o&&e.replace(r,o,Yg).tag(`Verb`).firstTerm().tag(`Infinitive`),a.found&&e.remove(a),t.negative.found){e.has(`not`)||e.prepend(`not`);let n=Vg(e,t);e.prepend(n)}return e.fullSentence().compute([`freeze`,`lexicon`,`preTagger`,`postTagger`,`unfreeze`,`chunks`]),e},Zg={tags:!0},Qg={noAux:(e,t)=>(t.auxiliary.found&&(e=e.remove(t.auxiliary)),e),simple:(e,t)=>{let{conjugate:n,toInfinitive:r}=e.methods.two.transform.verb,i=t.root;if(i.has(`#Modal`))return e;let a=i.text({keepPunct:!1});return a=r(a,e.model,Hg(i)),a=n(a,e.model).PastTense,a=a===`been`?`was`:a,a===`was`&&(a=zg(e,t)),a&&e.replace(i,a,Zg),e},both:function(e,t){return t.negative.found?(e.replace(`will`,`did`),e):(e=Qg.simple(e,t),e=Qg.noAux(e,t),e)},hasHad:e=>(e.replace(`has`,`had`,Zg),e),hasParticiple:(e,t)=>{let{conjugate:n,toInfinitive:r}=e.methods.two.transform.verb,i=t.root,a=i.text(`normal`);return a=r(a,e.model,Hg(i)),n(a,e.model).Participle}},$g={infinitive:Qg.simple,"simple-present":Qg.simple,"simple-past":Lg,"simple-future":Qg.both,"present-progressive":e=>(e.replace(`are`,`were`,Zg),e.replace(`(is|are|am)`,`was`,Zg),e),"past-progressive":Lg,"future-progressive":(e,t)=>(e.match(t.root).insertBefore(`was`),e.remove(`(will|be)`),e),"present-perfect":Qg.hasHad,"past-perfect":Lg,"future-perfect":(e,t)=>(e.match(t.root).insertBefore(`had`),e.has(`will`)&&(e=Wg(e)),e.remove(`have`),e),"present-perfect-progressive":Qg.hasHad,"past-perfect-progressive":Lg,"future-perfect-progressive":e=>(e.remove(`will`),e.replace(`have`,`had`,Zg),e),"passive-past":e=>(e.replace(`have`,`had`,Zg),e),"passive-present":e=>(e.replace(`(is|are)`,`was`,Zg),e),"passive-future":(e,t)=>(t.auxiliary.has(`will be`)&&(e.match(t.root).insertBefore(`had been`),e.remove(`(will|be)`)),t.auxiliary.has(`will have been`)&&(e.replace(`have`,`had`,Zg),e.remove(`will`)),e),"present-conditional":e=>(e.replace(`be`,`have been`),e),"past-conditional":Lg,"auxiliary-future":e=>(e.replace(`(is|are|am)`,`was`,Zg),e),"auxiliary-past":Lg,"auxiliary-present":e=>(e.replace(`(do|does)`,`did`,Zg),e),"modal-infinitive":(e,t)=>(e.has(`can`)?e.replace(`can`,`could`,Zg):(Qg.simple(e,t),e.match(`#Modal`).insertAfter(`have`).tag(`Auxiliary`)),e),"modal-past":Lg,"want-infinitive":e=>(e.replace(`(want|wants)`,`wanted`,Zg),e.remove(`will`),e),"gerund-phrase":(e,t)=>(t.root=t.root.not(`#Gerund$`),Qg.simple(e,t),Wg(e),e)},e_=function(e,t,n){return $g.hasOwnProperty(n)?(e=$g[n](e,t),e.fullSentence().compute([`tagger`,`chunks`]),e):e},t_=function(e,t){let n=Ig(e,t),r=n.subject;return r.has(`(i|we|you)`)?`have`:n.plural===!1||r.has(`he`)||r.has(`she`)||r.has(`#Person`)?`has`:`have`},n_=(e,t)=>{let{conjugate:n,toInfinitive:r}=e.methods.two.transform.verb,{root:i,auxiliary:a}=t;if(i.has(`#Modal`))return e;let o=i.text({keepPunct:!1});o=r(o,e.model,Hg(i));let s=n(o,e.model);if(o=s.Participle||s.PastTense,o){e=e.replace(i,o);let n=t_(e,t);e.prepend(n).match(n).tag(`Auxiliary`),e.remove(a)}return e},r_={infinitive:n_,"simple-present":n_,"simple-future":(e,t)=>e.replace(`will`,t_(e,t)),"present-perfect":Lg,"past-perfect":Lg,"future-perfect":(e,t)=>e.replace(`will have`,t_(e,t)),"present-perfect-progressive":Lg,"past-perfect-progressive":Lg,"future-perfect-progressive":Lg},i_=function(e,t,n){return r_.hasOwnProperty(n)?(e=r_[n](e,t),e.fullSentence().compute([`tagger`,`chunks`]),e):(e=n_(e,t,n),e.fullSentence().compute([`tagger`,`chunks`]),e)},a_={tags:!0},o_=(e,t)=>{let{conjugate:n,toInfinitive:r}=e.methods.two.transform.verb,i=t.root,a=i.text(`normal`);return a=r(a,e.model,Hg(i)),Rg(e,t)===!1&&(a=n(a,e.model).PresentTense),i.has(`#Copula`)&&(a=Bg(e,t)),a&&(e=e.replace(i,a,a_),e.not(`#Particle`).tag(`PresentTense`)),e},s_=(e,t)=>{let{conjugate:n,toInfinitive:r}=e.methods.two.transform.verb,i=t.root,a=i.text(`normal`);return a=r(a,e.model,Hg(i)),Rg(e,t)===!1&&(a=n(a,e.model).Gerund),a&&(e=e.replace(i,a,a_),e.not(`#Particle`).tag(`Gerund`)),e},c_=(e,t)=>{let{toInfinitive:n}=e.methods.two.transform.verb,r=t.root,i=t.root.text(`normal`);return i=n(i,e.model,Hg(r)),i&&(e=e.replace(t.root,i,a_)),e},l_={infinitive:o_,"simple-present":(e,t)=>{let{conjugate:n}=e.methods.two.transform.verb,{root:r}=t;if(r.has(`#Infinitive`)){let i=Ig(e,t).subject;if(Rg(e,t)||i.has(`i`))return e;let a=r.text(`normal`),o=n(a,e.model).PresentTense;a!==o&&e.replace(r,o,a_)}else return o_(e,t);return e},"simple-past":o_,"simple-future":(e,t)=>{let{root:n,auxiliary:r}=t;if(r.has(`will`)&&n.has(`be`)){let r=Bg(e,t);e.replace(n,r),e=e.remove(`will`),e.replace(`not `+r,r+` not`)}else o_(e,t),e=e.remove(`will`);return e},"present-progressive":Lg,"past-progressive":(e,t)=>{let n=Bg(e,t);return e.replace(`(were|was)`,n,a_)},"future-progressive":e=>(e.match(`will`).insertBefore(`is`),e.remove(`be`),e.remove(`will`)),"present-perfect":(e,t)=>(o_(e,t),e=e.remove(`(have|had|has)`),e),"past-perfect":(e,t)=>{let n=Ig(e,t).subject;return Rg(e,t)||n.has(`i`)?(e=Ug(e,t),e.remove(`had`),e):(e.replace(`had`,`has`,a_),e)},"future-perfect":e=>(e.match(`will`).insertBefore(`has`),e.remove(`have`).remove(`will`)),"present-perfect-progressive":Lg,"past-perfect-progressive":e=>e.replace(`had`,`has`,a_),"future-perfect-progressive":e=>(e.match(`will`).insertBefore(`has`),e.remove(`have`).remove(`will`)),"passive-past":(e,t)=>{let n=Bg(e,t);return e.has(`(had|have|has)`)&&e.has(`been`)?(e.replace(`(had|have|has)`,n,a_),e.replace(`been`,`being`),e):e.replace(`(got|was|were)`,n)},"passive-present":Lg,"passive-future":e=>(e.replace(`will`,`is`),e.replace(`be`,`being`)),"present-conditional":Lg,"past-conditional":e=>(e.replace(`been`,`be`),e.remove(`have`)),"auxiliary-future":(e,t)=>(s_(e,t),e.remove(`(going|to)`),e),"auxiliary-past":(e,t)=>{if(t.auxiliary.has(`did`)){let n=Vg(e,t);return e.replace(t.auxiliary,n),e}return s_(e,t),e.replace(t.auxiliary,`is`),e},"auxiliary-present":Lg,"modal-infinitive":Lg,"modal-past":(e,t)=>(c_(e,t),e.remove(`have`)),"gerund-phrase":(e,t)=>(t.root=t.root.not(`#Gerund$`),o_(e,t),e.remove(`(will|have)`)),"want-infinitive":(e,t)=>{let n=`wants`;return Rg(e,t)&&(n=`want`),e.replace(`(want|wanted|wants)`,n,a_),e.remove(`will`),e}},u_=function(e,t,n){return l_.hasOwnProperty(n)?(e=l_[n](e,t),e.fullSentence().compute([`tagger`,`chunks`]),e):e},d_={tags:!0},f_=(e,t)=>{let{toInfinitive:n}=e.methods.two.transform.verb,{root:r,auxiliary:i}=t;if(r.has(`#Modal`))return e;let a=r.text(`normal`);return a=n(a,e.model,Hg(r)),a&&(e=e.replace(r,a,d_),e.not(`#Particle`).tag(`Verb`)),e.prepend(`will`).match(`will`).tag(`Auxiliary`),e.remove(i),e},p_=(e,t)=>{let{conjugate:n,toInfinitive:r}=e.methods.two.transform.verb,{root:i,auxiliary:a}=t,o=i.text(`normal`);return o=r(o,e.model,Hg(i)),o&&(o=n(o,e.model).Gerund,e.replace(i,o,d_),e.not(`#Particle`).tag(`PresentTense`)),e.remove(a),e.prepend(`will be`).match(`will be`).tag(`Auxiliary`),e},m_={infinitive:f_,"simple-present":f_,"simple-past":f_,"simple-future":Lg,"present-progressive":p_,"past-progressive":p_,"future-progressive":Lg,"present-perfect":e=>(e.match(`(have|has)`).replaceWith(`will have`),e),"past-perfect":e=>e.replace(`(had|has)`,`will have`),"future-perfect":Lg,"present-perfect-progressive":e=>e.replace(`has`,`will have`),"past-perfect-progressive":e=>e.replace(`had`,`will have`),"future-perfect-progressive":Lg,"passive-past":e=>e.has(`got`)?e.replace(`got`,`will get`):e.has(`(was|were)`)?(e.replace(`(was|were)`,`will be`),e.remove(`being`)):e.has(`(have|has|had) been`)?e.replace(`(have|has|had) been`,`will be`):e,"passive-present":e=>(e.replace(`being`,`will be`),e.remove(`(is|are|am)`),e),"passive-future":Lg,"present-conditional":e=>e.replace(`would`,`will`),"past-conditional":e=>e.replace(`would`,`will`),"auxiliary-future":Lg,"auxiliary-past":e=>e.has(`used`)&&e.has(`to`)?(e.replace(`used`,`will`),e.remove(`to`)):(e.replace(`did`,`will`),e),"auxiliary-present":e=>e.replace(`(do|does)`,`will`),"modal-infinitive":Lg,"modal-past":Lg,"gerund-phrase":(e,t)=>(t.root=t.root.not(`#Gerund$`),f_(e,t),e.remove(`(had|have)`)),"want-infinitive":e=>(e.replace(`(want|wants|wanted)`,`will want`),e)},h_=function(e,t,n){return e.has(`will`)||e.has(`going to`)?e:m_.hasOwnProperty(n)?(e=m_[n](e,t),e.fullSentence().compute([`tagger`,`chunks`]),e):e},g_={tags:!0},__=function(e,t){let{toInfinitive:n,conjugate:r}=e.methods.two.transform.verb,{root:i,auxiliary:a}=t;if(e.has(`#Gerund`))return e;let o=i.text(`normal`);o=n(o,e.model,Hg(i));let s=r(o,e.model).Gerund;if(s){let n=Bg(e,t);e.replace(i,s,g_),e.remove(a),e.prepend(n)}return e.replace(`not is`,`is not`),e.replace(`not are`,`are not`),e.fullSentence().compute([`tagger`,`chunks`]),e},v_={tags:!0},y_=function(e,t){let n=Vg(e,t);return e.prepend(n+` not`),e},b_=function(e){let t=e.match(`be`);return t.found?(t.prepend(`not`),e):(t=e.match(`(is|was|am|are|will|were)`),t.found&&t.append(`not`),e)},x_=e=>e.has(`(is|was|am|are|will|were|be)`),S_={"simple-present":(e,t)=>x_(e)===!0?b_(e,t):(e=Ug(e,t),e=y_(e,t),e),"simple-past":(e,t)=>x_(e)===!0?b_(e,t):(e=Ug(e,t),e.prepend(`did not`),e),imperative:e=>(e.prepend(`do not`),e),infinitive:(e,t)=>x_(e)===!0?b_(e,t):y_(e,t),"passive-past":e=>{if(e.has(`got`))return e.replace(`got`,`get`,v_),e.prepend(`did not`),e;let t=e.match(`(was|were|had|have)`);return t.found&&t.append(`not`),e},"auxiliary-past":e=>{if(e.has(`used`))return e.prepend(`did not`),e;let t=e.match(`(did|does|do)`);return t.found&&t.append(`not`),e},"want-infinitive":(e,t)=>(e=y_(e,t),e=e.replace(`wants`,`want`,v_),e)},C_=function(e,t,n){if(e.has(`#Negative`))return e;if(S_.hasOwnProperty(n))return e=S_[n](e,t),e;let r=e.matchOne(`be`);return r.found?(r.prepend(`not`),e):x_(e)===!0?b_(e,t):(r=e.matchOne(`(will|had|have|has|did|does|do|#Modal)`),r.found&&r.append(`not`),e)},w_={api:function(e){class t extends e{constructor(e,t,n){super(e,t,n),this.viewType=`Verbs`}parse(e){return this.getNth(e).map(gg)}json(e,t){return this.getNth(t).map(t=>{let n=t.toView().json(e)[0]||{};return n.verb=Jg(t),n},[])}subjects(e){return this.getNth(e).map(e=>Ig(e,gg(e)).subject)}adverbs(e){return this.getNth(e).map(e=>e.match(`#Adverb`))}isSingular(e){return this.getNth(e).filter(e=>Ig(e).plural!==!0)}isPlural(e){return this.getNth(e).filter(e=>Ig(e).plural===!0)}isImperative(e){return this.getNth(e).filter(e=>e.has(`#Imperative`))}toInfinitive(e){return this.getNth(e).map(e=>{let t=gg(e);return Xg(e,t,jg(e,t).form)})}toPresentTense(e){return this.getNth(e).map(e=>{let t=gg(e),n=jg(e,t);return n.isInfinitive?e:u_(e,t,n.form)})}toPastTense(e){return this.getNth(e).map(e=>{let t=gg(e),n=jg(e,t);return n.isInfinitive?e:e_(e,t,n.form)})}toFutureTense(e){return this.getNth(e).map(e=>{let t=gg(e),n=jg(e,t);return n.isInfinitive?e:h_(e,t,n.form)})}toGerund(e){return this.getNth(e).map(e=>{let t=gg(e),n=jg(e,t);return n.isInfinitive?e:__(e,t,n.form)})}toPastParticiple(e){return this.getNth(e).map(e=>{let t=gg(e),n=jg(e,t);return n.isInfinitive?e:i_(e,t,n.form)})}conjugate(e){let{conjugate:t,toInfinitive:n}=this.world.methods.two.transform.verb;return this.getNth(e).map(e=>{let r=gg(e),i=jg(e,r);i.form===`imperative`&&(i.form=`simple-present`);let a=r.root.text(`normal`);if(!r.root.has(`#Infinitive`)){let t=Hg(r.root);a=n(a,e.model,t)||a}return t(a,e.model)},[])}isNegative(){return this.if(`#Negative`)}isPositive(){return this.ifNo(`#Negative`)}toPositive(){let e=this.match(`do not #Verb`);return e.found&&e.remove(`do not`),this.remove(`#Negative`)}toNegative(e){return this.getNth(e).map(e=>{let t=gg(e);return C_(e,t,jg(e,t).form)})}update(e){let n=new t(this.document,e);return n._cache=this._cache,n}}t.prototype.toPast=t.prototype.toPastTense,t.prototype.toPresent=t.prototype.toPresentTense,t.prototype.toFuture=t.prototype.toFutureTense,e.prototype.verbs=function(e){let n=ug(this);return n=n.getNth(e),new t(this.document,n.pointer)}}},T_=function(e,t){let n=t.match(e);if(n.found){let e=n.pronouns().refersTo();if(e.found)return e}return t.none()},E_=function(e){if(!e.found)return e;let[t]=e.fullPointer[0];return t&&t>0?e.update([[t-1]]):e.none()},D_=function(e,t){return t===`m`?e.filter(e=>!e.presumedFemale().found):t===`f`?e.filter(e=>!e.presumedMale().found):e},O_=function(e,t){let n=e.people();return n=D_(n,t),n.found||(n=e.nouns(`#Actor`),n.found)?n.last():t===`f`?T_(`(she|her|hers)`,e):t===`m`?T_(`(he|him|his)`,e):e.none()},k_=function(e){let t=e.nouns(),n=t.isPlural().notIf(`#Pronoun`);if(n.found)return n.last();let r=T_(`(they|their|theirs)`,e);return r.found?r:(n=t.match(`(somebody|nobody|everybody|anybody|someone|noone|everyone|anyone)`),n.found?n.last():e.none())},A_=function(e,t){if(t&&t.found){let n=e.docs[0][0];n.reference=t.ptrs[0]}},j_=function(e,t){let n=e.before(),r=t(n);return r.found||(n=E_(e),r=t(n),r.found)||(n=E_(n),r=t(n),r.found)?r:e.none()};Cp.plugin(Tp),Cp.plugin(Dp),Cp.plugin(Up),Cp.plugin({compute:{coreference:function(e){e.pronouns().if(`(he|him|his|she|her|hers|they|their|theirs|it|its)`).forEach(e=>{let t=null;e.has(`(he|him|his)`)?t=j_(e,e=>O_(e,`m`)):e.has(`(she|her|hers)`)?t=j_(e,e=>O_(e,`f`)):e.has(`(they|their|theirs)`)&&(t=j_(e,k_)),t&&t.found&&A_(e,t)})}},api:function(e){class t extends e{constructor(e,t,n){super(e,t,n),this.viewType=`Pronouns`}hasReference(){return this.compute(`coreference`),this.filter(e=>e.docs[0][0].reference)}refersTo(){return this.compute(`coreference`),this.map(e=>{if(!e.found)return e.none();let t=e.docs[0][0];return t.reference?e.update([t.reference]):e.none()})}update(e){let n=new t(this.document,e);return n._cache=this._cache,n}}e.prototype.pronouns=function(e){let n=this.match(`#Pronoun`);return n=n.getNth(e),new t(n.document,n.pointer)}}}),Cp.plugin(mm),Cp.plugin(Sm),Cp.plugin(zm),Cp.plugin(Nh),Cp.plugin(Ih),Cp.plugin(Xh),Cp.plugin(lg),Cp.plugin(w_);var M_=Cp,N_=function(e){let t=null;return e.has(`^(between|within) #Date`)?e:(e.has(`#Month`)&&(t=e.match(`[#Month #Value] and? #Month`,0).ifNo(`@hasDash$`),t.found&&(e=e.splitAfter(t)),t=e.match(`[#Value #Month] and? #Value #Month`,0),t.found&&(e=e.splitAfter(t)),t=e.match(`^[#Month] and? #Month #Ordinal?$`,0),t.found&&(e=e.splitAfter(t)),t=e.match(`[#Month #Value] #Month`,0).ifNo(`@hasDash$`),t.found&&(e=e.splitAfter(t))),e.has(`#WeekDay`)&&(t=e.match(`^[#WeekDay] and? #WeekDay$`,0).ifNo(`@hasDash$`),t.found&&(e=e.splitAfter(t)),t=e.match(`#WeekDay #WeekDay and? #WeekDay`),t.found&&(e=e.splitOn(`#WeekDay`)),t=e.match(`[#WeekDay] (and|or|this|next)? #WeekDay`,0).ifNo(`@hasDash$`),t.found&&(e=e.splitAfter(`#WeekDay`))),t=e.match(`(this|next) #Duration [(today|tomorrow|yesterday)]`,0),t.found&&(e=e.splitBefore(t)),t=e.match(`[(today|tomorrow|yesterday)] #Value #Month`,0),t.found&&(e=e.splitAfter(t)),t=e.match(`[(today|tomorrow|yesterday)] (today|tomorrow|yesterday|#WeekDay)`,0).ifNo(`@hasDash$`),t.found&&(e=e.splitAfter(t)),t=e.match(`#Year [and] #Year`,0),t.found&&(e=e.splitAfter(t)),e=e.not(`^and`),e=e.not(`and$`),e)},P_=function(e){let t=e.match(`#Date+`);t=t.filter(e=>{let t=e.has(`^#Duration+$`)||e.has(`^#Value #Duration+$`);return t===!0&&e.has(`(#FinancialQuarter|quarter)`)?!0:t===!1});let n=t.match(`[#Cardinal #Duration (in|on|this|next|during|for)] #Date`,0);return n.found&&(t=t.not(n)),n=t.match(`[#Cardinal #Duration] #WeekDay`,0),n.found&&(t=t.not(n)),n=t.match(`#Date [for #Value #Duration]$`,0),n.found&&(t=t.not(n)),n=t.match(`[#Cardinal #Duration] #Date`,0),n.found&&!t.has(`#Cardinal #Duration] (ago|from|before|after|back)`)&&(t=t.not(n)),n=t.match(`for #Cardinal #Duration`),n.found&&(t=t.not(n)),t=t.notIf(`^one (#WeekDay|#Month)$`),t=N_(t),t=t.notIf(`(#Money|#Percentage)`),t=t.notIf(`^per #Duration`),t},F_={second:!0,minute:!0,hour:!0,day:!0,week:!0,weekend:!0,month:!0,season:!0,quarter:!0,year:!0},I_={wk:`week`,min:`minute`,sec:`second`,weekend:`week`},L_=function(e){let t=e.match(`#Duration`).text(`normal`);return t=t.replace(/s$/,``),I_.hasOwnProperty(t)&&(t=I_[t]),t},R_=function(e){let t={},n=e.none(),r=e.match(`#DateShift+`);if(r.found===!1)return{res:t,m:n};if(r.match(`#Cardinal #Duration`).forEach(e=>{let n=e.match(`#Cardinal`).numbers().get()[0];if(n&&typeof n==`number`){let r=L_(e);F_[r]===!0&&(t[r]=n)}}),r.has(`(before|ago|hence|back)$`)===!0&&Object.keys(t).forEach(e=>t[e]*=-1),n=r.match(`#Cardinal #Duration`),r=r.not(n),n=r.match(`[<unit>#Duration] [<dir>(after|before)]`),n.found){let e=n.groups(`unit`).text(`reduced`),r=n.groups(`dir`).text(`reduced`);r===`after`?t[e]=1:r===`before`&&(t[e]=-1)}if(n=r.match(`half (a|an) [#Duration]`,0),n.found){let e=L_(n);t[e]=.5}if(n=r.match(`a (few|couple) [#Duration]`,0),n.found){let e=L_(n);t[e]=n.has(`few`)?3:2}return n=e.match(`#DateShift+`),{result:t,m:n}},z_={minute:!0},B_=function(e){let t=e.match(`[<num>#Value] [<unit>#Duration+] (of|in)`);if(t.found){let e=t.groups(),n=e.num.numbers().get()[0],r=e.unit.text(`reduced`),i={unit:r,num:Number(n)||0};return z_[r]||--i.num,{result:i,m:t}}if(t=e.match(`[<dir>(first|initial|last|final)] [<unit>#Duration+] (of|in)`),t.found){let e=t.groups(),n=e.dir.text(`reduced`),r=e.unit.text(`reduced`);return n===`initial`&&(n=`first`),n===`final`&&(n=`last`),{result:{unit:r,dir:n},m:t}}return{result:null,m:e.none()}},V_=3600*1e3,H_=(e,t,n)=>{let[r,i]=e.split(`/`),[a,o]=i.split(`:`);return Date.UTC(n,r-1,a,o)-t*V_},U_=(e,t,n,r,i)=>{let a=new Date(e).getUTCFullYear(),o=H_(t,i,a),s=H_(n,r,a);return e>=o&&e<s},W_=e=>{let t=e.timezones[e.tz];if(t===void 0)return console.warn(`Warning: couldn't find timezone `+e.tz),0;if(t.dst===void 0)return t.offset;let n=t.offset,r=t.offset+1;t.hem===`n`&&(r=n-1);let i=t.dst.split(`->`);return U_(e.epoch,i[0],i[1],n,r)===!0?n:r},G_={"9|s":`2/dili,2/jayapura`,"9|n":`2/chita,2/khandyga,2/pyongyang,2/seoul,2/tokyo,2/yakutsk,11/palau,japan,rok`,"9.5|s|04/06:03->10/05:04":`4/adelaide,4/broken_hill,4/south,4/yancowinna`,"9.5|s":`4/darwin,4/north`,"8|s|03/13:01->10/02:00":`12/casey`,"8|s":`2/kuala_lumpur,2/makassar,2/singapore,4/perth,2/ujung_pandang,4/west,singapore`,"8|n":`2/brunei,2/hong_kong,2/irkutsk,2/kuching,2/macau,2/manila,2/shanghai,2/taipei,2/ulaanbaatar,2/chongqing,2/chungking,2/harbin,2/macao,2/ulan_bator,2/choibalsan,hongkong,prc,roc`,"8.75|s":`4/eucla`,"7|s":`12/davis,2/jakarta,9/christmas`,"7|n":`2/bangkok,2/barnaul,2/hovd,2/krasnoyarsk,2/novokuznetsk,2/novosibirsk,2/phnom_penh,2/pontianak,2/ho_chi_minh,2/tomsk,2/vientiane,2/saigon`,"6|s":`12/vostok`,"6|n":`2/almaty,2/bishkek,2/dhaka,2/omsk,2/qyzylorda,2/qostanay,2/thimphu,2/urumqi,9/chagos,2/dacca,2/kashgar,2/thimbu`,"6.5|n":`2/yangon,9/cocos,2/rangoon`,"5|s":`12/mawson,9/kerguelen`,"5|n":`2/aqtau,2/aqtobe,2/ashgabat,2/atyrau,2/dushanbe,2/karachi,2/oral,2/samarkand,2/tashkent,2/yekaterinburg,9/maldives,2/ashkhabad`,"5.75|n":`2/kathmandu,2/katmandu`,"5.5|n":`2/kolkata,2/colombo,2/calcutta`,"4|s":`9/reunion`,"4|n":`2/baku,2/dubai,2/muscat,2/tbilisi,2/yerevan,8/astrakhan,8/samara,8/saratov,8/ulyanovsk,8/volgograd,9/mahe,9/mauritius,2/volgograd`,"4.5|n":`2/kabul`,"3|s":`12/syowa,9/antananarivo`,"3|n|04/25:02->10/30:24":`0/cairo,egypt`,"3|n|04/12:04->10/25:02":`2/gaza,2/hebron`,"3|n|03/30:05->10/26:04":`2/famagusta,2/nicosia,8/athens,8/bucharest,8/helsinki,8/kyiv,8/mariehamn,8/riga,8/sofia,8/tallinn,8/uzhgorod,8/vilnius,8/zaporozhye,8/nicosia,8/kiev,eet`,"3|n|03/30:04->10/26:03":`8/chisinau,8/tiraspol`,"3|n|03/30:02->10/25:24":`2/beirut`,"3|n|03/28:04->10/26:02":`2/jerusalem,2/tel_aviv,israel`,"3|n":`0/addis_ababa,0/asmara,0/asmera,0/dar_es_salaam,0/djibouti,0/juba,0/kampala,0/mogadishu,0/nairobi,2/aden,2/amman,2/baghdad,2/bahrain,2/damascus,2/kuwait,2/qatar,2/riyadh,8/istanbul,8/kirov,8/minsk,8/moscow,8/simferopol,9/comoro,9/mayotte,2/istanbul,turkey,w-su`,"3.5|n":`2/tehran,iran`,"2|s|03/30:04->10/26:02":`12/troll`,"2|s":`0/gaborone,0/harare,0/johannesburg,0/lubumbashi,0/lusaka,0/maputo,0/maseru,0/mbabane`,"2|n|03/30:04->10/26:03":`0/ceuta,arctic/longyearbyen,8/amsterdam,8/andorra,8/belgrade,8/berlin,8/bratislava,8/brussels,8/budapest,8/busingen,8/copenhagen,8/gibraltar,8/ljubljana,8/luxembourg,8/madrid,8/malta,8/monaco,8/oslo,8/paris,8/podgorica,8/prague,8/rome,8/san_marino,8/sarajevo,8/skopje,8/stockholm,8/tirane,8/vaduz,8/vatican,8/vienna,8/warsaw,8/zagreb,8/zurich,3/jan_mayen,poland,cet,met`,"2|n":`0/blantyre,0/bujumbura,0/khartoum,0/kigali,0/tripoli,8/kaliningrad,libya`,"1|s":`0/brazzaville,0/kinshasa,0/luanda,0/windhoek`,"1|n|03/30:03->10/26:02":`3/canary,3/faroe,3/madeira,8/dublin,8/guernsey,8/isle_of_man,8/jersey,8/lisbon,8/london,3/faeroe,eire,8/belfast,gb-eire,gb,portugal,wet`,"1|n":`0/algiers,0/bangui,0/douala,0/lagos,0/libreville,0/malabo,0/ndjamena,0/niamey,0/porto-novo,0/tunis`,"14|n":`11/kiritimati`,"13|s":`11/apia,11/tongatapu`,"13|n":`11/enderbury,11/kanton,11/fakaofo`,"12|s|04/06:03->09/28:04":`12/mcmurdo,11/auckland,12/south_pole,nz`,"12|s":`11/fiji`,"12|n":`2/anadyr,2/kamchatka,2/srednekolymsk,11/funafuti,11/kwajalein,11/majuro,11/nauru,11/tarawa,11/wake,11/wallis,kwajalein`,"12.75|s|04/06:03->04/06:02":`11/chatham,nz-chat`,"11|s|04/06:03->10/05:04":`12/macquarie`,"11|s":`11/bougainville`,"11|n":`2/magadan,2/sakhalin,11/efate,11/guadalcanal,11/kosrae,11/noumea,11/pohnpei,11/ponape`,"11.5|n|04/06:03->10/05:04":`11/norfolk`,"10|s|04/06:03->10/05:04":`4/currie,4/hobart,4/melbourne,4/sydney,4/act,4/canberra,4/nsw,4/tasmania,4/victoria`,"10|s":`12/dumontdurville,4/brisbane,4/lindeman,11/port_moresby,4/queensland`,"10|n":`2/ust-nera,2/vladivostok,11/guam,11/saipan,11/chuuk,11/truk,11/yap`,"10.5|s|04/06:01->10/05:02":`4/lord_howe,4/lhi`,"0|s|02/23:03->04/06:04":`0/casablanca,0/el_aaiun`,"0|n|03/30:02->10/26:01":`3/azores`,"0|n|03/30:01->10/25:24":`1/scoresbysund`,"0|n":`0/abidjan,0/accra,0/bamako,0/banjul,0/bissau,0/conakry,0/dakar,0/freetown,0/lome,0/monrovia,0/nouakchott,0/ouagadougou,0/sao_tome,1/danmarkshavn,3/reykjavik,3/st_helena,13/gmt,13/utc,0/timbuktu,13/greenwich,13/uct,13/universal,13/zulu,gmt-0,gmt+0,gmt0,greenwich,iceland,uct,universal,utc,zulu,13/unknown,factory`,"-9|n|03/09:04->11/02:02":`1/adak,1/atka,us/aleutian`,"-9|n":`11/gambier`,"-9.5|n":`11/marquesas`,"-8|n|03/09:04->11/02:02":`1/anchorage,1/juneau,1/metlakatla,1/nome,1/sitka,1/yakutat,us/alaska`,"-8|n":`11/pitcairn`,"-7|n|03/09:04->11/02:02":`1/los_angeles,1/santa_isabel,1/tijuana,1/vancouver,1/ensenada,6/pacific,10/bajanorte,us/pacific-new,us/pacific`,"-7|n":`1/creston,1/dawson,1/dawson_creek,1/fort_nelson,1/hermosillo,1/mazatlan,1/phoenix,1/whitehorse,6/yukon,10/bajasur,us/arizona,mst`,"-6|s|04/05:22->09/06:24":`11/easter,7/easterisland`,"-6|n|04/07:02->10/27:02":`1/merida`,"-6|n|03/09:04->11/02:02":`1/boise,1/cambridge_bay,1/denver,1/edmonton,1/inuvik,1/north_dakota,1/ojinaga,1/ciudad_juarez,1/yellowknife,1/shiprock,6/mountain,navajo,us/mountain`,"-6|n":`1/bahia_banderas,1/belize,1/chihuahua,1/costa_rica,1/el_salvador,1/guatemala,1/managua,1/mexico_city,1/monterrey,1/regina,1/swift_current,1/tegucigalpa,11/galapagos,6/east-saskatchewan,6/saskatchewan,10/general`,"-5|s":`1/lima,1/rio_branco,1/porto_acre,5/acre`,"-5|n|03/09:04->11/02:02":`1/chicago,1/matamoros,1/menominee,1/rainy_river,1/rankin_inlet,1/resolute,1/winnipeg,1/indiana/knox,1/indiana/tell_city,1/north_dakota/beulah,1/north_dakota/center,1/north_dakota/new_salem,1/knox_in,6/central,us/central,us/indiana-starke`,"-5|n":`1/bogota,1/cancun,1/cayman,1/coral_harbour,1/eirunepe,1/guayaquil,1/jamaica,1/panama,1/atikokan,jamaica,est`,"-4|s|04/05:24->09/07:02":`1/santiago,7/continental`,"-4|s|03/22:24->10/05:02":`1/asuncion`,"-4|s":`1/campo_grande,1/cuiaba,1/la_paz,1/manaus,5/west`,"-4|n|03/09:04->11/02:02":`1/detroit,1/grand_turk,1/indiana,1/indianapolis,1/iqaluit,1/kentucky,1/louisville,1/montreal,1/nassau,1/new_york,1/nipigon,1/pangnirtung,1/port-au-prince,1/thunder_bay,1/toronto,1/indiana/marengo,1/indiana/petersburg,1/indiana/vevay,1/indiana/vincennes,1/indiana/winamac,1/kentucky/monticello,1/fort_wayne,1/indiana/indianapolis,1/kentucky/louisville,6/eastern,us/east-indiana,us/eastern,us/michigan`,"-4|n|03/09:02->11/02:01":`1/havana,cuba`,"-4|n":`1/anguilla,1/antigua,1/aruba,1/barbados,1/blanc-sablon,1/boa_vista,1/caracas,1/curacao,1/dominica,1/grenada,1/guadeloupe,1/guyana,1/kralendijk,1/lower_princes,1/marigot,1/martinique,1/montserrat,1/port_of_spain,1/porto_velho,1/puerto_rico,1/santo_domingo,1/st_barthelemy,1/st_kitts,1/st_lucia,1/st_thomas,1/st_vincent,1/tortola,1/virgin`,"-3|s":`1/argentina,1/buenos_aires,1/catamarca,1/cordoba,1/fortaleza,1/jujuy,1/mendoza,1/montevideo,1/punta_arenas,1/sao_paulo,12/palmer,12/rothera,3/stanley,1/argentina/la_rioja,1/argentina/rio_gallegos,1/argentina/salta,1/argentina/san_juan,1/argentina/san_luis,1/argentina/tucuman,1/argentina/ushuaia,1/argentina/comodrivadavia,1/argentina/buenos_aires,1/argentina/catamarca,1/argentina/cordoba,1/argentina/jujuy,1/argentina/mendoza,1/argentina/rosario,1/rosario,5/east`,"-3|n|03/09:04->11/02:02":`1/glace_bay,1/goose_bay,1/halifax,1/moncton,1/thule,3/bermuda,6/atlantic`,"-3|n":`1/araguaina,1/bahia,1/belem,1/cayenne,1/maceio,1/paramaribo,1/recife,1/santarem`,"-2|n|03/09:04->11/02:02":`1/miquelon`,"-2|n":`1/noronha,3/south_georgia,5/denoronha`,"-2.5|n|03/09:04->11/02:02":`1/st_johns,6/newfoundland`,"-1|n|03/30:01->10/25:24":`1/nuuk,1/godthab`,"-1|n":`3/cape_verde`,"-11|n":`11/midway,11/niue,11/pago_pago,11/samoa,us/samoa`,"-10|n":`11/honolulu,11/johnston,11/rarotonga,11/tahiti,us/hawaii,hst`},K_=[`africa`,`america`,`asia`,`atlantic`,`australia`,`brazil`,`canada`,`chile`,`europe`,`indian`,`mexico`,`pacific`,`antarctica`,`etc`],q_={};Object.keys(G_).forEach(e=>{let t=e.split(`|`),n={offset:Number(t[0]),hem:t[1]};t[2]&&(n.dst=t[2]),G_[e].split(`,`).forEach(e=>{e=e.replace(/(^[0-9]+)\//,(e,t)=>(t=Number(t),K_[t]+`/`)),q_[e]=n})}),q_.utc={offset:0,hem:`n`};for(let e=-14;e<=14;e+=.5){let t=e;t>0&&(t=`+`+t);let n=`etc/gmt`+t;q_[n]={offset:e*-1,hem:`n`},n=`utc/gmt`+t,q_[n]={offset:e*-1,hem:`n`}}var J_=`utc`,Y_=()=>{if(typeof Intl>`u`||Intl.DateTimeFormat===void 0)return null;let e=Intl.DateTimeFormat();if(e===void 0||e.resolvedOptions===void 0)return null;let t=e.resolvedOptions().timeZone;return t?t.toLowerCase():null},X_=()=>{let e=Y_();return e===null?J_:e},Z_=/(-?[0-9]+)h(rs)?/i,Q_=/(-?[0-9]+)/,$_=/utc([\-+]?[0-9]+)/i,ev=/gmt([\-+]?[0-9]+)/i,tv=function(e){return e=Number(e),e>=-13&&e<=13?(e*=-1,e=(e>0?`+`:``)+e,`etc/gmt`+e):null},nv=function(e){let t=e.match(Z_);return t!==null||(t=e.match($_),t!==null)?tv(t[1]):(t=e.match(ev),t===null?(t=e.match(Q_),t===null?null:tv(t[1])):tv(Number(t[1])*-1))},rv=X_(),iv=Object.keys(q_).reduce((e,t)=>{let n=t.split(`/`)[1]||``;return n=n.replace(/_/g,` `),e[n]=t,e},{}),av=e=>(e=e.replace(/ time/g,``),e=e.replace(/ (standard|daylight|summer)/g,``),e=e.replace(/\b(east|west|north|south)ern/g,`$1`),e=e.replace(/\b(africa|america|australia)n/g,`$1`),e=e.replace(/\beuropean/g,`europe`),e=e.replace(/islands/g,`island`),e),ov=(e,t)=>{if(!e)return t.hasOwnProperty(rv)||(console.warn(`Unrecognized IANA id '${rv}'. Setting fallback tz to UTC.`),rv=`utc`),rv;typeof e!=`string`&&console.error(`Timezone must be a string - recieved: '`,e,`'
10
+ `);let n=e.trim();if(n=n.toLowerCase(),t.hasOwnProperty(n)===!0||(n=av(n),t.hasOwnProperty(n)===!0))return n;if(iv.hasOwnProperty(n)===!0)return iv[n];if(/[0-9]/.test(n)===!0){let e=nv(n);if(e)return e}throw Error(`Spacetime: Cannot find timezone named: '`+e+`'. Please enter an IANA timezone id.`)};function sv(e){return e%4==0&&e%100!=0||e%400==0}function cv(e){return Object.prototype.toString.call(e)===`[object Date]`&&!isNaN(e.valueOf())}function lv(e){return Object.prototype.toString.call(e)===`[object Array]`}function uv(e){return Object.prototype.toString.call(e)===`[object Object]`}function dv(e){return Object.prototype.toString.call(e)===`[object Boolean]`}function fv(e,t=2){return e+=``,e.length>=t?e:Array(t-e.length+1).join(`0`)+e}function pv(e){return e?e[0].toUpperCase()+e.substr(1):``}function mv(e){let t=e%10,n=e%100;return t===1&&n!==11?e+`st`:t===2&&n!==12?e+`nd`:t===3&&n!==13?e+`rd`:e+`th`}function hv(e){return e=String(e),e=e.replace(/([0-9])(st|nd|rd|th)$/i,`$1`),parseInt(e,10)}function gv(e=``){return e=e.toLowerCase().trim(),e=e.replace(/ies$/,`y`),e=e.replace(/s$/,``),e=e.replace(/-/g,``),e===`day`||e===`days`?`date`:e===`min`||e===`mins`?`minute`:e}function _v(e){return typeof e==`number`?e:cv(e)?e.getTime():e.epoch||e.epoch===0?e.epoch:null}function vv(e,t){return uv(e)===!1?t.clone().set(e):e}function yv(e,t=``){let n=e>0?`+`:`-`,r=Math.abs(e);return`${n}${fv(parseInt(``+r,10))}${t}${fv(r%1*60)}`}var bv={year:new Date().getFullYear(),month:0,date:1},xv={parseArray:(e,t,n)=>{if(t.length===0)return e;let r=[`year`,`month`,`date`,`hour`,`minute`,`second`,`millisecond`];for(let i=0;i<r.length;i++){let a=t[i]||n[r[i]]||bv[r[i]]||0;e=e[r[i]](a)}return e},parseObject:(e,t,n)=>{if(Object.keys(t).length===0)return e;t=Object.assign({},bv,n,t);let r=Object.keys(t);for(let i=0;i<r.length;i++){let a=r[i];if(e[a]===void 0||typeof e[a]!=`function`||t[a]===null||t[a]===void 0||t[a]===``)continue;let o=t[a]||n[a]||bv[a]||0;e=e[a](o)}return e},parseNumber:function(e,t){return t>0&&t<25e8&&e.silent===!1&&(console.warn(` - Warning: You are setting the date to January 1970.`),console.warn(` - did input seconds instead of milliseconds?`)),e.epoch=t,e}},Sv=function(e){return e.epoch=Date.now(),Object.keys(e._today||{}).forEach(t=>{typeof e[t]==`function`&&(e=e[t](e._today[t]))}),e},Cv={now:e=>Sv(e),today:e=>Sv(e),tonight:e=>(e=Sv(e),e=e.hour(18),e),tomorrow:e=>(e=Sv(e),e=e.add(1,`day`),e=e.startOf(`day`),e),yesterday:e=>(e=Sv(e),e=e.subtract(1,`day`),e=e.startOf(`day`),e),christmas:e=>{let t=Sv(e).year();return e=e.set([t,11,25,18,0,0]),e},"new years":e=>{let t=Sv(e).year();return e=e.set([t,11,31,18,0,0]),e}};Cv[`new years eve`]=Cv[`new years`];var wv=function(e){return e=e.replace(/\b(mon|tues?|wed|wednes|thur?s?|fri|sat|satur|sun)(day)?\b/i,``),e=e.replace(/([0-9])(th|rd|st|nd)/,`$1`),e=e.replace(/,/g,``),e=e.replace(/ +/g,` `).trim(),e},Tv={millisecond:1};Tv.second=1e3,Tv.minute=6e4,Tv.hour=36e5,Tv.day=864e5,Tv.date=Tv.day,Tv.month=864e5*29.5,Tv.week=6048e5,Tv.year=3154e7,Object.keys(Tv).forEach(e=>{Tv[e+`s`]=Tv[e]});var Ev=(e,t,n,r,i)=>{let a=e.d[n]();if(a===t)return;let o=i===null?null:e.d[i](),s=e.epoch,c=t-a;e.epoch+=Tv[r]*c,r===`day`&&Math.abs(c)>28&&t<28&&(e.epoch+=Tv.hour),i!==null&&o!==e.d[i]()&&(e.epoch=s);let l=Tv[r]/2;for(;e.d[n]()<t;)e.epoch+=l;for(;e.d[n]()>t;)e.epoch-=l;i!==null&&o!==e.d[i]()&&(e.epoch=s)},Dv={year:{valid:e=>e>-4e3&&e<4e3,walkTo:(e,t)=>Ev(e,t,`getFullYear`,`year`,null)},month:{valid:e=>e>=0&&e<=11,walkTo:(e,t)=>{let n=e.d,r=n.getMonth(),i=e.epoch,a=n.getFullYear();if(r===t)return;let o=t-r;for(e.epoch+=Tv.day*(o*28),a!==e.d.getFullYear()&&(e.epoch=i);e.d.getMonth()<t;)e.epoch+=Tv.day;for(;e.d.getMonth()>t;)e.epoch-=Tv.day}},date:{valid:e=>e>0&&e<=31,walkTo:(e,t)=>Ev(e,t,`getDate`,`day`,`getMonth`)},hour:{valid:e=>e>=0&&e<24,walkTo:(e,t)=>Ev(e,t,`getHours`,`hour`,`getDate`)},minute:{valid:e=>e>=0&&e<60,walkTo:(e,t)=>Ev(e,t,`getMinutes`,`minute`,`getHours`)},second:{valid:e=>e>=0&&e<60,walkTo:(e,t)=>{e.epoch=e.seconds(t).epoch}},millisecond:{valid:e=>e>=0&&e<1e3,walkTo:(e,t)=>{e.epoch=e.milliseconds(t).epoch}}},Ov=(e,t)=>{let n=Object.keys(Dv),r=e.clone();for(let i=0;i<n.length;i++){let a=n[i],o=t[a];if(o===void 0&&(o=r[a]()),typeof o==`string`&&(o=parseInt(o,10)),!Dv[a].valid(o)){e.epoch=null,e.silent===!1&&console.warn(`invalid `+a+`: `+o);return}Dv[a].walkTo(e,o)}},kv=[31,28,31,30,31,30,31,31,30,31,30,31],Av=[`jan`,`feb`,`mar`,`apr`,`may`,`jun`,`jul`,`aug`,`sep`,`oct`,`nov`,`dec`],jv=[`january`,`february`,`march`,`april`,`may`,`june`,`july`,`august`,`september`,`october`,`november`,`december`];function Mv(){let e={sep:8};for(let t=0;t<Av.length;t++)e[Av[t]]=t;for(let t=0;t<jv.length;t++)e[jv[t]]=t;return e}function Nv(){return Av}function Pv(){return jv}function Fv(){return Mv()}function Iv(e){Av=e.short||Av,jv=e.long||jv}var Lv=(e,t)=>{if(!t)return e;t=t.trim().toLowerCase();let n=0;if(/^[+-]?[0-9]{2}:[0-9]{2}$/.test(t)&&(/:00/.test(t)===!0&&(t=t.replace(/:00/,``)),/:30/.test(t)===!0&&(t=t.replace(/:30/,`.5`))),/^[+-]?[0-9]{4}$/.test(t)&&(t=t.replace(/30$/,`.5`)),n=parseFloat(t),Math.abs(n)>100&&(n/=100),n===0||t===`Z`||t===`z`)return e.tz=`etc/gmt`,e;n*=-1,n>=0&&(n=`+`+n);let r=`etc/gmt`+n;return e.timezones[r]&&(e.tz=r),e},Rv=function(e=``){return e=String(e),e.length>3?e=e.substring(0,3):e.length===1?e+=`00`:e.length===2&&(e+=`0`),Number(e)||0},zv=(e,t=``)=>{t=t.replace(/^\s+/,``).toLowerCase();let n=t.match(/([0-9]{1,2}):([0-9]{1,2}):?([0-9]{1,2})?[:.]?([0-9]{1,4})?/);if(n!==null){let[,r,i,a,o]=n;if(r=Number(r),r<0||r>24||(i=Number(i),n[2].length<2||i<0||i>59))return e.startOf(`day`);e=e.hour(r),e=e.minute(i),e=e.seconds(a||0),e=e.millisecond(Rv(o));let s=t.match(/[0-9] ?(am|pm)\b/);return s!==null&&s[1]&&(e=e.ampm(s[1])),e}if(n=t.match(/([0-9]+) ?(am|pm)/),n!==null&&n[1]){let t=Number(n[1]);return t>12||t<1?e.startOf(`day`):(e=e.hour(n[1]||0),e=e.ampm(n[2]),e=e.startOf(`hour`),e)}return e=e.startOf(`day`),e},Bv=Fv(),Vv=e=>{if(kv.hasOwnProperty(e.month)!==!0)return!1;if(e.month===1)return sv(e.year)&&e.date<=29?!0:e.date<=28;let t=kv[e.month]||0;return e.date<=t},Hv=(e=``,t)=>{if(e=e.trim(),/^'[0-9][0-9]$/.test(e)===!0){let t=Number(e.replace(/'/,``));return t>50?1900+t:2e3+t}let n=parseInt(e,10);return!n&&t&&(n=t.year),n||=new Date().getFullYear(),n},Uv=function(e){return e=e.toLowerCase().trim(),e===`sept`?Bv.sep:Bv[e]},Wv=[{reg:/^(-?0{0,2}[0-9]{3,4})-([0-9]{1,2})-([0-9]{1,2})[T| ]([0-9.:]+)(Z|[0-9-+:]+)?$/i,parse:(e,t)=>{let n={year:t[1],month:parseInt(t[2],10)-1,date:t[3]};return Vv(n)===!1?(e.epoch=null,e):(Lv(e,t[5]),Ov(e,n),e=zv(e,t[4]),e)}},{reg:/^([0-9]{4})[\-/. ]([0-9]{1,2})[\-/. ]([0-9]{1,2})( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let n={year:t[1],month:parseInt(t[2],10)-1,date:parseInt(t[3],10)};return n.month>=12&&(n.date=parseInt(t[2],10),n.month=parseInt(t[3],10)-1),Vv(n)===!1?(e.epoch=null,e):(Ov(e,n),e=zv(e,t[4]),e)}},{reg:/^([0-9]{4})[\-/. ]([a-z]+)[\-/. ]([0-9]{1,2})( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let n={year:Hv(t[1],e._today),month:Uv(t[2]),date:hv(t[3]||``)};return Vv(n)===!1?(e.epoch=null,e):(Ov(e,n),e=zv(e,t[4]),e)}},{reg:/^([0-9]{1,2})[-/.]([0-9]{1,2})[\-/.]?([0-9]{4})?( [0-9]{1,2}:[0-9]{2}:?[0-9]{0,2} ?(am|pm|gmt))?$/i,parse:(e,t)=>{let n=parseInt(t[1],10)-1,r=parseInt(t[2],10);(e.british||n>=12)&&(r=parseInt(t[1],10),n=parseInt(t[2],10)-1);let i={date:r,month:n,year:Hv(t[3],e._today)||new Date().getFullYear()};return Vv(i)===!1?(e.epoch=null,e):(Ov(e,i),e=zv(e,t[4]),e)}},{reg:/^([a-z]+)[\-/. ]([0-9]{1,2})[\-/. ]?([0-9]{4}|'[0-9]{2})?( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let n={year:Hv(t[3],e._today),month:Uv(t[1]),date:hv(t[2]||``)};return Vv(n)===!1?(e.epoch=null,e):(Ov(e,n),e=zv(e,t[4]),e)}},{reg:/^([a-z]+) ([0-9]{1,2})( [0-9]{4})?( ([0-9:]+( ?am| ?pm| ?gmt)?))?$/i,parse:(e,t)=>{let n={year:Hv(t[3],e._today),month:Uv(t[1]),date:hv(t[2]||``)};return Vv(n)===!1?(e.epoch=null,e):(Ov(e,n),e=zv(e,t[4]),e)}},{reg:/^([a-z]+) ([0-9]{1,2}) ([0-9]{1,2}:[0-9]{2}:?[0-9]{0,2})( \+[0-9]{4})?( [0-9]{4})?$/i,parse:(e,t)=>{let[,n,r,i,a,o]=t,s={year:Hv(o,e._today),month:Uv(n),date:hv(r||``)};return Vv(s)===!1?(e.epoch=null,e):(Ov(e,s),e=Lv(e,a),e=zv(e,i),e)}},{reg:/^([0-9]{1,2})[-/]([a-z]+)[\-/]?([0-9]{4})?$/i,parse:(e,t)=>{let n={year:Hv(t[3],e._today),month:Uv(t[2]),date:hv(t[1]||``)};return Vv(n)===!1?(e.epoch=null,e):(Ov(e,n),e=zv(e,t[4]),e)}},{reg:/^([0-9]{1,2})( [a-z]+)( [0-9]{4}| '[0-9]{2})? ?([0-9]{1,2}:[0-9]{2}:?[0-9]{0,2} ?(am|pm|gmt))?$/i,parse:(e,t)=>{let n={year:Hv(t[3],e._today),month:Uv(t[2]),date:hv(t[1])};return!n.month||Vv(n)===!1?(e.epoch=null,e):(Ov(e,n),e=zv(e,t[4]),e)}},{reg:/^([0-9]{1,2})[. \-/]([a-z]+)[. \-/]([0-9]{4})?( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let n={date:Number(t[1]),month:Uv(t[2]),year:Number(t[3])};return Vv(n)===!1?(e.epoch=null,e):(Ov(e,n),e=e.startOf(`day`),e=zv(e,t[4]),e)}},{reg:/^([0-9]{4})[\-/]([0-9]{2})$/,parse:(e,t)=>{let n={year:t[1],month:parseInt(t[2],10)-1,date:1};return Vv(n)===!1?(e.epoch=null,e):(Ov(e,n),e=zv(e,t[4]),e)}},{reg:/^([a-z]+) ([0-9]{4})$/i,parse:(e,t)=>{let n={year:Hv(t[2],e._today),month:Uv(t[1]),date:e._today.date||1};return Vv(n)===!1?(e.epoch=null,e):(Ov(e,n),e=zv(e,t[4]),e)}},{reg:/^(q[0-9])( of)?( [0-9]{4})?/i,parse:(e,t)=>{let n=t[1]||``;e=e.quarter(n);let r=t[3]||``;return r&&(r=r.trim(),e=e.year(r)),e}},{reg:/^(spring|summer|winter|fall|autumn)( of)?( [0-9]{4})?/i,parse:(e,t)=>{let n=t[1]||``;e=e.season(n);let r=t[3]||``;return r&&(r=r.trim(),e=e.year(r)),e}},{reg:/^[0-9,]+ ?b\.?c\.?$/i,parse:(e,t)=>{let n=t[0]||``;n=n.replace(/^([0-9,]+) ?b\.?c\.?$/i,`-$1`);let r=new Date,i={year:parseInt(n.trim(),10),month:r.getMonth(),date:r.getDate()};return Vv(i)===!1?(e.epoch=null,e):(Ov(e,i),e=zv(e),e)}},{reg:/^[0-9,]+ ?(a\.?d\.?|c\.?e\.?)$/i,parse:(e,t)=>{let n=t[0]||``;n=n.replace(/,/g,``);let r=new Date,i={year:parseInt(n.trim(),10),month:r.getMonth(),date:r.getDate()};return Vv(i)===!1?(e.epoch=null,e):(Ov(e,i),e=zv(e),e)}},{reg:/^[0-9]{4}( ?a\.?d\.?)?$/i,parse:(e,t)=>{let n=e._today;n.month&&!n.date&&(n.date=1);let r=new Date,i={year:Hv(t[0],n),month:n.month||r.getMonth(),date:n.date||r.getDate()};return Vv(i)===!1?(e.epoch=null,e):(Ov(e,i),e=zv(e),e)}}],Gv=function(e,t,n){for(let r=0;r<Wv.length;r++){let i=t.match(Wv[r].reg);if(i){let t=Wv[r].parse(e,i,n);if(t!==null&&t.isValid())return t}}return e.silent===!1&&console.warn(`Warning: couldn't parse date-string: '`+t+`'`),e.epoch=null,e},{parseArray:Kv,parseObject:qv,parseNumber:Jv}=xv,Yv={year:new Date().getFullYear(),month:0,date:1},Xv=(e,t)=>{let n=e._today||Yv;if(typeof t==`number`)return Jv(e,t);if(e.epoch=Date.now(),e._today&&uv(e._today)&&Object.keys(e._today).length>0){let t=qv(e,n,Yv);t.isValid()&&(e.epoch=t.epoch)}return t==null||t===``?e:cv(t)===!0?(e.epoch=t.getTime(),e):lv(t)===!0?(e=Kv(e,t,n),e):uv(t)===!0?t.epoch?(e.epoch=t.epoch,e.tz=t.tz,e):(e=qv(e,t,n),e):typeof t==`string`?(t=wv(t),Cv.hasOwnProperty(t)===!0?(e=Cv[t](e),e):Gv(e,t)):e},Zv=[`sun`,`mon`,`tue`,`wed`,`thu`,`fri`,`sat`],Qv=[`sunday`,`monday`,`tuesday`,`wednesday`,`thursday`,`friday`,`saturday`];function $v(){return Zv}function ey(){return Qv}function ty(e){Zv=e.short||Zv,Qv=e.long||Qv}var ny={mo:1,tu:2,we:3,th:4,fr:5,sa:6,su:7,tues:2,weds:3,wedn:3,thur:4,thurs:4},ry=!0;function iy(){return ry}function ay(e){ry=e}var oy=e=>{let t=e.timezone().current.offset;return t?yv(t,`:`):`Z`},sy=e=>iy()?pv(e):e,cy=e=>e>=0?fv(e,4):(e=Math.abs(e),`-`+fv(e,4)),ly={day:e=>sy(e.dayName()),"day-short":e=>sy($v()[e.day()]),"day-number":e=>e.day(),"day-ordinal":e=>mv(e.day()),"day-pad":e=>fv(e.day()),date:e=>e.date(),"date-ordinal":e=>mv(e.date()),"date-pad":e=>fv(e.date()),month:e=>sy(e.monthName()),"month-short":e=>sy(Nv()[e.month()]),"month-number":e=>e.month(),"month-ordinal":e=>mv(e.month()),"month-pad":e=>fv(e.month()),"iso-month":e=>fv(e.month()+1),year:e=>{let t=e.year();return t>0?t:(t=Math.abs(t),t+` BC`)},"year-short":e=>{let t=e.year();return t>0?`'${String(e.year()).substr(2,4)}`:(t=Math.abs(t),t+` BC`)},"iso-year":e=>{let t=e.year(),n=t<0,r=fv(Math.abs(t),4);return n&&(r=fv(r,6),r=`-`+r),r},time:e=>e.time(),"time-24":e=>`${e.hour24()}:${fv(e.minute())}`,hour:e=>e.hour12(),"hour-pad":e=>fv(e.hour12()),"hour-24":e=>e.hour24(),"hour-24-pad":e=>fv(e.hour24()),minute:e=>e.minute(),"minute-pad":e=>fv(e.minute()),second:e=>e.second(),"second-pad":e=>fv(e.second()),millisecond:e=>e.millisecond(),"millisecond-pad":e=>fv(e.millisecond(),3),ampm:e=>e.ampm(),AMPM:e=>e.ampm().toUpperCase(),quarter:e=>`Q`+e.quarter(),season:e=>e.season(),era:e=>e.era(),json:e=>e.json(),timezone:e=>e.timezone().name,offset:e=>oy(e),numeric:e=>`${e.year()}/${fv(e.month()+1)}/${fv(e.date())}`,"numeric-us":e=>`${fv(e.month()+1)}/${fv(e.date())}/${e.year()}`,"numeric-uk":e=>`${fv(e.date())}/${fv(e.month()+1)}/${e.year()}`,"mm/dd":e=>`${fv(e.month()+1)}/${fv(e.date())}`,iso:e=>`${e.format(`iso-year`)}-${fv(e.month()+1)}-${fv(e.date())}T${fv(e.h24())}:${fv(e.minute())}:${fv(e.second())}.${fv(e.millisecond(),3)}${oy(e)}`,"iso-short":e=>{let t=fv(e.month()+1),n=fv(e.date());return`${cy(e.year())}-${t}-${n}`},"iso-utc":e=>new Date(e.epoch).toISOString(),nice:e=>`${Nv()[e.month()]} ${mv(e.date())}, ${e.time()}`,"nice-24":e=>`${Nv()[e.month()]} ${mv(e.date())}, ${e.hour24()}:${fv(e.minute())}`,"nice-year":e=>`${Nv()[e.month()]} ${mv(e.date())}, ${e.year()}`,"nice-day":e=>`${$v()[e.day()]} ${sy(Nv()[e.month()])} ${mv(e.date())}`,"nice-full":e=>`${e.dayName()} ${sy(e.monthName())} ${mv(e.date())}, ${e.time()}`,"nice-full-24":e=>`${e.dayName()} ${sy(e.monthName())} ${mv(e.date())}, ${e.hour24()}:${fv(e.minute())}`},uy={"day-name":`day`,"month-name":`month`,"iso 8601":`iso`,"time-h24":`time-24`,"time-12":`time`,"time-h12":`time`,tz:`timezone`,"day-num":`day-number`,"month-num":`month-number`,"month-iso":`iso-month`,"year-iso":`iso-year`,"nice-short":`nice`,"nice-short-24":`nice-24`,mdy:`numeric-us`,dmy:`numeric-uk`,ymd:`numeric`,"yyyy/mm/dd":`numeric`,"mm/dd/yyyy":`numeric-us`,"dd/mm/yyyy":`numeric-us`,"little-endian":`numeric-uk`,"big-endian":`numeric`,"day-nice":`nice-day`};Object.keys(uy).forEach(e=>ly[e]=ly[uy[e]]);var dy=(e,t=``)=>{if(e.isValid()!==!0)return``;if(ly.hasOwnProperty(t)){let n=ly[t](e)||``;return t!==`json`&&(n=String(n),t.toLowerCase()!==`ampm`&&(n=sy(n))),n}return t.indexOf(`{`)===-1?e.format(`iso-short`):(t=t.replace(/\{(.+?)\}/g,(t,n)=>{if(n=n.trim(),n!==`AMPM`&&(n=n.toLowerCase()),ly.hasOwnProperty(n)){let t=String(ly[n](e));return n.toLowerCase()===`ampm`?t:sy(t)}return``}),t)},fy={G:e=>e.era(),GG:e=>e.era(),GGG:e=>e.era(),GGGG:e=>e.era()===`AD`?`Anno Domini`:`Before Christ`,y:e=>e.year(),yy:e=>fv(Number(String(e.year()).substr(2,4))),yyy:e=>e.year(),yyyy:e=>e.year(),yyyyy:e=>`0`+e.year(),Q:e=>e.quarter(),QQ:e=>e.quarter(),QQQ:e=>e.quarter(),QQQQ:e=>e.quarter(),M:e=>e.month()+1,MM:e=>fv(e.month()+1),MMM:e=>e.format(`month-short`),MMMM:e=>e.format(`month`),w:e=>e.week(),ww:e=>fv(e.week()),d:e=>e.date(),dd:e=>fv(e.date()),D:e=>e.dayOfYear(),DD:e=>fv(e.dayOfYear()),DDD:e=>fv(e.dayOfYear(),3),E:e=>e.format(`day-short`),EE:e=>e.format(`day-short`),EEE:e=>e.format(`day-short`),EEEE:e=>e.format(`day`),EEEEE:e=>e.format(`day`)[0],e:e=>e.day(),ee:e=>e.day(),eee:e=>e.format(`day-short`),eeee:e=>e.format(`day`),eeeee:e=>e.format(`day`)[0],a:e=>e.ampm().toUpperCase(),aa:e=>e.ampm().toUpperCase(),aaa:e=>e.ampm().toUpperCase(),aaaa:e=>e.ampm().toUpperCase(),h:e=>e.h12(),hh:e=>fv(e.h12()),H:e=>e.hour(),HH:e=>fv(e.hour()),m:e=>e.minute(),mm:e=>fv(e.minute()),s:e=>e.second(),ss:e=>fv(e.second()),SSS:e=>fv(e.millisecond(),3),A:e=>e.epoch-e.startOf(`day`).epoch,z:e=>e.timezone().name,zz:e=>e.timezone().name,zzz:e=>e.timezone().name,zzzz:e=>e.timezone().name,Z:e=>yv(e.timezone().current.offset),ZZ:e=>yv(e.timezone().current.offset),ZZZ:e=>yv(e.timezone().current.offset),ZZZZ:e=>yv(e.timezone().current.offset,`:`)},py=(e,t,n)=>{let r=e,i=t;for(let a=0;a<n;a+=1)fy[r]=fy[i],r+=e,i+=t};py(`q`,`Q`,4),py(`L`,`M`,4),py(`Y`,`y`,4),py(`c`,`e`,4),py(`k`,`H`,2),py(`K`,`h`,2),py(`S`,`s`,2),py(`v`,`z`,4),py(`V`,`Z`,4);var my=function(e){for(let t=0;t<e.length;t+=1)if(e[t]===`'`)for(let n=t+1;n<e.length;n+=1){if(e[n]&&(e[t]+=e[n]),e[n]===`'`){e[n]=null;break}e[n]=null}return e.filter(e=>e)},hy=function(e){for(let t=0;t<e.length;t+=1){let n=e[t];for(let r=t+1;r<e.length&&e[r]===n;r+=1)e[t]+=e[r],e[r]=null}return e=e.filter(e=>e),e=e.map(e=>(e===`''`&&(e=`'`),e)),e},gy=(e,t)=>{let n=t.split(``);return n=my(n),n=hy(n),n.reduce((t,n)=>(fy[n]===void 0?(/^'.+'$/.test(n)&&(n=n.replace(/'/g,``)),t+=n):t+=fy[n](e)||``,t),``)},_y=[`year`,`season`,`quarter`,`month`,`week`,`day`,`quarterHour`,`hour`,`minute`],vy=function(e,t){let n=e.clone().startOf(t),r=e.clone().endOf(t).epoch-n.epoch,i=(e.epoch-n.epoch)/r;return parseFloat(i.toFixed(2))},yy=(e,t)=>{if(t)return t=gv(t),vy(e,t);let n={};return _y.forEach(t=>{n[t]=vy(e,t)}),n},by=(e,t)=>{let n=e.progress();return t=gv(t),t===`quarterhour`&&(t=`quarterHour`),n[t]===void 0?e.silent===!1&&console.warn(`no known unit '`+t+`'`):(n[t]>.5&&(e=e.add(1,t)),e=e.startOf(t)),e},xy=(e,t,n)=>{let r=0;for(e=e.clone();e.isBefore(t);)e=e.add(1,n),r+=1;return e.isAfter(t,n)&&--r,r},Sy=(e,t,n)=>e.isBefore(t)?xy(e,t,n):xy(t,e,n)*-1,Cy=(e,t)=>{let n=t.year()-e.year();return e=e.year(t.year()),e.isAfter(t)&&--n,n},wy=function(e,t){let n=t.epoch-e.epoch,r={milliseconds:n,seconds:parseInt(n/1e3,10)};r.minutes=parseInt(r.seconds/60,10),r.hours=parseInt(r.minutes/60,10);let i=e.clone();return r.years=Cy(i,t),i=e.add(r.years,`year`),r.months=r.years*12,i=e.add(r.months,`month`),r.months+=Sy(i,t,`month`),r.quarters=r.years*4,r.quarters+=parseInt(r.months%12/3,10),r.weeks=r.years*52,i=e.add(r.weeks,`week`),r.weeks+=Sy(i,t,`week`),r.days=r.weeks*7,i=e.add(r.days,`day`),r.days+=Sy(i,t,`day`),r},Ty=function(e){return Object.keys(e).forEach(t=>{e[t]*=-1}),e},Ey=function(e,t,n){t=vv(t,e);let r=!1;if(e.isAfter(t)){let n=e;e=t,t=n,r=!0}let i=wy(e,t);return r&&(i=Ty(i)),n?(n=gv(n),/s$/.test(n)!==!0&&(n+=`s`),n===`dates`&&(n=`days`),i[n]):i},Dy=e=>Math.abs(e)||0,Oy=function(e){let t=`P`;return t+=Dy(e.years)+`Y`,t+=Dy(e.months)+`M`,t+=Dy(e.days)+`DT`,t+=Dy(e.hours)+`H`,t+=Dy(e.minutes)+`M`,t+=Dy(e.seconds)+`S`,t};function ky(e,t){let n=e.isBefore(t),r=n?t:e,i=n?e:t;i=i.clone();let a={years:0,months:0,days:0,hours:0,minutes:0,seconds:0};return Object.keys(a).forEach(e=>{if(i.isSame(r,e))return;let t=i.diff(r,e);i=i.add(t,e),a[e]=t}),n&&Object.keys(a).forEach(e=>{a[e]!==0&&(a[e]*=-1)}),a}var Ay={second:`second`,seconds:`seconds`,minute:`minute`,minutes:`minutes`,hour:`hour`,hours:`hours`,day:`day`,days:`days`,month:`month`,months:`months`,year:`year`,years:`years`};function jy(e){return Ay[e]||``}function My(e={}){Ay={second:e.second||Ay.second,seconds:e.seconds||Ay.seconds,minute:e.minute||Ay.minute,minutes:e.minutes||Ay.minutes,hour:e.hour||Ay.hour,hours:e.hours||Ay.hours,day:e.day||Ay.day,days:e.days||Ay.days,month:e.month||Ay.month,months:e.months||Ay.months,year:e.year||Ay.year,years:e.years||Ay.years}}var Ny=`past`,Py=`future`,Fy=`present`,Iy=`now`,Ly=`almost`,Ry=`over`,zy=e=>`${e} ago`,By=e=>`in ${e}`;function Vy(e){return zy(e)}function Hy(e){return By(e)}function Uy(){return Ny}function Wy(){return Py}function Gy(){return Fy}function Ky(){return Iy}function qy(){return Ly}function Jy(){return Ry}function Yy(e){zy=e.pastDistance||zy,By=e.futureDistance||By,Ny=e.past||Ny,Py=e.future||Py,Fy=e.present||Fy,Iy=e.now||Iy,Ly=e.almost||Ly,Ry=e.over||Ry}var Xy={months:{almost:10,over:4},days:{almost:25,over:10},hours:{almost:20,over:8},minutes:{almost:50,over:20},seconds:{almost:50,over:20}};function Zy(e,t){return e===1?e+` `+jy(t.slice(0,-1)):e+` `+jy(t)}var Qy=function(e){let t=null,n=null,r=[],i=[];return Object.keys(e).forEach((a,o,s)=>{let c=Math.abs(e[a]);if(c===0)return;r.push(c+a[0]);let l=Zy(c,a);if(i.push(l),!t){if(t=l,n=l,o>4)return;let r=s[o+1],i=Math.abs(e[r]);i>Xy[r].almost?(t=Zy(c+1,a),n=qy()+` `+t):i>Xy[r].over&&(n=Jy()+` `+l)}}),{qualified:n,rounded:t,abbreviated:r,englishValues:i}},$y=(e,t)=>{t=vv(t,e);let n=ky(e,t);if(Object.keys(n).every(e=>!n[e])===!0)return{diff:n,rounded:Ky(),qualified:Ky(),precise:Ky(),abbreviated:[],iso:`P0Y0M0DT0H0M0S`,direction:Gy()};let r,i=Wy(),{rounded:a,qualified:o,englishValues:s,abbreviated:c}=Qy(n);r=s.splice(0,2).join(`, `),e.isAfter(t)===!0?(a=Vy(a),o=Vy(o),r=Vy(r),i=Uy()):(a=Hy(a),o=Hy(o),r=Hy(r));let l=Oy(n);return{diff:n,rounded:a,qualified:o,precise:r,abbreviated:c,iso:l,direction:i}},eb={north:[[`spring`,2,1],[`summer`,5,1],[`fall`,8,1],[`autumn`,8,1],[`winter`,11,1]],south:[[`fall`,2,1],[`autumn`,2,1],[`winter`,5,1],[`spring`,8,1],[`summer`,11,1]]},tb=[null,[0,1],[3,1],[6,1],[9,1]],nb={second:e=>(Ov(e,{millisecond:0}),e),minute:e=>(Ov(e,{second:0,millisecond:0}),e),quarterhour:e=>{let t=e.minutes();return e=t>=45?e.minutes(45):t>=30?e.minutes(30):t>=15?e.minutes(15):e.minutes(0),Ov(e,{second:0,millisecond:0}),e},hour:e=>(Ov(e,{minute:0,second:0,millisecond:0}),e),day:e=>(Ov(e,{hour:0,minute:0,second:0,millisecond:0}),e),week:e=>{let t=e.clone();return e=e.day(e._weekStart),e.isAfter(t)&&(e=e.subtract(1,`week`)),Ov(e,{hour:0,minute:0,second:0,millisecond:0}),e},month:e=>(Ov(e,{date:1,hour:0,minute:0,second:0,millisecond:0}),e),quarter:e=>{let t=e.quarter();return tb[t]&&Ov(e,{month:tb[t][0],date:tb[t][1],hour:0,minute:0,second:0,millisecond:0}),e},season:e=>{let t=e.season(),n=`north`;e.hemisphere()===`South`&&(n=`south`);for(let r=0;r<eb[n].length;r++)if(eb[n][r][0]===t){let i=e.year();return t===`winter`&&e.month()<3&&--i,Ov(e,{year:i,month:eb[n][r][1],date:eb[n][r][2],hour:0,minute:0,second:0,millisecond:0}),e}return e},year:e=>(Ov(e,{month:0,date:1,hour:0,minute:0,second:0,millisecond:0}),e),decade:e=>{e=e.startOf(`year`);let t=e.year(),n=parseInt(t/10,10)*10;return e=e.year(n),e},century:e=>{e=e.startOf(`year`);let t=e.year(),n=parseInt(t/100,10)*100;return e=e.year(n),e}};nb.date=nb.day;var rb=(e,t)=>{let n=e.clone();return t=gv(t),nb[t]?nb[t](n):t===`summer`||t===`winter`?(n=n.season(t),nb.season(n)):n},ib=(e,t)=>{let n=e.clone();return t=gv(t),nb[t]?(n=nb[t](n),n=n.add(1,t),n=n.subtract(1,`millisecond`),n):n},ab=function(e){return!!($v().find(t=>t===e)||ey().find(t=>t===e))},ob=function(e,t,n,r=1){if(!t||!n)return[];if(t=gv(t),n=e.clone().set(n),e.isAfter(n)){let t=e;e=n,n=t}if(e.diff(n,t)<r)return[];let i=e.clone();ab(t)?(i=i.next(t),t=`week`):i.startOf(t).isBefore(e)&&(i=i.next(t));let a=[];for(;i.isBefore(n);)a.push(i),i=i.add(r,t);return a},sb=e=>e?e.split(`->`):[],cb=e=>(e=e[0].toUpperCase()+e.substr(1),e=e.replace(/[/_-]([a-z])/gi,e=>e.toUpperCase()),e=e.replace(/_(of|es)_/i,e=>e.toLowerCase()),e=e.replace(/\/gmt/i,`/GMT`),e=e.replace(/\/Dumontdurville$/i,`/DumontDUrville`),e=e.replace(/\/Mcmurdo$/i,`/McMurdo`),e=e.replace(/\/Port-au-prince$/i,`/Port-au-Prince`),e),lb=e=>{let t=e.timezones,n=e.tz;if(t.hasOwnProperty(n)===!1&&(n=ov(e.tz,t)),n===null)return e.silent===!1&&console.warn(`Warn: could not find given or local timezone - '`+e.tz+`'`),{current:{epochShift:0}};let r=t[n],i={name:cb(n),hasDst:!!r.dst,default_offset:r.offset,hemisphere:r.hem===`s`?`South`:`North`,current:{}};if(i.hasDst){let e=sb(r.dst);i.change={start:e[0],back:e[1]}}let a=r.offset,o=a;return i.hasDst===!0&&(o=i.hemisphere===`North`?a-1:r.offset+1),i.hasDst===!1?(i.current.offset=a,i.current.isDST=!1):U_(e.epoch,i.change.start,i.change.back,a,o)===!0?(i.current.offset=a,i.current.isDST=i.hemisphere===`North`):(i.current.offset=o,i.current.isDST=i.hemisphere===`South`),i},ub=[`century`,`decade`,`year`,`month`,`date`,`day`,`hour`,`minute`,`second`,`millisecond`],db={set:function(e,t){let n=this.clone();return n=Xv(n,e,null),t&&(this.tz=ov(t)),n},timezone:function(){return lb(this)},isDST:function(){return lb(this).current.isDST},hasDST:function(){return lb(this).hasDst},offset:function(){return lb(this).current.offset*60},hemisphere:function(){return lb(this).hemisphere},format:function(e){return dy(this,e)},unixFmt:function(e){return gy(this,e)},startOf:function(e){return rb(this,e)},endOf:function(e){return ib(this,e)},leapYear:function(){return sv(this.year())},progress:function(e){return yy(this,e)},nearest:function(e){return by(this,e)},diff:function(e,t){return Ey(this,e,t)},since:function(e){return e||=this.clone().set(),$y(this,e)},next:function(e){return this.add(1,e).startOf(e)},last:function(e){return this.subtract(1,e).startOf(e)},isValid:function(){return!this.epoch&&this.epoch!==0?!1:!isNaN(this.d.getTime())},goto:function(e){let t=this.clone();return t.tz=ov(e,t.timezones),t},every:function(e,t,n){if(typeof e==`object`&&typeof t==`string`){let n=t;t=e,e=n}return ob(this,e,t,n)},isAwake:function(){let e=this.hour();return!(e<8||e>22)},isAsleep:function(){return!this.isAwake()},daysInMonth:function(){switch(this.month()){case 0:return 31;case 1:return this.leapYear()?29:28;case 2:return 31;case 3:return 30;case 4:return 31;case 5:return 30;case 6:return 31;case 7:return 31;case 8:return 30;case 9:return 31;case 10:return 30;case 11:return 31;default:throw Error(`Invalid Month state.`)}},log:function(){return console.log(``),console.log(dy(this,`nice-short`)),this},logYear:function(){return console.log(``),console.log(dy(this,`full-short`)),this},json:function(){return ub.reduce((e,t)=>(e[t]=this[t](),e),{})},debug:function(){let e=this.timezone(),t=this.format(`MM`)+` `+this.format(`date-ordinal`)+` `+this.year();return t+=`
11
+ - `+this.format(`time`),console.log(`
12
+
13
+ `,t+`
14
+ - `+e.name+` (`+e.current.offset+`)`),this},from:function(e){return e=this.clone().set(e),e.since(this)},fromNow:function(){return this.clone().set(Date.now()).since(this)},weekStart:function(e){if(typeof e==`number`)return this._weekStart=e,this;if(typeof e==`string`){e=e.toLowerCase().trim();let t=$v().indexOf(e);t===-1&&(t=ey().indexOf(e)),t===-1&&(t=1),this._weekStart=t}else console.warn(`Spacetime Error: Cannot understand .weekStart() input:`,e);return this}};db.inDST=db.isDST,db.round=db.nearest,db.each=db.every;var fb=e=>(typeof e==`string`&&(e=parseInt(e,10)),e),pb=[`year`,`month`,`date`,`hour`,`minute`,`second`,`millisecond`],mb=(e,t,n)=>{let r=pb.indexOf(n),i=pb.slice(r,pb.length);for(let n=0;n<i.length;n++){let r=t[i[n]]();e[i[n]](r)}return e},hb=function(e,t,n,r){return n===!0&&e.isBefore(t)?e=e.add(1,r):n===!1&&e.isAfter(t)&&(e=e.minus(1,r)),e},gb=function(e,t){t=fb(t);let n=e.millisecond()-t;return e.epoch-n},_b=function(e,t,n){t=fb(t);let r=e.clone(),i=(e.second()-t)*Tv.second;return e.epoch-=i,e=hb(e,r,n,`minute`),e.epoch},vb=function(e,t,n){t=fb(t);let r=e.clone(),i=(e.minute()-t)*Tv.minute;return e.epoch-=i,mb(e,r,`second`),e=hb(e,r,n,`hour`),e.epoch},yb=function(e,t,n){t=fb(t),t>=24?t=24:t<0&&(t=0);let r=e.clone(),i=e.hour()-t,a=i*Tv.hour;return e.epoch-=a,e.date()!==r.date()&&(e=r.clone(),i>1&&--i,i<1&&(i+=1),a=i*Tv.hour,e.epoch-=a),Ov(e,{hour:t}),mb(e,r,`minute`),e=hb(e,r,n,`day`),e.epoch},bb=function(e,t,n){let r=t.match(/([0-9]{1,2})[:h]([0-9]{1,2})(:[0-9]{1,2})? ?(am|pm)?/);if(!r){if(r=t.match(/([0-9]{1,2}) ?(am|pm)/),!r)return e.epoch;r.splice(2,0,`0`),r.splice(3,0,``)}let i=!1,a=parseInt(r[1],10),o=parseInt(r[2],10);o>=60&&(o=59),a>12&&(i=!0),i===!1&&(r[4]===`am`&&a===12&&(a=0),r[4]===`pm`&&a<12&&(a+=12)),r[3]=r[3]||``,r[3]=r[3].replace(/:/,``);let s=parseInt(r[3],10)||0,c=e.clone();return e=e.hour(a),e=e.minute(o),e=e.second(s),e=e.millisecond(0),e=hb(e,c,n,`day`),e.epoch},xb=function(e,t,n){if(t=fb(t),t>28){let n=e.month(),r=kv[n];n===1&&t===29&&sv(e.year())&&(r=29),t>r&&(t=r)}t<=0&&(t=1);let r=e.clone();return Ov(e,{date:t}),e=hb(e,r,n,`month`),e.epoch},Sb=function(e,t,n){typeof t==`string`&&(t===`sept`&&(t=`sep`),t=Fv()[t.toLowerCase()]),t=fb(t),t>=12&&(t=11),t<=0&&(t=0);let r=e.date();r>kv[t]&&(r=kv[t]);let i=e.clone();return Ov(e,{month:t,d:r}),e=hb(e,i,n,`year`),e.epoch},Cb=function(e,t){return typeof t==`string`&&/^'[0-9]{2}$/.test(t)&&(t=t.replace(/'/,``).trim(),t=Number(t),t=t>30?1900+t:2e3+t),t=fb(t),Ov(e,{year:t}),e.epoch},wb=function(e,t,n){let r=e.clone();return t=fb(t),e=e.month(0),e=e.date(1),e=e.day(`monday`),e.monthName()===`december`&&e.date()>=28&&(e=e.add(1,`week`)),--t,e=e.add(t,`weeks`),e=hb(e,r,n,`year`),e.epoch},Tb=function(e,t,n){t=fb(t);let r=e.clone();return--t,t<=0?t=0:t>=365&&(t=sv(e.year())?365:364),e=e.startOf(`year`),e=e.add(t,`day`),mb(e,r,`hour`),e=hb(e,r,n,`year`),e.epoch},Eb=`am`,Db=`pm`;function Ob(){return Eb}function kb(){return Db}function Ab(e){Eb=e.am||Eb,Db=e.pm||Db}var jb={millisecond:function(e){if(e!==void 0){let t=this.clone();return t.epoch=gb(t,e),t}return this.d.getMilliseconds()},second:function(e,t){if(e!==void 0){let n=this.clone();return n.epoch=_b(n,e,t),n}return this.d.getSeconds()},minute:function(e,t){if(e!==void 0){let n=this.clone();return n.epoch=vb(n,e,t),n}return this.d.getMinutes()},hour:function(e,t){let n=this.d;if(e!==void 0){let n=this.clone();return n.epoch=yb(n,e,t),n}return n.getHours()},hourFloat:function(e,t){if(e!==void 0){let n=this.clone(),r=e%1;return r*=60,n.epoch=yb(n,parseInt(e,10),t),n.epoch=vb(n,r,t),n}let n=this.d,r=n.getHours(),i=n.getMinutes();return i/=60,r+i},hour12:function(e,t){let n=this.d;if(e!==void 0){let n=this.clone();e=``+e;let r=e.match(/^([0-9]+)(am|pm)$/);if(r){let e=parseInt(r[1],10);r[2]===`pm`&&(e+=12),n.epoch=yb(n,e,t)}return n}let r=n.getHours();return r>12&&(r-=12),r===0&&(r=12),r},time:function(e,t){if(e!==void 0){let n=this.clone();return e=e.toLowerCase().trim(),n.epoch=bb(n,e,t),n}return`${this.h12()}:${fv(this.minute())}${this.ampm()}`},ampm:function(e,t){let n=Ob(),r=this.hour();if(r>=12&&(n=kb()),typeof e!=`string`)return n;let i=this.clone();return e=e.toLowerCase().trim(),r>=12&&e===`am`?(r-=12,i.hour(r,t)):r<12&&e===`pm`?(r+=12,i.hour(r,t)):i},dayTime:function(e,t){if(e!==void 0){let n={morning:`7:00`,breakfast:`7:00`,noon:`12:00`,lunch:`12:00`,afternoon:`14:00`,evening:`18:00`,dinner:`18:00`,night:`23:00`,midnight:`00:00`},r=this.clone();return e||=``,e=e.toLowerCase(),n.hasOwnProperty(e)===!0&&(r=r.time(n[e],t)),r}let n=this.hour();return n<6?`night`:n<12?`morning`:n<17?`afternoon`:n<22?`evening`:`night`},iso:function(e){return e===void 0?this.format(`iso`):this.set(e)}},Mb={date:function(e,t){if(e!==void 0){let n=this.clone();return e=parseInt(e,10),e&&(n.epoch=xb(n,e,t)),n}return this.d.getDate()},day:function(e,t){if(e===void 0)return this.d.getDay();let n=this.clone(),r=e;typeof e==`string`&&(e=e.toLowerCase(),ny.hasOwnProperty(e)?r=ny[e]:(r=$v().indexOf(e),r===-1&&(r=ey().indexOf(e))));let i=this.d.getDay()-r;t===!0&&i>0&&(i-=7),t===!1&&i<0&&(i+=7);let a=this.subtract(i,`days`);return Ov(a,{hour:n.hour(),minute:n.minute(),second:n.second()}),a},dayName:function(e,t){if(e===void 0)return ey()[this.day()];let n=this.clone();return n=n.day(e,t),n}},Nb=e=>(e=e.minute(0),e=e.second(0),e=e.millisecond(1),e),Pb=Object.assign({},jb,Mb,{dayOfYear:function(e,t){if(e!==void 0){let n=this.clone();return n.epoch=Tb(n,e,t),n}let n=0,r=this.d.getMonth(),i;for(let e=1;e<=r;e++)i=new Date,i.setDate(1),i.setFullYear(this.d.getFullYear()),i.setHours(1),i.setMinutes(1),i.setMonth(e),i.setHours(-2),n+=i.getDate();return n+this.d.getDate()},week:function(e,t){if(e!==void 0){let n=this.clone();return n.epoch=wb(this,e,t),n=Nb(n),n}let n=this.clone();n=n.month(0),n=n.date(1),n=Nb(n),n=n.day(`monday`),n.month()===11&&n.date()>=25&&(n=n.add(1,`week`));let r=1;n.date()===1&&(r=0),n=n.minus(2,`hours`);let i=this.epoch;if(n.epoch>i)return 1;let a=0,o=this.month()*4;for(n.epoch+=Tv.week*o,a+=o;a<=52;a++){if(n.epoch>i)return a+r;n=n.add(1,`week`)}return 52},month:function(e,t){if(e!==void 0){let n=this.clone();return n.epoch=Sb(n,e,t),n}return this.d.getMonth()},monthName:function(e,t){if(e!==void 0){let n=this.clone();return n=n.month(e,t),n}return Pv()[this.month()]},quarter:function(e,t){if(e!==void 0&&(typeof e==`string`&&(e=e.replace(/^q/i,``),e=parseInt(e,10)),tb[e])){let n=this.clone(),r=tb[e][0];return n=n.month(r,t),n=n.date(1,t),n=n.startOf(`day`),n}let n=this.d.getMonth();for(let e=1;e<tb.length;e++)if(n<tb[e][0])return e-1;return 4},season:function(e,t){let n=`north`;if(this.hemisphere()===`South`&&(n=`south`),e!==void 0){let r=this.clone();for(let i=0;i<eb[n].length;i++)e===eb[n][i][0]&&(r=r.month(eb[n][i][1],t),r=r.date(1),r=r.startOf(`day`));return r}let r=this.d.getMonth();for(let e=0;e<eb[n].length-1;e++)if(r>=eb[n][e][1]&&r<eb[n][e+1][1])return eb[n][e][0];return n===`north`?`winter`:`summer`},year:function(e){if(e!==void 0){let t=this.clone();return t.epoch=Cb(t,e),t}return this.d.getFullYear()},era:function(e){if(e!==void 0){let t=this.clone();e=e.toLowerCase();let n=t.d.getFullYear();return e===`bc`&&n>0&&(t.epoch=Cb(t,n*-1)),e===`ad`&&n<0&&(t.epoch=Cb(t,n*-1)),t}return this.d.getFullYear()<0?`BC`:`AD`},decade:function(e){if(e!==void 0){if(e=String(e),e=e.replace(/([0-9])'?s$/,`$1`),e=e.replace(/([0-9])(th|rd|st|nd)/,`$1`),!e)return console.warn(`Spacetime: Invalid decade input`),this;e.length===2&&/[0-9][0-9]/.test(e)&&(e=`19`+e);let t=Number(e);return isNaN(t)?this:(t=Math.floor(t/10)*10,this.year(t))}return this.startOf(`decade`).year()},century:function(e){if(e!==void 0){typeof e==`string`&&(e=e.replace(/([0-9])(th|rd|st|nd)/,`$1`),e=e.replace(/([0-9]+) ?(b\.?c\.?|a\.?d\.?)/i,(e,t,n)=>(n.match(/b\.?c\.?/i)&&(t=`-`+t),t)),e=e.replace(/c$/,``));let t=Number(e);return isNaN(e)?(console.warn(`Spacetime: Invalid century input`),this):(t===0&&(t=1),t=t>=0?(t-1)*100:(t+1)*100,this.year(t))}let t=this.startOf(`century`).year();return t=Math.floor(t/100),t<0?t-1:t+1},millenium:function(e){if(e!==void 0){if(typeof e==`string`&&(e=e.replace(/([0-9])(th|rd|st|nd)/,`$1`),e=Number(e),isNaN(e)))return console.warn(`Spacetime: Invalid millenium input`),this;e>0&&--e;let t=e*1e3;return t===0&&(t=1),this.year(t)}let t=Math.floor(this.year()/1e3);return t>=0&&(t+=1),t}});Pb.milliseconds=Pb.millisecond,Pb.seconds=Pb.second,Pb.minutes=Pb.minute,Pb.hours=Pb.hour,Pb.hour24=Pb.hour,Pb.h12=Pb.hour12,Pb.h24=Pb.hour24,Pb.days=Pb.day;var Fb=e=>{Object.keys(Pb).forEach(t=>{e.prototype[t]=Pb[t]})},Ib=function(e,t){return e===1&&sv(t)?29:kv[e]},Lb=(e,t)=>{if(e.month>0){let n=parseInt(e.month/12,10);e.year=t.year()+n,e.month%=12}else if(e.month<0){let n=Math.abs(e.month),r=parseInt(n/12,10);n%12!=0&&(r+=1),e.year=t.year()-r,e.month%=12,e.month+=12,e.month===12&&(e.month=0)}return e},Rb=(e,t,n)=>{for(e.year=t.year(),e.month=t.month(),e.date=t.date()-Math.abs(n);e.date<1;){--e.month,e.month<0&&(e.month=11,--e.year);let t=Ib(e.month,e.year);e.date+=t}return e},zb=(e,t,n)=>{let r=t.year(),i=t.month(),a=Ib(i,r);for(;n>a;)n-=a,i+=1,i>=12&&(i-=12,r+=1),a=Ib(i,r);return e.month=i,e.date=n,e},Bb=Lb,Vb=zb,Hb=Rb,Ub=[`millisecond`,`second`,`minute`,`hour`,`date`,`month`],Wb={second:Ub.slice(0,1),minute:Ub.slice(0,2),quarterhour:Ub.slice(0,2),hour:Ub.slice(0,3),date:Ub.slice(0,4),month:Ub.slice(0,4),quarter:Ub.slice(0,4),season:Ub.slice(0,4),year:Ub,decade:Ub,century:Ub};Wb.week=Wb.hour,Wb.season=Wb.date,Wb.quarter=Wb.date;var Gb={year:!0,quarter:!0,season:!0,month:!0,week:!0,date:!0},Kb={month:!0,quarter:!0,season:!0,year:!0},qb=e=>{e.prototype.add=function(e,t){let n=this.clone();if(!t||e===0)return n;let r=this.clone();if(t=gv(t),t===`millisecond`)return n.epoch+=e,n;t===`fortnight`&&(e*=2,t=`week`),Tv[t]?n.epoch+=Tv[t]*e:t===`week`||t===`weekend`?n.epoch+=Tv.day*(e*7):t===`quarter`||t===`season`?n.epoch+=Tv.month*(e*3):t===`quarterhour`&&(n.epoch+=Tv.minute*15*e);let i={};if(Wb[t]&&Wb[t].forEach(e=>{i[e]=r[e]()}),Gb[t]){let e=r.timezone().current.offset-n.timezone().current.offset;n.epoch+=e*3600*1e3}if(t===`month`&&(i.month=r.month()+e,i=Bb(i,r)),t===`week`){let t=r.date()+e*7;t<=28&&t>1&&(i.date=t)}if(t===`weekend`&&n.dayName()!==`saturday`)n=n.day(`saturday`,!0);else if(t===`date`){if(e<0)i=Hb(i,r,e);else{let t=r.date()+e;i=Vb(i,r,t)}e!==0&&r.isSame(n,`day`)&&(i.date=r.date()+e)}else if(t===`quarter`){if(i.month=r.month()+e*3,i.year=r.year(),i.month<0){let e=Math.floor(i.month/12),t=i.month+Math.abs(e)*12;i.month=t,i.year+=e}else if(i.month>=12){let e=Math.floor(i.month/12);i.month%=12,i.year+=e}i.date=r.date()}else if(t===`year`){let t=r.year()+e,i=n.year();if(i<t){let t=Math.floor(e/4)||1;n.epoch+=Math.abs(Tv.day*t)}else if(i>t){let t=Math.floor(e/4)||1;n.epoch+=Tv.day*t}}else t===`decade`?i.year=n.year()+10:t===`century`&&(i.year=n.year()+100);if(Kb[t]){let e=kv[i.month];i.date=r.date(),i.date>e&&(i.date=e)}return Object.keys(i).length>1&&Ov(n,i),n},e.prototype.subtract=function(e,t){return this.clone().add(e*-1,t)},e.prototype.minus=e.prototype.subtract,e.prototype.plus=e.prototype.add},Jb={millisecond:e=>e.epoch,second:e=>[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second()].join(`-`),minute:e=>[e.year(),e.month(),e.date(),e.hour(),e.minute()].join(`-`),hour:e=>[e.year(),e.month(),e.date(),e.hour()].join(`-`),day:e=>[e.year(),e.month(),e.date()].join(`-`),week:e=>[e.year(),e.week()].join(`-`),month:e=>[e.year(),e.month()].join(`-`),quarter:e=>[e.year(),e.quarter()].join(`-`),year:e=>e.year()};Jb.date=Jb.day;var Yb=e=>{e.prototype.isSame=function(t,n,r=!0){let i=this;if(!n)return null;if(typeof t==`string`&&typeof n==`object`){let e=t;t=n,n=e}return(typeof t==`string`||typeof t==`number`)&&(t=new e(t,this.timezone.name)),n=n.replace(/s$/,``),r===!0&&i.tz!==t.tz&&(t=t.clone(),t.tz=i.tz),Jb[n]?Jb[n](i)===Jb[n](t):null}},Xb=e=>{let t={isAfter:function(e){e=vv(e,this);let t=_v(e);return t===null?null:this.epoch>t},isBefore:function(e){e=vv(e,this);let t=_v(e);return t===null?null:this.epoch<t},isEqual:function(e){e=vv(e,this);let t=_v(e);return t===null?null:this.epoch===t},isBetween:function(e,t,n=!1){e=vv(e,this),t=vv(t,this);let r=_v(e);if(r===null)return null;let i=_v(t);return i===null?null:n?this.isBetween(e,t)||this.isEqual(e)||this.isEqual(t):r<this.epoch&&this.epoch<i}};Object.keys(t).forEach(n=>{e.prototype[n]=t[n]})},Zb=e=>{let t={i18n:function(e){return uv(e.days)&&ty(e.days),uv(e.months)&&Iv(e.months),dv(e.useTitleCase)&&ay(e.useTitleCase),uv(e.ampm)&&Ab(e.ampm),uv(e.distance)&&Yy(e.distance),uv(e.units)&&My(e.units),this}};Object.keys(t).forEach(n=>{e.prototype[n]=t[n]})},Qb=q_,$b=function(e,t,n={}){this.epoch=null,this.tz=ov(t,Qb),this.silent=n.silent===void 0?!0:n.silent,this.british=n.dmy||n.british,this._weekStart=1,n.weekStart!==void 0&&(this._weekStart=n.weekStart),this._today={},n.today!==void 0&&(this._today=n.today),Object.defineProperty(this,`d`,{get:function(){let e=W_(this),t=(new Date(this.epoch).getTimezoneOffset()||0)+e*60;t=t*60*1e3;let n=this.epoch+t;return new Date(n)}}),Object.defineProperty(this,`timezones`,{get:()=>Qb,set:e=>(Qb=e,e)});let r=Xv(this,e);this.epoch=r.epoch,r.tz&&(this.tz=r.tz)};Object.keys(db).forEach(e=>{$b.prototype[e]=db[e]}),$b.prototype.clone=function(){return new $b(this.epoch,this.tz,{silent:this.silent,weekStart:this._weekStart,today:this._today,parsers:this.parsers})},$b.prototype.toLocalDate=function(){return this.toNativeDate()},$b.prototype.toNativeDate=function(){return new Date(this.epoch)},Fb($b),qb($b),Yb($b),Xb($b),Zb($b);var ex=(e,t)=>{let n=new $b(null),r=new $b(null);n=n.time(e),r=t?r.time(t):n.add(59,`minutes`);let i=n.hour(),a=r.hour();return Object.keys(n.timezones).filter(e=>{if(e.indexOf(`/`)===-1)return!1;let t=new $b(null,e),o=t.hour();return o>=i&&o<=a?!(o===i&&t.minute()<n.minute()||o===a&&t.minute()>r.minute()):!1})},tx=`7.7.0`,nx=(e,t,n)=>new $b(e,t,n),rx=function(e){let t=e._today||{};return Object.keys(t).forEach(n=>{e=e[n](t[n])}),e};nx.now=(e,t)=>{let n=new $b(new Date().getTime(),e,t);return n=rx(n),n},nx.today=(e,t)=>{let n=new $b(new Date().getTime(),e,t);return n=rx(n),n.startOf(`day`)},nx.tomorrow=(e,t)=>{let n=new $b(new Date().getTime(),e,t);return n=rx(n),n.add(1,`day`).startOf(`day`)},nx.yesterday=(e,t)=>{let n=new $b(new Date().getTime(),e,t);return n=rx(n),n.subtract(1,`day`).startOf(`day`)},nx.extend=function(e={}){return Object.keys(e).forEach(t=>{$b.prototype[t]=e[t]}),this},nx.timezones=function(){return new $b().timezones},nx.max=function(e,t){let n=new $b(null,e,t);return n.epoch=864e13,n},nx.min=function(e,t){let n=new $b(null,e,t);return n.epoch=-864e13,n},nx.whereIts=ex,nx.version=tx,nx.plugin=nx.extend;var ix={daybreak:`7:00am`,breakfast:`8:00am`,morning:`9:00am`,noon:`12:00pm`,midday:`12:00pm`,afternoon:`2:00pm`,lunchtime:`12:00pm`,evening:`6:00pm`,dinnertime:`6:00pm`,night:`8:00pm`,eod:`10:00pm`,midnight:`12:00am`,am:`9:00am`,pm:`5:00pm`,"early day":`8:00am`,"late at night":`11:00pm`},ax={quarter:15,half:30},ox=function(e){let t=e.time(`6:00am`);return e.isBefore(t)?e.ampm(`pm`):e},sx=function(e,t){let n=e.match(`#Cardinal$`),r=e.not(n).match(`(half|quarter|25|20|15|10|5)`);n=n.text(`reduced`);let i=r.text(`reduced`);ax.hasOwnProperty(i)&&(i=ax[i]);let a=e.has(`to`);return t=t.hour(n),t=t.startOf(`hour`),n<6&&(t=t.ampm(`pm`)),t=a?t.subtract(i,`minutes`):t.add(i,`minutes`),t},cx=function(e,t){let n=e.match(`(at|by|for|before|this|after)? #Time+`);n=n.not(`^(at|by|for|before|this|after)`),n=n.not(`sharp`),n=n.not(`on the dot`);let r=nx.now(t.timezone),i=r.clone(),a=n.not(`in? the`).text(`reduced`);if(a=a.replace(/^@/,``),ix.hasOwnProperty(a))return{result:ix[a],m:n};let o=n.match(`^#Cardinal oclock (am|pm)?`);if(o.found&&(r=r.hour(o.text(`reduced`)),r=r.startOf(`hour`),r.isValid()&&!r.isEqual(i))){let e=o.match(`(am|pm)`);return r=e.found?r.ampm(e.text(`reduced`)):ox(r),{result:r.time(),m:o}}if(o=n.match(`(half|quarter|25|20|15|10|5) (past|after|to) #Cardinal`),o.found&&(r=sx(o,r),r.isValid()&&!r.isEqual(i)))return r=ox(r),{result:r.time(),m:o};if(o=n.match(`[<min>(half|quarter|25|20|15|10|5)] (past|after)`),o.found){let e=o.groups(`min`).text(`reduced`),n=nx(t.today);if(ax.hasOwnProperty(e)&&(e=ax[e]),n=n.next(`hour`).startOf(`hour`).minute(e),n.isValid()&&!n.isEqual(i))return{result:n.time(),m:o}}if(o=n.match(`[<min>(half|quarter|25|20|15|10|5)] to`),o.found){let e=o.groups(`min`).text(`reduced`),n=nx(t.today);if(ax.hasOwnProperty(e)&&(e=ax[e]),n=n.next(`hour`).startOf(`hour`).minus(e,`minutes`),n.isValid()&&!n.isEqual(i))return{result:n.time(),m:o}}if(o=n.match(`[<time>#Time] (in|at) the? [<desc>(morning|evening|night|nighttime)]`),o.found){let e=o.groups(`time`).text(`normal`);if(/^[0-9]{1,2}$/.test(e)?(r=r.hour(e),r=r.startOf(`hour`)):r=r.time(e),r.isValid()&&!r.isEqual(i)){let e=o.groups(`desc`).text(`reduced`);return(e===`evening`||e===`night`)&&(r=r.ampm(`pm`)),{result:r.time(),m:o}}}if(o=n.match(`this? [<desc>(morning|evening|tonight)] at [<time>(#Cardinal|#Time)]`),o.found){let e=o.groups(),t=e.time.text(`reduced`);if(/^[0-9]{1,2}$/.test(t)?(r=r.hour(t),r=r.startOf(`hour`)):r=r.time(t),r.isValid()&&!r.isEqual(i)){let t=e.desc.text(`reduced`);return t===`morning`&&(r=r.ampm(`am`)),(t===`evening`||t===`tonight`)&&(r=r.ampm(`pm`)),{result:r.time(),m:o}}}if(o=n.match(`^#Cardinal$`),o.found){let e=o.text(`reduced`);if(r=r.hour(e),r=r.startOf(`hour`),r.isValid()&&!r.isEqual(i))return/(am|pm)/i.test(e)===!1&&(r=ox(r)),{result:r.time(),m:o}}let s=n.text(`reduced`);return r=r.time(s),r.isValid()&&!r.isEqual(i)?(/(am|pm)/i.test(s)===!1&&(r=ox(r)),{result:r.time(),m:n}):t.dayStart?{result:t.dayStart,m:e.none()}:{result:null,m:e.none()}},lx=function(e){if(e.has(`(next|last|this)$`))return{result:null,m:e.none()};let t=e.match(`^this? (next|upcoming|coming)`);return t.found?{result:`next`,m:t}:(t=e.match(`^this? (past)`),t.found?{result:`this-past`,m:t}:(t=e.match(`^this? (last|previous)`),t.found?{result:`last`,m:t}:(t=e.match(`^(this|current)`),t.found?{result:`this`,m:t}:{result:null,m:e.none()})))},ux=function(e){let t=e.match(`[(start|beginning) of] .`,0);return t.found?{result:`start`,m:t}:(t=e.match(`[end of] .`,0),t.found?{result:`end`,m:t}:(t=e.match(`[(middle|midpoint|center) of] .`,0),t.found?{result:`middle`,m:t}:{result:null,m:t}))},H=`America/`,dx=`Asia/`,fx=`Europe/`,px=`Africa/`,mx=`Australia/`,hx=`Pacific/`,gx={"british summer time":fx+`London`,bst:fx+`London`,"british time":fx+`London`,"britain time":fx+`London`,"irish summer time":fx+`Dublin`,"irish time":fx+`Dublin`,ireland:fx+`Dublin`,"central european time":fx+`Berlin`,cet:fx+`Berlin`,"central european summer time":fx+`Berlin`,cest:fx+`Berlin`,"central europe":fx+`Berlin`,"eastern european time":fx+`Riga`,eet:fx+`Riga`,"eastern european summer time":fx+`Riga`,eest:fx+`Riga`,"eastern europe time":fx+`Riga`,"western european time":fx+`Lisbon`,"western european summer time":fx+`Lisbon`,"western europe":fx+`Lisbon`,"turkey standard time":fx+`Istanbul`,trt:fx+`Istanbul`,"turkish time":fx+`Istanbul`,etc:px+`Freetown`,utc:px+`Freetown`,"greenwich standard time":px+`Freetown`,gmt:px+`Freetown`,"east africa time":px+`Nairobi`,"east african time":px+`Nairobi`,"eastern africa time":px+`Nairobi`,"central africa time":px+`Khartoum`,"central african time":px+`Khartoum`,"south africa standard time":px+`Johannesburg`,sast:px+`Johannesburg`,"southern africa":px+`Johannesburg`,"south african":px+`Johannesburg`,"west africa standard time":px+`Lagos`,"western africa time":px+`Lagos`,"west african time":px+`Lagos`,"australian central standard time":mx+`Adelaide`,acst:mx+`Adelaide`,"australian central daylight time":mx+`Adelaide`,acdt:mx+`Adelaide`,"australia central":mx+`Adelaide`,"australian eastern standard time":mx+`Brisbane`,aest:mx+`Brisbane`,"australian eastern daylight time":mx+`Brisbane`,aedt:mx+`Brisbane`,"australia east":mx+`Brisbane`,"australian western standard time":mx+`Perth`,awst:mx+`Perth`,"australian western daylight time":mx+`Perth`,awdt:mx+`Perth`,"australia west":mx+`Perth`,"australian central western standard time":mx+`Eucla`,acwst:mx+`Eucla`,"australia central west":mx+`Eucla`,"lord howe standard time":mx+`Lord_Howe`,lhst:mx+`Lord_Howe`,"lord howe daylight time":mx+`Lord_Howe`,lhdt:mx+`Lord_Howe`,"russian standard time":fx+`Moscow`,msk:fx+`Moscow`,russian:fx+`Moscow`,"central standard time":H+`Chicago`,"central time":H+`Chicago`,cst:H+`Havana`,"central daylight time":H+`Chicago`,cdt:H+`Havana`,"mountain standard time":H+`Denver`,"mountain time":H+`Denver`,mst:H+`Denver`,"mountain daylight time":H+`Denver`,mdt:H+`Denver`,"atlantic standard time":H+`Halifax`,"atlantic time":H+`Halifax`,ast:dx+`Baghdad`,"atlantic daylight time":H+`Halifax`,adt:H+`Halifax`,"eastern standard time":H+`New_York`,eastern:H+`New_York`,"eastern time":H+`New_York`,est:H+`New_York`,"eastern daylight time":H+`New_York`,edt:H+`New_York`,"pacific time":H+`Los_Angeles`,"pacific standard time":H+`Los_Angeles`,pst:H+`Los_Angeles`,"pacific daylight time":H+`Los_Angeles`,pdt:H+`Los_Angeles`,"alaskan standard time":H+`Anchorage`,"alaskan time":H+`Anchorage`,ahst:H+`Anchorage`,"alaskan daylight time":H+`Anchorage`,ahdt:H+`Anchorage`,"hawaiian standard time":hx+`Honolulu`,"hawaiian time":hx+`Honolulu`,hst:hx+`Honolulu`,"aleutian time":hx+`Honolulu`,"hawaii time":hx+`Honolulu`,"newfoundland standard time":H+`St_Johns`,"newfoundland time":H+`St_Johns`,nst:H+`St_Johns`,"newfoundland daylight time":H+`St_Johns`,ndt:H+`St_Johns`,"brazil time":H+`Sao_Paulo`,brt:H+`Sao_Paulo`,brasília:H+`Sao_Paulo`,brasilia:H+`Sao_Paulo`,"brazilian time":H+`Sao_Paulo`,"argentina time":H+`Buenos_Aires`,"argentinian time":H+`Buenos_Aires`,"amazon time":H+`Manaus`,amt:H+`Manaus`,"amazonian time":H+`Manaus`,"easter island standard time":`Chile/Easterisland`,east:`Chile/Easterisland`,"easter island summer time":`Chile/Easterisland`,easst:`Chile/Easterisland`,"venezuelan standard time":H+`Caracas`,"venezuelan time":H+`Caracas`,vet:H+`Caracas`,"venezuela time":H+`Caracas`,"paraguay time":H+`Asuncion`,pyt:H+`Asuncion`,"paraguay summer time":H+`Asuncion`,pyst:H+`Asuncion`,"cuba standard time":H+`Havana`,"cuba time":H+`Havana`,"cuba daylight time":H+`Havana`,"cuban time":H+`Havana`,"bolivia time":H+`La_Paz`,"bolivian time":H+`La_Paz`,"colombia time":H+`Bogota`,cot:H+`Bogota`,"colombian time":H+`Bogota`,"acre time":H+`Eirunepe`,"peru time":H+`Lima`,"chile standard time":H+`Punta_Arenas`,"chile time":H+`Punta_Arenas`,clst:H+`Punta_Arenas`,"chile summer time":H+`Punta_Arenas`,cldt:H+`Punta_Arenas`,"uruguay time":H+`Montevideo`,uyt:H+`Montevideo`,ist:dx+`Jerusalem`,"arabic standard time":dx+`Baghdad`,"arabic time":dx+`Baghdad`,"arab time":dx+`Baghdad`,"iran standard time":dx+`Tehran`,"iran time":dx+`Tehran`,irst:dx+`Tehran`,"iran daylight time":dx+`Tehran`,irdt:dx+`Tehran`,iranian:dx+`Tehran`,"pakistan standard time":dx+`Karachi`,"pakistan time":dx+`Karachi`,pkt:dx+`Karachi`,"india standard time":dx+`Kolkata`,"indian time":dx+`Kolkata`,"indochina time":dx+`Bangkok`,ict:dx+`Bangkok`,"south east asia":dx+`Bangkok`,"china standard time":dx+`Shanghai`,ct:dx+`Shanghai`,"chinese time":dx+`Shanghai`,"alma-ata time":dx+`Almaty`,almt:dx+`Almaty`,"oral time":dx+`Oral`,"orat time":dx+`Oral`,"yakutsk time":dx+`Yakutsk`,yakt:dx+`Yakutsk`,"gulf standard time":dx+`Dubai`,"gulf time":dx+`Dubai`,gst:dx+`Dubai`,uae:dx+`Dubai`,"hong kong time":dx+`Hong_Kong`,hkt:dx+`Hong_Kong`,"western indonesian time":dx+`Jakarta`,wib:dx+`Jakarta`,"indonesia time":dx+`Jakarta`,"central indonesian time":dx+`Makassar`,wita:dx+`Makassar`,"israel daylight time":dx+`Jerusalem`,idt:dx+`Jerusalem`,"israel standard time":dx+`Jerusalem`,"israel time":dx+`Jerusalem`,israeli:dx+`Jerusalem`,"krasnoyarsk time":dx+`Krasnoyarsk`,krat:dx+`Krasnoyarsk`,"malaysia time":dx+`Kuala_Lumpur`,myt:dx+`Kuala_Lumpur`,"singapore time":dx+`Singapore`,sgt:dx+`Singapore`,"korea standard time":dx+`Seoul`,"korea time":dx+`Seoul`,kst:dx+`Seoul`,"korean time":dx+`Seoul`,"uzbekistan time":dx+`Samarkand`,uzt:dx+`Samarkand`,"vladivostok time":dx+`Vladivostok`,vlat:dx+`Vladivostok`,"maldives time":`Indian/Maldives`,mvt:`Indian/Maldives`,"mauritius time":`Indian/Mauritius`,mut:`Indian/Mauritius`,"marshall islands time":hx+`Kwajalein`,mht:hx+`Kwajalein`,"samoa standard time":hx+`Midway`,sst:hx+`Midway`,"somoan time":hx+`Midway`,"chamorro standard time":hx+`Guam`,chst:hx+`Guam`,"papua new guinea time":hx+`Bougainville`,pgt:hx+`Bougainville`},_x=nx().timezones,vx=Object.keys(_x).reduce((e,t)=>(e[t]=t,e),{}),yx=Object.assign({},gx,vx),bx=/(-?[0-9]+)h(rs)?/i,xx=/(-?[0-9]+)/,Sx=/utc([-+]?[0-9]+)/i,Cx=/gmt([-+]?[0-9]+)/i,wx=function(e){return e=Number(e),e>-13&&e<13?(e*=-1,e=(e>0?`+`:``)+e,`Etc/GMT`+e):null},Tx=function(e){let t=e.match(bx);return t!==null||(t=e.match(Sx),t!==null)?wx(t[1]):(t=e.match(Cx),t===null?(t=e.match(xx),t===null?null:wx(t[1])):wx(Number(t[1])*-1))},Ex=function(e){let t=e.match(`#Timezone+`);t=t.not(`(in|for|by|near|at)`);let n=t.text(`reduced`);if(yx.hasOwnProperty(n))return{result:yx[n],m:t};let r=Tx(n);return r?{result:r,m:t}:{result:null,m:e.none()}},Dx=function(e){let t=e.match(`#WeekDay`);return t.found&&!e.has(`^#WeekDay$`)?e.has(`(this|next|last) (next|upcoming|coming|past)? #WeekDay`)?{result:null,m:e.none()}:{result:t.text(`reduced`),m:t}:{result:null,m:e.none()}},Ox=function(e){return e=e.not(`[^the] !#Value`,0),e=e.not(`#Preposition$`),e=e.not(`#Conjunction$`),e=e.not(`sharp`),e=e.not(`on the dot`),e=e.not(`^(on|of)`),e=e.not(`(next|last|this)$`),e},kx=function(e,t){let n=R_(e),r=n.result;e=e.not(n.m),n=B_(e);let i=n.result;e=e.not(n.m),n=Ex(e);let a=n.result;e=e.not(n.m),n=cx(e,t);let o=n.result;e=e.not(n.m),n=Dx(e,t);let s=n.result;e=e.not(n.m),n=ux(e,t);let c=n.result;e=e.not(n.m),n=lx(e);let l=n.result;return e=e.not(n.m),e=Ox(e),{shift:r,counter:i,tz:a,time:o,weekDay:s,section:c,rel:l,doc:e}},Ax=class e{constructor(e,t,n){this.unit=t||`day`,this.setTime=!1,n||={};let r={};n.today&&(r={date:n.today.date(),month:n.today.month(),year:n.today.year()}),e&&e.month===`sept`&&(e.month=`sep`);let i=nx(e,n.timezone,{today:r,dmy:n.dmy});Object.defineProperty(this,`d`,{enumerable:!1,writable:!0,value:i}),Object.defineProperty(this,`context`,{enumerable:!1,writable:!0,value:n})}clone(){let t=new e(this.d,this.unit,this.context);return t.setTime=this.setTime,t}log(){return console.log(`--`),this.d.log(),console.log(`
15
+ `),this}applyShift(e={}){return Object.keys(e).forEach(t=>{this.d=this.d.add(e[t],t),(t===`hour`||t===`minute`)&&(this.setTime=!0)}),this}applyTime(e){if(e){if(/^[0-9]{1,2}$/.test(e)?this.d=this.d.hour(e):this.d=this.d.time(e),!/[ap]m/.test(e)){let e=this.d.time(`6:00am`);this.d.isBefore(e)&&(this.d=this.d.ampm(`pm`));let t=this.d.time(`10:00pm`);this.d.isAfter(t)&&(this.d=this.d.ampm(`am`))}}else this.d=this.d.startOf(`day`);return this.setTime=!0,this}applyWeekDay(e){if(e){let t=this.d.epoch;this.d=this.d.day(e),this.d.epoch<t&&(this.d=this.d.add(1,`week`))}return this}applyRel(e){return e===`next`?this.next():e===`last`||e===`this-past`?this.last():this}applySection(e){return e===`start`?this.start():e===`end`?this.end():e===`middle`?this.middle():this}format(e){return this.d.format(e)}start(){return this.d=this.d.startOf(this.unit),this.context.dayStart&&(this.d=this.d.time(this.context.dayStart)),this}end(){if(this.d=this.d.endOf(this.unit),this.context.dayEnd){this.d=this.d.startOf(`day`);let e=this.d.time(this.context.dayEnd);if(e.isAfter(this.d))return this.d=e,this}return this}middle(){let e=this.d.diff(this.d.endOf(this.unit)),t=Math.round(e.minutes/2);return this.d=this.d.add(t,`minutes`),this}beforeEnd(){let e=this.d.startOf(this.unit).diff(this.d.endOf(this.unit)),t=Math.round(e.minutes/4);return this.d=this.d.endOf(this.unit),this.d=this.d.minus(t,`minutes`),this.context.dayStart&&(this.d=this.d.time(this.context.dayStart)),this}before(){return this.d=this.d.minus(1,this.unit),this.d=this.d.endOf(this.unit),this.context.dayEnd&&(this.d=this.d.time(this.context.dayEnd)),this}after(){return this.d=this.d.add(1,this.unit),this.d=this.d.startOf(this.unit),this}next(){return this.d=this.d.add(1,this.unit),this.d=this.d.startOf(this.unit),this}last(){return this.d=this.d.minus(1,this.unit),this.d=this.d.startOf(this.unit),this}},jx=class extends Ax{constructor(e,t,n){super(e,t,n),this.unit=`day`,this.d.isValid()&&(this.d=this.d.startOf(`day`))}middle(){return this.d=this.d.time(`10am`),this}beforeEnd(){return this.d=this.d.time(`2pm`),this}},Mx=class extends jx{constructor(e,t,n){super(e,t,n),this.unit=`day`,this.d.isValid()&&(this.d=this.d.startOf(`day`))}next(){return this.d=this.d.add(1,`year`),this}last(){return this.d=this.d.minus(1,`year`),this}},Nx=class extends jx{constructor(e,t,n){super(e,t,n),this.unit=`day`,this.isWeekDay=!0,typeof e==`string`?(this.d=nx(n.today,n.timezone),this.d=this.d.day(e),this.d.isBefore(n.today)&&(this.d=this.d.add(7,`days`))):this.d=e,this.weekDay=this.d.dayName(),this.d.isValid()&&(this.d=this.d.startOf(`day`))}next(){return this.d=this.d.add(7,`days`),this.d=this.d.day(this.weekDay),this}last(){return this.d=this.d.minus(7,`days`),this.d=this.d.day(this.weekDay),this}before(){return this.d=this.d.minus(1,`day`),this.d=this.d.endOf(`day`),this.context.dayEnd&&(this.d=this.d.time(this.context.dayEnd)),this}applyRel(e){if(e===`next`){let e=this.context.today.endOf(`week`).add(1,`week`);return this.next(),this.d.isAfter(e)&&this.last(),this}if(e===`this-past`)return this.last();if(e===`last`){let e=this.context.today.startOf(`week`);return this.last(),this.d.isBefore(e)===!1&&this.last(),this}return this}},Px=class extends Mx{constructor(e,t,n){super(e,t,n),this.unit=`day`,this.d.isValid()&&(this.d=this.d.startOf(`day`))}},Fx=class extends Ax{constructor(e,t,n){super(e,t,n,!0),this.unit=`hour`,this.d.isValid()&&(this.d=this.d.startOf(`hour`))}},Ix=class extends Ax{constructor(e,t,n){super(e,t,n,!0),this.unit=`minute`,this.d.isValid()&&(this.d=this.d.startOf(`minute`))}},Lx=class extends Ax{constructor(e,t,n){super(e,t,n,!0),this.unit=`millisecond`}},Rx=class extends Ax{constructor(e,t,n){super(e,t,n),this.unit=`month`,this.d.isValid()&&(this.d=this.d.startOf(this.unit))}},zx=class extends Ax{constructor(e,t,n){super(e,t,n),this.unit=`month`,this.d.isValid()&&(this.d=this.d.startOf(this.unit))}next(){return this.d=this.d.add(1,`year`),this.d=this.d.startOf(`month`),this}last(){return this.d=this.d.minus(1,`year`),this.d=this.d.startOf(`month`),this}middle(){return this.d=this.d.add(15,`days`),this.d=this.d.startOf(`day`),this}},Bx=class extends Ax{constructor(e,t,n){super(e,t,n),this.unit=`quarter`,this.d.isValid()&&(this.d=this.d.startOf(this.unit))}last(){return this.d=this.d.minus(1,`quarter`),this.d=this.d.startOf(this.unit),this}},Vx=class extends Ax{constructor(e,t,n){super(e,t,n),this.unit=`quarter`,this.d.isValid()&&(this.d=this.d.startOf(this.unit))}next(){return this.d=this.d.add(1,`year`),this.d=this.d.startOf(this.unit),this}last(){return this.d=this.d.minus(1,`year`),this.d=this.d.startOf(this.unit),this}},Hx=class extends Ax{constructor(e,t,n){super(e,t,n),this.unit=`season`,this.d.isValid()&&(this.d=this.d.startOf(this.unit))}next(){return this.d=this.d.add(1,`year`),this.d=this.d.startOf(this.unit),this}last(){return this.d=this.d.minus(1,`year`),this.d=this.d.startOf(this.unit),this}},Ux=class extends Ax{constructor(e,t,n){super(e,t,n),this.unit=`year`,this.d.isValid()&&(this.d=this.d.startOf(`year`))}},Wx=class e extends Ax{constructor(e,t,n){super(e,t,n),this.unit=`week`,this.d.isValid()&&(this.d=this.d.startOf(`week`))}clone(){return new e(this.d,this.unit,this.context)}middle(){return this.d=this.d.add(2,`days`),this}beforeEnd(){return this.d=this.d.day(`friday`),this}},Gx=class extends Ax{constructor(e,t,n){super(e,t,n),this.unit=`week`,this.d.isValid()&&(this.d=this.d.day(`saturday`),this.d=this.d.startOf(`day`))}start(){return this.d=this.d.day(`saturday`).startOf(`day`),this}next(){return this.d=this.d.add(1,this.unit),this.d=this.d.startOf(`weekend`),this}last(){return this.d=this.d.minus(1,this.unit),this.d=this.d.startOf(`weekend`),this}},Kx={today:e=>new jx(e.today,null,e),yesterday:e=>new jx(e.today.minus(1,`day`),null,e),tomorrow:e=>new jx(e.today.plus(1,`day`),null,e),eom:e=>{let t=e.today.endOf(`month`);return t=t.startOf(`day`),new jx(t,null,e)},eoy:e=>{let t=e.today.endOf(`year`);return t=t.startOf(`day`),new jx(t,null,e)},now:e=>new Lx(e.today,null,e)};Kx.tommorrow=Kx.tomorrow,Kx.tmrw=Kx.tomorrow,Kx.anytime=Kx.today,Kx.sometime=Kx.today;var qx=function(e,t,n){let r=null;e.found===!1&&(n.time!==null&&(r=new Lx(t.today,null,t)),n.shift&&Object.keys(n.shift).length>0&&(r=n.shift.hour||n.shift.minute?new Lx(t.today,null,t):new jx(t.today,null,t)));let i=e.text(`reduced`);return Kx.hasOwnProperty(i)===!0?Kx[i](t):i===`next`&&n.shift&&Object.keys(n.shift).length>0?Kx.tomorrow(t):r},Jx=`january`,Yx=`february`,Xx=`march`,Zx=`april`,Qx=`may`,$x=`june`,eS=`july`,tS=`august`,nS=`september`,rS=`october`,iS=`november`,aS=`december`,oS={"new years eve":[aS,31],"new years":[Jx,1],"new years day":[Jx,1],"inauguration day":[Jx,20],"australia day":[Jx,26],"national freedom day":[Yx,1],"groundhog day":[Yx,2],"rosa parks day":[Yx,4],"valentines day":[Yx,14],"saint valentines day":[Yx,14],"st valentines day ":[Yx,14],"saint patricks day":[Xx,17],"st patricks day":[Xx,17],"april fools":[Zx,1],"april fools day":[Zx,1],"emancipation day":[Zx,16],"tax day":[Zx,15],"labour day":[Qx,1],"cinco de mayo":[Qx,5],"national nurses day":[Qx,6],"harvey milk day":[Qx,22],"victoria day":[Qx,24],juneteenth:[$x,19],"canada day":[eS,1],"independence day":[eS,4],"independents day":[eS,4],"bastille day":[eS,14],"purple heart day":[tS,7],"womens equality day":[tS,26],"16 de septiembre":[nS,16],"dieciseis de septiembre":[nS,16],"grito de dolores":[nS,16],halloween:[rS,31],"all hallows eve":[rS,31],"day of the dead":[rS,31],"dia de muertos":[rS,31],"veterans day":[iS,11],"st andrews day":[iS,30],"saint andrews day":[iS,30],"all saints day":[iS,1],"all sts day":[iS,1],"armistice day":[iS,11],"rememberance day":[iS,11],"christmas eve":[aS,24],christmas:[aS,25],xmas:[aS,25],"boxing day":[aS,26],"st stephens day":[aS,26],"saint stephens day":[aS,26],epiphany:[Jx,6],"orthodox christmas day":[Jx,7],"orthodox new year":[Jx,14],"assumption of mary":[tS,15],"all souls day":[iS,2],"feast of the immaculate conception":[aS,8],"feast of our lady of guadalupe":[aS,12],kwanzaa:[aS,26],imbolc:[Yx,2],beltaine:[Qx,1],lughnassadh:[tS,1],samhain:[rS,31]},sS=function(e,t,n,r){if(oS.hasOwnProperty(e)||oS.hasOwnProperty(t)){let i=oS[e]||oS[t]||[],a=nx.now(r);if(a=a.year(n),a=a.startOf(`year`),a=a.month(i[0]),a=a.date(i[1]),a.isValid())return a}return null},cS=`january`,lS=`february`,uS=`march`,dS=`may`,fS=`june`,pS=`september`,mS=`october`,hS=`november`,gS=`monday`,_S=`thursday`,vS=`friday`,yS=`sunday`,bS={"martin luther king day":[3,gS,cS],"presidents day":[3,gS,lS],"commonwealth day":[2,gS,uS],"mothers day":[2,yS,dS],"fathers day":[3,yS,fS],"labor day":[1,gS,pS],"columbus day":[2,gS,mS],"canadian thanksgiving":[2,gS,mS],thanksgiving:[4,_S,hS],"black friday":[4,vS,hS]};bS[`turday day`]=bS.thanksgiving,bS[`indigenous peoples day`]=bS[`columbus day`],bS[`mlk day`]=bS[`martin luther king day`];var xS=bS,SS=function(e,t,n,r){if(xS.hasOwnProperty(e)||xS.hasOwnProperty(t)){let i=xS[e]||xS[t]||[],a=nx.now(r);a=a.year(n),a=a.month(i[2]),a=a.startOf(`month`);let o=a.month();if(a=a.day(i[1]),a.month()!==o&&(a=a.add(1,`week`)),i[0]>1&&(a=a.add(i[0]-1,`week`)),a.isValid())return a}return null},CS={easter:0,"ash wednesday":-46,"palm sunday":7,"maundy thursday":-3,"good friday":-2,"holy saturday":-1,"easter saturday":-1,"easter monday":1,"ascension day":39,"whit sunday":49,"whit monday":50,"trinity sunday":65,"corpus christi":60,"mardi gras":-47};CS[`easter sunday`]=CS.easter,CS.pentecost=CS[`whit sunday`],CS.whitsun=CS[`whit sunday`];var wS=CS,TS=function(e){let t=Math.floor,n=e%19,r=t(e/100),i=(r-t(r/4)-t((8*r+13)/25)+19*n+15)%30,a=i-t(i/28)*(1-t(29/(i+1))*t((21-n)/11)),o=a-(e+t(e/4)+a+2-r+t(r/4))%7,s=3+t((o+40)/44),c=o+28-31*t(s/4);return s=s===4?`April`:`March`,s+` `+c},ES=function(e,t,n,r){if(wS.hasOwnProperty(e)||wS.hasOwnProperty(t)){let i=wS[e]||wS[t]||[],a=TS(n);if(!a)return null;let o=nx(a,r);o=o.year(n);let s=o.add(i,`day`);if(s.isValid())return s}return null},DS={spring:[2003,2007,2044,2048,2052,2056,2060,2064,2068,2072,2076,2077,2080,2081,2084,2085,2088,2089,2092,2093,2096,2097],summer:[2021,2016,2020,2024,2028,2032,2036,2040,2041,2044,2045,2048,2049,2052,2053,2056,2057,2060,2061,2064,2065,2068,2069,2070,2072,2073,2074,2076,2077,2078,2080,2081,2082,2084,2085,2086,2088,2089,2090,2092,2093,2094,2096,2097,2098,2099],fall:[2002,2003,2004,2006,2007,2010,2011,2014,2015,2018,2019,2022,2023,2026,2027,2031,2035,2039,2043,2047,2051,2055,2059,2092,2096],winter:[2002,2003,2006,2007,2011,2015,2019,2023,2027,2031,2035,2039,2043,2080,2084,2088,2092,2096]},OS=[2080,2084,2088,2092,2096],kS=function(e){let t={spring:`March 20 `+e,summer:`June 21 `+e,fall:`Sept 22 `+e,winter:`Dec 21 `+e};return DS.spring.indexOf(e)!==-1&&(t.spring=`March 19 `+e),DS.summer.indexOf(e)!==-1&&(t.summer=`June 20 `+e),DS.fall.indexOf(e)!==-1&&(t.fall=`Sept 21 `+e),DS.winter.indexOf(e)!==-1&&(t.winter=`Dec 22 `+e),OS.indexOf(e)!==-1&&(t.winter=`Dec 20 `+e),t},AS={"spring equinox":`spring`,"summer solistice":`summer`,"fall equinox":`fall`,"winter solstice":`winter`};AS[`march equinox`]=AS[`spring equinox`],AS[`vernal equinox`]=AS[`spring equinox`],AS.ostara=AS[`spring equinox`],AS[`june solstice`]=AS[`summer solistice`],AS.litha=AS[`summer solistice`],AS[`autumn equinox`]=AS[`fall equinox`],AS[`autumnal equinox`]=AS[`fall equinox`],AS[`september equinox`]=AS[`fall equinox`],AS[`sept equinox`]=AS[`fall equinox`],AS.mabon=AS[`fall equinox`],AS[`december solstice`]=AS[`winter solistice`],AS[`dec solstice`]=AS[`winter solistice`],AS.yule=AS[`winter solistice`];var jS=AS,MS=function(e,t,n,r){if(jS.hasOwnProperty(e)||jS.hasOwnProperty(t)){let i=jS[e]||jS[t],a=kS(n);if(!i||!a||!a[i])return null;let o=nx(a[i],r);if(o.isValid())return o}return null},NS={"isra and miraj":`april 13`,"lailat al-qadr":`june 10`,"eid al-fitr":`june 15`,"id al-Fitr":`june 15`,"eid ul-Fitr":`june 15`,ramadan:`may 16`,"eid al-adha":`sep 22`,muharram:`sep 12`,"prophets birthday":`nov 21`},PS=-10.64,FS=function(e,t,n,r){if(NS.hasOwnProperty(e)||NS.hasOwnProperty(t)){let i=NS[e]||NS[t]||[];if(!i)return null;let a=nx(i+` 2018`,r),o=(n-2018)*PS;if(a=a.add(o,`day`),a=a.startOf(`day`),a=a.year(n),a.isValid())return a}return null},IS=nx.now().year(),LS=function(e,t,n){t||=IS,e||=``,e=String(e),e=e.trim().toLowerCase(),e=e.replace(/'s/,`s`);let r=e.replace(/ day$/,``);r=r.replace(/^the /,``),r=r.replace(/^orthodox /,``);let i=sS(e,r,t,n);return i!==null||(i=SS(e,r,t,n),i!==null)||(i=ES(e,r,t,n),i!==null)||(i=MS(e,r,t,n),i!==null)||(i=FS(e,r,t,n),i!==null)?i:null},RS=function(e,t){let n=null,r=e.match(`[<holiday>#Holiday+] [<year>#Year?]`),i=t.today.year();r.groups(`year`).found&&(i=Number(r.groups(`year`).text(`reduced`))||i);let a=r.groups(`holiday`).text(`reduced`),o=LS(a,i,t.timezone);return o!==null&&(o.isBefore(t.today)&&i===t.today.year()&&(o=LS(a,i+1,t.timezone)),n=new Px(o,null,t)),n},zS={day:jx,hour:Fx,evening:Fx,second:Lx,milliscond:Lx,instant:Lx,minute:Ix,week:Wx,weekend:Gx,month:Rx,quarter:Bx,year:Ux,season:Hx,yr:Ux,qtr:Bx,wk:Wx,sec:Lx,hr:Fx},BS=`^(${Object.keys(zS).join(`|`)})$`,VS=function(e,t){let n=e.match(BS);if(n.found===!0){let e=n.text(`reduced`);if(zS.hasOwnProperty(e)){let n=zS[e];return n?new n(null,e,t):null}}return n=e.match(`^#WeekDay$`),n.found===!0?new Nx(n.text(`reduced`),null,t):null},HS=function(e){return{date:e.today.date(),month:e.today.month(),year:e.today.year()}},US=function(e,t){let n=e.match(`(spring|summer|winter|fall|autumn) [<year>#Year?]`);if(n.found){let n=new Hx(nx(e.text(`reduced`),t.timezone,{today:HS(t)}),null,t);if(n.d.isValid()===!0)return n}if(n=e.match(`[<q>#FinancialQuarter] [<year>#Year?]`),n.found){let e=nx(n.groups(`q`).text(`reduced`),t.timezone,{today:HS(t)});if(n.groups(`year`)){let r=Number(n.groups(`year`).text())||t.today.year();e=e.year(r)}let r=new Vx(e,null,t);if(r.d.isValid()===!0)return r}if(n=e.match(`[<q>#Value] quarter (of|in)? [<year>#Year?]`),n.found){let e=nx(`q${n.groups(`q`).text(`reduced`)}`,t.timezone,{today:HS(t)});if(n.groups(`year`)){let r=Number(n.groups(`year`).text())||t.today.year();e=e.year(r)}let r=new Vx(e,null,t);if(r.d.isValid()===!0)return r}if(n=e.match(`^#Year$`),n.found){let n=e.text(`reduced`),r=nx(null,t.timezone,{today:HS(t)});r=r.year(n);let i=new Ux(r,null,t);if(i.d.isValid()===!0)return i}return null},WS=function(e,t){let n=t.today.year(),r=e.match(`[<date>#Value] of? [<month>#Month] [<year>#Year]`);if(r.found||(r=e.match(`[<month>#Month] the? [<date>#Value] [<year>#Year]`)),r.found){let e=new Mx({month:r.groups(`month`).text(`reduced`),date:r.groups(`date`).text(`reduced`),year:r.groups(`year`).text()||n},null,t);if(e.d.isValid()===!0)return e}if(r=e.match(`[<month>#Month] of? [<year>#Year]`),r.found){let e=new zx({month:r.groups(`month`).text(`reduced`),year:r.groups(`year`).text(`reduced`)||n},null,t);if(e.d.isValid()===!0)return e}if(r=e.match(`[<month>#Month] [<date>#Value+]? of? the? [<rel>(this|next|last|current)] year`),r.found){let e=r.groups(`rel`).text(`reduced`),i=n;e===`next`?i+=1:e===`last`&&--i;let a={month:r.groups(`month`).text(`reduced`),date:r.groups(`date`).numbers(0).get()[0],year:i};if(a.date===void 0){a.date=1;let e=new zx(a,null,t);if(e.d.isValid()===!0)return e}let o=new Mx(a,null,t);if(o.d.isValid()===!0)return o}if(r=e.match(`^the? [<date>#Value+]? of? [<rel>(this|next|last|current)] month`),r.found){let e=t.today.month(),n=r.groups(`rel`).text(`reduced`);n===`next`?e+=1:n===`last`&&--e;let i=new Mx({month:e,date:r.groups(`date`).numbers(0).get()[0]},null,t);if(i.d.isValid()===!0)return i}if(r=e.match(`[<date>#Value] of? [<month>#Month]`),r.found||(r=e.match(`[<month>#Month] the? [<date>#Value]`)),r.found){let e={month:r.groups(`month`).text(`reduced`),date:r.groups(`date`).text(`reduced`),year:t.today.year()},n=new Mx(e,null,t);if(n.d.month()<t.today.month()&&(e.year+=1,n=new Mx(e,null,t)),n.d.isValid()===!0)return n}if(e.has(`#Month`)){let n={month:e.match(`#Month`).text(`reduced`),date:1,year:t.today.year()},r=new zx(n,null,t);if(r.d.month()<t.today.month()&&(n.year+=1,r=new zx(n,null,t)),r.d.isValid()===!0)return r}if(r=e.match(`#WeekDay [<date>#Value]`),r.found){let e=new Mx({month:t.today.month(),date:r.groups(`date`).text(`reduced`),year:t.today.year()},null,t);if(e.d.isValid()===!0)return e}if(r=e.match(`the [<date>#Value]`),r.found){let e=new Mx({month:t.today.month(),date:r.groups(`date`).text(`reduced`),year:t.today.year()},null,t);if(e.d.isValid()===!0)return e.d.isBefore(t.today)&&(e.d=e.d.add(1,`month`)),e}if(r=e.match(`/[0-9]{4}-[0-9]{2}-[0-9]{2}t[0-9]{2}:/`),r.found){let n=new Lx(e.text(`reduced`),null,t);if(n.d.isValid()===!0)return n}let i=e.text(`reduced`);if(!i)return new Lx(t.today,null,t);let a=new jx(i,null,t);return a.d.isValid()===!1?null:a},GS=function(e,t,n){let r=null;return r||=qx(e,t,n),r||=RS(e,t),r||=VS(e,t),r||=US(e,t),r||=WS(e,t),r},KS={day:jx,week:Wx,weekend:Gx,month:zx,quarter:Vx,season:Hx,hour:Fx,minute:Ix},qS=function(e,t={}){let n=KS[t.unit];if(!n)return e;let r=e.d;t.dir===`first`||t.num===0?(r=e.start().d,r=r.startOf(t.unit)):t.dir===`last`?(r=r.endOf(e.unit),r=t.unit===`weekend`?r.day(`saturday`,!1):r.startOf(t.unit)):t.num&&(t.unit===`weekend`&&(r=r.day(`saturday`,!0).add(1,`day`)),r=r.add(t.num,t.unit));let i=new n(r,null,e.context);return i.d.isValid()===!0?i:e},JS=function(e,t,n){if(!e&&n.weekDay&&(e=new Nx(n.weekDay,null,t),n.weekDay=null),!e)return null;if(n.shift){let t=n.shift;e.applyShift(t),t.hour||t.minute?e=new Lx(e.d,null,e.context):(t.week||t.day||t.month)&&(e=new jx(e.d,null,e.context))}return n.weekDay&&e.unit!==`day`&&(e.applyWeekDay(n.weekDay),e=new Nx(e.d,null,e.context)),n.rel&&e.applyRel(n.rel),n.section&&e.applySection(n.section),n.time&&e.applyTime(n.time),n.counter&&n.counter.unit&&(e=qS(e,n.counter)),e},YS=typeof process>`u`||!process.env?self.env||{}:process.env,XS=e=>{YS.DEBUG_DATE&&(console.log(`\n==== '${e.doc.text()}' =====`),Object.keys(e).forEach(t=>{t!==`doc`&&e[t]&&console.log(t,e[t])}),e.doc.debug())},ZS=function(e,t){let n=kx(e,t);if(e=n.doc,XS(n),n.tz){t=Object.assign({},t,{timezone:n.tz});let e=t.today.format(`iso-short`);t.today=t.today.goto(t.timezone).set(e)}let r=GS(e,t,n);return r=JS(r,t,n),r},QS={mon:`monday`,tue:`tuesday`,tues:`wednesday`,wed:`wednesday`,thu:`thursday`,fri:`friday`,sat:`saturday`,sun:`sunday`,monday:`monday`,tuesday:`tuesday`,wednesday:`wednesday`,thursday:`thursday`,friday:`friday`,saturday:`saturday`,sunday:`sunday`},$S=function(e){return e.match(`(every|each)`).found?`AND`:e.match(`(any|a)`).found?`OR`:null},eC=function(e,t){let n=e.match(`[<logic>(every|any|each)] [<skip>other?] [<unit>#Duration] (starting|beginning|commencing)?`);if(n.found){let t={interval:{}},r=n.groups(`unit`).text(`reduced`);return t.interval[r]=1,t.choose=$S(n),n.groups(`skip`).found&&(t.interval[r]=2),e=e.remove(n),{repeat:t}}if(n=e.match(`[<logic>(every|any|each)] [<num>#Value] [<unit>#Duration] (starting|beginning|commencing)?`),n.found){let t={interval:{}},r=n.groups(`unit`);r.nouns().toSingular();let i=r.text(`reduced`);return t.interval[i]=n.groups(`num`).numbers().get()[0],t.choose=$S(n),e=e.remove(n),{repeat:t}}if(n=e.match(`[<logic>(every|any|each|a)] [<skip>other?] [<day>#WeekDay+] (starting|beginning|commencing)?`),n.found){let t={interval:{day:1},filter:{weekDays:{}}},r=n.groups(`day`).text(`reduced`);if(r=QS[r],r)return t.filter.weekDays[r]=!0,t.choose=$S(n),e=e.remove(n),{repeat:t}}if(n=e.match(`[<logic>(every|any|each|a)] [<day>(weekday|week day|weekend|weekend day)] (starting|beginning|commencing)?`),n.found){let t={interval:{day:1},filter:{weekDays:{}}},r=n.groups(`day`);return r.has(`(weekday|week day)`)?t.filter.weekDays={monday:!0,tuesday:!0,wednesday:!0,thursday:!0,friday:!0}:r.has(`(weekend|weekend day)`)&&(t.filter.weekDays={saturday:!0,sunday:!0}),t.choose=$S(n),e=e.remove(n),{repeat:t}}if(n=e.match(`[<day>(mondays|tuesdays|wednesdays|thursdays|fridays|saturdays|sundays)] (at|near|after)? [<time>#Time+?]`),n.found){let r={interval:{day:1},filter:{weekDays:{}}},i=n.groups(`day`).text(`reduced`);if(i=i.replace(/s$/,``),i=QS[i],i){r.filter.weekDays[i]=!0,r.choose=`OR`,e=e.remove(n);let a=n.groups(`time`);return a.found&&(r.time=cx(a,t)),{repeat:r}}}return null},tC=function(e){let t=e.start,n=e.end;if(t.d.isAfter(n.d)){if(t.isWeekDay&&n.isWeekDay)return e.end.next(),e;let r=t;e.start=n,e.end=r}return e},nC=function(e){let t=e.start,n=e.end;return t.d.isAfter(n.d)&&n.d.hour()<10&&(n.d=n.d.ampm(`pm`)),e},rC=[{match:`[<from>#Time+] (to|until|upto|through|thru|and) [<to>#Time+ #Date+]`,desc:`3pm to 4pm january 5th`,parse:(e,t)=>{let n=e.groups(`from`),r=e.groups(`to`),i=ZS(r,t);if(i){let e=i.clone();if(e.applyTime(n.text(`implicit`)),e){let t={start:e,end:i,unit:`time`};return/(am|pm)/.test(r)===!1&&(t=nC(t)),t=tC(t),t}}return null}},{match:`[<main>#Date+] from [<a>#Time] (to|until|upto|through|thru|and) [<b>#Time+]`,desc:`january from 3pm to 4pm`,parse:(e,t)=>{let n=e.groups(`main`),r=e.groups(`a`),i=e.groups(`b`);if(n=ZS(n,t),n){n.applyTime(r.text(`implicit`));let e=n.clone();if(e.applyTime(i.text(`implicit`)),e){let t={start:n,end:e,unit:`time`};return/(am|pm)/.test(i.text())===!1&&(t=nC(t)),t=tC(t),t}}return null}},{match:`[<from>#Date+] (to|until|upto|through|thru|and) [<to>#Time+]`,desc:`january from 3pm to 4pm`,parse:(e,t)=>{let n=e.groups(`from`),r=e.groups(`to`);if(n=ZS(n,t),n){let e=n.clone();if(e.applyTime(r.text(`implicit`)),e){let t={start:n,end:e,unit:`time`};return/(am|pm)/.test(r.text())===!1&&(t=nC(t)),t=tC(t),t}}return null}}],iC=[{match:`^during? #Month+ (or|and) #Month [<year>#Year]?`,desc:`march or june`,parse:(e,t)=>{let n=e.match(`^during? [#Month]`,0);e=e.not(`(or|and)`);let r=ZS(n,t);if(r){let i=[{start:r,end:r.clone().end(),unit:r.unit}],a=e.not(n);a.found&&a.match(`#Month`).forEach(e=>{let n=ZS(e,t);i.push({start:n,end:n.clone().end(),unit:n.unit})});let o=e.match(`#Year$`);return o.found&&(o=o.text(`reduced`),i.forEach(e=>{e.start.d=e.start.d.year(o),e.end.d=e.end.d.year(o)})),i}return null}},{match:`^#Month #Value+ (or|and)? #Value$`,desc:`jan 5 or 8`,parse:(e,t)=>{e=e.not(`(or|and)`);let n=e.match(`^#Month #Value`),r=ZS(n,t);if(r){let t=[{start:r,end:r.clone().end(),unit:r.unit}],i=e.not(n);return i.found&&i.match(`#Value`).forEach(e=>{let n=r.clone();n.d=n.d.date(e.text(`reduced`)),t.push({start:n,end:n.clone().end(),unit:n.unit})}),t}return null}},{match:`^#Month+ #Value #Value+$`,desc:`jan 5 8`,parse:(e,t)=>{let n=e.match(`#Month`),r=e.match(`#Year`);e=e.not(`#Year`);let i=[];return e.match(`#Value`).forEach(e=>{e=e.clone();let a=e.prepend(n.text());r.found&&a.append(r);let o=ZS(a,t);o&&i.push({start:o,end:o.clone().end(),unit:o.unit})}),i}},{match:`^#Value+ (or|and)? #Value of #Month #Year?$`,desc:`5 or 8 of Jan`,parse:(e,t)=>{let n=e.match(`#Month`),r=e.match(`#Year`);e=e.not(`#Year`);let i=[];return e.match(`#Value`).forEach(e=>{let a=e.append(n);r.found&&a.append(r);let o=ZS(a,t);o&&i.push({start:o,end:o.clone().end(),unit:o.unit})}),i}},{match:`^!(between|from|during)? [<from>#Date+] (and|or) [<to>#Date+]$`,desc:`A or B`,parse:(e,t)=>{let n=e.groups(`from`),r=e.groups(`to`),i=ZS(n,t),a=ZS(r,t);return i&&a?[{start:i,end:i.clone().end()},{start:a,end:a.clone().end()}]:null}}],aC=[{match:`between [<start>#Month] and [<end>#Month] [<year>#Year?]`,desc:`between march and jan`,parse:(e,t)=>{let{start:n,end:r,year:i}=e.groups(),a=i&&i.found?Number(i.text(`reduced`)):t.today.year(),o={month:n.text(`reduced`),year:a},s=new zx(o,null,t).start();o={month:r.text(`reduced`),year:a};let c=new zx(o,null,t).start();return s.d.isAfter(c.d)?{start:c,end:s}:{start:s,end:c}}},{match:`between [<start>.+] and [<end>.+]`,desc:`between friday and sunday`,parse:(e,t)=>{let n=e.groups(`start`);n=ZS(n,t);let r=e.groups(`end`);return r=ZS(r,t),n&&r?(r=r.before(),{start:n,end:r}):null}},{match:`[<from>#Month #Value] (to|through|thru) [<to>#Month #Value] [<year>#Year?]`,desc:`june 5 to june 7`,parse:(e,t)=>{let n=e.groups(),r=n.from;if(n.year&&(r=r.append(n.year)),r=ZS(r,t),r){let e=n.to;if(n.year&&(e=e.append(n.year)),e=ZS(e,t),e)return r.d.isAfter(e.d)&&(e.d=e.d.add(1,`year`)),{start:r,end:e.end()}}return null}},{match:`[<month>#Month] [<from>#Value] (to|through|thru) [<to>#Value] of? [<year>#Year]`,desc:`january 5 to 7 1998`,parse:(e,t)=>{let{month:n,from:r,to:i,year:a}=e.groups(),o=a.clone(),s=r.prepend(n).append(a);if(s=ZS(s,t),s){let e=i.prepend(n).append(o);return e=ZS(e,t),{start:s,end:e.end()}}return null}},{match:`[<from>#Value] (to|through|thru) [<to>#Value of? #Month #Date+?]`,desc:`5 to 7 of january 1998`,parse:(e,t)=>{let n=e.groups(`to`);if(n=ZS(n,t),n){let t=e.groups(`from`),r=n.clone();return r.d=r.d.date(t.text(`implicit`)),{start:r,end:n.end()}}return null}},{match:`[<from>#Month #Value] (to|through|thru) [<to>#Value]`,desc:`january 5 to 7`,parse:(e,t)=>{let n=e.groups(`from`);if(n=ZS(n,t),n){let t=e.groups(`to`),r=n.clone();return r.d=r.d.date(t.text(`implicit`)),{start:n,end:r.end()}}return null}},{match:`from? [<from>#Month] (to|until|upto|through|thru) [<to>#Month] [<year>#Year]`,desc:`january to may 2020`,parse:(e,t)=>{let n=e.groups(`from`),r=e.groups(`year`).numbers().get()[0],i=e.groups(`to`);if(n=ZS(n,t),i=ZS(i,t),n.d=n.d.year(r),i.d=i.d.year(r),n&&i){let e={start:n,end:i.end()};return e=tC(e),e}return null}},{match:`^in [<min>#Value] to [<max>#Value] [<unit>(days|weeks|months|years)]`,desc:`in 2 to 4 weeks`,parse:(e,t)=>{let{min:n,max:r,unit:i}=e.groups(),a=new Mx(t.today,null,t),o=a.clone(),s=i.text(`implicit`);return a=a.applyShift({[s]:n.numbers().get()[0]}),o=o.applyShift({[s]:r.numbers().get()[0]}),{start:a,end:o.end()}}},{match:`[<min>#Value] to [<max>#Value] [<unit>(days|weeks|months|years)] (ago|before|earlier|prior)`,desc:`2 to 4 weeks ago`,parse:(e,t)=>{let{min:n,max:r,unit:i}=e.groups(),a=new Mx(t.today,null,t),o=a.clone(),s=i.text(`implicit`);return a=a.applyShift({[s]:-r.numbers().get()[0]}),o=o.applyShift({[s]:-n.numbers().get()[0]}),{start:a,end:o.end()}}},{match:`^until [<to>#Date+]`,desc:`until christmas`,parse:(e,t)=>{let n=e.groups(`to`);return n=ZS(n,t),n?{start:new Mx(t.today,null,t),end:n.start()}:null}},{match:`[<part>(1st|initial|2nd|latter)] half of [<month>#Month] [<year>#Year?]`,desc:`second half of march`,parse:(e,t)=>{let{part:n,month:r,year:i}=e.groups(),a=new zx({month:r.text(`reduced`),date:1,year:i&&i.found?i.text(`reduced`):t.today.year()},null,t);return n.has(`(1st|initial)`)?{start:a.start(),end:a.clone().middle()}:{start:a.middle(),end:a.clone().end()}}}],oC=function(e,t){return e=e.applyShift(t.punt),e},sC=[].concat(rC,iC,aC,[{match:`from? [<from>.+] (to|until|upto|through|thru) [<to>.+]`,desc:`from A to B`,parse:(e,t)=>{let n=e.groups(`from`),r=e.groups(`to`);if(n=ZS(n,t),r=ZS(r,t),n&&r){let e={start:n,end:r.end()};return e=tC(e),e}return null}},{match:`^due? (by|before) [.+]`,desc:`before june`,parse:(e,t)=>{e=e.group(0);let n=ZS(e,t);if(n){let e=new Ax(t.today,null,t);e.d.isAfter(n.d)&&(e=n.clone().applyShift({weeks:-2}));let r=n.clone().applyShift({day:-1});return{start:e,end:r.end()}}return null}},{match:`^(on|in|at|@|during) [.+]`,desc:`in june`,parse:(e,t)=>{e=e.group(0);let n=ZS(e,t);return n?{start:n,end:n.clone().end(),unit:n.unit}:null}},{match:`^(after|following) [.+]`,desc:`after june`,parse:(e,t)=>{e=e.group(0);let n=ZS(e,t);return n?(n=n.after(),{start:n.clone(),end:oC(n.clone(),t)}):null}},{match:`^(middle|center|midpoint) of [.+]`,desc:`middle of`,parse:(e,t)=>{e=e.group(0);let n=ZS(e,t),r=n.clone().middle(),i=n.beforeEnd();return n?{start:r,end:i}:null}},{match:`.+ after #Time+$`,desc:`tuesday after 5pm`,parse:(e,t)=>{let n=ZS(e,t);return n?{start:n.clone(),end:n.end(),unit:`time`}:null}},{match:`.+ before #Time+$`,desc:`tuesday before noon`,parse:(e,t)=>{let n=ZS(e,t);if(n){let e=n.clone(),t=n.start();if(n)return{start:t,end:e,unit:`time`}}return null}}]),cC=typeof process>`u`||!process.env?self.env||{}:process.env,lC=e=>{cC.DEBUG_DATE&&console.log(`\n \x1b[32m ${e} \x1b[0m`)},uC=function(e){return Object.prototype.toString.call(e)===`[object Array]`},dC=function(e,t){let n={start:null,end:null};if(!e.found)return n;let r=ZS(e,t);return r&&(n={start:r,end:r.clone().end(),unit:r.setTime?`time`:r.unit}),n},fC=function(e,t){for(let n=0;n<sC.length;n+=1){let r=sC[n],i=e.match(r.match);if(i.found){lC(` ---[${r.desc}]---`);let e=r.parse(i,t);if(e!==null)return uC(e)||(e=[e]),e}}return null},pC=function(e,t){let n=eC(e,t)||{},r=fC(e,t);return r||=[dC(e,t)],r=r.map(e=>Object.assign({},n,e)),r.forEach(e=>{e.start&&e.end&&e.start.d.epoch>e.end.d.epoch&&(e.start=e.start.start())}),r},mC=function(e){return e.numbers||console.warn(`
16
+ Compromise warning: compromise/three must be used with compromise-dates plugin
17
+ `),e=e.clone(),e.numbers().toNumber(),e.contractions().expand(),e.replace(`week end`,`weekend`,!0).tag(`Date`),e.replace(`up to`,`upto`,!0).tag(`Date`),e.has(`once (a|an) #Duration`)===!1&&e.match(`[(a|an)] #Duration`,0).replaceWith(`1`,{tags:!0}).compute(`lexicon`),e.match(`@hasDash`).insertAfter(`to`).tag(`Date`),e},hC=function(e,t){return t||={},t.timezone===!1&&(t.timezone=`UTC`),t.today=t.today||nx.now(t.timezone),t.today=nx(t.today,t.timezone),e=mC(e),pC(e,t)},gC=function(e){let t=e.end.d.add(1,`millisecond`).since(e.start.d).diff;return delete t.milliseconds,delete t.seconds,t},_C=function(e){if(!e.start)return{start:null,end:null,timezone:null,duration:{}};let t=e.end?gC(e):{};return{start:e.start.format(`iso`),end:e.end?e.end.format(`iso`):null,timezone:e.start.d.format(`timezone`),duration:t}},vC=function(e,t){let n=hC(e.fromText(t),e.opts)[0];return!n||!n.start||!n.start.d?null:n.start.d},yC=function(e){class t extends e{constructor(e,t,n,r={}){super(e,t,n),this.viewType=`Dates`,this.opts=Object.assign({},r)}get(e){let t=[];return this.forEach(e=>{hC(e,this.opts).forEach(e=>{let n=_C(e);n.start&&t.push(n)})}),typeof e==`number`?t[e]:t}json(e={}){return this.map(t=>{let n=t.toView().json(e)[0]||{};if(e&&e.dates!==!1){let e=hC(t,this.opts);e.length>0&&(n.dates=_C(e[0]))}return n},[])}format(e){let n=this.map(t=>{let n=hC(t,this.opts)[0]||{};if(n.start){let r=n.start.d,i=r.format(e);if(n.end){let t=n.end.d;r.isSame(t,`day`)===!1&&(i+=` to `+t.format(e))}t.replaceWith(i)}return t});return new t(this.document,n.pointer,null,this.opts)}isBefore(e){let t=vC(this,e);return this.filter(e=>{let n=hC(e,this.opts)[0]||{};return n.start&&n.start.d&&n.start.d.isBefore(t)})}isAfter(e){let t=vC(this,e);return this.filter(e=>{let n=hC(e,this.opts)[0]||{};return n.start&&n.start.d&&n.start.d.isAfter(t)})}isSame(e,t){let n=vC(this,t);return this.filter(t=>{let r=hC(t,this.opts)[0]||{};return r.start&&r.start.d&&r.start.d.isSame(n,e)})}}e.prototype.dates=function(e){let n=P_(this);return new t(this.document,n.pointer,null,e)}},bC=function(e){e=e.clone();let t=e.match(`#Time+`).match(`[<hour>#Cardinal] [<min>(thirty|fifteen)]`);if(t.found){let e=t.groups(`hour`),n=t.groups(`min`),r=e.values().get()[0];if(r>0&&r<=12){let e=`${r}:${n.values().get()[0]}`;t.replaceWith(e)}}if(!e.numbers)console.warn(`Warning: compromise .numbers() not loaded.
18
+ This plugin requires >= v14`);else{let t=e.numbers();t.toNumber(),t.toCardinal(!1)}return e.contractions&&e.contractions().expand(),e.adverbs().remove(),e.replace(`week end`,`weekend`,!0).tag(`Date`),e.replace(`up to`,`upto`,!0).tag(`Date`),e.has(`once (a|an) #Duration`)===!1&&e.match(`[(a|an)] #Duration`,0).replaceWith(`1`).compute(`lexicon`),e.match(`@hasDash`).insertAfter(`to`).tag(`Date`),e},xC=function(e){return e.match(`#Time+ (am|pm)?`)},SC=function(e,t={}){e=bC(e);let n=cx(e,t);if(!n.result)return{time:null,"24h":null};let r=nx.now().time(n.result);return{time:n.result,"24h":r.format(`time-24`),hour:r.hour(),minute:r.minute()}},CC=(e,t)=>typeof t==`number`?e.eq(t):e,wC=function(e){class t extends e{constructor(e,t,n,r){super(e,t,n),this.viewType=`Times`,this.opts=r||{}}format(e){let n=this.map(t=>{let n=SC(t)||{};if(n.time){let r=nx.now().time(n.time),i=n.time;i=e===`24h`?r.format(`time-24`):r.format(e),t=t.not(`#Preposition`),t.replaceWith(i)}return t});return new t(this.document,n.pointer,null,this.opts)}get(e){return CC(this,e).map(SC)}json(e={}){return this.map(t=>{let n=t.toView().json(e)[0]||{};return e&&e.time!==!1&&(n.time=SC(t)),n},[])}}e.prototype.times=function(e){let n=xC(this);return n=CC(n,e),new t(this.document,n.pointer)}},TC={century:!0,day:!0,decade:!0,hour:!0,millisecond:!0,minute:!0,month:!0,second:!0,weekend:!0,week:!0,year:!0,quarter:!0,season:!0},EC={m:`minute`,h:`hour`,hr:`hour`,min:`minute`,sec:`second`,"week end":`weekend`,wk:`week`,yr:`year`,qtr:`quarter`};Object.keys(EC).forEach(e=>{EC[e+`s`]=EC[e]});var DC=function(e){let t={},n=e.match(`#Value+ #Duration`);if(n.found)n.forEach(e=>{let n=e.numbers().get()[0],r=e.terms().last().text(`reduced`);r=r.replace(/ies$/,`y`),r=r.replace(/s$/,``),EC.hasOwnProperty(r)&&(r=EC[r]),TC.hasOwnProperty(r)&&n!==null&&(t[r]=n)});else if(e.match(`(#Duration && /[0-9][a-z]+$/)`).found){let n=e.text(),r=n.match(/([0-9]+)/),i=n.match(/([a-z]+)/);r&&i&&(r=r[0]||null,i=i[0]||null,EC.hasOwnProperty(i)&&(i=EC[i]),TC.hasOwnProperty(i)&&r!==null&&(t[i]=Number(r)))}return t},OC=function(e){class t extends e{constructor(e,t,n){super(e,t,n),this.context={}}json(e={}){return this.map(t=>{let n=t.toView().json(e)[0]||{};return e&&e.duration!==!1&&(n.duration=DC(t)),n},[])}get(e){let t=[];return this.forEach(e=>{let n=DC(e);t.push(n)}),typeof e==`number`?t[e]:t}}e.prototype.durations=function(e){let n=this.match(`#Value+ #Duration (and? #Value+ #Duration)?`);return n=n.notIf(`#DateShift`),typeof e==`number`&&(n=n.eq(e)),new t(this.document,n.pointer)}},kC=function(e){yC(e),wC(e),OC(e)},AC=`(start|end|middle|starting|ending|midpoint|beginning)`,jC=(e,t)=>{e.found===!0&&e.forEach(e=>{let n=e.text(`reduced`),r=parseInt(n,10);r&&r>1e3&&r<3e3&&e.tag(`Year`,t)})},MC=(e,t)=>{e.found===!0&&e.forEach(e=>{let n=e.text(`reduced`),r=parseInt(n,10);r&&r>1900&&r<2030&&e.tag(`Year`,t)})},NC=function(e){e.match(`(march|april|may) (and|to|or|through|until)? (march|april|may)`).tag(`Date`).match(`(march|april|may)`).tag(`Month`,`march|april|may`);let t=e.if(`#Cardinal`);if(t.found===!0){let e=t.match(`#Date #Value [#Cardinal]`,0);jC(e,`date-value-year`),e=t.match(`#Date [#Cardinal]`,0),MC(e,`date-year`),e=t.match(`${AC} of [#Cardinal]`),MC(e,`section-year`),e=t.match(`#Month #Value [#Cardinal]`,0),jC(e,`month-value-year`),e=t.match(`#Month #Value to #Value [#Cardinal]`,0),jC(e,`month-range-year`),e=t.match(`(in|of|by|during|before|starting|ending|for|year|since) [#Cardinal]`,0),jC(e,`in-year-1`),e=t.match(`(q1|q2|q3|q4) [#Cardinal]`,0),jC(e,`in-year-2`),e=t.match(`#Ordinal quarter of? [#Cardinal]`,0),jC(e,`in-year-3`),e=t.match(`the year [#Cardinal]`,0),jC(e,`in-year-4`),e=t.match(`it (is|was) [#Cardinal]`,0),MC(e,`in-year-5`),t.match(`${AC} of #Year`).tag(`Date`);let n=t.match(`between [#Cardinal] and [#Cardinal]`);jC(n.groups(`0`),`between-year-and-year-1`),jC(n.groups(`1`),`between-year-and-year-2`)}return MC(e.match(`^/^20[012][0-9]$/$`),`2020-ish`),e},PC=function(e,t){e.found&&(e.tag(`Date`,t),e.numbers().lessThan(31).ifNo(`#Year`).tag(`#Time`,t))},FC=function(e){let t=e.if(`#Date`);if(t.found){let n=t.if(`#NumberRange`);if(n.found){let e=n.match(`[#NumberRange+] (on|by|at)? #WeekDay`,0);PC(e,`3-4-tuesday`),e=n.match(`[#NumberRange+] (on|by|at)? #Month #Value`,0),PC(e,`3-4 mar 3`),e=n.match(`[#NumberRange] to (#NumberRange && #Time)`,0),PC(e,`3-4pm`),e=n.match(`(#NumberRange && #Time) to [#NumberRange]`,0),PC(e,`3pm-4`)}let r=t.match(`(from|between) #Cardinal and #Cardinal (in|on)? (#WeekDay|tomorrow|yesterday)`);PC(r,`from 9-5 tues`),r=e.match(`#Cardinal to #Cardinal (#WeekDay|tomorrow|yesterday)`),PC(r,`9-5 tues`),r=t.match(`(from|between) [#NumericValue] (to|and) #Time`,0).tag(`Time`,`4-to-5pm`),PC(r,`from 9-5pm`),r=t.match(`(#WeekDay|tomorrow|yesterday) (from|between)? (#Cardinal|#Time) (and|to) (#Cardinal|#Time)`),PC(r,`tues 3-5`),r=t.match(`#Month #Value+ (from|between) [<time>(#Cardinal|#Time) (and|to) (#Cardinal|#Time)]`).group(`time`),PC(r,`sep 4 from 9-5`),r=t.match(`#Time to #Cardinal on? #Date`),PC(r,`3pm-4 wed`),r=t.match(`#Cardinal to #Time on? #Date`),PC(r,`3-4pm wed`),r=t.match(`#Cardinal to #Cardinal on? (#WeekDay|#Month #Value)`),PC(r,`3-4 wed`)}return e},IC=`act.aft.akst.anat.art.azot.azt.bnt.bot.bt.cast.cat.cct.chast.chut.ckt.cvt.cxt.davt.eat.ect.fjt.fkst.fnt.gamt.get.gft.gilt.gyt.hast.hncu.hneg.hnnomx.hnog.hnpm.hnpmx.hntn.hovt.iot.irkt.jst.kgt.kost.lint.magt.mart.mawt.mmt.nct.nft.novt.npt.nrt.nut.nzst.omst.pet.pett.phot.phst.pont.pwt.ret.sakt.samt.sbt.sct.sret.srt.syot.taht.tft.tjt.tkt.tlt.tmt.tot.tvt.ulat.vut.wakt.wat.wet.wft.wit.wst.yekt`.split(`.`).reduce((e,t)=>(e[t]=!0,e),{}),LC=function(e){let t=e.match(`#Time [#Acronym]`,0);t.found&&IC[t.text(`reduced`)]===!0&&t.tag(`Timezone`,`tz-abbr`)},RC=`fix-tagger`,zC=function(e){if(e.has(`#Date`)){let t=e.match(`#Date+ by #Date+`);t.found&&!t.has(`^due`)&&t.match(`^#Date+`).unTag(`Date`,`by-monday`);let n=e.match(`#Date+`);n.has(`^between`)&&!n.has(`and .`)&&n.unTag(`Date`,RC),n.has(`(minutes|seconds|weeks|hours|days|months)`)&&!n.has(`#Value #Duration`)&&n.match(`(minutes|seconds|weeks|hours|days|months)`).unTag(`Date`,`log-hours`),n.has(`about #Holiday`)&&n.match(`about`).unTag(`#Date`,`about-thanksgiving`),n.match(`#Date+`).match(`^the`).unTag(`Date`)}return e},BC=`(in|by|before|during|on|until|after|of|within|all)`,VC=`(last|next|this|previous|current|upcoming|coming)`,HC=`(start|end|middle|starting|ending|midpoint|beginning|mid)`,UC=`(spring|summer|winter|fall|autumn)`,WC=`(yesterday|today|tomorrow)`,GC=[{match:`in the (night|evening|morning|afternoon|day|daytime)`,tag:`Time`,reason:`in-the-night`},{match:`(#Value|#Time) (am|pm)`,tag:`Time`,reason:`value-ampm`},{match:`(tue|thu)`,tag:`WeekDay`,reason:`misc-weekday`},{match:`#Month #Date+`,tag:`Date`,reason:`correction-numberRange`},{match:`#Value of #Month`,tag:`Date`,unTag:`Time`,reason:`value-of-month`},{match:`#Cardinal #Month`,tag:`Date`,reason:`cardinal-month`},{match:`#Month #Value (and|or|to)? #Value+`,tag:`Date`,reason:`value-to-value`},{match:`#Month the #Value`,tag:`Date`,reason:`month-the-value`},{match:`[(march|may)] to? #Date`,group:0,tag:`Month`,reason:`march-to`},{match:`^(march|may)$`,tag:`Month`,reason:`single-march`},{match:`#Month or #Month`,tag:`Date`,reason:`month-or-month`},{match:`(#WeekDay|#Month) #Value`,ifNo:`#Money`,tag:`Date`,reason:`date-value`},{match:`#Value (#WeekDay|#Month)`,ifNo:`#Money`,tag:`Date`,reason:`value-date`},{match:`#Value (#WeekDay|#Duration) back`,tag:`#Date`,reason:`3-back`},{match:`for #Value #Duration`,tag:`Date`,reason:`for-x-duration`},{match:`#Value #Duration (before|ago|hence|back)`,tag:`Date`,reason:`val-duration-past`},{match:`${BC}? #Value #Duration`,tag:`Date`,reason:`value-duration`},{match:`in? #Value to #Value #Duration time?`,tag:`Date`,reason:`6-to-8-years`},{match:`#Value #Duration old`,unTag:`Date`,reason:`val-years-old`},{match:`${BC}? ${VC} ${UC}`,tag:`Date`,reason:`thisNext-season`},{match:`the? ${HC} of ${UC}`,tag:`Date`,reason:`section-season`},{match:`${UC} ${BC}? #Cardinal`,tag:`Date`,reason:`season-year`},{match:`#Date the? #Ordinal`,tag:`Date`,reason:`correction`},{match:`${VC} #Date`,tag:`Date`,reason:`thisNext-date`},{match:`due? (by|before|after|until) #Date`,tag:`Date`,reason:`by`},{match:`(last|next|this|previous|current|upcoming|coming|the) #Date`,tag:`Date`,reason:`next-feb`},{match:`#Preposition? the? ${HC} of #Date`,tag:`Date`,reason:`section-of`},{match:`#Ordinal #Duration in #Date`,tag:`Date`,reason:`duration-in`},{match:`(early|late) (at|in)? the? #Date`,tag:`Time`,reason:`early-evening`},{match:`#Date [(by|before|after|at|@|about) #Cardinal]`,group:0,tag:`Time`,reason:`date-before-Cardinal`},{match:`#Date (#Preposition|to) #Date`,ifNo:`#Duration`,tag:`Date`,reason:`date-prep-date`},{match:`(by|before|after|at|@|about) #Time`,tag:`Time`,reason:`preposition-time`},{match:`(in|after) /^[0-9]+(min|sec|wk)s?/`,tag:`Date`,reason:`shift-units`},{match:`#Date [(now|night|sometime)]`,group:0,tag:`Time`,reason:`date-now`},{match:`(from|starting|until|by) now`,tag:`Date`,reason:`for-now`},{match:`(each|every) night`,tag:`Date`,reason:`for-now`},{match:`#Date [(am|pm)]`,group:0,tag:`Time`,reason:`date-am`},{match:`[${HC}] #Date`,group:0,tag:`Date`,reason:`mid-sept`},{match:`#Month #Value to #Value of? #Year?`,tag:`Date`,reason:`june 5 to 7th`},{match:`#Value to #Value of? #Month #Year?`,tag:`Date`,reason:`5 to 7th june`},{match:`#Value #Duration of #Date`,tag:`Date`,reason:`third week of may`},{match:`#Value+ #Duration (after|before|into|later|afterwards|ago)?`,tag:`Date`,reason:`two days after`},{match:`#Value #Date`,tag:`Date`,reason:`two days`},{match:`#Date #Value`,tag:`Date`,reason:`june 5th`},{match:`#Date #Preposition #Value`,tag:`Date`,reason:`tuesday at 5`},{match:`#Date (after|before|during|on|in) #Value`,tag:`Date`,reason:`tomorrow before 3`},{match:`#Value (year|month|week|day) and a half`,tag:`Date`,reason:`a year and a half`},{match:`#Value and a half (years|months|weeks|days)`,tag:`Date`,reason:`5 and a half years`},{match:`on the #Ordinal`,tag:`Date`,reason:`on the fifth`},{match:`#Month #Value+ (and|or) #Value`,tag:`Date`,reason:`date-or-date`},{match:`#Value+ (and|or) #Value of #Month `,tag:`Date`,reason:`date-and-date`},{match:`(spring|summer|winter|fall|autumn|springtime|wintertime|summertime)`,tag:`Season`,reason:`date-tag1`},{match:`(q1|q2|q3|q4)`,tag:`FinancialQuarter`,reason:`date-tag2`},{match:`(this|next|last|current) quarter`,tag:`FinancialQuarter`,reason:`date-tag3`},{match:`(this|next|last|current) season`,tag:`Season`,reason:`date-tag4`},{match:`#Date #Preposition #Date`,tag:`Date`,reason:`friday to sunday`},{match:`(once|twice) (a|an|each) #Date`,tag:`Date`,reason:`once a day`},{match:`a #Duration`,tag:`Date`,reason:`a year`},{match:`(between|from) #Date`,tag:`Date`,reason:`between x and y`},{match:`(to|until|upto) #Date`,tag:`Date`,reason:`between x and y2`},{match:`between #Date+ and #Date+`,tag:`Date`,reason:`between x and y3`},{match:`#Month and #Month #Year`,tag:`Date`,reason:`x and y4`},{match:`the? #Date after next one?`,tag:`Date`,reason:`day after next`},{match:`(about|approx|approximately|around) #Date`,tag:`Date`,reason:`approximately june`},{match:`(by|until|on|in|at|during|over|every|each|due) the? #Date`,ifNo:`#PhrasalVerb`,tag:`Date`,reason:`until june`},{match:`(by|until|after|before|during|on|in|following|since) (next|this|last)? #Date`,ifNo:`#PhrasalVerb`,tag:`Date`,reason:`until last june`},{match:`this? (last|next|past|this|previous|current|upcoming|coming|the) #Date`,tag:`Date`,reason:`next september`},{match:`(starting|beginning|ending) #Date`,tag:`Date`,reason:`starting this june`},{match:`the? (start|end|middle|beginning) of (last|next|this|the) #Date`,tag:`Date`,reason:`start of june`},{match:`(the|this) #Date`,tag:`Date`,reason:`this coming june`},{match:`#Date up to #Date`,tag:`Date`,reason:`january up to june`},{match:`#Cardinal oclock`,tag:`Time`,reason:`2 oclock`},{match:`#Value (in|at) the? (morning|evening|night|nighttime)`,tag:`Time`,reason:`3 in the morning`},{match:`(5|10|15|20|five|ten|fifteen|quarter|twenty|half) (after|past) #Cardinal`,tag:`Time`,reason:`ten to seven`},{match:`(at|by|before) (5|10|15|20|five|ten|fifteen|twenty|quarter|half) (after|past|to)`,tag:`Time`,reason:`at-20-past`},{match:`#Date [at #Cardinal]`,group:0,ifNo:`#Year`,tag:`Time`,reason:` tuesday at 4`},{match:`half an (hour|minute|second)`,tag:`Date`,reason:`half an hour`},{match:`(in|for|by|near|at) #Timezone`,tag:`Date`,reason:`in eastern time`},{match:`#Time to #Time`,tag:`Date`,reason:`3pm to 4pm`},{match:`#Time [(sharp|on the dot)]`,group:0,tag:`Time`,reason:`4pm sharp`},{match:`(at|around|near|#Date) [#Cardinal (thirty|fifteen) (am|pm)?]`,group:0,tag:`Time`,reason:`around four thirty`},{match:`#Cardinal (thirty|fifteen) (am|pm)`,tag:`Time`,reason:`four thirty am`},{match:`[#Cardinal (thirty|fifteen)] #Date`,group:0,tag:`Time`,reason:`four thirty tomorrow`},{match:`(anytime|sometime) (before|after|near) [#Cardinal]`,group:0,tag:`Time`,reason:`antime-after-3`},{match:`(#Cardinal|a|an) #Duration (before|after|ago|from|hence|back)`,tag:`DateShift`,reason:`nine weeks frow now`},{match:`in (around|about|maybe|perhaps)? #Cardinal #Duration`,tag:`DateShift`,reason:`in two weeks`},{match:`in (a|an) #Duration`,tag:`DateShift`,reason:`in a week`},{match:`[(a|an) #Duration from] #Date`,group:0,tag:`DateShift`,reason:`an hour from now`},{match:`(a|an) #Duration ago`,tag:`DateShift`,reason:`a month ago`},{match:`in half (a|an) #Duration`,tag:`DateShift`,reason:`in half an hour`},{match:`in a (few|couple) of? #Duration`,tag:`DateShift`,reason:`in a few weeks`},{match:`[#Duration (after|before)] #Date`,group:0,tag:`DateShift`,reason:`day after tomorrow`},{match:`#Month #Ordinal and #Ordinal`,tag:`Date`,reason:`ord-and-ord`},{match:`every other #Duration`,tag:`Date`,reason:`every-other`},{match:`(every|any|each|a) (day|weekday|week day|weekend|weekend day)`,tag:`Date`,reason:`any-weekday`},{match:`(every|any|each|a) (#WeekDay)`,tag:`Date`,reason:`any-wednesday`},{match:`(every|any|each|a) (#Duration)`,tag:`Date`,reason:`any-week`},{match:`[(wed|sat)] (#Month|#Year|on|between|during|from)`,group:0,tag:`WeekDay`,reason:`wed`},{match:`^day$`,unTag:`Date`,reason:`spa-day`},{match:`(in|of|by|for)? (#Possessive && #Date)`,unTag:`Date`,reason:`tomorrows meeting`},{match:`${WC} [#Value]$`,unTag:`Date`,group:0,reason:`yesterday-7`},{match:`^[#Value] ${WC}$`,group:0,unTag:`Date`,reason:`7 yesterday`},{match:`on #Cardinal$`,unTag:`Date`,reason:`on 5`},{match:`[this] tomorrow`,group:0,unTag:`Date`,reason:`this-tomorrow`},{match:`(q1|q2|q3|q4) #Year`,tag:`Date`,reason:`q2 2016`},{match:`^[#Value] (this|next|last)`,group:0,unTag:`Date`,reason:`4 next`},{match:`(last|this|next) #Duration [#Value]`,group:0,unTag:`Date`,reason:`this month 7`},{match:`[!#Month] #Value (last|this|next) #Date`,group:0,unTag:`Date`,reason:`7 this month`},{match:`(in|over) the #Duration #Date+?`,unTag:`Date`,reason:`over-the-duration`},{match:`#Ordinal quarter of? #Year`,unTag:`Fraction`},{match:`(from|by|before) now`,unTag:`Time`,tag:`Date`},{match:`#Value of? (this|next|last) #Date`,tag:`Date`},{match:`(first|initial|second|latter) half of #Month`,tag:`Date`}],KC=null,qC=function(e){let{world:t}=e;KC||=t.methods.one.buildNet(GC,t),e.sweep(KC)},JC={dates:function(e){return e.cache(),qC(e),qC(e),NC(e),FC(e),LC(e),zC(e),e.uncache(),e.match(`#Cardinal #Duration and? #DateShift`).tag(`DateShift`,`three days before`),e.match(`#DateShift and #Cardinal #Duration`).tag(`DateShift`,`three days and two weeks`),e.match(`#Time [(sharp|on the dot)]`).tag(`Time`,`4pm sharp`),e}},YC={FinancialQuarter:{is:`Date`,not:[`Fraction`]},Season:{is:`Date`},Year:{is:`Date`,not:[`RomanNumeral`]},Holiday:{is:`Date`,also:`Noun`},DateShift:{is:`Date`,not:[`Timezone`,`Holiday`]}},U=`America/`,XC=`Asia/`,ZC=`Europe/`,QC=`Africa/`,$C=`Australia/`,ew=`Pacific/`,tw={"british summer time":ZC+`London`,bst:ZC+`London`,"british time":ZC+`London`,"britain time":ZC+`London`,"irish summer time":ZC+`Dublin`,"irish time":ZC+`Dublin`,"central european time":ZC+`Berlin`,cet:ZC+`Berlin`,"central european summer time":ZC+`Berlin`,cest:ZC+`Berlin`,"central europe":ZC+`Berlin`,"eastern european time":ZC+`Riga`,eet:ZC+`Riga`,"eastern european summer time":ZC+`Riga`,eest:ZC+`Riga`,"eastern europe time":ZC+`Riga`,"western european time":ZC+`Lisbon`,"western european summer time":ZC+`Lisbon`,"turkey standard time":ZC+`Istanbul`,"turkish time":ZC+`Istanbul`,utc:QC+`Freetown`,"greenwich standard time":QC+`Freetown`,gmt:QC+`Freetown`,"east africa time":QC+`Nairobi`,"east african time":QC+`Nairobi`,"eastern africa time":QC+`Nairobi`,"central africa time":QC+`Khartoum`,"central african time":QC+`Khartoum`,"south africa standard time":QC+`Johannesburg`,"west africa standard time":QC+`Lagos`,"western africa time":QC+`Lagos`,"west african time":QC+`Lagos`,"australian central standard time":$C+`Adelaide`,acst:$C+`Adelaide`,"australian central daylight time":$C+`Adelaide`,acdt:$C+`Adelaide`,"australian eastern standard time":$C+`Brisbane`,aest:$C+`Brisbane`,"australian eastern daylight time":$C+`Brisbane`,aedt:$C+`Brisbane`,"australian western standard time":$C+`Perth`,awst:$C+`Perth`,"australian western daylight time":$C+`Perth`,awdt:$C+`Perth`,"australian central western standard time":$C+`Eucla`,acwst:$C+`Eucla`,"lord howe standard time":$C+`Lord_Howe`,lhst:$C+`Lord_Howe`,"lord howe daylight time":$C+`Lord_Howe`,lhdt:$C+`Lord_Howe`,"russian standard time":ZC+`Moscow`,msk:ZC+`Moscow`,"central standard time":U+`Chicago`,"central time":U+`Chicago`,cst:U+`Havana`,"central daylight time":U+`Chicago`,cdt:U+`Havana`,"mountain standard time":U+`Denver`,"mountain time":U+`Denver`,mst:U+`Denver`,"mountain daylight time":U+`Denver`,mdt:U+`Denver`,"atlantic standard time":U+`Halifax`,"atlantic time":U+`Halifax`,ast:XC+`Baghdad`,"atlantic daylight time":U+`Halifax`,adt:U+`Halifax`,"eastern standard time":U+`New_York`,"eastern time":U+`New_York`,est:U+`New_York`,"eastern daylight time":U+`New_York`,edt:U+`New_York`,"pacific time":U+`Los_Angeles`,"pacific standard time":U+`Los_Angeles`,pst:U+`Los_Angeles`,"pacific daylight time":U+`Los_Angeles`,pdt:U+`Los_Angeles`,"alaskan standard time":U+`Anchorage`,"alaskan time":U+`Anchorage`,ahst:U+`Anchorage`,"alaskan daylight time":U+`Anchorage`,ahdt:U+`Anchorage`,"hawaiian standard time":ew+`Honolulu`,"hawaiian time":ew+`Honolulu`,hst:ew+`Honolulu`,"aleutian time":ew+`Honolulu`,"hawaii time":ew+`Honolulu`,"newfoundland standard time":U+`St_Johns`,"newfoundland time":U+`St_Johns`,"newfoundland daylight time":U+`St_Johns`,"brazil time":U+`Sao_Paulo`,"brazilian time":U+`Sao_Paulo`,"argentina time":U+`Buenos_Aires`,"argentinian time":U+`Buenos_Aires`,"amazon time":U+`Manaus`,"amazonian time":U+`Manaus`,"easter island standard time":`Chile/Easterisland`,"easter island summer time":`Chile/Easterisland`,easst:`Chile/Easterisland`,"venezuelan standard time":U+`Caracas`,"venezuelan time":U+`Caracas`,"venezuela time":U+`Caracas`,"paraguay time":U+`Asuncion`,"paraguay summer time":U+`Asuncion`,"cuba standard time":U+`Havana`,"cuba time":U+`Havana`,"cuba daylight time":U+`Havana`,"cuban time":U+`Havana`,"bolivia time":U+`La_Paz`,"bolivian time":U+`La_Paz`,"colombia time":U+`Bogota`,"colombian time":U+`Bogota`,"acre time":U+`Eirunepe`,"peru time":U+`Lima`,"chile standard time":U+`Punta_Arenas`,"chile time":U+`Punta_Arenas`,clst:U+`Punta_Arenas`,"chile summer time":U+`Punta_Arenas`,cldt:U+`Punta_Arenas`,"uruguay time":U+`Montevideo`,uyt:U+`Montevideo`,"arabic standard time":XC+`Baghdad`,"iran standard time":XC+`Tehran`,"iran time":XC+`Tehran`,"iran daylight time":XC+`Tehran`,"pakistan standard time":XC+`Karachi`,"pakistan time":XC+`Karachi`,"india standard time":XC+`Kolkata`,"indian time":XC+`Kolkata`,"indochina time":XC+`Bangkok`,"china standard time":XC+`Shanghai`,"alma-ata time":XC+`Almaty`,"oral time":XC+`Oral`,"orat time":XC+`Oral`,"yakutsk time":XC+`Yakutsk`,yakt:XC+`Yakutsk`,"gulf standard time":XC+`Dubai`,"gulf time":XC+`Dubai`,"hong kong time":XC+`Hong_Kong`,"western indonesian time":XC+`Jakarta`,"indonesia time":XC+`Jakarta`,"central indonesian time":XC+`Makassar`,"israel daylight time":XC+`Jerusalem`,"israel standard time":XC+`Jerusalem`,"israel time":XC+`Jerusalem`,"krasnoyarsk time":XC+`Krasnoyarsk`,"malaysia time":XC+`Kuala_Lumpur`,"singapore time":XC+`Singapore`,"korea standard time":XC+`Seoul`,"korea time":XC+`Seoul`,kst:XC+`Seoul`,"korean time":XC+`Seoul`,"uzbekistan time":XC+`Samarkand`,"vladivostok time":XC+`Vladivostok`,"maldives time":`Indian/Maldives`,"mauritius time":`Indian/Mauritius`,"marshall islands time":ew+`Kwajalein`,"samoa standard time":ew+`Midway`,"somoan time":ew+`Midway`,"chamorro standard time":ew+`Guam`,"papua new guinea time":ew+`Bougainville`},nw=nx().timezones,rw=Object.keys(nw).reduce((e,t)=>(e[t]=t,e),{}),iw=Object.assign({},tw,rw),aw=[`weekday`,`summer`,`winter`,`autumn`,`all day`,`eod`,`eom`,`eoy`,`standard time`,`daylight time`,`tommorrow`],ow=`centuries.century.day.days.decade.decades.hour.hours.hr.hrs.millisecond.milliseconds.minute.minutes.min.mins.month.months.seconds.sec.secs.week end.week ends.weekend.weekends.week.weeks.wk.wks.year.years.yr.yrs.quarter.qtr.qtrs.season.seasons`.split(`.`),sw=`all hallows eve.all saints day.all sts day.april fools.armistice day.australia day.bastille day.boxing day.canada day.christmas eve.christmas.cinco de mayo.day of the dead.dia de muertos.dieciseis de septiembre.emancipation day.grito de dolores.groundhog day.halloween.harvey milk day.inauguration day.independence day.independents day.juneteenth.labour day.national freedom day.national nurses day.new years eve.new years.purple heart day.rememberance day.rosa parks day.saint andrews day.saint patricks day.saint stephens day.saint valentines day.st andrews day.st patricks day.st stephens day.st valentines day .valentines day.valentines.veterans day.victoria day.womens equality day.xmas.epiphany.orthodox christmas day.orthodox new year.assumption of mary.all souls day.feast of the immaculate conception.feast of our lady of guadalupe.kwanzaa.imbolc.beltaine.lughnassadh.samhain.martin luther king day.mlk day.presidents day.mardi gras.tax day.commonwealth day.mothers day.memorial day.fathers day.columbus day.indigenous peoples day.canadian thanksgiving.election day.thanksgiving.t-day.turkey day.black friday.cyber monday.ash wednesday.palm sunday.maundy thursday.good friday.holy saturday.easter.easter sunday.easter monday.orthodox good friday.orthodox holy saturday.orthodox easter.orthodox easter monday.ascension day.pentecost.whitsunday.whit sunday.whit monday.trinity sunday.corpus christi.advent.tu bishvat.tu bshevat.purim.passover.yom hashoah.lag baomer.shavuot.tisha bav.rosh hashana.yom kippur.sukkot.shmini atzeret.simchat torah.chanukah.hanukkah.isra and miraj.lailat al-qadr.eid al-fitr.id al-Fitr.eid ul-Fitr.ramadan.eid al-adha.muharram.the prophets birthday.ostara.march equinox.vernal equinox.litha.june solistice.summer solistice.mabon.september equinox.fall equinox.autumnal equinox.yule.december solstice.winter solstice.chinese new year.diwali`.split(`.`),cw=[`noon`,`midnight`,`morning`,`tonight`,`evening`,`afternoon`,`breakfast time`,`lunchtime`,`dinnertime`,`midday`,`eod`,`oclock`,`oclock`,`at night`],lw={"a couple":`Value`,thur:`WeekDay`,thurs:`WeekDay`},uw=function(e,t){e.forEach(e=>{lw[e]=t})};uw(Object.keys(iw),`Timezone`),uw(aw,`Date`),uw(ow,`Duration`),uw(sw,`Holiday`),uw(cw,`Time`);var dw=[[/^[0-9]+(min|sec|hr|d)s?$/i,`Duration`,`30min`],[/^[0-9]{4}-[0-9]{2}$/,`Date`,`2012-06`],[/^[0-9]{2}h[0-9]{2}$/i,`Time`,`13h30`],[/^@[0-9]+:[0-9]{2}$/,`Time`,`@5:30`],[/^@[1-9]+(am|pm)$/,`Time`,`@5pm`],[/^(?:0[1-9]|[12]\d|3[01])\/(?:0[1-9]|[12]\d|3[01])$/,`Date`,`03/02`]],fw=`3.7.1`,pw=e=>e?nx(e).format(`{nice-day} {year}`):`-`,mw=`\x1B[0m`,hw={magenta:e=>`\x1B[35m`+e+mw,cyan:e=>`\x1B[36m`+e+mw,yellow:e=>`\x1B[33m`+e+mw,dim:e=>`\x1B[2m`+e+mw,i:e=>`\x1B[3m`+e+mw},gw=function(e){e.dates().forEach(e=>{let t=e.dates().get()[0];console.log(`
19
+ ────────`),e.debug(`highlight`);let n=``;t&&t.start&&(n=` `+hw.magenta(pw(t.start))),t&&t.end&&(n+=hw.dim(` → `)+hw.cyan(pw(t.end))),console.log(n+`
20
+ `)})},_w={tags:YC,words:lw,compute:JC,api:kC,mutate:e=>{e.model.two.regexText=e.model.two.regexText||[],e.model.two.regexText=e.model.two.regexText.concat(dw),e.methods.one.debug=e.methods.one.debug||{},e.methods.one.debug.dates=gw},hooks:[`dates`],version:fw};function vw(){return vw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vw.apply(null,arguments)}var yw={relTol:1e-12,absTol:1e-15,matrix:`Matrix`,number:`number`,numberFallback:`number`,precision:64,predictable:!1,randomSeed:null,legacySubset:!1};function bw(e,t){if(Sw(e,t))return e[t];throw typeof e[t]==`function`&&ww(e,t)?Error(`Cannot access method "`+t+`" as a property`):Error(`No access to property "`+t+`"`)}function xw(e,t,n){if(Sw(e,t))return e[t]=n,n;throw Error(`No access to property "`+t+`"`)}function Sw(e,t){return!Tw(e)&&!Array.isArray(e)?!1:W(Ew,t)?!0:!(t in Object.prototype||t in Function.prototype)}function Cw(e,t){if(!ww(e,t))throw Error(`No access to method "`+t+`"`);return e[t]}function ww(e,t){return e==null||typeof e[t]!=`function`||W(e,t)&&Object.getPrototypeOf&&t in Object.getPrototypeOf(e)?!1:W(Dw,t)?!0:!(t in Object.prototype||t in Function.prototype)}function Tw(e){return typeof e==`object`&&e&&e.constructor===Object}var Ew={length:!0,name:!0},Dw={toString:!0,valueOf:!0,toLocaleString:!0},Ow=class{constructor(e){this.wrappedObject=e,this[Symbol.iterator]=this.entries}keys(){return Object.keys(this.wrappedObject).filter(e=>this.has(e)).values()}get(e){return bw(this.wrappedObject,e)}set(e,t){return xw(this.wrappedObject,e,t),this}has(e){return Sw(this.wrappedObject,e)&&e in this.wrappedObject}entries(){return Aw(this.keys(),e=>[e,this.get(e)])}forEach(e){for(var t of this.keys())e(this.get(t),t,this)}delete(e){Sw(this.wrappedObject,e)&&delete this.wrappedObject[e]}clear(){for(var e of this.keys())this.delete(e)}get size(){return Object.keys(this.wrappedObject).length}},kw=class{constructor(e,t,n){this.a=e,this.b=t,this.bKeys=n,this[Symbol.iterator]=this.entries}get(e){return this.bKeys.has(e)?this.b.get(e):this.a.get(e)}set(e,t){return this.bKeys.has(e)?this.b.set(e,t):this.a.set(e,t),this}has(e){return this.b.has(e)||this.a.has(e)}keys(){return new Set([...this.a.keys(),...this.b.keys()])[Symbol.iterator]()}entries(){return Aw(this.keys(),e=>[e,this.get(e)])}forEach(e){for(var t of this.keys())e(this.get(t),t,this)}delete(e){return this.bKeys.has(e)?this.b.delete(e):this.a.delete(e)}clear(){this.a.clear(),this.b.clear()}get size(){return[...this.keys()].length}};function Aw(e,t){return{next:()=>{var n=e.next();return n.done?n:{value:t(n.value),done:!1}}}}function jw(){return new Map}function Mw(e){if(!e)return jw();if(tT(e))return e;if(eT(e))return new Ow(e);throw Error(`createMap can create maps from objects or Maps`)}function Nw(e){if(e instanceof Ow)return e.wrappedObject;var t={};for(var n of e.keys())xw(t,n,e.get(n));return t}function Pw(e){return typeof e==`number`}function Fw(e){return!e||typeof e!=`object`||typeof e.constructor!=`function`?!1:e.isBigNumber===!0&&typeof e.constructor.prototype==`object`&&e.constructor.prototype.isBigNumber===!0||typeof e.constructor.isDecimal==`function`&&e.constructor.isDecimal(e)===!0}function Iw(e){return typeof e==`bigint`}function Lw(e){return e&&typeof e==`object`&&Object.getPrototypeOf(e).isComplex===!0||!1}function Rw(e){return e&&typeof e==`object`&&Object.getPrototypeOf(e).isFraction===!0||!1}function zw(e){return e&&e.constructor.prototype.isUnit===!0||!1}function Bw(e){return typeof e==`string`}var Vw=Array.isArray;function Hw(e){return e&&e.constructor.prototype.isMatrix===!0||!1}function Uw(e){return Array.isArray(e)||Hw(e)}function Ww(e){return e&&e.isDenseMatrix&&e.constructor.prototype.isMatrix===!0||!1}function Gw(e){return e&&e.isSparseMatrix&&e.constructor.prototype.isMatrix===!0||!1}function Kw(e){return e&&e.constructor.prototype.isRange===!0||!1}function qw(e){return e&&e.constructor.prototype.isIndex===!0||!1}function Jw(e){return typeof e==`boolean`}function Yw(e){return e&&e.constructor.prototype.isResultSet===!0||!1}function Xw(e){return e&&e.constructor.prototype.isHelp===!0||!1}function Zw(e){return typeof e==`function`}function Qw(e){return e instanceof Date}function $w(e){return e instanceof RegExp}function eT(e){return!!(e&&typeof e==`object`&&e.constructor===Object&&!Lw(e)&&!Rw(e))}function tT(e){return e?e instanceof Map||e instanceof Ow||typeof e.set==`function`&&typeof e.get==`function`&&typeof e.keys==`function`&&typeof e.has==`function`:!1}function nT(e){return e===null}function rT(e){return e===void 0}function iT(e){return e&&e.isAccessorNode===!0&&e.constructor.prototype.isNode===!0||!1}function aT(e){return e&&e.isArrayNode===!0&&e.constructor.prototype.isNode===!0||!1}function oT(e){return e&&e.isAssignmentNode===!0&&e.constructor.prototype.isNode===!0||!1}function sT(e){return e&&e.isBlockNode===!0&&e.constructor.prototype.isNode===!0||!1}function cT(e){return e&&e.isConditionalNode===!0&&e.constructor.prototype.isNode===!0||!1}function lT(e){return e&&e.isConstantNode===!0&&e.constructor.prototype.isNode===!0||!1}function uT(e){return lT(e)||gT(e)&&e.args.length===1&&lT(e.args[0])&&`-+~`.includes(e.op)}function dT(e){return e&&e.isFunctionAssignmentNode===!0&&e.constructor.prototype.isNode===!0||!1}function fT(e){return e&&e.isFunctionNode===!0&&e.constructor.prototype.isNode===!0||!1}function pT(e){return e&&e.isIndexNode===!0&&e.constructor.prototype.isNode===!0||!1}function mT(e){return e&&e.isNode===!0&&e.constructor.prototype.isNode===!0||!1}function hT(e){return e&&e.isObjectNode===!0&&e.constructor.prototype.isNode===!0||!1}function gT(e){return e&&e.isOperatorNode===!0&&e.constructor.prototype.isNode===!0||!1}function _T(e){return e&&e.isParenthesisNode===!0&&e.constructor.prototype.isNode===!0||!1}function vT(e){return e&&e.isRangeNode===!0&&e.constructor.prototype.isNode===!0||!1}function yT(e){return e&&e.isRelationalNode===!0&&e.constructor.prototype.isNode===!0||!1}function bT(e){return e&&e.isSymbolNode===!0&&e.constructor.prototype.isNode===!0||!1}function xT(e){return e&&e.constructor.prototype.isChain===!0||!1}function ST(e){var t=typeof e;return t===`object`?e===null?`null`:Fw(e)?`BigNumber`:e.constructor&&e.constructor.name?e.constructor.name:`Object`:t}function CT(e){var t=typeof e;if(t===`number`||t===`bigint`||t===`string`||t===`boolean`||e==null)return e;if(typeof e.clone==`function`)return e.clone();if(Array.isArray(e))return e.map(function(e){return CT(e)});if(e instanceof Date)return new Date(e.valueOf());if(Fw(e))return e;if(eT(e))return wT(e,CT);if(t===`function`)return e;throw TypeError(`Cannot clone: unknown type of value (value: ${e})`)}function wT(e,t){var n={};for(var r in e)W(e,r)&&(n[r]=t(e[r]));return n}function TT(e,t){for(var n in t)W(t,n)&&(e[n]=t[n]);return e}function ET(e,t){var n,r,i;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(r=0,i=e.length;r<i;r++)if(!ET(e[r],t[r]))return!1;return!0}else if(typeof e==`function`)return e===t;else if(e instanceof Object){if(Array.isArray(t)||!(t instanceof Object))return!1;for(n in e)if(!(n in t)||!ET(e[n],t[n]))return!1;for(n in t)if(!(n in e))return!1;return!0}else return e===t}function DT(e,t,n){var r=!0,i;Object.defineProperty(e,t,{get:function(){return r&&=(i=n(),!1),i},set:function(e){i=e,r=!1},configurable:!0,enumerable:!0})}function W(e,t){return e&&Object.hasOwnProperty.call(e,t)}function OT(e,t){for(var n={},r=0;r<t.length;r++){var i=t[r],a=e[i];a!==void 0&&(n[i]=a)}return n}var kT=[`Matrix`,`Array`],AT=[`number`,`BigNumber`,`bigint`,`Fraction`],G=function(e){if(e)throw Error(`The global config is readonly.
21
+ Please create a mathjs instance if you want to change the default configuration.
22
+ Example:
23
+
24
+ import { create, all } from 'mathjs';
25
+ const mathjs = create(all);
26
+ mathjs.config({ number: 'BigNumber' });
27
+ `);return Object.freeze(yw)};vw(G,yw,{MATRIX_OPTIONS:kT,NUMBER_OPTIONS:AT});var jT=e.t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self,n.typed=r())})(e,(function(){"use strict";function e(){return!0}function t(){return!1}function n(){}let r=`Argument is not a typed-function.`;function i(){function a(e){return typeof e==`object`&&!!e&&e.constructor===Object}let o=[{name:`number`,test:function(e){return typeof e==`number`}},{name:`string`,test:function(e){return typeof e==`string`}},{name:`boolean`,test:function(e){return typeof e==`boolean`}},{name:`Function`,test:function(e){return typeof e==`function`}},{name:`Array`,test:Array.isArray},{name:`Date`,test:function(e){return e instanceof Date}},{name:`RegExp`,test:function(e){return e instanceof RegExp}},{name:`Object`,test:a},{name:`null`,test:function(e){return e===null}},{name:`undefined`,test:function(e){return e===void 0}}],s={name:`any`,test:e,isAny:!0},c,l,u=0,d={createCount:0};function f(e){let t=c.get(e);if(t)return t;let n=`Unknown type "`+e+`"`,r=e.toLowerCase(),i;for(i of l)if(i.toLowerCase()===r){n+=`. Did you mean "`+i+`" ?`;break}throw TypeError(n)}function p(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`any`,n=t?f(t).index:l.length,r=[];for(let t=0;t<e.length;++t){if(!e[t]||typeof e[t].name!=`string`||typeof e[t].test!=`function`)throw TypeError(`Object with properties {name: string, test: function} expected`);let i=e[t].name;if(c.has(i))throw TypeError(`Duplicate type name "`+i+`"`);r.push(i),c.set(i,{name:i,test:e[t].test,isAny:e[t].isAny,index:n+t,conversionsTo:[]})}let i=l.slice(n);l=l.slice(0,n).concat(r).concat(i);for(let e=n+r.length;e<l.length;++e)c.get(l[e]).index=e}function m(){c=new Map,l=[],u=0,p([s],!1)}m(),p(o);function h(){let e;for(e of l)c.get(e).conversionsTo=[];u=0}function g(e){let t=l.filter(t=>{let n=c.get(t);return!n.isAny&&n.test(e)});return t.length?t:[`any`]}function _(e){return e&&typeof e==`function`&&`_typedFunctionData`in e}function v(e,t,n){if(!_(e))throw TypeError(r);let i=n&&n.exact,a=T(Array.isArray(t)?t.join(`,`):t),o=x(a);if(!i||o in e.signatures){let t=e._typedFunctionData.signatureMap.get(o);if(t)return t}let s=a.length,c;if(i){c=[];let t;for(t in e.signatures)c.push(e._typedFunctionData.signatureMap.get(t))}else c=e._typedFunctionData.signatures;for(let e=0;e<s;++e){let t=a[e],n=[],r;for(r of c){let i=k(r.params,e);if(!(!i||t.restParam&&!i.restParam)){if(!i.hasAny){let e=w(i);if(t.types.some(t=>!e.has(t.name)))continue}n.push(r)}}if(c=n,c.length===0)break}let l;for(l of c)if(l.params.length<=s)return l;throw TypeError(`Signature not found (signature: `+(e.name||`unnamed`)+`(`+x(a,`, `)+`))`)}function y(e,t,n){return v(e,t,n).implementation}function b(e,t){let n=f(t);if(n.test(e))return e;let r=n.conversionsTo;if(r.length===0)throw Error(`There are no conversions to `+t+` defined.`);for(let t=0;t<r.length;t++)if(f(r[t].from).test(e))return r[t].convert(e);throw Error(`Cannot convert `+e+` to `+t)}function x(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`,`;return e.map(e=>e.name).join(t)}function S(e){let t=e.indexOf(`...`)===0,n=(t?e.length>3?e.slice(3):`any`:e).split(`|`).map(e=>f(e.trim())),r=!1,i=t?`...`:``;return{types:n.map(function(e){return r=e.isAny||r,i+=e.name+`|`,{name:e.name,typeIndex:e.index,test:e.test,isAny:e.isAny,conversion:null,conversionIndex:-1}}),name:i.slice(0,-1),hasAny:r,hasConversion:!1,restParam:t}}function C(e){let t=re(e.types.map(e=>e.name)),n=e.hasAny,r=e.name,i=t.map(function(e){let t=f(e.from);return n=t.isAny||n,r+=`|`+e.from,{name:e.from,typeIndex:t.index,test:t.test,isAny:t.isAny,conversion:e,conversionIndex:e.index}});return{types:e.types.concat(i),name:r,hasAny:n,hasConversion:i.length>0,restParam:e.restParam}}function w(e){return e.typeSet||(e.typeSet=new Set,e.types.forEach(t=>e.typeSet.add(t.name))),e.typeSet}function T(e){let t=[];if(typeof e!=`string`)throw TypeError(`Signatures must be strings`);let n=e.trim();if(n===``)return t;let r=n.split(`,`);for(let e=0;e<r.length;++e){let n=S(r[e].trim());if(n.restParam&&e!==r.length-1)throw SyntaxError(`Unexpected rest parameter "`+r[e]+`": only allowed for the last parameter`);if(n.types.length===0)return null;t.push(n)}return t}function E(e){let t=de(e);return t?t.restParam:!1}function D(t){if(!t||t.types.length===0)return e;if(t.types.length===1)return f(t.types[0].name).test;if(t.types.length===2){let e=f(t.types[0].name).test,n=f(t.types[1].name).test;return function(t){return e(t)||n(t)}}else{let e=t.types.map(function(e){return f(e.name).test});return function(t){for(let n=0;n<e.length;n++)if(e[n](t))return!0;return!1}}}function O(e){let t,n,r;if(E(e)){t=R(e).map(D);let n=t.length,r=D(de(e)),i=function(e){for(let t=n;t<e.length;t++)if(!r(e[t]))return!1;return!0};return function(e){for(let n=0;n<t.length;n++)if(!t[n](e[n]))return!1;return i(e)&&e.length>=n+1}}else if(e.length===0)return function(e){return e.length===0};else if(e.length===1)return n=D(e[0]),function(e){return n(e[0])&&e.length===1};else if(e.length===2)return n=D(e[0]),r=D(e[1]),function(e){return n(e[0])&&r(e[1])&&e.length===2};else return t=e.map(D),function(e){for(let n=0;n<t.length;n++)if(!t[n](e[n]))return!1;return e.length===t.length}}function k(e,t){return t<e.length?e[t]:E(e)?de(e):null}function A(e,t){let n=k(e,t);return n?w(n):new Set}function j(e){return e.conversion===null||e.conversion===void 0}function M(e,t){let n=new Set;return e.forEach(e=>{let r=A(e.params,t),i;for(i of r)n.add(i)}),n.has(`any`)?[`any`]:Array.from(n)}function N(e,t,n){let r,i,a=e||`unnamed`,o=n,s;for(s=0;s<t.length;s++){let e=[];if(o.forEach(n=>{let r=D(k(n.params,s));(s<n.params.length||E(n.params))&&r(t[s])&&e.push(n)}),e.length===0){if(i=M(o,s),i.length>0){let e=g(t[s]);return r=TypeError(`Unexpected type of argument in function `+a+` (expected: `+i.join(` or `)+`, actual: `+e.join(` | `)+`, index: `+s+`)`),r.data={category:`wrongType`,fn:a,index:s,actual:e,expected:i},r}}else o=e}let c=o.map(function(e){return E(e.params)?1/0:e.params.length});if(t.length<Math.min.apply(null,c))return i=M(o,s),r=TypeError(`Too few arguments in function `+a+` (expected: `+i.join(` or `)+`, index: `+t.length+`)`),r.data={category:`tooFewArgs`,fn:a,index:t.length,expected:i},r;let l=Math.max.apply(null,c);if(t.length>l)return r=TypeError(`Too many arguments in function `+a+` (expected: `+l+`, actual: `+t.length+`)`),r.data={category:`tooManyArgs`,fn:a,index:t.length,expectedLength:l},r;let u=[];for(let e=0;e<t.length;++e)u.push(g(t[e]).join(`|`));return r=TypeError(`Arguments of type "`+u.join(`, `)+`" do not match any of the defined signatures of function `+a+`.`),r.data={category:`mismatch`,actual:u},r}function ee(e){let t=l.length+1;for(let n=0;n<e.types.length;n++)t=Math.min(t,e.types[n].typeIndex);return t}function P(e){let t=u+1;for(let n=0;n<e.types.length;n++)j(e.types[n])||(t=Math.min(t,e.types[n].conversionIndex));return t}function te(e,t){if(e.hasAny){if(!t.hasAny)return .1}else if(t.hasAny)return-.1;if(e.restParam){if(!t.restParam)return .01}else if(t.restParam)return-.01;let n=ee(e)-ee(t);if(n<0)return-.001;if(n>0)return .001;let r=P(e),i=P(t);if(e.hasConversion){if(!t.hasConversion)return(1+r)*1e-6}else if(t.hasConversion)return-(1+i)*1e-6;let a=r-i;return a<0?-1e-7:a>0?1e-7:0}function ne(e,t){let n=e.params,r=t.params,i=de(n),a=de(r),o=E(n),s=E(r);if(o&&i.hasAny){if(!s||!a.hasAny)return 1e7}else if(s&&a.hasAny)return-1e7;let c=0,l=0,u;for(u of n)u.hasAny&&++c,u.hasConversion&&++l;let d=0,f=0;for(u of r)u.hasAny&&++d,u.hasConversion&&++f;if(c!==d)return(c-d)*1e6;if(o&&i.hasConversion){if(!s||!a.hasConversion)return 1e5}else if(s&&a.hasConversion)return-1e5;if(l!==f)return(l-f)*1e4;if(o){if(!s)return 1e3}else if(s)return-1e3;let p=(n.length-r.length)*(o?-100:100);if(p!==0)return p;let m=[],h=0;for(let e=0;e<n.length;++e){let t=te(n[e],r[e]);m.push(t),h+=t}if(h!==0)return(h<0?-10:10)+h;let g,_=9,v=_/(m.length+1);for(g of m){if(g!==0)return(g<0?-_:_)+g;_-=v}return 0}function re(e){if(e.length===0)return[];let t=e.map(f);if(e.length===1)return t[0].conversionsTo;let n=new Set(e),r=new Set;for(let e=0;e<t.length;++e)for(let i of t[e].conversionsTo)n.has(i.from)||r.add(i.from);let i=[];for(let e of r){let n=u+1,r=null;for(let i=0;i<t.length;++i)for(let a of t[i].conversionsTo)a.from===e&&a.index<n&&(n=a.index,r=a);i.push(r)}return i}function F(e,t){let n=t,r=``;if(e.some(e=>e.hasConversion)){let i=E(e),a=e.map(ie);r=a.map(e=>e.name).join(`;`),n=function(){let e=[],n=i?arguments.length-1:arguments.length;for(let t=0;t<n;t++)e[t]=a[t](arguments[t]);return i&&(e[n]=arguments[n].map(a[n])),t.apply(this,e)}}let i=n;if(E(e)){let t=e.length-1;i=function(){return n.apply(this,fe(arguments,0,t).concat([fe(arguments,t)]))}}return r&&Object.defineProperty(i,`name`,{value:r}),i}function ie(e){let t,n,r,i,a=[],o=[],s=``;e.types.forEach(function(e){e.conversion&&(s+=e.conversion.from+`~>`+e.conversion.to+`,`,a.push(f(e.conversion.from).test),o.push(e.conversion.convert))}),s=s?s.slice(0,-1):`pass`;let c=e=>e;switch(o.length){case 0:break;case 1:t=a[0],r=o[0],c=function(e){return t(e)?r(e):e};break;case 2:t=a[0],n=a[1],r=o[0],i=o[1],c=function(e){return t(e)?r(e):n(e)?i(e):e};break;default:c=function(e){for(let t=0;t<o.length;t++)if(a[t](e))return o[t](e);return e}}return Object.defineProperty(c,`name`,{value:s}),c}function I(e){function t(e,n,r){if(n<e.length){let i=e[n],a=[];if(i.restParam){let e=i.types.filter(j);e.length<i.types.length&&a.push({types:e,name:`...`+e.map(e=>e.name).join(`|`),hasAny:e.some(e=>e.isAny),hasConversion:!1,restParam:!0}),a.push(i)}else a=i.types.map(function(e){return{types:[e],name:e.name,hasAny:e.isAny,hasConversion:e.conversion,restParam:!1}});return me(a,function(i){return t(e,n+1,r.concat([i]))})}else return[r]}return t(e,0,[])}function ae(e,t){let n=Math.max(e.length,t.length);for(let r=0;r<n;r++){let n=A(e,r),i=A(t,r),a=!1,o;for(o of i)if(n.has(o)){a=!0;break}if(!a)return!1}let r=e.length,i=t.length,a=E(e),o=E(t);return a?o?r===i:i>=r:o?r>=i:r===i}function oe(e){return e.map(e=>ye(e)?_e(e.referToSelf.callback):ve(e)?ge(e.referTo.references,e.referTo.callback):e)}function L(e,t,n){let r=[],i;for(i of e){let e=n[i];if(typeof e!=`number`)throw TypeError(`No definition for referenced signature "`+i+`"`);if(e=t[e],typeof e!=`function`)return!1;r.push(e)}return r}function se(e,t,n){let r=oe(e),i=Array(r.length).fill(!1),a=!0;for(;a;){a=!1;let e=!0;for(let o=0;o<r.length;++o){if(i[o])continue;let s=r[o];if(ye(s))r[o]=s.referToSelf.callback(n),r[o].referToSelf=s.referToSelf,i[o]=!0,e=!1;else if(ve(s)){let n=L(s.referTo.references,r,t);n?(r[o]=s.referTo.callback.apply(this,n),r[o].referTo=s.referTo,i[o]=!0,e=!1):a=!0}}if(e&&a)throw SyntaxError(`Circular reference detected in resolving typed.referTo`)}return r}function ce(e){let t=/\bthis(\(|\.signatures\b)/;Object.keys(e).forEach(n=>{let r=e[n];if(t.test(r.toString()))throw SyntaxError("Using `this` to self-reference a function is deprecated since typed-function@3. Use typed.referTo and typed.referToSelf instead.")})}function le(e,r){if(d.createCount++,Object.keys(r).length===0)throw SyntaxError(`No signatures provided`);d.warnAgainstDeprecatedThis&&ce(r);let i=[],a=[],o={},s=[],c;for(c in r){if(!Object.prototype.hasOwnProperty.call(r,c))continue;let e=T(c);if(!e)continue;i.forEach(function(t){if(ae(t,e))throw TypeError(`Conflicting signatures "`+x(t)+`" and "`+x(e)+`".`)}),i.push(e);let t=a.length;a.push(r[c]);let n=e.map(C),l;for(l of I(n)){let e=x(l);s.push({params:l,name:e,fn:t}),l.every(e=>!e.hasConversion)&&(o[e]=t)}}s.sort(ne);let l=se(a,o,Ce),u;for(u in o)Object.prototype.hasOwnProperty.call(o,u)&&(o[u]=l[o[u]]);let f=[],p=new Map;for(u of s)p.has(u.name)||(u.fn=l[u.fn],f.push(u),p.set(u.name,u));let m=f[0]&&f[0].params.length<=2&&!E(f[0].params),h=f[1]&&f[1].params.length<=2&&!E(f[1].params),g=f[2]&&f[2].params.length<=2&&!E(f[2].params),_=f[3]&&f[3].params.length<=2&&!E(f[3].params),v=f[4]&&f[4].params.length<=2&&!E(f[4].params),y=f[5]&&f[5].params.length<=2&&!E(f[5].params),b=m&&h&&g&&_&&v&&y;for(let e=0;e<f.length;++e)f[e].test=O(f[e].params);let S=m?D(f[0].params[0]):t,w=h?D(f[1].params[0]):t,k=g?D(f[2].params[0]):t,A=_?D(f[3].params[0]):t,j=v?D(f[4].params[0]):t,M=y?D(f[5].params[0]):t,N=m?D(f[0].params[1]):t,ee=h?D(f[1].params[1]):t,P=g?D(f[2].params[1]):t,te=_?D(f[3].params[1]):t,re=v?D(f[4].params[1]):t,ie=y?D(f[5].params[1]):t;for(let e=0;e<f.length;++e)f[e].implementation=F(f[e].params,f[e].fn);let oe=m?f[0].implementation:n,L=h?f[1].implementation:n,le=g?f[2].implementation:n,ue=_?f[3].implementation:n,R=v?f[4].implementation:n,de=y?f[5].implementation:n,fe=m?f[0].params.length:-1,pe=h?f[1].params.length:-1,me=g?f[2].params.length:-1,he=_?f[3].params.length:-1,ge=v?f[4].params.length:-1,_e=y?f[5].params.length:-1,ve=b?6:0,ye=f.length,be=f.map(e=>e.test),xe=f.map(e=>e.implementation),Se=function(){for(let e=ve;e<ye;e++)if(be[e](arguments))return xe[e].apply(this,arguments);return d.onMismatch(e,arguments,f)};function Ce(e,t){return arguments.length===fe&&S(e)&&N(t)?oe.apply(this,arguments):arguments.length===pe&&w(e)&&ee(t)?L.apply(this,arguments):arguments.length===me&&k(e)&&P(t)?le.apply(this,arguments):arguments.length===he&&A(e)&&te(t)?ue.apply(this,arguments):arguments.length===ge&&j(e)&&re(t)?R.apply(this,arguments):arguments.length===_e&&M(e)&&ie(t)?de.apply(this,arguments):Se.apply(this,arguments)}try{Object.defineProperty(Ce,`name`,{value:e})}catch{}return Ce.signatures=o,Ce._typedFunctionData={signatures:f,signatureMap:p},Ce}function ue(e,t,n){throw N(e,t,n)}function R(e){return fe(e,0,e.length-1)}function de(e){return e[e.length-1]}function fe(e,t,n){return Array.prototype.slice.call(e,t,n)}function pe(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return e[n]}function me(e,t){return Array.prototype.concat.apply([],e.map(t))}function he(){let e=R(arguments).map(e=>x(T(e))),t=de(arguments);if(typeof t!=`function`)throw TypeError(`Callback function expected as last argument`);return ge(e,t)}function ge(e,t){return{referTo:{references:e,callback:t}}}function _e(e){if(typeof e!=`function`)throw TypeError(`Callback function expected as first argument`);return{referToSelf:{callback:e}}}function ve(e){return e&&typeof e.referTo==`object`&&Array.isArray(e.referTo.references)&&typeof e.referTo.callback==`function`}function ye(e){return e&&typeof e.referToSelf==`object`&&typeof e.referToSelf.callback==`function`}function be(e,t){if(!e)return t;if(t&&t!==e){let n=Error(`Function names do not match (expected: `+e+`, actual: `+t+`)`);throw n.data={actual:t,expected:e},n}return e}function xe(e){let t;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(_(e[n])||typeof e[n].signature==`string`)&&(t=be(t,e[n].name));return t}function Se(e,t){let n;for(n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(n in e&&t[n]!==e[n]){let r=Error(`Signature "`+n+`" is defined twice`);throw r.data={signature:n,sourceFunction:t[n],destFunction:e[n]},r}e[n]=t[n]}}let Ce=d;d=function(e){let t=typeof e==`string`,n=t?1:0,r=t?e:``,i={};for(let e=n;e<arguments.length;++e){let n=arguments[e],o={},s;if(typeof n==`function`?(s=n.name,typeof n.signature==`string`?o[n.signature]=n:_(n)&&(o=n.signatures)):a(n)&&(o=n,t||(s=xe(n))),Object.keys(o).length===0){let t=TypeError(`Argument to 'typed' at index `+e+` is not a (typed) function, nor an object with signatures as keys and functions as values.`);throw t.data={index:e,argument:n},t}t||(r=be(r,s)),Se(i,o)}return le(r||``,i)},d.create=i,d.createCount=Ce.createCount,d.onMismatch=ue,d.throwMismatchError=ue,d.createError=N,d.clear=m,d.clearConversions=h,d.addTypes=p,d._findType=f,d.referTo=he,d.referToSelf=_e,d.convert=b,d.findSignature=v,d.find=y,d.isTypedFunction=_,d.warnAgainstDeprecatedThis=!0,d.addType=function(e,t){let n=`any`;t!==!1&&c.has(`Object`)&&(n=`Object`),d.addTypes([e],n)};function we(e){if(!e||typeof e.from!=`string`||typeof e.to!=`string`||typeof e.convert!=`function`)throw TypeError(`Object with properties {from: string, to: string, convert: function} expected`);if(e.to===e.from)throw SyntaxError(`Illegal to define conversion from "`+e.from+`" to itself.`)}return d.addConversion=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{override:!1};we(e);let n=f(e.to),r=n.conversionsTo.find(t=>t.from===e.from);if(r)if(t&&t.override)d.removeConversion({from:r.from,to:e.to,convert:r.convert});else throw Error(`There is already a conversion from "`+e.from+`" to "`+n.name+`"`);n.conversionsTo.push({from:e.from,to:n.name,convert:e.convert,index:u++})},d.addConversions=function(e,t){e.forEach(e=>d.addConversion(e,t))},d.removeConversion=function(e){we(e);let t=f(e.to),n=pe(t.conversionsTo,t=>t.from===e.from);if(!n)throw Error(`Attempt to remove nonexistent conversion from `+e.from+` to `+e.to);if(n.convert!==e.convert)throw Error(`Conversion to remove does not match existing conversion`);let r=t.conversionsTo.indexOf(n);t.conversionsTo.splice(r,1)},d.resolve=function(e,t){if(!_(e))throw TypeError(r);let n=e._typedFunctionData.signatures;for(let e=0;e<n.length;++e)if(n[e].test(t))return n[e];return null},d}return i()}))}));function K(e,t,n,r){function i(r){var i=OT(r,t.map(PT));return MT(e,t,r),n(i)}return i.isFactory=!0,i.fn=e,i.dependencies=t.slice().sort(),r&&(i.meta=r),i}function MT(e,t,n){if(!t.filter(e=>!NT(e)).every(e=>n[e]!==void 0)){var r=t.filter(e=>n[e]===void 0);throw Error(`Cannot create function "${e}", some dependencies are missing: ${r.map(e=>`"${e}"`).join(`, `)}.`)}}function NT(e){return e&&e[0]===`?`}function PT(e){return e&&e[0]===`?`?e.slice(1):e}function q(e){return typeof e==`boolean`?!0:Number.isFinite(e)?e===Math.round(e):!1}function FT(e,t){if(t.number===`bigint`)try{BigInt(e)}catch{return t.numberFallback}return t.number}var IT=Math.sign||function(e){return e>0?1:e<0?-1:0},LT=Math.log2||function(e){return Math.log(e)/Math.LN2},RT=Math.log10||function(e){return Math.log(e)/Math.LN10},zT=Math.log1p||function(e){return Math.log(e+1)},BT=Math.cbrt||function(e){if(e===0)return e;var t=e<0,n;return t&&(e=-e),Number.isFinite(e)?(n=Math.exp(Math.log(e)/3),n=(e/(n*n)+2*n)/3):n=e,t?-n:n},VT=Math.expm1||function(e){return e>=2e-4||e<=-2e-4?Math.exp(e)-1:e+e*e/2+e*e*e/6};function HT(e,t,n){var r={2:`0b`,8:`0o`,16:`0x`}[t],i=``;if(n){if(n<1)throw Error(`size must be in greater than 0`);if(!q(n))throw Error(`size must be an integer`);if(e>2**(n-1)-1||e<-(2**(n-1)))throw Error(`Value must be in range [-2^${n-1}, 2^${n-1}-1]`);if(!q(e))throw Error(`Value must be an integer`);e<0&&(e+=2**n),i=`i${n}`}var a=``;return e<0&&(e=-e,a=`-`),`${a}${r}${e.toString(t)}${i}`}function UT(e,t){if(typeof t==`function`)return t(e);if(e===1/0)return`Infinity`;if(e===-1/0)return`-Infinity`;if(isNaN(e))return`NaN`;var{notation:n,precision:r,wordSize:i}=WT(t);switch(n){case`fixed`:return qT(e,r);case`exponential`:return JT(e,r);case`engineering`:return KT(e,r);case`bin`:return HT(e,2,i);case`oct`:return HT(e,8,i);case`hex`:return HT(e,16,i);case`auto`:return YT(e,r,t).replace(/((\.\d*?)(0+))($|e)/,function(){var e=arguments[2],t=arguments[4];return e===`.`?t:e+t});default:throw Error(`Unknown notation "`+n+`". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.`)}}function WT(e){var t=`auto`,n,r;if(e!==void 0)if(Pw(e))n=e;else if(Fw(e))n=e.toNumber();else if(eT(e))e.precision!==void 0&&(n=sE(e.precision,()=>{throw Error(`Option "precision" must be a number or BigNumber`)})),e.wordSize!==void 0&&(r=sE(e.wordSize,()=>{throw Error(`Option "wordSize" must be a number or BigNumber`)})),e.notation&&(t=e.notation);else throw Error(`Unsupported type of options, number, BigNumber, or object expected`);return{notation:t,precision:n,wordSize:r}}function GT(e){var t=String(e).toLowerCase().match(/^(-?)(\d+\.?\d*)(e([+-]?\d+))?$/);if(!t)throw SyntaxError(`Invalid number `+e);var n=t[1],r=t[2],i=parseFloat(t[4]||`0`),a=r.indexOf(`.`);i+=a===-1?r.length-1:a-1;var o=r.replace(`.`,``).replace(/^0*/,function(e){return i-=e.length,``}).replace(/0*$/,``).split(``).map(function(e){return parseInt(e)});return o.length===0&&(o.push(0),i++),{sign:n,coefficients:o,exponent:i}}function KT(e,t){if(isNaN(e)||!Number.isFinite(e))return String(e);var n=XT(GT(e),t),r=n.exponent,i=n.coefficients,a=r%3==0?r:r<0?r-3-r%3:r-r%3;if(Pw(t))for(;t>i.length||r-a+1>i.length;)i.push(0);else for(var o=Math.abs(r-a)-(i.length-1),s=0;s<o;s++)i.push(0);for(var c=Math.abs(r-a),l=1;c>0;)l++,c--;var u=i.slice(l).join(``),d=Pw(t)&&u.length||u.match(/[1-9]/)?`.`+u:``,f=i.slice(0,l).join(``)+d+`e`+(r>=0?`+`:``)+a.toString();return n.sign+f}function qT(e,t){if(isNaN(e)||!Number.isFinite(e))return String(e);var n=GT(e),r=typeof t==`number`?XT(n,n.exponent+1+t):n,i=r.coefficients,a=r.exponent+1,o=a+(t||0);return i.length<o&&(i=i.concat(ZT(o-i.length))),a<0&&(i=ZT(-a+1).concat(i),a=1),a<i.length&&i.splice(a,0,a===0?`0.`:`.`),r.sign+i.join(``)}function JT(e,t){if(isNaN(e)||!Number.isFinite(Number(e)))return String(e);var n=GT(e),r=t?XT(n,t):n,i=r.coefficients,a=r.exponent;i.length<t&&(i=i.concat(ZT(t-i.length)));var o=i.shift();return r.sign+o+(i.length>0?`.`+i.join(``):``)+`e`+(a>=0?`+`:``)+a}function YT(e,t,n){if(isNaN(e)||!Number.isFinite(e))return String(e);var r=cE(n?.lowerExp,-3),i=cE(n?.upperExp,5),a=GT(e),o=t?XT(a,t):a;if(o.exponent<r||o.exponent>=i)return JT(e,t);var s=o.coefficients,c=o.exponent;s.length<t&&(s=s.concat(ZT(t-s.length))),s=s.concat(ZT(c-s.length+1+(s.length<t?t-s.length:0))),s=ZT(-c).concat(s);var l=c>0?c:0;return l<s.length-1&&s.splice(l+1,0,`.`),o.sign+s.join(``)}function XT(e,t){for(var n={sign:e.sign,coefficients:e.coefficients,exponent:e.exponent},r=n.coefficients;t<=0;)r.unshift(0),n.exponent++,t++;if(r.length>t&&r.splice(t,r.length-t)[0]>=5){var i=t-1;for(r[i]++;r[i]===10;)r.pop(),i===0&&(r.unshift(0),n.exponent++,i++),i--,r[i]++}return n}function ZT(e){for(var t=[],n=0;n<e;n++)t.push(0);return t}function QT(e){return e.toExponential().replace(/e.*$/,``).replace(/^0\.?0*|\./,``).length}function $T(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1e-8,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;if(n<=0)throw Error(`Relative tolerance must be greater than 0`);if(r<0)throw Error(`Absolute tolerance must be at least 0`);return isNaN(e)||isNaN(t)?!1:!Number.isFinite(e)||!Number.isFinite(t)?e===t:e===t?!0:Math.abs(e-t)<=Math.max(n*Math.max(Math.abs(e),Math.abs(t)),r)}var eE=Math.acosh||function(e){return Math.log(Math.sqrt(e*e-1)+e)},tE=Math.asinh||function(e){return Math.log(Math.sqrt(e*e+1)+e)},nE=Math.atanh||function(e){return Math.log((1+e)/(1-e))/2},rE=Math.cosh||function(e){return(Math.exp(e)+Math.exp(-e))/2},iE=Math.sinh||function(e){return(Math.exp(e)-Math.exp(-e))/2},aE=Math.tanh||function(e){var t=Math.exp(2*e);return(t-1)/(t+1)};function oE(e,t){return(e>0?!0:e<0?!1:1/e==1/0)^(t>0?!0:t<0?!1:1/t==1/0)?-e:e}function sE(e,t){if(Pw(e))return e;if(Fw(e))return e.toNumber();t()}function cE(e,t){return Pw(e)?e:Fw(e)?e.toNumber():t}var lE=e.r(jT(),1),uE=function(){return uE=lE.default.create,lE.default},dE=K(`typed`,[`?BigNumber`,`?Complex`,`?DenseMatrix`,`?Fraction`],function(e){var{BigNumber:t,Complex:n,DenseMatrix:r,Fraction:i}=e,a=uE();return a.clear(),a.addTypes([{name:`number`,test:Pw},{name:`Complex`,test:Lw},{name:`BigNumber`,test:Fw},{name:`bigint`,test:Iw},{name:`Fraction`,test:Rw},{name:`Unit`,test:zw},{name:`identifier`,test:e=>Bw&&/^(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDDC0-\uDDF3\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD40-\uDD59\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDD4A-\uDD65\uDD6F-\uDD85\uDE80-\uDEA9\uDEB0\uDEB1\uDEC2-\uDEC7\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61\uDF80-\uDF89\uDF8B\uDF8E\uDF90-\uDFB5\uDFB7\uDFD1\uDFD3]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8\uDFC0-\uDFE0]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDB0-\uDDDB\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD80E\uD80F\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46\uDC60-\uDFFF]|\uD810[\uDC00-\uDFFA]|\uD811[\uDC00-\uDE46]|\uD818[\uDD00-\uDD1D]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDD40-\uDD6C\uDE40-\uDE7F\uDEA0-\uDEB8\uDEBB-\uDED3\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3\uDFF2\uDFF3]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDDD0-\uDDED\uDDF0\uDEC0-\uDEDE\uDEE0-\uDEE2\uDEE4\uDEE5\uDEE7-\uDEED\uDEF0-\uDEF4\uDEFE\uDEFF\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79])(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDDC0-\uDDF3\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD40-\uDD59\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDD4A-\uDD65\uDD6F-\uDD85\uDE80-\uDEA9\uDEB0\uDEB1\uDEC2-\uDEC7\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61\uDF80-\uDF89\uDF8B\uDF8E\uDF90-\uDFB5\uDFB7\uDFD1\uDFD3]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8\uDFC0-\uDFE0]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDB0-\uDDDB\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD80E\uD80F\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46\uDC60-\uDFFF]|\uD810[\uDC00-\uDFFA]|\uD811[\uDC00-\uDE46]|\uD818[\uDD00-\uDD1D]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDD40-\uDD6C\uDE40-\uDE7F\uDEA0-\uDEB8\uDEBB-\uDED3\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3\uDFF2\uDFF3]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDDD0-\uDDED\uDDF0\uDEC0-\uDEDE\uDEE0-\uDEE2\uDEE4\uDEE5\uDEE7-\uDEED\uDEF0-\uDEF4\uDEFE\uDEFF\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79])*$/.test(e)},{name:`string`,test:Bw},{name:`Chain`,test:xT},{name:`Array`,test:Vw},{name:`Matrix`,test:Hw},{name:`DenseMatrix`,test:Ww},{name:`SparseMatrix`,test:Gw},{name:`Range`,test:Kw},{name:`Index`,test:qw},{name:`boolean`,test:Jw},{name:`ResultSet`,test:Yw},{name:`Help`,test:Xw},{name:`function`,test:Zw},{name:`Date`,test:Qw},{name:`RegExp`,test:$w},{name:`null`,test:nT},{name:`undefined`,test:rT},{name:`AccessorNode`,test:iT},{name:`ArrayNode`,test:aT},{name:`AssignmentNode`,test:oT},{name:`BlockNode`,test:sT},{name:`ConditionalNode`,test:cT},{name:`ConstantNode`,test:lT},{name:`FunctionNode`,test:fT},{name:`FunctionAssignmentNode`,test:dT},{name:`IndexNode`,test:pT},{name:`Node`,test:mT},{name:`ObjectNode`,test:hT},{name:`OperatorNode`,test:gT},{name:`ParenthesisNode`,test:_T},{name:`RangeNode`,test:vT},{name:`RelationalNode`,test:yT},{name:`SymbolNode`,test:bT},{name:`Map`,test:tT},{name:`Object`,test:eT}]),a.addConversions([{from:`number`,to:`BigNumber`,convert:function(e){if(t||fE(e),QT(e)>15)throw TypeError(`Cannot implicitly convert a number with >15 significant digits to BigNumber (value: `+e+`). Use function bignumber(x) to convert to BigNumber.`);return new t(e)}},{from:`number`,to:`Complex`,convert:function(e){return n||pE(e),new n(e,0)}},{from:`BigNumber`,to:`Complex`,convert:function(e){return n||pE(e),new n(e.toNumber(),0)}},{from:`bigint`,to:`number`,convert:function(e){if(e>2**53-1)throw TypeError(`Cannot implicitly convert bigint to number: value exceeds the max safe integer value (value: `+e+`)`);return Number(e)}},{from:`bigint`,to:`BigNumber`,convert:function(e){return t||fE(e),new t(e.toString())}},{from:`bigint`,to:`Fraction`,convert:function(e){return i||hE(e),new i(e)}},{from:`Fraction`,to:`BigNumber`,convert:function(e){throw TypeError(`Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.`)}},{from:`Fraction`,to:`Complex`,convert:function(e){return n||pE(e),new n(e.valueOf(),0)}},{from:`number`,to:`Fraction`,convert:function(e){i||hE(e);var t=new i(e);if(t.valueOf()!==e)throw TypeError(`Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: `+e+`). Use function fraction(x) to convert to Fraction.`);return t}},{from:`string`,to:`number`,convert:function(e){var t=Number(e);if(isNaN(t))throw Error(`Cannot convert "`+e+`" to a number`);return t}},{from:`string`,to:`BigNumber`,convert:function(e){t||fE(e);try{return new t(e)}catch{throw Error(`Cannot convert "`+e+`" to BigNumber`)}}},{from:`string`,to:`bigint`,convert:function(e){try{return BigInt(e)}catch{throw Error(`Cannot convert "`+e+`" to BigInt`)}}},{from:`string`,to:`Fraction`,convert:function(e){i||hE(e);try{return new i(e)}catch{throw Error(`Cannot convert "`+e+`" to Fraction`)}}},{from:`string`,to:`Complex`,convert:function(e){n||pE(e);try{return new n(e)}catch{throw Error(`Cannot convert "`+e+`" to Complex`)}}},{from:`boolean`,to:`number`,convert:function(e){return+e}},{from:`boolean`,to:`BigNumber`,convert:function(e){return t||fE(e),new t(+e)}},{from:`boolean`,to:`bigint`,convert:function(e){return BigInt(+e)}},{from:`boolean`,to:`Fraction`,convert:function(e){return i||hE(e),new i(+e)}},{from:`boolean`,to:`string`,convert:function(e){return String(e)}},{from:`Array`,to:`Matrix`,convert:function(e){return r||mE(),new r(e)}},{from:`Matrix`,to:`Array`,convert:function(e){return e.valueOf()}}]),a.onMismatch=(e,t,n)=>{var r=a.createError(e,t,n);if([`wrongType`,`mismatch`].includes(r.data.category)&&t.length===1&&Uw(t[0])&&n.some(e=>!e.params.includes(`,`))){var i=TypeError(`Function '${e}' doesn't apply to matrices. To call it elementwise on a matrix 'M', try 'map(M, ${e})'.`);throw i.data=r.data,i}throw r},a.onMismatch=(e,t,n)=>{var r=a.createError(e,t,n);if([`wrongType`,`mismatch`].includes(r.data.category)&&t.length===1&&Uw(t[0])&&n.some(e=>!e.params.includes(`,`))){var i=TypeError(`Function '${e}' doesn't apply to matrices. To call it elementwise on a matrix 'M', try 'map(M, ${e})'.`);throw i.data=r.data,i}throw r},a});function fE(e){throw Error(`Cannot convert value ${e} into a BigNumber: no class 'BigNumber' provided`)}function pE(e){throw Error(`Cannot convert value ${e} into a Complex number: no class 'Complex' provided`)}function mE(){throw Error(`Cannot convert array into a Matrix: no class 'DenseMatrix' provided`)}function hE(e){throw Error(`Cannot convert value ${e} into a Fraction, no class 'Fraction' provided.`)}var gE=K(`ResultSet`,[],()=>{function e(t){if(!(this instanceof e))throw SyntaxError(`Constructor must be called with the new operator`);this.entries=t||[]}return e.prototype.type=`ResultSet`,e.prototype.isResultSet=!0,e.prototype.valueOf=function(){return this.entries},e.prototype.toString=function(){return`[`+this.entries.map(String).join(`, `)+`]`},e.prototype.toJSON=function(){return{mathjs:`ResultSet`,entries:this.entries}},e.fromJSON=function(t){return new e(t.entries)},e},{isClass:!0}),_E=9e15,vE=1e9,yE=`0123456789abcdef`,bE=`2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058`,xE=`3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789`,SE={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-_E,maxE:_E,crypto:!1},CE,wE,TE=!0,EE=`[DecimalError] `,DE=EE+`Invalid argument: `,OE=EE+`Precision limit exceeded`,kE=EE+`crypto unavailable`,AE=`[object Decimal]`,jE=Math.floor,ME=Math.pow,NE=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,PE=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,FE=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,IE=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,LE=1e7,RE=7,zE=9007199254740991,BE=bE.length-1,VE=xE.length-1,J={toStringTag:AE};J.absoluteValue=J.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),JE(e)},J.ceil=function(){return JE(new this.constructor(this),this.e+1,2)},J.clampedTo=J.clamp=function(e,t){var n,r=this,i=r.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(DE+t);return n=r.cmp(e),n<0?e:r.cmp(t)>0?t:new i(r)},J.comparedTo=J.cmp=function(e){var t,n,r,i,a=this,o=a.d,s=(e=new a.constructor(e)).d,c=a.s,l=e.s;if(!o||!s)return!c||!l?NaN:c===l?o===s?0:!o^c<0?1:-1:c;if(!o[0]||!s[0])return o[0]?c:s[0]?-l:0;if(c!==l)return c;if(a.e!==e.e)return a.e>e.e^c<0?1:-1;for(r=o.length,i=s.length,t=0,n=r<i?r:i;t<n;++t)if(o[t]!==s[t])return o[t]>s[t]^c<0?1:-1;return r===i?0:r>i^c<0?1:-1},J.cosine=J.cos=function(){var e,t,n=this,r=n.constructor;return n.d?n.d[0]?(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+RE,r.rounding=1,n=KE(r,fD(r,n)),r.precision=e,r.rounding=t,JE(wE==2||wE==3?n.neg():n,e,t,!0)):new r(1):new r(NaN)},J.cubeRoot=J.cbrt=function(){var e,t,n,r,i,a,o,s,c,l,u=this,d=u.constructor;if(!u.isFinite()||u.isZero())return new d(u);for(TE=!1,a=u.s*ME(u.s*u,1/3),!a||Math.abs(a)==1/0?(n=HE(u.d),e=u.e,(a=(e-n.length+1)%3)&&(n+=a==1||a==-2?`0`:`00`),a=ME(n,1/3),e=jE((e+1)/3)-(e%3==(e<0?-1:2)),a==1/0?n=`5e`+e:(n=a.toExponential(),n=n.slice(0,n.indexOf(`e`)+1)+e),r=new d(n),r.s=u.s):r=new d(a.toString()),o=(e=d.precision)+3;;)if(s=r,c=s.times(s).times(s),l=c.plus(u),r=qE(l.plus(u).times(s),l.plus(c),o+2,1),HE(s.d).slice(0,o)===(n=HE(r.d)).slice(0,o))if(n=n.slice(o-3,o+1),n==`9999`||!i&&n==`4999`){if(!i&&(JE(s,e+1,0),s.times(s).times(s).eq(u))){r=s;break}o+=4,i=1}else{(!+n||!+n.slice(1)&&n.charAt(0)==`5`)&&(JE(r,e+1,1),t=!r.times(r).times(r).eq(u));break}return TE=!0,JE(r,e,d.rounding,t)},J.decimalPlaces=J.dp=function(){var e,t=this.d,n=NaN;if(t){if(e=t.length-1,n=(e-jE(this.e/RE))*RE,e=t[e],e)for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},J.dividedBy=J.div=function(e){return qE(this,new this.constructor(e))},J.dividedToIntegerBy=J.divToInt=function(e){var t=this,n=t.constructor;return JE(qE(t,new n(e),0,1,1),n.precision,n.rounding)},J.equals=J.eq=function(e){return this.cmp(e)===0},J.floor=function(){return JE(new this.constructor(this),this.e+1,3)},J.greaterThan=J.gt=function(e){return this.cmp(e)>0},J.greaterThanOrEqualTo=J.gte=function(e){var t=this.cmp(e);return t==1||t===0},J.hyperbolicCosine=J.cosh=function(){var e,t,n,r,i,a=this,o=a.constructor,s=new o(1);if(!a.isFinite())return new o(a.s?1/0:NaN);if(a.isZero())return s;n=o.precision,r=o.rounding,o.precision=n+Math.max(a.e,a.sd())+4,o.rounding=1,i=a.d.length,i<32?(e=Math.ceil(i/3),t=(1/dD(4,e)).toString()):(e=16,t=`2.3283064365386962890625e-10`),a=uD(o,1,a.times(t),new o(1),!0);for(var c,l=e,u=new o(8);l--;)c=a.times(a),a=s.minus(c.times(u.minus(c.times(u))));return JE(a,o.precision=n,o.rounding=r,!0)},J.hyperbolicSine=J.sinh=function(){var e,t,n,r,i=this,a=i.constructor;if(!i.isFinite()||i.isZero())return new a(i);if(t=a.precision,n=a.rounding,a.precision=t+Math.max(i.e,i.sd())+4,a.rounding=1,r=i.d.length,r<3)i=uD(a,2,i,i,!0);else{e=1.4*Math.sqrt(r),e=e>16?16:e|0,i=i.times(1/dD(5,e)),i=uD(a,2,i,i,!0);for(var o,s=new a(5),c=new a(16),l=new a(20);e--;)o=i.times(i),i=i.times(s.plus(o.times(c.times(o).plus(l))))}return a.precision=t,a.rounding=n,JE(i,t,n,!0)},J.hyperbolicTangent=J.tanh=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+7,r.rounding=1,qE(n.sinh(),n.cosh(),r.precision=e,r.rounding=t)):new r(n.s)},J.inverseCosine=J.acos=function(){var e=this,t=e.constructor,n=e.abs().cmp(1),r=t.precision,i=t.rounding;return n===-1?e.isZero()?QE(t,r+4,i).times(.5):(t.precision=r+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=r,t.rounding=i,e.times(2)):n===0?e.isNeg()?QE(t,r,i):new t(0):new t(NaN)},J.inverseHyperbolicCosine=J.acosh=function(){var e,t,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(e=r.precision,t=r.rounding,r.precision=e+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,TE=!1,n=n.times(n).minus(1).sqrt().plus(n),TE=!0,r.precision=e,r.rounding=t,n.ln()):new r(n)},J.inverseHyperbolicSine=J.asinh=function(){var e,t,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,TE=!1,n=n.times(n).plus(1).sqrt().plus(n),TE=!0,r.precision=e,r.rounding=t,n.ln())},J.inverseHyperbolicTangent=J.atanh=function(){var e,t,n,r,i=this,a=i.constructor;return i.isFinite()?i.e>=0?new a(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=a.precision,t=a.rounding,r=i.sd(),Math.max(r,e)<2*-i.e-1?JE(new a(i),e,t,!0):(a.precision=n=r-i.e,i=qE(i.plus(1),new a(1).minus(i),n+e,1),a.precision=e+4,a.rounding=1,i=i.ln(),a.precision=e,a.rounding=t,i.times(.5))):new a(NaN)},J.inverseSine=J.asin=function(){var e,t,n,r,i=this,a=i.constructor;return i.isZero()?new a(i):(t=i.abs().cmp(1),n=a.precision,r=a.rounding,t===-1?(a.precision=n+6,a.rounding=1,i=i.div(new a(1).minus(i.times(i)).sqrt().plus(1)).atan(),a.precision=n,a.rounding=r,i.times(2)):t===0?(e=QE(a,n+4,r).times(.5),e.s=i.s,e):new a(NaN))},J.inverseTangent=J.atan=function(){var e,t,n,r,i,a,o,s,c,l=this,u=l.constructor,d=u.precision,f=u.rounding;if(!l.isFinite()){if(!l.s)return new u(NaN);if(d+4<=VE)return o=QE(u,d+4,f).times(.5),o.s=l.s,o}else if(l.isZero())return new u(l);else if(l.abs().eq(1)&&d+4<=VE)return o=QE(u,d+4,f).times(.25),o.s=l.s,o;for(u.precision=s=d+10,u.rounding=1,n=Math.min(28,s/RE+2|0),e=n;e;--e)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(TE=!1,t=Math.ceil(s/RE),r=1,c=l.times(l),o=new u(l),i=l;e!==-1;)if(i=i.times(c),a=o.minus(i.div(r+=2)),i=i.times(c),o=a.plus(i.div(r+=2)),o.d[t]!==void 0)for(e=t;o.d[e]===a.d[e]&&e--;);return n&&(o=o.times(2<<n-1)),TE=!0,JE(o,u.precision=d,u.rounding=f,!0)},J.isFinite=function(){return!!this.d},J.isInteger=J.isInt=function(){return!!this.d&&jE(this.e/RE)>this.d.length-2},J.isNaN=function(){return!this.s},J.isNegative=J.isNeg=function(){return this.s<0},J.isPositive=J.isPos=function(){return this.s>0},J.isZero=function(){return!!this.d&&this.d[0]===0},J.lessThan=J.lt=function(e){return this.cmp(e)<0},J.lessThanOrEqualTo=J.lte=function(e){return this.cmp(e)<1},J.logarithm=J.log=function(e){var t,n,r,i,a,o,s,c,l=this,u=l.constructor,d=u.precision,f=u.rounding,p=5;if(e==null)e=new u(10),t=!0;else{if(e=new u(e),n=e.d,e.s<0||!n||!n[0]||e.eq(1))return new u(NaN);t=e.eq(10)}if(n=l.d,l.s<0||!n||!n[0]||l.eq(1))return new u(n&&!n[0]?-1/0:l.s==1?n?0:1/0:NaN);if(t)if(n.length>1)a=!0;else{for(i=n[0];i%10==0;)i/=10;a=i!==1}if(TE=!1,s=d+p,o=aD(l,s),r=t?ZE(u,s+10):aD(e,s),c=qE(o,r,s,1),WE(c.d,i=d,f))do if(s+=10,o=aD(l,s),r=t?ZE(u,s+10):aD(e,s),c=qE(o,r,s,1),!a){+HE(c.d).slice(i+1,i+15)+1==0x5af3107a4000&&(c=JE(c,d+1,0));break}while(WE(c.d,i+=10,f));return TE=!0,JE(c,d,f)},J.minus=J.sub=function(e){var t,n,r,i,a,o,s,c,l,u,d,f,p=this,m=p.constructor;if(e=new m(e),!p.d||!e.d)return!p.s||!e.s?e=new m(NaN):p.d?e.s=-e.s:e=new m(e.d||p.s!==e.s?p:NaN),e;if(p.s!=e.s)return e.s=-e.s,p.plus(e);if(l=p.d,f=e.d,s=m.precision,c=m.rounding,!l[0]||!f[0]){if(f[0])e.s=-e.s;else if(l[0])e=new m(p);else return new m(c===3?-0:0);return TE?JE(e,s,c):e}if(n=jE(e.e/RE),u=jE(p.e/RE),l=l.slice(),a=u-n,a){for(d=a<0,d?(t=l,a=-a,o=f.length):(t=f,n=u,o=l.length),r=Math.max(Math.ceil(s/RE),o)+2,a>r&&(a=r,t.length=1),t.reverse(),r=a;r--;)t.push(0);t.reverse()}else{for(r=l.length,o=f.length,d=r<o,d&&(o=r),r=0;r<o;r++)if(l[r]!=f[r]){d=l[r]<f[r];break}a=0}for(d&&(t=l,l=f,f=t,e.s=-e.s),o=l.length,r=f.length-o;r>0;--r)l[o++]=0;for(r=f.length;r>a;){if(l[--r]<f[r]){for(i=r;i&&l[--i]===0;)l[i]=LE-1;--l[i],l[r]+=LE}l[r]-=f[r]}for(;l[--o]===0;)l.pop();for(;l[0]===0;l.shift())--n;return l[0]?(e.d=l,e.e=XE(l,n),TE?JE(e,s,c):e):new m(c===3?-0:0)},J.modulo=J.mod=function(e){var t,n=this,r=n.constructor;return e=new r(e),!n.d||!e.s||e.d&&!e.d[0]?new r(NaN):!e.d||n.d&&!n.d[0]?JE(new r(n),r.precision,r.rounding):(TE=!1,r.modulo==9?(t=qE(n,e.abs(),0,3,1),t.s*=e.s):t=qE(n,e,0,r.modulo,1),t=t.times(e),TE=!0,n.minus(t))},J.naturalExponential=J.exp=function(){return iD(this)},J.naturalLogarithm=J.ln=function(){return aD(this)},J.negated=J.neg=function(){var e=new this.constructor(this);return e.s=-e.s,JE(e)},J.plus=J.add=function(e){var t,n,r,i,a,o,s,c,l,u,d=this,f=d.constructor;if(e=new f(e),!d.d||!e.d)return!d.s||!e.s?e=new f(NaN):d.d||(e=new f(e.d||d.s===e.s?d:NaN)),e;if(d.s!=e.s)return e.s=-e.s,d.minus(e);if(l=d.d,u=e.d,s=f.precision,c=f.rounding,!l[0]||!u[0])return u[0]||(e=new f(d)),TE?JE(e,s,c):e;if(a=jE(d.e/RE),r=jE(e.e/RE),l=l.slice(),i=a-r,i){for(i<0?(n=l,i=-i,o=u.length):(n=u,r=a,o=l.length),a=Math.ceil(s/RE),o=a>o?a+1:o+1,i>o&&(i=o,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for(o=l.length,i=u.length,o-i<0&&(i=o,n=u,u=l,l=n),t=0;i;)t=(l[--i]=l[i]+u[i]+t)/LE|0,l[i]%=LE;for(t&&(l.unshift(t),++r),o=l.length;l[--o]==0;)l.pop();return e.d=l,e.e=XE(l,r),TE?JE(e,s,c):e},J.precision=J.sd=function(e){var t,n=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(DE+e);return n.d?(t=$E(n.d),e&&n.e+1>t&&(t=n.e+1)):t=NaN,t},J.round=function(){var e=this,t=e.constructor;return JE(new t(e),e.e+1,t.rounding)},J.sine=J.sin=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+RE,r.rounding=1,n=lD(r,fD(r,n)),r.precision=e,r.rounding=t,JE(wE>2?n.neg():n,e,t,!0)):new r(NaN)},J.squareRoot=J.sqrt=function(){var e,t,n,r,i,a,o=this,s=o.d,c=o.e,l=o.s,u=o.constructor;if(l!==1||!s||!s[0])return new u(!l||l<0&&(!s||s[0])?NaN:s?o:1/0);for(TE=!1,l=Math.sqrt(+o),l==0||l==1/0?(t=HE(s),(t.length+c)%2==0&&(t+=`0`),l=Math.sqrt(t),c=jE((c+1)/2)-(c<0||c%2),l==1/0?t=`5e`+c:(t=l.toExponential(),t=t.slice(0,t.indexOf(`e`)+1)+c),r=new u(t)):r=new u(l.toString()),n=(c=u.precision)+3;;)if(a=r,r=a.plus(qE(o,a,n+2,1)).times(.5),HE(a.d).slice(0,n)===(t=HE(r.d)).slice(0,n))if(t=t.slice(n-3,n+1),t==`9999`||!i&&t==`4999`){if(!i&&(JE(a,c+1,0),a.times(a).eq(o))){r=a;break}n+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)==`5`)&&(JE(r,c+1,1),e=!r.times(r).eq(o));break}return TE=!0,JE(r,c,u.rounding,e)},J.tangent=J.tan=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+10,r.rounding=1,n=n.sin(),n.s=1,n=qE(n,new r(1).minus(n.times(n)).sqrt(),e+10,0),r.precision=e,r.rounding=t,JE(wE==2||wE==4?n.neg():n,e,t,!0)):new r(NaN)},J.times=J.mul=function(e){var t,n,r,i,a,o,s,c,l,u=this,d=u.constructor,f=u.d,p=(e=new d(e)).d;if(e.s*=u.s,!f||!f[0]||!p||!p[0])return new d(!e.s||f&&!f[0]&&!p||p&&!p[0]&&!f?NaN:!f||!p?e.s/0:e.s*0);for(n=jE(u.e/RE)+jE(e.e/RE),c=f.length,l=p.length,c<l&&(a=f,f=p,p=a,o=c,c=l,l=o),a=[],o=c+l,r=o;r--;)a.push(0);for(r=l;--r>=0;){for(t=0,i=c+r;i>r;)s=a[i]+p[r]*f[i-r-1]+t,a[i--]=s%LE|0,t=s/LE|0;a[i]=(a[i]+t)%LE|0}for(;!a[--o];)a.pop();return t?++n:a.shift(),e.d=a,e.e=XE(a,n),TE?JE(e,d.precision,d.rounding):e},J.toBinary=function(e,t){return pD(this,2,e,t)},J.toDecimalPlaces=J.toDP=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(UE(e,0,vE),t===void 0?t=r.rounding:UE(t,0,8),JE(n,e+n.e+1,t))},J.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=YE(r,!0):(UE(e,0,vE),t===void 0?t=i.rounding:UE(t,0,8),r=JE(new i(r),e+1,t),n=YE(r,!0,e+1)),r.isNeg()&&!r.isZero()?`-`+n:n},J.toFixed=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?n=YE(i):(UE(e,0,vE),t===void 0?t=a.rounding:UE(t,0,8),r=JE(new a(i),e+i.e+1,t),n=YE(r,!1,e+r.e+1)),i.isNeg()&&!i.isZero()?`-`+n:n},J.toFraction=function(e){var t,n,r,i,a,o,s,c,l,u,d,f,p=this,m=p.d,h=p.constructor;if(!m)return new h(p);if(l=n=new h(1),r=c=new h(0),t=new h(r),a=t.e=$E(m)-p.e-1,o=a%RE,t.d[0]=ME(10,o<0?RE+o:o),e==null)e=a>0?t:l;else{if(s=new h(e),!s.isInt()||s.lt(l))throw Error(DE+s);e=s.gt(t)?a>0?t:l:s}for(TE=!1,s=new h(HE(m)),u=h.precision,h.precision=a=m.length*RE*2;d=qE(s,t,0,1,1),i=n.plus(d.times(r)),i.cmp(e)!=1;)n=r,r=i,i=l,l=c.plus(d.times(i)),c=i,i=t,t=s.minus(d.times(i)),s=i;return i=qE(e.minus(n),r,0,1,1),c=c.plus(i.times(l)),n=n.plus(i.times(r)),c.s=l.s=p.s,f=qE(l,r,a,1).minus(p).abs().cmp(qE(c,n,a,1).minus(p).abs())<1?[l,r]:[c,n],h.precision=u,TE=!0,f},J.toHexadecimal=J.toHex=function(e,t){return pD(this,16,e,t)},J.toNearest=function(e,t){var n=this,r=n.constructor;if(n=new r(n),e==null){if(!n.d)return n;e=new r(1),t=r.rounding}else{if(e=new r(e),t===void 0?t=r.rounding:UE(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&=n.s,e}return e.d[0]?(TE=!1,n=qE(n,e,0,t,1).times(e),TE=!0,JE(n)):(e.s=n.s,n=e),n},J.toNumber=function(){return+this},J.toOctal=function(e,t){return pD(this,8,e,t)},J.toPower=J.pow=function(e){var t,n,r,i,a,o,s=this,c=s.constructor,l=+(e=new c(e));if(!s.d||!e.d||!s.d[0]||!e.d[0])return new c(ME(+s,l));if(s=new c(s),s.eq(1))return s;if(r=c.precision,a=c.rounding,e.eq(1))return JE(s,r,a);if(t=jE(e.e/RE),t>=e.d.length-1&&(n=l<0?-l:l)<=zE)return i=tD(c,s,n,r),e.s<0?new c(1).div(i):JE(i,r,a);if(o=s.s,o<0){if(t<e.d.length-1)return new c(NaN);if(e.d[t]&1||(o=1),s.e==0&&s.d[0]==1&&s.d.length==1)return s.s=o,s}return n=ME(+s,l),t=n==0||!isFinite(n)?jE(l*(Math.log(`0.`+HE(s.d))/Math.LN10+s.e+1)):new c(n+``).e,t>c.maxE+1||t<c.minE-1?new c(t>0?o/0:0):(TE=!1,c.rounding=s.s=1,n=Math.min(12,(t+``).length),i=iD(e.times(aD(s,r+n)),r),i.d&&(i=JE(i,r+5,1),WE(i.d,r,a)&&(t=r+10,i=JE(iD(e.times(aD(s,t+n)),t),t+5,1),+HE(i.d).slice(r+1,r+15)+1==0x5af3107a4000&&(i=JE(i,r+1,0)))),i.s=o,TE=!0,c.rounding=a,JE(i,r,a))},J.toPrecision=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=YE(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(UE(e,1,vE),t===void 0?t=i.rounding:UE(t,0,8),r=JE(new i(r),e,t),n=YE(r,e<=r.e||r.e<=i.toExpNeg,e)),r.isNeg()&&!r.isZero()?`-`+n:n},J.toSignificantDigits=J.toSD=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(UE(e,1,vE),t===void 0?t=r.rounding:UE(t,0,8)),JE(new r(n),e,t)},J.toString=function(){var e=this,t=e.constructor,n=YE(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?`-`+n:n},J.truncated=J.trunc=function(){return JE(new this.constructor(this),this.e+1,1)},J.valueOf=J.toJSON=function(){var e=this,t=e.constructor,n=YE(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?`-`+n:n};function HE(e){var t,n,r,i=e.length-1,a=``,o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)r=e[t]+``,n=RE-r.length,n&&(a+=eD(n)),a+=r;o=e[t],r=o+``,n=RE-r.length,n&&(a+=eD(n))}else if(o===0)return`0`;for(;o%10==0;)o/=10;return a+o}function UE(e,t,n){if(e!==~~e||e<t||e>n)throw Error(DE+e)}function WE(e,t,n,r){var i,a,o,s;for(a=e[0];a>=10;a/=10)--t;return--t<0?(t+=RE,i=0):(i=Math.ceil((t+1)/RE),t%=RE),a=ME(10,RE-t),s=e[i]%a|0,r==null?t<3?(t==0?s=s/100|0:t==1&&(s=s/10|0),o=n<4&&s==99999||n>3&&s==49999||s==5e4||s==0):o=(n<4&&s+1==a||n>3&&s+1==a/2)&&(e[i+1]/a/100|0)==ME(10,t-2)-1||(s==a/2||s==0)&&(e[i+1]/a/100|0)==0:t<4?(t==0?s=s/1e3|0:t==1?s=s/100|0:t==2&&(s=s/10|0),o=(r||n<4)&&s==9999||!r&&n>3&&s==4999):o=((r||n<4)&&s+1==a||!r&&n>3&&s+1==a/2)&&(e[i+1]/a/1e3|0)==ME(10,t-3)-1,o}function GE(e,t,n){for(var r,i=[0],a,o=0,s=e.length;o<s;){for(a=i.length;a--;)i[a]*=t;for(i[0]+=yE.indexOf(e.charAt(o++)),r=0;r<i.length;r++)i[r]>n-1&&(i[r+1]===void 0&&(i[r+1]=0),i[r+1]+=i[r]/n|0,i[r]%=n)}return i.reverse()}function KE(e,t){var n,r,i;if(t.isZero())return t;r=t.d.length,r<32?(n=Math.ceil(r/3),i=(1/dD(4,n)).toString()):(n=16,i=`2.3283064365386962890625e-10`),e.precision+=n,t=uD(e,1,t.times(i),new e(1));for(var a=n;a--;){var o=t.times(t);t=o.times(o).minus(o).times(8).plus(1)}return e.precision-=n,t}var qE=(function(){function e(e,t,n){var r,i=0,a=e.length;for(e=e.slice();a--;)r=e[a]*t+i,e[a]=r%n|0,i=r/n|0;return i&&e.unshift(i),e}function t(e,t,n,r){var i,a;if(n!=r)a=n>r?1:-1;else for(i=a=0;i<n;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,i,a,o,s,c){var l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k=r.constructor,A=r.s==i.s?1:-1,j=r.d,M=i.d;if(!j||!j[0]||!M||!M[0])return new k(!r.s||!i.s||(j?M&&j[0]==M[0]:!M)?NaN:j&&j[0]==0||!M?A*0:A/0);for(c?(p=1,u=r.e-i.e):(c=LE,p=RE,u=jE(r.e/p)-jE(i.e/p)),D=M.length,T=j.length,_=new k(A),v=_.d=[],d=0;M[d]==(j[d]||0);d++);if(M[d]>(j[d]||0)&&u--,a==null?(S=a=k.precision,o=k.rounding):S=s?a+(r.e-i.e)+1:a,S<0)v.push(1),m=!0;else{if(S=S/p+2|0,d=0,D==1){for(f=0,M=M[0],S++;(d<T||f)&&S--;d++)C=f*c+(j[d]||0),v[d]=C/M|0,f=C%M|0;m=f||d<T}else{for(f=c/(M[0]+1)|0,f>1&&(M=e(M,f,c),j=e(j,f,c),D=M.length,T=j.length),w=D,y=j.slice(0,D),b=y.length;b<D;)y[b++]=0;O=M.slice(),O.unshift(0),E=M[0],M[1]>=c/2&&++E;do f=0,l=t(M,y,D,b),l<0?(x=y[0],D!=b&&(x=x*c+(y[1]||0)),f=x/E|0,f>1?(f>=c&&(f=c-1),h=e(M,f,c),g=h.length,b=y.length,l=t(h,y,g,b),l==1&&(f--,n(h,D<g?O:M,g,c))):(f==0&&(l=f=1),h=M.slice()),g=h.length,g<b&&h.unshift(0),n(y,h,b,c),l==-1&&(b=y.length,l=t(M,y,D,b),l<1&&(f++,n(y,D<b?O:M,b,c))),b=y.length):l===0&&(f++,y=[0]),v[d++]=f,l&&y[0]?y[b++]=j[w]||0:(y=[j[w]],b=1);while((w++<T||y[0]!==void 0)&&S--);m=y[0]!==void 0}v[0]||v.shift()}if(p==1)_.e=u,CE=m;else{for(d=1,f=v[0];f>=10;f/=10)d++;_.e=d+u*p-1,JE(_,s?a+_.e+1:a,o,m)}return _}})();function JE(e,t,n,r){var i,a,o,s,c,l,u,d,f,p=e.constructor;out:if(t!=null){if(d=e.d,!d)return e;for(i=1,s=d[0];s>=10;s/=10)i++;if(a=t-i,a<0)a+=RE,o=t,u=d[f=0],c=u/ME(10,i-o-1)%10|0;else if(f=Math.ceil((a+1)/RE),s=d.length,f>=s)if(r){for(;s++<=f;)d.push(0);u=c=0,i=1,a%=RE,o=a-RE+1}else break out;else{for(u=s=d[f],i=1;s>=10;s/=10)i++;a%=RE,o=a-RE+i,c=o<0?0:u/ME(10,i-o-1)%10|0}if(r=r||t<0||d[f+1]!==void 0||(o<0?u:u%ME(10,i-o-1)),l=n<4?(c||r)&&(n==0||n==(e.s<0?3:2)):c>5||c==5&&(n==4||r||n==6&&(a>0?o>0?u/ME(10,i-o):0:d[f-1])%10&1||n==(e.s<0?8:7)),t<1||!d[0])return d.length=0,l?(t-=e.e+1,d[0]=ME(10,(RE-t%RE)%RE),e.e=-t||0):d[0]=e.e=0,e;if(a==0?(d.length=f,s=1,f--):(d.length=f+1,s=ME(10,RE-a),d[f]=o>0?(u/ME(10,i-o)%ME(10,o)|0)*s:0),l)for(;;)if(f==0){for(a=1,o=d[0];o>=10;o/=10)a++;for(o=d[0]+=s,s=1;o>=10;o/=10)s++;a!=s&&(e.e++,d[0]==LE&&(d[0]=1));break}else{if(d[f]+=s,d[f]!=LE)break;d[f--]=0,s=1}for(a=d.length;d[--a]===0;)d.pop()}return TE&&(e.e>p.maxE?(e.d=null,e.e=NaN):e.e<p.minE&&(e.e=0,e.d=[0])),e}function YE(e,t,n){if(!e.isFinite())return oD(e);var r,i=e.e,a=HE(e.d),o=a.length;return t?(n&&(r=n-o)>0?a=a.charAt(0)+`.`+a.slice(1)+eD(r):o>1&&(a=a.charAt(0)+`.`+a.slice(1)),a=a+(e.e<0?`e`:`e+`)+e.e):i<0?(a=`0.`+eD(-i-1)+a,n&&(r=n-o)>0&&(a+=eD(r))):i>=o?(a+=eD(i+1-o),n&&(r=n-i-1)>0&&(a=a+`.`+eD(r))):((r=i+1)<o&&(a=a.slice(0,r)+`.`+a.slice(r)),n&&(r=n-o)>0&&(i+1===o&&(a+=`.`),a+=eD(r))),a}function XE(e,t){var n=e[0];for(t*=RE;n>=10;n/=10)t++;return t}function ZE(e,t,n){if(t>BE)throw TE=!0,n&&(e.precision=n),Error(OE);return JE(new e(bE),t,1,!0)}function QE(e,t,n){if(t>VE)throw Error(OE);return JE(new e(xE),t,n,!0)}function $E(e){var t=e.length-1,n=t*RE+1;if(t=e[t],t){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function eD(e){for(var t=``;e--;)t+=`0`;return t}function tD(e,t,n,r){var i,a=new e(1),o=Math.ceil(r/RE+4);for(TE=!1;;){if(n%2&&(a=a.times(t),mD(a.d,o)&&(i=!0)),n=jE(n/2),n===0){n=a.d.length-1,i&&a.d[n]===0&&++a.d[n];break}t=t.times(t),mD(t.d,o)}return TE=!0,a}function nD(e){return e.d[e.d.length-1]&1}function rD(e,t,n){for(var r,i,a=new e(t[0]),o=0;++o<t.length;){if(i=new e(t[o]),!i.s){a=i;break}r=a.cmp(i),(r===n||r===0&&a.s===n)&&(a=i)}return a}function iD(e,t){var n,r,i,a,o,s,c,l=0,u=0,d=0,f=e.constructor,p=f.rounding,m=f.precision;if(!e.d||!e.d[0]||e.e>17)return new f(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(TE=!1,c=m):c=t,s=new f(.03125);e.e>-2;)e=e.times(s),d+=5;for(r=Math.log(ME(2,d))/Math.LN10*2+5|0,c+=r,n=a=o=new f(1),f.precision=c;;){if(a=JE(a.times(e),c,1),n=n.times(++u),s=o.plus(qE(a,n,c,1)),HE(s.d).slice(0,c)===HE(o.d).slice(0,c)){for(i=d;i--;)o=JE(o.times(o),c,1);if(t==null)if(l<3&&WE(o.d,c-r,p,l))f.precision=c+=10,n=a=s=new f(1),u=0,l++;else return JE(o,f.precision=m,p,TE=!0);else return f.precision=m,o}o=s}}function aD(e,t){var n,r,i,a,o,s,c,l,u,d,f,p=1,m=10,h=e,g=h.d,_=h.constructor,v=_.rounding,y=_.precision;if(h.s<0||!g||!g[0]||!h.e&&g[0]==1&&g.length==1)return new _(g&&!g[0]?-1/0:h.s==1?g?0:h:NaN);if(t==null?(TE=!1,u=y):u=t,_.precision=u+=m,n=HE(g),r=n.charAt(0),Math.abs(a=h.e)<0x5543df729c000){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)h=h.times(e),n=HE(h.d),r=n.charAt(0),p++;a=h.e,r>1?(h=new _(`0.`+n),a++):h=new _(r+`.`+n.slice(1))}else return l=ZE(_,u+2,y).times(a+``),h=aD(new _(r+`.`+n.slice(1)),u-m).plus(l),_.precision=y,t==null?JE(h,y,v,TE=!0):h;for(d=h,c=o=h=qE(h.minus(1),h.plus(1),u,1),f=JE(h.times(h),u,1),i=3;;){if(o=JE(o.times(f),u,1),l=c.plus(qE(o,new _(i),u,1)),HE(l.d).slice(0,u)===HE(c.d).slice(0,u))if(c=c.times(2),a!==0&&(c=c.plus(ZE(_,u+2,y).times(a+``))),c=qE(c,new _(p),u,1),t==null)if(WE(c.d,u-m,v,s))_.precision=u+=m,l=o=h=qE(d.minus(1),d.plus(1),u,1),f=JE(h.times(h),u,1),i=s=1;else return JE(c,_.precision=y,v,TE=!0);else return _.precision=y,c;c=l,i+=2}}function oD(e){return String(e.s*e.s/0)}function sD(e,t){var n,r,i;for((n=t.indexOf(`.`))>-1&&(t=t.replace(`.`,``)),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;r++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(r,i),t){if(i-=r,e.e=n=n-r-1,e.d=[],r=(n+1)%RE,n<0&&(r+=RE),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=RE;r<i;)e.d.push(+t.slice(r,r+=RE));t=t.slice(r),r=RE-t.length}else r-=i;for(;r--;)t+=`0`;e.d.push(+t),TE&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function cD(e,t){var n,r,i,a,o,s,c,l,u;if(t.indexOf(`_`)>-1){if(t=t.replace(/(\d)_(?=\d)/g,`$1`),IE.test(t))return sD(e,t)}else if(t===`Infinity`||t===`NaN`)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(PE.test(t))n=16,t=t.toLowerCase();else if(NE.test(t))n=2;else if(FE.test(t))n=8;else throw Error(DE+t);for(a=t.search(/p/i),a>0?(c=+t.slice(a+1),t=t.substring(2,a)):t=t.slice(2),a=t.indexOf(`.`),o=a>=0,r=e.constructor,o&&(t=t.replace(`.`,``),s=t.length,a=s-a,i=tD(r,new r(n),a,a*2)),l=GE(t,n,LE),u=l.length-1,a=u;l[a]===0;--a)l.pop();return a<0?new r(e.s*0):(e.e=XE(l,u),e.d=l,TE=!1,o&&(e=qE(e,i,s*4)),c&&(e=e.times(Math.abs(c)<54?ME(2,c):nO.pow(2,c))),TE=!0,e)}function lD(e,t){var n,r=t.d.length;if(r<3)return t.isZero()?t:uD(e,2,t,t);n=1.4*Math.sqrt(r),n=n>16?16:n|0,t=t.times(1/dD(5,n)),t=uD(e,2,t,t);for(var i,a=new e(5),o=new e(16),s=new e(20);n--;)i=t.times(t),t=t.times(a.plus(i.times(o.times(i).minus(s))));return t}function uD(e,t,n,r,i){var a,o,s,c,l=1,u=e.precision,d=Math.ceil(u/RE);for(TE=!1,c=n.times(n),s=new e(r);;){if(o=qE(s.times(c),new e(t++*t++),u,1),s=i?r.plus(o):r.minus(o),r=qE(o.times(c),new e(t++*t++),u,1),o=s.plus(r),o.d[d]!==void 0){for(a=d;o.d[a]===s.d[a]&&a--;);if(a==-1)break}a=s,s=r,r=o,o=a,l++}return TE=!0,o.d.length=d+1,o}function dD(e,t){for(var n=e;--t;)n*=e;return n}function fD(e,t){var n,r=t.s<0,i=QE(e,e.precision,1),a=i.times(.5);if(t=t.abs(),t.lte(a))return wE=r?4:1,t;if(n=t.divToInt(i),n.isZero())wE=r?3:2;else{if(t=t.minus(n.times(i)),t.lte(a))return wE=nD(n)?r?2:3:r?4:1,t;wE=nD(n)?r?1:4:r?3:2}return t.minus(i).abs()}function pD(e,t,n,r){var i,a,o,s,c,l,u,d,f,p=e.constructor,m=n!==void 0;if(m?(UE(n,1,vE),r===void 0?r=p.rounding:UE(r,0,8)):(n=p.precision,r=p.rounding),!e.isFinite())u=oD(e);else{for(u=YE(e),o=u.indexOf(`.`),m?(i=2,t==16?n=n*4-3:t==8&&(n=n*3-2)):i=t,o>=0&&(u=u.replace(`.`,``),f=new p(1),f.e=u.length-o,f.d=GE(YE(f),10,i),f.e=f.d.length),d=GE(u,10,i),a=c=d.length;d[--c]==0;)d.pop();if(!d[0])u=m?`0p+0`:`0`;else{if(o<0?a--:(e=new p(e),e.d=d,e.e=a,e=qE(e,f,n,r,0,i),d=e.d,a=e.e,l=CE),o=d[n],s=i/2,l||=d[n+1]!==void 0,l=r<4?(o!==void 0||l)&&(r===0||r===(e.s<0?3:2)):o>s||o===s&&(r===4||l||r===6&&d[n-1]&1||r===(e.s<0?8:7)),d.length=n,l)for(;++d[--n]>i-1;)d[n]=0,n||(++a,d.unshift(1));for(c=d.length;!d[c-1];--c);for(o=0,u=``;o<c;o++)u+=yE.charAt(d[o]);if(m){if(c>1)if(t==16||t==8){for(o=t==16?4:3,--c;c%o;c++)u+=`0`;for(d=GE(u,i,t),c=d.length;!d[c-1];--c);for(o=1,u=`1.`;o<c;o++)u+=yE.charAt(d[o])}else u=u.charAt(0)+`.`+u.slice(1);u=u+(a<0?`p`:`p+`)+a}else if(a<0){for(;++a;)u=`0`+u;u=`0.`+u}else if(++a>c)for(a-=c;a--;)u+=`0`;else a<c&&(u=u.slice(0,a)+`.`+u.slice(a))}u=(t==16?`0x`:t==2?`0b`:t==8?`0o`:``)+u}return e.s<0?`-`+u:u}function mD(e,t){if(e.length>t)return e.length=t,!0}function hD(e){return new this(e).abs()}function gD(e){return new this(e).acos()}function _D(e){return new this(e).acosh()}function vD(e,t){return new this(e).plus(t)}function yD(e){return new this(e).asin()}function bD(e){return new this(e).asinh()}function xD(e){return new this(e).atan()}function SD(e){return new this(e).atanh()}function CD(e,t){e=new this(e),t=new this(t);var n,r=this.precision,i=this.rounding,a=r+4;return!e.s||!t.s?n=new this(NaN):!e.d&&!t.d?(n=QE(this,a,1).times(t.s>0?.25:.75),n.s=e.s):!t.d||e.isZero()?(n=t.s<0?QE(this,r,i):new this(0),n.s=e.s):!e.d||t.isZero()?(n=QE(this,a,1).times(.5),n.s=e.s):t.s<0?(this.precision=a,this.rounding=1,n=this.atan(qE(e,t,a,1)),t=QE(this,a,1),this.precision=r,this.rounding=i,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(qE(e,t,a,1)),n}function wD(e){return new this(e).cbrt()}function TD(e){return JE(e=new this(e),e.e+1,2)}function ED(e,t,n){return new this(e).clamp(t,n)}function DD(e){if(!e||typeof e!=`object`)throw Error(EE+`Object expected`);var t,n,r,i=e.defaults===!0,a=[`precision`,1,vE,`rounding`,0,8,`toExpNeg`,-_E,0,`toExpPos`,0,_E,`maxE`,0,_E,`minE`,-_E,0,`modulo`,0,9];for(t=0;t<a.length;t+=3)if(n=a[t],i&&(this[n]=SE[n]),(r=e[n])!==void 0)if(jE(r)===r&&r>=a[t+1]&&r<=a[t+2])this[n]=r;else throw Error(DE+n+`: `+r);if(n=`crypto`,i&&(this[n]=SE[n]),(r=e[n])!==void 0)if(r===!0||r===!1||r===0||r===1)if(r)if(typeof crypto<`u`&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[n]=!0;else throw Error(kE);else this[n]=!1;else throw Error(DE+n+`: `+r);return this}function OD(e){return new this(e).cos()}function kD(e){return new this(e).cosh()}function AD(e){var t,n,r;function i(e){var t,n,r,a=this;if(!(a instanceof i))return new i(e);if(a.constructor=i,FD(e)){a.s=e.s,TE?!e.d||e.e>i.maxE?(a.e=NaN,a.d=null):e.e<i.minE?(a.e=0,a.d=[0]):(a.e=e.e,a.d=e.d.slice()):(a.e=e.e,a.d=e.d?e.d.slice():e.d);return}if(r=typeof e,r===`number`){if(e===0){a.s=1/e<0?-1:1,a.e=0,a.d=[0];return}if(e<0?(e=-e,a.s=-1):a.s=1,e===~~e&&e<1e7){for(t=0,n=e;n>=10;n/=10)t++;TE?t>i.maxE?(a.e=NaN,a.d=null):t<i.minE?(a.e=0,a.d=[0]):(a.e=t,a.d=[e]):(a.e=t,a.d=[e]);return}if(e*0!=0){e||(a.s=NaN),a.e=NaN,a.d=null;return}return sD(a,e.toString())}if(r===`string`)return(n=e.charCodeAt(0))===45?(e=e.slice(1),a.s=-1):(n===43&&(e=e.slice(1)),a.s=1),IE.test(e)?sD(a,e):cD(a,e);if(r===`bigint`)return e<0?(e=-e,a.s=-1):a.s=1,sD(a,e.toString());throw Error(DE+e)}if(i.prototype=J,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.EUCLID=9,i.config=i.set=DD,i.clone=AD,i.isDecimal=FD,i.abs=hD,i.acos=gD,i.acosh=_D,i.add=vD,i.asin=yD,i.asinh=bD,i.atan=xD,i.atanh=SD,i.atan2=CD,i.cbrt=wD,i.ceil=TD,i.clamp=ED,i.cos=OD,i.cosh=kD,i.div=jD,i.exp=MD,i.floor=ND,i.hypot=PD,i.ln=ID,i.log=LD,i.log10=zD,i.log2=RD,i.max=BD,i.min=VD,i.mod=HD,i.mul=UD,i.pow=WD,i.random=GD,i.round=KD,i.sign=qD,i.sin=JD,i.sinh=YD,i.sqrt=XD,i.sub=ZD,i.sum=QD,i.tan=$D,i.tanh=eO,i.trunc=tO,e===void 0&&(e={}),e&&e.defaults!==!0)for(r=[`precision`,`rounding`,`toExpNeg`,`toExpPos`,`maxE`,`minE`,`modulo`,`crypto`],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function jD(e,t){return new this(e).div(t)}function MD(e){return new this(e).exp()}function ND(e){return JE(e=new this(e),e.e+1,3)}function PD(){var e,t,n=new this(0);for(TE=!1,e=0;e<arguments.length;)if(t=new this(arguments[e++]),t.d)n.d&&(n=n.plus(t.times(t)));else{if(t.s)return TE=!0,new this(1/0);n=t}return TE=!0,n.sqrt()}function FD(e){return e instanceof nO||e&&e.toStringTag===AE||!1}function ID(e){return new this(e).ln()}function LD(e,t){return new this(e).log(t)}function RD(e){return new this(e).log(2)}function zD(e){return new this(e).log(10)}function BD(){return rD(this,arguments,-1)}function VD(){return rD(this,arguments,1)}function HD(e,t){return new this(e).mod(t)}function UD(e,t){return new this(e).mul(t)}function WD(e,t){return new this(e).pow(t)}function GD(e){var t,n,r,i,a=0,o=new this(1),s=[];if(e===void 0?e=this.precision:UE(e,1,vE),r=Math.ceil(e/RE),!this.crypto)for(;a<r;)s[a++]=Math.random()*1e7|0;else if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(r));a<r;)i=t[a],i>=429e7?t[a]=crypto.getRandomValues(new Uint32Array(1))[0]:s[a++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(r*=4);a<r;)i=t[a]+(t[a+1]<<8)+(t[a+2]<<16)+((t[a+3]&127)<<24),i>=214e7?crypto.randomBytes(4).copy(t,a):(s.push(i%1e7),a+=4);a=r/4}else throw Error(kE);for(r=s[--a],e%=RE,r&&e&&(i=ME(10,RE-e),s[a]=(r/i|0)*i);s[a]===0;a--)s.pop();if(a<0)n=0,s=[0];else{for(n=-1;s[0]===0;n-=RE)s.shift();for(r=1,i=s[0];i>=10;i/=10)r++;r<RE&&(n-=RE-r)}return o.e=n,o.d=s,o}function KD(e){return JE(e=new this(e),e.e+1,this.rounding)}function qD(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}function JD(e){return new this(e).sin()}function YD(e){return new this(e).sinh()}function XD(e){return new this(e).sqrt()}function ZD(e,t){return new this(e).sub(t)}function QD(){var e=0,t=arguments,n=new this(t[e]);for(TE=!1;n.s&&++e<t.length;)n=n.plus(t[e]);return TE=!0,JE(n,this.precision,this.rounding)}function $D(e){return new this(e).tan()}function eO(e){return new this(e).tanh()}function tO(e){return JE(e=new this(e),e.e+1,1)}J[Symbol.for(`nodejs.util.inspect.custom`)]=J.toString,J[Symbol.toStringTag]=`Decimal`;var nO=J.constructor=AD(SE);bE=new nO(bE),xE=new nO(xE);var rO=K(`BigNumber`,[`?on`,`config`],e=>{var{on:t,config:n}=e,r=nO.clone({precision:n.precision,modulo:nO.EUCLID});return r.prototype=Object.create(r.prototype),r.prototype.type=`BigNumber`,r.prototype.isBigNumber=!0,r.prototype.toJSON=function(){return{mathjs:`BigNumber`,value:this.toString()}},r.fromJSON=function(e){return new r(e.value)},t&&t(`config`,function(e,t){e.precision!==t.precision&&r.config({precision:e.precision})}),r},{isClass:!0}),iO=Math.cosh||function(e){return Math.abs(e)<1e-9?1-e:(Math.exp(e)+Math.exp(-e))*.5},aO=Math.sinh||function(e){return Math.abs(e)<1e-9?e:(Math.exp(e)-Math.exp(-e))*.5},oO=e=>{let t=Math.sin(.5*e);return-2*t*t},sO=function(e,t){return e=Math.abs(e),t=Math.abs(t),e<t&&([e,t]=[t,e]),e<1e8?Math.sqrt(e*e+t*t):(t/=e,e*Math.sqrt(1+t*t))},cO=function(){throw SyntaxError(`Invalid Param`)};function lO(e,t){let n=Math.abs(e),r=Math.abs(t);return e===0?Math.log(r):t===0?Math.log(n):n<3e3&&r<3e3?Math.log(e*e+t*t)*.5:(e*=.5,t*=.5,.5*Math.log(e*e+t*t)+Math.LN2)}var uO={re:0,im:0},dO=function(e,t){let n=uO;if(e==null)n.re=n.im=0;else if(t!==void 0)n.re=e,n.im=t;else switch(typeof e){case`object`:if(`im`in e&&`re`in e)n.re=e.re,n.im=e.im;else if(`abs`in e&&`arg`in e){if(!isFinite(e.abs)&&isFinite(e.arg))return Y.INFINITY;n.re=e.abs*Math.cos(e.arg),n.im=e.abs*Math.sin(e.arg)}else if(`r`in e&&`phi`in e){if(!isFinite(e.r)&&isFinite(e.phi))return Y.INFINITY;n.re=e.r*Math.cos(e.phi),n.im=e.r*Math.sin(e.phi)}else e.length===2?(n.re=e[0],n.im=e[1]):cO();break;case`string`:n.im=n.re=0;let t=e.replace(/_/g,``).match(/\d+\.?\d*e[+-]?\d+|\d+\.?\d*|\.\d+|./g),r=1,i=0;t===null&&cO();for(let e=0;e<t.length;e++){let a=t[e];a===` `||a===` `||a===`
28
+ `||(a===`+`?r++:a===`-`?i++:a===`i`||a===`I`?(r+i===0&&cO(),t[e+1]!==` `&&!isNaN(t[e+1])?(n.im+=parseFloat((i%2?`-`:``)+t[e+1]),e++):n.im+=parseFloat((i%2?`-`:``)+`1`),r=i=0):((r+i===0||isNaN(a))&&cO(),t[e+1]===`i`||t[e+1]===`I`?(n.im+=parseFloat((i%2?`-`:``)+a),e++):n.re+=parseFloat((i%2?`-`:``)+a),r=i=0))}r+i>0&&cO();break;case`number`:n.im=0,n.re=e;break;default:cO()}return isNaN(n.re)||isNaN(n.im),n};function Y(e,t){if(!(this instanceof Y))return new Y(e,t);let n=dO(e,t);this.re=n.re,this.im=n.im}Y.prototype={re:0,im:0,sign:function(){let e=sO(this.re,this.im);return new Y(this.re/e,this.im/e)},add:function(e,t){let n=dO(e,t),r=this.isInfinite(),i=!(isFinite(n.re)&&isFinite(n.im));return r||i?r&&i?Y.NAN:Y.INFINITY:new Y(this.re+n.re,this.im+n.im)},sub:function(e,t){let n=dO(e,t),r=this.isInfinite(),i=!(isFinite(n.re)&&isFinite(n.im));return r||i?r&&i?Y.NAN:Y.INFINITY:new Y(this.re-n.re,this.im-n.im)},mul:function(e,t){let n=dO(e,t),r=this.isInfinite(),i=!(isFinite(n.re)&&isFinite(n.im)),a=this.re===0&&this.im===0,o=n.re===0&&n.im===0;return r&&o||i&&a?Y.NAN:r||i?Y.INFINITY:n.im===0&&this.im===0?new Y(this.re*n.re,0):new Y(this.re*n.re-this.im*n.im,this.re*n.im+this.im*n.re)},div:function(e,t){let n=dO(e,t),r=this.isInfinite(),i=!(isFinite(n.re)&&isFinite(n.im)),a=this.re===0&&this.im===0,o=n.re===0&&n.im===0;if(a&&o||r&&i)return Y.NAN;if(o||r)return Y.INFINITY;if(a||i)return Y.ZERO;if(n.im===0)return new Y(this.re/n.re,this.im/n.re);if(Math.abs(n.re)<Math.abs(n.im)){let e=n.re/n.im,t=n.re*e+n.im;return new Y((this.re*e+this.im)/t,(this.im*e-this.re)/t)}else{let e=n.im/n.re,t=n.im*e+n.re;return new Y((this.re+this.im*e)/t,(this.im-this.re*e)/t)}},pow:function(e,t){let n=dO(e,t),r=this.re===0&&this.im===0;if(n.re===0&&n.im===0)return Y.ONE;if(n.im===0){if(this.im===0&&this.re>0)return new Y(this.re**+n.re,0);if(this.re===0)switch((n.re%4+4)%4){case 0:return new Y(this.im**+n.re,0);case 1:return new Y(0,this.im**+n.re);case 2:return new Y(-(this.im**+n.re),0);case 3:return new Y(0,-(this.im**+n.re))}}if(r&&n.re>0)return Y.ZERO;let i=Math.atan2(this.im,this.re),a=lO(this.re,this.im),o=Math.exp(n.re*a-n.im*i),s=n.im*a+n.re*i;return new Y(o*Math.cos(s),o*Math.sin(s))},sqrt:function(){let e=this.re,t=this.im;if(t===0)return e>=0?new Y(Math.sqrt(e),0):new Y(0,Math.sqrt(-e));let n=sO(e,t),r=Math.sqrt(.5*(n+Math.abs(e))),i=Math.abs(t)/(2*r);return e>=0?new Y(r,t<0?-i:i):new Y(i,t<0?-r:r)},exp:function(){let e=Math.exp(this.re);return this.im===0?new Y(e,0):new Y(e*Math.cos(this.im),e*Math.sin(this.im))},expm1:function(){let e=this.re,t=this.im;return new Y(Math.expm1(e)*Math.cos(t)+oO(t),Math.exp(e)*Math.sin(t))},log:function(){let e=this.re,t=this.im;return t===0&&e>0?new Y(Math.log(e),0):new Y(lO(e,t),Math.atan2(t,e))},abs:function(){return sO(this.re,this.im)},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){let e=this.re,t=this.im;return new Y(Math.sin(e)*iO(t),Math.cos(e)*aO(t))},cos:function(){let e=this.re,t=this.im;return new Y(Math.cos(e)*iO(t),-Math.sin(e)*aO(t))},tan:function(){let e=2*this.re,t=2*this.im,n=Math.cos(e)+iO(t);return new Y(Math.sin(e)/n,aO(t)/n)},cot:function(){let e=2*this.re,t=2*this.im,n=Math.cos(e)-iO(t);return new Y(-Math.sin(e)/n,aO(t)/n)},sec:function(){let e=this.re,t=this.im,n=.5*iO(2*t)+.5*Math.cos(2*e);return new Y(Math.cos(e)*iO(t)/n,Math.sin(e)*aO(t)/n)},csc:function(){let e=this.re,t=this.im,n=.5*iO(2*t)-.5*Math.cos(2*e);return new Y(Math.sin(e)*iO(t)/n,-Math.cos(e)*aO(t)/n)},asin:function(){let e=this.re,t=this.im,n=new Y(t*t-e*e+1,-2*e*t).sqrt(),r=new Y(n.re-t,n.im+e).log();return new Y(r.im,-r.re)},acos:function(){let e=this.re,t=this.im,n=new Y(t*t-e*e+1,-2*e*t).sqrt(),r=new Y(n.re-t,n.im+e).log();return new Y(Math.PI/2-r.im,r.re)},atan:function(){let e=this.re,t=this.im;if(e===0){if(t===1)return new Y(0,1/0);if(t===-1)return new Y(0,-1/0)}let n=e*e+(1-t)*(1-t),r=new Y((1-t*t-e*e)/n,-2*e/n).log();return new Y(-.5*r.im,.5*r.re)},acot:function(){let e=this.re,t=this.im;if(t===0)return new Y(Math.atan2(1,e),0);let n=e*e+t*t;return n===0?new Y(e===0?0:e/0,t===0?0:-t/0).atan():new Y(e/n,-t/n).atan()},asec:function(){let e=this.re,t=this.im;if(e===0&&t===0)return new Y(0,1/0);let n=e*e+t*t;return n===0?new Y(e===0?0:e/0,t===0?0:-t/0).acos():new Y(e/n,-t/n).acos()},acsc:function(){let e=this.re,t=this.im;if(e===0&&t===0)return new Y(Math.PI/2,1/0);let n=e*e+t*t;return n===0?new Y(e===0?0:e/0,t===0?0:-t/0).asin():new Y(e/n,-t/n).asin()},sinh:function(){let e=this.re,t=this.im;return new Y(aO(e)*Math.cos(t),iO(e)*Math.sin(t))},cosh:function(){let e=this.re,t=this.im;return new Y(iO(e)*Math.cos(t),aO(e)*Math.sin(t))},tanh:function(){let e=2*this.re,t=2*this.im,n=iO(e)+Math.cos(t);return new Y(aO(e)/n,Math.sin(t)/n)},coth:function(){let e=2*this.re,t=2*this.im,n=iO(e)-Math.cos(t);return new Y(aO(e)/n,-Math.sin(t)/n)},csch:function(){let e=this.re,t=this.im,n=Math.cos(2*t)-iO(2*e);return new Y(-2*aO(e)*Math.cos(t)/n,2*iO(e)*Math.sin(t)/n)},sech:function(){let e=this.re,t=this.im,n=Math.cos(2*t)+iO(2*e);return new Y(2*iO(e)*Math.cos(t)/n,-2*aO(e)*Math.sin(t)/n)},asinh:function(){let e=this.re,t=this.im;if(t===0){if(e===0)return new Y(0,0);let t=Math.abs(e),n=Math.log(t+Math.sqrt(t*t+1));return new Y(e<0?-n:n,0)}let n=new Y(e*e-t*t+1,2*e*t).sqrt();return new Y(e+n.re,t+n.im).log()},acosh:function(){let e=this.re,t=this.im;if(t===0){if(e>1)return new Y(Math.log(e+Math.sqrt(e-1)*Math.sqrt(e+1)),0);if(e<-1){let t=Math.sqrt(e*e-1);return new Y(Math.log(-e+t),Math.PI)}return new Y(0,Math.acos(e))}let n=new Y(e-1,t).sqrt(),r=new Y(e+1,t).sqrt();return new Y(e+n.re*r.re-n.im*r.im,t+n.re*r.im+n.im*r.re).log()},atanh:function(){let e=this.re,t=this.im;if(t===0){if(e===0)return new Y(0,0);if(e===1)return new Y(1/0,0);if(e===-1)return new Y(-1/0,0);if(-1<e&&e<1)return new Y(.5*Math.log((1+e)/(1-e)),0);if(e>1){let t=(e+1)/(e-1);return new Y(.5*Math.log(t),-Math.PI/2)}let t=(1+e)/(1-e);return new Y(.5*Math.log(-t),Math.PI/2)}let n=1-e,r=1+e,i=n*n+t*t;if(i===0)return new Y(e===-1?0:e/0,t===0?0:t/0);let a=(r*n-t*t)/i,o=(t*n+r*t)/i;return new Y(lO(a,o)/2,Math.atan2(o,a)/2)},acoth:function(){let e=this.re,t=this.im;if(e===0&&t===0)return new Y(0,Math.PI/2);let n=e*e+t*t;return n===0?new Y(e===0?0:e/0,t===0?0:-t/0).atanh():new Y(e/n,-t/n).atanh()},acsch:function(){let e=this.re,t=this.im;if(t===0){if(e===0)return new Y(1/0,0);let t=1/e;return new Y(Math.log(t+Math.sqrt(t*t+1)),0)}let n=e*e+t*t;return n===0?new Y(e===0?0:e/0,t===0?0:-t/0).asinh():new Y(e/n,-t/n).asinh()},asech:function(){let e=this.re,t=this.im;if(this.isZero())return Y.INFINITY;let n=e*e+t*t;return n===0?new Y(e===0?0:e/0,t===0?0:-t/0).acosh():new Y(e/n,-t/n).acosh()},inverse:function(){if(this.isZero())return Y.INFINITY;if(this.isInfinite())return Y.ZERO;let e=this.re,t=this.im,n=e*e+t*t;return new Y(e/n,-t/n)},conjugate:function(){return new Y(this.re,-this.im)},neg:function(){return new Y(-this.re,-this.im)},ceil:function(e){return e=10**(e||0),new Y(Math.ceil(this.re*e)/e,Math.ceil(this.im*e)/e)},floor:function(e){return e=10**(e||0),new Y(Math.floor(this.re*e)/e,Math.floor(this.im*e)/e)},round:function(e){return e=10**(e||0),new Y(Math.round(this.re*e)/e,Math.round(this.im*e)/e)},equals:function(e,t){let n=dO(e,t);return Math.abs(n.re-this.re)<=Y.EPSILON&&Math.abs(n.im-this.im)<=Y.EPSILON},clone:function(){return new Y(this.re,this.im)},toString:function(){let e=this.re,t=this.im,n=``;return this.isNaN()?`NaN`:this.isInfinite()?`Infinity`:(Math.abs(e)<Y.EPSILON&&(e=0),Math.abs(t)<Y.EPSILON&&(t=0),t===0?n+e:(e===0?t<0&&(t=-t,n+=`-`):(n+=e,n+=` `,t<0?(t=-t,n+=`-`):n+=`+`,n+=` `),t!==1&&(n+=t),n+`i`))},toVector:function(){return[this.re,this.im]},valueOf:function(){return this.im===0?this.re:null},isNaN:function(){return isNaN(this.re)||isNaN(this.im)},isZero:function(){return this.im===0&&this.re===0},isFinite:function(){return isFinite(this.re)&&isFinite(this.im)},isInfinite:function(){return!this.isFinite()}},Y.ZERO=new Y(0,0),Y.ONE=new Y(1,0),Y.I=new Y(0,1),Y.PI=new Y(Math.PI,0),Y.E=new Y(Math.E,0),Y.INFINITY=new Y(1/0,1/0),Y.NAN=new Y(NaN,NaN),Y.EPSILON=1e-15;var fO=K(`Complex`,[],()=>(Object.defineProperty(Y,`name`,{value:`Complex`}),Y.prototype.constructor=Y,Y.prototype.type=`Complex`,Y.prototype.isComplex=!0,Y.prototype.toJSON=function(){return{mathjs:`Complex`,re:this.re,im:this.im}},Y.prototype.toPolar=function(){return{r:this.abs(),phi:this.arg()}},Y.prototype.format=function(e){var t=``,n=this.im,r=this.re,i=UT(this.re,e),a=UT(this.im,e),o=Pw(e)?e:e?e.precision:null;if(o!==null){var s=10**-o;Math.abs(r/n)<s&&(r=0),Math.abs(n/r)<s&&(n=0)}return t=n===0?i:r===0?n===1?`i`:n===-1?`-i`:a+`i`:n<0?n===-1?i+` - i`:i+` - `+a.substring(1)+`i`:n===1?i+` + i`:i+` + `+a+`i`,t},Y.fromPolar=function(e){switch(arguments.length){case 1:var t=arguments[0];if(typeof t==`object`)return Y(t);throw TypeError(`Input has to be an object with r and phi keys.`);case 2:var n=arguments[0],r=arguments[1];if(Pw(n)){if(zw(r)&&r.hasBase(`ANGLE`)&&(r=r.toNumber(`rad`)),Pw(r))return new Y({r:n,phi:r});throw TypeError(`Phi is not a number nor an angle unit.`)}else throw TypeError(`Radius r is not a number.`);default:throw SyntaxError(`Wrong number of arguments in function fromPolar`)}},Y.prototype.valueOf=Y.prototype.toString,Y.fromJSON=function(e){return new Y(e)},Y.compare=function(e,t){return e.re>t.re?1:e.re<t.re?-1:e.im>t.im?1:e.im<t.im?-1:0},Y),{isClass:!0});typeof BigInt>`u`&&(BigInt=function(e){if(isNaN(e))throw Error(``);return e});var pO=BigInt(0),mO=BigInt(1),hO=BigInt(2),gO=BigInt(3),_O=BigInt(5),vO=BigInt(10);BigInt(2**53-1);var yO=2e3,X={s:mO,n:pO,d:mO};function bO(e,t){try{e=BigInt(e)}catch{throw MO()}return e*t}function xO(e){return typeof e==`bigint`?e:Math.floor(e)}function SO(e,t){if(t===pO)throw jO();let n=Object.create(AO.prototype);n.s=e<pO?-mO:mO,e=e<pO?-e:e;let r=kO(e,t);return n.n=e/r,n.d=t/r,n}var CO=[hO*hO,hO,hO*hO,hO,hO*hO,hO*gO,hO,hO*gO];function wO(e){let t=Object.create(null);if(e<=mO)return t[e]=mO,t;let n=e=>{t[e]=(t[e]||pO)+mO};for(;e%hO===pO;)n(hO),e/=hO;for(;e%gO===pO;)n(gO),e/=gO;for(;e%_O===pO;)n(_O),e/=_O;for(let t=0,r=hO+_O;r*r<=e;){for(;e%r===pO;)n(r),e/=r;r+=CO[t],t=t+1&7}return e>mO&&n(e),t}var TO=function(e,t){let n=pO,r=mO,i=mO;if(e!=null)if(t!==void 0){if(typeof e==`bigint`)n=e;else if(isNaN(e))throw MO();else if(e%1!=0)throw NO();else n=BigInt(e);if(typeof t==`bigint`)r=t;else if(isNaN(t))throw MO();else if(t%1!=0)throw NO();else r=BigInt(t);i=n*r}else if(typeof e==`object`){if(`d`in e&&`n`in e)n=BigInt(e.n),r=BigInt(e.d),`s`in e&&(n*=BigInt(e.s));else if(0 in e)n=BigInt(e[0]),1 in e&&(r=BigInt(e[1]));else if(typeof e==`bigint`)n=e;else throw MO();i=n*r}else if(typeof e==`number`){if(isNaN(e))throw MO();if(e<0&&(i=-mO,e=-e),e%1==0)n=BigInt(e);else{let t=1,i=0,a=1,o=1,s=1,c=1e7;for(e>=1&&(t=10**Math.floor(1+Math.log10(e)),e/=t);a<=c&&s<=c;){let t=(i+o)/(a+s);if(e===t){a+s<=c?(n=i+o,r=a+s):s>a?(n=o,r=s):(n=i,r=a);break}else e>t?(i+=o,a+=s):(o+=i,s+=a),a>c?(n=o,r=s):(n=i,r=a)}n=BigInt(n)*BigInt(t),r=BigInt(r)}}else if(typeof e==`string`){let t=0,a=pO,o=pO,s=pO,c=mO,l=mO,u=e.replace(/_/g,``).match(/\d+|./g);if(u===null)throw MO();if(u[t]===`-`?(i=-mO,t++):u[t]===`+`&&t++,u.length===t+1?o=bO(u[t++],i):u[t+1]===`.`||u[t]===`.`?(u[t]!==`.`&&(a=bO(u[t++],i)),t++,(t+1===u.length||u[t+1]===`(`&&u[t+3]===`)`||u[t+1]===`'`&&u[t+3]===`'`)&&(o=bO(u[t],i),c=vO**BigInt(u[t].length),t++),(u[t]===`(`&&u[t+2]===`)`||u[t]===`'`&&u[t+2]===`'`)&&(s=bO(u[t+1],i),l=vO**BigInt(u[t+1].length)-mO,t+=3)):u[t+1]===`/`||u[t+1]===`:`?(o=bO(u[t],i),c=bO(u[t+2],mO),t+=3):u[t+3]===`/`&&u[t+1]===` `&&(a=bO(u[t],i),o=bO(u[t+2],i),c=bO(u[t+4],mO),t+=5),u.length<=t)r=c*l,i=n=s+r*a+l*o;else throw MO()}else if(typeof e==`bigint`)n=e,i=e,r=mO;else throw MO();if(r===pO)throw jO();X.s=i<pO?-mO:mO,X.n=n<pO?-n:n,X.d=r<pO?-r:r};function EO(e,t,n){let r=mO;for(;t>pO;e=e*e%n,t>>=mO)t&mO&&(r=r*e%n);return r}function DO(e,t){for(;t%hO===pO;t/=hO);for(;t%_O===pO;t/=_O);if(t===mO)return pO;let n=vO%t,r=1;for(;n!==mO;r++)if(n=n*vO%t,r>yO)return pO;return BigInt(r)}function OO(e,t,n){let r=mO,i=EO(vO,n,t);for(let e=0;e<300;e++){if(r===i)return BigInt(e);r=r*vO%t,i=i*vO%t}return 0}function kO(e,t){if(!e)return t;if(!t)return e;for(;;){if(e%=t,!e)return t;if(t%=e,!t)return e}}function AO(e,t){if(TO(e,t),this instanceof AO)e=kO(X.d,X.n),this.s=X.s,this.n=X.n/e,this.d=X.d/e;else return SO(X.s*X.n,X.d)}var jO=function(){return Error(`Division by Zero`)},MO=function(){return Error(`Invalid argument`)},NO=function(){return Error(`Parameters must be integer`)};AO.prototype={s:mO,n:pO,d:mO,abs:function(){return SO(this.n,this.d)},neg:function(){return SO(-this.s*this.n,this.d)},add:function(e,t){return TO(e,t),SO(this.s*this.n*X.d+X.s*this.d*X.n,this.d*X.d)},sub:function(e,t){return TO(e,t),SO(this.s*this.n*X.d-X.s*this.d*X.n,this.d*X.d)},mul:function(e,t){return TO(e,t),SO(this.s*X.s*this.n*X.n,this.d*X.d)},div:function(e,t){return TO(e,t),SO(this.s*X.s*this.n*X.d,this.d*X.n)},clone:function(){return SO(this.s*this.n,this.d)},mod:function(e,t){if(e===void 0)return SO(this.s*this.n%this.d,mO);if(TO(e,t),pO===X.n*this.d)throw jO();return SO(this.s*(X.d*this.n)%(X.n*this.d),X.d*this.d)},gcd:function(e,t){return TO(e,t),SO(kO(X.n,this.n)*kO(X.d,this.d),X.d*this.d)},lcm:function(e,t){return TO(e,t),X.n===pO&&this.n===pO?SO(pO,mO):SO(X.n*this.n,kO(X.n,this.n)*kO(X.d,this.d))},inverse:function(){return SO(this.s*this.d,this.n)},pow:function(e,t){if(TO(e,t),X.d===mO)return X.s<pO?SO((this.s*this.d)**X.n,this.n**X.n):SO((this.s*this.n)**X.n,this.d**X.n);if(this.s<pO)return null;let n=wO(this.n),r=wO(this.d),i=mO,a=mO;for(let e in n)if(e!==`1`){if(e===`0`){i=pO;break}if(n[e]*=X.n,n[e]%X.d===pO)n[e]/=X.d;else return null;i*=BigInt(e)**n[e]}for(let e in r)if(e!==`1`){if(r[e]*=X.n,r[e]%X.d===pO)r[e]/=X.d;else return null;a*=BigInt(e)**r[e]}return X.s<pO?SO(a,i):SO(i,a)},log:function(e,t){if(TO(e,t),this.s<=pO||X.s<=pO)return null;let n=Object.create(null),r=wO(X.n),i=wO(X.d),a=wO(this.n),o=wO(this.d);for(let e in i)r[e]=(r[e]||pO)-i[e];for(let e in o)a[e]=(a[e]||pO)-o[e];for(let e in r)e!==`1`&&(n[e]=!0);for(let e in a)e!==`1`&&(n[e]=!0);let s=null,c=null;for(let e in n){let t=r[e]||pO,n=a[e]||pO;if(t===pO){if(n!==pO)return null;continue}let i=n,o=t,l=kO(i,o);if(i/=l,o/=l,s===null&&c===null)s=i,c=o;else if(i*c!==s*o)return null}return s!==null&&c!==null?SO(s,c):null},equals:function(e,t){return TO(e,t),this.s*this.n*X.d===X.s*X.n*this.d},lt:function(e,t){return TO(e,t),this.s*this.n*X.d<X.s*X.n*this.d},lte:function(e,t){return TO(e,t),this.s*this.n*X.d<=X.s*X.n*this.d},gt:function(e,t){return TO(e,t),this.s*this.n*X.d>X.s*X.n*this.d},gte:function(e,t){return TO(e,t),this.s*this.n*X.d>=X.s*X.n*this.d},compare:function(e,t){TO(e,t);let n=this.s*this.n*X.d-X.s*X.n*this.d;return(pO<n)-(n<pO)},ceil:function(e){return e=vO**BigInt(e||0),SO(xO(this.s*e*this.n/this.d)+(e*this.n%this.d>pO&&this.s>=pO?mO:pO),e)},floor:function(e){return e=vO**BigInt(e||0),SO(xO(this.s*e*this.n/this.d)-(e*this.n%this.d>pO&&this.s<pO?mO:pO),e)},round:function(e){return e=vO**BigInt(e||0),SO(xO(this.s*e*this.n/this.d)+this.s*((this.s>=pO?mO:pO)+hO*(e*this.n%this.d)>this.d?mO:pO),e)},roundTo:function(e,t){TO(e,t);let n=this.n*X.d,r=this.d*X.n,i=n%r,a=xO(n/r);return i+i>=r&&a++,SO(this.s*a*X.n,X.d)},divisible:function(e,t){return TO(e,t),X.n===pO?!1:this.n*X.d%(X.n*this.d)===pO},valueOf:function(){return Number(this.s*this.n)/Number(this.d)},toString:function(e=15){let t=this.n,n=this.d,r=DO(t,n),i=OO(t,n,r),a=this.s<pO?`-`:``;if(a+=xO(t/n),t%=n,t*=vO,t&&(a+=`.`),r){for(let e=i;e--;)a+=xO(t/n),t%=n,t*=vO;a+=`(`;for(let e=r;e--;)a+=xO(t/n),t%=n,t*=vO;a+=`)`}else for(let r=e;t&&r--;)a+=xO(t/n),t%=n,t*=vO;return a},toFraction:function(e=!1){let t=this.n,n=this.d,r=this.s<pO?`-`:``;if(n===mO)r+=t;else{let i=xO(t/n);e&&i>pO&&(r+=i,r+=` `,t%=n),r+=t,r+=`/`,r+=n}return r},toLatex:function(e=!1){let t=this.n,n=this.d,r=this.s<pO?`-`:``;if(n===mO)r+=t;else{let i=xO(t/n);e&&i>pO&&(r+=i,t%=n),r+=`\\frac{`,r+=t,r+=`}{`,r+=n,r+=`}`}return r},toContinued:function(){let e=this.n,t=this.d,n=[];for(;t;){n.push(xO(e/t));let r=e%t;e=t,t=r}return n},simplify:function(e=.001){let t=BigInt(Math.ceil(1/e)),n=this.abs(),r=n.toContinued();for(let e=1;e<r.length;e++){let i=SO(r[e-1],mO);for(let t=e-2;t>=0;t--)i=i.inverse().add(r[t]);let a=i.sub(n);if(a.n*t<a.d)return i.mul(this.s)}return this}};var PO=K(`Fraction`,[],()=>(Object.defineProperty(AO,`name`,{value:`Fraction`}),AO.prototype.constructor=AO,AO.prototype.type=`Fraction`,AO.prototype.isFraction=!0,AO.prototype.toJSON=function(){return{mathjs:`Fraction`,n:String(this.s*this.n),d:String(this.d)}},AO.fromJSON=function(e){return new AO(e)},AO),{isClass:!0}),FO=K(`Range`,[],()=>{function e(t,n,r){if(!(this instanceof e))throw SyntaxError(`Constructor must be called with the new operator`);var i=t!=null,a=n!=null,o=r!=null;if(i){if(Fw(t))t=t.toNumber();else if(typeof t!=`number`&&!Iw(t))throw TypeError(`Parameter start must be a number or bigint`)}if(a){if(Fw(n))n=n.toNumber();else if(typeof n!=`number`&&!Iw(n))throw TypeError(`Parameter end must be a number or bigint`)}if(o){if(Fw(r))r=r.toNumber();else if(typeof r!=`number`&&!Iw(r))throw TypeError(`Parameter step must be a number or bigint`)}if(this.start=i?parseFloat(t):0,this.end=a?parseFloat(n):0,this.step=o?parseFloat(r):1,o&&$T(this.step,0))throw Error(`Step must not be zero`)}return e.prototype.type=`Range`,e.prototype.isRange=!0,e.parse=function(t){if(typeof t!=`string`)return null;var n=t.split(`:`).map(function(e){return parseFloat(e)});if(n.some(function(e){return isNaN(e)}))return null;switch(n.length){case 2:return new e(n[0],n[1]);case 3:return new e(n[0],n[2],n[1]);default:return null}},e.prototype.clone=function(){return new e(this.start,this.end,this.step)},e.prototype.size=function(){var e=0,t=this.start,n=this.step,r=this.end-t;return IT(n)===IT(r)?e=Math.ceil(r/n):r===0&&(e=0),isNaN(e)&&(e=0),[e]},e.prototype.min=function(){var e=this.size()[0];if(e>0)return this.step>0?this.start:this.start+(e-1)*this.step},e.prototype.max=function(){var e=this.size()[0];if(e>0)return this.step>0?this.start+(e-1)*this.step:this.start},e.prototype.forEach=function(e){var t=this.start,n=this.step,r=this.end,i=0;if(n>0)for(;t<r;)e(t,[i],this),t+=n,i++;else if(n<0)for(;t>r;)e(t,[i],this),t+=n,i++},e.prototype.map=function(e){var t=[];return this.forEach(function(n,r,i){t[r[0]]=e(n,r,i)}),t},e.prototype.toArray=function(){var e=[];return this.forEach(function(t,n){e[n[0]]=t}),e},e.prototype.valueOf=function(){return this.toArray()},e.prototype.format=function(e){var t=UT(this.start,e);return this.step!==1&&(t+=`:`+UT(this.step,e)),t+=`:`+UT(this.end,e),t},e.prototype.toString=function(){return this.format()},e.prototype.toJSON=function(){return{mathjs:`Range`,start:this.start,end:this.end,step:this.step}},e.fromJSON=function(t){return new e(t.start,t.end,t.step)},e},{isClass:!0}),IO=K(`Matrix`,[],()=>{function e(){if(!(this instanceof e))throw SyntaxError(`Constructor must be called with the new operator`)}return e.prototype.type=`Matrix`,e.prototype.isMatrix=!0,e.prototype.storage=function(){throw Error(`Cannot invoke storage on a Matrix interface`)},e.prototype.datatype=function(){throw Error(`Cannot invoke datatype on a Matrix interface`)},e.prototype.create=function(e,t){throw Error(`Cannot invoke create on a Matrix interface`)},e.prototype.subset=function(e,t,n){throw Error(`Cannot invoke subset on a Matrix interface`)},e.prototype.get=function(e){throw Error(`Cannot invoke get on a Matrix interface`)},e.prototype.set=function(e,t,n){throw Error(`Cannot invoke set on a Matrix interface`)},e.prototype.resize=function(e,t){throw Error(`Cannot invoke resize on a Matrix interface`)},e.prototype.reshape=function(e,t){throw Error(`Cannot invoke reshape on a Matrix interface`)},e.prototype.clone=function(){throw Error(`Cannot invoke clone on a Matrix interface`)},e.prototype.size=function(){throw Error(`Cannot invoke size on a Matrix interface`)},e.prototype.map=function(e,t){throw Error(`Cannot invoke map on a Matrix interface`)},e.prototype.forEach=function(e){throw Error(`Cannot invoke forEach on a Matrix interface`)},e.prototype[Symbol.iterator]=function(){throw Error(`Cannot iterate a Matrix interface`)},e.prototype.toArray=function(){throw Error(`Cannot invoke toArray on a Matrix interface`)},e.prototype.valueOf=function(){throw Error(`Cannot invoke valueOf on a Matrix interface`)},e.prototype.format=function(e){throw Error(`Cannot invoke format on a Matrix interface`)},e.prototype.toString=function(){throw Error(`Cannot invoke toString on a Matrix interface`)},e},{isClass:!0});function LO(e,t,n){var r=e.constructor,i=new r(2),a=``;if(n){if(n<1)throw Error(`size must be in greater than 0`);if(!q(n))throw Error(`size must be an integer`);if(e.greaterThan(i.pow(n-1).sub(1))||e.lessThan(i.pow(n-1).mul(-1)))throw Error(`Value must be in range [-2^${n-1}, 2^${n-1}-1]`);if(!e.isInteger())throw Error(`Value must be an integer`);e.lessThan(0)&&(e=e.add(i.pow(n))),a=`i${n}`}switch(t){case 2:return`${e.toBinary()}${a}`;case 8:return`${e.toOctal()}${a}`;case 16:return`${e.toHexadecimal()}${a}`;default:throw Error(`Base ${t} not supported `)}}function RO(e,t){if(typeof t==`function`)return t(e);if(!e.isFinite())return e.isNaN()?`NaN`:e.gt(0)?`Infinity`:`-Infinity`;var{notation:n,precision:r,wordSize:i}=WT(t);switch(n){case`fixed`:return VO(e,r);case`exponential`:return BO(e,r);case`engineering`:return zO(e,r);case`bin`:return LO(e,2,i);case`oct`:return LO(e,8,i);case`hex`:return LO(e,16,i);case`auto`:var a=HO(t?.lowerExp,-3),o=HO(t?.upperExp,5);if(e.isZero())return`0`;var s,c=e.toSignificantDigits(r),l=c.e;return s=l>=a&&l<o?c.toFixed():BO(e,r),s.replace(/((\.\d*?)(0+))($|e)/,function(){var e=arguments[2],t=arguments[4];return e===`.`?t:e+t});default:throw Error(`Unknown notation "`+n+`". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.`)}}function zO(e,t){var n=e.e,r=n%3==0?n:n<0?n-3-n%3:n-n%3,i=e.mul(10**-r).toPrecision(t);if(i.includes(`e`)){var a=e.constructor;i=new a(i).toFixed()}return i+`e`+(n>=0?`+`:``)+r.toString()}function BO(e,t){return t===void 0?e.toExponential():e.toExponential(t-1)}function VO(e,t){return e.toFixed(t)}function HO(e,t){return Pw(e)?e:Fw(e)?e.toNumber():t}function UO(e,t){var n=e.length-t.length,r=e.length;return e.substring(n,r)===t}function WO(e,t){var n=GO(e,t);return t&&typeof t==`object`&&`truncate`in t&&n.length>t.truncate?n.substring(0,t.truncate-3)+`...`:n}function GO(e,t){return typeof e==`number`?UT(e,t):Fw(e)?RO(e,t):XO(e)?!t||t.fraction!==`decimal`?`${e.s*e.n}/${e.d}`:e.toString():Array.isArray(e)?YO(e,t):Bw(e)?KO(e):typeof e==`function`?e.syntax?String(e.syntax):`function`:e&&typeof e==`object`?typeof e.format==`function`?e.format(t):e&&e.toString(t)!=={}.toString()?e.toString(t):`{`+Object.keys(e).map(n=>KO(n)+`: `+WO(e[n],t)).join(`, `)+`}`:String(e)}function KO(e){for(var t=String(e),n=``,r=0;r<t.length;){var i=t.charAt(r);n+=i in qO?qO[i]:i,r++}return`"`+n+`"`}var qO={'"':`\\"`,"\\":`\\\\`,"\b":`\\b`,"\f":`\\f`,"\n":`\\n`,"\r":`\\r`," ":`\\t`};function JO(e){var t=String(e);return t=t.replace(/&/g,`&amp;`).replace(/"/g,`&quot;`).replace(/'/g,`&#39;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`),t}function YO(e,t){if(Array.isArray(e)){for(var n=`[`,r=e.length,i=0;i<r;i++)i!==0&&(n+=`, `),n+=YO(e[i],t);return n+=`]`,n}else return WO(e,t)}function XO(e){return e&&typeof e==`object`&&typeof e.s==`bigint`&&typeof e.n==`bigint`&&typeof e.d==`bigint`||!1}function ZO(e,t){if(!Bw(e))throw TypeError(`Unexpected type of argument in function compareText (expected: string or Array or Matrix, actual: `+ST(e)+`, index: 0)`);if(!Bw(t))throw TypeError(`Unexpected type of argument in function compareText (expected: string or Array or Matrix, actual: `+ST(t)+`, index: 1)`);return e===t?0:e>t?1:-1}function QO(e,t,n){if(!(this instanceof QO))throw SyntaxError(`Constructor must be called with the new operator`);this.actual=e,this.expected=t,this.relation=n,this.message=`Dimension mismatch (`+(Array.isArray(e)?`[`+e.join(`, `)+`]`:e)+` `+(this.relation||`!=`)+` `+(Array.isArray(t)?`[`+t.join(`, `)+`]`:t)+`)`,this.stack=Error().stack}QO.prototype=RangeError(),QO.prototype.constructor=RangeError,QO.prototype.name=`DimensionError`,QO.prototype.isDimensionError=!0;function $O(e,t,n){if(!(this instanceof $O))throw SyntaxError(`Constructor must be called with the new operator`);this.index=e,arguments.length<3?(this.min=0,this.max=t):(this.min=t,this.max=n),this.min!==void 0&&this.index<this.min?this.message=`Index out of range (`+this.index+` < `+this.min+`)`:this.max!==void 0&&this.index>=this.max?this.message=`Index out of range (`+this.index+` > `+(this.max-1)+`)`:this.message=`Index out of range (`+this.index+`)`,this.stack=Error().stack}$O.prototype=RangeError(),$O.prototype.constructor=RangeError,$O.prototype.name=`IndexError`,$O.prototype.isIndexError=!0;function ek(e){for(var t=[];Array.isArray(e);)t.push(e.length),e=e[0];return t}function tk(e,t,n){var r,i=e.length;if(i!==t[n])throw new QO(i,t[n]);if(n<t.length-1){var a=n+1;for(r=0;r<i;r++){var o=e[r];if(!Array.isArray(o))throw new QO(t.length-1,t.length,`<`);tk(e[r],t,a)}}else for(r=0;r<i;r++)if(Array.isArray(e[r]))throw new QO(t.length+1,t.length,`>`)}function nk(e,t){if(t.length===0){if(Array.isArray(e))throw new QO(e.length,0)}else tk(e,t,0)}function rk(e,t){var n=e.isMatrix?e._size:ek(e);t._sourceSize.forEach((e,t)=>{if(e!==null&&e!==n[t])throw new QO(e,n[t])})}function ik(e,t){if(e!==void 0){if(!Pw(e)||!q(e))throw TypeError(`Index must be an integer (value: `+e+`)`);if(e<0||typeof t==`number`&&e>=t)throw new $O(e,t)}}function ak(e){for(var t=0;t<e._dimensions.length;++t){var n=e._dimensions[t];if(n._data&&Vw(n._data)){if(n._size[0]===0)return!0}else if(n.isRange){if(n.start===n.end)return!0}else if(Bw(n)&&n.length===0)return!0}return!1}function ok(e,t,n){if(!Array.isArray(t))throw TypeError(`Array expected`);if(t.length===0)throw Error(`Resizing to scalar is not supported`);return t.forEach(function(e){if(!Pw(e)||!q(e)||e<0)throw TypeError(`Invalid size, must contain positive integers (size: `+WO(t)+`)`)}),(Pw(e)||Fw(e))&&(e=[e]),sk(e,t,0,n===void 0?0:n),e}function sk(e,t,n,r){var i,a,o=e.length,s=t[n],c=Math.min(o,s);if(e.length=s,n<t.length-1){var l=n+1;for(i=0;i<c;i++)a=e[i],Array.isArray(a)||(a=[a],e[i]=a),sk(a,t,l,r);for(i=c;i<s;i++)a=[],e[i]=a,sk(a,t,l,r)}else{for(i=0;i<c;i++)for(;Array.isArray(e[i]);)e[i]=e[i][0];for(i=c;i<s;i++)e[i]=r}}function ck(e,t){var n=gk(e,!0),r=n.length;if(!Array.isArray(e)||!Array.isArray(t))throw TypeError(`Array expected`);if(t.length===0)throw new QO(0,r,`!=`);t=lk(t,r);var i=uk(t);if(r!==i)throw new QO(i,r,`!=`);try{return dk(n,t)}catch(e){throw e instanceof QO?new QO(i,r,`!=`):e}}function lk(e,t){var n=uk(e),r=e.slice(),i=-1,a=e.indexOf(i);if(e.indexOf(i,a+1)>=0)throw Error(`More than one wildcard in sizes`);var o=a>=0,s=t%n===0;if(o)if(s)r[a]=-t/n;else throw Error(`Could not replace wildcard, since `+t+` is no multiple of `+-n);return r}function uk(e){return e.reduce((e,t)=>e*t,1)}function dk(e,t){for(var n=e,r,i=t.length-1;i>0;i--){var a=t[i];r=[];for(var o=n.length/a,s=0;s<o;s++)r.push(n.slice(s*a,(s+1)*a));n=r}return n}function fk(e,t){for(var n=t||ek(e);Array.isArray(e)&&e.length===1;)e=e[0],n.shift();for(var r=n.length;n[r-1]===1;)r--;return r<n.length&&(e=pk(e,r,0),n.length=r),e}function pk(e,t,n){var r,i;if(n<t){var a=n+1;for(r=0,i=e.length;r<i;r++)e[r]=pk(e[r],t,a)}else for(;Array.isArray(e);)e=e[0];return e}function mk(e,t,n,r){var i=r||ek(e);if(n)for(var a=0;a<n;a++)e=[e],i.unshift(1);for(e=hk(e,t,0);i.length<t;)i.push(1);return e}function hk(e,t,n){var r,i;if(Array.isArray(e)){var a=n+1;for(r=0,i=e.length;r<i;r++)e[r]=hk(e[r],t,a)}else for(var o=n;o<t;o++)e=[e];return e}function gk(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!Array.isArray(e))return e;if(typeof t!=`boolean`)throw TypeError(`Boolean expected for second argument of flatten`);var n=[];return t?i(e):r(e),n;function r(e){for(var t=0;t<e.length;t++){var i=e[t];Array.isArray(i)?r(i):n.push(i)}}function i(e){if(Array.isArray(e[0]))for(var t=0;t<e.length;t++)i(e[t]);else for(var r=0;r<e.length;r++)n.push(e[r])}}function _k(e,t){return Array.prototype.map.call(e,t)}function vk(e,t){Array.prototype.forEach.call(e,t)}function yk(e,t){if(ek(e).length!==1)throw Error(`Only one dimensional matrices supported`);return Array.prototype.filter.call(e,t)}function bk(e,t){if(ek(e).length!==1)throw Error(`Only one dimensional matrices supported`);return Array.prototype.filter.call(e,e=>t.test(e))}function xk(e,t){return Array.prototype.join.call(e,t)}function Sk(e){if(!Array.isArray(e))throw TypeError(`Array input expected`);if(e.length===0)return e;var t=[],n=0;t[0]={value:e[0],identifier:0};for(var r=1;r<e.length;r++)e[r]===e[r-1]?n++:n=0,t.push({value:e[r],identifier:n});return t}function Ck(e){if(!Array.isArray(e))throw TypeError(`Array input expected`);if(e.length===0)return e;for(var t=[],n=0;n<e.length;n++)t.push(e[n].value);return t}function wk(e,t){for(var n,r=0,i=0;i<e.length;i++){var a=e[i],o=Array.isArray(a);if(i===0&&o&&(r=a.length),o&&a.length!==r)return;var s=o?wk(a,t):t(a);if(n===void 0)n=s;else if(n!==s)return`mixed`}return n}function Tk(e,t,n,r){if(r<n){if(e.length!==t.length)throw new QO(e.length,t.length);for(var i=[],a=0;a<e.length;a++)i[a]=Tk(e[a],t[a],n,r+1);return i}else return e.concat(t)}function Ek(){var e=Array.prototype.slice.call(arguments,0,-1),t=Array.prototype.slice.call(arguments,-1);if(e.length===1)return e[0];if(e.length>1)return e.slice(1).reduce(function(e,n){return Tk(e,n,t,0)},e[0]);throw Error(`Wrong number of arguments in function concat`)}function Dk(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=t.map(e=>e.length),i=Math.max(...r),a=Array(i).fill(null),o=0;o<t.length;o++)for(var s=t[o],c=r[o],l=0;l<c;l++){var u=i-c+l;s[l]>a[u]&&(a[u]=s[l])}for(var d=0;d<t.length;d++)Ok(t[d],a);return a}function Ok(e,t){for(var n=t.length,r=e.length,i=0;i<r;i++){var a=n-r+i;if(e[i]<t[a]&&e[i]>1||e[i]>t[a])throw Error(`shape mismatch: mismatch is found in arg with shape (${e}) not possible to broadcast dimension ${r} with size ${e[i]} to size ${t[a]}`)}}function kk(e,t){var n=ek(e);if(ET(n,t))return e;Ok(n,t);var r=Dk(n,t),i=r.length,a=[...Array(i-n.length).fill(1),...n],o=Pk(e);n.length<i&&(o=ck(o,a),n=ek(o));for(var s=0;s<i;s++)n[s]<r[s]&&(o=Ak(o,r[s],s),n=ek(o));return o}function Ak(e,t,n){return Ek(...Array(t).fill(e),n)}function jk(e,t){if(!Array.isArray(e))throw Error(`Array expected`);var n=ek(e);if(t.length!==n.length)throw new QO(t.length,n.length);for(var r=0;r<t.length;r++)ik(t[r],n[r]);return t.reduce((e,t)=>e[t],e)}function Mk(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(e.length===0)return[];if(n)return a(e);var r=[];return i(e,0);function i(n,a){if(Array.isArray(n)){for(var o=n.length,s=Array(o),c=0;c<o;c++)r[a]=c,s[c]=i(n[c],a+1);return s}else return t(n,r.slice(0,a),e)}function a(e){if(Array.isArray(e)){for(var n=e.length,r=Array(n),i=0;i<n;i++)r[i]=a(e[i]);return r}else return t(e)}}function Nk(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(e.length===0)return;if(n){a(e);return}var r=[];i(e,0);function i(n,a){if(Array.isArray(n))for(var o=n.length,s=0;s<o;s++)r[a]=s,i(n[s],a+1);else t(n,r.slice(0,a),e)}function a(e){if(Array.isArray(e))for(var n=e.length,r=0;r<n;r++)a(e[r]);else t(e)}}function Pk(e){return vw([],e)}function Fk(e,t,n,r){if(lE.default.isTypedFunction(e)){var i;if(r)i=1;else{var a=t.isMatrix?t.size():ek(t);if(!a.length||a[a.length-1]===0)return{isUnary:r,fn:e};var o=a.map(()=>0);i=Rk(e,t.isMatrix?t.get(o):jk(t,o),o,t)}var s;if(t.isMatrix&&t.dataType!==`mixed`&&t.dataType!==void 0){var c=Ik(e,i);s=c===void 0?e:c}else s=e;return i>=1&&i<=3?{isUnary:i===1,fn:function(){for(var t=arguments.length,r=Array(t),a=0;a<t;a++)r[a]=arguments[a];return zk(s,r.slice(0,i),n,e.name)}}:{isUnary:!1,fn:function(){for(var t=arguments.length,r=Array(t),i=0;i<t;i++)r[i]=arguments[i];return zk(s,r,n,e.name)}}}return r===void 0?{isUnary:Lk(e),fn:e}:{isUnary:r,fn:e}}function Ik(e,t){var n=[];if(Object.entries(e.signatures).forEach(e=>{var[r,i]=e;r.split(`,`).length===t&&n.push(i)}),n.length===1)return n[0]}function Lk(e){if(e.length!==1)return!1;var t=e.toString();if(/arguments/.test(t))return!1;var n=t.match(/\(.*?\)/);return!/\.\.\./.test(n)}function Rk(e,t,n,r){for(var i=[t,n,r],a=3;a>0;a--){var o=i.slice(0,a);if(lE.default.resolve(e,o)!==null)return a}}function zk(e,t,n,r){try{return e(...t)}catch(e){Bk(e,t,n,r)}}function Bk(e,t,n,r){if(e instanceof TypeError&&e.data?.category===`wrongType`){var i=[];throw i.push(`value: ${ST(t[0])}`),t.length>=2&&i.push(`index: ${ST(t[1])}`),t.length>=3&&i.push(`array: ${ST(t[2])}`),TypeError(`Function ${n} cannot apply callback arguments ${r}(${i.join(`, `)}) at index ${JSON.stringify(t[1])}`)}else throw TypeError(`Function ${n} cannot apply callback arguments to function ${r}: ${e.message}`)}var Vk=K(`DenseMatrix`,[`Matrix`,`config`],e=>{var{Matrix:t,config:n}=e;function r(e,t){if(!(this instanceof r))throw SyntaxError(`Constructor must be called with the new operator`);if(t&&!Bw(t))throw Error(`Invalid datatype: `+t);if(Hw(e))e.type===`DenseMatrix`?(this._data=CT(e._data),this._size=CT(e._size),this._datatype=t||e._datatype):(this._data=e.toArray(),this._size=e.size(),this._datatype=t||e._datatype);else if(e&&Vw(e.data)&&Vw(e.size))this._data=e.data,this._size=e.size,nk(this._data,this._size),this._datatype=t||e.datatype;else if(Vw(e))this._data=u(e),this._size=ek(this._data),nk(this._data,this._size),this._datatype=t;else if(e)throw TypeError(`Unsupported type of data (`+ST(e)+`)`);else this._data=[],this._size=[0],this._datatype=t}r.prototype=new t,r.prototype.createDenseMatrix=function(e,t){return new r(e,t)},Object.defineProperty(r,`name`,{value:`DenseMatrix`}),r.prototype.constructor=r,r.prototype.type=`DenseMatrix`,r.prototype.isDenseMatrix=!0,r.prototype.getDataType=function(){return wk(this._data,ST)},r.prototype.storage=function(){return`dense`},r.prototype.datatype=function(){return this._datatype},r.prototype.create=function(e,t){return new r(e,t)},r.prototype.subset=function(e,t,n){switch(arguments.length){case 1:return i(this,e);case 2:case 3:return o(this,e,t,n);default:throw SyntaxError(`Wrong number of arguments`)}},r.prototype.get=function(e){return jk(this._data,e)},r.prototype.set=function(e,t,n){if(!Vw(e))throw TypeError(`Array expected`);if(e.length<this._size.length)throw new QO(e.length,this._size.length,`<`);var r,i,a,o=e.map(function(e){return e+1});l(this,o,n);var s=this._data;for(r=0,i=e.length-1;r<i;r++)a=e[r],ik(a,s.length),s=s[a];return a=e[e.length-1],ik(a,s.length),s[a]=t,this};function i(e,t){if(!qw(t))throw TypeError(`Invalid index`);if(n.legacySubset?t.size().every(e=>e===1):t.isScalar())return e.get(t.min());var i=t.size();if(i.length!==e._size.length)throw new QO(i.length,e._size.length);for(var o=t.min(),s=t.max(),c=0,l=e._size.length;c<l;c++)ik(o[c],e._size[c]),ik(s[c],e._size[c]);var u=new r,d=a(e._data,t);return u._size=d.size,u._datatype=e._datatype,u._data=d.data,n.legacySubset?u.reshape(t.size()):u}function a(e,t){var n=t.size().length-1,r=Array(n);return{data:i(e),size:r.filter(e=>e!==null)};function i(e){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=t.dimension(a);function s(e,t){return Pw(e)?t(e):e.map(t).valueOf()}return Pw(o)?r[a]=null:r[a]=o.size()[0],a<n?s(o,t=>(ik(t,e.length),i(e[t],a+1))):s(o,t=>(ik(t,e.length),e[t]))}}function o(e,t,n,r){if(!t||t.isIndex!==!0)throw TypeError(`Invalid index`);var i=t.size(),a=t.isScalar(),o;if(Hw(n)?(o=n.size(),n=n.valueOf()):o=ek(n),a){if(o.length!==0)throw TypeError(`Scalar expected`);e.set(t.min(),n,r)}else{if(!ET(o,i)){if(o.length===0)n=kk([n],i);else try{n=kk(n,i)}catch{}o=ek(n)}if(i.length<e._size.length)throw new QO(i.length,e._size.length,`<`);if(o.length<i.length){for(var c=0,u=0;i[c]===1&&o[c]===1;)c++;for(;i[c]===1;)u++,c++;n=mk(n,i.length,u,o)}if(!ET(i,o))throw new QO(i,o,`>`);l(e,t.max().map(function(e){return e+1}),r),s(e._data,t,n)}return e}function s(e,t,n){var r=t.size().length-1;i(e,n);function i(e,n){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=t.dimension(a),s=(t,r)=>{ik(t,e.length),i(e[t],n[r[0]],a+1)},c=(t,r)=>{ik(t,e.length),e[t]=n[r[0]]};a<r?Pw(o)?s(o,[0]):o.forEach(s):Pw(o)?c(o,[0]):o.forEach(c)}}r.prototype.resize=function(e,t,n){if(!Uw(e))throw TypeError(`Array or Matrix expected`);var r=e.valueOf().map(e=>Array.isArray(e)&&e.length===1?e[0]:e);return c(n?this.clone():this,r,t)};function c(e,t,n){if(t.length===0){for(var r=e._data;Vw(r);)r=r[0];return r}return e._size=t.slice(0),e._data=ok(e._data,e._size,n),e}r.prototype.reshape=function(e,t){var n=t?this.clone():this;return n._data=ck(n._data,e),n._size=lk(e,n._size.reduce((e,t)=>e*t)),n};function l(e,t,n){for(var r=e._size.slice(0),i=!1;r.length<t.length;)r.push(0),i=!0;for(var a=0,o=t.length;a<o;a++)t[a]>r[a]&&(r[a]=t[a],i=!0);i&&c(e,r,n)}r.prototype.clone=function(){return new r({data:CT(this._data),size:CT(this._size),datatype:this._datatype})},r.prototype.size=function(){return this._size.slice(0)},r.prototype.map=function(e){arguments.length>1&&arguments[1]!==void 0&&arguments[1];var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=this,r=n._size.length-1;if(r<0)return n.clone();var i=Fk(e,n,`map`,t),a=i.fn,o=n.create(void 0,n._datatype);if(o._size=n._size,t||i.isUnary)return o._data=f(n._data),o;if(r===0){for(var s=n.valueOf(),c=Array(s.length),l=0;l<s.length;l++)c[l]=a(s[l],[l],n);return o._data=c,o}var u=[];return o._data=d(n._data),o;function d(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=Array(e.length);if(t<r)for(var o=0;o<e.length;o++)u[t]=o,i[o]=d(e[o],t+1);else for(var s=0;s<e.length;s++)u[t]=s,i[s]=a(e[s],u.slice(),n);return i}function f(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=Array(e.length);if(t<r)for(var i=0;i<e.length;i++)n[i]=f(e[i],t+1);else for(var o=0;o<e.length;o++)n[o]=a(e[o]);return n}},r.prototype.forEach=function(e){arguments.length>1&&arguments[1]!==void 0&&arguments[1];var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=this,r=n._size.length-1;if(r<0)return;var i=Fk(e,n,`map`,t),a=i.fn;if(t||i.isUnary){l(n._data);return}if(r===0){for(var o=0;o<n._data.length;o++)a(n._data[o],[o],n);return}var s=[];c(n._data);function c(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(t<r)for(var i=0;i<e.length;i++)s[t]=i,c(e[i],t+1);else for(var o=0;o<e.length;o++)s[t]=o,a(e[o],s.slice(),n)}function l(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(t<r)for(var n=0;n<e.length;n++)l(e[n],t+1);else for(var i=0;i<e.length;i++)a(e[i])}},r.prototype[Symbol.iterator]=function*(){var e=this._size.length-1;if(!(e<0)){if(e===0){for(var t=0;t<this._data.length;t++)yield{value:this._data[t],index:[t]};return}for(var n=Array(e+1).fill(0),r=this._size.reduce((e,t)=>e*t,1),i=0;i<r;i++){for(var a=this._data,o=0;o<e;o++)a=a[n[o]];yield{value:a[n[e]],index:n.slice()};for(var s=e;s>=0&&(n[s]++,!(n[s]<this._size[s]));s--)n[s]=0}}},r.prototype.rows=function(){var e=[];if(this.size().length!==2)throw TypeError(`Rows can only be returned for a 2D matrix.`);for(var t of this._data)e.push(new r([t],this._datatype));return e},r.prototype.columns=function(){var e=this,t=[],n=this.size();if(n.length!==2)throw TypeError(`Rows can only be returned for a 2D matrix.`);for(var i=this._data,a=function(n){var a=i.map(e=>[e[n]]);t.push(new r(a,e._datatype))},o=0;o<n[1];o++)a(o);return t},r.prototype.toArray=function(){return CT(this._data)},r.prototype.valueOf=function(){return this._data},r.prototype.format=function(e){return WO(this._data,e)},r.prototype.toString=function(){return WO(this._data)},r.prototype.toJSON=function(){return{mathjs:`DenseMatrix`,data:this._data,size:this._size,datatype:this._datatype}},r.prototype.diagonal=function(e){if(e){if(Fw(e)&&(e=e.toNumber()),!Pw(e)||!q(e))throw TypeError(`The parameter k must be an integer number`)}else e=0;for(var t=e>0?e:0,n=e<0?-e:0,i=this._size[0],a=this._size[1],o=Math.min(i-n,a-t),s=[],c=0;c<o;c++)s[c]=this._data[c+n][c+t];return new r({data:s,size:[o],datatype:this._datatype})},r.diagonal=function(e,t,n,i){if(!Vw(e))throw TypeError(`Array expected, size parameter`);if(e.length!==2)throw Error(`Only two dimensions matrix are supported`);if(e=e.map(function(e){if(Fw(e)&&(e=e.toNumber()),!Pw(e)||!q(e)||e<1)throw Error(`Size values must be positive integers`);return e}),n){if(Fw(n)&&(n=n.toNumber()),!Pw(n)||!q(n))throw TypeError(`The parameter k must be an integer number`)}else n=0;var a=n>0?n:0,o=n<0?-n:0,s=e[0],c=e[1],l=Math.min(s-o,c-a),u;if(Vw(t)){if(t.length!==l)throw Error(`Invalid value array length`);u=function(e){return t[e]}}else if(Hw(t)){var d=t.size();if(d.length!==1||d[0]!==l)throw Error(`Invalid matrix length`);u=function(e){return t.get([e])}}else u=function(){return t};i||=Fw(u(0))?u(0).mul(0):0;var f=[];if(e.length>0){f=ok(f,e,i);for(var p=0;p<l;p++)f[p+o][p+a]=u(p)}return new r({data:f,size:[s,c]})},r.fromJSON=function(e){return new r(e)},r.prototype.swapRows=function(e,t){if(!Pw(e)||!q(e)||!Pw(t)||!q(t))throw Error(`Row index must be positive integers`);if(this._size.length!==2)throw Error(`Only two dimensional matrix is supported`);return ik(e,this._size[0]),ik(t,this._size[0]),r._swapRows(e,t,this._data),this},r._swapRows=function(e,t,n){var r=n[e];n[e]=n[t],n[t]=r};function u(e){return Hw(e)?u(e.valueOf()):Vw(e)?e.map(u):e}return r},{isClass:!0}),Hk=`clone`,Uk=K(Hk,[`typed`],e=>{var{typed:t}=e;return t(Hk,{any:CT})});function Wk(e){var t=e.length,n=e[0].length,r,i,a=[];for(i=0;i<n;i++){var o=[];for(r=0;r<t;r++)o.push(e[r][i]);a.push(o)}return a}function Gk(e){for(var t=0;t<e.length;t++)if(Uw(e[t]))return!0;return!1}function Kk(e,t){Hw(e)?e.forEach(e=>t(e),!1,!0):Nk(e,t,!0)}function qk(e,t,n){if(!n)return Hw(e)?e.map(e=>t(e),!1,!0):Mk(e,t,!0);var r=e=>e===0?e:t(e);return Hw(e)?e.map(e=>r(e),!1,!0):Mk(e,r,!0)}function Jk(e,t,n){var r=Array.isArray(e)?ek(e):e.size();if(t<0||t>=r.length)throw new $O(t,r.length);return Hw(e)?e.create(Yk(e.valueOf(),t,n),e.datatype()):Yk(e,t,n)}function Yk(e,t,n){var r,i,a,o;if(t<=0)if(Array.isArray(e[0])){for(o=Wk(e),i=[],r=0;r<o.length;r++)i[r]=Yk(o[r],t-1,n);return i}else{for(a=e[0],r=1;r<e.length;r++)a=n(a,e[r]);return a}else{for(i=[],r=0;r<e.length;r++)i[r]=Yk(e[r],t-1,n);return i}}function Xk(e,t,n,r,i,a,o,s,c,l,u){var d=e._values,f=e._index,p=e._ptr,m,h,g,_;if(r)for(h=p[t],g=p[t+1],m=h;m<g;m++)_=f[m],n[_]===a?(r[_]=c?s(d[m],r[_]):s(r[_],d[m]),i[_]=a):(n[_]=a,o.push(_),l?(r[_]=c?s(d[m],u):s(u,d[m]),i[_]=a):r[_]=d[m]);else for(h=p[t],g=p[t+1],m=h;m<g;m++)_=f[m],n[_]===a?i[_]=a:(n[_]=a,o.push(_))}var Zk=`isInteger`,Qk=K(Zk,[`typed`,`equal`],e=>{var{typed:t,equal:n}=e;return t(Zk,{number:e=>Number.isFinite(e)?n(e,Math.round(e)):!1,BigNumber:e=>e.isFinite()?n(e.round(),e):!1,bigint:e=>!0,Fraction:e=>e.d===1n,"Array | Matrix":t.referToSelf(e=>t=>qk(t,e))})}),$k=`number`,eA=`number, number`;function tA(e){return Math.abs(e)}tA.signature=$k;function nA(e,t){return e+t}nA.signature=eA;function rA(e,t){return e-t}rA.signature=eA;function iA(e,t){return e*t}iA.signature=eA;function aA(e,t){return e/t}aA.signature=eA;function oA(e){return-e}oA.signature=$k;function sA(e){return e}sA.signature=$k;function cA(e){return BT(e)}cA.signature=$k;function lA(e){return e*e*e}lA.signature=$k;function uA(e){return Math.exp(e)}uA.signature=$k;function dA(e){return VT(e)}dA.signature=$k;function fA(e,t){if(!q(e)||!q(t))throw Error(`Parameters in function gcd must be integer numbers`);for(var n;t!==0;)n=e%t,e=t,t=n;return e<0?-e:e}fA.signature=eA;function pA(e,t){if(!q(e)||!q(t))throw Error(`Parameters in function lcm must be integer numbers`);if(e===0||t===0)return 0;for(var n,r=e*t;t!==0;)n=t,t=e%n,e=n;return Math.abs(r/e)}pA.signature=eA;function mA(e,t){return t?Math.log(e)/Math.log(t):Math.log(e)}function hA(e){return RT(e)}hA.signature=$k;function gA(e){return LT(e)}gA.signature=$k;function _A(e){return zT(e)}_A.signature=$k;function vA(e,t){return t===0?e:e-t*Math.floor(e/t)}vA.signature=eA;function yA(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2,n=t<0;if(n&&(t=-t),t===0)throw Error(`Root must be non-zero`);if(e<0&&Math.abs(t)%2!=1)throw Error(`Root must be odd when a is negative.`);if(e===0)return n?1/0:0;if(!isFinite(e))return n?0:e;var r=Math.abs(e)**(1/t);return r=e<0?-r:r,n?1/r:r}function bA(e){return IT(e)}bA.signature=$k;function xA(e){return Math.sqrt(e)}xA.signature=$k;function SA(e){return e*e}SA.signature=$k;function CA(e,t){var n,r,i,a=0,o=1,s=1,c=0;if(!q(e)||!q(t))throw Error(`Parameters in function xgcd must be integer numbers`);for(;t;)r=Math.floor(e/t),i=e-r*t,n=a,a=o-r*a,o=n,n=s,s=c-r*s,c=n,e=t,t=i;return e<0?[-e,-o,-c]:[e,e?o:0,c]}CA.signature=eA;function wA(e,t){return e*e<1&&t===1/0||e*e>1&&t===-1/0?0:e**+t}wA.signature=eA;function TA(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(!q(t)||t<0||t>15)throw Error(`Number of decimals in function round must be an integer from 0 to 15 inclusive`);return parseFloat(qT(e,t))}function EA(e){return Math.abs(e)}EA.signature=$k;var DA=`number`,OA=`number, number`;function kA(e,t){if(!q(e)||!q(t))throw Error(`Integers expected in function bitAnd`);return e&t}kA.signature=OA;function AA(e){if(!q(e))throw Error(`Integer expected in function bitNot`);return~e}AA.signature=DA;function jA(e,t){if(!q(e)||!q(t))throw Error(`Integers expected in function bitOr`);return e|t}jA.signature=OA;function MA(e,t){if(!q(e)||!q(t))throw Error(`Integers expected in function bitXor`);return e^t}MA.signature=OA;function NA(e,t){if(!q(e)||!q(t))throw Error(`Integers expected in function leftShift`);return e<<t}NA.signature=OA;function PA(e,t){if(!q(e)||!q(t))throw Error(`Integers expected in function rightArithShift`);return e>>t}PA.signature=OA;function FA(e,t){if(!q(e)||!q(t))throw Error(`Integers expected in function rightLogShift`);return e>>>t}FA.signature=OA;function IA(e,t){if(t<e)return 1;if(t===e)return t;var n=t+e>>1;return IA(e,n)*IA(n+1,t)}function LA(e,t){if(!q(e)||e<0||!q(t)||t<0)throw TypeError(`Positive integer value expected in function combinations`);if(t>e)throw TypeError(`k must be less than or equal to n`);for(var n=e-t,r=1,i=t<n?n+1:t+1,a=2,o=t<n?t:n,s=i;s<=e;++s)for(r*=s;a<=o&&r%a===0;)r/=a,++a;return a<=o&&(r/=IA(a,o)),r}LA.signature=`number, number`;var RA=Math.PI,zA=2*Math.PI,BA=Math.E,VA=1.618033988749895,HA=`number`,UA=`number, number`;function WA(e){return!e}WA.signature=HA;function GA(e,t){return!!(e||t)}GA.signature=UA;function KA(e,t){return!!e!=!!t}KA.signature=UA;function qA(e,t){return!!(e&&t)}qA.signature=UA;function JA(e){var t;if(q(e))return e<=0?Number.isFinite(e)?1/0:NaN:e>171?1/0:IA(1,e-1);if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*JA(1-e));if(e>=171.35)return 1/0;if(e>85){var n=e*e,r=n*e,i=r*e,a=i*e;return Math.sqrt(2*Math.PI/e)*(e/Math.E)**+e*(1+1/(12*e)+1/(288*n)-139/(51840*r)-571/(2488320*i)+163879/(209018880*a)+5246819/(75246796800*a*e))}--e,t=XA[0];for(var o=1;o<XA.length;++o)t+=XA[o]/(e+o);var s=e+YA+.5;return Math.sqrt(2*Math.PI)*s**+(e+.5)*Math.exp(-s)*t}JA.signature=`number`;var YA=4.7421875,XA=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22],ZA=.9189385332046728,QA=[1.000000000190015,76.18009172947146,-86.50532032941678,24.01409824083091,-1.231739572450155,.001208650973866179,-5395239384953e-18];function $A(e){if(e<0)return NaN;if(e===0)return 1/0;if(!Number.isFinite(e))return e;if(e<.5)return Math.log(Math.PI/Math.sin(Math.PI*e))-$A(1-e);--e;for(var t=e+5+.5,n=QA[0],r=6;r>=1;r--)n+=QA[r]/(e+r);return ZA+(e+.5)*Math.log(t)-t+Math.log(n)}$A.signature=`number`;var ej=`number`,tj=`number, number`;function nj(e){return Math.acos(e)}nj.signature=ej;function rj(e){return eE(e)}rj.signature=ej;function ij(e){return Math.atan(1/e)}ij.signature=ej;function aj(e){return Number.isFinite(e)?(Math.log((e+1)/e)+Math.log(e/(e-1)))/2:0}aj.signature=ej;function oj(e){return Math.asin(1/e)}oj.signature=ej;function sj(e){var t=1/e;return Math.log(t+Math.sqrt(t*t+1))}sj.signature=ej;function cj(e){return Math.acos(1/e)}cj.signature=ej;function lj(e){var t=1/e,n=Math.sqrt(t*t-1);return Math.log(n+t)}lj.signature=ej;function uj(e){return Math.asin(e)}uj.signature=ej;function dj(e){return tE(e)}dj.signature=ej;function fj(e){return Math.atan(e)}fj.signature=ej;function pj(e,t){return Math.atan2(e,t)}pj.signature=tj;function mj(e){return nE(e)}mj.signature=ej;function hj(e){return Math.cos(e)}hj.signature=ej;function gj(e){return rE(e)}gj.signature=ej;function _j(e){return 1/Math.tan(e)}_j.signature=ej;function vj(e){var t=Math.exp(2*e);return(t+1)/(t-1)}vj.signature=ej;function yj(e){return 1/Math.sin(e)}yj.signature=ej;function bj(e){return e===0?1/0:Math.abs(2/(Math.exp(e)-Math.exp(-e)))*IT(e)}bj.signature=ej;function xj(e){return 1/Math.cos(e)}xj.signature=ej;function Sj(e){return 2/(Math.exp(e)+Math.exp(-e))}Sj.signature=ej;function Cj(e){return Math.sin(e)}Cj.signature=ej;function wj(e){return iE(e)}wj.signature=ej;function Tj(e){return Math.tan(e)}Tj.signature=ej;function Ej(e){return aE(e)}Ej.signature=ej;var Dj=`number`;function Oj(e){return q(e)}Oj.signature=Dj;function kj(e){return e<0}kj.signature=Dj;function Aj(e){return e>0}Aj.signature=Dj;function jj(e){return e===0}jj.signature=Dj;function Mj(e){return Number.isNaN(e)}Mj.signature=Dj;function Nj(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1e-9,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;if(n<=0)throw Error(`Relative tolerance must be greater than 0`);if(r<0)throw Error(`Absolute tolerance must be at least 0`);return e.isNaN()||t.isNaN()?!1:!e.isFinite()||!t.isFinite()?e.eq(t):e.eq(t)?!0:e.minus(t).abs().lte(e.constructor.max(e.constructor.max(e.abs(),t.abs()).mul(n),r))}var Pj=`isNegative`,Fj=K(Pj,[`typed`,`config`],e=>{var{typed:t,config:n}=e;return t(Pj,{number:e=>$T(e,0,n.relTol,n.absTol)?!1:kj(e),BigNumber:e=>Nj(e,new e.constructor(0),n.relTol,n.absTol)?!1:e.isNeg()&&!e.isZero()&&!e.isNaN(),bigint:e=>e<0n,Fraction:e=>e.s<0n,Unit:t.referToSelf(e=>n=>t.find(e,n.valueType())(n.value)),"Array | Matrix":t.referToSelf(e=>t=>qk(t,e))})}),Ij=`isNumeric`,Lj=K(Ij,[`typed`],e=>{var{typed:t}=e;return t(Ij,{"number | BigNumber | bigint | Fraction | boolean":()=>!0,"Complex | Unit | string | null | undefined | Node":()=>!1,"Array | Matrix":t.referToSelf(e=>t=>qk(t,e))})}),Rj=`hasNumericValue`,zj=K(Rj,[`typed`,`isNumeric`],e=>{var{typed:t,isNumeric:n}=e;return t(Rj,{boolean:()=>!0,string:function(e){return e.trim().length>0&&!isNaN(Number(e))},any:function(e){return n(e)}})}),Bj=`isPositive`,Vj=K(Bj,[`typed`,`config`],e=>{var{typed:t,config:n}=e;return t(Bj,{number:e=>$T(e,0,n.relTol,n.absTol)?!1:Aj(e),BigNumber:e=>Nj(e,new e.constructor(0),n.relTol,n.absTol)?!1:!e.isNeg()&&!e.isZero()&&!e.isNaN(),bigint:e=>e>0n,Fraction:e=>e.s>0n&&e.n>0n,Unit:t.referToSelf(e=>n=>t.find(e,n.valueType())(n.value)),"Array | Matrix":t.referToSelf(e=>t=>qk(t,e))})}),Hj=`isZero`,Uj=K(Hj,[`typed`,`equalScalar`],e=>{var{typed:t,equalScalar:n}=e;return t(Hj,{"number | BigNumber | Complex | Fraction":e=>n(e,0),bigint:e=>e===0n,Unit:t.referToSelf(e=>n=>t.find(e,n.valueType())(n.value)),"Array | Matrix":t.referToSelf(e=>t=>qk(t,e))})}),Wj=`isNaN`,Gj=K(Wj,[`typed`],e=>{var{typed:t}=e;return t(Wj,{number:Mj,BigNumber:function(e){return e.isNaN()},bigint:function(e){return!1},Fraction:function(e){return!1},Complex:function(e){return e.isNaN()},Unit:function(e){return Number.isNaN(e.value)},"Array | Matrix":t.referToSelf(e=>t=>qk(t,e))})}),Kj=`isBounded`,qj=K(Kj,[`typed`],e=>{var{typed:t}=e;return t(Kj,{number:e=>Number.isFinite(e),"BigNumber | Complex":e=>e.isFinite(),"bigint | Fraction":()=>!0,"null | undefined":()=>!1,Unit:t.referToSelf(e=>t=>e(t.value)),"Array | Matrix":t.referToSelf(e=>t=>(Array.isArray(t)||(t=t.valueOf()),t.every(t=>e(t))))})}),Jj=`isFinite`,Yj=K(Jj,[`typed`,`isBounded`,`map`],e=>{var{typed:t,isBounded:n,map:r}=e;return t(Jj,{"Array | Matrix":e=>r(e,n),any:e=>n(e)})}),Xj=`typeOf`,Zj=K(Xj,[`typed`],e=>{var{typed:t}=e;return t(Xj,{any:ST})});function Qj(e,t,n,r){return $T(e.re,t.re,n,r)&&$T(e.im,t.im,n,r)}var $j=K(`compareUnits`,[`typed`],e=>{var{typed:t}=e;return{"Unit, Unit":t.referToSelf(e=>(n,r)=>{if(!n.equalBase(r))throw Error(`Cannot compare units with different base`);return t.find(e,[n.valueType(),r.valueType()])(n.value,r.value)})}}),eM=`equalScalar`,tM=K(eM,[`typed`,`config`],e=>{var{typed:t,config:n}=e,r=$j({typed:t});return t(eM,{"boolean, boolean":function(e,t){return e===t},"number, number":function(e,t){return $T(e,t,n.relTol,n.absTol)},"BigNumber, BigNumber":function(e,t){return e.eq(t)||Nj(e,t,n.relTol,n.absTol)},"bigint, bigint":function(e,t){return e===t},"Fraction, Fraction":function(e,t){return e.equals(t)},"Complex, Complex":function(e,t){return Qj(e,t,n.relTol,n.absTol)}},r)});K(eM,[`typed`,`config`],e=>{var{typed:t,config:n}=e;return t(eM,{"number, number":function(e,t){return $T(e,t,n.relTol,n.absTol)}})});var nM=K(`SparseMatrix`,[`typed`,`equalScalar`,`Matrix`],e=>{var{typed:t,equalScalar:n,Matrix:r}=e;function i(e,t){if(!(this instanceof i))throw SyntaxError(`Constructor must be called with the new operator`);if(t&&!Bw(t))throw Error(`Invalid datatype: `+t);if(Hw(e))a(this,e,t);else if(e&&Vw(e.index)&&Vw(e.ptr)&&Vw(e.size))this._values=e.values,this._index=e.index,this._ptr=e.ptr,this._size=e.size,this._datatype=t||e.datatype;else if(Vw(e))o(this,e,t);else if(e)throw TypeError(`Unsupported type of data (`+ST(e)+`)`);else this._values=[],this._index=[],this._ptr=[0],this._size=[0,0],this._datatype=t}function a(e,t,n){t.type===`SparseMatrix`?(e._values=t._values?CT(t._values):void 0,e._index=CT(t._index),e._ptr=CT(t._ptr),e._size=CT(t._size),e._datatype=n||t._datatype):o(e,t.valueOf(),n||t._datatype)}function o(e,r,i){e._values=[],e._index=[],e._ptr=[],e._datatype=i;var a=r.length,o=0,s=n,c=0;if(Bw(i)&&(s=t.find(n,[i,i])||n,c=t.convert(0,i)),a>0){var l=0;do{e._ptr.push(e._index.length);for(var u=0;u<a;u++){var d=r[u];if(Vw(d)){if(l===0&&o<d.length&&(o=d.length),l<d.length){var f=d[l];s(f,c)||(e._values.push(f),e._index.push(u))}}else l===0&&o<1&&(o=1),s(d,c)||(e._values.push(d),e._index.push(u))}l++}while(l<o)}for(;e._ptr.length<=o;)e._ptr.push(e._index.length);e._size=[a,o]}i.prototype=new r,i.prototype.createSparseMatrix=function(e,t){return new i(e,t)},Object.defineProperty(i,`name`,{value:`SparseMatrix`}),i.prototype.constructor=i,i.prototype.type=`SparseMatrix`,i.prototype.isSparseMatrix=!0,i.prototype.getDataType=function(){return wk(this._values,ST)},i.prototype.storage=function(){return`sparse`},i.prototype.datatype=function(){return this._datatype},i.prototype.create=function(e,t){return new i(e,t)},i.prototype.density=function(){var e=this._size[0],t=this._size[1];return e!==0&&t!==0?this._index.length/(e*t):0},i.prototype.subset=function(e,t,n){if(!this._values)throw Error(`Cannot invoke subset on a Pattern only matrix`);switch(arguments.length){case 1:return s(this,e);case 2:case 3:return c(this,e,t,n);default:throw SyntaxError(`Wrong number of arguments`)}};function s(e,t){if(!qw(t))throw TypeError(`Invalid index`);if(t.isScalar())return e.get(t.min());var n=t.size();if(n.length!==e._size.length)throw new QO(n.length,e._size.length);var r,a,o,s,c=t.min(),l=t.max();for(r=0,a=e._size.length;r<a;r++)ik(c[r],e._size[r]),ik(l[r],e._size[r]);var u=e._values,d=e._index,f=e._ptr,p=t.dimension(0),m=t.dimension(1),h=[],g=[];function _(e,t){g[e]=t[0],h[e]=!0}Number.isInteger(p)?_(p,[0]):p.forEach(_);var v=u?[]:void 0,y=[],b=[];function x(e){for(b.push(y.length),o=f[e],s=f[e+1];o<s;o++)r=d[o],h[r]===!0&&(y.push(g[r]),v&&v.push(u[o]))}return Number.isInteger(m)?x(m):m.forEach(x),b.push(y.length),new i({values:v,index:y,ptr:b,size:n,datatype:e._datatype})}function c(e,t,n,r){if(!t||t.isIndex!==!0)throw TypeError(`Invalid index`);var i=t.size(),a=t.isScalar(),o;if(Hw(n)?(o=n.size(),n=n.toArray()):o=ek(n),a){if(o.length!==0)throw TypeError(`Scalar expected`);e.set(t.min(),n,r)}else{if(i.length!==1&&i.length!==2)throw new QO(i.length,e._size.length,`<`);if(o.length<i.length){for(var s=0,c=0;i[s]===1&&o[s]===1;)s++;for(;i[s]===1;)c++,s++;n=mk(n,i.length,c,o)}if(!ET(i,o))throw new QO(i,o,`>`);if(i.length===1)d(t.dimension(0),(t,i)=>{ik(t),e.set([t,0],n[i[0]],r)});else{var l=t.dimension(0),u=t.dimension(1);d(l,(t,i)=>{ik(t),d(u,(a,o)=>{ik(a),e.set([t,a],n[i[0]][o[0]],r)})})}}return e;function d(e,t){Pw(e)?t(e,[0]):e.forEach(t)}}i.prototype.get=function(e){if(!Vw(e))throw TypeError(`Array expected`);if(e.length!==this._size.length)throw new QO(e.length,this._size.length);if(!this._values)throw Error(`Cannot invoke get on a Pattern only matrix`);var t=e[0],n=e[1];ik(t,this._size[0]),ik(n,this._size[1]);var r=l(t,this._ptr[n],this._ptr[n+1],this._index);return r<this._ptr[n+1]&&this._index[r]===t?this._values[r]:0},i.prototype.set=function(e,r,i){if(!Vw(e))throw TypeError(`Array expected`);if(e.length!==this._size.length)throw new QO(e.length,this._size.length);if(!this._values)throw Error(`Cannot invoke set on a Pattern only matrix`);var a=e[0],o=e[1],s=this._size[0],c=this._size[1],p=n,m=0;Bw(this._datatype)&&(p=t.find(n,[this._datatype,this._datatype])||n,m=t.convert(0,this._datatype)),(a>s-1||o>c-1)&&(f(this,Math.max(a+1,s),Math.max(o+1,c),i),s=this._size[0],c=this._size[1]),ik(a,s),ik(o,c);var h=l(a,this._ptr[o],this._ptr[o+1],this._index);return h<this._ptr[o+1]&&this._index[h]===a?p(r,m)?u(h,o,this._values,this._index,this._ptr):this._values[h]=r:p(r,m)||d(h,a,o,r,this._values,this._index,this._ptr),this};function l(e,t,n,r){if(n-t===0)return n;for(var i=t;i<n;i++)if(r[i]===e)return i;return t}function u(e,t,n,r,i){n.splice(e,1),r.splice(e,1);for(var a=t+1;a<i.length;a++)i[a]--}function d(e,t,n,r,i,a,o){i.splice(e,0,r),a.splice(e,0,t);for(var s=n+1;s<o.length;s++)o[s]++}i.prototype.resize=function(e,t,n){if(!Uw(e))throw TypeError(`Array or Matrix expected`);var r=e.valueOf().map(e=>Array.isArray(e)&&e.length===1?e[0]:e);if(r.length!==2)throw Error(`Only two dimensions matrix are supported`);return r.forEach(function(e){if(!Pw(e)||!q(e)||e<0)throw TypeError(`Invalid size, must contain positive integers (size: `+WO(r)+`)`)}),f(n?this.clone():this,r[0],r[1],t)};function f(e,r,i,a){var o=a||0,s=n,c=0;Bw(e._datatype)&&(s=t.find(n,[e._datatype,e._datatype])||n,c=t.convert(0,e._datatype),o=t.convert(o,e._datatype));var l=!s(o,c),u=e._size[0],d=e._size[1],f,p,m;if(i>d){for(p=d;p<i;p++)if(e._ptr[p]=e._values.length,l)for(f=0;f<u;f++)e._values.push(o),e._index.push(f);e._ptr[i]=e._values.length}else i<d&&(e._ptr.splice(i+1,d-i),e._values.splice(e._ptr[i],e._values.length),e._index.splice(e._ptr[i],e._index.length));if(d=i,r>u){if(l){var h=0;for(p=0;p<d;p++){e._ptr[p]=e._ptr[p]+h,m=e._ptr[p+1]+h;var g=0;for(f=u;f<r;f++,g++)e._values.splice(m+g,0,o),e._index.splice(m+g,0,f),h++}e._ptr[d]=e._values.length}}else if(r<u){var _=0;for(p=0;p<d;p++){e._ptr[p]=e._ptr[p]-_;var v=e._ptr[p],y=e._ptr[p+1]-_;for(m=v;m<y;m++)f=e._index[m],f>r-1&&(e._values.splice(m,1),e._index.splice(m,1),_++)}e._ptr[p]=e._values.length}return e._size[0]=r,e._size[1]=i,e}i.prototype.reshape=function(e,t){if(!Vw(e))throw TypeError(`Array expected`);if(e.length!==2)throw Error(`Sparse matrices can only be reshaped in two dimensions`);e.forEach(function(t){if(!Pw(t)||!q(t)||t<=-2||t===0)throw TypeError(`Invalid size, must contain positive integers or -1 (size: `+WO(e)+`)`)});var n=this._size[0]*this._size[1];if(e=lk(e,n),n!==e[0]*e[1])throw Error(`Reshaping sparse matrix will result in the wrong number of elements`);var r=t?this.clone():this;if(this._size[0]===e[0]&&this._size[1]===e[1])return r;for(var i=[],a=0;a<r._ptr.length;a++)for(var o=0;o<r._ptr[a+1]-r._ptr[a];o++)i.push(a);for(var s=r._values.slice(),c=r._index.slice(),u=0;u<r._index.length;u++){var f=c[u],p=i[u],m=f*r._size[1]+p;i[u]=m%e[1],c[u]=Math.floor(m/e[1])}r._values.length=0,r._index.length=0,r._ptr.length=e[1]+1,r._size=e.slice();for(var h=0;h<r._ptr.length;h++)r._ptr[h]=0;for(var g=0;g<s.length;g++){var _=c[g],v=i[g],y=s[g];d(l(_,r._ptr[v],r._ptr[v+1],r._index),_,v,y,r._values,r._index,r._ptr)}return r},i.prototype.clone=function(){return new i({values:this._values?CT(this._values):void 0,index:CT(this._index),ptr:CT(this._ptr),size:CT(this._size),datatype:this._datatype})},i.prototype.size=function(){return this._size.slice(0)},i.prototype.map=function(e,t){if(!this._values)throw Error(`Cannot invoke map on a Pattern only matrix`);var n=this,r=this._size[0],i=this._size[1],a=Fk(e,n,`map`);return p(this,0,r-1,0,i-1,function(e,t,r){return a.fn(e,[t,r],n)},t)};function p(e,r,a,o,s,c,l){var u=[],d=[],f=[],p=n,m=0;Bw(e._datatype)&&(p=t.find(n,[e._datatype,e._datatype])||n,m=t.convert(0,e._datatype));for(var h=function(e,t,n){var r=c(e,t,n);p(r,m)||(u.push(r),d.push(t))},g=o;g<=s;g++){f.push(u.length);var _=e._ptr[g],v=e._ptr[g+1];if(l)for(var y=_;y<v;y++){var b=e._index[y];b>=r&&b<=a&&h(e._values[y],b-r,g-o)}else{for(var x={},S=_;S<v;S++){var C=e._index[S];x[C]=e._values[S]}for(var w=r;w<=a;w++)h(w in x?x[w]:0,w-r,g-o)}}return f.push(u.length),new i({values:u,index:d,ptr:f,size:[a-r+1,s-o+1]})}i.prototype.forEach=function(e,t){if(!this._values)throw Error(`Cannot invoke forEach on a Pattern only matrix`);for(var n=this,r=this._size[0],i=this._size[1],a=Fk(e,n,`forEach`),o=0;o<i;o++){var s=this._ptr[o],c=this._ptr[o+1];if(t)for(var l=s;l<c;l++){var u=this._index[l];a.fn(this._values[l],[u,o],n)}else{for(var d={},f=s;f<c;f++){var p=this._index[f];d[p]=this._values[f]}for(var m=0;m<r;m++){var h=m in d?d[m]:0;a.fn(h,[m,o],n)}}}},i.prototype[Symbol.iterator]=function*(){if(!this._values)throw Error(`Cannot iterate a Pattern only matrix`);for(var e=this._size[1],t=0;t<e;t++)for(var n=this._ptr[t],r=this._ptr[t+1],i=n;i<r;i++){var a=this._index[i];yield{value:this._values[i],index:[a,t]}}},i.prototype.toArray=function(){return m(this._values,this._index,this._ptr,this._size,!0)},i.prototype.valueOf=function(){return m(this._values,this._index,this._ptr,this._size,!1)};function m(e,t,n,r,i){var a=r[0],o=r[1],s=[],c,l;for(c=0;c<a;c++)for(s[c]=[],l=0;l<o;l++)s[c][l]=0;for(l=0;l<o;l++)for(var u=n[l],d=n[l+1],f=u;f<d;f++)c=t[f],s[c][l]=e?i?CT(e[f]):e[f]:1;return s}return i.prototype.format=function(e){for(var t=this._size[0],n=this._size[1],r=this.density(),i=`Sparse Matrix [`+WO(t,e)+` x `+WO(n,e)+`] density: `+WO(r,e)+`
29
+ `,a=0;a<n;a++)for(var o=this._ptr[a],s=this._ptr[a+1],c=o;c<s;c++){var l=this._index[c];i+=`
30
+ (`+WO(l,e)+`, `+WO(a,e)+`) ==> `+(this._values?WO(this._values[c],e):`X`)}return i},i.prototype.toString=function(){return WO(this.toArray())},i.prototype.toJSON=function(){return{mathjs:`SparseMatrix`,values:this._values,index:this._index,ptr:this._ptr,size:this._size,datatype:this._datatype}},i.prototype.diagonal=function(e){if(e){if(Fw(e)&&(e=e.toNumber()),!Pw(e)||!q(e))throw TypeError(`The parameter k must be an integer number`)}else e=0;var t=e>0?e:0,n=e<0?-e:0,r=this._size[0],a=this._size[1],o=Math.min(r-n,a-t),s=[],c=[],l=[];l[0]=0;for(var u=t;u<a&&s.length<o;u++)for(var d=this._ptr[u],f=this._ptr[u+1],p=d;p<f;p++){var m=this._index[p];if(m===u-t+n){s.push(this._values[p]),c[s.length-1]=m-n;break}}return l.push(s.length),new i({values:s,index:c,ptr:l,size:[o,1]})},i.fromJSON=function(e){return new i(e)},i.diagonal=function(e,r,a,o,s){if(!Vw(e))throw TypeError(`Array expected, size parameter`);if(e.length!==2)throw Error(`Only two dimensions matrix are supported`);if(e=e.map(function(e){if(Fw(e)&&(e=e.toNumber()),!Pw(e)||!q(e)||e<1)throw Error(`Size values must be positive integers`);return e}),a){if(Fw(a)&&(a=a.toNumber()),!Pw(a)||!q(a))throw TypeError(`The parameter k must be an integer number`)}else a=0;var c=n,l=0;Bw(s)&&(c=t.find(n,[s,s])||n,l=t.convert(0,s));var u=a>0?a:0,d=a<0?-a:0,f=e[0],p=e[1],m=Math.min(f-d,p-u),h;if(Vw(r)){if(r.length!==m)throw Error(`Invalid value array length`);h=function(e){return r[e]}}else if(Hw(r)){var g=r.size();if(g.length!==1||g[0]!==m)throw Error(`Invalid matrix length`);h=function(e){return r.get([e])}}else h=function(){return r};for(var _=[],v=[],y=[],b=0;b<p;b++){y.push(_.length);var x=b-u;if(x>=0&&x<m){var S=h(x);c(S,l)||(v.push(x+d),_.push(S))}}return y.push(_.length),new i({values:_,index:v,ptr:y,size:[f,p]})},i.prototype.swapRows=function(e,t){if(!Pw(e)||!q(e)||!Pw(t)||!q(t))throw Error(`Row index must be positive integers`);if(this._size.length!==2)throw Error(`Only two dimensional matrix is supported`);return ik(e,this._size[0]),ik(t,this._size[0]),i._swapRows(e,t,this._size[1],this._values,this._index,this._ptr),this},i._forEachRow=function(e,t,n,r,i){for(var a=r[e],o=r[e+1],s=a;s<o;s++)i(n[s],t[s])},i._swapRows=function(e,t,n,r,i,a){for(var o=0;o<n;o++){var s=a[o],c=a[o+1],u=l(e,s,c,i),d=l(t,s,c,i);if(u<c&&d<c&&i[u]===e&&i[d]===t){if(r){var f=r[u];r[u]=r[d],r[d]=f}continue}if(u<c&&i[u]===e&&(d>=c||i[d]!==t)){var p=r?r[u]:void 0;i.splice(d,0,t),r&&r.splice(d,0,p),i.splice(d<=u?u+1:u,1),r&&r.splice(d<=u?u+1:u,1);continue}if(d<c&&i[d]===t&&(u>=c||i[u]!==e)){var m=r?r[d]:void 0;i.splice(u,0,e),r&&r.splice(u,0,m),i.splice(u<=d?d+1:d,1),r&&r.splice(u<=d?d+1:d,1)}}},i},{isClass:!0}),rM=`number`,iM=[`typed`];function aM(e){var t=e.match(/(0[box])([0-9a-fA-F]*)\.([0-9a-fA-F]*)/);return t?{input:e,radix:{"0b":2,"0o":8,"0x":16}[t[1]],integerPart:t[2],fractionalPart:t[3]}:null}function oM(e){for(var t=parseInt(e.integerPart,e.radix),n=0,r=0;r<e.fractionalPart.length;r++){var i=parseInt(e.fractionalPart[r],e.radix);n+=i/e.radix**+(r+1)}var a=t+n;if(isNaN(a))throw SyntaxError(`String "`+e.input+`" is not a valid number`);return a}var sM=K(rM,iM,e=>{var{typed:t}=e,n=t(`number`,{"":function(){return 0},number:function(e){return e},string:function(e){if(e===`NaN`)return NaN;var t=aM(e);if(t)return oM(t);var n=0,r=e.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);r&&(n=Number(r[2]),e=r[1]);var i=Number(e);if(isNaN(i))throw SyntaxError(`String "`+e+`" is not a valid number`);if(r){if(i>2**n-1)throw SyntaxError(`String "${e}" is out of range`);i>=2**(n-1)&&(i-=2**n)}return i},BigNumber:function(e){return e.toNumber()},bigint:function(e){return Number(e)},Fraction:function(e){return e.valueOf()},Unit:t.referToSelf(e=>t=>{var n=t.clone();return n.value=e(t.value),n}),null:function(e){return 0},"Unit, string | Unit":function(e,t){return e.toNumber(t)},"Array | Matrix":t.referToSelf(e=>t=>qk(t,e))});return n.fromJSON=function(e){return parseFloat(e.value)},n}),cM=K(`bigint`,[`typed`],e=>{var{typed:t}=e,n=t(`bigint`,{"":function(){return 0n},bigint:function(e){return e},number:function(e){return BigInt(e.toFixed())},BigNumber:function(e){return BigInt(e.round().toString())},Fraction:function(e){return BigInt(e.valueOf().toFixed())},"string | boolean":function(e){return BigInt(e)},null:function(e){return 0n},"Array | Matrix":t.referToSelf(e=>t=>qk(t,e))});return n.fromJSON=function(e){return BigInt(e.value)},n}),lM=`string`,uM=K(lM,[`typed`],e=>{var{typed:t}=e;return t(lM,{"":function(){return``},number:UT,null:function(e){return`null`},boolean:function(e){return e+``},string:function(e){return e},"Array | Matrix":t.referToSelf(e=>t=>qk(t,e)),any:function(e){return String(e)}})}),dM=`boolean`,fM=K(dM,[`typed`],e=>{var{typed:t}=e;return t(dM,{"":function(){return!1},boolean:function(e){return e},number:function(e){return!!e},null:function(e){return!1},BigNumber:function(e){return!e.isZero()},string:function(e){var t=e.toLowerCase();if(t===`true`)return!0;if(t===`false`)return!1;var n=Number(e);if(e!==``&&!isNaN(n))return!!n;throw Error(`Cannot convert "`+e+`" to a boolean`)},"Array | Matrix":t.referToSelf(e=>t=>qk(t,e))})}),pM=K(`bignumber`,[`typed`,`BigNumber`],e=>{var{typed:t,BigNumber:n}=e;return t(`bignumber`,{"":function(){return new n(0)},number:function(e){return new n(e+``)},string:function(e){var t=e.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);if(t){var r=t[2],i=n(t[1]),a=new n(2).pow(Number(r));if(i.gt(a.sub(1)))throw SyntaxError(`String "${e}" is out of range`);var o=new n(2).pow(Number(r)-1);return i.gte(o)?i.sub(a):i}return new n(e)},BigNumber:function(e){return e},bigint:function(e){return new n(e.toString())},Unit:t.referToSelf(e=>t=>{var n=t.clone();return n.value=e(t.value),n}),Fraction:function(e){return new n(String(e.n)).div(String(e.d)).times(String(e.s))},null:function(e){return new n(0)},"Array | Matrix":t.referToSelf(e=>t=>qk(t,e))})}),mM=K(`complex`,[`typed`,`Complex`],e=>{var{typed:t,Complex:n}=e;return t(`complex`,{"":function(){return n.ZERO},number:function(e){return new n(e,0)},"number, number":function(e,t){return new n(e,t)},"BigNumber, BigNumber":function(e,t){return new n(e.toNumber(),t.toNumber())},Fraction:function(e){return new n(e.valueOf(),0)},Complex:function(e){return e.clone()},string:function(e){return n(e)},null:function(e){return n(0)},Object:function(e){if(`re`in e&&`im`in e)return new n(e.re,e.im);if(`r`in e&&`phi`in e||`abs`in e&&`arg`in e)return new n(e);throw Error(`Expected object with properties (re and im) or (r and phi) or (abs and arg)`)},"Array | Matrix":t.referToSelf(e=>t=>qk(t,e))})}),hM=K(`fraction`,[`typed`,`Fraction`],e=>{var{typed:t,Fraction:n}=e;return t(`fraction`,{number:function(e){if(!Number.isFinite(e)||isNaN(e))throw Error(e+` cannot be represented as a fraction`);return new n(e)},string:function(e){return new n(e)},"number, number":function(e,t){return new n(e,t)},"bigint, bigint":function(e,t){return new n(e,t)},null:function(e){return new n(0)},BigNumber:function(e){return new n(e.toString())},bigint:function(e){return new n(e.toString())},Fraction:function(e){return e},Unit:t.referToSelf(e=>t=>{var n=t.clone();return n.value=e(t.value),n}),Object:function(e){return new n(e)},"Array | Matrix":t.referToSelf(e=>t=>qk(t,e))})}),gM=`matrix`,_M=K(gM,[`typed`,`Matrix`,`DenseMatrix`,`SparseMatrix`],e=>{var{typed:t,Matrix:n,DenseMatrix:r,SparseMatrix:i}=e;return t(gM,{"":function(){return a([])},string:function(e){return a([],e)},"string, string":function(e,t){return a([],e,t)},Array:function(e){return a(e)},Matrix:function(e){return a(e,e.storage())},"Array | Matrix, string":a,"Array | Matrix, string, string":a});function a(e,t,n){if(t===`dense`||t===`default`||t===void 0)return new r(e,n);if(t===`sparse`)return new i(e,n);throw TypeError(`Unknown matrix type `+JSON.stringify(t)+`.`)}}),vM=`matrixFromFunction`,yM=K(vM,[`typed`,`matrix`,`isZero`],e=>{var{typed:t,matrix:n,isZero:r}=e;return t(vM,{"Array | Matrix, function, string, string":function(e,t,n,r){return i(e,t,n,r)},"Array | Matrix, function, string":function(e,t,n){return i(e,t,n)},"Matrix, function":function(e,t){return i(e,t,`dense`)},"Array, function":function(e,t){return i(e,t,`dense`).toArray()},"Array | Matrix, string, function":function(e,t,n){return i(e,n,t)},"Array | Matrix, string, string, function":function(e,t,n,r){return i(e,r,t,n)}});function i(e,t,i,a){var o=a===void 0?n(i):n(i,a);return o.resize(e),o.forEach(function(e,n){var i=t(n);r(i)||o.set(n,i)}),o}}),bM=`matrixFromRows`,xM=K(bM,[`typed`,`matrix`,`flatten`,`size`],e=>{var{typed:t,matrix:n,flatten:r,size:i}=e;return t(bM,{"...Array":function(e){return a(e)},"...Matrix":function(e){return n(a(e.map(e=>e.toArray())))}});function a(e){if(e.length===0)throw TypeError(`At least one row is needed to construct a matrix.`);var t=o(e[0]),n=[];for(var i of e){var a=o(i);if(a!==t)throw TypeError(`The vectors had different length: `+(t|0)+` ≠ `+(a|0));n.push(r(i))}return n}function o(e){var t=i(e);if(t.length===1)return t[0];if(t.length===2){if(t[0]===1)return t[1];if(t[1]===1)return t[0];throw TypeError(`At least one of the arguments is not a vector.`)}else throw TypeError(`Only one- or two-dimensional vectors are supported.`)}}),SM=`matrixFromColumns`,CM=K(SM,[`typed`,`matrix`,`flatten`,`size`],e=>{var{typed:t,matrix:n,flatten:r,size:i}=e;return t(SM,{"...Array":function(e){return a(e)},"...Matrix":function(e){return n(a(e.map(e=>e.toArray())))}});function a(e){if(e.length===0)throw TypeError(`At least one column is needed to construct a matrix.`);for(var t=o(e[0]),n=[],i=0;i<t;i++)n[i]=[];for(var a of e){var s=o(a);if(s!==t)throw TypeError(`The vectors had different length: `+(t|0)+` ≠ `+(s|0));for(var c=r(a),l=0;l<t;l++)n[l].push(c[l])}return n}function o(e){var t=i(e);if(t.length===1)return t[0];if(t.length===2){if(t[0]===1)return t[1];if(t[1]===1)return t[0];throw TypeError(`At least one of the arguments is not a vector.`)}else throw TypeError(`Only one- or two-dimensional vectors are supported.`)}}),wM=`splitUnit`,TM=K(wM,[`typed`],e=>{var{typed:t}=e;return t(wM,{"Unit, Array":function(e,t){return e.splitUnit(t)}})}),EM=`unaryMinus`,DM=K(EM,[`typed`],e=>{var{typed:t}=e;return t(EM,{number:oA,"Complex | BigNumber | Fraction":e=>e.neg(),bigint:e=>-e,Unit:t.referToSelf(e=>n=>{var r=n.clone();return r.value=t.find(e,r.valueType())(n.value),r}),"Array | Matrix":t.referToSelf(e=>t=>qk(t,e,!0))})}),OM=`unaryPlus`,kM=K(OM,[`typed`,`config`,`numeric`],e=>{var{typed:t,config:n,numeric:r}=e;return t(OM,{number:sA,Complex:function(e){return e},BigNumber:function(e){return e},bigint:function(e){return e},Fraction:function(e){return e},Unit:function(e){return e.clone()},"Array | Matrix":t.referToSelf(e=>t=>qk(t,e,!0)),boolean:function(e){return r(e?1:0,n.number)},string:function(e){return r(e,FT(e,n))}})}),AM=`abs`,jM=K(AM,[`typed`],e=>{var{typed:t}=e;return t(AM,{number:tA,"Complex | BigNumber | Fraction | Unit":e=>e.abs(),bigint:e=>e<0n?-e:e,"Array | Matrix":t.referToSelf(e=>t=>qk(t,e,!0))})}),MM=`mapSlices`,NM=K(MM,[`typed`,`isInteger`],e=>{var{typed:t,isInteger:n}=e;return t(MM,{"Array | Matrix, number | BigNumber, function":function(e,t,r){if(!n(t))throw TypeError(`Integer number expected for dimension`);var i=Array.isArray(e)?ek(e):e.size();if(t<0||t>=i.length)throw new $O(t,i.length);return Hw(e)?e.create(PM(e.valueOf(),t,r),e.datatype()):PM(e,t,r)}})},{formerly:`apply`});function PM(e,t,n){var r,i,a;if(t<=0)if(Array.isArray(e[0])){for(a=FM(e),i=[],r=0;r<a.length;r++)i[r]=PM(a[r],t-1,n);return i}else return n(e);else{for(i=[],r=0;r<e.length;r++)i[r]=PM(e[r],t-1,n);return i}}function FM(e){var t=e.length,n=e[0].length,r,i,a=[];for(i=0;i<n;i++){var o=[];for(r=0;r<t;r++)o.push(e[r][i]);a.push(o)}return a}var IM=`addScalar`,LM=K(IM,[`typed`],e=>{var{typed:t}=e;return t(IM,{"number, number":nA,"Complex, Complex":function(e,t){return e.add(t)},"BigNumber, BigNumber":function(e,t){return e.plus(t)},"bigint, bigint":function(e,t){return e+t},"Fraction, Fraction":function(e,t){return e.add(t)},"Unit, Unit":t.referToSelf(e=>(n,r)=>{if(n.value===null||n.value===void 0)throw Error(`Parameter x contains a unit with undefined value`);if(r.value===null||r.value===void 0)throw Error(`Parameter y contains a unit with undefined value`);if(!n.equalBase(r))throw Error(`Units do not match`);var i=n.clone();return i.value=t.find(e,[i.valueType(),r.valueType()])(i.value,r.value),i.fixPrefix=!1,i})})}),RM=`subtractScalar`,zM=K(RM,[`typed`],e=>{var{typed:t}=e;return t(RM,{"number, number":rA,"Complex, Complex":function(e,t){return e.sub(t)},"BigNumber, BigNumber":function(e,t){return e.minus(t)},"bigint, bigint":function(e,t){return e-t},"Fraction, Fraction":function(e,t){return e.sub(t)},"Unit, Unit":t.referToSelf(e=>(n,r)=>{if(n.value===null||n.value===void 0)throw Error(`Parameter x contains a unit with undefined value`);if(r.value===null||r.value===void 0)throw Error(`Parameter y contains a unit with undefined value`);if(!n.equalBase(r))throw Error(`Units do not match`);var i=n.clone();return i.value=t.find(e,[i.valueType(),r.valueType()])(i.value,r.value),i.fixPrefix=!1,i})})}),BM=`cbrt`,VM=K(BM,[`config`,`typed`,`isNegative`,`unaryMinus`,`matrix`,`Complex`,`BigNumber`,`Fraction`],e=>{var{config:t,typed:n,isNegative:r,unaryMinus:i,matrix:a,Complex:o,BigNumber:s,Fraction:c}=e;return n(BM,{number:cA,Complex:l,"Complex, boolean":l,BigNumber:function(e){return e.cbrt()},Unit:u});function l(e,n){var r=e.arg()/3,i=e.abs(),s=new o(cA(i),0).mul(new o(0,r).exp());if(n){var c=[s,new o(cA(i),0).mul(new o(0,r+Math.PI*2/3).exp()),new o(cA(i),0).mul(new o(0,r-Math.PI*2/3).exp())];return t.matrix===`Array`?c:a(c)}else return s}function u(e){if(e.value&&Lw(e.value)){var t=e.clone();return t.value=1,t=t.pow(1/3),t.value=l(e.value),t}else{var n=r(e.value);n&&(e.value=i(e.value));var a=Fw(e.value)?new s(1).div(3):Rw(e.value)?new c(1,3):1/3,o=e.pow(a);return n&&(o.value=i(o.value)),o}}}),HM=K(`matAlgo11xS0s`,[`typed`,`equalScalar`],e=>{var{typed:t,equalScalar:n}=e;return function(e,r,i,a){var o=e._values,s=e._index,c=e._ptr,l=e._size,u=e._datatype;if(!o)throw Error(`Cannot perform operation on Pattern Sparse Matrix and Scalar value`);var d=l[0],f=l[1],p,m=n,h=0,g=i;typeof u==`string`&&(p=u,m=t.find(n,[p,p]),h=t.convert(0,p),r=t.convert(r,p),g=t.find(i,[p,p]));for(var _=[],v=[],y=[],b=0;b<f;b++){y[b]=v.length;for(var x=c[b],S=c[b+1],C=x;C<S;C++){var w=s[C],T=a?g(r,o[C]):g(o[C],r);m(T,h)||(v.push(w),_.push(T))}}return y[f]=v.length,e.createSparseMatrix({values:_,index:v,ptr:y,size:[d,f],datatype:p})}}),UM=K(`matAlgo12xSfs`,[`typed`,`DenseMatrix`],e=>{var{typed:t,DenseMatrix:n}=e;return function(e,r,i,a){var o=e._values,s=e._index,c=e._ptr,l=e._size,u=e._datatype;if(!o)throw Error(`Cannot perform operation on Pattern Sparse Matrix and Scalar value`);var d=l[0],f=l[1],p,m=i;typeof u==`string`&&(p=u,r=t.convert(r,p),m=t.find(i,[p,p]));for(var h=[],g=[],_=[],v=0;v<f;v++){for(var y=v+1,b=c[v],x=c[v+1],S=b;S<x;S++){var C=s[S];g[C]=o[S],_[C]=y}for(var w=0;w<d;w++)v===0&&(h[w]=[]),_[w]===y?h[w][v]=a?m(r,g[w]):m(g[w],r):h[w][v]=a?m(r,0):m(0,r)}return new n({data:h,size:[d,f],datatype:p})}}),WM=K(`matAlgo14xDs`,[`typed`],e=>{var{typed:t}=e;return function(e,r,i,a){var o=e._data,s=e._size,c=e._datatype,l,u=i;typeof c==`string`&&(l=c,r=t.convert(r,l),u=t.find(i,[l,l]));var d=s.length>0?n(u,0,s,s[0],o,r,a):[];return e.createDenseMatrix({data:d,size:CT(s),datatype:l})};function n(e,t,r,i,a,o,s){var c=[];if(t===r.length-1)for(var l=0;l<i;l++)c[l]=s?e(o,a[l]):e(a[l],o);else for(var u=0;u<i;u++)c[u]=n(e,t+1,r,r[t+1],a[u],o,s);return c}}),GM=`ceil`,KM=[`typed`,`config`,`round`,`matrix`,`equalScalar`,`zeros`,`DenseMatrix`],qM=new nO(10),JM=K(GM,[`typed`,`config`,`round`],e=>{var{typed:t,config:n,round:r}=e;function i(e){var t=Math.ceil(e),i=r(e);return t===i?t:$T(e,i,n.relTol,n.absTol)&&!$T(e,t,n.relTol,n.absTol)?i:t}return t(GM,{number:i,"number, number":function(e,t){if(!q(t))throw RangeError(`number of decimals in function ceil must be an integer`);if(t<0||t>15)throw RangeError(`number of decimals in ceil number must be in range 0-15`);var n=10**t;return i(e*n)/n}})}),YM=K(GM,KM,e=>{var{typed:t,config:n,round:r,matrix:i,equalScalar:a,zeros:o,DenseMatrix:s}=e,c=HM({typed:t,equalScalar:a}),l=UM({typed:t,DenseMatrix:s}),u=WM({typed:t}),d=JM({typed:t,config:n,round:r});function f(e){var t=(e,t)=>Nj(e,t,n.relTol,n.absTol),i=e.ceil(),a=r(e);return i.eq(a)?i:t(e,a)&&!t(e,i)?a:i}return t(`ceil`,{number:d.signatures.number,"number,number":d.signatures[`number,number`],Complex:function(e){return e.ceil()},"Complex, number":function(e,t){return e.ceil(t)},"Complex, BigNumber":function(e,t){return e.ceil(t.toNumber())},BigNumber:f,"BigNumber, BigNumber":function(e,t){var n=qM.pow(t);return f(e.mul(n)).div(n)},bigint:e=>e,"bigint, number":(e,t)=>e,"bigint, BigNumber":(e,t)=>e,Fraction:function(e){return e.ceil()},"Fraction, number":function(e,t){return e.ceil(t)},"Fraction, BigNumber":function(e,t){return e.ceil(t.toNumber())},"Unit, number, Unit":t.referToSelf(e=>function(t,n,r){var i=t.toNumeric(r);return r.multiply(e(i,n))}),"Unit, BigNumber, Unit":t.referToSelf(e=>(t,n,r)=>e(t,n.toNumber(),r)),"Array | Matrix, number | BigNumber, Unit":t.referToSelf(e=>(t,n,r)=>qk(t,t=>e(t,n,r),!0)),"Array | Matrix | Unit, Unit":t.referToSelf(e=>(t,n)=>e(t,0,n)),"Array | Matrix":t.referToSelf(e=>t=>qk(t,e,!0)),"Array, number | BigNumber":t.referToSelf(e=>(t,n)=>qk(t,t=>e(t,n),!0)),"SparseMatrix, number | BigNumber":t.referToSelf(e=>(t,n)=>c(t,n,e,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(e=>(t,n)=>u(t,n,e,!1)),"number | Complex | Fraction | BigNumber, Array":t.referToSelf(e=>(t,n)=>u(i(n),t,e,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":t.referToSelf(e=>(t,n)=>a(t,0)?o(n.size(),n.storage()):n.storage()===`dense`?u(n,t,e,!0):l(n,t,e,!0))})}),XM=`cube`,ZM=K(XM,[`typed`],e=>{var{typed:t}=e;return t(XM,{number:lA,Complex:function(e){return e.mul(e).mul(e)},BigNumber:function(e){return e.times(e).times(e)},bigint:function(e){return e*e*e},Fraction:function(e){return e.pow(3)},Unit:function(e){return e.pow(3)}})}),QM=`exp`,$M=K(QM,[`typed`],e=>{var{typed:t}=e;return t(QM,{number:uA,Complex:function(e){return e.exp()},BigNumber:function(e){return e.exp()}})}),eN=`expm1`,tN=K(eN,[`typed`,`Complex`],e=>{var{typed:t,Complex:n}=e;return t(eN,{number:dA,Complex:function(e){var t=Math.exp(e.re);return new n(t*Math.cos(e.im)-1,t*Math.sin(e.im))},BigNumber:function(e){return e.exp().minus(1)}})}),nN=`fix`,rN=[`typed`,`Complex`,`matrix`,`ceil`,`floor`,`equalScalar`,`zeros`,`DenseMatrix`],iN=K(nN,[`typed`,`ceil`,`floor`],e=>{var{typed:t,ceil:n,floor:r}=e;return t(nN,{number:function(e){return e>0?r(e):n(e)},"number, number":function(e,t){return e>0?r(e,t):n(e,t)}})}),aN=K(nN,rN,e=>{var{typed:t,Complex:n,matrix:r,ceil:i,floor:a,equalScalar:o,zeros:s,DenseMatrix:c}=e,l=UM({typed:t,DenseMatrix:c}),u=WM({typed:t}),d=iN({typed:t,ceil:i,floor:a});return t(`fix`,{number:d.signatures.number,"number, number | BigNumber":d.signatures[`number,number`],Complex:function(e){return new n(e.re>0?Math.floor(e.re):Math.ceil(e.re),e.im>0?Math.floor(e.im):Math.ceil(e.im))},"Complex, number":function(e,t){return new n(e.re>0?a(e.re,t):i(e.re,t),e.im>0?a(e.im,t):i(e.im,t))},"Complex, BigNumber":function(e,t){var r=t.toNumber();return new n(e.re>0?a(e.re,r):i(e.re,r),e.im>0?a(e.im,r):i(e.im,r))},BigNumber:function(e){return e.isNegative()?i(e):a(e)},"BigNumber, number | BigNumber":function(e,t){return e.isNegative()?i(e,t):a(e,t)},bigint:e=>e,"bigint, number":(e,t)=>e,"bigint, BigNumber":(e,t)=>e,Fraction:function(e){return e.s<0n?e.ceil():e.floor()},"Fraction, number | BigNumber":function(e,t){return e.s<0n?i(e,t):a(e,t)},"Unit, number, Unit":t.referToSelf(e=>function(t,n,r){var i=t.toNumeric(r);return r.multiply(e(i,n))}),"Unit, BigNumber, Unit":t.referToSelf(e=>(t,n,r)=>e(t,n.toNumber(),r)),"Array | Matrix, number | BigNumber, Unit":t.referToSelf(e=>(t,n,r)=>qk(t,t=>e(t,n,r),!0)),"Array | Matrix | Unit, Unit":t.referToSelf(e=>(t,n)=>e(t,0,n)),"Array | Matrix":t.referToSelf(e=>t=>qk(t,e,!0)),"Array | Matrix, number | BigNumber":t.referToSelf(e=>(t,n)=>qk(t,t=>e(t,n),!0)),"number | Complex | Fraction | BigNumber, Array":t.referToSelf(e=>(t,n)=>u(r(n),t,e,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":t.referToSelf(e=>(t,n)=>o(t,0)?s(n.size(),n.storage()):n.storage()===`dense`?u(n,t,e,!0):l(n,t,e,!0))})}),oN=`floor`,sN=[`typed`,`config`,`round`,`matrix`,`equalScalar`,`zeros`,`DenseMatrix`],cN=new nO(10),lN=K(oN,[`typed`,`config`,`round`],e=>{var{typed:t,config:n,round:r}=e;function i(e){var t=Math.floor(e),i=r(e);return t===i?t:$T(e,i,n.relTol,n.absTol)&&!$T(e,t,n.relTol,n.absTol)?i:t}return t(oN,{number:i,"number, number":function(e,t){if(!q(t))throw RangeError(`number of decimals in function floor must be an integer`);if(t<0||t>15)throw RangeError(`number of decimals in floor number must be in range 0 - 15`);var n=10**t;return i(e*n)/n}})}),uN=K(oN,sN,e=>{var{typed:t,config:n,round:r,matrix:i,equalScalar:a,zeros:o,DenseMatrix:s}=e,c=HM({typed:t,equalScalar:a}),l=UM({typed:t,DenseMatrix:s}),u=WM({typed:t}),d=lN({typed:t,config:n,round:r});function f(e){var t=(e,t)=>Nj(e,t,n.relTol,n.absTol),i=e.floor(),a=r(e);return i.eq(a)?i:t(e,a)&&!t(e,i)?a:i}return t(`floor`,{number:d.signatures.number,"number,number":d.signatures[`number,number`],Complex:function(e){return e.floor()},"Complex, number":function(e,t){return e.floor(t)},"Complex, BigNumber":function(e,t){return e.floor(t.toNumber())},BigNumber:f,"BigNumber, BigNumber":function(e,t){var n=cN.pow(t);return f(e.mul(n)).div(n)},bigint:e=>e,"bigint, number":(e,t)=>e,"bigint, BigNumber":(e,t)=>e,Fraction:function(e){return e.floor()},"Fraction, number":function(e,t){return e.floor(t)},"Fraction, BigNumber":function(e,t){return e.floor(t.toNumber())},"Unit, number, Unit":t.referToSelf(e=>function(t,n,r){var i=t.toNumeric(r);return r.multiply(e(i,n))}),"Unit, BigNumber, Unit":t.referToSelf(e=>(t,n,r)=>e(t,n.toNumber(),r)),"Array | Matrix, number | BigNumber, Unit":t.referToSelf(e=>(t,n,r)=>qk(t,t=>e(t,n,r),!0)),"Array | Matrix | Unit, Unit":t.referToSelf(e=>(t,n)=>e(t,0,n)),"Array | Matrix":t.referToSelf(e=>t=>qk(t,e,!0)),"Array, number | BigNumber":t.referToSelf(e=>(t,n)=>qk(t,t=>e(t,n),!0)),"SparseMatrix, number | BigNumber":t.referToSelf(e=>(t,n)=>c(t,n,e,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(e=>(t,n)=>u(t,n,e,!1)),"number | Complex | Fraction | BigNumber, Array":t.referToSelf(e=>(t,n)=>u(i(n),t,e,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":t.referToSelf(e=>(t,n)=>a(t,0)?o(n.size(),n.storage()):n.storage()===`dense`?u(n,t,e,!0):l(n,t,e,!0))})}),dN=K(`matAlgo02xDS0`,[`typed`,`equalScalar`],e=>{var{typed:t,equalScalar:n}=e;return function(e,r,i,a){var o=e._data,s=e._size,c=e._datatype||e.getDataType(),l=r._values,u=r._index,d=r._ptr,f=r._size,p=r._datatype||r._data===void 0?r._datatype:r.getDataType();if(s.length!==f.length)throw new QO(s.length,f.length);if(s[0]!==f[0]||s[1]!==f[1])throw RangeError(`Dimension mismatch. Matrix A (`+s+`) must match Matrix B (`+f+`)`);if(!l)throw Error(`Cannot perform operation on Dense Matrix and Pattern Sparse Matrix`);var m=s[0],h=s[1],g,_=n,v=0,y=i;typeof c==`string`&&c===p&&c!==`mixed`&&(g=c,_=t.find(n,[g,g]),v=t.convert(0,g),y=t.find(i,[g,g]));for(var b=[],x=[],S=[],C=0;C<h;C++){S[C]=x.length;for(var w=d[C],T=d[C+1],E=w;E<T;E++){var D=u[E],O=a?y(l[E],o[D][C]):y(o[D][C],l[E]);_(O,v)||(x.push(D),b.push(O))}}return S[h]=x.length,r.createSparseMatrix({values:b,index:x,ptr:S,size:[m,h],datatype:c===e._datatype&&p===r._datatype?g:void 0})}}),fN=K(`matAlgo03xDSf`,[`typed`],e=>{var{typed:t}=e;return function(e,n,r,i){var a=e._data,o=e._size,s=e._datatype||e.getDataType(),c=n._values,l=n._index,u=n._ptr,d=n._size,f=n._datatype||n._data===void 0?n._datatype:n.getDataType();if(o.length!==d.length)throw new QO(o.length,d.length);if(o[0]!==d[0]||o[1]!==d[1])throw RangeError(`Dimension mismatch. Matrix A (`+o+`) must match Matrix B (`+d+`)`);if(!c)throw Error(`Cannot perform operation on Dense Matrix and Pattern Sparse Matrix`);var p=o[0],m=o[1],h,g=0,_=r;typeof s==`string`&&s===f&&s!==`mixed`&&(h=s,g=t.convert(0,h),_=t.find(r,[h,h]));for(var v=[],y=0;y<p;y++)v[y]=[];for(var b=[],x=[],S=0;S<m;S++){for(var C=S+1,w=u[S],T=u[S+1],E=w;E<T;E++){var D=l[E];b[D]=i?_(c[E],a[D][S]):_(a[D][S],c[E]),x[D]=C}for(var O=0;O<p;O++)x[O]===C?v[O][S]=b[O]:v[O][S]=i?_(g,a[O][S]):_(a[O][S],g)}return e.createDenseMatrix({data:v,size:[p,m],datatype:s===e._datatype&&f===n._datatype?h:void 0})}}),pN=K(`matAlgo05xSfSf`,[`typed`,`equalScalar`],e=>{var{typed:t,equalScalar:n}=e;return function(e,r,i){var a=e._values,o=e._index,s=e._ptr,c=e._size,l=e._datatype||e._data===void 0?e._datatype:e.getDataType(),u=r._values,d=r._index,f=r._ptr,p=r._size,m=r._datatype||r._data===void 0?r._datatype:r.getDataType();if(c.length!==p.length)throw new QO(c.length,p.length);if(c[0]!==p[0]||c[1]!==p[1])throw RangeError(`Dimension mismatch. Matrix A (`+c+`) must match Matrix B (`+p+`)`);var h=c[0],g=c[1],_,v=n,y=0,b=i;typeof l==`string`&&l===m&&l!==`mixed`&&(_=l,v=t.find(n,[_,_]),y=t.convert(0,_),b=t.find(i,[_,_]));var x=a&&u?[]:void 0,S=[],C=[],w=x?[]:void 0,T=x?[]:void 0,E=[],D=[],O,k,A,j;for(k=0;k<g;k++){C[k]=S.length;var M=k+1;for(A=s[k],j=s[k+1];A<j;A++)O=o[A],S.push(O),E[O]=M,w&&(w[O]=a[A]);for(A=f[k],j=f[k+1];A<j;A++)O=d[A],E[O]!==M&&S.push(O),D[O]=M,T&&(T[O]=u[A]);if(x)for(A=C[k];A<S.length;){O=S[A];var N=E[O],ee=D[O];if(N===M||ee===M){var P=N===M?w[O]:y,te=ee===M?T[O]:y,ne=b(P,te);v(ne,y)?S.splice(A,1):(x.push(ne),A++)}}}return C[g]=S.length,e.createSparseMatrix({values:x,index:S,ptr:C,size:[h,g],datatype:l===e._datatype&&m===r._datatype?_:void 0})}}),mN=K(`matAlgo13xDD`,[`typed`],e=>{var{typed:t}=e;return function(e,r,i){var a=e._data,o=e._size,s=e._datatype,c=r._data,l=r._size,u=r._datatype,d=[];if(o.length!==l.length)throw new QO(o.length,l.length);for(var f=0;f<o.length;f++){if(o[f]!==l[f])throw RangeError(`Dimension mismatch. Matrix A (`+o+`) must match Matrix B (`+l+`)`);d[f]=o[f]}var p,m=i;typeof s==`string`&&s===u&&(p=s,m=t.find(i,[p,p]));var h=d.length>0?n(m,0,d,d[0],a,c):[];return e.createDenseMatrix({data:h,size:d,datatype:p})};function n(e,t,r,i,a,o){var s=[];if(t===r.length-1)for(var c=0;c<i;c++)s[c]=e(a[c],o[c]);else for(var l=0;l<i;l++)s[l]=n(e,t+1,r,r[t+1],a[l],o[l]);return s}});function hN(e,t){if(ET(e.size(),t.size()))return[e,t];var n=Dk(e.size(),t.size());return[e,t].map(e=>gN(e,n))}function gN(e,t){return ET(e.size(),t)?e:e.create(kk(e.valueOf(),t),e.datatype())}var _N=K(`matrixAlgorithmSuite`,[`typed`,`matrix`],e=>{var{typed:t,matrix:n}=e,r=mN({typed:t}),i=WM({typed:t});return function(e){var a=e.elop,o=e.SD||e.DS,s;a?(s={"DenseMatrix, DenseMatrix":(e,t)=>r(...hN(e,t),a),"Array, Array":(e,t)=>r(...hN(n(e),n(t)),a).valueOf(),"Array, DenseMatrix":(e,t)=>r(...hN(n(e),t),a),"DenseMatrix, Array":(e,t)=>r(...hN(e,n(t)),a)},e.SS&&(s[`SparseMatrix, SparseMatrix`]=(t,n)=>e.SS(...hN(t,n),a,!1)),e.DS&&(s[`DenseMatrix, SparseMatrix`]=(t,n)=>e.DS(...hN(t,n),a,!1),s[`Array, SparseMatrix`]=(t,r)=>e.DS(...hN(n(t),r),a,!1)),o&&(s[`SparseMatrix, DenseMatrix`]=(e,t)=>o(...hN(t,e),a,!0),s[`SparseMatrix, Array`]=(e,t)=>o(...hN(n(t),e),a,!0))):(s={"DenseMatrix, DenseMatrix":t.referToSelf(e=>(t,n)=>r(...hN(t,n),e)),"Array, Array":t.referToSelf(e=>(t,i)=>r(...hN(n(t),n(i)),e).valueOf()),"Array, DenseMatrix":t.referToSelf(e=>(t,i)=>r(...hN(n(t),i),e)),"DenseMatrix, Array":t.referToSelf(e=>(t,i)=>r(...hN(t,n(i)),e))},e.SS&&(s[`SparseMatrix, SparseMatrix`]=t.referToSelf(t=>(n,r)=>e.SS(...hN(n,r),t,!1))),e.DS&&(s[`DenseMatrix, SparseMatrix`]=t.referToSelf(t=>(n,r)=>e.DS(...hN(n,r),t,!1)),s[`Array, SparseMatrix`]=t.referToSelf(t=>(r,i)=>e.DS(...hN(n(r),i),t,!1))),o&&(s[`SparseMatrix, DenseMatrix`]=t.referToSelf(e=>(t,n)=>o(...hN(n,t),e,!0)),s[`SparseMatrix, Array`]=t.referToSelf(e=>(t,r)=>o(...hN(n(r),t),e,!0))));var c=e.scalar||`any`;(e.Ds||e.Ss)&&(a?(s[`DenseMatrix,`+c]=(e,t)=>i(e,t,a,!1),s[c+`, DenseMatrix`]=(e,t)=>i(t,e,a,!0),s[`Array,`+c]=(e,t)=>i(n(e),t,a,!1).valueOf(),s[c+`, Array`]=(e,t)=>i(n(t),e,a,!0).valueOf()):(s[`DenseMatrix,`+c]=t.referToSelf(e=>(t,n)=>i(t,n,e,!1)),s[c+`, DenseMatrix`]=t.referToSelf(e=>(t,n)=>i(n,t,e,!0)),s[`Array,`+c]=t.referToSelf(e=>(t,r)=>i(n(t),r,e,!1).valueOf()),s[c+`, Array`]=t.referToSelf(e=>(t,r)=>i(n(r),t,e,!0).valueOf())));var l=e.sS===void 0?e.Ss:e.sS;return a?(e.Ss&&(s[`SparseMatrix,`+c]=(t,n)=>e.Ss(t,n,a,!1)),l&&(s[c+`, SparseMatrix`]=(e,t)=>l(t,e,a,!0))):(e.Ss&&(s[`SparseMatrix,`+c]=t.referToSelf(t=>(n,r)=>e.Ss(n,r,t,!1))),l&&(s[c+`, SparseMatrix`]=t.referToSelf(e=>(t,n)=>l(n,t,e,!0)))),a&&a.signatures&&TT(s,a.signatures),s}}),vN=`mod`,yN=K(vN,[`typed`,`config`,`round`,`matrix`,`equalScalar`,`zeros`,`DenseMatrix`,`concat`],e=>{var{typed:t,config:n,round:r,matrix:i,equalScalar:a,zeros:o,DenseMatrix:s,concat:c}=e,l=uN({typed:t,config:n,round:r,matrix:i,equalScalar:a,zeros:o,DenseMatrix:s}),u=dN({typed:t,equalScalar:a}),d=fN({typed:t}),f=pN({typed:t,equalScalar:a}),p=HM({typed:t,equalScalar:a}),m=UM({typed:t,DenseMatrix:s}),h=_N({typed:t,matrix:i,concat:c});return t(vN,{"number, number":g,"BigNumber, BigNumber":function(e,t){return t.isZero()?e:e.sub(t.mul(l(e.div(t))))},"bigint, bigint":function(e,t){if(t===0n)return e;if(e<0){var n=e%t;return n===0n?n:n+t}return e%t},"Fraction, Fraction":function(e,t){return t.equals(0)?e:e.sub(t.mul(l(e.div(t))))}},h({SS:f,DS:d,SD:u,Ss:p,sS:m}));function g(e,t){return t===0?e:e-t*l(e/t)}}),bN=K(`matAlgo01xDSid`,[`typed`],e=>{var{typed:t}=e;return function(e,n,r,i){var a=e._data,o=e._size,s=e._datatype||e.getDataType(),c=n._values,l=n._index,u=n._ptr,d=n._size,f=n._datatype||n._data===void 0?n._datatype:n.getDataType();if(o.length!==d.length)throw new QO(o.length,d.length);if(o[0]!==d[0]||o[1]!==d[1])throw RangeError(`Dimension mismatch. Matrix A (`+o+`) must match Matrix B (`+d+`)`);if(!c)throw Error(`Cannot perform operation on Dense Matrix and Pattern Sparse Matrix`);var p=o[0],m=o[1],h=typeof s==`string`&&s!==`mixed`&&s===f?s:void 0,g=h?t.find(r,[h,h]):r,_,v,y=[];for(_=0;_<p;_++)y[_]=[];var b=[],x=[];for(v=0;v<m;v++){for(var S=v+1,C=u[v],w=u[v+1],T=C;T<w;T++)_=l[T],b[_]=i?g(c[T],a[_][v]):g(a[_][v],c[T]),x[_]=S;for(_=0;_<p;_++)x[_]===S?y[_][v]=b[_]:y[_][v]=a[_][v]}return e.createDenseMatrix({data:y,size:[p,m],datatype:s===e._datatype&&f===n._datatype?h:void 0})}}),xN=K(`matAlgo04xSidSid`,[`typed`,`equalScalar`],e=>{var{typed:t,equalScalar:n}=e;return function(e,r,i){var a=e._values,o=e._index,s=e._ptr,c=e._size,l=e._datatype||e._data===void 0?e._datatype:e.getDataType(),u=r._values,d=r._index,f=r._ptr,p=r._size,m=r._datatype||r._data===void 0?r._datatype:r.getDataType();if(c.length!==p.length)throw new QO(c.length,p.length);if(c[0]!==p[0]||c[1]!==p[1])throw RangeError(`Dimension mismatch. Matrix A (`+c+`) must match Matrix B (`+p+`)`);var h=c[0],g=c[1],_,v=n,y=0,b=i;typeof l==`string`&&l===m&&l!==`mixed`&&(_=l,v=t.find(n,[_,_]),y=t.convert(0,_),b=t.find(i,[_,_]));var x=a&&u?[]:void 0,S=[],C=[],w=a&&u?[]:void 0,T=a&&u?[]:void 0,E=[],D=[],O,k,A,j,M;for(k=0;k<g;k++){C[k]=S.length;var N=k+1;for(j=s[k],M=s[k+1],A=j;A<M;A++)O=o[A],S.push(O),E[O]=N,w&&(w[O]=a[A]);for(j=f[k],M=f[k+1],A=j;A<M;A++)if(O=d[A],E[O]===N){if(w){var ee=b(w[O],u[A]);v(ee,y)?E[O]=null:w[O]=ee}}else S.push(O),D[O]=N,T&&(T[O]=u[A]);if(w&&T)for(A=C[k];A<S.length;)O=S[A],E[O]===N?(x[A]=w[O],A++):D[O]===N?(x[A]=T[O],A++):S.splice(A,1)}return C[g]=S.length,e.createSparseMatrix({values:x,index:S,ptr:C,size:[h,g],datatype:l===e._datatype&&m===r._datatype?_:void 0})}}),SN=K(`matAlgo10xSids`,[`typed`,`DenseMatrix`],e=>{var{typed:t,DenseMatrix:n}=e;return function(e,r,i,a){var o=e._values,s=e._index,c=e._ptr,l=e._size,u=e._datatype;if(!o)throw Error(`Cannot perform operation on Pattern Sparse Matrix and Scalar value`);var d=l[0],f=l[1],p,m=i;typeof u==`string`&&(p=u,r=t.convert(r,p),m=t.find(i,[p,p]));for(var h=[],g=[],_=[],v=0;v<f;v++){for(var y=v+1,b=c[v],x=c[v+1],S=b;S<x;S++){var C=s[S];g[C]=o[S],_[C]=y}for(var w=0;w<d;w++)v===0&&(h[w]=[]),_[w]===y?h[w][v]=a?m(r,g[w]):m(g[w],r):h[w][v]=r}return new n({data:h,size:[d,f],datatype:p})}});function CN(e,t,n,r){if(!(this instanceof CN))throw SyntaxError(`Constructor must be called with the new operator`);this.fn=e,this.count=t,this.min=n,this.max=r,this.message=`Wrong number of arguments in function `+e+` (`+t+` provided, `+n+(r==null?``:`-`+r)+` expected)`,this.stack=Error().stack}CN.prototype=Error(),CN.prototype.constructor=Error,CN.prototype.name=`ArgumentsError`,CN.prototype.isArgumentsError=!0;var wN=`gcd`,TN=[`typed`,`config`,`round`,`matrix`,`equalScalar`,`zeros`,`BigNumber`,`DenseMatrix`,`concat`],EN=`number | BigNumber | Fraction | Matrix | Array`,DN=`${EN}, ${EN}, ...${EN}`;function ON(e){return!e.some(e=>Array.isArray(e))}var kN=K(wN,TN,e=>{var{typed:t,matrix:n,config:r,round:i,equalScalar:a,zeros:o,BigNumber:s,DenseMatrix:c,concat:l}=e,u=yN({typed:t,config:r,round:i,matrix:n,equalScalar:a,zeros:o,DenseMatrix:c,concat:l}),d=bN({typed:t}),f=xN({typed:t,equalScalar:a}),p=SN({typed:t,DenseMatrix:c}),m=_N({typed:t,matrix:n,concat:l});return t(wN,{"number, number":h,"BigNumber, BigNumber":g,"Fraction, Fraction":(e,t)=>e.gcd(t)},m({SS:f,DS:d,Ss:p}),{[DN]:t.referToSelf(e=>(t,n,r)=>{for(var i=e(t,n),a=0;a<r.length;a++)i=e(i,r[a]);return i}),Array:t.referToSelf(e=>t=>{if(t.length===1&&Array.isArray(t[0])&&ON(t[0]))return e(...t[0]);if(ON(t))return e(...t);throw new CN(`gcd() supports only 1d matrices!`)}),Matrix:t.referToSelf(e=>t=>e(t.toArray()))});function h(e,t){if(!q(e)||!q(t))throw Error(`Parameters in function gcd must be integer numbers`);for(var n;t!==0;)n=u(e,t),e=t,t=n;return e<0?-e:e}function g(e,t){if(!e.isInt()||!t.isInt())throw Error(`Parameters in function gcd must be integer numbers`);for(var n=new s(0);!t.isZero();){var r=u(e,t);e=t,t=r}return e.lt(n)?e.neg():e}}),AN=K(`matAlgo06xS0S0`,[`typed`,`equalScalar`],e=>{var{typed:t,equalScalar:n}=e;return function(e,r,i){var a=e._values,o=e._size,s=e._datatype||e._data===void 0?e._datatype:e.getDataType(),c=r._values,l=r._size,u=r._datatype||r._data===void 0?r._datatype:r.getDataType();if(o.length!==l.length)throw new QO(o.length,l.length);if(o[0]!==l[0]||o[1]!==l[1])throw RangeError(`Dimension mismatch. Matrix A (`+o+`) must match Matrix B (`+l+`)`);var d=o[0],f=o[1],p,m=n,h=0,g=i;typeof s==`string`&&s===u&&s!==`mixed`&&(p=s,m=t.find(n,[p,p]),h=t.convert(0,p),g=t.find(i,[p,p]));for(var _=a&&c?[]:void 0,v=[],y=[],b=_?[]:void 0,x=[],S=[],C=0;C<f;C++){y[C]=v.length;var w=C+1;if(Xk(e,C,x,b,S,w,v,g),Xk(r,C,x,b,S,w,v,g),b)for(var T=y[C];T<v.length;){var E=v[T];if(S[E]===w){var D=b[E];m(D,h)?v.splice(T,1):(_.push(D),T++)}else v.splice(T,1)}else for(var O=y[C];O<v.length;)S[v[O]]===w?O++:v.splice(O,1)}return y[f]=v.length,e.createSparseMatrix({values:_,index:v,ptr:y,size:[d,f],datatype:s===e._datatype&&u===r._datatype?p:void 0})}}),jN=`lcm`,MN=K(jN,[`typed`,`matrix`,`equalScalar`,`concat`],e=>{var{typed:t,matrix:n,equalScalar:r,concat:i}=e,a=dN({typed:t,equalScalar:r}),o=AN({typed:t,equalScalar:r}),s=HM({typed:t,equalScalar:r}),c=_N({typed:t,matrix:n,concat:i}),l=`number | BigNumber | Fraction | Matrix | Array`,u={};return u[`${l}, ${l}, ...${l}`]=t.referToSelf(e=>(t,n,r)=>{for(var i=e(t,n),a=0;a<r.length;a++)i=e(i,r[a]);return i}),t(jN,{"number, number":pA,"BigNumber, BigNumber":d,"Fraction, Fraction":(e,t)=>e.lcm(t)},c({SS:o,DS:a,Ss:s}),u);function d(e,t){if(!e.isInt()||!t.isInt())throw Error(`Parameters in function lcm must be integer numbers`);if(e.isZero())return e;if(t.isZero())return t;for(var n=e.times(t);!t.isZero();){var r=t;t=e.mod(r),e=r}return n.div(e).abs()}});function NN(e,t,n,r){return function(i){if(i>0||n.predictable){if(i<=0)return NaN;var a=i.toString(16),o=a.substring(0,15);return e*(a.length-o.length)+t(Number(`0x`+o))}return r(i.toNumber())}}var PN=`log10`,FN=[`typed`,`config`,`Complex`],IN=hA(16),LN=K(PN,FN,e=>{var{typed:t,config:n,Complex:r}=e;function i(e){return e.log().div(Math.LN10)}function a(e){return i(new r(e,0))}return t(PN,{number:function(e){return e>=0||n.predictable?hA(e):a(e)},bigint:NN(IN,hA,n,a),Complex:i,BigNumber:function(e){return!e.isNegative()||n.predictable?e.log():a(e.toNumber())},"Array | Matrix":t.referToSelf(e=>t=>qk(t,e))})}),RN=`log2`,zN=K(RN,[`typed`,`config`,`Complex`],e=>{var{typed:t,config:n,Complex:r}=e;function i(e){return a(new r(e,0))}return t(RN,{number:function(e){return e>=0||n.predictable?gA(e):i(e)},bigint:NN(4,gA,n,i),Complex:a,BigNumber:function(e){return!e.isNegative()||n.predictable?e.log(2):i(e.toNumber())},"Array | Matrix":t.referToSelf(e=>t=>qk(t,e))});function a(e){var t=Math.sqrt(e.re*e.re+e.im*e.im);return new r(Math.log2?Math.log2(t):Math.log(t)/Math.LN2,Math.atan2(e.im,e.re)/Math.LN2)}}),BN=K(`multiplyScalar`,[`typed`],e=>{var{typed:t}=e;return t(`multiplyScalar`,{"number, number":iA,"Complex, Complex":function(e,t){return e.mul(t)},"BigNumber, BigNumber":function(e,t){return e.times(t)},"bigint, bigint":function(e,t){return e*t},"Fraction, Fraction":function(e,t){return e.mul(t)},"number | Fraction | BigNumber | Complex, Unit":(e,t)=>t.multiply(e),"Unit, number | Fraction | BigNumber | Complex | Unit":(e,t)=>e.multiply(t)})}),VN=`multiply`,HN=K(VN,[`typed`,`matrix`,`addScalar`,`multiplyScalar`,`equalScalar`,`dot`],e=>{var{typed:t,matrix:n,addScalar:r,multiplyScalar:i,equalScalar:a,dot:o}=e,s=HM({typed:t,equalScalar:a}),c=WM({typed:t});function l(e,t){switch(e.length){case 1:switch(t.length){case 1:if(e[0]!==t[0])throw RangeError(`Dimension mismatch in multiplication. Vectors must have the same length`);break;case 2:if(e[0]!==t[0])throw RangeError(`Dimension mismatch in multiplication. Vector length (`+e[0]+`) must match Matrix rows (`+t[0]+`)`);break;default:throw Error(`Can only multiply a 1 or 2 dimensional matrix (Matrix B has `+t.length+` dimensions)`)}break;case 2:switch(t.length){case 1:if(e[1]!==t[0])throw RangeError(`Dimension mismatch in multiplication. Matrix columns (`+e[1]+`) must match Vector length (`+t[0]+`)`);break;case 2:if(e[1]!==t[0])throw RangeError(`Dimension mismatch in multiplication. Matrix A columns (`+e[1]+`) must match Matrix B rows (`+t[0]+`)`);break;default:throw Error(`Can only multiply a 1 or 2 dimensional matrix (Matrix B has `+t.length+` dimensions)`)}break;default:throw Error(`Can only multiply a 1 or 2 dimensional matrix (Matrix A has `+e.length+` dimensions)`)}}function u(e,t,n){if(n===0)throw Error(`Cannot multiply two empty vectors`);return o(e,t)}function d(e,t){if(t.storage()!==`dense`)throw Error(`Support for SparseMatrix not implemented`);return f(e,t)}function f(e,n){var a=e._data,o=e._size,s=e._datatype||e.getDataType(),c=n._data,l=n._size,u=n._datatype||n.getDataType(),d=o[0],f=l[1],p,m=r,h=i;s&&u&&s===u&&typeof s==`string`&&s!==`mixed`&&(p=s,m=t.find(r,[p,p]),h=t.find(i,[p,p]));for(var g=[],_=0;_<f;_++){for(var v=h(a[0],c[0][_]),y=1;y<d;y++)v=m(v,h(a[y],c[y][_]));g[_]=v}return e.createDenseMatrix({data:g,size:[f],datatype:s===e._datatype&&u===n._datatype?p:void 0})}var p=t(`_multiplyMatrixVector`,{"DenseMatrix, any":h,"SparseMatrix, any":v}),m=t(`_multiplyMatrixMatrix`,{"DenseMatrix, DenseMatrix":g,"DenseMatrix, SparseMatrix":_,"SparseMatrix, DenseMatrix":y,"SparseMatrix, SparseMatrix":b});function h(e,n){var a=e._data,o=e._size,s=e._datatype||e.getDataType(),c=n._data,l=n._datatype||n.getDataType(),u=o[0],d=o[1],f,p=r,m=i;s&&l&&s===l&&typeof s==`string`&&s!==`mixed`&&(f=s,p=t.find(r,[f,f]),m=t.find(i,[f,f]));for(var h=[],g=0;g<u;g++){for(var _=a[g],v=m(_[0],c[0]),y=1;y<d;y++)v=p(v,m(_[y],c[y]));h[g]=v}return e.createDenseMatrix({data:h,size:[u],datatype:s===e._datatype&&l===n._datatype?f:void 0})}function g(e,n){var a=e._data,o=e._size,s=e._datatype||e.getDataType(),c=n._data,l=n._size,u=n._datatype||n.getDataType(),d=o[0],f=o[1],p=l[1],m,h=r,g=i;s&&u&&s===u&&typeof s==`string`&&s!==`mixed`&&s!==`mixed`&&(m=s,h=t.find(r,[m,m]),g=t.find(i,[m,m]));for(var _=[],v=0;v<d;v++){var y=a[v];_[v]=[];for(var b=0;b<p;b++){for(var x=g(y[0],c[0][b]),S=1;S<f;S++)x=h(x,g(y[S],c[S][b]));_[v][b]=x}}return e.createDenseMatrix({data:_,size:[d,p],datatype:s===e._datatype&&u===n._datatype?m:void 0})}function _(e,n){var o=e._data,s=e._size,c=e._datatype||e.getDataType(),l=n._values,u=n._index,d=n._ptr,f=n._size,p=n._datatype||n._data===void 0?n._datatype:n.getDataType();if(!l)throw Error(`Cannot multiply Dense Matrix times Pattern only Matrix`);var m=s[0],h=f[1],g,_=r,v=i,y=a,b=0;c&&p&&c===p&&typeof c==`string`&&c!==`mixed`&&(g=c,_=t.find(r,[g,g]),v=t.find(i,[g,g]),y=t.find(a,[g,g]),b=t.convert(0,g));for(var x=[],S=[],C=[],w=n.createSparseMatrix({values:x,index:S,ptr:C,size:[m,h],datatype:c===e._datatype&&p===n._datatype?g:void 0}),T=0;T<h;T++){C[T]=S.length;var E=d[T],D=d[T+1];if(D>E)for(var O=0,k=0;k<m;k++){for(var A=k+1,j=void 0,M=E;M<D;M++){var N=u[M];O===A?j=_(j,v(o[k][N],l[M])):(j=v(o[k][N],l[M]),O=A)}O===A&&!y(j,b)&&(S.push(k),x.push(j))}}return C[h]=S.length,w}function v(e,n){var o=e._values,s=e._index,c=e._ptr,l=e._datatype||e._data===void 0?e._datatype:e.getDataType();if(!o)throw Error(`Cannot multiply Pattern only Matrix times Dense Matrix`);var u=n._data,d=n._datatype||n.getDataType(),f=e._size[0],p=n._size[0],m=[],h=[],g=[],_,v=r,y=i,b=a,x=0;l&&d&&l===d&&typeof l==`string`&&l!==`mixed`&&(_=l,v=t.find(r,[_,_]),y=t.find(i,[_,_]),b=t.find(a,[_,_]),x=t.convert(0,_));var S=[],C=[];g[0]=0;for(var w=0;w<p;w++){var T=u[w];if(!b(T,x))for(var E=c[w],D=c[w+1],O=E;O<D;O++){var k=s[O];C[k]?S[k]=v(S[k],y(T,o[O])):(C[k]=!0,h.push(k),S[k]=y(T,o[O]))}}for(var A=h.length,j=0;j<A;j++)m[j]=S[h[j]];return g[1]=h.length,e.createSparseMatrix({values:m,index:h,ptr:g,size:[f,1],datatype:l===e._datatype&&d===n._datatype?_:void 0})}function y(e,n){var o=e._values,s=e._index,c=e._ptr,l=e._datatype||e._data===void 0?e._datatype:e.getDataType();if(!o)throw Error(`Cannot multiply Pattern only Matrix times Dense Matrix`);var u=n._data,d=n._datatype||n.getDataType(),f=e._size[0],p=n._size[0],m=n._size[1],h,g=r,_=i,v=a,y=0;l&&d&&l===d&&typeof l==`string`&&l!==`mixed`&&(h=l,g=t.find(r,[h,h]),_=t.find(i,[h,h]),v=t.find(a,[h,h]),y=t.convert(0,h));for(var b=[],x=[],S=[],C=e.createSparseMatrix({values:b,index:x,ptr:S,size:[f,m],datatype:l===e._datatype&&d===n._datatype?h:void 0}),w=[],T=[],E=0;E<m;E++){S[E]=x.length;for(var D=E+1,O=0;O<p;O++){var k=u[O][E];if(!v(k,y))for(var A=c[O],j=c[O+1],M=A;M<j;M++){var N=s[M];T[N]===D?w[N]=g(w[N],_(k,o[M])):(T[N]=D,x.push(N),w[N]=_(k,o[M]))}}for(var ee=S[E],P=x.length,te=ee;te<P;te++)b[te]=w[x[te]]}return S[m]=x.length,C}function b(e,n){var a=e._values,o=e._index,s=e._ptr,c=e._datatype||e._data===void 0?e._datatype:e.getDataType(),l=n._values,u=n._index,d=n._ptr,f=n._datatype||n._data===void 0?n._datatype:n.getDataType(),p=e._size[0],m=n._size[1],h=a&&l,g,_=r,v=i;c&&f&&c===f&&typeof c==`string`&&c!==`mixed`&&(g=c,_=t.find(r,[g,g]),v=t.find(i,[g,g]));for(var y=h?[]:void 0,b=[],x=[],S=e.createSparseMatrix({values:y,index:b,ptr:x,size:[p,m],datatype:c===e._datatype&&f===n._datatype?g:void 0}),C=h?[]:void 0,w=[],T,E,D,O,k,A,j,M,N=0;N<m;N++){x[N]=b.length;var ee=N+1;for(k=d[N],A=d[N+1],O=k;O<A;O++)if(M=u[O],h)for(E=s[M],D=s[M+1],T=E;T<D;T++)j=o[T],w[j]===ee?C[j]=_(C[j],v(l[O],a[T])):(w[j]=ee,b.push(j),C[j]=v(l[O],a[T]));else for(E=s[M],D=s[M+1],T=E;T<D;T++)j=o[T],w[j]!==ee&&(w[j]=ee,b.push(j));if(h)for(var P=x[N],te=b.length,ne=P;ne<te;ne++)y[ne]=C[b[ne]]}return x[m]=b.length,S}return t(VN,i,{"Array, Array":t.referTo(`Matrix, Matrix`,e=>(t,r)=>{l(ek(t),ek(r));var i=e(n(t),n(r));return Hw(i)?i.valueOf():i}),"Matrix, Matrix":function(e,t){var n=e.size(),r=t.size();return l(n,r),n.length===1?r.length===1?u(e,t,n[0]):d(e,t):r.length===1?p(e,t):m(e,t)},"Matrix, Array":t.referTo(`Matrix,Matrix`,e=>(t,r)=>e(t,n(r))),"Array, Matrix":t.referToSelf(e=>(t,r)=>e(n(t,r.storage()),r)),"SparseMatrix, any":function(e,t){return s(e,t,i,!1)},"DenseMatrix, any":function(e,t){return c(e,t,i,!1)},"any, SparseMatrix":function(e,t){return s(t,e,i,!0)},"any, DenseMatrix":function(e,t){return c(t,e,i,!0)},"Array, any":function(e,t){return c(n(e),t,i,!1).valueOf()},"any, Array":function(e,t){return c(n(t),e,i,!0).valueOf()},"any, any":i,"any, any, ...any":t.referToSelf(e=>(t,n,r)=>{for(var i=e(t,n),a=0;a<r.length;a++)i=e(i,r[a]);return i})})}),UN=`nthRoot`,WN=K(UN,[`typed`,`matrix`,`equalScalar`,`BigNumber`,`concat`],e=>{var{typed:t,matrix:n,equalScalar:r,BigNumber:i,concat:a}=e,o=bN({typed:t}),s=dN({typed:t,equalScalar:r}),c=AN({typed:t,equalScalar:r}),l=HM({typed:t,equalScalar:r}),u=_N({typed:t,matrix:n,concat:a});function d(){throw Error(`Complex number not supported in function nthRoot. Use nthRoots instead.`)}return t(UN,{number:yA,"number, number":yA,BigNumber:e=>f(e,new i(2)),"BigNumber, BigNumber":f,Complex:d,"Complex, number":d,Array:t.referTo(`DenseMatrix,number`,e=>t=>e(n(t),2).valueOf()),DenseMatrix:t.referTo(`DenseMatrix,number`,e=>t=>e(t,2)),SparseMatrix:t.referTo(`SparseMatrix,number`,e=>t=>e(t,2)),"SparseMatrix, SparseMatrix":t.referToSelf(e=>(t,n)=>{if(n.density()===1)return c(t,n,e);throw Error(`Root must be non-zero`)}),"DenseMatrix, SparseMatrix":t.referToSelf(e=>(t,n)=>{if(n.density()===1)return o(t,n,e,!1);throw Error(`Root must be non-zero`)}),"Array, SparseMatrix":t.referTo(`DenseMatrix,SparseMatrix`,e=>(t,r)=>e(n(t),r)),"number | BigNumber, SparseMatrix":t.referToSelf(e=>(t,n)=>{if(n.density()===1)return l(n,t,e,!0);throw Error(`Root must be non-zero`)})},u({scalar:`number | BigNumber`,SD:s,Ss:l,sS:!1}));function f(e,t){var n=i.precision,r=i.clone({precision:n+2}),a=new i(0),o=new r(1),s=t.isNegative();if(s&&(t=t.neg()),t.isZero())throw Error(`Root must be non-zero`);if(e.isNegative()&&!t.abs().mod(2).equals(1))throw Error(`Root must be odd when a is negative.`);if(e.isZero())return s?new r(1/0):0;if(!e.isFinite())return s?a:e;var c=e.abs().pow(o.div(t));return c=e.isNeg()?c.neg():c,new i((s?o.div(c):c).toPrecision(n))}}),GN=`sign`,KN=K(GN,[`typed`,`BigNumber`,`Fraction`,`complex`],e=>{var{typed:t,BigNumber:n,complex:r,Fraction:i}=e;return t(GN,{number:bA,Complex:function(e){return e.im===0?r(bA(e.re)):e.sign()},BigNumber:function(e){return new n(e.cmp(0))},bigint:function(e){return e>0n?1n:e<0n?-1n:0n},Fraction:function(e){return e.n===0n?new i(0):new i(e.s)},"Array | Matrix":t.referToSelf(e=>t=>qk(t,e,!0)),Unit:t.referToSelf(e=>n=>{if(!n._isDerived()&&n.units[0].unit.offset!==0)throw TypeError(`sign is ambiguous for units with offset`);return t.find(e,n.valueType())(n.value)})})}),qN=K(`sqrt`,[`config`,`typed`,`Complex`],e=>{var{config:t,typed:n,Complex:r}=e;return n(`sqrt`,{number:i,Complex:function(e){return e.sqrt()},BigNumber:function(e){return!e.isNegative()||t.predictable?e.sqrt():i(e.toNumber())},Unit:function(e){return e.pow(.5)}});function i(e){return isNaN(e)?NaN:e>=0||t.predictable?Math.sqrt(e):new r(e,0).sqrt()}}),JN=`square`,YN=K(JN,[`typed`],e=>{var{typed:t}=e;return t(JN,{number:SA,Complex:function(e){return e.mul(e)},BigNumber:function(e){return e.times(e)},bigint:function(e){return e*e},Fraction:function(e){return e.mul(e)},Unit:function(e){return e.pow(2)}})}),XN=`subtract`,ZN=K(XN,[`typed`,`matrix`,`equalScalar`,`subtractScalar`,`unaryMinus`,`DenseMatrix`,`concat`],e=>{var{typed:t,matrix:n,equalScalar:r,subtractScalar:i,unaryMinus:a,DenseMatrix:o,concat:s}=e,c=bN({typed:t}),l=fN({typed:t}),u=pN({typed:t,equalScalar:r}),d=SN({typed:t,DenseMatrix:o}),f=UM({typed:t,DenseMatrix:o}),p=_N({typed:t,matrix:n,concat:s});return t(XN,{"any, any":i},p({elop:i,SS:u,DS:c,SD:l,Ss:f,sS:d}))}),QN=`xgcd`,$N=K(QN,[`typed`,`config`,`matrix`,`BigNumber`],e=>{var{typed:t,config:n,matrix:r,BigNumber:i}=e;return t(QN,{"number, number":function(e,t){var i=CA(e,t);return n.matrix===`Array`?i:r(i)},"BigNumber, BigNumber":a});function a(e,t){var a,o,s,c=new i(0),l=new i(1),u=c,d=l,f=l,p=c;if(!e.isInt()||!t.isInt())throw Error(`Parameters in function xgcd must be integer numbers`);for(;!t.isZero();)o=e.div(t).floor(),s=e.mod(t),a=u,u=d.minus(o.times(u)),d=a,a=f,f=p.minus(o.times(f)),p=a,e=t,t=s;var m=e.lt(c)?[e.neg(),d.neg(),p.neg()]:[e,e.isZero()?0:d,p];return n.matrix===`Array`?m:r(m)}}),eP=`invmod`,tP=K(eP,[`typed`,`config`,`BigNumber`,`xgcd`,`equal`,`smaller`,`mod`,`add`,`isInteger`],e=>{var{typed:t,config:n,BigNumber:r,xgcd:i,equal:a,smaller:o,mod:s,add:c,isInteger:l}=e;return t(eP,{"number, number":u,"BigNumber, BigNumber":u});function u(e,t){if(!l(e)||!l(t))throw Error(`Parameters in function invmod must be integer numbers`);if(e=s(e,t),a(t,0))throw Error(`Divisor must be non zero`);var n=i(e,t);n=n.valueOf();var[u,d]=n;return a(u,r(1))?(d=s(d,t),o(d,r(0))&&(d=c(d,t)),d):NaN}}),nP=K(`matAlgo09xS0Sf`,[`typed`,`equalScalar`],e=>{var{typed:t,equalScalar:n}=e;return function(e,r,i){var a=e._values,o=e._index,s=e._ptr,c=e._size,l=e._datatype||e._data===void 0?e._datatype:e.getDataType(),u=r._values,d=r._index,f=r._ptr,p=r._size,m=r._datatype||r._data===void 0?r._datatype:r.getDataType();if(c.length!==p.length)throw new QO(c.length,p.length);if(c[0]!==p[0]||c[1]!==p[1])throw RangeError(`Dimension mismatch. Matrix A (`+c+`) must match Matrix B (`+p+`)`);var h=c[0],g=c[1],_,v=n,y=0,b=i;typeof l==`string`&&l===m&&l!==`mixed`&&(_=l,v=t.find(n,[_,_]),y=t.convert(0,_),b=t.find(i,[_,_]));var x=a&&u?[]:void 0,S=[],C=[],w=x?[]:void 0,T=[],E,D,O,k,A;for(D=0;D<g;D++){C[D]=S.length;var j=D+1;if(w)for(k=f[D],A=f[D+1],O=k;O<A;O++)E=d[O],T[E]=j,w[E]=u[O];for(k=s[D],A=s[D+1],O=k;O<A;O++)if(E=o[O],w){var M=T[E]===j?w[E]:y,N=b(a[O],M);v(N,y)||(S.push(E),x.push(N))}else S.push(E)}return C[g]=S.length,e.createSparseMatrix({values:x,index:S,ptr:C,size:[h,g],datatype:l===e._datatype&&m===r._datatype?_:void 0})}}),rP=`dotMultiply`,iP=K(rP,[`typed`,`matrix`,`equalScalar`,`multiplyScalar`,`concat`],e=>{var{typed:t,matrix:n,equalScalar:r,multiplyScalar:i,concat:a}=e,o=dN({typed:t,equalScalar:r}),s=nP({typed:t,equalScalar:r}),c=HM({typed:t,equalScalar:r});return t(rP,_N({typed:t,matrix:n,concat:a})({elop:i,SS:s,DS:o,Ss:c}))});function aP(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw Error(`Integers expected in function bitAnd`);var n=e.constructor;if(e.isNaN()||t.isNaN())return new n(NaN);if(e.isZero()||t.eq(-1)||e.eq(t))return e;if(t.isZero()||e.eq(-1))return t;if(!e.isFinite()||!t.isFinite()){if(!e.isFinite()&&!t.isFinite())return e.isNegative()===t.isNegative()?e:new n(0);if(!e.isFinite())return t.isNegative()?e:e.isNegative()?new n(0):t;if(!t.isFinite())return e.isNegative()?t:t.isNegative()?new n(0):e}return cP(e,t,function(e,t){return e&t})}function oP(e){if(e.isFinite()&&!e.isInteger())throw Error(`Integer expected in function bitNot`);var t=e.constructor,n=t.precision;t.config({precision:1e9});var r=e.plus(new t(1));return r.s=-r.s||null,t.config({precision:n}),r}function sP(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw Error(`Integers expected in function bitOr`);var n=e.constructor;if(e.isNaN()||t.isNaN())return new n(NaN);var r=new n(-1);return e.isZero()||t.eq(r)||e.eq(t)?t:t.isZero()||e.eq(r)?e:!e.isFinite()||!t.isFinite()?!e.isFinite()&&!e.isNegative()&&t.isNegative()||e.isNegative()&&!t.isNegative()&&!t.isFinite()?r:e.isNegative()&&t.isNegative()?e.isFinite()?e:t:e.isFinite()?t:e:cP(e,t,function(e,t){return e|t})}function cP(e,t,n){var r=e.constructor,i,a,o=+(e.s<0),s=+(t.s<0);if(o){i=lP(oP(e));for(var c=0;c<i.length;++c)i[c]^=1}else i=lP(e);if(s){a=lP(oP(t));for(var l=0;l<a.length;++l)a[l]^=1}else a=lP(t);var u,d,f;i.length<=a.length?(u=i,d=a,f=o):(u=a,d=i,f=s);var p=u.length,m=d.length,h=n(o,s)^1,g=new r(h^1),_=new r(1),v=new r(2),y=r.precision;for(r.config({precision:1e9});p>0;)n(u[--p],d[--m])===h&&(g=g.plus(_)),_=_.times(v);for(;m>0;)n(f,d[--m])===h&&(g=g.plus(_)),_=_.times(v);return r.config({precision:y}),h===0&&(g.s=-g.s),g}function lP(e){for(var t=e.d,n=t[0]+``,r=1;r<t.length;++r){for(var i=t[r]+``,a=7-i.length;a--;)i=`0`+i;n+=i}for(var o=n.length;n.charAt(o)===`0`;)o--;var s=e.e,c=n.slice(0,o+1||1),l=c.length;if(s>0)if(++s>l)for(s-=l;s--;)c+=`0`;else s<l&&(c=c.slice(0,s)+`.`+c.slice(s));for(var u=[0],d=0;d<c.length;){for(var f=u.length;f--;)u[f]*=10;u[0]+=parseInt(c.charAt(d++));for(var p=0;p<u.length;++p)u[p]>1&&((u[p+1]===null||u[p+1]===void 0)&&(u[p+1]=0),u[p+1]+=u[p]>>1,u[p]&=1)}return u.reverse()}function uP(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw Error(`Integers expected in function bitXor`);var n=e.constructor;if(e.isNaN()||t.isNaN())return new n(NaN);if(e.isZero())return t;if(t.isZero())return e;if(e.eq(t))return new n(0);var r=new n(-1);return e.eq(r)?oP(t):t.eq(r)?oP(e):!e.isFinite()||!t.isFinite()?!e.isFinite()&&!t.isFinite()?r:new n(e.isNegative()===t.isNegative()?1/0:-1/0):cP(e,t,function(e,t){return e^t})}function dP(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw Error(`Integers expected in function leftShift`);var n=e.constructor;return e.isNaN()||t.isNaN()||t.isNegative()&&!t.isZero()?new n(NaN):e.isZero()||t.isZero()?e:!e.isFinite()&&!t.isFinite()?new n(NaN):t.lt(55)?e.times(2**t.toNumber()+``):e.times(new n(2).pow(t))}function fP(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw Error(`Integers expected in function rightArithShift`);var n=e.constructor;return e.isNaN()||t.isNaN()||t.isNegative()&&!t.isZero()?new n(NaN):e.isZero()||t.isZero()?e:t.isFinite()?t.lt(55)?e.div(2**t.toNumber()+``).floor():e.div(new n(2).pow(t)).floor():e.isNegative()?new n(-1):e.isFinite()?new n(0):new n(NaN)}var pP=`bitAnd`,mP=K(pP,[`typed`,`matrix`,`equalScalar`,`concat`],e=>{var{typed:t,matrix:n,equalScalar:r,concat:i}=e,a=dN({typed:t,equalScalar:r}),o=AN({typed:t,equalScalar:r}),s=HM({typed:t,equalScalar:r}),c=_N({typed:t,matrix:n,concat:i});return t(pP,{"number, number":kA,"BigNumber, BigNumber":aP,"bigint, bigint":(e,t)=>e&t},c({SS:o,DS:a,Ss:s}))}),hP=`bitNot`,gP=K(hP,[`typed`],e=>{var{typed:t}=e;return t(hP,{number:AA,BigNumber:oP,bigint:e=>~e,"Array | Matrix":t.referToSelf(e=>t=>qk(t,e))})}),_P=`bitOr`,vP=K(_P,[`typed`,`matrix`,`equalScalar`,`DenseMatrix`,`concat`],e=>{var{typed:t,matrix:n,equalScalar:r,DenseMatrix:i,concat:a}=e,o=bN({typed:t}),s=xN({typed:t,equalScalar:r}),c=SN({typed:t,DenseMatrix:i}),l=_N({typed:t,matrix:n,concat:a});return t(_P,{"number, number":jA,"BigNumber, BigNumber":sP,"bigint, bigint":(e,t)=>e|t},l({SS:s,DS:o,Ss:c}))}),yP=K(`matAlgo07xSSf`,[`typed`,`SparseMatrix`],e=>{var{typed:t,SparseMatrix:n}=e;return function(e,i,a){var o=e._size,s=e._datatype||e._data===void 0?e._datatype:e.getDataType(),c=i._size,l=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(o.length!==c.length)throw new QO(o.length,c.length);if(o[0]!==c[0]||o[1]!==c[1])throw RangeError(`Dimension mismatch. Matrix A (`+o+`) must match Matrix B (`+c+`)`);var u=o[0],d=o[1],f,p=0,m=a;typeof s==`string`&&s===l&&s!==`mixed`&&(f=s,p=t.convert(0,f),m=t.find(a,[f,f]));for(var h=[],g=[],_=Array(d+1).fill(0),v=[],y=[],b=[],x=[],S=0;S<d;S++){var C=S+1,w=0;r(e,S,b,v,C),r(i,S,x,y,C);for(var T=0;T<u;T++){var E=b[T]===C?v[T]:p,D=x[T]===C?y[T]:p,O=m(E,D);O!==0&&O!==!1&&(g.push(T),h.push(O),w++)}_[S+1]=_[S]+w}return new n({values:h,index:g,ptr:_,size:[u,d],datatype:s===e._datatype&&l===i._datatype?f:void 0})};function r(e,t,n,r,i){for(var a=e._values,o=e._index,s=e._ptr,c=s[t],l=s[t+1];c<l;c++){var u=o[c];n[u]=i,r[u]=a[c]}}}),bP=`bitXor`,xP=K(bP,[`typed`,`matrix`,`DenseMatrix`,`concat`,`SparseMatrix`],e=>{var{typed:t,matrix:n,DenseMatrix:r,concat:i,SparseMatrix:a}=e,o=fN({typed:t}),s=yP({typed:t,SparseMatrix:a}),c=UM({typed:t,DenseMatrix:r}),l=_N({typed:t,matrix:n,concat:i});return t(bP,{"number, number":MA,"BigNumber, BigNumber":uP,"bigint, bigint":(e,t)=>e^t},l({SS:s,DS:o,Ss:c}))}),SP=`arg`,CP=K(SP,[`typed`],e=>{var{typed:t}=e;return t(SP,{number:function(e){return Math.atan2(0,e)},BigNumber:function(e){return e.constructor.atan2(0,e)},Complex:function(e){return e.arg()},"Array | Matrix":t.referToSelf(e=>t=>qk(t,e))})}),wP=`conj`,TP=K(wP,[`typed`],e=>{var{typed:t}=e;return t(wP,{"number | BigNumber | Fraction":e=>e,Complex:e=>e.conjugate(),Unit:t.referToSelf(e=>t=>new t.constructor(e(t.toNumeric()),t.formatUnits())),"Array | Matrix":t.referToSelf(e=>t=>qk(t,e))})}),EP=`im`,DP=K(EP,[`typed`],e=>{var{typed:t}=e;return t(EP,{number:()=>0,"BigNumber | Fraction":e=>e.mul(0),Complex:e=>e.im,"Array | Matrix":t.referToSelf(e=>t=>qk(t,e))})}),OP=`re`,kP=K(OP,[`typed`],e=>{var{typed:t}=e;return t(OP,{"number | BigNumber | Fraction":e=>e,Complex:e=>e.re,"Array | Matrix":t.referToSelf(e=>t=>qk(t,e))})}),AP=`not`,jP=K(AP,[`typed`],e=>{var{typed:t}=e;return t(AP,{"null | undefined":()=>!0,number:WA,Complex:function(e){return e.re===0&&e.im===0},BigNumber:function(e){return e.isZero()||e.isNaN()},bigint:e=>!e,Unit:t.referToSelf(e=>n=>t.find(e,n.valueType())(n.value)),"Array | Matrix":t.referToSelf(e=>t=>qk(t,e))})}),MP=`nullish`,NP=K(MP,[`typed`,`matrix`,`size`,`flatten`,`deepEqual`],e=>{var{typed:t,matrix:n,size:r,flatten:i,deepEqual:a}=e,o=fN({typed:t}),s=WM({typed:t}),c=mN({typed:t});return t(MP,{"number|bigint|Complex|BigNumber|Fraction|Unit|string|boolean|SparseMatrix, any":(e,t)=>e,"null, any":(e,t)=>t,"undefined, any":(e,t)=>t,"SparseMatrix, Array | Matrix":(e,t)=>{var n=r(e),i=r(t);if(a(n,i))return e;throw new QO(n,i)},"DenseMatrix, DenseMatrix":t.referToSelf(e=>(t,n)=>c(t,n,e)),"DenseMatrix, SparseMatrix":t.referToSelf(e=>(t,n)=>o(t,n,e,!1)),"DenseMatrix, Array":t.referToSelf(e=>(t,r)=>c(t,n(r),e)),"DenseMatrix, any":t.referToSelf(e=>(t,n)=>s(t,n,e,!1)),"Array, Array":t.referToSelf(e=>(t,r)=>c(n(t),n(r),e).valueOf()),"Array, DenseMatrix":t.referToSelf(e=>(t,r)=>c(n(t),r,e)),"Array, SparseMatrix":t.referToSelf(e=>(t,r)=>o(n(t),r,e,!1)),"Array, any":t.referToSelf(e=>(t,r)=>s(n(t),r,e,!1).valueOf())})}),PP=`or`,FP=K(PP,[`typed`,`matrix`,`equalScalar`,`DenseMatrix`,`concat`],e=>{var{typed:t,matrix:n,equalScalar:r,DenseMatrix:i,concat:a}=e,o=fN({typed:t}),s=pN({typed:t,equalScalar:r}),c=UM({typed:t,DenseMatrix:i}),l=_N({typed:t,matrix:n,concat:a});return t(PP,{"number, number":GA,"Complex, Complex":function(e,t){return e.re!==0||e.im!==0||t.re!==0||t.im!==0},"BigNumber, BigNumber":function(e,t){return!e.isZero()&&!e.isNaN()||!t.isZero()&&!t.isNaN()},"bigint, bigint":GA,"Unit, Unit":t.referToSelf(e=>(t,n)=>e(t.value||0,n.value||0))},l({SS:s,DS:o,Ss:c}))}),IP=`xor`,LP=K(IP,[`typed`,`matrix`,`DenseMatrix`,`concat`,`SparseMatrix`],e=>{var{typed:t,matrix:n,DenseMatrix:r,concat:i,SparseMatrix:a}=e,o=fN({typed:t}),s=yP({typed:t,SparseMatrix:a}),c=UM({typed:t,DenseMatrix:r}),l=_N({typed:t,matrix:n,concat:i});return t(IP,{"number, number":KA,"Complex, Complex":function(e,t){return(e.re!==0||e.im!==0)!=(t.re!==0||t.im!==0)},"bigint, bigint":KA,"BigNumber, BigNumber":function(e,t){return(!e.isZero()&&!e.isNaN())!=(!t.isZero()&&!t.isNaN())},"Unit, Unit":t.referToSelf(e=>(t,n)=>e(t.value||0,n.value||0))},l({SS:s,DS:o,Ss:c}))}),RP=`concat`,zP=K(RP,[`typed`,`matrix`,`isInteger`],e=>{var{typed:t,matrix:n,isInteger:r}=e;return t(RP,{"...Array | Matrix | number | BigNumber":function(e){var t,i=e.length,a=-1,o,s=!1,c=[];for(t=0;t<i;t++){var l=e[t];if(Hw(l)&&(s=!0),Pw(l)||Fw(l)){if(t!==i-1)throw Error(`Dimension must be specified as last argument`);if(o=a,a=l.valueOf(),!r(a))throw TypeError(`Integer number expected for dimension`);if(a<0||t>0&&a>o)throw new $O(a,o+1)}else{var u=CT(l).valueOf(),d=ek(u);if(c[t]=u,o=a,a=d.length-1,t>0&&a!==o)throw new QO(o+1,a+1)}}if(c.length===0)throw SyntaxError(`At least one matrix expected`);for(var f=c.shift();c.length;)f=Ek(f,c.shift(),a);return s?n(f):f},"...string":function(e){return e.join(``)}})}),BP=`column`,VP=K(BP,[`typed`,`Index`,`matrix`,`range`],e=>{var{typed:t,Index:n,matrix:r,range:i}=e;return t(BP,{"Matrix, number":a,"Array, number":function(e,t){return a(r(CT(e)),t).valueOf()}});function a(e,t){if(e.size().length!==2)throw Error(`Only two dimensional matrix is supported`);ik(t,e.size()[1]);var a=new n(i(0,e.size()[0]),[t]),o=e.subset(a);return Hw(o)?o:r([[o]])}}),HP=`count`,UP=K(HP,[`typed`,`size`,`prod`],e=>{var{typed:t,size:n,prod:r}=e;return t(HP,{string:function(e){return e.length},"Matrix | Array":function(e){return r(n(e))}})}),WP=`cross`,GP=K(WP,[`typed`,`matrix`,`subtract`,`multiply`],e=>{var{typed:t,matrix:n,subtract:r,multiply:i}=e;return t(WP,{"Matrix, Matrix":function(e,t){return n(a(e.toArray(),t.toArray()))},"Matrix, Array":function(e,t){return n(a(e.toArray(),t))},"Array, Matrix":function(e,t){return n(a(e,t.toArray()))},"Array, Array":a});function a(e,t){var n=Math.max(ek(e).length,ek(t).length);e=fk(e),t=fk(t);var a=ek(e),o=ek(t);if(a.length!==1||o.length!==1||a[0]!==3||o[0]!==3)throw RangeError(`Vectors with length 3 expected (Size A = [`+a.join(`, `)+`], B = [`+o.join(`, `)+`])`);var s=[r(i(e[1],t[2]),i(e[2],t[1])),r(i(e[2],t[0]),i(e[0],t[2])),r(i(e[0],t[1]),i(e[1],t[0]))];return n>1?[s]:s}}),KP=`diag`,qP=K(KP,[`typed`,`matrix`,`DenseMatrix`,`SparseMatrix`],e=>{var{typed:t,matrix:n,DenseMatrix:r,SparseMatrix:i}=e;return t(KP,{Array:function(e){return a(e,0,ek(e),null)},"Array, number":function(e,t){return a(e,t,ek(e),null)},"Array, BigNumber":function(e,t){return a(e,t.toNumber(),ek(e),null)},"Array, string":function(e,t){return a(e,0,ek(e),t)},"Array, number, string":function(e,t,n){return a(e,t,ek(e),n)},"Array, BigNumber, string":function(e,t,n){return a(e,t.toNumber(),ek(e),n)},Matrix:function(e){return a(e,0,e.size(),e.storage())},"Matrix, number":function(e,t){return a(e,t,e.size(),e.storage())},"Matrix, BigNumber":function(e,t){return a(e,t.toNumber(),e.size(),e.storage())},"Matrix, string":function(e,t){return a(e,0,e.size(),t)},"Matrix, number, string":function(e,t,n){return a(e,t,e.size(),n)},"Matrix, BigNumber, string":function(e,t,n){return a(e,t.toNumber(),e.size(),n)}});function a(e,t,n,r){if(!q(t))throw TypeError(`Second parameter in function diag must be an integer`);var i=t>0?t:0,a=t<0?-t:0;switch(n.length){case 1:return o(e,t,r,n[0],a,i);case 2:return s(e,t,r,n,a,i)}throw RangeError(`Matrix for function diag must be 2 dimensional`)}function o(e,t,n,a,o,s){var c=[a+o,a+s];if(n&&n!==`sparse`&&n!==`dense`)throw TypeError(`Unknown matrix type ${n}"`);var l=n===`sparse`?i.diagonal(c,e,t):r.diagonal(c,e,t);return n===null?l.valueOf():l}function s(e,t,r,i,a,o){if(Hw(e)){var s=e.diagonal(t);return r===null?s.valueOf():r===s.storage()?s:n(s,r)}for(var c=Math.min(i[0]-a,i[1]-o),l=[],u=0;u<c;u++)l[u]=e[u+a][u+o];return r===null?l:n(l)}}),JP=K(`filter`,[`typed`],e=>{var{typed:t}=e;return t(`filter`,{"Array, function":YP,"Matrix, function":function(e,t){return e.create(YP(e.valueOf(),t),e.datatype())},"Array, RegExp":bk,"Matrix, RegExp":function(e,t){return e.create(bk(e.valueOf(),t),e.datatype())}})});function YP(e,t){var n=Fk(t,e,`filter`);return n.isUnary?yk(e,n.fn):yk(e,function(e,t,r){return n.fn(e,[t],r)})}var XP=`flatten`,ZP=K(XP,[`typed`],e=>{var{typed:t}=e;return t(XP,{Array:function(e){return gk(e)},DenseMatrix:function(e){return e.create(gk(e.valueOf(),!0),e.datatype())},SparseMatrix:function(e){throw TypeError(`SparseMatrix is not supported by function flatten because it does not support 1D vectors. Convert to a DenseMatrix or Array first. Example: flatten(x.toArray())`)}})}),QP=`forEach`,$P=K(QP,[`typed`],e=>{var{typed:t}=e;return t(QP,{"Array, function":eF,"Matrix, function":function(e,t){e.forEach(t)}})});function eF(e,t){var n=Fk(t,e,QP);Nk(e,n.fn,n.isUnary)}var tF=`getMatrixDataType`,nF=K(tF,[`typed`],e=>{var{typed:t}=e;return t(tF,{Array:function(e){return wk(e,ST)},Matrix:function(e){return e.getDataType()}})}),rF=`identity`,iF=K(rF,[`typed`,`config`,`matrix`,`BigNumber`,`DenseMatrix`,`SparseMatrix`],e=>{var{typed:t,config:n,matrix:r,BigNumber:i,DenseMatrix:a,SparseMatrix:o}=e;return t(rF,{"":function(){return n.matrix===`Matrix`?r([]):[]},string:function(e){return r(e)},"number | BigNumber":function(e){return c(e,e,n.matrix===`Matrix`?`dense`:void 0)},"number | BigNumber, string":function(e,t){return c(e,e,t)},"number | BigNumber, number | BigNumber":function(e,t){return c(e,t,n.matrix===`Matrix`?`dense`:void 0)},"number | BigNumber, number | BigNumber, string":function(e,t,n){return c(e,t,n)},Array:function(e){return s(e)},"Array, string":function(e,t){return s(e,t)},Matrix:function(e){return s(e.valueOf(),e.storage())},"Matrix, string":function(e,t){return s(e.valueOf(),t)}});function s(e,t){switch(e.length){case 0:return t?r(t):[];case 1:return c(e[0],e[0],t);case 2:return c(e[0],e[1],t);default:throw Error(`Vector containing two values expected`)}}function c(e,t,n){var r=Fw(e)||Fw(t)?i:null;if(Fw(e)&&(e=e.toNumber()),Fw(t)&&(t=t.toNumber()),!q(e)||e<1||!q(t)||t<1)throw Error(`Parameters in function identity must be positive integers`);var s=r?new i(1):1,c=r?new r(0):0,l=[e,t];if(n){if(n===`sparse`)return o.diagonal(l,s,0,c);if(n===`dense`)return a.diagonal(l,s,0,c);throw TypeError(`Unknown matrix type "${n}"`)}for(var u=ok([],l,c),d=e<t?e:t,f=0;f<d;f++)u[f][f]=s;return u}}),aF=`kron`,oF=K(aF,[`typed`,`matrix`,`multiplyScalar`],e=>{var{typed:t,matrix:n,multiplyScalar:r}=e;return t(aF,{"Matrix, Matrix":function(e,t){return n(a(e.toArray(),t.toArray()))},"Matrix, Array":function(e,t){return n(a(e.toArray(),t))},"Array, Matrix":function(e,t){return n(a(e,t.toArray()))},"Array, Array":a});function i(e,t){return e.flatMap(e=>t.map(t=>r(e,t)))}function a(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:-1;if(n<0){var r=ek(e).length,o=ek(t).length;for(n=Math.max(r,o);r++<n;)e=[e];for(;o++<n;)t=[t]}return n===1?i(e,t):e.flatMap(e=>t.map(t=>a(e,t,n-1)))}}),sF=`map`,cF=K(sF,[`typed`],e=>{var{typed:t}=e;return t(sF,{"Array, function":s,"Matrix, function":function(e,t){return e.map(t)},"Array|Matrix, Array|Matrix, ...Array|Matrix|function":(e,t,r)=>n([e,t,...r.slice(0,r.length-1)],r[r.length-1])});function n(e,n){if(typeof n!=`function`)throw Error(`Last argument must be a callback function`);var c=e[0].isMatrix,l=e.map(e=>e.isMatrix?e.size():ek(e)),u=Dk(...l),d=e.length,f=c?(e,t)=>e.get(t):jk,p=e.map((e,t)=>{var n=l[t].map(()=>0);return e.isMatrix?e.get(n):jk(e,n)}),m=t.isTypedFunction(n)?o(n,p,u.map(()=>0),e):a(n,d);if(m<2)return r(e,i(m,n,null));var h=c?e.map(t=>t.isMatrix?t.create(kk(t.toArray(),u),t.datatype()):e[0].create(kk(t.valueOf(),u))):e.map(e=>e.isMatrix?kk(e.toArray(),u):kk(e,u)),g=i(m,n,h),_=(e,t)=>g([e,...h.slice(1).map(e=>f(e,t))],t);return c?h[0].map(_):s(h[0],_)}function r(e,t){var n=e[0],r=e.map(e=>e.isMatrix?e.valueOf():e),i=e.map(e=>e.isMatrix?e.size():ek(e)),a=Dk(...i),o=i.map(e=>a.length-e.length),s=a.length-1,c=t.length>1?[]:null,l=d(r,0);if(n.isMatrix){var u=n.create();return u._data=l,u._size=a,u}else return l;function d(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=a[n],i=Array(r);if(n<s)for(var l=function(t){c&&(c[n]=t),i[t]=d(e.map((e,r)=>o[r]>n?e:e.length===1?e[0]:e[t]),n+1)},u=0;u<r;u++)l(u);else for(var f=function(r){c&&(c[n]=r),i[r]=t(e.map(e=>e.length===1?e[0]:e[r]),c?c.slice():void 0)},p=0;p<r;p++)f(p);return i}}function i(e,t,n){switch(e){case 0:return e=>t(...e);case 1:return(e,n)=>t(...e,n);case 2:return(e,r)=>t(...e,r,...n)}}function a(e,t){var n=e.toString();if(/arguments/.test(n))return 2;var r=n.match(/\(.*?\)/);return/\.\.\./.test(r)||e.length>t+1?2:e.length===t+1?1:0}function o(e,n,r,i){return t.resolve(e,[...n,r,...i])===null?t.resolve(e,[...n,r])===null?(t.resolve(e,n),0):1:2}function s(e,t){var n=Fk(t,e,sF);return Mk(e,n.fn,n.isUnary)}}),lF=`diff`,uF=K(lF,[`typed`,`matrix`,`subtract`,`number`],e=>{var{typed:t,matrix:n,subtract:r,number:i}=e;return t(lF,{"Array | Matrix":function(e){return Hw(e)?n(o(e.toArray())):o(e)},"Array | Matrix, number":function(e,t){if(!q(t))throw RangeError(`Dimension must be a whole number`);return Hw(e)?n(a(e.toArray(),t)):a(e,t)},"Array, BigNumber":t.referTo(`Array,number`,e=>(t,n)=>e(t,i(n))),"Matrix, BigNumber":t.referTo(`Matrix,number`,e=>(t,n)=>e(t,i(n)))});function a(e,t){if(Hw(e)&&(e=e.toArray()),!Array.isArray(e))throw RangeError(`Array/Matrix does not have that many dimensions`);if(t>0){var n=[];return e.forEach(e=>{n.push(a(e,t-1))}),n}else if(t===0)return o(e);else throw RangeError(`Cannot have negative dimension`)}function o(e){for(var t=[],n=e.length,r=1;r<n;r++)t.push(s(e[r-1],e[r]));return t}function s(e,t){Hw(e)&&(e=e.toArray()),Hw(t)&&(t=t.toArray());var n=Array.isArray(e),i=Array.isArray(t);if(n&&i)return c(e,t);if(!n&&!i)return r(t,e);throw TypeError(`Cannot calculate difference between 1 array and 1 non-array`)}function c(e,t){if(e.length!==t.length)throw RangeError(`Not all sub-arrays have the same length`);for(var n=[],r=e.length,i=0;i<r;i++)n.push(s(e[i],t[i]));return n}}),dF=K(`ones`,[`typed`,`config`,`matrix`,`BigNumber`],e=>{var{typed:t,config:n,matrix:r,BigNumber:i}=e;return t(`ones`,{"":function(){return n.matrix===`Array`?a([]):a([],`default`)},"...number | BigNumber | string":function(e){return typeof e[e.length-1]==`string`?a(e,e.pop()):n.matrix===`Array`?a(e):a(e,`default`)},Array:a,Matrix:function(e){var t=e.storage();return a(e.valueOf(),t)},"Array | Matrix, string":function(e,t){return a(e.valueOf(),t)}});function a(e,t){var n=o(e)?new i(1):1;if(s(e),t){var a=r(t);return e.length>0?a.resize(e,n):a}else{var c=[];return e.length>0?ok(c,e,n):c}}function o(e){var t=!1;return e.forEach(function(e,n,r){Fw(e)&&(t=!0,r[n]=e.toNumber())}),t}function s(e){e.forEach(function(e){if(typeof e!=`number`||!q(e)||e<0)throw Error(`Parameters in function ones must be positive integers`)})}});function fF(){throw Error(`No "bignumber" implementation available`)}function pF(){throw Error(`No "fraction" implementation available`)}function mF(){throw Error(`No "matrix" implementation available`)}var hF=`range`,gF=K(hF,[`typed`,`config`,`?matrix`,`?bignumber`,`equal`,`smaller`,`smallerEq`,`larger`,`largerEq`,`add`,`isZero`,`isPositive`],e=>{var{typed:t,config:n,matrix:r,bignumber:i,smaller:a,smallerEq:o,larger:s,largerEq:c,add:l,isZero:u,isPositive:d}=e;return t(hF,{string:p,"string, boolean":p,number:function(e){throw TypeError(`Too few arguments to function range(): ${e}`)},boolean:function(e){throw TypeError(`Unexpected type of argument 1 to function range(): ${e}, number|bigint|BigNumber|Fraction`)},"number, number":function(e,t){return f(m(e,t,1,!1))},"number, number, number":function(e,t,n){return f(m(e,t,n,!1))},"number, number, boolean":function(e,t,n){return f(m(e,t,1,n))},"number, number, number, boolean":function(e,t,n,r){return f(m(e,t,n,r))},"bigint, bigint|number":function(e,t){return f(m(e,t,1n,!1))},"number, bigint":function(e,t){return f(m(BigInt(e),t,1n,!1))},"bigint, bigint|number, bigint|number":function(e,t,n){return f(m(e,t,BigInt(n),!1))},"number, bigint, bigint|number":function(e,t,n){return f(m(BigInt(e),t,BigInt(n),!1))},"bigint, bigint|number, boolean":function(e,t,n){return f(m(e,t,1n,n))},"number, bigint, boolean":function(e,t,n){return f(m(BigInt(e),t,1n,n))},"bigint, bigint|number, bigint|number, boolean":function(e,t,n,r){return f(m(e,t,BigInt(n),r))},"number, bigint, bigint|number, boolean":function(e,t,n,r){return f(m(BigInt(e),t,BigInt(n),r))},"BigNumber, BigNumber":function(e,t){var n=e.constructor;return f(m(e,t,new n(1),!1))},"BigNumber, BigNumber, BigNumber":function(e,t,n){return f(m(e,t,n,!1))},"BigNumber, BigNumber, boolean":function(e,t,n){var r=e.constructor;return f(m(e,t,new r(1),n))},"BigNumber, BigNumber, BigNumber, boolean":function(e,t,n,r){return f(m(e,t,n,r))},"Fraction, Fraction":function(e,t){return f(m(e,t,1,!1))},"Fraction, Fraction, Fraction":function(e,t,n){return f(m(e,t,n,!1))},"Fraction, Fraction, boolean":function(e,t,n){return f(m(e,t,1,n))},"Fraction, Fraction, Fraction, boolean":function(e,t,n,r){return f(m(e,t,n,r))},"Unit, Unit, Unit":function(e,t,n){return f(m(e,t,n,!1))},"Unit, Unit, Unit, boolean":function(e,t,n,r){return f(m(e,t,n,r))}});function f(e){return n.matrix===`Matrix`?r?r(e):mF():e}function p(e,t){var r=h(e);if(!r)throw SyntaxError(`String "`+e+`" is no valid range`);return n.number===`BigNumber`?(i===void 0&&fF(),f(m(i(r.start),i(r.end),i(r.step)),t)):f(m(r.start,r.end,r.step,t))}function m(e,t,n,r){var i=[];if(u(n))throw Error(`Step must be non-zero`);for(var f=d(n)?r?o:a:r?c:s,p=e;f(p,t);)i.push(p),p=l(p,n);return i}function h(e){var t=e.split(`:`).map(function(e){return Number(e)});if(t.some(function(e){return isNaN(e)}))return null;switch(t.length){case 2:return{start:t[0],end:t[1],step:1};case 3:return{start:t[0],end:t[2],step:t[1]};default:return null}}}),_F=`reshape`,vF=K(_F,[`typed`,`isInteger`,`matrix`],e=>{var{typed:t,isInteger:n}=e;return t(_F,{"Matrix, Array":function(e,t){return e.reshape(t,!0)},"Array, Array":function(e,t){return t.forEach(function(e){if(!n(e))throw TypeError(`Invalid size for dimension: `+e)}),ck(e,t)}})}),yF=K(`resize`,[`config`,`matrix`],e=>{var{config:t,matrix:n}=e;return function(e,i,a){if(arguments.length!==2&&arguments.length!==3)throw new CN(`resize`,arguments.length,2,3);if(Hw(i)&&(i=i.valueOf()),Fw(i[0])&&(i=i.map(function(e){return Fw(e)?e.toNumber():e})),Hw(e))return e.resize(i,a,!0);if(typeof e==`string`)return r(e,i,a);var o=Array.isArray(e)?!1:t.matrix!==`Array`;if(i.length===0){for(;Array.isArray(e);)e=e[0];return CT(e)}else{Array.isArray(e)||(e=[e]),e=CT(e);var s=ok(e,i,a);return o?n(s):s}};function r(e,t,n){if(n!==void 0){if(typeof n!=`string`||n.length!==1)throw TypeError(`Single character expected as defaultValue`)}else n=` `;if(t.length!==1)throw new QO(t.length,1);var r=t[0];if(typeof r!=`number`||!q(r))throw TypeError(`Invalid size, must contain positive integers (size: `+WO(t)+`)`);if(e.length>r)return e.substring(0,r);if(e.length<r){for(var i=e,a=0,o=r-e.length;a<o;a++)i+=n;return i}else return e}}),bF=`rotate`,xF=K(bF,[`typed`,`multiply`,`rotationMatrix`],e=>{var{typed:t,multiply:n,rotationMatrix:r}=e;return t(bF,{"Array , number | BigNumber | Complex | Unit":function(e,t){return i(e,2),n(r(t),e).toArray()},"Matrix , number | BigNumber | Complex | Unit":function(e,t){return i(e,2),n(r(t),e)},"Array, number | BigNumber | Complex | Unit, Array | Matrix":function(e,t,a){return i(e,3),n(r(t,a),e)},"Matrix, number | BigNumber | Complex | Unit, Array | Matrix":function(e,t,a){return i(e,3),n(r(t,a),e)}});function i(e,t){var n=Array.isArray(e)?ek(e):e.size();if(n.length>2||n.length===2&&n[1]!==1||n[0]!==t)throw RangeError(`Vector must be of dimensions 1x${t}`)}}),SF=`rotationMatrix`,CF=K(SF,[`typed`,`config`,`multiplyScalar`,`addScalar`,`unaryMinus`,`norm`,`matrix`,`BigNumber`,`DenseMatrix`,`SparseMatrix`,`cos`,`sin`],e=>{var{typed:t,config:n,multiplyScalar:r,addScalar:i,unaryMinus:a,norm:o,BigNumber:s,matrix:c,DenseMatrix:l,SparseMatrix:u,cos:d,sin:f}=e;return t(SF,{"":function(){return n.matrix===`Matrix`?c([]):[]},string:function(e){return c(e)},"number | BigNumber | Complex | Unit":function(e){return p(e,n.matrix===`Matrix`?`dense`:void 0)},"number | BigNumber | Complex | Unit, string":function(e,t){return p(e,t)},"number | BigNumber | Complex | Unit, Array":function(e,t){var n=c(t);return m(n),_(e,n,void 0)},"number | BigNumber | Complex | Unit, Matrix":function(e,t){return m(t),_(e,t,t.storage()||(n.matrix===`Matrix`?`dense`:void 0))},"number | BigNumber | Complex | Unit, Array, string":function(e,t,n){var r=c(t);return m(r),_(e,r,n)},"number | BigNumber | Complex | Unit, Matrix, string":function(e,t,n){return m(t),_(e,t,n)}});function p(e,t){var n=Fw(e)?new s(-1):-1,i=d(e),a=f(e);return g([[i,r(n,a)],[a,i]],t)}function m(e){var t=e.size();if(t.length<1||t[0]!==3)throw RangeError(`Vector must be of dimensions 1x3`)}function h(e){return e.reduce((e,t)=>r(e,t))}function g(e,t){if(t){if(t===`sparse`)return new u(e);if(t===`dense`)return new l(e);throw TypeError(`Unknown matrix type "${t}"`)}return e}function _(e,t,n){var r=o(t);if(r===0)throw RangeError(`Rotation around zero vector`);var c=Fw(e)?s:null,l=c?new c(1):1,u=c?new c(-1):-1,p=c?new c(t.get([0])/r):t.get([0])/r,m=c?new c(t.get([1])/r):t.get([1])/r,_=c?new c(t.get([2])/r):t.get([2])/r,v=d(e),y=i(l,a(v)),b=f(e),x=i(v,h([p,p,y])),S=i(h([p,m,y]),h([u,_,b])),C=i(h([p,_,y]),h([m,b])),w=i(h([p,m,y]),h([_,b])),T=i(v,h([m,m,y])),E=i(h([m,_,y]),h([u,p,b])),D=i(h([p,_,y]),h([u,m,b])),O=i(h([m,_,y]),h([p,b])),k=i(v,h([_,_,y]));return g([[x,S,C],[w,T,E],[D,O,k]],n)}}),wF=`row`,TF=K(wF,[`typed`,`Index`,`matrix`,`range`],e=>{var{typed:t,Index:n,matrix:r,range:i}=e;return t(wF,{"Matrix, number":a,"Array, number":function(e,t){return a(r(CT(e)),t).valueOf()}});function a(e,t){if(e.size().length!==2)throw Error(`Only two dimensional matrix is supported`);ik(t,e.size()[0]);var a=i(0,e.size()[1]),o=new n([t],a),s=e.subset(o);return Hw(s)?s:r([[s]])}}),EF=`size`,DF=K(EF,[`typed`],e=>{var{typed:t}=e;return t(EF,{Matrix:e=>e.size(),Array:ek,string:e=>[e.length],"number | Complex | BigNumber | Unit | boolean | null":e=>[]})}),OF=`squeeze`,kF=K(OF,[`typed`],e=>{var{typed:t}=e;return t(OF,{Array:function(e){return fk(CT(e))},Matrix:function(e){var t=fk(e.toArray());return Array.isArray(t)?e.create(t,e.datatype()):t},any:function(e){return CT(e)}})}),AF=`subset`,jF=K(AF,[`typed`,`matrix`,`zeros`,`add`],e=>{var{typed:t,matrix:n,zeros:r,add:i}=e;return t(AF,{"Matrix, Index":function(e,t){return ak(t)?n():(rk(e,t),e.subset(t))},"Array, Index":t.referTo(`Matrix, Index`,function(e){return function(t,r){var i=e(n(t),r);return r.isScalar()?i:i.valueOf()}}),"Object, Index":PF,"string, Index":MF,"Matrix, Index, any, any":function(e,t,n,r){return ak(t)?e:(rk(e,t),e.clone().subset(t,a(n,t),r))},"Array, Index, any, any":t.referTo(`Matrix, Index, any, any`,function(e){return function(t,r,i,a){var o=e(n(t),r,i,a);return o.isMatrix?o.valueOf():o}}),"Array, Index, any":t.referTo(`Matrix, Index, any, any`,function(e){return function(t,r,i){return e(n(t),r,i,void 0).valueOf()}}),"Matrix, Index, any":t.referTo(`Matrix, Index, any, any`,function(e){return function(t,n,r){return e(t,n,r,void 0)}}),"string, Index, string":NF,"string, Index, string, string":NF,"Object, Index, any":FF});function a(e,t){if(typeof e==`string`)throw Error(`can't boradcast a string`);if(t.isScalar())return e;var n=t.size();if(n.every(e=>e>0))try{return i(e,r(n))}catch{return e}else return e}});function MF(e,t){if(!qw(t))throw TypeError(`Index expected`);if(ak(t))return``;if(rk(Array.from(e),t),t.size().length!==1)throw new QO(t.size().length,1);var n=e.length;ik(t.min()[0],n),ik(t.max()[0],n);var r=t.dimension(0),i=``;function a(t){i+=e.charAt(t)}return Number.isInteger(r)?a(r):r.forEach(a),i}function NF(e,t,n,r){if(!t||t.isIndex!==!0)throw TypeError(`Index expected`);if(ak(t))return e;if(rk(Array.from(e),t),t.size().length!==1)throw new QO(t.size().length,1);if(r!==void 0){if(typeof r!=`string`||r.length!==1)throw TypeError(`Single character expected as defaultValue`)}else r=` `;var i=t.dimension(0);if((Number.isInteger(i)?1:i.size()[0])!==n.length)throw new QO(i.size()[0],n.length);var a=e.length;ik(t.min()[0]),ik(t.max()[0]);for(var o=[],s=0;s<a;s++)o[s]=e.charAt(s);function c(e,t){o[e]=n.charAt(t[0])}if(Number.isInteger(i)?c(i,[0]):i.forEach(c),o.length>a)for(var l=a-1,u=o.length;l<u;l++)o[l]||(o[l]=r);return o.join(``)}function PF(e,t){if(!ak(t)){if(t.size().length!==1)throw new QO(t.size(),1);var n=t.dimension(0);if(typeof n!=`string`)throw TypeError(`String expected as index to retrieve an object property`);return bw(e,n)}}function FF(e,t,n){if(ak(t))return e;if(t.size().length!==1)throw new QO(t.size(),1);var r=t.dimension(0);if(typeof r!=`string`)throw TypeError(`String expected as index to retrieve an object property`);var i=CT(e);return xw(i,r,n),i}var IF=`transpose`,LF=K(IF,[`typed`,`matrix`],e=>{var{typed:t,matrix:n}=e;return t(IF,{Array:e=>r(n(e)).valueOf(),Matrix:r,any:CT});function r(e){var t=e.size(),n;switch(t.length){case 1:n=e.clone();break;case 2:var r=t[0],o=t[1];if(o===0)throw RangeError(`Cannot transpose a 2D matrix with no columns (size: `+WO(t)+`)`);switch(e.storage()){case`dense`:n=i(e,r,o);break;case`sparse`:n=a(e,r,o);break}break;default:throw RangeError(`Matrix must be a vector or two dimensional (size: `+WO(t)+`)`)}return n}function i(e,t,n){for(var r=e._data,i=[],a,o=0;o<n;o++){a=i[o]=[];for(var s=0;s<t;s++)a[s]=CT(r[s][o])}return e.createDenseMatrix({data:i,size:[n,t],datatype:e._datatype})}function a(e,t,n){for(var r=e._values,i=e._index,a=e._ptr,o=r?[]:void 0,s=[],c=[],l=[],u=0;u<t;u++)l[u]=0;var d,f,p;for(d=0,f=i.length;d<f;d++)l[i[d]]++;for(var m=0,h=0;h<t;h++)c.push(m),m+=l[h],l[h]=c[h];for(c.push(m),p=0;p<n;p++)for(var g=a[p],_=a[p+1],v=g;v<_;v++){var y=l[i[v]]++;s[y]=p,r&&(o[y]=CT(r[v]))}return e.createSparseMatrix({values:o,index:s,ptr:c,size:[n,t],datatype:e._datatype})}}),RF=`ctranspose`,zF=K(RF,[`typed`,`transpose`,`conj`],e=>{var{typed:t,transpose:n,conj:r}=e;return t(RF,{any:function(e){return r(n(e))}})}),BF=`zeros`,VF=K(BF,[`typed`,`config`,`matrix`,`BigNumber`],e=>{var{typed:t,config:n,matrix:r,BigNumber:i}=e;return t(BF,{"":function(){return n.matrix===`Array`?a([]):a([],`default`)},"...number | BigNumber | string":function(e){return typeof e[e.length-1]==`string`?a(e,e.pop()):n.matrix===`Array`?a(e):a(e,`default`)},Array:a,Matrix:function(e){var t=e.storage();return a(e.valueOf(),t)},"Array | Matrix, string":function(e,t){return a(e.valueOf(),t)}});function a(e,t){var n=o(e)?new i(0):0;if(s(e),t){var a=r(t);return e.length>0?a.resize(e,n):a}else{var c=[];return e.length>0?ok(c,e,n):c}}function o(e){var t=!1;return e.forEach(function(e,n,r){Fw(e)&&(t=!0,r[n]=e.toNumber())}),t}function s(e){e.forEach(function(e){if(typeof e!=`number`||!q(e)||e<0)throw Error(`Parameters in function zeros must be positive integers`)})}}),HF=`fft`,UF=K(HF,[`typed`,`matrix`,`addScalar`,`multiplyScalar`,`divideScalar`,`exp`,`tau`,`i`,`dotDivide`,`conj`,`pow`,`ceil`,`log2`],e=>{var{typed:t,matrix:n,addScalar:r,multiplyScalar:i,divideScalar:a,exp:o,tau:s,i:c,dotDivide:l,conj:u,pow:d,ceil:f,log2:p}=e;return t(HF,{Array:m,Matrix:function(e){return e.create(m(e.valueOf()),e.datatype())}});function m(e){var t=ek(e);return t.length===1?_(e,t[0]):h(e.map(e=>m(e,t.slice(1))),0)}function h(e,t){var n=ek(e);if(t!==0)return Array(n[0]).fill(0).map((n,r)=>h(e[r],t-1));if(n.length===1)return _(e);function r(e){var t=ek(e);return Array(t[1]).fill(0).map((n,r)=>Array(t[0]).fill(0).map((t,n)=>e[n][r]))}return r(h(r(e),1))}function g(e){for(var t=e.length,n=o(a(i(-1,i(c,s)),t)),r=[],h=1-t;h<t;h++)r.push(d(n,a(d(h,2),2)));for(var g=d(2,f(p(t+t-1))),v=[...Array(t).fill(0).map((n,a)=>i(e[a],r[t-1+a])),...Array(g-t).fill(0)],y=[...Array(t+t-1).fill(0).map((e,t)=>a(1,r[t])),...Array(g-(t+t-1)).fill(0)],b=_(v),x=_(y),S=l(u(m(u(Array(g).fill(0).map((e,t)=>i(b[t],x[t]))))),g),C=[],w=t-1;w<t+t-1;w++)C.push(i(S[w],r[w]));return C}function _(e){var t=e.length;if(t===1)return[e[0]];if(t%2==0){for(var n=[..._(e.filter((e,t)=>t%2==0),t/2),..._(e.filter((e,t)=>t%2==1),t/2)],l=0;l<t/2;l++){var u=n[l],d=i(n[l+t/2],o(i(i(s,c),a(-l,t))));n[l]=r(u,d),n[l+t/2]=r(u,i(-1,d))}return n}else return g(e)}}),WF=`ifft`,GF=K(WF,[`typed`,`fft`,`dotDivide`,`conj`],e=>{var{typed:t,fft:n,dotDivide:r,conj:i}=e;return t(WF,{"Array | Matrix":function(e){var t=Hw(e)?e.size():ek(e);return r(i(n(i(e))),t.reduce((e,t)=>e*t,1))}})});function KF(e){"@babel/helpers - typeof";return KF=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},KF(e)}function qF(e,t){if(KF(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(KF(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function JF(e){var t=qF(e,`string`);return KF(t)==`symbol`?t:t+``}function YF(e,t,n){return(t=JF(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function XF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ZF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?XF(Object(n),!0).forEach(function(t){YF(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XF(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var QF=K(`solveODE`,[`typed`,`add`,`subtract`,`multiply`,`divide`,`max`,`map`,`abs`,`isPositive`,`isNegative`,`larger`,`smaller`,`matrix`,`bignumber`,`unaryMinus`],e=>{var{typed:t,add:n,subtract:r,multiply:i,divide:a,max:o,map:s,abs:c,isPositive:l,isNegative:u,larger:d,smaller:f,matrix:p,bignumber:m,unaryMinus:h}=e;function g(e){return function(t,p,g,_){if(!(p.length===2&&(p.every(S)||p.every(zw))))throw Error(`"tspan" must be an Array of two numeric values or two units [tStart, tEnd]`);var v=p[0],y=p[1],C=d(y,v),w=_.firstStep;if(w!==void 0&&!l(w))throw Error(`"firstStep" must be positive`);var T=_.maxStep;if(T!==void 0&&!l(T))throw Error(`"maxStep" must be positive`);var E=_.minStep;if(E&&u(E))throw Error(`"minStep" must be positive or zero`);var D=[v,y,w,E,T].filter(e=>e!==void 0);if(!(D.every(S)||D.every(zw)))throw Error(`Inconsistent type of "t" dependant variables`);for(var O=1,k=_.tol?_.tol:1e-4,A=_.minDelta?_.minDelta:.2,j=_.maxDelta?_.maxDelta:5,M=_.maxIter?_.maxIter:1e4,N=[v,y,...g,T,E].some(Fw),[ee,P,te,ne]=N?[m(e.a),m(e.c),m(e.b),m(e.bp)]:[e.a,e.c,e.b,e.bp],re=w?C?w:h(w):a(r(y,v),O),F=[v],ie=[g],I=r(te,ne),ae=0,oe=0,L=b(C),se=x(C);L(F[ae],y);){var ce=[];re=se(F[ae],y,re),ce.push(t(F[ae],ie[ae]));for(var le=1;le<P.length;++le)ce.push(t(n(F[ae],i(P[le],re)),n(ie[ae],i(re,ee[le],ce))));var ue=o(c(s(i(I,ce),e=>zw(e)?e.value:e)));ue<k&&k/ue>1/4&&(F.push(n(F[ae],re)),ie.push(n(ie[ae],i(re,te,ce))),ae++);var R=.84*(k/ue)**(1/5);if(f(R,A)?R=A:d(R,j)&&(R=j),R=N?m(R):R,re=i(re,R),T&&d(c(re),T)?re=C?T:h(T):E&&f(c(re),E)&&(re=C?E:h(E)),oe++,oe>M)throw Error(`Maximum number of iterations reached, try changing options`)}return{t:F,y:ie}}}function _(e,t,n,r){return g({a:[[],[1/2],[0,3/4],[2/9,1/3,4/9]],c:[null,1/2,3/4,1],b:[2/9,1/3,4/9,0],bp:[7/24,1/4,1/3,1/8]})(e,t,n,r)}function v(e,t,n,r){return g({a:[[],[1/5],[3/40,9/40],[44/45,-56/15,32/9],[19372/6561,-25360/2187,64448/6561,-212/729],[9017/3168,-355/33,46732/5247,49/176,-5103/18656],[35/384,0,500/1113,125/192,-2187/6784,11/84]],c:[null,1/5,3/10,4/5,8/9,1,1],b:[35/384,0,500/1113,125/192,-2187/6784,11/84,0],bp:[5179/57600,0,7571/16695,393/640,-92097/339200,187/2100,1/40]})(e,t,n,r)}function y(e,t,n,r){var i=r.method?r.method:`RK45`,a={RK23:_,RK45:v};if(i.toUpperCase()in a){var o=ZF({},r);return delete o.method,a[i.toUpperCase()](e,t,n,o)}else{var s=Object.keys(a).map(e=>`"${e}"`),c=`${s.slice(0,-1).join(`, `)} and ${s.slice(-1)}`;throw Error(`Unavailable method "${i}". Available methods are ${c}`)}}function b(e){return e?f:d}function x(e){var t=e?d:f;return function(e,i,a){return t(n(e,a),i)?r(i,e):a}}function S(e){return Fw(e)||Pw(e)}function C(e,t,n,r){var i=y(e,t.toArray(),n.toArray(),r);return{t:p(i.t),y:p(i.y)}}return t(`solveODE`,{"function, Array, Array, Object":y,"function, Matrix, Matrix, Object":C,"function, Array, Array":(e,t,n)=>y(e,t,n,{}),"function, Matrix, Matrix":(e,t,n)=>C(e,t,n,{}),"function, Array, number | BigNumber | Unit":(e,t,n)=>{var r=y(e,t,[n],{});return{t:r.t,y:r.y.map(e=>e[0])}},"function, Matrix, number | BigNumber | Unit":(e,t,n)=>{var r=y(e,t.toArray(),[n],{});return{t:p(r.t),y:p(r.y.map(e=>e[0]))}},"function, Array, number | BigNumber | Unit, Object":(e,t,n,r)=>{var i=y(e,t,[n],r);return{t:i.t,y:i.y.map(e=>e[0])}},"function, Matrix, number | BigNumber | Unit, Object":(e,t,n,r)=>{var i=y(e,t.toArray(),[n],r);return{t:p(i.t),y:p(i.y.map(e=>e[0]))}}})}),$F=K(`erf`,[`typed`],e=>{var{typed:t}=e;return t(`name`,{number:function(e){var t=Math.abs(e);return t>=iI?IT(e):t<=eI?IT(e)*n(t):t<=4?IT(e)*(1-r(t)):IT(e)*(1-i(t))},"Array | Matrix":t.referToSelf(e=>t=>qk(t,e))});function n(e){var t=e*e,n=nI[0][4]*t,r=t,i;for(i=0;i<3;i+=1)n=(n+nI[0][i])*t,r=(r+rI[0][i])*t;return e*(n+nI[0][3])/(r+rI[0][3])}function r(e){var t=nI[1][8]*e,n=e,r;for(r=0;r<7;r+=1)t=(t+nI[1][r])*e,n=(n+rI[1][r])*e;var i=(t+nI[1][7])/(n+rI[1][7]),a=parseInt(e*16)/16,o=(e-a)*(e+a);return Math.exp(-a*a)*Math.exp(-o)*i}function i(e){var t=1/(e*e),n=nI[2][5]*t,r=t,i;for(i=0;i<4;i+=1)n=(n+nI[2][i])*t,r=(r+rI[2][i])*t;var a=t*(n+nI[2][4])/(r+rI[2][4]);a=(tI-a)/e,t=parseInt(e*16)/16;var o=(e-t)*(e+t);return Math.exp(-t*t)*Math.exp(-o)*a}}),eI=.46875,tI=.5641895835477563,nI=[[3.1611237438705655,113.86415415105016,377.485237685302,3209.3775891384694,.18577770618460315],[.5641884969886701,8.883149794388377,66.11919063714163,298.6351381974001,881.952221241769,1712.0476126340707,2051.0783778260716,1230.3393547979972,2.1531153547440383e-8],[.30532663496123236,.36034489994980445,.12578172611122926,.016083785148742275,.0006587491615298378,.016315387137302097]],rI=[[23.601290952344122,244.02463793444417,1282.6165260773723,2844.236833439171],[15.744926110709835,117.6939508913125,537.1811018620099,1621.3895745666903,3290.7992357334597,4362.619090143247,3439.3676741437216,1230.3393548037495],[2.568520192289822,1.8729528499234604,.5279051029514285,.06051834131244132,.0023352049762686918]],iI=2**53,aI=`zeta`,oI=K(aI,[`typed`,`config`,`multiply`,`pow`,`divide`,`factorial`,`equal`,`smallerEq`,`isBounded`,`isNegative`,`gamma`,`sin`,`subtract`,`add`,`?Complex`,`?BigNumber`,`pi`],e=>{var{typed:t,config:n,multiply:r,pow:i,divide:a,factorial:o,equal:s,smallerEq:c,isBounded:l,isNegative:u,gamma:d,sin:f,subtract:p,add:m,Complex:h,BigNumber:g,pi:_}=e;return t(aI,{number:e=>v(e,e=>e,()=>20),BigNumber:e=>v(e,e=>new g(e),()=>Math.abs(Math.log10(n.relTol))),Complex:y});function v(e,t,n){return s(e,0)?t(-.5):s(e,1)?t(NaN):l(e)?b(e,t,n,e=>e):u(e)?t(NaN):t(1)}function y(e){return e.re===0&&e.im===0?new h(-.5):e.re===1?new h(NaN,NaN):e.re===1/0&&e.im===0?new h(1):e.im===1/0||e.re===-1/0?new h(NaN,NaN):b(e,e=>e,e=>Math.round(1.3*15+.9*Math.abs(e.im)),e=>e.re)}function b(e,t,n,o){var s=n(e);if(o(e)>-(s-1)/2)return S(e,t(s),t);var c=r(i(2,e),i(t(_),p(e,1)));return c=r(c,f(r(a(t(_),2),e))),c=r(c,d(p(1,e))),r(c,b(p(1,e),t,n,o))}function x(e,t){for(var n=e,s=e;c(s,t);s=m(s,1)){var l=a(r(o(m(t,p(s,1))),i(4,s)),r(o(p(t,s)),o(r(2,s))));n=m(n,l)}return r(t,n)}function S(e,t,n){for(var o=a(1,r(x(n(0),t),p(1,i(2,p(1,e))))),s=n(0),l=n(1);c(l,t);l=m(l,1))s=m(s,a(r((-1)**(l-1),x(l,t)),i(l,e)));return r(o,s)}}),sI=`mode`,cI=K(sI,[`typed`,`isNaN`,`isNumeric`],e=>{var{typed:t,isNaN:n,isNumeric:r}=e;return t(sI,{"Array | Matrix":i,"...":function(e){return i(e)}});function i(e){if(e=gk(e.valueOf()),e.length===0)throw Error(`Cannot calculate mode of an empty array`);for(var t={},i=[],a=0,o=0;o<e.length;o++){var s=e[o];if(r(s)&&n(s))throw Error(`Cannot calculate mode of an array containing NaN values`);s in t||(t[s]=0),t[s]++,t[s]===a?i.push(s):t[s]>a&&(a=t[s],i=[s])}return i}});function lI(e,t,n){var r;return String(e).includes(`Unexpected type`)?(r=arguments.length>2?` (type: `+ST(n)+`, value: `+JSON.stringify(n)+`)`:` (type: `+e.data.actual+`)`,TypeError(`Cannot calculate `+t+`, unexpected type of argument`+r)):String(e).includes(`complex numbers`)?(r=arguments.length>2?` (type: `+ST(n)+`, value: `+JSON.stringify(n)+`)`:``,TypeError(`Cannot calculate `+t+`, no ordering relation is defined for complex numbers`+r)):e}var uI=`prod`,dI=K(uI,[`typed`,`config`,`multiplyScalar`,`numeric`],e=>{var{typed:t,config:n,multiplyScalar:r,numeric:i}=e;return t(uI,{"Array | Matrix":a,"Array | Matrix, number | BigNumber":function(e,t){throw Error(`prod(A, dim) is not yet supported`)},"...":function(e){return a(e)}});function a(e){var t;if(Kk(e,function(e){try{t=t===void 0?e:r(t,e)}catch(t){throw lI(t,`prod`,e)}}),typeof t==`string`&&(t=i(t,FT(t,n))),t===void 0)throw Error(`Cannot calculate prod of an empty array`);return t}}),fI=`format`,pI=K(fI,[`typed`],e=>{var{typed:t}=e;return t(fI,{any:WO,"any, Object | function | number | BigNumber":WO})}),mI=`bin`,hI=K(mI,[`typed`,`format`],e=>{var{typed:t,format:n}=e;return t(mI,{"number | BigNumber":function(e){return n(e,{notation:`bin`})},"number | BigNumber, number | BigNumber":function(e,t){return n(e,{notation:`bin`,wordSize:t})}})}),gI=`oct`,_I=K(gI,[`typed`,`format`],e=>{var{typed:t,format:n}=e;return t(gI,{"number | BigNumber":function(e){return n(e,{notation:`oct`})},"number | BigNumber, number | BigNumber":function(e,t){return n(e,{notation:`oct`,wordSize:t})}})}),vI=`hex`,yI=K(vI,[`typed`,`format`],e=>{var{typed:t,format:n}=e;return t(vI,{"number | BigNumber":function(e){return n(e,{notation:`hex`})},"number | BigNumber, number | BigNumber":function(e,t){return n(e,{notation:`hex`,wordSize:t})}})}),bI=/\$([\w.]+)/g,xI=`print`,SI=K(xI,[`typed`],e=>{var{typed:t}=e;return t(xI,{"string, Object | Array":CI,"string, Object | Array, number | Object":CI})});function CI(e,t,n){return e.replace(bI,function(e,r){var i=r.split(`.`),a=t[i.shift()];for(a!==void 0&&a.isMatrix&&(a=a.toArray());i.length&&a!==void 0;){var o=i.shift();a=o?a[o]:a+`.`}return a===void 0?e:Bw(a)?a:WO(a,n)})}var wI=`to`,TI=K(wI,[`typed`,`matrix`,`concat`],e=>{var{typed:t,matrix:n,concat:r}=e,i=_N({typed:t,matrix:n,concat:r});return t(wI,{"Unit, Unit | string":(e,t)=>e.to(t)},i({Ds:!0}))}),EI=`toBest`,DI=K(EI,[`typed`],e=>{var{typed:t}=e;return t(EI,{Unit:e=>e.toBest(),"Unit, string":(e,t)=>e.toBest(t.split(`,`)),"Unit, string, Object":(e,t,n)=>e.toBest(t.split(`,`),n),"Unit, Array":(e,t)=>e.toBest(t),"Unit, Array, Object":(e,t,n)=>e.toBest(t,n)})}),OI=`isPrime`,kI=K(OI,[`typed`],e=>{var{typed:t}=e;return t(OI,{number:function(e){if(e<=3)return e>1;if(e%2==0||e%3==0)return!1;for(var t=5;t*t<=e;t+=6)if(e%t===0||e%(t+2)===0)return!1;return!0},bigint:function(e){if(e<=3n)return e>1n;if(e%2n==0n||e%3n==0n)return!1;for(var t=5n;t*t<=e;t+=6n)if(e%t===0n||e%(t+2n)===0n)return!1;return!0},BigNumber:function(e){if(e.lte(3))return e.gt(1);if(e.mod(2).eq(0)||e.mod(3).eq(0))return!1;if(e.lt(2**32)){for(var t=e.toNumber(),n=5;n*n<=t;n+=6)if(t%n===0||t%(n+2)===0)return!1;return!0}function r(e,t,n){for(var r=1;!t.eq(0);)t.mod(2).eq(0)?(t=t.div(2),e=e.mul(e).mod(n)):(t=t.sub(1),r=e.mul(r).mod(n));return r}e=new(e.constructor.clone({precision:e.toFixed(0).length*2}))(e);for(var i=0,a=e.sub(1);a.mod(2).eq(0);)a=a.div(2),i+=1;var o=null;if(e.lt(`3317044064679887385961981`))o=[2,3,5,7,11,13,17,19,23,29,31,37,41].filter(t=>t<e);else{var s=Math.min(e.toNumber()-2,Math.floor(2*(e.toFixed(0).length*Math.log(10))**2));o=[];for(var c=2;c<=s;c+=1)o.push(s)}for(var l=0;l<o.length;l+=1){var u=o[l],d=r(e.sub(e).add(u),a,e);if(!d.eq(1)){for(var f=0,p=d;!p.eq(e.sub(1));f+=1,p=p.mul(p).mod(e))if(f===i-1)return!1}}return!0},"Array | Matrix":t.referToSelf(e=>t=>qk(t,e))})}),AI=K(`numeric`,[`number`,`?bignumber`,`?fraction`],e=>{var{number:t,bignumber:n,fraction:r}=e,i={string:!0,number:!0,BigNumber:!0,Fraction:!0},a={number:e=>t(e),BigNumber:n?e=>n(e):fF,bigint:e=>BigInt(e),Fraction:r?e=>r(e):pF};return function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`number`;if((arguments.length>2?arguments[2]:void 0)!==void 0)throw SyntaxError(`numeric() takes one or two arguments`);var n=ST(e);if(!(n in i))throw TypeError(`Cannot convert `+e+` of type "`+n+`"; valid input types are `+Object.keys(i).join(`, `));if(!(t in a))throw TypeError(`Cannot convert `+e+` to type "`+t+`"; valid output types are `+Object.keys(a).join(`, `));return t===n?e:a[t](e)}}),jI=`divideScalar`,MI=K(jI,[`typed`,`numeric`],e=>{var{typed:t,numeric:n}=e;return t(jI,{"number, number":function(e,t){return e/t},"Complex, Complex":function(e,t){return e.div(t)},"BigNumber, BigNumber":function(e,t){return e.div(t)},"bigint, bigint":function(e,t){return e/t},"Fraction, Fraction":function(e,t){return e.div(t)},"Unit, number | Complex | Fraction | BigNumber | Unit":(e,t)=>e.divide(t),"number | Fraction | Complex | BigNumber, Unit":(e,t)=>t.divideInto(e)})}),NI=`pow`,PI=K(NI,[`typed`,`config`,`identity`,`multiply`,`matrix`,`inv`,`fraction`,`number`,`Complex`],e=>{var{typed:t,config:n,identity:r,multiply:i,matrix:a,inv:o,number:s,fraction:c,Complex:l}=e;return t(NI,{"number, number":u,"Complex, Complex":function(e,t){return e.pow(t)},"BigNumber, BigNumber":function(e,t){return t.isInteger()||e>=0||n.predictable?e.pow(t):new l(e.toNumber(),0).pow(t.toNumber(),0)},"bigint, bigint":(e,t)=>e**t,"Fraction, Fraction":function(e,t){var r=e.pow(t);if(r!=null)return r;if(n.predictable)throw Error(`Result of pow is non-rational and cannot be expressed as a fraction`);return u(e.valueOf(),t.valueOf())},"Array, number":d,"Array, BigNumber":function(e,t){return d(e,t.toNumber())},"Matrix, number":f,"Matrix, BigNumber":function(e,t){return f(e,t.toNumber())},"Unit, number | BigNumber":function(e,t){return e.pow(t)}});function u(e,t){if(n.predictable&&!q(t)&&e<0)try{var r=c(t),i=s(r);if((t===i||Math.abs((t-i)/t)<1e-14)&&r.d%2n==1n)return(r.n%2n==0n?1:-1)*(-e)**+t}catch{}return n.predictable&&(e<-1&&t===1/0||e>-1&&e<0&&t===-1/0)?NaN:q(t)||e>=0||n.predictable?wA(e,t):e*e<1&&t===1/0||e*e>1&&t===-1/0?0:new l(e,0).pow(t,0)}function d(e,t){if(!q(t))throw TypeError(`For A^b, b must be an integer (value is `+t+`)`);var n=ek(e);if(n.length!==2)throw Error(`For A^b, A must be 2 dimensional (A has `+n.length+` dimensions)`);if(n[0]!==n[1])throw Error(`For A^b, A must be square (size is `+n[0]+`x`+n[1]+`)`);if(t<0)try{return d(o(e),-t)}catch(e){throw e.message===`Cannot calculate inverse, determinant is zero`?TypeError(`For A^b, when A is not invertible, b must be a positive integer (value is `+t+`)`):e}for(var a=r(n[0]).valueOf(),s=e;t>=1;)(t&1)==1&&(a=i(s,a)),t>>=1,s=i(s,s);return a}function f(e,t){return a(d(e.valueOf(),t))}}),FI=`Number of decimals in function round must be an integer`,II=`round`,LI=K(II,[`typed`,`config`,`matrix`,`equalScalar`,`zeros`,`BigNumber`,`DenseMatrix`],e=>{var{typed:t,config:n,matrix:r,equalScalar:i,zeros:a,BigNumber:o,DenseMatrix:s}=e,c=HM({typed:t,equalScalar:i}),l=UM({typed:t,DenseMatrix:s}),u=WM({typed:t});function d(e){return Math.abs(GT(e).exponent)}return t(II,{number:function(e){var t=TA(e,d(n.relTol));return TA($T(e,t,n.relTol,n.absTol)?t:e)},"number, number":function(e,t){var r=d(n.relTol);if(t>=r)return TA(e,t);var i=TA(e,r);return TA($T(e,i,n.relTol,n.absTol)?i:e,t)},"number, BigNumber":function(e,t){if(!t.isInteger())throw TypeError(FI);return new o(e).toDecimalPlaces(t.toNumber())},Complex:function(e){return e.round()},"Complex, number":function(e,t){if(t%1)throw TypeError(FI);return e.round(t)},"Complex, BigNumber":function(e,t){if(!t.isInteger())throw TypeError(FI);var n=t.toNumber();return e.round(n)},BigNumber:function(e){var t=new o(e).toDecimalPlaces(d(n.relTol));return(Nj(e,t,n.relTol,n.absTol)?t:e).toDecimalPlaces(0)},"BigNumber, BigNumber":function(e,t){if(!t.isInteger())throw TypeError(FI);var r=d(n.relTol);if(t>=r)return e.toDecimalPlaces(t.toNumber());var i=e.toDecimalPlaces(r);return(Nj(e,i,n.relTol,n.absTol)?i:e).toDecimalPlaces(t.toNumber())},bigint:e=>e,"bigint, number":(e,t)=>e,"bigint, BigNumber":(e,t)=>e,Fraction:function(e){return e.round()},"Fraction, number":function(e,t){if(t%1)throw TypeError(FI);return e.round(t)},"Fraction, BigNumber":function(e,t){if(!t.isInteger())throw TypeError(FI);return e.round(t.toNumber())},"Unit, number, Unit":t.referToSelf(e=>function(t,n,r){var i=t.toNumeric(r);return r.multiply(e(i,n))}),"Unit, BigNumber, Unit":t.referToSelf(e=>(t,n,r)=>e(t,n.toNumber(),r)),"Array | Matrix, number | BigNumber, Unit":t.referToSelf(e=>(t,n,r)=>qk(t,t=>e(t,n,r),!0)),"Array | Matrix | Unit, Unit":t.referToSelf(e=>(t,n)=>e(t,0,n)),"Array | Matrix":t.referToSelf(e=>t=>qk(t,e,!0)),"SparseMatrix, number | BigNumber":t.referToSelf(e=>(t,n)=>c(t,n,e,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(e=>(t,n)=>u(t,n,e,!1)),"Array, number | BigNumber":t.referToSelf(e=>(t,n)=>u(r(t),n,e,!1).valueOf()),"number | Complex | BigNumber | Fraction, SparseMatrix":t.referToSelf(e=>(t,n)=>i(t,0)?a(n.size(),n.storage()):l(n,t,e,!0)),"number | Complex | BigNumber | Fraction, DenseMatrix":t.referToSelf(e=>(t,n)=>i(t,0)?a(n.size(),n.storage()):u(n,t,e,!0)),"number | Complex | BigNumber | Fraction, Array":t.referToSelf(e=>(t,n)=>u(r(n),t,e,!0).valueOf())})}),RI=`log`,zI=[`config`,`typed`,`typeOf`,`divideScalar`,`Complex`],BI=Math.log(16),VI=K(RI,zI,e=>{var{typed:t,typeOf:n,config:r,divideScalar:i,Complex:a}=e;function o(e){return e.log()}function s(e){return o(new a(e,0))}return t(RI,{number:function(e){return e>=0||r.predictable?mA(e):s(e)},bigint:NN(BI,mA,r,s),Complex:o,BigNumber:function(e){return!e.isNegative()||r.predictable?e.ln():s(e.toNumber())},"any, any":t.referToSelf(e=>(t,r)=>{if(n(t)===`Fraction`&&n(r)===`Fraction`){var a=t.log(r);if(a!==null)return a}return i(e(t),e(r))})})}),HI=`log1p`,UI=K(HI,[`typed`,`config`,`divideScalar`,`log`,`Complex`],e=>{var{typed:t,config:n,divideScalar:r,log:i,Complex:a}=e;return t(HI,{number:function(e){return e>=-1||n.predictable?zT(e):o(new a(e,0))},Complex:o,BigNumber:function(e){var t=e.plus(1);return!t.isNegative()||n.predictable?t.ln():o(new a(e.toNumber(),0))},"Array | Matrix":t.referToSelf(e=>t=>qk(t,e)),"any, any":t.referToSelf(e=>(t,n)=>r(e(t),i(n)))});function o(e){var t=e.re+1;return new a(Math.log(Math.sqrt(t*t+e.im*e.im)),Math.atan2(e.im,t))}}),WI=`nthRoots`,GI=K(WI,[`config`,`typed`,`divideScalar`,`Complex`],e=>{var{typed:t,config:n,divideScalar:r,Complex:i}=e,a=[function(e){return new i(e,0)},function(e){return new i(0,e)},function(e){return new i(-e,0)},function(e){return new i(0,-e)}];function o(e,t){if(t<0)throw Error(`Root must be greater than zero`);if(t===0)throw Error(`Root must be non-zero`);if(t%1!=0)throw Error(`Root must be an integer`);if(e===0||e.abs()===0)return[new i(0,0)];var n=typeof e==`number`,r;(n||e.re===0||e.im===0)&&(r=n?2*(e<0):e.im===0?2*(e.re<0):2*(e.im<0)+1);for(var o=e.arg(),s=e.abs(),c=[],l=s**(1/t),u=0;u<t;u++){var d=(r+4*u)/t;if(d===Math.round(d)){c.push(a[d%4](l));continue}c.push(new i({r:l,phi:(o+2*Math.PI*u)/t}))}return c}return t(WI,{Complex:function(e){return o(e,2)},"Complex, number":o})}),KI=`dotPow`,qI=K(KI,[`typed`,`equalScalar`,`matrix`,`pow`,`DenseMatrix`,`concat`,`SparseMatrix`],e=>{var{typed:t,equalScalar:n,matrix:r,pow:i,DenseMatrix:a,concat:o,SparseMatrix:s}=e,c=fN({typed:t}),l=yP({typed:t,SparseMatrix:s}),u=HM({typed:t,equalScalar:n}),d=UM({typed:t,DenseMatrix:a}),f=_N({typed:t,matrix:r,concat:o}),p={};for(var m in i.signatures)Object.prototype.hasOwnProperty.call(i.signatures,m)&&!m.includes(`Matrix`)&&!m.includes(`Array`)&&(p[m]=i.signatures[m]);return t(KI,f({elop:t(p),SS:l,DS:c,Ss:u,sS:d}))}),JI=`dotDivide`,YI=K(JI,[`typed`,`matrix`,`equalScalar`,`divideScalar`,`DenseMatrix`,`concat`,`SparseMatrix`],e=>{var{typed:t,matrix:n,equalScalar:r,divideScalar:i,DenseMatrix:a,concat:o,SparseMatrix:s}=e,c=dN({typed:t,equalScalar:r}),l=fN({typed:t}),u=yP({typed:t,SparseMatrix:s}),d=HM({typed:t,equalScalar:r}),f=UM({typed:t,DenseMatrix:a});return t(JI,_N({typed:t,matrix:n,concat:o})({elop:i,SS:u,DS:l,SD:c,Ss:d,sS:f}))});function XI(e){var{DenseMatrix:t}=e;return function(e,n,r){var i=e.size();if(i.length!==2)throw RangeError(`Matrix must be two dimensional (size: `+WO(i)+`)`);var a=i[0];if(a!==i[1])throw RangeError(`Matrix must be square (size: `+WO(i)+`)`);var o=[];if(Hw(n)){var s=n.size(),c=n._data;if(s.length===1){if(s[0]!==a)throw RangeError(`Dimension mismatch. Matrix columns must match vector length.`);for(var l=0;l<a;l++)o[l]=[c[l]];return new t({data:o,size:[a,1],datatype:n._datatype})}if(s.length===2){if(s[0]!==a||s[1]!==1)throw RangeError(`Dimension mismatch. Matrix columns must match vector length.`);if(Ww(n)){if(r){o=[];for(var u=0;u<a;u++)o[u]=[c[u][0]];return new t({data:o,size:[a,1],datatype:n._datatype})}return n}if(Gw(n)){for(var d=0;d<a;d++)o[d]=[0];for(var f=n._values,p=n._index,m=n._ptr,h=m[1],g=m[0];g<h;g++){var _=p[g];o[_][0]=f[g]}return new t({data:o,size:[a,1],datatype:n._datatype})}}throw RangeError(`Dimension mismatch. The right side has to be either 1- or 2-dimensional vector.`)}if(Vw(n)){var v=ek(n);if(v.length===1){if(v[0]!==a)throw RangeError(`Dimension mismatch. Matrix columns must match vector length.`);for(var y=0;y<a;y++)o[y]=[n[y]];return new t({data:o,size:[a,1]})}if(v.length===2){if(v[0]!==a||v[1]!==1)throw RangeError(`Dimension mismatch. Matrix columns must match vector length.`);for(var b=0;b<a;b++)o[b]=[n[b][0]];return new t({data:o,size:[a,1]})}throw RangeError(`Dimension mismatch. The right side has to be either 1- or 2-dimensional vector.`)}}}var ZI=`lsolve`,QI=K(ZI,[`typed`,`matrix`,`divideScalar`,`multiplyScalar`,`subtractScalar`,`equalScalar`,`DenseMatrix`],e=>{var{typed:t,matrix:n,divideScalar:r,multiplyScalar:i,subtractScalar:a,equalScalar:o,DenseMatrix:s}=e,c=XI({DenseMatrix:s});return t(ZI,{"SparseMatrix, Array | Matrix":function(e,t){return u(e,t)},"DenseMatrix, Array | Matrix":function(e,t){return l(e,t)},"Array, Array | Matrix":function(e,t){return l(n(e),t).valueOf()}});function l(e,t){t=c(e,t,!0);for(var n=t._data,l=e._size[0],u=e._size[1],d=[],f=e._data,p=0;p<u;p++){var m=n[p][0]||0,h=void 0;if(o(m,0))h=0;else{var g=f[p][p];if(o(g,0))throw Error(`Linear system cannot be solved since matrix is singular`);h=r(m,g);for(var _=p+1;_<l;_++)n[_]=[a(n[_][0]||0,i(h,f[_][p]))]}d[p]=[h]}return new s({data:d,size:[l,1]})}function u(e,t){t=c(e,t,!0);for(var n=t._data,l=e._size[0],u=e._size[1],d=e._values,f=e._index,p=e._ptr,m=[],h=0;h<u;h++){var g=n[h][0]||0;if(o(g,0))m[h]=[0];else{for(var _=0,v=[],y=[],b=p[h],x=p[h+1],S=b;S<x;S++){var C=f[S];C===h?_=d[S]:C>h&&(v.push(d[S]),y.push(C))}if(o(_,0))throw Error(`Linear system cannot be solved since matrix is singular`);for(var w=r(g,_),T=0,E=y.length;T<E;T++){var D=y[T];n[D]=[a(n[D][0]||0,i(w,v[T]))]}m[h]=[w]}}return new s({data:m,size:[l,1]})}}),$I=`usolve`,eL=K($I,[`typed`,`matrix`,`divideScalar`,`multiplyScalar`,`subtractScalar`,`equalScalar`,`DenseMatrix`],e=>{var{typed:t,matrix:n,divideScalar:r,multiplyScalar:i,subtractScalar:a,equalScalar:o,DenseMatrix:s}=e,c=XI({DenseMatrix:s});return t($I,{"SparseMatrix, Array | Matrix":function(e,t){return u(e,t)},"DenseMatrix, Array | Matrix":function(e,t){return l(e,t)},"Array, Array | Matrix":function(e,t){return l(n(e),t).valueOf()}});function l(e,t){t=c(e,t,!0);for(var n=t._data,l=e._size[0],u=e._size[1],d=[],f=e._data,p=u-1;p>=0;p--){var m=n[p][0]||0,h=void 0;if(o(m,0))h=0;else{var g=f[p][p];if(o(g,0))throw Error(`Linear system cannot be solved since matrix is singular`);h=r(m,g);for(var _=p-1;_>=0;_--)n[_]=[a(n[_][0]||0,i(h,f[_][p]))]}d[p]=[h]}return new s({data:d,size:[l,1]})}function u(e,t){t=c(e,t,!0);for(var n=t._data,l=e._size[0],u=e._size[1],d=e._values,f=e._index,p=e._ptr,m=[],h=u-1;h>=0;h--){var g=n[h][0]||0;if(o(g,0))m[h]=[0];else{for(var _=0,v=[],y=[],b=p[h],x=p[h+1]-1;x>=b;x--){var S=f[x];S===h?_=d[x]:S<h&&(v.push(d[x]),y.push(S))}if(o(_,0))throw Error(`Linear system cannot be solved since matrix is singular`);for(var C=r(g,_),w=0,T=y.length;w<T;w++){var E=y[w];n[E]=[a(n[E][0],i(C,v[w]))]}m[h]=[C]}}return new s({data:m,size:[l,1]})}}),tL=`lsolveAll`,nL=K(tL,[`typed`,`matrix`,`divideScalar`,`multiplyScalar`,`subtractScalar`,`equalScalar`,`DenseMatrix`],e=>{var{typed:t,matrix:n,divideScalar:r,multiplyScalar:i,subtractScalar:a,equalScalar:o,DenseMatrix:s}=e,c=XI({DenseMatrix:s});return t(tL,{"SparseMatrix, Array | Matrix":function(e,t){return u(e,t)},"DenseMatrix, Array | Matrix":function(e,t){return l(e,t)},"Array, Array | Matrix":function(e,t){return l(n(e),t).map(e=>e.valueOf())}});function l(e,t){for(var n=[c(e,t,!0)._data.map(e=>e[0])],l=e._data,u=e._size[0],d=e._size[1],f=0;f<d;f++)for(var p=n.length,m=0;m<p;m++){var h=n[m];if(!o(l[f][f],0)){h[f]=r(h[f],l[f][f]);for(var g=f+1;g<d;g++)h[g]=a(h[g],i(h[f],l[g][f]))}else if(!o(h[f],0)){if(m===0)return[];n.splice(m,1),--m,--p}else if(m===0){var _=[...h];_[f]=1;for(var v=f+1;v<d;v++)_[v]=a(_[v],l[v][f]);n.push(_)}}return n.map(e=>new s({data:e.map(e=>[e]),size:[u,1]}))}function u(e,t){for(var n=[c(e,t,!0)._data.map(e=>e[0])],l=e._size[0],u=e._size[1],d=e._values,f=e._index,p=e._ptr,m=0;m<u;m++)for(var h=n.length,g=0;g<h;g++){for(var _=n[g],v=[],y=[],b=p[m],x=p[m+1],S=0,C=b;C<x;C++){var w=f[C];w===m?S=d[C]:w>m&&(v.push(d[C]),y.push(w))}if(!o(S,0)){_[m]=r(_[m],S);for(var T=0,E=y.length;T<E;T++){var D=y[T];_[D]=a(_[D],i(_[m],v[T]))}}else if(!o(_[m],0)){if(g===0)return[];n.splice(g,1),--g,--h}else if(g===0){var O=[..._];O[m]=1;for(var k=0,A=y.length;k<A;k++){var j=y[k];O[j]=a(O[j],v[k])}n.push(O)}}return n.map(e=>new s({data:e.map(e=>[e]),size:[l,1]}))}}),rL=`usolveAll`,iL=K(rL,[`typed`,`matrix`,`divideScalar`,`multiplyScalar`,`subtractScalar`,`equalScalar`,`DenseMatrix`],e=>{var{typed:t,matrix:n,divideScalar:r,multiplyScalar:i,subtractScalar:a,equalScalar:o,DenseMatrix:s}=e,c=XI({DenseMatrix:s});return t(rL,{"SparseMatrix, Array | Matrix":function(e,t){return u(e,t)},"DenseMatrix, Array | Matrix":function(e,t){return l(e,t)},"Array, Array | Matrix":function(e,t){return l(n(e),t).map(e=>e.valueOf())}});function l(e,t){for(var n=[c(e,t,!0)._data.map(e=>e[0])],l=e._data,u=e._size[0],d=e._size[1]-1;d>=0;d--)for(var f=n.length,p=0;p<f;p++){var m=n[p];if(!o(l[d][d],0)){m[d]=r(m[d],l[d][d]);for(var h=d-1;h>=0;h--)m[h]=a(m[h],i(m[d],l[h][d]))}else if(!o(m[d],0)){if(p===0)return[];n.splice(p,1),--p,--f}else if(p===0){var g=[...m];g[d]=1;for(var _=d-1;_>=0;_--)g[_]=a(g[_],l[_][d]);n.push(g)}}return n.map(e=>new s({data:e.map(e=>[e]),size:[u,1]}))}function u(e,t){for(var n=[c(e,t,!0)._data.map(e=>e[0])],l=e._size[0],u=e._size[1],d=e._values,f=e._index,p=e._ptr,m=u-1;m>=0;m--)for(var h=n.length,g=0;g<h;g++){for(var _=n[g],v=[],y=[],b=p[m],x=p[m+1],S=0,C=x-1;C>=b;C--){var w=f[C];w===m?S=d[C]:w<m&&(v.push(d[C]),y.push(w))}if(!o(S,0)){_[m]=r(_[m],S);for(var T=0,E=y.length;T<E;T++){var D=y[T];_[D]=a(_[D],i(_[m],v[T]))}}else if(!o(_[m],0)){if(g===0)return[];n.splice(g,1),--g,--h}else if(g===0){var O=[..._];O[m]=1;for(var k=0,A=y.length;k<A;k++){var j=y[k];O[j]=a(O[j],v[k])}n.push(O)}}return n.map(e=>new s({data:e.map(e=>[e]),size:[l,1]}))}}),aL=K(`matAlgo08xS0Sid`,[`typed`,`equalScalar`],e=>{var{typed:t,equalScalar:n}=e;return function(e,r,i){var a=e._values,o=e._index,s=e._ptr,c=e._size,l=e._datatype||e._data===void 0?e._datatype:e.getDataType(),u=r._values,d=r._index,f=r._ptr,p=r._size,m=r._datatype||r._data===void 0?r._datatype:r.getDataType();if(c.length!==p.length)throw new QO(c.length,p.length);if(c[0]!==p[0]||c[1]!==p[1])throw RangeError(`Dimension mismatch. Matrix A (`+c+`) must match Matrix B (`+p+`)`);if(!a||!u)throw Error(`Cannot perform operation on Pattern Sparse Matrices`);var h=c[0],g=c[1],_,v=n,y=0,b=i;typeof l==`string`&&l===m&&l!==`mixed`&&(_=l,v=t.find(n,[_,_]),y=t.convert(0,_),b=t.find(i,[_,_]));for(var x=[],S=[],C=[],w=[],T=[],E,D,O,k,A=0;A<g;A++){C[A]=S.length;var j=A+1;for(D=s[A],O=s[A+1],E=D;E<O;E++)k=o[E],T[k]=j,w[k]=a[E],S.push(k);for(D=f[A],O=f[A+1],E=D;E<O;E++)k=d[E],T[k]===j&&(w[k]=b(w[k],u[E]));for(E=C[A];E<S.length;){k=S[E];var M=w[k];v(M,y)?S.splice(E,1):(x.push(M),E++)}}return C[g]=S.length,e.createSparseMatrix({values:x,index:S,ptr:C,size:[h,g],datatype:l===e._datatype&&m===r._datatype?_:void 0})}}),oL=K(`useMatrixForArrayScalar`,[`typed`,`matrix`],e=>{var{typed:t,matrix:n}=e;return{"Array, number":t.referTo(`DenseMatrix, number`,e=>(t,r)=>e(n(t),r).valueOf()),"Array, BigNumber":t.referTo(`DenseMatrix, BigNumber`,e=>(t,r)=>e(n(t),r).valueOf()),"number, Array":t.referTo(`number, DenseMatrix`,e=>(t,r)=>e(t,n(r)).valueOf()),"BigNumber, Array":t.referTo(`BigNumber, DenseMatrix`,e=>(t,r)=>e(t,n(r)).valueOf())}}),sL=`leftShift`,cL=K(sL,[`typed`,`matrix`,`equalScalar`,`zeros`,`DenseMatrix`,`concat`],e=>{var{typed:t,matrix:n,equalScalar:r,zeros:i,DenseMatrix:a,concat:o}=e,s=bN({typed:t}),c=dN({typed:t,equalScalar:r}),l=aL({typed:t,equalScalar:r}),u=SN({typed:t,DenseMatrix:a}),d=HM({typed:t,equalScalar:r}),f=WM({typed:t}),p=_N({typed:t,matrix:n,concat:o}),m=oL({typed:t,matrix:n});return t(sL,{"number, number":NA,"BigNumber, BigNumber":dP,"bigint, bigint":(e,t)=>e<<t,"SparseMatrix, number | BigNumber":t.referToSelf(e=>(t,n)=>r(n,0)?t.clone():d(t,n,e,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(e=>(t,n)=>r(n,0)?t.clone():f(t,n,e,!1)),"number | BigNumber, SparseMatrix":t.referToSelf(e=>(t,n)=>r(t,0)?i(n.size(),n.storage()):u(n,t,e,!0)),"number | BigNumber, DenseMatrix":t.referToSelf(e=>(t,n)=>r(t,0)?i(n.size(),n.storage()):f(n,t,e,!0))},m,p({SS:l,DS:s,SD:c}))}),lL=`rightArithShift`,uL=K(lL,[`typed`,`matrix`,`equalScalar`,`zeros`,`DenseMatrix`,`concat`],e=>{var{typed:t,matrix:n,equalScalar:r,zeros:i,DenseMatrix:a,concat:o}=e,s=bN({typed:t}),c=dN({typed:t,equalScalar:r}),l=aL({typed:t,equalScalar:r}),u=SN({typed:t,DenseMatrix:a}),d=HM({typed:t,equalScalar:r}),f=WM({typed:t}),p=_N({typed:t,matrix:n,concat:o}),m=oL({typed:t,matrix:n});return t(lL,{"number, number":PA,"BigNumber, BigNumber":fP,"bigint, bigint":(e,t)=>e>>t,"SparseMatrix, number | BigNumber":t.referToSelf(e=>(t,n)=>r(n,0)?t.clone():d(t,n,e,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(e=>(t,n)=>r(n,0)?t.clone():f(t,n,e,!1)),"number | BigNumber, SparseMatrix":t.referToSelf(e=>(t,n)=>r(t,0)?i(n.size(),n.storage()):u(n,t,e,!0)),"number | BigNumber, DenseMatrix":t.referToSelf(e=>(t,n)=>r(t,0)?i(n.size(),n.storage()):f(n,t,e,!0))},m,p({SS:l,DS:s,SD:c}))}),dL=`rightLogShift`,fL=K(dL,[`typed`,`matrix`,`equalScalar`,`zeros`,`DenseMatrix`,`concat`],e=>{var{typed:t,matrix:n,equalScalar:r,zeros:i,DenseMatrix:a,concat:o}=e,s=bN({typed:t}),c=dN({typed:t,equalScalar:r}),l=aL({typed:t,equalScalar:r}),u=SN({typed:t,DenseMatrix:a}),d=HM({typed:t,equalScalar:r}),f=WM({typed:t}),p=_N({typed:t,matrix:n,concat:o}),m=oL({typed:t,matrix:n});return t(dL,{"number, number":FA,"SparseMatrix, number | BigNumber":t.referToSelf(e=>(t,n)=>r(n,0)?t.clone():d(t,n,e,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(e=>(t,n)=>r(n,0)?t.clone():f(t,n,e,!1)),"number | BigNumber, SparseMatrix":t.referToSelf(e=>(t,n)=>r(t,0)?i(n.size(),n.storage()):u(n,t,e,!0)),"number | BigNumber, DenseMatrix":t.referToSelf(e=>(t,n)=>r(t,0)?i(n.size(),n.storage()):f(n,t,e,!0))},m,p({SS:l,DS:s,SD:c}))}),pL=`and`,mL=K(pL,[`typed`,`matrix`,`equalScalar`,`zeros`,`not`,`concat`],e=>{var{typed:t,matrix:n,equalScalar:r,zeros:i,not:a,concat:o}=e,s=dN({typed:t,equalScalar:r}),c=AN({typed:t,equalScalar:r}),l=HM({typed:t,equalScalar:r}),u=WM({typed:t}),d=_N({typed:t,matrix:n,concat:o});return t(pL,{"number, number":qA,"Complex, Complex":function(e,t){return(e.re!==0||e.im!==0)&&(t.re!==0||t.im!==0)},"BigNumber, BigNumber":function(e,t){return!e.isZero()&&!t.isZero()&&!e.isNaN()&&!t.isNaN()},"bigint, bigint":qA,"Unit, Unit":t.referToSelf(e=>(t,n)=>e(t.value||0,n.value||0)),"SparseMatrix, any":t.referToSelf(e=>(t,n)=>a(n)?i(t.size(),t.storage()):l(t,n,e,!1)),"DenseMatrix, any":t.referToSelf(e=>(t,n)=>a(n)?i(t.size(),t.storage()):u(t,n,e,!1)),"any, SparseMatrix":t.referToSelf(e=>(t,n)=>a(t)?i(t.size(),t.storage()):l(n,t,e,!0)),"any, DenseMatrix":t.referToSelf(e=>(t,n)=>a(t)?i(t.size(),t.storage()):u(n,t,e,!0)),"Array, any":t.referToSelf(e=>(t,r)=>e(n(t),r).valueOf()),"any, Array":t.referToSelf(e=>(t,r)=>e(t,n(r)).valueOf())},d({SS:c,DS:s}))}),hL=`compare`,gL=K(hL,[`typed`,`config`,`matrix`,`equalScalar`,`BigNumber`,`Fraction`,`DenseMatrix`,`concat`],e=>{var{typed:t,config:n,equalScalar:r,matrix:i,BigNumber:a,Fraction:o,DenseMatrix:s,concat:c}=e,l=fN({typed:t}),u=pN({typed:t,equalScalar:r}),d=UM({typed:t,DenseMatrix:s}),f=_N({typed:t,matrix:i,concat:c}),p=$j({typed:t});return t(hL,_L({typed:t,config:n}),{"boolean, boolean":function(e,t){return e===t?0:e>t?1:-1},"BigNumber, BigNumber":function(e,t){return Nj(e,t,n.relTol,n.absTol)?new a(0):new a(e.cmp(t))},"bigint, bigint":function(e,t){return e===t?0n:e>t?1n:-1n},"Fraction, Fraction":function(e,t){return new o(e.compare(t))},"Complex, Complex":function(){throw TypeError(`No ordering relation is defined for complex numbers`)}},p,f({SS:u,DS:l,Ss:d}))}),_L=K(hL,[`typed`,`config`],e=>{var{typed:t,config:n}=e;return t(hL,{"number, number":function(e,t){return $T(e,t,n.relTol,n.absTol)?0:e>t?1:-1}})}),vL=e.t(((e,t)=>{t.exports=function e(t,n){"use strict";var r=/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,i=/(^[ ]*|[ ]*$)/g,a=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,o=/^0x[0-9a-f]+$/i,s=/^0/,c=function(t){return e.insensitive&&(``+t).toLowerCase()||``+t},l=c(t).replace(i,``)||``,u=c(n).replace(i,``)||``,d=l.replace(r,`\0$1\0`).replace(/\0$/,``).replace(/^\0/,``).split(`\0`),f=u.replace(r,`\0$1\0`).replace(/\0$/,``).replace(/^\0/,``).split(`\0`),p=parseInt(l.match(o),16)||d.length!==1&&l.match(a)&&Date.parse(l),m=parseInt(u.match(o),16)||p&&u.match(a)&&Date.parse(u)||null,h,g;if(m){if(p<m)return-1;if(p>m)return 1}for(var _=0,v=Math.max(d.length,f.length);_<v;_++){if(h=!(d[_]||``).match(s)&&parseFloat(d[_])||d[_]||0,g=!(f[_]||``).match(s)&&parseFloat(f[_])||f[_]||0,isNaN(h)!==isNaN(g))return isNaN(h)?1:-1;if(typeof h!=typeof g&&(h+=``,g+=``),h<g)return-1;if(h>g)return 1}return 0}})),yL=e.r(vL(),1),bL=`compareNatural`,xL=K(bL,[`typed`,`compare`],e=>{var{typed:t,compare:n}=e,r=n.signatures[`boolean,boolean`];return t(bL,{"any, any":i});function i(e,t){var c=ST(e),l=ST(t),u;if((c===`number`||c===`BigNumber`||c===`Fraction`||c===`bigint`)&&(l===`number`||l===`BigNumber`||l===`Fraction`||l===`bigint`))return u=n(e,t),u.toString()===`0`?(0,yL.default)(c,l):u>0?1:-1;var d=[`Array`,`DenseMatrix`,`SparseMatrix`];if(d.includes(c)||d.includes(l))return u=a(i,e,t),u===0?(0,yL.default)(c,l):u;if(c!==l)return(0,yL.default)(c,l);if(c===`Complex`)return SL(e,t);if(c===`Unit`)return e.equalBase(t)?i(e.value,t.value):o(i,e.formatUnits(),t.formatUnits());if(c===`boolean`)return r(e,t);if(c===`string`)return(0,yL.default)(e,t);if(c===`Object`)return s(i,e,t);if(c===`null`||c===`undefined`)return 0;throw TypeError(`Unsupported type of value "`+c+`"`)}function a(e,t,n){return Gw(t)&&Gw(n)?o(e,t.toJSON().values,n.toJSON().values):Gw(t)?a(e,t.toArray(),n):Gw(n)?a(e,t,n.toArray()):Ww(t)?a(e,t.toJSON().data,n):Ww(n)?a(e,t,n.toJSON().data):Array.isArray(t)?Array.isArray(n)?o(e,t,n):a(e,t,[n]):a(e,[t],n)}function o(e,t,n){for(var r=0,i=Math.min(t.length,n.length);r<i;r++){var a=e(t[r],n[r]);if(a!==0)return a}return t.length>n.length?1:t.length<n.length?-1:0}function s(e,t,n){var r=Object.keys(t),i=Object.keys(n);r.sort(yL.default),i.sort(yL.default);var a=o(e,r,i);if(a!==0)return a;for(var s=0;s<r.length;s++){var c=e(t[r[s]],n[i[s]]);if(c!==0)return c}return 0}});function SL(e,t){return e.re>t.re?1:e.re<t.re?-1:e.im>t.im?1:e.im<t.im?-1:0}var CL=`compareText`,wL=[`typed`,`matrix`,`concat`];ZO.signature=`any, any`;var TL=K(CL,wL,e=>{var{typed:t,matrix:n,concat:r}=e;return t(CL,ZO,_N({typed:t,matrix:n,concat:r})({elop:ZO,Ds:!0}))}),EL=`equal`,DL=K(EL,[`typed`,`matrix`,`equalScalar`,`DenseMatrix`,`SparseMatrix`],e=>{var{typed:t,matrix:n,equalScalar:r,DenseMatrix:i,concat:a,SparseMatrix:o}=e,s=fN({typed:t}),c=yP({typed:t,SparseMatrix:o}),l=UM({typed:t,DenseMatrix:i}),u=_N({typed:t,matrix:n});return t(EL,OL({typed:t,equalScalar:r}),u({elop:r,SS:c,DS:s,Ss:l}))}),OL=K(EL,[`typed`,`equalScalar`],e=>{var{typed:t,equalScalar:n}=e;return t(EL,{"any, any":function(e,t){return e===null?t===null:t===null?e===null:e===void 0?t===void 0:t===void 0?e===void 0:n(e,t)}})}),kL=`equalText`,AL=K(kL,[`typed`,`compareText`,`isZero`],e=>{var{typed:t,compareText:n,isZero:r}=e;return t(kL,{"any, any":function(e,t){return r(n(e,t))}})}),jL=`smaller`,ML=K(jL,[`typed`,`config`,`bignumber`,`matrix`,`DenseMatrix`,`concat`,`SparseMatrix`],e=>{var{typed:t,config:n,bignumber:r,matrix:i,DenseMatrix:a,concat:o,SparseMatrix:s}=e,c=fN({typed:t}),l=yP({typed:t,SparseMatrix:s}),u=UM({typed:t,DenseMatrix:a}),d=_N({typed:t,matrix:i,concat:o}),f=$j({typed:t});function p(e,t){return e.lt(t)&&!Nj(e,t,n.relTol,n.absTol)}return t(jL,NL({typed:t,config:n}),{"boolean, boolean":(e,t)=>e<t,"BigNumber, BigNumber":p,"bigint, bigint":(e,t)=>e<t,"Fraction, Fraction":(e,t)=>e.compare(t)===-1,"Fraction, BigNumber":function(e,t){return p(r(e),t)},"BigNumber, Fraction":function(e,t){return p(e,r(t))},"Complex, Complex":function(e,t){throw TypeError(`No ordering relation is defined for complex numbers`)}},f,d({SS:l,DS:c,Ss:u}))}),NL=K(jL,[`typed`,`config`],e=>{var{typed:t,config:n}=e;return t(jL,{"number, number":function(e,t){return e<t&&!$T(e,t,n.relTol,n.absTol)}})}),PL=`smallerEq`,FL=K(PL,[`typed`,`config`,`matrix`,`DenseMatrix`,`concat`,`SparseMatrix`],e=>{var{typed:t,config:n,matrix:r,DenseMatrix:i,concat:a,SparseMatrix:o}=e,s=fN({typed:t}),c=yP({typed:t,SparseMatrix:o}),l=UM({typed:t,DenseMatrix:i}),u=_N({typed:t,matrix:r,concat:a}),d=$j({typed:t});return t(PL,IL({typed:t,config:n}),{"boolean, boolean":(e,t)=>e<=t,"BigNumber, BigNumber":function(e,t){return e.lte(t)||Nj(e,t,n.relTol,n.absTol)},"bigint, bigint":(e,t)=>e<=t,"Fraction, Fraction":(e,t)=>e.compare(t)!==1,"Complex, Complex":function(){throw TypeError(`No ordering relation is defined for complex numbers`)}},d,u({SS:c,DS:s,Ss:l}))}),IL=K(PL,[`typed`,`config`],e=>{var{typed:t,config:n}=e;return t(PL,{"number, number":function(e,t){return e<=t||$T(e,t,n.relTol,n.absTol)}})}),LL=`larger`,RL=K(LL,[`typed`,`config`,`bignumber`,`matrix`,`DenseMatrix`,`concat`,`SparseMatrix`],e=>{var{typed:t,config:n,bignumber:r,matrix:i,DenseMatrix:a,concat:o,SparseMatrix:s}=e,c=fN({typed:t}),l=yP({typed:t,SparseMatrix:s}),u=UM({typed:t,DenseMatrix:a}),d=_N({typed:t,matrix:i,concat:o}),f=$j({typed:t});function p(e,t){return e.gt(t)&&!Nj(e,t,n.relTol,n.absTol)}return t(LL,zL({typed:t,config:n}),{"boolean, boolean":(e,t)=>e>t,"BigNumber, BigNumber":p,"bigint, bigint":(e,t)=>e>t,"Fraction, Fraction":(e,t)=>e.compare(t)===1,"Fraction, BigNumber":function(e,t){return p(r(e),t)},"BigNumber, Fraction":function(e,t){return p(e,r(t))},"Complex, Complex":function(){throw TypeError(`No ordering relation is defined for complex numbers`)}},f,d({SS:l,DS:c,Ss:u}))}),zL=K(LL,[`typed`,`config`],e=>{var{typed:t,config:n}=e;return t(LL,{"number, number":function(e,t){return e>t&&!$T(e,t,n.relTol,n.absTol)}})}),BL=`largerEq`,VL=K(BL,[`typed`,`config`,`matrix`,`DenseMatrix`,`concat`,`SparseMatrix`],e=>{var{typed:t,config:n,matrix:r,DenseMatrix:i,concat:a,SparseMatrix:o}=e,s=fN({typed:t}),c=yP({typed:t,SparseMatrix:o}),l=UM({typed:t,DenseMatrix:i}),u=_N({typed:t,matrix:r,concat:a}),d=$j({typed:t});return t(BL,HL({typed:t,config:n}),{"boolean, boolean":(e,t)=>e>=t,"BigNumber, BigNumber":function(e,t){return e.gte(t)||Nj(e,t,n.relTol,n.absTol)},"bigint, bigint":function(e,t){return e>=t},"Fraction, Fraction":(e,t)=>e.compare(t)!==-1,"Complex, Complex":function(){throw TypeError(`No ordering relation is defined for complex numbers`)}},d,u({SS:c,DS:s,Ss:l}))}),HL=K(BL,[`typed`,`config`],e=>{var{typed:t,config:n}=e;return t(BL,{"number, number":function(e,t){return e>=t||$T(e,t,n.relTol,n.absTol)}})}),UL=`deepEqual`,WL=K(UL,[`typed`,`equal`],e=>{var{typed:t,equal:n}=e;return t(UL,{"any, any":function(e,t){return r(e.valueOf(),t.valueOf())}});function r(e,t){if(Array.isArray(e))if(Array.isArray(t)){var i=e.length;if(i!==t.length)return!1;for(var a=0;a<i;a++)if(!r(e[a],t[a]))return!1;return!0}else return!1;else if(Array.isArray(t))return!1;else return n(e,t)}}),GL=`unequal`,KL=K(GL,[`typed`,`config`,`equalScalar`,`matrix`,`DenseMatrix`,`concat`,`SparseMatrix`],e=>{var{typed:t,config:n,equalScalar:r,matrix:i,DenseMatrix:a,concat:o,SparseMatrix:s}=e,c=fN({typed:t}),l=yP({typed:t,SparseMatrix:s}),u=UM({typed:t,DenseMatrix:a}),d=_N({typed:t,matrix:i,concat:o});return t(GL,qL({typed:t,equalScalar:r}),d({elop:f,SS:l,DS:c,Ss:u}));function f(e,t){return!r(e,t)}}),qL=K(GL,[`typed`,`equalScalar`],e=>{var{typed:t,equalScalar:n}=e;return t(GL,{"any, any":function(e,t){return e===null?t!==null:t===null?e!==null:e===void 0?t!==void 0:t===void 0?e!==void 0:!n(e,t)}})}),JL=`partitionSelect`,YL=K(JL,[`typed`,`isNumeric`,`isNaN`,`compare`],e=>{var{typed:t,isNumeric:n,isNaN:r,compare:i}=e,a=i,o=(e,t)=>-i(e,t);return t(JL,{"Array | Matrix, number":function(e,t){return s(e,t,a)},"Array | Matrix, number, string":function(e,t,n){if(n===`asc`)return s(e,t,a);if(n===`desc`)return s(e,t,o);throw Error(`Compare string must be "asc" or "desc"`)},"Array | Matrix, number, function":s});function s(e,t,n){if(!q(t)||t<0)throw Error(`k must be a non-negative integer`);if(Hw(e)){if(e.size().length>1)throw Error(`Only one dimensional matrices supported`);return c(e.valueOf(),t,n)}if(Array.isArray(e))return c(e,t,n)}function c(e,t,i){if(t>=e.length)throw Error(`k out of bounds`);for(var a=0;a<e.length;a++)if(n(e[a])&&r(e[a]))return e[a];for(var o=0,s=e.length-1;o<s;){for(var c=o,l=s,u=e[Math.floor(Math.random()*(s-o+1))+o];c<l;)if(i(e[c],u)>=0){var d=e[l];e[l]=e[c],e[c]=d,--l}else ++c;i(e[c],u)>0&&--c,t<=c?s=c:o=c+1}return e[t]}}),XL=`sort`,ZL=K(XL,[`typed`,`matrix`,`compare`,`compareNatural`],e=>{var{typed:t,matrix:n,compare:r,compareNatural:i}=e,a=r,o=(e,t)=>-r(e,t);return t(XL,{Array:function(e){return c(e),e.sort(a)},Matrix:function(e){return l(e),n(e.toArray().sort(a),e.storage())},"Array, function":function(e,t){return c(e),e.sort(t)},"Matrix, function":function(e,t){return l(e),n(e.toArray().sort(t),e.storage())},"Array, string":function(e,t){return c(e),e.sort(s(t))},"Matrix, string":function(e,t){return l(e),n(e.toArray().sort(s(t)),e.storage())}});function s(e){if(e===`asc`)return a;if(e===`desc`)return o;if(e===`natural`)return i;throw Error(`String "asc", "desc", or "natural" expected`)}function c(e){if(ek(e).length!==1)throw Error(`One dimensional array expected`)}function l(e){if(e.size().length!==1)throw Error(`One dimensional matrix expected`)}}),QL=`max`,$L=K(QL,[`typed`,`config`,`numeric`,`larger`,`isNaN`],e=>{var{typed:t,config:n,numeric:r,larger:i,isNaN:a}=e;return t(QL,{"Array | Matrix":s,"Array | Matrix, number | BigNumber":function(e,t){return Jk(e,t.valueOf(),o)},"...":function(e){if(Gk(e))throw TypeError(`Scalar values expected in function max`);return s(e)}});function o(e,t){try{return i(e,t)?e:t}catch(e){throw lI(e,`max`,t)}}function s(e){var t;if(Kk(e,function(e){try{(a(e)||t===void 0||i(e,t))&&(t=e)}catch(t){throw lI(t,`max`,e)}}),t===void 0)throw Error(`Cannot calculate max of an empty array`);return typeof t==`string`&&(t=r(t,FT(t,n))),t}}),eR=`min`,tR=K(eR,[`typed`,`config`,`numeric`,`smaller`,`isNaN`],e=>{var{typed:t,config:n,numeric:r,smaller:i,isNaN:a}=e;return t(eR,{"Array | Matrix":s,"Array | Matrix, number | BigNumber":function(e,t){return Jk(e,t.valueOf(),o)},"...":function(e){if(Gk(e))throw TypeError(`Scalar values expected in function min`);return s(e)}});function o(e,t){try{return i(e,t)?e:t}catch(e){throw lI(e,`min`,t)}}function s(e){var t;if(Kk(e,function(e){try{(a(e)||t===void 0||i(e,t))&&(t=e)}catch(t){throw lI(t,`min`,e)}}),t===void 0)throw Error(`Cannot calculate min of an empty array`);return typeof t==`string`&&(t=r(t,FT(t,n))),t}}),nR=K(`ImmutableDenseMatrix`,[`smaller`,`DenseMatrix`],e=>{var{smaller:t,DenseMatrix:n}=e;function r(e,t){if(!(this instanceof r))throw SyntaxError(`Constructor must be called with the new operator`);if(t&&!Bw(t))throw Error(`Invalid datatype: `+t);if(Hw(e)||Vw(e)){var i=new n(e,t);this._data=i._data,this._size=i._size,this._datatype=i._datatype,this._min=null,this._max=null}else if(e&&Vw(e.data)&&Vw(e.size))this._data=e.data,this._size=e.size,this._datatype=e.datatype,this._min=e.min===void 0?null:e.min,this._max=e.max===void 0?null:e.max;else if(e)throw TypeError(`Unsupported type of data (`+ST(e)+`)`);else this._data=[],this._size=[0],this._datatype=t,this._min=null,this._max=null}return r.prototype=new n,r.prototype.type=`ImmutableDenseMatrix`,r.prototype.isImmutableDenseMatrix=!0,r.prototype.subset=function(e){switch(arguments.length){case 1:var t=n.prototype.subset.call(this,e);return Hw(t)?new r({data:t._data,size:t._size,datatype:t._datatype}):t;case 2:case 3:throw Error(`Cannot invoke set subset on an Immutable Matrix instance`);default:throw SyntaxError(`Wrong number of arguments`)}},r.prototype.set=function(){throw Error(`Cannot invoke set on an Immutable Matrix instance`)},r.prototype.resize=function(){throw Error(`Cannot invoke resize on an Immutable Matrix instance`)},r.prototype.reshape=function(){throw Error(`Cannot invoke reshape on an Immutable Matrix instance`)},r.prototype.clone=function(){return new r({data:CT(this._data),size:CT(this._size),datatype:this._datatype})},r.prototype.toJSON=function(){return{mathjs:`ImmutableDenseMatrix`,data:this._data,size:this._size,datatype:this._datatype}},r.fromJSON=function(e){return new r(e)},r.prototype.swapRows=function(){throw Error(`Cannot invoke swapRows on an Immutable Matrix instance`)},r.prototype.min=function(){if(this._min===null){var e=null;this.forEach(function(n){(e===null||t(n,e))&&(e=n)}),this._min=e===null?void 0:e}return this._min},r.prototype.max=function(){if(this._max===null){var e=null;this.forEach(function(n){(e===null||t(e,n))&&(e=n)}),this._max=e===null?void 0:e}return this._max},r},{isClass:!0}),rR=K(`Index`,[`ImmutableDenseMatrix`,`getMatrixDataType`],e=>{var{ImmutableDenseMatrix:t,getMatrixDataType:n}=e;function r(){if(!(this instanceof r))throw SyntaxError(`Constructor must be called with the new operator`);this._dimensions=[],this._sourceSize=[],this._isScalar=!0;for(var e=0,t=arguments.length;e<t;e++){var a=e<0||arguments.length<=e?void 0:arguments[e],o=Vw(a),s=Hw(a),c=typeof a,l=null;if(Kw(a))this._dimensions.push(a),this._isScalar=!1;else if(o||s){var u=void 0;this._isScalar=!1,n(a)===`boolean`?(o&&(u=i(iR(a).valueOf())),s&&(u=i(iR(a._data).valueOf())),l=a.valueOf().length):u=i(a.valueOf()),this._dimensions.push(u)}else if(c===`number`)this._dimensions.push(a);else if(c===`bigint`)this._dimensions.push(Number(a));else if(c===`string`)this._dimensions.push(a);else throw TypeError(`Dimension must be an Array, Matrix, number, bigint, string, or Range`);this._sourceSize.push(l)}}r.prototype.type=`Index`,r.prototype.isIndex=!0;function i(e){for(var n=0,r=e.length;n<r;n++)if(!Pw(e[n])||!q(e[n]))throw TypeError(`Index parameters must be positive integer numbers`);var i=new t;return i._data=e,i._size=[e.length],i}return r.prototype.clone=function(){var e=new r;return e._dimensions=CT(this._dimensions),e._isScalar=this._isScalar,e._sourceSize=this._sourceSize,e},r.create=function(e){var t=new r;return r.apply(t,e),t},r.prototype.size=function(){for(var e=[],t=0,n=this._dimensions.length;t<n;t++){var r=this._dimensions[t];e[t]=Bw(r)||Pw(r)?1:r.size()[0]}return e},r.prototype.max=function(){for(var e=[],t=0,n=this._dimensions.length;t<n;t++){var r=this._dimensions[t];e[t]=Bw(r)||Pw(r)?r:r.max()}return e},r.prototype.min=function(){for(var e=[],t=0,n=this._dimensions.length;t<n;t++){var r=this._dimensions[t];e[t]=Bw(r)||Pw(r)?r:r.min()}return e},r.prototype.forEach=function(e){for(var t=0,n=this._dimensions.length;t<n;t++)e(this._dimensions[t],t,this)},r.prototype.dimension=function(e){return Pw(e)?this._dimensions[e]??null:null},r.prototype.isObjectProperty=function(){return this._dimensions.length===1&&Bw(this._dimensions[0])},r.prototype.getObjectProperty=function(){return this.isObjectProperty()?this._dimensions[0]:null},r.prototype.isScalar=function(){return this._isScalar},r.prototype.toArray=function(){for(var e=[],t=0,n=this._dimensions.length;t<n;t++){var r=this._dimensions[t];e.push(Bw(r)||Pw(r)?r:r.toArray())}return e},r.prototype.valueOf=r.prototype.toArray,r.prototype.toString=function(){for(var e=[],t=0,n=this._dimensions.length;t<n;t++){var r=this._dimensions[t];Bw(r)?e.push(JSON.stringify(r)):e.push(r.toString())}return`[`+e.join(`, `)+`]`},r.prototype.toJSON=function(){return{mathjs:`Index`,dimensions:this._dimensions}},r.fromJSON=function(e){return r.create(e.dimensions)},r},{isClass:!0});function iR(e){var t=[];return e.forEach((e,n)=>{e&&t.push(n)}),t}var aR=K(`FibonacciHeap`,[`smaller`,`larger`],e=>{var{smaller:t,larger:n}=e,r=1/Math.log((1+Math.sqrt(5))/2);function i(){if(!(this instanceof i))throw SyntaxError(`Constructor must be called with the new operator`);this._minimum=null,this._size=0}i.prototype.type=`FibonacciHeap`,i.prototype.isFibonacciHeap=!0,i.prototype.insert=function(e,n){var r={key:e,value:n,degree:0};if(this._minimum){var i=this._minimum;r.left=i,r.right=i.right,i.right=r,r.right.left=r,t(e,i.key)&&(this._minimum=r)}else r.left=r,r.right=r,this._minimum=r;return this._size++,r},i.prototype.size=function(){return this._size},i.prototype.clear=function(){this._minimum=null,this._size=0},i.prototype.isEmpty=function(){return this._size===0},i.prototype.extractMinimum=function(){var e=this._minimum;if(e===null)return e;for(var t=this._minimum,n=e.degree,r=e.child;n>0;){var i=r.right;r.left.right=r.right,r.right.left=r.left,r.left=t,r.right=t.right,t.right=r,r.right.left=r,r.parent=null,r=i,n--}return e.left.right=e.right,e.right.left=e.left,e===e.right?t=null:(t=e.right,t=l(t,this._size)),this._size--,this._minimum=t,e},i.prototype.remove=function(e){this._minimum=a(this._minimum,e,-1),this.extractMinimum()};function a(e,n,r){n.key=r;var i=n.parent;return i&&t(n.key,i.key)&&(o(e,n,i),s(e,i)),t(n.key,e.key)&&(e=n),e}function o(e,t,n){t.left.right=t.right,t.right.left=t.left,n.degree--,n.child===t&&(n.child=t.right),n.degree===0&&(n.child=null),t.left=e,t.right=e.right,e.right=t,t.right.left=t,t.parent=null,t.mark=!1}function s(e,t){var n=t.parent;n&&(t.mark?(o(e,t,n),s(n)):t.mark=!0)}var c=function(e,t){e.left.right=e.right,e.right.left=e.left,e.parent=t,t.child?(e.left=t.child,e.right=t.child.right,t.child.right=e,e.right.left=e):(t.child=e,e.right=e,e.left=e),t.degree++,e.mark=!1};function l(e,i){var a=Math.floor(Math.log(i)*r)+1,o=Array(a),s=0,l=e;if(l)for(s++,l=l.right;l!==e;)s++,l=l.right;for(var u;s>0;){for(var d=l.degree,f=l.right;u=o[d],u;){if(n(l.key,u.key)){var p=u;u=l,l=p}c(u,l),o[d]=null,d++}o[d]=l,l=f,s--}e=null;for(var m=0;m<a;m++)u=o[m],u&&(e?(u.left.right=u.right,u.right.left=u.left,u.left=e,u.right=e.right,e.right=u,u.right.left=u,t(u.key,e.key)&&(e=u)):e=u);return e}return i},{isClass:!0}),oR=K(`Spa`,[`addScalar`,`equalScalar`,`FibonacciHeap`],e=>{var{addScalar:t,equalScalar:n,FibonacciHeap:r}=e;function i(){if(!(this instanceof i))throw SyntaxError(`Constructor must be called with the new operator`);this._values=[],this._heap=new r}return i.prototype.type=`Spa`,i.prototype.isSpa=!0,i.prototype.set=function(e,t){if(this._values[e])this._values[e].value=t;else{var n=this._heap.insert(e,t);this._values[e]=n}},i.prototype.get=function(e){var t=this._values[e];return t?t.value:0},i.prototype.accumulate=function(e,n){var r=this._values[e];r?r.value=t(r.value,n):(r=this._heap.insert(e,n),this._values[e]=r)},i.prototype.forEach=function(e,t,r){var i=this._heap,a=this._values,o=[],s=i.extractMinimum();for(s&&o.push(s);s&&s.key<=t;)s.key>=e&&(n(s.value,0)||r(s.key,s.value,this)),s=i.extractMinimum(),s&&o.push(s);for(var c=0;c<o.length;c++){var l=o[c];s=i.insert(l.key,l.value),a[s.key]=s}},i.prototype.swap=function(e,t){var n=this._values[e],r=this._values[t];if(!n&&r)n=this._heap.insert(e,r.value),this._heap.remove(r),this._values[e]=n,this._values[t]=void 0;else if(n&&!r)r=this._heap.insert(t,n.value),this._heap.remove(n),this._values[t]=r,this._values[e]=void 0;else if(n&&r){var i=n.value;n.value=r.value,r.value=i}},i},{isClass:!0});function sR(e){var t=0,n=1,r=Object.create(null),i=Object.create(null),a=0,o=function(e){var o=i[e];if(o&&(delete r[o],delete i[e],--t,n===o)){if(!t){a=0,n=1;return}for(;!Object.prototype.hasOwnProperty.call(r,++n););}};return e=Math.abs(e),{hit:function(s){var c=i[s],l=++a;if(r[l]=s,i[s]=l,!c)return++t,t<=e?void 0:(s=r[n],o(s),s);if(delete r[c],n===c)for(;!Object.prototype.hasOwnProperty.call(r,++n););},delete:o,clear:function(){t=a=0,n=1,r=Object.create(null),i=Object.create(null)}}}function cR(e){var{hasher:t,limit:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return n??=1/0,t??=JSON.stringify,function r(){typeof r.cache!=`object`&&(r.cache={values:new Map,lru:sR(n||1/0)});for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];var o=t(i);if(r.cache.values.has(o))return r.cache.lru.hit(o),r.cache.values.get(o);var s=e.apply(e,i);return r.cache.values.set(o,s),r.cache.values.delete(r.cache.lru.hit(o)),s}}var lR=cR(function(e){return new e(1).exp()},{hasher:pR}),uR=cR(function(e){return new e(1).plus(new e(5).sqrt()).div(2)},{hasher:pR}),dR=cR(function(e){return e.acos(-1)},{hasher:pR}),fR=cR(function(e){return dR(e).times(2)},{hasher:pR});function pR(e){return e[0].precision}function mR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function hR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?mR(Object(n),!0).forEach(function(t){YF(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mR(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var gR=K(`Unit`,[`?on`,`config`,`addScalar`,`subtractScalar`,`multiplyScalar`,`divideScalar`,`pow`,`abs`,`fix`,`round`,`equal`,`isNumeric`,`format`,`number`,`Complex`,`BigNumber`,`Fraction`],e=>{var{on:t,config:n,addScalar:r,subtractScalar:i,multiplyScalar:a,divideScalar:o,pow:s,abs:c,fix:l,round:u,equal:d,isNumeric:f,format:p,number:m,Complex:h,BigNumber:g,Fraction:_}=e,v=m,y=!1,b=!0;function x(e,t){if(!(this instanceof x))throw Error(`Constructor must be called with the new operator`);if(!(e==null||f(e)||Lw(e)))throw TypeError(`First parameter in Unit constructor must be number, BigNumber, Fraction, Complex, or undefined`);if(this.fixPrefix=y,this.skipAutomaticSimplification=b,t===void 0)this.units=[],this.dimensions=ie.map(e=>0);else if(typeof t==`string`){var n=x.parse(t);this.units=n.units,this.dimensions=n.dimensions}else if(zw(t)&&t.value===null)this.fixPrefix=t.fixPrefix,this.skipAutomaticSimplification=t.skipAutomaticSimplification,this.dimensions=t.dimensions.slice(0),this.units=t.units.map(e=>vw({},e));else throw TypeError(`Second parameter in Unit constructor must be a string or valueless Unit`);this.value=this._normalize(e)}Object.defineProperty(x,`name`,{value:`Unit`}),x.prototype.constructor=x,x.prototype.type=`Unit`,x.prototype.isUnit=!0;var S,C,w;function T(){for(;w===` `||w===` `;)O()}function E(e){return e>=`0`&&e<=`9`||e===`.`}function D(e){return e>=`0`&&e<=`9`}function O(){C++,w=S.charAt(C)}function k(e){C=e,w=S.charAt(C)}function A(){var e=``,t=C;if(w===`+`?O():w===`-`&&(e+=w,O()),!E(w))return k(t),null;if(w===`.`){if(e+=w,O(),!D(w))return k(t),null}else{for(;D(w);)e+=w,O();w===`.`&&(e+=w,O())}for(;D(w);)e+=w,O();if(w===`E`||w===`e`){var n=``,r=C;if(n+=w,O(),(w===`+`||w===`-`)&&(n+=w,O()),!D(w))return k(r),e;for(e+=n;D(w);)e+=w,O()}return e}function j(){for(var e=``;D(w)||x.isValidAlpha(w);)e+=w,O();var t=e.charAt(0);return x.isValidAlpha(t)?e:null}function M(e){return w===e?(O(),e):null}x.parse=function(e,t){if(t||={},S=e,C=-1,w=``,typeof S!=`string`)throw TypeError(`Invalid argument in Unit.parse, string expected`);var r=new x;r.units=[];var i=1,a=!1;O(),T();var o=A(),s=null;if(o){if(n.number===`BigNumber`)s=new g(o);else if(n.number===`Fraction`)try{s=new _(o)}catch{s=parseFloat(o)}else s=parseFloat(o);T(),M(`*`)?(i=1,a=!0):M(`/`)&&(i=-1,a=!0)}for(var c=[],l=1;;){for(T();w===`(`;)c.push(i),l*=i,i=1,O(),T();var u=void 0;if(w){var d=w;if(u=j(),u===null)throw SyntaxError(`Unexpected "`+d+`" in "`+S+`" at index `+C.toString())}else break;var f=N(u);if(f===null)throw SyntaxError(`Unit "`+u+`" not found.`);var p=i*l;if(T(),M(`^`)){T();var m=A();if(m===null)throw SyntaxError(`In "`+e+`", "^" must be followed by a floating-point number`);p*=m}r.units.push({unit:f.unit,prefix:f.prefix,power:p});for(var h=0;h<ie.length;h++)r.dimensions[h]+=(f.unit.dimensions[h]||0)*p;for(T();w===`)`;){if(c.length===0)throw SyntaxError(`Unmatched ")" in "`+S+`" at index `+C.toString());l/=c.pop(),O(),T()}if(a=!1,M(`*`)?(i=1,a=!0):M(`/`)?(i=-1,a=!0):i=1,f.unit.base){var v=f.unit.base.key;le.auto[v]={unit:f.unit,prefix:f.prefix}}}if(T(),w)throw SyntaxError(`Could not parse: "`+e+`"`);if(a)throw SyntaxError(`Trailing characters: "`+e+`"`);if(c.length!==0)throw SyntaxError(`Unmatched "(" in "`+S+`"`);if(r.units.length===0&&!t.allowNoUnits)throw SyntaxError(`"`+e+`" contains no units`);return r.value=s===void 0?null:r._normalize(s),r},x.prototype.clone=function(){var e=new x;e.fixPrefix=this.fixPrefix,e.skipAutomaticSimplification=this.skipAutomaticSimplification,e.value=CT(this.value),e.dimensions=this.dimensions.slice(0),e.units=[];for(var t=0;t<this.units.length;t++)for(var n in e.units[t]={},this.units[t])W(this.units[t],n)&&(e.units[t][n]=this.units[t][n]);return e},x.prototype.valueType=function(){return ST(this.value)},x.prototype._isDerived=function(){return this.units.length===0?!1:this.units.length>1||Math.abs(this.units[0].power-1)>1e-15},x.prototype._normalize=function(e){if(e==null||this.units.length===0)return e;for(var t=e,n=x._getNumberConverter(ST(e)),r=0;r<this.units.length;r++){var i=n(this.units[r].unit.value),o=n(this.units[r].prefix.value),c=n(this.units[r].power);t=a(t,s(a(i,o),c))}return t},x.prototype._denormalize=function(e,t){if(e==null||this.units.length===0)return e;for(var n=e,r=x._getNumberConverter(ST(e)),i=0;i<this.units.length;i++){var c=r(this.units[i].unit.value),l=r(this.units[i].prefix.value),u=r(this.units[i].power);n=o(n,s(a(c,l),u))}return n};var N=cR(e=>{if(W(L,e)){var t=L[e];return{unit:t,prefix:t.prefixes[``]}}for(var n in L)if(W(L,n)&&UO(e,n)){var r=L[n],i=e.length-n.length,a=e.substring(0,i),o=W(r.prefixes,a)?r.prefixes[a]:void 0;if(o!==void 0)return{unit:r,prefix:o}}return null},{hasher:e=>e[0],limit:100});x.isValuelessUnit=function(e){return N(e)!==null},x.prototype.hasBase=function(e){if(typeof e==`string`&&(e=I[e]),!e)return!1;for(var t=0;t<ie.length;t++)if(Math.abs((this.dimensions[t]||0)-(e.dimensions[t]||0))>1e-12)return!1;return!0},x.prototype.equalBase=function(e){for(var t=0;t<ie.length;t++)if(Math.abs((this.dimensions[t]||0)-(e.dimensions[t]||0))>1e-12)return!1;return!0},x.prototype.equals=function(e){return this.equalBase(e)&&d(this.value,e.value)},x.prototype.multiply=function(e){for(var t=this.clone(),n=zw(e)?e:new x(e),r=0;r<ie.length;r++)t.dimensions[r]=(this.dimensions[r]||0)+(n.dimensions[r]||0);for(var i=0;i<n.units.length;i++){var o=hR({},n.units[i]);t.units.push(o)}return this.value!==null||n.value!==null?t.value=a(this.value===null?this._normalize(P(n.value)):this.value,n.value===null?n._normalize(P(this.value)):n.value):t.value=null,zw(e)&&(t.skipAutomaticSimplification=!1),ee(t)},x.prototype.divideInto=function(e){return new x(e).divide(this)},x.prototype.divide=function(e){for(var t=this.clone(),n=zw(e)?e:new x(e),r=0;r<ie.length;r++)t.dimensions[r]=(this.dimensions[r]||0)-(n.dimensions[r]||0);for(var i=0;i<n.units.length;i++){var a=hR(hR({},n.units[i]),{},{power:-n.units[i].power});t.units.push(a)}return this.value!==null||n.value!==null?t.value=o(this.value===null?this._normalize(P(n.value)):this.value,n.value===null?n._normalize(P(this.value)):n.value):t.value=null,zw(e)&&(t.skipAutomaticSimplification=!1),ee(t)},x.prototype.pow=function(e){for(var t=this.clone(),n=0;n<ie.length;n++)t.dimensions[n]=(this.dimensions[n]||0)*e;for(var r=0;r<t.units.length;r++)t.units[r].power*=e;return t.value===null?t.value=null:t.value=s(t.value,e),t.skipAutomaticSimplification=!1,ee(t)};function ee(e){return e.equalBase(I.NONE)&&e.value!==null&&!n.predictable?e.value:e}function P(e){return x._getNumberConverter(ST(e))(1)}x.prototype.abs=function(){var e=this.clone();if(e.value!==null)if(e._isDerived()||e.units.length===0||e.units[0].unit.offset===0)e.value=c(e.value);else{var t=e._numberConverter(),n=a(t(e.units[0].unit.value),t(e.units[0].unit.offset));e.value=i(c(r(e.value,n)),n)}for(var o in e.units)(e.units[o].unit.name===`VA`||e.units[o].unit.name===`VAR`)&&(e.units[o].unit=L.W);return e},x.prototype.to=function(e){var t=this.value===null?this._normalize(1):this.value,n;if(typeof e==`string`)n=x.parse(e);else if(zw(e))n=e.clone();else throw Error(`String or Unit expected as parameter`);if(!this.equalBase(n))throw Error(`Units do not match ('${n.toString()}' != '${this.toString()}')`);if(n.value!==null)throw Error(`Cannot convert to a unit with a value`);if(this.value===null||this._isDerived()||this.units.length===0||n.units.length===0||this.units[0].unit.offset===n.units[0].unit.offset)n.value=CT(t);else{var o=x._getNumberConverter(ST(t)),s=this.units[0].unit.value,c=this.units[0].unit.offset,l=a(s,c),u=n.units[0].unit.value,d=n.units[0].unit.offset,f=a(u,d);n.value=r(t,o(i(l,f)))}return n.fixPrefix=!0,n.skipAutomaticSimplification=!0,n},x.prototype.toNumber=function(e){return v(this.toNumeric(e))},x.prototype.toNumeric=function(e){var t=e?this.to(e):this.clone();return t._isDerived()||t.units.length===0?t._denormalize(t.value):t._denormalize(t.value,t.units[0].prefix.value)},x.prototype.toString=function(){return this.format()},x.prototype.toJSON=function(){return{mathjs:`Unit`,value:this._denormalize(this.value),unit:this.units.length>0?this.formatUnits():null,fixPrefix:this.fixPrefix,skipSimp:this.skipAutomaticSimplification}},x.fromJSON=function(e){var t=new x(e.value,e.unit??void 0);return t.fixPrefix=e.fixPrefix??y,t.skipAutomaticSimplification=e.skipSimp??b,t},x.prototype.valueOf=x.prototype.toString,x.prototype.simplify=function(){var e=this.clone(),t=[],n;for(var r in ue)if(W(ue,r)&&e.hasBase(I[r])){n=r;break}if(n===`NONE`)e.units=[];else{var i;if(n&&W(ue,n)&&(i=ue[n]),i)e.units=[{unit:i.unit,prefix:i.prefix,power:1}];else{for(var a=!1,o=0;o<ie.length;o++){var s=ie[o];Math.abs(e.dimensions[o]||0)>1e-12&&(W(ue,s)?t.push({unit:ue[s].unit,prefix:ue[s].prefix,power:e.dimensions[o]||0}):a=!0)}t.length<e.units.length&&!a&&(e.units=t)}}return e},x.prototype.toSI=function(){for(var e=this.clone(),t=[],n=0;n<ie.length;n++){var r=ie[n];if(Math.abs(e.dimensions[n]||0)>1e-12)if(W(le.si,r))t.push({unit:le.si[r].unit,prefix:le.si[r].prefix,power:e.dimensions[n]||0});else throw Error(`Cannot express custom unit `+r+` in SI units`)}return e.units=t,e.fixPrefix=!0,e.skipAutomaticSimplification=!0,this.value===null?e:(e.value=null,this.to(e))},x.prototype.formatUnits=function(){for(var e=``,t=``,n=0,r=0,i=0;i<this.units.length;i++)this.units[i].power>0?(n++,e+=` `+this.units[i].prefix.name+this.units[i].unit.name,Math.abs(this.units[i].power-1)>1e-15&&(e+=`^`+this.units[i].power)):this.units[i].power<0&&r++;if(r>0)for(var a=0;a<this.units.length;a++)this.units[a].power<0&&(n>0?(t+=` `+this.units[a].prefix.name+this.units[a].unit.name,Math.abs(this.units[a].power+1)>1e-15&&(t+=`^`+-this.units[a].power)):(t+=` `+this.units[a].prefix.name+this.units[a].unit.name,t+=`^`+this.units[a].power));e=e.substr(1),t=t.substr(1),n>1&&r>0&&(e=`(`+e+`)`),r>1&&n>0&&(t=`(`+t+`)`);var o=e;return n>0&&r>0&&(o+=` / `),o+=t,o},x.prototype.toBest=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e&&!Array.isArray(e))throw Error(`Invalid unit type. Expected string or Unit.`);var n=this.units[0].unit.prefixes;if(e&&e.length>0){var r=e.map(e=>{var t=null;if(typeof e==`string`){if(t=x.parse(e),!t)throw Error(`Invalid unit type. Expected compatible string or Unit.`)}else if(!zw(e))throw Error(`Invalid unit type. Expected compatible string or Unit.`);t===null&&(t=e.clone());try{return this.to(t.formatUnits()),t}catch{throw Error(`Invalid unit type. Expected compatible string or Unit.`)}}).map(e=>e.units[0].prefix);this.units[0].unit.prefixes=r.reduce((e,t)=>(e[t.name]=t,e),{}),this.units[0].prefix=r[0]}var i=te(this,t).simp;return this.units[0].unit.prefixes=n,i.fixPrefix=!0,i},x.prototype.format=function(e){var{simp:t,valueStr:n,unitStr:r}=te(this,e),i=n;return t.value&&Lw(t.value)&&(i=`(`+i+`)`),r.length>0&&i.length>0&&(i+=` `),i+=r,i};function te(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.skipAutomaticSimplification||e.value===null?e.clone():e.simplify();ne(n),re(n,t.offset);var r=n._denormalize(n.value);return{simp:n,valueStr:n.value===null?``:p(r,t||{}),unitStr:n.formatUnits()}}function ne(e){var t=!1;for(var n in e.value!==void 0&&e.value!==null&&Lw(e.value)&&(t=Math.abs(e.value.re)<1e-14),e.units)W(e.units,n)&&e.units[n].unit&&(e.units[n].unit.name===`VA`&&t?e.units[n].unit=L.VAR:e.units[n].unit.name===`VAR`&&!t&&(e.units[n].unit=L.VA))}function re(e,t){e.units.length===1&&!e.fixPrefix&&Math.abs(e.units[0].power-Math.round(e.units[0].power))<1e-14&&(e.units[0].prefix=e._bestPrefix(t))}x.prototype._bestPrefix=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1.2;if(this.units.length!==1||Math.abs(this.units[0].power-Math.round(this.units[0].power))>=1e-14)throw Error(`Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!`);var t=this.value===null?0:c(this.value),n=c(this.units[0].unit.value),r=this.units[0].prefix;if(t===0)return r;var i=this.units[0].power,a=Math.log(t/(r.value*n)**+i)/Math.LN10-e;if(a>-2.200001&&a<1.800001)return r;a=Math.abs(a);var o=this.units[0].unit.prefixes;for(var s in o)if(W(o,s)){var l=o[s];if(l.scientific){var u=Math.abs(Math.log(t/(l.value*n)**+i)/Math.LN10-e);(u<a||u===a&&l.name.length<r.name.length)&&(r=l,a=u)}}return r},x.prototype.splitUnit=function(e){for(var t=this.clone(),n=[],a=0;a<e.length&&(t=t.to(e[a]),a!==e.length-1);a++){var o=t.toNumeric(),s=u(o),c=void 0;c=d(s,o)?s:l(t.toNumeric());var f=new x(c,e[a].toString());n.push(f),t=i(t,f)}for(var p=0,m=0;m<n.length;m++)p=r(p,n[m].value);return d(p,this.value)&&(t.value=0),n.push(t),n};var F={NONE:{"":{name:``,value:1,scientific:!0}},SHORT:{"":{name:``,value:1,scientific:!0},da:{name:`da`,value:10,scientific:!1},h:{name:`h`,value:100,scientific:!1},k:{name:`k`,value:1e3,scientific:!0},M:{name:`M`,value:1e6,scientific:!0},G:{name:`G`,value:1e9,scientific:!0},T:{name:`T`,value:0xe8d4a51000,scientific:!0},P:{name:`P`,value:0x38d7ea4c68000,scientific:!0},E:{name:`E`,value:0xde0b6b3a7640000,scientific:!0},Z:{name:`Z`,value:1e21,scientific:!0},Y:{name:`Y`,value:1e24,scientific:!0},R:{name:`R`,value:1e27,scientific:!0},Q:{name:`Q`,value:1e30,scientific:!0},d:{name:`d`,value:.1,scientific:!1},c:{name:`c`,value:.01,scientific:!1},m:{name:`m`,value:.001,scientific:!0},u:{name:`u`,value:1e-6,scientific:!0},n:{name:`n`,value:1e-9,scientific:!0},p:{name:`p`,value:1e-12,scientific:!0},f:{name:`f`,value:1e-15,scientific:!0},a:{name:`a`,value:1e-18,scientific:!0},z:{name:`z`,value:1e-21,scientific:!0},y:{name:`y`,value:1e-24,scientific:!0},r:{name:`r`,value:1e-27,scientific:!0},q:{name:`q`,value:1e-30,scientific:!0}},LONG:{"":{name:``,value:1,scientific:!0},deca:{name:`deca`,value:10,scientific:!1},hecto:{name:`hecto`,value:100,scientific:!1},kilo:{name:`kilo`,value:1e3,scientific:!0},mega:{name:`mega`,value:1e6,scientific:!0},giga:{name:`giga`,value:1e9,scientific:!0},tera:{name:`tera`,value:0xe8d4a51000,scientific:!0},peta:{name:`peta`,value:0x38d7ea4c68000,scientific:!0},exa:{name:`exa`,value:0xde0b6b3a7640000,scientific:!0},zetta:{name:`zetta`,value:1e21,scientific:!0},yotta:{name:`yotta`,value:1e24,scientific:!0},ronna:{name:`ronna`,value:1e27,scientific:!0},quetta:{name:`quetta`,value:1e30,scientific:!0},deci:{name:`deci`,value:.1,scientific:!1},centi:{name:`centi`,value:.01,scientific:!1},milli:{name:`milli`,value:.001,scientific:!0},micro:{name:`micro`,value:1e-6,scientific:!0},nano:{name:`nano`,value:1e-9,scientific:!0},pico:{name:`pico`,value:1e-12,scientific:!0},femto:{name:`femto`,value:1e-15,scientific:!0},atto:{name:`atto`,value:1e-18,scientific:!0},zepto:{name:`zepto`,value:1e-21,scientific:!0},yocto:{name:`yocto`,value:1e-24,scientific:!0},ronto:{name:`ronto`,value:1e-27,scientific:!0},quecto:{name:`quecto`,value:1e-30,scientific:!0}},SQUARED:{"":{name:``,value:1,scientific:!0},da:{name:`da`,value:100,scientific:!1},h:{name:`h`,value:1e4,scientific:!1},k:{name:`k`,value:1e6,scientific:!0},M:{name:`M`,value:0xe8d4a51000,scientific:!0},G:{name:`G`,value:0xde0b6b3a7640000,scientific:!0},T:{name:`T`,value:1e24,scientific:!0},P:{name:`P`,value:1e30,scientific:!0},E:{name:`E`,value:1e36,scientific:!0},Z:{name:`Z`,value:1e42,scientific:!0},Y:{name:`Y`,value:1e48,scientific:!0},R:{name:`R`,value:1e54,scientific:!0},Q:{name:`Q`,value:1e60,scientific:!0},d:{name:`d`,value:.01,scientific:!1},c:{name:`c`,value:1e-4,scientific:!1},m:{name:`m`,value:1e-6,scientific:!0},u:{name:`u`,value:1e-12,scientific:!0},n:{name:`n`,value:1e-18,scientific:!0},p:{name:`p`,value:1e-24,scientific:!0},f:{name:`f`,value:1e-30,scientific:!0},a:{name:`a`,value:1e-36,scientific:!0},z:{name:`z`,value:1e-42,scientific:!0},y:{name:`y`,value:1e-48,scientific:!0},r:{name:`r`,value:1e-54,scientific:!0},q:{name:`q`,value:1e-60,scientific:!0}},CUBIC:{"":{name:``,value:1,scientific:!0},da:{name:`da`,value:1e3,scientific:!1},h:{name:`h`,value:1e6,scientific:!1},k:{name:`k`,value:1e9,scientific:!0},M:{name:`M`,value:0xde0b6b3a7640000,scientific:!0},G:{name:`G`,value:1e27,scientific:!0},T:{name:`T`,value:1e36,scientific:!0},P:{name:`P`,value:1e45,scientific:!0},E:{name:`E`,value:1e54,scientific:!0},Z:{name:`Z`,value:1e63,scientific:!0},Y:{name:`Y`,value:1e72,scientific:!0},R:{name:`R`,value:1e81,scientific:!0},Q:{name:`Q`,value:1e90,scientific:!0},d:{name:`d`,value:.001,scientific:!1},c:{name:`c`,value:1e-6,scientific:!1},m:{name:`m`,value:1e-9,scientific:!0},u:{name:`u`,value:1e-18,scientific:!0},n:{name:`n`,value:1e-27,scientific:!0},p:{name:`p`,value:1e-36,scientific:!0},f:{name:`f`,value:1e-45,scientific:!0},a:{name:`a`,value:1e-54,scientific:!0},z:{name:`z`,value:1e-63,scientific:!0},y:{name:`y`,value:1e-72,scientific:!0},r:{name:`r`,value:1e-81,scientific:!0},q:{name:`q`,value:1e-90,scientific:!0}},BINARY_SHORT_SI:{"":{name:``,value:1,scientific:!0},k:{name:`k`,value:1e3,scientific:!0},M:{name:`M`,value:1e6,scientific:!0},G:{name:`G`,value:1e9,scientific:!0},T:{name:`T`,value:0xe8d4a51000,scientific:!0},P:{name:`P`,value:0x38d7ea4c68000,scientific:!0},E:{name:`E`,value:0xde0b6b3a7640000,scientific:!0},Z:{name:`Z`,value:1e21,scientific:!0},Y:{name:`Y`,value:1e24,scientific:!0}},BINARY_SHORT_IEC:{"":{name:``,value:1,scientific:!0},Ki:{name:`Ki`,value:1024,scientific:!0},Mi:{name:`Mi`,value:1024**2,scientific:!0},Gi:{name:`Gi`,value:1024**3,scientific:!0},Ti:{name:`Ti`,value:1024**4,scientific:!0},Pi:{name:`Pi`,value:1024**5,scientific:!0},Ei:{name:`Ei`,value:1024**6,scientific:!0},Zi:{name:`Zi`,value:1024**7,scientific:!0},Yi:{name:`Yi`,value:1024**8,scientific:!0}},BINARY_LONG_SI:{"":{name:``,value:1,scientific:!0},kilo:{name:`kilo`,value:1e3,scientific:!0},mega:{name:`mega`,value:1e6,scientific:!0},giga:{name:`giga`,value:1e9,scientific:!0},tera:{name:`tera`,value:0xe8d4a51000,scientific:!0},peta:{name:`peta`,value:0x38d7ea4c68000,scientific:!0},exa:{name:`exa`,value:0xde0b6b3a7640000,scientific:!0},zetta:{name:`zetta`,value:1e21,scientific:!0},yotta:{name:`yotta`,value:1e24,scientific:!0}},BINARY_LONG_IEC:{"":{name:``,value:1,scientific:!0},kibi:{name:`kibi`,value:1024,scientific:!0},mebi:{name:`mebi`,value:1024**2,scientific:!0},gibi:{name:`gibi`,value:1024**3,scientific:!0},tebi:{name:`tebi`,value:1024**4,scientific:!0},pebi:{name:`pebi`,value:1024**5,scientific:!0},exi:{name:`exi`,value:1024**6,scientific:!0},zebi:{name:`zebi`,value:1024**7,scientific:!0},yobi:{name:`yobi`,value:1024**8,scientific:!0}},BTU:{"":{name:``,value:1,scientific:!0},MM:{name:`MM`,value:1e6,scientific:!0}}};F.SHORTLONG=vw({},F.SHORT,F.LONG),F.BINARY_SHORT=vw({},F.BINARY_SHORT_SI,F.BINARY_SHORT_IEC),F.BINARY_LONG=vw({},F.BINARY_LONG_SI,F.BINARY_LONG_IEC);var ie=[`MASS`,`LENGTH`,`TIME`,`CURRENT`,`TEMPERATURE`,`LUMINOUS_INTENSITY`,`AMOUNT_OF_SUBSTANCE`,`ANGLE`,`BIT`],I={NONE:{dimensions:[0,0,0,0,0,0,0,0,0]},MASS:{dimensions:[1,0,0,0,0,0,0,0,0]},LENGTH:{dimensions:[0,1,0,0,0,0,0,0,0]},TIME:{dimensions:[0,0,1,0,0,0,0,0,0]},CURRENT:{dimensions:[0,0,0,1,0,0,0,0,0]},TEMPERATURE:{dimensions:[0,0,0,0,1,0,0,0,0]},LUMINOUS_INTENSITY:{dimensions:[0,0,0,0,0,1,0,0,0]},AMOUNT_OF_SUBSTANCE:{dimensions:[0,0,0,0,0,0,1,0,0]},FORCE:{dimensions:[1,1,-2,0,0,0,0,0,0]},SURFACE:{dimensions:[0,2,0,0,0,0,0,0,0]},VOLUME:{dimensions:[0,3,0,0,0,0,0,0,0]},ENERGY:{dimensions:[1,2,-2,0,0,0,0,0,0]},POWER:{dimensions:[1,2,-3,0,0,0,0,0,0]},PRESSURE:{dimensions:[1,-1,-2,0,0,0,0,0,0]},ELECTRIC_CHARGE:{dimensions:[0,0,1,1,0,0,0,0,0]},ELECTRIC_CAPACITANCE:{dimensions:[-1,-2,4,2,0,0,0,0,0]},ELECTRIC_POTENTIAL:{dimensions:[1,2,-3,-1,0,0,0,0,0]},ELECTRIC_RESISTANCE:{dimensions:[1,2,-3,-2,0,0,0,0,0]},ELECTRIC_INDUCTANCE:{dimensions:[1,2,-2,-2,0,0,0,0,0]},ELECTRIC_CONDUCTANCE:{dimensions:[-1,-2,3,2,0,0,0,0,0]},MAGNETIC_FLUX:{dimensions:[1,2,-2,-1,0,0,0,0,0]},MAGNETIC_FLUX_DENSITY:{dimensions:[1,0,-2,-1,0,0,0,0,0]},FREQUENCY:{dimensions:[0,0,-1,0,0,0,0,0,0]},ANGLE:{dimensions:[0,0,0,0,0,0,0,1,0]},BIT:{dimensions:[0,0,0,0,0,0,0,0,1]}};for(var ae in I)W(I,ae)&&(I[ae].key=ae);var oe={name:``,base:{},value:1,offset:0,dimensions:ie.map(e=>0)},L={meter:{name:`meter`,base:I.LENGTH,prefixes:F.LONG,value:1,offset:0},inch:{name:`inch`,base:I.LENGTH,prefixes:F.NONE,value:.0254,offset:0},foot:{name:`foot`,base:I.LENGTH,prefixes:F.NONE,value:.3048,offset:0},yard:{name:`yard`,base:I.LENGTH,prefixes:F.NONE,value:.9144,offset:0},mile:{name:`mile`,base:I.LENGTH,prefixes:F.NONE,value:1609.344,offset:0},link:{name:`link`,base:I.LENGTH,prefixes:F.NONE,value:.201168,offset:0},rod:{name:`rod`,base:I.LENGTH,prefixes:F.NONE,value:5.0292,offset:0},chain:{name:`chain`,base:I.LENGTH,prefixes:F.NONE,value:20.1168,offset:0},angstrom:{name:`angstrom`,base:I.LENGTH,prefixes:F.NONE,value:1e-10,offset:0},m:{name:`m`,base:I.LENGTH,prefixes:F.SHORT,value:1,offset:0},in:{name:`in`,base:I.LENGTH,prefixes:F.NONE,value:.0254,offset:0},ft:{name:`ft`,base:I.LENGTH,prefixes:F.NONE,value:.3048,offset:0},yd:{name:`yd`,base:I.LENGTH,prefixes:F.NONE,value:.9144,offset:0},mi:{name:`mi`,base:I.LENGTH,prefixes:F.NONE,value:1609.344,offset:0},li:{name:`li`,base:I.LENGTH,prefixes:F.NONE,value:.201168,offset:0},rd:{name:`rd`,base:I.LENGTH,prefixes:F.NONE,value:5.02921,offset:0},ch:{name:`ch`,base:I.LENGTH,prefixes:F.NONE,value:20.1168,offset:0},mil:{name:`mil`,base:I.LENGTH,prefixes:F.NONE,value:254e-7,offset:0},m2:{name:`m2`,base:I.SURFACE,prefixes:F.SQUARED,value:1,offset:0},sqin:{name:`sqin`,base:I.SURFACE,prefixes:F.NONE,value:64516e-8,offset:0},sqft:{name:`sqft`,base:I.SURFACE,prefixes:F.NONE,value:.09290304,offset:0},sqyd:{name:`sqyd`,base:I.SURFACE,prefixes:F.NONE,value:.83612736,offset:0},sqmi:{name:`sqmi`,base:I.SURFACE,prefixes:F.NONE,value:2589988.110336,offset:0},sqrd:{name:`sqrd`,base:I.SURFACE,prefixes:F.NONE,value:25.29295,offset:0},sqch:{name:`sqch`,base:I.SURFACE,prefixes:F.NONE,value:404.6873,offset:0},sqmil:{name:`sqmil`,base:I.SURFACE,prefixes:F.NONE,value:64516e-14,offset:0},acre:{name:`acre`,base:I.SURFACE,prefixes:F.NONE,value:4046.86,offset:0},hectare:{name:`hectare`,base:I.SURFACE,prefixes:F.NONE,value:1e4,offset:0},m3:{name:`m3`,base:I.VOLUME,prefixes:F.CUBIC,value:1,offset:0},L:{name:`L`,base:I.VOLUME,prefixes:F.SHORT,value:.001,offset:0},l:{name:`l`,base:I.VOLUME,prefixes:F.SHORT,value:.001,offset:0},litre:{name:`litre`,base:I.VOLUME,prefixes:F.LONG,value:.001,offset:0},cuin:{name:`cuin`,base:I.VOLUME,prefixes:F.NONE,value:16387064e-12,offset:0},cuft:{name:`cuft`,base:I.VOLUME,prefixes:F.NONE,value:.028316846592,offset:0},cuyd:{name:`cuyd`,base:I.VOLUME,prefixes:F.NONE,value:.764554857984,offset:0},teaspoon:{name:`teaspoon`,base:I.VOLUME,prefixes:F.NONE,value:5e-6,offset:0},tablespoon:{name:`tablespoon`,base:I.VOLUME,prefixes:F.NONE,value:15e-6,offset:0},drop:{name:`drop`,base:I.VOLUME,prefixes:F.NONE,value:5e-8,offset:0},gtt:{name:`gtt`,base:I.VOLUME,prefixes:F.NONE,value:5e-8,offset:0},minim:{name:`minim`,base:I.VOLUME,prefixes:F.NONE,value:6.1611519921875e-8,offset:0},fluiddram:{name:`fluiddram`,base:I.VOLUME,prefixes:F.NONE,value:36966911953125e-19,offset:0},fluidounce:{name:`fluidounce`,base:I.VOLUME,prefixes:F.NONE,value:295735295625e-16,offset:0},gill:{name:`gill`,base:I.VOLUME,prefixes:F.NONE,value:.00011829411825,offset:0},cc:{name:`cc`,base:I.VOLUME,prefixes:F.NONE,value:1e-6,offset:0},cup:{name:`cup`,base:I.VOLUME,prefixes:F.NONE,value:.0002365882365,offset:0},pint:{name:`pint`,base:I.VOLUME,prefixes:F.NONE,value:.000473176473,offset:0},quart:{name:`quart`,base:I.VOLUME,prefixes:F.NONE,value:.000946352946,offset:0},gallon:{name:`gallon`,base:I.VOLUME,prefixes:F.NONE,value:.003785411784,offset:0},beerbarrel:{name:`beerbarrel`,base:I.VOLUME,prefixes:F.NONE,value:.117347765304,offset:0},oilbarrel:{name:`oilbarrel`,base:I.VOLUME,prefixes:F.NONE,value:.158987294928,offset:0},hogshead:{name:`hogshead`,base:I.VOLUME,prefixes:F.NONE,value:.238480942392,offset:0},g:{name:`g`,base:I.MASS,prefixes:F.SHORT,value:.001,offset:0},gram:{name:`gram`,base:I.MASS,prefixes:F.LONG,value:.001,offset:0},ton:{name:`ton`,base:I.MASS,prefixes:F.SHORT,value:907.18474,offset:0},t:{name:`t`,base:I.MASS,prefixes:F.SHORT,value:1e3,offset:0},tonne:{name:`tonne`,base:I.MASS,prefixes:F.LONG,value:1e3,offset:0},grain:{name:`grain`,base:I.MASS,prefixes:F.NONE,value:6479891e-11,offset:0},dram:{name:`dram`,base:I.MASS,prefixes:F.NONE,value:.0017718451953125,offset:0},ounce:{name:`ounce`,base:I.MASS,prefixes:F.NONE,value:.028349523125,offset:0},poundmass:{name:`poundmass`,base:I.MASS,prefixes:F.NONE,value:.45359237,offset:0},hundredweight:{name:`hundredweight`,base:I.MASS,prefixes:F.NONE,value:45.359237,offset:0},stick:{name:`stick`,base:I.MASS,prefixes:F.NONE,value:.115,offset:0},stone:{name:`stone`,base:I.MASS,prefixes:F.NONE,value:6.35029318,offset:0},gr:{name:`gr`,base:I.MASS,prefixes:F.NONE,value:6479891e-11,offset:0},dr:{name:`dr`,base:I.MASS,prefixes:F.NONE,value:.0017718451953125,offset:0},oz:{name:`oz`,base:I.MASS,prefixes:F.NONE,value:.028349523125,offset:0},lbm:{name:`lbm`,base:I.MASS,prefixes:F.NONE,value:.45359237,offset:0},cwt:{name:`cwt`,base:I.MASS,prefixes:F.NONE,value:45.359237,offset:0},s:{name:`s`,base:I.TIME,prefixes:F.SHORT,value:1,offset:0},min:{name:`min`,base:I.TIME,prefixes:F.NONE,value:60,offset:0},h:{name:`h`,base:I.TIME,prefixes:F.NONE,value:3600,offset:0},second:{name:`second`,base:I.TIME,prefixes:F.LONG,value:1,offset:0},sec:{name:`sec`,base:I.TIME,prefixes:F.LONG,value:1,offset:0},minute:{name:`minute`,base:I.TIME,prefixes:F.NONE,value:60,offset:0},hour:{name:`hour`,base:I.TIME,prefixes:F.NONE,value:3600,offset:0},day:{name:`day`,base:I.TIME,prefixes:F.NONE,value:86400,offset:0},week:{name:`week`,base:I.TIME,prefixes:F.NONE,value:7*86400,offset:0},month:{name:`month`,base:I.TIME,prefixes:F.NONE,value:2629800,offset:0},year:{name:`year`,base:I.TIME,prefixes:F.NONE,value:31557600,offset:0},decade:{name:`decade`,base:I.TIME,prefixes:F.NONE,value:315576e3,offset:0},century:{name:`century`,base:I.TIME,prefixes:F.NONE,value:315576e4,offset:0},millennium:{name:`millennium`,base:I.TIME,prefixes:F.NONE,value:315576e5,offset:0},hertz:{name:`Hertz`,base:I.FREQUENCY,prefixes:F.LONG,value:1,offset:0,reciprocal:!0},Hz:{name:`Hz`,base:I.FREQUENCY,prefixes:F.SHORT,value:1,offset:0,reciprocal:!0},rad:{name:`rad`,base:I.ANGLE,prefixes:F.SHORT,value:1,offset:0},radian:{name:`radian`,base:I.ANGLE,prefixes:F.LONG,value:1,offset:0},deg:{name:`deg`,base:I.ANGLE,prefixes:F.SHORT,value:null,offset:0},degree:{name:`degree`,base:I.ANGLE,prefixes:F.LONG,value:null,offset:0},grad:{name:`grad`,base:I.ANGLE,prefixes:F.SHORT,value:null,offset:0},gradian:{name:`gradian`,base:I.ANGLE,prefixes:F.LONG,value:null,offset:0},cycle:{name:`cycle`,base:I.ANGLE,prefixes:F.NONE,value:null,offset:0},arcsec:{name:`arcsec`,base:I.ANGLE,prefixes:F.NONE,value:null,offset:0},arcmin:{name:`arcmin`,base:I.ANGLE,prefixes:F.NONE,value:null,offset:0},A:{name:`A`,base:I.CURRENT,prefixes:F.SHORT,value:1,offset:0},ampere:{name:`ampere`,base:I.CURRENT,prefixes:F.LONG,value:1,offset:0},K:{name:`K`,base:I.TEMPERATURE,prefixes:F.SHORT,value:1,offset:0},degC:{name:`degC`,base:I.TEMPERATURE,prefixes:F.SHORT,value:1,offset:273.15},degF:{name:`degF`,base:I.TEMPERATURE,prefixes:F.SHORT,value:new _(5,9),offset:459.67},degR:{name:`degR`,base:I.TEMPERATURE,prefixes:F.SHORT,value:new _(5,9),offset:0},kelvin:{name:`kelvin`,base:I.TEMPERATURE,prefixes:F.LONG,value:1,offset:0},celsius:{name:`celsius`,base:I.TEMPERATURE,prefixes:F.LONG,value:1,offset:273.15},fahrenheit:{name:`fahrenheit`,base:I.TEMPERATURE,prefixes:F.LONG,value:new _(5,9),offset:459.67},rankine:{name:`rankine`,base:I.TEMPERATURE,prefixes:F.LONG,value:new _(5,9),offset:0},mol:{name:`mol`,base:I.AMOUNT_OF_SUBSTANCE,prefixes:F.SHORT,value:1,offset:0},mole:{name:`mole`,base:I.AMOUNT_OF_SUBSTANCE,prefixes:F.LONG,value:1,offset:0},cd:{name:`cd`,base:I.LUMINOUS_INTENSITY,prefixes:F.SHORT,value:1,offset:0},candela:{name:`candela`,base:I.LUMINOUS_INTENSITY,prefixes:F.LONG,value:1,offset:0},N:{name:`N`,base:I.FORCE,prefixes:F.SHORT,value:1,offset:0},newton:{name:`newton`,base:I.FORCE,prefixes:F.LONG,value:1,offset:0},dyn:{name:`dyn`,base:I.FORCE,prefixes:F.SHORT,value:1e-5,offset:0},dyne:{name:`dyne`,base:I.FORCE,prefixes:F.LONG,value:1e-5,offset:0},lbf:{name:`lbf`,base:I.FORCE,prefixes:F.NONE,value:4.4482216152605,offset:0},poundforce:{name:`poundforce`,base:I.FORCE,prefixes:F.NONE,value:4.4482216152605,offset:0},kip:{name:`kip`,base:I.FORCE,prefixes:F.LONG,value:4448.2216,offset:0},kilogramforce:{name:`kilogramforce`,base:I.FORCE,prefixes:F.NONE,value:9.80665,offset:0},J:{name:`J`,base:I.ENERGY,prefixes:F.SHORT,value:1,offset:0},joule:{name:`joule`,base:I.ENERGY,prefixes:F.LONG,value:1,offset:0},erg:{name:`erg`,base:I.ENERGY,prefixes:F.SHORTLONG,value:1e-7,offset:0},Wh:{name:`Wh`,base:I.ENERGY,prefixes:F.SHORT,value:3600,offset:0},BTU:{name:`BTU`,base:I.ENERGY,prefixes:F.BTU,value:1055.05585262,offset:0},eV:{name:`eV`,base:I.ENERGY,prefixes:F.SHORT,value:1602176565e-28,offset:0},electronvolt:{name:`electronvolt`,base:I.ENERGY,prefixes:F.LONG,value:1602176565e-28,offset:0},W:{name:`W`,base:I.POWER,prefixes:F.SHORT,value:1,offset:0},watt:{name:`watt`,base:I.POWER,prefixes:F.LONG,value:1,offset:0},hp:{name:`hp`,base:I.POWER,prefixes:F.NONE,value:745.6998715386,offset:0},VAR:{name:`VAR`,base:I.POWER,prefixes:F.SHORT,value:h.I,offset:0},VA:{name:`VA`,base:I.POWER,prefixes:F.SHORT,value:1,offset:0},Pa:{name:`Pa`,base:I.PRESSURE,prefixes:F.SHORT,value:1,offset:0},psi:{name:`psi`,base:I.PRESSURE,prefixes:F.NONE,value:6894.75729276459,offset:0},atm:{name:`atm`,base:I.PRESSURE,prefixes:F.NONE,value:101325,offset:0},bar:{name:`bar`,base:I.PRESSURE,prefixes:F.SHORTLONG,value:1e5,offset:0},torr:{name:`torr`,base:I.PRESSURE,prefixes:F.NONE,value:133.322,offset:0},mmHg:{name:`mmHg`,base:I.PRESSURE,prefixes:F.NONE,value:133.322,offset:0},mmH2O:{name:`mmH2O`,base:I.PRESSURE,prefixes:F.NONE,value:9.80665,offset:0},cmH2O:{name:`cmH2O`,base:I.PRESSURE,prefixes:F.NONE,value:98.0665,offset:0},coulomb:{name:`coulomb`,base:I.ELECTRIC_CHARGE,prefixes:F.LONG,value:1,offset:0},C:{name:`C`,base:I.ELECTRIC_CHARGE,prefixes:F.SHORT,value:1,offset:0},farad:{name:`farad`,base:I.ELECTRIC_CAPACITANCE,prefixes:F.LONG,value:1,offset:0},F:{name:`F`,base:I.ELECTRIC_CAPACITANCE,prefixes:F.SHORT,value:1,offset:0},volt:{name:`volt`,base:I.ELECTRIC_POTENTIAL,prefixes:F.LONG,value:1,offset:0},V:{name:`V`,base:I.ELECTRIC_POTENTIAL,prefixes:F.SHORT,value:1,offset:0},ohm:{name:`ohm`,base:I.ELECTRIC_RESISTANCE,prefixes:F.SHORTLONG,value:1,offset:0},henry:{name:`henry`,base:I.ELECTRIC_INDUCTANCE,prefixes:F.LONG,value:1,offset:0},H:{name:`H`,base:I.ELECTRIC_INDUCTANCE,prefixes:F.SHORT,value:1,offset:0},siemens:{name:`siemens`,base:I.ELECTRIC_CONDUCTANCE,prefixes:F.LONG,value:1,offset:0},S:{name:`S`,base:I.ELECTRIC_CONDUCTANCE,prefixes:F.SHORT,value:1,offset:0},weber:{name:`weber`,base:I.MAGNETIC_FLUX,prefixes:F.LONG,value:1,offset:0},Wb:{name:`Wb`,base:I.MAGNETIC_FLUX,prefixes:F.SHORT,value:1,offset:0},tesla:{name:`tesla`,base:I.MAGNETIC_FLUX_DENSITY,prefixes:F.LONG,value:1,offset:0},T:{name:`T`,base:I.MAGNETIC_FLUX_DENSITY,prefixes:F.SHORT,value:1,offset:0},b:{name:`b`,base:I.BIT,prefixes:F.BINARY_SHORT,value:1,offset:0},bits:{name:`bits`,base:I.BIT,prefixes:F.BINARY_LONG,value:1,offset:0},B:{name:`B`,base:I.BIT,prefixes:F.BINARY_SHORT,value:8,offset:0},bytes:{name:`bytes`,base:I.BIT,prefixes:F.BINARY_LONG,value:8,offset:0}},se={meters:`meter`,inches:`inch`,feet:`foot`,yards:`yard`,miles:`mile`,links:`link`,rods:`rod`,chains:`chain`,angstroms:`angstrom`,lt:`l`,litres:`litre`,liter:`litre`,liters:`litre`,teaspoons:`teaspoon`,tablespoons:`tablespoon`,minims:`minim`,fldr:`fluiddram`,fluiddrams:`fluiddram`,floz:`fluidounce`,fluidounces:`fluidounce`,gi:`gill`,gills:`gill`,cp:`cup`,cups:`cup`,pt:`pint`,pints:`pint`,qt:`quart`,quarts:`quart`,gal:`gallon`,gallons:`gallon`,bbl:`beerbarrel`,beerbarrels:`beerbarrel`,obl:`oilbarrel`,oilbarrels:`oilbarrel`,hogsheads:`hogshead`,gtts:`gtt`,grams:`gram`,tons:`ton`,tonnes:`tonne`,grains:`grain`,drams:`dram`,ounces:`ounce`,poundmasses:`poundmass`,hundredweights:`hundredweight`,sticks:`stick`,lb:`lbm`,lbs:`lbm`,kips:`kip`,kgf:`kilogramforce`,acres:`acre`,hectares:`hectare`,sqfeet:`sqft`,sqyard:`sqyd`,sqmile:`sqmi`,sqmiles:`sqmi`,mmhg:`mmHg`,mmh2o:`mmH2O`,cmh2o:`cmH2O`,seconds:`second`,secs:`second`,minutes:`minute`,mins:`minute`,hours:`hour`,hr:`hour`,hrs:`hour`,days:`day`,weeks:`week`,months:`month`,years:`year`,decades:`decade`,centuries:`century`,millennia:`millennium`,hertz:`hertz`,radians:`radian`,degrees:`degree`,gradians:`gradian`,cycles:`cycle`,arcsecond:`arcsec`,arcseconds:`arcsec`,arcminute:`arcmin`,arcminutes:`arcmin`,BTUs:`BTU`,watts:`watt`,joules:`joule`,amperes:`ampere`,amps:`ampere`,amp:`ampere`,coulombs:`coulomb`,volts:`volt`,ohms:`ohm`,farads:`farad`,webers:`weber`,teslas:`tesla`,electronvolts:`electronvolt`,moles:`mole`,bit:`bits`,byte:`bytes`};function ce(e){if(e.number===`BigNumber`){var t=dR(g);L.rad.value=new g(1),L.deg.value=t.div(180),L.grad.value=t.div(200),L.cycle.value=t.times(2),L.arcsec.value=t.div(648e3),L.arcmin.value=t.div(10800)}else L.rad.value=1,L.deg.value=Math.PI/180,L.grad.value=Math.PI/200,L.cycle.value=Math.PI*2,L.arcsec.value=Math.PI/648e3,L.arcmin.value=Math.PI/10800;L.radian.value=L.rad.value,L.degree.value=L.deg.value,L.gradian.value=L.grad.value}ce(n),t&&t(`config`,function(e,t){e.number!==t.number&&ce(e)});var le={si:{NONE:{unit:oe,prefix:F.NONE[``]},LENGTH:{unit:L.m,prefix:F.SHORT[``]},MASS:{unit:L.g,prefix:F.SHORT.k},TIME:{unit:L.s,prefix:F.SHORT[``]},CURRENT:{unit:L.A,prefix:F.SHORT[``]},TEMPERATURE:{unit:L.K,prefix:F.SHORT[``]},LUMINOUS_INTENSITY:{unit:L.cd,prefix:F.SHORT[``]},AMOUNT_OF_SUBSTANCE:{unit:L.mol,prefix:F.SHORT[``]},ANGLE:{unit:L.rad,prefix:F.SHORT[``]},BIT:{unit:L.bits,prefix:F.SHORT[``]},FORCE:{unit:L.N,prefix:F.SHORT[``]},ENERGY:{unit:L.J,prefix:F.SHORT[``]},POWER:{unit:L.W,prefix:F.SHORT[``]},PRESSURE:{unit:L.Pa,prefix:F.SHORT[``]},ELECTRIC_CHARGE:{unit:L.C,prefix:F.SHORT[``]},ELECTRIC_CAPACITANCE:{unit:L.F,prefix:F.SHORT[``]},ELECTRIC_POTENTIAL:{unit:L.V,prefix:F.SHORT[``]},ELECTRIC_RESISTANCE:{unit:L.ohm,prefix:F.SHORT[``]},ELECTRIC_INDUCTANCE:{unit:L.H,prefix:F.SHORT[``]},ELECTRIC_CONDUCTANCE:{unit:L.S,prefix:F.SHORT[``]},MAGNETIC_FLUX:{unit:L.Wb,prefix:F.SHORT[``]},MAGNETIC_FLUX_DENSITY:{unit:L.T,prefix:F.SHORT[``]},FREQUENCY:{unit:L.Hz,prefix:F.SHORT[``]}}};le.cgs=JSON.parse(JSON.stringify(le.si)),le.cgs.LENGTH={unit:L.m,prefix:F.SHORT.c},le.cgs.MASS={unit:L.g,prefix:F.SHORT[``]},le.cgs.FORCE={unit:L.dyn,prefix:F.SHORT[``]},le.cgs.ENERGY={unit:L.erg,prefix:F.NONE[``]},le.us=JSON.parse(JSON.stringify(le.si)),le.us.LENGTH={unit:L.ft,prefix:F.NONE[``]},le.us.MASS={unit:L.lbm,prefix:F.NONE[``]},le.us.TEMPERATURE={unit:L.degF,prefix:F.NONE[``]},le.us.FORCE={unit:L.lbf,prefix:F.NONE[``]},le.us.ENERGY={unit:L.BTU,prefix:F.BTU[``]},le.us.POWER={unit:L.hp,prefix:F.NONE[``]},le.us.PRESSURE={unit:L.psi,prefix:F.NONE[``]},le.auto=JSON.parse(JSON.stringify(le.si));var ue=le.auto;for(var R in x.setUnitSystem=function(e){if(W(le,e))ue=le[e];else throw Error(`Unit system `+e+` does not exist. Choices are: `+Object.keys(le).join(`, `))},x.getUnitSystem=function(){for(var e in le)if(W(le,e)&&le[e]===ue)return e},x.typeConverters={BigNumber:function(e){return e!=null&&e.isFraction?new g(String(e.n)).div(String(e.d)).times(String(e.s)):new g(e+``)},Fraction:function(e){return new _(e)},Complex:function(e){return e},number:function(e){return e!=null&&e.isFraction?m(e):e}},x.prototype._numberConverter=function(){var e=x.typeConverters[this.valueType()];if(e)return e;throw TypeError(`Unsupported Unit value type "`+this.valueType()+`"`)},x._getNumberConverter=function(e){if(!x.typeConverters[e])throw TypeError(`Unsupported type "`+e+`"`);return x.typeConverters[e]},L)if(W(L,R)){var de=L[R];de.dimensions=de.base.dimensions}for(var fe in se)if(W(se,fe)){var pe=L[se[fe]],me={};for(var he in pe)W(pe,he)&&(me[he]=pe[he]);me.name=fe,L[fe]=me}x.isValidAlpha=function(e){return/^[a-zA-Z]$/.test(e)};function ge(e){for(var t=0;t<e.length;t++){if(w=e.charAt(t),t===0&&!x.isValidAlpha(w))throw Error(`Invalid unit name (must begin with alpha character): "`+e+`"`);if(t>0&&!(x.isValidAlpha(w)||D(w)))throw Error(`Invalid unit name (only alphanumeric characters are allowed): "`+e+`"`)}}return x.createUnit=function(e,t){if(typeof e!=`object`)throw TypeError(`createUnit expects first parameter to be of type 'Object'`);if(t&&t.override){for(var n in e)if(W(e,n)&&x.deleteUnit(n),e[n].aliases)for(var r=0;r<e[n].aliases.length;r++)x.deleteUnit(e[n].aliases[r])}var i;for(var a in e)W(e,a)&&(i=x.createUnitSingle(a,e[a]));return i},x.createUnitSingle=function(e,t){if(t??={},typeof e!=`string`)throw TypeError(`createUnitSingle expects first parameter to be of type 'string'`);if(W(L,e))throw Error(`Cannot create unit "`+e+`": a unit with that name already exists`);ge(e);var n=null,r=[],i=0,a,o,s;if(t&&t.type===`Unit`)n=t.clone();else if(typeof t==`string`)t!==``&&(a=t);else if(typeof t==`object`)a=t.definition,o=t.prefixes,i=t.offset,s=t.baseName,t.aliases&&(r=t.aliases.valueOf());else throw TypeError(`Cannot create unit "`+e+`" from "`+t.toString()+`": expecting "string" or "Unit" or "Object"`);if(r){for(var c=0;c<r.length;c++)if(W(L,r[c]))throw Error(`Cannot create alias "`+r[c]+`": a unit with that name already exists`)}if(a&&typeof a==`string`&&!n)try{n=x.parse(a,{allowNoUnits:!0})}catch(t){throw t.message=`Could not create unit "`+e+`" from "`+a+`": `+t.message,t}else a&&a.type===`Unit`&&(n=a.clone());r||=[],i||=0,o=o&&o.toUpperCase&&F[o.toUpperCase()]||F.NONE;var l={};if(n){l={name:e,value:n.value,dimensions:n.dimensions.slice(0),prefixes:o,offset:i};var u=!1;for(var d in I)if(W(I,d)){for(var f=!0,p=0;p<ie.length;p++)if(Math.abs((l.dimensions[p]||0)-(I[d].dimensions[p]||0))>1e-12){f=!1;break}if(f){u=!0,l.base=I[d];break}}if(!u){s||=e+`_STUFF`;var m={dimensions:n.dimensions.slice(0)};m.key=s,I[s]=m,ue[s]={unit:l,prefix:F.NONE[``]},l.base=I[s]}}else{if(s||=e+`_STUFF`,ie.indexOf(s)>=0)throw Error(`Cannot create new base unit "`+e+`": a base unit with that name already exists (and cannot be overridden)`);for(var h in ie.push(s),I)W(I,h)&&(I[h].dimensions[ie.length-1]=0);for(var g={dimensions:[]},_=0;_<ie.length;_++)g.dimensions[_]=0;g.dimensions[ie.length-1]=1,g.key=s,I[s]=g,l={name:e,value:1,dimensions:I[s].dimensions.slice(0),prefixes:o,offset:i,base:I[s]},ue[s]={unit:l,prefix:F.NONE[``]}}x.UNITS[e]=l;for(var v=0;v<r.length;v++){var y=r[v],b={};for(var S in l)W(l,S)&&(b[S]=l[S]);b.name=y,x.UNITS[y]=b}return delete N.cache,new x(null,e)},x.deleteUnit=function(e){delete x.UNITS[e],delete N.cache},x.PREFIXES=F,x.BASE_DIMENSIONS=ie,x.BASE_UNITS=I,x.UNIT_SYSTEMS=le,x.UNITS=L,x},{isClass:!0}),_R=`unit`,vR=K(_R,[`typed`,`Unit`],e=>{var{typed:t,Unit:n}=e;return t(_R,{Unit:function(e){return e.clone()},string:function(e){return n.isValuelessUnit(e)?new n(null,e):n.parse(e,{allowNoUnits:!0})},"number | BigNumber | Fraction | Complex, string | Unit":function(e,t){return new n(e,t)},"number | BigNumber | Fraction":function(e){return new n(e)},"Array | Matrix":t.referToSelf(e=>t=>qk(t,e))})}),yR=`sparse`,bR=K(yR,[`typed`,`SparseMatrix`],e=>{var{typed:t,SparseMatrix:n}=e;return t(yR,{"":function(){return new n([])},string:function(e){return new n([],e)},"Array | Matrix":function(e){return new n(e)},"Array | Matrix, string":function(e,t){return new n(e,t)}})}),xR=`createUnit`,SR=K(xR,[`typed`,`Unit`],e=>{var{typed:t,Unit:n}=e;return t(xR,{"Object, Object":function(e,t){return n.createUnit(e,t)},Object:function(e){return n.createUnit(e,{})},"string, Unit | string | Object, Object":function(e,t,r){var i={};return i[e]=t,n.createUnit(i,r)},"string, Unit | string | Object":function(e,t){var r={};return r[e]=t,n.createUnit(r,{})},string:function(e){var t={};return t[e]={},n.createUnit(t,{})}})}),CR=`acos`,wR=K(CR,[`typed`,`config`,`Complex`],e=>{var{typed:t,config:n,Complex:r}=e;return t(CR,{number:function(e){return e>=-1&&e<=1||n.predictable?Math.acos(e):new r(e,0).acos()},Complex:function(e){return e.acos()},BigNumber:function(e){return e.acos()}})}),TR=`acosh`,ER=K(TR,[`typed`,`config`,`Complex`],e=>{var{typed:t,config:n,Complex:r}=e;return t(TR,{number:function(e){return e>=1||n.predictable?rj(e):e<=-1?new r(Math.log(Math.sqrt(e*e-1)-e),Math.PI):new r(e,0).acosh()},Complex:function(e){return e.acosh()},BigNumber:function(e){return e.acosh()}})}),DR=`acot`,OR=K(DR,[`typed`,`BigNumber`],e=>{var{typed:t,BigNumber:n}=e;return t(DR,{number:ij,Complex:function(e){return e.acot()},BigNumber:function(e){return new n(1).div(e).atan()}})}),kR=`acoth`,AR=K(kR,[`typed`,`config`,`Complex`,`BigNumber`],e=>{var{typed:t,config:n,Complex:r,BigNumber:i}=e;return t(kR,{number:function(e){return e>=1||e<=-1||n.predictable?aj(e):new r(e,0).acoth()},Complex:function(e){return e.acoth()},BigNumber:function(e){return new i(1).div(e).atanh()}})}),jR=`acsc`,MR=K(jR,[`typed`,`config`,`Complex`,`BigNumber`],e=>{var{typed:t,config:n,Complex:r,BigNumber:i}=e;return t(jR,{number:function(e){return e<=-1||e>=1||n.predictable?oj(e):new r(e,0).acsc()},Complex:function(e){return e.acsc()},BigNumber:function(e){return new i(1).div(e).asin()}})}),NR=`acsch`,PR=K(NR,[`typed`,`BigNumber`],e=>{var{typed:t,BigNumber:n}=e;return t(NR,{number:sj,Complex:function(e){return e.acsch()},BigNumber:function(e){return new n(1).div(e).asinh()}})}),FR=`asec`,IR=K(FR,[`typed`,`config`,`Complex`,`BigNumber`],e=>{var{typed:t,config:n,Complex:r,BigNumber:i}=e;return t(FR,{number:function(e){return e<=-1||e>=1||n.predictable?cj(e):new r(e,0).asec()},Complex:function(e){return e.asec()},BigNumber:function(e){return new i(1).div(e).acos()}})}),LR=`asech`,RR=K(LR,[`typed`,`config`,`Complex`,`BigNumber`],e=>{var{typed:t,config:n,Complex:r,BigNumber:i}=e;return t(LR,{number:function(e){if(e<=1&&e>=-1||n.predictable){var t=1/e;if(t>0||n.predictable)return lj(e);var i=Math.sqrt(t*t-1);return new r(Math.log(i-t),Math.PI)}return new r(e,0).asech()},Complex:function(e){return e.asech()},BigNumber:function(e){return new i(1).div(e).acosh()}})}),zR=`asin`,BR=K(zR,[`typed`,`config`,`Complex`],e=>{var{typed:t,config:n,Complex:r}=e;return t(zR,{number:function(e){return e>=-1&&e<=1||n.predictable?Math.asin(e):new r(e,0).asin()},Complex:function(e){return e.asin()},BigNumber:function(e){return e.asin()}})}),VR=K(`asinh`,[`typed`],e=>{var{typed:t}=e;return t(`asinh`,{number:dj,Complex:function(e){return e.asinh()},BigNumber:function(e){return e.asinh()}})}),HR=K(`atan`,[`typed`],e=>{var{typed:t}=e;return t(`atan`,{number:function(e){return Math.atan(e)},Complex:function(e){return e.atan()},BigNumber:function(e){return e.atan()}})}),UR=`atan2`,WR=K(UR,[`typed`,`matrix`,`equalScalar`,`BigNumber`,`DenseMatrix`,`concat`],e=>{var{typed:t,matrix:n,equalScalar:r,BigNumber:i,DenseMatrix:a,concat:o}=e,s=dN({typed:t,equalScalar:r}),c=fN({typed:t}),l=nP({typed:t,equalScalar:r}),u=HM({typed:t,equalScalar:r}),d=UM({typed:t,DenseMatrix:a}),f=_N({typed:t,matrix:n,concat:o});return t(UR,{"number, number":Math.atan2,"BigNumber, BigNumber":(e,t)=>i.atan2(e,t)},f({scalar:`number | BigNumber`,SS:l,DS:c,SD:s,Ss:u,sS:d}))}),GR=`atanh`,KR=K(GR,[`typed`,`config`,`Complex`],e=>{var{typed:t,config:n,Complex:r}=e;return t(GR,{number:function(e){return e<=1&&e>=-1||n.predictable?mj(e):new r(e,0).atanh()},Complex:function(e){return e.atanh()},BigNumber:function(e){return e.atanh()}})}),qR=K(`trigUnit`,[`typed`],e=>{var{typed:t}=e;return{Unit:t.referToSelf(e=>n=>{if(!n.hasBase(n.constructor.BASE_UNITS.ANGLE))throw TypeError(`Unit in function cot is no angle`);return t.find(e,n.valueType())(n.value)})}}),JR=`cos`,YR=K(JR,[`typed`],e=>{var{typed:t}=e,n=qR({typed:t});return t(JR,{number:Math.cos,"Complex | BigNumber":e=>e.cos()},n)}),XR=`cosh`,ZR=K(XR,[`typed`],e=>{var{typed:t}=e;return t(XR,{number:rE,"Complex | BigNumber":e=>e.cosh()})}),QR=`cot`,$R=K(QR,[`typed`,`BigNumber`],e=>{var{typed:t,BigNumber:n}=e,r=qR({typed:t});return t(QR,{number:_j,Complex:e=>e.cot(),BigNumber:e=>new n(1).div(e.tan())},r)}),ez=`coth`,tz=K(ez,[`typed`,`BigNumber`],e=>{var{typed:t,BigNumber:n}=e;return t(ez,{number:vj,Complex:e=>e.coth(),BigNumber:e=>new n(1).div(e.tanh())})}),nz=`csc`,rz=K(nz,[`typed`,`BigNumber`],e=>{var{typed:t,BigNumber:n}=e,r=qR({typed:t});return t(nz,{number:yj,Complex:e=>e.csc(),BigNumber:e=>new n(1).div(e.sin())},r)}),iz=`csch`,az=K(iz,[`typed`,`BigNumber`],e=>{var{typed:t,BigNumber:n}=e;return t(iz,{number:bj,Complex:e=>e.csch(),BigNumber:e=>new n(1).div(e.sinh())})}),oz=`sec`,sz=K(oz,[`typed`,`BigNumber`],e=>{var{typed:t,BigNumber:n}=e,r=qR({typed:t});return t(oz,{number:xj,Complex:e=>e.sec(),BigNumber:e=>new n(1).div(e.cos())},r)}),cz=`sech`,lz=K(cz,[`typed`,`BigNumber`],e=>{var{typed:t,BigNumber:n}=e;return t(cz,{number:Sj,Complex:e=>e.sech(),BigNumber:e=>new n(1).div(e.cosh())})}),uz=`sin`,dz=K(uz,[`typed`],e=>{var{typed:t}=e,n=qR({typed:t});return t(uz,{number:Math.sin,"Complex | BigNumber":e=>e.sin()},n)}),fz=`sinh`,pz=K(fz,[`typed`],e=>{var{typed:t}=e;return t(fz,{number:wj,"Complex | BigNumber":e=>e.sinh()})}),mz=`tan`,hz=K(mz,[`typed`],e=>{var{typed:t}=e,n=qR({typed:t});return t(mz,{number:Math.tan,"Complex | BigNumber":e=>e.tan()},n)}),gz=K(`tanh`,[`typed`],e=>{var{typed:t}=e;return t(`tanh`,{number:aE,"Complex | BigNumber":e=>e.tanh()})}),_z=`setCartesian`,vz=K(_z,[`typed`,`size`,`subset`,`compareNatural`,`Index`,`DenseMatrix`],e=>{var{typed:t,size:n,subset:r,compareNatural:i,Index:a,DenseMatrix:o}=e;return t(_z,{"Array | Matrix, Array | Matrix":function(e,t){var s=[];if(r(n(e),new a(0))!==0&&r(n(t),new a(0))!==0){var c=gk(Array.isArray(e)?e:e.toArray()).sort(i),l=gk(Array.isArray(t)?t:t.toArray()).sort(i);s=[];for(var u=0;u<c.length;u++)for(var d=0;d<l.length;d++)s.push([c[u],l[d]])}return Array.isArray(e)&&Array.isArray(t)?s:new o(s)}})}),yz=`setDifference`,bz=K(yz,[`typed`,`size`,`subset`,`compareNatural`,`Index`,`DenseMatrix`],e=>{var{typed:t,size:n,subset:r,compareNatural:i,Index:a,DenseMatrix:o}=e;return t(yz,{"Array | Matrix, Array | Matrix":function(e,t){var s;if(r(n(e),new a(0))===0)s=[];else if(r(n(t),new a(0))===0)return gk(e.toArray());else{var c=Sk(gk(Array.isArray(e)?e:e.toArray()).sort(i)),l=Sk(gk(Array.isArray(t)?t:t.toArray()).sort(i));s=[];for(var u,d=0;d<c.length;d++){u=!1;for(var f=0;f<l.length;f++)if(i(c[d].value,l[f].value)===0&&c[d].identifier===l[f].identifier){u=!0;break}u||s.push(c[d])}}return Array.isArray(e)&&Array.isArray(t)?Ck(s):new o(Ck(s))}})}),xz=`setDistinct`,Sz=K(xz,[`typed`,`size`,`subset`,`compareNatural`,`Index`,`DenseMatrix`],e=>{var{typed:t,size:n,subset:r,compareNatural:i,Index:a,DenseMatrix:o}=e;return t(xz,{"Array | Matrix":function(e){var t;if(r(n(e),new a(0))===0)t=[];else{var s=gk(Array.isArray(e)?e:e.toArray()).sort(i);t=[],t.push(s[0]);for(var c=1;c<s.length;c++)i(s[c],s[c-1])!==0&&t.push(s[c])}return Array.isArray(e)?t:new o(t)}})}),Cz=`setIntersect`,wz=K(Cz,[`typed`,`size`,`subset`,`compareNatural`,`Index`,`DenseMatrix`],e=>{var{typed:t,size:n,subset:r,compareNatural:i,Index:a,DenseMatrix:o}=e;return t(Cz,{"Array | Matrix, Array | Matrix":function(e,t){var s;if(r(n(e),new a(0))===0||r(n(t),new a(0))===0)s=[];else{var c=Sk(gk(Array.isArray(e)?e:e.toArray()).sort(i)),l=Sk(gk(Array.isArray(t)?t:t.toArray()).sort(i));s=[];for(var u=0;u<c.length;u++)for(var d=0;d<l.length;d++)if(i(c[u].value,l[d].value)===0&&c[u].identifier===l[d].identifier){s.push(c[u]);break}}return Array.isArray(e)&&Array.isArray(t)?Ck(s):new o(Ck(s))}})}),Tz=`setIsSubset`,Ez=K(Tz,[`typed`,`size`,`subset`,`compareNatural`,`Index`],e=>{var{typed:t,size:n,subset:r,compareNatural:i,Index:a}=e;return t(Tz,{"Array | Matrix, Array | Matrix":function(e,t){if(r(n(e),new a(0))===0)return!0;if(r(n(t),new a(0))===0)return!1;for(var o=Sk(gk(Array.isArray(e)?e:e.toArray()).sort(i)),s=Sk(gk(Array.isArray(t)?t:t.toArray()).sort(i)),c,l=0;l<o.length;l++){c=!1;for(var u=0;u<s.length;u++)if(i(o[l].value,s[u].value)===0&&o[l].identifier===s[u].identifier){c=!0;break}if(c===!1)return!1}return!0}})}),Dz=`setMultiplicity`,Oz=K(Dz,[`typed`,`size`,`subset`,`compareNatural`,`Index`],e=>{var{typed:t,size:n,subset:r,compareNatural:i,Index:a}=e;return t(Dz,{"number | BigNumber | Fraction | Complex, Array | Matrix":function(e,t){if(r(n(t),new a(0))===0)return 0;for(var o=gk(Array.isArray(t)?t:t.toArray()),s=0,c=0;c<o.length;c++)i(o[c],e)===0&&s++;return s}})}),kz=`setPowerset`,Az=K(kz,[`typed`,`size`,`subset`,`compareNatural`,`Index`],e=>{var{typed:t,size:n,subset:r,compareNatural:i,Index:a}=e;return t(kz,{"Array | Matrix":function(e){if(r(n(e),new a(0))===0)return[];for(var t=gk(Array.isArray(e)?e:e.toArray()).sort(i),c=[],l=0;l.toString(2).length<=t.length;)c.push(o(t,l.toString(2).split(``).reverse())),l++;return s(c)}});function o(e,t){for(var n=[],r=0;r<t.length;r++)t[r]===`1`&&n.push(e[r]);return n}function s(e){for(var t=[],n=e.length-1;n>0;n--)for(var r=0;r<n;r++)e[r].length>e[r+1].length&&(t=e[r],e[r]=e[r+1],e[r+1]=t);return e}}),jz=`setSize`,Mz=K(jz,[`typed`,`compareNatural`],e=>{var{typed:t,compareNatural:n}=e;return t(jz,{"Array | Matrix":function(e){return Array.isArray(e)?gk(e).length:gk(e.toArray()).length},"Array | Matrix, boolean":function(e,t){if(t===!1||e.length===0)return Array.isArray(e)?gk(e).length:gk(e.toArray()).length;for(var r=gk(Array.isArray(e)?e:e.toArray()).sort(n),i=1,a=1;a<r.length;a++)n(r[a],r[a-1])!==0&&i++;return i}})}),Nz=`setSymDifference`,Pz=K(Nz,[`typed`,`size`,`concat`,`subset`,`setDifference`,`Index`],e=>{var{typed:t,size:n,concat:r,subset:i,setDifference:a,Index:o}=e;return t(Nz,{"Array | Matrix, Array | Matrix":function(e,t){if(i(n(e),new o(0))===0)return gk(t);if(i(n(t),new o(0))===0)return gk(e);var s=gk(e),c=gk(t);return r(a(s,c),a(c,s))}})}),Fz=`setUnion`,Iz=K(Fz,[`typed`,`size`,`concat`,`subset`,`setIntersect`,`setSymDifference`,`Index`],e=>{var{typed:t,size:n,concat:r,subset:i,setIntersect:a,setSymDifference:o,Index:s}=e;return t(Fz,{"Array | Matrix, Array | Matrix":function(e,t){if(i(n(e),new s(0))===0)return gk(t);if(i(n(t),new s(0))===0)return gk(e);var c=gk(e),l=gk(t);return r(o(c,l),a(c,l))}})}),Lz=`add`,Rz=K(Lz,[`typed`,`matrix`,`addScalar`,`equalScalar`,`DenseMatrix`,`SparseMatrix`,`concat`],e=>{var{typed:t,matrix:n,addScalar:r,equalScalar:i,DenseMatrix:a,SparseMatrix:o,concat:s}=e,c=bN({typed:t}),l=xN({typed:t,equalScalar:i}),u=SN({typed:t,DenseMatrix:a}),d=_N({typed:t,matrix:n,concat:s});return t(Lz,{"any, any":r,"any, any, ...any":t.referToSelf(e=>(t,n,r)=>{for(var i=e(t,n),a=0;a<r.length;a++)i=e(i,r[a]);return i})},d({elop:r,DS:c,SS:l,Ss:u}))}),zz=`hypot`,Bz=K(zz,[`typed`,`abs`,`addScalar`,`divideScalar`,`multiplyScalar`,`sqrt`,`smaller`,`isPositive`],e=>{var{typed:t,abs:n,addScalar:r,divideScalar:i,multiplyScalar:a,sqrt:o,smaller:s,isPositive:c}=e;return t(zz,{"... number | BigNumber":l,Array:l,Matrix:e=>l(gk(e.toArray(),!0))});function l(e){for(var t=0,l=0,u=0;u<e.length;u++){if(Lw(e[u]))throw TypeError(`Unexpected type of argument to hypot`);var d=n(e[u]);s(l,d)?(t=a(t,a(i(l,d),i(l,d))),t=r(t,1),l=d):t=r(t,c(d)?a(i(d,l),i(d,l)):d)}return a(l,o(t))}}),Vz=`norm`,Hz=K(Vz,[`typed`,`abs`,`add`,`pow`,`conj`,`sqrt`,`multiply`,`equalScalar`,`larger`,`smaller`,`matrix`,`ctranspose`,`eigs`],e=>{var{typed:t,abs:n,add:r,pow:i,conj:a,sqrt:o,multiply:s,equalScalar:c,larger:l,smaller:u,matrix:d,ctranspose:f,eigs:p}=e;return t(Vz,{number:Math.abs,Complex:function(e){return e.abs()},BigNumber:function(e){return e.abs()},boolean:function(e){return Math.abs(e)},Array:function(e){return S(d(e),2)},Matrix:function(e){return S(e,2)},"Array, number | BigNumber | string":function(e,t){return S(d(e),t)},"Matrix, number | BigNumber | string":function(e,t){return S(e,t)}});function m(e){var t=0;return e.forEach(function(e){var r=n(e);l(r,t)&&(t=r)},!0),t}function h(e){var t;return e.forEach(function(e){var r=n(e);(!t||u(r,t))&&(t=r)},!0),t||0}function g(e,t){if(t===1/0||t===`inf`)return m(e);if(t===-1/0||t===`-inf`)return h(e);if(t===`fro`)return S(e,2);if(typeof t==`number`&&!isNaN(t)){if(!c(t,0)){var a=0;return e.forEach(function(e){a=r(i(n(e),t),a)},!0),i(a,1/t)}return 1/0}throw Error(`Unsupported parameter value`)}function _(e){var t=0;return e.forEach(function(e,n){t=r(t,s(e,a(e)))}),n(o(t))}function v(e){var t=[],i=0;return e.forEach(function(e,a){var o=a[1],s=r(t[o]||0,n(e));l(s,i)&&(i=s),t[o]=s},!0),i}function y(e){var t=e.size();if(t[0]!==t[1])throw RangeError(`Invalid matrix dimensions`);var r=p(s(f(e),e)).values.toArray(),i=r[r.length-1];return n(o(i))}function b(e){var t=[],i=0;return e.forEach(function(e,a){var o=a[0],s=r(t[o]||0,n(e));l(s,i)&&(i=s),t[o]=s},!0),i}function x(e,t){if(t===1)return v(e);if(t===1/0||t===`inf`)return b(e);if(t===`fro`)return _(e);if(t===2)return y(e);throw Error(`Unsupported parameter value `+t)}function S(e,t){var n=e.size();if(n.length===1)return g(e,t);if(n.length===2){if(n[0]&&n[1])return x(e,t);throw RangeError(`Invalid matrix dimensions`)}}}),Uz=`dot`,Wz=K(Uz,[`typed`,`addScalar`,`multiplyScalar`,`conj`,`size`],e=>{var{typed:t,addScalar:n,multiplyScalar:r,conj:i,size:a}=e;return t(Uz,{"Array | DenseMatrix, Array | DenseMatrix":s,"SparseMatrix, SparseMatrix":c});function o(e,t){var n=a(e),r=a(t),i,o;if(n.length===1)i=n[0];else if(n.length===2&&n[1]===1)i=n[0];else throw RangeError(`Expected a column vector, instead got a matrix of size (`+n.join(`, `)+`)`);if(r.length===1)o=r[0];else if(r.length===2&&r[1]===1)o=r[0];else throw RangeError(`Expected a column vector, instead got a matrix of size (`+r.join(`, `)+`)`);if(i!==o)throw RangeError(`Vectors must have equal length (`+i+` != `+o+`)`);if(i===0)throw RangeError(`Cannot calculate the dot product of empty vectors`);return i}function s(e,s){var c=o(e,s),l=Hw(e)?e._data:e,u=Hw(e)?e._datatype||e.getDataType():void 0,d=Hw(s)?s._data:s,f=Hw(s)?s._datatype||s.getDataType():void 0,p=a(e).length===2,m=a(s).length===2,h=n,g=r;if(u&&f&&u===f&&typeof u==`string`&&u!==`mixed`){var _=u;h=t.find(n,[_,_]),g=t.find(r,[_,_])}if(!p&&!m){for(var v=g(i(l[0]),d[0]),y=1;y<c;y++)v=h(v,g(i(l[y]),d[y]));return v}if(!p&&m){for(var b=g(i(l[0]),d[0][0]),x=1;x<c;x++)b=h(b,g(i(l[x]),d[x][0]));return b}if(p&&!m){for(var S=g(i(l[0][0]),d[0]),C=1;C<c;C++)S=h(S,g(i(l[C][0]),d[C]));return S}if(p&&m){for(var w=g(i(l[0][0]),d[0][0]),T=1;T<c;T++)w=h(w,g(i(l[T][0]),d[T][0]));return w}}function c(e,t){o(e,t);for(var i=e._index,a=e._values,s=t._index,c=t._values,l=0,u=n,d=r,f=0,p=0;f<i.length&&p<s.length;){var m=i[f],h=s[p];if(m<h){f++;continue}if(m>h){p++;continue}m===h&&(l=u(l,d(a[f],c[p])),f++,p++)}return l}}),Gz=K(`trace`,[`typed`,`matrix`,`add`],e=>{var{typed:t,matrix:n,add:r}=e;return t(`trace`,{Array:function(e){return i(n(e))},SparseMatrix:a,DenseMatrix:i,any:CT});function i(e){var t=e._size,n=e._data;switch(t.length){case 1:if(t[0]===1)return CT(n[0]);throw RangeError(`Matrix must be square (size: `+WO(t)+`)`);case 2:var i=t[0];if(i===t[1]){for(var a=0,o=0;o<i;o++)a=r(a,n[o][o]);return a}else throw RangeError(`Matrix must be square (size: `+WO(t)+`)`);default:throw RangeError(`Matrix must be two dimensional (size: `+WO(t)+`)`)}}function a(e){var t=e._values,n=e._index,i=e._ptr,a=e._size,o=a[0],s=a[1];if(o===s){var c=0;if(t.length>0)for(var l=0;l<s;l++)for(var u=i[l],d=i[l+1],f=u;f<d;f++){var p=n[f];if(p===l){c=r(c,t[f]);break}if(p>l)break}return c}throw RangeError(`Matrix must be square (size: `+WO(a)+`)`)}}),Kz=`index`,qz=K(Kz,[`typed`,`Index`],e=>{var{typed:t,Index:n}=e;return t(Kz,{"...number | string | BigNumber | Range | Array | Matrix":function(e){var t=e.map(function(e){return Fw(e)?e.toNumber():Vw(e)||Hw(e)?e.map(function(e){return Fw(e)?e.toNumber():e}):e}),r=new n;return n.apply(r,t),r}})}),Jz=new Set([`end`]),Yz=K(`Node`,[`mathWithTransform`],e=>{var{mathWithTransform:t}=e;function n(e){for(var t of[...Jz])if(e.has(t))throw Error(`Scope contains an illegal symbol, "`+t+`" is a reserved keyword`)}class r{get type(){return`Node`}get isNode(){return!0}evaluate(e){return this.compile().evaluate(e)}compile(){var e=this._compile(t,{}),r={},i=null;function a(t){var a=Mw(t);return n(a),e(a,r,i)}return{evaluate:a}}_compile(e,t){throw Error(`Method _compile must be implemented by type `+this.type)}forEach(e){throw Error(`Cannot run forEach on a Node interface`)}map(e){throw Error(`Cannot run map on a Node interface`)}_ifNode(e){if(!mT(e))throw TypeError(`Callback function must return a Node`);return e}traverse(e){e(this,null,null);function t(e,n){e.forEach(function(e,r,i){n(e,r,i),t(e,n)})}t(this,e)}transform(e){function t(n,r,i){var a=e(n,r,i);return a===n?n.map(t):a}return t(this,null,null)}filter(e){var t=[];return this.traverse(function(n,r,i){e(n,r,i)&&t.push(n)}),t}clone(){throw Error(`Cannot clone a Node interface`)}cloneDeep(){return this.map(function(e){return e.cloneDeep()})}equals(e){return e?this.type===e.type&&ET(this,e):!1}toString(e){var t=this._getCustomString(e);return t===void 0?this._toString(e):t}_toString(){throw Error(`_toString not implemented for `+this.type)}toJSON(){throw Error(`Cannot serialize object: toJSON not implemented by `+this.type)}toHTML(e){var t=this._getCustomString(e);return t===void 0?this._toHTML(e):t}_toHTML(){throw Error(`_toHTML not implemented for `+this.type)}toTex(e){var t=this._getCustomString(e);return t===void 0?this._toTex(e):t}_toTex(e){throw Error(`_toTex not implemented for `+this.type)}_getCustomString(e){if(e&&typeof e==`object`)switch(typeof e.handler){case`object`:case`undefined`:return;case`function`:return e.handler(this,e);default:throw TypeError(`Object or function expected as callback`)}}getIdentifier(){return this.type}getContent(){return this}}return r},{isClass:!0,isNode:!0});function Xz(e){return e&&e.isIndexError?new $O(e.index+1,e.min+1,e.max===void 0?void 0:e.max+1):e}function Zz(e){var{subset:t}=e;return function(e,n){try{if(Array.isArray(e))return t(e,n);if(e&&typeof e.subset==`function`)return e.subset(n);if(typeof e==`string`)return t(e,n);if(typeof e==`object`){if(!n.isObjectProperty())throw TypeError(`Cannot apply a numeric index as object property`);return bw(e,n.getObjectProperty())}else throw TypeError(`Cannot apply index: unsupported type of object`)}catch(e){throw Xz(e)}}}var Qz=`AccessorNode`,$z=K(Qz,[`subset`,`Node`],e=>{var{subset:t,Node:n}=e,r=Zz({subset:t});function i(e){return!(iT(e)||aT(e)||lT(e)||fT(e)||hT(e)||_T(e)||bT(e))}class a extends n{constructor(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(super(),!mT(e))throw TypeError(`Node expected for parameter "object"`);if(!pT(t))throw TypeError(`IndexNode expected for parameter "index"`);this.object=e,this.index=t,this.optionalChaining=n}get name(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():``:this.object.name||``}get type(){return Qz}get isAccessorNode(){return!0}_compile(e,t){var n=this.object._compile(e,t),i=this.index._compile(e,t),a=this.optionalChaining,o=iT(this.object)&&this.object.optionalChaining;if(this.index.isObjectProperty()){var s=this.index.getObjectProperty();return function(e,t,r){var i=r||{},c=n(e,t,i);if(a&&c==null){i.optionalShortCircuit=!0;return}if(!(o&&i!=null&&i.optionalShortCircuit))return bw(c,s)}}else return function(e,t,s){var c=s||{},l=n(e,t,c);if(a&&l==null){c.optionalShortCircuit=!0;return}if(!(o&&c!=null&&c.optionalShortCircuit))return r(l,i(e,t,l))}}forEach(e){e(this.object,`object`,this),e(this.index,`index`,this)}map(e){return new a(this._ifNode(e(this.object,`object`,this)),this._ifNode(e(this.index,`index`,this)),this.optionalChaining)}clone(){return new a(this.object,this.index,this.optionalChaining)}_toString(e){var t=this.object.toString(e);i(this.object)&&(t=`(`+t+`)`);var n=this.optionalChaining?this.index.dotNotation?`?`:`?.`:``;return t+n+this.index.toString(e)}_toHTML(e){var t=this.object.toHTML(e);return i(this.object)&&(t=`<span class="math-parenthesis math-round-parenthesis">(</span>`+t+`<span class="math-parenthesis math-round-parenthesis">)</span>`),t+this.index.toHTML(e)}_toTex(e){var t=this.object.toTex(e);return i(this.object)&&(t=`\\left(' + object + '\\right)`),t+this.index.toTex(e)}toJSON(){return{mathjs:Qz,object:this.object,index:this.index,optionalChaining:this.optionalChaining}}static fromJSON(e){return new a(e.object,e.index,e.optionalChaining)}}return YF(a,`name`,Qz),a},{isClass:!0,isNode:!0}),eB=`ArrayNode`,tB=K(eB,[`Node`],e=>{var{Node:t}=e;class n extends t{constructor(e){if(super(),this.items=e||[],!Array.isArray(this.items)||!this.items.every(mT))throw TypeError(`Array containing Nodes expected`)}get type(){return eB}get isArrayNode(){return!0}_compile(e,t){var n=_k(this.items,function(n){return n._compile(e,t)});if(e.config.matrix!==`Array`){var r=e.matrix;return function(e,t,i){return r(_k(n,function(n){return n(e,t,i)}))}}else return function(e,t,r){return _k(n,function(n){return n(e,t,r)})}}forEach(e){for(var t=0;t<this.items.length;t++){var n=this.items[t];e(n,`items[`+t+`]`,this)}}map(e){for(var t=[],r=0;r<this.items.length;r++)t[r]=this._ifNode(e(this.items[r],`items[`+r+`]`,this));return new n(t)}clone(){return new n(this.items.slice(0))}_toString(e){return`[`+this.items.map(function(t){return t.toString(e)}).join(`, `)+`]`}toJSON(){return{mathjs:eB,items:this.items}}static fromJSON(e){return new n(e.items)}_toHTML(e){return`<span class="math-parenthesis math-square-parenthesis">[</span>`+this.items.map(function(t){return t.toHTML(e)}).join(`<span class="math-separator">,</span>`)+`<span class="math-parenthesis math-square-parenthesis">]</span>`}_toTex(e){function t(n,r){var i=n.some(aT)&&!n.every(aT),a=r||i,o=a?`&`:`\\\\`,s=n.map(function(n){return n.items?t(n.items,!r):n.toTex(e)}).join(o);return i||!a||a&&!r?`\\begin{bmatrix}`+s+`\\end{bmatrix}`:s}return t(this.items,!1)}}return YF(n,`name`,eB),n},{isClass:!0,isNode:!0});function nB(e){var{subset:t,matrix:n}=e;return function(e,r,i){try{if(Array.isArray(e))return n(e).subset(r,i).valueOf().forEach((t,n)=>{e[n]=t}),e;if(e&&typeof e.subset==`function`)return e.subset(r,i);if(typeof e==`string`)return t(e,r,i);if(typeof e==`object`){if(!r.isObjectProperty())throw TypeError(`Cannot apply a numeric index as object property`);return xw(e,r.getObjectProperty(),i),e}else throw TypeError(`Cannot apply index: unsupported type of object`)}catch(e){throw Xz(e)}}}var rB=[{AssignmentNode:{},FunctionAssignmentNode:{}},{ConditionalNode:{latexLeftParens:!1,latexRightParens:!1,latexParens:!1}},{"OperatorNode:or":{op:`or`,associativity:`left`,associativeWith:[]}},{"OperatorNode:xor":{op:`xor`,associativity:`left`,associativeWith:[]}},{"OperatorNode:and":{op:`and`,associativity:`left`,associativeWith:[]}},{"OperatorNode:bitOr":{op:`|`,associativity:`left`,associativeWith:[]}},{"OperatorNode:bitXor":{op:`^|`,associativity:`left`,associativeWith:[]}},{"OperatorNode:bitAnd":{op:`&`,associativity:`left`,associativeWith:[]}},{"OperatorNode:equal":{op:`==`,associativity:`left`,associativeWith:[]},"OperatorNode:unequal":{op:`!=`,associativity:`left`,associativeWith:[]},"OperatorNode:smaller":{op:`<`,associativity:`left`,associativeWith:[]},"OperatorNode:larger":{op:`>`,associativity:`left`,associativeWith:[]},"OperatorNode:smallerEq":{op:`<=`,associativity:`left`,associativeWith:[]},"OperatorNode:largerEq":{op:`>=`,associativity:`left`,associativeWith:[]},RelationalNode:{associativity:`left`,associativeWith:[]}},{"OperatorNode:leftShift":{op:`<<`,associativity:`left`,associativeWith:[]},"OperatorNode:rightArithShift":{op:`>>`,associativity:`left`,associativeWith:[]},"OperatorNode:rightLogShift":{op:`>>>`,associativity:`left`,associativeWith:[]}},{"OperatorNode:to":{op:`to`,associativity:`left`,associativeWith:[]}},{RangeNode:{}},{"OperatorNode:add":{op:`+`,associativity:`left`,associativeWith:[`OperatorNode:add`,`OperatorNode:subtract`]},"OperatorNode:subtract":{op:`-`,associativity:`left`,associativeWith:[]}},{"OperatorNode:multiply":{op:`*`,associativity:`left`,associativeWith:[`OperatorNode:multiply`,`OperatorNode:divide`,`Operator:dotMultiply`,`Operator:dotDivide`]},"OperatorNode:divide":{op:`/`,associativity:`left`,associativeWith:[],latexLeftParens:!1,latexRightParens:!1,latexParens:!1},"OperatorNode:dotMultiply":{op:`.*`,associativity:`left`,associativeWith:[`OperatorNode:multiply`,`OperatorNode:divide`,`OperatorNode:dotMultiply`,`OperatorNode:doDivide`]},"OperatorNode:dotDivide":{op:`./`,associativity:`left`,associativeWith:[]},"OperatorNode:mod":{op:`mod`,associativity:`left`,associativeWith:[]}},{"OperatorNode:multiply":{associativity:`left`,associativeWith:[`OperatorNode:multiply`,`OperatorNode:divide`,`Operator:dotMultiply`,`Operator:dotDivide`]}},{"OperatorNode:unaryPlus":{op:`+`,associativity:`right`},"OperatorNode:unaryMinus":{op:`-`,associativity:`right`},"OperatorNode:bitNot":{op:`~`,associativity:`right`},"OperatorNode:not":{op:`not`,associativity:`right`}},{"OperatorNode:pow":{op:`^`,associativity:`right`,associativeWith:[],latexRightParens:!1},"OperatorNode:dotPow":{op:`.^`,associativity:`right`,associativeWith:[]}},{"OperatorNode:nullish":{op:`??`,associativity:`left`,associativeWith:[]}},{"OperatorNode:factorial":{op:`!`,associativity:`left`}},{"OperatorNode:ctranspose":{op:`'`,associativity:`left`}}];function iB(e,t){if(!t||t!==`auto`)return e;for(var n=e;_T(n);)n=n.content;return n}function aB(e,t,n,r){var i=e;t!==`keep`&&(i=e.getContent());for(var a=i.getIdentifier(),o=null,s=0;s<rB.length;s++)if(a in rB[s]){o=s;break}if(a===`OperatorNode:multiply`&&i.implicit&&n!==`show`){var c=iB(i.args[0],t);!(lT(c)&&r&&r.getIdentifier()===`OperatorNode:divide`&&uT(iB(r.args[0],t)))&&!(c.getIdentifier()===`OperatorNode:divide`&&uT(iB(c.args[0],t))&&lT(iB(c.args[1])))&&(o+=1)}return o}function oB(e,t){var n=e;t!==`keep`&&(n=e.getContent());var r=n.getIdentifier(),i=aB(n,t);if(i===null)return null;var a=rB[i][r];if(W(a,`associativity`)){if(a.associativity===`left`)return`left`;if(a.associativity===`right`)return`right`;throw Error(`'`+r+`' has the invalid associativity '`+a.associativity+`'.`)}return null}function sB(e,t,n){var r=n===`keep`?e:e.getContent(),i=n===`keep`?t:e.getContent(),a=r.getIdentifier(),o=i.getIdentifier(),s=aB(r,n);if(s===null)return null;var c=rB[s][a];if(W(c,`associativeWith`)&&c.associativeWith instanceof Array){for(var l=0;l<c.associativeWith.length;l++)if(c.associativeWith[l]===o)return!0;return!1}return null}function cB(e){var t=`OperatorNode:`+e;for(var n of rB)if(t in n)return n[t].op;return null}var lB=`AssignmentNode`,uB=K(lB,[`subset`,`?matrix`,`Node`],e=>{var{subset:t,matrix:n,Node:r}=e,i=Zz({subset:t}),a=nB({subset:t,matrix:n});function o(e,t,n){t||=`keep`;var r=aB(e,t,n),i=aB(e.value,t,n);return t===`all`||i!==null&&i<=r}class s extends r{constructor(e,t,n){if(super(),this.object=e,this.index=n?t:null,this.value=n||t,!bT(e)&&!iT(e))throw TypeError(`SymbolNode or AccessorNode expected as "object"`);if(bT(e)&&e.name===`end`)throw Error(`Cannot assign to symbol "end"`);if(this.index&&!pT(this.index))throw TypeError(`IndexNode expected as "index"`);if(!mT(this.value))throw TypeError(`Node expected as "value"`)}get name(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():``:this.object.name||``}get type(){return lB}get isAssignmentNode(){return!0}_compile(e,t){var n=this.object._compile(e,t),r=this.index?this.index._compile(e,t):null,o=this.value._compile(e,t),s=this.object.name;if(!this.index){if(!bT(this.object))throw TypeError(`SymbolNode expected as object`);return function(e,t,n){var r=o(e,t,n);return e.set(s,r),r}}else if(this.index.isObjectProperty()){var c=this.index.getObjectProperty();return function(e,t,r){var i=n(e,t,r),a=o(e,t,r);return xw(i,c,a),a}}else if(bT(this.object))return function(e,t,i){var c=n(e,t,i),l=o(e,t,i),u=r(e,t,c);return e.set(s,a(c,u,l)),l};else{var l=this.object.object._compile(e,t);if(this.object.index.isObjectProperty()){var u=this.object.index.getObjectProperty();return function(e,t,n){var i=l(e,t,n),s=bw(i,u),c=r(e,t,s),d=o(e,t,n);return xw(i,u,a(s,c,d)),d}}else{var d=this.object.index._compile(e,t);return function(e,t,n){var s=l(e,t,n),c=d(e,t,s),u=i(s,c),f=r(e,t,u),p=o(e,t,n);return a(s,c,a(u,f,p)),p}}}}forEach(e){e(this.object,`object`,this),this.index&&e(this.index,`index`,this),e(this.value,`value`,this)}map(e){return new s(this._ifNode(e(this.object,`object`,this)),this.index?this._ifNode(e(this.index,`index`,this)):null,this._ifNode(e(this.value,`value`,this)))}clone(){return new s(this.object,this.index,this.value)}_toString(e){var t=this.object.toString(e),n=this.index?this.index.toString(e):``,r=this.value.toString(e);return o(this,e&&e.parenthesis,e&&e.implicit)&&(r=`(`+r+`)`),t+n+` = `+r}toJSON(){return{mathjs:lB,object:this.object,index:this.index,value:this.value}}static fromJSON(e){return new s(e.object,e.index,e.value)}_toHTML(e){var t=this.object.toHTML(e),n=this.index?this.index.toHTML(e):``,r=this.value.toHTML(e);return o(this,e&&e.parenthesis,e&&e.implicit)&&(r=`<span class="math-paranthesis math-round-parenthesis">(</span>`+r+`<span class="math-paranthesis math-round-parenthesis">)</span>`),t+n+`<span class="math-operator math-assignment-operator math-variable-assignment-operator math-binary-operator">=</span>`+r}_toTex(e){var t=this.object.toTex(e),n=this.index?this.index.toTex(e):``,r=this.value.toTex(e);return o(this,e&&e.parenthesis,e&&e.implicit)&&(r=`\\left(${r}\\right)`),t+n+`=`+r}}return YF(s,`name`,lB),s},{isClass:!0,isNode:!0}),dB=`BlockNode`,fB=K(dB,[`ResultSet`,`Node`],e=>{var{ResultSet:t,Node:n}=e;class r extends n{constructor(e){if(super(),!Array.isArray(e))throw Error(`Array expected`);this.blocks=e.map(function(e){var t=e&&e.node,n=e&&e.visible!==void 0?e.visible:!0;if(!mT(t))throw TypeError(`Property "node" must be a Node`);if(typeof n!=`boolean`)throw TypeError(`Property "visible" must be a boolean`);return{node:t,visible:n}})}get type(){return dB}get isBlockNode(){return!0}_compile(e,n){var r=_k(this.blocks,function(t){return{evaluate:t.node._compile(e,n),visible:t.visible}});return function(e,n,i){var a=[];return vk(r,function(t){var r=t.evaluate(e,n,i);t.visible&&a.push(r)}),new t(a)}}forEach(e){for(var t=0;t<this.blocks.length;t++)e(this.blocks[t].node,`blocks[`+t+`].node`,this)}map(e){for(var t=[],n=0;n<this.blocks.length;n++){var i=this.blocks[n];t[n]={node:this._ifNode(e(i.node,`blocks[`+n+`].node`,this)),visible:i.visible}}return new r(t)}clone(){return new r(this.blocks.map(function(e){return{node:e.node,visible:e.visible}}))}_toString(e){return this.blocks.map(function(t){return t.node.toString(e)+(t.visible?``:`;`)}).join(`
31
+ `)}toJSON(){return{mathjs:dB,blocks:this.blocks}}static fromJSON(e){return new r(e.blocks)}_toHTML(e){return this.blocks.map(function(t){return t.node.toHTML(e)+(t.visible?``:`<span class="math-separator">;</span>`)}).join(`<span class="math-separator"><br /></span>`)}_toTex(e){return this.blocks.map(function(t){return t.node.toTex(e)+(t.visible?``:`;`)}).join(`\\;\\;
32
+ `)}}return YF(r,`name`,dB),r},{isClass:!0,isNode:!0}),pB=`ConditionalNode`,mB=K(pB,[`Node`],e=>{var{Node:t}=e;function n(e){if(typeof e==`number`||typeof e==`boolean`||typeof e==`string`)return!!e;if(e){if(Fw(e))return!e.isZero();if(Lw(e))return!!(e.re||e.im);if(zw(e))return!!e.value}if(e==null)return!1;throw TypeError(`Unsupported type of condition "`+ST(e)+`"`)}class r extends t{constructor(e,t,n){if(super(),!mT(e))throw TypeError(`Parameter condition must be a Node`);if(!mT(t))throw TypeError(`Parameter trueExpr must be a Node`);if(!mT(n))throw TypeError(`Parameter falseExpr must be a Node`);this.condition=e,this.trueExpr=t,this.falseExpr=n}get type(){return pB}get isConditionalNode(){return!0}_compile(e,t){var r=this.condition._compile(e,t),i=this.trueExpr._compile(e,t),a=this.falseExpr._compile(e,t);return function(e,t,o){return n(r(e,t,o))?i(e,t,o):a(e,t,o)}}forEach(e){e(this.condition,`condition`,this),e(this.trueExpr,`trueExpr`,this),e(this.falseExpr,`falseExpr`,this)}map(e){return new r(this._ifNode(e(this.condition,`condition`,this)),this._ifNode(e(this.trueExpr,`trueExpr`,this)),this._ifNode(e(this.falseExpr,`falseExpr`,this)))}clone(){return new r(this.condition,this.trueExpr,this.falseExpr)}_toString(e){var t=e&&e.parenthesis?e.parenthesis:`keep`,n=aB(this,t,e&&e.implicit),r=this.condition.toString(e),i=aB(this.condition,t,e&&e.implicit);(t===`all`||this.condition.type===`OperatorNode`||i!==null&&i<=n)&&(r=`(`+r+`)`);var a=this.trueExpr.toString(e),o=aB(this.trueExpr,t,e&&e.implicit);(t===`all`||this.trueExpr.type===`OperatorNode`||o!==null&&o<=n)&&(a=`(`+a+`)`);var s=this.falseExpr.toString(e),c=aB(this.falseExpr,t,e&&e.implicit);return(t===`all`||this.falseExpr.type===`OperatorNode`||c!==null&&c<=n)&&(s=`(`+s+`)`),r+` ? `+a+` : `+s}toJSON(){return{mathjs:pB,condition:this.condition,trueExpr:this.trueExpr,falseExpr:this.falseExpr}}static fromJSON(e){return new r(e.condition,e.trueExpr,e.falseExpr)}_toHTML(e){var t=e&&e.parenthesis?e.parenthesis:`keep`,n=aB(this,t,e&&e.implicit),r=this.condition.toHTML(e),i=aB(this.condition,t,e&&e.implicit);(t===`all`||this.condition.type===`OperatorNode`||i!==null&&i<=n)&&(r=`<span class="math-parenthesis math-round-parenthesis">(</span>`+r+`<span class="math-parenthesis math-round-parenthesis">)</span>`);var a=this.trueExpr.toHTML(e),o=aB(this.trueExpr,t,e&&e.implicit);(t===`all`||this.trueExpr.type===`OperatorNode`||o!==null&&o<=n)&&(a=`<span class="math-parenthesis math-round-parenthesis">(</span>`+a+`<span class="math-parenthesis math-round-parenthesis">)</span>`);var s=this.falseExpr.toHTML(e),c=aB(this.falseExpr,t,e&&e.implicit);return(t===`all`||this.falseExpr.type===`OperatorNode`||c!==null&&c<=n)&&(s=`<span class="math-parenthesis math-round-parenthesis">(</span>`+s+`<span class="math-parenthesis math-round-parenthesis">)</span>`),r+`<span class="math-operator math-conditional-operator">?</span>`+a+`<span class="math-operator math-conditional-operator">:</span>`+s}_toTex(e){return`\\begin{cases} {`+this.trueExpr.toTex(e)+`}, &\\quad{\\text{if }\\;`+this.condition.toTex(e)+`}\\\\{`+this.falseExpr.toTex(e)+`}, &\\quad{\\text{otherwise}}\\end{cases}`}}return YF(r,`name`,pB),r},{isClass:!0,isNode:!0}),hB=e.t(((e,t)=>{var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r={"{":`\\{`,"}":`\\}`,"\\":`\\textbackslash{}`,"#":`\\#`,$:`\\$`,"%":`\\%`,"&":`\\&`,"^":`\\textasciicircum{}`,_:`\\_`,"~":`\\textasciitilde{}`},i={"–":`\\--`,"—":`\\---`," ":`~`," ":`\\qquad{}`,"\r\n":`\\newline{}`,"\n":`\\newline{}`},a=function(e,t){return n({},e,t)};t.exports=function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=t.preserveFormatting,s=o===void 0?!1:o,c=t.escapeMapFn,l=c===void 0?a:c,u=String(e),d=``,f=l(n({},r),s?n({},i):{}),p=Object.keys(f),m=function(){var e=!1;p.forEach(function(t,n){e||u.length>=t.length&&u.slice(0,t.length)===t&&(d+=f[p[n]],u=u.slice(t.length,u.length),e=!0)}),e||(d+=u.slice(0,1),u=u.slice(1,u.length))};u;)m();return d}})),gB=e.r(hB(),1),_B={Alpha:`A`,alpha:`\\alpha`,Beta:`B`,beta:`\\beta`,Gamma:`\\Gamma`,gamma:`\\gamma`,Delta:`\\Delta`,delta:`\\delta`,Epsilon:`E`,epsilon:`\\epsilon`,varepsilon:`\\varepsilon`,Zeta:`Z`,zeta:`\\zeta`,Eta:`H`,eta:`\\eta`,Theta:`\\Theta`,theta:`\\theta`,vartheta:`\\vartheta`,Iota:`I`,iota:`\\iota`,Kappa:`K`,kappa:`\\kappa`,varkappa:`\\varkappa`,Lambda:`\\Lambda`,lambda:`\\lambda`,Mu:`M`,mu:`\\mu`,Nu:`N`,nu:`\\nu`,Xi:`\\Xi`,xi:`\\xi`,Omicron:`O`,omicron:`o`,Pi:`\\Pi`,pi:`\\pi`,varpi:`\\varpi`,Rho:`P`,rho:`\\rho`,varrho:`\\varrho`,Sigma:`\\Sigma`,sigma:`\\sigma`,varsigma:`\\varsigma`,Tau:`T`,tau:`\\tau`,Upsilon:`\\Upsilon`,upsilon:`\\upsilon`,Phi:`\\Phi`,phi:`\\phi`,varphi:`\\varphi`,Chi:`X`,chi:`\\chi`,Psi:`\\Psi`,psi:`\\psi`,Omega:`\\Omega`,omega:`\\omega`,true:`\\mathrm{True}`,false:`\\mathrm{False}`,i:`i`,inf:`\\infty`,Inf:`\\infty`,infinity:`\\infty`,Infinity:`\\infty`,oo:`\\infty`,lim:`\\lim`,undefined:`\\mathbf{?}`},vB={transpose:`^\\top`,ctranspose:`^H`,factorial:`!`,pow:`^`,dotPow:`.^\\wedge`,unaryPlus:`+`,unaryMinus:`-`,bitNot:`\\~`,not:`\\neg`,multiply:`\\cdot`,divide:`\\frac`,dotMultiply:`.\\cdot`,dotDivide:`.:`,mod:`\\mod`,add:`+`,subtract:`-`,to:`\\rightarrow`,leftShift:`<<`,rightArithShift:`>>`,rightLogShift:`>>>`,equal:`=`,unequal:`\\neq`,smaller:`<`,larger:`>`,smallerEq:`\\leq`,largerEq:`\\geq`,bitAnd:`\\&`,bitXor:`\\underline{|}`,bitOr:`|`,and:`\\wedge`,xor:`\\veebar`,or:`\\vee`},yB={abs:{1:"\\left|${args[0]}\\right|"},add:{2:`\\left(\${args[0]}${vB.add}\${args[1]}\\right)`},cbrt:{1:"\\sqrt[3]{${args[0]}}"},ceil:{1:"\\left\\lceil${args[0]}\\right\\rceil"},cube:{1:"\\left(${args[0]}\\right)^3"},divide:{2:"\\frac{${args[0]}}{${args[1]}}"},dotDivide:{2:`\\left(\${args[0]}${vB.dotDivide}\${args[1]}\\right)`},dotMultiply:{2:`\\left(\${args[0]}${vB.dotMultiply}\${args[1]}\\right)`},dotPow:{2:`\\left(\${args[0]}${vB.dotPow}\${args[1]}\\right)`},exp:{1:"\\exp\\left(${args[0]}\\right)"},expm1:`\\left(e${vB.pow}{\${args[0]}}-1\\right)`,fix:{1:"\\mathrm{${name}}\\left(${args[0]}\\right)"},floor:{1:"\\left\\lfloor${args[0]}\\right\\rfloor"},fraction:{2:"\\frac{${args[0]}}{${args[1]}}"},gcd:"\\gcd\\left(${args}\\right)",hypot:"\\hypot\\left(${args}\\right)",log:{1:"\\ln\\left(${args[0]}\\right)",2:"\\log_{${args[1]}}\\left(${args[0]}\\right)"},log10:{1:"\\log_{10}\\left(${args[0]}\\right)"},log1p:{1:"\\ln\\left(${args[0]}+1\\right)",2:"\\log_{${args[1]}}\\left(${args[0]}+1\\right)"},log2:"\\log_{2}\\left(${args[0]}\\right)",mod:{2:`\\left(\${args[0]}${vB.mod}\${args[1]}\\right)`},multiply:{2:`\\left(\${args[0]}${vB.multiply}\${args[1]}\\right)`},norm:{1:"\\left\\|${args[0]}\\right\\|",2:void 0},nthRoot:{2:"\\sqrt[${args[1]}]{${args[0]}}"},nthRoots:{2:"\\{y : y^${args[1]} = {${args[0]}}\\}"},pow:{2:`\\left(\${args[0]}\\right)${vB.pow}{\${args[1]}}`},round:{1:"\\left\\lfloor${args[0]}\\right\\rceil",2:void 0},sign:{1:"\\mathrm{${name}}\\left(${args[0]}\\right)"},sqrt:{1:"\\sqrt{${args[0]}}"},square:{1:"\\left(${args[0]}\\right)^2"},subtract:{2:`\\left(\${args[0]}${vB.subtract}\${args[1]}\\right)`},unaryMinus:{1:`${vB.unaryMinus}\\left(\${args[0]}\\right)`},unaryPlus:{1:`${vB.unaryPlus}\\left(\${args[0]}\\right)`},bitAnd:{2:`\\left(\${args[0]}${vB.bitAnd}\${args[1]}\\right)`},bitNot:{1:vB.bitNot+"\\left(${args[0]}\\right)"},bitOr:{2:`\\left(\${args[0]}${vB.bitOr}\${args[1]}\\right)`},bitXor:{2:`\\left(\${args[0]}${vB.bitXor}\${args[1]}\\right)`},leftShift:{2:`\\left(\${args[0]}${vB.leftShift}\${args[1]}\\right)`},rightArithShift:{2:`\\left(\${args[0]}${vB.rightArithShift}\${args[1]}\\right)`},rightLogShift:{2:`\\left(\${args[0]}${vB.rightLogShift}\${args[1]}\\right)`},bellNumbers:{1:"\\mathrm{B}_{${args[0]}}"},catalan:{1:"\\mathrm{C}_{${args[0]}}"},stirlingS2:{2:"\\mathrm{S}\\left(${args}\\right)"},arg:{1:"\\arg\\left(${args[0]}\\right)"},conj:{1:"\\left(${args[0]}\\right)^*"},im:{1:"\\Im\\left\\lbrace${args[0]}\\right\\rbrace"},re:{1:"\\Re\\left\\lbrace${args[0]}\\right\\rbrace"},and:{2:`\\left(\${args[0]}${vB.and}\${args[1]}\\right)`},not:{1:vB.not+"\\left(${args[0]}\\right)"},or:{2:`\\left(\${args[0]}${vB.or}\${args[1]}\\right)`},xor:{2:`\\left(\${args[0]}${vB.xor}\${args[1]}\\right)`},cross:{2:"\\left(${args[0]}\\right)\\times\\left(${args[1]}\\right)"},ctranspose:{1:`\\left(\${args[0]}\\right)${vB.ctranspose}`},det:{1:"\\det\\left(${args[0]}\\right)"},dot:{2:"\\left(${args[0]}\\cdot${args[1]}\\right)"},expm:{1:"\\exp\\left(${args[0]}\\right)"},inv:{1:"\\left(${args[0]}\\right)^{-1}"},pinv:{1:"\\left(${args[0]}\\right)^{+}"},sqrtm:{1:`{\${args[0]}}${vB.pow}{\\frac{1}{2}}`},trace:{1:"\\mathrm{tr}\\left(${args[0]}\\right)"},transpose:{1:`\\left(\${args[0]}\\right)${vB.transpose}`},combinations:{2:"\\binom{${args[0]}}{${args[1]}}"},combinationsWithRep:{2:"\\left(\\!\\!{\\binom{${args[0]}}{${args[1]}}}\\!\\!\\right)"},factorial:{1:`\\left(\${args[0]}\\right)${vB.factorial}`},gamma:{1:"\\Gamma\\left(${args[0]}\\right)"},lgamma:{1:"\\ln\\Gamma\\left(${args[0]}\\right)"},equal:{2:`\\left(\${args[0]}${vB.equal}\${args[1]}\\right)`},larger:{2:`\\left(\${args[0]}${vB.larger}\${args[1]}\\right)`},largerEq:{2:`\\left(\${args[0]}${vB.largerEq}\${args[1]}\\right)`},smaller:{2:`\\left(\${args[0]}${vB.smaller}\${args[1]}\\right)`},smallerEq:{2:`\\left(\${args[0]}${vB.smallerEq}\${args[1]}\\right)`},unequal:{2:`\\left(\${args[0]}${vB.unequal}\${args[1]}\\right)`},erf:{1:"erf\\left(${args[0]}\\right)"},max:"\\max\\left(${args}\\right)",min:"\\min\\left(${args}\\right)",variance:"\\mathrm{Var}\\left(${args}\\right)",acos:{1:"\\cos^{-1}\\left(${args[0]}\\right)"},acosh:{1:"\\cosh^{-1}\\left(${args[0]}\\right)"},acot:{1:"\\cot^{-1}\\left(${args[0]}\\right)"},acoth:{1:"\\coth^{-1}\\left(${args[0]}\\right)"},acsc:{1:"\\csc^{-1}\\left(${args[0]}\\right)"},acsch:{1:"\\mathrm{csch}^{-1}\\left(${args[0]}\\right)"},asec:{1:"\\sec^{-1}\\left(${args[0]}\\right)"},asech:{1:"\\mathrm{sech}^{-1}\\left(${args[0]}\\right)"},asin:{1:"\\sin^{-1}\\left(${args[0]}\\right)"},asinh:{1:"\\sinh^{-1}\\left(${args[0]}\\right)"},atan:{1:"\\tan^{-1}\\left(${args[0]}\\right)"},atan2:{2:"\\mathrm{atan2}\\left(${args}\\right)"},atanh:{1:"\\tanh^{-1}\\left(${args[0]}\\right)"},cos:{1:"\\cos\\left(${args[0]}\\right)"},cosh:{1:"\\cosh\\left(${args[0]}\\right)"},cot:{1:"\\cot\\left(${args[0]}\\right)"},coth:{1:"\\coth\\left(${args[0]}\\right)"},csc:{1:"\\csc\\left(${args[0]}\\right)"},csch:{1:"\\mathrm{csch}\\left(${args[0]}\\right)"},sec:{1:"\\sec\\left(${args[0]}\\right)"},sech:{1:"\\mathrm{sech}\\left(${args[0]}\\right)"},sin:{1:"\\sin\\left(${args[0]}\\right)"},sinh:{1:"\\sinh\\left(${args[0]}\\right)"},tan:{1:"\\tan\\left(${args[0]}\\right)"},tanh:{1:"\\tanh\\left(${args[0]}\\right)"},to:{2:`\\left(\${args[0]}${vB.to}\${args[1]}\\right)`},numeric:function(e,t){return e.args[0].toTex()},number:{0:`0`,1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"},string:{0:`\\mathtt{""}`,1:"\\mathrm{string}\\left(${args[0]}\\right)"},bignumber:{0:`0`,1:"\\left(${args[0]}\\right)"},bigint:{0:`0`,1:"\\left(${args[0]}\\right)"},complex:{0:`0`,1:"\\left(${args[0]}\\right)",2:`\\left(\\left(\${args[0]}\\right)+${_B.i}\\cdot\\left(\${args[1]}\\right)\\right)`},matrix:{0:`\\begin{bmatrix}\\end{bmatrix}`,1:"\\left(${args[0]}\\right)",2:"\\left(${args[0]}\\right)"},sparse:{0:`\\begin{bsparse}\\end{bsparse}`,1:"\\left(${args[0]}\\right)"},unit:{1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"}},bB="\\mathrm{${name}}\\left(${args}\\right)",xB={deg:`^\\circ`};function SB(e){return(0,gB.default)(e,{preserveFormatting:!0})}function CB(e,t){return t=t===void 0?!1:t,t?W(xB,e)?xB[e]:`\\mathrm{`+SB(e)+`}`:W(_B,e)?_B[e]:SB(e)}var wB=`ConstantNode`,TB=K(wB,[`Node`,`isBounded`],e=>{var{Node:t,isBounded:n}=e;class r extends t{constructor(e){super(),this.value=e}get type(){return wB}get isConstantNode(){return!0}_compile(e,t){var n=this.value;return function(){return n}}forEach(e){}map(e){return this.clone()}clone(){return new r(this.value)}_toString(e){return WO(this.value,e)}_toHTML(e){var t=this._toString(e);switch(ST(this.value)){case`number`:case`bigint`:case`BigNumber`:case`Fraction`:return`<span class="math-number">`+t+`</span>`;case`string`:return`<span class="math-string">`+t+`</span>`;case`boolean`:return`<span class="math-boolean">`+t+`</span>`;case`null`:return`<span class="math-null-symbol">`+t+`</span>`;case`undefined`:return`<span class="math-undefined">`+t+`</span>`;default:return`<span class="math-symbol">`+t+`</span>`}}toJSON(){return{mathjs:wB,value:this.value}}static fromJSON(e){return new r(e.value)}_toTex(e){var t=this._toString(e);switch(ST(this.value)){case`string`:return`\\mathtt{`+SB(t)+`}`;case`number`:case`BigNumber`:if(!n(this.value))return this.value.valueOf()<0?`-\\infty`:`\\infty`;var r=t.toLowerCase().indexOf(`e`);return r===-1?t:t.substring(0,r)+`\\cdot10^{`+t.substring(r+1)+`}`;case`bigint`:return t.toString();case`Fraction`:return this.value.toLatex();default:return t}}}return YF(r,`name`,wB),r},{isClass:!0,isNode:!0}),EB=`FunctionAssignmentNode`,DB=K(EB,[`typed`,`Node`],e=>{var{typed:t,Node:n}=e;function r(e,t,n){var r=aB(e,t,n),i=aB(e.expr,t,n);return t===`all`||i!==null&&i<=r}class i extends n{constructor(e,t,n){if(super(),typeof e!=`string`)throw TypeError(`String expected for parameter "name"`);if(!Array.isArray(t))throw TypeError(`Array containing strings or objects expected for parameter "params"`);if(!mT(n))throw TypeError(`Node expected for parameter "expr"`);if(Jz.has(e))throw Error(`Illegal function name, "`+e+`" is a reserved keyword`);var r=new Set;for(var i of t){var a=typeof i==`string`?i:i.name;if(r.has(a))throw Error(`Duplicate parameter name "${a}"`);r.add(a)}this.name=e,this.params=t.map(function(e){return e&&e.name||e}),this.types=t.map(function(e){return e&&e.type||`any`}),this.expr=n}get type(){return EB}get isFunctionAssignmentNode(){return!0}_compile(e,n){var r=Object.create(n);vk(this.params,function(e){r[e]=!0});var i=this.expr,a=i._compile(e,r),o=this.name,s=this.params,c=xk(this.types,`,`),l=o+`(`+xk(this.params,`, `)+`)`;return function(e,n,r){var u={};u[c]=function(){for(var t=Object.create(n),i=0;i<s.length;i++)t[s[i]]=arguments[i];return a(e,t,r)};var d=t(o,u);return d.syntax=l,d.expr=i.toString(),e.set(o,d),d}}forEach(e){e(this.expr,`expr`,this)}map(e){var t=this._ifNode(e(this.expr,`expr`,this));return new i(this.name,this.params.slice(0),t)}clone(){return new i(this.name,this.params.slice(0),this.expr)}_toString(e){var t=e&&e.parenthesis?e.parenthesis:`keep`,n=this.expr.toString(e);return r(this,t,e&&e.implicit)&&(n=`(`+n+`)`),this.name+`(`+this.params.join(`, `)+`) = `+n}toJSON(){var e=this.types;return{mathjs:EB,name:this.name,params:this.params.map(function(t,n){return{name:t,type:e[n]}}),expr:this.expr}}static fromJSON(e){return new i(e.name,e.params,e.expr)}_toHTML(e){for(var t=e&&e.parenthesis?e.parenthesis:`keep`,n=[],i=0;i<this.params.length;i++)n.push(`<span class="math-symbol math-parameter">`+JO(this.params[i])+`</span>`);var a=this.expr.toHTML(e);return r(this,t,e&&e.implicit)&&(a=`<span class="math-parenthesis math-round-parenthesis">(</span>`+a+`<span class="math-parenthesis math-round-parenthesis">)</span>`),`<span class="math-function">`+JO(this.name)+`</span><span class="math-parenthesis math-round-parenthesis">(</span>`+n.join(`<span class="math-separator">,</span>`)+`<span class="math-parenthesis math-round-parenthesis">)</span><span class="math-operator math-assignment-operator math-variable-assignment-operator math-binary-operator">=</span>`+a}_toTex(e){var t=e&&e.parenthesis?e.parenthesis:`keep`,n=this.expr.toTex(e);return r(this,t,e&&e.implicit)&&(n=`\\left(${n}\\right)`),`\\mathrm{`+this.name+`}\\left(`+this.params.map(CB).join(`,`)+`\\right)=`+n}}return YF(i,`name`,EB),i},{isClass:!0,isNode:!0}),OB=`IndexNode`,kB=K(OB,[`Node`,`size`],e=>{var{Node:t,size:n}=e;class r extends t{constructor(e,t){if(super(),this.dimensions=e,this.dotNotation=t||!1,!Array.isArray(e)||!e.every(mT))throw TypeError(`Array containing Nodes expected for parameter "dimensions"`);if(this.dotNotation&&!this.isObjectProperty())throw Error(`dotNotation only applicable for object properties`)}get type(){return OB}get isIndexNode(){return!0}_compile(e,t){var r=_k(this.dimensions,function(r,i){if(r.filter(e=>e.isSymbolNode&&e.name===`end`).length>0){var a=Object.create(t);a.end=!0;var o=r._compile(e,a);return function(e,t,r){if(!Hw(r)&&!Vw(r)&&!Bw(r))throw TypeError(`Cannot resolve "end": context must be a Matrix, Array, or string but is `+ST(r));var a=n(r),s=Object.create(t);return s.end=a[i],o(e,s,r)}}else return r._compile(e,t)}),i=bw(e,`index`);return function(e,t,n){return i(..._k(r,function(r){return r(e,t,n)}))}}forEach(e){for(var t=0;t<this.dimensions.length;t++)e(this.dimensions[t],`dimensions[`+t+`]`,this)}map(e){for(var t=[],n=0;n<this.dimensions.length;n++)t[n]=this._ifNode(e(this.dimensions[n],`dimensions[`+n+`]`,this));return new r(t,this.dotNotation)}clone(){return new r(this.dimensions.slice(0),this.dotNotation)}isObjectProperty(){return this.dimensions.length===1&&lT(this.dimensions[0])&&typeof this.dimensions[0].value==`string`}getObjectProperty(){return this.isObjectProperty()?this.dimensions[0].value:null}_toString(e){return this.dotNotation?`.`+this.getObjectProperty():`[`+this.dimensions.join(`, `)+`]`}toJSON(){return{mathjs:OB,dimensions:this.dimensions,dotNotation:this.dotNotation}}static fromJSON(e){return new r(e.dimensions,e.dotNotation)}_toHTML(e){for(var t=[],n=0;n<this.dimensions.length;n++)t[n]=this.dimensions[n].toHTML();return this.dotNotation?`<span class="math-operator math-accessor-operator">.</span><span class="math-symbol math-property">`+JO(this.getObjectProperty())+`</span>`:`<span class="math-parenthesis math-square-parenthesis">[</span>`+t.join(`<span class="math-separator">,</span>`)+`<span class="math-parenthesis math-square-parenthesis">]</span>`}_toTex(e){var t=this.dimensions.map(function(t){return t.toTex(e)});return this.dotNotation?`.`+this.getObjectProperty():`_{`+t.join(`,`)+`}`}}return YF(r,`name`,OB),r},{isClass:!0,isNode:!0}),AB=`ObjectNode`,jB=K(AB,[`Node`],e=>{var{Node:t}=e;class n extends t{constructor(e){if(super(),this.properties=e||{},e&&(typeof e!=`object`||!Object.keys(e).every(function(t){return mT(e[t])})))throw TypeError(`Object containing Nodes expected`)}get type(){return AB}get isObjectNode(){return!0}_compile(e,t){var n={};for(var r in this.properties)if(W(this.properties,r)){var i=KO(r),a=JSON.parse(i);n[a]=bw(this.properties,r)._compile(e,t)}return function(e,t,r){var i={};for(var a in n)W(n,a)&&(i[a]=n[a](e,t,r));return i}}forEach(e){for(var t in this.properties)W(this.properties,t)&&e(this.properties[t],`properties[`+KO(t)+`]`,this)}map(e){var t={};for(var r in this.properties)W(this.properties,r)&&(t[r]=this._ifNode(e(this.properties[r],`properties[`+KO(r)+`]`,this)));return new n(t)}clone(){var e={};for(var t in this.properties)W(this.properties,t)&&(e[t]=this.properties[t]);return new n(e)}_toString(e){var t=[];for(var n in this.properties)W(this.properties,n)&&t.push(KO(n)+`: `+this.properties[n].toString(e));return`{`+t.join(`, `)+`}`}toJSON(){return{mathjs:AB,properties:this.properties}}static fromJSON(e){return new n(e.properties)}_toHTML(e){var t=[];for(var n in this.properties)W(this.properties,n)&&t.push(`<span class="math-symbol math-property">`+JO(n)+`</span><span class="math-operator math-assignment-operator math-property-assignment-operator math-binary-operator">:</span>`+this.properties[n].toHTML(e));return`<span class="math-parenthesis math-curly-parenthesis">{</span>`+t.join(`<span class="math-separator">,</span>`)+`<span class="math-parenthesis math-curly-parenthesis">}</span>`}_toTex(e){var t=[];for(var n in this.properties)W(this.properties,n)&&t.push(`\\mathbf{`+n+`:} & `+this.properties[n].toTex(e)+`\\\\`);return`\\left\\{\\begin{array}{ll}`+t.join(`
33
+ `)+`\\end{array}\\right\\}`}}return YF(n,`name`,AB),n},{isClass:!0,isNode:!0});function MB(e,t){return new kw(e,new Ow(t),new Set(Object.keys(t)))}var NB=`OperatorNode`,PB=K(NB,[`Node`],e=>{var{Node:t}=e;function n(e,t){var r=e;if(t===`auto`)for(;_T(r);)r=r.content;return lT(r)?!0:gT(r)?n(r.args[0],t):!1}function r(e,t,r,i,a){var o=aB(e,t,r),s=oB(e,t);if(t===`all`||i.length>2&&e.getIdentifier()!==`OperatorNode:add`&&e.getIdentifier()!==`OperatorNode:multiply`)return i.map(function(e){switch(e.getContent().type){case`ArrayNode`:case`ConstantNode`:case`SymbolNode`:case`ParenthesisNode`:return!1;default:return!0}});var c;switch(i.length){case 0:c=[];break;case 1:var l=aB(i[0],t,r,e);if(a&&l!==null){var u,d;if(t===`keep`?(u=i[0].getIdentifier(),d=e.getIdentifier()):(u=i[0].getContent().getIdentifier(),d=e.getContent().getIdentifier()),rB[o][d].latexLeftParens===!1){c=[!1];break}if(rB[l][u].latexParens===!1){c=[!1];break}}if(l===null){c=[!1];break}if(l<=o){c=[!0];break}c=[!1];break;case 2:var f,p=aB(i[0],t,r,e),m=sB(e,i[0],t);f=p===null?!1:p===o&&s===`right`&&!m?!0:p<o;var h,g=aB(i[1],t,r,e),_=sB(e,i[1],t);if(h=g===null?!1:g===o&&s===`left`&&!_?!0:g<o,a){var v,y,b;t===`keep`?(v=e.getIdentifier(),y=e.args[0].getIdentifier(),b=e.args[1].getIdentifier()):(v=e.getContent().getIdentifier(),y=e.args[0].getContent().getIdentifier(),b=e.args[1].getContent().getIdentifier()),p!==null&&(rB[o][v].latexLeftParens===!1&&(f=!1),rB[p][y].latexParens===!1&&(f=!1)),g!==null&&(rB[o][v].latexRightParens===!1&&(h=!1),rB[g][b].latexParens===!1&&(h=!1))}c=[f,h];break;default:(e.getIdentifier()===`OperatorNode:add`||e.getIdentifier()===`OperatorNode:multiply`)&&(c=i.map(function(n){var i=aB(n,t,r,e),a=sB(e,n,t),c=oB(n,t);return i===null?!1:o===i&&s===c&&!a?!0:i<o}));break}if(i.length>=2&&e.getIdentifier()===`OperatorNode:multiply`&&e.implicit&&t!==`all`&&r===`hide`)for(var x=1;x<c.length;++x)n(i[x],t)&&!c[x-1]&&(t!==`keep`||!_T(i[x-1]))&&(c[x]=!0);return c}class i extends t{constructor(e,t,n,r,i){if(super(),typeof e!=`string`)throw TypeError(`string expected for parameter "op"`);if(typeof t!=`string`)throw TypeError(`string expected for parameter "fn"`);if(!Array.isArray(n)||!n.every(mT))throw TypeError(`Array containing Nodes expected for parameter "args"`);this.implicit=r===!0,this.isPercentage=i===!0,this.op=e,this.fn=t,this.args=n||[]}get type(){return NB}get isOperatorNode(){return!0}_compile(e,t){if(typeof this.fn!=`string`||!ww(e,this.fn))throw e[this.fn]?Error(`No access to function "`+this.fn+`"`):Error(`Function `+this.fn+` missing in provided namespace "math"`);var n=bw(e,this.fn),r=_k(this.args,function(n){return n._compile(e,t)});if(typeof n==`function`&&n.rawArgs===!0){var i=this.args;return function(t,r,a){return n(i,e,MB(t,r))}}else if(r.length===1){var a=r[0];return function(e,t,r){return n(a(e,t,r))}}else if(r.length===2){var o=r[0],s=r[1];return function(e,t,r){return n(o(e,t,r),s(e,t,r))}}else return function(e,t,i){return n.apply(null,_k(r,function(n){return n(e,t,i)}))}}forEach(e){for(var t=0;t<this.args.length;t++)e(this.args[t],`args[`+t+`]`,this)}map(e){for(var t=[],n=0;n<this.args.length;n++)t[n]=this._ifNode(e(this.args[n],`args[`+n+`]`,this));return new i(this.op,this.fn,t,this.implicit,this.isPercentage)}clone(){return new i(this.op,this.fn,this.args.slice(0),this.implicit,this.isPercentage)}isUnary(){return this.args.length===1}isBinary(){return this.args.length===2}_toString(e){var t=e&&e.parenthesis?e.parenthesis:`keep`,n=e&&e.implicit?e.implicit:`hide`,i=this.args,a=r(this,t,n,i,!1);if(i.length===1){var o=oB(this,t),s=i[0].toString(e);a[0]&&(s=`(`+s+`)`);var c=/[a-zA-Z]+/.test(this.op);return o===`right`?this.op+(c?` `:``)+s:o===`left`?s+(c?` `:``)+this.op:s+this.op}else if(i.length===2){var l=i[0].toString(e),u=i[1].toString(e);return a[0]&&(l=`(`+l+`)`),a[1]&&(u=`(`+u+`)`),this.implicit&&this.getIdentifier()===`OperatorNode:multiply`&&n===`hide`?l+` `+u:l+` `+this.op+` `+u}else if(i.length>2&&(this.getIdentifier()===`OperatorNode:add`||this.getIdentifier()===`OperatorNode:multiply`)){var d=i.map(function(t,n){return t=t.toString(e),a[n]&&(t=`(`+t+`)`),t});return this.implicit&&this.getIdentifier()===`OperatorNode:multiply`&&n===`hide`?d.join(` `):d.join(` `+this.op+` `)}else return this.fn+`(`+this.args.join(`, `)+`)`}toJSON(){return{mathjs:NB,op:this.op,fn:this.fn,args:this.args,implicit:this.implicit,isPercentage:this.isPercentage}}static fromJSON(e){return new i(e.op,e.fn,e.args,e.implicit,e.isPercentage)}_toHTML(e){var t=e&&e.parenthesis?e.parenthesis:`keep`,n=e&&e.implicit?e.implicit:`hide`,i=this.args,a=r(this,t,n,i,!1);if(i.length===1){var o=oB(this,t),s=i[0].toHTML(e);return a[0]&&(s=`<span class="math-parenthesis math-round-parenthesis">(</span>`+s+`<span class="math-parenthesis math-round-parenthesis">)</span>`),o===`right`?`<span class="math-operator math-unary-operator math-lefthand-unary-operator">`+JO(this.op)+`</span>`+s:s+`<span class="math-operator math-unary-operator math-righthand-unary-operator">`+JO(this.op)+`</span>`}else if(i.length===2){var c=i[0].toHTML(e),l=i[1].toHTML(e);return a[0]&&(c=`<span class="math-parenthesis math-round-parenthesis">(</span>`+c+`<span class="math-parenthesis math-round-parenthesis">)</span>`),a[1]&&(l=`<span class="math-parenthesis math-round-parenthesis">(</span>`+l+`<span class="math-parenthesis math-round-parenthesis">)</span>`),this.implicit&&this.getIdentifier()===`OperatorNode:multiply`&&n===`hide`?c+`<span class="math-operator math-binary-operator math-implicit-binary-operator"></span>`+l:c+`<span class="math-operator math-binary-operator math-explicit-binary-operator">`+JO(this.op)+`</span>`+l}else{var u=i.map(function(t,n){return t=t.toHTML(e),a[n]&&(t=`<span class="math-parenthesis math-round-parenthesis">(</span>`+t+`<span class="math-parenthesis math-round-parenthesis">)</span>`),t});return i.length>2&&(this.getIdentifier()===`OperatorNode:add`||this.getIdentifier()===`OperatorNode:multiply`)?this.implicit&&this.getIdentifier()===`OperatorNode:multiply`&&n===`hide`?u.join(`<span class="math-operator math-binary-operator math-implicit-binary-operator"></span>`):u.join(`<span class="math-operator math-binary-operator math-explicit-binary-operator">`+JO(this.op)+`</span>`):`<span class="math-function">`+JO(this.fn)+`</span><span class="math-paranthesis math-round-parenthesis">(</span>`+u.join(`<span class="math-separator">,</span>`)+`<span class="math-paranthesis math-round-parenthesis">)</span>`}}_toTex(e){var t=e&&e.parenthesis?e.parenthesis:`keep`,n=e&&e.implicit?e.implicit:`hide`,i=this.args,a=r(this,t,n,i,!0),o=vB[this.fn];if(o=o===void 0?this.op:o,i.length===1){var s=oB(this,t),c=i[0].toTex(e);return a[0]&&(c=`\\left(${c}\\right)`),s===`right`?o+c:c+o}else if(i.length===2){var l=i[0],u=l.toTex(e);a[0]&&(u=`\\left(${u}\\right)`);var d=i[1].toTex(e);a[1]&&(d=`\\left(${d}\\right)`);var f=t===`keep`?l.getIdentifier():l.getContent().getIdentifier();switch(this.getIdentifier()){case`OperatorNode:divide`:return o+`{`+u+`}{`+d+`}`;case`OperatorNode:pow`:switch(u=`{`+u+`}`,d=`{`+d+`}`,f){case`ConditionalNode`:case`OperatorNode:divide`:u=`\\left(${u}\\right)`}break;case`OperatorNode:multiply`:if(this.implicit&&n===`hide`)return u+`~`+d}return u+o+d}else if(i.length>2&&(this.getIdentifier()===`OperatorNode:add`||this.getIdentifier()===`OperatorNode:multiply`)){var p=i.map(function(t,n){return t=t.toTex(e),a[n]&&(t=`\\left(${t}\\right)`),t});return this.getIdentifier()===`OperatorNode:multiply`&&this.implicit&&n===`hide`?p.join(`~`):p.join(o)}else return`\\mathrm{`+this.fn+`}\\left(`+i.map(function(t){return t.toTex(e)}).join(`,`)+`\\right)`}getIdentifier(){return this.type+`:`+this.fn}}return YF(i,`name`,NB),i},{isClass:!0,isNode:!0}),FB=`ParenthesisNode`,IB=K(FB,[`Node`],e=>{var{Node:t}=e;class n extends t{constructor(e){if(super(),!mT(e))throw TypeError(`Node expected for parameter "content"`);this.content=e}get type(){return FB}get isParenthesisNode(){return!0}_compile(e,t){return this.content._compile(e,t)}getContent(){return this.content.getContent()}forEach(e){e(this.content,`content`,this)}map(e){return new n(e(this.content,`content`,this))}clone(){return new n(this.content)}_toString(e){return!e||e&&!e.parenthesis||e&&e.parenthesis===`keep`?`(`+this.content.toString(e)+`)`:this.content.toString(e)}toJSON(){return{mathjs:FB,content:this.content}}static fromJSON(e){return new n(e.content)}_toHTML(e){return!e||e&&!e.parenthesis||e&&e.parenthesis===`keep`?`<span class="math-parenthesis math-round-parenthesis">(</span>`+this.content.toHTML(e)+`<span class="math-parenthesis math-round-parenthesis">)</span>`:this.content.toHTML(e)}_toTex(e){return!e||e&&!e.parenthesis||e&&e.parenthesis===`keep`?`\\left(${this.content.toTex(e)}\\right)`:this.content.toTex(e)}}return YF(n,`name`,FB),n},{isClass:!0,isNode:!0}),LB=`RangeNode`,RB=K(LB,[`Node`],e=>{var{Node:t}=e;function n(e,t,n){var r=aB(e,t,n),i={},a=aB(e.start,t,n);if(i.start=a!==null&&a<=r||t===`all`,e.step){var o=aB(e.step,t,n);i.step=o!==null&&o<=r||t===`all`}var s=aB(e.end,t,n);return i.end=s!==null&&s<=r||t===`all`,i}class r extends t{constructor(e,t,n){if(super(),!mT(e)||!mT(t)||n&&!mT(n))throw TypeError(`Node expected`);if(arguments.length>3)throw Error(`Too many arguments`);this.start=e,this.end=t,this.step=n||null}get type(){return LB}get isRangeNode(){return!0}needsEnd(){return this.filter(function(e){return bT(e)&&e.name===`end`}).length>0}_compile(e,t){var n=e.range,r=this.start._compile(e,t),i=this.end._compile(e,t);if(this.step){var a=this.step._compile(e,t);return function(e,t,o){return n(r(e,t,o),i(e,t,o),a(e,t,o))}}else return function(e,t,a){return n(r(e,t,a),i(e,t,a))}}forEach(e){e(this.start,`start`,this),e(this.end,`end`,this),this.step&&e(this.step,`step`,this)}map(e){return new r(this._ifNode(e(this.start,`start`,this)),this._ifNode(e(this.end,`end`,this)),this.step&&this._ifNode(e(this.step,`step`,this)))}clone(){return new r(this.start,this.end,this.step&&this.step)}_toString(e){var t=e&&e.parenthesis?e.parenthesis:`keep`,r=n(this,t,e&&e.implicit),i,a=this.start.toString(e);if(r.start&&(a=`(`+a+`)`),i=a,this.step){var o=this.step.toString(e);r.step&&(o=`(`+o+`)`),i+=`:`+o}var s=this.end.toString(e);return r.end&&(s=`(`+s+`)`),i+=`:`+s,i}toJSON(){return{mathjs:LB,start:this.start,end:this.end,step:this.step}}static fromJSON(e){return new r(e.start,e.end,e.step)}_toHTML(e){var t=e&&e.parenthesis?e.parenthesis:`keep`,r=n(this,t,e&&e.implicit),i,a=this.start.toHTML(e);if(r.start&&(a=`<span class="math-parenthesis math-round-parenthesis">(</span>`+a+`<span class="math-parenthesis math-round-parenthesis">)</span>`),i=a,this.step){var o=this.step.toHTML(e);r.step&&(o=`<span class="math-parenthesis math-round-parenthesis">(</span>`+o+`<span class="math-parenthesis math-round-parenthesis">)</span>`),i+=`<span class="math-operator math-range-operator">:</span>`+o}var s=this.end.toHTML(e);return r.end&&(s=`<span class="math-parenthesis math-round-parenthesis">(</span>`+s+`<span class="math-parenthesis math-round-parenthesis">)</span>`),i+=`<span class="math-operator math-range-operator">:</span>`+s,i}_toTex(e){var t=e&&e.parenthesis?e.parenthesis:`keep`,r=n(this,t,e&&e.implicit),i=this.start.toTex(e);if(r.start&&(i=`\\left(${i}\\right)`),this.step){var a=this.step.toTex(e);r.step&&(a=`\\left(${a}\\right)`),i+=`:`+a}var o=this.end.toTex(e);return r.end&&(o=`\\left(${o}\\right)`),i+=`:`+o,i}}return YF(r,`name`,LB),r},{isClass:!0,isNode:!0}),zB=`RelationalNode`,BB=K(zB,[`Node`],e=>{var{Node:t}=e,n={equal:`==`,unequal:`!=`,smaller:`<`,larger:`>`,smallerEq:`<=`,largerEq:`>=`};class r extends t{constructor(e,t){if(super(),!Array.isArray(e))throw TypeError(`Parameter conditionals must be an array`);if(!Array.isArray(t))throw TypeError(`Parameter params must be an array`);if(e.length!==t.length-1)throw TypeError(`Parameter params must contain exactly one more element than parameter conditionals`);this.conditionals=e,this.params=t}get type(){return zB}get isRelationalNode(){return!0}_compile(e,t){var n=this,r=this.params.map(n=>n._compile(e,t));return function(t,i,a){for(var o,s=r[0](t,i,a),c=0;c<n.conditionals.length;c++)if(o=s,s=r[c+1](t,i,a),!bw(e,n.conditionals[c])(o,s))return!1;return!0}}forEach(e){this.params.forEach((t,n)=>e(t,`params[`+n+`]`,this),this)}map(e){return new r(this.conditionals.slice(),this.params.map((t,n)=>this._ifNode(e(t,`params[`+n+`]`,this)),this))}clone(){return new r(this.conditionals,this.params)}_toString(e){for(var t=e&&e.parenthesis?e.parenthesis:`keep`,r=aB(this,t,e&&e.implicit),i=this.params.map(function(n,i){var a=aB(n,t,e&&e.implicit);return t===`all`||a!==null&&a<=r?`(`+n.toString(e)+`)`:n.toString(e)}),a=i[0],o=0;o<this.conditionals.length;o++)a+=` `+n[this.conditionals[o]],a+=` `+i[o+1];return a}toJSON(){return{mathjs:zB,conditionals:this.conditionals,params:this.params}}static fromJSON(e){return new r(e.conditionals,e.params)}_toHTML(e){for(var t=e&&e.parenthesis?e.parenthesis:`keep`,r=aB(this,t,e&&e.implicit),i=this.params.map(function(n,i){var a=aB(n,t,e&&e.implicit);return t===`all`||a!==null&&a<=r?`<span class="math-parenthesis math-round-parenthesis">(</span>`+n.toHTML(e)+`<span class="math-parenthesis math-round-parenthesis">)</span>`:n.toHTML(e)}),a=i[0],o=0;o<this.conditionals.length;o++)a+=`<span class="math-operator math-binary-operator math-explicit-binary-operator">`+JO(n[this.conditionals[o]])+`</span>`+i[o+1];return a}_toTex(e){for(var t=e&&e.parenthesis?e.parenthesis:`keep`,n=aB(this,t,e&&e.implicit),r=this.params.map(function(r,i){var a=aB(r,t,e&&e.implicit);return t===`all`||a!==null&&a<=n?`\\left(`+r.toTex(e)+`\right)`:r.toTex(e)}),i=r[0],a=0;a<this.conditionals.length;a++)i+=vB[this.conditionals[a]]+r[a+1];return i}}return YF(r,`name`,zB),r},{isClass:!0,isNode:!0}),VB=K(`SymbolNode`,[`math`,`?Unit`,`Node`],e=>{var{math:t,Unit:n,Node:r}=e;function i(e){return n?n.isValuelessUnit(e):!1}class a extends r{constructor(e){if(super(),typeof e!=`string`)throw TypeError(`String expected for parameter "name"`);this.name=e}get type(){return`SymbolNode`}get isSymbolNode(){return!0}_compile(e,t){var r=this.name;if(t[r]===!0)return function(e,t,n){return bw(t,r)};if(r in e)return function(t,n,i){return t.has(r)?t.get(r):bw(e,r)};var o=i(r);return function(e,t,i){return e.has(r)?e.get(r):o?new n(null,r):a.onUndefinedSymbol(r)}}forEach(e){}map(e){return this.clone()}static onUndefinedSymbol(e){throw Error(`Undefined symbol `+e)}clone(){return new a(this.name)}_toString(e){return this.name}_toHTML(e){var t=JO(this.name);return t===`true`||t===`false`?`<span class="math-symbol math-boolean">`+t+`</span>`:t===`i`?`<span class="math-symbol math-imaginary-symbol">`+t+`</span>`:t===`Infinity`?`<span class="math-symbol math-infinity-symbol">`+t+`</span>`:t===`NaN`?`<span class="math-symbol math-nan-symbol">`+t+`</span>`:t===`null`?`<span class="math-symbol math-null-symbol">`+t+`</span>`:t===`undefined`?`<span class="math-symbol math-undefined-symbol">`+t+`</span>`:`<span class="math-symbol">`+t+`</span>`}toJSON(){return{mathjs:`SymbolNode`,name:this.name}}static fromJSON(e){return new a(e.name)}_toTex(e){var n=!1;t[this.name]===void 0&&i(this.name)&&(n=!0);var r=CB(this.name,n);return r[0]===`\\`?r:` `+r}}return a},{isClass:!0,isNode:!0}),HB=`FunctionNode`,UB=K(HB,[`math`,`Node`,`SymbolNode`],e=>{var t,{math:n,Node:r,SymbolNode:i}=e,a=e=>WO(e,{truncate:78});function o(e,t,n){for(var r=``,i=/\$(?:\{([a-z_][a-z_0-9]*)(?:\[([0-9]+)\])?\}|\$)/gi,a=0,o;(o=i.exec(e))!==null;)if(r+=e.substring(a,o.index),a=o.index,o[0]===`$$`)r+=`$`,a++;else{a+=o[0].length;var s=t[o[1]];if(!s)throw ReferenceError(`Template: Property `+o[1]+` does not exist.`);if(o[2]===void 0)switch(typeof s){case`string`:r+=s;break;case`object`:if(mT(s))r+=s.toTex(n);else if(Array.isArray(s))r+=s.map(function(e,t){if(mT(e))return e.toTex(n);throw TypeError(`Template: `+o[1]+`[`+t+`] is not a Node.`)}).join(`,`);else throw TypeError(`Template: `+o[1]+` has to be a Node, String or array of Nodes`);break;default:throw TypeError(`Template: `+o[1]+` has to be a Node, String or array of Nodes`)}else if(mT(s[o[2]]&&s[o[2]]))r+=s[o[2]].toTex(n);else throw TypeError(`Template: `+o[1]+`[`+o[2]+`] is not a Node.`)}return r+=e.slice(a),r}class s extends r{constructor(e,t,n){if(super(),typeof e==`string`&&(e=new i(e)),!mT(e))throw TypeError(`Node expected as parameter "fn"`);if(!Array.isArray(t)||!t.every(mT))throw TypeError(`Array containing Nodes expected for parameter "args"`);var r=typeof n;if(!(r===`undefined`||r===`boolean`))throw TypeError(`optional flag, if specified, must be boolean`);this.fn=e,this.args=t||[],this.optional=!!n}get name(){return this.fn.name||``}get type(){return HB}get isFunctionNode(){return!0}_compile(e,t){var n=this.args.map(n=>n._compile(e,t)),r=this.optional||iT(this.fn)&&this.fn.optionalChaining;if(bT(this.fn)){var i=this.fn.name;if(t[i]){var o=this.args;return function(t,s,c){var l=bw(s,i);if(!(r&&l===void 0)){if(typeof l!=`function`)throw TypeError(`Argument '${i}' was not a function; received: ${a(l)}`);if(l.rawArgs)return l(o,e,MB(t,s));var u=n.map(e=>e(t,s,c));return l.apply(l,u)}}}else{var c=i in e?bw(e,i):void 0,l=typeof c==`function`&&c.rawArgs===!0,u=t=>{var n;if(t.has(i))n=t.get(i);else if(i in e)n=bw(e,i);else if(r)n=void 0;else return s.onUndefinedFunction(i);if(typeof n==`function`||r&&n===void 0)return n;throw TypeError(`'${i}' is not a function; its value is:
34
+ ${a(n)}`)};if(l){var d=this.args;return function(t,r,i){var a=u(t);return a.rawArgs===!0?a(d,e,MB(t,r)):a(...n.map(e=>e(t,r,i)))}}else switch(n.length){case 0:return function(e,t,n){var i=u(e);if(!(r&&i===void 0))return i()};case 1:return function(e,t,i){var a=u(e);if(!(r&&a===void 0)){var o=n[0];return a(o(e,t,i))}};case 2:return function(e,t,i){var a=u(e);if(!(r&&a===void 0)){var o=n[0],s=n[1];return a(o(e,t,i),s(e,t,i))}};default:return function(e,t,i){var a=u(e);if(!(r&&a===void 0))return a(...n.map(n=>n(e,t,i)))}}}}else if(iT(this.fn)&&pT(this.fn.index)&&this.fn.index.isObjectProperty()){var f=this.fn.object._compile(e,t),p=this.fn.index.getObjectProperty(),m=this.args;return function(t,i,a){var o=f(t,i,a);if(!(r&&(o==null||o[p]===void 0))){var s=Cw(o,p);if(s!=null&&s.rawArgs)return s(m,e,MB(t,i));var c=n.map(e=>e(t,i,a));return s.apply(o,c)}}}else{var h=this.fn.toString(),g=this.fn._compile(e,t),_=this.args;return function(t,i,o){var s=g(t,i,o);if(!(r&&s===void 0)){if(typeof s!=`function`)throw TypeError(`Expression '${h}' did not evaluate to a function; value is:
35
+ ${a(s)}`);if(s.rawArgs)return s(_,e,MB(t,i));var c=n.map(e=>e(t,i,o));return s.apply(s,c)}}}}forEach(e){e(this.fn,`fn`,this);for(var t=0;t<this.args.length;t++)e(this.args[t],`args[`+t+`]`,this)}map(e){for(var t=this._ifNode(e(this.fn,`fn`,this)),n=[],r=0;r<this.args.length;r++)n[r]=this._ifNode(e(this.args[r],`args[`+r+`]`,this));return new s(t,n)}clone(){return new s(this.fn,this.args.slice(0))}toString(e){var t,n=this.fn.toString(e);return e&&typeof e.handler==`object`&&W(e.handler,n)&&(t=e.handler[n](this,e)),t===void 0?super.toString(e):t}_toString(e){var t=this.args.map(function(t){return t.toString(e)});return(dT(this.fn)?`(`+this.fn.toString(e)+`)`:this.fn.toString(e))+`(`+t.join(`, `)+`)`}toJSON(){return{mathjs:HB,fn:this.fn,args:this.args}}_toHTML(e){var t=this.args.map(function(t){return t.toHTML(e)});return`<span class="math-function">`+JO(this.fn)+`</span><span class="math-paranthesis math-round-parenthesis">(</span>`+t.join(`<span class="math-separator">,</span>`)+`<span class="math-paranthesis math-round-parenthesis">)</span>`}toTex(e){var t;return e&&typeof e.handler==`object`&&W(e.handler,this.name)&&(t=e.handler[this.name](this,e)),t===void 0?super.toTex(e):t}_toTex(e){var t=this.args.map(function(t){return t.toTex(e)}),r;yB[this.name]&&(r=yB[this.name]),n[this.name]&&(typeof n[this.name].toTex==`function`||typeof n[this.name].toTex==`object`||typeof n[this.name].toTex==`string`)&&(r=n[this.name].toTex);var i;switch(typeof r){case`function`:i=r(this,e);break;case`string`:i=o(r,this,e);break;case`object`:switch(typeof r[t.length]){case`function`:i=r[t.length](this,e);break;case`string`:i=o(r[t.length],this,e);break}}return i===void 0?o(bB,this,e):i}getIdentifier(){return this.type+`:`+this.name}}return t=s,YF(s,`name`,HB),YF(s,`onUndefinedFunction`,function(e){throw Error(`Undefined function `+e)}),YF(s,`fromJSON`,function(e){return new t(e.fn,e.args)}),s},{isClass:!0,isNode:!0}),WB=`parse`,GB=K(WB,[`typed`,`numeric`,`config`,`AccessorNode`,`ArrayNode`,`AssignmentNode`,`BlockNode`,`ConditionalNode`,`ConstantNode`,`FunctionAssignmentNode`,`FunctionNode`,`IndexNode`,`ObjectNode`,`OperatorNode`,`ParenthesisNode`,`RangeNode`,`RelationalNode`,`SymbolNode`],e=>{var{typed:t,numeric:n,config:r,AccessorNode:i,ArrayNode:a,AssignmentNode:o,BlockNode:s,ConditionalNode:c,ConstantNode:l,FunctionAssignmentNode:u,FunctionNode:d,IndexNode:f,ObjectNode:p,OperatorNode:m,ParenthesisNode:h,RangeNode:g,RelationalNode:_,SymbolNode:v}=e,y=t(WB,{string:function(e){return ne(e,{})},"Array | Matrix":function(e){return b(e,{})},"string, Object":function(e,t){return ne(e,t.nodes===void 0?{}:t.nodes)},"Array | Matrix, Object":b});function b(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.nodes===void 0?{}:t.nodes;return qk(e,function(e){if(typeof e!=`string`)throw TypeError(`String expected`);return ne(e,n)})}var x={NULL:0,DELIMITER:1,NUMBER:2,SYMBOL:3,UNKNOWN:4},S={",":!0,"(":!0,")":!0,"[":!0,"]":!0,"{":!0,"}":!0,'"':!0,"'":!0,";":!0,"+":!0,"-":!0,"*":!0,".*":!0,"/":!0,"./":!0,"%":!0,"^":!0,".^":!0,"~":!0,"!":!0,"&":!0,"|":!0,"^|":!0,"=":!0,":":!0,"?":!0,"?.":!0,"??":!0,"==":!0,"!=":!0,"<":!0,">":!0,"<=":!0,">=":!0,"<<":!0,">>":!0,">>>":!0},C={mod:!0,to:!0,in:!0,and:!0,xor:!0,or:!0,not:!0},w={true:!0,false:!1,null:null,undefined:void 0},T=[`NaN`,`Infinity`],E={'"':`"`,"'":`'`,"\\":`\\`,"/":`/`,b:`\b`,f:`\f`,n:`
36
+ `,r:`\r`,t:` `};function D(){return{extraNodes:{},expression:``,comment:``,index:0,token:``,tokenType:x.NULL,nestingLevel:0,conditionalLevel:null}}function O(e,t){return e.expression.substr(e.index,t)}function k(e){return O(e,1)}function A(e){e.index++}function j(e){return e.expression.charAt(e.index-1)}function M(e){return e.expression.charAt(e.index+1)}function N(e){for(e.tokenType=x.NULL,e.token=``,e.comment=``;;){if(k(e)===`#`)for(;k(e)!==`
37
+ `&&k(e)!==``;)e.comment+=k(e),A(e);if(y.isWhitespace(k(e),e.nestingLevel))A(e);else break}if(k(e)===``){e.tokenType=x.DELIMITER;return}if(k(e)===`
38
+ `&&!e.nestingLevel){e.tokenType=x.DELIMITER,e.token=k(e),A(e);return}var t=k(e),n=O(e,2),r=O(e,3);if(r.length===3&&S[r]){e.tokenType=x.DELIMITER,e.token=r,A(e),A(e),A(e);return}if(n.length===2&&S[n]&&(n!==`?.`||!y.isDigit(e.expression.charAt(e.index+2)))){e.tokenType=x.DELIMITER,e.token=n,A(e),A(e);return}if(S[t]){e.tokenType=x.DELIMITER,e.token=t,A(e);return}if(y.isDigitDot(t)){e.tokenType=x.NUMBER;var i=O(e,2);if(i===`0b`||i===`0o`||i===`0x`){for(e.token+=k(e),A(e),e.token+=k(e),A(e);y.isAlpha(k(e),j(e),M(e))||y.isDigit(k(e));)e.token+=k(e),A(e);if(k(e)===`.`)for(e.token+=`.`,A(e);y.isAlpha(k(e),j(e),M(e))||y.isDigit(k(e));)e.token+=k(e),A(e);else if(k(e)===`i`)for(e.token+=`i`,A(e);y.isDigit(k(e));)e.token+=k(e),A(e);return}if(k(e)===`.`){if(e.token+=k(e),A(e),!y.isDigit(k(e))){e.tokenType=x.DELIMITER;return}}else{for(;y.isDigit(k(e));)e.token+=k(e),A(e);y.isDecimalMark(k(e),M(e))&&(e.token+=k(e),A(e))}for(;y.isDigit(k(e));)e.token+=k(e),A(e);if(k(e)===`E`||k(e)===`e`){if(y.isDigit(M(e))||M(e)===`-`||M(e)===`+`){if(e.token+=k(e),A(e),(k(e)===`+`||k(e)===`-`)&&(e.token+=k(e),A(e)),!y.isDigit(k(e)))throw Ne(e,`Digit expected, got "`+k(e)+`"`);for(;y.isDigit(k(e));)e.token+=k(e),A(e);if(y.isDecimalMark(k(e),M(e)))throw Ne(e,`Digit expected, got "`+k(e)+`"`)}else if(y.isDecimalMark(M(e),e.expression.charAt(e.index+2)))throw A(e),Ne(e,`Digit expected, got "`+k(e)+`"`)}return}if(y.isAlpha(k(e),j(e),M(e))){for(;y.isAlpha(k(e),j(e),M(e))||y.isDigit(k(e));)e.token+=k(e),A(e);W(C,e.token)?e.tokenType=x.DELIMITER:e.tokenType=x.SYMBOL;return}for(e.tokenType=x.UNKNOWN;k(e)!==``;)e.token+=k(e),A(e);throw Ne(e,`Syntax error in part "`+e.token+`"`)}function ee(e){do N(e);while(e.token===`
39
+ `)}function P(e){e.nestingLevel++}function te(e){e.nestingLevel--}y.isAlpha=function(e,t,n){return y.isValidLatinOrGreek(e)||y.isValidMathSymbol(e,n)||y.isValidMathSymbol(t,e)},y.isValidLatinOrGreek=function(e){return/^[a-zA-Z_$\u00C0-\u02AF\u0370-\u03FF\u2100-\u214F]$/.test(e)},y.isValidMathSymbol=function(e,t){return/^[\uD835]$/.test(e)&&/^[\uDC00-\uDFFF]$/.test(t)&&/^[^\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDFCC\uDFCD]$/.test(t)},y.isWhitespace=function(e,t){return e===` `||e===` `||e===`\xA0`||e===`
40
+ `&&t>0},y.isDecimalMark=function(e,t){return e===`.`&&t!==`/`&&t!==`*`&&t!==`^`},y.isDigitDot=function(e){return e>=`0`&&e<=`9`||e===`.`},y.isDigit=function(e){return e>=`0`&&e<=`9`};function ne(e,t){var n=D();vw(n,{expression:e,extraNodes:t}),N(n);var r=re(n);if(n.token!==``)throw n.tokenType===x.DELIMITER?Pe(n,`Unexpected operator `+n.token):Ne(n,`Unexpected part "`+n.token+`"`);return r}function re(e){var t,n=[],r;for(e.token!==``&&e.token!==`
41
+ `&&e.token!==`;`&&(t=F(e),e.comment&&(t.comment=e.comment));e.token===`
42
+ `||e.token===`;`;)n.length===0&&t&&(r=e.token!==`;`,n.push({node:t,visible:r})),N(e),e.token!==`
43
+ `&&e.token!==`;`&&e.token!==``&&(t=F(e),e.comment&&(t.comment=e.comment),r=e.token!==`;`,n.push({node:t,visible:r}));return n.length>0?new s(n):(t||(t=new l(void 0),e.comment&&(t.comment=e.comment)),t)}function F(e){var t,n,r,i,a=ie(e);if(e.token===`=`){if(bT(a))return t=a.name,ee(e),r=F(e),new o(new v(t),r);if(iT(a)){if(a.optionalChaining)throw Ne(e,`Cannot assign to optional chain`);return ee(e),r=F(e),new o(a.object,a.index,r)}else if(fT(a)&&bT(a.fn)&&(i=!0,n=[],t=a.name,a.args.forEach(function(e,t){bT(e)?n[t]=e.name:i=!1}),i))return ee(e),r=F(e),new u(t,n,r);throw Ne(e,`Invalid left hand side of assignment operator =`)}return a}function ie(e){for(var t=I(e);e.token===`?`;){var n=e.conditionalLevel;e.conditionalLevel=e.nestingLevel,ee(e);var r=t,i=F(e);if(e.token!==`:`)throw Ne(e,`False part of conditional expression expected`);e.conditionalLevel=null,ee(e),t=new c(r,i,F(e)),e.conditionalLevel=n}return t}function I(e){for(var t=ae(e);e.token===`or`;)ee(e),t=new m(`or`,`or`,[t,ae(e)]);return t}function ae(e){for(var t=oe(e);e.token===`xor`;)ee(e),t=new m(`xor`,`xor`,[t,oe(e)]);return t}function oe(e){for(var t=L(e);e.token===`and`;)ee(e),t=new m(`and`,`and`,[t,L(e)]);return t}function L(e){for(var t=se(e);e.token===`|`;)ee(e),t=new m(`|`,`bitOr`,[t,se(e)]);return t}function se(e){for(var t=ce(e);e.token===`^|`;)ee(e),t=new m(`^|`,`bitXor`,[t,ce(e)]);return t}function ce(e){for(var t=le(e);e.token===`&`;)ee(e),t=new m(`&`,`bitAnd`,[t,le(e)]);return t}function le(e){for(var t=[ue(e)],n=[],r={"==":`equal`,"!=":`unequal`,"<":`smaller`,">":`larger`,"<=":`smallerEq`,">=":`largerEq`};W(r,e.token);){var i={name:e.token,fn:r[e.token]};n.push(i),ee(e),t.push(ue(e))}return t.length===1?t[0]:t.length===2?new m(n[0].name,n[0].fn,t):new _(n.map(e=>e.fn),t)}function ue(e){for(var t=R(e),n,r,i,a={"<<":`leftShift`,">>":`rightArithShift`,">>>":`rightLogShift`};W(a,e.token);)n=e.token,r=a[n],ee(e),i=[t,R(e)],t=new m(n,r,i);return t}function R(e){for(var t=de(e),n,r,i,a={to:`to`,in:`to`};W(a,e.token);)n=e.token,r=a[n],ee(e),n===`in`&&`])},;`.includes(e.token)?t=new m(`*`,`multiply`,[t,new v(`in`)],!0):(i=[t,de(e)],t=new m(n,r,i));return t}function de(e){var t,n=[];if(e.token===`:`){if(e.conditionalLevel===e.nestingLevel)throw Ne(e,`The true-expression of a conditional operator may not be empty`);t=new l(1)}else t=fe(e);if(e.token===`:`&&e.conditionalLevel!==e.nestingLevel){for(n.push(t);e.token===`:`&&n.length<3;)ee(e),e.token===`)`||e.token===`]`||e.token===`,`||e.token===``?n.push(new v(`end`)):n.push(fe(e));t=n.length===3?new g(n[0],n[2],n[1]):new g(n[0],n[1])}return t}function fe(e){for(var t=pe(e),n,r,i,a={"+":`add`,"-":`subtract`};W(a,e.token);){n=e.token,r=a[n],ee(e);var o=pe(e);i=o.isPercentage?[t,new m(`*`,`multiply`,[t,o])]:[t,o],t=new m(n,r,i)}return t}function pe(e){for(var t=me(e),n=t,r,i,a={"*":`multiply`,".*":`dotMultiply`,"/":`divide`,"./":`dotDivide`,"%":`mod`,mod:`mod`};W(a,e.token);)r=e.token,i=a[r],ee(e),n=me(e),t=new m(r,i,[t,n]);return t}function me(e){for(var t=he(e),n=t;e.tokenType===x.SYMBOL||e.token===`in`&&lT(t)||e.token===`in`&&gT(t)&&t.fn===`unaryMinus`&&lT(t.args[0])||e.tokenType===x.NUMBER&&!lT(n)&&(!gT(n)||n.op===`!`)||e.token===`(`;)n=he(e),t=new m(`*`,`multiply`,[t,n],!0);return t}function he(e){for(var t=ge(e),n=t,r=[];e.token===`/`&&uT(n);)if(r.push(vw({},e)),ee(e),e.tokenType===x.NUMBER)if(r.push(vw({},e)),ee(e),e.tokenType===x.SYMBOL||e.token===`(`||e.token===`in`)vw(e,r.pop()),r.pop(),n=ge(e),t=new m(`/`,`divide`,[t,n]);else{r.pop(),vw(e,r.pop());break}else{vw(e,r.pop());break}return t}function ge(e){var t=_e(e);if(e.token===`%`){var n=vw({},e);ee(e);try{_e(e),vw(e,n)}catch{t=new m(`/`,`divide`,[t,new l(100)],!1,!0)}}return t}function _e(e){var t,n,r,i={"-":`unaryMinus`,"+":`unaryPlus`,"~":`bitNot`,not:`not`};return W(i,e.token)?(r=i[e.token],t=e.token,ee(e),n=[_e(e)],new m(t,r,n)):ve(e)}function ve(e){var t=ye(e),n,r,i;return(e.token===`^`||e.token===`.^`)&&(n=e.token,r=n===`^`?`pow`:`dotPow`,ee(e),i=[t,_e(e)],t=new m(n,r,i)),t}function ye(e){for(var t=be(e);e.token===`??`;)ee(e),t=new m(`??`,`nullish`,[t,be(e)]);return t}function be(e){for(var t=xe(e),n,r,i,a={"!":`factorial`,"'":`ctranspose`};W(a,e.token);)n=e.token,r=a[n],N(e),i=[t],t=new m(n,r,i),t=Ce(e,t);return t}function xe(e){var t=[];if(e.tokenType===x.SYMBOL&&W(e.extraNodes,e.token)){var n=e.extraNodes[e.token];if(N(e),e.token===`(`){if(t=[],P(e),N(e),e.token!==`)`)for(t.push(F(e));e.token===`,`;)N(e),t.push(F(e));if(e.token!==`)`)throw Ne(e,`Parenthesis ) expected`);te(e),N(e)}return new n(t)}return Se(e)}function Se(e){var t,r;return e.tokenType===x.SYMBOL||e.tokenType===x.DELIMITER&&e.token in C?(r=e.token,N(e),t=W(w,r)?new l(w[r]):T.includes(r)?new l(n(r,`number`)):new v(r),t=Ce(e,t),t):we(e)}function Ce(e,t,n){for(var r;;){var a=!1;e.token===`?.`&&(a=!0,N(e));var o=(e.token===`(`||e.token===`[`||e.token===`.`)&&(!n||n.includes(e.token));if(!(a||o))break;if(r=[],e.token===`(`)if(a||bT(t)||iT(t)){if(P(e),N(e),e.token!==`)`)for(r.push(F(e));e.token===`,`;)N(e),r.push(F(e));if(e.token!==`)`)throw Ne(e,`Parenthesis ) expected`);te(e),N(e),t=new d(t,r,a)}else return t;else if(e.token===`[`){if(P(e),N(e),e.token!==`]`)for(r.push(F(e));e.token===`,`;)N(e),r.push(F(e));if(e.token!==`]`)throw Ne(e,`Parenthesis ] expected`);te(e),N(e),t=new i(t,new f(r),a)}else{if(a||N(e),!(e.tokenType===x.SYMBOL||e.tokenType===x.DELIMITER&&e.token in C)){var s=`Property name expected after `;throw s+=a?`optional chain`:`dot`,Ne(e,s)}r.push(new l(e.token)),N(e),t=new i(t,new f(r,!0),a)}}return t}function we(e){var t,n;return e.token===`"`||e.token===`'`?(n=Te(e,e.token),t=new l(n),t=Ce(e,t),t):Ee(e)}function Te(e,t){for(var n=``;k(e)!==``&&k(e)!==t;)if(k(e)===`\\`){A(e);var r=k(e),i=E[r];if(i!==void 0)n+=i,e.index+=1;else if(r===`u`){var a=e.expression.slice(e.index+1,e.index+5);if(/^[0-9A-Fa-f]{4}$/.test(a))n+=String.fromCharCode(parseInt(a,16)),e.index+=5;else throw Ne(e,`Invalid unicode character \\u${a}`)}else throw Ne(e,`Bad escape character \\${r}`)}else n+=k(e),A(e);if(N(e),e.token!==t)throw Ne(e,`End of string ${t} expected`);return N(e),n}function Ee(e){var t,n,r,i;if(e.token===`[`){if(P(e),N(e),e.token!==`]`){var o=De(e);if(e.token===`;`){for(r=1,n=[o];e.token===`;`;)N(e),e.token!==`]`&&(n[r]=De(e),r++);if(e.token!==`]`)throw Ne(e,`End of matrix ] expected`);te(e),N(e),i=n[0].items.length;for(var s=1;s<r;s++)if(n[s].items.length!==i)throw Pe(e,`Column dimensions mismatch (`+n[s].items.length+` !== `+i+`)`);t=new a(n)}else{if(e.token!==`]`)throw Ne(e,`End of matrix ] expected`);te(e),N(e),t=o}}else te(e),N(e),t=new a([]);return Ce(e,t)}return Oe(e)}function De(e){for(var t=[F(e)],n=1;e.token===`,`;)N(e),e.token!==`]`&&e.token!==`;`&&(t[n]=F(e),n++);return new a(t)}function Oe(e){if(e.token===`{`){P(e);var t,n={};do if(N(e),e.token!==`}`){if(e.token===`"`||e.token===`'`)t=Te(e,e.token);else if(e.tokenType===x.SYMBOL||e.tokenType===x.DELIMITER&&e.token in C)t=e.token,N(e);else throw Ne(e,`Symbol or string expected as object key`);if(e.token!==`:`)throw Ne(e,`Colon : expected after object key`);N(e),n[t]=F(e)}while(e.token===`,`);if(e.token!==`}`)throw Ne(e,`Comma , or bracket } expected after object value`);te(e),N(e);var r=new p(n);return r=Ce(e,r),r}return ke(e)}function ke(e){var t;if(e.tokenType===x.NUMBER){t=e.token,N(e);var i=FT(t,r);return new l(n(t,i))}return Ae(e)}function Ae(e){var t;if(e.token===`(`){if(P(e),N(e),t=F(e),e.token!==`)`)throw Ne(e,`Parenthesis ) expected`);return te(e),N(e),t=new h(t),t=Ce(e,t),t}return je(e)}function je(e){throw e.token===``?Ne(e,`Unexpected end of expression`):Ne(e,`Value expected`)}function Me(e){return e.index-e.token.length+1}function Ne(e,t){var n=Me(e),r=SyntaxError(t+` (char `+n+`)`);return r.char=n,r}function Pe(e,t){var n=Me(e),r=SyntaxError(t+` (char `+n+`)`);return r.char=n,r}return t.addConversion({from:`string`,to:`Node`,convert:y}),y}),KB=`compile`,qB=K(KB,[`typed`,`parse`],e=>{var{typed:t,parse:n}=e;return t(KB,{string:function(e){return n(e).compile()},"Array | Matrix":function(e){return qk(e,function(e){return n(e).compile()})}})}),JB=`evaluate`,YB=K(JB,[`typed`,`parse`],e=>{var{typed:t,parse:n}=e;return t(JB,{string:function(e){var t=jw();return n(e).compile().evaluate(t)},"string, Map | Object":function(e,t){return n(e).compile().evaluate(t)},"Array | Matrix":function(e){var t=jw();return qk(e,function(e){return n(e).compile().evaluate(t)})},"Array | Matrix, Map | Object":function(e,t){return qk(e,function(e){return n(e).compile().evaluate(t)})}})}),XB=K(`Parser`,[`evaluate`,`parse`],e=>{var{evaluate:t,parse:n}=e;function r(){if(!(this instanceof r))throw SyntaxError(`Constructor must be called with the new operator`);Object.defineProperty(this,`scope`,{value:jw(),writable:!1})}r.prototype.type=`Parser`,r.prototype.isParser=!0,r.prototype.evaluate=function(e){return t(e,this.scope)},r.prototype.get=function(e){if(this.scope.has(e))return this.scope.get(e)},r.prototype.getAll=function(){return Nw(this.scope)},r.prototype.getAllAsMap=function(){return this.scope};function i(e){if(e.length===0)return!1;for(var t=0;t<e.length;t++){var r=e.charAt(t-1),i=e.charAt(t),a=e.charAt(t+1);if(!(n.isAlpha(i,r,a)||t>0&&n.isDigit(i)))return!1}return!0}return r.prototype.set=function(e,t){if(!i(e))throw Error(`Invalid variable name: '${e}'. Variable names must follow the specified rules.`);return this.scope.set(e,t),t},r.prototype.remove=function(e){this.scope.delete(e)},r.prototype.clear=function(){this.scope.clear()},r.prototype.toJSON=function(){var e={mathjs:`Parser`,variables:{},functions:{}};for(var[t,n]of this.scope)if(Zw(n)){if(!ZB(n))throw Error(`Cannot serialize external function ${t}`);e.functions[t]=`${n.syntax} = ${n.expr}`}else e.variables[t]=n;return e},r.fromJSON=function(e){var t=new r;return Object.entries(e.variables).forEach(e=>{var[n,r]=e;return t.set(n,r)}),Object.entries(e.functions).forEach(e=>{var[n,r]=e;return t.evaluate(r)}),t},r},{isClass:!0});function ZB(e){return typeof e==`function`&&typeof e.syntax==`string`&&typeof e.expr==`string`}var QB=`parser`,$B=K(QB,[`typed`,`Parser`],e=>{var{typed:t,Parser:n}=e;return t(QB,{"":function(){return new n}})}),eV=`lup`,tV=K(eV,[`typed`,`matrix`,`abs`,`addScalar`,`divideScalar`,`multiplyScalar`,`subtractScalar`,`larger`,`equalScalar`,`unaryMinus`,`DenseMatrix`,`SparseMatrix`,`Spa`],e=>{var{typed:t,matrix:n,abs:r,addScalar:i,divideScalar:a,multiplyScalar:o,subtractScalar:s,larger:c,equalScalar:l,unaryMinus:u,DenseMatrix:d,SparseMatrix:f,Spa:p}=e;return t(eV,{DenseMatrix:function(e){return m(e)},SparseMatrix:function(e){return h(e)},Array:function(e){var t=m(n(e));return{L:t.L.valueOf(),U:t.U.valueOf(),p:t.p}}});function m(e){var t=e._size[0],n=e._size[1],u=Math.min(t,n),f=CT(e._data),p=[],m=[t,u],h=[],g=[u,n],_,v,y,b=[];for(_=0;_<t;_++)b[_]=_;for(v=0;v<n;v++){if(v>0)for(_=0;_<t;_++){var x=Math.min(_,v),S=0;for(y=0;y<x;y++)S=i(S,o(f[_][y],f[y][v]));f[_][v]=s(f[_][v],S)}var C=v,w=0,T=0;for(_=v;_<t;_++){var E=f[_][v],D=r(E);c(D,w)&&(C=_,w=D,T=E)}if(v!==C&&(b[v]=[b[C],b[C]=b[v]][0],d._swapRows(v,C,f)),v<t)for(_=v+1;_<t;_++){var O=f[_][v];l(O,0)||(f[_][v]=a(f[_][v],T))}}for(v=0;v<n;v++)for(_=0;_<t;_++){if(v===0&&(_<n&&(h[_]=[]),p[_]=[]),_<v){_<n&&(h[_][v]=f[_][v]),v<t&&(p[_][v]=0);continue}if(_===v){_<n&&(h[_][v]=f[_][v]),v<t&&(p[_][v]=1);continue}_<n&&(h[_][v]=0),v<t&&(p[_][v]=f[_][v])}var k=new d({data:p,size:m}),A=new d({data:h,size:g}),j=[];for(_=0,u=b.length;_<u;_++)j[b[_]]=_;return{L:k,U:A,p:j,toString:function(){return`L: `+this.L.toString()+`
44
+ U: `+this.U.toString()+`
45
+ P: `+this.p}}}function h(e){var t=e._size[0],n=e._size[1],i=Math.min(t,n),s=e._values,d=e._index,m=e._ptr,h=[],g=[],_=[],v=[t,i],y=[],b=[],x=[],S=[i,n],C,w,T,E=[],D=[];for(C=0;C<t;C++)E[C]=C,D[C]=C;var O=function(e,t){var n=D[e],r=D[t];E[n]=t,E[r]=e,D[e]=r,D[t]=n},k=function(){var e=new p;w<t&&(_.push(h.length),h.push(1),g.push(w)),x.push(y.length);var n=m[w],i=m[w+1];for(T=n;T<i;T++)C=d[T],e.set(E[C],s[T]);w>0&&e.forEach(0,w-1,function(t,n){f._forEachRow(t,h,g,_,function(r,i){r>t&&e.accumulate(r,u(o(i,n)))})});var D=w,k=e.get(w),A=r(k);e.forEach(w+1,t-1,function(e,t){var n=r(t);c(n,A)&&(D=e,A=n,k=t)}),w!==D&&(f._swapRows(w,D,v[1],h,g,_),f._swapRows(w,D,S[1],y,b,x),e.swap(w,D),O(w,D)),e.forEach(0,t-1,function(e,t){e<=w?(y.push(t),b.push(e)):(t=a(t,k),l(t,0)||(h.push(t),g.push(e)))})};for(w=0;w<n;w++)k();return x.push(y.length),_.push(h.length),{L:new f({values:h,index:g,ptr:_,size:v}),U:new f({values:y,index:b,ptr:x,size:S}),p:E,toString:function(){return`L: `+this.L.toString()+`
46
+ U: `+this.U.toString()+`
47
+ P: `+this.p}}}}),nV=`qr`,rV=K(nV,[`typed`,`matrix`,`zeros`,`identity`,`isZero`,`equal`,`sign`,`sqrt`,`conj`,`unaryMinus`,`addScalar`,`divideScalar`,`multiplyScalar`,`subtractScalar`,`complex`],e=>{var{typed:t,matrix:n,zeros:r,identity:i,isZero:a,equal:o,sign:s,sqrt:c,conj:l,unaryMinus:u,addScalar:d,divideScalar:f,multiplyScalar:p,subtractScalar:m,complex:h}=e;return vw(t(nV,{DenseMatrix:function(e){return _(e)},SparseMatrix:function(e){return v(e)},Array:function(e){var t=_(n(e));return{Q:t.Q.valueOf(),R:t.R.valueOf()}}}),{_denseQRimpl:g});function g(e){var t=e._size[0],n=e._size[1],h=i([t],`dense`),g=h._data,_=e.clone(),v=_._data,y,b,x,S=r([t],``);for(x=0;x<Math.min(n,t);++x){var C=v[x][x],w=u(o(C,0)?1:s(C)),T=l(w),E=0;for(y=x;y<t;y++)E=d(E,p(v[y][x],l(v[y][x])));var D=p(w,c(E));if(!a(D)){var O=m(C,D);for(S[x]=1,y=x+1;y<t;y++)S[y]=f(v[y][x],O);var k=u(l(f(O,D))),A=void 0;for(b=x;b<n;b++){for(A=0,y=x;y<t;y++)A=d(A,p(l(S[y]),v[y][b]));for(A=p(A,k),y=x;y<t;y++)v[y][b]=p(m(v[y][b],p(S[y],A)),T)}for(y=0;y<t;y++){for(A=0,b=x;b<t;b++)A=d(A,p(g[y][b],S[b]));for(A=p(A,k),b=x;b<t;++b)g[y][b]=f(m(g[y][b],p(A,l(S[b]))),T)}}}return{Q:h,R:_,toString:function(){return`Q: `+this.Q.toString()+`
48
+ R: `+this.R.toString()}}}function _(e){var t=g(e),n=t.R._data;if(e._data.length>0)for(var r=n[0][0].type===`Complex`?h(0):0,i=0;i<n.length;++i)for(var a=0;a<i&&a<(n[0]||[]).length;++a)n[i][a]=r;return t}function v(e){throw Error(`qr not implemented for sparse matrices yet`)}});function iV(e,t,n,r){for(var i=e._values,a=e._index,o=e._ptr,s=e._size,c=e._datatype,l=s[0],u=s[1],d=r&&e._values?[]:null,f=[],p=[],m=0,h=0;h<u;h++){p[h]=m;for(var g=n?n[h]:h,_=o[g],v=o[g+1],y=_;y<v;y++)f[m]=t?t[a[y]]:a[y],d&&(d[m]=i[y]),m++}return p[u]=m,e.createSparseMatrix({values:d,index:f,ptr:p,size:[l,u],datatype:c})}function aV(e,t,n,r,i,a,o){var s=0;for(n[o]=e;s>=0;){var c=n[o+s],l=n[r+c];l===-1?(s--,a[t++]=c):(n[r+c]=n[i+l],++s,n[o+s]=l)}return t}function oV(e,t){if(!e)return null;var n=0,r,i=[],a=[],o=0,s=t,c=2*t;for(r=0;r<t;r++)a[o+r]=-1;for(r=t-1;r>=0;r--)e[r]!==-1&&(a[s+r]=a[o+e[r]],a[o+e[r]]=r);for(r=0;r<t;r++)e[r]===-1&&(n=aV(r,n,a,o,s,i,c));return i}function sV(e,t){if(!e)return null;var n=e._index,r=e._ptr,i=e._size,a=i[0],o=i[1],s=[],c=[],l=0,u=o,d,f;if(t)for(d=0;d<a;d++)c[u+d]=-1;for(var p=0;p<o;p++){s[p]=-1,c[l+p]=-1;for(var m=r[p],h=r[p+1],g=m;g<h;g++){var _=n[g];for(d=t?c[u+_]:_;d!==-1&&d<p;d=f)f=c[l+d],c[l+d]=p,f===-1&&(s[d]=p);t&&(c[u+_]=p)}}return s}function cV(e,t,n){for(var r=e._values,i=e._index,a=e._ptr,o=e._size[1],s=0,c=0;c<o;c++){var l=a[c];for(a[c]=s;l<a[c+1];l++)t(i[l],c,r?r[l]:1,n)&&(i[s]=i[l],r&&(r[s]=r[l]),s++)}return a[o]=s,i.splice(s,i.length-s),r&&r.splice(s,r.length-s),s}function lV(e){return-e-2}var uV=K(`csAmd`,[`add`,`multiply`,`transpose`],e=>{var{add:t,multiply:n,transpose:r}=e;return function(e,t){if(!t||e<=0||e>3)return null;var n=t._size,r=n[0],l=n[1],u=0,d=Math.max(16,10*Math.sqrt(l));d=Math.min(l-2,d);var f=i(e,t,r,l,d);cV(f,c,null);for(var p=f._index,m=f._ptr,h=m[l],g=[],_=[],v=0,y=l+1,b=2*(l+1),x=3*(l+1),S=4*(l+1),C=5*(l+1),w=6*(l+1),T=7*(l+1),E=g,D=a(l,m,_,v,x,E,b,T,y,w,S,C),O=o(l,m,_,C,S,w,d,y,x,E,b),k=0,A,j,M,N,ee,P,te,ne,re,F,ie,I,ae,oe,L,se;O<l;){for(M=-1;k<l&&(M=_[x+k])===-1;k++);_[b+M]!==-1&&(E[_[b+M]]=-1),_[x+k]=_[b+M];var ce=_[S+M],le=_[y+M];O+=le;var ue=0;_[y+M]=-le;var R=m[M],de=ce===0?R:h,fe=de;for(N=1;N<=ce+1;N++){for(N>ce?(P=M,te=R,ne=_[v+M]-ce):(P=p[R++],te=m[P],ne=_[v+P]),ee=1;ee<=ne;ee++)A=p[te++],!((re=_[y+A])<=0)&&(ue+=re,_[y+A]=-re,p[fe++]=A,_[b+A]!==-1&&(E[_[b+A]]=E[A]),E[A]===-1?_[x+_[C+A]]=_[b+A]:_[b+E[A]]=_[b+A]);P!==M&&(m[P]=lV(M),_[w+P]=0)}for(ce!==0&&(h=fe),_[C+M]=ue,m[M]=de,_[v+M]=fe-de,_[S+M]=-2,D=s(D,u,_,w,l),F=de;F<fe;F++)if(A=p[F],!((ie=_[S+A])<=0)){re=-_[y+A];var pe=D-re;for(R=m[A],I=m[A]+ie-1;R<=I;R++)P=p[R],_[w+P]>=D?_[w+P]-=re:_[w+P]!==0&&(_[w+P]=_[C+P]+pe)}for(F=de;F<fe;F++){for(A=p[F],I=m[A],ae=I+_[S+A]-1,oe=I,L=0,se=0,R=I;R<=ae;R++)if(P=p[R],_[w+P]!==0){var me=_[w+P]-D;me>0?(se+=me,p[oe++]=P,L+=P):(m[P]=lV(M),_[w+P]=0)}_[S+A]=oe-I+1;var he=oe,ge=I+_[v+A];for(R=ae+1;R<ge;R++){j=p[R];var _e=_[y+j];_e<=0||(se+=_e,p[oe++]=j,L+=j)}se===0?(m[A]=lV(M),re=-_[y+A],ue-=re,le+=re,O+=re,_[y+A]=0,_[S+A]=-1):(_[C+A]=Math.min(_[C+A],se),p[oe]=p[he],p[he]=p[I],p[I]=M,_[v+A]=oe-I+1,L=(L<0?-L:L)%l,_[b+A]=_[T+L],_[T+L]=A,E[A]=L)}for(_[C+M]=ue,u=Math.max(u,ue),D=s(D+u,u,_,w,l),F=de;F<fe;F++)if(A=p[F],!(_[y+A]>=0))for(L=E[A],A=_[T+L],_[T+L]=-1;A!==-1&&_[b+A]!==-1;A=_[b+A],D++){for(ne=_[v+A],ie=_[S+A],R=m[A]+1;R<=m[A]+ne-1;R++)_[w+p[R]]=D;var ve=A;for(j=_[b+A];j!==-1;){var ye=_[v+j]===ne&&_[S+j]===ie;for(R=m[j]+1;ye&&R<=m[j]+ne-1;R++)_[w+p[R]]!==D&&(ye=0);ye?(m[j]=lV(A),_[y+A]+=_[y+j],_[y+j]=0,_[S+j]=-1,j=_[b+j],_[b+ve]=j):(ve=j,j=_[b+j])}}for(R=de,F=de;F<fe;F++)A=p[F],!((re=-_[y+A])<=0)&&(_[y+A]=re,se=_[C+A]+ue-re,se=Math.min(se,l-O-re),_[x+se]!==-1&&(E[_[x+se]]=A),_[b+A]=_[x+se],E[A]=-1,_[x+se]=A,k=Math.min(k,se),_[C+A]=se,p[R++]=A);_[y+M]=le,(_[v+M]=R-de)===0&&(m[M]=-1,_[w+M]=0),ce!==0&&(h=R)}for(A=0;A<l;A++)m[A]=lV(m[A]);for(j=0;j<=l;j++)_[x+j]=-1;for(j=l;j>=0;j--)_[y+j]>0||(_[b+j]=_[x+m[j]],_[x+m[j]]=j);for(P=l;P>=0;P--)_[y+P]<=0||m[P]!==-1&&(_[b+P]=_[x+m[P]],_[x+m[P]]=P);for(M=0,A=0;A<=l;A++)m[A]===-1&&(M=aV(A,M,_,x,b,g,w));return g.splice(g.length-1,1),g};function i(e,i,a,o,s){var c=r(i);if(e===1&&o===a)return t(i,c);if(e===2){for(var l=c._index,u=c._ptr,d=0,f=0;f<a;f++){var p=u[f];if(u[f]=d,!(u[f+1]-p>s))for(var m=u[f+1];p<m;p++)l[d++]=l[p]}return u[a]=d,i=r(c),n(c,i)}return n(c,i)}function a(e,t,n,r,i,a,o,c,l,u,d,f){for(var p=0;p<e;p++)n[r+p]=t[p+1]-t[p];n[r+e]=0;for(var m=0;m<=e;m++)n[i+m]=-1,a[m]=-1,n[o+m]=-1,n[c+m]=-1,n[l+m]=1,n[u+m]=1,n[d+m]=0,n[f+m]=n[r+m];var h=s(0,0,n,u,e);return n[d+e]=-2,t[e]=-1,n[u+e]=0,h}function o(e,t,n,r,i,a,o,s,c,l,u){for(var d=0,f=0;f<e;f++){var p=n[r+f];if(p===0)n[i+f]=-2,d++,t[f]=-1,n[a+f]=0;else if(p>o)n[s+f]=0,n[i+f]=-1,d++,t[f]=lV(e),n[s+e]++;else{var m=n[c+p];m!==-1&&(l[m]=f),n[u+f]=n[c+p],n[c+p]=f}}return d}function s(e,t,n,r,i){if(e<2||e+t<0){for(var a=0;a<i;a++)n[r+a]!==0&&(n[r+a]=1);e=2}return e}function c(e,t){return e!==t}});function dV(e,t,n,r,i,a,o){var s,c,l=0,u;if(e<=t||n[r+t]<=n[i+e])return-1;n[i+e]=n[r+t];var d=n[a+e];if(n[a+e]=t,d===-1)l=1,u=e;else{for(l=2,u=d;u!==n[o+u];u=n[o+u]);for(s=d;s!==u;s=c)c=n[o+s],n[o+s]=u}return{jleaf:l,q:u}}var fV=K(`csCounts`,[`transpose`],e=>{var{transpose:t}=e;return function(e,n,r,i){if(!e||!n||!r)return null;var a=e._size,o=a[0],s=a[1],c,l,u,d,f,p,m,h=4*s+(i?s+o+1:0),g=[],_=0,v=s,y=2*s,b=3*s,x=4*s,S=5*s+1;for(u=0;u<h;u++)g[u]=-1;var C=[],w=t(e),T=w._index,E=w._ptr;for(u=0;u<s;u++)for(l=r[u],C[l]=g[b+l]===-1?1:0;l!==-1&&g[b+l]===-1;l=n[l])g[b+l]=u;if(i){for(u=0;u<s;u++)g[r[u]]=u;for(c=0;c<o;c++){for(u=s,p=E[c],m=E[c+1],f=p;f<m;f++)u=Math.min(u,g[T[f]]);g[S+c]=g[x+u],g[x+u]=c}}for(c=0;c<s;c++)g[_+c]=c;for(u=0;u<s;u++){for(l=r[u],n[l]!==-1&&C[n[l]]--,d=i?g[x+u]:l;d!==-1;d=i?g[S+d]:-1)for(f=E[d];f<E[d+1];f++){c=T[f];var D=dV(c,l,g,b,v,y,_);D.jleaf>=1&&C[l]++,D.jleaf===2&&C[D.q]--}n[l]!==-1&&(g[_+l]=n[l])}for(l=0;l<s;l++)n[l]!==-1&&(C[n[l]]+=C[l]);return C}}),pV=K(`csSqr`,[`add`,`multiply`,`transpose`],e=>{var{add:t,multiply:n,transpose:r}=e,i=uV({add:t,multiply:n,transpose:r}),a=fV({transpose:r});return function(e,t,n){var r=t._ptr,s=t._size[1],c,l={};if(l.q=i(e,t),e&&!l.q)return null;if(n){var u=e?iV(t,null,l.q,0):t;l.parent=sV(u,1);var d=oV(l.parent,s);if(l.cp=a(u,l.parent,d,1),u&&l.parent&&l.cp&&o(u,l))for(l.unz=0,c=0;c<s;c++)l.unz+=l.cp[c]}else l.unz=4*r[s]+s,l.lnz=l.unz;return l};function o(e,t){var n=e._ptr,r=e._index,i=e._size,a=i[0],o=i[1];t.pinv=[],t.leftmost=[];var s=t.parent,c=t.pinv,l=t.leftmost,u=[],d=0,f=a,p=a+o,m=a+2*o,h,g,_,v,y;for(g=0;g<o;g++)u[f+g]=-1,u[p+g]=-1,u[m+g]=0;for(h=0;h<a;h++)l[h]=-1;for(g=o-1;g>=0;g--)for(v=n[g],y=n[g+1],_=v;_<y;_++)l[r[_]]=g;for(h=a-1;h>=0;h--)c[h]=-1,g=l[h],g!==-1&&(u[m+g]++===0&&(u[p+g]=h),u[d+h]=u[f+g],u[f+g]=h);for(t.lnz=0,t.m2=a,g=0;g<o;g++)if(h=u[f+g],t.lnz++,h<0&&(h=t.m2++),c[h]=g,!(--m[g]<=0)){t.lnz+=u[m+g];var b=s[g];b!==-1&&(u[m+b]===0&&(u[p+b]=u[p+g]),u[d+u[p+g]]=u[f+b],u[f+b]=u[d+h],u[m+b]+=u[m+g])}for(h=0;h<a;h++)c[h]<0&&(c[h]=g++);return!0}});function mV(e,t){return e[t]<0}function hV(e,t){e[t]=lV(e[t])}function gV(e){return e<0?lV(e):e}function _V(e,t,n,r,i){var a=t._index,o=t._ptr,s=t._size[1],c,l,u,d=0;for(r[0]=e;d>=0;){e=r[d];var f=i?i[e]:e;mV(o,e)||(hV(o,e),r[s+d]=f<0?0:gV(o[f]));var p=1;for(l=r[s+d],u=f<0?0:gV(o[f+1]);l<u;l++)if(c=a[l],!mV(o,c)){r[s+d]=l,r[++d]=c,p=0;break}p&&(d--,r[--n]=e)}return n}function vV(e,t,n,r,i){var a=e._ptr,o=e._size,s=t._index,c=t._ptr,l=o[1],u,d,f,p=l;for(d=c[n],f=c[n+1],u=d;u<f;u++){var m=s[u];mV(a,m)||(p=_V(m,e,p,r,i))}for(u=p;u<l;u++)hV(a,r[u]);return p}var yV=K(`csSpsolve`,[`divideScalar`,`multiply`,`subtract`],e=>{var{divideScalar:t,multiply:n,subtract:r}=e;return function(e,i,a,o,s,c,l){var u=e._values,d=e._index,f=e._ptr,p=e._size[1],m=i._values,h=i._index,g=i._ptr,_,v,y,b,x=vV(e,i,a,o,c);for(_=x;_<p;_++)s[o[_]]=0;for(v=g[a],y=g[a+1],_=v;_<y;_++)s[h[_]]=m[_];for(var S=x;S<p;S++){var C=o[S],w=c?c[C]:C;if(!(w<0))for(v=f[w],y=f[w+1],s[C]=t(s[C],u[l?v:y-1]),_=l?v+1:v,b=l?y:y-1;_<b;_++){var T=d[_];s[T]=r(s[T],n(u[_],s[C]))}}return x}}),bV=K(`csLu`,[`abs`,`divideScalar`,`multiply`,`subtract`,`larger`,`largerEq`,`SparseMatrix`],e=>{var{abs:t,divideScalar:n,multiply:r,subtract:i,larger:a,largerEq:o,SparseMatrix:s}=e,c=yV({divideScalar:n,multiply:r,subtract:i});return function(e,i,l){if(!e)return null;var u=e._size[1],d,f=100,p=100;i&&(d=i.q,f=i.lnz||f,p=i.unz||p);var m=[],h=[],g=[],_=new s({values:m,index:h,ptr:g,size:[u,u]}),v=[],y=[],b=[],x=new s({values:v,index:y,ptr:b,size:[u,u]}),S=[],C,w,T=[],E=[];for(C=0;C<u;C++)T[C]=0,S[C]=-1,g[C+1]=0;f=0,p=0;for(var D=0;D<u;D++){g[D]=f,b[D]=p;var O=d?d[D]:D,k=c(_,e,O,E,T,S,1),A=-1,j=-1;for(w=k;w<u;w++)if(C=E[w],S[C]<0){var M=t(T[C]);a(M,j)&&(j=M,A=C)}else y[p]=S[C],v[p++]=T[C];if(A===-1||j<=0)return null;S[O]<0&&o(t(T[O]),r(j,l))&&(A=O);var N=T[A];for(y[p]=D,v[p++]=N,S[A]=D,h[f]=A,m[f++]=1,w=k;w<u;w++)C=E[w],S[C]<0&&(h[f]=C,m[f++]=n(T[C],N)),T[C]=0}for(g[u]=f,b[u]=p,w=0;w<f;w++)h[w]=S[h[w]];return m.splice(f,m.length-f),h.splice(f,h.length-f),v.splice(p,v.length-p),y.splice(p,y.length-p),{L:_,U:x,pinv:S}}}),xV=`slu`,SV=K(xV,[`typed`,`abs`,`add`,`multiply`,`transpose`,`divideScalar`,`subtract`,`larger`,`largerEq`,`SparseMatrix`],e=>{var{typed:t,abs:n,add:r,multiply:i,transpose:a,divideScalar:o,subtract:s,larger:c,largerEq:l,SparseMatrix:u}=e,d=pV({add:r,multiply:i,transpose:a}),f=bV({abs:n,divideScalar:o,multiply:i,subtract:s,larger:c,largerEq:l,SparseMatrix:u});return t(xV,{"SparseMatrix, number, number":function(e,t,n){if(!q(t)||t<0||t>3)throw Error(`Symbolic Ordering and Analysis order must be an integer number in the interval [0, 3]`);if(n<0||n>1)throw Error(`Partial pivoting threshold must be a number from 0 to 1`);var r=d(t,e,!1),i=f(e,r,n);return{L:i.L,U:i.U,p:i.pinv,q:r.q,toString:function(){return`L: `+this.L.toString()+`
49
+ U: `+this.U.toString()+`
50
+ p: `+this.p.toString()+(this.q?`
51
+ q: `+this.q.toString():``)+`
52
+ `}}}})});function CV(e,t){var n,r=t.length,i=[];if(e)for(n=0;n<r;n++)i[e[n]]=t[n];else for(n=0;n<r;n++)i[n]=t[n];return i}var wV=`lusolve`,TV=K(wV,[`typed`,`matrix`,`lup`,`slu`,`usolve`,`lsolve`,`DenseMatrix`],e=>{var{typed:t,matrix:n,lup:r,slu:i,usolve:a,lsolve:o,DenseMatrix:s}=e,c=XI({DenseMatrix:s});return t(wV,{"Array, Array | Matrix":function(e,t){e=n(e);var i=r(e);return u(i.L,i.U,i.p,null,t).valueOf()},"DenseMatrix, Array | Matrix":function(e,t){var n=r(e);return u(n.L,n.U,n.p,null,t)},"SparseMatrix, Array | Matrix":function(e,t){var n=r(e);return u(n.L,n.U,n.p,null,t)},"SparseMatrix, Array | Matrix, number, number":function(e,t,n,r){var a=i(e,n,r);return u(a.L,a.U,a.p,a.q,t)},"Object, Array | Matrix":function(e,t){return u(e.L,e.U,e.p,e.q,t)}});function l(e){if(Hw(e))return e;if(Vw(e))return n(e);throw TypeError(`Invalid Matrix LU decomposition`)}function u(e,t,n,r,i){e=l(e),t=l(t),n&&(i=c(e,i,!0),i._data=CV(n,i._data));var s=o(e,i),u=a(t,s);return r&&(u._data=CV(r,u._data)),u}}),EV=`polynomialRoot`,DV=K(EV,[`typed`,`isZero`,`equalScalar`,`add`,`subtract`,`multiply`,`divide`,`sqrt`,`unaryMinus`,`cbrt`,`typeOf`,`im`,`re`],e=>{var{typed:t,isZero:n,equalScalar:r,add:i,subtract:a,multiply:o,divide:s,sqrt:c,unaryMinus:l,cbrt:u,typeOf:d,im:f,re:p}=e;return t(EV,{"number|Complex, ...number|Complex":(e,t)=>{for(var m=[e,...t];m.length>0&&n(m[m.length-1]);)m.pop();if(m.length<2)throw RangeError(`Polynomial [${e}, ${t}] must have a non-zero non-constant coefficient`);switch(m.length){case 2:return[l(s(m[0],m[1]))];case 3:var[h,g,_]=m,v=o(2,_),y=o(g,g),b=o(4,_,h);if(r(y,b))return[s(l(g),v)];var x=c(a(y,b));return[s(a(x,g),v),s(a(l(x),g),v)];case 4:var[S,C,w,T]=m,E=l(o(3,T)),D=o(w,w),O=o(3,T,C),k=i(o(2,w,w,w),o(27,T,T,S)),A=o(9,T,w,C);if(r(D,O)&&r(k,A))return[s(w,E)];var j=a(D,O),M=a(k,A);return r(i(o(18,T,w,C,S),o(w,w,C,C)),i(o(4,w,w,w,S),o(4,T,C,C,C),o(27,T,T,S,S)))?[s(a(o(4,T,w,C),i(o(9,T,T,S),o(w,w,w))),o(T,j)),s(a(o(9,T,S),o(w,C)),o(2,j))]:u(r(D,O)?M:s(i(M,c(a(o(M,M),o(4,j,j,j)))),2),!0).toArray().map(e=>s(i(w,e,s(j,e)),E)).map(e=>d(e)===`Complex`&&r(p(e),p(e)+f(e))?p(e):e);default:throw RangeError(`only implemented for cubic or lower-order polynomials, not ${m}`)}}})}),OV=K(`Help`,[`evaluate`],e=>{var{evaluate:t}=e;function n(e){if(!(this instanceof n))throw SyntaxError(`Constructor must be called with the new operator`);if(!e)throw Error(`Argument "doc" missing`);this.doc=e}return n.prototype.type=`Help`,n.prototype.isHelp=!0,n.prototype.toString=function(){var e=this.doc||{},n=`
53
+ `;if(e.name&&(n+=`Name: `+e.name+`
54
+
55
+ `),e.category&&(n+=`Category: `+e.category+`
56
+
57
+ `),e.description&&(n+=`Description:
58
+ `+e.description+`
59
+
60
+ `),e.syntax&&(n+=`Syntax:
61
+ `+e.syntax.join(`
62
+ `)+`
63
+
64
+ `),e.examples){n+=`Examples:
65
+ `;for(var r=!1,i=t(`config()`),a={config:e=>(r=!0,t(`config(newConfig)`,{newConfig:e}))},o=0;o<e.examples.length;o++){var s=e.examples[o];n+=` `+s+`
66
+ `;var c=void 0;try{c=t(s,a)}catch(e){c=e}c!==void 0&&!Xw(c)&&(n+=` `+WO(c,{precision:14})+`
67
+ `)}n+=`
68
+ `,r&&t(`config(originalConfig)`,{originalConfig:i})}return e.mayThrow&&e.mayThrow.length&&(n+=`Throws: `+e.mayThrow.join(`, `)+`
69
+
70
+ `),e.seealso&&e.seealso.length&&(n+=`See also: `+e.seealso.join(`, `)+`
71
+ `),n},n.prototype.toJSON=function(){var e=CT(this.doc);return e.mathjs=`Help`,e},n.fromJSON=function(e){var t={};return Object.keys(e).filter(e=>e!==`mathjs`).forEach(n=>{t[n]=e[n]}),new n(t)},n.prototype.valueOf=n.prototype.toString,n},{isClass:!0}),kV=K(`Chain`,[`?on`,`math`,`typed`],e=>{var{on:t,math:n,typed:r}=e;function i(e){if(!(this instanceof i))throw SyntaxError(`Constructor must be called with the new operator`);xT(e)?this.value=e.value:this.value=e}i.prototype.type=`Chain`,i.prototype.isChain=!0,i.prototype.done=function(){return this.value},i.prototype.valueOf=function(){return this.value},i.prototype.toString=function(){return WO(this.value)},i.prototype.toJSON=function(){return{mathjs:`Chain`,value:this.value}},i.fromJSON=function(e){return new i(e.value)};function a(e,t){typeof t==`function`&&(i.prototype[e]=s(t))}function o(e,t){DT(i.prototype,e,function(){var e=t();if(typeof e==`function`)return s(e)})}function s(e){return function(){if(arguments.length===0)return new i(e(this.value));for(var t=[this.value],n=0;n<arguments.length;n++)t[n+1]=arguments[n];if(r.isTypedFunction(e)){var a=r.resolve(e,t);if(a.params.length===1)throw Error(`chain function `+e.name+` cannot match rest parameter between chain value and additional arguments.`);return new i(a.implementation.apply(e,t))}return new i(e.apply(e,t))}}i.createProxy=function(e,t){if(typeof e==`string`)a(e,t);else{var n=function(t){W(e,t)&&c[t]===void 0&&o(t,()=>e[t])};for(var r in e)n(r)}};var c={expression:!0,docs:!0,type:!0,classes:!0,json:!0,error:!0,isChain:!0};return i.createProxy(n),t&&t(`import`,function(e,t,n){n||o(e,t)}),i},{isClass:!0}),AV={name:`e`,category:`Constants`,syntax:[`e`],description:`Euler's number, the base of the natural logarithm. Approximately equal to 2.71828`,examples:[`e`,`e ^ 2`,`exp(2)`,`log(e)`],seealso:[`exp`]},jV={name:`false`,category:`Constants`,syntax:[`false`],description:`Boolean value false`,examples:[`false`],seealso:[`true`]},MV={name:`i`,category:`Constants`,syntax:[`i`],description:`Imaginary unit, defined as i*i=-1. A complex number is described as a + b*i, where a is the real part, and b is the imaginary part.`,examples:[`i`,`i * i`,`sqrt(-1)`],seealso:[]},NV={name:`Infinity`,category:`Constants`,syntax:[`Infinity`],description:`Infinity, a number which is larger than the maximum number that can be handled by a floating point number.`,examples:[`Infinity`,`1 / 0`],seealso:[]},PV={name:`LN10`,category:`Constants`,syntax:[`LN10`],description:`Returns the natural logarithm of 10, approximately equal to 2.302`,examples:[`LN10`,`log(10)`],seealso:[]},FV={name:`LN2`,category:`Constants`,syntax:[`LN2`],description:`Returns the natural logarithm of 2, approximately equal to 0.693`,examples:[`LN2`,`log(2)`],seealso:[]},IV={name:`LOG10E`,category:`Constants`,syntax:[`LOG10E`],description:`Returns the base-10 logarithm of E, approximately equal to 0.434`,examples:[`LOG10E`,`log(e, 10)`],seealso:[]},LV={name:`LOG2E`,category:`Constants`,syntax:[`LOG2E`],description:`Returns the base-2 logarithm of E, approximately equal to 1.442`,examples:[`LOG2E`,`log(e, 2)`],seealso:[]},RV={name:`NaN`,category:`Constants`,syntax:[`NaN`],description:`Not a number`,examples:[`NaN`,`0 / 0`],seealso:[]},zV={name:`null`,category:`Constants`,syntax:[`null`],description:`Value null`,examples:[`null`],seealso:[`true`,`false`]},BV={name:`phi`,category:`Constants`,syntax:[`phi`],description:"Phi is the golden ratio. Two quantities are in the golden ratio if their ratio is the same as the ratio of their sum to the larger of the two quantities. Phi is defined as `(1 + sqrt(5)) / 2` and is approximately 1.618034...",examples:[`phi`],seealso:[]},VV={name:`pi`,category:`Constants`,syntax:[`pi`],description:`The number pi is a mathematical constant that is the ratio of a circle's circumference to its diameter, and is approximately equal to 3.14159`,examples:[`pi`,`sin(pi/2)`],seealso:[`tau`]},HV={bignumber:{name:`bignumber`,category:`Construction`,syntax:[`bignumber(x)`],description:`Create a big number from a number or string.`,examples:[`0.1 + 0.2`,`bignumber(0.1) + bignumber(0.2)`,`bignumber("7.2")`,`bignumber("7.2e500")`,`bignumber([0.1, 0.2, 0.3])`],seealso:[`boolean`,`bigint`,`complex`,`fraction`,`index`,`matrix`,`string`,`unit`]},bigint:{name:`bigint`,category:`Construction`,syntax:[`bigint(x)`],description:`Create a bigint, an integer with an arbitrary number of digits, from a number or string.`,examples:[`123123123123123123 # a large number will lose digits`,`bigint("123123123123123123")`,`bignumber(["1", "3", "5"])`],seealso:[`boolean`,`bignumber`,`number`,`complex`,`fraction`,`index`,`matrix`,`string`,`unit`]},boolean:{name:`boolean`,category:`Construction`,syntax:[`x`,`boolean(x)`],description:`Convert a string or number into a boolean.`,examples:[`boolean(0)`,`boolean(1)`,`boolean(3)`,`boolean("true")`,`boolean("false")`,`boolean([1, 0, 1, 1])`],seealso:[`bignumber`,`complex`,`index`,`matrix`,`number`,`string`,`unit`]},complex:{name:`complex`,category:`Construction`,syntax:[`complex()`,`complex(re, im)`,`complex(string)`],description:`Create a complex number.`,examples:[`complex()`,`complex(2, 3)`,`complex("7 - 2i")`],seealso:[`bignumber`,`boolean`,`index`,`matrix`,`number`,`string`,`unit`]},createUnit:{name:`createUnit`,category:`Construction`,syntax:[`createUnit(definitions)`,`createUnit(name, definition)`],description:`Create a user-defined unit and register it with the Unit type.`,examples:[`createUnit("foo")`,`createUnit("knot", {definition: "0.514444444 m/s", aliases: ["knots", "kt", "kts"]})`,`createUnit("mph", "1 mile/hour")`],seealso:[`unit`,`splitUnit`]},fraction:{name:`fraction`,category:`Construction`,syntax:[`fraction(num)`,`fraction(matrix)`,`fraction(num,den)`,`fraction({n: num, d: den})`],description:`Create a fraction from a number or from integer numerator and denominator.`,examples:[`fraction(0.125)`,`fraction(1, 3) + fraction(2, 5)`,`fraction({n: 333, d: 53})`,`fraction([sqrt(9), sqrt(10), sqrt(11)])`],seealso:[`bignumber`,`boolean`,`complex`,`index`,`matrix`,`string`,`unit`]},index:{name:`index`,category:`Construction`,syntax:[`[start]`,`[start:end]`,`[start:step:end]`,`[start1, start 2, ...]`,`[start1:end1, start2:end2, ...]`,`[start1:step1:end1, start2:step2:end2, ...]`],description:`Create an index to get or replace a subset of a matrix`,examples:[`A = [1, 2, 3; 4, 5, 6]`,`A[1, :]`,`A[1, 2] = 50`,`A[1:2, 1:2] = 1`,`B = [1, 2, 3]`,`B[B>1 and B<3]`],seealso:[`bignumber`,`boolean`,`complex`,`matrix`,`number`,`range`,`string`,`unit`]},matrix:{name:`matrix`,category:`Construction`,syntax:[`[]`,`[a1, b1, ...; a2, b2, ...]`,`matrix()`,`matrix("dense")`,`matrix([...])`],description:`Create a matrix.`,examples:[`[]`,`[1, 2, 3]`,`[1, 2, 3; 4, 5, 6]`,`matrix()`,`matrix([3, 4])`,`matrix([3, 4; 5, 6], "sparse")`,`matrix([3, 4; 5, 6], "sparse", "number")`],seealso:[`bignumber`,`boolean`,`complex`,`index`,`number`,`string`,`unit`,`sparse`]},number:{name:`number`,category:`Construction`,syntax:[`x`,`number(x)`,`number(unit, valuelessUnit)`],description:`Create a number or convert a string or boolean into a number.`,examples:[`2`,`2e3`,`4.05`,`number(2)`,`number("7.2")`,`number(true)`,`number([true, false, true, true])`,`number(unit("52cm"), "m")`],seealso:[`bignumber`,`bigint`,`boolean`,`complex`,`fraction`,`index`,`matrix`,`string`,`unit`]},sparse:{name:`sparse`,category:`Construction`,syntax:[`sparse()`,`sparse([a1, b1, ...; a1, b2, ...])`,`sparse([a1, b1, ...; a1, b2, ...], "number")`],description:`Create a sparse matrix.`,examples:[`sparse()`,`sparse([3, 4; 5, 6])`,`sparse([3, 0; 5, 0], "number")`],seealso:[`bignumber`,`boolean`,`complex`,`index`,`number`,`string`,`unit`,`matrix`]},splitUnit:{name:`splitUnit`,category:`Construction`,syntax:[`splitUnit(unit: Unit, parts: Unit[])`],description:`Split a unit in an array of units whose sum is equal to the original unit.`,examples:[`splitUnit(1 m, ["feet", "inch"])`],seealso:[`unit`,`createUnit`]},string:{name:`string`,category:`Construction`,syntax:[`"text"`,`string(x)`],description:`Create a string or convert a value to a string`,examples:[`"Hello World!"`,`string(4.2)`,`string(3 + 2i)`],seealso:[`bignumber`,`boolean`,`complex`,`index`,`matrix`,`number`,`unit`]},unit:{name:`unit`,category:`Construction`,syntax:[`value unit`,`unit(value, unit)`,`unit(string)`],description:`Create a unit.`,examples:[`5.5 mm`,`3 inch`,`unit(7.1, "kilogram")`,`unit("23 deg")`],seealso:[`bignumber`,`boolean`,`complex`,`index`,`matrix`,`number`,`string`]},e:AV,E:AV,false:jV,i:MV,Infinity:NV,LN2:FV,LN10:PV,LOG2E:LV,LOG10E:IV,NaN:RV,null:zV,pi:VV,PI:VV,phi:BV,SQRT1_2:{name:`SQRT1_2`,category:`Constants`,syntax:[`SQRT1_2`],description:`Returns the square root of 1/2, approximately equal to 0.707`,examples:[`SQRT1_2`,`sqrt(1/2)`],seealso:[]},SQRT2:{name:`SQRT2`,category:`Constants`,syntax:[`SQRT2`],description:`Returns the square root of 2, approximately equal to 1.414`,examples:[`SQRT2`,`sqrt(2)`],seealso:[]},tau:{name:`tau`,category:`Constants`,syntax:[`tau`],description:`Tau is the ratio constant of a circle's circumference to radius, equal to 2 * pi, approximately 6.2832.`,examples:[`tau`,`2 * pi`],seealso:[`pi`]},true:{name:`true`,category:`Constants`,syntax:[`true`],description:`Boolean value true`,examples:[`true`],seealso:[`false`]},version:{name:`version`,category:`Constants`,syntax:[`version`],description:`A string with the version number of math.js`,examples:[`version`],seealso:[]},speedOfLight:{description:`Speed of light in vacuum`,examples:[`speedOfLight`]},gravitationConstant:{description:`Newtonian constant of gravitation`,examples:[`gravitationConstant`]},planckConstant:{description:`Planck constant`,examples:[`planckConstant`]},reducedPlanckConstant:{description:`Reduced Planck constant`,examples:[`reducedPlanckConstant`]},magneticConstant:{description:`Magnetic constant (vacuum permeability)`,examples:[`magneticConstant`]},electricConstant:{description:`Electric constant (vacuum permeability)`,examples:[`electricConstant`]},vacuumImpedance:{description:`Characteristic impedance of vacuum`,examples:[`vacuumImpedance`]},coulomb:{description:`Coulomb's constant. Deprecated in favor of coulombConstant`,examples:[`coulombConstant`]},coulombConstant:{description:`Coulomb's constant`,examples:[`coulombConstant`]},elementaryCharge:{description:`Elementary charge`,examples:[`elementaryCharge`]},bohrMagneton:{description:`Bohr magneton`,examples:[`bohrMagneton`]},conductanceQuantum:{description:`Conductance quantum`,examples:[`conductanceQuantum`]},inverseConductanceQuantum:{description:`Inverse conductance quantum`,examples:[`inverseConductanceQuantum`]},magneticFluxQuantum:{description:`Magnetic flux quantum`,examples:[`magneticFluxQuantum`]},nuclearMagneton:{description:`Nuclear magneton`,examples:[`nuclearMagneton`]},klitzing:{description:`Von Klitzing constant`,examples:[`klitzing`]},bohrRadius:{description:`Bohr radius`,examples:[`bohrRadius`]},classicalElectronRadius:{description:`Classical electron radius`,examples:[`classicalElectronRadius`]},electronMass:{description:`Electron mass`,examples:[`electronMass`]},fermiCoupling:{description:`Fermi coupling constant`,examples:[`fermiCoupling`]},fineStructure:{description:`Fine-structure constant`,examples:[`fineStructure`]},hartreeEnergy:{description:`Hartree energy`,examples:[`hartreeEnergy`]},protonMass:{description:`Proton mass`,examples:[`protonMass`]},deuteronMass:{description:`Deuteron Mass`,examples:[`deuteronMass`]},neutronMass:{description:`Neutron mass`,examples:[`neutronMass`]},quantumOfCirculation:{description:`Quantum of circulation`,examples:[`quantumOfCirculation`]},rydberg:{description:`Rydberg constant`,examples:[`rydberg`]},thomsonCrossSection:{description:`Thomson cross section`,examples:[`thomsonCrossSection`]},weakMixingAngle:{description:`Weak mixing angle`,examples:[`weakMixingAngle`]},efimovFactor:{description:`Efimov factor`,examples:[`efimovFactor`]},atomicMass:{description:`Atomic mass constant`,examples:[`atomicMass`]},avogadro:{description:`Avogadro's number`,examples:[`avogadro`]},boltzmann:{description:`Boltzmann constant`,examples:[`boltzmann`]},faraday:{description:`Faraday constant`,examples:[`faraday`]},firstRadiation:{description:`First radiation constant`,examples:[`firstRadiation`]},loschmidt:{description:`Loschmidt constant at T=273.15 K and p=101.325 kPa`,examples:[`loschmidt`]},gasConstant:{description:`Gas constant`,examples:[`gasConstant`]},molarPlanckConstant:{description:`Molar Planck constant`,examples:[`molarPlanckConstant`]},molarVolume:{description:`Molar volume of an ideal gas at T=273.15 K and p=101.325 kPa`,examples:[`molarVolume`]},sackurTetrode:{description:`Sackur-Tetrode constant at T=1 K and p=101.325 kPa`,examples:[`sackurTetrode`]},secondRadiation:{description:`Second radiation constant`,examples:[`secondRadiation`]},stefanBoltzmann:{description:`Stefan-Boltzmann constant`,examples:[`stefanBoltzmann`]},wienDisplacement:{description:`Wien displacement law constant`,examples:[`wienDisplacement`]},molarMass:{description:`Molar mass constant`,examples:[`molarMass`]},molarMassC12:{description:`Molar mass constant of carbon-12`,examples:[`molarMassC12`]},gravity:{description:`Standard acceleration of gravity (standard acceleration of free-fall on Earth)`,examples:[`gravity`]},planckLength:{description:`Planck length`,examples:[`planckLength`]},planckMass:{description:`Planck mass`,examples:[`planckMass`]},planckTime:{description:`Planck time`,examples:[`planckTime`]},planckCharge:{description:`Planck charge`,examples:[`planckCharge`]},planckTemperature:{description:`Planck temperature`,examples:[`planckTemperature`]},derivative:{name:`derivative`,category:`Algebra`,syntax:[`derivative(expr, variable)`,`derivative(expr, variable, {simplify: boolean})`],description:`Takes the derivative of an expression expressed in parser Nodes. The derivative will be taken over the supplied variable in the second parameter. If there are multiple variables in the expression, it will return a partial derivative.`,examples:[`derivative("2x^3", "x")`,`derivative("2x^3", "x", {simplify: false})`,`derivative("2x^2 + 3x + 4", "x")`,`derivative("sin(2x)", "x")`,`f = parse("x^2 + x")`,`x = parse("x")`,`df = derivative(f, x)`,`df.evaluate({x: 3})`],seealso:[`simplify`,`parse`,`evaluate`]},lsolve:{name:`lsolve`,category:`Algebra`,syntax:[`x=lsolve(L, b)`],description:`Finds one solution of the linear system L * x = b where L is an [n x n] lower triangular matrix and b is a [n] column vector.`,examples:[`a = [-2, 3; 2, 1]`,`b = [11, 9]`,`x = lsolve(a, b)`],seealso:[`lsolveAll`,`lup`,`lusolve`,`usolve`,`matrix`,`sparse`]},lsolveAll:{name:`lsolveAll`,category:`Algebra`,syntax:[`x=lsolveAll(L, b)`],description:`Finds all solutions of the linear system L * x = b where L is an [n x n] lower triangular matrix and b is a [n] column vector.`,examples:[`a = [-2, 3; 2, 1]`,`b = [11, 9]`,`x = lsolve(a, b)`],seealso:[`lsolve`,`lup`,`lusolve`,`usolve`,`matrix`,`sparse`]},lup:{name:`lup`,category:`Algebra`,syntax:[`lup(m)`],description:`Calculate the Matrix LU decomposition with partial pivoting. Matrix A is decomposed in three matrices (L, U, P) where P * A = L * U`,examples:[`lup([[2, 1], [1, 4]])`,`lup(matrix([[2, 1], [1, 4]]))`,`lup(sparse([[2, 1], [1, 4]]))`],seealso:[`lusolve`,`lsolve`,`usolve`,`matrix`,`sparse`,`slu`,`qr`]},lusolve:{name:`lusolve`,category:`Algebra`,syntax:[`x=lusolve(A, b)`,`x=lusolve(lu, b)`],description:`Solves the linear system A * x = b where A is an [n x n] matrix and b is a [n] column vector.`,examples:[`a = [-2, 3; 2, 1]`,`b = [11, 9]`,`x = lusolve(a, b)`],seealso:[`lup`,`slu`,`lsolve`,`usolve`,`matrix`,`sparse`]},leafCount:{name:`leafCount`,category:`Algebra`,syntax:[`leafCount(expr)`],description:`Computes the number of leaves in the parse tree of the given expression`,examples:[`leafCount("e^(i*pi)-1")`,`leafCount(parse("{a: 22/7, b: 10^(1/2)}"))`],seealso:[`simplify`]},polynomialRoot:{name:`polynomialRoot`,category:`Algebra`,syntax:[`x=polynomialRoot(-6, 3)`,`x=polynomialRoot(4, -4, 1)`,`x=polynomialRoot(-8, 12, -6, 1)`],description:`Finds the roots of a univariate polynomial given by its coefficients starting from constant, linear, and so on, increasing in degree.`,examples:[`a = polynomialRoot(-6, 11, -6, 1)`],seealso:[`cbrt`,`sqrt`]},resolve:{name:`resolve`,category:`Algebra`,syntax:[`resolve(node, scope)`],description:`Recursively substitute variables in an expression tree.`,examples:[`resolve(parse("1 + x"), { x: 7 })`,`resolve(parse("size(text)"), { text: "Hello World" })`,`resolve(parse("x + y"), { x: parse("3z") })`,`resolve(parse("3x"), { x: parse("y+z"), z: parse("w^y") })`],seealso:[`simplify`,`evaluate`],mayThrow:[`ReferenceError`]},simplify:{name:`simplify`,category:`Algebra`,syntax:[`simplify(expr)`,`simplify(expr, rules)`],description:`Simplify an expression tree.`,examples:[`simplify("3 + 2 / 4")`,`simplify("2x + x")`,`f = parse("x * (x + 2 + x)")`,`simplified = simplify(f)`,`simplified.evaluate({x: 2})`],seealso:[`simplifyCore`,`derivative`,`evaluate`,`parse`,`rationalize`,`resolve`]},simplifyConstant:{name:`simplifyConstant`,category:`Algebra`,syntax:[`simplifyConstant(expr)`,`simplifyConstant(expr, options)`],description:`Replace constant subexpressions of node with their values.`,examples:[`simplifyConstant("(3-3)*x")`,`simplifyConstant(parse("z-cos(tau/8)"))`],seealso:[`simplify`,`simplifyCore`,`evaluate`]},simplifyCore:{name:`simplifyCore`,category:`Algebra`,syntax:[`simplifyCore(node)`],description:`Perform simple one-pass simplifications on an expression tree.`,examples:[`simplifyCore(parse("0*x"))`,`simplifyCore(parse("(x+0)*2"))`],seealso:[`simplify`,`simplifyConstant`,`evaluate`]},symbolicEqual:{name:`symbolicEqual`,category:`Algebra`,syntax:[`symbolicEqual(expr1, expr2)`,`symbolicEqual(expr1, expr2, options)`],description:`Returns true if the difference of the expressions simplifies to 0`,examples:[`symbolicEqual("x*y","y*x")`,`symbolicEqual("abs(x^2)", "x^2")`,`symbolicEqual("abs(x)", "x", {context: {abs: {trivial: true}}})`],seealso:[`simplify`,`evaluate`]},rationalize:{name:`rationalize`,category:`Algebra`,syntax:[`rationalize(expr)`,`rationalize(expr, scope)`,`rationalize(expr, scope, detailed)`],description:`Transform a rationalizable expression in a rational fraction. If rational fraction is one variable polynomial then converts the numerator and denominator in canonical form, with decreasing exponents, returning the coefficients of numerator.`,examples:[`rationalize("2x/y - y/(x+1)")`,`rationalize("2x/y - y/(x+1)", true)`],seealso:[`simplify`]},slu:{name:`slu`,category:`Algebra`,syntax:[`slu(A, order, threshold)`],description:`Calculate the Matrix LU decomposition with full pivoting. Matrix A is decomposed in two matrices (L, U) and two permutation vectors (pinv, q) where P * A * Q = L * U`,examples:[`slu(sparse([4.5, 0, 3.2, 0; 3.1, 2.9, 0, 0.9; 0, 1.7, 3, 0; 3.5, 0.4, 0, 1]), 1, 0.001)`],seealso:[`lusolve`,`lsolve`,`usolve`,`matrix`,`sparse`,`lup`,`qr`]},usolve:{name:`usolve`,category:`Algebra`,syntax:[`x=usolve(U, b)`],description:`Finds one solution of the linear system U * x = b where U is an [n x n] upper triangular matrix and b is a [n] column vector.`,examples:[`x=usolve(sparse([1, 1, 1, 1; 0, 1, 1, 1; 0, 0, 1, 1; 0, 0, 0, 1]), [1; 2; 3; 4])`],seealso:[`usolveAll`,`lup`,`lusolve`,`lsolve`,`matrix`,`sparse`]},usolveAll:{name:`usolveAll`,category:`Algebra`,syntax:[`x=usolve(U, b)`],description:`Finds all solutions of the linear system U * x = b where U is an [n x n] upper triangular matrix and b is a [n] column vector.`,examples:[`x=usolve(sparse([1, 1, 1, 1; 0, 1, 1, 1; 0, 0, 1, 1; 0, 0, 0, 1]), [1; 2; 3; 4])`],seealso:[`usolve`,`lup`,`lusolve`,`lsolve`,`matrix`,`sparse`]},qr:{name:`qr`,category:`Algebra`,syntax:[`qr(A)`],description:"Calculates the Matrix QR decomposition. Matrix `A` is decomposed in two matrices (`Q`, `R`) where `Q` is an orthogonal matrix and `R` is an upper triangular matrix.",examples:[`qr([[1, -1, 4], [1, 4, -2], [1, 4, 2], [1, -1, 0]])`],seealso:[`lup`,`slu`,`matrix`]},abs:{name:`abs`,category:`Arithmetic`,syntax:[`abs(x)`],description:`Compute the absolute value.`,examples:[`abs(3.5)`,`abs(-4.2)`],seealso:[`sign`]},add:{name:`add`,category:`Operators`,syntax:[`x + y`,`add(x, y)`],description:`Add two values.`,examples:[`a = 2.1 + 3.6`,`a - 3.6`,`3 + 2i`,`3 cm + 2 inch`,`"2.3" + "4"`],seealso:[`subtract`]},cbrt:{name:`cbrt`,category:`Arithmetic`,syntax:[`cbrt(x)`,`cbrt(x, allRoots)`],description:"Compute the cubic root value. If x = y * y * y, then y is the cubic root of x. When `x` is a number or complex number, an optional second argument `allRoots` can be provided to return all three cubic roots. If not provided, the principal root is returned",examples:[`cbrt(64)`,`cube(4)`,`cbrt(-8)`,`cbrt(2 + 3i)`,`cbrt(8i)`,`cbrt(8i, true)`,`cbrt(27 m^3)`],seealso:[`square`,`sqrt`,`cube`,`multiply`]},ceil:{name:`ceil`,category:`Arithmetic`,syntax:[`ceil(x)`,`ceil(x, n)`,`ceil(unit, valuelessUnit)`,`ceil(unit, n, valuelessUnit)`],description:`Round a value towards plus infinity. If x is complex, both real and imaginary part are rounded towards plus infinity.`,examples:[`ceil(3.2)`,`ceil(3.8)`,`ceil(-4.2)`,`ceil(3.241cm, cm)`,`ceil(3.241cm, 2, cm)`],seealso:[`floor`,`fix`,`round`]},cube:{name:`cube`,category:`Arithmetic`,syntax:[`cube(x)`],description:`Compute the cube of a value. The cube of x is x * x * x.`,examples:[`cube(2)`,`2^3`,`2 * 2 * 2`],seealso:[`multiply`,`square`,`pow`]},divide:{name:`divide`,category:`Operators`,syntax:[`x / y`,`divide(x, y)`],description:`Divide two values.`,examples:[`a = 2 / 3`,`a * 3`,`4.5 / 2`,`3 + 4 / 2`,`(3 + 4) / 2`,`18 km / 4.5`],seealso:[`multiply`]},dotDivide:{name:`dotDivide`,category:`Operators`,syntax:[`x ./ y`,`dotDivide(x, y)`],description:`Divide two values element wise.`,examples:[`a = [1, 2, 3; 4, 5, 6]`,`b = [2, 1, 1; 3, 2, 5]`,`a ./ b`],seealso:[`multiply`,`dotMultiply`,`divide`]},dotMultiply:{name:`dotMultiply`,category:`Operators`,syntax:[`x .* y`,`dotMultiply(x, y)`],description:`Multiply two values element wise.`,examples:[`a = [1, 2, 3; 4, 5, 6]`,`b = [2, 1, 1; 3, 2, 5]`,`a .* b`],seealso:[`multiply`,`divide`,`dotDivide`]},dotPow:{name:`dotPow`,category:`Operators`,syntax:[`x .^ y`,`dotPow(x, y)`],description:`Calculates the power of x to y element wise.`,examples:[`a = [1, 2, 3; 4, 5, 6]`,`a .^ 2`],seealso:[`pow`]},exp:{name:`exp`,category:`Arithmetic`,syntax:[`exp(x)`],description:`Calculate the exponent of a value.`,examples:[`exp(1.3)`,`e ^ 1.3`,`log(exp(1.3))`,`x = 2.4`,`(exp(i*x) == cos(x) + i*sin(x)) # Euler's formula`],seealso:[`expm`,`expm1`,`pow`,`log`]},expm:{name:`expm`,category:`Arithmetic`,syntax:[`exp(x)`],description:`Compute the matrix exponential, expm(A) = e^A. The matrix must be square. Not to be confused with exp(a), which performs element-wise exponentiation.`,examples:[`expm([[0,2],[0,0]])`],seealso:[`exp`]},expm1:{name:`expm1`,category:`Arithmetic`,syntax:[`expm1(x)`],description:`Calculate the value of subtracting 1 from the exponential value.`,examples:[`expm1(2)`,`pow(e, 2) - 1`,`log(expm1(2) + 1)`],seealso:[`exp`,`pow`,`log`]},fix:{name:`fix`,category:`Arithmetic`,syntax:[`fix(x)`,`fix(x, n)`,`fix(unit, valuelessUnit)`,`fix(unit, n, valuelessUnit)`],description:`Round a value towards zero. If x is complex, both real and imaginary part are rounded towards zero.`,examples:[`fix(3.2)`,`fix(3.8)`,`fix(-4.2)`,`fix(-4.8)`,`fix(3.241cm, cm)`,`fix(3.241cm, 2, cm)`],seealso:[`ceil`,`floor`,`round`]},floor:{name:`floor`,category:`Arithmetic`,syntax:[`floor(x)`,`floor(x, n)`,`floor(unit, valuelessUnit)`,`floor(unit, n, valuelessUnit)`],description:`Round a value towards minus infinity.If x is complex, both real and imaginary part are rounded towards minus infinity.`,examples:[`floor(3.2)`,`floor(3.8)`,`floor(-4.2)`,`floor(3.241cm, cm)`,`floor(3.241cm, 2, cm)`],seealso:[`ceil`,`fix`,`round`]},gcd:{name:`gcd`,category:`Arithmetic`,syntax:[`gcd(a, b)`,`gcd(a, b, c, ...)`],description:`Compute the greatest common divisor.`,examples:[`gcd(8, 12)`,`gcd(-4, 6)`,`gcd(25, 15, -10)`],seealso:[`lcm`,`xgcd`]},hypot:{name:`hypot`,category:`Arithmetic`,syntax:[`hypot(a, b, c, ...)`,`hypot([a, b, c, ...])`],description:`Calculate the hypotenuse of a list with values.`,examples:[`hypot(3, 4)`,`sqrt(3^2 + 4^2)`,`hypot(-2)`,`hypot([3, 4, 5])`],seealso:[`abs`,`norm`]},lcm:{name:`lcm`,category:`Arithmetic`,syntax:[`lcm(x, y)`],description:`Compute the least common multiple.`,examples:[`lcm(4, 6)`,`lcm(6, 21)`,`lcm(6, 21, 5)`],seealso:[`gcd`]},log:{name:`log`,category:`Arithmetic`,syntax:[`log(x)`,`log(x, base)`],description:`Compute the logarithm of a value. If no base is provided, the natural logarithm of x is calculated. If base if provided, the logarithm is calculated for the specified base. log(x, base) is defined as log(x) / log(base).`,examples:[`log(3.5)`,`a = log(2.4)`,`exp(a)`,`10 ^ 4`,`log(10000, 10)`,`log(10000) / log(10)`,`b = log(1024, 2)`,`2 ^ b`],seealso:[`exp`,`log1p`,`log2`,`log10`]},log2:{name:`log2`,category:`Arithmetic`,syntax:[`log2(x)`],description:"Calculate the 2-base of a value. This is the same as calculating `log(x, 2)`.",examples:[`log2(0.03125)`,`log2(16)`,`log2(16) / log2(2)`,`pow(2, 4)`],seealso:[`exp`,`log1p`,`log`,`log10`]},log1p:{name:`log1p`,category:`Arithmetic`,syntax:[`log1p(x)`,`log1p(x, base)`],description:"Calculate the logarithm of a `value+1`",examples:[`log1p(2.5)`,`exp(log1p(1.4))`,`pow(10, 4)`,`log1p(9999, 10)`,`log1p(9999) / log(10)`],seealso:[`exp`,`log`,`log2`,`log10`]},log10:{name:`log10`,category:`Arithmetic`,syntax:[`log10(x)`],description:`Compute the 10-base logarithm of a value.`,examples:[`log10(0.00001)`,`log10(10000)`,`10 ^ 4`,`log(10000) / log(10)`,`log(10000, 10)`],seealso:[`exp`,`log`]},mod:{name:`mod`,category:`Operators`,syntax:[`x % y`,`x mod y`,`mod(x, y)`],description:`Calculates the modulus, the remainder of an integer division.`,examples:[`7 % 3`,`11 % 2`,`10 mod 4`,`isOdd(x) = x % 2`,`isOdd(2)`,`isOdd(3)`],seealso:[`divide`]},multiply:{name:`multiply`,category:`Operators`,syntax:[`x * y`,`multiply(x, y)`],description:`multiply two values.`,examples:[`a = 2.1 * 3.4`,`a / 3.4`,`2 * 3 + 4`,`2 * (3 + 4)`,`3 * 2.1 km`],seealso:[`divide`]},norm:{name:`norm`,category:`Arithmetic`,syntax:[`norm(x)`,`norm(x, p)`],description:`Calculate the norm of a number, vector or matrix.`,examples:[`abs(-3.5)`,`norm(-3.5)`,`norm(3 - 4i)`,`norm([1, 2, -3], Infinity)`,`norm([1, 2, -3], -Infinity)`,`norm([3, 4], 2)`,`norm([[1, 2], [3, 4]], 1)`,`norm([[1, 2], [3, 4]], "inf")`,`norm([[1, 2], [3, 4]], "fro")`]},nthRoot:{name:`nthRoot`,category:`Arithmetic`,syntax:[`nthRoot(a)`,`nthRoot(a, root)`],description:`Calculate the nth root of a value. The principal nth root of a positive real number A, is the positive real solution of the equation "x^root = A".`,examples:[`4 ^ 3`,`nthRoot(64, 3)`,`nthRoot(9, 2)`,`sqrt(9)`],seealso:[`nthRoots`,`pow`,`sqrt`]},nthRoots:{name:`nthRoots`,category:`Arithmetic`,syntax:[`nthRoots(A)`,`nthRoots(A, root)`],description:`Calculate the nth roots of a value. An nth root of a positive real number A, is a positive real solution of the equation "x^root = A". This function returns an array of complex values.`,examples:[`nthRoots(1)`,`nthRoots(1, 3)`],seealso:[`sqrt`,`pow`,`nthRoot`]},pow:{name:`pow`,category:`Operators`,syntax:[`x ^ y`,`pow(x, y)`],description:`Calculates the power of x to y, x^y.`,examples:[`2^3`,`2*2*2`,`1 + e ^ (pi * i)`,`pow([[1, 2], [4, 3]], 2)`,`pow([[1, 2], [4, 3]], -1)`],seealso:[`multiply`,`nthRoot`,`nthRoots`,`sqrt`]},round:{name:`round`,category:`Arithmetic`,syntax:[`round(x)`,`round(x, n)`,`round(unit, valuelessUnit)`,`round(unit, n, valuelessUnit)`],description:`round a value towards the nearest integer.If x is complex, both real and imaginary part are rounded towards the nearest integer. When n is specified, the value is rounded to n decimals.`,examples:[`round(3.2)`,`round(3.8)`,`round(-4.2)`,`round(-4.8)`,`round(pi, 3)`,`round(123.45678, 2)`,`round(3.241cm, 2, cm)`,`round([3.2, 3.8, -4.7])`],seealso:[`ceil`,`floor`,`fix`]},sign:{name:`sign`,category:`Arithmetic`,syntax:[`sign(x)`],description:`Compute the sign of a value. The sign of a value x is 1 when x>0, -1 when x<0, and 0 when x=0.`,examples:[`sign(3.5)`,`sign(-4.2)`,`sign(0)`],seealso:[`abs`]},sqrt:{name:`sqrt`,category:`Arithmetic`,syntax:[`sqrt(x)`],description:`Compute the square root value. If x = y * y, then y is the square root of x.`,examples:[`sqrt(25)`,`5 * 5`,`sqrt(-1)`],seealso:[`square`,`sqrtm`,`multiply`,`nthRoot`,`nthRoots`,`pow`]},sqrtm:{name:`sqrtm`,category:`Arithmetic`,syntax:[`sqrtm(x)`],description:"Calculate the principal square root of a square matrix. The principal square root matrix `X` of another matrix `A` is such that `X * X = A`.",examples:[`sqrtm([[33, 24], [48, 57]])`],seealso:[`sqrt`,`abs`,`square`,`multiply`]},square:{name:`square`,category:`Arithmetic`,syntax:[`square(x)`],description:`Compute the square of a value. The square of x is x * x.`,examples:[`square(3)`,`sqrt(9)`,`3^2`,`3 * 3`],seealso:[`multiply`,`pow`,`sqrt`,`cube`]},subtract:{name:`subtract`,category:`Operators`,syntax:[`x - y`,`subtract(x, y)`],description:`subtract two values.`,examples:[`a = 5.3 - 2`,`a + 2`,`2/3 - 1/6`,`2 * 3 - 3`,`2.1 km - 500m`],seealso:[`add`]},unaryMinus:{name:`unaryMinus`,category:`Operators`,syntax:[`-x`,`unaryMinus(x)`],description:`Inverse the sign of a value. Converts booleans and strings to numbers.`,examples:[`-4.5`,`-(-5.6)`,`-"22"`],seealso:[`add`,`subtract`,`unaryPlus`]},unaryPlus:{name:`unaryPlus`,category:`Operators`,syntax:[`+x`,`unaryPlus(x)`],description:`Converts booleans and strings to numbers.`,examples:[`+true`,`+"2"`],seealso:[`add`,`subtract`,`unaryMinus`]},xgcd:{name:`xgcd`,category:`Arithmetic`,syntax:[`xgcd(a, b)`],description:`Calculate the extended greatest common divisor for two values. The result is an array [d, x, y] with 3 entries, where d is the greatest common divisor, and d = x * a + y * b.`,examples:[`xgcd(8, 12)`,`gcd(8, 12)`,`xgcd(36163, 21199)`],seealso:[`gcd`,`lcm`]},invmod:{name:`invmod`,category:`Arithmetic`,syntax:[`invmod(a, b)`],description:`Calculate the (modular) multiplicative inverse of a modulo b. Solution to the equation ax ≣ 1 (mod b)`,examples:[`invmod(8, 12)`,`invmod(7, 13)`,`invmod(15151, 15122)`],seealso:[`gcd`,`xgcd`]},bitAnd:{name:`bitAnd`,category:`Bitwise`,syntax:[`x & y`,`bitAnd(x, y)`],description:`Bitwise AND operation. Performs the logical AND operation on each pair of the corresponding bits of the two given values by multiplying them. If both bits in the compared position are 1, the bit in the resulting binary representation is 1, otherwise, the result is 0`,examples:[`5 & 3`,`bitAnd(53, 131)`,`[1, 12, 31] & 42`],seealso:[`bitNot`,`bitOr`,`bitXor`,`leftShift`,`rightArithShift`,`rightLogShift`]},bitNot:{name:`bitNot`,category:`Bitwise`,syntax:[`~x`,`bitNot(x)`],description:`Bitwise NOT operation. Performs a logical negation on each bit of the given value. Bits that are 0 become 1, and those that are 1 become 0.`,examples:[`~1`,`~2`,`bitNot([2, -3, 4])`],seealso:[`bitAnd`,`bitOr`,`bitXor`,`leftShift`,`rightArithShift`,`rightLogShift`]},bitOr:{name:`bitOr`,category:`Bitwise`,syntax:[`x | y`,`bitOr(x, y)`],description:`Bitwise OR operation. Performs the logical inclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if the first bit is 1 or the second bit is 1 or both bits are 1, otherwise, the result is 0.`,examples:[`5 | 3`,`bitOr([1, 2, 3], 4)`],seealso:[`bitAnd`,`bitNot`,`bitXor`,`leftShift`,`rightArithShift`,`rightLogShift`]},bitXor:{name:`bitXor`,category:`Bitwise`,syntax:[`bitXor(x, y)`],description:`Bitwise XOR operation, exclusive OR. Performs the logical exclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if only the first bit is 1 or only the second bit is 1, but will be 0 if both are 0 or both are 1.`,examples:[`bitOr(1, 2)`,`bitXor([2, 3, 4], 4)`],seealso:[`bitAnd`,`bitNot`,`bitOr`,`leftShift`,`rightArithShift`,`rightLogShift`]},leftShift:{name:`leftShift`,category:`Bitwise`,syntax:[`x << y`,`leftShift(x, y)`],description:`Bitwise left logical shift of a value x by y number of bits.`,examples:[`4 << 1`,`8 >> 1`],seealso:[`bitAnd`,`bitNot`,`bitOr`,`bitXor`,`rightArithShift`,`rightLogShift`]},rightArithShift:{name:`rightArithShift`,category:`Bitwise`,syntax:[`x >> y`,`rightArithShift(x, y)`],description:`Bitwise right arithmetic shift of a value x by y number of bits.`,examples:[`8 >> 1`,`4 << 1`,`-12 >> 2`],seealso:[`bitAnd`,`bitNot`,`bitOr`,`bitXor`,`leftShift`,`rightLogShift`]},rightLogShift:{name:`rightLogShift`,category:`Bitwise`,syntax:[`x >>> y`,`rightLogShift(x, y)`],description:`Bitwise right logical shift of a value x by y number of bits.`,examples:[`8 >>> 1`,`4 << 1`,`-12 >>> 2`],seealso:[`bitAnd`,`bitNot`,`bitOr`,`bitXor`,`leftShift`,`rightArithShift`]},bellNumbers:{name:`bellNumbers`,category:`Combinatorics`,syntax:[`bellNumbers(n)`],description:"The Bell Numbers count the number of partitions of a set. A partition is a pairwise disjoint subset of S whose union is S. `bellNumbers` only takes integer arguments. The following condition must be enforced: n >= 0.",examples:[`bellNumbers(3)`,`bellNumbers(8)`],seealso:[`stirlingS2`]},catalan:{name:`catalan`,category:`Combinatorics`,syntax:[`catalan(n)`],description:`The Catalan Numbers enumerate combinatorial structures of many different types. catalan only takes integer arguments. The following condition must be enforced: n >= 0.`,examples:[`catalan(3)`,`catalan(8)`],seealso:[`bellNumbers`]},composition:{name:`composition`,category:`Combinatorics`,syntax:[`composition(n, k)`],description:`The composition counts of n into k parts. composition only takes integer arguments. The following condition must be enforced: k <= n.`,examples:[`composition(5, 3)`],seealso:[`combinations`]},stirlingS2:{name:`stirlingS2`,category:`Combinatorics`,syntax:[`stirlingS2(n, k)`],description:"The Stirling numbers of the second kind, counts the number of ways to partition a set of n labelled objects into k nonempty unlabelled subsets. `stirlingS2` only takes integer arguments. The following condition must be enforced: k <= n. If n = k or k = 1, then s(n,k) = 1.",examples:[`stirlingS2(5, 3)`],seealso:[`bellNumbers`,`bernoulli`]},config:{name:`config`,category:`Core`,syntax:[`config()`,`config(options)`],description:`Get configuration or change configuration.`,examples:[`config()`,`1/3 + 1/4`,`config({number: "Fraction"})`,`1/3 + 1/4`],seealso:[]},import:{name:`import`,category:`Core`,syntax:[`import(functions)`,`import(functions, options)`],description:`Import functions or constants from an object.`,examples:[`import({myFn: f(x)=x^2, myConstant: 32 })`,`myFn(2)`,`myConstant`],seealso:[]},typed:{name:`typed`,category:`Core`,syntax:[`typed(signatures)`,`typed(name, signatures)`],description:`Create a typed function.`,examples:[`double = typed({ "number": f(x)=x+x, "string": f(x)=concat(x,x) })`,`double(2)`,`double("hello")`],seealso:[]},arg:{name:`arg`,category:`Complex`,syntax:[`arg(x)`],description:`Compute the argument of a complex value. If x = a+bi, the argument is computed as atan2(b, a).`,examples:[`arg(2 + 2i)`,`atan2(3, 2)`,`arg(2 + 3i)`],seealso:[`re`,`im`,`conj`,`abs`]},conj:{name:`conj`,category:`Complex`,syntax:[`conj(x)`],description:`Compute the complex conjugate of a complex value. If x = a+bi, the complex conjugate is a-bi.`,examples:[`conj(2 + 3i)`,`conj(2 - 3i)`,`conj(-5.2i)`],seealso:[`re`,`im`,`abs`,`arg`]},re:{name:`re`,category:`Complex`,syntax:[`re(x)`],description:`Get the real part of a complex number.`,examples:[`re(2 + 3i)`,`im(2 + 3i)`,`re(-5.2i)`,`re(2.4)`],seealso:[`im`,`conj`,`abs`,`arg`]},im:{name:`im`,category:`Complex`,syntax:[`im(x)`],description:`Get the imaginary part of a complex number.`,examples:[`im(2 + 3i)`,`re(2 + 3i)`,`im(-5.2i)`,`im(2.4)`],seealso:[`re`,`conj`,`abs`,`arg`]},evaluate:{name:`evaluate`,category:`Expression`,syntax:[`evaluate(expression)`,`evaluate(expression, scope)`,`evaluate([expr1, expr2, expr3, ...])`,`evaluate([expr1, expr2, expr3, ...], scope)`],description:`Evaluate an expression or an array with expressions.`,examples:[`evaluate("2 + 3")`,`evaluate("sqrt(16)")`,`evaluate("2 inch to cm")`,`evaluate("sin(x * pi)", { "x": 1/2 })`,`evaluate(["width=2", "height=4","width*height"])`],seealso:[`parser`,`parse`,`compile`]},help:{name:`help`,category:`Expression`,syntax:[`help(object)`,`help(string)`],description:`Display documentation on a function or data type.`,examples:[`help(sqrt)`,`help("complex")`],seealso:[]},parse:{name:`parse`,category:`Expression`,syntax:[`parse(expr)`,`parse(expr, options)`,`parse([expr1, expr2, expr3, ...])`,`parse([expr1, expr2, expr3, ...], options)`],description:`Parse an expression. Returns a node tree, which can be evaluated by invoking node.evaluate() or transformed into a functional object via node.compile().`,examples:[`node1 = parse("sqrt(3^2 + 4^2)")`,`node1.evaluate()`,`code1 = node1.compile()`,`code1.evaluate()`,`scope = {a: 3, b: 4}`,`node2 = parse("a * b")`,`node2.evaluate(scope)`,`code2 = node2.compile()`,`code2.evaluate(scope)`],seealso:[`parser`,`evaluate`,`compile`]},parser:{name:`parser`,category:`Expression`,syntax:[`parser()`],description:`Create a parser object that keeps a context of variables and their values, allowing the evaluation of expressions in that context.`,examples:[`myParser = parser()`,`myParser.evaluate("sqrt(3^2 + 4^2)")`,`myParser.set("x", 3)`,`myParser.evaluate("y = x + 3")`,`myParser.evaluate(["y = x + 3", "y = y + 1"])`,`myParser.get("y")`],seealso:[`evaluate`,`parse`,`compile`]},compile:{name:`compile`,category:`Expression`,syntax:[`compile(expr) `,`compile([expr1, expr2, expr3, ...])`],description:`Parse and compile an expression. Returns a an object with a function evaluate([scope]) to evaluate the compiled expression.`,examples:[`code1 = compile("sqrt(3^2 + 4^2)")`,`code1.evaluate() `,`code2 = compile("a * b")`,`code2.evaluate({a: 3, b: 4})`],seealso:[`parser`,`parse`,`evaluate`]},distance:{name:`distance`,category:`Geometry`,syntax:[`distance([x1, y1], [x2, y2])`,`distance([[x1, y1], [x2, y2]])`],description:`Calculates the Euclidean distance between two points.`,examples:[`distance([0,0], [4,4])`,`distance([[0,0], [4,4]])`],seealso:[]},intersect:{name:`intersect`,category:`Geometry`,syntax:[`intersect(expr1, expr2, expr3, expr4)`,`intersect(expr1, expr2, expr3)`],description:`Computes the intersection point of lines and/or planes.`,examples:[`intersect([0, 0], [10, 10], [10, 0], [0, 10])`,`intersect([1, 0, 1], [4, -2, 2], [1, 1, 1, 6])`],seealso:[]},and:{name:`and`,category:`Logical`,syntax:[`x and y`,`and(x, y)`],description:`Logical and. Test whether two values are both defined with a nonzero/nonempty value.`,examples:[`true and false`,`true and true`,`2 and 4`],seealso:[`not`,`or`,`xor`]},not:{name:`not`,category:`Logical`,syntax:[`not x`,`not(x)`],description:`Logical not. Flips the boolean value of given argument.`,examples:[`not true`,`not false`,`not 2`,`not 0`],seealso:[`and`,`or`,`xor`]},nullish:{name:`nullish`,category:`Logical`,syntax:[`x ?? y`,`nullish(x, y)`],description:`Nullish coalescing operator. Returns the right-hand operand when the left-hand operand is null or undefined, and otherwise returns the left-hand operand.`,examples:[`null ?? 42`,`undefined ?? 42`,`0 ?? 42`,`false ?? 42`,`null ?? undefined ?? 42`],seealso:[`and`,`or`,`not`]},or:{name:`or`,category:`Logical`,syntax:[`x or y`,`or(x, y)`],description:`Logical or. Test if at least one value is defined with a nonzero/nonempty value.`,examples:[`true or false`,`false or false`,`0 or 4`],seealso:[`not`,`and`,`xor`]},xor:{name:`xor`,category:`Logical`,syntax:[`x xor y`,`xor(x, y)`],description:`Logical exclusive or, xor. Test whether one and only one value is defined with a nonzero/nonempty value.`,examples:[`true xor false`,`false xor false`,`true xor true`,`0 xor 4`],seealso:[`not`,`and`,`or`]},mapSlices:{name:`mapSlices`,category:`Matrix`,syntax:[`mapSlices(A, dim, callback)`],description:`Generate a matrix one dimension less than A by applying callback to each slice of A along dimension dim.`,examples:[`A = [[1, 2], [3, 4]]`,`mapSlices(A, 1, sum)`,`mapSlices(A, 2, prod)`],seealso:[`map`,`forEach`]},concat:{name:`concat`,category:`Matrix`,syntax:[`concat(A, B, C, ...)`,`concat(A, B, C, ..., dim)`],description:`Concatenate matrices. By default, the matrices are concatenated by the last dimension. The dimension on which to concatenate can be provided as last argument.`,examples:[`A = [1, 2; 5, 6]`,`B = [3, 4; 7, 8]`,`concat(A, B)`,`concat(A, B, 1)`,`concat(A, B, 2)`],seealso:[`det`,`diag`,`identity`,`inv`,`ones`,`range`,`size`,`squeeze`,`subset`,`trace`,`transpose`,`zeros`]},count:{name:`count`,category:`Matrix`,syntax:[`count(x)`],description:`Count the number of elements of a matrix, array or string.`,examples:[`a = [1, 2; 3, 4; 5, 6]`,`count(a)`,`size(a)`,`count("hello world")`],seealso:[`size`]},cross:{name:`cross`,category:`Matrix`,syntax:[`cross(A, B)`],description:`Calculate the cross product for two vectors in three dimensional space.`,examples:[`cross([1, 1, 0], [0, 1, 1])`,`cross([3, -3, 1], [4, 9, 2])`,`cross([2, 3, 4], [5, 6, 7])`],seealso:[`multiply`,`dot`]},column:{name:`column`,category:`Matrix`,syntax:[`column(x, index)`],description:`Return a column from a matrix or array.`,examples:[`A = [[1, 2], [3, 4]]`,`column(A, 1)`,`column(A, 2)`],seealso:[`row`,`matrixFromColumns`]},ctranspose:{name:`ctranspose`,category:`Matrix`,syntax:[`x'`,`ctranspose(x)`],description:`Complex Conjugate and Transpose a matrix`,examples:[`a = [1, 2, 3; 4, 5, 6]`,`a'`,`ctranspose(a)`],seealso:[`concat`,`det`,`diag`,`identity`,`inv`,`ones`,`range`,`size`,`squeeze`,`subset`,`trace`,`zeros`]},det:{name:`det`,category:`Matrix`,syntax:[`det(x)`],description:`Calculate the determinant of a matrix`,examples:[`det([1, 2; 3, 4])`,`det([-2, 2, 3; -1, 1, 3; 2, 0, -1])`],seealso:[`concat`,`diag`,`identity`,`inv`,`ones`,`range`,`size`,`squeeze`,`subset`,`trace`,`transpose`,`zeros`]},diag:{name:`diag`,category:`Matrix`,syntax:[`diag(x)`,`diag(x, k)`],description:`Create a diagonal matrix or retrieve the diagonal of a matrix. When x is a vector, a matrix with the vector values on the diagonal will be returned. When x is a matrix, a vector with the diagonal values of the matrix is returned. When k is provided, the k-th diagonal will be filled in or retrieved, if k is positive, the values are placed on the super diagonal. When k is negative, the values are placed on the sub diagonal.`,examples:[`diag(1:3)`,`diag(1:3, 1)`,`a = [1, 2, 3; 4, 5, 6; 7, 8, 9]`,`diag(a)`],seealso:[`concat`,`det`,`identity`,`inv`,`ones`,`range`,`size`,`squeeze`,`subset`,`trace`,`transpose`,`zeros`]},diff:{name:`diff`,category:`Matrix`,syntax:[`diff(arr)`,`diff(arr, dim)`],description:[`Create a new matrix or array with the difference of the passed matrix or array.`,`Dim parameter is optional and used to indicate the dimension of the array/matrix to apply the difference`,`If no dimension parameter is passed it is assumed as dimension 0`,`Dimension is zero-based in javascript and one-based in the parser`,`Arrays must be 'rectangular' meaning arrays like [1, 2]`,`If something is passed as a matrix it will be returned as a matrix but other than that all matrices are converted to arrays`],examples:[`A = [1, 2, 4, 7, 0]`,`diff(A)`,`diff(A, 1)`,`B = [[1, 2], [3, 4]]`,`diff(B)`,`diff(B, 1)`,`diff(B, 2)`,`diff(B, bignumber(2))`,`diff([[1, 2], matrix([3, 4])], 2)`],seealso:[`subtract`,`partitionSelect`]},dot:{name:`dot`,category:`Matrix`,syntax:[`dot(A, B)`,`A * B`],description:`Calculate the dot product of two vectors. The dot product of A = [a1, a2, a3, ..., an] and B = [b1, b2, b3, ..., bn] is defined as dot(A, B) = a1 * b1 + a2 * b2 + a3 * b3 + ... + an * bn`,examples:[`dot([2, 4, 1], [2, 2, 3])`,`[2, 4, 1] * [2, 2, 3]`],seealso:[`multiply`,`cross`]},getMatrixDataType:{name:`getMatrixDataType`,category:`Matrix`,syntax:[`getMatrixDataType(x)`],description:`Find the data type of all elements in a matrix or array, for example "number" if all items are a number and "Complex" if all values are complex numbers. If a matrix contains more than one data type, it will return "mixed".`,examples:[`getMatrixDataType([1, 2, 3])`,`getMatrixDataType([[5 cm], [2 inch]])`,`getMatrixDataType([1, "text"])`,`getMatrixDataType([1, bignumber(4)])`],seealso:[`matrix`,`sparse`,`typeOf`]},identity:{name:`identity`,category:`Matrix`,syntax:[`identity(n)`,`identity(m, n)`,`identity([m, n])`],description:`Returns the identity matrix with size m-by-n. The matrix has ones on the diagonal and zeros elsewhere.`,examples:[`identity(3)`,`identity(3, 5)`,`a = [1, 2, 3; 4, 5, 6]`,`identity(size(a))`],seealso:[`concat`,`det`,`diag`,`inv`,`ones`,`range`,`size`,`squeeze`,`subset`,`trace`,`transpose`,`zeros`]},filter:{name:`filter`,category:`Matrix`,syntax:[`filter(x, test)`],description:`Filter items in a matrix.`,examples:[`isPositive(x) = x > 0`,`filter([6, -2, -1, 4, 3], isPositive)`,`filter([6, -2, 0, 1, 0], x != 0)`],seealso:[`sort`,`map`,`forEach`]},flatten:{name:`flatten`,category:`Matrix`,syntax:[`flatten(x)`],description:`Flatten a multi dimensional matrix into a single dimensional matrix.`,examples:[`a = [1, 2, 3; 4, 5, 6]`,`size(a)`,`b = flatten(a)`,`size(b)`],seealso:[`concat`,`resize`,`size`,`squeeze`]},forEach:{name:`forEach`,category:`Matrix`,syntax:[`forEach(x, callback)`],description:`Iterates over all elements of a matrix/array, and executes the given callback function.`,examples:[`numberOfPets = {}`,`addPet(n) = numberOfPets[n] = (numberOfPets[n] ? numberOfPets[n]:0 ) + 1;`,`forEach(["Dog","Cat","Cat"], addPet)`,`numberOfPets`],seealso:[`map`,`sort`,`filter`]},inv:{name:`inv`,category:`Matrix`,syntax:[`inv(x)`],description:`Calculate the inverse of a matrix`,examples:[`inv([1, 2; 3, 4])`,`inv(4)`,`1 / 4`],seealso:[`concat`,`det`,`diag`,`identity`,`ones`,`range`,`size`,`squeeze`,`subset`,`trace`,`transpose`,`zeros`]},pinv:{name:`pinv`,category:`Matrix`,syntax:[`pinv(x)`],description:`Calculate the Moore–Penrose inverse of a matrix`,examples:[`pinv([1, 2; 3, 4])`,`pinv([[1, 0], [0, 1], [0, 1]])`,`pinv(4)`],seealso:[`inv`]},eigs:{name:`eigs`,category:`Matrix`,syntax:[`eigs(x)`],description:`Calculate the eigenvalues and optionally eigenvectors of a square matrix`,examples:[`eigs([[5, 2.3], [2.3, 1]])`,`eigs([[1, 2, 3], [4, 5, 6], [7, 8, 9]], { precision: 1e-6, eigenvectors: false })`],seealso:[`inv`]},kron:{name:`kron`,category:`Matrix`,syntax:[`kron(x, y)`],description:`Calculates the Kronecker product of 2 matrices or vectors.`,examples:[`kron([[1, 0], [0, 1]], [[1, 2], [3, 4]])`,`kron([1,1], [2,3,4])`],seealso:[`multiply`,`dot`,`cross`]},matrixFromFunction:{name:`matrixFromFunction`,category:`Matrix`,syntax:[`matrixFromFunction(size, fn)`,`matrixFromFunction(size, fn, format)`,`matrixFromFunction(size, fn, format, datatype)`,`matrixFromFunction(size, format, fn)`,`matrixFromFunction(size, format, datatype, fn)`],description:`Create a matrix by evaluating a generating function at each index.`,examples:[`f(I) = I[1] - I[2]`,`matrixFromFunction([3,3], f)`,`g(I) = I[1] - I[2] == 1 ? 4 : 0`,`matrixFromFunction([100, 100], "sparse", g)`,`matrixFromFunction([5], random)`],seealso:[`matrix`,`matrixFromRows`,`matrixFromColumns`,`zeros`]},matrixFromRows:{name:`matrixFromRows`,category:`Matrix`,syntax:[`matrixFromRows(...arr)`,`matrixFromRows(row1, row2)`,`matrixFromRows(row1, row2, row3)`],description:`Create a dense matrix from vectors as individual rows.`,examples:[`matrixFromRows([1, 2, 3], [[4],[5],[6]])`],seealso:[`matrix`,`matrixFromColumns`,`matrixFromFunction`,`zeros`]},matrixFromColumns:{name:`matrixFromColumns`,category:`Matrix`,syntax:[`matrixFromColumns(...arr)`,`matrixFromColumns(row1, row2)`,`matrixFromColumns(row1, row2, row3)`],description:`Create a dense matrix from vectors as individual columns.`,examples:[`matrixFromColumns([1, 2, 3], [[4],[5],[6]])`],seealso:[`matrix`,`matrixFromRows`,`matrixFromFunction`,`zeros`]},map:{name:`map`,category:`Matrix`,syntax:[`map(x, callback)`,`map(x, y, ..., callback)`],description:`Create a new matrix or array with the results of the callback function executed on each entry of the matrix/array or the matrices/arrays.`,examples:[`map([1, 2, 3], square)`,`map([1, 2], [3, 4], f(a,b) = a + b)`],seealso:[`filter`,`forEach`]},ones:{name:`ones`,category:`Matrix`,syntax:[`ones(m)`,`ones(m, n)`,`ones(m, n, p, ...)`,`ones([m])`,`ones([m, n])`,`ones([m, n, p, ...])`],description:`Create a matrix containing ones.`,examples:[`ones(3)`,`ones(3, 5)`,`ones([2,3]) * 4.5`,`a = [1, 2, 3; 4, 5, 6]`,`ones(size(a))`],seealso:[`concat`,`det`,`diag`,`identity`,`inv`,`range`,`size`,`squeeze`,`subset`,`trace`,`transpose`,`zeros`]},partitionSelect:{name:`partitionSelect`,category:`Matrix`,syntax:[`partitionSelect(x, k)`,`partitionSelect(x, k, compare)`],description:`Partition-based selection of an array or 1D matrix. Will find the kth smallest value, and mutates the input array. Uses Quickselect.`,examples:[`partitionSelect([5, 10, 1], 2)`,`partitionSelect(["C", "B", "A", "D"], 1, compareText)`,`arr = [5, 2, 1]`,`partitionSelect(arr, 0) # returns 1, arr is now: [1, 2, 5]`,`arr`,`partitionSelect(arr, 1, 'desc') # returns 2, arr is now: [5, 2, 1]`,`arr`],seealso:[`sort`]},range:{name:`range`,category:`Type`,syntax:[`start:end`,`start:step:end`,`range(start, end)`,`range(start, end, step)`,`range(string)`],description:`Create a range. Lower bound of the range is included, upper bound is excluded.`,examples:[`1:5`,`3:-1:-3`,`range(3, 7)`,`range(0, 12, 2)`,`range("4:10")`,`range(1m, 1m, 3m)`,`a = [1, 2, 3, 4; 5, 6, 7, 8]`,`a[1:2, 1:2]`],seealso:[`concat`,`det`,`diag`,`identity`,`inv`,`ones`,`size`,`squeeze`,`subset`,`trace`,`transpose`,`zeros`]},resize:{name:`resize`,category:`Matrix`,syntax:[`resize(x, size)`,`resize(x, size, defaultValue)`],description:`Resize a matrix.`,examples:[`resize([1,2,3,4,5], [3])`,`resize([1,2,3], [5])`,`resize([1,2,3], [5], -1)`,`resize(2, [2, 3])`,`resize("hello", [8], "!")`],seealso:[`size`,`subset`,`squeeze`,`reshape`]},reshape:{name:`reshape`,category:`Matrix`,syntax:[`reshape(x, sizes)`],description:`Reshape a multi dimensional array to fit the specified dimensions.`,examples:[`reshape([1, 2, 3, 4, 5, 6], [2, 3])`,`reshape([[1, 2], [3, 4]], [1, 4])`,`reshape([[1, 2], [3, 4]], [4])`,`reshape([1, 2, 3, 4], [-1, 2])`],seealso:[`size`,`squeeze`,`resize`]},rotate:{name:`rotate`,category:`Matrix`,syntax:[`rotate(w, theta)`,`rotate(w, theta, v)`],description:`Returns a 2-D rotation matrix (2x2) for a given angle (in radians). Returns a 2-D rotation matrix (3x3) of a given angle (in radians) around given axis.`,examples:[`rotate([1, 0], pi / 2)`,`rotate(matrix([1, 0]), unit("35deg"))`,`rotate([1, 0, 0], unit("90deg"), [0, 0, 1])`,`rotate(matrix([1, 0, 0]), unit("90deg"), matrix([0, 0, 1]))`],seealso:[`matrix`,`rotationMatrix`]},rotationMatrix:{name:`rotationMatrix`,category:`Matrix`,syntax:[`rotationMatrix(theta)`,`rotationMatrix(theta, v)`,`rotationMatrix(theta, v, format)`],description:`Returns a 2-D rotation matrix (2x2) for a given angle (in radians). Returns a 2-D rotation matrix (3x3) of a given angle (in radians) around given axis.`,examples:[`rotationMatrix(pi / 2)`,`rotationMatrix(unit("45deg"), [0, 0, 1])`,`rotationMatrix(1, matrix([0, 0, 1]), "sparse")`],seealso:[`cos`,`sin`]},row:{name:`row`,category:`Matrix`,syntax:[`row(x, index)`],description:`Return a row from a matrix or array.`,examples:[`A = [[1, 2], [3, 4]]`,`row(A, 1)`,`row(A, 2)`],seealso:[`column`,`matrixFromRows`]},size:{name:`size`,category:`Matrix`,syntax:[`size(x)`],description:`Calculate the size of a matrix.`,examples:[`size(2.3)`,`size("hello world")`,`a = [1, 2; 3, 4; 5, 6]`,`size(a)`,`size(1:6)`],seealso:[`concat`,`count`,`det`,`diag`,`identity`,`inv`,`ones`,`range`,`squeeze`,`subset`,`trace`,`transpose`,`zeros`]},sort:{name:`sort`,category:`Matrix`,syntax:[`sort(x)`,`sort(x, compare)`],description:`Sort the items in a matrix. Compare can be a string "asc", "desc", "natural", or a custom sort function.`,examples:[`sort([5, 10, 1])`,`sort(["C", "B", "A", "D"], "natural")`,`sortByLength(a, b) = size(a)[1] - size(b)[1]`,`sort(["Langdon", "Tom", "Sara"], sortByLength)`,`sort(["10", "1", "2"], "natural")`],seealso:[`map`,`filter`,`forEach`]},squeeze:{name:`squeeze`,category:`Matrix`,syntax:[`squeeze(x)`],description:`Remove inner and outer singleton dimensions from a matrix.`,examples:[`a = zeros(3,2,1)`,`size(squeeze(a))`,`b = zeros(1,1,3)`,`size(squeeze(b))`],seealso:[`concat`,`det`,`diag`,`identity`,`inv`,`ones`,`range`,`size`,`subset`,`trace`,`transpose`,`zeros`]},subset:{name:`subset`,category:`Matrix`,syntax:[`value(index)`,`value(index) = replacement`,`subset(value, [index])`,`subset(value, [index], replacement)`],description:"Get or set a subset of the entries of a matrix or characters of a string. Indexes are one-based. There should be one index specification for each dimension of the target. Each specification can be a single index, a list of indices, or a range in colon notation `l:u`. In a range, both the lower bound l and upper bound u are included; and if a bound is omitted it defaults to the most extreme valid value. The cartesian product of the indices specified in each dimension determines the target of the operation.",examples:[`d = [1, 2; 3, 4]`,`e = []`,`e[1, 1:2] = [5, 6]`,`e[2, :] = [7, 8]`,`f = d * e`,`f[2, 1]`,`f[:, 1]`,`f[[1,2], [1,3]] = [9, 10; 11, 12]`,`f`],seealso:[`concat`,`det`,`diag`,`identity`,`inv`,`ones`,`range`,`size`,`squeeze`,`trace`,`transpose`,`zeros`]},trace:{name:`trace`,category:`Matrix`,syntax:[`trace(A)`],description:`Calculate the trace of a matrix: the sum of the elements on the main diagonal of a square matrix.`,examples:[`A = [1, 2, 3; -1, 2, 3; 2, 0, 3]`,`trace(A)`],seealso:[`concat`,`det`,`diag`,`identity`,`inv`,`ones`,`range`,`size`,`squeeze`,`subset`,`transpose`,`zeros`]},transpose:{name:`transpose`,category:`Matrix`,syntax:[`x'`,`transpose(x)`],description:`Transpose a matrix`,examples:[`a = [1, 2, 3; 4, 5, 6]`,`a'`,`transpose(a)`],seealso:[`concat`,`det`,`diag`,`identity`,`inv`,`ones`,`range`,`size`,`squeeze`,`subset`,`trace`,`zeros`]},zeros:{name:`zeros`,category:`Matrix`,syntax:[`zeros(m)`,`zeros(m, n)`,`zeros(m, n, p, ...)`,`zeros([m])`,`zeros([m, n])`,`zeros([m, n, p, ...])`],description:`Create a matrix containing zeros.`,examples:[`zeros(3)`,`zeros(3, 5)`,`a = [1, 2, 3; 4, 5, 6]`,`zeros(size(a))`],seealso:[`concat`,`det`,`diag`,`identity`,`inv`,`ones`,`range`,`size`,`squeeze`,`subset`,`trace`,`transpose`]},fft:{name:`fft`,category:`Matrix`,syntax:[`fft(x)`],description:`Calculate N-dimensional Fourier transform`,examples:[`fft([[1, 0], [1, 0]])`],seealso:[`ifft`]},ifft:{name:`ifft`,category:`Matrix`,syntax:[`ifft(x)`],description:`Calculate N-dimensional inverse Fourier transform`,examples:[`ifft([[2, 2], [0, 0]])`],seealso:[`fft`]},sylvester:{name:`sylvester`,category:`Algebra`,syntax:[`sylvester(A,B,C)`],description:`Solves the real-valued Sylvester equation AX+XB=C for X`,examples:[`sylvester([[-1, -2], [1, 1]], [[-2, 1], [-1, 2]], [[-3, 2], [3, 0]])`,`A = [[-1, -2], [1, 1]]; B = [[2, -1], [1, -2]]; C = [[-3, 2], [3, 0]]`,`sylvester(A, B, C)`],seealso:[`schur`,`lyap`]},schur:{name:`schur`,category:`Algebra`,syntax:[`schur(A)`],description:`Performs a real Schur decomposition of the real matrix A = UTU'`,examples:[`schur([[1, 0], [-4, 3]])`,`A = [[1, 0], [-4, 3]]`,`schur(A)`],seealso:[`lyap`,`sylvester`]},lyap:{name:`lyap`,category:`Algebra`,syntax:[`lyap(A,Q)`],description:`Solves the Continuous-time Lyapunov equation AP+PA'+Q=0 for P`,examples:[`lyap([[-2, 0], [1, -4]], [[3, 1], [1, 3]])`,`A = [[-2, 0], [1, -4]]`,`Q = [[3, 1], [1, 3]]`,`lyap(A,Q)`],seealso:[`schur`,`sylvester`]},solveODE:{name:`solveODE`,category:`Numeric`,syntax:[`solveODE(func, tspan, y0)`,`solveODE(func, tspan, y0, options)`],description:`Numerical Integration of Ordinary Differential Equations.`,examples:[`f(t,y) = y`,`tspan = [0, 4]`,`solveODE(f, tspan, 1)`,`solveODE(f, tspan, [1, 2])`,`solveODE(f, tspan, 1, { method:"RK23", maxStep:0.1 })`],seealso:[`derivative`,`simplifyCore`]},bernoulli:{name:`bernoulli`,category:`Probability`,syntax:[`bernoulli(n)`],description:`The nth Bernoulli number`,examples:[`bernoulli(4)`,`bernoulli(fraction(12))`],seealso:[`combinations`,`gamma`,`stirlingS2`]},combinations:{name:`combinations`,category:`Probability`,syntax:[`combinations(n, k)`],description:`Compute the number of combinations of n items taken k at a time`,examples:[`combinations(7, 5)`],seealso:[`combinationsWithRep`,`permutations`,`factorial`]},combinationsWithRep:{name:`combinationsWithRep`,category:`Probability`,syntax:[`combinationsWithRep(n, k)`],description:`Compute the number of combinations of n items taken k at a time with replacements.`,examples:[`combinationsWithRep(7, 5)`],seealso:[`combinations`,`permutations`,`factorial`]},factorial:{name:`factorial`,category:`Probability`,syntax:[`n!`,`factorial(n)`],description:`Compute the factorial of a value`,examples:[`5!`,`5 * 4 * 3 * 2 * 1`,`3!`],seealso:[`combinations`,`combinationsWithRep`,`permutations`,`gamma`]},gamma:{name:`gamma`,category:`Probability`,syntax:[`gamma(n)`],description:`Compute the gamma function. For small values, the Lanczos approximation is used, and for large values the extended Stirling approximation.`,examples:[`gamma(4)`,`3!`,`gamma(1/2)`,`sqrt(pi)`],seealso:[`factorial`]},kldivergence:{name:`kldivergence`,category:`Probability`,syntax:[`kldivergence(x, y)`],description:`Calculate the Kullback-Leibler (KL) divergence between two distributions.`,examples:[`kldivergence([0.7,0.5,0.4], [0.2,0.9,0.5])`],seealso:[]},lgamma:{name:`lgamma`,category:`Probability`,syntax:[`lgamma(n)`],description:`Logarithm of the gamma function for real, positive numbers and complex numbers, using Lanczos approximation for numbers and Stirling series for complex numbers.`,examples:[`lgamma(4)`,`lgamma(1/2)`,`lgamma(i)`,`lgamma(complex(1.1, 2))`],seealso:[`gamma`]},multinomial:{name:`multinomial`,category:`Probability`,syntax:[`multinomial(A)`],description:"Multinomial Coefficients compute the number of ways of picking a1, a2, ..., ai unordered outcomes from `n` possibilities. multinomial takes one array of integers as an argument. The following condition must be enforced: every ai > 0.",examples:[`multinomial([1, 2, 1])`],seealso:[`combinations`,`factorial`]},permutations:{name:`permutations`,category:`Probability`,syntax:[`permutations(n)`,`permutations(n, k)`],description:`Compute the number of permutations of n items taken k at a time`,examples:[`permutations(5)`,`permutations(5, 3)`],seealso:[`combinations`,`combinationsWithRep`,`factorial`]},pickRandom:{name:`pickRandom`,category:`Probability`,syntax:[`pickRandom(array)`,`pickRandom(array, number)`,`pickRandom(array, weights)`,`pickRandom(array, number, weights)`,`pickRandom(array, weights, number)`],description:`Pick a random entry from a given array.`,examples:[`pickRandom(0:10)`,`pickRandom([1, 3, 1, 6])`,`pickRandom([1, 3, 1, 6], 2)`,`pickRandom([1, 3, 1, 6], [2, 3, 2, 1])`,`pickRandom([1, 3, 1, 6], 2, [2, 3, 2, 1])`,`pickRandom([1, 3, 1, 6], [2, 3, 2, 1], 2)`],seealso:[`random`,`randomInt`]},random:{name:`random`,category:`Probability`,syntax:[`random()`,`random(max)`,`random(min, max)`,`random(size)`,`random(size, max)`,`random(size, min, max)`],description:`Return a random number.`,examples:[`random()`,`random(10, 20)`,`random([2, 3])`],seealso:[`pickRandom`,`randomInt`]},randomInt:{name:`randomInt`,category:`Probability`,syntax:[`randomInt(max)`,`randomInt(min, max)`,`randomInt(size)`,`randomInt(size, max)`,`randomInt(size, min, max)`],description:`Return a random integer number`,examples:[`randomInt(10, 20)`,`randomInt([2, 3], 10)`],seealso:[`pickRandom`,`random`]},compare:{name:`compare`,category:`Relational`,syntax:[`compare(x, y)`],description:`Compare two values. Returns 1 when x > y, -1 when x < y, and 0 when x == y.`,examples:[`compare(2, 3)`,`compare(3, 2)`,`compare(2, 2)`,`compare(5cm, 40mm)`,`compare(2, [1, 2, 3])`],seealso:[`equal`,`unequal`,`smaller`,`smallerEq`,`largerEq`,`compareNatural`,`compareText`]},compareNatural:{name:`compareNatural`,category:`Relational`,syntax:[`compareNatural(x, y)`],description:`Compare two values of any type in a deterministic, natural way. Returns 1 when x > y, -1 when x < y, and 0 when x == y.`,examples:[`compareNatural(2, 3)`,`compareNatural(3, 2)`,`compareNatural(2, 2)`,`compareNatural(5cm, 40mm)`,`compareNatural("2", "10")`,`compareNatural(2 + 3i, 2 + 4i)`,`compareNatural([1, 2, 4], [1, 2, 3])`,`compareNatural([1, 5], [1, 2, 3])`,`compareNatural([1, 2], [1, 2])`,`compareNatural({a: 2}, {a: 4})`],seealso:[`equal`,`unequal`,`smaller`,`smallerEq`,`largerEq`,`compare`,`compareText`]},compareText:{name:`compareText`,category:`Relational`,syntax:[`compareText(x, y)`],description:`Compare two strings lexically. Comparison is case sensitive. Returns 1 when x > y, -1 when x < y, and 0 when x == y.`,examples:[`compareText("B", "A")`,`compareText("A", "B")`,`compareText("A", "A")`,`compareText("2", "10")`,`compare("2", "10")`,`compare(2, 10)`,`compareNatural("2", "10")`,`compareText("B", ["A", "B", "C"])`],seealso:[`compare`,`compareNatural`]},deepEqual:{name:`deepEqual`,category:`Relational`,syntax:[`deepEqual(x, y)`],description:`Check equality of two matrices element wise. Returns true if the size of both matrices is equal and when and each of the elements are equal.`,examples:[`deepEqual([1,3,4], [1,3,4])`,`deepEqual([1,3,4], [1,3])`],seealso:[`equal`,`unequal`,`smaller`,`larger`,`smallerEq`,`largerEq`,`compare`]},equal:{name:`equal`,category:`Relational`,syntax:[`x == y`,`equal(x, y)`],description:`Check equality of two values. Returns true if the values are equal, and false if not.`,examples:[`2+2 == 3`,`2+2 == 4`,`a = 3.2`,`b = 6-2.8`,`a == b`,`50cm == 0.5m`],seealso:[`unequal`,`smaller`,`larger`,`smallerEq`,`largerEq`,`compare`,`deepEqual`,`equalText`]},equalText:{name:`equalText`,category:`Relational`,syntax:[`equalText(x, y)`],description:`Check equality of two strings. Comparison is case sensitive. Returns true if the values are equal, and false if not.`,examples:[`equalText("Hello", "Hello")`,`equalText("a", "A")`,`equal("2e3", "2000")`,`equalText("2e3", "2000")`,`equalText("B", ["A", "B", "C"])`],seealso:[`compare`,`compareNatural`,`compareText`,`equal`]},larger:{name:`larger`,category:`Relational`,syntax:[`x > y`,`larger(x, y)`],description:`Check if value x is larger than y. Returns true if x is larger than y, and false if not. Comparing a value with NaN returns false.`,examples:[`2 > 3`,`5 > 2*2`,`a = 3.3`,`b = 6-2.8`,`(a > b)`,`(b < a)`,`5 cm > 2 inch`],seealso:[`equal`,`unequal`,`smaller`,`smallerEq`,`largerEq`,`compare`]},largerEq:{name:`largerEq`,category:`Relational`,syntax:[`x >= y`,`largerEq(x, y)`],description:`Check if value x is larger or equal to y. Returns true if x is larger or equal to y, and false if not.`,examples:[`2 >= 1+1`,`2 > 1+1`,`a = 3.2`,`b = 6-2.8`,`(a >= b)`],seealso:[`equal`,`unequal`,`smallerEq`,`smaller`,`compare`]},smaller:{name:`smaller`,category:`Relational`,syntax:[`x < y`,`smaller(x, y)`],description:`Check if value x is smaller than value y. Returns true if x is smaller than y, and false if not. Comparing a value with NaN returns false.`,examples:[`2 < 3`,`5 < 2*2`,`a = 3.3`,`b = 6-2.8`,`(a < b)`,`5 cm < 2 inch`],seealso:[`equal`,`unequal`,`larger`,`smallerEq`,`largerEq`,`compare`]},smallerEq:{name:`smallerEq`,category:`Relational`,syntax:[`x <= y`,`smallerEq(x, y)`],description:`Check if value x is smaller or equal to value y. Returns true if x is smaller than y, and false if not.`,examples:[`2 <= 1+1`,`2 < 1+1`,`a = 3.2`,`b = 6-2.8`,`(a <= b)`],seealso:[`equal`,`unequal`,`larger`,`smaller`,`largerEq`,`compare`]},unequal:{name:`unequal`,category:`Relational`,syntax:[`x != y`,`unequal(x, y)`],description:`Check unequality of two values. Returns true if the values are unequal, and false if they are equal.`,examples:[`2+2 != 3`,`2+2 != 4`,`a = 3.2`,`b = 6-2.8`,`a != b`,`50cm != 0.5m`,`5 cm != 2 inch`],seealso:[`equal`,`smaller`,`larger`,`smallerEq`,`largerEq`,`compare`,`deepEqual`]},setCartesian:{name:`setCartesian`,category:`Set`,syntax:[`setCartesian(set1, set2)`],description:`Create the cartesian product of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays and the values will be sorted in ascending order before the operation.`,examples:[`setCartesian([1, 2], [3, 4])`],seealso:[`setUnion`,`setIntersect`,`setDifference`,`setPowerset`]},setDifference:{name:`setDifference`,category:`Set`,syntax:[`setDifference(set1, set2)`],description:`Create the difference of two (multi)sets: every element of set1, that is not the element of set2. Multi-dimension arrays will be converted to single-dimension arrays before the operation.`,examples:[`setDifference([1, 2, 3, 4], [3, 4, 5, 6])`,`setDifference([[1, 2], [3, 4]], [[3, 4], [5, 6]])`],seealso:[`setUnion`,`setIntersect`,`setSymDifference`]},setDistinct:{name:`setDistinct`,category:`Set`,syntax:[`setDistinct(set)`],description:`Collect the distinct elements of a multiset. A multi-dimension array will be converted to a single-dimension array before the operation.`,examples:[`setDistinct([1, 1, 1, 2, 2, 3])`],seealso:[`setMultiplicity`]},setIntersect:{name:`setIntersect`,category:`Set`,syntax:[`setIntersect(set1, set2)`],description:`Create the intersection of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.`,examples:[`setIntersect([1, 2, 3, 4], [3, 4, 5, 6])`,`setIntersect([[1, 2], [3, 4]], [[3, 4], [5, 6]])`],seealso:[`setUnion`,`setDifference`]},setIsSubset:{name:`setIsSubset`,category:`Set`,syntax:[`setIsSubset(set1, set2)`],description:`Check whether a (multi)set is a subset of another (multi)set: every element of set1 is the element of set2. Multi-dimension arrays will be converted to single-dimension arrays before the operation.`,examples:[`setIsSubset([1, 2], [3, 4, 5, 6])`,`setIsSubset([3, 4], [3, 4, 5, 6])`],seealso:[`setUnion`,`setIntersect`,`setDifference`]},setMultiplicity:{name:`setMultiplicity`,category:`Set`,syntax:[`setMultiplicity(element, set)`],description:`Count the multiplicity of an element in a multiset. A multi-dimension array will be converted to a single-dimension array before the operation.`,examples:[`setMultiplicity(1, [1, 2, 2, 4])`,`setMultiplicity(2, [1, 2, 2, 4])`],seealso:[`setDistinct`,`setSize`]},setPowerset:{name:`setPowerset`,category:`Set`,syntax:[`setPowerset(set)`],description:`Create the powerset of a (multi)set: the powerset contains very possible subsets of a (multi)set. A multi-dimension array will be converted to a single-dimension array before the operation.`,examples:[`setPowerset([1, 2, 3])`],seealso:[`setCartesian`]},setSize:{name:`setSize`,category:`Set`,syntax:[`setSize(set)`,`setSize(set, unique)`],description:`Count the number of elements of a (multi)set. When the second parameter "unique" is true, count only the unique values. A multi-dimension array will be converted to a single-dimension array before the operation.`,examples:[`setSize([1, 2, 2, 4])`,`setSize([1, 2, 2, 4], true)`],seealso:[`setUnion`,`setIntersect`,`setDifference`]},setSymDifference:{name:`setSymDifference`,category:`Set`,syntax:[`setSymDifference(set1, set2)`],description:`Create the symmetric difference of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.`,examples:[`setSymDifference([1, 2, 3, 4], [3, 4, 5, 6])`,`setSymDifference([[1, 2], [3, 4]], [[3, 4], [5, 6]])`],seealso:[`setUnion`,`setIntersect`,`setDifference`]},setUnion:{name:`setUnion`,category:`Set`,syntax:[`setUnion(set1, set2)`],description:`Create the union of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.`,examples:[`setUnion([1, 2, 3, 4], [3, 4, 5, 6])`,`setUnion([[1, 2], [3, 4]], [[3, 4], [5, 6]])`],seealso:[`setIntersect`,`setDifference`]},zpk2tf:{name:`zpk2tf`,category:`Signal`,syntax:[`zpk2tf(z, p, k)`],description:`Compute the transfer function of a zero-pole-gain model.`,examples:[`zpk2tf([1, 2], [-1, -2], 1)`,`zpk2tf([1, 2], [-1, -2])`,`zpk2tf([1 - 3i, 2 + 2i], [-1, -2])`],seealso:[]},freqz:{name:`freqz`,category:`Signal`,syntax:[`freqz(b, a)`,`freqz(b, a, w)`],description:`Calculates the frequency response of a filter given its numerator and denominator coefficients.`,examples:[`freqz([1, 2], [1, 2, 3])`,`freqz([1, 2], [1, 2, 3], [0, 1])`,`freqz([1, 2], [1, 2, 3], 512)`],seealso:[]},erf:{name:`erf`,category:`Special`,syntax:[`erf(x)`],description:`Compute the erf function of a value using a rational Chebyshev approximations for different intervals of x`,examples:[`erf(0.2)`,`erf(-0.5)`,`erf(4)`],seealso:[]},zeta:{name:`zeta`,category:`Special`,syntax:[`zeta(s)`],description:`Compute the Riemann Zeta Function using an infinite series and Riemann's Functional Equation for the entire complex plane`,examples:[`zeta(0.2)`,`zeta(-0.5)`,`zeta(4)`],seealso:[]},cumsum:{name:`cumsum`,category:`Statistics`,syntax:[`cumsum(a, b, c, ...)`,`cumsum(A)`],description:`Compute the cumulative sum of all values.`,examples:[`cumsum(2, 3, 4, 1)`,`cumsum([2, 3, 4, 1])`,`cumsum([1, 2; 3, 4])`,`cumsum([1, 2; 3, 4], 1)`,`cumsum([1, 2; 3, 4], 2)`],seealso:[`max`,`mean`,`median`,`min`,`prod`,`std`,`sum`,`variance`]},mad:{name:`mad`,category:`Statistics`,syntax:[`mad(a, b, c, ...)`,`mad(A)`],description:`Compute the median absolute deviation of a matrix or a list with values. The median absolute deviation is defined as the median of the absolute deviations from the median.`,examples:[`mad(10, 20, 30)`,`mad([1, 2, 3])`],seealso:[`mean`,`median`,`std`,`abs`]},max:{name:`max`,category:`Statistics`,syntax:[`max(a, b, c, ...)`,`max(A)`,`max(A, dimension)`],description:`Compute the maximum value of a list of values. If any NaN values are found, the function yields the last NaN in the input.`,examples:[`max(2, 3, 4, 1)`,`max([2, 3, 4, 1])`,`max([2, 5; 4, 3])`,`max([2, 5; 4, 3], 1)`,`max([2, 5; 4, 3], 2)`,`max(2.7, 7.1, -4.5, 2.0, 4.1)`,`min(2.7, 7.1, -4.5, 2.0, 4.1)`],seealso:[`mean`,`median`,`min`,`prod`,`std`,`sum`,`variance`]},mean:{name:`mean`,category:`Statistics`,syntax:[`mean(a, b, c, ...)`,`mean(A)`,`mean(A, dimension)`],description:`Compute the arithmetic mean of a list of values.`,examples:[`mean(2, 3, 4, 1)`,`mean([2, 3, 4, 1])`,`mean([2, 5; 4, 3])`,`mean([2, 5; 4, 3], 1)`,`mean([2, 5; 4, 3], 2)`,`mean([1.0, 2.7, 3.2, 4.0])`],seealso:[`max`,`median`,`min`,`prod`,`std`,`sum`,`variance`]},median:{name:`median`,category:`Statistics`,syntax:[`median(a, b, c, ...)`,`median(A)`],description:`Compute the median of all values. The values are sorted and the middle value is returned. In case of an even number of values, the average of the two middle values is returned.`,examples:[`median(5, 2, 7)`,`median([3, -1, 5, 7])`],seealso:[`max`,`mean`,`min`,`prod`,`std`,`sum`,`variance`,`quantileSeq`]},min:{name:`min`,category:`Statistics`,syntax:[`min(a, b, c, ...)`,`min(A)`,`min(A, dimension)`],description:`Compute the minimum value of a list of values. If any NaN values are found, the function yields the last NaN in the input.`,examples:[`min(2, 3, 4, 1)`,`min([2, 3, 4, 1])`,`min([2, 5; 4, 3])`,`min([2, 5; 4, 3], 1)`,`min([2, 5; 4, 3], 2)`,`min(2.7, 7.1, -4.5, 2.0, 4.1)`,`max(2.7, 7.1, -4.5, 2.0, 4.1)`],seealso:[`max`,`mean`,`median`,`prod`,`std`,`sum`,`variance`]},mode:{name:`mode`,category:`Statistics`,syntax:[`mode(a, b, c, ...)`,`mode(A)`,`mode(A, a, b, B, c, ...)`],description:`Computes the mode of all values as an array. In case mode being more than one, multiple values are returned in an array.`,examples:[`mode(2, 1, 4, 3, 1)`,`mode([1, 2.7, 3.2, 4, 2.7])`,`mode(1, 4, 6, 1, 6)`],seealso:[`max`,`mean`,`min`,`median`,`prod`,`std`,`sum`,`variance`]},prod:{name:`prod`,category:`Statistics`,syntax:[`prod(a, b, c, ...)`,`prod(A)`],description:`Compute the product of all values.`,examples:[`prod(2, 3, 4)`,`prod([2, 3, 4])`,`prod([2, 5; 4, 3])`],seealso:[`max`,`mean`,`min`,`median`,`min`,`std`,`sum`,`variance`]},quantileSeq:{name:`quantileSeq`,category:`Statistics`,syntax:[`quantileSeq(A, prob[, sorted])`,`quantileSeq(A, [prob1, prob2, ...][, sorted])`,`quantileSeq(A, N[, sorted])`],description:`Compute the prob order quantile of a matrix or a list with values. The sequence is sorted and the middle value is returned. Supported types of sequence values are: Number, BigNumber, Unit Supported types of probability are: Number, BigNumber.
72
+
73
+ In case of a (multi dimensional) array or matrix, the prob order quantile of all elements will be calculated.`,examples:[`quantileSeq([3, -1, 5, 7], 0.5)`,`quantileSeq([3, -1, 5, 7], [1/3, 2/3])`,`quantileSeq([3, -1, 5, 7], 2)`,`quantileSeq([-1, 3, 5, 7], 0.5, true)`],seealso:[`mean`,`median`,`min`,`max`,`prod`,`std`,`sum`,`variance`]},std:{name:`std`,category:`Statistics`,syntax:[`std(a, b, c, ...)`,`std(A)`,`std(A, dimension)`,`std(A, normalization)`,`std(A, dimension, normalization)`],description:`Compute the standard deviation of all values, defined as std(A) = sqrt(variance(A)). Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".`,examples:[`std(2, 4, 6)`,`std([2, 4, 6, 8])`,`std([2, 4, 6, 8], "uncorrected")`,`std([2, 4, 6, 8], "biased")`,`std([1, 2, 3; 4, 5, 6])`],seealso:[`max`,`mean`,`min`,`median`,`prod`,`sum`,`variance`]},sum:{name:`sum`,category:`Statistics`,syntax:[`sum(a, b, c, ...)`,`sum(A)`,`sum(A, dimension)`],description:`Compute the sum of all values.`,examples:[`sum(2, 3, 4, 1)`,`sum([2, 3, 4, 1])`,`sum([2, 5; 4, 3])`],seealso:[`max`,`mean`,`median`,`min`,`prod`,`std`,`variance`]},variance:{name:`variance`,category:`Statistics`,syntax:[`variance(a, b, c, ...)`,`variance(A)`,`variance(A, dimension)`,`variance(A, normalization)`,`variance(A, dimension, normalization)`],description:`Compute the variance of all values. Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".`,examples:[`variance(2, 4, 6)`,`variance([2, 4, 6, 8])`,`variance([2, 4, 6, 8], "uncorrected")`,`variance([2, 4, 6, 8], "biased")`,`variance([1, 2, 3; 4, 5, 6])`],seealso:[`max`,`mean`,`min`,`median`,`min`,`prod`,`std`,`sum`]},corr:{name:`corr`,category:`Statistics`,syntax:[`corr(A,B)`],description:`Compute the correlation coefficient of a two list with values, For matrices, the matrix correlation coefficient is calculated.`,examples:[`corr([2, 4, 6, 8],[1, 2, 3, 6])`,`corr(matrix([[1, 2.2, 3, 4.8, 5], [1, 2, 3, 4, 5]]), matrix([[4, 5.3, 6.6, 7, 8], [1, 2, 3, 4, 5]]))`],seealso:[`max`,`mean`,`min`,`median`,`min`,`prod`,`std`,`sum`]},acos:{name:`acos`,category:`Trigonometry`,syntax:[`acos(x)`],description:`Compute the inverse cosine of a value in radians.`,examples:[`acos(0.5)`,`acos(cos(2.3))`],seealso:[`cos`,`atan`,`asin`]},acosh:{name:`acosh`,category:`Trigonometry`,syntax:[`acosh(x)`],description:"Calculate the hyperbolic arccos of a value, defined as `acosh(x) = ln(sqrt(x^2 - 1) + x)`.",examples:[`acosh(1.5)`],seealso:[`cosh`,`asinh`,`atanh`]},acot:{name:`acot`,category:`Trigonometry`,syntax:[`acot(x)`],description:`Calculate the inverse cotangent of a value.`,examples:[`acot(0.5)`,`acot(cot(0.5))`,`acot(2)`],seealso:[`cot`,`atan`]},acoth:{name:`acoth`,category:`Trigonometry`,syntax:[`acoth(x)`],description:"Calculate the inverse hyperbolic tangent of a value, defined as `acoth(x) = (ln((x+1)/x) + ln(x/(x-1))) / 2`.",examples:[`acoth(2)`,`acoth(0.5)`],seealso:[`acsch`,`asech`]},acsc:{name:`acsc`,category:`Trigonometry`,syntax:[`acsc(x)`],description:`Calculate the inverse cotangent of a value.`,examples:[`acsc(2)`,`acsc(csc(0.5))`,`acsc(0.5)`],seealso:[`csc`,`asin`,`asec`]},acsch:{name:`acsch`,category:`Trigonometry`,syntax:[`acsch(x)`],description:"Calculate the inverse hyperbolic cosecant of a value, defined as `acsch(x) = ln(1/x + sqrt(1/x^2 + 1))`.",examples:[`acsch(0.5)`],seealso:[`asech`,`acoth`]},asec:{name:`asec`,category:`Trigonometry`,syntax:[`asec(x)`],description:`Calculate the inverse secant of a value.`,examples:[`asec(0.5)`,`asec(sec(0.5))`,`asec(2)`],seealso:[`acos`,`acot`,`acsc`]},asech:{name:`asech`,category:`Trigonometry`,syntax:[`asech(x)`],description:`Calculate the inverse secant of a value.`,examples:[`asech(0.5)`],seealso:[`acsch`,`acoth`]},asin:{name:`asin`,category:`Trigonometry`,syntax:[`asin(x)`],description:`Compute the inverse sine of a value in radians.`,examples:[`asin(0.5)`,`asin(sin(0.5))`],seealso:[`sin`,`acos`,`atan`]},asinh:{name:`asinh`,category:`Trigonometry`,syntax:[`asinh(x)`],description:"Calculate the hyperbolic arcsine of a value, defined as `asinh(x) = ln(x + sqrt(x^2 + 1))`.",examples:[`asinh(0.5)`],seealso:[`acosh`,`atanh`]},atan:{name:`atan`,category:`Trigonometry`,syntax:[`atan(x)`],description:`Compute the inverse tangent of a value in radians.`,examples:[`atan(0.5)`,`atan(tan(0.5))`],seealso:[`tan`,`acos`,`asin`]},atanh:{name:`atanh`,category:`Trigonometry`,syntax:[`atanh(x)`],description:"Calculate the hyperbolic arctangent of a value, defined as `atanh(x) = ln((1 + x)/(1 - x)) / 2`.",examples:[`atanh(0.5)`],seealso:[`acosh`,`asinh`]},atan2:{name:`atan2`,category:`Trigonometry`,syntax:[`atan2(y, x)`],description:`Computes the principal value of the arc tangent of y/x in radians.`,examples:[`atan2(2, 2) / pi`,`angle = 60 deg in rad`,`x = cos(angle)`,`y = sin(angle)`,`atan2(y, x)`],seealso:[`sin`,`cos`,`tan`]},cos:{name:`cos`,category:`Trigonometry`,syntax:[`cos(x)`],description:`Compute the cosine of x in radians.`,examples:[`cos(2)`,`cos(pi / 4) ^ 2`,`cos(180 deg)`,`cos(60 deg)`,`sin(0.2)^2 + cos(0.2)^2`],seealso:[`acos`,`sin`,`tan`]},cosh:{name:`cosh`,category:`Trigonometry`,syntax:[`cosh(x)`],description:`Compute the hyperbolic cosine of x in radians.`,examples:[`cosh(0.5)`],seealso:[`sinh`,`tanh`,`coth`]},cot:{name:`cot`,category:`Trigonometry`,syntax:[`cot(x)`],description:`Compute the cotangent of x in radians. Defined as 1/tan(x)`,examples:[`cot(2)`,`1 / tan(2)`],seealso:[`sec`,`csc`,`tan`]},coth:{name:`coth`,category:`Trigonometry`,syntax:[`coth(x)`],description:`Compute the hyperbolic cotangent of x in radians.`,examples:[`coth(2)`,`1 / tanh(2)`],seealso:[`sech`,`csch`,`tanh`]},csc:{name:`csc`,category:`Trigonometry`,syntax:[`csc(x)`],description:`Compute the cosecant of x in radians. Defined as 1/sin(x)`,examples:[`csc(2)`,`1 / sin(2)`],seealso:[`sec`,`cot`,`sin`]},csch:{name:`csch`,category:`Trigonometry`,syntax:[`csch(x)`],description:`Compute the hyperbolic cosecant of x in radians. Defined as 1/sinh(x)`,examples:[`csch(2)`,`1 / sinh(2)`],seealso:[`sech`,`coth`,`sinh`]},sec:{name:`sec`,category:`Trigonometry`,syntax:[`sec(x)`],description:`Compute the secant of x in radians. Defined as 1/cos(x)`,examples:[`sec(2)`,`1 / cos(2)`],seealso:[`cot`,`csc`,`cos`]},sech:{name:`sech`,category:`Trigonometry`,syntax:[`sech(x)`],description:`Compute the hyperbolic secant of x in radians. Defined as 1/cosh(x)`,examples:[`sech(2)`,`1 / cosh(2)`],seealso:[`coth`,`csch`,`cosh`]},sin:{name:`sin`,category:`Trigonometry`,syntax:[`sin(x)`],description:`Compute the sine of x in radians.`,examples:[`sin(2)`,`sin(pi / 4) ^ 2`,`sin(90 deg)`,`sin(30 deg)`,`sin(0.2)^2 + cos(0.2)^2`],seealso:[`asin`,`cos`,`tan`]},sinh:{name:`sinh`,category:`Trigonometry`,syntax:[`sinh(x)`],description:`Compute the hyperbolic sine of x in radians.`,examples:[`sinh(0.5)`],seealso:[`cosh`,`tanh`]},tan:{name:`tan`,category:`Trigonometry`,syntax:[`tan(x)`],description:`Compute the tangent of x in radians.`,examples:[`tan(0.5)`,`sin(0.5) / cos(0.5)`,`tan(pi / 4)`,`tan(45 deg)`],seealso:[`atan`,`sin`,`cos`]},tanh:{name:`tanh`,category:`Trigonometry`,syntax:[`tanh(x)`],description:`Compute the hyperbolic tangent of x in radians.`,examples:[`tanh(0.5)`,`sinh(0.5) / cosh(0.5)`],seealso:[`sinh`,`cosh`]},to:{name:`to`,category:`Units`,syntax:[`x to unit`,`to(x, unit)`],description:`Change the unit of a value.`,examples:[`5 inch to cm`,`3.2kg to g`,`16 bytes in bits`],seealso:[]},toBest:{name:`toBest`,category:`Units`,syntax:[`toBest(x)`,`toBest(x, unitList)`,`toBest(x, unitList, options)`],description:`Converts to the most appropriate display unit.`,examples:[`toBest(unit(5000, "m"))`,`toBest(unit(3500000, "W"))`,`toBest(unit(0.000000123, "A"))`,`toBest(unit(10, "m"), "cm")`,`toBest(unit(10, "m"), "mm,km", {offset: 1.5})`],seealso:[]},clone:{name:`clone`,category:`Utils`,syntax:[`clone(x)`],description:`Clone a variable. Creates a copy of primitive variables, and a deep copy of matrices`,examples:[`clone(3.5)`,`clone(2 - 4i)`,`clone(45 deg)`,`clone([1, 2; 3, 4])`,`clone("hello world")`],seealso:[]},format:{name:`format`,category:`Utils`,syntax:[`format(value)`,`format(value, precision)`],description:`Format a value of any type as string.`,examples:[`format(2.3)`,`format(3 - 4i)`,`format([])`,`format(pi, 3)`],seealso:[`print`]},bin:{name:`bin`,category:`Utils`,syntax:[`bin(value)`],description:`Format a number as binary`,examples:[`bin(2)`],seealso:[`oct`,`hex`]},oct:{name:`oct`,category:`Utils`,syntax:[`oct(value)`],description:`Format a number as octal`,examples:[`oct(56)`],seealso:[`bin`,`hex`]},hex:{name:`hex`,category:`Utils`,syntax:[`hex(value)`],description:`Format a number as hexadecimal`,examples:[`hex(240)`],seealso:[`bin`,`oct`]},isNaN:{name:`isNaN`,category:`Utils`,syntax:[`isNaN(x)`],description:`Test whether a value is NaN (not a number)`,examples:[`isNaN(2)`,`isNaN(0 / 0)`,`isNaN(NaN)`,`isNaN(Infinity)`],seealso:[`isNegative`,`isNumeric`,`isPositive`,`isZero`,`isFinite`,`isBounded`]},isBounded:{name:`isBounded`,category:`Utils`,syntax:[`isBounded(x)`],description:`Test whether a value or its entries are bounded.`,examples:[`isBounded(Infinity)`,`isBounded(bigint(3))`,`isBounded([3, -Infinity, -3])`],seealso:[`isFinite`,`isNumeric`,`isNaN`,`isNegative`,`isPositive`]},isFinite:{name:`isFinite`,category:`Utils`,syntax:[`isFinite(x)`],description:`Test whether a value is finite, elementwise on collections.`,examples:[`isFinite(Infinity)`,`isFinite(bigint(3))`,`isFinite([3, -Infinity, -3])`],seealso:[`isBounded`,`isNumeric`,`isNaN`,`isNegative`,`isPositive`]},isInteger:{name:`isInteger`,category:`Utils`,syntax:[`isInteger(x)`],description:`Test whether a value is an integer number.`,examples:[`isInteger(2)`,`isInteger(3.5)`,`isInteger([3, 0.5, -2])`],seealso:[`isNegative`,`isNumeric`,`isPositive`,`isZero`]},isNegative:{name:`isNegative`,category:`Utils`,syntax:[`isNegative(x)`],description:`Test whether a value is negative: smaller than zero.`,examples:[`isNegative(2)`,`isNegative(0)`,`isNegative(-4)`,`isNegative([3, 0.5, -2])`],seealso:[`isInteger`,`isNumeric`,`isPositive`,`isZero`]},isNumeric:{name:`isNumeric`,category:`Utils`,syntax:[`isNumeric(x)`],description:`Test whether a value is a numeric value. Returns true when the input is a number, BigNumber, Fraction, or boolean.`,examples:[`isNumeric(2)`,`isNumeric("2")`,`hasNumericValue("2")`,`isNumeric(0)`,`isNumeric(bignumber(500))`,`isNumeric(fraction(0.125))`,`isNumeric(2 + 3i)`,`isNumeric([2.3, "foo", false])`],seealso:[`isInteger`,`isZero`,`isNegative`,`isPositive`,`isNaN`,`hasNumericValue`,`isFinite`,`isBounded`]},hasNumericValue:{name:`hasNumericValue`,category:`Utils`,syntax:[`hasNumericValue(x)`],description:`Test whether a value is an numeric value. In case of a string, true is returned if the string contains a numeric value.`,examples:[`hasNumericValue(2)`,`hasNumericValue("2")`,`isNumeric("2")`,`hasNumericValue(0)`,`hasNumericValue(bignumber(500))`,`hasNumericValue(fraction(0.125))`,`hasNumericValue(2 + 3i)`,`hasNumericValue([2.3, "foo", false])`],seealso:[`isInteger`,`isZero`,`isNegative`,`isPositive`,`isNaN`,`isNumeric`]},isPositive:{name:`isPositive`,category:`Utils`,syntax:[`isPositive(x)`],description:`Test whether a value is positive: larger than zero.`,examples:[`isPositive(2)`,`isPositive(0)`,`isPositive(-4)`,`isPositive([3, 0.5, -2])`],seealso:[`isInteger`,`isNumeric`,`isNegative`,`isZero`]},isPrime:{name:`isPrime`,category:`Utils`,syntax:[`isPrime(x)`],description:`Test whether a value is prime: has no divisors other than itself and one.`,examples:[`isPrime(3)`,`isPrime(-2)`,`isPrime([2, 17, 100])`],seealso:[`isInteger`,`isNumeric`,`isNegative`,`isZero`]},isZero:{name:`isZero`,category:`Utils`,syntax:[`isZero(x)`],description:`Test whether a value is zero.`,examples:[`isZero(2)`,`isZero(0)`,`isZero(-4)`,`isZero([3, 0, -2, 0])`],seealso:[`isInteger`,`isNumeric`,`isNegative`,`isPositive`]},print:{name:`print`,category:`Utils`,syntax:[`print(template, values)`,`print(template, values, precision)`],description:`Interpolate values into a string template.`,examples:[`print("Lucy is $age years old", {age: 5})`,`print("The value of pi is $pi", {pi: pi}, 3)`,`print("Hello, $user.name!", {user: {name: "John"}})`,`print("Values: $1, $2, $3", [6, 9, 4])`],seealso:[`format`]},typeOf:{name:`typeOf`,category:`Utils`,syntax:[`typeOf(x)`],description:`Get the type of a variable.`,examples:[`typeOf(3.5)`,`typeOf(2 - 4i)`,`typeOf(45 deg)`,`typeOf("hello world")`],seealso:[`getMatrixDataType`]},numeric:{name:`numeric`,category:`Utils`,syntax:[`numeric(x)`],description:`Convert a numeric input to a specific numeric type: number, BigNumber, bigint, or Fraction.`,examples:[`numeric("4")`,`numeric("4", "number")`,`numeric("4", "bigint")`,`numeric("4", "BigNumber")`,`numeric("4", "Fraction")`,`numeric(4, "Fraction")`,`numeric(fraction(2, 5), "number")`],seealso:[`number`,`bigint`,`fraction`,`bignumber`,`string`,`format`]}},UV=`help`,WV=K(UV,[`typed`,`mathWithTransform`,`Help`],e=>{var{typed:t,mathWithTransform:n,Help:r}=e;return t(UV,{any:function(e){var t,i=e;if(typeof e!=`string`){for(t in n)if(W(n,t)&&e===n[t]){i=t;break}}var a=bw(HV,i);if(!a){var o=typeof i==`function`?i.name:i;throw Error(`No documentation found on "`+o+`"`)}return new r(a)}})}),GV=`chain`,KV=K(GV,[`typed`,`Chain`],e=>{var{typed:t,Chain:n}=e;return t(GV,{"":function(){return new n},any:function(e){return new n(e)}})}),qV=`det`,JV=K(qV,[`typed`,`matrix`,`subtractScalar`,`multiply`,`divideScalar`,`isZero`,`unaryMinus`],e=>{var{typed:t,matrix:n,subtractScalar:r,multiply:i,divideScalar:a,isZero:o,unaryMinus:s}=e;return t(qV,{any:function(e){return CT(e)},"Array | Matrix":function(e){var t;switch(Hw(e)?t=e.size():Array.isArray(e)?(e=n(e),t=e.size()):t=[],t.length){case 0:return CT(e);case 1:if(t[0]===1)return CT(e.valueOf()[0]);if(t[0]===0)return 1;throw RangeError(`Matrix must be square (size: `+WO(t)+`)`);case 2:var r=t[0],i=t[1];if(r===i)return c(e.clone().valueOf(),r,i);if(i===0)return 1;throw RangeError(`Matrix must be square (size: `+WO(t)+`)`);default:throw RangeError(`Matrix must be two dimensional (size: `+WO(t)+`)`)}}});function c(e,t,n){if(t===1)return CT(e[0][0]);if(t===2)return r(i(e[0][0],e[1][1]),i(e[1][0],e[0][1]));for(var c=!1,l=Array(t).fill(0).map((e,t)=>t),u=0;u<t;u++){var d=l[u];if(o(e[d][u])){var f=void 0;for(f=u+1;f<t;f++)if(!o(e[l[f]][u])){d=l[f],l[f]=l[u],l[u]=d,c=!c;break}if(f===t)return e[d][u]}for(var p=e[d][u],m=u===0?1:e[l[u-1]][u-1],h=u+1;h<t;h++)for(var g=l[h],_=u+1;_<t;_++)e[g][_]=a(r(i(e[g][_],p),i(e[g][u],e[d][_])),m)}var v=e[l[t-1]][t-1];return c?s(v):v}}),YV=`inv`,XV=K(YV,[`typed`,`matrix`,`divideScalar`,`addScalar`,`multiply`,`unaryMinus`,`det`,`identity`,`abs`],e=>{var{typed:t,matrix:n,divideScalar:r,addScalar:i,multiply:a,unaryMinus:o,det:s,identity:c,abs:l}=e;return t(YV,{"Array | Matrix":function(e){var t=Hw(e)?e.size():ek(e);switch(t.length){case 1:if(t[0]===1)return Hw(e)?n([r(1,e.valueOf()[0])]):[r(1,e[0])];throw RangeError(`Matrix must be square (size: `+WO(t)+`)`);case 2:var i=t[0],a=t[1];if(i===a)return Hw(e)?n(u(e.valueOf(),i,a),e.storage()):u(e,i,a);throw RangeError(`Matrix must be square (size: `+WO(t)+`)`);default:throw RangeError(`Matrix must be two dimensional (size: `+WO(t)+`)`)}},any:function(e){return r(1,e)}});function u(e,t,n){var u,d,f,p,m;if(t===1){if(p=e[0][0],p===0)throw Error(`Cannot calculate inverse, determinant is zero`);return[[r(1,p)]]}else if(t===2){var h=s(e);if(h===0)throw Error(`Cannot calculate inverse, determinant is zero`);return[[r(e[1][1],h),r(o(e[0][1]),h)],[r(o(e[1][0]),h),r(e[0][0],h)]]}else{var g=e.concat();for(u=0;u<t;u++)g[u]=g[u].concat();for(var _=c(t).valueOf(),v=0;v<n;v++){var y=l(g[v][v]),b=v;for(u=v+1;u<t;)l(g[u][v])>y&&(y=l(g[u][v]),b=u),u++;if(y===0)throw Error(`Cannot calculate inverse, determinant is zero`);u=b,u!==v&&(m=g[v],g[v]=g[u],g[u]=m,m=_[v],_[v]=_[u],_[u]=m);var x=g[v],S=_[v];for(u=0;u<t;u++){var C=g[u],w=_[u];if(u!==v){if(C[v]!==0){for(f=r(o(C[v]),x[v]),d=v;d<n;d++)C[d]=i(C[d],a(f,x[d]));for(d=0;d<n;d++)w[d]=i(w[d],a(f,S[d]))}}else{for(f=x[v],d=v;d<n;d++)C[d]=r(C[d],f);for(d=0;d<n;d++)w[d]=r(w[d],f)}}}return _}}}),ZV=`pinv`,QV=K(ZV,[`typed`,`matrix`,`inv`,`deepEqual`,`equal`,`dotDivide`,`dot`,`ctranspose`,`divideScalar`,`multiply`,`add`,`Complex`],e=>{var{typed:t,matrix:n,inv:r,deepEqual:i,equal:a,dotDivide:o,dot:s,ctranspose:c,divideScalar:l,multiply:u,add:d,Complex:f}=e;return t(ZV,{"Array | Matrix":function(e){var t=Hw(e)?e.size():ek(e);switch(t.length){case 1:return _(e)?c(e):t[0]===1?r(e):o(c(e),s(e,e));case 2:if(_(e))return c(e);var i=t[0],a=t[1];if(i===a)try{return r(e)}catch(e){if(!(e instanceof Error&&e.message.match(/Cannot calculate inverse, determinant is zero/)))throw e}return Hw(e)?n(p(e.valueOf(),i,a),e.storage()):p(e,i,a);default:throw RangeError(`Matrix must be two dimensional (size: `+WO(t)+`)`)}},any:function(e){return a(e,0)?CT(e):l(1,e)}});function p(e,t,n){var{C:i,F:a}=h(e,t,n),o=u(r(u(c(i),i)),c(i));return u(u(c(a),r(u(a,c(a)))),o)}function m(e,t,n){for(var r=CT(e),i=0,a=0;a<t;a++){if(n<=i)return r;for(var s=a;g(r[s][i]);)if(s++,t===s&&(s=a,i++,n===i))return r;[r[s],r[a]]=[r[a],r[s]];for(var c=r[a][i],l=0;l<n;l++)r[a][l]=o(r[a][l],c);for(var f=0;f<t;f++)if(f!==a){c=r[f][i];for(var p=0;p<n;p++)r[f][p]=d(r[f][p],u(-1,u(c,r[a][p])))}i++}return r}function h(e,t,n){var r=m(e,t,n);return{C:e.map((e,n)=>e.filter((e,n)=>n<t&&!g(s(r[n],r[n])))),F:r.filter((e,t)=>!g(s(r[t],r[t])))}}function g(e){return a(d(e,f(1,1)),d(0,f(1,1)))}function _(e){return i(d(e,f(1,1)),d(u(e,0),f(1,1)))}});function $V(e){var{addScalar:t,subtract:n,flatten:r,multiply:i,multiplyScalar:a,divideScalar:o,sqrt:s,abs:c,bignumber:l,diag:u,size:d,reshape:f,inv:p,qr:m,usolve:h,usolveAll:g,equal:_,complex:v,larger:y,smaller:b,matrixFromColumns:x,dot:S}=e;function C(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=w(e,t,n,r,i);T(e,t,n,r,i,a);var{values:o,C:s}=E(e,t,n,r,i);return i?{values:o,eigenvectors:D(e,t,s,a,o,n,r)}:{values:o}}function w(e,n,r,i,s){var d=i===`BigNumber`,f=i===`Complex`,p=d?l(0):0,m=d?l(1):f?v(1):1,h=d?l(1):1,g=d?l(10):2,x=a(g,g),S;s&&(S=Array(n).fill(m));for(var C=!1;!C;){C=!0;for(var w=0;w<n;w++){for(var T=p,E=p,D=0;D<n;D++)w!==D&&(T=t(T,c(e[D][w])),E=t(E,c(e[w][D])));if(!_(T,0)&&!_(E,0)){for(var O=h,k=T,A=o(E,g),j=a(E,g);b(k,A);)k=a(k,x),O=a(O,g);for(;y(k,j);)k=o(k,x),O=o(O,g);if(b(o(t(k,E),O),a(t(T,E),.95))){C=!1;for(var M=o(1,O),N=0;N<n;N++)w!==N&&(e[w][N]=a(e[w][N],M),e[N][w]=a(e[N][w],O));s&&(S[w]=a(S[w],M))}}}}return s?u(S):null}function T(e,r,i,s,u,d){var f=s===`BigNumber`,p=f?l(0):s===`Complex`?v(0):0;f&&(i=l(i));for(var m=0;m<r-2;m++){for(var h=0,g=p,_=m+1;_<r;_++){var y=e[_][m];b(c(g),c(y))&&(g=y,h=_)}if(!b(c(g),i)){if(h!==m+1){var x=e[h];e[h]=e[m+1],e[m+1]=x;for(var S=0;S<r;S++){var C=e[S][h];e[S][h]=e[S][m+1],e[S][m+1]=C}if(u){var w=d[h];d[h]=d[m+1],d[m+1]=w}}for(var T=m+2;T<r;T++){var E=o(e[T][m],g);if(E!==0){for(var D=0;D<r;D++)e[T][D]=n(e[T][D],a(E,e[m+1][D]));for(var O=0;O<r;O++)e[O][m+1]=t(e[O][m+1],a(E,e[O][T]));if(u)for(var k=0;k<r;k++)d[T][k]=n(d[T][k],a(E,d[m+1][k]))}}}}return d}function E(e,r,a,o,s){var d=o===`BigNumber`,f=d?l(1):o===`Complex`?v(1):1;d&&(a=l(a));for(var p=CT(e),h=[],g=r,_=[],y=s?u(Array(r).fill(f)):void 0,x=s?u(Array(g).fill(f)):void 0,S=0;S<=100;){S+=1;for(var C=p[g-1][g-1],w=0;w<g;w++)p[w][w]=n(p[w][w],C);var{Q:T,R:E}=m(p);p=i(E,T);for(var D=0;D<g;D++)p[D][D]=t(p[D][D],C);if(s&&(x=i(x,T)),g===1||b(c(p[g-1][g-2]),a)){S=0,h.push(p[g-1][g-1]),s&&(_.unshift([[1]]),A(x,r),y=i(y,x),g>1&&(x=u(Array(g-1).fill(f)))),--g,p.pop();for(var M=0;M<g;M++)p[M].pop()}else if(g===2||b(c(p[g-2][g-3]),a)){S=0;var N=O(p[g-2][g-2],p[g-2][g-1],p[g-1][g-2],p[g-1][g-1]);h.push(...N),s&&(_.unshift(k(p[g-2][g-2],p[g-2][g-1],p[g-1][g-2],p[g-1][g-1],N[0],N[1],a,o)),A(x,r),y=i(y,x),g>2&&(x=u(Array(g-2).fill(f)))),g-=2,p.pop(),p.pop();for(var ee=0;ee<g;ee++)p[ee].pop(),p[ee].pop()}if(g===0)break}if(h.sort((e,t)=>+n(c(e),c(t))),S>100){var P=Error(`The eigenvalues failed to converge. Only found these eigenvalues: `+h.join(`, `));throw P.values=h,P.vectors=[],P}return{values:h,C:s?i(y,j(_,r)):void 0}}function D(e,t,a,o,s,c,d){var f=i(p(a),e,a),m=d===`BigNumber`,h=d===`Complex`,y=m?l(0):h?v(0):0,b=m?l(1):h?v(1):1,x=[],S=[];for(var C of s){var w=M(x,C,_);w===-1?(x.push(C),S.push(1)):S[w]+=1}for(var T=[],E=x.length,D=Array(t).fill(y),O=u(Array(t).fill(b)),k=function(){var e=x[A],s=n(f,i(e,O)),l=g(s,D);for(l.shift();l.length<S[A];){var u=N(s,t,l,c,d);if(u===null)break;l.push(u)}var m=i(p(o),a);l=l.map(e=>i(m,e)),T.push(...l.map(t=>({value:e,vector:r(t)})))},A=0;A<E;A++)k();return T}function O(e,r,i,o){var c=t(e,o),l=n(a(e,o),a(r,i)),u=a(c,.5),d=a(s(n(a(c,c),a(4,l))),.5);return[t(u,d),n(u,d)]}function k(e,t,r,i,a,o,s,u){var d=u===`BigNumber`,f=u===`Complex`,p=d?l(0):f?v(0):0,m=d?l(1):f?v(1):1;if(b(c(r),s))return[[m,p],[p,m]];if(y(c(n(a,o)),s))return[[n(a,i),n(o,i)],[r,r]];var h=n(e,a),g=n(i,a);return b(c(t),s)&&b(c(g),s)?[[h,m],[r,p]]:[[t,p],[g,m]]}function A(e,t){for(var n=0;n<e.length;n++)e[n].push(...Array(t-e[n].length).fill(0));for(var r=e.length;r<t;r++)e.push(Array(t).fill(0)),e[r][r]=1;return e}function j(e,t){for(var n=[],r=0;r<t;r++)n[r]=Array(t).fill(0);var i=0;for(var a of e){for(var o=a.length,s=0;s<o;s++)for(var c=0;c<o;c++)n[i+s][i+c]=a[s][c];i+=o}return n}function M(e,t,n){for(var r=0;r<e.length;r++)if(n(e[r],t))return r;return-1}function N(e,t,n,r,i){for(var a=i===`BigNumber`?l(1e3):1e3,o,s=0;s<5;++s){o=ee(t,n,i);try{o=h(e,o)}catch{continue}if(y(te(o),a))break}if(s>=5)return null;for(s=0;;){var c=h(e,o);if(b(te(P(o,[c])),r))break;if(++s>=10)return null;o=ne(c)}return o}function ee(e,t,n){var r=n===`BigNumber`,i=n===`Complex`,a=Array(e).fill(0).map(e=>2*Math.random()-1);return r&&(a=a.map(e=>l(e))),i&&(a=a.map(e=>v(e))),a=P(a,t),ne(a,n)}function P(e,t){var r=d(e);for(var a of t)a=f(a,r),e=n(e,i(o(S(a,e),S(a,a)),a));return e}function te(e){return c(s(S(e,e)))}function ne(e,t){return i(o(t===`BigNumber`?l(1):t===`Complex`?v(1):1,te(e)),e)}return C}function eH(e){var{config:t,addScalar:n,subtract:r,abs:i,atan:a,cos:o,sin:s,multiplyScalar:c,inv:l,bignumber:u,multiply:d,add:f}=e;function p(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.relTol,i=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0;if(i===`number`)return m(e,r,a);if(i===`BigNumber`)return h(e,r,a);throw TypeError(`Unsupported data type: `+i)}function m(e,t,n){var r=e.length,i=Math.abs(t/r),a,o;if(n){o=Array(r);for(var s=0;s<r;s++)o[s]=Array(r).fill(0),o[s][s]=1}for(var c=S(e);Math.abs(c[1])>=Math.abs(i);){var l=c[0][0],u=c[0][1];a=g(e[l][l],e[u][u],e[l][u]),e=x(e,a,l,u),n&&(o=v(o,a,l,u)),c=S(e)}for(var d=Array(r).fill(0),f=0;f<r;f++)d[f]=e[f][f];return w(CT(d),o,n)}function h(e,t,n){var r=e.length,a=i(t/r),o,s;if(n){s=Array(r);for(var c=0;c<r;c++)s[c]=Array(r).fill(0),s[c][c]=1}for(var l=C(e);i(l[1])>=i(a);){var u=l[0][0],d=l[0][1];o=_(e[u][u],e[d][d],e[u][d]),e=b(e,o,u,d),n&&(s=y(s,o,u,d)),l=C(e)}for(var f=Array(r).fill(0),p=0;p<r;p++)f[p]=e[p][p];return w(CT(f),s,n)}function g(e,n,r){var i=n-e;return Math.abs(i)<=t.relTol?Math.PI/4:.5*Math.atan(2*r/(n-e))}function _(e,n,o){var s=r(n,e);return i(s)<=t.relTol?u(-1).acos().div(4):c(.5,a(d(2,o,l(s))))}function v(e,t,n,r){for(var i=e.length,a=Math.cos(t),o=Math.sin(t),s=Array(i).fill(0),c=Array(i).fill(0),l=0;l<i;l++)s[l]=a*e[l][n]-o*e[l][r],c[l]=o*e[l][n]+a*e[l][r];for(var u=0;u<i;u++)e[u][n]=s[u],e[u][r]=c[u];return e}function y(e,t,i,a){for(var l=e.length,d=o(t),f=s(t),p=Array(l).fill(u(0)),m=Array(l).fill(u(0)),h=0;h<l;h++)p[h]=r(c(d,e[h][i]),c(f,e[h][a])),m[h]=n(c(f,e[h][i]),c(d,e[h][a]));for(var g=0;g<l;g++)e[g][i]=p[g],e[g][a]=m[g];return e}function b(e,t,i,a){for(var l=e.length,p=u(o(t)),m=u(s(t)),h=c(p,p),g=c(m,m),_=Array(l).fill(u(0)),v=Array(l).fill(u(0)),y=d(u(2),p,m,e[i][a]),b=n(r(c(h,e[i][i]),y),c(g,e[a][a])),x=f(c(g,e[i][i]),y,c(h,e[a][a])),S=0;S<l;S++)_[S]=r(c(p,e[i][S]),c(m,e[a][S])),v[S]=n(c(m,e[i][S]),c(p,e[a][S]));e[i][i]=b,e[a][a]=x,e[i][a]=u(0),e[a][i]=u(0);for(var C=0;C<l;C++)C!==i&&C!==a&&(e[i][C]=_[C],e[C][i]=_[C],e[a][C]=v[C],e[C][a]=v[C]);return e}function x(e,t,n,r){for(var i=e.length,a=Math.cos(t),o=Math.sin(t),s=a*a,c=o*o,l=Array(i).fill(0),u=Array(i).fill(0),d=s*e[n][n]-2*a*o*e[n][r]+c*e[r][r],f=c*e[n][n]+2*a*o*e[n][r]+s*e[r][r],p=0;p<i;p++)l[p]=a*e[n][p]-o*e[r][p],u[p]=o*e[n][p]+a*e[r][p];e[n][n]=d,e[r][r]=f,e[n][r]=0,e[r][n]=0;for(var m=0;m<i;m++)m!==n&&m!==r&&(e[n][m]=l[m],e[m][n]=l[m],e[r][m]=u[m],e[m][r]=u[m]);return e}function S(e){for(var t=e.length,n=0,r=[0,1],i=0;i<t;i++)for(var a=i+1;a<t;a++)Math.abs(n)<Math.abs(e[i][a])&&(n=Math.abs(e[i][a]),r=[i,a]);return[r,n]}function C(e){for(var t=e.length,n=0,r=[0,1],a=0;a<t;a++)for(var o=a+1;o<t;o++)i(n)<i(e[a][o])&&(n=i(e[a][o]),r=[a,o]);return[r,n]}function w(e,t,n){var r=e.length,a=Array(r),o;if(n){o=Array(r);for(var s=0;s<r;s++)o[s]=Array(r)}for(var c=0;c<r;c++){for(var l=0,u=e[0],d=0;d<e.length;d++)i(e[d])<i(u)&&(l=d,u=e[l]);if(a[c]=e.splice(l,1)[0],n)for(var f=0;f<r;f++)o[c][f]=t[f][l],t[f].splice(l,1)}return n?{values:a,eigenvectors:o.map((e,t)=>({value:a[t],vector:e}))}:{values:a}}return p}var tH=K(`eigs`,`config.typed.matrix.addScalar.equal.subtract.abs.atan.cos.sin.multiplyScalar.divideScalar.inv.bignumber.multiply.add.larger.column.flatten.number.complex.sqrt.diag.size.reshape.qr.usolve.usolveAll.im.re.smaller.matrixFromColumns.dot`.split(`.`),e=>{var{config:t,typed:n,matrix:r,addScalar:i,subtract:a,equal:o,abs:s,atan:c,cos:l,sin:u,multiplyScalar:d,divideScalar:f,inv:p,bignumber:m,multiply:h,add:g,larger:_,column:v,flatten:y,number:b,complex:x,sqrt:S,diag:C,size:w,reshape:T,qr:E,usolve:D,usolveAll:O,im:k,re:A,smaller:j,matrixFromColumns:M,dot:N}=e,ee=eH({config:t,addScalar:i,subtract:a,column:v,flatten:y,equal:o,abs:s,atan:c,cos:l,sin:u,multiplyScalar:d,inv:p,bignumber:m,complex:x,multiply:h,add:g}),P=$V({config:t,addScalar:i,subtract:a,multiply:h,multiplyScalar:d,flatten:y,divideScalar:f,sqrt:S,abs:s,bignumber:m,diag:C,size:w,reshape:T,qr:E,inv:p,usolve:D,usolveAll:O,equal:o,complex:x,larger:_,smaller:j,matrixFromColumns:M,dot:N});return n(`eigs`,{Array:function(e){return te(r(e))},"Array, number|BigNumber":function(e,t){return te(r(e),{precision:t})},"Array, Object"(e,t){return te(r(e),t)},Matrix:function(e){return te(e,{matricize:!0})},"Matrix, number|BigNumber":function(e,t){return te(e,{precision:t,matricize:!0})},"Matrix, Object":function(e,t){var n={matricize:!0};return vw(n,t),te(e,n)}});function te(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=`eigenvectors`in n?n.eigenvectors:!0,a=ne(e,n.precision??t.relTol,i);return n.matricize&&(a.values=r(a.values),i&&(a.eigenvectors=a.eigenvectors.map(e=>{var{value:t,vector:n}=e;return{value:t,vector:r(n)}}))),i&&Object.defineProperty(a,`vectors`,{enumerable:!1,get:()=>{throw Error(`eigs(M).vectors replaced with eigs(M).eigenvectors`)}}),a}function ne(e,t,n){var r=e.toArray(),i=e.size();if(i.length!==2||i[0]!==i[1])throw RangeError(`Matrix must be square (size: ${WO(i)})`);var a=i[0];return F(r,a,t)&&(ie(r,a),re(r,a,t))?ee(r,a,t,I(e,r,a),n):P(r,a,t,I(e,r,a),n)}function re(e,t,n){for(var r=0;r<t;r++)for(var i=r;i<t;i++)if(_(m(s(a(e[r][i],e[i][r]))),n))return!1;return!0}function F(e,t,n){for(var r=0;r<t;r++)for(var i=0;i<t;i++)if(_(m(s(k(e[r][i]))),n))return!1;return!0}function ie(e,t){for(var n=0;n<t;n++)for(var r=0;r<t;r++)e[n][r]=A(e[n][r])}function I(e,t,n){var r=e.datatype();if(r===`number`||r===`BigNumber`||r===`Complex`)return r;for(var i=!1,a=!1,o=!1,s=0;s<n;s++)for(var c=0;c<n;c++){var l=t[s][c];if(Pw(l)||Rw(l))i=!0;else if(Fw(l))a=!0;else if(Lw(l))o=!0;else throw TypeError(`Unsupported type in Matrix: `+ST(l))}if(a&&o&&console.warn(`Complex BigNumbers not supported, this operation will lose precission.`),o){for(var u=0;u<n;u++)for(var d=0;d<n;d++)t[u][d]=x(t[u][d]);return`Complex`}if(a){for(var f=0;f<n;f++)for(var p=0;p<n;p++)t[f][p]=m(t[f][p]);return`BigNumber`}if(i){for(var h=0;h<n;h++)for(var g=0;g<n;g++)t[h][g]=b(t[h][g]);return`number`}else throw TypeError(`Matrix contains unsupported types only.`)}}),nH=`expm`,rH=K(nH,[`typed`,`abs`,`add`,`identity`,`inv`,`multiply`],e=>{var{typed:t,abs:n,add:r,identity:i,inv:a,multiply:o}=e;return t(nH,{Matrix:function(e){var t=e.size();if(t.length!==2||t[0]!==t[1])throw RangeError(`Matrix must be square (size: `+WO(t)+`)`);for(var n=t[0],l=c(s(e),1e-15),u=l.q,d=l.j,f=o(e,2**-d),p=i(n),m=i(n),h=1,g=f,_=-1,v=1;v<=u;v++)v>1&&(g=o(g,f),_=-_),h=h*(u-v+1)/((2*u-v+1)*v),p=r(p,o(h,g)),m=r(m,o(h*_,g));for(var y=o(a(m),p),b=0;b<d;b++)y=o(y,y);return Gw(e)?e.createSparseMatrix(y):y}});function s(e){for(var t=e.size()[0],r=0,i=0;i<t;i++){for(var a=0,o=0;o<t;o++)a+=n(e.get([i,o]));r=Math.max(a,r)}return r}function c(e,t){for(var n=30,r=0;r<n;r++)for(var i=0;i<=r;i++){var a=r-i;if(l(e,i,a)<t)return{q:i,j:a}}throw Error(`Could not find acceptable parameters to compute the matrix exponential (try increasing maxSearchSize in expm.js)`)}function l(e,t,n){for(var r=1,i=2;i<=t;i++)r*=i;for(var a=r,o=t+1;o<=2*t;o++)a*=o;var s=a*(2*t+1);return 8*(e/2**n)**(2*t)*r*r/(a*s)}}),iH=`sqrtm`,aH=K(iH,[`typed`,`abs`,`add`,`multiply`,`map`,`sqrt`,`subtract`,`inv`,`size`,`max`,`identity`],e=>{var{typed:t,abs:n,add:r,multiply:i,map:a,sqrt:o,subtract:s,inv:c,size:l,max:u,identity:d}=e,f=1e3,p=1e-6;function m(e){var t,a=0,o=e,m=d(l(e));do{var h=o;if(o=i(.5,r(h,c(m))),m=i(.5,r(m,c(h))),t=u(n(s(o,h))),t>p&&++a>f)throw Error(`computing square root of matrix: iterative method could not converge`)}while(t>p);return o}return t(iH,{"Array | Matrix":function(e){var t=Hw(e)?e.size():ek(e);switch(t.length){case 1:if(t[0]===1)return a(e,o);throw RangeError(`Matrix must be square (size: `+WO(t)+`)`);case 2:if(t[0]===t[1])return m(e);throw RangeError(`Matrix must be square (size: `+WO(t)+`)`);default:throw RangeError(`Matrix must be at most two dimensional (size: `+WO(t)+`)`)}}})}),oH=`sylvester`,sH=K(oH,[`typed`,`schur`,`matrixFromColumns`,`matrix`,`multiply`,`range`,`concat`,`transpose`,`index`,`subset`,`add`,`subtract`,`identity`,`lusolve`,`abs`],e=>{var{typed:t,schur:n,matrixFromColumns:r,matrix:i,multiply:a,range:o,concat:s,transpose:c,index:l,subset:u,add:d,subtract:f,identity:p,lusolve:m,abs:h,config:g}=e;return t(oH,{"Matrix, Matrix, Matrix":_,"Array, Matrix, Matrix":function(e,t,n){return _(i(e),t,n)},"Array, Array, Matrix":function(e,t,n){return _(i(e),i(t),n)},"Array, Matrix, Array":function(e,t,n){return _(i(e),t,i(n))},"Matrix, Array, Matrix":function(e,t,n){return _(e,i(t),n)},"Matrix, Array, Array":function(e,t,n){return _(e,i(t),i(n))},"Matrix, Matrix, Array":function(e,t,n){return _(e,t,i(n))},"Array, Array, Array":function(e,t,n){return _(i(e),i(t),i(n)).toArray()}});function _(e,t,g){for(var _=t.size()[0],v=e.size()[0],y=n(e),b=y.T,x=y.U,S=n(a(-1,t)),C=S.T,w=S.U,T=a(a(c(x),g),w),E=o(0,v),D=[],O=(e,t)=>s(e,t,1),k=(e,t)=>s(e,t,0),A=0;A<_;A++)if(A<_-1&&h(u(C,l(A+1,A)))>1e-5){for(var j=k(u(T,l(E,[A])),u(T,l(E,[A+1]))),M=0;M<A;M++)j=d(j,k(a(D[M],u(C,l(M,A))),a(D[M],u(C,l(M,A+1)))));var N=a(p(v),a(-1,u(C,l(A,A)))),ee=a(p(v),a(-1,u(C,l(A+1,A)))),P=a(p(v),a(-1,u(C,l(A,A+1)))),te=a(p(v),a(-1,u(C,l(A+1,A+1)))),ne=m(k(O(d(b,N),ee),O(P,d(b,te))),j);D[A]=ne.subset(l(o(0,v),[0])),D[A+1]=ne.subset(l(o(v,2*v),[0])),A++}else{for(var re=u(T,l(E,[A])),F=0;F<A;F++)re=d(re,a(D[F],u(C,l(F,A))));D[A]=m(f(b,a(u(C,l(A,A)),p(v))),re)}return a(x,a(i(r(...D)),c(w)))}}),cH=`schur`,lH=K(cH,[`typed`,`matrix`,`identity`,`multiply`,`qr`,`norm`,`subtract`],e=>{var{typed:t,matrix:n,identity:r,multiply:i,qr:a,norm:o,subtract:s}=e;return t(cH,{Array:function(e){var t=c(n(e));return{U:t.U.valueOf(),T:t.T.valueOf()}},Matrix:function(e){return c(e)}});function c(e){var t=e.size()[0],n=e,c=r(t),l=0,u;do{u=n;var d=a(n),f=d.Q,p=d.R;if(n=i(p,f),c=i(c,f),l++>100)break}while(o(s(n,u))>1e-4);return{U:c,T:n}}}),uH=`lyap`,dH=K(uH,[`typed`,`matrix`,`sylvester`,`multiply`,`transpose`],e=>{var{typed:t,matrix:n,sylvester:r,multiply:i,transpose:a}=e;return t(uH,{"Matrix, Matrix":function(e,t){return r(e,a(e),i(-1,t))},"Array, Matrix":function(e,t){return r(n(e),a(n(e)),i(-1,t))},"Matrix, Array":function(e,t){return r(e,a(n(e)),n(i(-1,t)))},"Array, Array":function(e,t){return r(n(e),a(n(e)),n(i(-1,t))).toArray()}})}),fH=K(`divide`,[`typed`,`matrix`,`multiply`,`equalScalar`,`divideScalar`,`inv`],e=>{var{typed:t,matrix:n,multiply:r,equalScalar:i,divideScalar:a,inv:o}=e,s=HM({typed:t,equalScalar:i}),c=WM({typed:t});return t(`divide`,TT({"Array | Matrix, Array | Matrix":function(e,t){return r(e,o(t))},"DenseMatrix, any":function(e,t){return c(e,t,a,!1)},"SparseMatrix, any":function(e,t){return s(e,t,a,!1)},"Array, any":function(e,t){return c(n(e),t,a,!1).valueOf()},"any, Array | Matrix":function(e,t){return r(e,o(t))}},a.signatures))}),pH=`distance`,mH=K(pH,[`typed`,`addScalar`,`subtractScalar`,`divideScalar`,`multiplyScalar`,`deepEqual`,`sqrt`,`abs`],e=>{var{typed:t,addScalar:n,subtractScalar:r,multiplyScalar:i,divideScalar:a,deepEqual:o,sqrt:s,abs:c}=e;return t(pH,{"Array, Array, Array":function(e,t,n){if(e.length===2&&t.length===2&&n.length===2){if(!u(e))throw TypeError(`Array with 2 numbers or BigNumbers expected for first argument`);if(!u(t))throw TypeError(`Array with 2 numbers or BigNumbers expected for second argument`);if(!u(n))throw TypeError(`Array with 2 numbers or BigNumbers expected for third argument`);if(o(t,n))throw TypeError(`LinePoint1 should not be same with LinePoint2`);var a=r(n[1],t[1]),s=r(t[0],n[0]),c=r(i(n[0],t[1]),i(t[0],n[1]));return g(e[0],e[1],a,s,c)}else throw TypeError(`Invalid Arguments: Try again`)},"Object, Object, Object":function(e,t,n){if(Object.keys(e).length===2&&Object.keys(t).length===2&&Object.keys(n).length===2){if(!u(e))throw TypeError(`Values of pointX and pointY should be numbers or BigNumbers`);if(!u(t))throw TypeError(`Values of lineOnePtX and lineOnePtY should be numbers or BigNumbers`);if(!u(n))throw TypeError(`Values of lineTwoPtX and lineTwoPtY should be numbers or BigNumbers`);if(o(m(t),m(n)))throw TypeError(`LinePoint1 should not be same with LinePoint2`);if(`pointX`in e&&`pointY`in e&&`lineOnePtX`in t&&`lineOnePtY`in t&&`lineTwoPtX`in n&&`lineTwoPtY`in n){var a=r(n.lineTwoPtY,t.lineOnePtY),s=r(t.lineOnePtX,n.lineTwoPtX),c=r(i(n.lineTwoPtX,t.lineOnePtY),i(t.lineOnePtX,n.lineTwoPtY));return g(e.pointX,e.pointY,a,s,c)}else throw TypeError(`Key names do not match`)}else throw TypeError(`Invalid Arguments: Try again`)},"Array, Array":function(e,t){if(e.length===2&&t.length===3){if(!u(e))throw TypeError(`Array with 2 numbers or BigNumbers expected for first argument`);if(!d(t))throw TypeError(`Array with 3 numbers or BigNumbers expected for second argument`);return g(e[0],e[1],t[0],t[1],t[2])}else if(e.length===3&&t.length===6){if(!d(e))throw TypeError(`Array with 3 numbers or BigNumbers expected for first argument`);if(!p(t))throw TypeError(`Array with 6 numbers or BigNumbers expected for second argument`);return _(e[0],e[1],e[2],t[0],t[1],t[2],t[3],t[4],t[5])}else if(e.length===t.length&&e.length>0){if(!f(e)||!f(t))throw TypeError(`All values of an array should be numbers or BigNumbers`);return v(e,t)}else throw TypeError(`Invalid Arguments: Try again`)},"Object, Object":function(e,t){if(Object.keys(e).length===2&&Object.keys(t).length===3){if(!u(e))throw TypeError(`Values of pointX and pointY should be numbers or BigNumbers`);if(!d(t))throw TypeError(`Values of xCoeffLine, yCoeffLine and constant should be numbers or BigNumbers`);if(`pointX`in e&&`pointY`in e&&`xCoeffLine`in t&&`yCoeffLine`in t&&`constant`in t)return g(e.pointX,e.pointY,t.xCoeffLine,t.yCoeffLine,t.constant);throw TypeError(`Key names do not match`)}else if(Object.keys(e).length===3&&Object.keys(t).length===6){if(!d(e))throw TypeError(`Values of pointX, pointY and pointZ should be numbers or BigNumbers`);if(!p(t))throw TypeError(`Values of x0, y0, z0, a, b and c should be numbers or BigNumbers`);if(`pointX`in e&&`pointY`in e&&`x0`in t&&`y0`in t&&`z0`in t&&`a`in t&&`b`in t&&`c`in t)return _(e.pointX,e.pointY,e.pointZ,t.x0,t.y0,t.z0,t.a,t.b,t.c);throw TypeError(`Key names do not match`)}else if(Object.keys(e).length===2&&Object.keys(t).length===2){if(!u(e))throw TypeError(`Values of pointOneX and pointOneY should be numbers or BigNumbers`);if(!u(t))throw TypeError(`Values of pointTwoX and pointTwoY should be numbers or BigNumbers`);if(`pointOneX`in e&&`pointOneY`in e&&`pointTwoX`in t&&`pointTwoY`in t)return v([e.pointOneX,e.pointOneY],[t.pointTwoX,t.pointTwoY]);throw TypeError(`Key names do not match`)}else if(Object.keys(e).length===3&&Object.keys(t).length===3){if(!d(e))throw TypeError(`Values of pointOneX, pointOneY and pointOneZ should be numbers or BigNumbers`);if(!d(t))throw TypeError(`Values of pointTwoX, pointTwoY and pointTwoZ should be numbers or BigNumbers`);if(`pointOneX`in e&&`pointOneY`in e&&`pointOneZ`in e&&`pointTwoX`in t&&`pointTwoY`in t&&`pointTwoZ`in t)return v([e.pointOneX,e.pointOneY,e.pointOneZ],[t.pointTwoX,t.pointTwoY,t.pointTwoZ]);throw TypeError(`Key names do not match`)}else throw TypeError(`Invalid Arguments: Try again`)},Array:function(e){if(!h(e))throw TypeError(`Incorrect array format entered for pairwise distance calculation`);return y(e)}});function l(e){return typeof e==`number`||Fw(e)}function u(e){return e.constructor!==Array&&(e=m(e)),l(e[0])&&l(e[1])}function d(e){return e.constructor!==Array&&(e=m(e)),l(e[0])&&l(e[1])&&l(e[2])}function f(e){return Array.isArray(e)||(e=m(e)),e.every(l)}function p(e){return e.constructor!==Array&&(e=m(e)),l(e[0])&&l(e[1])&&l(e[2])&&l(e[3])&&l(e[4])&&l(e[5])}function m(e){for(var t=Object.keys(e),n=[],r=0;r<t.length;r++)n.push(e[t[r]]);return n}function h(e){if(e[0].length===2&&l(e[0][0])&&l(e[0][1])){if(e.some(e=>e.length!==2||!l(e[0])||!l(e[1])))return!1}else if(e[0].length===3&&l(e[0][0])&&l(e[0][1])&&l(e[0][2])){if(e.some(e=>e.length!==3||!l(e[0])||!l(e[1])||!l(e[2])))return!1}else return!1;return!0}function g(e,t,r,o,l){return a(c(n(n(i(r,e),i(o,t)),l)),s(n(i(r,r),i(o,o))))}function _(e,t,o,c,l,u,d,f,p){var m=[r(i(r(l,t),p),i(r(u,o),f)),r(i(r(u,o),d),i(r(c,e),p)),r(i(r(c,e),f),i(r(l,t),d))];m=s(n(n(i(m[0],m[0]),i(m[1],m[1])),i(m[2],m[2])));var h=s(n(n(i(d,d),i(f,f)),i(p,p)));return a(m,h)}function v(e,t){for(var a=e.length,o=0,c=0,l=0;l<a;l++)c=r(e[l],t[l]),o=n(i(c,c),o);return s(o)}function y(e){for(var t=[],n=[],r=[],i=0;i<e.length-1;i++)for(var a=i+1;a<e.length;a++)e[0].length===2?(n=[e[i][0],e[i][1]],r=[e[a][0],e[a][1]]):e[0].length===3&&(n=[e[i][0],e[i][1],e[i][2]],r=[e[a][0],e[a][1],e[a][2]]),t.push(v(n,r));return t}}),hH=K(`intersect`,[`typed`,`config`,`abs`,`add`,`addScalar`,`matrix`,`multiply`,`multiplyScalar`,`divideScalar`,`subtract`,`smaller`,`equalScalar`,`flatten`,`isZero`,`isNumeric`],e=>{var{typed:t,config:n,abs:r,add:i,addScalar:a,matrix:o,multiply:s,multiplyScalar:c,divideScalar:l,subtract:u,smaller:d,equalScalar:f,flatten:p,isZero:m,isNumeric:h}=e;return t(`intersect`,{"Array, Array, Array":g,"Array, Array, Array, Array":_,"Matrix, Matrix, Matrix":function(e,t,n){var r=g(e.valueOf(),t.valueOf(),n.valueOf());return r===null?null:o(r)},"Matrix, Matrix, Matrix, Matrix":function(e,t,n,r){var i=_(e.valueOf(),t.valueOf(),n.valueOf(),r.valueOf());return i===null?null:o(i)}});function g(e,t,n){if(e=v(e),t=v(t),n=v(n),!b(e))throw TypeError(`Array with 3 numbers or BigNumbers expected for first argument`);if(!b(t))throw TypeError(`Array with 3 numbers or BigNumbers expected for second argument`);if(!x(n))throw TypeError(`Array with 4 numbers expected as third argument`);return T(e[0],e[1],e[2],t[0],t[1],t[2],n[0],n[1],n[2],n[3])}function _(e,t,n,r){if(e=v(e),t=v(t),n=v(n),r=v(r),e.length===2){if(!y(e))throw TypeError(`Array with 2 numbers or BigNumbers expected for first argument`);if(!y(t))throw TypeError(`Array with 2 numbers or BigNumbers expected for second argument`);if(!y(n))throw TypeError(`Array with 2 numbers or BigNumbers expected for third argument`);if(!y(r))throw TypeError(`Array with 2 numbers or BigNumbers expected for fourth argument`);return S(e,t,n,r)}else if(e.length===3){if(!b(e))throw TypeError(`Array with 3 numbers or BigNumbers expected for first argument`);if(!b(t))throw TypeError(`Array with 3 numbers or BigNumbers expected for second argument`);if(!b(n))throw TypeError(`Array with 3 numbers or BigNumbers expected for third argument`);if(!b(r))throw TypeError(`Array with 3 numbers or BigNumbers expected for fourth argument`);return w(e[0],e[1],e[2],t[0],t[1],t[2],n[0],n[1],n[2],r[0],r[1],r[2])}else throw TypeError(`Arrays with two or thee dimensional points expected`)}function v(e){return e.length===1?e[0]:e.length>1&&Array.isArray(e[0])&&e.every(e=>Array.isArray(e)&&e.length===1)?p(e):e}function y(e){return e.length===2&&h(e[0])&&h(e[1])}function b(e){return e.length===3&&h(e[0])&&h(e[1])&&h(e[2])}function x(e){return e.length===4&&h(e[0])&&h(e[1])&&h(e[2])&&h(e[3])}function S(e,t,o,f){var p=e,h=o,g=u(p,t),_=u(h,f),v=u(c(g[0],_[1]),c(_[0],g[1]));if(m(v)||d(r(v),n.relTol))return null;var y=c(_[0],p[1]),b=c(_[1],p[0]),x=c(_[0],h[1]),S=c(_[1],h[0]);return i(s(g,l(a(u(u(y,b),x),S),v)),p)}function C(e,t,n,r,i,o,s,l,d,f,p,m){var h=c(u(e,t),u(n,r)),g=c(u(i,o),u(s,l)),_=c(u(d,f),u(p,m));return a(a(h,g),_)}function w(e,t,n,r,i,o,s,d,p,h,g,_){var v=C(e,s,h,s,t,d,g,d,n,p,_,p),y=C(h,s,r,e,g,d,i,t,_,p,o,n),b=C(e,s,r,e,t,d,i,t,n,p,o,n),x=C(h,s,h,s,g,d,g,d,_,p,_,p),S=C(r,e,r,e,i,t,i,t,o,n,o,n),w=u(c(v,y),c(b,x)),T=u(c(S,x),c(y,y));if(m(T))return null;var E=l(w,T),D=l(a(v,c(E,y)),x),O=a(e,c(E,u(r,e))),k=a(t,c(E,u(i,t))),A=a(n,c(E,u(o,n))),j=a(s,c(D,u(h,s))),M=a(d,c(D,u(g,d))),N=a(p,c(D,u(_,p)));return f(O,j)&&f(k,M)&&f(A,N)?[O,k,A]:null}function T(e,t,n,r,i,o,s,d,f,p){var m=c(e,s),h=c(r,s),g=c(t,d),_=c(i,d),v=c(n,f),y=c(o,f),b=l(u(u(u(p,m),g),v),u(u(u(a(a(h,_),y),m),g),v));return[a(e,c(b,u(r,e))),a(t,c(b,u(i,t))),a(n,c(b,u(o,n)))]}}),gH=`sum`,_H=K(gH,[`typed`,`config`,`add`,`numeric`],e=>{var{typed:t,config:n,add:r,numeric:i}=e;return t(gH,{"Array | Matrix":a,"Array | Matrix, number | BigNumber":o,"...":function(e){if(Gk(e))throw TypeError(`Scalar values expected in function sum`);return a(e)}});function a(e){var t;return Kk(e,function(e){try{t=t===void 0?e:r(t,e)}catch(t){throw lI(t,`sum`,e)}}),t===void 0&&(t=i(0,n.number)),typeof t==`string`&&(t=i(t,FT(t,n))),t}function o(e,t){try{return Jk(e,t,r)}catch(e){throw lI(e,`sum`)}}}),vH=`cumsum`,yH=K(vH,[`typed`,`add`,`unaryPlus`],e=>{var{typed:t,add:n,unaryPlus:r}=e;return t(vH,{Array:i,Matrix:function(e){return e.create(i(e.valueOf(),e.datatype()))},"Array, number | BigNumber":o,"Matrix, number | BigNumber":function(e,t){return e.create(o(e.valueOf(),t),e.datatype())},"...":function(e){if(Gk(e))throw TypeError(`All values expected to be scalar in function cumsum`);return i(e)}});function i(e){try{return a(e)}catch(e){throw lI(e,vH)}}function a(e){if(e.length===0)return[];for(var t=[r(e[0])],i=1;i<e.length;++i)t.push(n(t[i-1],e[i]));return t}function o(e,t){var n=ek(e);if(t<0||t>=n.length)throw new $O(t,n.length);try{return s(e,t)}catch(e){throw lI(e,vH)}}function s(e,t){var n,r,i;if(t<=0){var o=e[0][0];if(Array.isArray(o)){for(i=Wk(e),r=[],n=0;n<i.length;n++)r[n]=s(i[n],t-1);return r}else return a(e)}else{for(r=[],n=0;n<e.length;n++)r[n]=s(e[n],t-1);return r}}}),bH=`mean`,xH=K(bH,[`typed`,`add`,`divide`],e=>{var{typed:t,add:n,divide:r}=e;return t(bH,{"Array | Matrix":a,"Array | Matrix, number | BigNumber":i,"...":function(e){if(Gk(e))throw TypeError(`Scalar values expected in function mean`);return a(e)}});function i(e,t){try{return r(Jk(e,t,n),(Array.isArray(e)?ek(e):e.size())[t])}catch(e){throw lI(e,`mean`)}}function a(e){var t,i=0;if(Kk(e,function(e){try{t=t===void 0?e:n(t,e),i++}catch(t){throw lI(t,`mean`,e)}}),i===0)throw Error(`Cannot calculate the mean of an empty array`);return r(t,i)}}),SH=`median`,CH=K(SH,[`typed`,`add`,`divide`,`compare`,`partitionSelect`],e=>{var{typed:t,add:n,divide:r,compare:i,partitionSelect:a}=e;function o(e){try{e=gk(e.valueOf());var t=e.length;if(t===0)throw Error(`Cannot calculate median of an empty array`);if(t%2==0){for(var n=t/2-1,r=a(e,n+1),o=e[n],l=0;l<n;++l)i(e[l],o)>0&&(o=e[l]);return c(o,r)}else return s(a(e,(t-1)/2))}catch(e){throw lI(e,`median`)}}var s=t({"number | BigNumber | Complex | Unit":function(e){return e}}),c=t({"number | BigNumber | Complex | Unit, number | BigNumber | Complex | Unit":function(e,t){return r(n(e,t),2)}});return t(SH,{"Array | Matrix":o,"Array | Matrix, number | BigNumber":function(e,t){throw Error(`median(A, dim) is not yet supported`)},"...":function(e){if(Gk(e))throw TypeError(`Scalar values expected in function median`);return o(e)}})}),wH=`mad`,TH=K(wH,[`typed`,`abs`,`map`,`median`,`subtract`],e=>{var{typed:t,abs:n,map:r,median:i,subtract:a}=e;return t(wH,{"Array | Matrix":o,"...":function(e){return o(e)}});function o(e){if(e=gk(e.valueOf()),e.length===0)throw Error(`Cannot calculate median absolute deviation (mad) of an empty array`);try{var t=i(e);return i(r(e,function(e){return n(a(e,t))}))}catch(e){throw e instanceof TypeError&&e.message.includes(`median`)?TypeError(e.message.replace(`median`,`mad`)):lI(e,`mad`)}}}),EH=`unbiased`,DH=`variance`,OH=K(DH,[`typed`,`add`,`subtract`,`multiply`,`divide`,`mapSlices`,`isNaN`],e=>{var{typed:t,add:n,subtract:r,multiply:i,divide:a,mapSlices:o,isNaN:s}=e;return t(DH,{"Array | Matrix":function(e){return c(e,EH)},"Array | Matrix, string":c,"Array | Matrix, number | BigNumber":function(e,t){return l(e,t,EH)},"Array | Matrix, number | BigNumber, string":l,"...":function(e){return c(e,EH)}});function c(e,t){var o,c=0;if(e.length===0)throw SyntaxError(`Function variance requires one or more parameters (0 provided)`);if(Kk(e,function(e){try{o=o===void 0?e:n(o,e),c++}catch(t){throw lI(t,`variance`,e)}}),c===0)throw Error(`Cannot calculate variance of an empty array`);var l=a(o,c);if(o=void 0,Kk(e,function(e){var t=r(e,l);o=o===void 0?i(t,t):n(o,i(t,t))}),s(o))return o;switch(t){case`uncorrected`:return a(o,c);case`biased`:return a(o,c+1);case`unbiased`:var u=Fw(o)?o.mul(0):0;return c===1?u:a(o,c-1);default:throw Error(`Unknown normalization "`+t+`". Choose "unbiased" (default), "uncorrected", or "biased".`)}}function l(e,t,n){try{if(e.length===0)throw SyntaxError(`Function variance requires one or more parameters (0 provided)`);return o(e,t,e=>c(e,n))}catch(e){throw lI(e,`variance`)}}}),kH=`quantileSeq`,AH=K(kH,[`typed`,`?bignumber`,`add`,`subtract`,`divide`,`multiply`,`partitionSelect`,`compare`,`isInteger`,`smaller`,`smallerEq`,`larger`,`mapSlices`],e=>{var{typed:t,bignumber:n,add:r,subtract:i,divide:a,multiply:o,partitionSelect:s,compare:c,isInteger:l,smaller:u,smallerEq:d,larger:f,mapSlices:p}=e;return t(kH,{"Array | Matrix, number | BigNumber":(e,t)=>h(e,t,!1),"Array | Matrix, number | BigNumber, number":(e,t,n)=>m(e,t,!1,n,h),"Array | Matrix, number | BigNumber, boolean":h,"Array | Matrix, number | BigNumber, boolean, number":(e,t,n,r)=>m(e,t,n,r,h),"Array | Matrix, Array | Matrix":(e,t)=>g(e,t,!1),"Array | Matrix, Array | Matrix, number":(e,t,n)=>m(e,t,!1,n,g),"Array | Matrix, Array | Matrix, boolean":g,"Array | Matrix, Array | Matrix, boolean, number":(e,t,n,r)=>m(e,t,n,r,g)});function m(e,t,n,r,i){return p(e,r,e=>i(e,t,n))}function h(e,t,i){var o,s=e.valueOf();if(u(t,0))throw Error(`N/prob must be non-negative`);if(d(t,1))return Pw(t)?_(s,t,i):n(_(s,t,i));if(f(t,1)){if(!l(t))throw Error(`N must be a positive integer`);if(f(t,4294967295))throw Error(`N must be less than or equal to 2^32-1, as that is the maximum length of an Array`);var c=r(t,1);o=[];for(var p=0;u(p,t);p++){var m=a(p+1,c);o.push(_(s,m,i))}return Pw(t)?o:n(o)}}function g(e,t,n){for(var r=e.valueOf(),i=t.valueOf(),a=[],o=0;o<i.length;++o)a.push(_(r,i[o],n));return a}function _(e,t,n){var a=gk(e),u=a.length;if(u===0)throw Error(`Cannot calculate quantile of an empty sequence`);var d=Pw(t)?t*(u-1):t.times(u-1),f=Pw(t)?Math.floor(d):d.floor().toNumber(),p=Pw(t)?d%1:d.minus(f);if(l(d))return n?a[d]:s(a,Pw(t)?d:d.valueOf());var m,h;if(n)m=a[f],h=a[f+1];else{h=s(a,f+1),m=a[f];for(var g=0;g<f;++g)c(a[g],m)>0&&(m=a[g])}return r(o(m,i(1,p)),o(h,p))}}),jH=`std`,MH=K(jH,[`typed`,`map`,`sqrt`,`variance`],e=>{var{typed:t,map:n,sqrt:r,variance:i}=e;return t(jH,{"Array | Matrix":a,"Array | Matrix, string":a,"Array | Matrix, number | BigNumber":a,"Array | Matrix, number | BigNumber, string":a,"...":function(e){return a(e)}});function a(e,t){if(e.length===0)throw SyntaxError(`Function std requires one or more parameters (0 provided)`);try{var a=i.apply(null,arguments);return Uw(a)?n(a,r):r(a)}catch(e){throw e instanceof TypeError&&e.message.includes(` variance`)?TypeError(e.message.replace(` variance`,` std`)):e}}}),NH=`corr`,PH=K(NH,[`typed`,`matrix`,`mean`,`sqrt`,`sum`,`add`,`subtract`,`multiply`,`pow`,`divide`],e=>{var{typed:t,matrix:n,sqrt:r,sum:i,add:a,subtract:o,multiply:s,pow:c,divide:l}=e;return t(NH,{"Array, Array":function(e,t){return u(e,t)},"Matrix, Matrix":function(e,t){var r=u(e.toArray(),t.toArray());return Array.isArray(r)?n(r):r}});function u(e,t){var n=[];if(Array.isArray(e[0])&&Array.isArray(t[0])){if(e.length!==t.length)throw SyntaxError(`Dimension mismatch. Array A and B must have the same length.`);for(var r=0;r<e.length;r++){if(e[r].length!==t[r].length)throw SyntaxError(`Dimension mismatch. Array A and B must have the same number of elements.`);n.push(d(e[r],t[r]))}return n}else{if(e.length!==t.length)throw SyntaxError(`Dimension mismatch. Array A and B must have the same number of elements.`);return d(e,t)}}function d(e,t){var n=e.length,u=i(e),d=i(t),f=e.reduce((e,n,r)=>a(e,s(n,t[r])),0),p=i(e.map(e=>c(e,2))),m=i(t.map(e=>c(e,2)));return l(o(s(n,f),s(u,d)),r(s(o(s(n,p),c(u,2)),o(s(n,m),c(d,2)))))}}),FH=`bernoulli`,IH=K(FH,[`typed`,`config`,`isInteger`,`number`,`?BigNumber`,`?Fraction`],e=>{var{typed:t,config:n,number:r,BigNumber:i,Fraction:a}=e,o=[void 0],s=[void 0],c=[void 0],l=50;return t(FH,{number:e=>LH(e,e=>e,o,(e,t)=>e+t,(e,t)=>e*t,(e,t)=>e/t),"bigint | Fraction":e=>LH(r(e),e=>new a(e),s,(e,t)=>e.add(t),(e,t)=>e.mul(t),(e,t)=>e.div(t)),BigNumber:e=>(n.precision!==l&&(c=[void 0],l=n.precision),LH(r(e),e=>new i(e),c,(e,t)=>e.add(t),(e,t)=>e.mul(t),(e,t)=>e.div(t)))})});function LH(e,t,n,r,i,a){if(e<0||!q(e))throw RangeError(`Bernoulli index must be nonnegative integer`);if(e===0)return t(1);if(e===1)return a(t(-1),t(2));if(e%2==1)return t(0);var o=t(1);n.length===1&&n.push([a(o,t(-3)),a(o,t(-2)),a(o,t(6))]);for(var s=e/2,c=t(0),l=t(2);n.length<=s;){for(var u=n.length,d=Math.floor((u+1)/2),f=c,p=1;p<d;++p)f=r(f,i(n[p][0],n[u-p][0]));f=i(f,l),u%2==0&&(f=r(f,i(n[d][0],n[d][0]))),f=a(f,t(-(2*u+1)));var m=a(i(n[u-1][1],t(-u*(2*u-1))),l);n.push([f,m,i(m,f)])}return n[s][2]}var RH=`combinations`,zH=K(RH,[`typed`],e=>{var{typed:t}=e;return t(RH,{"number, number":LA,"BigNumber, BigNumber":function(e,t){var n=e.constructor,r,i,a=e.minus(t),o=new n(1);if(!BH(e)||!BH(t))throw TypeError(`Positive integer value expected in function combinations`);if(t.gt(e))throw TypeError(`k must be less than n in function combinations`);if(r=o,t.lt(a))for(i=o;i.lte(a);i=i.plus(o))r=r.times(t.plus(i)).dividedBy(i);else for(i=o;i.lte(t);i=i.plus(o))r=r.times(a.plus(i)).dividedBy(i);return r}})});function BH(e){return e.isInteger()&&e.gte(0)}var VH=`combinationsWithRep`,HH=K(VH,[`typed`],e=>{var{typed:t}=e;return t(VH,{"number, number":function(e,t){if(!q(e)||e<0||!q(t)||t<0)throw TypeError(`Positive integer value expected in function combinationsWithRep`);if(e<1)throw TypeError(`k must be less than or equal to n + k - 1`);return t<e-1?IA(e,e+t-1)/IA(1,t):IA(t+1,e+t-1)/IA(1,e-1)},"BigNumber, BigNumber":function(e,t){var n=e.constructor,r,i,a=new n(1),o=e.minus(a);if(!UH(e)||!UH(t))throw TypeError(`Positive integer value expected in function combinationsWithRep`);if(e.lt(a))throw TypeError(`k must be less than or equal to n + k - 1 in function combinationsWithRep`);if(r=a,t.lt(o))for(i=a;i.lte(o);i=i.plus(a))r=r.times(t.plus(i)).dividedBy(i);else for(i=a;i.lte(t);i=i.plus(a))r=r.times(o.plus(i)).dividedBy(i);return r}})});function UH(e){return e.isInteger()&&e.gte(0)}var WH=`gamma`,GH=K(WH,[`typed`,`config`,`multiplyScalar`,`pow`,`BigNumber`,`Complex`],e=>{var{typed:t,config:n,multiplyScalar:r,pow:i,BigNumber:a,Complex:o}=e;function s(e){if(e.im===0)return JA(e.re);if(e.re<.5){var t=new o(1-e.re,-e.im),n=new o(Math.PI*e.re,Math.PI*e.im);return new o(Math.PI).div(n.sin()).div(s(t))}e=new o(e.re-1,e.im);for(var r=new o(XA[0],0),i=1;i<XA.length;++i){var a=new o(XA[i],0);r=r.add(a.div(e.add(i)))}var c=new o(e.re+YA+.5,e.im),l=Math.sqrt(2*Math.PI),u=c.pow(e.add(.5)),d=c.neg().exp();return r.mul(l).mul(u).mul(d)}return t(WH,{number:JA,Complex:s,BigNumber:function(e){if(e.isInteger())return e.isNegative()||e.isZero()?new a(1/0):c(e.minus(1));if(!e.isFinite())return new a(e.isNegative()?NaN:1/0);throw Error(`Integer BigNumber expected`)}});function c(e){if(e<8)return new a([1,1,2,6,24,120,720,5040][e]);var t=n.precision+(Math.log(e.toNumber())|0),r=a.clone({precision:t});if(e%2==1)return e.times(c(new a(e-1)));for(var i=e,o=new r(e),s=e.toNumber();i>2;)i-=2,s+=i,o=o.times(s);return new a(o.toPrecision(a.precision))}}),KH=`lgamma`,qH=K(KH,[`Complex`,`typed`],e=>{var{Complex:t,typed:n}=e,r=7,i=7,a=[-.029550653594771242,.00641025641025641,-.0019175269175269176,.0008417508417508417,-.0005952380952380953,.0007936507936507937,-.002777777777777778,.08333333333333333];return n(KH,{number:$A,Complex:o,BigNumber:function(){throw Error(`mathjs doesn't yet provide an implementation of the algorithm lgamma for BigNumber`)}});function o(e){var n=6.283185307179586,a=1.1447298858494002,l=.1;if(e.isNaN())return new t(NaN,NaN);if(e.im===0)return new t($A(e.re),0);if(e.re>=r||Math.abs(e.im)>=i)return s(e);if(e.re<=l){var u=oE(n,e.im)*Math.floor(.5*e.re+.25),d=e.mul(Math.PI).sin().log(),f=o(new t(1-e.re,-e.im));return new t(a,u).sub(d).sub(f)}else if(e.im>=0)return c(e);else return c(e.conjugate()).conjugate()}function s(e){for(var n=e.sub(.5).mul(e.log()).sub(e).add(ZA),r=new t(1,0).div(e),i=r.div(e),o=a[0],s=a[1],c=2*i.re,l=i.re*i.re+i.im*i.im,u=2;u<8;u++){var d=s;s=-l*o+a[u],o=c*o+d}var f=r.mul(i.mul(o).add(s));return n.add(f)}function c(e){var n=0,i=0,a=e;for(e=e.add(1);e.re<=r;){a=a.mul(e);var o=a.im<0?1:0;o!==0&&i===0&&n++,i=o,e=e.add(1)}return s(e).sub(a.log()).sub(new t(0,n*2*Math.PI*1))}}),JH=`factorial`,YH=K(JH,[`typed`,`gamma`],e=>{var{typed:t,gamma:n}=e;return t(JH,{number:function(e){if(e<0)throw Error(`Value must be non-negative`);return n(e+1)},BigNumber:function(e){if(e.isNegative())throw Error(`Value must be non-negative`);return n(e.plus(1))},"Array | Matrix":t.referToSelf(e=>t=>qk(t,e))})}),XH=`kldivergence`,ZH=K(XH,[`typed`,`matrix`,`divide`,`sum`,`multiply`,`map`,`dotDivide`,`log`,`isNumeric`],e=>{var{typed:t,matrix:n,divide:r,sum:i,multiply:a,map:o,dotDivide:s,log:c,isNumeric:l}=e;return t(XH,{"Array, Array":function(e,t){return u(n(e),n(t))},"Matrix, Array":function(e,t){return u(e,n(t))},"Array, Matrix":function(e,t){return u(n(e),t)},"Matrix, Matrix":function(e,t){return u(e,t)}});function u(e,t){var n=t.size().length,u=e.size().length;if(n>1)throw Error(`first object must be one dimensional`);if(u>1)throw Error(`second object must be one dimensional`);if(n!==u)throw Error(`Length of two vectors must be equal`);if(i(e)===0)throw Error(`Sum of elements in first object must be non zero`);if(i(t)===0)throw Error(`Sum of elements in second object must be non zero`);var d=r(e,i(e)),f=i(a(d,o(s(d,r(t,i(t))),e=>c(e))));return l(f)?f:NaN}}),QH=`multinomial`,$H=K(QH,[`typed`,`add`,`divide`,`multiply`,`factorial`,`isInteger`,`isPositive`],e=>{var{typed:t,add:n,divide:r,multiply:i,factorial:a,isInteger:o,isPositive:s}=e;return t(QH,{"Array | Matrix":function(e){var t=0,c=1;return Kk(e,function(e){if(!o(e)||!s(e))throw TypeError(`Positive integer value expected in function multinomial`);t=n(t,e),c=i(c,a(e))}),r(a(t),c)}})}),eU=`permutations`,tU=K(eU,[`typed`,`factorial`],e=>{var{typed:t,factorial:n}=e;return t(eU,{"number | BigNumber":n,"number, number":function(e,t){if(!q(e)||e<0||!q(t)||t<0)throw TypeError(`Positive integer value expected in function permutations`);if(t>e)throw TypeError(`second argument k must be less than or equal to first argument n`);return IA(e-t+1,e)},"BigNumber, BigNumber":function(e,t){var n,r;if(!nU(e)||!nU(t))throw TypeError(`Positive integer value expected in function permutations`);if(t.gt(e))throw TypeError(`second argument k must be less than or equal to first argument n`);for(n=e.mul(0).add(1),r=e.minus(t).plus(1);r.lte(e);r=r.plus(1))n=n.times(r);return n}})});function nU(e){return e.isInteger()&&e.gte(0)}var rU=e.t(((e,t)=>{(function(e,t,n){function r(e){var t=this,n=o();t.next=function(){var e=2091639*t.s0+t.c*23283064365386963e-26;return t.s0=t.s1,t.s1=t.s2,t.s2=e-(t.c=e|0)},t.c=1,t.s0=n(` `),t.s1=n(` `),t.s2=n(` `),t.s0-=n(e),t.s0<0&&(t.s0+=1),t.s1-=n(e),t.s1<0&&(t.s1+=1),t.s2-=n(e),t.s2<0&&(t.s2+=1),n=null}function i(e,t){return t.c=e.c,t.s0=e.s0,t.s1=e.s1,t.s2=e.s2,t}function a(e,t){var n=new r(e),a=t&&t.state,o=n.next;return o.int32=function(){return n.next()*4294967296|0},o.double=function(){return o()+(o()*2097152|0)*11102230246251565e-32},o.quick=o,a&&(typeof a==`object`&&i(a,n),o.state=function(){return i(n,{})}),o}function o(){var e=4022871197;return function(t){t=String(t);for(var n=0;n<t.length;n++){e+=t.charCodeAt(n);var r=.02519603282416938*e;e=r>>>0,r-=e,r*=e,e=r>>>0,r-=e,e+=r*4294967296}return(e>>>0)*23283064365386963e-26}}t&&t.exports?t.exports=a:n&&n.amd?n(function(){return a}):this.alea=a})(e,typeof t==`object`&&t,typeof define==`function`&&define)})),iU=e.t(((e,t)=>{(function(e,t,n){function r(e){var t=this,n=``;t.x=0,t.y=0,t.z=0,t.w=0,t.next=function(){var e=t.x^t.x<<11;return t.x=t.y,t.y=t.z,t.z=t.w,t.w^=t.w>>>19^e^e>>>8},e===(e|0)?t.x=e:n+=e;for(var r=0;r<n.length+64;r++)t.x^=n.charCodeAt(r)|0,t.next()}function i(e,t){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t}function a(e,t){var n=new r(e),a=t&&t.state,o=function(){return(n.next()>>>0)/4294967296};return o.double=function(){do var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21);while(e===0);return e},o.int32=n.next,o.quick=o,a&&(typeof a==`object`&&i(a,n),o.state=function(){return i(n,{})}),o}t&&t.exports?t.exports=a:n&&n.amd?n(function(){return a}):this.xor128=a})(e,typeof t==`object`&&t,typeof define==`function`&&define)})),aU=e.t(((e,t)=>{(function(e,t,n){function r(e){var t=this,n=``;t.next=function(){var e=t.x^t.x>>>2;return t.x=t.y,t.y=t.z,t.z=t.w,t.w=t.v,(t.d=t.d+362437|0)+(t.v=t.v^t.v<<4^(e^e<<1))|0},t.x=0,t.y=0,t.z=0,t.w=0,t.v=0,e===(e|0)?t.x=e:n+=e;for(var r=0;r<n.length+64;r++)t.x^=n.charCodeAt(r)|0,r==n.length&&(t.d=t.x<<10^t.x>>>4),t.next()}function i(e,t){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t.v=e.v,t.d=e.d,t}function a(e,t){var n=new r(e),a=t&&t.state,o=function(){return(n.next()>>>0)/4294967296};return o.double=function(){do var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21);while(e===0);return e},o.int32=n.next,o.quick=o,a&&(typeof a==`object`&&i(a,n),o.state=function(){return i(n,{})}),o}t&&t.exports?t.exports=a:n&&n.amd?n(function(){return a}):this.xorwow=a})(e,typeof t==`object`&&t,typeof define==`function`&&define)})),oU=e.t(((e,t)=>{(function(e,t,n){function r(e){var t=this;t.next=function(){var e=t.x,n=t.i,r=e[n],i;return r^=r>>>7,i=r^r<<24,r=e[n+1&7],i^=r^r>>>10,r=e[n+3&7],i^=r^r>>>3,r=e[n+4&7],i^=r^r<<7,r=e[n+7&7],r^=r<<13,i^=r^r<<9,e[n]=i,t.i=n+1&7,i};function n(e,t){var n,r=[];if(t===(t|0))r[0]=t;else for(t=``+t,n=0;n<t.length;++n)r[n&7]=r[n&7]<<15^t.charCodeAt(n)+r[n+1&7]<<13;for(;r.length<8;)r.push(0);for(n=0;n<8&&r[n]===0;++n);for(n==8?r[7]=-1:r[n],e.x=r,e.i=0,n=256;n>0;--n)e.next()}n(t,e)}function i(e,t){return t.x=e.x.slice(),t.i=e.i,t}function a(e,t){e??=+new Date;var n=new r(e),a=t&&t.state,o=function(){return(n.next()>>>0)/4294967296};return o.double=function(){do var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21);while(e===0);return e},o.int32=n.next,o.quick=o,a&&(a.x&&i(a,n),o.state=function(){return i(n,{})}),o}t&&t.exports?t.exports=a:n&&n.amd?n(function(){return a}):this.xorshift7=a})(e,typeof t==`object`&&t,typeof define==`function`&&define)})),sU=e.t(((e,t)=>{(function(e,t,n){function r(e){var t=this;t.next=function(){var e=t.w,n=t.X,r=t.i,i,a;return t.w=e=e+1640531527|0,a=n[r+34&127],i=n[r=r+1&127],a^=a<<13,i^=i<<17,a^=a>>>15,i^=i>>>12,a=n[r]=a^i,t.i=r,a+(e^e>>>16)|0};function n(e,t){var n,r,i,a,o,s=[],c=128;for(t===(t|0)?(r=t,t=null):(t+=`\0`,r=0,c=Math.max(c,t.length)),i=0,a=-32;a<c;++a)t&&(r^=t.charCodeAt((a+32)%t.length)),a===0&&(o=r),r^=r<<10,r^=r>>>15,r^=r<<4,r^=r>>>13,a>=0&&(o=o+1640531527|0,n=s[a&127]^=r+o,i=n==0?i+1:0);for(i>=128&&(s[(t&&t.length||0)&127]=-1),i=127,a=512;a>0;--a)r=s[i+34&127],n=s[i=i+1&127],r^=r<<13,n^=n<<17,r^=r>>>15,n^=n>>>12,s[i]=r^n;e.w=o,e.X=s,e.i=i}n(t,e)}function i(e,t){return t.i=e.i,t.w=e.w,t.X=e.X.slice(),t}function a(e,t){e??=+new Date;var n=new r(e),a=t&&t.state,o=function(){return(n.next()>>>0)/4294967296};return o.double=function(){do var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21);while(e===0);return e},o.int32=n.next,o.quick=o,a&&(a.X&&i(a,n),o.state=function(){return i(n,{})}),o}t&&t.exports?t.exports=a:n&&n.amd?n(function(){return a}):this.xor4096=a})(e,typeof t==`object`&&t,typeof define==`function`&&define)})),cU=e.t(((e,t)=>{(function(e,t,n){function r(e){var t=this,n=``;t.next=function(){var e=t.b,n=t.c,r=t.d,i=t.a;return e=e<<25^e>>>7^n,n=n-r|0,r=r<<24^r>>>8^i,i=i-e|0,t.b=e=e<<20^e>>>12^n,t.c=n=n-r|0,t.d=r<<16^n>>>16^i,t.a=i-e|0},t.a=0,t.b=0,t.c=-1640531527,t.d=1367130551,e===Math.floor(e)?(t.a=e/4294967296|0,t.b=e|0):n+=e;for(var r=0;r<n.length+20;r++)t.b^=n.charCodeAt(r)|0,t.next()}function i(e,t){return t.a=e.a,t.b=e.b,t.c=e.c,t.d=e.d,t}function a(e,t){var n=new r(e),a=t&&t.state,o=function(){return(n.next()>>>0)/4294967296};return o.double=function(){do var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21);while(e===0);return e},o.int32=n.next,o.quick=o,a&&(typeof a==`object`&&i(a,n),o.state=function(){return i(n,{})}),o}t&&t.exports?t.exports=a:n&&n.amd?n(function(){return a}):this.tychei=a})(e,typeof t==`object`&&t,typeof define==`function`&&define)})),lU=e.t(((e,t)=>{t.exports={}})),uU=e.t(((e,t)=>{(function(e,n,r){var i=256,a=6,o=52,s=`random`,c=r.pow(i,a),l=r.pow(2,o),u=l*2,d=i-1,f;function p(e,t,o){var d=[];t=t==1?{entropy:!0}:t||{};var f=_(g(t.entropy?[e,y(n)]:e??v(),3),d),p=new m(d),b=function(){for(var e=p.g(a),t=c,n=0;e<l;)e=(e+n)*i,t*=i,n=p.g(1);for(;e>=u;)e/=2,t/=2,n>>>=1;return(e+n)/t};return b.int32=function(){return p.g(4)|0},b.quick=function(){return p.g(4)/4294967296},b.double=b,_(y(p.S),n),(t.pass||o||function(e,t,n,i){return i&&(i.S&&h(i,p),e.state=function(){return h(p,{})}),n?(r[s]=e,t):e})(b,f,`global`in t?t.global:this==r,t.state)}function m(e){var t,n=e.length,r=this,a=0,o=r.i=r.j=0,s=r.S=[];for(n||(e=[n++]);a<i;)s[a]=a++;for(a=0;a<i;a++)s[a]=s[o=d&o+e[a%n]+(t=s[a])],s[o]=t;(r.g=function(e){for(var t,n=0,a=r.i,o=r.j,s=r.S;e--;)t=s[a=d&a+1],n=n*i+s[d&(s[a]=s[o=d&o+t])+(s[o]=t)];return r.i=a,r.j=o,n})(i)}function h(e,t){return t.i=e.i,t.j=e.j,t.S=e.S.slice(),t}function g(e,t){var n=[],r=typeof e,i;if(t&&r==`object`)for(i in e)try{n.push(g(e[i],t-1))}catch{}return n.length?n:r==`string`?e:e+`\0`}function _(e,t){for(var n=e+``,r,i=0;i<n.length;)t[d&i]=d&(r^=t[d&i]*19)+n.charCodeAt(i++);return y(t)}function v(){try{var t;return f&&(t=f.randomBytes)?t=t(i):(t=new Uint8Array(i),(e.crypto||e.msCrypto).getRandomValues(t)),y(t)}catch{var r=e.navigator,a=r&&r.plugins;return[+new Date,e,a,e.screen,y(n)]}}function y(e){return String.fromCharCode.apply(0,e)}if(_(r.random(),n),typeof t==`object`&&t.exports){t.exports=p;try{f=lU()}catch{}}else typeof define==`function`&&define.amd?define(function(){return p}):r[`seed`+s]=p})(typeof self<`u`?self:e,[],Math)})),dU=e.t(((e,t)=>{var n=rU(),r=iU(),i=aU(),a=oU(),o=sU(),s=cU(),c=uU();c.alea=n,c.xor128=r,c.xorwow=i,c.xorshift7=a,c.xor4096=o,c.tychei=s,t.exports=c})),fU=e.r(dU(),1),pU=(0,fU.default)(Date.now());function mU(e){var t;function n(e){t=e===null?pU:(0,fU.default)(String(e))}n(e);function r(){return t()}return r}var hU=`pickRandom`,gU=K(hU,[`typed`,`config`,`?on`],e=>{var{typed:t,config:n,on:r}=e,i=mU(n.randomSeed);return r&&r(`config`,function(e,t){e.randomSeed!==t.randomSeed&&(i=mU(e.randomSeed))}),t(hU,{"Array | Matrix":function(e){return a(e,{})},"Array | Matrix, Object":function(e,t){return a(e,t)},"Array | Matrix, number":function(e,t){return a(e,{number:t})},"Array | Matrix, Array | Matrix":function(e,t){return a(e,{weights:t})},"Array | Matrix, Array | Matrix, number":function(e,t,n){return a(e,{number:n,weights:t})},"Array | Matrix, number, Array | Matrix":function(e,t,n){return a(e,{number:t,weights:n})}});function a(e,t){var{number:n,weights:r,elementWise:a=!0}=t,o=n===void 0;o&&(n=1);var s=Hw(e)?e.create:Hw(r)?r.create:null;e=e.valueOf(),r&&=r.valueOf(),a===!0&&(e=gk(e),r=gk(r));var c=0;if(r!==void 0){if(r.length!==e.length)throw Error(`Weights must have the same length as possibles`);for(var l=0,u=r.length;l<u;l++){if(!Pw(r[l])||r[l]<0)throw Error(`Weights must be an array of positive numbers`);c+=r[l]}}for(var d=e.length,f=[],p;f.length<n;){if(r===void 0)p=e[Math.floor(i()*d)];else for(var m=i()*c,h=0,g=e.length;h<g;h++)if(m-=r[h],m<0){p=e[h];break}f.push(p)}return o?f[0]:s?s(f):f}});function _U(e,t){var n=[];if(e=e.slice(0),e.length>1)for(var r=0,i=e.shift();r<i;r++)n.push(_U(e,t));else for(var a=0,o=e.shift();a<o;a++)n.push(t());return n}var vU=`random`,yU=K(vU,[`typed`,`config`,`?on`],e=>{var{typed:t,config:n,on:r}=e,i=mU(n.randomSeed);return r&&r(`config`,function(e,t){e.randomSeed!==t.randomSeed&&(i=mU(e.randomSeed))}),t(vU,{"":()=>o(0,1),number:e=>o(0,e),"number, number":(e,t)=>o(e,t),"Array | Matrix":e=>a(e,0,1),"Array | Matrix, number":(e,t)=>a(e,0,t),"Array | Matrix, number, number":(e,t,n)=>a(e,t,n)});function a(e,t,n){var r=_U(e.valueOf(),()=>o(t,n));return Hw(e)?e.create(r,`number`):r}function o(e,t){return e+i()*(t-e)}}),bU=`randomInt`,xU=K(bU,[`typed`,`config`,`log2`,`?on`],e=>{var{typed:t,config:n,log2:r,on:i}=e,a=mU(n.randomSeed);return i&&i(`config`,function(e,t){e.randomSeed!==t.randomSeed&&(a=mU(e.randomSeed))}),t(bU,{"":()=>s(0,2),number:e=>s(0,e),"number, number":(e,t)=>s(e,t),bigint:e=>c(0n,e),"bigint, bigint":c,"Array | Matrix":e=>o(e,0,1),"Array | Matrix, number":(e,t)=>o(e,0,t),"Array | Matrix, number, number":(e,t,n)=>o(e,t,n)});function o(e,t,n){var r=_U(e.valueOf(),()=>s(t,n));return Hw(e)?e.create(r,`number`):r}function s(e,t){return Math.floor(e+a()*(t-e))}function c(e,t){var n=2n**30n,i=t-e;if(i<=n)return e+BigInt(s(0,Number(i)));for(var o=r(i),c=i;c>=i;){c=0n;for(var l=0;l<o;++l)c=2n*c+(a()<.5?0n:1n)}return e+c}}),SU=`stirlingS2`,CU=K(SU,[`typed`,`addScalar`,`subtractScalar`,`multiplyScalar`,`divideScalar`,`pow`,`factorial`,`combinations`,`isNegative`,`isInteger`,`number`,`?bignumber`,`larger`],e=>{var{typed:t,addScalar:n,subtractScalar:r,multiplyScalar:i,divideScalar:a,pow:o,factorial:s,combinations:c,isNegative:l,isInteger:u,number:d,bignumber:f,larger:p}=e,m=[],h=[];return t(SU,{"number | BigNumber, number | BigNumber":function(e,t){if(!u(e)||l(e)||!u(t)||l(t))throw TypeError(`Non-negative integer value expected in function stirlingS2`);if(p(t,e))throw TypeError(`k must be less than or equal to n in function stirlingS2`);var r=!(Pw(e)&&Pw(t)),a=r?h:m,o=r?f:d,s=d(e),c=d(t);if(a[s]&&a[s].length>c)return a[s][c];for(var g=0;g<=s;++g)if(a[g]||(a[g]=[o(g===0?1:0)]),g!==0)for(var _=a[g],v=a[g-1],y=_.length;y<=g&&y<=c;++y)y===g?_[y]=1:_[y]=n(i(o(y),v[y]),v[y-1]);return a[s][c]}})}),wU=`bellNumbers`,TU=K(wU,[`typed`,`addScalar`,`isNegative`,`isInteger`,`stirlingS2`],e=>{var{typed:t,addScalar:n,isNegative:r,isInteger:i,stirlingS2:a}=e;return t(wU,{"number | BigNumber":function(e){if(!i(e)||r(e))throw TypeError(`Non-negative integer value expected in function bellNumbers`);for(var t=0,o=0;o<=e;o++)t=n(t,a(e,o));return t}})}),EU=`catalan`,DU=K(EU,[`typed`,`addScalar`,`divideScalar`,`multiplyScalar`,`combinations`,`isNegative`,`isInteger`],e=>{var{typed:t,addScalar:n,divideScalar:r,multiplyScalar:i,combinations:a,isNegative:o,isInteger:s}=e;return t(EU,{"number | BigNumber":function(e){if(!s(e)||o(e))throw TypeError(`Non-negative integer value expected in function catalan`);return r(a(i(e,2),e),n(e,1))}})}),OU=`composition`,kU=K(OU,[`typed`,`addScalar`,`combinations`,`isNegative`,`isPositive`,`isInteger`,`larger`],e=>{var{typed:t,addScalar:n,combinations:r,isPositive:i,isNegative:a,isInteger:o,larger:s}=e;return t(OU,{"number | BigNumber, number | BigNumber":function(e,t){if(!o(e)||!i(e)||!o(t)||!i(t))throw TypeError(`Positive integer value expected in function composition`);if(s(t,e))throw TypeError(`k must be less than or equal to n in function composition`);return r(n(e,-1),n(t,-1))}})}),AU=`leafCount`,jU=K(AU,[`parse`,`typed`],e=>{var{parse:t,typed:n}=e;function r(e){var t=0;return e.forEach(e=>{t+=r(e)}),t||1}return n(AU,{Node:function(e){return r(e)}})});function MU(e){return lT(e)||gT(e)&&e.isUnary()&&lT(e.args[0])}function NU(e){return!!(lT(e)||(fT(e)||gT(e))&&e.args.every(NU)||_T(e)&&NU(e.content))}function PU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function FU(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?PU(Object(n),!0).forEach(function(t){YF(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PU(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var IU=K(`simplifyUtil`,[`FunctionNode`,`OperatorNode`,`SymbolNode`],e=>{var{FunctionNode:t,OperatorNode:n,SymbolNode:r}=e,i=!0,a=!1,o=`defaultF`,s={add:{trivial:i,total:i,commutative:i,associative:i},unaryPlus:{trivial:i,total:i,commutative:i,associative:i},subtract:{trivial:a,total:i,commutative:a,associative:a},multiply:{trivial:i,total:i,commutative:i,associative:i},divide:{trivial:a,total:i,commutative:a,associative:a},paren:{trivial:i,total:i,commutative:i,associative:a},defaultF:{trivial:a,total:i,commutative:a,associative:a}},c={divide:{total:a},log:{total:a}},l={subtract:{total:a},abs:{trivial:i},log:{total:i}};function u(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:s,r=o;if(typeof e==`string`?r=e:gT(e)?r=e.fn.toString():fT(e)?r=e.name:_T(e)&&(r=`paren`),W(n,r)){var i=n[r];if(W(i,t))return i[t];if(W(s,r))return s[r][t]}if(W(n,o)){var a=n[o];return W(a,t)?a[t]:s[o][t]}if(W(s,r)){var c=s[r];if(W(c,t))return c[t]}return s[o][t]}function d(e){return u(e,`commutative`,arguments.length>1&&arguments[1]!==void 0?arguments[1]:s)}function f(e){return u(e,`associative`,arguments.length>1&&arguments[1]!==void 0?arguments[1]:s)}function p(e,t){var n=FU({},e);for(var r in t)W(e,r)?n[r]=FU(FU({},t[r]),e[r]):n[r]=t[r];return n}function m(e,t){if(!e.args||e.args.length===0)return e;e.args=h(e,t);for(var n=0;n<e.args.length;n++)m(e.args[n],t)}function h(e,t){var n,r=[],i=function(e){for(var t=0;t<e.args.length;t++){var a=e.args[t];gT(a)&&n===a.op?i(a):r.push(a)}};return f(e,t)?(n=e.op,i(e),r):e.args}function g(e,t){if(!(!e.args||e.args.length===0)){for(var n=v(e),r=e.args.length,i=0;i<r;i++)g(e.args[i],t);if(r>2&&f(e,t)){for(var a=e.args.pop();e.args.length>0;)a=n([e.args.pop(),a]);e.args=a.args}}}function _(e,t){if(!(!e.args||e.args.length===0)){for(var n=v(e),r=e.args.length,i=0;i<r;i++)_(e.args[i],t);if(r>2&&f(e,t)){for(var a=e.args.shift();e.args.length>0;)a=n([a,e.args.shift()]);e.args=a.args}}}function v(e){return gT(e)?function(t){try{return new n(e.op,e.fn,t,e.implicit)}catch(e){return console.error(e),[]}}:function(n){return new t(new r(e.name),n)}}return{createMakeNodeFunction:v,hasProperty:u,isCommutative:d,isAssociative:f,mergeContext:p,flatten:m,allChildren:h,unflattenr:g,unflattenl:_,defaultContext:s,realContext:c,positiveContext:l}}),LU=K(`simplify`,[`typed`,`parse`,`equal`,`resolve`,`simplifyConstant`,`simplifyCore`,`AccessorNode`,`ArrayNode`,`ConstantNode`,`FunctionNode`,`IndexNode`,`ObjectNode`,`OperatorNode`,`ParenthesisNode`,`SymbolNode`,`replacer`],e=>{var{typed:t,parse:n,equal:r,resolve:i,simplifyConstant:a,simplifyCore:o,AccessorNode:s,ArrayNode:c,ConstantNode:l,FunctionNode:u,IndexNode:d,ObjectNode:f,OperatorNode:p,ParenthesisNode:m,SymbolNode:h,replacer:g}=e,{hasProperty:_,isCommutative:v,isAssociative:y,mergeContext:b,flatten:x,unflattenr:S,unflattenl:C,createMakeNodeFunction:w,defaultContext:T,realContext:E,positiveContext:D}=IU({FunctionNode:u,OperatorNode:p,SymbolNode:h});t.addConversion({from:`Object`,to:`Map`,convert:Mw});var O=t(`simplify`,{Node:P,"Node, Map":(e,t)=>P(e,!1,t),"Node, Map, Object":(e,t,n)=>P(e,!1,t,n),"Node, Array":P,"Node, Array, Map":P,"Node, Array, Map, Object":P});t.removeConversion({from:`Object`,to:`Map`,convert:Mw}),O.defaultContext=T,O.realContext=E,O.positiveContext=D;function k(e){return e.transform(function(e){return _T(e)?k(e.content):e})}var A={true:!0,false:!0,e:!0,i:!0,Infinity:!0,LN2:!0,LN10:!0,LOG2E:!0,LOG10E:!0,NaN:!0,phi:!0,pi:!0,SQRT1_2:!0,SQRT2:!0,tau:!0};O.rules=[o,{l:`log(e)`,r:`1`},{s:`n-n1 -> n+-n1`,assuming:{subtract:{total:!0}}},{s:`n-n -> 0`,assuming:{subtract:{total:!1}}},{s:`-(cl*v) -> v * (-cl)`,assuming:{multiply:{commutative:!0},subtract:{total:!0}}},{s:`-(cl*v) -> (-cl) * v`,assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{s:`-(v*cl) -> v * (-cl)`,assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{l:`-(n1/n2)`,r:`-n1/n2`},{l:`-v`,r:`v * (-1)`},{l:`(n1 + n2)*(-1)`,r:`n1*(-1) + n2*(-1)`,repeat:!0},{l:`n/n1^n2`,r:`n*n1^-n2`},{l:`n/n1`,r:`n*n1^-1`},{s:`(n1*n2)^n3 -> n1^n3 * n2^n3`,assuming:{multiply:{commutative:!0}}},{s:`(n1*n2)^(-1) -> n2^(-1) * n1^(-1)`,assuming:{multiply:{commutative:!1}}},{s:`(n ^ n1) ^ n2 -> n ^ (n1 * n2)`,assuming:{divide:{total:!0}}},{l:` vd * ( vd * n1 + n2)`,r:`vd^2 * n1 + vd * n2`},{s:` vd * (vd^n4 * n1 + n2) -> vd^(1+n4) * n1 + vd * n2`,assuming:{divide:{total:!0}}},{s:`vd^n3 * ( vd * n1 + n2) -> vd^(n3+1) * n1 + vd^n3 * n2`,assuming:{divide:{total:!0}}},{s:`vd^n3 * (vd^n4 * n1 + n2) -> vd^(n3+n4) * n1 + vd^n3 * n2`,assuming:{divide:{total:!0}}},{l:`n*n`,r:`n^2`},{s:`n * n^n1 -> n^(n1+1)`,assuming:{divide:{total:!0}}},{s:`n^n1 * n^n2 -> n^(n1+n2)`,assuming:{divide:{total:!0}}},a,{s:`n+n -> 2*n`,assuming:{add:{total:!0}}},{l:`n+-n`,r:`0`},{l:`vd*n + vd`,r:`vd*(n+1)`},{l:`n3*n1 + n3*n2`,r:`n3*(n1+n2)`},{l:`n3^(-n4)*n1 + n3 * n2`,r:`n3^(-n4)*(n1 + n3^(n4+1) *n2)`},{l:`n3^(-n4)*n1 + n3^n5 * n2`,r:`n3^(-n4)*(n1 + n3^(n4+n5)*n2)`},{s:`n*vd + vd -> (n+1)*vd`,assuming:{multiply:{commutative:!1}}},{s:`vd + n*vd -> (1+n)*vd`,assuming:{multiply:{commutative:!1}}},{s:`n1*n3 + n2*n3 -> (n1+n2)*n3`,assuming:{multiply:{commutative:!1}}},{s:`n^n1 * n -> n^(n1+1)`,assuming:{divide:{total:!0},multiply:{commutative:!1}}},{s:`n1*n3^(-n4) + n2 * n3 -> (n1 + n2*n3^(n4 + 1))*n3^(-n4)`,assuming:{multiply:{commutative:!1}}},{s:`n1*n3^(-n4) + n2 * n3^n5 -> (n1 + n2*n3^(n4 + n5))*n3^(-n4)`,assuming:{multiply:{commutative:!1}}},{l:`n*cd + cd`,r:`(n+1)*cd`},{s:`cd*n + cd -> cd*(n+1)`,assuming:{multiply:{commutative:!1}}},{s:`cd + cd*n -> cd*(1+n)`,assuming:{multiply:{commutative:!1}}},a,{s:`(-n)*n1 -> -(n*n1)`,assuming:{subtract:{total:!0}}},{s:`n1*(-n) -> -(n1*n)`,assuming:{subtract:{total:!0},multiply:{commutative:!1}}},{s:`ce+ve -> ve+ce`,assuming:{add:{commutative:!0}},imposeContext:{add:{commutative:!1}}},{s:`vd*cd -> cd*vd`,assuming:{multiply:{commutative:!0}},imposeContext:{multiply:{commutative:!1}}},{l:`n+-n1`,r:`n-n1`},{l:`n+-(n1)`,r:`n-(n1)`},{s:`n*(n1^-1) -> n/n1`,assuming:{multiply:{commutative:!0}}},{s:`n*n1^-n2 -> n/n1^n2`,assuming:{multiply:{commutative:!0}}},{s:`n^-1 -> 1/n`,assuming:{multiply:{commutative:!0}}},{l:`n^1`,r:`n`},{s:`n*(n1/n2) -> (n*n1)/n2`,assuming:{multiply:{associative:!0}}},{s:`n-(n1+n2) -> n-n1-n2`,assuming:{addition:{associative:!0,commutative:!0}}},{l:`1*n`,r:`n`,imposeContext:{multiply:{commutative:!0}}},{s:`n1/(n2/n3) -> (n1*n3)/n2`,assuming:{multiply:{associative:!0}}},{l:`n1/(-n2)`,r:`-n1/n2`}];function j(e,t){var r={};if(e.s){var i=e.s.split(`->`);if(i.length===2)r.l=i[0],r.r=i[1];else throw SyntaxError(`Could not parse rule: `+e.s)}else r.l=e.l,r.r=e.r;r.l=k(n(r.l)),r.r=k(n(r.r));for(var a of[`imposeContext`,`repeat`,`assuming`])a in e&&(r[a]=e[a]);if(e.evaluate&&(r.evaluate=n(e.evaluate)),y(r.l,t)){var o=!v(r.l,t),s;o&&(s=ee());var c=w(r.l),l=ee();r.expanded={},r.expanded.l=c([r.l,l]),x(r.expanded.l,t),S(r.expanded.l,t),r.expanded.r=c([r.r,l]),o&&(r.expandedNC1={},r.expandedNC1.l=c([s,r.l]),r.expandedNC1.r=c([s,r.r]),r.expandedNC2={},r.expandedNC2.l=c([s,r.expanded.l]),r.expandedNC2.r=c([s,r.expanded.r]))}return r}function M(e,t){for(var n=[],r=0;r<e.length;r++){var i=e[r],a=void 0,o=typeof i;switch(o){case`string`:i={s:i};case`object`:a=j(i,t);break;case`function`:a=i;break;default:throw TypeError(`Unsupported type of rule: `+o)}n.push(a)}return n}var N=0;function ee(){return new h(`_p`+ N++)}function P(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:jw(),r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},a=r.consoleDebug;t=M(t||O.rules,r.context);var o=i(e,n);o=k(o);for(var s={},c=o.toString({parenthesis:`all`});!s[c];){s[c]=!0,N=0;var l=c;a&&console.log(`Working on: `,c);for(var u=0;u<t.length;u++){var d=``;if(typeof t[u]==`function`?(o=t[u](o,r),a&&(d=t[u].name)):(x(o,r.context),o=ne(o,t[u],r.context),a&&(d=`${t[u].l.toString()} -> ${t[u].r.toString()}`)),a){var f=o.toString({parenthesis:`all`});f!==l&&(console.log(`Applying`,d,`produced`,f),l=f)}C(o,r.context)}c=o.toString({parenthesis:`all`})}return o}function te(e,t,n){var r=e;if(e)for(var i=0;i<e.length;++i){var a=ne(e[i],t,n);a!==e[i]&&(r===e&&(r=e.slice()),r[i]=a)}return r}function ne(e,t,n){if(t.assuming){for(var r in t.assuming)for(var i in t.assuming[r])if(_(r,i,n)!==t.assuming[r][i])return e}var a=b(t.imposeContext,n),o=e;if(o instanceof p||o instanceof u){var l=te(o.args,t,n);l!==o.args&&(o=o.clone(),o.args=l)}else if(o instanceof m){if(o.content){var h=ne(o.content,t,n);h!==o.content&&(o=new m(h))}}else if(o instanceof c){var g=te(o.items,t,n);g!==o.items&&(o=new c(g))}else if(o instanceof s){var v=o.object;o.object&&(v=ne(o.object,t,n));var y=o.index;o.index&&(y=ne(o.index,t,n)),(v!==o.object||y!==o.index)&&(o=new s(v,y))}else if(o instanceof d){var x=te(o.dimensions,t,n);x!==o.dimensions&&(o=new d(x))}else if(o instanceof f){var S=!1,C={};for(var w in o.properties)C[w]=ne(o.properties[w],t,n),C[w]!==o.properties[w]&&(S=!0);S&&(o=new f(C))}var T=t.r,E=ae(t.l,o,a)[0];if(!E&&t.expanded&&(T=t.expanded.r,E=ae(t.expanded.l,o,a)[0]),!E&&t.expandedNC1&&(T=t.expandedNC1.r,E=ae(t.expandedNC1.l,o,a)[0],E||=(T=t.expandedNC2.r,ae(t.expandedNC2.l,o,a)[0])),E){var D=o.implicit;o=T.clone(),D&&`implicit`in T&&(o.implicit=!0),o=o.transform(function(e){return e.isSymbolNode&&W(E.placeholders,e.name)?E.placeholders[e.name].clone():e})}return t.repeat&&o!==e&&(o=ne(o,t,n)),o}function re(e,t){var n=[],r,i,a=w(e);if(v(e,t))for(var o=0;o<e.args.length;o++)i=e.args.slice(0),i.splice(o,1),r=i.length===1?i[0]:a(i),n.push(a([e.args[o],r]));else for(var s=1;s<e.args.length;s++){var c=e.args[0];s>1&&(c=a(e.args.slice(0,s))),i=e.args.slice(s),r=i.length===1?i[0]:a(i),n.push(a([c,r]))}return n}function F(e,t){var n={placeholders:{}};if(!e.placeholders&&!t.placeholders)return n;if(!e.placeholders)return t;if(!t.placeholders)return e;for(var r in e.placeholders)if(W(e.placeholders,r)&&(n.placeholders[r]=e.placeholders[r],W(t.placeholders,r)&&!oe(e.placeholders[r],t.placeholders[r])))return null;for(var i in t.placeholders)W(t.placeholders,i)&&(n.placeholders[i]=t.placeholders[i]);return n}function ie(e,t){var n=[];if(e.length===0||t.length===0)return n;for(var r,i=0;i<e.length;i++)for(var a=0;a<t.length;a++)r=F(e[i],t[a]),r&&n.push(r);return n}function I(e){if(e.length===0)return e;for(var t=e.reduce(ie),n=[],r={},i=0;i<t.length;i++){var a=JSON.stringify(t[i],g);r[a]||(r[a]=!0,n.push(t[i]))}return n}function ae(e,t,n,i){var a=[{placeholders:{}}];if(e instanceof p&&t instanceof p||e instanceof u&&t instanceof u){if(e instanceof p){if(e.op!==t.op||e.fn!==t.fn)return[]}else if(e instanceof u&&e.name!==t.name)return[];if(t.args.length===1&&e.args.length===1||!y(t,n)&&t.args.length===e.args.length||i){for(var o=[],s=0;s<e.args.length;s++){var c=ae(e.args[s],t.args[s],n);if(c.length===0)break;o.push(c)}if(o.length!==e.args.length){if(!v(t,n)||e.args.length===1)return[];if(e.args.length>2)throw Error(`permuting >2 commutative non-associative rule arguments not yet implemented`);var d=ae(e.args[0],t.args[1],n);if(d.length===0)return[];var f=ae(e.args[1],t.args[0],n);if(f.length===0)return[];o=[d,f]}a=I(o)}else if(t.args.length>=2&&e.args.length===2){for(var m=re(t,n),g=[],_=0;_<m.length;_++){var b=ae(e,m[_],n,!0);g=g.concat(b)}return g}else if(e.args.length>2)throw Error(`Unexpected non-binary associative function: `+e.toString());else return[]}else if(e instanceof h){if(e.name.length===0)throw Error(`Symbol in rule has 0 length...!?`);if(A[e.name]){if(e.name!==t.name)return[]}else switch(e.name[1]>=`a`&&e.name[1]<=`z`?e.name.substring(0,2):e.name[0]){case`n`:case`_p`:a[0].placeholders[e.name]=t;break;case`c`:case`cl`:if(lT(t))a[0].placeholders[e.name]=t;else return[];break;case`v`:if(!lT(t))a[0].placeholders[e.name]=t;else return[];break;case`vl`:if(bT(t))a[0].placeholders[e.name]=t;else return[];break;case`cd`:if(MU(t))a[0].placeholders[e.name]=t;else return[];break;case`vd`:if(!MU(t))a[0].placeholders[e.name]=t;else return[];break;case`ce`:if(NU(t))a[0].placeholders[e.name]=t;else return[];break;case`ve`:if(!NU(t))a[0].placeholders[e.name]=t;else return[];break;default:throw Error(`Invalid symbol in rule: `+e.name)}}else if(e instanceof l){if(!r(e.value,t.value))return[]}else return[];return a}function oe(e,t){if(e instanceof l&&t instanceof l){if(!r(e.value,t.value))return!1}else if(e instanceof h&&t instanceof h){if(e.name!==t.name)return!1}else if(e instanceof p&&t instanceof p||e instanceof u&&t instanceof u){if(e instanceof p){if(e.op!==t.op||e.fn!==t.fn)return!1}else if(e instanceof u&&e.name!==t.name)return!1;if(e.args.length!==t.args.length)return!1;for(var n=0;n<e.args.length;n++)if(!oe(e.args[n],t.args[n]))return!1}else return!1;return!0}return O}),RU=K(`simplifyConstant`,[`typed`,`config`,`mathWithTransform`,`matrix`,`isBounded`,`?fraction`,`?bignumber`,`AccessorNode`,`ArrayNode`,`ConstantNode`,`FunctionNode`,`IndexNode`,`ObjectNode`,`OperatorNode`,`SymbolNode`],e=>{var{typed:t,config:n,mathWithTransform:r,matrix:i,isBounded:a,fraction:o,bignumber:s,AccessorNode:c,ArrayNode:l,ConstantNode:u,FunctionNode:d,IndexNode:f,ObjectNode:p,OperatorNode:m,SymbolNode:h}=e,{isCommutative:g,isAssociative:_,allChildren:v,createMakeNodeFunction:y}=IU({FunctionNode:d,OperatorNode:m,SymbolNode:h}),b=t(`simplifyConstant`,{Node:e=>w(j(e,{})),"Node, Object":function(e,t){return w(j(e,t))}});function x(e){return Rw(e)?e.valueOf():e instanceof Array?e.map(x):Hw(e)?i(x(e.valueOf())):e}function S(e,t,n){try{return r[e].apply(null,t)}catch{return t=t.map(x),E(r[e].apply(null,t),n)}}var C=t({Fraction:O,number:function(e){return e<0?D(new u(-e)):new u(e)},BigNumber:function(e){return e<0?D(new u(-e)):new u(e)},bigint:function(e){return e<0n?D(new u(-e)):new u(e)},Complex:function(e){throw Error(`Cannot convert Complex number to Node`)},string:function(e){return new u(e)},Matrix:function(e){return new l(e.valueOf().map(e=>C(e)))}});function w(e){return mT(e)?e:C(e)}function T(e,t){if(t&&t.exactFractions!==!1&&a(e)&&o){var n=o(e),r=t&&typeof t.fractionsLimit==`number`?t.fractionsLimit:1/0;if(n.valueOf()===e&&n.n<r&&n.d<r)return n}return e}var E=t({"string, Object":function(e,t){var r=FT(e,n);return r===`BigNumber`?(s===void 0&&fF(),s(e)):r===`bigint`?BigInt(e):r===`Fraction`?(o===void 0&&pF(),o(e)):T(parseFloat(e),t)},"Fraction, Object":function(e,t){return e},"BigNumber, Object":function(e,t){return e},"number, Object":function(e,t){return T(e,t)},"bigint, Object":function(e,t){return e},"Complex, Object":function(e,t){return e.im===0?T(e.re,t):e},"Matrix, Object":function(e,t){return i(T(e.valueOf()))},"Array, Object":function(e,t){return e.map(T)}});function D(e){return new m(`-`,`unaryMinus`,[e])}function O(e){var t=e=>n.number===`BigNumber`&&s?s(e):Number(e),r=e.s*e.n,i=r<0n?new m(`-`,`unaryMinus`,[new u(-t(r))]):new u(t(r));return e.d===1n?i:new m(`/`,`divide`,[i,new u(t(e.d))])}function k(e,t,n){if(!pT(t))return new c(w(e),w(t));if(aT(e)||Hw(e)){for(var r=Array.from(t.dimensions);r.length>0;)if(lT(r[0])&&typeof r[0].value!=`string`){var a=E(r.shift().value,n);aT(e)?e=e.items[a-1]:(e=e.valueOf()[a-1],e instanceof Array&&(e=i(e)))}else if(r.length>1&&lT(r[1])&&typeof r[1].value!=`string`){var o=E(r[1].value,n),s=[],d=aT(e)?e.items:e.valueOf();for(var p of d)if(aT(p))s.push(p.items[o-1]);else if(Hw(e))s.push(p[o-1]);else break;if(s.length===d.length)e=aT(e)?new l(s):i(s),r.splice(1,1);else break}else break;return r.length===t.dimensions.length?new c(w(e),t):r.length>0?(t=new f(r),new c(w(e),t)):e}if(hT(e)&&t.dimensions.length===1&&lT(t.dimensions[0])){var m=t.dimensions[0].value;return m in e.properties?e.properties[m]:new u}return new c(w(e),t)}function A(e,t,n,r){var i=t.shift(),a=t.reduce((t,i)=>{if(!mT(i)){var a=t.pop();if(mT(a))return[a,i];try{return t.push(S(e,[a,i],r)),t}catch{t.push(a)}}return t.push(w(t.pop())),[n([t.length===1?t[0]:n(t),w(i)])]},[i]);return a.length===1?a[0]:n([a[0],C(a[1])])}function j(e,t){switch(e.type){case`SymbolNode`:return e;case`ConstantNode`:switch(typeof e.value){case`number`:return E(e.value,t);case`bigint`:return E(e.value,t);case`string`:return e.value;default:if(!isNaN(e.value))return E(e.value,t)}return e;case`FunctionNode`:if(r[e.name]&&r[e.name].rawArgs)return e;if(![`add`,`multiply`].includes(e.name)){var n=e.args.map(e=>j(e,t));if(!n.some(mT))try{return S(e.name,n,t)}catch{}if(e.name===`size`&&n.length===1&&aT(n[0])){for(var a=[],o=n[0];aT(o);)a.push(o.items.length),o=o.items[0];return i(a)}return new d(e.name,n.map(w))}case`OperatorNode`:var s=e.fn.toString(),c,u,m=y(e);if(gT(e)&&e.isUnary())c=[j(e.args[0],t)],u=mT(c[0])?m(c):S(s,c,t);else if(_(e,t.context))if(c=v(e,t.context),c=c.map(e=>j(e,t)),g(s,t.context)){for(var h=[],x=[],C=0;C<c.length;C++)mT(c[C])?x.push(c[C]):h.push(c[C]);h.length>1?(u=A(s,h,m,t),x.unshift(u),u=A(s,x,m,t)):u=A(s,c,m,t)}else u=A(s,c,m,t);else c=e.args.map(e=>j(e,t)),u=A(s,c,m,t);return u;case`ParenthesisNode`:return j(e.content,t);case`AccessorNode`:return k(j(e.object,t),j(e.index,t),t);case`ArrayNode`:var T=e.items.map(e=>j(e,t));return T.some(mT)?new l(T.map(w)):i(T);case`IndexNode`:return new f(e.dimensions.map(e=>b(e,t)));case`ObjectNode`:var D={};for(var O in e.properties)D[O]=b(e.properties[O],t);return new p(D);default:throw Error(`Unimplemented node type in simplifyConstant: ${e.type}`)}}return b}),zU=`simplifyCore`,BU=K(zU,[`typed`,`parse`,`equal`,`isZero`,`add`,`subtract`,`multiply`,`divide`,`pow`,`AccessorNode`,`ArrayNode`,`ConstantNode`,`FunctionNode`,`IndexNode`,`ObjectNode`,`OperatorNode`,`ParenthesisNode`,`SymbolNode`],e=>{var{typed:t,parse:n,equal:r,isZero:i,add:a,subtract:o,multiply:s,divide:c,pow:l,AccessorNode:u,ArrayNode:d,ConstantNode:f,FunctionNode:p,IndexNode:m,ObjectNode:h,OperatorNode:g,ParenthesisNode:_,SymbolNode:v}=e,y=new f(0),b=new f(1),x=new f(!0),S=new f(!1);function C(e){return gT(e)&&[`and`,`not`,`or`].includes(e.op)}var{hasProperty:w,isCommutative:T}=IU({FunctionNode:p,OperatorNode:g,SymbolNode:v});function E(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t?t.context:void 0;if(w(e,`trivial`,n)){if(fT(e)&&e.args.length===1)return E(e.args[0],t);var a=!1,o=0;if(e.forEach(e=>{++o,o===1&&(a=E(e,t))}),o===1)return a}var s=e;if(fT(s)){var c=cB(s.name);if(c){if(s.args.length>2&&w(s,`associative`,n))for(;s.args.length>2;){var l=s.args.pop(),f=s.args.pop();s.args.push(new g(c,s.name,[l,f]))}s=new g(c,s.name,s.args)}else return new p(E(s.fn),s.args.map(e=>E(e,t)))}if(gT(s)&&s.isUnary()){var _=E(s.args[0],t);if(s.op===`~`&&gT(_)&&_.isUnary()&&_.op===`~`||s.op===`not`&&gT(_)&&_.isUnary()&&_.op===`not`&&C(_.args[0]))return _.args[0];var v=!0;if(s.op===`-`&&gT(_)&&(_.isBinary()&&_.fn===`subtract`&&(s=new g(`-`,`subtract`,[_.args[1],_.args[0]]),v=!1),_.isUnary()&&_.op===`-`))return _.args[0];if(v)return new g(s.op,s.fn,[_])}if(gT(s)&&s.isBinary()){var D=E(s.args[0],t),O=E(s.args[1],t);if(s.op===`+`){if(lT(D)&&i(D.value))return O;if(lT(O)&&i(O.value))return D;gT(O)&&O.isUnary()&&O.op===`-`&&(O=O.args[0],s=new g(`-`,`subtract`,[D,O]))}if(s.op===`-`)return gT(O)&&O.isUnary()&&O.op===`-`?E(new g(`+`,`add`,[D,O.args[0]]),t):lT(D)&&i(D.value)?E(new g(`-`,`unaryMinus`,[O])):lT(O)&&i(O.value)?D:new g(s.op,s.fn,[D,O]);if(s.op===`*`){if(lT(D)){if(i(D.value))return y;if(r(D.value,1))return O}if(lT(O)){if(i(O.value))return y;if(r(O.value,1))return D;if(T(s,n))return new g(s.op,s.fn,[O,D],s.implicit)}return new g(s.op,s.fn,[D,O],s.implicit)}if(s.op===`/`)return lT(D)&&i(D.value)?y:lT(O)&&r(O.value,1)?D:new g(s.op,s.fn,[D,O]);if(s.op===`^`&&lT(O)){if(i(O.value))return b;if(r(O.value,1))return D}if(s.op===`and`){if(lT(D))if(D.value){if(C(O))return O;if(lT(O))return O.value?x:S}else return S;if(lT(O))if(O.value){if(C(D))return D}else return S}if(s.op===`or`){if(lT(D)){if(D.value)return x;if(C(O))return O}if(lT(O)){if(O.value)return x;if(C(D))return D}}return new g(s.op,s.fn,[D,O])}if(gT(s))return new g(s.op,s.fn,s.args.map(e=>E(e,t)));if(aT(s))return new d(s.items.map(e=>E(e,t)));if(iT(s))return new u(E(s.object,t),E(s.index,t));if(pT(s))return new m(s.dimensions.map(e=>E(e,t)));if(hT(s)){var k={};for(var A in s.properties)k[A]=E(s.properties[A],t);return new h(k)}return s}return t(zU,{Node:E,"Node,Object":E})}),VU=K(`resolve`,[`typed`,`parse`,`ConstantNode`,`FunctionNode`,`OperatorNode`,`ParenthesisNode`],e=>{var{typed:t,parse:n,ConstantNode:r,FunctionNode:i,OperatorNode:a,ParenthesisNode:o}=e;function s(e,t){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Set;if(!t)return e;if(bT(e)){if(c.has(e.name)){var l=Array.from(c).join(`, `);throw ReferenceError(`recursive loop of variable definitions among {${l}}`)}var u=t.get(e.name);if(mT(u)){var d=new Set(c);return d.add(e.name),s(u,t,d)}else if(typeof u==`number`)return n(String(u));else if(u!==void 0)return new r(u);else return e}else if(gT(e)){var f=e.args.map(function(e){return s(e,t,c)});return new a(e.op,e.fn,f,e.implicit)}else if(_T(e))return new o(s(e.content,t,c));else if(fT(e)){var p=e.args.map(function(e){return s(e,t,c)});return new i(e.name,p)}return e.map(e=>s(e,t,c))}return t(`resolve`,{Node:s,"Node, Map | null | undefined":s,"Node, Object":(e,t)=>s(e,Mw(t)),"Array | Matrix":t.referToSelf(e=>t=>t.map(t=>e(t))),"Array | Matrix, null | undefined":t.referToSelf(e=>t=>t.map(t=>e(t))),"Array, Object":t.referTo(`Array,Map`,e=>(t,n)=>e(t,Mw(n))),"Matrix, Object":t.referTo(`Matrix,Map`,e=>(t,n)=>e(t,Mw(n))),"Array | Matrix, Map":t.referToSelf(e=>(t,n)=>t.map(t=>e(t,n)))})}),HU=`symbolicEqual`,UU=K(HU,[`parse`,`simplify`,`typed`,`OperatorNode`],e=>{var{parse:t,simplify:n,typed:r,OperatorNode:i}=e;function a(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=n(new i(`-`,`subtract`,[e,t]),{},r);return lT(a)&&!a.value}return r(HU,{"Node, Node":a,"Node, Node, Object":a})}),WU=`derivative`,GU=K(WU,[`typed`,`config`,`parse`,`simplify`,`equal`,`isZero`,`numeric`,`ConstantNode`,`FunctionNode`,`OperatorNode`,`ParenthesisNode`,`SymbolNode`],e=>{var{typed:t,config:n,parse:r,simplify:i,equal:a,isZero:o,numeric:s,ConstantNode:c,FunctionNode:l,OperatorNode:u,ParenthesisNode:d,SymbolNode:f}=e;function p(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{simplify:!0},r=new Map,a=t.name;function o(e){var t=r.get(e);if(t!==void 0)return t;var n=_(o,e,a);return r.set(e,n),n}var s=v(e,o);return n.simplify?i(s):s}function m(e){var t=r(e);if(!t.isSymbolNode)throw TypeError(`Invalid variable. Cannot parse ${JSON.stringify(e)} into a variable in function derivative`);return t}var h=t(WU,{"Node, SymbolNode":p,"Node, SymbolNode, Object":p,"Node, string":(e,t)=>p(e,m(t)),"Node, string, Object":(e,t,n)=>p(e,m(t),n)});h._simplify=!0,h.toTex=function(e){return g.apply(null,e.args)};var g=t(`_derivTex`,{"Node, SymbolNode":function(e,t){return lT(e)&&ST(e.value)===`string`?g(r(e.value).toString(),t.toString(),1):g(e.toTex(),t.toString(),1)},"Node, ConstantNode":function(e,t){if(ST(t.value)===`string`)return g(e,r(t.value));throw Error(`The second parameter to 'derivative' is a non-string constant`)},"Node, SymbolNode, ConstantNode":function(e,t,n){return g(e.toString(),t.name,n.value)},"string, string, number":function(e,t,n){return(n===1?`{d\\over d`+t+`}`:`{d^{`+n+`}\\over d`+t+`^{`+n+`}}`)+`\\left[${e}\\right]`}}),_=t(`_isConst`,{"function, ConstantNode, string":function(){return!0},"function, SymbolNode, string":function(e,t,n){return t.name!==n},"function, ParenthesisNode, string":function(e,t,n){return e(t.content,n)},"function, FunctionAssignmentNode, string":function(e,t,n){return t.params.includes(n)?e(t.expr,n):!0},"function, FunctionNode | OperatorNode, string":function(e,t,n){return t.args.every(t=>e(t,n))}}),v=t(`_derivative`,{"ConstantNode, function":function(){return y(0)},"SymbolNode, function":function(e,t){return t(e)?y(0):y(1)},"ParenthesisNode, function":function(e,t){return new d(v(e.content,t))},"FunctionAssignmentNode, function":function(e,t){return t(e)?y(0):v(e.expr,t)},"FunctionNode, function":function(e,t){if(t(e))return y(0);var n=e.args[0],r,i=!1,a=!1,o;switch(e.name){case`cbrt`:i=!0,o=new u(`*`,`multiply`,[y(3),new u(`^`,`pow`,[n,new u(`/`,`divide`,[y(2),y(3)])])]);break;case`sqrt`:case`nthRoot`:if(e.args.length===1)i=!0,o=new u(`*`,`multiply`,[y(2),new l(`sqrt`,[n])]);else if(e.args.length===2)return r=new u(`/`,`divide`,[y(1),e.args[1]]),v(new u(`^`,`pow`,[n,r]),t);break;case`log10`:r=y(10);case`log`:if(!r&&e.args.length===1)o=n.clone(),i=!0;else if(e.args.length===1&&r||e.args.length===2&&t(e.args[1]))o=new u(`*`,`multiply`,[n.clone(),new l(`log`,[r||e.args[1]])]),i=!0;else if(e.args.length===2)return v(new u(`/`,`divide`,[new l(`log`,[n]),new l(`log`,[e.args[1]])]),t);break;case`pow`:if(e.args.length===2)return v(new u(`^`,`pow`,[n,e.args[1]]),t);break;case`exp`:o=new l(`exp`,[n.clone()]);break;case`sin`:o=new l(`cos`,[n.clone()]);break;case`cos`:o=new u(`-`,`unaryMinus`,[new l(`sin`,[n.clone()])]);break;case`tan`:o=new u(`^`,`pow`,[new l(`sec`,[n.clone()]),y(2)]);break;case`sec`:o=new u(`*`,`multiply`,[e,new l(`tan`,[n.clone()])]);break;case`csc`:a=!0,o=new u(`*`,`multiply`,[e,new l(`cot`,[n.clone()])]);break;case`cot`:a=!0,o=new u(`^`,`pow`,[new l(`csc`,[n.clone()]),y(2)]);break;case`asin`:i=!0,o=new l(`sqrt`,[new u(`-`,`subtract`,[y(1),new u(`^`,`pow`,[n.clone(),y(2)])])]);break;case`acos`:i=!0,a=!0,o=new l(`sqrt`,[new u(`-`,`subtract`,[y(1),new u(`^`,`pow`,[n.clone(),y(2)])])]);break;case`atan`:i=!0,o=new u(`+`,`add`,[new u(`^`,`pow`,[n.clone(),y(2)]),y(1)]);break;case`asec`:i=!0,o=new u(`*`,`multiply`,[new l(`abs`,[n.clone()]),new l(`sqrt`,[new u(`-`,`subtract`,[new u(`^`,`pow`,[n.clone(),y(2)]),y(1)])])]);break;case`acsc`:i=!0,a=!0,o=new u(`*`,`multiply`,[new l(`abs`,[n.clone()]),new l(`sqrt`,[new u(`-`,`subtract`,[new u(`^`,`pow`,[n.clone(),y(2)]),y(1)])])]);break;case`acot`:i=!0,a=!0,o=new u(`+`,`add`,[new u(`^`,`pow`,[n.clone(),y(2)]),y(1)]);break;case`sinh`:o=new l(`cosh`,[n.clone()]);break;case`cosh`:o=new l(`sinh`,[n.clone()]);break;case`tanh`:o=new u(`^`,`pow`,[new l(`sech`,[n.clone()]),y(2)]);break;case`sech`:a=!0,o=new u(`*`,`multiply`,[e,new l(`tanh`,[n.clone()])]);break;case`csch`:a=!0,o=new u(`*`,`multiply`,[e,new l(`coth`,[n.clone()])]);break;case`coth`:a=!0,o=new u(`^`,`pow`,[new l(`csch`,[n.clone()]),y(2)]);break;case`asinh`:i=!0,o=new l(`sqrt`,[new u(`+`,`add`,[new u(`^`,`pow`,[n.clone(),y(2)]),y(1)])]);break;case`acosh`:i=!0,o=new l(`sqrt`,[new u(`-`,`subtract`,[new u(`^`,`pow`,[n.clone(),y(2)]),y(1)])]);break;case`atanh`:i=!0,o=new u(`-`,`subtract`,[y(1),new u(`^`,`pow`,[n.clone(),y(2)])]);break;case`asech`:i=!0,a=!0,o=new u(`*`,`multiply`,[n.clone(),new l(`sqrt`,[new u(`-`,`subtract`,[y(1),new u(`^`,`pow`,[n.clone(),y(2)])])])]);break;case`acsch`:i=!0,a=!0,o=new u(`*`,`multiply`,[new l(`abs`,[n.clone()]),new l(`sqrt`,[new u(`+`,`add`,[new u(`^`,`pow`,[n.clone(),y(2)]),y(1)])])]);break;case`acoth`:i=!0,a=!0,o=new u(`-`,`subtract`,[y(1),new u(`^`,`pow`,[n.clone(),y(2)])]);break;case`abs`:o=new u(`/`,`divide`,[new l(new f(`abs`),[n.clone()]),n.clone()]);break;default:throw Error(`Cannot process function "`+e.name+`" in derivative: the function is not supported, undefined, or the number of arguments passed to it are not supported`)}var s,c;i?(s=`/`,c=`divide`):(s=`*`,c=`multiply`);var d=v(n,t);return a&&(d=new u(`-`,`unaryMinus`,[d])),new u(s,c,[d,o])},"OperatorNode, function":function(e,t){if(t(e))return y(0);if(e.op===`+`)return new u(e.op,e.fn,e.args.map(function(e){return v(e,t)}));if(e.op===`-`){if(e.isUnary())return new u(e.op,e.fn,[v(e.args[0],t)]);if(e.isBinary())return new u(e.op,e.fn,[v(e.args[0],t),v(e.args[1],t)])}if(e.op===`*`){var n=e.args.filter(function(e){return t(e)});if(n.length>0){var r=e.args.filter(function(e){return!t(e)}),i=r.length===1?r[0]:new u(`*`,`multiply`,r);return new u(`*`,`multiply`,n.concat(v(i,t)))}return new u(`+`,`add`,e.args.map(function(n){return new u(`*`,`multiply`,e.args.map(function(e){return e===n?v(e,t):e.clone()}))}))}if(e.op===`/`&&e.isBinary()){var s=e.args[0],c=e.args[1];return t(c)?new u(`/`,`divide`,[v(s,t),c]):t(s)?new u(`*`,`multiply`,[new u(`-`,`unaryMinus`,[s]),new u(`/`,`divide`,[v(c,t),new u(`^`,`pow`,[c.clone(),y(2)])])]):new u(`/`,`divide`,[new u(`-`,`subtract`,[new u(`*`,`multiply`,[v(s,t),c.clone()]),new u(`*`,`multiply`,[s.clone(),v(c,t)])]),new u(`^`,`pow`,[c.clone(),y(2)])])}if(e.op===`^`&&e.isBinary()){var d=e.args[0],f=e.args[1];if(t(d))return lT(d)&&(o(d.value)||a(d.value,1))?y(0):new u(`*`,`multiply`,[e,new u(`*`,`multiply`,[new l(`log`,[d.clone()]),v(f.clone(),t)])]);if(t(f)){if(lT(f)){if(o(f.value))return y(0);if(a(f.value,1))return v(d,t)}var p=new u(`^`,`pow`,[d.clone(),new u(`-`,`subtract`,[f,y(1)])]);return new u(`*`,`multiply`,[f.clone(),new u(`*`,`multiply`,[v(d,t),p])])}return new u(`*`,`multiply`,[new u(`^`,`pow`,[d.clone(),f.clone()]),new u(`+`,`add`,[new u(`*`,`multiply`,[v(d,t),new u(`/`,`divide`,[f.clone(),d.clone()])]),new u(`*`,`multiply`,[v(f,t),new l(`log`,[d.clone()])])])])}throw Error(`Cannot process operator "`+e.op+`" in derivative: the operator is not supported, undefined, or the number of arguments passed to it are not supported`)}});function y(e,t){return new c(s(e,t||FT(String(e),n)))}return h}),KU=`rationalize`,qU=K(KU,`config.typed.equal.isZero.add.subtract.multiply.divide.pow.parse.simplifyConstant.simplifyCore.simplify.?bignumber.?fraction.mathWithTransform.matrix.AccessorNode.ArrayNode.ConstantNode.FunctionNode.IndexNode.ObjectNode.OperatorNode.SymbolNode.ParenthesisNode`.split(`.`),e=>{var{config:t,typed:n,equal:r,isZero:i,add:a,subtract:o,multiply:s,divide:c,pow:l,parse:u,simplifyConstant:d,simplifyCore:f,simplify:p,fraction:m,bignumber:h,mathWithTransform:g,matrix:_,AccessorNode:v,ArrayNode:y,ConstantNode:b,FunctionNode:x,IndexNode:S,ObjectNode:C,OperatorNode:w,SymbolNode:T,ParenthesisNode:E}=e;function D(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=k(),i=O(e,t,!0,r.firstRules),a=i.variables.length,o={exactFractions:!1},s={exactFractions:!0};if(e=i.expression,a>=1){e=A(e);var c,l,u=!0,d=!1;e=p(e,r.firstRules,{},o);for(var f;l=u?r.distrDivRules:r.sucDivRules,e=p(e,l,{},s),u=!u,f=e.toString(),f!==c;)d=!0,c=f;d&&(e=p(e,r.firstRulesAgain,{},o)),e=p(e,r.finalRules,{},o)}var m=[],h={};return e.type===`OperatorNode`&&e.isBinary()&&e.op===`/`?(a===1&&(e.args[0]=j(e.args[0],m),e.args[1]=j(e.args[1])),n&&(h.numerator=e.args[0],h.denominator=e.args[1])):(a===1&&(e=j(e,m)),n&&(h.numerator=e,h.denominator=null)),n?(h.coefficients=m,h.variables=i.variables,h.expression=e,h):e}return n(KU,{Node:D,"Node, boolean":(e,t)=>D(e,{},t),"Node, Object":D,"Node, Object, boolean":D});function O(e,t,n,r){var i=[],a=p(e,r,t,{exactFractions:!1});n=!!n;var o=`+-*`+(n?`/`:``);c(a);var s={};return s.expression=a,s.variables=i,s;function c(e){var t=e.type;if(t===`FunctionNode`)throw Error(`There is an unsolved function call`);if(t===`OperatorNode`)if(e.op===`^`){if(e.args[1].type!==`ConstantNode`||!q(parseFloat(e.args[1].value)))throw Error(`There is a non-integer exponent`);c(e.args[0])}else{if(!o.includes(e.op))throw Error(`Operator `+e.op+` invalid in polynomial expression`);for(var n=0;n<e.args.length;n++)c(e.args[n])}else if(t===`SymbolNode`){var r=e.name;i.indexOf(r)===-1&&i.push(r)}else if(t===`ParenthesisNode`)c(e.content);else if(t!==`ConstantNode`)throw Error(`type `+t+` is not allowed in polynomial expression`)}}function k(){var e=[f,{l:`n+n`,r:`2*n`},{l:`n+-n`,r:`0`},d,{l:`n*(n1^-1)`,r:`n/n1`},{l:`n*n1^-n2`,r:`n/n1^n2`},{l:`n1^-1`,r:`1/n1`},{l:`n*(n1/n2)`,r:`(n*n1)/n2`},{l:`1*n`,r:`n`}],t=[{l:`(-n1)/(-n2)`,r:`n1/n2`},{l:`(-n1)*(-n2)`,r:`n1*n2`},{l:`n1--n2`,r:`n1+n2`},{l:`n1-n2`,r:`n1+(-n2)`},{l:`(n1+n2)*n3`,r:`(n1*n3 + n2*n3)`},{l:`n1*(n2+n3)`,r:`(n1*n2+n1*n3)`},{l:`c1*n + c2*n`,r:`(c1+c2)*n`},{l:`c1*n + n`,r:`(c1+1)*n`},{l:`c1*n - c2*n`,r:`(c1-c2)*n`},{l:`c1*n - n`,r:`(c1-1)*n`},{l:`v/c`,r:`(1/c)*v`},{l:`v/-c`,r:`-(1/c)*v`},{l:`-v*-c`,r:`c*v`},{l:`-v*c`,r:`-c*v`},{l:`v*-c`,r:`-c*v`},{l:`v*c`,r:`c*v`},{l:`-(-n1*n2)`,r:`(n1*n2)`},{l:`-(n1*n2)`,r:`(-n1*n2)`},{l:`-(-n1+n2)`,r:`(n1-n2)`},{l:`-(n1+n2)`,r:`(-n1-n2)`},{l:`(n1^n2)^n3`,r:`(n1^(n2*n3))`},{l:`-(-n1/n2)`,r:`(n1/n2)`},{l:`-(n1/n2)`,r:`(-n1/n2)`}],n=[{l:`(n1/n2 + n3/n4)`,r:`((n1*n4 + n3*n2)/(n2*n4))`},{l:`(n1/n2 + n3)`,r:`((n1 + n3*n2)/n2)`},{l:`(n1 + n2/n3)`,r:`((n1*n3 + n2)/n3)`}],r=[{l:`(n1/(n2/n3))`,r:`((n1*n3)/n2)`},{l:`(n1/n2/n3)`,r:`(n1/(n2*n3))`}],i={};return i.firstRules=e.concat(t,r),i.distrDivRules=n,i.sucDivRules=r,i.firstRulesAgain=e.concat(t),i.finalRules=[f,{l:`n*-n`,r:`-n^2`},{l:`n*n`,r:`n^2`},d,{l:`n*-n^n1`,r:`-n^(n1+1)`},{l:`n*n^n1`,r:`n^(n1+1)`},{l:`n^n1*-n^n2`,r:`-n^(n1+n2)`},{l:`n^n1*n^n2`,r:`n^(n1+n2)`},{l:`n^n1*-n`,r:`-n^(n1+1)`},{l:`n^n1*n`,r:`n^(n1+1)`},{l:`n^n1/-n`,r:`-n^(n1-1)`},{l:`n^n1/n`,r:`n^(n1-1)`},{l:`n/-n^n1`,r:`-n^(1-n1)`},{l:`n/n^n1`,r:`n^(1-n1)`},{l:`n^n1/-n^n2`,r:`n^(n1-n2)`},{l:`n^n1/n^n2`,r:`n^(n1-n2)`},{l:`n1+(-n2*n3)`,r:`n1-n2*n3`},{l:`v*(-c)`,r:`-c*v`},{l:`n1+-n2`,r:`n1-n2`},{l:`v*c`,r:`c*v`},{l:`(n1^n2)^n3`,r:`(n1^(n2*n3))`}],i}function A(e,t,n){var r=e.type,i=arguments.length>1;if(r===`OperatorNode`&&e.isBinary()){var a=!1,o;if(e.op===`^`&&(e.args[0].type===`ParenthesisNode`||e.args[0].type===`OperatorNode`)&&e.args[1].type===`ConstantNode`&&(o=parseFloat(e.args[1].value),a=o>=2&&q(o)),a){if(o>2){var s=e.args[0];e=new w(`*`,`multiply`,[s,new w(`^`,`pow`,[e.args[0].cloneDeep(),new b(o-1)])])}else e=new w(`*`,`multiply`,[e.args[0],e.args[0].cloneDeep()]);i&&(n===`content`?t.content=e:t.args[n]=e)}}if(r===`ParenthesisNode`)A(e.content,e,`content`);else if(r!==`ConstantNode`&&r!==`SymbolNode`)for(var c=0;c<e.args.length;c++)A(e.args[c],e,c);if(!i)return e}function j(e,t){t===void 0&&(t=[]),t[0]=0;var n={};n.cte=1,n.oper=`+`,n.fire=``;var r=0,i=``;f(e,null,n),r=t.length-1;for(var a=!0,o,s=r;s>=0;s--)if(t[s]!==0){var c=new b(a?t[s]:Math.abs(t[s])),l=t[s]<0?`-`:`+`;if(s>0){var u=new T(i);if(s>1){var d=new b(s);u=new w(`^`,`pow`,[u,d])}c=t[s]===-1&&a?new w(`-`,`unaryMinus`,[u]):Math.abs(t[s])===1?u:new w(`*`,`multiply`,[c,u])}o=a?c:l===`+`?new w(`+`,`add`,[o,c]):new w(`-`,`subtract`,[o,c]),a=!1}if(a)return new b(0);return o;function f(e,n,a){var o=e.type;if(o===`FunctionNode`)throw Error(`There is an unsolved function call`);if(o===`OperatorNode`){if(!`+-*^`.includes(e.op))throw Error(`Operator `+e.op+` invalid`);if(n!==null&&((e.fn===`unaryMinus`||e.fn===`pow`)&&n.fn!==`add`&&n.fn!==`subtract`&&n.fn!==`multiply`||(e.fn===`subtract`||e.fn===`add`||e.fn===`multiply`)&&n.fn!==`add`&&n.fn!==`subtract`||(e.fn===`subtract`||e.fn===`add`||e.fn===`unaryMinus`)&&a.noFil!==0))throw Error(`Invalid `+e.op+` placing`);(e.op===`^`||e.op===`*`)&&(a.fire=e.op);for(var s=0;s<e.args.length;s++)e.fn===`unaryMinus`&&(a.oper=`-`),(e.op===`+`||e.fn===`subtract`)&&(a.fire=``,a.cte=1,a.oper=s===0?`+`:e.op),a.noFil=s,f(e.args[s],e,a)}else if(o===`SymbolNode`){if(e.name!==i&&i!==``)throw Error(`There is more than one variable`);if(i=e.name,n===null){t[1]=1;return}if(n.op===`^`&&a.noFil!==0)throw Error(`In power the variable should be the first parameter`);if(n.op===`*`&&a.noFil!==1)throw Error(`In multiply the variable should be the second parameter`);(a.fire===``||a.fire===`*`)&&(r<1&&(t[1]=0),t[1]+=a.cte*(a.oper===`+`?1:-1),r=Math.max(1,r))}else if(o===`ConstantNode`){var c=parseFloat(e.value);if(n===null){t[0]=c;return}if(n.op===`^`){if(a.noFil!==1)throw Error(`Constant cannot be powered`);if(!q(c)||c<=0)throw Error(`Non-integer exponent is not allowed`);for(var l=r+1;l<c;l++)t[l]=0;c>r&&(t[c]=0),t[c]+=a.cte*(a.oper===`+`?1:-1),r=Math.max(c,r);return}a.cte=c,a.fire===``&&(t[0]+=a.cte*(a.oper===`+`?1:-1))}else throw Error(`Type `+o+` is not allowed`)}}}),JU=`zpk2tf`,YU=K(JU,[`typed`,`add`,`multiply`,`Complex`,`number`],e=>{var{typed:t,add:n,multiply:r,Complex:i,number:a}=e;return t(JU,{"Array,Array,number":function(e,t,n){return o(e,t,n)},"Array,Array":function(e,t){return o(e,t,1)},"Matrix,Matrix,number":function(e,t,n){return o(e.valueOf(),t.valueOf(),n)},"Matrix,Matrix":function(e,t){return o(e.valueOf(),t.valueOf(),1)}});function o(e,t,n){e.some(e=>e.type===`BigNumber`)&&(e=e.map(e=>a(e))),t.some(e=>e.type===`BigNumber`)&&(t=t.map(e=>a(e)));for(var o=[i(1,0)],c=[i(1,0)],l=0;l<e.length;l++){var u=e[l];typeof u==`number`&&(u=i(u,0)),o=s(o,[i(1,0),i(-u.re,-u.im)])}for(var d=0;d<t.length;d++){var f=t[d];typeof f==`number`&&(f=i(f,0)),c=s(c,[i(1,0),i(-f.re,-f.im)])}for(var p=0;p<o.length;p++)o[p]=r(o[p],n);return[o,c]}function s(e,t){for(var a=[],o=0;o<e.length+t.length-1;o++){a[o]=i(0,0);for(var s=0;s<e.length;s++)o-s>=0&&o-s<t.length&&(a[o]=n(a[o],r(e[s],t[o-s])))}return a}}),XU=`freqz`,ZU=K(XU,[`typed`,`add`,`multiply`,`Complex`,`divide`,`matrix`],e=>{var{typed:t,add:n,multiply:r,Complex:i,divide:a,matrix:o}=e;return t(XU,{"Array, Array":function(e,t){return s(e,t,c(512))},"Array, Array, Array":function(e,t,n){return s(e,t,n)},"Array, Array, number":function(e,t,n){if(n<0)throw Error(`w must be a positive number`);return s(e,t,c(n))},"Matrix, Matrix":function(e,t){var n=c(512),{w:r,h:i}=s(e.valueOf(),t.valueOf(),n);return{w:o(r),h:o(i)}},"Matrix, Matrix, Matrix":function(e,t,n){var{h:r}=s(e.valueOf(),t.valueOf(),n.valueOf());return{h:o(r),w:o(n)}},"Matrix, Matrix, number":function(e,t,n){if(n<0)throw Error(`w must be a positive number`);var r=c(n),{h:i}=s(e.valueOf(),t.valueOf(),r);return{h:o(i),w:o(r)}}});function s(e,t,o){for(var s=[],c=[],l=0;l<o.length;l++){for(var u=i(0,0),d=i(0,0),f=0;f<e.length;f++)u=n(u,r(e[f],i(Math.cos(-f*o[l]),Math.sin(-f*o[l]))));for(var p=0;p<t.length;p++)d=n(d,r(t[p],i(Math.cos(-p*o[l]),Math.sin(-p*o[l]))));s.push(u),c.push(d)}for(var m=[],h=0;h<s.length;h++)m.push(a(s[h],c[h]));return{h:m,w:o}}function c(e){for(var t=[],n=0;n<e;n++)t.push(n/e*Math.PI);return t}}),QU=K(`reviver`,[`classes`],e=>{var{classes:t}=e;return function(e,n){var r=t[n&&n.mathjs];return r&&typeof r.fromJSON==`function`?r.fromJSON(n):n}}),$U=K(`replacer`,[],()=>function(e,t){return typeof t==`number`&&(!Number.isFinite(t)||isNaN(t))?{mathjs:`number`,value:String(t)}:typeof t==`bigint`?{mathjs:`bigint`,value:String(t)}:t}),eW=`15.1.1`,tW=K(`true`,[],()=>!0),nW=K(`false`,[],()=>!1),rW=K(`null`,[],()=>null),iW=vW(`Infinity`,[`config`,`?BigNumber`],e=>{var{config:t,BigNumber:n}=e;return t.number===`BigNumber`?new n(1/0):1/0}),aW=vW(`NaN`,[`config`,`?BigNumber`],e=>{var{config:t,BigNumber:n}=e;return t.number===`BigNumber`?new n(NaN):NaN}),oW=vW(`pi`,[`config`,`?BigNumber`],e=>{var{config:t,BigNumber:n}=e;return t.number===`BigNumber`?dR(n):RA}),sW=vW(`tau`,[`config`,`?BigNumber`],e=>{var{config:t,BigNumber:n}=e;return t.number===`BigNumber`?fR(n):zA}),cW=vW(`e`,[`config`,`?BigNumber`],e=>{var{config:t,BigNumber:n}=e;return t.number===`BigNumber`?lR(n):BA}),lW=vW(`phi`,[`config`,`?BigNumber`],e=>{var{config:t,BigNumber:n}=e;return t.number===`BigNumber`?uR(n):VA}),uW=vW(`LN2`,[`config`,`?BigNumber`],e=>{var{config:t,BigNumber:n}=e;return t.number===`BigNumber`?new n(2).ln():Math.LN2}),dW=vW(`LN10`,[`config`,`?BigNumber`],e=>{var{config:t,BigNumber:n}=e;return t.number===`BigNumber`?new n(10).ln():Math.LN10}),fW=vW(`LOG2E`,[`config`,`?BigNumber`],e=>{var{config:t,BigNumber:n}=e;return t.number===`BigNumber`?new n(1).div(new n(2).ln()):Math.LOG2E}),pW=vW(`LOG10E`,[`config`,`?BigNumber`],e=>{var{config:t,BigNumber:n}=e;return t.number===`BigNumber`?new n(1).div(new n(10).ln()):Math.LOG10E}),mW=vW(`SQRT1_2`,[`config`,`?BigNumber`],e=>{var{config:t,BigNumber:n}=e;return t.number===`BigNumber`?new n(`0.5`).sqrt():Math.SQRT1_2}),hW=vW(`SQRT2`,[`config`,`?BigNumber`],e=>{var{config:t,BigNumber:n}=e;return t.number===`BigNumber`?new n(2).sqrt():Math.SQRT2}),gW=vW(`i`,[`Complex`],e=>{var{Complex:t}=e;return t.I}),_W=K(`version`,[],()=>eW);function vW(e,t,n){return K(e,t,n,{recreateOnConfigChange:!0})}var yW=gG(`speedOfLight`,`299792458`,`m s^-1`),bW=gG(`gravitationConstant`,`6.67430e-11`,`m^3 kg^-1 s^-2`),xW=gG(`planckConstant`,`6.62607015e-34`,`J s`),SW=gG(`reducedPlanckConstant`,`1.0545718176461565e-34`,`J s`),CW=gG(`magneticConstant`,`1.25663706212e-6`,`N A^-2`),wW=gG(`electricConstant`,`8.8541878128e-12`,`F m^-1`),TW=gG(`vacuumImpedance`,`376.730313667`,`ohm`),EW=gG(`coulomb`,`8.987551792261171e9`,`N m^2 C^-2`),DW=gG(`coulombConstant`,`8.987551792261171e9`,`N m^2 C^-2`),OW=gG(`elementaryCharge`,`1.602176634e-19`,`C`),kW=gG(`bohrMagneton`,`9.2740100783e-24`,`J T^-1`),AW=gG(`conductanceQuantum`,`7.748091729863649e-5`,`S`),jW=gG(`inverseConductanceQuantum`,`12906.403729652257`,`ohm`),MW=gG(`magneticFluxQuantum`,`2.0678338484619295e-15`,`Wb`),NW=gG(`nuclearMagneton`,`5.0507837461e-27`,`J T^-1`),PW=gG(`klitzing`,`25812.807459304513`,`ohm`),FW=gG(`bohrRadius`,`5.29177210903e-11`,`m`),IW=gG(`classicalElectronRadius`,`2.8179403262e-15`,`m`),LW=gG(`electronMass`,`9.1093837015e-31`,`kg`),RW=gG(`fermiCoupling`,`1.1663787e-5`,`GeV^-2`),zW=_G(`fineStructure`,.0072973525693),BW=gG(`hartreeEnergy`,`4.3597447222071e-18`,`J`),VW=gG(`protonMass`,`1.67262192369e-27`,`kg`),HW=gG(`deuteronMass`,`3.3435830926e-27`,`kg`),UW=gG(`neutronMass`,`1.6749271613e-27`,`kg`),WW=gG(`quantumOfCirculation`,`3.6369475516e-4`,`m^2 s^-1`),GW=gG(`rydberg`,`10973731.568160`,`m^-1`),KW=gG(`thomsonCrossSection`,`6.6524587321e-29`,`m^2`),qW=_G(`weakMixingAngle`,.2229),JW=_G(`efimovFactor`,22.7),YW=gG(`atomicMass`,`1.66053906660e-27`,`kg`),XW=gG(`avogadro`,`6.02214076e23`,`mol^-1`),ZW=gG(`boltzmann`,`1.380649e-23`,`J K^-1`),QW=gG(`faraday`,`96485.33212331001`,`C mol^-1`),$W=gG(`firstRadiation`,`3.7417718521927573e-16`,`W m^2`),eG=gG(`loschmidt`,`2.686780111798444e25`,`m^-3`),tG=gG(`gasConstant`,`8.31446261815324`,`J K^-1 mol^-1`),nG=gG(`molarPlanckConstant`,`3.990312712893431e-10`,`J s mol^-1`),rG=gG(`molarVolume`,`0.022413969545014137`,`m^3 mol^-1`),iG=_G(`sackurTetrode`,-1.16487052358),aG=gG(`secondRadiation`,`0.014387768775039337`,`m K`),oG=gG(`stefanBoltzmann`,`5.67037441918443e-8`,`W m^-2 K^-4`),sG=gG(`wienDisplacement`,`2.897771955e-3`,`m K`),cG=gG(`molarMass`,`0.99999999965e-3`,`kg mol^-1`),lG=gG(`molarMassC12`,`11.9999999958e-3`,`kg mol^-1`),uG=gG(`gravity`,`9.80665`,`m s^-2`),dG=gG(`planckLength`,`1.616255e-35`,`m`),fG=gG(`planckMass`,`2.176435e-8`,`kg`),pG=gG(`planckTime`,`5.391245e-44`,`s`),mG=gG(`planckCharge`,`1.87554603778e-18`,`C`),hG=gG(`planckTemperature`,`1.416785e+32`,`K`);function gG(e,t,n){return K(e,[`config`,`Unit`,`BigNumber`],e=>{var{config:r,Unit:i,BigNumber:a}=e,o=new i(r.number===`BigNumber`?new a(t):parseFloat(t),n);return o.fixPrefix=!0,o})}function _G(e,t){return K(e,[`config`,`BigNumber`],e=>{var{config:n,BigNumber:r}=e;return n.number===`BigNumber`?new r(t):t})}function vG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function yG(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?vG(Object(n),!0).forEach(function(t){YF(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vG(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var bG=K(`mapSlices`,[`typed`,`isInteger`],e=>{var{typed:t,isInteger:n}=e,r=NM({typed:t,isInteger:n});return t(`mapSlices`,{"...any":function(e){var t=e[1];Pw(t)?e[1]=t-1:Fw(t)&&(e[1]=t.minus(1));try{return r.apply(null,e)}catch(e){throw Xz(e)}}})},yG({isTransformFunction:!0},NM.meta)),xG=K(`column`,[`typed`,`Index`,`matrix`,`range`],e=>{var{typed:t,Index:n,matrix:r,range:i}=e,a=VP({typed:t,Index:n,matrix:r,range:i});return t(`column`,{"...any":function(e){var t=e.length-1,n=e[t];Pw(n)&&(e[t]=n-1);try{return a.apply(null,e)}catch(e){throw Xz(e)}}})},{isTransformFunction:!0});function SG(e,t,n){var r=e.filter(function(e){return bT(e)&&!(e.name in t)&&!n.has(e.name)})[0];if(!r)throw Error(`No undefined variable found in inline expression "`+e+`"`);var i=r.name,a=new Map,o=new kw(n,a,new Set([i])),s=e.compile();return function(e){return a.set(i,e),s.evaluate(o)}}var CG=K(`transformCallback`,[`typed`],e=>{var{typed:t}=e;return function(e,r){return t.isTypedFunction(e)?n(e,r):wG(e,e.length,r)};function n(e,r){var i=Object.fromEntries(Object.entries(e.signatures).map(e=>{var[i,a]=e,o=i.split(`,`).length;return t.isTypedFunction(a)?[i,n(a,r)]:[i,wG(a,o,r)]}));return typeof e.name==`string`?t(e.name,i):t(i)}});function wG(e,t,n){return t===n?e:t===n+1?function(){for(var t=arguments.length,r=Array(t),i=0;i<t;i++)r[i]=arguments[i];var a=r.slice(0,n),o=TG(r[n]);return e(...a,o)}:t>n+1?function(){for(var t=arguments.length,r=Array(t),i=0;i<t;i++)r[i]=arguments[i];var a=r.slice(0,n),o=TG(r[n]),s=r.slice(n+1);return e(...a,o,...s)}:e}function TG(e){return e.map(e=>e+1)}var EG=K(`filter`,[`typed`],e=>{var{typed:t}=e;function n(e,n,i){var a=JP({typed:t}),o=CG({typed:t});if(e.length===0)return a();var s=e[0];if(e.length===1)return a(s);var c=e.length-1,l=e[c];return s&&=r(s,i),l&&=bT(l)||dT(l)?r(l,i):SG(l,n,i),a(s,o(l,c))}n.rawArgs=!0;function r(e,t){return e.compile().evaluate(t)}return n},{isTransformFunction:!0}),DG=K(`forEach`,[`typed`],e=>{var{typed:t}=e,n=$P({typed:t}),r=CG({typed:t});function i(e,t,i){if(e.length===0)return n();var o=e[0];if(e.length===1)return n(o);var s=e.length-1,c=e[s];return o&&=a(o,i),c&&=bT(c)||dT(c)?a(c,i):SG(c,t,i),n(o,r(c,s))}i.rawArgs=!0;function a(e,t){return e.compile().evaluate(t)}return i},{isTransformFunction:!0}),OG=K(`index`,[`Index`,`getMatrixDataType`],e=>{var{Index:t,getMatrixDataType:n}=e;return function(){for(var e=[],r=0,i=arguments.length;r<i;r++){var a=arguments[r];if(Kw(a))a.start--,a.end-=a.step>0?0:2;else if(a&&a.isSet===!0)a=a.map(function(e){return e-1});else if(Vw(a)||Hw(a))n(a)!==`boolean`&&(a=a.map(function(e){return e-1}));else if(Pw(a)||Iw(a))a--;else if(Fw(a))a=a.toNumber()-1;else if(typeof a!=`string`)throw TypeError(`Dimension must be an Array, Matrix, number, bigint, string, or Range`);e[r]=a}var o=new t;return t.apply(o,e),o}},{isTransformFunction:!0}),kG=K(`map`,[`typed`],e=>{var{typed:t}=e,n=cF({typed:t}),r=CG({typed:t});function i(e,t,i){if(e.length===0)return n();if(e.length===1)return n(e[0]);var a=e.length-1,o=e.slice(0,a),s=e[a];return o=o.map(e=>c(e,i)),s&&=bT(s)||dT(s)?c(s,i):SG(s,t,i),n(...o,r(s,a));function c(e,t){return e.compile().evaluate(t)}}return i.rawArgs=!0,i},{isTransformFunction:!0});function AG(e){return Pw(e)?e-1:Fw(e)?e.minus(1):e}function jG(e){return Pw(e)||Fw(e)}function MG(e){if(e.length===2&&Uw(e[0])){e=e.slice();var t=e[1];jG(t)&&(e[1]=AG(t))}return e}var NG=K(`max`,[`typed`,`config`,`numeric`,`larger`,`isNaN`],e=>{var{typed:t,config:n,numeric:r,larger:i,isNaN:a}=e,o=$L({typed:t,config:n,numeric:r,larger:i,isNaN:a});return t(`max`,{"...any":function(e){e=MG(e);try{return o.apply(null,e)}catch(e){throw Xz(e)}}})},{isTransformFunction:!0}),PG=K(`mean`,[`typed`,`add`,`divide`],e=>{var{typed:t,add:n,divide:r}=e,i=xH({typed:t,add:n,divide:r});return t(`mean`,{"...any":function(e){e=MG(e);try{return i.apply(null,e)}catch(e){throw Xz(e)}}})},{isTransformFunction:!0}),FG=K(`min`,[`typed`,`config`,`numeric`,`smaller`,`isNaN`],e=>{var{typed:t,config:n,numeric:r,smaller:i,isNaN:a}=e,o=tR({typed:t,config:n,numeric:r,smaller:i,isNaN:a});return t(`min`,{"...any":function(e){e=MG(e);try{return o.apply(null,e)}catch(e){throw Xz(e)}}})},{isTransformFunction:!0}),IG=K(`range`,[`typed`,`config`,`?matrix`,`?bignumber`,`equal`,`smaller`,`smallerEq`,`larger`,`largerEq`,`add`,`isZero`,`isPositive`],e=>{var{typed:t,config:n,matrix:r,bignumber:i,equal:a,smaller:o,smallerEq:s,larger:c,largerEq:l,add:u,isZero:d,isPositive:f}=e,p=gF({typed:t,config:n,matrix:r,bignumber:i,equal:a,smaller:o,smallerEq:s,larger:c,largerEq:l,add:u,isZero:d,isPositive:f});return t(`range`,{"...any":function(e){return typeof e[e.length-1]!=`boolean`&&e.push(!0),p.apply(null,e)}})},{isTransformFunction:!0}),LG=K(`row`,[`typed`,`Index`,`matrix`,`range`],e=>{var{typed:t,Index:n,matrix:r,range:i}=e,a=TF({typed:t,Index:n,matrix:r,range:i});return t(`row`,{"...any":function(e){var t=e.length-1,n=e[t];Pw(n)&&(e[t]=n-1);try{return a.apply(null,e)}catch(e){throw Xz(e)}}})},{isTransformFunction:!0}),RG=K(`subset`,[`typed`,`matrix`,`zeros`,`add`],e=>{var{typed:t,matrix:n,zeros:r,add:i}=e,a=jF({typed:t,matrix:n,zeros:r,add:i});return t(`subset`,{"...any":function(e){try{return a.apply(null,e)}catch(e){throw Xz(e)}}})},{isTransformFunction:!0}),zG=K(`concat`,[`typed`,`matrix`,`isInteger`],e=>{var{typed:t,matrix:n,isInteger:r}=e,i=zP({typed:t,matrix:n,isInteger:r});return t(`concat`,{"...any":function(e){var t=e.length-1,n=e[t];Pw(n)?e[t]=n-1:Fw(n)&&(e[t]=n.minus(1));try{return i.apply(null,e)}catch(e){throw Xz(e)}}})},{isTransformFunction:!0}),BG=`diff`,VG=K(BG,[`typed`,`matrix`,`subtract`,`number`,`bignumber`],e=>{var{typed:t,matrix:n,subtract:r,number:i,bignumber:a}=e,o=uF({typed:t,matrix:n,subtract:r,number:i,bignumber:a});return t(BG,{"...any":function(e){e=MG(e);try{return o.apply(null,e)}catch(e){throw Xz(e)}}})},{isTransformFunction:!0}),HG=K(`std`,[`typed`,`map`,`sqrt`,`variance`],e=>{var{typed:t,map:n,sqrt:r,variance:i}=e,a=MH({typed:t,map:n,sqrt:r,variance:i});return t(`std`,{"...any":function(e){e=MG(e);try{return a.apply(null,e)}catch(e){throw Xz(e)}}})},{isTransformFunction:!0}),UG=`sum`,WG=K(UG,[`typed`,`config`,`add`,`numeric`],e=>{var{typed:t,config:n,add:r,numeric:i}=e,a=_H({typed:t,config:n,add:r,numeric:i});return t(UG,{"...any":function(e){e=MG(e);try{return a.apply(null,e)}catch(e){throw Xz(e)}}})},{isTransformFunction:!0}),GG=K(`quantileSeq`,[`typed`,`bignumber`,`add`,`subtract`,`divide`,`multiply`,`partitionSelect`,`compare`,`isInteger`,`smaller`,`smallerEq`,`larger`,`mapSlices`],e=>{var{typed:t,bignumber:n,add:r,subtract:i,divide:a,multiply:o,partitionSelect:s,compare:c,isInteger:l,smaller:u,smallerEq:d,larger:f,mapSlices:p}=e,m=AH({typed:t,bignumber:n,add:r,subtract:i,divide:a,multiply:o,partitionSelect:s,compare:c,isInteger:l,smaller:u,smallerEq:d,larger:f,mapSlices:p});return t(`quantileSeq`,{"Array | Matrix, number | BigNumber":m,"Array | Matrix, number | BigNumber, number":(e,t,n)=>m(e,t,h(n)),"Array | Matrix, number | BigNumber, boolean":m,"Array | Matrix, number | BigNumber, boolean, number":(e,t,n,r)=>m(e,t,n,h(r)),"Array | Matrix, Array | Matrix":m,"Array | Matrix, Array | Matrix, number":(e,t,n)=>m(e,t,h(n)),"Array | Matrix, Array | Matrix, boolean":m,"Array | Matrix, Array | Matrix, boolean, number":(e,t,n,r)=>m(e,t,n,h(r))});function h(e){return MG([[],e])[1]}},{isTransformFunction:!0}),KG=`cumsum`,qG=K(KG,[`typed`,`add`,`unaryPlus`],e=>{var{typed:t,add:n,unaryPlus:r}=e,i=yH({typed:t,add:n,unaryPlus:r});return t(KG,{"...any":function(e){if(e.length===2&&Uw(e[0])){var t=e[1];Pw(t)?e[1]=t-1:Fw(t)&&(e[1]=t.minus(1))}try{return i.apply(null,e)}catch(e){throw Xz(e)}}})},{isTransformFunction:!0}),JG=`variance`,YG=K(JG,[`typed`,`add`,`subtract`,`multiply`,`divide`,`mapSlices`,`isNaN`],e=>{var{typed:t,add:n,subtract:r,multiply:i,divide:a,mapSlices:o,isNaN:s}=e,c=OH({typed:t,add:n,subtract:r,multiply:i,divide:a,mapSlices:o,isNaN:s});return t(JG,{"...any":function(e){e=MG(e);try{return c.apply(null,e)}catch(e){throw Xz(e)}}})},{isTransformFunction:!0}),XG=`print`,ZG=K(XG,[`typed`,`matrix`,`zeros`,`add`],e=>{var{typed:t,matrix:n,zeros:r,add:i}=e,a=SI({typed:t,matrix:n,zeros:r,add:i});return t(XG,{"string, Object | Array":function(e,t){return a(o(e),t)},"string, Object | Array, number | Object":function(e,t,n){return a(o(e),t,n)}});function o(e){return e.replace(bI,e=>`$`+e.slice(1).split(`.`).map(function(e){return!isNaN(e)&&e.length>0?parseInt(e)-1:e}).join(`.`))}},{isTransformFunction:!0}),QG=K(`and`,[`typed`,`matrix`,`zeros`,`add`,`equalScalar`,`not`,`concat`],e=>{var{typed:t,matrix:n,equalScalar:r,zeros:i,not:a,concat:o}=e,s=mL({typed:t,matrix:n,equalScalar:r,zeros:i,not:a,concat:o});function c(e,t,n){var r=e[0].compile().evaluate(n);return!Uw(r)&&!s(r,!0)?!1:s(r,e[1].compile().evaluate(n))}return c.rawArgs=!0,c},{isTransformFunction:!0}),$G=K(`or`,[`typed`,`matrix`,`equalScalar`,`DenseMatrix`,`concat`],e=>{var{typed:t,matrix:n,equalScalar:r,DenseMatrix:i,concat:a}=e,o=FP({typed:t,matrix:n,equalScalar:r,DenseMatrix:i,concat:a});function s(e,t,n){var r=e[0].compile().evaluate(n);return!Uw(r)&&o(r,!1)?!0:o(r,e[1].compile().evaluate(n))}return s.rawArgs=!0,s},{isTransformFunction:!0}),eK=K(`nullish`,[`typed`,`matrix`,`size`,`flatten`,`deepEqual`],e=>{var{typed:t,matrix:n,size:r,flatten:i,deepEqual:a}=e,o=NP({typed:t,matrix:n,size:r,flatten:i,deepEqual:a});function s(e,t,n){var r=e[0].compile().evaluate(n);return!Uw(r)&&r!=null&&r!==void 0?r:o(r,e[1].compile().evaluate(n))}return s.rawArgs=!0,s},{isTransformFunction:!0}),tK=K(`bitAnd`,[`typed`,`matrix`,`zeros`,`add`,`equalScalar`,`not`,`concat`],e=>{var{typed:t,matrix:n,equalScalar:r,zeros:i,not:a,concat:o}=e,s=mP({typed:t,matrix:n,equalScalar:r,zeros:i,not:a,concat:o});function c(e,t,n){var r=e[0].compile().evaluate(n);if(!Uw(r)){if(isNaN(r))return NaN;if(r===0||r===!1)return 0}return s(r,e[1].compile().evaluate(n))}return c.rawArgs=!0,c},{isTransformFunction:!0}),nK=K(`bitOr`,[`typed`,`matrix`,`equalScalar`,`DenseMatrix`,`concat`],e=>{var{typed:t,matrix:n,equalScalar:r,DenseMatrix:i,concat:a}=e,o=vP({typed:t,matrix:n,equalScalar:r,DenseMatrix:i,concat:a});function s(e,t,n){var r=e[0].compile().evaluate(n);if(!Uw(r)){if(isNaN(r))return NaN;if(r===-1)return-1;if(r===!0)return 1}return o(r,e[1].compile().evaluate(n))}return s.rawArgs=!0,s},{isTransformFunction:!0}),Z=rO({config:G}),rK=fO({}),iK=cW({BigNumber:Z,config:G}),aK=nW({}),oK=zW({BigNumber:Z,config:G}),sK=PO({}),cK=gW({Complex:rK}),lK=iW({BigNumber:Z,config:G}),uK=dW({BigNumber:Z,config:G}),dK=pW({BigNumber:Z,config:G}),fK=IO({}),pK=aW({BigNumber:Z,config:G}),mK=rW({}),hK=lW({BigNumber:Z,config:G}),gK=FO({}),_K=gE({}),vK=mW({BigNumber:Z,config:G}),yK=iG({BigNumber:Z,config:G}),bK=sW({BigNumber:Z,config:G}),xK=tW({}),SK=_W({}),CK=Vk({Matrix:fK,config:G}),wK=JW({BigNumber:Z,config:G}),TK=uW({BigNumber:Z,config:G}),EK=oW({BigNumber:Z,config:G}),DK=$U({}),OK=hW({BigNumber:Z,config:G}),Q=dE({BigNumber:Z,Complex:rK,DenseMatrix:CK,Fraction:sK}),kK=qW({BigNumber:Z,config:G}),AK=jM({typed:Q}),jK=wR({Complex:rK,config:G,typed:Q}),MK=OR({BigNumber:Z,typed:Q}),NK=MR({BigNumber:Z,Complex:rK,config:G,typed:Q}),PK=LM({typed:Q}),FK=CP({typed:Q}),IK=RR({BigNumber:Z,Complex:rK,config:G,typed:Q}),LK=VR({typed:Q}),RK=HR({typed:Q}),zK=KR({Complex:rK,config:G,typed:Q}),BK=cM({typed:Q}),VK=gP({typed:Q}),HK=fM({typed:Q}),UK=Uk({typed:Q}),WK=zH({typed:Q}),GK=mM({Complex:rK,typed:Q}),KK=TP({typed:Q}),qK=YR({typed:Q}),JK=$R({BigNumber:Z,typed:Q}),YK=rz({BigNumber:Z,typed:Q}),XK=ZM({typed:Q}),ZK=tM({config:G,typed:Q}),QK=$F({typed:Q}),$K=$M({typed:Q}),eq=tN({Complex:rK,typed:Q}),tq=JP({typed:Q}),nq=ZP({typed:Q}),rq=$P({typed:Q}),iq=pI({typed:Q}),aq=nF({typed:Q}),oq=yI({format:iq,typed:Q}),sq=DP({typed:Q}),cq=qj({typed:Q}),lq=Gj({typed:Q}),uq=Lj({typed:Q}),dq=kI({typed:Q}),fq=fW({BigNumber:Z,config:G}),pq=qH({Complex:rK,typed:Q}),mq=LN({Complex:rK,config:G,typed:Q}),hq=zN({Complex:rK,config:G,typed:Q}),gq=cF({typed:Q}),_q=cI({isNaN:lq,isNumeric:uq,typed:Q}),vq=BN({typed:Q}),yq=jP({typed:Q}),bq=sM({typed:Q}),xq=_I({format:iq,typed:Q}),Sq=gU({config:G,typed:Q}),Cq=SI({typed:Q}),wq=yU({config:G,typed:Q}),Tq=kP({typed:Q}),Eq=sz({BigNumber:Z,typed:Q}),Dq=KN({BigNumber:Z,Fraction:sK,complex:GK,typed:Q}),Oq=dz({typed:Q}),kq=DF({typed:Q}),Aq=nM({Matrix:fK,equalScalar:ZK,typed:Q}),jq=TM({typed:Q}),Mq=YN({typed:Q}),Nq=uM({typed:Q}),Pq=zM({typed:Q}),Fq=hz({typed:Q}),Iq=DI({typed:Q}),Lq=Zj({typed:Q}),Rq=ER({Complex:rK,config:G,typed:Q}),zq=PR({BigNumber:Z,typed:Q}),Bq=IR({BigNumber:Z,Complex:rK,config:G,typed:Q}),Vq=pM({BigNumber:Z,typed:Q}),Hq=HH({typed:Q}),Uq=ZR({typed:Q}),Wq=az({BigNumber:Z,typed:Q}),Gq=Wz({addScalar:PK,conj:KK,multiplyScalar:vq,size:kq,typed:Q}),Kq=zj({isNumeric:uq,typed:Q}),qq=Yj({isBounded:cq,map:gq,typed:Q}),Jq=Fj({config:G,typed:Q}),Yq=Uj({equalScalar:ZK,typed:Q}),$=_M({DenseMatrix:CK,Matrix:fK,SparseMatrix:Aq,typed:Q}),Xq=yM({isZero:Yq,matrix:$,typed:Q}),Zq=HN({addScalar:PK,dot:Gq,equalScalar:ZK,matrix:$,multiplyScalar:vq,typed:Q}),Qq=dF({BigNumber:Z,config:G,matrix:$,typed:Q}),$q=xU({config:G,log2:hq,typed:Q}),eJ=yF({config:G,matrix:$}),tJ=lz({BigNumber:Z,typed:Q}),nJ=pz({typed:Q}),rJ=bR({SparseMatrix:Aq,typed:Q}),iJ=qN({Complex:rK,config:G,typed:Q}),aJ=kF({typed:Q}),oJ=gz({typed:Q}),sJ=LF({matrix:$,typed:Q}),cJ=$N({BigNumber:Z,config:G,matrix:$,typed:Q}),lJ=VF({BigNumber:Z,config:G,matrix:$,typed:Q}),uJ=AR({BigNumber:Z,Complex:rK,config:G,typed:Q}),dJ=BR({Complex:rK,config:G,typed:Q}),fJ=hI({format:iq,typed:Q}),pJ=tz({BigNumber:Z,typed:Q}),mJ=zF({conj:KK,transpose:sJ,typed:Q}),hJ=qP({DenseMatrix:CK,SparseMatrix:Aq,matrix:$,typed:Q}),gJ=DL({DenseMatrix:CK,SparseMatrix:Aq,equalScalar:ZK,matrix:$,typed:Q}),_J=hM({Fraction:sK,typed:Q}),vJ=iF({BigNumber:Z,DenseMatrix:CK,SparseMatrix:Aq,config:G,matrix:$,typed:Q}),yJ=Qk({equal:gJ,typed:Q}),bJ=oF({matrix:$,multiplyScalar:vq,typed:Q}),xJ=NM({isInteger:yJ,typed:Q}),SJ=CM({flatten:nq,matrix:$,size:kq,typed:Q}),CJ=AI({bignumber:Vq,fraction:_J,number:bq}),wJ=dI({config:G,multiplyScalar:vq,numeric:CJ,typed:Q}),TJ=vF({isInteger:yJ,matrix:$,typed:Q}),EJ=LI({BigNumber:Z,DenseMatrix:CK,config:G,equalScalar:ZK,matrix:$,typed:Q,zeros:lJ}),DJ=DM({typed:Q}),OJ=IH({BigNumber:Z,Fraction:sK,config:G,isInteger:yJ,number:bq,typed:Q}),kJ=VM({BigNumber:Z,Complex:rK,Fraction:sK,config:G,isNegative:Jq,matrix:$,typed:Q,unaryMinus:DJ}),AJ=zP({isInteger:yJ,matrix:$,typed:Q}),jJ=UP({prod:wJ,size:kq,typed:Q}),MJ=WL({equal:gJ,typed:Q}),NJ=MI({numeric:CJ,typed:Q}),PJ=iP({concat:AJ,equalScalar:ZK,matrix:$,multiplyScalar:vq,typed:Q}),FJ=uN({DenseMatrix:CK,config:G,equalScalar:ZK,matrix:$,round:EJ,typed:Q,zeros:lJ}),IJ=kN({BigNumber:Z,DenseMatrix:CK,concat:AJ,config:G,equalScalar:ZK,matrix:$,round:EJ,typed:Q,zeros:lJ}),LJ=Vj({config:G,typed:Q}),RJ=RL({DenseMatrix:CK,SparseMatrix:Aq,bignumber:Vq,concat:AJ,config:G,matrix:$,typed:Q}),zJ=MN({concat:AJ,equalScalar:ZK,matrix:$,typed:Q}),BJ=cL({DenseMatrix:CK,concat:AJ,equalScalar:ZK,matrix:$,typed:Q,zeros:lJ}),VJ=QI({DenseMatrix:CK,divideScalar:NJ,equalScalar:ZK,matrix:$,multiplyScalar:vq,subtractScalar:Pq,typed:Q}),HJ=$L({config:G,isNaN:lq,larger:RJ,numeric:CJ,typed:Q}),UJ=yN({DenseMatrix:CK,concat:AJ,config:G,equalScalar:ZK,matrix:$,round:EJ,typed:Q,zeros:lJ}),WJ=WN({BigNumber:Z,concat:AJ,equalScalar:ZK,matrix:$,typed:Q}),GJ=NP({deepEqual:MJ,flatten:nq,matrix:$,size:kq,typed:Q}),KJ=FP({DenseMatrix:CK,concat:AJ,equalScalar:ZK,matrix:$,typed:Q}),qJ=rV({addScalar:PK,complex:GK,conj:KK,divideScalar:NJ,equal:gJ,identity:vJ,isZero:Yq,matrix:$,multiplyScalar:vq,sign:Dq,sqrt:iJ,subtractScalar:Pq,typed:Q,unaryMinus:DJ,zeros:lJ}),JJ=uL({DenseMatrix:CK,concat:AJ,equalScalar:ZK,matrix:$,typed:Q,zeros:lJ}),YJ=ML({DenseMatrix:CK,SparseMatrix:Aq,bignumber:Vq,concat:AJ,config:G,matrix:$,typed:Q}),XJ=ZN({DenseMatrix:CK,concat:AJ,equalScalar:ZK,matrix:$,subtractScalar:Pq,typed:Q,unaryMinus:DJ}),ZJ=TI({concat:AJ,matrix:$,typed:Q}),QJ=kM({config:G,numeric:CJ,typed:Q}),$J=eL({DenseMatrix:CK,divideScalar:NJ,equalScalar:ZK,matrix:$,multiplyScalar:vq,subtractScalar:Pq,typed:Q}),eY=LP({DenseMatrix:CK,SparseMatrix:Aq,concat:AJ,matrix:$,typed:Q}),tY=Rz({DenseMatrix:CK,SparseMatrix:Aq,addScalar:PK,concat:AJ,equalScalar:ZK,matrix:$,typed:Q}),nY=WR({BigNumber:Z,DenseMatrix:CK,concat:AJ,equalScalar:ZK,matrix:$,typed:Q}),rY=mP({concat:AJ,equalScalar:ZK,matrix:$,typed:Q}),iY=vP({DenseMatrix:CK,concat:AJ,equalScalar:ZK,matrix:$,typed:Q}),aY=xP({DenseMatrix:CK,SparseMatrix:Aq,concat:AJ,matrix:$,typed:Q}),oY=DU({addScalar:PK,combinations:WK,divideScalar:NJ,isInteger:yJ,isNegative:Jq,multiplyScalar:vq,typed:Q}),sY=gL({BigNumber:Z,DenseMatrix:CK,Fraction:sK,concat:AJ,config:G,equalScalar:ZK,matrix:$,typed:Q}),cY=TL({concat:AJ,matrix:$,typed:Q}),lY=kU({addScalar:PK,combinations:WK,isInteger:yJ,isNegative:Jq,isPositive:LJ,larger:RJ,typed:Q}),uY=GP({matrix:$,multiply:Zq,subtract:XJ,typed:Q}),dY=JV({divideScalar:NJ,isZero:Yq,matrix:$,multiply:Zq,subtractScalar:Pq,typed:Q,unaryMinus:DJ}),fY=uF({matrix:$,number:bq,subtract:XJ,typed:Q}),pY=mH({abs:AK,addScalar:PK,deepEqual:MJ,divideScalar:NJ,multiplyScalar:vq,sqrt:iJ,subtractScalar:Pq,typed:Q}),mY=YI({DenseMatrix:CK,SparseMatrix:Aq,concat:AJ,divideScalar:NJ,equalScalar:ZK,matrix:$,typed:Q}),hY=AL({compareText:cY,isZero:Yq,typed:Q}),gY=aR({larger:RJ,smaller:YJ}),_Y=Bz({abs:AK,addScalar:PK,divideScalar:NJ,isPositive:LJ,multiplyScalar:vq,smaller:YJ,sqrt:iJ,typed:Q}),vY=nR({DenseMatrix:CK,smaller:YJ}),yY=rR({ImmutableDenseMatrix:vY,getMatrixDataType:aq}),bY=hH({abs:AK,add:tY,addScalar:PK,config:G,divideScalar:NJ,equalScalar:ZK,flatten:nq,isNumeric:uq,isZero:Yq,matrix:$,multiply:Zq,multiplyScalar:vq,smaller:YJ,subtract:XJ,typed:Q}),xY=tP({BigNumber:Z,add:tY,config:G,equal:gJ,isInteger:yJ,mod:UJ,smaller:YJ,typed:Q,xgcd:cJ}),SY=VL({DenseMatrix:CK,SparseMatrix:Aq,concat:AJ,config:G,matrix:$,typed:Q}),CY=VI({Complex:rK,config:G,divideScalar:NJ,typeOf:Lq,typed:Q}),wY=nL({DenseMatrix:CK,divideScalar:NJ,equalScalar:ZK,matrix:$,multiplyScalar:vq,subtractScalar:Pq,typed:Q}),TY=xM({flatten:nq,matrix:$,size:kq,typed:Q}),EY=tR({config:G,isNaN:lq,numeric:CJ,smaller:YJ,typed:Q}),DY=GI({Complex:rK,config:G,divideScalar:NJ,typed:Q}),OY=YL({compare:sY,isNaN:lq,isNumeric:uq,typed:Q}),kY=fL({DenseMatrix:CK,concat:AJ,equalScalar:ZK,matrix:$,typed:Q,zeros:lJ}),AY=SV({SparseMatrix:Aq,abs:AK,add:tY,divideScalar:NJ,larger:RJ,largerEq:SY,multiply:Zq,subtract:XJ,transpose:sJ,typed:Q}),jY=oR({FibonacciHeap:gY,addScalar:PK,equalScalar:ZK}),MY=jF({add:tY,matrix:$,typed:Q,zeros:lJ}),NY=_H({add:tY,config:G,numeric:CJ,typed:Q}),PY=Gz({add:tY,matrix:$,typed:Q}),FY=iL({DenseMatrix:CK,divideScalar:NJ,equalScalar:ZK,matrix:$,multiplyScalar:vq,subtractScalar:Pq,typed:Q}),IY=YU({Complex:rK,add:tY,multiply:Zq,number:bq,typed:Q}),LY=YM({DenseMatrix:CK,config:G,equalScalar:ZK,matrix:$,round:EJ,typed:Q,zeros:lJ}),RY=xL({compare:sY,typed:Q}),zY=yH({add:tY,typed:Q,unaryPlus:QJ}),BY=aN({Complex:rK,DenseMatrix:CK,ceil:LY,equalScalar:ZK,floor:FJ,matrix:$,typed:Q,zeros:lJ}),VY=qz({Index:yY,typed:Q}),HY=XV({abs:AK,addScalar:PK,det:dY,divideScalar:NJ,identity:vJ,matrix:$,multiply:Zq,typed:Q,unaryMinus:DJ}),UY=UI({Complex:rK,config:G,divideScalar:NJ,log:CY,typed:Q}),WY=tV({DenseMatrix:CK,Spa:jY,SparseMatrix:Aq,abs:AK,addScalar:PK,divideScalar:NJ,equalScalar:ZK,larger:RJ,matrix:$,multiplyScalar:vq,subtractScalar:Pq,typed:Q,unaryMinus:DJ}),GY=QV({Complex:rK,add:tY,ctranspose:mJ,deepEqual:MJ,divideScalar:NJ,dot:Gq,dotDivide:mY,equal:gJ,inv:HY,matrix:$,multiply:Zq,typed:Q}),KY=PI({Complex:rK,config:G,fraction:_J,identity:vJ,inv:HY,matrix:$,multiply:Zq,number:bq,typed:Q}),qY=vz({DenseMatrix:CK,Index:yY,compareNatural:RY,size:kq,subset:MY,typed:Q}),JY=Sz({DenseMatrix:CK,Index:yY,compareNatural:RY,size:kq,subset:MY,typed:Q}),YY=Ez({Index:yY,compareNatural:RY,size:kq,subset:MY,typed:Q}),XY=Az({Index:yY,compareNatural:RY,size:kq,subset:MY,typed:Q}),ZY=FL({DenseMatrix:CK,SparseMatrix:Aq,concat:AJ,config:G,matrix:$,typed:Q}),QY=ZL({compare:sY,compareNatural:RY,matrix:$,typed:Q}),$Y=aH({abs:AK,add:tY,identity:vJ,inv:HY,map:gq,max:HJ,multiply:Zq,size:kq,sqrt:iJ,subtract:XJ,typed:Q}),eX=KL({DenseMatrix:CK,SparseMatrix:Aq,concat:AJ,config:G,equalScalar:ZK,matrix:$,typed:Q}),tX=mL({concat:AJ,equalScalar:ZK,matrix:$,not:yq,typed:Q,zeros:lJ}),nX=fH({divideScalar:NJ,equalScalar:ZK,inv:HY,matrix:$,multiply:Zq,typed:Q}),rX=rH({abs:AK,add:tY,identity:vJ,inv:HY,multiply:Zq,typed:Q}),iX=UF({addScalar:PK,ceil:LY,conj:KK,divideScalar:NJ,dotDivide:mY,exp:$K,i:cK,log2:hq,matrix:$,multiplyScalar:vq,pow:KY,tau:bK,typed:Q}),aX=ZU({Complex:rK,add:tY,divide:nX,matrix:$,multiply:Zq,typed:Q}),oX=GH({BigNumber:Z,Complex:rK,config:G,multiplyScalar:vq,pow:KY,typed:Q}),sX=GF({conj:KK,dotDivide:mY,fft:iX,typed:Q}),cX=ZH({divide:nX,dotDivide:mY,isNumeric:uq,log:CY,map:gq,matrix:$,multiply:Zq,sum:NY,typed:Q}),lX=TV({DenseMatrix:CK,lsolve:VJ,lup:WY,matrix:$,slu:AY,typed:Q,usolve:$J}),uX=xH({add:tY,divide:nX,typed:Q}),dX=CH({add:tY,compare:sY,divide:nX,partitionSelect:OY,typed:Q}),fX=DV({add:tY,cbrt:kJ,divide:nX,equalScalar:ZK,im:sq,isZero:Yq,multiply:Zq,re:Tq,sqrt:iJ,subtract:XJ,typeOf:Lq,typed:Q,unaryMinus:DJ}),pX=AH({bignumber:Vq,add:tY,compare:sY,divide:nX,isInteger:yJ,larger:RJ,mapSlices:xJ,multiply:Zq,partitionSelect:OY,smaller:YJ,smallerEq:ZY,subtract:XJ,typed:Q}),mX=gF({bignumber:Vq,matrix:$,add:tY,config:G,equal:gJ,isPositive:LJ,isZero:Yq,larger:RJ,largerEq:SY,smaller:YJ,smallerEq:ZY,typed:Q}),hX=TF({Index:yY,matrix:$,range:mX,typed:Q}),gX=bz({DenseMatrix:CK,Index:yY,compareNatural:RY,size:kq,subset:MY,typed:Q}),_X=Oz({Index:yY,compareNatural:RY,size:kq,subset:MY,typed:Q}),vX=Pz({Index:yY,concat:AJ,setDifference:gX,size:kq,subset:MY,typed:Q}),yX=QF({abs:AK,add:tY,bignumber:Vq,divide:nX,isNegative:Jq,isPositive:LJ,larger:RJ,map:gq,matrix:$,max:HJ,multiply:Zq,smaller:YJ,subtract:XJ,typed:Q,unaryMinus:DJ}),bX=gR({BigNumber:Z,Complex:rK,Fraction:sK,abs:AK,addScalar:PK,config:G,divideScalar:NJ,equal:gJ,fix:BY,format:iq,isNumeric:uq,multiplyScalar:vq,number:bq,pow:KY,round:EJ,subtractScalar:Pq}),xX=TW({BigNumber:Z,Unit:bX,config:G}),SX=YW({BigNumber:Z,Unit:bX,config:G}),CX=kW({BigNumber:Z,Unit:bX,config:G}),wX=ZW({BigNumber:Z,Unit:bX,config:G}),TX=VP({Index:yY,matrix:$,range:mX,typed:Q}),EX=AW({BigNumber:Z,Unit:bX,config:G}),DX=EW({BigNumber:Z,Unit:bX,config:G}),OX=SR({Unit:bX,typed:Q}),kX=HW({BigNumber:Z,Unit:bX,config:G}),AX=tH({abs:AK,add:tY,addScalar:PK,atan:RK,bignumber:Vq,column:TX,complex:GK,config:G,cos:qK,diag:hJ,divideScalar:NJ,dot:Gq,equal:gJ,flatten:nq,im:sq,inv:HY,larger:RJ,matrix:$,matrixFromColumns:SJ,multiply:Zq,multiplyScalar:vq,number:bq,qr:qJ,re:Tq,reshape:TJ,sin:Oq,size:kq,smaller:YJ,sqrt:iJ,subtract:XJ,typed:Q,usolve:$J,usolveAll:FY}),jX=LW({BigNumber:Z,Unit:bX,config:G}),MX=YH({gamma:oX,typed:Q}),NX=RW({BigNumber:Z,Unit:bX,config:G}),PX=tG({BigNumber:Z,Unit:bX,config:G}),FX=uG({BigNumber:Z,Unit:bX,config:G}),IX=PW({BigNumber:Z,Unit:bX,config:G}),LX=eG({BigNumber:Z,Unit:bX,config:G}),RX=TH({abs:AK,map:gq,median:dX,subtract:XJ,typed:Q}),zX=MW({BigNumber:Z,Unit:bX,config:G}),BX=cG({BigNumber:Z,Unit:bX,config:G}),VX=nG({BigNumber:Z,Unit:bX,config:G}),HX=$H({add:tY,divide:nX,factorial:MX,isInteger:yJ,isPositive:LJ,multiply:Zq,typed:Q}),UX=Hz({abs:AK,add:tY,conj:KK,ctranspose:mJ,eigs:AX,equalScalar:ZK,larger:RJ,matrix:$,multiply:Zq,pow:KY,smaller:YJ,sqrt:iJ,typed:Q}),WX=tU({factorial:MX,typed:Q}),GX=xW({BigNumber:Z,Unit:bX,config:G}),KX=fG({BigNumber:Z,Unit:bX,config:G}),qX=pG({BigNumber:Z,Unit:bX,config:G}),JX=SW({BigNumber:Z,Unit:bX,config:G}),YX=CF({BigNumber:Z,DenseMatrix:CK,SparseMatrix:Aq,addScalar:PK,config:G,cos:qK,matrix:$,multiplyScalar:vq,norm:UX,sin:Oq,typed:Q,unaryMinus:DJ}),XX=GW({BigNumber:Z,Unit:bX,config:G}),ZX=aG({BigNumber:Z,Unit:bX,config:G}),QX=Mz({compareNatural:RY,typed:Q}),$X=yW({BigNumber:Z,Unit:bX,config:G}),eZ=oG({BigNumber:Z,Unit:bX,config:G}),tZ=KW({BigNumber:Z,Unit:bX,config:G}),nZ=OH({add:tY,divide:nX,isNaN:lq,mapSlices:xJ,multiply:Zq,subtract:XJ,typed:Q}),rZ=oI({BigNumber:Z,Complex:rK,add:tY,config:G,divide:nX,equal:gJ,factorial:MX,gamma:oX,isBounded:cq,isNegative:Jq,multiply:Zq,pi:EK,pow:KY,sin:Oq,smallerEq:ZY,subtract:XJ,typed:Q}),iZ=XW({BigNumber:Z,Unit:bX,config:G}),aZ=FW({BigNumber:Z,Unit:bX,config:G}),oZ=PH({add:tY,divide:nX,matrix:$,mean:uX,multiply:Zq,pow:KY,sqrt:iJ,subtract:XJ,sum:NY,typed:Q}),sZ=qI({DenseMatrix:CK,SparseMatrix:Aq,concat:AJ,equalScalar:ZK,matrix:$,pow:KY,typed:Q}),cZ=OW({BigNumber:Z,Unit:bX,config:G}),lZ=QW({BigNumber:Z,Unit:bX,config:G}),uZ=BW({BigNumber:Z,Unit:bX,config:G}),dZ=jW({BigNumber:Z,Unit:bX,config:G}),fZ=CW({BigNumber:Z,Unit:bX,config:G}),pZ=lG({BigNumber:Z,Unit:bX,config:G}),mZ=UW({BigNumber:Z,Unit:bX,config:G}),hZ=mG({BigNumber:Z,Unit:bX,config:G}),gZ=hG({BigNumber:Z,Unit:bX,config:G}),_Z=WW({BigNumber:Z,Unit:bX,config:G}),vZ=wz({DenseMatrix:CK,Index:yY,compareNatural:RY,size:kq,subset:MY,typed:Q}),yZ=MH({map:gq,sqrt:iJ,typed:Q,variance:nZ}),bZ=CU({bignumber:Vq,addScalar:PK,combinations:WK,divideScalar:NJ,factorial:MX,isInteger:yJ,isNegative:Jq,larger:RJ,multiplyScalar:vq,number:bq,pow:KY,subtractScalar:Pq,typed:Q}),xZ=vR({Unit:bX,typed:Q}),SZ=TU({addScalar:PK,isInteger:yJ,isNegative:Jq,stirlingS2:bZ,typed:Q}),CZ=wW({BigNumber:Z,Unit:bX,config:G}),wZ=$W({BigNumber:Z,Unit:bX,config:G}),TZ=NW({BigNumber:Z,Unit:bX,config:G}),EZ=dG({BigNumber:Z,Unit:bX,config:G}),DZ=xF({multiply:Zq,rotationMatrix:YX,typed:Q}),OZ=Iz({Index:yY,concat:AJ,setIntersect:vZ,setSymDifference:vX,size:kq,subset:MY,typed:Q}),kZ=sG({BigNumber:Z,Unit:bX,config:G}),AZ=IW({BigNumber:Z,Unit:bX,config:G}),jZ=rG({BigNumber:Z,Unit:bX,config:G}),MZ=lH({identity:vJ,matrix:$,multiply:Zq,norm:UX,qr:qJ,subtract:XJ,typed:Q}),NZ=DW({BigNumber:Z,Unit:bX,config:G}),PZ=bW({BigNumber:Z,Unit:bX,config:G}),FZ=VW({BigNumber:Z,Unit:bX,config:G}),IZ=sH({abs:AK,add:tY,concat:AJ,identity:vJ,index:VY,lusolve:lX,matrix:$,matrixFromColumns:SJ,multiply:Zq,range:mX,schur:MZ,subset:MY,subtract:XJ,transpose:sJ,typed:Q}),LZ=dH({matrix:$,multiply:Zq,sylvester:IZ,transpose:sJ,typed:Q}),RZ={},zZ={},BZ={},VZ=Yz({mathWithTransform:zZ}),HZ=jB({Node:VZ}),UZ=PB({Node:VZ}),WZ=IB({Node:VZ}),GZ=BB({Node:VZ}),KZ=tB({Node:VZ}),qZ=fB({Node:VZ,ResultSet:_K}),JZ=mB({Node:VZ}),YZ=RB({Node:VZ}),XZ=QU({classes:BZ}),ZZ=kV({math:RZ,typed:Q}),QZ=DB({Node:VZ,typed:Q}),$Z=KV({Chain:ZZ,typed:Q}),eQ=TB({Node:VZ,isBounded:cq}),tQ=kB({Node:VZ,size:kq}),nQ=$z({Node:VZ,subset:MY}),rQ=uB({matrix:$,Node:VZ,subset:MY}),iQ=VB({Unit:bX,Node:VZ,math:RZ}),aQ=UB({Node:VZ,SymbolNode:iQ,math:RZ}),oQ=GB({AccessorNode:nQ,ArrayNode:KZ,AssignmentNode:rQ,BlockNode:qZ,ConditionalNode:JZ,ConstantNode:eQ,FunctionAssignmentNode:QZ,FunctionNode:aQ,IndexNode:tQ,ObjectNode:HZ,OperatorNode:UZ,ParenthesisNode:WZ,RangeNode:YZ,RelationalNode:GZ,SymbolNode:iQ,config:G,numeric:CJ,typed:Q}),sQ=VU({ConstantNode:eQ,FunctionNode:aQ,OperatorNode:UZ,ParenthesisNode:WZ,parse:oQ,typed:Q}),cQ=RU({bignumber:Vq,fraction:_J,AccessorNode:nQ,ArrayNode:KZ,ConstantNode:eQ,FunctionNode:aQ,IndexNode:tQ,ObjectNode:HZ,OperatorNode:UZ,SymbolNode:iQ,config:G,isBounded:cq,mathWithTransform:zZ,matrix:$,typed:Q}),lQ=qB({parse:oQ,typed:Q}),uQ=jU({parse:oQ,typed:Q}),dQ=BU({AccessorNode:nQ,ArrayNode:KZ,ConstantNode:eQ,FunctionNode:aQ,IndexNode:tQ,ObjectNode:HZ,OperatorNode:UZ,ParenthesisNode:WZ,SymbolNode:iQ,add:tY,divide:nX,equal:gJ,isZero:Yq,multiply:Zq,parse:oQ,pow:KY,subtract:XJ,typed:Q}),fQ=YB({parse:oQ,typed:Q}),pQ=OV({evaluate:fQ}),mQ=XB({evaluate:fQ,parse:oQ}),hQ=$B({Parser:mQ,typed:Q}),gQ=LU({AccessorNode:nQ,ArrayNode:KZ,ConstantNode:eQ,FunctionNode:aQ,IndexNode:tQ,ObjectNode:HZ,OperatorNode:UZ,ParenthesisNode:WZ,SymbolNode:iQ,equal:gJ,parse:oQ,replacer:DK,resolve:sQ,simplifyConstant:cQ,simplifyCore:dQ,typed:Q}),_Q=UU({OperatorNode:UZ,parse:oQ,simplify:gQ,typed:Q}),vQ=GU({ConstantNode:eQ,FunctionNode:aQ,OperatorNode:UZ,ParenthesisNode:WZ,SymbolNode:iQ,config:G,equal:gJ,isZero:Yq,numeric:CJ,parse:oQ,simplify:gQ,typed:Q}),yQ=WV({Help:pQ,mathWithTransform:zZ,typed:Q}),bQ=qU({bignumber:Vq,fraction:_J,AccessorNode:nQ,ArrayNode:KZ,ConstantNode:eQ,FunctionNode:aQ,IndexNode:tQ,ObjectNode:HZ,OperatorNode:UZ,ParenthesisNode:WZ,SymbolNode:iQ,add:tY,config:G,divide:nX,equal:gJ,isZero:Yq,mathWithTransform:zZ,matrix:$,multiply:Zq,parse:oQ,pow:KY,simplify:gQ,simplifyConstant:cQ,simplifyCore:dQ,subtract:XJ,typed:Q});vw(RZ,{e:iK,false:aK,fineStructure:oK,i:cK,Infinity:lK,LN10:uK,LOG10E:dK,NaN:pK,null:mK,phi:hK,SQRT1_2:vK,sackurTetrode:yK,tau:bK,true:xK,E:iK,version:SK,efimovFactor:wK,LN2:TK,pi:EK,replacer:DK,reviver:XZ,SQRT2:OK,typed:Q,PI:EK,weakMixingAngle:kK,abs:AK,acos:jK,acot:MK,acsc:NK,addScalar:PK,arg:FK,asech:IK,asinh:LK,atan:RK,atanh:zK,bigint:BK,bitNot:VK,boolean:HK,clone:UK,combinations:WK,complex:GK,conj:KK,cos:qK,cot:JK,csc:YK,cube:XK,equalScalar:ZK,erf:QK,exp:$K,expm1:eq,filter:tq,flatten:nq,forEach:rq,format:iq,getMatrixDataType:aq,hex:oq,im:sq,isBounded:cq,isNaN:lq,isNumeric:uq,isPrime:dq,LOG2E:fq,lgamma:pq,log10:mq,log2:hq,map:gq,mode:_q,multiplyScalar:vq,not:yq,number:bq,oct:xq,pickRandom:Sq,print:Cq,random:wq,re:Tq,sec:Eq,sign:Dq,sin:Oq,size:kq,splitUnit:jq,square:Mq,string:Nq,subtractScalar:Pq,tan:Fq,toBest:Iq,typeOf:Lq,acosh:Rq,acsch:zq,asec:Bq,bignumber:Vq,chain:$Z,combinationsWithRep:Hq,cosh:Uq,csch:Wq,dot:Gq,hasNumericValue:Kq,isFinite:qq,isNegative:Jq,isZero:Yq,matrix:$,matrixFromFunction:Xq,multiply:Zq,ones:Qq,randomInt:$q,resize:eJ,sech:tJ,sinh:nJ,sparse:rJ,sqrt:iJ,squeeze:aJ,tanh:oJ,transpose:sJ,xgcd:cJ,zeros:lJ,acoth:uJ,asin:dJ,bin:fJ,coth:pJ,ctranspose:mJ,diag:hJ,equal:gJ,fraction:_J,identity:vJ,isInteger:yJ,kron:bJ,mapSlices:xJ,matrixFromColumns:SJ,numeric:CJ,prod:wJ,reshape:TJ,round:EJ,unaryMinus:DJ,bernoulli:OJ,cbrt:kJ,concat:AJ,count:jJ,deepEqual:MJ,divideScalar:NJ,dotMultiply:PJ,floor:FJ,gcd:IJ,isPositive:LJ,larger:RJ,lcm:zJ,leftShift:BJ,lsolve:VJ,max:HJ,mod:UJ,nthRoot:WJ,nullish:GJ,or:KJ,qr:qJ,rightArithShift:JJ,smaller:YJ,subtract:XJ,to:ZJ,unaryPlus:QJ,usolve:$J,xor:eY,add:tY,atan2:nY,bitAnd:rY,bitOr:iY,bitXor:aY,catalan:oY,compare:sY,compareText:cY,composition:lY,cross:uY,det:dY,diff:fY,distance:pY,dotDivide:mY,equalText:hY,hypot:_Y,intersect:bY,invmod:xY,largerEq:SY,log:CY,lsolveAll:wY,matrixFromRows:TY,min:EY,nthRoots:DY,partitionSelect:OY,rightLogShift:kY,slu:AY,subset:MY,sum:NY,trace:PY,usolveAll:FY,zpk2tf:IY,ceil:LY,compareNatural:RY,cumsum:zY,fix:BY,index:VY,inv:HY,log1p:UY,lup:WY,pinv:GY,pow:KY,setCartesian:qY,setDistinct:JY,setIsSubset:YY,setPowerset:XY,smallerEq:ZY,sort:QY,sqrtm:$Y,unequal:eX,and:tX,divide:nX,expm:rX,fft:iX,freqz:aX,gamma:oX,ifft:sX,kldivergence:cX,lusolve:lX,mean:uX,median:dX,polynomialRoot:fX,quantileSeq:pX,range:mX,row:hX,setDifference:gX,setMultiplicity:_X,setSymDifference:vX,solveODE:yX,vacuumImpedance:xX,atomicMass:SX,bohrMagneton:CX,boltzmann:wX,column:TX,conductanceQuantum:EX,coulomb:DX,createUnit:OX,deuteronMass:kX,eigs:AX,electronMass:jX,factorial:MX,fermiCoupling:NX,gasConstant:PX,gravity:FX,klitzing:IX,loschmidt:LX,mad:RX,magneticFluxQuantum:zX,molarMass:BX,molarPlanckConstant:VX,multinomial:HX,norm:UX,permutations:WX,planckConstant:GX,planckMass:KX,planckTime:qX,reducedPlanckConstant:JX,rotationMatrix:YX,rydberg:XX,secondRadiation:ZX,setSize:QX,speedOfLight:$X,stefanBoltzmann:eZ,thomsonCrossSection:tZ,variance:nZ,zeta:rZ,avogadro:iZ,bohrRadius:aZ,corr:oZ,dotPow:sZ,elementaryCharge:cZ,faraday:lZ,hartreeEnergy:uZ,inverseConductanceQuantum:dZ,magneticConstant:fZ,molarMassC12:pZ,neutronMass:mZ,parse:oQ,planckCharge:hZ,planckTemperature:gZ,quantumOfCirculation:_Z,resolve:sQ,setIntersect:vZ,simplifyConstant:cQ,std:yZ,stirlingS2:bZ,unit:xZ,bellNumbers:SZ,compile:lQ,electricConstant:CZ,firstRadiation:wZ,leafCount:uQ,nuclearMagneton:TZ,planckLength:EZ,rotate:DZ,setUnion:OZ,simplifyCore:dQ,wienDisplacement:kZ,classicalElectronRadius:AZ,evaluate:fQ,molarVolume:jZ,schur:MZ,coulombConstant:NZ,gravitationConstant:PZ,parser:hQ,simplify:gQ,symbolicEqual:_Q,derivative:vQ,protonMass:FZ,sylvester:IZ,help:yQ,rationalize:bQ,lyap:LZ,config:G}),vw(zZ,RZ,{map:kG({typed:Q}),filter:EG({typed:Q}),forEach:DG({typed:Q}),mapSlices:bG({isInteger:yJ,typed:Q}),and:QG({add:tY,concat:AJ,equalScalar:ZK,matrix:$,not:yq,typed:Q,zeros:lJ}),cumsum:qG({add:tY,typed:Q,unaryPlus:QJ}),nullish:eK({deepEqual:MJ,flatten:nq,matrix:$,size:kq,typed:Q}),print:ZG({add:tY,matrix:$,typed:Q,zeros:lJ}),bitAnd:tK({add:tY,concat:AJ,equalScalar:ZK,matrix:$,not:yq,typed:Q,zeros:lJ}),concat:zG({isInteger:yJ,matrix:$,typed:Q}),diff:VG({bignumber:Vq,matrix:$,number:bq,subtract:XJ,typed:Q}),max:NG({config:G,isNaN:lq,larger:RJ,numeric:CJ,typed:Q}),min:FG({config:G,isNaN:lq,numeric:CJ,smaller:YJ,typed:Q}),or:$G({DenseMatrix:CK,concat:AJ,equalScalar:ZK,matrix:$,typed:Q}),subset:RG({add:tY,matrix:$,typed:Q,zeros:lJ}),bitOr:nK({DenseMatrix:CK,concat:AJ,equalScalar:ZK,matrix:$,typed:Q}),sum:WG({add:tY,config:G,numeric:CJ,typed:Q}),variance:YG({add:tY,divide:nX,isNaN:lq,mapSlices:xJ,multiply:Zq,subtract:XJ,typed:Q}),index:OG({Index:yY,getMatrixDataType:aq}),quantileSeq:GG({add:tY,bignumber:Vq,compare:sY,divide:nX,isInteger:yJ,larger:RJ,mapSlices:xJ,multiply:Zq,partitionSelect:OY,smaller:YJ,smallerEq:ZY,subtract:XJ,typed:Q}),range:IG({bignumber:Vq,matrix:$,add:tY,config:G,equal:gJ,isPositive:LJ,isZero:Yq,larger:RJ,largerEq:SY,smaller:YJ,smallerEq:ZY,typed:Q}),column:xG({Index:yY,matrix:$,range:mX,typed:Q}),row:LG({Index:yY,matrix:$,range:mX,typed:Q}),mean:PG({add:tY,divide:nX,typed:Q}),std:HG({map:gq,sqrt:iJ,typed:Q,variance:nZ})}),vw(BZ,{BigNumber:Z,Complex:rK,Fraction:sK,Matrix:fK,Node:VZ,ObjectNode:HZ,OperatorNode:UZ,ParenthesisNode:WZ,Range:gK,RelationalNode:GZ,ResultSet:_K,ArrayNode:KZ,BlockNode:qZ,ConditionalNode:JZ,DenseMatrix:CK,RangeNode:YZ,Chain:ZZ,FunctionAssignmentNode:QZ,SparseMatrix:Aq,ConstantNode:eQ,IndexNode:tQ,FibonacciHeap:gY,ImmutableDenseMatrix:vY,Index:yY,Spa:jY,AccessorNode:nQ,AssignmentNode:rQ,Unit:bX,SymbolNode:iQ,FunctionNode:aQ,Help:pQ,Parser:mQ}),ZZ.createProxy(RZ);var xQ=({ref:e,onChange:n,value:i,dragDirection:a,showDragHandle:s=!0,dragScale:c,selectOnFocus:l=!0,bounds:u=p.bounds.INFINITE,resetValue:d,variant:f=`outlined`,className:g,children:_,disabled:v,onBlur:y,units:b,size:x,color:S,contrast:C,...T})=>{let[E,D,O]=r.c(i.toString()),[k,A,j]=r.c(!0),M=r.f(i),N=(0,m.useCallback)(()=>{if(j.current)return;A(!0);let e=null;try{let t=fQ(O.current);t instanceof bX?e=t.toNumber():typeof t==`number`&&!isNaN(t)&&(e=t)}catch{e=null}e==null?D(M.current.toString()):n?.(p.bounds.clamp(u,e))},[n,D]),ee=r.f(N),P=(0,m.useCallback)(()=>{y?.(),N()},[y,N]);(0,m.useEffect)(()=>()=>ee.current?.(),[]);let te=(0,m.useCallback)(e=>{A(!1),D(e)},[D,A]),ne=k?i:E,re=(0,m.useCallback)(e=>{A(!0),n?.(p.bounds.clamp(u,Math.round(e)))},[n,A]);return c==null&&p.bounds.isFinite(u)&&(c={x:p.bounds.span(u)*.01,y:p.bounds.span(u)*.02}),(v||f===`preview`)&&(s=!1),(0,h.jsxs)(o.v,{ref:e,type:`text`,variant:f,className:g,value:ne.toString(),onChange:te,disabled:v,selectOnFocus:l,onKeyDown:e=>{t.Dt(e)===`Enter`&&(N(),y?.())},onBlur:P,size:x,color:S,contrast:C,...T,children:[s&&(0,h.jsx)(w,{direction:a,value:i,onChange:re,dragScale:c,resetValue:d,onBlur:P,size:x,color:S,contrast:C}),_]})},SQ=({location:e=`left`,size:t=`9rem`,className:n,style:r,bordered:o=!1,...s})=>{let c=p.location.construct(e),l=p.location.direction(c),u=p.direction.swap(l);return(0,h.jsx)(a.n,{className:i.n(i.n.B(`navbar`),o&&i.n.bordered(p.location.swap(c)),i.n.dir(u),i.n.loc(c),n),direction:u,style:{[p.direction.dimension(l)]:t,...r},align:`center`,empty:!0,...s})},CQ=e=>({bordered:t=!1,className:n,...r})=>(0,h.jsx)(a.n,{className:i.n(i.n.BE(`navbar`,`content`),e===`absolute-center`?i.n.M(e):i.n.align(e),e!==``&&t&&i.n.bordered(e),n),align:`center`,...r}),wQ=CQ(`start`);wQ.displayName=`NavbarStart`;var TQ=CQ(`end`);TQ.displayName=`NavbarEnd`;var EQ=CQ(`center`);EQ.displayName=`NavbarCenter`;var DQ=CQ(``);DQ.displayName=`NavbarContent`;var OQ=CQ(`absolute-center`);OQ.displayName=`NavbarAbsoluteCenter`;var kQ=SQ;kQ.Start=wQ,kQ.Center=EQ,kQ.End=TQ,kQ.AbsoluteCenter=OQ,kQ.Content=DQ;var AQ=e.n({Breadcrumb:()=>NQ,Segment:()=>MQ,mapURLSegments:()=>PQ}),jQ=()=>(0,h.jsx)(t.m.Right,{className:i.n.BE(`breadcrumb`,`separator`)}),MQ=({children:e,...t})=>(0,h.jsx)(r.a,{className:i.n.BE(`breadcrumb`,`segment`),...t,defaultEl:`span`,children:e}),NQ=({children:e,highlightVariant:t,...n})=>(0,h.jsx)(r.a,{className:i.n(i.n.B(`breadcrumb`),t!=null&&i.n.BM(`breadcrumb`,`highlight`,t)),x:!0,align:`center`,gap:`small`,...n,children:m.Children.map(e,(e,t)=>e==null||typeof e==`boolean`?null:(0,h.jsxs)(m.Fragment,{children:[t>0&&(0,h.jsx)(jQ,{}),typeof e==`string`?(0,h.jsx)(MQ,{children:e}):e]},t))}),PQ=(e,t)=>{let n=e.split(`/`);return n.map((e,r)=>t({href:n.slice(0,r+1).join(`/`),segment:e,index:r}))},FQ=({error:e,componentStack:n,resetErrorBoundary:o,children:c=(0,h.jsx)(IQ,{resetErrorBoundary:o}),extraInfo:l})=>{let u=(0,m.useCallback)(()=>{let t=[];return t.push(`Error: ${e.name}`),t.push(`Message: ${e.message}`),e.stack&&t.push(`\nStack Trace:\n${e.stack}\n`),n&&t.push(`\nComponent Stack:\n${n}`),l&&Object.keys(l).length>0&&t.push(`\nAdditional Info:\n${JSON.stringify(l,null,2)}`),t.join(`
74
+ `)},[e,n,l]);return(0,h.jsx)(a.n,{className:i.n.BE(`error-fallback`,`container`),y:!0,grow:!0,center:!0,children:(0,h.jsxs)(a.n,{background:2,rounded:!0,className:i.n.BE(`error-fallback`,`content`),bordered:!0,borderColor:5,empty:!0,children:[(0,h.jsxs)(kQ,{location:`top`,bordered:!0,size:`6rem`,children:[(0,h.jsx)(kQ.Start,{className:i.n.BE(`error-fallback`,`nav-start`),children:(0,h.jsxs)(NQ,{gap:`tiny`,children:[(0,h.jsx)(MQ,{color:9,children:(0,h.jsx)(t.k,{})}),(0,h.jsx)(MQ,{color:9,className:i.n.BE(`error-fallback`,`header-text`),children:`Something went wrong`})]})}),(0,h.jsx)(kQ.End,{className:i.n.BE(`error-fallback`,`nav-end`),children:(0,h.jsx)(g.Logo,{variant:`icon`})})]}),(0,h.jsxs)(a.n,{className:i.n.BE(`error-fallback`,`body`),children:[(0,h.jsxs)(a.n,{children:[(0,h.jsx)(r.a,{level:`h3`,status:`error`,className:i.n.BE(`error-fallback`,`name`),children:e.name}),(0,h.jsx)(r.a,{level:`h5`,color:10,className:i.n.BE(`error-fallback`,`message`),children:e.message})]}),(0,h.jsx)(d.t,{x:!0}),(0,h.jsx)(r.a,{level:`h5`,color:9,children:`Stack trace`}),(0,h.jsx)(a.n,{rounded:!0,className:i.n.BE(`error-fallback`,`stack-container`),background:1,bordered:!0,children:p.primitive.isNonZero(n||e.stack)&&(0,h.jsx)(r.a,{className:i.n.BE(`error-fallback`,`stack`),level:`small`,color:9,children:n||e.stack})}),(0,h.jsx)(d.t,{x:!0}),(0,h.jsxs)(a.n,{justify:`between`,x:!0,children:[(0,h.jsx)(s.r,{text:u,textColor:10,children:`Copy diagnostics`}),(0,h.jsx)(a.n,{x:!0,children:c})]})]})]})})},IQ=({resetErrorBoundary:e})=>(0,h.jsx)(s.i,{variant:`filled`,size:`small`,onClick:e,children:`Reload`}),LQ=class extends m.Component{state={error:null,componentStack:null};static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){this.setState({componentStack:t.componentStack??null}),this.props.onError?.(e,t)}resetErrorBoundary=()=>{this.props.onReset?.(),this.setState({error:null,componentStack:null})};render(){let{error:e,componentStack:t}=this.state,{children:n,FallbackComponent:r=FQ}=this.props;return e==null?n:(0,h.jsx)(r,{error:e,componentStack:t,resetErrorBoundary:this.resetErrorBoundary})}},RQ=e.n({Boundary:()=>LQ,Fallback:()=>FQ}),zQ=({ref:e,location:t,style:n,size:r,className:o,children:s,onDragStart:l,sizeUnits:u=`px`,showHandle:d=!0,...f})=>{let m=p.location.construct(t),g=p.location.direction(m),_=p.direction.dimension(g);return(0,h.jsxs)(a.n,{className:i.n(i.n.B(`resize`),i.n.loc(m),o),style:{[_]:`${r}${u}`,...n},ref:e,direction:g,empty:!0,...f,children:[s,d&&(0,h.jsx)(`div`,{draggable:!0,className:i.n(i.n.BE(`resize`,`handle`),i.n.bordered(p.location.swap(m))),onDragStart:l,onDrag:c.t,onDragEnd:c.t})]})},BQ=({onResize:e,count:t,initialSizes:n=[],minSize:r=100,direction:i=`x`})=>{let a=(0,m.useRef)(null),[o,s]=(0,m.useState)({sizeDistribution:HQ(n,t),root:null}),c=(0,m.useCallback)((e,t,n)=>{if(a.current==null)return;let o=p.box.dim(p.box.construct(a.current),i);s(i=>GQ(i,o,e,r,t,n))},[r,s,i]);(0,m.useEffect)(()=>e?.(o.sizeDistribution),[o.sizeDistribution,e]);let l=(0,m.useCallback)((e,t)=>{e.preventDefault();let n=i===`x`?`clientX`:`clientY`,r=e=>c(t,e[n]);s(t=>({...t,root:e[n]})),document.addEventListener(`mousemove`,r),document.addEventListener(`mouseup`,()=>{s(e=>({...e,root:null})),document.removeEventListener(`mousemove`,r)},{once:!0})},[s,i,GQ]);return{setSize:(0,m.useCallback)((e,t)=>c(e,void 0,t),[GQ]),props:{direction:i,sizeDistribution:o.sizeDistribution,onDragHandle:l,ref:a}}},VQ=({ref:e,direction:t=`x`,children:n,sizeDistribution:r,onDragHandle:o,className:s,...c})=>{let l=p.direction.construct(t),u=m.Children.toArray(n);return r=WQ(r),(0,h.jsx)(a.n,{...c,ref:e,direction:l,className:i.n(i.n.B(`resize-multiple`),s),empty:!0,grow:!0,children:u.map((e,t)=>(0,h.jsx)(zQ,{onDragStart:e=>o(e,t),location:p.direction.location(l),size:r[t]*100,sizeUnits:`%`,showHandle:t!==u.length-1,children:e},t))})},HQ=(e,t)=>{let n=e.reduce((e,t)=>e+t,0),r=t-e.length;if(r<=0)return e.slice(0,t).map(e=>e/n);if(e.every(e=>e<=1)){let t=1-n;return[...e,...Array(r).fill(t/r)]}return e.map(()=>1/t)},UQ=.001,WQ=e=>e.every(t=>p.math.closeTo(t,1/e.length),UQ)?e.map((t,n)=>n%2==0?t+UQ:n===e.length-1?t:t-UQ):e,GQ=(e,t,n,r,i,a)=>{let o=KQ(e,t,n,i,a),[s,c]=qQ(e.sizeDistribution,n,o,r/t),l=c?i??null:e.root;return{...e,sizeDistribution:s,root:l}},KQ=(e,t,n,r,i)=>{let a;if(i!=null)i>1&&(i/=t),a=i-e.sizeDistribution[n];else if(r!=null){if(e.root===null)throw Error(`resize root is null during handle drag`);a=(r-e.root)/t}else throw Error(`must provide either a MouseEvent or a targetSize`);return a},qQ=(e,t,n,r)=>{let i=t;for(;i>0&&e[i]+n<=r;)i--;let a=e[i]+n,o=JQ(i,e,r,n),s=e[o]-n;return a<r||s<r?[e,!1]:[e.map((e,t)=>t===i?a:t===o?s:e),!0]},JQ=(e,t,n,r)=>(e===t.length-1?XQ:YQ)(e,t,n,r),YQ=(e,t,n,r)=>{let i=e+1;for(;i<t.length-1&&t[i]-r<=n;)i++;return i},XQ=(e,t,n,r)=>{let i=e-1;for(;i>0&&t[i]-r<=n;)i--;return i},ZQ=2,QQ=100,$Q=({onCollapse:e,onResize:t,location:r=`left`,minSize:a,maxSize:o,initialSize:s=200,collapseThreshold:c=1/0,className:l,...u})=>{let[d,f]=(0,m.useState)((0,p.clamp)(s,a,o)),g=(0,m.useRef)(null),_=p.location.construct(r),v=(0,m.useCallback)(e=>{if(g.current===null)return 0;let t=p.box.dim(e,p.location.direction(_),!0)*(1-2*Number([`bottom`,`right`].includes(_))),n=g.current+t,r=(0,p.clamp)(n,a,o);return(r-n)/(a??QQ)>c?ZQ:r},[_,a,o,c]),y=(0,m.useRef)(null),b=(0,m.useCallback)(e=>{let n=v(e);f(n),y.current!=null&&t?.(n,p.box.construct(y.current))},[t,v]),x=(0,m.useCallback)(()=>f(e=>(g.current=e,e)),[f]),S=(0,m.useCallback)(t=>v(t)===ZQ&&e?.(),[e,v]);return(0,m.useEffect)(()=>{a==null||o==null||f(e=>{let t=(0,p.clamp)(e,a,o);return g.current=t,t})},[a,o]),(0,h.jsx)(zQ,{ref:y,location:_,size:d,onDragStart:n.b({onMove:b,onStart:x,onEnd:S}),className:i.a(l,i.n.expanded(d!==ZQ)),...u})},e$=e.n({Base:()=>zQ,Multiple:()=>VQ,Single:()=>$Q,calculateDiffPercentage:()=>KQ,useMultiple:()=>BQ}),t$=e.n({Eraser:()=>r$,use:()=>n$}),n$=({aetherKey:e,enabled:t=!0})=>{let{setState:i}=n.l({aetherKey:e,type:f.t.TYPE,schema:f.r,initialState:{region:p.box.ZERO,enabled:t}}),a=r.f(t);return{erase:(0,m.useCallback)(e=>{i({enabled:a.current,region:e})},[i,a])}},r$=({aetherKey:e,children:t})=>{let{erase:r}=n$({aetherKey:e});return(0,h.jsx)(`div`,{ref:n.p(r),className:i.n(i.n.inheritDims()),children:t})},i$=({items:e,initialKey:t})=>{let[n,r]=(0,m.useState)(t);return{onSelect:e=>r(e===n?void 0:e),activeItem:e.find(e=>e.key===n)}},a$=({activeItem:e,children:t,onSelect:n,location:r=`left`,collapseThreshold:a=.65,className:o,onResize:s,onCollapse:c,eraseEnabled:l,...u})=>{let d=p.location.direction(r);l??=e!=null;let f=(0,m.useCallback)(()=>{c?c():e!=null&&n?.(e.key)},[n,e?.key,c]),{erase:g}=n$({enabled:l}),_=(0,m.useCallback)((e,t)=>{s?.(e,t),g(t)},[s,g]),{content:v,minSize:y,maxSize:b,initialSize:x=0}=e??{};return(0,h.jsx)($Q,{className:i.n(i.n.B(`nav-drawer`),i.n.dir(d),i.n.visible(e!=null),o),collapseThreshold:a,onCollapse:f,location:r,onResize:_,minSize:y,maxSize:b,initialSize:x,...u,children:(0,h.jsx)(LQ,{children:v})})},o$=e.n({Bar:()=>kQ,Drawer:()=>a$,useDrawer:()=>i$}),s$=({value:e,onChange:n,onBlur:r,onlyChangeOnBlur:a,variant:c,...u})=>{let[d,f]=(0,m.useState)(null),g=(e,t=!1)=>{let r=e.toString();if(f(r),typeof e!=`string`){n(Number(e)),f(null);return}let i=new p.TimeStamp(r,`local`);(!a||t)&&(n(Number(i.valueOf())),f(null))},_=e=>{g(e.target.value,!0),f(null),r?.(e)},v=new p.TimeStamp(e,`UTC`),y=v.toString(`ISO`,`local`).slice(0,-1),[b,x]=(0,m.useState)(!1);return(0,h.jsxs)(l.o,{visible:b,variant:`modal`,zIndex:500,onVisibleChange:x,children:[(0,h.jsx)(o.v,{className:i.n.BE(`input`,`datetime`),variant:c,type:`datetime-local`,onBlur:_,required:!1,value:d??y,onChange:g,step:1e-5,...u,children:(0,h.jsx)(s.i,{onClick:()=>x(!b),variant:c,children:(0,h.jsx)(t.p,{})})}),(0,h.jsx)(u$,{value:v,onChange:e=>n(Number(e.valueOf()))})]})},c$=M_.extend(_w),l$=[`Control`,`Enter`],u$=({value:e,onChange:n})=>{let{close:c}=l.s();return(0,h.jsx)(l.a,{children:(0,h.jsxs)(a.n,{className:i.n.B(`datetime-modal`),empty:!0,children:[(0,h.jsxs)(a.n,{className:i.n.B(`datetime-modal-container`),children:[(0,h.jsx)(a.n,{x:!0,className:i.n.B(`header`),children:(0,h.jsx)(o.S,{level:`h3`,format:`preciseDate`,children:e})}),(0,h.jsx)(s.i,{variant:`text`,className:i.n.B(`close-btn`),onClick:c,children:(0,h.jsx)(t.v,{})}),(0,h.jsxs)(a.n,{x:!0,className:i.n.B(`content`),children:[(0,h.jsx)(f$,{value:e,onChange:n,close:c}),(0,h.jsx)(h$,{value:e,onChange:n})]})]}),(0,h.jsxs)(kQ,{location:`bottom`,size:`7rem`,children:[(0,h.jsxs)(kQ.Start,{gap:`small`,children:[(0,h.jsx)(t.r,{level:`small`,trigger:l$}),(0,h.jsx)(r.a,{level:`small`,children:`To Finish`})]}),(0,h.jsx)(kQ.End,{children:(0,h.jsx)(s.i,{onClick:c,variant:`outlined`,children:`Done`})})]})]})})},d$=s.c(e=>{let t=u.l(e.key);return(0,h.jsx)(u.o,{...e,children:(0,h.jsx)(r.a,{children:t?.name})})}),f$=({value:e,onChange:t,close:n})=>{let[s,c]=(0,m.useState)(``),[l,d]=(0,m.useState)([]),{data:f,getItem:g}=u.n({data:l});return(0,h.jsxs)(a.n,{pack:!0,y:!0,className:i.n.B(`ai-selector`),background:1,full:`y`,children:[(0,h.jsx)(o.v,{value:s,onChange:r=>{let i=c$(r),a=i.dates().get(),o=[];o.push(...a.map(e=>{let r=new p.TimeStamp(e.start);return{key:e.start,name:r.toString(`preciseDate`,`local`),onSelect:()=>{t(r),n()}}})),d(o);let s=i.durations().get();o.push(...s.map(r=>{let i=new p.TimeSpan(0);r.hour!=null&&(i=i.add(p.TimeSpan.hours(r.hour))),r.minute!=null&&(i=i.add(p.TimeSpan.minutes(r.minute))),r.second!=null&&(i=i.add(p.TimeSpan.seconds(r.second))),r.millisecond!=null&&(i=i.add(p.TimeSpan.milliseconds(r.millisecond)));let a=e.add(i);return{key:a.valueOf().toString(),name:a.toString(`preciseDate`,`local`),onSelect:()=>{t(a),n()}}})),c(r)},autoFocus:!0,placeholder:`AI Suggestion`,full:`x`}),(0,h.jsx)(o.g,{data:f,allowNone:!0,onChange:e=>{let t=l.find(t=>t.key===e);t&&t.onSelect(),c(``),d([])},getItem:g,children:(0,h.jsx)(u.a,{className:i.n.B(`ai-list`),bordered:!0,borderColor:5,full:`y`,emptyContent:(0,h.jsx)(a.n,{empty:!0,grow:!0,align:`center`,justify:`center`,children:(0,h.jsxs)(a.n,{y:!0,gap:`tiny`,children:[(0,h.jsx)(r.a,{level:`small`,color:`var(--pluto-gray-l7)`,children:`"April 1 at 2PM"`}),(0,h.jsx)(r.a,{level:`small`,color:`var(--pluto-gray-l7)`,children:`"Add 2 two hours"`}),(0,h.jsx)(r.a,{level:`small`,color:`var(--pluto-gray-l7)`,children:`"Next Friday"`})]})}),children:d$})})]})},p$=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],m$=(e,t)=>new Date(t,e+1,0).getDate(),h$=({value:e,onChange:n})=>{let o=e.localMonth,c=e.localYear,l=e.localDay,u=t=>n(e.setLocalMonth(t)),d=t=>n(e.setLocalYear(t)),f=t=>n(e.setLocalDay(t));return(0,h.jsxs)(a.n,{pack:!0,x:!0,className:i.n.B(`datetime-picker`),rounded:!0,children:[(0,h.jsxs)(a.n,{pack:!0,y:!0,align:`stretch`,className:i.n.B(`calendar`),children:[(0,h.jsxs)(a.n,{pack:!0,x:!0,grow:!0,className:i.n.B(`calendar-header`),children:[(0,h.jsx)(s.i,{onClick:()=>u(o-1),variant:`outlined`,children:(0,h.jsx)(t.m.Left,{})}),(0,h.jsx)(r.a,{level:`small`,style:{flexGrow:1,paddingLeft:`1rem`},className:i.n.BE(`calendar-header`,`month`),children:p$[o]}),(0,h.jsx)(s.i,{onClick:()=>u(o+1),style:{borderTopRightRadius:0},variant:`outlined`,children:(0,h.jsx)(t.m.Right,{})})]}),(0,h.jsxs)(a.n,{pack:!0,x:!0,grow:!0,sharp:!0,children:[(0,h.jsx)(s.i,{onClick:()=>d(c-1),variant:`outlined`,children:(0,h.jsx)(t.m.Left,{})}),(0,h.jsx)(r.a,{level:`small`,style:{flexGrow:1,paddingLeft:`1rem`},children:c}),(0,h.jsx)(s.i,{onClick:()=>d(c+1),variant:`outlined`,children:(0,h.jsx)(t.m.Right,{})})]}),(0,h.jsx)(a.n,{x:!0,wrap:!0,gap:`tiny`,style:{padding:`0.5rem`,height:`100%`},children:Array.from({length:m$(o,c)}).map((e,t)=>(0,h.jsx)(s.i,{variant:t+1===l?`outlined`:`text`,onClick:()=>f(t+1),square:!0,children:(0,h.jsx)(r.a,{level:`small`,children:t+1})},t))})]}),(0,h.jsx)(S$,{value:e,onChange:n})]})},g$={padding:`0rem`,paddingLeft:`2rem`,height:`4rem`,minHeight:`4rem`,maxHeight:`4rem`},_$=s.c(e=>(0,h.jsx)(o.f,{...e,style:g$,children:e.index})),v$=e=>{let t=Array.from({length:e},(e,t)=>t),n=({value:e,onChange:n})=>(0,h.jsx)(o.g,{data:t,value:e,onChange:n,children:(0,h.jsx)(u.a,{className:i.n.B(`time-list`),children:_$})});return n.displayName=`TimeList`,n},y$=v$(24),b$=v$(60),x$=v$(60),S$=({value:e,onChange:t})=>(0,h.jsxs)(a.n,{pack:!0,y:!0,className:i.n.B(`time-selector`),children:[(0,h.jsxs)(a.n,{pack:!0,x:!0,grow:!0,className:i.n.B(`time-selector-list`),children:[(0,h.jsx)(y$,{value:e.localHour,onChange:n=>t(e.setLocalHour(n))}),(0,h.jsx)(b$,{value:e.localMinute,onChange:n=>t(e.setLocalMinute(n))}),(0,h.jsx)(x$,{value:e.localSecond,onChange:n=>t(e.setLocalSecond(n))})]}),(0,h.jsx)(xQ,{size:`small`,value:e.localMillisecond,onChange:n=>t(e.setLocalMillisecond(n)),endContent:`ms`,showDragHandle:!1,borderColor:5})]}),C$=({className:e,variant:t,...n})=>(0,h.jsx)(r.a,{className:i.n(i.n.B(`input-help-text`),e),color:8,status:p.status.removeVariants(t,`success`),level:`small`,...n}),w$=({className:e,required:t=!1,children:n,...r})=>(0,h.jsxs)(`label`,{className:i.n(i.n.B(`input-label`),e),...r,children:[n,` `,t&&(0,h.jsx)(`span`,{className:i.n.B(`required-indicator`),children:`*`})]}),T$=(e,t=`y`)=>e??(p.direction.construct(t)===`y`?`stretch`:`center`),E$=({label:e,showLabel:t=!0,helpText:n,direction:r,x:o,y:s,className:c,children:l,required:u,align:d,gap:f=`small`,padHelpText:p=!1,status:m,showHelpText:g=!0,..._})=>{let v=a.i(r,o,s,!1),y,b=g&&n!=null&&n.length>0,x=t&&e!=null&&e.length>0;return!b&&!x?l:(y=v===`x`?(0,h.jsxs)(a.n,{y:!0,gap:`small`,children:[l,g&&(p||n!=null&&n.length>0)&&(0,h.jsx)(C$,{variant:m,children:n})]}):(0,h.jsxs)(a.n,{y:!0,gap:1/3,align:`stretch`,children:[l,(p||n!=null&&n.length>0)&&(0,h.jsx)(C$,{variant:m,children:n})]}),(0,h.jsxs)(a.n,{className:i.n(i.n.BE(`input`,`item`),c),direction:v,gap:f,align:T$(d,v),..._,children:[x&&(0,h.jsx)(w$,{required:u,children:e}),y]}))},D$=e=>(0,h.jsx)(v,{...e,inputType:`switch`}),O$=(e,t)=>new p.TimeStamp(e).add(t).sub(p.TimeStamp.utcOffset),k$={x:Number(p.TimeSpan.SECOND.valueOf())*.5,y:Number(p.TimeSpan.MINUTE.valueOf())},A$=({value:e,onChange:t,tzInfo:n})=>{let r=new p.TimeStamp(e,`UTC`),i=r.sub(p.TimeStamp.utcOffset);if(i.after(p.TimeStamp.DAY)){let e=i.remainder(p.TimeStamp.DAY);t(Number(new p.TimeStamp(e,`local`).valueOf()))}let a=(0,m.useCallback)(e=>{let n;if(typeof e==`number`)n=new p.TimeStamp(e,`UTC`);else if(e.length===0)return;else n=new p.TimeStamp(e,`local`);t(Number(n.valueOf()))},[t,n]);return{inputValue:r.toString(`time`,n),ts:r,handleChange:a}},j$=({ref:e,size:t,value:n,tzInfo:r=`local`,onChange:a,dragDirection:s,showDragHandle:c=!0,className:l,children:u,...d})=>{let{inputValue:f,ts:p,handleChange:m}=A$({value:n,onChange:a,tzInfo:r});return(0,h.jsxs)(o.v,{ref:e,value:f,className:i.n(i.n.B(`input-time`),l),type:`time`,step:`1`,onChange:m,...d,children:[c&&(0,h.jsx)(w,{direction:s,value:Number(p.valueOf()),onChange:m,dragScale:k$}),u]})},M$=e.n({Checkbox:()=>y,Date:()=>D,DateTime:()=>s$,DragButton:()=>w,HelpText:()=>C$,Item:()=>E$,Label:()=>w$,Numeric:()=>xQ,Switch:()=>D$,Text:()=>o.v,Time:()=>j$,combineDateAndTimeValue:()=>O$,useDate:()=>E,useTime:()=>A$});Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return t$}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return BQ}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return NQ}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return AQ}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return o$}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return RQ}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return xQ}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return D$}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return e$}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return MQ}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return E$}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return VQ}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return M$}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return LQ}});