gwchq-textjam 0.2.24 → 0.2.26

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/index.js CHANGED
@@ -68206,7 +68206,7 @@ __webpack_require__.d(__webpack_exports__, {
68206
68206
  });
68207
68207
 
68208
68208
  ;// ./src/assets/editor/pyodide/shims/pygal.js?url
68209
- const pygalurl_namespaceObject = __webpack_require__.p + "assets/pygalef3b78a56cb1d66beb61.js";
68209
+ const pygalurl_namespaceObject = __webpack_require__.p + "assets/pygalc0b4f32d2d2cc5a0c638.js";
68210
68210
  ;// ./src/assets/editor/pyodide/packages/turtle-0.0.1-py3-none-any.whl?url
68211
68211
  const turtle_0_0_1_py3_none_anyurl_namespaceObject = __webpack_require__.p + "assets/turtle-0.0.1-py3-none-any0c3147a3e0c3188b2544.whl";
68212
68212
  ;// ./src/assets/editor/pyodide/packages/p5-0.0.1-py3-none-any.whl?url
@@ -68344,8 +68344,8 @@ __webpack_require__.r(__webpack_exports__);
68344
68344
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
68345
68345
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
68346
68346
  /* harmony export */ });
68347
- /* harmony import */ var D_gwc2_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(89379);
68348
- /* harmony import */ var D_gwc2_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(53986);
68347
+ /* harmony import */ var _Users_hanna_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(89379);
68348
+ /* harmony import */ var _Users_hanna_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(53986);
68349
68349
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51649);
68350
68350
  /* harmony import */ var _hello_pangea_dnd__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(98850);
68351
68351
  /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(14062);
@@ -68369,7 +68369,7 @@ var DraggableTab = _ref => {
68369
68369
  panelIndex,
68370
68370
  fileIndex
68371
68371
  } = _ref,
68372
- otherProps = (0,D_gwc2_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)(_ref, _excluded);
68372
+ otherProps = (0,_Users_hanna_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)(_ref, _excluded);
68373
68373
  var openFiles = (0,react_redux__WEBPACK_IMPORTED_MODULE_1__.useSelector)(state => state.editor.openedFiles);
68374
68374
  var openFilesCount = openFiles[panelIndex].length;
68375
68375
  var dispatch = (0,react_redux__WEBPACK_IMPORTED_MODULE_1__.useDispatch)();
@@ -68386,7 +68386,7 @@ var DraggableTab = _ref => {
68386
68386
  switchToFileTab(panelIndex, (fileIndex + openFilesCount - 1) % openFilesCount);
68387
68387
  }
68388
68388
  };
68389
- var InnerTab = () => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(react_tabs__WEBPACK_IMPORTED_MODULE_2__.Tab, (0,D_gwc2_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)((0,D_gwc2_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)({
68389
+ var InnerTab = () => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(react_tabs__WEBPACK_IMPORTED_MODULE_2__.Tab, (0,_Users_hanna_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)((0,_Users_hanna_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)({
68390
68390
  onClick: e => {
68391
68391
  e.stopPropagation();
68392
68392
  switchToFileTab(panelIndex, fileIndex);
@@ -68404,7 +68404,7 @@ var DraggableTab = _ref => {
68404
68404
  draggableProps,
68405
68405
  dragHandleProps
68406
68406
  } = _ref2;
68407
- return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", (0,D_gwc2_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)((0,D_gwc2_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)((0,D_gwc2_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)({
68407
+ return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", (0,_Users_hanna_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)((0,_Users_hanna_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)((0,_Users_hanna_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)({
68408
68408
  className: "draggable-tab",
68409
68409
  ref: innerRef
68410
68410
  }, draggableProps), dragHandleProps), {}, {
@@ -68426,8 +68426,8 @@ __webpack_require__.r(__webpack_exports__);
68426
68426
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
68427
68427
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
68428
68428
  /* harmony export */ });
68429
- /* harmony import */ var D_gwc2_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(89379);
68430
- /* harmony import */ var D_gwc2_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(53986);
68429
+ /* harmony import */ var _Users_hanna_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(89379);
68430
+ /* harmony import */ var _Users_hanna_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(53986);
68431
68431
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51649);
68432
68432
  /* harmony import */ var _hello_pangea_dnd__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(98850);
68433
68433
  /* harmony import */ var react_tabs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39243);
@@ -68446,8 +68446,8 @@ var DroppableTabList = _ref => {
68446
68446
  children: _children,
68447
68447
  index
68448
68448
  } = _ref,
68449
- otherProps = (0,D_gwc2_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(_ref, _excluded);
68450
- return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(react_tabs__WEBPACK_IMPORTED_MODULE_1__.TabList, (0,D_gwc2_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)((0,D_gwc2_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)({}, otherProps), {}, {
68449
+ otherProps = (0,_Users_hanna_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(_ref, _excluded);
68450
+ return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(react_tabs__WEBPACK_IMPORTED_MODULE_1__.TabList, (0,_Users_hanna_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)((0,_Users_hanna_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)({}, otherProps), {}, {
68451
68451
  children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_hello_pangea_dnd__WEBPACK_IMPORTED_MODULE_6__.Droppable, {
68452
68452
  direction: "horizontal",
68453
68453
  droppableId: index.toString(),
@@ -68457,7 +68457,7 @@ var DroppableTabList = _ref => {
68457
68457
  droppableProps,
68458
68458
  placeholder
68459
68459
  } = _ref2;
68460
- return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div", (0,D_gwc2_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)((0,D_gwc2_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)({
68460
+ return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div", (0,_Users_hanna_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)((0,_Users_hanna_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)({
68461
68461
  className: "droppable-tab-list"
68462
68462
  }, droppableProps), {}, {
68463
68463
  ref: innerRef,
@@ -102218,8 +102218,8 @@ __webpack_require__.r(__webpack_exports__);
102218
102218
 
102219
102219
 
102220
102220
  // TODO: refactor existing modals
102221
- /** !deprecated!
102222
- * use BaseModal from `index.tsx` instead
102221
+ /** !deprecated!
102222
+ * use BaseModal from `index.tsx` instead
102223
102223
  */
102224
102224
 
102225
102225
  var BaseModal = _ref => {
@@ -103011,7 +103011,7 @@ __webpack_require__.r(__webpack_exports__);
103011
103011
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
103012
103012
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
103013
103013
  /* harmony export */ });
103014
- /* harmony import */ var D_gwc2_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(89379);
103014
+ /* harmony import */ var _Users_hanna_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(89379);
103015
103015
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51649);
103016
103016
  /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(14062);
103017
103017
  /* harmony import */ var _redux_EditorSlice__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(68512);
@@ -103125,7 +103125,7 @@ var ProjectName = _ref => {
103125
103125
  id: "project_name_label",
103126
103126
  className: _styles_module_scss__WEBPACK_IMPORTED_MODULE_3__["default"].projectLabel,
103127
103127
  children: "Project Name"
103128
- }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", (0,D_gwc2_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)((0,D_gwc2_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)({
103128
+ }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", (0,_Users_hanna_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)((0,_Users_hanna_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)({
103129
103129
  className: classnames__WEBPACK_IMPORTED_MODULE_2___default()(_styles_module_scss__WEBPACK_IMPORTED_MODULE_3__["default"].projectName, className)
103130
103130
  }, hoverProps), {}, {
103131
103131
  children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)((components_Tooltip_Tooltip__WEBPACK_IMPORTED_MODULE_8___default()), {
@@ -116715,6 +116715,115 @@ function escapeName(str, charsToEscape) {
116715
116715
 
116716
116716
 
116717
116717
 
116718
+ /***/ }),
116719
+
116720
+ /***/ 16450:
116721
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
116722
+
116723
+
116724
+
116725
+ var isValue = __webpack_require__(48175)
116726
+ , ensureValue = __webpack_require__(34809)
116727
+ , ensurePlainFunction = __webpack_require__(90251)
116728
+ , copy = __webpack_require__(30203)
116729
+ , normalizeOptions = __webpack_require__(90148)
116730
+ , map = __webpack_require__(30498);
116731
+
116732
+ var bind = Function.prototype.bind
116733
+ , defineProperty = Object.defineProperty
116734
+ , hasOwnProperty = Object.prototype.hasOwnProperty
116735
+ , define;
116736
+
116737
+ define = function (name, desc, options) {
116738
+ var value = ensureValue(desc) && ensurePlainFunction(desc.value), dgs;
116739
+ dgs = copy(desc);
116740
+ delete dgs.writable;
116741
+ delete dgs.value;
116742
+ dgs.get = function () {
116743
+ if (!options.overwriteDefinition && hasOwnProperty.call(this, name)) return value;
116744
+ desc.value = bind.call(value, options.resolveContext ? options.resolveContext(this) : this);
116745
+ defineProperty(this, name, desc);
116746
+ return this[name];
116747
+ };
116748
+ return dgs;
116749
+ };
116750
+
116751
+ module.exports = function (props/*, options*/) {
116752
+ var options = normalizeOptions(arguments[1]);
116753
+ if (isValue(options.resolveContext)) ensurePlainFunction(options.resolveContext);
116754
+ return map(props, function (desc, name) { return define(name, desc, options); });
116755
+ };
116756
+
116757
+
116758
+ /***/ }),
116759
+
116760
+ /***/ 58263:
116761
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
116762
+
116763
+
116764
+
116765
+ var isValue = __webpack_require__(48175)
116766
+ , isPlainFunction = __webpack_require__(6873)
116767
+ , assign = __webpack_require__(16596)
116768
+ , normalizeOpts = __webpack_require__(90148)
116769
+ , contains = __webpack_require__(70214);
116770
+
116771
+ var d = (module.exports = function (dscr, value/*, options*/) {
116772
+ var c, e, w, options, desc;
116773
+ if (arguments.length < 2 || typeof dscr !== "string") {
116774
+ options = value;
116775
+ value = dscr;
116776
+ dscr = null;
116777
+ } else {
116778
+ options = arguments[2];
116779
+ }
116780
+ if (isValue(dscr)) {
116781
+ c = contains.call(dscr, "c");
116782
+ e = contains.call(dscr, "e");
116783
+ w = contains.call(dscr, "w");
116784
+ } else {
116785
+ c = w = true;
116786
+ e = false;
116787
+ }
116788
+
116789
+ desc = { value: value, configurable: c, enumerable: e, writable: w };
116790
+ return !options ? desc : assign(normalizeOpts(options), desc);
116791
+ });
116792
+
116793
+ d.gs = function (dscr, get, set/*, options*/) {
116794
+ var c, e, options, desc;
116795
+ if (typeof dscr !== "string") {
116796
+ options = set;
116797
+ set = get;
116798
+ get = dscr;
116799
+ dscr = null;
116800
+ } else {
116801
+ options = arguments[3];
116802
+ }
116803
+ if (!isValue(get)) {
116804
+ get = undefined;
116805
+ } else if (!isPlainFunction(get)) {
116806
+ options = get;
116807
+ get = set = undefined;
116808
+ } else if (!isValue(set)) {
116809
+ set = undefined;
116810
+ } else if (!isPlainFunction(set)) {
116811
+ options = set;
116812
+ set = undefined;
116813
+ }
116814
+ if (isValue(dscr)) {
116815
+ c = contains.call(dscr, "c");
116816
+ e = contains.call(dscr, "e");
116817
+ } else {
116818
+ c = true;
116819
+ e = false;
116820
+ }
116821
+
116822
+ desc = { get: get, set: set, configurable: c, enumerable: e };
116823
+ return !options ? desc : assign(normalizeOpts(options), desc);
116824
+ };
116825
+
116826
+
116718
116827
  /***/ }),
116719
116828
 
116720
116829
  /***/ 83999:
@@ -131543,115 +131652,6 @@ year.every = function(k) {
131543
131652
  var years = year.range;
131544
131653
 
131545
131654
 
131546
- /***/ }),
131547
-
131548
- /***/ 16450:
131549
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
131550
-
131551
-
131552
-
131553
- var isValue = __webpack_require__(48175)
131554
- , ensureValue = __webpack_require__(34809)
131555
- , ensurePlainFunction = __webpack_require__(90251)
131556
- , copy = __webpack_require__(30203)
131557
- , normalizeOptions = __webpack_require__(90148)
131558
- , map = __webpack_require__(30498);
131559
-
131560
- var bind = Function.prototype.bind
131561
- , defineProperty = Object.defineProperty
131562
- , hasOwnProperty = Object.prototype.hasOwnProperty
131563
- , define;
131564
-
131565
- define = function (name, desc, options) {
131566
- var value = ensureValue(desc) && ensurePlainFunction(desc.value), dgs;
131567
- dgs = copy(desc);
131568
- delete dgs.writable;
131569
- delete dgs.value;
131570
- dgs.get = function () {
131571
- if (!options.overwriteDefinition && hasOwnProperty.call(this, name)) return value;
131572
- desc.value = bind.call(value, options.resolveContext ? options.resolveContext(this) : this);
131573
- defineProperty(this, name, desc);
131574
- return this[name];
131575
- };
131576
- return dgs;
131577
- };
131578
-
131579
- module.exports = function (props/*, options*/) {
131580
- var options = normalizeOptions(arguments[1]);
131581
- if (isValue(options.resolveContext)) ensurePlainFunction(options.resolveContext);
131582
- return map(props, function (desc, name) { return define(name, desc, options); });
131583
- };
131584
-
131585
-
131586
- /***/ }),
131587
-
131588
- /***/ 58263:
131589
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
131590
-
131591
-
131592
-
131593
- var isValue = __webpack_require__(48175)
131594
- , isPlainFunction = __webpack_require__(6873)
131595
- , assign = __webpack_require__(16596)
131596
- , normalizeOpts = __webpack_require__(90148)
131597
- , contains = __webpack_require__(70214);
131598
-
131599
- var d = (module.exports = function (dscr, value/*, options*/) {
131600
- var c, e, w, options, desc;
131601
- if (arguments.length < 2 || typeof dscr !== "string") {
131602
- options = value;
131603
- value = dscr;
131604
- dscr = null;
131605
- } else {
131606
- options = arguments[2];
131607
- }
131608
- if (isValue(dscr)) {
131609
- c = contains.call(dscr, "c");
131610
- e = contains.call(dscr, "e");
131611
- w = contains.call(dscr, "w");
131612
- } else {
131613
- c = w = true;
131614
- e = false;
131615
- }
131616
-
131617
- desc = { value: value, configurable: c, enumerable: e, writable: w };
131618
- return !options ? desc : assign(normalizeOpts(options), desc);
131619
- });
131620
-
131621
- d.gs = function (dscr, get, set/*, options*/) {
131622
- var c, e, options, desc;
131623
- if (typeof dscr !== "string") {
131624
- options = set;
131625
- set = get;
131626
- get = dscr;
131627
- dscr = null;
131628
- } else {
131629
- options = arguments[3];
131630
- }
131631
- if (!isValue(get)) {
131632
- get = undefined;
131633
- } else if (!isPlainFunction(get)) {
131634
- options = get;
131635
- get = set = undefined;
131636
- } else if (!isValue(set)) {
131637
- set = undefined;
131638
- } else if (!isPlainFunction(set)) {
131639
- options = set;
131640
- set = undefined;
131641
- }
131642
- if (isValue(dscr)) {
131643
- c = contains.call(dscr, "c");
131644
- e = contains.call(dscr, "e");
131645
- } else {
131646
- c = true;
131647
- e = false;
131648
- }
131649
-
131650
- desc = { get: get, set: set, configurable: c, enumerable: e };
131651
- return !options ? desc : assign(normalizeOpts(options), desc);
131652
- };
131653
-
131654
-
131655
131655
  /***/ }),
131656
131656
 
131657
131657
  /***/ 30041:
@@ -148243,324 +148243,6 @@ function hsl2rgb(hsl) {
148243
148243
  }
148244
148244
 
148245
148245
 
148246
- /***/ }),
148247
-
148248
- /***/ 9793:
148249
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
148250
-
148251
-
148252
-
148253
- var annAttrs = __webpack_require__(84676);
148254
- var overrideAll = (__webpack_require__(70756).overrideAll);
148255
- var templatedArray = (__webpack_require__(79338).templatedArray);
148256
-
148257
- module.exports = overrideAll(templatedArray('annotation', {
148258
- visible: annAttrs.visible,
148259
- x: {
148260
- valType: 'any',
148261
- description: [
148262
- 'Sets the annotation\'s x position.'
148263
- ].join(' ')
148264
- },
148265
- y: {
148266
- valType: 'any',
148267
- description: [
148268
- 'Sets the annotation\'s y position.'
148269
- ].join(' ')
148270
- },
148271
- z: {
148272
- valType: 'any',
148273
- description: [
148274
- 'Sets the annotation\'s z position.'
148275
- ].join(' ')
148276
- },
148277
- ax: {
148278
- valType: 'number',
148279
- description: [
148280
- 'Sets the x component of the arrow tail about the arrow head (in pixels).'
148281
- ].join(' ')
148282
- },
148283
- ay: {
148284
- valType: 'number',
148285
- description: [
148286
- 'Sets the y component of the arrow tail about the arrow head (in pixels).'
148287
- ].join(' ')
148288
- },
148289
-
148290
- xanchor: annAttrs.xanchor,
148291
- xshift: annAttrs.xshift,
148292
- yanchor: annAttrs.yanchor,
148293
- yshift: annAttrs.yshift,
148294
-
148295
- text: annAttrs.text,
148296
- textangle: annAttrs.textangle,
148297
- font: annAttrs.font,
148298
- width: annAttrs.width,
148299
- height: annAttrs.height,
148300
- opacity: annAttrs.opacity,
148301
- align: annAttrs.align,
148302
- valign: annAttrs.valign,
148303
- bgcolor: annAttrs.bgcolor,
148304
- bordercolor: annAttrs.bordercolor,
148305
- borderpad: annAttrs.borderpad,
148306
- borderwidth: annAttrs.borderwidth,
148307
- showarrow: annAttrs.showarrow,
148308
- arrowcolor: annAttrs.arrowcolor,
148309
- arrowhead: annAttrs.arrowhead,
148310
- startarrowhead: annAttrs.startarrowhead,
148311
- arrowside: annAttrs.arrowside,
148312
- arrowsize: annAttrs.arrowsize,
148313
- startarrowsize: annAttrs.startarrowsize,
148314
- arrowwidth: annAttrs.arrowwidth,
148315
- standoff: annAttrs.standoff,
148316
- startstandoff: annAttrs.startstandoff,
148317
- hovertext: annAttrs.hovertext,
148318
- hoverlabel: annAttrs.hoverlabel,
148319
- captureevents: annAttrs.captureevents,
148320
-
148321
- // maybes later?
148322
- // clicktoshow: annAttrs.clicktoshow,
148323
- // xclick: annAttrs.xclick,
148324
- // yclick: annAttrs.yclick,
148325
-
148326
- // not needed!
148327
- // axref: 'pixel'
148328
- // ayref: 'pixel'
148329
- // xref: 'x'
148330
- // yref: 'y
148331
- // zref: 'z'
148332
- }), 'calc', 'from-root');
148333
-
148334
-
148335
- /***/ }),
148336
-
148337
- /***/ 58121:
148338
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
148339
-
148340
-
148341
-
148342
- var Lib = __webpack_require__(30991);
148343
- var Axes = __webpack_require__(15076);
148344
-
148345
- module.exports = function convert(scene) {
148346
- var fullSceneLayout = scene.fullSceneLayout;
148347
- var anns = fullSceneLayout.annotations;
148348
-
148349
- for(var i = 0; i < anns.length; i++) {
148350
- mockAnnAxes(anns[i], scene);
148351
- }
148352
-
148353
- scene.fullLayout._infolayer
148354
- .selectAll('.annotation-' + scene.id)
148355
- .remove();
148356
- };
148357
-
148358
- function mockAnnAxes(ann, scene) {
148359
- var fullSceneLayout = scene.fullSceneLayout;
148360
- var domain = fullSceneLayout.domain;
148361
- var size = scene.fullLayout._size;
148362
-
148363
- var base = {
148364
- // this gets fill in on render
148365
- pdata: null,
148366
-
148367
- // to get setConvert to not execute cleanly
148368
- type: 'linear',
148369
-
148370
- // don't try to update them on `editable: true`
148371
- autorange: false,
148372
-
148373
- // set infinite range so that annotation draw routine
148374
- // does not try to remove 'outside-range' annotations,
148375
- // this case is handled in the render loop
148376
- range: [-Infinity, Infinity]
148377
- };
148378
-
148379
- ann._xa = {};
148380
- Lib.extendFlat(ann._xa, base);
148381
- Axes.setConvert(ann._xa);
148382
- ann._xa._offset = size.l + domain.x[0] * size.w;
148383
- ann._xa.l2p = function() {
148384
- return 0.5 * (1 + ann._pdata[0] / ann._pdata[3]) * size.w * (domain.x[1] - domain.x[0]);
148385
- };
148386
-
148387
- ann._ya = {};
148388
- Lib.extendFlat(ann._ya, base);
148389
- Axes.setConvert(ann._ya);
148390
- ann._ya._offset = size.t + (1 - domain.y[1]) * size.h;
148391
- ann._ya.l2p = function() {
148392
- return 0.5 * (1 - ann._pdata[1] / ann._pdata[3]) * size.h * (domain.y[1] - domain.y[0]);
148393
- };
148394
- }
148395
-
148396
-
148397
- /***/ }),
148398
-
148399
- /***/ 41926:
148400
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
148401
-
148402
-
148403
-
148404
- var Lib = __webpack_require__(30991);
148405
- var Axes = __webpack_require__(15076);
148406
- var handleArrayContainerDefaults = __webpack_require__(21238);
148407
- var handleAnnotationCommonDefaults = __webpack_require__(84081);
148408
- var attributes = __webpack_require__(9793);
148409
-
148410
- module.exports = function handleDefaults(sceneLayoutIn, sceneLayoutOut, opts) {
148411
- handleArrayContainerDefaults(sceneLayoutIn, sceneLayoutOut, {
148412
- name: 'annotations',
148413
- handleItemDefaults: handleAnnotationDefaults,
148414
- fullLayout: opts.fullLayout
148415
- });
148416
- };
148417
-
148418
- function handleAnnotationDefaults(annIn, annOut, sceneLayout, opts) {
148419
- function coerce(attr, dflt) {
148420
- return Lib.coerce(annIn, annOut, attributes, attr, dflt);
148421
- }
148422
-
148423
- function coercePosition(axLetter) {
148424
- var axName = axLetter + 'axis';
148425
-
148426
- // mock in such way that getFromId grabs correct 3D axis
148427
- var gdMock = { _fullLayout: {} };
148428
- gdMock._fullLayout[axName] = sceneLayout[axName];
148429
-
148430
- return Axes.coercePosition(annOut, gdMock, coerce, axLetter, axLetter, 0.5);
148431
- }
148432
-
148433
-
148434
- var visible = coerce('visible');
148435
- if(!visible) return;
148436
-
148437
- handleAnnotationCommonDefaults(annIn, annOut, opts.fullLayout, coerce);
148438
-
148439
- coercePosition('x');
148440
- coercePosition('y');
148441
- coercePosition('z');
148442
-
148443
- // if you have one coordinate you should all three
148444
- Lib.noneOrAll(annIn, annOut, ['x', 'y', 'z']);
148445
-
148446
- // hard-set here for completeness
148447
- annOut.xref = 'x';
148448
- annOut.yref = 'y';
148449
- annOut.zref = 'z';
148450
-
148451
- coerce('xanchor');
148452
- coerce('yanchor');
148453
- coerce('xshift');
148454
- coerce('yshift');
148455
-
148456
- if(annOut.showarrow) {
148457
- annOut.axref = 'pixel';
148458
- annOut.ayref = 'pixel';
148459
-
148460
- // TODO maybe default values should be bigger than the 2D case?
148461
- coerce('ax', -10);
148462
- coerce('ay', -30);
148463
-
148464
- // if you have one part of arrow length you should have both
148465
- Lib.noneOrAll(annIn, annOut, ['ax', 'ay']);
148466
- }
148467
- }
148468
-
148469
-
148470
- /***/ }),
148471
-
148472
- /***/ 13802:
148473
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
148474
-
148475
-
148476
-
148477
- var drawRaw = (__webpack_require__(47995).drawRaw);
148478
- var project = __webpack_require__(51344);
148479
- var axLetters = ['x', 'y', 'z'];
148480
-
148481
- module.exports = function draw(scene) {
148482
- var fullSceneLayout = scene.fullSceneLayout;
148483
- var dataScale = scene.dataScale;
148484
- var anns = fullSceneLayout.annotations;
148485
-
148486
- for(var i = 0; i < anns.length; i++) {
148487
- var ann = anns[i];
148488
- var annotationIsOffscreen = false;
148489
-
148490
- for(var j = 0; j < 3; j++) {
148491
- var axLetter = axLetters[j];
148492
- var pos = ann[axLetter];
148493
- var ax = fullSceneLayout[axLetter + 'axis'];
148494
- var posFraction = ax.r2fraction(pos);
148495
-
148496
- if(posFraction < 0 || posFraction > 1) {
148497
- annotationIsOffscreen = true;
148498
- break;
148499
- }
148500
- }
148501
-
148502
- if(annotationIsOffscreen) {
148503
- scene.fullLayout._infolayer
148504
- .select('.annotation-' + scene.id + '[data-index="' + i + '"]')
148505
- .remove();
148506
- } else {
148507
- ann._pdata = project(scene.glplot.cameraParams, [
148508
- fullSceneLayout.xaxis.r2l(ann.x) * dataScale[0],
148509
- fullSceneLayout.yaxis.r2l(ann.y) * dataScale[1],
148510
- fullSceneLayout.zaxis.r2l(ann.z) * dataScale[2]
148511
- ]);
148512
-
148513
- drawRaw(scene.graphDiv, ann, i, scene.id, ann._xa, ann._ya);
148514
- }
148515
- }
148516
- };
148517
-
148518
-
148519
- /***/ }),
148520
-
148521
- /***/ 86578:
148522
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
148523
-
148524
-
148525
-
148526
- var Registry = __webpack_require__(13936);
148527
- var Lib = __webpack_require__(30991);
148528
-
148529
- module.exports = {
148530
- moduleType: 'component',
148531
- name: 'annotations3d',
148532
-
148533
- schema: {
148534
- subplots: {
148535
- scene: {annotations: __webpack_require__(9793)}
148536
- }
148537
- },
148538
-
148539
- layoutAttributes: __webpack_require__(9793),
148540
- handleDefaults: __webpack_require__(41926),
148541
- includeBasePlot: includeGL3D,
148542
-
148543
- convert: __webpack_require__(58121),
148544
- draw: __webpack_require__(13802)
148545
- };
148546
-
148547
- function includeGL3D(layoutIn, layoutOut) {
148548
- var GL3D = Registry.subplotsRegistry.gl3d;
148549
- if(!GL3D) return;
148550
-
148551
- var attrRegex = GL3D.attrRegex;
148552
-
148553
- var keys = Object.keys(layoutIn);
148554
- for(var i = 0; i < keys.length; i++) {
148555
- var k = keys[i];
148556
- if(attrRegex.test(k) && (layoutIn[k].annotations || []).length) {
148557
- Lib.pushUnique(layoutOut._basePlotModules, GL3D);
148558
- Lib.pushUnique(layoutOut._subplots.gl3d, k);
148559
- }
148560
- }
148561
- }
148562
-
148563
-
148564
148246
  /***/ }),
148565
148247
 
148566
148248
  /***/ 2595:
@@ -150534,6 +150216,324 @@ module.exports = {
150534
150216
  };
150535
150217
 
150536
150218
 
150219
+ /***/ }),
150220
+
150221
+ /***/ 9793:
150222
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
150223
+
150224
+
150225
+
150226
+ var annAttrs = __webpack_require__(84676);
150227
+ var overrideAll = (__webpack_require__(70756).overrideAll);
150228
+ var templatedArray = (__webpack_require__(79338).templatedArray);
150229
+
150230
+ module.exports = overrideAll(templatedArray('annotation', {
150231
+ visible: annAttrs.visible,
150232
+ x: {
150233
+ valType: 'any',
150234
+ description: [
150235
+ 'Sets the annotation\'s x position.'
150236
+ ].join(' ')
150237
+ },
150238
+ y: {
150239
+ valType: 'any',
150240
+ description: [
150241
+ 'Sets the annotation\'s y position.'
150242
+ ].join(' ')
150243
+ },
150244
+ z: {
150245
+ valType: 'any',
150246
+ description: [
150247
+ 'Sets the annotation\'s z position.'
150248
+ ].join(' ')
150249
+ },
150250
+ ax: {
150251
+ valType: 'number',
150252
+ description: [
150253
+ 'Sets the x component of the arrow tail about the arrow head (in pixels).'
150254
+ ].join(' ')
150255
+ },
150256
+ ay: {
150257
+ valType: 'number',
150258
+ description: [
150259
+ 'Sets the y component of the arrow tail about the arrow head (in pixels).'
150260
+ ].join(' ')
150261
+ },
150262
+
150263
+ xanchor: annAttrs.xanchor,
150264
+ xshift: annAttrs.xshift,
150265
+ yanchor: annAttrs.yanchor,
150266
+ yshift: annAttrs.yshift,
150267
+
150268
+ text: annAttrs.text,
150269
+ textangle: annAttrs.textangle,
150270
+ font: annAttrs.font,
150271
+ width: annAttrs.width,
150272
+ height: annAttrs.height,
150273
+ opacity: annAttrs.opacity,
150274
+ align: annAttrs.align,
150275
+ valign: annAttrs.valign,
150276
+ bgcolor: annAttrs.bgcolor,
150277
+ bordercolor: annAttrs.bordercolor,
150278
+ borderpad: annAttrs.borderpad,
150279
+ borderwidth: annAttrs.borderwidth,
150280
+ showarrow: annAttrs.showarrow,
150281
+ arrowcolor: annAttrs.arrowcolor,
150282
+ arrowhead: annAttrs.arrowhead,
150283
+ startarrowhead: annAttrs.startarrowhead,
150284
+ arrowside: annAttrs.arrowside,
150285
+ arrowsize: annAttrs.arrowsize,
150286
+ startarrowsize: annAttrs.startarrowsize,
150287
+ arrowwidth: annAttrs.arrowwidth,
150288
+ standoff: annAttrs.standoff,
150289
+ startstandoff: annAttrs.startstandoff,
150290
+ hovertext: annAttrs.hovertext,
150291
+ hoverlabel: annAttrs.hoverlabel,
150292
+ captureevents: annAttrs.captureevents,
150293
+
150294
+ // maybes later?
150295
+ // clicktoshow: annAttrs.clicktoshow,
150296
+ // xclick: annAttrs.xclick,
150297
+ // yclick: annAttrs.yclick,
150298
+
150299
+ // not needed!
150300
+ // axref: 'pixel'
150301
+ // ayref: 'pixel'
150302
+ // xref: 'x'
150303
+ // yref: 'y
150304
+ // zref: 'z'
150305
+ }), 'calc', 'from-root');
150306
+
150307
+
150308
+ /***/ }),
150309
+
150310
+ /***/ 58121:
150311
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
150312
+
150313
+
150314
+
150315
+ var Lib = __webpack_require__(30991);
150316
+ var Axes = __webpack_require__(15076);
150317
+
150318
+ module.exports = function convert(scene) {
150319
+ var fullSceneLayout = scene.fullSceneLayout;
150320
+ var anns = fullSceneLayout.annotations;
150321
+
150322
+ for(var i = 0; i < anns.length; i++) {
150323
+ mockAnnAxes(anns[i], scene);
150324
+ }
150325
+
150326
+ scene.fullLayout._infolayer
150327
+ .selectAll('.annotation-' + scene.id)
150328
+ .remove();
150329
+ };
150330
+
150331
+ function mockAnnAxes(ann, scene) {
150332
+ var fullSceneLayout = scene.fullSceneLayout;
150333
+ var domain = fullSceneLayout.domain;
150334
+ var size = scene.fullLayout._size;
150335
+
150336
+ var base = {
150337
+ // this gets fill in on render
150338
+ pdata: null,
150339
+
150340
+ // to get setConvert to not execute cleanly
150341
+ type: 'linear',
150342
+
150343
+ // don't try to update them on `editable: true`
150344
+ autorange: false,
150345
+
150346
+ // set infinite range so that annotation draw routine
150347
+ // does not try to remove 'outside-range' annotations,
150348
+ // this case is handled in the render loop
150349
+ range: [-Infinity, Infinity]
150350
+ };
150351
+
150352
+ ann._xa = {};
150353
+ Lib.extendFlat(ann._xa, base);
150354
+ Axes.setConvert(ann._xa);
150355
+ ann._xa._offset = size.l + domain.x[0] * size.w;
150356
+ ann._xa.l2p = function() {
150357
+ return 0.5 * (1 + ann._pdata[0] / ann._pdata[3]) * size.w * (domain.x[1] - domain.x[0]);
150358
+ };
150359
+
150360
+ ann._ya = {};
150361
+ Lib.extendFlat(ann._ya, base);
150362
+ Axes.setConvert(ann._ya);
150363
+ ann._ya._offset = size.t + (1 - domain.y[1]) * size.h;
150364
+ ann._ya.l2p = function() {
150365
+ return 0.5 * (1 - ann._pdata[1] / ann._pdata[3]) * size.h * (domain.y[1] - domain.y[0]);
150366
+ };
150367
+ }
150368
+
150369
+
150370
+ /***/ }),
150371
+
150372
+ /***/ 41926:
150373
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
150374
+
150375
+
150376
+
150377
+ var Lib = __webpack_require__(30991);
150378
+ var Axes = __webpack_require__(15076);
150379
+ var handleArrayContainerDefaults = __webpack_require__(21238);
150380
+ var handleAnnotationCommonDefaults = __webpack_require__(84081);
150381
+ var attributes = __webpack_require__(9793);
150382
+
150383
+ module.exports = function handleDefaults(sceneLayoutIn, sceneLayoutOut, opts) {
150384
+ handleArrayContainerDefaults(sceneLayoutIn, sceneLayoutOut, {
150385
+ name: 'annotations',
150386
+ handleItemDefaults: handleAnnotationDefaults,
150387
+ fullLayout: opts.fullLayout
150388
+ });
150389
+ };
150390
+
150391
+ function handleAnnotationDefaults(annIn, annOut, sceneLayout, opts) {
150392
+ function coerce(attr, dflt) {
150393
+ return Lib.coerce(annIn, annOut, attributes, attr, dflt);
150394
+ }
150395
+
150396
+ function coercePosition(axLetter) {
150397
+ var axName = axLetter + 'axis';
150398
+
150399
+ // mock in such way that getFromId grabs correct 3D axis
150400
+ var gdMock = { _fullLayout: {} };
150401
+ gdMock._fullLayout[axName] = sceneLayout[axName];
150402
+
150403
+ return Axes.coercePosition(annOut, gdMock, coerce, axLetter, axLetter, 0.5);
150404
+ }
150405
+
150406
+
150407
+ var visible = coerce('visible');
150408
+ if(!visible) return;
150409
+
150410
+ handleAnnotationCommonDefaults(annIn, annOut, opts.fullLayout, coerce);
150411
+
150412
+ coercePosition('x');
150413
+ coercePosition('y');
150414
+ coercePosition('z');
150415
+
150416
+ // if you have one coordinate you should all three
150417
+ Lib.noneOrAll(annIn, annOut, ['x', 'y', 'z']);
150418
+
150419
+ // hard-set here for completeness
150420
+ annOut.xref = 'x';
150421
+ annOut.yref = 'y';
150422
+ annOut.zref = 'z';
150423
+
150424
+ coerce('xanchor');
150425
+ coerce('yanchor');
150426
+ coerce('xshift');
150427
+ coerce('yshift');
150428
+
150429
+ if(annOut.showarrow) {
150430
+ annOut.axref = 'pixel';
150431
+ annOut.ayref = 'pixel';
150432
+
150433
+ // TODO maybe default values should be bigger than the 2D case?
150434
+ coerce('ax', -10);
150435
+ coerce('ay', -30);
150436
+
150437
+ // if you have one part of arrow length you should have both
150438
+ Lib.noneOrAll(annIn, annOut, ['ax', 'ay']);
150439
+ }
150440
+ }
150441
+
150442
+
150443
+ /***/ }),
150444
+
150445
+ /***/ 13802:
150446
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
150447
+
150448
+
150449
+
150450
+ var drawRaw = (__webpack_require__(47995).drawRaw);
150451
+ var project = __webpack_require__(51344);
150452
+ var axLetters = ['x', 'y', 'z'];
150453
+
150454
+ module.exports = function draw(scene) {
150455
+ var fullSceneLayout = scene.fullSceneLayout;
150456
+ var dataScale = scene.dataScale;
150457
+ var anns = fullSceneLayout.annotations;
150458
+
150459
+ for(var i = 0; i < anns.length; i++) {
150460
+ var ann = anns[i];
150461
+ var annotationIsOffscreen = false;
150462
+
150463
+ for(var j = 0; j < 3; j++) {
150464
+ var axLetter = axLetters[j];
150465
+ var pos = ann[axLetter];
150466
+ var ax = fullSceneLayout[axLetter + 'axis'];
150467
+ var posFraction = ax.r2fraction(pos);
150468
+
150469
+ if(posFraction < 0 || posFraction > 1) {
150470
+ annotationIsOffscreen = true;
150471
+ break;
150472
+ }
150473
+ }
150474
+
150475
+ if(annotationIsOffscreen) {
150476
+ scene.fullLayout._infolayer
150477
+ .select('.annotation-' + scene.id + '[data-index="' + i + '"]')
150478
+ .remove();
150479
+ } else {
150480
+ ann._pdata = project(scene.glplot.cameraParams, [
150481
+ fullSceneLayout.xaxis.r2l(ann.x) * dataScale[0],
150482
+ fullSceneLayout.yaxis.r2l(ann.y) * dataScale[1],
150483
+ fullSceneLayout.zaxis.r2l(ann.z) * dataScale[2]
150484
+ ]);
150485
+
150486
+ drawRaw(scene.graphDiv, ann, i, scene.id, ann._xa, ann._ya);
150487
+ }
150488
+ }
150489
+ };
150490
+
150491
+
150492
+ /***/ }),
150493
+
150494
+ /***/ 86578:
150495
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
150496
+
150497
+
150498
+
150499
+ var Registry = __webpack_require__(13936);
150500
+ var Lib = __webpack_require__(30991);
150501
+
150502
+ module.exports = {
150503
+ moduleType: 'component',
150504
+ name: 'annotations3d',
150505
+
150506
+ schema: {
150507
+ subplots: {
150508
+ scene: {annotations: __webpack_require__(9793)}
150509
+ }
150510
+ },
150511
+
150512
+ layoutAttributes: __webpack_require__(9793),
150513
+ handleDefaults: __webpack_require__(41926),
150514
+ includeBasePlot: includeGL3D,
150515
+
150516
+ convert: __webpack_require__(58121),
150517
+ draw: __webpack_require__(13802)
150518
+ };
150519
+
150520
+ function includeGL3D(layoutIn, layoutOut) {
150521
+ var GL3D = Registry.subplotsRegistry.gl3d;
150522
+ if(!GL3D) return;
150523
+
150524
+ var attrRegex = GL3D.attrRegex;
150525
+
150526
+ var keys = Object.keys(layoutIn);
150527
+ for(var i = 0; i < keys.length; i++) {
150528
+ var k = keys[i];
150529
+ if(attrRegex.test(k) && (layoutIn[k].annotations || []).length) {
150530
+ Lib.pushUnique(layoutOut._basePlotModules, GL3D);
150531
+ Lib.pushUnique(layoutOut._subplots.gl3d, k);
150532
+ }
150533
+ }
150534
+ }
150535
+
150536
+
150537
150537
  /***/ }),
150538
150538
 
150539
150539
  /***/ 27639:
@@ -248766,595 +248766,6 @@ function isValidZ(z) {
248766
248766
  }
248767
248767
 
248768
248768
 
248769
- /***/ }),
248770
-
248771
- /***/ 42124:
248772
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
248773
-
248774
-
248775
-
248776
- var histogramAttrs = __webpack_require__(71250);
248777
- var makeBinAttrs = __webpack_require__(9284);
248778
- var heatmapAttrs = __webpack_require__(68300);
248779
- var baseAttrs = __webpack_require__(35667);
248780
- var axisHoverFormat = (__webpack_require__(71018).axisHoverFormat);
248781
- var hovertemplateAttrs = (__webpack_require__(92710)/* .hovertemplateAttrs */ .rb);
248782
- var texttemplateAttrs = (__webpack_require__(92710)/* .texttemplateAttrs */ .ay);
248783
- var colorScaleAttrs = __webpack_require__(17957);
248784
-
248785
- var extendFlat = (__webpack_require__(91307).extendFlat);
248786
-
248787
- module.exports = extendFlat(
248788
- {
248789
- x: histogramAttrs.x,
248790
- y: histogramAttrs.y,
248791
-
248792
- z: {
248793
- valType: 'data_array',
248794
- editType: 'calc',
248795
- description: 'Sets the aggregation data.'
248796
- },
248797
- marker: {
248798
- color: {
248799
- valType: 'data_array',
248800
- editType: 'calc',
248801
- description: 'Sets the aggregation data.'
248802
- },
248803
- editType: 'calc'
248804
- },
248805
-
248806
- histnorm: histogramAttrs.histnorm,
248807
- histfunc: histogramAttrs.histfunc,
248808
- nbinsx: histogramAttrs.nbinsx,
248809
- xbins: makeBinAttrs('x'),
248810
- nbinsy: histogramAttrs.nbinsy,
248811
- ybins: makeBinAttrs('y'),
248812
- autobinx: histogramAttrs.autobinx,
248813
- autobiny: histogramAttrs.autobiny,
248814
-
248815
- bingroup: extendFlat({}, histogramAttrs.bingroup, {
248816
- description: [
248817
- 'Set the `xbingroup` and `ybingroup` default prefix',
248818
- 'For example, setting a `bingroup` of *1* on two histogram2d traces',
248819
- 'will make them their x-bins and y-bins match separately.'
248820
- ].join(' ')
248821
- }),
248822
- xbingroup: extendFlat({}, histogramAttrs.bingroup, {
248823
- description: [
248824
- 'Set a group of histogram traces which will have compatible x-bin settings.',
248825
- 'Using `xbingroup`, histogram2d and histogram2dcontour traces ',
248826
- '(on axes of the same axis type) can have compatible x-bin settings.',
248827
- 'Note that the same `xbingroup` value can be used to set (1D) histogram `bingroup`'
248828
- ].join(' ')
248829
- }),
248830
- ybingroup: extendFlat({}, histogramAttrs.bingroup, {
248831
- description: [
248832
- 'Set a group of histogram traces which will have compatible y-bin settings.',
248833
- 'Using `ybingroup`, histogram2d and histogram2dcontour traces ',
248834
- '(on axes of the same axis type) can have compatible y-bin settings.',
248835
- 'Note that the same `ybingroup` value can be used to set (1D) histogram `bingroup`'
248836
- ].join(' ')
248837
- }),
248838
-
248839
- xgap: heatmapAttrs.xgap,
248840
- ygap: heatmapAttrs.ygap,
248841
- zsmooth: heatmapAttrs.zsmooth,
248842
- xhoverformat: axisHoverFormat('x'),
248843
- yhoverformat: axisHoverFormat('y'),
248844
- zhoverformat: axisHoverFormat('z', 1),
248845
- hovertemplate: hovertemplateAttrs({}, {keys: 'z'}),
248846
- texttemplate: texttemplateAttrs({
248847
- arrayOk: false,
248848
- editType: 'plot'
248849
- }, {
248850
- keys: 'z'
248851
- }),
248852
- textfont: heatmapAttrs.textfont,
248853
- showlegend: extendFlat({}, baseAttrs.showlegend, {dflt: false})
248854
- },
248855
- colorScaleAttrs('', {cLetter: 'z', autoColorDflt: false})
248856
- );
248857
-
248858
-
248859
- /***/ }),
248860
-
248861
- /***/ 32492:
248862
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
248863
-
248864
-
248865
-
248866
- var Lib = __webpack_require__(30991);
248867
- var Axes = __webpack_require__(15076);
248868
-
248869
- var binFunctions = __webpack_require__(47260);
248870
- var normFunctions = __webpack_require__(855);
248871
- var doAvg = __webpack_require__(26756);
248872
- var getBinSpanLabelRound = __webpack_require__(41574);
248873
- var calcAllAutoBins = (__webpack_require__(50414).calcAllAutoBins);
248874
-
248875
- module.exports = function calc(gd, trace) {
248876
- var xa = Axes.getFromId(gd, trace.xaxis);
248877
- var ya = Axes.getFromId(gd, trace.yaxis);
248878
-
248879
- var xcalendar = trace.xcalendar;
248880
- var ycalendar = trace.ycalendar;
248881
- var xr2c = function(v) { return xa.r2c(v, 0, xcalendar); };
248882
- var yr2c = function(v) { return ya.r2c(v, 0, ycalendar); };
248883
- var xc2r = function(v) { return xa.c2r(v, 0, xcalendar); };
248884
- var yc2r = function(v) { return ya.c2r(v, 0, ycalendar); };
248885
-
248886
- var i, j, n, m;
248887
-
248888
- // calculate the bins
248889
- var xBinsAndPos = calcAllAutoBins(gd, trace, xa, 'x');
248890
- var xBinSpec = xBinsAndPos[0];
248891
- var xPos0 = xBinsAndPos[1];
248892
- var yBinsAndPos = calcAllAutoBins(gd, trace, ya, 'y');
248893
- var yBinSpec = yBinsAndPos[0];
248894
- var yPos0 = yBinsAndPos[1];
248895
-
248896
- var serieslen = trace._length;
248897
- if(xPos0.length > serieslen) xPos0.splice(serieslen, xPos0.length - serieslen);
248898
- if(yPos0.length > serieslen) yPos0.splice(serieslen, yPos0.length - serieslen);
248899
-
248900
- // make the empty bin array & scale the map
248901
- var z = [];
248902
- var onecol = [];
248903
- var zerocol = [];
248904
- var nonuniformBinsX = typeof xBinSpec.size === 'string';
248905
- var nonuniformBinsY = typeof yBinSpec.size === 'string';
248906
- var xEdges = [];
248907
- var yEdges = [];
248908
- var xbins = nonuniformBinsX ? xEdges : xBinSpec;
248909
- var ybins = nonuniformBinsY ? yEdges : yBinSpec;
248910
- var total = 0;
248911
- var counts = [];
248912
- var inputPoints = [];
248913
- var norm = trace.histnorm;
248914
- var func = trace.histfunc;
248915
- var densitynorm = norm.indexOf('density') !== -1;
248916
- var extremefunc = func === 'max' || func === 'min';
248917
- var sizeinit = extremefunc ? null : 0;
248918
- var binfunc = binFunctions.count;
248919
- var normfunc = normFunctions[norm];
248920
- var doavg = false;
248921
- var xinc = [];
248922
- var yinc = [];
248923
-
248924
- // set a binning function other than count?
248925
- // for binning functions: check first for 'z',
248926
- // then 'mc' in case we had a colored scatter plot
248927
- // and want to transfer these colors to the 2D histo
248928
- // TODO: axe this, make it the responsibility of the app changing type? or an impliedEdit?
248929
- var rawCounterData = ('z' in trace) ?
248930
- trace.z :
248931
- (('marker' in trace && Array.isArray(trace.marker.color)) ?
248932
- trace.marker.color : '');
248933
- if(rawCounterData && func !== 'count') {
248934
- doavg = func === 'avg';
248935
- binfunc = binFunctions[func];
248936
- }
248937
-
248938
- // decrease end a little in case of rounding errors
248939
- var xBinSize = xBinSpec.size;
248940
- var xBinStart = xr2c(xBinSpec.start);
248941
- var xBinEnd = xr2c(xBinSpec.end) +
248942
- (xBinStart - Axes.tickIncrement(xBinStart, xBinSize, false, xcalendar)) / 1e6;
248943
-
248944
- for(i = xBinStart; i < xBinEnd; i = Axes.tickIncrement(i, xBinSize, false, xcalendar)) {
248945
- onecol.push(sizeinit);
248946
- xEdges.push(i);
248947
- if(doavg) zerocol.push(0);
248948
- }
248949
- xEdges.push(i);
248950
-
248951
- var nx = onecol.length;
248952
- var dx = (i - xBinStart) / nx;
248953
- var x0 = xc2r(xBinStart + dx / 2);
248954
-
248955
- var yBinSize = yBinSpec.size;
248956
- var yBinStart = yr2c(yBinSpec.start);
248957
- var yBinEnd = yr2c(yBinSpec.end) +
248958
- (yBinStart - Axes.tickIncrement(yBinStart, yBinSize, false, ycalendar)) / 1e6;
248959
-
248960
- for(i = yBinStart; i < yBinEnd; i = Axes.tickIncrement(i, yBinSize, false, ycalendar)) {
248961
- z.push(onecol.slice());
248962
- yEdges.push(i);
248963
- var ipCol = new Array(nx);
248964
- for(j = 0; j < nx; j++) ipCol[j] = [];
248965
- inputPoints.push(ipCol);
248966
- if(doavg) counts.push(zerocol.slice());
248967
- }
248968
- yEdges.push(i);
248969
-
248970
- var ny = z.length;
248971
- var dy = (i - yBinStart) / ny;
248972
- var y0 = yc2r(yBinStart + dy / 2);
248973
-
248974
- if(densitynorm) {
248975
- xinc = makeIncrements(onecol.length, xbins, dx, nonuniformBinsX);
248976
- yinc = makeIncrements(z.length, ybins, dy, nonuniformBinsY);
248977
- }
248978
-
248979
- // for date axes we need bin bounds to be calcdata. For nonuniform bins
248980
- // we already have this, but uniform with start/end/size they're still strings.
248981
- if(!nonuniformBinsX && xa.type === 'date') xbins = binsToCalc(xr2c, xbins);
248982
- if(!nonuniformBinsY && ya.type === 'date') ybins = binsToCalc(yr2c, ybins);
248983
-
248984
- // put data into bins
248985
- var uniqueValsPerX = true;
248986
- var uniqueValsPerY = true;
248987
- var xVals = new Array(nx);
248988
- var yVals = new Array(ny);
248989
- var xGapLow = Infinity;
248990
- var xGapHigh = Infinity;
248991
- var yGapLow = Infinity;
248992
- var yGapHigh = Infinity;
248993
- for(i = 0; i < serieslen; i++) {
248994
- var xi = xPos0[i];
248995
- var yi = yPos0[i];
248996
- n = Lib.findBin(xi, xbins);
248997
- m = Lib.findBin(yi, ybins);
248998
- if(n >= 0 && n < nx && m >= 0 && m < ny) {
248999
- total += binfunc(n, i, z[m], rawCounterData, counts[m]);
249000
- inputPoints[m][n].push(i);
249001
-
249002
- if(uniqueValsPerX) {
249003
- if(xVals[n] === undefined) xVals[n] = xi;
249004
- else if(xVals[n] !== xi) uniqueValsPerX = false;
249005
- }
249006
- if(uniqueValsPerY) {
249007
- if(yVals[m] === undefined) yVals[m] = yi;
249008
- else if(yVals[m] !== yi) uniqueValsPerY = false;
249009
- }
249010
-
249011
- xGapLow = Math.min(xGapLow, xi - xEdges[n]);
249012
- xGapHigh = Math.min(xGapHigh, xEdges[n + 1] - xi);
249013
- yGapLow = Math.min(yGapLow, yi - yEdges[m]);
249014
- yGapHigh = Math.min(yGapHigh, yEdges[m + 1] - yi);
249015
- }
249016
- }
249017
- // normalize, if needed
249018
- if(doavg) {
249019
- for(m = 0; m < ny; m++) total += doAvg(z[m], counts[m]);
249020
- }
249021
- if(normfunc) {
249022
- for(m = 0; m < ny; m++) normfunc(z[m], total, xinc, yinc[m]);
249023
- }
249024
-
249025
- return {
249026
- x: xPos0,
249027
- xRanges: getRanges(xEdges, uniqueValsPerX && xVals, xGapLow, xGapHigh, xa, xcalendar),
249028
- x0: x0,
249029
- dx: dx,
249030
- y: yPos0,
249031
- yRanges: getRanges(yEdges, uniqueValsPerY && yVals, yGapLow, yGapHigh, ya, ycalendar),
249032
- y0: y0,
249033
- dy: dy,
249034
- z: z,
249035
- pts: inputPoints
249036
- };
249037
- };
249038
-
249039
- function makeIncrements(len, bins, dv, nonuniform) {
249040
- var out = new Array(len);
249041
- var i;
249042
- if(nonuniform) {
249043
- for(i = 0; i < len; i++) out[i] = 1 / (bins[i + 1] - bins[i]);
249044
- } else {
249045
- var inc = 1 / dv;
249046
- for(i = 0; i < len; i++) out[i] = inc;
249047
- }
249048
- return out;
249049
- }
249050
-
249051
- function binsToCalc(r2c, bins) {
249052
- return {
249053
- start: r2c(bins.start),
249054
- end: r2c(bins.end),
249055
- size: bins.size
249056
- };
249057
- }
249058
-
249059
- function getRanges(edges, uniqueVals, gapLow, gapHigh, ax, calendar) {
249060
- var i;
249061
- var len = edges.length - 1;
249062
- var out = new Array(len);
249063
- var roundFn = getBinSpanLabelRound(gapLow, gapHigh, edges, ax, calendar);
249064
-
249065
- for(i = 0; i < len; i++) {
249066
- var v = (uniqueVals || [])[i];
249067
- out[i] = v === undefined ?
249068
- [roundFn(edges[i]), roundFn(edges[i + 1], true)] :
249069
- [v, v];
249070
- }
249071
- return out;
249072
- }
249073
-
249074
-
249075
- /***/ }),
249076
-
249077
- /***/ 15611:
249078
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
249079
-
249080
-
249081
-
249082
- var Lib = __webpack_require__(30991);
249083
-
249084
- var handleSampleDefaults = __webpack_require__(6236);
249085
- var handleStyleDefaults = __webpack_require__(25157);
249086
- var colorscaleDefaults = __webpack_require__(13682);
249087
- var handleHeatmapLabelDefaults = __webpack_require__(52340);
249088
- var attributes = __webpack_require__(42124);
249089
-
249090
-
249091
- module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
249092
- function coerce(attr, dflt) {
249093
- return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);
249094
- }
249095
-
249096
- handleSampleDefaults(traceIn, traceOut, coerce, layout);
249097
- if(traceOut.visible === false) return;
249098
-
249099
- handleStyleDefaults(traceIn, traceOut, coerce, layout);
249100
- colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: '', cLetter: 'z'});
249101
- coerce('hovertemplate');
249102
-
249103
- handleHeatmapLabelDefaults(coerce, layout);
249104
-
249105
- coerce('xhoverformat');
249106
- coerce('yhoverformat');
249107
- };
249108
-
249109
-
249110
- /***/ }),
249111
-
249112
- /***/ 94587:
249113
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
249114
-
249115
-
249116
-
249117
- var heatmapHover = __webpack_require__(85243);
249118
- var hoverLabelText = (__webpack_require__(15076).hoverLabelText);
249119
-
249120
- module.exports = function hoverPoints(pointData, xval, yval, hovermode, opts) {
249121
- var pts = heatmapHover(pointData, xval, yval, hovermode, opts);
249122
-
249123
- if(!pts) return;
249124
-
249125
- pointData = pts[0];
249126
- var indices = pointData.index;
249127
- var ny = indices[0];
249128
- var nx = indices[1];
249129
- var cd0 = pointData.cd[0];
249130
- var trace = cd0.trace;
249131
- var xRange = cd0.xRanges[nx];
249132
- var yRange = cd0.yRanges[ny];
249133
-
249134
- pointData.xLabel = hoverLabelText(pointData.xa, [xRange[0], xRange[1]], trace.xhoverformat);
249135
- pointData.yLabel = hoverLabelText(pointData.ya, [yRange[0], yRange[1]], trace.yhoverformat);
249136
-
249137
- return pts;
249138
- };
249139
-
249140
-
249141
- /***/ }),
249142
-
249143
- /***/ 3617:
249144
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
249145
-
249146
-
249147
-
249148
- module.exports = {
249149
- attributes: __webpack_require__(42124),
249150
- supplyDefaults: __webpack_require__(15611),
249151
- crossTraceDefaults: __webpack_require__(34294),
249152
- calc: __webpack_require__(91980),
249153
- plot: __webpack_require__(29406),
249154
- layerName: 'heatmaplayer',
249155
- colorbar: __webpack_require__(90165),
249156
- style: __webpack_require__(58756),
249157
- hoverPoints: __webpack_require__(94587),
249158
- eventData: __webpack_require__(63870),
249159
-
249160
- moduleType: 'trace',
249161
- name: 'histogram2d',
249162
- basePlotModule: __webpack_require__(47885),
249163
- categories: ['cartesian', 'svg', '2dMap', 'histogram', 'showLegend'],
249164
- meta: {
249165
- hrName: 'histogram_2d',
249166
- description: [
249167
- 'The sample data from which statistics are computed is set in `x`',
249168
- 'and `y` (where `x` and `y` represent marginal distributions,',
249169
- 'binning is set in `xbins` and `ybins` in this case)',
249170
- 'or `z` (where `z` represent the 2D distribution and binning set,',
249171
- 'binning is set by `x` and `y` in this case).',
249172
- 'The resulting distribution is visualized as a heatmap.'
249173
- ].join(' ')
249174
- }
249175
- };
249176
-
249177
-
249178
- /***/ }),
249179
-
249180
- /***/ 6236:
249181
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
249182
-
249183
-
249184
-
249185
- var Registry = __webpack_require__(13936);
249186
- var Lib = __webpack_require__(30991);
249187
-
249188
- module.exports = function handleSampleDefaults(traceIn, traceOut, coerce, layout) {
249189
- var x = coerce('x');
249190
- var y = coerce('y');
249191
- var xlen = Lib.minRowLength(x);
249192
- var ylen = Lib.minRowLength(y);
249193
-
249194
- // we could try to accept x0 and dx, etc...
249195
- // but that's a pretty weird use case.
249196
- // for now require both x and y explicitly specified.
249197
- if(!xlen || !ylen) {
249198
- traceOut.visible = false;
249199
- return;
249200
- }
249201
-
249202
- traceOut._length = Math.min(xlen, ylen);
249203
-
249204
- var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleTraceDefaults');
249205
- handleCalendarDefaults(traceIn, traceOut, ['x', 'y'], layout);
249206
-
249207
- // if marker.color is an array, we can use it in aggregation instead of z
249208
- var hasAggregationData = coerce('z') || coerce('marker.color');
249209
-
249210
- if(hasAggregationData) coerce('histfunc');
249211
- coerce('histnorm');
249212
-
249213
- // Note: bin defaults are now handled in Histogram2D.crossTraceDefaults
249214
- // autobin(x|y) are only included here to appease Plotly.validate
249215
- coerce('autobinx');
249216
- coerce('autobiny');
249217
- };
249218
-
249219
-
249220
- /***/ }),
249221
-
249222
- /***/ 34872:
249223
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
249224
-
249225
-
249226
-
249227
- var histogram2dAttrs = __webpack_require__(42124);
249228
- var contourAttrs = __webpack_require__(70318);
249229
- var colorScaleAttrs = __webpack_require__(17957);
249230
- var axisHoverFormat = (__webpack_require__(71018).axisHoverFormat);
249231
-
249232
- var extendFlat = (__webpack_require__(91307).extendFlat);
249233
-
249234
- module.exports = extendFlat({
249235
- x: histogram2dAttrs.x,
249236
- y: histogram2dAttrs.y,
249237
- z: histogram2dAttrs.z,
249238
- marker: histogram2dAttrs.marker,
249239
-
249240
- histnorm: histogram2dAttrs.histnorm,
249241
- histfunc: histogram2dAttrs.histfunc,
249242
- nbinsx: histogram2dAttrs.nbinsx,
249243
- xbins: histogram2dAttrs.xbins,
249244
- nbinsy: histogram2dAttrs.nbinsy,
249245
- ybins: histogram2dAttrs.ybins,
249246
- autobinx: histogram2dAttrs.autobinx,
249247
- autobiny: histogram2dAttrs.autobiny,
249248
-
249249
- bingroup: histogram2dAttrs.bingroup,
249250
- xbingroup: histogram2dAttrs.xbingroup,
249251
- ybingroup: histogram2dAttrs.ybingroup,
249252
-
249253
- autocontour: contourAttrs.autocontour,
249254
- ncontours: contourAttrs.ncontours,
249255
- contours: contourAttrs.contours,
249256
- line: {
249257
- color: contourAttrs.line.color,
249258
- width: extendFlat({}, contourAttrs.line.width, {
249259
- dflt: 0.5,
249260
- description: 'Sets the contour line width in (in px)'
249261
- }),
249262
- dash: contourAttrs.line.dash,
249263
- smoothing: contourAttrs.line.smoothing,
249264
- editType: 'plot'
249265
- },
249266
- xhoverformat: axisHoverFormat('x'),
249267
- yhoverformat: axisHoverFormat('y'),
249268
- zhoverformat: axisHoverFormat('z', 1),
249269
- hovertemplate: histogram2dAttrs.hovertemplate,
249270
- texttemplate: contourAttrs.texttemplate,
249271
- textfont: contourAttrs.textfont
249272
- },
249273
- colorScaleAttrs('', {
249274
- cLetter: 'z',
249275
- editTypeOverride: 'calc'
249276
- })
249277
- );
249278
-
249279
-
249280
- /***/ }),
249281
-
249282
- /***/ 14319:
249283
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
249284
-
249285
-
249286
-
249287
- var Lib = __webpack_require__(30991);
249288
-
249289
- var handleSampleDefaults = __webpack_require__(6236);
249290
- var handleContoursDefaults = __webpack_require__(657);
249291
- var handleStyleDefaults = __webpack_require__(74619);
249292
- var handleHeatmapLabelDefaults = __webpack_require__(52340);
249293
- var attributes = __webpack_require__(34872);
249294
-
249295
-
249296
- module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
249297
- function coerce(attr, dflt) {
249298
- return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);
249299
- }
249300
-
249301
- function coerce2(attr) {
249302
- return Lib.coerce2(traceIn, traceOut, attributes, attr);
249303
- }
249304
-
249305
- handleSampleDefaults(traceIn, traceOut, coerce, layout);
249306
- if(traceOut.visible === false) return;
249307
-
249308
- handleContoursDefaults(traceIn, traceOut, coerce, coerce2);
249309
- handleStyleDefaults(traceIn, traceOut, coerce, layout);
249310
- coerce('xhoverformat');
249311
- coerce('yhoverformat');
249312
- coerce('hovertemplate');
249313
- if(
249314
- traceOut.contours &&
249315
- traceOut.contours.coloring === 'heatmap'
249316
- ) {
249317
- handleHeatmapLabelDefaults(coerce, layout);
249318
- }
249319
- };
249320
-
249321
-
249322
- /***/ }),
249323
-
249324
- /***/ 60613:
249325
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
249326
-
249327
-
249328
-
249329
- module.exports = {
249330
- attributes: __webpack_require__(34872),
249331
- supplyDefaults: __webpack_require__(14319),
249332
- crossTraceDefaults: __webpack_require__(34294),
249333
- calc: __webpack_require__(3274),
249334
- plot: (__webpack_require__(32664).plot),
249335
- layerName: 'contourlayer',
249336
- style: __webpack_require__(72690),
249337
- colorbar: __webpack_require__(70307),
249338
- hoverPoints: __webpack_require__(52353),
249339
-
249340
- moduleType: 'trace',
249341
- name: 'histogram2dcontour',
249342
- basePlotModule: __webpack_require__(47885),
249343
- categories: ['cartesian', 'svg', '2dMap', 'contour', 'histogram', 'showLegend'],
249344
- meta: {
249345
- hrName: 'histogram_2d_contour',
249346
- description: [
249347
- 'The sample data from which statistics are computed is set in `x`',
249348
- 'and `y` (where `x` and `y` represent marginal distributions,',
249349
- 'binning is set in `xbins` and `ybins` in this case)',
249350
- 'or `z` (where `z` represent the 2D distribution and binning set,',
249351
- 'binning is set by `x` and `y` in this case).',
249352
- 'The resulting distribution is visualized as a contour plot.'
249353
- ].join(' ')
249354
- }
249355
- };
249356
-
249357
-
249358
248769
  /***/ }),
249359
248770
 
249360
248771
  /***/ 71250:
@@ -251063,6 +250474,595 @@ module.exports = {
251063
250474
  };
251064
250475
 
251065
250476
 
250477
+ /***/ }),
250478
+
250479
+ /***/ 42124:
250480
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
250481
+
250482
+
250483
+
250484
+ var histogramAttrs = __webpack_require__(71250);
250485
+ var makeBinAttrs = __webpack_require__(9284);
250486
+ var heatmapAttrs = __webpack_require__(68300);
250487
+ var baseAttrs = __webpack_require__(35667);
250488
+ var axisHoverFormat = (__webpack_require__(71018).axisHoverFormat);
250489
+ var hovertemplateAttrs = (__webpack_require__(92710)/* .hovertemplateAttrs */ .rb);
250490
+ var texttemplateAttrs = (__webpack_require__(92710)/* .texttemplateAttrs */ .ay);
250491
+ var colorScaleAttrs = __webpack_require__(17957);
250492
+
250493
+ var extendFlat = (__webpack_require__(91307).extendFlat);
250494
+
250495
+ module.exports = extendFlat(
250496
+ {
250497
+ x: histogramAttrs.x,
250498
+ y: histogramAttrs.y,
250499
+
250500
+ z: {
250501
+ valType: 'data_array',
250502
+ editType: 'calc',
250503
+ description: 'Sets the aggregation data.'
250504
+ },
250505
+ marker: {
250506
+ color: {
250507
+ valType: 'data_array',
250508
+ editType: 'calc',
250509
+ description: 'Sets the aggregation data.'
250510
+ },
250511
+ editType: 'calc'
250512
+ },
250513
+
250514
+ histnorm: histogramAttrs.histnorm,
250515
+ histfunc: histogramAttrs.histfunc,
250516
+ nbinsx: histogramAttrs.nbinsx,
250517
+ xbins: makeBinAttrs('x'),
250518
+ nbinsy: histogramAttrs.nbinsy,
250519
+ ybins: makeBinAttrs('y'),
250520
+ autobinx: histogramAttrs.autobinx,
250521
+ autobiny: histogramAttrs.autobiny,
250522
+
250523
+ bingroup: extendFlat({}, histogramAttrs.bingroup, {
250524
+ description: [
250525
+ 'Set the `xbingroup` and `ybingroup` default prefix',
250526
+ 'For example, setting a `bingroup` of *1* on two histogram2d traces',
250527
+ 'will make them their x-bins and y-bins match separately.'
250528
+ ].join(' ')
250529
+ }),
250530
+ xbingroup: extendFlat({}, histogramAttrs.bingroup, {
250531
+ description: [
250532
+ 'Set a group of histogram traces which will have compatible x-bin settings.',
250533
+ 'Using `xbingroup`, histogram2d and histogram2dcontour traces ',
250534
+ '(on axes of the same axis type) can have compatible x-bin settings.',
250535
+ 'Note that the same `xbingroup` value can be used to set (1D) histogram `bingroup`'
250536
+ ].join(' ')
250537
+ }),
250538
+ ybingroup: extendFlat({}, histogramAttrs.bingroup, {
250539
+ description: [
250540
+ 'Set a group of histogram traces which will have compatible y-bin settings.',
250541
+ 'Using `ybingroup`, histogram2d and histogram2dcontour traces ',
250542
+ '(on axes of the same axis type) can have compatible y-bin settings.',
250543
+ 'Note that the same `ybingroup` value can be used to set (1D) histogram `bingroup`'
250544
+ ].join(' ')
250545
+ }),
250546
+
250547
+ xgap: heatmapAttrs.xgap,
250548
+ ygap: heatmapAttrs.ygap,
250549
+ zsmooth: heatmapAttrs.zsmooth,
250550
+ xhoverformat: axisHoverFormat('x'),
250551
+ yhoverformat: axisHoverFormat('y'),
250552
+ zhoverformat: axisHoverFormat('z', 1),
250553
+ hovertemplate: hovertemplateAttrs({}, {keys: 'z'}),
250554
+ texttemplate: texttemplateAttrs({
250555
+ arrayOk: false,
250556
+ editType: 'plot'
250557
+ }, {
250558
+ keys: 'z'
250559
+ }),
250560
+ textfont: heatmapAttrs.textfont,
250561
+ showlegend: extendFlat({}, baseAttrs.showlegend, {dflt: false})
250562
+ },
250563
+ colorScaleAttrs('', {cLetter: 'z', autoColorDflt: false})
250564
+ );
250565
+
250566
+
250567
+ /***/ }),
250568
+
250569
+ /***/ 32492:
250570
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
250571
+
250572
+
250573
+
250574
+ var Lib = __webpack_require__(30991);
250575
+ var Axes = __webpack_require__(15076);
250576
+
250577
+ var binFunctions = __webpack_require__(47260);
250578
+ var normFunctions = __webpack_require__(855);
250579
+ var doAvg = __webpack_require__(26756);
250580
+ var getBinSpanLabelRound = __webpack_require__(41574);
250581
+ var calcAllAutoBins = (__webpack_require__(50414).calcAllAutoBins);
250582
+
250583
+ module.exports = function calc(gd, trace) {
250584
+ var xa = Axes.getFromId(gd, trace.xaxis);
250585
+ var ya = Axes.getFromId(gd, trace.yaxis);
250586
+
250587
+ var xcalendar = trace.xcalendar;
250588
+ var ycalendar = trace.ycalendar;
250589
+ var xr2c = function(v) { return xa.r2c(v, 0, xcalendar); };
250590
+ var yr2c = function(v) { return ya.r2c(v, 0, ycalendar); };
250591
+ var xc2r = function(v) { return xa.c2r(v, 0, xcalendar); };
250592
+ var yc2r = function(v) { return ya.c2r(v, 0, ycalendar); };
250593
+
250594
+ var i, j, n, m;
250595
+
250596
+ // calculate the bins
250597
+ var xBinsAndPos = calcAllAutoBins(gd, trace, xa, 'x');
250598
+ var xBinSpec = xBinsAndPos[0];
250599
+ var xPos0 = xBinsAndPos[1];
250600
+ var yBinsAndPos = calcAllAutoBins(gd, trace, ya, 'y');
250601
+ var yBinSpec = yBinsAndPos[0];
250602
+ var yPos0 = yBinsAndPos[1];
250603
+
250604
+ var serieslen = trace._length;
250605
+ if(xPos0.length > serieslen) xPos0.splice(serieslen, xPos0.length - serieslen);
250606
+ if(yPos0.length > serieslen) yPos0.splice(serieslen, yPos0.length - serieslen);
250607
+
250608
+ // make the empty bin array & scale the map
250609
+ var z = [];
250610
+ var onecol = [];
250611
+ var zerocol = [];
250612
+ var nonuniformBinsX = typeof xBinSpec.size === 'string';
250613
+ var nonuniformBinsY = typeof yBinSpec.size === 'string';
250614
+ var xEdges = [];
250615
+ var yEdges = [];
250616
+ var xbins = nonuniformBinsX ? xEdges : xBinSpec;
250617
+ var ybins = nonuniformBinsY ? yEdges : yBinSpec;
250618
+ var total = 0;
250619
+ var counts = [];
250620
+ var inputPoints = [];
250621
+ var norm = trace.histnorm;
250622
+ var func = trace.histfunc;
250623
+ var densitynorm = norm.indexOf('density') !== -1;
250624
+ var extremefunc = func === 'max' || func === 'min';
250625
+ var sizeinit = extremefunc ? null : 0;
250626
+ var binfunc = binFunctions.count;
250627
+ var normfunc = normFunctions[norm];
250628
+ var doavg = false;
250629
+ var xinc = [];
250630
+ var yinc = [];
250631
+
250632
+ // set a binning function other than count?
250633
+ // for binning functions: check first for 'z',
250634
+ // then 'mc' in case we had a colored scatter plot
250635
+ // and want to transfer these colors to the 2D histo
250636
+ // TODO: axe this, make it the responsibility of the app changing type? or an impliedEdit?
250637
+ var rawCounterData = ('z' in trace) ?
250638
+ trace.z :
250639
+ (('marker' in trace && Array.isArray(trace.marker.color)) ?
250640
+ trace.marker.color : '');
250641
+ if(rawCounterData && func !== 'count') {
250642
+ doavg = func === 'avg';
250643
+ binfunc = binFunctions[func];
250644
+ }
250645
+
250646
+ // decrease end a little in case of rounding errors
250647
+ var xBinSize = xBinSpec.size;
250648
+ var xBinStart = xr2c(xBinSpec.start);
250649
+ var xBinEnd = xr2c(xBinSpec.end) +
250650
+ (xBinStart - Axes.tickIncrement(xBinStart, xBinSize, false, xcalendar)) / 1e6;
250651
+
250652
+ for(i = xBinStart; i < xBinEnd; i = Axes.tickIncrement(i, xBinSize, false, xcalendar)) {
250653
+ onecol.push(sizeinit);
250654
+ xEdges.push(i);
250655
+ if(doavg) zerocol.push(0);
250656
+ }
250657
+ xEdges.push(i);
250658
+
250659
+ var nx = onecol.length;
250660
+ var dx = (i - xBinStart) / nx;
250661
+ var x0 = xc2r(xBinStart + dx / 2);
250662
+
250663
+ var yBinSize = yBinSpec.size;
250664
+ var yBinStart = yr2c(yBinSpec.start);
250665
+ var yBinEnd = yr2c(yBinSpec.end) +
250666
+ (yBinStart - Axes.tickIncrement(yBinStart, yBinSize, false, ycalendar)) / 1e6;
250667
+
250668
+ for(i = yBinStart; i < yBinEnd; i = Axes.tickIncrement(i, yBinSize, false, ycalendar)) {
250669
+ z.push(onecol.slice());
250670
+ yEdges.push(i);
250671
+ var ipCol = new Array(nx);
250672
+ for(j = 0; j < nx; j++) ipCol[j] = [];
250673
+ inputPoints.push(ipCol);
250674
+ if(doavg) counts.push(zerocol.slice());
250675
+ }
250676
+ yEdges.push(i);
250677
+
250678
+ var ny = z.length;
250679
+ var dy = (i - yBinStart) / ny;
250680
+ var y0 = yc2r(yBinStart + dy / 2);
250681
+
250682
+ if(densitynorm) {
250683
+ xinc = makeIncrements(onecol.length, xbins, dx, nonuniformBinsX);
250684
+ yinc = makeIncrements(z.length, ybins, dy, nonuniformBinsY);
250685
+ }
250686
+
250687
+ // for date axes we need bin bounds to be calcdata. For nonuniform bins
250688
+ // we already have this, but uniform with start/end/size they're still strings.
250689
+ if(!nonuniformBinsX && xa.type === 'date') xbins = binsToCalc(xr2c, xbins);
250690
+ if(!nonuniformBinsY && ya.type === 'date') ybins = binsToCalc(yr2c, ybins);
250691
+
250692
+ // put data into bins
250693
+ var uniqueValsPerX = true;
250694
+ var uniqueValsPerY = true;
250695
+ var xVals = new Array(nx);
250696
+ var yVals = new Array(ny);
250697
+ var xGapLow = Infinity;
250698
+ var xGapHigh = Infinity;
250699
+ var yGapLow = Infinity;
250700
+ var yGapHigh = Infinity;
250701
+ for(i = 0; i < serieslen; i++) {
250702
+ var xi = xPos0[i];
250703
+ var yi = yPos0[i];
250704
+ n = Lib.findBin(xi, xbins);
250705
+ m = Lib.findBin(yi, ybins);
250706
+ if(n >= 0 && n < nx && m >= 0 && m < ny) {
250707
+ total += binfunc(n, i, z[m], rawCounterData, counts[m]);
250708
+ inputPoints[m][n].push(i);
250709
+
250710
+ if(uniqueValsPerX) {
250711
+ if(xVals[n] === undefined) xVals[n] = xi;
250712
+ else if(xVals[n] !== xi) uniqueValsPerX = false;
250713
+ }
250714
+ if(uniqueValsPerY) {
250715
+ if(yVals[m] === undefined) yVals[m] = yi;
250716
+ else if(yVals[m] !== yi) uniqueValsPerY = false;
250717
+ }
250718
+
250719
+ xGapLow = Math.min(xGapLow, xi - xEdges[n]);
250720
+ xGapHigh = Math.min(xGapHigh, xEdges[n + 1] - xi);
250721
+ yGapLow = Math.min(yGapLow, yi - yEdges[m]);
250722
+ yGapHigh = Math.min(yGapHigh, yEdges[m + 1] - yi);
250723
+ }
250724
+ }
250725
+ // normalize, if needed
250726
+ if(doavg) {
250727
+ for(m = 0; m < ny; m++) total += doAvg(z[m], counts[m]);
250728
+ }
250729
+ if(normfunc) {
250730
+ for(m = 0; m < ny; m++) normfunc(z[m], total, xinc, yinc[m]);
250731
+ }
250732
+
250733
+ return {
250734
+ x: xPos0,
250735
+ xRanges: getRanges(xEdges, uniqueValsPerX && xVals, xGapLow, xGapHigh, xa, xcalendar),
250736
+ x0: x0,
250737
+ dx: dx,
250738
+ y: yPos0,
250739
+ yRanges: getRanges(yEdges, uniqueValsPerY && yVals, yGapLow, yGapHigh, ya, ycalendar),
250740
+ y0: y0,
250741
+ dy: dy,
250742
+ z: z,
250743
+ pts: inputPoints
250744
+ };
250745
+ };
250746
+
250747
+ function makeIncrements(len, bins, dv, nonuniform) {
250748
+ var out = new Array(len);
250749
+ var i;
250750
+ if(nonuniform) {
250751
+ for(i = 0; i < len; i++) out[i] = 1 / (bins[i + 1] - bins[i]);
250752
+ } else {
250753
+ var inc = 1 / dv;
250754
+ for(i = 0; i < len; i++) out[i] = inc;
250755
+ }
250756
+ return out;
250757
+ }
250758
+
250759
+ function binsToCalc(r2c, bins) {
250760
+ return {
250761
+ start: r2c(bins.start),
250762
+ end: r2c(bins.end),
250763
+ size: bins.size
250764
+ };
250765
+ }
250766
+
250767
+ function getRanges(edges, uniqueVals, gapLow, gapHigh, ax, calendar) {
250768
+ var i;
250769
+ var len = edges.length - 1;
250770
+ var out = new Array(len);
250771
+ var roundFn = getBinSpanLabelRound(gapLow, gapHigh, edges, ax, calendar);
250772
+
250773
+ for(i = 0; i < len; i++) {
250774
+ var v = (uniqueVals || [])[i];
250775
+ out[i] = v === undefined ?
250776
+ [roundFn(edges[i]), roundFn(edges[i + 1], true)] :
250777
+ [v, v];
250778
+ }
250779
+ return out;
250780
+ }
250781
+
250782
+
250783
+ /***/ }),
250784
+
250785
+ /***/ 15611:
250786
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
250787
+
250788
+
250789
+
250790
+ var Lib = __webpack_require__(30991);
250791
+
250792
+ var handleSampleDefaults = __webpack_require__(6236);
250793
+ var handleStyleDefaults = __webpack_require__(25157);
250794
+ var colorscaleDefaults = __webpack_require__(13682);
250795
+ var handleHeatmapLabelDefaults = __webpack_require__(52340);
250796
+ var attributes = __webpack_require__(42124);
250797
+
250798
+
250799
+ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
250800
+ function coerce(attr, dflt) {
250801
+ return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);
250802
+ }
250803
+
250804
+ handleSampleDefaults(traceIn, traceOut, coerce, layout);
250805
+ if(traceOut.visible === false) return;
250806
+
250807
+ handleStyleDefaults(traceIn, traceOut, coerce, layout);
250808
+ colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: '', cLetter: 'z'});
250809
+ coerce('hovertemplate');
250810
+
250811
+ handleHeatmapLabelDefaults(coerce, layout);
250812
+
250813
+ coerce('xhoverformat');
250814
+ coerce('yhoverformat');
250815
+ };
250816
+
250817
+
250818
+ /***/ }),
250819
+
250820
+ /***/ 94587:
250821
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
250822
+
250823
+
250824
+
250825
+ var heatmapHover = __webpack_require__(85243);
250826
+ var hoverLabelText = (__webpack_require__(15076).hoverLabelText);
250827
+
250828
+ module.exports = function hoverPoints(pointData, xval, yval, hovermode, opts) {
250829
+ var pts = heatmapHover(pointData, xval, yval, hovermode, opts);
250830
+
250831
+ if(!pts) return;
250832
+
250833
+ pointData = pts[0];
250834
+ var indices = pointData.index;
250835
+ var ny = indices[0];
250836
+ var nx = indices[1];
250837
+ var cd0 = pointData.cd[0];
250838
+ var trace = cd0.trace;
250839
+ var xRange = cd0.xRanges[nx];
250840
+ var yRange = cd0.yRanges[ny];
250841
+
250842
+ pointData.xLabel = hoverLabelText(pointData.xa, [xRange[0], xRange[1]], trace.xhoverformat);
250843
+ pointData.yLabel = hoverLabelText(pointData.ya, [yRange[0], yRange[1]], trace.yhoverformat);
250844
+
250845
+ return pts;
250846
+ };
250847
+
250848
+
250849
+ /***/ }),
250850
+
250851
+ /***/ 3617:
250852
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
250853
+
250854
+
250855
+
250856
+ module.exports = {
250857
+ attributes: __webpack_require__(42124),
250858
+ supplyDefaults: __webpack_require__(15611),
250859
+ crossTraceDefaults: __webpack_require__(34294),
250860
+ calc: __webpack_require__(91980),
250861
+ plot: __webpack_require__(29406),
250862
+ layerName: 'heatmaplayer',
250863
+ colorbar: __webpack_require__(90165),
250864
+ style: __webpack_require__(58756),
250865
+ hoverPoints: __webpack_require__(94587),
250866
+ eventData: __webpack_require__(63870),
250867
+
250868
+ moduleType: 'trace',
250869
+ name: 'histogram2d',
250870
+ basePlotModule: __webpack_require__(47885),
250871
+ categories: ['cartesian', 'svg', '2dMap', 'histogram', 'showLegend'],
250872
+ meta: {
250873
+ hrName: 'histogram_2d',
250874
+ description: [
250875
+ 'The sample data from which statistics are computed is set in `x`',
250876
+ 'and `y` (where `x` and `y` represent marginal distributions,',
250877
+ 'binning is set in `xbins` and `ybins` in this case)',
250878
+ 'or `z` (where `z` represent the 2D distribution and binning set,',
250879
+ 'binning is set by `x` and `y` in this case).',
250880
+ 'The resulting distribution is visualized as a heatmap.'
250881
+ ].join(' ')
250882
+ }
250883
+ };
250884
+
250885
+
250886
+ /***/ }),
250887
+
250888
+ /***/ 6236:
250889
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
250890
+
250891
+
250892
+
250893
+ var Registry = __webpack_require__(13936);
250894
+ var Lib = __webpack_require__(30991);
250895
+
250896
+ module.exports = function handleSampleDefaults(traceIn, traceOut, coerce, layout) {
250897
+ var x = coerce('x');
250898
+ var y = coerce('y');
250899
+ var xlen = Lib.minRowLength(x);
250900
+ var ylen = Lib.minRowLength(y);
250901
+
250902
+ // we could try to accept x0 and dx, etc...
250903
+ // but that's a pretty weird use case.
250904
+ // for now require both x and y explicitly specified.
250905
+ if(!xlen || !ylen) {
250906
+ traceOut.visible = false;
250907
+ return;
250908
+ }
250909
+
250910
+ traceOut._length = Math.min(xlen, ylen);
250911
+
250912
+ var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleTraceDefaults');
250913
+ handleCalendarDefaults(traceIn, traceOut, ['x', 'y'], layout);
250914
+
250915
+ // if marker.color is an array, we can use it in aggregation instead of z
250916
+ var hasAggregationData = coerce('z') || coerce('marker.color');
250917
+
250918
+ if(hasAggregationData) coerce('histfunc');
250919
+ coerce('histnorm');
250920
+
250921
+ // Note: bin defaults are now handled in Histogram2D.crossTraceDefaults
250922
+ // autobin(x|y) are only included here to appease Plotly.validate
250923
+ coerce('autobinx');
250924
+ coerce('autobiny');
250925
+ };
250926
+
250927
+
250928
+ /***/ }),
250929
+
250930
+ /***/ 34872:
250931
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
250932
+
250933
+
250934
+
250935
+ var histogram2dAttrs = __webpack_require__(42124);
250936
+ var contourAttrs = __webpack_require__(70318);
250937
+ var colorScaleAttrs = __webpack_require__(17957);
250938
+ var axisHoverFormat = (__webpack_require__(71018).axisHoverFormat);
250939
+
250940
+ var extendFlat = (__webpack_require__(91307).extendFlat);
250941
+
250942
+ module.exports = extendFlat({
250943
+ x: histogram2dAttrs.x,
250944
+ y: histogram2dAttrs.y,
250945
+ z: histogram2dAttrs.z,
250946
+ marker: histogram2dAttrs.marker,
250947
+
250948
+ histnorm: histogram2dAttrs.histnorm,
250949
+ histfunc: histogram2dAttrs.histfunc,
250950
+ nbinsx: histogram2dAttrs.nbinsx,
250951
+ xbins: histogram2dAttrs.xbins,
250952
+ nbinsy: histogram2dAttrs.nbinsy,
250953
+ ybins: histogram2dAttrs.ybins,
250954
+ autobinx: histogram2dAttrs.autobinx,
250955
+ autobiny: histogram2dAttrs.autobiny,
250956
+
250957
+ bingroup: histogram2dAttrs.bingroup,
250958
+ xbingroup: histogram2dAttrs.xbingroup,
250959
+ ybingroup: histogram2dAttrs.ybingroup,
250960
+
250961
+ autocontour: contourAttrs.autocontour,
250962
+ ncontours: contourAttrs.ncontours,
250963
+ contours: contourAttrs.contours,
250964
+ line: {
250965
+ color: contourAttrs.line.color,
250966
+ width: extendFlat({}, contourAttrs.line.width, {
250967
+ dflt: 0.5,
250968
+ description: 'Sets the contour line width in (in px)'
250969
+ }),
250970
+ dash: contourAttrs.line.dash,
250971
+ smoothing: contourAttrs.line.smoothing,
250972
+ editType: 'plot'
250973
+ },
250974
+ xhoverformat: axisHoverFormat('x'),
250975
+ yhoverformat: axisHoverFormat('y'),
250976
+ zhoverformat: axisHoverFormat('z', 1),
250977
+ hovertemplate: histogram2dAttrs.hovertemplate,
250978
+ texttemplate: contourAttrs.texttemplate,
250979
+ textfont: contourAttrs.textfont
250980
+ },
250981
+ colorScaleAttrs('', {
250982
+ cLetter: 'z',
250983
+ editTypeOverride: 'calc'
250984
+ })
250985
+ );
250986
+
250987
+
250988
+ /***/ }),
250989
+
250990
+ /***/ 14319:
250991
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
250992
+
250993
+
250994
+
250995
+ var Lib = __webpack_require__(30991);
250996
+
250997
+ var handleSampleDefaults = __webpack_require__(6236);
250998
+ var handleContoursDefaults = __webpack_require__(657);
250999
+ var handleStyleDefaults = __webpack_require__(74619);
251000
+ var handleHeatmapLabelDefaults = __webpack_require__(52340);
251001
+ var attributes = __webpack_require__(34872);
251002
+
251003
+
251004
+ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
251005
+ function coerce(attr, dflt) {
251006
+ return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);
251007
+ }
251008
+
251009
+ function coerce2(attr) {
251010
+ return Lib.coerce2(traceIn, traceOut, attributes, attr);
251011
+ }
251012
+
251013
+ handleSampleDefaults(traceIn, traceOut, coerce, layout);
251014
+ if(traceOut.visible === false) return;
251015
+
251016
+ handleContoursDefaults(traceIn, traceOut, coerce, coerce2);
251017
+ handleStyleDefaults(traceIn, traceOut, coerce, layout);
251018
+ coerce('xhoverformat');
251019
+ coerce('yhoverformat');
251020
+ coerce('hovertemplate');
251021
+ if(
251022
+ traceOut.contours &&
251023
+ traceOut.contours.coloring === 'heatmap'
251024
+ ) {
251025
+ handleHeatmapLabelDefaults(coerce, layout);
251026
+ }
251027
+ };
251028
+
251029
+
251030
+ /***/ }),
251031
+
251032
+ /***/ 60613:
251033
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
251034
+
251035
+
251036
+
251037
+ module.exports = {
251038
+ attributes: __webpack_require__(34872),
251039
+ supplyDefaults: __webpack_require__(14319),
251040
+ crossTraceDefaults: __webpack_require__(34294),
251041
+ calc: __webpack_require__(3274),
251042
+ plot: (__webpack_require__(32664).plot),
251043
+ layerName: 'contourlayer',
251044
+ style: __webpack_require__(72690),
251045
+ colorbar: __webpack_require__(70307),
251046
+ hoverPoints: __webpack_require__(52353),
251047
+
251048
+ moduleType: 'trace',
251049
+ name: 'histogram2dcontour',
251050
+ basePlotModule: __webpack_require__(47885),
251051
+ categories: ['cartesian', 'svg', '2dMap', 'contour', 'histogram', 'showLegend'],
251052
+ meta: {
251053
+ hrName: 'histogram_2d_contour',
251054
+ description: [
251055
+ 'The sample data from which statistics are computed is set in `x`',
251056
+ 'and `y` (where `x` and `y` represent marginal distributions,',
251057
+ 'binning is set in `xbins` and `ybins` in this case)',
251058
+ 'or `z` (where `z` represent the 2D distribution and binning set,',
251059
+ 'binning is set by `x` and `y` in this case).',
251060
+ 'The resulting distribution is visualized as a contour plot.'
251061
+ ].join(' ')
251062
+ }
251063
+ };
251064
+
251065
+
251066
251066
  /***/ }),
251067
251067
 
251068
251068
  /***/ 48223:
@@ -267252,993 +267252,6 @@ module.exports = function selectPoints(searchInfo, selectionTester) {
267252
267252
  };
267253
267253
 
267254
267254
 
267255
- /***/ }),
267256
-
267257
- /***/ 1015:
267258
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
267259
-
267260
-
267261
-
267262
- var scatterAttrs = __webpack_require__(86854);
267263
- var fontAttrs = __webpack_require__(70827);
267264
- var colorAttributes = __webpack_require__(17957);
267265
- var axisHoverFormat = (__webpack_require__(71018).axisHoverFormat);
267266
- var hovertemplateAttrs = (__webpack_require__(92710)/* .hovertemplateAttrs */ .rb);
267267
- var texttemplateAttrs = (__webpack_require__(92710)/* .texttemplateAttrs */ .ay);
267268
- var baseAttrs = __webpack_require__(35667);
267269
- var DASHES = __webpack_require__(68828);
267270
-
267271
- var MARKER_SYMBOLS = __webpack_require__(98993);
267272
- var extendFlat = (__webpack_require__(91307).extendFlat);
267273
- var overrideAll = (__webpack_require__(70756).overrideAll);
267274
- var sortObjectKeys = __webpack_require__(99124);
267275
-
267276
- var scatterLineAttrs = scatterAttrs.line;
267277
- var scatterMarkerAttrs = scatterAttrs.marker;
267278
- var scatterMarkerLineAttrs = scatterMarkerAttrs.line;
267279
-
267280
- var lineAttrs = extendFlat({
267281
- width: scatterLineAttrs.width,
267282
- dash: {
267283
- valType: 'enumerated',
267284
- values: sortObjectKeys(DASHES),
267285
- dflt: 'solid',
267286
- description: 'Sets the dash style of the lines.'
267287
- }
267288
- }, colorAttributes('line'));
267289
-
267290
- function makeProjectionAttr(axLetter) {
267291
- return {
267292
- show: {
267293
- valType: 'boolean',
267294
- dflt: false,
267295
- description: [
267296
- 'Sets whether or not projections are shown along the',
267297
- axLetter, 'axis.'
267298
- ].join(' ')
267299
- },
267300
- opacity: {
267301
- valType: 'number',
267302
- min: 0,
267303
- max: 1,
267304
- dflt: 1,
267305
- description: 'Sets the projection color.'
267306
- },
267307
- scale: {
267308
- valType: 'number',
267309
- min: 0,
267310
- max: 10,
267311
- dflt: 2 / 3,
267312
- description: [
267313
- 'Sets the scale factor determining the size of the',
267314
- 'projection marker points.'
267315
- ].join(' ')
267316
- }
267317
- };
267318
- }
267319
-
267320
- var attrs = module.exports = overrideAll({
267321
- x: scatterAttrs.x,
267322
- y: scatterAttrs.y,
267323
- z: {
267324
- valType: 'data_array',
267325
- description: 'Sets the z coordinates.'
267326
- },
267327
-
267328
- text: extendFlat({}, scatterAttrs.text, {
267329
- description: [
267330
- 'Sets text elements associated with each (x,y,z) triplet.',
267331
- 'If a single string, the same string appears over',
267332
- 'all the data points.',
267333
- 'If an array of string, the items are mapped in order to the',
267334
- 'this trace\'s (x,y,z) coordinates.',
267335
- 'If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,',
267336
- 'these elements will be seen in the hover labels.'
267337
- ].join(' ')
267338
- }),
267339
- texttemplate: texttemplateAttrs({}, {
267340
-
267341
- }),
267342
- hovertext: extendFlat({}, scatterAttrs.hovertext, {
267343
- description: [
267344
- 'Sets text elements associated with each (x,y,z) triplet.',
267345
- 'If a single string, the same string appears over',
267346
- 'all the data points.',
267347
- 'If an array of string, the items are mapped in order to the',
267348
- 'this trace\'s (x,y,z) coordinates.',
267349
- 'To be seen, trace `hoverinfo` must contain a *text* flag.'
267350
- ].join(' ')
267351
- }),
267352
- hovertemplate: hovertemplateAttrs(),
267353
-
267354
- xhoverformat: axisHoverFormat('x'),
267355
- yhoverformat: axisHoverFormat('y'),
267356
- zhoverformat: axisHoverFormat('z'),
267357
-
267358
- mode: extendFlat({}, scatterAttrs.mode, // shouldn't this be on-par with 2D?
267359
- {dflt: 'lines+markers'}),
267360
- surfaceaxis: {
267361
- valType: 'enumerated',
267362
- values: [-1, 0, 1, 2],
267363
- dflt: -1,
267364
- description: [
267365
- 'If *-1*, the scatter points are not fill with a surface',
267366
- 'If *0*, *1*, *2*, the scatter points are filled with',
267367
- 'a Delaunay surface about the x, y, z respectively.'
267368
- ].join(' ')
267369
- },
267370
- surfacecolor: {
267371
- valType: 'color',
267372
- description: 'Sets the surface fill color.'
267373
- },
267374
- projection: {
267375
- x: makeProjectionAttr('x'),
267376
- y: makeProjectionAttr('y'),
267377
- z: makeProjectionAttr('z')
267378
- },
267379
-
267380
- connectgaps: scatterAttrs.connectgaps,
267381
- line: lineAttrs,
267382
-
267383
- marker: extendFlat({ // Parity with scatter.js?
267384
- symbol: {
267385
- valType: 'enumerated',
267386
- values: sortObjectKeys(MARKER_SYMBOLS),
267387
- dflt: 'circle',
267388
- arrayOk: true,
267389
- description: 'Sets the marker symbol type.'
267390
- },
267391
- size: extendFlat({}, scatterMarkerAttrs.size, {dflt: 8}),
267392
- sizeref: scatterMarkerAttrs.sizeref,
267393
- sizemin: scatterMarkerAttrs.sizemin,
267394
- sizemode: scatterMarkerAttrs.sizemode,
267395
- opacity: extendFlat({}, scatterMarkerAttrs.opacity, {
267396
- arrayOk: false,
267397
- description: [
267398
- 'Sets the marker opacity.',
267399
- 'Note that the marker opacity for scatter3d traces',
267400
- 'must be a scalar value for performance reasons.',
267401
- 'To set a blending opacity value',
267402
- '(i.e. which is not transparent), set *marker.color*',
267403
- 'to an rgba color and use its alpha channel.'
267404
- ].join(' ')
267405
- }),
267406
- colorbar: scatterMarkerAttrs.colorbar,
267407
-
267408
- line: extendFlat({
267409
- width: extendFlat({}, scatterMarkerLineAttrs.width, {arrayOk: false})
267410
- },
267411
- colorAttributes('marker.line')
267412
- )
267413
- },
267414
- colorAttributes('marker')
267415
- ),
267416
-
267417
- textposition: extendFlat({}, scatterAttrs.textposition, {dflt: 'top center'}),
267418
- textfont: fontAttrs({
267419
- noFontShadow: true,
267420
- noFontLineposition: true,
267421
- noFontTextcase: true,
267422
- editType: 'calc',
267423
- colorEditType: 'style',
267424
- arrayOk: true,
267425
- variantValues: ['normal', 'small-caps'],
267426
- description: 'Sets the text font.'
267427
- }),
267428
-
267429
- opacity: baseAttrs.opacity,
267430
-
267431
- hoverinfo: extendFlat({}, baseAttrs.hoverinfo)
267432
- }, 'calc', 'nested');
267433
-
267434
- attrs.x.editType = attrs.y.editType = attrs.z.editType = 'calc+clearAxisTypes';
267435
-
267436
-
267437
- /***/ }),
267438
-
267439
- /***/ 30935:
267440
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
267441
-
267442
-
267443
-
267444
- var arraysToCalcdata = __webpack_require__(47213);
267445
- var calcColorscale = __webpack_require__(59498);
267446
-
267447
- /**
267448
- * This is a kludge to put the array attributes into
267449
- * calcdata the way Scatter.plot does, so that legends and
267450
- * popovers know what to do with them.
267451
- */
267452
- module.exports = function calc(gd, trace) {
267453
- var cd = [{x: false, y: false, trace: trace, t: {}}];
267454
-
267455
- arraysToCalcdata(cd, trace);
267456
- calcColorscale(gd, trace);
267457
-
267458
- return cd;
267459
- };
267460
-
267461
-
267462
- /***/ }),
267463
-
267464
- /***/ 77681:
267465
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
267466
-
267467
-
267468
-
267469
- var Registry = __webpack_require__(13936);
267470
-
267471
- function calculateAxisErrors(data, params, scaleFactor, axis) {
267472
- if(!params || !params.visible) return null;
267473
-
267474
- var computeError = Registry.getComponentMethod('errorbars', 'makeComputeError')(params);
267475
- var result = new Array(data.length);
267476
-
267477
- for(var i = 0; i < data.length; i++) {
267478
- var errors = computeError(+data[i], i);
267479
-
267480
- if(axis.type === 'log') {
267481
- var point = axis.c2l(data[i]);
267482
- var min = data[i] - errors[0];
267483
- var max = data[i] + errors[1];
267484
-
267485
- result[i] = [
267486
- (axis.c2l(min, true) - point) * scaleFactor,
267487
- (axis.c2l(max, true) - point) * scaleFactor
267488
- ];
267489
-
267490
- // Keep track of the lower error bound which isn't negative!
267491
- if(min > 0) {
267492
- var lower = axis.c2l(min);
267493
- if(!axis._lowerLogErrorBound) axis._lowerLogErrorBound = lower;
267494
- axis._lowerErrorBound = Math.min(axis._lowerLogErrorBound, lower);
267495
- }
267496
- } else {
267497
- result[i] = [
267498
- -errors[0] * scaleFactor,
267499
- errors[1] * scaleFactor
267500
- ];
267501
- }
267502
- }
267503
-
267504
- return result;
267505
- }
267506
-
267507
- function dataLength(array) {
267508
- for(var i = 0; i < array.length; i++) {
267509
- if(array[i]) return array[i].length;
267510
- }
267511
- return 0;
267512
- }
267513
-
267514
- function calculateErrors(data, scaleFactor, sceneLayout) {
267515
- var errors = [
267516
- calculateAxisErrors(data.x, data.error_x, scaleFactor[0], sceneLayout.xaxis),
267517
- calculateAxisErrors(data.y, data.error_y, scaleFactor[1], sceneLayout.yaxis),
267518
- calculateAxisErrors(data.z, data.error_z, scaleFactor[2], sceneLayout.zaxis)
267519
- ];
267520
-
267521
- var n = dataLength(errors);
267522
- if(n === 0) return null;
267523
-
267524
- var errorBounds = new Array(n);
267525
-
267526
- for(var i = 0; i < n; i++) {
267527
- var bound = [[0, 0, 0], [0, 0, 0]];
267528
-
267529
- for(var j = 0; j < 3; j++) {
267530
- if(errors[j]) {
267531
- for(var k = 0; k < 2; k++) {
267532
- bound[k][j] = errors[j][i][k];
267533
- }
267534
- }
267535
- }
267536
-
267537
- errorBounds[i] = bound;
267538
- }
267539
-
267540
- return errorBounds;
267541
- }
267542
-
267543
- module.exports = calculateErrors;
267544
-
267545
-
267546
- /***/ }),
267547
-
267548
- /***/ 93219:
267549
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
267550
-
267551
-
267552
-
267553
- var createLinePlot = (__webpack_require__(46000).gl_line3d);
267554
- var createScatterPlot = (__webpack_require__(46000).gl_scatter3d);
267555
- var createErrorBars = (__webpack_require__(46000).gl_error3d);
267556
- var createMesh = (__webpack_require__(46000).gl_mesh3d);
267557
- var triangulate = (__webpack_require__(46000).delaunay_triangulate);
267558
-
267559
- var Lib = __webpack_require__(30991);
267560
- var str2RgbaArray = __webpack_require__(44960);
267561
- var formatColor = (__webpack_require__(592).formatColor);
267562
- var makeBubbleSizeFn = __webpack_require__(42581);
267563
- var DASH_PATTERNS = __webpack_require__(68828);
267564
- var MARKER_SYMBOLS = __webpack_require__(98993);
267565
-
267566
- var Axes = __webpack_require__(15076);
267567
- var appendArrayPointValue = (__webpack_require__(2918).appendArrayPointValue);
267568
-
267569
- var calculateError = __webpack_require__(77681);
267570
-
267571
- function LineWithMarkers(scene, uid) {
267572
- this.scene = scene;
267573
- this.uid = uid;
267574
- this.linePlot = null;
267575
- this.scatterPlot = null;
267576
- this.errorBars = null;
267577
- this.textMarkers = null;
267578
- this.delaunayMesh = null;
267579
- this.color = null;
267580
- this.mode = '';
267581
- this.dataPoints = [];
267582
- this.axesBounds = [
267583
- [-Infinity, -Infinity, -Infinity],
267584
- [Infinity, Infinity, Infinity]
267585
- ];
267586
- this.textLabels = null;
267587
- this.data = null;
267588
- }
267589
-
267590
- var proto = LineWithMarkers.prototype;
267591
-
267592
- proto.handlePick = function(selection) {
267593
- if(selection.object &&
267594
- (selection.object === this.linePlot ||
267595
- selection.object === this.delaunayMesh ||
267596
- selection.object === this.textMarkers ||
267597
- selection.object === this.scatterPlot)
267598
- ) {
267599
- var ind = selection.index = selection.data.index;
267600
-
267601
- if(selection.object.highlight) {
267602
- selection.object.highlight(null);
267603
- }
267604
- if(this.scatterPlot) {
267605
- selection.object = this.scatterPlot;
267606
- this.scatterPlot.highlight(selection.data);
267607
- }
267608
-
267609
- selection.textLabel = '';
267610
- if(this.textLabels) {
267611
- if(Lib.isArrayOrTypedArray(this.textLabels)) {
267612
- if(this.textLabels[ind] || this.textLabels[ind] === 0) {
267613
- selection.textLabel = this.textLabels[ind];
267614
- }
267615
- } else {
267616
- selection.textLabel = this.textLabels;
267617
- }
267618
- }
267619
-
267620
- selection.traceCoordinate = [
267621
- this.data.x[ind],
267622
- this.data.y[ind],
267623
- this.data.z[ind]
267624
- ];
267625
-
267626
- return true;
267627
- }
267628
- };
267629
-
267630
- function constructDelaunay(points, color, axis) {
267631
- var u = (axis + 1) % 3;
267632
- var v = (axis + 2) % 3;
267633
- var filteredPoints = [];
267634
- var filteredIds = [];
267635
- var i;
267636
-
267637
- for(i = 0; i < points.length; ++i) {
267638
- var p = points[i];
267639
- if(isNaN(p[u]) || !isFinite(p[u]) ||
267640
- isNaN(p[v]) || !isFinite(p[v])) {
267641
- continue;
267642
- }
267643
- filteredPoints.push([p[u], p[v]]);
267644
- filteredIds.push(i);
267645
- }
267646
- var cells = triangulate(filteredPoints);
267647
- for(i = 0; i < cells.length; ++i) {
267648
- var c = cells[i];
267649
- for(var j = 0; j < c.length; ++j) {
267650
- c[j] = filteredIds[c[j]];
267651
- }
267652
- }
267653
- return {
267654
- positions: points,
267655
- cells: cells,
267656
- meshColor: color
267657
- };
267658
- }
267659
-
267660
- function calculateErrorParams(errors) {
267661
- var capSize = [0.0, 0.0, 0.0];
267662
- var color = [[0, 0, 0], [0, 0, 0], [0, 0, 0]];
267663
- var lineWidth = [1.0, 1.0, 1.0];
267664
-
267665
- for(var i = 0; i < 3; i++) {
267666
- var e = errors[i];
267667
-
267668
- if(e && e.copy_zstyle !== false && errors[2].visible !== false) e = errors[2];
267669
- if(!e || !e.visible) continue;
267670
-
267671
- capSize[i] = e.width / 2; // ballpark rescaling
267672
- color[i] = str2RgbaArray(e.color);
267673
- lineWidth[i] = e.thickness;
267674
- }
267675
-
267676
- return {capSize: capSize, color: color, lineWidth: lineWidth};
267677
- }
267678
-
267679
- function parseAlignmentX(a) {
267680
- if(a === null || a === undefined) return 0;
267681
-
267682
- return (a.indexOf('left') > -1) ? -1 :
267683
- (a.indexOf('right') > -1) ? 1 : 0;
267684
- }
267685
-
267686
- function parseAlignmentY(a) {
267687
- if(a === null || a === undefined) return 0;
267688
-
267689
- return (a.indexOf('top') > -1) ? -1 :
267690
- (a.indexOf('bottom') > -1) ? 1 : 0;
267691
- }
267692
-
267693
- function calculateTextOffset(tp) {
267694
- // Read out text properties
267695
-
267696
- var defaultAlignmentX = 0;
267697
- var defaultAlignmentY = 0;
267698
-
267699
- var textOffset = [
267700
- defaultAlignmentX,
267701
- defaultAlignmentY
267702
- ];
267703
-
267704
- if(Array.isArray(tp)) {
267705
- for(var i = 0; i < tp.length; i++) {
267706
- textOffset[i] = [
267707
- defaultAlignmentX,
267708
- defaultAlignmentY
267709
- ];
267710
- if(tp[i]) {
267711
- textOffset[i][0] = parseAlignmentX(tp[i]);
267712
- textOffset[i][1] = parseAlignmentY(tp[i]);
267713
- }
267714
- }
267715
- } else {
267716
- textOffset[0] = parseAlignmentX(tp);
267717
- textOffset[1] = parseAlignmentY(tp);
267718
- }
267719
-
267720
- return textOffset;
267721
- }
267722
-
267723
-
267724
- function calculateSize(sizeIn, sizeFn) {
267725
- // rough parity with Plotly 2D markers
267726
- return sizeFn(sizeIn * 4);
267727
- }
267728
-
267729
- function calculateSymbol(symbolIn) {
267730
- return MARKER_SYMBOLS[symbolIn];
267731
- }
267732
-
267733
- function formatParam(paramIn, len, calculate, dflt, extraFn) {
267734
- var paramOut = null;
267735
-
267736
- if(Lib.isArrayOrTypedArray(paramIn)) {
267737
- paramOut = [];
267738
-
267739
- for(var i = 0; i < len; i++) {
267740
- if(paramIn[i] === undefined) paramOut[i] = dflt;
267741
- else paramOut[i] = calculate(paramIn[i], extraFn);
267742
- }
267743
- } else paramOut = calculate(paramIn, Lib.identity);
267744
-
267745
- return paramOut;
267746
- }
267747
-
267748
-
267749
- function convertPlotlyOptions(scene, data) {
267750
- var points = [];
267751
- var sceneLayout = scene.fullSceneLayout;
267752
- var scaleFactor = scene.dataScale;
267753
- var xaxis = sceneLayout.xaxis;
267754
- var yaxis = sceneLayout.yaxis;
267755
- var zaxis = sceneLayout.zaxis;
267756
- var marker = data.marker;
267757
- var line = data.line;
267758
- var x = data.x || [];
267759
- var y = data.y || [];
267760
- var z = data.z || [];
267761
- var len = x.length;
267762
- var xcalendar = data.xcalendar;
267763
- var ycalendar = data.ycalendar;
267764
- var zcalendar = data.zcalendar;
267765
- var xc, yc, zc;
267766
- var params, i;
267767
- var text;
267768
-
267769
- // Convert points
267770
- for(i = 0; i < len; i++) {
267771
- // sanitize numbers and apply transforms based on axes.type
267772
- xc = xaxis.d2l(x[i], 0, xcalendar) * scaleFactor[0];
267773
- yc = yaxis.d2l(y[i], 0, ycalendar) * scaleFactor[1];
267774
- zc = zaxis.d2l(z[i], 0, zcalendar) * scaleFactor[2];
267775
-
267776
- points[i] = [xc, yc, zc];
267777
- }
267778
-
267779
- // convert text
267780
- if(Array.isArray(data.text)) {
267781
- text = data.text;
267782
- } else if(Lib.isTypedArray(data.text)) {
267783
- text = Array.from(data.text);
267784
- } else if(data.text !== undefined) {
267785
- text = new Array(len);
267786
- for(i = 0; i < len; i++) text[i] = data.text;
267787
- }
267788
-
267789
- function formatter(axName, val) {
267790
- var ax = sceneLayout[axName];
267791
- return Axes.tickText(ax, ax.d2l(val), true).text;
267792
- }
267793
-
267794
- // check texttemplate
267795
- var texttemplate = data.texttemplate;
267796
- if(texttemplate) {
267797
- var fullLayout = scene.fullLayout;
267798
- var d3locale = fullLayout._d3locale;
267799
- var isArray = Array.isArray(texttemplate);
267800
- var N = isArray ? Math.min(texttemplate.length, len) : len;
267801
- var txt = isArray ?
267802
- function(i) { return texttemplate[i]; } :
267803
- function() { return texttemplate; };
267804
-
267805
- text = new Array(N);
267806
-
267807
- for(i = 0; i < N; i++) {
267808
- var d = {x: x[i], y: y[i], z: z[i]};
267809
- var labels = {
267810
- xLabel: formatter('xaxis', x[i]),
267811
- yLabel: formatter('yaxis', y[i]),
267812
- zLabel: formatter('zaxis', z[i])
267813
- };
267814
- var pointValues = {};
267815
- appendArrayPointValue(pointValues, data, i);
267816
- var meta = data._meta || {};
267817
- text[i] = Lib.texttemplateString(txt(i), labels, d3locale, pointValues, d, meta);
267818
- }
267819
- }
267820
-
267821
- // Build object parameters
267822
- params = {
267823
- position: points,
267824
- mode: data.mode,
267825
- text: text
267826
- };
267827
-
267828
- if('line' in data) {
267829
- params.lineColor = formatColor(line, 1, len);
267830
- params.lineWidth = line.width;
267831
- params.lineDashes = line.dash;
267832
- }
267833
-
267834
- if('marker' in data) {
267835
- var sizeFn = makeBubbleSizeFn(data);
267836
-
267837
- params.scatterColor = formatColor(marker, 1, len);
267838
- params.scatterSize = formatParam(marker.size, len, calculateSize, 20, sizeFn);
267839
- params.scatterMarker = formatParam(marker.symbol, len, calculateSymbol, '●');
267840
- params.scatterLineWidth = marker.line.width; // arrayOk === false
267841
- params.scatterLineColor = formatColor(marker.line, 1, len);
267842
- params.scatterAngle = 0;
267843
- }
267844
-
267845
- if('textposition' in data) {
267846
- params.textOffset = calculateTextOffset(data.textposition);
267847
- params.textColor = formatColor(data.textfont, 1, len);
267848
- params.textSize = formatParam(data.textfont.size, len, Lib.identity, 12);
267849
- params.textFontFamily = data.textfont.family;
267850
- params.textFontWeight = data.textfont.weight;
267851
- params.textFontStyle = data.textfont.style;
267852
- params.textFontVariant = data.textfont.variant;
267853
- params.textAngle = 0;
267854
- }
267855
-
267856
- var dims = ['x', 'y', 'z'];
267857
- params.project = [false, false, false];
267858
- params.projectScale = [1, 1, 1];
267859
- params.projectOpacity = [1, 1, 1];
267860
- for(i = 0; i < 3; ++i) {
267861
- var projection = data.projection[dims[i]];
267862
- if((params.project[i] = projection.show)) {
267863
- params.projectOpacity[i] = projection.opacity;
267864
- params.projectScale[i] = projection.scale;
267865
- }
267866
- }
267867
-
267868
- params.errorBounds = calculateError(data, scaleFactor, sceneLayout);
267869
-
267870
- var errorParams = calculateErrorParams([data.error_x, data.error_y, data.error_z]);
267871
- params.errorColor = errorParams.color;
267872
- params.errorLineWidth = errorParams.lineWidth;
267873
- params.errorCapSize = errorParams.capSize;
267874
-
267875
- params.delaunayAxis = data.surfaceaxis;
267876
- params.delaunayColor = str2RgbaArray(data.surfacecolor);
267877
-
267878
- return params;
267879
- }
267880
-
267881
- function _arrayToColor(color) {
267882
- if(Lib.isArrayOrTypedArray(color)) {
267883
- var c = color[0];
267884
-
267885
- if(Lib.isArrayOrTypedArray(c)) color = c;
267886
-
267887
- return 'rgb(' + color.slice(0, 3).map(function(x) {
267888
- return Math.round(x * 255);
267889
- }) + ')';
267890
- }
267891
-
267892
- return null;
267893
- }
267894
-
267895
- function arrayToColor(colors) {
267896
- if(!Lib.isArrayOrTypedArray(colors)) {
267897
- return null;
267898
- }
267899
-
267900
- if((colors.length === 4) && (typeof colors[0] === 'number')) {
267901
- return _arrayToColor(colors);
267902
- }
267903
-
267904
- return colors.map(_arrayToColor);
267905
- }
267906
-
267907
- proto.update = function(data) {
267908
- var gl = this.scene.glplot.gl;
267909
- var lineOptions;
267910
- var scatterOptions;
267911
- var errorOptions;
267912
- var textOptions;
267913
- var dashPattern = DASH_PATTERNS.solid;
267914
-
267915
- // Save data
267916
- this.data = data;
267917
-
267918
- // Run data conversion
267919
- var options = convertPlotlyOptions(this.scene, data);
267920
-
267921
- if('mode' in options) {
267922
- this.mode = options.mode;
267923
- }
267924
- if('lineDashes' in options) {
267925
- if(options.lineDashes in DASH_PATTERNS) {
267926
- dashPattern = DASH_PATTERNS[options.lineDashes];
267927
- }
267928
- }
267929
-
267930
- this.color = arrayToColor(options.scatterColor) ||
267931
- arrayToColor(options.lineColor);
267932
-
267933
- // Save data points
267934
- this.dataPoints = options.position;
267935
-
267936
- lineOptions = {
267937
- gl: this.scene.glplot.gl,
267938
- position: options.position,
267939
- color: options.lineColor,
267940
- lineWidth: options.lineWidth || 1,
267941
- dashes: dashPattern[0],
267942
- dashScale: dashPattern[1],
267943
- opacity: data.opacity,
267944
- connectGaps: data.connectgaps
267945
- };
267946
-
267947
- if(this.mode.indexOf('lines') !== -1) {
267948
- if(this.linePlot) this.linePlot.update(lineOptions);
267949
- else {
267950
- this.linePlot = createLinePlot(lineOptions);
267951
- this.linePlot._trace = this;
267952
- this.scene.glplot.add(this.linePlot);
267953
- }
267954
- } else if(this.linePlot) {
267955
- this.scene.glplot.remove(this.linePlot);
267956
- this.linePlot.dispose();
267957
- this.linePlot = null;
267958
- }
267959
-
267960
- // N.B. marker.opacity must be a scalar for performance
267961
- var scatterOpacity = data.opacity;
267962
- if(data.marker && data.marker.opacity !== undefined) scatterOpacity *= data.marker.opacity;
267963
-
267964
- scatterOptions = {
267965
- gl: this.scene.glplot.gl,
267966
- position: options.position,
267967
- color: options.scatterColor,
267968
- size: options.scatterSize,
267969
- glyph: options.scatterMarker,
267970
- opacity: scatterOpacity,
267971
- orthographic: true,
267972
- lineWidth: options.scatterLineWidth,
267973
- lineColor: options.scatterLineColor,
267974
- project: options.project,
267975
- projectScale: options.projectScale,
267976
- projectOpacity: options.projectOpacity
267977
- };
267978
-
267979
- if(this.mode.indexOf('markers') !== -1) {
267980
- if(this.scatterPlot) this.scatterPlot.update(scatterOptions);
267981
- else {
267982
- this.scatterPlot = createScatterPlot(scatterOptions);
267983
- this.scatterPlot._trace = this;
267984
- this.scatterPlot.highlightScale = 1;
267985
- this.scene.glplot.add(this.scatterPlot);
267986
- }
267987
- } else if(this.scatterPlot) {
267988
- this.scene.glplot.remove(this.scatterPlot);
267989
- this.scatterPlot.dispose();
267990
- this.scatterPlot = null;
267991
- }
267992
-
267993
- textOptions = {
267994
- gl: this.scene.glplot.gl,
267995
- position: options.position,
267996
- glyph: options.text,
267997
- color: options.textColor,
267998
- size: options.textSize,
267999
- angle: options.textAngle,
268000
- alignment: options.textOffset,
268001
- font: options.textFontFamily,
268002
- fontWeight: options.textFontWeight,
268003
- fontStyle: options.textFontStyle,
268004
- fontVariant: options.textFontVariant,
268005
- orthographic: true,
268006
- lineWidth: 0,
268007
- project: false,
268008
- opacity: data.opacity
268009
- };
268010
-
268011
- this.textLabels = data.hovertext || data.text;
268012
-
268013
- if(this.mode.indexOf('text') !== -1) {
268014
- if(this.textMarkers) this.textMarkers.update(textOptions);
268015
- else {
268016
- this.textMarkers = createScatterPlot(textOptions);
268017
- this.textMarkers._trace = this;
268018
- this.textMarkers.highlightScale = 1;
268019
- this.scene.glplot.add(this.textMarkers);
268020
- }
268021
- } else if(this.textMarkers) {
268022
- this.scene.glplot.remove(this.textMarkers);
268023
- this.textMarkers.dispose();
268024
- this.textMarkers = null;
268025
- }
268026
-
268027
- errorOptions = {
268028
- gl: this.scene.glplot.gl,
268029
- position: options.position,
268030
- color: options.errorColor,
268031
- error: options.errorBounds,
268032
- lineWidth: options.errorLineWidth,
268033
- capSize: options.errorCapSize,
268034
- opacity: data.opacity
268035
- };
268036
- if(this.errorBars) {
268037
- if(options.errorBounds) {
268038
- this.errorBars.update(errorOptions);
268039
- } else {
268040
- this.scene.glplot.remove(this.errorBars);
268041
- this.errorBars.dispose();
268042
- this.errorBars = null;
268043
- }
268044
- } else if(options.errorBounds) {
268045
- this.errorBars = createErrorBars(errorOptions);
268046
- this.errorBars._trace = this;
268047
- this.scene.glplot.add(this.errorBars);
268048
- }
268049
-
268050
- if(options.delaunayAxis >= 0) {
268051
- var delaunayOptions = constructDelaunay(
268052
- options.position,
268053
- options.delaunayColor,
268054
- options.delaunayAxis
268055
- );
268056
- delaunayOptions.opacity = data.opacity;
268057
-
268058
- if(this.delaunayMesh) {
268059
- this.delaunayMesh.update(delaunayOptions);
268060
- } else {
268061
- delaunayOptions.gl = gl;
268062
- this.delaunayMesh = createMesh(delaunayOptions);
268063
- this.delaunayMesh._trace = this;
268064
- this.scene.glplot.add(this.delaunayMesh);
268065
- }
268066
- } else if(this.delaunayMesh) {
268067
- this.scene.glplot.remove(this.delaunayMesh);
268068
- this.delaunayMesh.dispose();
268069
- this.delaunayMesh = null;
268070
- }
268071
- };
268072
-
268073
- proto.dispose = function() {
268074
- if(this.linePlot) {
268075
- this.scene.glplot.remove(this.linePlot);
268076
- this.linePlot.dispose();
268077
- }
268078
- if(this.scatterPlot) {
268079
- this.scene.glplot.remove(this.scatterPlot);
268080
- this.scatterPlot.dispose();
268081
- }
268082
- if(this.errorBars) {
268083
- this.scene.glplot.remove(this.errorBars);
268084
- this.errorBars.dispose();
268085
- }
268086
- if(this.textMarkers) {
268087
- this.scene.glplot.remove(this.textMarkers);
268088
- this.textMarkers.dispose();
268089
- }
268090
- if(this.delaunayMesh) {
268091
- this.scene.glplot.remove(this.delaunayMesh);
268092
- this.delaunayMesh.dispose();
268093
- }
268094
- };
268095
-
268096
- function createLineWithMarkers(scene, data) {
268097
- var plot = new LineWithMarkers(scene, data.uid);
268098
- plot.update(data);
268099
- return plot;
268100
- }
268101
-
268102
- module.exports = createLineWithMarkers;
268103
-
268104
-
268105
- /***/ }),
268106
-
268107
- /***/ 13744:
268108
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
268109
-
268110
-
268111
-
268112
- var Registry = __webpack_require__(13936);
268113
- var Lib = __webpack_require__(30991);
268114
-
268115
- var subTypes = __webpack_require__(33068);
268116
- var handleMarkerDefaults = __webpack_require__(15294);
268117
- var handleLineDefaults = __webpack_require__(82094);
268118
- var handleTextDefaults = __webpack_require__(94729);
268119
-
268120
- var attributes = __webpack_require__(1015);
268121
-
268122
- module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
268123
- function coerce(attr, dflt) {
268124
- return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);
268125
- }
268126
-
268127
- var len = handleXYZDefaults(traceIn, traceOut, coerce, layout);
268128
- if(!len) {
268129
- traceOut.visible = false;
268130
- return;
268131
- }
268132
-
268133
- coerce('text');
268134
- coerce('hovertext');
268135
- coerce('hovertemplate');
268136
- coerce('xhoverformat');
268137
- coerce('yhoverformat');
268138
- coerce('zhoverformat');
268139
-
268140
- coerce('mode');
268141
-
268142
- if(subTypes.hasMarkers(traceOut)) {
268143
- handleMarkerDefaults(traceIn, traceOut, defaultColor, layout, coerce, {noSelect: true, noAngle: true});
268144
- }
268145
-
268146
- if(subTypes.hasLines(traceOut)) {
268147
- coerce('connectgaps');
268148
- handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce);
268149
- }
268150
-
268151
- if(subTypes.hasText(traceOut)) {
268152
- coerce('texttemplate');
268153
- handleTextDefaults(traceIn, traceOut, layout, coerce, {
268154
- noSelect: true,
268155
- noFontShadow: true,
268156
- noFontLineposition: true,
268157
- noFontTextcase: true,
268158
- });
268159
- }
268160
-
268161
- var lineColor = (traceOut.line || {}).color;
268162
- var markerColor = (traceOut.marker || {}).color;
268163
- if(coerce('surfaceaxis') >= 0) coerce('surfacecolor', lineColor || markerColor);
268164
-
268165
- var dims = ['x', 'y', 'z'];
268166
- for(var i = 0; i < 3; ++i) {
268167
- var projection = 'projection.' + dims[i];
268168
- if(coerce(projection + '.show')) {
268169
- coerce(projection + '.opacity');
268170
- coerce(projection + '.scale');
268171
- }
268172
- }
268173
-
268174
- var errorBarsSupplyDefaults = Registry.getComponentMethod('errorbars', 'supplyDefaults');
268175
- errorBarsSupplyDefaults(traceIn, traceOut, lineColor || markerColor || defaultColor, {axis: 'z'});
268176
- errorBarsSupplyDefaults(traceIn, traceOut, lineColor || markerColor || defaultColor, {axis: 'y', inherit: 'z'});
268177
- errorBarsSupplyDefaults(traceIn, traceOut, lineColor || markerColor || defaultColor, {axis: 'x', inherit: 'z'});
268178
- };
268179
-
268180
- function handleXYZDefaults(traceIn, traceOut, coerce, layout) {
268181
- var len = 0;
268182
- var x = coerce('x');
268183
- var y = coerce('y');
268184
- var z = coerce('z');
268185
-
268186
- var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleTraceDefaults');
268187
- handleCalendarDefaults(traceIn, traceOut, ['x', 'y', 'z'], layout);
268188
-
268189
- if(x && y && z) {
268190
- // TODO: what happens if one is missing?
268191
- len = Math.min(x.length, y.length, z.length);
268192
- traceOut._length = traceOut._xlength = traceOut._ylength = traceOut._zlength = len;
268193
- }
268194
-
268195
- return len;
268196
- }
268197
-
268198
-
268199
- /***/ }),
268200
-
268201
- /***/ 68860:
268202
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
268203
-
268204
-
268205
-
268206
- module.exports = {
268207
- plot: __webpack_require__(93219),
268208
- attributes: __webpack_require__(1015),
268209
- markerSymbols: __webpack_require__(98993),
268210
- supplyDefaults: __webpack_require__(13744),
268211
- colorbar: [
268212
- {
268213
- container: 'marker',
268214
- min: 'cmin',
268215
- max: 'cmax'
268216
- }, {
268217
- container: 'line',
268218
- min: 'cmin',
268219
- max: 'cmax'
268220
- }
268221
- ],
268222
- calc: __webpack_require__(30935),
268223
-
268224
- moduleType: 'trace',
268225
- name: 'scatter3d',
268226
- basePlotModule: __webpack_require__(68137),
268227
- categories: ['gl3d', 'symbols', 'showLegend', 'scatter-like'],
268228
- meta: {
268229
- hrName: 'scatter_3d',
268230
- description: [
268231
- 'The data visualized as scatter point or lines in 3D dimension',
268232
- 'is set in `x`, `y`, `z`.',
268233
- 'Text (appearing either on the chart or on hover only) is via `text`.',
268234
- 'Bubble charts are achieved by setting `marker.size` and/or `marker.color`',
268235
- 'Projections are achieved via `projection`.',
268236
- 'Surface fills are achieved via `surfaceaxis`.'
268237
- ].join(' ')
268238
- }
268239
- };
268240
-
268241
-
268242
267255
  /***/ }),
268243
267256
 
268244
267257
  /***/ 47213:
@@ -272169,6 +271182,993 @@ module.exports = function handleXYDefaults(traceIn, traceOut, layout, coerce) {
272169
271182
  };
272170
271183
 
272171
271184
 
271185
+ /***/ }),
271186
+
271187
+ /***/ 1015:
271188
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
271189
+
271190
+
271191
+
271192
+ var scatterAttrs = __webpack_require__(86854);
271193
+ var fontAttrs = __webpack_require__(70827);
271194
+ var colorAttributes = __webpack_require__(17957);
271195
+ var axisHoverFormat = (__webpack_require__(71018).axisHoverFormat);
271196
+ var hovertemplateAttrs = (__webpack_require__(92710)/* .hovertemplateAttrs */ .rb);
271197
+ var texttemplateAttrs = (__webpack_require__(92710)/* .texttemplateAttrs */ .ay);
271198
+ var baseAttrs = __webpack_require__(35667);
271199
+ var DASHES = __webpack_require__(68828);
271200
+
271201
+ var MARKER_SYMBOLS = __webpack_require__(98993);
271202
+ var extendFlat = (__webpack_require__(91307).extendFlat);
271203
+ var overrideAll = (__webpack_require__(70756).overrideAll);
271204
+ var sortObjectKeys = __webpack_require__(99124);
271205
+
271206
+ var scatterLineAttrs = scatterAttrs.line;
271207
+ var scatterMarkerAttrs = scatterAttrs.marker;
271208
+ var scatterMarkerLineAttrs = scatterMarkerAttrs.line;
271209
+
271210
+ var lineAttrs = extendFlat({
271211
+ width: scatterLineAttrs.width,
271212
+ dash: {
271213
+ valType: 'enumerated',
271214
+ values: sortObjectKeys(DASHES),
271215
+ dflt: 'solid',
271216
+ description: 'Sets the dash style of the lines.'
271217
+ }
271218
+ }, colorAttributes('line'));
271219
+
271220
+ function makeProjectionAttr(axLetter) {
271221
+ return {
271222
+ show: {
271223
+ valType: 'boolean',
271224
+ dflt: false,
271225
+ description: [
271226
+ 'Sets whether or not projections are shown along the',
271227
+ axLetter, 'axis.'
271228
+ ].join(' ')
271229
+ },
271230
+ opacity: {
271231
+ valType: 'number',
271232
+ min: 0,
271233
+ max: 1,
271234
+ dflt: 1,
271235
+ description: 'Sets the projection color.'
271236
+ },
271237
+ scale: {
271238
+ valType: 'number',
271239
+ min: 0,
271240
+ max: 10,
271241
+ dflt: 2 / 3,
271242
+ description: [
271243
+ 'Sets the scale factor determining the size of the',
271244
+ 'projection marker points.'
271245
+ ].join(' ')
271246
+ }
271247
+ };
271248
+ }
271249
+
271250
+ var attrs = module.exports = overrideAll({
271251
+ x: scatterAttrs.x,
271252
+ y: scatterAttrs.y,
271253
+ z: {
271254
+ valType: 'data_array',
271255
+ description: 'Sets the z coordinates.'
271256
+ },
271257
+
271258
+ text: extendFlat({}, scatterAttrs.text, {
271259
+ description: [
271260
+ 'Sets text elements associated with each (x,y,z) triplet.',
271261
+ 'If a single string, the same string appears over',
271262
+ 'all the data points.',
271263
+ 'If an array of string, the items are mapped in order to the',
271264
+ 'this trace\'s (x,y,z) coordinates.',
271265
+ 'If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,',
271266
+ 'these elements will be seen in the hover labels.'
271267
+ ].join(' ')
271268
+ }),
271269
+ texttemplate: texttemplateAttrs({}, {
271270
+
271271
+ }),
271272
+ hovertext: extendFlat({}, scatterAttrs.hovertext, {
271273
+ description: [
271274
+ 'Sets text elements associated with each (x,y,z) triplet.',
271275
+ 'If a single string, the same string appears over',
271276
+ 'all the data points.',
271277
+ 'If an array of string, the items are mapped in order to the',
271278
+ 'this trace\'s (x,y,z) coordinates.',
271279
+ 'To be seen, trace `hoverinfo` must contain a *text* flag.'
271280
+ ].join(' ')
271281
+ }),
271282
+ hovertemplate: hovertemplateAttrs(),
271283
+
271284
+ xhoverformat: axisHoverFormat('x'),
271285
+ yhoverformat: axisHoverFormat('y'),
271286
+ zhoverformat: axisHoverFormat('z'),
271287
+
271288
+ mode: extendFlat({}, scatterAttrs.mode, // shouldn't this be on-par with 2D?
271289
+ {dflt: 'lines+markers'}),
271290
+ surfaceaxis: {
271291
+ valType: 'enumerated',
271292
+ values: [-1, 0, 1, 2],
271293
+ dflt: -1,
271294
+ description: [
271295
+ 'If *-1*, the scatter points are not fill with a surface',
271296
+ 'If *0*, *1*, *2*, the scatter points are filled with',
271297
+ 'a Delaunay surface about the x, y, z respectively.'
271298
+ ].join(' ')
271299
+ },
271300
+ surfacecolor: {
271301
+ valType: 'color',
271302
+ description: 'Sets the surface fill color.'
271303
+ },
271304
+ projection: {
271305
+ x: makeProjectionAttr('x'),
271306
+ y: makeProjectionAttr('y'),
271307
+ z: makeProjectionAttr('z')
271308
+ },
271309
+
271310
+ connectgaps: scatterAttrs.connectgaps,
271311
+ line: lineAttrs,
271312
+
271313
+ marker: extendFlat({ // Parity with scatter.js?
271314
+ symbol: {
271315
+ valType: 'enumerated',
271316
+ values: sortObjectKeys(MARKER_SYMBOLS),
271317
+ dflt: 'circle',
271318
+ arrayOk: true,
271319
+ description: 'Sets the marker symbol type.'
271320
+ },
271321
+ size: extendFlat({}, scatterMarkerAttrs.size, {dflt: 8}),
271322
+ sizeref: scatterMarkerAttrs.sizeref,
271323
+ sizemin: scatterMarkerAttrs.sizemin,
271324
+ sizemode: scatterMarkerAttrs.sizemode,
271325
+ opacity: extendFlat({}, scatterMarkerAttrs.opacity, {
271326
+ arrayOk: false,
271327
+ description: [
271328
+ 'Sets the marker opacity.',
271329
+ 'Note that the marker opacity for scatter3d traces',
271330
+ 'must be a scalar value for performance reasons.',
271331
+ 'To set a blending opacity value',
271332
+ '(i.e. which is not transparent), set *marker.color*',
271333
+ 'to an rgba color and use its alpha channel.'
271334
+ ].join(' ')
271335
+ }),
271336
+ colorbar: scatterMarkerAttrs.colorbar,
271337
+
271338
+ line: extendFlat({
271339
+ width: extendFlat({}, scatterMarkerLineAttrs.width, {arrayOk: false})
271340
+ },
271341
+ colorAttributes('marker.line')
271342
+ )
271343
+ },
271344
+ colorAttributes('marker')
271345
+ ),
271346
+
271347
+ textposition: extendFlat({}, scatterAttrs.textposition, {dflt: 'top center'}),
271348
+ textfont: fontAttrs({
271349
+ noFontShadow: true,
271350
+ noFontLineposition: true,
271351
+ noFontTextcase: true,
271352
+ editType: 'calc',
271353
+ colorEditType: 'style',
271354
+ arrayOk: true,
271355
+ variantValues: ['normal', 'small-caps'],
271356
+ description: 'Sets the text font.'
271357
+ }),
271358
+
271359
+ opacity: baseAttrs.opacity,
271360
+
271361
+ hoverinfo: extendFlat({}, baseAttrs.hoverinfo)
271362
+ }, 'calc', 'nested');
271363
+
271364
+ attrs.x.editType = attrs.y.editType = attrs.z.editType = 'calc+clearAxisTypes';
271365
+
271366
+
271367
+ /***/ }),
271368
+
271369
+ /***/ 30935:
271370
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
271371
+
271372
+
271373
+
271374
+ var arraysToCalcdata = __webpack_require__(47213);
271375
+ var calcColorscale = __webpack_require__(59498);
271376
+
271377
+ /**
271378
+ * This is a kludge to put the array attributes into
271379
+ * calcdata the way Scatter.plot does, so that legends and
271380
+ * popovers know what to do with them.
271381
+ */
271382
+ module.exports = function calc(gd, trace) {
271383
+ var cd = [{x: false, y: false, trace: trace, t: {}}];
271384
+
271385
+ arraysToCalcdata(cd, trace);
271386
+ calcColorscale(gd, trace);
271387
+
271388
+ return cd;
271389
+ };
271390
+
271391
+
271392
+ /***/ }),
271393
+
271394
+ /***/ 77681:
271395
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
271396
+
271397
+
271398
+
271399
+ var Registry = __webpack_require__(13936);
271400
+
271401
+ function calculateAxisErrors(data, params, scaleFactor, axis) {
271402
+ if(!params || !params.visible) return null;
271403
+
271404
+ var computeError = Registry.getComponentMethod('errorbars', 'makeComputeError')(params);
271405
+ var result = new Array(data.length);
271406
+
271407
+ for(var i = 0; i < data.length; i++) {
271408
+ var errors = computeError(+data[i], i);
271409
+
271410
+ if(axis.type === 'log') {
271411
+ var point = axis.c2l(data[i]);
271412
+ var min = data[i] - errors[0];
271413
+ var max = data[i] + errors[1];
271414
+
271415
+ result[i] = [
271416
+ (axis.c2l(min, true) - point) * scaleFactor,
271417
+ (axis.c2l(max, true) - point) * scaleFactor
271418
+ ];
271419
+
271420
+ // Keep track of the lower error bound which isn't negative!
271421
+ if(min > 0) {
271422
+ var lower = axis.c2l(min);
271423
+ if(!axis._lowerLogErrorBound) axis._lowerLogErrorBound = lower;
271424
+ axis._lowerErrorBound = Math.min(axis._lowerLogErrorBound, lower);
271425
+ }
271426
+ } else {
271427
+ result[i] = [
271428
+ -errors[0] * scaleFactor,
271429
+ errors[1] * scaleFactor
271430
+ ];
271431
+ }
271432
+ }
271433
+
271434
+ return result;
271435
+ }
271436
+
271437
+ function dataLength(array) {
271438
+ for(var i = 0; i < array.length; i++) {
271439
+ if(array[i]) return array[i].length;
271440
+ }
271441
+ return 0;
271442
+ }
271443
+
271444
+ function calculateErrors(data, scaleFactor, sceneLayout) {
271445
+ var errors = [
271446
+ calculateAxisErrors(data.x, data.error_x, scaleFactor[0], sceneLayout.xaxis),
271447
+ calculateAxisErrors(data.y, data.error_y, scaleFactor[1], sceneLayout.yaxis),
271448
+ calculateAxisErrors(data.z, data.error_z, scaleFactor[2], sceneLayout.zaxis)
271449
+ ];
271450
+
271451
+ var n = dataLength(errors);
271452
+ if(n === 0) return null;
271453
+
271454
+ var errorBounds = new Array(n);
271455
+
271456
+ for(var i = 0; i < n; i++) {
271457
+ var bound = [[0, 0, 0], [0, 0, 0]];
271458
+
271459
+ for(var j = 0; j < 3; j++) {
271460
+ if(errors[j]) {
271461
+ for(var k = 0; k < 2; k++) {
271462
+ bound[k][j] = errors[j][i][k];
271463
+ }
271464
+ }
271465
+ }
271466
+
271467
+ errorBounds[i] = bound;
271468
+ }
271469
+
271470
+ return errorBounds;
271471
+ }
271472
+
271473
+ module.exports = calculateErrors;
271474
+
271475
+
271476
+ /***/ }),
271477
+
271478
+ /***/ 93219:
271479
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
271480
+
271481
+
271482
+
271483
+ var createLinePlot = (__webpack_require__(46000).gl_line3d);
271484
+ var createScatterPlot = (__webpack_require__(46000).gl_scatter3d);
271485
+ var createErrorBars = (__webpack_require__(46000).gl_error3d);
271486
+ var createMesh = (__webpack_require__(46000).gl_mesh3d);
271487
+ var triangulate = (__webpack_require__(46000).delaunay_triangulate);
271488
+
271489
+ var Lib = __webpack_require__(30991);
271490
+ var str2RgbaArray = __webpack_require__(44960);
271491
+ var formatColor = (__webpack_require__(592).formatColor);
271492
+ var makeBubbleSizeFn = __webpack_require__(42581);
271493
+ var DASH_PATTERNS = __webpack_require__(68828);
271494
+ var MARKER_SYMBOLS = __webpack_require__(98993);
271495
+
271496
+ var Axes = __webpack_require__(15076);
271497
+ var appendArrayPointValue = (__webpack_require__(2918).appendArrayPointValue);
271498
+
271499
+ var calculateError = __webpack_require__(77681);
271500
+
271501
+ function LineWithMarkers(scene, uid) {
271502
+ this.scene = scene;
271503
+ this.uid = uid;
271504
+ this.linePlot = null;
271505
+ this.scatterPlot = null;
271506
+ this.errorBars = null;
271507
+ this.textMarkers = null;
271508
+ this.delaunayMesh = null;
271509
+ this.color = null;
271510
+ this.mode = '';
271511
+ this.dataPoints = [];
271512
+ this.axesBounds = [
271513
+ [-Infinity, -Infinity, -Infinity],
271514
+ [Infinity, Infinity, Infinity]
271515
+ ];
271516
+ this.textLabels = null;
271517
+ this.data = null;
271518
+ }
271519
+
271520
+ var proto = LineWithMarkers.prototype;
271521
+
271522
+ proto.handlePick = function(selection) {
271523
+ if(selection.object &&
271524
+ (selection.object === this.linePlot ||
271525
+ selection.object === this.delaunayMesh ||
271526
+ selection.object === this.textMarkers ||
271527
+ selection.object === this.scatterPlot)
271528
+ ) {
271529
+ var ind = selection.index = selection.data.index;
271530
+
271531
+ if(selection.object.highlight) {
271532
+ selection.object.highlight(null);
271533
+ }
271534
+ if(this.scatterPlot) {
271535
+ selection.object = this.scatterPlot;
271536
+ this.scatterPlot.highlight(selection.data);
271537
+ }
271538
+
271539
+ selection.textLabel = '';
271540
+ if(this.textLabels) {
271541
+ if(Lib.isArrayOrTypedArray(this.textLabels)) {
271542
+ if(this.textLabels[ind] || this.textLabels[ind] === 0) {
271543
+ selection.textLabel = this.textLabels[ind];
271544
+ }
271545
+ } else {
271546
+ selection.textLabel = this.textLabels;
271547
+ }
271548
+ }
271549
+
271550
+ selection.traceCoordinate = [
271551
+ this.data.x[ind],
271552
+ this.data.y[ind],
271553
+ this.data.z[ind]
271554
+ ];
271555
+
271556
+ return true;
271557
+ }
271558
+ };
271559
+
271560
+ function constructDelaunay(points, color, axis) {
271561
+ var u = (axis + 1) % 3;
271562
+ var v = (axis + 2) % 3;
271563
+ var filteredPoints = [];
271564
+ var filteredIds = [];
271565
+ var i;
271566
+
271567
+ for(i = 0; i < points.length; ++i) {
271568
+ var p = points[i];
271569
+ if(isNaN(p[u]) || !isFinite(p[u]) ||
271570
+ isNaN(p[v]) || !isFinite(p[v])) {
271571
+ continue;
271572
+ }
271573
+ filteredPoints.push([p[u], p[v]]);
271574
+ filteredIds.push(i);
271575
+ }
271576
+ var cells = triangulate(filteredPoints);
271577
+ for(i = 0; i < cells.length; ++i) {
271578
+ var c = cells[i];
271579
+ for(var j = 0; j < c.length; ++j) {
271580
+ c[j] = filteredIds[c[j]];
271581
+ }
271582
+ }
271583
+ return {
271584
+ positions: points,
271585
+ cells: cells,
271586
+ meshColor: color
271587
+ };
271588
+ }
271589
+
271590
+ function calculateErrorParams(errors) {
271591
+ var capSize = [0.0, 0.0, 0.0];
271592
+ var color = [[0, 0, 0], [0, 0, 0], [0, 0, 0]];
271593
+ var lineWidth = [1.0, 1.0, 1.0];
271594
+
271595
+ for(var i = 0; i < 3; i++) {
271596
+ var e = errors[i];
271597
+
271598
+ if(e && e.copy_zstyle !== false && errors[2].visible !== false) e = errors[2];
271599
+ if(!e || !e.visible) continue;
271600
+
271601
+ capSize[i] = e.width / 2; // ballpark rescaling
271602
+ color[i] = str2RgbaArray(e.color);
271603
+ lineWidth[i] = e.thickness;
271604
+ }
271605
+
271606
+ return {capSize: capSize, color: color, lineWidth: lineWidth};
271607
+ }
271608
+
271609
+ function parseAlignmentX(a) {
271610
+ if(a === null || a === undefined) return 0;
271611
+
271612
+ return (a.indexOf('left') > -1) ? -1 :
271613
+ (a.indexOf('right') > -1) ? 1 : 0;
271614
+ }
271615
+
271616
+ function parseAlignmentY(a) {
271617
+ if(a === null || a === undefined) return 0;
271618
+
271619
+ return (a.indexOf('top') > -1) ? -1 :
271620
+ (a.indexOf('bottom') > -1) ? 1 : 0;
271621
+ }
271622
+
271623
+ function calculateTextOffset(tp) {
271624
+ // Read out text properties
271625
+
271626
+ var defaultAlignmentX = 0;
271627
+ var defaultAlignmentY = 0;
271628
+
271629
+ var textOffset = [
271630
+ defaultAlignmentX,
271631
+ defaultAlignmentY
271632
+ ];
271633
+
271634
+ if(Array.isArray(tp)) {
271635
+ for(var i = 0; i < tp.length; i++) {
271636
+ textOffset[i] = [
271637
+ defaultAlignmentX,
271638
+ defaultAlignmentY
271639
+ ];
271640
+ if(tp[i]) {
271641
+ textOffset[i][0] = parseAlignmentX(tp[i]);
271642
+ textOffset[i][1] = parseAlignmentY(tp[i]);
271643
+ }
271644
+ }
271645
+ } else {
271646
+ textOffset[0] = parseAlignmentX(tp);
271647
+ textOffset[1] = parseAlignmentY(tp);
271648
+ }
271649
+
271650
+ return textOffset;
271651
+ }
271652
+
271653
+
271654
+ function calculateSize(sizeIn, sizeFn) {
271655
+ // rough parity with Plotly 2D markers
271656
+ return sizeFn(sizeIn * 4);
271657
+ }
271658
+
271659
+ function calculateSymbol(symbolIn) {
271660
+ return MARKER_SYMBOLS[symbolIn];
271661
+ }
271662
+
271663
+ function formatParam(paramIn, len, calculate, dflt, extraFn) {
271664
+ var paramOut = null;
271665
+
271666
+ if(Lib.isArrayOrTypedArray(paramIn)) {
271667
+ paramOut = [];
271668
+
271669
+ for(var i = 0; i < len; i++) {
271670
+ if(paramIn[i] === undefined) paramOut[i] = dflt;
271671
+ else paramOut[i] = calculate(paramIn[i], extraFn);
271672
+ }
271673
+ } else paramOut = calculate(paramIn, Lib.identity);
271674
+
271675
+ return paramOut;
271676
+ }
271677
+
271678
+
271679
+ function convertPlotlyOptions(scene, data) {
271680
+ var points = [];
271681
+ var sceneLayout = scene.fullSceneLayout;
271682
+ var scaleFactor = scene.dataScale;
271683
+ var xaxis = sceneLayout.xaxis;
271684
+ var yaxis = sceneLayout.yaxis;
271685
+ var zaxis = sceneLayout.zaxis;
271686
+ var marker = data.marker;
271687
+ var line = data.line;
271688
+ var x = data.x || [];
271689
+ var y = data.y || [];
271690
+ var z = data.z || [];
271691
+ var len = x.length;
271692
+ var xcalendar = data.xcalendar;
271693
+ var ycalendar = data.ycalendar;
271694
+ var zcalendar = data.zcalendar;
271695
+ var xc, yc, zc;
271696
+ var params, i;
271697
+ var text;
271698
+
271699
+ // Convert points
271700
+ for(i = 0; i < len; i++) {
271701
+ // sanitize numbers and apply transforms based on axes.type
271702
+ xc = xaxis.d2l(x[i], 0, xcalendar) * scaleFactor[0];
271703
+ yc = yaxis.d2l(y[i], 0, ycalendar) * scaleFactor[1];
271704
+ zc = zaxis.d2l(z[i], 0, zcalendar) * scaleFactor[2];
271705
+
271706
+ points[i] = [xc, yc, zc];
271707
+ }
271708
+
271709
+ // convert text
271710
+ if(Array.isArray(data.text)) {
271711
+ text = data.text;
271712
+ } else if(Lib.isTypedArray(data.text)) {
271713
+ text = Array.from(data.text);
271714
+ } else if(data.text !== undefined) {
271715
+ text = new Array(len);
271716
+ for(i = 0; i < len; i++) text[i] = data.text;
271717
+ }
271718
+
271719
+ function formatter(axName, val) {
271720
+ var ax = sceneLayout[axName];
271721
+ return Axes.tickText(ax, ax.d2l(val), true).text;
271722
+ }
271723
+
271724
+ // check texttemplate
271725
+ var texttemplate = data.texttemplate;
271726
+ if(texttemplate) {
271727
+ var fullLayout = scene.fullLayout;
271728
+ var d3locale = fullLayout._d3locale;
271729
+ var isArray = Array.isArray(texttemplate);
271730
+ var N = isArray ? Math.min(texttemplate.length, len) : len;
271731
+ var txt = isArray ?
271732
+ function(i) { return texttemplate[i]; } :
271733
+ function() { return texttemplate; };
271734
+
271735
+ text = new Array(N);
271736
+
271737
+ for(i = 0; i < N; i++) {
271738
+ var d = {x: x[i], y: y[i], z: z[i]};
271739
+ var labels = {
271740
+ xLabel: formatter('xaxis', x[i]),
271741
+ yLabel: formatter('yaxis', y[i]),
271742
+ zLabel: formatter('zaxis', z[i])
271743
+ };
271744
+ var pointValues = {};
271745
+ appendArrayPointValue(pointValues, data, i);
271746
+ var meta = data._meta || {};
271747
+ text[i] = Lib.texttemplateString(txt(i), labels, d3locale, pointValues, d, meta);
271748
+ }
271749
+ }
271750
+
271751
+ // Build object parameters
271752
+ params = {
271753
+ position: points,
271754
+ mode: data.mode,
271755
+ text: text
271756
+ };
271757
+
271758
+ if('line' in data) {
271759
+ params.lineColor = formatColor(line, 1, len);
271760
+ params.lineWidth = line.width;
271761
+ params.lineDashes = line.dash;
271762
+ }
271763
+
271764
+ if('marker' in data) {
271765
+ var sizeFn = makeBubbleSizeFn(data);
271766
+
271767
+ params.scatterColor = formatColor(marker, 1, len);
271768
+ params.scatterSize = formatParam(marker.size, len, calculateSize, 20, sizeFn);
271769
+ params.scatterMarker = formatParam(marker.symbol, len, calculateSymbol, '●');
271770
+ params.scatterLineWidth = marker.line.width; // arrayOk === false
271771
+ params.scatterLineColor = formatColor(marker.line, 1, len);
271772
+ params.scatterAngle = 0;
271773
+ }
271774
+
271775
+ if('textposition' in data) {
271776
+ params.textOffset = calculateTextOffset(data.textposition);
271777
+ params.textColor = formatColor(data.textfont, 1, len);
271778
+ params.textSize = formatParam(data.textfont.size, len, Lib.identity, 12);
271779
+ params.textFontFamily = data.textfont.family;
271780
+ params.textFontWeight = data.textfont.weight;
271781
+ params.textFontStyle = data.textfont.style;
271782
+ params.textFontVariant = data.textfont.variant;
271783
+ params.textAngle = 0;
271784
+ }
271785
+
271786
+ var dims = ['x', 'y', 'z'];
271787
+ params.project = [false, false, false];
271788
+ params.projectScale = [1, 1, 1];
271789
+ params.projectOpacity = [1, 1, 1];
271790
+ for(i = 0; i < 3; ++i) {
271791
+ var projection = data.projection[dims[i]];
271792
+ if((params.project[i] = projection.show)) {
271793
+ params.projectOpacity[i] = projection.opacity;
271794
+ params.projectScale[i] = projection.scale;
271795
+ }
271796
+ }
271797
+
271798
+ params.errorBounds = calculateError(data, scaleFactor, sceneLayout);
271799
+
271800
+ var errorParams = calculateErrorParams([data.error_x, data.error_y, data.error_z]);
271801
+ params.errorColor = errorParams.color;
271802
+ params.errorLineWidth = errorParams.lineWidth;
271803
+ params.errorCapSize = errorParams.capSize;
271804
+
271805
+ params.delaunayAxis = data.surfaceaxis;
271806
+ params.delaunayColor = str2RgbaArray(data.surfacecolor);
271807
+
271808
+ return params;
271809
+ }
271810
+
271811
+ function _arrayToColor(color) {
271812
+ if(Lib.isArrayOrTypedArray(color)) {
271813
+ var c = color[0];
271814
+
271815
+ if(Lib.isArrayOrTypedArray(c)) color = c;
271816
+
271817
+ return 'rgb(' + color.slice(0, 3).map(function(x) {
271818
+ return Math.round(x * 255);
271819
+ }) + ')';
271820
+ }
271821
+
271822
+ return null;
271823
+ }
271824
+
271825
+ function arrayToColor(colors) {
271826
+ if(!Lib.isArrayOrTypedArray(colors)) {
271827
+ return null;
271828
+ }
271829
+
271830
+ if((colors.length === 4) && (typeof colors[0] === 'number')) {
271831
+ return _arrayToColor(colors);
271832
+ }
271833
+
271834
+ return colors.map(_arrayToColor);
271835
+ }
271836
+
271837
+ proto.update = function(data) {
271838
+ var gl = this.scene.glplot.gl;
271839
+ var lineOptions;
271840
+ var scatterOptions;
271841
+ var errorOptions;
271842
+ var textOptions;
271843
+ var dashPattern = DASH_PATTERNS.solid;
271844
+
271845
+ // Save data
271846
+ this.data = data;
271847
+
271848
+ // Run data conversion
271849
+ var options = convertPlotlyOptions(this.scene, data);
271850
+
271851
+ if('mode' in options) {
271852
+ this.mode = options.mode;
271853
+ }
271854
+ if('lineDashes' in options) {
271855
+ if(options.lineDashes in DASH_PATTERNS) {
271856
+ dashPattern = DASH_PATTERNS[options.lineDashes];
271857
+ }
271858
+ }
271859
+
271860
+ this.color = arrayToColor(options.scatterColor) ||
271861
+ arrayToColor(options.lineColor);
271862
+
271863
+ // Save data points
271864
+ this.dataPoints = options.position;
271865
+
271866
+ lineOptions = {
271867
+ gl: this.scene.glplot.gl,
271868
+ position: options.position,
271869
+ color: options.lineColor,
271870
+ lineWidth: options.lineWidth || 1,
271871
+ dashes: dashPattern[0],
271872
+ dashScale: dashPattern[1],
271873
+ opacity: data.opacity,
271874
+ connectGaps: data.connectgaps
271875
+ };
271876
+
271877
+ if(this.mode.indexOf('lines') !== -1) {
271878
+ if(this.linePlot) this.linePlot.update(lineOptions);
271879
+ else {
271880
+ this.linePlot = createLinePlot(lineOptions);
271881
+ this.linePlot._trace = this;
271882
+ this.scene.glplot.add(this.linePlot);
271883
+ }
271884
+ } else if(this.linePlot) {
271885
+ this.scene.glplot.remove(this.linePlot);
271886
+ this.linePlot.dispose();
271887
+ this.linePlot = null;
271888
+ }
271889
+
271890
+ // N.B. marker.opacity must be a scalar for performance
271891
+ var scatterOpacity = data.opacity;
271892
+ if(data.marker && data.marker.opacity !== undefined) scatterOpacity *= data.marker.opacity;
271893
+
271894
+ scatterOptions = {
271895
+ gl: this.scene.glplot.gl,
271896
+ position: options.position,
271897
+ color: options.scatterColor,
271898
+ size: options.scatterSize,
271899
+ glyph: options.scatterMarker,
271900
+ opacity: scatterOpacity,
271901
+ orthographic: true,
271902
+ lineWidth: options.scatterLineWidth,
271903
+ lineColor: options.scatterLineColor,
271904
+ project: options.project,
271905
+ projectScale: options.projectScale,
271906
+ projectOpacity: options.projectOpacity
271907
+ };
271908
+
271909
+ if(this.mode.indexOf('markers') !== -1) {
271910
+ if(this.scatterPlot) this.scatterPlot.update(scatterOptions);
271911
+ else {
271912
+ this.scatterPlot = createScatterPlot(scatterOptions);
271913
+ this.scatterPlot._trace = this;
271914
+ this.scatterPlot.highlightScale = 1;
271915
+ this.scene.glplot.add(this.scatterPlot);
271916
+ }
271917
+ } else if(this.scatterPlot) {
271918
+ this.scene.glplot.remove(this.scatterPlot);
271919
+ this.scatterPlot.dispose();
271920
+ this.scatterPlot = null;
271921
+ }
271922
+
271923
+ textOptions = {
271924
+ gl: this.scene.glplot.gl,
271925
+ position: options.position,
271926
+ glyph: options.text,
271927
+ color: options.textColor,
271928
+ size: options.textSize,
271929
+ angle: options.textAngle,
271930
+ alignment: options.textOffset,
271931
+ font: options.textFontFamily,
271932
+ fontWeight: options.textFontWeight,
271933
+ fontStyle: options.textFontStyle,
271934
+ fontVariant: options.textFontVariant,
271935
+ orthographic: true,
271936
+ lineWidth: 0,
271937
+ project: false,
271938
+ opacity: data.opacity
271939
+ };
271940
+
271941
+ this.textLabels = data.hovertext || data.text;
271942
+
271943
+ if(this.mode.indexOf('text') !== -1) {
271944
+ if(this.textMarkers) this.textMarkers.update(textOptions);
271945
+ else {
271946
+ this.textMarkers = createScatterPlot(textOptions);
271947
+ this.textMarkers._trace = this;
271948
+ this.textMarkers.highlightScale = 1;
271949
+ this.scene.glplot.add(this.textMarkers);
271950
+ }
271951
+ } else if(this.textMarkers) {
271952
+ this.scene.glplot.remove(this.textMarkers);
271953
+ this.textMarkers.dispose();
271954
+ this.textMarkers = null;
271955
+ }
271956
+
271957
+ errorOptions = {
271958
+ gl: this.scene.glplot.gl,
271959
+ position: options.position,
271960
+ color: options.errorColor,
271961
+ error: options.errorBounds,
271962
+ lineWidth: options.errorLineWidth,
271963
+ capSize: options.errorCapSize,
271964
+ opacity: data.opacity
271965
+ };
271966
+ if(this.errorBars) {
271967
+ if(options.errorBounds) {
271968
+ this.errorBars.update(errorOptions);
271969
+ } else {
271970
+ this.scene.glplot.remove(this.errorBars);
271971
+ this.errorBars.dispose();
271972
+ this.errorBars = null;
271973
+ }
271974
+ } else if(options.errorBounds) {
271975
+ this.errorBars = createErrorBars(errorOptions);
271976
+ this.errorBars._trace = this;
271977
+ this.scene.glplot.add(this.errorBars);
271978
+ }
271979
+
271980
+ if(options.delaunayAxis >= 0) {
271981
+ var delaunayOptions = constructDelaunay(
271982
+ options.position,
271983
+ options.delaunayColor,
271984
+ options.delaunayAxis
271985
+ );
271986
+ delaunayOptions.opacity = data.opacity;
271987
+
271988
+ if(this.delaunayMesh) {
271989
+ this.delaunayMesh.update(delaunayOptions);
271990
+ } else {
271991
+ delaunayOptions.gl = gl;
271992
+ this.delaunayMesh = createMesh(delaunayOptions);
271993
+ this.delaunayMesh._trace = this;
271994
+ this.scene.glplot.add(this.delaunayMesh);
271995
+ }
271996
+ } else if(this.delaunayMesh) {
271997
+ this.scene.glplot.remove(this.delaunayMesh);
271998
+ this.delaunayMesh.dispose();
271999
+ this.delaunayMesh = null;
272000
+ }
272001
+ };
272002
+
272003
+ proto.dispose = function() {
272004
+ if(this.linePlot) {
272005
+ this.scene.glplot.remove(this.linePlot);
272006
+ this.linePlot.dispose();
272007
+ }
272008
+ if(this.scatterPlot) {
272009
+ this.scene.glplot.remove(this.scatterPlot);
272010
+ this.scatterPlot.dispose();
272011
+ }
272012
+ if(this.errorBars) {
272013
+ this.scene.glplot.remove(this.errorBars);
272014
+ this.errorBars.dispose();
272015
+ }
272016
+ if(this.textMarkers) {
272017
+ this.scene.glplot.remove(this.textMarkers);
272018
+ this.textMarkers.dispose();
272019
+ }
272020
+ if(this.delaunayMesh) {
272021
+ this.scene.glplot.remove(this.delaunayMesh);
272022
+ this.delaunayMesh.dispose();
272023
+ }
272024
+ };
272025
+
272026
+ function createLineWithMarkers(scene, data) {
272027
+ var plot = new LineWithMarkers(scene, data.uid);
272028
+ plot.update(data);
272029
+ return plot;
272030
+ }
272031
+
272032
+ module.exports = createLineWithMarkers;
272033
+
272034
+
272035
+ /***/ }),
272036
+
272037
+ /***/ 13744:
272038
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
272039
+
272040
+
272041
+
272042
+ var Registry = __webpack_require__(13936);
272043
+ var Lib = __webpack_require__(30991);
272044
+
272045
+ var subTypes = __webpack_require__(33068);
272046
+ var handleMarkerDefaults = __webpack_require__(15294);
272047
+ var handleLineDefaults = __webpack_require__(82094);
272048
+ var handleTextDefaults = __webpack_require__(94729);
272049
+
272050
+ var attributes = __webpack_require__(1015);
272051
+
272052
+ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
272053
+ function coerce(attr, dflt) {
272054
+ return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);
272055
+ }
272056
+
272057
+ var len = handleXYZDefaults(traceIn, traceOut, coerce, layout);
272058
+ if(!len) {
272059
+ traceOut.visible = false;
272060
+ return;
272061
+ }
272062
+
272063
+ coerce('text');
272064
+ coerce('hovertext');
272065
+ coerce('hovertemplate');
272066
+ coerce('xhoverformat');
272067
+ coerce('yhoverformat');
272068
+ coerce('zhoverformat');
272069
+
272070
+ coerce('mode');
272071
+
272072
+ if(subTypes.hasMarkers(traceOut)) {
272073
+ handleMarkerDefaults(traceIn, traceOut, defaultColor, layout, coerce, {noSelect: true, noAngle: true});
272074
+ }
272075
+
272076
+ if(subTypes.hasLines(traceOut)) {
272077
+ coerce('connectgaps');
272078
+ handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce);
272079
+ }
272080
+
272081
+ if(subTypes.hasText(traceOut)) {
272082
+ coerce('texttemplate');
272083
+ handleTextDefaults(traceIn, traceOut, layout, coerce, {
272084
+ noSelect: true,
272085
+ noFontShadow: true,
272086
+ noFontLineposition: true,
272087
+ noFontTextcase: true,
272088
+ });
272089
+ }
272090
+
272091
+ var lineColor = (traceOut.line || {}).color;
272092
+ var markerColor = (traceOut.marker || {}).color;
272093
+ if(coerce('surfaceaxis') >= 0) coerce('surfacecolor', lineColor || markerColor);
272094
+
272095
+ var dims = ['x', 'y', 'z'];
272096
+ for(var i = 0; i < 3; ++i) {
272097
+ var projection = 'projection.' + dims[i];
272098
+ if(coerce(projection + '.show')) {
272099
+ coerce(projection + '.opacity');
272100
+ coerce(projection + '.scale');
272101
+ }
272102
+ }
272103
+
272104
+ var errorBarsSupplyDefaults = Registry.getComponentMethod('errorbars', 'supplyDefaults');
272105
+ errorBarsSupplyDefaults(traceIn, traceOut, lineColor || markerColor || defaultColor, {axis: 'z'});
272106
+ errorBarsSupplyDefaults(traceIn, traceOut, lineColor || markerColor || defaultColor, {axis: 'y', inherit: 'z'});
272107
+ errorBarsSupplyDefaults(traceIn, traceOut, lineColor || markerColor || defaultColor, {axis: 'x', inherit: 'z'});
272108
+ };
272109
+
272110
+ function handleXYZDefaults(traceIn, traceOut, coerce, layout) {
272111
+ var len = 0;
272112
+ var x = coerce('x');
272113
+ var y = coerce('y');
272114
+ var z = coerce('z');
272115
+
272116
+ var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleTraceDefaults');
272117
+ handleCalendarDefaults(traceIn, traceOut, ['x', 'y', 'z'], layout);
272118
+
272119
+ if(x && y && z) {
272120
+ // TODO: what happens if one is missing?
272121
+ len = Math.min(x.length, y.length, z.length);
272122
+ traceOut._length = traceOut._xlength = traceOut._ylength = traceOut._zlength = len;
272123
+ }
272124
+
272125
+ return len;
272126
+ }
272127
+
272128
+
272129
+ /***/ }),
272130
+
272131
+ /***/ 68860:
272132
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
272133
+
272134
+
272135
+
272136
+ module.exports = {
272137
+ plot: __webpack_require__(93219),
272138
+ attributes: __webpack_require__(1015),
272139
+ markerSymbols: __webpack_require__(98993),
272140
+ supplyDefaults: __webpack_require__(13744),
272141
+ colorbar: [
272142
+ {
272143
+ container: 'marker',
272144
+ min: 'cmin',
272145
+ max: 'cmax'
272146
+ }, {
272147
+ container: 'line',
272148
+ min: 'cmin',
272149
+ max: 'cmax'
272150
+ }
272151
+ ],
272152
+ calc: __webpack_require__(30935),
272153
+
272154
+ moduleType: 'trace',
272155
+ name: 'scatter3d',
272156
+ basePlotModule: __webpack_require__(68137),
272157
+ categories: ['gl3d', 'symbols', 'showLegend', 'scatter-like'],
272158
+ meta: {
272159
+ hrName: 'scatter_3d',
272160
+ description: [
272161
+ 'The data visualized as scatter point or lines in 3D dimension',
272162
+ 'is set in `x`, `y`, `z`.',
272163
+ 'Text (appearing either on the chart or on hover only) is via `text`.',
272164
+ 'Bubble charts are achieved by setting `marker.size` and/or `marker.color`',
272165
+ 'Projections are achieved via `projection`.',
272166
+ 'Surface fills are achieved via `surfaceaxis`.'
272167
+ ].join(' ')
272168
+ }
272169
+ };
272170
+
272171
+
272172
272172
  /***/ }),
272173
272173
 
272174
272174
  /***/ 44771:
@@ -368757,7 +368757,7 @@ const TextJamEditor = ({ onLogoutClick = () => { }, onViewProfileClick = () => {
368757
368757
  if (!store || !navigationGuardCoordinator)
368758
368758
  return;
368759
368759
  const guardController = new LeaveGuardController_1.LeaveGuardController(store);
368760
- const unsubscribe = navigationGuardCoordinator.register(guardController.canLeave);
368760
+ const unsubscribe = navigationGuardCoordinator.register(guardController.canLeave, guardController.shouldBlock);
368761
368761
  return () => {
368762
368762
  guardController?.cleanup();
368763
368763
  unsubscribe?.();
@@ -369508,7 +369508,7 @@ function HtmlRunner() {
369508
369508
  const iframeClasses = (0, classnames_1.default)(styles_module_scss_1.default.iframe, {
369509
369509
  [styles_module_scss_1.default.codeHasBeenRun]: codeHasBeenRun,
369510
369510
  });
369511
- return ((0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.htmlrunnerContainer, children: [(0, jsx_runtime_1.jsx)(OutputTabPanel_1.OutputTabPanel, { title: "Preview", icon: preview_svg_1.default, readOnly: readOnly, extraTabContent: codeHasBeenRun && openInNewTabLink, tabPanelClassName: styles_module_scss_1.default.previewHtml, children: error ? ((0, jsx_runtime_1.jsx)("div", { className: iframeClasses, children: (0, jsx_runtime_1.jsx)(NotFoundPage_1.NotFoundPage, {}) })) : ((0, jsx_runtime_1.jsx)("iframe", { className: iframeClasses, sandbox: "allow-scripts allow-same-origin allow-modals allow-popups", referrerPolicy: "strict-origin-when-cross-origin", allow: "\r\n accelerometer 'none';\r\n camera 'none';\r\n encrypted-media;\r\n fullscreen;\r\n picture-in-picture;\r\n geolocation 'none';\r\n gyroscope 'none';\r\n magnetometer 'none';\r\n microphone 'none';\r\n midi 'none';\r\n payment 'none';\r\n usb 'none';\r\n ", id: "output-frame", title: "HTML Output Preview", ref: output, onLoad: iframeReload })) }), !isPreviewMode && ((0, jsx_runtime_1.jsx)(ResizableWithHandle_1.default, { "data-testid": "proj-console-container", handleDirection: "top", defaultHeight: "50%", className: styles_module_scss_1.default.resizeContainer, handleClassName: styles_module_scss_1.default.resizeHandleContainer, children: (0, jsx_runtime_1.jsx)(OutputTabPanel_1.OutputTabPanel, { title: "Console", icon: console_svg_1.default, readOnly: readOnly, children: (0, jsx_runtime_1.jsx)(HtmlConsole_1.default, { consoleLogs: consoleLogs }) }) }))] }));
369511
+ return ((0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.htmlrunnerContainer, children: [(0, jsx_runtime_1.jsx)(OutputTabPanel_1.OutputTabPanel, { title: "Preview", icon: preview_svg_1.default, readOnly: readOnly, extraTabContent: codeHasBeenRun && openInNewTabLink, tabPanelClassName: styles_module_scss_1.default.previewHtml, children: error ? ((0, jsx_runtime_1.jsx)("div", { className: iframeClasses, children: (0, jsx_runtime_1.jsx)(NotFoundPage_1.NotFoundPage, {}) })) : ((0, jsx_runtime_1.jsx)("iframe", { className: iframeClasses, sandbox: "allow-scripts allow-same-origin allow-modals allow-popups", referrerPolicy: "strict-origin-when-cross-origin", allow: "\n accelerometer 'none';\n camera 'none';\n encrypted-media;\n fullscreen;\n picture-in-picture;\n geolocation 'none';\n gyroscope 'none';\n magnetometer 'none';\n microphone 'none';\n midi 'none';\n payment 'none';\n usb 'none';\n ", id: "output-frame", title: "HTML Output Preview", ref: output, onLoad: iframeReload })) }), !isPreviewMode && ((0, jsx_runtime_1.jsx)(ResizableWithHandle_1.default, { "data-testid": "proj-console-container", handleDirection: "top", defaultHeight: "50%", className: styles_module_scss_1.default.resizeContainer, handleClassName: styles_module_scss_1.default.resizeHandleContainer, children: (0, jsx_runtime_1.jsx)(OutputTabPanel_1.OutputTabPanel, { title: "Console", icon: console_svg_1.default, readOnly: readOnly, children: (0, jsx_runtime_1.jsx)(HtmlConsole_1.default, { consoleLogs: consoleLogs }) }) }))] }));
369512
369512
  }
369513
369513
  exports["default"] = HtmlRunner;
369514
369514
 
@@ -369895,234 +369895,234 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
369895
369895
  exports.consoleOverrideScript = exports.disableLocalStorageScript = void 0;
369896
369896
  // insert script to disable access to specific localStorage keys
369897
369897
  // localstorage.getItem() is a potential security risk when executing untrusted code
369898
- exports.disableLocalStorageScript = `
369899
- <script>
369900
- (function() {
369901
- const originalGetItem = window.localStorage.getItem.bind(window.localStorage);
369902
- const originalSetItem = window.localStorage.setItem.bind(window.localStorage);
369903
- const originalRemoveItem = window.localStorage.removeItem.bind(window.localStorage);
369904
- const originalClear = window.localStorage.clear.bind(window.localStorage);
369905
-
369906
- const isDisallowedKey = (key) => key === 'authKey' || key.startsWith('oidc.');
369907
-
369908
- Object.defineProperty(window, 'localStorage', {
369909
- value: {
369910
- getItem: function(key) {
369911
- if (isDisallowedKey(key)) {
369912
- console.log(\`localStorage.getItem for "\${key}" is disabled\`);
369913
- return null;
369914
- }
369915
- return originalGetItem(key);
369916
- },
369917
- setItem: function(key, value) {
369918
- if (isDisallowedKey(key)) {
369919
- console.log(\`localStorage.setItem for "\${key}" is disabled\`);
369920
- return;
369921
- }
369922
- return originalSetItem(key, value);
369923
- },
369924
- removeItem: function(key) {
369925
- if (isDisallowedKey(key)) {
369926
- console.log(\`localStorage.removeItem for "\${key}" is disabled\`);
369927
- return;
369928
- }
369929
- return originalRemoveItem(key);
369930
- },
369931
- clear: function() {
369932
- console.log('localStorage.clear is disabled');
369933
- return;
369934
- }
369935
- },
369936
- writable: false,
369937
- configurable: false
369938
- });
369939
- })();
369940
- </script>
369898
+ exports.disableLocalStorageScript = `
369899
+ <script>
369900
+ (function() {
369901
+ const originalGetItem = window.localStorage.getItem.bind(window.localStorage);
369902
+ const originalSetItem = window.localStorage.setItem.bind(window.localStorage);
369903
+ const originalRemoveItem = window.localStorage.removeItem.bind(window.localStorage);
369904
+ const originalClear = window.localStorage.clear.bind(window.localStorage);
369905
+
369906
+ const isDisallowedKey = (key) => key === 'authKey' || key.startsWith('oidc.');
369907
+
369908
+ Object.defineProperty(window, 'localStorage', {
369909
+ value: {
369910
+ getItem: function(key) {
369911
+ if (isDisallowedKey(key)) {
369912
+ console.log(\`localStorage.getItem for "\${key}" is disabled\`);
369913
+ return null;
369914
+ }
369915
+ return originalGetItem(key);
369916
+ },
369917
+ setItem: function(key, value) {
369918
+ if (isDisallowedKey(key)) {
369919
+ console.log(\`localStorage.setItem for "\${key}" is disabled\`);
369920
+ return;
369921
+ }
369922
+ return originalSetItem(key, value);
369923
+ },
369924
+ removeItem: function(key) {
369925
+ if (isDisallowedKey(key)) {
369926
+ console.log(\`localStorage.removeItem for "\${key}" is disabled\`);
369927
+ return;
369928
+ }
369929
+ return originalRemoveItem(key);
369930
+ },
369931
+ clear: function() {
369932
+ console.log('localStorage.clear is disabled');
369933
+ return;
369934
+ }
369935
+ },
369936
+ writable: false,
369937
+ configurable: false
369938
+ });
369939
+ })();
369940
+ </script>
369941
369941
  `;
369942
369942
  const MAX_DEPTH = 5; // Maximum depth for object serialization to prevent infinite recursion
369943
369943
  // Override console methods to send logs to parent window and serialize complex objects
369944
- exports.consoleOverrideScript = `
369945
- <script>
369946
- (function() {
369947
- const SerializedType = {
369948
- Null: "null",
369949
- Undefined: "undefined",
369950
- Boolean: "boolean",
369951
- Number: "number",
369952
- String: "string",
369953
- Array: "array",
369954
- Object: "object",
369955
- };
369956
-
369957
- const original = {};
369958
- const methods = ["log", "error", "warn", "info", "debug", "assert"];
369959
-
369960
- function getTimestamp() {
369961
- const now = new Date();
369962
- const pad = (n) => String(n).padStart(2, '0');
369963
-
369964
- return (
369965
- now.getFullYear() + '-' +
369966
- pad(now.getMonth() + 1) + '-' +
369967
- pad(now.getDate()) + ' ' +
369968
- pad(now.getHours()) + ':' +
369969
- pad(now.getMinutes()) + ':' +
369970
- pad(now.getSeconds()) + '.' +
369971
- pad(Math.floor(now.getMilliseconds() / 10))
369972
- );
369973
- }
369974
-
369975
- function serialize(arg, depth = 0, maxDepth = ${MAX_DEPTH}, visited = new WeakSet()) {
369976
- if (depth > maxDepth) return { "type": SerializedType.String, "value": "[Max depth reached]" };
369977
-
369978
- if (arg && typeof arg === "object") {
369979
- if (visited.has(arg)) {
369980
- return { "type": SerializedType.String, "value": "[Circular reference]" };
369981
- }
369982
- visited.add(arg);
369983
- }
369984
-
369985
- const type = typeof arg;
369986
- if (arg === null) return { "type": SerializedType.Null, "value": "null" };
369987
- if (arg === undefined) return { "type": SerializedType.Undefined, "value": "undefined" };
369988
- if (type === "boolean") return { "type": SerializedType.Boolean, "value": String(arg) };
369989
- if (type === "number") return { "type": SerializedType.Number, "value": String(arg) };
369990
- if (type === "string") return { "type": SerializedType.String, "value": arg };
369991
-
369992
- if (Array.isArray(arg)) {
369993
- return {
369994
- "type": SerializedType.Array,
369995
- "value": arg.map(item => serialize(item, depth + 1, maxDepth))
369996
- };
369997
- }
369998
-
369999
- if (type === "object" && arg !== null) {
370000
- const props = {};
370001
- try {
370002
- for (let key in arg) {
370003
- if (arg.hasOwnProperty(key)) {
370004
- props[key] = serialize(arg[key], depth + 1, maxDepth, visited);
370005
- }
370006
- }
370007
- } catch (error) {
370008
- console.error("Error serializing object property:", error);
370009
- }
370010
- return { "type": SerializedType.Object, "value": props };
370011
- }
370012
-
370013
- return { "type": SerializedType.String, "value": String(arg) };
370014
- }
370015
-
370016
- methods.forEach(m => {
370017
- original[m] = console[m] || function(){};
370018
-
370019
- console[m] = function(...args) {
370020
- const timestamp = getTimestamp();
370021
-
370022
- let level = m;
370023
- let serializedArgs = args.map(arg => serialize(arg));
370024
-
370025
- if (m === "assert") {
370026
- const condition = Boolean(args[0]);
370027
- const messageArgs = args.slice(1);
370028
-
370029
- serializedArgs =
370030
- messageArgs.length > 0
370031
- ? messageArgs.map(arg => serialize(arg))
370032
- : [
370033
- {
370034
- "type": "string",
370035
- "value": condition ? "Assertion passed" : "Assertion failed",
370036
- },
370037
- ];
370038
-
370039
- level = condition ? "log" : "error";
370040
- }
370041
-
370042
- window.parent.postMessage({
370043
- "type": "console",
370044
- "method": level,
370045
- "data": serializedArgs,
370046
- "timestamp": timestamp
370047
- }, "*");
370048
-
370049
- original[m](...args);
370050
- };
370051
- });
370052
-
370053
- window.addEventListener("error", function(event) {
370054
- const timestamp = getTimestamp();
370055
- const error = event.error;
370056
-
370057
- let message;
370058
- if (error && error.name && error.message) {
370059
- message = error.name + ": " + error.message;
370060
- } else if (event.message) {
370061
- message = event.message;
370062
- } else {
370063
- message = "Unknown JavaScript error";
370064
- }
370065
-
370066
- let displayFilename = event.filename;
370067
-
370068
- if (
370069
- typeof displayFilename === "string" &&
370070
- displayFilename.startsWith("blob:")
370071
- ) {
370072
- const sourceMap = window.__blobSourceMap__ || {};
370073
- const mappedFilename = sourceMap[displayFilename];
370074
-
370075
- if (mappedFilename) {
370076
- displayFilename = mappedFilename;
370077
- } else {
370078
- const meta = document.querySelector("meta[filename]");
370079
- displayFilename =
370080
- (meta && meta.getAttribute("filename")) || "preview";
370081
- }
370082
- }
370083
-
370084
- const location =
370085
- displayFilename || event.lineno || event.colno
370086
- ? " at " +
370087
- [displayFilename, event.lineno, event.colno]
370088
- .filter(Boolean)
370089
- .join(":")
370090
- : "";
370091
-
370092
- window.parent.postMessage({
370093
- "type": "console",
370094
- "method": "error",
370095
- "data": [
370096
- { "type": "string", "value": message + location }
370097
- ],
370098
- "timestamp": timestamp
370099
- }, "*");
370100
- });
370101
-
370102
- window.addEventListener("unhandledrejection", function(event) {
370103
- const timestamp = getTimestamp();
370104
- const reason = event.reason;
370105
-
370106
- let message;
370107
- if (reason && reason.name && reason.message) {
370108
- message = reason.name + ": " + reason.message;
370109
- } else if (typeof reason === "string") {
370110
- message = "UnhandledPromiseRejection: " + reason;
370111
- } else {
370112
- message = "UnhandledPromiseRejection: " + String(reason);
370113
- }
370114
-
370115
- window.parent.postMessage({
370116
- "type": "console",
370117
- "method": "error",
370118
- "data": [
370119
- { "type": "string", "value": message }
370120
- ],
370121
- "timestamp": timestamp
370122
- }, "*");
370123
- });
370124
- })();
370125
- </script>
369944
+ exports.consoleOverrideScript = `
369945
+ <script>
369946
+ (function() {
369947
+ const SerializedType = {
369948
+ Null: "null",
369949
+ Undefined: "undefined",
369950
+ Boolean: "boolean",
369951
+ Number: "number",
369952
+ String: "string",
369953
+ Array: "array",
369954
+ Object: "object",
369955
+ };
369956
+
369957
+ const original = {};
369958
+ const methods = ["log", "error", "warn", "info", "debug", "assert"];
369959
+
369960
+ function getTimestamp() {
369961
+ const now = new Date();
369962
+ const pad = (n) => String(n).padStart(2, '0');
369963
+
369964
+ return (
369965
+ now.getFullYear() + '-' +
369966
+ pad(now.getMonth() + 1) + '-' +
369967
+ pad(now.getDate()) + ' ' +
369968
+ pad(now.getHours()) + ':' +
369969
+ pad(now.getMinutes()) + ':' +
369970
+ pad(now.getSeconds()) + '.' +
369971
+ pad(Math.floor(now.getMilliseconds() / 10))
369972
+ );
369973
+ }
369974
+
369975
+ function serialize(arg, depth = 0, maxDepth = ${MAX_DEPTH}, visited = new WeakSet()) {
369976
+ if (depth > maxDepth) return { "type": SerializedType.String, "value": "[Max depth reached]" };
369977
+
369978
+ if (arg && typeof arg === "object") {
369979
+ if (visited.has(arg)) {
369980
+ return { "type": SerializedType.String, "value": "[Circular reference]" };
369981
+ }
369982
+ visited.add(arg);
369983
+ }
369984
+
369985
+ const type = typeof arg;
369986
+ if (arg === null) return { "type": SerializedType.Null, "value": "null" };
369987
+ if (arg === undefined) return { "type": SerializedType.Undefined, "value": "undefined" };
369988
+ if (type === "boolean") return { "type": SerializedType.Boolean, "value": String(arg) };
369989
+ if (type === "number") return { "type": SerializedType.Number, "value": String(arg) };
369990
+ if (type === "string") return { "type": SerializedType.String, "value": arg };
369991
+
369992
+ if (Array.isArray(arg)) {
369993
+ return {
369994
+ "type": SerializedType.Array,
369995
+ "value": arg.map(item => serialize(item, depth + 1, maxDepth))
369996
+ };
369997
+ }
369998
+
369999
+ if (type === "object" && arg !== null) {
370000
+ const props = {};
370001
+ try {
370002
+ for (let key in arg) {
370003
+ if (arg.hasOwnProperty(key)) {
370004
+ props[key] = serialize(arg[key], depth + 1, maxDepth, visited);
370005
+ }
370006
+ }
370007
+ } catch (error) {
370008
+ console.error("Error serializing object property:", error);
370009
+ }
370010
+ return { "type": SerializedType.Object, "value": props };
370011
+ }
370012
+
370013
+ return { "type": SerializedType.String, "value": String(arg) };
370014
+ }
370015
+
370016
+ methods.forEach(m => {
370017
+ original[m] = console[m] || function(){};
370018
+
370019
+ console[m] = function(...args) {
370020
+ const timestamp = getTimestamp();
370021
+
370022
+ let level = m;
370023
+ let serializedArgs = args.map(arg => serialize(arg));
370024
+
370025
+ if (m === "assert") {
370026
+ const condition = Boolean(args[0]);
370027
+ const messageArgs = args.slice(1);
370028
+
370029
+ serializedArgs =
370030
+ messageArgs.length > 0
370031
+ ? messageArgs.map(arg => serialize(arg))
370032
+ : [
370033
+ {
370034
+ "type": "string",
370035
+ "value": condition ? "Assertion passed" : "Assertion failed",
370036
+ },
370037
+ ];
370038
+
370039
+ level = condition ? "log" : "error";
370040
+ }
370041
+
370042
+ window.parent.postMessage({
370043
+ "type": "console",
370044
+ "method": level,
370045
+ "data": serializedArgs,
370046
+ "timestamp": timestamp
370047
+ }, "*");
370048
+
370049
+ original[m](...args);
370050
+ };
370051
+ });
370052
+
370053
+ window.addEventListener("error", function(event) {
370054
+ const timestamp = getTimestamp();
370055
+ const error = event.error;
370056
+
370057
+ let message;
370058
+ if (error && error.name && error.message) {
370059
+ message = error.name + ": " + error.message;
370060
+ } else if (event.message) {
370061
+ message = event.message;
370062
+ } else {
370063
+ message = "Unknown JavaScript error";
370064
+ }
370065
+
370066
+ let displayFilename = event.filename;
370067
+
370068
+ if (
370069
+ typeof displayFilename === "string" &&
370070
+ displayFilename.startsWith("blob:")
370071
+ ) {
370072
+ const sourceMap = window.__blobSourceMap__ || {};
370073
+ const mappedFilename = sourceMap[displayFilename];
370074
+
370075
+ if (mappedFilename) {
370076
+ displayFilename = mappedFilename;
370077
+ } else {
370078
+ const meta = document.querySelector("meta[filename]");
370079
+ displayFilename =
370080
+ (meta && meta.getAttribute("filename")) || "preview";
370081
+ }
370082
+ }
370083
+
370084
+ const location =
370085
+ displayFilename || event.lineno || event.colno
370086
+ ? " at " +
370087
+ [displayFilename, event.lineno, event.colno]
370088
+ .filter(Boolean)
370089
+ .join(":")
370090
+ : "";
370091
+
370092
+ window.parent.postMessage({
370093
+ "type": "console",
370094
+ "method": "error",
370095
+ "data": [
370096
+ { "type": "string", "value": message + location }
370097
+ ],
370098
+ "timestamp": timestamp
370099
+ }, "*");
370100
+ });
370101
+
370102
+ window.addEventListener("unhandledrejection", function(event) {
370103
+ const timestamp = getTimestamp();
370104
+ const reason = event.reason;
370105
+
370106
+ let message;
370107
+ if (reason && reason.name && reason.message) {
370108
+ message = reason.name + ": " + reason.message;
370109
+ } else if (typeof reason === "string") {
370110
+ message = "UnhandledPromiseRejection: " + reason;
370111
+ } else {
370112
+ message = "UnhandledPromiseRejection: " + String(reason);
370113
+ }
370114
+
370115
+ window.parent.postMessage({
370116
+ "type": "console",
370117
+ "method": "error",
370118
+ "data": [
370119
+ { "type": "string", "value": message }
370120
+ ],
370121
+ "timestamp": timestamp
370122
+ }, "*");
370123
+ });
370124
+ })();
370125
+ </script>
370126
370126
  `;
370127
370127
 
370128
370128
 
@@ -372560,7 +372560,7 @@ const WebComponentProject = ({ nameEditable = false, sidebarOptions = [], packag
372560
372560
  return () => clearTimeout(timeout);
372561
372561
  }, [project]);
372562
372562
  renderer.link = function (data) {
372563
- return `<a href="${data.href}" target="_blank" rel="noreferrer"
372563
+ return `<a href="${data.href}" target="_blank" rel="noreferrer"
372564
372564
  }">${data.text}</a>`;
372565
372565
  };
372566
372566
  marked_1.marked.setOptions({
@@ -372665,6 +372665,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
372665
372665
  Object.defineProperty(exports, "__esModule", ({ value: true }));
372666
372666
  const jsx_runtime_1 = __webpack_require__(74848);
372667
372667
  const react_1 = __webpack_require__(51649);
372668
+ const useTextjamActiveClass_1 = __webpack_require__(83289);
372668
372669
  const react_redux_1 = __webpack_require__(14062);
372669
372670
  const EditorSlice_1 = __webpack_require__(68512);
372670
372671
  const types_1 = __webpack_require__(92932);
@@ -372784,13 +372785,16 @@ const WebComponentLoader = (props) => {
372784
372785
  dispatch((0, EditorSlice_1.setReadOnly)(true));
372785
372786
  }
372786
372787
  }, [isSharedProject, dispatch]);
372788
+ // Scopes the editor's global stylesheet rules under html.textjam-active so
372789
+ // they only apply while the editor is mounted.
372790
+ (0, useTextjamActiveClass_1.useTextjamActiveClass)();
372787
372791
  (0, react_1.useEffect)(() => {
372788
372792
  // Create a script element to save the existing Prism object if there is one
372789
372793
  const script = document.createElement("script");
372790
- script.textContent = `
372791
- if (window.Prism) {
372792
- window.syntaxHighlight = window.Prism;
372793
- }
372794
+ script.textContent = `
372795
+ if (window.Prism) {
372796
+ window.syntaxHighlight = window.Prism;
372797
+ }
372794
372798
  `;
372795
372799
  // Append the script to the document body
372796
372800
  document.body.appendChild(script);
@@ -373943,6 +373947,12 @@ const useProjectPersistence = ({ user, projectData, hasShownSavePrompt, saveProj
373943
373947
  if (!hasContentChanges && !hasNameChanges && !isInitialSave) {
373944
373948
  dispatch((0, EditorSlice_1.setSaveTriggered)(false));
373945
373949
  dispatch((0, EditorSlice_1.setSaving)(types_1.SavingState.IDLE));
373950
+ // If we got here from the Save-in-modal path, resolve the leave flow
373951
+ // so the pending navigation isn't stuck on a no-op save.
373952
+ if (leaveFlow.requestId &&
373953
+ leaveFlow.status === LeaveFlowSlice_1.LeaveFlowStatus.SAVING) {
373954
+ dispatch((0, LeaveFlowSlice_1.leaveConfirmed)({ requestId: leaveFlow.requestId }));
373955
+ }
373946
373956
  console.warn("No changes detected. Save won't be processed.");
373947
373957
  return;
373948
373958
  }
@@ -373966,6 +373976,14 @@ const useProjectPersistence = ({ user, projectData, hasShownSavePrompt, saveProj
373966
373976
  (0, sendToast_1.showError)(`The project exceeds the ${constants_1.MAX_PROJECT_TOTAL_SIZE_MB} MB maximum allowed size. Please reduce the project size to save successfully.`);
373967
373977
  dispatch((0, EditorSlice_1.setSaveTriggered)(false));
373968
373978
  dispatch((0, EditorSlice_1.setSaving)(types_1.SavingState.IDLE));
373979
+ // Surface the failure to a pending leave flow so the modal doesn't get stuck
373980
+ if (leaveFlow.requestId &&
373981
+ leaveFlow.status === LeaveFlowSlice_1.LeaveFlowStatus.SAVING) {
373982
+ dispatch((0, LeaveFlowSlice_1.saveFailed)({
373983
+ requestId: leaveFlow.requestId,
373984
+ error: "Project size exceeds the maximum allowed size.",
373985
+ }));
373986
+ }
373969
373987
  return;
373970
373988
  }
373971
373989
  await saveProject?.({
@@ -373991,6 +374009,7 @@ const useProjectPersistence = ({ user, projectData, hasShownSavePrompt, saveProj
373991
374009
  project.identifier,
373992
374010
  hasContentChanges,
373993
374011
  hasNameChanges,
374012
+ leaveFlow.requestId,
373994
374013
  leaveFlow.status,
373995
374014
  ]);
373996
374015
  // finish the process if save failed
@@ -374026,6 +374045,9 @@ const useProjectPersistence = ({ user, projectData, hasShownSavePrompt, saveProj
374026
374045
  });
374027
374046
  const incomingCommitId = projectData?.commitId;
374028
374047
  const incomingIdentifier = projectData?.identifier;
374048
+ dispatch((0, EditorSlice_1.setSaveTriggered)(false));
374049
+ if (leaveFlow.requestId && leaveFlow.status === LeaveFlowSlice_1.LeaveFlowStatus.SAVING)
374050
+ dispatch((0, LeaveFlowSlice_1.leaveConfirmed)({ requestId: leaveFlow.requestId }));
374029
374051
  if (!incomingIdentifier)
374030
374052
  return;
374031
374053
  // first save: new commitId incoming, but no commitId were set before
@@ -374047,10 +374069,6 @@ const useProjectPersistence = ({ user, projectData, hasShownSavePrompt, saveProj
374047
374069
  dispatch((0, EditorSlice_1.updateProjectIdentifier)(projectData.identifier));
374048
374070
  deleteValueFromCache(project.identifier);
374049
374071
  }
374050
- dispatch((0, EditorSlice_1.setSaveTriggered)(false));
374051
- // if the save was triggered by the leave flow, mark it as completed to allow the flow to proceed
374052
- if (leaveFlow.requestId && leaveFlow.status === LeaveFlowSlice_1.LeaveFlowStatus.SAVING)
374053
- dispatch((0, LeaveFlowSlice_1.leaveConfirmed)({ requestId: leaveFlow.requestId }));
374054
374072
  // Build new snapshot after save (remove isDirty from components, reset file structure, update identifier)
374055
374073
  const cleanedComponents = project.components.map(({ isDirty, ...rest }) => rest);
374056
374074
  const cleanedProject = {
@@ -374260,6 +374278,31 @@ const useProjectTabSync = ({ projectKey, enabled = true, }) => {
374260
374278
  exports.useProjectTabSync = useProjectTabSync;
374261
374279
 
374262
374280
 
374281
+ /***/ }),
374282
+
374283
+ /***/ 83289:
374284
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
374285
+
374286
+
374287
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
374288
+ exports.useTextjamActiveClass = useTextjamActiveClass;
374289
+ const react_1 = __webpack_require__(51649);
374290
+ /*
374291
+ Toggles `textjam-active` on <html> for the lifetime of the calling component.
374292
+ Global rules in index.scss / App.scss are scoped under html.textjam-active,
374293
+ so they only apply while the editor is mounted. useLayoutEffect runs before
374294
+ paint, which avoids a flash of unstyled content on first mount.
374295
+ */
374296
+ function useTextjamActiveClass() {
374297
+ (0, react_1.useLayoutEffect)(() => {
374298
+ document.documentElement.classList.add("textjam-active");
374299
+ return () => {
374300
+ document.documentElement.classList.remove("textjam-active");
374301
+ };
374302
+ }, []);
374303
+ }
374304
+
374305
+
374263
374306
  /***/ }),
374264
374307
 
374265
374308
  /***/ 61171:
@@ -375401,6 +375444,12 @@ class LeaveGuardController {
375401
375444
  constructor(store) {
375402
375445
  this.store = store;
375403
375446
  }
375447
+ // Returning false here lets useRouteGuard short-circuit and allow native
375448
+ // POP/PUSH for clean states without async work or a modal.
375449
+ shouldBlock = () => {
375450
+ const state = this.store.getState();
375451
+ return (0, selectors_1.selectProjectDirtyState)(state);
375452
+ };
375404
375453
  canLeave = () => {
375405
375454
  const state = this.store.getState();
375406
375455
  const isDirty = (0, selectors_1.selectProjectDirtyState)(state);
@@ -383797,7 +383846,7 @@ module.exports = webpackAsyncContext;
383797
383846
  /***/ 24427:
383798
383847
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
383799
383848
 
383800
- module.exports = __webpack_require__.p + "assets/PyodideWorker36d2ab735d3886128aa9.js";
383849
+ module.exports = __webpack_require__.p + "assets/PyodideWorkerdeabb0560f66f0f43f49.js";
383801
383850
 
383802
383851
  /***/ }),
383803
383852