@startinblox/core 0.17.30 → 0.18.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_snowpack/pkg/autolinker.js +3515 -3367
- package/dist/_snowpack/pkg/autolinker.js.map +1 -1
- package/dist/_snowpack/pkg/common/{_baseUnary-217dffb2.js → _baseUnary-c1edb653.js} +16 -40
- package/dist/_snowpack/pkg/common/{_baseUnary-217dffb2.js.map → _baseUnary-c1edb653.js.map} +1 -1
- package/dist/_snowpack/pkg/common/{_commonjsHelpers-8c19dec8.js → _commonjsHelpers-37fa8da4.js} +6 -2
- package/dist/_snowpack/pkg/common/_commonjsHelpers-37fa8da4.js.map +1 -0
- package/dist/_snowpack/pkg/common/{decode-a4c334cf.js → decode-26fbf385.js} +38 -69
- package/dist/_snowpack/pkg/common/decode-26fbf385.js.map +1 -0
- package/dist/_snowpack/pkg/common/lit-html-3647afce.js +1104 -0
- package/dist/_snowpack/pkg/common/lit-html-3647afce.js.map +1 -0
- package/dist/_snowpack/pkg/delta-markdown-for-quill.js +4767 -4246
- package/dist/_snowpack/pkg/delta-markdown-for-quill.js.map +1 -1
- package/dist/_snowpack/pkg/dialog-polyfill.js +107 -139
- package/dist/_snowpack/pkg/dialog-polyfill.js.map +1 -1
- package/dist/_snowpack/pkg/fusejs.js +411 -601
- package/dist/_snowpack/pkg/fusejs.js.map +1 -1
- package/dist/_snowpack/pkg/import-map.json +1 -0
- package/dist/_snowpack/pkg/jsonld-context-parser.js +718 -686
- package/dist/_snowpack/pkg/jsonld-context-parser.js.map +1 -1
- package/dist/_snowpack/pkg/leaflet.markercluster/dist/MarkerCluster.Default.css +59 -59
- package/dist/_snowpack/pkg/leaflet.markercluster/dist/MarkerCluster.Default.css.proxy.js +1 -1
- package/dist/_snowpack/pkg/leaflet.markercluster/dist/MarkerCluster.css +14 -14
- package/dist/_snowpack/pkg/leaflet.markercluster/dist/MarkerCluster.css.proxy.js +1 -1
- package/dist/_snowpack/pkg/lit-html/directives/if-defined.js +13 -14
- package/dist/_snowpack/pkg/lit-html/directives/if-defined.js.map +1 -1
- package/dist/_snowpack/pkg/lit-html/directives/unsafe-html.js +17 -15
- package/dist/_snowpack/pkg/lit-html/directives/unsafe-html.js.map +1 -1
- package/dist/_snowpack/pkg/lit-html/directives/until.js +45 -46
- package/dist/_snowpack/pkg/lit-html/directives/until.js.map +1 -1
- package/dist/_snowpack/pkg/lit-html.js +37 -35
- package/dist/_snowpack/pkg/lit-html.js.map +1 -1
- package/dist/_snowpack/pkg/markdown-it-link-attributes.js +68 -0
- package/dist/_snowpack/pkg/markdown-it-link-attributes.js.map +1 -0
- package/dist/_snowpack/pkg/markdown-it.js +1731 -2284
- package/dist/_snowpack/pkg/markdown-it.js.map +1 -1
- package/dist/_snowpack/pkg/quill-delta-to-markdown.js +236 -294
- package/dist/_snowpack/pkg/quill-delta-to-markdown.js.map +1 -1
- package/dist/_snowpack/pkg/quill.js +12077 -11017
- package/dist/_snowpack/pkg/quill.js.map +1 -1
- package/dist/_snowpack/pkg/slim-select.js +711 -1
- package/dist/_snowpack/pkg/slim-select.js.map +1 -1
- package/dist/_snowpack/pkg/tui-calendar/dist/tui-calendar.css +1 -16
- package/dist/_snowpack/pkg/tui-calendar/dist/tui-calendar.css.proxy.js +1 -1
- package/dist/_snowpack/pkg/tui-calendar.js +44297 -40075
- package/dist/_snowpack/pkg/tui-calendar.js.map +1 -1
- package/dist/components/solid-ac-checker.js +4 -17
- package/dist/components/solid-calendar.js +5 -26
- package/dist/components/solid-delete.js +9 -24
- package/dist/components/solid-display.js +15 -59
- package/dist/components/solid-form-search.js +27 -79
- package/dist/components/solid-form.js +48 -143
- package/dist/components/solid-lang.js +8 -19
- package/dist/components/solid-map.js +26 -64
- package/dist/components/solid-table.js +51 -133
- package/dist/components/solid-widget.js +2 -24
- package/dist/index.js +17 -11
- package/dist/libs/Component.js +4 -10
- package/dist/libs/ComponentFactory.js +6 -34
- package/dist/libs/Compositor.js +8 -15
- package/dist/libs/Sib.js +7 -21
- package/dist/libs/filter.js +184 -0
- package/dist/libs/helpers.js +19 -47
- package/dist/libs/interfaces.js +1 -1
- package/dist/libs/lit-helpers.js +7 -34
- package/dist/libs/polyfills.js +7 -10
- package/dist/libs/store/server-pagination.js +22 -0
- package/dist/libs/store/server-search.js +35 -0
- package/dist/libs/store/store.js +212 -227
- package/dist/mixins/attributeBinderMixin.js +17 -25
- package/dist/mixins/contextMixin.js +5 -7
- package/dist/mixins/counterMixin.js +2 -23
- package/dist/mixins/federationMixin.js +2 -14
- package/dist/mixins/filterMixin.js +60 -100
- package/dist/mixins/grouperMixin.js +11 -18
- package/dist/mixins/highlighterMixin.js +2 -8
- package/dist/mixins/interfaces.js +3 -5
- package/dist/mixins/listMixin.js +12 -43
- package/dist/mixins/nextMixin.js +1 -4
- package/dist/mixins/paginateMixin.js +17 -30
- package/dist/mixins/requiredMixin.js +1 -9
- package/dist/mixins/serverPaginationMixin.js +122 -0
- package/dist/mixins/sorterMixin.js +26 -44
- package/dist/mixins/storeMixin.js +28 -21
- package/dist/mixins/translationMixin.js +2 -12
- package/dist/mixins/validationMixin.js +28 -46
- package/dist/mixins/widgetMixin.js +58 -154
- package/dist/new-widgets/attributeMixins/actionMixin.js +1 -2
- package/dist/new-widgets/attributeMixins/blankMixin.js +1 -4
- package/dist/new-widgets/attributeMixins/booleanMixin.js +1 -4
- package/dist/new-widgets/attributeMixins/index.js +1 -2
- package/dist/new-widgets/attributeMixins/mailtoMixin.js +1 -4
- package/dist/new-widgets/attributeMixins/multipleMixin.js +1 -2
- package/dist/new-widgets/attributeMixins/numberMixin.js +1 -4
- package/dist/new-widgets/attributeMixins/placeholderMixin.js +1 -4
- package/dist/new-widgets/attributeMixins/telMixin.js +1 -4
- package/dist/new-widgets/baseWidgetMixin.js +5 -18
- package/dist/new-widgets/callbackMixins/autocompletionMixin.js +3 -11
- package/dist/new-widgets/callbackMixins/index.js +1 -2
- package/dist/new-widgets/callbackMixins/richtextMixin.js +1 -6
- package/dist/new-widgets/interfaces.js +1 -0
- package/dist/new-widgets/new-widget-factory.js +14 -19
- package/dist/new-widgets/templateAdditionMixins/addableMixin.js +6 -21
- package/dist/new-widgets/templateAdditionMixins/index.js +2 -3
- package/dist/new-widgets/templateAdditionMixins/labelLastMixin.js +5 -18
- package/dist/new-widgets/templateAdditionMixins/labelMixin.js +5 -18
- package/dist/new-widgets/templates/defaultTemplatesDirectory.js +21 -27
- package/dist/new-widgets/templates/displayTemplatesDirectory.js +35 -70
- package/dist/new-widgets/templates/formTemplatesDirectory.js +350 -315
- package/dist/new-widgets/templates/groupTemplatesDirectory.js +5 -15
- package/dist/new-widgets/templates/index.js +1 -2
- package/dist/new-widgets/templates/setTemplatesDirectory.js +4 -37
- package/dist/new-widgets/templatesDependencies/altMixin.js +1 -2
- package/dist/new-widgets/templatesDependencies/editableMixin.js +9 -26
- package/dist/new-widgets/templatesDependencies/filterRangeFormMixin.js +3 -7
- package/dist/new-widgets/templatesDependencies/formCheckboxMixin.js +1 -5
- package/dist/new-widgets/templatesDependencies/formCheckboxesMixin.js +1 -11
- package/dist/new-widgets/templatesDependencies/formDropdownMixin.js +3 -13
- package/dist/new-widgets/templatesDependencies/formFileMixin.js +1 -13
- package/dist/new-widgets/templatesDependencies/formLengthMixin.js +1 -2
- package/dist/new-widgets/templatesDependencies/formMinMaxMixin.js +1 -2
- package/dist/new-widgets/templatesDependencies/formMixin.js +4 -14
- package/dist/new-widgets/templatesDependencies/formNumberMixin.js +1 -5
- package/dist/new-widgets/templatesDependencies/formRadioMixin.js +1 -5
- package/dist/new-widgets/templatesDependencies/formStepMixin.js +1 -2
- package/dist/new-widgets/templatesDependencies/linkTextMixin.js +13 -0
- package/dist/new-widgets/templatesDependencies/multipleFormMixin.js +23 -18
- package/dist/new-widgets/templatesDependencies/multipleselectFormMixin.js +1 -10
- package/dist/new-widgets/templatesDependencies/patternMixin.js +1 -2
- package/dist/new-widgets/templatesDependencies/rangeMixin.js +5 -15
- package/dist/new-widgets/templatesDependencies/setMixin.js +1 -4
- package/dist/new-widgets/templatesDependencies/valueRichtextMixin.js +1 -4
- package/dist/new-widgets/valueTransformationMixins/autolinkMixin.js +1 -5
- package/dist/new-widgets/valueTransformationMixins/dateMixin.js +5 -11
- package/dist/new-widgets/valueTransformationMixins/dateTimeMixin.js +1 -5
- package/dist/new-widgets/valueTransformationMixins/index.js +1 -2
- package/dist/new-widgets/valueTransformationMixins/markdownMixin.js +10 -8
- package/dist/new-widgets/valueTransformationMixins/multilineMixin.js +1 -5
- package/dist/new-widgets/valueTransformationMixins/oembedMixin.js +1 -7
- package/dist/solid-template-element.js +24 -44
- package/dist/widgets/baseWidget.js +21 -85
- package/dist/widgets/widget-factory.js +4 -6
- package/package.json +9 -6
- package/dist/_snowpack/env.js +0 -3
- package/dist/_snowpack/pkg/autolinker.js.map.proxy.js +0 -1
- package/dist/_snowpack/pkg/common/_baseUnary-217dffb2.js.map.proxy.js +0 -1
- package/dist/_snowpack/pkg/common/_commonjsHelpers-8c19dec8.js.map +0 -1
- package/dist/_snowpack/pkg/common/_commonjsHelpers-8c19dec8.js.map.proxy.js +0 -1
- package/dist/_snowpack/pkg/common/decode-a4c334cf.js.map +0 -1
- package/dist/_snowpack/pkg/common/decode-a4c334cf.js.map.proxy.js +0 -1
- package/dist/_snowpack/pkg/common/lit-html-babd44cd.js +0 -1119
- package/dist/_snowpack/pkg/common/lit-html-babd44cd.js.map +0 -1
- package/dist/_snowpack/pkg/common/lit-html-babd44cd.js.map.proxy.js +0 -1
- package/dist/_snowpack/pkg/delta-markdown-for-quill.js.map.proxy.js +0 -1
- package/dist/_snowpack/pkg/dialog-polyfill.js.map.proxy.js +0 -1
- package/dist/_snowpack/pkg/fusejs.js.map.proxy.js +0 -1
- package/dist/_snowpack/pkg/jsonld-context-parser.js.map.proxy.js +0 -1
- package/dist/_snowpack/pkg/lit-html/directives/if-defined.js.map.proxy.js +0 -1
- package/dist/_snowpack/pkg/lit-html/directives/unsafe-html.js.map.proxy.js +0 -1
- package/dist/_snowpack/pkg/lit-html/directives/until.js.map.proxy.js +0 -1
- package/dist/_snowpack/pkg/lit-html.js.map.proxy.js +0 -1
- package/dist/_snowpack/pkg/markdown-it.js.map.proxy.js +0 -1
- package/dist/_snowpack/pkg/quill-delta-to-markdown.js.map.proxy.js +0 -1
- package/dist/_snowpack/pkg/quill.js.map.proxy.js +0 -1
- package/dist/_snowpack/pkg/slim-select.js.map.proxy.js +0 -1
- package/dist/_snowpack/pkg/tui-calendar.js.map.proxy.js +0 -1
- package/dist/components/solid-ac-checker.js.map +0 -1
- package/dist/components/solid-calendar.js.map +0 -1
- package/dist/components/solid-delete.js.map +0 -1
- package/dist/components/solid-display.js.map +0 -1
- package/dist/components/solid-form-search.js.map +0 -1
- package/dist/components/solid-form.js.map +0 -1
- package/dist/components/solid-lang.js.map +0 -1
- package/dist/components/solid-map.js.map +0 -1
- package/dist/components/solid-table.js.map +0 -1
- package/dist/components/solid-widget.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/libs/Component.js.map +0 -1
- package/dist/libs/ComponentFactory.js.map +0 -1
- package/dist/libs/Compositor.js.map +0 -1
- package/dist/libs/Sib.js.map +0 -1
- package/dist/libs/helpers.js.map +0 -1
- package/dist/libs/interfaces.js.map +0 -1
- package/dist/libs/lit-helpers.js.map +0 -1
- package/dist/libs/polyfills.js.map +0 -1
- package/dist/libs/store/store.js.map +0 -1
- package/dist/mixins/attributeBinderMixin.js.map +0 -1
- package/dist/mixins/contextMixin.js.map +0 -1
- package/dist/mixins/counterMixin.js.map +0 -1
- package/dist/mixins/federationMixin.js.map +0 -1
- package/dist/mixins/filterMixin.js.map +0 -1
- package/dist/mixins/grouperMixin.js.map +0 -1
- package/dist/mixins/highlighterMixin.js.map +0 -1
- package/dist/mixins/interfaces.js.map +0 -1
- package/dist/mixins/listMixin.js.map +0 -1
- package/dist/mixins/nextMixin.js.map +0 -1
- package/dist/mixins/paginateMixin.js.map +0 -1
- package/dist/mixins/requiredMixin.js.map +0 -1
- package/dist/mixins/sorterMixin.js.map +0 -1
- package/dist/mixins/storeMixin.js.map +0 -1
- package/dist/mixins/translationMixin.js.map +0 -1
- package/dist/mixins/validationMixin.js.map +0 -1
- package/dist/mixins/widgetMixin.js.map +0 -1
- package/dist/new-widgets/attributeMixins/actionMixin.js.map +0 -1
- package/dist/new-widgets/attributeMixins/blankMixin.js.map +0 -1
- package/dist/new-widgets/attributeMixins/booleanMixin.js.map +0 -1
- package/dist/new-widgets/attributeMixins/index.js.map +0 -1
- package/dist/new-widgets/attributeMixins/mailtoMixin.js.map +0 -1
- package/dist/new-widgets/attributeMixins/multipleMixin.js.map +0 -1
- package/dist/new-widgets/attributeMixins/numberMixin.js.map +0 -1
- package/dist/new-widgets/attributeMixins/placeholderMixin.js.map +0 -1
- package/dist/new-widgets/attributeMixins/telMixin.js.map +0 -1
- package/dist/new-widgets/baseWidgetMixin.js.map +0 -1
- package/dist/new-widgets/callbackMixins/autocompletionMixin.js.map +0 -1
- package/dist/new-widgets/callbackMixins/index.js.map +0 -1
- package/dist/new-widgets/callbackMixins/richtextMixin.js.map +0 -1
- package/dist/new-widgets/new-widget-factory.js.map +0 -1
- package/dist/new-widgets/templateAdditionMixins/addableMixin.js.map +0 -1
- package/dist/new-widgets/templateAdditionMixins/index.js.map +0 -1
- package/dist/new-widgets/templateAdditionMixins/labelLastMixin.js.map +0 -1
- package/dist/new-widgets/templateAdditionMixins/labelMixin.js.map +0 -1
- package/dist/new-widgets/templates/defaultTemplatesDirectory.js.map +0 -1
- package/dist/new-widgets/templates/displayTemplatesDirectory.js.map +0 -1
- package/dist/new-widgets/templates/formTemplatesDirectory.js.map +0 -1
- package/dist/new-widgets/templates/groupTemplatesDirectory.js.map +0 -1
- package/dist/new-widgets/templates/index.js.map +0 -1
- package/dist/new-widgets/templates/setTemplatesDirectory.js.map +0 -1
- package/dist/new-widgets/templatesDependencies/altMixin.js.map +0 -1
- package/dist/new-widgets/templatesDependencies/editableMixin.js.map +0 -1
- package/dist/new-widgets/templatesDependencies/filterRangeFormMixin.js.map +0 -1
- package/dist/new-widgets/templatesDependencies/formCheckboxMixin.js.map +0 -1
- package/dist/new-widgets/templatesDependencies/formCheckboxesMixin.js.map +0 -1
- package/dist/new-widgets/templatesDependencies/formDropdownMixin.js.map +0 -1
- package/dist/new-widgets/templatesDependencies/formFileMixin.js.map +0 -1
- package/dist/new-widgets/templatesDependencies/formLengthMixin.js.map +0 -1
- package/dist/new-widgets/templatesDependencies/formMinMaxMixin.js.map +0 -1
- package/dist/new-widgets/templatesDependencies/formMixin.js.map +0 -1
- package/dist/new-widgets/templatesDependencies/formNumberMixin.js.map +0 -1
- package/dist/new-widgets/templatesDependencies/formRadioMixin.js.map +0 -1
- package/dist/new-widgets/templatesDependencies/formStepMixin.js.map +0 -1
- package/dist/new-widgets/templatesDependencies/multipleFormMixin.js.map +0 -1
- package/dist/new-widgets/templatesDependencies/multipleselectFormMixin.js.map +0 -1
- package/dist/new-widgets/templatesDependencies/patternMixin.js.map +0 -1
- package/dist/new-widgets/templatesDependencies/rangeMixin.js.map +0 -1
- package/dist/new-widgets/templatesDependencies/setMixin.js.map +0 -1
- package/dist/new-widgets/templatesDependencies/valueRichtextMixin.js.map +0 -1
- package/dist/new-widgets/valueTransformationMixins/autolinkMixin.js.map +0 -1
- package/dist/new-widgets/valueTransformationMixins/dateMixin.js.map +0 -1
- package/dist/new-widgets/valueTransformationMixins/dateTimeMixin.js.map +0 -1
- package/dist/new-widgets/valueTransformationMixins/index.js.map +0 -1
- package/dist/new-widgets/valueTransformationMixins/markdownMixin.js.map +0 -1
- package/dist/new-widgets/valueTransformationMixins/multilineMixin.js.map +0 -1
- package/dist/new-widgets/valueTransformationMixins/oembedMixin.js.map +0 -1
- package/dist/solid-template-element.js.map +0 -1
- package/dist/widgets/baseWidget.js.map +0 -1
- package/dist/widgets/widget-factory.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as createCommonjsModule } from './common/_commonjsHelpers-
|
|
2
|
-
import { i as isObjectLike_1, c as _baseGetTag, h as _Symbol, g as isArray_1, _ as _getNative, f as _baseUnary, j as isObject_1 } from './common/_baseUnary-
|
|
1
|
+
import { c as createCommonjsModule } from './common/_commonjsHelpers-37fa8da4.js';
|
|
2
|
+
import { i as isObjectLike_1, c as _baseGetTag, h as _Symbol, g as isArray_1, _ as _getNative, f as _baseUnary, j as isObject_1 } from './common/_baseUnary-c1edb653.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* A specialized version of `_.map` for arrays without support for iteratee
|
|
@@ -12,15 +12,13 @@ import { i as isObjectLike_1, c as _baseGetTag, h as _Symbol, g as isArray_1, _
|
|
|
12
12
|
*/
|
|
13
13
|
function arrayMap(array, iteratee) {
|
|
14
14
|
var index = -1,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
length = array == null ? 0 : array.length,
|
|
16
|
+
result = Array(length);
|
|
18
17
|
while (++index < length) {
|
|
19
18
|
result[index] = iteratee(array[index], index, array);
|
|
20
19
|
}
|
|
21
20
|
return result;
|
|
22
21
|
}
|
|
23
|
-
|
|
24
22
|
var _arrayMap = arrayMap;
|
|
25
23
|
|
|
26
24
|
/** `Object#toString` result references. */
|
|
@@ -44,10 +42,8 @@ var symbolTag = '[object Symbol]';
|
|
|
44
42
|
* // => false
|
|
45
43
|
*/
|
|
46
44
|
function isSymbol(value) {
|
|
47
|
-
return typeof value == 'symbol' ||
|
|
48
|
-
(isObjectLike_1(value) && _baseGetTag(value) == symbolTag);
|
|
45
|
+
return typeof value == 'symbol' || isObjectLike_1(value) && _baseGetTag(value) == symbolTag;
|
|
49
46
|
}
|
|
50
|
-
|
|
51
47
|
var isSymbol_1 = isSymbol;
|
|
52
48
|
|
|
53
49
|
/** Used as references for various `Number` constants. */
|
|
@@ -55,7 +51,7 @@ var INFINITY = 1 / 0;
|
|
|
55
51
|
|
|
56
52
|
/** Used to convert symbols to primitives and strings. */
|
|
57
53
|
var symbolProto = _Symbol ? _Symbol.prototype : undefined,
|
|
58
|
-
|
|
54
|
+
symbolToString = symbolProto ? symbolProto.toString : undefined;
|
|
59
55
|
|
|
60
56
|
/**
|
|
61
57
|
* The base implementation of `_.toString` which doesn't convert nullish
|
|
@@ -77,10 +73,9 @@ function baseToString(value) {
|
|
|
77
73
|
if (isSymbol_1(value)) {
|
|
78
74
|
return symbolToString ? symbolToString.call(value) : '';
|
|
79
75
|
}
|
|
80
|
-
var result =
|
|
81
|
-
return
|
|
76
|
+
var result = value + '';
|
|
77
|
+
return result == '0' && 1 / value == -INFINITY ? '-0' : result;
|
|
82
78
|
}
|
|
83
|
-
|
|
84
79
|
var _baseToString = baseToString;
|
|
85
80
|
|
|
86
81
|
/**
|
|
@@ -94,25 +89,22 @@ var _baseToString = baseToString;
|
|
|
94
89
|
*/
|
|
95
90
|
function baseSlice(array, start, end) {
|
|
96
91
|
var index = -1,
|
|
97
|
-
|
|
98
|
-
|
|
92
|
+
length = array.length;
|
|
99
93
|
if (start < 0) {
|
|
100
|
-
start = -start > length ? 0 :
|
|
94
|
+
start = -start > length ? 0 : length + start;
|
|
101
95
|
}
|
|
102
96
|
end = end > length ? length : end;
|
|
103
97
|
if (end < 0) {
|
|
104
98
|
end += length;
|
|
105
99
|
}
|
|
106
|
-
length = start > end ? 0 :
|
|
100
|
+
length = start > end ? 0 : end - start >>> 0;
|
|
107
101
|
start >>>= 0;
|
|
108
|
-
|
|
109
102
|
var result = Array(length);
|
|
110
103
|
while (++index < length) {
|
|
111
104
|
result[index] = array[index + start];
|
|
112
105
|
}
|
|
113
106
|
return result;
|
|
114
107
|
}
|
|
115
|
-
|
|
116
108
|
var _baseSlice = baseSlice;
|
|
117
109
|
|
|
118
110
|
/**
|
|
@@ -127,9 +119,8 @@ var _baseSlice = baseSlice;
|
|
|
127
119
|
function castSlice(array, start, end) {
|
|
128
120
|
var length = array.length;
|
|
129
121
|
end = end === undefined ? length : end;
|
|
130
|
-
return
|
|
122
|
+
return !start && end >= length ? array : _baseSlice(array, start, end);
|
|
131
123
|
}
|
|
132
|
-
|
|
133
124
|
var _castSlice = castSlice;
|
|
134
125
|
|
|
135
126
|
/**
|
|
@@ -145,16 +136,14 @@ var _castSlice = castSlice;
|
|
|
145
136
|
*/
|
|
146
137
|
function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
|
147
138
|
var length = array.length,
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
while ((fromRight ? index-- : ++index < length)) {
|
|
139
|
+
index = fromIndex + (fromRight ? 1 : -1);
|
|
140
|
+
while (fromRight ? index-- : ++index < length) {
|
|
151
141
|
if (predicate(array[index], index, array)) {
|
|
152
142
|
return index;
|
|
153
143
|
}
|
|
154
144
|
}
|
|
155
145
|
return -1;
|
|
156
146
|
}
|
|
157
|
-
|
|
158
147
|
var _baseFindIndex = baseFindIndex;
|
|
159
148
|
|
|
160
149
|
/**
|
|
@@ -167,7 +156,6 @@ var _baseFindIndex = baseFindIndex;
|
|
|
167
156
|
function baseIsNaN(value) {
|
|
168
157
|
return value !== value;
|
|
169
158
|
}
|
|
170
|
-
|
|
171
159
|
var _baseIsNaN = baseIsNaN;
|
|
172
160
|
|
|
173
161
|
/**
|
|
@@ -182,8 +170,7 @@ var _baseIsNaN = baseIsNaN;
|
|
|
182
170
|
*/
|
|
183
171
|
function strictIndexOf(array, value, fromIndex) {
|
|
184
172
|
var index = fromIndex - 1,
|
|
185
|
-
|
|
186
|
-
|
|
173
|
+
length = array.length;
|
|
187
174
|
while (++index < length) {
|
|
188
175
|
if (array[index] === value) {
|
|
189
176
|
return index;
|
|
@@ -191,7 +178,6 @@ function strictIndexOf(array, value, fromIndex) {
|
|
|
191
178
|
}
|
|
192
179
|
return -1;
|
|
193
180
|
}
|
|
194
|
-
|
|
195
181
|
var _strictIndexOf = strictIndexOf;
|
|
196
182
|
|
|
197
183
|
/**
|
|
@@ -204,11 +190,8 @@ var _strictIndexOf = strictIndexOf;
|
|
|
204
190
|
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
205
191
|
*/
|
|
206
192
|
function baseIndexOf(array, value, fromIndex) {
|
|
207
|
-
return value === value
|
|
208
|
-
? _strictIndexOf(array, value, fromIndex)
|
|
209
|
-
: _baseFindIndex(array, _baseIsNaN, fromIndex);
|
|
193
|
+
return value === value ? _strictIndexOf(array, value, fromIndex) : _baseFindIndex(array, _baseIsNaN, fromIndex);
|
|
210
194
|
}
|
|
211
|
-
|
|
212
195
|
var _baseIndexOf = baseIndexOf;
|
|
213
196
|
|
|
214
197
|
/**
|
|
@@ -222,11 +205,9 @@ var _baseIndexOf = baseIndexOf;
|
|
|
222
205
|
*/
|
|
223
206
|
function charsEndIndex(strSymbols, chrSymbols) {
|
|
224
207
|
var index = strSymbols.length;
|
|
225
|
-
|
|
226
208
|
while (index-- && _baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
|
|
227
209
|
return index;
|
|
228
210
|
}
|
|
229
|
-
|
|
230
211
|
var _charsEndIndex = charsEndIndex;
|
|
231
212
|
|
|
232
213
|
/**
|
|
@@ -239,22 +220,21 @@ var _charsEndIndex = charsEndIndex;
|
|
|
239
220
|
function asciiToArray(string) {
|
|
240
221
|
return string.split('');
|
|
241
222
|
}
|
|
242
|
-
|
|
243
223
|
var _asciiToArray = asciiToArray;
|
|
244
224
|
|
|
245
225
|
/** Used to compose unicode character classes. */
|
|
246
226
|
var rsAstralRange = '\\ud800-\\udfff',
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
227
|
+
rsComboMarksRange = '\\u0300-\\u036f',
|
|
228
|
+
reComboHalfMarksRange = '\\ufe20-\\ufe2f',
|
|
229
|
+
rsComboSymbolsRange = '\\u20d0-\\u20ff',
|
|
230
|
+
rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
|
|
231
|
+
rsVarRange = '\\ufe0e\\ufe0f';
|
|
252
232
|
|
|
253
233
|
/** Used to compose unicode capture groups. */
|
|
254
234
|
var rsZWJ = '\\u200d';
|
|
255
235
|
|
|
256
236
|
/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
|
|
257
|
-
var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange
|
|
237
|
+
var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
|
|
258
238
|
|
|
259
239
|
/**
|
|
260
240
|
* Checks if `string` contains Unicode symbols.
|
|
@@ -266,33 +246,32 @@ var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRan
|
|
|
266
246
|
function hasUnicode(string) {
|
|
267
247
|
return reHasUnicode.test(string);
|
|
268
248
|
}
|
|
269
|
-
|
|
270
249
|
var _hasUnicode = hasUnicode;
|
|
271
250
|
|
|
272
251
|
/** Used to compose unicode character classes. */
|
|
273
252
|
var rsAstralRange$1 = '\\ud800-\\udfff',
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
253
|
+
rsComboMarksRange$1 = '\\u0300-\\u036f',
|
|
254
|
+
reComboHalfMarksRange$1 = '\\ufe20-\\ufe2f',
|
|
255
|
+
rsComboSymbolsRange$1 = '\\u20d0-\\u20ff',
|
|
256
|
+
rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1,
|
|
257
|
+
rsVarRange$1 = '\\ufe0e\\ufe0f';
|
|
279
258
|
|
|
280
259
|
/** Used to compose unicode capture groups. */
|
|
281
260
|
var rsAstral = '[' + rsAstralRange$1 + ']',
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
261
|
+
rsCombo = '[' + rsComboRange$1 + ']',
|
|
262
|
+
rsFitz = '\\ud83c[\\udffb-\\udfff]',
|
|
263
|
+
rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
|
|
264
|
+
rsNonAstral = '[^' + rsAstralRange$1 + ']',
|
|
265
|
+
rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
|
|
266
|
+
rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
|
|
267
|
+
rsZWJ$1 = '\\u200d';
|
|
289
268
|
|
|
290
269
|
/** Used to compose unicode regexes. */
|
|
291
270
|
var reOptMod = rsModifier + '?',
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
271
|
+
rsOptVar = '[' + rsVarRange$1 + ']?',
|
|
272
|
+
rsOptJoin = '(?:' + rsZWJ$1 + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
|
|
273
|
+
rsSeq = rsOptVar + reOptMod + rsOptJoin,
|
|
274
|
+
rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
|
|
296
275
|
|
|
297
276
|
/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
|
|
298
277
|
var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
|
|
@@ -307,7 +286,6 @@ var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
|
|
|
307
286
|
function unicodeToArray(string) {
|
|
308
287
|
return string.match(reUnicode) || [];
|
|
309
288
|
}
|
|
310
|
-
|
|
311
289
|
var _unicodeToArray = unicodeToArray;
|
|
312
290
|
|
|
313
291
|
/**
|
|
@@ -318,11 +296,8 @@ var _unicodeToArray = unicodeToArray;
|
|
|
318
296
|
* @returns {Array} Returns the converted array.
|
|
319
297
|
*/
|
|
320
298
|
function stringToArray(string) {
|
|
321
|
-
return _hasUnicode(string)
|
|
322
|
-
? _unicodeToArray(string)
|
|
323
|
-
: _asciiToArray(string);
|
|
299
|
+
return _hasUnicode(string) ? _unicodeToArray(string) : _asciiToArray(string);
|
|
324
300
|
}
|
|
325
|
-
|
|
326
301
|
var _stringToArray = stringToArray;
|
|
327
302
|
|
|
328
303
|
/**
|
|
@@ -349,11 +324,25 @@ var _stringToArray = stringToArray;
|
|
|
349
324
|
function toString(value) {
|
|
350
325
|
return value == null ? '' : _baseToString(value);
|
|
351
326
|
}
|
|
352
|
-
|
|
353
327
|
var toString_1 = toString;
|
|
354
328
|
|
|
355
|
-
/** Used to match
|
|
356
|
-
var
|
|
329
|
+
/** Used to match a single whitespace character. */
|
|
330
|
+
var reWhitespace = /\s/;
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
|
|
334
|
+
* character of `string`.
|
|
335
|
+
*
|
|
336
|
+
* @private
|
|
337
|
+
* @param {string} string The string to inspect.
|
|
338
|
+
* @returns {number} Returns the index of the last non-whitespace character.
|
|
339
|
+
*/
|
|
340
|
+
function trimmedEndIndex(string) {
|
|
341
|
+
var index = string.length;
|
|
342
|
+
while (index-- && reWhitespace.test(string.charAt(index))) {}
|
|
343
|
+
return index;
|
|
344
|
+
}
|
|
345
|
+
var _trimmedEndIndex = trimmedEndIndex;
|
|
357
346
|
|
|
358
347
|
/**
|
|
359
348
|
* Removes trailing whitespace or specified characters from `string`.
|
|
@@ -377,17 +366,15 @@ var reTrimEnd = /\s+$/;
|
|
|
377
366
|
function trimEnd(string, chars, guard) {
|
|
378
367
|
string = toString_1(string);
|
|
379
368
|
if (string && (guard || chars === undefined)) {
|
|
380
|
-
return string.
|
|
369
|
+
return string.slice(0, _trimmedEndIndex(string) + 1);
|
|
381
370
|
}
|
|
382
371
|
if (!string || !(chars = _baseToString(chars))) {
|
|
383
372
|
return string;
|
|
384
373
|
}
|
|
385
374
|
var strSymbols = _stringToArray(string),
|
|
386
|
-
|
|
387
|
-
|
|
375
|
+
end = _charsEndIndex(strSymbols, _stringToArray(chars)) + 1;
|
|
388
376
|
return _castSlice(strSymbols, 0, end).join('');
|
|
389
377
|
}
|
|
390
|
-
|
|
391
378
|
var trimEnd_1 = trimEnd;
|
|
392
379
|
|
|
393
380
|
/** `Object#toString` result references. */
|
|
@@ -411,10 +398,8 @@ var stringTag = '[object String]';
|
|
|
411
398
|
* // => false
|
|
412
399
|
*/
|
|
413
400
|
function isString(value) {
|
|
414
|
-
return typeof value == 'string' ||
|
|
415
|
-
(!isArray_1(value) && isObjectLike_1(value) && _baseGetTag(value) == stringTag);
|
|
401
|
+
return typeof value == 'string' || !isArray_1(value) && isObjectLike_1(value) && _baseGetTag(value) == stringTag;
|
|
416
402
|
}
|
|
417
|
-
|
|
418
403
|
var isString_1 = isString;
|
|
419
404
|
|
|
420
405
|
/**
|
|
@@ -436,7 +421,6 @@ var isString_1 = isString;
|
|
|
436
421
|
function identity(value) {
|
|
437
422
|
return value;
|
|
438
423
|
}
|
|
439
|
-
|
|
440
424
|
var identity_1 = identity;
|
|
441
425
|
|
|
442
426
|
/**
|
|
@@ -451,14 +435,17 @@ var identity_1 = identity;
|
|
|
451
435
|
*/
|
|
452
436
|
function apply(func, thisArg, args) {
|
|
453
437
|
switch (args.length) {
|
|
454
|
-
case 0:
|
|
455
|
-
|
|
456
|
-
case
|
|
457
|
-
|
|
438
|
+
case 0:
|
|
439
|
+
return func.call(thisArg);
|
|
440
|
+
case 1:
|
|
441
|
+
return func.call(thisArg, args[0]);
|
|
442
|
+
case 2:
|
|
443
|
+
return func.call(thisArg, args[0], args[1]);
|
|
444
|
+
case 3:
|
|
445
|
+
return func.call(thisArg, args[0], args[1], args[2]);
|
|
458
446
|
}
|
|
459
447
|
return func.apply(thisArg, args);
|
|
460
448
|
}
|
|
461
|
-
|
|
462
449
|
var _apply = apply;
|
|
463
450
|
|
|
464
451
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
@@ -474,13 +461,12 @@ var nativeMax = Math.max;
|
|
|
474
461
|
* @returns {Function} Returns the new function.
|
|
475
462
|
*/
|
|
476
463
|
function overRest(func, start, transform) {
|
|
477
|
-
start = nativeMax(start === undefined ?
|
|
478
|
-
return function() {
|
|
464
|
+
start = nativeMax(start === undefined ? func.length - 1 : start, 0);
|
|
465
|
+
return function () {
|
|
479
466
|
var args = arguments,
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
467
|
+
index = -1,
|
|
468
|
+
length = nativeMax(args.length - start, 0),
|
|
469
|
+
array = Array(length);
|
|
484
470
|
while (++index < length) {
|
|
485
471
|
array[index] = args[start + index];
|
|
486
472
|
}
|
|
@@ -493,7 +479,6 @@ function overRest(func, start, transform) {
|
|
|
493
479
|
return _apply(func, this, otherArgs);
|
|
494
480
|
};
|
|
495
481
|
}
|
|
496
|
-
|
|
497
482
|
var _overRest = overRest;
|
|
498
483
|
|
|
499
484
|
/**
|
|
@@ -516,21 +501,19 @@ var _overRest = overRest;
|
|
|
516
501
|
* // => true
|
|
517
502
|
*/
|
|
518
503
|
function constant(value) {
|
|
519
|
-
return function() {
|
|
504
|
+
return function () {
|
|
520
505
|
return value;
|
|
521
506
|
};
|
|
522
507
|
}
|
|
523
|
-
|
|
524
508
|
var constant_1 = constant;
|
|
525
509
|
|
|
526
|
-
var defineProperty =
|
|
510
|
+
var defineProperty = function () {
|
|
527
511
|
try {
|
|
528
512
|
var func = _getNative(Object, 'defineProperty');
|
|
529
513
|
func({}, '', {});
|
|
530
514
|
return func;
|
|
531
515
|
} catch (e) {}
|
|
532
|
-
}()
|
|
533
|
-
|
|
516
|
+
}();
|
|
534
517
|
var _defineProperty = defineProperty;
|
|
535
518
|
|
|
536
519
|
/**
|
|
@@ -541,7 +524,7 @@ var _defineProperty = defineProperty;
|
|
|
541
524
|
* @param {Function} string The `toString` result.
|
|
542
525
|
* @returns {Function} Returns `func`.
|
|
543
526
|
*/
|
|
544
|
-
var baseSetToString = !_defineProperty ? identity_1 : function(func, string) {
|
|
527
|
+
var baseSetToString = !_defineProperty ? identity_1 : function (func, string) {
|
|
545
528
|
return _defineProperty(func, 'toString', {
|
|
546
529
|
'configurable': true,
|
|
547
530
|
'enumerable': false,
|
|
@@ -549,12 +532,11 @@ var baseSetToString = !_defineProperty ? identity_1 : function(func, string) {
|
|
|
549
532
|
'writable': true
|
|
550
533
|
});
|
|
551
534
|
};
|
|
552
|
-
|
|
553
535
|
var _baseSetToString = baseSetToString;
|
|
554
536
|
|
|
555
537
|
/** Used to detect hot functions by number of calls within a span of milliseconds. */
|
|
556
538
|
var HOT_COUNT = 800,
|
|
557
|
-
|
|
539
|
+
HOT_SPAN = 16;
|
|
558
540
|
|
|
559
541
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
560
542
|
var nativeNow = Date.now;
|
|
@@ -570,12 +552,10 @@ var nativeNow = Date.now;
|
|
|
570
552
|
*/
|
|
571
553
|
function shortOut(func) {
|
|
572
554
|
var count = 0,
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
return function() {
|
|
555
|
+
lastCalled = 0;
|
|
556
|
+
return function () {
|
|
576
557
|
var stamp = nativeNow(),
|
|
577
|
-
|
|
578
|
-
|
|
558
|
+
remaining = HOT_SPAN - (stamp - lastCalled);
|
|
579
559
|
lastCalled = stamp;
|
|
580
560
|
if (remaining > 0) {
|
|
581
561
|
if (++count >= HOT_COUNT) {
|
|
@@ -587,7 +567,6 @@ function shortOut(func) {
|
|
|
587
567
|
return func.apply(undefined, arguments);
|
|
588
568
|
};
|
|
589
569
|
}
|
|
590
|
-
|
|
591
570
|
var _shortOut = shortOut;
|
|
592
571
|
|
|
593
572
|
/**
|
|
@@ -599,7 +578,6 @@ var _shortOut = shortOut;
|
|
|
599
578
|
* @returns {Function} Returns `func`.
|
|
600
579
|
*/
|
|
601
580
|
var setToString = _shortOut(_baseSetToString);
|
|
602
|
-
|
|
603
581
|
var _setToString = setToString;
|
|
604
582
|
|
|
605
583
|
/**
|
|
@@ -613,7 +591,6 @@ var _setToString = setToString;
|
|
|
613
591
|
function baseRest(func, start) {
|
|
614
592
|
return _setToString(_overRest(func, start, identity_1), func + '');
|
|
615
593
|
}
|
|
616
|
-
|
|
617
594
|
var _baseRest = baseRest;
|
|
618
595
|
|
|
619
596
|
/**
|
|
@@ -628,8 +605,7 @@ var _baseRest = baseRest;
|
|
|
628
605
|
*/
|
|
629
606
|
function baseIndexOfWith(array, value, fromIndex, comparator) {
|
|
630
607
|
var index = fromIndex - 1,
|
|
631
|
-
|
|
632
|
-
|
|
608
|
+
length = array.length;
|
|
633
609
|
while (++index < length) {
|
|
634
610
|
if (comparator(array[index], value)) {
|
|
635
611
|
return index;
|
|
@@ -637,7 +613,6 @@ function baseIndexOfWith(array, value, fromIndex, comparator) {
|
|
|
637
613
|
}
|
|
638
614
|
return -1;
|
|
639
615
|
}
|
|
640
|
-
|
|
641
616
|
var _baseIndexOfWith = baseIndexOfWith;
|
|
642
617
|
|
|
643
618
|
/**
|
|
@@ -650,15 +625,13 @@ var _baseIndexOfWith = baseIndexOfWith;
|
|
|
650
625
|
*/
|
|
651
626
|
function copyArray(source, array) {
|
|
652
627
|
var index = -1,
|
|
653
|
-
|
|
654
|
-
|
|
628
|
+
length = source.length;
|
|
655
629
|
array || (array = Array(length));
|
|
656
630
|
while (++index < length) {
|
|
657
631
|
array[index] = source[index];
|
|
658
632
|
}
|
|
659
633
|
return array;
|
|
660
634
|
}
|
|
661
|
-
|
|
662
635
|
var _copyArray = copyArray;
|
|
663
636
|
|
|
664
637
|
/** Used for built-in method references. */
|
|
@@ -680,10 +653,9 @@ var splice = arrayProto.splice;
|
|
|
680
653
|
*/
|
|
681
654
|
function basePullAll(array, values, iteratee, comparator) {
|
|
682
655
|
var indexOf = comparator ? _baseIndexOfWith : _baseIndexOf,
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
656
|
+
index = -1,
|
|
657
|
+
length = values.length,
|
|
658
|
+
seen = array;
|
|
687
659
|
if (array === values) {
|
|
688
660
|
values = _copyArray(values);
|
|
689
661
|
}
|
|
@@ -692,9 +664,8 @@ function basePullAll(array, values, iteratee, comparator) {
|
|
|
692
664
|
}
|
|
693
665
|
while (++index < length) {
|
|
694
666
|
var fromIndex = 0,
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
667
|
+
value = values[index],
|
|
668
|
+
computed = iteratee ? iteratee(value) : value;
|
|
698
669
|
while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
|
|
699
670
|
if (seen !== array) {
|
|
700
671
|
splice.call(seen, fromIndex, 1);
|
|
@@ -704,7 +675,6 @@ function basePullAll(array, values, iteratee, comparator) {
|
|
|
704
675
|
}
|
|
705
676
|
return array;
|
|
706
677
|
}
|
|
707
|
-
|
|
708
678
|
var _basePullAll = basePullAll;
|
|
709
679
|
|
|
710
680
|
/**
|
|
@@ -728,11 +698,8 @@ var _basePullAll = basePullAll;
|
|
|
728
698
|
* // => ['b', 'b']
|
|
729
699
|
*/
|
|
730
700
|
function pullAll(array, values) {
|
|
731
|
-
return
|
|
732
|
-
? _basePullAll(array, values)
|
|
733
|
-
: array;
|
|
701
|
+
return array && array.length && values && values.length ? _basePullAll(array, values) : array;
|
|
734
702
|
}
|
|
735
|
-
|
|
736
703
|
var pullAll_1 = pullAll;
|
|
737
704
|
|
|
738
705
|
/**
|
|
@@ -759,11 +726,9 @@ var pullAll_1 = pullAll;
|
|
|
759
726
|
* // => ['b', 'b']
|
|
760
727
|
*/
|
|
761
728
|
var pull = _baseRest(pullAll_1);
|
|
762
|
-
|
|
763
729
|
var pull_1 = pull;
|
|
764
730
|
|
|
765
731
|
var id = 0;
|
|
766
|
-
|
|
767
732
|
class Node {
|
|
768
733
|
constructor(data) {
|
|
769
734
|
this.id = ++id;
|
|
@@ -775,7 +740,6 @@ class Node {
|
|
|
775
740
|
}
|
|
776
741
|
this.children = [];
|
|
777
742
|
}
|
|
778
|
-
|
|
779
743
|
append(e) {
|
|
780
744
|
if (!(e instanceof Node)) {
|
|
781
745
|
e = new Node(e);
|
|
@@ -786,7 +750,6 @@ class Node {
|
|
|
786
750
|
e._parent = this;
|
|
787
751
|
this.children = this.children.concat(e);
|
|
788
752
|
}
|
|
789
|
-
|
|
790
753
|
render() {
|
|
791
754
|
var text = '';
|
|
792
755
|
if (this.open) {
|
|
@@ -801,65 +764,59 @@ class Node {
|
|
|
801
764
|
if (this.close) {
|
|
802
765
|
text += this.close;
|
|
803
766
|
}
|
|
804
|
-
return text
|
|
767
|
+
return text;
|
|
805
768
|
}
|
|
806
|
-
|
|
807
769
|
parent() {
|
|
808
|
-
return this._parent
|
|
770
|
+
return this._parent;
|
|
809
771
|
}
|
|
810
772
|
}
|
|
811
|
-
|
|
812
773
|
var Node_1 = Node;
|
|
813
774
|
|
|
814
|
-
const encodeLink = (link)
|
|
815
|
-
encodeURI(link)
|
|
816
|
-
.replace(/\(/i, "%28")
|
|
817
|
-
.replace(/\)/i, "%29")
|
|
818
|
-
.replace(/(\?|&)response-content-disposition=attachment.*$/, "");
|
|
819
|
-
|
|
775
|
+
const encodeLink = link => encodeURI(link).replace(/\(/i, "%28").replace(/\)/i, "%29").replace(/(\?|&)response-content-disposition=attachment.*$/, "");
|
|
820
776
|
var URL = {
|
|
821
|
-
encodeLink
|
|
777
|
+
encodeLink
|
|
822
778
|
};
|
|
823
779
|
|
|
824
|
-
const {
|
|
825
|
-
|
|
780
|
+
const {
|
|
781
|
+
encodeLink: encodeLink$1
|
|
782
|
+
} = URL;
|
|
826
783
|
var fromDelta_converters = {
|
|
827
784
|
embed: {
|
|
828
|
-
image: function(src) {
|
|
785
|
+
image: function (src) {
|
|
829
786
|
this.append(' + ')');
|
|
830
787
|
},
|
|
831
788
|
// Not a default Quill feature, converts custom divider embed blot added when
|
|
832
789
|
// creating quill editor instance.
|
|
833
790
|
// See https://quilljs.com/guides/cloning-medium-with-parchment/#dividers
|
|
834
|
-
thematic_break: function() {
|
|
791
|
+
thematic_break: function () {
|
|
835
792
|
this.open = '\n---\n' + this.open;
|
|
836
|
-
}
|
|
793
|
+
}
|
|
837
794
|
},
|
|
838
|
-
|
|
839
795
|
inline: {
|
|
840
|
-
italic: function() {
|
|
796
|
+
italic: function () {
|
|
841
797
|
return ['_', '_'];
|
|
842
798
|
},
|
|
843
|
-
bold: function() {
|
|
799
|
+
bold: function () {
|
|
844
800
|
return ['**', '**'];
|
|
845
801
|
},
|
|
846
|
-
link: function(url) {
|
|
802
|
+
link: function (url) {
|
|
847
803
|
return ['[', '](' + url + ')'];
|
|
848
|
-
}
|
|
804
|
+
}
|
|
849
805
|
},
|
|
850
|
-
|
|
851
806
|
block: {
|
|
852
|
-
'header': function({
|
|
807
|
+
'header': function ({
|
|
808
|
+
header
|
|
809
|
+
}) {
|
|
853
810
|
this.open = '#'.repeat(header) + ' ' + this.open;
|
|
854
811
|
},
|
|
855
|
-
blockquote: function() {
|
|
812
|
+
blockquote: function () {
|
|
856
813
|
this.open = '> ' + this.open;
|
|
857
814
|
},
|
|
858
815
|
'list': {
|
|
859
|
-
group: function() {
|
|
816
|
+
group: function () {
|
|
860
817
|
return new Node_1(['', '\n']);
|
|
861
818
|
},
|
|
862
|
-
line: function(attrs, group) {
|
|
819
|
+
line: function (attrs, group) {
|
|
863
820
|
if (attrs.list === 'bullet') {
|
|
864
821
|
this.open = '- ' + this.open;
|
|
865
822
|
} else if (attrs.list === "checked") {
|
|
@@ -871,153 +828,138 @@ var fromDelta_converters = {
|
|
|
871
828
|
var count = ++group.count;
|
|
872
829
|
this.open = count + '. ' + this.open;
|
|
873
830
|
}
|
|
874
|
-
}
|
|
831
|
+
}
|
|
875
832
|
}
|
|
876
|
-
}
|
|
833
|
+
}
|
|
877
834
|
};
|
|
878
835
|
|
|
879
836
|
var fromDelta = createCommonjsModule(function (module, exports) {
|
|
880
|
-
module.exports = function(ops, converters = fromDelta_converters) {
|
|
881
|
-
return trimEnd_1(convert(ops, converters).render()) + '\n';
|
|
882
|
-
};
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
var
|
|
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
|
-
|
|
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
|
-
newEl._format = fmt;
|
|
1008
|
-
el.append(newEl);
|
|
1009
|
-
el = newEl;
|
|
1010
|
-
}
|
|
1011
|
-
}
|
|
1012
|
-
}
|
|
1013
|
-
|
|
1014
|
-
function hasBlockLevelAttribute(attrs, converters) {
|
|
1015
|
-
for (var k in attrs) {
|
|
1016
|
-
if (Object.keys(converters.block).includes(k)) {
|
|
1017
|
-
return true
|
|
1018
|
-
}
|
|
1019
|
-
}
|
|
1020
|
-
return false
|
|
837
|
+
module.exports = function (ops, converters = fromDelta_converters) {
|
|
838
|
+
return trimEnd_1(convert(ops, converters).render()) + '\n';
|
|
839
|
+
};
|
|
840
|
+
function convert(ops, converters) {
|
|
841
|
+
var group, line, el, activeInline, beginningOfLine;
|
|
842
|
+
var root = new Node_1();
|
|
843
|
+
function newLine() {
|
|
844
|
+
el = line = new Node_1(['', '\n']);
|
|
845
|
+
root.append(line);
|
|
846
|
+
activeInline = {};
|
|
847
|
+
}
|
|
848
|
+
newLine();
|
|
849
|
+
for (var i = 0; i < ops.length; i++) {
|
|
850
|
+
var op = ops[i];
|
|
851
|
+
if (isObject_1(op.insert)) {
|
|
852
|
+
for (var k in op.insert) {
|
|
853
|
+
if (converters.embed[k]) {
|
|
854
|
+
applyInlineAttributes(op.attributes);
|
|
855
|
+
converters.embed[k].call(el, op.insert[k], op.attributes);
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
} else {
|
|
859
|
+
var lines = op.insert.split('\n');
|
|
860
|
+
if (hasBlockLevelAttribute(op.attributes, converters)) {
|
|
861
|
+
// Some line-level styling (ie headings) is applied by inserting a \n
|
|
862
|
+
// with the style; the style applies back to the previous \n.
|
|
863
|
+
// There *should* only be one style in an insert operation.
|
|
864
|
+
|
|
865
|
+
for (var j = 1; j < lines.length; j++) {
|
|
866
|
+
for (var attr in op.attributes) {
|
|
867
|
+
if (converters.block[attr]) {
|
|
868
|
+
var fn = converters.block[attr];
|
|
869
|
+
if (typeof fn === 'object') {
|
|
870
|
+
if (group && group.type !== attr) {
|
|
871
|
+
group = null;
|
|
872
|
+
}
|
|
873
|
+
if (!group && fn.group) {
|
|
874
|
+
group = {
|
|
875
|
+
el: fn.group(),
|
|
876
|
+
type: attr,
|
|
877
|
+
value: op.attributes[k],
|
|
878
|
+
distance: 0
|
|
879
|
+
};
|
|
880
|
+
root.append(group.el);
|
|
881
|
+
}
|
|
882
|
+
if (group) {
|
|
883
|
+
group.el.append(line);
|
|
884
|
+
group.distance = 0;
|
|
885
|
+
}
|
|
886
|
+
fn = fn.line;
|
|
887
|
+
}
|
|
888
|
+
fn.call(line, op.attributes, group);
|
|
889
|
+
newLine();
|
|
890
|
+
break;
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
beginningOfLine = true;
|
|
895
|
+
} else {
|
|
896
|
+
for (var l = 0; l < lines.length; l++) {
|
|
897
|
+
if ((l > 0 || beginningOfLine) && group && ++group.distance >= 2) {
|
|
898
|
+
group = null;
|
|
899
|
+
}
|
|
900
|
+
applyInlineAttributes(op.attributes, ops[i + 1] && ops[i + 1].attributes);
|
|
901
|
+
el.append(lines[l]);
|
|
902
|
+
if (l < lines.length - 1) {
|
|
903
|
+
newLine();
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
beginningOfLine = false;
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
return root;
|
|
911
|
+
function applyInlineAttributes(attrs, next) {
|
|
912
|
+
var first = [],
|
|
913
|
+
then = [];
|
|
914
|
+
attrs = attrs || {};
|
|
915
|
+
var tag = el,
|
|
916
|
+
seen = {};
|
|
917
|
+
while (tag._format) {
|
|
918
|
+
seen[tag._format] = true;
|
|
919
|
+
if (!attrs[tag._format]) {
|
|
920
|
+
for (var k in seen) {
|
|
921
|
+
delete activeInline[k];
|
|
922
|
+
}
|
|
923
|
+
el = tag.parent();
|
|
924
|
+
}
|
|
925
|
+
tag = tag.parent();
|
|
926
|
+
}
|
|
927
|
+
for (var attr in attrs) {
|
|
928
|
+
if (converters.inline[attr]) {
|
|
929
|
+
if (activeInline[attr]) {
|
|
930
|
+
if (activeInline[attr] === attrs[attr]) {
|
|
931
|
+
continue; // do nothing -- we should already be inside this style's tag
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
if (next && attrs[attr] === next[attr]) {
|
|
936
|
+
first.push(attr); // if the next operation has the same style, this should be the outermost tag
|
|
937
|
+
} else {
|
|
938
|
+
then.push(attr);
|
|
939
|
+
}
|
|
940
|
+
activeInline[attr] = attrs[attr];
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
first.forEach(apply);
|
|
944
|
+
then.forEach(apply);
|
|
945
|
+
function apply(fmt) {
|
|
946
|
+
var newEl = converters.inline[fmt].call(null, attrs[fmt]);
|
|
947
|
+
if (isArray_1(newEl)) {
|
|
948
|
+
newEl = new Node_1(newEl);
|
|
949
|
+
}
|
|
950
|
+
newEl._format = fmt;
|
|
951
|
+
el.append(newEl);
|
|
952
|
+
el = newEl;
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
function hasBlockLevelAttribute(attrs, converters) {
|
|
957
|
+
for (var k in attrs) {
|
|
958
|
+
if (Object.keys(converters.block).includes(k)) {
|
|
959
|
+
return true;
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
return false;
|
|
1021
963
|
}
|
|
1022
964
|
});
|
|
1023
965
|
|