cx 22.3.3 → 22.3.4
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/LICENSE-THIRD-PARTY.md +91 -91
- package/LICENSE.md +7 -7
- package/README.md +46 -46
- package/dist/data.js +2401 -2467
- package/dist/manifest.js +763 -769
- package/dist/reset.js +1 -0
- package/dist/ui.js +5188 -5209
- package/dist/widgets.css +9 -0
- package/dist/widgets.js +21857 -21866
- package/index.js +17 -17
- package/locale/de-de.js +69 -69
- package/locale/en-us.js +71 -71
- package/locale/es-es.js +69 -69
- package/locale/fr-fr.js +70 -70
- package/locale/nl-nl.js +75 -75
- package/locale/pt-pt.js +63 -63
- package/locale/sr-latn-ba.js +70 -70
- package/package.json +30 -30
- package/src/charts/Bar.d.ts +27 -27
- package/src/charts/Bar.js +89 -89
- package/src/charts/Bar.scss +26 -26
- package/src/charts/BarGraph.d.ts +16 -16
- package/src/charts/BarGraph.js +110 -110
- package/src/charts/BarGraph.scss +27 -27
- package/src/charts/BubbleGraph.js +92 -92
- package/src/charts/BubbleGraph.scss +29 -29
- package/src/charts/Chart.d.ts +12 -12
- package/src/charts/Chart.js +77 -77
- package/src/charts/ColorMap.d.ts +26 -26
- package/src/charts/ColorMap.js +98 -98
- package/src/charts/Column.scss +26 -26
- package/src/charts/ColumnBarBase.d.ts +61 -61
- package/src/charts/ColumnBarBase.js +169 -169
- package/src/charts/ColumnBarGraphBase.d.ts +71 -71
- package/src/charts/ColumnBarGraphBase.js +119 -119
- package/src/charts/ColumnGraph.d.ts +19 -19
- package/src/charts/ColumnGraph.js +114 -114
- package/src/charts/ColumnGraph.scss +27 -27
- package/src/charts/Grid.js +5 -5
- package/src/charts/Gridlines.d.ts +24 -24
- package/src/charts/Gridlines.js +48 -48
- package/src/charts/Gridlines.scss +22 -22
- package/src/charts/Legend.d.ts +26 -26
- package/src/charts/Legend.js +142 -142
- package/src/charts/Legend.scss +41 -41
- package/src/charts/LegendEntry.d.ts +37 -37
- package/src/charts/LegendEntry.js +117 -117
- package/src/charts/LegendEntry.scss +30 -30
- package/src/charts/LineGraph.d.ts +90 -90
- package/src/charts/LineGraph.js +201 -201
- package/src/charts/LineGraph.scss +23 -23
- package/src/charts/Marker.d.ts +87 -87
- package/src/charts/Marker.js +287 -287
- package/src/charts/Marker.scss +41 -41
- package/src/charts/MarkerLine.d.ts +57 -57
- package/src/charts/MarkerLine.js +128 -128
- package/src/charts/MarkerLine.scss +17 -17
- package/src/charts/MouseTracker.d.ts +16 -16
- package/src/charts/MouseTracker.js +80 -80
- package/src/charts/Pie.js +8 -8
- package/src/charts/PieChart.d.ts +80 -80
- package/src/charts/PieChart.js +370 -370
- package/src/charts/PieChart.scss +26 -26
- package/src/charts/PieLabel.d.ts +26 -26
- package/src/charts/PieLabel.js +65 -65
- package/src/charts/PieLabelsContainer.d.ts +3 -3
- package/src/charts/PieLabelsContainer.js +55 -55
- package/src/charts/Range.d.ts +74 -74
- package/src/charts/Range.js +205 -205
- package/src/charts/Range.scss +18 -18
- package/src/charts/ScatterGraph.d.ts +65 -65
- package/src/charts/ScatterGraph.js +155 -155
- package/src/charts/ScatterGraph.scss +21 -21
- package/src/charts/axis/Axis.d.ts +82 -82
- package/src/charts/axis/Axis.js +222 -222
- package/src/charts/axis/Axis.scss +22 -22
- package/src/charts/axis/CategoryAxis.d.ts +21 -21
- package/src/charts/axis/CategoryAxis.js +224 -224
- package/src/charts/axis/CategoryAxis.scss +32 -32
- package/src/charts/axis/NumericAxis.js +349 -349
- package/src/charts/axis/NumericAxis.scss +32 -32
- package/src/charts/axis/Stack.d.ts +10 -10
- package/src/charts/axis/Stack.js +58 -58
- package/src/charts/axis/TimeAxis.d.ts +23 -23
- package/src/charts/axis/TimeAxis.js +510 -510
- package/src/charts/axis/TimeAxis.scss +32 -32
- package/src/charts/axis/index.d.ts +3 -3
- package/src/charts/axis/index.js +3 -3
- package/src/charts/axis/index.scss +5 -5
- package/src/charts/axis/variables.scss +2 -2
- package/src/charts/helpers/MinMaxFinder.js +37 -37
- package/src/charts/helpers/MinMaxReducer.d.ts +22 -22
- package/src/charts/helpers/PointReducer.d.ts +15 -15
- package/src/charts/helpers/PointReducer.js +39 -39
- package/src/charts/helpers/SnapPointFinder.d.ts +18 -18
- package/src/charts/helpers/SnapPointFinder.js +46 -46
- package/src/charts/helpers/ValueAtFinder.d.ts +16 -16
- package/src/charts/helpers/ValueAtFinder.js +41 -41
- package/src/charts/helpers/index.d.ts +4 -4
- package/src/charts/helpers/index.js +4 -4
- package/src/charts/index.d.ts +23 -23
- package/src/charts/index.js +31 -31
- package/src/charts/index.scss +20 -20
- package/src/charts/palette.scss +95 -95
- package/src/charts/shapes.d.ts +22 -22
- package/src/charts/shapes.js +79 -79
- package/src/charts/variables.scss +14 -14
- package/src/core.d.ts +196 -231
- package/src/data/AggregateFunction.d.ts +17 -17
- package/src/data/AggregateFunction.js +148 -148
- package/src/data/ArrayElementView.d.ts +13 -13
- package/src/data/ArrayElementView.js +46 -46
- package/src/data/ArrayRef.d.ts +14 -14
- package/src/data/ArrayRef.js +34 -34
- package/src/data/AugmentedViewBase.d.ts +18 -18
- package/src/data/AugmentedViewBase.js +67 -67
- package/src/data/Binding.d.ts +15 -16
- package/src/data/Binding.js +8 -12
- package/src/data/Binding.spec.js +51 -51
- package/src/data/ExposedRecordView.d.ts +14 -14
- package/src/data/ExposedRecordView.js +69 -69
- package/src/data/ExposedValueView.d.ts +19 -19
- package/src/data/ExposedValueView.js +72 -72
- package/src/data/Expression.d.ts +16 -16
- package/src/data/Grouper.d.ts +21 -21
- package/src/data/Grouper.js +120 -120
- package/src/data/Grouper.spec.js +22 -22
- package/src/data/NestedDataView.d.ts +19 -19
- package/src/data/NestedDataView.js +22 -22
- package/src/data/ReadOnlyDataView.d.ts +14 -14
- package/src/data/ReadOnlyDataView.js +26 -26
- package/src/data/Ref.js +79 -79
- package/src/data/Store.d.ts +14 -14
- package/src/data/Store.js +46 -46
- package/src/data/Store.spec.js +22 -22
- package/src/data/StoreProxy.d.ts +4 -4
- package/src/data/StoreProxy.js +16 -16
- package/src/data/StoreRef.js +52 -54
- package/src/data/StringTemplate.d.ts +13 -13
- package/src/data/StringTemplate.js +97 -97
- package/src/data/StringTemplate.spec.js +82 -82
- package/src/data/StructuredSelector.d.ts +16 -16
- package/src/data/StructuredSelector.js +145 -131
- package/src/data/StructuredSelector.spec.js +98 -113
- package/src/data/SubscribableView.d.ts +11 -11
- package/src/data/View.d.ts +16 -40
- package/src/data/View.js +19 -27
- package/src/data/View.spec.js +60 -60
- package/src/data/ZoomIntoPropertyView.d.ts +11 -11
- package/src/data/ZoomIntoPropertyView.js +33 -33
- package/src/data/ZoomIntoPropertyView.spec.js +65 -65
- package/src/data/comparer.d.ts +7 -7
- package/src/data/comparer.js +46 -46
- package/src/data/comparer.spec.js +60 -60
- package/src/data/computable.d.ts +4 -27
- package/src/data/computable.js +55 -56
- package/src/data/computable.spec.js +47 -55
- package/src/data/createStructuredSelector.d.ts +2 -2
- package/src/data/createStructuredSelector.js +42 -43
- package/src/data/createStructuredSelector.spec.js +46 -46
- package/src/data/defaultCompare.js +14 -14
- package/src/data/diff/diffArrays.d.ts +15 -15
- package/src/data/diff/diffArrays.js +41 -41
- package/src/data/diff/diffs.spec.js +49 -49
- package/src/data/diff/index.d.ts +1 -1
- package/src/data/diff/index.js +1 -1
- package/src/data/enableFatArrowExpansion.d.ts +1 -1
- package/src/data/enableFatArrowExpansion.js +6 -6
- package/src/data/getAccessor.d.ts +8 -8
- package/src/data/getAccessor.js +15 -24
- package/src/data/getSelector.d.ts +3 -3
- package/src/data/getSelector.js +1 -4
- package/src/data/getSelector.spec.js +36 -43
- package/src/data/index.d.ts +0 -2
- package/src/data/index.js +0 -2
- package/src/data/isSelector.d.ts +1 -1
- package/src/data/isSelector.js +26 -26
- package/src/data/ops/append.d.ts +1 -1
- package/src/data/ops/append.js +7 -7
- package/src/data/ops/append.spec.js +28 -28
- package/src/data/ops/filter.d.ts +1 -1
- package/src/data/ops/filter.js +8 -8
- package/src/data/ops/filter.spec.js +29 -29
- package/src/data/ops/findTreeNode.js +15 -15
- package/src/data/ops/findTreeNode.spec.js +24 -24
- package/src/data/ops/index.d.ts +10 -10
- package/src/data/ops/index.js +10 -10
- package/src/data/ops/insertElement.js +2 -2
- package/src/data/ops/merge.d.ts +3 -3
- package/src/data/ops/merge.js +9 -9
- package/src/data/ops/merge.spec.js +27 -27
- package/src/data/ops/moveElement.js +13 -13
- package/src/data/ops/removeTreeNodes.d.ts +1 -1
- package/src/data/ops/removeTreeNodes.js +5 -5
- package/src/data/ops/removeTreeNodes.spec.js +28 -28
- package/src/data/ops/updateArray.d.ts +5 -5
- package/src/data/ops/updateArray.js +24 -24
- package/src/data/ops/updateArray.spec.js +38 -38
- package/src/data/ops/updateTree.d.ts +7 -7
- package/src/data/ops/updateTree.js +25 -25
- package/src/data/ops/updateTree.spec.js +34 -34
- package/src/global.scss +13 -13
- package/src/hooks/createLocalStorageRef.d.ts +2 -2
- package/src/hooks/createLocalStorageRef.js +22 -22
- package/src/hooks/index.d.ts +8 -8
- package/src/hooks/index.js +7 -7
- package/src/hooks/invokeCallback.d.ts +5 -5
- package/src/hooks/invokeCallback.js +6 -6
- package/src/hooks/invokeCallback.spec.js +53 -53
- package/src/hooks/resolveCallback.d.ts +3 -3
- package/src/hooks/resolveCallback.js +11 -11
- package/src/hooks/resolveCallback.spec.js +54 -54
- package/src/hooks/store.d.ts +7 -7
- package/src/hooks/store.js +32 -32
- package/src/hooks/store.spec.js +73 -73
- package/src/hooks/useEffect.d.ts +2 -2
- package/src/hooks/useEffect.js +14 -14
- package/src/hooks/useInterval.js +7 -7
- package/src/hooks/useState.d.ts +2 -2
- package/src/hooks/useState.js +15 -15
- package/src/hooks/useTrigger.d.ts +4 -4
- package/src/hooks/useTrigger.js +20 -20
- package/src/hooks/useTrigger.spec.js +102 -102
- package/src/index.js +7 -7
- package/src/index.scss +6 -6
- package/src/svg/BoundedObject.d.ts +22 -22
- package/src/svg/BoundedObject.js +59 -59
- package/src/svg/ClipRect.d.ts +4 -4
- package/src/svg/ClipRect.js +23 -23
- package/src/svg/Ellipse.d.ts +23 -23
- package/src/svg/Ellipse.js +36 -36
- package/src/svg/Line.d.ts +20 -20
- package/src/svg/Line.js +32 -32
- package/src/svg/NonOverlappingRect.d.ts +5 -5
- package/src/svg/NonOverlappingRect.js +14 -14
- package/src/svg/NonOverlappingRectGroup.d.ts +3 -3
- package/src/svg/NonOverlappingRectGroup.js +36 -36
- package/src/svg/Rectangle.d.ts +23 -23
- package/src/svg/Rectangle.js +36 -36
- package/src/svg/Svg.d.ts +32 -32
- package/src/svg/Svg.js +177 -177
- package/src/svg/Svg.scss +26 -26
- package/src/svg/Text.d.ts +38 -38
- package/src/svg/Text.js +61 -61
- package/src/svg/TextualBoundedObject.d.ts +6 -6
- package/src/svg/TextualBoundedObject.js +28 -28
- package/src/svg/index.d.ts +11 -11
- package/src/svg/index.js +17 -17
- package/src/svg/index.scss +8 -8
- package/src/svg/util/Rect.d.ts +40 -40
- package/src/svg/util/Rect.js +108 -108
- package/src/ui/CSS.d.ts +19 -19
- package/src/ui/CSS.js +79 -79
- package/src/ui/CSSHelper.d.ts +10 -10
- package/src/ui/CSSHelper.js +17 -17
- package/src/ui/Container.d.ts +18 -18
- package/src/ui/Container.js +183 -183
- package/src/ui/ContentResolver.d.ts +13 -13
- package/src/ui/ContentResolver.js +78 -78
- package/src/ui/Controller.d.ts +8 -13
- package/src/ui/Controller.js +114 -114
- package/src/ui/Controller.spec.js +414 -414
- package/src/ui/Culture.d.ts +22 -22
- package/src/ui/Culture.js +65 -65
- package/src/ui/Cx.d.ts +18 -18
- package/src/ui/Cx.js +313 -313
- package/src/ui/Cx.spec.js +193 -193
- package/src/ui/DataProxy.d.ts +10 -10
- package/src/ui/DataProxy.js +44 -44
- package/src/ui/DataProxy.spec.js +335 -335
- package/src/ui/DetachedScope.d.ts +21 -21
- package/src/ui/DetachedScope.js +93 -93
- package/src/ui/FocusManager.d.ts +29 -29
- package/src/ui/FocusManager.js +163 -163
- package/src/ui/Format.d.ts +2 -2
- package/src/ui/Format.js +88 -88
- package/src/ui/HoverSync.d.ts +13 -13
- package/src/ui/HoverSync.js +147 -147
- package/src/ui/Instance.d.ts +6 -6
- package/src/ui/Instance.js +5 -6
- package/src/ui/IsolatedScope.d.ts +16 -16
- package/src/ui/IsolatedScope.js +29 -29
- package/src/ui/IsolatedScope.spec.js +62 -62
- package/src/ui/Localization.d.ts +17 -17
- package/src/ui/Localization.js +72 -72
- package/src/ui/PureContainer.d.ts +16 -16
- package/src/ui/PureContainer.js +7 -7
- package/src/ui/RenderingContext.d.ts +9 -9
- package/src/ui/RenderingContext.js +88 -88
- package/src/ui/Repeater.d.ts +36 -46
- package/src/ui/Repeater.js +98 -98
- package/src/ui/Repeater.spec.js +59 -59
- package/src/ui/Rescope.d.ts +9 -9
- package/src/ui/Rescope.js +31 -31
- package/src/ui/Rescope.spec.js +195 -195
- package/src/ui/ResizeManager.d.ts +9 -9
- package/src/ui/ResizeManager.js +30 -30
- package/src/ui/Restate.d.ts +12 -12
- package/src/ui/Restate.js +155 -155
- package/src/ui/Restate.spec.js +423 -422
- package/src/ui/StaticText.d.ts +8 -8
- package/src/ui/StaticText.js +9 -9
- package/src/ui/StructuredInstanceDataAccessor.d.ts +16 -16
- package/src/ui/StructuredInstanceDataAccessor.js +26 -26
- package/src/ui/Text.d.ts +10 -10
- package/src/ui/Text.js +27 -27
- package/src/ui/VDOM.d.ts +3 -3
- package/src/ui/VDOM.js +2 -2
- package/src/ui/Widget.d.ts +14 -14
- package/src/ui/Widget.js +200 -200
- package/src/ui/ZIndexManager.d.ts +7 -7
- package/src/ui/ZIndexManager.js +11 -11
- package/src/ui/adapter/ArrayAdapter.d.ts +17 -16
- package/src/ui/adapter/ArrayAdapter.js +149 -142
- package/src/ui/adapter/DataAdapter.d.ts +19 -19
- package/src/ui/adapter/DataAdapter.js +19 -19
- package/src/ui/adapter/GroupAdapter.d.ts +4 -4
- package/src/ui/adapter/GroupAdapter.js +135 -135
- package/src/ui/adapter/TreeAdapter.d.ts +4 -4
- package/src/ui/adapter/TreeAdapter.js +73 -73
- package/src/ui/adapter/TreeAdapter.spec.js +67 -67
- package/src/ui/adapter/index.d.ts +4 -4
- package/src/ui/adapter/index.js +4 -4
- package/src/ui/app/History.d.ts +17 -17
- package/src/ui/app/History.js +114 -114
- package/src/ui/app/Url.d.ts +21 -21
- package/src/ui/app/Url.js +103 -103
- package/src/ui/app/Url.spec.js +51 -51
- package/src/ui/app/index.d.ts +4 -4
- package/src/ui/app/index.js +5 -5
- package/src/ui/app/startAppLoop.d.ts +3 -3
- package/src/ui/app/startAppLoop.js +57 -57
- package/src/ui/app/startHotAppLoop.d.ts +6 -6
- package/src/ui/app/startHotAppLoop.js +25 -25
- package/src/ui/batchUpdates.d.ts +10 -10
- package/src/ui/batchUpdates.js +67 -67
- package/src/ui/bind.d.ts +2 -3
- package/src/ui/bind.js +6 -7
- package/src/ui/createFunctionalComponent.d.ts +1 -1
- package/src/ui/createFunctionalComponent.js +68 -68
- package/src/ui/createFunctionalComponent.spec.js +400 -400
- package/src/ui/expr.d.ts +2 -23
- package/src/ui/expr.js +5 -17
- package/src/ui/flattenProps.js +21 -21
- package/src/ui/index.js +44 -44
- package/src/ui/index.scss +2 -2
- package/src/ui/keyboardShortcuts.d.ts +4 -4
- package/src/ui/keyboardShortcuts.js +32 -32
- package/src/ui/layout/Content.d.ts +11 -11
- package/src/ui/layout/Content.js +16 -16
- package/src/ui/layout/ContentPlaceholder.d.ts +17 -17
- package/src/ui/layout/ContentPlaceholder.js +79 -79
- package/src/ui/layout/ContentPlaceholder.spec.js +368 -368
- package/src/ui/layout/FirstVisibleChildLayout.d.ts +4 -4
- package/src/ui/layout/FirstVisibleChildLayout.js +65 -65
- package/src/ui/layout/FirstVisibleChildLayout.spec.js +196 -196
- package/src/ui/layout/LabelsLeftLayout.d.ts +11 -11
- package/src/ui/layout/LabelsLeftLayout.js +59 -59
- package/src/ui/layout/LabelsLeftLayout.scss +44 -44
- package/src/ui/layout/LabelsTopLayout.d.ts +15 -15
- package/src/ui/layout/LabelsTopLayout.js +134 -134
- package/src/ui/layout/LabelsTopLayout.scss +63 -63
- package/src/ui/layout/UseParentLayout.d.ts +4 -4
- package/src/ui/layout/UseParentLayout.js +6 -6
- package/src/ui/layout/exploreChildren.d.ts +14 -14
- package/src/ui/layout/exploreChildren.js +40 -40
- package/src/ui/layout/index.d.ts +10 -10
- package/src/ui/layout/index.js +10 -10
- package/src/ui/layout/index.scss +3 -3
- package/src/ui/layout/variables.scss +2 -2
- package/src/ui/selection/KeySelection.d.ts +17 -17
- package/src/ui/selection/KeySelection.js +129 -129
- package/src/ui/selection/PropertySelection.d.ts +17 -17
- package/src/ui/selection/PropertySelection.js +57 -57
- package/src/ui/selection/Selection.d.ts +27 -27
- package/src/ui/selection/Selection.js +97 -97
- package/src/ui/selection/index.d.ts +3 -3
- package/src/ui/selection/index.js +3 -3
- package/src/ui/tpl.d.ts +2 -2
- package/src/ui/tpl.js +4 -4
- package/src/ui/variables.scss +1 -1
- package/src/util/Component.d.ts +41 -41
- package/src/util/Component.js +107 -107
- package/src/util/Console.d.ts +9 -9
- package/src/util/Console.js +11 -11
- package/src/util/DOM.d.ts +33 -33
- package/src/util/DOM.js +72 -72
- package/src/util/Debug.d.ts +10 -10
- package/src/util/Debug.js +45 -45
- package/src/util/Format.d.ts +13 -13
- package/src/util/Format.js +241 -241
- package/src/util/Format.spec.js +69 -69
- package/src/util/GlobalCacheIdentifier.js +11 -11
- package/src/util/GlobalCacheldentifier.d.ts +6 -6
- package/src/util/KeyCode.d.ts +21 -21
- package/src/util/KeyCode.js +21 -21
- package/src/util/SubscriberList.d.ts +41 -41
- package/src/util/SubscriberList.js +57 -57
- package/src/util/Timing.d.ts +13 -13
- package/src/util/Timing.js +57 -57
- package/src/util/TraversalStack.js +42 -42
- package/src/util/TraversalStack.spec.js +46 -46
- package/src/util/addEventListenerWithOptions.d.ts +6 -6
- package/src/util/addEventListenerWithOptions.js +9 -9
- package/src/util/browserSupportsPassiveEventHandlers.d.ts +4 -4
- package/src/util/browserSupportsPassiveEventHandlers.js +18 -18
- package/src/util/calculateNaturalElementHeight.d.ts +1 -1
- package/src/util/calculateNaturalElementHeight.js +22 -22
- package/src/util/call-once.scss +6 -6
- package/src/util/coalesce.d.ts +1 -1
- package/src/util/coalesce.js +6 -6
- package/src/util/color/hslToRgb.d.ts +8 -8
- package/src/util/color/hslToRgb.js +27 -27
- package/src/util/color/index.d.ts +3 -3
- package/src/util/color/index.js +4 -4
- package/src/util/color/parseColor.d.ts +59 -59
- package/src/util/color/parseColor.js +119 -119
- package/src/util/color/rgbToHex.d.ts +8 -8
- package/src/util/color/rgbToHex.js +7 -7
- package/src/util/color/rgbToHsl.d.ts +8 -8
- package/src/util/color/rgbToHsl.js +27 -27
- package/src/util/date/dateDiff.d.ts +7 -7
- package/src/util/date/dateDiff.js +3 -3
- package/src/util/date/diff.d.ts +7 -7
- package/src/util/date/diff.js +7 -7
- package/src/util/date/encodeDateWithTimezoneOffset.js +18 -18
- package/src/util/date/index.d.ts +8 -8
- package/src/util/date/index.js +9 -9
- package/src/util/date/lowerBoundCheck.d.ts +7 -7
- package/src/util/date/lowerBoundCheck.js +6 -6
- package/src/util/date/maxDate.d.ts +5 -5
- package/src/util/date/maxDate.js +9 -9
- package/src/util/date/minDate.d.ts +5 -5
- package/src/util/date/minDate.js +9 -9
- package/src/util/date/monthStart.d.ts +5 -5
- package/src/util/date/monthStart.js +3 -3
- package/src/util/date/sameDate.d.ts +6 -6
- package/src/util/date/sameDate.js +5 -5
- package/src/util/date/upperBoundCheck.d.ts +7 -7
- package/src/util/date/upperBoundCheck.js +6 -6
- package/src/util/date/upperBoundCheck.spec.js +30 -30
- package/src/util/date/zeroTime.d.ts +6 -6
- package/src/util/date/zeroTime.js +3 -3
- package/src/util/debounce.d.ts +9 -9
- package/src/util/dummyCallback.d.ts +1 -1
- package/src/util/dummyCallback.js +1 -1
- package/src/util/escapeSpecialRegexCharacters.d.ts +6 -6
- package/src/util/escapeSpecialRegexCharacters.js +3 -3
- package/src/util/eventCallbacks.d.ts +4 -4
- package/src/util/eventCallbacks.js +2 -2
- package/src/util/expandFatArrows.js +118 -118
- package/src/util/findScrollableParent.js +16 -16
- package/src/util/getActiveElement.js +3 -3
- package/src/util/getParentFrameBoundingClientRect.js +18 -18
- package/src/util/getScrollerBoundingClientRect.js +21 -21
- package/src/util/getSearchQueryPredicate.js +58 -58
- package/src/util/getSearchQueryPredicate.spec.js +40 -40
- package/src/util/getTopLevelBoundingClientRect.js +13 -13
- package/src/util/getVendorPrefix.js +26 -26
- package/src/util/index.d.ts +50 -50
- package/src/util/index.js +52 -52
- package/src/util/index.scss +10 -10
- package/src/util/innerTextTrim.d.ts +6 -6
- package/src/util/innerTextTrim.js +5 -5
- package/src/util/isArray.js +3 -3
- package/src/util/isDefined.js +3 -3
- package/src/util/isDigit.d.ts +6 -6
- package/src/util/isDigit.js +3 -3
- package/src/util/isFunction.d.ts +1 -1
- package/src/util/isFunction.js +3 -3
- package/src/util/isNonEmptyArray.d.ts +1 -1
- package/src/util/isNonEmptyArray.js +3 -3
- package/src/util/isNumber.js +3 -3
- package/src/util/isObject.js +3 -3
- package/src/util/isPromise.d.ts +1 -1
- package/src/util/isPromise.js +6 -6
- package/src/util/isString.js +3 -3
- package/src/util/isTextInputElement.d.ts +1 -1
- package/src/util/isTextInputElement.js +2 -2
- package/src/util/isTouchDevice.d.ts +1 -1
- package/src/util/isTouchDevice.js +7 -7
- package/src/util/isTouchEvent.d.ts +3 -3
- package/src/util/isTouchEvent.js +52 -52
- package/src/util/isUndefined.js +3 -3
- package/src/util/onIdleCallback.js +13 -13
- package/src/util/parseStyle.d.ts +3 -3
- package/src/util/parseStyle.js +27 -27
- package/src/util/quote.d.ts +2 -2
- package/src/util/quote.js +5 -5
- package/src/util/reverseSlice.js +9 -9
- package/src/util/routeAppend.js +15 -15
- package/src/util/routeAppend.spec.js +19 -19
- package/src/util/scrollElementIntoView.d.ts +6 -6
- package/src/util/scrollElementIntoView.js +59 -59
- package/src/util/scss/add-rules.scss +39 -39
- package/src/util/scss/calc.scss +40 -40
- package/src/util/scss/call-once.scss +10 -10
- package/src/util/scss/clockwise.scss +47 -47
- package/src/util/scss/colors.scss +7 -7
- package/src/util/scss/deep-get.scss +9 -9
- package/src/util/scss/deep-merge.scss +18 -18
- package/src/util/scss/include.scss +47 -47
- package/src/util/scss/index.scss +8 -8
- package/src/util/shallowEquals.js +43 -43
- package/src/util/throttle.d.ts +8 -8
- package/src/util/throttle.js +14 -14
- package/src/variables.scss +217 -217
- package/src/widgets/Button.d.ts +52 -52
- package/src/widgets/Button.scss +108 -108
- package/src/widgets/Button.variables.scss +107 -107
- package/src/widgets/CxCredit.d.ts +12 -12
- package/src/widgets/CxCredit.js +31 -31
- package/src/widgets/CxCredit.scss +41 -41
- package/src/widgets/DocumentTitle.d.ts +10 -10
- package/src/widgets/DocumentTitle.js +68 -68
- package/src/widgets/FlexBox.d.ts +69 -69
- package/src/widgets/FlexBox.js +92 -92
- package/src/widgets/FlexBox.scss +155 -155
- package/src/widgets/Heading.d.ts +16 -16
- package/src/widgets/Heading.js +32 -32
- package/src/widgets/Heading.scss +38 -38
- package/src/widgets/HighlightedSearchText.d.ts +9 -9
- package/src/widgets/HighlightedSearchText.js +36 -36
- package/src/widgets/HighlightedSearchText.scss +18 -18
- package/src/widgets/HtmlElement.d.ts +26 -26
- package/src/widgets/HtmlElement.js +273 -273
- package/src/widgets/HtmlElement.spec.js +57 -57
- package/src/widgets/Icon.d.ts +36 -36
- package/src/widgets/Icon.js +50 -50
- package/src/widgets/Icon.scss +20 -20
- package/src/widgets/List.d.ts +72 -84
- package/src/widgets/List.js +578 -578
- package/src/widgets/List.scss +92 -92
- package/src/widgets/ProgressBar.d.ts +17 -17
- package/src/widgets/ProgressBar.js +46 -46
- package/src/widgets/ProgressBar.scss +49 -49
- package/src/widgets/Resizer.d.ts +27 -27
- package/src/widgets/Resizer.js +151 -151
- package/src/widgets/Resizer.scss +42 -42
- package/src/widgets/Sandbox.d.ts +18 -18
- package/src/widgets/Sandbox.js +58 -58
- package/src/widgets/Section.d.ts +52 -52
- package/src/widgets/Section.js +139 -139
- package/src/widgets/Section.scss +54 -54
- package/src/widgets/animations.scss +10 -10
- package/src/widgets/autoFocus.d.ts +1 -1
- package/src/widgets/autoFocus.js +11 -11
- package/src/widgets/cx.d.ts +1 -1
- package/src/widgets/cx.js +71 -71
- package/src/widgets/drag-drop/DragClone.scss +33 -33
- package/src/widgets/drag-drop/DragHandle.d.ts +10 -10
- package/src/widgets/drag-drop/DragHandle.js +37 -37
- package/src/widgets/drag-drop/DragHandle.scss +16 -16
- package/src/widgets/drag-drop/DragSource.d.ts +34 -34
- package/src/widgets/drag-drop/DragSource.js +160 -160
- package/src/widgets/drag-drop/DragSource.scss +24 -24
- package/src/widgets/drag-drop/DropZone.d.ts +90 -90
- package/src/widgets/drag-drop/DropZone.js +213 -213
- package/src/widgets/drag-drop/DropZone.scss +74 -74
- package/src/widgets/drag-drop/index.d.ts +4 -4
- package/src/widgets/drag-drop/index.js +4 -4
- package/src/widgets/drag-drop/index.scss +3 -3
- package/src/widgets/drag-drop/ops.d.ts +56 -56
- package/src/widgets/drag-drop/ops.js +344 -344
- package/src/widgets/drag-drop/variables.scss +11 -11
- package/src/widgets/enableAllInternalDependencies.d.ts +1 -1
- package/src/widgets/enableAllInternalDependencies.js +11 -11
- package/src/widgets/form/Calendar.d.ts +57 -57
- package/src/widgets/form/Calendar.js +506 -506
- package/src/widgets/form/Calendar.scss +164 -164
- package/src/widgets/form/Calendar.variables.scss +63 -63
- package/src/widgets/form/Checkbox.d.ts +43 -43
- package/src/widgets/form/Checkbox.js +200 -200
- package/src/widgets/form/Checkbox.scss +122 -122
- package/src/widgets/form/Checkbox.variables.scss +39 -39
- package/src/widgets/form/ColorField.d.ts +43 -43
- package/src/widgets/form/ColorField.js +389 -389
- package/src/widgets/form/ColorField.scss +92 -92
- package/src/widgets/form/ColorPicker.d.ts +23 -23
- package/src/widgets/form/ColorPicker.js +451 -451
- package/src/widgets/form/ColorPicker.scss +184 -184
- package/src/widgets/form/ColorPicker.variables.scss +20 -20
- package/src/widgets/form/DateField.d.ts +6 -6
- package/src/widgets/form/DateField.js +12 -12
- package/src/widgets/form/DateTimeField.d.ts +83 -83
- package/src/widgets/form/DateTimeField.js +571 -571
- package/src/widgets/form/DateTimeField.scss +90 -90
- package/src/widgets/form/DateTimePicker.js +391 -391
- package/src/widgets/form/DateTimePicker.scss +44 -44
- package/src/widgets/form/Field.d.ts +112 -112
- package/src/widgets/form/Field.js +419 -419
- package/src/widgets/form/Field.scss +162 -162
- package/src/widgets/form/FieldGroup.d.ts +6 -6
- package/src/widgets/form/FieldGroup.js +5 -5
- package/src/widgets/form/HelpText.d.ts +10 -10
- package/src/widgets/form/HelpText.js +9 -9
- package/src/widgets/form/HelpText.scss +23 -23
- package/src/widgets/form/Label.d.ts +25 -25
- package/src/widgets/form/Label.js +86 -86
- package/src/widgets/form/Label.scss +36 -36
- package/src/widgets/form/LabeledContainer.d.ts +17 -17
- package/src/widgets/form/LabeledContainer.js +57 -57
- package/src/widgets/form/LookupField.d.ts +159 -159
- package/src/widgets/form/LookupField.js +1109 -1109
- package/src/widgets/form/LookupField.scss +210 -210
- package/src/widgets/form/MonthField.d.ts +88 -88
- package/src/widgets/form/MonthField.js +512 -512
- package/src/widgets/form/MonthField.scss +99 -99
- package/src/widgets/form/MonthPicker.d.ts +68 -68
- package/src/widgets/form/MonthPicker.js +631 -631
- package/src/widgets/form/MonthPicker.scss +120 -120
- package/src/widgets/form/NumberField.d.ts +94 -94
- package/src/widgets/form/NumberField.js +443 -443
- package/src/widgets/form/NumberField.scss +65 -65
- package/src/widgets/form/Radio.d.ts +37 -37
- package/src/widgets/form/Radio.js +188 -188
- package/src/widgets/form/Radio.scss +122 -122
- package/src/widgets/form/Radio.variables.scss +45 -45
- package/src/widgets/form/Select.d.ts +73 -73
- package/src/widgets/form/Select.js +274 -274
- package/src/widgets/form/Select.scss +98 -98
- package/src/widgets/form/Slider.d.ts +62 -62
- package/src/widgets/form/Slider.js +339 -339
- package/src/widgets/form/Slider.scss +121 -121
- package/src/widgets/form/Switch.d.ts +38 -38
- package/src/widgets/form/Switch.js +120 -120
- package/src/widgets/form/Switch.scss +140 -140
- package/src/widgets/form/TextArea.d.ts +17 -17
- package/src/widgets/form/TextArea.js +182 -182
- package/src/widgets/form/TextArea.scss +60 -60
- package/src/widgets/form/TextField.d.ts +75 -75
- package/src/widgets/form/TextField.js +286 -286
- package/src/widgets/form/TextField.scss +67 -67
- package/src/widgets/form/TimeField.d.ts +6 -6
- package/src/widgets/form/TimeField.js +11 -11
- package/src/widgets/form/TimeList.js +84 -84
- package/src/widgets/form/UploadButton.d.ts +31 -31
- package/src/widgets/form/UploadButton.js +213 -213
- package/src/widgets/form/UploadButton.scss +47 -47
- package/src/widgets/form/ValidationError.d.ts +10 -10
- package/src/widgets/form/ValidationError.js +37 -37
- package/src/widgets/form/ValidationError.scss +21 -21
- package/src/widgets/form/ValidationGroup.spec.js +148 -148
- package/src/widgets/form/Validator.d.ts +6 -6
- package/src/widgets/form/Wheel.js +261 -261
- package/src/widgets/form/Wheel.scss +148 -148
- package/src/widgets/form/index.d.ts +26 -26
- package/src/widgets/form/index.js +29 -29
- package/src/widgets/form/index.scss +24 -24
- package/src/widgets/form/variables.scss +351 -351
- package/src/widgets/grid/Grid.d.ts +350 -368
- package/src/widgets/grid/Grid.js +3199 -3208
- package/src/widgets/grid/Grid.scss +680 -656
- package/src/widgets/grid/GridCell.d.ts +29 -29
- package/src/widgets/grid/GridCell.js +70 -70
- package/src/widgets/grid/GridCellEditor.js +41 -41
- package/src/widgets/grid/GridRow.js +228 -228
- package/src/widgets/grid/GridRowLine.js +24 -24
- package/src/widgets/grid/Pagination.d.ts +14 -14
- package/src/widgets/grid/Pagination.js +94 -94
- package/src/widgets/grid/Pagination.scss +113 -113
- package/src/widgets/grid/TreeNode.d.ts +25 -25
- package/src/widgets/grid/TreeNode.js +102 -102
- package/src/widgets/grid/TreeNode.scss +90 -90
- package/src/widgets/grid/index.d.ts +3 -3
- package/src/widgets/grid/index.js +14 -14
- package/src/widgets/grid/index.scss +3 -3
- package/src/widgets/grid/variables.scss +88 -88
- package/src/widgets/icons/arrow-down.svg +3 -3
- package/src/widgets/icons/arrow-right.svg +2 -2
- package/src/widgets/icons/base.svg +104 -104
- package/src/widgets/icons/calendar-old.svg +169 -169
- package/src/widgets/icons/calendar.js +16 -16
- package/src/widgets/icons/calendar.svg +187 -187
- package/src/widgets/icons/check.js +12 -12
- package/src/widgets/icons/clear.js +14 -14
- package/src/widgets/icons/clear.svg +74 -74
- package/src/widgets/icons/close.js +19 -19
- package/src/widgets/icons/close.svg +74 -74
- package/src/widgets/icons/cx.js +37 -37
- package/src/widgets/icons/drop-down.js +14 -14
- package/src/widgets/icons/dropdown-arrow.svg +61 -61
- package/src/widgets/icons/file.js +12 -12
- package/src/widgets/icons/file.svg +4 -4
- package/src/widgets/icons/folder-open.js +14 -14
- package/src/widgets/icons/folder-open.svg +5 -5
- package/src/widgets/icons/folder.js +12 -12
- package/src/widgets/icons/folder.svg +58 -58
- package/src/widgets/icons/forward.js +21 -21
- package/src/widgets/icons/forward.svg +67 -67
- package/src/widgets/icons/index.js +14 -14
- package/src/widgets/icons/loading.js +23 -23
- package/src/widgets/icons/loading.svg +4 -4
- package/src/widgets/icons/menu.js +16 -16
- package/src/widgets/icons/registry.js +53 -53
- package/src/widgets/icons/search.js +12 -12
- package/src/widgets/icons/search.svg +107 -107
- package/src/widgets/icons/sort-asc.js +13 -13
- package/src/widgets/icons/sort-asc.svg +3 -3
- package/src/widgets/icons/square.js +17 -17
- package/src/widgets/index.d.ts +55 -55
- package/src/widgets/index.js +57 -57
- package/src/widgets/index.scss +16 -16
- package/src/widgets/nav/Link.d.ts +22 -22
- package/src/widgets/nav/Link.js +7 -7
- package/src/widgets/nav/LinkButton.d.ts +31 -31
- package/src/widgets/nav/LinkButton.js +127 -127
- package/src/widgets/nav/Menu.d.ts +27 -27
- package/src/widgets/nav/Menu.js +411 -411
- package/src/widgets/nav/Menu.scss +74 -74
- package/src/widgets/nav/Menu.variables.scss +17 -17
- package/src/widgets/nav/MenuItem.d.ts +32 -32
- package/src/widgets/nav/MenuItem.js +442 -442
- package/src/widgets/nav/MenuItem.scss +128 -128
- package/src/widgets/nav/MenuSpacer.d.ts +5 -5
- package/src/widgets/nav/MenuSpacer.js +12 -12
- package/src/widgets/nav/RedirectRoute.d.ts +9 -9
- package/src/widgets/nav/RedirectRoute.js +40 -40
- package/src/widgets/nav/Route.d.ts +21 -21
- package/src/widgets/nav/Route.js +105 -105
- package/src/widgets/nav/Route.spec.js +27 -27
- package/src/widgets/nav/Scroller.d.ts +17 -17
- package/src/widgets/nav/Scroller.js +214 -214
- package/src/widgets/nav/Scroller.scss +146 -146
- package/src/widgets/nav/Submenu.d.ts +6 -6
- package/src/widgets/nav/Submenu.js +6 -6
- package/src/widgets/nav/Tab.d.ts +33 -33
- package/src/widgets/nav/Tab.js +82 -82
- package/src/widgets/nav/Tab.scss +81 -81
- package/src/widgets/nav/Tab.variables.scss +80 -80
- package/src/widgets/nav/cover.scss +21 -21
- package/src/widgets/nav/index.d.ts +10 -10
- package/src/widgets/nav/index.js +10 -10
- package/src/widgets/nav/index.scss +5 -5
- package/src/widgets/nav/variables.scss +25 -25
- package/src/widgets/overlay/ContextMenu.d.ts +8 -8
- package/src/widgets/overlay/ContextMenu.js +28 -28
- package/src/widgets/overlay/Dropdown.d.ts +27 -27
- package/src/widgets/overlay/Dropdown.js +601 -601
- package/src/widgets/overlay/Dropdown.scss +184 -184
- package/src/widgets/overlay/FlyweightTooltipTracker.d.ts +8 -8
- package/src/widgets/overlay/FlyweightTooltipTracker.js +36 -36
- package/src/widgets/overlay/MsgBox.d.ts +16 -16
- package/src/widgets/overlay/MsgBox.js +116 -116
- package/src/widgets/overlay/Overlay.d.ts +69 -69
- package/src/widgets/overlay/Overlay.js +737 -737
- package/src/widgets/overlay/Overlay.scss +66 -66
- package/src/widgets/overlay/Toast.d.ts +30 -30
- package/src/widgets/overlay/Toast.js +92 -92
- package/src/widgets/overlay/Toast.scss +162 -162
- package/src/widgets/overlay/Tooltip.d.ts +50 -50
- package/src/widgets/overlay/Tooltip.js +283 -283
- package/src/widgets/overlay/Tooltip.scss +175 -175
- package/src/widgets/overlay/Window.d.ts +38 -38
- package/src/widgets/overlay/Window.js +195 -195
- package/src/widgets/overlay/Window.scss +112 -112
- package/src/widgets/overlay/Window.variables.scss +67 -67
- package/src/widgets/overlay/alerts.d.ts +7 -7
- package/src/widgets/overlay/alerts.js +39 -39
- package/src/widgets/overlay/captureMouse.d.ts +53 -53
- package/src/widgets/overlay/captureMouse.js +132 -132
- package/src/widgets/overlay/captureMouse.scss +13 -13
- package/src/widgets/overlay/index.d.ts +10 -10
- package/src/widgets/overlay/index.js +10 -10
- package/src/widgets/overlay/index.scss +15 -15
- package/src/widgets/overlay/tooltip-ops.d.ts +8 -8
- package/src/widgets/overlay/tooltip-ops.js +24 -24
- package/src/widgets/overlay/variables.scss +82 -82
- package/src/widgets/variables.scss +144 -144
- package/src/data/createAccessorModelProxy.d.ts +0 -6
- package/src/data/createAccessorModelProxy.js +0 -24
- package/src/data/createAccessorModelProxy.spec.tsx +0 -23
- package/src/widgets/AccessorBindings.spec.tsx +0 -66
- package/yarn-error.log +0 -7973
package/dist/data.js
CHANGED
|
@@ -1,2467 +1,2401 @@
|
|
|
1
|
-
import {
|
|
2
|
-
isObject,
|
|
3
|
-
isString,
|
|
4
|
-
isFunction,
|
|
5
|
-
Format,
|
|
6
|
-
isDigit,
|
|
7
|
-
quoteStr,
|
|
8
|
-
Component,
|
|
9
|
-
isArray,
|
|
10
|
-
isDefined,
|
|
11
|
-
SubscriberList,
|
|
12
|
-
isUndefined,
|
|
13
|
-
expandFatArrows
|
|
14
|
-
} from "cx/util";
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
if (
|
|
26
|
-
|
|
27
|
-
if (
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
var
|
|
45
|
-
var
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
var
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
})
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
return
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
function
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
function
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
return
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
function
|
|
191
|
-
if (
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
if (
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
function
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
function
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
function
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
var
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
_proto.
|
|
661
|
-
return this.get;
|
|
662
|
-
};
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
var
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
_this =
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
_proto.
|
|
695
|
-
return
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
};
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
_proto.
|
|
725
|
-
|
|
726
|
-
};
|
|
727
|
-
|
|
728
|
-
_proto.
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
};
|
|
761
|
-
|
|
762
|
-
_proto.
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
if (
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
}
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
return
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
return this.
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
var
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
}
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
var
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
var
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
var
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
};
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
var
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
};
|
|
1310
|
-
|
|
1311
|
-
_proto.
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
function
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
_proto.
|
|
1340
|
-
if (this.
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
var
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
}
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
if (config.
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
}
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
return
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
if (
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
}
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
}
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
}
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
}
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
}
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
function
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
var
|
|
1663
|
-
function
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
return
|
|
1683
|
-
};
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
var
|
|
1693
|
-
function
|
|
1694
|
-
|
|
1695
|
-
var
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
this.
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
};
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
var
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
this.
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
}
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
function
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
}
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
}
|
|
1880
|
-
|
|
1881
|
-
}
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
return
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
return
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
function
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
}
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
}
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
var
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
}
|
|
2231
|
-
|
|
2232
|
-
var
|
|
2233
|
-
_inheritsLoose(
|
|
2234
|
-
|
|
2235
|
-
function
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
}
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
var
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
}
|
|
2349
|
-
|
|
2350
|
-
return
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
return accessor.set(value, instance);
|
|
2403
|
-
},
|
|
2404
|
-
isAccessor: true
|
|
2405
|
-
};
|
|
2406
|
-
}
|
|
2407
|
-
};
|
|
2408
|
-
return {
|
|
2409
|
-
get: selector,
|
|
2410
|
-
isAccessor: true
|
|
2411
|
-
};
|
|
2412
|
-
}
|
|
2413
|
-
|
|
2414
|
-
return {
|
|
2415
|
-
get: function get() {
|
|
2416
|
-
return accessor;
|
|
2417
|
-
}
|
|
2418
|
-
};
|
|
2419
|
-
}
|
|
2420
|
-
|
|
2421
|
-
export {
|
|
2422
|
-
ArrayElementView,
|
|
2423
|
-
ArrayRef,
|
|
2424
|
-
AugmentedViewBase,
|
|
2425
|
-
Binding,
|
|
2426
|
-
ExposedRecordView,
|
|
2427
|
-
ExposedValueView,
|
|
2428
|
-
Expression,
|
|
2429
|
-
Grouper,
|
|
2430
|
-
NestedDataView,
|
|
2431
|
-
ReadOnlyDataView,
|
|
2432
|
-
Ref,
|
|
2433
|
-
Store,
|
|
2434
|
-
StoreProxy,
|
|
2435
|
-
StringTemplate,
|
|
2436
|
-
StructuredSelector,
|
|
2437
|
-
SubscribableView,
|
|
2438
|
-
View,
|
|
2439
|
-
ZoomIntoPropertyView,
|
|
2440
|
-
append,
|
|
2441
|
-
computable,
|
|
2442
|
-
createAccessorModelProxy,
|
|
2443
|
-
defaultCompare,
|
|
2444
|
-
diffArrays,
|
|
2445
|
-
enableFatArrowExpansion,
|
|
2446
|
-
expression,
|
|
2447
|
-
filter,
|
|
2448
|
-
findTreeNode,
|
|
2449
|
-
getAccessor,
|
|
2450
|
-
getComparer,
|
|
2451
|
-
getSelector,
|
|
2452
|
-
indexSorter,
|
|
2453
|
-
insertElement,
|
|
2454
|
-
invalidateExpressionCache,
|
|
2455
|
-
invalidateStringTemplateCache,
|
|
2456
|
-
isAccessorChain,
|
|
2457
|
-
isBinding,
|
|
2458
|
-
isSelector,
|
|
2459
|
-
merge,
|
|
2460
|
-
moveElement,
|
|
2461
|
-
plugFatArrowExpansion,
|
|
2462
|
-
removeTreeNodes,
|
|
2463
|
-
sorter,
|
|
2464
|
-
stringTemplate,
|
|
2465
|
-
updateArray,
|
|
2466
|
-
updateTree
|
|
2467
|
-
};
|
|
1
|
+
import {
|
|
2
|
+
isObject,
|
|
3
|
+
isString,
|
|
4
|
+
isFunction,
|
|
5
|
+
Format,
|
|
6
|
+
isDigit,
|
|
7
|
+
quoteStr,
|
|
8
|
+
Component,
|
|
9
|
+
isArray,
|
|
10
|
+
isDefined,
|
|
11
|
+
SubscriberList,
|
|
12
|
+
isUndefined,
|
|
13
|
+
expandFatArrows
|
|
14
|
+
} from "cx/util";
|
|
15
|
+
|
|
16
|
+
var bindingCache = {};
|
|
17
|
+
var Binding = /*#__PURE__*/ (function() {
|
|
18
|
+
function Binding(path) {
|
|
19
|
+
this.path = path;
|
|
20
|
+
this.parts = path.split(".");
|
|
21
|
+
var fstr = "return (x";
|
|
22
|
+
var cpath = "x";
|
|
23
|
+
|
|
24
|
+
for (var i = 0; i < this.parts.length; i++) {
|
|
25
|
+
if (this.parts[i][0] >= "0" && this.parts[i][0] <= "9") cpath += "[" + this.parts[i] + "]";
|
|
26
|
+
else cpath += "." + this.parts[i];
|
|
27
|
+
if (i + 1 < this.parts.length) fstr += " && " + cpath;
|
|
28
|
+
else fstr += " ? " + cpath + " : undefined";
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
fstr += ")";
|
|
32
|
+
this.value = new Function("x", fstr);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
var _proto = Binding.prototype;
|
|
36
|
+
|
|
37
|
+
_proto.set = function set(state, value) {
|
|
38
|
+
var cv = this.value(state);
|
|
39
|
+
if (cv === value) return state;
|
|
40
|
+
var ns = Object.assign({}, state);
|
|
41
|
+
var o = ns;
|
|
42
|
+
|
|
43
|
+
for (var i = 0; i < this.parts.length; i++) {
|
|
44
|
+
var part = this.parts[i];
|
|
45
|
+
var no = i == this.parts.length - 1 ? value : Object.assign({}, o[part]);
|
|
46
|
+
o[part] = no;
|
|
47
|
+
o = no;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return ns;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
_proto["delete"] = function _delete(state) {
|
|
54
|
+
var ns = Object.assign({}, state);
|
|
55
|
+
var o = ns;
|
|
56
|
+
var part;
|
|
57
|
+
|
|
58
|
+
for (var i = 0; i < this.parts.length - 1; i++) {
|
|
59
|
+
part = this.parts[i];
|
|
60
|
+
var no = Object.assign({}, o[part]);
|
|
61
|
+
o[part] = no;
|
|
62
|
+
o = no;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
part = this.parts[this.parts.length - 1];
|
|
66
|
+
if (!o.hasOwnProperty(part)) return state;
|
|
67
|
+
delete o[part];
|
|
68
|
+
return ns;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
Binding.get = function get(path) {
|
|
72
|
+
if (isString(path)) {
|
|
73
|
+
var b = bindingCache[path];
|
|
74
|
+
if (b) return b;
|
|
75
|
+
b = new Binding(path);
|
|
76
|
+
bindingCache[path] = b;
|
|
77
|
+
return b;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (isObject(path) && isString(path.bind)) return this.get(path.bind);
|
|
81
|
+
if (path instanceof Binding) return path;
|
|
82
|
+
throw new Error("Invalid binding definition provided.");
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
return Binding;
|
|
86
|
+
})();
|
|
87
|
+
function isBinding(value) {
|
|
88
|
+
if (isObject(value) && isString(value.bind)) return true;
|
|
89
|
+
return value instanceof Binding;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function _defineProperty(obj, key, value) {
|
|
93
|
+
if (key in obj) {
|
|
94
|
+
Object.defineProperty(obj, key, {
|
|
95
|
+
value: value,
|
|
96
|
+
enumerable: true,
|
|
97
|
+
configurable: true,
|
|
98
|
+
writable: true
|
|
99
|
+
});
|
|
100
|
+
} else {
|
|
101
|
+
obj[key] = value;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return obj;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function ownKeys(object, enumerableOnly) {
|
|
108
|
+
var keys = Object.keys(object);
|
|
109
|
+
|
|
110
|
+
if (Object.getOwnPropertySymbols) {
|
|
111
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
112
|
+
if (enumerableOnly)
|
|
113
|
+
symbols = symbols.filter(function(sym) {
|
|
114
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
115
|
+
});
|
|
116
|
+
keys.push.apply(keys, symbols);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
return keys;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function _objectSpread2(target) {
|
|
123
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
124
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
125
|
+
|
|
126
|
+
if (i % 2) {
|
|
127
|
+
ownKeys(Object(source), true).forEach(function(key) {
|
|
128
|
+
_defineProperty(target, key, source[key]);
|
|
129
|
+
});
|
|
130
|
+
} else if (Object.getOwnPropertyDescriptors) {
|
|
131
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
132
|
+
} else {
|
|
133
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
134
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
return target;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
function _inheritsLoose(subClass, superClass) {
|
|
143
|
+
subClass.prototype = Object.create(superClass.prototype);
|
|
144
|
+
subClass.prototype.constructor = subClass;
|
|
145
|
+
|
|
146
|
+
_setPrototypeOf(subClass, superClass);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
function _setPrototypeOf(o, p) {
|
|
150
|
+
_setPrototypeOf =
|
|
151
|
+
Object.setPrototypeOf ||
|
|
152
|
+
function _setPrototypeOf(o, p) {
|
|
153
|
+
o.__proto__ = p;
|
|
154
|
+
return o;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
return _setPrototypeOf(o, p);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
function _isNativeReflectConstruct() {
|
|
161
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
162
|
+
if (Reflect.construct.sham) return false;
|
|
163
|
+
if (typeof Proxy === "function") return true;
|
|
164
|
+
|
|
165
|
+
try {
|
|
166
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
167
|
+
return true;
|
|
168
|
+
} catch (e) {
|
|
169
|
+
return false;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
function _construct(Parent, args, Class) {
|
|
174
|
+
if (_isNativeReflectConstruct()) {
|
|
175
|
+
_construct = Reflect.construct;
|
|
176
|
+
} else {
|
|
177
|
+
_construct = function _construct(Parent, args, Class) {
|
|
178
|
+
var a = [null];
|
|
179
|
+
a.push.apply(a, args);
|
|
180
|
+
var Constructor = Function.bind.apply(Parent, a);
|
|
181
|
+
var instance = new Constructor();
|
|
182
|
+
if (Class) _setPrototypeOf(instance, Class.prototype);
|
|
183
|
+
return instance;
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
return _construct.apply(null, arguments);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
function _assertThisInitialized(self) {
|
|
191
|
+
if (self === void 0) {
|
|
192
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
return self;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
function computable() {
|
|
199
|
+
var _ref;
|
|
200
|
+
|
|
201
|
+
if (arguments.length == 0)
|
|
202
|
+
throw new Error("computable requires at least a compute function to be passed in arguments.");
|
|
203
|
+
var compute = ((_ref = arguments.length - 1), _ref < 0 || arguments.length <= _ref ? undefined : arguments[_ref]);
|
|
204
|
+
if (typeof compute != "function") throw new Error("Last argument to the computable function should be a function.");
|
|
205
|
+
var inputs = [],
|
|
206
|
+
a;
|
|
207
|
+
|
|
208
|
+
for (var i = 0; i + 1 < arguments.length; i++) {
|
|
209
|
+
a = i < 0 || arguments.length <= i ? undefined : arguments[i];
|
|
210
|
+
if (isString(a)) inputs.push(Binding.get(a).value);
|
|
211
|
+
else if (a.memoize) inputs.push(a.memoize());
|
|
212
|
+
else if (isFunction(a)) inputs.push(a);
|
|
213
|
+
else throw new Error("Invalid selector type '" + typeof a + "' received.");
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
function memoize(warmupData) {
|
|
217
|
+
var lastValue,
|
|
218
|
+
lastArgs =
|
|
219
|
+
warmupData &&
|
|
220
|
+
inputs.map(function(s) {
|
|
221
|
+
return s(warmupData);
|
|
222
|
+
});
|
|
223
|
+
return function(data) {
|
|
224
|
+
var dirty = false;
|
|
225
|
+
|
|
226
|
+
if (!lastArgs) {
|
|
227
|
+
lastArgs = Array.from({
|
|
228
|
+
length: inputs.length
|
|
229
|
+
});
|
|
230
|
+
dirty = true;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
for (var _i = 0; _i < inputs.length; _i++) {
|
|
234
|
+
var v = inputs[_i](data);
|
|
235
|
+
|
|
236
|
+
if (v === lastArgs[_i]) continue;
|
|
237
|
+
lastArgs[_i] = v;
|
|
238
|
+
dirty = true;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
if (dirty) lastValue = compute.apply(null, lastArgs);
|
|
242
|
+
return lastValue;
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
var selector = function selector(data) {
|
|
247
|
+
return compute.apply(
|
|
248
|
+
null,
|
|
249
|
+
inputs.map(function(s) {
|
|
250
|
+
return s(data);
|
|
251
|
+
})
|
|
252
|
+
);
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
selector.memoize = memoize;
|
|
256
|
+
return selector;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/*
|
|
260
|
+
Helper usage example
|
|
261
|
+
|
|
262
|
+
Expression.registerHelper('_', _);
|
|
263
|
+
let e = Expression.compile('_.min({data})');
|
|
264
|
+
*/
|
|
265
|
+
|
|
266
|
+
var expCache = {},
|
|
267
|
+
helpers = {},
|
|
268
|
+
helperNames = [],
|
|
269
|
+
helperValues = [],
|
|
270
|
+
expFatArrows = null;
|
|
271
|
+
|
|
272
|
+
function getExpr(expr) {
|
|
273
|
+
if (expr.memoize) return expr;
|
|
274
|
+
|
|
275
|
+
function memoize() {
|
|
276
|
+
var lastValue,
|
|
277
|
+
lastRunBindings = {},
|
|
278
|
+
lastRunResults = {},
|
|
279
|
+
getters = {},
|
|
280
|
+
currentData,
|
|
281
|
+
len = -1;
|
|
282
|
+
|
|
283
|
+
var get = function get(bindingWithFormat) {
|
|
284
|
+
var getter = getters[bindingWithFormat];
|
|
285
|
+
|
|
286
|
+
if (!getter) {
|
|
287
|
+
var binding = bindingWithFormat,
|
|
288
|
+
format;
|
|
289
|
+
var colonIndex = bindingWithFormat.indexOf(":");
|
|
290
|
+
|
|
291
|
+
if (colonIndex != -1) {
|
|
292
|
+
format = Format.parse(bindingWithFormat.substring(colonIndex + 1));
|
|
293
|
+
binding = bindingWithFormat.substring(0, colonIndex);
|
|
294
|
+
} else {
|
|
295
|
+
var nullSeparatorIndex = bindingWithFormat.indexOf(":");
|
|
296
|
+
|
|
297
|
+
if (nullSeparatorIndex != -1) {
|
|
298
|
+
format = Format.parse(bindingWithFormat.substring(nullSeparatorIndex));
|
|
299
|
+
binding = bindingWithFormat.substring(0, nullSeparatorIndex - 1);
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
var b = Binding.get(binding);
|
|
304
|
+
|
|
305
|
+
getter = function getter(data) {
|
|
306
|
+
var value = b.value(data);
|
|
307
|
+
lastRunBindings[len] = b.value;
|
|
308
|
+
lastRunResults[len] = value;
|
|
309
|
+
len++;
|
|
310
|
+
return value;
|
|
311
|
+
};
|
|
312
|
+
|
|
313
|
+
if (format) {
|
|
314
|
+
var valueGetter = getter;
|
|
315
|
+
|
|
316
|
+
getter = function getter(data) {
|
|
317
|
+
return format(valueGetter(data));
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
getters[bindingWithFormat] = getter;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
return getter(currentData);
|
|
325
|
+
};
|
|
326
|
+
|
|
327
|
+
return function(data) {
|
|
328
|
+
var i = 0;
|
|
329
|
+
|
|
330
|
+
for (; i < len; i++) {
|
|
331
|
+
if (lastRunBindings[i](data) !== lastRunResults[i]) break;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
if (i !== len) {
|
|
335
|
+
len = 0;
|
|
336
|
+
currentData = data;
|
|
337
|
+
lastValue = expr(get);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
return lastValue;
|
|
341
|
+
};
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
var result = memoize();
|
|
345
|
+
result.memoize = memoize;
|
|
346
|
+
return result;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
function expression(str) {
|
|
350
|
+
if (isFunction(str)) return getExpr(str);
|
|
351
|
+
var r = expCache[str];
|
|
352
|
+
if (r) return r;
|
|
353
|
+
var quote = false;
|
|
354
|
+
var termStart = -1,
|
|
355
|
+
curlyBrackets = 0,
|
|
356
|
+
percentExpression;
|
|
357
|
+
var fb = ["return ("];
|
|
358
|
+
var args = {};
|
|
359
|
+
var formats = [];
|
|
360
|
+
var subExpr = 0;
|
|
361
|
+
|
|
362
|
+
for (var i = 0; i < str.length; i++) {
|
|
363
|
+
var c = str[i];
|
|
364
|
+
|
|
365
|
+
switch (c) {
|
|
366
|
+
case "{":
|
|
367
|
+
if (curlyBrackets > 0) curlyBrackets++;
|
|
368
|
+
else {
|
|
369
|
+
if (!quote && termStart < 0 && (str[i + 1] != "{" || str[i - 1] == "%")) {
|
|
370
|
+
termStart = i + 1;
|
|
371
|
+
curlyBrackets = 1;
|
|
372
|
+
percentExpression = str[i - 1] == "%";
|
|
373
|
+
if (percentExpression) fb.pop(); //%
|
|
374
|
+
} else if (str[i - 1] != "{") fb.push(c);
|
|
375
|
+
}
|
|
376
|
+
break;
|
|
377
|
+
|
|
378
|
+
case "}":
|
|
379
|
+
if (termStart >= 0) {
|
|
380
|
+
if (--curlyBrackets == 0) {
|
|
381
|
+
var term = str.substring(termStart, i);
|
|
382
|
+
var formatStart = 0;
|
|
383
|
+
if (term[0] == "[") formatStart = term.indexOf("]");
|
|
384
|
+
var colon = term.indexOf(":", formatStart > 0 ? formatStart : 0);
|
|
385
|
+
var binding = colon == -1 ? term : term.substring(0, colon);
|
|
386
|
+
var format = colon == -1 ? null : term.substring(colon + 1);
|
|
387
|
+
|
|
388
|
+
if (colon == -1) {
|
|
389
|
+
var nullSepIndex = binding.indexOf("|", formatStart);
|
|
390
|
+
|
|
391
|
+
if (nullSepIndex != -1) {
|
|
392
|
+
format = binding.substring(nullSepIndex);
|
|
393
|
+
binding = binding.substring(0, nullSepIndex);
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
var argName = binding.replace(/\./g, "_");
|
|
398
|
+
if (isDigit(argName[0])) argName = "$" + argName;
|
|
399
|
+
|
|
400
|
+
if (percentExpression || (binding[0] == "[" && binding[binding.length - 1] == "]")) {
|
|
401
|
+
argName = "expr" + ++subExpr;
|
|
402
|
+
args[argName] = expression(percentExpression ? binding : binding.substring(1, binding.length - 1));
|
|
403
|
+
} else args[argName] = binding;
|
|
404
|
+
|
|
405
|
+
if (format) {
|
|
406
|
+
var formatter = "fmt" + formats.length;
|
|
407
|
+
fb.push(formatter, "(", argName, ", ", quoteStr(format), ")");
|
|
408
|
+
formats.push(Format.parse(format));
|
|
409
|
+
} else fb.push(argName);
|
|
410
|
+
|
|
411
|
+
termStart = -1;
|
|
412
|
+
}
|
|
413
|
+
} else fb.push(c);
|
|
414
|
+
|
|
415
|
+
break;
|
|
416
|
+
|
|
417
|
+
case '"':
|
|
418
|
+
case "'":
|
|
419
|
+
if (curlyBrackets == 0) {
|
|
420
|
+
if (!quote) quote = c;
|
|
421
|
+
else if (str[i - 1] != "\\" && quote == c) quote = false;
|
|
422
|
+
fb.push(c);
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
break;
|
|
426
|
+
|
|
427
|
+
default:
|
|
428
|
+
if (termStart < 0) fb.push(c);
|
|
429
|
+
break;
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
fb.push(")");
|
|
434
|
+
var body = fb.join("");
|
|
435
|
+
if (expFatArrows) body = expFatArrows(body); //console.log(body);
|
|
436
|
+
|
|
437
|
+
var keys = Object.keys(args);
|
|
438
|
+
|
|
439
|
+
try {
|
|
440
|
+
var _Function;
|
|
441
|
+
|
|
442
|
+
var compute = (_Function = _construct(
|
|
443
|
+
Function,
|
|
444
|
+
formats
|
|
445
|
+
.map(function(f, i) {
|
|
446
|
+
return "fmt" + i;
|
|
447
|
+
})
|
|
448
|
+
.concat(keys, helperNames, [body])
|
|
449
|
+
)).bind.apply(_Function, [Format].concat(formats, helperValues));
|
|
450
|
+
|
|
451
|
+
var selector = computable.apply(
|
|
452
|
+
void 0,
|
|
453
|
+
keys
|
|
454
|
+
.map(function(k) {
|
|
455
|
+
return args[k];
|
|
456
|
+
})
|
|
457
|
+
.concat([compute])
|
|
458
|
+
);
|
|
459
|
+
expCache[str] = selector;
|
|
460
|
+
return selector;
|
|
461
|
+
} catch (err) {
|
|
462
|
+
throw new Error("Failed to parse expression: '" + str + "'. Error: " + err.message);
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
var Expression = {
|
|
466
|
+
get: function get(str) {
|
|
467
|
+
return expression(str);
|
|
468
|
+
},
|
|
469
|
+
compile: function compile(str) {
|
|
470
|
+
return this.get(str).memoize();
|
|
471
|
+
},
|
|
472
|
+
registerHelper: function registerHelper(name, helper) {
|
|
473
|
+
helpers[name] = helper;
|
|
474
|
+
helperNames = Object.keys(helpers);
|
|
475
|
+
helperValues = helperNames.map(function(n) {
|
|
476
|
+
return helpers[n];
|
|
477
|
+
});
|
|
478
|
+
}
|
|
479
|
+
};
|
|
480
|
+
function plugFatArrowExpansion(impl) {
|
|
481
|
+
expFatArrows = impl;
|
|
482
|
+
}
|
|
483
|
+
function invalidateExpressionCache() {
|
|
484
|
+
expCache = {};
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
function plus(str) {
|
|
488
|
+
return str.length ? str + " + " : str;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
var tplCache = {};
|
|
492
|
+
function stringTemplate(str) {
|
|
493
|
+
var expr = tplCache[str];
|
|
494
|
+
if (expr) return expr;
|
|
495
|
+
expr = "";
|
|
496
|
+
var termStart = -1,
|
|
497
|
+
quoteStart = 0,
|
|
498
|
+
term,
|
|
499
|
+
bracketsOpen = 0,
|
|
500
|
+
percentSign;
|
|
501
|
+
|
|
502
|
+
for (var i = 0; i < str.length; i++) {
|
|
503
|
+
var c = str[i];
|
|
504
|
+
|
|
505
|
+
switch (c) {
|
|
506
|
+
case "{":
|
|
507
|
+
if (termStart < 0) {
|
|
508
|
+
if (str[i + 1] == "{" && str[i - 1] != "%") {
|
|
509
|
+
expr = plus(expr) + quoteStr(str.substring(quoteStart, i) + "{");
|
|
510
|
+
i++;
|
|
511
|
+
quoteStart = i + 1;
|
|
512
|
+
} else {
|
|
513
|
+
termStart = i + 1;
|
|
514
|
+
percentSign = str[i - 1] == "%";
|
|
515
|
+
if (i > quoteStart) expr = plus(expr) + quoteStr(str.substring(quoteStart, percentSign ? i - 1 : i));
|
|
516
|
+
bracketsOpen = 1;
|
|
517
|
+
}
|
|
518
|
+
} else bracketsOpen++;
|
|
519
|
+
|
|
520
|
+
break;
|
|
521
|
+
|
|
522
|
+
case "}":
|
|
523
|
+
if (termStart >= 0) {
|
|
524
|
+
if (--bracketsOpen == 0) {
|
|
525
|
+
term = str.substring(termStart, i);
|
|
526
|
+
|
|
527
|
+
if (term.indexOf(":") == -1) {
|
|
528
|
+
var nullSepIndex = term.indexOf("|");
|
|
529
|
+
if (nullSepIndex == -1) term += ":s";
|
|
530
|
+
else term = term.substring(0, nullSepIndex) + ":s" + term.substring(nullSepIndex);
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
expr = plus(expr) + (percentSign ? "%{" : "{") + term + "}";
|
|
534
|
+
termStart = -1;
|
|
535
|
+
quoteStart = i + 1;
|
|
536
|
+
bracketsOpen = 0;
|
|
537
|
+
}
|
|
538
|
+
} else if (str[i + 1] == "}") {
|
|
539
|
+
expr = plus(expr) + quoteStr(str.substring(quoteStart, i) + "}");
|
|
540
|
+
i++;
|
|
541
|
+
quoteStart = i + 1;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
break;
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
if (quoteStart < str.length) expr = plus(expr) + quoteStr(str.substring(quoteStart)); //console.log(expr);
|
|
549
|
+
|
|
550
|
+
return (tplCache[str] = expression(expr));
|
|
551
|
+
}
|
|
552
|
+
var StringTemplate = {
|
|
553
|
+
get: function get(str) {
|
|
554
|
+
return stringTemplate(str);
|
|
555
|
+
},
|
|
556
|
+
compile: function compile(str) {
|
|
557
|
+
return stringTemplate(str).memoize();
|
|
558
|
+
},
|
|
559
|
+
format: function format(_format) {
|
|
560
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
561
|
+
args[_key - 1] = arguments[_key];
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
return stringTemplate(_format)(args);
|
|
565
|
+
}
|
|
566
|
+
};
|
|
567
|
+
function invalidateStringTemplateCache() {
|
|
568
|
+
tplCache = {};
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
var Ref = /*#__PURE__*/ (function(_Component) {
|
|
572
|
+
_inheritsLoose(Ref, _Component);
|
|
573
|
+
|
|
574
|
+
function Ref(config) {
|
|
575
|
+
var _this;
|
|
576
|
+
|
|
577
|
+
_this = _Component.call(this, config) || this;
|
|
578
|
+
_this.get = _this.get.bind(_assertThisInitialized(_this));
|
|
579
|
+
if (_this.set) _this.set = _this.set.bind(_assertThisInitialized(_this));
|
|
580
|
+
return _this;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
var _proto = Ref.prototype;
|
|
584
|
+
|
|
585
|
+
_proto.get = function get() {
|
|
586
|
+
throw new Error("Ref's get method is not implemented.");
|
|
587
|
+
};
|
|
588
|
+
|
|
589
|
+
_proto.init = function init(value) {
|
|
590
|
+
if (this.get() === undefined) this.set(value);
|
|
591
|
+
};
|
|
592
|
+
|
|
593
|
+
_proto.toggle = function toggle() {
|
|
594
|
+
this.set(!this.get());
|
|
595
|
+
};
|
|
596
|
+
|
|
597
|
+
_proto.update = function update(cb) {
|
|
598
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
599
|
+
args[_key - 1] = arguments[_key];
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
this.set(cb.apply(void 0, [this.get()].concat(args)));
|
|
603
|
+
};
|
|
604
|
+
|
|
605
|
+
_proto.as = function as(config) {
|
|
606
|
+
return Ref.create(config, {
|
|
607
|
+
get: this.get,
|
|
608
|
+
set: this.set
|
|
609
|
+
});
|
|
610
|
+
};
|
|
611
|
+
|
|
612
|
+
_proto.ref = function ref(path) {
|
|
613
|
+
var _this2 = this;
|
|
614
|
+
|
|
615
|
+
var binding = Binding.get(path);
|
|
616
|
+
return Ref.create({
|
|
617
|
+
get: function get() {
|
|
618
|
+
return binding.value(_this2.get());
|
|
619
|
+
},
|
|
620
|
+
set: function set(value) {
|
|
621
|
+
var data = _this2.get();
|
|
622
|
+
|
|
623
|
+
var newData = binding.set(data, value);
|
|
624
|
+
if (data === newData) return false;
|
|
625
|
+
return _this2.set(newData);
|
|
626
|
+
}
|
|
627
|
+
});
|
|
628
|
+
}; //allows the function to be passed as a selector, e.g. to computable or addTrigger
|
|
629
|
+
|
|
630
|
+
_proto.memoize = function memoize() {
|
|
631
|
+
return this.get;
|
|
632
|
+
};
|
|
633
|
+
|
|
634
|
+
return Ref;
|
|
635
|
+
})(Component);
|
|
636
|
+
Ref.prototype.isRef = true;
|
|
637
|
+
|
|
638
|
+
Ref.factory = function(alias, config, more) {
|
|
639
|
+
if (isFunction(alias)) {
|
|
640
|
+
var cfg = _objectSpread2(_objectSpread2({}, config), more);
|
|
641
|
+
|
|
642
|
+
if (cfg.store) Object.assign(cfg, cfg.store.getMethods());
|
|
643
|
+
var result = alias(cfg);
|
|
644
|
+
if (result instanceof Ref) return result;
|
|
645
|
+
return this.create(_objectSpread2(_objectSpread2(_objectSpread2({}, config), more), result));
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
return this.create(_objectSpread2(_objectSpread2({}, config), more));
|
|
649
|
+
};
|
|
650
|
+
|
|
651
|
+
var StoreRef = /*#__PURE__*/ (function(_Ref) {
|
|
652
|
+
_inheritsLoose(StoreRef, _Ref);
|
|
653
|
+
|
|
654
|
+
function StoreRef(config) {
|
|
655
|
+
return _Ref.call(this, config) || this;
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
var _proto = StoreRef.prototype;
|
|
659
|
+
|
|
660
|
+
_proto.get = function get() {
|
|
661
|
+
return this.store.get(this.path);
|
|
662
|
+
};
|
|
663
|
+
|
|
664
|
+
_proto.set = function set(value) {
|
|
665
|
+
return this.store.set(this.path, value);
|
|
666
|
+
};
|
|
667
|
+
|
|
668
|
+
_proto.init = function init(value) {
|
|
669
|
+
return this.store.init(this.path, value);
|
|
670
|
+
};
|
|
671
|
+
|
|
672
|
+
_proto.toggle = function toggle() {
|
|
673
|
+
return this.store.toggle(this.path);
|
|
674
|
+
};
|
|
675
|
+
|
|
676
|
+
_proto["delete"] = function _delete() {
|
|
677
|
+
return this.store["delete"](this.path);
|
|
678
|
+
};
|
|
679
|
+
|
|
680
|
+
_proto.update = function update() {
|
|
681
|
+
var _this$store;
|
|
682
|
+
|
|
683
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
684
|
+
args[_key] = arguments[_key];
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
return (_this$store = this.store).update.apply(_this$store, [this.path].concat(args));
|
|
688
|
+
}; //allows the function to be passed as a selector, e.g. to computable or addTrigger
|
|
689
|
+
|
|
690
|
+
_proto.memoize = function memoize() {
|
|
691
|
+
return this.get;
|
|
692
|
+
};
|
|
693
|
+
|
|
694
|
+
_proto.ref = function ref(path) {
|
|
695
|
+
return new StoreRef({
|
|
696
|
+
path: this.path + "." + path,
|
|
697
|
+
store: this.store
|
|
698
|
+
});
|
|
699
|
+
};
|
|
700
|
+
|
|
701
|
+
_proto.as = function as(config) {
|
|
702
|
+
return StoreRef.create(config, {
|
|
703
|
+
path: this.path,
|
|
704
|
+
store: this.store,
|
|
705
|
+
get: this.get,
|
|
706
|
+
set: this.set
|
|
707
|
+
});
|
|
708
|
+
};
|
|
709
|
+
|
|
710
|
+
return StoreRef;
|
|
711
|
+
})(Ref);
|
|
712
|
+
|
|
713
|
+
var View = /*#__PURE__*/ (function() {
|
|
714
|
+
function View(config) {
|
|
715
|
+
Object.assign(this, config);
|
|
716
|
+
this.cache = {
|
|
717
|
+
version: -1
|
|
718
|
+
};
|
|
719
|
+
if (this.store) this.setStore(this.store);
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
var _proto = View.prototype;
|
|
723
|
+
|
|
724
|
+
_proto.getData = function getData() {
|
|
725
|
+
throw new Error("abstract method");
|
|
726
|
+
};
|
|
727
|
+
|
|
728
|
+
_proto.init = function init(path, value) {
|
|
729
|
+
if (path instanceof Binding) path = path.path;
|
|
730
|
+
else if (typeof path == "object" && path != null) {
|
|
731
|
+
var changed = false;
|
|
732
|
+
|
|
733
|
+
for (var key in path) {
|
|
734
|
+
if (path.hasOwnProperty(key) && this.get(key) === undefined && this.setItem(key, path[key])) changed = true;
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
return changed;
|
|
738
|
+
}
|
|
739
|
+
if (this.get(path) === undefined) return this.setItem(path, value);
|
|
740
|
+
return false;
|
|
741
|
+
};
|
|
742
|
+
|
|
743
|
+
_proto.set = function set(path, value) {
|
|
744
|
+
if (path instanceof Binding) path = path.path;
|
|
745
|
+
else if (typeof path == "object" && path != null) {
|
|
746
|
+
var changed = false;
|
|
747
|
+
|
|
748
|
+
for (var key in path) {
|
|
749
|
+
if (path.hasOwnProperty(key) && this.setItem(key, path[key])) changed = true;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
return changed;
|
|
753
|
+
}
|
|
754
|
+
return this.setItem(path, value);
|
|
755
|
+
};
|
|
756
|
+
|
|
757
|
+
_proto.copy = function copy(from, to) {
|
|
758
|
+
var value = this.get(from);
|
|
759
|
+
this.set(to, value);
|
|
760
|
+
};
|
|
761
|
+
|
|
762
|
+
_proto.move = function move(from, to) {
|
|
763
|
+
var _this = this;
|
|
764
|
+
|
|
765
|
+
this.batch(function() {
|
|
766
|
+
_this.copy(from, to);
|
|
767
|
+
|
|
768
|
+
_this["delete"](from);
|
|
769
|
+
});
|
|
770
|
+
}; //protected
|
|
771
|
+
|
|
772
|
+
_proto.setItem = function setItem(path, value) {
|
|
773
|
+
if (this.store) return this.store.setItem(path, value);
|
|
774
|
+
throw new Error("abstract method");
|
|
775
|
+
};
|
|
776
|
+
|
|
777
|
+
_proto["delete"] = function _delete(path) {
|
|
778
|
+
var _this2 = this;
|
|
779
|
+
|
|
780
|
+
if (path instanceof Binding) path = path.path;
|
|
781
|
+
else if (arguments.length > 1) path = Array.from(arguments);
|
|
782
|
+
if (isArray(path))
|
|
783
|
+
return path
|
|
784
|
+
.map(function(arg) {
|
|
785
|
+
return _this2.deleteItem(arg);
|
|
786
|
+
})
|
|
787
|
+
.some(Boolean);
|
|
788
|
+
return this.deleteItem(path);
|
|
789
|
+
}; //protected
|
|
790
|
+
|
|
791
|
+
_proto.deleteItem = function deleteItem(path) {
|
|
792
|
+
if (this.store) return this.store.deleteItem(path);
|
|
793
|
+
throw new Error("abstract method");
|
|
794
|
+
};
|
|
795
|
+
|
|
796
|
+
_proto.clear = function clear() {
|
|
797
|
+
if (this.store) return this.store.clear();
|
|
798
|
+
throw new Error("abstract method");
|
|
799
|
+
};
|
|
800
|
+
|
|
801
|
+
_proto.get = function get(path) {
|
|
802
|
+
var storeData = this.getData();
|
|
803
|
+
if (arguments.length > 1) path = Array.from(arguments);
|
|
804
|
+
if (isArray(path))
|
|
805
|
+
return path.map(function(arg) {
|
|
806
|
+
return Binding.get(arg).value(storeData);
|
|
807
|
+
});
|
|
808
|
+
return Binding.get(path).value(storeData);
|
|
809
|
+
};
|
|
810
|
+
|
|
811
|
+
_proto.toggle = function toggle(path) {
|
|
812
|
+
return this.set(path, !this.get(path));
|
|
813
|
+
};
|
|
814
|
+
|
|
815
|
+
_proto.update = function update(path, updateFn) {
|
|
816
|
+
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
817
|
+
args[_key - 2] = arguments[_key];
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
return this.set(path, updateFn.apply(null, [this.get(path)].concat(args)));
|
|
821
|
+
};
|
|
822
|
+
|
|
823
|
+
_proto.batch = function batch(callback) {
|
|
824
|
+
var dirty = this.silently(callback);
|
|
825
|
+
if (dirty) this.notify();
|
|
826
|
+
return dirty;
|
|
827
|
+
};
|
|
828
|
+
|
|
829
|
+
_proto.silently = function silently(callback) {
|
|
830
|
+
if (this.store) return this.store.silently(callback);
|
|
831
|
+
throw new Error("abstract method");
|
|
832
|
+
};
|
|
833
|
+
|
|
834
|
+
_proto.notify = function notify(path) {
|
|
835
|
+
if (this.notificationsSuspended) this.dirty = true;
|
|
836
|
+
else this.doNotify(path);
|
|
837
|
+
};
|
|
838
|
+
|
|
839
|
+
_proto.doNotify = function doNotify(path) {
|
|
840
|
+
if (this.store) return this.store.notify(path);
|
|
841
|
+
throw new Error("abstract method");
|
|
842
|
+
};
|
|
843
|
+
|
|
844
|
+
_proto.subscribe = function subscribe(callback) {
|
|
845
|
+
if (this.store) return this.store.subscribe(callback);
|
|
846
|
+
throw new Error("abstract method");
|
|
847
|
+
};
|
|
848
|
+
|
|
849
|
+
_proto.load = function load(data) {
|
|
850
|
+
return this.batch(function(store) {
|
|
851
|
+
for (var key in data) {
|
|
852
|
+
store.set(key, data[key]);
|
|
853
|
+
}
|
|
854
|
+
});
|
|
855
|
+
};
|
|
856
|
+
|
|
857
|
+
_proto.dispatch = function dispatch(action) {
|
|
858
|
+
if (this.store) return this.store.dispatch(action);
|
|
859
|
+
throw new Error("The underlying store doesn't support dispatch.");
|
|
860
|
+
};
|
|
861
|
+
|
|
862
|
+
_proto.getMeta = function getMeta() {
|
|
863
|
+
return this.meta;
|
|
864
|
+
};
|
|
865
|
+
|
|
866
|
+
_proto.setStore = function setStore(store) {
|
|
867
|
+
this.store = store;
|
|
868
|
+
this.meta = store.getMeta();
|
|
869
|
+
};
|
|
870
|
+
|
|
871
|
+
_proto.ref = function ref(path, defaultValue) {
|
|
872
|
+
if (isDefined(defaultValue)) this.init(path, defaultValue);
|
|
873
|
+
return StoreRef.create({
|
|
874
|
+
store: this,
|
|
875
|
+
path: path
|
|
876
|
+
});
|
|
877
|
+
};
|
|
878
|
+
|
|
879
|
+
_proto.getMethods = function getMethods() {
|
|
880
|
+
return {
|
|
881
|
+
getData: this.getData.bind(this),
|
|
882
|
+
set: this.set.bind(this),
|
|
883
|
+
get: this.get.bind(this),
|
|
884
|
+
update: this.update.bind(this),
|
|
885
|
+
delete: this["delete"].bind(this),
|
|
886
|
+
toggle: this.toggle.bind(this),
|
|
887
|
+
init: this.init.bind(this),
|
|
888
|
+
ref: this.ref.bind(this)
|
|
889
|
+
};
|
|
890
|
+
};
|
|
891
|
+
|
|
892
|
+
return View;
|
|
893
|
+
})();
|
|
894
|
+
View.prototype.sealed = false; //indicate that data should be copied before virtual items are added
|
|
895
|
+
|
|
896
|
+
var SubscribableView = /*#__PURE__*/ (function(_View) {
|
|
897
|
+
_inheritsLoose(SubscribableView, _View);
|
|
898
|
+
|
|
899
|
+
function SubscribableView(config) {
|
|
900
|
+
var _this;
|
|
901
|
+
|
|
902
|
+
_this = _View.call(this, config) || this;
|
|
903
|
+
_this.subscribers = new SubscriberList();
|
|
904
|
+
_this.changes = [];
|
|
905
|
+
return _this;
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
var _proto = SubscribableView.prototype;
|
|
909
|
+
|
|
910
|
+
_proto.subscribe = function subscribe(callback) {
|
|
911
|
+
return this.subscribers.subscribe(callback);
|
|
912
|
+
};
|
|
913
|
+
|
|
914
|
+
_proto.unsubscribeAll = function unsubscribeAll() {
|
|
915
|
+
this.subscribers.clear();
|
|
916
|
+
};
|
|
917
|
+
|
|
918
|
+
_proto.doNotify = function doNotify(path) {
|
|
919
|
+
var _this2 = this;
|
|
920
|
+
|
|
921
|
+
if (this.notificationsSuspended) return;
|
|
922
|
+
|
|
923
|
+
if (!this.async) {
|
|
924
|
+
this.subscribers.notify([path]);
|
|
925
|
+
} else {
|
|
926
|
+
this.changes.push(path || "");
|
|
927
|
+
|
|
928
|
+
if (!this.scheduled) {
|
|
929
|
+
this.scheduled = true;
|
|
930
|
+
setTimeout(function() {
|
|
931
|
+
_this2.scheduled = false;
|
|
932
|
+
var changes = _this2.changes;
|
|
933
|
+
_this2.changes = [];
|
|
934
|
+
|
|
935
|
+
_this2.subscribers.notify(changes);
|
|
936
|
+
}, 0);
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
};
|
|
940
|
+
|
|
941
|
+
_proto.silently = function silently(callback) {
|
|
942
|
+
this.notificationsSuspended = (this.notificationsSuspended || 0) + 1;
|
|
943
|
+
var wasDirty = this.dirty,
|
|
944
|
+
dirty;
|
|
945
|
+
this.dirty = false;
|
|
946
|
+
|
|
947
|
+
try {
|
|
948
|
+
callback(this);
|
|
949
|
+
} finally {
|
|
950
|
+
this.notificationsSuspended--;
|
|
951
|
+
dirty = this.dirty;
|
|
952
|
+
this.dirty = wasDirty;
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
return dirty;
|
|
956
|
+
};
|
|
957
|
+
|
|
958
|
+
return SubscribableView;
|
|
959
|
+
})(View);
|
|
960
|
+
SubscribableView.prototype.async = false;
|
|
961
|
+
|
|
962
|
+
var Store = /*#__PURE__*/ (function(_SubscribableView) {
|
|
963
|
+
_inheritsLoose(Store, _SubscribableView);
|
|
964
|
+
|
|
965
|
+
function Store(config) {
|
|
966
|
+
var _this;
|
|
967
|
+
|
|
968
|
+
if (config === void 0) {
|
|
969
|
+
config = {};
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
_this = _SubscribableView.call(this, config) || this;
|
|
973
|
+
_this.data = config.data || {};
|
|
974
|
+
_this.meta = {
|
|
975
|
+
version: 0
|
|
976
|
+
};
|
|
977
|
+
return _this;
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
var _proto = Store.prototype;
|
|
981
|
+
|
|
982
|
+
_proto.getData = function getData() {
|
|
983
|
+
return this.data;
|
|
984
|
+
};
|
|
985
|
+
|
|
986
|
+
_proto.setItem = function setItem(path, value) {
|
|
987
|
+
var next = Binding.get(path).set(this.data, value);
|
|
988
|
+
|
|
989
|
+
if (next != this.data) {
|
|
990
|
+
this.data = next;
|
|
991
|
+
this.meta.version++;
|
|
992
|
+
this.notify(path);
|
|
993
|
+
return true;
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
return false;
|
|
997
|
+
};
|
|
998
|
+
|
|
999
|
+
_proto.deleteItem = function deleteItem(path) {
|
|
1000
|
+
var next = Binding.get(path)["delete"](this.data);
|
|
1001
|
+
|
|
1002
|
+
if (next != this.data) {
|
|
1003
|
+
this.data = next;
|
|
1004
|
+
this.meta.version++;
|
|
1005
|
+
this.notify(path);
|
|
1006
|
+
return true;
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
return false;
|
|
1010
|
+
};
|
|
1011
|
+
|
|
1012
|
+
_proto.clear = function clear() {
|
|
1013
|
+
this.data = {};
|
|
1014
|
+
this.meta.version++;
|
|
1015
|
+
this.notify();
|
|
1016
|
+
};
|
|
1017
|
+
|
|
1018
|
+
return Store;
|
|
1019
|
+
})(SubscribableView);
|
|
1020
|
+
Store.prototype.async = false;
|
|
1021
|
+
|
|
1022
|
+
var ExposedRecordView = /*#__PURE__*/ (function(_View) {
|
|
1023
|
+
_inheritsLoose(ExposedRecordView, _View);
|
|
1024
|
+
|
|
1025
|
+
function ExposedRecordView() {
|
|
1026
|
+
return _View.apply(this, arguments) || this;
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
var _proto = ExposedRecordView.prototype;
|
|
1030
|
+
|
|
1031
|
+
_proto.getData = function getData() {
|
|
1032
|
+
if (this.sealed && this.meta.version === this.cache.version && this.cache.itemIndex === this.itemIndex)
|
|
1033
|
+
return this.cache.result;
|
|
1034
|
+
this.cache.result = this.embed(this.store.getData());
|
|
1035
|
+
this.cache.version = this.meta.version;
|
|
1036
|
+
this.cache.itemIndex = this.itemIndex;
|
|
1037
|
+
return this.cache.result;
|
|
1038
|
+
};
|
|
1039
|
+
|
|
1040
|
+
_proto.embed = function embed(data) {
|
|
1041
|
+
var collection = this.collectionBinding.value(data);
|
|
1042
|
+
var record = collection[this.itemIndex];
|
|
1043
|
+
var copy = this.sealed || this.immutable || this.store.sealed ? _objectSpread2({}, data) : data;
|
|
1044
|
+
copy[this.recordName] = record;
|
|
1045
|
+
if (this.indexName) copy[this.indexName] = this.itemIndex;
|
|
1046
|
+
return copy;
|
|
1047
|
+
};
|
|
1048
|
+
|
|
1049
|
+
_proto.setIndex = function setIndex(index) {
|
|
1050
|
+
this.itemIndex = index;
|
|
1051
|
+
};
|
|
1052
|
+
|
|
1053
|
+
_proto.setItem = function setItem(path, value) {
|
|
1054
|
+
if (path == this.recordName || path.indexOf(this.recordName + ".") == 0) {
|
|
1055
|
+
var storeData = this.store.getData();
|
|
1056
|
+
var collection = this.collectionBinding.value(storeData);
|
|
1057
|
+
var data = this.embed(storeData);
|
|
1058
|
+
var d = Binding.get(path).set(data, value);
|
|
1059
|
+
if (d === data) return false;
|
|
1060
|
+
var record = d[this.recordName];
|
|
1061
|
+
var newCollection = [].concat(
|
|
1062
|
+
collection.slice(0, this.itemIndex),
|
|
1063
|
+
[record],
|
|
1064
|
+
collection.slice(this.itemIndex + 1)
|
|
1065
|
+
);
|
|
1066
|
+
return this.store.setItem(this.collectionBinding.path, newCollection);
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
return this.store.setItem(path, value);
|
|
1070
|
+
};
|
|
1071
|
+
|
|
1072
|
+
_proto.deleteItem = function deleteItem(path) {
|
|
1073
|
+
var storeData, collection, newCollection;
|
|
1074
|
+
|
|
1075
|
+
if (path == this.recordName) {
|
|
1076
|
+
storeData = this.store.getData();
|
|
1077
|
+
collection = this.collectionBinding.value(storeData);
|
|
1078
|
+
newCollection = [].concat(collection.slice(0, this.itemIndex), collection.slice(this.itemIndex + 1));
|
|
1079
|
+
return this.store.setItem(this.collectionBinding.path, newCollection);
|
|
1080
|
+
} else if (path.indexOf(this.recordName + ".") == 0) {
|
|
1081
|
+
storeData = this.store.getData();
|
|
1082
|
+
collection = this.collectionBinding.value(storeData);
|
|
1083
|
+
var data = this.embed(storeData);
|
|
1084
|
+
var d = Binding.get(path)["delete"](data);
|
|
1085
|
+
if (d === data) return false;
|
|
1086
|
+
var record = d[this.recordName];
|
|
1087
|
+
newCollection = [].concat(collection.slice(0, this.itemIndex), [record], collection.slice(this.itemIndex + 1));
|
|
1088
|
+
return this.store.setItem(this.collectionBinding.path, newCollection);
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
return this.store.deleteItem(path);
|
|
1092
|
+
};
|
|
1093
|
+
|
|
1094
|
+
return ExposedRecordView;
|
|
1095
|
+
})(View);
|
|
1096
|
+
ExposedRecordView.prototype.immutable = false;
|
|
1097
|
+
|
|
1098
|
+
var ExposedValueView = /*#__PURE__*/ (function(_View) {
|
|
1099
|
+
_inheritsLoose(ExposedValueView, _View);
|
|
1100
|
+
|
|
1101
|
+
function ExposedValueView() {
|
|
1102
|
+
return _View.apply(this, arguments) || this;
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
var _proto = ExposedValueView.prototype;
|
|
1106
|
+
|
|
1107
|
+
_proto.getData = function getData() {
|
|
1108
|
+
if (this.sealed && this.meta.version === this.cache.version && this.cache.key === this.key)
|
|
1109
|
+
return this.cache.result;
|
|
1110
|
+
var data = this.store.getData();
|
|
1111
|
+
var container = this.containerBinding.value(data) || {};
|
|
1112
|
+
var record = container[this.key];
|
|
1113
|
+
this.cache.version = this.meta.version;
|
|
1114
|
+
this.cache.key = this.key;
|
|
1115
|
+
this.cache.result = this.sealed || this.immutable || this.store.sealed ? _objectSpread2({}, data) : data;
|
|
1116
|
+
this.cache.result[this.recordName] = record;
|
|
1117
|
+
return this.cache.result;
|
|
1118
|
+
};
|
|
1119
|
+
|
|
1120
|
+
_proto.setKey = function setKey(key) {
|
|
1121
|
+
this.key = key;
|
|
1122
|
+
};
|
|
1123
|
+
|
|
1124
|
+
_proto.getKey = function getKey() {
|
|
1125
|
+
return this.key;
|
|
1126
|
+
};
|
|
1127
|
+
|
|
1128
|
+
_proto.setItem = function setItem(path, value) {
|
|
1129
|
+
if (path == this.recordName || path.indexOf(this.recordName + ".") == 0) {
|
|
1130
|
+
var data = this.getData();
|
|
1131
|
+
var d = Binding.get(path).set(data, value);
|
|
1132
|
+
if (d === data) return false;
|
|
1133
|
+
var container = this.containerBinding.value(d);
|
|
1134
|
+
var record = d[this.recordName];
|
|
1135
|
+
var newContainer = Object.assign({}, container);
|
|
1136
|
+
newContainer[this.key] = record;
|
|
1137
|
+
return this.store.setItem(this.containerBinding.path, newContainer);
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
return this.store.setItem(path, value);
|
|
1141
|
+
};
|
|
1142
|
+
|
|
1143
|
+
_proto.deleteItem = function deleteItem(path) {
|
|
1144
|
+
var data, container, newContainer;
|
|
1145
|
+
|
|
1146
|
+
if (path == this.recordName) {
|
|
1147
|
+
data = this.getData();
|
|
1148
|
+
container = this.containerBinding.value(data);
|
|
1149
|
+
if (!container || !container.hasOwnProperty(path)) return false;
|
|
1150
|
+
newContainer = Object.assign({}, container);
|
|
1151
|
+
delete newContainer[this.key];
|
|
1152
|
+
this.store.set(this.containerBinding.path, newContainer);
|
|
1153
|
+
} else if (path.indexOf(this.recordName + ".") == 0) {
|
|
1154
|
+
data = this.getData();
|
|
1155
|
+
var d = Binding.get(path)["delete"](data);
|
|
1156
|
+
if (d === data) return false;
|
|
1157
|
+
container = this.containerBinding.value(d);
|
|
1158
|
+
var record = d[this.recordName];
|
|
1159
|
+
newContainer = Object.assign({}, container);
|
|
1160
|
+
newContainer[this.key] = record;
|
|
1161
|
+
return this.store.setItem(this.containerBinding.path, newContainer);
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
return this.store.deleteItem(path);
|
|
1165
|
+
};
|
|
1166
|
+
|
|
1167
|
+
return ExposedValueView;
|
|
1168
|
+
})(View);
|
|
1169
|
+
ExposedValueView.prototype.immutable = false;
|
|
1170
|
+
|
|
1171
|
+
var ReadOnlyDataView = /*#__PURE__*/ (function(_View) {
|
|
1172
|
+
_inheritsLoose(ReadOnlyDataView, _View);
|
|
1173
|
+
|
|
1174
|
+
function ReadOnlyDataView() {
|
|
1175
|
+
return _View.apply(this, arguments) || this;
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
var _proto = ReadOnlyDataView.prototype;
|
|
1179
|
+
|
|
1180
|
+
_proto.getData = function getData() {
|
|
1181
|
+
if (this.sealed && this.meta.version === this.cache.version && this.cache.data === this.data)
|
|
1182
|
+
return this.cache.result;
|
|
1183
|
+
var data = this.store.getData();
|
|
1184
|
+
this.cache.result =
|
|
1185
|
+
this.sealed || this.immutable || this.store.sealed
|
|
1186
|
+
? Object.assign({}, data, this.getAdditionalData(data))
|
|
1187
|
+
: Object.assign(data, this.getAdditionalData(data));
|
|
1188
|
+
this.cache.version = this.meta.version;
|
|
1189
|
+
this.cache.data = this.data;
|
|
1190
|
+
return this.cache.result;
|
|
1191
|
+
};
|
|
1192
|
+
|
|
1193
|
+
_proto.getAdditionalData = function getAdditionalData() {
|
|
1194
|
+
return this.data;
|
|
1195
|
+
};
|
|
1196
|
+
|
|
1197
|
+
_proto.setData = function setData(data) {
|
|
1198
|
+
this.data = data;
|
|
1199
|
+
};
|
|
1200
|
+
|
|
1201
|
+
return ReadOnlyDataView;
|
|
1202
|
+
})(View);
|
|
1203
|
+
ReadOnlyDataView.prototype.immutable = false;
|
|
1204
|
+
|
|
1205
|
+
var AugmentedViewBase = /*#__PURE__*/ (function(_View) {
|
|
1206
|
+
_inheritsLoose(AugmentedViewBase, _View);
|
|
1207
|
+
|
|
1208
|
+
function AugmentedViewBase() {
|
|
1209
|
+
return _View.apply(this, arguments) || this;
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
var _proto = AugmentedViewBase.prototype;
|
|
1213
|
+
|
|
1214
|
+
_proto.getData = function getData() {
|
|
1215
|
+
if (this.meta.version === this.cache.version && this.sealed) return this.cache.result;
|
|
1216
|
+
var parentStoreData = this.store.getData();
|
|
1217
|
+
var result = this.getBaseData(parentStoreData);
|
|
1218
|
+
this.embedAugmentData(result, parentStoreData);
|
|
1219
|
+
this.cache.result = result;
|
|
1220
|
+
this.cache.parentStoreData = parentStoreData;
|
|
1221
|
+
this.cache.version = this.meta.version;
|
|
1222
|
+
return this.cache.result;
|
|
1223
|
+
};
|
|
1224
|
+
|
|
1225
|
+
_proto.getBaseData = function getBaseData(parentStoreData) {
|
|
1226
|
+
if (this.sealed || this.immutable || this.store.sealed) return _objectSpread2({}, parentStoreData);
|
|
1227
|
+
return parentStoreData;
|
|
1228
|
+
};
|
|
1229
|
+
|
|
1230
|
+
_proto.embedAugmentData = function embedAugmentData(result, parentStoreData) {
|
|
1231
|
+
throw new Error("abstract");
|
|
1232
|
+
};
|
|
1233
|
+
|
|
1234
|
+
_proto.isExtraKey = function isExtraKey(key) {
|
|
1235
|
+
throw new Error("abstract");
|
|
1236
|
+
};
|
|
1237
|
+
|
|
1238
|
+
_proto.setExtraKeyValue = function setExtraKeyValue(key, value) {
|
|
1239
|
+
throw new Error("abstract");
|
|
1240
|
+
};
|
|
1241
|
+
|
|
1242
|
+
_proto.deleteExtraKeyValue = function deleteExtraKeyValue(key) {
|
|
1243
|
+
throw new Error("abstract");
|
|
1244
|
+
};
|
|
1245
|
+
|
|
1246
|
+
_proto.setItem = function setItem(path, value) {
|
|
1247
|
+
var binding = Binding.get(path);
|
|
1248
|
+
|
|
1249
|
+
if (this.isExtraKey(binding.parts[0])) {
|
|
1250
|
+
var bindingRoot = binding.parts[0];
|
|
1251
|
+
var newValue = value;
|
|
1252
|
+
|
|
1253
|
+
if (binding.parts.length > 1) {
|
|
1254
|
+
var data = {};
|
|
1255
|
+
this.embedAugmentData(data, this.store.getData());
|
|
1256
|
+
newValue = binding.set(data, value)[bindingRoot];
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
return this.setExtraKeyValue(bindingRoot, newValue);
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1262
|
+
return _View.prototype.setItem.call(this, path, value);
|
|
1263
|
+
};
|
|
1264
|
+
|
|
1265
|
+
_proto.deleteItem = function deleteItem(path) {
|
|
1266
|
+
var binding = Binding.get(path);
|
|
1267
|
+
|
|
1268
|
+
if (this.isExtraKey(binding.parts[0])) {
|
|
1269
|
+
var bindingRoot = binding.parts[0];
|
|
1270
|
+
if (binding.parts.length == 1) return this.deleteExtraKeyValue(bindingRoot);
|
|
1271
|
+
var data = {};
|
|
1272
|
+
this.embedAugmentData(data, this.store.getData());
|
|
1273
|
+
var newValue = binding["delete"](data)[bindingRoot];
|
|
1274
|
+
return this.setExtraKeyValue(bindingRoot, newValue);
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
return _View.prototype.deleteItem.call(this, path);
|
|
1278
|
+
};
|
|
1279
|
+
|
|
1280
|
+
return AugmentedViewBase;
|
|
1281
|
+
})(View);
|
|
1282
|
+
AugmentedViewBase.prototype.immutable = false;
|
|
1283
|
+
|
|
1284
|
+
var NestedDataView = /*#__PURE__*/ (function(_AugmentedViewBase) {
|
|
1285
|
+
_inheritsLoose(NestedDataView, _AugmentedViewBase);
|
|
1286
|
+
|
|
1287
|
+
function NestedDataView() {
|
|
1288
|
+
return _AugmentedViewBase.apply(this, arguments) || this;
|
|
1289
|
+
}
|
|
1290
|
+
|
|
1291
|
+
var _proto = NestedDataView.prototype;
|
|
1292
|
+
|
|
1293
|
+
_proto.embedAugmentData = function embedAugmentData(result, parentStoreData) {
|
|
1294
|
+
if (this.nestedData) {
|
|
1295
|
+
var nested = this.nestedData.getSelector()(parentStoreData);
|
|
1296
|
+
|
|
1297
|
+
for (var key in nested) {
|
|
1298
|
+
result[key] = nested[key];
|
|
1299
|
+
}
|
|
1300
|
+
}
|
|
1301
|
+
};
|
|
1302
|
+
|
|
1303
|
+
_proto.isExtraKey = function isExtraKey(key) {
|
|
1304
|
+
return this.nestedData && this.nestedData.containsKey(key);
|
|
1305
|
+
};
|
|
1306
|
+
|
|
1307
|
+
_proto.setExtraKeyValue = function setExtraKeyValue(key, value) {
|
|
1308
|
+
this.nestedData.setItem(key, value);
|
|
1309
|
+
};
|
|
1310
|
+
|
|
1311
|
+
_proto.deleteExtraKeyValue = function deleteExtraKeyValue(key) {
|
|
1312
|
+
this.setExtraKeyValue(key, undefined);
|
|
1313
|
+
};
|
|
1314
|
+
|
|
1315
|
+
return NestedDataView;
|
|
1316
|
+
})(AugmentedViewBase);
|
|
1317
|
+
|
|
1318
|
+
var ZoomIntoPropertyView = /*#__PURE__*/ (function(_NestedDataView) {
|
|
1319
|
+
_inheritsLoose(ZoomIntoPropertyView, _NestedDataView);
|
|
1320
|
+
|
|
1321
|
+
function ZoomIntoPropertyView() {
|
|
1322
|
+
return _NestedDataView.apply(this, arguments) || this;
|
|
1323
|
+
}
|
|
1324
|
+
|
|
1325
|
+
var _proto = ZoomIntoPropertyView.prototype;
|
|
1326
|
+
|
|
1327
|
+
_proto.getBaseData = function getBaseData(parentStoreData) {
|
|
1328
|
+
var x = this.binding.value(parentStoreData);
|
|
1329
|
+
if (x != null && typeof x != "object") throw new Error("Zoomed value must be an object.");
|
|
1330
|
+
return _objectSpread2({}, x);
|
|
1331
|
+
};
|
|
1332
|
+
|
|
1333
|
+
_proto.embedAugmentData = function embedAugmentData(result, parentStoreData) {
|
|
1334
|
+
result[this.rootName] = parentStoreData;
|
|
1335
|
+
|
|
1336
|
+
_NestedDataView.prototype.embedAugmentData.call(this, result, parentStoreData);
|
|
1337
|
+
};
|
|
1338
|
+
|
|
1339
|
+
_proto.setItem = function setItem(path, value) {
|
|
1340
|
+
if (path.indexOf(this.rootName + ".") == 0) this.store.setItem(path.substring(this.rootName.length + 1), value);
|
|
1341
|
+
else if (this.isExtraKey(Binding.get(path).parts[0])) _NestedDataView.prototype.setItem.call(this, path, value);
|
|
1342
|
+
else _NestedDataView.prototype.setItem.call(this, this.binding.path + "." + path, value);
|
|
1343
|
+
};
|
|
1344
|
+
|
|
1345
|
+
_proto.deleteItem = function deleteItem(path) {
|
|
1346
|
+
if (path.indexOf(this.rootName + ".") == 0) this.store.deleteItem(path.substring(this.rootName.length + 1));
|
|
1347
|
+
else if (this.isExtraKey(Binding.get(path).parts[0])) _NestedDataView.prototype.deleteItem.call(this, path);
|
|
1348
|
+
else _NestedDataView.prototype.deleteItem.call(this, this.binding.path + "." + path);
|
|
1349
|
+
};
|
|
1350
|
+
|
|
1351
|
+
return ZoomIntoPropertyView;
|
|
1352
|
+
})(NestedDataView);
|
|
1353
|
+
ZoomIntoPropertyView.prototype.rootName = "$root";
|
|
1354
|
+
|
|
1355
|
+
function createStructuredSelector(selector, constants) {
|
|
1356
|
+
var keys = Object.keys(selector);
|
|
1357
|
+
if (keys.length == 0)
|
|
1358
|
+
return function() {
|
|
1359
|
+
return constants;
|
|
1360
|
+
};
|
|
1361
|
+
|
|
1362
|
+
function memoize() {
|
|
1363
|
+
var lastResult = Object.assign({}, constants);
|
|
1364
|
+
var memoizedSelectors = {};
|
|
1365
|
+
keys.forEach(function(key) {
|
|
1366
|
+
memoizedSelectors[key] = selector[key].memoize ? selector[key].memoize() : selector[key];
|
|
1367
|
+
lastResult[key] = undefined;
|
|
1368
|
+
});
|
|
1369
|
+
return function(data) {
|
|
1370
|
+
var result = lastResult,
|
|
1371
|
+
k,
|
|
1372
|
+
v,
|
|
1373
|
+
i;
|
|
1374
|
+
|
|
1375
|
+
for (i = 0; i < keys.length; i++) {
|
|
1376
|
+
k = keys[i];
|
|
1377
|
+
v = memoizedSelectors[k](data);
|
|
1378
|
+
|
|
1379
|
+
if (result === lastResult) {
|
|
1380
|
+
if (v === lastResult[k]) continue;
|
|
1381
|
+
result = Object.assign({}, lastResult);
|
|
1382
|
+
}
|
|
1383
|
+
|
|
1384
|
+
result[k] = v;
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1387
|
+
return (lastResult = result);
|
|
1388
|
+
};
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
function evaluate(data) {
|
|
1392
|
+
var result = Object.assign({}, constants);
|
|
1393
|
+
|
|
1394
|
+
for (var i = 0; i < keys.length; i++) {
|
|
1395
|
+
result[keys[i]] = selector[keys[i]](data);
|
|
1396
|
+
}
|
|
1397
|
+
|
|
1398
|
+
return result;
|
|
1399
|
+
}
|
|
1400
|
+
|
|
1401
|
+
evaluate.memoize = memoize;
|
|
1402
|
+
return evaluate;
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1405
|
+
function isSelector(config) {
|
|
1406
|
+
if (config == null) return true;
|
|
1407
|
+
|
|
1408
|
+
switch (typeof config) {
|
|
1409
|
+
case "object":
|
|
1410
|
+
if (config.type || config.$type) return false;
|
|
1411
|
+
return !!(config.bind || config.tpl || config.expr || config.get);
|
|
1412
|
+
|
|
1413
|
+
case "function":
|
|
1414
|
+
return true;
|
|
1415
|
+
|
|
1416
|
+
case "string":
|
|
1417
|
+
return true;
|
|
1418
|
+
|
|
1419
|
+
case "number":
|
|
1420
|
+
return true;
|
|
1421
|
+
|
|
1422
|
+
case "boolean":
|
|
1423
|
+
return true;
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1426
|
+
return false;
|
|
1427
|
+
}
|
|
1428
|
+
|
|
1429
|
+
var undefinedF = function undefinedF() {
|
|
1430
|
+
return undefined;
|
|
1431
|
+
};
|
|
1432
|
+
|
|
1433
|
+
var nullF = function nullF() {
|
|
1434
|
+
return null;
|
|
1435
|
+
};
|
|
1436
|
+
|
|
1437
|
+
function getSelector(config) {
|
|
1438
|
+
if (config === undefined) return undefinedF;
|
|
1439
|
+
if (config === null) return nullF;
|
|
1440
|
+
|
|
1441
|
+
switch (typeof config) {
|
|
1442
|
+
case "object":
|
|
1443
|
+
if (isArray(config)) {
|
|
1444
|
+
var _selectors = config.map(function(x) {
|
|
1445
|
+
return getSelector(x);
|
|
1446
|
+
});
|
|
1447
|
+
|
|
1448
|
+
return function(data) {
|
|
1449
|
+
return _selectors.map(function(elementSelector) {
|
|
1450
|
+
return elementSelector(data);
|
|
1451
|
+
});
|
|
1452
|
+
};
|
|
1453
|
+
}
|
|
1454
|
+
|
|
1455
|
+
if (config.bind) return Binding.get(config.bind).value;
|
|
1456
|
+
if (config.tpl) return StringTemplate.get(config.tpl);
|
|
1457
|
+
if (config.expr) return Expression.get(config.expr);
|
|
1458
|
+
if (config.get) return config.get;
|
|
1459
|
+
var selectors = {};
|
|
1460
|
+
var constants = {};
|
|
1461
|
+
|
|
1462
|
+
for (var key in config) {
|
|
1463
|
+
if (isSelector(config[key])) selectors[key] = getSelector(config[key]);
|
|
1464
|
+
else constants[key] = config[key];
|
|
1465
|
+
}
|
|
1466
|
+
|
|
1467
|
+
return createStructuredSelector(selectors, constants);
|
|
1468
|
+
|
|
1469
|
+
case "function":
|
|
1470
|
+
return config;
|
|
1471
|
+
|
|
1472
|
+
default:
|
|
1473
|
+
return function() {
|
|
1474
|
+
return config;
|
|
1475
|
+
};
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
function defaultValue(pv) {
|
|
1480
|
+
if (typeof pv == "object" && pv && pv.structured) return pv.defaultValue;
|
|
1481
|
+
return pv;
|
|
1482
|
+
}
|
|
1483
|
+
|
|
1484
|
+
function getSelectorConfig(props, values, nameMap) {
|
|
1485
|
+
var functions = {},
|
|
1486
|
+
structures = {},
|
|
1487
|
+
defaultValues = {},
|
|
1488
|
+
constants,
|
|
1489
|
+
p,
|
|
1490
|
+
v,
|
|
1491
|
+
pv,
|
|
1492
|
+
constant = true;
|
|
1493
|
+
|
|
1494
|
+
for (p in props) {
|
|
1495
|
+
v = values[p];
|
|
1496
|
+
pv = props[p];
|
|
1497
|
+
if (isUndefined(v) && pv && (pv.bind || pv.tpl || pv.expr)) v = pv;
|
|
1498
|
+
|
|
1499
|
+
if (v === null) {
|
|
1500
|
+
if (!constants) constants = {};
|
|
1501
|
+
constants[p] = null;
|
|
1502
|
+
} else if (typeof v == "object") {
|
|
1503
|
+
if (v.bind) {
|
|
1504
|
+
if (isUndefined(v.defaultValue) && v != pv) v.defaultValue = defaultValue(pv);
|
|
1505
|
+
if (isDefined(v.defaultValue)) defaultValues[v.bind] = v.defaultValue;
|
|
1506
|
+
nameMap[p] = v.bind;
|
|
1507
|
+
functions[p] = Binding.get(v.bind).value;
|
|
1508
|
+
constant = false;
|
|
1509
|
+
} else if (v.expr) {
|
|
1510
|
+
functions[p] = Expression.get(v.expr);
|
|
1511
|
+
constant = false;
|
|
1512
|
+
} else if (v.get) {
|
|
1513
|
+
functions[p] = v.get;
|
|
1514
|
+
constant = false;
|
|
1515
|
+
} else if (v.tpl) {
|
|
1516
|
+
functions[p] = StringTemplate.get(v.tpl);
|
|
1517
|
+
constant = false;
|
|
1518
|
+
} else if (pv && typeof pv == "object" && pv.structured) {
|
|
1519
|
+
if (isArray(v)) functions[p] = getSelector(v);
|
|
1520
|
+
else {
|
|
1521
|
+
var s = getSelectorConfig(v, v, {});
|
|
1522
|
+
structures[p] = s;
|
|
1523
|
+
Object.assign(defaultValues, s.defaultValues);
|
|
1524
|
+
}
|
|
1525
|
+
constant = false;
|
|
1526
|
+
} else {
|
|
1527
|
+
if (!constants) constants = {};
|
|
1528
|
+
constants[p] = v;
|
|
1529
|
+
}
|
|
1530
|
+
} else if (isFunction(v)) {
|
|
1531
|
+
functions[p] = v;
|
|
1532
|
+
constant = false;
|
|
1533
|
+
} else {
|
|
1534
|
+
if (isUndefined(v)) {
|
|
1535
|
+
if (isUndefined(pv)) continue;
|
|
1536
|
+
v = defaultValue(pv);
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1539
|
+
if (isUndefined(v)) continue;
|
|
1540
|
+
if (!constants) constants = {};
|
|
1541
|
+
constants[p] = v;
|
|
1542
|
+
}
|
|
1543
|
+
}
|
|
1544
|
+
|
|
1545
|
+
return {
|
|
1546
|
+
functions: functions,
|
|
1547
|
+
structures: structures,
|
|
1548
|
+
defaultValues: defaultValues,
|
|
1549
|
+
constants: constants,
|
|
1550
|
+
constant: constant
|
|
1551
|
+
};
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1554
|
+
function createSelector(_ref) {
|
|
1555
|
+
var functions = _ref.functions,
|
|
1556
|
+
structures = _ref.structures,
|
|
1557
|
+
constants = _ref.constants,
|
|
1558
|
+
defaultValues = _ref.defaultValues;
|
|
1559
|
+
var selector = {};
|
|
1560
|
+
|
|
1561
|
+
for (var n in functions) {
|
|
1562
|
+
selector[n] = functions[n];
|
|
1563
|
+
}
|
|
1564
|
+
|
|
1565
|
+
for (var _n in structures) {
|
|
1566
|
+
selector[_n] = createSelector(structures[_n]);
|
|
1567
|
+
}
|
|
1568
|
+
|
|
1569
|
+
return createStructuredSelector(selector, constants);
|
|
1570
|
+
}
|
|
1571
|
+
|
|
1572
|
+
var StructuredSelector = /*#__PURE__*/ (function() {
|
|
1573
|
+
function StructuredSelector(_ref2) {
|
|
1574
|
+
var props = _ref2.props,
|
|
1575
|
+
values = _ref2.values;
|
|
1576
|
+
this.nameMap = {};
|
|
1577
|
+
this.config = getSelectorConfig(props, values, this.nameMap);
|
|
1578
|
+
}
|
|
1579
|
+
|
|
1580
|
+
var _proto = StructuredSelector.prototype;
|
|
1581
|
+
|
|
1582
|
+
_proto.init = function init(store) {
|
|
1583
|
+
store.init(this.config.defaultValues);
|
|
1584
|
+
};
|
|
1585
|
+
|
|
1586
|
+
_proto.create = function create() {
|
|
1587
|
+
var selector = createSelector(this.config);
|
|
1588
|
+
if (selector.memoize) return selector.memoize();
|
|
1589
|
+
return selector;
|
|
1590
|
+
};
|
|
1591
|
+
|
|
1592
|
+
_proto.createStoreSelector = function createStoreSelector() {
|
|
1593
|
+
if (this.config.constant) {
|
|
1594
|
+
var result = _objectSpread2({}, this.config.constants);
|
|
1595
|
+
|
|
1596
|
+
return function() {
|
|
1597
|
+
return result;
|
|
1598
|
+
};
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1601
|
+
var selector = this.create();
|
|
1602
|
+
return function(store) {
|
|
1603
|
+
return selector(store.getData());
|
|
1604
|
+
};
|
|
1605
|
+
};
|
|
1606
|
+
|
|
1607
|
+
return StructuredSelector;
|
|
1608
|
+
})();
|
|
1609
|
+
|
|
1610
|
+
var AggregateFunction = /*#__PURE__*/ (function() {
|
|
1611
|
+
function AggregateFunction() {}
|
|
1612
|
+
|
|
1613
|
+
AggregateFunction.sum = function sum() {
|
|
1614
|
+
return new Sum();
|
|
1615
|
+
};
|
|
1616
|
+
|
|
1617
|
+
AggregateFunction.avg = function avg() {
|
|
1618
|
+
return new Avg();
|
|
1619
|
+
};
|
|
1620
|
+
|
|
1621
|
+
AggregateFunction.count = function count() {
|
|
1622
|
+
return new Count();
|
|
1623
|
+
};
|
|
1624
|
+
|
|
1625
|
+
AggregateFunction.distinct = function distinct() {
|
|
1626
|
+
return new Distinct();
|
|
1627
|
+
};
|
|
1628
|
+
|
|
1629
|
+
AggregateFunction.min = function min() {
|
|
1630
|
+
return new Min();
|
|
1631
|
+
};
|
|
1632
|
+
|
|
1633
|
+
AggregateFunction.max = function max() {
|
|
1634
|
+
return new Max();
|
|
1635
|
+
};
|
|
1636
|
+
|
|
1637
|
+
return AggregateFunction;
|
|
1638
|
+
})();
|
|
1639
|
+
|
|
1640
|
+
var Sum = /*#__PURE__*/ (function() {
|
|
1641
|
+
function Sum() {}
|
|
1642
|
+
|
|
1643
|
+
var _proto = Sum.prototype;
|
|
1644
|
+
|
|
1645
|
+
_proto.process = function process(value) {
|
|
1646
|
+
this.empty = false;
|
|
1647
|
+
if (!isNaN(value)) this.result += value;
|
|
1648
|
+
else this.invalid = true;
|
|
1649
|
+
};
|
|
1650
|
+
|
|
1651
|
+
_proto.getResult = function getResult() {
|
|
1652
|
+
if (this.invalid) return null;
|
|
1653
|
+
return this.result;
|
|
1654
|
+
};
|
|
1655
|
+
|
|
1656
|
+
return Sum;
|
|
1657
|
+
})();
|
|
1658
|
+
|
|
1659
|
+
Sum.prototype.result = 0;
|
|
1660
|
+
Sum.prototype.empty = true;
|
|
1661
|
+
|
|
1662
|
+
var Avg = /*#__PURE__*/ (function() {
|
|
1663
|
+
function Avg() {}
|
|
1664
|
+
|
|
1665
|
+
var _proto2 = Avg.prototype;
|
|
1666
|
+
|
|
1667
|
+
_proto2.process = function process(value, count) {
|
|
1668
|
+
if (count === void 0) {
|
|
1669
|
+
count = 1;
|
|
1670
|
+
}
|
|
1671
|
+
|
|
1672
|
+
this.empty = false;
|
|
1673
|
+
|
|
1674
|
+
if (!isNaN(value) && !isNaN(count)) {
|
|
1675
|
+
this.result += value * count;
|
|
1676
|
+
this.count += count;
|
|
1677
|
+
} else this.invalid = true;
|
|
1678
|
+
};
|
|
1679
|
+
|
|
1680
|
+
_proto2.getResult = function getResult() {
|
|
1681
|
+
if (this.empty || this.invalid || this.count == 0) return null;
|
|
1682
|
+
return this.result / this.count;
|
|
1683
|
+
};
|
|
1684
|
+
|
|
1685
|
+
return Avg;
|
|
1686
|
+
})();
|
|
1687
|
+
|
|
1688
|
+
Avg.prototype.result = 0;
|
|
1689
|
+
Avg.prototype.count = 0;
|
|
1690
|
+
Avg.prototype.empty = true;
|
|
1691
|
+
|
|
1692
|
+
var Count = /*#__PURE__*/ (function() {
|
|
1693
|
+
function Count() {}
|
|
1694
|
+
|
|
1695
|
+
var _proto3 = Count.prototype;
|
|
1696
|
+
|
|
1697
|
+
_proto3.process = function process(value) {
|
|
1698
|
+
if (value != null) this.result++;
|
|
1699
|
+
};
|
|
1700
|
+
|
|
1701
|
+
_proto3.getResult = function getResult() {
|
|
1702
|
+
return this.result;
|
|
1703
|
+
};
|
|
1704
|
+
|
|
1705
|
+
return Count;
|
|
1706
|
+
})();
|
|
1707
|
+
|
|
1708
|
+
Count.prototype.result = 0;
|
|
1709
|
+
|
|
1710
|
+
var Distinct = /*#__PURE__*/ (function() {
|
|
1711
|
+
function Distinct() {
|
|
1712
|
+
this.values = {};
|
|
1713
|
+
}
|
|
1714
|
+
|
|
1715
|
+
var _proto4 = Distinct.prototype;
|
|
1716
|
+
|
|
1717
|
+
_proto4.process = function process(value) {
|
|
1718
|
+
if (value == null || this.values[value]) return;
|
|
1719
|
+
this.values[value] = true;
|
|
1720
|
+
this.empty = false;
|
|
1721
|
+
this.result++;
|
|
1722
|
+
};
|
|
1723
|
+
|
|
1724
|
+
_proto4.getResult = function getResult() {
|
|
1725
|
+
if (this.empty || this.invalid) return null;
|
|
1726
|
+
return this.result;
|
|
1727
|
+
};
|
|
1728
|
+
|
|
1729
|
+
return Distinct;
|
|
1730
|
+
})();
|
|
1731
|
+
|
|
1732
|
+
Distinct.prototype.result = 0;
|
|
1733
|
+
Distinct.prototype.empty = true;
|
|
1734
|
+
|
|
1735
|
+
var Max = /*#__PURE__*/ (function() {
|
|
1736
|
+
function Max() {}
|
|
1737
|
+
|
|
1738
|
+
var _proto5 = Max.prototype;
|
|
1739
|
+
|
|
1740
|
+
_proto5.process = function process(value) {
|
|
1741
|
+
if (!isNaN(value)) {
|
|
1742
|
+
if (this.empty) this.result = value;
|
|
1743
|
+
else if (value > this.result) this.result = value;
|
|
1744
|
+
this.empty = false;
|
|
1745
|
+
} else if (value != null) this.invalid = true;
|
|
1746
|
+
};
|
|
1747
|
+
|
|
1748
|
+
_proto5.getResult = function getResult() {
|
|
1749
|
+
if (this.empty || this.invalid) return null;
|
|
1750
|
+
return this.result;
|
|
1751
|
+
};
|
|
1752
|
+
|
|
1753
|
+
return Max;
|
|
1754
|
+
})();
|
|
1755
|
+
|
|
1756
|
+
Max.prototype.result = 0;
|
|
1757
|
+
Max.prototype.empty = true;
|
|
1758
|
+
|
|
1759
|
+
var Min = /*#__PURE__*/ (function() {
|
|
1760
|
+
function Min() {}
|
|
1761
|
+
|
|
1762
|
+
var _proto6 = Min.prototype;
|
|
1763
|
+
|
|
1764
|
+
_proto6.process = function process(value) {
|
|
1765
|
+
if (!isNaN(value)) {
|
|
1766
|
+
if (this.empty) this.result = value;
|
|
1767
|
+
else if (value < this.result) this.result = value;
|
|
1768
|
+
this.empty = false;
|
|
1769
|
+
} else if (value != null) this.invalid = true;
|
|
1770
|
+
};
|
|
1771
|
+
|
|
1772
|
+
_proto6.getResult = function getResult() {
|
|
1773
|
+
if (this.empty || this.invalid) return null;
|
|
1774
|
+
return this.result;
|
|
1775
|
+
};
|
|
1776
|
+
|
|
1777
|
+
return Min;
|
|
1778
|
+
})();
|
|
1779
|
+
|
|
1780
|
+
Min.prototype.result = 0;
|
|
1781
|
+
Min.prototype.empty = true;
|
|
1782
|
+
|
|
1783
|
+
/*
|
|
1784
|
+
'column': {
|
|
1785
|
+
index: 0,
|
|
1786
|
+
sort: 'asc',
|
|
1787
|
+
group: true
|
|
1788
|
+
aggregate: 'count'
|
|
1789
|
+
}
|
|
1790
|
+
*/
|
|
1791
|
+
|
|
1792
|
+
function transform(o, f) {
|
|
1793
|
+
var res = {};
|
|
1794
|
+
|
|
1795
|
+
for (var k in o) {
|
|
1796
|
+
res[k] = f(o[k], k);
|
|
1797
|
+
}
|
|
1798
|
+
|
|
1799
|
+
return res;
|
|
1800
|
+
}
|
|
1801
|
+
|
|
1802
|
+
var Grouper = /*#__PURE__*/ (function() {
|
|
1803
|
+
function Grouper(key, aggregates, dataGetter, nameGetter) {
|
|
1804
|
+
this.keys = Object.keys(key).map(function(k) {
|
|
1805
|
+
return {
|
|
1806
|
+
name: k,
|
|
1807
|
+
value: getSelector(key[k])
|
|
1808
|
+
};
|
|
1809
|
+
});
|
|
1810
|
+
if (nameGetter) this.nameGetter = getSelector(nameGetter);
|
|
1811
|
+
|
|
1812
|
+
this.dataGetter =
|
|
1813
|
+
dataGetter ||
|
|
1814
|
+
function(x) {
|
|
1815
|
+
return x;
|
|
1816
|
+
};
|
|
1817
|
+
|
|
1818
|
+
this.aggregates =
|
|
1819
|
+
aggregates &&
|
|
1820
|
+
transform(aggregates, function(prop) {
|
|
1821
|
+
if (!AggregateFunction[prop.type]) throw new Error("Unknown aggregate function '" + prop.type + "'.");
|
|
1822
|
+
return {
|
|
1823
|
+
value: getSelector(prop.value),
|
|
1824
|
+
weight: getSelector(prop.weight || 1),
|
|
1825
|
+
type: prop.type
|
|
1826
|
+
};
|
|
1827
|
+
});
|
|
1828
|
+
this.reset();
|
|
1829
|
+
}
|
|
1830
|
+
|
|
1831
|
+
var _proto = Grouper.prototype;
|
|
1832
|
+
|
|
1833
|
+
_proto.reset = function reset() {
|
|
1834
|
+
this.groups = this.initGroup(this.keys.length == 0);
|
|
1835
|
+
};
|
|
1836
|
+
|
|
1837
|
+
_proto.initGroup = function initGroup(leaf) {
|
|
1838
|
+
if (!leaf) return {};
|
|
1839
|
+
return {
|
|
1840
|
+
records: [],
|
|
1841
|
+
indexes: [],
|
|
1842
|
+
aggregates:
|
|
1843
|
+
this.aggregates &&
|
|
1844
|
+
transform(this.aggregates, function(prop) {
|
|
1845
|
+
var f = AggregateFunction[prop.type];
|
|
1846
|
+
return {
|
|
1847
|
+
processor: f(),
|
|
1848
|
+
value: prop.value,
|
|
1849
|
+
weight: prop.weight
|
|
1850
|
+
};
|
|
1851
|
+
})
|
|
1852
|
+
};
|
|
1853
|
+
};
|
|
1854
|
+
|
|
1855
|
+
_proto.process = function process(record, index) {
|
|
1856
|
+
var data = this.dataGetter(record);
|
|
1857
|
+
var key = this.keys.map(function(k) {
|
|
1858
|
+
return k.value(data);
|
|
1859
|
+
});
|
|
1860
|
+
var g = this.groups;
|
|
1861
|
+
|
|
1862
|
+
for (var i = 0; i < key.length; i++) {
|
|
1863
|
+
var sg = g[key[i]];
|
|
1864
|
+
|
|
1865
|
+
if (!sg) {
|
|
1866
|
+
sg = g[key[i]] = this.initGroup(i + 1 == key.length);
|
|
1867
|
+
if (this.nameGetter) sg.name = this.nameGetter(data);
|
|
1868
|
+
}
|
|
1869
|
+
|
|
1870
|
+
g = sg;
|
|
1871
|
+
}
|
|
1872
|
+
|
|
1873
|
+
g.records.push(record);
|
|
1874
|
+
g.indexes.push(index);
|
|
1875
|
+
|
|
1876
|
+
if (g.aggregates) {
|
|
1877
|
+
for (var k in g.aggregates) {
|
|
1878
|
+
g.aggregates[k].processor.process(g.aggregates[k].value(data), g.aggregates[k].weight(data));
|
|
1879
|
+
}
|
|
1880
|
+
}
|
|
1881
|
+
};
|
|
1882
|
+
|
|
1883
|
+
_proto.processAll = function processAll(records, indexes) {
|
|
1884
|
+
var _this = this;
|
|
1885
|
+
|
|
1886
|
+
if (indexes) {
|
|
1887
|
+
for (var i = 0; i < records.length; i++) {
|
|
1888
|
+
this.process(records[i], indexes[i]);
|
|
1889
|
+
}
|
|
1890
|
+
} else
|
|
1891
|
+
records.forEach(function(r, i) {
|
|
1892
|
+
return _this.process(r, i);
|
|
1893
|
+
});
|
|
1894
|
+
};
|
|
1895
|
+
|
|
1896
|
+
_proto.report = function report(g, path, level, results) {
|
|
1897
|
+
var _this2 = this;
|
|
1898
|
+
|
|
1899
|
+
if (level == this.keys.length) {
|
|
1900
|
+
var key = {};
|
|
1901
|
+
this.keys.forEach(function(k, i) {
|
|
1902
|
+
return (key[k.name] = path[i]);
|
|
1903
|
+
});
|
|
1904
|
+
results.push({
|
|
1905
|
+
key: key,
|
|
1906
|
+
name: g.name,
|
|
1907
|
+
records: g.records,
|
|
1908
|
+
indexes: g.indexes,
|
|
1909
|
+
aggregates: transform(g.aggregates, function(p) {
|
|
1910
|
+
return p.processor.getResult();
|
|
1911
|
+
})
|
|
1912
|
+
});
|
|
1913
|
+
} else {
|
|
1914
|
+
Object.keys(g).forEach(function(k) {
|
|
1915
|
+
return _this2.report(g[k], [].concat(path, [k]), level + 1, results);
|
|
1916
|
+
});
|
|
1917
|
+
}
|
|
1918
|
+
};
|
|
1919
|
+
|
|
1920
|
+
_proto.getResults = function getResults() {
|
|
1921
|
+
var g = this.groups;
|
|
1922
|
+
var results = [];
|
|
1923
|
+
this.report(g, [], 0, results);
|
|
1924
|
+
return results;
|
|
1925
|
+
};
|
|
1926
|
+
|
|
1927
|
+
return Grouper;
|
|
1928
|
+
})();
|
|
1929
|
+
|
|
1930
|
+
function defaultCompare(av, bv) {
|
|
1931
|
+
if (av == null) {
|
|
1932
|
+
if (bv == null) return 0;
|
|
1933
|
+
return -1;
|
|
1934
|
+
}
|
|
1935
|
+
|
|
1936
|
+
if (bv == null || av > bv) return 1;
|
|
1937
|
+
if (av < bv) return -1;
|
|
1938
|
+
return 0;
|
|
1939
|
+
}
|
|
1940
|
+
|
|
1941
|
+
function getComparer(sorters, dataAccessor, comparer) {
|
|
1942
|
+
var data = (sorters || []).map(function(s) {
|
|
1943
|
+
var selector = isDefined(s.value)
|
|
1944
|
+
? getSelector(s.value)
|
|
1945
|
+
: s.field
|
|
1946
|
+
? function(x) {
|
|
1947
|
+
return x[s.field];
|
|
1948
|
+
}
|
|
1949
|
+
: function() {
|
|
1950
|
+
return null;
|
|
1951
|
+
};
|
|
1952
|
+
return {
|
|
1953
|
+
getter: dataAccessor
|
|
1954
|
+
? function(x) {
|
|
1955
|
+
return selector(dataAccessor(x));
|
|
1956
|
+
}
|
|
1957
|
+
: selector,
|
|
1958
|
+
factor: s.direction && s.direction[0].toLowerCase() == "d" ? -1 : 1,
|
|
1959
|
+
compare: s.comparer || s.compare || comparer || defaultCompare
|
|
1960
|
+
};
|
|
1961
|
+
});
|
|
1962
|
+
return function(a, b) {
|
|
1963
|
+
var d, av, bv;
|
|
1964
|
+
|
|
1965
|
+
for (var i = 0; i < data.length; i++) {
|
|
1966
|
+
d = data[i];
|
|
1967
|
+
av = d.getter(a);
|
|
1968
|
+
bv = d.getter(b);
|
|
1969
|
+
var r = d.compare(av, bv);
|
|
1970
|
+
if (r == 0) continue;
|
|
1971
|
+
return d.factor * r;
|
|
1972
|
+
}
|
|
1973
|
+
|
|
1974
|
+
return 0;
|
|
1975
|
+
};
|
|
1976
|
+
}
|
|
1977
|
+
function indexSorter(sorters, dataAccessor, compare) {
|
|
1978
|
+
var cmp = getComparer(sorters, dataAccessor, compare);
|
|
1979
|
+
return function(data) {
|
|
1980
|
+
var result = Array.from(
|
|
1981
|
+
{
|
|
1982
|
+
length: data.length
|
|
1983
|
+
},
|
|
1984
|
+
function(v, k) {
|
|
1985
|
+
return k;
|
|
1986
|
+
}
|
|
1987
|
+
);
|
|
1988
|
+
result.sort(function(ia, ib) {
|
|
1989
|
+
return cmp(data[ia], data[ib]);
|
|
1990
|
+
});
|
|
1991
|
+
return result;
|
|
1992
|
+
};
|
|
1993
|
+
}
|
|
1994
|
+
function sorter(sorters, dataAccessor, compare) {
|
|
1995
|
+
var cmp = getComparer(sorters, dataAccessor, compare);
|
|
1996
|
+
return function(data) {
|
|
1997
|
+
var result = [].concat(data);
|
|
1998
|
+
result.sort(cmp);
|
|
1999
|
+
return result;
|
|
2000
|
+
};
|
|
2001
|
+
}
|
|
2002
|
+
|
|
2003
|
+
function enableFatArrowExpansion() {
|
|
2004
|
+
plugFatArrowExpansion(expandFatArrows);
|
|
2005
|
+
}
|
|
2006
|
+
|
|
2007
|
+
function append(array) {
|
|
2008
|
+
for (var _len = arguments.length, items = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
2009
|
+
items[_key - 1] = arguments[_key];
|
|
2010
|
+
}
|
|
2011
|
+
|
|
2012
|
+
if (items.length == 0) return array;
|
|
2013
|
+
if (!array) return items;
|
|
2014
|
+
return [].concat(array, items);
|
|
2015
|
+
}
|
|
2016
|
+
|
|
2017
|
+
function merge(item, data) {
|
|
2018
|
+
var result = item;
|
|
2019
|
+
if (data)
|
|
2020
|
+
for (var key in data) {
|
|
2021
|
+
result = Binding.get(key).set(result, data[key]);
|
|
2022
|
+
}
|
|
2023
|
+
return result;
|
|
2024
|
+
}
|
|
2025
|
+
|
|
2026
|
+
function filter(array, callback) {
|
|
2027
|
+
if (array == null) return array;
|
|
2028
|
+
var result = array.filter(callback);
|
|
2029
|
+
if (result.length == array.length) return array;
|
|
2030
|
+
return result;
|
|
2031
|
+
}
|
|
2032
|
+
|
|
2033
|
+
function updateArray(array, updateCallback, itemFilter, removeFilter) {
|
|
2034
|
+
if (!array) return array;
|
|
2035
|
+
var newArray = [];
|
|
2036
|
+
var dirty = false;
|
|
2037
|
+
|
|
2038
|
+
for (var index = 0; index < array.length; index++) {
|
|
2039
|
+
var item = array[index];
|
|
2040
|
+
|
|
2041
|
+
if (removeFilter && removeFilter(item, index)) {
|
|
2042
|
+
dirty = true;
|
|
2043
|
+
continue;
|
|
2044
|
+
}
|
|
2045
|
+
|
|
2046
|
+
if (!itemFilter || itemFilter(item, index)) {
|
|
2047
|
+
var newItem = updateCallback(item, index);
|
|
2048
|
+
newArray.push(newItem);
|
|
2049
|
+
if (newItem !== item) dirty = true;
|
|
2050
|
+
} else newArray.push(item);
|
|
2051
|
+
}
|
|
2052
|
+
|
|
2053
|
+
return dirty ? newArray : array;
|
|
2054
|
+
}
|
|
2055
|
+
|
|
2056
|
+
function updateTree(array, updateCallback, itemFilter, childrenField, removeFilter) {
|
|
2057
|
+
return updateArray(
|
|
2058
|
+
array,
|
|
2059
|
+
function(item) {
|
|
2060
|
+
var _objectSpread2$1;
|
|
2061
|
+
|
|
2062
|
+
if (!itemFilter || itemFilter(item)) item = updateCallback(item);
|
|
2063
|
+
var children = item[childrenField];
|
|
2064
|
+
if (!Array.isArray(children)) return item;
|
|
2065
|
+
var updatedChildren = updateTree(children, updateCallback, itemFilter, childrenField, removeFilter);
|
|
2066
|
+
if (updatedChildren != children)
|
|
2067
|
+
return _objectSpread2(
|
|
2068
|
+
_objectSpread2({}, item),
|
|
2069
|
+
{},
|
|
2070
|
+
((_objectSpread2$1 = {}), (_objectSpread2$1[childrenField] = updatedChildren), _objectSpread2$1)
|
|
2071
|
+
);
|
|
2072
|
+
return item;
|
|
2073
|
+
},
|
|
2074
|
+
null,
|
|
2075
|
+
removeFilter
|
|
2076
|
+
);
|
|
2077
|
+
}
|
|
2078
|
+
|
|
2079
|
+
function removeTreeNodes(array, criteria, childrenField) {
|
|
2080
|
+
if (childrenField === void 0) {
|
|
2081
|
+
childrenField = "$children";
|
|
2082
|
+
}
|
|
2083
|
+
|
|
2084
|
+
return updateTree(
|
|
2085
|
+
array,
|
|
2086
|
+
null,
|
|
2087
|
+
function() {
|
|
2088
|
+
return false;
|
|
2089
|
+
},
|
|
2090
|
+
childrenField,
|
|
2091
|
+
criteria
|
|
2092
|
+
);
|
|
2093
|
+
}
|
|
2094
|
+
|
|
2095
|
+
function findTreeNode(array, criteria, childrenField) {
|
|
2096
|
+
if (childrenField === void 0) {
|
|
2097
|
+
childrenField = "$children";
|
|
2098
|
+
}
|
|
2099
|
+
|
|
2100
|
+
if (!Array.isArray(array)) return false;
|
|
2101
|
+
|
|
2102
|
+
for (var i = 0; i < array.length; i++) {
|
|
2103
|
+
if (criteria(array[i])) return array[i];
|
|
2104
|
+
var child = findTreeNode(array[i][childrenField], criteria, childrenField);
|
|
2105
|
+
if (child) return child;
|
|
2106
|
+
}
|
|
2107
|
+
|
|
2108
|
+
return false;
|
|
2109
|
+
}
|
|
2110
|
+
|
|
2111
|
+
function moveElement(array, sourceIndex, targetIndex) {
|
|
2112
|
+
if (targetIndex == sourceIndex) return array;
|
|
2113
|
+
var el = array[sourceIndex];
|
|
2114
|
+
var res = [].concat(array);
|
|
2115
|
+
|
|
2116
|
+
if (sourceIndex < targetIndex) {
|
|
2117
|
+
for (var i = sourceIndex; i + 1 < targetIndex; i++) {
|
|
2118
|
+
res[i] = res[i + 1];
|
|
2119
|
+
}
|
|
2120
|
+
|
|
2121
|
+
targetIndex--;
|
|
2122
|
+
} else {
|
|
2123
|
+
for (var _i = sourceIndex; _i > targetIndex; _i--) {
|
|
2124
|
+
res[_i] = res[_i - 1];
|
|
2125
|
+
}
|
|
2126
|
+
}
|
|
2127
|
+
|
|
2128
|
+
res[targetIndex] = el;
|
|
2129
|
+
return res;
|
|
2130
|
+
}
|
|
2131
|
+
|
|
2132
|
+
function insertElement(array, index) {
|
|
2133
|
+
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
2134
|
+
args[_key - 2] = arguments[_key];
|
|
2135
|
+
}
|
|
2136
|
+
|
|
2137
|
+
return [].concat(array.slice(0, index), args, array.slice(index));
|
|
2138
|
+
}
|
|
2139
|
+
|
|
2140
|
+
function diffArrays(oldArray, newArray, keyFn) {
|
|
2141
|
+
if (!keyFn)
|
|
2142
|
+
keyFn = function keyFn(e) {
|
|
2143
|
+
return e;
|
|
2144
|
+
};
|
|
2145
|
+
var map = new Map();
|
|
2146
|
+
|
|
2147
|
+
for (var i = 0; i < oldArray.length; i++) {
|
|
2148
|
+
map.set(keyFn(oldArray[i]), oldArray[i]);
|
|
2149
|
+
}
|
|
2150
|
+
|
|
2151
|
+
var added = [],
|
|
2152
|
+
changed = [],
|
|
2153
|
+
unchanged = [];
|
|
2154
|
+
|
|
2155
|
+
for (var _i = 0; _i < newArray.length; _i++) {
|
|
2156
|
+
var el = newArray[_i];
|
|
2157
|
+
var k = keyFn(el);
|
|
2158
|
+
var old = map.get(k);
|
|
2159
|
+
if (isUndefined(old)) added.push(el);
|
|
2160
|
+
else {
|
|
2161
|
+
map["delete"](k);
|
|
2162
|
+
if (el == old) unchanged.push(el);
|
|
2163
|
+
else
|
|
2164
|
+
changed.push({
|
|
2165
|
+
before: old,
|
|
2166
|
+
after: el
|
|
2167
|
+
});
|
|
2168
|
+
}
|
|
2169
|
+
}
|
|
2170
|
+
|
|
2171
|
+
var removed = Array.from(map.values());
|
|
2172
|
+
return {
|
|
2173
|
+
added: added,
|
|
2174
|
+
changed: changed,
|
|
2175
|
+
unchanged: unchanged,
|
|
2176
|
+
removed: removed
|
|
2177
|
+
};
|
|
2178
|
+
}
|
|
2179
|
+
|
|
2180
|
+
var ArrayRef = /*#__PURE__*/ (function(_Ref) {
|
|
2181
|
+
_inheritsLoose(ArrayRef, _Ref);
|
|
2182
|
+
|
|
2183
|
+
function ArrayRef() {
|
|
2184
|
+
return _Ref.apply(this, arguments) || this;
|
|
2185
|
+
}
|
|
2186
|
+
|
|
2187
|
+
var _proto = ArrayRef.prototype;
|
|
2188
|
+
|
|
2189
|
+
_proto.append = function append$1() {
|
|
2190
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
2191
|
+
args[_key] = arguments[_key];
|
|
2192
|
+
}
|
|
2193
|
+
|
|
2194
|
+
this.update.apply(this, [append].concat(args));
|
|
2195
|
+
};
|
|
2196
|
+
|
|
2197
|
+
_proto.insert = function insert(index) {
|
|
2198
|
+
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
2199
|
+
args[_key2 - 1] = arguments[_key2];
|
|
2200
|
+
}
|
|
2201
|
+
|
|
2202
|
+
this.update.apply(this, [insertElement].concat(args));
|
|
2203
|
+
};
|
|
2204
|
+
|
|
2205
|
+
_proto.filter = function filter(predicate) {
|
|
2206
|
+
this.update(function(array) {
|
|
2207
|
+
return array.filter(function(a) {
|
|
2208
|
+
return predicate(a);
|
|
2209
|
+
});
|
|
2210
|
+
});
|
|
2211
|
+
};
|
|
2212
|
+
|
|
2213
|
+
_proto.move = function move(fromIndex, toIndex) {
|
|
2214
|
+
this.update(moveElement, fromIndex, toIndex);
|
|
2215
|
+
};
|
|
2216
|
+
|
|
2217
|
+
_proto.clear = function clear() {
|
|
2218
|
+
this.set([]);
|
|
2219
|
+
};
|
|
2220
|
+
|
|
2221
|
+
_proto.sort = function sort(compare) {
|
|
2222
|
+
var data = this.get();
|
|
2223
|
+
if (!data) return;
|
|
2224
|
+
var x = [].concat(data);
|
|
2225
|
+
x.sort(compare);
|
|
2226
|
+
this.set(x);
|
|
2227
|
+
};
|
|
2228
|
+
|
|
2229
|
+
return ArrayRef;
|
|
2230
|
+
})(Ref);
|
|
2231
|
+
|
|
2232
|
+
var StoreProxy = /*#__PURE__*/ (function(_View) {
|
|
2233
|
+
_inheritsLoose(StoreProxy, _View);
|
|
2234
|
+
|
|
2235
|
+
function StoreProxy(getStore) {
|
|
2236
|
+
var _this;
|
|
2237
|
+
|
|
2238
|
+
_this =
|
|
2239
|
+
_View.call(this, {
|
|
2240
|
+
store: getStore()
|
|
2241
|
+
}) || this;
|
|
2242
|
+
Object.defineProperty(_assertThisInitialized(_this), "store", {
|
|
2243
|
+
get: getStore
|
|
2244
|
+
});
|
|
2245
|
+
return _this;
|
|
2246
|
+
}
|
|
2247
|
+
|
|
2248
|
+
var _proto = StoreProxy.prototype;
|
|
2249
|
+
|
|
2250
|
+
_proto.getData = function getData() {
|
|
2251
|
+
return this.store.getData();
|
|
2252
|
+
};
|
|
2253
|
+
|
|
2254
|
+
return StoreProxy;
|
|
2255
|
+
})(View);
|
|
2256
|
+
|
|
2257
|
+
var ArrayElementView = /*#__PURE__*/ (function(_AugmentedViewBase) {
|
|
2258
|
+
_inheritsLoose(ArrayElementView, _AugmentedViewBase);
|
|
2259
|
+
|
|
2260
|
+
function ArrayElementView() {
|
|
2261
|
+
return _AugmentedViewBase.apply(this, arguments) || this;
|
|
2262
|
+
}
|
|
2263
|
+
|
|
2264
|
+
var _proto = ArrayElementView.prototype;
|
|
2265
|
+
|
|
2266
|
+
_proto.isExtraKey = function isExtraKey(key) {
|
|
2267
|
+
return key == this.recordAlias || key == this.indexAlias || key == this.lengthAlias;
|
|
2268
|
+
};
|
|
2269
|
+
|
|
2270
|
+
_proto.deleteExtraKeyValue = function deleteExtraKeyValue(key) {
|
|
2271
|
+
if (key != this.recordAlias) throw new Error("Field " + key + " cannot be deleted.");
|
|
2272
|
+
var array = this.arrayAccessor.get(this.store.getData());
|
|
2273
|
+
if (!array) return false;
|
|
2274
|
+
var newArray = [].concat(array.slice(0, this.itemIndex), array.slice(this.itemIndex + 1));
|
|
2275
|
+
return this.arrayAccessor.set(newArray, this.store);
|
|
2276
|
+
};
|
|
2277
|
+
|
|
2278
|
+
_proto.setExtraKeyValue = function setExtraKeyValue(key, value) {
|
|
2279
|
+
if (key != this.recordAlias) throw new Error("Field " + key + " is read-only.");
|
|
2280
|
+
var array = this.arrayAccessor.get(this.store.getData());
|
|
2281
|
+
if (!array || value === array[this.itemIndex]) return false;
|
|
2282
|
+
var newArray = [].concat(array.slice(0, this.itemIndex), [value], array.slice(this.itemIndex + 1));
|
|
2283
|
+
return this.arrayAccessor.set(newArray, this.store);
|
|
2284
|
+
};
|
|
2285
|
+
|
|
2286
|
+
_proto.embedAugmentData = function embedAugmentData(result, parentStoreData) {
|
|
2287
|
+
var array = this.arrayAccessor.get(parentStoreData);
|
|
2288
|
+
if (!isArray(array)) return;
|
|
2289
|
+
result[this.recordAlias] = array[this.itemIndex];
|
|
2290
|
+
result[this.indexAlias] = this.itemIndex;
|
|
2291
|
+
result[this.lengthAlias] = array.length;
|
|
2292
|
+
};
|
|
2293
|
+
|
|
2294
|
+
_proto.setIndex = function setIndex(itemIndex) {
|
|
2295
|
+
this.itemIndex = itemIndex;
|
|
2296
|
+
};
|
|
2297
|
+
|
|
2298
|
+
return ArrayElementView;
|
|
2299
|
+
})(AugmentedViewBase);
|
|
2300
|
+
ArrayElementView.prototype.recordAlias = "$record";
|
|
2301
|
+
ArrayElementView.prototype.indexAlias = "$index";
|
|
2302
|
+
ArrayElementView.prototype.lengthAlias = "$length";
|
|
2303
|
+
|
|
2304
|
+
/*
|
|
2305
|
+
Accessor provides a common ground between refs and bindings.
|
|
2306
|
+
Refs offer simplicity, bindings have better performance with more arguments.
|
|
2307
|
+
Accessor works as a common interface which works with both patterns.
|
|
2308
|
+
*/
|
|
2309
|
+
|
|
2310
|
+
function getAccessor(accessor, options) {
|
|
2311
|
+
if (accessor == null) return null;
|
|
2312
|
+
|
|
2313
|
+
if (isObject(accessor)) {
|
|
2314
|
+
if (accessor.isAccessor || accessor.isRef) return accessor;
|
|
2315
|
+
|
|
2316
|
+
if (isBinding(accessor)) {
|
|
2317
|
+
var binding = Binding.get(accessor);
|
|
2318
|
+
return {
|
|
2319
|
+
get: binding.value,
|
|
2320
|
+
set: function set(v, store) {
|
|
2321
|
+
return store.set(binding.path, v);
|
|
2322
|
+
},
|
|
2323
|
+
isAccessor: true
|
|
2324
|
+
};
|
|
2325
|
+
}
|
|
2326
|
+
}
|
|
2327
|
+
|
|
2328
|
+
if (isSelector(accessor)) {
|
|
2329
|
+
var selector = getSelector(accessor);
|
|
2330
|
+
if (accessor && accessor.set)
|
|
2331
|
+
return {
|
|
2332
|
+
get: selector,
|
|
2333
|
+
isAccessor: true,
|
|
2334
|
+
bindInstance: function bindInstance(instance) {
|
|
2335
|
+
return {
|
|
2336
|
+
get: selector,
|
|
2337
|
+
set: function set(value) {
|
|
2338
|
+
return accessor.set(value, instance);
|
|
2339
|
+
},
|
|
2340
|
+
isAccessor: true
|
|
2341
|
+
};
|
|
2342
|
+
}
|
|
2343
|
+
};
|
|
2344
|
+
return {
|
|
2345
|
+
get: selector,
|
|
2346
|
+
isAccessor: true
|
|
2347
|
+
};
|
|
2348
|
+
}
|
|
2349
|
+
|
|
2350
|
+
return {
|
|
2351
|
+
get: function get() {
|
|
2352
|
+
return accessor;
|
|
2353
|
+
}
|
|
2354
|
+
};
|
|
2355
|
+
}
|
|
2356
|
+
|
|
2357
|
+
export {
|
|
2358
|
+
ArrayElementView,
|
|
2359
|
+
ArrayRef,
|
|
2360
|
+
AugmentedViewBase,
|
|
2361
|
+
Binding,
|
|
2362
|
+
ExposedRecordView,
|
|
2363
|
+
ExposedValueView,
|
|
2364
|
+
Expression,
|
|
2365
|
+
Grouper,
|
|
2366
|
+
NestedDataView,
|
|
2367
|
+
ReadOnlyDataView,
|
|
2368
|
+
Ref,
|
|
2369
|
+
Store,
|
|
2370
|
+
StoreProxy,
|
|
2371
|
+
StringTemplate,
|
|
2372
|
+
StructuredSelector,
|
|
2373
|
+
SubscribableView,
|
|
2374
|
+
View,
|
|
2375
|
+
ZoomIntoPropertyView,
|
|
2376
|
+
append,
|
|
2377
|
+
computable,
|
|
2378
|
+
defaultCompare,
|
|
2379
|
+
diffArrays,
|
|
2380
|
+
enableFatArrowExpansion,
|
|
2381
|
+
expression,
|
|
2382
|
+
filter,
|
|
2383
|
+
findTreeNode,
|
|
2384
|
+
getAccessor,
|
|
2385
|
+
getComparer,
|
|
2386
|
+
getSelector,
|
|
2387
|
+
indexSorter,
|
|
2388
|
+
insertElement,
|
|
2389
|
+
invalidateExpressionCache,
|
|
2390
|
+
invalidateStringTemplateCache,
|
|
2391
|
+
isBinding,
|
|
2392
|
+
isSelector,
|
|
2393
|
+
merge,
|
|
2394
|
+
moveElement,
|
|
2395
|
+
plugFatArrowExpansion,
|
|
2396
|
+
removeTreeNodes,
|
|
2397
|
+
sorter,
|
|
2398
|
+
stringTemplate,
|
|
2399
|
+
updateArray,
|
|
2400
|
+
updateTree
|
|
2401
|
+
};
|