jh-componentj 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +61 -0
  3. package/dist/tvjs-xp.js +2375 -0
  4. package/dist/tvjs-xp.min.js +5 -0
  5. package/dist/tvjs-xp.min.js.LICENSE.txt +6 -0
  6. package/package.json +69 -0
  7. package/src/Main.vue +170 -0
  8. package/src/apps/App1.vue +71 -0
  9. package/src/apps/App2.vue +155 -0
  10. package/src/components/AppTag.vue +48 -0
  11. package/src/components/Chartbox.vue +87 -0
  12. package/src/components/Codepane.vue +260 -0
  13. package/src/components/Multiselect.vue +106 -0
  14. package/src/components/MyVueComponent.vue +26 -0
  15. package/src/components/StdInput.vue +70 -0
  16. package/src/components/Window.vue +95 -0
  17. package/src/components/dragg.js +32 -0
  18. package/src/extensions/chart-link/main.js +299 -0
  19. package/src/extensions/chart-link/shared.js +10 -0
  20. package/src/extensions/chart-link/utils.js +17 -0
  21. package/src/extensions/chart-link/x.json +11 -0
  22. package/src/extensions/grid-resize/Splitter.vue +80 -0
  23. package/src/extensions/grid-resize/main.js +152 -0
  24. package/src/extensions/grid-resize/utils.js +25 -0
  25. package/src/extensions/grid-resize/x.json +11 -0
  26. package/src/extensions/legend-buttons/AddWin.vue +91 -0
  27. package/src/extensions/legend-buttons/main.js +156 -0
  28. package/src/extensions/legend-buttons/x.json +11 -0
  29. package/src/extensions/settings-win/SettingsWin.vue +76 -0
  30. package/src/extensions/settings-win/main.js +39 -0
  31. package/src/extensions/settings-win/utils.js +19 -0
  32. package/src/extensions/settings-win/x.json +11 -0
  33. package/src/index.html +19 -0
  34. package/src/index_dev.js +27 -0
  35. package/src/index_prod.js +28 -0
  36. package/src/main.js +14 -0
  37. package/src/stuff/utils.js +16 -0
@@ -0,0 +1,2375 @@
1
+ /*!
2
+ * TVJS Std Extension Pack - v0.2.0 - Sat Nov 30 2024
3
+ * https://github.com/tvjsx/tvjs-xp
4
+ * Copyright (c) 2020 c451 Code's All Right;
5
+ * Licensed under the MIT license
6
+ */
7
+ (function webpackUniversalModuleDefinition(root, factory) {
8
+ if (!root['trading-vue-js']) {
9
+ root['trading-vue-js'] = root['TradingVueJs']
10
+ }
11
+ if (!root['vue']) {
12
+ root['vue'] = root['Vue']
13
+ }
14
+ if(typeof exports === 'object' && typeof module === 'object')
15
+ module.exports = factory(require("trading-vue-js"), require("vue"));
16
+ else if(typeof define === 'function' && define.amd)
17
+ define(["trading-vue-js", "vue"], factory);
18
+ else if(typeof exports === 'object')
19
+ exports["TvjsXP"] = factory(require("trading-vue-js"), require("vue"));
20
+ else
21
+ root["TvjsXP"] = factory(root["trading-vue-js"], root["vue"]);
22
+ })(self, (__WEBPACK_EXTERNAL_MODULE__724__, __WEBPACK_EXTERNAL_MODULE__380__) => {
23
+ return /******/ (() => { // webpackBootstrap
24
+ /******/ var __webpack_modules__ = ({
25
+
26
+ /***/ 364:
27
+ /***/ ((module, exports, __webpack_require__) => {
28
+
29
+ // Imports
30
+ var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(314);
31
+ exports = ___CSS_LOADER_API_IMPORT___(false);
32
+ // Module
33
+ exports.push([module.id, "\n.tvjs-std-input {\n margin: 5px;\n background-color: #161b27;\n border: 1px dotted #353940;\n height: 22px;\n border-radius: 3px;\n padding: 2px 0px 3px 10px;\n color: whitesmoke;\n font-size: 1.2em;\n outline: none;\n width: 100px;\n}\nselect.tvjs-std-input {\n height: 29px;\n -moz-appearance: none;\n}\nselect.tvjs-std-input {\n display: none; /*hide original SELECT element: */\n}\n.tvjs-std-input::placeholder {\n color: #8e909a;\n opacity: 0.25;\n}\n", ""]);
34
+ // Exports
35
+ module.exports = exports;
36
+
37
+
38
+ /***/ }),
39
+
40
+ /***/ 120:
41
+ /***/ ((module, exports, __webpack_require__) => {
42
+
43
+ // Imports
44
+ var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(314);
45
+ exports = ___CSS_LOADER_API_IMPORT___(false);
46
+ // Module
47
+ exports.push([module.id, "\n.tvjs-x-window {\n position: absolute;\n background: #1b202def;\n border-radius: 3px;\n pointer-events: all;\n padding-left: 7px;\n z-index: 100;\n color: #dedddd;\n}\n.tvjs-x-window-head {\n font-size: 2em;\n user-select: none;\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-content: center;\n align-items: center;\n height: 36px;\n padding: 10px;\n cursor: grab;\n}\n.tvjs-x-window-body {\n padding: 10px;\n font-size: 1.1em;\n}\n.tvjs-x-window-title {\n width: 300px;\n user-select: none;\n}\n.tvjs-x-window-close {\n width: 26px;\n cursor: pointer;\n margin: -1em;\n padding: 1em;\n font-size: 0.75em;\n}\n", ""]);
48
+ // Exports
49
+ module.exports = exports;
50
+
51
+
52
+ /***/ }),
53
+
54
+ /***/ 75:
55
+ /***/ ((module, exports, __webpack_require__) => {
56
+
57
+ // Imports
58
+ var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(314);
59
+ exports = ___CSS_LOADER_API_IMPORT___(false);
60
+ // Module
61
+ exports.push([module.id, "\n.h-splitter[data-v-868dc3e2] {\n position: absolute;\n left: 0;\n height: 5px;\n margin-top: -2px;\n width: 100%;\n z-index: 1;\n background-color: #3ee4afb5;\n opacity: 0;\n pointer-events: all;\n}\n.h-splitter[data-v-868dc3e2]:hover {\n cursor: row-resize;\n opacity: 1;\n}\n", ""]);
62
+ // Exports
63
+ module.exports = exports;
64
+
65
+
66
+ /***/ }),
67
+
68
+ /***/ 844:
69
+ /***/ ((module, exports, __webpack_require__) => {
70
+
71
+ // Imports
72
+ var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(314);
73
+ exports = ___CSS_LOADER_API_IMPORT___(false);
74
+ // Module
75
+ exports.push([module.id, "\n.tvjs-x-window.add-win[data-v-2ed555ae] {\n padding-bottom: 30px;\n border: 1px solid #80808011;\n}\n.add-win-list[data-v-2ed555ae] {\n height: 300px;\n overflow-x: hidden;\n overflow-y: auto;\n user-select: none;\n}\n/* Hide scrollbar for Chrome, Safari and Opera */\n.add-win-list[data-v-2ed555ae]::-webkit-scrollbar {\n display: none;\n}\n\n/* Hide scrollbar for IE, Edge and Firefox */\n.add-win-list[data-v-2ed555ae] {\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n}\n.add-win-item[data-v-2ed555ae] {\n color: #ffffff88;\n width: 100%;\n padding: 5px;\n cursor: pointer;\n}\n.add-win-item[data-v-2ed555ae]:hover {\n background: #88888822;\n color: #ffffffff;\n}\n.add-win-item-desc[data-v-2ed555ae] {\n color: #ffffff33;\n margin-left: 3px;\n}\n.add-win-item:hover .add-win-item-desc[data-v-2ed555ae] {\n color: #ffffff44;\n}\n.add-win-empty[data-v-2ed555ae] {\n opacity: 0.5;\n}\n", ""]);
76
+ // Exports
77
+ module.exports = exports;
78
+
79
+
80
+ /***/ }),
81
+
82
+ /***/ 604:
83
+ /***/ ((module, exports, __webpack_require__) => {
84
+
85
+ // Imports
86
+ var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(314);
87
+ exports = ___CSS_LOADER_API_IMPORT___(false);
88
+ // Module
89
+ exports.push([module.id, "\n.tvjs-x-window.sett-win[data-v-182fbb4f] {\n padding-bottom: 30px;\n border: 1px solid #80808011;\n}\n.sett-win-item[data-v-182fbb4f] {\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-content: center;\n align-items: center;\n}\n.sett-win-item label[data-v-182fbb4f] {\n min-width: 80px;\n color: #35a776;\n}\n.sett-win-empty[data-v-182fbb4f] {\n opacity: 0.5;\n}\n", ""]);
90
+ // Exports
91
+ module.exports = exports;
92
+
93
+
94
+ /***/ }),
95
+
96
+ /***/ 314:
97
+ /***/ ((module) => {
98
+
99
+ "use strict";
100
+
101
+
102
+ /*
103
+ MIT License http://www.opensource.org/licenses/mit-license.php
104
+ Author Tobias Koppers @sokra
105
+ */
106
+ // css base code, injected by the css-loader
107
+ // eslint-disable-next-line func-names
108
+ module.exports = function (useSourceMap) {
109
+ var list = []; // return the list of modules as css string
110
+
111
+ list.toString = function toString() {
112
+ return this.map(function (item) {
113
+ var content = cssWithMappingToString(item, useSourceMap);
114
+
115
+ if (item[2]) {
116
+ return "@media ".concat(item[2], " {").concat(content, "}");
117
+ }
118
+
119
+ return content;
120
+ }).join('');
121
+ }; // import a list of modules into the list
122
+ // eslint-disable-next-line func-names
123
+
124
+
125
+ list.i = function (modules, mediaQuery, dedupe) {
126
+ if (typeof modules === 'string') {
127
+ // eslint-disable-next-line no-param-reassign
128
+ modules = [[null, modules, '']];
129
+ }
130
+
131
+ var alreadyImportedModules = {};
132
+
133
+ if (dedupe) {
134
+ for (var i = 0; i < this.length; i++) {
135
+ // eslint-disable-next-line prefer-destructuring
136
+ var id = this[i][0];
137
+
138
+ if (id != null) {
139
+ alreadyImportedModules[id] = true;
140
+ }
141
+ }
142
+ }
143
+
144
+ for (var _i = 0; _i < modules.length; _i++) {
145
+ var item = [].concat(modules[_i]);
146
+
147
+ if (dedupe && alreadyImportedModules[item[0]]) {
148
+ // eslint-disable-next-line no-continue
149
+ continue;
150
+ }
151
+
152
+ if (mediaQuery) {
153
+ if (!item[2]) {
154
+ item[2] = mediaQuery;
155
+ } else {
156
+ item[2] = "".concat(mediaQuery, " and ").concat(item[2]);
157
+ }
158
+ }
159
+
160
+ list.push(item);
161
+ }
162
+ };
163
+
164
+ return list;
165
+ };
166
+
167
+ function cssWithMappingToString(item, useSourceMap) {
168
+ var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring
169
+
170
+ var cssMapping = item[3];
171
+
172
+ if (!cssMapping) {
173
+ return content;
174
+ }
175
+
176
+ if (useSourceMap && typeof btoa === 'function') {
177
+ var sourceMapping = toComment(cssMapping);
178
+ var sourceURLs = cssMapping.sources.map(function (source) {
179
+ return "/*# sourceURL=".concat(cssMapping.sourceRoot || '').concat(source, " */");
180
+ });
181
+ return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
182
+ }
183
+
184
+ return [content].join('\n');
185
+ } // Adapted from convert-source-map (MIT)
186
+
187
+
188
+ function toComment(sourceMap) {
189
+ // eslint-disable-next-line no-undef
190
+ var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
191
+ var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64);
192
+ return "/*# ".concat(data, " */");
193
+ }
194
+
195
+ /***/ }),
196
+
197
+ /***/ 289:
198
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
199
+
200
+ // style-loader: Adds some css to the DOM by adding a <style> tag
201
+
202
+ // load the styles
203
+ var content = __webpack_require__(364);
204
+ if(content.__esModule) content = content.default;
205
+ if(typeof content === 'string') content = [[module.id, content, '']];
206
+ if(content.locals) module.exports = content.locals;
207
+ // add the styles to the DOM
208
+ var add = (__webpack_require__(534)/* ["default"] */ .A)
209
+ var update = add("5af204ff", content, false, {});
210
+ // Hot Module Replacement
211
+ if(false) {}
212
+
213
+ /***/ }),
214
+
215
+ /***/ 353:
216
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
217
+
218
+ // style-loader: Adds some css to the DOM by adding a <style> tag
219
+
220
+ // load the styles
221
+ var content = __webpack_require__(120);
222
+ if(content.__esModule) content = content.default;
223
+ if(typeof content === 'string') content = [[module.id, content, '']];
224
+ if(content.locals) module.exports = content.locals;
225
+ // add the styles to the DOM
226
+ var add = (__webpack_require__(534)/* ["default"] */ .A)
227
+ var update = add("6d7a7200", content, false, {});
228
+ // Hot Module Replacement
229
+ if(false) {}
230
+
231
+ /***/ }),
232
+
233
+ /***/ 754:
234
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
235
+
236
+ // style-loader: Adds some css to the DOM by adding a <style> tag
237
+
238
+ // load the styles
239
+ var content = __webpack_require__(75);
240
+ if(content.__esModule) content = content.default;
241
+ if(typeof content === 'string') content = [[module.id, content, '']];
242
+ if(content.locals) module.exports = content.locals;
243
+ // add the styles to the DOM
244
+ var add = (__webpack_require__(534)/* ["default"] */ .A)
245
+ var update = add("7abbfe46", content, false, {});
246
+ // Hot Module Replacement
247
+ if(false) {}
248
+
249
+ /***/ }),
250
+
251
+ /***/ 735:
252
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
253
+
254
+ // style-loader: Adds some css to the DOM by adding a <style> tag
255
+
256
+ // load the styles
257
+ var content = __webpack_require__(844);
258
+ if(content.__esModule) content = content.default;
259
+ if(typeof content === 'string') content = [[module.id, content, '']];
260
+ if(content.locals) module.exports = content.locals;
261
+ // add the styles to the DOM
262
+ var add = (__webpack_require__(534)/* ["default"] */ .A)
263
+ var update = add("6131f4ea", content, false, {});
264
+ // Hot Module Replacement
265
+ if(false) {}
266
+
267
+ /***/ }),
268
+
269
+ /***/ 429:
270
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
271
+
272
+ // style-loader: Adds some css to the DOM by adding a <style> tag
273
+
274
+ // load the styles
275
+ var content = __webpack_require__(604);
276
+ if(content.__esModule) content = content.default;
277
+ if(typeof content === 'string') content = [[module.id, content, '']];
278
+ if(content.locals) module.exports = content.locals;
279
+ // add the styles to the DOM
280
+ var add = (__webpack_require__(534)/* ["default"] */ .A)
281
+ var update = add("1561d58a", content, false, {});
282
+ // Hot Module Replacement
283
+ if(false) {}
284
+
285
+ /***/ }),
286
+
287
+ /***/ 534:
288
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
289
+
290
+ "use strict";
291
+
292
+ // EXPORTS
293
+ __webpack_require__.d(__webpack_exports__, {
294
+ A: () => (/* binding */ addStylesClient)
295
+ });
296
+
297
+ ;// ./node_modules/vue-style-loader/lib/listToStyles.js
298
+ /**
299
+ * Translates the list format produced by css-loader into something
300
+ * easier to manipulate.
301
+ */
302
+ function listToStyles (parentId, list) {
303
+ var styles = []
304
+ var newStyles = {}
305
+ for (var i = 0; i < list.length; i++) {
306
+ var item = list[i]
307
+ var id = item[0]
308
+ var css = item[1]
309
+ var media = item[2]
310
+ var sourceMap = item[3]
311
+ var part = {
312
+ id: parentId + ':' + i,
313
+ css: css,
314
+ media: media,
315
+ sourceMap: sourceMap
316
+ }
317
+ if (!newStyles[id]) {
318
+ styles.push(newStyles[id] = { id: id, parts: [part] })
319
+ } else {
320
+ newStyles[id].parts.push(part)
321
+ }
322
+ }
323
+ return styles
324
+ }
325
+
326
+ ;// ./node_modules/vue-style-loader/lib/addStylesClient.js
327
+ /*
328
+ MIT License http://www.opensource.org/licenses/mit-license.php
329
+ Author Tobias Koppers @sokra
330
+ Modified by Evan You @yyx990803
331
+ */
332
+
333
+
334
+
335
+ var hasDocument = typeof document !== 'undefined'
336
+
337
+ if (typeof DEBUG !== 'undefined' && DEBUG) {
338
+ if (!hasDocument) {
339
+ throw new Error(
340
+ 'vue-style-loader cannot be used in a non-browser environment. ' +
341
+ "Use { target: 'node' } in your Webpack config to indicate a server-rendering environment."
342
+ ) }
343
+ }
344
+
345
+ /*
346
+ type StyleObject = {
347
+ id: number;
348
+ parts: Array<StyleObjectPart>
349
+ }
350
+
351
+ type StyleObjectPart = {
352
+ css: string;
353
+ media: string;
354
+ sourceMap: ?string
355
+ }
356
+ */
357
+
358
+ var stylesInDom = {/*
359
+ [id: number]: {
360
+ id: number,
361
+ refs: number,
362
+ parts: Array<(obj?: StyleObjectPart) => void>
363
+ }
364
+ */}
365
+
366
+ var head = hasDocument && (document.head || document.getElementsByTagName('head')[0])
367
+ var singletonElement = null
368
+ var singletonCounter = 0
369
+ var isProduction = false
370
+ var noop = function () {}
371
+ var options = null
372
+ var ssrIdKey = 'data-vue-ssr-id'
373
+
374
+ // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
375
+ // tags it will allow on a page
376
+ var isOldIE = typeof navigator !== 'undefined' && /msie [6-9]\b/.test(navigator.userAgent.toLowerCase())
377
+
378
+ function addStylesClient (parentId, list, _isProduction, _options) {
379
+ isProduction = _isProduction
380
+
381
+ options = _options || {}
382
+
383
+ var styles = listToStyles(parentId, list)
384
+ addStylesToDom(styles)
385
+
386
+ return function update (newList) {
387
+ var mayRemove = []
388
+ for (var i = 0; i < styles.length; i++) {
389
+ var item = styles[i]
390
+ var domStyle = stylesInDom[item.id]
391
+ domStyle.refs--
392
+ mayRemove.push(domStyle)
393
+ }
394
+ if (newList) {
395
+ styles = listToStyles(parentId, newList)
396
+ addStylesToDom(styles)
397
+ } else {
398
+ styles = []
399
+ }
400
+ for (var i = 0; i < mayRemove.length; i++) {
401
+ var domStyle = mayRemove[i]
402
+ if (domStyle.refs === 0) {
403
+ for (var j = 0; j < domStyle.parts.length; j++) {
404
+ domStyle.parts[j]()
405
+ }
406
+ delete stylesInDom[domStyle.id]
407
+ }
408
+ }
409
+ }
410
+ }
411
+
412
+ function addStylesToDom (styles /* Array<StyleObject> */) {
413
+ for (var i = 0; i < styles.length; i++) {
414
+ var item = styles[i]
415
+ var domStyle = stylesInDom[item.id]
416
+ if (domStyle) {
417
+ domStyle.refs++
418
+ for (var j = 0; j < domStyle.parts.length; j++) {
419
+ domStyle.parts[j](item.parts[j])
420
+ }
421
+ for (; j < item.parts.length; j++) {
422
+ domStyle.parts.push(addStyle(item.parts[j]))
423
+ }
424
+ if (domStyle.parts.length > item.parts.length) {
425
+ domStyle.parts.length = item.parts.length
426
+ }
427
+ } else {
428
+ var parts = []
429
+ for (var j = 0; j < item.parts.length; j++) {
430
+ parts.push(addStyle(item.parts[j]))
431
+ }
432
+ stylesInDom[item.id] = { id: item.id, refs: 1, parts: parts }
433
+ }
434
+ }
435
+ }
436
+
437
+ function createStyleElement () {
438
+ var styleElement = document.createElement('style')
439
+ styleElement.type = 'text/css'
440
+ head.appendChild(styleElement)
441
+ return styleElement
442
+ }
443
+
444
+ function addStyle (obj /* StyleObjectPart */) {
445
+ var update, remove
446
+ var styleElement = document.querySelector('style[' + ssrIdKey + '~="' + obj.id + '"]')
447
+
448
+ if (styleElement) {
449
+ if (isProduction) {
450
+ // has SSR styles and in production mode.
451
+ // simply do nothing.
452
+ return noop
453
+ } else {
454
+ // has SSR styles but in dev mode.
455
+ // for some reason Chrome can't handle source map in server-rendered
456
+ // style tags - source maps in <style> only works if the style tag is
457
+ // created and inserted dynamically. So we remove the server rendered
458
+ // styles and inject new ones.
459
+ styleElement.parentNode.removeChild(styleElement)
460
+ }
461
+ }
462
+
463
+ if (isOldIE) {
464
+ // use singleton mode for IE9.
465
+ var styleIndex = singletonCounter++
466
+ styleElement = singletonElement || (singletonElement = createStyleElement())
467
+ update = applyToSingletonTag.bind(null, styleElement, styleIndex, false)
468
+ remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true)
469
+ } else {
470
+ // use multi-style-tag mode in all other cases
471
+ styleElement = createStyleElement()
472
+ update = applyToTag.bind(null, styleElement)
473
+ remove = function () {
474
+ styleElement.parentNode.removeChild(styleElement)
475
+ }
476
+ }
477
+
478
+ update(obj)
479
+
480
+ return function updateStyle (newObj /* StyleObjectPart */) {
481
+ if (newObj) {
482
+ if (newObj.css === obj.css &&
483
+ newObj.media === obj.media &&
484
+ newObj.sourceMap === obj.sourceMap) {
485
+ return
486
+ }
487
+ update(obj = newObj)
488
+ } else {
489
+ remove()
490
+ }
491
+ }
492
+ }
493
+
494
+ var replaceText = (function () {
495
+ var textStore = []
496
+
497
+ return function (index, replacement) {
498
+ textStore[index] = replacement
499
+ return textStore.filter(Boolean).join('\n')
500
+ }
501
+ })()
502
+
503
+ function applyToSingletonTag (styleElement, index, remove, obj) {
504
+ var css = remove ? '' : obj.css
505
+
506
+ if (styleElement.styleSheet) {
507
+ styleElement.styleSheet.cssText = replaceText(index, css)
508
+ } else {
509
+ var cssNode = document.createTextNode(css)
510
+ var childNodes = styleElement.childNodes
511
+ if (childNodes[index]) styleElement.removeChild(childNodes[index])
512
+ if (childNodes.length) {
513
+ styleElement.insertBefore(cssNode, childNodes[index])
514
+ } else {
515
+ styleElement.appendChild(cssNode)
516
+ }
517
+ }
518
+ }
519
+
520
+ function applyToTag (styleElement, obj) {
521
+ var css = obj.css
522
+ var media = obj.media
523
+ var sourceMap = obj.sourceMap
524
+
525
+ if (media) {
526
+ styleElement.setAttribute('media', media)
527
+ }
528
+ if (options.ssrId) {
529
+ styleElement.setAttribute(ssrIdKey, obj.id)
530
+ }
531
+
532
+ if (sourceMap) {
533
+ // https://developer.chrome.com/devtools/docs/javascript-debugging
534
+ // this makes source maps inside style tags work properly in Chrome
535
+ css += '\n/*# sourceURL=' + sourceMap.sources[0] + ' */'
536
+ // http://stackoverflow.com/a/26603875
537
+ css += '\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + ' */'
538
+ }
539
+
540
+ if (styleElement.styleSheet) {
541
+ styleElement.styleSheet.cssText = css
542
+ } else {
543
+ while (styleElement.firstChild) {
544
+ styleElement.removeChild(styleElement.firstChild)
545
+ }
546
+ styleElement.appendChild(document.createTextNode(css))
547
+ }
548
+ }
549
+
550
+
551
+ /***/ }),
552
+
553
+ /***/ 724:
554
+ /***/ ((module) => {
555
+
556
+ "use strict";
557
+ module.exports = __WEBPACK_EXTERNAL_MODULE__724__;
558
+
559
+ /***/ }),
560
+
561
+ /***/ 380:
562
+ /***/ ((module) => {
563
+
564
+ "use strict";
565
+ module.exports = __WEBPACK_EXTERNAL_MODULE__380__;
566
+
567
+ /***/ })
568
+
569
+ /******/ });
570
+ /************************************************************************/
571
+ /******/ // The module cache
572
+ /******/ var __webpack_module_cache__ = {};
573
+ /******/
574
+ /******/ // The require function
575
+ /******/ function __webpack_require__(moduleId) {
576
+ /******/ // Check if module is in cache
577
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
578
+ /******/ if (cachedModule !== undefined) {
579
+ /******/ return cachedModule.exports;
580
+ /******/ }
581
+ /******/ // Create a new module (and put it into the cache)
582
+ /******/ var module = __webpack_module_cache__[moduleId] = {
583
+ /******/ id: moduleId,
584
+ /******/ // no module.loaded needed
585
+ /******/ exports: {}
586
+ /******/ };
587
+ /******/
588
+ /******/ // Execute the module function
589
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
590
+ /******/
591
+ /******/ // Return the exports of the module
592
+ /******/ return module.exports;
593
+ /******/ }
594
+ /******/
595
+ /************************************************************************/
596
+ /******/ /* webpack/runtime/compat get default export */
597
+ /******/ (() => {
598
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
599
+ /******/ __webpack_require__.n = (module) => {
600
+ /******/ var getter = module && module.__esModule ?
601
+ /******/ () => (module['default']) :
602
+ /******/ () => (module);
603
+ /******/ __webpack_require__.d(getter, { a: getter });
604
+ /******/ return getter;
605
+ /******/ };
606
+ /******/ })();
607
+ /******/
608
+ /******/ /* webpack/runtime/define property getters */
609
+ /******/ (() => {
610
+ /******/ // define getter functions for harmony exports
611
+ /******/ __webpack_require__.d = (exports, definition) => {
612
+ /******/ for(var key in definition) {
613
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
614
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
615
+ /******/ }
616
+ /******/ }
617
+ /******/ };
618
+ /******/ })();
619
+ /******/
620
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
621
+ /******/ (() => {
622
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
623
+ /******/ })();
624
+ /******/
625
+ /******/ /* webpack/runtime/make namespace object */
626
+ /******/ (() => {
627
+ /******/ // define __esModule on exports
628
+ /******/ __webpack_require__.r = (exports) => {
629
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
630
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
631
+ /******/ }
632
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
633
+ /******/ };
634
+ /******/ })();
635
+ /******/
636
+ /************************************************************************/
637
+ var __webpack_exports__ = {};
638
+ // This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
639
+ (() => {
640
+ "use strict";
641
+ // ESM COMPAT FLAG
642
+ __webpack_require__.r(__webpack_exports__);
643
+
644
+ // EXPORTS
645
+ __webpack_require__.d(__webpack_exports__, {
646
+ "default": () => (/* binding */ index_prod)
647
+ });
648
+
649
+ ;// ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
650
+ function _arrayLikeToArray(r, a) {
651
+ (null == a || a > r.length) && (a = r.length);
652
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
653
+ return n;
654
+ }
655
+
656
+ ;// ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
657
+
658
+ function _arrayWithoutHoles(r) {
659
+ if (Array.isArray(r)) return _arrayLikeToArray(r);
660
+ }
661
+
662
+ ;// ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
663
+ function _iterableToArray(r) {
664
+ if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
665
+ }
666
+
667
+ ;// ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
668
+
669
+ function _unsupportedIterableToArray(r, a) {
670
+ if (r) {
671
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
672
+ var t = {}.toString.call(r).slice(8, -1);
673
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
674
+ }
675
+ }
676
+
677
+ ;// ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
678
+ function _nonIterableSpread() {
679
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
680
+ }
681
+
682
+ ;// ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
683
+
684
+
685
+
686
+
687
+ function _toConsumableArray(r) {
688
+ return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
689
+ }
690
+
691
+ ;// ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
692
+ function _classCallCheck(a, n) {
693
+ if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
694
+ }
695
+
696
+ ;// ./node_modules/@babel/runtime/helpers/esm/typeof.js
697
+ function _typeof(o) {
698
+ "@babel/helpers - typeof";
699
+
700
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
701
+ return typeof o;
702
+ } : function (o) {
703
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
704
+ }, _typeof(o);
705
+ }
706
+
707
+ ;// ./node_modules/@babel/runtime/helpers/esm/toPrimitive.js
708
+
709
+ function toPrimitive(t, r) {
710
+ if ("object" != _typeof(t) || !t) return t;
711
+ var e = t[Symbol.toPrimitive];
712
+ if (void 0 !== e) {
713
+ var i = e.call(t, r || "default");
714
+ if ("object" != _typeof(i)) return i;
715
+ throw new TypeError("@@toPrimitive must return a primitive value.");
716
+ }
717
+ return ("string" === r ? String : Number)(t);
718
+ }
719
+
720
+ ;// ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
721
+
722
+
723
+ function toPropertyKey(t) {
724
+ var i = toPrimitive(t, "string");
725
+ return "symbol" == _typeof(i) ? i : i + "";
726
+ }
727
+
728
+ ;// ./node_modules/@babel/runtime/helpers/esm/createClass.js
729
+
730
+ function _defineProperties(e, r) {
731
+ for (var t = 0; t < r.length; t++) {
732
+ var o = r[t];
733
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);
734
+ }
735
+ }
736
+ function _createClass(e, r, t) {
737
+ return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
738
+ writable: !1
739
+ }), e;
740
+ }
741
+
742
+ ;// ./src/extensions/chart-link/shared.js
743
+
744
+
745
+ // Object shared beetween tvjs instances
746
+ var Shared = /*#__PURE__*/_createClass(function Shared() {
747
+ _classCallCheck(this, Shared);
748
+ this.__id__ = Math.random();
749
+ });
750
+ /* harmony default export */ const shared = (new Shared());
751
+ ;// ./src/extensions/chart-link/utils.js
752
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = utils_unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
753
+ function utils_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return utils_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? utils_arrayLikeToArray(r, a) : void 0; } }
754
+ function utils_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
755
+ /* harmony default export */ const utils = ({
756
+ copy: function copy(obj, mod) {
757
+ var copy = JSON.parse(JSON.stringify(obj));
758
+ return Object.assign(copy, mod);
759
+ },
760
+ removed: function removed(ids, prev) {
761
+ var list = [];
762
+ var _iterator = _createForOfIteratorHelper(prev),
763
+ _step;
764
+ try {
765
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
766
+ var id = _step.value;
767
+ if (!ids.includes(id)) {
768
+ list.push(id);
769
+ }
770
+ }
771
+ } catch (err) {
772
+ _iterator.e(err);
773
+ } finally {
774
+ _iterator.f();
775
+ }
776
+ return list;
777
+ }
778
+ });
779
+ ;// ./src/extensions/chart-link/main.js
780
+
781
+
782
+
783
+ function main_createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = main_unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
784
+ function main_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return main_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? main_arrayLikeToArray(r, a) : void 0; } }
785
+ function main_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
786
+ /* Example:
787
+
788
+ rules: {
789
+ '* -> *': {}, // From each to each
790
+ '*': { // The same as ^
791
+ cursor: true, // bool, 'X', 'Y', 'XY'
792
+ position: 'X', // bool, 'X', 'Y', 'XY'
793
+ tools: true
794
+ },
795
+ 'trading-vue-1 -> trading-vue-2': {
796
+ data: [
797
+ 'onchart.SMA',
798
+ 'RSI4H',
799
+ {
800
+ from: 'chart.data',
801
+ to: 'datasets',
802
+ obj: {
803
+ id: 'small-tf-data',
804
+ type: 'SourceData'
805
+ }
806
+ }
807
+ ]
808
+ },
809
+ 'none': {
810
+ range: 'X', // bool, 'X', 'Y', 'XY'
811
+ }
812
+ }
813
+ */
814
+
815
+
816
+
817
+ var Main = /*#__PURE__*/function () {
818
+ function Main(tv, dc, sett) {
819
+ _classCallCheck(this, Main);
820
+ if (sett.use_window) {
821
+ if (!window.xchartlink$) {
822
+ window.xchartlink$ = {};
823
+ }
824
+ this.shared = window.xchartlink$;
825
+ } else {
826
+ this.shared = shared;
827
+ }
828
+ this.tv = tv;
829
+ this.dc = dc;
830
+ this.sett = sett;
831
+ this.targets = {};
832
+ this.onsettings({
833
+ 'chart-link': sett
834
+ });
835
+ }
836
+ return _createClass(Main, [{
837
+ key: "onsettings",
838
+ value: function onsettings(all) {
839
+ var _this = this;
840
+ clearTimeout(this.reset_id);
841
+ this.sett = all['chart-link'];
842
+ if (!this.shared.rules) {
843
+ this.shared.rules = {};
844
+ this.shared.refs = {};
845
+ this.shared.meta = {};
846
+ }
847
+ var el = document.getElementById(this.tv.id);
848
+ if (this.sett.rules && el) {
849
+ this.shared.rules[this.tv.id] = this.sett.rules;
850
+ }
851
+ this.shared.refs[this.tv.id] = this.tv;
852
+ this.combine();
853
+ this.reset_id = setTimeout(function () {
854
+ return _this.reset();
855
+ });
856
+ }
857
+
858
+ // Combine rules from different instances
859
+ }, {
860
+ key: "combine",
861
+ value: function combine() {
862
+ this.shared.combined = {};
863
+ for (var id in this.shared.rules) {
864
+ for (var r in this.shared.rules[id]) {
865
+ this.shared.combined[r] = this.shared.rules[id][r];
866
+ }
867
+ }
868
+ }
869
+
870
+ // Compile rules for this instance
871
+ }, {
872
+ key: "compile",
873
+ value: function compile() {
874
+ var gebcn = 'getElementsByClassName';
875
+ var els = _toConsumableArray(document[gebcn]('trading-vue'));
876
+ this.targets = {};
877
+ var _iterator = main_createForOfIteratorHelper(els),
878
+ _step;
879
+ try {
880
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
881
+ var el = _step.value;
882
+ if (el.id === this.tv.id) continue;
883
+ this.targets[el.id] = {};
884
+ }
885
+ } catch (err) {
886
+ _iterator.e(err);
887
+ } finally {
888
+ _iterator.f();
889
+ }
890
+ var rules = this.rank(this.shared.combined);
891
+ var _iterator2 = main_createForOfIteratorHelper(rules),
892
+ _step2;
893
+ try {
894
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
895
+ var r = _step2.value;
896
+ var dst = r.pair[1];
897
+ if (dst === '*') {
898
+ dst = Object.keys(this.targets);
899
+ }
900
+ if (Array.isArray(dst)) {
901
+ var _iterator3 = main_createForOfIteratorHelper(dst),
902
+ _step3;
903
+ try {
904
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
905
+ var d = _step3.value;
906
+ if (!(d in this.targets)) continue;
907
+ Object.assign(this.targets[d], r.r);
908
+ }
909
+ } catch (err) {
910
+ _iterator3.e(err);
911
+ } finally {
912
+ _iterator3.f();
913
+ }
914
+ } else {
915
+ if (!(dst in this.targets)) continue;
916
+ Object.assign(this.targets[dst], r.r);
917
+ }
918
+ }
919
+ } catch (err) {
920
+ _iterator2.e(err);
921
+ } finally {
922
+ _iterator2.f();
923
+ }
924
+ }
925
+
926
+ // Select, rank & sort the rules
927
+ }, {
928
+ key: "rank",
929
+ value: function rank(rules) {
930
+ var out = [];
931
+ for (var r in rules) {
932
+ var pair = this.splitr(r);
933
+ if (!this.matches(pair[0])) continue;
934
+ if (pair[0] === '*') {
935
+ var rank = 20;
936
+ } else if (Array.isArray(pair[0])) {
937
+ rank = 10;
938
+ } else {
939
+ rank = 0;
940
+ }
941
+ if (pair[1] === '*') {
942
+ rank += 2;
943
+ } else if (Array.isArray(pair[1])) {
944
+ rank += 1;
945
+ } else {
946
+ rank += 0;
947
+ }
948
+ out.push({
949
+ pair: pair,
950
+ rank: rank,
951
+ r: rules[r]
952
+ });
953
+ }
954
+ return out.sort(function (a, b) {
955
+ return b.rank - a.rank;
956
+ });
957
+ }
958
+
959
+ // Check if the source of a rule matches tv.id
960
+ }, {
961
+ key: "matches",
962
+ value: function matches(src) {
963
+ return src === '*' || src === this.tv.id || Array.isArray(src) && src.includes(this.tv.id);
964
+ }
965
+ }, {
966
+ key: "splitr",
967
+ value: function splitr(rule) {
968
+ if (rule.trim() === '*') return ['*', '*'];
969
+ return rule.split('->').map(function (x) {
970
+ var tup = x.split(',');
971
+ if (tup.length > 1) {
972
+ return tup.map(function (y) {
973
+ return y.trim();
974
+ });
975
+ }
976
+ return x.trim();
977
+ });
978
+ }
979
+
980
+ // Apply all rules for this instance
981
+ }, {
982
+ key: "reset",
983
+ value: function reset() {
984
+ var _this2 = this;
985
+ this.compile();
986
+
987
+ // Enable some chart hook events
988
+ this.tv.$refs.chart.hooks('xchanged');
989
+ this.tv.$watch(function (x) {
990
+ return _this2.dc.get('.').filter(function (x) {
991
+ return x.settings.$state;
992
+ });
993
+ }, this.ontools.bind(this));
994
+ }
995
+
996
+ // Listening to the Chart.vue hooks &
997
+ // other events
998
+ }, {
999
+ key: "update",
1000
+ value: function update(e) {
1001
+ switch (e.event) {
1002
+ case '?x-changed':
1003
+ var cursor = e.args[0];
1004
+ if (cursor.preventDefault) return;
1005
+ var main = this.tv.$refs.chart._layout.grids[cursor.grid_id];
1006
+ var mc = this.tv.$refs.chart.cursor;
1007
+ cursor.t = mc.t;
1008
+ cursor.$ = mc.y$;
1009
+ for (var id in this.targets) {
1010
+ var r = this.targets[id].cursor;
1011
+ if (r) {
1012
+ var tv = this.shared.refs[id];
1013
+ var g = tv.$refs.chart._layout.grids[0];
1014
+ var xx = this.isX(r);
1015
+ var yy = g.id === main.id && this.isY(r);
1016
+ var upd = {
1017
+ preventDefault: true,
1018
+ x: xx ? g.t2screen(cursor.t) : -10,
1019
+ y: yy ? g.$2screen(cursor.$) : -10,
1020
+ grid_id: 0
1021
+ };
1022
+ tv.$refs.chart.cursor_changed(upd);
1023
+ tv.$refs.chart.cursor.t = xx ? cursor.t : -10;
1024
+ tv.$refs.chart.cursor.y$ = yy ? cursor.$ : -10;
1025
+ }
1026
+ }
1027
+ break;
1028
+ case 'range-changed':
1029
+ var now = new Date().getTime();
1030
+ var meta = this.shared.meta[this.tv.id];
1031
+ if (meta && meta.position) {
1032
+ if (meta.position.lock > now) return;
1033
+ }
1034
+ var range = e.args[0];
1035
+ for (var id in this.targets) {
1036
+ var _r = this.targets[id].position;
1037
+ var _tv = this.shared.refs[id];
1038
+ var _xx = this.isX(_r);
1039
+ var _yy = this.isY(_r);
1040
+ if (!this.shared.meta[id]) {
1041
+ this.shared.meta[id] = {};
1042
+ }
1043
+ // Prevents an infinite loop
1044
+ this.shared.meta[id].position = {
1045
+ lock: now + 100
1046
+ };
1047
+ if (_xx) _tv["goto"](range[1]);
1048
+ }
1049
+ break;
1050
+ }
1051
+ }
1052
+ }, {
1053
+ key: "ontools",
1054
+ value: function ontools(n, p) {
1055
+ var _this3 = this;
1056
+ var rem = utils.removed(n.map(function (x) {
1057
+ return x.settings.$uuid;
1058
+ }), p.map(function (x) {
1059
+ return x.settings.$uuid;
1060
+ }));
1061
+ var now = new Date().getTime();
1062
+ var meta = this.shared.meta[this.tv.id];
1063
+ if (meta && meta.tools) {
1064
+ if (meta.tools.lock > now) return;
1065
+ }
1066
+ var _loop = function _loop() {
1067
+ var r = _this3.targets[id].tools;
1068
+ var tv = _this3.shared.refs[id];
1069
+ if (r) {
1070
+ if (!_this3.shared.meta[id]) {
1071
+ _this3.shared.meta[id] = {};
1072
+ }
1073
+ // Prevents an infinite loop
1074
+ _this3.shared.meta[id].tools = {
1075
+ lock: now + 100
1076
+ };
1077
+ _this3.copy_tools(n, tv);
1078
+ rem.forEach(function (r) {
1079
+ return tv.data.del("".concat(r));
1080
+ });
1081
+ }
1082
+ };
1083
+ for (var id in this.targets) {
1084
+ _loop();
1085
+ }
1086
+ }
1087
+ }, {
1088
+ key: "copy_tools",
1089
+ value: function copy_tools(n, tv) {
1090
+ var _iterator4 = main_createForOfIteratorHelper(n),
1091
+ _step4;
1092
+ try {
1093
+ for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
1094
+ var tool = _step4.value;
1095
+ if (tool.id.includes('offchart')) continue;
1096
+ var uuid = tool.settings.$uuid;
1097
+ var exi = tv.data.get_one("".concat(uuid));
1098
+ if (exi) {
1099
+ tv.$set(exi, 'settings', utils.copy(tool.settings, {
1100
+ $selected: false,
1101
+ $state: 'finished'
1102
+ }));
1103
+ // TODO: maybe add a proper method
1104
+ // of accessing overlays
1105
+ var ovs = tv.$refs.chart.$refs.sec[0].$refs.grid.$children.filter(function (x) {
1106
+ return x.tool;
1107
+ });
1108
+ var _iterator5 = main_createForOfIteratorHelper(ovs),
1109
+ _step5;
1110
+ try {
1111
+ for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
1112
+ var ov = _step5.value;
1113
+ ov.pins.forEach(function (x) {
1114
+ return x.re_init();
1115
+ });
1116
+ }
1117
+ } catch (err) {
1118
+ _iterator5.e(err);
1119
+ } finally {
1120
+ _iterator5.f();
1121
+ }
1122
+ } else {
1123
+ var copy = utils.copy(tool);
1124
+ copy.settings.$selected = false;
1125
+ copy.settings.$state = 'finished';
1126
+ tv.data.add('onchart', copy);
1127
+ }
1128
+ }
1129
+ } catch (err) {
1130
+ _iterator4.e(err);
1131
+ } finally {
1132
+ _iterator4.f();
1133
+ }
1134
+ }
1135
+ }, {
1136
+ key: "isX",
1137
+ value: function isX(rule) {
1138
+ return rule === true || typeof rule === 'string' && rule.includes('X');
1139
+ }
1140
+ }, {
1141
+ key: "isY",
1142
+ value: function isY(rule) {
1143
+ return rule === true || typeof rule === 'string' && rule.includes('Y');
1144
+ }
1145
+ }]);
1146
+ }();
1147
+
1148
+ ;// ./build/chart-link/chart-link.js
1149
+ // -------- Production extension index ---------
1150
+ // ! THIS FILE WAS AUTO-GENERATED !
1151
+ //
1152
+ // Do not commit this file, the final index is
1153
+ // compiled by the repo owner, use index_dev.js to
1154
+ // experiment: 'npm run compile'
1155
+
1156
+
1157
+ Main.__name__ = 'chart-link';
1158
+ var widgets = {};
1159
+ var components = {};
1160
+ var overlays = {};
1161
+ var colorpacks = {};
1162
+ var skins = {};
1163
+ var Pack = {
1164
+ widgets: widgets,
1165
+ components: components,
1166
+ overlays: overlays,
1167
+ colorpacks: colorpacks,
1168
+ skins: skins,
1169
+ Main: Main
1170
+ };
1171
+ /* harmony default export */ const chart_link = (Pack);
1172
+
1173
+ // EXTERNAL MODULE: external "trading-vue-js"
1174
+ var external_trading_vue_js_ = __webpack_require__(724);
1175
+ // EXTERNAL MODULE: external "vue"
1176
+ var external_vue_ = __webpack_require__(380);
1177
+ var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
1178
+ ;// ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/extensions/grid-resize/Splitter.vue?vue&type=template&id=868dc3e2&scoped=true
1179
+ var render = function render() {
1180
+ var _vm = this,
1181
+ _c = _vm._self._c;
1182
+ return _c("span", {
1183
+ staticClass: "h-splitter",
1184
+ style: _vm.hs_style,
1185
+ on: {
1186
+ mousedown: _vm.hs_mousedown
1187
+ }
1188
+ });
1189
+ };
1190
+ var staticRenderFns = [];
1191
+ render._withStripped = true;
1192
+
1193
+ ;// ./src/extensions/grid-resize/Splitter.vue?vue&type=template&id=868dc3e2&scoped=true
1194
+
1195
+ ;// ./src/extensions/grid-resize/utils.js
1196
+ /* harmony default export */ const grid_resize_utils = ({
1197
+ add_style: function add_style(id, style) {
1198
+ var stbr = document.getElementById(id);
1199
+ if (stbr) {
1200
+ var sheetParent = stbr.parentNode;
1201
+ sheetParent.removeChild(stbr);
1202
+ }
1203
+ var sheet = document.createElement('style');
1204
+ sheet.setAttribute("id", id);
1205
+ sheet.innerHTML = style;
1206
+ document.body.appendChild(sheet);
1207
+ },
1208
+ rem_style: function rem_style(id, style) {
1209
+ var stbr = document.getElementById(id);
1210
+ if (stbr) {
1211
+ var sheetParent = stbr.parentNode;
1212
+ sheetParent.removeChild(stbr);
1213
+ }
1214
+ }
1215
+ });
1216
+ ;// ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/extensions/grid-resize/Splitter.vue?vue&type=script&lang=js
1217
+
1218
+ /* harmony default export */ const Splittervue_type_script_lang_js = ({
1219
+ name: 'Splitter',
1220
+ props: ['id', 'main', 'dc', 'tv', 'data'],
1221
+ mounted: function mounted() {
1222
+ this.MIN_HEIGHT = this.data.sett.min_height || 20;
1223
+ },
1224
+ methods: {
1225
+ hs_mousedown: function hs_mousedown(e) {
1226
+ this.drag = {
1227
+ type: 'hs',
1228
+ y: e.clientY,
1229
+ h1: this.data.grid1.height,
1230
+ h2: this.data.grid2.height
1231
+ };
1232
+ grid_resize_utils.add_style('disable-user-select', "body * {\n user-select: none;\n }\n .trading-vue-chart {\n pointer-events: none;\n }");
1233
+ },
1234
+ hs_mouseup: function hs_mouseup(e) {
1235
+ this.drag = null;
1236
+ grid_resize_utils.rem_style('disable-user-select');
1237
+ },
1238
+ hs_mousemove: function hs_mousemove(e) {
1239
+ if (this.drag) {
1240
+ var off = e.clientY - this.drag.y;
1241
+ var new_h1 = this.drag.h1 + off;
1242
+ var new_h2 = this.drag.h2 - off;
1243
+ if (new_h1 > this.MIN_HEIGHT && new_h2 > this.MIN_HEIGHT) {
1244
+ this.data.grid1.height = new_h1;
1245
+ this.data.grid2.height = new_h2;
1246
+ }
1247
+ this.main.calc_heights();
1248
+ }
1249
+ },
1250
+ hs_mouseleave: function hs_mouseleave(e) {
1251
+ this.drag = null;
1252
+ grid_resize_utils.rem_style('disable-user-select');
1253
+ }
1254
+ },
1255
+ computed: {
1256
+ hs_style: function hs_style() {
1257
+ return {
1258
+ drag: null,
1259
+ top: this.data.grid2.offset + 'px'
1260
+ //backgroundColor: this.colors.splitter
1261
+ };
1262
+ }
1263
+ }
1264
+ });
1265
+ ;// ./src/extensions/grid-resize/Splitter.vue?vue&type=script&lang=js
1266
+ /* harmony default export */ const grid_resize_Splittervue_type_script_lang_js = (Splittervue_type_script_lang_js);
1267
+ // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/extensions/grid-resize/Splitter.vue?vue&type=style&index=0&id=868dc3e2&prod&scoped=true&lang=css
1268
+ var Splittervue_type_style_index_0_id_868dc3e2_prod_scoped_true_lang_css = __webpack_require__(754);
1269
+ ;// ./src/extensions/grid-resize/Splitter.vue?vue&type=style&index=0&id=868dc3e2&prod&scoped=true&lang=css
1270
+
1271
+ ;// ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
1272
+ /* globals __VUE_SSR_CONTEXT__ */
1273
+
1274
+ // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
1275
+ // This module is a runtime utility for cleaner component module output and will
1276
+ // be included in the final webpack user bundle.
1277
+
1278
+ function normalizeComponent(
1279
+ scriptExports,
1280
+ render,
1281
+ staticRenderFns,
1282
+ functionalTemplate,
1283
+ injectStyles,
1284
+ scopeId,
1285
+ moduleIdentifier /* server only */,
1286
+ shadowMode /* vue-cli only */
1287
+ ) {
1288
+ // Vue.extend constructor export interop
1289
+ var options =
1290
+ typeof scriptExports === 'function' ? scriptExports.options : scriptExports
1291
+
1292
+ // render functions
1293
+ if (render) {
1294
+ options.render = render
1295
+ options.staticRenderFns = staticRenderFns
1296
+ options._compiled = true
1297
+ }
1298
+
1299
+ // functional template
1300
+ if (functionalTemplate) {
1301
+ options.functional = true
1302
+ }
1303
+
1304
+ // scopedId
1305
+ if (scopeId) {
1306
+ options._scopeId = 'data-v-' + scopeId
1307
+ }
1308
+
1309
+ var hook
1310
+ if (moduleIdentifier) {
1311
+ // server build
1312
+ hook = function (context) {
1313
+ // 2.3 injection
1314
+ context =
1315
+ context || // cached call
1316
+ (this.$vnode && this.$vnode.ssrContext) || // stateful
1317
+ (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
1318
+ // 2.2 with runInNewContext: true
1319
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
1320
+ context = __VUE_SSR_CONTEXT__
1321
+ }
1322
+ // inject component styles
1323
+ if (injectStyles) {
1324
+ injectStyles.call(this, context)
1325
+ }
1326
+ // register component module identifier for async chunk inferrence
1327
+ if (context && context._registeredComponents) {
1328
+ context._registeredComponents.add(moduleIdentifier)
1329
+ }
1330
+ }
1331
+ // used by ssr in case component is cached and beforeCreate
1332
+ // never gets called
1333
+ options._ssrRegister = hook
1334
+ } else if (injectStyles) {
1335
+ hook = shadowMode
1336
+ ? function () {
1337
+ injectStyles.call(
1338
+ this,
1339
+ (options.functional ? this.parent : this).$root.$options.shadowRoot
1340
+ )
1341
+ }
1342
+ : injectStyles
1343
+ }
1344
+
1345
+ if (hook) {
1346
+ if (options.functional) {
1347
+ // for template-only hot-reload because in that case the render fn doesn't
1348
+ // go through the normalizer
1349
+ options._injectStyles = hook
1350
+ // register for functional component in vue file
1351
+ var originalRender = options.render
1352
+ options.render = function renderWithStyleInjection(h, context) {
1353
+ hook.call(context)
1354
+ return originalRender(h, context)
1355
+ }
1356
+ } else {
1357
+ // inject component registration as beforeCreate hook
1358
+ var existing = options.beforeCreate
1359
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
1360
+ }
1361
+ }
1362
+
1363
+ return {
1364
+ exports: scriptExports,
1365
+ options: options
1366
+ }
1367
+ }
1368
+
1369
+ ;// ./src/extensions/grid-resize/Splitter.vue
1370
+
1371
+
1372
+
1373
+ ;
1374
+
1375
+
1376
+ /* normalize component */
1377
+
1378
+ var component = normalizeComponent(
1379
+ grid_resize_Splittervue_type_script_lang_js,
1380
+ render,
1381
+ staticRenderFns,
1382
+ false,
1383
+ null,
1384
+ "868dc3e2",
1385
+ null
1386
+
1387
+ )
1388
+
1389
+ /* harmony default export */ const Splitter = (component.exports);
1390
+ ;// ./src/extensions/grid-resize/main.js
1391
+
1392
+
1393
+ function grid_resize_main_createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = grid_resize_main_unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
1394
+ function grid_resize_main_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return grid_resize_main_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? grid_resize_main_arrayLikeToArray(r, a) : void 0; } }
1395
+ function grid_resize_main_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
1396
+ // Extension's controller
1397
+
1398
+
1399
+
1400
+
1401
+ var main_Main = /*#__PURE__*/function () {
1402
+ function Main(tv, dc, sett) {
1403
+ var _this = this;
1404
+ _classCallCheck(this, Main);
1405
+ this.widgets = {};
1406
+ this.tv = tv;
1407
+ this.dc = dc;
1408
+ this.sett = sett;
1409
+ setTimeout(function () {
1410
+ _this.tv.$el.addEventListener('mousemove', _this.onmousemove.bind(_this));
1411
+ _this.tv.$el.addEventListener('mouseup', _this.onmouseup.bind(_this));
1412
+ _this.tv.$el.addEventListener('mouseleave', _this.onmouseleave.bind(_this));
1413
+ _this.place_splitters();
1414
+ _this.calc_heights();
1415
+
1416
+ // Track changes of grids count
1417
+ _this.tv.$watch(function (x) {
1418
+ return _this.dc.get('.').map(function (x) {
1419
+ return x.id;
1420
+ });
1421
+ }, _this.ongrids.bind(_this));
1422
+ });
1423
+ }
1424
+
1425
+ // Listens to all tvjs events, creates new widgets
1426
+ return _createClass(Main, [{
1427
+ key: "update",
1428
+ value: function update(e) {
1429
+ switch (e.event) {}
1430
+ }
1431
+
1432
+ // Extension settings has changed
1433
+ }, {
1434
+ key: "onsettings",
1435
+ value: function onsettings(sett) {}
1436
+ }, {
1437
+ key: "ongrids",
1438
+ value: function ongrids() {
1439
+ var _this2 = this;
1440
+ setTimeout(function () {
1441
+ _this2.remove_widgets();
1442
+ _this2.place_splitters();
1443
+ });
1444
+ }
1445
+ }, {
1446
+ key: "onmousemove",
1447
+ value: function onmousemove(e) {
1448
+ var _this3 = this;
1449
+ // List of widgets created by this controller
1450
+ var list = this.tv.$refs.widgets.$children.filter(function (x) {
1451
+ return x.main === _this3;
1452
+ });
1453
+ var _iterator = grid_resize_main_createForOfIteratorHelper(list),
1454
+ _step;
1455
+ try {
1456
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
1457
+ var s = _step.value;
1458
+ s.hs_mousemove(e);
1459
+ }
1460
+ } catch (err) {
1461
+ _iterator.e(err);
1462
+ } finally {
1463
+ _iterator.f();
1464
+ }
1465
+ }
1466
+ }, {
1467
+ key: "onmouseup",
1468
+ value: function onmouseup(e) {
1469
+ var _this4 = this;
1470
+ // List of widgets created by this controller
1471
+ var list = this.tv.$refs.widgets.$children.filter(function (x) {
1472
+ return x.main === _this4;
1473
+ });
1474
+ var _iterator2 = grid_resize_main_createForOfIteratorHelper(list),
1475
+ _step2;
1476
+ try {
1477
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
1478
+ var s = _step2.value;
1479
+ s.hs_mouseup(e);
1480
+ }
1481
+ } catch (err) {
1482
+ _iterator2.e(err);
1483
+ } finally {
1484
+ _iterator2.f();
1485
+ }
1486
+ }
1487
+ }, {
1488
+ key: "onmouseleave",
1489
+ value: function onmouseleave(e) {
1490
+ var _this5 = this;
1491
+ // List of widgets created by this controller
1492
+ var list = this.tv.$refs.widgets.$children.filter(function (x) {
1493
+ return x.main === _this5;
1494
+ });
1495
+ var _iterator3 = grid_resize_main_createForOfIteratorHelper(list),
1496
+ _step3;
1497
+ try {
1498
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
1499
+ var s = _step3.value;
1500
+ s.hs_mouseleave(e);
1501
+ }
1502
+ } catch (err) {
1503
+ _iterator3.e(err);
1504
+ } finally {
1505
+ _iterator3.f();
1506
+ }
1507
+ }
1508
+ }, {
1509
+ key: "place_splitters",
1510
+ value: function place_splitters() {
1511
+ var grids = this.tv.$refs.chart._layout.grids;
1512
+ for (var i = 1; i < grids.length; i++) {
1513
+ var g1 = grids[i - 1];
1514
+ var g2 = grids[i];
1515
+ var id = "Splitter-".concat(g1.id, "-").concat(g2.id, "-").concat(external_trading_vue_js_.Utils.uuid2());
1516
+ external_vue_default().set(this.widgets, id, {
1517
+ id: id,
1518
+ cls: Splitter,
1519
+ data: {
1520
+ grid1: g1,
1521
+ grid2: g2,
1522
+ sett: this.sett
1523
+ }
1524
+ });
1525
+ }
1526
+ }
1527
+ }, {
1528
+ key: "calc_heights",
1529
+ value: function calc_heights() {
1530
+ var hs = [];
1531
+ var _iterator4 = grid_resize_main_createForOfIteratorHelper(this.tv.$refs.chart._layout.grids),
1532
+ _step4;
1533
+ try {
1534
+ for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
1535
+ var g = _step4.value;
1536
+ hs.push(g.height);
1537
+ }
1538
+ } catch (err) {
1539
+ _iterator4.e(err);
1540
+ } finally {
1541
+ _iterator4.f();
1542
+ }
1543
+ var sum = hs.reduce(function (a, b) {
1544
+ return a + b;
1545
+ }, 0);
1546
+ hs = hs.map(function (h) {
1547
+ return h / sum;
1548
+ });
1549
+ this.grid_ovs().forEach(function (ov, i) {
1550
+ if (!ov.grid) {
1551
+ external_vue_default().set(ov, 'grid', {});
1552
+ }
1553
+ external_vue_default().set(ov.grid, 'height', hs[i] || 1);
1554
+ });
1555
+ }
1556
+
1557
+ // Grid defining overlays
1558
+ }, {
1559
+ key: "grid_ovs",
1560
+ value: function grid_ovs() {
1561
+ var list = [this.dc.data.chart];
1562
+ var _iterator5 = grid_resize_main_createForOfIteratorHelper(this.dc.data.offchart),
1563
+ _step5;
1564
+ try {
1565
+ for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
1566
+ var ov = _step5.value;
1567
+ if (!ov.grid || ov.grid.id === undefined) {
1568
+ list.push(ov);
1569
+ }
1570
+ }
1571
+ } catch (err) {
1572
+ _iterator5.e(err);
1573
+ } finally {
1574
+ _iterator5.f();
1575
+ }
1576
+ return list;
1577
+ }
1578
+ }, {
1579
+ key: "remove_widgets",
1580
+ value: function remove_widgets() {
1581
+ for (var id in this.widgets) {
1582
+ this.tv.$delete(this.widgets, id);
1583
+ }
1584
+ }
1585
+ }, {
1586
+ key: "destroy",
1587
+ value: function destroy() {
1588
+ this.tv.$el.removeEventListener('mousemove', this.onmousemove);
1589
+ this.tv.$el.removeEventListener('mouseup', this.mouseup);
1590
+ this.tv.$el.removeEventListener('mouseleave', this.mouseleave);
1591
+ }
1592
+ }]);
1593
+ }();
1594
+
1595
+ ;// ./build/grid-resize/grid-resize.js
1596
+ // -------- Production extension index ---------
1597
+ // ! THIS FILE WAS AUTO-GENERATED !
1598
+ //
1599
+ // Do not commit this file, the final index is
1600
+ // compiled by the repo owner, use index_dev.js to
1601
+ // experiment: 'npm run compile'
1602
+
1603
+
1604
+ main_Main.__name__ = 'grid-resize';
1605
+ var grid_resize_widgets = {};
1606
+ var grid_resize_components = {};
1607
+ var grid_resize_overlays = {};
1608
+ var grid_resize_colorpacks = {};
1609
+ var grid_resize_skins = {};
1610
+ var grid_resize_Pack = {
1611
+ widgets: grid_resize_widgets,
1612
+ components: grid_resize_components,
1613
+ overlays: grid_resize_overlays,
1614
+ colorpacks: grid_resize_colorpacks,
1615
+ skins: grid_resize_skins,
1616
+ Main: main_Main
1617
+ };
1618
+ /* harmony default export */ const grid_resize = (grid_resize_Pack);
1619
+
1620
+ ;// ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/extensions/legend-buttons/AddWin.vue?vue&type=template&id=2ed555ae&scoped=true
1621
+ var AddWinvue_type_template_id_2ed555ae_scoped_true_render = function render() {
1622
+ var _vm = this,
1623
+ _c = _vm._self._c;
1624
+ return _c("window", {
1625
+ staticClass: "add-win",
1626
+ attrs: {
1627
+ title: "Add Overlay",
1628
+ tv: _vm.tv
1629
+ },
1630
+ on: {
1631
+ close: _vm.on_close
1632
+ }
1633
+ }, [_c("div", {
1634
+ staticClass: "add-win-list"
1635
+ }, _vm._l(_vm.ovs, function (ov) {
1636
+ return _c("div", {
1637
+ staticClass: "add-win-item",
1638
+ on: {
1639
+ click: function click($event) {
1640
+ return _vm.on_click(ov.name);
1641
+ }
1642
+ }
1643
+ }, [_c("span", [_vm._v(_vm._s(ov.name))]), _vm._v(" "), _c("span", {
1644
+ staticClass: "add-win-item-desc"
1645
+ }, [_vm._v("\n " + _vm._s(ov.methods.meta_info().desc) + "\n ")])]);
1646
+ }), 0)]);
1647
+ };
1648
+ var AddWinvue_type_template_id_2ed555ae_scoped_true_staticRenderFns = [];
1649
+ AddWinvue_type_template_id_2ed555ae_scoped_true_render._withStripped = true;
1650
+
1651
+ ;// ./src/extensions/legend-buttons/AddWin.vue?vue&type=template&id=2ed555ae&scoped=true
1652
+
1653
+ ;// ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/components/Window.vue?vue&type=template&id=75d5e1c0
1654
+ var Windowvue_type_template_id_75d5e1c0_render = function render() {
1655
+ var _vm = this,
1656
+ _c = _vm._self._c;
1657
+ return _c("div", {
1658
+ ref: "win",
1659
+ staticClass: "tvjs-x-window",
1660
+ style: _vm.style
1661
+ }, [_c("div", {
1662
+ staticClass: "tvjs-x-window-head"
1663
+ }, [_c("div", {
1664
+ staticClass: "tvjs-x-window-title",
1665
+ on: {
1666
+ mousedown: _vm.onMouseDown
1667
+ }
1668
+ }, [_vm._v("\n " + _vm._s(_vm.title) + "\n ")]), _vm._v(" "), _c("div", {
1669
+ staticClass: "tvjs-x-window-close",
1670
+ on: {
1671
+ click: function click($event) {
1672
+ return _vm.$emit("close");
1673
+ }
1674
+ }
1675
+ }, [_vm._v("\n ╳\n ")])]), _vm._v(" "), _c("div", {
1676
+ staticClass: "tvjs-x-window-body"
1677
+ }, [_vm._t("default")], 2)]);
1678
+ };
1679
+ var Windowvue_type_template_id_75d5e1c0_staticRenderFns = [];
1680
+ Windowvue_type_template_id_75d5e1c0_render._withStripped = true;
1681
+
1682
+ ;// ./src/components/Window.vue?vue&type=template&id=75d5e1c0
1683
+
1684
+ ;// ./src/components/dragg.js
1685
+ /* harmony default export */ const dragg = ({
1686
+ methods: {
1687
+ onMouseDown: function onMouseDown(e) {
1688
+ e = e || window.event;
1689
+ e.preventDefault();
1690
+ this.drag.offset_x = e.clientX - this.x;
1691
+ this.drag.offset_y = e.clientY - this.y;
1692
+ document.onmouseup = this.stopdrag;
1693
+ document.onmousemove = this.ondrag;
1694
+ },
1695
+ ondrag: function ondrag(e) {
1696
+ e = e || window.event;
1697
+ e.preventDefault();
1698
+ this.x = e.clientX - this.drag.offset_x;
1699
+ this.y = e.clientY - this.drag.offset_y;
1700
+ },
1701
+ stopdrag: function stopdrag() {
1702
+ document.onmouseup = null;
1703
+ document.onmousemove = null;
1704
+ }
1705
+ },
1706
+ data: function data() {
1707
+ return {
1708
+ drag: {
1709
+ offset_x: 0,
1710
+ offset_y: 0
1711
+ }
1712
+ };
1713
+ }
1714
+ });
1715
+ ;// ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/components/Window.vue?vue&type=script&lang=js
1716
+
1717
+ /* harmony default export */ const Windowvue_type_script_lang_js = ({
1718
+ name: 'Window',
1719
+ mixins: [dragg],
1720
+ props: ['title', 'tv'],
1721
+ mounted: function mounted() {
1722
+ this.ww = this.$refs.win.clientWidth;
1723
+ this.wh = this.$refs.win.clientHeight;
1724
+ this.x = this.tvw * 0.5 - this.ww * 0.5;
1725
+ this.y = this.tvh * 0.5 - this.wh * 0.5;
1726
+ },
1727
+ computed: {
1728
+ style: function style() {
1729
+ return {
1730
+ top: "".concat(this.y, "px"),
1731
+ left: "".concat(this.x, "px")
1732
+ };
1733
+ },
1734
+ tvw: function tvw() {
1735
+ return this.$props.tv.width;
1736
+ },
1737
+ tvh: function tvh() {
1738
+ return this.$props.tv.height;
1739
+ }
1740
+ },
1741
+ data: function data() {
1742
+ return {
1743
+ ww: 0,
1744
+ wh: 0,
1745
+ x: 0,
1746
+ y: 0
1747
+ };
1748
+ }
1749
+ });
1750
+ ;// ./src/components/Window.vue?vue&type=script&lang=js
1751
+ /* harmony default export */ const components_Windowvue_type_script_lang_js = (Windowvue_type_script_lang_js);
1752
+ // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/components/Window.vue?vue&type=style&index=0&id=75d5e1c0&prod&lang=css
1753
+ var Windowvue_type_style_index_0_id_75d5e1c0_prod_lang_css = __webpack_require__(353);
1754
+ ;// ./src/components/Window.vue?vue&type=style&index=0&id=75d5e1c0&prod&lang=css
1755
+
1756
+ ;// ./src/components/Window.vue
1757
+
1758
+
1759
+
1760
+ ;
1761
+
1762
+
1763
+ /* normalize component */
1764
+
1765
+ var Window_component = normalizeComponent(
1766
+ components_Windowvue_type_script_lang_js,
1767
+ Windowvue_type_template_id_75d5e1c0_render,
1768
+ Windowvue_type_template_id_75d5e1c0_staticRenderFns,
1769
+ false,
1770
+ null,
1771
+ null,
1772
+ null
1773
+
1774
+ )
1775
+
1776
+ /* harmony default export */ const Window = (Window_component.exports);
1777
+ ;// ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/extensions/legend-buttons/AddWin.vue?vue&type=script&lang=js
1778
+
1779
+ /* harmony default export */ const AddWinvue_type_script_lang_js = ({
1780
+ name: 'AddWin',
1781
+ props: ['id', 'main', 'dc', 'tv', 'data'],
1782
+ components: {
1783
+ Window: Window
1784
+ },
1785
+ mounted: function mounted() {},
1786
+ methods: {
1787
+ on_close: function on_close() {
1788
+ this.$props.main.remove_widget(this.$props.id);
1789
+ },
1790
+ on_click: function on_click(name) {
1791
+ this.on_close();
1792
+ this.main.add_overlay({
1793
+ side: this.data.type,
1794
+ index: this.data.index,
1795
+ type: name
1796
+ });
1797
+ }
1798
+ },
1799
+ computed: {
1800
+ sett: function sett() {
1801
+ return this.$props.data.ov.settings;
1802
+ }
1803
+ },
1804
+ data: function data() {
1805
+ return {
1806
+ ovs: this.tv.overlays.filter(function (x) {
1807
+ return x.methods.calc;
1808
+ })
1809
+ };
1810
+ }
1811
+ });
1812
+ ;// ./src/extensions/legend-buttons/AddWin.vue?vue&type=script&lang=js
1813
+ /* harmony default export */ const legend_buttons_AddWinvue_type_script_lang_js = (AddWinvue_type_script_lang_js);
1814
+ // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/extensions/legend-buttons/AddWin.vue?vue&type=style&index=0&id=2ed555ae&prod&scoped=true&lang=css
1815
+ var AddWinvue_type_style_index_0_id_2ed555ae_prod_scoped_true_lang_css = __webpack_require__(735);
1816
+ ;// ./src/extensions/legend-buttons/AddWin.vue?vue&type=style&index=0&id=2ed555ae&prod&scoped=true&lang=css
1817
+
1818
+ ;// ./src/extensions/legend-buttons/AddWin.vue
1819
+
1820
+
1821
+
1822
+ ;
1823
+
1824
+
1825
+ /* normalize component */
1826
+
1827
+ var AddWin_component = normalizeComponent(
1828
+ legend_buttons_AddWinvue_type_script_lang_js,
1829
+ AddWinvue_type_template_id_2ed555ae_scoped_true_render,
1830
+ AddWinvue_type_template_id_2ed555ae_scoped_true_staticRenderFns,
1831
+ false,
1832
+ null,
1833
+ "2ed555ae",
1834
+ null
1835
+
1836
+ )
1837
+
1838
+ /* harmony default export */ const AddWin = (AddWin_component.exports);
1839
+ ;// ./src/extensions/legend-buttons/main.js
1840
+
1841
+
1842
+ function legend_buttons_main_createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = legend_buttons_main_unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
1843
+ function legend_buttons_main_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return legend_buttons_main_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? legend_buttons_main_arrayLikeToArray(r, a) : void 0; } }
1844
+ function legend_buttons_main_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
1845
+ // Extension's controller
1846
+
1847
+
1848
+
1849
+
1850
+ var legend_buttons_main_Main = /*#__PURE__*/function () {
1851
+ function Main(tv, dc, sett) {
1852
+ _classCallCheck(this, Main);
1853
+ console.log(dc, "usydfufgysdguydsguy");
1854
+ this.widgets = {};
1855
+ this.tv = tv;
1856
+ this.dc = dc;
1857
+ this.sett = sett;
1858
+ }
1859
+
1860
+ // Listens to all tvjs events, creates new widgets
1861
+ return _createClass(Main, [{
1862
+ key: "update",
1863
+ value: function update(e) {
1864
+ switch (e.event) {
1865
+ case "legend-button-click":
1866
+ this.onbutton(e.args[0]);
1867
+ break;
1868
+ }
1869
+ }
1870
+ }, {
1871
+ key: "onbutton",
1872
+ value: function onbutton(e) {
1873
+ var ov = this.dc.get(e.type)[e.dataIndex];
1874
+ var onchart = this.dc.data.onchart;
1875
+ var offchart = this.dc.data.offchart;
1876
+ console.log(e.button);
1877
+ if (!ov) return;
1878
+ switch (e.button) {
1879
+ case "display":
1880
+ if (ov.settings.display === undefined) {
1881
+ var flag = false;
1882
+ } else {
1883
+ flag = !ov.settings.display;
1884
+ }
1885
+ this.tv.$set(ov.settings, "display", flag);
1886
+ break;
1887
+ case "up":
1888
+ if (e.type === "offchart") {
1889
+ if (e.dataIndex === 0) {
1890
+ offchart.splice(e.dataIndex, 1);
1891
+ onchart.push(ov);
1892
+ } else {
1893
+ var data = offchart;
1894
+ var i0 = e.dataIndex;
1895
+ var i1 = e.dataIndex - 1;
1896
+ data[i0] = data.splice(i1, 1, data[i0])[0];
1897
+ }
1898
+ }
1899
+ this.dc.update_ids();
1900
+ break;
1901
+ case "down":
1902
+ if (e.type === "onchart") {
1903
+ var h = this.avg_grid_h(offchart);
1904
+ onchart.splice(e.dataIndex, 1);
1905
+ offchart.unshift(ov);
1906
+ this.tv.$set(ov, "grid", {
1907
+ height: h
1908
+ });
1909
+ } else {
1910
+ var n = offchart.length;
1911
+ var _data = offchart;
1912
+ if (e.dataIndex < n - 1) {
1913
+ var _i = e.dataIndex;
1914
+ var _i2 = e.dataIndex + 1;
1915
+ _data[_i] = _data.splice(_i2, 1, _data[_i])[0];
1916
+ }
1917
+ }
1918
+ this.dc.update_ids();
1919
+ break;
1920
+ case "add":
1921
+ try {
1922
+ var id = "AddWin-".concat(external_trading_vue_js_.Utils.uuid2());
1923
+ var _ov = this.dc.data[e.type][e.dataIndex];
1924
+ var f = Object.values(this.widgets).find(function (x) {
1925
+ return x.data.ov === _ov;
1926
+ });
1927
+ console.log(" ov data", _ov);
1928
+ if (f) {
1929
+ this.tv.$delete(this.widgets, f.id);
1930
+ break;
1931
+ }
1932
+ this.tv.$set(this.widgets, id, {
1933
+ id: id,
1934
+ cls: AddWin,
1935
+ data: {
1936
+ ov: _ov,
1937
+ type: e.type,
1938
+ index: e.dataIndex
1939
+ }
1940
+ });
1941
+ } catch (e) {
1942
+ console.log(e);
1943
+ }
1944
+ break;
1945
+ case "remove":
1946
+ this.dc.data[e.type].splice(e.dataIndex, 1);
1947
+ this.dc.update_ids();
1948
+ break;
1949
+ }
1950
+ }
1951
+
1952
+ // Called from AddWin.vue
1953
+ }, {
1954
+ key: "add_overlay",
1955
+ value: function add_overlay(e) {
1956
+ var preset = this.get_preset(e.type) || {};
1957
+ if (preset.side) e.side = preset.side;
1958
+ var onchart = this.dc.data.onchart;
1959
+ var offchart = this.dc.data.offchart;
1960
+ if (e.side === "onchart") {
1961
+ onchart.splice(e.index + 1, 0, {
1962
+ name: preset.name,
1963
+ type: e.type,
1964
+ data: [],
1965
+ settings: preset.settings || {}
1966
+ });
1967
+ } else {
1968
+ var h = this.avg_grid_h(offchart);
1969
+ offchart.splice(e.index + 1, 0, {
1970
+ name: preset.name,
1971
+ type: e.type,
1972
+ data: [],
1973
+ settings: preset.settings || {},
1974
+ grid: {
1975
+ height: h
1976
+ }
1977
+ });
1978
+ }
1979
+ this.dc.update_ids();
1980
+ }
1981
+
1982
+ // Get preset (default settings, colors) if defined
1983
+ }, {
1984
+ key: "get_preset",
1985
+ value: function get_preset(type) {
1986
+ var proto = this.tv.overlays.find(function (x) {
1987
+ return x.name === type;
1988
+ });
1989
+ if (proto && proto.methods.meta_info) {
1990
+ var meta = proto.methods.meta_info();
1991
+ return meta.preset;
1992
+ }
1993
+ }
1994
+
1995
+ // Extension settings has changed
1996
+ }, {
1997
+ key: "onsettings",
1998
+ value: function onsettings(sett) {}
1999
+ }, {
2000
+ key: "avg_grid_h",
2001
+ value: function avg_grid_h(ovs) {
2002
+ if (!ovs.length) return 0.25;
2003
+ var gh = 0;
2004
+ var _iterator = legend_buttons_main_createForOfIteratorHelper(ovs),
2005
+ _step;
2006
+ try {
2007
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
2008
+ var ov = _step.value;
2009
+ if (ov.grid && typeof ov.grid.height === "number") {
2010
+ gh += ov.grid.height;
2011
+ }
2012
+ }
2013
+ } catch (err) {
2014
+ _iterator.e(err);
2015
+ } finally {
2016
+ _iterator.f();
2017
+ }
2018
+ return gh / ovs.length;
2019
+ }
2020
+ }, {
2021
+ key: "remove_widget",
2022
+ value: function remove_widget(id) {
2023
+ this.tv.$delete(this.widgets, id);
2024
+ }
2025
+ }, {
2026
+ key: "destroy",
2027
+ value: function destroy() {}
2028
+ }]);
2029
+ }();
2030
+
2031
+ ;// ./build/legend-buttons/legend-buttons.js
2032
+ // -------- Production extension index ---------
2033
+ // ! THIS FILE WAS AUTO-GENERATED !
2034
+ //
2035
+ // Do not commit this file, the final index is
2036
+ // compiled by the repo owner, use index_dev.js to
2037
+ // experiment: 'npm run compile'
2038
+
2039
+
2040
+ legend_buttons_main_Main.__name__ = 'legend-buttons';
2041
+ var legend_buttons_widgets = {};
2042
+ var legend_buttons_components = {};
2043
+ var legend_buttons_overlays = {};
2044
+ var legend_buttons_colorpacks = {};
2045
+ var legend_buttons_skins = {};
2046
+ var legend_buttons_Pack = {
2047
+ widgets: legend_buttons_widgets,
2048
+ components: legend_buttons_components,
2049
+ overlays: legend_buttons_overlays,
2050
+ colorpacks: legend_buttons_colorpacks,
2051
+ skins: legend_buttons_skins,
2052
+ Main: legend_buttons_main_Main
2053
+ };
2054
+ /* harmony default export */ const legend_buttons = (legend_buttons_Pack);
2055
+
2056
+ ;// ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/extensions/settings-win/SettingsWin.vue?vue&type=template&id=182fbb4f&scoped=true
2057
+ var SettingsWinvue_type_template_id_182fbb4f_scoped_true_render = function render() {
2058
+ var _vm = this,
2059
+ _c = _vm._self._c;
2060
+ return _c("window", {
2061
+ staticClass: "sett-win",
2062
+ attrs: {
2063
+ title: _vm.data.ov.name,
2064
+ tv: _vm.tv
2065
+ },
2066
+ on: {
2067
+ close: _vm.on_close
2068
+ }
2069
+ }, [_vm._l(_vm.settlist, function (k) {
2070
+ return _c("div", {
2071
+ staticClass: "sett-win-item"
2072
+ }, [_c("label", [_vm._v(_vm._s(_vm.s2d(k)))]), _vm._v(" "), _c("std-input", {
2073
+ attrs: {
2074
+ value: _vm.sett[k]
2075
+ },
2076
+ on: {
2077
+ input: function input($event) {
2078
+ return _vm.update_sett(k, $event);
2079
+ }
2080
+ }
2081
+ })], 1);
2082
+ }), _vm._v(" "), !_vm.settlist.length ? _c("span", {
2083
+ staticClass: "sett-win-empty"
2084
+ }, [_c("i", [_vm._v("No script settings")])]) : _vm._e()], 2);
2085
+ };
2086
+ var SettingsWinvue_type_template_id_182fbb4f_scoped_true_staticRenderFns = [];
2087
+ SettingsWinvue_type_template_id_182fbb4f_scoped_true_render._withStripped = true;
2088
+
2089
+ ;// ./src/extensions/settings-win/SettingsWin.vue?vue&type=template&id=182fbb4f&scoped=true
2090
+
2091
+ ;// ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
2092
+
2093
+ function _defineProperty(e, r, t) {
2094
+ return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
2095
+ value: t,
2096
+ enumerable: !0,
2097
+ configurable: !0,
2098
+ writable: !0
2099
+ }) : e[r] = t, e;
2100
+ }
2101
+
2102
+ ;// ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/components/StdInput.vue?vue&type=template&id=2bcd91db
2103
+ var StdInputvue_type_template_id_2bcd91db_render = function render() {
2104
+ var _vm = this,
2105
+ _c = _vm._self._c;
2106
+ return _c("span", [_vm.type === "text" || !_vm.type ? _c("input", {
2107
+ staticClass: "tvjs-std-input",
2108
+ style: _vm.style,
2109
+ attrs: {
2110
+ placeholder: _vm.name
2111
+ },
2112
+ domProps: {
2113
+ value: _vm.value
2114
+ },
2115
+ on: {
2116
+ change: function change($event) {
2117
+ return _vm.$emit("change", $event.target.value);
2118
+ },
2119
+ input: function input($event) {
2120
+ return _vm.$emit("input", $event.target.value);
2121
+ }
2122
+ }
2123
+ }) : _vm.type === "select" ? _c("select", {
2124
+ staticClass: "tvjs-std-input",
2125
+ style: _vm.style,
2126
+ domProps: {
2127
+ value: _vm.value
2128
+ },
2129
+ on: {
2130
+ input: function input($event) {
2131
+ return _vm.$emit("input", $event.target.value);
2132
+ }
2133
+ }
2134
+ }, _vm._l(_vm.list, function (opt) {
2135
+ return _c("option", [_vm._v(_vm._s(opt))]);
2136
+ }), 0) : _vm._e()]);
2137
+ };
2138
+ var StdInputvue_type_template_id_2bcd91db_staticRenderFns = [];
2139
+ StdInputvue_type_template_id_2bcd91db_render._withStripped = true;
2140
+
2141
+ ;// ./src/components/StdInput.vue?vue&type=template&id=2bcd91db
2142
+
2143
+ ;// ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/components/StdInput.vue?vue&type=script&lang=js
2144
+ /* harmony default export */ const StdInputvue_type_script_lang_js = ({
2145
+ name: "StdInput",
2146
+ props: ["value", "name", "type", "list", "colors"],
2147
+ methods: {},
2148
+ computed: {
2149
+ style: function style() {
2150
+ return {
2151
+ //background: this.$props.colors.back,
2152
+ //color: this.$props.colors.text
2153
+ };
2154
+ }
2155
+ },
2156
+ data: function data() {
2157
+ return {};
2158
+ }
2159
+ });
2160
+ ;// ./src/components/StdInput.vue?vue&type=script&lang=js
2161
+ /* harmony default export */ const components_StdInputvue_type_script_lang_js = (StdInputvue_type_script_lang_js);
2162
+ // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/components/StdInput.vue?vue&type=style&index=0&id=2bcd91db&prod&lang=css
2163
+ var StdInputvue_type_style_index_0_id_2bcd91db_prod_lang_css = __webpack_require__(289);
2164
+ ;// ./src/components/StdInput.vue?vue&type=style&index=0&id=2bcd91db&prod&lang=css
2165
+
2166
+ ;// ./src/components/StdInput.vue
2167
+
2168
+
2169
+
2170
+ ;
2171
+
2172
+
2173
+ /* normalize component */
2174
+
2175
+ var StdInput_component = normalizeComponent(
2176
+ components_StdInputvue_type_script_lang_js,
2177
+ StdInputvue_type_template_id_2bcd91db_render,
2178
+ StdInputvue_type_template_id_2bcd91db_staticRenderFns,
2179
+ false,
2180
+ null,
2181
+ null,
2182
+ null
2183
+
2184
+ )
2185
+
2186
+ /* harmony default export */ const StdInput = (StdInput_component.exports);
2187
+ ;// ./src/extensions/settings-win/utils.js
2188
+ /* harmony default export */ const settings_win_utils = ({
2189
+ sett2desc: function sett2desc(sett) {
2190
+ function setCharAt(str, index, chr) {
2191
+ if (index > str.length - 1) return str;
2192
+ return str.substring(0, index) + chr + str.substring(index + 1);
2193
+ }
2194
+ sett = sett.replace(/([^A-Z])([A-Z])/g, '$1 $2');
2195
+ sett = sett.replace(/-|_/g, ' ');
2196
+ var tuple = sett.split(' ');
2197
+ tuple = tuple.filter(function (x) {
2198
+ return x.length;
2199
+ }).map(function (x) {
2200
+ return setCharAt(x, 0, x[0].toUpperCase());
2201
+ });
2202
+ return tuple.join(' ');
2203
+ }
2204
+ });
2205
+ ;// ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/extensions/settings-win/SettingsWin.vue?vue&type=script&lang=js
2206
+
2207
+
2208
+
2209
+
2210
+ /* harmony default export */ const SettingsWinvue_type_script_lang_js = ({
2211
+ name: 'SettingsWin',
2212
+ props: ['id', 'main', 'dc', 'tv', 'data'],
2213
+ components: {
2214
+ Window: Window,
2215
+ StdInput: StdInput
2216
+ },
2217
+ mounted: function mounted() {},
2218
+ methods: {
2219
+ s2d: function s2d(str) {
2220
+ return settings_win_utils.sett2desc(str);
2221
+ },
2222
+ on_close: function on_close() {
2223
+ this.$props.main.remove_widget(this.$props.id);
2224
+ },
2225
+ update_sett: function update_sett(k, val) {
2226
+ var dcid = this.$props.data.ov.id;
2227
+ var valN = parseFloat(val);
2228
+ if (valN !== valN) valN = val;
2229
+ this.$props.dc.merge("".concat(dcid, ".settings"), _defineProperty({}, k, valN));
2230
+ }
2231
+ },
2232
+ computed: {
2233
+ sett: function sett() {
2234
+ return this.$props.data.ov.settings;
2235
+ },
2236
+ settlist: function settlist() {
2237
+ var _this = this;
2238
+ return Object.keys(this.sett).filter(function (x) {
2239
+ return x[0] !== '$' && _this.sett.$props && _this.sett.$props.includes(x);
2240
+ });
2241
+ }
2242
+ }
2243
+ });
2244
+ ;// ./src/extensions/settings-win/SettingsWin.vue?vue&type=script&lang=js
2245
+ /* harmony default export */ const settings_win_SettingsWinvue_type_script_lang_js = (SettingsWinvue_type_script_lang_js);
2246
+ // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/extensions/settings-win/SettingsWin.vue?vue&type=style&index=0&id=182fbb4f&prod&scoped=true&lang=css
2247
+ var SettingsWinvue_type_style_index_0_id_182fbb4f_prod_scoped_true_lang_css = __webpack_require__(429);
2248
+ ;// ./src/extensions/settings-win/SettingsWin.vue?vue&type=style&index=0&id=182fbb4f&prod&scoped=true&lang=css
2249
+
2250
+ ;// ./src/extensions/settings-win/SettingsWin.vue
2251
+
2252
+
2253
+
2254
+ ;
2255
+
2256
+
2257
+ /* normalize component */
2258
+
2259
+ var SettingsWin_component = normalizeComponent(
2260
+ settings_win_SettingsWinvue_type_script_lang_js,
2261
+ SettingsWinvue_type_template_id_182fbb4f_scoped_true_render,
2262
+ SettingsWinvue_type_template_id_182fbb4f_scoped_true_staticRenderFns,
2263
+ false,
2264
+ null,
2265
+ "182fbb4f",
2266
+ null
2267
+
2268
+ )
2269
+
2270
+ /* harmony default export */ const SettingsWin = (SettingsWin_component.exports);
2271
+ ;// ./src/extensions/settings-win/main.js
2272
+
2273
+
2274
+
2275
+
2276
+ var settings_win_main_Main = /*#__PURE__*/function () {
2277
+ function Main(tv, dc) {
2278
+ _classCallCheck(this, Main);
2279
+ this.widgets = {};
2280
+ this.tv = tv;
2281
+ this.dc = dc;
2282
+ }
2283
+ return _createClass(Main, [{
2284
+ key: "update",
2285
+ value: function update(e) {
2286
+ switch (e.event) {
2287
+ case "legend-button-click":
2288
+ var id = "SettingsWin-".concat(external_trading_vue_js_.Utils.uuid2());
2289
+ var args = e.args[0];
2290
+ if (args.button !== "settings") break;
2291
+ try {
2292
+ var ov = this.dc.data[args.type][args.dataIndex];
2293
+ var f = Object.values(this.widgets).find(function (x) {
2294
+ return x.data.ov === ov;
2295
+ });
2296
+ if (f) {
2297
+ this.tv.$delete(this.widgets, f.id);
2298
+ break;
2299
+ }
2300
+ this.tv.$set(this.widgets, id, {
2301
+ id: id,
2302
+ cls: SettingsWin,
2303
+ data: {
2304
+ ov: ov
2305
+ }
2306
+ });
2307
+ } catch (e) {
2308
+ console.log(e);
2309
+ }
2310
+ break;
2311
+ }
2312
+ }
2313
+ }, {
2314
+ key: "remove_widget",
2315
+ value: function remove_widget(id) {
2316
+ this.tv.$delete(this.widgets, id);
2317
+ }
2318
+ }]);
2319
+ }();
2320
+
2321
+ ;// ./build/settings-win/settings-win.js
2322
+ // -------- Production extension index ---------
2323
+ // ! THIS FILE WAS AUTO-GENERATED !
2324
+ //
2325
+ // Do not commit this file, the final index is
2326
+ // compiled by the repo owner, use index_dev.js to
2327
+ // experiment: 'npm run compile'
2328
+
2329
+
2330
+
2331
+ settings_win_main_Main.__name__ = 'settings-win';
2332
+ var settings_win_widgets = {
2333
+ SettingsWin: SettingsWin
2334
+ };
2335
+ var settings_win_components = {};
2336
+ var settings_win_overlays = {};
2337
+ var settings_win_colorpacks = {};
2338
+ var settings_win_skins = {};
2339
+ var settings_win_Pack = {
2340
+ widgets: settings_win_widgets,
2341
+ SettingsWin: SettingsWin,
2342
+ components: settings_win_components,
2343
+ overlays: settings_win_overlays,
2344
+ colorpacks: settings_win_colorpacks,
2345
+ skins: settings_win_skins,
2346
+ Main: settings_win_main_Main
2347
+ };
2348
+ /* harmony default export */ const settings_win = (settings_win_Pack);
2349
+
2350
+ ;// ./src/index_prod.js
2351
+ // -------- Production extension index ---------
2352
+ // ! THIS FILE WAS AUTO-GENERATED !
2353
+ //
2354
+ // Do not commit this file, the final index is
2355
+ // compiled by the repo owner, use index_dev.js to
2356
+ // experiment: 'npm run compile'
2357
+
2358
+
2359
+
2360
+
2361
+
2362
+ var index_prod_Pack = {
2363
+ 'chart-link': chart_link,
2364
+ 'grid-resize': grid_resize,
2365
+ 'legend-buttons': legend_buttons,
2366
+ 'settings-win': settings_win
2367
+ };
2368
+ /* harmony default export */ const index_prod = (index_prod_Pack);
2369
+
2370
+ })();
2371
+
2372
+ /******/ return __webpack_exports__;
2373
+ /******/ })()
2374
+ ;
2375
+ });