@holoviz/geoviews 1.10.0 → 1.10.1-a2

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/geoviews.js CHANGED
@@ -57,7 +57,7 @@
57
57
  __esExport("ClearTool", clear_tool_1.ClearTool);
58
58
  var poly_draw_1 = require("cddc7627cc") /* ./poly_draw */;
59
59
  __esExport("PolyVertexDrawTool", poly_draw_1.PolyVertexDrawTool);
60
- var poly_edit_1 = require("296f32feb2") /* ./poly_edit */;
60
+ var poly_edit_1 = require("8837add128") /* ./poly_edit */;
61
61
  __esExport("PolyVertexEditTool", poly_edit_1.PolyVertexEditTool);
62
62
  var restore_tool_1 = require("92294e6ad2") /* ./restore_tool */;
63
63
  __esExport("RestoreTool", restore_tool_1.RestoreTool);
@@ -328,7 +328,7 @@
328
328
  }));
329
329
  })();
330
330
  },
331
- "296f32feb2": /* models/poly_edit.js */ function _(require, module, exports, __esModule, __esExport) {
331
+ "8837add128": /* models/poly_edit.js */ function _(require, module, exports, __esModule, __esExport) {
332
332
  __esModule();
333
333
  var _a;
334
334
  const object_1 = require("@bokehjs/core/util/object");
@@ -350,7 +350,7 @@
350
350
  if (this._basepoint == null || this.model.vertex_renderer == null)
351
351
  return;
352
352
  const points = this._drag_points(ev, [this.model.vertex_renderer]);
353
- if (!ev.shift_key) {
353
+ if (!ev.modifiers.shift) {
354
354
  this._move_linked(points);
355
355
  }
356
356
  if (this._selected_renderer)
@@ -360,7 +360,7 @@
360
360
  if (this._basepoint == null || this.model.vertex_renderer == null)
361
361
  return;
362
362
  const points = this._drag_points(ev, [this.model.vertex_renderer]);
363
- if (!ev.shift_key) {
363
+ if (!ev.modifiers.shift) {
364
364
  this._move_linked(points);
365
365
  }
366
366
  this._emit_cds_changes(this.model.vertex_renderer.data_source, false, true, true);
@@ -600,5 +600,5 @@
600
600
  }));
601
601
  })();
602
602
  },
603
- }, "c764d38756", {"index":"c764d38756","models/index":"b4555bea44","models/checkpoint_tool":"1d7c6c8516","models/clear_tool":"1c15765006","models/poly_draw":"cddc7627cc","models/poly_edit":"296f32feb2","models/restore_tool":"92294e6ad2"}, {});});
603
+ }, "c764d38756", {"index":"c764d38756","models/index":"b4555bea44","models/checkpoint_tool":"1d7c6c8516","models/clear_tool":"1c15765006","models/poly_draw":"cddc7627cc","models/poly_edit":"8837add128","models/restore_tool":"92294e6ad2"}, {});});
604
604
  //# sourceMappingURL=geoviews.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@@/geoviews/dist/lib/index.js","@@/geoviews/dist/lib/models/index.js","@@/geoviews/dist/lib/models/checkpoint_tool.js","@@/geoviews/dist/lib/models/clear_tool.js","@@/geoviews/dist/lib/models/poly_draw.js","@@/geoviews/dist/lib/models/poly_edit.js","@@/geoviews/dist/lib/models/restore_tool.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACjLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACzOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"generated.js","sourceRoot":"","sourcesContent":["/* index.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n const GeoViews = tslib_1.__importStar(require(\"b4555bea44\") /* ./models */);\n exports.GeoViews = GeoViews;\n const base_1 = require(\"@bokehjs/base\");\n (0, base_1.register_models)(GeoViews);\n}\n","/* models/index.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var checkpoint_tool_1 = require(\"1d7c6c8516\") /* ./checkpoint_tool */;\n __esExport(\"CheckpointTool\", checkpoint_tool_1.CheckpointTool);\n var clear_tool_1 = require(\"1c15765006\") /* ./clear_tool */;\n __esExport(\"ClearTool\", clear_tool_1.ClearTool);\n var poly_draw_1 = require(\"cddc7627cc\") /* ./poly_draw */;\n __esExport(\"PolyVertexDrawTool\", poly_draw_1.PolyVertexDrawTool);\n var poly_edit_1 = require(\"296f32feb2\") /* ./poly_edit */;\n __esExport(\"PolyVertexEditTool\", poly_edit_1.PolyVertexEditTool);\n var restore_tool_1 = require(\"92294e6ad2\") /* ./restore_tool */;\n __esExport(\"RestoreTool\", restore_tool_1.RestoreTool);\n}\n","/* models/checkpoint_tool.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const array_1 = require(\"@bokehjs/core/util/array\");\n const action_tool_1 = require(\"@bokehjs/models/tools/actions/action_tool\");\n const column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\n const icons_css_1 = require(\"@bokehjs/styles/icons.css\");\n class CheckpointToolView extends action_tool_1.ActionToolView {\n doit() {\n const sources = this.model.sources;\n for (const source of sources) {\n if (!source.buffer) {\n source.buffer = [];\n }\n let data_copy = {};\n for (const key in source.data) {\n const column = source.data[key];\n const new_column = [];\n for (const arr of column) {\n if (Array.isArray(arr) || (ArrayBuffer.isView(arr))) {\n new_column.push((0, array_1.copy)(arr));\n }\n else {\n new_column.push(arr);\n }\n }\n data_copy[key] = new_column;\n }\n source.buffer.push(data_copy);\n }\n }\n }\n exports.CheckpointToolView = CheckpointToolView;\n CheckpointToolView.__name__ = \"CheckpointToolView\";\n class CheckpointTool extends action_tool_1.ActionTool {\n constructor(attrs) {\n super(attrs);\n this.tool_name = \"Checkpoint\";\n this.tool_icon = icons_css_1.tool_icon_save;\n }\n }\n exports.CheckpointTool = CheckpointTool;\n _a = CheckpointTool;\n CheckpointTool.__name__ = \"CheckpointTool\";\n CheckpointTool.__module__ = \"geoviews.models.custom_tools\";\n (() => {\n _a.prototype.default_view = CheckpointToolView;\n _a.define(({ Array, Ref }) => ({\n sources: [Array(Ref(column_data_source_1.ColumnDataSource)), []],\n }));\n })();\n}\n","/* models/clear_tool.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const action_tool_1 = require(\"@bokehjs/models/tools/actions/action_tool\");\n const column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\n const icons_css_1 = require(\"@bokehjs/styles/icons.css\");\n class ClearToolView extends action_tool_1.ActionToolView {\n doit() {\n for (var source of this.model.sources) {\n for (const column in source.data) {\n source.data[column] = [];\n }\n source.change.emit();\n source.properties.data.change.emit();\n }\n }\n }\n exports.ClearToolView = ClearToolView;\n ClearToolView.__name__ = \"ClearToolView\";\n class ClearTool extends action_tool_1.ActionTool {\n constructor(attrs) {\n super(attrs);\n this.tool_name = \"Clear data\";\n this.tool_icon = icons_css_1.tool_icon_reset;\n }\n }\n exports.ClearTool = ClearTool;\n _a = ClearTool;\n ClearTool.__name__ = \"ClearTool\";\n ClearTool.__module__ = \"geoviews.models.custom_tools\";\n (() => {\n _a.prototype.default_view = ClearToolView;\n _a.define(({ Array, Ref }) => ({\n sources: [Array(Ref(column_data_source_1.ColumnDataSource)), []],\n }));\n })();\n}\n","/* models/poly_draw.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const object_1 = require(\"@bokehjs/core/util/object\");\n const types_1 = require(\"@bokehjs/core/util/types\");\n const poly_draw_tool_1 = require(\"@bokehjs/models/tools/edit/poly_draw_tool\");\n class PolyVertexDrawToolView extends poly_draw_tool_1.PolyDrawToolView {\n _split_path(x, y) {\n for (let r = 0; r < this.model.renderers.length; r++) {\n const renderer = this.model.renderers[r];\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n const xpaths = cds.data[xkey];\n const ypaths = cds.data[ykey];\n for (let index = 0; index < xpaths.length; index++) {\n let xs = xpaths[index];\n if (!(0, types_1.isArray)(xs)) {\n xs = Array.from(xs);\n cds.data[xkey][index] = xs;\n }\n let ys = ypaths[index];\n if (!(0, types_1.isArray)(ys)) {\n ys = Array.from(ys);\n cds.data[ykey][index] = ys;\n }\n for (let i = 0; i < xs.length; i++) {\n if ((xs[i] == x) && (ys[i] == y) && (i != 0) && (i != (xs.length - 1))) {\n xpaths.splice(index + 1, 0, xs.slice(i));\n ypaths.splice(index + 1, 0, ys.slice(i));\n xs.splice(i + 1);\n ys.splice(i + 1);\n for (const column of cds.columns()) {\n if ((column !== xkey) && (column != ykey))\n cds.data[column].splice(index + 1, 0, cds.data[column][index]);\n }\n return;\n }\n }\n }\n }\n }\n _snap_to_vertex(ev, x, y) {\n if (this.model.vertex_renderer) {\n // If an existing vertex is hit snap to it\n const vertex_selected = this._select_event(ev, \"replace\", [this.model.vertex_renderer]);\n const point_ds = this.model.vertex_renderer.data_source;\n // Type once dataspecs are typed\n const point_glyph = this.model.vertex_renderer.glyph;\n const [pxkey, pykey] = [point_glyph.x.field, point_glyph.y.field];\n if (vertex_selected.length) {\n // If existing vertex is hit split path at that location\n // converting to feature vertex\n const index = point_ds.selected.indices[0];\n if (pxkey)\n x = point_ds.data[pxkey][index];\n if (pykey)\n y = point_ds.data[pykey][index];\n if (ev.type != 'mousemove')\n this._split_path(x, y);\n point_ds.selection_manager.clear();\n }\n }\n return [x, y];\n }\n _set_vertices(xs, ys, styles) {\n if (this.model.vertex_renderer == null)\n return;\n const point_glyph = this.model.vertex_renderer.glyph;\n const point_cds = this.model.vertex_renderer.data_source;\n const [pxkey, pykey] = [point_glyph.x.field, point_glyph.y.field];\n if (pxkey) {\n if ((0, types_1.isArray)(xs))\n point_cds.data[pxkey] = xs;\n else\n point_glyph.x = { value: xs };\n }\n if (pykey) {\n if ((0, types_1.isArray)(ys))\n point_cds.data[pykey] = ys;\n else\n point_glyph.y = { value: ys };\n }\n if (styles != null) {\n for (const key of (0, object_1.keys)(styles)) {\n point_cds.data[key] = styles[key];\n point_glyph[key] = { field: key };\n }\n }\n else {\n for (const col of point_cds.columns()) {\n point_cds.data[col] = [];\n }\n }\n this._emit_cds_changes(point_cds, true, true, false);\n }\n _show_vertices() {\n if (!this.model.active) {\n return;\n }\n const xs = [];\n const ys = [];\n const styles = {};\n for (const key of (0, object_1.keys)(this.model.end_style))\n styles[key] = [];\n for (let i = 0; i < this.model.renderers.length; i++) {\n const renderer = this.model.renderers[i];\n const cds = renderer.data_source;\n const glyph = renderer.glyph;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n for (const array of cds.get_array(xkey)) {\n Array.prototype.push.apply(xs, array);\n for (const key of (0, object_1.keys)(this.model.end_style))\n styles[key].push(this.model.end_style[key]);\n for (const key of (0, object_1.keys)(this.model.node_style)) {\n for (let index = 0; index < (array.length - 2); index++) {\n styles[key].push(this.model.node_style[key]);\n }\n }\n for (const key of (0, object_1.keys)(this.model.end_style))\n styles[key].push(this.model.end_style[key]);\n }\n for (const array of cds.get_array(ykey))\n Array.prototype.push.apply(ys, array);\n if (this._drawing && (i == (this.model.renderers.length - 1))) {\n // Skip currently drawn vertex\n xs.splice(xs.length - 1, 1);\n ys.splice(ys.length - 1, 1);\n for (const key of (0, object_1.keys)(styles))\n styles[key].splice(styles[key].length - 1, 1);\n }\n }\n this._set_vertices(xs, ys, styles);\n }\n _remove() {\n const renderer = this.model.renderers[0];\n const cds = renderer.data_source;\n const glyph = renderer.glyph;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n if (xkey) {\n const xidx = cds.data[xkey].length - 1;\n const xs = cds.get_array(xkey)[xidx];\n xs.splice(xs.length - 1, 1);\n if (xs.length == 1)\n cds.data[xkey].splice(xidx, 1);\n }\n if (ykey) {\n const yidx = cds.data[ykey].length - 1;\n const ys = cds.get_array(ykey)[yidx];\n ys.splice(ys.length - 1, 1);\n if (ys.length == 1)\n cds.data[ykey].splice(yidx, 1);\n }\n this._emit_cds_changes(cds);\n this._drawing = false;\n this._show_vertices();\n }\n }\n exports.PolyVertexDrawToolView = PolyVertexDrawToolView;\n PolyVertexDrawToolView.__name__ = \"PolyVertexDrawToolView\";\n class PolyVertexDrawTool extends poly_draw_tool_1.PolyDrawTool {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.PolyVertexDrawTool = PolyVertexDrawTool;\n _a = PolyVertexDrawTool;\n PolyVertexDrawTool.__name__ = \"PolyVertexDrawTool\";\n PolyVertexDrawTool.__module__ = \"geoviews.models.custom_tools\";\n (() => {\n _a.prototype.default_view = PolyVertexDrawToolView;\n _a.define(({ Any }) => ({\n end_style: [Any, {}],\n node_style: [Any, {}],\n }));\n })();\n}\n","/* models/poly_edit.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const object_1 = require(\"@bokehjs/core/util/object\");\n const types_1 = require(\"@bokehjs/core/util/types\");\n const poly_edit_tool_1 = require(\"@bokehjs/models/tools/edit/poly_edit_tool\");\n class PolyVertexEditToolView extends poly_edit_tool_1.PolyEditToolView {\n deactivate() {\n this._hide_vertices();\n if (!this._selected_renderer) {\n return;\n }\n else if (this._drawing) {\n this._remove_vertex();\n this._drawing = false;\n }\n this._emit_cds_changes(this._selected_renderer.data_source, false, true, false);\n }\n _pan(ev) {\n if (this._basepoint == null || this.model.vertex_renderer == null)\n return;\n const points = this._drag_points(ev, [this.model.vertex_renderer]);\n if (!ev.shift_key) {\n this._move_linked(points);\n }\n if (this._selected_renderer)\n this._selected_renderer.data_source.change.emit();\n }\n _pan_end(ev) {\n if (this._basepoint == null || this.model.vertex_renderer == null)\n return;\n const points = this._drag_points(ev, [this.model.vertex_renderer]);\n if (!ev.shift_key) {\n this._move_linked(points);\n }\n this._emit_cds_changes(this.model.vertex_renderer.data_source, false, true, true);\n if (this._selected_renderer) {\n this._emit_cds_changes(this._selected_renderer.data_source);\n }\n this._basepoint = null;\n }\n _drag_points(ev, renderers) {\n if (this._basepoint == null)\n return [];\n const [bx, by] = this._basepoint;\n const points = [];\n for (const renderer of renderers) {\n const basepoint = this._map_drag(bx, by, renderer);\n const point = this._map_drag(ev.sx, ev.sy, renderer);\n if (point == null || basepoint == null) {\n continue;\n }\n const [x, y] = point;\n const [px, py] = basepoint;\n const [dx, dy] = [x - px, y - py];\n // Type once dataspecs are typed\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const [xkey, ykey] = [glyph.x.field, glyph.y.field];\n for (const index of cds.selected.indices) {\n const point = [];\n if (xkey) {\n point.push(cds.data[xkey][index]);\n cds.data[xkey][index] += dx;\n }\n if (ykey) {\n point.push(cds.data[ykey][index]);\n cds.data[ykey][index] += dy;\n }\n point.push(dx);\n point.push(dy);\n points.push(point);\n }\n cds.change.emit();\n }\n this._basepoint = [ev.sx, ev.sy];\n return points;\n }\n _set_vertices(xs, ys, styles) {\n if (this.model.vertex_renderer == null)\n return;\n const point_glyph = this.model.vertex_renderer.glyph;\n const point_cds = this.model.vertex_renderer.data_source;\n const [pxkey, pykey] = [point_glyph.x.field, point_glyph.y.field];\n if (pxkey) {\n if ((0, types_1.isArray)(xs))\n point_cds.data[pxkey] = xs;\n else\n point_glyph.x = { value: xs };\n }\n if (pykey) {\n if ((0, types_1.isArray)(ys))\n point_cds.data[pykey] = ys;\n else\n point_glyph.y = { value: ys };\n }\n if (styles != null) {\n for (const key of (0, object_1.keys)(styles)) {\n point_cds.data[key] = styles[key];\n point_glyph[key] = { field: key };\n }\n }\n else {\n for (const col of point_cds.columns()) {\n point_cds.data[col] = [];\n }\n }\n this._emit_cds_changes(point_cds, true, true, false);\n }\n _move_linked(points) {\n if (!this._selected_renderer)\n return;\n const renderer = this._selected_renderer;\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n const xpaths = cds.data[xkey];\n const ypaths = cds.data[ykey];\n for (const point of points) {\n const [x, y, dx, dy] = point;\n for (let index = 0; index < xpaths.length; index++) {\n const xs = xpaths[index];\n const ys = ypaths[index];\n for (let i = 0; i < xs.length; i++) {\n if ((xs[i] == x) && (ys[i] == y)) {\n xs[i] += dx;\n ys[i] += dy;\n }\n }\n }\n }\n }\n _tap(ev) {\n if (this.model.vertex_renderer == null)\n return;\n const renderer = this.model.vertex_renderer;\n const point = this._map_drag(ev.sx, ev.sy, renderer);\n if (point == null)\n return;\n else if (this._drawing && this._selected_renderer) {\n let [x, y] = point;\n const cds = renderer.data_source;\n // Type once dataspecs are typed\n const glyph = renderer.glyph;\n const [xkey, ykey] = [glyph.x.field, glyph.y.field];\n const indices = cds.selected.indices;\n [x, y] = this._snap_to_vertex(ev, x, y);\n const index = indices[0];\n cds.selected.indices = [index + 1];\n if (xkey) {\n const xs = cds.get_array(xkey);\n const nx = xs[index];\n xs[index] = x;\n xs.splice(index + 1, 0, nx);\n }\n if (ykey) {\n const ys = cds.get_array(ykey);\n const ny = ys[index];\n ys[index] = y;\n ys.splice(index + 1, 0, ny);\n }\n cds.change.emit();\n this._emit_cds_changes(this._selected_renderer.data_source, true, false, true);\n return;\n }\n this._select_event(ev, this._select_mode(ev), [renderer]);\n }\n _show_vertices(ev) {\n if (!this.model.active)\n return;\n const renderers = this._select_event(ev, \"replace\", this.model.renderers);\n if (!renderers.length) {\n this._hide_vertices();\n this._selected_renderer = null;\n this._drawing = false;\n return;\n }\n const renderer = renderers[0];\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const index = cds.selected.indices[0];\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n let xs;\n let ys;\n if (xkey) {\n xs = cds.data[xkey][index];\n if (!(0, types_1.isArray)(xs))\n cds.data[xkey][index] = xs = Array.from(xs);\n }\n else {\n xs = glyph.xs.value;\n }\n if (ykey) {\n ys = cds.data[ykey][index];\n if (!(0, types_1.isArray)(ys))\n cds.data[ykey][index] = ys = Array.from(ys);\n }\n else {\n ys = glyph.ys.value;\n }\n const styles = {};\n for (const key of (0, object_1.keys)(this.model.end_style))\n styles[key] = [this.model.end_style[key]];\n for (const key of (0, object_1.keys)(this.model.node_style)) {\n for (let index = 0; index < (xs.length - 2); index++) {\n styles[key].push(this.model.node_style[key]);\n }\n }\n for (const key of (0, object_1.keys)(this.model.end_style))\n styles[key].push(this.model.end_style[key]);\n this._selected_renderer = renderer;\n this._set_vertices(xs, ys, styles);\n }\n }\n exports.PolyVertexEditToolView = PolyVertexEditToolView;\n PolyVertexEditToolView.__name__ = \"PolyVertexEditToolView\";\n class PolyVertexEditTool extends poly_edit_tool_1.PolyEditTool {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.PolyVertexEditTool = PolyVertexEditTool;\n _a = PolyVertexEditTool;\n PolyVertexEditTool.__name__ = \"PolyVertexEditTool\";\n PolyVertexEditTool.__module__ = \"geoviews.models.custom_tools\";\n (() => {\n _a.prototype.default_view = PolyVertexEditToolView;\n _a.define(({ Any }) => ({\n end_style: [Any, {}],\n node_style: [Any, {}],\n }));\n })();\n}\n","/* models/restore_tool.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const action_tool_1 = require(\"@bokehjs/models/tools/actions/action_tool\");\n const column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\n const icons_css_1 = require(\"@bokehjs/styles/icons.css\");\n class RestoreToolView extends action_tool_1.ActionToolView {\n doit() {\n const sources = this.model.sources;\n for (const source of sources) {\n if (!source.buffer || (source.buffer.length == 0)) {\n continue;\n }\n source.data = source.buffer.pop();\n source.change.emit();\n source.properties.data.change.emit();\n }\n }\n }\n exports.RestoreToolView = RestoreToolView;\n RestoreToolView.__name__ = \"RestoreToolView\";\n class RestoreTool extends action_tool_1.ActionTool {\n constructor(attrs) {\n super(attrs);\n this.tool_name = \"Restore\";\n this.tool_icon = icons_css_1.tool_icon_undo;\n }\n }\n exports.RestoreTool = RestoreTool;\n _a = RestoreTool;\n RestoreTool.__name__ = \"RestoreTool\";\n RestoreTool.__module__ = \"geoviews.models.custom_tools\";\n (() => {\n _a.prototype.default_view = RestoreToolView;\n _a.define(({ Array, Ref }) => ({\n sources: [Array(Ref(column_data_source_1.ColumnDataSource)), []],\n }));\n })();\n}\n"]}
1
+ {"version":3,"sources":["@@/geoviews/dist/lib/index.js","@@/geoviews/dist/lib/models/index.js","@@/geoviews/dist/lib/models/checkpoint_tool.js","@@/geoviews/dist/lib/models/clear_tool.js","@@/geoviews/dist/lib/models/poly_draw.js","@@/geoviews/dist/lib/models/poly_edit.js","@@/geoviews/dist/lib/models/restore_tool.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACjLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACzOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"generated.js","sourceRoot":"","sourcesContent":["/* index.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n const GeoViews = tslib_1.__importStar(require(\"b4555bea44\") /* ./models */);\n exports.GeoViews = GeoViews;\n const base_1 = require(\"@bokehjs/base\");\n (0, base_1.register_models)(GeoViews);\n}\n","/* models/index.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var checkpoint_tool_1 = require(\"1d7c6c8516\") /* ./checkpoint_tool */;\n __esExport(\"CheckpointTool\", checkpoint_tool_1.CheckpointTool);\n var clear_tool_1 = require(\"1c15765006\") /* ./clear_tool */;\n __esExport(\"ClearTool\", clear_tool_1.ClearTool);\n var poly_draw_1 = require(\"cddc7627cc\") /* ./poly_draw */;\n __esExport(\"PolyVertexDrawTool\", poly_draw_1.PolyVertexDrawTool);\n var poly_edit_1 = require(\"8837add128\") /* ./poly_edit */;\n __esExport(\"PolyVertexEditTool\", poly_edit_1.PolyVertexEditTool);\n var restore_tool_1 = require(\"92294e6ad2\") /* ./restore_tool */;\n __esExport(\"RestoreTool\", restore_tool_1.RestoreTool);\n}\n","/* models/checkpoint_tool.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const array_1 = require(\"@bokehjs/core/util/array\");\n const action_tool_1 = require(\"@bokehjs/models/tools/actions/action_tool\");\n const column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\n const icons_css_1 = require(\"@bokehjs/styles/icons.css\");\n class CheckpointToolView extends action_tool_1.ActionToolView {\n doit() {\n const sources = this.model.sources;\n for (const source of sources) {\n if (!source.buffer) {\n source.buffer = [];\n }\n let data_copy = {};\n for (const key in source.data) {\n const column = source.data[key];\n const new_column = [];\n for (const arr of column) {\n if (Array.isArray(arr) || (ArrayBuffer.isView(arr))) {\n new_column.push((0, array_1.copy)(arr));\n }\n else {\n new_column.push(arr);\n }\n }\n data_copy[key] = new_column;\n }\n source.buffer.push(data_copy);\n }\n }\n }\n exports.CheckpointToolView = CheckpointToolView;\n CheckpointToolView.__name__ = \"CheckpointToolView\";\n class CheckpointTool extends action_tool_1.ActionTool {\n constructor(attrs) {\n super(attrs);\n this.tool_name = \"Checkpoint\";\n this.tool_icon = icons_css_1.tool_icon_save;\n }\n }\n exports.CheckpointTool = CheckpointTool;\n _a = CheckpointTool;\n CheckpointTool.__name__ = \"CheckpointTool\";\n CheckpointTool.__module__ = \"geoviews.models.custom_tools\";\n (() => {\n _a.prototype.default_view = CheckpointToolView;\n _a.define(({ Array, Ref }) => ({\n sources: [Array(Ref(column_data_source_1.ColumnDataSource)), []],\n }));\n })();\n}\n","/* models/clear_tool.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const action_tool_1 = require(\"@bokehjs/models/tools/actions/action_tool\");\n const column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\n const icons_css_1 = require(\"@bokehjs/styles/icons.css\");\n class ClearToolView extends action_tool_1.ActionToolView {\n doit() {\n for (var source of this.model.sources) {\n for (const column in source.data) {\n source.data[column] = [];\n }\n source.change.emit();\n source.properties.data.change.emit();\n }\n }\n }\n exports.ClearToolView = ClearToolView;\n ClearToolView.__name__ = \"ClearToolView\";\n class ClearTool extends action_tool_1.ActionTool {\n constructor(attrs) {\n super(attrs);\n this.tool_name = \"Clear data\";\n this.tool_icon = icons_css_1.tool_icon_reset;\n }\n }\n exports.ClearTool = ClearTool;\n _a = ClearTool;\n ClearTool.__name__ = \"ClearTool\";\n ClearTool.__module__ = \"geoviews.models.custom_tools\";\n (() => {\n _a.prototype.default_view = ClearToolView;\n _a.define(({ Array, Ref }) => ({\n sources: [Array(Ref(column_data_source_1.ColumnDataSource)), []],\n }));\n })();\n}\n","/* models/poly_draw.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const object_1 = require(\"@bokehjs/core/util/object\");\n const types_1 = require(\"@bokehjs/core/util/types\");\n const poly_draw_tool_1 = require(\"@bokehjs/models/tools/edit/poly_draw_tool\");\n class PolyVertexDrawToolView extends poly_draw_tool_1.PolyDrawToolView {\n _split_path(x, y) {\n for (let r = 0; r < this.model.renderers.length; r++) {\n const renderer = this.model.renderers[r];\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n const xpaths = cds.data[xkey];\n const ypaths = cds.data[ykey];\n for (let index = 0; index < xpaths.length; index++) {\n let xs = xpaths[index];\n if (!(0, types_1.isArray)(xs)) {\n xs = Array.from(xs);\n cds.data[xkey][index] = xs;\n }\n let ys = ypaths[index];\n if (!(0, types_1.isArray)(ys)) {\n ys = Array.from(ys);\n cds.data[ykey][index] = ys;\n }\n for (let i = 0; i < xs.length; i++) {\n if ((xs[i] == x) && (ys[i] == y) && (i != 0) && (i != (xs.length - 1))) {\n xpaths.splice(index + 1, 0, xs.slice(i));\n ypaths.splice(index + 1, 0, ys.slice(i));\n xs.splice(i + 1);\n ys.splice(i + 1);\n for (const column of cds.columns()) {\n if ((column !== xkey) && (column != ykey))\n cds.data[column].splice(index + 1, 0, cds.data[column][index]);\n }\n return;\n }\n }\n }\n }\n }\n _snap_to_vertex(ev, x, y) {\n if (this.model.vertex_renderer) {\n // If an existing vertex is hit snap to it\n const vertex_selected = this._select_event(ev, \"replace\", [this.model.vertex_renderer]);\n const point_ds = this.model.vertex_renderer.data_source;\n // Type once dataspecs are typed\n const point_glyph = this.model.vertex_renderer.glyph;\n const [pxkey, pykey] = [point_glyph.x.field, point_glyph.y.field];\n if (vertex_selected.length) {\n // If existing vertex is hit split path at that location\n // converting to feature vertex\n const index = point_ds.selected.indices[0];\n if (pxkey)\n x = point_ds.data[pxkey][index];\n if (pykey)\n y = point_ds.data[pykey][index];\n if (ev.type != 'mousemove')\n this._split_path(x, y);\n point_ds.selection_manager.clear();\n }\n }\n return [x, y];\n }\n _set_vertices(xs, ys, styles) {\n if (this.model.vertex_renderer == null)\n return;\n const point_glyph = this.model.vertex_renderer.glyph;\n const point_cds = this.model.vertex_renderer.data_source;\n const [pxkey, pykey] = [point_glyph.x.field, point_glyph.y.field];\n if (pxkey) {\n if ((0, types_1.isArray)(xs))\n point_cds.data[pxkey] = xs;\n else\n point_glyph.x = { value: xs };\n }\n if (pykey) {\n if ((0, types_1.isArray)(ys))\n point_cds.data[pykey] = ys;\n else\n point_glyph.y = { value: ys };\n }\n if (styles != null) {\n for (const key of (0, object_1.keys)(styles)) {\n point_cds.data[key] = styles[key];\n point_glyph[key] = { field: key };\n }\n }\n else {\n for (const col of point_cds.columns()) {\n point_cds.data[col] = [];\n }\n }\n this._emit_cds_changes(point_cds, true, true, false);\n }\n _show_vertices() {\n if (!this.model.active) {\n return;\n }\n const xs = [];\n const ys = [];\n const styles = {};\n for (const key of (0, object_1.keys)(this.model.end_style))\n styles[key] = [];\n for (let i = 0; i < this.model.renderers.length; i++) {\n const renderer = this.model.renderers[i];\n const cds = renderer.data_source;\n const glyph = renderer.glyph;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n for (const array of cds.get_array(xkey)) {\n Array.prototype.push.apply(xs, array);\n for (const key of (0, object_1.keys)(this.model.end_style))\n styles[key].push(this.model.end_style[key]);\n for (const key of (0, object_1.keys)(this.model.node_style)) {\n for (let index = 0; index < (array.length - 2); index++) {\n styles[key].push(this.model.node_style[key]);\n }\n }\n for (const key of (0, object_1.keys)(this.model.end_style))\n styles[key].push(this.model.end_style[key]);\n }\n for (const array of cds.get_array(ykey))\n Array.prototype.push.apply(ys, array);\n if (this._drawing && (i == (this.model.renderers.length - 1))) {\n // Skip currently drawn vertex\n xs.splice(xs.length - 1, 1);\n ys.splice(ys.length - 1, 1);\n for (const key of (0, object_1.keys)(styles))\n styles[key].splice(styles[key].length - 1, 1);\n }\n }\n this._set_vertices(xs, ys, styles);\n }\n _remove() {\n const renderer = this.model.renderers[0];\n const cds = renderer.data_source;\n const glyph = renderer.glyph;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n if (xkey) {\n const xidx = cds.data[xkey].length - 1;\n const xs = cds.get_array(xkey)[xidx];\n xs.splice(xs.length - 1, 1);\n if (xs.length == 1)\n cds.data[xkey].splice(xidx, 1);\n }\n if (ykey) {\n const yidx = cds.data[ykey].length - 1;\n const ys = cds.get_array(ykey)[yidx];\n ys.splice(ys.length - 1, 1);\n if (ys.length == 1)\n cds.data[ykey].splice(yidx, 1);\n }\n this._emit_cds_changes(cds);\n this._drawing = false;\n this._show_vertices();\n }\n }\n exports.PolyVertexDrawToolView = PolyVertexDrawToolView;\n PolyVertexDrawToolView.__name__ = \"PolyVertexDrawToolView\";\n class PolyVertexDrawTool extends poly_draw_tool_1.PolyDrawTool {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.PolyVertexDrawTool = PolyVertexDrawTool;\n _a = PolyVertexDrawTool;\n PolyVertexDrawTool.__name__ = \"PolyVertexDrawTool\";\n PolyVertexDrawTool.__module__ = \"geoviews.models.custom_tools\";\n (() => {\n _a.prototype.default_view = PolyVertexDrawToolView;\n _a.define(({ Any }) => ({\n end_style: [Any, {}],\n node_style: [Any, {}],\n }));\n })();\n}\n","/* models/poly_edit.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const object_1 = require(\"@bokehjs/core/util/object\");\n const types_1 = require(\"@bokehjs/core/util/types\");\n const poly_edit_tool_1 = require(\"@bokehjs/models/tools/edit/poly_edit_tool\");\n class PolyVertexEditToolView extends poly_edit_tool_1.PolyEditToolView {\n deactivate() {\n this._hide_vertices();\n if (!this._selected_renderer) {\n return;\n }\n else if (this._drawing) {\n this._remove_vertex();\n this._drawing = false;\n }\n this._emit_cds_changes(this._selected_renderer.data_source, false, true, false);\n }\n _pan(ev) {\n if (this._basepoint == null || this.model.vertex_renderer == null)\n return;\n const points = this._drag_points(ev, [this.model.vertex_renderer]);\n if (!ev.modifiers.shift) {\n this._move_linked(points);\n }\n if (this._selected_renderer)\n this._selected_renderer.data_source.change.emit();\n }\n _pan_end(ev) {\n if (this._basepoint == null || this.model.vertex_renderer == null)\n return;\n const points = this._drag_points(ev, [this.model.vertex_renderer]);\n if (!ev.modifiers.shift) {\n this._move_linked(points);\n }\n this._emit_cds_changes(this.model.vertex_renderer.data_source, false, true, true);\n if (this._selected_renderer) {\n this._emit_cds_changes(this._selected_renderer.data_source);\n }\n this._basepoint = null;\n }\n _drag_points(ev, renderers) {\n if (this._basepoint == null)\n return [];\n const [bx, by] = this._basepoint;\n const points = [];\n for (const renderer of renderers) {\n const basepoint = this._map_drag(bx, by, renderer);\n const point = this._map_drag(ev.sx, ev.sy, renderer);\n if (point == null || basepoint == null) {\n continue;\n }\n const [x, y] = point;\n const [px, py] = basepoint;\n const [dx, dy] = [x - px, y - py];\n // Type once dataspecs are typed\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const [xkey, ykey] = [glyph.x.field, glyph.y.field];\n for (const index of cds.selected.indices) {\n const point = [];\n if (xkey) {\n point.push(cds.data[xkey][index]);\n cds.data[xkey][index] += dx;\n }\n if (ykey) {\n point.push(cds.data[ykey][index]);\n cds.data[ykey][index] += dy;\n }\n point.push(dx);\n point.push(dy);\n points.push(point);\n }\n cds.change.emit();\n }\n this._basepoint = [ev.sx, ev.sy];\n return points;\n }\n _set_vertices(xs, ys, styles) {\n if (this.model.vertex_renderer == null)\n return;\n const point_glyph = this.model.vertex_renderer.glyph;\n const point_cds = this.model.vertex_renderer.data_source;\n const [pxkey, pykey] = [point_glyph.x.field, point_glyph.y.field];\n if (pxkey) {\n if ((0, types_1.isArray)(xs))\n point_cds.data[pxkey] = xs;\n else\n point_glyph.x = { value: xs };\n }\n if (pykey) {\n if ((0, types_1.isArray)(ys))\n point_cds.data[pykey] = ys;\n else\n point_glyph.y = { value: ys };\n }\n if (styles != null) {\n for (const key of (0, object_1.keys)(styles)) {\n point_cds.data[key] = styles[key];\n point_glyph[key] = { field: key };\n }\n }\n else {\n for (const col of point_cds.columns()) {\n point_cds.data[col] = [];\n }\n }\n this._emit_cds_changes(point_cds, true, true, false);\n }\n _move_linked(points) {\n if (!this._selected_renderer)\n return;\n const renderer = this._selected_renderer;\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n const xpaths = cds.data[xkey];\n const ypaths = cds.data[ykey];\n for (const point of points) {\n const [x, y, dx, dy] = point;\n for (let index = 0; index < xpaths.length; index++) {\n const xs = xpaths[index];\n const ys = ypaths[index];\n for (let i = 0; i < xs.length; i++) {\n if ((xs[i] == x) && (ys[i] == y)) {\n xs[i] += dx;\n ys[i] += dy;\n }\n }\n }\n }\n }\n _tap(ev) {\n if (this.model.vertex_renderer == null)\n return;\n const renderer = this.model.vertex_renderer;\n const point = this._map_drag(ev.sx, ev.sy, renderer);\n if (point == null)\n return;\n else if (this._drawing && this._selected_renderer) {\n let [x, y] = point;\n const cds = renderer.data_source;\n // Type once dataspecs are typed\n const glyph = renderer.glyph;\n const [xkey, ykey] = [glyph.x.field, glyph.y.field];\n const indices = cds.selected.indices;\n [x, y] = this._snap_to_vertex(ev, x, y);\n const index = indices[0];\n cds.selected.indices = [index + 1];\n if (xkey) {\n const xs = cds.get_array(xkey);\n const nx = xs[index];\n xs[index] = x;\n xs.splice(index + 1, 0, nx);\n }\n if (ykey) {\n const ys = cds.get_array(ykey);\n const ny = ys[index];\n ys[index] = y;\n ys.splice(index + 1, 0, ny);\n }\n cds.change.emit();\n this._emit_cds_changes(this._selected_renderer.data_source, true, false, true);\n return;\n }\n this._select_event(ev, this._select_mode(ev), [renderer]);\n }\n _show_vertices(ev) {\n if (!this.model.active)\n return;\n const renderers = this._select_event(ev, \"replace\", this.model.renderers);\n if (!renderers.length) {\n this._hide_vertices();\n this._selected_renderer = null;\n this._drawing = false;\n return;\n }\n const renderer = renderers[0];\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const index = cds.selected.indices[0];\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n let xs;\n let ys;\n if (xkey) {\n xs = cds.data[xkey][index];\n if (!(0, types_1.isArray)(xs))\n cds.data[xkey][index] = xs = Array.from(xs);\n }\n else {\n xs = glyph.xs.value;\n }\n if (ykey) {\n ys = cds.data[ykey][index];\n if (!(0, types_1.isArray)(ys))\n cds.data[ykey][index] = ys = Array.from(ys);\n }\n else {\n ys = glyph.ys.value;\n }\n const styles = {};\n for (const key of (0, object_1.keys)(this.model.end_style))\n styles[key] = [this.model.end_style[key]];\n for (const key of (0, object_1.keys)(this.model.node_style)) {\n for (let index = 0; index < (xs.length - 2); index++) {\n styles[key].push(this.model.node_style[key]);\n }\n }\n for (const key of (0, object_1.keys)(this.model.end_style))\n styles[key].push(this.model.end_style[key]);\n this._selected_renderer = renderer;\n this._set_vertices(xs, ys, styles);\n }\n }\n exports.PolyVertexEditToolView = PolyVertexEditToolView;\n PolyVertexEditToolView.__name__ = \"PolyVertexEditToolView\";\n class PolyVertexEditTool extends poly_edit_tool_1.PolyEditTool {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.PolyVertexEditTool = PolyVertexEditTool;\n _a = PolyVertexEditTool;\n PolyVertexEditTool.__name__ = \"PolyVertexEditTool\";\n PolyVertexEditTool.__module__ = \"geoviews.models.custom_tools\";\n (() => {\n _a.prototype.default_view = PolyVertexEditToolView;\n _a.define(({ Any }) => ({\n end_style: [Any, {}],\n node_style: [Any, {}],\n }));\n })();\n}\n","/* models/restore_tool.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const action_tool_1 = require(\"@bokehjs/models/tools/actions/action_tool\");\n const column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\n const icons_css_1 = require(\"@bokehjs/styles/icons.css\");\n class RestoreToolView extends action_tool_1.ActionToolView {\n doit() {\n const sources = this.model.sources;\n for (const source of sources) {\n if (!source.buffer || (source.buffer.length == 0)) {\n continue;\n }\n source.data = source.buffer.pop();\n source.change.emit();\n source.properties.data.change.emit();\n }\n }\n }\n exports.RestoreToolView = RestoreToolView;\n RestoreToolView.__name__ = \"RestoreToolView\";\n class RestoreTool extends action_tool_1.ActionTool {\n constructor(attrs) {\n super(attrs);\n this.tool_name = \"Restore\";\n this.tool_icon = icons_css_1.tool_icon_undo;\n }\n }\n exports.RestoreTool = RestoreTool;\n _a = RestoreTool;\n RestoreTool.__name__ = \"RestoreTool\";\n RestoreTool.__module__ = \"geoviews.models.custom_tools\";\n (() => {\n _a.prototype.default_view = RestoreToolView;\n _a.define(({ Array, Ref }) => ({\n sources: [Array(Ref(column_data_source_1.ColumnDataSource)), []],\n }));\n })();\n}\n"]}
@@ -1 +1 @@
1
- {"version":4,"artifacts":[{"module":{"file":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib/index.js","base":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib","base_path":"index.js","canonical":"index","resolution":"ESM","id":"c764d38756","hash":"c764d387562670624c9da140449548667d1588e6dd8d12da2fe04c18f1fadf6b","source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.GeoViews = void 0;\nconst tslib_1 = require(\"tslib\");\nconst GeoViews = tslib_1.__importStar(require(\"./models\"));\nexports.GeoViews = GeoViews;\nconst base_1 = require(\"@bokehjs/base\");\n(0, base_1.register_models)(GeoViews);\n//# sourceMappingURL=index.js.map\n","type":"js","dependency_paths":[["./models","/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/index.js"]],"dependency_map":[],"exported":[],"externals":[],"shims":[]},"code":{"source":"/* index.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n const GeoViews = tslib_1.__importStar(require(\"b4555bea44\") /* ./models */);\n exports.GeoViews = GeoViews;\n const base_1 = require(\"@bokehjs/base\");\n (0, base_1.register_models)(GeoViews);\n}\n","min_source":"function _(e,s,o,t,b){t();const i=e(\"tslib\").__importStar(e(\"b4555bea44\"));o.GeoViews=i;(0,e(\"@bokehjs/base\").register_models)(i)}\n//# sourceMappingURL=index.min.js.map","min_map":"{\"version\":3,\"file\":\"index.min.js\",\"names\":[\"_\",\"require\",\"module\",\"exports\",\"__esModule\",\"__esExport\",\"GeoViews\",\"__importStar\",\"register_models\"],\"sources\":[\"0\"],\"mappings\":\"AAAe,SAASA,EAAEC,EAASC,EAAQC,EAASC,EAAYC,GAC5DD,IACA,MACME,EADUL,EAAQ,SACCM,aAAaN,EAAQ,eAC9CE,EAAQG,SAAWA,GAEnB,EADeL,EAAQ,iBACZO,iBAAiBF,EAChC\"}"}},{"module":{"file":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/index.js","base":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib","base_path":"models/index.js","canonical":"models/index","resolution":"ESM","id":"b4555bea44","hash":"b4555bea4497cc5bbb2ea67ae1cbd42552a9de3a7d8633abf56c3a7ca693300d","source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RestoreTool = exports.PolyVertexEditTool = exports.PolyVertexDrawTool = exports.ClearTool = exports.CheckpointTool = void 0;\nvar checkpoint_tool_1 = require(\"./checkpoint_tool\");\nObject.defineProperty(exports, \"CheckpointTool\", { enumerable: true, get: function () { return checkpoint_tool_1.CheckpointTool; } });\nvar clear_tool_1 = require(\"./clear_tool\");\nObject.defineProperty(exports, \"ClearTool\", { enumerable: true, get: function () { return clear_tool_1.ClearTool; } });\nvar poly_draw_1 = require(\"./poly_draw\");\nObject.defineProperty(exports, \"PolyVertexDrawTool\", { enumerable: true, get: function () { return poly_draw_1.PolyVertexDrawTool; } });\nvar poly_edit_1 = require(\"./poly_edit\");\nObject.defineProperty(exports, \"PolyVertexEditTool\", { enumerable: true, get: function () { return poly_edit_1.PolyVertexEditTool; } });\nvar restore_tool_1 = require(\"./restore_tool\");\nObject.defineProperty(exports, \"RestoreTool\", { enumerable: true, get: function () { return restore_tool_1.RestoreTool; } });\n//# sourceMappingURL=index.js.map\n","type":"js","dependency_paths":[["./checkpoint_tool","/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/checkpoint_tool.js"],["./clear_tool","/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/clear_tool.js"],["./poly_draw","/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/poly_draw.js"],["./poly_edit","/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/poly_edit.js"],["./restore_tool","/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/restore_tool.js"]],"dependency_map":[],"exported":[{"type":"bindings","bindings":[[null,"CheckpointTool"]],"module":"./checkpoint_tool"},{"type":"bindings","bindings":[[null,"ClearTool"]],"module":"./clear_tool"},{"type":"bindings","bindings":[[null,"PolyVertexDrawTool"]],"module":"./poly_draw"},{"type":"bindings","bindings":[[null,"PolyVertexEditTool"]],"module":"./poly_edit"},{"type":"bindings","bindings":[[null,"RestoreTool"]],"module":"./restore_tool"}],"externals":[],"shims":[]},"code":{"source":"/* models/index.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var checkpoint_tool_1 = require(\"1d7c6c8516\") /* ./checkpoint_tool */;\n __esExport(\"CheckpointTool\", checkpoint_tool_1.CheckpointTool);\n var clear_tool_1 = require(\"1c15765006\") /* ./clear_tool */;\n __esExport(\"ClearTool\", clear_tool_1.ClearTool);\n var poly_draw_1 = require(\"cddc7627cc\") /* ./poly_draw */;\n __esExport(\"PolyVertexDrawTool\", poly_draw_1.PolyVertexDrawTool);\n var poly_edit_1 = require(\"296f32feb2\") /* ./poly_edit */;\n __esExport(\"PolyVertexEditTool\", poly_edit_1.PolyVertexEditTool);\n var restore_tool_1 = require(\"92294e6ad2\") /* ./restore_tool */;\n __esExport(\"RestoreTool\", restore_tool_1.RestoreTool);\n}\n","min_source":"function _(o,e,l,t,c){t(),c(\"CheckpointTool\",o(\"1d7c6c8516\").CheckpointTool),c(\"ClearTool\",o(\"1c15765006\").ClearTool),c(\"PolyVertexDrawTool\",o(\"cddc7627cc\").PolyVertexDrawTool),c(\"PolyVertexEditTool\",o(\"296f32feb2\").PolyVertexEditTool),c(\"RestoreTool\",o(\"92294e6ad2\").RestoreTool)}\n//# sourceMappingURL=index.min.js.map","min_map":"{\"version\":3,\"file\":\"index.min.js\",\"names\":[\"_\",\"require\",\"module\",\"exports\",\"__esModule\",\"__esExport\",\"CheckpointTool\",\"ClearTool\",\"PolyVertexDrawTool\",\"PolyVertexEditTool\",\"RestoreTool\"],\"sources\":[\"0\"],\"mappings\":\"AAAsB,SAASA,EAAEC,EAASC,EAAQC,EAASC,EAAYC,GACnED,IAEAC,EAAW,iBADaJ,EAAQ,cACeK,gBAE/CD,EAAW,YADQJ,EAAQ,cACUM,WAErCF,EAAW,qBADOJ,EAAQ,cACmBO,oBAE7CH,EAAW,qBADOJ,EAAQ,cACmBQ,oBAE7CJ,EAAW,cADUJ,EAAQ,cACYS,YAC7C\"}"}},{"module":{"file":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/checkpoint_tool.js","base":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib","base_path":"models/checkpoint_tool.js","canonical":"models/checkpoint_tool","resolution":"ESM","id":"1d7c6c8516","hash":"1d7c6c8516c8cfba888a69803c918bbacfd80008dc3044c6b69dca8c77c5a048","source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CheckpointTool = exports.CheckpointToolView = void 0;\nvar _a;\nconst array_1 = require(\"@bokehjs/core/util/array\");\nconst action_tool_1 = require(\"@bokehjs/models/tools/actions/action_tool\");\nconst column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\nconst icons_css_1 = require(\"@bokehjs/styles/icons.css\");\nclass CheckpointToolView extends action_tool_1.ActionToolView {\n doit() {\n const sources = this.model.sources;\n for (const source of sources) {\n if (!source.buffer) {\n source.buffer = [];\n }\n let data_copy = {};\n for (const key in source.data) {\n const column = source.data[key];\n const new_column = [];\n for (const arr of column) {\n if (Array.isArray(arr) || (ArrayBuffer.isView(arr))) {\n new_column.push((0, array_1.copy)(arr));\n }\n else {\n new_column.push(arr);\n }\n }\n data_copy[key] = new_column;\n }\n source.buffer.push(data_copy);\n }\n }\n}\nexports.CheckpointToolView = CheckpointToolView;\nCheckpointToolView.__name__ = \"CheckpointToolView\";\nclass CheckpointTool extends action_tool_1.ActionTool {\n constructor(attrs) {\n super(attrs);\n this.tool_name = \"Checkpoint\";\n this.tool_icon = icons_css_1.tool_icon_save;\n }\n}\nexports.CheckpointTool = CheckpointTool;\n_a = CheckpointTool;\nCheckpointTool.__name__ = \"CheckpointTool\";\nCheckpointTool.__module__ = \"geoviews.models.custom_tools\";\n(() => {\n _a.prototype.default_view = CheckpointToolView;\n _a.define(({ Array, Ref }) => ({\n sources: [Array(Ref(column_data_source_1.ColumnDataSource)), []],\n }));\n})();\n//# sourceMappingURL=checkpoint_tool.js.map\n","type":"js","dependency_paths":[],"dependency_map":[],"exported":[{"type":"named","name":"CheckpointToolView"},{"type":"named","name":"CheckpointTool"}],"externals":[],"shims":[]},"code":{"source":"/* models/checkpoint_tool.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const array_1 = require(\"@bokehjs/core/util/array\");\n const action_tool_1 = require(\"@bokehjs/models/tools/actions/action_tool\");\n const column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\n const icons_css_1 = require(\"@bokehjs/styles/icons.css\");\n class CheckpointToolView extends action_tool_1.ActionToolView {\n doit() {\n const sources = this.model.sources;\n for (const source of sources) {\n if (!source.buffer) {\n source.buffer = [];\n }\n let data_copy = {};\n for (const key in source.data) {\n const column = source.data[key];\n const new_column = [];\n for (const arr of column) {\n if (Array.isArray(arr) || (ArrayBuffer.isView(arr))) {\n new_column.push((0, array_1.copy)(arr));\n }\n else {\n new_column.push(arr);\n }\n }\n data_copy[key] = new_column;\n }\n source.buffer.push(data_copy);\n }\n }\n }\n exports.CheckpointToolView = CheckpointToolView;\n CheckpointToolView.__name__ = \"CheckpointToolView\";\n class CheckpointTool extends action_tool_1.ActionTool {\n constructor(attrs) {\n super(attrs);\n this.tool_name = \"Checkpoint\";\n this.tool_icon = icons_css_1.tool_icon_save;\n }\n }\n exports.CheckpointTool = CheckpointTool;\n _a = CheckpointTool;\n CheckpointTool.__name__ = \"CheckpointTool\";\n CheckpointTool.__module__ = \"geoviews.models.custom_tools\";\n (() => {\n _a.prototype.default_view = CheckpointToolView;\n _a.define(({ Array, Ref }) => ({\n sources: [Array(Ref(column_data_source_1.ColumnDataSource)), []],\n }));\n })();\n}\n","min_source":"function _(o,e,s,t,c){var n;t();const i=o(\"@bokehjs/core/util/array\"),r=o(\"@bokehjs/models/tools/actions/action_tool\"),l=o(\"@bokehjs/models/sources/column_data_source\"),a=o(\"@bokehjs/styles/icons.css\");class _ extends r.ActionToolView{doit(){const o=this.model.sources;for(const e of o){e.buffer||(e.buffer=[]);let o={};for(const s in e.data){const t=e.data[s],c=[];for(const o of t)Array.isArray(o)||ArrayBuffer.isView(o)?c.push((0,i.copy)(o)):c.push(o);o[s]=c}e.buffer.push(o)}}}s.CheckpointToolView=_,_.__name__=\"CheckpointToolView\";class u extends r.ActionTool{constructor(o){super(o),this.tool_name=\"Checkpoint\",this.tool_icon=a.tool_icon_save}}s.CheckpointTool=u,n=u,u.__name__=\"CheckpointTool\",u.__module__=\"geoviews.models.custom_tools\",n.prototype.default_view=_,n.define((({Array:o,Ref:e})=>({sources:[o(e(l.ColumnDataSource)),[]]})))}\n//# sourceMappingURL=checkpoint_tool.min.js.map","min_map":"{\"version\":3,\"file\":\"checkpoint_tool.min.js\",\"names\":[\"_\",\"require\",\"module\",\"exports\",\"__esModule\",\"__esExport\",\"_a\",\"array_1\",\"action_tool_1\",\"column_data_source_1\",\"icons_css_1\",\"CheckpointToolView\",\"ActionToolView\",\"doit\",\"sources\",\"this\",\"model\",\"source\",\"buffer\",\"data_copy\",\"key\",\"data\",\"column\",\"new_column\",\"arr\",\"Array\",\"isArray\",\"ArrayBuffer\",\"isView\",\"push\",\"copy\",\"__name__\",\"CheckpointTool\",\"ActionTool\",\"constructor\",\"attrs\",\"super\",\"tool_name\",\"tool_icon\",\"tool_icon_save\",\"__module__\",\"prototype\",\"default_view\",\"define\",\"Ref\",\"ColumnDataSource\"],\"sources\":[\"0\"],\"mappings\":\"AAAgC,SAASA,EAAEC,EAASC,EAAQC,EAASC,EAAYC,GAE7E,IAAIC,EADJF,IAEA,MAAMG,EAAUN,EAAQ,4BAClBO,EAAgBP,EAAQ,6CACxBQ,EAAuBR,EAAQ,8CAC/BS,EAAcT,EAAQ,6BAC5B,MAAMU,UAA2BH,EAAcI,eAC3CC,OACI,MAAMC,EAAUC,KAAKC,MAAMF,QAC3B,IAAK,MAAMG,KAAUH,EAAS,CACrBG,EAAOC,SACRD,EAAOC,OAAS,IAEpB,IAAIC,EAAY,CAAC,EACjB,IAAK,MAAMC,KAAOH,EAAOI,KAAM,CAC3B,MAAMC,EAASL,EAAOI,KAAKD,GACrBG,EAAa,GACnB,IAAK,MAAMC,KAAOF,EACVG,MAAMC,QAAQF,IAASG,YAAYC,OAAOJ,GAC1CD,EAAWM,MAAK,EAAItB,EAAQuB,MAAMN,IAGlCD,EAAWM,KAAKL,GAGxBL,EAAUC,GAAOG,CACrB,CACAN,EAAOC,OAAOW,KAAKV,EACvB,CACJ,EAEJhB,EAAQQ,mBAAqBA,EAC7BA,EAAmBoB,SAAW,qBAC9B,MAAMC,UAAuBxB,EAAcyB,WACvCC,YAAYC,GACRC,MAAMD,GACNpB,KAAKsB,UAAY,aACjBtB,KAAKuB,UAAY5B,EAAY6B,cACjC,EAEJpC,EAAQ6B,eAAiBA,EACzB1B,EAAK0B,EACLA,EAAeD,SAAW,iBAC1BC,EAAeQ,WAAa,+BAExBlC,EAAGmC,UAAUC,aAAe/B,EAC5BL,EAAGqC,QAAO,EAAGlB,QAAOmB,UAAU,CAC1B9B,QAAS,CAACW,EAAMmB,EAAInC,EAAqBoC,mBAAoB,OAGzE\"}"}},{"module":{"file":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/clear_tool.js","base":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib","base_path":"models/clear_tool.js","canonical":"models/clear_tool","resolution":"ESM","id":"1c15765006","hash":"1c15765006e6c171d23c6cc5f80f4c60a735fc05b57b55a3c9eac79f684df738","source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ClearTool = exports.ClearToolView = void 0;\nvar _a;\nconst action_tool_1 = require(\"@bokehjs/models/tools/actions/action_tool\");\nconst column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\nconst icons_css_1 = require(\"@bokehjs/styles/icons.css\");\nclass ClearToolView extends action_tool_1.ActionToolView {\n doit() {\n for (var source of this.model.sources) {\n for (const column in source.data) {\n source.data[column] = [];\n }\n source.change.emit();\n source.properties.data.change.emit();\n }\n }\n}\nexports.ClearToolView = ClearToolView;\nClearToolView.__name__ = \"ClearToolView\";\nclass ClearTool extends action_tool_1.ActionTool {\n constructor(attrs) {\n super(attrs);\n this.tool_name = \"Clear data\";\n this.tool_icon = icons_css_1.tool_icon_reset;\n }\n}\nexports.ClearTool = ClearTool;\n_a = ClearTool;\nClearTool.__name__ = \"ClearTool\";\nClearTool.__module__ = \"geoviews.models.custom_tools\";\n(() => {\n _a.prototype.default_view = ClearToolView;\n _a.define(({ Array, Ref }) => ({\n sources: [Array(Ref(column_data_source_1.ColumnDataSource)), []],\n }));\n})();\n//# sourceMappingURL=clear_tool.js.map\n","type":"js","dependency_paths":[],"dependency_map":[],"exported":[{"type":"named","name":"ClearToolView"},{"type":"named","name":"ClearTool"}],"externals":[],"shims":[]},"code":{"source":"/* models/clear_tool.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const action_tool_1 = require(\"@bokehjs/models/tools/actions/action_tool\");\n const column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\n const icons_css_1 = require(\"@bokehjs/styles/icons.css\");\n class ClearToolView extends action_tool_1.ActionToolView {\n doit() {\n for (var source of this.model.sources) {\n for (const column in source.data) {\n source.data[column] = [];\n }\n source.change.emit();\n source.properties.data.change.emit();\n }\n }\n }\n exports.ClearToolView = ClearToolView;\n ClearToolView.__name__ = \"ClearToolView\";\n class ClearTool extends action_tool_1.ActionTool {\n constructor(attrs) {\n super(attrs);\n this.tool_name = \"Clear data\";\n this.tool_icon = icons_css_1.tool_icon_reset;\n }\n }\n exports.ClearTool = ClearTool;\n _a = ClearTool;\n ClearTool.__name__ = \"ClearTool\";\n ClearTool.__module__ = \"geoviews.models.custom_tools\";\n (() => {\n _a.prototype.default_view = ClearToolView;\n _a.define(({ Array, Ref }) => ({\n sources: [Array(Ref(column_data_source_1.ColumnDataSource)), []],\n }));\n })();\n}\n","min_source":"function _(o,e,s,t,a){var l;t();const c=o(\"@bokehjs/models/tools/actions/action_tool\"),n=o(\"@bokehjs/models/sources/column_data_source\"),r=o(\"@bokehjs/styles/icons.css\");class i extends c.ActionToolView{doit(){for(var o of this.model.sources){for(const e in o.data)o.data[e]=[];o.change.emit(),o.properties.data.change.emit()}}}s.ClearToolView=i,i.__name__=\"ClearToolView\";class _ extends c.ActionTool{constructor(o){super(o),this.tool_name=\"Clear data\",this.tool_icon=r.tool_icon_reset}}s.ClearTool=_,l=_,_.__name__=\"ClearTool\",_.__module__=\"geoviews.models.custom_tools\",l.prototype.default_view=i,l.define((({Array:o,Ref:e})=>({sources:[o(e(n.ColumnDataSource)),[]]})))}\n//# sourceMappingURL=clear_tool.min.js.map","min_map":"{\"version\":3,\"file\":\"clear_tool.min.js\",\"names\":[\"_\",\"require\",\"module\",\"exports\",\"__esModule\",\"__esExport\",\"_a\",\"action_tool_1\",\"column_data_source_1\",\"icons_css_1\",\"ClearToolView\",\"ActionToolView\",\"doit\",\"source\",\"this\",\"model\",\"sources\",\"column\",\"data\",\"change\",\"emit\",\"properties\",\"__name__\",\"ClearTool\",\"ActionTool\",\"constructor\",\"attrs\",\"super\",\"tool_name\",\"tool_icon\",\"tool_icon_reset\",\"__module__\",\"prototype\",\"default_view\",\"define\",\"Array\",\"Ref\",\"ColumnDataSource\"],\"sources\":[\"0\"],\"mappings\":\"AAA2B,SAASA,EAAEC,EAASC,EAAQC,EAASC,EAAYC,GAExE,IAAIC,EADJF,IAEA,MAAMG,EAAgBN,EAAQ,6CACxBO,EAAuBP,EAAQ,8CAC/BQ,EAAcR,EAAQ,6BAC5B,MAAMS,UAAsBH,EAAcI,eACtCC,OACI,IAAK,IAAIC,KAAUC,KAAKC,MAAMC,QAAS,CACnC,IAAK,MAAMC,KAAUJ,EAAOK,KACxBL,EAAOK,KAAKD,GAAU,GAE1BJ,EAAOM,OAAOC,OACdP,EAAOQ,WAAWH,KAAKC,OAAOC,MAClC,CACJ,EAEJjB,EAAQO,cAAgBA,EACxBA,EAAcY,SAAW,gBACzB,MAAMC,UAAkBhB,EAAciB,WAClCC,YAAYC,GACRC,MAAMD,GACNZ,KAAKc,UAAY,aACjBd,KAAKe,UAAYpB,EAAYqB,eACjC,EAEJ3B,EAAQoB,UAAYA,EACpBjB,EAAKiB,EACLA,EAAUD,SAAW,YACrBC,EAAUQ,WAAa,+BAEnBzB,EAAG0B,UAAUC,aAAevB,EAC5BJ,EAAG4B,QAAO,EAAGC,QAAOC,UAAU,CAC1BpB,QAAS,CAACmB,EAAMC,EAAI5B,EAAqB6B,mBAAoB,OAGzE\"}"}},{"module":{"file":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/poly_draw.js","base":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib","base_path":"models/poly_draw.js","canonical":"models/poly_draw","resolution":"ESM","id":"cddc7627cc","hash":"cddc7627cc8ef2596322d256f9947effa09994b8826f0040a9bdb56383ea94f8","source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PolyVertexDrawTool = exports.PolyVertexDrawToolView = void 0;\nvar _a;\nconst object_1 = require(\"@bokehjs/core/util/object\");\nconst types_1 = require(\"@bokehjs/core/util/types\");\nconst poly_draw_tool_1 = require(\"@bokehjs/models/tools/edit/poly_draw_tool\");\nclass PolyVertexDrawToolView extends poly_draw_tool_1.PolyDrawToolView {\n _split_path(x, y) {\n for (let r = 0; r < this.model.renderers.length; r++) {\n const renderer = this.model.renderers[r];\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n const xpaths = cds.data[xkey];\n const ypaths = cds.data[ykey];\n for (let index = 0; index < xpaths.length; index++) {\n let xs = xpaths[index];\n if (!(0, types_1.isArray)(xs)) {\n xs = Array.from(xs);\n cds.data[xkey][index] = xs;\n }\n let ys = ypaths[index];\n if (!(0, types_1.isArray)(ys)) {\n ys = Array.from(ys);\n cds.data[ykey][index] = ys;\n }\n for (let i = 0; i < xs.length; i++) {\n if ((xs[i] == x) && (ys[i] == y) && (i != 0) && (i != (xs.length - 1))) {\n xpaths.splice(index + 1, 0, xs.slice(i));\n ypaths.splice(index + 1, 0, ys.slice(i));\n xs.splice(i + 1);\n ys.splice(i + 1);\n for (const column of cds.columns()) {\n if ((column !== xkey) && (column != ykey))\n cds.data[column].splice(index + 1, 0, cds.data[column][index]);\n }\n return;\n }\n }\n }\n }\n }\n _snap_to_vertex(ev, x, y) {\n if (this.model.vertex_renderer) {\n // If an existing vertex is hit snap to it\n const vertex_selected = this._select_event(ev, \"replace\", [this.model.vertex_renderer]);\n const point_ds = this.model.vertex_renderer.data_source;\n // Type once dataspecs are typed\n const point_glyph = this.model.vertex_renderer.glyph;\n const [pxkey, pykey] = [point_glyph.x.field, point_glyph.y.field];\n if (vertex_selected.length) {\n // If existing vertex is hit split path at that location\n // converting to feature vertex\n const index = point_ds.selected.indices[0];\n if (pxkey)\n x = point_ds.data[pxkey][index];\n if (pykey)\n y = point_ds.data[pykey][index];\n if (ev.type != 'mousemove')\n this._split_path(x, y);\n point_ds.selection_manager.clear();\n }\n }\n return [x, y];\n }\n _set_vertices(xs, ys, styles) {\n if (this.model.vertex_renderer == null)\n return;\n const point_glyph = this.model.vertex_renderer.glyph;\n const point_cds = this.model.vertex_renderer.data_source;\n const [pxkey, pykey] = [point_glyph.x.field, point_glyph.y.field];\n if (pxkey) {\n if ((0, types_1.isArray)(xs))\n point_cds.data[pxkey] = xs;\n else\n point_glyph.x = { value: xs };\n }\n if (pykey) {\n if ((0, types_1.isArray)(ys))\n point_cds.data[pykey] = ys;\n else\n point_glyph.y = { value: ys };\n }\n if (styles != null) {\n for (const key of (0, object_1.keys)(styles)) {\n point_cds.data[key] = styles[key];\n point_glyph[key] = { field: key };\n }\n }\n else {\n for (const col of point_cds.columns()) {\n point_cds.data[col] = [];\n }\n }\n this._emit_cds_changes(point_cds, true, true, false);\n }\n _show_vertices() {\n if (!this.model.active) {\n return;\n }\n const xs = [];\n const ys = [];\n const styles = {};\n for (const key of (0, object_1.keys)(this.model.end_style))\n styles[key] = [];\n for (let i = 0; i < this.model.renderers.length; i++) {\n const renderer = this.model.renderers[i];\n const cds = renderer.data_source;\n const glyph = renderer.glyph;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n for (const array of cds.get_array(xkey)) {\n Array.prototype.push.apply(xs, array);\n for (const key of (0, object_1.keys)(this.model.end_style))\n styles[key].push(this.model.end_style[key]);\n for (const key of (0, object_1.keys)(this.model.node_style)) {\n for (let index = 0; index < (array.length - 2); index++) {\n styles[key].push(this.model.node_style[key]);\n }\n }\n for (const key of (0, object_1.keys)(this.model.end_style))\n styles[key].push(this.model.end_style[key]);\n }\n for (const array of cds.get_array(ykey))\n Array.prototype.push.apply(ys, array);\n if (this._drawing && (i == (this.model.renderers.length - 1))) {\n // Skip currently drawn vertex\n xs.splice(xs.length - 1, 1);\n ys.splice(ys.length - 1, 1);\n for (const key of (0, object_1.keys)(styles))\n styles[key].splice(styles[key].length - 1, 1);\n }\n }\n this._set_vertices(xs, ys, styles);\n }\n _remove() {\n const renderer = this.model.renderers[0];\n const cds = renderer.data_source;\n const glyph = renderer.glyph;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n if (xkey) {\n const xidx = cds.data[xkey].length - 1;\n const xs = cds.get_array(xkey)[xidx];\n xs.splice(xs.length - 1, 1);\n if (xs.length == 1)\n cds.data[xkey].splice(xidx, 1);\n }\n if (ykey) {\n const yidx = cds.data[ykey].length - 1;\n const ys = cds.get_array(ykey)[yidx];\n ys.splice(ys.length - 1, 1);\n if (ys.length == 1)\n cds.data[ykey].splice(yidx, 1);\n }\n this._emit_cds_changes(cds);\n this._drawing = false;\n this._show_vertices();\n }\n}\nexports.PolyVertexDrawToolView = PolyVertexDrawToolView;\nPolyVertexDrawToolView.__name__ = \"PolyVertexDrawToolView\";\nclass PolyVertexDrawTool extends poly_draw_tool_1.PolyDrawTool {\n constructor(attrs) {\n super(attrs);\n }\n}\nexports.PolyVertexDrawTool = PolyVertexDrawTool;\n_a = PolyVertexDrawTool;\nPolyVertexDrawTool.__name__ = \"PolyVertexDrawTool\";\nPolyVertexDrawTool.__module__ = \"geoviews.models.custom_tools\";\n(() => {\n _a.prototype.default_view = PolyVertexDrawToolView;\n _a.define(({ Any }) => ({\n end_style: [Any, {}],\n node_style: [Any, {}],\n }));\n})();\n//# sourceMappingURL=poly_draw.js.map\n","type":"js","dependency_paths":[],"dependency_map":[],"exported":[{"type":"named","name":"PolyVertexDrawToolView"},{"type":"named","name":"PolyVertexDrawTool"}],"externals":[],"shims":[]},"code":{"source":"/* models/poly_draw.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const object_1 = require(\"@bokehjs/core/util/object\");\n const types_1 = require(\"@bokehjs/core/util/types\");\n const poly_draw_tool_1 = require(\"@bokehjs/models/tools/edit/poly_draw_tool\");\n class PolyVertexDrawToolView extends poly_draw_tool_1.PolyDrawToolView {\n _split_path(x, y) {\n for (let r = 0; r < this.model.renderers.length; r++) {\n const renderer = this.model.renderers[r];\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n const xpaths = cds.data[xkey];\n const ypaths = cds.data[ykey];\n for (let index = 0; index < xpaths.length; index++) {\n let xs = xpaths[index];\n if (!(0, types_1.isArray)(xs)) {\n xs = Array.from(xs);\n cds.data[xkey][index] = xs;\n }\n let ys = ypaths[index];\n if (!(0, types_1.isArray)(ys)) {\n ys = Array.from(ys);\n cds.data[ykey][index] = ys;\n }\n for (let i = 0; i < xs.length; i++) {\n if ((xs[i] == x) && (ys[i] == y) && (i != 0) && (i != (xs.length - 1))) {\n xpaths.splice(index + 1, 0, xs.slice(i));\n ypaths.splice(index + 1, 0, ys.slice(i));\n xs.splice(i + 1);\n ys.splice(i + 1);\n for (const column of cds.columns()) {\n if ((column !== xkey) && (column != ykey))\n cds.data[column].splice(index + 1, 0, cds.data[column][index]);\n }\n return;\n }\n }\n }\n }\n }\n _snap_to_vertex(ev, x, y) {\n if (this.model.vertex_renderer) {\n // If an existing vertex is hit snap to it\n const vertex_selected = this._select_event(ev, \"replace\", [this.model.vertex_renderer]);\n const point_ds = this.model.vertex_renderer.data_source;\n // Type once dataspecs are typed\n const point_glyph = this.model.vertex_renderer.glyph;\n const [pxkey, pykey] = [point_glyph.x.field, point_glyph.y.field];\n if (vertex_selected.length) {\n // If existing vertex is hit split path at that location\n // converting to feature vertex\n const index = point_ds.selected.indices[0];\n if (pxkey)\n x = point_ds.data[pxkey][index];\n if (pykey)\n y = point_ds.data[pykey][index];\n if (ev.type != 'mousemove')\n this._split_path(x, y);\n point_ds.selection_manager.clear();\n }\n }\n return [x, y];\n }\n _set_vertices(xs, ys, styles) {\n if (this.model.vertex_renderer == null)\n return;\n const point_glyph = this.model.vertex_renderer.glyph;\n const point_cds = this.model.vertex_renderer.data_source;\n const [pxkey, pykey] = [point_glyph.x.field, point_glyph.y.field];\n if (pxkey) {\n if ((0, types_1.isArray)(xs))\n point_cds.data[pxkey] = xs;\n else\n point_glyph.x = { value: xs };\n }\n if (pykey) {\n if ((0, types_1.isArray)(ys))\n point_cds.data[pykey] = ys;\n else\n point_glyph.y = { value: ys };\n }\n if (styles != null) {\n for (const key of (0, object_1.keys)(styles)) {\n point_cds.data[key] = styles[key];\n point_glyph[key] = { field: key };\n }\n }\n else {\n for (const col of point_cds.columns()) {\n point_cds.data[col] = [];\n }\n }\n this._emit_cds_changes(point_cds, true, true, false);\n }\n _show_vertices() {\n if (!this.model.active) {\n return;\n }\n const xs = [];\n const ys = [];\n const styles = {};\n for (const key of (0, object_1.keys)(this.model.end_style))\n styles[key] = [];\n for (let i = 0; i < this.model.renderers.length; i++) {\n const renderer = this.model.renderers[i];\n const cds = renderer.data_source;\n const glyph = renderer.glyph;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n for (const array of cds.get_array(xkey)) {\n Array.prototype.push.apply(xs, array);\n for (const key of (0, object_1.keys)(this.model.end_style))\n styles[key].push(this.model.end_style[key]);\n for (const key of (0, object_1.keys)(this.model.node_style)) {\n for (let index = 0; index < (array.length - 2); index++) {\n styles[key].push(this.model.node_style[key]);\n }\n }\n for (const key of (0, object_1.keys)(this.model.end_style))\n styles[key].push(this.model.end_style[key]);\n }\n for (const array of cds.get_array(ykey))\n Array.prototype.push.apply(ys, array);\n if (this._drawing && (i == (this.model.renderers.length - 1))) {\n // Skip currently drawn vertex\n xs.splice(xs.length - 1, 1);\n ys.splice(ys.length - 1, 1);\n for (const key of (0, object_1.keys)(styles))\n styles[key].splice(styles[key].length - 1, 1);\n }\n }\n this._set_vertices(xs, ys, styles);\n }\n _remove() {\n const renderer = this.model.renderers[0];\n const cds = renderer.data_source;\n const glyph = renderer.glyph;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n if (xkey) {\n const xidx = cds.data[xkey].length - 1;\n const xs = cds.get_array(xkey)[xidx];\n xs.splice(xs.length - 1, 1);\n if (xs.length == 1)\n cds.data[xkey].splice(xidx, 1);\n }\n if (ykey) {\n const yidx = cds.data[ykey].length - 1;\n const ys = cds.get_array(ykey)[yidx];\n ys.splice(ys.length - 1, 1);\n if (ys.length == 1)\n cds.data[ykey].splice(yidx, 1);\n }\n this._emit_cds_changes(cds);\n this._drawing = false;\n this._show_vertices();\n }\n }\n exports.PolyVertexDrawToolView = PolyVertexDrawToolView;\n PolyVertexDrawToolView.__name__ = \"PolyVertexDrawToolView\";\n class PolyVertexDrawTool extends poly_draw_tool_1.PolyDrawTool {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.PolyVertexDrawTool = PolyVertexDrawTool;\n _a = PolyVertexDrawTool;\n PolyVertexDrawTool.__name__ = \"PolyVertexDrawTool\";\n PolyVertexDrawTool.__module__ = \"geoviews.models.custom_tools\";\n (() => {\n _a.prototype.default_view = PolyVertexDrawToolView;\n _a.define(({ Any }) => ({\n end_style: [Any, {}],\n node_style: [Any, {}],\n }));\n })();\n}\n","min_source":"function _(e,t,s,r,o){var l;r();const i=e(\"@bokehjs/core/util/object\"),d=e(\"@bokehjs/core/util/types\"),a=e(\"@bokehjs/models/tools/edit/poly_draw_tool\");class n extends a.PolyDrawToolView{_split_path(e,t){for(let s=0;s<this.model.renderers.length;s++){const r=this.model.renderers[s],o=r.glyph,l=r.data_source,[i,a]=[o.xs.field,o.ys.field],n=l.data[i],_=l.data[a];for(let s=0;s<n.length;s++){let r=n[s];(0,d.isArray)(r)||(r=Array.from(r),l.data[i][s]=r);let o=_[s];(0,d.isArray)(o)||(o=Array.from(o),l.data[a][s]=o);for(let d=0;d<r.length;d++)if(r[d]==e&&o[d]==t&&0!=d&&d!=r.length-1){n.splice(s+1,0,r.slice(d)),_.splice(s+1,0,o.slice(d)),r.splice(d+1),o.splice(d+1);for(const e of l.columns())e!==i&&e!=a&&l.data[e].splice(s+1,0,l.data[e][s]);return}}}}_snap_to_vertex(e,t,s){if(this.model.vertex_renderer){const r=this._select_event(e,\"replace\",[this.model.vertex_renderer]),o=this.model.vertex_renderer.data_source,l=this.model.vertex_renderer.glyph,[i,d]=[l.x.field,l.y.field];if(r.length){const r=o.selected.indices[0];i&&(t=o.data[i][r]),d&&(s=o.data[d][r]),\"mousemove\"!=e.type&&this._split_path(t,s),o.selection_manager.clear()}}return[t,s]}_set_vertices(e,t,s){if(null==this.model.vertex_renderer)return;const r=this.model.vertex_renderer.glyph,o=this.model.vertex_renderer.data_source,[l,a]=[r.x.field,r.y.field];if(l&&((0,d.isArray)(e)?o.data[l]=e:r.x={value:e}),a&&((0,d.isArray)(t)?o.data[a]=t:r.y={value:t}),null!=s)for(const e of(0,i.keys)(s))o.data[e]=s[e],r[e]={field:e};else for(const e of o.columns())o.data[e]=[];this._emit_cds_changes(o,!0,!0,!1)}_show_vertices(){if(!this.model.active)return;const e=[],t=[],s={};for(const e of(0,i.keys)(this.model.end_style))s[e]=[];for(let r=0;r<this.model.renderers.length;r++){const o=this.model.renderers[r],l=o.data_source,d=o.glyph,[a,n]=[d.xs.field,d.ys.field];for(const t of l.get_array(a)){Array.prototype.push.apply(e,t);for(const e of(0,i.keys)(this.model.end_style))s[e].push(this.model.end_style[e]);for(const e of(0,i.keys)(this.model.node_style))for(let r=0;r<t.length-2;r++)s[e].push(this.model.node_style[e]);for(const e of(0,i.keys)(this.model.end_style))s[e].push(this.model.end_style[e])}for(const e of l.get_array(n))Array.prototype.push.apply(t,e);if(this._drawing&&r==this.model.renderers.length-1){e.splice(e.length-1,1),t.splice(t.length-1,1);for(const e of(0,i.keys)(s))s[e].splice(s[e].length-1,1)}}this._set_vertices(e,t,s)}_remove(){const e=this.model.renderers[0],t=e.data_source,s=e.glyph,[r,o]=[s.xs.field,s.ys.field];if(r){const e=t.data[r].length-1,s=t.get_array(r)[e];s.splice(s.length-1,1),1==s.length&&t.data[r].splice(e,1)}if(o){const e=t.data[o].length-1,s=t.get_array(o)[e];s.splice(s.length-1,1),1==s.length&&t.data[o].splice(e,1)}this._emit_cds_changes(t),this._drawing=!1,this._show_vertices()}}s.PolyVertexDrawToolView=n,n.__name__=\"PolyVertexDrawToolView\";class _ extends a.PolyDrawTool{constructor(e){super(e)}}s.PolyVertexDrawTool=_,l=_,_.__name__=\"PolyVertexDrawTool\",_.__module__=\"geoviews.models.custom_tools\",l.prototype.default_view=n,l.define((({Any:e})=>({end_style:[e,{}],node_style:[e,{}]})))}\n//# sourceMappingURL=poly_draw.min.js.map","min_map":"{\"version\":3,\"file\":\"poly_draw.min.js\",\"names\":[\"_\",\"require\",\"module\",\"exports\",\"__esModule\",\"__esExport\",\"_a\",\"object_1\",\"types_1\",\"poly_draw_tool_1\",\"PolyVertexDrawToolView\",\"PolyDrawToolView\",\"_split_path\",\"x\",\"y\",\"r\",\"this\",\"model\",\"renderers\",\"length\",\"renderer\",\"glyph\",\"cds\",\"data_source\",\"xkey\",\"ykey\",\"xs\",\"field\",\"ys\",\"xpaths\",\"data\",\"ypaths\",\"index\",\"isArray\",\"Array\",\"from\",\"i\",\"splice\",\"slice\",\"column\",\"columns\",\"_snap_to_vertex\",\"ev\",\"vertex_renderer\",\"vertex_selected\",\"_select_event\",\"point_ds\",\"point_glyph\",\"pxkey\",\"pykey\",\"selected\",\"indices\",\"type\",\"selection_manager\",\"clear\",\"_set_vertices\",\"styles\",\"point_cds\",\"value\",\"key\",\"keys\",\"col\",\"_emit_cds_changes\",\"_show_vertices\",\"active\",\"end_style\",\"array\",\"get_array\",\"prototype\",\"push\",\"apply\",\"node_style\",\"_drawing\",\"_remove\",\"xidx\",\"yidx\",\"__name__\",\"PolyVertexDrawTool\",\"PolyD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EAAG8D,UAAUe,aAAezE,EAC5BJ,EAAG8E,QAAO,EAAGC,UAAU,CACnBpB,UAAW,CAACoB,EAAK,CAAC,GAClBd,WAAY,CAACc,EAAK,CAAC,MAG/B\"}"}},{"module":{"file":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/poly_edit.js","base":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib","base_path":"models/poly_edit.js","canonical":"models/poly_edit","resolution":"ESM","id":"296f32feb2","hash":"296f32feb2158fc49faaaa7dda93ec3c6f2b538c8657ae69cef89cac92018b9b","source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PolyVertexEditTool = exports.PolyVertexEditToolView = void 0;\nvar _a;\nconst object_1 = require(\"@bokehjs/core/util/object\");\nconst types_1 = require(\"@bokehjs/core/util/types\");\nconst poly_edit_tool_1 = require(\"@bokehjs/models/tools/edit/poly_edit_tool\");\nclass PolyVertexEditToolView extends poly_edit_tool_1.PolyEditToolView {\n deactivate() {\n this._hide_vertices();\n if (!this._selected_renderer) {\n return;\n }\n else if (this._drawing) {\n this._remove_vertex();\n this._drawing = false;\n }\n this._emit_cds_changes(this._selected_renderer.data_source, false, true, false);\n }\n _pan(ev) {\n if (this._basepoint == null || this.model.vertex_renderer == null)\n return;\n const points = this._drag_points(ev, [this.model.vertex_renderer]);\n if (!ev.shift_key) {\n this._move_linked(points);\n }\n if (this._selected_renderer)\n this._selected_renderer.data_source.change.emit();\n }\n _pan_end(ev) {\n if (this._basepoint == null || this.model.vertex_renderer == null)\n return;\n const points = this._drag_points(ev, [this.model.vertex_renderer]);\n if (!ev.shift_key) {\n this._move_linked(points);\n }\n this._emit_cds_changes(this.model.vertex_renderer.data_source, false, true, true);\n if (this._selected_renderer) {\n this._emit_cds_changes(this._selected_renderer.data_source);\n }\n this._basepoint = null;\n }\n _drag_points(ev, renderers) {\n if (this._basepoint == null)\n return [];\n const [bx, by] = this._basepoint;\n const points = [];\n for (const renderer of renderers) {\n const basepoint = this._map_drag(bx, by, renderer);\n const point = this._map_drag(ev.sx, ev.sy, renderer);\n if (point == null || basepoint == null) {\n continue;\n }\n const [x, y] = point;\n const [px, py] = basepoint;\n const [dx, dy] = [x - px, y - py];\n // Type once dataspecs are typed\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const [xkey, ykey] = [glyph.x.field, glyph.y.field];\n for (const index of cds.selected.indices) {\n const point = [];\n if (xkey) {\n point.push(cds.data[xkey][index]);\n cds.data[xkey][index] += dx;\n }\n if (ykey) {\n point.push(cds.data[ykey][index]);\n cds.data[ykey][index] += dy;\n }\n point.push(dx);\n point.push(dy);\n points.push(point);\n }\n cds.change.emit();\n }\n this._basepoint = [ev.sx, ev.sy];\n return points;\n }\n _set_vertices(xs, ys, styles) {\n if (this.model.vertex_renderer == null)\n return;\n const point_glyph = this.model.vertex_renderer.glyph;\n const point_cds = this.model.vertex_renderer.data_source;\n const [pxkey, pykey] = [point_glyph.x.field, point_glyph.y.field];\n if (pxkey) {\n if ((0, types_1.isArray)(xs))\n point_cds.data[pxkey] = xs;\n else\n point_glyph.x = { value: xs };\n }\n if (pykey) {\n if ((0, types_1.isArray)(ys))\n point_cds.data[pykey] = ys;\n else\n point_glyph.y = { value: ys };\n }\n if (styles != null) {\n for (const key of (0, object_1.keys)(styles)) {\n point_cds.data[key] = styles[key];\n point_glyph[key] = { field: key };\n }\n }\n else {\n for (const col of point_cds.columns()) {\n point_cds.data[col] = [];\n }\n }\n this._emit_cds_changes(point_cds, true, true, false);\n }\n _move_linked(points) {\n if (!this._selected_renderer)\n return;\n const renderer = this._selected_renderer;\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n const xpaths = cds.data[xkey];\n const ypaths = cds.data[ykey];\n for (const point of points) {\n const [x, y, dx, dy] = point;\n for (let index = 0; index < xpaths.length; index++) {\n const xs = xpaths[index];\n const ys = ypaths[index];\n for (let i = 0; i < xs.length; i++) {\n if ((xs[i] == x) && (ys[i] == y)) {\n xs[i] += dx;\n ys[i] += dy;\n }\n }\n }\n }\n }\n _tap(ev) {\n if (this.model.vertex_renderer == null)\n return;\n const renderer = this.model.vertex_renderer;\n const point = this._map_drag(ev.sx, ev.sy, renderer);\n if (point == null)\n return;\n else if (this._drawing && this._selected_renderer) {\n let [x, y] = point;\n const cds = renderer.data_source;\n // Type once dataspecs are typed\n const glyph = renderer.glyph;\n const [xkey, ykey] = [glyph.x.field, glyph.y.field];\n const indices = cds.selected.indices;\n [x, y] = this._snap_to_vertex(ev, x, y);\n const index = indices[0];\n cds.selected.indices = [index + 1];\n if (xkey) {\n const xs = cds.get_array(xkey);\n const nx = xs[index];\n xs[index] = x;\n xs.splice(index + 1, 0, nx);\n }\n if (ykey) {\n const ys = cds.get_array(ykey);\n const ny = ys[index];\n ys[index] = y;\n ys.splice(index + 1, 0, ny);\n }\n cds.change.emit();\n this._emit_cds_changes(this._selected_renderer.data_source, true, false, true);\n return;\n }\n this._select_event(ev, this._select_mode(ev), [renderer]);\n }\n _show_vertices(ev) {\n if (!this.model.active)\n return;\n const renderers = this._select_event(ev, \"replace\", this.model.renderers);\n if (!renderers.length) {\n this._hide_vertices();\n this._selected_renderer = null;\n this._drawing = false;\n return;\n }\n const renderer = renderers[0];\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const index = cds.selected.indices[0];\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n let xs;\n let ys;\n if (xkey) {\n xs = cds.data[xkey][index];\n if (!(0, types_1.isArray)(xs))\n cds.data[xkey][index] = xs = Array.from(xs);\n }\n else {\n xs = glyph.xs.value;\n }\n if (ykey) {\n ys = cds.data[ykey][index];\n if (!(0, types_1.isArray)(ys))\n cds.data[ykey][index] = ys = Array.from(ys);\n }\n else {\n ys = glyph.ys.value;\n }\n const styles = {};\n for (const key of (0, object_1.keys)(this.model.end_style))\n styles[key] = [this.model.end_style[key]];\n for (const key of (0, object_1.keys)(this.model.node_style)) {\n for (let index = 0; index < (xs.length - 2); index++) {\n styles[key].push(this.model.node_style[key]);\n }\n }\n for (const key of (0, object_1.keys)(this.model.end_style))\n styles[key].push(this.model.end_style[key]);\n this._selected_renderer = renderer;\n this._set_vertices(xs, ys, styles);\n }\n}\nexports.PolyVertexEditToolView = PolyVertexEditToolView;\nPolyVertexEditToolView.__name__ = \"PolyVertexEditToolView\";\nclass PolyVertexEditTool extends poly_edit_tool_1.PolyEditTool {\n constructor(attrs) {\n super(attrs);\n }\n}\nexports.PolyVertexEditTool = PolyVertexEditTool;\n_a = PolyVertexEditTool;\nPolyVertexEditTool.__name__ = \"PolyVertexEditTool\";\nPolyVertexEditTool.__module__ = \"geoviews.models.custom_tools\";\n(() => {\n _a.prototype.default_view = PolyVertexEditToolView;\n _a.define(({ Any }) => ({\n end_style: [Any, {}],\n node_style: [Any, {}],\n }));\n})();\n//# sourceMappingURL=poly_edit.js.map\n","type":"js","dependency_paths":[],"dependency_map":[],"exported":[{"type":"named","name":"PolyVertexEditToolView"},{"type":"named","name":"PolyVertexEditTool"}],"externals":[],"shims":[]},"code":{"source":"/* models/poly_edit.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const object_1 = require(\"@bokehjs/core/util/object\");\n const types_1 = require(\"@bokehjs/core/util/types\");\n const poly_edit_tool_1 = require(\"@bokehjs/models/tools/edit/poly_edit_tool\");\n class PolyVertexEditToolView extends poly_edit_tool_1.PolyEditToolView {\n deactivate() {\n this._hide_vertices();\n if (!this._selected_renderer) {\n return;\n }\n else if (this._drawing) {\n this._remove_vertex();\n this._drawing = false;\n }\n this._emit_cds_changes(this._selected_renderer.data_source, false, true, false);\n }\n _pan(ev) {\n if (this._basepoint == null || this.model.vertex_renderer == null)\n return;\n const points = this._drag_points(ev, [this.model.vertex_renderer]);\n if (!ev.shift_key) {\n this._move_linked(points);\n }\n if (this._selected_renderer)\n this._selected_renderer.data_source.change.emit();\n }\n _pan_end(ev) {\n if (this._basepoint == null || this.model.vertex_renderer == null)\n return;\n const points = this._drag_points(ev, [this.model.vertex_renderer]);\n if (!ev.shift_key) {\n this._move_linked(points);\n }\n this._emit_cds_changes(this.model.vertex_renderer.data_source, false, true, true);\n if (this._selected_renderer) {\n this._emit_cds_changes(this._selected_renderer.data_source);\n }\n this._basepoint = null;\n }\n _drag_points(ev, renderers) {\n if (this._basepoint == null)\n return [];\n const [bx, by] = this._basepoint;\n const points = [];\n for (const renderer of renderers) {\n const basepoint = this._map_drag(bx, by, renderer);\n const point = this._map_drag(ev.sx, ev.sy, renderer);\n if (point == null || basepoint == null) {\n continue;\n }\n const [x, y] = point;\n const [px, py] = basepoint;\n const [dx, dy] = [x - px, y - py];\n // Type once dataspecs are typed\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const [xkey, ykey] = [glyph.x.field, glyph.y.field];\n for (const index of cds.selected.indices) {\n const point = [];\n if (xkey) {\n point.push(cds.data[xkey][index]);\n cds.data[xkey][index] += dx;\n }\n if (ykey) {\n point.push(cds.data[ykey][index]);\n cds.data[ykey][index] += dy;\n }\n point.push(dx);\n point.push(dy);\n points.push(point);\n }\n cds.change.emit();\n }\n this._basepoint = [ev.sx, ev.sy];\n return points;\n }\n _set_vertices(xs, ys, styles) {\n if (this.model.vertex_renderer == null)\n return;\n const point_glyph = this.model.vertex_renderer.glyph;\n const point_cds = this.model.vertex_renderer.data_source;\n const [pxkey, pykey] = [point_glyph.x.field, point_glyph.y.field];\n if (pxkey) {\n if ((0, types_1.isArray)(xs))\n point_cds.data[pxkey] = xs;\n else\n point_glyph.x = { value: xs };\n }\n if (pykey) {\n if ((0, types_1.isArray)(ys))\n point_cds.data[pykey] = ys;\n else\n point_glyph.y = { value: ys };\n }\n if (styles != null) {\n for (const key of (0, object_1.keys)(styles)) {\n point_cds.data[key] = styles[key];\n point_glyph[key] = { field: key };\n }\n }\n else {\n for (const col of point_cds.columns()) {\n point_cds.data[col] = [];\n }\n }\n this._emit_cds_changes(point_cds, true, true, false);\n }\n _move_linked(points) {\n if (!this._selected_renderer)\n return;\n const renderer = this._selected_renderer;\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n const xpaths = cds.data[xkey];\n const ypaths = cds.data[ykey];\n for (const point of points) {\n const [x, y, dx, dy] = point;\n for (let index = 0; index < xpaths.length; index++) {\n const xs = xpaths[index];\n const ys = ypaths[index];\n for (let i = 0; i < xs.length; i++) {\n if ((xs[i] == x) && (ys[i] == y)) {\n xs[i] += dx;\n ys[i] += dy;\n }\n }\n }\n }\n }\n _tap(ev) {\n if (this.model.vertex_renderer == null)\n return;\n const renderer = this.model.vertex_renderer;\n const point = this._map_drag(ev.sx, ev.sy, renderer);\n if (point == null)\n return;\n else if (this._drawing && this._selected_renderer) {\n let [x, y] = point;\n const cds = renderer.data_source;\n // Type once dataspecs are typed\n const glyph = renderer.glyph;\n const [xkey, ykey] = [glyph.x.field, glyph.y.field];\n const indices = cds.selected.indices;\n [x, y] = this._snap_to_vertex(ev, x, y);\n const index = indices[0];\n cds.selected.indices = [index + 1];\n if (xkey) {\n const xs = cds.get_array(xkey);\n const nx = xs[index];\n xs[index] = x;\n xs.splice(index + 1, 0, nx);\n }\n if (ykey) {\n const ys = cds.get_array(ykey);\n const ny = ys[index];\n ys[index] = y;\n ys.splice(index + 1, 0, ny);\n }\n cds.change.emit();\n this._emit_cds_changes(this._selected_renderer.data_source, true, false, true);\n return;\n }\n this._select_event(ev, this._select_mode(ev), [renderer]);\n }\n _show_vertices(ev) {\n if (!this.model.active)\n return;\n const renderers = this._select_event(ev, \"replace\", this.model.renderers);\n if (!renderers.length) {\n this._hide_vertices();\n this._selected_renderer = null;\n this._drawing = false;\n return;\n }\n const renderer = renderers[0];\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const index = cds.selected.indices[0];\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n let xs;\n let ys;\n if (xkey) {\n xs = cds.data[xkey][index];\n if (!(0, types_1.isArray)(xs))\n cds.data[xkey][index] = xs = Array.from(xs);\n }\n else {\n xs = glyph.xs.value;\n }\n if (ykey) {\n ys = cds.data[ykey][index];\n if (!(0, types_1.isArray)(ys))\n cds.data[ykey][index] = ys = Array.from(ys);\n }\n else {\n ys = glyph.ys.value;\n }\n const styles = {};\n for (const key of (0, object_1.keys)(this.model.end_style))\n styles[key] = [this.model.end_style[key]];\n for (const key of (0, object_1.keys)(this.model.node_style)) {\n for (let index = 0; index < (xs.length - 2); index++) {\n styles[key].push(this.model.node_style[key]);\n }\n }\n for (const key of (0, object_1.keys)(this.model.end_style))\n styles[key].push(this.model.end_style[key]);\n this._selected_renderer = renderer;\n this._set_vertices(xs, ys, styles);\n }\n }\n exports.PolyVertexEditToolView = PolyVertexEditToolView;\n PolyVertexEditToolView.__name__ = \"PolyVertexEditToolView\";\n class PolyVertexEditTool extends poly_edit_tool_1.PolyEditTool {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.PolyVertexEditTool = PolyVertexEditTool;\n _a = PolyVertexEditTool;\n PolyVertexEditTool.__name__ = \"PolyVertexEditTool\";\n PolyVertexEditTool.__module__ = \"geoviews.models.custom_tools\";\n (() => {\n _a.prototype.default_view = PolyVertexEditToolView;\n _a.define(({ Any }) => ({\n end_style: [Any, {}],\n node_style: [Any, {}],\n }));\n })();\n}\n","min_source":"function _(e,t,s,r,i){var d;r();const _=e(\"@bokehjs/core/util/object\"),o=e(\"@bokehjs/core/util/types\"),l=e(\"@bokehjs/models/tools/edit/poly_edit_tool\");class n extends l.PolyEditToolView{deactivate(){this._hide_vertices(),this._selected_renderer&&(this._drawing&&(this._remove_vertex(),this._drawing=!1),this._emit_cds_changes(this._selected_renderer.data_source,!1,!0,!1))}_pan(e){if(null==this._basepoint||null==this.model.vertex_renderer)return;const t=this._drag_points(e,[this.model.vertex_renderer]);e.shift_key||this._move_linked(t),this._selected_renderer&&this._selected_renderer.data_source.change.emit()}_pan_end(e){if(null==this._basepoint||null==this.model.vertex_renderer)return;const t=this._drag_points(e,[this.model.vertex_renderer]);e.shift_key||this._move_linked(t),this._emit_cds_changes(this.model.vertex_renderer.data_source,!1,!0,!0),this._selected_renderer&&this._emit_cds_changes(this._selected_renderer.data_source),this._basepoint=null}_drag_points(e,t){if(null==this._basepoint)return[];const[s,r]=this._basepoint,i=[];for(const d of t){const t=this._map_drag(s,r,d),_=this._map_drag(e.sx,e.sy,d);if(null==_||null==t)continue;const[o,l]=_,[n,a]=t,[c,h]=[o-n,l-a],u=d.glyph,f=d.data_source,[y,m]=[u.x.field,u.y.field];for(const e of f.selected.indices){const t=[];y&&(t.push(f.data[y][e]),f.data[y][e]+=c),m&&(t.push(f.data[m][e]),f.data[m][e]+=h),t.push(c),t.push(h),i.push(t)}f.change.emit()}return this._basepoint=[e.sx,e.sy],i}_set_vertices(e,t,s){if(null==this.model.vertex_renderer)return;const r=this.model.vertex_renderer.glyph,i=this.model.vertex_renderer.data_source,[d,l]=[r.x.field,r.y.field];if(d&&((0,o.isArray)(e)?i.data[d]=e:r.x={value:e}),l&&((0,o.isArray)(t)?i.data[l]=t:r.y={value:t}),null!=s)for(const e of(0,_.keys)(s))i.data[e]=s[e],r[e]={field:e};else for(const e of i.columns())i.data[e]=[];this._emit_cds_changes(i,!0,!0,!1)}_move_linked(e){if(!this._selected_renderer)return;const t=this._selected_renderer,s=t.glyph,r=t.data_source,[i,d]=[s.xs.field,s.ys.field],_=r.data[i],o=r.data[d];for(const t of e){const[e,s,r,i]=t;for(let t=0;t<_.length;t++){const d=_[t],l=o[t];for(let t=0;t<d.length;t++)d[t]==e&&l[t]==s&&(d[t]+=r,l[t]+=i)}}}_tap(e){if(null==this.model.vertex_renderer)return;const t=this.model.vertex_renderer,s=this._map_drag(e.sx,e.sy,t);if(null!=s){if(this._drawing&&this._selected_renderer){let[r,i]=s;const d=t.data_source,_=t.glyph,[o,l]=[_.x.field,_.y.field],n=d.selected.indices;[r,i]=this._snap_to_vertex(e,r,i);const a=n[0];if(d.selected.indices=[a+1],o){const e=d.get_array(o),t=e[a];e[a]=r,e.splice(a+1,0,t)}if(l){const e=d.get_array(l),t=e[a];e[a]=i,e.splice(a+1,0,t)}return d.change.emit(),void this._emit_cds_changes(this._selected_renderer.data_source,!0,!1,!0)}this._select_event(e,this._select_mode(e),[t])}}_show_vertices(e){if(!this.model.active)return;const t=this._select_event(e,\"replace\",this.model.renderers);if(!t.length)return this._hide_vertices(),this._selected_renderer=null,void(this._drawing=!1);const s=t[0],r=s.glyph,i=s.data_source,d=i.selected.indices[0],[l,n]=[r.xs.field,r.ys.field];let a,c;l?(a=i.data[l][d],(0,o.isArray)(a)||(i.data[l][d]=a=Array.from(a))):a=r.xs.value,n?(c=i.data[n][d],(0,o.isArray)(c)||(i.data[n][d]=c=Array.from(c))):c=r.ys.value;const h={};for(const e of(0,_.keys)(this.model.end_style))h[e]=[this.model.end_style[e]];for(const e of(0,_.keys)(this.model.node_style))for(let t=0;t<a.length-2;t++)h[e].push(this.model.node_style[e]);for(const e of(0,_.keys)(this.model.end_style))h[e].push(this.model.end_style[e]);this._selected_renderer=s,this._set_vertices(a,c,h)}}s.PolyVertexEditToolView=n,n.__name__=\"PolyVertexEditToolView\";class a extends l.PolyEditTool{constructor(e){super(e)}}s.PolyVertexEditTool=a,d=a,a.__name__=\"PolyVertexEditTool\",a.__module__=\"geoviews.models.custom_tools\",d.prototype.default_view=n,d.define((({Any:e})=>({end_style:[e,{}],node_style:[e,{}]})))}\n//# sourceMappingURL=poly_edit.min.js.map","min_map":"{\"version\":3,\"file\":\"poly_edit.min.js\",\"names\":[\"_\",\"require\",\"module\",\"exports\",\"__esModule\",\"__esExport\",\"_a\",\"object_1\",\"types_1\",\"poly_edit_tool_1\",\"PolyVertexEditToolView\",\"PolyEditToolView\",\"deactivate\",\"this\",\"_hide_vertices\",\"_selected_renderer\",\"_drawing\",\"_remove_vertex\",\"_emit_cds_changes\",\"data_source\",\"_pan\",\"ev\",\"_basepoint\",\"model\",\"vertex_renderer\",\"points\",\"_drag_points\",\"shift_key\",\"_move_linked\",\"change\",\"emit\",\"_pan_end\",\"renderers\",\"bx\",\"by\",\"renderer\",\"basepoint\",\"_map_drag\",\"point\",\"sx\",\"sy\",\"x\",\"y\",\"px\",\"py\",\"dx\",\"dy\",\"glyph\",\"cds\",\"xkey\",\"ykey\",\"field\",\"index\",\"selected\",\"indices\",\"push\",\"data\",\"_set_vertices\",\"xs\",\"ys\",\"styles\",\"point_glyph\",\"point_cds\",\"pxkey\",\"pykey\",\"isArray\",\"value\",\"key\",\"keys\",\"col\",\"columns\",\"xpaths\",\"ypaths\",\"length\",\"i\",\"_tap\",\"_snap_to_vertex\",\"get_array\",\"nx\",\"splice\",\"ny\",\"_select_event\",\"_select_mode\",\"_show_vertices\",\"active\",\"Array\",\"from\",\"end_style\",\"node_style\",\"__name__\",\"PolyVertexEditTool\",\"PolyEditTool\",\"constructor\",\"attrs\",\"super\",\"__module__\",\"prototype\",\"default_view\",\"define\",\"Any\"],\"sources\":[\"0\"],\"mappings\":\"AAA0B,SAASA,EAAEC,EAASC,EAAQC,EAASC,EAAYC,GAEvE,IAAIC,EADJF,IAEA,MAAMG,EAAWN,EAAQ,6BACnBO,EAAUP,EAAQ,4BAClBQ,EAAmBR,EAAQ,6CACjC,MAAMS,UAA+BD,EAAiBE,iBAClDC,aACIC,KAAKC,iBACAD,KAAKE,qBAGDF,KAAKG,WACVH,KAAKI,iBACLJ,KAAKG,UAAW,GAEpBH,KAAKK,kBAAkBL,KAAKE,mBAAmBI,aAAa,GAAO,GAAM,GAC7E,CACAC,KAAKC,GACD,GAAuB,MAAnBR,KAAKS,YAAoD,MAA9BT,KAAKU,MAAMC,gBACtC,OACJ,MAAMC,EAASZ,KAAKa,aAAaL,EAAI,CAACR,KAAKU,MAAMC,kBAC5CH,EAAGM,WACJd,KAAKe,aAAaH,GAElBZ,KAAKE,oBACLF,KAAKE,mBAAmBI,YAAYU,OAAOC,MACnD,CACAC,SAASV,GACL,GAAuB,MAAnBR,KAAKS,YAAoD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SAAW,qBAC9BC,EAAmBK,WAAa,+BAE5BzF,EAAG0F,UAAUC,aAAevF,EAC5BJ,EAAG4F,QAAO,EAAGC,UAAU,CACnBZ,UAAW,CAACY,EAAK,CAAC,GAClBX,WAAY,CAACW,EAAK,CAAC,MAG/B\"}"}},{"module":{"file":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/restore_tool.js","base":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib","base_path":"models/restore_tool.js","canonical":"models/restore_tool","resolution":"ESM","id":"92294e6ad2","hash":"92294e6ad263c9b651dd5e4b6d8d4576efb38ba565e84a9bf3f5d87d647e89cc","source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RestoreTool = exports.RestoreToolView = void 0;\nvar _a;\nconst action_tool_1 = require(\"@bokehjs/models/tools/actions/action_tool\");\nconst column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\nconst icons_css_1 = require(\"@bokehjs/styles/icons.css\");\nclass RestoreToolView extends action_tool_1.ActionToolView {\n doit() {\n const sources = this.model.sources;\n for (const source of sources) {\n if (!source.buffer || (source.buffer.length == 0)) {\n continue;\n }\n source.data = source.buffer.pop();\n source.change.emit();\n source.properties.data.change.emit();\n }\n }\n}\nexports.RestoreToolView = RestoreToolView;\nRestoreToolView.__name__ = \"RestoreToolView\";\nclass RestoreTool extends action_tool_1.ActionTool {\n constructor(attrs) {\n super(attrs);\n this.tool_name = \"Restore\";\n this.tool_icon = icons_css_1.tool_icon_undo;\n }\n}\nexports.RestoreTool = RestoreTool;\n_a = RestoreTool;\nRestoreTool.__name__ = \"RestoreTool\";\nRestoreTool.__module__ = \"geoviews.models.custom_tools\";\n(() => {\n _a.prototype.default_view = RestoreToolView;\n _a.define(({ Array, Ref }) => ({\n sources: [Array(Ref(column_data_source_1.ColumnDataSource)), []],\n }));\n})();\n//# sourceMappingURL=restore_tool.js.map\n","type":"js","dependency_paths":[],"dependency_map":[],"exported":[{"type":"named","name":"RestoreToolView"},{"type":"named","name":"RestoreTool"}],"externals":[],"shims":[]},"code":{"source":"/* models/restore_tool.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const action_tool_1 = require(\"@bokehjs/models/tools/actions/action_tool\");\n const column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\n const icons_css_1 = require(\"@bokehjs/styles/icons.css\");\n class RestoreToolView extends action_tool_1.ActionToolView {\n doit() {\n const sources = this.model.sources;\n for (const source of sources) {\n if (!source.buffer || (source.buffer.length == 0)) {\n continue;\n }\n source.data = source.buffer.pop();\n source.change.emit();\n source.properties.data.change.emit();\n }\n }\n }\n exports.RestoreToolView = RestoreToolView;\n RestoreToolView.__name__ = \"RestoreToolView\";\n class RestoreTool extends action_tool_1.ActionTool {\n constructor(attrs) {\n super(attrs);\n this.tool_name = \"Restore\";\n this.tool_icon = icons_css_1.tool_icon_undo;\n }\n }\n exports.RestoreTool = RestoreTool;\n _a = RestoreTool;\n RestoreTool.__name__ = \"RestoreTool\";\n RestoreTool.__module__ = \"geoviews.models.custom_tools\";\n (() => {\n _a.prototype.default_view = RestoreToolView;\n _a.define(({ Array, Ref }) => ({\n sources: [Array(Ref(column_data_source_1.ColumnDataSource)), []],\n }));\n })();\n}\n","min_source":"function _(o,e,s,t,c){var n;t();const l=o(\"@bokehjs/models/tools/actions/action_tool\"),r=o(\"@bokehjs/models/sources/column_data_source\"),_=o(\"@bokehjs/styles/icons.css\");class i extends l.ActionToolView{doit(){const o=this.model.sources;for(const e of o)e.buffer&&0!=e.buffer.length&&(e.data=e.buffer.pop(),e.change.emit(),e.properties.data.change.emit())}}s.RestoreToolView=i,i.__name__=\"RestoreToolView\";class a extends l.ActionTool{constructor(o){super(o),this.tool_name=\"Restore\",this.tool_icon=_.tool_icon_undo}}s.RestoreTool=a,n=a,a.__name__=\"RestoreTool\",a.__module__=\"geoviews.models.custom_tools\",n.prototype.default_view=i,n.define((({Array:o,Ref:e})=>({sources:[o(e(r.ColumnDataSource)),[]]})))}\n//# sourceMappingURL=restore_tool.min.js.map","min_map":"{\"version\":3,\"file\":\"restore_tool.min.js\",\"names\":[\"_\",\"require\",\"module\",\"exports\",\"__esModule\",\"__esExport\",\"_a\",\"action_tool_1\",\"column_data_source_1\",\"icons_css_1\",\"RestoreToolView\",\"ActionToolView\",\"doit\",\"sources\",\"this\",\"model\",\"source\",\"buffer\",\"length\",\"data\",\"pop\",\"change\",\"emit\",\"properties\",\"__name__\",\"RestoreTool\",\"ActionTool\",\"constructor\",\"attrs\",\"super\",\"tool_name\",\"tool_icon\",\"tool_icon_undo\",\"__module__\",\"prototype\",\"default_view\",\"define\",\"Array\",\"Ref\",\"ColumnDataSource\"],\"sources\":[\"0\"],\"mappings\":\"AAA6B,SAASA,EAAEC,EAASC,EAAQC,EAASC,EAAYC,GAE1E,IAAIC,EADJF,IAEA,MAAMG,EAAgBN,EAAQ,6CACxBO,EAAuBP,EAAQ,8CAC/BQ,EAAcR,EAAQ,6BAC5B,MAAMS,UAAwBH,EAAcI,eACxCC,OACI,MAAMC,EAAUC,KAAKC,MAAMF,QAC3B,IAAK,MAAMG,KAAUH,EACZG,EAAOC,QAAmC,GAAxBD,EAAOC,OAAOC,SAGrCF,EAAOG,KAAOH,EAAOC,OAAOG,MAC5BJ,EAAOK,OAAOC,OACdN,EAAOO,WAAWJ,KAAKE,OAAOC,OAEtC,EAEJnB,EAAQO,gBAAkBA,EAC1BA,EAAgBc,SAAW,kBAC3B,MAAMC,UAAoBlB,EAAcmB,WACpCC,YAAYC,GACRC,MAAMD,GACNd,KAAKgB,UAAY,UACjBhB,KAAKiB,UAAYtB,EAAYuB,cACjC,EAEJ7B,EAAQsB,YAAcA,EACtBnB,EAAKmB,EACLA,EAAYD,SAAW,cACvBC,EAAYQ,WAAa,+BAErB3B,EAAG4B,UAAUC,aAAezB,EAC5BJ,EAAG8B,QAAO,EAAGC,QAAOC,UAAU,CAC1BzB,QAAS,CAACwB,EAAMC,EAAI9B,EAAqB+B,mBAAoB,OAGzE\"}"}}]}
1
+ {"version":4,"artifacts":[{"module":{"file":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib/index.js","base":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib","base_path":"index.js","canonical":"index","resolution":"ESM","id":"c764d38756","hash":"c764d387562670624c9da140449548667d1588e6dd8d12da2fe04c18f1fadf6b","source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.GeoViews = void 0;\nconst tslib_1 = require(\"tslib\");\nconst GeoViews = tslib_1.__importStar(require(\"./models\"));\nexports.GeoViews = GeoViews;\nconst base_1 = require(\"@bokehjs/base\");\n(0, base_1.register_models)(GeoViews);\n//# sourceMappingURL=index.js.map\n","type":"js","dependency_paths":[["./models","/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/index.js"]],"dependency_map":[],"exported":[],"externals":[],"shims":[]},"code":{"source":"/* index.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n const GeoViews = tslib_1.__importStar(require(\"b4555bea44\") /* ./models */);\n exports.GeoViews = GeoViews;\n const base_1 = require(\"@bokehjs/base\");\n (0, base_1.register_models)(GeoViews);\n}\n","min_source":"function _(e,s,o,t,b){t();const i=e(\"tslib\").__importStar(e(\"b4555bea44\"));o.GeoViews=i;(0,e(\"@bokehjs/base\").register_models)(i)}\n//# sourceMappingURL=index.min.js.map","min_map":"{\"version\":3,\"file\":\"index.min.js\",\"names\":[\"_\",\"require\",\"module\",\"exports\",\"__esModule\",\"__esExport\",\"GeoViews\",\"__importStar\",\"register_models\"],\"sources\":[\"0\"],\"mappings\":\"AAAe,SAASA,EAAEC,EAASC,EAAQC,EAASC,EAAYC,GAC5DD,IACA,MACME,EADUL,EAAQ,SACCM,aAAaN,EAAQ,eAC9CE,EAAQG,SAAWA,GAEnB,EADeL,EAAQ,iBACZO,iBAAiBF,EAChC\"}"}},{"module":{"file":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/index.js","base":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib","base_path":"models/index.js","canonical":"models/index","resolution":"ESM","id":"b4555bea44","hash":"b4555bea4497cc5bbb2ea67ae1cbd42552a9de3a7d8633abf56c3a7ca693300d","source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RestoreTool = exports.PolyVertexEditTool = exports.PolyVertexDrawTool = exports.ClearTool = exports.CheckpointTool = void 0;\nvar checkpoint_tool_1 = require(\"./checkpoint_tool\");\nObject.defineProperty(exports, \"CheckpointTool\", { enumerable: true, get: function () { return checkpoint_tool_1.CheckpointTool; } });\nvar clear_tool_1 = require(\"./clear_tool\");\nObject.defineProperty(exports, \"ClearTool\", { enumerable: true, get: function () { return clear_tool_1.ClearTool; } });\nvar poly_draw_1 = require(\"./poly_draw\");\nObject.defineProperty(exports, \"PolyVertexDrawTool\", { enumerable: true, get: function () { return poly_draw_1.PolyVertexDrawTool; } });\nvar poly_edit_1 = require(\"./poly_edit\");\nObject.defineProperty(exports, \"PolyVertexEditTool\", { enumerable: true, get: function () { return poly_edit_1.PolyVertexEditTool; } });\nvar restore_tool_1 = require(\"./restore_tool\");\nObject.defineProperty(exports, \"RestoreTool\", { enumerable: true, get: function () { return restore_tool_1.RestoreTool; } });\n//# sourceMappingURL=index.js.map\n","type":"js","dependency_paths":[["./checkpoint_tool","/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/checkpoint_tool.js"],["./clear_tool","/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/clear_tool.js"],["./poly_draw","/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/poly_draw.js"],["./poly_edit","/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/poly_edit.js"],["./restore_tool","/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/restore_tool.js"]],"dependency_map":[],"exported":[{"type":"bindings","bindings":[[null,"CheckpointTool"]],"module":"./checkpoint_tool"},{"type":"bindings","bindings":[[null,"ClearTool"]],"module":"./clear_tool"},{"type":"bindings","bindings":[[null,"PolyVertexDrawTool"]],"module":"./poly_draw"},{"type":"bindings","bindings":[[null,"PolyVertexEditTool"]],"module":"./poly_edit"},{"type":"bindings","bindings":[[null,"RestoreTool"]],"module":"./restore_tool"}],"externals":[],"shims":[]},"code":{"source":"/* models/index.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var checkpoint_tool_1 = require(\"1d7c6c8516\") /* ./checkpoint_tool */;\n __esExport(\"CheckpointTool\", checkpoint_tool_1.CheckpointTool);\n var clear_tool_1 = require(\"1c15765006\") /* ./clear_tool */;\n __esExport(\"ClearTool\", clear_tool_1.ClearTool);\n var poly_draw_1 = require(\"cddc7627cc\") /* ./poly_draw */;\n __esExport(\"PolyVertexDrawTool\", poly_draw_1.PolyVertexDrawTool);\n var poly_edit_1 = require(\"8837add128\") /* ./poly_edit */;\n __esExport(\"PolyVertexEditTool\", poly_edit_1.PolyVertexEditTool);\n var restore_tool_1 = require(\"92294e6ad2\") /* ./restore_tool */;\n __esExport(\"RestoreTool\", restore_tool_1.RestoreTool);\n}\n","min_source":"function _(o,e,l,t,c){t(),c(\"CheckpointTool\",o(\"1d7c6c8516\").CheckpointTool),c(\"ClearTool\",o(\"1c15765006\").ClearTool),c(\"PolyVertexDrawTool\",o(\"cddc7627cc\").PolyVertexDrawTool),c(\"PolyVertexEditTool\",o(\"8837add128\").PolyVertexEditTool),c(\"RestoreTool\",o(\"92294e6ad2\").RestoreTool)}\n//# sourceMappingURL=index.min.js.map","min_map":"{\"version\":3,\"file\":\"index.min.js\",\"names\":[\"_\",\"require\",\"module\",\"exports\",\"__esModule\",\"__esExport\",\"CheckpointTool\",\"ClearTool\",\"PolyVertexDrawTool\",\"PolyVertexEditTool\",\"RestoreTool\"],\"sources\":[\"0\"],\"mappings\":\"AAAsB,SAASA,EAAEC,EAASC,EAAQC,EAASC,EAAYC,GACnED,IAEAC,EAAW,iBADaJ,EAAQ,cACeK,gBAE/CD,EAAW,YADQJ,EAAQ,cACUM,WAErCF,EAAW,qBADOJ,EAAQ,cACmBO,oBAE7CH,EAAW,qBADOJ,EAAQ,cACmBQ,oBAE7CJ,EAAW,cADUJ,EAAQ,cACYS,YAC7C\"}"}},{"module":{"file":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/checkpoint_tool.js","base":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib","base_path":"models/checkpoint_tool.js","canonical":"models/checkpoint_tool","resolution":"ESM","id":"1d7c6c8516","hash":"1d7c6c8516c8cfba888a69803c918bbacfd80008dc3044c6b69dca8c77c5a048","source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CheckpointTool = exports.CheckpointToolView = void 0;\nvar _a;\nconst array_1 = require(\"@bokehjs/core/util/array\");\nconst action_tool_1 = require(\"@bokehjs/models/tools/actions/action_tool\");\nconst column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\nconst icons_css_1 = require(\"@bokehjs/styles/icons.css\");\nclass CheckpointToolView extends action_tool_1.ActionToolView {\n doit() {\n const sources = this.model.sources;\n for (const source of sources) {\n if (!source.buffer) {\n source.buffer = [];\n }\n let data_copy = {};\n for (const key in source.data) {\n const column = source.data[key];\n const new_column = [];\n for (const arr of column) {\n if (Array.isArray(arr) || (ArrayBuffer.isView(arr))) {\n new_column.push((0, array_1.copy)(arr));\n }\n else {\n new_column.push(arr);\n }\n }\n data_copy[key] = new_column;\n }\n source.buffer.push(data_copy);\n }\n }\n}\nexports.CheckpointToolView = CheckpointToolView;\nCheckpointToolView.__name__ = \"CheckpointToolView\";\nclass CheckpointTool extends action_tool_1.ActionTool {\n constructor(attrs) {\n super(attrs);\n this.tool_name = \"Checkpoint\";\n this.tool_icon = icons_css_1.tool_icon_save;\n }\n}\nexports.CheckpointTool = CheckpointTool;\n_a = CheckpointTool;\nCheckpointTool.__name__ = \"CheckpointTool\";\nCheckpointTool.__module__ = \"geoviews.models.custom_tools\";\n(() => {\n _a.prototype.default_view = CheckpointToolView;\n _a.define(({ Array, Ref }) => ({\n sources: [Array(Ref(column_data_source_1.ColumnDataSource)), []],\n }));\n})();\n//# sourceMappingURL=checkpoint_tool.js.map\n","type":"js","dependency_paths":[],"dependency_map":[],"exported":[{"type":"named","name":"CheckpointToolView"},{"type":"named","name":"CheckpointTool"}],"externals":[],"shims":[]},"code":{"source":"/* models/checkpoint_tool.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const array_1 = require(\"@bokehjs/core/util/array\");\n const action_tool_1 = require(\"@bokehjs/models/tools/actions/action_tool\");\n const column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\n const icons_css_1 = require(\"@bokehjs/styles/icons.css\");\n class CheckpointToolView extends action_tool_1.ActionToolView {\n doit() {\n const sources = this.model.sources;\n for (const source of sources) {\n if (!source.buffer) {\n source.buffer = [];\n }\n let data_copy = {};\n for (const key in source.data) {\n const column = source.data[key];\n const new_column = [];\n for (const arr of column) {\n if (Array.isArray(arr) || (ArrayBuffer.isView(arr))) {\n new_column.push((0, array_1.copy)(arr));\n }\n else {\n new_column.push(arr);\n }\n }\n data_copy[key] = new_column;\n }\n source.buffer.push(data_copy);\n }\n }\n }\n exports.CheckpointToolView = CheckpointToolView;\n CheckpointToolView.__name__ = \"CheckpointToolView\";\n class CheckpointTool extends action_tool_1.ActionTool {\n constructor(attrs) {\n super(attrs);\n this.tool_name = \"Checkpoint\";\n this.tool_icon = icons_css_1.tool_icon_save;\n }\n }\n exports.CheckpointTool = CheckpointTool;\n _a = CheckpointTool;\n CheckpointTool.__name__ = \"CheckpointTool\";\n CheckpointTool.__module__ = \"geoviews.models.custom_tools\";\n (() => {\n _a.prototype.default_view = CheckpointToolView;\n _a.define(({ Array, Ref }) => ({\n sources: [Array(Ref(column_data_source_1.ColumnDataSource)), []],\n }));\n })();\n}\n","min_source":"function _(o,e,s,t,c){var n;t();const i=o(\"@bokehjs/core/util/array\"),r=o(\"@bokehjs/models/tools/actions/action_tool\"),l=o(\"@bokehjs/models/sources/column_data_source\"),a=o(\"@bokehjs/styles/icons.css\");class _ extends r.ActionToolView{doit(){const o=this.model.sources;for(const e of o){e.buffer||(e.buffer=[]);let o={};for(const s in e.data){const t=e.data[s],c=[];for(const o of t)Array.isArray(o)||ArrayBuffer.isView(o)?c.push((0,i.copy)(o)):c.push(o);o[s]=c}e.buffer.push(o)}}}s.CheckpointToolView=_,_.__name__=\"CheckpointToolView\";class u extends r.ActionTool{constructor(o){super(o),this.tool_name=\"Checkpoint\",this.tool_icon=a.tool_icon_save}}s.CheckpointTool=u,n=u,u.__name__=\"CheckpointTool\",u.__module__=\"geoviews.models.custom_tools\",n.prototype.default_view=_,n.define((({Array:o,Ref:e})=>({sources:[o(e(l.ColumnDataSource)),[]]})))}\n//# sourceMappingURL=checkpoint_tool.min.js.map","min_map":"{\"version\":3,\"file\":\"checkpoint_tool.min.js\",\"names\":[\"_\",\"require\",\"module\",\"exports\",\"__esModule\",\"__esExport\",\"_a\",\"array_1\",\"action_tool_1\",\"column_data_source_1\",\"icons_css_1\",\"CheckpointToolView\",\"ActionToolView\",\"doit\",\"sources\",\"this\",\"model\",\"source\",\"buffer\",\"data_copy\",\"key\",\"data\",\"column\",\"new_column\",\"arr\",\"Array\",\"isArray\",\"ArrayBuffer\",\"isView\",\"push\",\"copy\",\"__name__\",\"CheckpointTool\",\"ActionTool\",\"constructor\",\"attrs\",\"super\",\"tool_name\",\"tool_icon\",\"tool_icon_save\",\"__module__\",\"prototype\",\"default_view\",\"define\",\"Ref\",\"ColumnDataSource\"],\"sources\":[\"0\"],\"mappings\":\"AAAgC,SAASA,EAAEC,EAASC,EAAQC,EAASC,EAAYC,GAE7E,IAAIC,EADJF,IAEA,MAAMG,EAAUN,EAAQ,4BAClBO,EAAgBP,EAAQ,6CACxBQ,EAAuBR,EAAQ,8CAC/BS,EAAcT,EAAQ,6BAC5B,MAAMU,UAA2BH,EAAcI,eAC3CC,OACI,MAAMC,EAAUC,KAAKC,MAAMF,QAC3B,IAAK,MAAMG,KAAUH,EAAS,CACrBG,EAAOC,SACRD,EAAOC,OAAS,IAEpB,IAAIC,EAAY,CAAC,EACjB,IAAK,MAAMC,KAAOH,EAAOI,KAAM,CAC3B,MAAMC,EAASL,EAAOI,KAAKD,GACrBG,EAAa,GACnB,IAAK,MAAMC,KAAOF,EACVG,MAAMC,QAAQF,IAASG,YAAYC,OAAOJ,GAC1CD,EAAWM,MAAK,EAAItB,EAAQuB,MAAMN,IAGlCD,EAAWM,KAAKL,GAGxBL,EAAUC,GAAOG,CACrB,CACAN,EAAOC,OAAOW,KAAKV,EACvB,CACJ,EAEJhB,EAAQQ,mBAAqBA,EAC7BA,EAAmBoB,SAAW,qBAC9B,MAAMC,UAAuBxB,EAAcyB,WACvCC,YAAYC,GACRC,MAAMD,GACNpB,KAAKsB,UAAY,aACjBtB,KAAKuB,UAAY5B,EAAY6B,cACjC,EAEJpC,EAAQ6B,eAAiBA,EACzB1B,EAAK0B,EACLA,EAAeD,SAAW,iBAC1BC,EAAeQ,WAAa,+BAExBlC,EAAGmC,UAAUC,aAAe/B,EAC5BL,EAAGqC,QAAO,EAAGlB,QAAOmB,UAAU,CAC1B9B,QAAS,CAACW,EAAMmB,EAAInC,EAAqBoC,mBAAoB,OAGzE\"}"}},{"module":{"file":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/clear_tool.js","base":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib","base_path":"models/clear_tool.js","canonical":"models/clear_tool","resolution":"ESM","id":"1c15765006","hash":"1c15765006e6c171d23c6cc5f80f4c60a735fc05b57b55a3c9eac79f684df738","source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ClearTool = exports.ClearToolView = void 0;\nvar _a;\nconst action_tool_1 = require(\"@bokehjs/models/tools/actions/action_tool\");\nconst column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\nconst icons_css_1 = require(\"@bokehjs/styles/icons.css\");\nclass ClearToolView extends action_tool_1.ActionToolView {\n doit() {\n for (var source of this.model.sources) {\n for (const column in source.data) {\n source.data[column] = [];\n }\n source.change.emit();\n source.properties.data.change.emit();\n }\n }\n}\nexports.ClearToolView = ClearToolView;\nClearToolView.__name__ = \"ClearToolView\";\nclass ClearTool extends action_tool_1.ActionTool {\n constructor(attrs) {\n super(attrs);\n this.tool_name = \"Clear data\";\n this.tool_icon = icons_css_1.tool_icon_reset;\n }\n}\nexports.ClearTool = ClearTool;\n_a = ClearTool;\nClearTool.__name__ = \"ClearTool\";\nClearTool.__module__ = \"geoviews.models.custom_tools\";\n(() => {\n _a.prototype.default_view = ClearToolView;\n _a.define(({ Array, Ref }) => ({\n sources: [Array(Ref(column_data_source_1.ColumnDataSource)), []],\n }));\n})();\n//# sourceMappingURL=clear_tool.js.map\n","type":"js","dependency_paths":[],"dependency_map":[],"exported":[{"type":"named","name":"ClearToolView"},{"type":"named","name":"ClearTool"}],"externals":[],"shims":[]},"code":{"source":"/* models/clear_tool.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const action_tool_1 = require(\"@bokehjs/models/tools/actions/action_tool\");\n const column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\n const icons_css_1 = require(\"@bokehjs/styles/icons.css\");\n class ClearToolView extends action_tool_1.ActionToolView {\n doit() {\n for (var source of this.model.sources) {\n for (const column in source.data) {\n source.data[column] = [];\n }\n source.change.emit();\n source.properties.data.change.emit();\n }\n }\n }\n exports.ClearToolView = ClearToolView;\n ClearToolView.__name__ = \"ClearToolView\";\n class ClearTool extends action_tool_1.ActionTool {\n constructor(attrs) {\n super(attrs);\n this.tool_name = \"Clear data\";\n this.tool_icon = icons_css_1.tool_icon_reset;\n }\n }\n exports.ClearTool = ClearTool;\n _a = ClearTool;\n ClearTool.__name__ = \"ClearTool\";\n ClearTool.__module__ = \"geoviews.models.custom_tools\";\n (() => {\n _a.prototype.default_view = ClearToolView;\n _a.define(({ Array, Ref }) => ({\n sources: [Array(Ref(column_data_source_1.ColumnDataSource)), []],\n }));\n })();\n}\n","min_source":"function _(o,e,s,t,a){var l;t();const c=o(\"@bokehjs/models/tools/actions/action_tool\"),n=o(\"@bokehjs/models/sources/column_data_source\"),r=o(\"@bokehjs/styles/icons.css\");class i extends c.ActionToolView{doit(){for(var o of this.model.sources){for(const e in o.data)o.data[e]=[];o.change.emit(),o.properties.data.change.emit()}}}s.ClearToolView=i,i.__name__=\"ClearToolView\";class _ extends c.ActionTool{constructor(o){super(o),this.tool_name=\"Clear data\",this.tool_icon=r.tool_icon_reset}}s.ClearTool=_,l=_,_.__name__=\"ClearTool\",_.__module__=\"geoviews.models.custom_tools\",l.prototype.default_view=i,l.define((({Array:o,Ref:e})=>({sources:[o(e(n.ColumnDataSource)),[]]})))}\n//# sourceMappingURL=clear_tool.min.js.map","min_map":"{\"version\":3,\"file\":\"clear_tool.min.js\",\"names\":[\"_\",\"require\",\"module\",\"exports\",\"__esModule\",\"__esExport\",\"_a\",\"action_tool_1\",\"column_data_source_1\",\"icons_css_1\",\"ClearToolView\",\"ActionToolView\",\"doit\",\"source\",\"this\",\"model\",\"sources\",\"column\",\"data\",\"change\",\"emit\",\"properties\",\"__name__\",\"ClearTool\",\"ActionTool\",\"constructor\",\"attrs\",\"super\",\"tool_name\",\"tool_icon\",\"tool_icon_reset\",\"__module__\",\"prototype\",\"default_view\",\"define\",\"Array\",\"Ref\",\"ColumnDataSource\"],\"sources\":[\"0\"],\"mappings\":\"AAA2B,SAASA,EAAEC,EAASC,EAAQC,EAASC,EAAYC,GAExE,IAAIC,EADJF,IAEA,MAAMG,EAAgBN,EAAQ,6CACxBO,EAAuBP,EAAQ,8CAC/BQ,EAAcR,EAAQ,6BAC5B,MAAMS,UAAsBH,EAAcI,eACtCC,OACI,IAAK,IAAIC,KAAUC,KAAKC,MAAMC,QAAS,CACnC,IAAK,MAAMC,KAAUJ,EAAOK,KACxBL,EAAOK,KAAKD,GAAU,GAE1BJ,EAAOM,OAAOC,OACdP,EAAOQ,WAAWH,KAAKC,OAAOC,MAClC,CACJ,EAEJjB,EAAQO,cAAgBA,EACxBA,EAAcY,SAAW,gBACzB,MAAMC,UAAkBhB,EAAciB,WAClCC,YAAYC,GACRC,MAAMD,GACNZ,KAAKc,UAAY,aACjBd,KAAKe,UAAYpB,EAAYqB,eACjC,EAEJ3B,EAAQoB,UAAYA,EACpBjB,EAAKiB,EACLA,EAAUD,SAAW,YACrBC,EAAUQ,WAAa,+BAEnBzB,EAAG0B,UAAUC,aAAevB,EAC5BJ,EAAG4B,QAAO,EAAGC,QAAOC,UAAU,CAC1BpB,QAAS,CAACmB,EAAMC,EAAI5B,EAAqB6B,mBAAoB,OAGzE\"}"}},{"module":{"file":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/poly_draw.js","base":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib","base_path":"models/poly_draw.js","canonical":"models/poly_draw","resolution":"ESM","id":"cddc7627cc","hash":"cddc7627cc8ef2596322d256f9947effa09994b8826f0040a9bdb56383ea94f8","source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PolyVertexDrawTool = exports.PolyVertexDrawToolView = void 0;\nvar _a;\nconst object_1 = require(\"@bokehjs/core/util/object\");\nconst types_1 = require(\"@bokehjs/core/util/types\");\nconst poly_draw_tool_1 = require(\"@bokehjs/models/tools/edit/poly_draw_tool\");\nclass PolyVertexDrawToolView extends poly_draw_tool_1.PolyDrawToolView {\n _split_path(x, y) {\n for (let r = 0; r < this.model.renderers.length; r++) {\n const renderer = this.model.renderers[r];\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n const xpaths = cds.data[xkey];\n const ypaths = cds.data[ykey];\n for (let index = 0; index < xpaths.length; index++) {\n let xs = xpaths[index];\n if (!(0, types_1.isArray)(xs)) {\n xs = Array.from(xs);\n cds.data[xkey][index] = xs;\n }\n let ys = ypaths[index];\n if (!(0, types_1.isArray)(ys)) {\n ys = Array.from(ys);\n cds.data[ykey][index] = ys;\n }\n for (let i = 0; i < xs.length; i++) {\n if ((xs[i] == x) && (ys[i] == y) && (i != 0) && (i != (xs.length - 1))) {\n xpaths.splice(index + 1, 0, xs.slice(i));\n ypaths.splice(index + 1, 0, ys.slice(i));\n xs.splice(i + 1);\n ys.splice(i + 1);\n for (const column of cds.columns()) {\n if ((column !== xkey) && (column != ykey))\n cds.data[column].splice(index + 1, 0, cds.data[column][index]);\n }\n return;\n }\n }\n }\n }\n }\n _snap_to_vertex(ev, x, y) {\n if (this.model.vertex_renderer) {\n // If an existing vertex is hit snap to it\n const vertex_selected = this._select_event(ev, \"replace\", [this.model.vertex_renderer]);\n const point_ds = this.model.vertex_renderer.data_source;\n // Type once dataspecs are typed\n const point_glyph = this.model.vertex_renderer.glyph;\n const [pxkey, pykey] = [point_glyph.x.field, point_glyph.y.field];\n if (vertex_selected.length) {\n // If existing vertex is hit split path at that location\n // converting to feature vertex\n const index = point_ds.selected.indices[0];\n if (pxkey)\n x = point_ds.data[pxkey][index];\n if (pykey)\n y = point_ds.data[pykey][index];\n if (ev.type != 'mousemove')\n this._split_path(x, y);\n point_ds.selection_manager.clear();\n }\n }\n return [x, y];\n }\n _set_vertices(xs, ys, styles) {\n if (this.model.vertex_renderer == null)\n return;\n const point_glyph = this.model.vertex_renderer.glyph;\n const point_cds = this.model.vertex_renderer.data_source;\n const [pxkey, pykey] = [point_glyph.x.field, point_glyph.y.field];\n if (pxkey) {\n if ((0, types_1.isArray)(xs))\n point_cds.data[pxkey] = xs;\n else\n point_glyph.x = { value: xs };\n }\n if (pykey) {\n if ((0, types_1.isArray)(ys))\n point_cds.data[pykey] = ys;\n else\n point_glyph.y = { value: ys };\n }\n if (styles != null) {\n for (const key of (0, object_1.keys)(styles)) {\n point_cds.data[key] = styles[key];\n point_glyph[key] = { field: key };\n }\n }\n else {\n for (const col of point_cds.columns()) {\n point_cds.data[col] = [];\n }\n }\n this._emit_cds_changes(point_cds, true, true, false);\n }\n _show_vertices() {\n if (!this.model.active) {\n return;\n }\n const xs = [];\n const ys = [];\n const styles = {};\n for (const key of (0, object_1.keys)(this.model.end_style))\n styles[key] = [];\n for (let i = 0; i < this.model.renderers.length; i++) {\n const renderer = this.model.renderers[i];\n const cds = renderer.data_source;\n const glyph = renderer.glyph;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n for (const array of cds.get_array(xkey)) {\n Array.prototype.push.apply(xs, array);\n for (const key of (0, object_1.keys)(this.model.end_style))\n styles[key].push(this.model.end_style[key]);\n for (const key of (0, object_1.keys)(this.model.node_style)) {\n for (let index = 0; index < (array.length - 2); index++) {\n styles[key].push(this.model.node_style[key]);\n }\n }\n for (const key of (0, object_1.keys)(this.model.end_style))\n styles[key].push(this.model.end_style[key]);\n }\n for (const array of cds.get_array(ykey))\n Array.prototype.push.apply(ys, array);\n if (this._drawing && (i == (this.model.renderers.length - 1))) {\n // Skip currently drawn vertex\n xs.splice(xs.length - 1, 1);\n ys.splice(ys.length - 1, 1);\n for (const key of (0, object_1.keys)(styles))\n styles[key].splice(styles[key].length - 1, 1);\n }\n }\n this._set_vertices(xs, ys, styles);\n }\n _remove() {\n const renderer = this.model.renderers[0];\n const cds = renderer.data_source;\n const glyph = renderer.glyph;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n if (xkey) {\n const xidx = cds.data[xkey].length - 1;\n const xs = cds.get_array(xkey)[xidx];\n xs.splice(xs.length - 1, 1);\n if (xs.length == 1)\n cds.data[xkey].splice(xidx, 1);\n }\n if (ykey) {\n const yidx = cds.data[ykey].length - 1;\n const ys = cds.get_array(ykey)[yidx];\n ys.splice(ys.length - 1, 1);\n if (ys.length == 1)\n cds.data[ykey].splice(yidx, 1);\n }\n this._emit_cds_changes(cds);\n this._drawing = false;\n this._show_vertices();\n }\n}\nexports.PolyVertexDrawToolView = PolyVertexDrawToolView;\nPolyVertexDrawToolView.__name__ = \"PolyVertexDrawToolView\";\nclass PolyVertexDrawTool extends poly_draw_tool_1.PolyDrawTool {\n constructor(attrs) {\n super(attrs);\n }\n}\nexports.PolyVertexDrawTool = PolyVertexDrawTool;\n_a = PolyVertexDrawTool;\nPolyVertexDrawTool.__name__ = \"PolyVertexDrawTool\";\nPolyVertexDrawTool.__module__ = \"geoviews.models.custom_tools\";\n(() => {\n _a.prototype.default_view = PolyVertexDrawToolView;\n _a.define(({ Any }) => ({\n end_style: [Any, {}],\n node_style: [Any, {}],\n }));\n})();\n//# sourceMappingURL=poly_draw.js.map\n","type":"js","dependency_paths":[],"dependency_map":[],"exported":[{"type":"named","name":"PolyVertexDrawToolView"},{"type":"named","name":"PolyVertexDrawTool"}],"externals":[],"shims":[]},"code":{"source":"/* models/poly_draw.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const object_1 = require(\"@bokehjs/core/util/object\");\n const types_1 = require(\"@bokehjs/core/util/types\");\n const poly_draw_tool_1 = require(\"@bokehjs/models/tools/edit/poly_draw_tool\");\n class PolyVertexDrawToolView extends poly_draw_tool_1.PolyDrawToolView {\n _split_path(x, y) {\n for (let r = 0; r < this.model.renderers.length; r++) {\n const renderer = this.model.renderers[r];\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n const xpaths = cds.data[xkey];\n const ypaths = cds.data[ykey];\n for (let index = 0; index < xpaths.length; index++) {\n let xs = xpaths[index];\n if (!(0, types_1.isArray)(xs)) {\n xs = Array.from(xs);\n cds.data[xkey][index] = xs;\n }\n let ys = ypaths[index];\n if (!(0, types_1.isArray)(ys)) {\n ys = Array.from(ys);\n cds.data[ykey][index] = ys;\n }\n for (let i = 0; i < xs.length; i++) {\n if ((xs[i] == x) && (ys[i] == y) && (i != 0) && (i != (xs.length - 1))) {\n xpaths.splice(index + 1, 0, xs.slice(i));\n ypaths.splice(index + 1, 0, ys.slice(i));\n xs.splice(i + 1);\n ys.splice(i + 1);\n for (const column of cds.columns()) {\n if ((column !== xkey) && (column != ykey))\n cds.data[column].splice(index + 1, 0, cds.data[column][index]);\n }\n return;\n }\n }\n }\n }\n }\n _snap_to_vertex(ev, x, y) {\n if (this.model.vertex_renderer) {\n // If an existing vertex is hit snap to it\n const vertex_selected = this._select_event(ev, \"replace\", [this.model.vertex_renderer]);\n const point_ds = this.model.vertex_renderer.data_source;\n // Type once dataspecs are typed\n const point_glyph = this.model.vertex_renderer.glyph;\n const [pxkey, pykey] = [point_glyph.x.field, point_glyph.y.field];\n if (vertex_selected.length) {\n // If existing vertex is hit split path at that location\n // converting to feature vertex\n const index = point_ds.selected.indices[0];\n if (pxkey)\n x = point_ds.data[pxkey][index];\n if (pykey)\n y = point_ds.data[pykey][index];\n if (ev.type != 'mousemove')\n this._split_path(x, y);\n point_ds.selection_manager.clear();\n }\n }\n return [x, y];\n }\n _set_vertices(xs, ys, styles) {\n if (this.model.vertex_renderer == null)\n return;\n const point_glyph = this.model.vertex_renderer.glyph;\n const point_cds = this.model.vertex_renderer.data_source;\n const [pxkey, pykey] = [point_glyph.x.field, point_glyph.y.field];\n if (pxkey) {\n if ((0, types_1.isArray)(xs))\n point_cds.data[pxkey] = xs;\n else\n point_glyph.x = { value: xs };\n }\n if (pykey) {\n if ((0, types_1.isArray)(ys))\n point_cds.data[pykey] = ys;\n else\n point_glyph.y = { value: ys };\n }\n if (styles != null) {\n for (const key of (0, object_1.keys)(styles)) {\n point_cds.data[key] = styles[key];\n point_glyph[key] = { field: key };\n }\n }\n else {\n for (const col of point_cds.columns()) {\n point_cds.data[col] = [];\n }\n }\n this._emit_cds_changes(point_cds, true, true, false);\n }\n _show_vertices() {\n if (!this.model.active) {\n return;\n }\n const xs = [];\n const ys = [];\n const styles = {};\n for (const key of (0, object_1.keys)(this.model.end_style))\n styles[key] = [];\n for (let i = 0; i < this.model.renderers.length; i++) {\n const renderer = this.model.renderers[i];\n const cds = renderer.data_source;\n const glyph = renderer.glyph;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n for (const array of cds.get_array(xkey)) {\n Array.prototype.push.apply(xs, array);\n for (const key of (0, object_1.keys)(this.model.end_style))\n styles[key].push(this.model.end_style[key]);\n for (const key of (0, object_1.keys)(this.model.node_style)) {\n for (let index = 0; index < (array.length - 2); index++) {\n styles[key].push(this.model.node_style[key]);\n }\n }\n for (const key of (0, object_1.keys)(this.model.end_style))\n styles[key].push(this.model.end_style[key]);\n }\n for (const array of cds.get_array(ykey))\n Array.prototype.push.apply(ys, array);\n if (this._drawing && (i == (this.model.renderers.length - 1))) {\n // Skip currently drawn vertex\n xs.splice(xs.length - 1, 1);\n ys.splice(ys.length - 1, 1);\n for (const key of (0, object_1.keys)(styles))\n styles[key].splice(styles[key].length - 1, 1);\n }\n }\n this._set_vertices(xs, ys, styles);\n }\n _remove() {\n const renderer = this.model.renderers[0];\n const cds = renderer.data_source;\n const glyph = renderer.glyph;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n if (xkey) {\n const xidx = cds.data[xkey].length - 1;\n const xs = cds.get_array(xkey)[xidx];\n xs.splice(xs.length - 1, 1);\n if (xs.length == 1)\n cds.data[xkey].splice(xidx, 1);\n }\n if (ykey) {\n const yidx = cds.data[ykey].length - 1;\n const ys = cds.get_array(ykey)[yidx];\n ys.splice(ys.length - 1, 1);\n if (ys.length == 1)\n cds.data[ykey].splice(yidx, 1);\n }\n this._emit_cds_changes(cds);\n this._drawing = false;\n this._show_vertices();\n }\n }\n exports.PolyVertexDrawToolView = PolyVertexDrawToolView;\n PolyVertexDrawToolView.__name__ = \"PolyVertexDrawToolView\";\n class PolyVertexDrawTool extends poly_draw_tool_1.PolyDrawTool {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.PolyVertexDrawTool = PolyVertexDrawTool;\n _a = PolyVertexDrawTool;\n PolyVertexDrawTool.__name__ = \"PolyVertexDrawTool\";\n PolyVertexDrawTool.__module__ = \"geoviews.models.custom_tools\";\n (() => {\n _a.prototype.default_view = PolyVertexDrawToolView;\n _a.define(({ Any }) => ({\n end_style: [Any, {}],\n node_style: [Any, {}],\n }));\n })();\n}\n","min_source":"function _(e,t,s,r,o){var l;r();const i=e(\"@bokehjs/core/util/object\"),d=e(\"@bokehjs/core/util/types\"),a=e(\"@bokehjs/models/tools/edit/poly_draw_tool\");class n extends a.PolyDrawToolView{_split_path(e,t){for(let s=0;s<this.model.renderers.length;s++){const r=this.model.renderers[s],o=r.glyph,l=r.data_source,[i,a]=[o.xs.field,o.ys.field],n=l.data[i],_=l.data[a];for(let s=0;s<n.length;s++){let r=n[s];(0,d.isArray)(r)||(r=Array.from(r),l.data[i][s]=r);let o=_[s];(0,d.isArray)(o)||(o=Array.from(o),l.data[a][s]=o);for(let d=0;d<r.length;d++)if(r[d]==e&&o[d]==t&&0!=d&&d!=r.length-1){n.splice(s+1,0,r.slice(d)),_.splice(s+1,0,o.slice(d)),r.splice(d+1),o.splice(d+1);for(const e of l.columns())e!==i&&e!=a&&l.data[e].splice(s+1,0,l.data[e][s]);return}}}}_snap_to_vertex(e,t,s){if(this.model.vertex_renderer){const r=this._select_event(e,\"replace\",[this.model.vertex_renderer]),o=this.model.vertex_renderer.data_source,l=this.model.vertex_renderer.glyph,[i,d]=[l.x.field,l.y.field];if(r.length){const r=o.selected.indices[0];i&&(t=o.data[i][r]),d&&(s=o.data[d][r]),\"mousemove\"!=e.type&&this._split_path(t,s),o.selection_manager.clear()}}return[t,s]}_set_vertices(e,t,s){if(null==this.model.vertex_renderer)return;const r=this.model.vertex_renderer.glyph,o=this.model.vertex_renderer.data_source,[l,a]=[r.x.field,r.y.field];if(l&&((0,d.isArray)(e)?o.data[l]=e:r.x={value:e}),a&&((0,d.isArray)(t)?o.data[a]=t:r.y={value:t}),null!=s)for(const e of(0,i.keys)(s))o.data[e]=s[e],r[e]={field:e};else for(const e of o.columns())o.data[e]=[];this._emit_cds_changes(o,!0,!0,!1)}_show_vertices(){if(!this.model.active)return;const e=[],t=[],s={};for(const e of(0,i.keys)(this.model.end_style))s[e]=[];for(let r=0;r<this.model.renderers.length;r++){const o=this.model.renderers[r],l=o.data_source,d=o.glyph,[a,n]=[d.xs.field,d.ys.field];for(const t of l.get_array(a)){Array.prototype.push.apply(e,t);for(const e of(0,i.keys)(this.model.end_style))s[e].push(this.model.end_style[e]);for(const e of(0,i.keys)(this.model.node_style))for(let r=0;r<t.length-2;r++)s[e].push(this.model.node_style[e]);for(const e of(0,i.keys)(this.model.end_style))s[e].push(this.model.end_style[e])}for(const e of l.get_array(n))Array.prototype.push.apply(t,e);if(this._drawing&&r==this.model.renderers.length-1){e.splice(e.length-1,1),t.splice(t.length-1,1);for(const e of(0,i.keys)(s))s[e].splice(s[e].length-1,1)}}this._set_vertices(e,t,s)}_remove(){const e=this.model.renderers[0],t=e.data_source,s=e.glyph,[r,o]=[s.xs.field,s.ys.field];if(r){const e=t.data[r].length-1,s=t.get_array(r)[e];s.splice(s.length-1,1),1==s.length&&t.data[r].splice(e,1)}if(o){const e=t.data[o].length-1,s=t.get_array(o)[e];s.splice(s.length-1,1),1==s.length&&t.data[o].splice(e,1)}this._emit_cds_changes(t),this._drawing=!1,this._show_vertices()}}s.PolyVertexDrawToolView=n,n.__name__=\"PolyVertexDrawToolView\";class _ extends a.PolyDrawTool{constructor(e){super(e)}}s.PolyVertexDrawTool=_,l=_,_.__name__=\"PolyVertexDrawTool\",_.__module__=\"geoviews.models.custom_tools\",l.prototype.default_view=n,l.define((({Any:e})=>({end_style:[e,{}],node_style:[e,{}]})))}\n//# sourceMappingURL=poly_draw.min.js.map","min_map":"{\"version\":3,\"file\":\"poly_draw.min.js\",\"names\":[\"_\",\"require\",\"module\",\"exports\",\"__esModule\",\"__esExport\",\"_a\",\"object_1\",\"types_1\",\"poly_draw_tool_1\",\"PolyVertexDrawToolView\",\"PolyDrawToolView\",\"_split_path\",\"x\",\"y\",\"r\",\"this\",\"model\",\"renderers\",\"length\",\"renderer\",\"glyph\",\"cds\",\"data_source\",\"xkey\",\"ykey\",\"xs\",\"field\",\"ys\",\"xpaths\",\"data\",\"ypaths\",\"index\",\"isArray\",\"Array\",\"from\",\"i\",\"splice\",\"slice\",\"column\",\"columns\",\"_snap_to_vertex\",\"ev\",\"vertex_renderer\",\"vertex_selected\",\"_select_event\",\"point_ds\",\"point_glyph\",\"pxkey\",\"pykey\",\"selected\",\"indices\",\"type\",\"selection_manager\",\"clear\",\"_set_vertices\",\"styles\",\"point_cds\",\"value\",\"key\",\"keys\",\"col\",\"_emit_cds_changes\",\"_show_vertices\",\"active\",\"end_style\",\"array\",\"get_array\",\"prototype\",\"push\",\"apply\",\"node_style\",\"_drawing\",\"_remove\",\"xidx\",\"yidx\",\"__name__\",\"PolyVertexDrawTool\",\"PolyDrawTool\",\"constructor\",\"attrs\",\"super\",\"__module__\",\"default_view\",\"define\",\"Any\"],\"sources\":[\"0\"],\"mappings\":\"AAA0B,SAASA,EAAEC,EAASC,EAAQC,EAASC,EAAYC,GAEvE,IAAIC,EADJF,IAEA,MAAMG,EAAWN,EAAQ,6BACnBO,EAAUP,EAAQ,4BAClBQ,EAAmBR,EAAQ,6CACjC,MAAMS,UAA+BD,EAAiBE,iBAClDC,YAAYC,EAAGC,GACX,IAAK,IAAIC,EAAI,EAAGA,EAAIC,KAAKC,MAAMC,UAAUC,OAAQJ,IAAK,CAClD,MAAMK,EAAWJ,KAAKC,MAAMC,UAAUH,GAChCM,EAAQD,EAASC,MACjBC,EAAMF,EAASG,aACdC,EAAMC,GAAQ,CAACJ,EAAMK,GAAGC,MAAON,EAAMO,GAAGD,OACzCE,EAASP,EAAIQ,KAAKN,GAClBO,EAAST,EAAIQ,KAAKL,GACxB,IAAK,IAAIO,EAAQ,EAAGA,EAAQH,EAAOV,OAAQa,IAAS,CAChD,IAAIN,EAAKG,EAAOG,IACX,EAAIxB,EAAQyB,SAASP,KACtBA,EAAKQ,MAAMC,KAAKT,GAChBJ,EAAIQ,KAAKN,GAAMQ,GAASN,GAE5B,IAAIE,EAAKG,EAAOC,IACX,EAAIxB,EAAQyB,SAASL,KACtBA,EAAKM,MAAMC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kD,GAC/B/C,EAAGS,OAAOT,EAAGT,OAAS,EAAG,GACR,GAAbS,EAAGT,QACHG,EAAIQ,KAAKL,GAAMY,OAAOsC,EAAM,EACpC,CACA3D,KAAK8C,kBAAkBxC,GACvBN,KAAKwD,UAAW,EAChBxD,KAAK+C,gBACT,EAEJ5D,EAAQO,uBAAyBA,EACjCA,EAAuBkE,SAAW,yBAClC,MAAMC,UAA2BpE,EAAiBqE,aAC9CC,YAAYC,GACRC,MAAMD,EACV,EAEJ7E,EAAQ0E,mBAAqBA,EAC7BvE,EAAKuE,EACLA,EAAmBD,SAAW,qBAC9BC,EAAmBK,WAAa,+BAE5B5E,EAAG8D,UAAUe,aAAezE,EAC5BJ,EAAG8E,QAAO,EAAGC,UAAU,CACnBpB,UAAW,CAACoB,EAAK,CAAC,GAClBd,WAAY,CAACc,EAAK,CAAC,MAG/B\"}"}},{"module":{"file":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/poly_edit.js","base":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib","base_path":"models/poly_edit.js","canonical":"models/poly_edit","resolution":"ESM","id":"8837add128","hash":"8837add1281abc13258fcbb6f74fd47b4235c144299467ada4a7893547efffa1","source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PolyVertexEditTool = exports.PolyVertexEditToolView = void 0;\nvar _a;\nconst object_1 = require(\"@bokehjs/core/util/object\");\nconst types_1 = require(\"@bokehjs/core/util/types\");\nconst poly_edit_tool_1 = require(\"@bokehjs/models/tools/edit/poly_edit_tool\");\nclass PolyVertexEditToolView extends poly_edit_tool_1.PolyEditToolView {\n deactivate() {\n this._hide_vertices();\n if (!this._selected_renderer) {\n return;\n }\n else if (this._drawing) {\n this._remove_vertex();\n this._drawing = false;\n }\n this._emit_cds_changes(this._selected_renderer.data_source, false, true, false);\n }\n _pan(ev) {\n if (this._basepoint == null || this.model.vertex_renderer == null)\n return;\n const points = this._drag_points(ev, [this.model.vertex_renderer]);\n if (!ev.modifiers.shift) {\n this._move_linked(points);\n }\n if (this._selected_renderer)\n this._selected_renderer.data_source.change.emit();\n }\n _pan_end(ev) {\n if (this._basepoint == null || this.model.vertex_renderer == null)\n return;\n const points = this._drag_points(ev, [this.model.vertex_renderer]);\n if (!ev.modifiers.shift) {\n this._move_linked(points);\n }\n this._emit_cds_changes(this.model.vertex_renderer.data_source, false, true, true);\n if (this._selected_renderer) {\n this._emit_cds_changes(this._selected_renderer.data_source);\n }\n this._basepoint = null;\n }\n _drag_points(ev, renderers) {\n if (this._basepoint == null)\n return [];\n const [bx, by] = this._basepoint;\n const points = [];\n for (const renderer of renderers) {\n const basepoint = this._map_drag(bx, by, renderer);\n const point = this._map_drag(ev.sx, ev.sy, renderer);\n if (point == null || basepoint == null) {\n continue;\n }\n const [x, y] = point;\n const [px, py] = basepoint;\n const [dx, dy] = [x - px, y - py];\n // Type once dataspecs are typed\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const [xkey, ykey] = [glyph.x.field, glyph.y.field];\n for (const index of cds.selected.indices) {\n const point = [];\n if (xkey) {\n point.push(cds.data[xkey][index]);\n cds.data[xkey][index] += dx;\n }\n if (ykey) {\n point.push(cds.data[ykey][index]);\n cds.data[ykey][index] += dy;\n }\n point.push(dx);\n point.push(dy);\n points.push(point);\n }\n cds.change.emit();\n }\n this._basepoint = [ev.sx, ev.sy];\n return points;\n }\n _set_vertices(xs, ys, styles) {\n if (this.model.vertex_renderer == null)\n return;\n const point_glyph = this.model.vertex_renderer.glyph;\n const point_cds = this.model.vertex_renderer.data_source;\n const [pxkey, pykey] = [point_glyph.x.field, point_glyph.y.field];\n if (pxkey) {\n if ((0, types_1.isArray)(xs))\n point_cds.data[pxkey] = xs;\n else\n point_glyph.x = { value: xs };\n }\n if (pykey) {\n if ((0, types_1.isArray)(ys))\n point_cds.data[pykey] = ys;\n else\n point_glyph.y = { value: ys };\n }\n if (styles != null) {\n for (const key of (0, object_1.keys)(styles)) {\n point_cds.data[key] = styles[key];\n point_glyph[key] = { field: key };\n }\n }\n else {\n for (const col of point_cds.columns()) {\n point_cds.data[col] = [];\n }\n }\n this._emit_cds_changes(point_cds, true, true, false);\n }\n _move_linked(points) {\n if (!this._selected_renderer)\n return;\n const renderer = this._selected_renderer;\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n const xpaths = cds.data[xkey];\n const ypaths = cds.data[ykey];\n for (const point of points) {\n const [x, y, dx, dy] = point;\n for (let index = 0; index < xpaths.length; index++) {\n const xs = xpaths[index];\n const ys = ypaths[index];\n for (let i = 0; i < xs.length; i++) {\n if ((xs[i] == x) && (ys[i] == y)) {\n xs[i] += dx;\n ys[i] += dy;\n }\n }\n }\n }\n }\n _tap(ev) {\n if (this.model.vertex_renderer == null)\n return;\n const renderer = this.model.vertex_renderer;\n const point = this._map_drag(ev.sx, ev.sy, renderer);\n if (point == null)\n return;\n else if (this._drawing && this._selected_renderer) {\n let [x, y] = point;\n const cds = renderer.data_source;\n // Type once dataspecs are typed\n const glyph = renderer.glyph;\n const [xkey, ykey] = [glyph.x.field, glyph.y.field];\n const indices = cds.selected.indices;\n [x, y] = this._snap_to_vertex(ev, x, y);\n const index = indices[0];\n cds.selected.indices = [index + 1];\n if (xkey) {\n const xs = cds.get_array(xkey);\n const nx = xs[index];\n xs[index] = x;\n xs.splice(index + 1, 0, nx);\n }\n if (ykey) {\n const ys = cds.get_array(ykey);\n const ny = ys[index];\n ys[index] = y;\n ys.splice(index + 1, 0, ny);\n }\n cds.change.emit();\n this._emit_cds_changes(this._selected_renderer.data_source, true, false, true);\n return;\n }\n this._select_event(ev, this._select_mode(ev), [renderer]);\n }\n _show_vertices(ev) {\n if (!this.model.active)\n return;\n const renderers = this._select_event(ev, \"replace\", this.model.renderers);\n if (!renderers.length) {\n this._hide_vertices();\n this._selected_renderer = null;\n this._drawing = false;\n return;\n }\n const renderer = renderers[0];\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const index = cds.selected.indices[0];\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n let xs;\n let ys;\n if (xkey) {\n xs = cds.data[xkey][index];\n if (!(0, types_1.isArray)(xs))\n cds.data[xkey][index] = xs = Array.from(xs);\n }\n else {\n xs = glyph.xs.value;\n }\n if (ykey) {\n ys = cds.data[ykey][index];\n if (!(0, types_1.isArray)(ys))\n cds.data[ykey][index] = ys = Array.from(ys);\n }\n else {\n ys = glyph.ys.value;\n }\n const styles = {};\n for (const key of (0, object_1.keys)(this.model.end_style))\n styles[key] = [this.model.end_style[key]];\n for (const key of (0, object_1.keys)(this.model.node_style)) {\n for (let index = 0; index < (xs.length - 2); index++) {\n styles[key].push(this.model.node_style[key]);\n }\n }\n for (const key of (0, object_1.keys)(this.model.end_style))\n styles[key].push(this.model.end_style[key]);\n this._selected_renderer = renderer;\n this._set_vertices(xs, ys, styles);\n }\n}\nexports.PolyVertexEditToolView = PolyVertexEditToolView;\nPolyVertexEditToolView.__name__ = \"PolyVertexEditToolView\";\nclass PolyVertexEditTool extends poly_edit_tool_1.PolyEditTool {\n constructor(attrs) {\n super(attrs);\n }\n}\nexports.PolyVertexEditTool = PolyVertexEditTool;\n_a = PolyVertexEditTool;\nPolyVertexEditTool.__name__ = \"PolyVertexEditTool\";\nPolyVertexEditTool.__module__ = \"geoviews.models.custom_tools\";\n(() => {\n _a.prototype.default_view = PolyVertexEditToolView;\n _a.define(({ Any }) => ({\n end_style: [Any, {}],\n node_style: [Any, {}],\n }));\n})();\n//# sourceMappingURL=poly_edit.js.map\n","type":"js","dependency_paths":[],"dependency_map":[],"exported":[{"type":"named","name":"PolyVertexEditToolView"},{"type":"named","name":"PolyVertexEditTool"}],"externals":[],"shims":[]},"code":{"source":"/* models/poly_edit.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const object_1 = require(\"@bokehjs/core/util/object\");\n const types_1 = require(\"@bokehjs/core/util/types\");\n const poly_edit_tool_1 = require(\"@bokehjs/models/tools/edit/poly_edit_tool\");\n class PolyVertexEditToolView extends poly_edit_tool_1.PolyEditToolView {\n deactivate() {\n this._hide_vertices();\n if (!this._selected_renderer) {\n return;\n }\n else if (this._drawing) {\n this._remove_vertex();\n this._drawing = false;\n }\n this._emit_cds_changes(this._selected_renderer.data_source, false, true, false);\n }\n _pan(ev) {\n if (this._basepoint == null || this.model.vertex_renderer == null)\n return;\n const points = this._drag_points(ev, [this.model.vertex_renderer]);\n if (!ev.modifiers.shift) {\n this._move_linked(points);\n }\n if (this._selected_renderer)\n this._selected_renderer.data_source.change.emit();\n }\n _pan_end(ev) {\n if (this._basepoint == null || this.model.vertex_renderer == null)\n return;\n const points = this._drag_points(ev, [this.model.vertex_renderer]);\n if (!ev.modifiers.shift) {\n this._move_linked(points);\n }\n this._emit_cds_changes(this.model.vertex_renderer.data_source, false, true, true);\n if (this._selected_renderer) {\n this._emit_cds_changes(this._selected_renderer.data_source);\n }\n this._basepoint = null;\n }\n _drag_points(ev, renderers) {\n if (this._basepoint == null)\n return [];\n const [bx, by] = this._basepoint;\n const points = [];\n for (const renderer of renderers) {\n const basepoint = this._map_drag(bx, by, renderer);\n const point = this._map_drag(ev.sx, ev.sy, renderer);\n if (point == null || basepoint == null) {\n continue;\n }\n const [x, y] = point;\n const [px, py] = basepoint;\n const [dx, dy] = [x - px, y - py];\n // Type once dataspecs are typed\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const [xkey, ykey] = [glyph.x.field, glyph.y.field];\n for (const index of cds.selected.indices) {\n const point = [];\n if (xkey) {\n point.push(cds.data[xkey][index]);\n cds.data[xkey][index] += dx;\n }\n if (ykey) {\n point.push(cds.data[ykey][index]);\n cds.data[ykey][index] += dy;\n }\n point.push(dx);\n point.push(dy);\n points.push(point);\n }\n cds.change.emit();\n }\n this._basepoint = [ev.sx, ev.sy];\n return points;\n }\n _set_vertices(xs, ys, styles) {\n if (this.model.vertex_renderer == null)\n return;\n const point_glyph = this.model.vertex_renderer.glyph;\n const point_cds = this.model.vertex_renderer.data_source;\n const [pxkey, pykey] = [point_glyph.x.field, point_glyph.y.field];\n if (pxkey) {\n if ((0, types_1.isArray)(xs))\n point_cds.data[pxkey] = xs;\n else\n point_glyph.x = { value: xs };\n }\n if (pykey) {\n if ((0, types_1.isArray)(ys))\n point_cds.data[pykey] = ys;\n else\n point_glyph.y = { value: ys };\n }\n if (styles != null) {\n for (const key of (0, object_1.keys)(styles)) {\n point_cds.data[key] = styles[key];\n point_glyph[key] = { field: key };\n }\n }\n else {\n for (const col of point_cds.columns()) {\n point_cds.data[col] = [];\n }\n }\n this._emit_cds_changes(point_cds, true, true, false);\n }\n _move_linked(points) {\n if (!this._selected_renderer)\n return;\n const renderer = this._selected_renderer;\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n const xpaths = cds.data[xkey];\n const ypaths = cds.data[ykey];\n for (const point of points) {\n const [x, y, dx, dy] = point;\n for (let index = 0; index < xpaths.length; index++) {\n const xs = xpaths[index];\n const ys = ypaths[index];\n for (let i = 0; i < xs.length; i++) {\n if ((xs[i] == x) && (ys[i] == y)) {\n xs[i] += dx;\n ys[i] += dy;\n }\n }\n }\n }\n }\n _tap(ev) {\n if (this.model.vertex_renderer == null)\n return;\n const renderer = this.model.vertex_renderer;\n const point = this._map_drag(ev.sx, ev.sy, renderer);\n if (point == null)\n return;\n else if (this._drawing && this._selected_renderer) {\n let [x, y] = point;\n const cds = renderer.data_source;\n // Type once dataspecs are typed\n const glyph = renderer.glyph;\n const [xkey, ykey] = [glyph.x.field, glyph.y.field];\n const indices = cds.selected.indices;\n [x, y] = this._snap_to_vertex(ev, x, y);\n const index = indices[0];\n cds.selected.indices = [index + 1];\n if (xkey) {\n const xs = cds.get_array(xkey);\n const nx = xs[index];\n xs[index] = x;\n xs.splice(index + 1, 0, nx);\n }\n if (ykey) {\n const ys = cds.get_array(ykey);\n const ny = ys[index];\n ys[index] = y;\n ys.splice(index + 1, 0, ny);\n }\n cds.change.emit();\n this._emit_cds_changes(this._selected_renderer.data_source, true, false, true);\n return;\n }\n this._select_event(ev, this._select_mode(ev), [renderer]);\n }\n _show_vertices(ev) {\n if (!this.model.active)\n return;\n const renderers = this._select_event(ev, \"replace\", this.model.renderers);\n if (!renderers.length) {\n this._hide_vertices();\n this._selected_renderer = null;\n this._drawing = false;\n return;\n }\n const renderer = renderers[0];\n const glyph = renderer.glyph;\n const cds = renderer.data_source;\n const index = cds.selected.indices[0];\n const [xkey, ykey] = [glyph.xs.field, glyph.ys.field];\n let xs;\n let ys;\n if (xkey) {\n xs = cds.data[xkey][index];\n if (!(0, types_1.isArray)(xs))\n cds.data[xkey][index] = xs = Array.from(xs);\n }\n else {\n xs = glyph.xs.value;\n }\n if (ykey) {\n ys = cds.data[ykey][index];\n if (!(0, types_1.isArray)(ys))\n cds.data[ykey][index] = ys = Array.from(ys);\n }\n else {\n ys = glyph.ys.value;\n }\n const styles = {};\n for (const key of (0, object_1.keys)(this.model.end_style))\n styles[key] = [this.model.end_style[key]];\n for (const key of (0, object_1.keys)(this.model.node_style)) {\n for (let index = 0; index < (xs.length - 2); index++) {\n styles[key].push(this.model.node_style[key]);\n }\n }\n for (const key of (0, object_1.keys)(this.model.end_style))\n styles[key].push(this.model.end_style[key]);\n this._selected_renderer = renderer;\n this._set_vertices(xs, ys, styles);\n }\n }\n exports.PolyVertexEditToolView = PolyVertexEditToolView;\n PolyVertexEditToolView.__name__ = \"PolyVertexEditToolView\";\n class PolyVertexEditTool extends poly_edit_tool_1.PolyEditTool {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.PolyVertexEditTool = PolyVertexEditTool;\n _a = PolyVertexEditTool;\n PolyVertexEditTool.__name__ = \"PolyVertexEditTool\";\n PolyVertexEditTool.__module__ = \"geoviews.models.custom_tools\";\n (() => {\n _a.prototype.default_view = PolyVertexEditToolView;\n _a.define(({ Any }) => ({\n end_style: [Any, {}],\n node_style: [Any, {}],\n }));\n })();\n}\n","min_source":"function _(e,t,s,r,i){var d;r();const o=e(\"@bokehjs/core/util/object\"),_=e(\"@bokehjs/core/util/types\"),l=e(\"@bokehjs/models/tools/edit/poly_edit_tool\");class n extends l.PolyEditToolView{deactivate(){this._hide_vertices(),this._selected_renderer&&(this._drawing&&(this._remove_vertex(),this._drawing=!1),this._emit_cds_changes(this._selected_renderer.data_source,!1,!0,!1))}_pan(e){if(null==this._basepoint||null==this.model.vertex_renderer)return;const t=this._drag_points(e,[this.model.vertex_renderer]);e.modifiers.shift||this._move_linked(t),this._selected_renderer&&this._selected_renderer.data_source.change.emit()}_pan_end(e){if(null==this._basepoint||null==this.model.vertex_renderer)return;const t=this._drag_points(e,[this.model.vertex_renderer]);e.modifiers.shift||this._move_linked(t),this._emit_cds_changes(this.model.vertex_renderer.data_source,!1,!0,!0),this._selected_renderer&&this._emit_cds_changes(this._selected_renderer.data_source),this._basepoint=null}_drag_points(e,t){if(null==this._basepoint)return[];const[s,r]=this._basepoint,i=[];for(const d of t){const t=this._map_drag(s,r,d),o=this._map_drag(e.sx,e.sy,d);if(null==o||null==t)continue;const[_,l]=o,[n,a]=t,[c,h]=[_-n,l-a],u=d.glyph,f=d.data_source,[m,y]=[u.x.field,u.y.field];for(const e of f.selected.indices){const t=[];m&&(t.push(f.data[m][e]),f.data[m][e]+=c),y&&(t.push(f.data[y][e]),f.data[y][e]+=h),t.push(c),t.push(h),i.push(t)}f.change.emit()}return this._basepoint=[e.sx,e.sy],i}_set_vertices(e,t,s){if(null==this.model.vertex_renderer)return;const r=this.model.vertex_renderer.glyph,i=this.model.vertex_renderer.data_source,[d,l]=[r.x.field,r.y.field];if(d&&((0,_.isArray)(e)?i.data[d]=e:r.x={value:e}),l&&((0,_.isArray)(t)?i.data[l]=t:r.y={value:t}),null!=s)for(const e of(0,o.keys)(s))i.data[e]=s[e],r[e]={field:e};else for(const e of i.columns())i.data[e]=[];this._emit_cds_changes(i,!0,!0,!1)}_move_linked(e){if(!this._selected_renderer)return;const t=this._selected_renderer,s=t.glyph,r=t.data_source,[i,d]=[s.xs.field,s.ys.field],o=r.data[i],_=r.data[d];for(const t of e){const[e,s,r,i]=t;for(let t=0;t<o.length;t++){const d=o[t],l=_[t];for(let t=0;t<d.length;t++)d[t]==e&&l[t]==s&&(d[t]+=r,l[t]+=i)}}}_tap(e){if(null==this.model.vertex_renderer)return;const t=this.model.vertex_renderer,s=this._map_drag(e.sx,e.sy,t);if(null!=s){if(this._drawing&&this._selected_renderer){let[r,i]=s;const d=t.data_source,o=t.glyph,[_,l]=[o.x.field,o.y.field],n=d.selected.indices;[r,i]=this._snap_to_vertex(e,r,i);const a=n[0];if(d.selected.indices=[a+1],_){const e=d.get_array(_),t=e[a];e[a]=r,e.splice(a+1,0,t)}if(l){const e=d.get_array(l),t=e[a];e[a]=i,e.splice(a+1,0,t)}return d.change.emit(),void this._emit_cds_changes(this._selected_renderer.data_source,!0,!1,!0)}this._select_event(e,this._select_mode(e),[t])}}_show_vertices(e){if(!this.model.active)return;const t=this._select_event(e,\"replace\",this.model.renderers);if(!t.length)return this._hide_vertices(),this._selected_renderer=null,void(this._drawing=!1);const s=t[0],r=s.glyph,i=s.data_source,d=i.selected.indices[0],[l,n]=[r.xs.field,r.ys.field];let a,c;l?(a=i.data[l][d],(0,_.isArray)(a)||(i.data[l][d]=a=Array.from(a))):a=r.xs.value,n?(c=i.data[n][d],(0,_.isArray)(c)||(i.data[n][d]=c=Array.from(c))):c=r.ys.value;const h={};for(const e of(0,o.keys)(this.model.end_style))h[e]=[this.model.end_style[e]];for(const e of(0,o.keys)(this.model.node_style))for(let t=0;t<a.length-2;t++)h[e].push(this.model.node_style[e]);for(const e of(0,o.keys)(this.model.end_style))h[e].push(this.model.end_style[e]);this._selected_renderer=s,this._set_vertices(a,c,h)}}s.PolyVertexEditToolView=n,n.__name__=\"PolyVertexEditToolView\";class a extends l.PolyEditTool{constructor(e){super(e)}}s.PolyVertexEditTool=a,d=a,a.__name__=\"PolyVertexEditTool\",a.__module__=\"geoviews.models.custom_tools\",d.prototype.default_view=n,d.define((({Any:e})=>({end_style:[e,{}],node_style:[e,{}]})))}\n//# sourceMappingURL=poly_edit.min.js.map","min_map":"{\"version\":3,\"file\":\"poly_edit.min.js\",\"names\":[\"_\",\"require\",\"module\",\"exports\",\"__esModule\",\"__esExport\",\"_a\",\"object_1\",\"types_1\",\"poly_edit_tool_1\",\"PolyVertexEditToolView\",\"PolyEditToolView\",\"deactivate\",\"this\",\"_hide_vertices\",\"_selected_renderer\",\"_drawing\",\"_remove_vertex\",\"_emit_cds_changes\",\"data_source\",\"_pan\",\"ev\",\"_basepoint\",\"model\",\"vertex_renderer\",\"points\",\"_drag_points\",\"modifiers\",\"shift\",\"_move_linked\",\"change\",\"emit\",\"_pan_end\",\"renderers\",\"bx\",\"by\",\"renderer\",\"basepoint\",\"_map_drag\",\"point\",\"sx\",\"sy\",\"x\",\"y\",\"px\",\"py\",\"dx\",\"dy\",\"glyph\",\"cds\",\"xkey\",\"ykey\",\"field\",\"index\",\"selected\",\"indices\",\"push\",\"data\",\"_set_vertices\",\"xs\",\"ys\",\"styles\",\"point_glyph\",\"point_cds\",\"pxkey\",\"pykey\",\"isArray\",\"value\",\"key\",\"keys\",\"col\",\"columns\",\"xpaths\",\"ypaths\",\"length\",\"i\",\"_tap\",\"_snap_to_vertex\",\"get_array\",\"nx\",\"splice\",\"ny\",\"_select_event\",\"_select_mode\",\"_show_vertices\",\"active\",\"Array\",\"from\",\"end_style\",\"node_style\",\"__name__\",\"PolyVertexEditTool\",\"PolyEditTool\",\"constructor\",\"attrs\",\"super\",\"__module__\",\"prototype\",\"default_view\",\"define\",\"Any\"],\"sources\":[\"0\"],\"mappings\":\"AAA0B,SAASA,EAAEC,EAASC,EAAQC,EAASC,EAAYC,GAEvE,IAAIC,EADJF,IAEA,MAAMG,EAAWN,EAAQ,6BACnBO,EAAUP,EAAQ,4BAClBQ,EAAmBR,EAAQ,6CACjC,MAAMS,UAA+BD,EAAiBE,iBAClDC,aACI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AGe,OAAS,EAAIrB,IACzCQ,EAAOO,GAAKZ,KAAK3C,KAAKU,MAAMkE,WAAWrB,IAG/C,IAAK,MAAMA,KAAO,EAAI7D,EAAS8D,MAAMxD,KAAKU,MAAMiE,WAC5C3B,EAAOO,GAAKZ,KAAK3C,KAAKU,MAAMiE,UAAUpB,IAC1CvD,KAAKE,mBAAqBqB,EAC1BvB,KAAK6C,cAAcC,EAAIC,EAAIC,EAC/B,EAEJ1D,EAAQO,uBAAyBA,EACjCA,EAAuBgF,SAAW,yBAClC,MAAMC,UAA2BlF,EAAiBmF,aAC9CC,YAAYC,GACRC,MAAMD,EACV,EAEJ3F,EAAQwF,mBAAqBA,EAC7BrF,EAAKqF,EACLA,EAAmBD,SAAW,qBAC9BC,EAAmBK,WAAa,+BAE5B1F,EAAG2F,UAAUC,aAAexF,EAC5BJ,EAAG6F,QAAO,EAAGC,UAAU,CACnBZ,UAAW,CAACY,EAAK,CAAC,GAClBX,WAAY,CAACW,EAAK,CAAC,MAG/B\"}"}},{"module":{"file":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib/models/restore_tool.js","base":"/home/runner/work/geoviews/geoviews/geoviews/dist/lib","base_path":"models/restore_tool.js","canonical":"models/restore_tool","resolution":"ESM","id":"92294e6ad2","hash":"92294e6ad263c9b651dd5e4b6d8d4576efb38ba565e84a9bf3f5d87d647e89cc","source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RestoreTool = exports.RestoreToolView = void 0;\nvar _a;\nconst action_tool_1 = require(\"@bokehjs/models/tools/actions/action_tool\");\nconst column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\nconst icons_css_1 = require(\"@bokehjs/styles/icons.css\");\nclass RestoreToolView extends action_tool_1.ActionToolView {\n doit() {\n const sources = this.model.sources;\n for (const source of sources) {\n if (!source.buffer || (source.buffer.length == 0)) {\n continue;\n }\n source.data = source.buffer.pop();\n source.change.emit();\n source.properties.data.change.emit();\n }\n }\n}\nexports.RestoreToolView = RestoreToolView;\nRestoreToolView.__name__ = \"RestoreToolView\";\nclass RestoreTool extends action_tool_1.ActionTool {\n constructor(attrs) {\n super(attrs);\n this.tool_name = \"Restore\";\n this.tool_icon = icons_css_1.tool_icon_undo;\n }\n}\nexports.RestoreTool = RestoreTool;\n_a = RestoreTool;\nRestoreTool.__name__ = \"RestoreTool\";\nRestoreTool.__module__ = \"geoviews.models.custom_tools\";\n(() => {\n _a.prototype.default_view = RestoreToolView;\n _a.define(({ Array, Ref }) => ({\n sources: [Array(Ref(column_data_source_1.ColumnDataSource)), []],\n }));\n})();\n//# sourceMappingURL=restore_tool.js.map\n","type":"js","dependency_paths":[],"dependency_map":[],"exported":[{"type":"named","name":"RestoreToolView"},{"type":"named","name":"RestoreTool"}],"externals":[],"shims":[]},"code":{"source":"/* models/restore_tool.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const action_tool_1 = require(\"@bokehjs/models/tools/actions/action_tool\");\n const column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\n const icons_css_1 = require(\"@bokehjs/styles/icons.css\");\n class RestoreToolView extends action_tool_1.ActionToolView {\n doit() {\n const sources = this.model.sources;\n for (const source of sources) {\n if (!source.buffer || (source.buffer.length == 0)) {\n continue;\n }\n source.data = source.buffer.pop();\n source.change.emit();\n source.properties.data.change.emit();\n }\n }\n }\n exports.RestoreToolView = RestoreToolView;\n RestoreToolView.__name__ = \"RestoreToolView\";\n class RestoreTool extends action_tool_1.ActionTool {\n constructor(attrs) {\n super(attrs);\n this.tool_name = \"Restore\";\n this.tool_icon = icons_css_1.tool_icon_undo;\n }\n }\n exports.RestoreTool = RestoreTool;\n _a = RestoreTool;\n RestoreTool.__name__ = \"RestoreTool\";\n RestoreTool.__module__ = \"geoviews.models.custom_tools\";\n (() => {\n _a.prototype.default_view = RestoreToolView;\n _a.define(({ Array, Ref }) => ({\n sources: [Array(Ref(column_data_source_1.ColumnDataSource)), []],\n }));\n })();\n}\n","min_source":"function _(o,e,s,t,c){var n;t();const l=o(\"@bokehjs/models/tools/actions/action_tool\"),r=o(\"@bokehjs/models/sources/column_data_source\"),_=o(\"@bokehjs/styles/icons.css\");class i extends l.ActionToolView{doit(){const o=this.model.sources;for(const e of o)e.buffer&&0!=e.buffer.length&&(e.data=e.buffer.pop(),e.change.emit(),e.properties.data.change.emit())}}s.RestoreToolView=i,i.__name__=\"RestoreToolView\";class a extends l.ActionTool{constructor(o){super(o),this.tool_name=\"Restore\",this.tool_icon=_.tool_icon_undo}}s.RestoreTool=a,n=a,a.__name__=\"RestoreTool\",a.__module__=\"geoviews.models.custom_tools\",n.prototype.default_view=i,n.define((({Array:o,Ref:e})=>({sources:[o(e(r.ColumnDataSource)),[]]})))}\n//# sourceMappingURL=restore_tool.min.js.map","min_map":"{\"version\":3,\"file\":\"restore_tool.min.js\",\"names\":[\"_\",\"require\",\"module\",\"exports\",\"__esModule\",\"__esExport\",\"_a\",\"action_tool_1\",\"column_data_source_1\",\"icons_css_1\",\"RestoreToolView\",\"ActionToolView\",\"doit\",\"sources\",\"this\",\"model\",\"source\",\"buffer\",\"length\",\"data\",\"pop\",\"change\",\"emit\",\"properties\",\"__name__\",\"RestoreTool\",\"ActionTool\",\"constructor\",\"attrs\",\"super\",\"tool_name\",\"tool_icon\",\"tool_icon_undo\",\"__module__\",\"prototype\",\"default_view\",\"define\",\"Array\",\"Ref\",\"ColumnDataSource\"],\"sources\":[\"0\"],\"mappings\":\"AAA6B,SAASA,EAAEC,EAASC,EAAQC,EAASC,EAAYC,GAE1E,IAAIC,EADJF,IAEA,MAAMG,EAAgBN,EAAQ,6CACxBO,EAAuBP,EAAQ,8CAC/BQ,EAAcR,EAAQ,6BAC5B,MAAMS,UAAwBH,EAAcI,eACxCC,OACI,MAAMC,EAAUC,KAAKC,MAAMF,QAC3B,IAAK,MAAMG,KAAUH,EACZG,EAAOC,QAAmC,GAAxBD,EAAOC,OAAOC,SAGrCF,EAAOG,KAAOH,EAAOC,OAAOG,MAC5BJ,EAAOK,OAAOC,OACdN,EAAOO,WAAWJ,KAAKE,OAAOC,OAEtC,EAEJnB,EAAQO,gBAAkBA,EAC1BA,EAAgBc,SAAW,kBAC3B,MAAMC,UAAoBlB,EAAcmB,WACpCC,YAAYC,GACRC,MAAMD,GACNd,KAAKgB,UAAY,UACjBhB,KAAKiB,UAAYtB,EAAYuB,cACjC,EAEJ7B,EAAQsB,YAAcA,EACtBnB,EAAKmB,EACLA,EAAYD,SAAW,cACvBC,EAAYQ,WAAa,+BAErB3B,EAAG4B,UAAUC,aAAezB,EAC5BJ,EAAG8B,QAAO,EAAGC,QAAOC,UAAU,CAC1BzB,QAAS,CAACwB,EAAMC,EAAI9B,EAAqB+B,mBAAoB,OAGzE\"}"}}]}
@@ -42,10 +42,10 @@
42
42
  })
43
43
  ({
44
44
  "c764d38756": function _(e,s,o,t,b){t();const i=e("tslib").__importStar(e("b4555bea44"));o.GeoViews=i;(0,e("@bokehjs/base").register_models)(i)},
45
- "b4555bea44": function _(o,e,l,t,c){t(),c("CheckpointTool",o("1d7c6c8516").CheckpointTool),c("ClearTool",o("1c15765006").ClearTool),c("PolyVertexDrawTool",o("cddc7627cc").PolyVertexDrawTool),c("PolyVertexEditTool",o("296f32feb2").PolyVertexEditTool),c("RestoreTool",o("92294e6ad2").RestoreTool)},
45
+ "b4555bea44": function _(o,e,l,t,c){t(),c("CheckpointTool",o("1d7c6c8516").CheckpointTool),c("ClearTool",o("1c15765006").ClearTool),c("PolyVertexDrawTool",o("cddc7627cc").PolyVertexDrawTool),c("PolyVertexEditTool",o("8837add128").PolyVertexEditTool),c("RestoreTool",o("92294e6ad2").RestoreTool)},
46
46
  "1d7c6c8516": function _(o,e,s,t,c){var n;t();const i=o("@bokehjs/core/util/array"),r=o("@bokehjs/models/tools/actions/action_tool"),l=o("@bokehjs/models/sources/column_data_source"),a=o("@bokehjs/styles/icons.css");class _ extends r.ActionToolView{doit(){const o=this.model.sources;for(const e of o){e.buffer||(e.buffer=[]);let o={};for(const s in e.data){const t=e.data[s],c=[];for(const o of t)Array.isArray(o)||ArrayBuffer.isView(o)?c.push((0,i.copy)(o)):c.push(o);o[s]=c}e.buffer.push(o)}}}s.CheckpointToolView=_,_.__name__="CheckpointToolView";class u extends r.ActionTool{constructor(o){super(o),this.tool_name="Checkpoint",this.tool_icon=a.tool_icon_save}}s.CheckpointTool=u,n=u,u.__name__="CheckpointTool",u.__module__="geoviews.models.custom_tools",n.prototype.default_view=_,n.define((({Array:o,Ref:e})=>({sources:[o(e(l.ColumnDataSource)),[]]})))},
47
47
  "1c15765006": function _(o,e,s,t,a){var l;t();const c=o("@bokehjs/models/tools/actions/action_tool"),n=o("@bokehjs/models/sources/column_data_source"),r=o("@bokehjs/styles/icons.css");class i extends c.ActionToolView{doit(){for(var o of this.model.sources){for(const e in o.data)o.data[e]=[];o.change.emit(),o.properties.data.change.emit()}}}s.ClearToolView=i,i.__name__="ClearToolView";class _ extends c.ActionTool{constructor(o){super(o),this.tool_name="Clear data",this.tool_icon=r.tool_icon_reset}}s.ClearTool=_,l=_,_.__name__="ClearTool",_.__module__="geoviews.models.custom_tools",l.prototype.default_view=i,l.define((({Array:o,Ref:e})=>({sources:[o(e(n.ColumnDataSource)),[]]})))},
48
48
  "cddc7627cc": function _(e,t,s,r,o){var l;r();const i=e("@bokehjs/core/util/object"),d=e("@bokehjs/core/util/types"),a=e("@bokehjs/models/tools/edit/poly_draw_tool");class n extends a.PolyDrawToolView{_split_path(e,t){for(let s=0;s<this.model.renderers.length;s++){const r=this.model.renderers[s],o=r.glyph,l=r.data_source,[i,a]=[o.xs.field,o.ys.field],n=l.data[i],_=l.data[a];for(let s=0;s<n.length;s++){let r=n[s];(0,d.isArray)(r)||(r=Array.from(r),l.data[i][s]=r);let o=_[s];(0,d.isArray)(o)||(o=Array.from(o),l.data[a][s]=o);for(let d=0;d<r.length;d++)if(r[d]==e&&o[d]==t&&0!=d&&d!=r.length-1){n.splice(s+1,0,r.slice(d)),_.splice(s+1,0,o.slice(d)),r.splice(d+1),o.splice(d+1);for(const e of l.columns())e!==i&&e!=a&&l.data[e].splice(s+1,0,l.data[e][s]);return}}}}_snap_to_vertex(e,t,s){if(this.model.vertex_renderer){const r=this._select_event(e,"replace",[this.model.vertex_renderer]),o=this.model.vertex_renderer.data_source,l=this.model.vertex_renderer.glyph,[i,d]=[l.x.field,l.y.field];if(r.length){const r=o.selected.indices[0];i&&(t=o.data[i][r]),d&&(s=o.data[d][r]),"mousemove"!=e.type&&this._split_path(t,s),o.selection_manager.clear()}}return[t,s]}_set_vertices(e,t,s){if(null==this.model.vertex_renderer)return;const r=this.model.vertex_renderer.glyph,o=this.model.vertex_renderer.data_source,[l,a]=[r.x.field,r.y.field];if(l&&((0,d.isArray)(e)?o.data[l]=e:r.x={value:e}),a&&((0,d.isArray)(t)?o.data[a]=t:r.y={value:t}),null!=s)for(const e of(0,i.keys)(s))o.data[e]=s[e],r[e]={field:e};else for(const e of o.columns())o.data[e]=[];this._emit_cds_changes(o,!0,!0,!1)}_show_vertices(){if(!this.model.active)return;const e=[],t=[],s={};for(const e of(0,i.keys)(this.model.end_style))s[e]=[];for(let r=0;r<this.model.renderers.length;r++){const o=this.model.renderers[r],l=o.data_source,d=o.glyph,[a,n]=[d.xs.field,d.ys.field];for(const t of l.get_array(a)){Array.prototype.push.apply(e,t);for(const e of(0,i.keys)(this.model.end_style))s[e].push(this.model.end_style[e]);for(const e of(0,i.keys)(this.model.node_style))for(let r=0;r<t.length-2;r++)s[e].push(this.model.node_style[e]);for(const e of(0,i.keys)(this.model.end_style))s[e].push(this.model.end_style[e])}for(const e of l.get_array(n))Array.prototype.push.apply(t,e);if(this._drawing&&r==this.model.renderers.length-1){e.splice(e.length-1,1),t.splice(t.length-1,1);for(const e of(0,i.keys)(s))s[e].splice(s[e].length-1,1)}}this._set_vertices(e,t,s)}_remove(){const e=this.model.renderers[0],t=e.data_source,s=e.glyph,[r,o]=[s.xs.field,s.ys.field];if(r){const e=t.data[r].length-1,s=t.get_array(r)[e];s.splice(s.length-1,1),1==s.length&&t.data[r].splice(e,1)}if(o){const e=t.data[o].length-1,s=t.get_array(o)[e];s.splice(s.length-1,1),1==s.length&&t.data[o].splice(e,1)}this._emit_cds_changes(t),this._drawing=!1,this._show_vertices()}}s.PolyVertexDrawToolView=n,n.__name__="PolyVertexDrawToolView";class _ extends a.PolyDrawTool{constructor(e){super(e)}}s.PolyVertexDrawTool=_,l=_,_.__name__="PolyVertexDrawTool",_.__module__="geoviews.models.custom_tools",l.prototype.default_view=n,l.define((({Any:e})=>({end_style:[e,{}],node_style:[e,{}]})))},
49
- "296f32feb2": function _(e,t,s,r,i){var d;r();const _=e("@bokehjs/core/util/object"),o=e("@bokehjs/core/util/types"),l=e("@bokehjs/models/tools/edit/poly_edit_tool");class n extends l.PolyEditToolView{deactivate(){this._hide_vertices(),this._selected_renderer&&(this._drawing&&(this._remove_vertex(),this._drawing=!1),this._emit_cds_changes(this._selected_renderer.data_source,!1,!0,!1))}_pan(e){if(null==this._basepoint||null==this.model.vertex_renderer)return;const t=this._drag_points(e,[this.model.vertex_renderer]);e.shift_key||this._move_linked(t),this._selected_renderer&&this._selected_renderer.data_source.change.emit()}_pan_end(e){if(null==this._basepoint||null==this.model.vertex_renderer)return;const t=this._drag_points(e,[this.model.vertex_renderer]);e.shift_key||this._move_linked(t),this._emit_cds_changes(this.model.vertex_renderer.data_source,!1,!0,!0),this._selected_renderer&&this._emit_cds_changes(this._selected_renderer.data_source),this._basepoint=null}_drag_points(e,t){if(null==this._basepoint)return[];const[s,r]=this._basepoint,i=[];for(const d of t){const t=this._map_drag(s,r,d),_=this._map_drag(e.sx,e.sy,d);if(null==_||null==t)continue;const[o,l]=_,[n,a]=t,[c,h]=[o-n,l-a],u=d.glyph,f=d.data_source,[y,m]=[u.x.field,u.y.field];for(const e of f.selected.indices){const t=[];y&&(t.push(f.data[y][e]),f.data[y][e]+=c),m&&(t.push(f.data[m][e]),f.data[m][e]+=h),t.push(c),t.push(h),i.push(t)}f.change.emit()}return this._basepoint=[e.sx,e.sy],i}_set_vertices(e,t,s){if(null==this.model.vertex_renderer)return;const r=this.model.vertex_renderer.glyph,i=this.model.vertex_renderer.data_source,[d,l]=[r.x.field,r.y.field];if(d&&((0,o.isArray)(e)?i.data[d]=e:r.x={value:e}),l&&((0,o.isArray)(t)?i.data[l]=t:r.y={value:t}),null!=s)for(const e of(0,_.keys)(s))i.data[e]=s[e],r[e]={field:e};else for(const e of i.columns())i.data[e]=[];this._emit_cds_changes(i,!0,!0,!1)}_move_linked(e){if(!this._selected_renderer)return;const t=this._selected_renderer,s=t.glyph,r=t.data_source,[i,d]=[s.xs.field,s.ys.field],_=r.data[i],o=r.data[d];for(const t of e){const[e,s,r,i]=t;for(let t=0;t<_.length;t++){const d=_[t],l=o[t];for(let t=0;t<d.length;t++)d[t]==e&&l[t]==s&&(d[t]+=r,l[t]+=i)}}}_tap(e){if(null==this.model.vertex_renderer)return;const t=this.model.vertex_renderer,s=this._map_drag(e.sx,e.sy,t);if(null!=s){if(this._drawing&&this._selected_renderer){let[r,i]=s;const d=t.data_source,_=t.glyph,[o,l]=[_.x.field,_.y.field],n=d.selected.indices;[r,i]=this._snap_to_vertex(e,r,i);const a=n[0];if(d.selected.indices=[a+1],o){const e=d.get_array(o),t=e[a];e[a]=r,e.splice(a+1,0,t)}if(l){const e=d.get_array(l),t=e[a];e[a]=i,e.splice(a+1,0,t)}return d.change.emit(),void this._emit_cds_changes(this._selected_renderer.data_source,!0,!1,!0)}this._select_event(e,this._select_mode(e),[t])}}_show_vertices(e){if(!this.model.active)return;const t=this._select_event(e,"replace",this.model.renderers);if(!t.length)return this._hide_vertices(),this._selected_renderer=null,void(this._drawing=!1);const s=t[0],r=s.glyph,i=s.data_source,d=i.selected.indices[0],[l,n]=[r.xs.field,r.ys.field];let a,c;l?(a=i.data[l][d],(0,o.isArray)(a)||(i.data[l][d]=a=Array.from(a))):a=r.xs.value,n?(c=i.data[n][d],(0,o.isArray)(c)||(i.data[n][d]=c=Array.from(c))):c=r.ys.value;const h={};for(const e of(0,_.keys)(this.model.end_style))h[e]=[this.model.end_style[e]];for(const e of(0,_.keys)(this.model.node_style))for(let t=0;t<a.length-2;t++)h[e].push(this.model.node_style[e]);for(const e of(0,_.keys)(this.model.end_style))h[e].push(this.model.end_style[e]);this._selected_renderer=s,this._set_vertices(a,c,h)}}s.PolyVertexEditToolView=n,n.__name__="PolyVertexEditToolView";class a extends l.PolyEditTool{constructor(e){super(e)}}s.PolyVertexEditTool=a,d=a,a.__name__="PolyVertexEditTool",a.__module__="geoviews.models.custom_tools",d.prototype.default_view=n,d.define((({Any:e})=>({end_style:[e,{}],node_style:[e,{}]})))},
49
+ "8837add128": function _(e,t,s,r,i){var d;r();const o=e("@bokehjs/core/util/object"),_=e("@bokehjs/core/util/types"),l=e("@bokehjs/models/tools/edit/poly_edit_tool");class n extends l.PolyEditToolView{deactivate(){this._hide_vertices(),this._selected_renderer&&(this._drawing&&(this._remove_vertex(),this._drawing=!1),this._emit_cds_changes(this._selected_renderer.data_source,!1,!0,!1))}_pan(e){if(null==this._basepoint||null==this.model.vertex_renderer)return;const t=this._drag_points(e,[this.model.vertex_renderer]);e.modifiers.shift||this._move_linked(t),this._selected_renderer&&this._selected_renderer.data_source.change.emit()}_pan_end(e){if(null==this._basepoint||null==this.model.vertex_renderer)return;const t=this._drag_points(e,[this.model.vertex_renderer]);e.modifiers.shift||this._move_linked(t),this._emit_cds_changes(this.model.vertex_renderer.data_source,!1,!0,!0),this._selected_renderer&&this._emit_cds_changes(this._selected_renderer.data_source),this._basepoint=null}_drag_points(e,t){if(null==this._basepoint)return[];const[s,r]=this._basepoint,i=[];for(const d of t){const t=this._map_drag(s,r,d),o=this._map_drag(e.sx,e.sy,d);if(null==o||null==t)continue;const[_,l]=o,[n,a]=t,[c,h]=[_-n,l-a],u=d.glyph,f=d.data_source,[m,y]=[u.x.field,u.y.field];for(const e of f.selected.indices){const t=[];m&&(t.push(f.data[m][e]),f.data[m][e]+=c),y&&(t.push(f.data[y][e]),f.data[y][e]+=h),t.push(c),t.push(h),i.push(t)}f.change.emit()}return this._basepoint=[e.sx,e.sy],i}_set_vertices(e,t,s){if(null==this.model.vertex_renderer)return;const r=this.model.vertex_renderer.glyph,i=this.model.vertex_renderer.data_source,[d,l]=[r.x.field,r.y.field];if(d&&((0,_.isArray)(e)?i.data[d]=e:r.x={value:e}),l&&((0,_.isArray)(t)?i.data[l]=t:r.y={value:t}),null!=s)for(const e of(0,o.keys)(s))i.data[e]=s[e],r[e]={field:e};else for(const e of i.columns())i.data[e]=[];this._emit_cds_changes(i,!0,!0,!1)}_move_linked(e){if(!this._selected_renderer)return;const t=this._selected_renderer,s=t.glyph,r=t.data_source,[i,d]=[s.xs.field,s.ys.field],o=r.data[i],_=r.data[d];for(const t of e){const[e,s,r,i]=t;for(let t=0;t<o.length;t++){const d=o[t],l=_[t];for(let t=0;t<d.length;t++)d[t]==e&&l[t]==s&&(d[t]+=r,l[t]+=i)}}}_tap(e){if(null==this.model.vertex_renderer)return;const t=this.model.vertex_renderer,s=this._map_drag(e.sx,e.sy,t);if(null!=s){if(this._drawing&&this._selected_renderer){let[r,i]=s;const d=t.data_source,o=t.glyph,[_,l]=[o.x.field,o.y.field],n=d.selected.indices;[r,i]=this._snap_to_vertex(e,r,i);const a=n[0];if(d.selected.indices=[a+1],_){const e=d.get_array(_),t=e[a];e[a]=r,e.splice(a+1,0,t)}if(l){const e=d.get_array(l),t=e[a];e[a]=i,e.splice(a+1,0,t)}return d.change.emit(),void this._emit_cds_changes(this._selected_renderer.data_source,!0,!1,!0)}this._select_event(e,this._select_mode(e),[t])}}_show_vertices(e){if(!this.model.active)return;const t=this._select_event(e,"replace",this.model.renderers);if(!t.length)return this._hide_vertices(),this._selected_renderer=null,void(this._drawing=!1);const s=t[0],r=s.glyph,i=s.data_source,d=i.selected.indices[0],[l,n]=[r.xs.field,r.ys.field];let a,c;l?(a=i.data[l][d],(0,_.isArray)(a)||(i.data[l][d]=a=Array.from(a))):a=r.xs.value,n?(c=i.data[n][d],(0,_.isArray)(c)||(i.data[n][d]=c=Array.from(c))):c=r.ys.value;const h={};for(const e of(0,o.keys)(this.model.end_style))h[e]=[this.model.end_style[e]];for(const e of(0,o.keys)(this.model.node_style))for(let t=0;t<a.length-2;t++)h[e].push(this.model.node_style[e]);for(const e of(0,o.keys)(this.model.end_style))h[e].push(this.model.end_style[e]);this._selected_renderer=s,this._set_vertices(a,c,h)}}s.PolyVertexEditToolView=n,n.__name__="PolyVertexEditToolView";class a extends l.PolyEditTool{constructor(e){super(e)}}s.PolyVertexEditTool=a,d=a,a.__name__="PolyVertexEditTool",a.__module__="geoviews.models.custom_tools",d.prototype.default_view=n,d.define((({Any:e})=>({end_style:[e,{}],node_style:[e,{}]})))},
50
50
  "92294e6ad2": function _(o,e,s,t,c){var n;t();const l=o("@bokehjs/models/tools/actions/action_tool"),r=o("@bokehjs/models/sources/column_data_source"),_=o("@bokehjs/styles/icons.css");class i extends l.ActionToolView{doit(){const o=this.model.sources;for(const e of o)e.buffer&&0!=e.buffer.length&&(e.data=e.buffer.pop(),e.change.emit(),e.properties.data.change.emit())}}s.RestoreToolView=i,i.__name__="RestoreToolView";class a extends l.ActionTool{constructor(o){super(o),this.tool_name="Restore",this.tool_icon=_.tool_icon_undo}}s.RestoreTool=a,n=a,a.__name__="RestoreTool",a.__module__="geoviews.models.custom_tools",n.prototype.default_view=i,n.define((({Array:o,Ref:e})=>({sources:[o(e(r.ColumnDataSource)),[]]})))},
51
- }, "c764d38756", {"index":"c764d38756","models/index":"b4555bea44","models/checkpoint_tool":"1d7c6c8516","models/clear_tool":"1c15765006","models/poly_draw":"cddc7627cc","models/poly_edit":"296f32feb2","models/restore_tool":"92294e6ad2"}, {});});
51
+ }, "c764d38756", {"index":"c764d38756","models/index":"b4555bea44","models/checkpoint_tool":"1d7c6c8516","models/clear_tool":"1c15765006","models/poly_draw":"cddc7627cc","models/poly_edit":"8837add128","models/restore_tool":"92294e6ad2"}, {});});
@@ -18,7 +18,7 @@ export class PolyVertexEditToolView extends PolyEditToolView {
18
18
  if (this._basepoint == null || this.model.vertex_renderer == null)
19
19
  return;
20
20
  const points = this._drag_points(ev, [this.model.vertex_renderer]);
21
- if (!ev.shift_key) {
21
+ if (!ev.modifiers.shift) {
22
22
  this._move_linked(points);
23
23
  }
24
24
  if (this._selected_renderer)
@@ -28,7 +28,7 @@ export class PolyVertexEditToolView extends PolyEditToolView {
28
28
  if (this._basepoint == null || this.model.vertex_renderer == null)
29
29
  return;
30
30
  const points = this._drag_points(ev, [this.model.vertex_renderer]);
31
- if (!ev.shift_key) {
31
+ if (!ev.modifiers.shift) {
32
32
  this._move_linked(points);
33
33
  }
34
34
  this._emit_cds_changes(this.model.vertex_renderer.data_source, false, true, true);
@@ -1 +1 @@
1
- {"version":3,"file":"poly_edit.js","sourceRoot":"","sources":["../../../models/poly_edit.ts"],"names":[],"mappings":";AAEA,OAAO,EAAC,IAAI,EAAC,MAAM,2BAA2B,CAAA;AAC9C,OAAO,EAAC,OAAO,EAAC,MAAM,0BAA0B,CAAA;AAKhD,OAAO,EAAC,YAAY,EAAE,gBAAgB,EAAC,MAAM,2CAA2C,CAAA;AAOxF,MAAM,OAAO,sBAAuB,SAAQ,gBAAgB;IAG1D,UAAU;QACR,IAAI,CAAC,cAAc,EAAE,CAAA;QACrB,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE;YAC5B,OAAM;SACP;aAAM,IAAI,IAAI,CAAC,QAAQ,EAAE;YACxB,IAAI,CAAC,cAAc,EAAE,CAAA;YACrB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAA;SACtB;QACD,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,kBAAkB,CAAC,WAAW,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,CAAA;IACjF,CAAC;IAED,IAAI,CAAC,EAAgB;QACnB,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI,IAAI,IAAI,CAAC,KA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,CAAC,EAAE,CAAC,MAAM,GAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE;gBAClD,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAE,IAAI,CAAC,KAAa,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAA;aACtD;SACF;QACD,KAAK,MAAM,GAAG,IAAI,IAAI,CAAE,IAAI,CAAC,KAAa,CAAC,SAAS,CAAC;YACnD,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAE,IAAI,CAAC,KAAa,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAA;QACtD,IAAI,CAAC,kBAAkB,GAAG,QAAQ,CAAA;QAClC,IAAI,CAAC,aAAa,CAAC,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,CAAA;IACpC,CAAC;;;AAcH,MAAM,OAAO,kBAAmB,SAAQ,YAAY;IAKlD,YAAY,KAAyC;QACnD,KAAK,CAAC,KAAK,CAAC,CAAA;IACd,CAAC;;;;AAEM,6BAAU,GAAG,8BAA8B,CAAA;AAElD;IACE,EAAI,CAAC,SAAS,CAAC,YAAY,GAAG,sBAAsB,CAAA;IAEpD,EAAI,CAAC,MAAM,CAA2B,CAAC,EAAC,GAAG,EAAC,EAAE,EAAE,CAAC,CAAC;QAChD,SAAS,EAAG,CAAE,GAAG,EAAE,EAAE,CAAE;QACvB,UAAU,EAAE,CAAE,GAAG,EAAE,EAAE,CAAE;KACxB,CAAC,CAAC,CAAA;AAEL,CAAC,GAAA,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@holoviz/geoviews",
3
- "version": "1.10.0",
3
+ "version": "1.10.1-a2",
4
4
  "description": "Simple, concise geographical visualization in Python",
5
5
  "license": "BSD-3-Clause",
6
6
  "repository": {
@@ -8,7 +8,7 @@
8
8
  "url": "https://github.com/holoviz/geoviews.git"
9
9
  },
10
10
  "dependencies": {
11
- "@bokeh/bokehjs": "~3.1.1"
11
+ "@bokeh/bokehjs": "~3.2.1"
12
12
  },
13
13
  "devDependencies": {},
14
14
  "files": [