@synnaxlabs/pluto 0.43.1 → 0.44.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Animated-3QNTHym1.cjs +1 -0
- package/dist/Animated-KCUNFDvN.js +27 -0
- package/dist/Menu-BFD8DPDp.js +61 -0
- package/dist/Menu-BPH8apK8.cjs +1 -0
- package/dist/Toggle-1E6vrl6G.js +26 -0
- package/dist/Toggle-BHiPL61M.cjs +1 -0
- package/dist/{Video-BuzHLiXL.cjs → Video-BidrtYj_.cjs} +1 -1
- package/dist/{Video-Bq_WSdfc.js → Video-Cm8ZBqid.js} +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/color.cjs +1 -1
- package/dist/color.js +1 -1
- package/dist/css-9yccD6t_.cjs +8 -0
- package/dist/css-Dl9aM7Jz.js +4337 -0
- package/dist/css.cjs +1 -1
- package/dist/css.js +5 -11
- package/dist/dialog.cjs +1 -0
- package/dist/dialog.js +4 -0
- package/dist/eraser-CLWNvWDn.cjs +63 -0
- package/dist/eraser-CZknVTjw.js +13325 -0
- package/dist/ether.cjs +1 -1
- package/dist/ether.js +46 -47
- package/dist/external-5PfK-PF3.js +75 -0
- package/dist/external-B16icDUE.js +69 -0
- package/dist/external-B1mnn7_J.js +30 -0
- package/dist/external-BDFD5v83.cjs +1 -0
- package/dist/external-BgZRkFq4.js +10 -0
- package/dist/external-BmaCxlPM.js +43 -0
- package/dist/external-Bmv3JTk3.cjs +1 -0
- package/dist/external-Bx2Al5fy.js +82 -0
- package/dist/external-Bx2weRCW.cjs +1 -0
- package/dist/external-BzGhOwHW.js +319 -0
- package/dist/external-CKvxjJs5.cjs +1 -0
- package/dist/external-CtwEvFYE.cjs +1 -0
- package/dist/external-DF7sP0pe.cjs +1 -0
- package/dist/external-DIE22vag.js +375 -0
- package/dist/external-DIRuVzOZ.cjs +1 -0
- package/dist/external-DJ4pzZBh.cjs +1 -0
- package/dist/external-DMB49R_H.cjs +1 -0
- package/dist/external-DPN-ziJs.js +25 -0
- package/dist/external-DRcsXa_0.cjs +46 -0
- package/dist/external-DTzGaj9d.js +69 -0
- package/dist/external-DWSWz3Rk.js +42 -0
- package/dist/external-Dr5azzr8.cjs +1 -0
- package/dist/external-R1cRWCTB.js +126 -0
- package/dist/external-T7fQRFNS.cjs +1 -0
- package/dist/{external-69bqTAcN.js → external-k23HUvy8.js} +2058 -2056
- package/dist/external-lMAel8Te.cjs +1 -0
- package/dist/flex.cjs +1 -0
- package/dist/flex.js +4 -0
- package/dist/{fontString-ap-NPnCD.js → fontString-Bm52S4Lo.js} +12 -13
- package/dist/fontString-BptzSQcY.cjs +1 -0
- package/dist/header.cjs +1 -1
- package/dist/header.js +1 -1
- package/dist/index.cjs +7 -7
- package/dist/index.js +12608 -11576
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/pluto.css +1 -1
- package/dist/provider-BhLG7kqF.js +6031 -0
- package/dist/provider-DVZt686Q.cjs +53 -0
- package/dist/src/aether/aether/aether.d.ts +11 -5
- package/dist/src/aether/aether/aether.d.ts.map +1 -1
- package/dist/src/aether/aether/aether.spec.d.ts +1 -1
- package/dist/src/aether/aether/aether.spec.d.ts.map +1 -1
- package/dist/src/aether/main.d.ts +2 -2
- package/dist/src/aether/main.d.ts.map +1 -1
- package/dist/src/aether/main.spec.d.ts +1 -1
- package/dist/src/aether/main.spec.d.ts.map +1 -1
- package/dist/src/alamos/aether/alamos.d.ts +1 -1
- package/dist/src/alamos/aether/alamos.d.ts.map +1 -1
- package/dist/src/breadcrumb/Breadcrumb.d.ts +15 -42
- package/dist/src/breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/src/button/Button.d.ts +16 -32
- package/dist/src/button/Button.d.ts.map +1 -1
- package/dist/src/button/Toggle.d.ts +3 -36
- package/dist/src/button/Toggle.d.ts.map +1 -1
- package/dist/src/button/external.d.ts +0 -2
- package/dist/src/button/external.d.ts.map +1 -1
- package/dist/src/caret/Animated.d.ts +2 -2
- package/dist/src/caret/Animated.d.ts.map +1 -1
- package/dist/src/channel/AliasContext.d.ts +19 -0
- package/dist/src/channel/AliasContext.d.ts.map +1 -0
- package/dist/src/channel/AliasInput.d.ts +9 -0
- package/dist/src/channel/AliasInput.d.ts.map +1 -0
- package/dist/src/channel/AliasProvider.d.ts +1 -19
- package/dist/src/channel/AliasProvider.d.ts.map +1 -1
- package/dist/src/channel/Select.d.ts +9 -11
- package/dist/src/channel/Select.d.ts.map +1 -1
- package/dist/src/channel/external.d.ts +3 -0
- package/dist/src/channel/external.d.ts.map +1 -1
- package/dist/src/channel/queries.d.ts +69 -0
- package/dist/src/channel/queries.d.ts.map +1 -0
- package/dist/src/channel/queries.spec.d.ts +2 -0
- package/dist/src/channel/queries.spec.d.ts.map +1 -0
- package/dist/src/color/Picker.d.ts.map +1 -1
- package/dist/src/color/Provider.d.ts +2 -2
- package/dist/src/color/Provider.d.ts.map +1 -1
- package/dist/src/color/Swatch.d.ts +3 -3
- package/dist/src/color/Swatch.d.ts.map +1 -1
- package/dist/src/component/SelectSize.d.ts +7 -0
- package/dist/src/component/SelectSize.d.ts.map +1 -0
- package/dist/src/component/external.d.ts +5 -0
- package/dist/src/component/external.d.ts.map +1 -0
- package/dist/src/component/index.d.ts +2 -0
- package/dist/src/component/index.d.ts.map +1 -0
- package/dist/src/component/removeProps.d.ts.map +1 -0
- package/dist/src/component/removeProps.spec.d.ts.map +1 -0
- package/dist/src/{util → component}/renderProp.d.ts +1 -1
- package/dist/src/component/renderProp.d.ts.map +1 -0
- package/dist/src/component/size.d.ts +12 -0
- package/dist/src/component/size.d.ts.map +1 -0
- package/dist/src/css/bem.d.ts +6 -6
- package/dist/src/css/bem.d.ts.map +1 -1
- package/dist/src/css/css.d.ts +6 -6
- package/dist/src/css/css.d.ts.map +1 -1
- package/dist/src/css/units.d.ts +1 -1
- package/dist/src/css/units.d.ts.map +1 -1
- package/dist/src/dialog/Background.d.ts +8 -0
- package/dist/src/dialog/Background.d.ts.map +1 -0
- package/dist/src/dialog/Dialog.d.ts +6 -0
- package/dist/src/dialog/Dialog.d.ts.map +1 -0
- package/dist/src/dialog/Dialog.spec.d.ts +2 -0
- package/dist/src/dialog/Dialog.spec.d.ts.map +1 -0
- package/dist/src/dialog/Frame.d.ts +48 -0
- package/dist/src/dialog/Frame.d.ts.map +1 -0
- package/dist/src/dialog/Trigger.d.ts +7 -0
- package/dist/src/dialog/Trigger.d.ts.map +1 -0
- package/dist/src/dialog/external.d.ts +5 -0
- package/dist/src/dialog/external.d.ts.map +1 -0
- package/dist/src/dialog/index.d.ts +1 -1
- package/dist/src/dialog/index.d.ts.map +1 -1
- package/dist/src/dialog/position.d.ts +10 -0
- package/dist/src/dialog/position.d.ts.map +1 -0
- package/dist/src/direction/Select.d.ts +8 -0
- package/dist/src/direction/Select.d.ts.map +1 -0
- package/dist/src/direction/index.d.ts +2 -0
- package/dist/src/direction/index.d.ts.map +1 -0
- package/dist/src/divider/Divider.d.ts +4 -5
- package/dist/src/divider/Divider.d.ts.map +1 -1
- package/dist/src/flex/Box.d.ts +128 -0
- package/dist/src/flex/Box.d.ts.map +1 -0
- package/dist/src/flex/Box.spec.d.ts +2 -0
- package/dist/src/flex/Box.spec.d.ts.map +1 -0
- package/dist/src/flex/Select.d.ts +7 -0
- package/dist/src/flex/Select.d.ts.map +1 -0
- package/dist/src/flex/external.d.ts +3 -0
- package/dist/src/flex/external.d.ts.map +1 -0
- package/dist/src/flex/index.d.ts +2 -0
- package/dist/src/flex/index.d.ts.map +1 -0
- package/dist/src/flux/Context.d.ts +4 -0
- package/dist/src/flux/Context.d.ts.map +1 -0
- package/dist/src/flux/Provider.d.ts +9 -0
- package/dist/src/flux/Provider.d.ts.map +1 -0
- package/dist/src/flux/aether/external.d.ts +5 -0
- package/dist/src/flux/aether/external.d.ts.map +1 -0
- package/dist/src/flux/aether/index.d.ts +2 -0
- package/dist/src/flux/aether/index.d.ts.map +1 -0
- package/dist/src/flux/aether/listeners.d.ts +16 -0
- package/dist/src/flux/aether/listeners.d.ts.map +1 -0
- package/dist/src/flux/aether/params.d.ts +31 -0
- package/dist/src/flux/aether/params.d.ts.map +1 -0
- package/dist/src/flux/aether/provider.d.ts +29 -0
- package/dist/src/flux/aether/provider.d.ts.map +1 -0
- package/dist/src/flux/aether/streamer.d.ts +22 -0
- package/dist/src/flux/aether/streamer.d.ts.map +1 -0
- package/dist/src/flux/aether/streamer.spec.d.ts +2 -0
- package/dist/src/flux/aether/streamer.spec.d.ts.map +1 -0
- package/dist/src/flux/aether/types.d.ts +13 -0
- package/dist/src/flux/aether/types.d.ts.map +1 -0
- package/dist/src/flux/external.d.ts +12 -0
- package/dist/src/flux/external.d.ts.map +1 -0
- package/dist/src/flux/form.d.ts +112 -0
- package/dist/src/flux/form.d.ts.map +1 -0
- package/dist/src/flux/form.spec.d.ts +2 -0
- package/dist/src/flux/form.spec.d.ts.map +1 -0
- package/dist/src/flux/index.d.ts +2 -0
- package/dist/src/flux/index.d.ts.map +1 -0
- package/dist/src/flux/list.d.ts +251 -0
- package/dist/src/flux/list.d.ts.map +1 -0
- package/dist/src/flux/list.spec.d.ts +2 -0
- package/dist/src/flux/list.spec.d.ts.map +1 -0
- package/dist/src/flux/listeners.d.ts +4 -0
- package/dist/src/flux/listeners.d.ts.map +1 -0
- package/dist/src/flux/listeners.spec.d.ts +2 -0
- package/dist/src/flux/listeners.spec.d.ts.map +1 -0
- package/dist/src/flux/result.d.ts +101 -0
- package/dist/src/flux/result.d.ts.map +1 -0
- package/dist/src/flux/result.spec.d.ts +2 -0
- package/dist/src/flux/result.spec.d.ts.map +1 -0
- package/dist/src/flux/retrieve.d.ts +213 -0
- package/dist/src/flux/retrieve.d.ts.map +1 -0
- package/dist/src/flux/retrieve.spec.d.ts +2 -0
- package/dist/src/flux/retrieve.spec.d.ts.map +1 -0
- package/dist/src/flux/update.d.ts +132 -0
- package/dist/src/flux/update.d.ts.map +1 -0
- package/dist/src/flux/update.spec.d.ts +2 -0
- package/dist/src/flux/update.spec.d.ts.map +1 -0
- package/dist/src/flux/useMountListeners.d.ts +7 -0
- package/dist/src/flux/useMountListeners.d.ts.map +1 -0
- package/dist/src/form/Context.d.ts +34 -0
- package/dist/src/form/Context.d.ts.map +1 -0
- package/dist/src/form/Field.d.ts +23 -27
- package/dist/src/form/Field.d.ts.map +1 -1
- package/dist/src/form/Form.d.ts +2 -173
- package/dist/src/form/Form.d.ts.map +1 -1
- package/dist/src/form/external.d.ts +3 -0
- package/dist/src/form/external.d.ts.map +1 -1
- package/dist/src/form/state.d.ts +53 -0
- package/dist/src/form/state.d.ts.map +1 -0
- package/dist/src/form/state.spec.d.ts +2 -0
- package/dist/src/form/state.spec.d.ts.map +1 -0
- package/dist/src/form/synced.d.ts +5 -4
- package/dist/src/form/synced.d.ts.map +1 -1
- package/dist/src/form/use.d.ts +24 -0
- package/dist/src/form/use.d.ts.map +1 -0
- package/dist/src/form/useField.d.ts +64 -0
- package/dist/src/form/useField.d.ts.map +1 -0
- package/dist/src/generic/Generic.d.ts +8 -3
- package/dist/src/generic/Generic.d.ts.map +1 -1
- package/dist/src/generic/Generic.spec.d.ts +2 -0
- package/dist/src/generic/Generic.spec.d.ts.map +1 -0
- package/dist/src/hardware/device/Select.d.ts +5 -7
- package/dist/src/hardware/device/Select.d.ts.map +1 -1
- package/dist/src/hardware/device/StatusIndicator.d.ts +8 -0
- package/dist/src/hardware/device/StatusIndicator.d.ts.map +1 -0
- package/dist/src/hardware/device/external.d.ts +4 -0
- package/dist/src/hardware/device/external.d.ts.map +1 -0
- package/dist/src/hardware/device/index.d.ts +1 -1
- package/dist/src/hardware/device/index.d.ts.map +1 -1
- package/dist/src/hardware/device/queries.d.ts +12 -0
- package/dist/src/hardware/device/queries.d.ts.map +1 -0
- package/dist/src/hardware/device/queries.spec.d.ts +2 -0
- package/dist/src/hardware/device/queries.spec.d.ts.map +1 -0
- package/dist/src/hardware/rack/Select.d.ts +6 -2
- package/dist/src/hardware/rack/Select.d.ts.map +1 -1
- package/dist/src/hardware/rack/StatusIndicator.d.ts +8 -0
- package/dist/src/hardware/rack/StatusIndicator.d.ts.map +1 -0
- package/dist/src/hardware/rack/external.d.ts +7 -0
- package/dist/src/hardware/rack/external.d.ts.map +1 -0
- package/dist/src/hardware/rack/index.d.ts +1 -1
- package/dist/src/hardware/rack/index.d.ts.map +1 -1
- package/dist/src/hardware/rack/queries.d.ts +10 -0
- package/dist/src/hardware/rack/queries.d.ts.map +1 -0
- package/dist/src/hardware/rack/queries.spec.d.ts +2 -0
- package/dist/src/hardware/rack/queries.spec.d.ts.map +1 -0
- package/dist/src/hardware/rack/synchronizers.d.ts +3 -0
- package/dist/src/hardware/rack/synchronizers.d.ts.map +1 -0
- package/dist/src/hardware/rack/use.d.ts +3 -0
- package/dist/src/hardware/rack/use.d.ts.map +1 -0
- package/dist/src/hardware/rack/useStatus.d.ts +3 -0
- package/dist/src/hardware/rack/useStatus.d.ts.map +1 -0
- package/dist/src/hardware/task/index.d.ts +2 -0
- package/dist/src/hardware/task/index.d.ts.map +1 -0
- package/dist/src/hardware/task/queries.d.ts +17 -0
- package/dist/src/hardware/task/queries.d.ts.map +1 -0
- package/dist/src/hardware/task/queries.spec.d.ts +2 -0
- package/dist/src/hardware/task/queries.spec.d.ts.map +1 -0
- package/dist/src/haul/Haul.d.ts +5 -4
- package/dist/src/haul/Haul.d.ts.map +1 -1
- package/dist/src/header/Actions.d.ts +4 -6
- package/dist/src/header/Actions.d.ts.map +1 -1
- package/dist/src/header/Header.d.ts +4 -3
- package/dist/src/header/Header.d.ts.map +1 -1
- package/dist/src/header/Title.d.ts +1 -1
- package/dist/src/header/Title.d.ts.map +1 -1
- package/dist/src/hooks/index.d.ts +3 -2
- package/dist/src/hooks/index.d.ts.map +1 -1
- package/dist/src/hooks/ref.d.ts +2 -2
- package/dist/src/hooks/ref.d.ts.map +1 -1
- package/dist/src/hooks/useAsyncEffect.d.ts +45 -0
- package/dist/src/hooks/useAsyncEffect.d.ts.map +1 -0
- package/dist/src/hooks/useAsyncEffect.spec.d.ts +2 -0
- package/dist/src/hooks/useAsyncEffect.spec.d.ts.map +1 -0
- package/dist/src/hooks/useEffectCompare.d.ts +3 -0
- package/dist/src/hooks/useEffectCompare.d.ts.map +1 -0
- package/dist/src/hooks/useRequiredContext.d.ts +1 -1
- package/dist/src/hooks/useRequiredContext.d.ts.map +1 -1
- package/dist/src/icon/Icon.d.ts +14 -16
- package/dist/src/icon/Icon.d.ts.map +1 -1
- package/dist/src/icon/external.d.ts +3 -0
- package/dist/src/icon/external.d.ts.map +1 -0
- package/dist/src/icon/index.d.ts +1 -1
- package/dist/src/icon/index.d.ts.map +1 -1
- package/dist/src/icon/registry.d.ts +206 -0
- package/dist/src/icon/registry.d.ts.map +1 -0
- package/dist/src/index.d.ts +7 -6
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/input/Boolean.d.ts +11 -0
- package/dist/src/input/Boolean.d.ts.map +1 -0
- package/dist/src/input/Checkbox.d.ts +17 -0
- package/dist/src/input/Checkbox.d.ts.map +1 -0
- package/dist/src/input/Date.d.ts +3 -3
- package/dist/src/input/Date.d.ts.map +1 -1
- package/dist/src/input/DateTime.d.ts +3 -2
- package/dist/src/input/DateTime.d.ts.map +1 -1
- package/dist/src/input/DragButton.d.ts +2 -2
- package/dist/src/input/DragButton.d.ts.map +1 -1
- package/dist/src/input/HelpText.d.ts +1 -1
- package/dist/src/input/HelpText.d.ts.map +1 -1
- package/dist/src/input/Item.d.ts +4 -4
- package/dist/src/input/Item.d.ts.map +1 -1
- package/dist/src/input/Numeric.d.ts +4 -4
- package/dist/src/input/Numeric.d.ts.map +1 -1
- package/dist/src/input/Switch.d.ts +4 -3
- package/dist/src/input/Switch.d.ts.map +1 -1
- package/dist/src/input/Text.d.ts +12 -9
- package/dist/src/input/Text.d.ts.map +1 -1
- package/dist/src/input/TextArea.d.ts +9 -5
- package/dist/src/input/TextArea.d.ts.map +1 -1
- package/dist/src/input/Time.d.ts +6 -5
- package/dist/src/input/Time.d.ts.map +1 -1
- package/dist/src/input/external.d.ts +1 -0
- package/dist/src/input/external.d.ts.map +1 -1
- package/dist/src/input/types.d.ts +7 -22
- package/dist/src/input/types.d.ts.map +1 -1
- package/dist/src/label/Select.d.ts +6 -5
- package/dist/src/label/Select.d.ts.map +1 -1
- package/dist/src/label/external.d.ts +1 -0
- package/dist/src/label/external.d.ts.map +1 -1
- package/dist/src/label/queries.d.ts +38 -0
- package/dist/src/label/queries.d.ts.map +1 -0
- package/dist/src/label/queries.spec.d.ts +2 -0
- package/dist/src/label/queries.spec.d.ts.map +1 -0
- package/dist/src/list/Frame.d.ts +33 -0
- package/dist/src/list/Frame.d.ts.map +1 -0
- package/dist/src/list/Item.d.ts +17 -7
- package/dist/src/list/Item.d.ts.map +1 -1
- package/dist/src/list/Items.d.ts +13 -0
- package/dist/src/list/Items.d.ts.map +1 -0
- package/dist/src/list/external.d.ts +6 -10
- package/dist/src/list/external.d.ts.map +1 -1
- package/dist/src/list/pager.d.ts +62 -0
- package/dist/src/list/pager.d.ts.map +1 -0
- package/dist/src/list/pager.spec.d.ts +2 -0
- package/dist/src/list/pager.spec.d.ts.map +1 -0
- package/dist/src/list/useKeysData.d.ts +7 -0
- package/dist/src/list/useKeysData.d.ts.map +1 -0
- package/dist/src/list/useKeysData.spec.d.ts +2 -0
- package/dist/src/list/useKeysData.spec.d.ts.map +1 -0
- package/dist/src/list/useMapData.d.ts +18 -0
- package/dist/src/list/useMapData.d.ts.map +1 -0
- package/dist/src/list/useMapData.spec.d.ts +2 -0
- package/dist/src/list/useMapData.spec.d.ts.map +1 -0
- package/dist/src/list/useStaticData.d.ts +19 -0
- package/dist/src/list/useStaticData.d.ts.map +1 -0
- package/dist/src/list/useStaticData.spec.d.ts +2 -0
- package/dist/src/list/useStaticData.spec.d.ts.map +1 -0
- package/dist/src/memo/useMemoCompare.d.ts +1 -1
- package/dist/src/memo/useMemoCompare.d.ts.map +1 -1
- package/dist/src/menu/ContextMenu.d.ts +3 -3
- package/dist/src/menu/ContextMenu.d.ts.map +1 -1
- package/dist/src/menu/Item.d.ts +3 -28
- package/dist/src/menu/Item.d.ts.map +1 -1
- package/dist/src/menu/Menu.d.ts +6 -5
- package/dist/src/menu/Menu.d.ts.map +1 -1
- package/dist/src/mosaic/Mosaic.d.ts +2 -2
- package/dist/src/mosaic/Mosaic.d.ts.map +1 -1
- package/dist/src/mosaic/types.d.ts +1 -1
- package/dist/src/mosaic/types.d.ts.map +1 -1
- package/dist/src/nav/Bar.d.ts +3 -3
- package/dist/src/nav/Bar.d.ts.map +1 -1
- package/dist/src/notation/Select.d.ts +3 -3
- package/dist/src/notation/Select.d.ts.map +1 -1
- package/dist/src/note/Note.d.ts +2 -2
- package/dist/src/note/Note.d.ts.map +1 -1
- package/dist/src/observe/use.d.ts +0 -7
- package/dist/src/observe/use.d.ts.map +1 -1
- package/dist/src/ontology/external.d.ts +2 -0
- package/dist/src/ontology/external.d.ts.map +1 -0
- package/dist/src/ontology/index.d.ts +2 -0
- package/dist/src/ontology/index.d.ts.map +1 -0
- package/dist/src/ontology/queries.d.ts +27 -0
- package/dist/src/ontology/queries.d.ts.map +1 -0
- package/dist/src/ontology/queries.spec.d.ts +2 -0
- package/dist/src/ontology/queries.spec.d.ts.map +1 -0
- package/dist/src/os/Controls/Mac.d.ts.map +1 -1
- package/dist/src/os/Controls/Windows.d.ts +1 -1
- package/dist/src/os/Controls/Windows.d.ts.map +1 -1
- package/dist/src/os/Controls/types.d.ts +4 -4
- package/dist/src/os/Controls/types.d.ts.map +1 -1
- package/dist/src/pluto/Pluto.d.ts.map +1 -1
- package/dist/src/pluto/aether/pluto.d.ts.map +1 -1
- package/dist/src/ranger/Breadcrumb.d.ts +9 -0
- package/dist/src/ranger/Breadcrumb.d.ts.map +1 -0
- package/dist/src/ranger/Select.d.ts +13 -5
- package/dist/src/ranger/Select.d.ts.map +1 -1
- package/dist/src/ranger/TimeRangeChip.d.ts +3 -4
- package/dist/src/ranger/TimeRangeChip.d.ts.map +1 -1
- package/dist/src/ranger/external.d.ts +2 -1
- package/dist/src/ranger/external.d.ts.map +1 -1
- package/dist/src/ranger/queries.d.ts +97 -0
- package/dist/src/ranger/queries.d.ts.map +1 -0
- package/dist/src/ranger/queries.spec.d.ts +2 -0
- package/dist/src/ranger/queries.spec.d.ts.map +1 -0
- package/dist/src/resize/Core.d.ts +3 -3
- package/dist/src/resize/Core.d.ts.map +1 -1
- package/dist/src/resize/Multiple.d.ts +2 -2
- package/dist/src/resize/Multiple.d.ts.map +1 -1
- package/dist/src/select/Button.d.ts +10 -44
- package/dist/src/select/Button.d.ts.map +1 -1
- package/dist/src/select/Button.spec.d.ts +2 -0
- package/dist/src/select/Button.spec.d.ts.map +1 -0
- package/dist/src/select/Dialog.d.ts +16 -0
- package/dist/src/select/Dialog.d.ts.map +1 -0
- package/dist/src/select/Dialog.spec.d.ts +2 -0
- package/dist/src/select/Dialog.spec.d.ts.map +1 -0
- package/dist/src/select/Frame.d.ts +41 -0
- package/dist/src/select/Frame.d.ts.map +1 -0
- package/dist/src/select/ListItem.d.ts +6 -0
- package/dist/src/select/ListItem.d.ts.map +1 -0
- package/dist/src/select/Multiple.d.ts +16 -51
- package/dist/src/select/Multiple.d.ts.map +1 -1
- package/dist/src/select/Multiple.spec.d.ts +2 -0
- package/dist/src/select/Multiple.spec.d.ts.map +1 -0
- package/dist/src/select/MultipleTrigger.d.ts +24 -0
- package/dist/src/select/MultipleTrigger.d.ts.map +1 -0
- package/dist/src/select/SearchInput.d.ts +10 -0
- package/dist/src/select/SearchInput.d.ts.map +1 -0
- package/dist/src/select/Single.d.ts +15 -49
- package/dist/src/select/Single.d.ts.map +1 -1
- package/dist/src/select/Single.spec.d.ts +2 -0
- package/dist/src/select/Single.spec.d.ts.map +1 -0
- package/dist/src/select/SingleTrigger.d.ts +14 -0
- package/dist/src/select/SingleTrigger.d.ts.map +1 -0
- package/dist/src/select/Static.d.ts +12 -0
- package/dist/src/select/Static.d.ts.map +1 -0
- package/dist/src/select/Static.spec.d.ts +2 -0
- package/dist/src/select/Static.spec.d.ts.map +1 -0
- package/dist/src/select/external.d.ts +8 -4
- package/dist/src/select/external.d.ts.map +1 -1
- package/dist/src/select/text/Level.d.ts +2 -6
- package/dist/src/select/text/Level.d.ts.map +1 -1
- package/dist/src/select/text/Weight.d.ts +2 -6
- package/dist/src/select/text/Weight.d.ts.map +1 -1
- package/dist/src/select/use.d.ts +42 -0
- package/dist/src/select/use.d.ts.map +1 -0
- package/dist/src/select/use.spec.d.ts +2 -0
- package/dist/src/select/use.spec.d.ts.map +1 -0
- package/dist/src/select/useHover.d.ts +11 -0
- package/dist/src/select/useHover.d.ts.map +1 -0
- package/dist/src/select/useHover.spec.d.ts +2 -0
- package/dist/src/select/useHover.spec.d.ts.map +1 -0
- package/dist/src/select/variant.d.ts +6 -0
- package/dist/src/select/variant.d.ts.map +1 -0
- package/dist/src/showcase/BreadcrumbShowcase.d.ts +2 -0
- package/dist/src/showcase/BreadcrumbShowcase.d.ts.map +1 -0
- package/dist/src/showcase/ButtonShowcase.d.ts +2 -0
- package/dist/src/showcase/ButtonShowcase.d.ts.map +1 -0
- package/dist/src/showcase/DisplaySelector.d.ts +8 -0
- package/dist/src/showcase/DisplaySelector.d.ts.map +1 -0
- package/dist/src/showcase/DividerShowcase.d.ts +2 -0
- package/dist/src/showcase/DividerShowcase.d.ts.map +1 -0
- package/dist/src/showcase/FlexShowcase.d.ts +2 -0
- package/dist/src/showcase/FlexShowcase.d.ts.map +1 -0
- package/dist/src/showcase/HeaderShowcase.d.ts +2 -0
- package/dist/src/showcase/HeaderShowcase.d.ts.map +1 -0
- package/dist/src/showcase/InputShowcase.d.ts +19 -0
- package/dist/src/showcase/InputShowcase.d.ts.map +1 -0
- package/dist/src/showcase/MenuShowcase.d.ts +2 -0
- package/dist/src/showcase/MenuShowcase.d.ts.map +1 -0
- package/dist/src/showcase/NavShowcase.d.ts +2 -0
- package/dist/src/showcase/NavShowcase.d.ts.map +1 -0
- package/dist/src/showcase/NoteShowcase.d.ts +2 -0
- package/dist/src/showcase/NoteShowcase.d.ts.map +1 -0
- package/dist/src/showcase/SelectShowcase.d.ts +3 -0
- package/dist/src/showcase/SelectShowcase.d.ts.map +1 -0
- package/dist/src/showcase/Showcase.d.ts +2 -0
- package/dist/src/showcase/Showcase.d.ts.map +1 -0
- package/dist/src/showcase/SubcategorySection.d.ts +6 -0
- package/dist/src/showcase/SubcategorySection.d.ts.map +1 -0
- package/dist/src/showcase/TagShowcase.d.ts +2 -0
- package/dist/src/showcase/TagShowcase.d.ts.map +1 -0
- package/dist/src/showcase/TextShowcase.d.ts +2 -0
- package/dist/src/showcase/TextShowcase.d.ts.map +1 -0
- package/dist/src/showcase/constants.d.ts +8 -0
- package/dist/src/showcase/constants.d.ts.map +1 -0
- package/dist/src/showcase/index.d.ts +16 -0
- package/dist/src/showcase/index.d.ts.map +1 -0
- package/dist/src/state/state.d.ts +24 -24
- package/dist/src/state/state.d.ts.map +1 -1
- package/dist/src/status/Aggregator.d.ts +5 -5
- package/dist/src/status/Aggregator.d.ts.map +1 -1
- package/dist/src/status/Indicator.d.ts +2 -2
- package/dist/src/status/Indicator.d.ts.map +1 -1
- package/dist/src/status/Notification.d.ts +2 -2
- package/dist/src/status/Notification.d.ts.map +1 -1
- package/dist/src/status/Summary.d.ts +8 -0
- package/dist/src/status/Summary.d.ts.map +1 -0
- package/dist/src/status/aether/aggregator.d.ts +13 -30
- package/dist/src/status/aether/aggregator.d.ts.map +1 -1
- package/dist/src/status/aether/index.d.ts +1 -1
- package/dist/src/status/aether/index.d.ts.map +1 -1
- package/dist/src/status/external.d.ts +1 -2
- package/dist/src/status/external.d.ts.map +1 -1
- package/dist/src/steps/Steps.d.ts +2 -2
- package/dist/src/steps/Steps.d.ts.map +1 -1
- package/dist/src/store/index.d.ts +2 -0
- package/dist/src/store/index.d.ts.map +1 -0
- package/dist/src/store/store.d.ts +7 -0
- package/dist/src/store/store.d.ts.map +1 -0
- package/dist/src/store/store.spec.d.ts +2 -0
- package/dist/src/store/store.spec.d.ts.map +1 -0
- package/dist/src/synnax/Provider.d.ts +11 -0
- package/dist/src/synnax/Provider.d.ts.map +1 -1
- package/dist/src/synnax/aether/provider.d.ts +7 -7
- package/dist/src/synnax/aether/provider.d.ts.map +1 -1
- package/dist/src/table/Table.d.ts +1 -1
- package/dist/src/table/Table.d.ts.map +1 -1
- package/dist/src/table/aether/Table.d.ts +1 -1
- package/dist/src/table/aether/Table.d.ts.map +1 -1
- package/dist/src/table/cells/Cells.d.ts +6 -6
- package/dist/src/table/cells/Cells.d.ts.map +1 -1
- package/dist/src/table/cells/Forms.d.ts +4 -0
- package/dist/src/table/cells/Forms.d.ts.map +1 -1
- package/dist/src/table/cells/external.d.ts +4 -0
- package/dist/src/table/cells/external.d.ts.map +1 -0
- package/dist/src/table/cells/index.d.ts +1 -1
- package/dist/src/table/cells/registry.d.ts +1 -1
- package/dist/src/table/cells/registry.d.ts.map +1 -1
- package/dist/src/tabs/Selector.d.ts +9 -9
- package/dist/src/tabs/Selector.d.ts.map +1 -1
- package/dist/src/tabs/Tabs.d.ts +6 -6
- package/dist/src/tabs/Tabs.d.ts.map +1 -1
- package/dist/src/tabs/types.d.ts +3 -3
- package/dist/src/tabs/types.d.ts.map +1 -1
- package/dist/src/tabs/useContext.d.ts +3 -3
- package/dist/src/tabs/useContext.d.ts.map +1 -1
- package/dist/src/tag/Tag.d.ts +6 -6
- package/dist/src/tag/Tag.d.ts.map +1 -1
- package/dist/src/tag/Tags.d.ts +5 -0
- package/dist/src/tag/Tags.d.ts.map +1 -0
- package/dist/src/tag/external.d.ts +3 -0
- package/dist/src/tag/external.d.ts.map +1 -0
- package/dist/src/tag/index.d.ts +1 -1
- package/dist/src/tag/index.d.ts.map +1 -1
- package/dist/src/telem/SelectDataType.d.ts +7 -0
- package/dist/src/telem/SelectDataType.d.ts.map +1 -0
- package/dist/src/telem/aether/context.d.ts +1 -0
- package/dist/src/telem/aether/context.d.ts.map +1 -1
- package/dist/src/telem/aether/noop.d.ts.map +1 -1
- package/dist/src/telem/aether/pipeline.d.ts +1 -1
- package/dist/src/telem/aether/pipeline.d.ts.map +1 -1
- package/dist/src/telem/aether/provider.d.ts +1 -1
- package/dist/src/telem/aether/provider.d.ts.map +1 -1
- package/dist/src/telem/aether/remote.d.ts +13 -13
- package/dist/src/telem/aether/remote.d.ts.map +1 -1
- package/dist/src/telem/aether/static.d.ts +3 -3
- package/dist/src/telem/aether/static.d.ts.map +1 -1
- package/dist/src/telem/aether/telem.d.ts +3 -4
- package/dist/src/telem/aether/telem.d.ts.map +1 -1
- package/dist/src/telem/aether/transformers.d.ts +4 -5
- package/dist/src/telem/aether/transformers.d.ts.map +1 -1
- package/dist/src/telem/client/cache/cache.d.ts.map +1 -1
- package/dist/src/telem/client/cache/static.d.ts +1 -1
- package/dist/src/telem/client/cache/static.d.ts.map +1 -1
- package/dist/src/telem/client/reader.spec.d.ts +1 -3
- package/dist/src/telem/client/reader.spec.d.ts.map +1 -1
- package/dist/src/telem/client/streamer.d.ts.map +1 -1
- package/dist/src/telem/control/Chip.d.ts +2 -2
- package/dist/src/telem/control/Chip.d.ts.map +1 -1
- package/dist/src/telem/control/Controller.d.ts +1 -1
- package/dist/src/telem/control/Controller.d.ts.map +1 -1
- package/dist/src/telem/control/Indicator.d.ts +4 -1
- package/dist/src/telem/control/Indicator.d.ts.map +1 -1
- package/dist/src/telem/control/Legend.d.ts.map +1 -1
- package/dist/src/telem/control/aether/chip.d.ts +22 -25
- package/dist/src/telem/control/aether/chip.d.ts.map +1 -1
- package/dist/src/telem/control/aether/controller.d.ts +14 -4
- package/dist/src/telem/control/aether/controller.d.ts.map +1 -1
- package/dist/src/telem/control/aether/indicator.d.ts +31 -24
- package/dist/src/telem/control/aether/indicator.d.ts.map +1 -1
- package/dist/src/telem/control/aether/legend.d.ts +3 -3
- package/dist/src/telem/control/aether/legend.d.ts.map +1 -1
- package/dist/src/telem/control/aether/state.d.ts +2 -2
- package/dist/src/telem/control/aether/state.d.ts.map +1 -1
- package/dist/src/telem/external.d.ts +3 -0
- package/dist/src/telem/external.d.ts.map +1 -0
- package/dist/src/telem/index.d.ts +1 -1
- package/dist/src/testutil/Aether.d.ts +4 -0
- package/dist/src/testutil/Aether.d.ts.map +1 -0
- package/dist/src/testutil/Synnax.d.ts +9 -0
- package/dist/src/testutil/Synnax.d.ts.map +1 -0
- package/dist/src/text/DateTime.d.ts +3 -3
- package/dist/src/text/DateTime.d.ts.map +1 -1
- package/dist/src/text/Editable.d.ts +5 -6
- package/dist/src/text/Editable.d.ts.map +1 -1
- package/dist/src/text/Text.d.ts +17 -11
- package/dist/src/text/Text.d.ts.map +1 -1
- package/dist/src/text/core/types.d.ts +7 -8
- package/dist/src/text/core/types.d.ts.map +1 -1
- package/dist/src/text/external.d.ts +0 -3
- package/dist/src/text/external.d.ts.map +1 -1
- package/dist/src/text/symbols.d.ts.map +1 -1
- package/dist/src/theming/aether/provider.d.ts +4 -4
- package/dist/src/theming/aether/provider.d.ts.map +1 -1
- package/dist/src/theming/core/fontString.d.ts +2 -2
- package/dist/src/theming/core/fontString.d.ts.map +1 -1
- package/dist/src/theming/core/theme.d.ts +2 -2
- package/dist/src/theming/core/theme.d.ts.map +1 -1
- package/dist/src/tooltip/Dialog.d.ts +1 -1
- package/dist/src/tooltip/Dialog.d.ts.map +1 -1
- package/dist/src/tree/Item.d.ts +11 -0
- package/dist/src/tree/Item.d.ts.map +1 -0
- package/dist/src/tree/Tree.d.ts +28 -48
- package/dist/src/tree/Tree.d.ts.map +1 -1
- package/dist/src/tree/core.d.ts +59 -71
- package/dist/src/tree/core.d.ts.map +1 -1
- package/dist/src/tree/external.d.ts +1 -0
- package/dist/src/tree/external.d.ts.map +1 -1
- package/dist/src/triggers/Text.d.ts +3 -2
- package/dist/src/triggers/Text.d.ts.map +1 -1
- package/dist/src/triggers/triggers.d.ts +6 -6
- package/dist/src/triggers/triggers.d.ts.map +1 -1
- package/dist/src/util/children.d.ts.map +1 -1
- package/dist/src/util/zod.d.ts +1 -1
- package/dist/src/util/zod.d.ts.map +1 -1
- package/dist/src/viewport/SelectMode.d.ts +3 -3
- package/dist/src/viewport/SelectMode.d.ts.map +1 -1
- package/dist/src/viewport/use.d.ts +3 -3
- package/dist/src/viewport/use.d.ts.map +1 -1
- package/dist/src/vis/axis/axis.d.ts +1 -1
- package/dist/src/vis/axis/axis.d.ts.map +1 -1
- package/dist/src/vis/axis/ticks.d.ts +1 -1
- package/dist/src/vis/axis/ticks.d.ts.map +1 -1
- package/dist/src/vis/button/SelectMode.d.ts +8 -0
- package/dist/src/vis/button/SelectMode.d.ts.map +1 -0
- package/dist/src/vis/button/aether/button.d.ts +2 -1
- package/dist/src/vis/button/aether/button.d.ts.map +1 -1
- package/dist/src/vis/button/external.d.ts +3 -0
- package/dist/src/vis/button/external.d.ts.map +1 -0
- package/dist/src/vis/button/index.d.ts +1 -1
- package/dist/src/vis/button/index.d.ts.map +1 -1
- package/dist/src/vis/button/use.d.ts +3 -1
- package/dist/src/vis/button/use.d.ts.map +1 -1
- package/dist/src/vis/canvas/aether/canvas.d.ts +1 -1
- package/dist/src/vis/canvas/aether/canvas.d.ts.map +1 -1
- package/dist/src/vis/diagram/Diagram.d.ts +6 -6
- package/dist/src/vis/diagram/Diagram.d.ts.map +1 -1
- package/dist/src/vis/diagram/aether/Diagram.d.ts +1 -1
- package/dist/src/vis/diagram/aether/Diagram.d.ts.map +1 -1
- package/dist/src/vis/diagram/aether/types.d.ts +1 -1
- package/dist/src/vis/diagram/aether/types.d.ts.map +1 -1
- package/dist/src/vis/diagram/edge/connector/connector.d.ts +1 -1
- package/dist/src/vis/diagram/edge/connector/connector.d.ts.map +1 -1
- package/dist/src/vis/diagram/edge/paths.d.ts +2 -3
- package/dist/src/vis/diagram/edge/paths.d.ts.map +1 -1
- package/dist/src/vis/eraser/aether/eraser.d.ts +1 -1
- package/dist/src/vis/eraser/aether/eraser.d.ts.map +1 -1
- package/dist/src/vis/grid/grid.d.ts +1 -1
- package/dist/src/vis/grid/grid.d.ts.map +1 -1
- package/dist/src/vis/legend/Container.d.ts +3 -3
- package/dist/src/vis/legend/Container.d.ts.map +1 -1
- package/dist/src/vis/legend/Simple.d.ts +8 -7
- package/dist/src/vis/legend/Simple.d.ts.map +1 -1
- package/dist/src/vis/light/aether/light.d.ts +1 -1
- package/dist/src/vis/light/aether/light.d.ts.map +1 -1
- package/dist/src/vis/light/use.d.ts +1 -1
- package/dist/src/vis/light/use.d.ts.map +1 -1
- package/dist/src/vis/line/aether/line.d.ts +1 -1
- package/dist/src/vis/line/aether/line.d.ts.map +1 -1
- package/dist/src/vis/lineplot/Axis.d.ts +3 -3
- package/dist/src/vis/lineplot/Axis.d.ts.map +1 -1
- package/dist/src/vis/lineplot/LinePlot.d.ts +1 -1
- package/dist/src/vis/lineplot/LinePlot.d.ts.map +1 -1
- package/dist/src/vis/lineplot/Title.d.ts +2 -2
- package/dist/src/vis/lineplot/Title.d.ts.map +1 -1
- package/dist/src/vis/lineplot/aether/BoundQuerier.d.ts +1 -1
- package/dist/src/vis/lineplot/aether/BoundQuerier.d.ts.map +1 -1
- package/dist/src/vis/lineplot/aether/LinePlot.d.ts +1 -1
- package/dist/src/vis/lineplot/aether/LinePlot.d.ts.map +1 -1
- package/dist/src/vis/lineplot/aether/XAxis.d.ts +56 -56
- package/dist/src/vis/lineplot/aether/YAxis.d.ts +56 -56
- package/dist/src/vis/lineplot/aether/axis.d.ts +2 -2
- package/dist/src/vis/lineplot/aether/axis.d.ts.map +1 -1
- package/dist/src/vis/lineplot/range/Annotation.d.ts +1 -1
- package/dist/src/vis/lineplot/range/Annotation.d.ts.map +1 -1
- package/dist/src/vis/lineplot/range/Provider.d.ts +1 -1
- package/dist/src/vis/lineplot/range/Provider.d.ts.map +1 -1
- package/dist/src/vis/lineplot/range/aether/annotation.d.ts +9 -9
- package/dist/src/vis/lineplot/range/aether/annotation.d.ts.map +1 -1
- package/dist/src/vis/lineplot/range/aether/provider.d.ts +49 -19
- package/dist/src/vis/lineplot/range/aether/provider.d.ts.map +1 -1
- package/dist/src/vis/lineplot/tooltip/Tooltip.d.ts +1 -1
- package/dist/src/vis/lineplot/tooltip/Tooltip.d.ts.map +1 -1
- package/dist/src/vis/lineplot/tooltip/aether/tooltip.d.ts +1 -1
- package/dist/src/vis/lineplot/tooltip/aether/tooltip.d.ts.map +1 -1
- package/dist/src/vis/log/Log.d.ts +3 -3
- package/dist/src/vis/log/Log.d.ts.map +1 -1
- package/dist/src/vis/log/aether/Log.d.ts +4 -4
- package/dist/src/vis/log/aether/Log.d.ts.map +1 -1
- package/dist/src/vis/measure/aether/measure.d.ts +1 -1
- package/dist/src/vis/measure/aether/measure.d.ts.map +1 -1
- package/dist/src/vis/rule/Rule.d.ts +3 -3
- package/dist/src/vis/rule/Rule.d.ts.map +1 -1
- package/dist/src/vis/rule/aether/aether.d.ts +1 -1
- package/dist/src/vis/rule/aether/aether.d.ts.map +1 -1
- package/dist/src/vis/schematic/Forms.d.ts.map +1 -1
- package/dist/src/vis/schematic/Grid.d.ts.map +1 -1
- package/dist/src/vis/schematic/SelectOrientation.d.ts +3 -3
- package/dist/src/vis/schematic/SelectOrientation.d.ts.map +1 -1
- package/dist/src/vis/schematic/Symbols.d.ts +15 -12
- package/dist/src/vis/schematic/Symbols.d.ts.map +1 -1
- package/dist/src/vis/schematic/primitives/Primitives.d.ts +3 -3
- package/dist/src/vis/schematic/primitives/Primitives.d.ts.map +1 -1
- package/dist/src/vis/schematic/registry.d.ts +3 -3
- package/dist/src/vis/schematic/registry.d.ts.map +1 -1
- package/dist/src/vis/setpoint/aether/setpoint.d.ts +1 -1
- package/dist/src/vis/setpoint/aether/setpoint.d.ts.map +1 -1
- package/dist/src/vis/setpoint/use.d.ts +1 -1
- package/dist/src/vis/setpoint/use.d.ts.map +1 -1
- package/dist/src/vis/toggle/aether/toggle.d.ts +1 -1
- package/dist/src/vis/toggle/aether/toggle.d.ts.map +1 -1
- package/dist/src/vis/toggle/use.d.ts +1 -1
- package/dist/src/vis/toggle/use.d.ts.map +1 -1
- package/dist/src/vis/value/RedlineForm.d.ts +6 -0
- package/dist/src/vis/value/RedlineForm.d.ts.map +1 -0
- package/dist/src/vis/value/TelemForm.d.ts +6 -0
- package/dist/src/vis/value/TelemForm.d.ts.map +1 -0
- package/dist/src/vis/value/aether/value.d.ts +31 -4
- package/dist/src/vis/value/aether/value.d.ts.map +1 -1
- package/dist/src/vis/value/external.d.ts +3 -1
- package/dist/src/vis/value/external.d.ts.map +1 -1
- package/dist/src/vis/value/redline.d.ts +18 -0
- package/dist/src/vis/value/redline.d.ts.map +1 -0
- package/dist/src/vis/value/use.d.ts +12 -3
- package/dist/src/vis/value/use.d.ts.map +1 -1
- package/dist/src/workspace/index.d.ts +2 -0
- package/dist/src/workspace/index.d.ts.map +1 -0
- package/dist/src/workspace/queries.d.ts +12 -0
- package/dist/src/workspace/queries.d.ts.map +1 -0
- package/dist/src/workspace/queries.spec.d.ts +2 -0
- package/dist/src/workspace/queries.spec.d.ts.map +1 -0
- package/dist/{external-UeyJ6mPv.js → symbols-5jPiWw_d.js} +21721 -16450
- package/dist/symbols-DzAWrATO.cjs +92 -0
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/text.cjs +1 -1
- package/dist/text.js +2 -2
- package/dist/theming.cjs +1 -1
- package/dist/theming.js +2 -2
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/triggers.cjs +1 -1
- package/dist/triggers.js +1 -1
- package/dist/units-BGkvnLO-.cjs +1 -0
- package/dist/units-HcS_zslH.js +14 -0
- package/dist/useKeysData-B1kiZOOw.js +14 -0
- package/dist/useKeysData-G9Mk3mA6.cjs +1 -0
- package/dist/video.cjs +1 -1
- package/dist/video.js +1 -1
- package/package.json +24 -23
- package/dist/Center-Bq5L7oy0.js +0 -24
- package/dist/Center-DE_BtCCX.cjs +0 -1
- package/dist/ContextMenu-BC5x7XR5.cjs +0 -1
- package/dist/ContextMenu-DLM5eLLG.js +0 -95
- package/dist/DateTime-CdNKxVxT.js +0 -17
- package/dist/DateTime-DC19AIGq.cjs +0 -1
- package/dist/Divider-CDFHLK9U.js +0 -1358
- package/dist/Divider-D74_FAXn.cjs +0 -22
- package/dist/Dropdown-BpoU-xVd.cjs +0 -1
- package/dist/Dropdown-CQu3yo3v.js +0 -327
- package/dist/Haul-D6kpOYBa.js +0 -124
- package/dist/Haul-De8axVdi.cjs +0 -1
- package/dist/Item-CB5c--eX.cjs +0 -1
- package/dist/Item-LAMTj0X2.js +0 -109
- package/dist/Keyboard-CiNuYBa3.cjs +0 -1
- package/dist/Keyboard-DjeQa-Nx.js +0 -31
- package/dist/Link-CPnT8Xp9.cjs +0 -1
- package/dist/Link-DcudTtgT.js +0 -14
- package/dist/Pack-80N7XB5O.cjs +0 -1
- package/dist/Pack-BiS6QIuA.js +0 -52
- package/dist/Provider-CLPfWTcl.js +0 -464
- package/dist/Provider-s70PZ9lg.cjs +0 -1
- package/dist/Space-ByFmfiTa.cjs +0 -1
- package/dist/Space-DxHm2ok7.js +0 -100
- package/dist/Stack-BbwDtaE6.cjs +0 -1
- package/dist/Stack-D50qN0Vu.js +0 -13
- package/dist/Text-BiWcjO1i.js +0 -137
- package/dist/Text-CacHYC7L.js +0 -35
- package/dist/Text-DTPuORh0.cjs +0 -1
- package/dist/Text-Dw0NDc2A.cjs +0 -4
- package/dist/Text-bSIbkBIL.cjs +0 -1
- package/dist/Text-wL3te5S6.js +0 -1247
- package/dist/Toggle-CbzT5wR_.js +0 -383
- package/dist/Toggle-CpDGR6M6.cjs +0 -1
- package/dist/WithIcon-B7VPBqA2.js +0 -95
- package/dist/WithIcon-CCnlO2LC.cjs +0 -1
- package/dist/align.cjs +0 -1
- package/dist/align.js +0 -4
- package/dist/array-CPtP5Oov.js +0 -7
- package/dist/array-CZHEGH95.cjs +0 -1
- package/dist/css-C7rJrqRi.cjs +0 -38
- package/dist/css-DjQu2Qyf.js +0 -12511
- package/dist/debounce-CW9Q-DsR.js +0 -17
- package/dist/debounce-heEWeOqL.cjs +0 -1
- package/dist/deep-BRgXTyZn.cjs +0 -1
- package/dist/deep-D72Fid_q.js +0 -193
- package/dist/dimensions-BmlCx5q4.cjs +0 -1
- package/dist/dimensions-FnMV2fyj.js +0 -19
- package/dist/dropdown.cjs +0 -1
- package/dist/dropdown.js +0 -4
- package/dist/eraser-BJxXs5KS.js +0 -967
- package/dist/eraser-CGxyWj3B.cjs +0 -11
- package/dist/external-5nVYtLDI.js +0 -431
- package/dist/external-B-B5ro_s.cjs +0 -1
- package/dist/external-B3Mtbu36.cjs +0 -1
- package/dist/external-BgwS5D0j.cjs +0 -1
- package/dist/external-Bn3A7Rew.js +0 -20
- package/dist/external-Bojct8Fy.cjs +0 -1
- package/dist/external-C6mmYO7R.js +0 -1265
- package/dist/external-CVHgvs0C.js +0 -28
- package/dist/external-CnkWbciu.js +0 -399
- package/dist/external-Cxwmal3D.cjs +0 -46
- package/dist/external-DC1RT1Js.cjs +0 -1
- package/dist/external-DOujCKRS.cjs +0 -1
- package/dist/external-Dm9rg2x7.js +0 -13
- package/dist/external-EvgywGSS.cjs +0 -1
- package/dist/external-GjPk23XZ.cjs +0 -1
- package/dist/external-MJ2UMa_L.cjs +0 -1
- package/dist/external-V0yO0q2n.cjs +0 -1
- package/dist/external-cDUxSE0v.cjs +0 -85
- package/dist/external-cJGWYB3x.js +0 -19
- package/dist/external-fwvNilmo.js +0 -111
- package/dist/external-l7imNJRR.js +0 -78
- package/dist/external-upR9Jz-8.js +0 -60
- package/dist/font-Csp00pQP.js +0 -15
- package/dist/font-ifUcrCey.cjs +0 -1
- package/dist/fontString-BWECl_1B.cjs +0 -1
- package/dist/hooks-B92WH57y.cjs +0 -1
- package/dist/hooks-u_TgL0Xi.js +0 -296
- package/dist/provider-YWPkhTn6.cjs +0 -154
- package/dist/provider-gW90qzEG.js +0 -32024
- package/dist/src/accordion/Accordion.d.ts +0 -39
- package/dist/src/accordion/Accordion.d.ts.map +0 -1
- package/dist/src/accordion/Accordion.spec.d.ts +0 -2
- package/dist/src/accordion/Accordion.spec.d.ts.map +0 -1
- package/dist/src/accordion/index.d.ts +0 -2
- package/dist/src/accordion/index.d.ts.map +0 -1
- package/dist/src/align/Center.d.ts +0 -8
- package/dist/src/align/Center.d.ts.map +0 -1
- package/dist/src/align/Pack.d.ts +0 -24
- package/dist/src/align/Pack.d.ts.map +0 -1
- package/dist/src/align/Space.d.ts +0 -74
- package/dist/src/align/Space.d.ts.map +0 -1
- package/dist/src/align/Space.spec.d.ts +0 -2
- package/dist/src/align/Space.spec.d.ts.map +0 -1
- package/dist/src/align/Stack.d.ts +0 -7
- package/dist/src/align/Stack.d.ts.map +0 -1
- package/dist/src/align/external.d.ts +0 -5
- package/dist/src/align/external.d.ts.map +0 -1
- package/dist/src/align/index.d.ts +0 -2
- package/dist/src/align/index.d.ts.map +0 -1
- package/dist/src/button/Icon.d.ts +0 -30
- package/dist/src/button/Icon.d.ts.map +0 -1
- package/dist/src/button/Link.d.ts +0 -18
- package/dist/src/button/Link.d.ts.map +0 -1
- package/dist/src/dialog/use.d.ts +0 -51
- package/dist/src/dialog/use.d.ts.map +0 -1
- package/dist/src/dropdown/Dropdown.d.ts +0 -34
- package/dist/src/dropdown/Dropdown.d.ts.map +0 -1
- package/dist/src/dropdown/Dropdown.spec.d.ts +0 -2
- package/dist/src/dropdown/Dropdown.spec.d.ts.map +0 -1
- package/dist/src/dropdown/index.d.ts +0 -2
- package/dist/src/dropdown/index.d.ts.map +0 -1
- package/dist/src/hooks/effect.d.ts +0 -15
- package/dist/src/hooks/effect.d.ts.map +0 -1
- package/dist/src/hooks/useFilter.d.ts +0 -23
- package/dist/src/hooks/useFilter.d.ts.map +0 -1
- package/dist/src/list/Column.d.ts +0 -57
- package/dist/src/list/Column.d.ts.map +0 -1
- package/dist/src/list/Core.d.ts +0 -41
- package/dist/src/list/Core.d.ts.map +0 -1
- package/dist/src/list/Data.d.ts +0 -31
- package/dist/src/list/Data.d.ts.map +0 -1
- package/dist/src/list/Filter.d.ts +0 -27
- package/dist/src/list/Filter.d.ts.map +0 -1
- package/dist/src/list/Hover.d.ts +0 -14
- package/dist/src/list/Hover.d.ts.map +0 -1
- package/dist/src/list/Infinite.d.ts +0 -15
- package/dist/src/list/Infinite.d.ts.map +0 -1
- package/dist/src/list/List.d.ts +0 -21
- package/dist/src/list/List.d.ts.map +0 -1
- package/dist/src/list/Search.d.ts +0 -18
- package/dist/src/list/Search.d.ts.map +0 -1
- package/dist/src/list/Selector.d.ts +0 -18
- package/dist/src/list/Selector.d.ts.map +0 -1
- package/dist/src/list/types.d.ts +0 -15
- package/dist/src/list/types.d.ts.map +0 -1
- package/dist/src/list/useSelect.d.ts +0 -84
- package/dist/src/list/useSelect.d.ts.map +0 -1
- package/dist/src/list/useSelect.spec.d.ts +0 -2
- package/dist/src/list/useSelect.spec.d.ts.map +0 -1
- package/dist/src/modal/Modal.d.ts +0 -15
- package/dist/src/modal/Modal.d.ts.map +0 -1
- package/dist/src/modal/index.d.ts +0 -2
- package/dist/src/modal/index.d.ts.map +0 -1
- package/dist/src/ranger/SelectLabel.d.ts +0 -7
- package/dist/src/ranger/SelectLabel.d.ts.map +0 -1
- package/dist/src/select/Alignment.d.ts +0 -13
- package/dist/src/select/Alignment.d.ts.map +0 -1
- package/dist/src/select/ClearButton.d.ts +0 -4
- package/dist/src/select/ClearButton.d.ts.map +0 -1
- package/dist/src/select/ComponentSize.d.ts +0 -12
- package/dist/src/select/ComponentSize.d.ts.map +0 -1
- package/dist/src/select/DataType.d.ts +0 -12
- package/dist/src/select/DataType.d.ts.map +0 -1
- package/dist/src/select/Direction.d.ts +0 -14
- package/dist/src/select/Direction.d.ts.map +0 -1
- package/dist/src/select/List.d.ts +0 -15
- package/dist/src/select/List.d.ts.map +0 -1
- package/dist/src/select/Select.spec.d.ts +0 -10
- package/dist/src/select/Select.spec.d.ts.map +0 -1
- package/dist/src/status/Text.d.ts +0 -20
- package/dist/src/status/Text.d.ts.map +0 -1
- package/dist/src/status/aether/external.d.ts +0 -3
- package/dist/src/status/aether/external.d.ts.map +0 -1
- package/dist/src/status/aether/types.d.ts +0 -26
- package/dist/src/status/aether/types.d.ts.map +0 -1
- package/dist/src/text/Keyboard.d.ts +0 -6
- package/dist/src/text/Keyboard.d.ts.map +0 -1
- package/dist/src/text/Link.d.ts +0 -11
- package/dist/src/text/Link.d.ts.map +0 -1
- package/dist/src/text/WithIcon.d.ts +0 -21
- package/dist/src/text/WithIcon.d.ts.map +0 -1
- package/dist/src/tree/Tree.spec.d.ts +0 -2
- package/dist/src/tree/Tree.spec.d.ts.map +0 -1
- package/dist/src/util/component.d.ts +0 -12
- package/dist/src/util/component.d.ts.map +0 -1
- package/dist/src/util/removeProps.d.ts.map +0 -1
- package/dist/src/util/removeProps.spec.d.ts.map +0 -1
- package/dist/src/util/renderProp.d.ts.map +0 -1
- package/dist/src/vis/value/Form.d.ts +0 -9
- package/dist/src/vis/value/Form.d.ts.map +0 -1
- package/dist/state-DAFH2z9y.js +0 -4082
- package/dist/state-DwM4WaEw.cjs +0 -27
- package/dist/useClickOutside-CUa496t0.cjs +0 -1
- package/dist/useClickOutside-Dw3KdU3w.js +0 -106
- package/dist/useDebouncedCallback-Bx-HX76R.cjs +0 -1
- package/dist/useDebouncedCallback-Cvo_HNow.js +0 -7
- package/dist/useMemoCompare-B5QPDK2p.js +0 -19
- package/dist/useMemoCompare-BDs2sKw5.cjs +0 -1
- package/dist/useVirtualCursorDragWebKit-CUbBopD6.cjs +0 -1
- package/dist/useVirtualCursorDragWebKit-CfxbToxm.js +0 -65
- package/dist/value--TYeJRXm.cjs +0 -55
- package/dist/value-dkHk-BsO.js +0 -10797
- /package/dist/src/{util → component}/removeProps.d.ts +0 -0
- /package/dist/src/{util → component}/removeProps.spec.d.ts +0 -0
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
"use strict";const Me=require("./jsx-runtime-CITbqOLs.cjs"),we=require("./css-C7rJrqRi.cjs"),wr=require("react"),ir=require("./Divider-D74_FAXn.cjs"),Ln=require("./Toggle-CpDGR6M6.cjs"),Hs=require("./useVirtualCursorDragWebKit-CUbBopD6.cjs"),Wo=require("./Text-bSIbkBIL.cjs"),NN=require("./Center-DE_BtCCX.cjs"),Oi=require("./Pack-80N7XB5O.cjs"),En=require("./Space-ByFmfiTa.cjs");require("./Stack-BbwDtaE6.cjs");const nh=require("./Dropdown-BpoU-xVd.cjs"),AN=require("./hooks-B92WH57y.cjs");require("./state-DwM4WaEw.cjs");const Sa=require("./Text-Dw0NDc2A.cjs");require("./provider-YWPkhTn6.cjs");const CN=require("./DateTime-DC19AIGq.cjs"),ah=require("./WithIcon-CCnlO2LC.cjs"),EN=require("./Text-DTPuORh0.cjs"),SN=require("./Provider-s70PZ9lg.cjs");require("./eraser-CGxyWj3B.cjs");const Pb=e=>e.preventDefault(),MN=e=>e.stopPropagation(),kb="cursor-style",ih=(e,t=document.head)=>{Ob();const r=document.createElement("style");r.innerHTML=`*{cursor: ${e} !important;}`,r.id=kb,t.appendChild(r)},Ob=()=>{const e=document.getElementById(kb);e!=null&&e.remove()},oh=(e,t,r,n,a)=>{const{x:i,y:o}=n??we.K.construct(we.Pt.dims(a));if(we.Pt.width(t)>i&&we.Pt.width(t)>we.Pt.height(t)){const s=we.Pt.signedWidth(t)<0?i:-i;e+=(we.Pt.signedWidth(t)+s)*r.x,ih("ew-resize")}if(we.Pt.height(t)>o&&we.Pt.height(t)>we.Pt.width(t)){const s=we.Pt.signedHeight(t)<0?o:-o;e+=(we.Pt.signedHeight(t)+s)*r.y,ih("ns-resize")}return e},ic=({direction:e,className:t,dragScale:r={x:10,y:1},dragThreshold:n=15,dragDirection:a,onChange:i,value:o,size:s,resetValue:u,onDragEnd:l,...c})=>{const f=wr.useRef({dragging:!1,curr:o,prev:o}),m=wr.useRef(null);f.current.dragging||(f.current.prev=o);const d=wr.useMemo(()=>{const y=we.K.construct(r);return a==="x"?we.K.construct(y.x,0):a==="y"?we.K.construct(0,y.y):y},[r,a]),p=wr.useMemo(()=>n!=null?we.K.construct(n):null,[n]);Hs.useVirtualCursorDragWebKit({ref:m,onMove:wr.useCallback(y=>{if(m.current==null)return;let b=f.current.prev;f.current.dragging=!0,b=oh(b,y,d,p,we.Pt.construct(m.current)),f.current.curr=b,i(b)},[i,d,p]),onEnd:wr.useCallback((y,b)=>{var g;if(m.current==null)return;let D=f.current.prev;D=oh(D,y,d,p,we.Pt.construct(m.current)),f.current.prev=D,f.current.dragging=!1,Ob(),l==null||l(D),(g=c.onBlur)==null||g.call(c)},[c.onBlur,l,d,p])});const h=wr.useCallback(()=>{i(u??f.current.prev)},[i,u]);return Me.jsxRuntimeExports.jsx(Ln.Icon,{ref:m,variant:"outlined",className:we.CSS(we.CSS.BE("input","drag-btn"),we.CSS.dir(e),t),tabIndex:-1,onDoubleClick:h,onClick:Pb,...c,children:Me.jsxRuntimeExports.jsx(ir.y4.Drag,{})})},TN={x:Number(we.d.HOUR.valueOf()),y:Number(we.d.days(.75).valueOf())},$b=({value:e,onChange:t})=>{const r=new we.d(e,"UTC");wr.useLayoutEffect(()=>{const i=r.sub(we.d.utcOffset);if(i.remainder(we.d.DAY).isZero)return;const o=i.sub(i.remainder(we.d.DAY));t(Number(new we.d(o,"local").valueOf()))},[e]);const n=i=>{let o;if(typeof i=="number")o=new we.d(i,"UTC");else{if(i.length===0)return;o=new we.d(i,"local")}t(Number(o.valueOf()))};return{value:r.fString("ISODate","local"),onChange:n}},FN=({ref:e,onChange:t,value:r,className:n,showDragHandle:a=!0,children:i,...o})=>{const{value:s,onChange:u}=$b({value:r,onChange:t});return Me.jsxRuntimeExports.jsxs(Wo.Text,{ref:e,value:s,className:we.CSS(we.CSS.B("input-date"),n),onChange:u,type:"date",...o,children:[a&&Me.jsxRuntimeExports.jsx(ic,{value:r,onChange:u,dragScale:TN}),i]})};let PN={one:{},two:{},three:{},four:{}},kN={one:{},two:{},three:{}},ON={},$N=[];const If={methods:PN,model:kN,compute:ON,hooks:$N},_N=e=>Object.prototype.toString.call(e)==="[object Array]",BN={compute:function(e){const{world:t}=this,r=t.compute;return typeof e=="string"&&r.hasOwnProperty(e)?r[e](this):_N(e)?e.forEach(n=>{t.compute.hasOwnProperty(n)?r[n](this):console.warn("no compute:",e)}):typeof e=="function"?e(this):console.warn("no compute:",e),this}},IN=function(e){return this.fullPointer.forEach((r,n)=>{let a=this.update([r]);e(a,n)}),this},zN=function(e,t){let n=this.fullPointer.map((i,o)=>{let s=this.update([i]),u=e(s,o);return u===void 0?this.none():u});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 a=[];return n.forEach(i=>{a=a.concat(i.fullPointer)}),this.toView(a)},jN=function(e){let t=this.fullPointer;return t=t.filter((n,a)=>{let i=this.update([n]);return e(i,a)}),this.update(t)},qN=function(e){let r=this.fullPointer.find((n,a)=>{let i=this.update([n]);return e(i,a)});return this.update([r])},RN=function(e){return this.fullPointer.some((r,n)=>{let a=this.update([r]);return e(a,n)})},LN=function(e=1){let t=this.fullPointer,r=Math.floor(Math.random()*t.length);return r+e>this.length&&(r=this.length-e,r=r<0?0:r),t=t.slice(r,r+e),this.update(t)},HN={forEach:IN,map:zN,filter:jN,find:qN,some:RN,random:LN},Vn={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(r=>{t[r]=this.update(this._groups[r])}),t},eq:function(e){let t=this.pointer;return t||(t=this.docs.map((r,n)=>[n])),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 r=this.pointer||this.docs.map((n,a)=>[a]);return r=r.slice(e,t),this.update(r)},all:function(){return this.update().toView()},fullSentences:function(){let e=this.fullPointer.map(t=>[t[0]]);return this.update(e).toView()},none:function(){return this.update([])},isDoc:function(e){if(!e||!e.isView)return!1;let t=this.fullPointer,r=e.fullPointer;return!t.length===r.length?!1:t.every((n,a)=>r[a]?n[0]===r[a][0]&&n[1]===r[a][1]&&n[2]===r[a][2]:!1)},wordCount:function(){return this.docs.reduce((e,t)=>(e+=t.filter(r=>r.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,r=0;return this.document.forEach(n=>t+=n.length),this.docs.forEach(n=>r+=n.length),t===r},getNth:function(e){return typeof e=="number"?this.eq(e):typeof e=="string"?this.if(e):this}};Vn.group=Vn.groups;Vn.fullSentence=Vn.fullSentences;Vn.sentence=Vn.fullSentences;Vn.lastTerm=Vn.lastTerms;Vn.firstTerm=Vn.firstTerms;const zf=Object.assign({},Vn,BN,HN);zf.get=zf.eq;class ti{constructor(t,r,n={}){[["document",t],["world",If],["_groups",n],["_cache",null],["viewType","View"]].forEach(i=>{Object.defineProperty(this,i[0],{value:i[1],writable:!0})}),this.ptrs=r}get docs(){let t=this.document;return this.ptrs&&(t=If.methods.one.getDoc(this.ptrs,this.document)),t}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:t,ptrs:r,document:n}=this;return(r||t.map((i,o)=>[o])).map(i=>{let[o,s,u,l,c]=i;return s=s||0,u=u||(n[o]||[]).length,n[o]&&n[o][s]&&(l=l||n[o][s].id,n[o][u-1]&&(c=c||n[o][u-1].id)),[o,s,u,l,c]})}update(t){let r=new ti(this.document,t);if(this._cache&&t&&t.length>0){let n=[];t.forEach((a,i)=>{let[o,s,u]=a;a.length===1?n[i]=this._cache[o]:s===0&&this.document[o].length===u&&(n[i]=this._cache[o])}),n.length>0&&(r._cache=n)}return r.world=this.world,r}toView(t){return new ti(this.document,t||this.pointer)}fromText(t){const{methods:r}=this;let n=r.one.tokenize.fromString(t,this.world),a=new ti(n);return a.world=this.world,a.compute(["normal","freeze","lexicon"]),this.world.compute.preTagger&&a.compute("preTagger"),a.compute("unfreeze"),a}clone(){let t=this.document.slice(0);t=t.map(n=>n.map(a=>(a=Object.assign({},a),a.tags=new Set(a.tags),a)));let r=this.update(this.pointer);return r.document=t,r._cache=this._cache,r}}Object.assign(ti.prototype,zf);const GN="14.14.4",sh=function(e){return e&&typeof e=="object"&&!Array.isArray(e)};function _b(e,t){if(sh(t))for(const r in t)sh(t[r])?(e[r]||Object.assign(e,{[r]:{}}),_b(e[r],t[r])):Object.assign(e,{[r]:t[r]});return e}function VN(e,t){for(const r in t)e[r]=e[r]||{},Object.assign(e[r],t[r]);return e}const UN=function(e,t){let r=e.two.models||{};Object.keys(t).forEach(n=>{t[n].pastTense&&(r.toPast&&(r.toPast.ex[n]=t[n].pastTense),r.fromPast&&(r.fromPast.ex[t[n].pastTense]=n)),t[n].presentTense&&(r.toPresent&&(r.toPresent.ex[n]=t[n].presentTense),r.fromPresent&&(r.fromPresent.ex[t[n].presentTense]=n)),t[n].gerund&&(r.toGerund&&(r.toGerund.ex[n]=t[n].gerund),r.fromGerund&&(r.fromGerund.ex[t[n].gerund]=n)),t[n].comparative&&(r.toComparative&&(r.toComparative.ex[n]=t[n].comparative),r.fromComparative&&(r.fromComparative.ex[t[n].comparative]=n)),t[n].superlative&&(r.toSuperlative&&(r.toSuperlative.ex[n]=t[n].superlative),r.fromSuperlative&&(r.fromSuperlative.ex[t[n].superlative]=n))})},WN=function(e,t,r,n){const{methods:a,model:i,compute:o,hooks:s}=t;e.methods&&VN(a,e.methods),e.model&&_b(i,e.model),e.irregulars&&UN(i,e.irregulars),e.compute&&Object.assign(o,e.compute),s&&(t.hooks=s.concat(e.hooks||[])),e.api&&e.api(r),e.lib&&Object.keys(e.lib).forEach(u=>n[u]=e.lib[u]),e.tags&&n.addTags(e.tags),e.words&&n.addWords(e.words),e.frozen&&n.addWords(e.frozen,!0),e.mutate&&e.mutate(t,n)},JN=function(e){const 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},KN=e=>Object.prototype.toString.call(e)==="[object Object]",jf=function(e){return Object.prototype.toString.call(e)==="[object Array]"},YN=function(e){return e.map(t=>t.terms.map(r=>(jf(r.tags)&&(r.tags=new Set(r.tags)),r)))},ZN=function(e){return e.map(t=>t.map(r=>({text:r,normal:r,pre:"",post:" ",tags:new Set})))},Bb=function(e,t,r){const{methods:n}=r;let a=new t([]);if(a.world=r,typeof e=="number"&&(e=String(e)),!e)return a;if(typeof e=="string"){let i=n.one.tokenize.fromString(e,r);return new t(i)}if(KN(e)&&e.isView)return new t(e.document,e.ptrs);if(jf(e)){if(jf(e[0])){let o=ZN(e);return new t(o)}let i=YN(e);return new t(i)}return a};let Ml=Object.assign({},If);const tt=function(e,t){t&&tt.addWords(t);let r=Bb(e,ti,Ml);return e&&r.compute(Ml.hooks),r};Object.defineProperty(tt,"_world",{value:Ml,writable:!0});tt.tokenize=function(e,t){const{compute:r}=this._world;t&&tt.addWords(t);let n=Bb(e,ti,Ml);return r.contractions&&n.compute(["alias","normal","machine","contractions"]),n};tt.plugin=function(e){return WN(e,this._world,ti,this),this};tt.extend=tt.plugin;tt.world=function(){return this._world};tt.model=function(){return this._world.model};tt.methods=function(){return this._world.methods};tt.hooks=function(){return this._world.hooks};tt.verbose=JN;tt.version=GN;const QN=function(e){return e.map(r=>{let n=new Set;return r.forEach(a=>{a.normal!==""&&n.add(a.normal),a.switch&&n.add(`%${a.switch}%`),a.implicit&&n.add(a.implicit),a.machine&&n.add(a.machine),a.root&&n.add(a.root),a.alias&&a.alias.forEach(o=>n.add(o));let i=Array.from(a.tags);for(let o=0;o<i.length;o+=1)n.add("#"+i[o])}),n})},XN={one:{cacheDoc:QN}},eA={cache:function(){return this._cache=this.methods.one.cacheDoc(this.document),this},uncache:function(){return this._cache=null,this}},tA=function(e){Object.assign(e.prototype,eA)},rA={cache:function(e){e._cache=e.methods.one.cacheDoc(e.document)}},nA={api:tA,compute:rA,methods:XN},aA={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]/,t=>t.toUpperCase())}),this},toCamelCase:function(){return this.docs.forEach(e=>{e.forEach((t,r)=>{r!==0&&(t.text=t.text.replace(/^ *[a-z\u00C0-\u00FF]/,n=>n.toUpperCase())),r!==e.length-1&&(t.post="")})}),this}},uh=e=>new RegExp("^\\p{Lu}[\\p{Ll}'’]","u").test(e)||new RegExp("^\\p{Lu}$","u").test(e),iA=e=>e.replace(new RegExp("^\\p{Ll}","u"),t=>t.toUpperCase()),oA=e=>e.replace(new RegExp("^\\p{Lu}","u"),t=>t.toLowerCase()),Ib=(e,t,r)=>{if(r.forEach(n=>n.dirty=!0),e){let n=[t,0].concat(r);Array.prototype.splice.apply(e,n)}return e},Mo=function(e){const t=/ $/,r=/[-–—]/;let n=e[e.length-1];n&&!t.test(n.post)&&!r.test(n.post)&&(n.post+=" ")},lh=(e,t,r)=>{const n=/[-.?!,;:)–—'"]/g;let a=e[t-1];if(!a)return;let i=a.post;if(n.test(i)){let o=i.match(n).join(""),s=r[r.length-1];s.post=o+s.post,a.post=a.post.replace(n,"")}},sA=function(e,t,r){let n=e[t];if(t!==0||!uh(n.text))return;r[0].text=iA(r[0].text);let a=e[t];a.tags.has("ProperNoun")||a.tags.has("Acronym")||uh(a.text)&&a.text.length>1&&(a.text=oA(a.text))},uA=function(e,t,r,n){let[a,i,o]=t;i===0||o===n[a].length?Mo(r):(Mo(r),Mo([e[t[1]]])),sA(e,i,r),Ib(e,i,r)},lA=function(e,t,r,n){let[a,,i]=t,o=(n[a]||[]).length;i<o?(lh(e,i,r),Mo(r)):o===i&&(Mo(e),lh(e,i,r),n[a+1]&&(r[r.length-1].post+=" ")),Ib(e,t[2],r),t[4]=r[r.length-1].id};let cs=0;const ch=e=>(e=e.length<3?"0"+e:e,e.length<3?"0"+e:e),zb=function(e){let[t,r]=e.index||[0,0];cs+=1,cs=cs>46655?0:cs,t=t>46655?0:t,r=r>1294?0:r;let n=ch(cs.toString(36));n+=ch(t.toString(36));let a=r.toString(36);a=a.length<2?"0"+a:a,n+=a;let i=parseInt(Math.random()*36,10);return n+=i.toString(36),e.normal+"|"+n.toUpperCase()},fh=function(e){e.has("@hasContraction")&&typeof e.contractions=="function"&&e.grow("@hasContraction").contractions().expand()},mh=e=>Object.prototype.toString.call(e)==="[object Array]",cA=function(e){return e=e.map(t=>(t.id=zb(t),t)),e},fA=function(e,t){const{methods:r}=t;return typeof e=="string"?r.one.tokenize.fromString(e,t)[0]:typeof e=="object"&&e.isView?e.clone().docs[0]||[]:mh(e)?mh(e[0])?e[0]:e:[]},dh=function(e,t,r){const{document:n,world:a}=t;t.uncache();let i=t.fullPointer,o=t.fullPointer;t.forEach((u,l)=>{let c=u.fullPointer[0],[f]=c,m=n[f],d=fA(e,a);d.length!==0&&(d=cA(d),r?(fh(t.update([c]).firstTerm()),uA(m,c,d,n)):(fh(t.update([c]).lastTerm()),lA(m,c,d,n)),n[f]&&n[f][c[1]]&&(c[3]=n[f][c[1]].id),o[l]=c,c[2]+=d.length,i[l]=c)});let s=t.toView(i);return t.ptrs=o,s.compute(["id","index","freeze","lexicon"]),s.world.compute.preTagger&&s.compute("preTagger"),s.compute("unfreeze"),s},Hi={insertAfter:function(e){return dh(e,this,!1)},insertBefore:function(e){return dh(e,this,!0)}};Hi.append=Hi.insertAfter;Hi.prepend=Hi.insertBefore;Hi.insert=Hi.insertAfter;const mA=/\$[0-9a-z]+/g,Km={},dA=e=>new RegExp("^\\p{Lu}[\\p{Ll}'’]","u").test(e)||new RegExp("^\\p{Lu}$","u").test(e),hA=e=>e.replace(new RegExp("^\\p{Ll}","u"),t=>t.toUpperCase()),pA=e=>e.replace(new RegExp("^\\p{Lu}","u"),t=>t.toLowerCase()),gA=function(e,t,r){return e.forEach(n=>{let a=t(n);n.replaceWith(a,r)}),e},vA=function(e,t){if(typeof e!="string")return e;let r=t.groups();return e=e.replace(mA,n=>{let a=n.replace(/\$/,"");return r.hasOwnProperty(a)?r[a].text():n}),e};Km.replaceWith=function(e,t={}){let r=this.fullPointer,n=this;if(this.uncache(),typeof e=="function")return gA(n,e,t);let a=n.docs[0];if(!a)return n;let i=t.possessives&&a[a.length-1].tags.has("Possessive"),o=t.case&&dA(a[0].text);e=vA(e,n);let s=this.update(r);r=r.map(m=>m.slice(0,3));let u=(s.docs[0]||[]).map(m=>Array.from(m.tags)),l=s.docs[0][0].pre,c=s.docs[0][s.docs[0].length-1].post;if(typeof e=="string"&&(e=this.fromText(e).compute("id")),n.insertAfter(e),s.has("@hasContraction")&&n.contractions&&n.grow("@hasContraction+").contractions().expand(),n.delete(s),i){let m=n.docs[0],d=m[m.length-1];d.tags.has("Possessive")||(d.text+="'s",d.normal+="'s",d.tags.add("Possessive"))}if(l&&n.docs[0]&&(n.docs[0][0].pre=l),c&&n.docs[0]){let m=n.docs[0][n.docs[0].length-1];m.post.trim()||(m.post=c)}let f=n.toView(r).compute(["index","freeze","lexicon"]);if(f.world.compute.preTagger&&f.compute("preTagger"),f.compute("unfreeze"),t.tags&&f.terms().forEach((m,d)=>{m.tagSafe(u[d])}),!f.docs[0]||!f.docs[0][0])return f;if(t.case){let m=o?hA:pA;f.docs[0][0].text=m(f.docs[0][0].text)}return f};Km.replace=function(e,t,r){if(e&&!t)return this.replaceWith(e,r);let n=this.match(e);return n.found?(this.soften(),n.replaceWith(t,r)):this};const yA=function(e,t){let r=e.length-1,n=e[r],a=e[r-t];a&&n&&(a.post+=n.post,a.post=a.post.replace(/ +([.?!,;:])/,"$1"),a.post=a.post.replace(/[,;:]+([.?!])/,"$1"))},bA=function(e,t){t.forEach(r=>{let[n,a,i]=r,o=i-a;e[n]&&(i===e[n].length&&i>1&&yA(e[n],o),e[n].splice(a,o))});for(let r=e.length-1;r>=0;r-=1)if(e[r].length===0&&(e.splice(r,1),r===e.length&&e[r-1])){let n=e[r-1],a=n[n.length-1];a&&(a.post=a.post.trimEnd())}return e},wA=function(e,t){return e=e.map(r=>{let[n]=r;return t[n]&&t[n].forEach(a=>{let i=a[2]-a[1];r[1]<=a[1]&&r[2]>=a[2]&&(r[2]-=i)}),r}),e.forEach((r,n)=>{if(r[1]===0&&r[2]==0)for(let a=n+1;a<e.length;a+=1)e[a][0]-=1,e[a][0]<0&&(e[a][0]=0)}),e=e.filter(r=>r[2]-r[1]>0),e=e.map(r=>(r[3]=null,r[4]=null,r)),e},qf={remove:function(e){const{indexN:t}=this.methods.one.pointer;this.uncache();let r=this.all(),n=this;e&&(r=this,n=this.match(e));let a=!r.ptrs;n.has("@hasContraction")&&n.contractions&&n.grow("@hasContraction").contractions().expand();let i=r.fullPointer,o=n.fullPointer.reverse(),s=bA(this.document,o),u=t(o);return i=wA(i,u),r.ptrs=i,r.document=s,r.compute("index"),a&&(r.ptrs=void 0),e?r.toView(i):(this.ptrs=[],r.none())}};qf.delete=qf.remove;const Ts={pre:function(e,t){return e===void 0&&this.found?this.docs[0][0].pre:(this.docs.forEach(r=>{let n=r[0];t===!0?n.pre+=e:n.pre=e}),this)},post:function(e,t){if(e===void 0){let r=this.docs[this.docs.length-1];return r[r.length-1].post}return this.docs.forEach(r=>{let n=r[r.length-1];t===!0?n.post+=e:n.post=e}),this},trim:function(){if(!this.found)return this;let e=this.docs,t=e[0][0];t.pre=t.pre.trimStart();let r=e[e.length-1],n=r[r.length-1];return n.post=n.post.trimEnd(),this},hyphenate:function(){return this.docs.forEach(e=>{e.forEach((t,r)=>{r!==0&&(t.pre=""),e[r+1]&&(t.post="-")})}),this},dehyphenate:function(){const e=/[-–—]/;return this.docs.forEach(t=>{t.forEach(r=>{e.test(r.post)&&(r.post=" ")})}),this},toQuotations:function(e,t){return e=e||'"',t=t||'"',this.docs.forEach(r=>{r[0].pre=e+r[0].pre;let n=r[r.length-1];n.post=t+n.post}),this},toParentheses:function(e,t){return e=e||"(",t=t||")",this.docs.forEach(r=>{r[0].pre=e+r[0].pre;let n=r[r.length-1];n.post=t+n.post}),this}};Ts.deHyphenate=Ts.dehyphenate;Ts.toQuotation=Ts.toQuotations;const xA=(e,t)=>e.normal<t.normal?-1:e.normal>t.normal?1:0,DA=(e,t)=>{let r=e.normal.trim().length,n=t.normal.trim().length;return r<n?1:r>n?-1:0},NA=(e,t)=>e.words<t.words?1:e.words>t.words?-1:0,AA=(e,t)=>e[0]<t[0]?1:e[0]>t[0]?-1:e[1]>t[1]?1:-1,CA=function(e){let t={};return e.forEach(r=>{t[r.normal]=t[r.normal]||0,t[r.normal]+=1}),e.sort((r,n)=>{let a=t[r.normal],i=t[n.normal];return a<i?1:a>i?-1:0}),e},_c={alpha:xA,length:DA,wordCount:NA,sequential:AA,byFreq:CA},EA=new Set(["index","sequence","seq","sequential","chron","chronological"]),SA=new Set(["freq","frequency","topk","repeats"]),MA=new Set(["alpha","alphabetical"]),TA=function(e,t){let r=e.fullPointer;return r=r.sort((n,a)=>(n=e.update([n]),a=e.update([a]),t(n,a))),e.ptrs=r,e},FA=function(e){let{docs:t,pointer:r}=this;if(this.uncache(),typeof e=="function")return TA(this,e);e=e||"alpha";let n=r||t.map((i,o)=>[o]),a=t.map((i,o)=>({index:o,words:i.length,normal:i.map(s=>s.machine||s.normal||"").join(" "),pointer:n[o]}));return EA.has(e)&&(e="sequential"),MA.has(e)&&(e="alpha"),SA.has(e)?(a=_c.byFreq(a),this.update(a.map(i=>i.pointer))):typeof _c[e]=="function"?(a=a.sort(_c[e]),this.update(a.map(i=>i.pointer))):this},PA=function(){let e=this.pointer||this.docs.map((t,r)=>[r]);return e=[].concat(e),e=e.reverse(),this._cache&&(this._cache=this._cache.reverse()),this.update(e)},kA=function(){let e=new Set;return this.filter(r=>{let n=r.text("machine");return e.has(n)?!1:(e.add(n),!0)})},OA={unique:kA,reverse:PA,sort:FA},$A=e=>Object.prototype.toString.call(e)==="[object Array]",jb=function(e,t){if(e.length>0){let r=e[e.length-1],n=r[r.length-1];/ /.test(n.post)===!1&&(n.post+=" ")}return e=e.concat(t),e},_A=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(n=>{n[0]+=e.document.length}),e.document=jb(e.document,t.docs),e.all()},BA={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 r=this.fullPointer,n=r[r.length-1][0];this.document.splice(n,0,...t.document)}return this.all().compute("index")}if(typeof e=="object"&&e.isView)return _A(this,e);if($A(e)){let t=jb(this.document,e);return this.document=t,this.all()}return this}},IA=function(){return this.ptrs=this.fullPointer,this},zA=function(){let e=this.ptrs;return!e||e.length<1?this:(e=e.map(t=>t.slice(0,3)),this.ptrs=e,this)},jA={harden:IA,soften:zA},qA=Object.assign({},aA,Hi,Km,qf,Ts,OA,BA,jA),RA=function(e){Object.assign(e.prototype,qA)},LA={id:function(e){let t=e.docs;for(let r=0;r<t.length;r+=1)for(let n=0;n<t[r].length;n+=1){let a=t[r][n];a.id=a.id||zb(a)}}},HA={api:RA,compute:LA},GA=[{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"]}],rn=!0,VA={st:rn,nd:rn,rd:rn,th:rn,am:rn,pm:rn,max:rn,"°":rn,s:rn,e:rn,er:rn,ère:rn,ème:rn},UA={one:{contractions:GA,numberSuffixes:VA}},Bc=function(e,t,r){let[n,a]=t;!r||r.length===0||(r=r.map((i,o)=>(i.implicit=i.text,i.machine=i.text,i.pre="",i.post="",i.text="",i.normal="",i.index=[n,a+o],i)),r[0]&&(r[0].pre=e[n][a].pre,r[r.length-1].post=e[n][a].post,r[0].text=e[n][a].text,r[0].normal=e[n][a].normal),e[n].splice(a,1,...r))},WA=/'/,JA=new Set(["what","how","when","where","why"]),KA=new Set(["be","go","start","think","need"]),YA=new Set(["been","gone"]),ZA=function(e,t){let r=e[t].normal.split(WA)[0];if(JA.has(r))return[r,"did"];if(e[t+1]){if(YA.has(e[t+1].normal))return[r,"had"];if(KA.has(e[t+1].normal))return[r,"would"]}return null},QA=function(e,t){return e[t].normal==="ain't"||e[t].normal==="aint"?null:[e[t].normal.replace(/n't/,""),"not"]},Ym=/'/,XA=/(e|é|aison|sion|tion)$/,e3=/(age|isme|acle|ege|oire)$/,t3=(e,t)=>{let r=e[t].normal.split(Ym)[1];return r&&r.endsWith("e")?["la",r]:["le",r]},r3=(e,t)=>{let r=e[t].normal.split(Ym)[1];return r&&XA.test(r)&&!e3.test(r)?["du",r]:r&&r.endsWith("s")?["des",r]:["de",r]},n3=(e,t)=>["je",e[t].normal.split(Ym)[1]],Ic={preJ:n3,preL:t3,preD:r3},a3=/^([0-9.]{1,4}[a-z]{0,2}) ?[-–—] ?([0-9]{1,4}[a-z]{0,2})$/i,i3=/^([0-9]{1,2}(:[0-9][0-9])?(am|pm)?) ?[-–—] ?([0-9]{1,2}(:[0-9][0-9])?(am|pm)?)$/i,o3=/^[0-9]{3}-[0-9]{4}$/,s3=function(e,t){let r=e[t],n=r.text.match(a3);return n!==null?r.tags.has("PhoneNumber")===!0||o3.test(r.text)?null:[n[1],"to",n[2]]:(n=r.text.match(i3),n!==null?[n[1],"to",n[4]]:null)},u3=/^([+-]?[0-9][.,0-9]*)([a-z°²³µ/]+)$/,l3=function(e,t,r){const n=r.model.one.numberSuffixes||{};let i=e[t].text.match(u3);if(i!==null){let o=i[2].toLowerCase().trim();return n.hasOwnProperty(o)?null:[i[1],o]}return null},hh=/'/,c3=/^[0-9][^-–—]*[-–—].*?[0-9]/,ph=function(e,t,r,n){let a=t.update();a.document=[e];let i=r+n;r>0&&(r-=1),e[i]&&(i+=1),a.ptrs=[[0,r,i]]},gh={t:(e,t)=>QA(e,t),d:(e,t)=>ZA(e,t)},vh={j:(e,t)=>Ic.preJ(e,t),l:(e,t)=>Ic.preL(e,t),d:(e,t)=>Ic.preD(e,t)},f3=function(e,t,r,n){for(let a=0;a<e.length;a+=1){let i=e[a];if(i.word===t.normal)return i.out;if(n!==null&&n===i.after)return[r].concat(i.out);if(r!==null&&r===i.before&&n&&n.length>2)return i.out.concat(n)}return null},zc=function(e,t){let r=t.fromText(e.join(" "));return r.compute(["id","alias"]),r.docs[0]},m3=function(e,t){for(let r=t+1;r<5&&e[r];r+=1)if(e[r].normal==="been")return["there","has"];return["there","is"]},d3=e=>{let{world:t,document:r}=e;const{model:n,methods:a}=t;let i=n.one.contractions||[];r.forEach((o,s)=>{for(let u=o.length-1;u>=0;u-=1){let l=null,c=null;if(hh.test(o[u].normal)===!0){let m=o[u].normal.split(hh);l=m[0],c=m[1]}let f=f3(i,o[u],l,c);if(!f&&gh.hasOwnProperty(c)&&(f=gh[c](o,u,t)),!f&&vh.hasOwnProperty(l)&&(f=vh[l](o,u)),l==="there"&&c==="s"&&(f=m3(o,u)),f){f=zc(f,e),Bc(r,[s,u],f),ph(r[s],e,u,f.length);continue}if(c3.test(o[u].normal)){f=s3(o,u),f&&(f=zc(f,e),Bc(r,[s,u],f),a.one.setTag(f,"NumberRange",t),f[2]&&f[2].tags.has("Time")&&a.one.setTag([f[0]],"Time",t,null,"time-range"),ph(r[s],e,u,f.length));continue}f=l3(o,u,t),f&&(f=zc(f,e),Bc(r,[s,u],f),a.one.setTag([f[1]],"Unit",t,null,"contraction-unit"))}})},h3={contractions:d3},p3={model:UA,compute:h3,hooks:["contractions"]},yh=function(e){const t=e.world,{model:r,methods:n}=e.world,a=n.one.setTag,{frozenLex:i}=r.one,o=r.one._multiCache||{};e.docs.forEach(s=>{for(let u=0;u<s.length;u+=1){let l=s[u],c=l.machine||l.normal;if(o[c]!==void 0&&s[u+1]){let f=u+o[c]-1;for(let m=f;m>u;m-=1){let d=s.slice(u,m+1),p=d.map(h=>h.machine||h.normal).join(" ");if(i.hasOwnProperty(p)===!0){a(d,i[p],t,!1,"1-frozen-multi-lexicon"),d.forEach(h=>h.frozen=!0);continue}}}if(i[c]!==void 0&&i.hasOwnProperty(c)){a([l],i[c],t,!1,"1-freeze-lexicon"),l.frozen=!0;continue}}})},g3=function(e){return e.docs.forEach(t=>{t.forEach(r=>{delete r.frozen})}),e},v3={frozen:yh,freeze:yh,unfreeze:g3},bh=e=>"\x1B[34m"+e+"\x1B[0m",wh=e=>"\x1B[3m\x1B[2m"+e+"\x1B[0m",xh=function(e){e.docs.forEach(t=>{console.log(bh(`
|
|
2
|
-
┌─────────`)),t.forEach(r=>{let n=` ${wh("│")} `,a=r.implicit||r.text||"-";r.frozen===!0?n+=`${bh(a)} ❄️`:n+=wh(a),console.log(n)})})},y3={compute:v3,mutate:e=>{const t=e.methods.one;t.termMethods.isFrozen=r=>r.frozen===!0,t.debug.freeze=xh,t.debug.frozen=xh},api:function(e){e.prototype.freeze=function(){return this.docs.forEach(t=>{t.forEach(r=>{r.frozen=!0})}),this},e.prototype.unfreeze=function(){this.compute("unfreeze")},e.prototype.isFrozen=function(){return this.match("@isFrozen+")}},hooks:["freeze"]},b3=function(e,t,r){const{model:n,methods:a}=r,i=a.one.setTag,o=n.one._multiCache||{},{lexicon:s}=n.one||{};let u=e[t],l=u.machine||u.normal;if(o[l]!==void 0&&e[t+1]){let c=t+o[l]-1;for(let f=c;f>t;f-=1){let m=e.slice(t,f+1);if(m.length<=1)return!1;let d=m.map(p=>p.machine||p.normal).join(" ");if(s.hasOwnProperty(d)===!0){let p=s[d];return i(m,p,r,!1,"1-multi-lexicon"),p&&p.length===2&&(p[0]==="PhrasalVerb"||p[1]==="PhrasalVerb")&&i([m[1]],"Particle",r,!1,"1-phrasal-particle"),!0}}return!1}return null},Dh=/^(under|over|mis|re|un|dis|semi|pre|post)-?/,w3=new Set(["Verb","Infinitive","PastTense","Gerund","PresentTense","Adjective","Participle"]),x3=function(e,t,r){const{model:n,methods:a}=r,i=a.one.setTag,{lexicon:o}=n.one;let s=e[t],u=s.machine||s.normal;if(o[u]!==void 0&&o.hasOwnProperty(u))return i([s],o[u],r,!1,"1-lexicon"),!0;if(s.alias){let l=s.alias.find(c=>o.hasOwnProperty(c));if(l)return i([s],o[l],r,!1,"1-lexicon-alias"),!0}if(Dh.test(u)===!0){let l=u.replace(Dh,"");if(o.hasOwnProperty(l)&&l.length>3&&w3.has(o[l]))return i([s],o[l],r,!1,"1-lexicon-prefix"),!0}return null},D3=function(e){const t=e.world;e.docs.forEach(r=>{for(let n=0;n<r.length;n+=1)if(r[n].tags.size===0){let a=null;a=a||b3(r,n,t),a=a||x3(r,n,t)}})},N3={lexicon:D3},A3=function(e){let t={},r={};return Object.keys(e).forEach(n=>{let a=e[n];n=n.toLowerCase().trim(),n=n.replace(/'s\b/,"");let i=n.split(/ /);i.length>1&&(r[i[0]]===void 0||i.length>r[i[0]])&&(r[i[0]]=i.length),t[n]=t[n]||a}),delete t[""],delete t[null],delete t[" "],{lex:t,_multi:r}},C3={one:{expandLexicon:A3}},E3=function(e,t=!1){const r=this.world(),{methods:n,model:a}=r;if(!e)return;if(Object.keys(e).forEach(s=>{typeof e[s]=="string"&&e[s].startsWith("#")&&(e[s]=e[s].replace(/^#/,""))}),t===!0){let{lex:s,_multi:u}=n.one.expandLexicon(e,r);Object.assign(a.one._multiCache,u),Object.assign(a.one.frozenLex,s);return}if(n.two.expandLexicon){let{lex:s,_multi:u}=n.two.expandLexicon(e,r);Object.assign(a.one.lexicon,s),Object.assign(a.one._multiCache,u)}let{lex:i,_multi:o}=n.one.expandLexicon(e,r);Object.assign(a.one.lexicon,i),Object.assign(a.one._multiCache,o)},S3={addWords:E3},M3={one:{lexicon:{},_multiCache:{},frozenLex:{}}},T3={model:M3,methods:C3,compute:N3,lib:S3,hooks:["lexicon"]},F3=function(e,t){const{methods:r,model:n}=t;return r.one.tokenize.splitTerms(e,n).map(i=>r.one.tokenize.splitWhitespace(i,n)).map(i=>i.text.toLowerCase())},qb=function(e,t){let r=[{}],n=[null],a=[0],i=[],o=0;e.forEach(function(s){let u=0,l=F3(s,t);for(let c=0;c<l.length;c++){let f=l[c];r[u]&&r[u].hasOwnProperty(f)?u=r[u][f]:(o++,r[u][f]=o,r[o]={},u=o,n[o]=null)}n[u]=[l.length]});for(let s in r[0])o=r[0][s],a[o]=0,i.push(o);for(;i.length;){let s=i.shift(),u=Object.keys(r[s]);for(let l=0;l<u.length;l+=1){let c=u[l],f=r[s][c];for(i.push(f),o=a[s];o>0&&!r[o].hasOwnProperty(c);)o=a[o];if(r.hasOwnProperty(o)){let m=r[o][c];a[f]=m,n[m]&&(n[f]=n[f]||[],n[f]=n[f].concat(n[m]))}else a[f]=0}}return{goNext:r,endAs:n,failTo:a}},P3=function(e,t,r){let n=0,a=[];for(let i=0;i<e.length;i++){let o=e[i][r.form]||e[i].normal;for(;n>0&&(t.goNext[n]===void 0||!t.goNext[n].hasOwnProperty(o));)n=t.failTo[n]||0;if(t.goNext[n].hasOwnProperty(o)&&(n=t.goNext[n][o],t.endAs[n])){let s=t.endAs[n];for(let u=0;u<s.length;u++){let l=s[u],c=e[i-l+1],[f,m]=c.index;a.push([f,m,m+l,c.id])}}}return a},k3=function(e,t){for(let r=0;r<e.length;r+=1)if(t.has(e[r])===!0)return!1;return!0},O3=function(e,t,r){let n=[];r.form=r.form||"normal";let a=e.docs;if(!t.goNext||!t.goNext[0])return console.error("Compromise invalid lookup trie"),e.none();let i=Object.keys(t.goNext[0]);for(let o=0;o<a.length;o++){if(e._cache&&e._cache[o]&&k3(i,e._cache[o])===!0)continue;let s=a[o],u=P3(s,t,r);u.length>0&&(n=n.concat(u))}return e.update(n)},$3=e=>Object.prototype.toString.call(e)==="[object Object]";function _3(e){e.prototype.lookup=function(t,r={}){if(!t)return this.none();typeof t=="string"&&(t=[t]);let n=$3(t)?t:qb(t,this.world),a=O3(this,n,r);return a=a.settle(),a}}const jc=(e,t)=>{for(let r=e.length-1;r>=0;r-=1)if(e[r]!==t)return e=e.slice(0,r+1),e;return e},B3=function(e){return e.goNext=e.goNext.map(t=>{if(Object.keys(t).length!==0)return t}),e.goNext=jc(e.goNext,void 0),e.failTo=jc(e.failTo,0),e.endAs=jc(e.endAs,null),e},Rf={buildTrie:function(e){const t=qb(e,this.world());return B3(t)}};Rf.compile=Rf.buildTrie;const I3={api:_3,lib:Rf},Nh=function(e,t){return t&&e.forEach(r=>{let n=r[0];t[n]&&(r[0]=t[n][0],r[1]+=t[n][1],r[2]+=t[n][1])}),e},Rb=function(e,t){let{ptrs:r,byGroup:n}=e;return r=Nh(r,t),Object.keys(n).forEach(a=>{n[a]=Nh(n[a],t)}),{ptrs:r,byGroup:n}},Gs=function(e,t,r){const n=r.methods.one;return typeof e=="number"&&(e=String(e)),typeof e=="string"&&(e=n.killUnicode(e,r),e=n.parseMatch(e,t,r)),e},Lb=e=>Object.prototype.toString.call(e)==="[object Object]",Vs=e=>e&&Lb(e)&&e.isView===!0,Us=e=>e&&Lb(e)&&e.isNet===!0,z3=function(e,t,r){const n=this.methods.one;if(Vs(e))return this.intersection(e);if(Us(e))return this.sweep(e,{tagger:!1}).view.settle();e=Gs(e,r,this.world);let a={regs:e,group:t},i=n.match(this.docs,a,this._cache),{ptrs:o,byGroup:s}=Rb(i,this.fullPointer),u=this.toView(o);return u._groups=s,u},j3=function(e,t,r){const n=this.methods.one;if(Vs(e))return this.intersection(e).eq(0);if(Us(e))return this.sweep(e,{tagger:!1,matchOne:!0}).view;e=Gs(e,r,this.world);let a={regs:e,group:t,justOne:!0},i=n.match(this.docs,a,this._cache),{ptrs:o,byGroup:s}=Rb(i,this.fullPointer),u=this.toView(o);return u._groups=s,u},q3=function(e,t,r){const n=this.methods.one;if(Vs(e))return this.intersection(e).fullPointer.length>0;if(Us(e))return this.sweep(e,{tagger:!1}).view.found;e=Gs(e,r,this.world);let a={regs:e,group:t,justOne:!0};return n.match(this.docs,a,this._cache).ptrs.length>0},R3=function(e,t,r){const n=this.methods.one;if(Vs(e))return this.filter(u=>u.intersection(e).found);if(Us(e)){let u=this.sweep(e,{tagger:!1}).view.settle();return this.if(u)}e=Gs(e,r,this.world);let a={regs:e,group:t,justOne:!0},i=this.fullPointer,o=this._cache||[];i=i.filter((u,l)=>{let c=this.update([u]);return n.match(c.docs,a,o[l]).ptrs.length>0});let s=this.update(i);return this._cache&&(s._cache=i.map(u=>o[u[0]])),s},L3=function(e,t,r){const{methods:n}=this,a=n.one;if(Vs(e))return this.filter(s=>!s.intersection(e).found);if(Us(e)){let s=this.sweep(e,{tagger:!1}).view.settle();return this.ifNo(s)}e=Gs(e,r,this.world);let i=this._cache||[],o=this.filter((s,u)=>{let l={regs:e,group:t,justOne:!0};return a.match(s.docs,l,i[u]).ptrs.length===0});return this._cache&&(o._cache=o.ptrs.map(s=>i[s[0]])),o},H3={matchOne:j3,match:z3,has:q3,if:R3,ifNo:L3},G3=function(e,t,r){const{indexN:n}=this.methods.one.pointer;let a=[],i=n(this.fullPointer);Object.keys(i).forEach(s=>{let u=i[s].sort((l,c)=>l[1]>c[1]?1:-1)[0];u[1]>0&&a.push([u[0],0,u[1]])});let o=this.toView(a);return e?o.match(e,t,r):o},V3=function(e,t,r){const{indexN:n}=this.methods.one.pointer;let a=[],i=n(this.fullPointer),o=this.document;Object.keys(i).forEach(u=>{let l=i[u].sort((m,d)=>m[1]>d[1]?-1:1)[0],[c,,f]=l;f<o[c].length&&a.push([c,f,o[c].length])});let s=this.toView(a);return e?s.match(e,t,r):s},U3=function(e,t,r){typeof e=="string"&&(e=this.world.methods.one.parseMatch(e,r,this.world)),e[e.length-1].end=!0;let n=this.fullPointer;return this.forEach((a,i)=>{let o=a.before(e,t);if(o.found){let s=o.terms();n[i][1]-=s.length,n[i][3]=s.docs[0][0].id}}),this.update(n)},W3=function(e,t,r){typeof e=="string"&&(e=this.world.methods.one.parseMatch(e,r,this.world)),e[0].start=!0;let n=this.fullPointer;return this.forEach((a,i)=>{let o=a.after(e,t);if(o.found){let s=o.terms();n[i][2]+=s.length,n[i][4]=null}}),this.update(n)},J3=function(e,t,r){return this.growRight(e,t,r).growLeft(e,t,r)},K3={before:G3,after:V3,growLeft:U3,growRight:W3,grow:J3},Hb=function(e,t){return[e[0],e[1],t[2]]},Y3=function(e){return Object.prototype.toString.call(e)==="[object Array]"},Zm=(e,t,r)=>typeof e=="string"||Y3(e)?t.match(e,r):e||t.none(),Qm=function(e,t){let[r,n,a]=e;return t.document[r]&&t.document[r][n]&&(e[3]=e[3]||t.document[r][n].id,t.document[r][a-1]&&(e[4]=e[4]||t.document[r][a-1].id)),e},Io={};Io.splitOn=function(e,t){const{splitAll:r}=this.methods.one.pointer;let n=Zm(e,this,t).fullPointer,a=r(this.fullPointer,n),i=[];return a.forEach(o=>{i.push(o.passthrough),i.push(o.before),i.push(o.match),i.push(o.after)}),i=i.filter(o=>o),i=i.map(o=>Qm(o,this)),this.update(i)};Io.splitBefore=function(e,t){const{splitAll:r}=this.methods.one.pointer;let n=Zm(e,this,t).fullPointer,a=r(this.fullPointer,n);for(let o=0;o<a.length;o+=1)!a[o].after&&a[o+1]&&a[o+1].before&&a[o].match&&a[o].match[0]===a[o+1].before[0]&&(a[o].after=a[o+1].before,delete a[o+1].before);let i=[];return a.forEach(o=>{i.push(o.passthrough),i.push(o.before),o.match&&o.after?i.push(Hb(o.match,o.after)):i.push(o.match)}),i=i.filter(o=>o),i=i.map(o=>Qm(o,this)),this.update(i)};Io.splitAfter=function(e,t){const{splitAll:r}=this.methods.one.pointer;let n=Zm(e,this,t).fullPointer,a=r(this.fullPointer,n),i=[];return a.forEach(o=>{i.push(o.passthrough),o.before&&o.match?i.push(Hb(o.before,o.match)):(i.push(o.before),i.push(o.match)),i.push(o.after)}),i=i.filter(o=>o),i=i.map(o=>Qm(o,this)),this.update(i)};Io.split=Io.splitAfter;const Z3=function(e,t){return!e||!t||e[0]!==t[0]?!1:e[2]===t[1]},Ah=function(e,t,r){const n=e.world,a=n.methods.one.parseMatch;t=t||".$",r=r||"^.";let i=a(t,{},n),o=a(r,{},n);i[i.length-1].end=!0,o[0].start=!0;let s=e.fullPointer,u=[s[0]];for(let l=1;l<s.length;l+=1){let c=u[u.length-1],f=s[l],m=e.update([c]),d=e.update([f]);Z3(c,f)&&m.has(i)&&d.has(o)?u[u.length-1]=[c[0],c[1],f[2],c[3],f[4]]:u.push(f)}return e.update(u)},Q3={joinIf:function(e,t){return Ah(this,e,t)},join:function(){return Ah(this)}},Un=Object.assign({},H3,K3,Io,Q3);Un.lookBehind=Un.before;Un.lookBefore=Un.before;Un.lookAhead=Un.after;Un.lookAfter=Un.after;Un.notIf=Un.ifNo;const X3=function(e){Object.assign(e.prototype,Un)},eC=/(?:^|\s)([![^]*(?:<[^<]*>)?\/.*?[^\\/]\/[?\]+*$~]*)(?:\s|$)/,tC=/([!~[^]*(?:<[^<]*>)?\([^)]+[^\\)]\)[?\]+*$~]*)(?:\s|$)/,rC=/ /g,nC=e=>/^[![^]*(<[^<]*>)?\(/.test(e)&&/\)[?\]+*$~]*$/.test(e),Ch=e=>/^[![^]*(<[^<]*>)?\//.test(e)&&/\/[?\]+*$~]*$/.test(e),Eh=function(e){return e=e.map(t=>t.trim()),e=e.filter(t=>t),e},aC=function(e){let t=e.split(eC),r=[];t.forEach(a=>{if(Ch(a)){r.push(a);return}r=r.concat(a.split(tC))}),r=Eh(r);let n=[];return r.forEach(a=>{nC(a)||Ch(a)?n.push(a):n=n.concat(a.split(rC))}),n=Eh(n),n},Sh=/\{([0-9]+)?(, *[0-9]*)?\}/,Mh=/&&/,iC=new RegExp(/^<\s*(\S+)\s*>/),Th=e=>e.charAt(0).toUpperCase()+e.substring(1),dn=e=>e.charAt(e.length-1),nn=e=>e.charAt(0),Co=e=>e.substring(1),Eo=e=>e.substring(0,e.length-1),fs=function(e){return e=Co(e),e=Eo(e),e},Gb=function(e,t){let r={};for(let n=0;n<2;n+=1){if(dn(e)==="$"&&(r.end=!0,e=Eo(e)),nn(e)==="^"&&(r.start=!0,e=Co(e)),dn(e)==="?"&&(r.optional=!0,e=Eo(e)),(nn(e)==="["||dn(e)==="]")&&(r.group=null,nn(e)==="["&&(r.groupStart=!0),dn(e)==="]"&&(r.groupEnd=!0),e=e.replace(/^\[/,""),e=e.replace(/\]$/,""),nn(e)==="<")){const a=iC.exec(e);a.length>=2&&(r.group=a[1],e=e.replace(a[0],""))}if(dn(e)==="+"&&(r.greedy=!0,e=Eo(e)),e!=="*"&&dn(e)==="*"&&e!=="\\*"&&(r.greedy=!0,e=Eo(e)),nn(e)==="!"&&(r.negative=!0,e=Co(e)),nn(e)==="~"&&dn(e)==="~"&&e.length>2&&(e=fs(e),r.fuzzy=!0,r.min=t.fuzzy||.85,/\(/.test(e)===!1))return r.word=e,r;if(nn(e)==="/"&&dn(e)==="/")return e=fs(e),t.caseSensitive&&(r.use="text"),r.regex=new RegExp(e),r;if(Sh.test(e)===!0&&(e=e.replace(Sh,(a,i,o)=>(o===void 0?(r.min=Number(i),r.max=Number(i)):(o=o.replace(/, */,""),i===void 0?(r.min=0,r.max=Number(o)):(r.min=Number(i),r.max=Number(o||999))),r.greedy=!0,r.min||(r.optional=!0),""))),nn(e)==="("&&dn(e)===")"){Mh.test(e)?(r.choices=e.split(Mh),r.operator="and"):(r.choices=e.split("|"),r.operator="or"),r.choices[0]=Co(r.choices[0]);let a=r.choices.length-1;r.choices[a]=Eo(r.choices[a]),r.choices=r.choices.map(i=>i.trim()),r.choices=r.choices.filter(i=>i),r.choices=r.choices.map(i=>i.split(/ /g).map(o=>Gb(o,t))),e=""}if(nn(e)==="{"&&dn(e)==="}"){if(e=fs(e),r.root=e,/\//.test(e)){let a=r.root.split(/\//);r.root=a[0],r.pos=a[1],r.pos==="adj"&&(r.pos="Adjective"),r.pos=r.pos.charAt(0).toUpperCase()+r.pos.substr(1).toLowerCase(),a[2]!==void 0&&(r.sense=a[2])}return r}if(nn(e)==="<"&&dn(e)===">")return e=fs(e),r.chunk=Th(e),r.greedy=!0,r;if(nn(e)==="%"&&dn(e)==="%")return e=fs(e),r.switch=e,r}return nn(e)==="#"?(r.tag=Co(e),r.tag=Th(r.tag),r):nn(e)==="@"?(r.method=Co(e),r):e==="."?(r.anything=!0,r):e==="*"?(r.anything=!0,r.greedy=!0,r.optional=!0,r):(e&&(e=e.replace("\\*","*"),e=e.replace("\\.","."),t.caseSensitive?r.use="text":e=e.toLowerCase(),r.word=e),r)},oC=/[a-z0-9][-–—][a-z]/i,sC=function(e,t){let r=t.model.one.prefixes;for(let n=e.length-1;n>=0;n-=1){let a=e[n];if(a.word&&oC.test(a.word)){let i=a.word.split(/[-–—]/g);if(r.hasOwnProperty(i[0]))continue;i=i.filter(o=>o).reverse(),e.splice(n,1),i.forEach(o=>{let s=Object.assign({},a);s.word=o,e.splice(n,0,s)})}}return e},Fh=function(e,t){let{all:r}=t.methods.two.transform.verb||{},n=e.root;return r?r(n,t.model):[]},Ph=function(e,t){let{all:r}=t.methods.two.transform.noun||{};return r?r(e.root,t.model):[e.root]},kh=function(e,t){let{all:r}=t.methods.two.transform.adjective||{};return r?r(e.root,t.model):[e.root]},uC=function(e,t){return e=e.map(r=>{if(r.root)if(t.methods.two&&t.methods.two.transform){let n=[];r.pos?r.pos==="Verb"?n=n.concat(Fh(r,t)):r.pos==="Noun"?n=n.concat(Ph(r,t)):r.pos==="Adjective"&&(n=n.concat(kh(r,t))):(n=n.concat(Fh(r,t)),n=n.concat(Ph(r,t)),n=n.concat(kh(r,t))),n=n.filter(a=>a),n.length>0&&(r.operator="or",r.fastOr=new Set(n))}else r.machine=r.root,delete r.id,delete r.root;return r}),e},lC=function(e){let t=0,r=null;for(let n=0;n<e.length;n++){const a=e[n];a.groupStart===!0&&(r=a.group,r===null&&(r=String(t),t+=1)),r!==null&&(a.group=r),a.groupEnd===!0&&(r=null)}return e},cC=function(e){return e.map(t=>{if(t.choices!==void 0){if(t.operator!=="or"||t.fuzzy===!0)return t;t.choices.every(n=>{if(n.length!==1)return!1;let a=n[0];return a.fuzzy===!0||a.start||a.end?!1:a.word!==void 0&&a.negative!==!0&&a.optional!==!0&&a.method!==!0})===!0&&(t.fastOr=new Set,t.choices.forEach(n=>{t.fastOr.add(n[0].word)}),delete t.choices)}return t})},fC=function(e){return e.map(t=>(t.fuzzy&&t.choices&&t.choices.forEach(r=>{r.length===1&&r[0].word&&(r[0].fuzzy=!0,r[0].min=t.min)}),t))},mC=function(e){return e=lC(e),e=cC(e),e=fC(e),e},dC=function(e,t,r){if(e==null||e==="")return[];t=t||{},typeof e=="number"&&(e=String(e));let n=aC(e);return n=n.map(a=>Gb(a,t)),n=sC(n,r),n=uC(n,r),n=mC(n),n},hC=function(e,t){for(let r of t)if(e.has(r))return!0;return!1},pC=function(e,t){for(let r=0;r<e.length;r+=1){let n=e[r];if(!(n.optional===!0||n.negative===!0||n.fuzzy===!0)){if(n.word!==void 0&&t.has(n.word)===!1||n.tag!==void 0&&t.has("#"+n.tag)===!1)return!0;if(n.fastOr&&hC(n.fastOr,t)===!1)return!1}}return!1},gC=function(e,t){let r=e.length,n=t.length;if(r===0)return n;if(n===0)return r;let a=(n>r?n:r)+1;if(Math.abs(r-n)>(a||100))return a||100;let i=[];for(let m=0;m<a;m++)i[m]=[m],i[m].length=a;for(let m=0;m<a;m++)i[0][m]=m;let o,s,u,l,c,f;for(let m=1;m<=r;++m)for(s=e[m-1],o=1;o<=n;++o){if(m===o&&i[m][o]>4)return r;u=t[o-1],l=s===u?0:1,c=i[m-1][o]+1,(f=i[m][o-1]+1)<c&&(c=f),(f=i[m-1][o-1]+l)<c&&(c=f),m>1&&o>1&&s===t[o-2]&&e[m-2]===u&&(f=i[m-2][o-2]+l)<c?i[m][o]=f:i[m][o]=c}return i[r][n]},vC=function(e,t,r=3){if(e===t)return 1;if(e.length<r||t.length<r)return 0;const n=gC(e,t);let a=Math.max(e.length,t.length);return 1-(a===0?0:n/a)},yC=/([\u0022\uFF02\u0027\u201C\u2018\u201F\u201B\u201E\u2E42\u201A\u00AB\u2039\u2035\u2036\u2037\u301D\u0060\u301F])/,bC=/([\u0022\uFF02\u0027\u201D\u2019\u00BB\u203A\u2032\u2033\u2034\u301E\u00B4])/,Oh=/^[-–—]$/,$h=/ [-–—]{1,3} /,ea=(e,t)=>e.post.indexOf(t)!==-1,Fs={hasQuote:e=>yC.test(e.pre)||bC.test(e.post),hasComma:e=>ea(e,","),hasPeriod:e=>ea(e,".")===!0&&ea(e,"...")===!1,hasExclamation:e=>ea(e,"!"),hasQuestionMark:e=>ea(e,"?")||ea(e,"¿"),hasEllipses:e=>ea(e,"..")||ea(e,"…"),hasSemicolon:e=>ea(e,";"),hasColon:e=>ea(e,":"),hasSlash:e=>/\//.test(e.text),hasHyphen:e=>Oh.test(e.post)||Oh.test(e.pre),hasDash:e=>$h.test(e.post)||$h.test(e.pre),hasContraction:e=>!!e.implicit,isAcronym:e=>e.tags.has("Acronym"),isKnown:e=>e.tags.size>0,isTitleCase:e=>new RegExp("^\\p{Lu}[a-z'\\u00C0-\\u00FF]","u").test(e.text),isUpperCase:e=>new RegExp("^\\p{Lu}+$","u").test(e.text)};Fs.hasQuotation=Fs.hasQuote;let gr=function(){};const wC=function(e,t,r,n){if(t.anything===!0)return!0;if(t.start===!0&&r!==0||t.end===!0&&r!==n-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||vC(t.word,e.normal)>=t.min)||e.alias&&e.alias.some(a=>a===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 Fs[t.method]=="function"&&Fs[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 a=e.normal;return t.use&&(a=e[t.use]),t.regex.test(a)}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 a=e.root||e.implicit||e.machine||e.normal;return t.fastOr.has(a)||t.fastOr.has(e.text)}return t.choices!==void 0?t.operator==="and"?t.choices.every(a=>gr(e,a,r,n)):t.choices.some(a=>gr(e,a,r,n)):!1};gr=function(e,t,r,n){let a=wC(e,t,r,n);return t.negative===!0?!a:a};const xC=function(e,t){let r=Object.assign({},e.regs[e.r],{start:!1,end:!1}),n=e.t;for(;e.t<e.terms.length;e.t+=1){if(t&&gr(e.terms[e.t],t,e.start_i+e.t,e.phrase_length))return e.t;let a=e.t-n+1;if(r.max!==void 0&&a===r.max)return e.t;if(gr(e.terms[e.t],r,e.start_i+e.t,e.phrase_length)===!1)return r.min!==void 0&&a<r.min?null:e.t}return e.t},DC=function(e,t){let r=e.t;if(!t)return e.terms.length;for(;r<e.terms.length;r+=1)if(gr(e.terms[r],t,e.start_i+r,e.phrase_length)===!0)return r;return null},NC=function(e,t){if(e.end===!0&&e.greedy===!0&&t.start_i+t.t<t.phrase_length-1){let r=Object.assign({},e,{end:!1});if(gr(t.terms[t.t],r,t.start_i+t.t,t.phrase_length)===!0)return!0}return!1},oc=function(e,t){return e.groups[e.inGroup]||(e.groups[e.inGroup]={start:t,length:0}),e.groups[e.inGroup]},AC=function(e){let{regs:t}=e,r=t[e.r],n=DC(e,t[e.r+1]);if(n===null||n===0||r.min!==void 0&&n-e.t<r.min)return null;if(r.max!==void 0&&n-e.t>r.max)return e.t=e.t+r.max,!0;if(e.hasGroup===!0){const a=oc(e,e.t);a.length=n-e.t}return e.t=n,!0},CC=function(e){return Object.prototype.toString.call(e)==="[object Array]"},Vb=function(e,t=0){let r=e.regs[e.r],n=!1;for(let a=0;a<r.choices.length;a+=1){let i=r.choices[a];if(!CC(i))return!1;if(n=i.every((o,s)=>{let u=0,l=e.t+s+t+u;if(e.terms[l]===void 0)return!1;let c=gr(e.terms[l],o,l+e.start_i,e.phrase_length);if(c===!0&&o.greedy===!0)for(let f=1;f<e.terms.length;f+=1){let m=e.terms[l+f];if(m)if(gr(m,o,e.start_i+f,e.phrase_length)===!0)u+=1;else break}return t+=u,c}),n){t+=i.length;break}}return n&&r.greedy===!0?Vb(e,t):t},EC=function(e){let t=0;return e.regs[e.r].choices.every(a=>{let i=a.every((o,s)=>{let u=e.t+s;return e.terms[u]===void 0?!1:gr(e.terms[u],o,u,e.phrase_length)});return i===!0&&a.length>t&&(t=a.length),i})===!0?t:!1},SC=function(e){const{regs:t}=e;let r=t[e.r],n=Vb(e);if(n){if(r.negative===!0)return null;if(e.hasGroup===!0){const a=oc(e,e.t);a.length+=n}if(r.end===!0){let a=e.phrase_length;if(e.t+e.start_i+n!==a)return null}return e.t+=n,!0}else if(!r.optional)return null;return!0},MC=function(e){const{regs:t}=e;let r=t[e.r],n=EC(e);if(n){if(r.negative===!0)return null;if(e.hasGroup===!0){const a=oc(e,e.t);a.length+=n}if(r.end===!0){let a=e.phrase_length-1;if(e.t+e.start_i!==a)return null}return e.t+=n,!0}else if(!r.optional)return null;return!0},TC=function(e,t,r){let n=0;for(let a=e.t;a<e.terms.length;a+=1){let i=gr(e.terms[a],t,e.start_i+e.t,e.phrase_length);if(i||r&&(i=gr(e.terms[a],r,e.start_i+e.t,e.phrase_length),i)||(n+=1,t.max!==void 0&&n===t.max))break}return n===0||t.min&&t.min>n?!1:(e.t+=n,!0)},FC=function(e){const{regs:t}=e;let r=t[e.r],n=Object.assign({},r);if(n.negative=!1,gr(e.terms[e.t],n,e.start_i+e.t,e.phrase_length))return!1;if(r.optional){let i=t[e.r+1];i&&(gr(e.terms[e.t],i,e.start_i+e.t,e.phrase_length)?e.r+=1:i.optional&&t[e.r+2]&&gr(e.terms[e.t],t[e.r+2],e.start_i+e.t,e.phrase_length)&&(e.r+=2))}return r.greedy?TC(e,n,t[e.r+1]):(e.t+=1,!0)},PC=function(e){const{regs:t}=e;let r=t[e.r],n=e.terms[e.t],a=gr(n,t[e.r+1],e.start_i+e.t,e.phrase_length);if(r.negative||a){let i=e.terms[e.t+1];(!i||!gr(i,t[e.r+1],e.start_i+e.t,e.phrase_length))&&(e.r+=1)}},kC=function(e){const{regs:t,phrase_length:r}=e;let n=t[e.r];return e.t=xC(e,t[e.r+1]),e.t===null||n.min&&n.min>e.t||n.end===!0&&e.start_i+e.t!==r?null:!0},OC=function(e){let t=e.terms[e.t],r=e.regs[e.r];if(t.implicit&&e.terms[e.t+1]){if(!e.terms[e.t+1].implicit)return;r.word===t.normal&&(e.t+=1),r.method==="hasContraction"&&(e.t+=1)}},$C=function(e,t){let r=e.regs[e.r];const n=oc(e,t);e.t>1&&r.greedy?n.length+=e.t-t:n.length++},qc=function(e){const{regs:t}=e;let r=t[e.r],n=e.terms[e.t],a=e.t;return r.optional&&t[e.r+1]&&r.negative?!0:(r.optional&&t[e.r+1]&&PC(e),n.implicit&&e.terms[e.t+1]&&OC(e),e.t+=1,r.end===!0&&e.t!==e.terms.length&&r.greedy!==!0||r.greedy===!0&&!kC(e)?null:(e.hasGroup===!0&&$C(e,a),!0))},Xm=function(e,t,r,n){if(e.length===0||t.length===0)return null;let a={t:0,terms:e,r:0,regs:t,groups:{},start_i:r,phrase_length:n,inGroup:null};for(;a.r<t.length;a.r+=1){let s=t[a.r];if(a.hasGroup=!!s.group,a.hasGroup===!0?a.inGroup=s.group:a.inGroup=null,!a.terms[a.t]){if(t.slice(a.r).some(c=>!c.optional)===!1)break;return null}if(s.anything===!0&&s.greedy===!0){if(!AC(a))return null;continue}if(s.choices!==void 0&&s.operator==="or"){if(!SC(a))return null;continue}if(s.choices!==void 0&&s.operator==="and"){if(!MC(a))return null;continue}if(s.anything===!0){if(s.negative&&s.anything||!qc(a))return null;continue}if(NC(s,a)===!0){if(!qc(a))return null;continue}if(s.negative){if(!FC(a))return null;continue}if(gr(a.terms[a.t],s,a.start_i+a.t,a.phrase_length)===!0){if(!qc(a))return null;continue}if(s.optional!==!0)return null}let i=[null,r,a.t+r];if(i[1]===i[2])return null;let o={};return Object.keys(a.groups).forEach(s=>{let u=a.groups[s],l=r+u.start;o[s]=[null,l,l+u.length]}),{pointer:i,groups:o}},_C=function(e,t){let r=[],n={};return e.length===0?{ptrs:r,byGroup:n}:(typeof t=="number"&&(t=String(t)),t?e.forEach(a=>{a.groups[t]&&r.push(a.groups[t])}):e.forEach(a=>{r.push(a.pointer),Object.keys(a.groups).forEach(i=>{n[i]=n[i]||[],n[i].push(a.groups[i])})}),{ptrs:r,byGroup:n})},BC=function(e,t,r){return e=e.filter(n=>{let[a,i,o]=n.pointer,s=r[a].slice(i,o);for(let u=0;u<s.length;u+=1){let l=s.slice(u);if(Xm(l,t,u,s.length)!==null)return!1}return!0}),e},Ub=function(e,t){return e.pointer[0]=t,Object.keys(e.groups).forEach(r=>{e.groups[r][0]=t}),e},IC=function(e,t,r){let n=Xm(e,t,0,e.length);return n?(n=Ub(n,r),n):null},zC=function(e,t,r){r=r||[];let{regs:n,group:a,justOne:i}=t,o=[];if(!n||n.length===0)return{ptrs:[],byGroup:{}};const s=n.filter(u=>u.optional!==!0&&u.negative!==!0).length;e:for(let u=0;u<e.length;u+=1){let l=e[u];if(!(r[u]&&pC(n,r[u]))){if(n[0].start===!0){let c=IC(l,n,u);c&&o.push(c);continue}for(let c=0;c<l.length;c+=1){let f=l.slice(c);if(f.length<s)break;let m=Xm(f,n,c,l.length);if(m){if(m=Ub(m,u),o.push(m),i===!0)break e;let d=m.pointer[2];Math.abs(d-1)>c&&(c=Math.abs(d-1))}}}}return n[n.length-1].end===!0&&(o=o.filter(u=>{let l=u.pointer[0];return e[l].length===u.pointer[2]})),t.notIf&&(o=BC(o,t.notIf,e)),o=_C(o,a),o.ptrs.forEach(u=>{let[l,c,f]=u;u[3]=e[l][c].id,u[4]=e[l][f-1].id}),o},jC={one:{termMethods:Fs,parseMatch:dC,match:zC}},qC={parseMatch:function(e,t){const r=this.world();let n=r.methods.one.killUnicode;return n&&(e=n(e,r)),r.methods.one.parseMatch(e,t,r)}},RC={api:X3,methods:jC,lib:qC},LC=/^\../,HC=/^#./,GC=e=>(e=e.replace(/&/g,"&"),e=e.replace(/</g,"<"),e=e.replace(/>/g,">"),e=e.replace(/"/g,"""),e=e.replace(/'/g,"'"),e),VC=function(e){let t="",r="</span>";return e=GC(e),LC.test(e)?t=`<span class="${e.replace(/^\./,"")}"`:HC.test(e)?t=`<span id="${e.replace(/^#/,"")}"`:(t=`<${e}`,r=`</${e}>`),t+=">",{start:t,end:r}},UC=function(e,t){let r={},n={};return Object.keys(t).forEach(a=>{let i=t[a],o=VC(a);typeof i=="string"&&(i=e.match(i)),i.docs.forEach(s=>{if(s.every(c=>c.implicit))return;let u=s[0].id;r[u]=r[u]||[],r[u].push(o.start);let l=s[s.length-1].id;n[l]=n[l]||[],n[l].push(o.end)})}),{starts:r,ends:n}},WC=function(e){let{starts:t,ends:r}=UC(this,e),n="";return this.docs.forEach(a=>{for(let i=0;i<a.length;i+=1){let o=a[i];t.hasOwnProperty(o.id)&&(n+=t[o.id].join("")),n+=o.pre||"",n+=o.text||"",r.hasOwnProperty(o.id)&&(n+=r[o.id].join("")),n+=o.post||""}}),n},JC={html:WC},Wb=/[,:;)\]*.?~!\u0022\uFF02\u201D\u2019\u00BB\u203A\u2032\u2033\u2034\u301E\u00B4—-]+$/,Lf=/^[(['"*~\uFF02\u201C\u2018\u201F\u201B\u201E\u2E42\u201A\u00AB\u2039\u2035\u2036\u2037\u301D\u0060\u301F]+/,KC=/[,:;)('"\u201D\]]/,YC=/^[-–—]$/,ZC=/ /,Mi=function(e,t,r=!0){let n="";return e.forEach(a=>{let i=a.pre||"",o=a.post||"";t.punctuation==="some"&&(i=i.replace(Lf,""),YC.test(o)&&(o=" "),o=o.replace(KC,""),o=o.replace(/\?!+/,"?"),o=o.replace(/!+/,"!"),o=o.replace(/\?+/,"?"),o=o.replace(/\.{2,}/,""),a.tags.has("Abbreviation")&&(o=o.replace(/\./,""))),t.whitespace==="some"&&(i=i.replace(/\s/,""),o=o.replace(/\s+/," ")),t.keepPunct||(i=i.replace(Lf,""),o==="-"?o=" ":o=o.replace(Wb,""));let s=a[t.form||"text"]||a.normal||"";t.form==="implicit"&&(s=a.implicit||a.text),t.form==="root"&&a.implicit&&(s=a.root||a.implicit||a.normal),(t.form==="machine"||t.form==="implicit"||t.form==="root")&&a.implicit&&(!o||!ZC.test(o))&&(o+=" "),n+=i+s+o}),r===!1&&(n=n.trim()),t.lowerCase===!0&&(n=n.toLowerCase()),n},QC=function(e,t){let r="";if(!e||!e[0]||!e[0][0])return r;for(let n=0;n<e.length;n+=1)r+=Mi(e[n],t,!0);if(t.keepSpace||(r=r.trim()),t.keepEndPunct===!1){e[0][0].tags.has("Emoticon")||(r=r.replace(Lf,""));let n=e[e.length-1];n[n.length-1].tags.has("Emoticon")||(r=r.replace(Wb,"")),r.endsWith("'")&&!r.endsWith("s'")&&(r=r.replace(/'/,""))}return t.cleanWhitespace===!0&&(r=r.trim()),r},ai={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"}};ai.clean=ai.normal;ai.reduced=ai.root;let Jb=[],$i=0;for(;$i<64;)Jb[$i]=0|Math.sin(++$i%Math.PI)*4294967296;const ed=function(e){let t,r,n,a=[t=1732584193,r=4023233417,~t,~r],i=[],o=decodeURI(encodeURI(e))+"",s=o.length;for(e=--s/4+2|15,i[--e]=s*8;~s;)i[s>>2]|=o.charCodeAt(s)<<8*s--;for($i=o=0;$i<e;$i+=16){for(s=a;o<64;s=[n=s[3],t+((n=s[0]+[t&r|~t&n,n&t|~n&r,t^r^n,r^(t|~n)][s=o>>4]+Jb[o]+~~i[$i|[o,5*o+1,3*o+5,7*o][s]&15])<<(s=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*s+o++%4])|n>>>-s),t,r])t=s[1]|0,r=s[2];for(o=4;o;)a[--o]+=s[o]}for(e="";o<32;)e+=(a[o>>3]>>(1^o++)*4&15).toString(16);return e},XC={text:!0,terms:!0};let _h={case:"none",unicode:"some",form:"machine",punctuation:"some"};const Rc=function(e,t){return Object.assign({},e,t)},$a={text:e=>Mi(e,{keepPunct:!0},!1),normal:e=>Mi(e,Rc(ai.normal,{keepPunct:!0}),!1),implicit:e=>Mi(e,Rc(ai.implicit,{keepPunct:!0}),!1),machine:e=>Mi(e,_h,!1),root:e=>Mi(e,Rc(_h,{form:"root"}),!1),hash:e=>ed(Mi(e,{keepPunct:!0},!1)),offset:e=>{let t=$a.text(e).length;return{index:e[0].offset.index,start:e[0].offset.start,length:t}},terms:e=>e.map(t=>{let r=Object.assign({},t);return r.tags=Array.from(t.tags),r}),confidence:(e,t,r)=>t.eq(r).confidence(),syllables:(e,t,r)=>t.eq(r).syllables(),sentence:(e,t,r)=>t.eq(r).fullSentence().text(),dirty:e=>e.some(t=>t.dirty===!0)};$a.sentences=$a.sentence;$a.clean=$a.normal;$a.reduced=$a.root;const eE=function(e,t){return t=t||{},typeof t=="string"&&(t={}),t=Object.assign({},XC,t),t.offset&&e.compute("offset"),e.docs.map((r,n)=>{let a={};return Object.keys(t).forEach(i=>{t[i]&&$a[i]&&(a[i]=$a[i](r,e,n))}),a})},Hf={json:function(e){let t=eE(this,e);return typeof e=="number"?t[e]:t}};Hf.data=Hf.json;const tE=()=>typeof window<"u"&&window.document,rE=function(e){let t=this.methods.one.debug||{};return e&&t.hasOwnProperty(e)?(t[e](this),this):tE()?(t.clientSide(this),this):(t.tags(this),this)},nE=function(e){let t=e.pre||"",r=e.post||"";return t+e.text+r},aE=function(e,t){let r={};return Object.keys(t).forEach(n=>{e.match(n).fullPointer.forEach(i=>{r[i[3]]={fn:t[n],end:i[2]}})}),r},Kb=function(e,t){let r=aE(e,t),n="";return e.docs.forEach((a,i)=>{for(let o=0;o<a.length;o+=1){let s=a[o];if(r.hasOwnProperty(s.id)){let{fn:u,end:l}=r[s.id],c=e.update([[i,o,l]]);n+=a[o].pre||"",n+=u(c),o=l-1,n+=a[o].post||""}else n+=nE(s)}}),n},iE=e=>Object.prototype.toString.call(e)==="[object Object]",oE=function(e){let t={};return e.forEach(n=>{t[n]=t[n]||0,t[n]+=1}),Object.keys(t).map(n=>({normal:n,count:t[n]})).sort((n,a)=>n.count>a.count?-1:0)},sE=function(e){if(iE(e))return Kb(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 ed(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(r=>r.reduce((n,a)=>n+a.pre+a.text+a.post,"").trim()).filter(r=>r);if(e==="freq"||e==="frequency"||e==="topk")return oE(this.json({normal:!0}).map(t=>t.normal));if(e==="terms"){let t=[];return this.docs.forEach(r=>{let n=r.map(a=>a.text);n=n.filter(a=>a),t=t.concat(n)}),t}return e==="tags"?this.docs.map(t=>t.reduce((r,n)=>(r[n.implicit||n.normal]=Array.from(n.tags),r),{})):e==="debug"?this.debug():this.text()},uE={debug:rE,out:sE,wrap:function(e){return Kb(this,e)}},lE=e=>Object.prototype.toString.call(e)==="[object Object]",cE={text:function(e){let t={};if(e&&typeof e=="string"&&ai.hasOwnProperty(e)?t=Object.assign({},ai[e]):e&&lE(e)&&(t=Object.assign({},e)),t.keepSpace===void 0&&!this.isFull()&&(t.keepSpace=!1),t.keepEndPunct===void 0&&this.pointer){let r=this.pointer[0];r&&r[1]?t.keepEndPunct=!1:t.keepEndPunct=!0}return t.keepPunct===void 0&&(t.keepPunct=!0),t.keepSpace===void 0&&(t.keepSpace=!0),QC(this.docs,t)}},fE=Object.assign({},uE,cE,Hf,JC),mE=function(e){Object.assign(e.prototype,fE)},dE=function(e){console.log("%c -=-=- ","background-color:#6699cc;"),e.forEach(t=>{console.groupCollapsed(t.text());let n=t.docs[0].map(a=>{let i=a.text||"-";a.implicit&&(i="["+a.implicit+"]");let o="["+Array.from(a.tags).join(", ")+"]";return{text:i,tags:o}});console.table(n,["text","tags"]),console.groupEnd()})},ma="\x1B[0m",sn={green:e=>"\x1B[32m"+e+ma,red:e=>"\x1B[31m"+e+ma,blue:e=>"\x1B[34m"+e+ma,magenta:e=>"\x1B[35m"+e+ma,cyan:e=>"\x1B[36m"+e+ma,yellow:e=>"\x1B[33m"+e+ma,black:e=>"\x1B[30m"+e+ma,dim:e=>"\x1B[2m"+e+ma,i:e=>"\x1B[3m"+e+ma},hE=function(e,t){return t.one.tagSet&&(e=e.map(r=>{if(!t.one.tagSet.hasOwnProperty(r))return r;const n=t.one.tagSet[r].color||"blue";return sn[n](r)})),e.join(", ")},pE=function(e){let{docs:t,model:r}=e;t.length===0&&console.log(sn.blue(`
|
|
3
|
-
──────`)),t.forEach(n=>{console.log(sn.blue(`
|
|
4
|
-
┌─────────`)),n.forEach(a=>{let i=[...a.tags||[]],o=a.text||"-";a.sense&&(o=`{${a.normal}/${a.sense}}`),a.implicit&&(o="["+a.implicit+"]"),o=sn.yellow(o);let s="'"+o+"'";if(a.reference){let l=e.update([a.reference]).text("normal");s+=` - ${sn.dim(sn.i("["+l+"]"))}`}s=s.padEnd(18);let u=sn.blue(" │ ")+sn.i(s)+" - "+hE(i,r);console.log(u)})}),console.log(`
|
|
5
|
-
`)},gE=function(e){let{docs:t}=e;console.log(""),t.forEach(r=>{let n=[];r.forEach(a=>{a.chunk==="Noun"?n.push(sn.blue(a.implicit||a.normal)):a.chunk==="Verb"?n.push(sn.green(a.implicit||a.normal)):a.chunk==="Adjective"?n.push(sn.yellow(a.implicit||a.normal)):a.chunk==="Pivot"?n.push(sn.red(a.implicit||a.normal)):n.push(a.implicit||a.normal)}),console.log(n.join(" "),`
|
|
6
|
-
`)}),console.log(`
|
|
7
|
-
`)},vE=(e,t,r)=>{let n=r*9,a=t.start+n,i=a+t.length,o=e.substring(0,a),s=e.substring(a,i),u=e.substring(i,e.length);return[o,s,u]},yE=function(e,t,r){let n=vE(e,t,r);return`${n[0]}${sn.blue(n[1])}${n[2]}`},bE=function(e){if(!e.found)return;let t={};e.fullPointer.forEach(r=>{t[r[0]]=t[r[0]]||[],t[r[0]].push(r)}),Object.keys(t).forEach(r=>{let a=e.update([[Number(r)]]).text();e.update(t[r]).json({offset:!0}).forEach((s,u)=>{a=yE(a,s.offset,u)}),console.log(a)}),console.log(`
|
|
8
|
-
`)},wE={tags:pE,clientSide:dE,chunks:gE,highlight:bE},xE={api:mE,methods:{one:{hash:ed,debug:wE}}},Yb=function(e,t){if(e[0]!==t[0])return!1;let[,r,n]=e,[,a,i]=t;return r<=a&&n>a||a<=r&&i>r},DE=function(e){let t=e[0][1],r=e[0][2];return e.forEach(n=>{n[1]<t&&(t=n[1]),n[2]>r&&(r=n[2])}),[e[0][0],t,r]},sc=function(e){let t={};return e.forEach(r=>{t[r[0]]=t[r[0]]||[],t[r[0]].push(r)}),t},NE=function(e){let t={};for(let r=0;r<e.length;r+=1)t[e[r].join(",")]=e[r];return Object.values(t)},AE=function(e,t){let[r,n]=e,a=t[1],i=t[2],o={};if(n<a){let s=a<e[2]?a:e[2];o.before=[r,n,s]}return o.match=t,e[2]>i&&(o.after=[r,i,e[2]]),o},CE=function(e,t){return e[1]<=t[1]&&t[2]<=e[2]},Zb=function(e,t){let r=sc(t),n=[];return e.forEach(a=>{let[i]=a,o=r[i]||[];if(o=o.filter(u=>CE(a,u)),o.length===0){n.push({passthrough:a});return}o=o.sort((u,l)=>u[1]-l[1]);let s=a;o.forEach((u,l)=>{let c=AE(s,u);o[l+1]?(n.push({before:c.before,match:c.match}),c.after&&(s=c.after)):n.push(c)})}),n},EE=20,SE=function(e,t,r){for(let n=0;n<EE;n+=1){if(t[r-n]){let a=t[r-n].findIndex(i=>i.id===e);if(a!==-1)return[r-n,a]}if(t[r+n]){let a=t[r+n].findIndex(i=>i.id===e);if(a!==-1)return[r+n,a]}}return null},ME=function(e,t){let[r,n,,,a]=e,i=t[r],o=i.findIndex(s=>s.id===a);return o===-1?(e[2]=t[r].length,e[4]=i.length?i[i.length-1].id:null):e[2]=o,t[r].slice(n,e[2]+1)},TE=function(e,t){let r=[];return e.forEach((n,a)=>{if(!n)return;let[i,o,s,u,l]=n,c=t[i]||[];if(o===void 0&&(o=0),s===void 0&&(s=c.length),u&&(!c[o]||c[o].id!==u)){let f=SE(u,t,i);if(f!==null){let m=s-o;c=t[f[0]].slice(f[1],f[1]+m);let d=c[0]?c[0].id:null;e[a]=[f[0],f[1],f[1]+m,d]}}else c=c.slice(o,s);c.length!==0&&o!==s&&(l&&c[c.length-1].id!==l&&(c=ME(n,t)),r.push(c))}),r=r.filter(n=>n.length>0),r},FE=function(e){let t=[];for(let r=0;r<e.length;r+=1)for(let n=0;n<e[r].length;n+=1)t.push(e[r][n]);return t},PE={one:{termList:FE,getDoc:TE,pointer:{indexN:sc,splitAll:Zb}}},Qb=function(e,t){let r=e.concat(t),n=sc(r),a=[];return r.forEach(i=>{let[o]=i;if(n[o].length===1){a.push(i);return}let s=n[o].filter(l=>Yb(i,l));s.push(i);let u=DE(s);a.push(u)}),a=NE(a),a},Xb=function(e,t){let r=[];return Zb(e,t).forEach(a=>{a.passthrough&&r.push(a.passthrough),a.before&&r.push(a.before),a.after&&r.push(a.after)}),r},kE=function(e,t){let r=e[1]<t[1]?t[1]:e[1],n=e[2]>t[2]?t[2]:e[2];return r<n?[e[0],r,n]:null},OE=function(e,t){let r=sc(t),n=[];return e.forEach(a=>{let i=r[a[0]]||[];i=i.filter(o=>Yb(a,o)),i.length!==0&&i.forEach(o=>{let s=kE(a,o);s&&n.push(s)})}),n},$E=function(e){return Object.prototype.toString.call(e)==="[object Array]"},td=(e,t)=>typeof e=="string"||$E(e)?t.match(e):e||t.none(),Ws=function(e,t){return e.map(r=>{let[n,a]=r;return t[n]&&t[n][a]&&(r[3]=t[n][a].id),r})},oa={};oa.union=function(e){e=td(e,this);let t=Qb(this.fullPointer,e.fullPointer);return t=Ws(t,this.document),this.toView(t)};oa.and=oa.union;oa.intersection=function(e){e=td(e,this);let t=OE(this.fullPointer,e.fullPointer);return t=Ws(t,this.document),this.toView(t)};oa.not=function(e){e=td(e,this);let t=Xb(this.fullPointer,e.fullPointer);return t=Ws(t,this.document),this.toView(t)};oa.difference=oa.not;oa.complement=function(){let e=this.all(),t=Xb(e.fullPointer,this.fullPointer);return t=Ws(t,this.document),this.toView(t)};oa.settle=function(){let e=this.fullPointer;return e.forEach(t=>{e=Qb(e,[t])}),e=Ws(e,this.document),this.update(e)};const _E=function(e){Object.assign(e.prototype,oa)},BE={methods:PE,api:_E},IE={buildNet:function(e){let r=this.methods().one.buildNet(e,this.world());return r.isNet=!0,r}},zE=function(e){e.prototype.sweep=function(t,r={}){const{world:n,docs:a}=this,{methods:i}=n;let o=i.one.bulkMatch(a,t,this.methods,r);r.tagger!==!1&&i.one.bulkTagger(o,a,this.world),o=o.map(u=>{let l=u.pointer,c=a[l[0]][l[1]],f=l[2]-l[1];return c.index&&(u.pointer=[c.index[0],c.index[1],l[1]+f]),u});let s=o.map(u=>u.pointer);return o=o.map(u=>(u.view=this.update([u.pointer]),delete u.regs,delete u.needs,delete u.pointer,delete u._expanded,u)),{view:this.update(s),found:o}}},Gf=function(e){return e.optional===!0||e.negative===!0?null:e.tag?"#"+e.tag:e.word?e.word:e.switch?`%${e.switch}%`:null},jE=function(e){let t=[];return e.forEach(r=>{t.push(Gf(r)),r.operator==="and"&&r.choices&&r.choices.forEach(n=>{n.forEach(a=>{t.push(Gf(a))})})}),t.filter(r=>r)},qE=function(e){let t=[],r=0;return e.forEach(n=>{n.operator==="or"&&!n.optional&&!n.negative&&(n.fastOr&&Array.from(n.fastOr).forEach(a=>{t.push(a)}),n.choices&&n.choices.forEach(a=>{a.forEach(i=>{let o=Gf(i);o&&t.push(o)})}),r+=1)}),{wants:t,count:r}},RE=function(e,t){const r=t.methods.one.parseMatch;return e.forEach(n=>{n.regs=r(n.match,{},t),typeof n.ifNo=="string"&&(n.ifNo=[n.ifNo]),n.notIf&&(n.notIf=r(n.notIf,{},t)),n.needs=jE(n.regs);let{wants:a,count:i}=qE(n.regs);n.wants=a,n.minWant=i,n.minWords=n.regs.filter(o=>!o.optional).length}),e},LE=function(e,t){e=RE(e,t);let r={};e.forEach(a=>{a.needs.forEach(i=>{r[i]=Array.isArray(r[i])?r[i]:[],r[i].push(a)}),a.wants.forEach(i=>{r[i]=Array.isArray(r[i])?r[i]:[],r[i].push(a)})}),Object.keys(r).forEach(a=>{let i={};r[a]=r[a].filter(o=>typeof i[o.match]=="boolean"?!1:(i[o.match]=!0,!0))});let n=e.filter(a=>a.needs.length===0&&a.wants.length===0);return{hooks:r,always:n}},HE=function(e,t){return e.map((r,n)=>{let a=[];Object.keys(t).forEach(o=>{e[n].has(o)&&(a=a.concat(t[o]))});let i={};return a=a.filter(o=>typeof i[o.match]=="boolean"?!1:(i[o.match]=!0,!0)),a})},GE=function(e,t){return e.map((r,n)=>{let a=t[n];return r=r.filter(i=>i.needs.every(o=>a.has(o))),r=r.filter(i=>!(i.ifNo!==void 0&&i.ifNo.some(o=>a.has(o))===!0)),r=r.filter(i=>i.wants.length===0?!0:i.wants.filter(s=>a.has(s)).length>=i.minWant),r})},VE=function(e,t,r,n,a){let i=[];for(let o=0;o<e.length;o+=1)for(let s=0;s<e[o].length;s+=1){let u=e[o][s],l=n.one.match([t[o]],u);if(l.ptrs.length>0&&(l.ptrs.forEach(c=>{c[0]=o;let f=Object.assign({},u,{pointer:c});u.unTag!==void 0&&(f.unTag=u.unTag),i.push(f)}),a.matchOne===!0))return[i[0]]}return i},UE=function(e,t){return e.map((r,n)=>{let a=t[n].length;return r=r.filter(i=>a>=i.minWords),r})},WE=function(e,t,r,n={}){let a=r.one.cacheDoc(e),i=HE(a,t.hooks);return i=GE(i,a),t.always.length>0&&(i=i.map(s=>s.concat(t.always))),i=UE(i,e),VE(i,e,a,r,n)},JE=function(e,t,r){let n=r.one.tagSet;if(!n.hasOwnProperty(t))return!0;let a=n[t].not||[];for(let i=0;i<e.length;i+=1){let o=e[i];for(let s=0;s<a.length;s+=1)if(o.tags.has(a[s])===!0)return!1}return!0},KE=function(e,t,r){const{model:n,methods:a}=r,{getDoc:i,setTag:o,unTag:s}=a.one,u=a.two.looksPlural;return e.length===0?e:((typeof process>"u"||!process.env?self.env||{}:process.env).DEBUG_TAGS&&console.log(`
|
|
9
|
-
|
|
10
|
-
\x1B[32m→ ${e.length} post-tagger:\x1B[0m`),e.map(c=>{if(!c.tag&&!c.chunk&&!c.unTag)return;let f=c.reason||c.match,m=i([c.pointer],t)[0];if(!(c.safe===!0&&(JE(m,c.tag,n)===!1||m[m.length-1].post==="-"))){if(c.tag!==void 0){if(o(m,c.tag,r,c.safe,`[post] '${f}'`),c.tag==="Noun"&&u){let d=m[m.length-1];u(d.text)?o([d],"Plural",r,c.safe,"quick-plural"):o([d],"Singular",r,c.safe,"quick-singular")}c.freeze===!0&&m.forEach(d=>d.frozen=!0)}c.unTag!==void 0&&s(m,c.unTag,r,c.safe,f),c.chunk&&m.forEach(d=>d.chunk=c.chunk)}}))},YE={buildNet:LE,bulkMatch:WE,bulkTagger:KE},ZE={lib:IE,api:zE,methods:{one:YE}},ew=/ /,Bh=function(e,t){t==="Noun"&&(e.chunk=t),t==="Verb"&&(e.chunk=t)},tw=function(e,t,r,n){if(e.tags.has(t)===!0||t===".")return null;e.frozen===!0&&(n=!0);let a=r[t];if(a){if(a.not&&a.not.length>0)for(let i=0;i<a.not.length;i+=1){if(n===!0&&e.tags.has(a.not[i]))return null;e.tags.delete(a.not[i])}if(a.parents&&a.parents.length>0)for(let i=0;i<a.parents.length;i+=1)e.tags.add(a.parents[i]),Bh(e,a.parents[i])}return e.tags.add(t),e.dirty=!0,Bh(e,t),!0},QE=function(e,t,r,n){let a=t.split(ew);e.forEach((i,o)=>{let s=a[o];s&&(s=s.replace(/^#/,""),tw(i,s,r,n))})},XE=function(e){return Object.prototype.toString.call(e)==="[object Array]"},eS=(e,t,r="")=>{const n=o=>"\x1B[33m\x1B[3m"+o+"\x1B[0m",a=o=>"\x1B[3m"+o+"\x1B[0m";let i=e.map(o=>o.text||"["+o.implicit+"]").join(" ");typeof t!="string"&&t.length>2&&(t=t.slice(0,2).join(", #")+" +"),t=typeof t!="string"?t.join(", #"):t,console.log(` ${n(i).padEnd(24)} \x1B[32m→\x1B[0m #${t.padEnd(22)} ${a(r)}`)},rw=function(e,t,r={},n,a){const i=r.model.one.tagSet||{};if(!t)return;const o=typeof process>"u"||!process.env?self.env||{}:process.env;if(o&&o.DEBUG_TAGS&&eS(e,t,a),XE(t)===!0){t.forEach(s=>rw(e,s,r,n));return}if(typeof t!="string"){console.warn(`compromise: Invalid tag '${t}'`);return}if(t=t.trim(),ew.test(t)){QE(e,t,i,n);return}t=t.replace(/^#/,"");for(let s=0;s<e.length;s+=1)tw(e[s],t,i,n)},tS=function(e,t,r){t=t.trim().replace(/^#/,"");for(let n=0;n<e.length;n+=1){let a=e[n];if(a.frozen===!0)continue;if(t==="*"){a.tags.clear();continue}let i=r[t];if(i&&i.children.length>0)for(let o=0;o<i.children.length;o+=1)a.tags.delete(i.children[o]);a.tags.delete(t)}},rS=function(e,t,r){if(!r.hasOwnProperty(t))return!0;let n=r[t].not||[];for(let a=0;a<n.length;a+=1)if(e.tags.has(n[a]))return!1;return!0},Ya=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},nS=/^ *(#|\/\/)/,aS=function(e){let t=e.trim().split(/->/),r=[];t.forEach(a=>{r=r.concat(function(i){if(!(i=i.trim()))return null;if(/^\[/.test(i)&&/\]$/.test(i)){let o=(i=(i=i.replace(/^\[/,"")).replace(/\]$/,"")).split(/,/);return o=o.map(s=>s.trim()).filter(s=>s),o=o.map(s=>Ya({id:s})),o}return[Ya({id:i})]}(a))}),r=r.filter(a=>a);let n=r[0];for(let a=1;a<r.length;a+=1)n.children.push(r[a]),n=r[a];return r[0]},Ea=(e,t)=>{let r=[],n=[e];for(;n.length>0;){let a=n.pop();r.push(a),a.children&&a.children.forEach(i=>{t&&t(a,i),n.push(i)})}return r},rd=e=>Object.prototype.toString.call(e)==="[object Array]",fu=e=>(e=e||"").trim(),iS=function(e=[]){return typeof e=="string"?function(r){let n=r.split(/\r?\n/),a=[];n.forEach(o=>{if(!o.trim()||nS.test(o))return;let s=(u=>{const l=/^( {2}|\t)/;let c=0;for(;l.test(u);)u=u.replace(l,""),c+=1;return c})(o);a.push({indent:s,node:aS(o)})});let i=function(o){let s={children:[]};return o.forEach((u,l)=>{u.indent===0?s.children=s.children.concat(u.node):o[l-1]&&function(c,f){let m=c[f].indent;for(;f>=0;f-=1)if(c[f].indent<m)return c[f];return c[0]}(o,l).node.children.push(u.node)}),s}(a);return i=Ya(i),i}(e):rd(e)?function(r){let n={};r.forEach(i=>{n[i.id]=i});let a=Ya({});return r.forEach(i=>{if((i=Ya(i)).parent)if(n.hasOwnProperty(i.parent)){let o=n[i.parent];delete i.parent,o.children.push(i)}else console.warn(`[Grad] - missing node '${i.parent}'`);else a.children.push(i)}),a}(e):(Ea(t=e).forEach(Ya),t);var t},oS=e=>"\x1B[31m"+e+"\x1B[0m",sS=e=>"\x1B[2m"+e+"\x1B[0m",Vf=function(e,t){let r="-> ";t&&(r=sS("→ "));let n="";return Ea(e).forEach((a,i)=>{let o=a.id||"";if(t&&(o=oS(o)),i===0&&!a.id)return;let s=a._cache.parents.length;n+=" ".repeat(s)+r+o+`
|
|
11
|
-
`}),n},Ih=function(e){let t=Ea(e);t.forEach(n=>{delete(n=Object.assign({},n)).children});let r=t[0];return r&&!r.id&&Object.keys(r.props).length===0&&t.shift(),t},zh={text:Vf,txt:Vf,array:Ih,flat:Ih},jh=function(e,t){return t==="nested"||t==="json"?e:t==="debug"?(console.log(Vf(e,!0)),null):zh.hasOwnProperty(t)?zh[t](e):e},Lc=e=>{Ea(e,(t,r)=>{t.id&&(t._cache.parents=t._cache.parents||[],r._cache.parents=t._cache.parents.concat([t.id]))})},uS=(e,t)=>(Object.keys(t).forEach(r=>{if(t[r]instanceof Set){let n=e[r]||new Set;e[r]=new Set([...n,...t[r]])}else if((n=>n&&typeof n=="object"&&!Array.isArray(n))(t[r])){let n=e[r]||{};e[r]=Object.assign({},t[r],n)}else rd(t[r])?e[r]=t[r].concat(e[r]||[]):e[r]===void 0&&(e[r]=t[r])}),e),lS=/\//;let cS=class hl{constructor(t={}){Object.defineProperty(this,"json",{enumerable:!1,value:t,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(t={}){let r=this.json.props||{};return typeof t=="string"&&(r[t]=!0),this.json.props=Object.assign(r,t),this}get(t){if(t=fu(t),!lS.test(t)){let n=this.json.children.find(a=>a.id===t);return new hl(n)}let r=((n,a)=>{let i=(o=>typeof o!="string"?o:(o=o.replace(/^\//,"")).split(/\//))(a=a||"");for(let o=0;o<i.length;o+=1){let s=n.children.find(u=>u.id===i[o]);if(!s)return null;n=s}return n})(this.json,t)||Ya({});return new hl(r)}add(t,r={}){if(rd(t))return t.forEach(a=>this.add(fu(a),r)),this;t=fu(t);let n=Ya({id:t,props:r});return this.json.children.push(n),new hl(n)}remove(t){return t=fu(t),this.json.children=this.json.children.filter(r=>r.id!==t),this}nodes(){return Ea(this.json).map(t=>(delete(t=Object.assign({},t)).children,t))}cache(){return(t=>{let r=Ea(t,(a,i)=>{a.id&&(a._cache.parents=a._cache.parents||[],a._cache.children=a._cache.children||[],i._cache.parents=a._cache.parents.concat([a.id]))}),n={};r.forEach(a=>{a.id&&(n[a.id]=a)}),r.forEach(a=>{a._cache.parents.forEach(i=>{n.hasOwnProperty(i)&&n[i]._cache.children.push(a.id)})}),t._cache.children=Object.keys(n)})(this.json),this}list(){return Ea(this.json)}fillDown(){var t;return t=this.json,Ea(t,(r,n)=>{n.props=uS(n.props,r.props)}),this}depth(){Lc(this.json);let t=Ea(this.json),r=t.length>1?1:0;return t.forEach(n=>{if(n._cache.parents.length===0)return;let a=n._cache.parents.length+1;a>r&&(r=a)}),r}out(t){return Lc(this.json),jh(this.json,t)}debug(){return Lc(this.json),jh(this.json,"debug"),this}};const nw=function(e){let t=iS(e);return new cS(t)};nw.prototype.plugin=function(e){e(this)};const uo={Noun:"blue",Verb:"green",Negative:"green",Date:"red",Value:"red",Adjective:"magenta",Preposition:"cyan",Conjunction:"cyan",Determiner:"cyan",Hyphenated:"cyan",Adverb:"cyan"},fS=function(e){if(uo.hasOwnProperty(e.id))return uo[e.id];if(uo.hasOwnProperty(e.is))return uo[e.is];let t=e._cache.parents.find(r=>uo[r]);return uo[t]},mS=function(e){const t={};return e.forEach(r=>{let{not:n,also:a,is:i,novel:o}=r.props,s=r._cache.parents;a&&(s=s.concat(a)),t[r.id]={is:i,not:n,novel:o,also:a,parents:s,children:r._cache.children,color:fS(r)}}),Object.keys(t).forEach(r=>{let n=new Set(t[r].not);t[r].not.forEach(a=>{t[a]&&t[a].children.forEach(i=>n.add(i))}),t[r].not=Array.from(n)}),t},qh=function(e){return e?typeof e=="string"?[e]:e:[]},dS=function(e,t){return Object.keys(e).forEach(r=>{e[r].isA&&(e[r].is=e[r].isA),e[r].notA&&(e[r].not=e[r].notA),e[r].is&&typeof e[r].is=="string"&&!t.hasOwnProperty(e[r].is)&&!e.hasOwnProperty(e[r].is)&&(e[e[r].is]={}),e[r].not&&typeof e[r].not=="string"&&!e.hasOwnProperty(e[r].not)&&!t.hasOwnProperty(e[r].not)&&!e.hasOwnProperty(e[r].not)&&(e[e[r].not]={})}),e},hS=function(e,t){return e=dS(e,t),Object.keys(e).forEach(r=>{e[r].children=qh(e[r].children),e[r].not=qh(e[r].not)}),Object.keys(e).forEach(r=>{(e[r].not||[]).forEach(a=>{e[a]&&e[a].not&&e[a].not.push(r)})}),e},pS=function(e){const t=Object.keys(e).map(n=>{let a=e[n];const i={not:new Set(a.not),also:a.also,is:a.is,novel:a.novel};return{id:n,parent:a.is,props:i,children:[]}});return nw(t).cache().fillDown().out("array")},gS=function(e){return Object.keys(e).forEach(t=>{e[t]=Object.assign({},e[t]),e[t].novel=!0}),e},vS=function(e,t){Object.keys(t).length>0&&(e=gS(e)),e=hS(e,t);let r=Object.assign({},t,e);const n=pS(r);return mS(n)},yS={one:{setTag:rw,unTag:tS,addTags:vS,canBe:rS}},Rh=function(e){return Object.prototype.toString.call(e)==="[object Array]"},bS={tag:function(e,t="",r){if(!this.found||!e)return this;let n=this.termList();if(n.length===0)return this;const{methods:a,verbose:i,world:o}=this;return i===!0&&console.log(" + ",e,t||""),Rh(e)?e.forEach(s=>a.one.setTag(n,s,o,r,t)):a.one.setTag(n,e,o,r,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 r=this.termList();if(r.length===0)return this;const{methods:n,verbose:a,model:i}=this;a===!0&&console.log(" - ",e,t||"");let o=i.one.tagSet;return Rh(e)?e.forEach(s=>n.one.unTag(r,s,o)):n.one.unTag(r,e,o),this.uncache(),this},canBe:function(e){e=e.replace(/^#/,"");let t=this.model.one.tagSet,r=this.methods.one.canBe,n=[];this.document.forEach((i,o)=>{i.forEach((s,u)=>{r(s,e,t)||n.push([o,u,u+1])})});let a=this.update(n);return this.difference(a)}},wS=function(e){Object.assign(e.prototype,bS)},xS=function(e){const{model:t,methods:r}=this.world(),n=t.one.tagSet,a=r.one.addTags;let i=a(e,n);return t.one.tagSet=i,this},DS={addTags:xS},Lh=new Set(["Auxiliary","Possessive"]),NS=function(e,t){return e=e.sort((r,n)=>{if(Lh.has(r)||!t.hasOwnProperty(n))return 1;if(Lh.has(n)||!t.hasOwnProperty(r))return-1;let a=t[r].children||[],i=a.length;a=t[n].children||[];let o=a.length;return i-o}),e},AS=function(e){const{document:t,world:r}=e,n=r.model.one.tagSet;t.forEach(a=>{a.forEach(i=>{let o=Array.from(i.tags);i.tagRank=NS(o,n)})})},CS={model:{one:{tagSet:{}}},compute:{tagRank:AS},methods:yS,api:wS,lib:DS},ES=/([.!?\u203D\u2E18\u203C\u2047-\u2049\u3002]+\s)/g,SS=/^[.!?\u203D\u2E18\u203C\u2047-\u2049\u3002]+\s$/,MS=/((?:\r?\n|\r)+)/,TS=function(e){let t=[],r=e.split(MS);for(let n=0;n<r.length;n++){let a=r[n].split(ES);for(let i=0;i<a.length;i++)a[i+1]&&SS.test(a[i+1])===!0&&(a[i]+=a[i+1],a[i+1]=""),a[i]!==""&&t.push(a[i])}return t},FS=/[a-z0-9\u00C0-\u00FF\u00a9\u00ae\u2000-\u3300\ud000-\udfff]/i,PS=/\S/,kS=function(e){let t=[];for(let r=0;r<e.length;r++){let n=e[r];if(!(n===void 0||n==="")){if(PS.test(n)===!1||FS.test(n)===!1){if(t[t.length-1]){t[t.length-1]+=n;continue}else if(e[r+1]){e[r+1]=n+e[r+1];continue}}t.push(n)}}return t},OS=function(e,t){const r=t.methods.one.tokenize.isSentence,n=t.model.one.abbreviations||new Set;let a=[];for(let i=0;i<e.length;i++){let o=e[i];e[i+1]&&r(o,n)===!1?e[i+1]=o+(e[i+1]||""):o&&o.length>0&&(a.push(o),e[i]="")}return a},Hh=280,aw={'"':'"',""":""","“":"”","‟":"”","„":"”","⹂":"”","‚":"’","«":"»","‹":"›","‵":"′","‶":"″","‷":"‴","〝":"〞","〟":"〞"},$S=RegExp("["+Object.keys(aw).join("")+"]","g"),_S=RegExp("["+Object.values(aw).join("")+"]","g"),Gh=function(e){if(!e)return!1;let t=e.match(_S);return t!==null&&t.length===1},BS=function(e){let t=[];for(let r=0;r<e.length;r+=1){let a=e[r].match($S);if(a!==null&&a.length===1){if(Gh(e[r+1])&&e[r+1].length<Hh){e[r]+=e[r+1],t.push(e[r]),e[r+1]="",r+=1;continue}if(Gh(e[r+2])){let i=e[r+1]+e[r+2];if(i.length<Hh){e[r]+=i,t.push(e[r]),e[r+1]="",e[r+2]="",r+=2;continue}}}t.push(e[r])}return t},IS=250,Vh=/\(/g,zS=/\)/g,jS=function(e){let t=[];for(let r=0;r<e.length;r+=1){let a=e[r].match(Vh);if(a!==null&&a.length===1&&e[r+1]&&e[r+1].length<IS&&e[r+1].match(zS)!==null&&a.length===1&&!Vh.test(e[r+1])){e[r]+=e[r+1],t.push(e[r]),e[r+1]="",r+=1;continue}t.push(e[r])}return t},qS=/\S/,Uh=/^\s+/,RS=function(e,t){if(e=e||"",e=String(e),!e||typeof e!="string"||qS.test(e)===!1)return[];e=e.replace(" "," ");let r=TS(e),n=kS(r);if(n=OS(n,t),n=BS(n),n=jS(n),n.length===0)return[e];for(let a=1;a<n.length;a+=1){let i=n[a].match(Uh);i!==null&&(n[a-1]+=i[0],n[a]=n[a].replace(Uh,""))}return n},LS=function(e,t){let r=e.split(/[-–—]/);if(r.length<=1)return!1;const{prefixes:n,suffixes:a}=t.one;return r[0].length===1&&/[a-z]/i.test(r[0])||n.hasOwnProperty(r[0])||(r[1]=r[1].trim().replace(/[.?!]$/,""),a.hasOwnProperty(r[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},HS=function(e){let t=[];const r=e.split(/[-–—]/);let n="-",a=e.match(/[-–—]/);a&&a[0]&&(n=a);for(let i=0;i<r.length;i++)i===r.length-1?t.push(r[i]):t.push(r[i]+n);return t},GS=function(e){const t=/^[0-9]{1,4}(:[0-9][0-9])?([a-z]{1,2})? ?[-–—] ?$/,r=/^[0-9]{1,4}([a-z]{1,2})? ?$/;for(let n=0;n<e.length-1;n+=1)e[n+1]&&t.test(e[n])&&r.test(e[n+1])&&(e[n]=e[n]+e[n+1],e[n+1]=null);return e},VS=new RegExp("\\p{L} ?\\/ ?\\p{L}+$","u"),US=function(e){for(let t=1;t<e.length-1;t++)VS.test(e[t])&&(e[t-1]+=e[t]+e[t+1],e[t]=null,e[t+1]=null);return e},WS=/\S/,JS=/^[!?.]+$/,KS=/(\S+)/;let Uf=[".","?","!",":",";","-","–","—","--","...","(",")","[","]",'"',"'","`","«","»","*","•"];Uf=Uf.reduce((e,t)=>(e[t]=!0,e),{});const YS=function(e){return Object.prototype.toString.call(e)==="[object Array]"},ZS=function(e,t){let r=[],n=[];if(e=e||"",typeof e=="number"&&(e=String(e)),YS(e))return e;const a=e.split(KS);for(let o=0;o<a.length;o++){if(LS(a[o],t)===!0){n=n.concat(HS(a[o]));continue}n.push(a[o])}let i="";for(let o=0;o<n.length;o++){let s=n[o];WS.test(s)===!0&&Uf.hasOwnProperty(s)===!1&&JS.test(s)===!1?(r.length>0?(r[r.length-1]+=i,r.push(s)):r.push(i+s),i=""):i+=s}return i&&(r.length===0&&(r[0]=""),r[r.length-1]+=i),r=US(r),r=GS(r),r=r.filter(o=>o),r},Wh=new RegExp("\\p{Letter}","u"),mu=/[\p{Number}\p{Currency_Symbol}]/u,QS=/^[a-z]\.([a-z]\.)+/i,XS=/[sn]['’]$/,e4=function(e,t){let{prePunctuation:r,postPunctuation:n,emoticons:a}=t.one,i=e,o="",s="",u=Array.from(e);if(a.hasOwnProperty(e.trim()))return{str:e.trim(),pre:o,post:" "};let l=u.length;for(let c=0;c<l;c+=1){let f=u[0];if(r[f]!==!0){if((f==="+"||f==="-")&&mu.test(u[1])||f==="'"&&f.length===3&&mu.test(u[1])||Wh.test(f)||mu.test(f))break;o+=u.shift()}}l=u.length;for(let c=0;c<l;c+=1){let f=u[u.length-1];if(n[f]!==!0){if(Wh.test(f)||mu.test(f))break;f==="."&&QS.test(i)===!0||f==="'"&&XS.test(i)===!0||(s=u.pop()+s)}}return e=u.join(""),e===""&&(i=i.replace(/ *$/,c=>(s=c||"","")),e=i,o=""),{str:e,pre:o,post:s}},t4=(e,t)=>{let{str:r,pre:n,post:a}=e4(e,t);return{text:r,pre:n,post:a,tags:new Set}},r4=function(e,t){const r=t.model.one.unicode||{};e=e||"";let n=e.split("");return n.forEach((a,i)=>{r[a]&&(n[i]=r[a])}),n.join("")},n4=function(e){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},a4=/([A-Z]\.)+[A-Z]?,?$/,i4=/^[A-Z]\.,?$/,o4=/[A-Z]{2,}('s|,)?$/,s4=/([a-z]\.)+[a-z]\.?$/,u4=function(e){return a4.test(e)===!0||s4.test(e)===!0||i4.test(e)===!0||o4.test(e)===!0},l4=function(e){return u4(e)&&(e=e.replace(/\./g,"")),e},iw=function(e,t){const r=t.methods.one.killUnicode;let n=e.text||"";n=n4(n),n=r(n,t),n=l4(n),e.normal=n},c4=function(e,t){const{methods:r,model:n}=t,{splitSentences:a,splitTerms:i,splitWhitespace:o}=r.one.tokenize;return e=e||"",e=a(e,t).map(u=>{let l=i(u,n);return l=l.map(c=>o(c,n)),l.forEach(c=>{iw(c,t)}),l}),e},f4=/[ .][A-Z]\.? *$/i,m4=/(?:\u2026|\.{2,}) *$/,d4=new RegExp("\\p{L}","u"),h4=/\. *$/,p4=/^[A-Z]\. $/,g4=function(e,t){if(d4.test(e)===!1||f4.test(e)===!0||e.length===3&&p4.test(e)||m4.test(e)===!0)return!1;let n=e.replace(/[.!?\u203D\u2E18\u203C\u2047-\u2049] *$/,"").split(" "),a=n[n.length-1].toLowerCase();return!(t.hasOwnProperty(a)===!0&&h4.test(e)===!0)},v4={one:{killUnicode:r4,tokenize:{splitSentences:RS,isSentence:g4,splitTerms:ZS,splitWhitespace:t4,fromString:c4}}},y4={"&":"and","@":"at","%":"percent",plz:"please",bein:"being"},b4=["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"],w4=["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"],x4=["jan","feb","mar","apr","jun","jul","aug","sep","sept","oct","nov","dec"],D4=["ad","al","arc","ba","bl","ca","cca","col","corp","ft","fy","ie","lit","ma","md","pd","tce"],N4=["dept","univ","assn","bros","inc","ltd","co"],A4=["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"],C4=["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"];let E4=[[b4],[C4,"Unit"],[D4,"Noun"],[w4,"Honorific"],[x4,"Month"],[N4,"Organization"],[A4,"Place"]],ow={},pl={};E4.forEach(e=>{e[0].forEach(t=>{ow[t]=!0,pl[t]="Abbreviation",e[1]!==void 0&&(pl[t]=[pl[t],e[1]])})});const S4=["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"].reduce((e,t)=>(e[t]=!0,e),{}),M4={like:!0,ish:!0,less:!0,able:!0,elect:!0,type:!0,designate:!0};let Jh={"!":"¡","?":"¿Ɂ",'"':'“”"❝❞',"'":"‘‛❛❜’","-":"—–",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:"ŹźŻżŽžƵƶȤȥɀΖ"},sw={};Object.keys(Jh).forEach(function(e){Jh[e].split("").forEach(function(t){sw[t]=e})});const T4={"#":!0,"@":!0,_:!0,"°":!0,"":!0,"":!0,"":!0,"\uFEFF":!0},F4={"%":!0,_:!0,"°":!0,"":!0,"":!0,"":!0,"\uFEFF":!0},P4={"<3":!0,"</3":!0,"<\\3":!0,":^P":!0,":^p":!0,":^O":!0,":^3":!0},k4={one:{aliases:y4,abbreviations:ow,prefixes:S4,suffixes:M4,prePunctuation:T4,postPunctuation:F4,lexicon:pl,unicode:sw,emoticons:P4}},Kh=/\//,O4=/[a-z]\.[a-z]/i,$4=/[0-9]/,_4=function(e,t){let r=e.normal||e.text||e.machine;const n=t.model.one.aliases;if(n.hasOwnProperty(r)&&(e.alias=e.alias||[],e.alias.push(n[r])),Kh.test(r)&&!O4.test(r)&&!$4.test(r)){let a=r.split(Kh);a.length<=3&&a.forEach(i=>{i=i.trim(),i!==""&&(e.alias=e.alias||[],e.alias.push(i))})}return e},B4=new RegExp("^\\p{Letter}+-\\p{Letter}+$","u"),I4=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"),B4.test(t)&&(t=t.replace(/-/g,"")),t=t.replace(/^[#@]/,""),t!==e.normal&&(e.machine=t)},z4=function(e){let t=e.docs,r={};for(let n=0;n<t.length;n+=1)for(let a=0;a<t[n].length;a+=1){let i=t[n][a],o=i.machine||i.normal;r[o]=r[o]||0,r[o]+=1}for(let n=0;n<t.length;n+=1)for(let a=0;a<t[n].length;a+=1){let i=t[n][a],o=i.machine||i.normal;i.freq=r[o]}},j4=function(e){let t=0,r=0,n=e.document;for(let a=0;a<n.length;a+=1)for(let i=0;i<n[a].length;i+=1){let o=n[a][i];o.offset={index:r,start:t+o.pre.length,length:o.text.length},t+=o.pre.length+o.text.length+o.post.length,r+=1}},q4=function(e){let t=e.document;for(let r=0;r<t.length;r+=1)for(let n=0;n<t[r].length;n+=1)t[r][n].index=[r,n]},R4=function(e){let t=0,r=e.docs;for(let n=0;n<r.length;n+=1)for(let a=0;a<r[n].length;a+=1)r[n][a].normal!==""&&(t+=1,r[n][a].wordCount=t)},Hc=function(e,t){let r=e.docs;for(let n=0;n<r.length;n+=1)for(let a=0;a<r[n].length;a+=1)t(r[n][a],e.world)},L4={alias:e=>Hc(e,_4),machine:e=>Hc(e,I4),normal:e=>Hc(e,iw),freq:z4,offset:j4,index:q4,wordCount:R4},H4={compute:L4,methods:v4,model:k4,hooks:["alias","machine","index","id"]},G4=function(e){const t=e.model.one.typeahead,r=e.docs;if(r.length===0||Object.keys(t).length===0)return;let n=r[r.length-1]||[],a=n[n.length-1];if(!a.post&&t.hasOwnProperty(a.normal)){let i=t[a.normal];a.implicit=i,a.machine=i,a.typeahead=!0,e.compute.preTagger&&e.last().unTag("*").compute(["lexicon","preTagger"])}},V4={typeahead:G4},U4=function(){const e=this.docs;if(e.length===0)return this;let t=e[e.length-1]||[],r=t[t.length-1];return r.typeahead===!0&&r.machine&&(r.text=r.machine,r.normal=r.machine),this},W4=function(e){e.prototype.autoFill=U4},J4=function(e,t,r){let n={},a=[],i=r.prefixes||{};return e.forEach(o=>{o=o.toLowerCase().trim();let s=o.length;t.max&&s>t.max&&(s=t.max);for(let u=t.min;u<s;u+=1){let l=o.substring(0,u);if(!(t.safe&&r.model.one.lexicon.hasOwnProperty(l))){if(i.hasOwnProperty(l)===!0){a.push(l);continue}if(n.hasOwnProperty(l)===!0){a.push(l);continue}n[l]=o}}}),n=Object.assign({},i,n),a.forEach(o=>{delete n[o]}),n},K4=e=>Object.prototype.toString.call(e)==="[object Object]",Y4={safe:!0,min:3},Z4=function(e=[],t={}){let r=this.model();t=Object.assign({},Y4,t),K4(e)&&(Object.assign(r.one.lexicon,e),e=Object.keys(e));let n=J4(e,t,this.world());return Object.keys(n).forEach(a=>{if(r.one.typeahead.hasOwnProperty(a)){delete r.one.typeahead[a];return}r.one.typeahead[a]=n[a]}),this},Q4={typeahead:Z4},X4={one:{typeahead:{}}},eM={model:X4,api:W4,lib:Q4,compute:V4,hooks:["typeahead"]};tt.extend(HA);tt.extend(xE);tt.extend(RC);tt.extend(BE);tt.extend(CS);tt.plugin(p3);tt.extend(H4);tt.extend(y3);tt.plugin(nA);tt.extend(I3);tt.extend(eM);tt.extend(T3);tt.extend(ZE);const uw={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"},Yh={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;aDha4HrC;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,lBV;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"},_i=36,Wf="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",Zh=Wf.split("").reduce(function(e,t,r){return e[t]=r,e},{}),tM=function(e){if(Wf[e]!==void 0)return Wf[e];let t=1,r=_i,n="";for(;e>=r;e-=r,t++,r*=_i);for(;t--;){const a=e%_i;n=String.fromCharCode((a<10?48:55)+a)+n,e=(e-a)/_i}return n},rM=function(e){if(Zh[e]!==void 0)return Zh[e];let t=0,r=1,n=_i,a=1;for(;r<e.length;t+=n,r++,n*=_i);for(let i=e.length-1;i>=0;i--,a*=_i){let o=e.charCodeAt(i)-48;o>10&&(o-=7),t+=o*a}return t},Jf={toAlphaCode:tM,fromAlphaCode:rM},nM=function(e){const t=new RegExp("([0-9A-Z]+):([0-9A-Z]+)");for(let r=0;r<e.nodes.length;r++){const n=t.exec(e.nodes[r]);if(!n){e.symCount=r;break}e.syms[Jf.fromAlphaCode(n[1])]=Jf.fromAlphaCode(n[2])}e.nodes=e.nodes.slice(e.symCount,e.nodes.length)},aM=function(e,t,r){const n=Jf.fromAlphaCode(t);return n<e.symCount?e.syms[n]:r+n+1-e.symCount},iM=function(e){const t=[],r=(n,a)=>{let i=e.nodes[n];i[0]==="!"&&(t.push(a),i=i.slice(1));const o=i.split(/([A-Z0-9,]+)/g);for(let s=0;s<o.length;s+=2){const u=o[s],l=o[s+1];if(!u)continue;const c=a+u;if(l===","||l===void 0){t.push(c);continue}const f=aM(e,l,n);r(f,c)}};return r(0,""),t},oM=function(e){const t={nodes:e.split(";"),syms:[],symCount:0};return e.match(":")&&nM(t),iM(t)},sM=function(e){if(!e)return{};const t=e.split("|").reduce((n,a)=>{const i=a.split("¦");return n[i[0]]=i[1],n},{}),r={};return Object.keys(t).forEach(function(n){const a=oM(t[n]);n==="true"&&(n=!0);for(let i=0;i<a.length;i++){const o=a[i];r.hasOwnProperty(o)===!0?Array.isArray(r[o])===!1?r[o]=[r[o],n]:r[o].push(n):r[o]=n}}),r},kn=["Possessive","Pronoun"];let uM={"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:kn,his:kn,hers:kn,their:kn,theirs:kn,themselves:kn,your:kn,our:kn,ours:kn,my:kn,its:kn,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"]};const lM={"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"},cM=[":(",":)",":P",":p",":O",";(",";)",";P",";p",";O",":3",":|",":/",":\\",":$",":*",":@",":-(",":-)",":-P",":-p",":-O",":-3",":-|",":-/",":-\\",":-$",":-*",":-@",":^(",":^)",":^P",":^p",":^O",":^3",":^|",":^/",":^\\",":^$",":^*",":^@","):","(:","$:","*:",")-:","(-:","$-:","*-:",")^:","(^:","$^:","*^:","<3","</3","<\\3","=("],du={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"]]},fM=/([xsz]|ch|sh)$/,mM=function(e){let t=e[e.length-1];if(du.hasOwnProperty(t)===!0)for(let r=0;r<du[t].length;r+=1){let n=du[t][r][0];if(n.test(e)===!0)return e.replace(n,du[t][r][1])}return null},uc=function(e="",t){let{irregularPlurals:r,uncountable:n}=t.two;if(n.hasOwnProperty(e))return e;if(r.hasOwnProperty(e))return r[e];let a=mM(e);return a!==null?a:fM.test(e)?e+"es":e+"s"},dM=/\|/;let Jo=uM,Kf={};const hM={two:{irregularPlurals:uw,uncountable:{}}};Object.keys(Yh).forEach(e=>{let t=sM(Yh[e]);if(!dM.test(e)){Object.keys(t).forEach(r=>{Jo[r]=e});return}Object.keys(t).forEach(r=>{if(Kf[r]=e,e==="Noun|Verb"){let n=uc(r,hM);Kf[n]="Plural|Verb"}})});cM.forEach(e=>Jo[e]="Emoticon");delete Jo[""];delete Jo[null];delete Jo[" "];const pe="Singular",Ht={beforeTags:{Determiner:pe,Possessive:pe,Acronym:pe,Noun:pe,Adjective:pe,PresentTense:pe,Gerund:pe,PastTense:pe,Infinitive:pe,Date:pe,Ordinal:pe,Demonym:pe},afterTags:{Value:pe,Modal:pe,Copula:pe,PresentTense:pe,PastTense:pe,Demonym:pe,Actor:pe},beforeWords:{the:pe,with:pe,without:pe,of:pe,for:pe,any:pe,all:pe,on:pe,cut:pe,cuts:pe,increase:pe,decrease:pe,raise:pe,drop:pe,save:pe,saved:pe,saves:pe,make:pe,makes:pe,made:pe,minus:pe,plus:pe,than:pe,another:pe,versus:pe,neither:pe,about:pe,favorite:pe,best:pe,daily:pe,weekly:pe,linear:pe,binary:pe,mobile:pe,lexical:pe,technical:pe,computer:pe,scientific:pe,security:pe,government:pe,popular:pe,formal:pe,no:pe,more:pe,one:pe,let:pe,her:pe,his:pe,their:pe,our:pe,us:pe,sheer:pe,monthly:pe,yearly:pe,current:pe,previous:pe,upcoming:pe,last:pe,next:pe,main:pe,initial:pe,final:pe,beginning:pe,end:pe,top:pe,bottom:pe,future:pe,past:pe,major:pe,minor:pe,side:pe,central:pe,peripheral:pe,public:pe,private:pe},afterWords:{of:pe,system:pe,aid:pe,method:pe,utility:pe,tool:pe,reform:pe,therapy:pe,philosophy:pe,room:pe,authority:pe,says:pe,said:pe,wants:pe,wanted:pe,is:pe,did:pe,do:pe,can:pe,wise:pe}},Ae="Infinitive",kr={beforeTags:{Modal:Ae,Adverb:Ae,Negative:Ae,Plural:Ae},afterTags:{Determiner:Ae,Adverb:Ae,Possessive:Ae,Reflexive:Ae,Preposition:Ae,Cardinal:Ae,Comparative:Ae,Superlative:Ae},beforeWords:{i:Ae,we:Ae,you:Ae,they:Ae,to:Ae,please:Ae,will:Ae,have:Ae,had:Ae,would:Ae,could:Ae,should:Ae,do:Ae,did:Ae,does:Ae,can:Ae,must:Ae,us:Ae,me:Ae,let:Ae,even:Ae,when:Ae,help:Ae,he:Ae,she:Ae,it:Ae,being:Ae,bi:Ae,co:Ae,contra:Ae,de:Ae,inter:Ae,intra:Ae,mis:Ae,pre:Ae,out:Ae,counter:Ae,nobody:Ae,somebody:Ae,anybody:Ae,everybody:Ae},afterWords:{the:Ae,me:Ae,you:Ae,him:Ae,us:Ae,her:Ae,his:Ae,them:Ae,they:Ae,it:Ae,himself:Ae,herself:Ae,itself:Ae,myself:Ae,ourselves:Ae,themselves:Ae,something:Ae,anything:Ae,a:Ae,an:Ae,up:Ae,down:Ae,by:Ae,out:Ae,off:Ae,under:Ae,what:Ae,all:Ae,to:Ae,because:Ae,although:Ae,how:Ae,otherwise:Ae,together:Ae,though:Ae,into:Ae,yet:Ae,more:Ae,here:Ae,there:Ae,away:Ae}},pM={beforeTags:Object.assign({},kr.beforeTags,Ht.beforeTags,{}),afterTags:Object.assign({},kr.afterTags,Ht.afterTags,{}),beforeWords:Object.assign({},kr.beforeWords,Ht.beforeWords,{}),afterWords:Object.assign({},kr.afterWords,Ht.afterWords,{})},Fe="Adjective",er={beforeTags:{Determiner:Fe,Possessive:Fe,Hyphenated:Fe},afterTags:{Adjective:Fe},beforeWords:{seem:Fe,seemed:Fe,seems:Fe,feel:Fe,feels:Fe,felt:Fe,stay:Fe,appear:Fe,appears:Fe,appeared:Fe,also:Fe,over:Fe,under:Fe,too:Fe,it:Fe,but:Fe,still:Fe,really:Fe,quite:Fe,well:Fe,very:Fe,truly:Fe,how:Fe,deeply:Fe,hella:Fe,profoundly:Fe,extremely:Fe,so:Fe,badly:Fe,mostly:Fe,totally:Fe,awfully:Fe,rather:Fe,nothing:Fe,something:Fe,anything:Fe,not:Fe,me:Fe,is:Fe,face:Fe,faces:Fe,faced:Fe,look:Fe,looks:Fe,looked:Fe,reveal:Fe,reveals:Fe,revealed:Fe,sound:Fe,sounded:Fe,sounds:Fe,remains:Fe,remained:Fe,prove:Fe,proves:Fe,proved:Fe,becomes:Fe,stays:Fe,tastes:Fe,taste:Fe,smells:Fe,smell:Fe,gets:Fe,grows:Fe,as:Fe,rings:Fe,radiates:Fe,conveys:Fe,convey:Fe,conveyed:Fe,of:Fe},afterWords:{too:Fe,also:Fe,or:Fe,enough:Fe,as:Fe}},Ge="Gerund",Za={beforeTags:{Adverb:Ge,Preposition:Ge,Conjunction:Ge},afterTags:{Adverb:Ge,Possessive:Ge,Person:Ge,Pronoun:Ge,Determiner:Ge,Copula:Ge,Preposition:Ge,Conjunction:Ge,Comparative:Ge},beforeWords:{been:Ge,keep:Ge,continue:Ge,stop:Ge,am:Ge,be:Ge,me:Ge,began:Ge,start:Ge,starts:Ge,started:Ge,stops:Ge,stopped:Ge,help:Ge,helps:Ge,avoid:Ge,avoids:Ge,love:Ge,loves:Ge,loved:Ge,hate:Ge,hates:Ge,hated:Ge},afterWords:{you:Ge,me:Ge,her:Ge,him:Ge,his:Ge,them:Ge,their:Ge,it:Ge,this:Ge,there:Ge,on:Ge,about:Ge,for:Ge,up:Ge,down:Ge}},vt="Gerund",Ra="Adjective",gM={beforeTags:Object.assign({},er.beforeTags,Za.beforeTags,{Imperative:vt,Infinitive:Ra,Plural:vt}),afterTags:Object.assign({},er.afterTags,Za.afterTags,{Noun:Ra}),beforeWords:Object.assign({},er.beforeWords,Za.beforeWords,{is:Ra,are:vt,was:Ra,of:Ra,suggest:vt,suggests:vt,suggested:vt,recommend:vt,recommends:vt,recommended:vt,imagine:vt,imagines:vt,imagined:vt,consider:vt,considered:vt,considering:vt,resist:vt,resists:vt,resisted:vt,avoid:vt,avoided:vt,avoiding:vt,except:Ra,accept:Ra,assess:vt,explore:vt,fear:vt,fears:vt,appreciate:vt,question:vt,help:vt,embrace:vt,with:Ra}),afterWords:Object.assign({},er.afterWords,Za.afterWords,{to:vt,not:vt,the:vt})},Qh={beforeTags:{Determiner:void 0,Cardinal:"Noun",PhrasalVerb:"Adjective"},afterTags:{}},vM={beforeTags:Object.assign({},er.beforeTags,Ht.beforeTags,Qh.beforeTags),afterTags:Object.assign({},er.afterTags,Ht.afterTags,Qh.afterTags),beforeWords:Object.assign({},er.beforeWords,Ht.beforeWords,{are:"Adjective",is:"Adjective",was:"Adjective",be:"Adjective",off:"Adjective",out:"Adjective"}),afterWords:Object.assign({},er.afterWords,Ht.afterWords)};let et="PastTense",ms="Adjective";const hu={beforeTags:{Adverb:et,Pronoun:et,ProperNoun:et,Auxiliary:et,Noun:et},afterTags:{Possessive:et,Pronoun:et,Determiner:et,Adverb:et,Comparative:et,Date:et,Gerund:et},beforeWords:{be:et,who:et,get:ms,had:et,has:et,have:et,been:et,it:et,as:et,for:ms,more:ms,always:ms},afterWords:{by:et,back:et,out:et,in:et,up:et,down:et,before:et,after:et,for:et,the:et,with:et,as:et,on:et,at:et,between:et,to:et,into:et,us:et,them:et,his:et,her:et,their:et,our:et,me:et,about:ms}},yM={beforeTags:Object.assign({},er.beforeTags,hu.beforeTags),afterTags:Object.assign({},er.afterTags,hu.afterTags),beforeWords:Object.assign({},er.beforeWords,hu.beforeWords),afterWords:Object.assign({},er.afterWords,hu.afterWords)},bM={afterTags:{Noun:"Adjective",Conjunction:void 0}},wM={beforeTags:Object.assign({},er.beforeTags,kr.beforeTags,{Adverb:void 0,Negative:void 0}),afterTags:Object.assign({},er.afterTags,kr.afterTags,bM.afterTags),beforeWords:Object.assign({},er.beforeWords,kr.beforeWords,{have:void 0,had:void 0,not:void 0,went:"Adjective",goes:"Adjective",got:"Adjective",be:"Adjective"}),afterWords:Object.assign({},er.afterWords,kr.afterWords,{to:void 0,as:"Adjective"})},pu={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"}},xM={beforeTags:Object.assign({},Za.beforeTags,Ht.beforeTags,pu.beforeTags),afterTags:Object.assign({},Za.afterTags,Ht.afterTags,pu.afterTags),beforeWords:Object.assign({},Za.beforeWords,Ht.beforeWords,pu.beforeWords),afterWords:Object.assign({},Za.afterWords,Ht.afterWords,pu.afterWords)},lo="Singular",xi="Infinitive",DM={beforeTags:Object.assign({},kr.beforeTags,Ht.beforeTags,{Adjective:lo,Particle:lo}),afterTags:Object.assign({},kr.afterTags,Ht.afterTags,{ProperNoun:xi,Gerund:xi,Adjective:xi,Copula:lo}),beforeWords:Object.assign({},kr.beforeWords,Ht.beforeWords,{is:lo,was:lo,of:lo,have:null}),afterWords:Object.assign({},kr.afterWords,Ht.afterWords,{instead:xi,about:xi,his:xi,her:xi,to:null,by:null,in:null})},Ct="Person",tr={beforeTags:{Honorific:Ct,Person:Ct},afterTags:{Person:Ct,ProperNoun:Ct,Verb:Ct},beforeWords:{hi:Ct,hey:Ct,yo:Ct,dear:Ct,hello:Ct},afterWords:{said:Ct,says:Ct,told:Ct,tells:Ct,feels:Ct,felt:Ct,seems:Ct,thinks:Ct,thought:Ct,spends:Ct,spendt:Ct,plays:Ct,played:Ct,sing:Ct,sang:Ct,learn:Ct,learned:Ct,wants:Ct,wanted:Ct}},qt="Month",NM="Person",gu={beforeTags:{Date:qt,Value:qt},afterTags:{Date:qt,Value:qt},beforeWords:{by:qt,in:qt,on:qt,during:qt,after:qt,before:qt,between:qt,until:qt,til:qt,sometime:qt,of:qt,this:qt,next:qt,last:qt,previous:qt,following:qt,with:NM},afterWords:{sometime:qt,in:qt,of:qt,until:qt,the:qt}},AM={beforeTags:Object.assign({},tr.beforeTags,gu.beforeTags),afterTags:Object.assign({},tr.afterTags,gu.afterTags),beforeWords:Object.assign({},tr.beforeWords,gu.beforeWords),afterWords:Object.assign({},tr.afterWords,gu.afterWords)},CM={beforeTags:Object.assign({},Ht.beforeTags,tr.beforeTags),afterTags:Object.assign({},Ht.afterTags,tr.afterTags),beforeWords:Object.assign({},Ht.beforeWords,tr.beforeWords,{i:"Infinitive",we:"Infinitive"}),afterWords:Object.assign({},Ht.afterWords,tr.afterWords)},EM={beforeTags:Object.assign({},Ht.beforeTags,tr.beforeTags,kr.beforeTags),afterTags:Object.assign({},Ht.afterTags,tr.afterTags,kr.afterTags),beforeWords:Object.assign({},Ht.beforeWords,tr.beforeWords,kr.beforeWords),afterWords:Object.assign({},Ht.afterWords,tr.afterWords,kr.afterWords)},yr="Place",vu={beforeTags:{Place:yr},afterTags:{Place:yr,Abbreviation:yr},beforeWords:{in:yr,by:yr,near:yr,from:yr,to:yr},afterWords:{in:yr,by:yr,near:yr,from:yr,to:yr,government:yr,council:yr,region:yr,city:yr}},SM={beforeTags:Object.assign({},vu.beforeTags,tr.beforeTags),afterTags:Object.assign({},vu.afterTags,tr.afterTags),beforeWords:Object.assign({},vu.beforeWords,tr.beforeWords),afterWords:Object.assign({},vu.afterWords,tr.afterWords)},MM={beforeTags:Object.assign({},tr.beforeTags,er.beforeTags),afterTags:Object.assign({},tr.afterTags,er.afterTags),beforeWords:Object.assign({},tr.beforeWords,er.beforeWords),afterWords:Object.assign({},tr.afterWords,er.afterWords)};let hn="Unit";const TM={beforeTags:{Value:hn},afterTags:{},beforeWords:{per:hn,every:hn,each:hn,square:hn,cubic:hn,sq:hn,metric:hn},afterWords:{per:hn,squared:hn,cubed:hn,long:hn}},So={"Actor|Verb":pM,"Adj|Gerund":gM,"Adj|Noun":vM,"Adj|Past":yM,"Adj|Present":wM,"Noun|Verb":DM,"Noun|Gerund":xM,"Person|Noun":CM,"Person|Date":AM,"Person|Verb":EM,"Person|Place":SM,"Person|Adj":MM,"Unit|Noun":TM},yu=(e,t)=>{let r=Object.keys(e).reduce((n,a)=>(n[a]=e[a]==="Infinitive"?"PresentTense":"Plural",n),{});return Object.assign(r,t)};So["Plural|Verb"]={beforeWords:yu(So["Noun|Verb"].beforeWords,{had:"Plural",have:"Plural"}),afterWords:yu(So["Noun|Verb"].afterWords,{his:"PresentTense",her:"PresentTense",its:"PresentTense",in:null,to:null,is:"PresentTense",by:"PresentTense"}),beforeTags:yu(So["Noun|Verb"].beforeTags,{Conjunction:"PresentTense",Noun:void 0,ProperNoun:"PresentTense"}),afterTags:yu(So["Noun|Verb"].afterTags,{Gerund:"Plural",Noun:"PresentTense",Value:"PresentTense"})};const wt="Adjective",lr="Infinitive",Di="PresentTense",st="Singular",cr="PastTense",co="Adverb",an="Plural",Vt="Actor",bu="Verb",Sr="Noun",FM="ProperNoun",On="LastName",Xh="Modal",Ft="Place",Gc="Participle",PM=[null,null,{ea:st,ia:Sr,ic:wt,ly:co,"'n":bu,"'t":bu},{oed:cr,ued:cr,xed:cr," so":co,"'ll":Xh,"'re":"Copula",azy:wt,eer:Sr,end:bu,ped:cr,ffy:wt,ify:lr,ing:"Gerund",ize:lr,ibe:lr,lar:wt,mum:wt,nes:Di,nny:wt,ous:wt,que:wt,ger:Sr,ber:Sr,rol:st,sis:st,ogy:st,oid:st,ian:st,zes:Di,eld:cr,ken:Gc,ven:Gc,ten:Gc,ect:lr,ict:lr,ign:lr,oze:lr,ful:wt,bal:wt,ton:Sr,pur:Ft},{amed:cr,aped:cr,ched:cr,lked:cr,rked:cr,reed:cr,nded:cr,mned:wt,cted:cr,dged:cr,ield:st,akis:On,cede:lr,chuk:On,czyk:On,ects:Di,iend:st,ends:bu,enko:On,ette:st,iary:st,wner:st,fies:Di,fore:co,gate:lr,gone:wt,ices:an,ints:an,ruct:lr,ines:an,ions:an,ners:an,pers:an,lers:an,less:wt,llen:wt,made:wt,nsen:On,oses:Di,ould:Xh,some:wt,sson:On,ians:an,tion:st,tage:Sr,ique:st,tive:wt,tors:Sr,vice:st,lier:st,fier:st,wned:cr,gent:st,tist:Vt,pist:Vt,rist:Vt,mist:Vt,yist:Vt,vist:Vt,ists:Vt,lite:st,site:st,rite:st,mite:st,bite:st,mate:st,date:st,ndal:st,vent:st,uist:Vt,gist:Vt,note:st,cide:st,ence:st,wide:wt,vide:lr,ract:lr,duce:lr,pose:lr,eive:lr,lyze:lr,lyse:lr,iant:wt,nary:wt,ghty:wt,uent:wt,erer:Vt,bury:Ft,dorf:Sr,esty:Sr,wych:Ft,dale:Ft,folk:Ft,vale:Ft,abad:Ft,sham:Ft,wick:Ft,view:Ft},{elist:Vt,holic:st,phite:st,tized:cr,urned:cr,eased:cr,ances:an,bound:wt,ettes:an,fully:co,ishes:Di,ities:an,marek:On,nssen:On,ology:Sr,osome:st,tment:st,ports:an,rough:wt,tches:Di,tieth:"Ordinal",tures:an,wards:co,where:co,archy:Sr,pathy:Sr,opoly:Sr,embly:Sr,phate:Sr,ndent:st,scent:st,onist:Vt,anist:Vt,alist:Vt,olist:Vt,icist:Vt,ounce:lr,iable:wt,borne:wt,gnant:wt,inant:wt,igent:wt,atory:wt,rient:st,dient:st,maker:Vt,burgh:Ft,mouth:Ft,ceter:Ft,ville:Ft,hurst:Ft,stead:Ft,endon:Ft,brook:Ft,shire:Ft,worth:Sr,field:FM,ridge:Ft},{auskas:On,parent:st,cedent:st,ionary:st,cklist:st,brooke:Ft,keeper:Vt,logist:Vt,teenth:"Value",worker:Vt,master:Vt,writer:Vt,brough:Ft,cester:Ft,ington:Ft,cliffe:Ft,ingham:Ft},{chester:Ft,logists:Vt,opoulos:On,borough:Ft,sdottir:On}],on="Adjective",Pt="Noun",ds="Verb",kM=[null,null,{},{neo:Pt,bio:Pt,"de-":ds,"re-":ds,"un-":ds,"ex-":Pt},{anti:Pt,auto:Pt,faux:on,hexa:Pt,kilo:Pt,mono:Pt,nano:Pt,octa:Pt,poly:Pt,semi:on,tele:Pt,"pro-":on,"mis-":ds,"dis-":ds,"pre-":on},{anglo:Pt,centi:Pt,ethno:Pt,ferro:Pt,grand:Pt,hepta:Pt,hydro:Pt,intro:Pt,macro:Pt,micro:Pt,milli:Pt,nitro:Pt,penta:Pt,quasi:on,radio:Pt,tetra:Pt,"omni-":on,"post-":on},{pseudo:on,"extra-":on,"hyper-":on,"inter-":on,"intra-":on,"deca-":on},{electro:Pt}],Rt="Adjective",wu="Infinitive",xu="PresentTense",da="Singular",zr="PastTense",ep="Adverb",ha="Expression",tp="Actor",rp="Verb",np="Noun",Du="LastName",OM={a:[[/.[aeiou]na$/,np,"tuna"],[/.[oau][wvl]ska$/,Du],[/.[^aeiou]ica$/,da,"harmonica"],[/^([hyj]a+)+$/,ha,"haha"]],c:[[/.[^aeiou]ic$/,Rt]],d:[[/[aeiou](pp|ll|ss|ff|gg|tt|rr|bb|nn|mm)ed$/,zr,"popped"],[/.[aeo]{2}[bdgmnprvz]ed$/,zr,"rammed"],[/.[aeiou][sg]hed$/,zr,"gushed"],[/.[aeiou]red$/,zr,"hired"],[/.[aeiou]r?ried$/,zr,"hurried"],[/[^aeiou]ard$/,da,"steward"],[/[aeiou][^aeiou]id$/,Rt,""],[/.[vrl]id$/,Rt,"livid"],[/..led$/,zr,"hurled"],[/.[iao]sed$/,zr,""],[/[aeiou]n?[cs]ed$/,zr,""],[/[aeiou][rl]?[mnf]ed$/,zr,""],[/[aeiou][ns]?c?ked$/,zr,"bunked"],[/[aeiou]gned$/,zr],[/[aeiou][nl]?ged$/,zr],[/.[tdbwxyz]ed$/,zr],[/[^aeiou][aeiou][tvx]ed$/,zr],[/.[cdflmnprstv]ied$/,zr,"emptied"]],e:[[/.[lnr]ize$/,wu,"antagonize"],[/.[^aeiou]ise$/,wu,"antagonise"],[/.[aeiou]te$/,wu,"bite"],[/.[^aeiou][ai]ble$/,Rt,"fixable"],[/.[^aeiou]eable$/,Rt,"maleable"],[/.[ts]ive$/,Rt,"festive"],[/[a-z]-like$/,Rt,"woman-like"]],h:[[/.[^aeiouf]ish$/,Rt,"cornish"],[/.v[iy]ch$/,Du,"..ovich"],[/^ug?h+$/,ha,"ughh"],[/^uh[ -]?oh$/,ha,"uhoh"],[/[a-z]-ish$/,Rt,"cartoon-ish"]],i:[[/.[oau][wvl]ski$/,Du,"polish-male"]],k:[[/^(k){2}$/,ha,"kkkk"]],l:[[/.[gl]ial$/,Rt,"familial"],[/.[^aeiou]ful$/,Rt,"fitful"],[/.[nrtumcd]al$/,Rt,"natal"],[/.[^aeiou][ei]al$/,Rt,"familial"]],m:[[/.[^aeiou]ium$/,da,"magnesium"],[/[^aeiou]ism$/,da,"schism"],[/^[hu]m+$/,ha,"hmm"],[/^\d+ ?[ap]m$/,"Date","3am"]],n:[[/.[lsrnpb]ian$/,Rt,"republican"],[/[^aeiou]ician$/,tp,"musician"],[/[aeiou][ktrp]in'$/,"Gerund","cookin'"]],o:[[/^no+$/,ha,"noooo"],[/^(yo)+$/,ha,"yoo"],[/^wo{2,}[pt]?$/,ha,"woop"]],r:[[/.[bdfklmst]ler$/,"Noun"],[/[aeiou][pns]er$/,da],[/[^i]fer$/,wu],[/.[^aeiou][ao]pher$/,tp],[/.[lk]er$/,"Noun"],[/.ier$/,"Comparative"]],t:[[/.[di]est$/,"Superlative"],[/.[icldtgrv]ent$/,Rt],[/[aeiou].*ist$/,Rt],[/^[a-z]et$/,rp]],s:[[/.[^aeiou]ises$/,xu],[/.[rln]ates$/,xu],[/.[^z]ens$/,rp],[/.[lstrn]us$/,da],[/.[aeiou]sks$/,xu],[/.[aeiou]kes$/,xu],[/[aeiou][^aeiou]is$/,da],[/[a-z]'s$/,np],[/^yes+$/,ha]],v:[[/.[^aeiou][ai][kln]ov$/,Du]],y:[[/.[cts]hy$/,Rt],[/.[st]ty$/,Rt],[/.[tnl]ary$/,Rt],[/.[oe]ry$/,da],[/[rdntkbhs]ly$/,ep],[/.(gg|bb|zz)ly$/,Rt],[/...lly$/,ep],[/.[gk]y$/,Rt],[/[bszmp]{2}y$/,Rt],[/.[ai]my$/,Rt],[/[ea]{2}zy$/,Rt],[/.[^aeiou]ity$/,da]]},Mr="Verb",It="Noun",$M={leftTags:[["Adjective",It],["Possessive",It],["Determiner",It],["Adverb",Mr],["Pronoun",Mr],["Value",It],["Ordinal",It],["Modal",Mr],["Superlative",It],["Demonym",It],["Honorific","Person"]],leftWords:[["i",Mr],["first",It],["it",Mr],["there",Mr],["not",Mr],["because",It],["if",It],["but",It],["who",Mr],["this",It],["his",It],["when",It],["you",Mr],["very","Adjective"],["old",It],["never",Mr],["before",It],["a",It],["the",It],["been",Mr]],rightTags:[["Copula",It],["PastTense",It],["Conjunction",It],["Modal",It]],rightWords:[["there",Mr],["me",Mr],["man","Adjective"],["him",Mr],["it",Mr],["were",It],["took",It],["himself",Mr],["went",It],["who",It],["jr","Person"]]},Ki={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"}},_M=function(e,t={}){return t.hasOwnProperty(e)?t[e]:null},BM=function(e,t=[]){for(let r=0;r<t.length;r+=1)if(e.endsWith(t[r]))return e;return null},IM=function(e,t,r={}){t=t||{};let n=e.length-1;for(let a=n;a>=1;a-=1){let i=e.length-a,o=e.substring(i,e.length);if(t.hasOwnProperty(o)===!0)return e.slice(0,i)+t[o];if(r.hasOwnProperty(o)===!0)return e.slice(0,i)+r[o]}return t.hasOwnProperty("")?e+=t[""]:r.hasOwnProperty("")?e+=r[""]:null},un=function(e="",t={}){let r=_M(e,t.ex);return r=r||BM(e,t.same),r=r||IM(e,t.fwd,t.both),r=r||e,r},ap=function(e){return Object.entries(e).reduce((t,r)=>(t[r[1]]=r[0],t),{})},Ko=function(e={}){return{reversed:!0,both:ap(e.both),ex:ap(e.ex),fwd:e.rev||{}}},ip=/^([0-9]+)/,zM=function(e){let t={};return e.split("¦").forEach(r=>{let[n,a]=r.split(":");a=(a||"").split(","),a.forEach(i=>{t[i]=n})}),t},jM=function(e="",t=""){t=String(t);let r=t.match(ip);if(r===null)return t;let n=Number(r[1])||0;return e.substring(0,n)+t.replace(ip,"")},Nu=function(e){let t=zM(e);return Object.keys(t).reduce((r,n)=>(r[n]=jM(n,t[n]),r),{})},Yi=function(e={}){return typeof e=="string"&&(e=JSON.parse(e)),e.fwd=Nu(e.fwd||""),e.both=Nu(e.both||""),e.rev=Nu(e.rev||""),e.ex=Nu(e.ex||""),e},lw=Yi(Ki.PastTense),cw=Yi(Ki.PresentTense),fw=Yi(Ki.Gerund),mw=Yi(Ki.Participle),qM=Ko(lw),RM=Ko(cw),LM=Ko(fw),HM=Ko(mw),dw=Yi(Ki.Comparative),hw=Yi(Ki.Superlative),GM=Ko(dw),VM=Ko(hw),UM=Yi(Ki.AdjToNoun),pw={fromPast:lw,fromPresent:cw,fromGerund:fw,fromParticiple:mw,toPast:qM,toPresent:RM,toGerund:LM,toParticiple:HM,toComparative:dw,toSuperlative:hw,fromComparative:GM,fromSuperlative:VM,adjToNoun:UM},WM=[[/^[\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"],[new RegExp("[^:/]\\/\\p{Letter}","u"),"SlashedTerm","love/hate"]],JM=[[new RegExp("^#[\\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"]],KM=[[/^@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-"],[new RegExp("^[-+]?\\p{Currency_Symbol}[-+]?[0-9]+(,[0-9]{3})*(\\.[0-9]+)?([kmb]|bn)?\\+?$","u"),["Money","Value"],"$5.30"],[new RegExp("^[-+]?[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"]],YM=["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"].reduce((e,t)=>(e[t]=!0,e),{}),ZM=["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"].reduce((e,t)=>(e[t]=!0,e),{}),Au=[[/([^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,""]],QM=function(e){return Object.keys(e).reduce((t,r)=>(t[e[r]]=r,t),{})},gw=function(e,t){const{irregularPlurals:r}=t.two;let n=QM(r);if(n.hasOwnProperty(e))return n[e];for(let a=0;a<Au.length;a++)if(Au[a][0].test(e)===!0)return e=e.replace(Au[a][0],Au[a][1]),e;return e},XM=function(e,t){let r=[e],n=uc(e,t);n!==e&&r.push(n);let a=gw(e,t);return a!==e&&r.push(a),r},eT={toPlural:uc,toSingular:gw,all:XM};let Bi={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"],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"],Participle:["ken","wn"]};Bi=Object.keys(Bi).reduce((e,t)=>(Bi[t].forEach(r=>e[r]=t),e),{});const vw=function(e){let t=e.substring(e.length-3);if(Bi.hasOwnProperty(t)===!0)return Bi[t];let r=e.substring(e.length-2);return Bi.hasOwnProperty(r)===!0?Bi[r]:e.substring(e.length-1)==="s"?"PresentTense":null},tT=function(e,t){let r="",n={};t.one&&t.one.prefixes&&(n=t.one.prefixes);let[a,i]=e.split(/ /);return i&&n[a]===!0&&(r=a,a=i,i=""),{prefix:r,verb:a,particle:i}},op={are:"be",were:"be",been:"be",is:"be",am:"be",was:"be",be:"be",being:"be"},Yf=function(e,t,r){const{fromPast:n,fromPresent:a,fromGerund:i,fromParticiple:o}=t.two.models;let{prefix:s,verb:u,particle:l}=tT(e,t),c="";if(r||(r=vw(e)),op.hasOwnProperty(e))c=op[e];else if(r==="Participle")c=un(u,o);else if(r==="PastTense")c=un(u,n);else if(r==="PresentTense")c=un(u,a);else if(r==="Gerund")c=un(u,i);else return e;return l&&(c+=" "+l),s&&(c=s+" "+c),c},rT=e=>/ /.test(e)?e.split(/ /):[e,""],nd=function(e,t){const{toPast:r,toPresent:n,toGerund:a,toParticiple:i}=t.two.models;if(e==="be")return{Infinitive:e,Gerund:"being",PastTense:"was",PresentTense:"is"};let[o,s]=rT(e),u={Infinitive:o,PastTense:un(o,r),PresentTense:un(o,n),Gerund:un(o,a),FutureTense:"will "+o},l=un(o,i);if(l!==e&&l!==u.PastTense){let c=t.one.lexicon||{};(c[l]==="Participle"||c[l]==="Adjective")&&(e==="play"&&(l="played"),u.Participle=l)}return s&&Object.keys(u).forEach(c=>{u[c]+=" "+s}),u},nT=function(e,t){let r=nd(e,t);return delete r.FutureTense,Object.values(r).filter(n=>n)},aT={toInfinitive:Yf,conjugate:nd,all:nT},ad=function(e,t){const r=t.two.models.toSuperlative;return un(e,r)},id=function(e,t){const r=t.two.models.toComparative;return un(e,r)},iT=function(e,t){const r=t.two.models.fromComparative;return un(e,r)},oT=function(e,t){const r=t.two.models.fromSuperlative;return un(e,r)},sT=function(e,t){const r=t.two.models.adjToNoun;return un(e,r)},yw=function(e="",t=[]){const r=e.length;let n=r<=6?r-1:6;for(let a=n;a>=1;a-=1){let i=e.substring(r-a,e.length);if(t[i.length].hasOwnProperty(i)===!0){let o=e.slice(0,r-a),s=t[i.length][i];return o+s}}return null},gt="ically",uT=new Set(["analyt"+gt,"chem"+gt,"class"+gt,"clin"+gt,"crit"+gt,"ecolog"+gt,"electr"+gt,"empir"+gt,"frant"+gt,"grammat"+gt,"ident"+gt,"ideolog"+gt,"log"+gt,"mag"+gt,"mathemat"+gt,"mechan"+gt,"med"+gt,"method"+gt,"method"+gt,"mus"+gt,"phys"+gt,"phys"+gt,"polit"+gt,"pract"+gt,"rad"+gt,"satir"+gt,"statist"+gt,"techn"+gt,"technolog"+gt,"theoret"+gt,"typ"+gt,"vert"+gt,"whims"+gt]),lT=[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"}],cT=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"]),sp={wholly:"whole",fully:"full",truly:"true",gently:"gentle",singly:"single",customarily:"customary",idly:"idle",publically:"public",quickly:"quick",superbly:"superb",cynically:"cynical",well:"good"},fT=function(e){return e.endsWith("ly")?uT.has(e)?e.replace(/ically/,"ical"):cT.has(e)?null:sp.hasOwnProperty(e)?sp[e]:yw(e,lT)||e:null},mT=[null,{y:"ily"},{ly:"ly",ic:"ically"},{ial:"ially",ual:"ually",tle:"tly",ble:"bly",ple:"ply",ary:"arily"},{},{},{}],up={cool:"cooly",whole:"wholly",full:"fully",good:"well",idle:"idly",public:"publicly",single:"singly",special:"especially"},bw=function(e){if(up.hasOwnProperty(e))return up[e];let t=yw(e,mT);return t||(t=e+"ly"),t},dT=function(e,t){let r=[e];return r.push(ad(e,t)),r.push(id(e,t)),r.push(bw(e)),r=r.filter(n=>n),r=new Set(r),Array.from(r)},hT={toSuperlative:ad,toComparative:id,toAdverb:bw,toNoun:sT,fromAdverb:fT,fromSuperlative:oT,fromComparative:iT,all:dT},pT={noun:eT,verb:aT,adjective:hT},lp={Singular:(e,t,r,n)=>{let a=n.one.lexicon,i=r.two.transform.noun.toPlural(e,n);a[i]||(t[i]=t[i]||"Plural")},Actor:(e,t,r,n)=>{let a=n.one.lexicon,i=r.two.transform.noun.toPlural(e,n);a[i]||(t[i]=t[i]||["Plural","Actor"])},Comparable:(e,t,r,n)=>{let a=n.one.lexicon,{toSuperlative:i,toComparative:o}=r.two.transform.adjective,s=i(e,n);a[s]||(t[s]=t[s]||"Superlative");let u=o(e,n);a[u]||(t[u]=t[u]||"Comparative"),t[e]="Adjective"},Demonym:(e,t,r,n)=>{let a=r.two.transform.noun.toPlural(e,n);t[a]=t[a]||["Demonym","Plural"]},Infinitive:(e,t,r,n)=>{let a=n.one.lexicon,i=r.two.transform.verb.conjugate(e,n);Object.entries(i).forEach(o=>{!a[o[1]]&&!t[o[1]]&&o[0]!=="FutureTense"&&(t[o[1]]=o[0])})},PhrasalVerb:(e,t,r,n)=>{let a=n.one.lexicon;t[e]=["PhrasalVerb","Infinitive"];let i=n.one._multiCache,[o,s]=e.split(" ");a[o]||(t[o]=t[o]||"Infinitive");let u=r.two.transform.verb.conjugate(o,n);delete u.FutureTense,Object.entries(u).forEach(l=>{if(l[0]==="Actor"||l[1]==="")return;!t[l[1]]&&!a[l[1]]&&(t[l[1]]=l[0]),i[l[1]]=2;let c=l[1]+" "+s;t[c]=t[c]||[l[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"]}},gT=function(e,t){const{methods:r,model:n}=t;let a={},i={};return Object.keys(e).forEach(o=>{let s=e[o];o=o.toLowerCase().trim(),o=o.replace(/'s\b/,"");let u=o.split(/ /);u.length>1&&(i[u[0]]===void 0||u.length>i[u[0]])&&(i[u[0]]=u.length),lp.hasOwnProperty(s)===!0&&lp[s](o,a,r,n),a[o]=a[o]||s}),delete a[""],delete a[null],delete a[" "],{lex:a,_multi:i}},vT=function(e,t){const r=/^[0-9]+$/;let n=e[t];if(!n)return!1;const a=new Set(["may","april","august","jan"]);if(n.normal==="like"||a.has(n.normal)||n.tags.has("Place")||n.tags.has("Date"))return!1;if(e[t-1]){let o=e[t-1];if(o.tags.has("Date")||a.has(o.normal)||o.tags.has("Adjective")||n.tags.has("Adjective"))return!1}let i=n.normal;return!((i.length===1||i.length===2||i.length===4)&&r.test(i))},yT=function(e){const t=/[,:;]/;let r=[];return e.forEach(n=>{let a=0;n.forEach((i,o)=>{t.test(i.post)&&vT(n,o+1)&&(r.push(n.slice(a,o+1)),a=o+1)}),a<n.length&&r.push(n.slice(a,n.length))}),r},cp={e:["mice","louse","antennae","formulae","nebulae","vertebrae","vitae"],i:["tia","octopi","viri","radii","nuclei","fungi","cacti","stimuli"],n:["men"],t:["feet"]},bT=new Set(["israelis","menus","logos"]),wT=["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"],ww=function(e){if(!e||e.length<=3)return!1;if(bT.has(e))return!0;let t=e[e.length-1];return cp.hasOwnProperty(t)?cp[t].find(r=>e.endsWith(r)):!(t!=="s"||wT.find(r=>e.endsWith(r)))},Zf={two:{quickSplit:yT,expandLexicon:gT,transform:pT,looksPlural:ww}},xT=function(e){const{irregularPlurals:t}=e.two,{lexicon:r}=e.one;return Object.entries(t).forEach(n=>{r[n[0]]=r[n[0]]||"Singular",r[n[1]]=r[n[1]]||"Plural"}),e};let Qf={one:{lexicon:{}},two:{models:pw}};const DT={"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"},xw=function(e,t){const r={model:t,methods:Zf};let{lex:n,_multi:a}=Zf.two.expandLexicon(e,r);return Object.assign(t.one.lexicon,n),Object.assign(t.one._multiCache,a),t},NT=function(e,t){return Object.keys(e).forEach(r=>{e[r]==="Uncountable"&&(t.two.uncountable[r]=!0,e[r]="Uncountable")}),t},fp=function(e,t,r){let n=nd(e,Qf);t[n.PastTense]=t[n.PastTense]||"PastTense",t[n.Gerund]=t[n.Gerund]||"Gerund",r===!0&&(t[n.PresentTense]=t[n.PresentTense]||"PresentTense")},mp=function(e,t,r){let n=ad(e,r);t[n]=t[n]||"Superlative";let a=id(e,r);t[a]=t[a]||"Comparative"},AT=function(e,t,r){let n=uc(e,r);t[n]=t[n]||"Plural"},CT=function(e,t){let r={};const n=t.one.lexicon;return Object.keys(e).forEach(a=>{const i=e[a];if(r[a]=DT[i],(i==="Noun|Verb"||i==="Person|Verb"||i==="Actor|Verb")&&fp(a,n,!1),i==="Adj|Present"&&(fp(a,n,!0),mp(a,n,t)),i==="Person|Adj"&&mp(a,n,t),i==="Adj|Gerund"||i==="Noun|Gerund"){let o=Yf(a,Qf,"Gerund");n[o]||(r[o]="Infinitive")}if((i==="Noun|Gerund"||i==="Adj|Noun"||i==="Person|Noun")&&AT(a,n,t),i==="Adj|Past"){let o=Yf(a,Qf,"PastTense");n[o]||(r[o]="Infinitive")}}),t=xw(r,t),t},ET=function(e){return e=xw(e.one.lexicon,e),e=NT(e.one.lexicon,e),e=CT(e.two.switches,e),e=xT(e),e};let Xf={one:{_multiCache:{},lexicon:Jo,frozenLex:lM},two:{irregularPlurals:uw,models:pw,suffixPatterns:PM,prefixPatterns:kM,endsWith:OM,neighbours:$M,regexNormal:WM,regexText:JM,regexNumbers:KM,switches:Kf,clues:So,uncountable:{},orgWords:YM,placeWords:ZM}};Xf=ET(Xf);const ST=function(e,t,r,n){const a=n.methods.one.setTag;if(e.length>=3){const i=/:/;if(e[0].post.match(i)){let s=e[1];if(s.tags.has("Value")||s.tags.has("Email")||s.tags.has("PhoneNumber"))return;a([e[0]],"Expression",n,null,"2-punct-colon''")}}},MT=function(e,t,r,n){const a=n.methods.one.setTag;e[t].post==="-"&&e[t+1]&&a([e[t],e[t+1]],"Hyphenated",n,null,"1-punct-hyphen''")},dp=/^(under|over|mis|re|un|dis|semi)-?/,TT=function(e,t,r){const n=r.two.switches;let a=e[t];if(n.hasOwnProperty(a.normal)){a.switch=n[a.normal];return}if(dp.test(a.normal)){let i=a.normal.replace(dp,"");i.length>3&&n.hasOwnProperty(i)&&(a.switch=n[i])}},FT=(e,t,r="")=>{const n=o=>"\x1B[33m\x1B[3m"+o+"\x1B[0m",a=o=>"\x1B[3m"+o+"\x1B[0m";let i=e.text||"["+e.implicit+"]";typeof t!="string"&&t.length>2&&(t=t.slice(0,2).join(", #")+" +"),t=typeof t!="string"?t.join(", #"):t,console.log(` ${n(i).padEnd(24)} \x1B[32m→\x1B[0m #${t.padEnd(22)} ${a(r)}`)},Zt=function(e,t,r){if(!t||t.length===0||e.frozen===!0)return;const n=typeof process>"u"||!process.env?self.env||{}:process.env;n&&n.DEBUG_TAGS&&FT(e,t,r),e.tags=e.tags||new Set,typeof t=="string"?e.tags.add(t):t.forEach(a=>e.tags.add(a))},PT=["Acronym","Abbreviation","ProperNoun","Uncountable","Possessive","Pronoun","Activity","Honorific","Month"],kT=function(e){!e.tags.has("Noun")||e.tags.has("Plural")||e.tags.has("Singular")||PT.find(t=>e.tags.has(t))||(ww(e.normal)?Zt(e,"Plural","3-plural-guess"):Zt(e,"Singular","3-singular-guess"))},OT=function(e){let t=e.tags;if(t.has("Verb")&&t.size===1){let r=vw(e.normal);r&&Zt(e,r,"3-verb-tense-guess")}},Js=function(e,t,r){let n=e[t],a=Array.from(n.tags);for(let i=0;i<a.length;i+=1)if(r.one.tagSet[a[i]]){let o=r.one.tagSet[a[i]].parents;Zt(n,o,` -inferred by #${a[i]}`)}kT(n),OT(n)},$T=new RegExp("^\\p{Lu}[\\p{Ll}'’]","u"),_T=/[0-9]/,BT=["Date","Month","WeekDay","Unit","Expression"],IT=/[IVX]/,zT=/^[IVXLCDM]{2,}$/,jT=/^M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$/,qT={li:!0,dc:!0,md:!0,dm:!0,ml:!0},RT=function(e,t,r){let n=e[t];n.index=n.index||[0,0];let a=n.index[1],i=n.text||"";return a!==0&&$T.test(i)===!0&&_T.test(i)===!1?BT.find(o=>n.tags.has(o))||n.pre.match(/["']$/)||n.normal==="the"?null:(Js(e,t,r),!n.tags.has("Noun")&&!n.frozen&&n.tags.clear(),Zt(n,"ProperNoun","2-titlecase"),!0):i.length>=2&&zT.test(i)&&IT.test(i)&&jT.test(i)&&!qT[n.normal]?(Zt(n,"RomanNumeral","2-xvii"),!0):null},hp=function(e="",t=[]){const r=e.length;let n=7;r<=n&&(n=r-1);for(let a=n;a>1;a-=1){let i=e.substring(r-a,r);if(t[i.length].hasOwnProperty(i)===!0)return t[i.length][i]}return null},LT=function(e,t,r){let n=e[t];if(n.tags.size===0){let a=hp(n.normal,r.two.suffixPatterns);if(a!==null)return Zt(n,a,"2-suffix"),n.confidence=.7,!0;if(n.implicit&&(a=hp(n.implicit,r.two.suffixPatterns),a!==null))return Zt(n,a,"2-implicit-suffix"),n.confidence=.7,!0}return null},pp=/['‘’‛‵′`´]/,Vc=function(e,t){for(let r=0;r<t.length;r+=1)if(t[r][0].test(e)===!0)return t[r];return null},HT=function(e="",t){let r=e[e.length-1];if(t.hasOwnProperty(r)===!0){let n=t[r]||[];for(let a=0;a<n.length;a+=1)if(n[a][0].test(e)===!0)return n[a]}return null},GT=function(e,t,r,n){const a=n.methods.one.setTag;let{regexText:i,regexNormal:o,regexNumbers:s,endsWith:u}=r.two,l=e[t],c=l.machine||l.normal,f=l.text;pp.test(l.post)&&!pp.test(l.pre)&&(f+=l.post.trim());let m=Vc(f,i)||Vc(c,o);return!m&&/[0-9]/.test(c)&&(m=Vc(c,s)),!m&&l.tags.size===0&&(m=HT(c,u)),m?(a([l],m[1],n,null,`2-regex-'${m[2]||m[0]}'`),l.confidence=.6,!0):null},VT=function(e="",t=[]){const r=e.length;let n=7;n>r-3&&(n=r-3);for(let a=n;a>2;a-=1){let i=e.substring(0,a);if(t[i.length].hasOwnProperty(i)===!0)return t[i.length][i]}return null},UT=function(e,t,r){let n=e[t];if(n.tags.size===0){let a=VT(n.normal,r.two.prefixPatterns);if(a!==null)return Zt(n,a,"2-prefix"),n.confidence=.5,!0}return null},WT=1400,JT=2100,KT=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"]),gp=function(e){if(!e)return!1;let t=e.normal||e.implicit;return!!(KT.has(t)||e.tags.has("Date")||e.tags.has("Month")||e.tags.has("WeekDay")||e.tags.has("Year")||e.tags.has("ProperNoun"))},vp=function(e){return e?!!(e.tags.has("Ordinal")||e.tags.has("Cardinal")&&e.normal.length<3||e.normal==="is"||e.normal==="was"):!1},yp=function(e){return e&&(e.tags.has("Date")||e.tags.has("Month")||e.tags.has("WeekDay")||e.tags.has("Year"))},YT=function(e,t){const r=e[t];if(r.tags.has("NumericValue")&&r.tags.has("Cardinal")&&r.normal.length===4){let n=Number(r.normal);if(n&&!isNaN(n)&&n>WT&&n<JT){let a=e[t-1],i=e[t+1];if(gp(a)||gp(i))return Zt(r,"Year","2-tagYear");if(n>=1920&&n<2025){if(vp(a)||vp(i))return Zt(r,"Year","2-tagYear-close");if(yp(e[t-2])||yp(e[t+2]))return Zt(r,"Year","2-tagYear-far");if(a&&(a.tags.has("Determiner")||a.tags.has("Possessive"))&&i&&i.tags.has("Noun")&&!i.tags.has("Plural"))return Zt(r,"Year","2-tagYear-noun")}}}return null},ZT=function(e,t,r,n){const a=n.methods.one.setTag,i=e[t],o=["PastTense","PresentTense","Auxiliary","Modal","Particle"];i.tags.has("Verb")&&(o.find(u=>i.tags.has(u))||a([i],"Infinitive",n,null,"2-verb-type''"))},Dw=/^[A-Z]('s|,)?$/,Nw=/^[A-Z-]+$/,Aw=/^[A-Z]+s$/,QT=/([A-Z]\.)+[A-Z]?,?$/,XT=/[A-Z]{2,}('s|,)?$/,eF=/([a-z]\.)+[a-z]\.?$/,Cw={I:!0,A:!0},tF={la:!0,ny:!0,us:!0,dc:!0,gb:!0},rF=function(e,t){let r=e.text;if(Nw.test(r)===!1)if(r.length>3&&Aw.test(r)===!0)r=r.replace(/s$/,"");else return!1;return r.length>5||Cw.hasOwnProperty(r)||t.one.lexicon.hasOwnProperty(e.normal)?!1:QT.test(r)===!0||eF.test(r)===!0||Dw.test(r)===!0||XT.test(r)===!0},nF=function(e,t,r){let n=e[t];return n.tags.has("RomanNumeral")||n.tags.has("Acronym")||n.frozen?null:rF(n,r)?(n.tags.clear(),Zt(n,["Acronym","Noun"],"3-no-period-acronym"),tF[n.normal]===!0&&Zt(n,"Place","3-place-acronym"),Aw.test(n.text)===!0&&Zt(n,"Plural","3-plural-acronym"),!0):!Cw.hasOwnProperty(n.text)&&Dw.test(n.text)?(n.tags.clear(),Zt(n,["Acronym","Noun"],"3-one-letter-acronym"),!0):n.tags.has("Organization")&&n.text.length<=3?(Zt(n,"Acronym","3-org-acronym"),!0):n.tags.has("Organization")&&Nw.test(n.text)&&n.text.length<=6?(Zt(n,"Acronym","3-titlecase-acronym"),!0):null},bp=function(e,t){if(!e)return null;let r=t.find(n=>e.normal===n[0]);return r?r[1]:null},wp=function(e,t){if(!e)return null;let r=t.find(n=>e.tags.has(n[0]));return r?r[1]:null},aF=function(e,t,r){const{leftTags:n,leftWords:a,rightWords:i,rightTags:o}=r.two.neighbours;let s=e[t];if(s.tags.size===0){let u=null;if(u=u||bp(e[t-1],a),u=u||bp(e[t+1],i),u=u||wp(e[t-1],n),u=u||wp(e[t+1],o),u)return Zt(s,u,"3-[neighbour]"),Js(e,t,r),e[t].confidence=.2,!0}return null},iF=e=>new RegExp("^\\p{Lu}[\\p{Ll}'’]","u").test(e),xp=function(e,t,r){return!e||e.tags.has("FirstName")||e.tags.has("Place")?!1:e.tags.has("ProperNoun")||e.tags.has("Organization")||e.tags.has("Acronym")?!0:!r&&iF(e.text)?t===0?e.tags.has("Singular"):!0:!1},oF=function(e,t,r,n){const a=r.model.two.orgWords,i=r.methods.one.setTag;let o=e[t],s=o.machine||o.normal;if(a[s]===!0&&xp(e[t-1],t-1,n)){i([e[t]],"Organization",r,null,"3-[org-word]");for(let u=t;u>=0&&xp(e[u],u,n);u-=1)i([e[u]],"Organization",r,null,"3-[org-word]")}return null},sF=e=>new RegExp("^\\p{Lu}[\\p{Ll}'’]","u").test(e),uF=/'s$/,Dp=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"]),lF=new Set(["center","centre","way","range","bar","bridge","field","pit"]),Np=function(e,t,r){if(!e)return!1;let n=e.tags;return n.has("Organization")||n.has("Possessive")||uF.test(e.normal)?!1:n.has("ProperNoun")||n.has("Place")?!0:!r&&sF(e.text)?t===0?n.has("Singular"):!0:!1},cF=function(e,t,r,n){const a=r.model.two.placeWords,i=r.methods.one.setTag;let o=e[t],s=o.machine||o.normal;if(a[s]===!0){for(let u=t-1;u>=0;u-=1)if(!Dp.has(e[u].normal)){if(Np(e[u],u,n)){i(e.slice(u,t+1),"Place",r,null,"3-[place-of-foo]");continue}break}if(lF.has(s))return!1;for(let u=t+1;u<e.length;u+=1){if(Np(e[u],u,n))return i(e.slice(t,u+1),"Place",r,null,"3-[foo-place]"),!0;if(!(e[u].normal==="of"||Dp.has(e[u].normal)))break}}return null},fF=function(e,t,r){let n=!1,a=e[t].tags;(a.size===0||a.size===1&&(a.has("Hyphenated")||a.has("HashTag")||a.has("Prefix")||a.has("SlashedTerm")))&&(n=!0),n&&(Zt(e[t],"Noun","3-[fallback]"),Js(e,t,r),e[t].confidence=.1)},mF=/^[A-Z][a-z]/,$n=(e,t)=>e[t].tags.has("ProperNoun")&&mF.test(e[t].text)?"Noun":null,Ap=(e,t,r)=>t===0&&!e[1]?r:null,dF=function(e,t){return!e[t+1]&&e[t-1]&&e[t-1].tags.has("Determiner")?"Noun":null},hF=function(e,t,r){return t===0&&e.length>3?r:null},Cp={"Adj|Gerund":(e,t)=>$n(e,t),"Adj|Noun":(e,t)=>$n(e,t)||dF(e,t),"Actor|Verb":(e,t)=>$n(e,t),"Adj|Past":(e,t)=>$n(e,t),"Adj|Present":(e,t)=>$n(e,t),"Noun|Gerund":(e,t)=>$n(e,t),"Noun|Verb":(e,t)=>t>0&&$n(e,t)||Ap(e,t,"Infinitive"),"Plural|Verb":(e,t)=>$n(e,t)||Ap(e,t,"PresentTense")||hF(e,t,"Plural"),"Person|Noun":(e,t)=>$n(e,t),"Person|Verb":(e,t)=>t!==0?$n(e,t):null,"Person|Adj":(e,t)=>t===0&&e.length>1||$n(e,t)?"Person":null},od=typeof process>"u"||!process.env?self.env||{}:process.env,Ep=/^(under|over|mis|re|un|dis|semi)-?/,Sp=(e,t)=>{if(!e||!t)return null;let r=e.normal||e.implicit,n=null;return t.hasOwnProperty(r)&&(n=t[r]),n&&od.DEBUG_TAGS&&console.log(`
|
|
12
|
-
\x1B[2m\x1B[3m ↓ - '${r}' \x1B[0m`),n},Mp=(e,t={},r)=>{if(!e||!t)return null;let a=Array.from(e.tags).sort((i,o)=>{let s=r[i]?r[i].parents.length:0,u=r[o]?r[o].parents.length:0;return s>u?-1:1}).find(i=>t[i]);return a&&od.DEBUG_TAGS&&console.log(` \x1B[2m\x1B[3m ↓ - '${e.normal||e.implicit}' (#${a}) \x1B[0m`),a=t[a],a},pF=function(e,t,r,n){var s;if(!r)return null;const a=((s=e[t-1])==null?void 0:s.text)!=="also"?t-1:Math.max(0,t-2),i=n.one.tagSet;let o=Sp(e[t+1],r.afterWords);return o=o||Sp(e[a],r.beforeWords),o=o||Mp(e[a],r.beforeTags,i),o=o||Mp(e[t+1],r.afterTags,i),o},gF=function(e,t,r){const n=r.model,a=r.methods.one.setTag,{switches:i,clues:o}=n.two,s=e[t];let u=s.normal||s.implicit||"";if(Ep.test(u)&&!i[u]&&(u=u.replace(Ep,"")),s.switch){let l=s.switch;if(s.tags.has("Acronym")||s.tags.has("PhrasalVerb"))return;let c=pF(e,t,o[l],n);Cp[l]&&(c=Cp[l](e,t)||c),c?(a([s],c,r,null,`3-[switch] (${l})`),Js(e,t,n)):od.DEBUG_TAGS&&console.log(`
|
|
13
|
-
-> X - '${u}' : (${l}) `)}},vF={there:!0,this:!0,it:!0,him:!0,her:!0,us:!0},yF=function(e,t){const r=t.methods.one.setTag,n=t.model.one._multiCache||{};let a=e[0];if((a.switch==="Noun|Verb"||a.tags.has("Infinitive"))&&e.length>=2){if(e.length<4&&!vF[e[1].normal]||!a.tags.has("PhrasalVerb")&&n.hasOwnProperty(a.normal))return;(e[1].tags.has("Noun")||e[1].tags.has("Determiner"))&&(!e.slice(1,3).some(u=>u.tags.has("Verb"))||a.tags.has("#PhrasalVerb"))&&r([a],"Imperative",t,null,"3-[imperative]")}},bF=function(e){if(e.filter(r=>!r.tags.has("ProperNoun")).length<=3)return!1;const t=/^[a-z]/;return e.every(r=>!t.test(r.text))},wF=function(e,t,r){e.forEach(n=>{ST(n,0,t,r)})},xF=function(e,t,r,n){for(let a=0;a<e.length;a+=1)e[a].frozen!==!0&&(TT(e,a,t),n===!1&&RT(e,a,t),LT(e,a,t),GT(e,a,t,r),UT(e,a,t),YT(e,a))},DF=function(e,t,r,n){for(let a=0;a<e.length;a+=1){let i=nF(e,a,t);Js(e,a,t),i=i||aF(e,a,t),i=i||fF(e,a,t)}for(let a=0;a<e.length;a+=1)e[a].frozen!==!0&&(oF(e,a,r,n),cF(e,a,r,n),gF(e,a,r),ZT(e,a,t,r),MT(e,a,t,r));yF(e,r)},NF=function(e){const{methods:t,model:r,world:n}=e;let a=e.docs;wF(a,r,n);let i=t.two.quickSplit(a);for(let o=0;o<i.length;o+=1){let s=i[o];const u=bF(s);xF(s,r,n,u),DF(s,r,n,u)}return i},Tp={Possessive:e=>{let t=e.machine||e.normal||e.text;return t=t.replace(/'s$/,""),t},Plural:(e,t)=>{let r=e.machine||e.normal||e.text;return t.methods.two.transform.noun.toSingular(r,t.model)},Copula:()=>"is",PastTense:(e,t)=>{let r=e.machine||e.normal||e.text;return t.methods.two.transform.verb.toInfinitive(r,t.model,"PastTense")},Gerund:(e,t)=>{let r=e.machine||e.normal||e.text;return t.methods.two.transform.verb.toInfinitive(r,t.model,"Gerund")},PresentTense:(e,t)=>{let r=e.machine||e.normal||e.text;return e.tags.has("Infinitive")?r:t.methods.two.transform.verb.toInfinitive(r,t.model,"PresentTense")},Comparative:(e,t)=>{let r=e.machine||e.normal||e.text;return t.methods.two.transform.adjective.fromComparative(r,t.model)},Superlative:(e,t)=>{let r=e.machine||e.normal||e.text;return t.methods.two.transform.adjective.fromSuperlative(r,t.model)},Adverb:(e,t)=>{const{fromAdverb:r}=t.methods.two.transform.adjective;let n=e.machine||e.normal||e.text;return r(n)}},AF=function(e){const t=e.world,r=Object.keys(Tp);e.docs.forEach(n=>{for(let a=0;a<n.length;a+=1){const i=n[a];for(let o=0;o<r.length;o+=1)if(i.tags.has(r[o])){const s=Tp[r[o]];let u=s(i,t);i.normal!==u&&(i.root=u);break}}})},Fp={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"},CF=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 r=0;r<t.length;r+=1)if(Fp.hasOwnProperty(t[r]))return Fp[t[r]];return null},EF=function(e){e.compute("tagRank"),e.docs.forEach(t=>{t.forEach(r=>{r.penn=CF(r)})})},SF={preTagger:NF,root:AF,penn:EF},Uc=["Person","Place","Organization"],MF={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:Uc},Actor:{is:"Noun",not:["Place","Organization"]},Activity:{is:"Noun",not:["Person","Place"]},Unit:{is:"Noun",not:Uc},Demonym:{is:"Noun",also:["ProperNoun"],not:Uc},Possessive:{is:"Noun"},Reflexive:{is:"Pronoun"}},TF={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"}},FF={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"}},PF={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"]}},kF=["Noun","Verb","Adjective","Adverb","Value","QuestionWord"],OF={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:kF},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:{}};let $F=Object.assign({},MF,TF,FF,PF,OF);const _F={compute:SF,methods:Zf,model:Xf,tags:$F,hooks:["preTagger"]},BF=/[,)"';:\-–—.…]/,pa=function(e,t){if(!e.found)return;let r=e.termList();for(let n=0;n<r.length-1;n++){const a=r[n];if(BF.test(a.post))return}r[0].implicit=r[0].normal,r[0].text+=t,r[0].normal+=t,r.slice(1).forEach(n=>{n.implicit=n.normal,n.text="",n.normal=""});for(let n=0;n<r.length-1;n++)r[n].post=r[n].post.replace(/ /,"")},IF=function(){let e=this.not("@hasContraction"),t=e.match("(we|they|you) are");return pa(t,"'re"),t=e.match("(he|she|they|it|we|you) will"),pa(t,"'ll"),t=e.match("(he|she|they|it|we) is"),pa(t,"'s"),t=e.match("#Person is"),pa(t,"'s"),t=e.match("#Person would"),pa(t,"'d"),t=e.match("(is|was|had|would|should|could|do|does|have|has|can) not"),pa(t,"n't"),t=e.match("(i|we|they) have"),pa(t,"'ve"),t=e.match("(would|should|could) have"),pa(t,"'ve"),t=e.match("i am"),pa(t,"'m"),t=e.match("going to"),this},zF=new RegExp("^\\p{Lu}[\\p{Ll}'’]","u"),jF=function(e=""){return e=e.replace(/^ *[a-z\u00C0-\u00FF]/,t=>t.toUpperCase()),e},qF=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Contraction"}expand(){return this.docs.forEach(n=>{let a=zF.test(n[0].text);n.forEach((i,o)=>{i.text=i.implicit||"",delete i.implicit,o<n.length-1&&i.post===""&&(i.post+=" "),i.dirty=!0}),a&&(n[0].text=jF(n[0].text))}),this.compute("normal"),this}}e.prototype.contractions=function(){let r=this.match("@hasContraction+");return new t(this.document,r.pointer)},e.prototype.contract=IF},RF=function(e,t,r){let[n,a]=t;!r||r.length===0||(r=r.map((i,o)=>(i.implicit=i.text,i.machine=i.text,i.pre="",i.post="",i.text="",i.normal="",i.index=[n,a+o],i)),r[0]&&(r[0].pre=e[n][a].pre,r[r.length-1].post=e[n][a].post,r[0].text=e[n][a].text,r[0].normal=e[n][a].normal),e[n].splice(a,1,...r))},LF=/'/,HF=new Set(["been","become"]),GF=new Set(["what","how","when","if","too"]);let VF=new Set(["too","also","enough"]);const UF=(e,t)=>{for(let r=t+1;r<e.length;r+=1){let n=e[r];if(HF.has(n.normal))return"has";if(GF.has(n.normal)||n.tags.has("Gerund")||n.tags.has("Determiner")||n.tags.has("Adjective")||n.switch==="Adj|Past"&&e[r+1]&&(VF.has(e[r+1].normal)||e[r+1].tags.has("Preposition")))return"is";if(n.tags.has("PastTense"))return e[r+1]&&e[r+1].normal==="for"?"is":"has"}return"is"},WF=function(e,t){let r=e[t].normal.split(LF)[0];if(r==="let")return[r,"us"];if(r==="there"){let n=e[t+1];if(n&&n.tags.has("Plural"))return[r,"are"]}return UF(e,t)==="has"?[r,"has"]:[r,"is"]},JF=/'/,KF=new Set(["better","done","before","it","had"]),YF=new Set(["have","be"]),ZF=(e,t)=>{for(let r=t+1;r<e.length;r+=1){let n=e[r];if(KF.has(n.normal))return"had";if(YF.has(n.normal))return"would";if(n.tags.has("PastTense")||n.switch==="Adj|Past")return"had";if(n.tags.has("PresentTense")||n.tags.has("Infinitive"))return"would";if(n.tags.has("#Determiner"))return"had";if(n.tags.has("Adjective"))return"would"}return!1},QF=function(e,t){let r=e[t].normal.split(JF)[0];return r==="how"||r==="what"?[r,"did"]:ZF(e,t)==="had"?[r,"had"]:[r,"would"]},XF=function(e,t){for(let r=t-1;r>=0;r-=1)if(e[r].tags.has("Noun")||e[r].tags.has("Pronoun")||e[r].tags.has("Plural")||e[r].tags.has("Singular"))return e[r];return null},e5=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=XF(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"]},t5={that:!0,there:!0,let:!0,here:!0,everywhere:!0},r5={in:!0,by:!0,for:!0};let n5=new Set(["too","also","enough","about"]),a5=new Set(["is","are","did","were","could","should","must","had","have"]);const i5=(e,t)=>{let r=e[t];if(t5.hasOwnProperty(r.machine||r.normal))return!1;if(r.tags.has("Possessive"))return!0;if(r.tags.has("QuestionWord")||r.normal==="he's"||r.normal==="she's")return!1;let n=e[t+1];if(!n)return!0;if(r.normal==="it's")return!!n.tags.has("#Noun");if(n.switch=="Noun|Gerund"){let a=e[t+2];return a?a.tags.has("Copula")?!0:(a.normal==="on"||a.normal==="in",!1):!!(r.tags.has("Actor")||r.tags.has("ProperNoun"))}if(n.tags.has("Verb"))return n.tags.has("Infinitive")?!0:n.tags.has("Gerund")?!1:!!n.tags.has("PresentTense");if(n.switch==="Adj|Noun"){let a=e[t+2];if(!a)return!1;if(a5.has(a.normal))return!0;if(n5.has(a.normal))return!1}if(n.tags.has("Noun")){let a=n.machine||n.normal;return!(a==="here"||a==="there"||a==="everywhere"||n.tags.has("Possessive")||n.tags.has("ProperNoun")&&!r.tags.has("ProperNoun"))}if(e[t-1]&&r5[e[t-1].normal]===!0)return!0;if(n.tags.has("Adjective")){let a=e[t+2];if(!a)return!1;if(a.tags.has("Noun")&&!a.tags.has("Pronoun")){let i=n.normal;return!(i==="above"||i==="below"||i==="behind")}return a.switch==="Noun|Verb"}return!!n.tags.has("Value")},Pp=/'/,o5=function(e){e.forEach((t,r)=>{t.index&&(t.index[1]=r)})},s5=function(e,t,r,n){let a=t.update();a.document=[e];let i=r+n;r>0&&(r-=1),e[i]&&(i+=1),a.ptrs=[[0,r,i]],a.compute(["freeze","lexicon","preTagger","unfreeze"]),o5(e)},kp={d:(e,t)=>QF(e,t),t:(e,t)=>e5(e,t),s:(e,t,r)=>i5(e,t)?r.methods.one.setTag([e[t]],"Possessive",r,null,"2-contraction"):WF(e,t)},u5=function(e,t){let r=t.fromText(e.join(" "));return r.compute("id"),r.docs[0]},l5=e=>{let{world:t,document:r}=e;r.forEach((n,a)=>{for(let i=n.length-1;i>=0;i-=1){if(n[i].implicit)continue;let o=null;Pp.test(n[i].normal)===!0&&(o=n[i].normal.split(Pp)[1]);let s=null;if(kp.hasOwnProperty(o)&&(s=kp[o](n,i,t)),s){s=u5(s,e),RF(r,[a,i],s),s5(r[a],e,i,s.length);continue}}})},c5={contractionTwo:l5},f5={compute:c5,api:qF,hooks:["contractionTwo"]},m5=[{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"}],d5="(dark|bright|flat|light|soft|pale|dead|dim|faux|little|wee|sheer|most|near|good|extra|all)",Op="(hard|fast|late|early|high|right|deep|close|direct)",h5=[{match:"#Adverb [#Adverb] (and|or|then)",group:0,tag:"Adjective",reason:"kinda-sparkly-and"},{match:`[${d5}] #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 ${Op}`,tag:"#PresentTense #Adverb",reason:"studies-hard"},{match:`#Verb [${Op}] !#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"}],p5=[{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"}],g5=[{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"}],v5=[{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$"}],y5=[{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"}],b5=[{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"}],w5=[{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"}],x5="(feel|sense|process|rush|side|bomb|bully|challenge|cover|crush|dump|exchange|flow|function|issue|lecture|limit|march|process)",D5=[{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 [${x5}] !(#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"}],N5=[{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"}],A5=[{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"}],C5=[{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"}],E5=[{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"}],S5=[{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"}],M5=[{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"}],T5=[{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"}],F5=[{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"}],P5=[{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"}],k5=[{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"}],Wc="(i|we|they)",O5=[{match:"^do not? [#Infinitive #Particle?]",notIf:Wc,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:Wc,group:0,tag:"Imperative",reason:"do-it-better"},{match:"^[#Infinitive] it (please|now|again|plz)",notIf:Wc,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"}],$5=[{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"}],_5=[{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"}];let B5=[{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"}];const I5=[{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"}],z5=[{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"}],j5=[{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"}],q5=[{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"}];let R5=[].concat(_5,m5,h5,p5,g5,y5,w5,b5,D5,N5,A5,C5,E5,S5,M5,T5,F5,v5,P5,k5,O5,$5,B5,I5,z5,j5,q5);const L5={two:{matches:R5}};let Jc=null;const H5=function(e){const{world:t}=e,{model:r,methods:n}=t;Jc=Jc||n.one.buildNet(r.two.matches,t);let i=n.two.quickSplit(e.document).map(s=>{let u=s[0];return[u.index[0],u.index[1],u.index[1]+s.length]}),o=e.update(i);return o.cache(),o.sweep(Jc),e.uncache(),e.unfreeze(),e},G5=e=>e.compute(["freeze","lexicon","preTagger","postTagger","unfreeze"]),V5={postTagger:H5,tagger:G5},U5=e=>Math.round(e*100)/100;function W5(e){e.prototype.confidence=function(){let t=0,r=0;return this.docs.forEach(n=>{n.forEach(a=>{r+=1,t+=a.confidence||1})}),r===0?1:U5(t/r)},e.prototype.tagger=function(){return this.compute(["tagger"])}}const J5={api:W5,compute:V5,model:L5,hooks:["postTagger"]},K5=function(e){return Object.keys(e.hooks).filter(t=>!t.startsWith("#")&&!t.startsWith("%"))},Y5=function(e,t){let r=K5(t);if(r.length===0)return e;e._cache||e.cache();let n=e._cache;return e.filter((a,i)=>r.some(o=>n[i].has(o)))},Z5=function(e,t){let r=t;typeof t=="string"&&(r=this.buildNet([{match:t}]));let n=this.tokenize(e),a=Y5(n,r);return a.found?(a.compute(["index","tagger"]),a.match(t)):n.none()},Q5={lib:{lazy:Z5}},X5=function(e,t){const r=e.methods.two.transform.verb.conjugate;let n=r(t,e.model);return e.has("#Gerund")?n.Gerund:e.has("#PastTense")?n.PastTense:e.has("#PresentTense")?n.PresentTense:e.has("#Gerund")?n.Gerund:t},eP=function(e,t){let r=t;return e.forEach(n=>{n.has("#Infinitive")||(r=X5(n,t)),n.replaceWith(r)}),e},tP=function(e,t){let r=t;if(e.has("#Plural")){const n=e.methods.two.transform.noun.toPlural;r=n(t,e.model)}e.replaceWith(r,{possessives:!0})},rP=function(e,t){const{toAdverb:r}=e.methods.two.transform.adjective;let a=r(t);a&&e.replaceWith(a)},nP=function(e,t){const{toComparative:r,toSuperlative:n}=e.methods.two.transform.adjective;let a=t;e.has("#Comparative")?a=r(a,e.model):e.has("#Superlative")&&(a=n(a,e.model)),a&&e.replaceWith(a)},aP=function(e,t,r){let n=e.split(/ /g).map(i=>i.toLowerCase().trim());n=n.filter(i=>i),n=n.map(i=>`{${i}}`).join(" ");let a=this.match(n);return r&&(a=a.if(r)),a.has("#Verb")?eP(a,t):a.has("#Noun")?tP(a,t):a.has("#Adverb")?rP(a,t):a.has("#Adjective")?nP(a,t):this},iP=function(e){e.prototype.swap=aP},oP={api:iP};tt.plugin(_F);tt.plugin(f5);tt.plugin(J5);tt.plugin(Q5);tt.plugin(oP);const fo=function(e){const{fromComparative:t,fromSuperlative:r}=e.methods.two.transform.adjective;let n=e.text("normal");return e.has("#Comparative")?t(n,e.model):e.has("#Superlative")?r(n,e.model):n},sP=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Adjectives"}json(n={}){const{toAdverb:a,toNoun:i,toSuperlative:o,toComparative:s}=this.methods.two.transform.adjective;return n.normal=!0,this.map(u=>{let l=u.toView().json(n)[0]||{},c=fo(u);return l.adjective={adverb:a(c,this.model),noun:i(c,this.model),superlative:o(c,this.model),comparative:s(c,this.model)},l},[])}adverbs(){return this.before("#Adverb+$").concat(this.after("^#Adverb+"))}conjugate(n){const{toComparative:a,toSuperlative:i,toNoun:o,toAdverb:s}=this.methods.two.transform.adjective;return this.getNth(n).map(u=>{let l=fo(u);return{Adjective:l,Comparative:a(l,this.model),Superlative:i(l,this.model),Noun:o(l,this.model),Adverb:s(l,this.model)}},[])}toComparative(n){const{toComparative:a}=this.methods.two.transform.adjective;return this.getNth(n).map(i=>{let o=fo(i),s=a(o,this.model);return i.replaceWith(s)})}toSuperlative(n){const{toSuperlative:a}=this.methods.two.transform.adjective;return this.getNth(n).map(i=>{let o=fo(i),s=a(o,this.model);return i.replaceWith(s)})}toAdverb(n){const{toAdverb:a}=this.methods.two.transform.adjective;return this.getNth(n).map(i=>{let o=fo(i),s=a(o,this.model);return i.replaceWith(s)})}toNoun(n){const{toNoun:a}=this.methods.two.transform.adjective;return this.getNth(n).map(i=>{let o=fo(i),s=a(o,this.model);return i.replaceWith(s)})}}e.prototype.adjectives=function(r){let n=this.match("#Adjective");return n=n.getNth(r),new t(n.document,n.pointer)},e.prototype.superlatives=function(r){let n=this.match("#Superlative");return n=n.getNth(r),new t(n.document,n.pointer)},e.prototype.comparatives=function(r){let n=this.match("#Comparative");return n=n.getNth(r),new t(n.document,n.pointer)}},uP={api:sP},lP=function(e){return e.compute("root").text("root")},cP=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Adverbs"}conjugate(n){return this.getNth(n).map(a=>{let i=lP(a);return{Adverb:a.text("normal"),Adjective:i}},[])}json(n={}){const a=this.methods.two.transform.adjective.fromAdverb;return n.normal=!0,this.map(i=>{let o=i.toView().json(n)[0]||{};return o.adverb={adjective:a(o.normal)},o},[])}}e.prototype.adverbs=function(r){let n=this.match("#Adverb");return n=n.getNth(r),new t(n.document,n.pointer)}},fP={api:cP},mP=function(e){let t=e.match("@hasComma");return t=t.filter(r=>{if(r.growLeft(".").wordCount()===1||r.growRight(". .").wordCount()===1)return!1;let n=r.grow(".");return n=n.ifNo("@hasComma @hasComma"),n=n.ifNo("@hasComma (and|or) ."),n=n.ifNo("(#City && @hasComma) #Country"),n=n.ifNo("(#WeekDay && @hasComma) #Date"),n=n.ifNo("(#Date+ && @hasComma) #Value"),n=n.ifNo("(#Adjective && @hasComma) #Adjective"),n.found}),e.splitAfter(t)},dP=function(e){let t=e.parentheses();return t=t.filter(r=>r.wordCount()>=3&&r.has("#Verb")&&r.has("#Noun")),e.splitOn(t)},hP=function(e){let t=e.quotations();return t=t.filter(r=>r.wordCount()>=3&&r.has("#Verb")&&r.has("#Noun")),e.splitOn(t)},pP=function(e){let t=this;t=dP(t),t=hP(t),t=mP(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 r=t.match("#Verb .* [but] .* #Verb",0);r.found&&(t=t.splitBefore(r));let n=t.if("if .{2,9} then .").match("then");return t=t.splitBefore(n),typeof e=="number"&&(t=t.get(e)),t},gP=function(e){let t=[],r=null;return e.clauses().docs.forEach(i=>{i.forEach(o=>{!o.chunk||o.chunk!==r?(r=o.chunk,t.push([o.index[0],o.index[1],o.index[1]+1])):t[t.length-1][2]=o.index[1]+1}),r=null}),e.update(t)},vP=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Chunks"}isVerb(){return this.filter(n=>n.has("<Verb>"))}isNoun(){return this.filter(n=>n.has("<Noun>"))}isAdjective(){return this.filter(n=>n.has("<Adjective>"))}isPivot(){return this.filter(n=>n.has("<Pivot>"))}debug(){return this.toView().debug("chunks"),this}update(n){let a=new t(this.document,n);return a._cache=this._cache,a}}e.prototype.chunks=function(r){let n=gP(this);return n=n.getNth(r),new t(this.document,n.pointer)},e.prototype.clauses=pP},$p={this:"Noun",then:"Pivot"},yP=function(e){for(let t=0;t<e.length;t+=1)for(let r=0;r<e[t].length;r+=1){let n=e[t][r];if($p.hasOwnProperty(n.normal)===!0){n.chunk=$p[n.normal];continue}if(n.tags.has("Verb")){n.chunk="Verb";continue}if(n.tags.has("Noun")||n.tags.has("Determiner")){n.chunk="Noun";continue}if(n.tags.has("Value")){n.chunk="Noun";continue}if(n.tags.has("QuestionWord")){n.chunk="Pivot";continue}}},bP=function(e){for(let t=0;t<e.length;t+=1)for(let r=0;r<e[t].length;r+=1){let n=e[t][r];if(n.chunk)continue;let a=e[t][r+1],i=e[t][r-1];if(n.tags.has("Adjective")){if(i&&i.tags.has("Copula")){n.chunk="Adjective";continue}if(i&&i.tags.has("Determiner")){n.chunk="Noun";continue}if(a&&a.tags.has("Noun")){n.chunk="Noun";continue}continue}if(n.tags.has("Adverb")||n.tags.has("Negative")){if(i&&i.tags.has("Adjective")){n.chunk="Adjective";continue}if(i&&i.tags.has("Verb")){n.chunk="Verb";continue}if(a&&a.tags.has("Adjective")){n.chunk="Adjective";continue}if(a&&a.tags.has("Verb")){n.chunk="Verb";continue}}}},wP=[{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"}];let Kc=null;const xP=function(e,t,r){const{methods:n}=r;Kc=Kc||n.one.buildNet(wP,r),e.sweep(Kc)},Yc=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},DP=function(e){for(let t=0;t<e.length;t+=1)for(let r=0;r<e[t].length;r+=1){let n=e[t][r];n.chunk===void 0&&(n.tags.has("Conjunction")||n.tags.has("Preposition")?Yc(n,"Pivot"):n.tags.has("Adverb")?Yc(n,"Verb"):n.chunk="Noun")}},NP=function(e){let t=[],r=null;e.forEach(n=>{for(let a=0;a<n.length;a+=1){let i=n[a];r&&i.chunk===r?t[t.length-1].terms.push(i):(t.push({chunk:i.chunk,terms:[i]}),r=i.chunk)}}),t.forEach(n=>{n.chunk==="Verb"&&(n.terms.find(i=>i.tags.has("Verb"))||n.terms.forEach(i=>i.chunk=null))})},AP=function(e){const{document:t,world:r}=e;yP(t),bP(t),xP(e,t,r),DP(t),NP(t)},CP={chunks:AP},EP={compute:CP,api:vP,hooks:["chunks"]},Cu=/\./g,SP=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Acronyms"}strip(){return this.docs.forEach(n=>{n.forEach(a=>{a.text=a.text.replace(Cu,""),a.normal=a.normal.replace(Cu,"")})}),this}addPeriods(){return this.docs.forEach(n=>{n.forEach(a=>{a.text=a.text.replace(Cu,""),a.normal=a.normal.replace(Cu,""),a.text=a.text.split("").join(".")+".",a.normal=a.normal.split("").join(".")+"."})}),this}}e.prototype.acronyms=function(r){let n=this.match("#Acronym");return n=n.getNth(r),new t(n.document,n.pointer)}},Ew=/\(/,Sw=/\)/,MP=function(e,t){for(;t<e.length;t+=1)if(e[t].post&&Sw.test(e[t].post)){let[,r]=e[t].index;return r=r||0,r}return null},TP=function(e){let t=[];return e.docs.forEach(r=>{for(let n=0;n<r.length;n+=1){let a=r[n];if(a.pre&&Ew.test(a.pre)){let i=MP(r,n);if(i!==null){let[o,s]=r[n].index;t.push([o,s,i+1,r[n].id]),n=i}}}}),e.update(t)},FP=function(e){return e.docs.forEach(t=>{t[0].pre=t[0].pre.replace(Ew,"");let r=t[t.length-1];r.post=r.post.replace(Sw,"")}),e},PP=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Possessives"}strip(){return FP(this)}}e.prototype.parentheses=function(r){let n=TP(this);return n=n.getNth(r),new t(n.document,n.pointer)}},_p=/'s$/,kP=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},OP=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Possessives"}strip(){return this.docs.forEach(n=>{n.forEach(a=>{a.text=a.text.replace(_p,""),a.normal=a.normal.replace(_p,"")})}),this}}e.prototype.possessives=function(r){let n=kP(this);return n=n.getNth(r),new t(n.document,n.pointer)}},Tl={'"':'"',""":""","'":"'","“":"”","‘":"’","‟":"”","‛":"’","„":"”","⹂":"”","‚":"’","«":"»","‹":"›","‵":"′","‶":"″","‷":"‴","〝":"〞","`":"´","〟":"〞"},sd=RegExp("["+Object.keys(Tl).join("")+"]"),$P=RegExp("["+Object.values(Tl).join("")+"]"),_P=function(e,t){const r=e[t].pre.match(sd)[0]||"";if(!r||!Tl[r])return null;const n=Tl[r];for(;t<e.length;t+=1)if(e[t].post&&e[t].post.match(n))return t;return null},BP=function(e){let t=[];return e.docs.forEach(r=>{for(let n=0;n<r.length;n+=1){let a=r[n];if(a.pre&&sd.test(a.pre)){let i=_P(r,n);if(i!==null){let[o,s]=r[n].index;t.push([o,s,i+1,r[n].id]),n=i}}}}),e.update(t)},IP=function(e){e.docs.forEach(t=>{t[0].pre=t[0].pre.replace(sd,"");let r=t[t.length-1];r.post=r.post.replace($P,"")})},zP=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Possessives"}strip(){return IP(this)}}e.prototype.quotations=function(r){let n=BP(this);return n=n.getNth(r),new t(n.document,n.pointer)}},jP=function(e){let t=this.splitAfter("@hasComma");return t=t.match("#PhoneNumber+"),t=t.getNth(e),t},qP=[["hyphenated","@hasHyphen ."],["hashTags","#HashTag"],["emails","#Email"],["emoji","#Emoji"],["emoticons","#Emoticon"],["atMentions","#AtMention"],["urls","#Url"],["conjunctions","#Conjunction"],["prepositions","#Preposition"],["abbreviations","#Abbreviation"],["honorifics","#Honorific"]];let RP=[["emojis","emoji"],["atmentions","atMentions"]];const LP=function(e){qP.forEach(t=>{e.prototype[t[0]]=function(r){let n=this.match(t[1]);return typeof r=="number"?n.get(r):n}}),e.prototype.phoneNumbers=jP,RP.forEach(t=>{e.prototype[t[0]]=e.prototype[t[1]]})},HP=/\//,GP=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Slashes"}split(){return this.map(n=>{let i=n.text().split(HP);return n=n.replaceWith(i.join(" ")),n.growRight("("+i.join("|")+")+")})}}e.prototype.slashes=function(r){let n=this.match("#SlashedTerm");return n=n.getNth(r),new t(n.document,n.pointer)}},VP={api:function(e){SP(e),PP(e),OP(e),zP(e),LP(e),GP(e)}},Eu=function(e,t){e.docs.forEach(r=>{r.forEach(t)})},Bp={case:e=>{Eu(e,t=>{t.text=t.text.toLowerCase()})},unicode:e=>{const t=e.world,r=t.methods.one.killUnicode;Eu(e,n=>n.text=r(n.text,t))},whitespace:e=>{Eu(e,t=>{t.post=t.post.replace(/\s+/g," "),t.post=t.post.replace(/\s([.,?!:;])/g,"$1"),t.pre=t.pre.replace(/\s+/g,"")})},punctuation:e=>{Eu(e,n=>{n.post=n.post.replace(/[–—-]/g," "),n.post=n.post.replace(/[,:;]/g,""),n.post=n.post.replace(/\.{2,}/g,""),n.post=n.post.replace(/\?{2,}/g,"?"),n.post=n.post.replace(/!{2,}/g,"!"),n.post=n.post.replace(/\?!+/g,"?")});let t=e.docs,r=t[t.length-1];if(r&&r.length>0){let n=r[r.length-1];n.post=n.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=>{const t=/^\s*([-–—*•])\s*$/;return e.docs.forEach(r=>{t.test(r[0].pre)&&(r[0].pre=r[0].pre.replace(t,""))}),e}},Zc=e=>e.split("|").reduce((t,r)=>(t[r]=!0,t),{}),Qc="unicode|punctuation|whitespace|acronyms",Ip="|case|contractions|parentheses|quotations|emoji|honorifics|debullet",UP="|possessives|adverbs|nouns|verbs",WP={light:Zc(Qc),medium:Zc(Qc+Ip),heavy:Zc(Qc+Ip+UP)};function JP(e){e.prototype.normalize=function(t="light"){return typeof t=="string"&&(t=WP[t]),Object.keys(t).forEach(r=>{Bp.hasOwnProperty(r)&&Bp[r](this,t[r])}),this}}const KP={api:JP},YP=function(e){let t=e.clauses().match("<Noun>"),r=t.match("@hasComma");return r=r.not("#Place"),r.found&&(t=t.splitAfter(r)),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},zp=["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"],ZP=function(e){if(e.before("#Preposition$").found)return!0;if(!e.before().found)return!1;for(let r=0;r<zp.length;r+=1)if(e.has(zp[r]))return!0;return!1},QP="(#Pronoun|#Place|#Value|#Person|#Uncountable|#Month|#WeekDay|#Holiday|#Possessive)",XP=function(e,t){if(e.has("#Plural")||e.has("#Noun and #Noun")||e.has("(we|they)"))return!0;if(t.has(QP)===!0||e.has("#Singular"))return!1;let r=t.text("normal");return r.length>3&&r.endsWith("s")&&!r.endsWith("ss")},ek=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},Va=function(e){let t=ek(e);return{determiner:e.match("#Determiner").eq(0),adjectives:e.match("#Adjective"),number:e.values(),isPlural:XP(e,t),isSubordinate:ZP(e),root:t}},jp=e=>e.text(),tk=e=>e.json({terms:!1,normal:!0}).map(t=>t.normal),rk=function(e){let t=null;if(!e.found)return t;let r=e.values(0);return r.found?(r.parse()[0]||{}).num:t},nk=function(e){let t=Va(e);return{root:jp(t.root),number:rk(t.number),determiner:jp(t.determiner),adjectives:tk(t.adjectives),isPlural:t.isPlural,isSubordinate:t.isSubordinate}},Mw=function(e){return!e.has("^(#Uncountable|#ProperNoun|#Place|#Pronoun|#Acronym)+$")},ak={tags:!0},ik=function(e,t){if(t.isPlural===!0||(t.root.has("#Possessive")&&(t.root=t.root.possessives().strip()),!Mw(t.root)))return e;const{methods:r,model:n}=e.world,{toPlural:a}=r.two.transform.noun;let i=t.root.text({keepPunct:!1}),o=a(i,n);e.match(t.root).replaceWith(o,ak).tag("Plural","toPlural"),t.determiner.has("(a|an)")&&e.remove(t.determiner);let s=t.root.after("not? #Adverb+? [#Copula]",0);return s.found&&(s.has("is")?e.replace(s,"are"):s.has("was")&&e.replace(s,"were")),e},ok={tags:!0},sk=function(e,t){if(t.isPlural===!1)return e;const{methods:r,model:n}=e.world,{toSingular:a}=r.two.transform.noun;let i=t.root.text("normal"),o=a(i,n);return e.replace(t.root,o,ok).tag("Singular","toPlural"),e},uk=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Nouns"}parse(n){return this.getNth(n).map(Va)}json(n){let a=typeof n=="object"?n:{};return this.getNth(n).map(i=>{let o=i.toView().json(a)[0]||{};return a&&a.noun!==!1&&(o.noun=nk(i)),o},[])}conjugate(n){const a=this.world.methods.two.transform.noun;return this.getNth(n).map(i=>{let o=Va(i),s=o.root.compute("root").text("root"),u={Singular:s};return Mw(o.root)&&(u.Plural=a.toPlural(s,this.model)),u.Singular===u.Plural&&delete u.Plural,u},[])}isPlural(n){return this.filter(i=>Va(i).isPlural).getNth(n)}isSingular(n){return this.filter(i=>!Va(i).isPlural).getNth(n)}adjectives(n){let a=this.update([]);return this.forEach(i=>{let o=Va(i).adjectives;o.found&&(a=a.concat(o))}),a.getNth(n)}toPlural(n){return this.getNth(n).map(a=>ik(a,Va(a)))}toSingular(n){return this.getNth(n).map(a=>{let i=Va(a);return sk(a,i)})}update(n){let a=new t(this.document,n);return a._cache=this._cache,a}}e.prototype.nouns=function(r){let n=YP(this);return n=n.getNth(r),new t(this.document,n.pointer)}},lk={api:uk},ck=function(e,t){let r=e.match("#Fraction+");return r=r.filter(n=>!n.lookBehind("#Value and$").found),r=r.notIf("#Value seconds"),r},fk=e=>{const t=[{reg:/^(minus|negative)[\s-]/i,mult:-1},{reg:/^(a\s)?half[\s-](of\s)?/i,mult:.5}];for(let r=0;r<t.length;r++)if(t[r].reg.test(e)===!0)return{amount:t[r].mult,str:e.replace(t[r].reg,"")};return{amount:1,str:e}},Xt={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:1e12,quadrillionth:1e15,quintillionth:1e18,sextillionth:1e21,septillionth:1e24,hundred:100,thousand:1e3,million:1e6,billion:1e9,trillion:1e12,quadrillion:1e15,quintillion:1e18,sextillion:1e21,septillion:1e24,grand:1e3}},mk=(e,t)=>{if(Xt.ones.hasOwnProperty(e)){if(t.ones||t.teens)return!1}else if(Xt.teens.hasOwnProperty(e)){if(t.ones||t.teens||t.tens)return!1}else if(Xt.tens.hasOwnProperty(e)&&(t.ones||t.teens||t.tens))return!1;return!0},dk=function(e){let t="0.";for(let r=0;r<e.length;r++){let n=e[r];if(Xt.ones.hasOwnProperty(n)===!0)t+=Xt.ones[n];else if(Xt.teens.hasOwnProperty(n)===!0)t+=Xt.teens[n];else if(Xt.tens.hasOwnProperty(n)===!0)t+=Xt.tens[n];else if(/^[0-9]$/.test(n)===!0)t+=n;else return 0}return parseFloat(t)},hk=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),pk=/^([0-9,. ]+)\/([0-9,. ]+)$/,qp={"a few":3,"a couple":2,"a dozen":12,"two dozen":24,zero:0},Su=e=>Object.keys(e).reduce((t,r)=>(t+=e[r],t),0),em=function(e){if(qp.hasOwnProperty(e)===!0)return qp[e];if(e==="a"||e==="an")return 1;const t=fk(e);e=t.str;let r=null,n={},a=0,i=!1;const o=e.split(/[ -]/);for(let s=0;s<o.length;s++){let u=o[s];if(u=hk(u),!u||u==="and")continue;if(u==="-"||u==="negative"){i=!0;continue}if(u.charAt(0)==="-"&&(i=!0,u=u.substring(1)),u==="point")return a+=Su(n),a+=dk(o.slice(s+1,o.length)),a*=t.amount,a;const l=u.match(pk);if(l){const c=parseFloat(l[1].replace(/[, ]/g,"")),f=parseFloat(l[2].replace(/[, ]/g,""));f&&(a+=c/f||0);continue}if(Xt.tens.hasOwnProperty(u)&&n.ones&&Object.keys(n).length===1&&(a=n.ones*100,n={}),mk(u,n)===!1)return null;if(/^[0-9.]+$/.test(u))n.ones=parseFloat(u);else if(Xt.ones.hasOwnProperty(u)===!0)n.ones=Xt.ones[u];else if(Xt.teens.hasOwnProperty(u)===!0)n.teens=Xt.teens[u];else if(Xt.tens.hasOwnProperty(u)===!0)n.tens=Xt.tens[u];else if(Xt.multiples.hasOwnProperty(u)===!0){let c=Xt.multiples[u];if(c===r)return null;if(c===100&&o[s+1]!==void 0){const f=o[s+1];Xt.multiples[f]&&(c*=Xt.multiples[f],s+=1)}r===null||c<r?(a+=(Su(n)||1)*c,r=c,n={}):(a+=Su(n),r=c,a=(a||1)*c,n={})}}return a+=Su(n),a*=t.amount,a*=i?-1:1,a===0&&Object.keys(n).length===0?null:a},Rp=/s$/,Ps=function(e){let t=e.text("reduced");return em(t)};let Fl={half:2,halve:2,quarter:4};const gk=function(e){let r=e.text("reduced").match(/^([-+]?[0-9]+)\/([-+]?[0-9]+)(st|nd|rd|th)?s?$/);return r&&r[1]&&r[0]?{numerator:Number(r[1]),denominator:Number(r[2])}:null},vk=function(e){let t=e.match("[<num>#Value+] out of every? [<den>#Value+]");if(t.found!==!0)return null;let{num:r,den:n}=t.groups();return!r||!n||(r=Ps(r),n=Ps(n),!r||!n)?null:typeof r=="number"&&typeof n=="number"?{numerator:r,denominator:n}:null},yk=function(e){let t=e.match("[<num>(#Cardinal|a)+] [<den>#Fraction+]");if(t.found!==!0)return null;let{num:r,den:n}=t.groups();r.has("a")?r=1:r=Ps(r);let a=n.text("reduced");return Rp.test(a)&&(a=a.replace(Rp,""),n=n.replaceWith(a)),Fl.hasOwnProperty(a)?n=Fl[a]:n=Ps(n),typeof r=="number"&&typeof n=="number"?{numerator:r,denominator:n}:null},bk=function(e){let t=e.match("^#Ordinal$");return t.found!==!0?null:e.lookAhead("^of .")?{numerator:1,denominator:Ps(t)}:null},wk=function(e){let t=e.text("reduced");return Fl.hasOwnProperty(t)?{numerator:1,denominator:Fl[t]}:null},xk=e=>{let t=Math.round(e*1e3)/1e3;return t===0&&e!==0?e:t},xa=function(e){e=e.clone();let t=wk(e)||gk(e)||vk(e)||yk(e)||bk(e)||null;return t!==null&&t.numerator&&t.denominator&&(t.decimal=t.numerator/t.denominator,t.decimal=xk(t.decimal)),t},ud=function(e){if(e<1e6)return String(e);let t;return typeof e=="number"?t=e.toFixed(0):t=e,t.indexOf("e+")===-1?t:t.replace(".","").split("e+").reduce(function(r,n){return r+Array(n-r.length+2).join(0)})},Mu=[["ninety",90],["eighty",80],["seventy",70],["sixty",60],["fifty",50],["forty",40],["thirty",30],["twenty",20]],Lp=["","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"],Dk=[[1e24,"septillion"],[1e20,"hundred sextillion"],[1e21,"sextillion"],[1e20,"hundred quintillion"],[1e18,"quintillion"],[1e17,"hundred quadrillion"],[1e15,"quadrillion"],[1e14,"hundred trillion"],[1e12,"trillion"],[1e11,"hundred billion"],[1e9,"billion"],[1e8,"hundred million"],[1e6,"million"],[1e5,"hundred thousand"],[1e3,"thousand"],[100,"hundred"],[1,"one"]],Nk=function(e){let t=e,r=[];return Dk.forEach(n=>{if(e>=n[0]){let a=Math.floor(t/n[0]);t-=a*n[0],a&&r.push({unit:n[1],count:a})}}),r},Ak=function(e){let t=[];if(e>100)return t;for(let r=0;r<Mu.length;r++)e>=Mu[r][1]&&(e-=Mu[r][1],t.push(Mu[r][0]));return Lp[e]&&t.push(Lp[e]),t},Ck=e=>{const t=["zero","one","two","three","four","five","six","seven","eight","nine"];let r=[],a=ud(e).match(/\.([0-9]+)/);if(!a||!a[0])return r;r.push("point");let i=a[0].split("");for(let o=0;o<i.length;o++)r.push(t[i[o]]);return r},ks=function(e){let t=e.num;if(t===0||t==="0")return"zero";t>1e21&&(t=ud(t));let r=[];t<0&&(r.push("minus"),t=Math.abs(t));let n=Nk(t);for(let a=0;a<n.length;a++){let i=n[a].unit;i==="one"&&(i="",r.length>1&&r.push("and")),r=r.concat(Ak(n[a].count)),r.push(i)}return r=r.concat(Ck(t)),r=r.filter(a=>a),r.length===0&&(r[0]=""),r.join(" ")},Ek=function(e){if(!e.numerator||!e.denominator)return"";let t=ks({num:e.numerator}),r=ks({num:e.denominator});return`${t} out of ${r}`},Hp={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"},Tw=e=>{let t=ks(e).split(" "),r=t[t.length-1];return Hp.hasOwnProperty(r)?t[t.length-1]=Hp[r]:t[t.length-1]=r.replace(/y$/,"i")+"th",t.join(" ")},Sk=function(e){if(!e.numerator||!e.denominator)return"";let t=ks({num:e.numerator}),r=Tw({num:e.denominator});return e.denominator===2&&(r="half"),t&&r?(e.numerator!==1&&(r+="s"),`${t} ${r}`):""},Mk=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Fractions"}parse(n){return this.getNth(n).map(xa)}get(n){return this.getNth(n).map(xa)}json(n){return this.getNth(n).map(a=>{let i=a.toView().json(n)[0],o=xa(a);return i.fraction=o,i},[])}toDecimal(n){return this.getNth(n).forEach(a=>{let{decimal:i}=xa(a);a=a.replaceWith(String(i),!0),a.tag("NumericValue"),a.unTag("Fraction")}),this}toFraction(n){return this.getNth(n).forEach(a=>{let i=xa(a);if(i&&typeof i.numerator=="number"&&typeof i.denominator=="number"){let o=`${i.numerator}/${i.denominator}`;this.replace(a,o)}}),this}toOrdinal(n){return this.getNth(n).forEach(a=>{let i=xa(a),o=Sk(i);a.after("^#Noun").found&&(o+=" of"),a.replaceWith(o)}),this}toCardinal(n){return this.getNth(n).forEach(a=>{let i=xa(a),o=Ek(i);a.replaceWith(o)}),this}toPercentage(n){return this.getNth(n).forEach(a=>{let{decimal:i}=xa(a),o=i*100;o=Math.round(o*100)/100,a.replaceWith(`${o}%`)}),this}}e.prototype.fractions=function(r){let n=ck(this);return n=n.getNth(r),new t(this.document,n.pointer)}},Tk="one|two|three|four|five|six|seven|eight|nine",La="twenty|thirty|forty|fifty|sixty|seventy|eighty|ninety|fourty",Fk="eleven|twelve|thirteen|fourteen|fifteen|sixteen|seventeen|eighteen|nineteen",Xc=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("("+La+") #Cardinal #Cardinal")&&(t=t.splitAfter("("+La+") #Cardinal")),t.has("#Value #Value")){t.has("#NumericValue #NumericValue")&&(t=t.splitOn("#Year")),t.has("("+La+") ("+Fk+")")&&(t=t.splitAfter("("+La+")"));let r=t.match("#Cardinal #Cardinal");if(r.found&&!t.has("(point|decimal|#Fraction)")&&!r.has("#Cardinal (#Multiple|point|decimal)")){let n=t.has(`(${Tk}) (${La})`),a=r.has("("+La+") #Cardinal"),i=r.has("#Multiple #Value");!n&&!a&&!i&&r.terms().forEach(o=>{t=t.splitOn(o)})}t.match("#Ordinal #Ordinal").match("#TextValue").found&&!t.has("#Multiple")&&(t.has("("+La+") #Ordinal")||(t=t.splitAfter("#Ordinal"))),t=t.splitBefore("#Ordinal [#Cardinal]",0),t.has("#TextValue #NumericValue")&&!t.has("("+La+"|#Multiple)")&&(t=t.splitBefore("#TextValue #NumericValue"))}return t=t.splitAfter("#NumberRange"),t=t.splitBefore("#Year"),t},Pk=function(e,t){e=e.replace(/,/g,"");let r=e.split(/([0-9.,]*)/),[n,a]=r,i=r.slice(2).join("");return a!==""&&t.length<2?(a=Number(a||e),typeof a!="number"&&(a=null),i=i||"",(i==="st"||i==="nd"||i==="rd"||i==="th")&&(i=""),{prefix:n||"",num:a,suffix:i}):null},br=function(e){if(typeof e=="string")return{num:em(e)};let t=e.text("reduced"),r=e.growRight("#Unit").match("#Unit$").text("machine"),n=/[0-9],[0-9]/.test(e.text("text"));if(e.terms().length===1&&!e.has("#Multiple")){let s=Pk(t,e);if(s!==null)return s.hasComma=n,s.unit=r,s}let a=e.match("#Fraction{2,}$");a=a.found===!1?e.match("^#Fraction$"):a;let i=null;a.found&&(a.has("#Value and #Value #Fraction")&&(a=a.match("and #Value #Fraction")),i=xa(a),e=e.not(a),e=e.not("and$"),t=e.text("reduced"));let o=0;return t&&(o=em(t)||0),i&&i.decimal&&(o+=i.decimal),{hasComma:n,prefix:"",num:o,suffix:"",isOrdinal:e.has("#Ordinal"),isText:e.has("#TextValue"),isFraction:e.has("#Fraction"),isMoney:e.has("#Money"),unit:r}},kk=function(e){let t=e.num;if(!t&&t!==0)return null;let r=t%100;if(r>10&&r<20)return String(t)+"th";const n={0:"th",1:"st",2:"nd",3:"rd"};let a=ud(t),i=a.slice(a.length-1,a.length);return n[i]?a+=n[i]:a+="th",a},Gp={"¢":"cents",$:"dollars","£":"pounds","¥":"yen","€":"euros","₡":"colón","฿":"baht","₭":"kip","₩":"won","₹":"rupees","₽":"ruble","₺":"liras"},Vp={"%":"percent","°":"degrees"},Up=function(e){let t={suffix:"",prefix:e.prefix};return Gp.hasOwnProperty(e.prefix)&&(t.suffix+=" "+Gp[e.prefix],t.prefix=""),Vp.hasOwnProperty(e.suffix)&&(t.suffix+=" "+Vp[e.suffix]),t.suffix&&e.num===1&&(t.suffix=t.suffix.replace(/s$/,"")),!t.suffix&&e.suffix&&(t.suffix+=" "+e.suffix),t},Ni=function(e,t){if(t==="TextOrdinal"){let{prefix:n,suffix:a}=Up(e);return n+Tw(e)+a}if(t==="Ordinal")return e.prefix+kk(e)+e.suffix;if(t==="TextCardinal"){let{prefix:n,suffix:a}=Up(e);return n+ks(e)+a}let r=e.num;return e.hasComma&&(r=r.toLocaleString()),e.prefix+String(r)+e.suffix},Ok=e=>Object.prototype.toString.call(e)==="[object Array]",$k=function(e){if(typeof e=="string"||typeof e=="number"){let t={};return t[e]=!0,t}return Ok(e)?e.reduce((t,r)=>(t[r]=!0,t),{}):e||{}},_k=function(e,t={}){return t=$k(t),e.filter(r=>{let{unit:n}=br(r);return!!(n&&t[n]===!0)})},Bk=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Numbers"}parse(n){return this.getNth(n).map(br)}get(n){return this.getNth(n).map(br).map(a=>a.num)}json(n){let a=typeof n=="object"?n:{};return this.getNth(n).map(i=>{let o=i.toView().json(a)[0],s=br(i);return o.number={prefix:s.prefix,num:s.num,suffix:s.suffix,hasComma:s.hasComma,unit:s.unit},o},[])}units(){return this.growRight("#Unit").match("#Unit$")}isUnit(n){return _k(this,n)}isOrdinal(){return this.if("#Ordinal")}isCardinal(){return this.if("#Cardinal")}toNumber(){let n=this.map(a=>{if(!this.has("#TextValue"))return a;let i=br(a);if(i.num===null)return a;let o=a.has("#Ordinal")?"Ordinal":"Cardinal",s=Ni(i,o);return a.replaceWith(s,{tags:!0}),a.tag("NumericValue")});return new t(n.document,n.pointer)}toLocaleString(){return this.forEach(a=>{let i=br(a);if(i.num===null)return;let o=i.num.toLocaleString();if(a.has("#Ordinal")){let u=Ni(i,"Ordinal").match(/[a-z]+$/);u&&(o+=u[0]||"")}a.replaceWith(o,{tags:!0})}),this}toText(){let a=this.map(i=>{if(i.has("#TextValue"))return i;let o=br(i);if(o.num===null)return i;let s=i.has("#Ordinal")?"TextOrdinal":"TextCardinal",u=Ni(o,s);return i.replaceWith(u,{tags:!0}),i.tag("TextValue"),i});return new t(a.document,a.pointer)}toCardinal(){let a=this.map(i=>{if(!i.has("#Ordinal"))return i;let o=br(i);if(o.num===null)return i;let s=i.has("#TextValue")?"TextCardinal":"Cardinal",u=Ni(o,s);return i.replaceWith(u,{tags:!0}),i.tag("Cardinal"),i});return new t(a.document,a.pointer)}toOrdinal(){let a=this.map(i=>{if(i.has("#Ordinal"))return i;let o=br(i);if(o.num===null)return i;let s=i.has("#TextValue")?"TextOrdinal":"Ordinal",u=Ni(o,s);return i.replaceWith(u,{tags:!0}),i.tag("Ordinal"),i});return new t(a.document,a.pointer)}isEqual(n){return this.filter(a=>br(a).num===n)}greaterThan(n){return this.filter(a=>br(a).num>n)}lessThan(n){return this.filter(a=>br(a).num<n)}between(n,a){return this.filter(i=>{let o=br(i).num;return o>n&&o<a})}set(n){if(n===void 0)return this;typeof n=="string"&&(n=br(n).num);let i=this.map(o=>{let s=br(o);if(s.num=n,s.num===null)return o;let u=o.has("#Ordinal")?"Ordinal":"Cardinal";o.has("#TextValue")&&(u=o.has("#Ordinal")?"TextOrdinal":"TextCardinal");let l=Ni(s,u);return s.hasComma&&u==="Cardinal"&&(l=Number(l).toLocaleString()),o=o.not("#Currency"),o.replaceWith(l,{tags:!0}),o});return new t(i.document,i.pointer)}add(n){if(!n)return this;typeof n=="string"&&(n=br(n).num);let i=this.map(o=>{let s=br(o);if(s.num===null)return o;s.num+=n;let u=o.has("#Ordinal")?"Ordinal":"Cardinal";s.isText&&(u=o.has("#Ordinal")?"TextOrdinal":"TextCardinal");let l=Ni(s,u);return o.replaceWith(l,{tags:!0}),o});return new t(i.document,i.pointer)}subtract(n,a){return this.add(n*-1,a)}increment(n){return this.add(1,n)}decrement(n){return this.add(-1,n)}update(n){let a=new t(this.document,n);return a._cache=this._cache,a}}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(r){let n=Xc(this);return n=n.getNth(r),new t(this.document,n.pointer)},e.prototype.percentages=function(r){let n=Xc(this);return n=n.filter(a=>a.has("#Percent")||a.after("^percent")),n=n.getNth(r),new t(this.document,n.pointer)},e.prototype.money=function(r){let n=Xc(this);return n=n.filter(a=>a.has("#Money")||a.after("^#Currency")),n=n.getNth(r),new t(this.document,n.pointer)},e.prototype.values=e.prototype.numbers},Ik=function(e){Mk(e),Bk(e)},zk={api:Ik},jk={people:!0,emails:!0,phoneNumbers:!0,places:!0},qk=function(e={}){return e=Object.assign({},jk,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},Rk={api:function(e){e.prototype.redact=qk}},Lk=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)$"))},Hk=function(e){const t=/\?/,{document:r}=e;return e.filter(n=>{let a=n.docs[0]||[],i=a[a.length-1];return!i||r[i.index[0]].length!==a.length?!1:t.test(i.post)?!0:Lk(n)})},Gk="(after|although|as|because|before|if|since|than|that|though|when|whenever|where|whereas|wherever|whether|while|why|unless|until|once)",Vk="(that|which|whichever|who|whoever|whom|whose|whomever)",Uk=function(e){let t=e;return t.length===1||(t=t.if("#Verb"),t.length===1)||(t=t.ifNo(Gk),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(Vk),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))},Wk=function(e){let t=null;return e.has("#PastTense")?t="PastTense":e.has("#FutureTense")?t="FutureTense":e.has("#PresentTense")&&(t="PresentTense"),{tense:t}},Ai=function(e){let t=e.clauses(),n=Uk(t).chunks(),a=e.none(),i=e.none(),o=e.none();return n.forEach((s,u)=>{if(u===0&&!s.has("<Verb>")){a=s;return}if(!i.found&&s.has("<Verb>")){i=s;return}i.found&&(o=o.concat(s))}),i.found&&!a.found&&(a=i.before("<Noun>+").first()),{subj:a,verb:i,pred:o,grammar:Wk(i)}},Jk=function(e){let t=e.verbs(),r=t.eq(0);if(r.has("#PastTense"))return e;if(r.toPastTense(),t.length>1){t=t.slice(1),t=t.filter(a=>!a.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},Kk=function(e){let t=e.verbs();return t.eq(0).toPresentTense(),t.length>1&&(t=t.slice(1),t=t.filter(n=>!n.lookBehind("to$").found),t=t.notIf("#Gerund"),t.found&&t.verbs().toPresentTense()),e},Yk=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 n=t.filter(a=>a.lookBehind("to$").found?!1:a.has("#Copula #Gerund")?!0:a.has("#Gerund")?!1:a.has("#Copula")?!0:!(a.has("#PresentTense")&&!a.has("#Infinitive")&&a.lookBefore("(he|she|it|that|which)$").found));n.found&&n.forEach(a=>{if(a.has("#Copula")){a.match("was").replaceWith("is"),a.match("is").replaceWith("will be");return}a.toInfinitive()})}return e},Zk=function(e){return e.verbs().first().toNegative().compute("chunks"),e},Qk=function(e){return e.verbs().first().toPositive().compute("chunks"),e},Xk=function(e){return e.verbs().toInfinitive(),e},eO=function(e){class t extends e{constructor(a,i,o){super(a,i,o),this.viewType="Sentences"}json(a={}){return this.map(i=>{let o=i.toView().json(a)[0]||{},{subj:s,verb:u,pred:l,grammar:c}=Ai(i);return o.sentence={subject:s.text("normal"),verb:u.text("normal"),predicate:l.text("normal"),grammar:c},o},[])}toPastTense(a){return this.getNth(a).map(i=>(Ai(i),Jk(i)))}toPresentTense(a){return this.getNth(a).map(i=>(Ai(i),Kk(i)))}toFutureTense(a){return this.getNth(a).map(i=>(Ai(i),i=Yk(i),i))}toInfinitive(a){return this.getNth(a).map(i=>(Ai(i),Xk(i)))}toNegative(a){return this.getNth(a).map(i=>(Ai(i),Zk(i)))}toPositive(a){return this.getNth(a).map(i=>(Ai(i),Qk(i)))}isQuestion(a){return this.questions(a)}isExclamation(a){return this.filter(o=>o.lastTerm().has("@hasExclamation")).getNth(a)}isStatement(a){return this.filter(o=>!o.isExclamation().found&&!o.isQuestion().found).getNth(a)}update(a){let i=new t(this.document,a);return i._cache=this._cache,i}}t.prototype.toPresent=t.prototype.toPresentTense,t.prototype.toPast=t.prototype.toPastTense,t.prototype.toFuture=t.prototype.toFutureTense;const r={sentences:function(n){let a=this.map(i=>i.fullSentence());return a=a.getNth(n),new t(this.document,a.pointer)},questions:function(n){return Hk(this).getNth(n)}};Object.assign(e.prototype,r)},tO={api:eO},rO=function(e){let t=e.splitAfter("@hasComma");t=t.match("#Honorific+? #Person+");let r=t.match("#Possessive").notIf("(his|her)");return t=t.splitAfter(r),t},Wp=function(e){let t={};t.firstName=e.match("#FirstName+"),t.lastName=e.match("#LastName+"),t.honorific=e.match("#Honorific+");let r=t.lastName,n=t.firstName;return(!n.found||!r.found)&&!n.found&&!r.found&&e.has("^#Honorific .$")&&(t.lastName=e.match(".$")),t},wn="male",jr="female",Jp={mr:wn,mrs:jr,miss:jr,madam:jr,king:wn,queen:jr,duke:wn,duchess:jr,baron:wn,baroness:jr,count:wn,countess:jr,prince:wn,princess:jr,sire:wn,dame:jr,lady:jr,ayatullah:wn,congressman:wn,congresswoman:jr,"first lady":jr,mx:null},nO=function(e,t){let{firstName:r,honorific:n}=e;if(r.has("#FemaleName"))return jr;if(r.has("#MaleName"))return wn;if(n.found){let i=n.text("normal");if(i=i.replace(/\./g,""),Jp.hasOwnProperty(i))return Jp[i];if(/^her /.test(i))return jr;if(/^his /.test(i))return wn}let a=t.after();if(!a.has("#Person")&&a.has("#Pronoun")){let i=a.match("#Pronoun");if(i.has("(they|their)"))return null;let o=i.has("(he|his)"),s=i.has("(she|her|hers)");if(o&&!s)return wn;if(s&&!o)return jr}return null},aO=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="People"}parse(n){return this.getNth(n).map(Wp)}json(n){let a=typeof n=="object"?n:{};return this.getNth(n).map(i=>{let o=i.toView().json(a)[0],s=Wp(i);return o.person={firstName:s.firstName.text("normal"),lastName:s.lastName.text("normal"),honorific:s.honorific.text("normal"),presumed_gender:nO(s,i)},o},[])}presumedMale(){return this.filter(n=>n.has("(#MaleName|mr|mister|sr|jr|king|pope|prince|sir)"))}presumedFemale(){return this.filter(n=>n.has("(#FemaleName|mrs|miss|queen|princess|madam)"))}update(n){let a=new t(this.document,n);return a._cache=this._cache,a}}e.prototype.people=function(r){let n=rO(this);return n=n.getNth(r),new t(this.document,n.pointer)}},iO=function(e){let t=e.match("(#Place|#Address)+"),r=t.match("@hasComma");return r=r.filter(n=>n.has("(asia|africa|europe|america)$")?!0:!(n.has("(#City|#Region|#ProperNoun)$")&&n.after("^(#Country|#Region)").found)),t=t.splitAfter(r),t},oO=function(e){e.prototype.places=function(t){let r=iO(this);return r=r.getNth(t),new e(this.document,r.pointer)}},sO=function(e){e.prototype.organizations=function(t){return this.match("#Organization+").getNth(t)}},uO=function(e){let t=this.clauses(),r=t.people();return r=r.concat(t.places()),r=r.concat(t.organizations()),r=r.not("(someone|man|woman|mother|brother|sister|father)"),r=r.sort("seq"),r=r.getNth(e),r},lO=function(e){e.prototype.topics=uO},cO=function(e){aO(e),oO(e),sO(e),lO(e)},fO={api:cO},mO=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},dO=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},hO=function(e,t){let r={pre:e.none(),post:e.none()};if(!e.has("#Adverb"))return r;let n=e.splitOn(t);return n.length===3?{pre:n.eq(0).adverbs(),post:n.eq(2).adverbs()}:n.eq(0).isDoc(t)?(r.post=n.eq(1).adverbs(),r):(r.pre=n.eq(0).adverbs(),r)},pO=function(e,t){let r=e.splitBefore(t);if(r.length<=1)return e.none();let n=r.eq(0);return n=n.not("(#Adverb|#Negative|#Prefix)"),n},gO=function(e){return e.match("#Negative")},vO=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}},zn=function(e){let t=e.clone();t.contractions().expand();const r=dO(t);return{root:r,prefix:t.match("#Prefix"),adverbs:hO(t,r),auxiliary:pO(t,r),negative:gO(t),phrasal:vO(r)}},_n={tense:"PresentTense"},Tu={conditional:!0},ga={tense:"FutureTense"},mo={progressive:!0},fr={tense:"PastTense"},ho={complete:!0,progressive:!1},Ha={passive:!0},yO={plural:!0},bO={plural:!1},wO=function(e){let t={};return e.forEach(r=>{Object.assign(t,r)}),t},Kp={imperative:[["#Imperative",[]]],"want-infinitive":[["^(want|wants|wanted) to #Infinitive$",[_n]],["^wanted to #Infinitive$",[fr]],["^will want to #Infinitive$",[ga]]],"gerund-phrase":[["^#PastTense #Gerund$",[fr]],["^#PresentTense #Gerund$",[_n]],["^#Infinitive #Gerund$",[_n]],["^will #Infinitive #Gerund$",[ga]],["^have #PastTense #Gerund$",[fr]],["^will have #PastTense #Gerund$",[fr]]],"simple-present":[["^#PresentTense$",[_n]],["^#Infinitive$",[_n]]],"simple-past":[["^#PastTense$",[fr]]],"simple-future":[["^will #Adverb? #Infinitive",[ga]]],"present-progressive":[["^(is|are|am) #Gerund$",[_n,mo]]],"past-progressive":[["^(was|were) #Gerund$",[fr,mo]]],"future-progressive":[["^will be #Gerund$",[ga,mo]]],"present-perfect":[["^(has|have) #PastTense$",[fr,ho]]],"past-perfect":[["^had #PastTense$",[fr,ho]],["^had #PastTense to #Infinitive",[fr,ho]]],"future-perfect":[["^will have #PastTense$",[ga,ho]]],"present-perfect-progressive":[["^(has|have) been #Gerund$",[fr,mo]]],"past-perfect-progressive":[["^had been #Gerund$",[fr,mo]]],"future-perfect-progressive":[["^will have been #Gerund$",[ga,mo]]],"passive-past":[["(got|were|was) #Passive",[fr,Ha]],["^(was|were) being #Passive",[fr,Ha]],["^(had|have) been #Passive",[fr,Ha]]],"passive-present":[["^(is|are|am) #Passive",[_n,Ha]],["^(is|are|am) being #Passive",[_n,Ha]],["^has been #Passive",[_n,Ha]]],"passive-future":[["will have been #Passive",[ga,Ha,Tu]],["will be being? #Passive",[ga,Ha,Tu]]],"present-conditional":[["would be #PastTense",[_n,Tu]]],"past-conditional":[["would have been #PastTense",[fr,Tu]]],"auxiliary-future":[["(is|are|am|was) going to (#Infinitive|#PresentTense)",[ga]]],"auxiliary-past":[["^did #Infinitive$",[fr,bO]],["^used to #Infinitive$",[fr,ho]]],"auxiliary-present":[["^(does|do) #Infinitive$",[_n,ho,yO]]],"modal-past":[["^(could|must|should|shall) have #PastTense$",[fr]]],"modal-infinitive":[["^#Modal #Infinitive$",[]]],infinitive:[["^#Infinitive$",[]]]};let tm=[];Object.keys(Kp).map(e=>{Kp[e].forEach(t=>{tm.push({name:e,match:t[0],data:wO(t[1])})})});const xO=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},DO=function(e){return!!(e.has("#Infinitive")&&e.growLeft("to").has("^to #Infinitive"))},Da=function(e,t){let r={};e=xO(e,t);for(let n=0;n<tm.length;n+=1){let a=tm[n];if(e.has(a.match)===!0){r.form=a.name,Object.assign(r,a.data);break}}return r.form||e.has("^#Verb$")&&(r.form="infinitive"),r.tense||(r.tense=t.root.has("#PastTense")?"PastTense":"PresentTense"),r.copula=t.root.has("#Copula"),r.isInfinitive=DO(e),r},Yp=function(e){return e.length<=1?!1:(e.parse()[0]||{}).isSubordinate},NO=function(e){let t=e.clauses();return t=t.filter((r,n)=>!(r.has("^(if|unless|while|but|for|per|at|by|that|which|who|from)")||n>0&&r.has("^#Verb . #Noun+$")||n>0&&r.has("^#Adverb"))),t.length===0?e:t},AO=function(e){let t=e.before();t=NO(t);let r=t.nouns(),n=r.last(),a=n.match("(i|he|she|we|you|they)");if(a.found)return a.nouns();let i=r.if("^(that|this|those)");return i.found||r.found===!1&&(i=t.match("^(that|this|those)"),i.found)?i:(n=r.last(),Yp(n)&&(r.remove(n),n=r.last()),Yp(n)&&(r.remove(n),n=r.last()),n)},CO=function(e,t){return t.has("(are|were|does)")||e.has("(those|they|we)")?!0:e.found&&e.isPlural?e.isPlural().found:!1},ia=function(e){let t=AO(e);return{subject:t,plural:CO(t,e)}},jt=e=>e,As=(e,t)=>{let r=ia(e),n=r.subject;return n.has("i")||n.has("we")?!0:r.plural},EO=(e,t)=>{let{subject:r,plural:n}=ia(e);return n||r.has("we")?"were":"was"},Cs=function(e,t){if(e.has("were"))return"are";let{subject:r,plural:n}=ia(e);return r.has("i")?"am":r.has("we")||n?"are":"is"},ld=function(e,t){let r=ia(e),n=r.subject;return n.has("i")||n.has("we")||r.plural?"do":"does"},ln=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"},rm=function(e,t){const{toInfinitive:r}=e.methods.two.transform.verb;let n=t.root.text({keepPunct:!1});return n=r(n,e.model,ln(e)),n&&e.replace(t.root,n),e},Zp=e=>e.has("will not")?e.replace("will not","have not"):e.remove("will"),Qp=function(e){if(!e||!e.isView)return[];const t={normal:!0,terms:!1,text:!1};return e.json(t).map(r=>r.normal)},Xp=function(e){return!e||!e.isView?"":e.text("normal")},SO=function(e){const{toInfinitive:t}=e.methods.two.transform.verb;let r=e.text("normal");return t(r,e.model,ln(e))},MO=function(e){let t=zn(e);e=e.clone().toView();const r=Da(e,t);return{root:t.root.text(),preAdverbs:Qp(t.adverbs.pre),postAdverbs:Qp(t.adverbs.post),auxiliary:Xp(t.auxiliary),negative:t.negative.found,prefix:Xp(t.prefix),infinitive:SO(t.root),grammar:r}},TO={tags:!0},FO=function(e,t){const{toInfinitive:r}=e.methods.two.transform.verb,{root:n,auxiliary:a}=t;let i=a.terms().harden(),o=n.text("normal");if(o=r(o,e.model,ln(n)),o&&e.replace(n,o,TO).tag("Verb").firstTerm().tag("Infinitive"),i.found&&e.remove(i),t.negative.found){e.has("not")||e.prepend("not");let s=ld(e);e.prepend(s)}return e.fullSentence().compute(["freeze","lexicon","preTagger","postTagger","unfreeze","chunks"]),e},bn={tags:!0},Na={noAux:(e,t)=>(t.auxiliary.found&&(e=e.remove(t.auxiliary)),e),simple:(e,t)=>{const{conjugate:r,toInfinitive:n}=e.methods.two.transform.verb,a=t.root;if(a.has("#Modal"))return e;let i=a.text({keepPunct:!1});return i=n(i,e.model,ln(a)),i=r(i,e.model).PastTense,i=i==="been"?"was":i,i==="was"&&(i=EO(e)),i&&e.replace(a,i,bn),e},both:function(e,t){return t.negative.found?(e.replace("will","did"),e):(e=Na.simple(e,t),e=Na.noAux(e,t),e)},hasHad:e=>(e.replace("has","had",bn),e),hasParticiple:(e,t)=>{const{conjugate:r,toInfinitive:n}=e.methods.two.transform.verb,a=t.root;let i=a.text("normal");return i=n(i,e.model,ln(a)),r(i,e.model).Participle}},eg={infinitive:Na.simple,"simple-present":Na.simple,"simple-past":jt,"simple-future":Na.both,"present-progressive":e=>(e.replace("are","were",bn),e.replace("(is|are|am)","was",bn),e),"past-progressive":jt,"future-progressive":(e,t)=>(e.match(t.root).insertBefore("was"),e.remove("(will|be)"),e),"present-perfect":Na.hasHad,"past-perfect":jt,"future-perfect":(e,t)=>(e.match(t.root).insertBefore("had"),e.has("will")&&(e=Zp(e)),e.remove("have"),e),"present-perfect-progressive":Na.hasHad,"past-perfect-progressive":jt,"future-perfect-progressive":e=>(e.remove("will"),e.replace("have","had",bn),e),"passive-past":e=>(e.replace("have","had",bn),e),"passive-present":e=>(e.replace("(is|are)","was",bn),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",bn),e.remove("will")),e),"present-conditional":e=>(e.replace("be","have been"),e),"past-conditional":jt,"auxiliary-future":e=>(e.replace("(is|are|am)","was",bn),e),"auxiliary-past":jt,"auxiliary-present":e=>(e.replace("(do|does)","did",bn),e),"modal-infinitive":(e,t)=>(e.has("can")?e.replace("can","could",bn):(Na.simple(e,t),e.match("#Modal").insertAfter("have").tag("Auxiliary")),e),"modal-past":jt,"want-infinitive":e=>(e.replace("(want|wants)","wanted",bn),e.remove("will"),e),"gerund-phrase":(e,t)=>(t.root=t.root.not("#Gerund$"),Na.simple(e,t),Zp(e),e)},PO=function(e,t,r){return eg.hasOwnProperty(r)&&(e=eg[r](e,t),e.fullSentence().compute(["tagger","chunks"])),e},nm=function(e,t){let r=ia(e),n=r.subject;return n.has("(i|we|you)")?"have":r.plural===!1||n.has("he")||n.has("she")||n.has("#Person")?"has":"have"},am=(e,t)=>{const{conjugate:r,toInfinitive:n}=e.methods.two.transform.verb,{root:a,auxiliary:i}=t;if(a.has("#Modal"))return e;let o=a.text({keepPunct:!1});o=n(o,e.model,ln(a));let s=r(o,e.model);if(o=s.Participle||s.PastTense,o){e=e.replace(a,o);let u=nm(e);e.prepend(u).match(u).tag("Auxiliary"),e.remove(i)}return e},tg={infinitive:am,"simple-present":am,"simple-future":(e,t)=>e.replace("will",nm(e)),"present-perfect":jt,"past-perfect":jt,"future-perfect":(e,t)=>e.replace("will have",nm(e)),"present-perfect-progressive":jt,"past-perfect-progressive":jt,"future-perfect-progressive":jt},kO=function(e,t,r){return tg.hasOwnProperty(r)?(e=tg[r](e,t),e.fullSentence().compute(["tagger","chunks"]),e):(e=am(e,t),e.fullSentence().compute(["tagger","chunks"]),e)},Ca={tags:!0},po=(e,t)=>{const{conjugate:r,toInfinitive:n}=e.methods.two.transform.verb,a=t.root;let i=a.text("normal");return i=n(i,e.model,ln(a)),As(e)===!1&&(i=r(i,e.model).PresentTense),a.has("#Copula")&&(i=Cs(e)),i&&(e=e.replace(a,i,Ca),e.not("#Particle").tag("PresentTense")),e},rg=(e,t)=>{const{conjugate:r,toInfinitive:n}=e.methods.two.transform.verb,a=t.root;let i=a.text("normal");return i=n(i,e.model,ln(a)),As(e)===!1&&(i=r(i,e.model).Gerund),i&&(e=e.replace(a,i,Ca),e.not("#Particle").tag("Gerund")),e},OO=(e,t)=>{const{toInfinitive:r}=e.methods.two.transform.verb,n=t.root;let a=t.root.text("normal");return a=r(a,e.model,ln(n)),a&&(e=e.replace(t.root,a,Ca)),e},ng={infinitive:po,"simple-present":(e,t)=>{const{conjugate:r}=e.methods.two.transform.verb;let{root:n}=t;if(n.has("#Infinitive")){let i=ia(e).subject;if(As(e)||i.has("i"))return e;let o=n.text("normal"),s=r(o,e.model).PresentTense;o!==s&&e.replace(n,s,Ca)}else return po(e,t);return e},"simple-past":po,"simple-future":(e,t)=>{const{root:r,auxiliary:n}=t;if(n.has("will")&&r.has("be")){let a=Cs(e);e.replace(r,a),e=e.remove("will"),e.replace("not "+a,a+" not")}else po(e,t),e=e.remove("will");return e},"present-progressive":jt,"past-progressive":(e,t)=>{let r=Cs(e);return e.replace("(were|was)",r,Ca)},"future-progressive":e=>(e.match("will").insertBefore("is"),e.remove("be"),e.remove("will")),"present-perfect":(e,t)=>(po(e,t),e=e.remove("(have|had|has)"),e),"past-perfect":(e,t)=>{let n=ia(e).subject;return As(e)||n.has("i")?(e=rm(e,t),e.remove("had"),e):(e.replace("had","has",Ca),e)},"future-perfect":e=>(e.match("will").insertBefore("has"),e.remove("have").remove("will")),"present-perfect-progressive":jt,"past-perfect-progressive":e=>e.replace("had","has",Ca),"future-perfect-progressive":e=>(e.match("will").insertBefore("has"),e.remove("have").remove("will")),"passive-past":(e,t)=>{let r=Cs(e);return e.has("(had|have|has)")&&e.has("been")?(e.replace("(had|have|has)",r,Ca),e.replace("been","being"),e):e.replace("(got|was|were)",r)},"passive-present":jt,"passive-future":e=>(e.replace("will","is"),e.replace("be","being")),"present-conditional":jt,"past-conditional":e=>(e.replace("been","be"),e.remove("have")),"auxiliary-future":(e,t)=>(rg(e,t),e.remove("(going|to)"),e),"auxiliary-past":(e,t)=>{if(t.auxiliary.has("did")){let r=ld(e);return e.replace(t.auxiliary,r),e}return rg(e,t),e.replace(t.auxiliary,"is"),e},"auxiliary-present":jt,"modal-infinitive":jt,"modal-past":(e,t)=>(OO(e,t),e.remove("have")),"gerund-phrase":(e,t)=>(t.root=t.root.not("#Gerund$"),po(e,t),e.remove("(will|have)")),"want-infinitive":(e,t)=>{let r="wants";return As(e)&&(r="want"),e.replace("(want|wanted|wants)",r,Ca),e.remove("will"),e}},$O=function(e,t,r){return ng.hasOwnProperty(r)&&(e=ng[r](e,t),e.fullSentence().compute(["tagger","chunks"])),e},Fw={tags:!0},Fu=(e,t)=>{const{toInfinitive:r}=e.methods.two.transform.verb,{root:n,auxiliary:a}=t;if(n.has("#Modal"))return e;let i=n.text("normal");return i=r(i,e.model,ln(n)),i&&(e=e.replace(n,i,Fw),e.not("#Particle").tag("Verb")),e.prepend("will").match("will").tag("Auxiliary"),e.remove(a),e},ag=(e,t)=>{const{conjugate:r,toInfinitive:n}=e.methods.two.transform.verb,{root:a,auxiliary:i}=t;let o=a.text("normal");return o=n(o,e.model,ln(a)),o&&(o=r(o,e.model).Gerund,e.replace(a,o,Fw),e.not("#Particle").tag("PresentTense")),e.remove(i),e.prepend("will be").match("will be").tag("Auxiliary"),e},ig={infinitive:Fu,"simple-present":Fu,"simple-past":Fu,"simple-future":jt,"present-progressive":ag,"past-progressive":ag,"future-progressive":jt,"present-perfect":e=>(e.match("(have|has)").replaceWith("will have"),e),"past-perfect":e=>e.replace("(had|has)","will have"),"future-perfect":jt,"present-perfect-progressive":e=>e.replace("has","will have"),"past-perfect-progressive":e=>e.replace("had","will have"),"future-perfect-progressive":jt,"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":jt,"present-conditional":e=>e.replace("would","will"),"past-conditional":e=>e.replace("would","will"),"auxiliary-future":jt,"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":jt,"modal-past":jt,"gerund-phrase":(e,t)=>(t.root=t.root.not("#Gerund$"),Fu(e,t),e.remove("(had|have)")),"want-infinitive":e=>(e.replace("(want|wants|wanted)","will want"),e)},_O=function(e,t,r){return e.has("will")||e.has("going to")||ig.hasOwnProperty(r)&&(e=ig[r](e,t),e.fullSentence().compute(["tagger","chunks"])),e},BO={tags:!0},IO=function(e,t){const{toInfinitive:r,conjugate:n}=e.methods.two.transform.verb,{root:a,auxiliary:i}=t;if(e.has("#Gerund"))return e;let o=a.text("normal");o=r(o,e.model,ln(a));let s=n(o,e.model).Gerund;if(s){let u=Cs(e);e.replace(a,s,BO),e.remove(i),e.prepend(u)}return e.replace("not is","is not"),e.replace("not are","are not"),e.fullSentence().compute(["tagger","chunks"]),e},og={tags:!0},ef=function(e,t){let r=ld(e);return e.prepend(r+" not"),e},gl=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)},vl=e=>e.has("(is|was|am|are|will|were|be)"),sg={"simple-present":(e,t)=>vl(e)===!0?gl(e):(e=rm(e,t),e=ef(e),e),"simple-past":(e,t)=>vl(e)===!0?gl(e):(e=rm(e,t),e.prepend("did not"),e),imperative:e=>(e.prepend("do not"),e),infinitive:(e,t)=>vl(e)===!0?gl(e):ef(e),"passive-past":e=>{if(e.has("got"))return e.replace("got","get",og),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=ef(e),e=e.replace("wants","want",og),e)},zO=function(e,t,r){if(e.has("#Negative"))return e;if(sg.hasOwnProperty(r))return e=sg[r](e,t),e;let n=e.matchOne("be");return n.found?(n.prepend("not"),e):vl(e)===!0?gl(e):(n=e.matchOne("(will|had|have|has|did|does|do|#Modal)"),n.found&&n.append("not"),e)},jO=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Verbs"}parse(n){return this.getNth(n).map(zn)}json(n,a){return this.getNth(a).map(s=>{let u=s.toView().json(n)[0]||{};return u.verb=MO(s),u},[])}subjects(n){return this.getNth(n).map(a=>(zn(a),ia(a).subject))}adverbs(n){return this.getNth(n).map(a=>a.match("#Adverb"))}isSingular(n){return this.getNth(n).filter(a=>ia(a).plural!==!0)}isPlural(n){return this.getNth(n).filter(a=>ia(a).plural===!0)}isImperative(n){return this.getNth(n).filter(a=>a.has("#Imperative"))}toInfinitive(n){return this.getNth(n).map(a=>{let i=zn(a),o=Da(a,i);return FO(a,i,o.form)})}toPresentTense(n){return this.getNth(n).map(a=>{let i=zn(a),o=Da(a,i);return o.isInfinitive?a:$O(a,i,o.form)})}toPastTense(n){return this.getNth(n).map(a=>{let i=zn(a),o=Da(a,i);return o.isInfinitive?a:PO(a,i,o.form)})}toFutureTense(n){return this.getNth(n).map(a=>{let i=zn(a),o=Da(a,i);return o.isInfinitive?a:_O(a,i,o.form)})}toGerund(n){return this.getNth(n).map(a=>{let i=zn(a),o=Da(a,i);return o.isInfinitive?a:IO(a,i,o.form)})}toPastParticiple(n){return this.getNth(n).map(a=>{let i=zn(a),o=Da(a,i);return o.isInfinitive?a:kO(a,i,o.form)})}conjugate(n){const{conjugate:a,toInfinitive:i}=this.world.methods.two.transform.verb;return this.getNth(n).map(o=>{let s=zn(o),u=Da(o,s);u.form==="imperative"&&(u.form="simple-present");let l=s.root.text("normal");if(!s.root.has("#Infinitive")){let c=ln(s.root);l=i(l,o.model,c)||l}return a(l,o.model)},[])}isNegative(){return this.if("#Negative")}isPositive(){return this.ifNo("#Negative")}toPositive(){let n=this.match("do not #Verb");return n.found&&n.remove("do not"),this.remove("#Negative")}toNegative(n){return this.getNth(n).map(a=>{let i=zn(a),o=Da(a,i);return zO(a,i,o.form)})}update(n){let a=new t(this.document,n);return a._cache=this._cache,a}}t.prototype.toPast=t.prototype.toPastTense,t.prototype.toPresent=t.prototype.toPresentTense,t.prototype.toFuture=t.prototype.toFutureTense,e.prototype.verbs=function(r){let n=mO(this);return n=n.getNth(r),new t(this.document,n.pointer)}},qO={api:jO},im=function(e,t){let r=t.match(e);if(r.found){let n=r.pronouns().refersTo();if(n.found)return n}return t.none()},ug=function(e){if(!e.found)return e;let[t]=e.fullPointer[0];return t&&t>0?e.update([[t-1]]):e.none()},RO=function(e,t){return t==="m"?e.filter(r=>!r.presumedFemale().found):t==="f"?e.filter(r=>!r.presumedMale().found):e},lg=function(e,t){let r=e.people();return r=RO(r,t),r.found||(r=e.nouns("#Actor"),r.found)?r.last():t==="f"?im("(she|her|hers)",e):t==="m"?im("(he|him|his)",e):e.none()},LO=function(e){let t=e.nouns(),r=t.isPlural().notIf("#Pronoun");if(r.found)return r.last();let n=im("(they|their|theirs)",e);return n.found?n:(r=t.match("(somebody|nobody|everybody|anybody|someone|noone|everyone|anyone)"),r.found?r.last():e.none())},HO=function(e,t){if(t&&t.found){let r=e.docs[0][0];r.reference=t.ptrs[0]}},tf=function(e,t){let r=e.before(),n=t(r);return n.found||(r=ug(e),n=t(r),n.found)||(r=ug(r),n=t(r),n.found)?n:e.none()},GO=function(e){e.pronouns().if("(he|him|his|she|her|hers|they|their|theirs|it|its)").forEach(r=>{let n=null;r.has("(he|him|his)")?n=tf(r,a=>lg(a,"m")):r.has("(she|her|hers)")?n=tf(r,a=>lg(a,"f")):r.has("(they|their|theirs)")&&(n=tf(r,LO)),n&&n.found&&HO(r,n)})},VO=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Pronouns"}hasReference(){return this.compute("coreference"),this.filter(n=>n.docs[0][0].reference)}refersTo(){return this.compute("coreference"),this.map(n=>{if(!n.found)return n.none();let a=n.docs[0][0];return a.reference?n.update([a.reference]):n.none()})}update(n){let a=new t(this.document,n);return a._cache=this._cache,a}}e.prototype.pronouns=function(r){let n=this.match("#Pronoun");return n=n.getNth(r),new t(n.document,n.pointer)}},UO={compute:{coreference:GO},api:VO};tt.plugin(uP);tt.plugin(fP);tt.plugin(EP);tt.plugin(UO);tt.plugin(VP);tt.plugin(KP);tt.plugin(lk);tt.plugin(zk);tt.plugin(Rk);tt.plugin(tO);tt.plugin(fO);tt.plugin(qO);const WO=function(e){let t=null;return e.has("^(between|within) #Date")||(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},JO=function(e){let t=e.match("#Date+");t=t.filter(n=>{let a=n.has("^#Duration+$")||n.has("^#Value #Duration+$");return a===!0&&n.has("(#FinancialQuarter|quarter)")?!0:a===!1});let r=t.match("[#Cardinal #Duration (in|on|this|next|during|for)] #Date",0);return r.found&&(t=t.not(r)),r=t.match("[#Cardinal #Duration] #WeekDay",0),r.found&&(t=t.not(r)),r=t.match("#Date [for #Value #Duration]$",0),r.found&&(t=t.not(r)),r=t.match("[#Cardinal #Duration] #Date",0),r.found&&!t.has("#Cardinal #Duration] (ago|from|before|after|back)")&&(t=t.not(r)),r=t.match("for #Cardinal #Duration"),r.found&&(t=t.not(r)),t=t.notIf("^one (#WeekDay|#Month)$"),t=WO(t),t=t.notIf("(#Money|#Percentage)"),t=t.notIf("^per #Duration"),t},KO={second:!0,minute:!0,hour:!0,day:!0,week:!0,weekend:!0,month:!0,season:!0,quarter:!0,year:!0},cg={wk:"week",min:"minute",sec:"second",weekend:"week"},rf=function(e){let t=e.match("#Duration").text("normal");return t=t.replace(/s$/,""),cg.hasOwnProperty(t)&&(t=cg[t]),t},YO=function(e){let t={},r=e.none(),n=e.match("#DateShift+");if(n.found===!1)return{res:t,m:r};if(n.match("#Cardinal #Duration").forEach(a=>{let i=a.match("#Cardinal").numbers().get()[0];if(i&&typeof i=="number"){let o=rf(a);KO[o]===!0&&(t[o]=i)}}),n.has("(before|ago|hence|back)$")===!0&&Object.keys(t).forEach(a=>t[a]*=-1),r=n.match("#Cardinal #Duration"),n=n.not(r),r=n.match("[<unit>#Duration] [<dir>(after|before)]"),r.found){let a=r.groups("unit").text("reduced"),i=r.groups("dir").text("reduced");i==="after"?t[a]=1:i==="before"&&(t[a]=-1)}if(r=n.match("half (a|an) [#Duration]",0),r.found){let a=rf(r);t[a]=.5}if(r=n.match("a (few|couple) [#Duration]",0),r.found){let a=rf(r);t[a]=r.has("few")?3:2}return r=e.match("#DateShift+"),{result:t,m:r}},ZO={minute:!0},QO=function(e){let t=e.match("[<num>#Value] [<unit>#Duration+] (of|in)");if(t.found){let r=t.groups(),n=r.num.numbers().get()[0],a=r.unit.text("reduced"),i={unit:a,num:Number(n)||0};return ZO[a]||(i.num-=1),{result:i,m:t}}if(t=e.match("[<dir>(first|initial|last|final)] [<unit>#Duration+] (of|in)"),t.found){let r=t.groups(),n=r.dir.text("reduced"),a=r.unit.text("reduced");return n==="initial"&&(n="first"),n==="final"&&(n="last"),{result:{unit:a,dir:n},m:t}}return{result:null,m:e.none()}},XO=60*60*1e3,fg=(e,t,r)=>{const[n,a]=e.split("/"),[i,o]=a.split(":");return Date.UTC(r,n-1,i,o)-t*XO},Pw=(e,t,r,n,a)=>{const i=new Date(e).getUTCFullYear(),o=fg(t,a,i),s=fg(r,n,i);return e>=o&&e<s},e$=e=>{let r=e.timezones[e.tz];if(r===void 0)return console.warn("Warning: couldn't find timezone "+e.tz),0;if(r.dst===void 0)return r.offset;let n=r.offset,a=r.offset+1;r.hem==="n"&&(a=n-1);let i=r.dst.split("->");return Pw(e.epoch,i[0],i[1],n,a)===!0?n:a},mg={"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"},t$=["africa","america","asia","atlantic","australia","brazil","canada","chile","europe","indian","mexico","pacific","antarctica","etc"];let zo={};Object.keys(mg).forEach(e=>{let t=e.split("|"),r={offset:Number(t[0]),hem:t[1]};t[2]&&(r.dst=t[2]),mg[e].split(",").forEach(a=>{a=a.replace(/(^[0-9]+)\//,(i,o)=>(o=Number(o),t$[o]+"/")),zo[a]=r})});zo.utc={offset:0,hem:"n"};for(let e=-14;e<=14;e+=.5){let t=e;t>0&&(t="+"+t);let r="etc/gmt"+t;zo[r]={offset:e*-1,hem:"n"},r="utc/gmt"+t,zo[r]={offset:e*-1,hem:"n"}}const r$="utc",n$=()=>{if(typeof Intl>"u"||typeof Intl.DateTimeFormat>"u")return null;let e=Intl.DateTimeFormat();if(typeof e>"u"||typeof e.resolvedOptions>"u")return null;let t=e.resolvedOptions().timeZone;return t?t.toLowerCase():null},a$=()=>{let e=n$();return e===null?r$:e},i$=/(-?[0-9]+)h(rs)?/i,o$=/(-?[0-9]+)/,s$=/utc([\-+]?[0-9]+)/i,u$=/gmt([\-+]?[0-9]+)/i,Pu=function(e){return e=Number(e),e>=-13&&e<=13?(e=e*-1,e=(e>0?"+":"")+e,"etc/gmt"+e):null},l$=function(e){let t=e.match(i$);if(t!==null||(t=e.match(s$),t!==null))return Pu(t[1]);if(t=e.match(u$),t!==null){let r=Number(t[1])*-1;return Pu(r)}return t=e.match(o$),t!==null?Pu(t[1]):null};let ku=a$();const dg=Object.keys(zo).reduce((e,t)=>{let r=t.split("/")[1]||"";return r=r.replace(/_/g," "),e[r]=t,e},{}),c$=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),Pl=(e,t)=>{if(!e)return t.hasOwnProperty(ku)||(console.warn(`Unrecognized IANA id '${ku}'. Setting fallback tz to UTC.`),ku="utc"),ku;typeof e!="string"&&console.error("Timezone must be a string - recieved: '",e,`'
|
|
14
|
-
`);let r=e.trim();if(r=r.toLowerCase(),t.hasOwnProperty(r)===!0||(r=c$(r),t.hasOwnProperty(r)===!0))return r;if(dg.hasOwnProperty(r)===!0)return dg[r];if(/[0-9]/.test(r)===!0){let n=l$(r);if(n)return n}throw new Error("Spacetime: Cannot find timezone named: '"+e+"'. Please enter an IANA timezone id.")};function Ks(e){return e%4===0&&e%100!==0||e%400===0}function kw(e){return Object.prototype.toString.call(e)==="[object Date]"&&!isNaN(e.valueOf())}function f$(e){return Object.prototype.toString.call(e)==="[object Array]"}function Ka(e){return Object.prototype.toString.call(e)==="[object Object]"}function m$(e){return Object.prototype.toString.call(e)==="[object Boolean]"}function Je(e,t=2){let r="0";return e=e+"",e.length>=t?e:new Array(t-e.length+1).join(r)+e}function d$(e){return e?e[0].toUpperCase()+e.substr(1):""}function va(e){let t=e%10,r=e%100;return t===1&&r!==11?e+"st":t===2&&r!==12?e+"nd":t===3&&r!==13?e+"rd":e+"th"}function Oo(e){return e=String(e),e=e.replace(/([0-9])(st|nd|rd|th)$/i,"$1"),parseInt(e,10)}function Zi(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 hs(e){return typeof e=="number"?e:kw(e)?e.getTime():e.epoch||e.epoch===0?e.epoch:null}function Pi(e,t){return Ka(e)===!1?t.clone().set(e):e}function xs(e,t=""){const r=e>0?"+":"-",n=Math.abs(e),a=Je(parseInt(""+n,10)),i=Je(n%1*60);return`${r}${a}${t}${i}`}const om={year:new Date().getFullYear(),month:0,date:1},h$=(e,t,r)=>{if(t.length===0)return e;let n=["year","month","date","hour","minute","second","millisecond"];for(let a=0;a<n.length;a++){let i=t[a]||r[n[a]]||om[n[a]]||0;e=e[n[a]](i)}return e},p$=(e,t,r)=>{if(Object.keys(t).length===0)return e;t=Object.assign({},om,r,t);let n=Object.keys(t);for(let a=0;a<n.length;a++){let i=n[a];if(e[i]===void 0||typeof e[i]!="function"||t[i]===null||t[i]===void 0||t[i]==="")continue;let o=t[i]||r[i]||om[i]||0;e=e[i](o)}return e},g$=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},v$={parseArray:h$,parseObject:p$,parseNumber:g$},Ci=function(e){return e.epoch=Date.now(),Object.keys(e._today||{}).forEach(t=>{typeof e[t]=="function"&&(e=e[t](e._today[t]))}),e},kl={now:e=>Ci(e),today:e=>Ci(e),tonight:e=>(e=Ci(e),e=e.hour(18),e),tomorrow:e=>(e=Ci(e),e=e.add(1,"day"),e=e.startOf("day"),e),yesterday:e=>(e=Ci(e),e=e.subtract(1,"day"),e=e.startOf("day"),e),christmas:e=>{let t=Ci(e).year();return e=e.set([t,11,25,18,0,0]),e},"new years":e=>{let t=Ci(e).year();return e=e.set([t,11,31,18,0,0]),e}};kl["new years eve"]=kl["new years"];const y$=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};let Dt={millisecond:1};Dt.second=1e3;Dt.minute=6e4;Dt.hour=36e5;Dt.day=864e5;Dt.date=Dt.day;Dt.month=864e5*29.5;Dt.week=6048e5;Dt.year=3154e7;Object.keys(Dt).forEach(e=>{Dt[e+"s"]=Dt[e]});const Ou=(e,t,r,n,a)=>{let i=e.d[r]();if(i===t)return;let o=a===null?null:e.d[a](),s=e.epoch,u=t-i;e.epoch+=Dt[n]*u,n==="day"&&Math.abs(u)>28&&t<28&&(e.epoch+=Dt.hour),a!==null&&o!==e.d[a]()&&(e.epoch=s);const l=Dt[n]/2;for(;e.d[r]()<t;)e.epoch+=l;for(;e.d[r]()>t;)e.epoch-=l;a!==null&&o!==e.d[a]()&&(e.epoch=s)},nf={year:{valid:e=>e>-4e3&&e<4e3,walkTo:(e,t)=>Ou(e,t,"getFullYear","year",null)},month:{valid:e=>e>=0&&e<=11,walkTo:(e,t)=>{let r=e.d,n=r.getMonth(),a=e.epoch,i=r.getFullYear();if(n===t)return;let o=t-n;for(e.epoch+=Dt.day*(o*28),i!==e.d.getFullYear()&&(e.epoch=a);e.d.getMonth()<t;)e.epoch+=Dt.day;for(;e.d.getMonth()>t;)e.epoch-=Dt.day}},date:{valid:e=>e>0&&e<=31,walkTo:(e,t)=>Ou(e,t,"getDate","day","getMonth")},hour:{valid:e=>e>=0&&e<24,walkTo:(e,t)=>Ou(e,t,"getHours","hour","getDate")},minute:{valid:e=>e>=0&&e<60,walkTo:(e,t)=>Ou(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}}},yt=(e,t)=>{let r=Object.keys(nf),n=e.clone();for(let a=0;a<r.length;a++){let i=r[a],o=t[i];if(o===void 0&&(o=n[i]()),typeof o=="string"&&(o=parseInt(o,10)),!nf[i].valid(o)){e.epoch=null,e.silent===!1&&console.warn("invalid "+i+": "+o);return}nf[i].walkTo(e,o)}},Gi=[31,28,31,30,31,30,31,31,30,31,30,31];let Os=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],$s=["january","february","march","april","may","june","july","august","september","october","november","december"];function b$(){const e={sep:8};for(let t=0;t<Os.length;t++)e[Os[t]]=t;for(let t=0;t<$s.length;t++)e[$s[t]]=t;return e}function ps(){return Os}function w$(){return $s}function Ow(){return b$()}function x$(e){Os=e.short||Os,$s=e.long||$s}const $w=(e,t)=>{if(!t)return e;t=t.trim().toLowerCase();let r=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")),r=parseFloat(t),Math.abs(r)>100&&(r=r/100),r===0||t==="Z"||t==="z")return e.tz="etc/gmt",e;r*=-1,r>=0&&(r="+"+r);let n="etc/gmt"+r;return e.timezones[n]&&(e.tz=n),e},D$=function(e=""){return e=String(e),e.length>3?e=e.substring(0,3):e.length===1?e=e+"00":e.length===2&&(e=e+"0"),Number(e)||0},qr=(e,t="")=>{t=t.replace(/^\s+/,"").toLowerCase();let r=t.match(/([0-9]{1,2}):([0-9]{1,2}):?([0-9]{1,2})?[:.]?([0-9]{1,4})?/);if(r!==null){let[,n,a,i,o]=r;if(n=Number(n),n<0||n>24||(a=Number(a),r[2].length<2||a<0||a>59))return e.startOf("day");e=e.hour(n),e=e.minute(a),e=e.seconds(i||0),e=e.millisecond(D$(o));let s=t.match(/[0-9] ?(am|pm)\b/);return s!==null&&s[1]&&(e=e.ampm(s[1])),e}if(r=t.match(/([0-9]+) ?(am|pm)/),r!==null&&r[1]){let n=Number(r[1]);return n>12||n<1?e.startOf("day"):(e=e.hour(r[1]||0),e=e.ampm(r[2]),e=e.startOf("hour"),e)}return e=e.startOf("day"),e};let hg=Ow();const Rr=e=>{if(Gi.hasOwnProperty(e.month)!==!0)return!1;if(e.month===1)return Ks(e.year)&&e.date<=29?!0:e.date<=28;let t=Gi[e.month]||0;return e.date<=t},Ma=(e="",t)=>{if(e=e.trim(),/^'[0-9][0-9]$/.test(e)===!0){let n=Number(e.replace(/'/,""));return n>50?1900+n:2e3+n}let r=parseInt(e,10);return!r&&t&&(r=t.year),r=r||new Date().getFullYear(),r},ri=function(e){return e=e.toLowerCase().trim(),e==="sept"?hg.sep:hg[e]},N$=[{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 r={year:t[1],month:parseInt(t[2],10)-1,date:t[3]};return Rr(r)===!1?(e.epoch=null,e):($w(e,t[5]),yt(e,r),e=qr(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 r={year:t[1],month:parseInt(t[2],10)-1,date:parseInt(t[3],10)};return r.month>=12&&(r.date=parseInt(t[2],10),r.month=parseInt(t[3],10)-1),Rr(r)===!1?(e.epoch=null,e):(yt(e,r),e=qr(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 r={year:Ma(t[1],e._today),month:ri(t[2]),date:Oo(t[3]||"")};return Rr(r)===!1?(e.epoch=null,e):(yt(e,r),e=qr(e,t[4]),e)}}],A$=[{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 r=parseInt(t[1],10)-1,n=parseInt(t[2],10);(e.british||r>=12)&&(n=parseInt(t[1],10),r=parseInt(t[2],10)-1);let a={date:n,month:r,year:Ma(t[3],e._today)||new Date().getFullYear()};return Rr(a)===!1?(e.epoch=null,e):(yt(e,a),e=qr(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 r={year:Ma(t[3],e._today),month:ri(t[1]),date:Oo(t[2]||"")};return Rr(r)===!1?(e.epoch=null,e):(yt(e,r),e=qr(e,t[4]),e)}},{reg:/^([a-z]+) ([0-9]{1,2})( [0-9]{4})?( ([0-9:]+( ?am| ?pm| ?gmt)?))?$/i,parse:(e,t)=>{let r={year:Ma(t[3],e._today),month:ri(t[1]),date:Oo(t[2]||"")};return Rr(r)===!1?(e.epoch=null,e):(yt(e,r),e=qr(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[,r,n,a,i,o]=t,s={year:Ma(o,e._today),month:ri(r),date:Oo(n||"")};return Rr(s)===!1?(e.epoch=null,e):(yt(e,s),e=$w(e,i),e=qr(e,a),e)}}],C$=[{reg:/^([0-9]{1,2})[-/]([a-z]+)[\-/]?([0-9]{4})?$/i,parse:(e,t)=>{let r={year:Ma(t[3],e._today),month:ri(t[2]),date:Oo(t[1]||"")};return Rr(r)===!1?(e.epoch=null,e):(yt(e,r),e=qr(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 r={year:Ma(t[3],e._today),month:ri(t[2]),date:Oo(t[1])};return!r.month||Rr(r)===!1?(e.epoch=null,e):(yt(e,r),e=qr(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 r={date:Number(t[1]),month:ri(t[2]),year:Number(t[3])};return Rr(r)===!1?(e.epoch=null,e):(yt(e,r),e=e.startOf("day"),e=qr(e,t[4]),e)}}],E$=[{reg:/^([0-9]{4})[\-/]([0-9]{2})$/,parse:(e,t)=>{let r={year:t[1],month:parseInt(t[2],10)-1,date:1};return Rr(r)===!1?(e.epoch=null,e):(yt(e,r),e=qr(e,t[4]),e)}},{reg:/^([a-z]+) ([0-9]{4})$/i,parse:(e,t)=>{let r={year:Ma(t[2],e._today),month:ri(t[1]),date:e._today.date||1};return Rr(r)===!1?(e.epoch=null,e):(yt(e,r),e=qr(e,t[4]),e)}},{reg:/^(q[0-9])( of)?( [0-9]{4})?/i,parse:(e,t)=>{let r=t[1]||"";e=e.quarter(r);let n=t[3]||"";return n&&(n=n.trim(),e=e.year(n)),e}},{reg:/^(spring|summer|winter|fall|autumn)( of)?( [0-9]{4})?/i,parse:(e,t)=>{let r=t[1]||"";e=e.season(r);let n=t[3]||"";return n&&(n=n.trim(),e=e.year(n)),e}},{reg:/^[0-9,]+ ?b\.?c\.?$/i,parse:(e,t)=>{let r=t[0]||"";r=r.replace(/^([0-9,]+) ?b\.?c\.?$/i,"-$1");let n=new Date,a={year:parseInt(r.trim(),10),month:n.getMonth(),date:n.getDate()};return Rr(a)===!1?(e.epoch=null,e):(yt(e,a),e=qr(e),e)}},{reg:/^[0-9,]+ ?(a\.?d\.?|c\.?e\.?)$/i,parse:(e,t)=>{let r=t[0]||"";r=r.replace(/,/g,"");let n=new Date,a={year:parseInt(r.trim(),10),month:n.getMonth(),date:n.getDate()};return Rr(a)===!1?(e.epoch=null,e):(yt(e,a),e=qr(e),e)}},{reg:/^[0-9]{4}( ?a\.?d\.?)?$/i,parse:(e,t)=>{let r=e._today;r.month&&!r.date&&(r.date=1);let n=new Date,a={year:Ma(t[0],r),month:r.month||n.getMonth(),date:r.date||n.getDate()};return Rr(a)===!1?(e.epoch=null,e):(yt(e,a),e=qr(e),e)}}],af=[].concat(N$,A$,C$,E$),S$=function(e,t,r){for(let n=0;n<af.length;n++){let a=t.match(af[n].reg);if(a){let i=af[n].parse(e,a,r);if(i!==null&&i.isValid())return i}}return e.silent===!1&&console.warn("Warning: couldn't parse date-string: '"+t+"'"),e.epoch=null,e},{parseArray:M$,parseObject:pg,parseNumber:T$}=v$,gg={year:new Date().getFullYear(),month:0,date:1},_w=(e,t)=>{let r=e._today||gg;if(typeof t=="number")return T$(e,t);if(e.epoch=Date.now(),e._today&&Ka(e._today)&&Object.keys(e._today).length>0){let n=pg(e,r,gg);n.isValid()&&(e.epoch=n.epoch)}return t==null||t===""?e:kw(t)===!0?(e.epoch=t.getTime(),e):f$(t)===!0?(e=M$(e,t,r),e):Ka(t)===!0?t.epoch?(e.epoch=t.epoch,e.tz=t.tz,e):(e=pg(e,t,r),e):typeof t!="string"?e:(t=y$(t),kl.hasOwnProperty(t)===!0?(e=kl[t](e),e):S$(e,t))};let sm=["sun","mon","tue","wed","thu","fri","sat"],um=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];function _s(){return sm}function Ol(){return um}function F$(e){sm=e.short||sm,um=e.long||um}const vg={mo:1,tu:2,we:3,th:4,fr:5,sa:6,su:7,tues:2,weds:3,wedn:3,thur:4,thurs:4};let Bw=!0;function P$(){return Bw}function k$(e){Bw=e}const yg=e=>{let t=e.timezone().current.offset;return t?xs(t,":"):"Z"},Aa=e=>P$()?d$(e):e,O$=e=>e>=0?Je(e,4):(e=Math.abs(e),"-"+Je(e,4)),To={day:e=>Aa(e.dayName()),"day-short":e=>Aa(_s()[e.day()]),"day-number":e=>e.day(),"day-ordinal":e=>va(e.day()),"day-pad":e=>Je(e.day()),date:e=>e.date(),"date-ordinal":e=>va(e.date()),"date-pad":e=>Je(e.date()),month:e=>Aa(e.monthName()),"month-short":e=>Aa(ps()[e.month()]),"month-number":e=>e.month(),"month-ordinal":e=>va(e.month()),"month-pad":e=>Je(e.month()),"iso-month":e=>Je(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(),r=t<0,n=Je(Math.abs(t),4);return r&&(n=Je(n,6),n="-"+n),n},time:e=>e.time(),"time-24":e=>`${e.hour24()}:${Je(e.minute())}`,hour:e=>e.hour12(),"hour-pad":e=>Je(e.hour12()),"hour-24":e=>e.hour24(),"hour-24-pad":e=>Je(e.hour24()),minute:e=>e.minute(),"minute-pad":e=>Je(e.minute()),second:e=>e.second(),"second-pad":e=>Je(e.second()),millisecond:e=>e.millisecond(),"millisecond-pad":e=>Je(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=>yg(e),numeric:e=>`${e.year()}/${Je(e.month()+1)}/${Je(e.date())}`,"numeric-us":e=>`${Je(e.month()+1)}/${Je(e.date())}/${e.year()}`,"numeric-uk":e=>`${Je(e.date())}/${Je(e.month()+1)}/${e.year()}`,"mm/dd":e=>`${Je(e.month()+1)}/${Je(e.date())}`,iso:e=>{let t=e.format("iso-year"),r=Je(e.month()+1),n=Je(e.date()),a=Je(e.h24()),i=Je(e.minute()),o=Je(e.second()),s=Je(e.millisecond(),3),u=yg(e);return`${t}-${r}-${n}T${a}:${i}:${o}.${s}${u}`},"iso-short":e=>{let t=Je(e.month()+1),r=Je(e.date());return`${O$(e.year())}-${t}-${r}`},"iso-utc":e=>new Date(e.epoch).toISOString(),nice:e=>`${ps()[e.month()]} ${va(e.date())}, ${e.time()}`,"nice-24":e=>`${ps()[e.month()]} ${va(e.date())}, ${e.hour24()}:${Je(e.minute())}`,"nice-year":e=>`${ps()[e.month()]} ${va(e.date())}, ${e.year()}`,"nice-day":e=>`${_s()[e.day()]} ${Aa(ps()[e.month()])} ${va(e.date())}`,"nice-full":e=>`${e.dayName()} ${Aa(e.monthName())} ${va(e.date())}, ${e.time()}`,"nice-full-24":e=>`${e.dayName()} ${Aa(e.monthName())} ${va(e.date())}, ${e.hour24()}:${Je(e.minute())}`},bg={"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(bg).forEach(e=>To[e]=To[bg[e]]);const of=(e,t="")=>{if(e.isValid()!==!0)return"";if(To.hasOwnProperty(t)){let r=To[t](e)||"";return t!=="json"&&(r=String(r),t.toLowerCase()!=="ampm"&&(r=Aa(r))),r}if(t.indexOf("{")!==-1){let r=/\{(.+?)\}/g;return t=t.replace(r,(n,a)=>{if(a=a.trim(),a!=="AMPM"&&(a=a.toLowerCase()),To.hasOwnProperty(a)){let i=String(To[a](e));return a.toLowerCase()!=="ampm"?Aa(i):i}return""}),t}return e.format("iso-short")},$l={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=>Je(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=>Je(e.month()+1),MMM:e=>e.format("month-short"),MMMM:e=>e.format("month"),w:e=>e.week(),ww:e=>Je(e.week()),d:e=>e.date(),dd:e=>Je(e.date()),D:e=>e.dayOfYear(),DD:e=>Je(e.dayOfYear()),DDD:e=>Je(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=>Je(e.h12()),H:e=>e.hour(),HH:e=>Je(e.hour()),m:e=>e.minute(),mm:e=>Je(e.minute()),s:e=>e.second(),ss:e=>Je(e.second()),SSS:e=>Je(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=>xs(e.timezone().current.offset),ZZ:e=>xs(e.timezone().current.offset),ZZZ:e=>xs(e.timezone().current.offset),ZZZZ:e=>xs(e.timezone().current.offset,":")},Ia=(e,t,r)=>{let n=e,a=t;for(let i=0;i<r;i+=1)$l[n]=$l[a],n+=e,a+=t};Ia("q","Q",4);Ia("L","M",4);Ia("Y","y",4);Ia("c","e",4);Ia("k","H",2);Ia("K","h",2);Ia("S","s",2);Ia("v","z",4);Ia("V","Z",4);const $$=function(e){for(let t=0;t<e.length;t+=1)if(e[t]==="'")for(let r=t+1;r<e.length;r+=1){if(e[r]&&(e[t]+=e[r]),e[r]==="'"){e[r]=null;break}e[r]=null}return e.filter(t=>t)},_$=function(e){for(let t=0;t<e.length;t+=1){let r=e[t];for(let n=t+1;n<e.length&&e[n]===r;n+=1)e[t]+=e[n],e[n]=null}return e=e.filter(t=>t),e=e.map(t=>(t==="''"&&(t="'"),t)),e},B$=(e,t)=>{let r=t.split("");return r=$$(r),r=_$(r),r.reduce((n,a)=>($l[a]!==void 0?n+=$l[a](e)||"":(/^'.+'$/.test(a)&&(a=a.replace(/'/g,"")),n+=a),n),"")},I$=["year","season","quarter","month","week","day","quarterHour","hour","minute"],wg=function(e,t){let r=e.clone().startOf(t),a=e.clone().endOf(t).epoch-r.epoch,i=(e.epoch-r.epoch)/a;return parseFloat(i.toFixed(2))},z$=(e,t)=>{if(t)return t=Zi(t),wg(e,t);let r={};return I$.forEach(n=>{r[n]=wg(e,n)}),r},j$=(e,t)=>{let r=e.progress();return t=Zi(t),t==="quarterhour"&&(t="quarterHour"),r[t]!==void 0?(r[t]>.5&&(e=e.add(1,t)),e=e.startOf(t)):e.silent===!1&&console.warn("no known unit '"+t+"'"),e},xg=(e,t,r)=>{let n=0;for(e=e.clone();e.isBefore(t);)e=e.add(1,r),n+=1;return e.isAfter(t,r)&&(n-=1),n},sf=(e,t,r)=>e.isBefore(t)?xg(e,t,r):xg(t,e,r)*-1,q$=(e,t)=>{let r=t.year()-e.year();return e=e.year(t.year()),e.isAfter(t)&&(r-=1),r},R$=function(e,t){let r=t.epoch-e.epoch,n={milliseconds:r,seconds:parseInt(r/1e3,10)};n.minutes=parseInt(n.seconds/60,10),n.hours=parseInt(n.minutes/60,10);let a=e.clone();return n.years=q$(a,t),a=e.add(n.years,"year"),n.months=n.years*12,a=e.add(n.months,"month"),n.months+=sf(a,t,"month"),n.quarters=n.years*4,n.quarters+=parseInt(n.months%12/3,10),n.weeks=n.years*52,a=e.add(n.weeks,"week"),n.weeks+=sf(a,t,"week"),n.days=n.weeks*7,a=e.add(n.days,"day"),n.days+=sf(a,t,"day"),n},L$=function(e){return Object.keys(e).forEach(t=>{e[t]*=-1}),e},H$=function(e,t,r){t=Pi(t,e);let n=!1;if(e.isAfter(t)){let i=e;e=t,t=i,n=!0}let a=R$(e,t);return n&&(a=L$(a)),r?(r=Zi(r),/s$/.test(r)!==!0&&(r+="s"),r==="dates"&&(r="days"),a[r]):a},go=e=>Math.abs(e)||0,G$=function(e){let t="P";return t+=go(e.years)+"Y",t+=go(e.months)+"M",t+=go(e.days)+"DT",t+=go(e.hours)+"H",t+=go(e.minutes)+"M",t+=go(e.seconds)+"S",t};function V$(e,t){const r=e.isBefore(t),n=r?t:e;let a=r?e:t;a=a.clone();const i={years:0,months:0,days:0,hours:0,minutes:0,seconds:0};return Object.keys(i).forEach(o=>{if(a.isSame(n,o))return;let s=a.diff(n,o);a=a.add(s,o),i[o]=s}),r&&Object.keys(i).forEach(o=>{i[o]!==0&&(i[o]*=-1)}),i}let Zr={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 Dg(e){return Zr[e]||""}function U$(e={}){Zr={second:e.second||Zr.second,seconds:e.seconds||Zr.seconds,minute:e.minute||Zr.minute,minutes:e.minutes||Zr.minutes,hour:e.hour||Zr.hour,hours:e.hours||Zr.hours,day:e.day||Zr.day,days:e.days||Zr.days,month:e.month||Zr.month,months:e.months||Zr.months,year:e.year||Zr.year,years:e.years||Zr.years}}let lm="past",cm="future",fm="present",mm="now",dm="almost",hm="over",pm=e=>`${e} ago`,gm=e=>`in ${e}`;function uf(e){return pm(e)}function lf(e){return gm(e)}function W$(){return lm}function J$(){return cm}function K$(){return fm}function cf(){return mm}function Y$(){return dm}function Z$(){return hm}function Q$(e){pm=e.pastDistance||pm,gm=e.futureDistance||gm,lm=e.past||lm,cm=e.future||cm,fm=e.present||fm,mm=e.now||mm,dm=e.almost||dm,hm=e.over||hm}const Ng={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 Ag(e,t){return e===1?e+" "+Dg(t.slice(0,-1)):e+" "+Dg(t)}const X$=function(e){let t=null,r=null,n=[],a=[];return Object.keys(e).forEach((i,o,s)=>{const u=Math.abs(e[i]);if(u===0)return;n.push(u+i[0]);const l=Ag(u,i);if(a.push(l),!t){if(t=l,r=l,o>4)return;const c=s[o+1],f=Math.abs(e[c]);f>Ng[c].almost?(t=Ag(u+1,i),r=Y$()+" "+t):f>Ng[c].over&&(r=Z$()+" "+l)}}),{qualified:r,rounded:t,abbreviated:n,englishValues:a}},e_=(e,t)=>{t=Pi(t,e);const r=V$(e,t);if(Object.keys(r).every(f=>!r[f])===!0)return{diff:r,rounded:cf(),qualified:cf(),precise:cf(),abbreviated:[],iso:"P0Y0M0DT0H0M0S",direction:K$()};let a,i=J$(),{rounded:o,qualified:s,englishValues:u,abbreviated:l}=X$(r);a=u.splice(0,2).join(", "),e.isAfter(t)===!0?(o=uf(o),s=uf(s),a=uf(a),i=W$()):(o=lf(o),s=lf(s),a=lf(a));let c=G$(r);return{diff:r,rounded:o,qualified:s,precise:a,abbreviated:l,iso:c,direction:i}},t_=[["spring",2,1],["summer",5,1],["fall",8,1],["autumn",8,1],["winter",11,1]],r_=[["fall",2,1],["autumn",2,1],["winter",5,1],["spring",8,1],["summer",11,1]],jn={north:t_,south:r_},Ii=[null,[0,1],[3,1],[6,1],[9,1]],Ri={second:e=>(yt(e,{millisecond:0}),e),minute:e=>(yt(e,{second:0,millisecond:0}),e),quarterhour:e=>{let t=e.minutes();return t>=45?e=e.minutes(45):t>=30?e=e.minutes(30):t>=15?e=e.minutes(15):e=e.minutes(0),yt(e,{second:0,millisecond:0}),e},hour:e=>(yt(e,{minute:0,second:0,millisecond:0}),e),day:e=>(yt(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")),yt(e,{hour:0,minute:0,second:0,millisecond:0}),e},month:e=>(yt(e,{date:1,hour:0,minute:0,second:0,millisecond:0}),e),quarter:e=>{let t=e.quarter();return Ii[t]&&yt(e,{month:Ii[t][0],date:Ii[t][1],hour:0,minute:0,second:0,millisecond:0}),e},season:e=>{let t=e.season(),r="north";e.hemisphere()==="South"&&(r="south");for(let n=0;n<jn[r].length;n++)if(jn[r][n][0]===t){let a=e.year();return t==="winter"&&e.month()<3&&(a-=1),yt(e,{year:a,month:jn[r][n][1],date:jn[r][n][2],hour:0,minute:0,second:0,millisecond:0}),e}return e},year:e=>(yt(e,{month:0,date:1,hour:0,minute:0,second:0,millisecond:0}),e),decade:e=>{e=e.startOf("year");let t=e.year(),r=parseInt(t/10,10)*10;return e=e.year(r),e},century:e=>{e=e.startOf("year");let t=e.year(),r=parseInt(t/100,10)*100;return e=e.year(r),e}};Ri.date=Ri.day;const n_=(e,t)=>{let r=e.clone();return t=Zi(t),Ri[t]?Ri[t](r):t==="summer"||t==="winter"?(r=r.season(t),Ri.season(r)):r},a_=(e,t)=>{let r=e.clone();return t=Zi(t),Ri[t]&&(r=Ri[t](r),r=r.add(1,t),r=r.subtract(1,"millisecond")),r},i_=function(e){return!!(_s().find(t=>t===e)||Ol().find(t=>t===e))},o_=function(e,t,r,n=1){if(!t||!r)return[];if(t=Zi(t),r=e.clone().set(r),e.isAfter(r)){let o=e;e=r,r=o}if(e.diff(r,t)<n)return[];let a=e.clone();i_(t)?(a=a.next(t),t="week"):a.startOf(t).isBefore(e)&&(a=a.next(t));let i=[];for(;a.isBefore(r);)i.push(a),a=a.add(n,t);return i},s_=e=>e?e.split("->"):[],u_=e=>(e=e[0].toUpperCase()+e.substr(1),e=e.replace(/[/_-]([a-z])/gi,t=>t.toUpperCase()),e=e.replace(/_(of|es)_/i,t=>t.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),gs=e=>{let t=e.timezones,r=e.tz;if(t.hasOwnProperty(r)===!1&&(r=Pl(e.tz,t)),r===null)return e.silent===!1&&console.warn("Warn: could not find given or local timezone - '"+e.tz+"'"),{current:{epochShift:0}};let n=t[r],a={name:u_(r),hasDst:!!n.dst,default_offset:n.offset,hemisphere:n.hem==="s"?"South":"North",current:{}};if(a.hasDst){let s=s_(n.dst);a.change={start:s[0],back:s[1]}}let i=n.offset,o=i;return a.hasDst===!0&&(a.hemisphere==="North"?o=i-1:o=n.offset+1),a.hasDst===!1?(a.current.offset=i,a.current.isDST=!1):Pw(e.epoch,a.change.start,a.change.back,i,o)===!0?(a.current.offset=i,a.current.isDST=a.hemisphere==="North"):(a.current.offset=o,a.current.isDST=a.hemisphere==="South"),a},l_=["century","decade","year","month","date","day","hour","minute","second","millisecond"],ii={set:function(e,t){let r=this.clone();return r=_w(r,e),t&&(this.tz=Pl(t)),r},timezone:function(){return gs(this)},isDST:function(){return gs(this).current.isDST},hasDST:function(){return gs(this).hasDst},offset:function(){return gs(this).current.offset*60},hemisphere:function(){return gs(this).hemisphere},format:function(e){return of(this,e)},unixFmt:function(e){return B$(this,e)},startOf:function(e){return n_(this,e)},endOf:function(e){return a_(this,e)},leapYear:function(){let e=this.year();return Ks(e)},progress:function(e){return z$(this,e)},nearest:function(e){return j$(this,e)},diff:function(e,t){return H$(this,e,t)},since:function(e){return e||(e=this.clone().set()),e_(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=Pl(e,t.timezones),t},every:function(e,t,r){if(typeof e=="object"&&typeof t=="string"){let n=t;t=e,e=n}return o_(this,e,t,r)},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 new Error("Invalid Month state.")}},log:function(){return console.log(""),console.log(of(this,"nice-short")),this},logYear:function(){return console.log(""),console.log(of(this,"full-short")),this},json:function(){return l_.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+=`
|
|
15
|
-
- `+this.format("time"),console.log(`
|
|
16
|
-
|
|
17
|
-
`,t+`
|
|
18
|
-
- `+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=_s().indexOf(e);t===-1&&(t=Ol().indexOf(e)),t===-1&&(t=1),this._weekStart=t}else console.warn("Spacetime Error: Cannot understand .weekStart() input:",e);return this}};ii.inDST=ii.isDST;ii.round=ii.nearest;ii.each=ii.every;const za=e=>(typeof e=="string"&&(e=parseInt(e,10)),e),ff=["year","month","date","hour","minute","second","millisecond"],cd=(e,t,r)=>{let n=ff.indexOf(r),a=ff.slice(n,ff.length);for(let i=0;i<a.length;i++){let o=t[a[i]]();e[a[i]](o)}return e},fi=function(e,t,r,n){return r===!0&&e.isBefore(t)?e=e.add(1,n):r===!1&&e.isAfter(t)&&(e=e.minus(1,n)),e},c_=function(e,t){t=za(t);let n=e.millisecond()-t;return e.epoch-n},f_=function(e,t,r){t=za(t);let n=e.clone(),i=(e.second()-t)*Dt.second;return e.epoch=e.epoch-i,e=fi(e,n,r,"minute"),e.epoch},Cg=function(e,t,r){t=za(t);let n=e.clone(),i=(e.minute()-t)*Dt.minute;return e.epoch-=i,cd(e,n,"second"),e=fi(e,n,r,"hour"),e.epoch},mf=function(e,t,r){t=za(t),t>=24?t=24:t<0&&(t=0);let n=e.clone(),a=e.hour()-t,i=a*Dt.hour;return e.epoch-=i,e.date()!==n.date()&&(e=n.clone(),a>1&&(a-=1),a<1&&(a+=1),i=a*Dt.hour,e.epoch-=i),yt(e,{hour:t}),cd(e,n,"minute"),e=fi(e,n,r,"day"),e.epoch},m_=function(e,t,r){let n=t.match(/([0-9]{1,2})[:h]([0-9]{1,2})(:[0-9]{1,2})? ?(am|pm)?/);if(!n){if(n=t.match(/([0-9]{1,2}) ?(am|pm)/),!n)return e.epoch;n.splice(2,0,"0"),n.splice(3,0,"")}let a=!1,i=parseInt(n[1],10),o=parseInt(n[2],10);o>=60&&(o=59),i>12&&(a=!0),a===!1&&(n[4]==="am"&&i===12&&(i=0),n[4]==="pm"&&i<12&&(i+=12)),n[3]=n[3]||"",n[3]=n[3].replace(/:/,"");let s=parseInt(n[3],10)||0,u=e.clone();return e=e.hour(i),e=e.minute(o),e=e.second(s),e=e.millisecond(0),e=fi(e,u,r,"day"),e.epoch},d_=function(e,t,r){if(t=za(t),t>28){let a=e.month(),i=Gi[a];a===1&&t===29&&Ks(e.year())&&(i=29),t>i&&(t=i)}t<=0&&(t=1);let n=e.clone();return yt(e,{date:t}),e=fi(e,n,r,"month"),e.epoch},h_=function(e,t,r){typeof t=="string"&&(t==="sept"&&(t="sep"),t=Ow()[t.toLowerCase()]),t=za(t),t>=12&&(t=11),t<=0&&(t=0);let n=e.date();n>Gi[t]&&(n=Gi[t]);let a=e.clone();return yt(e,{month:t,d:n}),e=fi(e,a,r,"year"),e.epoch},df=function(e,t){return typeof t=="string"&&/^'[0-9]{2}$/.test(t)&&(t=t.replace(/'/,"").trim(),t=Number(t),t>30?t=1900+t:t=2e3+t),t=za(t),yt(e,{year:t}),e.epoch},p_=function(e,t,r){let n=e.clone();return t=za(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-=1,e=e.add(t,"weeks"),e=fi(e,n,r,"year"),e.epoch},g_=function(e,t,r){t=za(t);let n=e.clone();return t-=1,t<=0?t=0:t>=365&&(Ks(e.year())?t=365:t=364),e=e.startOf("year"),e=e.add(t,"day"),cd(e,n,"hour"),e=fi(e,n,r,"year"),e.epoch};let vm="am",ym="pm";function v_(){return vm}function y_(){return ym}function b_(e){vm=e.am||vm,ym=e.pm||ym}const w_={millisecond:function(e){if(e!==void 0){let t=this.clone();return t.epoch=c_(t,e),t}return this.d.getMilliseconds()},second:function(e,t){if(e!==void 0){let r=this.clone();return r.epoch=f_(r,e,t),r}return this.d.getSeconds()},minute:function(e,t){if(e!==void 0){let r=this.clone();return r.epoch=Cg(r,e,t),r}return this.d.getMinutes()},hour:function(e,t){let r=this.d;if(e!==void 0){let n=this.clone();return n.epoch=mf(n,e,t),n}return r.getHours()},hourFloat:function(e,t){if(e!==void 0){let i=this.clone(),o=e%1;o=o*60;let s=parseInt(e,10);return i.epoch=mf(i,s,t),i.epoch=Cg(i,o,t),i}let r=this.d,n=r.getHours(),a=r.getMinutes();return a=a/60,n+a},hour12:function(e,t){let r=this.d;if(e!==void 0){let a=this.clone();e=""+e;let i=e.match(/^([0-9]+)(am|pm)$/);if(i){let o=parseInt(i[1],10);i[2]==="pm"&&(o+=12),a.epoch=mf(a,o,t)}return a}let n=r.getHours();return n>12&&(n=n-12),n===0&&(n=12),n},time:function(e,t){if(e!==void 0){let r=this.clone();return e=e.toLowerCase().trim(),r.epoch=m_(r,e,t),r}return`${this.h12()}:${Je(this.minute())}${this.ampm()}`},ampm:function(e,t){let r=v_(),n=this.hour();if(n>=12&&(r=y_()),typeof e!="string")return r;let a=this.clone();return e=e.toLowerCase().trim(),n>=12&&e==="am"?(n-=12,a.hour(n,t)):n<12&&e==="pm"?(n+=12,a.hour(n,t)):a},dayTime:function(e,t){if(e!==void 0){const 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"};let a=this.clone();return e=e||"",e=e.toLowerCase(),n.hasOwnProperty(e)===!0&&(a=a.time(n[e],t)),a}let r=this.hour();return r<6?"night":r<12?"morning":r<17?"afternoon":r<22?"evening":"night"},iso:function(e){return e!==void 0?this.set(e):this.format("iso")}},x_={date:function(e,t){if(e!==void 0){let r=this.clone();return e=parseInt(e,10),e&&(r.epoch=d_(r,e,t)),r}return this.d.getDate()},day:function(e,t){if(e===void 0)return this.d.getDay();let r=this.clone(),n=e;typeof e=="string"&&(e=e.toLowerCase(),vg.hasOwnProperty(e)?n=vg[e]:(n=_s().indexOf(e),n===-1&&(n=Ol().indexOf(e))));let i=this.d.getDay()-n;t===!0&&i>0&&(i=i-7),t===!1&&i<0&&(i=i+7);let o=this.subtract(i,"days");return yt(o,{hour:r.hour(),minute:r.minute(),second:r.second()}),o},dayName:function(e,t){if(e===void 0)return Ol()[this.day()];let r=this.clone();return r=r.day(e,t),r}},Eg=e=>(e=e.minute(0),e=e.second(0),e=e.millisecond(1),e),D_={dayOfYear:function(e,t){if(e!==void 0){let i=this.clone();return i.epoch=g_(i,e,t),i}let r=0,n=this.d.getMonth(),a;for(let i=1;i<=n;i++)a=new Date,a.setDate(1),a.setFullYear(this.d.getFullYear()),a.setHours(1),a.setMinutes(1),a.setMonth(i),a.setHours(-2),r+=a.getDate();return r+this.d.getDate()},week:function(e,t){if(e!==void 0){let s=this.clone();return s.epoch=p_(this,e,t),s=Eg(s),s}let r=this.clone();r=r.month(0),r=r.date(1),r=Eg(r),r=r.day("monday"),r.month()===11&&r.date()>=25&&(r=r.add(1,"week"));let n=1;r.date()===1&&(n=0),r=r.minus(2,"hours");const a=this.epoch;if(r.epoch>a)return 1;let i=0,o=this.month()*4;for(r.epoch+=Dt.week*o,i+=o;i<=52;i++){if(r.epoch>a)return i+n;r=r.add(1,"week")}return 52},month:function(e,t){if(e!==void 0){let r=this.clone();return r.epoch=h_(r,e,t),r}return this.d.getMonth()},monthName:function(e,t){if(e!==void 0){let r=this.clone();return r=r.month(e,t),r}return w$()[this.month()]},quarter:function(e,t){if(e!==void 0&&(typeof e=="string"&&(e=e.replace(/^q/i,""),e=parseInt(e,10)),Ii[e])){let n=this.clone(),a=Ii[e][0];return n=n.month(a,t),n=n.date(1,t),n=n.startOf("day"),n}let r=this.d.getMonth();for(let n=1;n<Ii.length;n++)if(r<Ii[n][0])return n-1;return 4},season:function(e,t){let r="north";if(this.hemisphere()==="South"&&(r="south"),e!==void 0){let a=this.clone();for(let i=0;i<jn[r].length;i++)e===jn[r][i][0]&&(a=a.month(jn[r][i][1],t),a=a.date(1),a=a.startOf("day"));return a}let n=this.d.getMonth();for(let a=0;a<jn[r].length-1;a++)if(n>=jn[r][a][1]&&n<jn[r][a+1][1])return jn[r][a][0];return r==="north"?"winter":"summer"},year:function(e){if(e!==void 0){let t=this.clone();return t.epoch=df(t,e),t}return this.d.getFullYear()},era:function(e){if(e!==void 0){let t=this.clone();e=e.toLowerCase();let r=t.d.getFullYear();return e==="bc"&&r>0&&(t.epoch=df(t,r*-1)),e==="ad"&&r<0&&(t.epoch=df(t,r*-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,(n,a,i)=>(i.match(/b\.?c\.?/i)&&(a="-"+a),a)),e=e.replace(/c$/,""));let r=Number(e);return isNaN(e)?(console.warn("Spacetime: Invalid century input"),this):(r===0&&(r=1),r>=0?r=(r-1)*100:r=(r+1)*100,this.year(r))}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-=1);let r=e*1e3;return r===0&&(r=1),this.year(r)}let t=Math.floor(this.year()/1e3);return t>=0&&(t+=1),t}},vr=Object.assign({},w_,x_,D_);vr.milliseconds=vr.millisecond;vr.seconds=vr.second;vr.minutes=vr.minute;vr.hours=vr.hour;vr.hour24=vr.hour;vr.h12=vr.hour12;vr.h24=vr.hour24;vr.days=vr.day;const N_=e=>{Object.keys(vr).forEach(t=>{e.prototype[t]=vr[t]})},bm=function(e,t){return e===1&&Ks(t)?29:Gi[e]},A_=(e,t)=>{if(e.month>0){let r=parseInt(e.month/12,10);e.year=t.year()+r,e.month=e.month%12}else if(e.month<0){let r=Math.abs(e.month),n=parseInt(r/12,10);r%12!==0&&(n+=1),e.year=t.year()-n,e.month=e.month%12,e.month=e.month+12,e.month===12&&(e.month=0)}return e},C_=(e,t,r)=>{e.year=t.year(),e.month=t.month();let n=t.date();for(e.date=n-Math.abs(r);e.date<1;){e.month-=1,e.month<0&&(e.month=11,e.year-=1);let a=bm(e.month,e.year);e.date+=a}return e},E_=(e,t,r)=>{let n=t.year(),a=t.month(),i=bm(a,n);for(;r>i;)r-=i,a+=1,a>=12&&(a-=12,n+=1),i=bm(a,n);return e.month=a,e.date=r,e},S_=A_,M_=E_,T_=C_,Bn=["millisecond","second","minute","hour","date","month"];let oi={second:Bn.slice(0,1),minute:Bn.slice(0,2),quarterhour:Bn.slice(0,2),hour:Bn.slice(0,3),date:Bn.slice(0,4),month:Bn.slice(0,4),quarter:Bn.slice(0,4),season:Bn.slice(0,4),year:Bn,decade:Bn,century:Bn};oi.week=oi.hour;oi.season=oi.date;oi.quarter=oi.date;const F_={year:!0,quarter:!0,season:!0,month:!0,week:!0,date:!0},P_={month:!0,quarter:!0,season:!0,year:!0},k_=e=>{e.prototype.add=function(t,r){let n=this.clone();if(!r||t===0)return n;let a=this.clone();if(r=Zi(r),r==="millisecond")return n.epoch+=t,n;r==="fortnight"&&(t*=2,r="week"),Dt[r]?n.epoch+=Dt[r]*t:r==="week"||r==="weekend"?n.epoch+=Dt.day*(t*7):r==="quarter"||r==="season"?n.epoch+=Dt.month*(t*3):r==="quarterhour"&&(n.epoch+=Dt.minute*15*t);let i={};if(oi[r]&&oi[r].forEach(o=>{i[o]=a[o]()}),F_[r]){const o=a.timezone().current.offset-n.timezone().current.offset;n.epoch+=o*3600*1e3}if(r==="month"&&(i.month=a.month()+t,i=S_(i,a)),r==="week"){let o=a.date()+t*7;o<=28&&o>1&&(i.date=o)}if(r==="weekend"&&n.dayName()!=="saturday")n=n.day("saturday",!0);else if(r==="date"){if(t<0)i=T_(i,a,t);else{let o=a.date()+t;i=M_(i,a,o)}t!==0&&a.isSame(n,"day")&&(i.date=a.date()+t)}else if(r==="quarter"){if(i.month=a.month()+t*3,i.year=a.year(),i.month<0){let o=Math.floor(i.month/12),s=i.month+Math.abs(o)*12;i.month=s,i.year+=o}else if(i.month>=12){let o=Math.floor(i.month/12);i.month=i.month%12,i.year+=o}i.date=a.date()}else if(r==="year"){let o=a.year()+t,s=n.year();if(s<o){let u=Math.floor(t/4)||1;n.epoch+=Math.abs(Dt.day*u)}else if(s>o){let u=Math.floor(t/4)||1;n.epoch+=Dt.day*u}}else r==="decade"?i.year=n.year()+10:r==="century"&&(i.year=n.year()+100);if(P_[r]){let o=Gi[i.month];i.date=a.date(),i.date>o&&(i.date=o)}return Object.keys(i).length>1&&yt(n,i),n},e.prototype.subtract=function(t,r){return this.clone().add(t*-1,r)},e.prototype.minus=e.prototype.subtract,e.prototype.plus=e.prototype.add},Es={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()};Es.date=Es.day;const O_=e=>{e.prototype.isSame=function(t,r,n=!0){let a=this;if(!r)return null;if(typeof t=="string"&&typeof r=="object"){let i=t;t=r,r=i}return(typeof t=="string"||typeof t=="number")&&(t=new e(t,this.timezone.name)),r=r.replace(/s$/,""),n===!0&&a.tz!==t.tz&&(t=t.clone(),t.tz=a.tz),Es[r]?Es[r](a)===Es[r](t):null}},$_=e=>{const t={isAfter:function(r){r=Pi(r,this);let n=hs(r);return n===null?null:this.epoch>n},isBefore:function(r){r=Pi(r,this);let n=hs(r);return n===null?null:this.epoch<n},isEqual:function(r){r=Pi(r,this);let n=hs(r);return n===null?null:this.epoch===n},isBetween:function(r,n,a=!1){r=Pi(r,this),n=Pi(n,this);let i=hs(r);if(i===null)return null;let o=hs(n);return o===null?null:a?this.isBetween(r,n)||this.isEqual(r)||this.isEqual(n):i<this.epoch&&this.epoch<o}};Object.keys(t).forEach(r=>{e.prototype[r]=t[r]})},__=e=>{const t={i18n:function(r){return Ka(r.days)&&F$(r.days),Ka(r.months)&&x$(r.months),m$(r.useTitleCase)&&k$(r.useTitleCase),Ka(r.ampm)&&b_(r.ampm),Ka(r.distance)&&Q$(r.distance),Ka(r.units)&&U$(r.units),this}};Object.keys(t).forEach(r=>{e.prototype[r]=t[r]})};let hf=zo;const Jt=function(e,t,r={}){this.epoch=null,this.tz=Pl(t,hf),this.silent=typeof r.silent<"u"?r.silent:!0,this.british=r.dmy||r.british,this._weekStart=1,r.weekStart!==void 0&&(this._weekStart=r.weekStart),this._today={},r.today!==void 0&&(this._today=r.today),Object.defineProperty(this,"d",{get:function(){let a=e$(this),o=(new Date(this.epoch).getTimezoneOffset()||0)+a*60;o=o*60*1e3;let s=this.epoch+o;return new Date(s)}}),Object.defineProperty(this,"timezones",{get:()=>hf,set:a=>(hf=a,a)});let n=_w(this,e);this.epoch=n.epoch,n.tz&&(this.tz=n.tz)};Object.keys(ii).forEach(e=>{Jt.prototype[e]=ii[e]});Jt.prototype.clone=function(){return new Jt(this.epoch,this.tz,{silent:this.silent,weekStart:this._weekStart,today:this._today,parsers:this.parsers})};Jt.prototype.toLocalDate=function(){return this.toNativeDate()};Jt.prototype.toNativeDate=function(){return new Date(this.epoch)};N_(Jt);k_(Jt);O_(Jt);$_(Jt);__(Jt);const B_=(e,t)=>{let r=new Jt(null),n=new Jt(null);r=r.time(e),t?n=n.time(t):n=r.add(59,"minutes");let a=r.hour(),i=n.hour();return Object.keys(r.timezones).filter(s=>{if(s.indexOf("/")===-1)return!1;let u=new Jt(null,s),l=u.hour();return l>=a&&l<=i?!(l===a&&u.minute()<r.minute()||l===i&&u.minute()>n.minute()):!1})},I_="7.7.0",pt=(e,t,r)=>new Jt(e,t,r),lc=function(e){let t=e._today||{};return Object.keys(t).forEach(r=>{e=e[r](t[r])}),e};pt.now=(e,t)=>{let r=new Jt(new Date().getTime(),e,t);return r=lc(r),r};pt.today=(e,t)=>{let r=new Jt(new Date().getTime(),e,t);return r=lc(r),r.startOf("day")};pt.tomorrow=(e,t)=>{let r=new Jt(new Date().getTime(),e,t);return r=lc(r),r.add(1,"day").startOf("day")};pt.yesterday=(e,t)=>{let r=new Jt(new Date().getTime(),e,t);return r=lc(r),r.subtract(1,"day").startOf("day")};pt.extend=function(e={}){return Object.keys(e).forEach(t=>{Jt.prototype[t]=e[t]}),this};pt.timezones=function(){return new Jt().timezones};pt.max=function(e,t){let r=new Jt(null,e,t);return r.epoch=864e13,r};pt.min=function(e,t){let r=new Jt(null,e,t);return r.epoch=-864e13,r};pt.whereIts=B_;pt.version=I_;pt.plugin=pt.extend;const Sg={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"},Fo={quarter:15,half:30},$u=function(e){let t=e.time("6:00am");return e.isBefore(t)?e.ampm("pm"):e},z_=function(e,t){let r=e.match("#Cardinal$"),n=e.not(r).match("(half|quarter|25|20|15|10|5)");r=r.text("reduced");let a=n.text("reduced");Fo.hasOwnProperty(a)&&(a=Fo[a]);let i=e.has("to");return t=t.hour(r),t=t.startOf("hour"),r<6&&(t=t.ampm("pm")),i?t=t.subtract(a,"minutes"):t=t.add(a,"minutes"),t},fd=function(e,t){let r=e.match("(at|by|for|before|this|after)? #Time+");r=r.not("^(at|by|for|before|this|after)"),r=r.not("sharp"),r=r.not("on the dot");let n=pt.now(t.timezone),a=n.clone(),i=r.not("in? the").text("reduced");if(i=i.replace(/^@/,""),Sg.hasOwnProperty(i))return{result:Sg[i],m:r};let o=r.match("^#Cardinal oclock (am|pm)?");if(o.found&&(n=n.hour(o.text("reduced")),n=n.startOf("hour"),n.isValid()&&!n.isEqual(a))){let u=o.match("(am|pm)");return u.found?n=n.ampm(u.text("reduced")):n=$u(n),{result:n.time(),m:o}}if(o=r.match("(half|quarter|25|20|15|10|5) (past|after|to) #Cardinal"),o.found&&(n=z_(o,n),n.isValid()&&!n.isEqual(a)))return n=$u(n),{result:n.time(),m:o};if(o=r.match("[<min>(half|quarter|25|20|15|10|5)] (past|after)"),o.found){let u=o.groups("min").text("reduced"),l=pt(t.today);if(Fo.hasOwnProperty(u)&&(u=Fo[u]),l=l.next("hour").startOf("hour").minute(u),l.isValid()&&!l.isEqual(a))return{result:l.time(),m:o}}if(o=r.match("[<min>(half|quarter|25|20|15|10|5)] to"),o.found){let u=o.groups("min").text("reduced"),l=pt(t.today);if(Fo.hasOwnProperty(u)&&(u=Fo[u]),l=l.next("hour").startOf("hour").minus(u,"minutes"),l.isValid()&&!l.isEqual(a))return{result:l.time(),m:o}}if(o=r.match("[<time>#Time] (in|at) the? [<desc>(morning|evening|night|nighttime)]"),o.found){let u=o.groups("time").text("normal");if(/^[0-9]{1,2}$/.test(u)?(n=n.hour(u),n=n.startOf("hour")):n=n.time(u),n.isValid()&&!n.isEqual(a)){let l=o.groups("desc").text("reduced");return(l==="evening"||l==="night")&&(n=n.ampm("pm")),{result:n.time(),m:o}}}if(o=r.match("this? [<desc>(morning|evening|tonight)] at [<time>(#Cardinal|#Time)]"),o.found){let u=o.groups(),l=u.time.text("reduced");if(/^[0-9]{1,2}$/.test(l)?(n=n.hour(l),n=n.startOf("hour")):n=n.time(l),n.isValid()&&!n.isEqual(a)){let c=u.desc.text("reduced");return c==="morning"&&(n=n.ampm("am")),(c==="evening"||c==="tonight")&&(n=n.ampm("pm")),{result:n.time(),m:o}}}if(o=r.match("^#Cardinal$"),o.found){let u=o.text("reduced");if(n=n.hour(u),n=n.startOf("hour"),n.isValid()&&!n.isEqual(a))return/(am|pm)/i.test(u)===!1&&(n=$u(n)),{result:n.time(),m:o}}let s=r.text("reduced");return n=n.time(s),n.isValid()&&!n.isEqual(a)?(/(am|pm)/i.test(s)===!1&&(n=$u(n)),{result:n.time(),m:r}):t.dayStart?{result:t.dayStart,m:e.none()}:{result:null,m:e.none()}},j_=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()})))},q_=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}))},ke="America/",Be="Asia/",zt="Europe/",Tr="Africa/",Ut="Australia/",Yr="Pacific/",R_={"british summer time":zt+"London",bst:zt+"London","british time":zt+"London","britain time":zt+"London","irish summer time":zt+"Dublin","irish time":zt+"Dublin",ireland:zt+"Dublin","central european time":zt+"Berlin",cet:zt+"Berlin","central european summer time":zt+"Berlin",cest:zt+"Berlin","central europe":zt+"Berlin","eastern european time":zt+"Riga",eet:zt+"Riga","eastern european summer time":zt+"Riga",eest:zt+"Riga","eastern europe time":zt+"Riga","western european time":zt+"Lisbon","western european summer time":zt+"Lisbon","western europe":zt+"Lisbon","turkey standard time":zt+"Istanbul",trt:zt+"Istanbul","turkish time":zt+"Istanbul",etc:Tr+"Freetown",utc:Tr+"Freetown","greenwich standard time":Tr+"Freetown",gmt:Tr+"Freetown","east africa time":Tr+"Nairobi","east african time":Tr+"Nairobi","eastern africa time":Tr+"Nairobi","central africa time":Tr+"Khartoum","central african time":Tr+"Khartoum","south africa standard time":Tr+"Johannesburg",sast:Tr+"Johannesburg","southern africa":Tr+"Johannesburg","south african":Tr+"Johannesburg","west africa standard time":Tr+"Lagos","western africa time":Tr+"Lagos","west african time":Tr+"Lagos","australian central standard time":Ut+"Adelaide",acst:Ut+"Adelaide","australian central daylight time":Ut+"Adelaide",acdt:Ut+"Adelaide","australia central":Ut+"Adelaide","australian eastern standard time":Ut+"Brisbane",aest:Ut+"Brisbane","australian eastern daylight time":Ut+"Brisbane",aedt:Ut+"Brisbane","australia east":Ut+"Brisbane","australian western standard time":Ut+"Perth",awst:Ut+"Perth","australian western daylight time":Ut+"Perth",awdt:Ut+"Perth","australia west":Ut+"Perth","australian central western standard time":Ut+"Eucla",acwst:Ut+"Eucla","australia central west":Ut+"Eucla","lord howe standard time":Ut+"Lord_Howe",lhst:Ut+"Lord_Howe","lord howe daylight time":Ut+"Lord_Howe",lhdt:Ut+"Lord_Howe","russian standard time":zt+"Moscow",msk:zt+"Moscow",russian:zt+"Moscow","central standard time":ke+"Chicago","central time":ke+"Chicago",cst:ke+"Havana","central daylight time":ke+"Chicago",cdt:ke+"Havana","mountain standard time":ke+"Denver","mountain time":ke+"Denver",mst:ke+"Denver","mountain daylight time":ke+"Denver",mdt:ke+"Denver","atlantic standard time":ke+"Halifax","atlantic time":ke+"Halifax",ast:Be+"Baghdad","atlantic daylight time":ke+"Halifax",adt:ke+"Halifax","eastern standard time":ke+"New_York",eastern:ke+"New_York","eastern time":ke+"New_York",est:ke+"New_York","eastern daylight time":ke+"New_York",edt:ke+"New_York","pacific time":ke+"Los_Angeles","pacific standard time":ke+"Los_Angeles",pst:ke+"Los_Angeles","pacific daylight time":ke+"Los_Angeles",pdt:ke+"Los_Angeles","alaskan standard time":ke+"Anchorage","alaskan time":ke+"Anchorage",ahst:ke+"Anchorage","alaskan daylight time":ke+"Anchorage",ahdt:ke+"Anchorage","hawaiian standard time":Yr+"Honolulu","hawaiian time":Yr+"Honolulu",hst:Yr+"Honolulu","aleutian time":Yr+"Honolulu","hawaii time":Yr+"Honolulu","newfoundland standard time":ke+"St_Johns","newfoundland time":ke+"St_Johns",nst:ke+"St_Johns","newfoundland daylight time":ke+"St_Johns",ndt:ke+"St_Johns","brazil time":ke+"Sao_Paulo",brt:ke+"Sao_Paulo",brasília:ke+"Sao_Paulo",brasilia:ke+"Sao_Paulo","brazilian time":ke+"Sao_Paulo","argentina time":ke+"Buenos_Aires","argentinian time":ke+"Buenos_Aires","amazon time":ke+"Manaus",amt:ke+"Manaus","amazonian time":ke+"Manaus","easter island standard time":"Chile/Easterisland",east:"Chile/Easterisland","easter island summer time":"Chile/Easterisland",easst:"Chile/Easterisland","venezuelan standard time":ke+"Caracas","venezuelan time":ke+"Caracas",vet:ke+"Caracas","venezuela time":ke+"Caracas","paraguay time":ke+"Asuncion",pyt:ke+"Asuncion","paraguay summer time":ke+"Asuncion",pyst:ke+"Asuncion","cuba standard time":ke+"Havana","cuba time":ke+"Havana","cuba daylight time":ke+"Havana","cuban time":ke+"Havana","bolivia time":ke+"La_Paz","bolivian time":ke+"La_Paz","colombia time":ke+"Bogota",cot:ke+"Bogota","colombian time":ke+"Bogota","acre time":ke+"Eirunepe","peru time":ke+"Lima","chile standard time":ke+"Punta_Arenas","chile time":ke+"Punta_Arenas",clst:ke+"Punta_Arenas","chile summer time":ke+"Punta_Arenas",cldt:ke+"Punta_Arenas","uruguay time":ke+"Montevideo",uyt:ke+"Montevideo",ist:Be+"Jerusalem","arabic standard time":Be+"Baghdad","arabic time":Be+"Baghdad","arab time":Be+"Baghdad","iran standard time":Be+"Tehran","iran time":Be+"Tehran",irst:Be+"Tehran","iran daylight time":Be+"Tehran",irdt:Be+"Tehran",iranian:Be+"Tehran","pakistan standard time":Be+"Karachi","pakistan time":Be+"Karachi",pkt:Be+"Karachi","india standard time":Be+"Kolkata","indian time":Be+"Kolkata","indochina time":Be+"Bangkok",ict:Be+"Bangkok","south east asia":Be+"Bangkok","china standard time":Be+"Shanghai",ct:Be+"Shanghai","chinese time":Be+"Shanghai","alma-ata time":Be+"Almaty",almt:Be+"Almaty","oral time":Be+"Oral","orat time":Be+"Oral","yakutsk time":Be+"Yakutsk",yakt:Be+"Yakutsk","gulf standard time":Be+"Dubai","gulf time":Be+"Dubai",gst:Be+"Dubai",uae:Be+"Dubai","hong kong time":Be+"Hong_Kong",hkt:Be+"Hong_Kong","western indonesian time":Be+"Jakarta",wib:Be+"Jakarta","indonesia time":Be+"Jakarta","central indonesian time":Be+"Makassar",wita:Be+"Makassar","israel daylight time":Be+"Jerusalem",idt:Be+"Jerusalem","israel standard time":Be+"Jerusalem","israel time":Be+"Jerusalem",israeli:Be+"Jerusalem","krasnoyarsk time":Be+"Krasnoyarsk",krat:Be+"Krasnoyarsk","malaysia time":Be+"Kuala_Lumpur",myt:Be+"Kuala_Lumpur","singapore time":Be+"Singapore",sgt:Be+"Singapore","korea standard time":Be+"Seoul","korea time":Be+"Seoul",kst:Be+"Seoul","korean time":Be+"Seoul","uzbekistan time":Be+"Samarkand",uzt:Be+"Samarkand","vladivostok time":Be+"Vladivostok",vlat:Be+"Vladivostok","maldives time":"Indian/Maldives",mvt:"Indian/Maldives","mauritius time":"Indian/Mauritius",mut:"Indian/Mauritius","marshall islands time":Yr+"Kwajalein",mht:Yr+"Kwajalein","samoa standard time":Yr+"Midway",sst:Yr+"Midway","somoan time":Yr+"Midway","chamorro standard time":Yr+"Guam",chst:Yr+"Guam","papua new guinea time":Yr+"Bougainville",pgt:Yr+"Bougainville"};let L_=pt().timezones,H_=Object.keys(L_).reduce((e,t)=>(e[t]=t,e),{});const Mg=Object.assign({},R_,H_),G_=/(-?[0-9]+)h(rs)?/i,V_=/(-?[0-9]+)/,U_=/utc([-+]?[0-9]+)/i,W_=/gmt([-+]?[0-9]+)/i,_u=function(e){return e=Number(e),e>-13&&e<13?(e=e*-1,e=(e>0?"+":"")+e,"Etc/GMT"+e):null},J_=function(e){let t=e.match(G_);if(t!==null||(t=e.match(U_),t!==null))return _u(t[1]);if(t=e.match(W_),t!==null){let r=Number(t[1])*-1;return _u(r)}return t=e.match(V_),t!==null?_u(t[1]):null},K_=function(e){let t=e.match("#Timezone+");t=t.not("(in|for|by|near|at)");let r=t.text("reduced");if(Mg.hasOwnProperty(r))return{result:Mg[r],m:t};let n=J_(r);return n?{result:n,m:t}:{result:null,m:e.none()}},Y_=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()}},Z_=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},Q_=function(e,t){let r=YO(e),n=r.result;e=e.not(r.m),r=QO(e);let a=r.result;e=e.not(r.m),r=K_(e);let i=r.result;e=e.not(r.m),r=fd(e,t);let o=r.result;e=e.not(r.m),r=Y_(e);let s=r.result;e=e.not(r.m),r=q_(e);let u=r.result;e=e.not(r.m),r=j_(e);let l=r.result;return e=e.not(r.m),e=Z_(e),{shift:n,counter:a,tz:i,time:o,weekDay:s,section:u,rel:l,doc:e}};let cn=class Iw{constructor(t,r,n){this.unit=r||"day",this.setTime=!1,n=n||{};let a={};n.today&&(a={date:n.today.date(),month:n.today.month(),year:n.today.year()}),t&&t.month==="sept"&&(t.month="sep");let i=pt(t,n.timezone,{today:a,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 Iw(this.d,this.unit,this.context);return t.setTime=this.setTime,t}log(){return console.log("--"),this.d.log(),console.log(`
|
|
19
|
-
`),this}applyShift(t={}){return Object.keys(t).forEach(r=>{this.d=this.d.add(t[r],r),(r==="hour"||r==="minute")&&(this.setTime=!0)}),this}applyTime(t){if(t){if(/^[0-9]{1,2}$/.test(t)?this.d=this.d.hour(t):this.d=this.d.time(t),!/[ap]m/.test(t)){let a=this.d.time("6:00am");this.d.isBefore(a)&&(this.d=this.d.ampm("pm"));let i=this.d.time("10:00pm");this.d.isAfter(i)&&(this.d=this.d.ampm("am"))}}else this.d=this.d.startOf("day");return this.setTime=!0,this}applyWeekDay(t){if(t){let r=this.d.epoch;this.d=this.d.day(t),this.d.epoch<r&&(this.d=this.d.add(1,"week"))}return this}applyRel(t){return t==="next"?this.next():t==="last"||t==="this-past"?this.last():this}applySection(t){return t==="start"?this.start():t==="end"?this.end():t==="middle"?this.middle():this}format(t){return this.d.format(t)}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 t=this.d.time(this.context.dayEnd);if(t.isAfter(this.d))return this.d=t,this}return this}middle(){let t=this.d.diff(this.d.endOf(this.unit)),r=Math.round(t.minutes/2);return this.d=this.d.add(r,"minutes"),this}beforeEnd(){let t=this.d.startOf(this.unit).diff(this.d.endOf(this.unit)),r=Math.round(t.minutes/4);return this.d=this.d.endOf(this.unit),this.d=this.d.minus(r,"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}};class An extends cn{constructor(t,r,n){super(t,r,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}}class qn extends An{constructor(t,r,n){super(t,r,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}}class wm extends An{constructor(t,r,n){super(t,r,n),this.unit="day",this.isWeekDay=!0,typeof t=="string"?(this.d=pt(n.today,n.timezone),this.d=this.d.day(t),this.d.isBefore(n.today)&&(this.d=this.d.add(7,"days"))):this.d=t,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(t){if(t==="next"){let r=this.context.today.endOf("week").add(1,"week");return this.next(),this.d.isAfter(r)&&this.last(),this}if(t==="this-past")return this.last();if(t==="last"){let r=this.context.today.startOf("week");return this.last(),this.d.isBefore(r)===!1&&this.last(),this}return this}}class X_ extends qn{constructor(t,r,n){super(t,r,n),this.unit="day",this.d.isValid()&&(this.d=this.d.startOf("day"))}}class yl extends cn{constructor(t,r,n){super(t,r,n,!0),this.unit="hour",this.d.isValid()&&(this.d=this.d.startOf("hour"))}}class zw extends cn{constructor(t,r,n){super(t,r,n,!0),this.unit="minute",this.d.isValid()&&(this.d=this.d.startOf("minute"))}}class na extends cn{constructor(t,r,n){super(t,r,n,!0),this.unit="millisecond"}}class eB extends cn{constructor(t,r,n){super(t,r,n),this.unit="month",this.d.isValid()&&(this.d=this.d.startOf(this.unit))}}class Qa extends cn{constructor(t,r,n){super(t,r,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}}class Tg extends cn{constructor(t,r,n){super(t,r,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}}class xm extends cn{constructor(t,r,n){super(t,r,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}}class md extends cn{constructor(t,r,n){super(t,r,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}}class Dm extends cn{constructor(t,r,n){super(t,r,n),this.unit="year",this.d.isValid()&&(this.d=this.d.startOf("year"))}}class Bs extends cn{constructor(t,r,n){super(t,r,n),this.unit="week",this.d.isValid()&&(this.d=this.d.startOf("week"))}clone(){return new Bs(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}}class jw extends cn{constructor(t,r,n){super(t,r,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}}const Hn={today:e=>new An(e.today,null,e),yesterday:e=>new An(e.today.minus(1,"day"),null,e),tomorrow:e=>new An(e.today.plus(1,"day"),null,e),eom:e=>{let t=e.today.endOf("month");return t=t.startOf("day"),new An(t,null,e)},eoy:e=>{let t=e.today.endOf("year");return t=t.startOf("day"),new An(t,null,e)},now:e=>new na(e.today,null,e)};Hn.tommorrow=Hn.tomorrow;Hn.tmrw=Hn.tomorrow;Hn.anytime=Hn.today;Hn.sometime=Hn.today;const tB=function(e,t,r){let n=null;e.found===!1&&(r.time!==null&&(n=new na(t.today,null,t)),r.shift&&Object.keys(r.shift).length>0&&(r.shift.hour||r.shift.minute?n=new na(t.today,null,t):n=new An(t.today,null,t)));let a=e.text("reduced");return Hn.hasOwnProperty(a)===!0?Hn[a](t):a==="next"&&r.shift&&Object.keys(r.shift).length>0?Hn.tomorrow(t):n},Ei="january",Si="february",Fg="march",Bu="april",vo="may",rB="june",Iu="july",zu="august",pf="september",vs="october",Ga="november",ta="december";var ju={"new years eve":[ta,31],"new years":[Ei,1],"new years day":[Ei,1],"inauguration day":[Ei,20],"australia day":[Ei,26],"national freedom day":[Si,1],"groundhog day":[Si,2],"rosa parks day":[Si,4],"valentines day":[Si,14],"saint valentines day":[Si,14],"st valentines day ":[Si,14],"saint patricks day":[Fg,17],"st patricks day":[Fg,17],"april fools":[Bu,1],"april fools day":[Bu,1],"emancipation day":[Bu,16],"tax day":[Bu,15],"labour day":[vo,1],"cinco de mayo":[vo,5],"national nurses day":[vo,6],"harvey milk day":[vo,22],"victoria day":[vo,24],juneteenth:[rB,19],"canada day":[Iu,1],"independence day":[Iu,4],"independents day":[Iu,4],"bastille day":[Iu,14],"purple heart day":[zu,7],"womens equality day":[zu,26],"16 de septiembre":[pf,16],"dieciseis de septiembre":[pf,16],"grito de dolores":[pf,16],halloween:[vs,31],"all hallows eve":[vs,31],"day of the dead":[vs,31],"dia de muertos":[vs,31],"veterans day":[Ga,11],"st andrews day":[Ga,30],"saint andrews day":[Ga,30],"all saints day":[Ga,1],"all sts day":[Ga,1],"armistice day":[Ga,11],"rememberance day":[Ga,11],"christmas eve":[ta,24],christmas:[ta,25],xmas:[ta,25],"boxing day":[ta,26],"st stephens day":[ta,26],"saint stephens day":[ta,26],epiphany:[Ei,6],"orthodox christmas day":[Ei,7],"orthodox new year":[Ei,14],"assumption of mary":[zu,15],"all souls day":[Ga,2],"feast of the immaculate conception":[ta,8],"feast of our lady of guadalupe":[ta,12],kwanzaa:[ta,26],imbolc:[Si,2],beltaine:[vo,1],lughnassadh:[zu,1],samhain:[vs,31]};const nB=function(e,t,r,n){if(ju.hasOwnProperty(e)||ju.hasOwnProperty(t)){let a=ju[e]||ju[t]||[],i=pt.now(n);if(i=i.year(r),i=i.startOf("year"),i=i.month(a[0]),i=i.date(a[1]),i.isValid())return i}return null};var aB=nB;const iB="january",oB="february",sB="march",uB="may",lB="june",cB="september",Pg="october",kg="november",yo="monday",fB="thursday",mB="friday",Og="sunday";let Vi={"martin luther king day":[3,yo,iB],"presidents day":[3,yo,oB],"commonwealth day":[2,yo,sB],"mothers day":[2,Og,uB],"fathers day":[3,Og,lB],"labor day":[1,yo,cB],"columbus day":[2,yo,Pg],"canadian thanksgiving":[2,yo,Pg],thanksgiving:[4,fB,kg],"black friday":[4,mB,kg]};Vi["turday day"]=Vi.thanksgiving;Vi["indigenous peoples day"]=Vi["columbus day"];Vi["mlk day"]=Vi["martin luther king day"];var qu=Vi;const dB=function(e,t,r,n){if(qu.hasOwnProperty(e)||qu.hasOwnProperty(t)){let a=qu[e]||qu[t]||[],i=pt.now(n);i=i.year(r),i=i.month(a[2]),i=i.startOf("month");let o=i.month();if(i=i.day(a[1]),i.month()!==o&&(i=i.add(1,"week")),a[0]>1&&(i=i.add(a[0]-1,"week")),i.isValid())return i}return null};var hB=dB;let Ui={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};Ui["easter sunday"]=Ui.easter;Ui.pentecost=Ui["whit sunday"];Ui.whitsun=Ui["whit sunday"];var Ru=Ui;const pB=function(e){let t=Math.floor,r=e%19,n=t(e/100),a=(n-t(n/4)-t((8*n+13)/25)+19*r+15)%30,i=a-t(a/28)*(1-t(29/(a+1))*t((21-r)/11)),o=(e+t(e/4)+i+2-n+t(n/4))%7,s=i-o,u=3+t((s+40)/44),l=s+28-31*t(u/4);return u=u===4?"April":"March",u+" "+l};var gB=pB;const vB=function(e,t,r,n){if(Ru.hasOwnProperty(e)||Ru.hasOwnProperty(t)){let a=Ru[e]||Ru[t]||[],i=gB(r);if(!i)return null;let o=pt(i,n);o=o.year(r);let s=o.add(a,"day");if(s.isValid())return s}return null};var yB=vB;const Lu={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]},bB=[2080,2084,2088,2092,2096],wB=function(e){let t={spring:"March 20 "+e,summer:"June 21 "+e,fall:"Sept 22 "+e,winter:"Dec 21 "+e};return Lu.spring.indexOf(e)!==-1&&(t.spring="March 19 "+e),Lu.summer.indexOf(e)!==-1&&(t.summer="June 20 "+e),Lu.fall.indexOf(e)!==-1&&(t.fall="Sept 21 "+e),Lu.winter.indexOf(e)!==-1&&(t.winter="Dec 22 "+e),bB.indexOf(e)!==-1&&(t.winter="Dec 20 "+e),t};var xB=wB;let _t={"spring equinox":"spring","summer solistice":"summer","fall equinox":"fall","winter solstice":"winter"};_t["march equinox"]=_t["spring equinox"];_t["vernal equinox"]=_t["spring equinox"];_t.ostara=_t["spring equinox"];_t["june solstice"]=_t["summer solistice"];_t.litha=_t["summer solistice"];_t["autumn equinox"]=_t["fall equinox"];_t["autumnal equinox"]=_t["fall equinox"];_t["september equinox"]=_t["fall equinox"];_t["sept equinox"]=_t["fall equinox"];_t.mabon=_t["fall equinox"];_t["december solstice"]=_t["winter solistice"];_t["dec solstice"]=_t["winter solistice"];_t.yule=_t["winter solistice"];var Hu=_t;const DB=function(e,t,r,n){if(Hu.hasOwnProperty(e)||Hu.hasOwnProperty(t)){let a=Hu[e]||Hu[t],i=xB(r);if(!a||!i||!i[a])return null;let o=pt(i[a],n);if(o.isValid())return o}return null};var NB=DB;let AB={"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"};var Gu=AB;const CB=-10.64,EB=function(e,t,r,n){if(Gu.hasOwnProperty(e)||Gu.hasOwnProperty(t)){let a=Gu[e]||Gu[t]||[];if(!a)return null;let i=pt(a+" 2018",n),s=(r-2018)*CB;if(i=i.add(s,"day"),i=i.startOf("day"),i=i.year(r),i.isValid())return i}return null};var SB=EB;const MB=pt.now().year(),$g=function(e,t,r){t=t||MB,e=e||"",e=String(e),e=e.trim().toLowerCase(),e=e.replace(/'s/,"s");let n=e.replace(/ day$/,"");n=n.replace(/^the /,""),n=n.replace(/^orthodox /,"");let a=aB(e,n,t,r);return a!==null||(a=hB(e,n,t,r),a!==null)||(a=yB(e,n,t,r),a!==null)||(a=NB(e,n,t,r),a!==null)||(a=SB(e,n,t,r),a!==null)?a:null},TB=function(e,t){let r=null,n=e.match("[<holiday>#Holiday+] [<year>#Year?]"),a=t.today.year();n.groups("year").found&&(a=Number(n.groups("year").text("reduced"))||a);let i=n.groups("holiday").text("reduced"),o=$g(i,a,t.timezone);return o!==null&&(o.isBefore(t.today)&&a===t.today.year()&&(o=$g(i,a+1,t.timezone)),r=new X_(o,null,t)),r},Nm={day:An,hour:yl,evening:yl,second:na,milliscond:na,instant:na,minute:zw,week:Bs,weekend:jw,month:eB,quarter:Tg,year:Dm,season:md,yr:Dm,qtr:Tg,wk:Bs,sec:na,hr:yl};let FB=`^(${Object.keys(Nm).join("|")})$`;const PB=function(e,t){let r=e.match(FB);if(r.found===!0){let n=r.text("reduced");if(Nm.hasOwnProperty(n)){let a=Nm[n];return a?new a(null,n,t):null}}if(r=e.match("^#WeekDay$"),r.found===!0){let n=r.text("reduced");return new wm(n,null,t)}return null},Vu=function(e){return{date:e.today.date(),month:e.today.month(),year:e.today.year()}},kB=function(e,t){let r=e.match("(spring|summer|winter|fall|autumn) [<year>#Year?]");if(r.found){let n=e.text("reduced"),a=pt(n,t.timezone,{today:Vu(t)}),i=new md(a,null,t);if(i.d.isValid()===!0)return i}if(r=e.match("[<q>#FinancialQuarter] [<year>#Year?]"),r.found){let n=r.groups("q").text("reduced"),a=pt(n,t.timezone,{today:Vu(t)});if(r.groups("year")){let o=Number(r.groups("year").text())||t.today.year();a=a.year(o)}let i=new xm(a,null,t);if(i.d.isValid()===!0)return i}if(r=e.match("[<q>#Value] quarter (of|in)? [<year>#Year?]"),r.found){let n=r.groups("q").text("reduced"),a=pt(`q${n}`,t.timezone,{today:Vu(t)});if(r.groups("year")){let o=Number(r.groups("year").text())||t.today.year();a=a.year(o)}let i=new xm(a,null,t);if(i.d.isValid()===!0)return i}if(r=e.match("^#Year$"),r.found){let n=e.text("reduced"),a=pt(null,t.timezone,{today:Vu(t)});a=a.year(n);let i=new Dm(a,null,t);if(i.d.isValid()===!0)return i}return null},OB=function(e,t){let r=t.today.year(),n=e.match("[<date>#Value] of? [<month>#Month] [<year>#Year]");if(n.found||(n=e.match("[<month>#Month] the? [<date>#Value] [<year>#Year]")),n.found){let o={month:n.groups("month").text("reduced"),date:n.groups("date").text("reduced"),year:n.groups("year").text()||r},s=new qn(o,null,t);if(s.d.isValid()===!0)return s}if(n=e.match("[<month>#Month] of? [<year>#Year]"),n.found){let o={month:n.groups("month").text("reduced"),year:n.groups("year").text("reduced")||r},s=new Qa(o,null,t);if(s.d.isValid()===!0)return s}if(n=e.match("[<month>#Month] [<date>#Value+]? of? the? [<rel>(this|next|last|current)] year"),n.found){let o=n.groups("rel").text("reduced"),s=r;o==="next"?s+=1:o==="last"&&(s-=1);let u={month:n.groups("month").text("reduced"),date:n.groups("date").numbers(0).get()[0],year:s};if(u.date===void 0){u.date=1;let c=new Qa(u,null,t);if(c.d.isValid()===!0)return c}let l=new qn(u,null,t);if(l.d.isValid()===!0)return l}if(n=e.match("^the? [<date>#Value+]? of? [<rel>(this|next|last|current)] month"),n.found){let o=t.today.month(),s=n.groups("rel").text("reduced");s==="next"?o+=1:s==="last"&&(o-=1);let u={month:o,date:n.groups("date").numbers(0).get()[0]},l=new qn(u,null,t);if(l.d.isValid()===!0)return l}if(n=e.match("[<date>#Value] of? [<month>#Month]"),n.found||(n=e.match("[<month>#Month] the? [<date>#Value]")),n.found){let o={month:n.groups("month").text("reduced"),date:n.groups("date").text("reduced"),year:t.today.year()},s=new qn(o,null,t);if(s.d.month()<t.today.month()&&(o.year+=1,s=new qn(o,null,t)),s.d.isValid()===!0)return s}if(e.has("#Month")){let o={month:e.match("#Month").text("reduced"),date:1,year:t.today.year()},s=new Qa(o,null,t);if(s.d.month()<t.today.month()&&(o.year+=1,s=new Qa(o,null,t)),s.d.isValid()===!0)return s}if(n=e.match("#WeekDay [<date>#Value]"),n.found){let o={month:t.today.month(),date:n.groups("date").text("reduced"),year:t.today.year()},s=new qn(o,null,t);if(s.d.isValid()===!0)return s}if(n=e.match("the [<date>#Value]"),n.found){let o={month:t.today.month(),date:n.groups("date").text("reduced"),year:t.today.year()},s=new qn(o,null,t);if(s.d.isValid()===!0)return s.d.isBefore(t.today)&&(s.d=s.d.add(1,"month")),s}if(n=e.match("/[0-9]{4}-[0-9]{2}-[0-9]{2}t[0-9]{2}:/"),n.found){let o=e.text("reduced"),s=new na(o,null,t);if(s.d.isValid()===!0)return s}let a=e.text("reduced");if(!a)return new na(t.today,null,t);let i=new An(a,null,t);return i.d.isValid()===!1?null:i},$B=function(e,t,r){let n=null;return n=n||tB(e,t,r),n=n||TB(e,t),n=n||PB(e,t),n=n||kB(e,t),n=n||OB(e,t),n},_B={day:An,week:Bs,weekend:jw,month:Qa,quarter:xm,season:md,hour:yl,minute:zw},BB=function(e,t={}){let r=_B[t.unit];if(!r)return e;let n=e.d;t.dir==="first"||t.num===0?(n=e.start().d,n=n.startOf(t.unit)):t.dir==="last"?(n=n.endOf(e.unit),t.unit==="weekend"?n=n.day("saturday",!1):n=n.startOf(t.unit)):t.num&&(t.unit==="weekend"&&(n=n.day("saturday",!0).add(1,"day")),n=n.add(t.num,t.unit));let a=new r(n,null,e.context);return a.d.isValid()===!0?a:e},IB=function(e,t,r){if(!e&&r.weekDay&&(e=new wm(r.weekDay,null,t),r.weekDay=null),!e)return null;if(r.shift){let n=r.shift;e.applyShift(n),n.hour||n.minute?e=new na(e.d,null,e.context):(n.week||n.day||n.month)&&(e=new An(e.d,null,e.context))}return r.weekDay&&e.unit!=="day"&&(e.applyWeekDay(r.weekDay),e=new wm(e.d,null,e.context)),r.rel&&e.applyRel(r.rel),r.section&&e.applySection(r.section),r.time&&e.applyTime(r.time),r.counter&&r.counter.unit&&(e=BB(e,r.counter)),e},zB=typeof process>"u"||!process.env?self.env||{}:process.env,jB=e=>{zB.DEBUG_DATE&&(console.log(`
|
|
20
|
-
==== '${e.doc.text()}' =====`),Object.keys(e).forEach(t=>{t!=="doc"&&e[t]&&console.log(t,e[t])}),e.doc.debug())},xt=function(e,t){let r=Q_(e,t);if(e=r.doc,jB(r),r.tz){t=Object.assign({},t,{timezone:r.tz});let a=t.today.format("iso-short");t.today=t.today.goto(t.timezone).set(a)}let n=$B(e,t,r);return n=IB(n,t,r),n},_g={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"},Uu=function(e){return e.match("(every|each)").found?"AND":e.match("(any|a)").found?"OR":null},qB=function(e,t){let r=e.match("[<logic>(every|any|each)] [<skip>other?] [<unit>#Duration] (starting|beginning|commencing)?");if(r.found){let n={interval:{}},a=r.groups("unit").text("reduced");return n.interval[a]=1,n.choose=Uu(r),r.groups("skip").found&&(n.interval[a]=2),e=e.remove(r),{repeat:n}}if(r=e.match("[<logic>(every|any|each)] [<num>#Value] [<unit>#Duration] (starting|beginning|commencing)?"),r.found){let n={interval:{}},a=r.groups("unit");a.nouns().toSingular();let i=a.text("reduced");return n.interval[i]=r.groups("num").numbers().get()[0],n.choose=Uu(r),e=e.remove(r),{repeat:n}}if(r=e.match("[<logic>(every|any|each|a)] [<skip>other?] [<day>#WeekDay+] (starting|beginning|commencing)?"),r.found){let n={interval:{day:1},filter:{weekDays:{}}},a=r.groups("day").text("reduced");if(a=_g[a],a)return n.filter.weekDays[a]=!0,n.choose=Uu(r),e=e.remove(r),{repeat:n}}if(r=e.match("[<logic>(every|any|each|a)] [<day>(weekday|week day|weekend|weekend day)] (starting|beginning|commencing)?"),r.found){let n={interval:{day:1},filter:{weekDays:{}}},a=r.groups("day");return a.has("(weekday|week day)")?n.filter.weekDays={monday:!0,tuesday:!0,wednesday:!0,thursday:!0,friday:!0}:a.has("(weekend|weekend day)")&&(n.filter.weekDays={saturday:!0,sunday:!0}),n.choose=Uu(r),e=e.remove(r),{repeat:n}}if(r=e.match("[<day>(mondays|tuesdays|wednesdays|thursdays|fridays|saturdays|sundays)] (at|near|after)? [<time>#Time+?]"),r.found){let n={interval:{day:1},filter:{weekDays:{}}},a=r.groups("day").text("reduced");if(a=a.replace(/s$/,""),a=_g[a],a){n.filter.weekDays[a]=!0,n.choose="OR",e=e.remove(r);let i=r.groups("time");return i.found&&(n.time=fd(i,t)),{repeat:n}}}return null},Ss=function(e){let t=e.start,r=e.end;if(t.d.isAfter(r.d)){if(t.isWeekDay&&r.isWeekDay)return e.end.next(),e;let n=t;e.start=r,e.end=n}return e},gf=function(e){let t=e.start,r=e.end;return t.d.isAfter(r.d)&&r.d.hour()<10&&(r.d=r.d.ampm("pm")),e},RB=[{match:"[<from>#Time+] (to|until|upto|through|thru|and) [<to>#Time+ #Date+]",desc:"3pm to 4pm january 5th",parse:(e,t)=>{let r=e.groups("from"),n=e.groups("to"),a=xt(n,t);if(a){let i=a.clone();if(i.applyTime(r.text("implicit")),i){let o={start:i,end:a,unit:"time"};return/(am|pm)/.test(n)===!1&&(o=gf(o)),o=Ss(o),o}}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 r=e.groups("main"),n=e.groups("a"),a=e.groups("b");if(r=xt(r,t),r){r.applyTime(n.text("implicit"));let i=r.clone();if(i.applyTime(a.text("implicit")),i){let o={start:r,end:i,unit:"time"};return/(am|pm)/.test(a.text())===!1&&(o=gf(o)),o=Ss(o),o}}return null}},{match:"[<from>#Date+] (to|until|upto|through|thru|and) [<to>#Time+]",desc:"january from 3pm to 4pm",parse:(e,t)=>{let r=e.groups("from"),n=e.groups("to");if(r=xt(r,t),r){let a=r.clone();if(a.applyTime(n.text("implicit")),a){let i={start:r,end:a,unit:"time"};return/(am|pm)/.test(n.text())===!1&&(i=gf(i)),i=Ss(i),i}}return null}}],LB=[{match:"^during? #Month+ (or|and) #Month [<year>#Year]?",desc:"march or june",parse:(e,t)=>{let r=e.match("^during? [#Month]",0);e=e.not("(or|and)");let n=xt(r,t);if(n){let a=[{start:n,end:n.clone().end(),unit:n.unit}],i=e.not(r);i.found&&i.match("#Month").forEach(s=>{let u=xt(s,t);a.push({start:u,end:u.clone().end(),unit:u.unit})});let o=e.match("#Year$");return o.found&&(o=o.text("reduced"),a.forEach(s=>{s.start.d=s.start.d.year(o),s.end.d=s.end.d.year(o)})),a}return null}},{match:"^#Month #Value+ (or|and)? #Value$",desc:"jan 5 or 8",parse:(e,t)=>{e=e.not("(or|and)");let r=e.match("^#Month #Value"),n=xt(r,t);if(n){let a=[{start:n,end:n.clone().end(),unit:n.unit}],i=e.not(r);return i.found&&i.match("#Value").forEach(o=>{let s=n.clone();s.d=s.d.date(o.text("reduced")),a.push({start:s,end:s.clone().end(),unit:s.unit})}),a}return null}},{match:"^#Month+ #Value #Value+$",desc:"jan 5 8",parse:(e,t)=>{let r=e.match("#Month"),n=e.match("#Year");e=e.not("#Year");let a=[];return e.match("#Value").forEach(i=>{i=i.clone();let o=i.prepend(r.text());n.found&&o.append(n);let s=xt(o,t);s&&a.push({start:s,end:s.clone().end(),unit:s.unit})}),a}},{match:"^#Value+ (or|and)? #Value of #Month #Year?$",desc:"5 or 8 of Jan",parse:(e,t)=>{let r=e.match("#Month"),n=e.match("#Year");e=e.not("#Year");let a=[];return e.match("#Value").forEach(i=>{let o=i.append(r);n.found&&o.append(n);let s=xt(o,t);s&&a.push({start:s,end:s.clone().end(),unit:s.unit})}),a}},{match:"^!(between|from|during)? [<from>#Date+] (and|or) [<to>#Date+]$",desc:"A or B",parse:(e,t)=>{let r=e.groups("from"),n=e.groups("to"),a=xt(r,t),i=xt(n,t);return a&&i?[{start:a,end:a.clone().end()},{start:i,end:i.clone().end()}]:null}}],HB=[{match:"between [<start>#Month] and [<end>#Month] [<year>#Year?]",desc:"between march and jan",parse:(e,t)=>{let{start:r,end:n,year:a}=e.groups(),i=a&&a.found?Number(a.text("reduced")):t.today.year(),o={month:r.text("reduced"),year:i},s=new Qa(o,null,t).start();o={month:n.text("reduced"),year:i};let u=new Qa(o,null,t).start();return s.d.isAfter(u.d)?{start:u,end:s}:{start:s,end:u}}},{match:"between [<start>.+] and [<end>.+]",desc:"between friday and sunday",parse:(e,t)=>{let r=e.groups("start");r=xt(r,t);let n=e.groups("end");return n=xt(n,t),r&&n?(n=n.before(),{start:r,end:n}):null}},{match:"[<from>#Month #Value] (to|through|thru) [<to>#Month #Value] [<year>#Year?]",desc:"june 5 to june 7",parse:(e,t)=>{let r=e.groups(),n=r.from;if(r.year&&(n=n.append(r.year)),n=xt(n,t),n){let a=r.to;if(r.year&&(a=a.append(r.year)),a=xt(a,t),a)return n.d.isAfter(a.d)&&(a.d=a.d.add(1,"year")),{start:n,end:a.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:r,from:n,to:a,year:i}=e.groups(),o=i.clone(),s=n.prepend(r).append(i);if(s=xt(s,t),s){let u=a.prepend(r).append(o);return u=xt(u,t),{start:s,end:u.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 r=e.groups("to");if(r=xt(r,t),r){let n=e.groups("from"),a=r.clone();return a.d=a.d.date(n.text("implicit")),{start:a,end:r.end()}}return null}},{match:"[<from>#Month #Value] (to|through|thru) [<to>#Value]",desc:"january 5 to 7",parse:(e,t)=>{let r=e.groups("from");if(r=xt(r,t),r){let n=e.groups("to"),a=r.clone();return a.d=a.d.date(n.text("implicit")),{start:r,end:a.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 r=e.groups("from"),n=e.groups("year").numbers().get()[0],a=e.groups("to");if(r=xt(r,t),a=xt(a,t),r.d=r.d.year(n),a.d=a.d.year(n),r&&a){let i={start:r,end:a.end()};return i=Ss(i),i}return null}},{match:"^in [<min>#Value] to [<max>#Value] [<unit>(days|weeks|months|years)]",desc:"in 2 to 4 weeks",parse:(e,t)=>{const{min:r,max:n,unit:a}=e.groups();let i=new qn(t.today,null,t),o=i.clone();const s=a.text("implicit");return i=i.applyShift({[s]:r.numbers().get()[0]}),o=o.applyShift({[s]:n.numbers().get()[0]}),{start:i,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)=>{const{min:r,max:n,unit:a}=e.groups();let i=new qn(t.today,null,t),o=i.clone();const s=a.text("implicit");return i=i.applyShift({[s]:-n.numbers().get()[0]}),o=o.applyShift({[s]:-r.numbers().get()[0]}),{start:i,end:o.end()}}},{match:"^until [<to>#Date+]",desc:"until christmas",parse:(e,t)=>{let r=e.groups("to");return r=xt(r,t),r?{start:new qn(t.today,null,t),end:r.start()}:null}},{match:"[<part>(1st|initial|2nd|latter)] half of [<month>#Month] [<year>#Year?]",desc:"second half of march",parse:(e,t)=>{const{part:r,month:n,year:a}=e.groups();let i={month:n.text("reduced"),date:1,year:a&&a.found?a.text("reduced"):t.today.year()},o=new Qa(i,null,t);return r.has("(1st|initial)")?{start:o.start(),end:o.clone().middle()}:{start:o.middle(),end:o.clone().end()}}}],GB=function(e,t){return e=e.applyShift(t.punt),e},VB=[{match:"from? [<from>.+] (to|until|upto|through|thru) [<to>.+]",desc:"from A to B",parse:(e,t)=>{let r=e.groups("from"),n=e.groups("to");if(r=xt(r,t),n=xt(n,t),r&&n){let a={start:r,end:n.end()};return a=Ss(a),a}return null}},{match:"^due? (by|before) [.+]",desc:"before june",parse:(e,t)=>{e=e.group(0);let r=xt(e,t);if(r){let n=new cn(t.today,null,t);n.d.isAfter(r.d)&&(n=r.clone().applyShift({weeks:-2}));let a=r.clone().applyShift({day:-1});return{start:n,end:a.end()}}return null}},{match:"^(on|in|at|@|during) [.+]",desc:"in june",parse:(e,t)=>{e=e.group(0);let r=xt(e,t);return r?{start:r,end:r.clone().end(),unit:r.unit}:null}},{match:"^(after|following) [.+]",desc:"after june",parse:(e,t)=>{e=e.group(0);let r=xt(e,t);return r?(r=r.after(),{start:r.clone(),end:GB(r.clone(),t)}):null}},{match:"^(middle|center|midpoint) of [.+]",desc:"middle of",parse:(e,t)=>{e=e.group(0);let r=xt(e,t),n=r.clone().middle(),a=r.beforeEnd();return r?{start:n,end:a}:null}},{match:".+ after #Time+$",desc:"tuesday after 5pm",parse:(e,t)=>{let r=xt(e,t);if(r){let n=r.clone(),a=r.end();return{start:n,end:a,unit:"time"}}return null}},{match:".+ before #Time+$",desc:"tuesday before noon",parse:(e,t)=>{let r=xt(e,t);if(r){let n=r.clone(),a=r.start();if(r)return{start:a,end:n,unit:"time"}}return null}}],Bg=[].concat(RB,LB,HB,VB),UB=typeof process>"u"||!process.env?self.env||{}:process.env,WB=e=>{UB.DEBUG_DATE&&console.log(`
|
|
21
|
-
\x1B[32m ${e} \x1B[0m`)},JB=function(e){return Object.prototype.toString.call(e)==="[object Array]"},KB=function(e,t){let r={start:null,end:null};if(!e.found)return r;let n=xt(e,t);if(n){let a=n.clone().end();r={start:n,end:a,unit:n.setTime?"time":n.unit}}return r},YB=function(e,t){for(let r=0;r<Bg.length;r+=1){let n=Bg[r],a=e.match(n.match);if(a.found){WB(` ---[${n.desc}]---`);let i=n.parse(a,t);if(i!==null)return JB(i)||(i=[i]),i}}return null},ZB=function(e,t){let r=qB(e,t)||{},n=YB(e,t);return n||(n=[KB(e,t)]),n=n.map(a=>Object.assign({},r,a)),n.forEach(a=>{a.start&&a.end&&a.start.d.epoch>a.end.d.epoch&&(a.start=a.start.start())}),n},QB=function(e){return e.numbers||console.warn(`
|
|
22
|
-
Compromise warning: compromise/three must be used with compromise-dates plugin
|
|
23
|
-
`),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},Ti=function(e,t){return t=t||{},t.timezone===!1&&(t.timezone="UTC"),t.today=t.today||pt.now(t.timezone),t.today=pt(t.today,t.timezone),e=QB(e),ZB(e,t)},XB=function(e){let r=e.end.d.add(1,"millisecond").since(e.start.d).diff;return delete r.milliseconds,delete r.seconds,r},Ig=function(e){if(!e.start)return{start:null,end:null,timezone:null,duration:{}};let t=e.end?XB(e):{};return{start:e.start.format("iso"),end:e.end?e.end.format("iso"):null,timezone:e.start.d.format("timezone"),duration:t}},vf=function(e,t){let r=e.fromText(t),n=Ti(r,e.opts)[0];return!n||!n.start||!n.start.d?null:n.start.d},e6=function(e){class t extends e{constructor(n,a,i,o={}){super(n,a,i),this.viewType="Dates",this.opts=Object.assign({},o)}get(n){let a=[];return this.forEach(i=>{Ti(i,this.opts).forEach(o=>{let s=Ig(o);s.start&&a.push(s)})}),typeof n=="number"?a[n]:a}json(n={}){return this.map(a=>{let i=a.toView().json(n)[0]||{};if(n&&n.dates!==!1){let o=Ti(a,this.opts);o.length>0&&(i.dates=Ig(o[0]))}return i},[])}format(n){let i=this.map(o=>{let s=Ti(o,this.opts)[0]||{};if(s.start){let u=s.start.d,l=u.format(n);if(s.end){let c=s.end.d;u.isSame(c,"day")===!1&&(l+=" to "+c.format(n))}o.replaceWith(l)}return o});return new t(this.document,i.pointer,null,this.opts)}isBefore(n){let a=vf(this,n);return this.filter(i=>{let o=Ti(i,this.opts)[0]||{};return o.start&&o.start.d&&o.start.d.isBefore(a)})}isAfter(n){let a=vf(this,n);return this.filter(i=>{let o=Ti(i,this.opts)[0]||{};return o.start&&o.start.d&&o.start.d.isAfter(a)})}isSame(n,a){let i=vf(this,a);return this.filter(o=>{let s=Ti(o,this.opts)[0]||{};return s.start&&s.start.d&&s.start.d.isSame(i,n)})}}e.prototype.dates=function(r){let n=JO(this);return new t(this.document,n.pointer,null,r)}},t6=function(e){e=e.clone();let t=e.match("#Time+").match("[<hour>#Cardinal] [<min>(thirty|fifteen)]");if(t.found){let r=t.groups("hour"),n=t.groups("min"),a=r.values().get()[0];if(a>0&&a<=12){let i=n.values().get()[0],o=`${a}:${i}`;t.replaceWith(o)}}if(!e.numbers)console.warn(`Warning: compromise .numbers() not loaded.
|
|
24
|
-
This plugin requires >= v14`);else{let r=e.numbers();r.toNumber(),r.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},r6=function(e){return e.match("#Time+ (am|pm)?")},yf=function(e,t={}){e=t6(e);let r=fd(e,t);if(!r.result)return{time:null,"24h":null};let n=pt.now().time(r.result);return{time:r.result,"24h":n.format("time-24"),hour:n.hour(),minute:n.minute()}},zg=(e,t)=>typeof t=="number"?e.eq(t):e,n6=function(e){class t extends e{constructor(n,a,i,o){super(n,a,i),this.viewType="Times",this.opts=o||{}}format(n){let i=this.map(o=>{let s=yf(o)||{};if(s.time){let u=pt.now().time(s.time),l=s.time;n==="24h"?l=u.format("time-24"):l=u.format(n),o=o.not("#Preposition"),o.replaceWith(l)}return o});return new t(this.document,i.pointer,null,this.opts)}get(n){return zg(this,n).map(yf)}json(n={}){return this.map(a=>{let i=a.toView().json(n)[0]||{};return n&&n.time!==!1&&(i.time=yf(a)),i},[])}}e.prototype.times=function(r){let n=r6(this);return n=zg(n,r),new t(this.document,n.pointer)}},jg={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};let zi={m:"minute",h:"hour",hr:"hour",min:"minute",sec:"second","week end":"weekend",wk:"week",yr:"year",qtr:"quarter"};Object.keys(zi).forEach(e=>{zi[e+"s"]=zi[e]});const qg=function(e){let t={},r=e.match("#Value+ #Duration");if(r.found)r.forEach(n=>{let a=n.numbers().get()[0],i=n.terms().last().text("reduced");i=i.replace(/ies$/,"y"),i=i.replace(/s$/,""),zi.hasOwnProperty(i)&&(i=zi[i]),jg.hasOwnProperty(i)&&a!==null&&(t[i]=a)});else if(e.match("(#Duration && /[0-9][a-z]+$/)").found){let a=e.text(),i=a.match(/([0-9]+)/),o=a.match(/([a-z]+)/);i&&o&&(i=i[0]||null,o=o[0]||null,zi.hasOwnProperty(o)&&(o=zi[o]),jg.hasOwnProperty(o)&&i!==null&&(t[o]=Number(i)))}return t},a6=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.context={}}json(n={}){return this.map(a=>{let i=a.toView().json(n)[0]||{};return n&&n.duration!==!1&&(i.duration=qg(a)),i},[])}get(n){let a=[];return this.forEach(i=>{let o=qg(i);a.push(o)}),typeof n=="number"?a[n]:a}}e.prototype.durations=function(r){let n=this.match("#Value+ #Duration (and? #Value+ #Duration)?");return n=n.notIf("#DateShift"),typeof r=="number"&&(n=n.eq(r)),new t(this.document,n.pointer)}},i6=function(e){e6(e),n6(e),a6(e)},Rg="(start|end|middle|starting|ending|midpoint|beginning)",ya=(e,t)=>{e.found===!0&&e.forEach(r=>{let n=r.text("reduced"),a=parseInt(n,10);a&&a>1e3&&a<3e3&&r.tag("Year",t)})},Wu=(e,t)=>{e.found===!0&&e.forEach(r=>{let n=r.text("reduced"),a=parseInt(n,10);a&&a>1900&&a<2030&&r.tag("Year",t)})},o6=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 n=t.match("#Date #Value [#Cardinal]",0);ya(n,"date-value-year"),n=t.match("#Date [#Cardinal]",0),Wu(n,"date-year"),n=t.match(`${Rg} of [#Cardinal]`),Wu(n,"section-year"),n=t.match("#Month #Value [#Cardinal]",0),ya(n,"month-value-year"),n=t.match("#Month #Value to #Value [#Cardinal]",0),ya(n,"month-range-year"),n=t.match("(in|of|by|during|before|starting|ending|for|year|since) [#Cardinal]",0),ya(n,"in-year-1"),n=t.match("(q1|q2|q3|q4) [#Cardinal]",0),ya(n,"in-year-2"),n=t.match("#Ordinal quarter of? [#Cardinal]",0),ya(n,"in-year-3"),n=t.match("the year [#Cardinal]",0),ya(n,"in-year-4"),n=t.match("it (is|was) [#Cardinal]",0),Wu(n,"in-year-5"),t.match(`${Rg} of #Year`).tag("Date");let a=t.match("between [#Cardinal] and [#Cardinal]");ya(a.groups("0"),"between-year-and-year-1"),ya(a.groups("1"),"between-year-and-year-2")}let r=e.match("^/^20[012][0-9]$/$");return Wu(r,"2020-ish"),e},pn=function(e,t){e.found&&(e.tag("Date",t),e.numbers().lessThan(31).ifNo("#Year").tag("#Time",t))},s6=function(e){let t=e.if("#Date");if(t.found){let r=t.if("#NumberRange");if(r.found){let a=r.match("[#NumberRange+] (on|by|at)? #WeekDay",0);pn(a,"3-4-tuesday"),a=r.match("[#NumberRange+] (on|by|at)? #Month #Value",0),pn(a,"3-4 mar 3"),a=r.match("[#NumberRange] to (#NumberRange && #Time)",0),pn(a,"3-4pm"),a=r.match("(#NumberRange && #Time) to [#NumberRange]",0),pn(a,"3pm-4")}let n=t.match("(from|between) #Cardinal and #Cardinal (in|on)? (#WeekDay|tomorrow|yesterday)");pn(n,"from 9-5 tues"),n=e.match("#Cardinal to #Cardinal (#WeekDay|tomorrow|yesterday)"),pn(n,"9-5 tues"),n=t.match("(from|between) [#NumericValue] (to|and) #Time",0).tag("Time","4-to-5pm"),pn(n,"from 9-5pm"),n=t.match("(#WeekDay|tomorrow|yesterday) (from|between)? (#Cardinal|#Time) (and|to) (#Cardinal|#Time)"),pn(n,"tues 3-5"),n=t.match("#Month #Value+ (from|between) [<time>(#Cardinal|#Time) (and|to) (#Cardinal|#Time)]").group("time"),pn(n,"sep 4 from 9-5"),n=t.match("#Time to #Cardinal on? #Date"),pn(n,"3pm-4 wed"),n=t.match("#Cardinal to #Time on? #Date"),pn(n,"3-4pm wed"),n=t.match("#Cardinal to #Cardinal on? (#WeekDay|#Month #Value)"),pn(n,"3-4 wed")}return e},u6=["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"].reduce((e,t)=>(e[t]=!0,e),{}),l6=function(e){let t=e.match("#Time [#Acronym]",0);if(t.found){let r=t.text("reduced");u6[r]===!0&&t.tag("Timezone","tz-abbr")}},c6="fix-tagger",f6=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 r=e.match("#Date+");r.has("^between")&&!r.has("and .")&&r.unTag("Date",c6),r.has("(minutes|seconds|weeks|hours|days|months)")&&!r.has("#Value #Duration")&&r.match("(minutes|seconds|weeks|hours|days|months)").unTag("Date","log-hours"),r.has("about #Holiday")&&r.match("about").unTag("#Date","about-thanksgiving"),r.match("#Date+").match("^the").unTag("Date")}return e},bf="(in|by|before|during|on|until|after|of|within|all)",Lg="(last|next|this|previous|current|upcoming|coming)",wf="(start|end|middle|starting|ending|midpoint|beginning|mid)",xf="(spring|summer|winter|fall|autumn)",Hg="(yesterday|today|tomorrow)";let m6=[{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:`${bf}? #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:`${bf}? ${Lg} ${xf}`,tag:"Date",reason:"thisNext-season"},{match:`the? ${wf} of ${xf}`,tag:"Date",reason:"section-season"},{match:`${xf} ${bf}? #Cardinal`,tag:"Date",reason:"season-year"},{match:"#Date the? #Ordinal",tag:"Date",reason:"correction"},{match:`${Lg} #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? ${wf} 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:`[${wf}] #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:`${Hg} [#Value]$`,unTag:"Date",group:0,reason:"yesterday-7"},{match:`^[#Value] ${Hg}$`,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"}],Df=null;const Gg=function(e){let{world:t}=e;Df=Df||t.methods.one.buildNet(m6,t),e.sweep(Df)},d6=function(e){return e.cache(),Gg(e),Gg(e),o6(e),s6(e),l6(e),f6(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},h6={dates:d6},p6={FinancialQuarter:{is:"Date",not:["Fraction"]},Season:{is:"Date"},Year:{is:"Date",not:["RomanNumeral"]},Holiday:{is:"Date",also:"Noun"},DateShift:{is:"Date",not:["Timezone","Holiday"]}},_e="America/",ht="Asia/",Wt="Europe/",gn="Africa/",mr="Australia/",ra="Pacific/",g6={"british summer time":Wt+"London",bst:Wt+"London","british time":Wt+"London","britain time":Wt+"London","irish summer time":Wt+"Dublin","irish time":Wt+"Dublin","central european time":Wt+"Berlin",cet:Wt+"Berlin","central european summer time":Wt+"Berlin",cest:Wt+"Berlin","central europe":Wt+"Berlin","eastern european time":Wt+"Riga",eet:Wt+"Riga","eastern european summer time":Wt+"Riga",eest:Wt+"Riga","eastern europe time":Wt+"Riga","western european time":Wt+"Lisbon","western european summer time":Wt+"Lisbon","turkey standard time":Wt+"Istanbul","turkish time":Wt+"Istanbul",utc:gn+"Freetown","greenwich standard time":gn+"Freetown",gmt:gn+"Freetown","east africa time":gn+"Nairobi","east african time":gn+"Nairobi","eastern africa time":gn+"Nairobi","central africa time":gn+"Khartoum","central african time":gn+"Khartoum","south africa standard time":gn+"Johannesburg","west africa standard time":gn+"Lagos","western africa time":gn+"Lagos","west african time":gn+"Lagos","australian central standard time":mr+"Adelaide",acst:mr+"Adelaide","australian central daylight time":mr+"Adelaide",acdt:mr+"Adelaide","australian eastern standard time":mr+"Brisbane",aest:mr+"Brisbane","australian eastern daylight time":mr+"Brisbane",aedt:mr+"Brisbane","australian western standard time":mr+"Perth",awst:mr+"Perth","australian western daylight time":mr+"Perth",awdt:mr+"Perth","australian central western standard time":mr+"Eucla",acwst:mr+"Eucla","lord howe standard time":mr+"Lord_Howe",lhst:mr+"Lord_Howe","lord howe daylight time":mr+"Lord_Howe",lhdt:mr+"Lord_Howe","russian standard time":Wt+"Moscow",msk:Wt+"Moscow","central standard time":_e+"Chicago","central time":_e+"Chicago",cst:_e+"Havana","central daylight time":_e+"Chicago",cdt:_e+"Havana","mountain standard time":_e+"Denver","mountain time":_e+"Denver",mst:_e+"Denver","mountain daylight time":_e+"Denver",mdt:_e+"Denver","atlantic standard time":_e+"Halifax","atlantic time":_e+"Halifax",ast:ht+"Baghdad","atlantic daylight time":_e+"Halifax",adt:_e+"Halifax","eastern standard time":_e+"New_York","eastern time":_e+"New_York",est:_e+"New_York","eastern daylight time":_e+"New_York",edt:_e+"New_York","pacific time":_e+"Los_Angeles","pacific standard time":_e+"Los_Angeles",pst:_e+"Los_Angeles","pacific daylight time":_e+"Los_Angeles",pdt:_e+"Los_Angeles","alaskan standard time":_e+"Anchorage","alaskan time":_e+"Anchorage",ahst:_e+"Anchorage","alaskan daylight time":_e+"Anchorage",ahdt:_e+"Anchorage","hawaiian standard time":ra+"Honolulu","hawaiian time":ra+"Honolulu",hst:ra+"Honolulu","aleutian time":ra+"Honolulu","hawaii time":ra+"Honolulu","newfoundland standard time":_e+"St_Johns","newfoundland time":_e+"St_Johns","newfoundland daylight time":_e+"St_Johns","brazil time":_e+"Sao_Paulo","brazilian time":_e+"Sao_Paulo","argentina time":_e+"Buenos_Aires","argentinian time":_e+"Buenos_Aires","amazon time":_e+"Manaus","amazonian time":_e+"Manaus","easter island standard time":"Chile/Easterisland","easter island summer time":"Chile/Easterisland",easst:"Chile/Easterisland","venezuelan standard time":_e+"Caracas","venezuelan time":_e+"Caracas","venezuela time":_e+"Caracas","paraguay time":_e+"Asuncion","paraguay summer time":_e+"Asuncion","cuba standard time":_e+"Havana","cuba time":_e+"Havana","cuba daylight time":_e+"Havana","cuban time":_e+"Havana","bolivia time":_e+"La_Paz","bolivian time":_e+"La_Paz","colombia time":_e+"Bogota","colombian time":_e+"Bogota","acre time":_e+"Eirunepe","peru time":_e+"Lima","chile standard time":_e+"Punta_Arenas","chile time":_e+"Punta_Arenas",clst:_e+"Punta_Arenas","chile summer time":_e+"Punta_Arenas",cldt:_e+"Punta_Arenas","uruguay time":_e+"Montevideo",uyt:_e+"Montevideo","arabic standard time":ht+"Baghdad","iran standard time":ht+"Tehran","iran time":ht+"Tehran","iran daylight time":ht+"Tehran","pakistan standard time":ht+"Karachi","pakistan time":ht+"Karachi","india standard time":ht+"Kolkata","indian time":ht+"Kolkata","indochina time":ht+"Bangkok","china standard time":ht+"Shanghai","alma-ata time":ht+"Almaty","oral time":ht+"Oral","orat time":ht+"Oral","yakutsk time":ht+"Yakutsk",yakt:ht+"Yakutsk","gulf standard time":ht+"Dubai","gulf time":ht+"Dubai","hong kong time":ht+"Hong_Kong","western indonesian time":ht+"Jakarta","indonesia time":ht+"Jakarta","central indonesian time":ht+"Makassar","israel daylight time":ht+"Jerusalem","israel standard time":ht+"Jerusalem","israel time":ht+"Jerusalem","krasnoyarsk time":ht+"Krasnoyarsk","malaysia time":ht+"Kuala_Lumpur","singapore time":ht+"Singapore","korea standard time":ht+"Seoul","korea time":ht+"Seoul",kst:ht+"Seoul","korean time":ht+"Seoul","uzbekistan time":ht+"Samarkand","vladivostok time":ht+"Vladivostok","maldives time":"Indian/Maldives","mauritius time":"Indian/Mauritius","marshall islands time":ra+"Kwajalein","samoa standard time":ra+"Midway","somoan time":ra+"Midway","chamorro standard time":ra+"Guam","papua new guinea time":ra+"Bougainville"};let v6=pt().timezones,y6=Object.keys(v6).reduce((e,t)=>(e[t]=t,e),{});const b6=Object.assign({},g6,y6),w6=["weekday","summer","winter","autumn","all day","eod","eom","eoy","standard time","daylight time","tommorrow"],x6=["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"],D6=["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"],N6=["noon","midnight","morning","tonight","evening","afternoon","breakfast time","lunchtime","dinnertime","midday","eod","oclock","oclock","at night"];let qw={"a couple":"Value",thur:"WeekDay",thurs:"WeekDay"};const Ys=function(e,t){e.forEach(r=>{qw[r]=t})};Ys(Object.keys(b6),"Timezone");Ys(w6,"Date");Ys(x6,"Duration");Ys(D6,"Holiday");Ys(N6,"Time");const A6=[[/^[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"]],C6="3.7.1",Vg=e=>e?pt(e).format("{nice-day} {year}"):"-",ys="\x1B[0m",Nf={magenta:e=>"\x1B[35m"+e+ys,cyan:e=>"\x1B[36m"+e+ys,yellow:e=>"\x1B[33m"+e+ys,dim:e=>"\x1B[2m"+e+ys,i:e=>"\x1B[3m"+e+ys},E6=function(e){e.dates().forEach(t=>{let r=t.dates().get()[0];console.log(`
|
|
25
|
-
────────`),t.debug("highlight");let n="";r&&r.start&&(n=" "+Nf.magenta(Vg(r.start))),r&&r.end&&(n+=Nf.dim(" → ")+Nf.cyan(Vg(r.end))),console.log(n+`
|
|
26
|
-
`)})},S6={tags:p6,words:qw,compute:h6,api:i6,mutate:e=>{e.model.two.regexText=e.model.two.regexText||[],e.model.two.regexText=e.model.two.regexText.concat(A6),e.methods.one.debug=e.methods.one.debug||{},e.methods.one.debug.dates=E6},hooks:["dates"],version:C6};function ar(){return ar=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ar.apply(null,arguments)}var Rw={relTol:1e-12,absTol:1e-15,matrix:"Matrix",number:"number",numberFallback:"number",precision:64,predictable:!1,randomSeed:null};function Lr(e,t){if(_l(e,t))return e[t];throw typeof e[t]=="function"&&dd(e,t)?new Error('Cannot access method "'+t+'" as a property'):new Error('No access to property "'+t+'"')}function jo(e,t,r){if(_l(e,t))return e[t]=r,r;throw new Error('No access to property "'+t+'"')}function _l(e,t){return!T6(e)&&!Array.isArray(e)?!1:Oe(F6,t)?!0:!(t in Object.prototype||t in Function.prototype)}function M6(e,t){if(!dd(e,t))throw new Error('No access to method "'+t+'"');return e[t]}function dd(e,t){return e==null||typeof e[t]!="function"||Oe(e,t)&&Object.getPrototypeOf&&t in Object.getPrototypeOf(e)?!1:Oe(P6,t)?!0:!(t in Object.prototype||t in Function.prototype)}function T6(e){return typeof e=="object"&&e&&e.constructor===Object}var F6={length:!0,name:!0},P6={toString:!0,valueOf:!0,toLocaleString:!0};class cc{constructor(t){this.wrappedObject=t,this[Symbol.iterator]=this.entries}keys(){return Object.keys(this.wrappedObject).filter(t=>this.has(t)).values()}get(t){return Lr(this.wrappedObject,t)}set(t,r){return jo(this.wrappedObject,t,r),this}has(t){return _l(this.wrappedObject,t)&&t in this.wrappedObject}entries(){return Hw(this.keys(),t=>[t,this.get(t)])}forEach(t){for(var r of this.keys())t(this.get(r),r,this)}delete(t){_l(this.wrappedObject,t)&&delete this.wrappedObject[t]}clear(){for(var t of this.keys())this.delete(t)}get size(){return Object.keys(this.wrappedObject).length}}class Lw{constructor(t,r,n){this.a=t,this.b=r,this.bKeys=n,this[Symbol.iterator]=this.entries}get(t){return this.bKeys.has(t)?this.b.get(t):this.a.get(t)}set(t,r){return this.bKeys.has(t)?this.b.set(t,r):this.a.set(t,r),this}has(t){return this.b.has(t)||this.a.has(t)}keys(){return new Set([...this.a.keys(),...this.b.keys()])[Symbol.iterator]()}entries(){return Hw(this.keys(),t=>[t,this.get(t)])}forEach(t){for(var r of this.keys())t(this.get(r),r,this)}delete(t){return this.bKeys.has(t)?this.b.delete(t):this.a.delete(t)}clear(){this.a.clear(),this.b.clear()}get size(){return[...this.keys()].length}}function Hw(e,t){return{next:()=>{var r=e.next();return r.done?r:{value:t(r.value),done:!1}}}}function Is(){return new Map}function $o(e){if(!e)return Is();if(Vw(e))return e;if(mc(e))return new cc(e);throw new Error("createMap can create maps from objects or Maps")}function k6(e){if(e instanceof cc)return e.wrappedObject;var t={};for(var r of e.keys()){var n=e.get(r);jo(t,r,n)}return t}function Ze(e){return typeof e=="number"}function Qe(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 Ms(e){return typeof e=="bigint"}function Pa(e){return e&&typeof e=="object"&&Object.getPrototypeOf(e).isComplex===!0||!1}function Zs(e){return e&&typeof e=="object"&&Object.getPrototypeOf(e).isFraction===!0||!1}function Nn(e){return e&&e.constructor.prototype.isUnit===!0||!1}function Pr(e){return typeof e=="string"}var Et=Array.isArray;function je(e){return e&&e.constructor.prototype.isMatrix===!0||!1}function Mn(e){return Array.isArray(e)||je(e)}function Bl(e){return e&&e.isDenseMatrix&&e.constructor.prototype.isMatrix===!0||!1}function ji(e){return e&&e.isSparseMatrix&&e.constructor.prototype.isMatrix===!0||!1}function hd(e){return e&&e.constructor.prototype.isRange===!0||!1}function fc(e){return e&&e.constructor.prototype.isIndex===!0||!1}function O6(e){return typeof e=="boolean"}function $6(e){return e&&e.constructor.prototype.isResultSet===!0||!1}function Gw(e){return e&&e.constructor.prototype.isHelp===!0||!1}function _6(e){return typeof e=="function"}function B6(e){return e instanceof Date}function I6(e){return e instanceof RegExp}function mc(e){return!!(e&&typeof e=="object"&&e.constructor===Object&&!Pa(e)&&!Zs(e))}function Vw(e){return e?e instanceof Map||e instanceof cc||typeof e.set=="function"&&typeof e.get=="function"&&typeof e.keys=="function"&&typeof e.has=="function":!1}function z6(e){return e===null}function j6(e){return e===void 0}function Wi(e){return e&&e.isAccessorNode===!0&&e.constructor.prototype.isNode===!0||!1}function Dn(e){return e&&e.isArrayNode===!0&&e.constructor.prototype.isNode===!0||!1}function q6(e){return e&&e.isAssignmentNode===!0&&e.constructor.prototype.isNode===!0||!1}function R6(e){return e&&e.isBlockNode===!0&&e.constructor.prototype.isNode===!0||!1}function L6(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 Am(e){return lt(e)||Yt(e)&&e.args.length===1&<(e.args[0])&&"-+~".includes(e.op)}function Qs(e){return e&&e.isFunctionAssignmentNode===!0&&e.constructor.prototype.isNode===!0||!1}function si(e){return e&&e.isFunctionNode===!0&&e.constructor.prototype.isNode===!0||!1}function Yo(e){return e&&e.isIndexNode===!0&&e.constructor.prototype.isNode===!0||!1}function Nt(e){return e&&e.isNode===!0&&e.constructor.prototype.isNode===!0||!1}function dc(e){return e&&e.isObjectNode===!0&&e.constructor.prototype.isNode===!0||!1}function Yt(e){return e&&e.isOperatorNode===!0&&e.constructor.prototype.isNode===!0||!1}function _a(e){return e&&e.isParenthesisNode===!0&&e.constructor.prototype.isNode===!0||!1}function H6(e){return e&&e.isRangeNode===!0&&e.constructor.prototype.isNode===!0||!1}function G6(e){return e&&e.isRelationalNode===!0&&e.constructor.prototype.isNode===!0||!1}function pr(e){return e&&e.isSymbolNode===!0&&e.constructor.prototype.isNode===!0||!1}function Uw(e){return e&&e.constructor.prototype.isChain===!0||!1}function Mt(e){var t=typeof e;return t==="object"?e===null?"null":Qe(e)?"BigNumber":e.constructor&&e.constructor.name?e.constructor.name:"Object":t}function Ue(e){var t=typeof e;if(t==="number"||t==="bigint"||t==="string"||t==="boolean"||e===null||e===void 0)return e;if(typeof e.clone=="function")return e.clone();if(Array.isArray(e))return e.map(function(r){return Ue(r)});if(e instanceof Date)return new Date(e.valueOf());if(Qe(e))return e;if(mc(e))return V6(e,Ue);if(t==="function")return e;throw new TypeError("Cannot clone: unknown type of value (value: ".concat(e,")"))}function V6(e,t){var r={};for(var n in e)Oe(e,n)&&(r[n]=t(e[n]));return r}function Ww(e,t){for(var r in t)Oe(t,r)&&(e[r]=t[r]);return e}function Ba(e,t){var r,n,a;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(n=0,a=e.length;n<a;n++)if(!Ba(e[n],t[n]))return!1;return!0}else{if(typeof e=="function")return e===t;if(e instanceof Object){if(Array.isArray(t)||!(t instanceof Object))return!1;for(r in e)if(!(r in t)||!Ba(e[r],t[r]))return!1;for(r in t)if(!(r in e))return!1;return!0}else return e===t}}function U6(e,t,r){var n=!0,a;Object.defineProperty(e,t,{get:function(){return n&&(a=r(),n=!1),a},set:function(o){a=o,n=!1},configurable:!0,enumerable:!0})}function Oe(e,t){return e&&Object.hasOwnProperty.call(e,t)}function W6(e,t){for(var r={},n=0;n<t.length;n++){var a=t[n],i=e[a];i!==void 0&&(r[a]=i)}return r}var J6=["Matrix","Array"],K6=["number","BigNumber","Fraction"],de=function(t){if(t)throw new Error(`The global config is readonly.
|
|
27
|
-
Please create a mathjs instance if you want to change the default configuration.
|
|
28
|
-
Example:
|
|
29
|
-
|
|
30
|
-
import { create, all } from 'mathjs';
|
|
31
|
-
const mathjs = create(all);
|
|
32
|
-
mathjs.config({ number: 'BigNumber' });
|
|
33
|
-
`);return Object.freeze(Rw)};ar(de,Rw,{MATRIX_OPTIONS:J6,NUMBER_OPTIONS:K6});function Ug(){return!0}function vn(){return!1}function bo(){}const Wg="Argument is not a typed-function.";function Jw(){function e(I){return typeof I=="object"&&I!==null&&I.constructor===Object}const t=[{name:"number",test:function(I){return typeof I=="number"}},{name:"string",test:function(I){return typeof I=="string"}},{name:"boolean",test:function(I){return typeof I=="boolean"}},{name:"Function",test:function(I){return typeof I=="function"}},{name:"Array",test:Array.isArray},{name:"Date",test:function(I){return I instanceof Date}},{name:"RegExp",test:function(I){return I instanceof RegExp}},{name:"Object",test:e},{name:"null",test:function(I){return I===null}},{name:"undefined",test:function(I){return I===void 0}}],r={name:"any",test:Ug,isAny:!0};let n,a,i=0,o={createCount:0};function s(I){const Y=n.get(I);if(Y)return Y;let X='Unknown type "'+I+'"';const se=I.toLowerCase();let ce;for(ce of a)if(ce.toLowerCase()===se){X+='. Did you mean "'+ce+'" ?';break}throw new TypeError(X)}function u(I){let Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"any";const X=Y?s(Y).index:a.length,se=[];for(let fe=0;fe<I.length;++fe){if(!I[fe]||typeof I[fe].name!="string"||typeof I[fe].test!="function")throw new TypeError("Object with properties {name: string, test: function} expected");const Ee=I[fe].name;if(n.has(Ee))throw new TypeError('Duplicate type name "'+Ee+'"');se.push(Ee),n.set(Ee,{name:Ee,test:I[fe].test,isAny:I[fe].isAny,index:X+fe,conversionsTo:[]})}const ce=a.slice(X);a=a.slice(0,X).concat(se).concat(ce);for(let fe=X+se.length;fe<a.length;++fe)n.get(a[fe]).index=fe}function l(){n=new Map,a=[],i=0,u([r],!1)}l(),u(t);function c(){let I;for(I of a)n.get(I).conversionsTo=[];i=0}function f(I){const Y=a.filter(X=>{const se=n.get(X);return!se.isAny&&se.test(I)});return Y.length?Y:["any"]}function m(I){return I&&typeof I=="function"&&"_typedFunctionData"in I}function d(I,Y,X){if(!m(I))throw new TypeError(Wg);const se=X&&X.exact,ce=Array.isArray(Y)?Y.join(","):Y,fe=x(ce),Ee=y(fe);if(!se||Ee in I.signatures){const dt=I._typedFunctionData.signatureMap.get(Ee);if(dt)return dt}const be=fe.length;let Se;if(se){Se=[];let dt;for(dt in I.signatures)Se.push(I._typedFunctionData.signatureMap.get(dt))}else Se=I._typedFunctionData.signatures;for(let dt=0;dt<be;++dt){const qe=fe[dt],Bt=[];let M;for(M of Se){const W=C(M.params,dt);if(!(!W||qe.restParam&&!W.restParam)){if(!W.hasAny){const ie=g(W);if(qe.types.some(ge=>!ie.has(ge.name)))continue}Bt.push(M)}}if(Se=Bt,Se.length===0)break}let xe;for(xe of Se)if(xe.params.length<=be)return xe;throw new TypeError("Signature not found (signature: "+(I.name||"unnamed")+"("+y(fe,", ")+"))")}function p(I,Y,X){return d(I,Y,X).implementation}function h(I,Y){const X=s(Y);if(X.test(I))return I;const se=X.conversionsTo;if(se.length===0)throw new Error("There are no conversions to "+Y+" defined.");for(let ce=0;ce<se.length;ce++)if(s(se[ce].from).test(I))return se[ce].convert(I);throw new Error("Cannot convert "+I+" to "+Y)}function y(I){let Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:",";return I.map(X=>X.name).join(Y)}function b(I){const Y=I.indexOf("...")===0,se=(Y?I.length>3?I.slice(3):"any":I).split("|").map(be=>s(be.trim()));let ce=!1,fe=Y?"...":"";return{types:se.map(function(be){return ce=be.isAny||ce,fe+=be.name+"|",{name:be.name,typeIndex:be.index,test:be.test,isAny:be.isAny,conversion:null,conversionIndex:-1}}),name:fe.slice(0,-1),hasAny:ce,hasConversion:!1,restParam:Y}}function D(I){const Y=I.types.map(Ee=>Ee.name),X=z(Y);let se=I.hasAny,ce=I.name;const fe=X.map(function(Ee){const be=s(Ee.from);return se=be.isAny||se,ce+="|"+Ee.from,{name:Ee.from,typeIndex:be.index,test:be.test,isAny:be.isAny,conversion:Ee,conversionIndex:Ee.index}});return{types:I.types.concat(fe),name:ce,hasAny:se,hasConversion:fe.length>0,restParam:I.restParam}}function g(I){return I.typeSet||(I.typeSet=new Set,I.types.forEach(Y=>I.typeSet.add(Y.name))),I.typeSet}function x(I){const Y=[];if(typeof I!="string")throw new TypeError("Signatures must be strings");const X=I.trim();if(X==="")return Y;const se=X.split(",");for(let ce=0;ce<se.length;++ce){const fe=b(se[ce].trim());if(fe.restParam&&ce!==se.length-1)throw new SyntaxError('Unexpected rest parameter "'+se[ce]+'": only allowed for the last parameter');if(fe.types.length===0)return null;Y.push(fe)}return Y}function w(I){const Y=R(I);return Y?Y.restParam:!1}function v(I){if(!I||I.types.length===0)return Ug;if(I.types.length===1)return s(I.types[0].name).test;if(I.types.length===2){const Y=s(I.types[0].name).test,X=s(I.types[1].name).test;return function(ce){return Y(ce)||X(ce)}}else{const Y=I.types.map(function(X){return s(X.name).test});return function(se){for(let ce=0;ce<Y.length;ce++)if(Y[ce](se))return!0;return!1}}}function A(I){let Y,X,se;if(w(I)){Y=L(I).map(v);const ce=Y.length,fe=v(R(I)),Ee=function(be){for(let Se=ce;Se<be.length;Se++)if(!fe(be[Se]))return!1;return!0};return function(Se){for(let xe=0;xe<Y.length;xe++)if(!Y[xe](Se[xe]))return!1;return Ee(Se)&&Se.length>=ce+1}}else return I.length===0?function(fe){return fe.length===0}:I.length===1?(X=v(I[0]),function(fe){return X(fe[0])&&fe.length===1}):I.length===2?(X=v(I[0]),se=v(I[1]),function(fe){return X(fe[0])&&se(fe[1])&&fe.length===2}):(Y=I.map(v),function(fe){for(let Ee=0;Ee<Y.length;Ee++)if(!Y[Ee](fe[Ee]))return!1;return fe.length===Y.length})}function C(I,Y){return Y<I.length?I[Y]:w(I)?R(I):null}function N(I,Y){const X=C(I,Y);return X?g(X):new Set}function E(I){return I.conversion===null||I.conversion===void 0}function S(I,Y){const X=new Set;return I.forEach(se=>{const ce=N(se.params,Y);let fe;for(fe of ce)X.add(fe)}),X.has("any")?["any"]:Array.from(X)}function F(I,Y,X){let se,ce;const fe=I||"unnamed";let Ee=X,be;for(be=0;be<Y.length;be++){const qe=[];if(Ee.forEach(Bt=>{const M=C(Bt.params,be),W=v(M);(be<Bt.params.length||w(Bt.params))&&W(Y[be])&&qe.push(Bt)}),qe.length===0){if(ce=S(Ee,be),ce.length>0){const Bt=f(Y[be]);return se=new TypeError("Unexpected type of argument in function "+fe+" (expected: "+ce.join(" or ")+", actual: "+Bt.join(" | ")+", index: "+be+")"),se.data={category:"wrongType",fn:fe,index:be,actual:Bt,expected:ce},se}}else Ee=qe}const Se=Ee.map(function(qe){return w(qe.params)?1/0:qe.params.length});if(Y.length<Math.min.apply(null,Se))return ce=S(Ee,be),se=new TypeError("Too few arguments in function "+fe+" (expected: "+ce.join(" or ")+", index: "+Y.length+")"),se.data={category:"tooFewArgs",fn:fe,index:Y.length,expected:ce},se;const xe=Math.max.apply(null,Se);if(Y.length>xe)return se=new TypeError("Too many arguments in function "+fe+" (expected: "+xe+", actual: "+Y.length+")"),se.data={category:"tooManyArgs",fn:fe,index:Y.length,expectedLength:xe},se;const dt=[];for(let qe=0;qe<Y.length;++qe)dt.push(f(Y[qe]).join("|"));return se=new TypeError('Arguments of type "'+dt.join(", ")+'" do not match any of the defined signatures of function '+fe+"."),se.data={category:"mismatch",actual:dt},se}function k(I){let Y=a.length+1;for(let X=0;X<I.types.length;X++)E(I.types[X])&&(Y=Math.min(Y,I.types[X].typeIndex));return Y}function $(I){let Y=i+1;for(let X=0;X<I.types.length;X++)E(I.types[X])||(Y=Math.min(Y,I.types[X].conversionIndex));return Y}function _(I,Y){if(I.hasAny){if(!Y.hasAny)return 1}else if(Y.hasAny)return-1;if(I.restParam){if(!Y.restParam)return 1}else if(Y.restParam)return-1;if(I.hasConversion){if(!Y.hasConversion)return 1}else if(Y.hasConversion)return-1;const X=k(I)-k(Y);if(X<0)return-1;if(X>0)return 1;const se=$(I)-$(Y);return se<0?-1:se>0?1:0}function T(I,Y){const X=I.params,se=Y.params,ce=R(X),fe=R(se),Ee=w(X),be=w(se);if(Ee&&ce.hasAny){if(!be||!fe.hasAny)return 1}else if(be&&fe.hasAny)return-1;let Se=0,xe=0,dt;for(dt of X)dt.hasAny&&++Se,dt.hasConversion&&++xe;let qe=0,Bt=0;for(dt of se)dt.hasAny&&++qe,dt.hasConversion&&++Bt;if(Se!==qe)return Se-qe;if(Ee&&ce.hasConversion){if(!be||!fe.hasConversion)return 1}else if(be&&fe.hasConversion)return-1;if(xe!==Bt)return xe-Bt;if(Ee){if(!be)return 1}else if(be)return-1;const M=(X.length-se.length)*(Ee?-1:1);if(M!==0)return M;const W=[];let ie=0;for(let Le=0;Le<X.length;++Le){const Ye=_(X[Le],se[Le]);W.push(Ye),ie+=Ye}if(ie!==0)return ie;let ge;for(ge of W)if(ge!==0)return ge;return 0}function z(I){if(I.length===0)return[];const Y=I.map(s);I.length>1&&Y.sort((ce,fe)=>ce.index-fe.index);let X=Y[0].conversionsTo;if(I.length===1)return X;X=X.concat([]);const se=new Set(I);for(let ce=1;ce<Y.length;++ce){let fe;for(fe of Y[ce].conversionsTo)se.has(fe.from)||(X.push(fe),se.add(fe.from))}return X}function P(I,Y){let X=Y;if(I.some(ce=>ce.hasConversion)){const ce=w(I),fe=I.map(j);X=function(){const be=[],Se=ce?arguments.length-1:arguments.length;for(let xe=0;xe<Se;xe++)be[xe]=fe[xe](arguments[xe]);return ce&&(be[Se]=arguments[Se].map(fe[Se])),Y.apply(this,be)}}let se=X;if(w(I)){const ce=I.length-1;se=function(){return X.apply(this,J(arguments,0,ce).concat([J(arguments,ce)]))}}return se}function j(I){let Y,X,se,ce;const fe=[],Ee=[];switch(I.types.forEach(function(be){be.conversion&&(fe.push(s(be.conversion.from).test),Ee.push(be.conversion.convert))}),Ee.length){case 0:return function(Se){return Se};case 1:return Y=fe[0],se=Ee[0],function(Se){return Y(Se)?se(Se):Se};case 2:return Y=fe[0],X=fe[1],se=Ee[0],ce=Ee[1],function(Se){return Y(Se)?se(Se):X(Se)?ce(Se):Se};default:return function(Se){for(let xe=0;xe<Ee.length;xe++)if(fe[xe](Se))return Ee[xe](Se);return Se}}}function O(I){function Y(X,se,ce){if(se<X.length){const fe=X[se];let Ee=[];if(fe.restParam){const be=fe.types.filter(E);be.length<fe.types.length&&Ee.push({types:be,name:"..."+be.map(Se=>Se.name).join("|"),hasAny:be.some(Se=>Se.isAny),hasConversion:!1,restParam:!0}),Ee.push(fe)}else Ee=fe.types.map(function(be){return{types:[be],name:be.name,hasAny:be.isAny,hasConversion:be.conversion,restParam:!1}});return te(Ee,function(be){return Y(X,se+1,ce.concat([be]))})}else return[ce]}return Y(I,0,[])}function Q(I,Y){const X=Math.max(I.length,Y.length);for(let be=0;be<X;be++){const Se=N(I,be),xe=N(Y,be);let dt=!1,qe;for(qe of xe)if(Se.has(qe)){dt=!0;break}if(!dt)return!1}const se=I.length,ce=Y.length,fe=w(I),Ee=w(Y);return fe?Ee?se===ce:ce>=se:Ee?se>=ce:se===ce}function K(I){return I.map(Y=>H(Y)?De(Y.referToSelf.callback):q(Y)?oe(Y.referTo.references,Y.referTo.callback):Y)}function U(I,Y,X){const se=[];let ce;for(ce of I){let fe=X[ce];if(typeof fe!="number")throw new TypeError('No definition for referenced signature "'+ce+'"');if(fe=Y[fe],typeof fe!="function")return!1;se.push(fe)}return se}function V(I,Y,X){const se=K(I),ce=new Array(se.length).fill(!1);let fe=!0;for(;fe;){fe=!1;let Ee=!0;for(let be=0;be<se.length;++be){if(ce[be])continue;const Se=se[be];if(H(Se))se[be]=Se.referToSelf.callback(X),se[be].referToSelf=Se.referToSelf,ce[be]=!0,Ee=!1;else if(q(Se)){const xe=U(Se.referTo.references,se,Y);xe?(se[be]=Se.referTo.callback.apply(this,xe),se[be].referTo=Se.referTo,ce[be]=!0,Ee=!1):fe=!0}}if(Ee&&fe)throw new SyntaxError("Circular reference detected in resolving typed.referTo")}return se}function le(I){const Y=/\bthis(\(|\.signatures\b)/;Object.keys(I).forEach(X=>{const se=I[X];if(Y.test(se.toString()))throw new SyntaxError("Using `this` to self-reference a function is deprecated since typed-function@3. Use typed.referTo and typed.referToSelf instead.")})}function ne(I,Y){if(o.createCount++,Object.keys(Y).length===0)throw new SyntaxError("No signatures provided");o.warnAgainstDeprecatedThis&&le(Y);const X=[],se=[],ce={},fe=[];let Ee;for(Ee in Y){if(!Object.prototype.hasOwnProperty.call(Y,Ee))continue;const At=x(Ee);if(!At)continue;X.forEach(function(ls){if(Q(ls,At))throw new TypeError('Conflicting signatures "'+y(ls)+'" and "'+y(At)+'".')}),X.push(At);const Kr=se.length;se.push(Y[Ee]);const xN=At.map(D);let cu;for(cu of O(xN)){const ls=y(cu);fe.push({params:cu,name:ls,fn:Kr}),cu.every(DN=>!DN.hasConversion)&&(ce[ls]=Kr)}}fe.sort(T);const be=V(se,ce,us);let Se;for(Se in ce)Object.prototype.hasOwnProperty.call(ce,Se)&&(ce[Se]=be[ce[Se]]);const xe=[],dt=new Map;for(Se of fe)dt.has(Se.name)||(Se.fn=be[Se.fn],xe.push(Se),dt.set(Se.name,Se));const qe=xe[0]&&xe[0].params.length<=2&&!w(xe[0].params),Bt=xe[1]&&xe[1].params.length<=2&&!w(xe[1].params),M=xe[2]&&xe[2].params.length<=2&&!w(xe[2].params),W=xe[3]&&xe[3].params.length<=2&&!w(xe[3].params),ie=xe[4]&&xe[4].params.length<=2&&!w(xe[4].params),ge=xe[5]&&xe[5].params.length<=2&&!w(xe[5].params),Le=qe&&Bt&&M&&W&&ie&≥for(let At=0;At<xe.length;++At)xe[At].test=A(xe[At].params);const Ye=qe?v(xe[0].params[0]):vn,Ir=Bt?v(xe[1].params[0]):vn,$c=M?v(xe[2].params[0]):vn,KD=W?v(xe[3].params[0]):vn,YD=ie?v(xe[4].params[0]):vn,ZD=ge?v(xe[5].params[0]):vn,QD=qe?v(xe[0].params[1]):vn,XD=Bt?v(xe[1].params[1]):vn,eN=M?v(xe[2].params[1]):vn,tN=W?v(xe[3].params[1]):vn,rN=ie?v(xe[4].params[1]):vn,nN=ge?v(xe[5].params[1]):vn;for(let At=0;At<xe.length;++At)xe[At].implementation=P(xe[At].params,xe[At].fn);const aN=qe?xe[0].implementation:bo,iN=Bt?xe[1].implementation:bo,oN=M?xe[2].implementation:bo,sN=W?xe[3].implementation:bo,uN=ie?xe[4].implementation:bo,lN=ge?xe[5].implementation:bo,cN=qe?xe[0].params.length:-1,fN=Bt?xe[1].params.length:-1,mN=M?xe[2].params.length:-1,dN=W?xe[3].params.length:-1,hN=ie?xe[4].params.length:-1,pN=ge?xe[5].params.length:-1,gN=Le?6:0,vN=xe.length,yN=xe.map(At=>At.test),bN=xe.map(At=>At.implementation),wN=function(){for(let Kr=gN;Kr<vN;Kr++)if(yN[Kr](arguments))return bN[Kr].apply(this,arguments);return o.onMismatch(I,arguments,xe)};function us(At,Kr){return arguments.length===cN&&Ye(At)&&QD(Kr)?aN.apply(this,arguments):arguments.length===fN&&Ir(At)&&XD(Kr)?iN.apply(this,arguments):arguments.length===mN&&$c(At)&&eN(Kr)?oN.apply(this,arguments):arguments.length===dN&&KD(At)&&tN(Kr)?sN.apply(this,arguments):arguments.length===hN&&YD(At)&&rN(Kr)?uN.apply(this,arguments):arguments.length===pN&&ZD(At)&&nN(Kr)?lN.apply(this,arguments):wN.apply(this,arguments)}try{Object.defineProperty(us,"name",{value:I})}catch{}return us.signatures=ce,us._typedFunctionData={signatures:xe,signatureMap:dt},us}function ee(I,Y,X){throw F(I,Y,X)}function L(I){return J(I,0,I.length-1)}function R(I){return I[I.length-1]}function J(I,Y,X){return Array.prototype.slice.call(I,Y,X)}function re(I,Y){for(let X=0;X<I.length;X++)if(Y(I[X]))return I[X]}function te(I,Y){return Array.prototype.concat.apply([],I.map(Y))}function ue(){const I=L(arguments).map(X=>y(x(X))),Y=R(arguments);if(typeof Y!="function")throw new TypeError("Callback function expected as last argument");return oe(I,Y)}function oe(I,Y){return{referTo:{references:I,callback:Y}}}function De(I){if(typeof I!="function")throw new TypeError("Callback function expected as first argument");return{referToSelf:{callback:I}}}function q(I){return I&&typeof I.referTo=="object"&&Array.isArray(I.referTo.references)&&typeof I.referTo.callback=="function"}function H(I){return I&&typeof I.referToSelf=="object"&&typeof I.referToSelf.callback=="function"}function Z(I,Y){if(!I)return Y;if(Y&&Y!==I){const X=new Error("Function names do not match (expected: "+I+", actual: "+Y+")");throw X.data={actual:Y,expected:I},X}return I}function ae(I){let Y;for(const X in I)Object.prototype.hasOwnProperty.call(I,X)&&(m(I[X])||typeof I[X].signature=="string")&&(Y=Z(Y,I[X].name));return Y}function he(I,Y){let X;for(X in Y)if(Object.prototype.hasOwnProperty.call(Y,X)){if(X in I&&Y[X]!==I[X]){const se=new Error('Signature "'+X+'" is defined twice');throw se.data={signature:X,sourceFunction:Y[X],destFunction:I[X]},se}I[X]=Y[X]}}const ye=o;o=function(I){const Y=typeof I=="string",X=Y?1:0;let se=Y?I:"";const ce={};for(let fe=X;fe<arguments.length;++fe){const Ee=arguments[fe];let be={},Se;if(typeof Ee=="function"?(Se=Ee.name,typeof Ee.signature=="string"?be[Ee.signature]=Ee:m(Ee)&&(be=Ee.signatures)):e(Ee)&&(be=Ee,Y||(Se=ae(Ee))),Object.keys(be).length===0){const xe=new TypeError("Argument to 'typed' at index "+fe+" is not a (typed) function, nor an object with signatures as keys and functions as values.");throw xe.data={index:fe,argument:Ee},xe}Y||(se=Z(se,Se)),he(ce,be)}return ne(se||"",ce)},o.create=Jw,o.createCount=ye.createCount,o.onMismatch=ee,o.throwMismatchError=ee,o.createError=F,o.clear=l,o.clearConversions=c,o.addTypes=u,o._findType=s,o.referTo=ue,o.referToSelf=De,o.convert=h,o.findSignature=d,o.find=p,o.isTypedFunction=m,o.warnAgainstDeprecatedThis=!0,o.addType=function(I,Y){let X="any";Y!==!1&&n.has("Object")&&(X="Object"),o.addTypes([I],X)};function Te(I){if(!I||typeof I.from!="string"||typeof I.to!="string"||typeof I.convert!="function")throw new TypeError("Object with properties {from: string, to: string, convert: function} expected");if(I.to===I.from)throw new SyntaxError('Illegal to define conversion from "'+I.from+'" to itself.')}return o.addConversion=function(I){let Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{override:!1};Te(I);const X=s(I.to),se=X.conversionsTo.find(ce=>ce.from===I.from);if(se)if(Y&&Y.override)o.removeConversion({from:se.from,to:I.to,convert:se.convert});else throw new Error('There is already a conversion from "'+I.from+'" to "'+X.name+'"');X.conversionsTo.push({from:I.from,convert:I.convert,index:i++})},o.addConversions=function(I,Y){I.forEach(X=>o.addConversion(X,Y))},o.removeConversion=function(I){Te(I);const Y=s(I.to),X=re(Y.conversionsTo,ce=>ce.from===I.from);if(!X)throw new Error("Attempt to remove nonexistent conversion from "+I.from+" to "+I.to);if(X.convert!==I.convert)throw new Error("Conversion to remove does not match existing conversion");const se=Y.conversionsTo.indexOf(X);Y.conversionsTo.splice(se,1)},o.resolve=function(I,Y){if(!m(I))throw new TypeError(Wg);const X=I._typedFunctionData.signatures;for(let se=0;se<X.length;++se)if(X[se].test(Y))return X[se];return null},o}const Il=Jw();function B(e,t,r,n){function a(i){var o=W6(i,t.map(Q6));return Y6(e,t,i),r(o)}return a.isFactory=!0,a.fn=e,a.dependencies=t.slice().sort(),n&&(a.meta=n),a}function Y6(e,t,r){var n=t.filter(i=>!Z6(i)).every(i=>r[i]!==void 0);if(!n){var a=t.filter(i=>r[i]===void 0);throw new Error('Cannot create function "'.concat(e,'", ')+"some dependencies are missing: ".concat(a.map(i=>'"'.concat(i,'"')).join(", "),"."))}}function Z6(e){return e&&e[0]==="?"}function Q6(e){return e&&e[0]==="?"?e.slice(1):e}function $e(e){return typeof e=="boolean"?!0:isFinite(e)?e===Math.round(e):!1}function mi(e,t){if(t.number==="bigint")try{BigInt(e)}catch{return t.numberFallback}return t.number}var Xa=Math.sign||function(e){return e>0?1:e<0?-1:0},X6=Math.log2||function(t){return Math.log(t)/Math.LN2},e9=Math.log10||function(t){return Math.log(t)/Math.LN10},t9=Math.log1p||function(e){return Math.log(e+1)},r9=Math.cbrt||function(t){if(t===0)return t;var r=t<0,n;return r&&(t=-t),isFinite(t)?(n=Math.exp(Math.log(t)/3),n=(t/(n*n)+2*n)/3):n=t,r?-n:n},n9=Math.expm1||function(t){return t>=2e-4||t<=-2e-4?Math.exp(t)-1:t+t*t/2+t*t*t/6};function Af(e,t,r){var n={2:"0b",8:"0o",16:"0x"},a=n[t],i="";if(r){if(r<1)throw new Error("size must be in greater than 0");if(!$e(r))throw new Error("size must be an integer");if(e>2**(r-1)-1||e<-(2**(r-1)))throw new Error("Value must be in range [-2^".concat(r-1,", 2^").concat(r-1,"-1]"));if(!$e(e))throw new Error("Value must be an integer");e<0&&(e=e+2**r),i="i".concat(r)}var o="";return e<0&&(e=-e,o="-"),"".concat(o).concat(a).concat(e.toString(t)).concat(i)}function Li(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:r,precision:n,wordSize:a}=Kw(t);switch(r){case"fixed":return Yw(e,n);case"exponential":return Zw(e,n);case"engineering":return a9(e,n);case"bin":return Af(e,2,a);case"oct":return Af(e,8,a);case"hex":return Af(e,16,a);case"auto":return i9(e,n,t).replace(/((\.\d*?)(0+))($|e)/,function(){var i=arguments[2],o=arguments[4];return i!=="."?i+o:o});default:throw new Error('Unknown notation "'+r+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function Kw(e){var t="auto",r,n;if(e!==void 0)if(Ze(e))r=e;else if(Qe(e))r=e.toNumber();else if(mc(e))e.precision!==void 0&&(r=Jg(e.precision,()=>{throw new Error('Option "precision" must be a number or BigNumber')})),e.wordSize!==void 0&&(n=Jg(e.wordSize,()=>{throw new Error('Option "wordSize" must be a number or BigNumber')})),e.notation&&(t=e.notation);else throw new Error("Unsupported type of options, number, BigNumber, or object expected");return{notation:t,precision:r,wordSize:n}}function Xs(e){var t=String(e).toLowerCase().match(/^(-?)(\d+\.?\d*)(e([+-]?\d+))?$/);if(!t)throw new SyntaxError("Invalid number "+e);var r=t[1],n=t[2],a=parseFloat(t[4]||"0"),i=n.indexOf(".");a+=i!==-1?i-1:n.length-1;var o=n.replace(".","").replace(/^0*/,function(s){return a-=s.length,""}).replace(/0*$/,"").split("").map(function(s){return parseInt(s)});return o.length===0&&(o.push(0),a++),{sign:r,coefficients:o,exponent:a}}function a9(e,t){if(isNaN(e)||!isFinite(e))return String(e);var r=Xs(e),n=hc(r,t),a=n.exponent,i=n.coefficients,o=a%3===0?a:a<0?a-3-a%3:a-a%3;if(Ze(t))for(;t>i.length||a-o+1>i.length;)i.push(0);else for(var s=Math.abs(a-o)-(i.length-1),u=0;u<s;u++)i.push(0);for(var l=Math.abs(a-o),c=1;l>0;)c++,l--;var f=i.slice(c).join(""),m=Ze(t)&&f.length||f.match(/[1-9]/)?"."+f:"",d=i.slice(0,c).join("")+m+"e"+(a>=0?"+":"")+o.toString();return n.sign+d}function Yw(e,t){if(isNaN(e)||!isFinite(e))return String(e);var r=Xs(e),n=typeof t=="number"?hc(r,r.exponent+1+t):r,a=n.coefficients,i=n.exponent+1,o=i+(t||0);return a.length<o&&(a=a.concat(_o(o-a.length))),i<0&&(a=_o(-i+1).concat(a),i=1),i<a.length&&a.splice(i,0,i===0?"0.":"."),n.sign+a.join("")}function Zw(e,t){if(isNaN(e)||!isFinite(e))return String(e);var r=Xs(e),n=t?hc(r,t):r,a=n.coefficients,i=n.exponent;a.length<t&&(a=a.concat(_o(t-a.length)));var o=a.shift();return n.sign+o+(a.length>0?"."+a.join(""):"")+"e"+(i>=0?"+":"")+i}function i9(e,t,r){if(isNaN(e)||!isFinite(e))return String(e);var n=Kg(r==null?void 0:r.lowerExp,-3),a=Kg(r==null?void 0:r.upperExp,5),i=Xs(e),o=t?hc(i,t):i;if(o.exponent<n||o.exponent>=a)return Zw(e,t);var s=o.coefficients,u=o.exponent;s.length<t&&(s=s.concat(_o(t-s.length))),s=s.concat(_o(u-s.length+1+(s.length<t?t-s.length:0))),s=_o(-u).concat(s);var l=u>0?u:0;return l<s.length-1&&s.splice(l+1,0,"."),o.sign+s.join("")}function hc(e,t){for(var r={sign:e.sign,coefficients:e.coefficients,exponent:e.exponent},n=r.coefficients;t<=0;)n.unshift(0),r.exponent++,t++;if(n.length>t){var a=n.splice(t,n.length-t);if(a[0]>=5){var i=t-1;for(n[i]++;n[i]===10;)n.pop(),i===0&&(n.unshift(0),r.exponent++,i++),i--,n[i]++}}return r}function _o(e){for(var t=[],r=0;r<e;r++)t.push(0);return t}function o9(e){return e.toExponential().replace(/e.*$/,"").replace(/^0\.?0*|\./,"").length}function Ar(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1e-8,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;if(r<=0)throw new Error("Relative tolerance must be greater than 0");if(n<0)throw new Error("Absolute tolerance must be at least 0");return isNaN(e)||isNaN(t)?!1:!isFinite(e)||!isFinite(t)?e===t:e===t?!0:Math.abs(e-t)<=Math.max(r*Math.max(Math.abs(e),Math.abs(t)),n)}var s9=Math.acosh||function(e){return Math.log(Math.sqrt(e*e-1)+e)},u9=Math.asinh||function(e){return Math.log(Math.sqrt(e*e+1)+e)},l9=Math.atanh||function(e){return Math.log((1+e)/(1-e))/2},c9=Math.cosh||function(e){return(Math.exp(e)+Math.exp(-e))/2},f9=Math.sinh||function(e){return(Math.exp(e)-Math.exp(-e))/2},m9=Math.tanh||function(e){var t=Math.exp(2*e);return(t-1)/(t+1)};function d9(e,t){var r=!0,n=t>0?!0:t<0?!1:1/t===1/0;return r^n?-e:e}function Jg(e,t){if(Ze(e))return e;if(Qe(e))return e.toNumber();t()}function Kg(e,t){return Ze(e)?e:Qe(e)?e.toNumber():t}var Qw=function(){return Qw=Il.create,Il},h9=["?BigNumber","?Complex","?DenseMatrix","?Fraction"],p9=B("typed",h9,function(t){var{BigNumber:r,Complex:n,DenseMatrix:a,Fraction:i}=t,o=Qw();return o.clear(),o.addTypes([{name:"number",test:Ze},{name:"Complex",test:Pa},{name:"BigNumber",test:Qe},{name:"bigint",test:Ms},{name:"Fraction",test:Zs},{name:"Unit",test:Nn},{name:"identifier",test:s=>Pr&&/^(?:[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-\u088E\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\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\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-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\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\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-\uDEC4\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\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD80E\uD80F\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\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\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD08]|\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\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]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])(?:[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-\u088E\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\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\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-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\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\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-\uDEC4\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\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD80E\uD80F\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\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\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD08]|\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\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]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])*$/.test(s)},{name:"string",test:Pr},{name:"Chain",test:Uw},{name:"Array",test:Et},{name:"Matrix",test:je},{name:"DenseMatrix",test:Bl},{name:"SparseMatrix",test:ji},{name:"Range",test:hd},{name:"Index",test:fc},{name:"boolean",test:O6},{name:"ResultSet",test:$6},{name:"Help",test:Gw},{name:"function",test:_6},{name:"Date",test:B6},{name:"RegExp",test:I6},{name:"null",test:z6},{name:"undefined",test:j6},{name:"AccessorNode",test:Wi},{name:"ArrayNode",test:Dn},{name:"AssignmentNode",test:q6},{name:"BlockNode",test:R6},{name:"ConditionalNode",test:L6},{name:"ConstantNode",test:lt},{name:"FunctionNode",test:si},{name:"FunctionAssignmentNode",test:Qs},{name:"IndexNode",test:Yo},{name:"Node",test:Nt},{name:"ObjectNode",test:dc},{name:"OperatorNode",test:Yt},{name:"ParenthesisNode",test:_a},{name:"RangeNode",test:H6},{name:"RelationalNode",test:G6},{name:"SymbolNode",test:pr},{name:"Map",test:Vw},{name:"Object",test:mc}]),o.addConversions([{from:"number",to:"BigNumber",convert:function(u){if(r||Ju(u),o9(u)>15)throw new TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+u+"). Use function bignumber(x) to convert to BigNumber.");return new r(u)}},{from:"number",to:"Complex",convert:function(u){return n||Ku(u),new n(u,0)}},{from:"BigNumber",to:"Complex",convert:function(u){return n||Ku(u),new n(u.toNumber(),0)}},{from:"bigint",to:"number",convert:function(u){if(u>Number.MAX_SAFE_INTEGER)throw new TypeError("Cannot implicitly convert bigint to number: value exceeds the max safe integer value (value: "+u+")");return Number(u)}},{from:"bigint",to:"BigNumber",convert:function(u){return r||Ju(u),new r(u.toString())}},{from:"bigint",to:"Fraction",convert:function(u){return i||Yu(u),new i(u)}},{from:"Fraction",to:"BigNumber",convert:function(u){throw new 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(u){return n||Ku(u),new n(u.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(u){i||Yu(u);var l=new i(u);if(l.valueOf()!==u)throw new TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+u+"). Use function fraction(x) to convert to Fraction.");return l}},{from:"string",to:"number",convert:function(u){var l=Number(u);if(isNaN(l))throw new Error('Cannot convert "'+u+'" to a number');return l}},{from:"string",to:"BigNumber",convert:function(u){r||Ju(u);try{return new r(u)}catch{throw new Error('Cannot convert "'+u+'" to BigNumber')}}},{from:"string",to:"bigint",convert:function(u){try{return BigInt(u)}catch{throw new Error('Cannot convert "'+u+'" to BigInt')}}},{from:"string",to:"Fraction",convert:function(u){i||Yu(u);try{return new i(u)}catch{throw new Error('Cannot convert "'+u+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(u){n||Ku(u);try{return new n(u)}catch{throw new Error('Cannot convert "'+u+'" to Complex')}}},{from:"boolean",to:"number",convert:function(u){return+u}},{from:"boolean",to:"BigNumber",convert:function(u){return r||Ju(u),new r(+u)}},{from:"boolean",to:"bigint",convert:function(u){return BigInt(+u)}},{from:"boolean",to:"Fraction",convert:function(u){return i||Yu(u),new i(+u)}},{from:"boolean",to:"string",convert:function(u){return String(u)}},{from:"Array",to:"Matrix",convert:function(u){return a||g9(),new a(u)}},{from:"Matrix",to:"Array",convert:function(u){return u.valueOf()}}]),o.onMismatch=(s,u,l)=>{var c=o.createError(s,u,l);if(["wrongType","mismatch"].includes(c.data.category)&&u.length===1&&Mn(u[0])&&l.some(m=>!m.params.includes(","))){var f=new TypeError("Function '".concat(s,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(s,")'."));throw f.data=c.data,f}throw c},o.onMismatch=(s,u,l)=>{var c=o.createError(s,u,l);if(["wrongType","mismatch"].includes(c.data.category)&&u.length===1&&Mn(u[0])&&l.some(m=>!m.params.includes(","))){var f=new TypeError("Function '".concat(s,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(s,")'."));throw f.data=c.data,f}throw c},o});function Ju(e){throw new Error("Cannot convert value ".concat(e," into a BigNumber: no class 'BigNumber' provided"))}function Ku(e){throw new Error("Cannot convert value ".concat(e," into a Complex number: no class 'Complex' provided"))}function g9(){throw new Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}function Yu(e){throw new Error("Cannot convert value ".concat(e," into a Fraction, no class 'Fraction' provided."))}var v9="ResultSet",y9=[],b9=B(v9,y9,()=>{function e(t){if(!(this instanceof e))throw new 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});/*!
|
|
34
|
-
* decimal.js v10.5.0
|
|
35
|
-
* An arbitrary-precision Decimal type for JavaScript.
|
|
36
|
-
* https://github.com/MikeMcl/decimal.js
|
|
37
|
-
* Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
|
|
38
|
-
* MIT Licence
|
|
39
|
-
*/var Po=9e15,di=1e9,Cm="0123456789abcdef",zl="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",jl="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Em={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-Po,maxE:Po,crypto:!1},Xw,Ta,Ke=!0,pc="[DecimalError] ",ui=pc+"Invalid argument: ",ex=pc+"Precision limit exceeded",tx=pc+"crypto unavailable",rx="[object Decimal]",$r=Math.floor,nr=Math.pow,w9=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,x9=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,D9=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,nx=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Gn=1e7,He=7,N9=9007199254740991,A9=zl.length-1,Sm=jl.length-1,ve={toStringTag:rx};ve.absoluteValue=ve.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),ze(e)};ve.ceil=function(){return ze(new this.constructor(this),this.e+1,2)};ve.clampedTo=ve.clamp=function(e,t){var r,n=this,a=n.constructor;if(e=new a(e),t=new a(t),!e.s||!t.s)return new a(NaN);if(e.gt(t))throw Error(ui+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new a(n)};ve.comparedTo=ve.cmp=function(e){var t,r,n,a,i=this,o=i.d,s=(e=new i.constructor(e)).d,u=i.s,l=e.s;if(!o||!s)return!u||!l?NaN:u!==l?u:o===s?0:!o^u<0?1:-1;if(!o[0]||!s[0])return o[0]?u:s[0]?-l:0;if(u!==l)return u;if(i.e!==e.e)return i.e>e.e^u<0?1:-1;for(n=o.length,a=s.length,t=0,r=n<a?n:a;t<r;++t)if(o[t]!==s[t])return o[t]>s[t]^u<0?1:-1;return n===a?0:n>a^u<0?1:-1};ve.cosine=ve.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+He,n.rounding=1,r=C9(n,ux(n,r)),n.precision=e,n.rounding=t,ze(Ta==2||Ta==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};ve.cubeRoot=ve.cbrt=function(){var e,t,r,n,a,i,o,s,u,l,c=this,f=c.constructor;if(!c.isFinite()||c.isZero())return new f(c);for(Ke=!1,i=c.s*nr(c.s*c,1/3),!i||Math.abs(i)==1/0?(r=xr(c.d),e=c.e,(i=(e-r.length+1)%3)&&(r+=i==1||i==-2?"0":"00"),i=nr(r,1/3),e=$r((e+1)/3)-(e%3==(e<0?-1:2)),i==1/0?r="5e"+e:(r=i.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new f(r),n.s=c.s):n=new f(i.toString()),o=(e=f.precision)+3;;)if(s=n,u=s.times(s).times(s),l=u.plus(c),n=$t(l.plus(c).times(s),l.plus(u),o+2,1),xr(s.d).slice(0,o)===(r=xr(n.d)).slice(0,o))if(r=r.slice(o-3,o+1),r=="9999"||!a&&r=="4999"){if(!a&&(ze(s,e+1,0),s.times(s).times(s).eq(c))){n=s;break}o+=4,a=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(ze(n,e+1,1),t=!n.times(n).times(n).eq(c));break}return Ke=!0,ze(n,e,f.rounding,t)};ve.decimalPlaces=ve.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-$r(this.e/He))*He,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};ve.dividedBy=ve.div=function(e){return $t(this,new this.constructor(e))};ve.dividedToIntegerBy=ve.divToInt=function(e){var t=this,r=t.constructor;return ze($t(t,new r(e),0,1,1),r.precision,r.rounding)};ve.equals=ve.eq=function(e){return this.cmp(e)===0};ve.floor=function(){return ze(new this.constructor(this),this.e+1,3)};ve.greaterThan=ve.gt=function(e){return this.cmp(e)>0};ve.greaterThanOrEqualTo=ve.gte=function(e){var t=this.cmp(e);return t==1||t===0};ve.hyperbolicCosine=ve.cosh=function(){var e,t,r,n,a,i=this,o=i.constructor,s=new o(1);if(!i.isFinite())return new o(i.s?1/0:NaN);if(i.isZero())return s;r=o.precision,n=o.rounding,o.precision=r+Math.max(i.e,i.sd())+4,o.rounding=1,a=i.d.length,a<32?(e=Math.ceil(a/3),t=(1/vc(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),i=qo(o,1,i.times(t),new o(1),!0);for(var u,l=e,c=new o(8);l--;)u=i.times(i),i=s.minus(u.times(c.minus(u.times(c))));return ze(i,o.precision=r,o.rounding=n,!0)};ve.hyperbolicSine=ve.sinh=function(){var e,t,r,n,a=this,i=a.constructor;if(!a.isFinite()||a.isZero())return new i(a);if(t=i.precision,r=i.rounding,i.precision=t+Math.max(a.e,a.sd())+4,i.rounding=1,n=a.d.length,n<3)a=qo(i,2,a,a,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,a=a.times(1/vc(5,e)),a=qo(i,2,a,a,!0);for(var o,s=new i(5),u=new i(16),l=new i(20);e--;)o=a.times(a),a=a.times(s.plus(o.times(u.times(o).plus(l))))}return i.precision=t,i.rounding=r,ze(a,t,r,!0)};ve.hyperbolicTangent=ve.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,$t(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};ve.inverseCosine=ve.acos=function(){var e=this,t=e.constructor,r=e.abs().cmp(1),n=t.precision,a=t.rounding;return r!==-1?r===0?e.isNeg()?aa(t,n,a):new t(0):new t(NaN):e.isZero()?aa(t,n+4,a).times(.5):(t.precision=n+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=n,t.rounding=a,e.times(2))};ve.inverseHyperbolicCosine=ve.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,Ke=!1,r=r.times(r).minus(1).sqrt().plus(r),Ke=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};ve.inverseHyperbolicSine=ve.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,Ke=!1,r=r.times(r).plus(1).sqrt().plus(r),Ke=!0,n.precision=e,n.rounding=t,r.ln())};ve.inverseHyperbolicTangent=ve.atanh=function(){var e,t,r,n,a=this,i=a.constructor;return a.isFinite()?a.e>=0?new i(a.abs().eq(1)?a.s/0:a.isZero()?a:NaN):(e=i.precision,t=i.rounding,n=a.sd(),Math.max(n,e)<2*-a.e-1?ze(new i(a),e,t,!0):(i.precision=r=n-a.e,a=$t(a.plus(1),new i(1).minus(a),r+e,1),i.precision=e+4,i.rounding=1,a=a.ln(),i.precision=e,i.rounding=t,a.times(.5))):new i(NaN)};ve.inverseSine=ve.asin=function(){var e,t,r,n,a=this,i=a.constructor;return a.isZero()?new i(a):(t=a.abs().cmp(1),r=i.precision,n=i.rounding,t!==-1?t===0?(e=aa(i,r+4,n).times(.5),e.s=a.s,e):new i(NaN):(i.precision=r+6,i.rounding=1,a=a.div(new i(1).minus(a.times(a)).sqrt().plus(1)).atan(),i.precision=r,i.rounding=n,a.times(2)))};ve.inverseTangent=ve.atan=function(){var e,t,r,n,a,i,o,s,u,l=this,c=l.constructor,f=c.precision,m=c.rounding;if(l.isFinite()){if(l.isZero())return new c(l);if(l.abs().eq(1)&&f+4<=Sm)return o=aa(c,f+4,m).times(.25),o.s=l.s,o}else{if(!l.s)return new c(NaN);if(f+4<=Sm)return o=aa(c,f+4,m).times(.5),o.s=l.s,o}for(c.precision=s=f+10,c.rounding=1,r=Math.min(28,s/He+2|0),e=r;e;--e)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(Ke=!1,t=Math.ceil(s/He),n=1,u=l.times(l),o=new c(l),a=l;e!==-1;)if(a=a.times(u),i=o.minus(a.div(n+=2)),a=a.times(u),o=i.plus(a.div(n+=2)),o.d[t]!==void 0)for(e=t;o.d[e]===i.d[e]&&e--;);return r&&(o=o.times(2<<r-1)),Ke=!0,ze(o,c.precision=f,c.rounding=m,!0)};ve.isFinite=function(){return!!this.d};ve.isInteger=ve.isInt=function(){return!!this.d&&$r(this.e/He)>this.d.length-2};ve.isNaN=function(){return!this.s};ve.isNegative=ve.isNeg=function(){return this.s<0};ve.isPositive=ve.isPos=function(){return this.s>0};ve.isZero=function(){return!!this.d&&this.d[0]===0};ve.lessThan=ve.lt=function(e){return this.cmp(e)<0};ve.lessThanOrEqualTo=ve.lte=function(e){return this.cmp(e)<1};ve.logarithm=ve.log=function(e){var t,r,n,a,i,o,s,u,l=this,c=l.constructor,f=c.precision,m=c.rounding,d=5;if(e==null)e=new c(10),t=!0;else{if(e=new c(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new c(NaN);t=e.eq(10)}if(r=l.d,l.s<0||!r||!r[0]||l.eq(1))return new c(r&&!r[0]?-1/0:l.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)i=!0;else{for(a=r[0];a%10===0;)a/=10;i=a!==1}if(Ke=!1,s=f+d,o=ei(l,s),n=t?ql(c,s+10):ei(e,s),u=$t(o,n,s,1),zs(u.d,a=f,m))do if(s+=10,o=ei(l,s),n=t?ql(c,s+10):ei(e,s),u=$t(o,n,s,1),!i){+xr(u.d).slice(a+1,a+15)+1==1e14&&(u=ze(u,f+1,0));break}while(zs(u.d,a+=10,m));return Ke=!0,ze(u,f,m)};ve.minus=ve.sub=function(e){var t,r,n,a,i,o,s,u,l,c,f,m,d=this,p=d.constructor;if(e=new p(e),!d.d||!e.d)return!d.s||!e.s?e=new p(NaN):d.d?e.s=-e.s:e=new p(e.d||d.s!==e.s?d:NaN),e;if(d.s!=e.s)return e.s=-e.s,d.plus(e);if(l=d.d,m=e.d,s=p.precision,u=p.rounding,!l[0]||!m[0]){if(m[0])e.s=-e.s;else if(l[0])e=new p(d);else return new p(u===3?-0:0);return Ke?ze(e,s,u):e}if(r=$r(e.e/He),c=$r(d.e/He),l=l.slice(),i=c-r,i){for(f=i<0,f?(t=l,i=-i,o=m.length):(t=m,r=c,o=l.length),n=Math.max(Math.ceil(s/He),o)+2,i>n&&(i=n,t.length=1),t.reverse(),n=i;n--;)t.push(0);t.reverse()}else{for(n=l.length,o=m.length,f=n<o,f&&(o=n),n=0;n<o;n++)if(l[n]!=m[n]){f=l[n]<m[n];break}i=0}for(f&&(t=l,l=m,m=t,e.s=-e.s),o=l.length,n=m.length-o;n>0;--n)l[o++]=0;for(n=m.length;n>i;){if(l[--n]<m[n]){for(a=n;a&&l[--a]===0;)l[a]=Gn-1;--l[a],l[n]+=Gn}l[n]-=m[n]}for(;l[--o]===0;)l.pop();for(;l[0]===0;l.shift())--r;return l[0]?(e.d=l,e.e=gc(l,r),Ke?ze(e,s,u):e):new p(u===3?-0:0)};ve.modulo=ve.mod=function(e){var t,r=this,n=r.constructor;return e=new n(e),!r.d||!e.s||e.d&&!e.d[0]?new n(NaN):!e.d||r.d&&!r.d[0]?ze(new n(r),n.precision,n.rounding):(Ke=!1,n.modulo==9?(t=$t(r,e.abs(),0,3,1),t.s*=e.s):t=$t(r,e,0,n.modulo,1),t=t.times(e),Ke=!0,r.minus(t))};ve.naturalExponential=ve.exp=function(){return Mm(this)};ve.naturalLogarithm=ve.ln=function(){return ei(this)};ve.negated=ve.neg=function(){var e=new this.constructor(this);return e.s=-e.s,ze(e)};ve.plus=ve.add=function(e){var t,r,n,a,i,o,s,u,l,c,f=this,m=f.constructor;if(e=new m(e),!f.d||!e.d)return!f.s||!e.s?e=new m(NaN):f.d||(e=new m(e.d||f.s===e.s?f:NaN)),e;if(f.s!=e.s)return e.s=-e.s,f.minus(e);if(l=f.d,c=e.d,s=m.precision,u=m.rounding,!l[0]||!c[0])return c[0]||(e=new m(f)),Ke?ze(e,s,u):e;if(i=$r(f.e/He),n=$r(e.e/He),l=l.slice(),a=i-n,a){for(a<0?(r=l,a=-a,o=c.length):(r=c,n=i,o=l.length),i=Math.ceil(s/He),o=i>o?i+1:o+1,a>o&&(a=o,r.length=1),r.reverse();a--;)r.push(0);r.reverse()}for(o=l.length,a=c.length,o-a<0&&(a=o,r=c,c=l,l=r),t=0;a;)t=(l[--a]=l[a]+c[a]+t)/Gn|0,l[a]%=Gn;for(t&&(l.unshift(t),++n),o=l.length;l[--o]==0;)l.pop();return e.d=l,e.e=gc(l,n),Ke?ze(e,s,u):e};ve.precision=ve.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(ui+e);return r.d?(t=ax(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};ve.round=function(){var e=this,t=e.constructor;return ze(new t(e),e.e+1,t.rounding)};ve.sine=ve.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+He,n.rounding=1,r=S9(n,ux(n,r)),n.precision=e,n.rounding=t,ze(Ta>2?r.neg():r,e,t,!0)):new n(NaN)};ve.squareRoot=ve.sqrt=function(){var e,t,r,n,a,i,o=this,s=o.d,u=o.e,l=o.s,c=o.constructor;if(l!==1||!s||!s[0])return new c(!l||l<0&&(!s||s[0])?NaN:s?o:1/0);for(Ke=!1,l=Math.sqrt(+o),l==0||l==1/0?(t=xr(s),(t.length+u)%2==0&&(t+="0"),l=Math.sqrt(t),u=$r((u+1)/2)-(u<0||u%2),l==1/0?t="5e"+u:(t=l.toExponential(),t=t.slice(0,t.indexOf("e")+1)+u),n=new c(t)):n=new c(l.toString()),r=(u=c.precision)+3;;)if(i=n,n=i.plus($t(o,i,r+2,1)).times(.5),xr(i.d).slice(0,r)===(t=xr(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!a&&t=="4999"){if(!a&&(ze(i,u+1,0),i.times(i).eq(o))){n=i;break}r+=4,a=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(ze(n,u+1,1),e=!n.times(n).eq(o));break}return Ke=!0,ze(n,u,c.rounding,e)};ve.tangent=ve.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=$t(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,ze(Ta==2||Ta==4?r.neg():r,e,t,!0)):new n(NaN)};ve.times=ve.mul=function(e){var t,r,n,a,i,o,s,u,l,c=this,f=c.constructor,m=c.d,d=(e=new f(e)).d;if(e.s*=c.s,!m||!m[0]||!d||!d[0])return new f(!e.s||m&&!m[0]&&!d||d&&!d[0]&&!m?NaN:!m||!d?e.s/0:e.s*0);for(r=$r(c.e/He)+$r(e.e/He),u=m.length,l=d.length,u<l&&(i=m,m=d,d=i,o=u,u=l,l=o),i=[],o=u+l,n=o;n--;)i.push(0);for(n=l;--n>=0;){for(t=0,a=u+n;a>n;)s=i[a]+d[n]*m[a-n-1]+t,i[a--]=s%Gn|0,t=s/Gn|0;i[a]=(i[a]+t)%Gn|0}for(;!i[--o];)i.pop();return t?++r:i.shift(),e.d=i,e.e=gc(i,r),Ke?ze(e,f.precision,f.rounding):e};ve.toBinary=function(e,t){return pd(this,2,e,t)};ve.toDecimalPlaces=ve.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(tn(e,0,di),t===void 0?t=n.rounding:tn(t,0,8),ze(r,e+r.e+1,t))};ve.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=sa(n,!0):(tn(e,0,di),t===void 0?t=a.rounding:tn(t,0,8),n=ze(new a(n),e+1,t),r=sa(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};ve.toFixed=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?r=sa(a):(tn(e,0,di),t===void 0?t=i.rounding:tn(t,0,8),n=ze(new i(a),e+a.e+1,t),r=sa(n,!1,e+n.e+1)),a.isNeg()&&!a.isZero()?"-"+r:r};ve.toFraction=function(e){var t,r,n,a,i,o,s,u,l,c,f,m,d=this,p=d.d,h=d.constructor;if(!p)return new h(d);if(l=r=new h(1),n=u=new h(0),t=new h(n),i=t.e=ax(p)-d.e-1,o=i%He,t.d[0]=nr(10,o<0?He+o:o),e==null)e=i>0?t:l;else{if(s=new h(e),!s.isInt()||s.lt(l))throw Error(ui+s);e=s.gt(t)?i>0?t:l:s}for(Ke=!1,s=new h(xr(p)),c=h.precision,h.precision=i=p.length*He*2;f=$t(s,t,0,1,1),a=r.plus(f.times(n)),a.cmp(e)!=1;)r=n,n=a,a=l,l=u.plus(f.times(a)),u=a,a=t,t=s.minus(f.times(a)),s=a;return a=$t(e.minus(r),n,0,1,1),u=u.plus(a.times(l)),r=r.plus(a.times(n)),u.s=l.s=d.s,m=$t(l,n,i,1).minus(d).abs().cmp($t(u,r,i,1).minus(d).abs())<1?[l,n]:[u,r],h.precision=c,Ke=!0,m};ve.toHexadecimal=ve.toHex=function(e,t){return pd(this,16,e,t)};ve.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:tn(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(Ke=!1,r=$t(r,e,0,t,1).times(e),Ke=!0,ze(r)):(e.s=r.s,r=e),r};ve.toNumber=function(){return+this};ve.toOctal=function(e,t){return pd(this,8,e,t)};ve.toPower=ve.pow=function(e){var t,r,n,a,i,o,s=this,u=s.constructor,l=+(e=new u(e));if(!s.d||!e.d||!s.d[0]||!e.d[0])return new u(nr(+s,l));if(s=new u(s),s.eq(1))return s;if(n=u.precision,i=u.rounding,e.eq(1))return ze(s,n,i);if(t=$r(e.e/He),t>=e.d.length-1&&(r=l<0?-l:l)<=N9)return a=ix(u,s,r,n),e.s<0?new u(1).div(a):ze(a,n,i);if(o=s.s,o<0){if(t<e.d.length-1)return new u(NaN);if((e.d[t]&1)==0&&(o=1),s.e==0&&s.d[0]==1&&s.d.length==1)return s.s=o,s}return r=nr(+s,l),t=r==0||!isFinite(r)?$r(l*(Math.log("0."+xr(s.d))/Math.LN10+s.e+1)):new u(r+"").e,t>u.maxE+1||t<u.minE-1?new u(t>0?o/0:0):(Ke=!1,u.rounding=s.s=1,r=Math.min(12,(t+"").length),a=Mm(e.times(ei(s,n+r)),n),a.d&&(a=ze(a,n+5,1),zs(a.d,n,i)&&(t=n+10,a=ze(Mm(e.times(ei(s,t+r)),t),t+5,1),+xr(a.d).slice(n+1,n+15)+1==1e14&&(a=ze(a,n+1,0)))),a.s=o,Ke=!0,u.rounding=i,ze(a,n,i))};ve.toPrecision=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=sa(n,n.e<=a.toExpNeg||n.e>=a.toExpPos):(tn(e,1,di),t===void 0?t=a.rounding:tn(t,0,8),n=ze(new a(n),e,t),r=sa(n,e<=n.e||n.e<=a.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};ve.toSignificantDigits=ve.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(tn(e,1,di),t===void 0?t=n.rounding:tn(t,0,8)),ze(new n(r),e,t)};ve.toString=function(){var e=this,t=e.constructor,r=sa(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};ve.truncated=ve.trunc=function(){return ze(new this.constructor(this),this.e+1,1)};ve.valueOf=ve.toJSON=function(){var e=this,t=e.constructor,r=sa(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function xr(e){var t,r,n,a=e.length-1,i="",o=e[0];if(a>0){for(i+=o,t=1;t<a;t++)n=e[t]+"",r=He-n.length,r&&(i+=Wa(r)),i+=n;o=e[t],n=o+"",r=He-n.length,r&&(i+=Wa(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return i+o}function tn(e,t,r){if(e!==~~e||e<t||e>r)throw Error(ui+e)}function zs(e,t,r,n){var a,i,o,s;for(i=e[0];i>=10;i/=10)--t;return--t<0?(t+=He,a=0):(a=Math.ceil((t+1)/He),t%=He),i=nr(10,He-t),s=e[a]%i|0,n==null?t<3?(t==0?s=s/100|0:t==1&&(s=s/10|0),o=r<4&&s==99999||r>3&&s==49999||s==5e4||s==0):o=(r<4&&s+1==i||r>3&&s+1==i/2)&&(e[a+1]/i/100|0)==nr(10,t-2)-1||(s==i/2||s==0)&&(e[a+1]/i/100|0)==0:t<4?(t==0?s=s/1e3|0:t==1?s=s/100|0:t==2&&(s=s/10|0),o=(n||r<4)&&s==9999||!n&&r>3&&s==4999):o=((n||r<4)&&s+1==i||!n&&r>3&&s+1==i/2)&&(e[a+1]/i/1e3|0)==nr(10,t-3)-1,o}function bl(e,t,r){for(var n,a=[0],i,o=0,s=e.length;o<s;){for(i=a.length;i--;)a[i]*=t;for(a[0]+=Cm.indexOf(e.charAt(o++)),n=0;n<a.length;n++)a[n]>r-1&&(a[n+1]===void 0&&(a[n+1]=0),a[n+1]+=a[n]/r|0,a[n]%=r)}return a.reverse()}function C9(e,t){var r,n,a;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),a=(1/vc(4,r)).toString()):(r=16,a="2.3283064365386962890625e-10"),e.precision+=r,t=qo(e,1,t.times(a),new e(1));for(var i=r;i--;){var o=t.times(t);t=o.times(o).minus(o).times(8).plus(1)}return e.precision-=r,t}var $t=function(){function e(n,a,i){var o,s=0,u=n.length;for(n=n.slice();u--;)o=n[u]*a+s,n[u]=o%i|0,s=o/i|0;return s&&n.unshift(s),n}function t(n,a,i,o){var s,u;if(i!=o)u=i>o?1:-1;else for(s=u=0;s<i;s++)if(n[s]!=a[s]){u=n[s]>a[s]?1:-1;break}return u}function r(n,a,i,o){for(var s=0;i--;)n[i]-=s,s=n[i]<a[i]?1:0,n[i]=s*o+n[i]-a[i];for(;!n[0]&&n.length>1;)n.shift()}return function(n,a,i,o,s,u){var l,c,f,m,d,p,h,y,b,D,g,x,w,v,A,C,N,E,S,F,k=n.constructor,$=n.s==a.s?1:-1,_=n.d,T=a.d;if(!_||!_[0]||!T||!T[0])return new k(!n.s||!a.s||(_?T&&_[0]==T[0]:!T)?NaN:_&&_[0]==0||!T?$*0:$/0);for(u?(d=1,c=n.e-a.e):(u=Gn,d=He,c=$r(n.e/d)-$r(a.e/d)),S=T.length,N=_.length,b=new k($),D=b.d=[],f=0;T[f]==(_[f]||0);f++);if(T[f]>(_[f]||0)&&c--,i==null?(v=i=k.precision,o=k.rounding):s?v=i+(n.e-a.e)+1:v=i,v<0)D.push(1),p=!0;else{if(v=v/d+2|0,f=0,S==1){for(m=0,T=T[0],v++;(f<N||m)&&v--;f++)A=m*u+(_[f]||0),D[f]=A/T|0,m=A%T|0;p=m||f<N}else{for(m=u/(T[0]+1)|0,m>1&&(T=e(T,m,u),_=e(_,m,u),S=T.length,N=_.length),C=S,g=_.slice(0,S),x=g.length;x<S;)g[x++]=0;F=T.slice(),F.unshift(0),E=T[0],T[1]>=u/2&&++E;do m=0,l=t(T,g,S,x),l<0?(w=g[0],S!=x&&(w=w*u+(g[1]||0)),m=w/E|0,m>1?(m>=u&&(m=u-1),h=e(T,m,u),y=h.length,x=g.length,l=t(h,g,y,x),l==1&&(m--,r(h,S<y?F:T,y,u))):(m==0&&(l=m=1),h=T.slice()),y=h.length,y<x&&h.unshift(0),r(g,h,x,u),l==-1&&(x=g.length,l=t(T,g,S,x),l<1&&(m++,r(g,S<x?F:T,x,u))),x=g.length):l===0&&(m++,g=[0]),D[f++]=m,l&&g[0]?g[x++]=_[C]||0:(g=[_[C]],x=1);while((C++<N||g[0]!==void 0)&&v--);p=g[0]!==void 0}D[0]||D.shift()}if(d==1)b.e=c,Xw=p;else{for(f=1,m=D[0];m>=10;m/=10)f++;b.e=f+c*d-1,ze(b,s?i+b.e+1:i,o,p)}return b}}();function ze(e,t,r,n){var a,i,o,s,u,l,c,f,m,d=e.constructor;e:if(t!=null){if(f=e.d,!f)return e;for(a=1,s=f[0];s>=10;s/=10)a++;if(i=t-a,i<0)i+=He,o=t,c=f[m=0],u=c/nr(10,a-o-1)%10|0;else if(m=Math.ceil((i+1)/He),s=f.length,m>=s)if(n){for(;s++<=m;)f.push(0);c=u=0,a=1,i%=He,o=i-He+1}else break e;else{for(c=s=f[m],a=1;s>=10;s/=10)a++;i%=He,o=i-He+a,u=o<0?0:c/nr(10,a-o-1)%10|0}if(n=n||t<0||f[m+1]!==void 0||(o<0?c:c%nr(10,a-o-1)),l=r<4?(u||n)&&(r==0||r==(e.s<0?3:2)):u>5||u==5&&(r==4||n||r==6&&(i>0?o>0?c/nr(10,a-o):0:f[m-1])%10&1||r==(e.s<0?8:7)),t<1||!f[0])return f.length=0,l?(t-=e.e+1,f[0]=nr(10,(He-t%He)%He),e.e=-t||0):f[0]=e.e=0,e;if(i==0?(f.length=m,s=1,m--):(f.length=m+1,s=nr(10,He-i),f[m]=o>0?(c/nr(10,a-o)%nr(10,o)|0)*s:0),l)for(;;)if(m==0){for(i=1,o=f[0];o>=10;o/=10)i++;for(o=f[0]+=s,s=1;o>=10;o/=10)s++;i!=s&&(e.e++,f[0]==Gn&&(f[0]=1));break}else{if(f[m]+=s,f[m]!=Gn)break;f[m--]=0,s=1}for(i=f.length;f[--i]===0;)f.pop()}return Ke&&(e.e>d.maxE?(e.d=null,e.e=NaN):e.e<d.minE&&(e.e=0,e.d=[0])),e}function sa(e,t,r){if(!e.isFinite())return sx(e);var n,a=e.e,i=xr(e.d),o=i.length;return t?(r&&(n=r-o)>0?i=i.charAt(0)+"."+i.slice(1)+Wa(n):o>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(e.e<0?"e":"e+")+e.e):a<0?(i="0."+Wa(-a-1)+i,r&&(n=r-o)>0&&(i+=Wa(n))):a>=o?(i+=Wa(a+1-o),r&&(n=r-a-1)>0&&(i=i+"."+Wa(n))):((n=a+1)<o&&(i=i.slice(0,n)+"."+i.slice(n)),r&&(n=r-o)>0&&(a+1===o&&(i+="."),i+=Wa(n))),i}function gc(e,t){var r=e[0];for(t*=He;r>=10;r/=10)t++;return t}function ql(e,t,r){if(t>A9)throw Ke=!0,r&&(e.precision=r),Error(ex);return ze(new e(zl),t,1,!0)}function aa(e,t,r){if(t>Sm)throw Error(ex);return ze(new e(jl),t,r,!0)}function ax(e){var t=e.length-1,r=t*He+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function Wa(e){for(var t="";e--;)t+="0";return t}function ix(e,t,r,n){var a,i=new e(1),o=Math.ceil(n/He+4);for(Ke=!1;;){if(r%2&&(i=i.times(t),Zg(i.d,o)&&(a=!0)),r=$r(r/2),r===0){r=i.d.length-1,a&&i.d[r]===0&&++i.d[r];break}t=t.times(t),Zg(t.d,o)}return Ke=!0,i}function Yg(e){return e.d[e.d.length-1]&1}function ox(e,t,r){for(var n,a,i=new e(t[0]),o=0;++o<t.length;){if(a=new e(t[o]),!a.s){i=a;break}n=i.cmp(a),(n===r||n===0&&i.s===r)&&(i=a)}return i}function Mm(e,t){var r,n,a,i,o,s,u,l=0,c=0,f=0,m=e.constructor,d=m.rounding,p=m.precision;if(!e.d||!e.d[0]||e.e>17)return new m(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(Ke=!1,u=p):u=t,s=new m(.03125);e.e>-2;)e=e.times(s),f+=5;for(n=Math.log(nr(2,f))/Math.LN10*2+5|0,u+=n,r=i=o=new m(1),m.precision=u;;){if(i=ze(i.times(e),u,1),r=r.times(++c),s=o.plus($t(i,r,u,1)),xr(s.d).slice(0,u)===xr(o.d).slice(0,u)){for(a=f;a--;)o=ze(o.times(o),u,1);if(t==null)if(l<3&&zs(o.d,u-n,d,l))m.precision=u+=10,r=i=s=new m(1),c=0,l++;else return ze(o,m.precision=p,d,Ke=!0);else return m.precision=p,o}o=s}}function ei(e,t){var r,n,a,i,o,s,u,l,c,f,m,d=1,p=10,h=e,y=h.d,b=h.constructor,D=b.rounding,g=b.precision;if(h.s<0||!y||!y[0]||!h.e&&y[0]==1&&y.length==1)return new b(y&&!y[0]?-1/0:h.s!=1?NaN:y?0:h);if(t==null?(Ke=!1,c=g):c=t,b.precision=c+=p,r=xr(y),n=r.charAt(0),Math.abs(i=h.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)h=h.times(e),r=xr(h.d),n=r.charAt(0),d++;i=h.e,n>1?(h=new b("0."+r),i++):h=new b(n+"."+r.slice(1))}else return l=ql(b,c+2,g).times(i+""),h=ei(new b(n+"."+r.slice(1)),c-p).plus(l),b.precision=g,t==null?ze(h,g,D,Ke=!0):h;for(f=h,u=o=h=$t(h.minus(1),h.plus(1),c,1),m=ze(h.times(h),c,1),a=3;;){if(o=ze(o.times(m),c,1),l=u.plus($t(o,new b(a),c,1)),xr(l.d).slice(0,c)===xr(u.d).slice(0,c))if(u=u.times(2),i!==0&&(u=u.plus(ql(b,c+2,g).times(i+""))),u=$t(u,new b(d),c,1),t==null)if(zs(u.d,c-p,D,s))b.precision=c+=p,l=o=h=$t(f.minus(1),f.plus(1),c,1),m=ze(h.times(h),c,1),a=s=1;else return ze(u,b.precision=g,D,Ke=!0);else return b.precision=g,u;u=l,a+=2}}function sx(e){return String(e.s*e.s/0)}function wl(e,t){var r,n,a;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(a=t.length;t.charCodeAt(a-1)===48;--a);if(t=t.slice(n,a),t){if(a-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%He,r<0&&(n+=He),n<a){for(n&&e.d.push(+t.slice(0,n)),a-=He;n<a;)e.d.push(+t.slice(n,n+=He));t=t.slice(n),n=He-t.length}else n-=a;for(;n--;)t+="0";e.d.push(+t),Ke&&(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 E9(e,t){var r,n,a,i,o,s,u,l,c;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),nx.test(t))return wl(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(x9.test(t))r=16,t=t.toLowerCase();else if(w9.test(t))r=2;else if(D9.test(t))r=8;else throw Error(ui+t);for(i=t.search(/p/i),i>0?(u=+t.slice(i+1),t=t.substring(2,i)):t=t.slice(2),i=t.indexOf("."),o=i>=0,n=e.constructor,o&&(t=t.replace(".",""),s=t.length,i=s-i,a=ix(n,new n(r),i,i*2)),l=bl(t,r,Gn),c=l.length-1,i=c;l[i]===0;--i)l.pop();return i<0?new n(e.s*0):(e.e=gc(l,c),e.d=l,Ke=!1,o&&(e=$t(e,a,s*4)),u&&(e=e.times(Math.abs(u)<54?nr(2,u):li.pow(2,u))),Ke=!0,e)}function S9(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:qo(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/vc(5,r)),t=qo(e,2,t,t);for(var a,i=new e(5),o=new e(16),s=new e(20);r--;)a=t.times(t),t=t.times(i.plus(a.times(o.times(a).minus(s))));return t}function qo(e,t,r,n,a){var i,o,s,u,l=e.precision,c=Math.ceil(l/He);for(Ke=!1,u=r.times(r),s=new e(n);;){if(o=$t(s.times(u),new e(t++*t++),l,1),s=a?n.plus(o):n.minus(o),n=$t(o.times(u),new e(t++*t++),l,1),o=s.plus(n),o.d[c]!==void 0){for(i=c;o.d[i]===s.d[i]&&i--;);if(i==-1)break}i=s,s=n,n=o,o=i}return Ke=!0,o.d.length=c+1,o}function vc(e,t){for(var r=e;--t;)r*=e;return r}function ux(e,t){var r,n=t.s<0,a=aa(e,e.precision,1),i=a.times(.5);if(t=t.abs(),t.lte(i))return Ta=n?4:1,t;if(r=t.divToInt(a),r.isZero())Ta=n?3:2;else{if(t=t.minus(r.times(a)),t.lte(i))return Ta=Yg(r)?n?2:3:n?4:1,t;Ta=Yg(r)?n?1:4:n?3:2}return t.minus(a).abs()}function pd(e,t,r,n){var a,i,o,s,u,l,c,f,m,d=e.constructor,p=r!==void 0;if(p?(tn(r,1,di),n===void 0?n=d.rounding:tn(n,0,8)):(r=d.precision,n=d.rounding),!e.isFinite())c=sx(e);else{for(c=sa(e),o=c.indexOf("."),p?(a=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):a=t,o>=0&&(c=c.replace(".",""),m=new d(1),m.e=c.length-o,m.d=bl(sa(m),10,a),m.e=m.d.length),f=bl(c,10,a),i=u=f.length;f[--u]==0;)f.pop();if(!f[0])c=p?"0p+0":"0";else{if(o<0?i--:(e=new d(e),e.d=f,e.e=i,e=$t(e,m,r,n,0,a),f=e.d,i=e.e,l=Xw),o=f[r],s=a/2,l=l||f[r+1]!==void 0,l=n<4?(o!==void 0||l)&&(n===0||n===(e.s<0?3:2)):o>s||o===s&&(n===4||l||n===6&&f[r-1]&1||n===(e.s<0?8:7)),f.length=r,l)for(;++f[--r]>a-1;)f[r]=0,r||(++i,f.unshift(1));for(u=f.length;!f[u-1];--u);for(o=0,c="";o<u;o++)c+=Cm.charAt(f[o]);if(p){if(u>1)if(t==16||t==8){for(o=t==16?4:3,--u;u%o;u++)c+="0";for(f=bl(c,a,t),u=f.length;!f[u-1];--u);for(o=1,c="1.";o<u;o++)c+=Cm.charAt(f[o])}else c=c.charAt(0)+"."+c.slice(1);c=c+(i<0?"p":"p+")+i}else if(i<0){for(;++i;)c="0"+c;c="0."+c}else if(++i>u)for(i-=u;i--;)c+="0";else i<u&&(c=c.slice(0,i)+"."+c.slice(i))}c=(t==16?"0x":t==2?"0b":t==8?"0o":"")+c}return e.s<0?"-"+c:c}function Zg(e,t){if(e.length>t)return e.length=t,!0}function M9(e){return new this(e).abs()}function T9(e){return new this(e).acos()}function F9(e){return new this(e).acosh()}function P9(e,t){return new this(e).plus(t)}function k9(e){return new this(e).asin()}function O9(e){return new this(e).asinh()}function $9(e){return new this(e).atan()}function _9(e){return new this(e).atanh()}function B9(e,t){e=new this(e),t=new this(t);var r,n=this.precision,a=this.rounding,i=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=aa(this,i,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?aa(this,n,a):new this(0),r.s=e.s):!e.d||t.isZero()?(r=aa(this,i,1).times(.5),r.s=e.s):t.s<0?(this.precision=i,this.rounding=1,r=this.atan($t(e,t,i,1)),t=aa(this,i,1),this.precision=n,this.rounding=a,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan($t(e,t,i,1)),r}function I9(e){return new this(e).cbrt()}function z9(e){return ze(e=new this(e),e.e+1,2)}function j9(e,t,r){return new this(e).clamp(t,r)}function q9(e){if(!e||typeof e!="object")throw Error(pc+"Object expected");var t,r,n,a=e.defaults===!0,i=["precision",1,di,"rounding",0,8,"toExpNeg",-Po,0,"toExpPos",0,Po,"maxE",0,Po,"minE",-Po,0,"modulo",0,9];for(t=0;t<i.length;t+=3)if(r=i[t],a&&(this[r]=Em[r]),(n=e[r])!==void 0)if($r(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(ui+r+": "+n);if(r="crypto",a&&(this[r]=Em[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(tx);else this[r]=!1;else throw Error(ui+r+": "+n);return this}function R9(e){return new this(e).cos()}function L9(e){return new this(e).cosh()}function lx(e){var t,r,n;function a(i){var o,s,u,l=this;if(!(l instanceof a))return new a(i);if(l.constructor=a,Qg(i)){l.s=i.s,Ke?!i.d||i.e>a.maxE?(l.e=NaN,l.d=null):i.e<a.minE?(l.e=0,l.d=[0]):(l.e=i.e,l.d=i.d.slice()):(l.e=i.e,l.d=i.d?i.d.slice():i.d);return}if(u=typeof i,u==="number"){if(i===0){l.s=1/i<0?-1:1,l.e=0,l.d=[0];return}if(i<0?(i=-i,l.s=-1):l.s=1,i===~~i&&i<1e7){for(o=0,s=i;s>=10;s/=10)o++;Ke?o>a.maxE?(l.e=NaN,l.d=null):o<a.minE?(l.e=0,l.d=[0]):(l.e=o,l.d=[i]):(l.e=o,l.d=[i]);return}if(i*0!==0){i||(l.s=NaN),l.e=NaN,l.d=null;return}return wl(l,i.toString())}if(u==="string")return(s=i.charCodeAt(0))===45?(i=i.slice(1),l.s=-1):(s===43&&(i=i.slice(1)),l.s=1),nx.test(i)?wl(l,i):E9(l,i);if(u==="bigint")return i<0?(i=-i,l.s=-1):l.s=1,wl(l,i.toString());throw Error(ui+i)}if(a.prototype=ve,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.EUCLID=9,a.config=a.set=q9,a.clone=lx,a.isDecimal=Qg,a.abs=M9,a.acos=T9,a.acosh=F9,a.add=P9,a.asin=k9,a.asinh=O9,a.atan=$9,a.atanh=_9,a.atan2=B9,a.cbrt=I9,a.ceil=z9,a.clamp=j9,a.cos=R9,a.cosh=L9,a.div=H9,a.exp=G9,a.floor=V9,a.hypot=U9,a.ln=W9,a.log=J9,a.log10=Y9,a.log2=K9,a.max=Z9,a.min=Q9,a.mod=X9,a.mul=e8,a.pow=t8,a.random=r8,a.round=n8,a.sign=a8,a.sin=i8,a.sinh=o8,a.sqrt=s8,a.sub=u8,a.sum=l8,a.tan=c8,a.tanh=f8,a.trunc=m8,e===void 0&&(e={}),e&&e.defaults!==!0)for(n=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return a.config(e),a}function H9(e,t){return new this(e).div(t)}function G9(e){return new this(e).exp()}function V9(e){return ze(e=new this(e),e.e+1,3)}function U9(){var e,t,r=new this(0);for(Ke=!1,e=0;e<arguments.length;)if(t=new this(arguments[e++]),t.d)r.d&&(r=r.plus(t.times(t)));else{if(t.s)return Ke=!0,new this(1/0);r=t}return Ke=!0,r.sqrt()}function Qg(e){return e instanceof li||e&&e.toStringTag===rx||!1}function W9(e){return new this(e).ln()}function J9(e,t){return new this(e).log(t)}function K9(e){return new this(e).log(2)}function Y9(e){return new this(e).log(10)}function Z9(){return ox(this,arguments,-1)}function Q9(){return ox(this,arguments,1)}function X9(e,t){return new this(e).mod(t)}function e8(e,t){return new this(e).mul(t)}function t8(e,t){return new this(e).pow(t)}function r8(e){var t,r,n,a,i=0,o=new this(1),s=[];if(e===void 0?e=this.precision:tn(e,1,di),n=Math.ceil(e/He),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(n));i<n;)a=t[i],a>=429e7?t[i]=crypto.getRandomValues(new Uint32Array(1))[0]:s[i++]=a%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);i<n;)a=t[i]+(t[i+1]<<8)+(t[i+2]<<16)+((t[i+3]&127)<<24),a>=214e7?crypto.randomBytes(4).copy(t,i):(s.push(a%1e7),i+=4);i=n/4}else throw Error(tx);else for(;i<n;)s[i++]=Math.random()*1e7|0;for(n=s[--i],e%=He,n&&e&&(a=nr(10,He-e),s[i]=(n/a|0)*a);s[i]===0;i--)s.pop();if(i<0)r=0,s=[0];else{for(r=-1;s[0]===0;r-=He)s.shift();for(n=1,a=s[0];a>=10;a/=10)n++;n<He&&(r-=He-n)}return o.e=r,o.d=s,o}function n8(e){return ze(e=new this(e),e.e+1,this.rounding)}function a8(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}function i8(e){return new this(e).sin()}function o8(e){return new this(e).sinh()}function s8(e){return new this(e).sqrt()}function u8(e,t){return new this(e).sub(t)}function l8(){var e=0,t=arguments,r=new this(t[e]);for(Ke=!1;r.s&&++e<t.length;)r=r.plus(t[e]);return Ke=!0,ze(r,this.precision,this.rounding)}function c8(e){return new this(e).tan()}function f8(e){return new this(e).tanh()}function m8(e){return ze(e=new this(e),e.e+1,1)}ve[Symbol.for("nodejs.util.inspect.custom")]=ve.toString;ve[Symbol.toStringTag]="Decimal";var li=ve.constructor=lx(Em);zl=new li(zl);jl=new li(jl);var d8="BigNumber",h8=["?on","config"],p8=B(d8,h8,e=>{var{on:t,config:r}=e,n=li.clone({precision:r.precision,modulo:li.EUCLID});return n.prototype=Object.create(n.prototype),n.prototype.type="BigNumber",n.prototype.isBigNumber=!0,n.prototype.toJSON=function(){return{mathjs:"BigNumber",value:this.toString()}},n.fromJSON=function(a){return new n(a.value)},t&&t("config",function(a,i){a.precision!==i.precision&&n.config({precision:a.precision})}),n},{isClass:!0});const Fr=Math.cosh||function(e){return Math.abs(e)<1e-9?1-e:(Math.exp(e)+Math.exp(-e))*.5},yn=Math.sinh||function(e){return Math.abs(e)<1e-9?e:(Math.exp(e)-Math.exp(-e))*.5},g8=function(e){const t=Math.PI/4;if(-t>e||e>t)return Math.cos(e)-1;const r=e*e;return r*(r*(r*(r*(r*(r*(r*(r/20922789888e3-1/87178291200)+1/479001600)-1/3628800)+1/40320)-1/720)+1/24)-1/2)},Cf=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))},wo=function(){throw SyntaxError("Invalid Param")};function Ef(e,t){const r=Math.abs(e),n=Math.abs(t);return e===0?Math.log(n):t===0?Math.log(r):r<3e3&&n<3e3?Math.log(e*e+t*t)*.5:(e=e*.5,t=t*.5,.5*Math.log(e*e+t*t)+Math.LN2)}const v8={re:0,im:0},Fi=function(e,t){const r=v8;if(e==null)r.re=r.im=0;else if(t!==void 0)r.re=e,r.im=t;else switch(typeof e){case"object":if("im"in e&&"re"in e)r.re=e.re,r.im=e.im;else if("abs"in e&&"arg"in e){if(!isFinite(e.abs)&&isFinite(e.arg))return me.INFINITY;r.re=e.abs*Math.cos(e.arg),r.im=e.abs*Math.sin(e.arg)}else if("r"in e&&"phi"in e){if(!isFinite(e.r)&&isFinite(e.phi))return me.INFINITY;r.re=e.r*Math.cos(e.phi),r.im=e.r*Math.sin(e.phi)}else e.length===2?(r.re=e[0],r.im=e[1]):wo();break;case"string":r.im=r.re=0;const n=e.replace(/_/g,"").match(/\d+\.?\d*e[+-]?\d+|\d+\.?\d*|\.\d+|./g);let a=1,i=0;n===null&&wo();for(let o=0;o<n.length;o++){const s=n[o];s===" "||s===" "||s===`
|
|
40
|
-
`||(s==="+"?a++:s==="-"?i++:s==="i"||s==="I"?(a+i===0&&wo(),n[o+1]!==" "&&!isNaN(n[o+1])?(r.im+=parseFloat((i%2?"-":"")+n[o+1]),o++):r.im+=parseFloat((i%2?"-":"")+"1"),a=i=0):((a+i===0||isNaN(s))&&wo(),n[o+1]==="i"||n[o+1]==="I"?(r.im+=parseFloat((i%2?"-":"")+s),o++):r.re+=parseFloat((i%2?"-":"")+s),a=i=0))}a+i>0&&wo();break;case"number":r.im=0,r.re=e;break;default:wo()}return isNaN(r.re)||isNaN(r.im),r};function me(e,t){if(!(this instanceof me))return new me(e,t);const r=Fi(e,t);this.re=r.re,this.im=r.im}me.prototype={re:0,im:0,sign:function(){const e=Cf(this.re,this.im);return new me(this.re/e,this.im/e)},add:function(e,t){const r=Fi(e,t),n=this.isInfinite(),a=!(isFinite(r.re)&&isFinite(r.im));return n||a?n&&a?me.NAN:me.INFINITY:new me(this.re+r.re,this.im+r.im)},sub:function(e,t){const r=Fi(e,t),n=this.isInfinite(),a=!(isFinite(r.re)&&isFinite(r.im));return n||a?n&&a?me.NAN:me.INFINITY:new me(this.re-r.re,this.im-r.im)},mul:function(e,t){const r=Fi(e,t),n=this.isInfinite(),a=!(isFinite(r.re)&&isFinite(r.im)),i=this.re===0&&this.im===0,o=r.re===0&&r.im===0;return n&&o||a&&i?me.NAN:n||a?me.INFINITY:r.im===0&&this.im===0?new me(this.re*r.re,0):new me(this.re*r.re-this.im*r.im,this.re*r.im+this.im*r.re)},div:function(e,t){const r=Fi(e,t),n=this.isInfinite(),a=!(isFinite(r.re)&&isFinite(r.im)),i=this.re===0&&this.im===0,o=r.re===0&&r.im===0;if(i&&o||n&&a)return me.NAN;if(o||n)return me.INFINITY;if(i||a)return me.ZERO;if(r.im===0)return new me(this.re/r.re,this.im/r.re);if(Math.abs(r.re)<Math.abs(r.im)){const s=r.re/r.im,u=r.re*s+r.im;return new me((this.re*s+this.im)/u,(this.im*s-this.re)/u)}else{const s=r.im/r.re,u=r.im*s+r.re;return new me((this.re+this.im*s)/u,(this.im-this.re*s)/u)}},pow:function(e,t){const r=Fi(e,t),n=this.re===0&&this.im===0;if(r.re===0&&r.im===0)return me.ONE;if(r.im===0){if(this.im===0&&this.re>0)return new me(Math.pow(this.re,r.re),0);if(this.re===0)switch((r.re%4+4)%4){case 0:return new me(Math.pow(this.im,r.re),0);case 1:return new me(0,Math.pow(this.im,r.re));case 2:return new me(-Math.pow(this.im,r.re),0);case 3:return new me(0,-Math.pow(this.im,r.re))}}if(n&&r.re>0)return me.ZERO;const i=Math.atan2(this.im,this.re),o=Ef(this.re,this.im);let s=Math.exp(r.re*o-r.im*i),u=r.im*o+r.re*i;return new me(s*Math.cos(u),s*Math.sin(u))},sqrt:function(){const e=this.re,t=this.im;if(t===0)return e>=0?new me(Math.sqrt(e),0):new me(0,Math.sqrt(-e));const r=Cf(e,t);let n=Math.sqrt(.5*(r+Math.abs(e))),a=Math.abs(t)/(2*n);return e>=0?new me(n,t<0?-a:a):new me(a,t<0?-n:n)},exp:function(){const e=Math.exp(this.re);return this.im===0?new me(e,0):new me(e*Math.cos(this.im),e*Math.sin(this.im))},expm1:function(){const e=this.re,t=this.im;return new me(Math.expm1(e)*Math.cos(t)+g8(t),Math.exp(e)*Math.sin(t))},log:function(){const e=this.re,t=this.im;return t===0&&e>0?new me(Math.log(e),0):new me(Ef(e,t),Math.atan2(t,e))},abs:function(){return Cf(this.re,this.im)},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){const e=this.re,t=this.im;return new me(Math.sin(e)*Fr(t),Math.cos(e)*yn(t))},cos:function(){const e=this.re,t=this.im;return new me(Math.cos(e)*Fr(t),-Math.sin(e)*yn(t))},tan:function(){const e=2*this.re,t=2*this.im,r=Math.cos(e)+Fr(t);return new me(Math.sin(e)/r,yn(t)/r)},cot:function(){const e=2*this.re,t=2*this.im,r=Math.cos(e)-Fr(t);return new me(-Math.sin(e)/r,yn(t)/r)},sec:function(){const e=this.re,t=this.im,r=.5*Fr(2*t)+.5*Math.cos(2*e);return new me(Math.cos(e)*Fr(t)/r,Math.sin(e)*yn(t)/r)},csc:function(){const e=this.re,t=this.im,r=.5*Fr(2*t)-.5*Math.cos(2*e);return new me(Math.sin(e)*Fr(t)/r,-Math.cos(e)*yn(t)/r)},asin:function(){const e=this.re,t=this.im,r=new me(t*t-e*e+1,-2*e*t).sqrt(),n=new me(r.re-t,r.im+e).log();return new me(n.im,-n.re)},acos:function(){const e=this.re,t=this.im,r=new me(t*t-e*e+1,-2*e*t).sqrt(),n=new me(r.re-t,r.im+e).log();return new me(Math.PI/2-n.im,n.re)},atan:function(){const e=this.re,t=this.im;if(e===0){if(t===1)return new me(0,1/0);if(t===-1)return new me(0,-1/0)}const r=e*e+(1-t)*(1-t),n=new me((1-t*t-e*e)/r,-2*e/r).log();return new me(-.5*n.im,.5*n.re)},acot:function(){const e=this.re,t=this.im;if(t===0)return new me(Math.atan2(1,e),0);const r=e*e+t*t;return r!==0?new me(e/r,-t/r).atan():new me(e!==0?e/0:0,t!==0?-t/0:0).atan()},asec:function(){const e=this.re,t=this.im;if(e===0&&t===0)return new me(0,1/0);const r=e*e+t*t;return r!==0?new me(e/r,-t/r).acos():new me(e!==0?e/0:0,t!==0?-t/0:0).acos()},acsc:function(){const e=this.re,t=this.im;if(e===0&&t===0)return new me(Math.PI/2,1/0);const r=e*e+t*t;return r!==0?new me(e/r,-t/r).asin():new me(e!==0?e/0:0,t!==0?-t/0:0).asin()},sinh:function(){const e=this.re,t=this.im;return new me(yn(e)*Math.cos(t),Fr(e)*Math.sin(t))},cosh:function(){const e=this.re,t=this.im;return new me(Fr(e)*Math.cos(t),yn(e)*Math.sin(t))},tanh:function(){const e=2*this.re,t=2*this.im,r=Fr(e)+Math.cos(t);return new me(yn(e)/r,Math.sin(t)/r)},coth:function(){const e=2*this.re,t=2*this.im,r=Fr(e)-Math.cos(t);return new me(yn(e)/r,-Math.sin(t)/r)},csch:function(){const e=this.re,t=this.im,r=Math.cos(2*t)-Fr(2*e);return new me(-2*yn(e)*Math.cos(t)/r,2*Fr(e)*Math.sin(t)/r)},sech:function(){const e=this.re,t=this.im,r=Math.cos(2*t)+Fr(2*e);return new me(2*Fr(e)*Math.cos(t)/r,-2*yn(e)*Math.sin(t)/r)},asinh:function(){let e=this.im;this.im=-this.re,this.re=e;const t=this.asin();return this.re=-this.im,this.im=e,e=t.re,t.re=-t.im,t.im=e,t},acosh:function(){const e=this.acos();if(e.im<=0){const t=e.re;e.re=-e.im,e.im=t}else{const t=e.im;e.im=-e.re,e.re=t}return e},atanh:function(){const e=this.re,t=this.im,r=e>1&&t===0,n=1-e,a=1+e,i=n*n+t*t,o=i!==0?new me((a*n-t*t)/i,(t*n+a*t)/i):new me(e!==-1?e/0:0,t!==0?t/0:0),s=o.re;return o.re=Ef(o.re,o.im)/2,o.im=Math.atan2(o.im,s)/2,r&&(o.im=-o.im),o},acoth:function(){const e=this.re,t=this.im;if(e===0&&t===0)return new me(0,Math.PI/2);const r=e*e+t*t;return r!==0?new me(e/r,-t/r).atanh():new me(e!==0?e/0:0,t!==0?-t/0:0).atanh()},acsch:function(){const e=this.re,t=this.im;if(t===0)return new me(e!==0?Math.log(e+Math.sqrt(e*e+1)):1/0,0);const r=e*e+t*t;return r!==0?new me(e/r,-t/r).asinh():new me(e!==0?e/0:0,t!==0?-t/0:0).asinh()},asech:function(){const e=this.re,t=this.im;if(this.isZero())return me.INFINITY;const r=e*e+t*t;return r!==0?new me(e/r,-t/r).acosh():new me(e!==0?e/0:0,t!==0?-t/0:0).acosh()},inverse:function(){if(this.isZero())return me.INFINITY;if(this.isInfinite())return me.ZERO;const e=this.re,t=this.im,r=e*e+t*t;return new me(e/r,-t/r)},conjugate:function(){return new me(this.re,-this.im)},neg:function(){return new me(-this.re,-this.im)},ceil:function(e){return e=Math.pow(10,e||0),new me(Math.ceil(this.re*e)/e,Math.ceil(this.im*e)/e)},floor:function(e){return e=Math.pow(10,e||0),new me(Math.floor(this.re*e)/e,Math.floor(this.im*e)/e)},round:function(e){return e=Math.pow(10,e||0),new me(Math.round(this.re*e)/e,Math.round(this.im*e)/e)},equals:function(e,t){const r=Fi(e,t);return Math.abs(r.re-this.re)<=me.EPSILON&&Math.abs(r.im-this.im)<=me.EPSILON},clone:function(){return new me(this.re,this.im)},toString:function(){let e=this.re,t=this.im,r="";return this.isNaN()?"NaN":this.isInfinite()?"Infinity":(Math.abs(e)<me.EPSILON&&(e=0),Math.abs(t)<me.EPSILON&&(t=0),t===0?r+e:(e!==0?(r+=e,r+=" ",t<0?(t=-t,r+="-"):r+="+",r+=" "):t<0&&(t=-t,r+="-"),t!==1&&(r+=t),r+"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()}};me.ZERO=new me(0,0);me.ONE=new me(1,0);me.I=new me(0,1);me.PI=new me(Math.PI,0);me.E=new me(Math.E,0);me.INFINITY=new me(1/0,1/0);me.NAN=new me(NaN,NaN);me.EPSILON=1e-15;var y8="Complex",b8=[],w8=B(y8,b8,()=>(Object.defineProperty(me,"name",{value:"Complex"}),me.prototype.constructor=me,me.prototype.type="Complex",me.prototype.isComplex=!0,me.prototype.toJSON=function(){return{mathjs:"Complex",re:this.re,im:this.im}},me.prototype.toPolar=function(){return{r:this.abs(),phi:this.arg()}},me.prototype.format=function(e){var t="",r=this.im,n=this.re,a=Li(this.re,e),i=Li(this.im,e),o=Ze(e)?e:e?e.precision:null;if(o!==null){var s=Math.pow(10,-o);Math.abs(n/r)<s&&(n=0),Math.abs(r/n)<s&&(r=0)}return r===0?t=a:n===0?r===1?t="i":r===-1?t="-i":t=i+"i":r<0?r===-1?t=a+" - i":t=a+" - "+i.substring(1)+"i":r===1?t=a+" + i":t=a+" + "+i+"i",t},me.fromPolar=function(e){switch(arguments.length){case 1:{var t=arguments[0];if(typeof t=="object")return me(t);throw new TypeError("Input has to be an object with r and phi keys.")}case 2:{var r=arguments[0],n=arguments[1];if(Ze(r)){if(Nn(n)&&n.hasBase("ANGLE")&&(n=n.toNumber("rad")),Ze(n))return new me({r,phi:n});throw new TypeError("Phi is not a number nor an angle unit.")}else throw new TypeError("Radius r is not a number.")}default:throw new SyntaxError("Wrong number of arguments in function fromPolar")}},me.prototype.valueOf=me.prototype.toString,me.fromJSON=function(e){return new me(e)},me.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},me),{isClass:!0});typeof BigInt>"u"&&(BigInt=function(e){if(isNaN(e))throw new Error("");return e});const Ie=BigInt(0),nt=BigInt(1),js=BigInt(2),Tm=BigInt(5),Qr=BigInt(10),x8=2e3,Pe={s:nt,n:Ie,d:nt};function ba(e,t){try{e=BigInt(e)}catch{throw Ua()}return e*t}function In(e){return typeof e=="bigint"?e:Math.floor(e)}function Lt(e,t){if(t===Ie)throw gd();const r=Object.create(xn.prototype);r.s=e<Ie?-nt:nt,e=e<Ie?-e:e;const n=ki(e,t);return r.n=e/n,r.d=t/n,r}function xo(e){const t={};let r=e,n=js,a=Tm-nt;for(;a<=r;){for(;r%n===Ie;)r/=n,t[n]=(t[n]||Ie)+nt;a+=nt+js*n++}return r!==e?r>1&&(t[r]=(t[r]||Ie)+nt):t[e]=(t[e]||Ie)+nt,t}const hr=function(e,t){let r=Ie,n=nt,a=nt;if(e!=null)if(t!==void 0){if(typeof e=="bigint")r=e;else{if(isNaN(e))throw Ua();if(e%1!==0)throw Xg();r=BigInt(e)}if(typeof t=="bigint")n=t;else{if(isNaN(t))throw Ua();if(t%1!==0)throw Xg();n=BigInt(t)}a=r*n}else if(typeof e=="object"){if("d"in e&&"n"in e)r=BigInt(e.n),n=BigInt(e.d),"s"in e&&(r*=BigInt(e.s));else if(0 in e)r=BigInt(e[0]),1 in e&&(n=BigInt(e[1]));else if(typeof e=="bigint")r=e;else throw Ua();a=r*n}else if(typeof e=="number"){if(isNaN(e))throw Ua();if(e<0&&(a=-nt,e=-e),e%1===0)r=BigInt(e);else{let i=1,o=0,s=1,u=1,l=1,c=1e7;for(e>=1&&(i=10**Math.floor(1+Math.log10(e)),e/=i);s<=c&&l<=c;){let f=(o+u)/(s+l);if(e===f){s+l<=c?(r=o+u,n=s+l):l>s?(r=u,n=l):(r=o,n=s);break}else e>f?(o+=u,s+=l):(u+=o,l+=s),s>c?(r=u,n=l):(r=o,n=s)}r=BigInt(r)*BigInt(i),n=BigInt(n)}}else if(typeof e=="string"){let i=0,o=Ie,s=Ie,u=Ie,l=nt,c=nt,f=e.replace(/_/g,"").match(/\d+|./g);if(f===null)throw Ua();if(f[i]==="-"?(a=-nt,i++):f[i]==="+"&&i++,f.length===i+1?s=ba(f[i++],a):f[i+1]==="."||f[i]==="."?(f[i]!=="."&&(o=ba(f[i++],a)),i++,(i+1===f.length||f[i+1]==="("&&f[i+3]===")"||f[i+1]==="'"&&f[i+3]==="'")&&(s=ba(f[i],a),l=Qr**BigInt(f[i].length),i++),(f[i]==="("&&f[i+2]===")"||f[i]==="'"&&f[i+2]==="'")&&(u=ba(f[i+1],a),c=Qr**BigInt(f[i+1].length)-nt,i+=3)):f[i+1]==="/"||f[i+1]===":"?(s=ba(f[i],a),l=ba(f[i+2],nt),i+=3):f[i+3]==="/"&&f[i+1]===" "&&(o=ba(f[i],a),s=ba(f[i+2],a),l=ba(f[i+4],nt),i+=5),f.length<=i)n=l*c,a=r=u+n*o+c*s;else throw Ua()}else if(typeof e=="bigint")r=e,a=e,n=nt;else throw Ua();if(n===Ie)throw gd();Pe.s=a<Ie?-nt:nt,Pe.n=r<Ie?-r:r,Pe.d=n<Ie?-n:n};function D8(e,t,r){let n=nt;for(;t>Ie;e=e*e%r,t>>=nt)t&nt&&(n=n*e%r);return n}function N8(e,t){for(;t%js===Ie;t/=js);for(;t%Tm===Ie;t/=Tm);if(t===nt)return Ie;let r=Qr%t,n=1;for(;r!==nt;n++)if(r=r*Qr%t,n>x8)return Ie;return BigInt(n)}function A8(e,t,r){let n=nt,a=D8(Qr,r,t);for(let i=0;i<300;i++){if(n===a)return BigInt(i);n=n*Qr%t,a=a*Qr%t}return 0}function ki(e,t){if(!e)return t;if(!t)return e;for(;;){if(e%=t,!e)return t;if(t%=e,!t)return e}}function xn(e,t){if(hr(e,t),this instanceof xn)e=ki(Pe.d,Pe.n),this.s=Pe.s,this.n=Pe.n/e,this.d=Pe.d/e;else return Lt(Pe.s*Pe.n,Pe.d)}var gd=function(){return new Error("Division by Zero")},Ua=function(){return new Error("Invalid argument")},Xg=function(){return new Error("Parameters must be integer")};xn.prototype={s:nt,n:Ie,d:nt,abs:function(){return Lt(this.n,this.d)},neg:function(){return Lt(-this.s*this.n,this.d)},add:function(e,t){return hr(e,t),Lt(this.s*this.n*Pe.d+Pe.s*this.d*Pe.n,this.d*Pe.d)},sub:function(e,t){return hr(e,t),Lt(this.s*this.n*Pe.d-Pe.s*this.d*Pe.n,this.d*Pe.d)},mul:function(e,t){return hr(e,t),Lt(this.s*Pe.s*this.n*Pe.n,this.d*Pe.d)},div:function(e,t){return hr(e,t),Lt(this.s*Pe.s*this.n*Pe.d,this.d*Pe.n)},clone:function(){return Lt(this.s*this.n,this.d)},mod:function(e,t){if(e===void 0)return Lt(this.s*this.n%this.d,nt);if(hr(e,t),Ie===Pe.n*this.d)throw gd();return Lt(this.s*(Pe.d*this.n)%(Pe.n*this.d),Pe.d*this.d)},gcd:function(e,t){return hr(e,t),Lt(ki(Pe.n,this.n)*ki(Pe.d,this.d),Pe.d*this.d)},lcm:function(e,t){return hr(e,t),Pe.n===Ie&&this.n===Ie?Lt(Ie,nt):Lt(Pe.n*this.n,ki(Pe.n,this.n)*ki(Pe.d,this.d))},inverse:function(){return Lt(this.s*this.d,this.n)},pow:function(e,t){if(hr(e,t),Pe.d===nt)return Pe.s<Ie?Lt((this.s*this.d)**Pe.n,this.n**Pe.n):Lt((this.s*this.n)**Pe.n,this.d**Pe.n);if(this.s<Ie)return null;let r=xo(this.n),n=xo(this.d),a=nt,i=nt;for(let o in r)if(o!=="1"){if(o==="0"){a=Ie;break}if(r[o]*=Pe.n,r[o]%Pe.d===Ie)r[o]/=Pe.d;else return null;a*=BigInt(o)**r[o]}for(let o in n)if(o!=="1"){if(n[o]*=Pe.n,n[o]%Pe.d===Ie)n[o]/=Pe.d;else return null;i*=BigInt(o)**n[o]}return Pe.s<Ie?Lt(i,a):Lt(a,i)},log:function(e,t){if(hr(e,t),this.s<=Ie||Pe.s<=Ie)return null;const r={},n=xo(Pe.n),a=xo(Pe.d),i=xo(this.n),o=xo(this.d);for(const l in a)n[l]=(n[l]||Ie)-a[l];for(const l in o)i[l]=(i[l]||Ie)-o[l];for(const l in n)l!=="1"&&(r[l]=!0);for(const l in i)l!=="1"&&(r[l]=!0);let s=null,u=null;for(const l in r){const c=n[l]||Ie,f=i[l]||Ie;if(c===Ie){if(f!==Ie)return null;continue}let m=f,d=c;const p=ki(m,d);if(m/=p,d/=p,s===null&&u===null)s=m,u=d;else if(m*u!==s*d)return null}return s!==null&&u!==null?Lt(s,u):null},equals:function(e,t){return hr(e,t),this.s*this.n*Pe.d===Pe.s*Pe.n*this.d},lt:function(e,t){return hr(e,t),this.s*this.n*Pe.d<Pe.s*Pe.n*this.d},lte:function(e,t){return hr(e,t),this.s*this.n*Pe.d<=Pe.s*Pe.n*this.d},gt:function(e,t){return hr(e,t),this.s*this.n*Pe.d>Pe.s*Pe.n*this.d},gte:function(e,t){return hr(e,t),this.s*this.n*Pe.d>=Pe.s*Pe.n*this.d},compare:function(e,t){hr(e,t);let r=this.s*this.n*Pe.d-Pe.s*Pe.n*this.d;return(Ie<r)-(r<Ie)},ceil:function(e){return e=Qr**BigInt(e||0),Lt(In(this.s*e*this.n/this.d)+(e*this.n%this.d>Ie&&this.s>=Ie?nt:Ie),e)},floor:function(e){return e=Qr**BigInt(e||0),Lt(In(this.s*e*this.n/this.d)-(e*this.n%this.d>Ie&&this.s<Ie?nt:Ie),e)},round:function(e){return e=Qr**BigInt(e||0),Lt(In(this.s*e*this.n/this.d)+this.s*((this.s>=Ie?nt:Ie)+js*(e*this.n%this.d)>this.d?nt:Ie),e)},roundTo:function(e,t){hr(e,t);const r=this.n*Pe.d,n=this.d*Pe.n,a=r%n;let i=In(r/n);return a+a>=n&&i++,Lt(this.s*i*Pe.n,Pe.d)},divisible:function(e,t){return hr(e,t),!(!(Pe.n*this.d)||this.n*Pe.d%(Pe.n*this.d))},valueOf:function(){return Number(this.s*this.n)/Number(this.d)},toString:function(e){let t=this.n,r=this.d;e=e||15;let n=N8(t,r),a=A8(t,r,n),i=this.s<Ie?"-":"";if(i+=In(t/r),t%=r,t*=Qr,t&&(i+="."),n){for(let o=a;o--;)i+=In(t/r),t%=r,t*=Qr;i+="(";for(let o=n;o--;)i+=In(t/r),t%=r,t*=Qr;i+=")"}else for(let o=e;t&&o--;)i+=In(t/r),t%=r,t*=Qr;return i},toFraction:function(e){let t=this.n,r=this.d,n=this.s<Ie?"-":"";if(r===nt)n+=t;else{let a=In(t/r);e&&a>Ie&&(n+=a,n+=" ",t%=r),n+=t,n+="/",n+=r}return n},toLatex:function(e){let t=this.n,r=this.d,n=this.s<Ie?"-":"";if(r===nt)n+=t;else{let a=In(t/r);e&&a>Ie&&(n+=a,t%=r),n+="\\frac{",n+=t,n+="}{",n+=r,n+="}"}return n},toContinued:function(){let e=this.n,t=this.d,r=[];do{r.push(In(e/t));let n=e%t;e=t,t=n}while(e!==nt);return r},simplify:function(e){const t=BigInt(1/(e||.001)|0),r=this.abs(),n=r.toContinued();for(let a=1;a<n.length;a++){let i=Lt(n[a-1],nt);for(let s=a-2;s>=0;s--)i=i.inverse().add(n[s]);let o=i.sub(r);if(o.n*t<o.d)return i.mul(this.s)}return this}};var C8="Fraction",E8=[],S8=B(C8,E8,()=>(Object.defineProperty(xn,"name",{value:"Fraction"}),xn.prototype.constructor=xn,xn.prototype.type="Fraction",xn.prototype.isFraction=!0,xn.prototype.toJSON=function(){return{mathjs:"Fraction",n:String(this.s*this.n),d:String(this.d)}},xn.fromJSON=function(e){return new xn(e)},xn),{isClass:!0}),M8="Range",T8=[],F8=B(M8,T8,()=>{function e(t,r,n){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator");var a=t!=null,i=r!=null,o=n!=null;if(a){if(Qe(t))t=t.toNumber();else if(typeof t!="number"&&!Ms(t))throw new TypeError("Parameter start must be a number or bigint")}if(i){if(Qe(r))r=r.toNumber();else if(typeof r!="number"&&!Ms(r))throw new TypeError("Parameter end must be a number or bigint")}if(o){if(Qe(n))n=n.toNumber();else if(typeof n!="number"&&!Ms(n))throw new TypeError("Parameter step must be a number or bigint")}this.start=a?parseFloat(t):0,this.end=i?parseFloat(r):0,this.step=o?parseFloat(n):1}return e.prototype.type="Range",e.prototype.isRange=!0,e.parse=function(t){if(typeof t!="string")return null;var r=t.split(":"),n=r.map(function(i){return parseFloat(i)}),a=n.some(function(i){return isNaN(i)});if(a)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 t=0,r=this.start,n=this.step,a=this.end,i=a-r;return Xa(n)===Xa(i)?t=Math.ceil(i/n):i===0&&(t=0),isNaN(t)&&(t=0),[t]},e.prototype.min=function(){var t=this.size()[0];if(t>0)return this.step>0?this.start:this.start+(t-1)*this.step},e.prototype.max=function(){var t=this.size()[0];if(t>0)return this.step>0?this.start+(t-1)*this.step:this.start},e.prototype.forEach=function(t){var r=this.start,n=this.step,a=this.end,i=0;if(n>0)for(;r<a;)t(r,[i],this),r+=n,i++;else if(n<0)for(;r>a;)t(r,[i],this),r+=n,i++},e.prototype.map=function(t){var r=[];return this.forEach(function(n,a,i){r[a[0]]=t(n,a,i)}),r},e.prototype.toArray=function(){var t=[];return this.forEach(function(r,n){t[n[0]]=r}),t},e.prototype.valueOf=function(){return this.toArray()},e.prototype.format=function(t){var r=Li(this.start,t);return this.step!==1&&(r+=":"+Li(this.step,t)),r+=":"+Li(this.end,t),r},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}),P8="Matrix",k8=[],O8=B(P8,k8,()=>{function e(){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator")}return e.prototype.type="Matrix",e.prototype.isMatrix=!0,e.prototype.storage=function(){throw new Error("Cannot invoke storage on a Matrix interface")},e.prototype.datatype=function(){throw new Error("Cannot invoke datatype on a Matrix interface")},e.prototype.create=function(t,r){throw new Error("Cannot invoke create on a Matrix interface")},e.prototype.subset=function(t,r,n){throw new Error("Cannot invoke subset on a Matrix interface")},e.prototype.get=function(t){throw new Error("Cannot invoke get on a Matrix interface")},e.prototype.set=function(t,r,n){throw new Error("Cannot invoke set on a Matrix interface")},e.prototype.resize=function(t,r){throw new Error("Cannot invoke resize on a Matrix interface")},e.prototype.reshape=function(t,r){throw new Error("Cannot invoke reshape on a Matrix interface")},e.prototype.clone=function(){throw new Error("Cannot invoke clone on a Matrix interface")},e.prototype.size=function(){throw new Error("Cannot invoke size on a Matrix interface")},e.prototype.map=function(t,r){throw new Error("Cannot invoke map on a Matrix interface")},e.prototype.forEach=function(t){throw new Error("Cannot invoke forEach on a Matrix interface")},e.prototype[Symbol.iterator]=function(){throw new Error("Cannot iterate a Matrix interface")},e.prototype.toArray=function(){throw new Error("Cannot invoke toArray on a Matrix interface")},e.prototype.valueOf=function(){throw new Error("Cannot invoke valueOf on a Matrix interface")},e.prototype.format=function(t){throw new Error("Cannot invoke format on a Matrix interface")},e.prototype.toString=function(){throw new Error("Cannot invoke toString on a Matrix interface")},e},{isClass:!0});function Sf(e,t,r){var n=e.constructor,a=new n(2),i="";if(r){if(r<1)throw new Error("size must be in greater than 0");if(!$e(r))throw new Error("size must be an integer");if(e.greaterThan(a.pow(r-1).sub(1))||e.lessThan(a.pow(r-1).mul(-1)))throw new Error("Value must be in range [-2^".concat(r-1,", 2^").concat(r-1,"-1]"));if(!e.isInteger())throw new Error("Value must be an integer");e.lessThan(0)&&(e=e.add(a.pow(r))),i="i".concat(r)}switch(t){case 2:return"".concat(e.toBinary()).concat(i);case 8:return"".concat(e.toOctal()).concat(i);case 16:return"".concat(e.toHexadecimal()).concat(i);default:throw new Error("Base ".concat(t," not supported "))}}function $8(e,t){if(typeof t=="function")return t(e);if(!e.isFinite())return e.isNaN()?"NaN":e.gt(0)?"Infinity":"-Infinity";var{notation:r,precision:n,wordSize:a}=Kw(t);switch(r){case"fixed":return B8(e,n);case"exponential":return e0(e,n);case"engineering":return _8(e,n);case"bin":return Sf(e,2,a);case"oct":return Sf(e,8,a);case"hex":return Sf(e,16,a);case"auto":{var i=t0(t==null?void 0:t.lowerExp,-3),o=t0(t==null?void 0:t.upperExp,5);if(e.isZero())return"0";var s,u=e.toSignificantDigits(n),l=u.e;return l>=i&&l<o?s=u.toFixed():s=e0(e,n),s.replace(/((\.\d*?)(0+))($|e)/,function(){var c=arguments[2],f=arguments[4];return c!=="."?c+f:f})}default:throw new Error('Unknown notation "'+r+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function _8(e,t){var r=e.e,n=r%3===0?r:r<0?r-3-r%3:r-r%3,a=e.mul(Math.pow(10,-n)),i=a.toPrecision(t);if(i.includes("e")){var o=e.constructor;i=new o(i).toFixed()}return i+"e"+(r>=0?"+":"")+n.toString()}function e0(e,t){return t!==void 0?e.toExponential(t-1):e.toExponential()}function B8(e,t){return e.toFixed(t)}function t0(e,t){return Ze(e)?e:Qe(e)?e.toNumber():t}function I8(e,t){var r=e.length-t.length,n=e.length;return e.substring(r,n)===t}function at(e,t){var r=z8(e,t);return t&&typeof t=="object"&&"truncate"in t&&r.length>t.truncate?r.substring(0,t.truncate-3)+"...":r}function z8(e,t){if(typeof e=="number")return Li(e,t);if(Qe(e))return $8(e,t);if(j8(e))return!t||t.fraction!=="decimal"?"".concat(e.s*e.n,"/").concat(e.d):e.toString();if(Array.isArray(e))return cx(e,t);if(Pr(e))return ko(e);if(typeof e=="function")return e.syntax?String(e.syntax):"function";if(e&&typeof e=="object"){if(typeof e.format=="function")return e.format(t);if(e&&e.toString(t)!=={}.toString())return e.toString(t);var r=Object.keys(e).map(n=>ko(n)+": "+at(e[n],t));return"{"+r.join(", ")+"}"}return String(e)}function ko(e){for(var t=String(e),r="",n=0;n<t.length;){var a=t.charAt(n);r+=a in r0?r0[a]:a,n++}return'"'+r+'"'}var r0={'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"};function Cn(e){var t=String(e);return t=t.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">"),t}function cx(e,t){if(Array.isArray(e)){for(var r="[",n=e.length,a=0;a<n;a++)a!==0&&(r+=", "),r+=cx(e[a],t);return r+="]",r}else return at(e,t)}function j8(e){return e&&typeof e=="object"&&typeof e.s=="bigint"&&typeof e.n=="bigint"&&typeof e.d=="bigint"||!1}function Fm(e,t){if(!Pr(e))throw new TypeError("Unexpected type of argument in function compareText (expected: string or Array or Matrix, actual: "+Mt(e)+", index: 0)");if(!Pr(t))throw new TypeError("Unexpected type of argument in function compareText (expected: string or Array or Matrix, actual: "+Mt(t)+", index: 1)");return e===t?0:e>t?1:-1}function it(e,t,r){if(!(this instanceof it))throw new SyntaxError("Constructor must be called with the new operator");this.actual=e,this.expected=t,this.relation=r,this.message="Dimension mismatch ("+(Array.isArray(e)?"["+e.join(", ")+"]":e)+" "+(this.relation||"!=")+" "+(Array.isArray(t)?"["+t.join(", ")+"]":t)+")",this.stack=new Error().stack}it.prototype=new RangeError;it.prototype.constructor=RangeError;it.prototype.name="DimensionError";it.prototype.isDimensionError=!0;function Wn(e,t,r){if(!(this instanceof Wn))throw new 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=r),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=new Error().stack}Wn.prototype=new RangeError;Wn.prototype.constructor=RangeError;Wn.prototype.name="IndexError";Wn.prototype.isIndexError=!0;function Ve(e){for(var t=[];Array.isArray(e);)t.push(e.length),e=e[0];return t}function fx(e,t,r){var n,a=e.length;if(a!==t[r])throw new it(a,t[r]);if(r<t.length-1){var i=r+1;for(n=0;n<a;n++){var o=e[n];if(!Array.isArray(o))throw new it(t.length-1,t.length,"<");fx(e[n],t,i)}}else for(n=0;n<a;n++)if(Array.isArray(e[n]))throw new it(t.length+1,t.length,">")}function n0(e,t){var r=t.length===0;if(r){if(Array.isArray(e))throw new it(e.length,0)}else fx(e,t,0)}function Rl(e,t){var r=e.isMatrix?e._size:Ve(e),n=t._sourceSize;n.forEach((a,i)=>{if(a!==null&&a!==r[i])throw new it(a,r[i])})}function kt(e,t){if(e!==void 0){if(!Ze(e)||!$e(e))throw new TypeError("Index must be an integer (value: "+e+")");if(e<0||typeof t=="number"&&e>=t)throw new Wn(e,t)}}function Ro(e){for(var t=0;t<e._dimensions.length;++t){var r=e._dimensions[t];if(r._data&&Et(r._data)){if(r._size[0]===0)return!0}else if(r.isRange){if(r.start===r.end)return!0}else if(Pr(r)&&r.length===0)return!0}return!1}function Lo(e,t,r){if(!Array.isArray(t))throw new TypeError("Array expected");if(t.length===0)throw new Error("Resizing to scalar is not supported");t.forEach(function(a){if(!Ze(a)||!$e(a)||a<0)throw new TypeError("Invalid size, must contain positive integers (size: "+at(t)+")")}),(Ze(e)||Qe(e))&&(e=[e]);var n=r!==void 0?r:0;return Pm(e,t,0,n),e}function Pm(e,t,r,n){var a,i,o=e.length,s=t[r],u=Math.min(o,s);if(e.length=s,r<t.length-1){var l=r+1;for(a=0;a<u;a++)i=e[a],Array.isArray(i)||(i=[i],e[a]=i),Pm(i,t,l,n);for(a=u;a<s;a++)i=[],e[a]=i,Pm(i,t,l,n)}else{for(a=0;a<u;a++)for(;Array.isArray(e[a]);)e[a]=e[a][0];for(a=u;a<s;a++)e[a]=n}}function vd(e,t){var r=mt(e,!0),n=r.length;if(!Array.isArray(e)||!Array.isArray(t))throw new TypeError("Array expected");if(t.length===0)throw new it(0,n,"!=");t=yd(t,n);var a=mx(t);if(n!==a)throw new it(a,n,"!=");try{return q8(r,t)}catch(i){throw i instanceof it?new it(a,n,"!="):i}}function yd(e,t){var r=mx(e),n=e.slice(),a=-1,i=e.indexOf(a),o=e.indexOf(a,i+1)>=0;if(o)throw new Error("More than one wildcard in sizes");var s=i>=0,u=t%r===0;if(s)if(u)n[i]=-t/r;else throw new Error("Could not replace wildcard, since "+t+" is no multiple of "+-r);return n}function mx(e){return e.reduce((t,r)=>t*r,1)}function q8(e,t){for(var r=e,n,a=t.length-1;a>0;a--){var i=t[a];n=[];for(var o=r.length/i,s=0;s<o;s++)n.push(r.slice(s*i,(s+1)*i));r=n}return r}function Ll(e,t){for(var r=Ve(e);Array.isArray(e)&&e.length===1;)e=e[0],r.shift();for(var n=r.length;r[n-1]===1;)n--;return n<r.length&&(e=dx(e,n,0),r.length=n),e}function dx(e,t,r){var n,a;if(r<t){var i=r+1;for(n=0,a=e.length;n<a;n++)e[n]=dx(e[n],t,i)}else for(;Array.isArray(e);)e=e[0];return e}function hx(e,t,r,n){var a=n||Ve(e);if(r)for(var i=0;i<r;i++)e=[e],a.unshift(1);for(e=px(e,t,0);a.length<t;)a.push(1);return e}function px(e,t,r){var n,a;if(Array.isArray(e)){var i=r+1;for(n=0,a=e.length;n<a;n++)e[n]=px(e[n],t,i)}else for(var o=r;o<t;o++)e=[e];return e}function mt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!Array.isArray(e))return e;if(typeof t!="boolean")throw new TypeError("Boolean expected for second argument of flatten");var r=[];return t?a(e):n(e),r;function n(i){for(var o=0;o<i.length;o++){var s=i[o];Array.isArray(s)?n(s):r.push(s)}}function a(i){if(Array.isArray(i[0]))for(var o=0;o<i.length;o++)a(i[o]);else for(var s=0;s<i.length;s++)r.push(i[s])}}function ni(e,t){return Array.prototype.map.call(e,t)}function gx(e,t){Array.prototype.forEach.call(e,t)}function a0(e,t){if(Ve(e).length!==1)throw new Error("Only one dimensional matrices supported");return Array.prototype.filter.call(e,t)}function i0(e,t){if(Ve(e).length!==1)throw new Error("Only one dimensional matrices supported");return Array.prototype.filter.call(e,r=>t.test(r))}function o0(e,t){return Array.prototype.join.call(e,t)}function Ho(e){if(!Array.isArray(e))throw new TypeError("Array input expected");if(e.length===0)return e;var t=[],r=0;t[0]={value:e[0],identifier:0};for(var n=1;n<e.length;n++)e[n]===e[n-1]?r++:r=0,t.push({value:e[n],identifier:r});return t}function Hl(e){if(!Array.isArray(e))throw new TypeError("Array input expected");if(e.length===0)return e;for(var t=[],r=0;r<e.length;r++)t.push(e[r].value);return t}function yc(e,t){for(var r,n=0,a=0;a<e.length;a++){var i=e[a],o=Array.isArray(i);if(a===0&&o&&(n=i.length),o&&i.length!==n)return;var s=o?yc(i,t):t(i);if(r===void 0)r=s;else if(r!==s)return"mixed"}return r}function vx(e,t,r,n){if(n<r){if(e.length!==t.length)throw new it(e.length,t.length);for(var a=[],i=0;i<e.length;i++)a[i]=vx(e[i],t[i],r,n+1);return a}else return e.concat(t)}function yx(){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(r,n){return vx(r,n,t,0)},e[0]);throw new Error("Wrong number of arguments in function concat")}function bd(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];for(var n=t.map(m=>m.length),a=Math.max(...n),i=new Array(a).fill(null),o=0;o<t.length;o++)for(var s=t[o],u=n[o],l=0;l<u;l++){var c=a-u+l;s[l]>i[c]&&(i[c]=s[l])}for(var f=0;f<t.length;f++)bx(t[f],i);return i}function bx(e,t){for(var r=t.length,n=e.length,a=0;a<n;a++){var i=r-n+a;if(e[a]<t[i]&&e[a]>1||e[a]>t[i])throw new Error("shape mismatch: mismatch is found in arg with shape (".concat(e,") not possible to broadcast dimension ").concat(n," with size ").concat(e[a]," to size ").concat(t[i]))}}function qi(e,t){var r=Ve(e);if(Ba(r,t))return e;bx(r,t);var n=bd(r,t),a=n.length,i=[...Array(a-r.length).fill(1),...r],o=L8(e);r.length<a&&(o=vd(o,i),r=Ve(o));for(var s=0;s<a;s++)r[s]<n[s]&&(o=R8(o,n[s],s),r=Ve(o));return o}function R8(e,t,r){return yx(...Array(t).fill(e),r)}function wd(e,t){if(!Array.isArray(e))throw new Error("Array expected");var r=Ve(e);if(t.length!==r.length)throw new it(t.length,r.length);for(var n=0;n<t.length;n++)kt(t[n],r[n]);return t.reduce((a,i)=>a[i],e)}function km(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(e.length===0)return[];if(r)return i(e);var n=[];return a(e,0);function a(o,s){if(Array.isArray(o)){for(var u=o.length,l=Array(u),c=0;c<u;c++)n[s]=c,l[c]=a(o[c],s+1);return l}else return t(o,n.slice(0,s),e)}function i(o){if(Array.isArray(o)){for(var s=o.length,u=Array(s),l=0;l<s;l++)u[l]=i(o[l]);return u}else return t(o)}}function wx(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(e.length===0)return;if(r){i(e);return}var n=[];a(e,0);function a(o,s){if(Array.isArray(o))for(var u=o.length,l=0;l<u;l++)n[s]=l,a(o[l],s+1);else t(o,n.slice(0,s),e)}function i(o){if(Array.isArray(o))for(var s=o.length,u=0;u<s;u++)i(o[u]);else t(o)}}function L8(e){return ar([],e)}function Ji(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(Il.isTypedFunction(e)){var a;if(n)a=1;else{var i=(t.isMatrix?t.size():Ve(t)).map(()=>0),o=t.isMatrix?t.get(i):wd(t,i);a=V8(e,o,i,t)}var s;if(t.isMatrix&&t.dataType!=="mixed"&&t.dataType!==void 0){var u=H8(e,a);s=u!==void 0?u:e}else s=e;return a>=1&&a<=3?{isUnary:a===1,fn:function(){for(var c=arguments.length,f=new Array(c),m=0;m<c;m++)f[m]=arguments[m];return s0(s,f.slice(0,a),r,e.name)}}:{isUnary:!1,fn:function(){for(var c=arguments.length,f=new Array(c),m=0;m<c;m++)f[m]=arguments[m];return s0(s,f,r,e.name)}}}return n===void 0?{isUnary:G8(e),fn:e}:{isUnary:n,fn:e}}function H8(e,t){var r=[];if(Object.entries(e.signatures).forEach(n=>{var[a,i]=n;a.split(",").length===t&&r.push(i)}),r.length===1)return r[0]}function G8(e){if(e.length!==1)return!1;var t=e.toString();if(/arguments/.test(t))return!1;var r=t.match(/\(.*?\)/);return!/\.\.\./.test(r)}function V8(e,t,r,n){for(var a=[t,r,n],i=3;i>0;i--){var o=a.slice(0,i);if(Il.resolve(e,o)!==null)return i}}function s0(e,t,r,n){try{return e(...t)}catch(a){U8(a,t,r,n)}}function U8(e,t,r,n){var a;if(e instanceof TypeError&&((a=e.data)===null||a===void 0?void 0:a.category)==="wrongType"){var i=[];throw i.push("value: ".concat(Mt(t[0]))),t.length>=2&&i.push("index: ".concat(Mt(t[1]))),t.length>=3&&i.push("array: ".concat(Mt(t[2]))),new TypeError("Function ".concat(r," cannot apply callback arguments ")+"".concat(n,"(").concat(i.join(", "),") at index ").concat(JSON.stringify(t[1])))}else throw new TypeError("Function ".concat(r," cannot apply callback arguments ")+"to function ".concat(n,": ").concat(e.message))}var W8="DenseMatrix",J8=["Matrix"],K8=B(W8,J8,e=>{var{Matrix:t}=e;function r(c,f){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");if(f&&!Pr(f))throw new Error("Invalid datatype: "+f);if(je(c))c.type==="DenseMatrix"?(this._data=Ue(c._data),this._size=Ue(c._size),this._datatype=f||c._datatype):(this._data=c.toArray(),this._size=c.size(),this._datatype=f||c._datatype);else if(c&&Et(c.data)&&Et(c.size))this._data=c.data,this._size=c.size,n0(this._data,this._size),this._datatype=f||c.datatype;else if(Et(c))this._data=l(c),this._size=Ve(this._data),n0(this._data,this._size),this._datatype=f;else{if(c)throw new TypeError("Unsupported type of data ("+Mt(c)+")");this._data=[],this._size=[0],this._datatype=f}}r.prototype=new t,r.prototype.createDenseMatrix=function(c,f){return new r(c,f)},Object.defineProperty(r,"name",{value:"DenseMatrix"}),r.prototype.constructor=r,r.prototype.type="DenseMatrix",r.prototype.isDenseMatrix=!0,r.prototype.getDataType=function(){return yc(this._data,Mt)},r.prototype.storage=function(){return"dense"},r.prototype.datatype=function(){return this._datatype},r.prototype.create=function(c,f){return new r(c,f)},r.prototype.subset=function(c,f,m){switch(arguments.length){case 1:return n(this,c);case 2:case 3:return i(this,c,f,m);default:throw new SyntaxError("Wrong number of arguments")}},r.prototype.get=function(c){return wd(this._data,c)},r.prototype.set=function(c,f,m){if(!Et(c))throw new TypeError("Array expected");if(c.length<this._size.length)throw new it(c.length,this._size.length,"<");var d,p,h,y=c.map(function(D){return D+1});u(this,y,m);var b=this._data;for(d=0,p=c.length-1;d<p;d++)h=c[d],kt(h,b.length),b=b[h];return h=c[c.length-1],kt(h,b.length),b[h]=f,this};function n(c,f){if(!fc(f))throw new TypeError("Invalid index");var m=f.isScalar();if(m)return c.get(f.min());var d=f.size();if(d.length!==c._size.length)throw new it(d.length,c._size.length);for(var p=f.min(),h=f.max(),y=0,b=c._size.length;y<b;y++)kt(p[y],c._size[y]),kt(h[y],c._size[y]);var D=new r([]),g=a(c._data,f);return D._size=g.size,D._datatype=c._datatype,D._data=g.data,D}function a(c,f){var m=f.size().length-1,d=Array(m);return{data:p(c),size:d};function p(h){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,b=f.dimension(y);return d[y]=b.size()[0],y<m?b.map(D=>(kt(D,h.length),p(h[D],y+1))).valueOf():b.map(D=>(kt(D,h.length),h[D])).valueOf()}}function i(c,f,m,d){if(!f||f.isIndex!==!0)throw new TypeError("Invalid index");var p=f.size(),h=f.isScalar(),y;if(je(m)?(y=m.size(),m=m.valueOf()):y=Ve(m),h){if(y.length!==0)throw new TypeError("Scalar expected");c.set(f.min(),m,d)}else{if(!Ba(y,p))try{y.length===0?m=qi([m],p):m=qi(m,p),y=Ve(m)}catch{}if(p.length<c._size.length)throw new it(p.length,c._size.length,"<");if(y.length<p.length){for(var b=0,D=0;p[b]===1&&y[b]===1;)b++;for(;p[b]===1;)D++,b++;m=hx(m,p.length,D,y)}if(!Ba(p,y))throw new it(p,y,">");var g=f.max().map(function(x){return x+1});u(c,g,d),o(c._data,f,m)}return c}function o(c,f,m){var d=f.size().length-1;p(c,m);function p(h,y){var b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,D=f.dimension(b);b<d?D.forEach((g,x)=>{kt(g,h.length),p(h[g],y[x[0]],b+1)}):D.forEach((g,x)=>{kt(g,h.length),h[g]=y[x[0]]})}}r.prototype.resize=function(c,f,m){if(!Mn(c))throw new TypeError("Array or Matrix expected");var d=c.valueOf().map(h=>Array.isArray(h)&&h.length===1?h[0]:h),p=m?this.clone():this;return s(p,d,f)};function s(c,f,m){if(f.length===0){for(var d=c._data;Et(d);)d=d[0];return d}return c._size=f.slice(0),c._data=Lo(c._data,c._size,m),c}r.prototype.reshape=function(c,f){var m=f?this.clone():this;m._data=vd(m._data,c);var d=m._size.reduce((p,h)=>p*h);return m._size=yd(c,d),m};function u(c,f,m){for(var d=c._size.slice(0),p=!1;d.length<f.length;)d.push(0),p=!0;for(var h=0,y=f.length;h<y;h++)f[h]>d[h]&&(d[h]=f[h],p=!0);p&&s(c,d,m)}r.prototype.clone=function(){var c=new r({data:Ue(this._data),size:Ue(this._size),datatype:this._datatype});return c},r.prototype.size=function(){return this._size.slice(0)},r.prototype.map=function(c){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,m=this,d=m._size.length-1;if(d<0)return m.clone();var p=Ji(c,m,"map",f),h=p.fn,y=m.create(void 0,m._datatype);if(y._size=m._size,f||p.isUnary)return y._data=v(m._data),y;if(d===0){for(var b=m.valueOf(),D=Array(b.length),g=0;g<b.length;g++)D[g]=h(b[g],[g],m);return y._data=D,y}var x=[];return y._data=w(m._data),y;function w(A){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,N=Array(A.length);if(C<d)for(var E=0;E<A.length;E++)x[C]=E,N[E]=w(A[E],C+1);else for(var S=0;S<A.length;S++)x[C]=S,N[S]=h(A[S],x.slice(),m);return N}function v(A){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,N=Array(A.length);if(C<d)for(var E=0;E<A.length;E++)N[E]=v(A[E],C+1);else for(var S=0;S<A.length;S++)N[S]=h(A[S]);return N}},r.prototype.forEach=function(c){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,m=this,d=m._size.length-1;if(d<0)return;var p=Ji(c,m,"map",f),h=p.fn;if(f||p.isUnary){g(m._data);return}if(d===0){for(var y=0;y<m._data.length;y++)h(m._data[y],[y],m);return}var b=[];D(m._data);function D(x){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(w<d)for(var v=0;v<x.length;v++)b[w]=v,D(x[v],w+1);else for(var A=0;A<x.length;A++)b[w]=A,h(x[A],b.slice(),m)}function g(x){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(w<d)for(var v=0;v<x.length;v++)g(x[v],w+1);else for(var A=0;A<x.length;A++)h(x[A])}},r.prototype[Symbol.iterator]=function*(){var c=this._size.length-1;if(!(c<0)){if(c===0){for(var f=0;f<this._data.length;f++)yield{value:this._data[f],index:[f]};return}var m=[],d=function*(h,y){if(y<c)for(var b=0;b<h.length;b++)m[y]=b,yield*d(h[b],y+1);else for(var D=0;D<h.length;D++)m[y]=D,yield{value:h[D],index:m.slice()}};yield*d(this._data,0)}},r.prototype.rows=function(){var c=[],f=this.size();if(f.length!==2)throw new TypeError("Rows can only be returned for a 2D matrix.");var m=this._data;for(var d of m)c.push(new r([d],this._datatype));return c},r.prototype.columns=function(){var c=this,f=[],m=this.size();if(m.length!==2)throw new TypeError("Rows can only be returned for a 2D matrix.");for(var d=this._data,p=function(b){var D=d.map(g=>[g[b]]);f.push(new r(D,c._datatype))},h=0;h<m[1];h++)p(h);return f},r.prototype.toArray=function(){return Ue(this._data)},r.prototype.valueOf=function(){return this._data},r.prototype.format=function(c){return at(this._data,c)},r.prototype.toString=function(){return at(this._data)},r.prototype.toJSON=function(){return{mathjs:"DenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},r.prototype.diagonal=function(c){if(c){if(Qe(c)&&(c=c.toNumber()),!Ze(c)||!$e(c))throw new TypeError("The parameter k must be an integer number")}else c=0;for(var f=c>0?c:0,m=c<0?-c:0,d=this._size[0],p=this._size[1],h=Math.min(d-m,p-f),y=[],b=0;b<h;b++)y[b]=this._data[b+m][b+f];return new r({data:y,size:[h],datatype:this._datatype})},r.diagonal=function(c,f,m,d){if(!Et(c))throw new TypeError("Array expected, size parameter");if(c.length!==2)throw new Error("Only two dimensions matrix are supported");if(c=c.map(function(A){if(Qe(A)&&(A=A.toNumber()),!Ze(A)||!$e(A)||A<1)throw new Error("Size values must be positive integers");return A}),m){if(Qe(m)&&(m=m.toNumber()),!Ze(m)||!$e(m))throw new TypeError("The parameter k must be an integer number")}else m=0;var p=m>0?m:0,h=m<0?-m:0,y=c[0],b=c[1],D=Math.min(y-h,b-p),g;if(Et(f)){if(f.length!==D)throw new Error("Invalid value array length");g=function(C){return f[C]}}else if(je(f)){var x=f.size();if(x.length!==1||x[0]!==D)throw new Error("Invalid matrix length");g=function(C){return f.get([C])}}else g=function(){return f};d||(d=Qe(g(0))?g(0).mul(0):0);var w=[];if(c.length>0){w=Lo(w,c,d);for(var v=0;v<D;v++)w[v+h][v+p]=g(v)}return new r({data:w,size:[y,b]})},r.fromJSON=function(c){return new r(c)},r.prototype.swapRows=function(c,f){if(!Ze(c)||!$e(c)||!Ze(f)||!$e(f))throw new Error("Row index must be positive integers");if(this._size.length!==2)throw new Error("Only two dimensional matrix is supported");return kt(c,this._size[0]),kt(f,this._size[0]),r._swapRows(c,f,this._data),this},r._swapRows=function(c,f,m){var d=m[c];m[c]=m[f],m[f]=d};function l(c){return je(c)?l(c.valueOf()):Et(c)?c.map(l):c}return r},{isClass:!0}),u0="clone",Y8=["typed"],Z8=B(u0,Y8,e=>{var{typed:t}=e;return t(u0,{any:Ue})});function xx(e){var t=e.length,r=e[0].length,n,a,i=[];for(a=0;a<r;a++){var o=[];for(n=0;n<t;n++)o.push(e[n][a]);i.push(o)}return i}function Zo(e){for(var t=0;t<e.length;t++)if(Mn(e[t]))return!0;return!1}function ci(e,t){je(e)?e.forEach(r=>t(r),!1,!0):wx(e,t,!0)}function Xe(e,t,r){if(!r)return je(e)?e.map(a=>t(a),!1,!0):km(e,t,!0);var n=a=>a===0?a:t(a);return je(e)?e.map(a=>n(a),!1,!0):km(e,n,!0)}function bc(e,t,r){var n=Array.isArray(e)?Ve(e):e.size();if(t<0||t>=n.length)throw new Wn(t,n.length);return je(e)?e.create(Gl(e.valueOf(),t,r),e.datatype()):Gl(e,t,r)}function Gl(e,t,r){var n,a,i,o;if(t<=0)if(Array.isArray(e[0])){for(o=xx(e),a=[],n=0;n<o.length;n++)a[n]=Gl(o[n],t-1,r);return a}else{for(i=e[0],n=1;n<e.length;n++)i=r(i,e[n]);return i}else{for(a=[],n=0;n<e.length;n++)a[n]=Gl(e[n],t-1,r);return a}}function l0(e,t,r,n,a,i,o,s,u,l,c){var f=e._values,m=e._index,d=e._ptr,p,h,y,b;if(n)for(h=d[t],y=d[t+1],p=h;p<y;p++)b=m[p],r[b]!==i?(r[b]=i,o.push(b),n[b]=f[p]):(n[b]=s(n[b],f[p]),a[b]=i);else for(h=d[t],y=d[t+1],p=h;p<y;p++)b=m[p],r[b]!==i?(r[b]=i,o.push(b)):a[b]=i}var c0="isInteger",Q8=["typed"],X8=B(c0,Q8,e=>{var{typed:t}=e;return t(c0,{number:$e,BigNumber:function(n){return n.isInt()},bigint:function(n){return!0},Fraction:function(n){return n.d===1n},"Array | Matrix":t.referToSelf(r=>n=>Xe(n,r))})}),Jn="number",Qo="number, number";function Dx(e){return Math.abs(e)}Dx.signature=Jn;function Nx(e,t){return e+t}Nx.signature=Qo;function Ax(e,t){return e-t}Ax.signature=Qo;function Cx(e,t){return e*t}Cx.signature=Qo;function Ex(e){return-e}Ex.signature=Jn;function Sx(e){return e}Sx.signature=Jn;function Ds(e){return r9(e)}Ds.signature=Jn;function Mx(e){return e*e*e}Mx.signature=Jn;function Tx(e){return Math.exp(e)}Tx.signature=Jn;function Fx(e){return n9(e)}Fx.signature=Jn;function Px(e,t){if(!$e(e)||!$e(t))throw new Error("Parameters in function lcm must be integer numbers");if(e===0||t===0)return 0;for(var r,n=e*t;t!==0;)r=t,t=e%r,e=r;return Math.abs(n/e)}Px.signature=Qo;function f0(e,t){return t?Math.log(e)/Math.log(t):Math.log(e)}function Vl(e){return e9(e)}Vl.signature=Jn;function Om(e){return X6(e)}Om.signature=Jn;function m0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2,r=t<0;if(r&&(t=-t),t===0)throw new Error("Root must be non-zero");if(e<0&&Math.abs(t)%2!==1)throw new Error("Root must be odd when a is negative.");if(e===0)return r?1/0:0;if(!isFinite(e))return r?0:e;var n=Math.pow(Math.abs(e),1/t);return n=e<0?-n:n,r?1/n:n}function $m(e){return Xa(e)}$m.signature=Jn;function kx(e){return e*e}kx.signature=Jn;function Ox(e,t){var r,n,a,i=0,o=1,s=1,u=0;if(!$e(e)||!$e(t))throw new Error("Parameters in function xgcd must be integer numbers");for(;t;)n=Math.floor(e/t),a=e-n*t,r=i,i=o-n*i,o=r,r=s,s=u-n*s,u=r,e=t,t=a;var l;return e<0?l=[-e,-o,-u]:l=[e,e?o:0,u],l}Ox.signature=Qo;function $x(e,t){return e*e<1&&t===1/0||e*e>1&&t===-1/0?0:Math.pow(e,t)}$x.signature=Qo;function bs(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(!$e(t)||t<0||t>15)throw new Error("Number of decimals in function round must be an integer from 0 to 15 inclusive");return parseFloat(Yw(e,t))}var eI="number",Xo="number, number";function _x(e,t){if(!$e(e)||!$e(t))throw new Error("Integers expected in function bitAnd");return e&t}_x.signature=Xo;function Bx(e){if(!$e(e))throw new Error("Integer expected in function bitNot");return~e}Bx.signature=eI;function Ix(e,t){if(!$e(e)||!$e(t))throw new Error("Integers expected in function bitOr");return e|t}Ix.signature=Xo;function zx(e,t){if(!$e(e)||!$e(t))throw new Error("Integers expected in function bitXor");return e^t}zx.signature=Xo;function jx(e,t){if(!$e(e)||!$e(t))throw new Error("Integers expected in function leftShift");return e<<t}jx.signature=Xo;function qx(e,t){if(!$e(e)||!$e(t))throw new Error("Integers expected in function rightArithShift");return e>>t}qx.signature=Xo;function Rx(e,t){if(!$e(e)||!$e(t))throw new Error("Integers expected in function rightLogShift");return e>>>t}Rx.signature=Xo;function Fa(e,t){if(t<e)return 1;if(t===e)return t;var r=t+e>>1;return Fa(e,r)*Fa(r+1,t)}function Lx(e,t){if(!$e(e)||e<0)throw new TypeError("Positive integer value expected in function combinations");if(!$e(t)||t<0)throw new TypeError("Positive integer value expected in function combinations");if(t>e)throw new TypeError("k must be less than or equal to n");for(var r=e-t,n=1,a=t<r?r+1:t+1,i=2,o=t<r?t:r,s=a;s<=e;++s)for(n*=s;i<=o&&n%i===0;)n/=i,++i;return i<=o&&(n/=Fa(i,o)),n}Lx.signature="number, number";var tI=Math.PI,rI=2*Math.PI,nI=Math.E,aI=1.618033988749895,iI="number",xd="number, number";function Hx(e){return!e}Hx.signature=iI;function _m(e,t){return!!(e||t)}_m.signature=xd;function Bm(e,t){return!!e!=!!t}Bm.signature=xd;function Im(e,t){return!!(e&&t)}Im.signature=xd;function Ul(e){var t;if($e(e))return e<=0?isFinite(e)?1/0:NaN:e>171?1/0:Fa(1,e-1);if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*Ul(1-e));if(e>=171.35)return 1/0;if(e>85){var r=e*e,n=r*e,a=n*e,i=a*e;return Math.sqrt(2*Math.PI/e)*Math.pow(e/Math.E,e)*(1+1/(12*e)+1/(288*r)-139/(51840*n)-571/(2488320*a)+163879/(209018880*i)+5246819/(75246796800*i*e))}--e,t=Bo[0];for(var o=1;o<Bo.length;++o)t+=Bo[o]/(e+o);var s=e+Gx+.5;return Math.sqrt(2*Math.PI)*Math.pow(s,e+.5)*Math.exp(-s)*t}Ul.signature="number";var Gx=4.7421875,Bo=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22],Vx=.9189385332046728,oI=5,sI=7,d0=[1.000000000190015,76.18009172947146,-86.50532032941678,24.01409824083091,-1.231739572450155,.001208650973866179,-5395239384953e-18];function Wl(e){if(e<0)return NaN;if(e===0)return 1/0;if(!isFinite(e))return e;if(e<.5)return Math.log(Math.PI/Math.sin(Math.PI*e))-Wl(1-e);e=e-1;for(var t=e+oI+.5,r=d0[0],n=sI-1;n>=1;n--)r+=d0[n]/(e+n);return Vx+(e+.5)*Math.log(t)-t+Math.log(r)}Wl.signature="number";var _r="number";function Ux(e){return s9(e)}Ux.signature=_r;function Wx(e){return Math.atan(1/e)}Wx.signature=_r;function Jx(e){return isFinite(e)?(Math.log((e+1)/e)+Math.log(e/(e-1)))/2:0}Jx.signature=_r;function Kx(e){return Math.asin(1/e)}Kx.signature=_r;function Yx(e){var t=1/e;return Math.log(t+Math.sqrt(t*t+1))}Yx.signature=_r;function Zx(e){return Math.acos(1/e)}Zx.signature=_r;function Qx(e){var t=1/e,r=Math.sqrt(t*t-1);return Math.log(r+t)}Qx.signature=_r;function Xx(e){return u9(e)}Xx.signature=_r;function e2(e){return l9(e)}e2.signature=_r;function t2(e){return 1/Math.tan(e)}t2.signature=_r;function r2(e){var t=Math.exp(2*e);return(t+1)/(t-1)}r2.signature=_r;function n2(e){return 1/Math.sin(e)}n2.signature=_r;function a2(e){return e===0?Number.POSITIVE_INFINITY:Math.abs(2/(Math.exp(e)-Math.exp(-e)))*Xa(e)}a2.signature=_r;function i2(e){return 1/Math.cos(e)}i2.signature=_r;function o2(e){return 2/(Math.exp(e)+Math.exp(-e))}o2.signature=_r;function s2(e){return f9(e)}s2.signature=_r;var Dd="number";function u2(e){return e<0}u2.signature=Dd;function l2(e){return e>0}l2.signature=Dd;function c2(e){return Number.isNaN(e)}c2.signature=Dd;function Tn(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1e-9,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;if(r<=0)throw new Error("Relative tolerance must be greater than 0");if(n<0)throw new 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(r),n))}var h0="isNegative",uI=["typed","config"],lI=B(h0,uI,e=>{var{typed:t,config:r}=e;return t(h0,{number:n=>Ar(n,0,r.relTol,r.absTol)?!1:u2(n),BigNumber:n=>Tn(n,new n.constructor(0),r.relTol,r.absTol)?!1:n.isNeg()&&!n.isZero()&&!n.isNaN(),bigint:n=>n<0n,Fraction:n=>n.s<0n,Unit:t.referToSelf(n=>a=>t.find(n,a.valueType())(a.value)),"Array | Matrix":t.referToSelf(n=>a=>Xe(a,n))})}),p0="isNumeric",cI=["typed"],fI=B(p0,cI,e=>{var{typed:t}=e;return t(p0,{"number | BigNumber | bigint | Fraction | boolean":()=>!0,"Complex | Unit | string | null | undefined | Node":()=>!1,"Array | Matrix":t.referToSelf(r=>n=>Xe(n,r))})}),g0="hasNumericValue",mI=["typed","isNumeric"],dI=B(g0,mI,e=>{var{typed:t,isNumeric:r}=e;return t(g0,{boolean:()=>!0,string:function(a){return a.trim().length>0&&!isNaN(Number(a))},any:function(a){return r(a)}})}),v0="isPositive",hI=["typed","config"],pI=B(v0,hI,e=>{var{typed:t,config:r}=e;return t(v0,{number:n=>Ar(n,0,r.relTol,r.absTol)?!1:l2(n),BigNumber:n=>Tn(n,new n.constructor(0),r.relTol,r.absTol)?!1:!n.isNeg()&&!n.isZero()&&!n.isNaN(),bigint:n=>n>0n,Fraction:n=>n.s>0n&&n.n>0n,Unit:t.referToSelf(n=>a=>t.find(n,a.valueType())(a.value)),"Array | Matrix":t.referToSelf(n=>a=>Xe(a,n))})}),y0="isZero",gI=["typed","equalScalar"],vI=B(y0,gI,e=>{var{typed:t,equalScalar:r}=e;return t(y0,{"number | BigNumber | Complex | Fraction":n=>r(n,0),bigint:n=>n===0n,Unit:t.referToSelf(n=>a=>t.find(n,a.valueType())(a.value)),"Array | Matrix":t.referToSelf(n=>a=>Xe(a,n))})}),b0="isNaN",yI=["typed"],bI=B(b0,yI,e=>{var{typed:t}=e;return t(b0,{number:c2,BigNumber:function(n){return n.isNaN()},bigint:function(n){return!1},Fraction:function(n){return!1},Complex:function(n){return n.isNaN()},Unit:function(n){return Number.isNaN(n.value)},"Array | Matrix":t.referToSelf(r=>n=>Xe(n,r))})}),w0="typeOf",wI=["typed"],xI=B(w0,wI,e=>{var{typed:t}=e;return t(w0,{any:Mt})});function DI(e,t,r,n){return Ar(e.re,t.re,r,n)&&Ar(e.im,t.im,r,n)}var es=B("compareUnits",["typed"],e=>{var{typed:t}=e;return{"Unit, Unit":t.referToSelf(r=>(n,a)=>{if(!n.equalBase(a))throw new Error("Cannot compare units with different base");return t.find(r,[n.valueType(),a.valueType()])(n.value,a.value)})}}),Jl="equalScalar",NI=["typed","config"],AI=B(Jl,NI,e=>{var{typed:t,config:r}=e,n=es({typed:t});return t(Jl,{"boolean, boolean":function(i,o){return i===o},"number, number":function(i,o){return Ar(i,o,r.relTol,r.absTol)},"BigNumber, BigNumber":function(i,o){return i.eq(o)||Tn(i,o,r.relTol,r.absTol)},"bigint, bigint":function(i,o){return i===o},"Fraction, Fraction":function(i,o){return i.equals(o)},"Complex, Complex":function(i,o){return DI(i,o,r.relTol,r.absTol)}},n)});B(Jl,["typed","config"],e=>{var{typed:t,config:r}=e;return t(Jl,{"number, number":function(a,i){return Ar(a,i,r.relTol,r.absTol)}})});var CI="SparseMatrix",EI=["typed","equalScalar","Matrix"],SI=B(CI,EI,e=>{var{typed:t,equalScalar:r,Matrix:n}=e;function a(h,y){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");if(y&&!Pr(y))throw new Error("Invalid datatype: "+y);if(je(h))i(this,h,y);else if(h&&Et(h.index)&&Et(h.ptr)&&Et(h.size))this._values=h.values,this._index=h.index,this._ptr=h.ptr,this._size=h.size,this._datatype=y||h.datatype;else if(Et(h))o(this,h,y);else{if(h)throw new TypeError("Unsupported type of data ("+Mt(h)+")");this._values=[],this._index=[],this._ptr=[0],this._size=[0,0],this._datatype=y}}function i(h,y,b){y.type==="SparseMatrix"?(h._values=y._values?Ue(y._values):void 0,h._index=Ue(y._index),h._ptr=Ue(y._ptr),h._size=Ue(y._size),h._datatype=b||y._datatype):o(h,y.valueOf(),b||y._datatype)}function o(h,y,b){h._values=[],h._index=[],h._ptr=[],h._datatype=b;var D=y.length,g=0,x=r,w=0;if(Pr(b)&&(x=t.find(r,[b,b])||r,w=t.convert(0,b)),D>0){var v=0;do{h._ptr.push(h._index.length);for(var A=0;A<D;A++){var C=y[A];if(Et(C)){if(v===0&&g<C.length&&(g=C.length),v<C.length){var N=C[v];x(N,w)||(h._values.push(N),h._index.push(A))}}else v===0&&g<1&&(g=1),x(C,w)||(h._values.push(C),h._index.push(A))}v++}while(v<g)}h._ptr.push(h._index.length),h._size=[D,g]}a.prototype=new n,a.prototype.createSparseMatrix=function(h,y){return new a(h,y)},Object.defineProperty(a,"name",{value:"SparseMatrix"}),a.prototype.constructor=a,a.prototype.type="SparseMatrix",a.prototype.isSparseMatrix=!0,a.prototype.getDataType=function(){return yc(this._values,Mt)},a.prototype.storage=function(){return"sparse"},a.prototype.datatype=function(){return this._datatype},a.prototype.create=function(h,y){return new a(h,y)},a.prototype.density=function(){var h=this._size[0],y=this._size[1];return h!==0&&y!==0?this._index.length/(h*y):0},a.prototype.subset=function(h,y,b){if(!this._values)throw new Error("Cannot invoke subset on a Pattern only matrix");switch(arguments.length){case 1:return s(this,h);case 2:case 3:return u(this,h,y,b);default:throw new SyntaxError("Wrong number of arguments")}};function s(h,y){if(!fc(y))throw new TypeError("Invalid index");var b=y.isScalar();if(b)return h.get(y.min());var D=y.size();if(D.length!==h._size.length)throw new it(D.length,h._size.length);var g,x,w,v,A=y.min(),C=y.max();for(g=0,x=h._size.length;g<x;g++)kt(A[g],h._size[g]),kt(C[g],h._size[g]);var N=h._values,E=h._index,S=h._ptr,F=y.dimension(0),k=y.dimension(1),$=[],_=[];F.forEach(function(j,O){_[j]=O[0],$[j]=!0});var T=N?[]:void 0,z=[],P=[];return k.forEach(function(j){for(P.push(z.length),w=S[j],v=S[j+1];w<v;w++)g=E[w],$[g]===!0&&(z.push(_[g]),T&&T.push(N[w]))}),P.push(z.length),new a({values:T,index:z,ptr:P,size:D,datatype:h._datatype})}function u(h,y,b,D){if(!y||y.isIndex!==!0)throw new TypeError("Invalid index");var g=y.size(),x=y.isScalar(),w;if(je(b)?(w=b.size(),b=b.toArray()):w=Ve(b),x){if(w.length!==0)throw new TypeError("Scalar expected");h.set(y.min(),b,D)}else{if(g.length!==1&&g.length!==2)throw new it(g.length,h._size.length,"<");if(w.length<g.length){for(var v=0,A=0;g[v]===1&&w[v]===1;)v++;for(;g[v]===1;)A++,v++;b=hx(b,g.length,A,w)}if(!Ba(g,w))throw new it(g,w,">");if(g.length===1){var C=y.dimension(0);C.forEach(function(S,F){kt(S),h.set([S,0],b[F[0]],D)})}else{var N=y.dimension(0),E=y.dimension(1);N.forEach(function(S,F){kt(S),E.forEach(function(k,$){kt(k),h.set([S,k],b[F[0]][$[0]],D)})})}}return h}a.prototype.get=function(h){if(!Et(h))throw new TypeError("Array expected");if(h.length!==this._size.length)throw new it(h.length,this._size.length);if(!this._values)throw new Error("Cannot invoke get on a Pattern only matrix");var y=h[0],b=h[1];kt(y,this._size[0]),kt(b,this._size[1]);var D=l(y,this._ptr[b],this._ptr[b+1],this._index);return D<this._ptr[b+1]&&this._index[D]===y?this._values[D]:0},a.prototype.set=function(h,y,b){if(!Et(h))throw new TypeError("Array expected");if(h.length!==this._size.length)throw new it(h.length,this._size.length);if(!this._values)throw new Error("Cannot invoke set on a Pattern only matrix");var D=h[0],g=h[1],x=this._size[0],w=this._size[1],v=r,A=0;Pr(this._datatype)&&(v=t.find(r,[this._datatype,this._datatype])||r,A=t.convert(0,this._datatype)),(D>x-1||g>w-1)&&(m(this,Math.max(D+1,x),Math.max(g+1,w),b),x=this._size[0],w=this._size[1]),kt(D,x),kt(g,w);var C=l(D,this._ptr[g],this._ptr[g+1],this._index);return C<this._ptr[g+1]&&this._index[C]===D?v(y,A)?c(C,g,this._values,this._index,this._ptr):this._values[C]=y:v(y,A)||f(C,D,g,y,this._values,this._index,this._ptr),this};function l(h,y,b,D){if(b-y===0)return b;for(var g=y;g<b;g++)if(D[g]===h)return g;return y}function c(h,y,b,D,g){b.splice(h,1),D.splice(h,1);for(var x=y+1;x<g.length;x++)g[x]--}function f(h,y,b,D,g,x,w){g.splice(h,0,D),x.splice(h,0,y);for(var v=b+1;v<w.length;v++)w[v]++}a.prototype.resize=function(h,y,b){if(!Mn(h))throw new TypeError("Array or Matrix expected");var D=h.valueOf().map(x=>Array.isArray(x)&&x.length===1?x[0]:x);if(D.length!==2)throw new Error("Only two dimensions matrix are supported");D.forEach(function(x){if(!Ze(x)||!$e(x)||x<0)throw new TypeError("Invalid size, must contain positive integers (size: "+at(D)+")")});var g=b?this.clone():this;return m(g,D[0],D[1],y)};function m(h,y,b,D){var g=D||0,x=r,w=0;Pr(h._datatype)&&(x=t.find(r,[h._datatype,h._datatype])||r,w=t.convert(0,h._datatype),g=t.convert(g,h._datatype));var v=!x(g,w),A=h._size[0],C=h._size[1],N,E,S;if(b>C){for(E=C;E<b;E++)if(h._ptr[E]=h._values.length,v)for(N=0;N<A;N++)h._values.push(g),h._index.push(N);h._ptr[b]=h._values.length}else b<C&&(h._ptr.splice(b+1,C-b),h._values.splice(h._ptr[b],h._values.length),h._index.splice(h._ptr[b],h._index.length));if(C=b,y>A){if(v){var F=0;for(E=0;E<C;E++){h._ptr[E]=h._ptr[E]+F,S=h._ptr[E+1]+F;var k=0;for(N=A;N<y;N++,k++)h._values.splice(S+k,0,g),h._index.splice(S+k,0,N),F++}h._ptr[C]=h._values.length}}else if(y<A){var $=0;for(E=0;E<C;E++){h._ptr[E]=h._ptr[E]-$;var _=h._ptr[E],T=h._ptr[E+1]-$;for(S=_;S<T;S++)N=h._index[S],N>y-1&&(h._values.splice(S,1),h._index.splice(S,1),$++)}h._ptr[E]=h._values.length}return h._size[0]=y,h._size[1]=b,h}a.prototype.reshape=function(h,y){if(!Et(h))throw new TypeError("Array expected");if(h.length!==2)throw new Error("Sparse matrices can only be reshaped in two dimensions");h.forEach(function(j){if(!Ze(j)||!$e(j)||j<=-2||j===0)throw new TypeError("Invalid size, must contain positive integers or -1 (size: "+at(h)+")")});var b=this._size[0]*this._size[1];h=yd(h,b);var D=h[0]*h[1];if(b!==D)throw new Error("Reshaping sparse matrix will result in the wrong number of elements");var g=y?this.clone():this;if(this._size[0]===h[0]&&this._size[1]===h[1])return g;for(var x=[],w=0;w<g._ptr.length;w++)for(var v=0;v<g._ptr[w+1]-g._ptr[w];v++)x.push(w);for(var A=g._values.slice(),C=g._index.slice(),N=0;N<g._index.length;N++){var E=C[N],S=x[N],F=E*g._size[1]+S;x[N]=F%h[1],C[N]=Math.floor(F/h[1])}g._values.length=0,g._index.length=0,g._ptr.length=h[1]+1,g._size=h.slice();for(var k=0;k<g._ptr.length;k++)g._ptr[k]=0;for(var $=0;$<A.length;$++){var _=C[$],T=x[$],z=A[$],P=l(_,g._ptr[T],g._ptr[T+1],g._index);f(P,_,T,z,g._values,g._index,g._ptr)}return g},a.prototype.clone=function(){var h=new a({values:this._values?Ue(this._values):void 0,index:Ue(this._index),ptr:Ue(this._ptr),size:Ue(this._size),datatype:this._datatype});return h},a.prototype.size=function(){return this._size.slice(0)},a.prototype.map=function(h,y){if(!this._values)throw new Error("Cannot invoke map on a Pattern only matrix");var b=this,D=this._size[0],g=this._size[1],x=Ji(h,b,"map"),w=function(A,C,N){return x.fn(A,[C,N],b)};return d(this,0,D-1,0,g-1,w,y)};function d(h,y,b,D,g,x,w){var v=[],A=[],C=[],N=r,E=0;Pr(h._datatype)&&(N=t.find(r,[h._datatype,h._datatype])||r,E=t.convert(0,h._datatype));for(var S=function(U,V,le){var ne=x(U,V,le);N(ne,E)||(v.push(ne),A.push(V))},F=D;F<=g;F++){C.push(v.length);var k=h._ptr[F],$=h._ptr[F+1];if(w)for(var _=k;_<$;_++){var T=h._index[_];T>=y&&T<=b&&S(h._values[_],T-y,F-D)}else{for(var z={},P=k;P<$;P++){var j=h._index[P];z[j]=h._values[P]}for(var O=y;O<=b;O++){var Q=O in z?z[O]:0;S(Q,O-y,F-D)}}}return C.push(v.length),new a({values:v,index:A,ptr:C,size:[b-y+1,g-D+1]})}a.prototype.forEach=function(h,y){if(!this._values)throw new Error("Cannot invoke forEach on a Pattern only matrix");for(var b=this,D=this._size[0],g=this._size[1],x=Ji(h,b,"forEach"),w=0;w<g;w++){var v=this._ptr[w],A=this._ptr[w+1];if(y)for(var C=v;C<A;C++){var N=this._index[C];x.fn(this._values[C],[N,w],b)}else{for(var E={},S=v;S<A;S++){var F=this._index[S];E[F]=this._values[S]}for(var k=0;k<D;k++){var $=k in E?E[k]:0;x.fn($,[k,w],b)}}}},a.prototype[Symbol.iterator]=function*(){if(!this._values)throw new Error("Cannot iterate a Pattern only matrix");for(var h=this._size[1],y=0;y<h;y++)for(var b=this._ptr[y],D=this._ptr[y+1],g=b;g<D;g++){var x=this._index[g];yield{value:this._values[g],index:[x,y]}}},a.prototype.toArray=function(){return p(this._values,this._index,this._ptr,this._size,!0)},a.prototype.valueOf=function(){return p(this._values,this._index,this._ptr,this._size,!1)};function p(h,y,b,D,g){var x=D[0],w=D[1],v=[],A,C;for(A=0;A<x;A++)for(v[A]=[],C=0;C<w;C++)v[A][C]=0;for(C=0;C<w;C++)for(var N=b[C],E=b[C+1],S=N;S<E;S++)A=y[S],v[A][C]=h?g?Ue(h[S]):h[S]:1;return v}return a.prototype.format=function(h){for(var y=this._size[0],b=this._size[1],D=this.density(),g="Sparse Matrix ["+at(y,h)+" x "+at(b,h)+"] density: "+at(D,h)+`
|
|
41
|
-
`,x=0;x<b;x++)for(var w=this._ptr[x],v=this._ptr[x+1],A=w;A<v;A++){var C=this._index[A];g+=`
|
|
42
|
-
(`+at(C,h)+", "+at(x,h)+") ==> "+(this._values?at(this._values[A],h):"X")}return g},a.prototype.toString=function(){return at(this.toArray())},a.prototype.toJSON=function(){return{mathjs:"SparseMatrix",values:this._values,index:this._index,ptr:this._ptr,size:this._size,datatype:this._datatype}},a.prototype.diagonal=function(h){if(h){if(Qe(h)&&(h=h.toNumber()),!Ze(h)||!$e(h))throw new TypeError("The parameter k must be an integer number")}else h=0;var y=h>0?h:0,b=h<0?-h:0,D=this._size[0],g=this._size[1],x=Math.min(D-b,g-y),w=[],v=[],A=[];A[0]=0;for(var C=y;C<g&&w.length<x;C++)for(var N=this._ptr[C],E=this._ptr[C+1],S=N;S<E;S++){var F=this._index[S];if(F===C-y+b){w.push(this._values[S]),v[w.length-1]=F-b;break}}return A.push(w.length),new a({values:w,index:v,ptr:A,size:[x,1]})},a.fromJSON=function(h){return new a(h)},a.diagonal=function(h,y,b,D,g){if(!Et(h))throw new TypeError("Array expected, size parameter");if(h.length!==2)throw new Error("Only two dimensions matrix are supported");if(h=h.map(function(j){if(Qe(j)&&(j=j.toNumber()),!Ze(j)||!$e(j)||j<1)throw new Error("Size values must be positive integers");return j}),b){if(Qe(b)&&(b=b.toNumber()),!Ze(b)||!$e(b))throw new TypeError("The parameter k must be an integer number")}else b=0;var x=r,w=0;Pr(g)&&(x=t.find(r,[g,g])||r,w=t.convert(0,g));var v=b>0?b:0,A=b<0?-b:0,C=h[0],N=h[1],E=Math.min(C-A,N-v),S;if(Et(y)){if(y.length!==E)throw new Error("Invalid value array length");S=function(O){return y[O]}}else if(je(y)){var F=y.size();if(F.length!==1||F[0]!==E)throw new Error("Invalid matrix length");S=function(O){return y.get([O])}}else S=function(){return y};for(var k=[],$=[],_=[],T=0;T<N;T++){_.push(k.length);var z=T-v;if(z>=0&&z<E){var P=S(z);x(P,w)||($.push(z+A),k.push(P))}}return _.push(k.length),new a({values:k,index:$,ptr:_,size:[C,N]})},a.prototype.swapRows=function(h,y){if(!Ze(h)||!$e(h)||!Ze(y)||!$e(y))throw new Error("Row index must be positive integers");if(this._size.length!==2)throw new Error("Only two dimensional matrix is supported");return kt(h,this._size[0]),kt(y,this._size[0]),a._swapRows(h,y,this._size[1],this._values,this._index,this._ptr),this},a._forEachRow=function(h,y,b,D,g){for(var x=D[h],w=D[h+1],v=x;v<w;v++)g(b[v],y[v])},a._swapRows=function(h,y,b,D,g,x){for(var w=0;w<b;w++){var v=x[w],A=x[w+1],C=l(h,v,A,g),N=l(y,v,A,g);if(C<A&&N<A&&g[C]===h&&g[N]===y){if(D){var E=D[C];D[C]=D[N],D[N]=E}continue}if(C<A&&g[C]===h&&(N>=A||g[N]!==y)){var S=D?D[C]:void 0;g.splice(N,0,y),D&&D.splice(N,0,S),g.splice(N<=C?C+1:C,1),D&&D.splice(N<=C?C+1:C,1);continue}if(N<A&&g[N]===y&&(C>=A||g[C]!==h)){var F=D?D[N]:void 0;g.splice(C,0,h),D&&D.splice(C,0,F),g.splice(C<=N?N+1:N,1),D&&D.splice(C<=N?N+1:N,1)}}},a},{isClass:!0}),MI="number",TI=["typed"];function FI(e){var t=e.match(/(0[box])([0-9a-fA-F]*)\.([0-9a-fA-F]*)/);if(t){var r={"0b":2,"0o":8,"0x":16}[t[1]],n=t[2],a=t[3];return{input:e,radix:r,integerPart:n,fractionalPart:a}}else return null}function PI(e){for(var t=parseInt(e.integerPart,e.radix),r=0,n=0;n<e.fractionalPart.length;n++){var a=parseInt(e.fractionalPart[n],e.radix);r+=a/Math.pow(e.radix,n+1)}var i=t+r;if(isNaN(i))throw new SyntaxError('String "'+e.input+'" is not a valid number');return i}var kI=B(MI,TI,e=>{var{typed:t}=e,r=t("number",{"":function(){return 0},number:function(a){return a},string:function(a){if(a==="NaN")return NaN;var i=FI(a);if(i)return PI(i);var o=0,s=a.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);s&&(o=Number(s[2]),a=s[1]);var u=Number(a);if(isNaN(u))throw new SyntaxError('String "'+a+'" is not a valid number');if(s){if(u>2**o-1)throw new SyntaxError('String "'.concat(a,'" is out of range'));u>=2**(o-1)&&(u=u-2**o)}return u},BigNumber:function(a){return a.toNumber()},bigint:function(a){return Number(a)},Fraction:function(a){return a.valueOf()},Unit:t.referToSelf(n=>a=>{var i=a.clone();return i.value=n(a.value),i}),null:function(a){return 0},"Unit, string | Unit":function(a,i){return a.toNumber(i)},"Array | Matrix":t.referToSelf(n=>a=>Xe(a,n))});return r.fromJSON=function(n){return parseFloat(n.value)},r}),OI="bigint",$I=["typed"],_I=B(OI,$I,e=>{var{typed:t}=e,r=t("bigint",{"":function(){return 0n},bigint:function(a){return a},number:function(a){return BigInt(a.toFixed())},BigNumber:function(a){return BigInt(a.round().toString())},Fraction:function(a){return BigInt(a.valueOf().toFixed())},"string | boolean":function(a){return BigInt(a)},null:function(a){return 0n},"Array | Matrix":t.referToSelf(n=>a=>Xe(a,n))});return r.fromJSON=function(n){return BigInt(n.value)},r}),x0="string",BI=["typed"],II=B(x0,BI,e=>{var{typed:t}=e;return t(x0,{"":function(){return""},number:Li,null:function(n){return"null"},boolean:function(n){return n+""},string:function(n){return n},"Array | Matrix":t.referToSelf(r=>n=>Xe(n,r)),any:function(n){return String(n)}})}),D0="boolean",zI=["typed"],jI=B(D0,zI,e=>{var{typed:t}=e;return t(D0,{"":function(){return!1},boolean:function(n){return n},number:function(n){return!!n},null:function(n){return!1},BigNumber:function(n){return!n.isZero()},string:function(n){var a=n.toLowerCase();if(a==="true")return!0;if(a==="false")return!1;var i=Number(n);if(n!==""&&!isNaN(i))return!!i;throw new Error('Cannot convert "'+n+'" to a boolean')},"Array | Matrix":t.referToSelf(r=>n=>Xe(n,r))})}),qI="bignumber",RI=["typed","BigNumber"],LI=B(qI,RI,e=>{var{typed:t,BigNumber:r}=e;return t("bignumber",{"":function(){return new r(0)},number:function(a){return new r(a+"")},string:function(a){var i=a.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);if(i){var o=i[2],s=r(i[1]),u=new r(2).pow(Number(o));if(s.gt(u.sub(1)))throw new SyntaxError('String "'.concat(a,'" is out of range'));var l=new r(2).pow(Number(o)-1);return s.gte(l)?s.sub(u):s}return new r(a)},BigNumber:function(a){return a},bigint:function(a){return new r(a.toString())},Unit:t.referToSelf(n=>a=>{var i=a.clone();return i.value=n(a.value),i}),Fraction:function(a){return new r(String(a.n)).div(String(a.d)).times(String(a.s))},null:function(a){return new r(0)},"Array | Matrix":t.referToSelf(n=>a=>Xe(a,n))})}),HI="complex",GI=["typed","Complex"],VI=B(HI,GI,e=>{var{typed:t,Complex:r}=e;return t("complex",{"":function(){return r.ZERO},number:function(a){return new r(a,0)},"number, number":function(a,i){return new r(a,i)},"BigNumber, BigNumber":function(a,i){return new r(a.toNumber(),i.toNumber())},Fraction:function(a){return new r(a.valueOf(),0)},Complex:function(a){return a.clone()},string:function(a){return r(a)},null:function(a){return r(0)},Object:function(a){if("re"in a&&"im"in a)return new r(a.re,a.im);if("r"in a&&"phi"in a||"abs"in a&&"arg"in a)return new r(a);throw new Error("Expected object with properties (re and im) or (r and phi) or (abs and arg)")},"Array | Matrix":t.referToSelf(n=>a=>Xe(a,n))})}),UI="fraction",WI=["typed","Fraction"],JI=B(UI,WI,e=>{var{typed:t,Fraction:r}=e;return t("fraction",{number:function(a){if(!isFinite(a)||isNaN(a))throw new Error(a+" cannot be represented as a fraction");return new r(a)},string:function(a){return new r(a)},"number, number":function(a,i){return new r(a,i)},"bigint, bigint":function(a,i){return new r(a,i)},null:function(a){return new r(0)},BigNumber:function(a){return new r(a.toString())},bigint:function(a){return new r(a.toString())},Fraction:function(a){return a},Unit:t.referToSelf(n=>a=>{var i=a.clone();return i.value=n(a.value),i}),Object:function(a){return new r(a)},"Array | Matrix":t.referToSelf(n=>a=>Xe(a,n))})}),N0="matrix",KI=["typed","Matrix","DenseMatrix","SparseMatrix"],YI=B(N0,KI,e=>{var{typed:t,Matrix:r,DenseMatrix:n,SparseMatrix:a}=e;return t(N0,{"":function(){return i([])},string:function(s){return i([],s)},"string, string":function(s,u){return i([],s,u)},Array:function(s){return i(s)},Matrix:function(s){return i(s,s.storage())},"Array | Matrix, string":i,"Array | Matrix, string, string":i});function i(o,s,u){if(s==="dense"||s==="default"||s===void 0)return new n(o,u);if(s==="sparse")return new a(o,u);throw new TypeError("Unknown matrix type "+JSON.stringify(s)+".")}}),A0="matrixFromFunction",ZI=["typed","matrix","isZero"],QI=B(A0,ZI,e=>{var{typed:t,matrix:r,isZero:n}=e;return t(A0,{"Array | Matrix, function, string, string":function(o,s,u,l){return a(o,s,u,l)},"Array | Matrix, function, string":function(o,s,u){return a(o,s,u)},"Matrix, function":function(o,s){return a(o,s,"dense")},"Array, function":function(o,s){return a(o,s,"dense").toArray()},"Array | Matrix, string, function":function(o,s,u){return a(o,u,s)},"Array | Matrix, string, string, function":function(o,s,u,l){return a(o,l,s,u)}});function a(i,o,s,u){var l;return u!==void 0?l=r(s,u):l=r(s),l.resize(i),l.forEach(function(c,f){var m=o(f);n(m)||l.set(f,m)}),l}}),C0="matrixFromRows",XI=["typed","matrix","flatten","size"],e7=B(C0,XI,e=>{var{typed:t,matrix:r,flatten:n,size:a}=e;return t(C0,{"...Array":function(u){return i(u)},"...Matrix":function(u){return r(i(u.map(l=>l.toArray())))}});function i(s){if(s.length===0)throw new TypeError("At least one row is needed to construct a matrix.");var u=o(s[0]),l=[];for(var c of s){var f=o(c);if(f!==u)throw new TypeError("The vectors had different length: "+(u|0)+" ≠ "+(f|0));l.push(n(c))}return l}function o(s){var u=a(s);if(u.length===1)return u[0];if(u.length===2){if(u[0]===1)return u[1];if(u[1]===1)return u[0];throw new TypeError("At least one of the arguments is not a vector.")}else throw new TypeError("Only one- or two-dimensional vectors are supported.")}}),E0="matrixFromColumns",t7=["typed","matrix","flatten","size"],r7=B(E0,t7,e=>{var{typed:t,matrix:r,flatten:n,size:a}=e;return t(E0,{"...Array":function(u){return i(u)},"...Matrix":function(u){return r(i(u.map(l=>l.toArray())))}});function i(s){if(s.length===0)throw new TypeError("At least one column is needed to construct a matrix.");for(var u=o(s[0]),l=[],c=0;c<u;c++)l[c]=[];for(var f of s){var m=o(f);if(m!==u)throw new TypeError("The vectors had different length: "+(u|0)+" ≠ "+(m|0));for(var d=n(f),p=0;p<u;p++)l[p].push(d[p])}return l}function o(s){var u=a(s);if(u.length===1)return u[0];if(u.length===2){if(u[0]===1)return u[1];if(u[1]===1)return u[0];throw new TypeError("At least one of the arguments is not a vector.")}else throw new TypeError("Only one- or two-dimensional vectors are supported.")}}),S0="splitUnit",n7=["typed"],a7=B(S0,n7,e=>{var{typed:t}=e;return t(S0,{"Unit, Array":function(n,a){return n.splitUnit(a)}})}),M0="unaryMinus",i7=["typed"],o7=B(M0,i7,e=>{var{typed:t}=e;return t(M0,{number:Ex,"Complex | BigNumber | Fraction":r=>r.neg(),bigint:r=>-r,Unit:t.referToSelf(r=>n=>{var a=n.clone();return a.value=t.find(r,a.valueType())(n.value),a}),"Array | Matrix":t.referToSelf(r=>n=>Xe(n,r,!0))})}),T0="unaryPlus",s7=["typed","config","numeric"],u7=B(T0,s7,e=>{var{typed:t,config:r,numeric:n}=e;return t(T0,{number:Sx,Complex:function(i){return i},BigNumber:function(i){return i},bigint:function(i){return i},Fraction:function(i){return i},Unit:function(i){return i.clone()},"Array | Matrix":t.referToSelf(a=>i=>Xe(i,a,!0)),boolean:function(i){return n(i?1:0,r.number)},string:function(i){return n(i,mi(i,r))}})}),F0="abs",l7=["typed"],c7=B(F0,l7,e=>{var{typed:t}=e;return t(F0,{number:Dx,"Complex | BigNumber | Fraction | Unit":r=>r.abs(),bigint:r=>r<0n?-r:r,"Array | Matrix":t.referToSelf(r=>n=>Xe(n,r,!0))})}),P0="mapSlices",f7=["typed","isInteger"],zm=B(P0,f7,e=>{var{typed:t,isInteger:r}=e;return t(P0,{"Array | Matrix, number | BigNumber, function":function(a,i,o){if(!r(i))throw new TypeError("Integer number expected for dimension");var s=Array.isArray(a)?Ve(a):a.size();if(i<0||i>=s.length)throw new Wn(i,s.length);return je(a)?a.create(Kl(a.valueOf(),i,o),a.datatype()):Kl(a,i,o)}})},{formerly:"apply"});function Kl(e,t,r){var n,a,i;if(t<=0)if(Array.isArray(e[0])){for(i=m7(e),a=[],n=0;n<i.length;n++)a[n]=Kl(i[n],t-1,r);return a}else return r(e);else{for(a=[],n=0;n<e.length;n++)a[n]=Kl(e[n],t-1,r);return a}}function m7(e){var t=e.length,r=e[0].length,n,a,i=[];for(a=0;a<r;a++){var o=[];for(n=0;n<t;n++)o.push(e[n][a]);i.push(o)}return i}var k0="addScalar",d7=["typed"],h7=B(k0,d7,e=>{var{typed:t}=e;return t(k0,{"number, number":Nx,"Complex, Complex":function(n,a){return n.add(a)},"BigNumber, BigNumber":function(n,a){return n.plus(a)},"bigint, bigint":function(n,a){return n+a},"Fraction, Fraction":function(n,a){return n.add(a)},"Unit, Unit":t.referToSelf(r=>(n,a)=>{if(n.value===null||n.value===void 0)throw new Error("Parameter x contains a unit with undefined value");if(a.value===null||a.value===void 0)throw new Error("Parameter y contains a unit with undefined value");if(!n.equalBase(a))throw new Error("Units do not match");var i=n.clone();return i.value=t.find(r,[i.valueType(),a.valueType()])(i.value,a.value),i.fixPrefix=!1,i})})}),O0="subtractScalar",p7=["typed"],g7=B(O0,p7,e=>{var{typed:t}=e;return t(O0,{"number, number":Ax,"Complex, Complex":function(n,a){return n.sub(a)},"BigNumber, BigNumber":function(n,a){return n.minus(a)},"bigint, bigint":function(n,a){return n-a},"Fraction, Fraction":function(n,a){return n.sub(a)},"Unit, Unit":t.referToSelf(r=>(n,a)=>{if(n.value===null||n.value===void 0)throw new Error("Parameter x contains a unit with undefined value");if(a.value===null||a.value===void 0)throw new Error("Parameter y contains a unit with undefined value");if(!n.equalBase(a))throw new Error("Units do not match");var i=n.clone();return i.value=t.find(r,[i.valueType(),a.valueType()])(i.value,a.value),i.fixPrefix=!1,i})})}),$0="cbrt",v7=["config","typed","isNegative","unaryMinus","matrix","Complex","BigNumber","Fraction"],y7=B($0,v7,e=>{var{config:t,typed:r,isNegative:n,unaryMinus:a,matrix:i,Complex:o,BigNumber:s,Fraction:u}=e;return r($0,{number:Ds,Complex:l,"Complex, boolean":l,BigNumber:function(m){return m.cbrt()},Unit:c});function l(f,m){var d=f.arg()/3,p=f.abs(),h=new o(Ds(p),0).mul(new o(0,d).exp());if(m){var y=[h,new o(Ds(p),0).mul(new o(0,d+Math.PI*2/3).exp()),new o(Ds(p),0).mul(new o(0,d-Math.PI*2/3).exp())];return t.matrix==="Array"?y:i(y)}else return h}function c(f){if(f.value&&Pa(f.value)){var m=f.clone();return m.value=1,m=m.pow(1/3),m.value=l(f.value),m}else{var d=n(f.value);d&&(f.value=a(f.value));var p;Qe(f.value)?p=new s(1).div(3):Zs(f.value)?p=new u(1,3):p=1/3;var h=f.pow(p);return d&&(h.value=a(h.value)),h}}}),b7="matAlgo11xS0s",w7=["typed","equalScalar"],Cr=B(b7,w7,e=>{var{typed:t,equalScalar:r}=e;return function(a,i,o,s){var u=a._values,l=a._index,c=a._ptr,f=a._size,m=a._datatype;if(!u)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var d=f[0],p=f[1],h,y=r,b=0,D=o;typeof m=="string"&&(h=m,y=t.find(r,[h,h]),b=t.convert(0,h),i=t.convert(i,h),D=t.find(o,[h,h]));for(var g=[],x=[],w=[],v=0;v<p;v++){w[v]=x.length;for(var A=c[v],C=c[v+1],N=A;N<C;N++){var E=l[N],S=s?D(i,u[N]):D(u[N],i);y(S,b)||(x.push(E),g.push(S))}}return w[p]=x.length,a.createSparseMatrix({values:g,index:x,ptr:w,size:[d,p],datatype:h})}}),x7="matAlgo12xSfs",D7=["typed","DenseMatrix"],or=B(x7,D7,e=>{var{typed:t,DenseMatrix:r}=e;return function(a,i,o,s){var u=a._values,l=a._index,c=a._ptr,f=a._size,m=a._datatype;if(!u)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var d=f[0],p=f[1],h,y=o;typeof m=="string"&&(h=m,i=t.convert(i,h),y=t.find(o,[h,h]));for(var b=[],D=[],g=[],x=0;x<p;x++){for(var w=x+1,v=c[x],A=c[x+1],C=v;C<A;C++){var N=l[C];D[N]=u[C],g[N]=w}for(var E=0;E<d;E++)x===0&&(b[E]=[]),g[E]===w?b[E][x]=s?y(i,D[E]):y(D[E],i):b[E][x]=s?y(i,0):y(0,i)}return new r({data:b,size:[d,p],datatype:h})}}),N7="matAlgo14xDs",A7=["typed"],Kn=B(N7,A7,e=>{var{typed:t}=e;return function(a,i,o,s){var u=a._data,l=a._size,c=a._datatype,f,m=o;typeof c=="string"&&(f=c,i=t.convert(i,f),m=t.find(o,[f,f]));var d=l.length>0?r(m,0,l,l[0],u,i,s):[];return a.createDenseMatrix({data:d,size:Ue(l),datatype:f})};function r(n,a,i,o,s,u,l){var c=[];if(a===i.length-1)for(var f=0;f<o;f++)c[f]=l?n(u,s[f]):n(s[f],u);else for(var m=0;m<o;m++)c[m]=r(n,a+1,i,i[a+1],s[m],u,l);return c}}),jm="ceil",C7=["typed","config","round","matrix","equalScalar","zeros","DenseMatrix"],E7=new li(10),S7=B(jm,["typed","config","round"],e=>{var{typed:t,config:r,round:n}=e;function a(i){var o=Math.ceil(i),s=n(i);return o===s?o:Ar(i,s,r.relTol,r.absTol)&&!Ar(i,o,r.relTol,r.absTol)?s:o}return t(jm,{number:a,"number, number":function(o,s){if(!$e(s))throw new RangeError("number of decimals in function ceil must be an integer");if(s<0||s>15)throw new RangeError("number of decimals in ceil number must be in range 0-15");var u=10**s;return a(o*u)/u}})}),M7=B(jm,C7,e=>{var{typed:t,config:r,round:n,matrix:a,equalScalar:i,zeros:o,DenseMatrix:s}=e,u=Cr({typed:t,equalScalar:i}),l=or({typed:t,DenseMatrix:s}),c=Kn({typed:t}),f=S7({typed:t,config:r,round:n});function m(d){var p=(b,D)=>Tn(b,D,r.relTol,r.absTol),h=d.ceil(),y=n(d);return h.eq(y)?h:p(d,y)&&!p(d,h)?y:h}return t("ceil",{number:f.signatures.number,"number,number":f.signatures["number,number"],Complex:function(p){return p.ceil()},"Complex, number":function(p,h){return p.ceil(h)},"Complex, BigNumber":function(p,h){return p.ceil(h.toNumber())},BigNumber:m,"BigNumber, BigNumber":function(p,h){var y=E7.pow(h);return m(p.mul(y)).div(y)},bigint:d=>d,"bigint, number":(d,p)=>d,"bigint, BigNumber":(d,p)=>d,Fraction:function(p){return p.ceil()},"Fraction, number":function(p,h){return p.ceil(h)},"Fraction, BigNumber":function(p,h){return p.ceil(h.toNumber())},"Unit, number, Unit":t.referToSelf(d=>function(p,h,y){var b=p.toNumeric(y);return y.multiply(d(b,h))}),"Unit, BigNumber, Unit":t.referToSelf(d=>(p,h,y)=>d(p,h.toNumber(),y)),"Array | Matrix, number | BigNumber, Unit":t.referToSelf(d=>(p,h,y)=>Xe(p,b=>d(b,h,y),!0)),"Array | Matrix | Unit, Unit":t.referToSelf(d=>(p,h)=>d(p,0,h)),"Array | Matrix":t.referToSelf(d=>p=>Xe(p,d,!0)),"Array, number | BigNumber":t.referToSelf(d=>(p,h)=>Xe(p,y=>d(y,h),!0)),"SparseMatrix, number | BigNumber":t.referToSelf(d=>(p,h)=>u(p,h,d,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(d=>(p,h)=>c(p,h,d,!1)),"number | Complex | Fraction | BigNumber, Array":t.referToSelf(d=>(p,h)=>c(a(h),p,d,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":t.referToSelf(d=>(p,h)=>i(p,0)?o(h.size(),h.storage()):h.storage()==="dense"?c(h,p,d,!0):l(h,p,d,!0))})}),_0="cube",T7=["typed"],F7=B(_0,T7,e=>{var{typed:t}=e;return t(_0,{number:Mx,Complex:function(n){return n.mul(n).mul(n)},BigNumber:function(n){return n.times(n).times(n)},bigint:function(n){return n*n*n},Fraction:function(n){return n.pow(3)},Unit:function(n){return n.pow(3)}})}),B0="exp",P7=["typed"],k7=B(B0,P7,e=>{var{typed:t}=e;return t(B0,{number:Tx,Complex:function(n){return n.exp()},BigNumber:function(n){return n.exp()}})}),I0="expm1",O7=["typed","Complex"],$7=B(I0,O7,e=>{var{typed:t,Complex:r}=e;return t(I0,{number:Fx,Complex:function(a){var i=Math.exp(a.re);return new r(i*Math.cos(a.im)-1,i*Math.sin(a.im))},BigNumber:function(a){return a.exp().minus(1)}})}),qm="fix",_7=["typed","Complex","matrix","ceil","floor","equalScalar","zeros","DenseMatrix"],B7=B(qm,["typed","ceil","floor"],e=>{var{typed:t,ceil:r,floor:n}=e;return t(qm,{number:function(i){return i>0?n(i):r(i)},"number, number":function(i,o){return i>0?n(i,o):r(i,o)}})}),I7=B(qm,_7,e=>{var{typed:t,Complex:r,matrix:n,ceil:a,floor:i,equalScalar:o,zeros:s,DenseMatrix:u}=e,l=or({typed:t,DenseMatrix:u}),c=Kn({typed:t}),f=B7({typed:t,ceil:a,floor:i});return t("fix",{number:f.signatures.number,"number, number | BigNumber":f.signatures["number,number"],Complex:function(d){return new r(d.re>0?Math.floor(d.re):Math.ceil(d.re),d.im>0?Math.floor(d.im):Math.ceil(d.im))},"Complex, number":function(d,p){return new r(d.re>0?i(d.re,p):a(d.re,p),d.im>0?i(d.im,p):a(d.im,p))},"Complex, BigNumber":function(d,p){var h=p.toNumber();return new r(d.re>0?i(d.re,h):a(d.re,h),d.im>0?i(d.im,h):a(d.im,h))},BigNumber:function(d){return d.isNegative()?a(d):i(d)},"BigNumber, number | BigNumber":function(d,p){return d.isNegative()?a(d,p):i(d,p)},bigint:m=>m,"bigint, number":(m,d)=>m,"bigint, BigNumber":(m,d)=>m,Fraction:function(d){return d.s<0n?d.ceil():d.floor()},"Fraction, number | BigNumber":function(d,p){return d.s<0n?a(d,p):i(d,p)},"Unit, number, Unit":t.referToSelf(m=>function(d,p,h){var y=d.toNumeric(h);return h.multiply(m(y,p))}),"Unit, BigNumber, Unit":t.referToSelf(m=>(d,p,h)=>m(d,p.toNumber(),h)),"Array | Matrix, number | BigNumber, Unit":t.referToSelf(m=>(d,p,h)=>Xe(d,y=>m(y,p,h),!0)),"Array | Matrix | Unit, Unit":t.referToSelf(m=>(d,p)=>m(d,0,p)),"Array | Matrix":t.referToSelf(m=>d=>Xe(d,m,!0)),"Array | Matrix, number | BigNumber":t.referToSelf(m=>(d,p)=>Xe(d,h=>m(h,p),!0)),"number | Complex | Fraction | BigNumber, Array":t.referToSelf(m=>(d,p)=>c(n(p),d,m,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":t.referToSelf(m=>(d,p)=>o(d,0)?s(p.size(),p.storage()):p.storage()==="dense"?c(p,d,m,!0):l(p,d,m,!0))})}),Rm="floor",z7=["typed","config","round","matrix","equalScalar","zeros","DenseMatrix"],j7=new li(10),q7=B(Rm,["typed","config","round"],e=>{var{typed:t,config:r,round:n}=e;function a(i){var o=Math.floor(i),s=n(i);return o===s?o:Ar(i,s,r.relTol,r.absTol)&&!Ar(i,o,r.relTol,r.absTol)?s:o}return t(Rm,{number:a,"number, number":function(o,s){if(!$e(s))throw new RangeError("number of decimals in function floor must be an integer");if(s<0||s>15)throw new RangeError("number of decimals in floor number must be in range 0 - 15");var u=10**s;return a(o*u)/u}})}),f2=B(Rm,z7,e=>{var{typed:t,config:r,round:n,matrix:a,equalScalar:i,zeros:o,DenseMatrix:s}=e,u=Cr({typed:t,equalScalar:i}),l=or({typed:t,DenseMatrix:s}),c=Kn({typed:t}),f=q7({typed:t,config:r,round:n});function m(d){var p=(b,D)=>Tn(b,D,r.relTol,r.absTol),h=d.floor(),y=n(d);return h.eq(y)?h:p(d,y)&&!p(d,h)?y:h}return t("floor",{number:f.signatures.number,"number,number":f.signatures["number,number"],Complex:function(p){return p.floor()},"Complex, number":function(p,h){return p.floor(h)},"Complex, BigNumber":function(p,h){return p.floor(h.toNumber())},BigNumber:m,"BigNumber, BigNumber":function(p,h){var y=j7.pow(h);return m(p.mul(y)).div(y)},bigint:d=>d,"bigint, number":(d,p)=>d,"bigint, BigNumber":(d,p)=>d,Fraction:function(p){return p.floor()},"Fraction, number":function(p,h){return p.floor(h)},"Fraction, BigNumber":function(p,h){return p.floor(h.toNumber())},"Unit, number, Unit":t.referToSelf(d=>function(p,h,y){var b=p.toNumeric(y);return y.multiply(d(b,h))}),"Unit, BigNumber, Unit":t.referToSelf(d=>(p,h,y)=>d(p,h.toNumber(),y)),"Array | Matrix, number | BigNumber, Unit":t.referToSelf(d=>(p,h,y)=>Xe(p,b=>d(b,h,y),!0)),"Array | Matrix | Unit, Unit":t.referToSelf(d=>(p,h)=>d(p,0,h)),"Array | Matrix":t.referToSelf(d=>p=>Xe(p,d,!0)),"Array, number | BigNumber":t.referToSelf(d=>(p,h)=>Xe(p,y=>d(y,h),!0)),"SparseMatrix, number | BigNumber":t.referToSelf(d=>(p,h)=>u(p,h,d,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(d=>(p,h)=>c(p,h,d,!1)),"number | Complex | Fraction | BigNumber, Array":t.referToSelf(d=>(p,h)=>c(a(h),p,d,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":t.referToSelf(d=>(p,h)=>i(p,0)?o(h.size(),h.storage()):h.storage()==="dense"?c(h,p,d,!0):l(h,p,d,!0))})}),R7="matAlgo02xDS0",L7=["typed","equalScalar"],Yn=B(R7,L7,e=>{var{typed:t,equalScalar:r}=e;return function(a,i,o,s){var u=a._data,l=a._size,c=a._datatype||a.getDataType(),f=i._values,m=i._index,d=i._ptr,p=i._size,h=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(l.length!==p.length)throw new it(l.length,p.length);if(l[0]!==p[0]||l[1]!==p[1])throw new RangeError("Dimension mismatch. Matrix A ("+l+") must match Matrix B ("+p+")");if(!f)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var y=l[0],b=l[1],D,g=r,x=0,w=o;typeof c=="string"&&c===h&&c!=="mixed"&&(D=c,g=t.find(r,[D,D]),x=t.convert(0,D),w=t.find(o,[D,D]));for(var v=[],A=[],C=[],N=0;N<b;N++){C[N]=A.length;for(var E=d[N],S=d[N+1],F=E;F<S;F++){var k=m[F],$=s?w(f[F],u[k][N]):w(u[k][N],f[F]);g($,x)||(A.push(k),v.push($))}}return C[b]=A.length,i.createSparseMatrix({values:v,index:A,ptr:C,size:[y,b],datatype:c===a._datatype&&h===i._datatype?D:void 0})}}),H7="matAlgo03xDSf",G7=["typed"],Ur=B(H7,G7,e=>{var{typed:t}=e;return function(n,a,i,o){var s=n._data,u=n._size,l=n._datatype||n.getDataType(),c=a._values,f=a._index,m=a._ptr,d=a._size,p=a._datatype||a._data===void 0?a._datatype:a.getDataType();if(u.length!==d.length)throw new it(u.length,d.length);if(u[0]!==d[0]||u[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+d+")");if(!c)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var h=u[0],y=u[1],b,D=0,g=i;typeof l=="string"&&l===p&&l!=="mixed"&&(b=l,D=t.convert(0,b),g=t.find(i,[b,b]));for(var x=[],w=0;w<h;w++)x[w]=[];for(var v=[],A=[],C=0;C<y;C++){for(var N=C+1,E=m[C],S=m[C+1],F=E;F<S;F++){var k=f[F];v[k]=o?g(c[F],s[k][C]):g(s[k][C],c[F]),A[k]=N}for(var $=0;$<h;$++)A[$]===N?x[$][C]=v[$]:x[$][C]=o?g(D,s[$][C]):g(s[$][C],D)}return n.createDenseMatrix({data:x,size:[h,y],datatype:l===n._datatype&&p===a._datatype?b:void 0})}}),V7="matAlgo05xSfSf",U7=["typed","equalScalar"],wc=B(V7,U7,e=>{var{typed:t,equalScalar:r}=e;return function(a,i,o){var s=a._values,u=a._index,l=a._ptr,c=a._size,f=a._datatype||a._data===void 0?a._datatype:a.getDataType(),m=i._values,d=i._index,p=i._ptr,h=i._size,y=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(c.length!==h.length)throw new it(c.length,h.length);if(c[0]!==h[0]||c[1]!==h[1])throw new RangeError("Dimension mismatch. Matrix A ("+c+") must match Matrix B ("+h+")");var b=c[0],D=c[1],g,x=r,w=0,v=o;typeof f=="string"&&f===y&&f!=="mixed"&&(g=f,x=t.find(r,[g,g]),w=t.convert(0,g),v=t.find(o,[g,g]));var A=s&&m?[]:void 0,C=[],N=[],E=A?[]:void 0,S=A?[]:void 0,F=[],k=[],$,_,T,z;for(_=0;_<D;_++){N[_]=C.length;var P=_+1;for(T=l[_],z=l[_+1];T<z;T++)$=u[T],C.push($),F[$]=P,E&&(E[$]=s[T]);for(T=p[_],z=p[_+1];T<z;T++)$=d[T],F[$]!==P&&C.push($),k[$]=P,S&&(S[$]=m[T]);if(A)for(T=N[_];T<C.length;){$=C[T];var j=F[$],O=k[$];if(j===P||O===P){var Q=j===P?E[$]:w,K=O===P?S[$]:w,U=v(Q,K);x(U,w)?C.splice(T,1):(A.push(U),T++)}}}return N[D]=C.length,a.createSparseMatrix({values:A,index:C,ptr:N,size:[b,D],datatype:f===a._datatype&&y===i._datatype?g:void 0})}}),W7="matAlgo13xDD",J7=["typed"],K7=B(W7,J7,e=>{var{typed:t}=e;return function(a,i,o){var s=a._data,u=a._size,l=a._datatype,c=i._data,f=i._size,m=i._datatype,d=[];if(u.length!==f.length)throw new it(u.length,f.length);for(var p=0;p<u.length;p++){if(u[p]!==f[p])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+f+")");d[p]=u[p]}var h,y=o;typeof l=="string"&&l===m&&(h=l,y=t.find(o,[h,h]));var b=d.length>0?r(y,0,d,d[0],s,c):[];return a.createDenseMatrix({data:b,size:d,datatype:h})};function r(n,a,i,o,s,u){var l=[];if(a===i.length-1)for(var c=0;c<o;c++)l[c]=n(s[c],u[c]);else for(var f=0;f<o;f++)l[f]=r(n,a+1,i,i[a+1],s[f],u[f]);return l}});function dr(e,t){if(Ba(e.size(),t.size()))return[e,t];var r=bd(e.size(),t.size());return[e,t].map(n=>Y7(n,r))}function Y7(e,t){return Ba(e.size(),t)?e:e.create(qi(e.valueOf(),t),e.datatype())}var Z7="matrixAlgorithmSuite",Q7=["typed","matrix"],Ot=B(Z7,Q7,e=>{var{typed:t,matrix:r}=e,n=K7({typed:t}),a=Kn({typed:t});return function(o){var s=o.elop,u=o.SD||o.DS,l;s?(l={"DenseMatrix, DenseMatrix":(d,p)=>n(...dr(d,p),s),"Array, Array":(d,p)=>n(...dr(r(d),r(p)),s).valueOf(),"Array, DenseMatrix":(d,p)=>n(...dr(r(d),p),s),"DenseMatrix, Array":(d,p)=>n(...dr(d,r(p)),s)},o.SS&&(l["SparseMatrix, SparseMatrix"]=(d,p)=>o.SS(...dr(d,p),s,!1)),o.DS&&(l["DenseMatrix, SparseMatrix"]=(d,p)=>o.DS(...dr(d,p),s,!1),l["Array, SparseMatrix"]=(d,p)=>o.DS(...dr(r(d),p),s,!1)),u&&(l["SparseMatrix, DenseMatrix"]=(d,p)=>u(...dr(p,d),s,!0),l["SparseMatrix, Array"]=(d,p)=>u(...dr(r(p),d),s,!0))):(l={"DenseMatrix, DenseMatrix":t.referToSelf(d=>(p,h)=>n(...dr(p,h),d)),"Array, Array":t.referToSelf(d=>(p,h)=>n(...dr(r(p),r(h)),d).valueOf()),"Array, DenseMatrix":t.referToSelf(d=>(p,h)=>n(...dr(r(p),h),d)),"DenseMatrix, Array":t.referToSelf(d=>(p,h)=>n(...dr(p,r(h)),d))},o.SS&&(l["SparseMatrix, SparseMatrix"]=t.referToSelf(d=>(p,h)=>o.SS(...dr(p,h),d,!1))),o.DS&&(l["DenseMatrix, SparseMatrix"]=t.referToSelf(d=>(p,h)=>o.DS(...dr(p,h),d,!1)),l["Array, SparseMatrix"]=t.referToSelf(d=>(p,h)=>o.DS(...dr(r(p),h),d,!1))),u&&(l["SparseMatrix, DenseMatrix"]=t.referToSelf(d=>(p,h)=>u(...dr(h,p),d,!0)),l["SparseMatrix, Array"]=t.referToSelf(d=>(p,h)=>u(...dr(r(h),p),d,!0))));var c=o.scalar||"any",f=o.Ds||o.Ss;f&&(s?(l["DenseMatrix,"+c]=(d,p)=>a(d,p,s,!1),l[c+", DenseMatrix"]=(d,p)=>a(p,d,s,!0),l["Array,"+c]=(d,p)=>a(r(d),p,s,!1).valueOf(),l[c+", Array"]=(d,p)=>a(r(p),d,s,!0).valueOf()):(l["DenseMatrix,"+c]=t.referToSelf(d=>(p,h)=>a(p,h,d,!1)),l[c+", DenseMatrix"]=t.referToSelf(d=>(p,h)=>a(h,p,d,!0)),l["Array,"+c]=t.referToSelf(d=>(p,h)=>a(r(p),h,d,!1).valueOf()),l[c+", Array"]=t.referToSelf(d=>(p,h)=>a(r(h),p,d,!0).valueOf())));var m=o.sS!==void 0?o.sS:o.Ss;return s?(o.Ss&&(l["SparseMatrix,"+c]=(d,p)=>o.Ss(d,p,s,!1)),m&&(l[c+", SparseMatrix"]=(d,p)=>m(p,d,s,!0))):(o.Ss&&(l["SparseMatrix,"+c]=t.referToSelf(d=>(p,h)=>o.Ss(p,h,d,!1))),m&&(l[c+", SparseMatrix"]=t.referToSelf(d=>(p,h)=>m(h,p,d,!0)))),s&&s.signatures&&Ww(l,s.signatures),l}}),z0="mod",X7=["typed","config","round","matrix","equalScalar","zeros","DenseMatrix","concat"],m2=B(z0,X7,e=>{var{typed:t,config:r,round:n,matrix:a,equalScalar:i,zeros:o,DenseMatrix:s,concat:u}=e,l=f2({typed:t,config:r,round:n,matrix:a,equalScalar:i,zeros:o,DenseMatrix:s}),c=Yn({typed:t,equalScalar:i}),f=Ur({typed:t}),m=wc({typed:t,equalScalar:i}),d=Cr({typed:t,equalScalar:i}),p=or({typed:t,DenseMatrix:s}),h=Ot({typed:t,matrix:a,concat:u});return t(z0,{"number, number":y,"BigNumber, BigNumber":function(D,g){return g.isZero()?D:D.sub(g.mul(l(D.div(g))))},"bigint, bigint":function(D,g){if(g===0n)return D;if(D<0){var x=D%g;return x===0n?x:x+g}return D%g},"Fraction, Fraction":function(D,g){return g.equals(0)?D:D.sub(g.mul(l(D.div(g))))}},h({SS:m,DS:f,SD:c,Ss:d,sS:p}));function y(b,D){return D===0?b:b-D*l(b/D)}}),ez="matAlgo01xDSid",tz=["typed"],hi=B(ez,tz,e=>{var{typed:t}=e;return function(n,a,i,o){var s=n._data,u=n._size,l=n._datatype||n.getDataType(),c=a._values,f=a._index,m=a._ptr,d=a._size,p=a._datatype||a._data===void 0?a._datatype:a.getDataType();if(u.length!==d.length)throw new it(u.length,d.length);if(u[0]!==d[0]||u[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+d+")");if(!c)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var h=u[0],y=u[1],b=typeof l=="string"&&l!=="mixed"&&l===p?l:void 0,D=b?t.find(i,[b,b]):i,g,x,w=[];for(g=0;g<h;g++)w[g]=[];var v=[],A=[];for(x=0;x<y;x++){for(var C=x+1,N=m[x],E=m[x+1],S=N;S<E;S++)g=f[S],v[g]=o?D(c[S],s[g][x]):D(s[g][x],c[S]),A[g]=C;for(g=0;g<h;g++)A[g]===C?w[g][x]=v[g]:w[g][x]=s[g][x]}return n.createDenseMatrix({data:w,size:[h,y],datatype:l===n._datatype&&p===a._datatype?b:void 0})}}),rz="matAlgo04xSidSid",nz=["typed","equalScalar"],Nd=B(rz,nz,e=>{var{typed:t,equalScalar:r}=e;return function(a,i,o){var s=a._values,u=a._index,l=a._ptr,c=a._size,f=a._datatype||a._data===void 0?a._datatype:a.getDataType(),m=i._values,d=i._index,p=i._ptr,h=i._size,y=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(c.length!==h.length)throw new it(c.length,h.length);if(c[0]!==h[0]||c[1]!==h[1])throw new RangeError("Dimension mismatch. Matrix A ("+c+") must match Matrix B ("+h+")");var b=c[0],D=c[1],g,x=r,w=0,v=o;typeof f=="string"&&f===y&&f!=="mixed"&&(g=f,x=t.find(r,[g,g]),w=t.convert(0,g),v=t.find(o,[g,g]));var A=s&&m?[]:void 0,C=[],N=[],E=s&&m?[]:void 0,S=s&&m?[]:void 0,F=[],k=[],$,_,T,z,P;for(_=0;_<D;_++){N[_]=C.length;var j=_+1;for(z=l[_],P=l[_+1],T=z;T<P;T++)$=u[T],C.push($),F[$]=j,E&&(E[$]=s[T]);for(z=p[_],P=p[_+1],T=z;T<P;T++)if($=d[T],F[$]===j){if(E){var O=v(E[$],m[T]);x(O,w)?F[$]=null:E[$]=O}}else C.push($),k[$]=j,S&&(S[$]=m[T]);if(E&&S)for(T=N[_];T<C.length;)$=C[T],F[$]===j?(A[T]=E[$],T++):k[$]===j?(A[T]=S[$],T++):C.splice(T,1)}return N[D]=C.length,a.createSparseMatrix({values:A,index:C,ptr:N,size:[b,D],datatype:f===a._datatype&&y===i._datatype?g:void 0})}}),az="matAlgo10xSids",iz=["typed","DenseMatrix"],Qi=B(az,iz,e=>{var{typed:t,DenseMatrix:r}=e;return function(a,i,o,s){var u=a._values,l=a._index,c=a._ptr,f=a._size,m=a._datatype;if(!u)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var d=f[0],p=f[1],h,y=o;typeof m=="string"&&(h=m,i=t.convert(i,h),y=t.find(o,[h,h]));for(var b=[],D=[],g=[],x=0;x<p;x++){for(var w=x+1,v=c[x],A=c[x+1],C=v;C<A;C++){var N=l[C];D[N]=u[C],g[N]=w}for(var E=0;E<d;E++)x===0&&(b[E]=[]),g[E]===w?b[E][x]=s?y(i,D[E]):y(D[E],i):b[E][x]=i}return new r({data:b,size:[d,p],datatype:h})}});function Xi(e,t,r,n){if(!(this instanceof Xi))throw new SyntaxError("Constructor must be called with the new operator");this.fn=e,this.count=t,this.min=r,this.max=n,this.message="Wrong number of arguments in function "+e+" ("+t+" provided, "+r+(n!=null?"-"+n:"")+" expected)",this.stack=new Error().stack}Xi.prototype=new Error;Xi.prototype.constructor=Error;Xi.prototype.name="ArgumentsError";Xi.prototype.isArgumentsError=!0;var j0="gcd",oz=["typed","config","round","matrix","equalScalar","zeros","BigNumber","DenseMatrix","concat"],Mf="number | BigNumber | Fraction | Matrix | Array",sz="".concat(Mf,", ").concat(Mf,", ...").concat(Mf);function q0(e){return!e.some(t=>Array.isArray(t))}var uz=B(j0,oz,e=>{var{typed:t,matrix:r,config:n,round:a,equalScalar:i,zeros:o,BigNumber:s,DenseMatrix:u,concat:l}=e,c=m2({typed:t,config:n,round:a,matrix:r,equalScalar:i,zeros:o,DenseMatrix:u,concat:l}),f=hi({typed:t}),m=Nd({typed:t,equalScalar:i}),d=Qi({typed:t,DenseMatrix:u}),p=Ot({typed:t,matrix:r,concat:l});return t(j0,{"number, number":h,"BigNumber, BigNumber":y,"Fraction, Fraction":(b,D)=>b.gcd(D)},p({SS:m,DS:f,Ss:d}),{[sz]:t.referToSelf(b=>(D,g,x)=>{for(var w=b(D,g),v=0;v<x.length;v++)w=b(w,x[v]);return w}),Array:t.referToSelf(b=>D=>{if(D.length===1&&Array.isArray(D[0])&&q0(D[0]))return b(...D[0]);if(q0(D))return b(...D);throw new Xi("gcd() supports only 1d matrices!")}),Matrix:t.referToSelf(b=>D=>b(D.toArray()))});function h(b,D){if(!$e(b)||!$e(D))throw new Error("Parameters in function gcd must be integer numbers");for(var g;D!==0;)g=c(b,D),b=D,D=g;return b<0?-b:b}function y(b,D){if(!b.isInt()||!D.isInt())throw new Error("Parameters in function gcd must be integer numbers");for(var g=new s(0);!D.isZero();){var x=c(b,D);b=D,D=x}return b.lt(g)?b.neg():b}}),lz="matAlgo06xS0S0",cz=["typed","equalScalar"],xc=B(lz,cz,e=>{var{typed:t,equalScalar:r}=e;return function(a,i,o){var s=a._values,u=a._size,l=a._datatype||a._data===void 0?a._datatype:a.getDataType(),c=i._values,f=i._size,m=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(u.length!==f.length)throw new it(u.length,f.length);if(u[0]!==f[0]||u[1]!==f[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+f+")");var d=u[0],p=u[1],h,y=r,b=0,D=o;typeof l=="string"&&l===m&&l!=="mixed"&&(h=l,y=t.find(r,[h,h]),b=t.convert(0,h),D=t.find(o,[h,h]));for(var g=s&&c?[]:void 0,x=[],w=[],v=g?[]:void 0,A=[],C=[],N=0;N<p;N++){w[N]=x.length;var E=N+1;if(l0(a,N,A,v,C,E,x,D),l0(i,N,A,v,C,E,x,D),v)for(var S=w[N];S<x.length;){var F=x[S];if(C[F]===E){var k=v[F];y(k,b)?x.splice(S,1):(g.push(k),S++)}else x.splice(S,1)}else for(var $=w[N];$<x.length;){var _=x[$];C[_]!==E?x.splice($,1):$++}}return w[p]=x.length,a.createSparseMatrix({values:g,index:x,ptr:w,size:[d,p],datatype:l===a._datatype&&m===i._datatype?h:void 0})}}),R0="lcm",fz=["typed","matrix","equalScalar","concat"],mz=B(R0,fz,e=>{var{typed:t,matrix:r,equalScalar:n,concat:a}=e,i=Yn({typed:t,equalScalar:n}),o=xc({typed:t,equalScalar:n}),s=Cr({typed:t,equalScalar:n}),u=Ot({typed:t,matrix:r,concat:a}),l="number | BigNumber | Fraction | Matrix | Array",c={};return c["".concat(l,", ").concat(l,", ...").concat(l)]=t.referToSelf(m=>(d,p,h)=>{for(var y=m(d,p),b=0;b<h.length;b++)y=m(y,h[b]);return y}),t(R0,{"number, number":Px,"BigNumber, BigNumber":f,"Fraction, Fraction":(m,d)=>m.lcm(d)},u({SS:o,DS:i,Ss:s}),c);function f(m,d){if(!m.isInt()||!d.isInt())throw new Error("Parameters in function lcm must be integer numbers");if(m.isZero())return m;if(d.isZero())return d;for(var p=m.times(d);!d.isZero();){var h=d;d=m.mod(h),m=h}return p.div(m).abs()}});function Ad(e,t,r,n){return function(a){if(a>0||r.predictable){if(a<=0)return NaN;var i=a.toString(16),o=i.substring(0,15);return e*(i.length-o.length)+t(+("0x"+o))}return n(a.toNumber())}}var L0="log10",dz=["typed","config","Complex"],hz=Vl(16),pz=B(L0,dz,e=>{var{typed:t,config:r,Complex:n}=e;function a(o){return o.log().div(Math.LN10)}function i(o){return a(new n(o,0))}return t(L0,{number:function(s){return s>=0||r.predictable?Vl(s):i(s)},bigint:Ad(hz,Vl,r,i),Complex:a,BigNumber:function(s){return!s.isNegative()||r.predictable?s.log():i(s.toNumber())},"Array | Matrix":t.referToSelf(o=>s=>Xe(s,o))})}),H0="log2",gz=["typed","config","Complex"],vz=B(H0,gz,e=>{var{typed:t,config:r,Complex:n}=e;function a(o){return i(new n(o,0))}return t(H0,{number:function(s){return s>=0||r.predictable?Om(s):a(s)},bigint:Ad(4,Om,r,a),Complex:i,BigNumber:function(s){return!s.isNegative()||r.predictable?s.log(2):a(s.toNumber())},"Array | Matrix":t.referToSelf(o=>s=>Xe(s,o))});function i(o){var s=Math.sqrt(o.re*o.re+o.im*o.im);return new n(Math.log2?Math.log2(s):Math.log(s)/Math.LN2,Math.atan2(o.im,o.re)/Math.LN2)}}),yz="multiplyScalar",bz=["typed"],wz=B(yz,bz,e=>{var{typed:t}=e;return t("multiplyScalar",{"number, number":Cx,"Complex, Complex":function(n,a){return n.mul(a)},"BigNumber, BigNumber":function(n,a){return n.times(a)},"bigint, bigint":function(n,a){return n*a},"Fraction, Fraction":function(n,a){return n.mul(a)},"number | Fraction | BigNumber | Complex, Unit":(r,n)=>n.multiply(r),"Unit, number | Fraction | BigNumber | Complex | Unit":(r,n)=>r.multiply(n)})}),G0="multiply",xz=["typed","matrix","addScalar","multiplyScalar","equalScalar","dot"],Dz=B(G0,xz,e=>{var{typed:t,matrix:r,addScalar:n,multiplyScalar:a,equalScalar:i,dot:o}=e,s=Cr({typed:t,equalScalar:i}),u=Kn({typed:t});function l(w,v){switch(w.length){case 1:switch(v.length){case 1:if(w[0]!==v[0])throw new RangeError("Dimension mismatch in multiplication. Vectors must have the same length");break;case 2:if(w[0]!==v[0])throw new RangeError("Dimension mismatch in multiplication. Vector length ("+w[0]+") must match Matrix rows ("+v[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+v.length+" dimensions)")}break;case 2:switch(v.length){case 1:if(w[1]!==v[0])throw new RangeError("Dimension mismatch in multiplication. Matrix columns ("+w[1]+") must match Vector length ("+v[0]+")");break;case 2:if(w[1]!==v[0])throw new RangeError("Dimension mismatch in multiplication. Matrix A columns ("+w[1]+") must match Matrix B rows ("+v[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+v.length+" dimensions)")}break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix A has "+w.length+" dimensions)")}}function c(w,v,A){if(A===0)throw new Error("Cannot multiply two empty vectors");return o(w,v)}function f(w,v){if(v.storage()!=="dense")throw new Error("Support for SparseMatrix not implemented");return m(w,v)}function m(w,v){var A=w._data,C=w._size,N=w._datatype||w.getDataType(),E=v._data,S=v._size,F=v._datatype||v.getDataType(),k=C[0],$=S[1],_,T=n,z=a;N&&F&&N===F&&typeof N=="string"&&N!=="mixed"&&(_=N,T=t.find(n,[_,_]),z=t.find(a,[_,_]));for(var P=[],j=0;j<$;j++){for(var O=z(A[0],E[0][j]),Q=1;Q<k;Q++)O=T(O,z(A[Q],E[Q][j]));P[j]=O}return w.createDenseMatrix({data:P,size:[$],datatype:N===w._datatype&&F===v._datatype?_:void 0})}var d=t("_multiplyMatrixVector",{"DenseMatrix, any":h,"SparseMatrix, any":D}),p=t("_multiplyMatrixMatrix",{"DenseMatrix, DenseMatrix":y,"DenseMatrix, SparseMatrix":b,"SparseMatrix, DenseMatrix":g,"SparseMatrix, SparseMatrix":x});function h(w,v){var A=w._data,C=w._size,N=w._datatype||w.getDataType(),E=v._data,S=v._datatype||v.getDataType(),F=C[0],k=C[1],$,_=n,T=a;N&&S&&N===S&&typeof N=="string"&&N!=="mixed"&&($=N,_=t.find(n,[$,$]),T=t.find(a,[$,$]));for(var z=[],P=0;P<F;P++){for(var j=A[P],O=T(j[0],E[0]),Q=1;Q<k;Q++)O=_(O,T(j[Q],E[Q]));z[P]=O}return w.createDenseMatrix({data:z,size:[F],datatype:N===w._datatype&&S===v._datatype?$:void 0})}function y(w,v){var A=w._data,C=w._size,N=w._datatype||w.getDataType(),E=v._data,S=v._size,F=v._datatype||v.getDataType(),k=C[0],$=C[1],_=S[1],T,z=n,P=a;N&&F&&N===F&&typeof N=="string"&&N!=="mixed"&&N!=="mixed"&&(T=N,z=t.find(n,[T,T]),P=t.find(a,[T,T]));for(var j=[],O=0;O<k;O++){var Q=A[O];j[O]=[];for(var K=0;K<_;K++){for(var U=P(Q[0],E[0][K]),V=1;V<$;V++)U=z(U,P(Q[V],E[V][K]));j[O][K]=U}}return w.createDenseMatrix({data:j,size:[k,_],datatype:N===w._datatype&&F===v._datatype?T:void 0})}function b(w,v){var A=w._data,C=w._size,N=w._datatype||w.getDataType(),E=v._values,S=v._index,F=v._ptr,k=v._size,$=v._datatype||v._data===void 0?v._datatype:v.getDataType();if(!E)throw new Error("Cannot multiply Dense Matrix times Pattern only Matrix");var _=C[0],T=k[1],z,P=n,j=a,O=i,Q=0;N&&$&&N===$&&typeof N=="string"&&N!=="mixed"&&(z=N,P=t.find(n,[z,z]),j=t.find(a,[z,z]),O=t.find(i,[z,z]),Q=t.convert(0,z));for(var K=[],U=[],V=[],le=v.createSparseMatrix({values:K,index:U,ptr:V,size:[_,T],datatype:N===w._datatype&&$===v._datatype?z:void 0}),ne=0;ne<T;ne++){V[ne]=U.length;var ee=F[ne],L=F[ne+1];if(L>ee)for(var R=0,J=0;J<_;J++){for(var re=J+1,te=void 0,ue=ee;ue<L;ue++){var oe=S[ue];R!==re?(te=j(A[J][oe],E[ue]),R=re):te=P(te,j(A[J][oe],E[ue]))}R===re&&!O(te,Q)&&(U.push(J),K.push(te))}}return V[T]=U.length,le}function D(w,v){var A=w._values,C=w._index,N=w._ptr,E=w._datatype||w._data===void 0?w._datatype:w.getDataType();if(!A)throw new Error("Cannot multiply Pattern only Matrix times Dense Matrix");var S=v._data,F=v._datatype||v.getDataType(),k=w._size[0],$=v._size[0],_=[],T=[],z=[],P,j=n,O=a,Q=i,K=0;E&&F&&E===F&&typeof E=="string"&&E!=="mixed"&&(P=E,j=t.find(n,[P,P]),O=t.find(a,[P,P]),Q=t.find(i,[P,P]),K=t.convert(0,P));var U=[],V=[];z[0]=0;for(var le=0;le<$;le++){var ne=S[le];if(!Q(ne,K))for(var ee=N[le],L=N[le+1],R=ee;R<L;R++){var J=C[R];V[J]?U[J]=j(U[J],O(ne,A[R])):(V[J]=!0,T.push(J),U[J]=O(ne,A[R]))}}for(var re=T.length,te=0;te<re;te++){var ue=T[te];_[te]=U[ue]}return z[1]=T.length,w.createSparseMatrix({values:_,index:T,ptr:z,size:[k,1],datatype:E===w._datatype&&F===v._datatype?P:void 0})}function g(w,v){var A=w._values,C=w._index,N=w._ptr,E=w._datatype||w._data===void 0?w._datatype:w.getDataType();if(!A)throw new Error("Cannot multiply Pattern only Matrix times Dense Matrix");var S=v._data,F=v._datatype||v.getDataType(),k=w._size[0],$=v._size[0],_=v._size[1],T,z=n,P=a,j=i,O=0;E&&F&&E===F&&typeof E=="string"&&E!=="mixed"&&(T=E,z=t.find(n,[T,T]),P=t.find(a,[T,T]),j=t.find(i,[T,T]),O=t.convert(0,T));for(var Q=[],K=[],U=[],V=w.createSparseMatrix({values:Q,index:K,ptr:U,size:[k,_],datatype:E===w._datatype&&F===v._datatype?T:void 0}),le=[],ne=[],ee=0;ee<_;ee++){U[ee]=K.length;for(var L=ee+1,R=0;R<$;R++){var J=S[R][ee];if(!j(J,O))for(var re=N[R],te=N[R+1],ue=re;ue<te;ue++){var oe=C[ue];ne[oe]!==L?(ne[oe]=L,K.push(oe),le[oe]=P(J,A[ue])):le[oe]=z(le[oe],P(J,A[ue]))}}for(var De=U[ee],q=K.length,H=De;H<q;H++){var Z=K[H];Q[H]=le[Z]}}return U[_]=K.length,V}function x(w,v){var A=w._values,C=w._index,N=w._ptr,E=w._datatype||w._data===void 0?w._datatype:w.getDataType(),S=v._values,F=v._index,k=v._ptr,$=v._datatype||v._data===void 0?v._datatype:v.getDataType(),_=w._size[0],T=v._size[1],z=A&&S,P,j=n,O=a;E&&$&&E===$&&typeof E=="string"&&E!=="mixed"&&(P=E,j=t.find(n,[P,P]),O=t.find(a,[P,P]));for(var Q=z?[]:void 0,K=[],U=[],V=w.createSparseMatrix({values:Q,index:K,ptr:U,size:[_,T],datatype:E===w._datatype&&$===v._datatype?P:void 0}),le=z?[]:void 0,ne=[],ee,L,R,J,re,te,ue,oe,De=0;De<T;De++){U[De]=K.length;var q=De+1;for(re=k[De],te=k[De+1],J=re;J<te;J++)if(oe=F[J],z)for(L=N[oe],R=N[oe+1],ee=L;ee<R;ee++)ue=C[ee],ne[ue]!==q?(ne[ue]=q,K.push(ue),le[ue]=O(S[J],A[ee])):le[ue]=j(le[ue],O(S[J],A[ee]));else for(L=N[oe],R=N[oe+1],ee=L;ee<R;ee++)ue=C[ee],ne[ue]!==q&&(ne[ue]=q,K.push(ue));if(z)for(var H=U[De],Z=K.length,ae=H;ae<Z;ae++){var he=K[ae];Q[ae]=le[he]}}return U[T]=K.length,V}return t(G0,a,{"Array, Array":t.referTo("Matrix, Matrix",w=>(v,A)=>{l(Ve(v),Ve(A));var C=w(r(v),r(A));return je(C)?C.valueOf():C}),"Matrix, Matrix":function(v,A){var C=v.size(),N=A.size();return l(C,N),C.length===1?N.length===1?c(v,A,C[0]):f(v,A):N.length===1?d(v,A):p(v,A)},"Matrix, Array":t.referTo("Matrix,Matrix",w=>(v,A)=>w(v,r(A))),"Array, Matrix":t.referToSelf(w=>(v,A)=>w(r(v,A.storage()),A)),"SparseMatrix, any":function(v,A){return s(v,A,a,!1)},"DenseMatrix, any":function(v,A){return u(v,A,a,!1)},"any, SparseMatrix":function(v,A){return s(A,v,a,!0)},"any, DenseMatrix":function(v,A){return u(A,v,a,!0)},"Array, any":function(v,A){return u(r(v),A,a,!1).valueOf()},"any, Array":function(v,A){return u(r(A),v,a,!0).valueOf()},"any, any":a,"any, any, ...any":t.referToSelf(w=>(v,A,C)=>{for(var N=w(v,A),E=0;E<C.length;E++)N=w(N,C[E]);return N})})}),V0="nthRoot",Nz=["typed","matrix","equalScalar","BigNumber","concat"],Az=B(V0,Nz,e=>{var{typed:t,matrix:r,equalScalar:n,BigNumber:a,concat:i}=e,o=hi({typed:t}),s=Yn({typed:t,equalScalar:n}),u=xc({typed:t,equalScalar:n}),l=Cr({typed:t,equalScalar:n}),c=Ot({typed:t,matrix:r,concat:i});function f(){throw new Error("Complex number not supported in function nthRoot. Use nthRoots instead.")}return t(V0,{number:m0,"number, number":m0,BigNumber:d=>m(d,new a(2)),"BigNumber, BigNumber":m,Complex:f,"Complex, number":f,Array:t.referTo("DenseMatrix,number",d=>p=>d(r(p),2).valueOf()),DenseMatrix:t.referTo("DenseMatrix,number",d=>p=>d(p,2)),SparseMatrix:t.referTo("SparseMatrix,number",d=>p=>d(p,2)),"SparseMatrix, SparseMatrix":t.referToSelf(d=>(p,h)=>{if(h.density()===1)return u(p,h,d);throw new Error("Root must be non-zero")}),"DenseMatrix, SparseMatrix":t.referToSelf(d=>(p,h)=>{if(h.density()===1)return o(p,h,d,!1);throw new Error("Root must be non-zero")}),"Array, SparseMatrix":t.referTo("DenseMatrix,SparseMatrix",d=>(p,h)=>d(r(p),h)),"number | BigNumber, SparseMatrix":t.referToSelf(d=>(p,h)=>{if(h.density()===1)return l(h,p,d,!0);throw new Error("Root must be non-zero")})},c({scalar:"number | BigNumber",SD:s,Ss:l,sS:!1}));function m(d,p){var h=a.precision,y=a.clone({precision:h+2}),b=new a(0),D=new y(1),g=p.isNegative();if(g&&(p=p.neg()),p.isZero())throw new Error("Root must be non-zero");if(d.isNegative()&&!p.abs().mod(2).equals(1))throw new Error("Root must be odd when a is negative.");if(d.isZero())return g?new y(1/0):0;if(!d.isFinite())return g?b:d;var x=d.abs().pow(D.div(p));return x=d.isNeg()?x.neg():x,new a((g?D.div(x):x).toPrecision(h))}}),U0="sign",Cz=["typed","BigNumber","Fraction","complex"],Ez=B(U0,Cz,e=>{var{typed:t,BigNumber:r,complex:n,Fraction:a}=e;return t(U0,{number:$m,Complex:function(o){return o.im===0?n($m(o.re)):o.sign()},BigNumber:function(o){return new r(o.cmp(0))},bigint:function(o){return o>0n?1n:o<0n?-1n:0n},Fraction:function(o){return new a(o.s)},"Array | Matrix":t.referToSelf(i=>o=>Xe(o,i,!0)),Unit:t.referToSelf(i=>o=>{if(!o._isDerived()&&o.units[0].unit.offset!==0)throw new TypeError("sign is ambiguous for units with offset");return t.find(i,o.valueType())(o.value)})})}),Sz="sqrt",Mz=["config","typed","Complex"],Tz=B(Sz,Mz,e=>{var{config:t,typed:r,Complex:n}=e;return r("sqrt",{number:a,Complex:function(o){return o.sqrt()},BigNumber:function(o){return!o.isNegative()||t.predictable?o.sqrt():a(o.toNumber())},Unit:function(o){return o.pow(.5)}});function a(i){return isNaN(i)?NaN:i>=0||t.predictable?Math.sqrt(i):new n(i,0).sqrt()}}),W0="square",Fz=["typed"],Pz=B(W0,Fz,e=>{var{typed:t}=e;return t(W0,{number:kx,Complex:function(n){return n.mul(n)},BigNumber:function(n){return n.times(n)},bigint:function(n){return n*n},Fraction:function(n){return n.mul(n)},Unit:function(n){return n.pow(2)}})}),J0="subtract",kz=["typed","matrix","equalScalar","subtractScalar","unaryMinus","DenseMatrix","concat"],Oz=B(J0,kz,e=>{var{typed:t,matrix:r,equalScalar:n,subtractScalar:a,unaryMinus:i,DenseMatrix:o,concat:s}=e,u=hi({typed:t}),l=Ur({typed:t}),c=wc({typed:t,equalScalar:n}),f=Qi({typed:t,DenseMatrix:o}),m=or({typed:t,DenseMatrix:o}),d=Ot({typed:t,matrix:r,concat:s});return t(J0,{"any, any":a},d({elop:a,SS:c,DS:u,SD:l,Ss:m,sS:f}))}),K0="xgcd",$z=["typed","config","matrix","BigNumber"],_z=B(K0,$z,e=>{var{typed:t,config:r,matrix:n,BigNumber:a}=e;return t(K0,{"number, number":function(s,u){var l=Ox(s,u);return r.matrix==="Array"?l:n(l)},"BigNumber, BigNumber":i});function i(o,s){var u,l,c,f=new a(0),m=new a(1),d=f,p=m,h=m,y=f;if(!o.isInt()||!s.isInt())throw new Error("Parameters in function xgcd must be integer numbers");for(;!s.isZero();)l=o.div(s).floor(),c=o.mod(s),u=d,d=p.minus(l.times(d)),p=u,u=h,h=y.minus(l.times(h)),y=u,o=s,s=c;var b;return o.lt(f)?b=[o.neg(),p.neg(),y.neg()]:b=[o,o.isZero()?0:p,y],r.matrix==="Array"?b:n(b)}}),Y0="invmod",Bz=["typed","config","BigNumber","xgcd","equal","smaller","mod","add","isInteger"],Iz=B(Y0,Bz,e=>{var{typed:t,config:r,BigNumber:n,xgcd:a,equal:i,smaller:o,mod:s,add:u,isInteger:l}=e;return t(Y0,{"number, number":c,"BigNumber, BigNumber":c});function c(f,m){if(!l(f)||!l(m))throw new Error("Parameters in function invmod must be integer numbers");if(f=s(f,m),i(m,0))throw new Error("Divisor must be non zero");var d=a(f,m);d=d.valueOf();var[p,h]=d;return i(p,n(1))?(h=s(h,m),o(h,n(0))&&(h=u(h,m)),h):NaN}}),zz="matAlgo09xS0Sf",jz=["typed","equalScalar"],d2=B(zz,jz,e=>{var{typed:t,equalScalar:r}=e;return function(a,i,o){var s=a._values,u=a._index,l=a._ptr,c=a._size,f=a._datatype||a._data===void 0?a._datatype:a.getDataType(),m=i._values,d=i._index,p=i._ptr,h=i._size,y=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(c.length!==h.length)throw new it(c.length,h.length);if(c[0]!==h[0]||c[1]!==h[1])throw new RangeError("Dimension mismatch. Matrix A ("+c+") must match Matrix B ("+h+")");var b=c[0],D=c[1],g,x=r,w=0,v=o;typeof f=="string"&&f===y&&f!=="mixed"&&(g=f,x=t.find(r,[g,g]),w=t.convert(0,g),v=t.find(o,[g,g]));var A=s&&m?[]:void 0,C=[],N=[],E=A?[]:void 0,S=[],F,k,$,_,T;for(k=0;k<D;k++){N[k]=C.length;var z=k+1;if(E)for(_=p[k],T=p[k+1],$=_;$<T;$++)F=d[$],S[F]=z,E[F]=m[$];for(_=l[k],T=l[k+1],$=_;$<T;$++)if(F=u[$],E){var P=S[F]===z?E[F]:w,j=v(s[$],P);x(j,w)||(C.push(F),A.push(j))}else C.push(F)}return N[D]=C.length,a.createSparseMatrix({values:A,index:C,ptr:N,size:[b,D],datatype:f===a._datatype&&y===i._datatype?g:void 0})}}),Z0="dotMultiply",qz=["typed","matrix","equalScalar","multiplyScalar","concat"],Rz=B(Z0,qz,e=>{var{typed:t,matrix:r,equalScalar:n,multiplyScalar:a,concat:i}=e,o=Yn({typed:t,equalScalar:n}),s=d2({typed:t,equalScalar:n}),u=Cr({typed:t,equalScalar:n}),l=Ot({typed:t,matrix:r,concat:i});return t(Z0,l({elop:a,SS:s,DS:o,Ss:u}))});function Lz(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function bitAnd");var r=e.constructor;if(e.isNaN()||t.isNaN())return new r(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 r(0);if(!e.isFinite())return t.isNegative()?e:e.isNegative()?new r(0):t;if(!t.isFinite())return e.isNegative()?t:t.isNegative()?new r(0):e}return Cd(e,t,function(n,a){return n&a})}function qs(e){if(e.isFinite()&&!e.isInteger())throw new Error("Integer expected in function bitNot");var t=e.constructor,r=t.precision;t.config({precision:1e9});var n=e.plus(new t(1));return n.s=-n.s||null,t.config({precision:r}),n}function Hz(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function bitOr");var r=e.constructor;if(e.isNaN()||t.isNaN())return new r(NaN);var n=new r(-1);return e.isZero()||t.eq(n)||e.eq(t)?t:t.isZero()||e.eq(n)?e:!e.isFinite()||!t.isFinite()?!e.isFinite()&&!e.isNegative()&&t.isNegative()||e.isNegative()&&!t.isNegative()&&!t.isFinite()?n:e.isNegative()&&t.isNegative()?e.isFinite()?e:t:e.isFinite()?t:e:Cd(e,t,function(a,i){return a|i})}function Cd(e,t,r){var n=e.constructor,a,i,o=+(e.s<0),s=+(t.s<0);if(o){a=Zu(qs(e));for(var u=0;u<a.length;++u)a[u]^=1}else a=Zu(e);if(s){i=Zu(qs(t));for(var l=0;l<i.length;++l)i[l]^=1}else i=Zu(t);var c,f,m;a.length<=i.length?(c=a,f=i,m=o):(c=i,f=a,m=s);var d=c.length,p=f.length,h=r(o,s)^1,y=new n(h^1),b=new n(1),D=new n(2),g=n.precision;for(n.config({precision:1e9});d>0;)r(c[--d],f[--p])===h&&(y=y.plus(b)),b=b.times(D);for(;p>0;)r(m,f[--p])===h&&(y=y.plus(b)),b=b.times(D);return n.config({precision:g}),h===0&&(y.s=-y.s),y}function Zu(e){for(var t=e.d,r=t[0]+"",n=1;n<t.length;++n){for(var a=t[n]+"",i=7-a.length;i--;)a="0"+a;r+=a}for(var o=r.length;r.charAt(o)==="0";)o--;var s=e.e,u=r.slice(0,o+1||1),l=u.length;if(s>0)if(++s>l)for(s-=l;s--;)u+="0";else s<l&&(u=u.slice(0,s)+"."+u.slice(s));for(var c=[0],f=0;f<u.length;){for(var m=c.length;m--;)c[m]*=10;c[0]+=parseInt(u.charAt(f++));for(var d=0;d<c.length;++d)c[d]>1&&((c[d+1]===null||c[d+1]===void 0)&&(c[d+1]=0),c[d+1]+=c[d]>>1,c[d]&=1)}return c.reverse()}function Gz(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function bitXor");var r=e.constructor;if(e.isNaN()||t.isNaN())return new r(NaN);if(e.isZero())return t;if(t.isZero())return e;if(e.eq(t))return new r(0);var n=new r(-1);return e.eq(n)?qs(t):t.eq(n)?qs(e):!e.isFinite()||!t.isFinite()?!e.isFinite()&&!t.isFinite()?n:new r(e.isNegative()===t.isNegative()?1/0:-1/0):Cd(e,t,function(a,i){return a^i})}function Vz(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function leftShift");var r=e.constructor;return e.isNaN()||t.isNaN()||t.isNegative()&&!t.isZero()?new r(NaN):e.isZero()||t.isZero()?e:!e.isFinite()&&!t.isFinite()?new r(NaN):t.lt(55)?e.times(Math.pow(2,t.toNumber())+""):e.times(new r(2).pow(t))}function Uz(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function rightArithShift");var r=e.constructor;return e.isNaN()||t.isNaN()||t.isNegative()&&!t.isZero()?new r(NaN):e.isZero()||t.isZero()?e:t.isFinite()?t.lt(55)?e.div(Math.pow(2,t.toNumber())+"").floor():e.div(new r(2).pow(t)).floor():e.isNegative()?new r(-1):e.isFinite()?new r(0):new r(NaN)}var Q0="bitAnd",Wz=["typed","matrix","equalScalar","concat"],h2=B(Q0,Wz,e=>{var{typed:t,matrix:r,equalScalar:n,concat:a}=e,i=Yn({typed:t,equalScalar:n}),o=xc({typed:t,equalScalar:n}),s=Cr({typed:t,equalScalar:n}),u=Ot({typed:t,matrix:r,concat:a});return t(Q0,{"number, number":_x,"BigNumber, BigNumber":Lz,"bigint, bigint":(l,c)=>l&c},u({SS:o,DS:i,Ss:s}))}),X0="bitNot",Jz=["typed"],Kz=B(X0,Jz,e=>{var{typed:t}=e;return t(X0,{number:Bx,BigNumber:qs,bigint:r=>~r,"Array | Matrix":t.referToSelf(r=>n=>Xe(n,r))})}),ev="bitOr",Yz=["typed","matrix","equalScalar","DenseMatrix","concat"],p2=B(ev,Yz,e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i}=e,o=hi({typed:t}),s=Nd({typed:t,equalScalar:n}),u=Qi({typed:t,DenseMatrix:a}),l=Ot({typed:t,matrix:r,concat:i});return t(ev,{"number, number":Ix,"BigNumber, BigNumber":Hz,"bigint, bigint":(c,f)=>c|f},l({SS:s,DS:o,Ss:u}))}),Zz="matAlgo07xSSf",Qz=["typed","SparseMatrix"],ua=B(Zz,Qz,e=>{var{typed:t,SparseMatrix:r}=e;return function(i,o,s){var u=i._size,l=i._datatype||i._data===void 0?i._datatype:i.getDataType(),c=o._size,f=o._datatype||o._data===void 0?o._datatype:o.getDataType();if(u.length!==c.length)throw new it(u.length,c.length);if(u[0]!==c[0]||u[1]!==c[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+c+")");var m=u[0],d=u[1],p,h=0,y=s;typeof l=="string"&&l===f&&l!=="mixed"&&(p=l,h=t.convert(0,p),y=t.find(s,[p,p]));for(var b=[],D=[],g=new Array(d+1).fill(0),x=[],w=[],v=[],A=[],C=0;C<d;C++){var N=C+1,E=0;n(i,C,v,x,N),n(o,C,A,w,N);for(var S=0;S<m;S++){var F=v[S]===N?x[S]:h,k=A[S]===N?w[S]:h,$=y(F,k);$!==0&&$!==!1&&(D.push(S),b.push($),E++)}g[C+1]=g[C]+E}return new r({values:b,index:D,ptr:g,size:[m,d],datatype:l===i._datatype&&f===o._datatype?p:void 0})};function n(a,i,o,s,u){for(var l=a._values,c=a._index,f=a._ptr,m=f[i],d=f[i+1];m<d;m++){var p=c[m];o[p]=u,s[p]=l[m]}}}),tv="bitXor",Xz=["typed","matrix","DenseMatrix","concat","SparseMatrix"],ej=B(tv,Xz,e=>{var{typed:t,matrix:r,DenseMatrix:n,concat:a,SparseMatrix:i}=e,o=Ur({typed:t}),s=ua({typed:t,SparseMatrix:i}),u=or({typed:t,DenseMatrix:n}),l=Ot({typed:t,matrix:r,concat:a});return t(tv,{"number, number":zx,"BigNumber, BigNumber":Gz,"bigint, bigint":(c,f)=>c^f},l({SS:s,DS:o,Ss:u}))}),rv="arg",tj=["typed"],rj=B(rv,tj,e=>{var{typed:t}=e;return t(rv,{number:function(n){return Math.atan2(0,n)},BigNumber:function(n){return n.constructor.atan2(0,n)},Complex:function(n){return n.arg()},"Array | Matrix":t.referToSelf(r=>n=>Xe(n,r))})}),nv="conj",nj=["typed"],aj=B(nv,nj,e=>{var{typed:t}=e;return t(nv,{"number | BigNumber | Fraction":r=>r,Complex:r=>r.conjugate(),Unit:t.referToSelf(r=>n=>new n.constructor(r(n.toNumeric()),n.formatUnits())),"Array | Matrix":t.referToSelf(r=>n=>Xe(n,r))})}),av="im",ij=["typed"],oj=B(av,ij,e=>{var{typed:t}=e;return t(av,{number:()=>0,"BigNumber | Fraction":r=>r.mul(0),Complex:r=>r.im,"Array | Matrix":t.referToSelf(r=>n=>Xe(n,r))})}),iv="re",sj=["typed"],uj=B(iv,sj,e=>{var{typed:t}=e;return t(iv,{"number | BigNumber | Fraction":r=>r,Complex:r=>r.re,"Array | Matrix":t.referToSelf(r=>n=>Xe(n,r))})}),ov="not",lj=["typed"],cj=B(ov,lj,e=>{var{typed:t}=e;return t(ov,{"null | undefined":()=>!0,number:Hx,Complex:function(n){return n.re===0&&n.im===0},BigNumber:function(n){return n.isZero()||n.isNaN()},bigint:r=>!r,Unit:t.referToSelf(r=>n=>t.find(r,n.valueType())(n.value)),"Array | Matrix":t.referToSelf(r=>n=>Xe(n,r))})}),sv="or",fj=["typed","matrix","equalScalar","DenseMatrix","concat"],g2=B(sv,fj,e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i}=e,o=Ur({typed:t}),s=wc({typed:t,equalScalar:n}),u=or({typed:t,DenseMatrix:a}),l=Ot({typed:t,matrix:r,concat:i});return t(sv,{"number, number":_m,"Complex, Complex":function(f,m){return f.re!==0||f.im!==0||m.re!==0||m.im!==0},"BigNumber, BigNumber":function(f,m){return!f.isZero()&&!f.isNaN()||!m.isZero()&&!m.isNaN()},"bigint, bigint":_m,"Unit, Unit":t.referToSelf(c=>(f,m)=>c(f.value||0,m.value||0))},l({SS:s,DS:o,Ss:u}))}),uv="xor",mj=["typed","matrix","DenseMatrix","concat","SparseMatrix"],dj=B(uv,mj,e=>{var{typed:t,matrix:r,DenseMatrix:n,concat:a,SparseMatrix:i}=e,o=Ur({typed:t}),s=ua({typed:t,SparseMatrix:i}),u=or({typed:t,DenseMatrix:n}),l=Ot({typed:t,matrix:r,concat:a});return t(uv,{"number, number":Bm,"Complex, Complex":function(f,m){return(f.re!==0||f.im!==0)!=(m.re!==0||m.im!==0)},"bigint, bigint":Bm,"BigNumber, BigNumber":function(f,m){return(!f.isZero()&&!f.isNaN())!=(!m.isZero()&&!m.isNaN())},"Unit, Unit":t.referToSelf(c=>(f,m)=>c(f.value||0,m.value||0))},l({SS:s,DS:o,Ss:u}))}),lv="concat",hj=["typed","matrix","isInteger"],v2=B(lv,hj,e=>{var{typed:t,matrix:r,isInteger:n}=e;return t(lv,{"...Array | Matrix | number | BigNumber":function(i){var o,s=i.length,u=-1,l,c=!1,f=[];for(o=0;o<s;o++){var m=i[o];if(je(m)&&(c=!0),Ze(m)||Qe(m)){if(o!==s-1)throw new Error("Dimension must be specified as last argument");if(l=u,u=m.valueOf(),!n(u))throw new TypeError("Integer number expected for dimension");if(u<0||o>0&&u>l)throw new Wn(u,l+1)}else{var d=Ue(m).valueOf(),p=Ve(d);if(f[o]=d,l=u,u=p.length-1,o>0&&u!==l)throw new it(l+1,u+1)}}if(f.length===0)throw new SyntaxError("At least one matrix expected");for(var h=f.shift();f.length;)h=yx(h,f.shift(),u);return c?r(h):h},"...string":function(i){return i.join("")}})}),cv="column",pj=["typed","Index","matrix","range"],y2=B(cv,pj,e=>{var{typed:t,Index:r,matrix:n,range:a}=e;return t(cv,{"Matrix, number":i,"Array, number":function(s,u){return i(n(Ue(s)),u).valueOf()}});function i(o,s){if(o.size().length!==2)throw new Error("Only two dimensional matrix is supported");kt(s,o.size()[1]);var u=a(0,o.size()[0]),l=new r(u,s),c=o.subset(l);return je(c)?c:n([[c]])}}),fv="count",gj=["typed","size","prod"],vj=B(fv,gj,e=>{var{typed:t,size:r,prod:n}=e;return t(fv,{string:function(i){return i.length},"Matrix | Array":function(i){return n(r(i))}})}),mv="cross",yj=["typed","matrix","subtract","multiply"],bj=B(mv,yj,e=>{var{typed:t,matrix:r,subtract:n,multiply:a}=e;return t(mv,{"Matrix, Matrix":function(s,u){return r(i(s.toArray(),u.toArray()))},"Matrix, Array":function(s,u){return r(i(s.toArray(),u))},"Array, Matrix":function(s,u){return r(i(s,u.toArray()))},"Array, Array":i});function i(o,s){var u=Math.max(Ve(o).length,Ve(s).length);o=Ll(o),s=Ll(s);var l=Ve(o),c=Ve(s);if(l.length!==1||c.length!==1||l[0]!==3||c[0]!==3)throw new RangeError("Vectors with length 3 expected (Size A = ["+l.join(", ")+"], B = ["+c.join(", ")+"])");var f=[n(a(o[1],s[2]),a(o[2],s[1])),n(a(o[2],s[0]),a(o[0],s[2])),n(a(o[0],s[1]),a(o[1],s[0]))];return u>1?[f]:f}}),dv="diag",wj=["typed","matrix","DenseMatrix","SparseMatrix"],xj=B(dv,wj,e=>{var{typed:t,matrix:r,DenseMatrix:n,SparseMatrix:a}=e;return t(dv,{Array:function(l){return i(l,0,Ve(l),null)},"Array, number":function(l,c){return i(l,c,Ve(l),null)},"Array, BigNumber":function(l,c){return i(l,c.toNumber(),Ve(l),null)},"Array, string":function(l,c){return i(l,0,Ve(l),c)},"Array, number, string":function(l,c,f){return i(l,c,Ve(l),f)},"Array, BigNumber, string":function(l,c,f){return i(l,c.toNumber(),Ve(l),f)},Matrix:function(l){return i(l,0,l.size(),l.storage())},"Matrix, number":function(l,c){return i(l,c,l.size(),l.storage())},"Matrix, BigNumber":function(l,c){return i(l,c.toNumber(),l.size(),l.storage())},"Matrix, string":function(l,c){return i(l,0,l.size(),c)},"Matrix, number, string":function(l,c,f){return i(l,c,l.size(),f)},"Matrix, BigNumber, string":function(l,c,f){return i(l,c.toNumber(),l.size(),f)}});function i(u,l,c,f){if(!$e(l))throw new TypeError("Second parameter in function diag must be an integer");var m=l>0?l:0,d=l<0?-l:0;switch(c.length){case 1:return o(u,l,f,c[0],d,m);case 2:return s(u,l,f,c,d,m)}throw new RangeError("Matrix for function diag must be 2 dimensional")}function o(u,l,c,f,m,d){var p=[f+m,f+d];if(c&&c!=="sparse"&&c!=="dense")throw new TypeError("Unknown matrix type ".concat(c,'"'));var h=c==="sparse"?a.diagonal(p,u,l):n.diagonal(p,u,l);return c!==null?h:h.valueOf()}function s(u,l,c,f,m,d){if(je(u)){var p=u.diagonal(l);return c!==null?c!==p.storage()?r(p,c):p:p.valueOf()}for(var h=Math.min(f[0]-m,f[1]-d),y=[],b=0;b<h;b++)y[b]=u[b+m][b+d];return c!==null?r(y):y}}),Dj="filter",Nj=["typed"],b2=B(Dj,Nj,e=>{var{typed:t}=e;return t("filter",{"Array, function":hv,"Matrix, function":function(n,a){return n.create(hv(n.valueOf(),a),n.datatype())},"Array, RegExp":i0,"Matrix, RegExp":function(n,a){return n.create(i0(n.valueOf(),a),n.datatype())}})});function hv(e,t){var r=Ji(t,e,"filter");return r.isUnary?a0(e,r.fn):a0(e,function(n,a,i){return r.fn(n,[a],i)})}var pv="flatten",Aj=["typed"],Cj=B(pv,Aj,e=>{var{typed:t}=e;return t(pv,{Array:function(n){return mt(n)},Matrix:function(n){return n.create(mt(n.valueOf(),!0),n.datatype())}})}),Lm="forEach",Ej=["typed"],w2=B(Lm,Ej,e=>{var{typed:t}=e;return t(Lm,{"Array, function":Sj,"Matrix, function":function(n,a){n.forEach(a)}})});function Sj(e,t){var r=Ji(t,e,Lm);wx(e,r.fn,r.isUnary)}var gv="getMatrixDataType",Mj=["typed"],Tj=B(gv,Mj,e=>{var{typed:t}=e;return t(gv,{Array:function(n){return yc(n,Mt)},Matrix:function(n){return n.getDataType()}})}),vv="identity",Fj=["typed","config","matrix","BigNumber","DenseMatrix","SparseMatrix"],Pj=B(vv,Fj,e=>{var{typed:t,config:r,matrix:n,BigNumber:a,DenseMatrix:i,SparseMatrix:o}=e;return t(vv,{"":function(){return r.matrix==="Matrix"?n([]):[]},string:function(c){return n(c)},"number | BigNumber":function(c){return u(c,c,r.matrix==="Matrix"?"dense":void 0)},"number | BigNumber, string":function(c,f){return u(c,c,f)},"number | BigNumber, number | BigNumber":function(c,f){return u(c,f,r.matrix==="Matrix"?"dense":void 0)},"number | BigNumber, number | BigNumber, string":function(c,f,m){return u(c,f,m)},Array:function(c){return s(c)},"Array, string":function(c,f){return s(c,f)},Matrix:function(c){return s(c.valueOf(),c.storage())},"Matrix, string":function(c,f){return s(c.valueOf(),f)}});function s(l,c){switch(l.length){case 0:return c?n(c):[];case 1:return u(l[0],l[0],c);case 2:return u(l[0],l[1],c);default:throw new Error("Vector containing two values expected")}}function u(l,c,f){var m=Qe(l)||Qe(c)?a:null;if(Qe(l)&&(l=l.toNumber()),Qe(c)&&(c=c.toNumber()),!$e(l)||l<1)throw new Error("Parameters in function identity must be positive integers");if(!$e(c)||c<1)throw new Error("Parameters in function identity must be positive integers");var d=m?new a(1):1,p=m?new m(0):0,h=[l,c];if(f){if(f==="sparse")return o.diagonal(h,d,0,p);if(f==="dense")return i.diagonal(h,d,0,p);throw new TypeError('Unknown matrix type "'.concat(f,'"'))}for(var y=Lo([],h,p),b=l<c?l:c,D=0;D<b;D++)y[D][D]=d;return y}}),yv="kron",kj=["typed","matrix","multiplyScalar"],Oj=B(yv,kj,e=>{var{typed:t,matrix:r,multiplyScalar:n}=e;return t(yv,{"Matrix, Matrix":function(o,s){return r(a(o.toArray(),s.toArray()))},"Matrix, Array":function(o,s){return r(a(o.toArray(),s))},"Array, Matrix":function(o,s){return r(a(o,s.toArray()))},"Array, Array":a});function a(i,o){if(Ve(i).length===1&&(i=[i]),Ve(o).length===1&&(o=[o]),Ve(i).length>2||Ve(o).length>2)throw new RangeError("Vectors with dimensions greater then 2 are not supported expected (Size x = "+JSON.stringify(i.length)+", y = "+JSON.stringify(o.length)+")");var s=[],u=[];return i.map(function(l){return o.map(function(c){return u=[],s.push(u),l.map(function(f){return c.map(function(m){return u.push(n(f,m))})})})})&&s}}),Tf="map",$j=["typed"],x2=B(Tf,$j,e=>{var{typed:t}=e;return t(Tf,{"Array, function":n,"Matrix, function":function(i,o){return i.map(o)},"Array|Matrix, Array|Matrix, ...Array|Matrix|function":(a,i,o)=>r([a,i,...o.slice(0,o.length-1)],o[o.length-1])});function r(a,i){if(typeof i!="function")throw new Error("Last argument must be a callback function");var o=a[0].isMatrix,s=bd(...a.map(x=>x.isMatrix?x.size():Ve(x))),u=o?(x,w)=>x.get(w):wd,l=o?a.map(x=>x.isMatrix?x.create(qi(x.toArray(),s),x.datatype()):a[0].create(qi(x.valueOf(),s))):a.map(x=>x.isMatrix?qi(x.toArray(),s):qi(x,s)),c;if(t.isTypedFunction(i)){var f=s.map(()=>0),m=l.map(x=>u(x,f)),d=g(i,m,f,l);c=b(d)}else{var p=a.length,h=D(i,p);c=b(h)}var y=(x,w)=>c([x,...l.slice(1).map(v=>u(v,w))],w);if(o)return l[0].map(y);return n(l[0],y);function b(x){switch(x){case 0:return w=>i(...w);case 1:return(w,v)=>i(...w,v);case 2:return(w,v)=>i(...w,v,...l)}}function D(x,w){return x.length>w+1?2:x.length===w+1?1:0}function g(x,w,v,A){return t.resolve(x,[...w,v,...A])!==null?2:t.resolve(x,[...w,v])!==null?1:(t.resolve(x,w)!==null,0)}}function n(a,i){var o=Ji(i,a,Tf);return km(a,o.fn,o.isUnary)}}),bv="diff",_j=["typed","matrix","subtract","number"],D2=B(bv,_j,e=>{var{typed:t,matrix:r,subtract:n,number:a}=e;return t(bv,{"Array | Matrix":function(c){return je(c)?r(o(c.toArray())):o(c)},"Array | Matrix, number":function(c,f){if(!$e(f))throw new RangeError("Dimension must be a whole number");return je(c)?r(i(c.toArray(),f)):i(c,f)},"Array, BigNumber":t.referTo("Array,number",l=>(c,f)=>l(c,a(f))),"Matrix, BigNumber":t.referTo("Matrix,number",l=>(c,f)=>l(c,a(f)))});function i(l,c){if(je(l)&&(l=l.toArray()),!Array.isArray(l))throw RangeError("Array/Matrix does not have that many dimensions");if(c>0){var f=[];return l.forEach(m=>{f.push(i(m,c-1))}),f}else{if(c===0)return o(l);throw RangeError("Cannot have negative dimension")}}function o(l){for(var c=[],f=l.length,m=1;m<f;m++)c.push(s(l[m-1],l[m]));return c}function s(l,c){je(l)&&(l=l.toArray()),je(c)&&(c=c.toArray());var f=Array.isArray(l),m=Array.isArray(c);if(f&&m)return u(l,c);if(!f&&!m)return n(c,l);throw TypeError("Cannot calculate difference between 1 array and 1 non-array")}function u(l,c){if(l.length!==c.length)throw RangeError("Not all sub-arrays have the same length");for(var f=[],m=l.length,d=0;d<m;d++)f.push(s(l[d],c[d]));return f}}),Bj="ones",Ij=["typed","config","matrix","BigNumber"],zj=B(Bj,Ij,e=>{var{typed:t,config:r,matrix:n,BigNumber:a}=e;return t("ones",{"":function(){return r.matrix==="Array"?i([]):i([],"default")},"...number | BigNumber | string":function(l){var c=l[l.length-1];if(typeof c=="string"){var f=l.pop();return i(l,f)}else return r.matrix==="Array"?i(l):i(l,"default")},Array:i,Matrix:function(l){var c=l.storage();return i(l.valueOf(),c)},"Array | Matrix, string":function(l,c){return i(l.valueOf(),c)}});function i(u,l){var c=o(u),f=c?new a(1):1;if(s(u),l){var m=n(l);return u.length>0?m.resize(u,f):m}else{var d=[];return u.length>0?Lo(d,u,f):d}}function o(u){var l=!1;return u.forEach(function(c,f,m){Qe(c)&&(l=!0,m[f]=c.toNumber())}),l}function s(u){u.forEach(function(l){if(typeof l!="number"||!$e(l)||l<0)throw new Error("Parameters in function ones must be positive integers")})}});function Ed(){throw new Error('No "bignumber" implementation available')}function N2(){throw new Error('No "fraction" implementation available')}function A2(){throw new Error('No "matrix" implementation available')}var wv="range",jj=["typed","config","?matrix","?bignumber","smaller","smallerEq","larger","largerEq","add","isPositive"],C2=B(wv,jj,e=>{var{typed:t,config:r,matrix:n,bignumber:a,smaller:i,smallerEq:o,larger:s,largerEq:u,add:l,isPositive:c}=e;return t(wv,{string:m,"string, boolean":m,number:function(y){throw new TypeError("Too few arguments to function range(): ".concat(y))},boolean:function(y){throw new TypeError("Unexpected type of argument 1 to function range(): ".concat(y,", number|bigint|BigNumber|Fraction"))},"number, number":function(y,b){return f(d(y,b,1,!1))},"number, number, number":function(y,b,D){return f(d(y,b,D,!1))},"number, number, boolean":function(y,b,D){return f(d(y,b,1,D))},"number, number, number, boolean":function(y,b,D,g){return f(d(y,b,D,g))},"bigint, bigint|number":function(y,b){return f(d(y,b,1n,!1))},"number, bigint":function(y,b){return f(d(BigInt(y),b,1n,!1))},"bigint, bigint|number, bigint|number":function(y,b,D){return f(d(y,b,BigInt(D),!1))},"number, bigint, bigint|number":function(y,b,D){return f(d(BigInt(y),b,BigInt(D),!1))},"bigint, bigint|number, boolean":function(y,b,D){return f(d(y,b,1n,D))},"number, bigint, boolean":function(y,b,D){return f(d(BigInt(y),b,1n,D))},"bigint, bigint|number, bigint|number, boolean":function(y,b,D,g){return f(d(y,b,BigInt(D),g))},"number, bigint, bigint|number, boolean":function(y,b,D,g){return f(d(BigInt(y),b,BigInt(D),g))},"BigNumber, BigNumber":function(y,b){var D=y.constructor;return f(d(y,b,new D(1),!1))},"BigNumber, BigNumber, BigNumber":function(y,b,D){return f(d(y,b,D,!1))},"BigNumber, BigNumber, boolean":function(y,b,D){var g=y.constructor;return f(d(y,b,new g(1),D))},"BigNumber, BigNumber, BigNumber, boolean":function(y,b,D,g){return f(d(y,b,D,g))},"Fraction, Fraction":function(y,b){return f(d(y,b,1,!1))},"Fraction, Fraction, Fraction":function(y,b,D){return f(d(y,b,D,!1))},"Fraction, Fraction, boolean":function(y,b,D){return f(d(y,b,1,D))},"Fraction, Fraction, Fraction, boolean":function(y,b,D,g){return f(d(y,b,D,g))},"Unit, Unit, Unit":function(y,b,D){return f(d(y,b,D,!1))},"Unit, Unit, Unit, boolean":function(y,b,D,g){return f(d(y,b,D,g))}});function f(h){return r.matrix==="Matrix"?n?n(h):A2():h}function m(h,y){var b=p(h);if(!b)throw new SyntaxError('String "'+h+'" is no valid range');return r.number==="BigNumber"?(a===void 0&&Ed(),f(d(a(b.start),a(b.end),a(b.step)))):f(d(b.start,b.end,b.step,y))}function d(h,y,b,D){for(var g=[],x=c(b)?D?o:i:D?u:s,w=h;x(w,y);)g.push(w),w=l(w,b);return g}function p(h){var y=h.split(":"),b=y.map(function(g){return Number(g)}),D=b.some(function(g){return isNaN(g)});if(D)return null;switch(b.length){case 2:return{start:b[0],end:b[1],step:1};case 3:return{start:b[0],end:b[2],step:b[1]};default:return null}}}),xv="reshape",qj=["typed","isInteger","matrix"],Rj=B(xv,qj,e=>{var{typed:t,isInteger:r}=e;return t(xv,{"Matrix, Array":function(a,i){return a.reshape(i,!0)},"Array, Array":function(a,i){return i.forEach(function(o){if(!r(o))throw new TypeError("Invalid size for dimension: "+o)}),vd(a,i)}})}),Lj="resize",Hj=["config","matrix"],Gj=B(Lj,Hj,e=>{var{config:t,matrix:r}=e;return function(i,o,s){if(arguments.length!==2&&arguments.length!==3)throw new Xi("resize",arguments.length,2,3);if(je(o)&&(o=o.valueOf()),Qe(o[0])&&(o=o.map(function(c){return Qe(c)?c.toNumber():c})),je(i))return i.resize(o,s,!0);if(typeof i=="string")return n(i,o,s);var u=Array.isArray(i)?!1:t.matrix!=="Array";if(o.length===0){for(;Array.isArray(i);)i=i[0];return Ue(i)}else{Array.isArray(i)||(i=[i]),i=Ue(i);var l=Lo(i,o,s);return u?r(l):l}};function n(a,i,o){if(o!==void 0){if(typeof o!="string"||o.length!==1)throw new TypeError("Single character expected as defaultValue")}else o=" ";if(i.length!==1)throw new it(i.length,1);var s=i[0];if(typeof s!="number"||!$e(s))throw new TypeError("Invalid size, must contain positive integers (size: "+at(i)+")");if(a.length>s)return a.substring(0,s);if(a.length<s){for(var u=a,l=0,c=s-a.length;l<c;l++)u+=o;return u}else return a}}),Dv="rotate",Vj=["typed","multiply","rotationMatrix"],Uj=B(Dv,Vj,e=>{var{typed:t,multiply:r,rotationMatrix:n}=e;return t(Dv,{"Array , number | BigNumber | Complex | Unit":function(o,s){a(o,2);var u=r(n(s),o);return u.toArray()},"Matrix , number | BigNumber | Complex | Unit":function(o,s){return a(o,2),r(n(s),o)},"Array, number | BigNumber | Complex | Unit, Array | Matrix":function(o,s,u){a(o,3);var l=r(n(s,u),o);return l},"Matrix, number | BigNumber | Complex | Unit, Array | Matrix":function(o,s,u){return a(o,3),r(n(s,u),o)}});function a(i,o){var s=Array.isArray(i)?Ve(i):i.size();if(s.length>2)throw new RangeError("Vector must be of dimensions 1x".concat(o));if(s.length===2&&s[1]!==1)throw new RangeError("Vector must be of dimensions 1x".concat(o));if(s[0]!==o)throw new RangeError("Vector must be of dimensions 1x".concat(o))}}),Nv="rotationMatrix",Wj=["typed","config","multiplyScalar","addScalar","unaryMinus","norm","matrix","BigNumber","DenseMatrix","SparseMatrix","cos","sin"],Jj=B(Nv,Wj,e=>{var{typed:t,config:r,multiplyScalar:n,addScalar:a,unaryMinus:i,norm:o,BigNumber:s,matrix:u,DenseMatrix:l,SparseMatrix:c,cos:f,sin:m}=e;return t(Nv,{"":function(){return r.matrix==="Matrix"?u([]):[]},string:function(g){return u(g)},"number | BigNumber | Complex | Unit":function(g){return d(g,r.matrix==="Matrix"?"dense":void 0)},"number | BigNumber | Complex | Unit, string":function(g,x){return d(g,x)},"number | BigNumber | Complex | Unit, Array":function(g,x){var w=u(x);return p(w),b(g,w,void 0)},"number | BigNumber | Complex | Unit, Matrix":function(g,x){p(x);var w=x.storage()||(r.matrix==="Matrix"?"dense":void 0);return b(g,x,w)},"number | BigNumber | Complex | Unit, Array, string":function(g,x,w){var v=u(x);return p(v),b(g,v,w)},"number | BigNumber | Complex | Unit, Matrix, string":function(g,x,w){return p(x),b(g,x,w)}});function d(D,g){var x=Qe(D),w=x?new s(-1):-1,v=f(D),A=m(D),C=[[v,n(w,A)],[A,v]];return y(C,g)}function p(D){var g=D.size();if(g.length<1||g[0]!==3)throw new RangeError("Vector must be of dimensions 1x3")}function h(D){return D.reduce((g,x)=>n(g,x))}function y(D,g){if(g){if(g==="sparse")return new c(D);if(g==="dense")return new l(D);throw new TypeError('Unknown matrix type "'.concat(g,'"'))}return D}function b(D,g,x){var w=o(g);if(w===0)throw new RangeError("Rotation around zero vector");var v=Qe(D)?s:null,A=v?new v(1):1,C=v?new v(-1):-1,N=v?new v(g.get([0])/w):g.get([0])/w,E=v?new v(g.get([1])/w):g.get([1])/w,S=v?new v(g.get([2])/w):g.get([2])/w,F=f(D),k=a(A,i(F)),$=m(D),_=a(F,h([N,N,k])),T=a(h([N,E,k]),h([C,S,$])),z=a(h([N,S,k]),h([E,$])),P=a(h([N,E,k]),h([S,$])),j=a(F,h([E,E,k])),O=a(h([E,S,k]),h([C,N,$])),Q=a(h([N,S,k]),h([C,E,$])),K=a(h([E,S,k]),h([N,$])),U=a(F,h([S,S,k])),V=[[_,T,z],[P,j,O],[Q,K,U]];return y(V,x)}}),Av="row",Kj=["typed","Index","matrix","range"],E2=B(Av,Kj,e=>{var{typed:t,Index:r,matrix:n,range:a}=e;return t(Av,{"Matrix, number":i,"Array, number":function(s,u){return i(n(Ue(s)),u).valueOf()}});function i(o,s){if(o.size().length!==2)throw new Error("Only two dimensional matrix is supported");kt(s,o.size()[0]);var u=a(0,o.size()[1]),l=new r(s,u),c=o.subset(l);return je(c)?c:n([[c]])}}),Cv="size",Yj=["typed","config","?matrix"],Zj=B(Cv,Yj,e=>{var{typed:t,config:r,matrix:n}=e;return t(Cv,{Matrix:function(i){return i.create(i.size(),"number")},Array:Ve,string:function(i){return r.matrix==="Array"?[i.length]:n([i.length],"dense","number")},"number | Complex | BigNumber | Unit | boolean | null":function(i){return r.matrix==="Array"?[]:n?n([],"dense","number"):A2()}})}),Ev="squeeze",Qj=["typed"],Xj=B(Ev,Qj,e=>{var{typed:t}=e;return t(Ev,{Array:function(n){return Ll(Ue(n))},Matrix:function(n){var a=Ll(n.toArray());return Array.isArray(a)?n.create(a,n.datatype()):a},any:function(n){return Ue(n)}})}),Sv="subset",eq=["typed","matrix","zeros","add"],S2=B(Sv,eq,e=>{var{typed:t,matrix:r,zeros:n,add:a}=e;return t(Sv,{"Matrix, Index":function(s,u){return Ro(u)?r():(Rl(s,u),s.subset(u))},"Array, Index":t.referTo("Matrix, Index",function(o){return function(s,u){var l=o(r(s),u);return u.isScalar()?l:l.valueOf()}}),"Object, Index":rq,"string, Index":tq,"Matrix, Index, any, any":function(s,u,l,c){return Ro(u)?s:(Rl(s,u),s.clone().subset(u,i(l,u),c))},"Array, Index, any, any":t.referTo("Matrix, Index, any, any",function(o){return function(s,u,l,c){var f=o(r(s),u,l,c);return f.isMatrix?f.valueOf():f}}),"Array, Index, any":t.referTo("Matrix, Index, any, any",function(o){return function(s,u,l){return o(r(s),u,l,void 0).valueOf()}}),"Matrix, Index, any":t.referTo("Matrix, Index, any, any",function(o){return function(s,u,l){return o(s,u,l,void 0)}}),"string, Index, string":Mv,"string, Index, string, string":Mv,"Object, Index, any":nq});function i(o,s){if(typeof o=="string")throw new Error("can't boradcast a string");if(s._isScalar)return o;var u=s.size();if(u.every(l=>l>0))try{return a(o,n(u))}catch{return o}else return o}});function tq(e,t){if(!fc(t))throw new TypeError("Index expected");if(Ro(t))return"";if(Rl(Array.from(e),t),t.size().length!==1)throw new it(t.size().length,1);var r=e.length;kt(t.min()[0],r),kt(t.max()[0],r);var n=t.dimension(0),a="";return n.forEach(function(i){a+=e.charAt(i)}),a}function Mv(e,t,r,n){if(!t||t.isIndex!==!0)throw new TypeError("Index expected");if(Ro(t))return e;if(Rl(Array.from(e),t),t.size().length!==1)throw new it(t.size().length,1);if(n!==void 0){if(typeof n!="string"||n.length!==1)throw new TypeError("Single character expected as defaultValue")}else n=" ";var a=t.dimension(0),i=a.size()[0];if(i!==r.length)throw new it(a.size()[0],r.length);var o=e.length;kt(t.min()[0]),kt(t.max()[0]);for(var s=[],u=0;u<o;u++)s[u]=e.charAt(u);if(a.forEach(function(f,m){s[f]=r.charAt(m[0])}),s.length>o)for(var l=o-1,c=s.length;l<c;l++)s[l]||(s[l]=n);return s.join("")}function rq(e,t){if(!Ro(t)){if(t.size().length!==1)throw new it(t.size(),1);var r=t.dimension(0);if(typeof r!="string")throw new TypeError("String expected as index to retrieve an object property");return Lr(e,r)}}function nq(e,t,r){if(Ro(t))return e;if(t.size().length!==1)throw new it(t.size(),1);var n=t.dimension(0);if(typeof n!="string")throw new TypeError("String expected as index to retrieve an object property");var a=Ue(e);return jo(a,n,r),a}var Tv="transpose",aq=["typed","matrix"],iq=B(Tv,aq,e=>{var{typed:t,matrix:r}=e;return t(Tv,{Array:o=>n(r(o)).valueOf(),Matrix:n,any:Ue});function n(o){var s=o.size(),u;switch(s.length){case 1:u=o.clone();break;case 2:{var l=s[0],c=s[1];if(c===0)throw new RangeError("Cannot transpose a 2D matrix with no columns (size: "+at(s)+")");switch(o.storage()){case"dense":u=a(o,l,c);break;case"sparse":u=i(o,l,c);break}}break;default:throw new RangeError("Matrix must be a vector or two dimensional (size: "+at(s)+")")}return u}function a(o,s,u){for(var l=o._data,c=[],f,m=0;m<u;m++){f=c[m]=[];for(var d=0;d<s;d++)f[d]=Ue(l[d][m])}return o.createDenseMatrix({data:c,size:[u,s],datatype:o._datatype})}function i(o,s,u){for(var l=o._values,c=o._index,f=o._ptr,m=l?[]:void 0,d=[],p=[],h=[],y=0;y<s;y++)h[y]=0;var b,D,g;for(b=0,D=c.length;b<D;b++)h[c[b]]++;for(var x=0,w=0;w<s;w++)p.push(x),x+=h[w],h[w]=p[w];for(p.push(x),g=0;g<u;g++)for(var v=f[g],A=f[g+1],C=v;C<A;C++){var N=h[c[C]]++;d[N]=g,l&&(m[N]=Ue(l[C]))}return o.createSparseMatrix({values:m,index:d,ptr:p,size:[u,s],datatype:o._datatype})}}),Fv="ctranspose",oq=["typed","transpose","conj"],sq=B(Fv,oq,e=>{var{typed:t,transpose:r,conj:n}=e;return t(Fv,{any:function(i){return n(r(i))}})}),Pv="zeros",uq=["typed","config","matrix","BigNumber"],lq=B(Pv,uq,e=>{var{typed:t,config:r,matrix:n,BigNumber:a}=e;return t(Pv,{"":function(){return r.matrix==="Array"?i([]):i([],"default")},"...number | BigNumber | string":function(l){var c=l[l.length-1];if(typeof c=="string"){var f=l.pop();return i(l,f)}else return r.matrix==="Array"?i(l):i(l,"default")},Array:i,Matrix:function(l){var c=l.storage();return i(l.valueOf(),c)},"Array | Matrix, string":function(l,c){return i(l.valueOf(),c)}});function i(u,l){var c=o(u),f=c?new a(0):0;if(s(u),l){var m=n(l);return u.length>0?m.resize(u,f):m}else{var d=[];return u.length>0?Lo(d,u,f):d}}function o(u){var l=!1;return u.forEach(function(c,f,m){Qe(c)&&(l=!0,m[f]=c.toNumber())}),l}function s(u){u.forEach(function(l){if(typeof l!="number"||!$e(l)||l<0)throw new Error("Parameters in function zeros must be positive integers")})}}),kv="fft",cq=["typed","matrix","addScalar","multiplyScalar","divideScalar","exp","tau","i","dotDivide","conj","pow","ceil","log2"],fq=B(kv,cq,e=>{var{typed:t,matrix:r,addScalar:n,multiplyScalar:a,divideScalar:i,exp:o,tau:s,i:u,dotDivide:l,conj:c,pow:f,ceil:m,log2:d}=e;return t(kv,{Array:p,Matrix:function(g){return g.create(p(g.valueOf()),g.datatype())}});function p(D){var g=Ve(D);return g.length===1?b(D,g[0]):h(D.map(x=>p(x,g.slice(1))),0)}function h(D,g){var x=Ve(D);if(g!==0)return new Array(x[0]).fill(0).map((v,A)=>h(D[A],g-1));if(x.length===1)return b(D);function w(v){var A=Ve(v);return new Array(A[1]).fill(0).map((C,N)=>new Array(A[0]).fill(0).map((E,S)=>v[S][N]))}return w(h(w(D),1))}function y(D){for(var g=D.length,x=o(i(a(-1,a(u,s)),g)),w=[],v=1-g;v<g;v++)w.push(f(x,i(f(v,2),2)));for(var A=f(2,m(d(g+g-1))),C=[...new Array(g).fill(0).map((T,z)=>a(D[z],w[g-1+z])),...new Array(A-g).fill(0)],N=[...new Array(g+g-1).fill(0).map((T,z)=>i(1,w[z])),...new Array(A-(g+g-1)).fill(0)],E=b(C),S=b(N),F=new Array(A).fill(0).map((T,z)=>a(E[z],S[z])),k=l(c(p(c(F))),A),$=[],_=g-1;_<g+g-1;_++)$.push(a(k[_],w[_]));return $}function b(D){var g=D.length;if(g===1)return[D[0]];if(g%2===0){for(var x=[...b(D.filter((C,N)=>N%2===0)),...b(D.filter((C,N)=>N%2===1))],w=0;w<g/2;w++){var v=x[w],A=a(x[w+g/2],o(a(a(s,u),i(-w,g))));x[w]=n(v,A),x[w+g/2]=n(v,a(-1,A))}return x}else return y(D)}}),Ov="ifft",mq=["typed","fft","dotDivide","conj"],dq=B(Ov,mq,e=>{var{typed:t,fft:r,dotDivide:n,conj:a}=e;return t(Ov,{"Array | Matrix":function(o){var s=je(o)?o.size():Ve(o);return n(a(r(a(o))),s.reduce((u,l)=>u*l,1))}})});function Rs(e){"@babel/helpers - typeof";return Rs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rs(e)}function hq(e,t){if(Rs(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Rs(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pq(e){var t=hq(e,"string");return Rs(t)=="symbol"?t:t+""}function rr(e,t,r){return(t=pq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function gq(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$v(Object(r),!0).forEach(function(n){rr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$v(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var vq="solveODE",yq=["typed","add","subtract","multiply","divide","max","map","abs","isPositive","isNegative","larger","smaller","matrix","bignumber","unaryMinus"],bq=B(vq,yq,e=>{var{typed:t,add:r,subtract:n,multiply:a,divide:i,max:o,map:s,abs:u,isPositive:l,isNegative:c,larger:f,smaller:m,matrix:d,bignumber:p,unaryMinus:h}=e;function y(C){return function(N,E,S,F){var k=!(E.length===2&&(E.every(v)||E.every(Nn)));if(k)throw new Error('"tspan" must be an Array of two numeric values or two units [tStart, tEnd]');var $=E[0],_=E[1],T=f(_,$),z=F.firstStep;if(z!==void 0&&!l(z))throw new Error('"firstStep" must be positive');var P=F.maxStep;if(P!==void 0&&!l(P))throw new Error('"maxStep" must be positive');var j=F.minStep;if(j&&c(j))throw new Error('"minStep" must be positive or zero');var O=[$,_,z,j,P].filter(I=>I!==void 0);if(!(O.every(v)||O.every(Nn)))throw new Error('Inconsistent type of "t" dependant variables');for(var Q=1,K=F.tol?F.tol:1e-4,U=F.minDelta?F.minDelta:.2,V=F.maxDelta?F.maxDelta:5,le=F.maxIter?F.maxIter:1e4,ne=[$,_,...S,P,j].some(Qe),[ee,L,R,J]=ne?[p(C.a),p(C.c),p(C.b),p(C.bp)]:[C.a,C.c,C.b,C.bp],re=z?T?z:h(z):i(n(_,$),Q),te=[$],ue=[S],oe=n(R,J),De=0,q=0,H=x(T),Z=w(T);H(te[De],_);){var ae=[];re=Z(te[De],_,re),ae.push(N(te[De],ue[De]));for(var he=1;he<L.length;++he)ae.push(N(r(te[De],a(L[he],re)),r(ue[De],a(re,ee[he],ae))));var ye=o(u(s(a(oe,ae),I=>Nn(I)?I.value:I)));ye<K&&K/ye>1/4&&(te.push(r(te[De],re)),ue.push(r(ue[De],a(re,R,ae))),De++);var Te=.84*(K/ye)**(1/5);if(m(Te,U)?Te=U:f(Te,V)&&(Te=V),Te=ne?p(Te):Te,re=a(re,Te),P&&f(u(re),P)?re=T?P:h(P):j&&m(u(re),j)&&(re=T?j:h(j)),q++,q>le)throw new Error("Maximum number of iterations reached, try changing options")}return{t:te,y:ue}}}function b(C,N,E,S){var F=[[],[.5],[0,.75],[.2222222222222222,.3333333333333333,.4444444444444444]],k=[null,1/2,3/4,1],$=[2/9,1/3,4/9,0],_=[7/24,1/4,1/3,1/8],T={a:F,c:k,b:$,bp:_};return y(T)(C,N,E,S)}function D(C,N,E,S){var F=[[],[.2],[.075,.225],[.9777777777777777,-3.7333333333333334,3.5555555555555554],[2.9525986892242035,-11.595793324188385,9.822892851699436,-.2908093278463649],[2.8462752525252526,-10.757575757575758,8.906422717743473,.2784090909090909,-.2735313036020583],[.09114583333333333,0,.44923629829290207,.6510416666666666,-.322376179245283,.13095238095238096]],k=[null,1/5,3/10,4/5,8/9,1,1],$=[35/384,0,500/1113,125/192,-2187/6784,11/84,0],_=[5179/57600,0,7571/16695,393/640,-92097/339200,187/2100,1/40],T={a:F,c:k,b:$,bp:_};return y(T)(C,N,E,S)}function g(C,N,E,S){var F=S.method?S.method:"RK45",k={RK23:b,RK45:D};if(F.toUpperCase()in k){var $=gq({},S);return delete $.method,k[F.toUpperCase()](C,N,E,$)}else{var _=Object.keys(k).map(z=>'"'.concat(z,'"')),T="".concat(_.slice(0,-1).join(", ")," and ").concat(_.slice(-1));throw new Error('Unavailable method "'.concat(F,'". Available methods are ').concat(T))}}function x(C){return C?m:f}function w(C){var N=C?f:m;return function(E,S,F){var k=r(E,F);return N(k,S)?n(S,E):F}}function v(C){return Qe(C)||Ze(C)}function A(C,N,E,S){var F=g(C,N.toArray(),E.toArray(),S);return{t:d(F.t),y:d(F.y)}}return t("solveODE",{"function, Array, Array, Object":g,"function, Matrix, Matrix, Object":A,"function, Array, Array":(C,N,E)=>g(C,N,E,{}),"function, Matrix, Matrix":(C,N,E)=>A(C,N,E,{}),"function, Array, number | BigNumber | Unit":(C,N,E)=>{var S=g(C,N,[E],{});return{t:S.t,y:S.y.map(F=>F[0])}},"function, Matrix, number | BigNumber | Unit":(C,N,E)=>{var S=g(C,N.toArray(),[E],{});return{t:d(S.t),y:d(S.y.map(F=>F[0]))}},"function, Array, number | BigNumber | Unit, Object":(C,N,E,S)=>{var F=g(C,N,[E],S);return{t:F.t,y:F.y.map(k=>k[0])}},"function, Matrix, number | BigNumber | Unit, Object":(C,N,E,S)=>{var F=g(C,N.toArray(),[E],S);return{t:d(F.t),y:d(F.y.map(k=>k[0]))}}})}),wq="erf",xq=["typed"],Dq=B(wq,xq,e=>{var{typed:t}=e;return t("name",{number:function(o){var s=Math.abs(o);return s>=Cq?Xa(o):s<=Nq?Xa(o)*r(s):s<=4?Xa(o)*(1-n(s)):Xa(o)*(1-a(s))},"Array | Matrix":t.referToSelf(i=>o=>Xe(o,i))});function r(i){var o=i*i,s=wa[0][4]*o,u=o,l;for(l=0;l<3;l+=1)s=(s+wa[0][l])*o,u=(u+Do[0][l])*o;return i*(s+wa[0][3])/(u+Do[0][3])}function n(i){var o=wa[1][8]*i,s=i,u;for(u=0;u<7;u+=1)o=(o+wa[1][u])*i,s=(s+Do[1][u])*i;var l=(o+wa[1][7])/(s+Do[1][7]),c=parseInt(i*16)/16,f=(i-c)*(i+c);return Math.exp(-c*c)*Math.exp(-f)*l}function a(i){var o=1/(i*i),s=wa[2][5]*o,u=o,l;for(l=0;l<4;l+=1)s=(s+wa[2][l])*o,u=(u+Do[2][l])*o;var c=o*(s+wa[2][4])/(u+Do[2][4]);c=(Aq-c)/i,o=parseInt(i*16)/16;var f=(i-o)*(i+o);return Math.exp(-o*o)*Math.exp(-f)*c}}),Nq=.46875,Aq=.5641895835477563,wa=[[3.1611237438705655,113.86415415105016,377.485237685302,3209.3775891384694,.18577770618460315],[.5641884969886701,8.883149794388377,66.11919063714163,298.6351381974001,881.952221241769,1712.0476126340707,2051.0783778260716,1230.3393547979972,21531153547440383e-24],[.30532663496123236,.36034489994980445,.12578172611122926,.016083785148742275,.0006587491615298378,.016315387137302097]],Do=[[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]],Cq=Math.pow(2,53),_v="zeta",Eq=["typed","config","multiply","pow","divide","factorial","equal","smallerEq","isNegative","gamma","sin","subtract","add","?Complex","?BigNumber","pi"],Sq=B(_v,Eq,e=>{var{typed:t,config:r,multiply:n,pow:a,divide:i,factorial:o,equal:s,smallerEq:u,isNegative:l,gamma:c,sin:f,subtract:m,add:d,Complex:p,BigNumber:h,pi:y}=e;return t(_v,{number:v=>b(v,A=>A,()=>20),BigNumber:v=>b(v,A=>new h(A),()=>Math.abs(Math.log10(r.relTol))),Complex:D});function b(v,A,C){return s(v,0)?A(-.5):s(v,1)?A(NaN):isFinite(v)?g(v,A,C,N=>N):l(v)?A(NaN):A(1)}function D(v){return v.re===0&&v.im===0?new p(-.5):v.re===1?new p(NaN,NaN):v.re===1/0&&v.im===0?new p(1):v.im===1/0||v.re===-1/0?new p(NaN,NaN):g(v,A=>A,A=>Math.round(1.3*15+.9*Math.abs(A.im)),A=>A.re)}function g(v,A,C,N){var E=C(v);if(N(v)>-(E-1)/2)return w(v,A(E),A);var S=n(a(2,v),a(A(y),m(v,1)));return S=n(S,f(n(i(A(y),2),v))),S=n(S,c(m(1,v))),n(S,g(m(1,v),A,C,N))}function x(v,A){for(var C=v,N=v;u(N,A);N=d(N,1)){var E=i(n(o(d(A,m(N,1))),a(4,N)),n(o(m(A,N)),o(n(2,N))));C=d(C,E)}return n(A,C)}function w(v,A,C){for(var N=i(1,n(x(C(0),A),m(1,a(2,m(1,v))))),E=C(0),S=C(1);u(S,A);S=d(S,1))E=d(E,i(n((-1)**(S-1),x(S,A)),a(S,v)));return n(N,E)}}),Bv="mode",Mq=["typed","isNaN","isNumeric"],Tq=B(Bv,Mq,e=>{var{typed:t,isNaN:r,isNumeric:n}=e;return t(Bv,{"Array | Matrix":a,"...":function(o){return a(o)}});function a(i){i=mt(i.valueOf());var o=i.length;if(o===0)throw new Error("Cannot calculate mode of an empty array");for(var s={},u=[],l=0,c=0;c<i.length;c++){var f=i[c];if(n(f)&&r(f))throw new Error("Cannot calculate mode of an array containing NaN values");f in s||(s[f]=0),s[f]++,s[f]===l?u.push(f):s[f]>l&&(l=s[f],u=[f])}return u}});function Vr(e,t,r){var n;return String(e).includes("Unexpected type")?(n=arguments.length>2?" (type: "+Mt(r)+", value: "+JSON.stringify(r)+")":" (type: "+e.data.actual+")",new TypeError("Cannot calculate "+t+", unexpected type of argument"+n)):String(e).includes("complex numbers")?(n=arguments.length>2?" (type: "+Mt(r)+", value: "+JSON.stringify(r)+")":"",new TypeError("Cannot calculate "+t+", no ordering relation is defined for complex numbers"+n)):e}var Iv="prod",Fq=["typed","config","multiplyScalar","numeric"],Pq=B(Iv,Fq,e=>{var{typed:t,config:r,multiplyScalar:n,numeric:a}=e;return t(Iv,{"Array | Matrix":i,"Array | Matrix, number | BigNumber":function(s,u){throw new Error("prod(A, dim) is not yet supported")},"...":function(s){return i(s)}});function i(o){var s;if(ci(o,function(u){try{s=s===void 0?u:n(s,u)}catch(l){throw Vr(l,"prod",u)}}),typeof s=="string"&&(s=a(s,mi(s,r))),s===void 0)throw new Error("Cannot calculate prod of an empty array");return s}}),zv="format",kq=["typed"],Oq=B(zv,kq,e=>{var{typed:t}=e;return t(zv,{any:at,"any, Object | function | number | BigNumber":at})}),jv="bin",$q=["typed","format"],_q=B(jv,$q,e=>{var{typed:t,format:r}=e;return t(jv,{"number | BigNumber":function(a){return r(a,{notation:"bin"})},"number | BigNumber, number | BigNumber":function(a,i){return r(a,{notation:"bin",wordSize:i})}})}),qv="oct",Bq=["typed","format"],Iq=B(qv,Bq,e=>{var{typed:t,format:r}=e;return t(qv,{"number | BigNumber":function(a){return r(a,{notation:"oct"})},"number | BigNumber, number | BigNumber":function(a,i){return r(a,{notation:"oct",wordSize:i})}})}),Rv="hex",zq=["typed","format"],jq=B(Rv,zq,e=>{var{typed:t,format:r}=e;return t(Rv,{"number | BigNumber":function(a){return r(a,{notation:"hex"})},"number | BigNumber, number | BigNumber":function(a,i){return r(a,{notation:"hex",wordSize:i})}})}),M2=/\$([\w.]+)/g,Lv="print",qq=["typed"],T2=B(Lv,qq,e=>{var{typed:t}=e;return t(Lv,{"string, Object | Array":Hv,"string, Object | Array, number | Object":Hv})});function Hv(e,t,r){return e.replace(M2,function(n,a){var i=a.split("."),o=t[i.shift()];for(o!==void 0&&o.isMatrix&&(o=o.toArray());i.length&&o!==void 0;){var s=i.shift();o=s?o[s]:o+"."}return o!==void 0?Pr(o)?o:at(o,r):n})}var Gv="to",Rq=["typed","matrix","concat"],Lq=B(Gv,Rq,e=>{var{typed:t,matrix:r,concat:n}=e,a=Ot({typed:t,matrix:r,concat:n});return t(Gv,{"Unit, Unit | string":(i,o)=>i.to(o)},a({Ds:!0}))}),Vv="isPrime",Hq=["typed"],Gq=B(Vv,Hq,e=>{var{typed:t}=e;return t(Vv,{number:function(n){if(n<=3)return n>1;if(n%2===0||n%3===0)return!1;for(var a=5;a*a<=n;a+=6)if(n%a===0||n%(a+2)===0)return!1;return!0},bigint:function(n){if(n<=3n)return n>1n;if(n%2n===0n||n%3n===0n)return!1;for(var a=5n;a*a<=n;a+=6n)if(n%a===0n||n%(a+2n)===0n)return!1;return!0},BigNumber:function(n){if(n.lte(3))return n.gt(1);if(n.mod(2).eq(0)||n.mod(3).eq(0))return!1;if(n.lt(Math.pow(2,32))){for(var a=n.toNumber(),i=5;i*i<=a;i+=6)if(a%i===0||a%(i+2)===0)return!1;return!0}function o(D,g,x){for(var w=1;!g.eq(0);)g.mod(2).eq(0)?(g=g.div(2),D=D.mul(D).mod(x)):(g=g.sub(1),w=D.mul(w).mod(x));return w}var s=n.constructor.clone({precision:n.toFixed(0).length*2});n=new s(n);for(var u=0,l=n.sub(1);l.mod(2).eq(0);)l=l.div(2),u+=1;var c=null;if(n.lt("3317044064679887385961981"))c=[2,3,5,7,11,13,17,19,23,29,31,37,41].filter(D=>D<n);else{var f=Math.min(n.toNumber()-2,Math.floor(2*Math.pow(n.toFixed(0).length*Math.log(10),2)));c=[];for(var m=2;m<=f;m+=1)c.push(f)}for(var d=0;d<c.length;d+=1){var p=c[d],h=o(n.sub(n).add(p),l,n);if(!h.eq(1)){for(var y=0,b=h;!b.eq(n.sub(1));y+=1,b=b.mul(b).mod(n))if(y===u-1)return!1}}return!0},"Array | Matrix":t.referToSelf(r=>n=>Xe(n,r))})}),Vq="numeric",Uq=["number","?bignumber","?fraction"],Wq=B(Vq,Uq,e=>{var{number:t,bignumber:r,fraction:n}=e,a={string:!0,number:!0,BigNumber:!0,Fraction:!0},i={number:o=>t(o),BigNumber:r?o=>r(o):Ed,bigint:o=>BigInt(o),Fraction:n?o=>n(o):N2};return function(s){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"number",l=arguments.length>2?arguments[2]:void 0;if(l!==void 0)throw new SyntaxError("numeric() takes one or two arguments");var c=Mt(s);if(!(c in a))throw new TypeError("Cannot convert "+s+' of type "'+c+'"; valid input types are '+Object.keys(a).join(", "));if(!(u in i))throw new TypeError("Cannot convert "+s+' to type "'+u+'"; valid output types are '+Object.keys(i).join(", "));return u===c?s:i[u](s)}}),Uv="divideScalar",Jq=["typed","numeric"],Kq=B(Uv,Jq,e=>{var{typed:t,numeric:r}=e;return t(Uv,{"number, number":function(a,i){return a/i},"Complex, Complex":function(a,i){return a.div(i)},"BigNumber, BigNumber":function(a,i){return a.div(i)},"bigint, bigint":function(a,i){return a/i},"Fraction, Fraction":function(a,i){return a.div(i)},"Unit, number | Complex | Fraction | BigNumber | Unit":(n,a)=>n.divide(a),"number | Fraction | Complex | BigNumber, Unit":(n,a)=>a.divideInto(n)})}),Wv="pow",Yq=["typed","config","identity","multiply","matrix","inv","fraction","number","Complex"],Zq=B(Wv,Yq,e=>{var{typed:t,config:r,identity:n,multiply:a,matrix:i,inv:o,number:s,fraction:u,Complex:l}=e;return t(Wv,{"number, number":c,"Complex, Complex":function(p,h){return p.pow(h)},"BigNumber, BigNumber":function(p,h){return h.isInteger()||p>=0||r.predictable?p.pow(h):new l(p.toNumber(),0).pow(h.toNumber(),0)},"bigint, bigint":(d,p)=>d**p,"Fraction, Fraction":function(p,h){var y=p.pow(h);if(y!=null)return y;if(r.predictable)throw new Error("Result of pow is non-rational and cannot be expressed as a fraction");return c(p.valueOf(),h.valueOf())},"Array, number":f,"Array, BigNumber":function(p,h){return f(p,h.toNumber())},"Matrix, number":m,"Matrix, BigNumber":function(p,h){return m(p,h.toNumber())},"Unit, number | BigNumber":function(p,h){return p.pow(h)}});function c(d,p){if(r.predictable&&!$e(p)&&d<0)try{var h=u(p),y=s(h);if((p===y||Math.abs((p-y)/p)<1e-14)&&h.d%2n===1n)return(h.n%2n===0n?1:-1)*Math.pow(-d,p)}catch{}return r.predictable&&(d<-1&&p===1/0||d>-1&&d<0&&p===-1/0)?NaN:$e(p)||d>=0||r.predictable?$x(d,p):d*d<1&&p===1/0||d*d>1&&p===-1/0?0:new l(d,0).pow(p,0)}function f(d,p){if(!$e(p))throw new TypeError("For A^b, b must be an integer (value is "+p+")");var h=Ve(d);if(h.length!==2)throw new Error("For A^b, A must be 2 dimensional (A has "+h.length+" dimensions)");if(h[0]!==h[1])throw new Error("For A^b, A must be square (size is "+h[0]+"x"+h[1]+")");if(p<0)try{return f(o(d),-p)}catch(D){throw D.message==="Cannot calculate inverse, determinant is zero"?new TypeError("For A^b, when A is not invertible, b must be a positive integer (value is "+p+")"):D}for(var y=n(h[0]).valueOf(),b=d;p>=1;)(p&1)===1&&(y=a(b,y)),p>>=1,b=a(b,b);return y}function m(d,p){return i(f(d.valueOf(),p))}}),No="Number of decimals in function round must be an integer",Jv="round",Qq=["typed","config","matrix","equalScalar","zeros","BigNumber","DenseMatrix"],Xq=B(Jv,Qq,e=>{var{typed:t,config:r,matrix:n,equalScalar:a,zeros:i,BigNumber:o,DenseMatrix:s}=e,u=Cr({typed:t,equalScalar:a}),l=or({typed:t,DenseMatrix:s}),c=Kn({typed:t});function f(m){return Math.abs(Xs(m).exponent)}return t(Jv,{number:function(d){var p=bs(d,f(r.relTol)),h=Ar(d,p,r.relTol,r.absTol)?p:d;return bs(h)},"number, number":function(d,p){var h=f(r.relTol);if(p>=h)return bs(d,p);var y=bs(d,h),b=Ar(d,y,r.relTol,r.absTol)?y:d;return bs(b,p)},"number, BigNumber":function(d,p){if(!p.isInteger())throw new TypeError(No);return new o(d).toDecimalPlaces(p.toNumber())},Complex:function(d){return d.round()},"Complex, number":function(d,p){if(p%1)throw new TypeError(No);return d.round(p)},"Complex, BigNumber":function(d,p){if(!p.isInteger())throw new TypeError(No);var h=p.toNumber();return d.round(h)},BigNumber:function(d){var p=new o(d).toDecimalPlaces(f(r.relTol)),h=Tn(d,p,r.relTol,r.absTol)?p:d;return h.toDecimalPlaces(0)},"BigNumber, BigNumber":function(d,p){if(!p.isInteger())throw new TypeError(No);var h=f(r.relTol);if(p>=h)return d.toDecimalPlaces(p.toNumber());var y=d.toDecimalPlaces(h),b=Tn(d,y,r.relTol,r.absTol)?y:d;return b.toDecimalPlaces(p.toNumber())},bigint:m=>m,"bigint, number":(m,d)=>m,"bigint, BigNumber":(m,d)=>m,Fraction:function(d){return d.round()},"Fraction, number":function(d,p){if(p%1)throw new TypeError(No);return d.round(p)},"Fraction, BigNumber":function(d,p){if(!p.isInteger())throw new TypeError(No);return d.round(p.toNumber())},"Unit, number, Unit":t.referToSelf(m=>function(d,p,h){var y=d.toNumeric(h);return h.multiply(m(y,p))}),"Unit, BigNumber, Unit":t.referToSelf(m=>(d,p,h)=>m(d,p.toNumber(),h)),"Array | Matrix, number | BigNumber, Unit":t.referToSelf(m=>(d,p,h)=>Xe(d,y=>m(y,p,h),!0)),"Array | Matrix | Unit, Unit":t.referToSelf(m=>(d,p)=>m(d,0,p)),"Array | Matrix":t.referToSelf(m=>d=>Xe(d,m,!0)),"SparseMatrix, number | BigNumber":t.referToSelf(m=>(d,p)=>u(d,p,m,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(m=>(d,p)=>c(d,p,m,!1)),"Array, number | BigNumber":t.referToSelf(m=>(d,p)=>c(n(d),p,m,!1).valueOf()),"number | Complex | BigNumber | Fraction, SparseMatrix":t.referToSelf(m=>(d,p)=>a(d,0)?i(p.size(),p.storage()):l(p,d,m,!0)),"number | Complex | BigNumber | Fraction, DenseMatrix":t.referToSelf(m=>(d,p)=>a(d,0)?i(p.size(),p.storage()):c(p,d,m,!0)),"number | Complex | BigNumber | Fraction, Array":t.referToSelf(m=>(d,p)=>c(n(p),d,m,!0).valueOf())})}),Kv="log",eR=["config","typed","typeOf","divideScalar","Complex"],tR=Math.log(16),rR=B(Kv,eR,e=>{var{typed:t,typeOf:r,config:n,divideScalar:a,Complex:i}=e;function o(u){return u.log()}function s(u){return o(new i(u,0))}return t(Kv,{number:function(l){return l>=0||n.predictable?f0(l):s(l)},bigint:Ad(tR,f0,n,s),Complex:o,BigNumber:function(l){return!l.isNegative()||n.predictable?l.ln():s(l.toNumber())},"any, any":t.referToSelf(u=>(l,c)=>{if(r(l)==="Fraction"&&r(c)==="Fraction"){var f=l.log(c);if(f!==null)return f}return a(u(l),u(c))})})}),Yv="log1p",nR=["typed","config","divideScalar","log","Complex"],aR=B(Yv,nR,e=>{var{typed:t,config:r,divideScalar:n,log:a,Complex:i}=e;return t(Yv,{number:function(u){return u>=-1||r.predictable?t9(u):o(new i(u,0))},Complex:o,BigNumber:function(u){var l=u.plus(1);return!l.isNegative()||r.predictable?l.ln():o(new i(u.toNumber(),0))},"Array | Matrix":t.referToSelf(s=>u=>Xe(u,s)),"any, any":t.referToSelf(s=>(u,l)=>n(s(u),a(l)))});function o(s){var u=s.re+1;return new i(Math.log(Math.sqrt(u*u+s.im*s.im)),Math.atan2(s.im,u))}}),Zv="nthRoots",iR=["config","typed","divideScalar","Complex"],oR=B(Zv,iR,e=>{var{typed:t,config:r,divideScalar:n,Complex:a}=e,i=[function(u){return new a(u,0)},function(u){return new a(0,u)},function(u){return new a(-u,0)},function(u){return new a(0,-u)}];function o(s,u){if(u<0)throw new Error("Root must be greater than zero");if(u===0)throw new Error("Root must be non-zero");if(u%1!==0)throw new Error("Root must be an integer");if(s===0||s.abs()===0)return[new a(0,0)];var l=typeof s=="number",c;(l||s.re===0||s.im===0)&&(l?c=2*+(s<0):s.im===0?c=2*+(s.re<0):c=2*+(s.im<0)+1);for(var f=s.arg(),m=s.abs(),d=[],p=Math.pow(m,1/u),h=0;h<u;h++){var y=(c+4*h)/u;if(y===Math.round(y)){d.push(i[y%4](p));continue}d.push(new a({r:p,phi:(f+2*Math.PI*h)/u}))}return d}return t(Zv,{Complex:function(u){return o(u,2)},"Complex, number":o})}),Qv="dotPow",sR=["typed","equalScalar","matrix","pow","DenseMatrix","concat","SparseMatrix"],uR=B(Qv,sR,e=>{var{typed:t,equalScalar:r,matrix:n,pow:a,DenseMatrix:i,concat:o,SparseMatrix:s}=e,u=Ur({typed:t}),l=ua({typed:t,SparseMatrix:s}),c=Cr({typed:t,equalScalar:r}),f=or({typed:t,DenseMatrix:i}),m=Ot({typed:t,matrix:n,concat:o}),d={};for(var p in a.signatures)Object.prototype.hasOwnProperty.call(a.signatures,p)&&!p.includes("Matrix")&&!p.includes("Array")&&(d[p]=a.signatures[p]);var h=t(d);return t(Qv,m({elop:h,SS:l,DS:u,Ss:c,sS:f}))}),Xv="dotDivide",lR=["typed","matrix","equalScalar","divideScalar","DenseMatrix","concat","SparseMatrix"],cR=B(Xv,lR,e=>{var{typed:t,matrix:r,equalScalar:n,divideScalar:a,DenseMatrix:i,concat:o,SparseMatrix:s}=e,u=Yn({typed:t,equalScalar:n}),l=Ur({typed:t}),c=ua({typed:t,SparseMatrix:s}),f=Cr({typed:t,equalScalar:n}),m=or({typed:t,DenseMatrix:i}),d=Ot({typed:t,matrix:r,concat:o});return t(Xv,d({elop:a,SS:c,DS:l,SD:u,Ss:f,sS:m}))});function eu(e){var{DenseMatrix:t}=e;return function(n,a,i){var o=n.size();if(o.length!==2)throw new RangeError("Matrix must be two dimensional (size: "+at(o)+")");var s=o[0],u=o[1];if(s!==u)throw new RangeError("Matrix must be square (size: "+at(o)+")");var l=[];if(je(a)){var c=a.size(),f=a._data;if(c.length===1){if(c[0]!==s)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");for(var m=0;m<s;m++)l[m]=[f[m]];return new t({data:l,size:[s,1],datatype:a._datatype})}if(c.length===2){if(c[0]!==s||c[1]!==1)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");if(Bl(a)){if(i){l=[];for(var d=0;d<s;d++)l[d]=[f[d][0]];return new t({data:l,size:[s,1],datatype:a._datatype})}return a}if(ji(a)){for(var p=0;p<s;p++)l[p]=[0];for(var h=a._values,y=a._index,b=a._ptr,D=b[1],g=b[0];g<D;g++){var x=y[g];l[x][0]=h[g]}return new t({data:l,size:[s,1],datatype:a._datatype})}}throw new RangeError("Dimension mismatch. The right side has to be either 1- or 2-dimensional vector.")}if(Et(a)){var w=Ve(a);if(w.length===1){if(w[0]!==s)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");for(var v=0;v<s;v++)l[v]=[a[v]];return new t({data:l,size:[s,1]})}if(w.length===2){if(w[0]!==s||w[1]!==1)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");for(var A=0;A<s;A++)l[A]=[a[A][0]];return new t({data:l,size:[s,1]})}throw new RangeError("Dimension mismatch. The right side has to be either 1- or 2-dimensional vector.")}}}var e1="lsolve",fR=["typed","matrix","divideScalar","multiplyScalar","subtractScalar","equalScalar","DenseMatrix"],mR=B(e1,fR,e=>{var{typed:t,matrix:r,divideScalar:n,multiplyScalar:a,subtractScalar:i,equalScalar:o,DenseMatrix:s}=e,u=eu({DenseMatrix:s});return t(e1,{"SparseMatrix, Array | Matrix":function(m,d){return c(m,d)},"DenseMatrix, Array | Matrix":function(m,d){return l(m,d)},"Array, Array | Matrix":function(m,d){var p=r(m),h=l(p,d);return h.valueOf()}});function l(f,m){m=u(f,m,!0);for(var d=m._data,p=f._size[0],h=f._size[1],y=[],b=f._data,D=0;D<h;D++){var g=d[D][0]||0,x=void 0;if(o(g,0))x=0;else{var w=b[D][D];if(o(w,0))throw new Error("Linear system cannot be solved since matrix is singular");x=n(g,w);for(var v=D+1;v<p;v++)d[v]=[i(d[v][0]||0,a(x,b[v][D]))]}y[D]=[x]}return new s({data:y,size:[p,1]})}function c(f,m){m=u(f,m,!0);for(var d=m._data,p=f._size[0],h=f._size[1],y=f._values,b=f._index,D=f._ptr,g=[],x=0;x<h;x++){var w=d[x][0]||0;if(o(w,0))g[x]=[0];else{for(var v=0,A=[],C=[],N=D[x],E=D[x+1],S=N;S<E;S++){var F=b[S];F===x?v=y[S]:F>x&&(A.push(y[S]),C.push(F))}if(o(v,0))throw new Error("Linear system cannot be solved since matrix is singular");for(var k=n(w,v),$=0,_=C.length;$<_;$++){var T=C[$];d[T]=[i(d[T][0]||0,a(k,A[$]))]}g[x]=[k]}}return new s({data:g,size:[p,1]})}}),t1="usolve",dR=["typed","matrix","divideScalar","multiplyScalar","subtractScalar","equalScalar","DenseMatrix"],hR=B(t1,dR,e=>{var{typed:t,matrix:r,divideScalar:n,multiplyScalar:a,subtractScalar:i,equalScalar:o,DenseMatrix:s}=e,u=eu({DenseMatrix:s});return t(t1,{"SparseMatrix, Array | Matrix":function(m,d){return c(m,d)},"DenseMatrix, Array | Matrix":function(m,d){return l(m,d)},"Array, Array | Matrix":function(m,d){var p=r(m),h=l(p,d);return h.valueOf()}});function l(f,m){m=u(f,m,!0);for(var d=m._data,p=f._size[0],h=f._size[1],y=[],b=f._data,D=h-1;D>=0;D--){var g=d[D][0]||0,x=void 0;if(o(g,0))x=0;else{var w=b[D][D];if(o(w,0))throw new Error("Linear system cannot be solved since matrix is singular");x=n(g,w);for(var v=D-1;v>=0;v--)d[v]=[i(d[v][0]||0,a(x,b[v][D]))]}y[D]=[x]}return new s({data:y,size:[p,1]})}function c(f,m){m=u(f,m,!0);for(var d=m._data,p=f._size[0],h=f._size[1],y=f._values,b=f._index,D=f._ptr,g=[],x=h-1;x>=0;x--){var w=d[x][0]||0;if(o(w,0))g[x]=[0];else{for(var v=0,A=[],C=[],N=D[x],E=D[x+1],S=E-1;S>=N;S--){var F=b[S];F===x?v=y[S]:F<x&&(A.push(y[S]),C.push(F))}if(o(v,0))throw new Error("Linear system cannot be solved since matrix is singular");for(var k=n(w,v),$=0,_=C.length;$<_;$++){var T=C[$];d[T]=[i(d[T][0],a(k,A[$]))]}g[x]=[k]}}return new s({data:g,size:[p,1]})}}),r1="lsolveAll",pR=["typed","matrix","divideScalar","multiplyScalar","subtractScalar","equalScalar","DenseMatrix"],gR=B(r1,pR,e=>{var{typed:t,matrix:r,divideScalar:n,multiplyScalar:a,subtractScalar:i,equalScalar:o,DenseMatrix:s}=e,u=eu({DenseMatrix:s});return t(r1,{"SparseMatrix, Array | Matrix":function(m,d){return c(m,d)},"DenseMatrix, Array | Matrix":function(m,d){return l(m,d)},"Array, Array | Matrix":function(m,d){var p=r(m),h=l(p,d);return h.map(y=>y.valueOf())}});function l(f,m){for(var d=[u(f,m,!0)._data.map(C=>C[0])],p=f._data,h=f._size[0],y=f._size[1],b=0;b<y;b++)for(var D=d.length,g=0;g<D;g++){var x=d[g];if(o(p[b][b],0))if(o(x[b],0)){if(g===0){var v=[...x];v[b]=1;for(var A=b+1;A<y;A++)v[A]=i(v[A],p[A][b]);d.push(v)}}else{if(g===0)return[];d.splice(g,1),g-=1,D-=1}else{x[b]=n(x[b],p[b][b]);for(var w=b+1;w<y;w++)x[w]=i(x[w],a(x[b],p[w][b]))}}return d.map(C=>new s({data:C.map(N=>[N]),size:[h,1]}))}function c(f,m){for(var d=[u(f,m,!0)._data.map(Q=>Q[0])],p=f._size[0],h=f._size[1],y=f._values,b=f._index,D=f._ptr,g=0;g<h;g++)for(var x=d.length,w=0;w<x;w++){for(var v=d[w],A=[],C=[],N=D[g],E=D[g+1],S=0,F=N;F<E;F++){var k=b[F];k===g?S=y[F]:k>g&&(A.push(y[F]),C.push(k))}if(o(S,0))if(o(v[g],0)){if(w===0){var z=[...v];z[g]=1;for(var P=0,j=C.length;P<j;P++){var O=C[P];z[O]=i(z[O],A[P])}d.push(z)}}else{if(w===0)return[];d.splice(w,1),w-=1,x-=1}else{v[g]=n(v[g],S);for(var $=0,_=C.length;$<_;$++){var T=C[$];v[T]=i(v[T],a(v[g],A[$]))}}}return d.map(Q=>new s({data:Q.map(K=>[K]),size:[p,1]}))}}),n1="usolveAll",vR=["typed","matrix","divideScalar","multiplyScalar","subtractScalar","equalScalar","DenseMatrix"],yR=B(n1,vR,e=>{var{typed:t,matrix:r,divideScalar:n,multiplyScalar:a,subtractScalar:i,equalScalar:o,DenseMatrix:s}=e,u=eu({DenseMatrix:s});return t(n1,{"SparseMatrix, Array | Matrix":function(m,d){return c(m,d)},"DenseMatrix, Array | Matrix":function(m,d){return l(m,d)},"Array, Array | Matrix":function(m,d){var p=r(m),h=l(p,d);return h.map(y=>y.valueOf())}});function l(f,m){for(var d=[u(f,m,!0)._data.map(C=>C[0])],p=f._data,h=f._size[0],y=f._size[1],b=y-1;b>=0;b--)for(var D=d.length,g=0;g<D;g++){var x=d[g];if(o(p[b][b],0))if(o(x[b],0)){if(g===0){var v=[...x];v[b]=1;for(var A=b-1;A>=0;A--)v[A]=i(v[A],p[A][b]);d.push(v)}}else{if(g===0)return[];d.splice(g,1),g-=1,D-=1}else{x[b]=n(x[b],p[b][b]);for(var w=b-1;w>=0;w--)x[w]=i(x[w],a(x[b],p[w][b]))}}return d.map(C=>new s({data:C.map(N=>[N]),size:[h,1]}))}function c(f,m){for(var d=[u(f,m,!0)._data.map(Q=>Q[0])],p=f._size[0],h=f._size[1],y=f._values,b=f._index,D=f._ptr,g=h-1;g>=0;g--)for(var x=d.length,w=0;w<x;w++){for(var v=d[w],A=[],C=[],N=D[g],E=D[g+1],S=0,F=E-1;F>=N;F--){var k=b[F];k===g?S=y[F]:k<g&&(A.push(y[F]),C.push(k))}if(o(S,0))if(o(v[g],0)){if(w===0){var z=[...v];z[g]=1;for(var P=0,j=C.length;P<j;P++){var O=C[P];z[O]=i(z[O],A[P])}d.push(z)}}else{if(w===0)return[];d.splice(w,1),w-=1,x-=1}else{v[g]=n(v[g],S);for(var $=0,_=C.length;$<_;$++){var T=C[$];v[T]=i(v[T],a(v[g],A[$]))}}}return d.map(Q=>new s({data:Q.map(K=>[K]),size:[p,1]}))}}),bR="matAlgo08xS0Sid",wR=["typed","equalScalar"],Sd=B(bR,wR,e=>{var{typed:t,equalScalar:r}=e;return function(a,i,o){var s=a._values,u=a._index,l=a._ptr,c=a._size,f=a._datatype||a._data===void 0?a._datatype:a.getDataType(),m=i._values,d=i._index,p=i._ptr,h=i._size,y=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(c.length!==h.length)throw new it(c.length,h.length);if(c[0]!==h[0]||c[1]!==h[1])throw new RangeError("Dimension mismatch. Matrix A ("+c+") must match Matrix B ("+h+")");if(!s||!m)throw new Error("Cannot perform operation on Pattern Sparse Matrices");var b=c[0],D=c[1],g,x=r,w=0,v=o;typeof f=="string"&&f===y&&f!=="mixed"&&(g=f,x=t.find(r,[g,g]),w=t.convert(0,g),v=t.find(o,[g,g]));for(var A=[],C=[],N=[],E=[],S=[],F,k,$,_,T=0;T<D;T++){N[T]=C.length;var z=T+1;for(k=l[T],$=l[T+1],F=k;F<$;F++)_=u[F],S[_]=z,E[_]=s[F],C.push(_);for(k=p[T],$=p[T+1],F=k;F<$;F++)_=d[F],S[_]===z&&(E[_]=v(E[_],m[F]));for(F=N[T];F<C.length;){_=C[F];var P=E[_];x(P,w)?C.splice(F,1):(A.push(P),F++)}}return N[D]=C.length,a.createSparseMatrix({values:A,index:C,ptr:N,size:[b,D],datatype:f===a._datatype&&y===i._datatype?g:void 0})}}),Md=B("useMatrixForArrayScalar",["typed","matrix"],e=>{var{typed:t,matrix:r}=e;return{"Array, number":t.referTo("DenseMatrix, number",n=>(a,i)=>n(r(a),i).valueOf()),"Array, BigNumber":t.referTo("DenseMatrix, BigNumber",n=>(a,i)=>n(r(a),i).valueOf()),"number, Array":t.referTo("number, DenseMatrix",n=>(a,i)=>n(a,r(i)).valueOf()),"BigNumber, Array":t.referTo("BigNumber, DenseMatrix",n=>(a,i)=>n(a,r(i)).valueOf())}}),a1="leftShift",xR=["typed","matrix","equalScalar","zeros","DenseMatrix","concat"],DR=B(a1,xR,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:a,DenseMatrix:i,concat:o}=e,s=hi({typed:t}),u=Yn({typed:t,equalScalar:n}),l=Sd({typed:t,equalScalar:n}),c=Qi({typed:t,DenseMatrix:i}),f=Cr({typed:t,equalScalar:n}),m=Kn({typed:t}),d=Ot({typed:t,matrix:r,concat:o}),p=Md({typed:t,matrix:r});return t(a1,{"number, number":jx,"BigNumber, BigNumber":Vz,"bigint, bigint":(h,y)=>h<<y,"SparseMatrix, number | BigNumber":t.referToSelf(h=>(y,b)=>n(b,0)?y.clone():f(y,b,h,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(h=>(y,b)=>n(b,0)?y.clone():m(y,b,h,!1)),"number | BigNumber, SparseMatrix":t.referToSelf(h=>(y,b)=>n(y,0)?a(b.size(),b.storage()):c(b,y,h,!0)),"number | BigNumber, DenseMatrix":t.referToSelf(h=>(y,b)=>n(y,0)?a(b.size(),b.storage()):m(b,y,h,!0))},p,d({SS:l,DS:s,SD:u}))}),i1="rightArithShift",NR=["typed","matrix","equalScalar","zeros","DenseMatrix","concat"],AR=B(i1,NR,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:a,DenseMatrix:i,concat:o}=e,s=hi({typed:t}),u=Yn({typed:t,equalScalar:n}),l=Sd({typed:t,equalScalar:n}),c=Qi({typed:t,DenseMatrix:i}),f=Cr({typed:t,equalScalar:n}),m=Kn({typed:t}),d=Ot({typed:t,matrix:r,concat:o}),p=Md({typed:t,matrix:r});return t(i1,{"number, number":qx,"BigNumber, BigNumber":Uz,"bigint, bigint":(h,y)=>h>>y,"SparseMatrix, number | BigNumber":t.referToSelf(h=>(y,b)=>n(b,0)?y.clone():f(y,b,h,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(h=>(y,b)=>n(b,0)?y.clone():m(y,b,h,!1)),"number | BigNumber, SparseMatrix":t.referToSelf(h=>(y,b)=>n(y,0)?a(b.size(),b.storage()):c(b,y,h,!0)),"number | BigNumber, DenseMatrix":t.referToSelf(h=>(y,b)=>n(y,0)?a(b.size(),b.storage()):m(b,y,h,!0))},p,d({SS:l,DS:s,SD:u}))}),o1="rightLogShift",CR=["typed","matrix","equalScalar","zeros","DenseMatrix","concat"],ER=B(o1,CR,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:a,DenseMatrix:i,concat:o}=e,s=hi({typed:t}),u=Yn({typed:t,equalScalar:n}),l=Sd({typed:t,equalScalar:n}),c=Qi({typed:t,DenseMatrix:i}),f=Cr({typed:t,equalScalar:n}),m=Kn({typed:t}),d=Ot({typed:t,matrix:r,concat:o}),p=Md({typed:t,matrix:r});return t(o1,{"number, number":Rx,"SparseMatrix, number | BigNumber":t.referToSelf(h=>(y,b)=>n(b,0)?y.clone():f(y,b,h,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(h=>(y,b)=>n(b,0)?y.clone():m(y,b,h,!1)),"number | BigNumber, SparseMatrix":t.referToSelf(h=>(y,b)=>n(y,0)?a(b.size(),b.storage()):c(b,y,h,!0)),"number | BigNumber, DenseMatrix":t.referToSelf(h=>(y,b)=>n(y,0)?a(b.size(),b.storage()):m(b,y,h,!0))},p,d({SS:l,DS:s,SD:u}))}),s1="and",SR=["typed","matrix","equalScalar","zeros","not","concat"],F2=B(s1,SR,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:a,not:i,concat:o}=e,s=Yn({typed:t,equalScalar:n}),u=xc({typed:t,equalScalar:n}),l=Cr({typed:t,equalScalar:n}),c=Kn({typed:t}),f=Ot({typed:t,matrix:r,concat:o});return t(s1,{"number, number":Im,"Complex, Complex":function(d,p){return(d.re!==0||d.im!==0)&&(p.re!==0||p.im!==0)},"BigNumber, BigNumber":function(d,p){return!d.isZero()&&!p.isZero()&&!d.isNaN()&&!p.isNaN()},"bigint, bigint":Im,"Unit, Unit":t.referToSelf(m=>(d,p)=>m(d.value||0,p.value||0)),"SparseMatrix, any":t.referToSelf(m=>(d,p)=>i(p)?a(d.size(),d.storage()):l(d,p,m,!1)),"DenseMatrix, any":t.referToSelf(m=>(d,p)=>i(p)?a(d.size(),d.storage()):c(d,p,m,!1)),"any, SparseMatrix":t.referToSelf(m=>(d,p)=>i(d)?a(d.size(),d.storage()):l(p,d,m,!0)),"any, DenseMatrix":t.referToSelf(m=>(d,p)=>i(d)?a(d.size(),d.storage()):c(p,d,m,!0)),"Array, any":t.referToSelf(m=>(d,p)=>m(r(d),p).valueOf()),"any, Array":t.referToSelf(m=>(d,p)=>m(d,r(p)).valueOf())},f({SS:u,DS:s}))}),Yl="compare",MR=["typed","config","matrix","equalScalar","BigNumber","Fraction","DenseMatrix","concat"],TR=B(Yl,MR,e=>{var{typed:t,config:r,equalScalar:n,matrix:a,BigNumber:i,Fraction:o,DenseMatrix:s,concat:u}=e,l=Ur({typed:t}),c=wc({typed:t,equalScalar:n}),f=or({typed:t,DenseMatrix:s}),m=Ot({typed:t,matrix:a,concat:u}),d=es({typed:t});return t(Yl,FR({typed:t,config:r}),{"boolean, boolean":function(h,y){return h===y?0:h>y?1:-1},"BigNumber, BigNumber":function(h,y){return Tn(h,y,r.relTol,r.absTol)?new i(0):new i(h.cmp(y))},"bigint, bigint":function(h,y){return h===y?0n:h>y?1n:-1n},"Fraction, Fraction":function(h,y){return new o(h.compare(y))},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},d,m({SS:c,DS:l,Ss:f}))}),FR=B(Yl,["typed","config"],e=>{var{typed:t,config:r}=e;return t(Yl,{"number, number":function(a,i){return Ar(a,i,r.relTol,r.absTol)?0:a>i?1:-1}})}),Ff,u1;function PR(){return u1||(u1=1,Ff=function e(t,r){var n=/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,a=/(^[ ]*|[ ]*$)/g,i=/(^([\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/,u=function(g){return e.insensitive&&(""+g).toLowerCase()||""+g},l=u(t).replace(a,"")||"",c=u(r).replace(a,"")||"",f=l.replace(n,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),m=c.replace(n,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),d=parseInt(l.match(o),16)||f.length!==1&&l.match(i)&&Date.parse(l),p=parseInt(c.match(o),16)||d&&c.match(i)&&Date.parse(c)||null,h,y;if(p){if(d<p)return-1;if(d>p)return 1}for(var b=0,D=Math.max(f.length,m.length);b<D;b++){if(h=!(f[b]||"").match(s)&&parseFloat(f[b])||f[b]||0,y=!(m[b]||"").match(s)&&parseFloat(m[b])||m[b]||0,isNaN(h)!==isNaN(y))return isNaN(h)?1:-1;if(typeof h!=typeof y&&(h+="",y+=""),h<y)return-1;if(h>y)return 1}return 0}),Ff}var kR=PR();const Ao=Hs.getDefaultExportFromCjs(kR);var l1="compareNatural",OR=["typed","compare"],$R=B(l1,OR,e=>{var{typed:t,compare:r}=e,n=r.signatures["boolean,boolean"];return t(l1,{"any, any":a});function a(u,l){var c=Mt(u),f=Mt(l),m;if((c==="number"||c==="BigNumber"||c==="Fraction")&&(f==="number"||f==="BigNumber"||f==="Fraction"))return m=r(u,l),m.toString()!=="0"?m>0?1:-1:Ao(c,f);var d=["Array","DenseMatrix","SparseMatrix"];if(d.includes(c)||d.includes(f))return m=i(a,u,l),m!==0?m:Ao(c,f);if(c!==f)return Ao(c,f);if(c==="Complex")return _R(u,l);if(c==="Unit")return u.equalBase(l)?a(u.value,l.value):o(a,u.formatUnits(),l.formatUnits());if(c==="boolean")return n(u,l);if(c==="string")return Ao(u,l);if(c==="Object")return s(a,u,l);if(c==="null"||c==="undefined")return 0;throw new TypeError('Unsupported type of value "'+c+'"')}function i(u,l,c){return ji(l)&&ji(c)?o(u,l.toJSON().values,c.toJSON().values):ji(l)?i(u,l.toArray(),c):ji(c)?i(u,l,c.toArray()):Bl(l)?i(u,l.toJSON().data,c):Bl(c)?i(u,l,c.toJSON().data):Array.isArray(l)?Array.isArray(c)?o(u,l,c):i(u,l,[c]):i(u,[l],c)}function o(u,l,c){for(var f=0,m=Math.min(l.length,c.length);f<m;f++){var d=u(l[f],c[f]);if(d!==0)return d}return l.length>c.length?1:l.length<c.length?-1:0}function s(u,l,c){var f=Object.keys(l),m=Object.keys(c);f.sort(Ao),m.sort(Ao);var d=o(u,f,m);if(d!==0)return d;for(var p=0;p<f.length;p++){var h=u(l[f[p]],c[m[p]]);if(h!==0)return h}return 0}});function _R(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 c1="compareText",BR=["typed","matrix","concat"];Fm.signature="any, any";var IR=B(c1,BR,e=>{var{typed:t,matrix:r,concat:n}=e,a=Ot({typed:t,matrix:r,concat:n});return t(c1,Fm,a({elop:Fm,Ds:!0}))}),Zl="equal",zR=["typed","matrix","equalScalar","DenseMatrix","concat","SparseMatrix"],jR=B(Zl,zR,e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i,SparseMatrix:o}=e,s=Ur({typed:t}),u=ua({typed:t,SparseMatrix:o}),l=or({typed:t,DenseMatrix:a}),c=Ot({typed:t,matrix:r,concat:i});return t(Zl,qR({typed:t,equalScalar:n}),c({elop:n,SS:u,DS:s,Ss:l}))}),qR=B(Zl,["typed","equalScalar"],e=>{var{typed:t,equalScalar:r}=e;return t(Zl,{"any, any":function(a,i){return a===null?i===null:i===null?a===null:a===void 0?i===void 0:i===void 0?a===void 0:r(a,i)}})}),f1="equalText",RR=["typed","compareText","isZero"],LR=B(f1,RR,e=>{var{typed:t,compareText:r,isZero:n}=e;return t(f1,{"any, any":function(i,o){return n(r(i,o))}})}),Ql="smaller",HR=["typed","config","bignumber","matrix","DenseMatrix","concat","SparseMatrix"],GR=B(Ql,HR,e=>{var{typed:t,config:r,bignumber:n,matrix:a,DenseMatrix:i,concat:o,SparseMatrix:s}=e,u=Ur({typed:t}),l=ua({typed:t,SparseMatrix:s}),c=or({typed:t,DenseMatrix:i}),f=Ot({typed:t,matrix:a,concat:o}),m=es({typed:t});function d(p,h){return p.lt(h)&&!Tn(p,h,r.relTol,r.absTol)}return t(Ql,VR({typed:t,config:r}),{"boolean, boolean":(p,h)=>p<h,"BigNumber, BigNumber":d,"bigint, bigint":(p,h)=>p<h,"Fraction, Fraction":(p,h)=>p.compare(h)===-1,"Fraction, BigNumber":function(h,y){return d(n(h),y)},"BigNumber, Fraction":function(h,y){return d(h,n(y))},"Complex, Complex":function(h,y){throw new TypeError("No ordering relation is defined for complex numbers")}},m,f({SS:l,DS:u,Ss:c}))}),VR=B(Ql,["typed","config"],e=>{var{typed:t,config:r}=e;return t(Ql,{"number, number":function(a,i){return a<i&&!Ar(a,i,r.relTol,r.absTol)}})}),Xl="smallerEq",UR=["typed","config","matrix","DenseMatrix","concat","SparseMatrix"],WR=B(Xl,UR,e=>{var{typed:t,config:r,matrix:n,DenseMatrix:a,concat:i,SparseMatrix:o}=e,s=Ur({typed:t}),u=ua({typed:t,SparseMatrix:o}),l=or({typed:t,DenseMatrix:a}),c=Ot({typed:t,matrix:n,concat:i}),f=es({typed:t});return t(Xl,JR({typed:t,config:r}),{"boolean, boolean":(m,d)=>m<=d,"BigNumber, BigNumber":function(d,p){return d.lte(p)||Tn(d,p,r.relTol,r.absTol)},"bigint, bigint":(m,d)=>m<=d,"Fraction, Fraction":(m,d)=>m.compare(d)!==1,"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},f,c({SS:u,DS:s,Ss:l}))}),JR=B(Xl,["typed","config"],e=>{var{typed:t,config:r}=e;return t(Xl,{"number, number":function(a,i){return a<=i||Ar(a,i,r.relTol,r.absTol)}})}),ec="larger",KR=["typed","config","bignumber","matrix","DenseMatrix","concat","SparseMatrix"],YR=B(ec,KR,e=>{var{typed:t,config:r,bignumber:n,matrix:a,DenseMatrix:i,concat:o,SparseMatrix:s}=e,u=Ur({typed:t}),l=ua({typed:t,SparseMatrix:s}),c=or({typed:t,DenseMatrix:i}),f=Ot({typed:t,matrix:a,concat:o}),m=es({typed:t});function d(p,h){return p.gt(h)&&!Tn(p,h,r.relTol,r.absTol)}return t(ec,ZR({typed:t,config:r}),{"boolean, boolean":(p,h)=>p>h,"BigNumber, BigNumber":d,"bigint, bigint":(p,h)=>p>h,"Fraction, Fraction":(p,h)=>p.compare(h)===1,"Fraction, BigNumber":function(h,y){return d(n(h),y)},"BigNumber, Fraction":function(h,y){return d(h,n(y))},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},m,f({SS:l,DS:u,Ss:c}))}),ZR=B(ec,["typed","config"],e=>{var{typed:t,config:r}=e;return t(ec,{"number, number":function(a,i){return a>i&&!Ar(a,i,r.relTol,r.absTol)}})}),tc="largerEq",QR=["typed","config","matrix","DenseMatrix","concat","SparseMatrix"],XR=B(tc,QR,e=>{var{typed:t,config:r,matrix:n,DenseMatrix:a,concat:i,SparseMatrix:o}=e,s=Ur({typed:t}),u=ua({typed:t,SparseMatrix:o}),l=or({typed:t,DenseMatrix:a}),c=Ot({typed:t,matrix:n,concat:i}),f=es({typed:t});return t(tc,eL({typed:t,config:r}),{"boolean, boolean":(m,d)=>m>=d,"BigNumber, BigNumber":function(d,p){return d.gte(p)||Tn(d,p,r.relTol,r.absTol)},"bigint, bigint":function(d,p){return d>=p},"Fraction, Fraction":(m,d)=>m.compare(d)!==-1,"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},f,c({SS:u,DS:s,Ss:l}))}),eL=B(tc,["typed","config"],e=>{var{typed:t,config:r}=e;return t(tc,{"number, number":function(a,i){return a>=i||Ar(a,i,r.relTol,r.absTol)}})}),m1="deepEqual",tL=["typed","equal"],rL=B(m1,tL,e=>{var{typed:t,equal:r}=e;return t(m1,{"any, any":function(i,o){return n(i.valueOf(),o.valueOf())}});function n(a,i){if(Array.isArray(a))if(Array.isArray(i)){var o=a.length;if(o!==i.length)return!1;for(var s=0;s<o;s++)if(!n(a[s],i[s]))return!1;return!0}else return!1;else return Array.isArray(i)?!1:r(a,i)}}),rc="unequal",nL=["typed","config","equalScalar","matrix","DenseMatrix","concat","SparseMatrix"],aL=B(rc,nL,e=>{var{typed:t,config:r,equalScalar:n,matrix:a,DenseMatrix:i,concat:o,SparseMatrix:s}=e,u=Ur({typed:t}),l=ua({typed:t,SparseMatrix:s}),c=or({typed:t,DenseMatrix:i}),f=Ot({typed:t,matrix:a,concat:o});return t(rc,iL({typed:t,equalScalar:n}),f({elop:m,SS:l,DS:u,Ss:c}));function m(d,p){return!n(d,p)}}),iL=B(rc,["typed","equalScalar"],e=>{var{typed:t,equalScalar:r}=e;return t(rc,{"any, any":function(a,i){return a===null?i!==null:i===null?a!==null:a===void 0?i!==void 0:i===void 0?a!==void 0:!r(a,i)}})}),d1="partitionSelect",oL=["typed","isNumeric","isNaN","compare"],sL=B(d1,oL,e=>{var{typed:t,isNumeric:r,isNaN:n,compare:a}=e,i=a,o=(l,c)=>-a(l,c);return t(d1,{"Array | Matrix, number":function(c,f){return s(c,f,i)},"Array | Matrix, number, string":function(c,f,m){if(m==="asc")return s(c,f,i);if(m==="desc")return s(c,f,o);throw new Error('Compare string must be "asc" or "desc"')},"Array | Matrix, number, function":s});function s(l,c,f){if(!$e(c)||c<0)throw new Error("k must be a non-negative integer");if(je(l)){var m=l.size();if(m.length>1)throw new Error("Only one dimensional matrices supported");return u(l.valueOf(),c,f)}if(Array.isArray(l))return u(l,c,f)}function u(l,c,f){if(c>=l.length)throw new Error("k out of bounds");for(var m=0;m<l.length;m++)if(r(l[m])&&n(l[m]))return l[m];for(var d=0,p=l.length-1;d<p;){for(var h=d,y=p,b=l[Math.floor(Math.random()*(p-d+1))+d];h<y;)if(f(l[h],b)>=0){var D=l[y];l[y]=l[h],l[h]=D,--y}else++h;f(l[h],b)>0&&--h,c<=h?p=h:d=h+1}return l[c]}}),h1="sort",uL=["typed","matrix","compare","compareNatural"],lL=B(h1,uL,e=>{var{typed:t,matrix:r,compare:n,compareNatural:a}=e,i=n,o=(c,f)=>-n(c,f);return t(h1,{Array:function(f){return u(f),f.sort(i)},Matrix:function(f){return l(f),r(f.toArray().sort(i),f.storage())},"Array, function":function(f,m){return u(f),f.sort(m)},"Matrix, function":function(f,m){return l(f),r(f.toArray().sort(m),f.storage())},"Array, string":function(f,m){return u(f),f.sort(s(m))},"Matrix, string":function(f,m){return l(f),r(f.toArray().sort(s(m)),f.storage())}});function s(c){if(c==="asc")return i;if(c==="desc")return o;if(c==="natural")return a;throw new Error('String "asc", "desc", or "natural" expected')}function u(c){if(Ve(c).length!==1)throw new Error("One dimensional array expected")}function l(c){if(c.size().length!==1)throw new Error("One dimensional matrix expected")}}),p1="max",cL=["typed","config","numeric","larger","isNaN"],P2=B(p1,cL,e=>{var{typed:t,config:r,numeric:n,larger:a,isNaN:i}=e;return t(p1,{"Array | Matrix":s,"Array | Matrix, number | BigNumber":function(l,c){return bc(l,c.valueOf(),o)},"...":function(l){if(Zo(l))throw new TypeError("Scalar values expected in function max");return s(l)}});function o(u,l){try{return a(u,l)?u:l}catch(c){throw Vr(c,"max",l)}}function s(u){var l;if(ci(u,function(c){try{(i(c)||l===void 0||a(c,l))&&(l=c)}catch(f){throw Vr(f,"max",c)}}),l===void 0)throw new Error("Cannot calculate max of an empty array");return typeof l=="string"&&(l=n(l,mi(l,r))),l}}),g1="min",fL=["typed","config","numeric","smaller","isNaN"],k2=B(g1,fL,e=>{var{typed:t,config:r,numeric:n,smaller:a,isNaN:i}=e;return t(g1,{"Array | Matrix":s,"Array | Matrix, number | BigNumber":function(l,c){return bc(l,c.valueOf(),o)},"...":function(l){if(Zo(l))throw new TypeError("Scalar values expected in function min");return s(l)}});function o(u,l){try{return a(u,l)?u:l}catch(c){throw Vr(c,"min",l)}}function s(u){var l;if(ci(u,function(c){try{(i(c)||l===void 0||a(c,l))&&(l=c)}catch(f){throw Vr(f,"min",c)}}),l===void 0)throw new Error("Cannot calculate min of an empty array");return typeof l=="string"&&(l=n(l,mi(l,r))),l}}),mL="ImmutableDenseMatrix",dL=["smaller","DenseMatrix"],hL=B(mL,dL,e=>{var{smaller:t,DenseMatrix:r}=e;function n(a,i){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(i&&!Pr(i))throw new Error("Invalid datatype: "+i);if(je(a)||Et(a)){var o=new r(a,i);this._data=o._data,this._size=o._size,this._datatype=o._datatype,this._min=null,this._max=null}else if(a&&Et(a.data)&&Et(a.size))this._data=a.data,this._size=a.size,this._datatype=a.datatype,this._min=typeof a.min<"u"?a.min:null,this._max=typeof a.max<"u"?a.max:null;else{if(a)throw new TypeError("Unsupported type of data ("+Mt(a)+")");this._data=[],this._size=[0],this._datatype=i,this._min=null,this._max=null}}return n.prototype=new r,n.prototype.type="ImmutableDenseMatrix",n.prototype.isImmutableDenseMatrix=!0,n.prototype.subset=function(a){switch(arguments.length){case 1:{var i=r.prototype.subset.call(this,a);return je(i)?new n({data:i._data,size:i._size,datatype:i._datatype}):i}case 2:case 3:throw new Error("Cannot invoke set subset on an Immutable Matrix instance");default:throw new SyntaxError("Wrong number of arguments")}},n.prototype.set=function(){throw new Error("Cannot invoke set on an Immutable Matrix instance")},n.prototype.resize=function(){throw new Error("Cannot invoke resize on an Immutable Matrix instance")},n.prototype.reshape=function(){throw new Error("Cannot invoke reshape on an Immutable Matrix instance")},n.prototype.clone=function(){return new n({data:Ue(this._data),size:Ue(this._size),datatype:this._datatype})},n.prototype.toJSON=function(){return{mathjs:"ImmutableDenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},n.fromJSON=function(a){return new n(a)},n.prototype.swapRows=function(){throw new Error("Cannot invoke swapRows on an Immutable Matrix instance")},n.prototype.min=function(){if(this._min===null){var a=null;this.forEach(function(i){(a===null||t(i,a))&&(a=i)}),this._min=a!==null?a:void 0}return this._min},n.prototype.max=function(){if(this._max===null){var a=null;this.forEach(function(i){(a===null||t(a,i))&&(a=i)}),this._max=a!==null?a:void 0}return this._max},n},{isClass:!0}),pL="Index",gL=["ImmutableDenseMatrix","getMatrixDataType"],vL=B(pL,gL,e=>{var{ImmutableDenseMatrix:t,getMatrixDataType:r}=e;function n(i){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");this._dimensions=[],this._sourceSize=[],this._isScalar=!0;for(var o=0,s=arguments.length;o<s;o++){var u=arguments[o],l=Et(u),c=je(u),f=typeof u,m=null;if(hd(u))this._dimensions.push(u),this._isScalar=!1;else if(l||c){var d=void 0;r(u)==="boolean"?(l&&(d=a(v1(u).valueOf())),c&&(d=a(v1(u._data).valueOf())),m=u.valueOf().length):d=a(u.valueOf()),this._dimensions.push(d);var p=d.size();(p.length!==1||p[0]!==1||m!==null)&&(this._isScalar=!1)}else if(f==="number")this._dimensions.push(a([u]));else if(f==="bigint")this._dimensions.push(a([Number(u)]));else if(f==="string")this._dimensions.push(u);else throw new TypeError("Dimension must be an Array, Matrix, number, bigint, string, or Range");this._sourceSize.push(m)}}n.prototype.type="Index",n.prototype.isIndex=!0;function a(i){for(var o=0,s=i.length;o<s;o++)if(typeof i[o]!="number"||!$e(i[o]))throw new TypeError("Index parameters must be positive integer numbers");return new t(i)}return n.prototype.clone=function(){var i=new n;return i._dimensions=Ue(this._dimensions),i._isScalar=this._isScalar,i._sourceSize=this._sourceSize,i},n.create=function(i){var o=new n;return n.apply(o,i),o},n.prototype.size=function(){for(var i=[],o=0,s=this._dimensions.length;o<s;o++){var u=this._dimensions[o];i[o]=typeof u=="string"?1:u.size()[0]}return i},n.prototype.max=function(){for(var i=[],o=0,s=this._dimensions.length;o<s;o++){var u=this._dimensions[o];i[o]=typeof u=="string"?u:u.max()}return i},n.prototype.min=function(){for(var i=[],o=0,s=this._dimensions.length;o<s;o++){var u=this._dimensions[o];i[o]=typeof u=="string"?u:u.min()}return i},n.prototype.forEach=function(i){for(var o=0,s=this._dimensions.length;o<s;o++)i(this._dimensions[o],o,this)},n.prototype.dimension=function(i){return typeof i!="number"?null:this._dimensions[i]||null},n.prototype.isObjectProperty=function(){return this._dimensions.length===1&&typeof this._dimensions[0]=="string"},n.prototype.getObjectProperty=function(){return this.isObjectProperty()?this._dimensions[0]:null},n.prototype.isScalar=function(){return this._isScalar},n.prototype.toArray=function(){for(var i=[],o=0,s=this._dimensions.length;o<s;o++){var u=this._dimensions[o];i.push(typeof u=="string"?u:u.toArray())}return i},n.prototype.valueOf=n.prototype.toArray,n.prototype.toString=function(){for(var i=[],o=0,s=this._dimensions.length;o<s;o++){var u=this._dimensions[o];typeof u=="string"?i.push(JSON.stringify(u)):i.push(u.toString())}return"["+i.join(", ")+"]"},n.prototype.toJSON=function(){return{mathjs:"Index",dimensions:this._dimensions}},n.fromJSON=function(i){return n.create(i.dimensions)},n},{isClass:!0});function v1(e){var t=[];return e.forEach((r,n)=>{r&&t.push(n)}),t}var yL="FibonacciHeap",bL=["smaller","larger"],wL=B(yL,bL,e=>{var{smaller:t,larger:r}=e,n=1/Math.log((1+Math.sqrt(5))/2);function a(){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");this._minimum=null,this._size=0}a.prototype.type="FibonacciHeap",a.prototype.isFibonacciHeap=!0,a.prototype.insert=function(c,f){var m={key:c,value:f,degree:0};if(this._minimum){var d=this._minimum;m.left=d,m.right=d.right,d.right=m,m.right.left=m,t(c,d.key)&&(this._minimum=m)}else m.left=m,m.right=m,this._minimum=m;return this._size++,m},a.prototype.size=function(){return this._size},a.prototype.clear=function(){this._minimum=null,this._size=0},a.prototype.isEmpty=function(){return this._size===0},a.prototype.extractMinimum=function(){var c=this._minimum;if(c===null)return c;for(var f=this._minimum,m=c.degree,d=c.child;m>0;){var p=d.right;d.left.right=d.right,d.right.left=d.left,d.left=f,d.right=f.right,f.right=d,d.right.left=d,d.parent=null,d=p,m--}return c.left.right=c.right,c.right.left=c.left,c===c.right?f=null:(f=c.right,f=l(f,this._size)),this._size--,this._minimum=f,c},a.prototype.remove=function(c){this._minimum=i(this._minimum,c,-1),this.extractMinimum()};function i(c,f,m){f.key=m;var d=f.parent;return d&&t(f.key,d.key)&&(o(c,f,d),s(c,d)),t(f.key,c.key)&&(c=f),c}function o(c,f,m){f.left.right=f.right,f.right.left=f.left,m.degree--,m.child===f&&(m.child=f.right),m.degree===0&&(m.child=null),f.left=c,f.right=c.right,c.right=f,f.right.left=f,f.parent=null,f.mark=!1}function s(c,f){var m=f.parent;m&&(f.mark?(o(c,f,m),s(m)):f.mark=!0)}var u=function(f,m){f.left.right=f.right,f.right.left=f.left,f.parent=m,m.child?(f.left=m.child,f.right=m.child.right,m.child.right=f,f.right.left=f):(m.child=f,f.right=f,f.left=f),m.degree++,f.mark=!1};function l(c,f){var m=Math.floor(Math.log(f)*n)+1,d=new Array(m),p=0,h=c;if(h)for(p++,h=h.right;h!==c;)p++,h=h.right;for(var y;p>0;){for(var b=h.degree,D=h.right;y=d[b],!!y;){if(r(h.key,y.key)){var g=y;y=h,h=g}u(y,h),d[b]=null,b++}d[b]=h,h=D,p--}c=null;for(var x=0;x<m;x++)y=d[x],y&&(c?(y.left.right=y.right,y.right.left=y.left,y.left=c,y.right=c.right,c.right=y,y.right.left=y,t(y.key,c.key)&&(c=y)):c=y);return c}return a},{isClass:!0}),xL="Spa",DL=["addScalar","equalScalar","FibonacciHeap"],NL=B(xL,DL,e=>{var{addScalar:t,equalScalar:r,FibonacciHeap:n}=e;function a(){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");this._values=[],this._heap=new n}return a.prototype.type="Spa",a.prototype.isSpa=!0,a.prototype.set=function(i,o){if(this._values[i])this._values[i].value=o;else{var s=this._heap.insert(i,o);this._values[i]=s}},a.prototype.get=function(i){var o=this._values[i];return o?o.value:0},a.prototype.accumulate=function(i,o){var s=this._values[i];s?s.value=t(s.value,o):(s=this._heap.insert(i,o),this._values[i]=s)},a.prototype.forEach=function(i,o,s){var u=this._heap,l=this._values,c=[],f=u.extractMinimum();for(f&&c.push(f);f&&f.key<=o;)f.key>=i&&(r(f.value,0)||s(f.key,f.value,this)),f=u.extractMinimum(),f&&c.push(f);for(var m=0;m<c.length;m++){var d=c[m];f=u.insert(d.key,d.value),l[f.key]=f}},a.prototype.swap=function(i,o){var s=this._values[i],u=this._values[o];if(!s&&u)s=this._heap.insert(i,u.value),this._heap.remove(u),this._values[i]=s,this._values[o]=void 0;else if(s&&!u)u=this._heap.insert(o,s.value),this._heap.remove(s),this._values[o]=u,this._values[i]=void 0;else if(s&&u){var l=s.value;s.value=u.value,u.value=l}},a},{isClass:!0});function AL(e){var t=0,r=1,n=Object.create(null),a=Object.create(null),i=0,o=function(u){var l=a[u];if(l&&(delete n[l],delete a[u],--t,r===l)){if(!t){i=0,r=1;return}for(;!Object.prototype.hasOwnProperty.call(n,++r););}};return e=Math.abs(e),{hit:function(u){var l=a[u],c=++i;if(n[c]=u,a[u]=c,!l)return++t,t<=e?void 0:(u=n[r],o(u),u);if(delete n[l],r===l)for(;!Object.prototype.hasOwnProperty.call(n,++r););},delete:o,clear:function(){t=i=0,r=1,n=Object.create(null),a=Object.create(null)}}}function tu(e){var{hasher:t,limit:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return r=r??Number.POSITIVE_INFINITY,t=t??JSON.stringify,function n(){typeof n.cache!="object"&&(n.cache={values:new Map,lru:AL(r||Number.POSITIVE_INFINITY)});for(var a=[],i=0;i<arguments.length;i++)a[i]=arguments[i];var o=t(a);if(n.cache.values.has(o))return n.cache.lru.hit(o),n.cache.values.get(o);var s=e.apply(e,a);return n.cache.values.set(o,s),n.cache.values.delete(n.cache.lru.hit(o)),s}}var CL=tu(function(e){return new e(1).exp()},{hasher:Dc}),EL=tu(function(e){return new e(1).plus(new e(5).sqrt()).div(2)},{hasher:Dc}),Td=tu(function(e){return e.acos(-1)},{hasher:Dc}),SL=tu(function(e){return Td(e).times(2)},{hasher:Dc});function Dc(e){return e[0].precision}function y1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Pf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?y1(Object(r),!0).forEach(function(n){rr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ML="Unit",TL=["?on","config","addScalar","subtractScalar","multiplyScalar","divideScalar","pow","abs","fix","round","equal","isNumeric","format","number","Complex","BigNumber","Fraction"],FL=B(ML,TL,e=>{var{on:t,config:r,addScalar:n,subtractScalar:a,multiplyScalar:i,divideScalar:o,pow:s,abs:u,fix:l,round:c,equal:f,isNumeric:m,format:d,number:p,Complex:h,BigNumber:y,Fraction:b}=e,D=p;function g(q,H){if(!(this instanceof g))throw new Error("Constructor must be called with the new operator");if(!(q==null||m(q)||Pa(q)))throw new TypeError("First parameter in Unit constructor must be number, BigNumber, Fraction, Complex, or undefined");if(this.fixPrefix=!1,this.skipAutomaticSimplification=!0,H===void 0)this.units=[],this.dimensions=j.map(ae=>0);else if(typeof H=="string"){var Z=g.parse(H);this.units=Z.units,this.dimensions=Z.dimensions}else if(Nn(H)&&H.value===null)this.fixPrefix=H.fixPrefix,this.skipAutomaticSimplification=H.skipAutomaticSimplification,this.dimensions=H.dimensions.slice(0),this.units=H.units.map(ae=>ar({},ae));else throw new TypeError("Second parameter in Unit constructor must be a string or valueless Unit");this.value=this._normalize(q)}Object.defineProperty(g,"name",{value:"Unit"}),g.prototype.constructor=g,g.prototype.type="Unit",g.prototype.isUnit=!0;var x,w,v;function A(){for(;v===" "||v===" ";)E()}function C(q){return q>="0"&&q<="9"||q==="."}function N(q){return q>="0"&&q<="9"}function E(){w++,v=x.charAt(w)}function S(q){w=q,v=x.charAt(w)}function F(){var q="",H=w;if(v==="+"?E():v==="-"&&(q+=v,E()),!C(v))return S(H),null;if(v==="."){if(q+=v,E(),!N(v))return S(H),null}else{for(;N(v);)q+=v,E();v==="."&&(q+=v,E())}for(;N(v);)q+=v,E();if(v==="E"||v==="e"){var Z="",ae=w;if(Z+=v,E(),(v==="+"||v==="-")&&(Z+=v,E()),!N(v))return S(ae),q;for(q=q+Z;N(v);)q+=v,E()}return q}function k(){for(var q="";N(v)||g.isValidAlpha(v);)q+=v,E();var H=q.charAt(0);return g.isValidAlpha(H)?q:null}function $(q){return v===q?(E(),q):null}g.parse=function(q,H){if(H=H||{},x=q,w=-1,v="",typeof x!="string")throw new TypeError("Invalid argument in Unit.parse, string expected");var Z=new g;Z.units=[];var ae=1,he=!1;E(),A();var ye=F(),Te=null;if(ye){if(r.number==="BigNumber")Te=new y(ye);else if(r.number==="Fraction")try{Te=new b(ye)}catch{Te=parseFloat(ye)}else Te=parseFloat(ye);A(),$("*")?(ae=1,he=!0):$("/")&&(ae=-1,he=!0)}for(var I=[],Y=1;;){for(A();v==="(";)I.push(ae),Y*=ae,ae=1,E(),A();var X=void 0;if(v){var se=v;if(X=k(),X===null)throw new SyntaxError('Unexpected "'+se+'" in "'+x+'" at index '+w.toString())}else break;var ce=_(X);if(ce===null)throw new SyntaxError('Unit "'+X+'" not found.');var fe=ae*Y;if(A(),$("^")){A();var Ee=F();if(Ee===null)throw new SyntaxError('In "'+q+'", "^" must be followed by a floating-point number');fe*=Ee}Z.units.push({unit:ce.unit,prefix:ce.prefix,power:fe});for(var be=0;be<j.length;be++)Z.dimensions[be]+=(ce.unit.dimensions[be]||0)*fe;for(A();v===")";){if(I.length===0)throw new SyntaxError('Unmatched ")" in "'+x+'" at index '+w.toString());Y/=I.pop(),E(),A()}if(he=!1,$("*")?(ae=1,he=!0):$("/")?(ae=-1,he=!0):ae=1,ce.unit.base){var Se=ce.unit.base.key;ee.auto[Se]={unit:ce.unit,prefix:ce.prefix}}}if(A(),v)throw new SyntaxError('Could not parse: "'+q+'"');if(he)throw new SyntaxError('Trailing characters: "'+q+'"');if(I.length!==0)throw new SyntaxError('Unmatched "(" in "'+x+'"');if(Z.units.length===0&&!H.allowNoUnits)throw new SyntaxError('"'+q+'" contains no units');return Z.value=Te!==void 0?Z._normalize(Te):null,Z},g.prototype.clone=function(){var q=new g;q.fixPrefix=this.fixPrefix,q.skipAutomaticSimplification=this.skipAutomaticSimplification,q.value=Ue(this.value),q.dimensions=this.dimensions.slice(0),q.units=[];for(var H=0;H<this.units.length;H++){q.units[H]={};for(var Z in this.units[H])Oe(this.units[H],Z)&&(q.units[H][Z]=this.units[H][Z])}return q},g.prototype.valueType=function(){return Mt(this.value)},g.prototype._isDerived=function(){return this.units.length===0?!1:this.units.length>1||Math.abs(this.units[0].power-1)>1e-15},g.prototype._normalize=function(q){if(q==null||this.units.length===0)return q;for(var H=q,Z=g._getNumberConverter(Mt(q)),ae=0;ae<this.units.length;ae++){var he=Z(this.units[ae].unit.value),ye=Z(this.units[ae].prefix.value),Te=Z(this.units[ae].power);H=i(H,s(i(he,ye),Te))}return H},g.prototype._denormalize=function(q,H){if(q==null||this.units.length===0)return q;for(var Z=q,ae=g._getNumberConverter(Mt(q)),he=0;he<this.units.length;he++){var ye=ae(this.units[he].unit.value),Te=ae(this.units[he].prefix.value),I=ae(this.units[he].power);Z=o(Z,s(i(ye,Te),I))}return Z};var _=tu(q=>{if(Oe(V,q)){var H=V[q],Z=H.prefixes[""];return{unit:H,prefix:Z}}for(var ae in V)if(Oe(V,ae)&&I8(q,ae)){var he=V[ae],ye=q.length-ae.length,Te=q.substring(0,ye),I=Oe(he.prefixes,Te)?he.prefixes[Te]:void 0;if(I!==void 0)return{unit:he,prefix:I}}return null},{hasher:q=>q[0],limit:100});g.isValuelessUnit=function(q){return _(q)!==null},g.prototype.hasBase=function(q){if(typeof q=="string"&&(q=O[q]),!q)return!1;for(var H=0;H<j.length;H++)if(Math.abs((this.dimensions[H]||0)-(q.dimensions[H]||0))>1e-12)return!1;return!0},g.prototype.equalBase=function(q){for(var H=0;H<j.length;H++)if(Math.abs((this.dimensions[H]||0)-(q.dimensions[H]||0))>1e-12)return!1;return!0},g.prototype.equals=function(q){return this.equalBase(q)&&f(this.value,q.value)},g.prototype.multiply=function(q){for(var H=this.clone(),Z=Nn(q)?q:new g(q),ae=0;ae<j.length;ae++)H.dimensions[ae]=(this.dimensions[ae]||0)+(Z.dimensions[ae]||0);for(var he=0;he<Z.units.length;he++){var ye=Pf({},Z.units[he]);H.units.push(ye)}if(this.value!==null||Z.value!==null){var Te=this.value===null?this._normalize(z(Z.value)):this.value,I=Z.value===null?Z._normalize(z(this.value)):Z.value;H.value=i(Te,I)}else H.value=null;return Nn(q)&&(H.skipAutomaticSimplification=!1),T(H)},g.prototype.divideInto=function(q){return new g(q).divide(this)},g.prototype.divide=function(q){for(var H=this.clone(),Z=Nn(q)?q:new g(q),ae=0;ae<j.length;ae++)H.dimensions[ae]=(this.dimensions[ae]||0)-(Z.dimensions[ae]||0);for(var he=0;he<Z.units.length;he++){var ye=Pf(Pf({},Z.units[he]),{},{power:-Z.units[he].power});H.units.push(ye)}if(this.value!==null||Z.value!==null){var Te=this.value===null?this._normalize(z(Z.value)):this.value,I=Z.value===null?Z._normalize(z(this.value)):Z.value;H.value=o(Te,I)}else H.value=null;return Nn(q)&&(H.skipAutomaticSimplification=!1),T(H)},g.prototype.pow=function(q){for(var H=this.clone(),Z=0;Z<j.length;Z++)H.dimensions[Z]=(this.dimensions[Z]||0)*q;for(var ae=0;ae<H.units.length;ae++)H.units[ae].power*=q;return H.value!==null?H.value=s(H.value,q):H.value=null,H.skipAutomaticSimplification=!1,T(H)};function T(q){return q.equalBase(O.NONE)&&q.value!==null&&!r.predictable?q.value:q}function z(q){var H=g._getNumberConverter(Mt(q));return H(1)}g.prototype.abs=function(){var q=this.clone();if(q.value!==null)if(q._isDerived()||q.units.length===0||q.units[0].unit.offset===0)q.value=u(q.value);else{var H=q._numberConverter(),Z=H(q.units[0].unit.value),ae=H(q.units[0].unit.offset),he=i(Z,ae);q.value=a(u(n(q.value,he)),he)}for(var ye in q.units)(q.units[ye].unit.name==="VA"||q.units[ye].unit.name==="VAR")&&(q.units[ye].unit=V.W);return q},g.prototype.to=function(q){var H=this.value===null?this._normalize(1):this.value,Z;if(typeof q=="string")Z=g.parse(q);else if(Nn(q))Z=q.clone();else throw new Error("String or Unit expected as parameter");if(!this.equalBase(Z))throw new Error("Units do not match ('".concat(Z.toString(),"' != '").concat(this.toString(),"')"));if(Z.value!==null)throw new Error("Cannot convert to a unit with a value");if(this.value===null||this._isDerived()||this.units.length===0||Z.units.length===0||this.units[0].unit.offset===Z.units[0].unit.offset)Z.value=Ue(H);else{var ae=g._getNumberConverter(Mt(H)),he=this.units[0].unit.value,ye=this.units[0].unit.offset,Te=i(he,ye),I=Z.units[0].unit.value,Y=Z.units[0].unit.offset,X=i(I,Y);Z.value=n(H,ae(a(Te,X)))}return Z.fixPrefix=!0,Z.skipAutomaticSimplification=!0,Z},g.prototype.toNumber=function(q){return D(this.toNumeric(q))},g.prototype.toNumeric=function(q){var H;return q?H=this.to(q):H=this.clone(),H._isDerived()||H.units.length===0?H._denormalize(H.value):H._denormalize(H.value,H.units[0].prefix.value)},g.prototype.toString=function(){return this.format()},g.prototype.toJSON=function(){return{mathjs:"Unit",value:this._denormalize(this.value),unit:this.units.length>0?this.formatUnits():null,fixPrefix:this.fixPrefix}},g.fromJSON=function(q){var H,Z=new g(q.value,(H=q.unit)!==null&&H!==void 0?H:void 0);return Z.fixPrefix=q.fixPrefix||!1,Z},g.prototype.valueOf=g.prototype.toString,g.prototype.simplify=function(){var q=this.clone(),H=[],Z;for(var ae in L)if(Oe(L,ae)&&q.hasBase(O[ae])){Z=ae;break}if(Z==="NONE")q.units=[];else{var he;if(Z&&Oe(L,Z)&&(he=L[Z]),he)q.units=[{unit:he.unit,prefix:he.prefix,power:1}];else{for(var ye=!1,Te=0;Te<j.length;Te++){var I=j[Te];Math.abs(q.dimensions[Te]||0)>1e-12&&(Oe(L,I)?H.push({unit:L[I].unit,prefix:L[I].prefix,power:q.dimensions[Te]||0}):ye=!0)}H.length<q.units.length&&!ye&&(q.units=H)}}return q},g.prototype.toSI=function(){for(var q=this.clone(),H=[],Z=0;Z<j.length;Z++){var ae=j[Z];if(Math.abs(q.dimensions[Z]||0)>1e-12)if(Oe(ee.si,ae))H.push({unit:ee.si[ae].unit,prefix:ee.si[ae].prefix,power:q.dimensions[Z]||0});else throw new Error("Cannot express custom unit "+ae+" in SI units")}return q.units=H,q.fixPrefix=!0,q.skipAutomaticSimplification=!0,this.value!==null?(q.value=null,this.to(q)):q},g.prototype.formatUnits=function(){for(var q="",H="",Z=0,ae=0,he=0;he<this.units.length;he++)this.units[he].power>0?(Z++,q+=" "+this.units[he].prefix.name+this.units[he].unit.name,Math.abs(this.units[he].power-1)>1e-15&&(q+="^"+this.units[he].power)):this.units[he].power<0&&ae++;if(ae>0)for(var ye=0;ye<this.units.length;ye++)this.units[ye].power<0&&(Z>0?(H+=" "+this.units[ye].prefix.name+this.units[ye].unit.name,Math.abs(this.units[ye].power+1)>1e-15&&(H+="^"+-this.units[ye].power)):(H+=" "+this.units[ye].prefix.name+this.units[ye].unit.name,H+="^"+this.units[ye].power));q=q.substr(1),H=H.substr(1),Z>1&&ae>0&&(q="("+q+")"),ae>1&&Z>0&&(H="("+H+")");var Te=q;return Z>0&&ae>0&&(Te+=" / "),Te+=H,Te},g.prototype.format=function(q){var H=this.skipAutomaticSimplification||this.value===null?this.clone():this.simplify(),Z=!1;typeof H.value<"u"&&H.value!==null&&Pa(H.value)&&(Z=Math.abs(H.value.re)<1e-14);for(var ae in H.units)Oe(H.units,ae)&&H.units[ae].unit&&(H.units[ae].unit.name==="VA"&&Z?H.units[ae].unit=V.VAR:H.units[ae].unit.name==="VAR"&&!Z&&(H.units[ae].unit=V.VA));H.units.length===1&&!H.fixPrefix&&Math.abs(H.units[0].power-Math.round(H.units[0].power))<1e-14&&(H.units[0].prefix=H._bestPrefix());var he=H._denormalize(H.value),ye=H.value!==null?d(he,q||{}):"",Te=H.formatUnits();return H.value&&Pa(H.value)&&(ye="("+ye+")"),Te.length>0&&ye.length>0&&(ye+=" "),ye+=Te,ye},g.prototype._bestPrefix=function(){if(this.units.length!==1)throw new Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");if(Math.abs(this.units[0].power-Math.round(this.units[0].power))>=1e-14)throw new Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");var q=this.value!==null?u(this.value):0,H=u(this.units[0].unit.value),Z=this.units[0].prefix;if(q===0)return Z;var ae=this.units[0].power,he=Math.log(q/Math.pow(Z.value*H,ae))/Math.LN10-1.2;if(he>-2.200001&&he<1.800001)return Z;he=Math.abs(he);var ye=this.units[0].unit.prefixes;for(var Te in ye)if(Oe(ye,Te)){var I=ye[Te];if(I.scientific){var Y=Math.abs(Math.log(q/Math.pow(I.value*H,ae))/Math.LN10-1.2);(Y<he||Y===he&&I.name.length<Z.name.length)&&(Z=I,he=Y)}}return Z},g.prototype.splitUnit=function(q){for(var H=this.clone(),Z=[],ae=0;ae<q.length&&(H=H.to(q[ae]),ae!==q.length-1);ae++){var he=H.toNumeric(),ye=c(he),Te=void 0,I=f(ye,he);I?Te=ye:Te=l(H.toNumeric());var Y=new g(Te,q[ae].toString());Z.push(Y),H=a(H,Y)}for(var X=0,se=0;se<Z.length;se++)X=n(X,Z[se].value);return f(X,this.value)&&(H.value=0),Z.push(H),Z};var P={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:1e12,scientific:!0},P:{name:"P",value:1e15,scientific:!0},E:{name:"E",value:1e18,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:1e12,scientific:!0},peta:{name:"peta",value:1e15,scientific:!0},exa:{name:"exa",value:1e18,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:1e12,scientific:!0},G:{name:"G",value:1e18,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:1e18,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:1e12,scientific:!0},P:{name:"P",value:1e15,scientific:!0},E:{name:"E",value:1e18,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:Math.pow(1024,2),scientific:!0},Gi:{name:"Gi",value:Math.pow(1024,3),scientific:!0},Ti:{name:"Ti",value:Math.pow(1024,4),scientific:!0},Pi:{name:"Pi",value:Math.pow(1024,5),scientific:!0},Ei:{name:"Ei",value:Math.pow(1024,6),scientific:!0},Zi:{name:"Zi",value:Math.pow(1024,7),scientific:!0},Yi:{name:"Yi",value:Math.pow(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:1e12,scientific:!0},peta:{name:"peta",value:1e15,scientific:!0},exa:{name:"exa",value:1e18,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:Math.pow(1024,2),scientific:!0},gibi:{name:"gibi",value:Math.pow(1024,3),scientific:!0},tebi:{name:"tebi",value:Math.pow(1024,4),scientific:!0},pebi:{name:"pebi",value:Math.pow(1024,5),scientific:!0},exi:{name:"exi",value:Math.pow(1024,6),scientific:!0},zebi:{name:"zebi",value:Math.pow(1024,7),scientific:!0},yobi:{name:"yobi",value:Math.pow(1024,8),scientific:!0}},BTU:{"":{name:"",value:1,scientific:!0},MM:{name:"MM",value:1e6,scientific:!0}}};P.SHORTLONG=ar({},P.SHORT,P.LONG),P.BINARY_SHORT=ar({},P.BINARY_SHORT_SI,P.BINARY_SHORT_IEC),P.BINARY_LONG=ar({},P.BINARY_LONG_SI,P.BINARY_LONG_IEC);var j=["MASS","LENGTH","TIME","CURRENT","TEMPERATURE","LUMINOUS_INTENSITY","AMOUNT_OF_SUBSTANCE","ANGLE","BIT"],O={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 Q in O)Oe(O,Q)&&(O[Q].key=Q);var K={},U={name:"",base:K,value:1,offset:0,dimensions:j.map(q=>0)},V={meter:{name:"meter",base:O.LENGTH,prefixes:P.LONG,value:1,offset:0},inch:{name:"inch",base:O.LENGTH,prefixes:P.NONE,value:.0254,offset:0},foot:{name:"foot",base:O.LENGTH,prefixes:P.NONE,value:.3048,offset:0},yard:{name:"yard",base:O.LENGTH,prefixes:P.NONE,value:.9144,offset:0},mile:{name:"mile",base:O.LENGTH,prefixes:P.NONE,value:1609.344,offset:0},link:{name:"link",base:O.LENGTH,prefixes:P.NONE,value:.201168,offset:0},rod:{name:"rod",base:O.LENGTH,prefixes:P.NONE,value:5.0292,offset:0},chain:{name:"chain",base:O.LENGTH,prefixes:P.NONE,value:20.1168,offset:0},angstrom:{name:"angstrom",base:O.LENGTH,prefixes:P.NONE,value:1e-10,offset:0},m:{name:"m",base:O.LENGTH,prefixes:P.SHORT,value:1,offset:0},in:{name:"in",base:O.LENGTH,prefixes:P.NONE,value:.0254,offset:0},ft:{name:"ft",base:O.LENGTH,prefixes:P.NONE,value:.3048,offset:0},yd:{name:"yd",base:O.LENGTH,prefixes:P.NONE,value:.9144,offset:0},mi:{name:"mi",base:O.LENGTH,prefixes:P.NONE,value:1609.344,offset:0},li:{name:"li",base:O.LENGTH,prefixes:P.NONE,value:.201168,offset:0},rd:{name:"rd",base:O.LENGTH,prefixes:P.NONE,value:5.02921,offset:0},ch:{name:"ch",base:O.LENGTH,prefixes:P.NONE,value:20.1168,offset:0},mil:{name:"mil",base:O.LENGTH,prefixes:P.NONE,value:254e-7,offset:0},m2:{name:"m2",base:O.SURFACE,prefixes:P.SQUARED,value:1,offset:0},sqin:{name:"sqin",base:O.SURFACE,prefixes:P.NONE,value:64516e-8,offset:0},sqft:{name:"sqft",base:O.SURFACE,prefixes:P.NONE,value:.09290304,offset:0},sqyd:{name:"sqyd",base:O.SURFACE,prefixes:P.NONE,value:.83612736,offset:0},sqmi:{name:"sqmi",base:O.SURFACE,prefixes:P.NONE,value:2589988110336e-6,offset:0},sqrd:{name:"sqrd",base:O.SURFACE,prefixes:P.NONE,value:25.29295,offset:0},sqch:{name:"sqch",base:O.SURFACE,prefixes:P.NONE,value:404.6873,offset:0},sqmil:{name:"sqmil",base:O.SURFACE,prefixes:P.NONE,value:64516e-14,offset:0},acre:{name:"acre",base:O.SURFACE,prefixes:P.NONE,value:4046.86,offset:0},hectare:{name:"hectare",base:O.SURFACE,prefixes:P.NONE,value:1e4,offset:0},m3:{name:"m3",base:O.VOLUME,prefixes:P.CUBIC,value:1,offset:0},L:{name:"L",base:O.VOLUME,prefixes:P.SHORT,value:.001,offset:0},l:{name:"l",base:O.VOLUME,prefixes:P.SHORT,value:.001,offset:0},litre:{name:"litre",base:O.VOLUME,prefixes:P.LONG,value:.001,offset:0},cuin:{name:"cuin",base:O.VOLUME,prefixes:P.NONE,value:16387064e-12,offset:0},cuft:{name:"cuft",base:O.VOLUME,prefixes:P.NONE,value:.028316846592,offset:0},cuyd:{name:"cuyd",base:O.VOLUME,prefixes:P.NONE,value:.764554857984,offset:0},teaspoon:{name:"teaspoon",base:O.VOLUME,prefixes:P.NONE,value:5e-6,offset:0},tablespoon:{name:"tablespoon",base:O.VOLUME,prefixes:P.NONE,value:15e-6,offset:0},drop:{name:"drop",base:O.VOLUME,prefixes:P.NONE,value:5e-8,offset:0},gtt:{name:"gtt",base:O.VOLUME,prefixes:P.NONE,value:5e-8,offset:0},minim:{name:"minim",base:O.VOLUME,prefixes:P.NONE,value:61611519921875e-21,offset:0},fluiddram:{name:"fluiddram",base:O.VOLUME,prefixes:P.NONE,value:36966911953125e-19,offset:0},fluidounce:{name:"fluidounce",base:O.VOLUME,prefixes:P.NONE,value:295735295625e-16,offset:0},gill:{name:"gill",base:O.VOLUME,prefixes:P.NONE,value:.00011829411825,offset:0},cc:{name:"cc",base:O.VOLUME,prefixes:P.NONE,value:1e-6,offset:0},cup:{name:"cup",base:O.VOLUME,prefixes:P.NONE,value:.0002365882365,offset:0},pint:{name:"pint",base:O.VOLUME,prefixes:P.NONE,value:.000473176473,offset:0},quart:{name:"quart",base:O.VOLUME,prefixes:P.NONE,value:.000946352946,offset:0},gallon:{name:"gallon",base:O.VOLUME,prefixes:P.NONE,value:.003785411784,offset:0},beerbarrel:{name:"beerbarrel",base:O.VOLUME,prefixes:P.NONE,value:.117347765304,offset:0},oilbarrel:{name:"oilbarrel",base:O.VOLUME,prefixes:P.NONE,value:.158987294928,offset:0},hogshead:{name:"hogshead",base:O.VOLUME,prefixes:P.NONE,value:.238480942392,offset:0},g:{name:"g",base:O.MASS,prefixes:P.SHORT,value:.001,offset:0},gram:{name:"gram",base:O.MASS,prefixes:P.LONG,value:.001,offset:0},ton:{name:"ton",base:O.MASS,prefixes:P.SHORT,value:907.18474,offset:0},t:{name:"t",base:O.MASS,prefixes:P.SHORT,value:1e3,offset:0},tonne:{name:"tonne",base:O.MASS,prefixes:P.LONG,value:1e3,offset:0},grain:{name:"grain",base:O.MASS,prefixes:P.NONE,value:6479891e-11,offset:0},dram:{name:"dram",base:O.MASS,prefixes:P.NONE,value:.0017718451953125,offset:0},ounce:{name:"ounce",base:O.MASS,prefixes:P.NONE,value:.028349523125,offset:0},poundmass:{name:"poundmass",base:O.MASS,prefixes:P.NONE,value:.45359237,offset:0},hundredweight:{name:"hundredweight",base:O.MASS,prefixes:P.NONE,value:45.359237,offset:0},stick:{name:"stick",base:O.MASS,prefixes:P.NONE,value:.115,offset:0},stone:{name:"stone",base:O.MASS,prefixes:P.NONE,value:6.35029318,offset:0},gr:{name:"gr",base:O.MASS,prefixes:P.NONE,value:6479891e-11,offset:0},dr:{name:"dr",base:O.MASS,prefixes:P.NONE,value:.0017718451953125,offset:0},oz:{name:"oz",base:O.MASS,prefixes:P.NONE,value:.028349523125,offset:0},lbm:{name:"lbm",base:O.MASS,prefixes:P.NONE,value:.45359237,offset:0},cwt:{name:"cwt",base:O.MASS,prefixes:P.NONE,value:45.359237,offset:0},s:{name:"s",base:O.TIME,prefixes:P.SHORT,value:1,offset:0},min:{name:"min",base:O.TIME,prefixes:P.NONE,value:60,offset:0},h:{name:"h",base:O.TIME,prefixes:P.NONE,value:3600,offset:0},second:{name:"second",base:O.TIME,prefixes:P.LONG,value:1,offset:0},sec:{name:"sec",base:O.TIME,prefixes:P.LONG,value:1,offset:0},minute:{name:"minute",base:O.TIME,prefixes:P.NONE,value:60,offset:0},hour:{name:"hour",base:O.TIME,prefixes:P.NONE,value:3600,offset:0},day:{name:"day",base:O.TIME,prefixes:P.NONE,value:86400,offset:0},week:{name:"week",base:O.TIME,prefixes:P.NONE,value:7*86400,offset:0},month:{name:"month",base:O.TIME,prefixes:P.NONE,value:2629800,offset:0},year:{name:"year",base:O.TIME,prefixes:P.NONE,value:31557600,offset:0},decade:{name:"decade",base:O.TIME,prefixes:P.NONE,value:315576e3,offset:0},century:{name:"century",base:O.TIME,prefixes:P.NONE,value:315576e4,offset:0},millennium:{name:"millennium",base:O.TIME,prefixes:P.NONE,value:315576e5,offset:0},hertz:{name:"Hertz",base:O.FREQUENCY,prefixes:P.LONG,value:1,offset:0,reciprocal:!0},Hz:{name:"Hz",base:O.FREQUENCY,prefixes:P.SHORT,value:1,offset:0,reciprocal:!0},rad:{name:"rad",base:O.ANGLE,prefixes:P.SHORT,value:1,offset:0},radian:{name:"radian",base:O.ANGLE,prefixes:P.LONG,value:1,offset:0},deg:{name:"deg",base:O.ANGLE,prefixes:P.SHORT,value:null,offset:0},degree:{name:"degree",base:O.ANGLE,prefixes:P.LONG,value:null,offset:0},grad:{name:"grad",base:O.ANGLE,prefixes:P.SHORT,value:null,offset:0},gradian:{name:"gradian",base:O.ANGLE,prefixes:P.LONG,value:null,offset:0},cycle:{name:"cycle",base:O.ANGLE,prefixes:P.NONE,value:null,offset:0},arcsec:{name:"arcsec",base:O.ANGLE,prefixes:P.NONE,value:null,offset:0},arcmin:{name:"arcmin",base:O.ANGLE,prefixes:P.NONE,value:null,offset:0},A:{name:"A",base:O.CURRENT,prefixes:P.SHORT,value:1,offset:0},ampere:{name:"ampere",base:O.CURRENT,prefixes:P.LONG,value:1,offset:0},K:{name:"K",base:O.TEMPERATURE,prefixes:P.SHORT,value:1,offset:0},degC:{name:"degC",base:O.TEMPERATURE,prefixes:P.SHORT,value:1,offset:273.15},degF:{name:"degF",base:O.TEMPERATURE,prefixes:P.SHORT,value:new b(5,9),offset:459.67},degR:{name:"degR",base:O.TEMPERATURE,prefixes:P.SHORT,value:new b(5,9),offset:0},kelvin:{name:"kelvin",base:O.TEMPERATURE,prefixes:P.LONG,value:1,offset:0},celsius:{name:"celsius",base:O.TEMPERATURE,prefixes:P.LONG,value:1,offset:273.15},fahrenheit:{name:"fahrenheit",base:O.TEMPERATURE,prefixes:P.LONG,value:new b(5,9),offset:459.67},rankine:{name:"rankine",base:O.TEMPERATURE,prefixes:P.LONG,value:new b(5,9),offset:0},mol:{name:"mol",base:O.AMOUNT_OF_SUBSTANCE,prefixes:P.SHORT,value:1,offset:0},mole:{name:"mole",base:O.AMOUNT_OF_SUBSTANCE,prefixes:P.LONG,value:1,offset:0},cd:{name:"cd",base:O.LUMINOUS_INTENSITY,prefixes:P.SHORT,value:1,offset:0},candela:{name:"candela",base:O.LUMINOUS_INTENSITY,prefixes:P.LONG,value:1,offset:0},N:{name:"N",base:O.FORCE,prefixes:P.SHORT,value:1,offset:0},newton:{name:"newton",base:O.FORCE,prefixes:P.LONG,value:1,offset:0},dyn:{name:"dyn",base:O.FORCE,prefixes:P.SHORT,value:1e-5,offset:0},dyne:{name:"dyne",base:O.FORCE,prefixes:P.LONG,value:1e-5,offset:0},lbf:{name:"lbf",base:O.FORCE,prefixes:P.NONE,value:4.4482216152605,offset:0},poundforce:{name:"poundforce",base:O.FORCE,prefixes:P.NONE,value:4.4482216152605,offset:0},kip:{name:"kip",base:O.FORCE,prefixes:P.LONG,value:4448.2216,offset:0},kilogramforce:{name:"kilogramforce",base:O.FORCE,prefixes:P.NONE,value:9.80665,offset:0},J:{name:"J",base:O.ENERGY,prefixes:P.SHORT,value:1,offset:0},joule:{name:"joule",base:O.ENERGY,prefixes:P.LONG,value:1,offset:0},erg:{name:"erg",base:O.ENERGY,prefixes:P.SHORTLONG,value:1e-7,offset:0},Wh:{name:"Wh",base:O.ENERGY,prefixes:P.SHORT,value:3600,offset:0},BTU:{name:"BTU",base:O.ENERGY,prefixes:P.BTU,value:1055.05585262,offset:0},eV:{name:"eV",base:O.ENERGY,prefixes:P.SHORT,value:1602176565e-28,offset:0},electronvolt:{name:"electronvolt",base:O.ENERGY,prefixes:P.LONG,value:1602176565e-28,offset:0},W:{name:"W",base:O.POWER,prefixes:P.SHORT,value:1,offset:0},watt:{name:"watt",base:O.POWER,prefixes:P.LONG,value:1,offset:0},hp:{name:"hp",base:O.POWER,prefixes:P.NONE,value:745.6998715386,offset:0},VAR:{name:"VAR",base:O.POWER,prefixes:P.SHORT,value:h.I,offset:0},VA:{name:"VA",base:O.POWER,prefixes:P.SHORT,value:1,offset:0},Pa:{name:"Pa",base:O.PRESSURE,prefixes:P.SHORT,value:1,offset:0},psi:{name:"psi",base:O.PRESSURE,prefixes:P.NONE,value:6894.75729276459,offset:0},atm:{name:"atm",base:O.PRESSURE,prefixes:P.NONE,value:101325,offset:0},bar:{name:"bar",base:O.PRESSURE,prefixes:P.SHORTLONG,value:1e5,offset:0},torr:{name:"torr",base:O.PRESSURE,prefixes:P.NONE,value:133.322,offset:0},mmHg:{name:"mmHg",base:O.PRESSURE,prefixes:P.NONE,value:133.322,offset:0},mmH2O:{name:"mmH2O",base:O.PRESSURE,prefixes:P.NONE,value:9.80665,offset:0},cmH2O:{name:"cmH2O",base:O.PRESSURE,prefixes:P.NONE,value:98.0665,offset:0},coulomb:{name:"coulomb",base:O.ELECTRIC_CHARGE,prefixes:P.LONG,value:1,offset:0},C:{name:"C",base:O.ELECTRIC_CHARGE,prefixes:P.SHORT,value:1,offset:0},farad:{name:"farad",base:O.ELECTRIC_CAPACITANCE,prefixes:P.LONG,value:1,offset:0},F:{name:"F",base:O.ELECTRIC_CAPACITANCE,prefixes:P.SHORT,value:1,offset:0},volt:{name:"volt",base:O.ELECTRIC_POTENTIAL,prefixes:P.LONG,value:1,offset:0},V:{name:"V",base:O.ELECTRIC_POTENTIAL,prefixes:P.SHORT,value:1,offset:0},ohm:{name:"ohm",base:O.ELECTRIC_RESISTANCE,prefixes:P.SHORTLONG,value:1,offset:0},henry:{name:"henry",base:O.ELECTRIC_INDUCTANCE,prefixes:P.LONG,value:1,offset:0},H:{name:"H",base:O.ELECTRIC_INDUCTANCE,prefixes:P.SHORT,value:1,offset:0},siemens:{name:"siemens",base:O.ELECTRIC_CONDUCTANCE,prefixes:P.LONG,value:1,offset:0},S:{name:"S",base:O.ELECTRIC_CONDUCTANCE,prefixes:P.SHORT,value:1,offset:0},weber:{name:"weber",base:O.MAGNETIC_FLUX,prefixes:P.LONG,value:1,offset:0},Wb:{name:"Wb",base:O.MAGNETIC_FLUX,prefixes:P.SHORT,value:1,offset:0},tesla:{name:"tesla",base:O.MAGNETIC_FLUX_DENSITY,prefixes:P.LONG,value:1,offset:0},T:{name:"T",base:O.MAGNETIC_FLUX_DENSITY,prefixes:P.SHORT,value:1,offset:0},b:{name:"b",base:O.BIT,prefixes:P.BINARY_SHORT,value:1,offset:0},bits:{name:"bits",base:O.BIT,prefixes:P.BINARY_LONG,value:1,offset:0},B:{name:"B",base:O.BIT,prefixes:P.BINARY_SHORT,value:8,offset:0},bytes:{name:"bytes",base:O.BIT,prefixes:P.BINARY_LONG,value:8,offset:0}},le={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 ne(q){if(q.number==="BigNumber"){var H=Td(y);V.rad.value=new y(1),V.deg.value=H.div(180),V.grad.value=H.div(200),V.cycle.value=H.times(2),V.arcsec.value=H.div(648e3),V.arcmin.value=H.div(10800)}else V.rad.value=1,V.deg.value=Math.PI/180,V.grad.value=Math.PI/200,V.cycle.value=Math.PI*2,V.arcsec.value=Math.PI/648e3,V.arcmin.value=Math.PI/10800;V.radian.value=V.rad.value,V.degree.value=V.deg.value,V.gradian.value=V.grad.value}ne(r),t&&t("config",function(q,H){q.number!==H.number&&ne(q)});var ee={si:{NONE:{unit:U,prefix:P.NONE[""]},LENGTH:{unit:V.m,prefix:P.SHORT[""]},MASS:{unit:V.g,prefix:P.SHORT.k},TIME:{unit:V.s,prefix:P.SHORT[""]},CURRENT:{unit:V.A,prefix:P.SHORT[""]},TEMPERATURE:{unit:V.K,prefix:P.SHORT[""]},LUMINOUS_INTENSITY:{unit:V.cd,prefix:P.SHORT[""]},AMOUNT_OF_SUBSTANCE:{unit:V.mol,prefix:P.SHORT[""]},ANGLE:{unit:V.rad,prefix:P.SHORT[""]},BIT:{unit:V.bits,prefix:P.SHORT[""]},FORCE:{unit:V.N,prefix:P.SHORT[""]},ENERGY:{unit:V.J,prefix:P.SHORT[""]},POWER:{unit:V.W,prefix:P.SHORT[""]},PRESSURE:{unit:V.Pa,prefix:P.SHORT[""]},ELECTRIC_CHARGE:{unit:V.C,prefix:P.SHORT[""]},ELECTRIC_CAPACITANCE:{unit:V.F,prefix:P.SHORT[""]},ELECTRIC_POTENTIAL:{unit:V.V,prefix:P.SHORT[""]},ELECTRIC_RESISTANCE:{unit:V.ohm,prefix:P.SHORT[""]},ELECTRIC_INDUCTANCE:{unit:V.H,prefix:P.SHORT[""]},ELECTRIC_CONDUCTANCE:{unit:V.S,prefix:P.SHORT[""]},MAGNETIC_FLUX:{unit:V.Wb,prefix:P.SHORT[""]},MAGNETIC_FLUX_DENSITY:{unit:V.T,prefix:P.SHORT[""]},FREQUENCY:{unit:V.Hz,prefix:P.SHORT[""]}}};ee.cgs=JSON.parse(JSON.stringify(ee.si)),ee.cgs.LENGTH={unit:V.m,prefix:P.SHORT.c},ee.cgs.MASS={unit:V.g,prefix:P.SHORT[""]},ee.cgs.FORCE={unit:V.dyn,prefix:P.SHORT[""]},ee.cgs.ENERGY={unit:V.erg,prefix:P.NONE[""]},ee.us=JSON.parse(JSON.stringify(ee.si)),ee.us.LENGTH={unit:V.ft,prefix:P.NONE[""]},ee.us.MASS={unit:V.lbm,prefix:P.NONE[""]},ee.us.TEMPERATURE={unit:V.degF,prefix:P.NONE[""]},ee.us.FORCE={unit:V.lbf,prefix:P.NONE[""]},ee.us.ENERGY={unit:V.BTU,prefix:P.BTU[""]},ee.us.POWER={unit:V.hp,prefix:P.NONE[""]},ee.us.PRESSURE={unit:V.psi,prefix:P.NONE[""]},ee.auto=JSON.parse(JSON.stringify(ee.si));var L=ee.auto;g.setUnitSystem=function(q){if(Oe(ee,q))L=ee[q];else throw new Error("Unit system "+q+" does not exist. Choices are: "+Object.keys(ee).join(", "))},g.getUnitSystem=function(){for(var q in ee)if(Oe(ee,q)&&ee[q]===L)return q},g.typeConverters={BigNumber:function(H){return H!=null&&H.isFraction?new y(String(H.n)).div(String(H.d)).times(String(H.s)):new y(H+"")},Fraction:function(H){return new b(H)},Complex:function(H){return H},number:function(H){return H!=null&&H.isFraction?p(H):H}},g.prototype._numberConverter=function(){var q=g.typeConverters[this.valueType()];if(q)return q;throw new TypeError('Unsupported Unit value type "'+this.valueType()+'"')},g._getNumberConverter=function(q){if(!g.typeConverters[q])throw new TypeError('Unsupported type "'+q+'"');return g.typeConverters[q]};for(var R in V)if(Oe(V,R)){var J=V[R];J.dimensions=J.base.dimensions}for(var re in le)if(Oe(le,re)){var te=V[le[re]],ue={};for(var oe in te)Oe(te,oe)&&(ue[oe]=te[oe]);ue.name=re,V[re]=ue}g.isValidAlpha=function(H){return/^[a-zA-Z]$/.test(H)};function De(q){for(var H=0;H<q.length;H++){if(v=q.charAt(H),H===0&&!g.isValidAlpha(v))throw new Error('Invalid unit name (must begin with alpha character): "'+q+'"');if(H>0&&!(g.isValidAlpha(v)||N(v)))throw new Error('Invalid unit name (only alphanumeric characters are allowed): "'+q+'"')}}return g.createUnit=function(q,H){if(typeof q!="object")throw new TypeError("createUnit expects first parameter to be of type 'Object'");if(H&&H.override){for(var Z in q)if(Oe(q,Z)&&g.deleteUnit(Z),q[Z].aliases)for(var ae=0;ae<q[Z].aliases.length;ae++)g.deleteUnit(q[Z].aliases[ae])}var he;for(var ye in q)Oe(q,ye)&&(he=g.createUnitSingle(ye,q[ye]));return he},g.createUnitSingle=function(q,H){if((typeof H>"u"||H===null)&&(H={}),typeof q!="string")throw new TypeError("createUnitSingle expects first parameter to be of type 'string'");if(Oe(V,q))throw new Error('Cannot create unit "'+q+'": a unit with that name already exists');De(q);var Z=null,ae=[],he=0,ye,Te,I;if(H&&H.type==="Unit")Z=H.clone();else if(typeof H=="string")H!==""&&(ye=H);else if(typeof H=="object")ye=H.definition,Te=H.prefixes,he=H.offset,I=H.baseName,H.aliases&&(ae=H.aliases.valueOf());else throw new TypeError('Cannot create unit "'+q+'" from "'+H.toString()+'": expecting "string" or "Unit" or "Object"');if(ae){for(var Y=0;Y<ae.length;Y++)if(Oe(V,ae[Y]))throw new Error('Cannot create alias "'+ae[Y]+'": a unit with that name already exists')}if(ye&&typeof ye=="string"&&!Z)try{Z=g.parse(ye,{allowNoUnits:!0})}catch(ie){throw ie.message='Could not create unit "'+q+'" from "'+ye+'": '+ie.message,ie}else ye&&ye.type==="Unit"&&(Z=ye.clone());ae=ae||[],he=he||0,Te&&Te.toUpperCase?Te=P[Te.toUpperCase()]||P.NONE:Te=P.NONE;var X={};if(Z){X={name:q,value:Z.value,dimensions:Z.dimensions.slice(0),prefixes:Te,offset:he};var Ee=!1;for(var be in O)if(Oe(O,be)){for(var Se=!0,xe=0;xe<j.length;xe++)if(Math.abs((X.dimensions[xe]||0)-(O[be].dimensions[xe]||0))>1e-12){Se=!1;break}if(Se){Ee=!0,X.base=O[be];break}}if(!Ee){I=I||q+"_STUFF";var dt={dimensions:Z.dimensions.slice(0)};dt.key=I,O[I]=dt,L[I]={unit:X,prefix:P.NONE[""]},X.base=O[I]}}else{if(I=I||q+"_STUFF",j.indexOf(I)>=0)throw new Error('Cannot create new base unit "'+q+'": a base unit with that name already exists (and cannot be overridden)');j.push(I);for(var se in O)Oe(O,se)&&(O[se].dimensions[j.length-1]=0);for(var ce={dimensions:[]},fe=0;fe<j.length;fe++)ce.dimensions[fe]=0;ce.dimensions[j.length-1]=1,ce.key=I,O[I]=ce,X={name:q,value:1,dimensions:O[I].dimensions.slice(0),prefixes:Te,offset:he,base:O[I]},L[I]={unit:X,prefix:P.NONE[""]}}g.UNITS[q]=X;for(var qe=0;qe<ae.length;qe++){var Bt=ae[qe],M={};for(var W in X)Oe(X,W)&&(M[W]=X[W]);M.name=Bt,g.UNITS[Bt]=M}return delete _.cache,new g(null,q)},g.deleteUnit=function(q){delete g.UNITS[q],delete _.cache},g.PREFIXES=P,g.BASE_DIMENSIONS=j,g.BASE_UNITS=O,g.UNIT_SYSTEMS=ee,g.UNITS=V,g},{isClass:!0}),b1="unit",PL=["typed","Unit"],kL=B(b1,PL,e=>{var{typed:t,Unit:r}=e;return t(b1,{Unit:function(a){return a.clone()},string:function(a){return r.isValuelessUnit(a)?new r(null,a):r.parse(a,{allowNoUnits:!0})},"number | BigNumber | Fraction | Complex, string | Unit":function(a,i){return new r(a,i)},"number | BigNumber | Fraction":function(a){return new r(a)},"Array | Matrix":t.referToSelf(n=>a=>Xe(a,n))})}),w1="sparse",OL=["typed","SparseMatrix"],$L=B(w1,OL,e=>{var{typed:t,SparseMatrix:r}=e;return t(w1,{"":function(){return new r([])},string:function(a){return new r([],a)},"Array | Matrix":function(a){return new r(a)},"Array | Matrix, string":function(a,i){return new r(a,i)}})}),x1="createUnit",_L=["typed","Unit"],BL=B(x1,_L,e=>{var{typed:t,Unit:r}=e;return t(x1,{"Object, Object":function(a,i){return r.createUnit(a,i)},Object:function(a){return r.createUnit(a,{})},"string, Unit | string | Object, Object":function(a,i,o){var s={};return s[a]=i,r.createUnit(s,o)},"string, Unit | string | Object":function(a,i){var o={};return o[a]=i,r.createUnit(o,{})},string:function(a){var i={};return i[a]={},r.createUnit(i,{})}})}),D1="acos",IL=["typed","config","Complex"],zL=B(D1,IL,e=>{var{typed:t,config:r,Complex:n}=e;return t(D1,{number:function(i){return i>=-1&&i<=1||r.predictable?Math.acos(i):new n(i,0).acos()},Complex:function(i){return i.acos()},BigNumber:function(i){return i.acos()}})}),N1="acosh",jL=["typed","config","Complex"],qL=B(N1,jL,e=>{var{typed:t,config:r,Complex:n}=e;return t(N1,{number:function(i){return i>=1||r.predictable?Ux(i):i<=-1?new n(Math.log(Math.sqrt(i*i-1)-i),Math.PI):new n(i,0).acosh()},Complex:function(i){return i.acosh()},BigNumber:function(i){return i.acosh()}})}),A1="acot",RL=["typed","BigNumber"],LL=B(A1,RL,e=>{var{typed:t,BigNumber:r}=e;return t(A1,{number:Wx,Complex:function(a){return a.acot()},BigNumber:function(a){return new r(1).div(a).atan()}})}),C1="acoth",HL=["typed","config","Complex","BigNumber"],GL=B(C1,HL,e=>{var{typed:t,config:r,Complex:n,BigNumber:a}=e;return t(C1,{number:function(o){return o>=1||o<=-1||r.predictable?Jx(o):new n(o,0).acoth()},Complex:function(o){return o.acoth()},BigNumber:function(o){return new a(1).div(o).atanh()}})}),E1="acsc",VL=["typed","config","Complex","BigNumber"],UL=B(E1,VL,e=>{var{typed:t,config:r,Complex:n,BigNumber:a}=e;return t(E1,{number:function(o){return o<=-1||o>=1||r.predictable?Kx(o):new n(o,0).acsc()},Complex:function(o){return o.acsc()},BigNumber:function(o){return new a(1).div(o).asin()}})}),S1="acsch",WL=["typed","BigNumber"],JL=B(S1,WL,e=>{var{typed:t,BigNumber:r}=e;return t(S1,{number:Yx,Complex:function(a){return a.acsch()},BigNumber:function(a){return new r(1).div(a).asinh()}})}),M1="asec",KL=["typed","config","Complex","BigNumber"],YL=B(M1,KL,e=>{var{typed:t,config:r,Complex:n,BigNumber:a}=e;return t(M1,{number:function(o){return o<=-1||o>=1||r.predictable?Zx(o):new n(o,0).asec()},Complex:function(o){return o.asec()},BigNumber:function(o){return new a(1).div(o).acos()}})}),T1="asech",ZL=["typed","config","Complex","BigNumber"],QL=B(T1,ZL,e=>{var{typed:t,config:r,Complex:n,BigNumber:a}=e;return t(T1,{number:function(o){if(o<=1&&o>=-1||r.predictable){var s=1/o;if(s>0||r.predictable)return Qx(o);var u=Math.sqrt(s*s-1);return new n(Math.log(u-s),Math.PI)}return new n(o,0).asech()},Complex:function(o){return o.asech()},BigNumber:function(o){return new a(1).div(o).acosh()}})}),F1="asin",XL=["typed","config","Complex"],eH=B(F1,XL,e=>{var{typed:t,config:r,Complex:n}=e;return t(F1,{number:function(i){return i>=-1&&i<=1||r.predictable?Math.asin(i):new n(i,0).asin()},Complex:function(i){return i.asin()},BigNumber:function(i){return i.asin()}})}),tH="asinh",rH=["typed"],nH=B(tH,rH,e=>{var{typed:t}=e;return t("asinh",{number:Xx,Complex:function(n){return n.asinh()},BigNumber:function(n){return n.asinh()}})}),aH="atan",iH=["typed"],oH=B(aH,iH,e=>{var{typed:t}=e;return t("atan",{number:function(n){return Math.atan(n)},Complex:function(n){return n.atan()},BigNumber:function(n){return n.atan()}})}),P1="atan2",sH=["typed","matrix","equalScalar","BigNumber","DenseMatrix","concat"],uH=B(P1,sH,e=>{var{typed:t,matrix:r,equalScalar:n,BigNumber:a,DenseMatrix:i,concat:o}=e,s=Yn({typed:t,equalScalar:n}),u=Ur({typed:t}),l=d2({typed:t,equalScalar:n}),c=Cr({typed:t,equalScalar:n}),f=or({typed:t,DenseMatrix:i}),m=Ot({typed:t,matrix:r,concat:o});return t(P1,{"number, number":Math.atan2,"BigNumber, BigNumber":(d,p)=>a.atan2(d,p)},m({scalar:"number | BigNumber",SS:l,DS:u,SD:s,Ss:c,sS:f}))}),k1="atanh",lH=["typed","config","Complex"],cH=B(k1,lH,e=>{var{typed:t,config:r,Complex:n}=e;return t(k1,{number:function(i){return i<=1&&i>=-1||r.predictable?e2(i):new n(i,0).atanh()},Complex:function(i){return i.atanh()},BigNumber:function(i){return i.atanh()}})}),ts=B("trigUnit",["typed"],e=>{var{typed:t}=e;return{Unit:t.referToSelf(r=>n=>{if(!n.hasBase(n.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function cot is no angle");return t.find(r,n.valueType())(n.value)})}}),O1="cos",fH=["typed"],mH=B(O1,fH,e=>{var{typed:t}=e,r=ts({typed:t});return t(O1,{number:Math.cos,"Complex | BigNumber":n=>n.cos()},r)}),$1="cosh",dH=["typed"],hH=B($1,dH,e=>{var{typed:t}=e;return t($1,{number:c9,"Complex | BigNumber":r=>r.cosh()})}),_1="cot",pH=["typed","BigNumber"],gH=B(_1,pH,e=>{var{typed:t,BigNumber:r}=e,n=ts({typed:t});return t(_1,{number:t2,Complex:a=>a.cot(),BigNumber:a=>new r(1).div(a.tan())},n)}),B1="coth",vH=["typed","BigNumber"],yH=B(B1,vH,e=>{var{typed:t,BigNumber:r}=e;return t(B1,{number:r2,Complex:n=>n.coth(),BigNumber:n=>new r(1).div(n.tanh())})}),I1="csc",bH=["typed","BigNumber"],wH=B(I1,bH,e=>{var{typed:t,BigNumber:r}=e,n=ts({typed:t});return t(I1,{number:n2,Complex:a=>a.csc(),BigNumber:a=>new r(1).div(a.sin())},n)}),z1="csch",xH=["typed","BigNumber"],DH=B(z1,xH,e=>{var{typed:t,BigNumber:r}=e;return t(z1,{number:a2,Complex:n=>n.csch(),BigNumber:n=>new r(1).div(n.sinh())})}),j1="sec",NH=["typed","BigNumber"],AH=B(j1,NH,e=>{var{typed:t,BigNumber:r}=e,n=ts({typed:t});return t(j1,{number:i2,Complex:a=>a.sec(),BigNumber:a=>new r(1).div(a.cos())},n)}),q1="sech",CH=["typed","BigNumber"],EH=B(q1,CH,e=>{var{typed:t,BigNumber:r}=e;return t(q1,{number:o2,Complex:n=>n.sech(),BigNumber:n=>new r(1).div(n.cosh())})}),R1="sin",SH=["typed"],MH=B(R1,SH,e=>{var{typed:t}=e,r=ts({typed:t});return t(R1,{number:Math.sin,"Complex | BigNumber":n=>n.sin()},r)}),L1="sinh",TH=["typed"],FH=B(L1,TH,e=>{var{typed:t}=e;return t(L1,{number:s2,"Complex | BigNumber":r=>r.sinh()})}),H1="tan",PH=["typed"],kH=B(H1,PH,e=>{var{typed:t}=e,r=ts({typed:t});return t(H1,{number:Math.tan,"Complex | BigNumber":n=>n.tan()},r)}),OH="tanh",$H=["typed"],_H=B(OH,$H,e=>{var{typed:t}=e;return t("tanh",{number:m9,"Complex | BigNumber":r=>r.tanh()})}),G1="setCartesian",BH=["typed","size","subset","compareNatural","Index","DenseMatrix"],IH=B(G1,BH,e=>{var{typed:t,size:r,subset:n,compareNatural:a,Index:i,DenseMatrix:o}=e;return t(G1,{"Array | Matrix, Array | Matrix":function(u,l){var c=[];if(n(r(u),new i(0))!==0&&n(r(l),new i(0))!==0){var f=mt(Array.isArray(u)?u:u.toArray()).sort(a),m=mt(Array.isArray(l)?l:l.toArray()).sort(a);c=[];for(var d=0;d<f.length;d++)for(var p=0;p<m.length;p++)c.push([f[d],m[p]])}return Array.isArray(u)&&Array.isArray(l)?c:new o(c)}})}),V1="setDifference",zH=["typed","size","subset","compareNatural","Index","DenseMatrix"],jH=B(V1,zH,e=>{var{typed:t,size:r,subset:n,compareNatural:a,Index:i,DenseMatrix:o}=e;return t(V1,{"Array | Matrix, Array | Matrix":function(u,l){var c;if(n(r(u),new i(0))===0)c=[];else{if(n(r(l),new i(0))===0)return mt(u.toArray());var f=Ho(mt(Array.isArray(u)?u:u.toArray()).sort(a)),m=Ho(mt(Array.isArray(l)?l:l.toArray()).sort(a));c=[];for(var d,p=0;p<f.length;p++){d=!1;for(var h=0;h<m.length;h++)if(a(f[p].value,m[h].value)===0&&f[p].identifier===m[h].identifier){d=!0;break}d||c.push(f[p])}}return Array.isArray(u)&&Array.isArray(l)?Hl(c):new o(Hl(c))}})}),U1="setDistinct",qH=["typed","size","subset","compareNatural","Index","DenseMatrix"],RH=B(U1,qH,e=>{var{typed:t,size:r,subset:n,compareNatural:a,Index:i,DenseMatrix:o}=e;return t(U1,{"Array | Matrix":function(u){var l;if(n(r(u),new i(0))===0)l=[];else{var c=mt(Array.isArray(u)?u:u.toArray()).sort(a);l=[],l.push(c[0]);for(var f=1;f<c.length;f++)a(c[f],c[f-1])!==0&&l.push(c[f])}return Array.isArray(u)?l:new o(l)}})}),W1="setIntersect",LH=["typed","size","subset","compareNatural","Index","DenseMatrix"],HH=B(W1,LH,e=>{var{typed:t,size:r,subset:n,compareNatural:a,Index:i,DenseMatrix:o}=e;return t(W1,{"Array | Matrix, Array | Matrix":function(u,l){var c;if(n(r(u),new i(0))===0||n(r(l),new i(0))===0)c=[];else{var f=Ho(mt(Array.isArray(u)?u:u.toArray()).sort(a)),m=Ho(mt(Array.isArray(l)?l:l.toArray()).sort(a));c=[];for(var d=0;d<f.length;d++)for(var p=0;p<m.length;p++)if(a(f[d].value,m[p].value)===0&&f[d].identifier===m[p].identifier){c.push(f[d]);break}}return Array.isArray(u)&&Array.isArray(l)?Hl(c):new o(Hl(c))}})}),J1="setIsSubset",GH=["typed","size","subset","compareNatural","Index"],VH=B(J1,GH,e=>{var{typed:t,size:r,subset:n,compareNatural:a,Index:i}=e;return t(J1,{"Array | Matrix, Array | Matrix":function(s,u){if(n(r(s),new i(0))===0)return!0;if(n(r(u),new i(0))===0)return!1;for(var l=Ho(mt(Array.isArray(s)?s:s.toArray()).sort(a)),c=Ho(mt(Array.isArray(u)?u:u.toArray()).sort(a)),f,m=0;m<l.length;m++){f=!1;for(var d=0;d<c.length;d++)if(a(l[m].value,c[d].value)===0&&l[m].identifier===c[d].identifier){f=!0;break}if(f===!1)return!1}return!0}})}),K1="setMultiplicity",UH=["typed","size","subset","compareNatural","Index"],WH=B(K1,UH,e=>{var{typed:t,size:r,subset:n,compareNatural:a,Index:i}=e;return t(K1,{"number | BigNumber | Fraction | Complex, Array | Matrix":function(s,u){if(n(r(u),new i(0))===0)return 0;for(var l=mt(Array.isArray(u)?u:u.toArray()),c=0,f=0;f<l.length;f++)a(l[f],s)===0&&c++;return c}})}),Y1="setPowerset",JH=["typed","size","subset","compareNatural","Index"],KH=B(Y1,JH,e=>{var{typed:t,size:r,subset:n,compareNatural:a,Index:i}=e;return t(Y1,{"Array | Matrix":function(l){if(n(r(l),new i(0))===0)return[];for(var c=mt(Array.isArray(l)?l:l.toArray()).sort(a),f=[],m=0;m.toString(2).length<=c.length;)f.push(o(c,m.toString(2).split("").reverse())),m++;return s(f)}});function o(u,l){for(var c=[],f=0;f<l.length;f++)l[f]==="1"&&c.push(u[f]);return c}function s(u){for(var l=[],c=u.length-1;c>0;c--)for(var f=0;f<c;f++)u[f].length>u[f+1].length&&(l=u[f],u[f]=u[f+1],u[f+1]=l);return u}}),Z1="setSize",YH=["typed","compareNatural"],ZH=B(Z1,YH,e=>{var{typed:t,compareNatural:r}=e;return t(Z1,{"Array | Matrix":function(a){return Array.isArray(a)?mt(a).length:mt(a.toArray()).length},"Array | Matrix, boolean":function(a,i){if(i===!1||a.length===0)return Array.isArray(a)?mt(a).length:mt(a.toArray()).length;for(var o=mt(Array.isArray(a)?a:a.toArray()).sort(r),s=1,u=1;u<o.length;u++)r(o[u],o[u-1])!==0&&s++;return s}})}),Q1="setSymDifference",QH=["typed","size","concat","subset","setDifference","Index"],XH=B(Q1,QH,e=>{var{typed:t,size:r,concat:n,subset:a,setDifference:i,Index:o}=e;return t(Q1,{"Array | Matrix, Array | Matrix":function(u,l){if(a(r(u),new o(0))===0)return mt(l);if(a(r(l),new o(0))===0)return mt(u);var c=mt(u),f=mt(l);return n(i(c,f),i(f,c))}})}),X1="setUnion",eG=["typed","size","concat","subset","setIntersect","setSymDifference","Index"],tG=B(X1,eG,e=>{var{typed:t,size:r,concat:n,subset:a,setIntersect:i,setSymDifference:o,Index:s}=e;return t(X1,{"Array | Matrix, Array | Matrix":function(l,c){if(a(r(l),new s(0))===0)return mt(c);if(a(r(c),new s(0))===0)return mt(l);var f=mt(l),m=mt(c);return n(o(f,m),i(f,m))}})}),ey="add",rG=["typed","matrix","addScalar","equalScalar","DenseMatrix","SparseMatrix","concat"],nG=B(ey,rG,e=>{var{typed:t,matrix:r,addScalar:n,equalScalar:a,DenseMatrix:i,SparseMatrix:o,concat:s}=e,u=hi({typed:t}),l=Nd({typed:t,equalScalar:a}),c=Qi({typed:t,DenseMatrix:i}),f=Ot({typed:t,matrix:r,concat:s});return t(ey,{"any, any":n,"any, any, ...any":t.referToSelf(m=>(d,p,h)=>{for(var y=m(d,p),b=0;b<h.length;b++)y=m(y,h[b]);return y})},f({elop:n,DS:u,SS:l,Ss:c}))}),ty="hypot",aG=["typed","abs","addScalar","divideScalar","multiplyScalar","sqrt","smaller","isPositive"],iG=B(ty,aG,e=>{var{typed:t,abs:r,addScalar:n,divideScalar:a,multiplyScalar:i,sqrt:o,smaller:s,isPositive:u}=e;return t(ty,{"... number | BigNumber":l,Array:l,Matrix:c=>l(mt(c.toArray(),!0))});function l(c){for(var f=0,m=0,d=0;d<c.length;d++){if(Pa(c[d]))throw new TypeError("Unexpected type of argument to hypot");var p=r(c[d]);s(m,p)?(f=i(f,i(a(m,p),a(m,p))),f=n(f,1),m=p):f=n(f,u(p)?i(a(p,m),a(p,m)):p)}return i(m,o(f))}}),ry="norm",oG=["typed","abs","add","pow","conj","sqrt","multiply","equalScalar","larger","smaller","matrix","ctranspose","eigs"],sG=B(ry,oG,e=>{var{typed:t,abs:r,add:n,pow:a,conj:i,sqrt:o,multiply:s,equalScalar:u,larger:l,smaller:c,matrix:f,ctranspose:m,eigs:d}=e;return t(ry,{number:Math.abs,Complex:function(C){return C.abs()},BigNumber:function(C){return C.abs()},boolean:function(C){return Math.abs(C)},Array:function(C){return v(f(C),2)},Matrix:function(C){return v(C,2)},"Array, number | BigNumber | string":function(C,N){return v(f(C),N)},"Matrix, number | BigNumber | string":function(C,N){return v(C,N)}});function p(A){var C=0;return A.forEach(function(N){var E=r(N);l(E,C)&&(C=E)},!0),C}function h(A){var C;return A.forEach(function(N){var E=r(N);(!C||c(E,C))&&(C=E)},!0),C||0}function y(A,C){if(C===Number.POSITIVE_INFINITY||C==="inf")return p(A);if(C===Number.NEGATIVE_INFINITY||C==="-inf")return h(A);if(C==="fro")return v(A,2);if(typeof C=="number"&&!isNaN(C)){if(!u(C,0)){var N=0;return A.forEach(function(E){N=n(a(r(E),C),N)},!0),a(N,1/C)}return Number.POSITIVE_INFINITY}throw new Error("Unsupported parameter value")}function b(A){var C=0;return A.forEach(function(N,E){C=n(C,s(N,i(N)))}),r(o(C))}function D(A){var C=[],N=0;return A.forEach(function(E,S){var F=S[1],k=n(C[F]||0,r(E));l(k,N)&&(N=k),C[F]=k},!0),N}function g(A){var C=A.size();if(C[0]!==C[1])throw new RangeError("Invalid matrix dimensions");var N=m(A),E=s(N,A),S=d(E).values.toArray(),F=S[S.length-1];return r(o(F))}function x(A){var C=[],N=0;return A.forEach(function(E,S){var F=S[0],k=n(C[F]||0,r(E));l(k,N)&&(N=k),C[F]=k},!0),N}function w(A,C){if(C===1)return D(A);if(C===Number.POSITIVE_INFINITY||C==="inf")return x(A);if(C==="fro")return b(A);if(C===2)return g(A);throw new Error("Unsupported parameter value "+C)}function v(A,C){var N=A.size();if(N.length===1)return y(A,C);if(N.length===2){if(N[0]&&N[1])return w(A,C);throw new RangeError("Invalid matrix dimensions")}}}),ny="dot",uG=["typed","addScalar","multiplyScalar","conj","size"],lG=B(ny,uG,e=>{var{typed:t,addScalar:r,multiplyScalar:n,conj:a,size:i}=e;return t(ny,{"Array | DenseMatrix, Array | DenseMatrix":s,"SparseMatrix, SparseMatrix":u});function o(c,f){var m=l(c),d=l(f),p,h;if(m.length===1)p=m[0];else if(m.length===2&&m[1]===1)p=m[0];else throw new RangeError("Expected a column vector, instead got a matrix of size ("+m.join(", ")+")");if(d.length===1)h=d[0];else if(d.length===2&&d[1]===1)h=d[0];else throw new RangeError("Expected a column vector, instead got a matrix of size ("+d.join(", ")+")");if(p!==h)throw new RangeError("Vectors must have equal length ("+p+" != "+h+")");if(p===0)throw new RangeError("Cannot calculate the dot product of empty vectors");return p}function s(c,f){var m=o(c,f),d=je(c)?c._data:c,p=je(c)?c._datatype||c.getDataType():void 0,h=je(f)?f._data:f,y=je(f)?f._datatype||f.getDataType():void 0,b=l(c).length===2,D=l(f).length===2,g=r,x=n;if(p&&y&&p===y&&typeof p=="string"&&p!=="mixed"){var w=p;g=t.find(r,[w,w]),x=t.find(n,[w,w])}if(!b&&!D){for(var v=x(a(d[0]),h[0]),A=1;A<m;A++)v=g(v,x(a(d[A]),h[A]));return v}if(!b&&D){for(var C=x(a(d[0]),h[0][0]),N=1;N<m;N++)C=g(C,x(a(d[N]),h[N][0]));return C}if(b&&!D){for(var E=x(a(d[0][0]),h[0]),S=1;S<m;S++)E=g(E,x(a(d[S][0]),h[S]));return E}if(b&&D){for(var F=x(a(d[0][0]),h[0][0]),k=1;k<m;k++)F=g(F,x(a(d[k][0]),h[k][0]));return F}}function u(c,f){o(c,f);for(var m=c._index,d=c._values,p=f._index,h=f._values,y=0,b=r,D=n,g=0,x=0;g<m.length&&x<p.length;){var w=m[g],v=p[x];if(w<v){g++;continue}if(w>v){x++;continue}w===v&&(y=b(y,D(d[g],h[x])),g++,x++)}return y}function l(c){return je(c)?c.size():i(c)}}),cG="trace",fG=["typed","matrix","add"],mG=B(cG,fG,e=>{var{typed:t,matrix:r,add:n}=e;return t("trace",{Array:function(s){return a(r(s))},SparseMatrix:i,DenseMatrix:a,any:Ue});function a(o){var s=o._size,u=o._data;switch(s.length){case 1:if(s[0]===1)return Ue(u[0]);throw new RangeError("Matrix must be square (size: "+at(s)+")");case 2:{var l=s[0],c=s[1];if(l===c){for(var f=0,m=0;m<l;m++)f=n(f,u[m][m]);return f}else throw new RangeError("Matrix must be square (size: "+at(s)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+at(s)+")")}}function i(o){var s=o._values,u=o._index,l=o._ptr,c=o._size,f=c[0],m=c[1];if(f===m){var d=0;if(s.length>0)for(var p=0;p<m;p++)for(var h=l[p],y=l[p+1],b=h;b<y;b++){var D=u[b];if(D===p){d=n(d,s[b]);break}if(D>p)break}return d}throw new RangeError("Matrix must be square (size: "+at(c)+")")}}),ay="index",dG=["typed","Index"],hG=B(ay,dG,e=>{var{typed:t,Index:r}=e;return t(ay,{"...number | string | BigNumber | Range | Array | Matrix":function(a){var i=a.map(function(s){return Qe(s)?s.toNumber():Et(s)||je(s)?s.map(function(u){return Qe(u)?u.toNumber():u}):s}),o=new r;return r.apply(o,i),o}})}),O2=new Set(["end"]),pG="Node",gG=["mathWithTransform"],vG=B(pG,gG,e=>{var{mathWithTransform:t}=e;function r(a){for(var i of[...O2])if(a.has(i))throw new Error('Scope contains an illegal symbol, "'+i+'" is a reserved keyword')}class n{get type(){return"Node"}get isNode(){return!0}evaluate(i){return this.compile().evaluate(i)}compile(){var i=this._compile(t,{}),o={},s=null;function u(l){var c=$o(l);return r(c),i(c,o,s)}return{evaluate:u}}_compile(i,o){throw new Error("Method _compile must be implemented by type "+this.type)}forEach(i){throw new Error("Cannot run forEach on a Node interface")}map(i){throw new Error("Cannot run map on a Node interface")}_ifNode(i){if(!Nt(i))throw new TypeError("Callback function must return a Node");return i}traverse(i){i(this,null,null);function o(s,u){s.forEach(function(l,c,f){u(l,c,f),o(l,u)})}o(this,i)}transform(i){function o(s,u,l){var c=i(s,u,l);return c!==s?c:s.map(o)}return o(this,null,null)}filter(i){var o=[];return this.traverse(function(s,u,l){i(s,u,l)&&o.push(s)}),o}clone(){throw new Error("Cannot clone a Node interface")}cloneDeep(){return this.map(function(i){return i.cloneDeep()})}equals(i){return i?this.type===i.type&&Ba(this,i):!1}toString(i){var o=this._getCustomString(i);return typeof o<"u"?o:this._toString(i)}_toString(){throw new Error("_toString not implemented for "+this.type)}toJSON(){throw new Error("Cannot serialize object: toJSON not implemented by "+this.type)}toHTML(i){var o=this._getCustomString(i);return typeof o<"u"?o:this._toHTML(i)}_toHTML(){throw new Error("_toHTML not implemented for "+this.type)}toTex(i){var o=this._getCustomString(i);return typeof o<"u"?o:this._toTex(i)}_toTex(i){throw new Error("_toTex not implemented for "+this.type)}_getCustomString(i){if(i&&typeof i=="object")switch(typeof i.handler){case"object":case"undefined":return;case"function":return i.handler(this,i);default:throw new TypeError("Object or function expected as callback")}}getIdentifier(){return this.type}getContent(){return this}}return n},{isClass:!0,isNode:!0});function Wr(e){return e&&e.isIndexError?new Wn(e.index+1,e.min+1,e.max!==void 0?e.max+1:void 0):e}function $2(e){var{subset:t}=e;return function(n,a){try{if(Array.isArray(n))return t(n,a);if(n&&typeof n.subset=="function")return n.subset(a);if(typeof n=="string")return t(n,a);if(typeof n=="object"){if(!a.isObjectProperty())throw new TypeError("Cannot apply a numeric index as object property");return Lr(n,a.getObjectProperty())}else throw new TypeError("Cannot apply index: unsupported type of object")}catch(i){throw Wr(i)}}}var Qu="AccessorNode",yG=["subset","Node"],bG=B(Qu,yG,e=>{var{subset:t,Node:r}=e,n=$2({subset:t});function a(o){return!(Wi(o)||Dn(o)||lt(o)||si(o)||dc(o)||_a(o)||pr(o))}class i extends r{constructor(s,u){if(super(),!Nt(s))throw new TypeError('Node expected for parameter "object"');if(!Yo(u))throw new TypeError('IndexNode expected for parameter "index"');this.object=s,this.index=u}get name(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}get type(){return Qu}get isAccessorNode(){return!0}_compile(s,u){var l=this.object._compile(s,u),c=this.index._compile(s,u);if(this.index.isObjectProperty()){var f=this.index.getObjectProperty();return function(d,p,h){return Lr(l(d,p,h),f)}}else return function(d,p,h){var y=l(d,p,h),b=c(d,p,y);return n(y,b)}}forEach(s){s(this.object,"object",this),s(this.index,"index",this)}map(s){return new i(this._ifNode(s(this.object,"object",this)),this._ifNode(s(this.index,"index",this)))}clone(){return new i(this.object,this.index)}_toString(s){var u=this.object.toString(s);return a(this.object)&&(u="("+u+")"),u+this.index.toString(s)}_toHTML(s){var u=this.object.toHTML(s);return a(this.object)&&(u='<span class="math-parenthesis math-round-parenthesis">(</span>'+u+'<span class="math-parenthesis math-round-parenthesis">)</span>'),u+this.index.toHTML(s)}_toTex(s){var u=this.object.toTex(s);return a(this.object)&&(u="\\left(' + object + '\\right)"),u+this.index.toTex(s)}toJSON(){return{mathjs:Qu,object:this.object,index:this.index}}static fromJSON(s){return new i(s.object,s.index)}}return rr(i,"name",Qu),i},{isClass:!0,isNode:!0}),Xu="ArrayNode",wG=["Node"],xG=B(Xu,wG,e=>{var{Node:t}=e;class r extends t{constructor(a){if(super(),this.items=a||[],!Array.isArray(this.items)||!this.items.every(Nt))throw new TypeError("Array containing Nodes expected")}get type(){return Xu}get isArrayNode(){return!0}_compile(a,i){var o=ni(this.items,function(l){return l._compile(a,i)}),s=a.config.matrix!=="Array";if(s){var u=a.matrix;return function(c,f,m){return u(ni(o,function(d){return d(c,f,m)}))}}else return function(c,f,m){return ni(o,function(d){return d(c,f,m)})}}forEach(a){for(var i=0;i<this.items.length;i++){var o=this.items[i];a(o,"items["+i+"]",this)}}map(a){for(var i=[],o=0;o<this.items.length;o++)i[o]=this._ifNode(a(this.items[o],"items["+o+"]",this));return new r(i)}clone(){return new r(this.items.slice(0))}_toString(a){var i=this.items.map(function(o){return o.toString(a)});return"["+i.join(", ")+"]"}toJSON(){return{mathjs:Xu,items:this.items}}static fromJSON(a){return new r(a.items)}_toHTML(a){var i=this.items.map(function(o){return o.toHTML(a)});return'<span class="math-parenthesis math-square-parenthesis">[</span>'+i.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-square-parenthesis">]</span>'}_toTex(a){function i(o,s){var u=o.some(Dn)&&!o.every(Dn),l=s||u,c=l?"&":"\\\\",f=o.map(function(m){return m.items?i(m.items,!s):m.toTex(a)}).join(c);return u||!l||l&&!s?"\\begin{bmatrix}"+f+"\\end{bmatrix}":f}return i(this.items,!1)}}return rr(r,"name",Xu),r},{isClass:!0,isNode:!0});function DG(e){var{subset:t,matrix:r}=e;return function(a,i,o){try{if(Array.isArray(a)){var s=r(a).subset(i,o).valueOf();return s.forEach((u,l)=>{a[l]=u}),a}else{if(a&&typeof a.subset=="function")return a.subset(i,o);if(typeof a=="string")return t(a,i,o);if(typeof a=="object"){if(!i.isObjectProperty())throw TypeError("Cannot apply a numeric index as object property");return jo(a,i.getObjectProperty(),o),a}else throw new TypeError("Cannot apply index: unsupported type of object")}}catch(u){throw Wr(u)}}}var Rn=[{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:factorial":{op:"!",associativity:"left"}},{"OperatorNode:ctranspose":{op:"'",associativity:"left"}}];function el(e,t){if(!t||t!=="auto")return e;for(var r=e;_a(r);)r=r.content;return r}function St(e,t,r,n){var a=e;t!=="keep"&&(a=e.getContent());for(var i=a.getIdentifier(),o=null,s=0;s<Rn.length;s++)if(i in Rn[s]){o=s;break}if(i==="OperatorNode:multiply"&&a.implicit&&r!=="show"){var u=el(a.args[0],t);!(lt(u)&&n&&n.getIdentifier()==="OperatorNode:divide"&&Am(el(n.args[0],t)))&&!(u.getIdentifier()==="OperatorNode:divide"&&Am(el(u.args[0],t))&<(el(u.args[1])))&&(o+=1)}return o}function ws(e,t){var r=e;t!=="keep"&&(r=e.getContent());var n=r.getIdentifier(),a=St(r,t);if(a===null)return null;var i=Rn[a][n];if(Oe(i,"associativity")){if(i.associativity==="left")return"left";if(i.associativity==="right")return"right";throw Error("'"+n+"' has the invalid associativity '"+i.associativity+"'.")}return null}function kf(e,t,r){var n=r!=="keep"?e.getContent():e,a=r!=="keep"?e.getContent():t,i=n.getIdentifier(),o=a.getIdentifier(),s=St(n,r);if(s===null)return null;var u=Rn[s][i];if(Oe(u,"associativeWith")&&u.associativeWith instanceof Array){for(var l=0;l<u.associativeWith.length;l++)if(u.associativeWith[l]===o)return!0;return!1}return null}function NG(e){var t="OperatorNode:"+e;for(var r of Rn)if(t in r)return r[t].op;return null}var tl="AssignmentNode",AG=["subset","?matrix","Node"],CG=B(tl,AG,e=>{var{subset:t,matrix:r,Node:n}=e,a=$2({subset:t}),i=DG({subset:t,matrix:r});function o(u,l,c){l||(l="keep");var f=St(u,l,c),m=St(u.value,l,c);return l==="all"||m!==null&&m<=f}class s extends n{constructor(l,c,f){if(super(),this.object=l,this.index=f?c:null,this.value=f||c,!pr(l)&&!Wi(l))throw new TypeError('SymbolNode or AccessorNode expected as "object"');if(pr(l)&&l.name==="end")throw new Error('Cannot assign to symbol "end"');if(this.index&&!Yo(this.index))throw new TypeError('IndexNode expected as "index"');if(!Nt(this.value))throw new TypeError('Node expected as "value"')}get name(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}get type(){return tl}get isAssignmentNode(){return!0}_compile(l,c){var f=this.object._compile(l,c),m=this.index?this.index._compile(l,c):null,d=this.value._compile(l,c),p=this.object.name;if(this.index)if(this.index.isObjectProperty()){var h=this.index.getObjectProperty();return function(x,w,v){var A=f(x,w,v),C=d(x,w,v);return jo(A,h,C),C}}else{if(pr(this.object))return function(x,w,v){var A=f(x,w,v),C=d(x,w,v),N=m(x,w,A);return x.set(p,i(A,N,C)),C};var y=this.object.object._compile(l,c);if(this.object.index.isObjectProperty()){var b=this.object.index.getObjectProperty();return function(x,w,v){var A=y(x,w,v),C=Lr(A,b),N=m(x,w,C),E=d(x,w,v);return jo(A,b,i(C,N,E)),E}}else{var D=this.object.index._compile(l,c);return function(x,w,v){var A=y(x,w,v),C=D(x,w,A),N=a(A,C),E=m(x,w,N),S=d(x,w,v);return i(A,C,i(N,E,S)),S}}}else{if(!pr(this.object))throw new TypeError("SymbolNode expected as object");return function(x,w,v){var A=d(x,w,v);return x.set(p,A),A}}}forEach(l){l(this.object,"object",this),this.index&&l(this.index,"index",this),l(this.value,"value",this)}map(l){var c=this._ifNode(l(this.object,"object",this)),f=this.index?this._ifNode(l(this.index,"index",this)):null,m=this._ifNode(l(this.value,"value",this));return new s(c,f,m)}clone(){return new s(this.object,this.index,this.value)}_toString(l){var c=this.object.toString(l),f=this.index?this.index.toString(l):"",m=this.value.toString(l);return o(this,l&&l.parenthesis,l&&l.implicit)&&(m="("+m+")"),c+f+" = "+m}toJSON(){return{mathjs:tl,object:this.object,index:this.index,value:this.value}}static fromJSON(l){return new s(l.object,l.index,l.value)}_toHTML(l){var c=this.object.toHTML(l),f=this.index?this.index.toHTML(l):"",m=this.value.toHTML(l);return o(this,l&&l.parenthesis,l&&l.implicit)&&(m='<span class="math-paranthesis math-round-parenthesis">(</span>'+m+'<span class="math-paranthesis math-round-parenthesis">)</span>'),c+f+'<span class="math-operator math-assignment-operator math-variable-assignment-operator math-binary-operator">=</span>'+m}_toTex(l){var c=this.object.toTex(l),f=this.index?this.index.toTex(l):"",m=this.value.toTex(l);return o(this,l&&l.parenthesis,l&&l.implicit)&&(m="\\left(".concat(m,"\\right)")),c+f+"="+m}}return rr(s,"name",tl),s},{isClass:!0,isNode:!0}),rl="BlockNode",EG=["ResultSet","Node"],SG=B(rl,EG,e=>{var{ResultSet:t,Node:r}=e;class n extends r{constructor(i){if(super(),!Array.isArray(i))throw new Error("Array expected");this.blocks=i.map(function(o){var s=o&&o.node,u=o&&o.visible!==void 0?o.visible:!0;if(!Nt(s))throw new TypeError('Property "node" must be a Node');if(typeof u!="boolean")throw new TypeError('Property "visible" must be a boolean');return{node:s,visible:u}})}get type(){return rl}get isBlockNode(){return!0}_compile(i,o){var s=ni(this.blocks,function(u){return{evaluate:u.node._compile(i,o),visible:u.visible}});return function(l,c,f){var m=[];return gx(s,function(p){var h=p.evaluate(l,c,f);p.visible&&m.push(h)}),new t(m)}}forEach(i){for(var o=0;o<this.blocks.length;o++)i(this.blocks[o].node,"blocks["+o+"].node",this)}map(i){for(var o=[],s=0;s<this.blocks.length;s++){var u=this.blocks[s],l=this._ifNode(i(u.node,"blocks["+s+"].node",this));o[s]={node:l,visible:u.visible}}return new n(o)}clone(){var i=this.blocks.map(function(o){return{node:o.node,visible:o.visible}});return new n(i)}_toString(i){return this.blocks.map(function(o){return o.node.toString(i)+(o.visible?"":";")}).join(`
|
|
43
|
-
`)}toJSON(){return{mathjs:rl,blocks:this.blocks}}static fromJSON(i){return new n(i.blocks)}_toHTML(i){return this.blocks.map(function(o){return o.node.toHTML(i)+(o.visible?"":'<span class="math-separator">;</span>')}).join('<span class="math-separator"><br /></span>')}_toTex(i){return this.blocks.map(function(o){return o.node.toTex(i)+(o.visible?"":";")}).join(`\\;\\;
|
|
44
|
-
`)}}return rr(n,"name",rl),n},{isClass:!0,isNode:!0}),nl="ConditionalNode",MG=["Node"],TG=B(nl,MG,e=>{var{Node:t}=e;function r(a){if(typeof a=="number"||typeof a=="boolean"||typeof a=="string")return!!a;if(a){if(Qe(a))return!a.isZero();if(Pa(a))return!!(a.re||a.im);if(Nn(a))return!!a.value}if(a==null)return!1;throw new TypeError('Unsupported type of condition "'+Mt(a)+'"')}class n extends t{constructor(i,o,s){if(super(),!Nt(i))throw new TypeError("Parameter condition must be a Node");if(!Nt(o))throw new TypeError("Parameter trueExpr must be a Node");if(!Nt(s))throw new TypeError("Parameter falseExpr must be a Node");this.condition=i,this.trueExpr=o,this.falseExpr=s}get type(){return nl}get isConditionalNode(){return!0}_compile(i,o){var s=this.condition._compile(i,o),u=this.trueExpr._compile(i,o),l=this.falseExpr._compile(i,o);return function(f,m,d){return r(s(f,m,d))?u(f,m,d):l(f,m,d)}}forEach(i){i(this.condition,"condition",this),i(this.trueExpr,"trueExpr",this),i(this.falseExpr,"falseExpr",this)}map(i){return new n(this._ifNode(i(this.condition,"condition",this)),this._ifNode(i(this.trueExpr,"trueExpr",this)),this._ifNode(i(this.falseExpr,"falseExpr",this)))}clone(){return new n(this.condition,this.trueExpr,this.falseExpr)}_toString(i){var o=i&&i.parenthesis?i.parenthesis:"keep",s=St(this,o,i&&i.implicit),u=this.condition.toString(i),l=St(this.condition,o,i&&i.implicit);(o==="all"||this.condition.type==="OperatorNode"||l!==null&&l<=s)&&(u="("+u+")");var c=this.trueExpr.toString(i),f=St(this.trueExpr,o,i&&i.implicit);(o==="all"||this.trueExpr.type==="OperatorNode"||f!==null&&f<=s)&&(c="("+c+")");var m=this.falseExpr.toString(i),d=St(this.falseExpr,o,i&&i.implicit);return(o==="all"||this.falseExpr.type==="OperatorNode"||d!==null&&d<=s)&&(m="("+m+")"),u+" ? "+c+" : "+m}toJSON(){return{mathjs:nl,condition:this.condition,trueExpr:this.trueExpr,falseExpr:this.falseExpr}}static fromJSON(i){return new n(i.condition,i.trueExpr,i.falseExpr)}_toHTML(i){var o=i&&i.parenthesis?i.parenthesis:"keep",s=St(this,o,i&&i.implicit),u=this.condition.toHTML(i),l=St(this.condition,o,i&&i.implicit);(o==="all"||this.condition.type==="OperatorNode"||l!==null&&l<=s)&&(u='<span class="math-parenthesis math-round-parenthesis">(</span>'+u+'<span class="math-parenthesis math-round-parenthesis">)</span>');var c=this.trueExpr.toHTML(i),f=St(this.trueExpr,o,i&&i.implicit);(o==="all"||this.trueExpr.type==="OperatorNode"||f!==null&&f<=s)&&(c='<span class="math-parenthesis math-round-parenthesis">(</span>'+c+'<span class="math-parenthesis math-round-parenthesis">)</span>');var m=this.falseExpr.toHTML(i),d=St(this.falseExpr,o,i&&i.implicit);return(o==="all"||this.falseExpr.type==="OperatorNode"||d!==null&&d<=s)&&(m='<span class="math-parenthesis math-round-parenthesis">(</span>'+m+'<span class="math-parenthesis math-round-parenthesis">)</span>'),u+'<span class="math-operator math-conditional-operator">?</span>'+c+'<span class="math-operator math-conditional-operator">:</span>'+m}_toTex(i){return"\\begin{cases} {"+this.trueExpr.toTex(i)+"}, &\\quad{\\text{if }\\;"+this.condition.toTex(i)+"}\\\\{"+this.falseExpr.toTex(i)+"}, &\\quad{\\text{otherwise}}\\end{cases}"}}return rr(n,"name",nl),n},{isClass:!0,isNode:!0}),Of,iy;function FG(){if(iy)return Of;iy=1;var e=Object.assign||function(a){for(var i=1;i<arguments.length;i++){var o=arguments[i];for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(a[s]=o[s])}return a},t={"{":"\\{","}":"\\}","\\":"\\textbackslash{}","#":"\\#",$:"\\$","%":"\\%","&":"\\&","^":"\\textasciicircum{}",_:"\\_","~":"\\textasciitilde{}"},r={"–":"\\--","—":"\\---"," ":"~"," ":"\\qquad{}","\r\n":"\\newline{}","\n":"\\newline{}"},n=function(i,o){return e({},i,o)};return Of=function(a){for(var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=i.preserveFormatting,s=o===void 0?!1:o,u=i.escapeMapFn,l=u===void 0?n:u,c=String(a),f="",m=l(e({},t),s?e({},r):{}),d=Object.keys(m),p=function(){var y=!1;d.forEach(function(b,D){y||c.length>=b.length&&c.slice(0,b.length)===b&&(f+=m[d[D]],c=c.slice(b.length,c.length),y=!0)}),y||(f+=c.slice(0,1),c=c.slice(1,c.length))};c;)p();return f},Of}var PG=FG();const kG=Hs.getDefaultExportFromCjs(PG);var Hm={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{?}"},ft={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"},oy={abs:{1:"\\left|${args[0]}\\right|"},add:{2:"\\left(${args[0]}".concat(ft.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]}".concat(ft.dotDivide,"${args[1]}\\right)")},dotMultiply:{2:"\\left(${args[0]}".concat(ft.dotMultiply,"${args[1]}\\right)")},dotPow:{2:"\\left(${args[0]}".concat(ft.dotPow,"${args[1]}\\right)")},exp:{1:"\\exp\\left(${args[0]}\\right)"},expm1:"\\left(e".concat(ft.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]}".concat(ft.mod,"${args[1]}\\right)")},multiply:{2:"\\left(${args[0]}".concat(ft.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)".concat(ft.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]}".concat(ft.subtract,"${args[1]}\\right)")},unaryMinus:{1:"".concat(ft.unaryMinus,"\\left(${args[0]}\\right)")},unaryPlus:{1:"".concat(ft.unaryPlus,"\\left(${args[0]}\\right)")},bitAnd:{2:"\\left(${args[0]}".concat(ft.bitAnd,"${args[1]}\\right)")},bitNot:{1:ft.bitNot+"\\left(${args[0]}\\right)"},bitOr:{2:"\\left(${args[0]}".concat(ft.bitOr,"${args[1]}\\right)")},bitXor:{2:"\\left(${args[0]}".concat(ft.bitXor,"${args[1]}\\right)")},leftShift:{2:"\\left(${args[0]}".concat(ft.leftShift,"${args[1]}\\right)")},rightArithShift:{2:"\\left(${args[0]}".concat(ft.rightArithShift,"${args[1]}\\right)")},rightLogShift:{2:"\\left(${args[0]}".concat(ft.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]}".concat(ft.and,"${args[1]}\\right)")},not:{1:ft.not+"\\left(${args[0]}\\right)"},or:{2:"\\left(${args[0]}".concat(ft.or,"${args[1]}\\right)")},xor:{2:"\\left(${args[0]}".concat(ft.xor,"${args[1]}\\right)")},cross:{2:"\\left(${args[0]}\\right)\\times\\left(${args[1]}\\right)"},ctranspose:{1:"\\left(${args[0]}\\right)".concat(ft.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]}}".concat(ft.pow,"{\\frac{1}{2}}")},trace:{1:"\\mathrm{tr}\\left(${args[0]}\\right)"},transpose:{1:"\\left(${args[0]}\\right)".concat(ft.transpose)},combinations:{2:"\\binom{${args[0]}}{${args[1]}}"},combinationsWithRep:{2:"\\left(\\!\\!{\\binom{${args[0]}}{${args[1]}}}\\!\\!\\right)"},factorial:{1:"\\left(${args[0]}\\right)".concat(ft.factorial)},gamma:{1:"\\Gamma\\left(${args[0]}\\right)"},lgamma:{1:"\\ln\\Gamma\\left(${args[0]}\\right)"},equal:{2:"\\left(${args[0]}".concat(ft.equal,"${args[1]}\\right)")},larger:{2:"\\left(${args[0]}".concat(ft.larger,"${args[1]}\\right)")},largerEq:{2:"\\left(${args[0]}".concat(ft.largerEq,"${args[1]}\\right)")},smaller:{2:"\\left(${args[0]}".concat(ft.smaller,"${args[1]}\\right)")},smallerEq:{2:"\\left(${args[0]}".concat(ft.smallerEq,"${args[1]}\\right)")},unequal:{2:"\\left(${args[0]}".concat(ft.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]}".concat(ft.to,"${args[1]}\\right)")},numeric:function(t,r){return t.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)+".concat(Hm.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)"}},OG="\\mathrm{${name}}\\left(${args}\\right)",sy={deg:"^\\circ"};function Gm(e){return kG(e,{preserveFormatting:!0})}function _2(e,t){return t=typeof t>"u"?!1:t,t?Oe(sy,e)?sy[e]:"\\mathrm{"+Gm(e)+"}":Oe(Hm,e)?Hm[e]:Gm(e)}var al="ConstantNode",$G=["Node"],_G=B(al,$G,e=>{var{Node:t}=e;class r extends t{constructor(a){super(),this.value=a}get type(){return al}get isConstantNode(){return!0}_compile(a,i){var o=this.value;return function(){return o}}forEach(a){}map(a){return this.clone()}clone(){return new r(this.value)}_toString(a){return at(this.value,a)}_toHTML(a){var i=this._toString(a);switch(Mt(this.value)){case"number":case"bigint":case"BigNumber":case"Fraction":return'<span class="math-number">'+i+"</span>";case"string":return'<span class="math-string">'+i+"</span>";case"boolean":return'<span class="math-boolean">'+i+"</span>";case"null":return'<span class="math-null-symbol">'+i+"</span>";case"undefined":return'<span class="math-undefined">'+i+"</span>";default:return'<span class="math-symbol">'+i+"</span>"}}toJSON(){return{mathjs:al,value:this.value}}static fromJSON(a){return new r(a.value)}_toTex(a){var i=this._toString(a),o=Mt(this.value);switch(o){case"string":return"\\mathtt{"+Gm(i)+"}";case"number":case"BigNumber":{var s=o==="BigNumber"?this.value.isFinite():isFinite(this.value);if(!s)return this.value.valueOf()<0?"-\\infty":"\\infty";var u=i.toLowerCase().indexOf("e");return u!==-1?i.substring(0,u)+"\\cdot10^{"+i.substring(u+1)+"}":i}case"bigint":return i.toString();case"Fraction":return this.value.toLatex();default:return i}}}return rr(r,"name",al),r},{isClass:!0,isNode:!0}),il="FunctionAssignmentNode",BG=["typed","Node"],IG=B(il,BG,e=>{var{typed:t,Node:r}=e;function n(i,o,s){var u=St(i,o,s),l=St(i.expr,o,s);return o==="all"||l!==null&&l<=u}class a extends r{constructor(o,s,u){if(super(),typeof o!="string")throw new TypeError('String expected for parameter "name"');if(!Array.isArray(s))throw new TypeError('Array containing strings or objects expected for parameter "params"');if(!Nt(u))throw new TypeError('Node expected for parameter "expr"');if(O2.has(o))throw new Error('Illegal function name, "'+o+'" is a reserved keyword');var l=new Set;for(var c of s){var f=typeof c=="string"?c:c.name;if(l.has(f))throw new Error('Duplicate parameter name "'.concat(f,'"'));l.add(f)}this.name=o,this.params=s.map(function(m){return m&&m.name||m}),this.types=s.map(function(m){return m&&m.type||"any"}),this.expr=u}get type(){return il}get isFunctionAssignmentNode(){return!0}_compile(o,s){var u=Object.create(s);gx(this.params,function(p){u[p]=!0});var l=this.expr._compile(o,u),c=this.name,f=this.params,m=o0(this.types,","),d=c+"("+o0(this.params,", ")+")";return function(h,y,b){var D={};D[m]=function(){for(var x=Object.create(y),w=0;w<f.length;w++)x[f[w]]=arguments[w];return l(h,x,b)};var g=t(c,D);return g.syntax=d,h.set(c,g),g}}forEach(o){o(this.expr,"expr",this)}map(o){var s=this._ifNode(o(this.expr,"expr",this));return new a(this.name,this.params.slice(0),s)}clone(){return new a(this.name,this.params.slice(0),this.expr)}_toString(o){var s=o&&o.parenthesis?o.parenthesis:"keep",u=this.expr.toString(o);return n(this,s,o&&o.implicit)&&(u="("+u+")"),this.name+"("+this.params.join(", ")+") = "+u}toJSON(){var o=this.types;return{mathjs:il,name:this.name,params:this.params.map(function(s,u){return{name:s,type:o[u]}}),expr:this.expr}}static fromJSON(o){return new a(o.name,o.params,o.expr)}_toHTML(o){for(var s=o&&o.parenthesis?o.parenthesis:"keep",u=[],l=0;l<this.params.length;l++)u.push('<span class="math-symbol math-parameter">'+Cn(this.params[l])+"</span>");var c=this.expr.toHTML(o);return n(this,s,o&&o.implicit)&&(c='<span class="math-parenthesis math-round-parenthesis">(</span>'+c+'<span class="math-parenthesis math-round-parenthesis">)</span>'),'<span class="math-function">'+Cn(this.name)+'</span><span class="math-parenthesis math-round-parenthesis">(</span>'+u.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>'+c}_toTex(o){var s=o&&o.parenthesis?o.parenthesis:"keep",u=this.expr.toTex(o);return n(this,s,o&&o.implicit)&&(u="\\left(".concat(u,"\\right)")),"\\mathrm{"+this.name+"}\\left("+this.params.map(_2).join(",")+"\\right)="+u}}return rr(a,"name",il),a},{isClass:!0,isNode:!0}),ol="IndexNode",zG=["Node","size"],jG=B(ol,zG,e=>{var{Node:t,size:r}=e;class n extends t{constructor(i,o){if(super(),this.dimensions=i,this.dotNotation=o||!1,!Array.isArray(i)||!i.every(Nt))throw new TypeError('Array containing Nodes expected for parameter "dimensions"');if(this.dotNotation&&!this.isObjectProperty())throw new Error("dotNotation only applicable for object properties")}get type(){return ol}get isIndexNode(){return!0}_compile(i,o){var s=ni(this.dimensions,function(l,c){var f=l.filter(p=>p.isSymbolNode&&p.name==="end").length>0;if(f){var m=Object.create(o);m.end=!0;var d=l._compile(i,m);return function(h,y,b){if(!je(b)&&!Et(b)&&!Pr(b))throw new TypeError('Cannot resolve "end": context must be a Matrix, Array, or string but is '+Mt(b));var D=r(b).valueOf(),g=Object.create(y);return g.end=D[c],d(h,g,b)}}else return l._compile(i,o)}),u=Lr(i,"index");return function(c,f,m){var d=ni(s,function(p){return p(c,f,m)});return u(...d)}}forEach(i){for(var o=0;o<this.dimensions.length;o++)i(this.dimensions[o],"dimensions["+o+"]",this)}map(i){for(var o=[],s=0;s<this.dimensions.length;s++)o[s]=this._ifNode(i(this.dimensions[s],"dimensions["+s+"]",this));return new n(o,this.dotNotation)}clone(){return new n(this.dimensions.slice(0),this.dotNotation)}isObjectProperty(){return this.dimensions.length===1&<(this.dimensions[0])&&typeof this.dimensions[0].value=="string"}getObjectProperty(){return this.isObjectProperty()?this.dimensions[0].value:null}_toString(i){return this.dotNotation?"."+this.getObjectProperty():"["+this.dimensions.join(", ")+"]"}toJSON(){return{mathjs:ol,dimensions:this.dimensions,dotNotation:this.dotNotation}}static fromJSON(i){return new n(i.dimensions,i.dotNotation)}_toHTML(i){for(var o=[],s=0;s<this.dimensions.length;s++)o[s]=this.dimensions[s].toHTML();return this.dotNotation?'<span class="math-operator math-accessor-operator">.</span><span class="math-symbol math-property">'+Cn(this.getObjectProperty())+"</span>":'<span class="math-parenthesis math-square-parenthesis">[</span>'+o.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-square-parenthesis">]</span>'}_toTex(i){var o=this.dimensions.map(function(s){return s.toTex(i)});return this.dotNotation?"."+this.getObjectProperty():"_{"+o.join(",")+"}"}}return rr(n,"name",ol),n},{isClass:!0,isNode:!0}),sl="ObjectNode",qG=["Node"],RG=B(sl,qG,e=>{var{Node:t}=e;class r extends t{constructor(a){if(super(),this.properties=a||{},a&&(typeof a!="object"||!Object.keys(a).every(function(i){return Nt(a[i])})))throw new TypeError("Object containing Nodes expected")}get type(){return sl}get isObjectNode(){return!0}_compile(a,i){var o={};for(var s in this.properties)if(Oe(this.properties,s)){var u=ko(s),l=JSON.parse(u),c=Lr(this.properties,s);o[l]=c._compile(a,i)}return function(m,d,p){var h={};for(var y in o)Oe(o,y)&&(h[y]=o[y](m,d,p));return h}}forEach(a){for(var i in this.properties)Oe(this.properties,i)&&a(this.properties[i],"properties["+ko(i)+"]",this)}map(a){var i={};for(var o in this.properties)Oe(this.properties,o)&&(i[o]=this._ifNode(a(this.properties[o],"properties["+ko(o)+"]",this)));return new r(i)}clone(){var a={};for(var i in this.properties)Oe(this.properties,i)&&(a[i]=this.properties[i]);return new r(a)}_toString(a){var i=[];for(var o in this.properties)Oe(this.properties,o)&&i.push(ko(o)+": "+this.properties[o].toString(a));return"{"+i.join(", ")+"}"}toJSON(){return{mathjs:sl,properties:this.properties}}static fromJSON(a){return new r(a.properties)}_toHTML(a){var i=[];for(var o in this.properties)Oe(this.properties,o)&&i.push('<span class="math-symbol math-property">'+Cn(o)+'</span><span class="math-operator math-assignment-operator math-property-assignment-operator math-binary-operator">:</span>'+this.properties[o].toHTML(a));return'<span class="math-parenthesis math-curly-parenthesis">{</span>'+i.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-curly-parenthesis">}</span>'}_toTex(a){var i=[];for(var o in this.properties)Oe(this.properties,o)&&i.push("\\mathbf{"+o+":} & "+this.properties[o].toTex(a)+"\\\\");var s="\\left\\{\\begin{array}{ll}"+i.join(`
|
|
45
|
-
`)+"\\end{array}\\right\\}";return s}}return rr(r,"name",sl),r},{isClass:!0,isNode:!0});function Ns(e,t){return new Lw(e,new cc(t),new Set(Object.keys(t)))}var ul="OperatorNode",LG=["Node"],HG=B(ul,LG,e=>{var{Node:t}=e;function r(i,o){var s=i;if(o==="auto")for(;_a(s);)s=s.content;return lt(s)?!0:Yt(s)?r(s.args[0],o):!1}function n(i,o,s,u,l){var c=St(i,o,s),f=ws(i,o);if(o==="all"||u.length>2&&i.getIdentifier()!=="OperatorNode:add"&&i.getIdentifier()!=="OperatorNode:multiply")return u.map(function(E){switch(E.getContent().type){case"ArrayNode":case"ConstantNode":case"SymbolNode":case"ParenthesisNode":return!1;default:return!0}});var m;switch(u.length){case 0:m=[];break;case 1:{var d=St(u[0],o,s,i);if(l&&d!==null){var p,h;if(o==="keep"?(p=u[0].getIdentifier(),h=i.getIdentifier()):(p=u[0].getContent().getIdentifier(),h=i.getContent().getIdentifier()),Rn[c][h].latexLeftParens===!1){m=[!1];break}if(Rn[d][p].latexParens===!1){m=[!1];break}}if(d===null){m=[!1];break}if(d<=c){m=[!0];break}m=[!1]}break;case 2:{var y,b=St(u[0],o,s,i),D=kf(i,u[0],o);b===null?y=!1:b===c&&f==="right"&&!D||b<c?y=!0:y=!1;var g,x=St(u[1],o,s,i),w=kf(i,u[1],o);if(x===null?g=!1:x===c&&f==="left"&&!w||x<c?g=!0:g=!1,l){var v,A,C;o==="keep"?(v=i.getIdentifier(),A=i.args[0].getIdentifier(),C=i.args[1].getIdentifier()):(v=i.getContent().getIdentifier(),A=i.args[0].getContent().getIdentifier(),C=i.args[1].getContent().getIdentifier()),b!==null&&(Rn[c][v].latexLeftParens===!1&&(y=!1),Rn[b][A].latexParens===!1&&(y=!1)),x!==null&&(Rn[c][v].latexRightParens===!1&&(g=!1),Rn[x][C].latexParens===!1&&(g=!1))}m=[y,g]}break;default:(i.getIdentifier()==="OperatorNode:add"||i.getIdentifier()==="OperatorNode:multiply")&&(m=u.map(function(E){var S=St(E,o,s,i),F=kf(i,E,o),k=ws(E,o);return S===null?!1:c===S&&f===k&&!F?!0:S<c}));break}if(u.length>=2&&i.getIdentifier()==="OperatorNode:multiply"&&i.implicit&&o!=="all"&&s==="hide")for(var N=1;N<m.length;++N)r(u[N],o)&&!m[N-1]&&(o!=="keep"||!_a(u[N-1]))&&(m[N]=!0);return m}class a extends t{constructor(o,s,u,l,c){if(super(),typeof o!="string")throw new TypeError('string expected for parameter "op"');if(typeof s!="string")throw new TypeError('string expected for parameter "fn"');if(!Array.isArray(u)||!u.every(Nt))throw new TypeError('Array containing Nodes expected for parameter "args"');this.implicit=l===!0,this.isPercentage=c===!0,this.op=o,this.fn=s,this.args=u||[]}get type(){return ul}get isOperatorNode(){return!0}_compile(o,s){if(typeof this.fn!="string"||!dd(o,this.fn))throw o[this.fn]?new Error('No access to function "'+this.fn+'"'):new Error("Function "+this.fn+' missing in provided namespace "math"');var u=Lr(o,this.fn),l=ni(this.args,function(p){return p._compile(o,s)});if(typeof u=="function"&&u.rawArgs===!0){var c=this.args;return function(h,y,b){return u(c,o,Ns(h,y))}}else if(l.length===1){var f=l[0];return function(h,y,b){return u(f(h,y,b))}}else if(l.length===2){var m=l[0],d=l[1];return function(h,y,b){return u(m(h,y,b),d(h,y,b))}}else return function(h,y,b){return u.apply(null,ni(l,function(D){return D(h,y,b)}))}}forEach(o){for(var s=0;s<this.args.length;s++)o(this.args[s],"args["+s+"]",this)}map(o){for(var s=[],u=0;u<this.args.length;u++)s[u]=this._ifNode(o(this.args[u],"args["+u+"]",this));return new a(this.op,this.fn,s,this.implicit,this.isPercentage)}clone(){return new a(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(o){var s=o&&o.parenthesis?o.parenthesis:"keep",u=o&&o.implicit?o.implicit:"hide",l=this.args,c=n(this,s,u,l,!1);if(l.length===1){var f=ws(this,s),m=l[0].toString(o);c[0]&&(m="("+m+")");var d=/[a-zA-Z]+/.test(this.op);return f==="right"?this.op+(d?" ":"")+m:f==="left"?m+(d?" ":"")+this.op:m+this.op}else if(l.length===2){var p=l[0].toString(o),h=l[1].toString(o);return c[0]&&(p="("+p+")"),c[1]&&(h="("+h+")"),this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&u==="hide"?p+" "+h:p+" "+this.op+" "+h}else if(l.length>2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")){var y=l.map(function(b,D){return b=b.toString(o),c[D]&&(b="("+b+")"),b});return this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&u==="hide"?y.join(" "):y.join(" "+this.op+" ")}else return this.fn+"("+this.args.join(", ")+")"}toJSON(){return{mathjs:ul,op:this.op,fn:this.fn,args:this.args,implicit:this.implicit,isPercentage:this.isPercentage}}static fromJSON(o){return new a(o.op,o.fn,o.args,o.implicit,o.isPercentage)}_toHTML(o){var s=o&&o.parenthesis?o.parenthesis:"keep",u=o&&o.implicit?o.implicit:"hide",l=this.args,c=n(this,s,u,l,!1);if(l.length===1){var f=ws(this,s),m=l[0].toHTML(o);return c[0]&&(m='<span class="math-parenthesis math-round-parenthesis">(</span>'+m+'<span class="math-parenthesis math-round-parenthesis">)</span>'),f==="right"?'<span class="math-operator math-unary-operator math-lefthand-unary-operator">'+Cn(this.op)+"</span>"+m:m+'<span class="math-operator math-unary-operator math-righthand-unary-operator">'+Cn(this.op)+"</span>"}else if(l.length===2){var d=l[0].toHTML(o),p=l[1].toHTML(o);return c[0]&&(d='<span class="math-parenthesis math-round-parenthesis">(</span>'+d+'<span class="math-parenthesis math-round-parenthesis">)</span>'),c[1]&&(p='<span class="math-parenthesis math-round-parenthesis">(</span>'+p+'<span class="math-parenthesis math-round-parenthesis">)</span>'),this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&u==="hide"?d+'<span class="math-operator math-binary-operator math-implicit-binary-operator"></span>'+p:d+'<span class="math-operator math-binary-operator math-explicit-binary-operator">'+Cn(this.op)+"</span>"+p}else{var h=l.map(function(y,b){return y=y.toHTML(o),c[b]&&(y='<span class="math-parenthesis math-round-parenthesis">(</span>'+y+'<span class="math-parenthesis math-round-parenthesis">)</span>'),y});return l.length>2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")?this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&u==="hide"?h.join('<span class="math-operator math-binary-operator math-implicit-binary-operator"></span>'):h.join('<span class="math-operator math-binary-operator math-explicit-binary-operator">'+Cn(this.op)+"</span>"):'<span class="math-function">'+Cn(this.fn)+'</span><span class="math-paranthesis math-round-parenthesis">(</span>'+h.join('<span class="math-separator">,</span>')+'<span class="math-paranthesis math-round-parenthesis">)</span>'}}_toTex(o){var s=o&&o.parenthesis?o.parenthesis:"keep",u=o&&o.implicit?o.implicit:"hide",l=this.args,c=n(this,s,u,l,!0),f=ft[this.fn];if(f=typeof f>"u"?this.op:f,l.length===1){var m=ws(this,s),d=l[0].toTex(o);return c[0]&&(d="\\left(".concat(d,"\\right)")),m==="right"?f+d:d+f}else if(l.length===2){var p=l[0],h=p.toTex(o);c[0]&&(h="\\left(".concat(h,"\\right)"));var y=l[1],b=y.toTex(o);c[1]&&(b="\\left(".concat(b,"\\right)"));var D;switch(s==="keep"?D=p.getIdentifier():D=p.getContent().getIdentifier(),this.getIdentifier()){case"OperatorNode:divide":return f+"{"+h+"}{"+b+"}";case"OperatorNode:pow":switch(h="{"+h+"}",b="{"+b+"}",D){case"ConditionalNode":case"OperatorNode:divide":h="\\left(".concat(h,"\\right)")}break;case"OperatorNode:multiply":if(this.implicit&&u==="hide")return h+"~"+b}return h+f+b}else if(l.length>2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")){var g=l.map(function(x,w){return x=x.toTex(o),c[w]&&(x="\\left(".concat(x,"\\right)")),x});return this.getIdentifier()==="OperatorNode:multiply"&&this.implicit&&u==="hide"?g.join("~"):g.join(f)}else return"\\mathrm{"+this.fn+"}\\left("+l.map(function(x){return x.toTex(o)}).join(",")+"\\right)"}getIdentifier(){return this.type+":"+this.fn}}return rr(a,"name",ul),a},{isClass:!0,isNode:!0}),ll="ParenthesisNode",GG=["Node"],VG=B(ll,GG,e=>{var{Node:t}=e;class r extends t{constructor(a){if(super(),!Nt(a))throw new TypeError('Node expected for parameter "content"');this.content=a}get type(){return ll}get isParenthesisNode(){return!0}_compile(a,i){return this.content._compile(a,i)}getContent(){return this.content.getContent()}forEach(a){a(this.content,"content",this)}map(a){var i=a(this.content,"content",this);return new r(i)}clone(){return new r(this.content)}_toString(a){return!a||a&&!a.parenthesis||a&&a.parenthesis==="keep"?"("+this.content.toString(a)+")":this.content.toString(a)}toJSON(){return{mathjs:ll,content:this.content}}static fromJSON(a){return new r(a.content)}_toHTML(a){return!a||a&&!a.parenthesis||a&&a.parenthesis==="keep"?'<span class="math-parenthesis math-round-parenthesis">(</span>'+this.content.toHTML(a)+'<span class="math-parenthesis math-round-parenthesis">)</span>':this.content.toHTML(a)}_toTex(a){return!a||a&&!a.parenthesis||a&&a.parenthesis==="keep"?"\\left(".concat(this.content.toTex(a),"\\right)"):this.content.toTex(a)}}return rr(r,"name",ll),r},{isClass:!0,isNode:!0}),cl="RangeNode",UG=["Node"],WG=B(cl,UG,e=>{var{Node:t}=e;function r(a,i,o){var s=St(a,i,o),u={},l=St(a.start,i,o);if(u.start=l!==null&&l<=s||i==="all",a.step){var c=St(a.step,i,o);u.step=c!==null&&c<=s||i==="all"}var f=St(a.end,i,o);return u.end=f!==null&&f<=s||i==="all",u}class n extends t{constructor(i,o,s){if(super(),!Nt(i))throw new TypeError("Node expected");if(!Nt(o))throw new TypeError("Node expected");if(s&&!Nt(s))throw new TypeError("Node expected");if(arguments.length>3)throw new Error("Too many arguments");this.start=i,this.end=o,this.step=s||null}get type(){return cl}get isRangeNode(){return!0}needsEnd(){var i=this.filter(function(o){return pr(o)&&o.name==="end"});return i.length>0}_compile(i,o){var s=i.range,u=this.start._compile(i,o),l=this.end._compile(i,o);if(this.step){var c=this.step._compile(i,o);return function(m,d,p){return s(u(m,d,p),l(m,d,p),c(m,d,p))}}else return function(m,d,p){return s(u(m,d,p),l(m,d,p))}}forEach(i){i(this.start,"start",this),i(this.end,"end",this),this.step&&i(this.step,"step",this)}map(i){return new n(this._ifNode(i(this.start,"start",this)),this._ifNode(i(this.end,"end",this)),this.step&&this._ifNode(i(this.step,"step",this)))}clone(){return new n(this.start,this.end,this.step&&this.step)}_toString(i){var o=i&&i.parenthesis?i.parenthesis:"keep",s=r(this,o,i&&i.implicit),u,l=this.start.toString(i);if(s.start&&(l="("+l+")"),u=l,this.step){var c=this.step.toString(i);s.step&&(c="("+c+")"),u+=":"+c}var f=this.end.toString(i);return s.end&&(f="("+f+")"),u+=":"+f,u}toJSON(){return{mathjs:cl,start:this.start,end:this.end,step:this.step}}static fromJSON(i){return new n(i.start,i.end,i.step)}_toHTML(i){var o=i&&i.parenthesis?i.parenthesis:"keep",s=r(this,o,i&&i.implicit),u,l=this.start.toHTML(i);if(s.start&&(l='<span class="math-parenthesis math-round-parenthesis">(</span>'+l+'<span class="math-parenthesis math-round-parenthesis">)</span>'),u=l,this.step){var c=this.step.toHTML(i);s.step&&(c='<span class="math-parenthesis math-round-parenthesis">(</span>'+c+'<span class="math-parenthesis math-round-parenthesis">)</span>'),u+='<span class="math-operator math-range-operator">:</span>'+c}var f=this.end.toHTML(i);return s.end&&(f='<span class="math-parenthesis math-round-parenthesis">(</span>'+f+'<span class="math-parenthesis math-round-parenthesis">)</span>'),u+='<span class="math-operator math-range-operator">:</span>'+f,u}_toTex(i){var o=i&&i.parenthesis?i.parenthesis:"keep",s=r(this,o,i&&i.implicit),u=this.start.toTex(i);if(s.start&&(u="\\left(".concat(u,"\\right)")),this.step){var l=this.step.toTex(i);s.step&&(l="\\left(".concat(l,"\\right)")),u+=":"+l}var c=this.end.toTex(i);return s.end&&(c="\\left(".concat(c,"\\right)")),u+=":"+c,u}}return rr(n,"name",cl),n},{isClass:!0,isNode:!0}),fl="RelationalNode",JG=["Node"],KG=B(fl,JG,e=>{var{Node:t}=e,r={equal:"==",unequal:"!=",smaller:"<",larger:">",smallerEq:"<=",largerEq:">="};class n extends t{constructor(i,o){if(super(),!Array.isArray(i))throw new TypeError("Parameter conditionals must be an array");if(!Array.isArray(o))throw new TypeError("Parameter params must be an array");if(i.length!==o.length-1)throw new TypeError("Parameter params must contain exactly one more element than parameter conditionals");this.conditionals=i,this.params=o}get type(){return fl}get isRelationalNode(){return!0}_compile(i,o){var s=this,u=this.params.map(l=>l._compile(i,o));return function(c,f,m){for(var d,p=u[0](c,f,m),h=0;h<s.conditionals.length;h++){d=p,p=u[h+1](c,f,m);var y=Lr(i,s.conditionals[h]);if(!y(d,p))return!1}return!0}}forEach(i){this.params.forEach((o,s)=>i(o,"params["+s+"]",this),this)}map(i){return new n(this.conditionals.slice(),this.params.map((o,s)=>this._ifNode(i(o,"params["+s+"]",this)),this))}clone(){return new n(this.conditionals,this.params)}_toString(i){for(var o=i&&i.parenthesis?i.parenthesis:"keep",s=St(this,o,i&&i.implicit),u=this.params.map(function(f,m){var d=St(f,o,i&&i.implicit);return o==="all"||d!==null&&d<=s?"("+f.toString(i)+")":f.toString(i)}),l=u[0],c=0;c<this.conditionals.length;c++)l+=" "+r[this.conditionals[c]],l+=" "+u[c+1];return l}toJSON(){return{mathjs:fl,conditionals:this.conditionals,params:this.params}}static fromJSON(i){return new n(i.conditionals,i.params)}_toHTML(i){for(var o=i&&i.parenthesis?i.parenthesis:"keep",s=St(this,o,i&&i.implicit),u=this.params.map(function(f,m){var d=St(f,o,i&&i.implicit);return o==="all"||d!==null&&d<=s?'<span class="math-parenthesis math-round-parenthesis">(</span>'+f.toHTML(i)+'<span class="math-parenthesis math-round-parenthesis">)</span>':f.toHTML(i)}),l=u[0],c=0;c<this.conditionals.length;c++)l+='<span class="math-operator math-binary-operator math-explicit-binary-operator">'+Cn(r[this.conditionals[c]])+"</span>"+u[c+1];return l}_toTex(i){for(var o=i&&i.parenthesis?i.parenthesis:"keep",s=St(this,o,i&&i.implicit),u=this.params.map(function(f,m){var d=St(f,o,i&&i.implicit);return o==="all"||d!==null&&d<=s?"\\left("+f.toTex(i)+"\right)":f.toTex(i)}),l=u[0],c=0;c<this.conditionals.length;c++)l+=ft[this.conditionals[c]]+u[c+1];return l}}return rr(n,"name",fl),n},{isClass:!0,isNode:!0}),YG="SymbolNode",ZG=["math","?Unit","Node"],QG=B(YG,ZG,e=>{var{math:t,Unit:r,Node:n}=e;function a(o){return r?r.isValuelessUnit(o):!1}class i extends n{constructor(s){if(super(),typeof s!="string")throw new TypeError('String expected for parameter "name"');this.name=s}get type(){return"SymbolNode"}get isSymbolNode(){return!0}_compile(s,u){var l=this.name;if(u[l]===!0)return function(f,m,d){return Lr(m,l)};if(l in s)return function(f,m,d){return f.has(l)?f.get(l):Lr(s,l)};var c=a(l);return function(f,m,d){return f.has(l)?f.get(l):c?new r(null,l):i.onUndefinedSymbol(l)}}forEach(s){}map(s){return this.clone()}static onUndefinedSymbol(s){throw new Error("Undefined symbol "+s)}clone(){return new i(this.name)}_toString(s){return this.name}_toHTML(s){var u=Cn(this.name);return u==="true"||u==="false"?'<span class="math-symbol math-boolean">'+u+"</span>":u==="i"?'<span class="math-symbol math-imaginary-symbol">'+u+"</span>":u==="Infinity"?'<span class="math-symbol math-infinity-symbol">'+u+"</span>":u==="NaN"?'<span class="math-symbol math-nan-symbol">'+u+"</span>":u==="null"?'<span class="math-symbol math-null-symbol">'+u+"</span>":u==="undefined"?'<span class="math-symbol math-undefined-symbol">'+u+"</span>":'<span class="math-symbol">'+u+"</span>"}toJSON(){return{mathjs:"SymbolNode",name:this.name}}static fromJSON(s){return new i(s.name)}_toTex(s){var u=!1;typeof t[this.name]>"u"&&a(this.name)&&(u=!0);var l=_2(this.name,u);return l[0]==="\\"?l:" "+l}}return i},{isClass:!0,isNode:!0}),ml="FunctionNode",XG=["math","Node","SymbolNode"],eV=B(ml,XG,e=>{var t,{math:r,Node:n,SymbolNode:a}=e,i=u=>at(u,{truncate:78});function o(u,l,c){for(var f="",m=/\$(?:\{([a-z_][a-z_0-9]*)(?:\[([0-9]+)\])?\}|\$)/gi,d=0,p;(p=m.exec(u))!==null;)if(f+=u.substring(d,p.index),d=p.index,p[0]==="$$")f+="$",d++;else{d+=p[0].length;var h=l[p[1]];if(!h)throw new ReferenceError("Template: Property "+p[1]+" does not exist.");if(p[2]===void 0)switch(typeof h){case"string":f+=h;break;case"object":if(Nt(h))f+=h.toTex(c);else if(Array.isArray(h))f+=h.map(function(y,b){if(Nt(y))return y.toTex(c);throw new TypeError("Template: "+p[1]+"["+b+"] is not a Node.")}).join(",");else throw new TypeError("Template: "+p[1]+" has to be a Node, String or array of Nodes");break;default:throw new TypeError("Template: "+p[1]+" has to be a Node, String or array of Nodes")}else if(Nt(h[p[2]]&&h[p[2]]))f+=h[p[2]].toTex(c);else throw new TypeError("Template: "+p[1]+"["+p[2]+"] is not a Node.")}return f+=u.slice(d),f}class s extends n{constructor(l,c){if(super(),typeof l=="string"&&(l=new a(l)),!Nt(l))throw new TypeError('Node expected as parameter "fn"');if(!Array.isArray(c)||!c.every(Nt))throw new TypeError('Array containing Nodes expected for parameter "args"');this.fn=l,this.args=c||[]}get name(){return this.fn.name||""}get type(){return ml}get isFunctionNode(){return!0}_compile(l,c){var f=this.args.map(C=>C._compile(l,c));if(pr(this.fn)){var m=this.fn.name;if(c[m]){var b=this.args;return function(N,E,S){var F=Lr(E,m);if(typeof F!="function")throw new TypeError("Argument '".concat(m,"' was not a function; received: ").concat(i(F)));if(F.rawArgs)return F(b,l,Ns(N,E));var k=f.map($=>$(N,E,S));return F.apply(F,k)}}else{var d=m in l?Lr(l,m):void 0,p=typeof d=="function"&&d.rawArgs===!0,h=C=>{var N;if(C.has(m))N=C.get(m);else if(m in l)N=Lr(l,m);else return s.onUndefinedFunction(m);if(typeof N=="function")return N;throw new TypeError("'".concat(m,`' is not a function; its value is:
|
|
46
|
-
`).concat(i(N)))};if(p){var y=this.args;return function(N,E,S){var F=h(N);if(F.rawArgs===!0)return F(y,l,Ns(N,E));var k=f.map($=>$(N,E,S));return F(...k)}}else switch(f.length){case 0:return function(N,E,S){var F=h(N);return F()};case 1:return function(N,E,S){var F=h(N),k=f[0];return F(k(N,E,S))};case 2:return function(N,E,S){var F=h(N),k=f[0],$=f[1];return F(k(N,E,S),$(N,E,S))};default:return function(N,E,S){var F=h(N),k=f.map($=>$(N,E,S));return F(...k)}}}}else if(Wi(this.fn)&&Yo(this.fn.index)&&this.fn.index.isObjectProperty()){var D=this.fn.object._compile(l,c),g=this.fn.index.getObjectProperty(),x=this.args;return function(N,E,S){var F=D(N,E,S),k=M6(F,g);if(k!=null&&k.rawArgs)return k(x,l,Ns(N,E));var $=f.map(_=>_(N,E,S));return k.apply(F,$)}}else{var w=this.fn.toString(),v=this.fn._compile(l,c),A=this.args;return function(N,E,S){var F=v(N,E,S);if(typeof F!="function")throw new TypeError("Expression '".concat(w,"' did not evaluate to a function; value is:")+`
|
|
47
|
-
`.concat(i(F)));if(F.rawArgs)return F(A,l,Ns(N,E));var k=f.map($=>$(N,E,S));return F.apply(F,k)}}}forEach(l){l(this.fn,"fn",this);for(var c=0;c<this.args.length;c++)l(this.args[c],"args["+c+"]",this)}map(l){for(var c=this._ifNode(l(this.fn,"fn",this)),f=[],m=0;m<this.args.length;m++)f[m]=this._ifNode(l(this.args[m],"args["+m+"]",this));return new s(c,f)}clone(){return new s(this.fn,this.args.slice(0))}toString(l){var c,f=this.fn.toString(l);return l&&typeof l.handler=="object"&&Oe(l.handler,f)&&(c=l.handler[f](this,l)),typeof c<"u"?c:super.toString(l)}_toString(l){var c=this.args.map(function(m){return m.toString(l)}),f=Qs(this.fn)?"("+this.fn.toString(l)+")":this.fn.toString(l);return f+"("+c.join(", ")+")"}toJSON(){return{mathjs:ml,fn:this.fn,args:this.args}}_toHTML(l){var c=this.args.map(function(f){return f.toHTML(l)});return'<span class="math-function">'+Cn(this.fn)+'</span><span class="math-paranthesis math-round-parenthesis">(</span>'+c.join('<span class="math-separator">,</span>')+'<span class="math-paranthesis math-round-parenthesis">)</span>'}toTex(l){var c;return l&&typeof l.handler=="object"&&Oe(l.handler,this.name)&&(c=l.handler[this.name](this,l)),typeof c<"u"?c:super.toTex(l)}_toTex(l){var c=this.args.map(function(d){return d.toTex(l)}),f;oy[this.name]&&(f=oy[this.name]),r[this.name]&&(typeof r[this.name].toTex=="function"||typeof r[this.name].toTex=="object"||typeof r[this.name].toTex=="string")&&(f=r[this.name].toTex);var m;switch(typeof f){case"function":m=f(this,l);break;case"string":m=o(f,this,l);break;case"object":switch(typeof f[c.length]){case"function":m=f[c.length](this,l);break;case"string":m=o(f[c.length],this,l);break}}return typeof m<"u"?m:o(OG,this,l)}getIdentifier(){return this.type+":"+this.name}}return t=s,rr(s,"name",ml),rr(s,"onUndefinedFunction",function(u){throw new Error("Undefined function "+u)}),rr(s,"fromJSON",function(u){return new t(u.fn,u.args)}),s},{isClass:!0,isNode:!0}),uy="parse",tV=["typed","numeric","config","AccessorNode","ArrayNode","AssignmentNode","BlockNode","ConditionalNode","ConstantNode","FunctionAssignmentNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","RangeNode","RelationalNode","SymbolNode"],rV=B(uy,tV,e=>{var{typed:t,numeric:r,config:n,AccessorNode:a,ArrayNode:i,AssignmentNode:o,BlockNode:s,ConditionalNode:u,ConstantNode:l,FunctionAssignmentNode:c,FunctionNode:f,IndexNode:m,ObjectNode:d,OperatorNode:p,ParenthesisNode:h,RangeNode:y,RelationalNode:b,SymbolNode:D}=e,g=t(uy,{string:function(W){return Q(W,{})},"Array | Matrix":function(W){return x(W,{})},"string, Object":function(W,ie){var ge=ie.nodes!==void 0?ie.nodes:{};return Q(W,ge)},"Array | Matrix, Object":x});function x(M){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ie=W.nodes!==void 0?W.nodes:{};return Xe(M,function(ge){if(typeof ge!="string")throw new TypeError("String expected");return Q(ge,ie)})}var w={NULL:0,DELIMITER:1,NUMBER:2,SYMBOL:3,UNKNOWN:4},v={",":!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},A={mod:!0,to:!0,in:!0,and:!0,xor:!0,or:!0,not:!0},C={true:!0,false:!1,null:null,undefined:void 0},N=["NaN","Infinity"],E={'"':'"',"'":"'","\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
48
|
-
`,r:"\r",t:" "};function S(){return{extraNodes:{},expression:"",comment:"",index:0,token:"",tokenType:w.NULL,nestingLevel:0,conditionalLevel:null}}function F(M,W){return M.expression.substr(M.index,W)}function k(M){return F(M,1)}function $(M){M.index++}function _(M){return M.expression.charAt(M.index-1)}function T(M){return M.expression.charAt(M.index+1)}function z(M){for(M.tokenType=w.NULL,M.token="",M.comment="";;){if(k(M)==="#")for(;k(M)!==`
|
|
49
|
-
`&&k(M)!=="";)M.comment+=k(M),$(M);if(g.isWhitespace(k(M),M.nestingLevel))$(M);else break}if(k(M)===""){M.tokenType=w.DELIMITER;return}if(k(M)===`
|
|
50
|
-
`&&!M.nestingLevel){M.tokenType=w.DELIMITER,M.token=k(M),$(M);return}var W=k(M),ie=F(M,2),ge=F(M,3);if(ge.length===3&&v[ge]){M.tokenType=w.DELIMITER,M.token=ge,$(M),$(M),$(M);return}if(ie.length===2&&v[ie]){M.tokenType=w.DELIMITER,M.token=ie,$(M),$(M);return}if(v[W]){M.tokenType=w.DELIMITER,M.token=W,$(M);return}if(g.isDigitDot(W)){M.tokenType=w.NUMBER;var Le=F(M,2);if(Le==="0b"||Le==="0o"||Le==="0x"){for(M.token+=k(M),$(M),M.token+=k(M),$(M);g.isHexDigit(k(M));)M.token+=k(M),$(M);if(k(M)===".")for(M.token+=".",$(M);g.isHexDigit(k(M));)M.token+=k(M),$(M);else if(k(M)==="i")for(M.token+="i",$(M);g.isDigit(k(M));)M.token+=k(M),$(M);return}if(k(M)==="."){if(M.token+=k(M),$(M),!g.isDigit(k(M))){M.tokenType=w.DELIMITER;return}}else{for(;g.isDigit(k(M));)M.token+=k(M),$(M);g.isDecimalMark(k(M),T(M))&&(M.token+=k(M),$(M))}for(;g.isDigit(k(M));)M.token+=k(M),$(M);if(k(M)==="E"||k(M)==="e"){if(g.isDigit(T(M))||T(M)==="-"||T(M)==="+"){if(M.token+=k(M),$(M),(k(M)==="+"||k(M)==="-")&&(M.token+=k(M),$(M)),!g.isDigit(k(M)))throw qe(M,'Digit expected, got "'+k(M)+'"');for(;g.isDigit(k(M));)M.token+=k(M),$(M);if(g.isDecimalMark(k(M),T(M)))throw qe(M,'Digit expected, got "'+k(M)+'"')}else if(g.isDecimalMark(T(M),M.expression.charAt(M.index+2)))throw $(M),qe(M,'Digit expected, got "'+k(M)+'"')}return}if(g.isAlpha(k(M),_(M),T(M))){for(;g.isAlpha(k(M),_(M),T(M))||g.isDigit(k(M));)M.token+=k(M),$(M);Oe(A,M.token)?M.tokenType=w.DELIMITER:M.tokenType=w.SYMBOL;return}for(M.tokenType=w.UNKNOWN;k(M)!=="";)M.token+=k(M),$(M);throw qe(M,'Syntax error in part "'+M.token+'"')}function P(M){do z(M);while(M.token===`
|
|
51
|
-
`)}function j(M){M.nestingLevel++}function O(M){M.nestingLevel--}g.isAlpha=function(W,ie,ge){return g.isValidLatinOrGreek(W)||g.isValidMathSymbol(W,ge)||g.isValidMathSymbol(ie,W)},g.isValidLatinOrGreek=function(W){return/^[a-zA-Z_$\u00C0-\u02AF\u0370-\u03FF\u2100-\u214F]$/.test(W)},g.isValidMathSymbol=function(W,ie){return/^[\uD835]$/.test(W)&&/^[\uDC00-\uDFFF]$/.test(ie)&&/^[^\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(ie)},g.isWhitespace=function(W,ie){return W===" "||W===" "||W===`
|
|
52
|
-
`&&ie>0},g.isDecimalMark=function(W,ie){return W==="."&&ie!=="/"&&ie!=="*"&&ie!=="^"},g.isDigitDot=function(W){return W>="0"&&W<="9"||W==="."},g.isDigit=function(W){return W>="0"&&W<="9"},g.isHexDigit=function(W){return W>="0"&&W<="9"||W>="a"&&W<="f"||W>="A"&&W<="F"};function Q(M,W){var ie=S();ar(ie,{expression:M,extraNodes:W}),z(ie);var ge=K(ie);if(ie.token!=="")throw ie.tokenType===w.DELIMITER?Bt(ie,"Unexpected operator "+ie.token):qe(ie,'Unexpected part "'+ie.token+'"');return ge}function K(M){var W,ie=[],ge;for(M.token!==""&&M.token!==`
|
|
53
|
-
`&&M.token!==";"&&(W=U(M),M.comment&&(W.comment=M.comment));M.token===`
|
|
54
|
-
`||M.token===";";)ie.length===0&&W&&(ge=M.token!==";",ie.push({node:W,visible:ge})),z(M),M.token!==`
|
|
55
|
-
`&&M.token!==";"&&M.token!==""&&(W=U(M),M.comment&&(W.comment=M.comment),ge=M.token!==";",ie.push({node:W,visible:ge}));return ie.length>0?new s(ie):(W||(W=new l(void 0),M.comment&&(W.comment=M.comment)),W)}function U(M){var W,ie,ge,Le,Ye=V(M);if(M.token==="="){if(pr(Ye))return W=Ye.name,P(M),ge=U(M),new o(new D(W),ge);if(Wi(Ye))return P(M),ge=U(M),new o(Ye.object,Ye.index,ge);if(si(Ye)&&pr(Ye.fn)&&(Le=!0,ie=[],W=Ye.name,Ye.args.forEach(function(Ir,$c){pr(Ir)?ie[$c]=Ir.name:Le=!1}),Le))return P(M),ge=U(M),new c(W,ie,ge);throw qe(M,"Invalid left hand side of assignment operator =")}return Ye}function V(M){for(var W=le(M);M.token==="?";){var ie=M.conditionalLevel;M.conditionalLevel=M.nestingLevel,P(M);var ge=W,Le=U(M);if(M.token!==":")throw qe(M,"False part of conditional expression expected");M.conditionalLevel=null,P(M);var Ye=U(M);W=new u(ge,Le,Ye),M.conditionalLevel=ie}return W}function le(M){for(var W=ne(M);M.token==="or";)P(M),W=new p("or","or",[W,ne(M)]);return W}function ne(M){for(var W=ee(M);M.token==="xor";)P(M),W=new p("xor","xor",[W,ee(M)]);return W}function ee(M){for(var W=L(M);M.token==="and";)P(M),W=new p("and","and",[W,L(M)]);return W}function L(M){for(var W=R(M);M.token==="|";)P(M),W=new p("|","bitOr",[W,R(M)]);return W}function R(M){for(var W=J(M);M.token==="^|";)P(M),W=new p("^|","bitXor",[W,J(M)]);return W}function J(M){for(var W=re(M);M.token==="&";)P(M),W=new p("&","bitAnd",[W,re(M)]);return W}function re(M){for(var W=[te(M)],ie=[],ge={"==":"equal","!=":"unequal","<":"smaller",">":"larger","<=":"smallerEq",">=":"largerEq"};Oe(ge,M.token);){var Le={name:M.token,fn:ge[M.token]};ie.push(Le),P(M),W.push(te(M))}return W.length===1?W[0]:W.length===2?new p(ie[0].name,ie[0].fn,W):new b(ie.map(Ye=>Ye.fn),W)}function te(M){var W,ie,ge,Le;W=ue(M);for(var Ye={"<<":"leftShift",">>":"rightArithShift",">>>":"rightLogShift"};Oe(Ye,M.token);)ie=M.token,ge=Ye[ie],P(M),Le=[W,ue(M)],W=new p(ie,ge,Le);return W}function ue(M){var W,ie,ge,Le;W=oe(M);for(var Ye={to:"to",in:"to"};Oe(Ye,M.token);)ie=M.token,ge=Ye[ie],P(M),ie==="in"&&"])},;".includes(M.token)?W=new p("*","multiply",[W,new D("in")],!0):(Le=[W,oe(M)],W=new p(ie,ge,Le));return W}function oe(M){var W,ie=[];if(M.token===":"?W=new l(1):W=De(M),M.token===":"&&M.conditionalLevel!==M.nestingLevel){for(ie.push(W);M.token===":"&&ie.length<3;)P(M),M.token===")"||M.token==="]"||M.token===","||M.token===""?ie.push(new D("end")):ie.push(De(M));ie.length===3?W=new y(ie[0],ie[2],ie[1]):W=new y(ie[0],ie[1])}return W}function De(M){var W,ie,ge,Le;W=q(M);for(var Ye={"+":"add","-":"subtract"};Oe(Ye,M.token);){ie=M.token,ge=Ye[ie],P(M);var Ir=q(M);Ir.isPercentage?Le=[W,new p("*","multiply",[W,Ir])]:Le=[W,Ir],W=new p(ie,ge,Le)}return W}function q(M){var W,ie,ge,Le;W=H(M),ie=W;for(var Ye={"*":"multiply",".*":"dotMultiply","/":"divide","./":"dotDivide","%":"mod",mod:"mod"};Oe(Ye,M.token);)if(ge=M.token,Le=Ye[ge],P(M),ge==="%"&&M.tokenType===w.DELIMITER&&M.token!=="(")if(M.token!==""&&Ye[M.token]){var Ir=new p("/","divide",[W,new l(100)],!1,!0);ge=M.token,Le=Ye[ge],P(M),ie=H(M),W=new p(ge,Le,[Ir,ie])}else W=new p("/","divide",[W,new l(100)],!1,!0);else ie=H(M),W=new p(ge,Le,[W,ie]);return W}function H(M){var W,ie;for(W=Z(M),ie=W;M.tokenType===w.SYMBOL||M.token==="in"&<(W)||M.token==="in"&&Yt(W)&&W.fn==="unaryMinus"&<(W.args[0])||M.tokenType===w.NUMBER&&!lt(ie)&&(!Yt(ie)||ie.op==="!")||M.token==="(";)ie=Z(M),W=new p("*","multiply",[W,ie],!0);return W}function Z(M){for(var W=ae(M),ie=W,ge=[];M.token==="/"&&Am(ie);)if(ge.push(ar({},M)),P(M),M.tokenType===w.NUMBER)if(ge.push(ar({},M)),P(M),M.tokenType===w.SYMBOL||M.token==="("||M.token==="in")ar(M,ge.pop()),ge.pop(),ie=ae(M),W=new p("/","divide",[W,ie]);else{ge.pop(),ar(M,ge.pop());break}else{ar(M,ge.pop());break}return W}function ae(M){var W,ie,ge,Le={"-":"unaryMinus","+":"unaryPlus","~":"bitNot",not:"not"};return Oe(Le,M.token)?(ge=Le[M.token],W=M.token,P(M),ie=[ae(M)],new p(W,ge,ie)):he(M)}function he(M){var W,ie,ge,Le;return W=ye(M),(M.token==="^"||M.token===".^")&&(ie=M.token,ge=ie==="^"?"pow":"dotPow",P(M),Le=[W,ae(M)],W=new p(ie,ge,Le)),W}function ye(M){var W,ie,ge,Le;W=Te(M);for(var Ye={"!":"factorial","'":"ctranspose"};Oe(Ye,M.token);)ie=M.token,ge=Ye[ie],z(M),Le=[W],W=new p(ie,ge,Le),W=Y(M,W);return W}function Te(M){var W=[];if(M.tokenType===w.SYMBOL&&Oe(M.extraNodes,M.token)){var ie=M.extraNodes[M.token];if(z(M),M.token==="("){if(W=[],j(M),z(M),M.token!==")")for(W.push(U(M));M.token===",";)z(M),W.push(U(M));if(M.token!==")")throw qe(M,"Parenthesis ) expected");O(M),z(M)}return new ie(W)}return I(M)}function I(M){var W,ie;return M.tokenType===w.SYMBOL||M.tokenType===w.DELIMITER&&M.token in A?(ie=M.token,z(M),Oe(C,ie)?W=new l(C[ie]):N.includes(ie)?W=new l(r(ie,"number")):W=new D(ie),W=Y(M,W),W):X(M)}function Y(M,W,ie){for(var ge;M.token==="("||M.token==="["||M.token===".";)if(ge=[],M.token==="(")if(pr(W)||Wi(W)){if(j(M),z(M),M.token!==")")for(ge.push(U(M));M.token===",";)z(M),ge.push(U(M));if(M.token!==")")throw qe(M,"Parenthesis ) expected");O(M),z(M),W=new f(W,ge)}else return W;else if(M.token==="["){if(j(M),z(M),M.token!=="]")for(ge.push(U(M));M.token===",";)z(M),ge.push(U(M));if(M.token!=="]")throw qe(M,"Parenthesis ] expected");O(M),z(M),W=new a(W,new m(ge))}else{z(M);var Le=M.tokenType===w.SYMBOL||M.tokenType===w.DELIMITER&&M.token in A;if(!Le)throw qe(M,"Property name expected after dot");ge.push(new l(M.token)),z(M);var Ye=!0;W=new a(W,new m(ge,Ye))}return W}function X(M){var W,ie;return M.token==='"'||M.token==="'"?(ie=se(M,M.token),W=new l(ie),W=Y(M,W),W):ce(M)}function se(M,W){for(var ie="";k(M)!==""&&k(M)!==W;)if(k(M)==="\\"){$(M);var ge=k(M),Le=E[ge];if(Le!==void 0)ie+=Le,M.index+=1;else if(ge==="u"){var Ye=M.expression.slice(M.index+1,M.index+5);if(/^[0-9A-Fa-f]{4}$/.test(Ye))ie+=String.fromCharCode(parseInt(Ye,16)),M.index+=5;else throw qe(M,"Invalid unicode character \\u".concat(Ye))}else throw qe(M,"Bad escape character \\".concat(ge))}else ie+=k(M),$(M);if(z(M),M.token!==W)throw qe(M,"End of string ".concat(W," expected"));return z(M),ie}function ce(M){var W,ie,ge,Le;if(M.token==="["){if(j(M),z(M),M.token!=="]"){var Ye=fe(M);if(M.token===";"){for(ge=1,ie=[Ye];M.token===";";)z(M),M.token!=="]"&&(ie[ge]=fe(M),ge++);if(M.token!=="]")throw qe(M,"End of matrix ] expected");O(M),z(M),Le=ie[0].items.length;for(var Ir=1;Ir<ge;Ir++)if(ie[Ir].items.length!==Le)throw Bt(M,"Column dimensions mismatch ("+ie[Ir].items.length+" !== "+Le+")");W=new i(ie)}else{if(M.token!=="]")throw qe(M,"End of matrix ] expected");O(M),z(M),W=Ye}}else O(M),z(M),W=new i([]);return Y(M,W)}return Ee(M)}function fe(M){for(var W=[U(M)],ie=1;M.token===",";)z(M),M.token!=="]"&&M.token!==";"&&(W[ie]=U(M),ie++);return new i(W)}function Ee(M){if(M.token==="{"){j(M);var W,ie={};do if(z(M),M.token!=="}"){if(M.token==='"'||M.token==="'")W=se(M,M.token);else if(M.tokenType===w.SYMBOL||M.tokenType===w.DELIMITER&&M.token in A)W=M.token,z(M);else throw qe(M,"Symbol or string expected as object key");if(M.token!==":")throw qe(M,"Colon : expected after object key");z(M),ie[W]=U(M)}while(M.token===",");if(M.token!=="}")throw qe(M,"Comma , or bracket } expected after object value");O(M),z(M);var ge=new d(ie);return ge=Y(M,ge),ge}return be(M)}function be(M){var W;if(M.tokenType===w.NUMBER){W=M.token,z(M);var ie=mi(W,n),ge=r(W,ie);return new l(ge)}return Se(M)}function Se(M){var W;if(M.token==="("){if(j(M),z(M),W=U(M),M.token!==")")throw qe(M,"Parenthesis ) expected");return O(M),z(M),W=new h(W),W=Y(M,W),W}return xe(M)}function xe(M){throw M.token===""?qe(M,"Unexpected end of expression"):qe(M,"Value expected")}function dt(M){return M.index-M.token.length+1}function qe(M,W){var ie=dt(M),ge=new SyntaxError(W+" (char "+ie+")");return ge.char=ie,ge}function Bt(M,W){var ie=dt(M),ge=new SyntaxError(W+" (char "+ie+")");return ge.char=ie,ge}return t.addConversion({from:"string",to:"Node",convert:g}),g}),ly="compile",nV=["typed","parse"],aV=B(ly,nV,e=>{var{typed:t,parse:r}=e;return t(ly,{string:function(a){return r(a).compile()},"Array | Matrix":function(a){return Xe(a,function(i){return r(i).compile()})}})}),cy="evaluate",iV=["typed","parse"],oV=B(cy,iV,e=>{var{typed:t,parse:r}=e;return t(cy,{string:function(a){var i=Is();return r(a).compile().evaluate(i)},"string, Map | Object":function(a,i){return r(a).compile().evaluate(i)},"Array | Matrix":function(a){var i=Is();return Xe(a,function(o){return r(o).compile().evaluate(i)})},"Array | Matrix, Map | Object":function(a,i){return Xe(a,function(o){return r(o).compile().evaluate(i)})}})}),sV="Parser",uV=["evaluate","parse"],lV=B(sV,uV,e=>{var{evaluate:t,parse:r}=e;function n(){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");Object.defineProperty(this,"scope",{value:Is(),writable:!1})}n.prototype.type="Parser",n.prototype.isParser=!0,n.prototype.evaluate=function(i){return t(i,this.scope)},n.prototype.get=function(i){if(this.scope.has(i))return this.scope.get(i)},n.prototype.getAll=function(){return k6(this.scope)},n.prototype.getAllAsMap=function(){return this.scope};function a(i){if(i.length===0)return!1;for(var o=0;o<i.length;o++){var s=i.charAt(o-1),u=i.charAt(o),l=i.charAt(o+1),c=r.isAlpha(u,s,l)||o>0&&r.isDigit(u);if(!c)return!1}return!0}return n.prototype.set=function(i,o){if(!a(i))throw new Error("Invalid variable name: '".concat(i,"'. Variable names must follow the specified rules."));return this.scope.set(i,o),o},n.prototype.remove=function(i){this.scope.delete(i)},n.prototype.clear=function(){this.scope.clear()},n},{isClass:!0}),fy="parser",cV=["typed","Parser"],fV=B(fy,cV,e=>{var{typed:t,Parser:r}=e;return t(fy,{"":function(){return new r}})}),my="lup",mV=["typed","matrix","abs","addScalar","divideScalar","multiplyScalar","subtractScalar","larger","equalScalar","unaryMinus","DenseMatrix","SparseMatrix","Spa"],dV=B(my,mV,e=>{var{typed:t,matrix:r,abs:n,addScalar:a,divideScalar:i,multiplyScalar:o,subtractScalar:s,larger:u,equalScalar:l,unaryMinus:c,DenseMatrix:f,SparseMatrix:m,Spa:d}=e;return t(my,{DenseMatrix:function(b){return p(b)},SparseMatrix:function(b){return h(b)},Array:function(b){var D=r(b),g=p(D);return{L:g.L.valueOf(),U:g.U.valueOf(),p:g.p}}});function p(y){var b=y._size[0],D=y._size[1],g=Math.min(b,D),x=Ue(y._data),w=[],v=[b,g],A=[],C=[g,D],N,E,S,F=[];for(N=0;N<b;N++)F[N]=N;for(E=0;E<D;E++){if(E>0)for(N=0;N<b;N++){var k=Math.min(N,E),$=0;for(S=0;S<k;S++)$=a($,o(x[N][S],x[S][E]));x[N][E]=s(x[N][E],$)}var _=E,T=0,z=0;for(N=E;N<b;N++){var P=x[N][E],j=n(P);u(j,T)&&(_=N,T=j,z=P)}if(E!==_&&(F[E]=[F[_],F[_]=F[E]][0],f._swapRows(E,_,x)),E<b)for(N=E+1;N<b;N++){var O=x[N][E];l(O,0)||(x[N][E]=i(x[N][E],z))}}for(E=0;E<D;E++)for(N=0;N<b;N++){if(E===0&&(N<D&&(A[N]=[]),w[N]=[]),N<E){N<D&&(A[N][E]=x[N][E]),E<b&&(w[N][E]=0);continue}if(N===E){N<D&&(A[N][E]=x[N][E]),E<b&&(w[N][E]=1);continue}N<D&&(A[N][E]=0),E<b&&(w[N][E]=x[N][E])}var Q=new f({data:w,size:v}),K=new f({data:A,size:C}),U=[];for(N=0,g=F.length;N<g;N++)U[F[N]]=N;return{L:Q,U:K,p:U,toString:function(){return"L: "+this.L.toString()+`
|
|
56
|
-
U: `+this.U.toString()+`
|
|
57
|
-
P: `+this.p}}}function h(y){var b=y._size[0],D=y._size[1],g=Math.min(b,D),x=y._values,w=y._index,v=y._ptr,A=[],C=[],N=[],E=[b,g],S=[],F=[],k=[],$=[g,D],_,T,z,P=[],j=[];for(_=0;_<b;_++)P[_]=_,j[_]=_;var O=function(U,V){var le=j[U],ne=j[V];P[le]=V,P[ne]=U,j[U]=ne,j[V]=le},Q=function(){var U=new d;T<b&&(N.push(A.length),A.push(1),C.push(T)),k.push(S.length);var V=v[T],le=v[T+1];for(z=V;z<le;z++)_=w[z],U.set(P[_],x[z]);T>0&&U.forEach(0,T-1,function(R,J){m._forEachRow(R,A,C,N,function(re,te){re>R&&U.accumulate(re,c(o(te,J)))})});var ne=T,ee=U.get(T),L=n(ee);U.forEach(T+1,b-1,function(R,J){var re=n(J);u(re,L)&&(ne=R,L=re,ee=J)}),T!==ne&&(m._swapRows(T,ne,E[1],A,C,N),m._swapRows(T,ne,$[1],S,F,k),U.swap(T,ne),O(T,ne)),U.forEach(0,b-1,function(R,J){R<=T?(S.push(J),F.push(R)):(J=i(J,ee),l(J,0)||(A.push(J),C.push(R)))})};for(T=0;T<D;T++)Q();return k.push(S.length),N.push(A.length),{L:new m({values:A,index:C,ptr:N,size:E}),U:new m({values:S,index:F,ptr:k,size:$}),p:P,toString:function(){return"L: "+this.L.toString()+`
|
|
58
|
-
U: `+this.U.toString()+`
|
|
59
|
-
P: `+this.p}}}}),dy="qr",hV=["typed","matrix","zeros","identity","isZero","equal","sign","sqrt","conj","unaryMinus","addScalar","divideScalar","multiplyScalar","subtractScalar","complex"],pV=B(dy,hV,e=>{var{typed:t,matrix:r,zeros:n,identity:a,isZero:i,equal:o,sign:s,sqrt:u,conj:l,unaryMinus:c,addScalar:f,divideScalar:m,multiplyScalar:d,subtractScalar:p,complex:h}=e;return ar(t(dy,{DenseMatrix:function(x){return b(x)},SparseMatrix:function(x){return D()},Array:function(x){var w=r(x),v=b(w);return{Q:v.Q.valueOf(),R:v.R.valueOf()}}}),{_denseQRimpl:y});function y(g){var x=g._size[0],w=g._size[1],v=a([x],"dense"),A=v._data,C=g.clone(),N=C._data,E,S,F,k=n([x],"");for(F=0;F<Math.min(w,x);++F){var $=N[F][F],_=c(o($,0)?1:s($)),T=l(_),z=0;for(E=F;E<x;E++)z=f(z,d(N[E][F],l(N[E][F])));var P=d(_,u(z));if(!i(P)){var j=p($,P);for(k[F]=1,E=F+1;E<x;E++)k[E]=m(N[E][F],j);var O=c(l(m(j,P))),Q=void 0;for(S=F;S<w;S++){for(Q=0,E=F;E<x;E++)Q=f(Q,d(l(k[E]),N[E][S]));for(Q=d(Q,O),E=F;E<x;E++)N[E][S]=d(p(N[E][S],d(k[E],Q)),T)}for(E=0;E<x;E++){for(Q=0,S=F;S<x;S++)Q=f(Q,d(A[E][S],k[S]));for(Q=d(Q,O),S=F;S<x;++S)A[E][S]=m(p(A[E][S],d(Q,l(k[S]))),T)}}}return{Q:v,R:C,toString:function(){return"Q: "+this.Q.toString()+`
|
|
60
|
-
R: `+this.R.toString()}}}function b(g){var x=y(g),w=x.R._data;if(g._data.length>0)for(var v=w[0][0].type==="Complex"?h(0):0,A=0;A<w.length;++A)for(var C=0;C<A&&C<(w[0]||[]).length;++C)w[A][C]=v;return x}function D(g){throw new Error("qr not implemented for sparse matrices yet")}});function gV(e,t,r,n){e._values;for(var a=e._index,i=e._ptr,o=e._size,s=e._datatype,u=o[0],l=o[1],c=null,f=[],m=[],d=0,p=0;p<l;p++){m[p]=d;for(var h=r?r[p]:p,y=i[h],b=i[h+1],D=y;D<b;D++){var g=a[D];f[d]=g,d++}}return m[l]=d,e.createSparseMatrix({values:c,index:f,ptr:m,size:[u,l],datatype:s})}function B2(e,t,r,n,a,i,o){var s=0;for(r[o]=e;s>=0;){var u=r[o+s],l=r[n+u];l===-1?(s--,i[t++]=u):(r[n+u]=r[a+l],++s,r[o+s]=l)}return t}function vV(e,t){if(!e)return null;var r=0,n,a=[],i=[],o=0,s=t,u=2*t;for(n=0;n<t;n++)i[o+n]=-1;for(n=t-1;n>=0;n--)e[n]!==-1&&(i[s+n]=i[o+e[n]],i[o+e[n]]=n);for(n=0;n<t;n++)e[n]===-1&&(r=B2(n,r,i,o,s,a,u));return a}function yV(e,t){if(!e)return null;var r=e._index,n=e._ptr,a=e._size,i=a[0],o=a[1],s=[],u=[],l=0,c=o,f,m;for(f=0;f<i;f++)u[c+f]=-1;for(var d=0;d<o;d++){s[d]=-1,u[l+d]=-1;for(var p=n[d],h=n[d+1],y=p;y<h;y++){var b=r[y];for(f=u[c+b];f!==-1&&f<d;f=m)m=u[l+f],u[l+f]=d,m===-1&&(s[f]=d);u[c+b]=d}}return s}function bV(e,t,r){for(var n=e._values,a=e._index,i=e._ptr,o=e._size,s=o[1],u=0,l=0;l<s;l++){var c=i[l];for(i[l]=u;c<i[l+1];c++)t(a[c],l,n?n[c]:1,r)&&(a[u]=a[c],n&&(n[u]=n[c]),u++)}return i[s]=u,a.splice(u,a.length-u),n&&n.splice(u,n.length-u),u}function Ja(e){return-e-2}var wV="csAmd",xV=["add","multiply","transpose"],DV=B(wV,xV,e=>{var{add:t,multiply:r,transpose:n}=e;return function(c,f){if(!f||c<=0||c>3)return null;var m=f._size,d=m[0],p=m[1],h=0,y=Math.max(16,10*Math.sqrt(p));y=Math.min(p-2,y);var b=a(c,f,d,p,y);bV(b,u,null);for(var D=b._index,g=b._ptr,x=g[p],w=[],v=[],A=0,C=p+1,N=2*(p+1),E=3*(p+1),S=4*(p+1),F=5*(p+1),k=6*(p+1),$=7*(p+1),_=w,T=i(p,g,v,A,E,_,N,$,C,k,S,F),z=o(p,g,v,F,S,k,y,C,E,_,N),P=0,j,O,Q,K,U,V,le,ne,ee,L,R,J,re,te,ue,oe;z<p;){for(Q=-1;P<p&&(Q=v[E+P])===-1;P++);v[N+Q]!==-1&&(_[v[N+Q]]=-1),v[E+P]=v[N+Q];var De=v[S+Q],q=v[C+Q];z+=q;var H=0;v[C+Q]=-q;var Z=g[Q],ae=De===0?Z:x,he=ae;for(K=1;K<=De+1;K++){for(K>De?(V=Q,le=Z,ne=v[A+Q]-De):(V=D[Z++],le=g[V],ne=v[A+V]),U=1;U<=ne;U++)j=D[le++],!((ee=v[C+j])<=0)&&(H+=ee,v[C+j]=-ee,D[he++]=j,v[N+j]!==-1&&(_[v[N+j]]=_[j]),_[j]!==-1?v[N+_[j]]=v[N+j]:v[E+v[F+j]]=v[N+j]);V!==Q&&(g[V]=Ja(Q),v[k+V]=0)}for(De!==0&&(x=he),v[F+Q]=H,g[Q]=ae,v[A+Q]=he-ae,v[S+Q]=-2,T=s(T,h,v,k,p),L=ae;L<he;L++)if(j=D[L],!((R=v[S+j])<=0)){ee=-v[C+j];var ye=T-ee;for(Z=g[j],J=g[j]+R-1;Z<=J;Z++)V=D[Z],v[k+V]>=T?v[k+V]-=ee:v[k+V]!==0&&(v[k+V]=v[F+V]+ye)}for(L=ae;L<he;L++){for(j=D[L],J=g[j],re=J+v[S+j]-1,te=J,ue=0,oe=0,Z=J;Z<=re;Z++)if(V=D[Z],v[k+V]!==0){var Te=v[k+V]-T;Te>0?(oe+=Te,D[te++]=V,ue+=V):(g[V]=Ja(Q),v[k+V]=0)}v[S+j]=te-J+1;var I=te,Y=J+v[A+j];for(Z=re+1;Z<Y;Z++){O=D[Z];var X=v[C+O];X<=0||(oe+=X,D[te++]=O,ue+=O)}oe===0?(g[j]=Ja(Q),ee=-v[C+j],H-=ee,q+=ee,z+=ee,v[C+j]=0,v[S+j]=-1):(v[F+j]=Math.min(v[F+j],oe),D[te]=D[I],D[I]=D[J],D[J]=Q,v[A+j]=te-J+1,ue=(ue<0?-ue:ue)%p,v[N+j]=v[$+ue],v[$+ue]=j,_[j]=ue)}for(v[F+Q]=H,h=Math.max(h,H),T=s(T+h,h,v,k,p),L=ae;L<he;L++)if(j=D[L],!(v[C+j]>=0))for(ue=_[j],j=v[$+ue],v[$+ue]=-1;j!==-1&&v[N+j]!==-1;j=v[N+j],T++){for(ne=v[A+j],R=v[S+j],Z=g[j]+1;Z<=g[j]+ne-1;Z++)v[k+D[Z]]=T;var se=j;for(O=v[N+j];O!==-1;){var ce=v[A+O]===ne&&v[S+O]===R;for(Z=g[O]+1;ce&&Z<=g[O]+ne-1;Z++)v[k+D[Z]]!==T&&(ce=0);ce?(g[O]=Ja(j),v[C+j]+=v[C+O],v[C+O]=0,v[S+O]=-1,O=v[N+O],v[N+se]=O):(se=O,O=v[N+O])}}for(Z=ae,L=ae;L<he;L++)j=D[L],!((ee=-v[C+j])<=0)&&(v[C+j]=ee,oe=v[F+j]+H-ee,oe=Math.min(oe,p-z-ee),v[E+oe]!==-1&&(_[v[E+oe]]=j),v[N+j]=v[E+oe],_[j]=-1,v[E+oe]=j,P=Math.min(P,oe),v[F+j]=oe,D[Z++]=j);v[C+Q]=q,(v[A+Q]=Z-ae)===0&&(g[Q]=-1,v[k+Q]=0),De!==0&&(x=Z)}for(j=0;j<p;j++)g[j]=Ja(g[j]);for(O=0;O<=p;O++)v[E+O]=-1;for(O=p;O>=0;O--)v[C+O]>0||(v[N+O]=v[E+g[O]],v[E+g[O]]=O);for(V=p;V>=0;V--)v[C+V]<=0||g[V]!==-1&&(v[N+V]=v[E+g[V]],v[E+g[V]]=V);for(Q=0,j=0;j<=p;j++)g[j]===-1&&(Q=B2(j,Q,v,E,N,w,k));return w.splice(w.length-1,1),w};function a(l,c,f,m,d){var p=n(c);if(l===1&&m===f)return t(c,p);if(l===2){for(var h=p._index,y=p._ptr,b=0,D=0;D<f;D++){var g=y[D];if(y[D]=b,!(y[D+1]-g>d))for(var x=y[D+1];g<x;g++)h[b++]=h[g]}return y[f]=b,c=n(p),r(p,c)}return r(p,c)}function i(l,c,f,m,d,p,h,y,b,D,g,x){for(var w=0;w<l;w++)f[m+w]=c[w+1]-c[w];f[m+l]=0;for(var v=0;v<=l;v++)f[d+v]=-1,p[v]=-1,f[h+v]=-1,f[y+v]=-1,f[b+v]=1,f[D+v]=1,f[g+v]=0,f[x+v]=f[m+v];var A=s(0,0,f,D,l);return f[g+l]=-2,c[l]=-1,f[D+l]=0,A}function o(l,c,f,m,d,p,h,y,b,D,g){for(var x=0,w=0;w<l;w++){var v=f[m+w];if(v===0)f[d+w]=-2,x++,c[w]=-1,f[p+w]=0;else if(v>h)f[y+w]=0,f[d+w]=-1,x++,c[w]=Ja(l),f[y+l]++;else{var A=f[b+v];A!==-1&&(D[A]=w),f[g+w]=f[b+v],f[b+v]=w}}return x}function s(l,c,f,m,d){if(l<2||l+c<0){for(var p=0;p<d;p++)f[m+p]!==0&&(f[m+p]=1);l=2}return l}function u(l,c){return l!==c}});function NV(e,t,r,n,a,i,o){var s,u,l=0,c;if(e<=t||r[n+t]<=r[a+e])return-1;r[a+e]=r[n+t];var f=r[i+e];if(r[i+e]=t,f===-1)l=1,c=e;else{for(l=2,c=f;c!==r[o+c];c=r[o+c]);for(s=f;s!==c;s=u)u=r[o+s],r[o+s]=c}return{jleaf:l,q:c}}var AV="csCounts",CV=["transpose"],EV=B(AV,CV,e=>{var{transpose:t}=e;return function(r,n,a,i){if(!r||!n||!a)return null;var o=r._size,s=o[0],u=o[1],l,c,f,m,d,p,h,y=4*u+(i?u+s+1:0),b=[],D=0,g=u,x=2*u,w=3*u,v=4*u,A=5*u+1;for(f=0;f<y;f++)b[f]=-1;var C=[],N=t(r),E=N._index,S=N._ptr;for(f=0;f<u;f++)for(c=a[f],C[c]=b[w+c]===-1?1:0;c!==-1&&b[w+c]===-1;c=n[c])b[w+c]=f;if(i){for(f=0;f<u;f++)b[a[f]]=f;for(l=0;l<s;l++){for(f=u,p=S[l],h=S[l+1],d=p;d<h;d++)f=Math.min(f,b[E[d]]);b[A+l]=b[v+f],b[v+f]=l}}for(l=0;l<u;l++)b[D+l]=l;for(f=0;f<u;f++){for(c=a[f],n[c]!==-1&&C[n[c]]--,m=i?b[v+f]:c;m!==-1;m=i?b[A+m]:-1)for(d=S[m];d<S[m+1];d++){l=E[d];var F=NV(l,c,b,w,g,x,D);F.jleaf>=1&&C[c]++,F.jleaf===2&&C[F.q]--}n[c]!==-1&&(b[D+c]=n[c])}for(c=0;c<u;c++)n[c]!==-1&&(C[n[c]]+=C[c]);return C}}),SV="csSqr",MV=["add","multiply","transpose"],TV=B(SV,MV,e=>{var{add:t,multiply:r,transpose:n}=e,a=DV({add:t,multiply:r,transpose:n}),i=EV({transpose:n});return function(u,l,c){var f=l._ptr,m=l._size,d=m[1],p,h={};if(h.q=a(u,l),u&&!h.q)return null;if(c){var y=u?gV(l,null,h.q):l;h.parent=yV(y);var b=vV(h.parent,d);if(h.cp=i(y,h.parent,b,1),y&&h.parent&&h.cp&&o(y,h))for(h.unz=0,p=0;p<d;p++)h.unz+=h.cp[p]}else h.unz=4*f[d]+d,h.lnz=h.unz;return h};function o(s,u){var l=s._ptr,c=s._index,f=s._size,m=f[0],d=f[1];u.pinv=[],u.leftmost=[];var p=u.parent,h=u.pinv,y=u.leftmost,b=[],D=0,g=m,x=m+d,w=m+2*d,v,A,C,N,E;for(A=0;A<d;A++)b[g+A]=-1,b[x+A]=-1,b[w+A]=0;for(v=0;v<m;v++)y[v]=-1;for(A=d-1;A>=0;A--)for(N=l[A],E=l[A+1],C=N;C<E;C++)y[c[C]]=A;for(v=m-1;v>=0;v--)h[v]=-1,A=y[v],A!==-1&&(b[w+A]++===0&&(b[x+A]=v),b[D+v]=b[g+A],b[g+A]=v);for(u.lnz=0,u.m2=m,A=0;A<d;A++)if(v=b[g+A],u.lnz++,v<0&&(v=u.m2++),h[v]=A,!(--w[A]<=0)){u.lnz+=b[w+A];var S=p[A];S!==-1&&(b[w+S]===0&&(b[x+S]=b[x+A]),b[D+b[x+A]]=b[g+S],b[g+S]=b[D+v],b[w+S]+=b[w+A])}for(v=0;v<m;v++)h[v]<0&&(h[v]=A++);return!0}});function Vm(e,t){return e[t]<0}function I2(e,t){e[t]=Ja(e[t])}function hy(e){return e<0?Ja(e):e}function FV(e,t,r,n,a){var i=t._index,o=t._ptr,s=t._size,u=s[1],l,c,f,m=0;for(n[0]=e;m>=0;){e=n[m];var d=a?a[e]:e;Vm(o,e)||(I2(o,e),n[u+m]=d<0?0:hy(o[d]));var p=1;for(c=n[u+m],f=d<0?0:hy(o[d+1]);c<f;c++)if(l=i[c],!Vm(o,l)){n[u+m]=c,n[++m]=l,p=0;break}p&&(m--,n[--r]=e)}return r}function PV(e,t,r,n,a){var i=e._ptr,o=e._size,s=t._index,u=t._ptr,l=o[1],c,f,m,d=l;for(f=u[r],m=u[r+1],c=f;c<m;c++){var p=s[c];Vm(i,p)||(d=FV(p,e,d,n,a))}for(c=d;c<l;c++)I2(i,n[c]);return d}var kV="csSpsolve",OV=["divideScalar","multiply","subtract"],$V=B(kV,OV,e=>{var{divideScalar:t,multiply:r,subtract:n}=e;return function(i,o,s,u,l,c,f){var m=i._values,d=i._index,p=i._ptr,h=i._size,y=h[1],b=o._values,D=o._index,g=o._ptr,x,w,v,A,C=PV(i,o,s,u,c);for(x=C;x<y;x++)l[u[x]]=0;for(w=g[s],v=g[s+1],x=w;x<v;x++)l[D[x]]=b[x];for(var N=C;N<y;N++){var E=u[N],S=c?c[E]:E;if(!(S<0))for(w=p[S],v=p[S+1],l[E]=t(l[E],m[f?w:v-1]),x=f?w+1:w,A=f?v:v-1;x<A;x++){var F=d[x];l[F]=n(l[F],r(m[x],l[E]))}}return C}}),_V="csLu",BV=["abs","divideScalar","multiply","subtract","larger","largerEq","SparseMatrix"],IV=B(_V,BV,e=>{var{abs:t,divideScalar:r,multiply:n,subtract:a,larger:i,largerEq:o,SparseMatrix:s}=e,u=$V({divideScalar:r,multiply:n,subtract:a});return function(c,f,m){if(!c)return null;var d=c._size,p=d[1],h,y=100,b=100;f&&(h=f.q,y=f.lnz||y,b=f.unz||b);var D=[],g=[],x=[],w=new s({values:D,index:g,ptr:x,size:[p,p]}),v=[],A=[],C=[],N=new s({values:v,index:A,ptr:C,size:[p,p]}),E=[],S,F,k=[],$=[];for(S=0;S<p;S++)k[S]=0,E[S]=-1,x[S+1]=0;y=0,b=0;for(var _=0;_<p;_++){x[_]=y,C[_]=b;var T=h?h[_]:_,z=u(w,c,T,$,k,E,1),P=-1,j=-1;for(F=z;F<p;F++)if(S=$[F],E[S]<0){var O=t(k[S]);i(O,j)&&(j=O,P=S)}else A[b]=E[S],v[b++]=k[S];if(P===-1||j<=0)return null;E[T]<0&&o(t(k[T]),n(j,m))&&(P=T);var Q=k[P];for(A[b]=_,v[b++]=Q,E[P]=_,g[y]=P,D[y++]=1,F=z;F<p;F++)S=$[F],E[S]<0&&(g[y]=S,D[y++]=r(k[S],Q)),k[S]=0}for(x[p]=y,C[p]=b,F=0;F<y;F++)g[F]=E[g[F]];return D.splice(y,D.length-y),g.splice(y,g.length-y),v.splice(b,v.length-b),A.splice(b,A.length-b),{L:w,U:N,pinv:E}}}),py="slu",zV=["typed","abs","add","multiply","transpose","divideScalar","subtract","larger","largerEq","SparseMatrix"],jV=B(py,zV,e=>{var{typed:t,abs:r,add:n,multiply:a,transpose:i,divideScalar:o,subtract:s,larger:u,largerEq:l,SparseMatrix:c}=e,f=TV({add:n,multiply:a,transpose:i}),m=IV({abs:r,divideScalar:o,multiply:a,subtract:s,larger:u,largerEq:l,SparseMatrix:c});return t(py,{"SparseMatrix, number, number":function(p,h,y){if(!$e(h)||h<0||h>3)throw new Error("Symbolic Ordering and Analysis order must be an integer number in the interval [0, 3]");if(y<0||y>1)throw new Error("Partial pivoting threshold must be a number from 0 to 1");var b=f(h,p,!1),D=m(p,b,y);return{L:D.L,U:D.U,p:D.pinv,q:b.q,toString:function(){return"L: "+this.L.toString()+`
|
|
61
|
-
U: `+this.U.toString()+`
|
|
62
|
-
p: `+this.p.toString()+(this.q?`
|
|
63
|
-
q: `+this.q.toString():"")+`
|
|
64
|
-
`}}}})});function gy(e,t){var r,n=t.length,a=[];if(e)for(r=0;r<n;r++)a[e[r]]=t[r];else for(r=0;r<n;r++)a[r]=t[r];return a}var vy="lusolve",qV=["typed","matrix","lup","slu","usolve","lsolve","DenseMatrix"],RV=B(vy,qV,e=>{var{typed:t,matrix:r,lup:n,slu:a,usolve:i,lsolve:o,DenseMatrix:s}=e,u=eu({DenseMatrix:s});return t(vy,{"Array, Array | Matrix":function(m,d){m=r(m);var p=n(m),h=c(p.L,p.U,p.p,null,d);return h.valueOf()},"DenseMatrix, Array | Matrix":function(m,d){var p=n(m);return c(p.L,p.U,p.p,null,d)},"SparseMatrix, Array | Matrix":function(m,d){var p=n(m);return c(p.L,p.U,p.p,null,d)},"SparseMatrix, Array | Matrix, number, number":function(m,d,p,h){var y=a(m,p,h);return c(y.L,y.U,y.p,y.q,d)},"Object, Array | Matrix":function(m,d){return c(m.L,m.U,m.p,m.q,d)}});function l(f){if(je(f))return f;if(Et(f))return r(f);throw new TypeError("Invalid Matrix LU decomposition")}function c(f,m,d,p,h){f=l(f),m=l(m),d&&(h=u(f,h,!0),h._data=gy(d,h._data));var y=o(f,h),b=i(m,y);return p&&(b._data=gy(p,b._data)),b}}),yy="polynomialRoot",LV=["typed","isZero","equalScalar","add","subtract","multiply","divide","sqrt","unaryMinus","cbrt","typeOf","im","re"],HV=B(yy,LV,e=>{var{typed:t,isZero:r,equalScalar:n,add:a,subtract:i,multiply:o,divide:s,sqrt:u,unaryMinus:l,cbrt:c,typeOf:f,im:m,re:d}=e;return t(yy,{"number|Complex, ...number|Complex":(p,h)=>{for(var y=[p,...h];y.length>0&&r(y[y.length-1]);)y.pop();if(y.length<2)throw new RangeError("Polynomial [".concat(p,", ").concat(h,"] must have a non-zero non-constant coefficient"));switch(y.length){case 2:return[l(s(y[0],y[1]))];case 3:{var[b,D,g]=y,x=o(2,g),w=o(D,D),v=o(4,g,b);if(n(w,v))return[s(l(D),x)];var A=u(i(w,v));return[s(i(A,D),x),s(i(l(A),D),x)]}case 4:{var[C,N,E,S]=y,F=l(o(3,S)),k=o(E,E),$=o(3,S,N),_=a(o(2,E,E,E),o(27,S,S,C)),T=o(9,S,E,N);if(n(k,$)&&n(_,T))return[s(E,F)];var z=i(k,$),P=i(_,T),j=a(o(18,S,E,N,C),o(E,E,N,N)),O=a(o(4,E,E,E,C),o(4,S,N,N,N),o(27,S,S,C,C));if(n(j,O))return[s(i(o(4,S,E,N),a(o(9,S,S,C),o(E,E,E))),o(S,z)),s(i(o(9,S,C),o(E,N)),o(2,z))];var Q;n(k,$)?Q=P:Q=s(a(P,u(i(o(P,P),o(4,z,z,z)))),2);var K=!0,U=c(Q,K).toArray().map(V=>s(a(E,V,s(z,V)),F));return U.map(V=>f(V)==="Complex"&&n(d(V),d(V)+m(V))?d(V):V)}default:throw new RangeError("only implemented for cubic or lower-order polynomials, not ".concat(y))}}})}),GV="Help",VV=["evaluate"],UV=B(GV,VV,e=>{var{evaluate:t}=e;function r(n){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");if(!n)throw new Error('Argument "doc" missing');this.doc=n}return r.prototype.type="Help",r.prototype.isHelp=!0,r.prototype.toString=function(){var n=this.doc||{},a=`
|
|
65
|
-
`;if(n.name&&(a+="Name: "+n.name+`
|
|
66
|
-
|
|
67
|
-
`),n.category&&(a+="Category: "+n.category+`
|
|
68
|
-
|
|
69
|
-
`),n.description&&(a+=`Description:
|
|
70
|
-
`+n.description+`
|
|
71
|
-
|
|
72
|
-
`),n.syntax&&(a+=`Syntax:
|
|
73
|
-
`+n.syntax.join(`
|
|
74
|
-
`)+`
|
|
75
|
-
|
|
76
|
-
`),n.examples){a+=`Examples:
|
|
77
|
-
`;for(var i=!1,o=t("config()"),s={config:f=>(i=!0,t("config(newConfig)",{newConfig:f}))},u=0;u<n.examples.length;u++){var l=n.examples[u];a+=" "+l+`
|
|
78
|
-
`;var c=void 0;try{c=t(l,s)}catch(f){c=f}c!==void 0&&!Gw(c)&&(a+=" "+at(c,{precision:14})+`
|
|
79
|
-
`)}a+=`
|
|
80
|
-
`,i&&t("config(originalConfig)",{originalConfig:o})}return n.mayThrow&&n.mayThrow.length&&(a+="Throws: "+n.mayThrow.join(", ")+`
|
|
81
|
-
|
|
82
|
-
`),n.seealso&&n.seealso.length&&(a+="See also: "+n.seealso.join(", ")+`
|
|
83
|
-
`),a},r.prototype.toJSON=function(){var n=Ue(this.doc);return n.mathjs="Help",n},r.fromJSON=function(n){var a={};return Object.keys(n).filter(i=>i!=="mathjs").forEach(i=>{a[i]=n[i]}),new r(a)},r.prototype.valueOf=r.prototype.toString,r},{isClass:!0}),WV="Chain",JV=["?on","math","typed"],KV=B(WV,JV,e=>{var{on:t,math:r,typed:n}=e;function a(l){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");Uw(l)?this.value=l.value:this.value=l}a.prototype.type="Chain",a.prototype.isChain=!0,a.prototype.done=function(){return this.value},a.prototype.valueOf=function(){return this.value},a.prototype.toString=function(){return at(this.value)},a.prototype.toJSON=function(){return{mathjs:"Chain",value:this.value}},a.fromJSON=function(l){return new a(l.value)};function i(l,c){typeof c=="function"&&(a.prototype[l]=s(c))}function o(l,c){U6(a.prototype,l,function(){var m=c();if(typeof m=="function")return s(m)})}function s(l){return function(){if(arguments.length===0)return new a(l(this.value));for(var c=[this.value],f=0;f<arguments.length;f++)c[f+1]=arguments[f];if(n.isTypedFunction(l)){var m=n.resolve(l,c);if(m.params.length===1)throw new Error("chain function "+l.name+" cannot match rest parameter between chain value and additional arguments.");return new a(m.implementation.apply(l,c))}return new a(l.apply(l,c))}}a.createProxy=function(l,c){if(typeof l=="string")i(l,c);else{var f=function(p){Oe(l,p)&&u[p]===void 0&&o(p,()=>l[p])};for(var m in l)f(m)}};var u={expression:!0,docs:!0,type:!0,classes:!0,json:!0,error:!0,isChain:!0};return a.createProxy(r),t&&t("import",function(l,c,f){f||o(l,c)}),a},{isClass:!0}),by={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"]},YV={name:"false",category:"Constants",syntax:["false"],description:"Boolean value false",examples:["false"],seealso:["true"]},ZV={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:[]},QV={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:[]},XV={name:"LN10",category:"Constants",syntax:["LN10"],description:"Returns the natural logarithm of 10, approximately equal to 2.302",examples:["LN10","log(10)"],seealso:[]},eU={name:"LN2",category:"Constants",syntax:["LN2"],description:"Returns the natural logarithm of 2, approximately equal to 0.693",examples:["LN2","log(2)"],seealso:[]},tU={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:[]},rU={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:[]},nU={name:"NaN",category:"Constants",syntax:["NaN"],description:"Not a number",examples:["NaN","0 / 0"],seealso:[]},aU={name:"null",category:"Constants",syntax:["null"],description:"Value null",examples:["null"],seealso:["true","false"]},iU={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:[]},wy={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"]},oU={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:[]},sU={name:"SQRT2",category:"Constants",syntax:["SQRT2"],description:"Returns the square root of 2, approximately equal to 1.414",examples:["SQRT2","sqrt(2)"],seealso:[]},uU={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"]},lU={name:"true",category:"Constants",syntax:["true"],description:"Boolean value true",examples:["true"],seealso:["false"]},cU={name:"version",category:"Constants",syntax:["version"],description:"A string with the version number of math.js",examples:["version"],seealso:[]},fU={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"]},mU={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"]},dU={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"]},hU={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"]},pU={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"]},gU={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"]},vU={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"]},yU={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"]},bU={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"]},wU={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"]},xU={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"]},DU={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"]},NU={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"]},AU={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:[]},CU={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:[]},EU={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:[]},SU={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"]},MU={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"]},TU={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"]},FU={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"]},PU={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"]},kU={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"]},OU={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"]},$U={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"]},_U={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"]},BU={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"]},IU={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"]},zU={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"]},jU={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"]},qU={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"]},RU={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"]},LU={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"]},HU={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"]},GU={name:"abs",category:"Arithmetic",syntax:["abs(x)"],description:"Compute the absolute value.",examples:["abs(3.5)","abs(-4.2)"],seealso:["sign"]},VU={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"]},UU={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"]},WU={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"]},JU={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"]},KU={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"]},YU={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"]},ZU={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"]},QU={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"]},XU={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"]},eW={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"]},tW={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"]},rW={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"]},nW={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"]},aW={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"]},iW={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"]},oW={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"]},sW={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"]},uW={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"]},lW={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"]},cW={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"]},fW={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"]},mW={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"]},dW={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"]},hW={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")']},pW={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"]},gW={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"]},vW={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"]},yW={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"]},bW={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"]},wW={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"]},xW={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"]},DW={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"]},NW={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"]},AW={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"]},CW={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"]},EW={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"]},SW={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"]},MW={name:"unaryPlus",category:"Operators",syntax:["+x","unaryPlus(x)"],description:"Converts booleans and strings to numbers.",examples:["+true",'+"2"'],seealso:["add","subtract","unaryMinus"]},TW={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"]},FW={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"]},PW={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"]},kW={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"]},OW={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"]},$W={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"]},_W={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"]},BW={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"]},IW={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"]},zW={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"]},jW={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"]},qW={name:"stirlingS2",category:"Combinatorics",syntax:["stirlingS2(n, k)"],description:"he 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"]},RW={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"]},LW={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"]},HW={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"]},GW={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"]},VW={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"]},UW={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"]},WW={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"]},JW={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"]},KW={name:"help",category:"Expression",syntax:["help(object)","help(string)"],description:"Display documentation on a function or data type.",examples:["help(sqrt)",'help("complex")'],seealso:[]},YW={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:[]},ZW={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:[]},QW={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"]},XW={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"]},eJ={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"]},tJ={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"]},rJ={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"]},nJ={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"]},aJ={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"]},iJ={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"]},oJ={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"]},sJ={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"]},uJ={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"]},lJ={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"]},cJ={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"]},fJ={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"]},mJ={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"]},dJ={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"]},hJ={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"]},pJ={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"]},gJ={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"]},vJ={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"]},yJ={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"]},bJ={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"]},wJ={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"]},xJ={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"]},DJ={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"]},NJ={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"]},AJ={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"]},CJ={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"]},EJ={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"]},SJ={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"]},MJ={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"]},TJ={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"]},FJ={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"]},PJ={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"]},kJ={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"]},OJ={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"]},$J={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"]},_J={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"]},BJ={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"]},IJ={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"]},zJ={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"]},jJ={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"]},qJ={name:"fft",category:"Matrix",syntax:["fft(x)"],description:"Calculate N-dimensional Fourier transform",examples:["fft([[1, 0], [1, 0]])"],seealso:["ifft"]},RJ={name:"ifft",category:"Matrix",syntax:["ifft(x)"],description:"Calculate N-dimensional inverse Fourier transform",examples:["ifft([[2, 2], [0, 0]])"],seealso:["fft"]},LJ={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"]},HJ={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"]},GJ={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"]},VJ={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"]},UJ={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"]},WJ={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:[]},JJ={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"]},KJ={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"]},YJ={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"]},ZJ={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"]},QJ={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"]},XJ={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"]},eK={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"]},tK={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"]},rK={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"]},nK={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"]},aK={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"]},iK={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"]},oK={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"]},sK={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"]},uK={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"]},lK={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"]},cK={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"]},fK={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"]},mK={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"]},dK={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"]},hK={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"]},pK={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"]},gK={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"]},vK={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"]},yK={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"]},bK={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"]},wK={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:[]},xK={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:[]},DK={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:[]},NK={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:[]},AK={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"]},CK={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"]},EK={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"]},SK={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"]},MK={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"]},TK={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"]},FK={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"]},PK={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.
|
|
84
|
-
|
|
85
|
-
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"]},kK={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"]},OK={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"]},$K={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"]},_K={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"]},BK={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"]},IK={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"]},zK={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"]},jK={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"]},qK={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"]},RK={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"]},LK={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"]},HK={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"]},GK={name:"asech",category:"Trigonometry",syntax:["asech(x)"],description:"Calculate the inverse secant of a value.",examples:["asech(0.5)"],seealso:["acsch","acoth"]},VK={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"]},UK={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"]},WK={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"]},JK={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"]},KK={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"]},YK={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"]},ZK={name:"cosh",category:"Trigonometry",syntax:["cosh(x)"],description:"Compute the hyperbolic cosine of x in radians.",examples:["cosh(0.5)"],seealso:["sinh","tanh","coth"]},QK={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"]},XK={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"]},eY={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"]},tY={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"]},rY={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"]},nY={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"]},aY={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"]},iY={name:"sinh",category:"Trigonometry",syntax:["sinh(x)"],description:"Compute the hyperbolic sine of x in radians.",examples:["sinh(0.5)"],seealso:["cosh","tanh"]},oY={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"]},sY={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"]},uY={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:[]},lY={name:"bin",category:"Utils",syntax:["bin(value)"],description:"Format a number as binary",examples:["bin(2)"],seealso:["oct","hex"]},cY={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:[]},fY={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"]},mY={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"]},dY={name:"hex",category:"Utils",syntax:["hex(value)"],description:"Format a number as hexadecimal",examples:["hex(240)"],seealso:["bin","oct"]},hY={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"]},pY={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"]},gY={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"]},vY={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"]},yY={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"]},bY={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"]},wY={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"]},xY={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"]},DY={name:"oct",category:"Utils",syntax:["oct(value)"],description:"Format a number as octal",examples:["oct(56)"],seealso:["bin","hex"]},NY={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"]},AY={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"]},CY={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"]},EY={bignumber:fU,bigint:mU,boolean:dU,complex:hU,createUnit:pU,fraction:gU,index:vU,matrix:yU,number:bU,sparse:wU,splitUnit:xU,string:DU,unit:NU,e:by,E:by,false:YV,i:ZV,Infinity:QV,LN2:eU,LN10:XV,LOG2E:rU,LOG10E:tU,NaN:nU,null:aU,pi:wy,PI:wy,phi:iU,SQRT1_2:oU,SQRT2:sU,tau:uU,true:lU,version:cU,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:SU,lsolve:TU,lsolveAll:FU,lup:PU,lusolve:kU,leafCount:MU,polynomialRoot:OU,resolve:BU,simplify:IU,simplifyConstant:zU,simplifyCore:jU,symbolicEqual:RU,rationalize:_U,slu:qU,usolve:LU,usolveAll:HU,qr:$U,abs:GU,add:VU,cbrt:UU,ceil:WU,cube:JU,divide:KU,dotDivide:YU,dotMultiply:ZU,dotPow:QU,exp:XU,expm:eW,expm1:tW,fix:rW,floor:nW,gcd:aW,hypot:iW,lcm:sW,log:uW,log2:fW,log1p:cW,log10:lW,mod:mW,multiply:dW,norm:hW,nthRoot:pW,nthRoots:gW,pow:vW,round:yW,sign:bW,sqrt:wW,sqrtm:xW,square:CW,subtract:EW,unaryMinus:SW,unaryPlus:MW,xgcd:TW,invmod:oW,bitAnd:FW,bitNot:PW,bitOr:kW,bitXor:OW,leftShift:$W,rightArithShift:_W,rightLogShift:BW,bellNumbers:IW,catalan:zW,composition:jW,stirlingS2:qW,config:AU,import:CU,typed:EU,arg:RW,conj:LW,re:GW,im:HW,evaluate:VW,help:KW,parse:WW,parser:UW,compile:JW,distance:YW,intersect:ZW,and:QW,not:XW,or:eJ,xor:tJ,mapSlices:rJ,concat:aJ,count:iJ,cross:oJ,column:nJ,ctranspose:sJ,det:uJ,diag:lJ,diff:cJ,dot:fJ,getMatrixDataType:gJ,identity:vJ,filter:dJ,flatten:hJ,forEach:pJ,inv:yJ,pinv:bJ,eigs:mJ,kron:wJ,matrixFromFunction:NJ,matrixFromRows:AJ,matrixFromColumns:DJ,map:xJ,ones:CJ,partitionSelect:EJ,range:SJ,resize:TJ,reshape:MJ,rotate:FJ,rotationMatrix:PJ,row:kJ,size:OJ,sort:$J,squeeze:_J,subset:BJ,trace:IJ,transpose:zJ,zeros:jJ,fft:qJ,ifft:RJ,sylvester:DW,schur:NW,lyap:AW,solveODE:CY,combinations:LJ,combinationsWithRep:HJ,factorial:GJ,gamma:VJ,kldivergence:WJ,lgamma:UJ,multinomial:JJ,permutations:KJ,pickRandom:YJ,random:ZJ,randomInt:QJ,compare:XJ,compareNatural:eK,compareText:tK,deepEqual:rK,equal:nK,equalText:aK,larger:iK,largerEq:oK,smaller:sK,smallerEq:uK,unequal:lK,setCartesian:cK,setDifference:fK,setDistinct:mK,setIntersect:dK,setIsSubset:hK,setMultiplicity:pK,setPowerset:gK,setSize:vK,setSymDifference:yK,setUnion:bK,zpk2tf:wK,freqz:xK,erf:DK,zeta:NK,cumsum:OK,mad:AK,max:CK,mean:EK,median:SK,min:MK,mode:TK,prod:FK,quantileSeq:PK,std:kK,sum:$K,variance:_K,corr:BK,acos:IK,acosh:zK,acot:jK,acoth:qK,acsc:RK,acsch:LK,asec:HK,asech:GK,asin:VK,asinh:UK,atan:WK,atanh:KK,atan2:JK,cos:YK,cosh:ZK,cot:QK,coth:XK,csc:eY,csch:tY,sec:rY,sech:nY,sin:aY,sinh:iY,tan:oY,tanh:sY,to:uY,clone:cY,format:fY,bin:lY,oct:DY,hex:dY,isNaN:pY,isInteger:hY,isNegative:gY,isNumeric:vY,hasNumericValue:mY,isPositive:yY,isPrime:bY,isZero:wY,print:NY,typeOf:AY,numeric:xY},xy="help",SY=["typed","mathWithTransform","Help"],MY=B(xy,SY,e=>{var{typed:t,mathWithTransform:r,Help:n}=e;return t(xy,{any:function(i){var o,s=i;if(typeof i!="string"){for(o in r)if(Oe(r,o)&&i===r[o]){s=o;break}}var u=Lr(EY,s);if(!u){var l=typeof s=="function"?s.name:s;throw new Error('No documentation found on "'+l+'"')}return new n(u)}})}),Dy="chain",TY=["typed","Chain"],FY=B(Dy,TY,e=>{var{typed:t,Chain:r}=e;return t(Dy,{"":function(){return new r},any:function(a){return new r(a)}})}),Ny="det",PY=["typed","matrix","subtractScalar","multiply","divideScalar","isZero","unaryMinus"],kY=B(Ny,PY,e=>{var{typed:t,matrix:r,subtractScalar:n,multiply:a,divideScalar:i,isZero:o,unaryMinus:s}=e;return t(Ny,{any:function(c){return Ue(c)},"Array | Matrix":function(c){var f;switch(je(c)?f=c.size():Array.isArray(c)?(c=r(c),f=c.size()):f=[],f.length){case 0:return Ue(c);case 1:if(f[0]===1)return Ue(c.valueOf()[0]);if(f[0]===0)return 1;throw new RangeError("Matrix must be square (size: "+at(f)+")");case 2:{var m=f[0],d=f[1];if(m===d)return u(c.clone().valueOf(),m);if(d===0)return 1;throw new RangeError("Matrix must be square (size: "+at(f)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+at(f)+")")}}});function u(l,c,f){if(c===1)return Ue(l[0][0]);if(c===2)return n(a(l[0][0],l[1][1]),a(l[1][0],l[0][1]));for(var m=!1,d=new Array(c).fill(0).map((A,C)=>C),p=0;p<c;p++){var h=d[p];if(o(l[h][p])){var y=void 0;for(y=p+1;y<c;y++)if(!o(l[d[y]][p])){h=d[y],d[y]=d[p],d[p]=h,m=!m;break}if(y===c)return l[h][p]}for(var b=l[h][p],D=p===0?1:l[d[p-1]][p-1],g=p+1;g<c;g++)for(var x=d[g],w=p+1;w<c;w++)l[x][w]=i(n(a(l[x][w],b),a(l[x][p],l[h][w])),D)}var v=l[d[c-1]][c-1];return m?s(v):v}}),Ay="inv",OY=["typed","matrix","divideScalar","addScalar","multiply","unaryMinus","det","identity","abs"],$Y=B(Ay,OY,e=>{var{typed:t,matrix:r,divideScalar:n,addScalar:a,multiply:i,unaryMinus:o,det:s,identity:u,abs:l}=e;return t(Ay,{"Array | Matrix":function(m){var d=je(m)?m.size():Ve(m);switch(d.length){case 1:if(d[0]===1)return je(m)?r([n(1,m.valueOf()[0])]):[n(1,m[0])];throw new RangeError("Matrix must be square (size: "+at(d)+")");case 2:{var p=d[0],h=d[1];if(p===h)return je(m)?r(c(m.valueOf(),p,h),m.storage()):c(m,p,h);throw new RangeError("Matrix must be square (size: "+at(d)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+at(d)+")")}},any:function(m){return n(1,m)}});function c(f,m,d){var p,h,y,b,D;if(m===1){if(b=f[0][0],b===0)throw Error("Cannot calculate inverse, determinant is zero");return[[n(1,b)]]}else if(m===2){var g=s(f);if(g===0)throw Error("Cannot calculate inverse, determinant is zero");return[[n(f[1][1],g),n(o(f[0][1]),g)],[n(o(f[1][0]),g),n(f[0][0],g)]]}else{var x=f.concat();for(p=0;p<m;p++)x[p]=x[p].concat();for(var w=u(m).valueOf(),v=0;v<d;v++){var A=l(x[v][v]),C=v;for(p=v+1;p<m;)l(x[p][v])>A&&(A=l(x[p][v]),C=p),p++;if(A===0)throw Error("Cannot calculate inverse, determinant is zero");p=C,p!==v&&(D=x[v],x[v]=x[p],x[p]=D,D=w[v],w[v]=w[p],w[p]=D);var N=x[v],E=w[v];for(p=0;p<m;p++){var S=x[p],F=w[p];if(p!==v){if(S[v]!==0){for(y=n(o(S[v]),N[v]),h=v;h<d;h++)S[h]=a(S[h],i(y,N[h]));for(h=0;h<d;h++)F[h]=a(F[h],i(y,E[h]))}}else{for(y=N[v],h=v;h<d;h++)S[h]=n(S[h],y);for(h=0;h<d;h++)F[h]=n(F[h],y)}}}return w}}}),Cy="pinv",_Y=["typed","matrix","inv","deepEqual","equal","dotDivide","dot","ctranspose","divideScalar","multiply","add","Complex"],BY=B(Cy,_Y,e=>{var{typed:t,matrix:r,inv:n,deepEqual:a,equal:i,dotDivide:o,dot:s,ctranspose:u,divideScalar:l,multiply:c,add:f,Complex:m}=e;return t(Cy,{"Array | Matrix":function(g){var x=je(g)?g.size():Ve(g);switch(x.length){case 1:return b(g)?u(g):x[0]===1?n(g):o(u(g),s(g,g));case 2:{if(b(g))return u(g);var w=x[0],v=x[1];if(w===v)try{return n(g)}catch(A){if(!(A instanceof Error&&A.message.match(/Cannot calculate inverse, determinant is zero/)))throw A}return je(g)?r(d(g.valueOf(),w,v),g.storage()):d(g,w,v)}default:throw new RangeError("Matrix must be two dimensional (size: "+at(x)+")")}},any:function(g){return i(g,0)?Ue(g):l(1,g)}});function d(D,g,x){var{C:w,F:v}=h(D,g,x),A=c(n(c(u(w),w)),u(w)),C=c(u(v),n(c(v,u(v))));return c(C,A)}function p(D,g,x){for(var w=Ue(D),v=0,A=0;A<g;A++){if(x<=v)return w;for(var C=A;y(w[C][v]);)if(C++,g===C&&(C=A,v++,x===v))return w;[w[C],w[A]]=[w[A],w[C]];for(var N=w[A][v],E=0;E<x;E++)w[A][E]=o(w[A][E],N);for(var S=0;S<g;S++)if(S!==A){N=w[S][v];for(var F=0;F<x;F++)w[S][F]=f(w[S][F],c(-1,c(N,w[A][F])))}v++}return w}function h(D,g,x){var w=p(D,g,x),v=D.map((C,N)=>C.filter((E,S)=>S<g&&!y(s(w[S],w[S])))),A=w.filter((C,N)=>!y(s(w[N],w[N])));return{C:v,F:A}}function y(D){return i(f(D,m(1,1)),f(0,m(1,1)))}function b(D){return a(f(D,m(1,1)),f(c(D,0),m(1,1)))}});function IY(e){var{addScalar:t,subtract:r,flatten:n,multiply:a,multiplyScalar:i,divideScalar:o,sqrt:s,abs:u,bignumber:l,diag:c,size:f,reshape:m,inv:d,qr:p,usolve:h,usolveAll:y,equal:b,complex:D,larger:g,smaller:x,matrixFromColumns:w,dot:v}=e;function A(K,U,V,le){var ne=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,ee=C(K,U,V,le,ne);N(K,U,V,le,ne,ee);var{values:L,C:R}=E(K,U,V,le,ne);if(ne){var J=S(K,U,R,ee,L,V,le);return{values:L,eigenvectors:J}}return{values:L}}function C(K,U,V,le,ne){var ee=le==="BigNumber",L=le==="Complex",R=ee?l(0):0,J=ee?l(1):L?D(1):1,re=ee?l(1):1,te=ee?l(10):2,ue=i(te,te),oe;ne&&(oe=Array(U).fill(J));for(var De=!1;!De;){De=!0;for(var q=0;q<U;q++){for(var H=R,Z=R,ae=0;ae<U;ae++)q!==ae&&(H=t(H,u(K[ae][q])),Z=t(Z,u(K[q][ae])));if(!b(H,0)&&!b(Z,0)){for(var he=re,ye=H,Te=o(Z,te),I=i(Z,te);x(ye,Te);)ye=i(ye,ue),he=i(he,te);for(;g(ye,I);)ye=o(ye,ue),he=o(he,te);var Y=x(o(t(ye,Z),he),i(t(H,Z),.95));if(Y){De=!1;for(var X=o(1,he),se=0;se<U;se++)q!==se&&(K[q][se]=i(K[q][se],X),K[se][q]=i(K[se][q],he));ne&&(oe[q]=i(oe[q],X))}}}}return ne?c(oe):null}function N(K,U,V,le,ne,ee){var L=le==="BigNumber",R=le==="Complex",J=L?l(0):R?D(0):0;L&&(V=l(V));for(var re=0;re<U-2;re++){for(var te=0,ue=J,oe=re+1;oe<U;oe++){var De=K[oe][re];x(u(ue),u(De))&&(ue=De,te=oe)}if(!x(u(ue),V)){if(te!==re+1){var q=K[te];K[te]=K[re+1],K[re+1]=q;for(var H=0;H<U;H++){var Z=K[H][te];K[H][te]=K[H][re+1],K[H][re+1]=Z}if(ne){var ae=ee[te];ee[te]=ee[re+1],ee[re+1]=ae}}for(var he=re+2;he<U;he++){var ye=o(K[he][re],ue);if(ye!==0){for(var Te=0;Te<U;Te++)K[he][Te]=r(K[he][Te],i(ye,K[re+1][Te]));for(var I=0;I<U;I++)K[I][re+1]=t(K[I][re+1],i(ye,K[I][he]));if(ne)for(var Y=0;Y<U;Y++)ee[he][Y]=r(ee[he][Y],i(ye,ee[re+1][Y]))}}}}return ee}function E(K,U,V,le,ne){var ee=le==="BigNumber",L=le==="Complex",R=ee?l(1):L?D(1):1;ee&&(V=l(V));for(var J=Ue(K),re=[],te=U,ue=[],oe=ne?c(Array(U).fill(R)):void 0,De=ne?c(Array(te).fill(R)):void 0,q=0;q<=100;){q+=1;for(var H=J[te-1][te-1],Z=0;Z<te;Z++)J[Z][Z]=r(J[Z][Z],H);var{Q:ae,R:he}=p(J);J=a(he,ae);for(var ye=0;ye<te;ye++)J[ye][ye]=t(J[ye][ye],H);if(ne&&(De=a(De,ae)),te===1||x(u(J[te-1][te-2]),V)){q=0,re.push(J[te-1][te-1]),ne&&(ue.unshift([[1]]),$(De,U),oe=a(oe,De),te>1&&(De=c(Array(te-1).fill(R)))),te-=1,J.pop();for(var Te=0;Te<te;Te++)J[Te].pop()}else if(te===2||x(u(J[te-2][te-3]),V)){q=0;var I=F(J[te-2][te-2],J[te-2][te-1],J[te-1][te-2],J[te-1][te-1]);re.push(...I),ne&&(ue.unshift(k(J[te-2][te-2],J[te-2][te-1],J[te-1][te-2],J[te-1][te-1],I[0],I[1],V,le)),$(De,U),oe=a(oe,De),te>2&&(De=c(Array(te-2).fill(R)))),te-=2,J.pop(),J.pop();for(var Y=0;Y<te;Y++)J[Y].pop(),J[Y].pop()}if(te===0)break}if(re.sort((ce,fe)=>+r(u(ce),u(fe))),q>100){var X=Error("The eigenvalues failed to converge. Only found these eigenvalues: "+re.join(", "));throw X.values=re,X.vectors=[],X}var se=ne?a(oe,_(ue,U)):void 0;return{values:re,C:se}}function S(K,U,V,le,ne,ee,L){var R=d(V),J=a(R,K,V),re=L==="BigNumber",te=L==="Complex",ue=re?l(0):te?D(0):0,oe=re?l(1):te?D(1):1,De=[],q=[];for(var H of ne){var Z=T(De,H,b);Z===-1?(De.push(H),q.push(1)):q[Z]+=1}for(var ae=[],he=De.length,ye=Array(U).fill(ue),Te=c(Array(U).fill(oe)),I=function(){var se=De[Y],ce=r(J,a(se,Te)),fe=y(ce,ye);for(fe.shift();fe.length<q[Y];){var Ee=z(ce,U,fe,ee,L);if(Ee===null)break;fe.push(Ee)}var be=a(d(le),V);fe=fe.map(Se=>a(be,Se)),ae.push(...fe.map(Se=>({value:se,vector:n(Se)})))},Y=0;Y<he;Y++)I();return ae}function F(K,U,V,le){var ne=t(K,le),ee=r(i(K,le),i(U,V)),L=i(ne,.5),R=i(s(r(i(ne,ne),i(4,ee))),.5);return[t(L,R),r(L,R)]}function k(K,U,V,le,ne,ee,L,R){var J=R==="BigNumber",re=R==="Complex",te=J?l(0):re?D(0):0,ue=J?l(1):re?D(1):1;if(x(u(V),L))return[[ue,te],[te,ue]];if(g(u(r(ne,ee)),L))return[[r(ne,le),r(ee,le)],[V,V]];var oe=r(K,ne),De=r(le,ne);return x(u(U),L)&&x(u(De),L)?[[oe,ue],[V,te]]:[[U,te],[De,ue]]}function $(K,U){for(var V=0;V<K.length;V++)K[V].push(...Array(U-K[V].length).fill(0));for(var le=K.length;le<U;le++)K.push(Array(U).fill(0)),K[le][le]=1;return K}function _(K,U){for(var V=[],le=0;le<U;le++)V[le]=Array(U).fill(0);var ne=0;for(var ee of K){for(var L=ee.length,R=0;R<L;R++)for(var J=0;J<L;J++)V[ne+R][ne+J]=ee[R][J];ne+=L}return V}function T(K,U,V){for(var le=0;le<K.length;le++)if(V(K[le],U))return le;return-1}function z(K,U,V,le,ne){for(var ee=ne==="BigNumber"?l(1e3):1e3,L,R=0;R<5;++R){L=P(U,V,ne);try{L=h(K,L)}catch{continue}if(g(O(L),ee))break}if(R>=5)return null;for(R=0;;){var J=h(K,L);if(x(O(j(L,[J])),le))break;if(++R>=10)return null;L=Q(J)}return L}function P(K,U,V){var le=V==="BigNumber",ne=V==="Complex",ee=Array(K).fill(0).map(L=>2*Math.random()-1);return le&&(ee=ee.map(L=>l(L))),ne&&(ee=ee.map(L=>D(L))),ee=j(ee,U),Q(ee,V)}function j(K,U){var V=f(K);for(var le of U)le=m(le,V),K=r(K,a(o(v(le,K),v(le,le)),le));return K}function O(K){return u(s(v(K,K)))}function Q(K,U){var V=U==="BigNumber",le=U==="Complex",ne=V?l(1):le?D(1):1;return a(o(ne,O(K)),K)}return A}function zY(e){var{config:t,addScalar:r,subtract:n,abs:a,atan:i,cos:o,sin:s,multiplyScalar:u,inv:l,bignumber:c,multiply:f,add:m}=e;function d(N,E){var S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.relTol,F=arguments.length>3?arguments[3]:void 0,k=arguments.length>4?arguments[4]:void 0;if(F==="number")return p(N,S,k);if(F==="BigNumber")return h(N,S,k);throw TypeError("Unsupported data type: "+F)}function p(N,E,S){var F=N.length,k=Math.abs(E/F),$,_;if(S){_=new Array(F);for(var T=0;T<F;T++)_[T]=Array(F).fill(0),_[T][T]=1}for(var z=v(N);Math.abs(z[1])>=Math.abs(k);){var P=z[0][0],j=z[0][1];$=y(N[P][P],N[j][j],N[P][j]),N=w(N,$,P,j),S&&(_=D(_,$,P,j)),z=v(N)}for(var O=Array(F).fill(0),Q=0;Q<F;Q++)O[Q]=N[Q][Q];return C(Ue(O),_,S)}function h(N,E,S){var F=N.length,k=a(E/F),$,_;if(S){_=new Array(F);for(var T=0;T<F;T++)_[T]=Array(F).fill(0),_[T][T]=1}for(var z=A(N);a(z[1])>=a(k);){var P=z[0][0],j=z[0][1];$=b(N[P][P],N[j][j],N[P][j]),N=x(N,$,P,j),S&&(_=g(_,$,P,j)),z=A(N)}for(var O=Array(F).fill(0),Q=0;Q<F;Q++)O[Q]=N[Q][Q];return C(Ue(O),_,S)}function y(N,E,S){var F=E-N;return Math.abs(F)<=t.relTol?Math.PI/4:.5*Math.atan(2*S/(E-N))}function b(N,E,S){var F=n(E,N);return a(F)<=t.relTol?c(-1).acos().div(4):u(.5,i(f(2,S,l(F))))}function D(N,E,S,F){for(var k=N.length,$=Math.cos(E),_=Math.sin(E),T=Array(k).fill(0),z=Array(k).fill(0),P=0;P<k;P++)T[P]=$*N[P][S]-_*N[P][F],z[P]=_*N[P][S]+$*N[P][F];for(var j=0;j<k;j++)N[j][S]=T[j],N[j][F]=z[j];return N}function g(N,E,S,F){for(var k=N.length,$=o(E),_=s(E),T=Array(k).fill(c(0)),z=Array(k).fill(c(0)),P=0;P<k;P++)T[P]=n(u($,N[P][S]),u(_,N[P][F])),z[P]=r(u(_,N[P][S]),u($,N[P][F]));for(var j=0;j<k;j++)N[j][S]=T[j],N[j][F]=z[j];return N}function x(N,E,S,F){for(var k=N.length,$=c(o(E)),_=c(s(E)),T=u($,$),z=u(_,_),P=Array(k).fill(c(0)),j=Array(k).fill(c(0)),O=f(c(2),$,_,N[S][F]),Q=r(n(u(T,N[S][S]),O),u(z,N[F][F])),K=m(u(z,N[S][S]),O,u(T,N[F][F])),U=0;U<k;U++)P[U]=n(u($,N[S][U]),u(_,N[F][U])),j[U]=r(u(_,N[S][U]),u($,N[F][U]));N[S][S]=Q,N[F][F]=K,N[S][F]=c(0),N[F][S]=c(0);for(var V=0;V<k;V++)V!==S&&V!==F&&(N[S][V]=P[V],N[V][S]=P[V],N[F][V]=j[V],N[V][F]=j[V]);return N}function w(N,E,S,F){for(var k=N.length,$=Math.cos(E),_=Math.sin(E),T=$*$,z=_*_,P=Array(k).fill(0),j=Array(k).fill(0),O=T*N[S][S]-2*$*_*N[S][F]+z*N[F][F],Q=z*N[S][S]+2*$*_*N[S][F]+T*N[F][F],K=0;K<k;K++)P[K]=$*N[S][K]-_*N[F][K],j[K]=_*N[S][K]+$*N[F][K];N[S][S]=O,N[F][F]=Q,N[S][F]=0,N[F][S]=0;for(var U=0;U<k;U++)U!==S&&U!==F&&(N[S][U]=P[U],N[U][S]=P[U],N[F][U]=j[U],N[U][F]=j[U]);return N}function v(N){for(var E=N.length,S=0,F=[0,1],k=0;k<E;k++)for(var $=k+1;$<E;$++)Math.abs(S)<Math.abs(N[k][$])&&(S=Math.abs(N[k][$]),F=[k,$]);return[F,S]}function A(N){for(var E=N.length,S=0,F=[0,1],k=0;k<E;k++)for(var $=k+1;$<E;$++)a(S)<a(N[k][$])&&(S=a(N[k][$]),F=[k,$]);return[F,S]}function C(N,E,S){var F=N.length,k=Array(F),$;if(S){$=Array(F);for(var _=0;_<F;_++)$[_]=Array(F)}for(var T=0;T<F;T++){for(var z=0,P=N[0],j=0;j<N.length;j++)a(N[j])<a(P)&&(z=j,P=N[z]);if(k[T]=N.splice(z,1)[0],S)for(var O=0;O<F;O++)$[T][O]=E[O][z],E[O].splice(z,1)}if(!S)return{values:k};var Q=$.map((K,U)=>({value:k[U],vector:K}));return{values:k,eigenvectors:Q}}return d}var jY="eigs",qY=["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"],RY=B(jY,qY,e=>{var{config:t,typed:r,matrix:n,addScalar:a,subtract:i,equal:o,abs:s,atan:u,cos:l,sin:c,multiplyScalar:f,divideScalar:m,inv:d,bignumber:p,multiply:h,add:y,larger:b,column:D,flatten:g,number:x,complex:w,sqrt:v,diag:A,size:C,reshape:N,qr:E,usolve:S,usolveAll:F,im:k,re:$,smaller:_,matrixFromColumns:T,dot:z}=e,P=zY({config:t,addScalar:a,subtract:i,abs:s,atan:u,cos:l,sin:c,multiplyScalar:f,inv:d,bignumber:p,multiply:h,add:y}),j=IY({addScalar:a,subtract:i,multiply:h,multiplyScalar:f,flatten:g,divideScalar:m,sqrt:v,abs:s,bignumber:p,diag:A,size:C,reshape:N,qr:E,inv:d,usolve:S,usolveAll:F,equal:o,complex:w,larger:b,smaller:_,matrixFromColumns:T,dot:z});return r("eigs",{Array:function(ee){return O(n(ee))},"Array, number|BigNumber":function(ee,L){return O(n(ee),{precision:L})},"Array, Object"(ne,ee){return O(n(ne),ee)},Matrix:function(ee){return O(ee,{matricize:!0})},"Matrix, number|BigNumber":function(ee,L){return O(ee,{precision:L,matricize:!0})},"Matrix, Object":function(ee,L){var R={matricize:!0};return ar(R,L),O(ee,R)}});function O(ne){var ee,L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},R="eigenvectors"in L?L.eigenvectors:!0,J=(ee=L.precision)!==null&&ee!==void 0?ee:t.relTol,re=Q(ne,J,R);return L.matricize&&(re.values=n(re.values),R&&(re.eigenvectors=re.eigenvectors.map(te=>{var{value:ue,vector:oe}=te;return{value:ue,vector:n(oe)}}))),R&&Object.defineProperty(re,"vectors",{enumerable:!1,get:()=>{throw new Error("eigs(M).vectors replaced with eigs(M).eigenvectors")}}),re}function Q(ne,ee,L){var R=ne.toArray(),J=ne.size();if(J.length!==2||J[0]!==J[1])throw new RangeError("Matrix must be square (size: ".concat(at(J),")"));var re=J[0];if(U(R,re,ee)&&(V(R,re),K(R,re,ee))){var te=le(ne,R,re);return P(R,re,ee,te,L)}var ue=le(ne,R,re);return j(R,re,ee,ue,L)}function K(ne,ee,L){for(var R=0;R<ee;R++)for(var J=R;J<ee;J++)if(b(p(s(i(ne[R][J],ne[J][R]))),L))return!1;return!0}function U(ne,ee,L){for(var R=0;R<ee;R++)for(var J=0;J<ee;J++)if(b(p(s(k(ne[R][J]))),L))return!1;return!0}function V(ne,ee){for(var L=0;L<ee;L++)for(var R=0;R<ee;R++)ne[L][R]=$(ne[L][R])}function le(ne,ee,L){var R=ne.datatype();if(R==="number"||R==="BigNumber"||R==="Complex")return R;for(var J=!1,re=!1,te=!1,ue=0;ue<L;ue++)for(var oe=0;oe<L;oe++){var De=ee[ue][oe];if(Ze(De)||Zs(De))J=!0;else if(Qe(De))re=!0;else if(Pa(De))te=!0;else throw TypeError("Unsupported type in Matrix: "+Mt(De))}if(re&&te&&console.warn("Complex BigNumbers not supported, this operation will lose precission."),te){for(var q=0;q<L;q++)for(var H=0;H<L;H++)ee[q][H]=w(ee[q][H]);return"Complex"}if(re){for(var Z=0;Z<L;Z++)for(var ae=0;ae<L;ae++)ee[Z][ae]=p(ee[Z][ae]);return"BigNumber"}if(J){for(var he=0;he<L;he++)for(var ye=0;ye<L;ye++)ee[he][ye]=x(ee[he][ye]);return"number"}else throw TypeError("Matrix contains unsupported types only.")}}),Ey="expm",LY=["typed","abs","add","identity","inv","multiply"],HY=B(Ey,LY,e=>{var{typed:t,abs:r,add:n,identity:a,inv:i,multiply:o}=e;return t(Ey,{Matrix:function(f){var m=f.size();if(m.length!==2||m[0]!==m[1])throw new RangeError("Matrix must be square (size: "+at(m)+")");for(var d=m[0],p=1e-15,h=s(f),y=u(h,p),b=y.q,D=y.j,g=o(f,Math.pow(2,-D)),x=a(d),w=a(d),v=1,A=g,C=-1,N=1;N<=b;N++)N>1&&(A=o(A,g),C=-C),v=v*(b-N+1)/((2*b-N+1)*N),x=n(x,o(v,A)),w=n(w,o(v*C,A));for(var E=o(i(w),x),S=0;S<D;S++)E=o(E,E);return ji(f)?f.createSparseMatrix(E):E}});function s(c){for(var f=c.size()[0],m=0,d=0;d<f;d++){for(var p=0,h=0;h<f;h++)p+=r(c.get([d,h]));m=Math.max(p,m)}return m}function u(c,f){for(var m=30,d=0;d<m;d++)for(var p=0;p<=d;p++){var h=d-p;if(l(c,p,h)<f)return{q:p,j:h}}throw new Error("Could not find acceptable parameters to compute the matrix exponential (try increasing maxSearchSize in expm.js)")}function l(c,f,m){for(var d=1,p=2;p<=f;p++)d*=p;for(var h=d,y=f+1;y<=2*f;y++)h*=y;var b=h*(2*f+1);return 8*Math.pow(c/Math.pow(2,m),2*f)*d*d/(h*b)}}),Sy="sqrtm",GY=["typed","abs","add","multiply","map","sqrt","subtract","inv","size","max","identity"],VY=B(Sy,GY,e=>{var{typed:t,abs:r,add:n,multiply:a,map:i,sqrt:o,subtract:s,inv:u,size:l,max:c,identity:f}=e,m=1e3,d=1e-6;function p(h){var y,b=0,D=h,g=f(l(h));do{var x=D;if(D=a(.5,n(x,u(g))),g=a(.5,n(g,u(x))),y=c(r(s(D,x))),y>d&&++b>m)throw new Error("computing square root of matrix: iterative method could not converge")}while(y>d);return D}return t(Sy,{"Array | Matrix":function(y){var b=je(y)?y.size():Ve(y);switch(b.length){case 1:if(b[0]===1)return i(y,o);throw new RangeError("Matrix must be square (size: "+at(b)+")");case 2:{var D=b[0],g=b[1];if(D===g)return p(y);throw new RangeError("Matrix must be square (size: "+at(b)+")")}default:throw new RangeError("Matrix must be at most two dimensional (size: "+at(b)+")")}}})}),My="sylvester",UY=["typed","schur","matrixFromColumns","matrix","multiply","range","concat","transpose","index","subset","add","subtract","identity","lusolve","abs"],WY=B(My,UY,e=>{var{typed:t,schur:r,matrixFromColumns:n,matrix:a,multiply:i,range:o,concat:s,transpose:u,index:l,subset:c,add:f,subtract:m,identity:d,lusolve:p,abs:h}=e;return t(My,{"Matrix, Matrix, Matrix":y,"Array, Matrix, Matrix":function(D,g,x){return y(a(D),g,x)},"Array, Array, Matrix":function(D,g,x){return y(a(D),a(g),x)},"Array, Matrix, Array":function(D,g,x){return y(a(D),g,a(x))},"Matrix, Array, Matrix":function(D,g,x){return y(D,a(g),x)},"Matrix, Array, Array":function(D,g,x){return y(D,a(g),a(x))},"Matrix, Matrix, Array":function(D,g,x){return y(D,g,a(x))},"Array, Array, Array":function(D,g,x){return y(a(D),a(g),a(x)).toArray()}});function y(b,D,g){for(var x=D.size()[0],w=b.size()[0],v=r(b),A=v.T,C=v.U,N=r(i(-1,D)),E=N.T,S=N.U,F=i(i(u(C),g),S),k=o(0,w),$=[],_=(te,ue)=>s(te,ue,1),T=(te,ue)=>s(te,ue,0),z=0;z<x;z++)if(z<x-1&&h(c(E,l(z+1,z)))>1e-5){for(var P=T(c(F,l(k,z)),c(F,l(k,z+1))),j=0;j<z;j++)P=f(P,T(i($[j],c(E,l(j,z))),i($[j],c(E,l(j,z+1)))));var O=i(d(w),i(-1,c(E,l(z,z)))),Q=i(d(w),i(-1,c(E,l(z+1,z)))),K=i(d(w),i(-1,c(E,l(z,z+1)))),U=i(d(w),i(-1,c(E,l(z+1,z+1)))),V=T(_(f(A,O),Q),_(K,f(A,U))),le=p(V,P);$[z]=le.subset(l(o(0,w),0)),$[z+1]=le.subset(l(o(w,2*w),0)),z++}else{for(var ne=c(F,l(k,z)),ee=0;ee<z;ee++)ne=f(ne,i($[ee],c(E,l(ee,z))));var L=c(E,l(z,z)),R=m(A,i(L,d(w)));$[z]=p(R,ne)}var J=a(n(...$)),re=i(C,i(J,u(S)));return re}}),Ty="schur",JY=["typed","matrix","identity","multiply","qr","norm","subtract"],KY=B(Ty,JY,e=>{var{typed:t,matrix:r,identity:n,multiply:a,qr:i,norm:o,subtract:s}=e;return t(Ty,{Array:function(c){var f=u(r(c));return{U:f.U.valueOf(),T:f.T.valueOf()}},Matrix:function(c){return u(c)}});function u(l){var c=l.size()[0],f=l,m=n(c),d=0,p;do{p=f;var h=i(f),y=h.Q,b=h.R;if(f=a(b,y),m=a(m,y),d++>100)break}while(o(s(f,p))>1e-4);return{U:m,T:f}}}),Fy="lyap",YY=["typed","matrix","sylvester","multiply","transpose"],ZY=B(Fy,YY,e=>{var{typed:t,matrix:r,sylvester:n,multiply:a,transpose:i}=e;return t(Fy,{"Matrix, Matrix":function(s,u){return n(s,i(s),a(-1,u))},"Array, Matrix":function(s,u){return n(r(s),i(r(s)),a(-1,u))},"Matrix, Array":function(s,u){return n(s,i(r(s)),r(a(-1,u)))},"Array, Array":function(s,u){return n(r(s),i(r(s)),r(a(-1,u))).toArray()}})}),QY="divide",XY=["typed","matrix","multiply","equalScalar","divideScalar","inv"],eZ=B(QY,XY,e=>{var{typed:t,matrix:r,multiply:n,equalScalar:a,divideScalar:i,inv:o}=e,s=Cr({typed:t,equalScalar:a}),u=Kn({typed:t});return t("divide",Ww({"Array | Matrix, Array | Matrix":function(c,f){return n(c,o(f))},"DenseMatrix, any":function(c,f){return u(c,f,i,!1)},"SparseMatrix, any":function(c,f){return s(c,f,i,!1)},"Array, any":function(c,f){return u(r(c),f,i,!1).valueOf()},"any, Array | Matrix":function(c,f){return n(c,o(f))}},i.signatures))}),Py="distance",tZ=["typed","addScalar","subtractScalar","divideScalar","multiplyScalar","deepEqual","sqrt","abs"],rZ=B(Py,tZ,e=>{var{typed:t,addScalar:r,subtractScalar:n,multiplyScalar:a,divideScalar:i,deepEqual:o,sqrt:s,abs:u}=e;return t(Py,{"Array, Array, Array":function(w,v,A){if(w.length===2&&v.length===2&&A.length===2){if(!c(w))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!c(v))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!c(A))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(o(v,A))throw new TypeError("LinePoint1 should not be same with LinePoint2");var C=n(A[1],v[1]),N=n(v[0],A[0]),E=n(a(A[0],v[1]),a(v[0],A[1]));return y(w[0],w[1],C,N,E)}else throw new TypeError("Invalid Arguments: Try again")},"Object, Object, Object":function(w,v,A){if(Object.keys(w).length===2&&Object.keys(v).length===2&&Object.keys(A).length===2){if(!c(w))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!c(v))throw new TypeError("Values of lineOnePtX and lineOnePtY should be numbers or BigNumbers");if(!c(A))throw new TypeError("Values of lineTwoPtX and lineTwoPtY should be numbers or BigNumbers");if(o(p(v),p(A)))throw new TypeError("LinePoint1 should not be same with LinePoint2");if("pointX"in w&&"pointY"in w&&"lineOnePtX"in v&&"lineOnePtY"in v&&"lineTwoPtX"in A&&"lineTwoPtY"in A){var C=n(A.lineTwoPtY,v.lineOnePtY),N=n(v.lineOnePtX,A.lineTwoPtX),E=n(a(A.lineTwoPtX,v.lineOnePtY),a(v.lineOnePtX,A.lineTwoPtY));return y(w.pointX,w.pointY,C,N,E)}else throw new TypeError("Key names do not match")}else throw new TypeError("Invalid Arguments: Try again")},"Array, Array":function(w,v){if(w.length===2&&v.length===3){if(!c(w))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!f(v))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");return y(w[0],w[1],v[0],v[1],v[2])}else if(w.length===3&&v.length===6){if(!f(w))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!d(v))throw new TypeError("Array with 6 numbers or BigNumbers expected for second argument");return b(w[0],w[1],w[2],v[0],v[1],v[2],v[3],v[4],v[5])}else if(w.length===v.length&&w.length>0){if(!m(w))throw new TypeError("All values of an array should be numbers or BigNumbers");if(!m(v))throw new TypeError("All values of an array should be numbers or BigNumbers");return D(w,v)}else throw new TypeError("Invalid Arguments: Try again")},"Object, Object":function(w,v){if(Object.keys(w).length===2&&Object.keys(v).length===3){if(!c(w))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!f(v))throw new TypeError("Values of xCoeffLine, yCoeffLine and constant should be numbers or BigNumbers");if("pointX"in w&&"pointY"in w&&"xCoeffLine"in v&&"yCoeffLine"in v&&"constant"in v)return y(w.pointX,w.pointY,v.xCoeffLine,v.yCoeffLine,v.constant);throw new TypeError("Key names do not match")}else if(Object.keys(w).length===3&&Object.keys(v).length===6){if(!f(w))throw new TypeError("Values of pointX, pointY and pointZ should be numbers or BigNumbers");if(!d(v))throw new TypeError("Values of x0, y0, z0, a, b and c should be numbers or BigNumbers");if("pointX"in w&&"pointY"in w&&"x0"in v&&"y0"in v&&"z0"in v&&"a"in v&&"b"in v&&"c"in v)return b(w.pointX,w.pointY,w.pointZ,v.x0,v.y0,v.z0,v.a,v.b,v.c);throw new TypeError("Key names do not match")}else if(Object.keys(w).length===2&&Object.keys(v).length===2){if(!c(w))throw new TypeError("Values of pointOneX and pointOneY should be numbers or BigNumbers");if(!c(v))throw new TypeError("Values of pointTwoX and pointTwoY should be numbers or BigNumbers");if("pointOneX"in w&&"pointOneY"in w&&"pointTwoX"in v&&"pointTwoY"in v)return D([w.pointOneX,w.pointOneY],[v.pointTwoX,v.pointTwoY]);throw new TypeError("Key names do not match")}else if(Object.keys(w).length===3&&Object.keys(v).length===3){if(!f(w))throw new TypeError("Values of pointOneX, pointOneY and pointOneZ should be numbers or BigNumbers");if(!f(v))throw new TypeError("Values of pointTwoX, pointTwoY and pointTwoZ should be numbers or BigNumbers");if("pointOneX"in w&&"pointOneY"in w&&"pointOneZ"in w&&"pointTwoX"in v&&"pointTwoY"in v&&"pointTwoZ"in v)return D([w.pointOneX,w.pointOneY,w.pointOneZ],[v.pointTwoX,v.pointTwoY,v.pointTwoZ]);throw new TypeError("Key names do not match")}else throw new TypeError("Invalid Arguments: Try again")},Array:function(w){if(!h(w))throw new TypeError("Incorrect array format entered for pairwise distance calculation");return g(w)}});function l(x){return typeof x=="number"||Qe(x)}function c(x){return x.constructor!==Array&&(x=p(x)),l(x[0])&&l(x[1])}function f(x){return x.constructor!==Array&&(x=p(x)),l(x[0])&&l(x[1])&&l(x[2])}function m(x){return Array.isArray(x)||(x=p(x)),x.every(l)}function d(x){return x.constructor!==Array&&(x=p(x)),l(x[0])&&l(x[1])&&l(x[2])&&l(x[3])&&l(x[4])&&l(x[5])}function p(x){for(var w=Object.keys(x),v=[],A=0;A<w.length;A++)v.push(x[w[A]]);return v}function h(x){if(x[0].length===2&&l(x[0][0])&&l(x[0][1])){if(x.some(w=>w.length!==2||!l(w[0])||!l(w[1])))return!1}else if(x[0].length===3&&l(x[0][0])&&l(x[0][1])&&l(x[0][2])){if(x.some(w=>w.length!==3||!l(w[0])||!l(w[1])||!l(w[2])))return!1}else return!1;return!0}function y(x,w,v,A,C){var N=u(r(r(a(v,x),a(A,w)),C)),E=s(r(a(v,v),a(A,A)));return i(N,E)}function b(x,w,v,A,C,N,E,S,F){var k=[n(a(n(C,w),F),a(n(N,v),S)),n(a(n(N,v),E),a(n(A,x),F)),n(a(n(A,x),S),a(n(C,w),E))];k=s(r(r(a(k[0],k[0]),a(k[1],k[1])),a(k[2],k[2])));var $=s(r(r(a(E,E),a(S,S)),a(F,F)));return i(k,$)}function D(x,w){for(var v=x.length,A=0,C=0,N=0;N<v;N++)C=n(x[N],w[N]),A=r(a(C,C),A);return s(A)}function g(x){for(var w=[],v=[],A=[],C=0;C<x.length-1;C++)for(var N=C+1;N<x.length;N++)x[0].length===2?(v=[x[C][0],x[C][1]],A=[x[N][0],x[N][1]]):x[0].length===3&&(v=[x[C][0],x[C][1],x[C][2]],A=[x[N][0],x[N][1],x[N][2]]),w.push(D(v,A));return w}}),nZ="intersect",aZ=["typed","config","abs","add","addScalar","matrix","multiply","multiplyScalar","divideScalar","subtract","smaller","equalScalar","flatten","isZero","isNumeric"],iZ=B(nZ,aZ,e=>{var{typed:t,config:r,abs:n,add:a,addScalar:i,matrix:o,multiply:s,multiplyScalar:u,divideScalar:l,subtract:c,smaller:f,equalScalar:m,flatten:d,isZero:p,isNumeric:h}=e;return t("intersect",{"Array, Array, Array":y,"Array, Array, Array, Array":b,"Matrix, Matrix, Matrix":function(S,F,k){var $=y(S.valueOf(),F.valueOf(),k.valueOf());return $===null?null:o($)},"Matrix, Matrix, Matrix, Matrix":function(S,F,k,$){var _=b(S.valueOf(),F.valueOf(),k.valueOf(),$.valueOf());return _===null?null:o(_)}});function y(E,S,F){if(E=D(E),S=D(S),F=D(F),!x(E))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!x(S))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!w(F))throw new TypeError("Array with 4 numbers expected as third argument");return N(E[0],E[1],E[2],S[0],S[1],S[2],F[0],F[1],F[2],F[3])}function b(E,S,F,k){if(E=D(E),S=D(S),F=D(F),k=D(k),E.length===2){if(!g(E))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!g(S))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!g(F))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(!g(k))throw new TypeError("Array with 2 numbers or BigNumbers expected for fourth argument");return v(E,S,F,k)}else if(E.length===3){if(!x(E))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!x(S))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!x(F))throw new TypeError("Array with 3 numbers or BigNumbers expected for third argument");if(!x(k))throw new TypeError("Array with 3 numbers or BigNumbers expected for fourth argument");return C(E[0],E[1],E[2],S[0],S[1],S[2],F[0],F[1],F[2],k[0],k[1],k[2])}else throw new TypeError("Arrays with two or thee dimensional points expected")}function D(E){return E.length===1?E[0]:E.length>1&&Array.isArray(E[0])&&E.every(S=>Array.isArray(S)&&S.length===1)?d(E):E}function g(E){return E.length===2&&h(E[0])&&h(E[1])}function x(E){return E.length===3&&h(E[0])&&h(E[1])&&h(E[2])}function w(E){return E.length===4&&h(E[0])&&h(E[1])&&h(E[2])&&h(E[3])}function v(E,S,F,k){var $=E,_=F,T=c($,S),z=c(_,k),P=c(u(T[0],z[1]),u(z[0],T[1]));if(p(P)||f(n(P),r.relTol))return null;var j=u(z[0],$[1]),O=u(z[1],$[0]),Q=u(z[0],_[1]),K=u(z[1],_[0]),U=l(i(c(c(j,O),Q),K),P);return a(s(T,U),$)}function A(E,S,F,k,$,_,T,z,P,j,O,Q){var K=u(c(E,S),c(F,k)),U=u(c($,_),c(T,z)),V=u(c(P,j),c(O,Q));return i(i(K,U),V)}function C(E,S,F,k,$,_,T,z,P,j,O,Q){var K=A(E,T,j,T,S,z,O,z,F,P,Q,P),U=A(j,T,k,E,O,z,$,S,Q,P,_,F),V=A(E,T,k,E,S,z,$,S,F,P,_,F),le=A(j,T,j,T,O,z,O,z,Q,P,Q,P),ne=A(k,E,k,E,$,S,$,S,_,F,_,F),ee=c(u(K,U),u(V,le)),L=c(u(ne,le),u(U,U));if(p(L))return null;var R=l(ee,L),J=l(i(K,u(R,U)),le),re=i(E,u(R,c(k,E))),te=i(S,u(R,c($,S))),ue=i(F,u(R,c(_,F))),oe=i(T,u(J,c(j,T))),De=i(z,u(J,c(O,z))),q=i(P,u(J,c(Q,P)));return m(re,oe)&&m(te,De)&&m(ue,q)?[re,te,ue]:null}function N(E,S,F,k,$,_,T,z,P,j){var O=u(E,T),Q=u(k,T),K=u(S,z),U=u($,z),V=u(F,P),le=u(_,P),ne=c(c(c(j,O),K),V),ee=c(c(c(i(i(Q,U),le),O),K),V),L=l(ne,ee),R=i(E,u(L,c(k,E))),J=i(S,u(L,c($,S))),re=i(F,u(L,c(_,F)));return[R,J,re]}}),ky="sum",oZ=["typed","config","add","numeric"],z2=B(ky,oZ,e=>{var{typed:t,config:r,add:n,numeric:a}=e;return t(ky,{"Array | Matrix":i,"Array | Matrix, number | BigNumber":o,"...":function(u){if(Zo(u))throw new TypeError("Scalar values expected in function sum");return i(u)}});function i(s){var u;return ci(s,function(l){try{u=u===void 0?l:n(u,l)}catch(c){throw Vr(c,"sum",l)}}),u===void 0&&(u=a(0,r.number)),typeof u=="string"&&(u=a(u,mi(u,r))),u}function o(s,u){try{var l=bc(s,u,n);return l}catch(c){throw Vr(c,"sum")}}}),dl="cumsum",sZ=["typed","add","unaryPlus"],j2=B(dl,sZ,e=>{var{typed:t,add:r,unaryPlus:n}=e;return t(dl,{Array:a,Matrix:function(l){return l.create(a(l.valueOf(),l.datatype()))},"Array, number | BigNumber":o,"Matrix, number | BigNumber":function(l,c){return l.create(o(l.valueOf(),c),l.datatype())},"...":function(l){if(Zo(l))throw new TypeError("All values expected to be scalar in function cumsum");return a(l)}});function a(u){try{return i(u)}catch(l){throw Vr(l,dl)}}function i(u){if(u.length===0)return[];for(var l=[n(u[0])],c=1;c<u.length;++c)l.push(r(l[c-1],u[c]));return l}function o(u,l){var c=Ve(u);if(l<0||l>=c.length)throw new Wn(l,c.length);try{return s(u,l)}catch(f){throw Vr(f,dl)}}function s(u,l){var c,f,m;if(l<=0){var d=u[0][0];if(Array.isArray(d)){for(m=xx(u),f=[],c=0;c<m.length;c++)f[c]=s(m[c],l-1);return f}else return i(u)}else{for(f=[],c=0;c<u.length;c++)f[c]=s(u[c],l-1);return f}}}),Oy="mean",uZ=["typed","add","divide"],q2=B(Oy,uZ,e=>{var{typed:t,add:r,divide:n}=e;return t(Oy,{"Array | Matrix":i,"Array | Matrix, number | BigNumber":a,"...":function(s){if(Zo(s))throw new TypeError("Scalar values expected in function mean");return i(s)}});function a(o,s){try{var u=bc(o,s,r),l=Array.isArray(o)?Ve(o):o.size();return n(u,l[s])}catch(c){throw Vr(c,"mean")}}function i(o){var s,u=0;if(ci(o,function(l){try{s=s===void 0?l:r(s,l),u++}catch(c){throw Vr(c,"mean",l)}}),u===0)throw new Error("Cannot calculate the mean of an empty array");return n(s,u)}}),$y="median",lZ=["typed","add","divide","compare","partitionSelect"],cZ=B($y,lZ,e=>{var{typed:t,add:r,divide:n,compare:a,partitionSelect:i}=e;function o(l){try{l=mt(l.valueOf());var c=l.length;if(c===0)throw new Error("Cannot calculate median of an empty array");if(c%2===0){for(var f=c/2-1,m=i(l,f+1),d=l[f],p=0;p<f;++p)a(l[p],d)>0&&(d=l[p]);return u(d,m)}else{var h=i(l,(c-1)/2);return s(h)}}catch(y){throw Vr(y,"median")}}var s=t({"number | BigNumber | Complex | Unit":function(c){return c}}),u=t({"number | BigNumber | Complex | Unit, number | BigNumber | Complex | Unit":function(c,f){return n(r(c,f),2)}});return t($y,{"Array | Matrix":o,"Array | Matrix, number | BigNumber":function(c,f){throw new Error("median(A, dim) is not yet supported")},"...":function(c){if(Zo(c))throw new TypeError("Scalar values expected in function median");return o(c)}})}),_y="mad",fZ=["typed","abs","map","median","subtract"],mZ=B(_y,fZ,e=>{var{typed:t,abs:r,map:n,median:a,subtract:i}=e;return t(_y,{"Array | Matrix":o,"...":function(u){return o(u)}});function o(s){if(s=mt(s.valueOf()),s.length===0)throw new Error("Cannot calculate median absolute deviation (mad) of an empty array");try{var u=a(s);return a(n(s,function(l){return r(i(l,u))}))}catch(l){throw l instanceof TypeError&&l.message.includes("median")?new TypeError(l.message.replace("median","mad")):Vr(l,"mad")}}}),$f="unbiased",By="variance",dZ=["typed","add","subtract","multiply","divide","mapSlices","isNaN"],R2=B(By,dZ,e=>{var{typed:t,add:r,subtract:n,multiply:a,divide:i,mapSlices:o,isNaN:s}=e;return t(By,{"Array | Matrix":function(f){return u(f,$f)},"Array | Matrix, string":u,"Array | Matrix, number | BigNumber":function(f,m){return l(f,m,$f)},"Array | Matrix, number | BigNumber, string":l,"...":function(f){return u(f,$f)}});function u(c,f){var m,d=0;if(c.length===0)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");if(ci(c,function(y){try{m=m===void 0?y:r(m,y),d++}catch(b){throw Vr(b,"variance",y)}}),d===0)throw new Error("Cannot calculate variance of an empty array");var p=i(m,d);if(m=void 0,ci(c,function(y){var b=n(y,p);m=m===void 0?a(b,b):r(m,a(b,b))}),s(m))return m;switch(f){case"uncorrected":return i(m,d);case"biased":return i(m,d+1);case"unbiased":{var h=Qe(m)?m.mul(0):0;return d===1?h:i(m,d-1)}default:throw new Error('Unknown normalization "'+f+'". Choose "unbiased" (default), "uncorrected", or "biased".')}}function l(c,f,m){try{if(c.length===0)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");return o(c,f,d=>u(d,m))}catch(d){throw Vr(d,"variance")}}}),Iy="quantileSeq",hZ=["typed","?bignumber","add","subtract","divide","multiply","partitionSelect","compare","isInteger","smaller","smallerEq","larger","mapSlices"],L2=B(Iy,hZ,e=>{var{typed:t,bignumber:r,add:n,subtract:a,divide:i,multiply:o,partitionSelect:s,compare:u,isInteger:l,smaller:c,smallerEq:f,larger:m,mapSlices:d}=e;return t(Iy,{"Array | Matrix, number | BigNumber":(D,g)=>h(D,g,!1),"Array | Matrix, number | BigNumber, number":(D,g,x)=>p(D,g,!1,x,h),"Array | Matrix, number | BigNumber, boolean":h,"Array | Matrix, number | BigNumber, boolean, number":(D,g,x,w)=>p(D,g,x,w,h),"Array | Matrix, Array | Matrix":(D,g)=>y(D,g,!1),"Array | Matrix, Array | Matrix, number":(D,g,x)=>p(D,g,!1,x,y),"Array | Matrix, Array | Matrix, boolean":y,"Array | Matrix, Array | Matrix, boolean, number":(D,g,x,w)=>p(D,g,x,w,y)});function p(D,g,x,w,v){return d(D,w,A=>v(A,g,x))}function h(D,g,x){var w,v=D.valueOf();if(c(g,0))throw new Error("N/prob must be non-negative");if(f(g,1))return Ze(g)?b(v,g,x):r(b(v,g,x));if(m(g,1)){if(!l(g))throw new Error("N must be a positive integer");if(m(g,4294967295))throw new Error("N must be less than or equal to 2^32-1, as that is the maximum length of an Array");var A=n(g,1);w=[];for(var C=0;c(C,g);C++){var N=i(C+1,A);w.push(b(v,N,x))}return Ze(g)?w:r(w)}}function y(D,g,x){for(var w=D.valueOf(),v=g.valueOf(),A=[],C=0;C<v.length;++C)A.push(b(w,v[C],x));return A}function b(D,g,x){var w=mt(D),v=w.length;if(v===0)throw new Error("Cannot calculate quantile of an empty sequence");var A=Ze(g)?g*(v-1):g.times(v-1),C=Ze(g)?Math.floor(A):A.floor().toNumber(),N=Ze(g)?A%1:A.minus(C);if(l(A))return x?w[A]:s(w,Ze(g)?A:A.valueOf());var E,S;if(x)E=w[C],S=w[C+1];else{S=s(w,C+1),E=w[C];for(var F=0;F<C;++F)u(w[F],E)>0&&(E=w[F])}return n(o(E,a(1,N)),o(S,N))}}),zy="std",pZ=["typed","map","sqrt","variance"],H2=B(zy,pZ,e=>{var{typed:t,map:r,sqrt:n,variance:a}=e;return t(zy,{"Array | Matrix":i,"Array | Matrix, string":i,"Array | Matrix, number | BigNumber":i,"Array | Matrix, number | BigNumber, string":i,"...":function(s){return i(s)}});function i(o,s){if(o.length===0)throw new SyntaxError("Function std requires one or more parameters (0 provided)");try{var u=a.apply(null,arguments);return Mn(u)?r(u,n):n(u)}catch(l){throw l instanceof TypeError&&l.message.includes(" variance")?new TypeError(l.message.replace(" variance"," std")):l}}}),jy="corr",gZ=["typed","matrix","mean","sqrt","sum","add","subtract","multiply","pow","divide"],vZ=B(jy,gZ,e=>{var{typed:t,matrix:r,sqrt:n,sum:a,add:i,subtract:o,multiply:s,pow:u,divide:l}=e;return t(jy,{"Array, Array":function(d,p){return c(d,p)},"Matrix, Matrix":function(d,p){var h=c(d.toArray(),p.toArray());return Array.isArray(h)?r(h):h}});function c(m,d){var p=[];if(Array.isArray(m[0])&&Array.isArray(d[0])){if(m.length!==d.length)throw new SyntaxError("Dimension mismatch. Array A and B must have the same length.");for(var h=0;h<m.length;h++){if(m[h].length!==d[h].length)throw new SyntaxError("Dimension mismatch. Array A and B must have the same number of elements.");p.push(f(m[h],d[h]))}return p}else{if(m.length!==d.length)throw new SyntaxError("Dimension mismatch. Array A and B must have the same number of elements.");return f(m,d)}}function f(m,d){var p=m.length,h=a(m),y=a(d),b=m.reduce((v,A,C)=>i(v,s(A,d[C])),0),D=a(m.map(v=>u(v,2))),g=a(d.map(v=>u(v,2))),x=o(s(p,b),s(h,y)),w=n(s(o(s(p,D),u(h,2)),o(s(p,g),u(y,2))));return l(x,w)}}),qy="combinations",yZ=["typed"],bZ=B(qy,yZ,e=>{var{typed:t}=e;return t(qy,{"number, number":Lx,"BigNumber, BigNumber":function(n,a){var i=n.constructor,o,s,u=n.minus(a),l=new i(1);if(!Ry(n)||!Ry(a))throw new TypeError("Positive integer value expected in function combinations");if(a.gt(n))throw new TypeError("k must be less than n in function combinations");if(o=l,a.lt(u))for(s=l;s.lte(u);s=s.plus(l))o=o.times(a.plus(s)).dividedBy(s);else for(s=l;s.lte(a);s=s.plus(l))o=o.times(u.plus(s)).dividedBy(s);return o}})});function Ry(e){return e.isInteger()&&e.gte(0)}var Ly="combinationsWithRep",wZ=["typed"],xZ=B(Ly,wZ,e=>{var{typed:t}=e;return t(Ly,{"number, number":function(n,a){if(!$e(n)||n<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(!$e(a)||a<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(n<1)throw new TypeError("k must be less than or equal to n + k - 1");if(a<n-1){var i=Fa(n,n+a-1);return i/Fa(1,a)}var o=Fa(a+1,n+a-1);return o/Fa(1,n-1)},"BigNumber, BigNumber":function(n,a){var i=n.constructor,o,s,u=new i(1),l=n.minus(u);if(!Hy(n)||!Hy(a))throw new TypeError("Positive integer value expected in function combinationsWithRep");if(n.lt(u))throw new TypeError("k must be less than or equal to n + k - 1 in function combinationsWithRep");if(o=u,a.lt(l))for(s=u;s.lte(l);s=s.plus(u))o=o.times(a.plus(s)).dividedBy(s);else for(s=u;s.lte(a);s=s.plus(u))o=o.times(l.plus(s)).dividedBy(s);return o}})});function Hy(e){return e.isInteger()&&e.gte(0)}var Gy="gamma",DZ=["typed","config","multiplyScalar","pow","BigNumber","Complex"],NZ=B(Gy,DZ,e=>{var{typed:t,config:r,multiplyScalar:n,pow:a,BigNumber:i,Complex:o}=e;function s(l){if(l.im===0)return Ul(l.re);if(l.re<.5){var c=new o(1-l.re,-l.im),f=new o(Math.PI*l.re,Math.PI*l.im);return new o(Math.PI).div(f.sin()).div(s(c))}l=new o(l.re-1,l.im);for(var m=new o(Bo[0],0),d=1;d<Bo.length;++d){var p=new o(Bo[d],0);m=m.add(p.div(l.add(d)))}var h=new o(l.re+Gx+.5,l.im),y=Math.sqrt(2*Math.PI),b=h.pow(l.add(.5)),D=h.neg().exp();return m.mul(y).mul(b).mul(D)}return t(Gy,{number:Ul,Complex:s,BigNumber:function(c){if(c.isInteger())return c.isNegative()||c.isZero()?new i(1/0):u(c.minus(1));if(!c.isFinite())return new i(c.isNegative()?NaN:1/0);throw new Error("Integer BigNumber expected")}});function u(l){if(l<8)return new i([1,1,2,6,24,120,720,5040][l]);var c=r.precision+(Math.log(l.toNumber())|0),f=i.clone({precision:c});if(l%2===1)return l.times(u(new i(l-1)));for(var m=l,d=new f(l),p=l.toNumber();m>2;)m-=2,p+=m,d=d.times(p);return new i(d.toPrecision(i.precision))}}),Vy="lgamma",AZ=["Complex","typed"],CZ=B(Vy,AZ,e=>{var{Complex:t,typed:r}=e,n=7,a=7,i=[-.029550653594771242,.00641025641025641,-.0019175269175269176,.0008417508417508417,-.0005952380952380953,.0007936507936507937,-.002777777777777778,.08333333333333333];return r(Vy,{number:Wl,Complex:o,BigNumber:function(){throw new Error("mathjs doesn't yet provide an implementation of the algorithm lgamma for BigNumber")}});function o(l){var c=6.283185307179586,f=1.1447298858494002,m=.1;if(l.isNaN())return new t(NaN,NaN);if(l.im===0)return new t(Wl(l.re),0);if(l.re>=n||Math.abs(l.im)>=a)return s(l);if(l.re<=m){var d=d9(c,l.im)*Math.floor(.5*l.re+.25),p=l.mul(Math.PI).sin().log(),h=o(new t(1-l.re,-l.im));return new t(f,d).sub(p).sub(h)}else return l.im>=0?u(l):u(l.conjugate()).conjugate()}function s(l){for(var c=l.sub(.5).mul(l.log()).sub(l).add(Vx),f=new t(1,0).div(l),m=f.div(l),d=i[0],p=i[1],h=2*m.re,y=m.re*m.re+m.im*m.im,b=2;b<8;b++){var D=p;p=-y*d+i[b],d=h*d+D}var g=f.mul(m.mul(d).add(p));return c.add(g)}function u(l){var c=0,f=0,m=l;for(l=l.add(1);l.re<=n;){m=m.mul(l);var d=m.im<0?1:0;d!==0&&f===0&&c++,f=d,l=l.add(1)}return s(l).sub(m.log()).sub(new t(0,c*2*Math.PI*1))}}),Uy="factorial",EZ=["typed","gamma"],SZ=B(Uy,EZ,e=>{var{typed:t,gamma:r}=e;return t(Uy,{number:function(a){if(a<0)throw new Error("Value must be non-negative");return r(a+1)},BigNumber:function(a){if(a.isNegative())throw new Error("Value must be non-negative");return r(a.plus(1))},"Array | Matrix":t.referToSelf(n=>a=>Xe(a,n))})}),Wy="kldivergence",MZ=["typed","matrix","divide","sum","multiply","map","dotDivide","log","isNumeric"],TZ=B(Wy,MZ,e=>{var{typed:t,matrix:r,divide:n,sum:a,multiply:i,map:o,dotDivide:s,log:u,isNumeric:l}=e;return t(Wy,{"Array, Array":function(m,d){return c(r(m),r(d))},"Matrix, Array":function(m,d){return c(m,r(d))},"Array, Matrix":function(m,d){return c(r(m),d)},"Matrix, Matrix":function(m,d){return c(m,d)}});function c(f,m){var d=m.size().length,p=f.size().length;if(d>1)throw new Error("first object must be one dimensional");if(p>1)throw new Error("second object must be one dimensional");if(d!==p)throw new Error("Length of two vectors must be equal");var h=a(f);if(h===0)throw new Error("Sum of elements in first object must be non zero");var y=a(m);if(y===0)throw new Error("Sum of elements in second object must be non zero");var b=n(f,a(f)),D=n(m,a(m)),g=a(i(b,o(s(b,D),x=>u(x))));return l(g)?g:Number.NaN}}),Jy="multinomial",FZ=["typed","add","divide","multiply","factorial","isInteger","isPositive"],PZ=B(Jy,FZ,e=>{var{typed:t,add:r,divide:n,multiply:a,factorial:i,isInteger:o,isPositive:s}=e;return t(Jy,{"Array | Matrix":function(l){var c=0,f=1;return ci(l,function(m){if(!o(m)||!s(m))throw new TypeError("Positive integer value expected in function multinomial");c=r(c,m),f=a(f,i(m))}),n(i(c),f)}})}),Ky="permutations",kZ=["typed","factorial"],OZ=B(Ky,kZ,e=>{var{typed:t,factorial:r}=e;return t(Ky,{"number | BigNumber":r,"number, number":function(a,i){if(!$e(a)||a<0)throw new TypeError("Positive integer value expected in function permutations");if(!$e(i)||i<0)throw new TypeError("Positive integer value expected in function permutations");if(i>a)throw new TypeError("second argument k must be less than or equal to first argument n");return Fa(a-i+1,a)},"BigNumber, BigNumber":function(a,i){var o,s;if(!Yy(a)||!Yy(i))throw new TypeError("Positive integer value expected in function permutations");if(i.gt(a))throw new TypeError("second argument k must be less than or equal to first argument n");var u=a.mul(0).add(1);for(o=u,s=a.minus(i).plus(1);s.lte(a);s=s.plus(1))o=o.times(s);return o}})});function Yy(e){return e.isInteger()&&e.gte(0)}var xl={exports:{}},$Z=xl.exports,Zy;function _Z(){return Zy||(Zy=1,function(e){(function(t,r,n){function a(u){var l=this,c=s();l.next=function(){var f=2091639*l.s0+l.c*23283064365386963e-26;return l.s0=l.s1,l.s1=l.s2,l.s2=f-(l.c=f|0)},l.c=1,l.s0=c(" "),l.s1=c(" "),l.s2=c(" "),l.s0-=c(u),l.s0<0&&(l.s0+=1),l.s1-=c(u),l.s1<0&&(l.s1+=1),l.s2-=c(u),l.s2<0&&(l.s2+=1),c=null}function i(u,l){return l.c=u.c,l.s0=u.s0,l.s1=u.s1,l.s2=u.s2,l}function o(u,l){var c=new a(u),f=l&&l.state,m=c.next;return m.int32=function(){return c.next()*4294967296|0},m.double=function(){return m()+(m()*2097152|0)*11102230246251565e-32},m.quick=m,f&&(typeof f=="object"&&i(f,c),m.state=function(){return i(c,{})}),m}function s(){var u=4022871197,l=function(c){c=String(c);for(var f=0;f<c.length;f++){u+=c.charCodeAt(f);var m=.02519603282416938*u;u=m>>>0,m-=u,m*=u,u=m>>>0,m-=u,u+=m*4294967296}return(u>>>0)*23283064365386963e-26};return l}r&&r.exports?r.exports=o:this.alea=o})($Z,e)}(xl)),xl.exports}var Dl={exports:{}},BZ=Dl.exports,Qy;function IZ(){return Qy||(Qy=1,function(e){(function(t,r,n){function a(s){var u=this,l="";u.x=0,u.y=0,u.z=0,u.w=0,u.next=function(){var f=u.x^u.x<<11;return u.x=u.y,u.y=u.z,u.z=u.w,u.w^=u.w>>>19^f^f>>>8},s===(s|0)?u.x=s:l+=s;for(var c=0;c<l.length+64;c++)u.x^=l.charCodeAt(c)|0,u.next()}function i(s,u){return u.x=s.x,u.y=s.y,u.z=s.z,u.w=s.w,u}function o(s,u){var l=new a(s),c=u&&u.state,f=function(){return(l.next()>>>0)/4294967296};return f.double=function(){do var m=l.next()>>>11,d=(l.next()>>>0)/4294967296,p=(m+d)/(1<<21);while(p===0);return p},f.int32=l.next,f.quick=f,c&&(typeof c=="object"&&i(c,l),f.state=function(){return i(l,{})}),f}r&&r.exports?r.exports=o:this.xor128=o})(BZ,e)}(Dl)),Dl.exports}var Nl={exports:{}},zZ=Nl.exports,Xy;function jZ(){return Xy||(Xy=1,function(e){(function(t,r,n){function a(s){var u=this,l="";u.next=function(){var f=u.x^u.x>>>2;return u.x=u.y,u.y=u.z,u.z=u.w,u.w=u.v,(u.d=u.d+362437|0)+(u.v=u.v^u.v<<4^(f^f<<1))|0},u.x=0,u.y=0,u.z=0,u.w=0,u.v=0,s===(s|0)?u.x=s:l+=s;for(var c=0;c<l.length+64;c++)u.x^=l.charCodeAt(c)|0,c==l.length&&(u.d=u.x<<10^u.x>>>4),u.next()}function i(s,u){return u.x=s.x,u.y=s.y,u.z=s.z,u.w=s.w,u.v=s.v,u.d=s.d,u}function o(s,u){var l=new a(s),c=u&&u.state,f=function(){return(l.next()>>>0)/4294967296};return f.double=function(){do var m=l.next()>>>11,d=(l.next()>>>0)/4294967296,p=(m+d)/(1<<21);while(p===0);return p},f.int32=l.next,f.quick=f,c&&(typeof c=="object"&&i(c,l),f.state=function(){return i(l,{})}),f}r&&r.exports?r.exports=o:this.xorwow=o})(zZ,e)}(Nl)),Nl.exports}var Al={exports:{}},qZ=Al.exports,eb;function RZ(){return eb||(eb=1,function(e){(function(t,r,n){function a(s){var u=this;u.next=function(){var c=u.x,f=u.i,m,d;return m=c[f],m^=m>>>7,d=m^m<<24,m=c[f+1&7],d^=m^m>>>10,m=c[f+3&7],d^=m^m>>>3,m=c[f+4&7],d^=m^m<<7,m=c[f+7&7],m=m^m<<13,d^=m^m<<9,c[f]=d,u.i=f+1&7,d};function l(c,f){var m,d=[];if(f===(f|0))d[0]=f;else for(f=""+f,m=0;m<f.length;++m)d[m&7]=d[m&7]<<15^f.charCodeAt(m)+d[m+1&7]<<13;for(;d.length<8;)d.push(0);for(m=0;m<8&&d[m]===0;++m);for(m==8?d[7]=-1:d[m],c.x=d,c.i=0,m=256;m>0;--m)c.next()}l(u,s)}function i(s,u){return u.x=s.x.slice(),u.i=s.i,u}function o(s,u){s==null&&(s=+new Date);var l=new a(s),c=u&&u.state,f=function(){return(l.next()>>>0)/4294967296};return f.double=function(){do var m=l.next()>>>11,d=(l.next()>>>0)/4294967296,p=(m+d)/(1<<21);while(p===0);return p},f.int32=l.next,f.quick=f,c&&(c.x&&i(c,l),f.state=function(){return i(l,{})}),f}r&&r.exports?r.exports=o:this.xorshift7=o})(qZ,e)}(Al)),Al.exports}var Cl={exports:{}},LZ=Cl.exports,tb;function HZ(){return tb||(tb=1,function(e){(function(t,r,n){function a(s){var u=this;u.next=function(){var c=u.w,f=u.X,m=u.i,d,p;return u.w=c=c+1640531527|0,p=f[m+34&127],d=f[m=m+1&127],p^=p<<13,d^=d<<17,p^=p>>>15,d^=d>>>12,p=f[m]=p^d,u.i=m,p+(c^c>>>16)|0};function l(c,f){var m,d,p,h,y,b=[],D=128;for(f===(f|0)?(d=f,f=null):(f=f+"\0",d=0,D=Math.max(D,f.length)),p=0,h=-32;h<D;++h)f&&(d^=f.charCodeAt((h+32)%f.length)),h===0&&(y=d),d^=d<<10,d^=d>>>15,d^=d<<4,d^=d>>>13,h>=0&&(y=y+1640531527|0,m=b[h&127]^=d+y,p=m==0?p+1:0);for(p>=128&&(b[(f&&f.length||0)&127]=-1),p=127,h=4*128;h>0;--h)d=b[p+34&127],m=b[p=p+1&127],d^=d<<13,m^=m<<17,d^=d>>>15,m^=m>>>12,b[p]=d^m;c.w=y,c.X=b,c.i=p}l(u,s)}function i(s,u){return u.i=s.i,u.w=s.w,u.X=s.X.slice(),u}function o(s,u){s==null&&(s=+new Date);var l=new a(s),c=u&&u.state,f=function(){return(l.next()>>>0)/4294967296};return f.double=function(){do var m=l.next()>>>11,d=(l.next()>>>0)/4294967296,p=(m+d)/(1<<21);while(p===0);return p},f.int32=l.next,f.quick=f,c&&(c.X&&i(c,l),f.state=function(){return i(l,{})}),f}r&&r.exports?r.exports=o:this.xor4096=o})(LZ,e)}(Cl)),Cl.exports}var El={exports:{}},GZ=El.exports,rb;function VZ(){return rb||(rb=1,function(e){(function(t,r,n){function a(s){var u=this,l="";u.next=function(){var f=u.b,m=u.c,d=u.d,p=u.a;return f=f<<25^f>>>7^m,m=m-d|0,d=d<<24^d>>>8^p,p=p-f|0,u.b=f=f<<20^f>>>12^m,u.c=m=m-d|0,u.d=d<<16^m>>>16^p,u.a=p-f|0},u.a=0,u.b=0,u.c=-1640531527,u.d=1367130551,s===Math.floor(s)?(u.a=s/4294967296|0,u.b=s|0):l+=s;for(var c=0;c<l.length+20;c++)u.b^=l.charCodeAt(c)|0,u.next()}function i(s,u){return u.a=s.a,u.b=s.b,u.c=s.c,u.d=s.d,u}function o(s,u){var l=new a(s),c=u&&u.state,f=function(){return(l.next()>>>0)/4294967296};return f.double=function(){do var m=l.next()>>>11,d=(l.next()>>>0)/4294967296,p=(m+d)/(1<<21);while(p===0);return p},f.int32=l.next,f.quick=f,c&&(typeof c=="object"&&i(c,l),f.state=function(){return i(l,{})}),f}r&&r.exports?r.exports=o:this.tychei=o})(GZ,e)}(El)),El.exports}var Sl={exports:{}};const UZ={},WZ=Object.freeze(Object.defineProperty({__proto__:null,default:UZ},Symbol.toStringTag,{value:"Module"})),JZ=Hs.getAugmentedNamespace(WZ);var KZ=Sl.exports,nb;function YZ(){return nb||(nb=1,function(e){(function(t,r,n){var a=256,i=6,o=52,s="random",u=n.pow(a,i),l=n.pow(2,o),c=l*2,f=a-1,m;function d(x,w,v){var A=[];w=w==!0?{entropy:!0}:w||{};var C=b(y(w.entropy?[x,g(r)]:x??D(),3),A),N=new p(A),E=function(){for(var S=N.g(i),F=u,k=0;S<l;)S=(S+k)*a,F*=a,k=N.g(1);for(;S>=c;)S/=2,F/=2,k>>>=1;return(S+k)/F};return E.int32=function(){return N.g(4)|0},E.quick=function(){return N.g(4)/4294967296},E.double=E,b(g(N.S),r),(w.pass||v||function(S,F,k,$){return $&&($.S&&h($,N),S.state=function(){return h(N,{})}),k?(n[s]=S,F):S})(E,C,"global"in w?w.global:this==n,w.state)}function p(x){var w,v=x.length,A=this,C=0,N=A.i=A.j=0,E=A.S=[];for(v||(x=[v++]);C<a;)E[C]=C++;for(C=0;C<a;C++)E[C]=E[N=f&N+x[C%v]+(w=E[C])],E[N]=w;(A.g=function(S){for(var F,k=0,$=A.i,_=A.j,T=A.S;S--;)F=T[$=f&$+1],k=k*a+T[f&(T[$]=T[_=f&_+F])+(T[_]=F)];return A.i=$,A.j=_,k})(a)}function h(x,w){return w.i=x.i,w.j=x.j,w.S=x.S.slice(),w}function y(x,w){var v=[],A=typeof x,C;if(w&&A=="object")for(C in x)try{v.push(y(x[C],w-1))}catch{}return v.length?v:A=="string"?x:x+"\0"}function b(x,w){for(var v=x+"",A,C=0;C<v.length;)w[f&C]=f&(A^=w[f&C]*19)+v.charCodeAt(C++);return g(w)}function D(){try{var x;return m&&(x=m.randomBytes)?x=x(a):(x=new Uint8Array(a),(t.crypto||t.msCrypto).getRandomValues(x)),g(x)}catch{var w=t.navigator,v=w&&w.plugins;return[+new Date,t,v,t.screen,g(r)]}}function g(x){return String.fromCharCode.apply(0,x)}if(b(n.random(),r),e.exports){e.exports=d;try{m=JZ}catch{}}else n["seed"+s]=d})(typeof self<"u"?self:KZ,[],Math)}(Sl)),Sl.exports}var _f,ab;function ZZ(){if(ab)return _f;ab=1;var e=_Z(),t=IZ(),r=jZ(),n=RZ(),a=HZ(),i=VZ(),o=YZ();return o.alea=e,o.xor128=t,o.xorwow=r,o.xorshift7=n,o.xor4096=a,o.tychei=i,_f=o,_f}var QZ=ZZ();const G2=Hs.getDefaultExportFromCjs(QZ);var XZ=G2(Date.now());function Go(e){var t;function r(a){t=a===null?XZ:G2(String(a))}r(e);function n(){return t()}return n}var ib="pickRandom",eQ=["typed","config","?on"],tQ=B(ib,eQ,e=>{var{typed:t,config:r,on:n}=e,a=Go(r.randomSeed);return n&&n("config",function(o,s){o.randomSeed!==s.randomSeed&&(a=Go(o.randomSeed))}),t(ib,{"Array | Matrix":function(s){return i(s,{})},"Array | Matrix, Object":function(s,u){return i(s,u)},"Array | Matrix, number":function(s,u){return i(s,{number:u})},"Array | Matrix, Array | Matrix":function(s,u){return i(s,{weights:u})},"Array | Matrix, Array | Matrix, number":function(s,u,l){return i(s,{number:l,weights:u})},"Array | Matrix, number, Array | Matrix":function(s,u,l){return i(s,{number:u,weights:l})}});function i(o,s){var{number:u,weights:l,elementWise:c=!0}=s,f=typeof u>"u";f&&(u=1);var m=je(o)?o.create:je(l)?l.create:null;o=o.valueOf(),l&&(l=l.valueOf()),c===!0&&(o=mt(o),l=mt(l));var d=0;if(typeof l<"u"){if(l.length!==o.length)throw new Error("Weights must have the same length as possibles");for(var p=0,h=l.length;p<h;p++){if(!Ze(l[p])||l[p]<0)throw new Error("Weights must be an array of positive numbers");d+=l[p]}}for(var y=o.length,b=[],D;b.length<u;){if(typeof l>"u")D=o[Math.floor(a()*y)];else for(var g=a()*d,x=0,w=o.length;x<w;x++)if(g-=l[x],g<0){D=o[x];break}b.push(D)}return f?b[0]:m?m(b):b}});function Fd(e,t){var r=[];if(e=e.slice(0),e.length>1)for(var n=0,a=e.shift();n<a;n++)r.push(Fd(e,t));else for(var i=0,o=e.shift();i<o;i++)r.push(t());return r}var ob="random",rQ=["typed","config","?on"],nQ=B(ob,rQ,e=>{var{typed:t,config:r,on:n}=e,a=Go(r.randomSeed);return n&&n("config",function(s,u){s.randomSeed!==u.randomSeed&&(a=Go(s.randomSeed))}),t(ob,{"":()=>o(0,1),number:s=>o(0,s),"number, number":(s,u)=>o(s,u),"Array | Matrix":s=>i(s,0,1),"Array | Matrix, number":(s,u)=>i(s,0,u),"Array | Matrix, number, number":(s,u,l)=>i(s,u,l)});function i(s,u,l){var c=Fd(s.valueOf(),()=>o(u,l));return je(s)?s.create(c,"number"):c}function o(s,u){return s+a()*(u-s)}}),sb="randomInt",aQ=["typed","config","log2","?on"],iQ=B(sb,aQ,e=>{var{typed:t,config:r,log2:n,on:a}=e,i=Go(r.randomSeed);return a&&a("config",function(l,c){l.randomSeed!==c.randomSeed&&(i=Go(l.randomSeed))}),t(sb,{"":()=>s(0,2),number:l=>s(0,l),"number, number":(l,c)=>s(l,c),bigint:l=>u(0n,l),"bigint, bigint":u,"Array | Matrix":l=>o(l,0,1),"Array | Matrix, number":(l,c)=>o(l,0,c),"Array | Matrix, number, number":(l,c,f)=>o(l,c,f)});function o(l,c,f){var m=Fd(l.valueOf(),()=>s(c,f));return je(l)?l.create(m,"number"):m}function s(l,c){return Math.floor(l+i()*(c-l))}function u(l,c){var f=2n**30n,m=c-l;if(m<=f)return l+BigInt(s(0,Number(m)));for(var d=n(m),p=m;p>=m;){p=0n;for(var h=0;h<d;++h)p=2n*p+(i()<.5?0n:1n)}return l+p}}),ub="stirlingS2",oQ=["typed","addScalar","subtractScalar","multiplyScalar","divideScalar","pow","factorial","combinations","isNegative","isInteger","number","?bignumber","larger"],sQ=B(ub,oQ,e=>{var{typed:t,addScalar:r,subtractScalar:n,multiplyScalar:a,divideScalar:i,pow:o,factorial:s,combinations:u,isNegative:l,isInteger:c,number:f,bignumber:m,larger:d}=e,p=[],h=[];return t(ub,{"number | BigNumber, number | BigNumber":function(b,D){if(!c(b)||l(b)||!c(D)||l(D))throw new TypeError("Non-negative integer value expected in function stirlingS2");if(d(D,b))throw new TypeError("k must be less than or equal to n in function stirlingS2");var g=!(Ze(b)&&Ze(D)),x=g?h:p,w=g?m:f,v=f(b),A=f(D);if(x[v]&&x[v].length>A)return x[v][A];for(var C=0;C<=v;++C)if(x[C]||(x[C]=[w(C===0?1:0)]),C!==0)for(var N=x[C],E=x[C-1],S=N.length;S<=C&&S<=A;++S)S===C?N[S]=1:N[S]=r(a(w(S),E[S]),E[S-1]);return x[v][A]}})}),lb="bellNumbers",uQ=["typed","addScalar","isNegative","isInteger","stirlingS2"],lQ=B(lb,uQ,e=>{var{typed:t,addScalar:r,isNegative:n,isInteger:a,stirlingS2:i}=e;return t(lb,{"number | BigNumber":function(s){if(!a(s)||n(s))throw new TypeError("Non-negative integer value expected in function bellNumbers");for(var u=0,l=0;l<=s;l++)u=r(u,i(s,l));return u}})}),cb="catalan",cQ=["typed","addScalar","divideScalar","multiplyScalar","combinations","isNegative","isInteger"],fQ=B(cb,cQ,e=>{var{typed:t,addScalar:r,divideScalar:n,multiplyScalar:a,combinations:i,isNegative:o,isInteger:s}=e;return t(cb,{"number | BigNumber":function(l){if(!s(l)||o(l))throw new TypeError("Non-negative integer value expected in function catalan");return n(i(a(l,2),l),r(l,1))}})}),fb="composition",mQ=["typed","addScalar","combinations","isNegative","isPositive","isInteger","larger"],dQ=B(fb,mQ,e=>{var{typed:t,addScalar:r,combinations:n,isPositive:a,isNegative:i,isInteger:o,larger:s}=e;return t(fb,{"number | BigNumber, number | BigNumber":function(l,c){if(!o(l)||!a(l)||!o(c)||!a(c))throw new TypeError("Positive integer value expected in function composition");if(s(c,l))throw new TypeError("k must be less than or equal to n in function composition");return n(r(l,-1),r(c,-1))}})}),mb="leafCount",hQ=["parse","typed"],pQ=B(mb,hQ,e=>{var{parse:t,typed:r}=e;function n(a){var i=0;return a.forEach(o=>{i+=n(o)}),i||1}return r(mb,{Node:function(i){return n(i)}})});function db(e){return lt(e)||Yt(e)&&e.isUnary()&<(e.args[0])}function nc(e){return!!(lt(e)||(si(e)||Yt(e))&&e.args.every(nc)||_a(e)&&nc(e.content))}function hb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Bf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hb(Object(r),!0).forEach(function(n){rr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var gQ="simplifyUtil",vQ=["FunctionNode","OperatorNode","SymbolNode"],Pd=B(gQ,vQ,e=>{var{FunctionNode:t,OperatorNode:r,SymbolNode:n}=e,a=!0,i=!1,o="defaultF",s={add:{trivial:a,total:a,commutative:a,associative:a},unaryPlus:{trivial:a,total:a,commutative:a,associative:a},subtract:{trivial:i,total:a,commutative:i,associative:i},multiply:{trivial:a,total:a,commutative:a,associative:a},divide:{trivial:i,total:a,commutative:i,associative:i},paren:{trivial:a,total:a,commutative:a,associative:i},defaultF:{trivial:i,total:a,commutative:i,associative:i}},u={divide:{total:i},log:{total:i}},l={subtract:{total:i},abs:{trivial:a},log:{total:a}};function c(g,x){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:s,v=o;if(typeof g=="string"?v=g:Yt(g)?v=g.fn.toString():si(g)?v=g.name:_a(g)&&(v="paren"),Oe(w,v)){var A=w[v];if(Oe(A,x))return A[x];if(Oe(s,v))return s[v][x]}if(Oe(w,o)){var C=w[o];return Oe(C,x)?C[x]:s[o][x]}if(Oe(s,v)){var N=s[v];if(Oe(N,x))return N[x]}return s[o][x]}function f(g){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:s;return c(g,"commutative",x)}function m(g){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:s;return c(g,"associative",x)}function d(g,x){var w=Bf({},g);for(var v in x)Oe(g,v)?w[v]=Bf(Bf({},x[v]),g[v]):w[v]=x[v];return w}function p(g,x){if(!g.args||g.args.length===0)return g;g.args=h(g,x);for(var w=0;w<g.args.length;w++)p(g.args[w],x)}function h(g,x){var w,v=[],A=function(N){for(var E=0;E<N.args.length;E++){var S=N.args[E];Yt(S)&&w===S.op?A(S):v.push(S)}};return m(g,x)?(w=g.op,A(g),v):g.args}function y(g,x){if(!(!g.args||g.args.length===0)){for(var w=D(g),v=g.args.length,A=0;A<v;A++)y(g.args[A],x);if(v>2&&m(g,x)){for(var C=g.args.pop();g.args.length>0;)C=w([g.args.pop(),C]);g.args=C.args}}}function b(g,x){if(!(!g.args||g.args.length===0)){for(var w=D(g),v=g.args.length,A=0;A<v;A++)b(g.args[A],x);if(v>2&&m(g,x)){for(var C=g.args.shift();g.args.length>0;)C=w([C,g.args.shift()]);g.args=C.args}}}function D(g){return Yt(g)?function(x){try{return new r(g.op,g.fn,x,g.implicit)}catch(w){return console.error(w),[]}}:function(x){return new t(new n(g.name),x)}}return{createMakeNodeFunction:D,hasProperty:c,isCommutative:f,isAssociative:m,mergeContext:d,flatten:p,allChildren:h,unflattenr:y,unflattenl:b,defaultContext:s,realContext:u,positiveContext:l}}),yQ="simplify",bQ=["typed","parse","equal","resolve","simplifyConstant","simplifyCore","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode","replacer"],wQ=B(yQ,bQ,e=>{var{typed:t,parse:r,equal:n,resolve:a,simplifyConstant:i,simplifyCore:o,AccessorNode:s,ArrayNode:u,ConstantNode:l,FunctionNode:c,IndexNode:f,ObjectNode:m,OperatorNode:d,ParenthesisNode:p,SymbolNode:h,replacer:y}=e,{hasProperty:b,isCommutative:D,isAssociative:g,mergeContext:x,flatten:w,unflattenr:v,unflattenl:A,createMakeNodeFunction:C,defaultContext:N,realContext:E,positiveContext:S}=Pd({FunctionNode:c,OperatorNode:d,SymbolNode:h});t.addConversion({from:"Object",to:"Map",convert:$o});var F=t("simplify",{Node:j,"Node, Map":(L,R)=>j(L,!1,R),"Node, Map, Object":(L,R,J)=>j(L,!1,R,J),"Node, Array":j,"Node, Array, Map":j,"Node, Array, Map, Object":j});t.removeConversion({from:"Object",to:"Map",convert:$o}),F.defaultContext=N,F.realContext=E,F.positiveContext=S;function k(L){return L.transform(function(R){return _a(R)?k(R.content):R})}var $={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};F.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}}},i,{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}}},i,{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 _(L,R){var J={};if(L.s){var re=L.s.split("->");if(re.length===2)J.l=re[0],J.r=re[1];else throw SyntaxError("Could not parse rule: "+L.s)}else J.l=L.l,J.r=L.r;J.l=k(r(J.l)),J.r=k(r(J.r));for(var te of["imposeContext","repeat","assuming"])te in L&&(J[te]=L[te]);if(L.evaluate&&(J.evaluate=r(L.evaluate)),g(J.l,R)){var ue=!D(J.l,R),oe;ue&&(oe=P());var De=C(J.l),q=P();J.expanded={},J.expanded.l=De([J.l,q]),w(J.expanded.l,R),v(J.expanded.l,R),J.expanded.r=De([J.r,q]),ue&&(J.expandedNC1={},J.expandedNC1.l=De([oe,J.l]),J.expandedNC1.r=De([oe,J.r]),J.expandedNC2={},J.expandedNC2.l=De([oe,J.expanded.l]),J.expandedNC2.r=De([oe,J.expanded.r]))}return J}function T(L,R){for(var J=[],re=0;re<L.length;re++){var te=L[re],ue=void 0,oe=typeof te;switch(oe){case"string":te={s:te};case"object":ue=_(te,R);break;case"function":ue=te;break;default:throw TypeError("Unsupported type of rule: "+oe)}J.push(ue)}return J}var z=0;function P(){return new h("_p"+z++)}function j(L,R){var J=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Is(),re=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},te=re.consoleDebug;R=T(R||F.rules,re.context);var ue=a(L,J);ue=k(ue);for(var oe={},De=ue.toString({parenthesis:"all"});!oe[De];){oe[De]=!0,z=0;var q=De;te&&console.log("Working on: ",De);for(var H=0;H<R.length;H++){var Z="";if(typeof R[H]=="function"?(ue=R[H](ue,re),te&&(Z=R[H].name)):(w(ue,re.context),ue=Q(ue,R[H],re.context),te&&(Z="".concat(R[H].l.toString()," -> ").concat(R[H].r.toString()))),te){var ae=ue.toString({parenthesis:"all"});ae!==q&&(console.log("Applying",Z,"produced",ae),q=ae)}A(ue,re.context)}De=ue.toString({parenthesis:"all"})}return ue}function O(L,R,J){var re=L;if(L)for(var te=0;te<L.length;++te){var ue=Q(L[te],R,J);ue!==L[te]&&(re===L&&(re=L.slice()),re[te]=ue)}return re}function Q(L,R,J){if(R.assuming){for(var re in R.assuming)for(var te in R.assuming[re])if(b(re,te,J)!==R.assuming[re][te])return L}var ue=x(R.imposeContext,J),oe=L;if(oe instanceof d||oe instanceof c){var De=O(oe.args,R,J);De!==oe.args&&(oe=oe.clone(),oe.args=De)}else if(oe instanceof p){if(oe.content){var q=Q(oe.content,R,J);q!==oe.content&&(oe=new p(q))}}else if(oe instanceof u){var H=O(oe.items,R,J);H!==oe.items&&(oe=new u(H))}else if(oe instanceof s){var Z=oe.object;oe.object&&(Z=Q(oe.object,R,J));var ae=oe.index;oe.index&&(ae=Q(oe.index,R,J)),(Z!==oe.object||ae!==oe.index)&&(oe=new s(Z,ae))}else if(oe instanceof f){var he=O(oe.dimensions,R,J);he!==oe.dimensions&&(oe=new f(he))}else if(oe instanceof m){var ye=!1,Te={};for(var I in oe.properties)Te[I]=Q(oe.properties[I],R,J),Te[I]!==oe.properties[I]&&(ye=!0);ye&&(oe=new m(Te))}var Y=R.r,X=ne(R.l,oe,ue)[0];if(!X&&R.expanded&&(Y=R.expanded.r,X=ne(R.expanded.l,oe,ue)[0]),!X&&R.expandedNC1&&(Y=R.expandedNC1.r,X=ne(R.expandedNC1.l,oe,ue)[0],X||(Y=R.expandedNC2.r,X=ne(R.expandedNC2.l,oe,ue)[0])),X){var se=oe.implicit;oe=Y.clone(),se&&"implicit"in Y&&(oe.implicit=!0),oe=oe.transform(function(ce){return ce.isSymbolNode&&Oe(X.placeholders,ce.name)?X.placeholders[ce.name].clone():ce})}return R.repeat&&oe!==L&&(oe=Q(oe,R,J)),oe}function K(L,R){var J=[],re,te,ue=C(L);if(D(L,R))for(var oe=0;oe<L.args.length;oe++)te=L.args.slice(0),te.splice(oe,1),re=te.length===1?te[0]:ue(te),J.push(ue([L.args[oe],re]));else for(var De=1;De<L.args.length;De++){var q=L.args[0];De>1&&(q=ue(L.args.slice(0,De))),te=L.args.slice(De),re=te.length===1?te[0]:ue(te),J.push(ue([q,re]))}return J}function U(L,R){var J={placeholders:{}};if(!L.placeholders&&!R.placeholders)return J;if(L.placeholders){if(!R.placeholders)return L}else return R;for(var re in L.placeholders)if(Oe(L.placeholders,re)&&(J.placeholders[re]=L.placeholders[re],Oe(R.placeholders,re)&&!ee(L.placeholders[re],R.placeholders[re])))return null;for(var te in R.placeholders)Oe(R.placeholders,te)&&(J.placeholders[te]=R.placeholders[te]);return J}function V(L,R){var J=[];if(L.length===0||R.length===0)return J;for(var re,te=0;te<L.length;te++)for(var ue=0;ue<R.length;ue++)re=U(L[te],R[ue]),re&&J.push(re);return J}function le(L){if(L.length===0)return L;for(var R=L.reduce(V),J=[],re={},te=0;te<R.length;te++){var ue=JSON.stringify(R[te],y);re[ue]||(re[ue]=!0,J.push(R[te]))}return J}function ne(L,R,J,re){var te=[{placeholders:{}}];if(L instanceof d&&R instanceof d||L instanceof c&&R instanceof c){if(L instanceof d){if(L.op!==R.op||L.fn!==R.fn)return[]}else if(L instanceof c&&L.name!==R.name)return[];if(R.args.length===1&&L.args.length===1||!g(R,J)&&R.args.length===L.args.length||re){for(var ue=[],oe=0;oe<L.args.length;oe++){var De=ne(L.args[oe],R.args[oe],J);if(De.length===0)break;ue.push(De)}if(ue.length!==L.args.length){if(!D(R,J)||L.args.length===1)return[];if(L.args.length>2)throw new Error("permuting >2 commutative non-associative rule arguments not yet implemented");var q=ne(L.args[0],R.args[1],J);if(q.length===0)return[];var H=ne(L.args[1],R.args[0],J);if(H.length===0)return[];ue=[q,H]}te=le(ue)}else if(R.args.length>=2&&L.args.length===2){for(var Z=K(R,J),ae=[],he=0;he<Z.length;he++){var ye=ne(L,Z[he],J,!0);ae=ae.concat(ye)}return ae}else{if(L.args.length>2)throw Error("Unexpected non-binary associative function: "+L.toString());return[]}}else if(L instanceof h){if(L.name.length===0)throw new Error("Symbol in rule has 0 length...!?");if($[L.name]){if(L.name!==R.name)return[]}else switch(L.name[1]>="a"&&L.name[1]<="z"?L.name.substring(0,2):L.name[0]){case"n":case"_p":te[0].placeholders[L.name]=R;break;case"c":case"cl":if(lt(R))te[0].placeholders[L.name]=R;else return[];break;case"v":if(!lt(R))te[0].placeholders[L.name]=R;else return[];break;case"vl":if(pr(R))te[0].placeholders[L.name]=R;else return[];break;case"cd":if(db(R))te[0].placeholders[L.name]=R;else return[];break;case"vd":if(!db(R))te[0].placeholders[L.name]=R;else return[];break;case"ce":if(nc(R))te[0].placeholders[L.name]=R;else return[];break;case"ve":if(!nc(R))te[0].placeholders[L.name]=R;else return[];break;default:throw new Error("Invalid symbol in rule: "+L.name)}}else if(L instanceof l){if(!n(L.value,R.value))return[]}else return[];return te}function ee(L,R){if(L instanceof l&&R instanceof l){if(!n(L.value,R.value))return!1}else if(L instanceof h&&R instanceof h){if(L.name!==R.name)return!1}else if(L instanceof d&&R instanceof d||L instanceof c&&R instanceof c){if(L instanceof d){if(L.op!==R.op||L.fn!==R.fn)return!1}else if(L instanceof c&&L.name!==R.name)return!1;if(L.args.length!==R.args.length)return!1;for(var J=0;J<L.args.length;J++)if(!ee(L.args[J],R.args[J]))return!1}else return!1;return!0}return F}),xQ="simplifyConstant",DQ=["typed","config","mathWithTransform","matrix","?fraction","?bignumber","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","SymbolNode"],NQ=B(xQ,DQ,e=>{var{typed:t,config:r,mathWithTransform:n,matrix:a,fraction:i,bignumber:o,AccessorNode:s,ArrayNode:u,ConstantNode:l,FunctionNode:c,IndexNode:f,ObjectNode:m,OperatorNode:d,SymbolNode:p}=e,{isCommutative:h,isAssociative:y,allChildren:b,createMakeNodeFunction:D}=Pd({FunctionNode:c,OperatorNode:d,SymbolNode:p}),g=t("simplifyConstant",{Node:_=>A($(_,{})),"Node, Object":function(T,z){return A($(T,z))}});function x(_){return Zs(_)?_.valueOf():_ instanceof Array?_.map(x):je(_)?a(x(_.valueOf())):_}function w(_,T,z){try{return n[_].apply(null,T)}catch{return T=T.map(x),N(n[_].apply(null,T),z)}}var v=t({Fraction:S,number:function(T){return T<0?E(new l(-T)):new l(T)},BigNumber:function(T){return T<0?E(new l(-T)):new l(T)},bigint:function(T){return T<0n?E(new l(-T)):new l(T)},Complex:function(T){throw new Error("Cannot convert Complex number to Node")},string:function(T){return new l(T)},Matrix:function(T){return new u(T.valueOf().map(z=>v(z)))}});function A(_){return Nt(_)?_:v(_)}function C(_,T){var z=T&&T.exactFractions!==!1;if(z&&isFinite(_)&&i){var P=i(_),j=T&&typeof T.fractionsLimit=="number"?T.fractionsLimit:1/0;if(P.valueOf()===_&&P.n<j&&P.d<j)return P}return _}var N=t({"string, Object":function(T,z){var P=mi(T,r);if(P==="BigNumber")return o===void 0&&Ed(),o(T);if(P==="bigint")return BigInt(T);if(P==="Fraction")return i===void 0&&N2(),i(T);var j=parseFloat(T);return C(j,z)},"Fraction, Object":function(T,z){return T},"BigNumber, Object":function(T,z){return T},"number, Object":function(T,z){return C(T,z)},"bigint, Object":function(T,z){return T},"Complex, Object":function(T,z){return T.im!==0?T:C(T.re,z)},"Matrix, Object":function(T,z){return a(C(T.valueOf()))},"Array, Object":function(T,z){return T.map(C)}});function E(_){return new d("-","unaryMinus",[_])}function S(_){var T=j=>r.number==="BigNumber"&&o?o(j):Number(j),z=_.s*_.n,P=z<0n?new d("-","unaryMinus",[new l(-T(z))]):new l(T(z));return _.d===1n?P:new d("/","divide",[P,new l(T(_.d))])}function F(_,T,z){if(!Yo(T))return new s(A(_),A(T));if(Dn(_)||je(_)){for(var P=Array.from(T.dimensions);P.length>0;)if(lt(P[0])&&typeof P[0].value!="string"){var j=N(P.shift().value,z);Dn(_)?_=_.items[j-1]:(_=_.valueOf()[j-1],_ instanceof Array&&(_=a(_)))}else if(P.length>1&<(P[1])&&typeof P[1].value!="string"){var O=N(P[1].value,z),Q=[],K=Dn(_)?_.items:_.valueOf();for(var U of K)if(Dn(U))Q.push(U.items[O-1]);else if(je(_))Q.push(U[O-1]);else break;if(Q.length===K.length)Dn(_)?_=new u(Q):_=a(Q),P.splice(1,1);else break}else break;return P.length===T.dimensions.length?new s(A(_),T):P.length>0?(T=new f(P),new s(A(_),T)):_}if(dc(_)&&T.dimensions.length===1&<(T.dimensions[0])){var V=T.dimensions[0].value;return V in _.properties?_.properties[V]:new l}return new s(A(_),T)}function k(_,T,z,P){var j=T.shift(),O=T.reduce((Q,K)=>{if(!Nt(K)){var U=Q.pop();if(Nt(U))return[U,K];try{return Q.push(w(_,[U,K],P)),Q}catch{Q.push(U)}}Q.push(A(Q.pop()));var V=Q.length===1?Q[0]:z(Q);return[z([V,A(K)])]},[j]);return O.length===1?O[0]:z([O[0],v(O[1])])}function $(_,T){switch(_.type){case"SymbolNode":return _;case"ConstantNode":switch(typeof _.value){case"number":return N(_.value,T);case"bigint":return N(_.value,T);case"string":return _.value;default:if(!isNaN(_.value))return N(_.value,T)}return _;case"FunctionNode":if(n[_.name]&&n[_.name].rawArgs)return _;{var z=["add","multiply"];if(!z.includes(_.name)){var P=_.args.map(re=>$(re,T));if(!P.some(Nt))try{return w(_.name,P,T)}catch{}if(_.name==="size"&&P.length===1&&Dn(P[0])){for(var j=[],O=P[0];Dn(O);)j.push(O.items.length),O=O.items[0];return a(j)}return new c(_.name,P.map(A))}}case"OperatorNode":{var Q=_.fn.toString(),K,U,V=D(_);if(Yt(_)&&_.isUnary())K=[$(_.args[0],T)],Nt(K[0])?U=V(K):U=w(Q,K,T);else if(y(_,T.context))if(K=b(_,T.context),K=K.map(re=>$(re,T)),h(Q,T.context)){for(var le=[],ne=[],ee=0;ee<K.length;ee++)Nt(K[ee])?ne.push(K[ee]):le.push(K[ee]);le.length>1?(U=k(Q,le,V,T),ne.unshift(U),U=k(Q,ne,V,T)):U=k(Q,K,V,T)}else U=k(Q,K,V,T);else K=_.args.map(re=>$(re,T)),U=k(Q,K,V,T);return U}case"ParenthesisNode":return $(_.content,T);case"AccessorNode":return F($(_.object,T),$(_.index,T),T);case"ArrayNode":{var L=_.items.map(re=>$(re,T));return L.some(Nt)?new u(L.map(A)):a(L)}case"IndexNode":return new f(_.dimensions.map(re=>g(re,T)));case"ObjectNode":{var R={};for(var J in _.properties)R[J]=g(_.properties[J],T);return new m(R)}case"AssignmentNode":case"BlockNode":case"FunctionAssignmentNode":case"RangeNode":case"ConditionalNode":default:throw new Error("Unimplemented node type in simplifyConstant: ".concat(_.type))}}return g}),pb="simplifyCore",AQ=["typed","parse","equal","isZero","add","subtract","multiply","divide","pow","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode"],CQ=B(pb,AQ,e=>{var{typed:t,parse:r,equal:n,isZero:a,add:i,subtract:o,multiply:s,divide:u,pow:l,AccessorNode:c,ArrayNode:f,ConstantNode:m,FunctionNode:d,IndexNode:p,ObjectNode:h,OperatorNode:y,ParenthesisNode:b,SymbolNode:D}=e,g=new m(0),x=new m(1),w=new m(!0),v=new m(!1);function A(S){return Yt(S)&&["and","not","or"].includes(S.op)}var{hasProperty:C,isCommutative:N}=Pd({FunctionNode:d,OperatorNode:y,SymbolNode:D});function E(S){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},k=F?F.context:void 0;if(C(S,"trivial",k)){if(si(S)&&S.args.length===1)return E(S.args[0],F);var $=!1,_=0;if(S.forEach(ne=>{++_,_===1&&($=E(ne,F))}),_===1)return $}var T=S;if(si(T)){var z=NG(T.name);if(z){if(T.args.length>2&&C(T,"associative",k))for(;T.args.length>2;){var P=T.args.pop(),j=T.args.pop();T.args.push(new y(z,T.name,[P,j]))}T=new y(z,T.name,T.args)}else return new d(E(T.fn),T.args.map(ne=>E(ne,F)))}if(Yt(T)&&T.isUnary()){var O=E(T.args[0],F);if(T.op==="~"&&Yt(O)&&O.isUnary()&&O.op==="~"||T.op==="not"&&Yt(O)&&O.isUnary()&&O.op==="not"&&A(O.args[0]))return O.args[0];var Q=!0;if(T.op==="-"&&Yt(O)&&(O.isBinary()&&O.fn==="subtract"&&(T=new y("-","subtract",[O.args[1],O.args[0]]),Q=!1),O.isUnary()&&O.op==="-"))return O.args[0];if(Q)return new y(T.op,T.fn,[O])}if(Yt(T)&&T.isBinary()){var K=E(T.args[0],F),U=E(T.args[1],F);if(T.op==="+"){if(lt(K)&&a(K.value))return U;if(lt(U)&&a(U.value))return K;Yt(U)&&U.isUnary()&&U.op==="-"&&(U=U.args[0],T=new y("-","subtract",[K,U]))}if(T.op==="-")return Yt(U)&&U.isUnary()&&U.op==="-"?E(new y("+","add",[K,U.args[0]]),F):lt(K)&&a(K.value)?E(new y("-","unaryMinus",[U])):lt(U)&&a(U.value)?K:new y(T.op,T.fn,[K,U]);if(T.op==="*"){if(lt(K)){if(a(K.value))return g;if(n(K.value,1))return U}if(lt(U)){if(a(U.value))return g;if(n(U.value,1))return K;if(N(T,k))return new y(T.op,T.fn,[U,K],T.implicit)}return new y(T.op,T.fn,[K,U],T.implicit)}if(T.op==="/")return lt(K)&&a(K.value)?g:lt(U)&&n(U.value,1)?K:new y(T.op,T.fn,[K,U]);if(T.op==="^"&<(U)){if(a(U.value))return x;if(n(U.value,1))return K}if(T.op==="and"){if(lt(K))if(K.value){if(A(U))return U;if(lt(U))return U.value?w:v}else return v;if(lt(U))if(U.value){if(A(K))return K}else return v}if(T.op==="or"){if(lt(K)){if(K.value)return w;if(A(U))return U}if(lt(U)){if(U.value)return w;if(A(K))return K}}return new y(T.op,T.fn,[K,U])}if(Yt(T))return new y(T.op,T.fn,T.args.map(ne=>E(ne,F)));if(Dn(T))return new f(T.items.map(ne=>E(ne,F)));if(Wi(T))return new c(E(T.object,F),E(T.index,F));if(Yo(T))return new p(T.dimensions.map(ne=>E(ne,F)));if(dc(T)){var V={};for(var le in T.properties)V[le]=E(T.properties[le],F);return new h(V)}return T}return t(pb,{Node:E,"Node,Object":E})}),EQ="resolve",SQ=["typed","parse","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode"],MQ=B(EQ,SQ,e=>{var{typed:t,parse:r,ConstantNode:n,FunctionNode:a,OperatorNode:i,ParenthesisNode:o}=e;function s(u,l){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Set;if(!l)return u;if(pr(u)){if(c.has(u.name)){var f=Array.from(c).join(", ");throw new ReferenceError("recursive loop of variable definitions among {".concat(f,"}"))}var m=l.get(u.name);if(Nt(m)){var d=new Set(c);return d.add(u.name),s(m,l,d)}else return typeof m=="number"?r(String(m)):m!==void 0?new n(m):u}else if(Yt(u)){var p=u.args.map(function(y){return s(y,l,c)});return new i(u.op,u.fn,p,u.implicit)}else{if(_a(u))return new o(s(u.content,l,c));if(si(u)){var h=u.args.map(function(y){return s(y,l,c)});return new a(u.name,h)}}return u.map(y=>s(y,l,c))}return t("resolve",{Node:s,"Node, Map | null | undefined":s,"Node, Object":(u,l)=>s(u,$o(l)),"Array | Matrix":t.referToSelf(u=>l=>l.map(c=>u(c))),"Array | Matrix, null | undefined":t.referToSelf(u=>l=>l.map(c=>u(c))),"Array, Object":t.referTo("Array,Map",u=>(l,c)=>u(l,$o(c))),"Matrix, Object":t.referTo("Matrix,Map",u=>(l,c)=>u(l,$o(c))),"Array | Matrix, Map":t.referToSelf(u=>(l,c)=>l.map(f=>u(f,c)))})}),gb="symbolicEqual",TQ=["parse","simplify","typed","OperatorNode"],FQ=B(gb,TQ,e=>{var{parse:t,simplify:r,typed:n,OperatorNode:a}=e;function i(o,s){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=new a("-","subtract",[o,s]),c=r(l,{},u);return lt(c)&&!c.value}return n(gb,{"Node, Node":i,"Node, Node, Object":i})}),vb="derivative",PQ=["typed","config","parse","simplify","equal","isZero","numeric","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode","SymbolNode"],kQ=B(vb,PQ,e=>{var{typed:t,config:r,parse:n,simplify:a,equal:i,isZero:o,numeric:s,ConstantNode:u,FunctionNode:l,OperatorNode:c,ParenthesisNode:f,SymbolNode:m}=e;function d(x,w){var v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{simplify:!0},A=new Map,C=w.name;function N(S){var F=A.get(S);if(F!==void 0)return F;var k=b(N,S,C);return A.set(S,k),k}var E=D(x,N);return v.simplify?a(E):E}function p(x){var w=n(x);if(!w.isSymbolNode)throw new TypeError("Invalid variable. "+"Cannot parse ".concat(JSON.stringify(x)," into a variable in function derivative"));return w}var h=t(vb,{"Node, SymbolNode":d,"Node, SymbolNode, Object":d,"Node, string":(x,w)=>d(x,p(w)),"Node, string, Object":(x,w,v)=>d(x,p(w),v)});h._simplify=!0,h.toTex=function(x){return y.apply(null,x.args)};var y=t("_derivTex",{"Node, SymbolNode":function(w,v){return lt(w)&&Mt(w.value)==="string"?y(n(w.value).toString(),v.toString(),1):y(w.toTex(),v.toString(),1)},"Node, ConstantNode":function(w,v){if(Mt(v.value)==="string")return y(w,n(v.value));throw new Error("The second parameter to 'derivative' is a non-string constant")},"Node, SymbolNode, ConstantNode":function(w,v,A){return y(w.toString(),v.name,A.value)},"string, string, number":function(w,v,A){var C;return A===1?C="{d\\over d"+v+"}":C="{d^{"+A+"}\\over d"+v+"^{"+A+"}}",C+"\\left[".concat(w,"\\right]")}}),b=t("_isConst",{"function, ConstantNode, string":function(){return!0},"function, SymbolNode, string":function(w,v,A){return v.name!==A},"function, ParenthesisNode, string":function(w,v,A){return w(v.content,A)},"function, FunctionAssignmentNode, string":function(w,v,A){return v.params.includes(A)?w(v.expr,A):!0},"function, FunctionNode | OperatorNode, string":function(w,v,A){return v.args.every(C=>w(C,A))}}),D=t("_derivative",{"ConstantNode, function":function(){return g(0)},"SymbolNode, function":function(w,v){return v(w)?g(0):g(1)},"ParenthesisNode, function":function(w,v){return new f(D(w.content,v))},"FunctionAssignmentNode, function":function(w,v){return v(w)?g(0):D(w.expr,v)},"FunctionNode, function":function(w,v){if(v(w))return g(0);var A=w.args[0],C,N=!1,E=!1,S;switch(w.name){case"cbrt":N=!0,S=new c("*","multiply",[g(3),new c("^","pow",[A,new c("/","divide",[g(2),g(3)])])]);break;case"sqrt":case"nthRoot":if(w.args.length===1)N=!0,S=new c("*","multiply",[g(2),new l("sqrt",[A])]);else if(w.args.length===2)return C=new c("/","divide",[g(1),w.args[1]]),D(new c("^","pow",[A,C]),v);break;case"log10":C=g(10);case"log":if(!C&&w.args.length===1)S=A.clone(),N=!0;else if(w.args.length===1&&C||w.args.length===2&&v(w.args[1]))S=new c("*","multiply",[A.clone(),new l("log",[C||w.args[1]])]),N=!0;else if(w.args.length===2)return D(new c("/","divide",[new l("log",[A]),new l("log",[w.args[1]])]),v);break;case"pow":if(w.args.length===2)return D(new c("^","pow",[A,w.args[1]]),v);break;case"exp":S=new l("exp",[A.clone()]);break;case"sin":S=new l("cos",[A.clone()]);break;case"cos":S=new c("-","unaryMinus",[new l("sin",[A.clone()])]);break;case"tan":S=new c("^","pow",[new l("sec",[A.clone()]),g(2)]);break;case"sec":S=new c("*","multiply",[w,new l("tan",[A.clone()])]);break;case"csc":E=!0,S=new c("*","multiply",[w,new l("cot",[A.clone()])]);break;case"cot":E=!0,S=new c("^","pow",[new l("csc",[A.clone()]),g(2)]);break;case"asin":N=!0,S=new l("sqrt",[new c("-","subtract",[g(1),new c("^","pow",[A.clone(),g(2)])])]);break;case"acos":N=!0,E=!0,S=new l("sqrt",[new c("-","subtract",[g(1),new c("^","pow",[A.clone(),g(2)])])]);break;case"atan":N=!0,S=new c("+","add",[new c("^","pow",[A.clone(),g(2)]),g(1)]);break;case"asec":N=!0,S=new c("*","multiply",[new l("abs",[A.clone()]),new l("sqrt",[new c("-","subtract",[new c("^","pow",[A.clone(),g(2)]),g(1)])])]);break;case"acsc":N=!0,E=!0,S=new c("*","multiply",[new l("abs",[A.clone()]),new l("sqrt",[new c("-","subtract",[new c("^","pow",[A.clone(),g(2)]),g(1)])])]);break;case"acot":N=!0,E=!0,S=new c("+","add",[new c("^","pow",[A.clone(),g(2)]),g(1)]);break;case"sinh":S=new l("cosh",[A.clone()]);break;case"cosh":S=new l("sinh",[A.clone()]);break;case"tanh":S=new c("^","pow",[new l("sech",[A.clone()]),g(2)]);break;case"sech":E=!0,S=new c("*","multiply",[w,new l("tanh",[A.clone()])]);break;case"csch":E=!0,S=new c("*","multiply",[w,new l("coth",[A.clone()])]);break;case"coth":E=!0,S=new c("^","pow",[new l("csch",[A.clone()]),g(2)]);break;case"asinh":N=!0,S=new l("sqrt",[new c("+","add",[new c("^","pow",[A.clone(),g(2)]),g(1)])]);break;case"acosh":N=!0,S=new l("sqrt",[new c("-","subtract",[new c("^","pow",[A.clone(),g(2)]),g(1)])]);break;case"atanh":N=!0,S=new c("-","subtract",[g(1),new c("^","pow",[A.clone(),g(2)])]);break;case"asech":N=!0,E=!0,S=new c("*","multiply",[A.clone(),new l("sqrt",[new c("-","subtract",[g(1),new c("^","pow",[A.clone(),g(2)])])])]);break;case"acsch":N=!0,E=!0,S=new c("*","multiply",[new l("abs",[A.clone()]),new l("sqrt",[new c("+","add",[new c("^","pow",[A.clone(),g(2)]),g(1)])])]);break;case"acoth":N=!0,E=!0,S=new c("-","subtract",[g(1),new c("^","pow",[A.clone(),g(2)])]);break;case"abs":S=new c("/","divide",[new l(new m("abs"),[A.clone()]),A.clone()]);break;case"gamma":default:throw new Error('Cannot process function "'+w.name+'" in derivative: the function is not supported, undefined, or the number of arguments passed to it are not supported')}var F,k;N?(F="/",k="divide"):(F="*",k="multiply");var $=D(A,v);return E&&($=new c("-","unaryMinus",[$])),new c(F,k,[$,S])},"OperatorNode, function":function(w,v){if(v(w))return g(0);if(w.op==="+")return new c(w.op,w.fn,w.args.map(function(T){return D(T,v)}));if(w.op==="-"){if(w.isUnary())return new c(w.op,w.fn,[D(w.args[0],v)]);if(w.isBinary())return new c(w.op,w.fn,[D(w.args[0],v),D(w.args[1],v)])}if(w.op==="*"){var A=w.args.filter(function(T){return v(T)});if(A.length>0){var C=w.args.filter(function(T){return!v(T)}),N=C.length===1?C[0]:new c("*","multiply",C),E=A.concat(D(N,v));return new c("*","multiply",E)}return new c("+","add",w.args.map(function(T){return new c("*","multiply",w.args.map(function(z){return z===T?D(z,v):z.clone()}))}))}if(w.op==="/"&&w.isBinary()){var S=w.args[0],F=w.args[1];return v(F)?new c("/","divide",[D(S,v),F]):v(S)?new c("*","multiply",[new c("-","unaryMinus",[S]),new c("/","divide",[D(F,v),new c("^","pow",[F.clone(),g(2)])])]):new c("/","divide",[new c("-","subtract",[new c("*","multiply",[D(S,v),F.clone()]),new c("*","multiply",[S.clone(),D(F,v)])]),new c("^","pow",[F.clone(),g(2)])])}if(w.op==="^"&&w.isBinary()){var k=w.args[0],$=w.args[1];if(v(k))return lt(k)&&(o(k.value)||i(k.value,1))?g(0):new c("*","multiply",[w,new c("*","multiply",[new l("log",[k.clone()]),D($.clone(),v)])]);if(v($)){if(lt($)){if(o($.value))return g(0);if(i($.value,1))return D(k,v)}var _=new c("^","pow",[k.clone(),new c("-","subtract",[$,g(1)])]);return new c("*","multiply",[$.clone(),new c("*","multiply",[D(k,v),_])])}return new c("*","multiply",[new c("^","pow",[k.clone(),$.clone()]),new c("+","add",[new c("*","multiply",[D(k,v),new c("/","divide",[$.clone(),k.clone()])]),new c("*","multiply",[D($,v),new l("log",[k.clone()])])])])}throw new Error('Cannot process operator "'+w.op+'" in derivative: the operator is not supported, undefined, or the number of arguments passed to it are not supported')}});function g(x,w){return new u(s(x,mi(String(x),r)))}return h}),yb="rationalize",OQ=["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"],$Q=B(yb,OQ,e=>{var{config:t,typed:r,equal:n,isZero:a,add:i,subtract:o,multiply:s,divide:u,pow:l,parse:c,simplifyConstant:f,simplifyCore:m,simplify:d,fraction:p,bignumber:h,mathWithTransform:y,matrix:b,AccessorNode:D,ArrayNode:g,ConstantNode:x,FunctionNode:w,IndexNode:v,ObjectNode:A,OperatorNode:C,SymbolNode:N,ParenthesisNode:E}=e;function S(T){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,j=k(),O=F(T,z,!0,j.firstRules),Q=O.variables.length,K={exactFractions:!1},U={exactFractions:!0};if(T=O.expression,Q>=1){T=$(T);var V,le,ne=!0,ee=!1;T=d(T,j.firstRules,{},K);for(var L;le=ne?j.distrDivRules:j.sucDivRules,T=d(T,le,{},U),ne=!ne,L=T.toString(),L!==V;)ee=!0,V=L;ee&&(T=d(T,j.firstRulesAgain,{},K)),T=d(T,j.finalRules,{},K)}var R=[],J={};return T.type==="OperatorNode"&&T.isBinary()&&T.op==="/"?(Q===1&&(T.args[0]=_(T.args[0],R),T.args[1]=_(T.args[1])),P&&(J.numerator=T.args[0],J.denominator=T.args[1])):(Q===1&&(T=_(T,R)),P&&(J.numerator=T,J.denominator=null)),P?(J.coefficients=R,J.variables=O.variables,J.expression=T,J):T}return r(yb,{Node:S,"Node, boolean":(T,z)=>S(T,{},z),"Node, Object":S,"Node, Object, boolean":S});function F(T,z,P,j){var O=[],Q=d(T,j,z,{exactFractions:!1});P=!!P;var K="+-*"+(P?"/":"");V(Q);var U={};return U.expression=Q,U.variables=O,U;function V(le){var ne=le.type;if(ne==="FunctionNode")throw new Error("There is an unsolved function call");if(ne==="OperatorNode")if(le.op==="^"){if(le.args[1].type!=="ConstantNode"||!$e(parseFloat(le.args[1].value)))throw new Error("There is a non-integer exponent");V(le.args[0])}else{if(!K.includes(le.op))throw new Error("Operator "+le.op+" invalid in polynomial expression");for(var ee=0;ee<le.args.length;ee++)V(le.args[ee])}else if(ne==="SymbolNode"){var L=le.name,R=O.indexOf(L);R===-1&&O.push(L)}else if(ne==="ParenthesisNode")V(le.content);else if(ne!=="ConstantNode")throw new Error("type "+ne+" is not allowed in polynomial expression")}}function k(){var T=[m,{l:"n+n",r:"2*n"},{l:"n+-n",r:"0"},f,{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"}],z=[{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)"}],P=[{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)"}],j=[{l:"(n1/(n2/n3))",r:"((n1*n3)/n2)"},{l:"(n1/n2/n3)",r:"(n1/(n2*n3))"}],O={};return O.firstRules=T.concat(z,j),O.distrDivRules=P,O.sucDivRules=j,O.firstRulesAgain=T.concat(z),O.finalRules=[m,{l:"n*-n",r:"-n^2"},{l:"n*n",r:"n^2"},f,{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))"}],O}function $(T,z,P){var j=T.type,O=arguments.length>1;if(j==="OperatorNode"&&T.isBinary()){var Q=!1,K;if(T.op==="^"&&(T.args[0].type==="ParenthesisNode"||T.args[0].type==="OperatorNode")&&T.args[1].type==="ConstantNode"&&(K=parseFloat(T.args[1].value),Q=K>=2&&$e(K)),Q){if(K>2){var U=T.args[0],V=new C("^","pow",[T.args[0].cloneDeep(),new x(K-1)]);T=new C("*","multiply",[U,V])}else T=new C("*","multiply",[T.args[0],T.args[0].cloneDeep()]);O&&(P==="content"?z.content=T:z.args[P]=T)}}if(j==="ParenthesisNode")$(T.content,T,"content");else if(j!=="ConstantNode"&&j!=="SymbolNode")for(var le=0;le<T.args.length;le++)$(T.args[le],T,le);if(!O)return T}function _(T,z){z===void 0&&(z=[]),z[0]=0;var P={};P.cte=1,P.oper="+",P.fire="";var j=0,O="";L(T,null,P),j=z.length-1;for(var Q=!0,K,U=j;U>=0;U--)if(z[U]!==0){var V=new x(Q?z[U]:Math.abs(z[U])),le=z[U]<0?"-":"+";if(U>0){var ne=new N(O);if(U>1){var ee=new x(U);ne=new C("^","pow",[ne,ee])}z[U]===-1&&Q?V=new C("-","unaryMinus",[ne]):Math.abs(z[U])===1?V=ne:V=new C("*","multiply",[V,ne])}Q?K=V:le==="+"?K=new C("+","add",[K,V]):K=new C("-","subtract",[K,V]),Q=!1}if(Q)return new x(0);return K;function L(R,J,re){var te=R.type;if(te==="FunctionNode")throw new Error("There is an unsolved function call");if(te==="OperatorNode"){if(!"+-*^".includes(R.op))throw new Error("Operator "+R.op+" invalid");if(J!==null){if((R.fn==="unaryMinus"||R.fn==="pow")&&J.fn!=="add"&&J.fn!=="subtract"&&J.fn!=="multiply")throw new Error("Invalid "+R.op+" placing");if((R.fn==="subtract"||R.fn==="add"||R.fn==="multiply")&&J.fn!=="add"&&J.fn!=="subtract")throw new Error("Invalid "+R.op+" placing");if((R.fn==="subtract"||R.fn==="add"||R.fn==="unaryMinus")&&re.noFil!==0)throw new Error("Invalid "+R.op+" placing")}(R.op==="^"||R.op==="*")&&(re.fire=R.op);for(var ue=0;ue<R.args.length;ue++)R.fn==="unaryMinus"&&(re.oper="-"),(R.op==="+"||R.fn==="subtract")&&(re.fire="",re.cte=1,re.oper=ue===0?"+":R.op),re.noFil=ue,L(R.args[ue],R,re)}else if(te==="SymbolNode"){if(R.name!==O&&O!=="")throw new Error("There is more than one variable");if(O=R.name,J===null){z[1]=1;return}if(J.op==="^"&&re.noFil!==0)throw new Error("In power the variable should be the first parameter");if(J.op==="*"&&re.noFil!==1)throw new Error("In multiply the variable should be the second parameter");(re.fire===""||re.fire==="*")&&(j<1&&(z[1]=0),z[1]+=re.cte*(re.oper==="+"?1:-1),j=Math.max(1,j))}else if(te==="ConstantNode"){var oe=parseFloat(R.value);if(J===null){z[0]=oe;return}if(J.op==="^"){if(re.noFil!==1)throw new Error("Constant cannot be powered");if(!$e(oe)||oe<=0)throw new Error("Non-integer exponent is not allowed");for(var De=j+1;De<oe;De++)z[De]=0;oe>j&&(z[oe]=0),z[oe]+=re.cte*(re.oper==="+"?1:-1),j=Math.max(oe,j);return}re.cte=oe,re.fire===""&&(z[0]+=re.cte*(re.oper==="+"?1:-1))}else throw new Error("Type "+te+" is not allowed")}}}),bb="zpk2tf",_Q=["typed","add","multiply","Complex","number"],BQ=B(bb,_Q,e=>{var{typed:t,add:r,multiply:n,Complex:a,number:i}=e;return t(bb,{"Array,Array,number":function(l,c,f){return o(l,c,f)},"Array,Array":function(l,c){return o(l,c,1)},"Matrix,Matrix,number":function(l,c,f){return o(l.valueOf(),c.valueOf(),f)},"Matrix,Matrix":function(l,c){return o(l.valueOf(),c.valueOf(),1)}});function o(u,l,c){u.some(D=>D.type==="BigNumber")&&(u=u.map(D=>i(D))),l.some(D=>D.type==="BigNumber")&&(l=l.map(D=>i(D)));for(var f=[a(1,0)],m=[a(1,0)],d=0;d<u.length;d++){var p=u[d];typeof p=="number"&&(p=a(p,0)),f=s(f,[a(1,0),a(-p.re,-p.im)])}for(var h=0;h<l.length;h++){var y=l[h];typeof y=="number"&&(y=a(y,0)),m=s(m,[a(1,0),a(-y.re,-y.im)])}for(var b=0;b<f.length;b++)f[b]=n(f[b],c);return[f,m]}function s(u,l){for(var c=[],f=0;f<u.length+l.length-1;f++){c[f]=a(0,0);for(var m=0;m<u.length;m++)f-m>=0&&f-m<l.length&&(c[f]=r(c[f],n(u[m],l[f-m])))}return c}}),wb="freqz",IQ=["typed","add","multiply","Complex","divide","matrix"],zQ=B(wb,IQ,e=>{var{typed:t,add:r,multiply:n,Complex:a,divide:i,matrix:o}=e;return t(wb,{"Array, Array":function(c,f){var m=u(512);return s(c,f,m)},"Array, Array, Array":function(c,f,m){return s(c,f,m)},"Array, Array, number":function(c,f,m){if(m<0)throw new Error("w must be a positive number");var d=u(m);return s(c,f,d)},"Matrix, Matrix":function(c,f){var m=u(512),{w:d,h:p}=s(c.valueOf(),f.valueOf(),m);return{w:o(d),h:o(p)}},"Matrix, Matrix, Matrix":function(c,f,m){var{h:d}=s(c.valueOf(),f.valueOf(),m.valueOf());return{h:o(d),w:o(m)}},"Matrix, Matrix, number":function(c,f,m){if(m<0)throw new Error("w must be a positive number");var d=u(m),{h:p}=s(c.valueOf(),f.valueOf(),d);return{h:o(p),w:o(d)}}});function s(l,c,f){for(var m=[],d=[],p=0;p<f.length;p++){for(var h=a(0,0),y=a(0,0),b=0;b<l.length;b++)h=r(h,n(l[b],a(Math.cos(-b*f[p]),Math.sin(-b*f[p]))));for(var D=0;D<c.length;D++)y=r(y,n(c[D],a(Math.cos(-D*f[p]),Math.sin(-D*f[p]))));m.push(h),d.push(y)}for(var g=[],x=0;x<m.length;x++)g.push(i(m[x],d[x]));return{h:g,w:f}}function u(l){for(var c=[],f=0;f<l;f++)c.push(f/l*Math.PI);return c}}),jQ="reviver",qQ=["classes"],RQ=B(jQ,qQ,e=>{var{classes:t}=e;return function(n,a){var i=t[a&&a.mathjs];return i&&typeof i.fromJSON=="function"?i.fromJSON(a):a}}),LQ="replacer",HQ=[],GQ=B(LQ,HQ,()=>function(t,r){return typeof r=="number"&&(!isFinite(r)||isNaN(r))?{mathjs:"number",value:String(r)}:typeof r=="bigint"?{mathjs:"bigint",value:String(r)}:r}),VQ="14.5.2",UQ=B("true",[],()=>!0),WQ=B("false",[],()=>!1),JQ=B("null",[],()=>null),KQ=fn("Infinity",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(1/0):1/0}),YQ=fn("NaN",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(NaN):NaN}),ZQ=fn("pi",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?Td(r):tI}),QQ=fn("tau",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?SL(r):rI}),XQ=fn("e",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?CL(r):nI}),eX=fn("phi",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?EL(r):aI}),tX=fn("LN2",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(2).ln():Math.LN2}),rX=fn("LN10",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(10).ln():Math.LN10}),nX=fn("LOG2E",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(1).div(new r(2).ln()):Math.LOG2E}),aX=fn("LOG10E",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(1).div(new r(10).ln()):Math.LOG10E}),iX=fn("SQRT1_2",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r("0.5").sqrt():Math.SQRT1_2}),oX=fn("SQRT2",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(2).sqrt():Math.SQRT2}),sX=fn("i",["Complex"],e=>{var{Complex:t}=e;return t.I}),uX=B("version",[],()=>VQ);function fn(e,t,r){return B(e,t,r,{recreateOnConfigChange:!0})}var lX=We("speedOfLight","299792458","m s^-1"),cX=We("gravitationConstant","6.67430e-11","m^3 kg^-1 s^-2"),fX=We("planckConstant","6.62607015e-34","J s"),mX=We("reducedPlanckConstant","1.0545718176461565e-34","J s"),dX=We("magneticConstant","1.25663706212e-6","N A^-2"),hX=We("electricConstant","8.8541878128e-12","F m^-1"),pX=We("vacuumImpedance","376.730313667","ohm"),gX=We("coulomb","8.987551792261171e9","N m^2 C^-2"),vX=We("coulombConstant","8.987551792261171e9","N m^2 C^-2"),yX=We("elementaryCharge","1.602176634e-19","C"),bX=We("bohrMagneton","9.2740100783e-24","J T^-1"),wX=We("conductanceQuantum","7.748091729863649e-5","S"),xX=We("inverseConductanceQuantum","12906.403729652257","ohm"),DX=We("magneticFluxQuantum","2.0678338484619295e-15","Wb"),NX=We("nuclearMagneton","5.0507837461e-27","J T^-1"),AX=We("klitzing","25812.807459304513","ohm"),CX=We("bohrRadius","5.29177210903e-11","m"),EX=We("classicalElectronRadius","2.8179403262e-15","m"),SX=We("electronMass","9.1093837015e-31","kg"),MX=We("fermiCoupling","1.1663787e-5","GeV^-2"),TX=Nc("fineStructure",.0072973525693),FX=We("hartreeEnergy","4.3597447222071e-18","J"),PX=We("protonMass","1.67262192369e-27","kg"),kX=We("deuteronMass","3.3435830926e-27","kg"),OX=We("neutronMass","1.6749271613e-27","kg"),$X=We("quantumOfCirculation","3.6369475516e-4","m^2 s^-1"),_X=We("rydberg","10973731.568160","m^-1"),BX=We("thomsonCrossSection","6.6524587321e-29","m^2"),IX=Nc("weakMixingAngle",.2229),zX=Nc("efimovFactor",22.7),jX=We("atomicMass","1.66053906660e-27","kg"),qX=We("avogadro","6.02214076e23","mol^-1"),RX=We("boltzmann","1.380649e-23","J K^-1"),LX=We("faraday","96485.33212331001","C mol^-1"),HX=We("firstRadiation","3.7417718521927573e-16","W m^2"),GX=We("loschmidt","2.686780111798444e25","m^-3"),VX=We("gasConstant","8.31446261815324","J K^-1 mol^-1"),UX=We("molarPlanckConstant","3.990312712893431e-10","J s mol^-1"),WX=We("molarVolume","0.022413969545014137","m^3 mol^-1"),JX=Nc("sackurTetrode",-1.16487052358),KX=We("secondRadiation","0.014387768775039337","m K"),YX=We("stefanBoltzmann","5.67037441918443e-8","W m^-2 K^-4"),ZX=We("wienDisplacement","2.897771955e-3","m K"),QX=We("molarMass","0.99999999965e-3","kg mol^-1"),XX=We("molarMassC12","11.9999999958e-3","kg mol^-1"),eee=We("gravity","9.80665","m s^-2"),tee=We("planckLength","1.616255e-35","m"),ree=We("planckMass","2.176435e-8","kg"),nee=We("planckTime","5.391245e-44","s"),aee=We("planckCharge","1.87554603778e-18","C"),iee=We("planckTemperature","1.416785e+32","K");function We(e,t,r){var n=["config","Unit","BigNumber"];return B(e,n,a=>{var{config:i,Unit:o,BigNumber:s}=a,u=i.number==="BigNumber"?new s(t):parseFloat(t),l=new o(u,r);return l.fixPrefix=!0,l})}function Nc(e,t){var r=["config","BigNumber"];return B(e,r,n=>{var{config:a,BigNumber:i}=n;return a.number==="BigNumber"?new i(t):t})}function xb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function oee(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xb(Object(r),!0).forEach(function(n){rr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var see="mapSlices",uee=["typed","isInteger"],lee=B(see,uee,e=>{var{typed:t,isInteger:r}=e,n=zm({typed:t,isInteger:r});return t("mapSlices",{"...any":function(i){var o=i[1];Ze(o)?i[1]=o-1:Qe(o)&&(i[1]=o.minus(1));try{return n.apply(null,i)}catch(s){throw Wr(s)}}})},oee({isTransformFunction:!0},zm.meta)),cee="column",fee=["typed","Index","matrix","range"],mee=B(cee,fee,e=>{var{typed:t,Index:r,matrix:n,range:a}=e,i=y2({typed:t,Index:r,matrix:n,range:a});return t("column",{"...any":function(s){var u=s.length-1,l=s[u];Ze(l)&&(s[u]=l-1);try{return i.apply(null,s)}catch(c){throw Wr(c)}}})},{isTransformFunction:!0});function kd(e,t,r){var n=e.filter(function(u){return pr(u)&&!(u.name in t)&&!r.has(u.name)})[0];if(!n)throw new Error('No undefined variable found in inline expression "'+e+'"');var a=n.name,i=new Map,o=new Lw(r,i,new Set([a])),s=e.compile();return function(l){return i.set(a,l),s.evaluate(o)}}var dee="transformCallback",hee=["typed"],Od=B(dee,hee,e=>{var{typed:t}=e;return function(n,a){return t.isTypedFunction(n)?r(n,a):Db(n,n.length,a)};function r(n,a){var i=Object.fromEntries(Object.entries(n.signatures).map(o=>{var[s,u]=o,l=s.split(",").length;return t.isTypedFunction(u)?[s,r(u,a)]:[s,Db(u,l,a)]}));return typeof n.name=="string"?t(n.name,i):t(i)}});function Db(e,t,r){return t===r?e:t===r+1?function(){for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];var o=a.slice(0,r),s=Nb(a[r]);return e(...o,s)}:t>r+1?function(){for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];var o=a.slice(0,r),s=Nb(a[r]),u=a.slice(r+1);return e(...o,s,...u)}:e}function Nb(e){return e.map(t=>t+1)}var pee="filter",gee=["typed"],vee=B(pee,gee,e=>{var{typed:t}=e;function r(a,i,o){var s=b2({typed:t}),u=Od({typed:t});if(a.length===0)return s();var l=a[0];if(a.length===1)return s(l);var c=a.length-1,f=a[c];return l&&(l=n(l,o)),f&&(pr(f)||Qs(f)?f=n(f,o):f=kd(f,i,o)),s(l,u(f,c))}r.rawArgs=!0;function n(a,i){return a.compile().evaluate(i)}return r},{isTransformFunction:!0}),yee="forEach",bee=["typed"],wee=B(yee,bee,e=>{var{typed:t}=e,r=w2({typed:t}),n=Od({typed:t});function a(o,s,u){if(o.length===0)return r();var l=o[0];if(o.length===1)return r(l);var c=o.length-1,f=o[c];return l&&(l=i(l,u)),f&&(pr(f)||Qs(f)?f=i(f,u):f=kd(f,s,u)),r(l,n(f,c))}a.rawArgs=!0;function i(o,s){return o.compile().evaluate(s)}return a},{isTransformFunction:!0}),xee="index",Dee=["Index","getMatrixDataType"],Nee=B(xee,Dee,e=>{var{Index:t,getMatrixDataType:r}=e;return function(){for(var a=[],i=0,o=arguments.length;i<o;i++){var s=arguments[i];if(hd(s))s.start--,s.end-=s.step>0?0:2;else if(s&&s.isSet===!0)s=s.map(function(l){return l-1});else if(Et(s)||je(s))r(s)!=="boolean"&&(s=s.map(function(l){return l-1}));else if(Ze(s)||Ms(s))s--;else if(Qe(s))s=s.toNumber()-1;else if(typeof s!="string")throw new TypeError("Dimension must be an Array, Matrix, number, bigint, string, or Range");a[i]=s}var u=new t;return t.apply(u,a),u}},{isTransformFunction:!0}),Aee="map",Cee=["typed"],Eee=B(Aee,Cee,e=>{var{typed:t}=e,r=x2({typed:t}),n=Od({typed:t});function a(i,o,s){if(i.length===0)return r();if(i.length===1)return r(i[0]);var u=i.length-1,l=i.slice(0,u),c=i[u];return l=l.map(m=>f(m,s)),c&&(pr(c)||Qs(c)?c=f(c,s):c=kd(c,o,s)),r(...l,n(c,u));function f(m,d){return m.compile().evaluate(d)}}return a.rawArgs=!0,a},{isTransformFunction:!0});function See(e){return Ze(e)?e-1:Qe(e)?e.minus(1):e}function Mee(e){return Ze(e)||Qe(e)}function pi(e){if(e.length===2&&Mn(e[0])){e=e.slice();var t=e[1];Mee(t)&&(e[1]=See(t))}return e}var Tee="max",Fee=["typed","config","numeric","larger","isNaN"],Pee=B(Tee,Fee,e=>{var{typed:t,config:r,numeric:n,larger:a,isNaN:i}=e,o=P2({typed:t,config:r,numeric:n,larger:a,isNaN:i});return t("max",{"...any":function(u){u=pi(u);try{return o.apply(null,u)}catch(l){throw Wr(l)}}})},{isTransformFunction:!0}),kee="mean",Oee=["typed","add","divide"],$ee=B(kee,Oee,e=>{var{typed:t,add:r,divide:n}=e,a=q2({typed:t,add:r,divide:n});return t("mean",{"...any":function(o){o=pi(o);try{return a.apply(null,o)}catch(s){throw Wr(s)}}})},{isTransformFunction:!0}),_ee="min",Bee=["typed","config","numeric","smaller","isNaN"],Iee=B(_ee,Bee,e=>{var{typed:t,config:r,numeric:n,smaller:a,isNaN:i}=e,o=k2({typed:t,config:r,numeric:n,smaller:a,isNaN:i});return t("min",{"...any":function(u){u=pi(u);try{return o.apply(null,u)}catch(l){throw Wr(l)}}})},{isTransformFunction:!0}),zee="range",jee=["typed","config","?matrix","?bignumber","smaller","smallerEq","larger","largerEq","add","isPositive"],qee=B(zee,jee,e=>{var{typed:t,config:r,matrix:n,bignumber:a,smaller:i,smallerEq:o,larger:s,largerEq:u,add:l,isPositive:c}=e,f=C2({typed:t,config:r,matrix:n,bignumber:a,smaller:i,smallerEq:o,larger:s,largerEq:u,add:l,isPositive:c});return t("range",{"...any":function(d){var p=d.length-1,h=d[p];return typeof h!="boolean"&&d.push(!0),f.apply(null,d)}})},{isTransformFunction:!0}),Ree="row",Lee=["typed","Index","matrix","range"],Hee=B(Ree,Lee,e=>{var{typed:t,Index:r,matrix:n,range:a}=e,i=E2({typed:t,Index:r,matrix:n,range:a});return t("row",{"...any":function(s){var u=s.length-1,l=s[u];Ze(l)&&(s[u]=l-1);try{return i.apply(null,s)}catch(c){throw Wr(c)}}})},{isTransformFunction:!0}),Gee="subset",Vee=["typed","matrix","zeros","add"],Uee=B(Gee,Vee,e=>{var{typed:t,matrix:r,zeros:n,add:a}=e,i=S2({typed:t,matrix:r,zeros:n,add:a});return t("subset",{"...any":function(s){try{return i.apply(null,s)}catch(u){throw Wr(u)}}})},{isTransformFunction:!0}),Wee="concat",Jee=["typed","matrix","isInteger"],Kee=B(Wee,Jee,e=>{var{typed:t,matrix:r,isInteger:n}=e,a=v2({typed:t,matrix:r,isInteger:n});return t("concat",{"...any":function(o){var s=o.length-1,u=o[s];Ze(u)?o[s]=u-1:Qe(u)&&(o[s]=u.minus(1));try{return a.apply(null,o)}catch(l){throw Wr(l)}}})},{isTransformFunction:!0}),Ab="diff",Yee=["typed","matrix","subtract","number","bignumber"],Zee=B(Ab,Yee,e=>{var{typed:t,matrix:r,subtract:n,number:a,bignumber:i}=e,o=D2({typed:t,matrix:r,subtract:n,number:a,bignumber:i});return t(Ab,{"...any":function(u){u=pi(u);try{return o.apply(null,u)}catch(l){throw Wr(l)}}})},{isTransformFunction:!0}),Qee="std",Xee=["typed","map","sqrt","variance"],ete=B(Qee,Xee,e=>{var{typed:t,map:r,sqrt:n,variance:a}=e,i=H2({typed:t,map:r,sqrt:n,variance:a});return t("std",{"...any":function(s){s=pi(s);try{return i.apply(null,s)}catch(u){throw Wr(u)}}})},{isTransformFunction:!0}),Cb="sum",tte=["typed","config","add","numeric"],rte=B(Cb,tte,e=>{var{typed:t,config:r,add:n,numeric:a}=e,i=z2({typed:t,config:r,add:n,numeric:a});return t(Cb,{"...any":function(s){s=pi(s);try{return i.apply(null,s)}catch(u){throw Wr(u)}}})},{isTransformFunction:!0}),nte="quantileSeq",ate=["typed","bignumber","add","subtract","divide","multiply","partitionSelect","compare","isInteger","smaller","smallerEq","larger","mapSlices"],ite=B(nte,ate,e=>{var{typed:t,bignumber:r,add:n,subtract:a,divide:i,multiply:o,partitionSelect:s,compare:u,isInteger:l,smaller:c,smallerEq:f,larger:m,mapSlices:d}=e,p=L2({typed:t,bignumber:r,add:n,subtract:a,divide:i,multiply:o,partitionSelect:s,compare:u,isInteger:l,smaller:c,smallerEq:f,larger:m,mapSlices:d});return t("quantileSeq",{"Array | Matrix, number | BigNumber":p,"Array | Matrix, number | BigNumber, number":(y,b,D)=>p(y,b,h(D)),"Array | Matrix, number | BigNumber, boolean":p,"Array | Matrix, number | BigNumber, boolean, number":(y,b,D,g)=>p(y,b,D,h(g)),"Array | Matrix, Array | Matrix":p,"Array | Matrix, Array | Matrix, number":(y,b,D)=>p(y,b,h(D)),"Array | Matrix, Array | Matrix, boolean":p,"Array | Matrix, Array | Matrix, boolean, number":(y,b,D,g)=>p(y,b,D,h(g))});function h(y){return pi([[],y])[1]}},{isTransformFunction:!0}),Eb="cumsum",ote=["typed","add","unaryPlus"],ste=B(Eb,ote,e=>{var{typed:t,add:r,unaryPlus:n}=e,a=j2({typed:t,add:r,unaryPlus:n});return t(Eb,{"...any":function(o){if(o.length===2&&Mn(o[0])){var s=o[1];Ze(s)?o[1]=s-1:Qe(s)&&(o[1]=s.minus(1))}try{return a.apply(null,o)}catch(u){throw Wr(u)}}})},{isTransformFunction:!0}),Sb="variance",ute=["typed","add","subtract","multiply","divide","mapSlices","isNaN"],lte=B(Sb,ute,e=>{var{typed:t,add:r,subtract:n,multiply:a,divide:i,mapSlices:o,isNaN:s}=e,u=R2({typed:t,add:r,subtract:n,multiply:a,divide:i,mapSlices:o,isNaN:s});return t(Sb,{"...any":function(c){c=pi(c);try{return u.apply(null,c)}catch(f){throw Wr(f)}}})},{isTransformFunction:!0}),Mb="print",cte=["typed","matrix","zeros","add"],fte=B(Mb,cte,e=>{var{typed:t,matrix:r,zeros:n,add:a}=e,i=T2({typed:t,matrix:r,zeros:n,add:a});return t(Mb,{"string, Object | Array":function(u,l){return i(o(u),l)},"string, Object | Array, number | Object":function(u,l,c){return i(o(u),l,c)}});function o(s){return s.replace(M2,u=>{var l=u.slice(1).split("."),c=l.map(function(f){return!isNaN(f)&&f.length>0?parseInt(f)-1:f});return"$"+c.join(".")})}},{isTransformFunction:!0}),mte="and",dte=["typed","matrix","zeros","add","equalScalar","not","concat"],hte=B(mte,dte,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:a,not:i,concat:o}=e,s=F2({typed:t,matrix:r,equalScalar:n,zeros:a,not:i,concat:o});function u(l,c,f){var m=l[0].compile().evaluate(f);if(!Mn(m)&&!s(m,!0))return!1;var d=l[1].compile().evaluate(f);return s(m,d)}return u.rawArgs=!0,u},{isTransformFunction:!0}),pte="or",gte=["typed","matrix","equalScalar","DenseMatrix","concat"],vte=B(pte,gte,e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i}=e,o=g2({typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i});function s(u,l,c){var f=u[0].compile().evaluate(c);if(!Mn(f)&&o(f,!1))return!0;var m=u[1].compile().evaluate(c);return o(f,m)}return s.rawArgs=!0,s},{isTransformFunction:!0}),yte="bitAnd",bte=["typed","matrix","zeros","add","equalScalar","not","concat"],wte=B(yte,bte,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:a,not:i,concat:o}=e,s=h2({typed:t,matrix:r,equalScalar:n,zeros:a,not:i,concat:o});function u(l,c,f){var m=l[0].compile().evaluate(f);if(!Mn(m)){if(isNaN(m))return NaN;if(m===0||m===!1)return 0}var d=l[1].compile().evaluate(f);return s(m,d)}return u.rawArgs=!0,u},{isTransformFunction:!0}),xte="bitOr",Dte=["typed","matrix","equalScalar","DenseMatrix","concat"],Nte=B(xte,Dte,e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i}=e,o=p2({typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i});function s(u,l,c){var f=u[0].compile().evaluate(c);if(!Mn(f)){if(isNaN(f))return NaN;if(f===-1)return-1;if(f===!0)return 1}var m=u[1].compile().evaluate(c);return o(f,m)}return s.rawArgs=!0,s},{isTransformFunction:!0}),Ce=p8({config:de}),Tt=w8({}),Tb=XQ({BigNumber:Ce,config:de}),Ate=WQ({}),Cte=TX({BigNumber:Ce,config:de}),eo=S8({}),V2=sX({Complex:Tt}),Ete=KQ({BigNumber:Ce,config:de}),Ste=rX({BigNumber:Ce,config:de}),Mte=aX({BigNumber:Ce,config:de}),Ac=O8({}),Tte=YQ({BigNumber:Ce,config:de}),Fte=JQ({}),Pte=eX({BigNumber:Ce,config:de}),kte=F8({}),U2=b9({}),Ote=iX({BigNumber:Ce,config:de}),$te=JX({BigNumber:Ce,config:de}),W2=QQ({BigNumber:Ce,config:de}),_te=UQ({}),Bte=uX({}),rt=K8({Matrix:Ac}),Ite=zX({BigNumber:Ce,config:de}),zte=tX({BigNumber:Ce,config:de}),Um=ZQ({BigNumber:Ce,config:de}),J2=GQ({}),jte=oX({BigNumber:Ce,config:de}),G=p9({BigNumber:Ce,Complex:Tt,DenseMatrix:rt,Fraction:eo}),qte=IX({BigNumber:Ce,config:de}),Jr=c7({typed:G}),Rte=zL({Complex:Tt,config:de,typed:G}),Lte=LL({BigNumber:Ce,typed:G}),Hte=UL({BigNumber:Ce,Complex:Tt,config:de,typed:G}),sr=h7({typed:G}),Gte=rj({typed:G}),Vte=QL({BigNumber:Ce,Complex:Tt,config:de,typed:G}),Ute=nH({typed:G}),K2=oH({typed:G}),Wte=cH({Complex:Tt,config:de,typed:G}),Jte=_I({typed:G}),Kte=Kz({typed:G}),Yte=jI({typed:G}),Zte=Z8({typed:G}),Cc=bZ({typed:G}),Ec=VI({Complex:Tt,typed:G}),to=aj({typed:G}),$d=mH({typed:G}),Qte=gH({BigNumber:Ce,typed:G}),Xte=wH({BigNumber:Ce,typed:G}),ere=F7({typed:G}),ot=AI({config:de,typed:G}),tre=Dq({typed:G}),Y2=k7({typed:G}),rre=$7({Complex:Tt,typed:G}),nre=b2({typed:G}),ru=Cj({typed:G}),are=w2({typed:G}),nu=Oq({typed:G}),_d=Tj({typed:G}),ire=jq({format:nu,typed:G}),Bd=oj({typed:G}),Xr=X8({typed:G}),gi=lI({config:de,typed:G}),ro=pI({config:de,typed:G}),la=vI({equalScalar:ot,typed:G}),ore=nX({BigNumber:Ce,config:de}),sre=CZ({Complex:Tt,typed:G}),ure=pz({Complex:Tt,config:de,typed:G}),Id=vz({Complex:Tt,config:de,typed:G}),no=x2({typed:G}),Kt=wz({typed:G}),ac=cj({typed:G}),ja=kI({typed:G}),lre=Iq({format:nu,typed:G}),cre=tQ({config:de,typed:G}),fre=T2({typed:G}),mre=nQ({config:de,typed:G}),zd=uj({typed:G}),dre=AH({BigNumber:Ce,typed:G}),Z2=Ez({BigNumber:Ce,Fraction:eo,complex:Ec,typed:G}),Sc=MH({typed:G}),ur=SI({Matrix:Ac,equalScalar:ot,typed:G}),hre=a7({typed:G}),pre=Pz({typed:G}),gre=II({typed:G}),Fn=g7({typed:G}),vre=kH({typed:G}),jd=xI({typed:G}),yre=qL({Complex:Tt,config:de,typed:G}),bre=JL({BigNumber:Ce,typed:G}),wre=YL({BigNumber:Ce,Complex:Tt,config:de,typed:G}),en=LI({BigNumber:Ce,typed:G}),xre=xZ({typed:G}),Dre=hH({typed:G}),Nre=DH({BigNumber:Ce,typed:G}),ka=bI({typed:G}),Are=Gq({typed:G}),Ls=zm({isInteger:Xr,typed:G}),Ne=YI({DenseMatrix:rt,Matrix:Ac,SparseMatrix:ur,typed:G}),Cre=QI({isZero:la,matrix:Ne,typed:G}),Ere=zj({BigNumber:Ce,config:de,matrix:Ne,typed:G}),Sre=iQ({config:de,log2:Id,typed:G}),Q2=Rj({isInteger:Xr,matrix:Ne,typed:G}),Mre=EH({BigNumber:Ce,typed:G}),Tre=FH({typed:G}),Fre=$L({SparseMatrix:ur,typed:G}),Zn=Tz({Complex:Tt,config:de,typed:G}),Pre=Xj({typed:G}),kre=_H({typed:G}),au=iq({matrix:Ne,typed:G}),X2=_z({BigNumber:Ce,config:de,matrix:Ne,typed:G}),Dr=lq({BigNumber:Ce,config:de,matrix:Ne,typed:G}),Ore=GL({BigNumber:Ce,Complex:Tt,config:de,typed:G}),$re=eH({Complex:Tt,config:de,typed:G}),_re=_q({format:nu,typed:G}),ct=v2({isInteger:Xr,matrix:Ne,typed:G}),Bre=yH({BigNumber:Ce,typed:G}),qd=sq({conj:to,transpose:au,typed:G}),eD=xj({DenseMatrix:rt,SparseMatrix:ur,matrix:Ne,typed:G}),Ire=Rz({concat:ct,equalScalar:ot,matrix:Ne,multiplyScalar:Kt,typed:G}),Pn=jR({DenseMatrix:rt,SparseMatrix:ur,concat:ct,equalScalar:ot,matrix:Ne,typed:G}),iu=JI({Fraction:eo,typed:G}),vi=Pj({BigNumber:Ce,DenseMatrix:rt,SparseMatrix:ur,config:de,matrix:Ne,typed:G}),ao=fI({typed:G}),zre=Oj({matrix:Ne,multiplyScalar:Kt,typed:G}),Mc=XR({DenseMatrix:rt,SparseMatrix:ur,concat:ct,config:de,matrix:Ne,typed:G}),jre=DR({DenseMatrix:rt,concat:ct,equalScalar:ot,matrix:Ne,typed:G,zeros:Dr}),qre=Tq({isNaN:ka,isNumeric:ao,typed:G}),Rre=Az({BigNumber:Ce,concat:ct,equalScalar:ot,matrix:Ne,typed:G}),Sn=Wq({bignumber:en,fraction:iu,number:ja}),tD=Pq({config:de,multiplyScalar:Kt,numeric:Sn,typed:G}),Lre=Gj({config:de,matrix:Ne}),Hre=AR({DenseMatrix:rt,concat:ct,equalScalar:ot,matrix:Ne,typed:G,zeros:Dr}),rs=Xq({BigNumber:Ce,DenseMatrix:rt,config:de,equalScalar:ot,matrix:Ne,typed:G,zeros:Dr}),Er=Zj({matrix:Ne,config:de,typed:G}),Hr=GR({DenseMatrix:rt,SparseMatrix:ur,bignumber:en,concat:ct,config:de,matrix:Ne,typed:G}),Gre=Lq({concat:ct,matrix:Ne,typed:G}),ca=o7({typed:G}),Vre=aL({DenseMatrix:rt,SparseMatrix:ur,concat:ct,config:de,equalScalar:ot,matrix:Ne,typed:G}),Ure=dj({DenseMatrix:rt,SparseMatrix:ur,concat:ct,matrix:Ne,typed:G}),ut=nG({DenseMatrix:rt,SparseMatrix:ur,addScalar:sr,concat:ct,equalScalar:ot,matrix:Ne,typed:G}),Wre=uH({BigNumber:Ce,DenseMatrix:rt,concat:ct,equalScalar:ot,matrix:Ne,typed:G}),Jre=h2({concat:ct,equalScalar:ot,matrix:Ne,typed:G}),Kre=p2({DenseMatrix:rt,concat:ct,equalScalar:ot,matrix:Ne,typed:G}),Yre=ej({DenseMatrix:rt,SparseMatrix:ur,concat:ct,matrix:Ne,typed:G}),rD=y7({BigNumber:Ce,Complex:Tt,Fraction:eo,config:de,isNegative:gi,matrix:Ne,typed:G,unaryMinus:ca}),io=TR({BigNumber:Ce,DenseMatrix:rt,Fraction:eo,concat:ct,config:de,equalScalar:ot,matrix:Ne,typed:G}),nD=IR({concat:ct,matrix:Ne,typed:G}),Zre=vj({prod:tD,size:Er,typed:G}),Rd=rL({equal:Pn,typed:G}),Gt=Kq({numeric:Sn,typed:G}),ou=cR({DenseMatrix:rt,SparseMatrix:ur,concat:ct,divideScalar:Gt,equalScalar:ot,matrix:Ne,typed:G}),Qre=LR({compareText:nD,isZero:la,typed:G}),aD=f2({DenseMatrix:rt,config:de,equalScalar:ot,matrix:Ne,round:rs,typed:G,zeros:Dr}),Xre=uz({BigNumber:Ce,DenseMatrix:rt,concat:ct,config:de,equalScalar:ot,matrix:Ne,round:rs,typed:G,zeros:Dr}),ene=dI({isNumeric:ao,typed:G}),tne=iG({abs:Jr,addScalar:sr,divideScalar:Gt,isPositive:ro,multiplyScalar:Kt,smaller:Hr,sqrt:Zn,typed:G}),iD=hL({DenseMatrix:rt,smaller:Hr}),Or=vL({ImmutableDenseMatrix:iD,getMatrixDataType:_d}),Gr=YR({DenseMatrix:rt,SparseMatrix:ur,bignumber:en,concat:ct,config:de,matrix:Ne,typed:G}),Ld=rR({Complex:Tt,config:de,divideScalar:Gt,typeOf:jd,typed:G}),oD=mR({DenseMatrix:rt,divideScalar:Gt,equalScalar:ot,matrix:Ne,multiplyScalar:Kt,subtractScalar:Fn,typed:G}),Hd=r7({flatten:ru,matrix:Ne,size:Er,typed:G}),Gd=P2({config:de,isNaN:ka,larger:Gr,numeric:Sn,typed:G}),rne=k2({config:de,isNaN:ka,numeric:Sn,smaller:Hr,typed:G}),sD=m2({DenseMatrix:rt,concat:ct,config:de,equalScalar:ot,matrix:Ne,round:rs,typed:G,zeros:Dr}),nne=oR({Complex:Tt,config:de,divideScalar:Gt,typed:G}),ane=g2({DenseMatrix:rt,concat:ct,equalScalar:ot,matrix:Ne,typed:G}),Tc=sL({compare:io,isNaN:ka,isNumeric:ao,typed:G}),Vd=pV({addScalar:sr,complex:Ec,conj:to,divideScalar:Gt,equal:Pn,identity:vi,isZero:la,matrix:Ne,multiplyScalar:Kt,sign:Z2,sqrt:Zn,subtractScalar:Fn,typed:G,unaryMinus:ca,zeros:Dr}),ine=ER({DenseMatrix:rt,concat:ct,equalScalar:ot,matrix:Ne,typed:G,zeros:Dr}),Vo=WR({DenseMatrix:rt,SparseMatrix:ur,concat:ct,config:de,matrix:Ne,typed:G}),mn=S2({add:ut,matrix:Ne,typed:G,zeros:Dr}),Qt=Oz({DenseMatrix:rt,concat:ct,equalScalar:ot,matrix:Ne,subtractScalar:Fn,typed:G,unaryMinus:ca}),one=mG({add:ut,matrix:Ne,typed:G}),Ud=hR({DenseMatrix:rt,divideScalar:Gt,equalScalar:ot,matrix:Ne,multiplyScalar:Kt,subtractScalar:Fn,typed:G}),sne=fQ({addScalar:sr,combinations:Cc,divideScalar:Gt,isInteger:Xr,isNegative:gi,multiplyScalar:Kt,typed:G}),fa=$R({compare:io,typed:G}),une=dQ({addScalar:sr,combinations:Cc,isInteger:Xr,isNegative:gi,isPositive:ro,larger:Gr,typed:G}),lne=D2({matrix:Ne,number:ja,subtract:Qt,typed:G}),cne=rZ({abs:Jr,addScalar:sr,deepEqual:Rd,divideScalar:Gt,multiplyScalar:Kt,sqrt:Zn,subtractScalar:Fn,typed:G}),Fc=lG({addScalar:sr,conj:to,multiplyScalar:Kt,size:Er,typed:G}),uD=wL({larger:Gr,smaller:Hr}),lD=hG({Index:Or,typed:G}),fne=Iz({BigNumber:Ce,add:ut,config:de,equal:Pn,isInteger:Xr,mod:sD,smaller:Hr,typed:G,xgcd:X2}),mne=mz({concat:ct,equalScalar:ot,matrix:Ne,typed:G}),dne=aR({Complex:Tt,config:de,divideScalar:Gt,log:Ld,typed:G}),hne=gR({DenseMatrix:rt,divideScalar:Gt,equalScalar:ot,matrix:Ne,multiplyScalar:Kt,subtractScalar:Fn,typed:G}),pne=e7({flatten:ru,matrix:Ne,size:Er,typed:G}),bt=Dz({addScalar:sr,dot:Fc,equalScalar:ot,matrix:Ne,multiplyScalar:Kt,typed:G}),Uo=C2({bignumber:en,matrix:Ne,add:ut,config:de,isPositive:ro,larger:Gr,largerEq:Mc,smaller:Hr,smallerEq:Vo,typed:G}),gne=E2({Index:Or,matrix:Ne,range:Uo,typed:G}),vne=IH({DenseMatrix:rt,Index:Or,compareNatural:fa,size:Er,subset:mn,typed:G}),yne=RH({DenseMatrix:rt,Index:Or,compareNatural:fa,size:Er,subset:mn,typed:G}),bne=VH({Index:Or,compareNatural:fa,size:Er,subset:mn,typed:G}),wne=KH({Index:Or,compareNatural:fa,size:Er,subset:mn,typed:G}),cD=jV({SparseMatrix:ur,abs:Jr,add:ut,divideScalar:Gt,larger:Gr,largerEq:Mc,multiply:bt,subtract:Qt,transpose:au,typed:G}),xne=lL({compare:io,compareNatural:fa,matrix:Ne,typed:G}),Wd=u7({config:de,numeric:Sn,typed:G}),fD=yR({DenseMatrix:rt,divideScalar:Gt,equalScalar:ot,matrix:Ne,multiplyScalar:Kt,subtractScalar:Fn,typed:G}),Dne=BQ({Complex:Tt,add:ut,multiply:bt,number:ja,typed:G}),Nne=F2({concat:ct,equalScalar:ot,matrix:Ne,not:ac,typed:G,zeros:Dr}),Jd=M7({DenseMatrix:rt,config:de,equalScalar:ot,matrix:Ne,round:rs,typed:G,zeros:Dr}),mD=y2({Index:Or,matrix:Ne,range:Uo,typed:G}),Ane=bj({matrix:Ne,multiply:bt,subtract:Qt,typed:G}),dD=kY({divideScalar:Gt,isZero:la,matrix:Ne,multiply:bt,subtractScalar:Fn,typed:G,unaryMinus:ca}),hD=I7({Complex:Tt,DenseMatrix:rt,ceil:Jd,equalScalar:ot,floor:aD,matrix:Ne,typed:G,zeros:Dr}),oo=$Y({abs:Jr,addScalar:sr,det:dD,divideScalar:Gt,identity:vi,matrix:Ne,multiply:bt,typed:G,unaryMinus:ca}),Cne=BY({Complex:Tt,add:ut,ctranspose:qd,deepEqual:Rd,divideScalar:Gt,dot:Fc,dotDivide:ou,equal:Pn,inv:oo,matrix:Ne,multiply:bt,typed:G}),Qn=Zq({Complex:Tt,config:de,fraction:iu,identity:vi,inv:oo,matrix:Ne,multiply:bt,number:ja,typed:G}),pD=jH({DenseMatrix:rt,Index:Or,compareNatural:fa,size:Er,subset:mn,typed:G}),Ene=WH({Index:Or,compareNatural:fa,size:Er,subset:mn,typed:G}),gD=XH({Index:Or,concat:ct,setDifference:pD,size:Er,subset:mn,typed:G}),vD=NL({FibonacciHeap:uD,addScalar:sr,equalScalar:ot}),Sne=VY({abs:Jr,add:ut,identity:vi,inv:oo,map:no,max:Gd,multiply:bt,size:Er,sqrt:Zn,subtract:Qt,typed:G}),Kd=z2({add:ut,config:de,numeric:Sn,typed:G}),Re=FL({BigNumber:Ce,Complex:Tt,Fraction:eo,abs:Jr,addScalar:sr,config:de,divideScalar:Gt,equal:Pn,fix:hD,format:nu,isNumeric:ao,multiplyScalar:Kt,number:ja,pow:Qn,round:rs,subtractScalar:Fn}),Mne=pX({BigNumber:Ce,Unit:Re,config:de}),Tne=ZX({BigNumber:Ce,Unit:Re,config:de}),Fne=jX({BigNumber:Ce,Unit:Re,config:de}),Pne=bX({BigNumber:Ce,Unit:Re,config:de}),kne=RX({BigNumber:Ce,Unit:Re,config:de}),One=wX({BigNumber:Ce,Unit:Re,config:de}),$ne=gX({BigNumber:Ce,Unit:Re,config:de}),_ne=BL({Unit:Re,typed:G}),Bne=kX({BigNumber:Ce,Unit:Re,config:de}),Ine=uR({DenseMatrix:rt,SparseMatrix:ur,concat:ct,equalScalar:ot,matrix:Ne,pow:Qn,typed:G}),zne=hX({BigNumber:Ce,Unit:Re,config:de}),jne=yX({BigNumber:Ce,Unit:Re,config:de}),qne=HY({abs:Jr,add:ut,identity:vi,inv:oo,multiply:bt,typed:G}),Rne=LX({BigNumber:Ce,Unit:Re,config:de}),yD=fq({addScalar:sr,ceil:Jd,conj:to,divideScalar:Gt,dotDivide:ou,exp:Y2,i:V2,log2:Id,matrix:Ne,multiplyScalar:Kt,pow:Qn,tau:W2,typed:G}),Yd=NZ({BigNumber:Ce,Complex:Tt,config:de,multiplyScalar:Kt,pow:Qn,typed:G}),Lne=cX({BigNumber:Ce,Unit:Re,config:de}),Hne=FX({BigNumber:Ce,Unit:Re,config:de}),Gne=dq({conj:to,dotDivide:ou,fft:yD,typed:G}),Vne=xX({BigNumber:Ce,Unit:Re,config:de}),Une=AX({BigNumber:Ce,Unit:Re,config:de}),Wne=GX({BigNumber:Ce,Unit:Re,config:de}),Jne=dX({BigNumber:Ce,Unit:Re,config:de}),Kne=QX({BigNumber:Ce,Unit:Re,config:de}),Yne=UX({BigNumber:Ce,Unit:Re,config:de}),Zne=OX({BigNumber:Ce,Unit:Re,config:de}),Qne=NX({BigNumber:Ce,Unit:Re,config:de}),Xne=aee({BigNumber:Ce,Unit:Re,config:de}),eae=tee({BigNumber:Ce,Unit:Re,config:de}),tae=iee({BigNumber:Ce,Unit:Re,config:de}),rae=PX({BigNumber:Ce,Unit:Re,config:de}),nae=$X({BigNumber:Ce,Unit:Re,config:de}),aae=mX({BigNumber:Ce,Unit:Re,config:de}),iae=_X({BigNumber:Ce,Unit:Re,config:de}),oae=KX({BigNumber:Ce,Unit:Re,config:de}),sae=ZH({compareNatural:fa,typed:G}),uae=lX({BigNumber:Ce,Unit:Re,config:de}),lae=YX({BigNumber:Ce,Unit:Re,config:de}),cae=BX({BigNumber:Ce,Unit:Re,config:de}),fae=qX({BigNumber:Ce,Unit:Re,config:de}),mae=CX({BigNumber:Ce,Unit:Re,config:de}),dae=vX({BigNumber:Ce,Unit:Re,config:de}),Nr=eZ({divideScalar:Gt,equalScalar:ot,inv:oo,matrix:Ne,multiply:bt,typed:G}),hae=SX({BigNumber:Ce,Unit:Re,config:de}),su=SZ({gamma:Yd,typed:G}),pae=HX({BigNumber:Ce,Unit:Re,config:de}),gae=eee({BigNumber:Ce,Unit:Re,config:de}),vae=iZ({abs:Jr,add:ut,addScalar:sr,config:de,divideScalar:Gt,equalScalar:ot,flatten:ru,isNumeric:ao,isZero:la,matrix:Ne,multiply:bt,multiplyScalar:Kt,smaller:Hr,subtract:Qt,typed:G}),bD=dV({DenseMatrix:rt,Spa:vD,SparseMatrix:ur,abs:Jr,addScalar:sr,divideScalar:Gt,equalScalar:ot,larger:Gr,matrix:Ne,multiplyScalar:Kt,subtractScalar:Fn,typed:G,unaryMinus:ca}),yae=DX({BigNumber:Ce,Unit:Re,config:de}),bae=XX({BigNumber:Ce,Unit:Re,config:de}),wae=PZ({add:ut,divide:Nr,factorial:su,isInteger:Xr,isPositive:ro,multiply:bt,typed:G}),xae=OZ({factorial:su,typed:G}),Dae=ree({BigNumber:Ce,Unit:Re,config:de}),Nae=HV({add:ut,cbrt:rD,divide:Nr,equalScalar:ot,im:Bd,isZero:la,multiply:bt,re:zd,sqrt:Zn,subtract:Qt,typeOf:jd,typed:G,unaryMinus:ca}),wD=HH({DenseMatrix:rt,Index:Or,compareNatural:fa,size:Er,subset:mn,typed:G}),Aae=bq({abs:Jr,add:ut,bignumber:en,divide:Nr,isNegative:gi,isPositive:ro,larger:Gr,map:no,matrix:Ne,max:Gd,multiply:bt,smaller:Hr,subtract:Qt,typed:G,unaryMinus:ca}),xD=sQ({bignumber:en,addScalar:sr,combinations:Cc,divideScalar:Gt,factorial:su,isInteger:Xr,isNegative:gi,larger:Gr,multiplyScalar:Kt,number:ja,pow:Qn,subtractScalar:Fn,typed:G}),Cae=kL({Unit:Re,typed:G}),Eae=lQ({addScalar:sr,isInteger:Xr,isNegative:gi,stirlingS2:xD,typed:G}),Sae=j2({add:ut,typed:G,unaryPlus:Wd}),DD=RY({abs:Jr,add:ut,addScalar:sr,atan:K2,bignumber:en,column:mD,complex:Ec,config:de,cos:$d,diag:eD,divideScalar:Gt,dot:Fc,equal:Pn,flatten:ru,im:Bd,inv:oo,larger:Gr,matrix:Ne,matrixFromColumns:Hd,multiply:bt,multiplyScalar:Kt,number:ja,qr:Vd,re:zd,reshape:Q2,sin:Sc,size:Er,smaller:Hr,sqrt:Zn,subtract:Qt,typed:G,usolve:Ud,usolveAll:fD}),Mae=MX({BigNumber:Ce,Unit:Re,config:de}),Tae=VX({BigNumber:Ce,Unit:Re,config:de}),Fae=TZ({divide:Nr,dotDivide:ou,isNumeric:ao,log:Ld,map:no,matrix:Ne,multiply:bt,sum:Kd,typed:G}),ND=RV({DenseMatrix:rt,lsolve:oD,lup:bD,matrix:Ne,slu:cD,typed:G,usolve:Ud}),AD=q2({add:ut,divide:Nr,typed:G}),Pae=WX({BigNumber:Ce,Unit:Re,config:de}),kae=fX({BigNumber:Ce,Unit:Re,config:de}),Oae=L2({bignumber:en,add:ut,compare:io,divide:Nr,isInteger:Xr,larger:Gr,mapSlices:Ls,multiply:bt,partitionSelect:Tc,smaller:Hr,smallerEq:Vo,subtract:Qt,typed:G}),$ae=tG({Index:Or,concat:ct,setIntersect:wD,setSymDifference:gD,size:Er,subset:mn,typed:G}),Zd=R2({add:ut,divide:Nr,isNaN:ka,mapSlices:Ls,multiply:bt,subtract:Qt,typed:G}),_ae=EX({BigNumber:Ce,Unit:Re,config:de}),CD=cZ({add:ut,compare:io,divide:Nr,partitionSelect:Tc,typed:G}),Bae=vZ({add:ut,divide:Nr,matrix:Ne,mean:AD,multiply:bt,pow:Qn,sqrt:Zn,subtract:Qt,sum:Kd,typed:G}),Iae=zQ({Complex:Tt,add:ut,divide:Nr,matrix:Ne,multiply:bt,typed:G}),zae=mZ({abs:Jr,map:no,median:CD,subtract:Qt,typed:G}),jae=H2({map:no,sqrt:Zn,typed:G,variance:Zd}),qae=Sq({BigNumber:Ce,Complex:Tt,add:ut,config:de,divide:Nr,equal:Pn,factorial:su,gamma:Yd,isNegative:gi,multiply:bt,pi:Um,pow:Qn,sin:Sc,smallerEq:Vo,subtract:Qt,typed:G}),Qd=sG({abs:Jr,add:ut,conj:to,ctranspose:qd,eigs:DD,equalScalar:ot,larger:Gr,matrix:Ne,multiply:bt,pow:Qn,smaller:Hr,sqrt:Zn,typed:G}),ED=Jj({BigNumber:Ce,DenseMatrix:rt,SparseMatrix:ur,addScalar:sr,config:de,cos:$d,matrix:Ne,multiplyScalar:Kt,norm:Qd,sin:Sc,typed:G,unaryMinus:ca}),Rae=nee({BigNumber:Ce,Unit:Re,config:de}),SD=KY({identity:vi,matrix:Ne,multiply:bt,norm:Qd,qr:Vd,subtract:Qt,typed:G}),Lae=Uj({multiply:bt,rotationMatrix:ED,typed:G}),MD=WY({abs:Jr,add:ut,concat:ct,identity:vi,index:lD,lusolve:ND,matrix:Ne,matrixFromColumns:Hd,multiply:bt,range:Uo,schur:SD,subset:mn,subtract:Qt,transpose:au,typed:G}),Hae=ZY({matrix:Ne,multiply:bt,sylvester:MD,transpose:au,typed:G}),ns={},uu={},TD={},Br=vG({mathWithTransform:uu}),as=RG({Node:Br}),qa=HG({Node:Br}),so=VG({Node:Br}),FD=KG({Node:Br}),is=xG({Node:Br}),PD=SG({Node:Br,ResultSet:U2}),kD=TG({Node:Br}),yi=_G({Node:Br}),OD=WG({Node:Br}),Gae=RQ({classes:TD}),Xd=KV({math:ns,typed:G}),$D=IG({Node:Br,typed:G}),Vae=FY({Chain:Xd,typed:G}),os=bG({Node:Br,subset:mn}),_D=CG({matrix:Ne,Node:Br,subset:mn}),ss=jG({Node:Br,size:Er}),bi=QG({Unit:Re,Node:Br,math:ns}),wi=eV({Node:Br,SymbolNode:bi,math:ns}),Xn=rV({AccessorNode:os,ArrayNode:is,AssignmentNode:_D,BlockNode:PD,ConditionalNode:kD,ConstantNode:yi,FunctionAssignmentNode:$D,FunctionNode:wi,IndexNode:ss,ObjectNode:as,OperatorNode:qa,ParenthesisNode:so,RangeNode:OD,RelationalNode:FD,SymbolNode:bi,config:de,numeric:Sn,typed:G}),BD=MQ({ConstantNode:yi,FunctionNode:wi,OperatorNode:qa,ParenthesisNode:so,parse:Xn,typed:G}),eh=NQ({bignumber:en,fraction:iu,AccessorNode:os,ArrayNode:is,ConstantNode:yi,FunctionNode:wi,IndexNode:ss,ObjectNode:as,OperatorNode:qa,SymbolNode:bi,config:de,mathWithTransform:uu,matrix:Ne,typed:G}),Uae=aV({parse:Xn,typed:G}),th=CQ({AccessorNode:os,ArrayNode:is,ConstantNode:yi,FunctionNode:wi,IndexNode:ss,ObjectNode:as,OperatorNode:qa,ParenthesisNode:so,SymbolNode:bi,add:ut,divide:Nr,equal:Pn,isZero:la,multiply:bt,parse:Xn,pow:Qn,subtract:Qt,typed:G}),Pc=oV({parse:Xn,typed:G}),ID=UV({evaluate:Pc}),zD=lV({evaluate:Pc,parse:Xn}),kc=wQ({AccessorNode:os,ArrayNode:is,ConstantNode:yi,FunctionNode:wi,IndexNode:ss,ObjectNode:as,OperatorNode:qa,ParenthesisNode:so,SymbolNode:bi,equal:Pn,parse:Xn,replacer:J2,resolve:BD,simplifyConstant:eh,simplifyCore:th,typed:G}),Wae=FQ({OperatorNode:qa,parse:Xn,simplify:kc,typed:G}),Jae=pQ({parse:Xn,typed:G}),Kae=fV({Parser:zD,typed:G}),Yae=$Q({bignumber:en,fraction:iu,AccessorNode:os,ArrayNode:is,ConstantNode:yi,FunctionNode:wi,IndexNode:ss,ObjectNode:as,OperatorNode:qa,ParenthesisNode:so,SymbolNode:bi,add:ut,config:de,divide:Nr,equal:Pn,isZero:la,mathWithTransform:uu,matrix:Ne,multiply:bt,parse:Xn,pow:Qn,simplify:kc,simplifyConstant:eh,simplifyCore:th,subtract:Qt,typed:G}),Zae=kQ({ConstantNode:yi,FunctionNode:wi,OperatorNode:qa,ParenthesisNode:so,SymbolNode:bi,config:de,equal:Pn,isZero:la,numeric:Sn,parse:Xn,simplify:kc,typed:G}),Qae=MY({Help:ID,mathWithTransform:uu,typed:G});ar(ns,{e:Tb,false:Ate,fineStructure:Cte,i:V2,Infinity:Ete,LN10:Ste,LOG10E:Mte,NaN:Tte,null:Fte,phi:Pte,SQRT1_2:Ote,sackurTetrode:$te,tau:W2,true:_te,E:Tb,version:Bte,efimovFactor:Ite,LN2:zte,pi:Um,replacer:J2,reviver:Gae,SQRT2:jte,typed:G,PI:Um,weakMixingAngle:qte,abs:Jr,acos:Rte,acot:Lte,acsc:Hte,addScalar:sr,arg:Gte,asech:Vte,asinh:Ute,atan:K2,atanh:Wte,bigint:Jte,bitNot:Kte,boolean:Yte,clone:Zte,combinations:Cc,complex:Ec,conj:to,cos:$d,cot:Qte,csc:Xte,cube:ere,equalScalar:ot,erf:tre,exp:Y2,expm1:rre,filter:nre,flatten:ru,forEach:are,format:nu,getMatrixDataType:_d,hex:ire,im:Bd,isInteger:Xr,isNegative:gi,isPositive:ro,isZero:la,LOG2E:ore,lgamma:sre,log10:ure,log2:Id,map:no,multiplyScalar:Kt,not:ac,number:ja,oct:lre,pickRandom:cre,print:fre,random:mre,re:zd,sec:dre,sign:Z2,sin:Sc,splitUnit:hre,square:pre,string:gre,subtractScalar:Fn,tan:vre,typeOf:jd,acosh:yre,acsch:bre,asec:wre,bignumber:en,chain:Vae,combinationsWithRep:xre,cosh:Dre,csch:Nre,isNaN:ka,isPrime:Are,mapSlices:Ls,matrix:Ne,matrixFromFunction:Cre,ones:Ere,randomInt:Sre,reshape:Q2,sech:Mre,sinh:Tre,sparse:Fre,sqrt:Zn,squeeze:Pre,tanh:kre,transpose:au,xgcd:X2,zeros:Dr,acoth:Ore,asin:$re,bin:_re,concat:ct,coth:Bre,ctranspose:qd,diag:eD,dotMultiply:Ire,equal:Pn,fraction:iu,identity:vi,isNumeric:ao,kron:zre,largerEq:Mc,leftShift:jre,mode:qre,nthRoot:Rre,numeric:Sn,prod:tD,resize:Lre,rightArithShift:Hre,round:rs,size:Er,smaller:Hr,to:Gre,unaryMinus:ca,unequal:Vre,xor:Ure,add:ut,atan2:Wre,bitAnd:Jre,bitOr:Kre,bitXor:Yre,cbrt:rD,compare:io,compareText:nD,count:Zre,deepEqual:Rd,divideScalar:Gt,dotDivide:ou,equalText:Qre,floor:aD,gcd:Xre,hasNumericValue:ene,hypot:tne,larger:Gr,log:Ld,lsolve:oD,matrixFromColumns:Hd,max:Gd,min:rne,mod:sD,nthRoots:nne,or:ane,partitionSelect:Tc,qr:Vd,rightLogShift:ine,smallerEq:Vo,subset:mn,subtract:Qt,trace:one,usolve:Ud,catalan:sne,compareNatural:fa,composition:une,diff:lne,distance:cne,dot:Fc,index:lD,invmod:fne,lcm:mne,log1p:dne,lsolveAll:hne,matrixFromRows:pne,multiply:bt,range:Uo,row:gne,setCartesian:vne,setDistinct:yne,setIsSubset:bne,setPowerset:wne,slu:cD,sort:xne,unaryPlus:Wd,usolveAll:fD,zpk2tf:Dne,and:Nne,ceil:Jd,column:mD,cross:Ane,det:dD,fix:hD,inv:oo,pinv:Cne,pow:Qn,setDifference:pD,setMultiplicity:Ene,setSymDifference:gD,sqrtm:Sne,sum:Kd,vacuumImpedance:Mne,wienDisplacement:Tne,atomicMass:Fne,bohrMagneton:Pne,boltzmann:kne,conductanceQuantum:One,coulomb:$ne,createUnit:_ne,deuteronMass:Bne,dotPow:Ine,electricConstant:zne,elementaryCharge:jne,expm:qne,faraday:Rne,fft:yD,gamma:Yd,gravitationConstant:Lne,hartreeEnergy:Hne,ifft:Gne,inverseConductanceQuantum:Vne,klitzing:Une,loschmidt:Wne,magneticConstant:Jne,molarMass:Kne,molarPlanckConstant:Yne,neutronMass:Zne,nuclearMagneton:Qne,planckCharge:Xne,planckLength:eae,planckTemperature:tae,protonMass:rae,quantumOfCirculation:nae,reducedPlanckConstant:aae,rydberg:iae,secondRadiation:oae,setSize:sae,speedOfLight:uae,stefanBoltzmann:lae,thomsonCrossSection:cae,avogadro:fae,bohrRadius:mae,coulombConstant:dae,divide:Nr,electronMass:hae,factorial:su,firstRadiation:pae,gravity:gae,intersect:vae,lup:bD,magneticFluxQuantum:yae,molarMassC12:bae,multinomial:wae,parse:Xn,permutations:xae,planckMass:Dae,polynomialRoot:Nae,resolve:BD,setIntersect:wD,simplifyConstant:eh,solveODE:Aae,stirlingS2:xD,unit:Cae,bellNumbers:Eae,compile:Uae,cumsum:Sae,eigs:DD,fermiCoupling:Mae,gasConstant:Tae,kldivergence:Fae,lusolve:ND,mean:AD,molarVolume:Pae,planckConstant:kae,quantileSeq:Oae,setUnion:$ae,simplifyCore:th,variance:Zd,classicalElectronRadius:_ae,evaluate:Pc,median:CD,simplify:kc,symbolicEqual:Wae,corr:Bae,freqz:Iae,leafCount:Jae,mad:zae,parser:Kae,rationalize:Yae,std:jae,zeta:qae,derivative:Zae,norm:Qd,rotationMatrix:ED,help:Qae,planckTime:Rae,schur:SD,rotate:Lae,sylvester:MD,lyap:Hae,config:de});ar(uu,ns,{mapSlices:lee({isInteger:Xr,typed:G}),filter:vee({typed:G}),forEach:wee({typed:G}),map:Eee({typed:G}),or:vte({DenseMatrix:rt,concat:ct,equalScalar:ot,matrix:Ne,typed:G}),and:hte({add:ut,concat:ct,equalScalar:ot,matrix:Ne,not:ac,typed:G,zeros:Dr}),concat:Kee({isInteger:Xr,matrix:Ne,typed:G}),index:Nee({Index:Or,getMatrixDataType:_d}),print:fte({add:ut,matrix:Ne,typed:G,zeros:Dr}),sum:rte({add:ut,config:de,numeric:Sn,typed:G}),bitAnd:wte({add:ut,concat:ct,equalScalar:ot,matrix:Ne,not:ac,typed:G,zeros:Dr}),min:Iee({config:de,isNaN:ka,numeric:Sn,smaller:Hr,typed:G}),subset:Uee({add:ut,matrix:Ne,typed:G,zeros:Dr}),bitOr:Nte({DenseMatrix:rt,concat:ct,equalScalar:ot,matrix:Ne,typed:G}),cumsum:ste({add:ut,typed:G,unaryPlus:Wd}),diff:Zee({bignumber:en,matrix:Ne,number:ja,subtract:Qt,typed:G}),max:Pee({config:de,isNaN:ka,larger:Gr,numeric:Sn,typed:G}),range:qee({bignumber:en,matrix:Ne,add:ut,config:de,isPositive:ro,larger:Gr,largerEq:Mc,smaller:Hr,smallerEq:Vo,typed:G}),row:Hee({Index:Or,matrix:Ne,range:Uo,typed:G}),column:mee({Index:Or,matrix:Ne,range:Uo,typed:G}),mean:$ee({add:ut,divide:Nr,typed:G}),quantileSeq:ite({add:ut,bignumber:en,compare:io,divide:Nr,isInteger:Xr,larger:Gr,mapSlices:Ls,multiply:bt,partitionSelect:Tc,smaller:Hr,smallerEq:Vo,subtract:Qt,typed:G}),variance:lte({add:ut,divide:Nr,isNaN:ka,mapSlices:Ls,multiply:bt,subtract:Qt,typed:G}),std:ete({map:no,sqrt:Zn,typed:G,variance:Zd})});ar(TD,{BigNumber:Ce,Complex:Tt,Fraction:eo,Matrix:Ac,Node:Br,ObjectNode:as,OperatorNode:qa,ParenthesisNode:so,Range:kte,RelationalNode:FD,ResultSet:U2,ArrayNode:is,BlockNode:PD,ConditionalNode:kD,ConstantNode:yi,DenseMatrix:rt,RangeNode:OD,Chain:Xd,FunctionAssignmentNode:$D,SparseMatrix:ur,ImmutableDenseMatrix:iD,Index:Or,AccessorNode:os,AssignmentNode:_D,FibonacciHeap:uD,IndexNode:ss,Spa:vD,Unit:Re,SymbolNode:bi,FunctionNode:wi,Help:ID,Parser:zD});Xd.createProxy(ns);const rh=({ref:e,onChange:t,value:r,dragDirection:n,showDragHandle:a=!0,dragScale:i,selectOnFocus:o=!0,bounds:s=we.G.INFINITE,resetValue:u,variant:l="outlined",className:c,children:f,disabled:m,onBlur:d,units:p,...h})=>{const[y,b,D]=ir.useCombinedStateAndRef(r.toString()),[g,x,w]=ir.useCombinedStateAndRef(!0),v=ir.useSyncedRef(r),A=wr.useCallback(()=>{if(w.current)return;x(!0);let k=null;try{const $=Pc(D.current);$ instanceof Re?k=$.toNumber():typeof $=="number"&&!isNaN($)&&(k=$)}catch{k=null}k!=null?t==null||t(we.G.clamp(s,k)):b(v.current.toString())},[t,b]),C=ir.useSyncedRef(A),N=wr.useCallback(()=>{d==null||d(),A()},[d,A]);wr.useEffect(()=>()=>{var k;return(k=C.current)==null?void 0:k.call(C)},[]);const E=wr.useCallback(k=>{x(!1),b(k)},[b,x]),S=g?r:y,F=wr.useCallback(k=>{x(!0),t==null||t(we.G.clamp(s,Math.round(k)))},[t,x]);return i==null&&we.G.isFinite(s)&&(i={x:we.G.span(s)*.01,y:we.G.span(s)*.02}),(l==="preview"||m)&&(a=!1),Me.jsxRuntimeExports.jsxs(Wo.Text,{ref:e,type:"text",variant:l,value:S.toString(),onChange:E,disabled:m,selectOnFocus:o,onKeyDown:k=>{AN.eventKey(k)==="Enter"&&(A(),d==null||d())},onBlur:N,...h,children:[a&&Me.jsxRuntimeExports.jsx(ic,{direction:n,value:r,onChange:F,dragScale:i,resetValue:u,onBlur:N}),f]})},Xae=({location:e="left",size:t="9rem",className:r,style:n,bordered:a=!1,...i})=>{const o=we.K$1.construct(e),s=we.K$1.direction(o),u=we.g.swap(s);return Me.jsxRuntimeExports.jsx(En.Space,{className:we.CSS(we.CSS.B("navbar"),a&&we.CSS.bordered(we.K$1.swap(o)),we.CSS.dir(u),we.CSS.loc(o),r),direction:u,style:{[we.g.dimension(s)]:t,...n},align:"center",empty:!0,...i})},lu=e=>({bordered:t=!1,className:r,...n})=>Me.jsxRuntimeExports.jsx(En.Space,{className:we.CSS(we.CSS.BE("navbar","content"),e==="absolute-center"?we.CSS.M(e):we.CSS.align(e),e!==""&&t&&we.CSS.bordered(e),r),align:"center",...n}),jD=lu("start");jD.displayName="NavbarStart";const qD=lu("end");qD.displayName="NavbarEnd";const RD=lu("center");RD.displayName="NavbarCenter";const LD=lu("");LD.displayName="NavbarContent";const HD=lu("absolute-center");HD.displayName="NavbarAbsoluteCenter";const Oa=Xae;Oa.Start=jD;Oa.Center=RD;Oa.End=qD;Oa.AbsoluteCenter=HD;Oa.Content=LD;const Wm=e=>e.add(BigInt(we.d.now().date().getTimezoneOffset()-e.date().getTimezoneOffset())*we.g$2.MINUTE.valueOf()),eie=({value:e,onChange:t,onBlur:r,onlyChangeOnBlur:n,variant:a,...i})=>{const[o,s]=wr.useState(null),u=(h,y=!1)=>{let b=h.toString();s(b);let D=new we.d(h,"UTC");b.length<23&&(b+=".000"),D=Wm(D);let g=!1;try{g=D.fString("ISO","local").slice(0,-1)===b}catch(x){console.error(x)}g&&!n&&(t(Number(D.valueOf())),s(null)),y&&(g&&t(Number(D.valueOf())),s(null))},l=h=>{u(h.target.value,!0),s(null),r==null||r(h)},c=new we.d(e,"UTC"),f=c.fString("ISO","local").slice(0,-1),{close:m,toggle:d,visible:p}=nh.use();return Me.jsxRuntimeExports.jsxs(nh.Dialog,{close:m,visible:p,variant:"modal",zIndex:500,keepMounted:!1,children:[Me.jsxRuntimeExports.jsx(Wo.Text,{className:we.CSS.BE("input","datetime"),variant:a,type:"datetime-local",onBlur:l,required:!1,value:o??f,onChange:u,step:1e-5,...i,children:Me.jsxRuntimeExports.jsx(Ln.Icon,{onClick:d,variant:a==="natural"?"text":"outlined",children:Me.jsxRuntimeExports.jsx(ir.y4.Calendar,{})})}),Me.jsxRuntimeExports.jsx(nie,{value:c,onChange:h=>t(Number(h.valueOf())),close:m})]})},tie=tt.extend(S6),rie=["Control","Enter"],nie=({value:e,onChange:t,close:r})=>Me.jsxRuntimeExports.jsxs(En.Space,{className:we.CSS.B("datetime-modal"),empty:!0,children:[Me.jsxRuntimeExports.jsxs(En.Space,{className:we.CSS.B("content"),children:[Me.jsxRuntimeExports.jsx(En.Space,{x:!0,className:we.CSS.B("header"),children:Me.jsxRuntimeExports.jsx(CN.DateTime,{level:"h3",format:"preciseDate",children:e})}),Me.jsxRuntimeExports.jsx(Ln.Icon,{variant:"text",className:we.CSS.B("close-btn"),onClick:r,children:Me.jsxRuntimeExports.jsx(ir.y4.Close,{})}),Me.jsxRuntimeExports.jsxs(En.Space,{x:!0,className:we.CSS.B("content"),children:[Me.jsxRuntimeExports.jsx(oie,{value:e,onChange:t,close:r}),Me.jsxRuntimeExports.jsx(GD,{value:e,onChange:t})]})]}),Me.jsxRuntimeExports.jsxs(Oa,{location:"bottom",size:"7rem",children:[Me.jsxRuntimeExports.jsxs(Oa.Start,{size:"small",children:[Me.jsxRuntimeExports.jsx(EN.Text,{shade:11,level:"small",trigger:rie}),Me.jsxRuntimeExports.jsx(ir.Text,{shade:11,level:"small",children:"To Finish"})]}),Me.jsxRuntimeExports.jsx(Oa.End,{children:Me.jsxRuntimeExports.jsx(Ln.Button,{onClick:r,variant:"outlined",children:"Done"})})]})]}),aie=e=>Me.jsxRuntimeExports.jsx(Sa.ItemFrame,{...e,children:Me.jsxRuntimeExports.jsx(ir.Text,{level:"p",children:e.entry.name})}),iie=Ln.componentRenderProp(aie),oie=({value:e,onChange:t,close:r})=>{const[n,a]=wr.useState(""),[i,o]=wr.useState([]),s=l=>{const c=tie(l),f=c.dates().get(),m=[];m.push(...f.map(p=>{const h=Wm(new we.d(p.start,"UTC"));return{key:p.start,name:h.fString("preciseDate","local"),onSelect:()=>{t(h),r()}}})),o(m);const d=c.durations().get();m.push(...d.map(p=>{let h=new we.g$2(0);p.hour!=null&&(h=h.add(we.g$2.hours(p.hour))),p.minute!=null&&(h=h.add(we.g$2.minutes(p.minute))),p.second!=null&&(h=h.add(we.g$2.seconds(p.second))),p.millisecond!=null&&(h=h.add(we.g$2.milliseconds(p.millisecond)));const y=Wm(e.add(h));return{key:y.valueOf().toString(),name:y.fString("preciseDate","local"),onSelect:()=>{t(y),r()}}})),a(l)},u=l=>{const c=i.find(f=>f.key===l);c&&c.onSelect(),a(""),o([])};return Me.jsxRuntimeExports.jsxs(Oi.Pack,{y:!0,className:we.CSS.B("ai-selector"),background:1,children:[Me.jsxRuntimeExports.jsx(Wo.Text,{value:n,onChange:s,autoFocus:!0,placeholder:"AI Suggestion"}),Me.jsxRuntimeExports.jsx(Sa.List,{data:i,emptyContent:Me.jsxRuntimeExports.jsx(NN.Center,{empty:!0,grow:!0,children:Me.jsxRuntimeExports.jsxs(En.Space,{y:!0,size:"tiny",children:[Me.jsxRuntimeExports.jsx(ir.Text,{level:"small",color:"var(--pluto-gray-l7)",children:'"April 1 at 2PM"'}),Me.jsxRuntimeExports.jsx(ir.Text,{level:"small",color:"var(--pluto-gray-l7)",children:'"Add 2 two hours"'}),Me.jsxRuntimeExports.jsx(ir.Text,{level:"small",color:"var(--pluto-gray-l7)",children:'"Next Friday"'})]})}),children:Me.jsxRuntimeExports.jsx(Sa.Selector,{value:null,allowMultiple:!1,allowNone:!0,onChange:u,children:Me.jsxRuntimeExports.jsx(Sa.Hover,{initialHover:0,children:Me.jsxRuntimeExports.jsx(Sa.Core,{grow:!0,bordered:!0,children:iie})})})})]})},Fb=[{name:"January",days:31},{name:"February",days:28},{name:"March",days:31},{name:"April",days:30},{name:"May",days:31},{name:"June",days:30},{name:"July",days:31},{name:"August",days:31},{name:"September",days:30},{name:"October",days:31},{name:"November",days:30},{name:"December",days:31}],GD=({value:e,onChange:t})=>{const r=e.month,n=e.year,a=e.day,i=u=>t(e.setMonth(u)),o=u=>t(e.setYear(u)),s=u=>t(e.setDay(u));return Me.jsxRuntimeExports.jsxs(Oi.Pack,{x:!0,className:we.CSS.B("datetime-picker"),children:[Me.jsxRuntimeExports.jsxs(Oi.Pack,{y:!0,align:"stretch",className:we.CSS.B("calendar"),children:[Me.jsxRuntimeExports.jsxs(Oi.Pack,{x:!0,grow:!0,children:[Me.jsxRuntimeExports.jsx(Ln.Icon,{onClick:()=>i(r-1),variant:"outlined",children:Me.jsxRuntimeExports.jsx(ir.y4.Caret.Left,{})}),Me.jsxRuntimeExports.jsx(ah.WithIcon,{level:"small",style:{flexGrow:1,paddingLeft:"1rem"},children:Fb[r].name}),Me.jsxRuntimeExports.jsx(Ln.Icon,{onClick:()=>i(r+1),style:{borderTopRightRadius:0},variant:"outlined",children:Me.jsxRuntimeExports.jsx(ir.y4.Caret.Right,{})})]}),Me.jsxRuntimeExports.jsxs(Oi.Pack,{x:!0,grow:!0,children:[Me.jsxRuntimeExports.jsx(Ln.Icon,{onClick:()=>o(n-1),variant:"outlined",children:Me.jsxRuntimeExports.jsx(ir.y4.Caret.Left,{})}),Me.jsxRuntimeExports.jsx(ah.WithIcon,{level:"small",style:{flexGrow:1,paddingLeft:"1rem"},children:n}),Me.jsxRuntimeExports.jsx(Ln.Icon,{onClick:()=>o(n+1),variant:"outlined",children:Me.jsxRuntimeExports.jsx(ir.y4.Caret.Right,{})})]}),Me.jsxRuntimeExports.jsx(En.Space,{x:!0,wrap:!0,size:"tiny",style:{padding:"0.5rem",height:"100%"},children:Array.from({length:Fb[r].days}).map((u,l)=>Me.jsxRuntimeExports.jsx(Ln.Icon,{variant:l+1===a?"outlined":"text",onClick:()=>s(l+1),children:Me.jsxRuntimeExports.jsx(ir.Text,{level:"small",children:l+1})},l))})]}),Me.jsxRuntimeExports.jsx(VD,{value:e,onChange:t})]})},sie=e=>{const{entry:t}=e;return Me.jsxRuntimeExports.jsx(Sa.ItemFrame,{...e,style:{padding:"0.5rem",paddingLeft:"2rem"},children:Me.jsxRuntimeExports.jsx(ir.Text,{level:"small",children:t.name})})},uie=Ln.componentRenderProp(sie),Oc=e=>{const t=Array.from({length:e},(n,a)=>({key:a.toString(),name:a.toString()})),r=({value:n,onChange:a})=>Me.jsxRuntimeExports.jsx(Sa.List,{data:t,children:Me.jsxRuntimeExports.jsx(Sa.Selector,{value:n.toString(),onChange:i=>a(Number(i)),allowMultiple:!1,allowNone:!1,children:Me.jsxRuntimeExports.jsx(Sa.Core,{className:we.CSS.B("time-list"),children:uie})})});return r.displayName="TimeList",r},lie=Oc(24),cie=Oc(60),fie=Oc(60),VD=({value:e,onChange:t})=>Me.jsxRuntimeExports.jsxs(Oi.Pack,{y:!0,className:we.CSS.B("time-selector"),style:{height:"37rem"},children:[Me.jsxRuntimeExports.jsxs(Oi.Pack,{x:!0,grow:!0,children:[Me.jsxRuntimeExports.jsx(lie,{value:e.hour,onChange:r=>t(e.setHour(r))}),Me.jsxRuntimeExports.jsx(cie,{value:e.minute,onChange:r=>t(e.setMinute(r))}),Me.jsxRuntimeExports.jsx(fie,{value:e.second,onChange:r=>t(e.setSecond(r))})]}),Me.jsxRuntimeExports.jsx(rh,{size:"small",value:e.millisecond,onChange:r=>t(e.setMillisecond(r)),endContent:"ms",showDragHandle:!1})]}),Jm=({className:e,variant:t="error",...r})=>Me.jsxRuntimeExports.jsx(ir.Text,{className:we.CSS(we.CSS.B("input-help-text"),we.CSS.BM("input-help-text",t),e),level:"small",...r}),UD=({className:e,required:t=!1,children:r,...n})=>Me.jsxRuntimeExports.jsxs("label",{className:we.CSS(we.CSS.B("input-label"),e),...n,children:[r," ",t&&Me.jsxRuntimeExports.jsx("span",{className:we.CSS.B("required-indicator"),children:"*"})]}),mie=(e,t="x")=>e??(we.g.construct(t)==="y"?"stretch":"center"),WD=({label:e,showLabel:t=!0,helpText:r,direction:n,x:a,y:i,className:o,children:s,required:u,align:l,size:c="small",padHelpText:f=!1,helpTextVariant:m,showHelpText:d=!0,...p})=>{const h=En.parseDirection(n,a,i,"y");let y;const b=d&&r!=null&&r.length>0,D=t&&e!=null&&e.length>0;return!b&&!D?Me.jsxRuntimeExports.jsx(Me.jsxRuntimeExports.Fragment,{children:s}):(h==="x"?y=Me.jsxRuntimeExports.jsxs(En.Space,{y:!0,size:"small",children:[s,d&&(f||r!=null&&r.length>0)&&Me.jsxRuntimeExports.jsx(Jm,{variant:m,children:r})]}):y=Me.jsxRuntimeExports.jsxs(En.Space,{y:!0,size:1/3,children:[s,(f||r!=null&&r.length>0)&&Me.jsxRuntimeExports.jsx(Jm,{variant:m,children:r})]}),Me.jsxRuntimeExports.jsxs(En.Space,{className:we.CSS(we.CSS.B("input-item"),o),direction:h,size:c,align:mie(l,h),...p,children:[D&&Me.jsxRuntimeExports.jsx(UD,{required:u,children:e}),y]}))},die=({ref:e,value:t,style:r,onChange:n,className:a,onFocus:i,selectOnFocus:o=!1,placeholder:s,variant:u="outlined",sharp:l=!1,children:c,...f})=>Me.jsxRuntimeExports.jsx("textarea",{style:r,className:we.CSS(we.CSS.B("textarea"),we.CSS.BM("textarea",u),we.CSS.sharp(l),a),ref:e,value:t,onChange:m=>n(m.target.value.replace(/\n/g,"")),onFocus:m=>{o&&m.target.select(),i==null||i(m)},placeholder:s,...f}),hie=(e,t)=>new we.d(e).add(t).sub(we.d.utcOffset),pie={x:Number(we.g$2.SECOND.valueOf())*.5,y:Number(we.g$2.MINUTE.valueOf())},JD=({value:e,onChange:t,tzInfo:r})=>{const n=new we.d(e,"UTC"),a=n.sub(we.d.utcOffset);if(a.after(we.d.DAY)){const s=a.remainder(we.d.DAY);t(Number(new we.d(s,"local").valueOf()))}const i=wr.useCallback(s=>{let u;if(typeof s=="number")u=new we.d(s,"UTC");else{if(s.length===0)return;u=new we.d(s,"local")}t(Number(u.valueOf()))},[t,r]);return{inputValue:n.fString("time",r),ts:n,handleChange:i}},gie=({ref:e,size:t,value:r,tzInfo:n="local",onChange:a,dragDirection:i,showDragHandle:o=!0,className:s,children:u,...l})=>{const{inputValue:c,ts:f,handleChange:m}=JD({value:r,onChange:a,tzInfo:n});return Me.jsxRuntimeExports.jsxs(Wo.Text,{ref:e,value:c,className:we.CSS(we.CSS.B("input-time"),s),type:"time",step:"1",onChange:m,...l,children:[o&&Me.jsxRuntimeExports.jsx(ic,{direction:i,value:Number(f.valueOf()),onChange:m,dragScale:pie}),u]})},vie=Object.freeze(Object.defineProperty({__proto__:null,Calendar:GD,Date:FN,DateTime:eie,DragButton:ic,HelpText:Jm,Item:WD,Label:UD,Numeric:rh,Switch:SN.Switch$1,Text:Wo.Text,TextArea:die,Time:gie,TimeSelector:VD,combineDateAndTimeValue:hie,createTimeList:Oc,useDate:$b,useTime:JD},Symbol.toStringTag,{value:"Module"}));exports.Bar=Oa;exports.Item=WD;exports.Numeric=rh;exports.external=vie;exports.preventDefault=Pb;exports.stopPropagation=MN;
|